import Tab from '../webapp/tab'; import ExecOptions from '../models/execOptions'; import { CommandLine, CommandOptions, ExecType, KResponse, ParsedOptions } from '../models/command'; export interface CommandStartEvent { tab: Tab; startTime: number; route: string; command: string; execUUID: string; execType: ExecType; execOptions: ExecOptions; echo: boolean; evaluatorOptions: CommandOptions; pipeStages: CommandLine['pipeStages']; /** The output will be redirected to a file; do not display any live output */ redirectDesired: boolean; } export type ResponseType = 'MultiModalResponse' | 'NavResponse' | 'ScalarResponse' | 'Incomplete' | 'Error'; export interface CommandCompleteEvent { tab: Tab; completeTime: number; command: string; argvNoOptions: string[]; parsedOptions: ParsedOptions; execOptions: ExecOptions; pipeStages: CommandLine['pipeStages']; execUUID: string; execType: ExecType; cancelled: boolean; echo: boolean; evaluatorOptions: CommandOptions; response: R; responseType: T; historyIdx: number; } export type CommandStartHandler = (event: CommandStartEvent) => void; export type CommandCompleteHandler = (event: CommandCompleteEvent) => void; /** In order to snapshot an event, we'll need to remember just the tab uuid */ export type SnapshottedEvent = Omit & { tab: E['tab']['uuid']; };