Fix: Set OPENCODE_CALLER env in a more portable way for vscode extension (#2230)
Some checks are pending
deploy / deploy (push) Waiting to run
format / format (push) Waiting to run
snapshot / publish (push) Waiting to run
test / test (push) Waiting to run

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