mirror of
https://github.com/stablyai/orca.git
synced 2026-11-18 11:54:46 +00:00
The appearance methods first shipped in v1.4.251 and editor.readTypography in v1.4.257, so a plugin requiring the old floors installed on Orca that lacks them.
3.1 KiB
3.1 KiB
Events
Worker events
List each in contributes.events ({ "on": "<event>" }), with main, the trusted-worker profile and the capability shown; then orca.events.on(event, handler) in activate(orca) returns { dispose() }. Payloads:
workspace.created(capabilityworkspace:read; since 1.4.245): A worktree workspace was created;workspaceListId(host API 1.7) is the idworkspace.listgives it.{ workspaceId: string; workspaceListId?: string; kind: "worktree" | "folder"; path: string; branch: string }workspace.removed(capabilityworkspace:read; since 1.4.245): A worktree workspace was removed;workspaceListId(host API 1.7) is the idworkspace.listgave it.{ workspaceId: string; workspaceListId?: string; kind: "worktree" | "folder"; path: string }agent.status.changed(capabilityagent:read; since 1.4.160): An agent in a terminal pane changed status;workspaceIdis null when Orca cannot tie the pane to a workspace,workspaceListId(host API 1.7) is the idworkspace.listgives that workspace,terminalIdnames its terminal when Orca lists it, andsessionId(host API 1.8) is whatagent.resumetakes.{ workspaceId: string | null; workspaceListId?: string; paneKey: string; terminalId?: string; title?: string; state: "working" | "blocked" | "waiting" | "done"; receivedAt: number; mainAgent?: { state: "working" | "blocked" | "waiting" | "done"; outcome?: "success" | "failure" | "cancellation" | "superseded" | "interruption" | "unconfirmed"; stateStartedAt: number }; sessionId?: string }workspace.changed(capabilityworkspace:read; since 1.4.246): The focused workspace changed, or its terminals were opened, closed or renamed;contextis whatworkspace.readContextnow answers, itsworkspaceIdincluded. Each new subscriber first gets the current context.{ context: { workspaceId?: string; branch: string; displayName: string; terminals: { id: string; title?: string }[] } | null }editor.typography.changed(no capability; since 1.4.257): What Orca's file editor uses changed (a setting or the editor zoom); the payload is whateditor.readTypographynow answers. Needs no capability.{ fontFamily: string; cssFontFamily: string; fontSize: number; fontWeight: string; lineHeight: number; fontLigatures: boolean; wordWrap: "on" | "off"; minimap: boolean }
Frame events (orca.on(event, handler) in HTML panels and custom editors)
theme: FrameTheme: The--orca-*variables and thelight/darkclass on<html>already changed.'editor.document': EditorDocument: Custom editors: a new document;orca.document.onDidChangeis the usual way to listen.'editor.flush': undefined: Custom editors: post pending edits before a save; Orca waits for a returned promise.
Components panel events (on(event, handler) from orca)
theme: { colorScheme: 'light' | 'dark' }- Every worker event above, with the same payload and capability; a panel needs no
contributes.eventsentry, it subscribes while it is open. HTML panels get them onorca.ontoo.