[1.6.0] - 2026-05-31
feat: hybrid code search — exact + semantic in one call (#67)
Adds a hybrid_search tool ("grep on steroids") that fuses exact matching
(regex/keyword) with semantic ranking over a symbol-aware local index, in a
single call. It surfaces code that does what you describe even when it
doesn't contain the query words, and ranks plain grep-style hits by relevance.
- New module
src/tools/hybrid_search.js: walks source files (honoring the
shared ignore list), splits them into symbol-centered chunks (lightweight
AST-ish boundary detection across JS/TS/Python/Go/Rust/Java/etc.), and scores
each chunk with BM25 + a hashed bag-of-words vector, boosting exact matches. - Modes:
hybrid(default),regex,keyword,semantic. - Fully local and dependency-free — reuses the existing
src/rag/index_store
scoring engine, so there are no model downloads, no native runtime, and no
external services. Inspired by the projects suggested in #67 (colgrep,
semble) but kept zero-dependency to match SmallCode's local-first design. - Wired into the executor, tool schemas, the search/code-intel routing
categories, and tool-call dedup. Path arguments are contained to the project
viasafeResolvePath. - Tunables:
SMALLCODE_HYBRID_MAX_FILES(default 1500),
SMALLCODE_HYBRID_MAX_BYTES(default 512KiB). - Test coverage:
test/hybrid_search.test.js(11 cases). Full suite: 313
passing.
feat: refreshed terminal UI visuals (#72)
Visual-only refresh of the TUI renderer (no runtime/raw-mode changes):
- Compact rounded-corner welcome banner card (logo, version, model, endpoint,
cwd) with responsive fallbacks for narrow viewports. - Stable 10-character gutters (
USER/AI/SYS/TOOL/DIFF) for aligned
transcripts, semantic tool-row icons, and a fixed-height command palette. - Restyled status bar (left action / centered scroll+tokens / right
model+brand+busy state) with width-aware truncation. - New
src/tui/utils.jswidth helper (fitAnsi) — CJK-aware and
surrogate-pair-safe; full wcwidth/ZWJ grapheme handling is intentionally out
of scope. Addstest/tui_layout.test.js(viewport adaptation cases). - Fixes a
prompt-injectplugin module path (../../→../../../).