feat(infra): tracing recovery, browser cleanup, CLI fixes, UI workspace split (#709)

- Tracing: recover stale running traces/spans on startup (PG + SQLite)
- Browser: Chrome orphan cleanup via launcher PID, timeouts, Leakless
- Claude CLI: WaitDelay 5s + context-cancel early exit
- Agent loop: safety-net defer to finalize orphan root traces
- UI: split workspace sharing into separate Memory and KG toggles
- Minor: for-range idiom, min() builtin
This commit is contained in:
viettranx committed 2026-04-05 21:32:59 +07:00
1 parent 7d7b716074
commit 41e6c8f5cc
15 files changed
+208 -45

No files matched your search

+1 -4
View File
@@ -296,10 +296,7 @@ func estimateMessageChars(m providers.Message) int {
// hasImportantTail checks if the last ~500 chars of content contain error/summary keywords.
func hasImportantTail(content string) bool {
runes := []rune(content)
checkLen := 500
if checkLen > len(runes) {
checkLen = len(runes)
}
checkLen := min(500, len(runes))
tail := string(runes[len(runes)-checkLen:])
return importantTailRe.MatchString(tail)
}