@tano.page/workbench 0.15.0 → 0.16.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.
Files changed (118) hide show
  1. package/package.json +35 -14
  2. package/src/App.vue +68 -797
  3. package/src/assistant/agent-identities.ts +1 -97
  4. package/src/assistant/agent-task-context.ts +1 -54
  5. package/src/assistant/attachments.ts +1 -1
  6. package/src/assistant/completion.ts +1 -61
  7. package/src/assistant/components/AssistantPanel.vue +1 -1
  8. package/src/assistant/connection-actions.ts +237 -0
  9. package/src/assistant/document-mentions.ts +1 -33
  10. package/src/assistant/engine.ts +1 -585
  11. package/src/assistant/execution.ts +6 -33
  12. package/src/assistant/hash.ts +1 -4
  13. package/src/assistant/language.ts +10 -37
  14. package/src/assistant/plugin-bridge-builder.ts +146 -0
  15. package/src/assistant/prompts.ts +1 -65
  16. package/src/assistant/proposal-actions.ts +336 -0
  17. package/src/assistant/store.ts +87 -554
  18. package/src/assistant/structures.ts +1 -157
  19. package/src/assistant/tasks.ts +8 -94
  20. package/src/assistant/tool-rules.ts +1 -7
  21. package/src/composables/use-workbench-help.ts +177 -0
  22. package/src/composables/use-workbench-lifecycle.ts +249 -0
  23. package/src/composables/use-workbench-settings.ts +185 -0
  24. package/src/composables/use-workbench-shortcuts.ts +37 -1022
  25. package/src/composables/use-workbench-views.ts +325 -0
  26. package/src/documents/components/DocumentActionMenu.vue +279 -0
  27. package/src/documents/components/DocumentInspector.vue +168 -0
  28. package/src/documents/components/DocumentPane.vue +482 -0
  29. package/src/documents/description-merge.ts +1 -9
  30. package/src/files/components/FileMetadataPanel.vue +49 -15
  31. package/src/i18n/locale-catalogs.ts +7 -6
  32. package/src/i18n/locale-registry.ts +8 -6
  33. package/src/i18n/locales/de-DE.json +23 -1
  34. package/src/i18n/locales/en-US.json +23 -1
  35. package/src/i18n/locales/es-ES.json +23 -1
  36. package/src/i18n/locales/ja-JP.json +23 -1
  37. package/src/i18n/locales/zh-TW.json +23 -1
  38. package/src/mail/components/MailAccountDialog.vue +1 -0
  39. package/src/mail/components/MailComposerDialog.vue +1 -0
  40. package/src/mail/components/MailWorkspaceView.vue +1 -0
  41. package/src/mail/components/SidebarMail.vue +1 -0
  42. package/src/objects/content-references.ts +6 -56
  43. package/src/objects/wiki-links.ts +1 -48
  44. package/src/objects/workspace-objects.ts +2 -3
  45. package/src/plans/calendar.ts +2 -2
  46. package/src/plans/components/CalendarAgendaView.vue +165 -0
  47. package/src/plans/components/CalendarFilterBar.vue +128 -0
  48. package/src/plans/components/CalendarMonthView.vue +224 -0
  49. package/src/plans/components/CalendarQuickCreateDialog.vue +269 -0
  50. package/src/plans/components/CalendarTimelineView.vue +517 -0
  51. package/src/plans/components/CalendarTopbarControls.vue +101 -0
  52. package/src/plans/components/CalendarView.vue +162 -2106
  53. package/src/plans/components/CalendarYearView.vue +138 -0
  54. package/src/plans/components/PlanConnectionsDialog.vue +1 -1
  55. package/src/plans/components/calendar-shared.css +192 -0
  56. package/src/plans/composables/use-calendar-interactions.ts +396 -0
  57. package/src/plans/composables/use-calendar-scroll.ts +420 -0
  58. package/src/plugins/components/PluginDetailPage.vue +10 -6
  59. package/src/plugins/components/PluginDeveloperArea.vue +192 -0
  60. package/src/plugins/components/PluginExplorer.vue +6 -4
  61. package/src/plugins/components/PluginImportDialog.vue +1 -1
  62. package/src/plugins/components/PluginInstaller.vue +269 -178
  63. package/src/plugins/components/PluginMaintenance.vue +37 -49
  64. package/src/plugins/components/PluginRepositoryStorage.vue +4 -2
  65. package/src/plugins/components/PluginSettingsForm.vue +2 -1
  66. package/src/plugins/components/PluginsTabPage.vue +61 -0
  67. package/src/plugins/components/plugin-center.css +5 -0
  68. package/src/plugins/data.ts +9 -86
  69. package/src/plugins/editor-plugin-adapters.ts +169 -0
  70. package/src/plugins/plugin-data.ts +2 -3
  71. package/src/plugins/plugin-rpc-router.ts +558 -0
  72. package/src/plugins/plugin-sdk.ts +1 -260
  73. package/src/plugins/plugin-ui-dialogs.ts +167 -0
  74. package/src/plugins/queries.ts +1 -75
  75. package/src/plugins/view-header.ts +2 -7
  76. package/src/runtime.ts +3 -2
  77. package/src/settings/components/SettingsPanel.vue +8 -3
  78. package/src/settings/components/WorkbenchSettings.vue +20 -7
  79. package/src/settings/components/settings-context.ts +1 -1
  80. package/src/settings/settings-tab.ts +1 -0
  81. package/src/shell/command-palette.ts +3 -3
  82. package/src/shell/components/EditorToolbar.vue +8 -9
  83. package/src/shell/components/EditorTools.vue +1 -5
  84. package/src/shell/components/PaneTopbar.vue +393 -0
  85. package/src/shell/components/SelectionToolbar.vue +0 -2
  86. package/src/shell/components/WorkbenchContextMenus.vue +37 -26
  87. package/src/shell/components/WorkbenchModals.vue +22 -18
  88. package/src/shell/components/WorkbenchPanes.vue +358 -1512
  89. package/src/shell/components/WorkbenchSidebar.vue +486 -0
  90. package/src/shell/pane-registry.ts +69 -0
  91. package/src/shell/use-surface-dismissal.ts +219 -0
  92. package/src/shell/use-workbench-commands.ts +599 -0
  93. package/src/shell/use-workbench-keybindings.ts +337 -0
  94. package/src/shell/use-workbench.ts +488 -1081
  95. package/src/shell/workbench-context.ts +30 -3
  96. package/src/stores/workspace-document-io.ts +807 -0
  97. package/src/stores/workspace-file-ops.ts +1 -1
  98. package/src/stores/workspace-knowledge.ts +1 -1
  99. package/src/stores/workspace-lifecycle.ts +459 -0
  100. package/src/stores/workspace-plugins-state.ts +71 -599
  101. package/src/stores/workspace-session.ts +287 -0
  102. package/src/stores/workspace-tabs-layout.ts +1 -1
  103. package/src/stores/workspace-types.ts +50 -0
  104. package/src/stores/workspace.ts +163 -1345
  105. package/src/styles.css +0 -1
  106. package/src/tabs/components/DesktopTabs.vue +19 -11
  107. package/src/windows/AuxiliaryWindows.vue +2 -2
  108. package/src/windows/use-window-event-bridge.ts +152 -0
  109. package/src/workspace/components/TemplateLibrary.vue +1 -1
  110. package/src/workspace/components/WorkspaceIconPicker.vue +5 -4
  111. package/src/workspace/components/WorkspacePickerMenu.vue +317 -0
  112. package/src/assistant/locales/de-DE.json +0 -129
  113. package/src/assistant/locales/en-US.json +0 -129
  114. package/src/assistant/locales/es-ES.json +0 -129
  115. package/src/assistant/locales/ja-JP.json +0 -129
  116. package/src/assistant/locales/zh-CN.json +0 -129
  117. package/src/assistant/locales/zh-TW.json +0 -129
  118. package/src/assistant/task-prompts.json +0 -39
@@ -1,8 +1,6 @@
1
1
  import {
2
2
  computed,
3
3
  nextTick,
4
- onBeforeUnmount,
5
- onMounted,
6
4
  provide,
7
5
  ref,
8
6
  shallowReactive,
@@ -10,23 +8,13 @@ import {
10
8
  watch,
11
9
  } from 'vue';
12
10
  import { storeToRefs } from 'pinia';
13
- import { Bot, Mail, Settings2 } from 'lucide-vue-next';
14
- import { isFeatureEnabled } from '../features';
15
- import { MAIL_TAB_ID } from '../mail/types';
16
11
  import { version as appVersion } from '../../package.json';
17
- import { defaultSelectionContext } from '@tano/editor/selection-context';
18
12
  import {
19
13
  fileHandlers,
20
- isDataTableFilePath,
21
- isMarkdown,
22
14
  isObjectPath,
23
15
  isPlanObject,
24
16
  isPlanObjectType,
25
- isWorkspaceInternalPath,
26
- parentPath,
27
- relativeWorkspaceReference,
28
17
  resolveReference,
29
- safeRemoteImage,
30
18
  type FileEntry,
31
19
  type ReferenceIdentity,
32
20
  } from '@tano/protocol';
@@ -34,59 +22,45 @@ import { native } from '../workspace/adapter';
34
22
  import { agentInboxKey, useAgentInboxController } from '../assistant/agent-controller';
35
23
  import { butterflyScope } from '../assistant/butterfly';
36
24
  import { butterflyPerchDirective, provideButterflyController } from '../assistant/butterfly-vue';
37
- import { ASSISTANT_TAB_ID, openAssistantPage } from '../assistant/navigation';
38
25
  import { useAssistantStore, useInlineAssistantStore } from '../assistant/store';
39
26
  import type { AttachmentStatusUpdate } from '../files/attachment-status';
40
- import { nativeAttachments, openExternalUrl } from '../files/attachments';
41
- import { CALENDAR_TAB_ID } from '../plans/calendar';
27
+ import { nativeAttachments } from '../files/attachments';
28
+ import type FileTree from '../files/components/FileTree.vue';
42
29
  import type { ImportRecord } from '../workspace/components/ImportPanel.vue';
43
30
  import { useDocumentActions } from '../composables/use-document-actions';
44
31
  import { useFileTreeController } from '../composables/use-file-tree-controller';
45
32
  import { useInlineAssistant } from '../composables/use-inline-assistant';
46
- import { useWorkbenchCalendar } from '../composables/use-workbench-calendar';
33
+ import { useWorkbenchHelp } from '../composables/use-workbench-help';
47
34
  import { useWorkbenchHistory } from '../composables/use-workbench-history';
35
+ import { useWorkbenchLifecycle } from '../composables/use-workbench-lifecycle';
48
36
  import { useWorkbenchModals } from '../composables/use-workbench-modals';
49
37
  import { useWorkbenchOutline } from '../composables/use-workbench-outline';
50
38
  import { useWorkbenchPreferences } from '../composables/use-workbench-preferences';
39
+ import { useWorkbenchSettings } from '../composables/use-workbench-settings';
51
40
  import { useWorkbenchShortcuts } from '../composables/use-workbench-shortcuts';
52
- import { isTableTab, tableFileId } from '../data-tables/data-tables';
41
+ import { useWorkbenchViews } from '../composables/use-workbench-views';
42
+ import { isTableTab } from '../data-tables/data-tables';
53
43
  import { appearanceText } from '../documents/document-appearance';
54
44
  import { useDocumentFavicon } from '../documents/document-favicon';
55
- import { GRAPH_TAB_ID } from '../documents/document-graph';
56
- import type { HelpAvailability, HelpContext } from '../help/help-content';
57
- import { t, uiLocale } from '../i18n/i18n';
45
+ import { t } from '../i18n/i18n';
58
46
  import { planKey } from '../plans/personal-plans';
59
- import { expandRecurringPlans } from '../plans/recurrence';
60
- import { LocalReminderScheduler } from '../plans/local-reminders';
47
+ import { planDocumentSource } from '../plans/selection-todo';
61
48
  import { mobile } from '../platform/platform';
62
- import { nativeListen as listen } from '../platform/native-bridge';
63
- import { pluginPreviewStatus, pluginViewHeader } from '../plugins/view-header';
64
49
  import {
65
50
  createLocalExtensions,
66
51
  useWorkbenchRuntime,
67
52
  type WorkbenchActions,
68
- type WorkbenchViewTab,
69
53
  } from '../runtime';
70
- import { planDocumentSource } from '../plans/selection-todo';
71
- import { readSettingsPage } from '../settings/settings-preference';
72
- import type { SettingsPageId } from '../settings/settings-window';
73
- import { shortcutAriaLabel, shortcutKeys } from './shortcuts';
74
54
  import { usePlanSyncStore } from '../stores/plan-sync';
75
55
  import { usePlanStore } from '../stores/plans';
76
56
  import { useSuggestionStore } from '../stores/suggestions';
77
57
  import { useUpdatesStore } from '../stores/updates';
78
58
  import { useWorkspaceStore } from '../stores/workspace';
79
- import { useViewport } from './viewport';
59
+ import type { ObjectRecord } from '../objects/workspace-objects';
80
60
  import { useWindowContext } from '../windows/context';
81
61
  import { useAuxiliaryWindows } from '../windows/manager';
82
- import {
83
- resolvePluginSidebar,
84
- useWorkbenchNavigation,
85
- type WorkspaceSidebarView,
86
- } from './workbench-navigation';
62
+ import { useViewport } from './viewport';
87
63
  import { retainWorkbenchSession } from './workbench-session';
88
- import type { ObjectRecord } from '../objects/workspace-objects';
89
- import { PLUGINS_TAB_ID } from '../plugins/workspace-plugins';
90
64
 
91
65
  export interface WorkbenchProps {
92
66
  initialWorkspace?: string;
@@ -130,7 +104,6 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
130
104
  watch(agentInbox.error, (error) => {
131
105
  if (error) store.report(error);
132
106
  });
133
- // Keep the panel mounted until its closing transition releases the layout space.
134
107
  const assistantPanelMounted = ref(assistant.opened);
135
108
  watch(
136
109
  () => assistant.opened,
@@ -178,7 +151,6 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
178
151
 
179
152
  const plans = usePlanStore();
180
153
  usePlanSyncStore();
181
- // Document tabs belong to the desktop app. Mobile and web use page navigation.
182
154
  const tabsEnabled = native && !mobile;
183
155
  const { width: viewportWidth, touch: touchLayout, compact: compactPanes } = useViewport(mobile);
184
156
  const isAuxiliaryWindow = false;
@@ -188,7 +160,6 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
188
160
  const workspaceAdapter = useWorkbenchRuntime().adapter;
189
161
  const documentationBaseUrl = useWorkbenchRuntime().documentationBaseUrl;
190
162
  const extensions = useWorkbenchRuntime().extensions?.() ?? createLocalExtensions();
191
- const extensionViews = extensions.views ?? [];
192
163
  const editing = extensions.editing;
193
164
 
194
165
  const { workspace, active, activeId, activities, fatal, busy } = storeToRefs(store);
@@ -230,33 +201,6 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
230
201
  if (compact) sidebar.value = false;
231
202
  });
232
203
 
233
- // Navigation & view tabs
234
- const SETTINGS_TAB_ID = 'view:settings';
235
- const settingsTabView: WorkbenchViewTab = {
236
- id: SETTINGS_TAB_ID,
237
- get label() {
238
- return t('设置');
239
- },
240
- icon: Settings2,
241
- scope: 'account',
242
- detachable: true,
243
- };
244
- const mailEnabled = isFeatureEnabled('desktopMailClient') && native && !mobile;
245
- const mailTabView: WorkbenchViewTab = {
246
- id: MAIL_TAB_ID,
247
- get label() {
248
- return t('邮箱');
249
- },
250
- icon: Mail,
251
- scope: 'account',
252
- detachable: false,
253
- };
254
- store.registerViews([
255
- ...extensionViews,
256
- settingsTabView,
257
- ...(mailEnabled ? [mailTabView] : []),
258
- { id: ASSISTANT_TAB_ID, label: t('助手'), icon: Bot },
259
- ]);
260
204
  store.setBeforeWorkspaceChange(async () => {
261
205
  if (!(await auxiliaryWindows.closeAll()))
262
206
  throw new Error(t('还有未保存的修改,请先处理保存错误。'));
@@ -264,322 +208,31 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
264
208
  await inlineRunner.settle();
265
209
  await agentInbox.settle();
266
210
  });
267
- const activeExtensionView = computed(() =>
268
- extensionViews.find((view) => view.id === store.activeId),
269
- );
270
- watch(
271
- activeExtensionView,
272
- (view) => {
273
- if (view?.collapseSidebarOnOpen) sidebar.value = false;
274
- },
275
- { immediate: true },
276
- );
277
-
278
- const navigation = useWorkbenchNavigation(
279
- () => store.workspace?.id,
280
- isAuxiliaryWindow
281
- ? undefined
282
- : {
283
- getItem: (key) => localStorage.getItem(key),
284
- setItem: (key, value) => localStorage.setItem(key, value),
285
- },
286
- );
287
- const { context: navigationContext, module: navigationModule, workspaceView, sidebarView } =
288
- navigation;
289
- let personalPlanScope: typeof plans.view = 'all';
290
- // Migrate the former workspace plan mode to the workspace view switcher.
291
- watch(
292
- [navigationContext, navigationModule],
293
- ([context, module]) => {
294
- if (context === 'workspace' && module === 'plan') navigation.selectWorkspaceView('events');
295
- },
296
- { immediate: true },
297
- );
298
211
 
299
- const homeContent = ref<string>();
300
- const homeExtension = computed(() =>
301
- extensionViews.find((view) => view.id === homeContent.value),
302
- );
303
-
304
- const calendar = useWorkbenchCalendar({
212
+ // Views, sidebar navigation, calendar & toolbar visibility items
213
+ const views = useWorkbenchViews({
305
214
  store,
306
215
  plans,
307
- navigationContext,
308
- navigationModule,
309
- sidebarView,
310
- homeContent,
216
+ extensions,
217
+ attachments,
218
+ isAuxiliaryWindow,
311
219
  compactPanes,
312
220
  sidebar,
313
- selectModule: (id) => selectModule(id),
314
- });
315
-
316
- function selectContext(context: 'home' | 'workspace') {
317
- calendar.rememberCalendar();
318
- if (navigationContext.value === 'home') personalPlanScope = plans.view;
319
- navigation.selectContext(context);
320
- plans.view = navigationContext.value === 'home' ? personalPlanScope : 'workspace';
321
- calendar.restoreCalendar();
322
- workspaceMenu.value = false;
323
- }
324
- watch(navigationContext, (context) => {
325
- plans.view = context === 'home' ? personalPlanScope : 'workspace';
326
- });
327
- function selectWorkspaceView(id: string) {
328
- calendar.rememberCalendar();
329
- if (navigationContext.value === 'home') personalPlanScope = plans.view;
330
- navigation.selectWorkspaceView(id as WorkspaceSidebarView);
331
- calendar.restoreCalendar();
332
- if (id === 'events') plans.view = 'workspace';
333
- }
334
- function selectModule(id: string) {
335
- calendar.rememberCalendar();
336
- if (navigationContext.value === 'home') personalPlanScope = plans.view;
337
- if (id === 'plan' && navigationContext.value === 'workspace')
338
- navigation.selectWorkspaceView('events');
339
- else navigation.selectModule(id);
340
- calendar.restoreCalendar();
341
- plans.view = navigationContext.value === 'home' ? personalPlanScope : 'workspace';
342
- sidebar.value = true;
343
- }
344
- watch(
345
- () => store.activePluginSidebar,
346
- (key) => {
347
- if (key) {
348
- sidebarView.value = `plugin-sidebar:${key}`;
349
- sidebar.value = true;
350
- }
351
- },
352
- );
353
- watch(
354
- [
355
- () => store.workspaceLoading.plugins || store.installedPluginWorkspace !== store.workspace?.id,
356
- () => store.pluginViews,
357
- sidebarView,
358
- ],
359
- ([loading, views, current]) => {
360
- const resolved = resolvePluginSidebar(current, loading, views);
361
- if (resolved !== current) sidebarView.value = resolved;
362
- },
363
- );
364
- watch(sidebarView, (current) => {
365
- if (store.activePluginSidebar && current !== `plugin-sidebar:${store.activePluginSidebar}`)
366
- store.activePluginSidebar = '';
221
+ workspaceMenu,
222
+ openSettings: (page) => settingsCtrl.openSettings(page),
367
223
  });
368
- watch(
369
- () => store.pluginSettingsRequest,
370
- (request) => {
371
- if (request) openSettings(request.key);
372
- },
373
- );
374
-
375
- function openExtensionView(id: string) {
376
- if (navigationContext.value === 'home') personalPlanScope = plans.view;
377
- calendar.rememberCalendar();
378
- if (extensionViews.find((view) => view.id === id)?.sidebar) navigation.openInHome(id);
379
- else navigation.selectContext('home');
380
- calendar.restoreCalendar();
381
- if (!store.workspace) homeContent.value = id;
382
- else store.openViewTab(id);
383
- if (compactPanes.value) sidebar.value = false;
384
- }
385
-
386
- const viewActions = Object.fromEntries(
387
- extensionViews.map((view) => [
388
- view.id,
389
- {
390
- open: () => {
391
- openExtensionView(view.id);
392
- if (compactPanes.value) sidebar.value = false;
393
- },
394
- showSidebar: () => {
395
- selectModule(view.id);
396
- sidebar.value = true;
397
- },
398
- },
399
- ]),
400
- );
401
-
402
- function openMail() {
403
- if (!mailEnabled) return;
404
- if (navigationContext.value === 'home') personalPlanScope = plans.view;
405
- calendar.rememberCalendar();
406
- navigation.openInHome(MAIL_TAB_ID);
407
- calendar.restoreCalendar();
408
- if (!store.workspace) homeContent.value = MAIL_TAB_ID;
409
- else store.openViewTab(MAIL_TAB_ID);
410
- if (compactPanes.value) sidebar.value = false;
411
- }
412
- watch(
413
- () => navigation.homeModule.value,
414
- (mod) => {
415
- if (!mailEnabled && mod === MAIL_TAB_ID) navigation.homeModule.value = 'plan';
416
- },
417
- { immediate: true },
418
- );
419
-
420
- // Header / toolbar visibility item descriptors
421
- const sidebarNavigationItems = computed(() => [
422
- {
423
- id: 'plan',
424
- get label() {
425
- return t('计划');
426
- },
427
- },
428
- ...(mailEnabled
429
- ? [
430
- {
431
- id: MAIL_TAB_ID,
432
- get label() {
433
- return t('邮箱');
434
- },
435
- },
436
- ]
437
- : []),
438
- ...extensionViews
439
- .filter((view) => view.sidebar)
440
- .map((view) => ({ id: view.id, label: view.label })),
441
- ]);
442
- const sidebarHeaderItems = computed(() => [
443
- ...(navigationModule.value === 'workspace'
444
- ? [
445
- {
446
- id: 'search',
447
- get label() {
448
- return t('查找文档');
449
- },
450
- },
451
- ...(store.workspaceSettings.showGraph
452
- ? [
453
- {
454
- id: 'graph',
455
- get label() {
456
- return t('关系图谱');
457
- },
458
- },
459
- ]
460
- : []),
461
- ]
462
- : []),
463
- ...extensionViews
464
- .filter((view) => view.header)
465
- .map((view) => ({ id: view.id, label: view.label })),
466
- ]);
467
- const repositoryActionItems = computed(() => [
468
- {
469
- id: 'create',
470
- get label() {
471
- return t('新建文档');
472
- },
473
- },
474
- {
475
- id: 'folder',
476
- get label() {
477
- return t('新建文件夹');
478
- },
479
- },
480
- ]);
481
- const documentToolItems = [
482
- {
483
- id: 'markdown-reveal',
484
- get label() {
485
- return t('光标展开源码');
486
- },
487
- },
488
- {
489
- id: 'source-mode',
490
- get label() {
491
- return t('源码模式');
492
- },
493
- },
494
- ];
495
- const topbarItems = [
496
- {
497
- id: 'breadcrumb',
498
- get label() {
499
- return t('面包屑');
500
- },
501
- },
502
- ];
503
- const calendarToolItems = [
504
- {
505
- id: 'calendar-period',
506
- get label() {
507
- return t('日历日期');
508
- },
509
- },
510
- {
511
- id: 'calendar-today',
512
- get label() {
513
- return t('今天');
514
- },
515
- },
516
- {
517
- id: 'calendar-previous',
518
- get label() {
519
- return t('上一时段');
520
- },
521
- },
522
- {
523
- id: 'calendar-next',
524
- get label() {
525
- return t('下一时段');
526
- },
527
- },
528
- {
529
- id: 'calendar-mode',
530
- get label() {
531
- return t('日历视图');
532
- },
533
- },
534
- {
535
- id: 'calendar-events',
536
- get label() {
537
- return t('已归档事项');
538
- },
539
- },
540
- ];
541
- function topbarVisibilityItems(tabId: string, hasDocument: boolean, activePane: boolean) {
542
- return [
543
- ...topbarItems.filter(
544
- (item) => item.id !== 'breadcrumb' || (tabId !== CALENDAR_TAB_ID && tabId !== GRAPH_TAB_ID),
545
- ),
546
- ...(hasDocument || tabId.startsWith('attachment:')
547
- ? [
548
- {
549
- id: 'document-status',
550
- get label() {
551
- return t('文章状态');
552
- },
553
- },
554
- ]
555
- : []),
556
- ...(activePane && extensions.regions['editing-status']
557
- ? [
558
- {
559
- id: 'editing-status',
560
- get label() {
561
- return t('同步状态');
562
- },
563
- },
564
- ]
565
- : []),
566
- ...(tabId === CALENDAR_TAB_ID ? calendarToolItems : []),
567
- ...(tabId.startsWith('attachment:') && attachments
568
- ? [
569
- {
570
- id: 'attachment-export',
571
- get label() {
572
- return t('导出附件');
573
- },
574
- },
575
- ]
576
- : []),
577
- ...(hasDocument ? documentToolItems : []),
578
- ].map((item, index, items) => ({
579
- ...item,
580
- separatorBefore: items[index - 1]?.id === 'document-status',
581
- }));
582
- }
224
+ const {
225
+ extensionViews,
226
+ navigation,
227
+ navigationContext,
228
+ navigationModule,
229
+ workspaceView,
230
+ sidebarView,
231
+ calendar,
232
+ selectContext,
233
+ selectWorkspaceView,
234
+ selectModule,
235
+ } = views;
583
236
 
584
237
  // Attachment status
585
238
  const attachmentStates = ref<Record<string, AttachmentStatusUpdate>>({});
@@ -617,7 +270,7 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
617
270
  store.workspace?.readOnly ? t('只读权限') : store.isDemo ? t('浏览器演示') : null,
618
271
  );
619
272
 
620
- // Workbench session & git/system sync
273
+ // Workbench session
621
274
  const workbenchSession = retainWorkbenchSession(store, () => {
622
275
  void extensions.disconnect().catch(store.report);
623
276
  assistant.stop();
@@ -625,31 +278,9 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
625
278
  void editing.dispose().catch(store.report);
626
279
  store.dispose();
627
280
  });
628
- let unmounted = false;
629
281
  assistant.setManaged((id) => editing.isManaging(id));
630
282
  inlineRunner.setManaged((id) => editing.isManaging(id));
631
283
 
632
- let reminderTimer: ReturnType<typeof setInterval> | undefined;
633
- const reminderScheduler = new LocalReminderScheduler({
634
- onRemind: (item) => {
635
- store.report(t('日程提醒:{0}', [item.record.object.name]));
636
- },
637
- });
638
- function checkPlanReminders() {
639
- if (typeof document !== 'undefined' && document.visibilityState === 'hidden') return;
640
- const now = new Date();
641
- const windowStart = new Date(now.getFullYear(), now.getMonth(), now.getDate() - 1);
642
- const windowEnd = new Date(now.getFullYear(), now.getMonth(), now.getDate() + 2);
643
- const records = expandRecurringPlans(plans.recordsFor('all'), windowStart, windowEnd);
644
- reminderScheduler.check(records, now.getTime());
645
- }
646
- onMounted(() => {
647
- reminderTimer = setInterval(checkPlanReminders, 60_000);
648
- });
649
- onBeforeUnmount(() => {
650
- clearInterval(reminderTimer);
651
- });
652
-
653
284
  const updates = useUpdatesStore();
654
285
  const updateLock = computed(() => ['downloading', 'installing'].includes(updates.state.phase));
655
286
 
@@ -672,7 +303,6 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
672
303
  templatePaneId.value = store.activePaneId;
673
304
  templateSource.value = store.active?.content ?? '';
674
305
  templateInitialization.value = undefined;
675
- // Let the captured pane settle before showing the page; the editor stays mounted.
676
306
  void nextTick(() => {
677
307
  templateLibraryOpen.value = true;
678
308
  });
@@ -940,9 +570,10 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
940
570
  return;
941
571
  }
942
572
  if (identity.type === 'document' || identity.type === 'asset') {
943
- const file = workspace.value?.files.find(
944
- (file) => file.id === identity.id && file.path === result.target!.path,
945
- ) ?? workspace.value?.files.find((file) => file.id === identity.id);
573
+ const file =
574
+ workspace.value?.files.find(
575
+ (file) => file.id === identity.id && file.path === result.target!.path,
576
+ ) ?? workspace.value?.files.find((file) => file.id === identity.id);
946
577
  if (file) await openEntry(file);
947
578
  return;
948
579
  }
@@ -977,116 +608,27 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
977
608
  await docs.revealAssistantSelection(docSource);
978
609
  }
979
610
 
980
- // Settings window / tab / modal
981
- const settingsPage = ref<SettingsPageId>(readSettingsPage());
982
- // A loaded workspace keeps its session, but only the workspace navigation owns its settings.
983
- const settingsWorkspace = computed(() =>
984
- navigationContext.value === 'workspace' ? workspace.value : null,
985
- );
986
- function openSettingsTab(page: SettingsPageId) {
987
- settingsPage.value = page;
988
- store.openViewTab(SETTINGS_TAB_ID);
989
- settingsPanel.value = false;
990
- if (compactPanes.value) sidebar.value = false;
991
- }
992
- const openingSettingsWindow = ref(false);
993
- async function openSettingsInNewWindow(page: SettingsPageId) {
994
- if (!native || mobile || !tabsEnabled) return;
995
- settingsPage.value = page;
996
- if (openingSettingsWindow.value) return;
997
- openingSettingsWindow.value = true;
998
- settingsPanel.value = false;
999
- try {
1000
- activeWindow.value = (
1001
- await auxiliaryWindows.open('settings', 'settings', t('设置') + ' — Tano / 同页')
1002
- ).context;
1003
- } catch (error) {
1004
- settingsPanel.value = true;
1005
- store.report(error);
1006
- } finally {
1007
- openingSettingsWindow.value = false;
1008
- }
1009
- }
1010
- function openSettings(page: SettingsPageId = readSettingsPage(settingsPage.value)) {
1011
- menu.value = false;
1012
- workspaceMenu.value = false;
1013
- settingsPage.value = page === 'preferences' ? 'appearance' : page;
1014
- const pane = store.panes.find((pane) => pane.tabs.includes(SETTINGS_TAB_ID));
1015
- if (pane) {
1016
- store.focusPane(pane.id);
1017
- openSettingsTab(settingsPage.value);
1018
- return;
1019
- }
1020
- settingsPanel.value = true;
1021
- }
1022
- function settingsAction(
1023
- action: 'open-folder' | 'switch-mode' | 'reveal' | 'agent' | 'history' | 'recycle' | 'sign-out',
1024
- ) {
1025
- if (!settingsWorkspace.value && ['reveal', 'agent', 'history', 'recycle'].includes(action))
1026
- return;
1027
- settingsPanel.value = false;
1028
- if (action === 'open-folder') void store.openWorkspace();
1029
- else if (action === 'reveal') void store.reveal();
1030
- else if (action === 'agent') agentPanel.value = true;
1031
- else if (action === 'history') extensions.showHistory?.();
1032
- else if (action === 'recycle') recyclePanel.value = true;
1033
- }
1034
- const settingsContext = computed(() => ({
1035
- pluginPages: settingsWorkspace.value ? store.pluginSettingsPages : [],
1036
- workspace: settingsWorkspace.value
1037
- ? {
1038
- id: settingsWorkspace.value.id,
1039
- name: settingsWorkspace.value.name,
1040
- path: settingsWorkspace.value.path,
1041
- readOnly: settingsWorkspace.value.readOnly,
1042
- canDelete: settingsWorkspace.value.canDelete,
1043
- canManageSettings: settingsWorkspace.value.canManageSettings,
1044
- }
1045
- : null,
1046
- activeFile:
1047
- settingsWorkspace.value && store.active
1048
- ? { id: store.active.id, path: store.active.path }
1049
- : null,
1050
- workspaceSettings: store.workspaceSettings,
1051
- workspacePages:
1052
- settingsWorkspace.value?.files
1053
- .filter(
1054
- (file) =>
1055
- file.kind === 'file' && isMarkdown(file.path) && !isWorkspaceInternalPath(file.path),
1056
- )
1057
- .map((file) => ({ id: file.id, path: file.path })) ?? [],
1058
- workspaceSettingsError: store.workspaceSettingsError,
1059
- workspaceSettingsSaving: store.workspaceSettingsSaving,
1060
- workspaceExporting: modals.workspaceExporting.value,
1061
- workspaceExportError: modals.workspaceExportError.value,
1062
- workspaceDeletionSupported: !!workspaceAdapter.deleteWorkspace,
1063
- workspaceDeleting: modals.workspaceDeleting.value || store.busy,
1064
- workspaceDeletionError: modals.workspaceDeletionError.value,
1065
- mode: store.isDemo ? 'demo' : store.isWeb ? 'web' : 'local',
1066
- defaultSource: prefs.defaultSource.value,
1067
- theme: prefs.theme.value,
1068
- appearance: prefs.appearance.value,
1069
- visualFontChoice: prefs.visualFontChoice.value,
1070
- customFontName: prefs.customFontName.value,
1071
- splitFontSettings: prefs.splitFontSettings.value,
1072
- revealMarkdown: prefs.revealMarkdown.value,
1073
- toolbarMode: prefs.toolbarMode.value,
1074
- shortcuts: prefs.shortcuts.value,
1075
- showPageTitle: prefs.showPageTitle.value,
1076
- showDocumentProperties: prefs.showDocumentProperties.value,
1077
- showDocumentDiscussion: prefs.showDocumentDiscussion.value,
1078
- showOutline: outlineCtrl.showOutline.value,
1079
- outlineOnLeft: outlineCtrl.outlineOnLeft.value,
1080
- visualFontSize: prefs.visualFontSize.value,
1081
- sourceFontSize: prefs.sourceFontSize.value,
1082
- editorPreferences: prefs.editorPreferences.value,
1083
- historyEnabled: !!extensions.historyEnabled,
1084
- capabilities: store.capabilities,
1085
- capabilityError: store.capabilityError,
1086
- capabilitySaving: store.capabilitySaving,
1087
- version: updates.state.status?.currentVersion ?? appVersion,
1088
- updates: updates.state,
1089
- }));
611
+ // Settings controller
612
+ const settingsCtrl = useWorkbenchSettings({
613
+ store,
614
+ updates,
615
+ workspaceAdapter,
616
+ extensions,
617
+ auxiliaryWindows,
618
+ activeWindow,
619
+ navigationContext,
620
+ compactPanes,
621
+ sidebar,
622
+ tabsEnabled,
623
+ menu,
624
+ workspaceMenu,
625
+ settingsPanel,
626
+ agentPanel,
627
+ recyclePanel,
628
+ prefs,
629
+ outlineCtrl,
630
+ modals,
631
+ });
1090
632
 
1091
633
  const extensionActions: WorkbenchActions = {
1092
634
  closeMenus: () => {
@@ -1096,7 +638,7 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
1096
638
  createWorkspace: () => {
1097
639
  void modals.createNewWorkspace();
1098
640
  },
1099
- openSettings,
641
+ openSettings: settingsCtrl.openSettings,
1100
642
  showDiff: (value) => {
1101
643
  selectedDiff.value = value;
1102
644
  },
@@ -1126,13 +668,6 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
1126
668
  sidebar.value = !sidebar.value;
1127
669
  workspaceMenu.value = false;
1128
670
  }
1129
- async function dragPaneWindow(event: MouseEvent) {
1130
- if (event.button !== 0 || event.detail !== 1) return;
1131
- await activeWindow.value.native?.startDragging();
1132
- }
1133
- async function maximizePaneWindow() {
1134
- await activeWindow.value.native?.toggleMaximize();
1135
- }
1136
671
 
1137
672
  // Commands, shortcuts, window listeners & auxiliary window event bindings
1138
673
  const { workbenchCommands } = useWorkbenchShortcuts({
@@ -1217,7 +752,7 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
1217
752
  toggleWorkspaceMenu,
1218
753
  selectModule,
1219
754
  openCalendar: calendar.openCalendar,
1220
- openSettings,
755
+ openSettings: settingsCtrl.openSettings,
1221
756
  closeFileContextMenu: tree.closeFileContextMenu,
1222
757
  closeDirectoryContextMenu: tree.closeDirectoryContextMenu,
1223
758
  closeWorkspaceEntryContextMenu: tree.closeWorkspaceEntryContextMenu,
@@ -1233,574 +768,446 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
1233
768
  constrainSidebarToViewport: prefs.constrainSidebarToViewport,
1234
769
  });
1235
770
 
1236
- // Cross-domain watchers & lifecycle
1237
- watch(
1238
- () => store.workspace?.id,
1239
- (id, previous) => {
1240
- agentPanel.value = false;
1241
- selectedDiff.value = undefined;
1242
- recyclePanel.value = false;
1243
- if (navigationModule.value === 'workspace') {
1244
- if (previous) calendar.rememberCalendar(previous);
1245
- calendar.restoreCalendar(id);
1246
- }
1247
- calendar.calendarModeOpen.value = false;
1248
- workspaceMenu.value = false;
1249
- settingsPanel.value = false;
1250
- },
1251
- );
1252
- watch(activeId, (id) => {
1253
- calendar.calendarModeOpen.value = false;
1254
- if (id === ASSISTANT_TAB_ID && compactPanes.value) sidebar.value = false;
1255
- docs.closePageContextMenu();
1256
- const treeId = activeId.value.startsWith('table:')
1257
- ? tableFileId(activeId.value)
1258
- : activeId.value;
1259
- if (!tree.pendingTreeOpenIds.has(treeId) || !tree.selectedEntryIds.value.has(treeId))
1260
- tree.selectActiveFileInTree();
1261
- historyPanel.value = false;
1262
- menu.value = false;
1263
- outlineCtrl.resetOnActiveChange();
1264
- });
1265
- watch(
1266
- () => [store.activeId, assistant.loading, store.busy] as const,
1267
- ([id, loading, switching]) => {
1268
- if (id === ASSISTANT_TAB_ID && !loading && !switching) openAssistantPage(store, assistant);
1269
- },
1270
- );
1271
- watch(sidebar, (visible) => {
1272
- if (!visible) {
1273
- tree.closeFileContextMenu();
1274
- tree.closeDirectoryContextMenu();
1275
- outlineCtrl.closeOutlineContextMenu();
1276
- }
1277
- });
1278
-
1279
- const noteCount = computed(
1280
- () =>
1281
- workspace.value?.files.filter(
1282
- (f) =>
1283
- f.kind === 'file' &&
1284
- !isWorkspaceInternalPath(f.path) &&
1285
- (isMarkdown(f.path) || isDataTableFilePath(f.path)),
1286
- ).length ?? 0,
1287
- );
1288
-
1289
771
  // Help guidance state
1290
- const helpContext = computed<HelpContext>(() => {
1291
- if (activeId.value === ASSISTANT_TAB_ID || sidebarView.value === 'assistant')
1292
- return 'assistant';
1293
- if (isTableTab(activeId.value)) return 'tables';
1294
- if (activeId.value === GRAPH_TAB_ID) return 'graph';
1295
- if (activeId.value === PLUGINS_TAB_ID) return 'plugins';
1296
- if (activeId.value === CALENDAR_TAB_ID || sidebarView.value === 'plan') return 'plan';
1297
- if (!active.value) return 'welcome';
1298
- if (docs.editorReadonly.value) return 'reading';
1299
- if (docs.source.value) return 'source';
1300
- return active.value.content.trim() ? 'document' : 'empty-document';
1301
- });
1302
- const helpAvailability = computed<HelpAvailability>(() => ({
1303
- 'document-write': !!active.value && !docs.editorReadonly.value,
1304
- 'workspace-write': !!workspace.value && !workspace.value.readOnly,
1305
- plans: plans.personalWritable || plans.workspaceWritable,
1306
- comments: !!active.value && !docs.editorReadonly.value,
1307
- templates: !!workspace.value && !workspace.value.readOnly,
1308
- import: !!workspace.value && !workspace.value.readOnly,
1309
- duplicate: !!workspace.value && !workspace.value.readOnly && !!workspaceAdapter.duplicate,
1310
- 'folder-home': !!workspace.value && !!store.workspaceSettings.folderHomeFileName,
1311
- 'folder-conversion':
1312
- !!workspace.value &&
1313
- !workspace.value.readOnly &&
1314
- store.canConvertFolderDocuments &&
1315
- !!store.workspaceSettings.folderHomeFileName,
1316
- panes: !!workspace.value && !compactPanes.value,
1317
- assistant: !!workspace.value && assistant.available,
1318
- 'assistant-configure':
1319
- !!workspace.value && assistant.available && assistant.canConfigure && !assistant.demo,
1320
- suggestions:
1321
- !!active.value && !docs.editorReadonly.value && !editing.isManaging(active.value.id),
1322
- math: !!active.value && !docs.editorReadonly.value && store.capabilities.features.math,
1323
- mermaid: !!active.value && !docs.editorReadonly.value && store.capabilities.features.mermaid,
1324
- }));
1325
- const helpBlocked = computed(
1326
- () =>
1327
- !!(
1328
- activeExtensionView.value ||
1329
- activeId.value === SETTINGS_TAB_ID ||
1330
- activeId.value.startsWith('attachment:') ||
1331
- (assistant.opened && assistant.displayMode === 'fullscreen') ||
1332
- busy.value ||
1333
- fatal.value ||
1334
- store.pending ||
1335
- active.value?.conflict ||
1336
- active.value?.error ||
1337
- workspaceMenu.value ||
1338
- menu.value ||
1339
- modals.modal.value ||
1340
- settingsPanel.value ||
1341
- importPanel.value ||
1342
- templateLibraryOpen.value ||
1343
- agentPanel.value ||
1344
- objectDetail.value ||
1345
- planArchiveOpen.value ||
1346
- selectedDiff.value ||
1347
- inlineAssist.selectionTodo.value ||
1348
- recyclePanel.value ||
1349
- docs.referenceGraphOpened.value ||
1350
- tree.fileContextMenu.value ||
1351
- tree.directoryContextMenu.value ||
1352
- docs.pageContextMenu.value ||
1353
- outlineCtrl.outlineContextMenu.value ||
1354
- prefs.resizingSidebar.value ||
1355
- tree.draggedEntry.value ||
1356
- updateLock.value
1357
- ),
1358
- );
1359
-
1360
- // Startup & native window lifecycle
1361
- let unlistenClose: (() => void) | undefined;
1362
- let unlistenWatchError: (() => void) | undefined;
1363
-
1364
- onMounted(async () => {
1365
- if (history.webPageRouting) {
1366
- history.initializePageHistory();
1367
- window.addEventListener('popstate', history.handlePagePopState);
1368
- }
1369
- try {
1370
- await workbenchSession.initialize(async () => {
1371
- if (props.createWorkspace) await modals.createNewWorkspace();
1372
- else
1373
- await store.initialize(
1374
- history.initialPageRoute?.workspaceId ??
1375
- (props.resolveInitialWorkspace
1376
- ? await props.resolveInitialWorkspace()
1377
- : props.initialWorkspace),
1378
- );
1379
- });
1380
- } finally {
1381
- navigation.restore();
1382
- if (
1383
- navigation.homeModule.value !== 'plan' &&
1384
- !extensionViews.some(
1385
- (view) => view.id === navigation.homeModule.value && view.sidebar,
1386
- )
1387
- )
1388
- navigation.homeModule.value = 'plan';
1389
- plans.view = navigationContext.value === 'home' ? personalPlanScope : 'workspace';
1390
- startupPending.value = false;
1391
- }
1392
- if (unmounted) return;
1393
- emit('ready');
1394
- await nextTick();
1395
-
1396
- await history.finishInitialPageRouting(props.createWorkspace);
1397
- if (native && !mobile) {
1398
- void updates.initialize();
1399
- }
1400
- if (native) {
1401
- if (localNative)
1402
- unlistenWatchError = await listen<string>('workspace-watch-error', (event) => {
1403
- store.enableWorkspacePolling();
1404
- store.report(t('文件监听遇到错误:{0}。目录仍会定期自动检查。', [event.payload]));
1405
- });
1406
- if (!mobile)
1407
- unlistenClose = await mainWindow.native!.onCloseRequested(async (event) => {
1408
- event.preventDefault();
1409
- if (updates.state.phase === 'installing') return;
1410
- try {
1411
- await editing.flush();
1412
- if (await store.flush()) {
1413
- await assistant.settle();
1414
- await inlineRunner.settle();
1415
- await agentInbox.settle();
1416
- if (!(await auxiliaryWindows.closeAll())) {
1417
- agentInbox.resume();
1418
- return;
1419
- }
1420
- await editing.suspendAll();
1421
- await mainWindow.native!.destroy();
1422
- } else store.report(t('还有未保存的内容,窗口已保留。请先保存或另存副本。'));
1423
- } catch (error) {
1424
- agentInbox.resume();
1425
- store.report(error);
1426
- }
1427
- });
1428
- }
1429
- });
1430
-
1431
- onBeforeUnmount(() => {
1432
- unmounted = true;
1433
- document.documentElement.style.removeProperty('--sidebar-width');
1434
- workbenchSession.release();
1435
- window.removeEventListener('popstate', history.handlePagePopState);
1436
- unlistenClose?.();
1437
- unlistenWatchError?.();
1438
- });
1439
-
1440
- return {
1441
- auxiliaryWindows,
1442
- activeWindow,
1443
- detachedTitle: modals.detachedTitle,
1444
- native,
1445
- mobile,
1446
- workspace,
1447
- compactPanes,
1448
- isAuxiliaryWindow,
1449
- sidebar,
1450
- t,
1451
- shortcuts: prefs.shortcuts,
1452
- toggleSidebar,
1453
- sessionPending,
1454
- tabFileDrag: tree.tabFileDrag,
1455
- fileDragEnd: tree.fileDragEnd,
772
+ const help = useWorkbenchHelp({
1456
773
  store,
1457
- createNewDocument: modals.createNewDocument,
1458
- detachTab: modals.detachTab,
1459
- resizingSidebar: prefs.resizingSidebar,
1460
- moveSidebarResize: prefs.moveSidebarResize,
1461
- finishSidebarResize: prefs.finishSidebarResize,
1462
- butterfly,
1463
- fileMetadataTarget: tree.fileMetadataTarget,
1464
- switchingWorkspace,
1465
- mainColumn,
1466
- returnHome: modals.returnHome,
1467
- sidebarHeaderItems,
1468
- closeButtonVisibilityMenus,
1469
- extensionViews,
1470
- viewActions,
1471
- navigationContext,
1472
- sidebarNavigationItems,
1473
- navigationModule,
1474
- selectModule,
774
+ assistant,
775
+ plans,
776
+ workspaceAdapter,
777
+ editing,
778
+ compactPanes,
1475
779
  sidebarView,
1476
- draggedEntry: tree.draggedEntry,
1477
- dropFolder: tree.dropFolder,
1478
- dropPlaceholders: tree.dropPlaceholders,
1479
- fileDragOver: tree.fileDragOver,
1480
- fileDragLeave: tree.fileDragLeave,
1481
- fileDrop: tree.fileDrop,
1482
- workspaceView,
1483
- selectWorkspaceView,
780
+ activeExtensionView: views.activeExtensionView,
781
+ editorReadonly: docs.editorReadonly,
782
+ source: docs.source,
1484
783
  workspaceMenu,
784
+ menu,
1485
785
  modal: modals.modal,
1486
786
  settingsPanel,
1487
- repositoryActionItems,
1488
- showModal: modals.showModal,
1489
- activeId,
1490
- GRAPH_TAB_ID,
1491
- busy,
1492
- openDirectoryContextMenu: tree.openDirectoryContextMenu,
1493
- startupPending,
1494
- filesPending,
1495
- treeFiles: tree.treeFiles,
1496
- fileTree: tree.fileTree,
1497
- revealedHomeId: tree.revealedHomeId,
1498
- treeDocumentIcons: tree.treeDocumentIcons,
1499
- loadTreeDocumentIcon: tree.loadTreeDocumentIcon,
1500
- selectedEntryIds: tree.selectedEntryIds,
1501
- fileContextMenu: tree.fileContextMenu,
1502
- canDragEntry: tree.canDragEntry,
1503
- treeRename: tree.treeRename,
1504
- renameTreeEntry: tree.renameTreeEntry,
1505
- openTreeEntry: tree.openTreeEntry,
1506
- selectFileTreeEntry: tree.selectFileTreeEntry,
1507
- openFileContextMenu: tree.openFileContextMenu,
1508
- fileDragStart: tree.fileDragStart,
1509
- finishTreeRename: tree.finishTreeRename,
1510
- noteCount,
1511
- createPluginObject,
1512
- sidebarCalendarDate: calendar.sidebarCalendarDate,
1513
- openCalendar: calendar.openCalendar,
1514
- showPlanEvent,
1515
- multipleContextEntries: tree.multipleContextEntries,
1516
- contextEntries: tree.contextEntries,
1517
- fileContextKeydown: tree.fileContextKeydown,
1518
- localNative,
1519
- selectionDeleteDisabled: tree.selectionDeleteDisabled,
1520
- fileContextAction: tree.fileContextAction,
1521
- shortcutHint: prefs.shortcutHint,
1522
- contextFolderHome: tree.contextFolderHome,
1523
- folderHomeContextAction: tree.folderHomeContextAction,
1524
- fileMutationDisabled: tree.fileMutationDisabled,
1525
- directoryHasManagedFile: tree.directoryHasManagedFile,
1526
- isMarkdown,
1527
- isDataTableFilePath,
1528
- attachments,
1529
- tabsEnabled,
1530
- canDuplicateEntry: tree.canDuplicateEntry,
1531
- isWorkspaceInternalPath,
1532
- folderConversionIssue: tree.folderConversionIssue,
1533
- convertDocumentStructure: tree.convertDocumentStructure,
1534
- closeFileContextMenu: tree.closeFileContextMenu,
1535
- fileDeleteDisabled: tree.fileDeleteDisabled,
1536
- directoryContextMenu: tree.directoryContextMenu,
1537
- directoryContextAction: tree.directoryContextAction,
1538
- directoryContextDuplicateDisabled: tree.directoryContextDuplicateDisabled,
1539
- directoryContextRenameDisabled: tree.directoryContextRenameDisabled,
1540
- directoryContextDeleteDisabled: tree.directoryContextDeleteDisabled,
1541
- workspaceEntryContextMenu: tree.workspaceEntryContextMenu,
1542
- workspaceEntryContextMenuElement: tree.workspaceEntryContextMenuElement,
1543
- workspaceEntryContextKeydown: tree.workspaceEntryContextKeydown,
1544
- workspaceEntryContextAction: tree.workspaceEntryContextAction,
1545
- toggleWorkspaceMenu,
1546
- workspaceDropdownContextMenu: tree.workspaceDropdownContextMenu,
1547
- selectContext,
1548
- extensions,
1549
- extensionActions,
1550
- commandPaletteOpened,
1551
- openImport,
1552
- openTemplateLibrary,
1553
- openSettings,
1554
- updates,
1555
- recyclePanel,
787
+ importPanel,
788
+ templateLibraryOpen,
1556
789
  agentPanel,
1557
- createNewWorkspace: modals.createNewWorkspace,
1558
- openWorkspaceEntryContextMenu: tree.openWorkspaceEntryContextMenu,
1559
- helpContext,
1560
- helpAvailability,
1561
- helpBlocked,
1562
- documentationBaseUrl,
1563
- menu,
1564
- openExternalUrl,
1565
- sidebarWidth: prefs.sidebarWidth,
1566
- defaultSidebarWidth: prefs.defaultSidebarWidth,
1567
- SIDEBAR_MIN_WIDTH: prefs.SIDEBAR_MIN_WIDTH,
1568
- sidebarWidthLimit: prefs.sidebarWidthLimit,
1569
- startSidebarResize: prefs.startSidebarResize,
1570
- resizeSidebarWithKeyboard: prefs.resizeSidebarWithKeyboard,
1571
- referenceGraphTarget: docs.referenceGraphTarget,
790
+ objectDetail,
791
+ planArchiveOpen,
792
+ selectedDiff,
793
+ selectionTodo: inlineAssist.selectionTodo,
794
+ recyclePanel,
1572
795
  referenceGraphOpened: docs.referenceGraphOpened,
1573
- referenceGraphAnchor: docs.referenceGraphAnchor,
1574
- openReference,
1575
- assistantTab,
1576
- dragPaneWindow,
1577
- maximizePaneWindow,
796
+ fileContextMenu: tree.fileContextMenu,
797
+ directoryContextMenu: tree.directoryContextMenu,
798
+ pageContextMenu: docs.pageContextMenu,
799
+ outlineContextMenu: outlineCtrl.outlineContextMenu,
800
+ resizingSidebar: prefs.resizingSidebar,
801
+ draggedEntry: tree.draggedEntry,
802
+ updateLock,
803
+ });
804
+
805
+ // Cross-domain watchers, reminders & native window lifecycle
806
+ useWorkbenchLifecycle({
807
+ props,
808
+ emitReady: () => emit('ready'),
809
+ mainWindow,
810
+ store,
1578
811
  assistant,
1579
- assistantPanelMounted,
1580
- assistantHosts,
1581
- ASSISTANT_TAB_ID,
1582
- revealAssistantSelection: docs.revealAssistantSelection,
1583
- templateLibraryOpen,
1584
- templatePaneId,
1585
- templateSource,
1586
- templateInitialization,
1587
- workspaceStatusLabel,
1588
- openEntry,
1589
- openBreadcrumbDirectory,
1590
- setAssistantHost,
1591
- topbarVisibilityItems,
1592
- canNavigatePage: history.canNavigatePage,
1593
- navigatePage: history.navigatePage,
1594
- CALENDAR_TAB_ID,
1595
- paneButterflyScope,
1596
- pluginViewHeader,
1597
- pluginPreviewStatus,
1598
- paneDocumentStatus: docs.paneDocumentStatus,
1599
- attachmentStatus,
1600
- currentAttachmentStatus,
1601
- PLUGINS_TAB_ID,
1602
- settingsTabView,
1603
- touchLayout,
1604
- showOutline: outlineCtrl.showOutline,
1605
- touchOutlineOpen: outlineCtrl.touchOutlineOpen,
1606
- isTableTab,
1607
- calendarToolItems,
1608
- calendarPeriod: calendar.calendarPeriod,
1609
- calendarDate: calendar.calendarDate,
1610
- moveCalendarPeriod: calendar.moveCalendarPeriod,
1611
- calendarModeOpen: calendar.calendarModeOpen,
1612
- calendarModeLabel: calendar.calendarModeLabel,
1613
- calendarModeOptions: calendar.calendarModeOptions,
1614
- calendarMode: calendar.calendarMode,
1615
- selectCalendarMode: calendar.selectCalendarMode,
1616
- openPlanArchive,
1617
- documentSuggestions,
1618
- editing,
1619
- suggestionModeBusy,
1620
- toggleSuggestionMode,
1621
- documentToolItems,
1622
- revealMarkdown: prefs.revealMarkdown,
1623
- paneSource: docs.paneSource,
1624
- shortcutAriaLabel,
1625
- shortcutKeys,
1626
- setPaneSource: docs.setPaneSource,
1627
- documentMenuElement: docs.documentMenuElement,
1628
- toggleDocumentMenu: docs.toggleDocumentMenu,
1629
- documentMenuTriggerKeydown: docs.documentMenuTriggerKeydown,
1630
- documentMenuKeydown: docs.documentMenuKeydown,
1631
- openPaneSearch: docs.openPaneSearch,
1632
- editorReadonly: docs.editorReadonly,
1633
- documentUndoAvailable: docs.documentUndoAvailable,
1634
- undoDocument: docs.undoDocument,
1635
- documentRedoAvailable: docs.documentRedoAvailable,
1636
- redoDocument: docs.redoDocument,
1637
- canAddDocumentProperty: docs.canAddDocumentProperty,
1638
- addDocumentProperty: docs.addDocumentProperty,
1639
- paneComments: docs.paneComments,
1640
- openDocumentDiscussion: docs.openDocumentDiscussion,
1641
- paneReadonly: docs.paneReadonly,
1642
- showReferenceGraph: docs.showReferenceGraph,
1643
- limitPageWidth: prefs.limitPageWidth,
1644
- pageWidthWritable: prefs.pageWidthWritable,
1645
- setLimitPageWidth: prefs.setLimitPageWidth,
1646
- workspaceLocked: prefs.workspaceLocked,
1647
- pageLocked: prefs.pageLocked,
1648
- togglePageLock: prefs.togglePageLock,
1649
- historyPage,
1650
- historyPanel,
1651
- editorPreferences: prefs.editorPreferences,
1652
- showPageTitle: prefs.showPageTitle,
1653
- showDocumentProperties: prefs.showDocumentProperties,
1654
- showAllLineNumbers: prefs.showAllLineNumbers,
1655
- togglePageOption: docs.togglePageOption,
1656
- toggleWorkspaceLock: prefs.toggleWorkspaceLock,
1657
- exportBusy: docs.exportBusy,
1658
- exportDocument: docs.exportDocument,
1659
- printBusy: docs.printBusy,
1660
- printActiveDocument: docs.printActiveDocument,
1661
- sessionBlocksFileMutation: docs.sessionBlocksFileMutation,
1662
- removeDocument: modals.removeDocument,
1663
- tableFileId,
1664
- openAssistant: inlineAssist.openAssistant,
1665
- parentPath,
1666
- calendarScope: calendar.calendarScope,
812
+ inlineRunner,
813
+ agentInbox,
1667
814
  plans,
1668
- showCalendarDay: calendar.showCalendarDay,
1669
- showCalendarMonth: calendar.showCalendarMonth,
1670
- openAssistantPage,
1671
- SETTINGS_TAB_ID,
1672
- MAIL_TAB_ID,
1673
- mailEnabled,
1674
- mailTabView,
1675
- openMail,
1676
- selectedVisualFontFamily: prefs.selectedVisualFontFamily,
1677
- visualFontSize: prefs.visualFontSize,
1678
- setPaneSearch: docs.setPaneSearch,
1679
- paneSourceEditors: docs.paneSourceEditors,
1680
- paneEditors: docs.paneEditors,
1681
- paneSearchRevisions: docs.paneSearchRevisions,
1682
- setPaneElement: docs.setPaneElement,
1683
- toolbarMode: prefs.toolbarMode,
1684
- scheduleActiveHeading: outlineCtrl.scheduleActiveHeading,
1685
- appearance: prefs.appearance,
1686
- assistantTaskActive: inlineAssist.assistantTaskActive,
1687
- beginSelectionTodo: inlineAssist.beginSelectionTodo,
1688
- paneEditorScrolls: docs.paneEditorScrolls,
1689
- paneSelections: docs.paneSelections,
1690
- defaultSelectionContext,
1691
- showSourceTodo: inlineAssist.showSourceTodo,
815
+ updates,
816
+ editing,
817
+ auxiliaryWindows,
818
+ workbenchSession,
819
+ localNative,
820
+ startupPending,
821
+ compactPanes,
822
+ sidebar,
823
+ navigationContext,
824
+ navigationModule,
825
+ restoreNavigation: navigation.restore,
826
+ homeModule: navigation.homeModule,
827
+ getPersonalPlanScope: views.getPersonalPlanScope,
828
+ extensionViews,
829
+ agentPanel,
1692
830
  selectedDiff,
1693
- sourceFontSize: prefs.sourceFontSize,
1694
- openPageContextMenu: docs.openPageContextMenu,
1695
- safeRemoteImage,
1696
- uploadFile: docs.uploadFile,
1697
- resourceRevision: docs.resourceRevision,
1698
- renameDocumentTitle: docs.renameDocumentTitle,
1699
- insertBlockBelowTitle: docs.insertBlockBelowTitle,
1700
- commentAnchors: docs.commentAnchors,
1701
- paneEditorReady: docs.paneEditorReady,
1702
- paneSourceSelections: docs.paneSourceSelections,
1703
- insertSourceFiles: docs.insertSourceFiles,
1704
- setPaneEditor: docs.setPaneEditor,
1705
- openDocumentLink: docs.openDocumentLink,
1706
- openWikiLink: docs.openWikiLink,
1707
- openBlankBlockAssistant: inlineAssist.openBlankBlockAssistant,
1708
- startDocumentDraft: inlineAssist.startDocumentDraft,
1709
- quickInitialize: docs.quickInitialize,
1710
- chooseInitialTemplate: docs.chooseInitialTemplate,
1711
- showDocumentDiscussion: prefs.showDocumentDiscussion,
1712
- setPaneComments: docs.setPaneComments,
1713
- discussWithAssistant: inlineAssist.discussWithAssistant,
1714
- capturePaneCommentSelection: docs.capturePaneCommentSelection,
1715
- focusPaneComment: docs.focusPaneComment,
1716
- paneCommentGeometry: docs.paneCommentGeometry,
1717
- paneScrolls: docs.paneScrolls,
1718
- receiveAttachmentStatus,
1719
- updateLock,
1720
- fileHandlers,
1721
- relativeWorkspaceReference,
1722
- outlineOnLeft: outlineCtrl.outlineOnLeft,
1723
- hoverOutline: outlineCtrl.hoverOutline,
1724
- outlinePinned: outlineCtrl.outlinePinned,
1725
- outlinePosition: outlineCtrl.outlinePosition,
1726
- openOutlineContextMenu: outlineCtrl.openOutlineContextMenu,
1727
- releaseOutlinePointerFocus: outlineCtrl.releaseOutlinePointerFocus,
1728
- outlineAutoCollapse: outlineCtrl.outlineAutoCollapse,
1729
- outlineSearchOpen: outlineCtrl.outlineSearchOpen,
1730
- outlineSearchInput: outlineCtrl.outlineSearchInput,
1731
- toggleOutlineSearch: outlineCtrl.toggleOutlineSearch,
1732
- toggleOutlinePin: outlineCtrl.toggleOutlinePin,
1733
- outlineSearch: outlineCtrl.outlineSearch,
1734
- visibleOutline: outlineCtrl.visibleOutline,
1735
- jumpToHeading: outlineCtrl.jumpToHeading,
1736
- outline: outlineCtrl.outline,
1737
- activeHeading: outlineCtrl.activeHeading,
1738
- activities,
1739
- uiLocale,
1740
- homeContent,
1741
- homeExtension,
1742
- inlineAssistant: inlineAssist.inlineAssistant,
1743
- inlineAssistantPrompt: inlineAssist.inlineAssistantPrompt,
1744
- inlineAssistantState: inlineAssist.inlineAssistantState,
1745
- inlineRunner,
1746
- inlineAssistantError: inlineAssist.inlineAssistantError,
1747
- inlineAssistantMessage: inlineAssist.inlineAssistantMessage,
1748
- submitInlineAssistant: inlineAssist.submitInlineAssistant,
1749
- continueInlineConversation: inlineAssist.continueInlineConversation,
1750
- undoInlineAssistant: inlineAssist.undoInlineAssistant,
1751
- closeInlineAssistant: inlineAssist.closeInlineAssistant,
1752
- pageContextMenu: docs.pageContextMenu,
1753
- pageContextMenuElement: docs.pageContextMenuElement,
1754
- pageContextKeydown: docs.pageContextKeydown,
1755
- outlineContextMenu: outlineCtrl.outlineContextMenu,
1756
- outlineContextMenuElement: outlineCtrl.outlineContextMenuElement,
1757
- outlineContextKeydown: outlineCtrl.outlineContextKeydown,
1758
- toggleOutlineSide: outlineCtrl.toggleOutlineSide,
1759
- importPanel,
1760
- importRecords,
1761
- active,
1762
- objectDetail,
1763
- planArchiveOpen,
1764
- openObjectReference,
1765
- planDetail,
1766
- openPlanReference,
1767
- selectionTodo: inlineAssist.selectionTodo,
1768
- workbenchCommands,
1769
- openingSettingsWindow,
1770
- openSettingsTab,
1771
- openSettingsInNewWindow,
1772
- settingsPage,
1773
- settingsContext,
1774
- developerMode: prefs.developerMode,
1775
- workspaceExporting: modals.workspaceExporting,
1776
- workspaceExportError: modals.workspaceExportError,
1777
- workspaceDeletionError: modals.workspaceDeletionError,
1778
- deleteWorkspace: modals.deleteWorkspace,
1779
- exportWorkspace: modals.exportWorkspace,
1780
- defaultSource: prefs.defaultSource,
1781
- theme: prefs.theme,
1782
- appearanceController: prefs.appearanceController,
1783
- visualFontChoice: prefs.visualFontChoice,
1784
- customFontName: prefs.customFontName,
1785
- splitFontSettings: prefs.splitFontSettings,
1786
- appVersion,
1787
- settingsAction,
1788
- fatal,
1789
- createNewEntry: modals.createNewEntry,
1790
- modalBusy: modals.modalBusy,
1791
- modalTitle: modals.modalTitle,
1792
- input: modals.input,
1793
- setModalInputElement: modals.setModalInputElement,
1794
- searchResults: modals.searchResults,
1795
- openSearchResult: modals.openSearchResult,
1796
- searchHighlightParts: modals.searchHighlightParts,
1797
- searchResultLocation: modals.searchResultLocation,
1798
- searching: modals.searching,
1799
- searchError: modals.searchError,
1800
- submitModal: modals.submitModal,
1801
- modalDeleteEntries: modals.modalDeleteEntries,
1802
- modalTarget: modals.modalTarget,
1803
- modalError: modals.modalError,
1804
- vButterflyPerch,
831
+ recyclePanel,
832
+ workspaceMenu,
833
+ settingsPanel,
834
+ historyPanel,
835
+ menu,
836
+ calendar,
837
+ docs,
838
+ tree,
839
+ outlineCtrl,
840
+ modals,
841
+ history,
842
+ });
843
+
844
+ // Explicit DOM ref setters (avoid mutating injected contexts directly).
845
+ const setFileTree = (el: unknown) => {
846
+ tree.fileTree.value = (el as InstanceType<typeof FileTree> | null) ?? undefined;
847
+ };
848
+ const setDocumentMenuElement = (el: unknown) => {
849
+ docs.documentMenuElement.value = (el as HTMLElement | null) ?? undefined;
850
+ };
851
+ const setOutlineSearchInput = (el: unknown) => {
852
+ outlineCtrl.outlineSearchInput.value = (el as HTMLInputElement | null) ?? undefined;
853
+ };
854
+ const setWorkspaceEntryContextMenuElement = (el: unknown) => {
855
+ tree.workspaceEntryContextMenuElement.value = (el as HTMLElement | null) ?? undefined;
856
+ };
857
+ const setPageContextMenuElement = (el: unknown) => {
858
+ docs.pageContextMenuElement.value = (el as HTMLElement | null) ?? undefined;
859
+ };
860
+ const setOutlineContextMenuElement = (el: unknown) => {
861
+ outlineCtrl.outlineContextMenuElement.value = (el as HTMLElement | null) ?? undefined;
862
+ };
863
+
864
+ return {
865
+ prefs: {
866
+ tabsEnabled,
867
+ developerMode: prefs.developerMode,
868
+ shortcuts: prefs.shortcuts,
869
+ shortcutHint: prefs.shortcutHint,
870
+ defaultSource: prefs.defaultSource,
871
+ theme: prefs.theme,
872
+ appearance: prefs.appearance,
873
+ appearanceController: prefs.appearanceController,
874
+ visualFontChoice: prefs.visualFontChoice,
875
+ customFontName: prefs.customFontName,
876
+ splitFontSettings: prefs.splitFontSettings,
877
+ revealMarkdown: prefs.revealMarkdown,
878
+ toolbarMode: prefs.toolbarMode,
879
+ showPageTitle: prefs.showPageTitle,
880
+ showDocumentProperties: prefs.showDocumentProperties,
881
+ showDocumentDiscussion: prefs.showDocumentDiscussion,
882
+ showAllLineNumbers: prefs.showAllLineNumbers,
883
+ visualFontSize: prefs.visualFontSize,
884
+ sourceFontSize: prefs.sourceFontSize,
885
+ selectedVisualFontFamily: prefs.selectedVisualFontFamily,
886
+ editorPreferences: prefs.editorPreferences,
887
+ limitPageWidth: prefs.limitPageWidth,
888
+ pageWidthWritable: prefs.pageWidthWritable,
889
+ setLimitPageWidth: prefs.setLimitPageWidth,
890
+ workspaceLocked: prefs.workspaceLocked,
891
+ pageLocked: prefs.pageLocked,
892
+ togglePageLock: prefs.togglePageLock,
893
+ toggleWorkspaceLock: prefs.toggleWorkspaceLock,
894
+ resizingSidebar: prefs.resizingSidebar,
895
+ moveSidebarResize: prefs.moveSidebarResize,
896
+ finishSidebarResize: prefs.finishSidebarResize,
897
+ sidebarWidth: prefs.sidebarWidth,
898
+ defaultSidebarWidth: prefs.defaultSidebarWidth,
899
+ SIDEBAR_MIN_WIDTH: prefs.SIDEBAR_MIN_WIDTH,
900
+ sidebarWidthLimit: prefs.sidebarWidthLimit,
901
+ startSidebarResize: prefs.startSidebarResize,
902
+ resizeSidebarWithKeyboard: prefs.resizeSidebarWithKeyboard,
903
+ },
904
+ shell: {
905
+ native,
906
+ store,
907
+ workspace,
908
+ active,
909
+ activeId,
910
+ activities,
911
+ busy,
912
+ auxiliaryWindows,
913
+ activeWindow,
914
+ detachedTitle: modals.detachedTitle,
915
+ compactPanes,
916
+ touchLayout,
917
+ isAuxiliaryWindow,
918
+ localNative,
919
+ sidebar,
920
+ toggleSidebar,
921
+ mainColumn,
922
+ startupPending,
923
+ filesPending,
924
+ sessionPending,
925
+ switchingWorkspace,
926
+ attachments,
927
+ documentationBaseUrl,
928
+ appVersion,
929
+ extensions,
930
+ extensionActions,
931
+ extensionViews,
932
+ viewActions: views.viewActions,
933
+ settingsTabView: views.settingsTabView,
934
+ mailEnabled: views.mailEnabled,
935
+ mailTabView: views.mailTabView,
936
+ openMail: views.openMail,
937
+ navigationContext,
938
+ navigationModule,
939
+ workspaceView,
940
+ sidebarView,
941
+ selectContext,
942
+ selectWorkspaceView,
943
+ selectModule,
944
+ homeContent: views.homeContent,
945
+ homeExtension: views.homeExtension,
946
+ sidebarHeaderItems: views.sidebarHeaderItems,
947
+ sidebarNavigationItems: views.sidebarNavigationItems,
948
+ repositoryActionItems: views.repositoryActionItems,
949
+ documentToolItems: views.documentToolItems,
950
+ calendarToolItems: views.calendarToolItems,
951
+ topbarVisibilityItems: views.topbarVisibilityItems,
952
+ closeButtonVisibilityMenus,
953
+ workspaceMenu,
954
+ toggleWorkspaceMenu,
955
+ workspaceStatusLabel,
956
+ openEntry,
957
+ openBreadcrumbDirectory,
958
+ openReference,
959
+ openSettings: settingsCtrl.openSettings,
960
+ openImport,
961
+ openTemplateLibrary,
962
+ createNewDocument: modals.createNewDocument,
963
+ createNewEntry: modals.createNewEntry,
964
+ detachTab: modals.detachTab,
965
+ createNewWorkspace: modals.createNewWorkspace,
966
+ returnHome: modals.returnHome,
967
+ canNavigatePage: history.canNavigatePage,
968
+ navigatePage: history.navigatePage,
969
+ updates,
970
+ updateLock,
971
+ butterfly,
972
+ vButterflyPerch,
973
+ paneButterflyScope,
974
+ assistant,
975
+ assistantPanelMounted,
976
+ assistantHosts,
977
+ assistantTab,
978
+ setAssistantHost,
979
+ inlineRunner,
980
+ inlineAssistant: inlineAssist.inlineAssistant,
981
+ inlineAssistantPrompt: inlineAssist.inlineAssistantPrompt,
982
+ inlineAssistantState: inlineAssist.inlineAssistantState,
983
+ inlineAssistantError: inlineAssist.inlineAssistantError,
984
+ inlineAssistantMessage: inlineAssist.inlineAssistantMessage,
985
+ submitInlineAssistant: inlineAssist.submitInlineAssistant,
986
+ continueInlineConversation: inlineAssist.continueInlineConversation,
987
+ undoInlineAssistant: inlineAssist.undoInlineAssistant,
988
+ closeInlineAssistant: inlineAssist.closeInlineAssistant,
989
+ plans,
990
+ calendarScope: calendar.calendarScope,
991
+ calendarPeriod: calendar.calendarPeriod,
992
+ calendarDate: calendar.calendarDate,
993
+ calendarMode: calendar.calendarMode,
994
+ calendarModeOpen: calendar.calendarModeOpen,
995
+ calendarModeLabel: calendar.calendarModeLabel,
996
+ calendarModeOptions: calendar.calendarModeOptions,
997
+ sidebarCalendarDate: calendar.sidebarCalendarDate,
998
+ openCalendar: calendar.openCalendar,
999
+ moveCalendarPeriod: calendar.moveCalendarPeriod,
1000
+ selectCalendarMode: calendar.selectCalendarMode,
1001
+ showCalendarDay: calendar.showCalendarDay,
1002
+ showCalendarMonth: calendar.showCalendarMonth,
1003
+ showPlanEvent,
1004
+ openPlanArchive,
1005
+ createPluginObject,
1006
+ templateLibraryOpen,
1007
+ templatePaneId,
1008
+ templateSource,
1009
+ templateInitialization,
1010
+ workbenchCommands,
1011
+ noteCount: help.noteCount,
1012
+ helpContext: help.helpContext,
1013
+ helpAvailability: help.helpAvailability,
1014
+ helpBlocked: help.helpBlocked,
1015
+ },
1016
+ documents: {
1017
+ menu,
1018
+ setDocumentMenuElement,
1019
+ toggleDocumentMenu: docs.toggleDocumentMenu,
1020
+ documentMenuTriggerKeydown: docs.documentMenuTriggerKeydown,
1021
+ documentMenuKeydown: docs.documentMenuKeydown,
1022
+ openPaneSearch: docs.openPaneSearch,
1023
+ editorReadonly: docs.editorReadonly,
1024
+ documentUndoAvailable: docs.documentUndoAvailable,
1025
+ undoDocument: docs.undoDocument,
1026
+ documentRedoAvailable: docs.documentRedoAvailable,
1027
+ redoDocument: docs.redoDocument,
1028
+ canAddDocumentProperty: docs.canAddDocumentProperty,
1029
+ addDocumentProperty: docs.addDocumentProperty,
1030
+ paneComments: docs.paneComments,
1031
+ openDocumentDiscussion: docs.openDocumentDiscussion,
1032
+ paneReadonly: docs.paneReadonly,
1033
+ showReferenceGraph: docs.showReferenceGraph,
1034
+ referenceGraphTarget: docs.referenceGraphTarget,
1035
+ referenceGraphOpened: docs.referenceGraphOpened,
1036
+ referenceGraphAnchor: docs.referenceGraphAnchor,
1037
+ togglePageOption: docs.togglePageOption,
1038
+ exportBusy: docs.exportBusy,
1039
+ exportDocument: docs.exportDocument,
1040
+ printBusy: docs.printBusy,
1041
+ printActiveDocument: docs.printActiveDocument,
1042
+ sessionBlocksFileMutation: docs.sessionBlocksFileMutation,
1043
+ paneSource: docs.paneSource,
1044
+ setPaneSource: docs.setPaneSource,
1045
+ paneDocumentStatus: docs.paneDocumentStatus,
1046
+ attachmentStatus,
1047
+ currentAttachmentStatus,
1048
+ receiveAttachmentStatus,
1049
+ documentSuggestions,
1050
+ editing,
1051
+ suggestionModeBusy,
1052
+ toggleSuggestionMode,
1053
+ setPaneSearch: docs.setPaneSearch,
1054
+ paneSourceEditors: docs.paneSourceEditors,
1055
+ paneEditors: docs.paneEditors,
1056
+ paneSearchRevisions: docs.paneSearchRevisions,
1057
+ setPaneElement: docs.setPaneElement,
1058
+ assistantTaskActive: inlineAssist.assistantTaskActive,
1059
+ beginSelectionTodo: inlineAssist.beginSelectionTodo,
1060
+ paneEditorScrolls: docs.paneEditorScrolls,
1061
+ paneSelections: docs.paneSelections,
1062
+ showSourceTodo: inlineAssist.showSourceTodo,
1063
+ openPageContextMenu: docs.openPageContextMenu,
1064
+ uploadFile: docs.uploadFile,
1065
+ resourceRevision: docs.resourceRevision,
1066
+ renameDocumentTitle: docs.renameDocumentTitle,
1067
+ insertBlockBelowTitle: docs.insertBlockBelowTitle,
1068
+ commentAnchors: docs.commentAnchors,
1069
+ paneEditorReady: docs.paneEditorReady,
1070
+ paneSourceSelections: docs.paneSourceSelections,
1071
+ insertSourceFiles: docs.insertSourceFiles,
1072
+ setPaneEditor: docs.setPaneEditor,
1073
+ openDocumentLink: docs.openDocumentLink,
1074
+ openWikiLink: docs.openWikiLink,
1075
+ openBlankBlockAssistant: inlineAssist.openBlankBlockAssistant,
1076
+ startDocumentDraft: inlineAssist.startDocumentDraft,
1077
+ quickInitialize: docs.quickInitialize,
1078
+ chooseInitialTemplate: docs.chooseInitialTemplate,
1079
+ setPaneComments: docs.setPaneComments,
1080
+ discussWithAssistant: inlineAssist.discussWithAssistant,
1081
+ capturePaneCommentSelection: docs.capturePaneCommentSelection,
1082
+ focusPaneComment: docs.focusPaneComment,
1083
+ paneCommentGeometry: docs.paneCommentGeometry,
1084
+ paneScrolls: docs.paneScrolls,
1085
+ revealAssistantSelection: docs.revealAssistantSelection,
1086
+ openAssistant: inlineAssist.openAssistant,
1087
+ showOutline: outlineCtrl.showOutline,
1088
+ touchOutlineOpen: outlineCtrl.touchOutlineOpen,
1089
+ outlineOnLeft: outlineCtrl.outlineOnLeft,
1090
+ hoverOutline: outlineCtrl.hoverOutline,
1091
+ outlinePinned: outlineCtrl.outlinePinned,
1092
+ outlinePosition: outlineCtrl.outlinePosition,
1093
+ openOutlineContextMenu: outlineCtrl.openOutlineContextMenu,
1094
+ releaseOutlinePointerFocus: outlineCtrl.releaseOutlinePointerFocus,
1095
+ outlineAutoCollapse: outlineCtrl.outlineAutoCollapse,
1096
+ outlineSearchOpen: outlineCtrl.outlineSearchOpen,
1097
+ setOutlineSearchInput,
1098
+ toggleOutlineSearch: outlineCtrl.toggleOutlineSearch,
1099
+ toggleOutlinePin: outlineCtrl.toggleOutlinePin,
1100
+ outlineSearch: outlineCtrl.outlineSearch,
1101
+ visibleOutline: outlineCtrl.visibleOutline,
1102
+ jumpToHeading: outlineCtrl.jumpToHeading,
1103
+ outline: outlineCtrl.outline,
1104
+ activeHeading: outlineCtrl.activeHeading,
1105
+ scheduleActiveHeading: outlineCtrl.scheduleActiveHeading,
1106
+ toggleOutlineSide: outlineCtrl.toggleOutlineSide,
1107
+ },
1108
+ treeMenus: {
1109
+ setFileTree,
1110
+ treeFiles: tree.treeFiles,
1111
+ revealedHomeId: tree.revealedHomeId,
1112
+ treeDocumentIcons: tree.treeDocumentIcons,
1113
+ loadTreeDocumentIcon: tree.loadTreeDocumentIcon,
1114
+ selectedEntryIds: tree.selectedEntryIds,
1115
+ canDragEntry: tree.canDragEntry,
1116
+ treeRename: tree.treeRename,
1117
+ renameTreeEntry: tree.renameTreeEntry,
1118
+ openTreeEntry: tree.openTreeEntry,
1119
+ selectFileTreeEntry: tree.selectFileTreeEntry,
1120
+ fileDragStart: tree.fileDragStart,
1121
+ fileDragEnd: tree.fileDragEnd,
1122
+ fileDragOver: tree.fileDragOver,
1123
+ fileDragLeave: tree.fileDragLeave,
1124
+ fileDrop: tree.fileDrop,
1125
+ draggedEntry: tree.draggedEntry,
1126
+ dropFolder: tree.dropFolder,
1127
+ dropPlaceholders: tree.dropPlaceholders,
1128
+ tabFileDrag: tree.tabFileDrag,
1129
+ finishTreeRename: tree.finishTreeRename,
1130
+ fileMetadataTarget: tree.fileMetadataTarget,
1131
+ openFileContextMenu: tree.openFileContextMenu,
1132
+ openDirectoryContextMenu: tree.openDirectoryContextMenu,
1133
+ openWorkspaceEntryContextMenu: tree.openWorkspaceEntryContextMenu,
1134
+ workspaceDropdownContextMenu: tree.workspaceDropdownContextMenu,
1135
+ fileContextMenu: tree.fileContextMenu,
1136
+ multipleContextEntries: tree.multipleContextEntries,
1137
+ contextEntries: tree.contextEntries,
1138
+ fileContextKeydown: tree.fileContextKeydown,
1139
+ selectionDeleteDisabled: tree.selectionDeleteDisabled,
1140
+ fileContextAction: tree.fileContextAction,
1141
+ contextFolderHome: tree.contextFolderHome,
1142
+ folderHomeContextAction: tree.folderHomeContextAction,
1143
+ fileMutationDisabled: tree.fileMutationDisabled,
1144
+ directoryHasManagedFile: tree.directoryHasManagedFile,
1145
+ canDuplicateEntry: tree.canDuplicateEntry,
1146
+ folderConversionIssue: tree.folderConversionIssue,
1147
+ convertDocumentStructure: tree.convertDocumentStructure,
1148
+ closeFileContextMenu: tree.closeFileContextMenu,
1149
+ fileDeleteDisabled: tree.fileDeleteDisabled,
1150
+ directoryContextMenu: tree.directoryContextMenu,
1151
+ directoryContextAction: tree.directoryContextAction,
1152
+ directoryContextDuplicateDisabled: tree.directoryContextDuplicateDisabled,
1153
+ directoryContextRenameDisabled: tree.directoryContextRenameDisabled,
1154
+ directoryContextDeleteDisabled: tree.directoryContextDeleteDisabled,
1155
+ workspaceEntryContextMenu: tree.workspaceEntryContextMenu,
1156
+ setWorkspaceEntryContextMenuElement,
1157
+ workspaceEntryContextKeydown: tree.workspaceEntryContextKeydown,
1158
+ workspaceEntryContextAction: tree.workspaceEntryContextAction,
1159
+ pageContextMenu: docs.pageContextMenu,
1160
+ setPageContextMenuElement,
1161
+ pageContextKeydown: docs.pageContextKeydown,
1162
+ outlineContextMenu: outlineCtrl.outlineContextMenu,
1163
+ setOutlineContextMenuElement,
1164
+ outlineContextKeydown: outlineCtrl.outlineContextKeydown,
1165
+ },
1166
+ modals: {
1167
+ modal: modals.modal,
1168
+ showModal: modals.showModal,
1169
+ modalBusy: modals.modalBusy,
1170
+ modalTitle: modals.modalTitle,
1171
+ input: modals.input,
1172
+ setModalInputElement: modals.setModalInputElement,
1173
+ searchResults: modals.searchResults,
1174
+ openSearchResult: modals.openSearchResult,
1175
+ searchHighlightParts: modals.searchHighlightParts,
1176
+ searchResultLocation: modals.searchResultLocation,
1177
+ searching: modals.searching,
1178
+ searchError: modals.searchError,
1179
+ submitModal: modals.submitModal,
1180
+ modalDeleteEntries: modals.modalDeleteEntries,
1181
+ modalTarget: modals.modalTarget,
1182
+ modalError: modals.modalError,
1183
+ removeDocument: modals.removeDocument,
1184
+ settingsPanel,
1185
+ openingSettingsWindow: settingsCtrl.openingSettingsWindow,
1186
+ openSettingsTab: settingsCtrl.openSettingsTab,
1187
+ openSettingsInNewWindow: settingsCtrl.openSettingsInNewWindow,
1188
+ settingsPage: settingsCtrl.settingsPage,
1189
+ settingsContext: settingsCtrl.settingsContext,
1190
+ settingsAction: settingsCtrl.settingsAction,
1191
+ workspaceExporting: modals.workspaceExporting,
1192
+ workspaceExportError: modals.workspaceExportError,
1193
+ workspaceDeletionError: modals.workspaceDeletionError,
1194
+ deleteWorkspace: modals.deleteWorkspace,
1195
+ exportWorkspace: modals.exportWorkspace,
1196
+ commandPaletteOpened,
1197
+ importPanel,
1198
+ importRecords,
1199
+ recyclePanel,
1200
+ agentPanel,
1201
+ selectedDiff,
1202
+ historyPanel,
1203
+ historyPage,
1204
+ objectDetail,
1205
+ openObjectReference,
1206
+ planArchiveOpen,
1207
+ planDetail,
1208
+ openPlanReference,
1209
+ selectionTodo: inlineAssist.selectionTodo,
1210
+ fatal,
1211
+ },
1805
1212
  };
1806
1213
  }