Fix: Set OPENCODE_CALLER env in a more portable way for vscode extension (#2230)

This commit is contained in:
Aurélien Tollard 2025-09-27 16:36:24 +02:00 committed by GitHub
parent c7e5d29109
commit 4b429029df
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -53,11 +53,12 @@ export function activate(context: vscode.ExtensionContext) {
},
env: {
_EXTENSION_OPENCODE_PORT: port.toString(),
OPENCODE_CALLER: "vscode",
},
})
terminal.show()
terminal.sendText(`OPENCODE_CALLER=vscode opencode --port ${port}`)
terminal.sendText(`opencode --port ${port}`)
const fileRef = getActiveFile()
if (!fileRef) return