feat(session): validate agents and browse workspace directories

This commit is contained in:
weishu
2026-08-25 16:12:29 +08:00
parent a04275b51d
commit e5a8212f4a
77 changed files with 3409 additions and 312 deletions
+2 -1
View File
@@ -2,6 +2,7 @@ import { createServer } from 'node:net';
import { AcpSdkBackend } from '@/agent/backends/acp';
import { buildOpencodeEnv } from './config';
import { getInvokedCwd } from '@/utils/invokedCwd';
import { getAgentLaunchCommand } from '@/agent/agentLaunchCommand';
function filterEnv(env: NodeJS.ProcessEnv): Record<string, string> {
const result: Record<string, string> = {};
@@ -61,7 +62,7 @@ export function createOpencodeBackend(opts: {
}
return new AcpSdkBackend({
command: 'opencode',
command: getAgentLaunchCommand('opencode'),
args,
env: filterEnv(env),
textChunkMode: 'delta',