Commit Graph

1684 Commits

Author SHA1 Message Date
donglovejava 32f424df26 fix(tui): skip hidden worktrees in workspace discovery to prevent TUI saturation 2026-05-30 19:16:25 -07:00
Hunter Bown cb7614a918 fix(tui): skip hidden worktrees in discovery walks 2026-05-30 19:16:25 -07:00
donglovejava da590e5528 fix: remove spurious #[cfg(target_os = windows)] blocking ratatui import on non-Windows 2026-05-30 19:16:21 -07:00
donglovejava 09d3131dc2 fix(windows): restore ENABLE_WINDOW_INPUT console flag after enable_raw_mode for IME support 2026-05-30 19:16:21 -07:00
donglovejava 1ff5db1663 fix: cargo fmt and suppress dead_code warnings for unused paste-burst methods 2026-05-30 19:16:21 -07:00
donglovejava 09b4f7898b fix(tui): route IME-committed Chinese characters directly to composer instead of paste-burst buffer 2026-05-30 19:16:21 -07:00
donglovejava 5d0a1c848e fix(tools): eagerly load all exec_shell companion tools 2026-05-30 19:16:18 -07:00
Nightt 9d3d453c50 fix: use cached branch in footer 2026-05-30 19:16:15 -07:00
Nightt 06aa24a17a feat: show git branch in default footer 2026-05-30 19:16:15 -07:00
hexin 0b7660ddc5 docs(constitution): Tier 5 Local Law covers EngineConfig.instructions paths
Article VII Tier 5 currently lists four hard-coded path conventions
(AGENTS.md / CLAUDE.md / .codewhale/instructions.md / .deepseek/instructions.md)
as the canonical Local Law sources. Embedders that inject instructions via
`EngineConfig.instructions` (rather than placing files at one of those four
paths) get their files classified by path — and since their paths don't
match, the model defaults to treating their imperatives as Tier 7 Memory
(the lowest tier per Article VII), overridable by a single user sentence.

Adds an explicit clause to Tier 5: '...and any file configured via
`EngineConfig.instructions` (rendered as <instructions source=...> blocks
above). ...embedder-declared imperatives are Local Law, not Memory
preferences.'

Pairs naturally with #2311 (InstructionSource enum) but stands alone — this
is a doc/law clarification, not an API change.

Adds `local_law_tier_covers_engine_config_instructions` test pinning the
new clause's presence.
2026-05-30 19:15:41 -07:00
hexin bb4e876139 perf(prompts): move environment block below volatile boundary for per-session workspace embedders
The environment block (`platform`, `shell`, `pwd`, `lang`) was inserted
above the volatile-content boundary as a workspace-static cache layer. The
original comment claimed 'workspace path is fixed for the run' → static-
cacheable — true for the terminal use case where one process owns one
workspace for its lifetime.

It is **not** true for embedders that swap workspaces between sessions:

- IDE/GUI integrations binding the engine to a per-tab workspace
- Multi-engine pools with one engine per session
- Anything sending Op::SyncSession with a new workspace

For these embedders, `pwd` drifts session-to-session, dragging the entire
static prefix (mode prompt, project context, skills, context management,
compact template) out of cache reuse on every session switch. That's a
~30KB+ cache miss for a few-byte path change.

Moves the environment block below the volatile-content boundary, alongside
the configured `instructions = [...]` block. Effect:

- Static prefix stays byte-stable across sessions even when workspace
  changes (better KV prefix cache hit rate)
- Model still sees `pwd` / `platform` / `shell` (needed for exec_shell
  and structured search tools), just in a slightly later position
- No behavior change for terminal callers (workspace fixed → block content
  unchanged → still in same logical place, just below the boundary)

Added a comment explaining the per-session-workspace motivation.
2026-05-30 19:15:38 -07:00
ningjingkun dc6dcdfda2 docs: add first-run user guide 2026-05-30 19:15:34 -07:00
LING71671 02d1145add docs: clarify custom provider configuration 2026-05-30 19:15:31 -07:00
Nightt 402b186aec test: check tui provider enum drift 2026-05-30 19:15:28 -07:00
Hunter Bown e2099dd691 fix: harden provider registry drift check 2026-05-30 19:15:28 -07:00
Nightt b0e7b67386 style: satisfy current clippy lints 2026-05-30 19:15:28 -07:00
Nightt 9edd2008c4 docs: add provider registry drift check 2026-05-30 19:15:28 -07:00
hexin 30d8d083c5 feat(subagent): add stop-on-failure and bounded-effort guidance to general agent intro
The general-purpose sub-agent intro tells the agent how to plan, but says
nothing about when to *stop*. With less capable models this leads to a
failure mode where the agent retries the same failing tool call (e.g. an
unreachable or rate-limited external API) over and over until it hits the
elapsed/step ceiling, wasting the whole budget and returning nothing useful.

Add two short clauses to GENERAL_AGENT_INTRO:
- Stop quickly on failure: after the same call fails twice, return partial
  results with a one-line note instead of looping.
- Bounded effort: prefer one focused attempt; if the task can't be completed
  within a few tool calls, return current findings so the parent can compensate.

Prompt-only change; no behavioral code paths touched.
2026-05-30 19:14:44 -07:00
reidliu41 c72dc28b38 fix(statusline): keep picker selection visible
Keep the /statusline picker selection visible when navigating through all
  available footer items in smaller terminal windows.

  The picker now scrolls its visible rows as the cursor moves, wraps Up/Down at
  the list edges, and renders the selected row with a continuous, slightly
  brighter background.
2026-05-30 19:14:41 -07:00
jayzhu e2d6d2253a fix(i18n): localize right-click context menu labels and descriptions
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.
2026-05-30 19:14:37 -07:00
reidliu41 d58f10102a fix(composer): allow slash-space messages
Treat inputs like `/ hello` as plain user messages instead of slash commands.
  This lets users start a message with a literal slash while preserving normal
  slash command behavior for `/help`, `/model ...`, and other commands.
2026-05-30 19:13:54 -07:00
Nightt 4bacda64fc fix(tools): raise tool search default results 2026-05-30 19:13:51 -07:00
reidliu41 76089db1dc fix(mcp): avoid nested runtime panic on stdio shutdown
Run the stdio MCP server inside a blocking section when launched from the async CLI entrypoint.

  This prevents Tokio from panicking when the MCP server's internal runtime is dropped after stdin closes.
2026-05-30 19:13:47 -07:00
cyq 0a97f18e78 test(tui): make composer history flush deterministic 2026-05-30 19:13:44 -07:00
dependabot[bot] 5de174ac8b chore(deps): bump tar in the cargo group across 1 directory
Bumps the cargo group with 1 update in the / directory: [tar](https://github.com/composefs/tar-rs).


Updates `tar` from 0.4.45 to 0.4.46
- [Release notes](https://github.com/composefs/tar-rs/releases)
- [Commits](https://github.com/composefs/tar-rs/compare/0.4.45...0.4.46)

---
updated-dependencies:
- dependency-name: tar
  dependency-version: 0.4.46
  dependency-type: direct:production
  dependency-group: cargo
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-30 19:13:41 -07:00
jayzhu b669ee7b94 fix: update terminal tab title from 'DeepSeek TUI' to 'CodeWhale' 2026-05-30 19:13:37 -07:00
reidliu41 1379d354e4 fix(provider): name DeepSeek in provider help text
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.
2026-05-30 19:12:56 -07:00
Hunter Bown 54151a4bc9 feat(/new): add new session command (#2235)
feat(/new): add new session command
2026-05-26 21:48:06 -05:00
Hunter Bown 1c59cbf770 fix(provider): keep picker selection visible (#2241)
fix(provider): keep picker selection visible
2026-05-26 21:41:06 -05:00
reidliu41 198acc72ba Make the selected row easier to see with a continuous subtle highlight, and
wrap Up/Down navigation between the first and last providers.
2026-05-27 10:34:38 +08:00
reidliu41 5ed741dc8c fix(provider): keep picker selection visible
Make the /provider modal size itself to the provider list when space allows,
  and scroll the rendered list when the selected provider moves past the visible
  rows.

  Also make the selected row use a continuous, subtle highlight so the current
  selection remains visible without looking disconnected.

  Adds regression coverage for bottom providers, initial bottom selection, full
  height rendering, and selected-row highlighting.
2026-05-27 10:24:23 +08:00
reidliu41 ed23a48e04 feat: add new session command
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.
2026-05-27 07:33:27 +08:00
Hunter Bown cdec3e8192 Merge branch 'build/v0.8.47' into integration/v0.8.47-unified 2026-05-26 16:41:10 -05:00
Hunter Bown 663550be35 Merge branch 'feat/2199-goal-tools-runtime' into integration/v0.8.47-unified 2026-05-26 16:41:05 -05:00
Hunter Bown 183606b08b Merge branch 'feat/2022-session-failure-classifier' into integration/v0.8.47-unified 2026-05-26 16:41:00 -05:00
Hunter Bown 84f023931d Merge branch 'fix/2021-tool-output-receipts' into integration/v0.8.47-unified 2026-05-26 16:41:00 -05:00
Hunter Bown 09f12da47d Merge branch 'codex/1842-show-thinking-reasoning-20260526203106' into integration/v0.8.47-unified 2026-05-26 16:40:56 -05:00
Hunter Bown 7cbeb3d809 Merge branch 'work/issue-2132-ddg-default' into integration/v0.8.47-unified 2026-05-26 16:40:53 -05:00
Hunter Bown 2b0761fbbd Merge branch 'triage/1797-auto-model-resume-20260526-153051' into integration/v0.8.47-unified 2026-05-26 16:40:47 -05:00
Hunter Bown 64e5b3f306 Merge branch 'triage/cache-hit-1120-1818-743' into integration/v0.8.47-unified 2026-05-26 16:40:47 -05:00
Hunter Bown a4024d3dff Merge branch 'fix/1656-local-http-provider' into integration/v0.8.47-unified 2026-05-26 16:40:47 -05:00
Hunter Bown 007c578bb3 Merge branch 'codex/issue-2138-edit-file-fuzz-20260526' into integration/v0.8.47-unified 2026-05-26 16:40:47 -05:00
Hunter Bown 86652f3a4b Merge branch 'docs/2217-container-toolbox-contract' into integration/v0.8.47-unified 2026-05-26 16:40:36 -05:00
Hunter Bown b96fa37ea4 chore: add DeepSWE task verification script 2026-05-26 16:40:16 -05:00
Hunter Bown ac6693581f fix(tools): restore checklist and planning tools to default active catalog
PR #2076 deferred planning/checklist tools (checklist_write, update_plan,
task_create, task_list, task_read) to reduce catalog tokens, but the system
prompt actively instructs the model to use these tools. Without them in the
active catalog, the model cannot call them until it first discovers them via
tool_search, which it is not prompted to do for planning tools.

Keep these tools in DEFAULT_ACTIVE_NATIVE_TOOLS so the model can follow
the Constitution's Regulations (Tier 3) and the Mode: YOLO instructions.
2026-05-26 16:40:16 -05:00
Hunter Bown 11e1ec1fe3 docs: add v0.8.47 CHANGELOG entries for composer, CNB mirror, fixes 2026-05-26 16:39:39 -05:00
Hunter Bown 92c8dbc7ce fix(composer): use wrap_input_lines_for_mouse, clamp selection to input length
- Replace visible_line_char_ranges with wrap_input_lines_for_mouse for accurate mouse selection
- Clamp selection_anchor and cursor_position to char_count
- Clear selection on history navigation to prevent stale highlights
- Add test for history-navigation-clears-stale-selection
2026-05-26 16:39:39 -05:00
Hunter Bown 74878dcd30 refactor(tools): replace Semaphore with RwLock for parallel-safe tool execution
- Use OwnedRwLockReadGuard for parallel-safe tools, OwnedRwLockWriteGuard for serial
- Add TOOL_EXECUTION_LOCK_HELD task-local for reentrancy detection
- Add BlockingHandler test harness and parallel-vs-serial concurrency tests
2026-05-26 16:39:39 -05:00
Hunter Bown 60c1b6619c style: rustfmt cleanups and minor formatting fixes
- Line-wrap long function signatures and format arguments
- Fix bracket placement for early returns (consistent style)
- Use [!] instead of [✓] for network-denied skill sync
- Fix copy-selection ordering: clear after success, not always
2026-05-26 16:39:28 -05:00
Hunter Bown 17f21a84e1 feat(goals): add runtime goal tools and bounded continuation gate (#2199)
- Add SharedGoalState and goal tools (goal.rs) to the engine
- Sync goal state from host on engine init and goal-objective change
- Wire goal_objective through prompt context and system-prompt refresh
- Add continuation.md prompt for bounded task continuation
- Register goal tools in the tool registry
- Add continuation gate tests in engine/tests.rs
2026-05-26 16:38:26 -05:00