summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAdam <[email protected]>2025-12-15 13:09:13 -0600
committerAdam <[email protected]>2025-12-15 13:09:13 -0600
commitc4f63824df58457e1f84aff0b4c057272615e4ca (patch)
tree9ab478e2fa1ceb64082b386e3c11d5b8d4cb81cb
parent4236744fb5787010d8f930e0599db78d2b58a57f (diff)
downloadopencode-c4f63824df58457e1f84aff0b4c057272615e4ca.tar.gz
opencode-c4f63824df58457e1f84aff0b4c057272615e4ca.zip
fix: terminal in desktop
-rw-r--r--packages/opencode/src/pty/index.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/opencode/src/pty/index.ts b/packages/opencode/src/pty/index.ts
index d192eaf1f..5ea479c63 100644
--- a/packages/opencode/src/pty/index.ts
+++ b/packages/opencode/src/pty/index.ts
@@ -114,8 +114,12 @@ export namespace Pty {
const id = Identifier.create("pty", false)
const command = input.command || Shell.preferred()
const args = input.args || []
+ if (command.endsWith("sh")) {
+ args.push("-l")
+ }
+
const cwd = input.cwd || Instance.directory
- const env = { ...process.env, ...input.env } as Record<string, string>
+ const env = { ...process.env, ...input.env, TERM: "xterm-256color" } as Record<string, string>
log.info("creating session", { id, cmd: command, args, cwd })
const spawn = await pty()