Commit Graph

2061 Commits

Author SHA1 Message Date
Hunter Bown bc7f98a6a0 fix(tui): refresh prompt on mode changes
Refs #2379

Harvested from PR #2534 by @cyq1017
2026-06-01 16:14:59 -07:00
cyq 46de1a9b2d fix(tui): refresh prompt on model switch 2026-06-01 16:09:29 -07:00
cyq 1605d8de44 fix(sandbox): allow tty device in seatbelt profile
Refs #2372

Harvested from PR #2524 by @cyq1017
2026-06-01 16:04:58 -07:00
Hunter Bown 9f33c4d594 fix(tui): suppress wl-paste trailing newline
Refs #1920

Harvested from PR #2540 by @cyq1017
2026-06-01 16:01:05 -07:00
cyq e2201b87dd fix(tui): read Wayland clipboard via wl-paste 2026-06-01 16:00:06 -07:00
cyq 29f57665eb fix(tui): narrow mention depth hint 2026-06-01 15:31:55 -07:00
cyq a976758245 fix(tui): hint mention depth cap on misses 2026-06-01 15:31:55 -07:00
Hunter Bown c81d1c272f test(mcp): cover invalid stdio preview redaction
Refs #2475
2026-06-01 15:31:45 -07:00
cyq 588e54f84d fix(mcp): surface invalid stdio output 2026-06-01 15:31:00 -07:00
Hunter Bown 3d5edfee80 test(config): cover legacy workspace shell opt-in
Refs #2523
2026-06-01 15:30:47 -07:00
cyq 1d8cbbd40c fix(config): normalize windows workspace paths 2026-06-01 15:30:14 -07:00
cyq 7dfec0ed4a fix(config): honor workspace shell opt-in 2026-06-01 15:30:14 -07:00
Hunter Bown 4ff9bba750 fix(tui): keep config scope column visible 2026-06-01 14:23:41 -07:00
Hunter Bown 472cd442ba fix(tui): expose auto-compact threshold in config view 2026-06-01 14:14:20 -07:00
Hunter Bown bb64018a15 feat(tui): add configurable auto-compact threshold
Refs #1722

Preserves auto_compact as opt-in, adds the saved threshold setting, keeps the 500K hard floor, and wires Ctrl+L as a manual compaction shortcut for context-pressure recovery.

Harvested from PR #1723 by @aboimpinto

Co-authored-by: Paulo Aboim Pinto <aboimpinto@gmail.com>
2026-06-01 14:09:49 -07:00
Paulo Aboim Pinto 2ca2927657 fix: clippy needless_return and fmt compliance
Remove unneeded return in utils.rs (crates/tui/src/utils.rs:256) that was caught by clippy on the new commit. Also run cargo fmt to satisfy format checks.
2026-06-01 14:01:11 -07:00
Paulo Aboim Pinto 77b57bd903 fix: initialize hook_executor for fresh sessions to fix greptile P1 review 2026-06-01 14:01:11 -07:00
Paulo Aboim Pinto cc923d634c fix: address greptile review comments — remove double-firing, wrap blocking execute in spawn_blocking
- Remove ToolCallBefore observer firing from tool_routing.rs (the turn-loop gate now handles it) to prevent double-firing hooks for each tool call (greptile P1).

- Wrap hook_executor.execute() call in tokio::task::spawn_blocking so the Tokio worker thread is not blocked by child.wait_timeout() during hook execution (greptile P1).
2026-06-01 14:01:11 -07:00
Paulo Aboim Pinto 2622db4935 fix: cargo fmt formatting for lint compliance 2026-06-01 14:01:11 -07:00
Paulo Aboim Pinto 796e95caa6 fix: address PR #2511 review comments 2026-06-01 14:01:11 -07:00
Paulo Aboim Pinto 242899d4b6 feat: run ToolCallBefore hooks before tool execution 2026-06-01 14:01:11 -07:00
Paulo Aboim Pinto 2c256d7b3a fix(tui): close Windows job before foreground joins
(cherry picked from commit 96adffb243801dcef6c6332611728930e438f1a1)
2026-06-01 09:49:54 -07:00
Paulo Aboim Pinto 54a93994f6 test(tui): cover Windows job cleanup fallbacks
(cherry picked from commit f46eb7e6644acc20d0ad9be8f9a86e1733bc7b00)
2026-06-01 09:49:54 -07:00
Paulo Aboim Pinto 14ea0721a8 fix(tui): close Windows job before output joins
(cherry picked from commit 4db07a451682fb120c902d4254a11b532b24b82a)
2026-06-01 09:49:54 -07:00
implecao a09af2024a feat(web_search): enable parallel execution for read-only search tool
Override `supports_parallel()` to return `true` in `WebSearchTool`,
allowing the engine to batch multiple concurrent web_search calls
into a `FuturesUnordered` parallel group instead of serializing them.

The tool is already read-only, auto-approved, and non-interactive —
parallel-safe by all other criteria. This change removes the final
gate (`supports_parallel() -> false` default) so co-issued searches
run concurrently rather than one-at-a-time.

Closes the ~55s serial wall-clock for 3 simultaneous web searches
(now ~20s, the slowest individual call).

Co-authored-by: Cursor <cursoragent@cursor.com>
(cherry picked from commit a7dcf63c556268b53ff430747ae2e141e4cd4451)
2026-06-01 07:41:33 -07:00
cyq bc34cd13ea fix(tui): hold subagent cap until status reconciles
(cherry picked from commit 5f01dda291e8354e779cc9220f38754fe0c3786f)
2026-06-01 07:06:45 -07:00
Hunter B 998af56d6a chore(release): harden deepseek-tui deprecation path 2026-06-01 06:01:03 -07:00
Paulo Aboim Pinto 382635e4aa fix(tui): harden Windows job cleanup
(cherry picked from commit 3ab06d92ab7c74f43473af5ddf4ffdd31cfd5f3d)
2026-06-01 05:50:49 -07:00
Paulo Aboim Pinto cb4f660a20 fix(tui): contain Windows shell process trees
(cherry picked from commit 6cdea3288637267d282015fbdc1074da5d8a97db)
2026-06-01 05:50:49 -07:00
Hu Qiantao 49791905f9 feat(tools): add byte-level schema canonicalize for prefix-cache stability
When MCP servers return tool schemas, the field order within each schema
object and the order of entries in required / dependentRequired arrays
can vary across reconnections. This causes the serialized tool catalog
bytes to change even when the logical schema is unchanged, busting
DeepSeek's KV prefix cache.

Add schema_canonicalize::canonicalize_schema which recursively:
- Sorts every required array alphabetically
- Sorts every dependentRequired sub-array alphabetically
- Rebuilds object keys in alphabetical order
- Recurses into all nested objects and arrays

The canonicalize step runs after schema_sanitize in build_api_tools,
so each tool's input_schema is first cleaned then byte-stabilized.
The existing OnceLock api_cache pins the result, ensuring the tool
catalog bytes are identical across reads and across process restarts.

8 unit tests cover: required sorting, dependentRequired sorting,
equivalent-ordering byte match, recursive nesting, empty schemas,
deeply nested schemas, non-required array preservation, and key
ordering.

(cherry picked from commit 7cee9cd5e12a74e8072bf2f6a1b18555ed0db0bf)
2026-06-01 05:46:07 -07:00
Hunter B 69cff93754 docs(config): use exact path in permissions example 2026-06-01 05:43:45 -07:00
greyfreedom 3df018994f feat(config): load typed ask permissions file
(cherry picked from commit fb77cf1e0946a061376e5e9a8fc9422dddd98419)
2026-06-01 05:43:26 -07:00
Hunter B 18550339a5 test(state): cover same-second migration idempotency 2026-06-01 05:43:09 -07:00
cyq b76a11b99f fix(state): stabilize fork migration parent links
(cherry picked from commit cb22c7b70b1eaefd93fd6404dbfb08d6edd03a43)
2026-06-01 05:42:50 -07:00
Hunter B 31f34c5df2 ci(release): attach windows npm launcher asset 2026-06-01 03:58:42 -07:00
Hunter B 2698b848b3 ci(release): use ubuntu ports for linux arm64 packages 2026-06-01 03:17:36 -07:00
Hunter B 7d67654737 ci(release): cross-compile linux arm64 assets 2026-06-01 03:02:58 -07:00
Hunter B 492f20da4f chore(release): prepare v0.8.49 2026-06-01 02:42:45 -07:00
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 ce75b9551a docs: update TOOL_SURFACE.md for v0.8.49
- Update version header from v0.8.35 to v0.8.49
- Fix PDF extraction backend description (bundled pure-Rust, not Poppler)
- Add 'Additional registered tools' section listing ~15 tools present in
  the registry but not previously documented: web.run, multi_tool_use.parallel,
  request_user_input, git_show/log/blame, load_skill, revert_turn,
  pandoc_convert, validate_data, code_execution, review, project_map,
  remember, image_analyze, image_ocr, finance
- Clarify canonical live names version reference
2026-06-01 02:33:40 -07:00