fix: auto-find correct sgclaw_config.json in parent directory

Add parent sgClaw directory to config search candidates so Node.js
server automatically finds the correct config with DeepSeek API
endpoint instead of the test config in claw-new directory.

🤖 Generated with [Qoder][https://qoder.com]
This commit is contained in:
木炎
2026-04-16 22:47:39 +08:00
parent 23845413c5
commit f168f9f375

View File

@@ -22,9 +22,10 @@ function resolveConfigPath() {
} }
const candidates = [ const candidates = [
path.resolve(__dirname, "..", "..", "sgclaw_config.json"), path.resolve(__dirname, "..", "..", "..", "sgclaw_config.json"), // Parent sgClaw directory
path.resolve(__dirname, "..", "sgclaw_config.json"), path.resolve(__dirname, "..", "..", "sgclaw_config.json"), // claw-new/sgclaw_config.json
path.resolve(__dirname, "sgclaw_config.json"), path.resolve(__dirname, "..", "sgclaw_config.json"), // frontend/sgclaw_config.json
path.resolve(__dirname, "sgclaw_config.json"), // scene-generator/sgclaw_config.json
]; ];
for (const p of candidates) { for (const p of candidates) {