feat: enrich AI requests with scene context and project root path

This commit is contained in:
2026-06-15 14:31:23 +08:00
parent 5f717ac3b6
commit 395c55b6b0
2 changed files with 22 additions and 6 deletions

View File

@@ -79,8 +79,8 @@ function apiSavePlugin() {
dedupMap.set(dedupKey, Date.now())
const modePrefix = mode === 'code'
? '代码模式:直接修改 src/ 下的源码文件并保存。需求:'
: 'JSON模式只返回修改后的 JSON 文本,不要写任何文件。需求:'
? `当前项目根目录: ${__dirname}\n代码模式:直接修改 src/ 下的源码文件并保存。需求:`
: `当前项目根目录: ${__dirname}\nJSON模式只返回修改后的 JSON 文本,不要写任何文件。需求:`
const fullMessage = modePrefix + userMessage
const args = ['run', '--model', 'deepseek/deepseek-v4-pro', '--format', 'json']