Execute a user-initiated `!` shell command (silent — does not prompt the * model). Resolves with the command's stdout/stderr for immediate display. * Pass `commandId` to receive live `shell.output` events for this command.
(
command: string,
options?: { commandId?: string },
)
| 113 | * model). Resolves with the command's stdout/stderr for immediate display. |
| 114 | * Pass `commandId` to receive live `shell.output` events for this command. */ |
| 115 | async runShellCommand( |
| 116 | command: string, |
| 117 | options?: { commandId?: string }, |
| 118 | ): Promise<{ stdout: string; stderr: string; isError?: boolean; backgrounded?: boolean }> { |
| 119 | this.ensureOpen(); |
| 120 | return this.rpc.runShellCommand({ |
| 121 | sessionId: this.id, |
| 122 | command, |
| 123 | commandId: options?.commandId, |
| 124 | }); |
| 125 | } |
| 126 | |
| 127 | /** Cancel a running `!` shell command by its commandId (e.g. on Esc / Ctrl+C). */ |
| 128 | async cancelShellCommand(commandId: string): Promise<void> { |
no test coverage detected