Interface: EditorRecord
Defined in: packages/sdk/src/domain-types.ts:58
An editor tab record in a workspace — a text editor or a diff.
Properties
id
id: string;Defined in: packages/sdk/src/domain-types.ts:59
filePath
filePath: string | null;Defined in: packages/sdk/src/domain-types.ts:61
null for an untitled buffer that hasn't been saved yet.
title
title: string;Defined in: packages/sdk/src/domain-types.ts:62
isPreview?
optional isPreview?: boolean;Defined in: packages/sdk/src/domain-types.ts:64
When true, the tab is a temporary preview that gets replaced by the next single-click open.
mode?
optional mode?: EditorMode;Defined in: packages/sdk/src/domain-types.ts:70
Which mode this record renders in. Absent ⇒ "text". A "diff" record additionally carries EditorRecord.providerId/EditorRecord.args and always has a non-null filePath.
providerId?
optional providerId?: string;Defined in: packages/sdk/src/domain-types.ts:76
Diff mode only: which registered diff-content provider resolves the two sides (e.g. "silo.git"). The diff is content-agnostic — the provider owns what the two sides contain.
args?
optional args?: Record<string, unknown>;Defined in: packages/sdk/src/domain-types.ts:81
Diff mode only: serializable args the provider needs to (re)compute content on mount / restart.
viewType?
optional viewType?: string;Defined in: packages/sdk/src/domain-types.ts:92
The chosen editor view for this tab, referencing an Editor.id (e.g. "text", "silo.markdown-preview"). Absent ⇒ the host renders the highest-priority matching editor (the default). Honored only when the referenced editor is still registered and still matches the file; otherwise the host falls back to priority resolution (so a stale value left by an uninstalled extension never breaks the tab). Orthogonal to EditorRecord.mode: viewType selects among "text"-mode editors; a "diff" record ignores it.