feat: allow users to set cwd (#1480)
This commit is contained in:
@@ -363,6 +363,8 @@ export interface TerminalSpawnCommand {
|
|||||||
terminal_id: string;
|
terminal_id: string;
|
||||||
cols: number;
|
cols: number;
|
||||||
rows: number;
|
rows: number;
|
||||||
|
/** Agent's current working directory. Falls back to bootWorkingDirectory if absent. */
|
||||||
|
cwd?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface TerminalInputCommand {
|
export interface TerminalInputCommand {
|
||||||
|
|||||||
@@ -1018,7 +1018,11 @@ async function connectWithRetry(
|
|||||||
|
|
||||||
// ── Terminal commands (no runtime scope required) ──────────────────
|
// ── Terminal commands (no runtime scope required) ──────────────────
|
||||||
if (parsed.type === "terminal_spawn") {
|
if (parsed.type === "terminal_spawn") {
|
||||||
handleTerminalSpawn(parsed, socket, runtime.bootWorkingDirectory);
|
handleTerminalSpawn(
|
||||||
|
parsed,
|
||||||
|
socket,
|
||||||
|
parsed.cwd ?? runtime.bootWorkingDirectory,
|
||||||
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user