[Feature & Fix] Enhance session and history search and analysis - #39
Merged
Conversation
Remove intermediate thinking flush from tool_started(). Thinking buffer now accumulates silently during tool execution and renders as a single panel at finish(). Eliminates N interleaved thinking panels between tool audit lines, dramatically reducing visual clutter during long tasks.
During tool execution gaps, the spinner now shows a truncated thinking preview (💭 analyzing...) that updates in-place instead of being invisible. When a tool starts, spinner switches back to tool display. Final thinking panel still renders at finish() for the complete record.
…y at finish) The thinking buffer now flushes when the FIRST tool in a new batch starts (checked via empty _active_tools), not at every tool_started (original noise) and not only at finish (Phase 1 - invisible during execution). Pattern: one thinking panel per LLM reasoning round, followed by that round's tool audit lines. The user sees thinking progress throughout execution.
…OR semantics P0: DuckDB FTS Chinese support - FTS index: stemmer='none', stopwords='none', ignore='(\.|[^\w])+' - CJK characters now properly indexed (no longer dropped by [^a-z] filter) - Drop + rebuild on startup to ensure correct tokenization P0: session_list tool - New tool for browsing past sessions (titles/dates/summaries) - No keywords needed — returns chronological list (limit=10, max=30) - Registered alongside session_search P0: conversation_sessions.summary column - Schema migration: ALTER TABLE ADD COLUMN summary - end_session() accepts summary parameter - _persist_session_summary writes to both leap_memory and sessions table P1: Memory search OR semantics + CJK bigram tokenization - semantic.py: ILIKE AND → OR with overlap-ratio scoring - _tokenize_for_search(): CJK bigram splitting (no jieba dependency) - Applied to manager.py prefetch + engine.py _keywords_from_query P1: session_search Chinese improvement - _prepare_fts_query(): CJK chars split individually for BM25 matching - Fallback: OR-based multi-keyword ILIKE (max 6 terms) P2: System prompt three-tier recall guidance - Layer 0 context → session_list → session_search (escalating specificity)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.