Skip to content

v1.3.197

Choose a tag to compare

@topcheer topcheer released this 07 Aug 15:11
· 1467 commits to main since this release

v1.3.197

Highlights

  • @ fuzzy file search with relevance scoring: @ mention now supports fuzzy file name and path search with intelligent relevance scoring. Type a few letters to quickly locate files, just like Codex and Claude. (#8)
  • Incremental code index: The BM25 code index now does true incremental updates - only re-indexes files that changed, instead of rebuilding the entire index every time.
  • Smart directory skipping: Index now skips .ggcode, node_modules, build output dirs, and 40+ common dependency/temp directories across all languages.
  • Index system messages: Users now see "creating index" and "index ready" system messages in the TUI.

New Features

Fuzzy File Search with Relevance Scoring (#8)

The @ file mention now supports fuzzy matching with intelligent scoring:

  • Filename consecutive match (highest priority): typing "wechat" matches wechat_handler.go before foo_wechat_bar.go
  • Path match: typing "im/qq" matches internal/im/qq_adapter.go
  • Subsequence match: typing "qad" matches qq_adapter.go
  • Results are sorted by relevance score (descending), so the most relevant files appear first

Incremental BM25 Code Index

The code index now performs true incremental updates:

  • Only re-indexes files marked dirty (via MarkDirty), not the entire codebase
  • Updates document frequency (DF) and average document length in-place
  • Reduces CPU and I/O on every index refresh

Smart Directory Skipping

The indexer now skips 40+ common directories that should never be indexed:

  • Cache/temp: .ggcode, .cache, tmp, temp, .tmp
  • Dependencies: node_modules, vendor, __pycache__, .venv, site-packages, bower_components
  • Build output: target, build, dist, out, bin, .gradle, .mvn
  • Go: Various generated/protobuf dirs
  • System: .git, .svn, .hg, .idea, .vscode

Index System Messages

Users now see system messages when the code index starts building and when it's ready, so they know when @ fuzzy search is available.

Fixes

  • collectFiles used wrong skip mechanism: collectFiles was checking skipDirs map (only 4 entries: .git, node_modules, vendor, __pycache__) instead of the new isSkipDir() function (40+ dirs). This meant most skip directories were not actually being filtered.
  • Stale cached entries in skip directories: The index cache could contain files from directories that are now skipped (e.g., .ggcode). Added isInSkipDir() filter when loading cached documents.
  • Index system messages never displayed: Messages were sent via r.programSend which is only set in tests, never in production. Fixed to use r.program.Send() directly in the Run() startup goroutine after TUI is ready.
  • Index start timing: Index was started on a fixed 3-second timer in SetCore(), which could fire before TUI was ready. Now starts after TUI rendering completes.