fix: preserve native ripgrep capabilities for direct models

Replace the restricted workspace_rg parameter mapping with native args and optional cwd. Preserve rg output and exit codes, and reuse process cancellation and output_read pagination so large search results remain accessible. Ask remains read-only within the workspace; Execute uses current-account permissions.

Validation: focused regression 169 passed, 1 skipped; typecheck and lint passed. Real DeepSeek Ask and Execute pagination scenarios passed with six counted requests in the successful run; an earlier failed fixture run has no retained request count. Full-suite validation is not green: the recorded run had unrelated failures and the latest run timed out without a summary. The remote Agent does not use this local execution path.

Release note: 直连模型可使用 ripgrep 原生参数搜索文件并保留原生结果,大输出可通过 output_read 完整续读。Ask 保持工作区只读,Execute 使用当前账号权限。
This commit is contained in:
mesalogo
2026-09-25 23:58:21 +08:00
parent d4bc10c0f3
commit ff746bdc1a
16 changed files with 418 additions and 513 deletions
+2 -2
View File
@@ -18,7 +18,7 @@ export const builtinModelTools = [
name: 'workspace_rg',
displayName: '搜索工作区',
description:
'使用 GoodBuddy 内置 ripgrep 搜索工作区内容或列出文件,返回带路径和行号的紧凑结果。',
'使用内置 ripgrep 原生参数搜索或列出文件;Ask 限于工作区只读搜索,Execute 使用当前账号权限,长输出可分页续读。',
access: 'read',
group: 'filesystem'
},
@@ -113,7 +113,7 @@ export const builtinModelTools = [
{
name: 'output_read',
displayName: '续读工具输出',
description: '按 cursor 分页读取当前会话已保留的进程或 Subagent 输出;会话释放后失效。',
description: '按 cursor 分页读取当前会话已保留的搜索、进程或 Subagent 输出;会话释放后失效。',
access: 'read',
group: 'programming'
},