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
@@ -1,4 +1,5 @@
import { spawn } from 'node:child_process';
import { getAgentLaunchCommand } from '@/agent/agentLaunchCommand';
import type { CursorModelsResponse, CursorModelSummary } from '@hapi/protocol/apiTypes';
import {
releaseAgentCliSpawnLeaseSync,
@@ -226,7 +227,7 @@ async function runCursorModelProbe(): Promise<ListCursorModelsResponse> {
};
return await new Promise((resolve, reject) => {
const child = spawn('agent', ['--list-models'], {
const child = spawn(getAgentLaunchCommand('cursor'), ['--list-models'], {
env: process.env,
stdio: ['ignore', 'pipe', 'pipe'],
shell: process.platform === 'win32',