mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-04-03 15:43:45 +00:00
fix(app): terminal improvements - focus, rename, error state, CSP (#9700)
This commit is contained in:
committed by
GitHub
parent
259b2a3c2d
commit
87d91c29e2
@@ -102,7 +102,12 @@ export namespace Pty {
|
||||
}
|
||||
|
||||
const cwd = input.cwd || Instance.directory
|
||||
const env = { ...process.env, ...input.env, TERM: "xterm-256color" } as Record<string, string>
|
||||
const env = {
|
||||
...process.env,
|
||||
...input.env,
|
||||
TERM: "xterm-256color",
|
||||
OPENCODE_TERMINAL: "1",
|
||||
} as Record<string, string>
|
||||
log.info("creating session", { id, cmd: command, args, cwd })
|
||||
|
||||
const spawn = await pty()
|
||||
@@ -146,6 +151,10 @@ export namespace Pty {
|
||||
ptyProcess.onExit(({ exitCode }) => {
|
||||
log.info("session exited", { id, exitCode })
|
||||
session.info.status = "exited"
|
||||
for (const ws of session.subscribers) {
|
||||
ws.close()
|
||||
}
|
||||
session.subscribers.clear()
|
||||
Bus.publish(Event.Exited, { id, exitCode })
|
||||
for (const ws of session.subscribers) {
|
||||
ws.close()
|
||||
|
||||
Reference in New Issue
Block a user