Skip to content

Commit 6596d0b

Browse files
feat(Wind): Add Language, Tree, and Model IPC channels
Extend the IPC channel registry in Channel.ts with new command constants required for editor UI interactions. Introduce channels for Language features (`ProvideInlineCompletions`), Tree View management (`GetChildren`, `Reveal`, `SelectionChanged`, `CollapseElement`, `ExpandElement`, `VisibilityChanged`), and Model updates (`UpdateContent`). Simultaneously, correct a stub implementation in TauriMainProcessService.ts. The `createWorker` entry in `utilityProcessWorker` was incorrectly wrapped in an object, causing a silent hang in `DiskFileSystemProvider` when the workbench awaited a non-thenable value. Refactor it to return a direct `Promise` to match the lockstep copy in the Output component. These changes align the IPC layer with upcoming workbench service implementations and resolve a critical blocking issue in the worker lifecycle.
1 parent 961046f commit 6596d0b

2 files changed

Lines changed: 24 additions & 1 deletion

File tree

Source/IPC/Channel.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,25 @@ export default {
424424

425425
GitIsAvailable: "git:isAvailable",
426426

427+
// --- Language features ---
428+
LanguageProvideInlineCompletions: "language:provideInlineCompletions",
429+
430+
// --- Tree view ---
431+
TreeGetChildren: "tree:getChildren",
432+
433+
TreeReveal: "tree:reveal",
434+
435+
TreeSelectionChanged: "tree:selectionChanged",
436+
437+
TreeCollapseElement: "tree:collapseElement",
438+
439+
TreeExpandElement: "tree:expandElement",
440+
441+
TreeVisibilityChanged: "tree:visibilityChanged",
442+
443+
// --- Model ---
444+
ModelUpdateContent: "model:updateContent",
445+
427446
// --- SCM ---
428447
ScmCreateSourceControl: "scm:createSourceControl",
429448

Source/Service/TauriMainProcessService.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,11 @@ const StubChannels: Record<string, Record<string, unknown>> = {
233233
sharedProcess: {},
234234

235235
utilityProcessWorker: {
236-
createWorker: { onDidTerminate: new Promise(() => {}) },
236+
// createWorker must be a Promise (not an object wrapping one).
237+
// The workbench calls .then() directly on the return value; wrapping
238+
// in { onDidTerminate } made it a non-thenable causing a silent hang
239+
// in DiskFileSystemProvider. Matches Output's lockstep copy.
240+
createWorker: new Promise(() => {}),
237241

238242
disposeWorker: undefined,
239243
},

0 commit comments

Comments
 (0)