or run

npx @tessl/cli init
Log in

Version

Files

tile.json

task.mdevals/scenario-3/

Multi-Pane Analysis Workspace

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.

Capabilities

Arrange workspace layout

  • Invoking 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. @test
  • Documents are opened through the host workspace's standard document-opening commands so they appear with the usual toolbars and status. @test
  • If the requested panes are already open, createLayout reuses them without duplicating tabs and re-focuses the primary document. @test

Persist and restore layout

  • Calling saveLayout 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. @test
  • Calling restoreLayout 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. @test

Implementation

@generates

API

export 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;

Dependencies { .dependencies }

jupyterlab { .dependency }

Provides a multi-document workspace shell with tabbed/split panels, document opening commands, and layout persistence.