Agenthost server fixes

This commit is contained in:
Rob Lourens
2026-03-12 10:04:33 -07:00
parent cb51cb4ac3
commit f063b42ea4
2 changed files with 8 additions and 1 deletions

View File

@@ -41,7 +41,7 @@ function startServer(programArgs) {
'out',
'vs',
'platform',
'agent',
'agentHost',
'node',
'agentHostServerMain.js',
);

View File

@@ -6,6 +6,13 @@
// Standalone agent host server with WebSocket protocol transport.
// Start with: node out/vs/platform/agentHost/node/agentHostServerMain.js [--port <port>] [--enable-mock-agent]
import { fileURLToPath } from 'url';
// This standalone process isn't bootstrapped via bootstrap-esm.ts, so we must
// set _VSCODE_FILE_ROOT ourselves so that FileAccess can resolve module paths.
// This file lives at out/vs/platform/agentHost/node/ - the root is `out/`.
globalThis._VSCODE_FILE_ROOT = fileURLToPath(new URL('../../../..', import.meta.url));
import { DisposableStore } from '../../../base/common/lifecycle.js';
import { URI } from '../../../base/common/uri.js';
import { localize } from '../../../nls.js';