Commit Graph

47 Commits

Author SHA1 Message Date
Hunter Bown e1ac84ae44 release: v0.6.1 — pricing update, remove light theme + theme setting
- V4 cache-hit input prices cut to 1/10th per DeepSeek pricing update:
  Pro promo 0.03625→0.003625, Pro base 0.145→0.0145, Flash 0.028→0.0028
- Remove the 'light' theme variant (Variant::Light, Theme::light(), test)
- Remove the theme setting entirely — hardcode UI_THEME to whale/dark,
  drop the theme field from Settings, ConfigView, and config command
- Bump workspace version 0.6.0 → 0.6.1 (Cargo.toml, npm pkg, CHANGELOG)
- De-cringe the README: drop emojis, marketing fluff, unverified claims
2026-04-26 11:56:41 -05:00
Hunter Bown c5a584d5c3 refactor(client): extract chat + responses into folder module (P1.1)
Split client.rs into client/mod.rs (public API + helpers), client/chat.rs
(chat-completions streaming), and client/responses.rs (responses API
helpers).  Internal helpers promoted to pub(super) for intra-module
visibility; the public DeepSeekClient API is unchanged.

While here, redesign all five system prompts around decomposition-first
philosophy inspired by the mismanaged-geniuses hypothesis (Zhang et al.,
2026).  The model is now instructed to todo_write / update_plan before
acting, fan out sub-agents for parallel work, and keep the sidebar
populated so the user always sees what's happening.  Mode prompts updated:
- agent.txt: 'Before requesting approval, lay out work with todo_write'
- plan.txt: 'Use update_plan for strategy, todo_write for tactics'
- yolo.txt:  'Even with auto-approval, create a todo_write first'
- normal.txt: same pattern for legacy compatibility

Update CHANGELOG [Unreleased] and README modes section accordingly.
2026-04-26 11:39:44 -05:00
Hunter Bown f3df5e515e docs(changelog): roll up Phase 2/4 polish — agents chip, mention popup, P2.4 tests, subagent split, parse-counter de-flake
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 00:16:30 -05:00
Hunter Bown 93efb09038 fix(tui): tool-call rendering — defer ToolCallStarted, progressive labels, elapsed badge
The engine used to fire `Event::ToolCallStarted` from `ContentBlockStart::ToolUse`
with `input: json!({})` — before any `Delta::InputJsonDelta` had streamed in.
The UI's `handle_tool_call_started` baked the placeholder into the cell at
creation time and never refreshed, so users saw `<command>` and `<file>`
literals while the args finished streaming.

Fix relocates the emission to `ContentBlockStop` (where the input is finalized
already) and routes it through a new `final_tool_input(state)` helper that
prefers the parsed buffer over a stale empty initial input. Three regression
tests in `engine/tests.rs` pin the contract.

Also bundled (same theme — make in-flight tool cells read right):

- Progressive labels via `exploring_label`: "Read foo.rs" → "Reading foo.rs",
  "List X" → "Listing X", "Search pattern" → "Searching for `pattern`",
  "List files" → "Listing files". 5 tests in `ui/tests.rs`.
- `running_status_label_with_elapsed` in `history.rs`: from 3 s onward the
  status segment becomes `running (Ns)` and ticks every second, driven by
  the existing CX#3 status-animation tick. Below 3 s no badge — quick
  reads/greps stay quiet. Wired through `render_tool_header`. 2 tests.
- Spinner cadence sped up: `TOOL_STATUS_SYMBOL_MS` 1800 → 720 ms per glyph,
  so the 4-glyph "heartbeat" is ~2.88 s instead of ~7.2 s.

929 → 939 tests, 0 failures.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 23:50:32 -05:00
Hunter Bown 5f223adea6 v0.6.0: native rlm_query tool + scroll fix + cleanup
Adds a structured rlm_query tool for parallel/batched LLM fan-out.
The model calls it with one prompt or up to 16 concurrent prompts;
children dispatch via tokio::join_all against the existing DeepSeek
client. Default child model is deepseek-v4-flash; override per-call
via the model field. Available in Plan / Agent / YOLO. Cost folds
into the session's running total automatically.

Fixes scroll-stuck regression (#56): TranscriptScroll::resolve_top
and scrolled_by now use a three-level fallback chain (same line →
same cell line 0 → nearest cell at-or-before) instead of teleporting
to ToBottom when an anchor cell vanishes.

Loosens command-safety chains (#57): cargo build && cargo test and
similar chains of known-safe commands now escalate to RequiresApproval
instead of being hard-blocked as Dangerous. Chains containing unknown
commands still block.

Suppresses the GettingCrowded footer chip — context-percent header
already covers conversation pressure.

Refactors:
- Extracts file_mention parsing/completion/expansion (~450 LOC) from
  the 5,500-line ui.rs into crates/tui/src/tui/file_mention.rs.
- Deletes truly unused helpers (write_bytes, timestamped_filename,
  extension_from_url, output_path, has_project_doc, primary_doc_path).

Tests: 853 pass. cargo clippy --workspace -D warnings clean.
cargo fmt --all -- --check clean.

Closes #46 #47 #48 #49 #50 #53 #54 #55 #56 #57 #58.
2026-04-25 21:48:17 -05:00
Hunter Bown ba6bc351da release: v0.5.2 — /model picker
Single-feature release that lands #39 (the /model two-pane picker)
on top of the v0.5.1 quality-of-life batch. Bumps workspace +
npm wrapper + Cargo.lock in lockstep; check-versions.sh verifies.

Closes #39.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 15:00:19 -05:00
Hunter Bown f42f94207c release: v0.5.1 — telemetry, completion, and trust quality-of-life
Bumps workspace version to 0.5.1 and finalises the changelog with the
issues that landed since v0.5.0:
 * #25, #27, #31, #33, #34 (already on main)
 * #28 @file Tab-completion
 * #29 per-workspace trust list with /trust slash command
 * #30 reasoning-replay token chip in the footer
 * #36 regression tests for sidebar gutter bleed

scripts/release/check-versions.sh is green: workspace=0.5.1, npm=0.5.1,
Cargo.lock in sync.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-25 14:40:06 -05:00
Hunter Bown 9e7cfc951a docs: README v0.5.0 callout + CHANGELOG entry, drop cargo install
- README: drop the `cargo install deepseek-tui` / `deepseek-tui-cli`
  block and the crates.io badge — those packages have been lagging the
  workspace version for several releases. Source install (`cargo install
  --path crates/tui`) remains documented for hackers.
- README: add a "What's new in v0.5.0" section pointing at the
  thinking-mode tool-call 400 fix and the #25 web.run cleanup.
- CHANGELOG: add the [0.5.0] - 2026-04-25 entry covering the per-message
  reasoning_content rule, the wire-payload sanitizer, and #25.
2026-04-25 13:15:35 -05:00
Hunter Bown 67b232b063 Release v0.4.9: thinking-mode reasoning_content fix + README refresh
### Fixed
- DeepSeek thinking-mode tool-call rounds now always replay reasoning_content
  in all subsequent requests (including across new user turns), matching the
  documented API contract that assistant tool-call messages must retain their
  reasoning content forever. Previously, reasoning_content was cleared after
  the current user turn completed, which could cause HTTP 400 errors.
- Missing reasoning_content on a tool-call assistant message now substitutes
  a safe placeholder ("(reasoning omitted)") instead of dropping the tool
  calls and their matching tool results, preventing orphaned conversation
  chains and API 400 rejections.
- Session checkpoint now persists a Thinking-block placeholder for tool-call
  turns that produced no streamed reasoning text, keeping on-disk sessions
  structurally correct for subsequent requests.
- Token estimation for compaction now counts thinking tokens across ALL
  tool-call rounds (not just the current user turn), aligning with the
  updated reasoning_content replay rule.

### Changed
- Internal crate dependency pins bumped 0.4.5 → 0.4.9 to match workspace.
- npm wrapper version and deepseekBinaryVersion bumped to 0.4.9.
- README fully rewritten: clearer feature highlights, V4 model focus,
  keyboard shortcut table, improved docs index, and more engaging layout.
- CHANGELOG entry for 0.4.9 with comparison URLs.
2026-04-25 12:00:08 -05:00
Hunter Bown 41c54f08aa release: deepseek-tui 0.4.8 2026-04-25 10:48:00 -05:00
Hunter Bown 8323bedfb7 fix: restore default tui mouse scrolling 2026-04-24 11:41:31 -05:00
Hunter Bown d89b33330f fix: preserve DeepSeek V4 reasoning tool turns 2026-04-24 00:01:10 -05:00
Hunter Bown ffa75f07e5 fix: relax v4 compaction and transcript scroll 2026-04-23 23:31:18 -05:00
Hunter Bown 35595f8edc fix: normalize legacy DeepSeek aliases to V4 flash 2026-04-23 23:08:44 -05:00
Hunter Bown b7bd02d814 feat: DeepSeek V4 support with reasoning-effort control (0.4.0)
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.
2026-04-23 22:53:20 -05:00
Hunter Bown dc8e94d705 docs: update documentation and cleanup for v0.3.33 2026-04-22 22:36:45 -05:00
Hunter Bown f4dbf828c9 Footer polish: remove FOOTER_HINT, simplify footer rendering
- Remove FOOTER_HINT color constant from palette
- Drop footer clock label and related synchronization logic
- Simplify footer status line layout and narrow-terminal handling
- Update tests to align with simplified footer logic
- Remove empty state placeholder text for cleaner UI
- Bump version to 0.3.33
2026-04-11 20:20:18 -05:00
Hunter Bown cbcf35c1bd release: prepare v0.3.32 — finance tool, header redesign, expanded tests
Add Yahoo Finance quote tool with chart fallback, redesign header widget
with proportional truncation and context bar, refactor footer status strip,
expand test suite to 680+ tests, and fix blocking issues (usize underflow
in header, tempdir leak in finance tests, per-call HTTP client creation).
2026-04-11 18:58:56 -05:00
Hunter Bown fc4884b0c8 release: prepare for v0.3.31
- Update CHANGELOG with workspace refactor and clippy fix
- Fix collapsible_if lint in web browsing session manager
2026-03-11 20:10:19 -05:00
Hunter Bown 7b91169017 refactor: move source files into workspace crates
- 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
2026-03-11 20:00:38 -05:00
Hunter Bown 351b309c7d release: 0.3.28 2026-03-02 18:05:26 -06:00
Hunter Bown 698ec1099c release: 0.3.26 code quality sweep 2026-03-01 20:02:01 -06:00
Hunter Bown c69a73b644 fix: deepseek tui streaming/ux/config reliability sweep 2026-02-25 11:24:12 -06:00
Hunter Bown 7397fb0076 fix: UTF-8 safe truncation, deduplicate url_encode, add Display impls, fix pricing display, simplify model matching, fix changelog links, add PartialEq for Tool (#3) 2026-02-24 22:36:47 -06:00
Hunter Bown 7a6be37e2d fix: preload deferred tools by default in yolo mode 2026-02-24 10:37:17 -06:00
Hunter Bown 8d904129b5 Release 0.3.23 2026-02-24 10:31:54 -06:00
Hunter Bown b88ce88a42 Improve TUI coherence, small-screen layout, and contrast guardrails 2026-02-19 10:09:41 -06:00
Hunter Bown 9b647edf92 docs: tighten README, add v0.3.21 changelog entry 2026-02-19 07:47:29 -06:00
Hunter Bown 4212ba9f26 fix: restore API key config resolution and clean runtime artifacts 2026-02-16 11:37:14 -06:00
Hunter Bown ab2c708ca7 feat: runtime API, task manager, and extensive improvements (v0.3.16)
Major Features:
- Runtime API for external integrations and turn management
- Task manager with persistence and recovery
- Shell output streaming and improved tool execution
- Error taxonomy and audit logging
- Command palette and UI enhancements

Documentation:
- Runtime API documentation
- Operations runbook
- Architecture updates

Fixes:
- Auto-compaction threshold and triggering logic
- Doctor command API key validation
- Clippy and formatting compliance
2026-02-16 10:51:39 -06:00
Hunter Bown 702f9c353c Release v0.3.14
- Add image_query support to web.run (DuckDuckGo image search)
- Encode tool-call function names for Chat Completions history rebuild
- Allow safe MCP meta tools in multi_tool_use.parallel
- Update prompts for stronger citation placement and quote-limit guidance
2026-02-05 09:28:39 -06:00
Hunter Bown 4ded9e2a4f Restore transcript scrollbar 2026-02-03 19:05:44 -06:00
Hunter Bown 9f47d78a03 Release v0.3.12 2026-02-03 18:52:55 -06:00
Hunter Bown 67b371ca95 Encode tool names for DeepSeek API 2026-02-03 18:52:00 -06:00
Hunter Bown 858649d458 Fix tool name mapping for DeepSeek API 2026-02-03 18:45:49 -06:00
Hunter Bown 433d7cb6e9 Release v0.3.10 2026-02-03 18:31:53 -06:00
Hunter Bown e0bccecd5c Remove RLM/Duo modes and restore footer scroll 2026-02-03 18:29:36 -06:00
Hunter Bown 9e3aafeabb Release 0.3.7 2026-02-03 17:36:17 -06:00
Hunter Bown 62d2877b3b Release v0.3.6: UI polish - welcome banner, context progress bar, remove custom scrollbar 2026-02-02 12:05:48 -06:00
Hunter Bown 3f8d04178c feat: v0.3.5 — smart context offloading, full MCP protocol, Duo mode, project_map tool
- Intelligent context offloading: large tool results (>15k chars) auto-moved to RLM memory
- Persistent history context: compacted messages offloaded to RLM history variable
- Full MCP protocol: SSE transport, Resources (resources/list, resources/read), Prompts (prompts/list, prompts/get)
- mcp_read_resource and mcp_get_prompt virtual tools exposed to the model
- Dialectical Duo mode with Player/Coach TUI rendering
- Dynamic system prompt refresh at each turn for up-to-date RLM/Duo/working-set context
- project_map tool for automatic codebase structure discovery
- delegate_to_agent alias for streamlined sub-agent delegation
- Default theme changed to Whale with updated color palette
- Fix MCP test compilation for updated McpServerConfig struct shape
- Fix clippy warnings (strip_prefix, inspect_err, flatten, is_some_and)
2026-01-30 06:02:43 -06:00
Hunter Bown 5640a00b03 Release v0.3.2 2026-01-28 09:48:34 -06:00
Hunter Bown a5c02c0eb4 release: v0.3.1 2026-01-27 01:04:48 -06:00
Hunter Bown 3204f556af release: v0.3.0 2026-01-27 00:46:48 -06:00
Hunter Bown 5d3408f632 chore: release v0.2.2
- Fix session save serialization error handling
- Cache web_search regex patterns with OnceLock for performance
- Improve panic messages in tool_parser regex compilation
- Add retroactive CHANGELOG entry for v0.2.1

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-01-22 13:01:17 -06:00
Hunter Bown 128f5ec0f5 chore: release v0.2.0
- Bump version to 0.2.0
- Update CHANGELOG.md with release notes
- Fix cargo fmt formatting issues

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-01-20 11:52:37 -06:00
Hunter Bown b8d477f751 Disable auto RLM and bump version to 0.0.2 2026-01-20 09:32:48 -06:00
Hunter Bown 6f1158a2d7 Initial release v0.1.0
DeepSeek TUI - Unofficial terminal UI + CLI for DeepSeek models.

Features:
- Interactive TUI with multiple modes (Normal, Plan, Agent, YOLO, RLM, Duo)
- Comprehensive tool access with approval gating
- File operations, shell execution, task management
- Sub-agent system for parallel work
- MCP integration for external tool servers
- Session management and skills system
- Cross-platform support (macOS, Linux, Windows)

🤖 Generated with [Claude Code](https://claude.ai/code)
2026-01-20 08:57:35 -06:00