Commit Graph

1080 Commits

Author SHA1 Message Date
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
Hunter Bown ac6fdf4da9 Merge branch 'main' into rebrand/r1-cargo-workspace 2026-05-23 12:50:54 -05:00
Hunter Bown b7e31a734b test: isolate tool-result spillover tests
Isolate SHA spillover tests with the existing guard and a temporary spillover root so Windows parallel test runs cannot race shared spillover state.
2026-05-23 12:50:02 -05:00
Hunter Bown 32ce14d6b2 test(rebrand): residual brand-string cleanup across source and assets
A small cleanup pass to catch brand mentions that the R5 sweep missed
because they hid in:

- HTTP User-Agent format strings (`Mozilla/5.0 (compatible; deepseek-tui/`
  in `client.rs` and `fetch_url.rs`).
- Multi-line error messages whose phrase boundary straddled a line break
  ("…restart\n             deepseek-tui." in `js_execution.rs`,
  `tool_catalog.rs`, `repl/runtime.rs`).
- Doc comments mentioning `deepseek-tui` as a binary (`config/src/lib.rs`,
  `core/capacity.rs`, `tui/streaming/chunking.rs`, `features.rs`).
- Skill descriptions shipped in `crates/tui/assets/skills/*/SKILL.md`.
- Test fixtures with placeholder paths / git emails
  (`tui/external_editor.rs`, `snapshot/repo.rs`).
- `task_manager.rs`'s `cargo test -p deepseek-tui --lib` example.
- `scripts/tencent-lighthouse/doctor.sh` info-line prefix.

The remaining `deepseek-tui` mentions in the codebase are intentional
(the legacy `[[bin]]` entry in `crates/tui/Cargo.toml`, the legacy
`npm/deepseek-tui/` deprecation shim package, the CNB mirror namespace,
the security email, the legacy bin's shim source file, and historical
CHANGELOG entries) and were preserved per the rebrand anti-scope.

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:58:34 -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 a3acdbe70b docs(brand): rename to codewhale across READMEs and docs
Sweep brand mentions of `DeepSeek TUI` / `deepseek-tui` / bare
`deepseek` (the dispatcher binary) across all user-facing docs to
the new `codewhale` brand. The DeepSeek **provider** integration is
left untouched throughout: env vars (`DEEPSEEK_*`), model IDs
(`deepseek-v4-pro`, `deepseek-v4-flash`, `deepseek-chat`,
`deepseek-reasoner`), the `api.deepseek.com` host, the
`~/.deepseek/` config dir, and the `--provider deepseek` argument
value all keep the legacy spelling.

Anti-scope items deliberately left as the legacy `deepseek-tui`:

- Homebrew tap and formula (`Hmbown/homebrew-deepseek-tui`,
  `brew install deepseek-tui`, `scoop install deepseek-tui`). The
  tap rename ships separately.
- Docker image (`ghcr.io/hmbown/deepseek-tui`). Image-tag rename
  ships separately.
- CNB mirror namespace (`cnb.cool/deepseek-tui.com/DeepSeek-TUI`).
  Third-party hosted path.
- Security contact email (`security@deepseek-tui.com`).
- GitHub repo URL (`Hmbown/DeepSeek-TUI`).

New artifact:

- `docs/REBRAND.md` documents what changed, what didn't, the
  deprecation window, and migration commands for npm / Cargo /
  Homebrew / manual installs.

CHANGELOG entries:

- Root `CHANGELOG.md` and `crates/tui/CHANGELOG.md` both gain a
  new `[Unreleased]` section describing the rename and the one-
  release deprecation window. Historical entries are untouched.

Issue templates:

- `.github/ISSUE_TEMPLATE/bug_report.md` and `feature_request.md`
  refer to "codewhale" / `codewhale --version` instead of the old
  brand name in their environment fields.

The rebrand sweep was driven by a perl script with bulk patterns
(`deepseek-tui` -> `codewhale-tui`, `DeepSeek TUI` -> `codewhale`,
bare `deepseek` -> `codewhale` with provider/model/host/env-var/
config-path negative lookbehind/lookahead) followed by targeted
reverts for the anti-scope items above. Output was visually
reviewed file-by-file before committing.

Verified:

- `cargo check --workspace --all-targets --locked` — pass.
- `cargo test --workspace --all-features --locked` — pass (no
  test source touched here; suite stayed green to confirm no
  doc-from-string assertions broke).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 11:25:48 -05:00
Hunter Bown 8da9fb7d52 test(qa-pty): retarget harness at codewhale-tui binary
The qa_pty integration tests booted the canonical TUI via
`Harness::cargo_bin("deepseek-tui")`. After the previous commit
renamed the canonical bin to `codewhale-tui` and made `deepseek-tui`
a tiny deprecation shim that forwards to it via PATH, those tests
launched the shim and hung waiting for a TUI frame because the
sealed PATH in the test sandbox has no `codewhale-tui`.

Point the harness at `cargo_bin("codewhale-tui")` directly. Also
add a `CARGO_BIN_EXE_codewhale-tui` compile-time fallback in the
harness so older Cargo versions still work, alongside the existing
legacy `deepseek-tui` fallback.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 11:11:11 -05:00
Hunter Bown 3efa6aad7d feat(cli): rename binaries to codewhale; keep deepseek aliases
Rename the canonical binaries:
  - `deepseek` → `codewhale` (CLI dispatcher)
  - `deepseek-tui` → `codewhale-tui` (TUI runtime)

Both legacy names continue to ship as tiny deprecation shims that print
a one-line warning to stderr and forward argv to the new binary. The
shims are produced by two new `[[bin]]` entries in `crates/cli/Cargo.toml`
and `crates/tui/Cargo.toml` pointing at small source files under
`src/bin/`. They will be removed in v0.9.0.

Touchpoints:
- Cargo bin entries + new shim source files.
- clap `name`/`bin_name`/usage strings flip to `codewhale`.
- Dispatcher's sibling-binary discovery looks for `codewhale-tui` and
  reports `codewhale` in its error/help prose. `DEEPSEEK_TUI_BIN` env
  var stays — env vars are explicitly anti-scope.
- `update.rs` now downloads `codewhale-*` assets and verifies them
  against `codewhale-artifacts-sha256.txt`. Legacy `deepseek-*` assets
  and `deepseek-artifacts-sha256.txt` are still produced by the release
  matrix so v0.8.40's `deepseek update` keeps working through one
  transition release.
- `ci.yml`, `nightly.yml`, `release.yml` updated to build/upload the new
  canonical binaries; `release.yml`'s matrix doubles to also ship the
  legacy shim binaries so v0.8.40 update clients land on the shim.
- `scripts/release/crates.sh` and `check-versions.sh` updated for the
  renamed crate names from R1.

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), and `cargo build
--release` produces all four binaries:
  - target/release/codewhale       (canonical dispatcher)
  - target/release/codewhale-tui   (canonical TUI)
  - target/release/deepseek        (legacy shim, forwards to codewhale)
  - target/release/deepseek-tui    (legacy shim, forwards to codewhale-tui)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 10:48:41 -05:00
Hunter Bown c6d73d98de refactor(crates): rename workspace members to codewhale-*
Rename the 14 workspace member crates from `deepseek-*` (and
`deepseek-tui-*`) to `codewhale-*`. Internal-only — binary names
(`deepseek` and `deepseek-tui`) are intentionally untouched in this
phase; they move in the next phase along with the deprecation shims.

Affects:
- 14 `[package] name = "..."` declarations.
- All inter-crate `[dependencies]` entries that referenced the old
  package names.
- All `use deepseek_*::...` statements rewritten to `use codewhale_*`.
- Cargo.lock regenerated.

CI workflows and release scripts that pass `-p deepseek-*` still
reference the old names; those move with the binary rename phase so
that pair lands together.

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 10:21:33 -05:00
Hunter Bown 1ca495f5a3 style: cargo fmt 2026-05-21 16:22:23 +08:00
Zhongyue Lin a5501e608a fix(client): keep mutation-tool result confirmations off wire dedup (#1695)
Co-Authored-By: LeoLin990405 <126708262+LeoLin990405@users.noreply.github.com>
2026-05-21 03:21:42 -05:00
Hunter Bown faf5e07adb feat(tui): add Fin tool-agent and screenshot OCR 2026-05-21 10:47:14 +08:00
Hunter Bown 3c95eadc22 test(tui): satisfy model picker lint 2026-05-21 09:51:18 +08:00
Hunter Bown 396b0e822b fix(tui): persist model picker effort 2026-05-21 09:45:03 +08:00