optimize: terminal spawn lifecycle to eliminate output race condition
Move PTY spawn from context layer to view layer so event subscription happens before spawn, preventing loss of initial terminal output. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1265,11 +1265,13 @@ export async function gitCommitBranches(
|
||||
|
||||
export async function terminalSpawn(
|
||||
workingDir: string,
|
||||
initialCommand?: string
|
||||
initialCommand?: string,
|
||||
terminalId?: string
|
||||
): Promise<string> {
|
||||
return getTransport().call("terminal_spawn", {
|
||||
workingDir,
|
||||
initialCommand: initialCommand ?? null,
|
||||
terminalId: terminalId ?? null,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user