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>
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>
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>
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>
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
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.
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.
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.
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.
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.
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.
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>