Commit Graph

1478 Commits

Author SHA1 Message Date
Hunter Bown 93c525a200 fix(ci): use POSIX shell prologues in CNB 2026-05-24 00:59:36 -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 898cf2d1e1 docs(config): add missing openrouter and novita provider sections 2026-05-23 22:37:16 -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
Hunter Bown 0883643464 Merge PR #1957: Fix mode-switch toast stacking on repeated Tab cycles 2026-05-23 16:52:34 -05:00
cyq 453be36dcf Fix mode-switch toast dedupe during tab cycling 2026-05-23 16:51:10 -05:00
Hunter Bown 79151daae4 Merge PR #1956: Fix local + configured skills discovery in slash menu 2026-05-23 16:51:04 -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
Hunter Bown 8c2235da0d Merge PR #1953: Fix git_status output for unicode paths 2026-05-23 16:43:55 -05:00
cyq bb9b26dd00 fix git status unicode paths 2026-05-23 16:28:36 -05:00
Hunter Bown 668c700192 ci(release): suppress docker build record artifact 2026-05-23 14:53:11 -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 29f89134e4 Merge remote-tracking branch 'origin/rebrand/r3-npm-wrapper' into work/v0.8.41-codewhale-ready 2026-05-23 13:18:51 -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 1777891137 docs(readme): mark V4 Pro rates as permanent
Update README pricing language to describe V4 Pro rates as permanent rather than temporary.
2026-05-23 13:08:02 -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 e132ff1210 ci: use codewhale package selectors 2026-05-23 12:48:30 -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 23daefbe24 feat(npm): publish as codewhale; keep deepseek-tui as deprecation shim
Rename the npm wrapper directory and package from `deepseek-tui` to
`codewhale`. Move under `npm/codewhale/`:
  - `package.json` renamed (name, bin, internal field) — keeps a
    `deepseekBinaryVersion` fallback so old metadata still works.
  - Bin entry points renamed to `bin/codewhale.js` and
    `bin/codewhale-tui.js`; they spawn the corresponding canonical
    binaries via the wrapper.
  - `scripts/artifacts.js` switches to the canonical asset-name matrix
    (`codewhale-*`, `codewhale-tui-*`) and `codewhale-artifacts-sha256.txt`.
  - `scripts/run.js` exports `runCodewhale` and `runCodewhaleTui`; the
    legacy `runDeepseek` exports are gone since nothing else inside the
    package depended on them.
  - `scripts/install.js`, `verify-release-assets.js`, `preflight-glibc.js`
    update brand-mention strings + User-Agent headers. Env vars
    (`DEEPSEEK_TUI_*`, `DEEPSEEK_*`) are explicitly anti-scope and are
    left in place.
  - Tests retargeted at the canonical asset names; all 19 still pass.
  - README rewritten with the new install command and a deprecation
    note about the old package.

Create a one-release deprecation shim at `npm/deepseek-tui/`:
  - `package.json` with no `bin`, just a postinstall script that
    prints a clear message telling the user to install `codewhale`
    instead.
  - `README.md` with the same migration note.
  - Will be removed in v0.9.0 (or whenever Hunter retires the shims).

Release-side scripts in `scripts/release/` follow the rename:
  - `prepare-local-release-assets.js` now requires `npm/codewhale/...`
    and copies the canonical `codewhale*` binaries.
  - `npm-wrapper-smoke.js` smokes the renamed package.
  - `check-versions.sh` reads `npm/codewhale/package.json` for the
    primary check and additionally pins the legacy shim package to
    the same version.
  - `check-published.sh` queries `codewhale@<version>` (with
    `codewhaleBinaryVersion` lookup that falls back to the legacy
    `deepseekBinaryVersion` field).
  - `.github/workflows/auto-tag.yml` watches both `npm/codewhale/` and
    `npm/deepseek-tui/` package.json for auto-tag triggers.

Verified:
  - `npm test` inside `npm/codewhale/` passes 19/19.
  - `npm install --dry-run --ignore-scripts` succeeds for both
    `npm/codewhale/` and `npm/deepseek-tui/`.
  - `scripts/release/check-versions.sh` reports OK.
  - Rust gates re-run: `cargo check`, `cargo fmt --check`,
    `cargo clippy -- -D warnings`, all clean.

No `npm publish` is run from this change — Hunter publishes manually
when the rebrand is ready to ship.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-23 11:11:53 -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