refactor: Improve chat stream content and tool call parsing with a new recursive extraction function and dedicated tests.

This commit is contained in:
CJACK
2026-02-17 14:35:24 +08:00
parent 5106773573
commit 05422b2449
5 changed files with 349 additions and 25 deletions

View File

@@ -327,6 +327,7 @@ func (r *Runner) runPreflight(ctx context.Context) error {
{"go", "test", "./...", "-count=1"},
{"node", "--check", "api/chat-stream.js"},
{"node", "--check", "api/helpers/stream-tool-sieve.js"},
{"node", "--test", "api/helpers/stream-tool-sieve.test.js", "api/chat-stream.test.js"},
{"npm", "run", "build", "--prefix", "webui"},
}
f, err := os.OpenFile(r.preflightLog, os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0o644)