docs: 精简命令模板去除冗余代码块 (v1.7.19)

- 统一所有调用外部模型的命令模板格式
- 顶部保留完整调用规范,阶段中只引用不重复
- 添加 ⚠️ 必须调用标记确保强制执行
- 修改文件:backend/frontend/debug/optimize/review/test/analyze.md
This commit is contained in:
li committed 2026-01-13 14:24:40 +08:00
1 parent 038abfd922
commit 97c7cb8bc6
11 files changed
+178 -39

No files matched your search

+25 -8
View File
@@ -1256,12 +1256,17 @@ func forwardSignals(ctx context.Context, cmd commandRunner, logErrorFn func(stri
case sig := <-sigCh:
logErrorFn(fmt.Sprintf("Received signal: %v", sig))
if proc := cmd.Process(); proc != nil {
_ = proc.Signal(syscall.SIGTERM)
time.AfterFunc(time.Duration(forceKillDelay.Load())*time.Second, func() {
if p := cmd.Process(); p != nil {
_ = p.Kill()
}
})
// Windows does not support SIGTERM - use Kill() directly
if isWindows() {
_ = proc.Kill()
} else {
_ = proc.Signal(syscall.SIGTERM)
time.AfterFunc(time.Duration(forceKillDelay.Load())*time.Second, func() {
if p := cmd.Process(); p != nil {
_ = p.Kill()
}
})
}
}
case <-ctx.Done():
}
@@ -1326,7 +1331,14 @@ func terminateCommand(cmd commandRunner) *forceKillTimer {
return nil
}
_ = proc.Signal(syscall.SIGTERM)
// Windows does not support SIGTERM - it silently fails without terminating the process.
// This causes codeagent-wrapper to hang waiting for the process to exit.
// On Windows, we directly use Kill() which calls TerminateProcess().
if isWindows() {
_ = proc.Kill()
} else {
_ = proc.Signal(syscall.SIGTERM)
}
done := make(chan struct{}, 1)
timer := time.AfterFunc(time.Duration(forceKillDelay.Load())*time.Second, func() {
@@ -1348,7 +1360,12 @@ func terminateProcess(cmd commandRunner) *time.Timer {
return nil
}
_ = proc.Signal(syscall.SIGTERM)
// Windows does not support SIGTERM - use Kill() directly
if isWindows() {
_ = proc.Kill()
} else {
_ = proc.Signal(syscall.SIGTERM)
}
return time.AfterFunc(time.Duration(forceKillDelay.Load())*time.Second, func() {
if p := cmd.Process(); p != nil {
+1 -1
View File
@@ -14,7 +14,7 @@ import (
)
const (
version = "5.4.1"
version = "5.5.0"
defaultWorkdir = "."
defaultTimeout = 7200 // seconds (2 hours)
defaultCoverageTarget = 90.0