evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
A lightweight workspace helper that arranges a primary document, a secondary reference file, and a live console into a repeatable, multi-pane layout and persists/restores that layout.
createLayout with file paths opens the primary document as a main tab, splits the secondary document to the right of it, and docks a console beneath the split pair so all three panes are visible in the main area. @testcreateLayout reuses them without duplicating tabs and re-focuses the primary document. @testsaveLayout captures the current main-area arrangement (including tab order and split geometry) using the workspace's layout snapshot mechanism, stores it under a stable key, and returns the saved snapshot. @testrestoreLayout reloads the stored snapshot, recreates the three-pane arrangement, and focuses the primary document when present; it returns false and leaves the current layout unchanged if no snapshot is stored. @testexport type WorkspacePaths = {
primary: string;
secondary: string;
console: string;
};
export interface WorkspaceLayoutSnapshot {
id: string;
data: unknown;
}
export interface WorkspaceStorage {
load(key: string): Promise<WorkspaceLayoutSnapshot | null>;
save(key: string, snapshot: WorkspaceLayoutSnapshot): Promise<void>;
}
export interface WorkspaceController {
createLayout(paths: WorkspacePaths): Promise<void>;
focusPrimary(): void;
saveLayout(): Promise<WorkspaceLayoutSnapshot | null>;
restoreLayout(): Promise<boolean>;
}
export function createWorkspaceController(options: {
storage: WorkspaceStorage;
layoutKey?: string;
}): WorkspaceController;Provides a multi-document workspace shell with tabbed/split panels, document opening commands, and layout persistence.