This commit was merged in pull request #68.
This commit is contained in:
@@ -64,6 +64,25 @@ export async function runEditTurn(
|
||||
providerId: "claude-code",
|
||||
modelId,
|
||||
systemPrompt: SYSTEM_PROMPT,
|
||||
// The claude-code provider spawns the bundled `claude` CLI. On macOS, when
|
||||
// that process is launched from inside VS Code it performs IDE auto-connect,
|
||||
// which shells out to `osascript` (`tell application …`) to identify/activate
|
||||
// the editor — raising the macOS "control other applications" (Apple Events)
|
||||
// permission prompt (#59). We only consume the turn's text result and never
|
||||
// use the IDE connection, so we disable it: `CLAUDE_CODE_AUTO_CONNECT_IDE=0`
|
||||
// hard-returns out of the auto-connect path in the binary, and
|
||||
// `CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL=1` skips the extension-install deep link.
|
||||
// Seeding with the full `process.env` keeps the default inheritance intact
|
||||
// (login under HOME, proxy/CA vars) — we only add the two switches. The
|
||||
// provider forwards `options.env` into the spawned child (verified end to end
|
||||
// through @cline/sdk → ai-sdk-provider-claude-code → @anthropic-ai/claude-agent-sdk).
|
||||
options: {
|
||||
env: {
|
||||
...process.env,
|
||||
CLAUDE_CODE_AUTO_CONNECT_IDE: "0",
|
||||
CLAUDE_CODE_IDE_SKIP_AUTO_INSTALL: "1",
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
// Stream reduced progress snapshots out (INV-44 additive) and wire cancellation
|
||||
|
||||
Reference in New Issue
Block a user