修复AI工具调用报错

This commit is contained in:
2025-09-17 18:29:54 +08:00
parent dd3f702887
commit 5613cdd6c9
22 changed files with 260 additions and 282 deletions

View File

@@ -3,7 +3,7 @@
// API配置
window.API_CONFIG = {
baseUrl: 'http://127.0.0.1:5002',
baseUrl: window.parent.ENV_CONFIG.API_URL,
endpoints: {
variableNaming: '/api/aimodelapp/variable-naming'
}

View File

@@ -47,7 +47,7 @@ async function callBackendAPI(description) {
throw new Error('未登录请先登录后使用AI功能');
}
const response = await fetch('http://127.0.0.1:5002/api/aimodelapp/variable-naming', {
const response = await fetch(`${window.API_CONFIG.baseUrl}/api/aimodelapp/variable-naming`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',