summaryrefslogtreecommitdiffhomepage
path: root/sdks
diff options
context:
space:
mode:
authorDax Raad <[email protected]>2025-11-08 20:21:02 -0500
committerDax Raad <[email protected]>2025-11-08 20:21:02 -0500
commit4d20e1c3c6207cf6731ad8db9f92caf4ef31cb99 (patch)
tree1c0b14810b8919e0d9dba022384da876717f8e2e /sdks
parent4bb7ea91271e85621a1394c70867ddc26be45631 (diff)
parent969af4d54122b727d7251b2977f617424d08e4cb (diff)
downloadopencode-4d20e1c3c6207cf6731ad8db9f92caf4ef31cb99.tar.gz
opencode-4d20e1c3c6207cf6731ad8db9f92caf4ef31cb99.zip
Merge remote-tracking branch 'origin/dev' into dev
Diffstat (limited to 'sdks')
-rw-r--r--sdks/vscode/package.json2
-rw-r--r--sdks/vscode/src/extension.ts67
2 files changed, 30 insertions, 39 deletions
diff --git a/sdks/vscode/package.json b/sdks/vscode/package.json
index 17afb3e4b..13a3536a1 100644
--- a/sdks/vscode/package.json
+++ b/sdks/vscode/package.json
@@ -2,7 +2,7 @@
"name": "opencode",
"displayName": "opencode",
"description": "opencode for VS Code",
- "version": "1.0.44",
+ "version": "1.0.46",
"publisher": "sst-dev",
"repository": {
"type": "git",
diff --git a/sdks/vscode/src/extension.ts b/sdks/vscode/src/extension.ts
index 2f90229d5..63d8d332e 100644
--- a/sdks/vscode/src/extension.ts
+++ b/sdks/vscode/src/extension.ts
@@ -6,48 +6,39 @@ import * as vscode from "vscode"
const TERMINAL_NAME = "opencode"
export function activate(context: vscode.ExtensionContext) {
- let openNewTerminalDisposable = vscode.commands.registerCommand(
- "opencode.openNewTerminal",
- async () => {
- await openTerminal()
- },
- )
-
- let openTerminalDisposable = vscode.commands.registerCommand(
- "opencode.openTerminal",
- async () => {
- // An opencode terminal already exists => focus it
- const existingTerminal = vscode.window.terminals.find((t) => t.name === TERMINAL_NAME)
- if (existingTerminal) {
- existingTerminal.show()
- return
- }
+ let openNewTerminalDisposable = vscode.commands.registerCommand("opencode.openNewTerminal", async () => {
+ await openTerminal()
+ })
+
+ let openTerminalDisposable = vscode.commands.registerCommand("opencode.openTerminal", async () => {
+ // An opencode terminal already exists => focus it
+ const existingTerminal = vscode.window.terminals.find((t) => t.name === TERMINAL_NAME)
+ if (existingTerminal) {
+ existingTerminal.show()
+ return
+ }
- await openTerminal()
- },
- )
+ await openTerminal()
+ })
- let addFilepathDisposable = vscode.commands.registerCommand(
- "opencode.addFilepathToTerminal",
- async () => {
- const fileRef = getActiveFile()
- if (!fileRef) {
- return
- }
+ let addFilepathDisposable = vscode.commands.registerCommand("opencode.addFilepathToTerminal", async () => {
+ const fileRef = getActiveFile()
+ if (!fileRef) {
+ return
+ }
- const terminal = vscode.window.activeTerminal
- if (!terminal) {
- return
- }
+ const terminal = vscode.window.activeTerminal
+ if (!terminal) {
+ return
+ }
- if (terminal.name === TERMINAL_NAME) {
- // @ts-ignore
- const port = terminal.creationOptions.env?.["_EXTENSION_OPENCODE_PORT"]
- port ? await appendPrompt(parseInt(port), fileRef) : terminal.sendText(fileRef)
- terminal.show()
- }
- },
- )
+ if (terminal.name === TERMINAL_NAME) {
+ // @ts-ignore
+ const port = terminal.creationOptions.env?.["_EXTENSION_OPENCODE_PORT"]
+ port ? await appendPrompt(parseInt(port), fileRef) : terminal.sendText(fileRef)
+ terminal.show()
+ }
+ })
context.subscriptions.push(openTerminalDisposable, addFilepathDisposable)