Interface: MenuContext
Defined in: packages/sdk/src/types.ts:348
The typed context object each MenuSurface passes to an invoked command (as its first argument) and to the contribution's when / checked predicates. The contract is per-surface and closed: a flat, serializable object — never a DOM event or host component internals.
The "workspace" surface is unique in passing the full Workspace rather than a lightweight derived object — workspace actions typically need the workspace's metadata (id, folder, name) wholesale.
Properties
explorer/item
explorer/item: object;Defined in: packages/sdk/src/types.ts:349
path
path: string;isDir
isDir: boolean;workspaceId
workspaceId: string;editor/tab
editor/tab: object;Defined in: packages/sdk/src/types.ts:350
editorId
editorId: string;filePath
filePath: string | null;viewId
viewId: string;terminal/tab
terminal/tab: object;Defined in: packages/sdk/src/types.ts:351
terminalId
terminalId: string;workspaceId
workspaceId: string;terminal/link
terminal/link: object;Defined in: packages/sdk/src/types.ts:359
The right-clicked link's kind ("url" for OSC-8/WebLinksAddon-detected links, "path" for Silo's own file-path provider) and its literal text (the URL or path string), alongside which terminal it was found in. See ADR 0027 for the shared link contract this surface hooks into.
terminalId
terminalId: string;kind
kind: "url" | "path";text
text: string;workspace
workspace: Workspace;Defined in: packages/sdk/src/types.ts:360