Commit Graph

88 Commits

Author SHA1 Message Date
CodeWhale Agent 738a265197 fix(tui): show Bash for shell work in visible UI 2026-06-12 16:32:32 -07:00
CodeWhale Agent 9b31621b19 Harvest PR #3051: voice input commands and hotbar integration
Port /voice, /voice-send, and /voice-control into the command strategy
registry as groups/core/voice.rs. The handlers only flip App state
(voice_enabled, voice_send_enabled, voice_control_enabled) and emit the
new AppAction::VoiceCapture; the UI event loop performs the actual
record + transcribe cycle so credentials come from the live Config
(deepseek_api_key/deepseek_base_url) instead of auth fields cached on
App, and no audio is ever recorded by the registry smoke tests.

- voice.toggle hotbar action dispatches the real /voice command and
  reports voice_enabled as its active state, replacing the placeholder.
- Recording uses sox/rec/arecord with RMS-based silence detection;
  transcription posts input_audio blocks to the provider chat
  completions API (async reqwest — the blocking client would panic
  inside the tokio event loop).
- Transcripts insert at the composer cursor via App::insert_str. With
  /voice-send enabled, a transcript ending in "send it" / 发送 strips
  the suffix and submits; a bare "send it" submits the current composer
  content. With /voice-control enabled, transcription runs through the
  AI dictation pipeline that sees the composer text.
- Failures (no recorder, no API key, short recording, network) surface
  as localized status messages and disarm voice input.
- Localized command help and status strings for all seven shipped
  locales; /voice now appears in the command palette.

Harvested from PR #3051 by @huqiantao

Co-authored-by: huqiantao <huqiantao@users.noreply.github.com>
Co-authored-by: Hunter B <hmbown@gmail.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 14:43:27 -07:00
CodeWhale Agent 81265ec71b feat(config): surface experimental feature flags 2026-06-12 13:36:13 -07:00
Hunter B 0986cabb1d feat(tui): add context source map report
Add an explicit /context report|json|summary source-map surface while preserving plain /context as the existing inspector.

Expose the same diagnostic map through doctor --context-json for headless checks. The report uses the existing compaction token heuristic and labels counts as conservative estimates rather than exact provider billing.

Modified harvest from PR #3150 by @idling11.

Co-authored-by: idling11 <8055620+idling11@users.noreply.github.com>
2026-06-12 03:20:59 -07:00
Hunter B 3de1d35c37 feat(tui): dispatch hotbar slots from number keys
Harvests PR #3056 by @reidliu41, keeping overlays in control of number keys, reclaiming Alt+1 through Alt+8 for hotbar dispatch, and updating the help/footer shortcut copy.

Co-authored-by: reidliu41 <61492567+reidliu41@users.noreply.github.com>
2026-06-12 02:19:15 -07:00
Hunter B 74a4a91204 feat(i18n): localize config editor labels
Harvests PR #2919 by @gordonlu, preserving Codex-aware reasoning effort display while localizing the config editor chrome and default placeholders.

Co-authored-by: gordonlu <3125629+gordonlu@users.noreply.github.com>
2026-06-12 02:12:58 -07:00
Hunter B 6511de3359 feat(i18n): localize config section labels
Harvests PR #2918 by @gordonlu, preserving English search terms for localized config sections and scopes.

Co-authored-by: gordonlu <3125629+gordonlu@users.noreply.github.com>
2026-06-12 01:59:47 -07:00
Hunter B 81b84f3f88 Merge PR #2901: localize ToolFamily labels 2026-06-12 01:47:27 -07:00
Hunter Bown 6b01cccc65 Merge PR #3038 from Hmbown: make Ctrl+B directly background the active foreground shell
fix(tui): make Ctrl+B directly background the active foreground shell
2026-06-10 22:20:27 -07:00
gordonlu b93230070b feat(i18n): localize ToolFamily labels (10 MessageIds)
- localization.rs: Add 10 ToolFamily* MessageId variants + ALL_MESSAGE_IDS + all 7 locales
- tool_card.rs: tool_activity_label_for_name() accepts locale, uses tr() for labels
- footer_ui.rs, ui.rs: thread locale to tool_activity_label_for_name() callers
- Tests: 2 negative i18n tests + updated existing tests for new signatures
2026-06-11 11:37:45 +08:00
Hunter Bown e1a61f445e fix(tui): remove ShellControlView menu now unreachable after direct Ctrl+B
Ctrl+B backgrounds the foreground shell directly (#3032), leaving the
two-step shell-control modal dead code that fails clippy -Dwarnings.
Delete ShellControlView/ShellControlChoice, the ModalKind and ViewEvent
variants, and open_shell_control; repoint the default-paste regression
test at HelpView; update the Ctrl+B keybinding description in all
locales to describe the new direct-background behavior.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 16:49:30 -07:00
gordonlu 19326f940d fix: address review feedback - cfg(test), \u{26a0}, revert vi fanout, expand tests 2026-06-10 13:10:59 +08:00
gordonlu f753f09e6a feat(i18n): localize sandbox elevation dialog across 7 locales 2026-06-10 13:06:55 +08:00
Hunter Bown f118dff940 Merge PR #2896 from gordonlu: localize status picker surface
Part of the i18n localization batch. Locale strings + MessageId wiring; no logic changes.
2026-06-09 20:09:38 -07:00
Hunter Bown f4ab469bd2 Merge PR #2891 from gordonlu: localize approval dialog surface across 7 locales
Part of the i18n localization batch. Locale strings + MessageId wiring; no logic changes.
2026-06-09 20:09:16 -07:00
gordonlu af46bef8d6 feat(i18n): localize status picker surface (7 MessageIds) 2026-06-08 15:31:03 +08:00
gordonlu a241654d79 fix: restore trailing spaces on English ApprovalField labels 2026-06-08 10:05:13 +08:00
gordonlu 7bdc9a8f96 feat(i18n): localize approval dialog surface across 7 locales 2026-06-08 09:34:58 +08:00
idling11 57e4a7b71a feat(hf): harvest Hugging Face MCP helpers
Add /hf and /huggingface command routing for Hugging Face MCP setup/status plus a concepts explainer for provider, MCP, and Hub workflows.

Document the settings-generated Hugging Face MCP configuration path and keep the slice offline: no Hub search command, no direct Hugging Face HTTP requests, and no custom URL encoding.

Refs #2709

Harvested from PR #2782 by @idling11
2026-06-05 09:35:19 -07:00
aboimpinto abe366dead feat(tui): add sidebar slash command
Harvested from PR #2788 by @aboimpinto.

Refs #2766.
2026-06-05 08:22:21 -07:00
Hunter Bown 28a0f19c13 fix(provider): polish v0.8.53 routing and shell gating 2026-06-03 14:40:25 -07:00
Gordon b4691bc082 feat(i18n): localize context-inspector surface across 7 locales
Localize the context-inspector surface across 7 locales for improved internationalization support.
2026-06-02 20:47:53 -07:00
Hunter Bown 06612495fc chore(release): prep v0.8.51 — Arcee provider, cycle removal, UI fixes
Release-preparation checkpoint for v0.8.51 (workspace + npm bumped to 0.8.51).

Added:
- Arcee AI direct provider: [providers.arcee], ARCEE_API_KEY/BASE_URL/MODEL,
  CLI auth, provider + model picker, registry. Default direct-API model is
  trinity-large-thinking (reasoning, 262K ctx/out); preview + mini selectable.
  Cloudflare-WAF-safe opening turn (benign read-only tool surface, system-prompt
  payload splitting) and reasoning_content replay on tool-call turns.
- Expanded model catalog (qwen3.6 flash/plus/max-preview, Xiaomi MiMo v2.5
  chat/ASR/TTS); provider-aware model picker with per-provider saved models.

Changed:
- Auto-compaction is percentage- and model-aware
  (compaction_threshold_for_model_at_percent; default 80%; auto-enable for
  <=256K windows, opt-in for 1M models).
- Provider/gateway HTTP errors sanitized (HTML/WAF interstitials collapsed,
  401/403 split into authentication vs authorization).

Removed:
- The session cycle / checkpoint-restart system: /cycles, /cycle, /recall,
  recall_archive tool, cycle_manager, cycle-handoff prompt, sidebar cycle lines,
  EngineConfig.cycle / Event::CycleAdvanced / seam cycle thresholds.

Fixed:
- Orphaned assistant 'blue dot' role glyph on whitespace-only turns.
- Sidebar mouse-wheel scroll leaking into the transcript.
- Sidebar hover tooltip overlap + warning-orange styling.
- README Constitution description corrected to match prompts/base.md.
- Repaired release-blocking unit/integration tests after the refactors.

Preflight: cargo fmt clean, workspace builds, 3903 tui tests pass (1 known
flaky MCP SSE test under parallel load, passes in isolation).
2026-06-02 17:36:18 -07:00
gordonlu cc60129f3a feat(i18n): add FanoutCounts MessageId, wire into FanoutCard stats line 2026-06-01 21:27:17 -07:00
gordonlu 6ab77eaba3 feat(i18n): localize all queue command messages across 7 locales 2026-06-01 21:27:17 -07:00
Hunter B 88f34fc9dd fix(tui): protect multiline drafts on arrow navigation 2026-06-01 19:58:39 -07:00
Hunter B 2b69f4e041 chore: polish codewhale home defaults 2026-05-31 19:22:12 -07:00
Hunter B d6baf20721 Migrate file secrets to codewhale home 2026-05-31 15:30:35 -07:00
Hunter B 7b1c007963 fix: gate DeepSeek balance fetch opt-in
Merge current origin/main into #2257 and keep the rescue scoped to the balance statusline feature.

Credits #2257 by @HUQIANTAO and the carried #1970 balance work by @MoriTang.

The rescue gates startup, turn-complete, and provider-switch balance fetches on StatusItem::Balance, preserves current main Cargo metadata, and adds the missing Vietnamese balance label.
2026-05-31 00:03:09 -07:00
Hunter B a1b30c6e72 fix: cover purge command in Vietnamese locale 2026-05-30 23:23:39 -07:00
Hunter B a9c0a4ae3c fix: cover slop command in Vietnamese locale 2026-05-30 23:08:59 -07:00
Hunter B 335e39af08 Merge remote-tracking branch 'origin/main' into codex/pr2161-head-fix 2026-05-30 23:04:00 -07:00
Hunter B b75a159176 fix: harden slop ledger rescue paths 2026-05-30 22:58:51 -07:00
movic a21e9e5c83 feat: add /purge slash command for agent-driven context pruning
New `/purge` command lets the agent surgically remove or rewrite
conversation history via a purge_context tool call. The engine
validates and applies the operations, cascading tool-result removal
to the paired tool-use call.
2026-05-31 13:53:03 +08:00
Hunter B fc9a32be1a fix(localization): finish Vietnamese locale after main merge 2026-05-30 21:38:11 -07:00
Lê Hải Đăng 2938334997 Update crates/tui/src/localization.rs
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-05-30 21:38:11 -07:00
Lê Hải Đăng 56f158b212 Update crates/tui/src/localization.rs
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-05-30 21:38:11 -07:00
Lê Hải Đăng 313d456389 Update crates/tui/src/localization.rs
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-05-30 21:38:11 -07:00
LeHaiDang 88000c0481 feat: add Vietnamese (vi) localization support 2026-05-30 21:38:11 -07:00
jayzhu e2d6d2253a fix(i18n): localize right-click context menu labels and descriptions
The right-click context menu rendered all entries in English regardless of ui_locale. Added 26 MessageId variants with translations for en, ja, zh-Hans, zh-Hant, pt-BR, es-419. ContextMenuView now accepts a localized title. build_context_menu_entries() uses app.tr() instead of hardcoded strings.
2026-05-30 19:14:37 -07:00
reidliu41 1379d354e4 fix(provider): name DeepSeek in provider help text
Replace the incorrect CodeWhale backend example in /provider help text with DeepSeek.

  CodeWhale is the app name, while deepseek is the actual provider id accepted by /provider.
  Add a regression test for shipped locale descriptions.
2026-05-30 19:12:56 -07:00
ts25504 51cbcda5ff fix(footer): keep stale balance on fetch failure; localize "bal" prefix 2026-05-27 12:51:16 +08:00
reidliu41 ed23a48e04 feat: add new session command
Add /new to start a fresh saved session from the TUI without overloading /clear.
  The command creates a distinct session id, resets conversation state, and keeps
  previous sessions available through /resume.

  Block unsafe switches when pending input or active work exists, with /new --force
  available for explicit discard.
2026-05-27 07:33:27 +08:00
Hunter Bown d22da53e2d feat(v0.8.45): land control-plane workstream slices (#2035)
Includes cancellable file_search/list_dir behavior, deterministic sub-agent whale-species nicknames, and an honest /balance command scaffold for the provider-billing work. Reviewed the overlapping file-search cancellation contribution in #2044 from @h3c-hexin; that PR's Windows failure was unrelated to the cancellation code, and the contributor context is preserved here.
2026-05-24 21:18:54 -05:00
Hunter Bown 25ce4f5970 feat(v0.8.44): SWE-bench adapter, markdown table fix, contributor sync, receipt truncation fix
- SWE-bench: codewhale swebench run/export writes prediction JSONL
  from working-tree diff, with untracked-file inclusion via git add -N
- CLI: --workspace / -C global flag forwards to TUI for file ops
- CLI: codewhale exec --auto semantics clarified in help text
- Markdown: table pipes inside inline code no longer create phantom columns
  (split_table_cells with backtick-awareness)
- Receipt: floor_char_boundary prevents multibyte UTF-8 slice panic
- Contributors: Ling (LING71671 #1839 #1911), Ben Younes (ousamabenyounes #1938),
  jeoor npm fix (#1860) credited across all 3 READMEs
- ja-JP README: 19 contributors synced to parity with EN/zh-CN (80 each)
- Docs: SWEBENCH.md, RECURSIVE_SELF_IMPROVEMENT.md, MODES.md exec clarification
- Sub-agent footer: Alt+V hint now says 'details' not 'raw'
2026-05-24 14:47:42 -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 903e4537f4 refactor(strings): rebrand user-facing strings to codewhale
Rename brand-bearing string literals across the TUI source and the
system-prompt templates that ship inside the binary. The DeepSeek
provider integration is again left intact: the `ApiProvider::Deepseek`
enum variant, the `"deepseek"` provider name string returned by
`ApiProvider`-to-string mappings, model IDs, the `~/.deepseek/` config
directory and `DEEPSEEK_CONFIG_PATH` env var, the OS keyring key
`"deepseek"`, the Ollama `deepseek-coder*` model defaults, the China
preset alias `deepseek-china`, and the various provider list error
messages all keep the legacy spelling.

Touchpoints:

- `crates/tui/src/prompts/*.md` and `*.txt`: brand language flipped to
  `codewhale`; the internal `<deepseek:subagent.done>`,
  `<deepseek:subagent_context>`, `<deepseek:fork_state>`,
  `<deepseek:tool_call>` XML-ish event tags rename in lockstep to
  `<codewhale:…>` so the model-facing format stays consistent.
- `crates/tui/src/tools/subagent/mod.rs`: emits the new event tag.
- `crates/tui/src/core/tool_parser.rs`: parses the new event tag.
- `crates/tui/src/tools/subagent/tests.rs`,
  `crates/tui/tests/protocol_recovery.rs`,
  `crates/tui/src/prompts.rs`: test expectations updated to match the
  new tag and the new prompt text.
- Status / display strings flipped to `codewhale`: `acp_server.rs`'s
  agent name + title, `config_ui.rs`'s config schema title,
  `share.rs`'s export title, `welcome.rs`'s onboarding banner,
  `commands/status.rs`, `core/engine*`, `tui/notifications.rs`,
  `tui/sidebar.rs`, `tui/widgets/header.rs`, `tui/widgets/mod.rs`,
  `tui/ui.rs`'s resume-hint, `main.rs`'s clap header and `Doctor`
  prose, `tui/ui/tests.rs` and other test assertions.
- `crates/tui/src/logging.rs` test fixture: `deepseek_cli=debug` ->
  `codewhale_cli=debug` so the log-filter test references the renamed
  crate.
- Tracing targets that were namespaced under the brand
  (`target: "deepseek::config"`) move to `target: "codewhale::config"`.
- Test-fixture tempdir prefixes (`deepseek-tui-…` / `deepseek-…`) rename
  for consistency.

Local gates green: `cargo check --workspace --all-targets --locked`,
`cargo fmt --all -- --check`, `cargo clippy --workspace --all-targets
--all-features --locked -- -D warnings`, `cargo test --workspace
--all-features --locked` (3226+ pass, 0 fail).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 11:48:43 -05:00
Hunter Bown 2c642ec375 feat(session): fork conversations inside the TUI 2026-05-21 00:24:52 +08:00
Hunter Bown d5c45d962d chore(release): prepare v0.8.36
Squash merge of work/v0.8.36-cache-hygiene into main.

All preflight gates passed: version-drift/check/lint/test (3073 pass, 0 fail) / CodeQL / GitGuardian / npm-smoke. Preparing the v0.8.36 release tag.
2026-05-14 00:31:18 -05:00
Hunter Bown 2e022bda25 Merge remote-tracking branch 'origin/pr/1065' into work/v0.8.34
# Conflicts:
#	crates/tui/src/commands/mod.rs
#	crates/tui/src/tui/app.rs
#	crates/tui/src/tui/ui.rs
2026-05-13 00:06:56 -05:00