Browse Source

🎈 perf: 向python后端增加传参

Pchen. 2 months ago
parent
commit
1aee00c648
4 changed files with 4 additions and 4 deletions
  1. 1 1
      apis/AI/ScanRepo.js
  2. 1 1
      apis/AI/SummaryCommit.js
  3. 1 1
      apis/AI/SummaryFile.js
  4. 1 1
      apis/Repos/GetRepoList.js

+ 1 - 1
apis/AI/ScanRepo.js

@@ -61,7 +61,7 @@ class ScanRepo extends API {
             })
 
             let endpoint = core_url + '/ai/scan'
-            await axios.post(endpoint, { uuid, repo_url: rows[0].url, task_id: String(r.insertId) })
+            await axios.post(endpoint, { uuid, repo_url: rows[0].url, task_id: String(r.insertId), repo_id: id })
         } catch (error) {
             this.logger.error('获取仓库历史失败!' + error.stack)
         }

+ 1 - 1
apis/AI/SummaryCommit.js

@@ -57,7 +57,7 @@ class SummaryCommit extends API {
             })
 
             let endpoint = core_url + '/ai/summaryCommit'
-            await axios.post(endpoint, { uuid, repo_url: rows[0].url, task_id: String(r.insertId) })
+            await axios.post(endpoint, { uuid, repo_url: rows[0].url, task_id: String(r.insertId), repo_id: id })
         } catch (error) {
             this.logger.error('添加AI分析任务失败!' + error.stack)
         }

+ 1 - 1
apis/AI/SummaryFile.js

@@ -75,7 +75,7 @@ class SummaryFile extends API {
             })
 
             let endpoint = core_url + '/ai/summaryFile'
-            await axios.post(endpoint, { uuid, repo_url: rows[0].url, task_id: String(r.insertId), file_path: filePath })
+            await axios.post(endpoint, { uuid, repo_url: rows[0].url, task_id: String(r.insertId), file_path: filePath, repo_id: id })
         } catch (error) {
             this.logger.error('添加AI分析任务失败!' + error.stack)
             return res.json({

+ 1 - 1
apis/Repos/GetRepoList.js

@@ -52,7 +52,7 @@ class GetRepoList extends API {
         try {
             // 并行执行所有请求
             const statusPromises = rows.map(item =>
-                axios.post(status_url, { uuid, repo_url: item.url })
+                axios.post(status_url, { uuid, repo_url: item.url, repo_id: id })
                     .then(res => ({ ...item, status: res.data }))
                     .catch(() => ({ ...item, status: null }))
             )