Browse Source

🐞 fix: 修复文件总结路径错误的问题

Pchen. 2 months ago
parent
commit
8ec413169e
1 changed files with 2 additions and 0 deletions
  1. 2 0
      apis/AI/SummaryFile.js

+ 2 - 0
apis/AI/SummaryFile.js

@@ -4,6 +4,7 @@ const { BaseStdResponse } = require("../../BaseStdResponse")
 const db = require("../../plugin/DataBase/db")
 const axios = require('axios')
 const { core_url } = require('../../config.json')
+const path = reqiure('path')
 
 class SummaryFile extends API {
     constructor() {
@@ -43,6 +44,7 @@ class SummaryFile extends API {
 
         try {
             const time = new Date().getTime()
+            filePath = path.join(r[0].path, filePath)
             sql = 'INSERT INTO file_summary_tasks (repo_id, create_time, create_user, repo_hash, filepath) VALUES (?, ?, ?, ?, ?)'
             let r = await db.query(sql, [id, time, uuid, hash, filePath])