Commit Graph

672 Commits

Author SHA1 Message Date
can1357 48766eb88a fix(tui): kept ProcessTerminal and window-title writes headless under the test runtime
- `ProcessTerminal` now captures a per-instance `#headless` from `isTerminalHeadless()` at construction and re-reads it in `start()`; when set, `#safeWrite`, `start`, `stop`, `drainInput`, and `setProgress` short-circuit, so frame paints, `start()` probes (OSC 11 / DA1 / kitty), the progress keepalive, stdin raw mode, SIGWINCH, and teardown escapes no longer reach a real terminal during `bun test` (previously `#safeWrite` only skipped on `!isTTY`, so an interactive terminal leaked stray boxes and probe queries).
- Gated the `emergencyTerminalRestore()` blind-restore branch and `TerminalInfo.sendNotification` on the headless flag, and guarded `setTerminalTitle`/`pushTerminalTitle`/`popTerminalTitle` in `title-generator.ts`.
- Opted the terminal-contract suites (terminal-appearance, notifications, emergency-restore-altscreen, issue-2034 write gate, process-terminal-render-harness, render-stress-harness) back into real I/O with `setTerminalHeadless(false)`, restoring on teardown.
- Added `process-terminal-headless.test.ts` asserting zero writes under a forced TTY when headless and real frame/probe output after opt-out.
2026-06-17 01:21:03 +02:00
can1357 d30bec5126 feat(tui): added stacked math rendering through latexToBlock
- Added latexToBlock module that renders stacked fraction math with baseline-aware rows.
- Updated markdown rendering to route display math through latexToBlock with sole-display handling.
- Exported latexToBlock from the package entrypoint and updated changelog docs accordingly.
- Added advisor resume and suppression repro tests in coding-agent for interrupted turn recovery.
2026-06-16 22:53:29 +02:00
can1357 bfe574443a feat(tui): added LaTeX color and display-math rendering support in TUI output
- Added own-line display-math tokenizers for `$$...$$` and `\[...]` markdown blocks.
- Added delimiter-free `\begin...\end` math parsing in text conversion with multiline row preservation.
- Added ANSI rendering for `\textcolor`, `\color`, `\colorbox`, and `\fcolorbox` with scoped color resets.
- Added tests for LaTeX color and math parsing edge cases, including inline code and nested scopes.
2026-06-16 22:09:32 +02:00
can1357 2d0b80ed51 Merge remote-tracking branch 'origin/farm/d563ece8/fix-always-ask-settings-focus' 2026-06-16 21:46:24 +02:00
can1357 0f013b455e feat: added LaTeX math rendering support for terminal and TUI outputs
- Added LaTeX math and Mermaid allowances in terminal and final-chat prompts.
- Added inline math tokenization in TUI for $, $$, \(\), and \[\].
- Added LaTeX-to-Unicode conversion helpers and exports for math rendering.
- Fixed inline math detection to skip escaped dollars and currency-like spans.
2026-06-16 21:45:10 +02:00
can1357 508a9f543e feat: removed render_mermaid tool and added width-aware Mermaid clipping
- Removed render_mermaid from tool discovery, task definitions, and registries.
- Removed renderMermaid setting and prompt/docs references tied to the deleted tool.
- Added maxWidth and theme color options to Mermaid ASCII resolution in markdown flow.
- Re-rendered Mermaid ASCII in both directions and clipped output to available width.
2026-06-16 21:32:39 +02:00
roboomp 27f0b922c7 fix(tui): preserved overlay-owned prompt focus
Overlay roots can now declare nested focus targets they own so visible overlays keep their active child focused while background prompt focus steals remain blocked.

Updated the setup wizard to register scene prompt focus targets and covered the nested prompt path in the overlay focus regression test.

Fixes #2789
2026-06-16 19:06:18 +00:00
roboomp 354bb2dadf fix(tui): kept overlay focus above hidden prompts
Background approval prompts could steal TUI focus from visible overlays such as /settings, leaving keystrokes routed to a hidden surface.

Pinned the focused component to the top visible overlay and added a regression test for the always-ask approval focus path.

Fixes #2789
2026-06-16 18:39:27 +00:00
can1357 52713aa224 Merge PR #2741: fix(tui): stop Warp resize feedback-loop redraw storm
Break the Warp resize feedback-loop redraw storm by env-pinning resize classification. Merge resolves the issue-2088 test against #2755 by keeping the CMUX env-clearing setup and adding #2741's TERM_PROGRAM/PI_TUI_RESIZE_IN_PLACE neutralizers.
2026-06-16 14:53:38 +02:00
can1357 9b394582d7 Merge PR #2755: fix(tui): detect CMUX as multiplexer
Detect CMUX as a multiplexer via CMUX_WORKSPACE_ID/CMUX_SURFACE_ID. NOTE (owner-accepted caveat): introduces a test-isolation gap - direct-terminal TUI tests fail when the suite is run inside a cmux terminal (CI unaffected); follow-up to consolidate multiplexer-env clearing into a shared helper.
2026-06-16 14:52:42 +02:00
can1357 4fe490dd92 Merge PR #2733: fix(tui): preserve scrollback while editing
Disable xterm modes 1010/1011 so terminal output and keypresses no longer force scroll-to-bottom while editing; restore the originally-set modes on stop().
2026-06-16 14:52:39 +02:00
can1357 3e8ffa72a9 fix(tui): scope keypad CSI-u fast path to keypad codepoints
The printable-first short-circuit in matchesKey/parseKey decoded every printable CSI-u/modifyOtherKeys sequence, so canonical named keys carrying a printable codepoint (space=32, shifted letters, DEL=127) stopped normalizing through the native matcher: parseKey returned a literal space instead of "space" and DEL instead of "backspace", breaking keybindings and deletion.

Restrict the fast path to the keypad numpad/operator codepoints the native protocol misclassifies without a NumLock modifier (decodeKittyKeypadText); everything else falls through to native normalization. Also filter DEL out of the modifyOtherKeys decode so it is never inserted as text, and reuse KITTY_MOD_NUM_LOCK in the lock mask (its original gate was removed, leaving it unused and failing lint).

Addresses review feedback on #2767.
2026-06-16 14:34:45 +02:00
0xff26b9a8 d4b01d3a48 fix(tui): handle VS Code keypad digit input 2026-06-16 18:55:23 +08:00
Patrick Hardwick 3783130b82 fix(tui): detect CMUX as multiplexer 2026-06-16 02:56:29 -05:00
sorphwer 89fb1b0a49 fix(tui): stop Warp resize feedback-loop redraw storm
The non-multiplexer resize fast path borrows the alternate screen for
throwaway drag frames. Warp reports a terminal height one row different
for the alt buffer, so each alt enter/leave emits a fresh SIGWINCH that
re-enters the fast path — a self-sustaining loop that floods ED3 full
repaints with completely stable geometry (observed ~130
fullPaint(clearScrollback) frames over 15s, continuing after the drag
stopped). PI_FORCE_SYNC_OUTPUT cannot help (it is a loop, not tearing);
tmux works because the multiplexer path never toggles the alt buffer.

Route resize through the in-place repaint path (no alt-screen borrow, no
ED3 rewrap) for multiplexers and for terminals that re-report size on
alt-screen toggles, via resizeRepaintsInPlace(). Default-on for Warp,
overridable with PI_TUI_RESIZE_IN_PLACE=1|0. Tradeoff matches a
multiplexer: scrollback above the window keeps its old wrap.

Tests assert no alt-screen borrow / no ED3 across a Warp resize burst and
that the override toggles both ways; existing direct-terminal resize
tests now pin TERM_PROGRAM so they stay deterministic under Warp.
2026-06-16 12:27:53 +08:00
roboomp a7fd37e487 fix(tui): preserved scrollback while editing
Disabled xterm scroll-to-bottom-on-output and scroll-to-bottom-on-keypress private modes while the TUI owns the terminal, restoring any modes that were set before startup on exit.

Added regression coverage for DECRPM-driven mode disable and restore behavior.

Fixes #2732
2026-06-16 02:03:51 +00:00
can1357 9622da4597 Merge PR #2400: feat(tui): Zellij and WezTerm pane fallbacks for terminal session continuity 2026-06-15 19:46:12 +02:00
can1357 49fef26fb3 Merge PR #1748: fix(tui): replace live slash autocomplete prefix on accept 2026-06-15 19:46:12 +02:00
can1357 99a4e2933e fix(tui): fixed native scrollback loss for streaming assistant rows
- Tracked snapshot-safe boundaries to retain commit-stable streamed rows in scrollback.
- Computed durableBoundary from commit and snapshot ends to prevent row drop regressions.
- Updated audit-row handling so drifting durable rows were excluded from resync checks.
- Added regression tests for commit-stable and commit-unstable relayout streaming cases.
2026-06-14 17:10:35 +02:00
can1357 b830f7912b feat: unified speech setup and introduced local STT/TTS capabilities
- Added unified `omp setup speech` flow with JSON/check modes and model picker.
- Added local STT pipeline with sherpa workers, recorder/download flow, and streaming inference.
- Added local TTS pipeline with `omp say`, backend selection, and streaming vocalization.
- Replaced legacy speech settings with unified `speech`/`speechgen` configuration keys.
2026-06-14 16:07:44 +02:00
can1357 ff0fc74f53 feat(coding-agent/modes): implemented space-bar hold push-to-talk STT gesture
- Added a space-hold gesture state machine in CustomEditor, tracking repeated spaces, detecting holds beyond SPACE_HOLD_THRESHOLD, and firing start/end callbacks via a release timer.
- Hooked editor space-hold callbacks in InputController so STT toggles on hold start and again on release when STT is enabled.
- Added tests for space-hold start/stop behavior and updated keybinding docs to describe the hold-to-record STT workflow.
2026-06-14 08:34:56 +02:00
can1357 6c616ca847 fix: fixed OpenAI promotion linking for namespaced gpt-5.5 variants
- Updated OpenAI context promotion linking to resolve target models by parsed version and provider/API match instead of fixed bare ids.
- Scanned available siblings to select the plainest matching gpt-5.4 fallback so namespaced, dotted, and dated 5.5 variants promote correctly.
- Adjusted the TUI render stress shadow writer to ignore alternate-screen regions and replay only normal-screen bytes after exits.
2026-06-14 07:14:11 +02:00
can1357 8345f47c86 Merge remote-tracking branch 'origin/farm/cb61fdcb/fix-multiplexer-detection-via-term' 2026-06-14 07:02:50 +02:00
can1357 8e2d3b790f fix(tui): used alternate screen during resize repaints
- Used the alternate screen for transient resize viewport redraws to prevent wrapped rows from leaking into native scrollback.
- Added enter/leave helpers with resize-alt state tracking and ensured stop/full-paint paths exit that buffer cleanly.
- Adjusted resize repaint scheduling to render immediately and only reschedule when additional work is queued.
2026-06-14 06:57:37 +02:00
can1357 258f030ddf fix(tui): fixed resize fast-path repaint to avoid full-screen clearing during drag
- Updated the resize fast-path repaint to remove the terminal full-screen clear and instead overwrite the viewport in place at home, rewriting each row via `#lineRewriteSequence`.
- Passed the viewport width into `#emitResizeViewport` so each row self-clears only its tail with CSI K while resize drag remains active.
- Added coverage in `resize-viewport-defer.test.ts` confirming drag-time writes omit ED2/ED3 clears and that ED3 is emitted when the resize settles.
2026-06-14 05:27:47 +02:00
roboomp 996d748af0 fix(tui): detect tmux/screen via TERM prefix when TMUX env is stripped
isMultiplexerSession() was the only multiplexer check that tested just
TMUX/STY/ZELLIJ and omitted the TERM=tmux-*/screen-* fallback every
sibling has (shouldEnableSynchronizedOutputByDefault,
detectRectangularSgrSupport, getFallbackImageProtocol).

When TMUX is stripped but TERM=tmux-256color survives (sudo without -E,
su, env-sanitizing launchers/ssh), the engine misclassified tmux as a
direct terminal. On resize/replace/resetDisplay the geometry-rebuild
full paint emitted ED3 (CSI 3 J), which wipes tmux pane history —
scrollback only reappeared after a Ctrl+L full rerender.

Align the check with siblings: also return true when TERM starts with
"tmux" or "screen".

Fixes #2544
2026-06-14 03:26:00 +00:00
can1357 c4ef8839d5 feat(tui): added large-paste collapse flow with threshold and attachment fallback
- Added `paste.largeMenuThreshold` setting with default 100 and values 0/100/250/500/1000.
- Added `Editor.onLargePaste` and `Editor.insertPaste` to intercept oversized pastes and expand markers.
- Added threshold-based large-paste routing to show the menu and wrap oversized content for code/XML or attachment fallback.
- Added tests for large-paste interception, fallback behavior, short-paste handling, and marker expansion.
2026-06-14 05:20:55 +02:00
can1357 660ef6fb8c Merge PR #2504: support ctrl+j as additional newline key 2026-06-14 03:32:53 +02:00
can1357 81bf6ee965 Merge PR #2506: glow magic keywords through cursor seam + focused shimmer 2026-06-14 02:57:08 +02:00
can1357 0c8cee3080 Merge PR #2521: clamp editor height and overlays on small terminals 2026-06-14 02:56:57 +02:00
can1357 686f23a925 Merge PR #2488: TUI event-loop watchdog + phase breadcrumbs 2026-06-14 02:56:31 +02:00
can1357 24c8bb24c6 feat(session): added modular session APIs and rebuilt listing/persistence behavior
- Added session-domain modules and exports for session-entries, context, listing, loader, and migrations.
- Changed persistence to async append writes plus writeTextAtomic, removing sync line APIs.
- Added compaction-aware session context rebuild with dangling tool-call cleanup.
- Added resumable session resolution with status inference, id/stem/suffix matching, and backup recovery.
2026-06-14 02:02:53 +02:00
metaphorics a95be2860f fix(tui): honest editor-height floor and dead-branch cleanup
Addresses Copilot + Codex review on #2521:

- computeEditorMaxHeight returned 1 on terminals too small to host both the
  editor and the chrome reserve, but the bordered editor never renders fewer
  than 3 rows (2 border + 1 content). The cap now floors at that real minimum
  (EDITOR_MIN_RENDERED_ROWS) so it no longer misreports the rows the editor
  occupies; rendering is unchanged, and the contract is documented honestly
  (reserve holds once terminalRows >= 7).
- #resolveOverlayLayout now always resolves maxHeight (?? availHeight), so the
  maxHeight !== undefined branch in effectiveHeight, the composite slice guard,
  and the number | undefined return type were dead. Tightened all three.
- Mirrored the maxHeight-default contract in the render stress oracle
  (resolveExpectedOverlayLayout + compositeExpectedOverlays) so the randomized
  sweep validates the real clipped geometry instead of the obsolete unclipped
  one; updated the oracle helper test expectation accordingly.

Editor-height tests rewritten to assert the real contract (reserve when the
terminal can host both; pinned to the bordered minimum below that).
2026-06-14 08:40:12 +09:00
metaphorics 2b126ffb80 feat(tui): add event-loop watchdog and phase breadcrumbs for stall diagnosis
Always-on LoopWatchdog (armed in TUI.start/stop) logs ui.loop-blocked with blockedMs and the current loop phase on the rising edge of a late probe tick. New pushLoopPhase/popLoopPhase/currentLoopPhase stack in pi-utils feeds it; breadcrumbs at in-process subagent dispatch (subagent:<id>) and the SelectList fuzzy filter (ui.select-filter) attribute residual main-thread stalls.
2026-06-14 08:23:05 +09:00
metaphorics b28ad9a1dc fix(tui): clamp editor height and overlays on small terminals
Two bounded TUI overlap fixes:

- Editor max-height (coding-agent): the [6,18] clamp's floor of 6 exceeded
  available space on terminals <=18 rows, letting the editor crowd the
  transcript/status. Extracted a pure computeEditorMaxHeight(rows) with an
  EDITOR_MIN_CHROME_ROWS=4 upper bound; identical for rows >=18.
- Overlay overflow (tui): #resolveOverlayLayout left maxHeight undefined when
  the option was unset, so a tall overlay's bottom rows were dropped
  off-screen. maxHeight now defaults to availHeight so every overlay is
  sliced to fit and re-clamps on resize.
2026-06-14 06:59:58 +09:00
metaphorics ef366cc871 feat(tui): support ctrl+j as an additional newline key (#2473) 2026-06-14 05:52:46 +09:00
roboomp 784fd56505 fix(magic-keywords): glow keywords through the cursor seam and animate a focused shimmer
The whole-line editor decorate ran on `displayText` after the editor appended
the zero-width CURSOR_MARKER and cursor glyph; both start with ESC, so the
magic-keyword regex's right-boundary `(?!\S)` rejected `ultrathink` glued to
the marker and dropped the gradient until a trailing character was typed.

- `Editor.#decorate` (pi-tui) now splits around CURSOR_MARKER and decorates
  each user-text segment independently, so word-boundary lookarounds resolve
  correctly on both sides; the matching comment block is corrected.
- `KeywordHighlighter` / `highlightMagicKeywords` gain an optional `phase` in
  [0, 1) that cyclically rotates the gradient stops. `0` (default) yields
  the static palette, so sent-bubble rendering is unaffected.
- `CustomEditor.decorateText` derives `phase` from `Date.now()` and chains
  `setTimeout(SHIMMER_FRAME_MS)` ticks while focused, the buffer holds a
  magic keyword, and `magicKeywords.enabled` is on — the render itself
  schedules the next frame, so losing focus, deleting the keyword, or
  flipping the setting stops the animation on its own. `interactive-mode`
  wires the repaint hook to `requestComponentRender(editor)` on construction
  and after `setEditorComponent`.
- Adds `hasMagicKeyword(text)` (cheap prose-aware probe) and tests for the
  seam fix, the phase cycle, the gating, and timer cleanup.

Fixes #2475
2026-06-13 20:50:30 +00:00
can1357 ec312a2e81 fix(tui): fixed inline image demotion replay during resize viewport fast-path
- ImageBudget gained a stable partial-pass mode that replayed the last committed suppressed-image id set during beginPass(true), avoiding reordered call-order decisions.
- TUI resize viewport painting switched to beginPass(true) and stopped calling endPass so tail-only drag repaints no longer mutated image demotion state.
- An ImageBudget test now verifies stable partial passes preserved live/text decisions by id and did not trigger purge or reset in the next full pass.
2026-06-13 22:40:53 +02:00
can1357 0faef6a1e0 fix(tui): parked resize cursor at content bottom to prevent scrollback duplication
- Resize viewport composition now returns the visible content row count and forwards it to resize-frame emission for cursor placement.
- Viewport-only resize repaint now moves the hardware cursor to the real content bottom before finishing output, preventing duplicated rows from ED3 scrollback on successive height reductions.
- Tests were updated to assert no duplicate visible lines occur during drag and that only one full redraw with one scrollback erase is performed after resize settle.
2026-06-13 22:30:01 +02:00
can1357 2bbf995a1d feat(tui): added viewport-only transcript tail rendering and deferred resize repaint
- Added tail-only transcript rendering via `renderViewportTail`, stopping at `maxRows` and returning `EMPTY_TAIL`.
- Added `ViewportTailProvider`/`asViewportTailProvider` API and resize getters for viewport state.
- Implemented viewport-only painting during non-mux resize with deferred full repaint after settle.
- Added settle-resize helpers and coverage for deferred repaint timing and cancel paths.
2026-06-13 21:27:36 +02:00
enieuwy 432ef0115a feat(tui): added Zellij and WezTerm pane fallbacks for terminal session continuity 2026-06-13 00:53:34 +08:00
roboomp 33cc59f532 fix(tui): let GNU screen veto tmux hyperlinks
STY is GNU screen's explicit session marker and can coexist with TMUX in
nested multiplexer sessions. The previous ordering let tmux >= 3.4 enable
OSC 8 before screen was considered, even though a screen layer anywhere in
the path cannot forward OSC 8.

Move the STY veto ahead of the tmux version gate while keeping TERM=screen*
under TMUX eligible for the tmux gate, preserving support for tmux's
historical default-terminal=screen-256color. Add regression coverage for
STY + TMUX + TERM_PROGRAM_VERSION=3.4/3.5a resolving false.

Reported on #2404 review.
2026-06-12 16:39:46 +00:00
roboomp 459264a96e fix(tui): check TMUX before screen-family TERM
tmux's historical `default-terminal` is `screen-256color`, so a tmux
session can carry `TERM=screen*` while `TMUX` is set. The previous
order short-circuited to false on `term.startsWith("screen")` before
the tmux version gate could run, undercutting the new tmux >= 3.4
support for users on that default.

Reorder: when `TMUX` is set, run the tmux version gate first
(authoritative current-session signal). Only then fall back to TERM
heuristics for GNU screen (`STY` or screen-family TERM without TMUX)
and tmux-family TERM without TMUX. Adds a regression test pinning
TMUX + TERM=screen-256color + TERM_PROGRAM_VERSION=3.4 to true.

Reported on #2404 review.
2026-06-12 16:36:12 +00:00
roboomp d61a7aad7e fix(tui): respect OSC 8 hyperlinks under tmux >= 3.4
The capability gate hard-disabled OSC 8 whenever a multiplexer was
detected (TMUX env or TERM starting with tmux/screen), which pre-dates
tmux 3.4's OSC 8 support and has no override. Inside tmux that leaves
URLs as plain text; when one wraps at the pane edge the outer
terminal's regex link detector cannot join the hard-wrapped rows and
the URL becomes unclickable with a newline embedded in the copy.

Add two pure helpers next to the sync-output ones:

- hyperlinksUserOverride(env): PI_FORCE_HYPERLINKS=1 / PI_NO_HYPERLINKS=1.
  Opt-out beats force-on.
- shouldEnableHyperlinksByDefault(env, terminalId): user override >
  static per-terminal flag > screen-always-off > tmux gate
  (>= 3.4 via TERM_PROGRAM_VERSION which tmux self-sets since 3.2a)
  > static flag.

GNU screen never gained OSC 8, so it stays off unless explicitly
forced. Older tmux without a reported version also stays off, since
we can not distinguish 3.3 from 3.5.

Outer terminals not configured for hyperlinks see tmux drop the
sequence — identical to today's behavior — so the upgrade is safe.

Fixes #2403
2026-06-12 16:32:28 +00:00
can1357 d214e2f022 Merge branch 'pr-2182'
# Conflicts:
#	packages/coding-agent/package.json
#	packages/coding-agent/src/config/model-registry.ts
#	packages/coding-agent/src/main.ts
#	packages/coding-agent/src/modes/components/assistant-message.ts
#	packages/coding-agent/src/sdk.ts
#	packages/tui/src/components/markdown.ts
2026-06-12 11:24:26 +02:00
can1357 12bada4ce0 fix: hardened deferred MCP discovery and streaming render fast paths
- Recomputed `tools.discoveryMode: "auto"` in the deferred MCP closure in `sdk.ts` once the real tool count is known: a toolset crossing the threshold now flips discovery on, registers and activates `search_tool_bm25`, and skips `activateAll` instead of force-activating every MCP tool.
- Guarded the deferred MCP task against disposed sessions: added `AgentSession.isDisposed` and `enableMCPDiscovery()`, and the late connect now calls `disconnectAll()` instead of refreshing tools onto a dead session.
- Cleared `#fastPathKey`/`#fastPathItems` in `AssistantMessageComponent.invalidate()` so theme/symbol changes rebuild reused Markdown children instead of keeping stale captured themes.
- Memoized unusable read summaries as a `false` sentinel in `read.ts` so the per-session LRU no longer retains full sources of unsummarizable files.
- Broadened `HAS_REF_DEF` in `markdown.ts` to match backslash-escaped reference labels (`[a\]b]: x`) and cleared frozen stream-lex state on blank `setText()`.
- Added regression tests: deferred auto-discovery flip and mid-connect dispose (`sdk-mcp-auto-discovery.test.ts` + `many-tools-mcp.ts` fixture), fast-path child rebuild on invalidate, and escaped-ref-def incremental-lex equivalence.
2026-06-12 11:14:39 +02:00
can1357 662823c40c fix(tui): flushed queued image transmits before alt-screen frame paints
- Drained `#imageBudget.takeTransmits()` and wrote the queued `a=t` sequences ahead of the paint in `TUI.#emitAltFrame`, matching the normal-screen path, so id-keyed placements and placeholder cells composed into the frame resolve against loaded data.
- Fixed images first shown inside a fullscreen overlay (e.g. the settings shape preview) rendering as blank placeholder cells until the overlay closed.
2026-06-12 07:36:43 +02:00
can1357 e74268d840 fix(coding-agent): filtered weak pure-fuzzy session matches from ranking
- Updated fuzzy-search indexing to track compact word starts and required phrase matches to start at word boundaries.
- Adjusted token scoring and compact/phrase matching rules so exact and boundary-aware matches now rank above noisy substring matches.
- Filtered session search results to drop weak pure-fuzzy matches unless they contained literal tokens, and updated ranking tests for the new behavior.
2026-06-12 06:31:40 +02:00
can1357 228d536a36 feat(coding-agent/modes): enabled editor-style input in settings search banner
- Replaced global search query mutation logic with a dedicated `Input` instance so typing now supports cursor movement, word deletion, and other editor hotkeys.
- Updated search banner rendering to display the embedded input line with live cursor while preserving match-count formatting and prompt width handling.
- Extended `Input` with a configurable prompt and end-of-value cursor placement, then updated memory-search tests for the new hotkey-driven editor behavior.
2026-06-12 04:54:07 +02:00
can1357 f29297da49 feat(tui): implemented relevance-based ranking for fuzzy search and settings matching
- Added fuzzy search preprocessing to normalize case, camelCase, and punctuation.
- Added token and phrase scoring for exact, prefix, substring, acronym, and compact hits.
- Added fuzzyRank to return {item, score}-ranked matches and delegated fuzzyFilter to it.
- Updated settings search tabs to sort by best score, keep original-order ties, and mute unmatched tabs.
2026-06-12 04:38:21 +02:00