@silo-code/sdk 0.20.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/context-keys.d.ts +18 -3
- package/dist/context-keys.d.ts.map +1 -1
- package/dist/domain-types.d.ts +8 -32
- package/dist/domain-types.d.ts.map +1 -1
- package/dist/editor-service.d.ts +135 -3
- package/dist/editor-service.d.ts.map +1 -1
- package/dist/event.d.ts +28 -0
- package/dist/event.d.ts.map +1 -0
- package/dist/event.js +2 -0
- package/dist/event.js.map +1 -0
- package/dist/extension-storage.d.ts +7 -3
- package/dist/extension-storage.d.ts.map +1 -1
- package/dist/file-service.d.ts +48 -4
- package/dist/file-service.d.ts.map +1 -1
- package/dist/index.d.ts +17 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +17 -5
- package/dist/index.js.map +1 -1
- package/dist/layout-service.d.ts +13 -13
- package/dist/layout-service.d.ts.map +1 -1
- package/dist/network-service.d.ts +70 -4
- package/dist/network-service.d.ts.map +1 -1
- package/dist/network-service.js +35 -1
- package/dist/network-service.js.map +1 -1
- package/dist/path.d.ts +62 -0
- package/dist/path.d.ts.map +1 -0
- package/dist/path.js +150 -0
- package/dist/path.js.map +1 -0
- package/dist/process-service.d.ts +24 -4
- package/dist/process-service.d.ts.map +1 -1
- package/dist/processes-service.d.ts +1 -1
- package/dist/search-service.d.ts +11 -0
- package/dist/search-service.d.ts.map +1 -1
- package/dist/system-service.d.ts +2 -2
- package/dist/terminal-service.d.ts +66 -0
- package/dist/terminal-service.d.ts.map +1 -1
- package/dist/theme-service.d.ts +23 -7
- package/dist/theme-service.d.ts.map +1 -1
- package/dist/types.d.ts +102 -24
- package/dist/types.d.ts.map +1 -1
- package/dist/workspace-service.d.ts +13 -0
- package/dist/workspace-service.d.ts.map +1 -1
- package/package.json +2 -4
- package/src/context-keys.ts +18 -3
- package/src/domain-types.ts +8 -29
- package/src/editor-service.ts +141 -5
- package/src/event.ts +28 -0
- package/src/extension-storage.ts +8 -3
- package/src/file-service.ts +49 -4
- package/src/index.ts +31 -6
- package/src/layout-service.ts +15 -13
- package/src/network-service.ts +85 -4
- package/src/path.test.ts +135 -0
- package/src/path.ts +188 -0
- package/src/process-service.ts +24 -4
- package/src/processes-service.ts +1 -1
- package/src/search-service.ts +11 -0
- package/src/system-service.ts +2 -2
- package/src/terminal-service.ts +71 -0
- package/src/theme-service.ts +23 -7
- package/src/types.ts +104 -25
- package/src/workspace-service.ts +13 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-service.d.ts","sourceRoot":"","sources":["../src/theme-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAK,EACV,SAAS,EACT,SAAS,EACT,WAAW,EACX,WAAW,EACZ,MAAM,gBAAgB,CAAC;AAGxB,YAAY,EACV,SAAS,EACT,SAAS,EACT,WAAW,EACX,WAAW,GACZ,MAAM,gBAAgB,CAAC;AAExB;;;;;;;;;GASG;AACH,MAAM,WAAW,WAAW;IAC1B,oEAAoE;IACpE,EAAE,EAAE,MAAM,CAAC;IACX,8CAA8C;IAC9C,IAAI,EAAE,MAAM,CAAC;IACb,mFAAmF;IACnF,IAAI,EAAE,SAAS,CAAC;IAChB,kDAAkD;IAClD,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC;IAC9B,gFAAgF;IAChF,IAAI,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,SAAS,CAAC;IAChB,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC;IAC9B,IAAI,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;CAC1B;AAED;;;;;;;;;GASG;AACH,MAAM,WAAW,UAAU;IACzB,gEAAgE;IAChE,QAAQ,EAAE,MAAM,CAAC;IACjB,kFAAkF;IAClF,OAAO,EAAE,S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AAU,KAAK,IAAI,GAAG,UAAU,CAAC;IACzD,oFAAoF;IACpF,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,+EAA+E;IAC/E,OAAO,CAAC,EAAE,EAAE,MAAM,GAAG,aAAa,CAAC;IACnC,qEAAqE;IACrE,UAAU,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9C,sEAAsE;IACtE,YAAY,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,qDAAqD;IACrD,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9B,kEAAkE;IAClE,WAAW,CAAC,KAAK,EAAE,WAAW,GAAG,WAAW,CAAC;IAC7C,6EAA6E;IAC7E,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,WAAW,CAAC;IACxC;;;;;;;;;;;;;;;OAeG;IACH,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,UAAU,CAAC;CACjD"}
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The Silo extension API — types
|
|
2
|
+
* The Silo extension API — types-first contract plus a small set of blessed
|
|
3
|
+
* runtime helpers.
|
|
3
4
|
*
|
|
4
5
|
* Everything an extension author can see at compile time lives here (plus the
|
|
5
6
|
* service interfaces in the sibling `*-service` files, which this module
|
|
@@ -8,6 +9,12 @@
|
|
|
8
9
|
* never import the host. This is the VS Code (`vscode.d.ts`) / Obsidian
|
|
9
10
|
* (`obsidian-api`) model.
|
|
10
11
|
*
|
|
12
|
+
* **Runtime exports:** the SDK also ships a small set of blessed runtime
|
|
13
|
+
* helpers (`Tooltip`, `useFocusGroup`, `useServiceState`, `DND_MIME`,
|
|
14
|
+
* `PathDeniedError`, `NetworkError`) and peer-depends on React 19. Changes to
|
|
15
|
+
* these can be breaking even when the types are unchanged — treat them with
|
|
16
|
+
* the same care as the type surface.
|
|
17
|
+
*
|
|
11
18
|
* Start with {@link Extension} (the unit you export) and
|
|
12
19
|
* {@link ExtensionContext} (the `ctx` the host hands you).
|
|
13
20
|
*
|
|
@@ -18,7 +25,6 @@
|
|
|
18
25
|
* @packageDocumentation
|
|
19
26
|
*/
|
|
20
27
|
import type React from "react";
|
|
21
|
-
import type { IDockviewPanelProps } from "dockview";
|
|
22
28
|
import type { ContextKeys } from "./context-keys";
|
|
23
29
|
import type { WorkspaceService } from "./workspace-service";
|
|
24
30
|
import type { EditorService } from "./editor-service";
|
|
@@ -49,24 +55,69 @@ export interface Disposable {
|
|
|
49
55
|
dispose(): void;
|
|
50
56
|
}
|
|
51
57
|
/**
|
|
52
|
-
* The
|
|
53
|
-
* drive the panel's own tab (title, close, focus)
|
|
54
|
-
*
|
|
58
|
+
* The panel API handed to a {@link DockPanelKind} component. Use these methods
|
|
59
|
+
* to drive the panel's own tab (title, close, focus) and update its stored
|
|
60
|
+
* parameters. The host provides the implementation; extensions never construct
|
|
61
|
+
* this object directly.
|
|
55
62
|
*
|
|
56
63
|
* @category Core Types
|
|
57
64
|
* @public
|
|
58
65
|
*/
|
|
59
|
-
export
|
|
66
|
+
export interface DockPanelApi {
|
|
67
|
+
/** Update the title shown in the panel's tab. */
|
|
68
|
+
setTitle(title: string): void;
|
|
69
|
+
/** Programmatically close this panel. */
|
|
70
|
+
close(): void;
|
|
71
|
+
/** Bring this panel to focus (make it the active panel in its group). */
|
|
72
|
+
setActive(): void;
|
|
73
|
+
/** `true` while this panel is the active one in its dock group. */
|
|
74
|
+
readonly isActive: boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Subscribe to active-state transitions. The listener is called whenever
|
|
77
|
+
* the panel gains or loses active status, with an event carrying the new
|
|
78
|
+
* state. Returns a {@link Disposable} that cancels the subscription.
|
|
79
|
+
*/
|
|
80
|
+
onDidActiveChange(listener: (event: {
|
|
81
|
+
readonly isActive: boolean;
|
|
82
|
+
}) => void): Disposable;
|
|
83
|
+
/**
|
|
84
|
+
* `true` while this panel is visible — its tab is the selected one in its
|
|
85
|
+
* group. Distinct from {@link DockPanelApi.isActive | isActive}: with split
|
|
86
|
+
* groups, every group's selected tab is visible but only one panel in the
|
|
87
|
+
* whole dock is active.
|
|
88
|
+
*/
|
|
89
|
+
readonly isVisible: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Subscribe to visibility transitions (the panel's tab being selected or
|
|
92
|
+
* deselected in its group). Use to pause expensive work while hidden, or to
|
|
93
|
+
* re-measure on reveal (e.g. the terminal refits xterm when its tab becomes
|
|
94
|
+
* visible again). Returns a {@link Disposable} that cancels the subscription.
|
|
95
|
+
*/
|
|
96
|
+
onDidVisibilityChange(listener: (event: {
|
|
97
|
+
readonly isVisible: boolean;
|
|
98
|
+
}) => void): Disposable;
|
|
99
|
+
/**
|
|
100
|
+
* Shallow-merge `params` into this panel's stored parameters. Keys absent
|
|
101
|
+
* from `params` are left unchanged. Useful for keeping tabs-serializable
|
|
102
|
+
* state (e.g. the open URL in a web-viewer panel) consistent with the UI.
|
|
103
|
+
*/
|
|
104
|
+
updateParameters(params: object): void;
|
|
105
|
+
}
|
|
60
106
|
/**
|
|
61
107
|
* Props handed to a {@link DockPanelKind} component. Use this type to annotate
|
|
62
|
-
* your component instead of importing
|
|
63
|
-
* directly — the SDK
|
|
64
|
-
*
|
|
108
|
+
* your component instead of importing from the underlying dock framework
|
|
109
|
+
* directly — the SDK owns this surface so extensions remain insulated from
|
|
110
|
+
* host implementation details. The optional generic `T` narrows `params`.
|
|
65
111
|
*
|
|
66
112
|
* @category Core Types
|
|
67
113
|
* @public
|
|
68
114
|
*/
|
|
69
|
-
export
|
|
115
|
+
export interface DockPanelProps<T extends object = Record<string, unknown>> {
|
|
116
|
+
/** The panel API — drives the tab (title, close, focus, params). */
|
|
117
|
+
api: DockPanelApi;
|
|
118
|
+
/** Serializable parameters forwarded to the panel at open time. */
|
|
119
|
+
params: T;
|
|
120
|
+
}
|
|
70
121
|
/**
|
|
71
122
|
* Props passed to an {@link Editor} component. An editor renders the contents of
|
|
72
123
|
* one editor tab (a presenter for a file type — distinct from
|
|
@@ -152,10 +203,10 @@ export interface NewFileTemplate {
|
|
|
152
203
|
}
|
|
153
204
|
/**
|
|
154
205
|
* Declarative metadata about a file extension — the open-ended counterpart to
|
|
155
|
-
*
|
|
156
|
-
* surfaces (and, later, tab/explorer icons) can
|
|
157
|
-
* FileType does not register
|
|
158
|
-
* extension at dispatch time.
|
|
206
|
+
* {@link Editor} (which is purely a presenter/renderer). A single source of
|
|
207
|
+
* truth that "New File" surfaces (and, later, tab/explorer icons) can
|
|
208
|
+
* enumerate. Registering a FileType does not register an Editor; the two are
|
|
209
|
+
* matched independently by extension at dispatch time.
|
|
159
210
|
*
|
|
160
211
|
* @category Registration
|
|
161
212
|
* @public
|
|
@@ -183,8 +234,15 @@ export interface Command {
|
|
|
183
234
|
id: string;
|
|
184
235
|
/** Human-readable label (shown where the command surfaces in UI). */
|
|
185
236
|
label: string;
|
|
186
|
-
/**
|
|
187
|
-
|
|
237
|
+
/**
|
|
238
|
+
* The action. May accept arguments passed through from
|
|
239
|
+
* {@link ExtensionContext.executeCommand} and may return a value (sync or
|
|
240
|
+
* async); `executeCommand` resolves with whatever this returns.
|
|
241
|
+
*
|
|
242
|
+
* Zero-argument, void-returning commands are still valid — `() => void`
|
|
243
|
+
* satisfies this type, so existing registrations compile unchanged.
|
|
244
|
+
*/
|
|
245
|
+
run: (...args: unknown[]) => unknown | Promise<unknown>;
|
|
188
246
|
}
|
|
189
247
|
/**
|
|
190
248
|
* The top-level application menus a {@link MenuItemContribution} can target.
|
|
@@ -306,16 +364,19 @@ export interface SidePanel {
|
|
|
306
364
|
}
|
|
307
365
|
/**
|
|
308
366
|
* Registers a kind of dock panel (a tab that can live in the center dock area,
|
|
309
|
-
* e.g. the terminal). Workspaces open panels of registered kinds by id.
|
|
367
|
+
* e.g. the terminal). Workspaces open panels of registered kinds by id. The
|
|
368
|
+
* optional generic `T` is the shape of the params this kind's panels are
|
|
369
|
+
* opened with — annotate your component with `DockPanelProps<T>` and
|
|
370
|
+
* {@link ExtensionContext.registerDockPanelKind} infers it, no casts needed.
|
|
310
371
|
*
|
|
311
372
|
* @category Registration
|
|
312
373
|
* @public
|
|
313
374
|
*/
|
|
314
|
-
export interface DockPanelKind {
|
|
375
|
+
export interface DockPanelKind<T extends object = Record<string, unknown>> {
|
|
315
376
|
/** Unique id for this panel kind. */
|
|
316
377
|
id: string;
|
|
317
|
-
/** The React component
|
|
318
|
-
component: React.ComponentType<
|
|
378
|
+
/** The React component that renders this panel; receives {@link DockPanelProps}. */
|
|
379
|
+
component: React.ComponentType<DockPanelProps<T>>;
|
|
319
380
|
/**
|
|
320
381
|
* When set, this kind appears as an entry in the center dock's **+** add
|
|
321
382
|
* menu (the per-group header button). Omit to keep the kind internal.
|
|
@@ -442,20 +503,37 @@ export interface ExtensionContext {
|
|
|
442
503
|
registerKeybinding(binding: Keybinding): Disposable;
|
|
443
504
|
/** Register a {@link SidePanel} (a left/right column panel). */
|
|
444
505
|
registerSidePanel(panel: SidePanel): Disposable;
|
|
445
|
-
/**
|
|
446
|
-
|
|
506
|
+
/**
|
|
507
|
+
* Register a {@link DockPanelKind} (a center-dock tab kind). The params
|
|
508
|
+
* generic `T` is inferred from the component's {@link DockPanelProps}
|
|
509
|
+
* annotation, so kinds with typed params register without casts.
|
|
510
|
+
*/
|
|
511
|
+
registerDockPanelKind<T extends object = Record<string, unknown>>(kind: DockPanelKind<T>): Disposable;
|
|
447
512
|
/** Register a {@link StatusItem} (a status-bar widget). */
|
|
448
513
|
registerStatusItem(item: StatusItem): Disposable;
|
|
449
514
|
/** Register a {@link SettingsPage} (a page in the Settings dialog). */
|
|
450
515
|
registerSettingsPage(page: SettingsPage): Disposable;
|
|
451
|
-
/**
|
|
516
|
+
/**
|
|
517
|
+
* Register a {@link ThemePreset} (a selectable theme in the picker).
|
|
518
|
+
* @deprecated Use {@link ThemeService.registerPreset | ctx.theme.registerPreset()} instead.
|
|
519
|
+
* This method will be removed in a future release.
|
|
520
|
+
*/
|
|
452
521
|
registerThemePreset(preset: ThemePreset): Disposable;
|
|
453
522
|
/**
|
|
454
523
|
* Invoke a registered command by id — including commands contributed by
|
|
455
524
|
* other extensions. The minimal "operate" primitive; pairs with the typed
|
|
456
525
|
* services for read access.
|
|
526
|
+
*
|
|
527
|
+
* Optional positional `args` are forwarded to the command's
|
|
528
|
+
* {@link Command.run} function. The returned `Promise` resolves with the
|
|
529
|
+
* command's return value, or rejects if the command throws, is async and
|
|
530
|
+
* rejects, or the id is not registered. Sync commands dispatch synchronously
|
|
531
|
+
* before the promise settles, so callers that read state the command mutates
|
|
532
|
+
* immediately after `await executeCommand(…)` see the updated state.
|
|
533
|
+
*
|
|
534
|
+
* @typeParam T - Expected return type of the command (defaults to `unknown`).
|
|
457
535
|
*/
|
|
458
|
-
executeCommand(id: string):
|
|
536
|
+
executeCommand<T = unknown>(id: string, ...args: unknown[]): Promise<T>;
|
|
459
537
|
/**
|
|
460
538
|
* Consumer API for driving workspace state — create, rename, reorder,
|
|
461
539
|
* activate, soft close/reopen, and hard delete. Subscribe to a frozen
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAA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face WorkspaceService {
|
|
|
159
159
|
createFromFolderPicker(): Promise<Workspace | null>;
|
|
160
160
|
create(input: CreateWorkspaceInput): Workspace;
|
|
161
161
|
rename(id: string, name: string): void;
|
|
162
|
+
/**
|
|
163
|
+
* Move a workspace to a new position relative to a reference workspace.
|
|
164
|
+
* @param from - Id of the workspace being dragged / moved.
|
|
165
|
+
* @param to - Id of the reference workspace (the insertion anchor).
|
|
166
|
+
* @param position - Whether to place `from` before or after `to`.
|
|
167
|
+
*/
|
|
162
168
|
reorder(from: string, to: string, position: "before" | "after"): void;
|
|
163
169
|
/** Activate (and reopen if closed). */
|
|
164
170
|
activate(id: string): void;
|
|
@@ -246,6 +252,13 @@ export interface WorkspaceService {
|
|
|
246
252
|
*
|
|
247
253
|
* The Workspaces panel subscribes internally to re-render when providers
|
|
248
254
|
* are added or removed.
|
|
255
|
+
*
|
|
256
|
+
* **No `invalidateSection` by design.** Unlike status rows and badges, a
|
|
257
|
+
* section is a live React component that re-renders on its own internal or
|
|
258
|
+
* context-driven state changes — it is not a snapshot returned from a
|
|
259
|
+
* `provide()` call, so there is nothing for the host to re-query. If a
|
|
260
|
+
* section needs to trigger a full workspace-panel refresh (rare), it should
|
|
261
|
+
* update its own state directly.
|
|
249
262
|
*/
|
|
250
263
|
subscribeSection(listener: () => void): Disposable;
|
|
251
264
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspace-service.d.ts","sourceRoot":"","sources":["../src/workspace-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAGhD,YAAY,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAEhE;;;;;;GAMG;AACH,MAAM,WAAW,kBAAkB;IACjC,iFAAiF;IACjF,EAAE,EAAE,MAAM,CAAC;IACX,0DAA0D;IAC1D,MAAM,CAAC,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AAQ,EAAE,wBAAwB,GAAG,UAAU,CAAC;IAEhE;;;;;;;;;;;;;;OAcG;IACH,gBAAgB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,UAAU,CAAC;IAEnD;;;;;;;;;;;;;;;;;;;OAmBG;IACH,aAAa,CAAC,QAAQ,EAAE,sBAAsB,GAAG,UAAU,CAAC;IAE5D;;;;OAIG;IACH,SAAS,CAAC,WAAW,EAAE,MAAM,GAAG,cAAc,EAAE,CAAC;IAEjD;;;;;;OAMG;IACH,gBAAgB,IAAI,IAAI,CAAC;IAEzB;;;;OAIG;IACH,eAAe,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,UAAU,CAAC;CACnD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silo-code/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
4
4
|
"description": "The public, types-first SDK for building Silo extensions — the only surface third-party extensions import.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Dave Weaver",
|
|
@@ -36,9 +36,7 @@
|
|
|
36
36
|
"react": "^19.1.0",
|
|
37
37
|
"react-dom": "^19.1.0"
|
|
38
38
|
},
|
|
39
|
-
"dependencies": {
|
|
40
|
-
"dockview": "~6.3.0"
|
|
41
|
-
},
|
|
39
|
+
"dependencies": {},
|
|
42
40
|
"devDependencies": {
|
|
43
41
|
"@types/react": "^19.1.8",
|
|
44
42
|
"@types/react-dom": "^19.1.0",
|
package/src/context-keys.ts
CHANGED
|
@@ -11,8 +11,23 @@
|
|
|
11
11
|
* @public
|
|
12
12
|
*/
|
|
13
13
|
export interface ContextKeys {
|
|
14
|
-
/**
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
/**
|
|
15
|
+
* The {@link Editor.id} of the presenter currently rendering the active dock
|
|
16
|
+
* panel (e.g. `"core.text-editor"`, `"silo.markdown-preview"`), or `null`
|
|
17
|
+
* when the active panel is not an editor. Identifies the *view type*, not the
|
|
18
|
+
* tab instance — see {@link ContextKeys.activeEditorId} for the tab record id.
|
|
19
|
+
*/
|
|
20
|
+
activeEditorViewId: string | null;
|
|
21
|
+
/**
|
|
22
|
+
* The `editorId` of the active editor tab record, or `null` when the active
|
|
23
|
+
* dock panel is not an editor tab. Identifies the *tab instance* — see
|
|
24
|
+
* {@link ContextKeys.activeEditorViewId} for the view-type (presenter) id.
|
|
25
|
+
*/
|
|
17
26
|
activeEditorId: string | null;
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated Use {@link ContextKeys.activeEditorViewId} instead.
|
|
29
|
+
* Kept for one release so extensions compiled against the old SDK continue
|
|
30
|
+
* to receive the correct value at runtime without a silent break.
|
|
31
|
+
*/
|
|
32
|
+
activeViewerId: string | null;
|
|
18
33
|
}
|
package/src/domain-types.ts
CHANGED
|
@@ -104,6 +104,11 @@ export type SidePanelSlot = "left" | "right" | "left-bottom" | "right-bottom";
|
|
|
104
104
|
* A workspace — the unit Silo switches between, keeping its terminals, editors,
|
|
105
105
|
* and layout alive. Read via {@link WorkspaceService}.
|
|
106
106
|
*
|
|
107
|
+
* This is the public surface: it carries the fields an extension needs to read
|
|
108
|
+
* (name, folder, open tabs). Layout, scroll, and panel-state fields are
|
|
109
|
+
* host-internal (`WorkspaceInternal` in `@silo-code/extension-host`) and are
|
|
110
|
+
* intentionally absent here.
|
|
111
|
+
*
|
|
107
112
|
* @category Core Types
|
|
108
113
|
* @public
|
|
109
114
|
*/
|
|
@@ -115,41 +120,15 @@ export interface Workspace {
|
|
|
115
120
|
extraFolders?: string[];
|
|
116
121
|
createdAt: string;
|
|
117
122
|
lastOpenedAt: string;
|
|
118
|
-
terminals: TerminalRecord[];
|
|
119
|
-
/** Editor tabs — text editors and diffs alike (a diff is a record with `mode: "diff"`). */
|
|
120
|
-
editors: EditorRecord[];
|
|
121
|
-
dockLayout: unknown | null;
|
|
122
|
-
/** Scroll positions keyed by editor record ID: { top, left } in pixels. */
|
|
123
|
-
editorScrollPositions?: Record<string, { top: number; left: number }>;
|
|
124
|
-
/**
|
|
125
|
-
* Monaco view states keyed by editor record ID. Each value is the opaque
|
|
126
|
-
* JSON produced by `editor.saveViewState()` — captures cursor position,
|
|
127
|
-
* selection, scroll, and folded regions. Supersedes
|
|
128
|
-
* {@link Workspace.editorScrollPositions} for editors that support it;
|
|
129
|
-
* scroll-only data is kept as a fallback for older persisted workspaces.
|
|
130
|
-
*/
|
|
131
|
-
editorViewStates?: Record<string, unknown>;
|
|
132
123
|
/**
|
|
133
124
|
* ISO timestamp of when the workspace was soft-closed, or null/undefined
|
|
134
125
|
* if the workspace is open. Closed workspaces are hidden from the main
|
|
135
126
|
* list and surfaced in a "reopen" picker.
|
|
136
127
|
*/
|
|
137
128
|
closedAt?: string | null;
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
activeSidePanelTabs?: Record<string, string>;
|
|
142
|
-
sidePanelScrollPositions?: Record<string, number>;
|
|
143
|
-
/** Hidden side panels, keyed by panel id; only an explicit `false` (hidden)
|
|
144
|
-
* is stored, so an absent key means visible (the default). */
|
|
145
|
-
sidePanelVisibility?: Record<string, boolean>;
|
|
146
|
-
extensionState?: Record<string, Record<string, unknown>>;
|
|
147
|
-
/** Whether the left side column is collapsed. Per-workspace. */
|
|
148
|
-
leftPanelCollapsed?: boolean;
|
|
149
|
-
/** Whether the right side column is collapsed. Per-workspace. */
|
|
150
|
-
rightPanelCollapsed?: boolean;
|
|
151
|
-
/** ID of the current preview (temporary) editor, if any. */
|
|
152
|
-
previewEditorId?: string | null;
|
|
129
|
+
terminals: readonly TerminalRecord[];
|
|
130
|
+
/** Editor tabs — text editors and diffs alike (a diff is a record with `mode: "diff"`). */
|
|
131
|
+
editors: readonly EditorRecord[];
|
|
153
132
|
}
|
|
154
133
|
|
|
155
134
|
/**
|
package/src/editor-service.ts
CHANGED
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import type { Disposable } from "./types";
|
|
2
|
+
import type { Event } from "./event";
|
|
3
|
+
import type { EditorMode } from "./domain-types";
|
|
2
4
|
|
|
3
5
|
// `ctx.editors` — the editor & document domain (public contract). Opening files
|
|
4
|
-
// into editor tabs, the active-editor save/close commands,
|
|
5
|
-
// provider registry. The host implementation
|
|
6
|
+
// into editor tabs, the active-editor save/close commands, the diff-content
|
|
7
|
+
// provider registry, and reactive active-editor state. The host implementation
|
|
8
|
+
// lives in the extension host.
|
|
6
9
|
|
|
7
10
|
/**
|
|
8
11
|
* Options for the editor open methods.
|
|
@@ -65,7 +68,7 @@ export interface EditorViewInfo {
|
|
|
65
68
|
}
|
|
66
69
|
|
|
67
70
|
/**
|
|
68
|
-
* Save callbacks an editor
|
|
71
|
+
* Save callbacks an editor registers via
|
|
69
72
|
* {@link EditorService.registerSaveHandler}, so the active-editor `save` /
|
|
70
73
|
* `saveAs` commands can dispatch to whichever editor is focused.
|
|
71
74
|
*
|
|
@@ -143,11 +146,78 @@ export type DiffContentProvider = (
|
|
|
143
146
|
request: DiffContentRequest,
|
|
144
147
|
) => Promise<DiffContent>;
|
|
145
148
|
|
|
149
|
+
/**
|
|
150
|
+
* A point-in-time snapshot of the focused editor tab. Part of
|
|
151
|
+
* {@link EditorsState}, returned by {@link EditorService.getState} and
|
|
152
|
+
* delivered to {@link EditorService.subscribe} listeners.
|
|
153
|
+
*
|
|
154
|
+
* @category Consumer Services
|
|
155
|
+
* @public
|
|
156
|
+
*/
|
|
157
|
+
export interface ActiveEditorInfo {
|
|
158
|
+
/** The focused editor tab's record id — matches {@link EditorRecord.id}. */
|
|
159
|
+
editorId: string;
|
|
160
|
+
/**
|
|
161
|
+
* The absolute file path of the focused tab, or `null` for an untitled
|
|
162
|
+
* buffer.
|
|
163
|
+
*/
|
|
164
|
+
filePath: string | null;
|
|
165
|
+
/**
|
|
166
|
+
* The {@link Editor.id} of the presenter rendering the tab
|
|
167
|
+
* (e.g. `"core.text-editor"`, `"silo.markdown-preview"`). Empty string
|
|
168
|
+
* when the presenter could not be resolved (rare: editor registered after
|
|
169
|
+
* the tab was opened).
|
|
170
|
+
*/
|
|
171
|
+
viewId: string;
|
|
172
|
+
/** Whether the tab is in text or diff mode. */
|
|
173
|
+
mode: EditorMode;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* A frozen, referentially-stable snapshot of editor domain state. Returned by
|
|
178
|
+
* {@link EditorService.getState} and delivered to
|
|
179
|
+
* {@link EditorService.subscribe} listeners.
|
|
180
|
+
*
|
|
181
|
+
* Compatible with `useServiceState` — just pass `ctx.editors` directly.
|
|
182
|
+
*
|
|
183
|
+
* @category Consumer Services
|
|
184
|
+
* @public
|
|
185
|
+
*/
|
|
186
|
+
export interface EditorsState {
|
|
187
|
+
/**
|
|
188
|
+
* The focused editor tab, or `null` when the active dock panel is not an
|
|
189
|
+
* editor tab (e.g. a terminal, a dock panel kind, or nothing at all).
|
|
190
|
+
*/
|
|
191
|
+
active: ActiveEditorInfo | null;
|
|
192
|
+
/**
|
|
193
|
+
* `true` once the persisted workspace state has loaded from disk. Matches
|
|
194
|
+
* `WorkspaceState.hydrated` — guard state-restoring code on this flag.
|
|
195
|
+
*/
|
|
196
|
+
hydrated: boolean;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Payload delivered to {@link EditorService.onDidSave} listeners after an
|
|
201
|
+
* editor tab's contents are written to disk.
|
|
202
|
+
*
|
|
203
|
+
* @category Consumer Services
|
|
204
|
+
* @public
|
|
205
|
+
*/
|
|
206
|
+
export interface EditorSaveEvent {
|
|
207
|
+
/** The saved tab's editor record id — matches {@link EditorRecord.id}. */
|
|
208
|
+
editorId: string;
|
|
209
|
+
/**
|
|
210
|
+
* Absolute path the contents were written to. For a save-as (or first save
|
|
211
|
+
* of an untitled buffer) this is the newly chosen path, not the old one.
|
|
212
|
+
*/
|
|
213
|
+
filePath: string;
|
|
214
|
+
}
|
|
215
|
+
|
|
146
216
|
/**
|
|
147
217
|
* The editor & document domain, exposed as {@link ExtensionContext.editors}.
|
|
148
218
|
* Open files into editor tabs, drive the active editor (save / close), and let
|
|
149
|
-
*
|
|
150
|
-
*
|
|
219
|
+
* editors register save handlers. The single entry point for opening editors —
|
|
220
|
+
* prefer it over reaching into workspace/editor state.
|
|
151
221
|
*
|
|
152
222
|
* @category Consumer Services
|
|
153
223
|
* @public
|
|
@@ -211,4 +281,70 @@ export interface EditorService {
|
|
|
211
281
|
providerId: string,
|
|
212
282
|
provider: DiffContentProvider,
|
|
213
283
|
): Disposable;
|
|
284
|
+
/**
|
|
285
|
+
* The current buffer text of an open editor tab, including unsaved edits.
|
|
286
|
+
*
|
|
287
|
+
* Resolves `undefined` when the tab isn't text-backed (e.g. the image
|
|
288
|
+
* viewer) or hasn't mounted yet — a lazy-mounted dock panel is **not**
|
|
289
|
+
* force-mounted to read its text. It is async precisely because the text
|
|
290
|
+
* lives in the mounted editor component, not in host state.
|
|
291
|
+
*
|
|
292
|
+
* @example
|
|
293
|
+
* ```ts
|
|
294
|
+
* const text = await ctx.editors.getText(editorId);
|
|
295
|
+
* if (text !== undefined) ctx.log.info(`${text.length} chars`);
|
|
296
|
+
* ```
|
|
297
|
+
*/
|
|
298
|
+
getText(editorId: string): Promise<string | undefined>;
|
|
299
|
+
/**
|
|
300
|
+
* Whether an open editor tab has unsaved changes. Returns `false` for an
|
|
301
|
+
* unknown id or a tab that isn't mounted / text-backed.
|
|
302
|
+
*/
|
|
303
|
+
isDirty(editorId: string): boolean;
|
|
304
|
+
/**
|
|
305
|
+
* Fires after an editor tab's contents are saved to disk — a formatter,
|
|
306
|
+
* linter, or build-on-save extension's entry point. See {@link Event}.
|
|
307
|
+
*
|
|
308
|
+
* @example
|
|
309
|
+
* ```ts
|
|
310
|
+
* ctx.subscriptions.push(
|
|
311
|
+
* ctx.editors.onDidSave(({ editorId, filePath }) => {
|
|
312
|
+
* ctx.log.info(`saved ${filePath}`);
|
|
313
|
+
* }),
|
|
314
|
+
* );
|
|
315
|
+
* ```
|
|
316
|
+
*/
|
|
317
|
+
onDidSave: Event<EditorSaveEvent>;
|
|
318
|
+
/**
|
|
319
|
+
* Current frozen snapshot of editor state. The returned object is
|
|
320
|
+
* referentially stable between renders — `getState() === getState()` when
|
|
321
|
+
* nothing has changed, which satisfies `useSyncExternalStore`'s contract and
|
|
322
|
+
* means `useServiceState(ctx.editors)` works without extra memoization.
|
|
323
|
+
*
|
|
324
|
+
* @example
|
|
325
|
+
* ```ts
|
|
326
|
+
* const { active } = ctx.editors.getState();
|
|
327
|
+
* if (active) ctx.log.info(`Active file: ${active.filePath ?? "(untitled)"}`);
|
|
328
|
+
* ```
|
|
329
|
+
*/
|
|
330
|
+
getState(): EditorsState;
|
|
331
|
+
/**
|
|
332
|
+
* Subscribe to changes in the active editor. The listener is called whenever
|
|
333
|
+
* `active` changes (tab focus moves, workspace switches, editor opens or
|
|
334
|
+
* closes) or `hydrated` flips. Returns a {@link Disposable} that cancels the
|
|
335
|
+
* subscription.
|
|
336
|
+
*
|
|
337
|
+
* Use `useServiceState(ctx.editors)` in React components instead of calling
|
|
338
|
+
* `subscribe` directly — it wraps `getState` + `subscribe` for you.
|
|
339
|
+
*
|
|
340
|
+
* @example
|
|
341
|
+
* ```ts
|
|
342
|
+
* ctx.subscriptions.push(
|
|
343
|
+
* ctx.editors.subscribe(({ active }) => {
|
|
344
|
+
* statusItem.setTitle(active?.filePath ?? "No file");
|
|
345
|
+
* }),
|
|
346
|
+
* );
|
|
347
|
+
* ```
|
|
348
|
+
*/
|
|
349
|
+
subscribe(listener: (state: EditorsState) => void): Disposable;
|
|
214
350
|
}
|
package/src/event.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { Disposable } from "./types";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* A subscribable event: call it with a listener and receive a
|
|
5
|
+
* {@link Disposable} that cancels the subscription. Modeled on VS Code's
|
|
6
|
+
* `Event<T>` convention.
|
|
7
|
+
*
|
|
8
|
+
* Services that emit events expose a member typed as `Event<T>` — the
|
|
9
|
+
* consuming extension calls it directly and pushes the returned disposable
|
|
10
|
+
* onto `ctx.subscriptions`:
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* ctx.subscriptions.push(
|
|
15
|
+
* ctx.editors.onDidSave(({ editorId, filePath }) => {
|
|
16
|
+
* console.log("saved", filePath);
|
|
17
|
+
* }),
|
|
18
|
+
* );
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* **Host-side:** the matching emitter (`EventEmitter<T>`) lives in the
|
|
22
|
+
* extension-host package (not the SDK). Only the subscribable `Event<T>` type
|
|
23
|
+
* is public — extensions never construct emitters.
|
|
24
|
+
*
|
|
25
|
+
* @category Core Types
|
|
26
|
+
* @public
|
|
27
|
+
*/
|
|
28
|
+
export type Event<T> = (listener: (e: T) => void) => Disposable;
|
package/src/extension-storage.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { Disposable } from "./types";
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Namespaced, persisted key/value storage handed to extensions. Two scopes are
|
|
3
5
|
* exposed on {@link ExtensionContext.storage} ({@link ExtensionStorageScopes}):
|
|
@@ -24,10 +26,13 @@ export interface ExtensionStorage {
|
|
|
24
26
|
/**
|
|
25
27
|
* Subscribe to changes in this namespace. Called when a value in this
|
|
26
28
|
* namespace changes, when the underlying app state finishes hydrating, and
|
|
27
|
-
* (for the workspace scope) when the active workspace changes.
|
|
28
|
-
*
|
|
29
|
+
* (for the workspace scope) when the active workspace changes.
|
|
30
|
+
*
|
|
31
|
+
* Returns a {@link Disposable} — call `.dispose()` to unsubscribe, or push
|
|
32
|
+
* it onto `ctx.subscriptions` for automatic teardown. Consistent with every
|
|
33
|
+
* other subscription in the SDK.
|
|
29
34
|
*/
|
|
30
|
-
subscribe(listener: () => void):
|
|
35
|
+
subscribe(listener: () => void): Disposable;
|
|
31
36
|
}
|
|
32
37
|
|
|
33
38
|
/**
|