Skip to content

windows.run

Runs a registered command (id or alias) in a window, by default the most recently focused one showing the workspace; a <widget>.<…> command of a widget of the shown view in a tab not selected, or a declared tab that window closed, selects the tab and runs once registered (UI-1132); never JavaScript (PRT-124).

/** `windows.run` params (PRT-124). */
export type RunInWindowParams = {
args?: string[];
/** A command id or alias registered in the window (`view.switch`, `view`), run in the global scope. */
command: string;
/** The window; default: the most recently focused window showing `workspaceId` (any window without it). */
windowId?: number | null;
workspaceId?: string | null;
};
/** `windows.run` result (PRT-124). */
export type RanInWindow = {
/** The id of the command the name resolved to. */
command: string;
/** The window that ran it. */
windowId: number;
};