feat(agent): 支持持久化 /btw 旁路提问

This commit is contained in:
ji ruo committed 2026-09-10 21:42:25 +08:00
1 parent 8dae851b9b
commit 555539bc8e
34 files changed
+3744 -314

No files matched your search

+5
View File
@@ -377,6 +377,11 @@ func (s *ExplorationStore) StopIntentWithReason(id int64, reason, origin string)
WHERE id=$1 AND exploration_id=$2`, id, s.expID, string(newPayload)); err != nil {
return 0, err
}
// Soft deletion retains the main intent audit trail, but side conversations
// are removed atomically with the stopped state. Delayed snapshots reject it.
if _, err := tx.Exec(`DELETE FROM side_question_sessions WHERE intent_id=$1`, id); err != nil {
return 0, err
}
if origin == "" {
origin = "user"