You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
func (t*sessionSearchTool) Description() string { return`Search and retrieve past agent sessions. Actions: list (recent sessions), search (keyword search), get (full session by ID), find (sessions by task/title). Use this when the user asks about previously discussed topics.` }
27
+
func (t*sessionSearchTool) Description() string { return`Search and retrieve past agent sessions. Actions: list (recent sessions), search (semantic keyword search through full message content), get (full session by ID), find (sessions by task/title). Uses semantic vector search for the search action — it finds sessions whose conversation content is relevant to your query, even when titles don't match. Use OR between keywords for broad recall.` }
-**Semantic session search** — `session_search` now uses go-vector's RandomProjections embedder to find sessions by semantic similarity of their conversation content, not just keyword matching on titles. A search for "code review" now finds sessions discussing code review, even when their titles are "tg-8592463065".
7
+
-**Automatic vector indexing** — every session Save() embeds the user+assistant conversation text using a pure-Go random projection (Achlioptas 2003) and persists the vector in `~/.odek/sessions/vectors.gob`. New sessions are indexed automatically. Index is rebuilt from scratch on first startup, then loaded from persisted gob files.
8
+
-**`BuildConversationText()`** — new helper extracts user queries + assistant responses for embedding, excluding system prompts and tool noise.
9
+
10
+
### Infrastructure
11
+
-**`go-vector` upgraded v1.1.1→v1.2.0** — adds `SaveEmbedder()`/`LoadEmbedder()` methods to RandomProjections for embedder state persistence (seed 42 deterministic, 256-dim sparse random projection).
12
+
-**`internal/session/vector_index.go`** — new VectorIndex type wrapping go-vector's Store + RandomProjections with Init/Add/Remove/Search/Save lifecycle. Thread-safe.
13
+
14
+
### Testing
15
+
-**5 new tests** — `TestNewVectorIndex_Search` (semantic ranking), `TestVectorIndex_Remove` (idempotent delete), `TestVectorIndex_Persistence` (survives restart), `TestVectorIndex_EmptySearch` (graceful on empty), `TestBuildConversationText` (user/assistant only).
0 commit comments