From 5e744dabfe74ad09d4d72dbe60a5f5beec8af3c1 Mon Sep 17 00:00:00 2001 From: Josh Spicer <23246594+joshspicer@users.noreply.github.com> Date: Sat, 14 Feb 2026 09:35:43 -0800 Subject: [PATCH] fix: hygiene - replace unicode box-drawing and em-dash characters in copilotSdkHost --- src/vs/platform/copilotSdk/node/copilotSdkHost.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/vs/platform/copilotSdk/node/copilotSdkHost.ts b/src/vs/platform/copilotSdk/node/copilotSdkHost.ts index 23d59541f66..9afe382251b 100644 --- a/src/vs/platform/copilotSdk/node/copilotSdkHost.ts +++ b/src/vs/platform/copilotSdk/node/copilotSdkHost.ts @@ -67,12 +67,10 @@ class CopilotSdkHost extends Disposable implements ICopilotSdkService { throw importErr; } - // ┌──────────────────────────────────────────────────────────────┐ - // │ IMPORTANT: The CLI binary MUST come from the bundled │ - // │ @github/copilot-{platform}-{arch} package. Do NOT use │ - // │ PATH discovery, execFileSync, or any external binary. │ - // │ This must work in a signed, ASAR-packed release build. │ - // └──────────────────────────────────────────────────────────────┘ + // IMPORTANT: The CLI binary MUST come from the bundled + // @github/copilot-{platform}-{arch} package. Do NOT use + // PATH discovery, execFileSync, or any external binary. + // This must work in a signed, ASAR-packed release build. let cliPath: string | undefined; try { const { fileURLToPath } = await import('node:url'); @@ -106,7 +104,7 @@ class CopilotSdkHost extends Disposable implements ICopilotSdkService { } cliEnv[key] = value; } - // Tell the CLI to use stdio mode (no pty needed — avoids code signing issues) + // Tell the CLI to use stdio mode (no pty needed - avoids code signing issues) cliEnv['COPILOT_AGENT_DISABLE_PTY'] = '1'; // Ensure the CLI doesn't inherit the Electron app's hardened runtime constraints delete cliEnv['__CFBundleIdentifier']; @@ -134,7 +132,7 @@ class CopilotSdkHost extends Disposable implements ICopilotSdkService { // Log state transitions for debugging the "Connection is disposed" issue process.stderr.write(`[SDK-DEBUG] Starting client with cliPath=${cliPath ?? 'default'}\n`); try { - // Add a timeout — if start() hangs for more than 30s, something is wrong + // Add a timeout - if start() hangs for more than 30s, something is wrong const startPromise = this._client.start(); const timeoutPromise = new Promise((_, reject) => setTimeout(() => reject(new Error('SDK client.start() timed out after 30 seconds')), 30000)