Commit Graph

1093 Commits

Author SHA1 Message Date
Hunter Bown b0d48d8d03 style: use clamp() instead of min().max() pattern 2026-05-24 04:37:13 -05:00
Hunter Bown 54698849c8 fix(docs): refresh stale references and wire decision card rendering
- npm/codewhale/README.md: remove DeepSeek-first language
- docs/INSTALL.md: scoop install codewhale (not deepseek-tui)
- Wire decision card overlay rendering in main render loop
- Decision cards now appear centered on transcript when active
2026-05-24 04:31:35 -05:00
Hunter Bown 78d72842c3 docs(release): add thinking block toggle and sub-agent fix to CHANGELOG 2026-05-24 04:21:40 -05:00
Hunter Bown af59f7a732 fix(engine): drain late sub-agent completions before turn break (#1961)
Before the turn breaks at the thinking-only checkpoint, drain
any sub-agent completions that arrived between the last hold
check and now. If a child finished while we were running the
final status check, surface its sentinel immediately rather
than delaying it to the next turn.
2026-05-24 04:21:21 -05:00
Hunter Bown 805ec668f2 feat(tui): add keyboard toggle for thinking block collapse (#1972)
- Thinking cells now qualify as detail targets alongside tools and sub-agents
- Space key on empty composer toggles the focused cell's collapsed state
- Status message confirms expand/collapse action
- Builds on existing collapsed_cells HashSet from mouse context menu
2026-05-24 04:18:22 -05:00
Hunter Bown 078fa4556a docs(release): update v0.8.43 CHANGELOG with Goal mode, receipts, stall reasons, decision cards 2026-05-24 04:07:54 -05:00
Hunter Bown cc7c4a2ea9 feat(tui): add Goal mode and post-turn receipts
Goal mode (v0.8.43 truth-surface):
- New AppMode::Goal variant orthogonal to Plan/Agent/YOLO
- /goal command to set/complete objectives
- Goal status displayed in Work sidebar with elapsed time
- Alt+G keybinding to toggle Goal mode
- Mode parsed from /mode goal|4 command

Receipts (v0.8.43 truth-surface):
- ToolEvidence struct collects per-turn tool summaries
- Post-turn receipt generated on TurnComplete
- Receipt rendered as dimmed line at transcript tail
- Receipt/evidence cleared on new turn dispatch

Also:
- Fix AppMode::Goal exhaustive pattern coverage across 5 files
- Update doctor error message (deepseek → codewhale)
- Fix clippy::useless_format warning
2026-05-24 04:07:30 -05:00
Hunter Bown 243cfe5227 fix(tui): reference codewhale doctor in SSE timeout error message 2026-05-24 03:44:45 -05:00
Hunter Bown cdafc37a2f feat(tui): add decision card widget with keyboard navigation
Implements structured choice cards for the v0.8.43 truth-surface tracker.
When Brother Whale needs user input, it surfaces a bordered card with:
- A question prompt
- Numbered options with (default) marker
- Arrow/j/k navigation and 1-9 number-key shortcuts
- Enter to confirm, Esc to cancel
- Decision results surfaced as status messages

The widget compiles and the keyboard routing is wired into the main
event loop. Rendering overlay wire-up follows in the next commit.
2026-05-24 03:43:41 -05:00
Hunter Bown 94426f0082 feat(tui): classify and display stall reason in footer
When a turn has been running for > 30 seconds, the footer now shows
a classified stall reason suffix:
- 'waiting for model' — API streaming in progress
- 'tools executing' — active tool calls running
- 'sub-agents working' — child sub-agents in flight
- 'compacting context' — context compaction active
- 'background jobs running' — shell tasks executing
- 'waiting — no recent activity' — turn stalled with no classified work
2026-05-24 03:38:50 -05:00
Hunter Bown 3e89ccf98e style: cargo fmt 2026-05-24 03:34:13 -05:00
Hunter Bown b773690b38 docs(release): add Tasks sidebar feature to v0.8.43 CHANGELOG 2026-05-24 03:33:06 -05:00
Hunter Bown 701257ef81 feat(tui): improve Tasks sidebar inspectability (#1975)
- Show fuller turn ID prefix (16 chars) for disambiguation in task_read/task_cancel
- Replace ambiguous 'X active (Y running)' with clear per-status breakdown
- Add y/Y yank affordances for copying turn ID and full status from Tasks panel
- Add yank hint text in Tasks panel footer
2026-05-24 03:31:53 -05:00
Hunter Bown 04d2e4af1f chore(release): sync 0.8.43 version pins
- Workspace version: 0.8.42 → 0.8.43
- All internal codewhale-* deps: 0.8.42 → 0.8.43
- npm codewhale: 0.8.42 → 0.8.43
- npm deepseek-tui shim: 0.8.42 → 0.8.43
- Crate descriptions: open-model-first positioning
- npm descriptions: open-source and open-weight language
- Cargo.lock regenerated
2026-05-24 03:12:18 -05:00
Hunter Bown 8878ac07af fix(tui): harvest v0.8.43 candidate fixes
- grep_files now respects cancellation token (#1839, thanks @LING71671)
- Ctrl+Z restores last cleared composer draft (#1911, thanks @LING71671)
- Clipboard works on non-wlroots Wayland via wl-copy (#1938, thanks @ousamabenyounes)
2026-05-24 03:12:04 -05:00
Hunter Bown 2947eff9d1 fix(ci): satisfy Rust 1.88 clippy gate 2026-05-24 01:20:19 -05:00
Hunter Bown 8a0c875d75 docs: clarify Fin and model auto-routing
- Separate model auto-routing from Plan/Agent/YOLO TUI modes across all
  READMEs and docs/MODES.md
- Introduce Fin as the fast thinking-off deepseek-v4-flash seam for
  routing, summaries, RLM child calls, and coordination work
- Document /goal as current session tracking (not a TUI mode), with note
  that a future Goal work surface should stay distinct from --model auto
- Extend deprecation shim timeline from 'one release cycle' to
  through v0.8.x in REBRAND.md and npm READMEs
- Fix selection_to_text test to expect inline thinking preview
  (short completed thinking now renders inline without Ctrl+O
  affordance)
2026-05-24 00:37:53 -05:00
Hunter Bown d757505d9f fix(tui): keep English turns from drifting after localized context 2026-05-24 00:02:19 -05:00
Hunter Bown 3487945620 fix(tui): show reasoning preview inline 2026-05-23 23:39:56 -05:00
Hunter Bown e8eaa5d38e style(tui): format reasoning effort mapping 2026-05-23 23:39:46 -05:00
Hunter Bown c85b6929e2 fix(tui): correct reasoning_effort mapping for OpenRouter and Novita
DeepSeek native accepts reasoning_effort: high | max, with low/medium
compat-mapping to high and xhigh mapping to max. OpenRouter and Novita
use the OpenAI-standard unified scale: none | minimal | low | medium |
high | xhigh.

Mapping (CodeWhale internal → wire):
  off     → DeepSeek: thinking disabled, OpenRouter: thinking disabled
  low     → DeepSeek: high,              OpenRouter: low
  medium  → DeepSeek: high,              OpenRouter: medium
  high    → DeepSeek: high,              OpenRouter: high
  max     → DeepSeek: max,               OpenRouter: xhigh

Previously the low/medium/high arm sent 'high' for all providers,
and the max arm sent 'max' for all providers — both wrong for
OpenRouter. Split each arm to preserve provider-native semantics.

Sources:
- https://api-docs.deepseek.com/guides/thinking_mode
- https://openrouter.ai/docs/guides/best-practices/reasoning-tokens
2026-05-23 23:35:30 -05:00
Hunter Bown 3711517246 fix(tui): send xhigh reasoning_effort for OpenRouter and Novita
OpenRouter and Novita use OpenAI-standard reasoning_effort values
(xhigh|high|medium|low|minimal|none), not DeepSeek-native (max|high).
The xhigh/max/highest arm previously sent 'max' for all providers,
causing HTTP 400 on OpenRouter. Split OpenRouter+Novita into their
own arm that sends 'xhigh' instead.
2026-05-23 23:24:18 -05:00
Hunter Bown 17569c66ad feat(tui): add Brother Whale agent identity 2026-05-23 22:00:59 -05:00
Hunter Bown d1ecb251ea fix(tui): preserve CR paste line breaks 2026-05-23 21:24:52 -05:00
Hunter Bown 90a9dfbe7a fix(tui): preserve user message formatting 2026-05-23 21:11:26 -05:00
Hunter Bown 86fda2705f test(tui): satisfy configured skills clippy 2026-05-23 20:08:57 -05:00
Hunter Bown 825df6a2c4 chore(release): prepare v0.8.42 2026-05-23 20:08:57 -05:00
Hunter Bown b7bc8773f3 fix(tui): fail stuck stream turns and smooth RLM handles 2026-05-23 20:08:57 -05:00
reidliu41 393e2ef22c fix(help): keep selected row visible while scrolling
Account for the help modal border and padding when calculating the visible
  row window, so the selected command is not clipped after scrolling.

  Also wrap Up/Down navigation at the list edges and strengthen the selected
  row highlight for clearer focus.
2026-05-23 19:59:18 -05:00
cyq 453be36dcf Fix mode-switch toast dedupe during tab cycling 2026-05-23 16:51:10 -05:00
cyq cb70daf35c fix: include configured and workspace skills in slash menu discovery 2026-05-23 16:49:20 -05:00
Hunter Bown 41590edfd8 feat(tools): github_close_pr, handle_read redirection, shell/sidebar polish
- New github_close_pr tool distinct from github_close_issue; proper PR wording
  in tool output, audit records, and gh pr close (not issue close)
- handle_read detects art_/call_/SHA refs and points to retrieve_tool_result
  with copy-pasteable hints; error messages show correct tool for each ref type
- Shell delta tool results include the command field so the UI can resolve
  task_id-only exec cells when the completion metadata arrives
- Sidebar background shell tasks show the actual command on the primary row
  instead of just the task ID; task ID stays available as dim detail
- Tool routing falls back to task_id when exec_shell_wait has no command,
  then updates when the completion carries command metadata
- Plan mode prompt explains update_plan as the handoff signal; model waits
  for user action instead of continuing to tool around
- Base prompt clarifies handle_read scope (var_handles only) vs
  retrieve_tool_result (artifacts/tool-result refs)
- New tests: close_pr_schema, close distinction wording, handle_read artifact
  detection, shell_wait task_id fallback, sidebar background task labels
2026-05-23 16:49:06 -05:00
cyq bb9b26dd00 fix git status unicode paths 2026-05-23 16:28:36 -05:00
Hunter Bown 5fa24733e9 chore(rebrand): update repository links for CodeWhale 2026-05-23 14:07:36 -05:00
Hunter Bown ddaabbfed2 chore(rebrand): finish codewhale release surfaces 2026-05-23 13:41:46 -05:00
Hunter Bown 6de8ba363f chore(release): prepare codewhale v0.8.41 test build 2026-05-23 13:19:01 -05:00
Hunter Bown f10e8de45d Merge remote-tracking branch 'origin/rebrand/r6-tests' into work/v0.8.41-codewhale-ready 2026-05-23 13:18:57 -05:00
Hunter Bown 0f03c72130 Merge remote-tracking branch 'origin/rebrand/r5-prompts-strings' into work/v0.8.41-codewhale-ready 2026-05-23 13:18:55 -05:00
Hunter Bown cc76f5d9dd Merge remote-tracking branch 'origin/rebrand/r4-docs-readme' into work/v0.8.41-codewhale-ready 2026-05-23 13:18:53 -05:00
Hunter Bown 3a60a28791 Merge remote-tracking branch 'origin/rebrand/r2-binary-names' into work/v0.8.41-codewhale-ready 2026-05-23 13:18:49 -05:00
Hunter Bown cd84ede8ab Merge remote-tracking branch 'origin/rebrand/r1-cargo-workspace' into work/v0.8.41-codewhale-ready 2026-05-23 13:18:47 -05:00
Hunter Bown 9e822a3576 fix(tui): hide stale completed tasks from Work sidebar
Filter old terminal task records out of the Work sidebar while keeping active and recent task state visible.
2026-05-23 13:18:21 -05:00
Hunter Bown 96b903aa39 fix(tui): filter terminal control sequence fragments from composer
Prevent leaked OSC/Kitty terminal control fragments from landing in composer input while preserving legitimate overlapping user text.
2026-05-23 13:18:00 -05:00
Hunter Bown 6356a810c5 fix(tui): launch feedback urls asynchronously
Keep feedback URL launching off the UI path so feedback actions do not stall interactive input.
2026-05-23 13:17:51 -05:00
Hunter Bown ee47d64597 fix(tui): quiet animations under tmux
Force low-motion terminal behavior under tmux/screen and keep the fallback footer label stable so passive animations do not register as activity.
2026-05-23 13:06:57 -05:00
Hunter Bown 4143409208 fix(tui): detach clipboard fallback waits
Detach clipboard fallback helpers from the Enter hot path so terminal paste/clipboard probing cannot stall submission.
2026-05-23 13:06:46 -05:00
Hunter Bown c675fe64d2 fix(tui): offload offline queue persistence
Move offline queue persistence off the UI hot path so Enter handling does not wait on synchronous disk work.
2026-05-23 13:06:32 -05:00
Hunter Bown 7a87aebec7 fix(tui): move composer history persistence off UI thread
Move composer history persistence off the Enter hot path so submitting messages does not block the TUI event loop.
2026-05-23 13:05:59 -05:00
Hunter Bown d9fb21c0a0 fix(tui): avoid blocking on bare separator mentions
Skip bare separator and dot tokens during @-mention completion so Windows and WSL2 workspaces do not trigger an eager filesystem walk on the UI thread.
2026-05-23 13:05:48 -05:00
Hunter Bown c09f5bf039 fix(subagent): keep agent_eval recoverable after child termination
Keep agent_eval recoverable after a child session terminates by preserving the available transcript result instead of losing the final output.
2026-05-23 13:05:36 -05:00