Two related TUI affordances bundled because they share ui.rs and the
ui/tests.rs file.
#30 — Reasoning-content replay telemetry, end-to-end:
* models.rs — Usage gains reasoning_replay_tokens: Option<u32>.
* client.rs — sanitize_thinking_mode_messages now returns the
approximate replay-token count (~4 chars/token); the streaming
pipeline overlays it onto the parsed MessageDelta usage so the
server-reported and client-estimated numbers reach the engine
together.
* app.rs — App stores last_reasoning_replay_tokens.
* ui.rs — TurnComplete handler copies the value into the App; new
footer_reasoning_replay_spans renders an `rsn N.Nk` chip in the
footer next to the cache hit-rate, warning-coloured when replay
tokens exceed 50% of the input budget.
* ui/tests.rs — covers chip-on, chip-hidden-when-zero, and the
sanitizer's None-on-non-thinking-model path.
#28 — Tab-complete @file mentions against the workspace:
* ui.rs — adds partial_file_mention_at_cursor (with a guard against
`user@example.com`-style false positives) and
try_autocomplete_file_mention. Walks the workspace via the
existing ignore::WalkBuilder, ranks prefix matches above
substring matches, applies the unique match outright, extends to
the longest common prefix when multiple match, and surfaces
ambiguous candidates via the status line. Wired into the existing
Tab handler after the slash-command branch.
* ui/tests.rs — covers cursor-inside-mention extraction, email
guard, prefix vs substring ranking, single-match application,
common-prefix extension, no-match status, and the
no-mention-no-op path.
The mention-expansion path that ships file contents to the model is
unchanged — this is purely a discovery aid for typing the path.
Inline-contents and a fuzzy popup picker are queued for v0.5.2.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The #27 per-mode context budget commit (1be18e69) replaced calls to
compaction_threshold_for_model with compaction_threshold_for_model_and_effort
but left the old name in the import list, which fails under -Dwarnings on
Build, Test, and the npm wrapper smoke job. Also re-runs cargo fmt over
the four files the lint job flagged.
Add compaction_threshold_for_model_and_effort() with mode-aware soft
caps based on DeepSeek V4 paper Figure 9 recall-quality data:
Plan / off -> 64K (paper eval: 8K-128K)
Agent / high -> 192K (paper eval: 128K)
YOLO / max -> 384K (paper eval: 384K-512K)
Previously, the 80%-of-window rule gave 800K for V4's 1M window,
which is well past the point where MRCR MMR collapses (0.49 at 1M).
Non-V4 models keep the legacy 80% rule. None/unknown effort defaults
to agent-tier (192K).
Adds first-class DeepSeek V4 Pro and Flash support, updates the default model to deepseek-v4-pro, aligns legacy aliases with the current V4 1M context behavior, and fixes thinking-mode request handling.
Key fixes:
- Send DeepSeek's raw Chat Completions `thinking` parameter at the top level instead of SDK-only `extra_body`.
- Preserve assistant `reasoning_content` for all prior thinking-mode tool-call turns so subsequent requests satisfy DeepSeek V4's replay requirement.
- Fix npm wrapper concurrent first-run downloads by using per-process temporary download paths.
- Add `.mailmap` so historical bot-attributed commits aggregate under Hunter Bown where mailmap is honored.
Verified with the full local Rust gate, live DeepSeek V4 smoke, npm wrapper temp-install smoke, and green PR CI across Linux, macOS, and Windows.
- Move src/* into crates/tui/src/ to create a proper workspace structure
- Add .claude/ and .trimtab/ directories for Trimtab closed-loop workflow
- Add DEPENDENCY_GRAPH.md and update documentation
- Update Cargo.toml files to reflect new crate dependencies
- Update CI workflows and npm package scripts
- All tests pass, release build works