mirror of
https://github.com/sipeed/picoclaw.git
synced 2026-06-12 18:08:54 +00:00
feat(agent): /clear now clears seahorse DB in addition to JSONL
- Add Clear(ctx, sessionKey) to ContextManager interface - Implement Clear for legacy (JSONL) and seahorse (DB + JSONL) - Add Engine.ClearSession + Store.ClearConversation - Fix FTS5 DELETE trigger syntax in schema (was using wrong external-content FTS5 syntax; now uses standard DELETE FROM) - Fix ClearSession to skip sessions never ingested (was creating blank conversations record via GetOrCreateConversation) - Simplify summary_parents DELETE into single OR statement - Add TestStoreClearConversation unit test
This commit is contained in:
@@ -24,6 +24,10 @@ type ContextManager interface {
|
||||
// Ingest records a message into the ContextManager's own storage.
|
||||
// Called after each message is persisted to session JSONL.
|
||||
Ingest(ctx context.Context, req *IngestRequest) error
|
||||
|
||||
// Clear removes all stored context for a session (messages, summaries, etc.).
|
||||
// Called when the user issues /clear or /reset.
|
||||
Clear(ctx context.Context, sessionKey string) error
|
||||
}
|
||||
|
||||
// AssembleRequest is the input to Assemble.
|
||||
|
||||
Reference in New Issue
Block a user