Commit Graph

1820 Commits

Author SHA1 Message Date
Hunter B 137e4e6130 fix: reset hunt state for user commands 2026-05-30 23:19:01 -07:00
Hunter B 91d0921091 fix: update user command hunt metadata 2026-05-30 23:08:20 -07:00
Hunter B 62b2ad171d Merge remote-tracking branch 'origin/main' into HEAD 2026-05-30 23:03:23 -07:00
Hunter Bown eb55cfe884 Merge pull request #2338 from encyc/feat/whale-routes-2026
feat: whale-size route taxonomy for model + thinking-effort picker
2026-05-30 23:01:08 -07:00
Hunter B 08f40be767 fix: harden hunt verdict handling 2026-05-30 22:56:11 -07:00
Hunter Bown 42576a7129 Merge pull request #2371 from jimmyzhuu/feat/baidu-search-provider
feat: add Baidu AI Search backend for web_search
2026-05-30 22:54:47 -07:00
Hunter Bown d3904e6ac5 Merge pull request #2285 from gaord/fix/skills-api-multi-dir
fix(skills): align skills API with TUI command multi-directory discovery
2026-05-30 22:49:45 -07:00
Hunter Bown 1aa5659685 Merge pull request #2383 from rockyzhang/main
Add RISC-V (riscv64gc-unknown-linux-gnu) prebuilt binary support
2026-05-30 22:44:03 -07:00
Justin Gao 6df08a3dc2 fix(#2338): prevent known model + Auto effort from falling through to auto row
The whale-route fallback in the picker constructor used show_custom_model_row
as the gate for selecting the 'auto' vs custom row, but a known DeepSeek model
(e.g. v4-pro) paired with ReasoningEffort::Auto would not match any whale route
yet still have show_custom_model_row=false — silently landing on the auto row
and replacing the explicit model with 'auto' on apply.

Key the fallback on whether the initial model is actually 'auto' instead.
When a whale-route fallback selects the custom row, ensure show_custom_model_row
is set to true so the row is visible in the picker UI.

Also:
- Add regression test: known-model + Auto effort must not fall to auto row.
- Clean up picker_auto_model_forces_auto_effort_on_apply: remove manual
  mutations of selected_model_idx / selected_effort_idx which whale-route
  mode never reads.
- Rename Porpoise → Beluga per #2016, which excludes porpoises from the
  user-facing whale pool.
2026-05-31 13:42:57 +08:00
Hunter B 39fc14b948 fix(runtime): identify bundled skill entries by path 2026-05-30 22:42:47 -07:00
Hunter B 12c9cd4193 Merge main into Baidu search provider 2026-05-30 22:39:13 -07:00
Hunter B 2bab4c7429 Merge remote-tracking branch 'origin/main' into HEAD 2026-05-30 22:30:55 -07:00
Hunter B ab81d1a2e1 fix(runtime): report custom skills search directories 2026-05-30 22:30:51 -07:00
Hunter Bown 1afc72e728 Merge pull request #2385 from HUQIANTAO/feat/collapsible-thinking
feat: per-cell thinking fold/unfold via Space key
2026-05-30 22:30:08 -07:00
Hunter B 553a51f166 Merge remote-tracking branch 'origin/main' into HEAD 2026-05-30 22:27:00 -07:00
Hunter B cf34c8ba85 Merge remote-tracking branch 'origin/main' into HEAD 2026-05-30 22:19:34 -07:00
Hunter B 4565efac5f fix(tui): polish folded thinking tests 2026-05-30 22:19:31 -07:00
Hunter Bown 76a84420a4 Merge pull request #2356 from h3c-hexin/pr2/prompt-override-hooks
feat(prompts): allow embedders to override constitutional prompt text via OnceLock hooks
2026-05-30 22:16:11 -07:00
Hunter B e7c61deefd fix(tui): key MiMo vision token field off model id 2026-05-30 22:16:01 -07:00
AdityaG 3f4c4496f2 feat: add Xiaomi MiMo provider
Adds native xiaomi-mimo provider configuration, auth/env aliases, model registry entries, TUI request handling, tests, and docs. Keeps credentials in existing provider-scoped config/env/keyring paths and uses placeholders only in docs.
2026-05-30 22:16:01 -07:00
Hunter B bace2523e1 fix(release): pin riscv64 dispatch source ref 2026-05-30 22:13:20 -07:00
Hunter B 382bee7cf9 Merge main into prompt override hooks
Resolve the prompt-layer conflict by keeping the core tool taxonomy block while routing base prompt composition through the override accessor. Tighten the override API so duplicate registrations return the rejected string, and make locale preamble/closer overrides symmetric across supported bookend locales.
2026-05-30 22:03:47 -07:00
reidliu41 37d4ec963b fix(tui): highlight user messages in cached transcript
Route user cells in the transcript cache through the existing user-message renderer.

  The live chat view renders through lines_with_copy_metadata(), which previously
  bypassed the user-message highlight path. As a result, submitted user prompts did
  not show the intended full-row background in the main transcript.

  Add a regression test for the transcript cache path.
2026-05-30 21:58:21 -07:00
Hunter Bown 7c8df7a6da Merge pull request #1902 from LING71671/fix/config-effective-cost-currency
fix(tui): show effective cost currency context in config view
2026-05-30 21:53:55 -07:00
Hunter Bown 0a1bd9aaf7 Merge pull request #2325 from zlh124/fix/approval-missing-params
fix: approval dialog shows empty params when model response includes text block
2026-05-30 21:53:38 -07:00
Hunter B cd56421cc7 fix(ci): ignore fenced blocks in provider docs span check 2026-05-30 21:51:47 -07:00
Hunter B a419079b31 fix(ci): ignore fenced blocks in provider docs span check 2026-05-30 21:51:47 -07:00
Hunter B 07fd9d0a55 Merge commit 'refs/tmp/pr1902' into HEAD
# Conflicts:
#	crates/tui/src/tui/views/mod.rs
2026-05-30 21:49:51 -07:00
Hunter B 6d9369908d style: format shell gating tests 2026-05-30 21:49:38 -07:00
Hu Qiantao c6cec29f63 fix: remove double-registration of shell tools in engine builder
The second feature-flag gate in tool_setup.rs was calling
with_shell_tools() again when allow_shell was already true, causing
duplicate tool registration. Remove the redundant gate since
with_agent_tools() already handles the allow_shell check.

Also add task_shell_wait to MODES.md alongside task_shell_start.
2026-05-30 21:49:38 -07:00
Hu Qiantao ed81d13782 fix: gate task_shell_start behind allow_shell like exec_shell
task_shell_start delegates to ExecShellTool, providing the same shell
execution capability as exec_shell. Previously, task_shell_start was
registered unconditionally in with_runtime_task_tools while exec_shell
was gated behind allow_shell, creating an inconsistent security gate.

This caused the model to try exec_shell first, fail, then fall back to
task_shell_start — wasting tokens and bypassing the intended security
boundary.

Split TaskShellStartTool and TaskShellWaitTool out of
with_runtime_task_tools into a new with_runtime_task_shell_tools method,
and gate both behind the allow_shell check in with_agent_tools.

Closes #2303
2026-05-30 21:49:38 -07:00
Hunter B a0fd16fa97 Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	crates/tui/src/tui/ui.rs
2026-05-30 21:46:33 -07:00
Hunter B b135373bf5 test(tui): cover approval input after message drain 2026-05-30 21:43:24 -07: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
Hu Qiantao b35b97ca6d fix: invalidate cache on folded_thinking change and fix index mapping
Two bugs in the folded-thinking rendering path:

1. Cache invalidation: changing folded_thinking did not invalidate cached
   cell renders because the cell revision stayed the same. Now track
   folded_cells in the cache and force re-render when it changes.

2. Index mapping: in the slow path (with collapsed cells), the cache idx
   is a filtered position, but folded_cells uses original virtual indices.
   Add original_index_map parameter to ensure_split so fold lookups
   resolve correctly.

Added two regression tests:
- folded_thinking_cache_invalidation: verifies fold/unfold triggers re-render
- folded_thinking_with_collapsed_cells_uses_original_indices: verifies
  correct fold behavior when collapsed_cells filtering is active
2026-05-31 12:27:43 +08:00
Hu Qiantao 10d3a0fbd8 fix: use XOR for thinking fold toggle relative to verbose setting
Change from  to  so Space
toggles the collapsed state relative to the global verbose flag:

- verbose off (default): thinking collapsed; Space unfolds it
- verbose on: thinking expanded; Space folds it

This lets users expand individual thinking blocks even when the global
verbose mode is off, without needing to toggle verbose for all blocks.
2026-05-31 12:20:42 +08:00
Matt Van Horn de3a1f7773 feat(tui): FauxStep::Factory for live request-shape assertions
Closes #2074

Adds FauxStep::Factory(Box<dyn Fn(&MessageRequest) -> CannedTurn + Send + Sync>)
to MockLlmClient. When a Factory step is dequeued, its closure runs
against the real outgoing MessageRequest before the response stream is
built, so any assert! panic surfaces directly from the client call
instead of later in stream polling.

Internal storage moves from VecDeque<CannedTurn> to VecDeque<FauxStep>,
but every existing public method keeps working:

- MockLlmClient::new(Vec<CannedTurn>) wraps each turn in FauxStep::Canned.
- push_turn(CannedTurn) appends as FauxStep::Canned.

Adds push_factory(closure) for tests that want the Factory branch.

Doc comment on the Factory variant captures the DeepSeek V4
thinking-mode tool-call invariant (the v0.4.9-v0.5.1 reasoning_content
drop that produced HTTP 400 on follow-up turns).

Adds:

- crates/tui/tests/reasoning_content_replayed_after_tool_call.rs — a
  regression test whose factory asserts the assistant tool-call turn
  carries a Thinking content block after a thinking + tool-call round.
- An additional unit test in mock.rs covering create_message_synthesizes_from_factory_turn.

All 20 tests in the new file pass, and the existing
integration_mock_llm suite (27 tests) is unchanged.
2026-05-30 21:15:58 -07:00
Hu Qiantao 607ec155ec feat: per-cell thinking fold/unfold via Space key
Previously, Space on a thinking cell hid it entirely from the transcript.
Now Space toggles between folded (summary preview) and unfolded (full
content) for thinking cells, while other cells retain the existing
hide/show behavior.

Changes:
- Add folded_thinking HashSet to App for per-cell fold tracking
- Add lines_with_options_folded / lines_with_copy_metadata_folded that
  accept an explicit folded flag, overriding the global verbose setting
- Update transcript cache to pass fold state during rendering
- Update Space key handler to toggle fold for thinking cells
- Update affordance text to mention Space for expanding folded thinking

Closes #2348
2026-05-31 12:03:18 +08:00
Rocky Zhang c0dd43993c Add RISC-V (riscv64gc-unknown-linux-gnu) prebuilt binary support
Adds riscv64 to build pipelines so CodeWhale ships prebuilt binaries
and npm wrappers for 64-bit RISC-V Linux (glibc) systems.

Changes:

**CI / build**
- release.yml: +2 build matrix entries (codewhale + codewhale-tui for
  riscv64gc-unknown-linux-gnu), cross-compilation toolchain step using
  a dedicated DEB822-format apt source for ports.ubuntu.com, bundle
  step, and release-notes table row.
- nightly.yml: +2 matrix entries, matching cross-compilation setup.
- resolve job: handle workflow_dispatch when the target tag does not
  yet exist (fall back to HEAD SHA).

**Packaging**
- npm/codewhale/scripts/artifacts.js: add riscv64 to ASSET_MATRIX
  under linux so npm install -g codewhale resolves on RISC-V.

**Docs**
- docs/INSTALL.md: add riscv64 row to supported platforms table;
  replace with clearer 'other architectures' wording.

Build strategy: cross-compile from ubuntu-latest (x86_64) using
gcc-riscv64-linux-gnu. The dbus runtime dependency (from the keyring
crate's secret-service backend) is satisfied via ports.ubuntu.com.
PKG_CONFIG_ALLOW_CROSS and a cross-target libdir are set so the
keyring crate finds dbus-1 during cross-compilation.

Docker support for linux/riscv64 is intentionally not added here:
GitHub Actions does not yet provide the infrastructure to build or
emulate riscv64 containers. The Dockerfile changes will follow when
the hosted CI surface supports it.
2026-05-31 03:35:13 +00:00
Hunter Bown a83fa59594 fix(tui): keep task shell tools eagerly loaded 2026-05-30 20:24:06 -07:00
Fann Hoo efb63df66e feat(lsp): add Java and Vue language server defaults 2026-05-30 19:26:42 -07:00
Matt Van Horn f3def32ef9 feat: read global AGENTS.md from ~/.agents/ as vendor-neutral fallback 2026-05-30 19:26:39 -07:00
Ben Gao e2b58e6b22 style: fix rustfmt formatting for user-input route 2026-05-30 19:25:23 -07:00
Ben Gao b8439c16fc fix(runtime): don't clear active_turn in interrupt_turn
Clearing active_turn immediately breaks is_interrupt_requested detection
in monitor_turn, causing turn status to be Completed instead of Interrupted.

Let monitor_turn handle the cleanup after it detects the interrupt flag
and performs full finalization with correct status, usage, and error.
2026-05-30 19:25:23 -07:00
Ben Gao 549ab8a834 fix(runtime): use consistent error handling for user input API
- Change 'not loaded' to 'not found' in submit_user_input and
  cancel_user_input so map_thread_err correctly maps to 404
- Use map_thread_err in submit_user_input API endpoint for
  consistent error response (404 for missing thread, 409 for
  conflict, etc.) instead of always returning 500
2026-05-30 19:25:23 -07:00
Ben Gao 5994a408a2 fix(runtime): remove redundant turn finalization from interrupt_turn
The monitor_turn loop already handles full turn finalization when the
engine shuts down after cancellation, including saving turn status,
usage, error, emitting turn.completed, and clearing active_turn.

Having interrupt_turn also save turn status and emit turn.completed
causes duplicate SSE events and loses usage/error data that
monitor_turn would have captured from TurnComplete.

Keep only the active_turn cleanup so the 409 error is resolved while
monitor_turn remains the single source of truth for turn completion.
2026-05-30 19:25:23 -07:00