Commit Graph

1398 Commits

Author SHA1 Message Date
Hunter B 683ec0bef4 fix(pricing): keep adjusted DeepSeek V4-Pro rates 2026-06-01 02:38:45 -07:00
Hunter B dde865453e test: cover Kimi schema and ANSI normalization edge cases 2026-06-01 02:36:50 -07:00
Hanmiao Li 34a87e3fd3 fix: collapse nested ifs to satisfy clippy (#2480) 2026-06-01 02:34:32 -07:00
Hanmiao Li bea701c6a4 fix: normalize tool schemas for Kimi/Moonshot — push type into anyOf items (#2438) 2026-06-01 02:34:30 -07:00
Justin Gao c22b60c2b0 fix: hash only API-visible tool fields, not internal metadata
Addresses chatgpt-codex review: the previous full serde_json::to_string
included internal-only fields (allowed_callers, defer_loading,
input_examples, cache_control) that are never sent to the chat API.
This caused spurious drift detection when those fields changed.

- New tool_to_api_json() helper mirrors tool_to_chat() serialization:
  only type, name, description, parameters, strict
- Doc comment fixed: 'sorted by name' → 'sorted lexicographically
  by JSON text' (greptile review)
2026-06-01 02:34:26 -07:00
Justin Gao 37cfd97b5c refs(#2264): harden PrefixFingerprint with full tool JSON hash
Phase 1.5 — upgrade PrefixFingerprint::compute() to hash the full tool
JSON serialization (name + description + schema) instead of just tool
names. This catches schema/description drift in addition to name changes.

- Serialize each tool via serde_json::to_string, sort by name, join
- New test: fingerprint_detects_schema_change_not_just_name_change
- All 21 prefix_cache tests pass
- Aligned with prompt_zones.rs tool_catalog_digest approach
2026-06-01 02:34:26 -07:00
hqt d88b2c36ab test(shell): fix test on non posix shell 2026-06-01 02:34:23 -07:00
Hanmiao Li 87b5c78d8a fix: also strip ANSI in sidebar normalize_activity_text (#2481) 2026-06-01 02:34:23 -07:00
Hanmiao Li 599b5997d0 fix: strip ANSI sequences in footer tool status labels to prevent raw escape code leaks (#2481) 2026-06-01 02:34:23 -07:00
reidliu41 c1f74b3b2f fix(config): allow missing tui status items
Treat a missing tui.status_items field as None even when the [tui]
  table exists, preserving the documented default footer behavior.

  Add a regression test for configs that define [tui] without status_items.
2026-06-01 02:34:23 -07:00
Hunter B 0af80e262f fix: prevent double-registration of web/patch tools in agent mode
with_agent_tools() unconditionally registered web_search/fetch_url/web.run
(via with_web_tools) and apply_patch (via with_patch_tools), but tool_setup.rs
conditionally registered them again based on Feature::WebSearch and
Feature::ApplyPatch flags. This caused double registration (overwritten
with a warning log on the second insert).

Changes:
- Remove with_web_tools() and with_patch_tools() from with_agent_tools()
- Move finance tool out of with_web_tools() into its own with_finance_tool()
  (finance is market data, not web search — it should not be gated behind
  the web-search feature flag)
- Add with_finance_tool() to with_agent_tools() so finance stays always
  available
- Update tests: new test for with_finance_tool(), updated web_tools test
  to verify finance is no longer in the web group
2026-06-01 02:33:40 -07:00
Hunter B e9eea70445 release: v0.8.48 — liveness watchdog fix, Qwen 3.7 removal, provider/docs sync
- Fix false 'Turn stalled' during long active turns with running tools.
  Add turn_last_activity_at tracking and active-tool awareness to
  reconcile_turn_liveness(). Three new tests cover the fix.

- Remove Qwen 3.7 Max OpenRouter preset from registry, picker, docs,
  and tests. Qwen 3.7 Max is a hosted model; the preset will return
  when an open-weight Qwen 3.7 release ships. MiniMax M3 remains as
  a full 1M-context multimodal route.

- Sync root CHANGELOG to crates/tui/CHANGELOG for crates.io packaging.
  Update docs/CONFIGURATION.md, docs/PROVIDERS.md, and README to
  reflect the Qwen 3.7 removal. Regenerate web facts timestamp.
2026-05-31 21:45:31 -07:00
Hunter B 2bd77edc15 Fix provider model selection and stream completion 2026-05-31 21:15:40 -07:00
Hunter B 2b69f4e041 chore: polish codewhale home defaults 2026-05-31 19:22:12 -07:00
Justin Gao 89ab2a9c67 fix: add #[allow(dead_code)] to FrozenPrefix/PinnedPrefix impl blocks 2026-06-01 09:40:44 +08:00
Justin Gao dcfe34670c fix: suppress dead_code warnings for Phase 1 foundation types
All dead_code in prompt_zones.rs is intentional — these types are
scaffolding awaiting future integration. Pre-existing schema_migration
warnings remain as-is.
2026-06-01 09:34:03 +08:00
Justin Gao d897c2e5b8 refs(#2264): Phase 1 three-zone type foundation — no request-path enforcement yet
Narrower slice per Hmbown's review: typed zone structs as foundation
without wiring into the request path. Future phases will integrate
AppendLog/TurnScratch/ThreeZoneRequest into turn_loop.

- prompt_zones.rs (663 lines, 16 tests): PinnedPrefix / FrozenPrefix /
  PrefixDrift (ready), AppendLog / TurnScratch / ThreeZoneRequest
  (scaffolding, #[allow(dead_code)])
- FrozenPrefix: full tool JSON hash (name+desc+schema), raw-text
  fast-path in verify(), cache_control preserved in build_messages()
- /cache zones subcommand with three-zone status display
- merge_compaction_summary: zone affiliation doc comment
- No turn_loop/session changes — engine continues using
  PrefixStabilityManager / MessageRequest as before
2026-06-01 09:26:33 +08:00
Hunter B a9a4213d39 fix(tui): make startup update checks configurable 2026-05-31 17:06:20 -07:00
Hunter B 746bf2aa4b fix(tui): keep composer scroll and alt motion in draft 2026-05-31 16:28:00 -07:00
Hunter B 42b2ed2e23 Resolve qwen3.7 OpenRouter shorthand 2026-05-31 15:58:17 -07:00
Hunter B e0a71c2ed0 Stop header whale after liveness recovery 2026-05-31 15:44:53 -07:00
Hunter B d6baf20721 Migrate file secrets to codewhale home 2026-05-31 15:30:35 -07:00
Hunter B b1ae0fa60e Fix model picker cancel behavior 2026-05-31 14:49:45 -07:00
Hunter Bown f09b4ae72f Fix TUI cancel busy animations
Clear stale busy state and retry/title animations on local cancel.\n\nLocal verification:\n- cargo test -p codewhale-tui\n- codewhale doctor\n- codewhale --provider deepseek --model deepseek-v4-pro exec "Reply with exactly: OK"
2026-05-31 14:06:52 -07:00
Hunter B f72f609293 feat: make file mention completion tunable 2026-05-31 13:29:28 -07:00
Hunter Bown 5a80556eb2 feat(models): add recent large OpenRouter models (#2461) 2026-05-31 11:26:25 -07:00
Implementist 45787bcf70 fix(web_search): improve Volcengine reliability — 90 s timeout, retry, and faster model (#2439)
* fix(web_search): add timeout floor and retry for Volcengine provider

Volcengine's Responses API pipeline (web search + model inference +
JSON generation) can exceed the default 15 s timeout on complex
queries, causing ~50% of requests to fail with transport errors.

Changes:
- Enforce a 60 s minimum timeout for the Volcengine provider
- Separate connect_timeout (15 s) from total request timeout
- Retry transient transport errors up to 3 times (1 s / 2 s backoff)
- Add TCP keepalive, HTTP/2 keepalive, and User-Agent headers
  matching the patterns used in client.rs

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: raise Volcengine timeout floor to 90 s

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: correct stale comment — floor is 90 s, not 60 s

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix(web_search): tighten Volcengine retry semantics

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Hunter B <hmbown@gmail.com>
2026-05-31 11:01:34 -07:00
HUQIANTAO 6f785c4bab refactor(palette): remove unused backward-compat aliases and add module docs (#2445)
* refactor(palette): remove unused backward-compat aliases and add module docs

- Remove DEEPSEEK_AQUA_RGB, DEEPSEEK_NAVY_RGB, DEEPSEEK_AQUA, DEEPSEEK_NAVY
  (unused backward-compatible aliases with no references in production code)
- Add module-level doc comment explaining the three-layer palette organization:
  RGB tuples, semantic Color constants, and backward-compat aliases
- Note that some constants are kept for design-system completeness

* fix: remove deprecated color audit test (DEEPSEEK_AQUA no longer exists)

* fix: remove unused import in palette_audit test

---------

Co-authored-by: Hu Qiantao <huqiantao@HudeMacBook-Air.local>
2026-05-31 10:47:32 -07:00
BryonGo f7fbc35165 fix: use effective_model_for_budget instead of raw model in compactio… (#2437)
* fix: use effective_model_for_budget instead of raw model in compaction_config

When model is set to 'auto', self.model holds the literal string 'auto',
which gets passed to the API as the model name in compaction requests.
DeepSeek's API rejects 'auto' with HTTP 400 since it's not a recognized
model ID.

effective_model_for_budget() resolves 'auto' to the last effective model
or falls back to DEFAULT_TEXT_MODEL, ensuring compaction always sends a
concrete model name.

* test(tui): cover auto model compaction config

---------

Co-authored-by: codgo <anbiaoren@gie777.com>
Co-authored-by: Hunter B <hmbown@gmail.com>
2026-05-31 10:33:47 -07:00
Hunter Bown 1eebb0462e Merge pull request #2431 from reidliu41/fix/attach-absolute-path-completion
fix(tui): suppress inline skill completions in slash command args
2026-05-31 10:03:08 -07:00
Hunter B 0d3b81db2e fix(hooks): surface continued submit hook stderr 2026-05-31 04:43:54 -07:00
ningjingkun 4146ec617e fix(hooks): harden message_submit review cases 2026-05-31 04:39:51 -07:00
ningjingkun 467e2cbfff feat(hooks): allow message_submit to transform submitted text 2026-05-31 04:39:51 -07:00
hqt 12cba233df style: fix clippy warnings and run fmt 2026-05-31 19:22:21 +08:00
reidliu41 ff7ef7951e fix(tui): suppress inline skill completions in slash command args
Prevent inline skill slash completions from opening while editing arguments for an existing slash command.

  This keeps `/attach /path/to/image.png` usable without showing skill entries after the path slash, while
  preserving inline skill completions in normal message text.

  Adds a regression test for `/attach /`.
2026-05-31 19:15:35 +08:00
Hunter Bown ecfca261a1 fix(tools): remove invalid override fallthrough (#2428)
Hardens the tool override path from #2420 so a broken replacement override cannot silently fall through to the original built-in tool.

Validation:
- git diff --check
- CARGO_TARGET_DIR=/Volumes/VIXinSSD/codewhale-target/fix-plugin-override cargo test -p codewhale-tui tools::registry --all-features
- CARGO_TARGET_DIR=/Volumes/VIXinSSD/codewhale-target/fix-plugin-override cargo test -p codewhale-tui tools::plugin --all-features
2026-05-31 04:13:13 -07:00
Hunter B 553acc3cf7 fix(web_search): harden Volcengine provider wiring 2026-05-31 03:56:57 -07:00
implecao c1a9a841ca chore: fix clippy warning in extract_json_block
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-31 03:54:09 -07:00
implecao c591d91c2b chore: apply cargo fmt
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-31 03:54:09 -07:00
implecao 70ef86c600 feat(web_search): add Volcengine Ark search provider
Add Volcengine (火山引擎) as a new SearchProvider in web_search tool.
Uses Volcengine's Responses API with `tools: [{type: "web_search"}]`
and strict JSON prompt constraints to extract structured search results.

- Free tier: 20K queries/month per API key
- API key resolution: [search] api_key → VOLCENGINE_API_KEY →
  VOLCENGINE_ARK_API_KEY → ARK_API_KEY env vars
- Select via `DEEPSEEK_SEARCH_PROVIDER=volcengine` or
  `[search] provider = "volcengine"` in config.toml

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-31 03:54:09 -07:00
Paulo Aboim Pinto f488cd8e00 feat(tui): add pluggable tool registry (#2420)
Thanks @aboimpinto.

Adds a self-describing local plugin/override tool registry, keeps explicit [tools.overrides] above auto-discovered scripts, makes plugin discovery deterministic, hardens child-process stdin/stdout behavior, and updates the local plugin examples.

Validation:
- cargo fmt --all -- --check
- git diff --check
- CARGO_TARGET_DIR=/Volumes/VIXinSSD/codewhale-target/fix-2420-rebase cargo test -p codewhale-tui tools::plugin --all-features
- CARGO_TARGET_DIR=/Volumes/VIXinSSD/codewhale-target/fix-2420-rebase cargo test -p codewhale-tui tools::registry --all-features
2026-05-31 03:34:54 -07:00
Hunter Bown cef1632d6a feat(cache): track cache warmup keys (#2424)
Harvested from #2391 with thanks to @wplll.

Tracks a cache warmup key across provider, model, base URL, static prefix, tool catalog, project pack, and skills hashes; records base URL and tool catalog from completed turns; reports whether /cache inspect still matches the last warmup key; and computes the warmup key from the actual warmup request sent to the provider.

Validation:
- cargo fmt --all -- --check
- git diff --check
- CARGO_TARGET_DIR=/Volumes/VIXinSSD/codewhale-target/harvest-2391-rebase cargo test -p codewhale-tui warmup_status --all-features
- CARGO_TARGET_DIR=/Volumes/VIXinSSD/codewhale-target/harvest-2391-rebase cargo test -p codewhale-tui cache_inspect --all-features
2026-05-31 03:34:01 -07:00
Hunter Bown 51906511c5 feat(cache): expose real tool catalog in cache inspect (#2423)
Harvested from #2390 with thanks to @wplll.

Records the actual tool catalog used by the last model request, reports that catalog in /cache inspect JSON and text output, and includes review hardening for stale catalog clearing, JSON/verbose flag handling, and CJK-aware token estimates.

Validation:
- cargo fmt --all -- --check
- CARGO_TARGET_DIR=/Volumes/VIXinSSD/codewhale-target/harvest-2390 cargo test -p codewhale-tui cache_inspect --all-features
2026-05-31 03:24:00 -07:00
Hunter Bown 58e45d384e feat(subagents): inherit MCP tools in child runtimes (#2422)
Harvested from #2377 with thanks to @buko.

Threads the parent MCP tool pool into child SubAgentRuntime construction and registers MCP-backed tools for child agents when MCP is enabled, while leaving the broader mention-browser/provider/config work for focused follow-ups.

Validation:
- cargo fmt --all -- --check
- CARGO_TARGET_DIR=/Volumes/VIXinSSD/codewhale-pr2377-target cargo test -p codewhale-tui tools::subagent
- CARGO_TARGET_DIR=/Volumes/VIXinSSD/codewhale-target/harvest-2377-recheck cargo test -p codewhale-tui tools::subagent --all-features
2026-05-31 03:16:53 -07:00
Hunter Bown 3c0d56d424 test(cache): cover medium tool result dedup (#2419)
Harvested from #2393 with thanks to @wplll.

Strengthens the tool-result dedup regression coverage by exercising repeated medium-sized outputs that are above the dedup threshold but below the truncation budget.
2026-05-31 02:53:29 -07:00
Hunter Bown 3899ca3f58 feat(project-context): stabilize pack ordering (#2418)
Harvested from #2392 with thanks to @wplll.

Makes project context pack path ordering deterministic across Unix and Windows-style separators while keeping README/config/source entries prioritized before general directory noise.
2026-05-31 02:53:08 -07:00
Hunter Bown ce72b0cbc4 fix(tui): clarify shell tool availability errors (#2412)
Harvested from #2402 with thanks to @axobase001.

Keeps `allow_shell` guidance visible for gated shell tools even when missing-tool suggestions exist, removes the nonexistent task_shell_cancel matcher, and broadens regression coverage.

Partially addresses #2328.
2026-05-31 02:52:24 -07:00
Hunter Bown 0dd7f0b802 fix(runtime): harden mobile QR smoke output (#2417)
Harvested from #2415 with thanks to @axobase001.

Keeps the denser mobile QR renderer and replaces the fixed binding-warning sleep with health polling plus an explicit timeout failure path, so slow starts fail with the useful cause instead of drifting into misleading assertions.

Follow-up to #2403.
2026-05-31 02:48:41 -07:00
Hunter Bown 6e8477334d test(shell): cover tty controlling terminal (#2414)
Harvested from #2408 with thanks to @axobase001.

Adds regression coverage proving tty:true shell commands receive a controlling terminal, with a longer wait margin so the test is stable on slower CI hosts.

Partially addresses #2372.
2026-05-31 02:47:48 -07:00
Hunter Bown f38864d801 fix(tui): compact statusline token chip (#2411)
Harvested from #2405 with thanks to @axobase001.\n\nCompacts the statusline token chip to use the short  label while preserving the existing token detail and adding focused coverage for the rendered label.\n\nPartially addresses #2309.
2026-05-31 02:43:38 -07:00