Fix terminal worker state mirroring
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import type { TerminalExitInfo, ServerMessage, ClientMessage } from "./terminal.js";
|
||||
import type { TerminalState } from "../shared/messages.js";
|
||||
import type { CaptureTerminalLinesResult } from "./terminal.js";
|
||||
|
||||
export interface WorkerTerminalInfo {
|
||||
id: string;
|
||||
@@ -51,6 +52,14 @@ export type TerminalWorkerRequest =
|
||||
terminalId: string;
|
||||
options?: WorkerKillAndWaitOptions;
|
||||
}
|
||||
| {
|
||||
type: "captureTerminal";
|
||||
requestId: string;
|
||||
terminalId: string;
|
||||
start?: number;
|
||||
end?: number;
|
||||
stripAnsi?: boolean;
|
||||
}
|
||||
| {
|
||||
type: "listDirectories";
|
||||
requestId: string;
|
||||
@@ -96,6 +105,11 @@ export type TerminalWorkerEvent =
|
||||
terminalId: string;
|
||||
message: ServerMessage;
|
||||
}
|
||||
| {
|
||||
type: "terminalStateUpdated";
|
||||
terminalId: string;
|
||||
state: TerminalState;
|
||||
}
|
||||
| {
|
||||
type: "terminalExit";
|
||||
terminalId: string;
|
||||
@@ -120,3 +134,5 @@ export type TerminalWorkerEvent =
|
||||
};
|
||||
|
||||
export type TerminalWorkerToParentMessage = TerminalWorkerResponse | TerminalWorkerEvent;
|
||||
|
||||
export type TerminalWorkerCaptureResult = CaptureTerminalLinesResult;
|
||||
|
||||
Reference in New Issue
Block a user