fix: clean up OpenCode streams and allow external working directories
Completed OpenCode requests left their event streams open across repeated and parallel conversations. Each request now closes its own subscription on exit without cancelling peer sessions, and cancellation preserves its original cause. Direct-model Execute commands no longer restrict cwd to the workspace. Absolute paths, parent-relative paths, and symlinks to external directories are accepted. The workspace remains the default and relative-path base; Ask stays read-only, and local execution binding, directory validation, and process cleanup remain. Add real OpenCode lifecycle and real Shell tool-loop regressions, plus matching feature documentation. Focused checks: 182 passed, 1 skipped; typecheck and lint passed. Full shared-worktree suite: 3542 passed, 57 skipped, 1 unrelated sidebar heading failure, reproduced separately and documented. Release note: 修复 OpenCode 连续及并行对话结束后事件连接未释放的问题;直连模型 Execute 命令现在可直接指定工作区外的绝对路径、相对路径或符号链接目录,Ask 只读边界保持不变。
This commit is contained in:
@@ -1217,7 +1217,7 @@ export class ModelToolProvider implements ModelToolProviderLike {
|
||||
scopeKey: 'model:builtin:process_execute',
|
||||
title: '允许运行项目命令?',
|
||||
description:
|
||||
'该命令会在当前工作区中使用当前用户权限运行,并可访问该账号有权访问的主机资源。',
|
||||
'该命令会在指定目录(默认当前工作区)中使用当前用户权限运行,并可访问该账号有权访问的主机资源。',
|
||||
toolName: tool.displayName,
|
||||
argumentSummary,
|
||||
allowPermanent: false
|
||||
|
||||
Reference in New Issue
Block a user