@tano.page/workbench 0.14.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.
- package/package.json +50 -16
- package/src/App.vue +82 -752
- package/src/appearance/appearance.ts +14 -4
- package/src/appearance/components/ThemePresetPreview.vue +52 -8
- package/src/appearance/interface-font.ts +99 -0
- package/src/appearance/theme.ts +26 -10
- package/src/appearance/use-interface-font.ts +30 -0
- package/src/assets/mail-provider-icons/NOTICE.txt +27 -0
- package/src/assets/mail-provider-icons/aliyun-mail.svg +3 -0
- package/src/assets/mail-provider-icons/gmail.svg +1 -0
- package/src/assets/mail-provider-icons/icloud.svg +12 -0
- package/src/assets/mail-provider-icons/netease-126.svg +5 -0
- package/src/assets/mail-provider-icons/netease-163.svg +5 -0
- package/src/assets/mail-provider-icons/qq.svg +9 -0
- package/src/assets/mail-provider-icons/tencent-exmail.svg +4 -0
- package/src/assistant/agent-identities.ts +1 -97
- package/src/assistant/agent-task-context.ts +1 -54
- package/src/assistant/attachments.ts +1 -1
- package/src/assistant/completion.ts +1 -61
- package/src/assistant/components/AssistantChangeList.vue +98 -21
- package/src/assistant/components/AssistantPanel.vue +425 -8
- package/src/assistant/components/PluginToolProposalCard.vue +235 -0
- package/src/assistant/connection-actions.ts +237 -0
- package/src/assistant/document-mentions.ts +1 -33
- package/src/assistant/engine.ts +1 -532
- package/src/assistant/execution.ts +6 -33
- package/src/assistant/files.ts +5 -13
- package/src/assistant/hash.ts +1 -4
- package/src/assistant/inbox.ts +1 -148
- package/src/assistant/language.ts +10 -37
- package/src/assistant/mention-autocomplete.ts +69 -0
- package/src/assistant/plugin-bridge-builder.ts +146 -0
- package/src/assistant/prompts.ts +1 -58
- package/src/assistant/proposal-actions.ts +336 -0
- package/src/assistant/results.ts +20 -86
- package/src/assistant/store.ts +167 -327
- package/src/assistant/structures.ts +1 -155
- package/src/assistant/tasks.ts +8 -96
- package/src/assistant/tool-rules.ts +1 -7
- package/src/assistant/workspace-bridge.ts +1 -1
- package/src/composables/use-document-actions.ts +38 -20
- package/src/composables/use-file-tree-controller.ts +7 -12
- package/src/composables/use-workbench-help.ts +177 -0
- package/src/composables/use-workbench-history.ts +2 -4
- package/src/composables/use-workbench-lifecycle.ts +249 -0
- package/src/composables/use-workbench-modals.ts +6 -1
- package/src/composables/use-workbench-outline.ts +0 -5
- package/src/composables/use-workbench-settings.ts +185 -0
- package/src/composables/use-workbench-shortcuts.ts +40 -1021
- package/src/composables/use-workbench-views.ts +325 -0
- package/src/data-tables/data-tables.ts +1 -2
- package/src/documents/components/DocumentActionMenu.vue +279 -0
- package/src/documents/components/DocumentHistoryPanel.vue +3 -1
- package/src/documents/components/DocumentInspector.vue +168 -0
- package/src/documents/components/DocumentPane.vue +482 -0
- package/src/documents/description-merge.ts +1 -9
- package/src/features.ts +1 -0
- package/src/files/components/FileMetadataPanel.vue +49 -15
- package/src/fonts/Inter-Latin-Italic.woff2 +0 -0
- package/src/fonts/Inter-Latin.woff2 +0 -0
- package/src/fonts/TanoUISansSC-Bold.woff2 +0 -0
- package/src/fonts/TanoUISansSC-Medium.woff2 +0 -0
- package/src/fonts/TanoUISansSC-Regular.woff2 +0 -0
- package/src/help/help-milestones.ts +3 -5
- package/src/i18n/locale-catalogs.ts +7 -6
- package/src/i18n/locale-registry.ts +8 -6
- package/src/i18n/locales/de-DE.json +371 -3
- package/src/i18n/locales/en-US.json +371 -2
- package/src/i18n/locales/es-ES.json +371 -3
- package/src/i18n/locales/ja-JP.json +370 -2
- package/src/i18n/locales/zh-TW.json +370 -2
- package/src/mail/components/MailAccountDialog.vue +450 -0
- package/src/mail/components/MailComposerDialog.vue +326 -0
- package/src/mail/components/MailProviderIcon.vue +30 -0
- package/src/mail/components/MailWorkspaceView.vue +821 -0
- package/src/mail/components/SidebarMail.vue +134 -0
- package/src/mail/mail-avatar.ts +17 -0
- package/src/mail/mail-bridge.ts +68 -0
- package/src/mail/mail-calendar.ts +208 -0
- package/src/mail/mail-markdown.ts +195 -0
- package/src/mail/types.ts +226 -0
- package/src/objects/components/ObjectDetailModal.vue +1001 -0
- package/src/objects/content-references.ts +6 -56
- package/src/objects/wiki-links.ts +1 -48
- package/src/objects/workspace-objects.ts +3 -4
- package/src/plan-sync/types.ts +6 -3
- package/src/plans/calendar-interaction.ts +194 -0
- package/src/plans/calendar.ts +65 -9
- package/src/plans/components/CalendarAgendaView.vue +165 -0
- package/src/plans/components/CalendarDayPopover.vue +172 -39
- package/src/plans/components/CalendarFilterBar.vue +128 -0
- package/src/plans/components/CalendarMonthView.vue +224 -0
- package/src/plans/components/CalendarQuickCreateDialog.vue +269 -0
- package/src/plans/components/CalendarTimelineView.vue +517 -0
- package/src/plans/components/CalendarTopbarControls.vue +101 -0
- package/src/plans/components/CalendarView.vue +264 -748
- package/src/plans/components/CalendarYearView.vue +138 -0
- package/src/plans/components/PlanArchiveDialog.vue +295 -0
- package/src/plans/components/PlanConnectionsDialog.vue +1 -1
- package/src/plans/components/PlanDateField.vue +6 -4
- package/src/plans/components/PlanDetailPanel.vue +227 -32
- package/src/plans/components/PlanEventList.vue +16 -4
- package/src/plans/components/SidebarPlan.vue +22 -15
- package/src/plans/components/TaskRepeatControls.vue +169 -30
- package/src/plans/components/calendar-shared.css +192 -0
- package/src/plans/composables/use-calendar-interactions.ts +396 -0
- package/src/plans/composables/use-calendar-scroll.ts +420 -0
- package/src/plans/local-reminders.ts +149 -0
- package/src/plans/personal-plans.ts +10 -1
- package/src/plans/plan-date.ts +8 -1
- package/src/plans/plan-migration.ts +95 -0
- package/src/plans/recurrence.ts +95 -0
- package/src/plans/task-repeat.ts +8 -8
- package/src/plans/timeline-layout.ts +92 -0
- package/src/plugins/assistant-bridge.ts +520 -0
- package/src/plugins/attachment-reader.ts +3 -1
- package/src/plugins/cache-storage.ts +42 -2
- package/src/plugins/components/PluginAutomations.vue +3 -3
- package/src/plugins/components/PluginCatalogBrowser.vue +17 -8
- package/src/plugins/components/PluginChangeSummary.vue +16 -3
- package/src/plugins/components/PluginConnections.vue +1 -1
- package/src/plugins/components/PluginCustomView.vue +2 -2
- package/src/plugins/components/PluginDetailPage.vue +136 -57
- package/src/plugins/components/PluginDeveloperArea.vue +192 -0
- package/src/plugins/components/PluginDocumentSlot.vue +63 -0
- package/src/plugins/components/PluginExplorer.vue +21 -25
- package/src/plugins/components/PluginImportDialog.vue +410 -0
- package/src/plugins/components/PluginInstaller.vue +273 -288
- package/src/plugins/components/PluginListItem.vue +3 -0
- package/src/plugins/components/PluginMaintenance.vue +37 -34
- package/src/plugins/components/PluginRepositoryStorage.vue +4 -2
- package/src/plugins/components/PluginRuntimePanel.vue +3 -3
- package/src/plugins/components/PluginSettingsForm.vue +112 -0
- package/src/plugins/components/PluginStatusBar.vue +161 -0
- package/src/plugins/components/PluginSurface.vue +18 -6
- package/src/plugins/components/PluginUiDialog.vue +452 -0
- package/src/plugins/components/PluginsTabPage.vue +61 -0
- package/src/plugins/components/plugin-center.css +5 -0
- package/src/plugins/data.ts +9 -86
- package/src/plugins/editor-plugin-adapters.ts +169 -0
- package/src/plugins/excalidraw/bundle.tano-plugin.json +1 -1
- package/src/plugins/excalidraw/manifest.json +12 -1
- package/src/plugins/host.ts +662 -43
- package/src/plugins/native.ts +2 -10
- package/src/plugins/overlay-mapping.ts +125 -0
- package/src/plugins/packages.ts +73 -1
- package/src/plugins/plugin-data.ts +2 -3
- package/src/plugins/plugin-permissions.ts +57 -0
- package/src/plugins/plugin-rpc-router.ts +558 -0
- package/src/plugins/plugin-sdk.ts +1 -94
- package/src/plugins/plugin-ui-dialogs.ts +167 -0
- package/src/plugins/policy.ts +53 -3
- package/src/plugins/presentation-preview/bundle.tano-plugin.json +1 -1
- package/src/plugins/presentation-preview/manifest.json +2 -1
- package/src/plugins/queries.ts +1 -73
- package/src/plugins/sandbox.ts +15 -1
- package/src/plugins/use-plugin-actions.ts +67 -20
- package/src/plugins/user-plugins.ts +254 -0
- package/src/plugins/view-header.ts +2 -7
- package/src/plugins/word-preview/bundle.tano-plugin.json +1 -1
- package/src/plugins/word-preview/manifest.json +13 -1
- package/src/plugins/workbench.ts +175 -2
- package/src/plugins/worker.js +105 -8
- package/src/plugins/workspace-plugin-runtime.ts +23 -7
- package/src/plugins/workspace-plugins.ts +212 -21
- package/src/runtime.ts +103 -4
- package/src/settings/components/SettingsAppearancePage.vue +46 -0
- package/src/settings/components/SettingsDocumentsPage.vue +0 -1
- package/src/settings/components/SettingsPanel.vue +8 -3
- package/src/settings/components/WorkbenchSettings.vue +20 -7
- package/src/settings/components/settings-context.ts +1 -1
- package/src/settings/components/settings-search.ts +2 -3
- package/src/settings/settings-tab.ts +1 -0
- package/src/shell/command-palette.ts +3 -3
- package/src/shell/components/EditorToolbar.vue +8 -9
- package/src/shell/components/EditorTools.vue +1 -5
- package/src/shell/components/PaneTopbar.vue +393 -0
- package/src/shell/components/SelectionToolbar.vue +0 -2
- package/src/shell/components/SidebarNavigation.vue +22 -2
- package/src/shell/components/WorkbenchContextMenus.vue +58 -34
- package/src/shell/components/WorkbenchModals.vue +47 -62
- package/src/shell/components/WorkbenchPanes.vue +371 -1342
- package/src/shell/components/WorkbenchSidebar.vue +486 -0
- package/src/shell/components/WorkspaceBreadcrumb.vue +6 -14
- package/src/shell/components/WorkspaceViewSwitcher.vue +12 -7
- package/src/shell/pane-registry.ts +69 -0
- package/src/shell/use-surface-dismissal.ts +219 -0
- package/src/shell/use-workbench-commands.ts +599 -0
- package/src/shell/use-workbench-keybindings.ts +337 -0
- package/src/shell/use-workbench.ts +531 -1153
- package/src/shell/workbench-async-components.ts +14 -5
- package/src/shell/workbench-context.ts +30 -3
- package/src/stores/mail.ts +414 -0
- package/src/stores/plan-sync.ts +2 -1
- package/src/stores/plans.ts +2 -9
- package/src/stores/workspace-document-io.ts +807 -0
- package/src/stores/workspace-file-ops.ts +1 -1
- package/src/stores/workspace-knowledge.ts +2 -114
- package/src/stores/workspace-lifecycle.ts +459 -0
- package/src/stores/workspace-plugins-state.ts +254 -259
- package/src/stores/workspace-session.ts +287 -0
- package/src/stores/workspace-tabs-layout.ts +6 -44
- package/src/stores/workspace-types.ts +50 -0
- package/src/stores/workspace.ts +184 -1363
- package/src/styles/agent-diff-modals.css +0 -7
- package/src/styles/dark-theme.css +3 -3
- package/src/styles/inspector.css +0 -59
- package/src/styles/layout-themes.css +346 -0
- package/src/styles/mail.css +1568 -0
- package/src/styles/mobile.css +2 -2
- package/src/styles/recent-and-media.css +0 -17
- package/src/styles/theme-contract.css +3 -3
- package/src/styles/workbench-shell.css +110 -17
- package/src/styles/workspace-states.css +9 -33
- package/src/styles.css +0 -1
- package/src/tabs/components/DesktopTabs.vue +19 -14
- package/src/tabs/components/NewTabPicker.vue +10 -4
- package/src/tabs/tab-label.ts +0 -1
- package/src/windows/AuxiliaryWindows.vue +2 -2
- package/src/windows/use-window-event-bridge.ts +152 -0
- package/src/workspace/components/TemplateLibrary.vue +1 -1
- package/src/workspace/components/WorkspaceGeneralSettings.vue +0 -13
- package/src/workspace/components/WorkspaceIconPicker.vue +30 -7
- package/src/workspace/components/WorkspacePickerMenu.vue +317 -0
- package/src/workspace/workspace-comments.ts +11 -151
- package/src/workspace/workspace-welcome.ts +1 -1
- package/src/assistant/locales/de-DE.json +0 -126
- package/src/assistant/locales/en-US.json +0 -126
- package/src/assistant/locales/es-ES.json +0 -126
- package/src/assistant/locales/ja-JP.json +0 -126
- package/src/assistant/locales/zh-CN.json +0 -126
- package/src/assistant/locales/zh-TW.json +0 -126
- package/src/assistant/task-prompts.json +0 -39
- package/src/documents/components/FormulaMenu.vue +0 -50
- package/src/files/components/FileDatabasePage.vue +0 -152
- package/src/files/components/FolderHomeIcon.vue +0 -12
- package/src/objects/components/ObjectDatabasePage.vue +0 -100
- package/src/objects/components/ObjectPanel.vue +0 -554
- package/src/plans/components/PersonalPlanDialog.vue +0 -105
- package/src/shell/components/WorkspaceViewPage.vue +0 -127
- package/src/shell/components/WorkspaceViewTab.vue +0 -24
- package/src/styles/object-panel.css +0 -163
- package/src/workspace/components/GitInspectionPanel.vue +0 -35
- package/src/workspace/components/WorkspaceSyncPanel.vue +0 -50
- package/src/workspace/welcome-slogans.ts +0 -11
- package/src/workspace/workspace-git.ts +0 -35
- package/src/workspace/workspace-sync.ts +0 -46
- package/src/workspace/workspace-views.ts +0 -48
|
@@ -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,79 +8,59 @@ import {
|
|
|
10
8
|
watch,
|
|
11
9
|
} from 'vue';
|
|
12
10
|
import { storeToRefs } from 'pinia';
|
|
13
|
-
import { Bot, Settings2 } from 'lucide-vue-next';
|
|
14
11
|
import { version as appVersion } from '../../package.json';
|
|
15
|
-
import { defaultSelectionContext } from '@tano/editor/selection-context';
|
|
16
12
|
import {
|
|
17
13
|
fileHandlers,
|
|
18
|
-
isDataTableFilePath,
|
|
19
|
-
isMarkdown,
|
|
20
14
|
isObjectPath,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
relativeWorkspaceReference,
|
|
15
|
+
isPlanObject,
|
|
16
|
+
isPlanObjectType,
|
|
24
17
|
resolveReference,
|
|
25
|
-
safeRemoteImage,
|
|
26
18
|
type FileEntry,
|
|
27
19
|
type ReferenceIdentity,
|
|
28
|
-
type ReferenceTarget,
|
|
29
20
|
} from '@tano/protocol';
|
|
30
21
|
import { native } from '../workspace/adapter';
|
|
31
22
|
import { agentInboxKey, useAgentInboxController } from '../assistant/agent-controller';
|
|
32
23
|
import { butterflyScope } from '../assistant/butterfly';
|
|
33
24
|
import { butterflyPerchDirective, provideButterflyController } from '../assistant/butterfly-vue';
|
|
34
|
-
import { ASSISTANT_TAB_ID, openAssistantPage } from '../assistant/navigation';
|
|
35
25
|
import { useAssistantStore, useInlineAssistantStore } from '../assistant/store';
|
|
36
26
|
import type { AttachmentStatusUpdate } from '../files/attachment-status';
|
|
37
|
-
import { nativeAttachments
|
|
38
|
-
import
|
|
27
|
+
import { nativeAttachments } from '../files/attachments';
|
|
28
|
+
import type FileTree from '../files/components/FileTree.vue';
|
|
39
29
|
import type { ImportRecord } from '../workspace/components/ImportPanel.vue';
|
|
40
30
|
import { useDocumentActions } from '../composables/use-document-actions';
|
|
41
31
|
import { useFileTreeController } from '../composables/use-file-tree-controller';
|
|
42
32
|
import { useInlineAssistant } from '../composables/use-inline-assistant';
|
|
43
|
-
import {
|
|
33
|
+
import { useWorkbenchHelp } from '../composables/use-workbench-help';
|
|
44
34
|
import { useWorkbenchHistory } from '../composables/use-workbench-history';
|
|
35
|
+
import { useWorkbenchLifecycle } from '../composables/use-workbench-lifecycle';
|
|
45
36
|
import { useWorkbenchModals } from '../composables/use-workbench-modals';
|
|
46
37
|
import { useWorkbenchOutline } from '../composables/use-workbench-outline';
|
|
47
38
|
import { useWorkbenchPreferences } from '../composables/use-workbench-preferences';
|
|
39
|
+
import { useWorkbenchSettings } from '../composables/use-workbench-settings';
|
|
48
40
|
import { useWorkbenchShortcuts } from '../composables/use-workbench-shortcuts';
|
|
49
|
-
import {
|
|
41
|
+
import { useWorkbenchViews } from '../composables/use-workbench-views';
|
|
42
|
+
import { isTableTab } from '../data-tables/data-tables';
|
|
50
43
|
import { appearanceText } from '../documents/document-appearance';
|
|
51
44
|
import { useDocumentFavicon } from '../documents/document-favicon';
|
|
52
|
-
import {
|
|
53
|
-
import type { HelpAvailability, HelpContext } from '../help/help-content';
|
|
54
|
-
import { t, uiLocale } from '../i18n/i18n';
|
|
45
|
+
import { t } from '../i18n/i18n';
|
|
55
46
|
import { planKey } from '../plans/personal-plans';
|
|
47
|
+
import { planDocumentSource } from '../plans/selection-todo';
|
|
56
48
|
import { mobile } from '../platform/platform';
|
|
57
|
-
import { nativeListen as listen } from '../platform/native-bridge';
|
|
58
|
-
import { pluginPreviewStatus, pluginViewHeader } from '../plugins/view-header';
|
|
59
49
|
import {
|
|
60
50
|
createLocalExtensions,
|
|
61
51
|
useWorkbenchRuntime,
|
|
62
52
|
type WorkbenchActions,
|
|
63
|
-
type WorkbenchViewTab,
|
|
64
53
|
} from '../runtime';
|
|
65
|
-
import { planDocumentSource } from '../plans/selection-todo';
|
|
66
|
-
import { readSettingsPage } from '../settings/settings-preference';
|
|
67
|
-
import type { SettingsPageId } from '../settings/settings-window';
|
|
68
|
-
import { shortcutAriaLabel, shortcutKeys } from './shortcuts';
|
|
69
54
|
import { usePlanSyncStore } from '../stores/plan-sync';
|
|
70
55
|
import { usePlanStore } from '../stores/plans';
|
|
71
56
|
import { useSuggestionStore } from '../stores/suggestions';
|
|
72
57
|
import { useUpdatesStore } from '../stores/updates';
|
|
73
58
|
import { useWorkspaceStore } from '../stores/workspace';
|
|
74
|
-
import {
|
|
59
|
+
import type { ObjectRecord } from '../objects/workspace-objects';
|
|
75
60
|
import { useWindowContext } from '../windows/context';
|
|
76
61
|
import { useAuxiliaryWindows } from '../windows/manager';
|
|
77
|
-
import {
|
|
78
|
-
resolvePluginSidebar,
|
|
79
|
-
useWorkbenchNavigation,
|
|
80
|
-
type WorkspaceSidebarView,
|
|
81
|
-
} from './workbench-navigation';
|
|
62
|
+
import { useViewport } from './viewport';
|
|
82
63
|
import { retainWorkbenchSession } from './workbench-session';
|
|
83
|
-
import type { ObjectRecord } from '../objects/workspace-objects';
|
|
84
|
-
import { PLUGINS_TAB_ID } from '../plugins/workspace-plugins';
|
|
85
|
-
import { createWorkspaceSync, syncEvent } from '../workspace/workspace-sync';
|
|
86
64
|
|
|
87
65
|
export interface WorkbenchProps {
|
|
88
66
|
initialWorkspace?: string;
|
|
@@ -126,7 +104,6 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
|
|
|
126
104
|
watch(agentInbox.error, (error) => {
|
|
127
105
|
if (error) store.report(error);
|
|
128
106
|
});
|
|
129
|
-
// Keep the panel mounted until its closing transition releases the layout space.
|
|
130
107
|
const assistantPanelMounted = ref(assistant.opened);
|
|
131
108
|
watch(
|
|
132
109
|
() => assistant.opened,
|
|
@@ -174,7 +151,6 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
|
|
|
174
151
|
|
|
175
152
|
const plans = usePlanStore();
|
|
176
153
|
usePlanSyncStore();
|
|
177
|
-
// Document tabs belong to the desktop app. Mobile and web use page navigation.
|
|
178
154
|
const tabsEnabled = native && !mobile;
|
|
179
155
|
const { width: viewportWidth, touch: touchLayout, compact: compactPanes } = useViewport(mobile);
|
|
180
156
|
const isAuxiliaryWindow = false;
|
|
@@ -184,7 +160,6 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
|
|
|
184
160
|
const workspaceAdapter = useWorkbenchRuntime().adapter;
|
|
185
161
|
const documentationBaseUrl = useWorkbenchRuntime().documentationBaseUrl;
|
|
186
162
|
const extensions = useWorkbenchRuntime().extensions?.() ?? createLocalExtensions();
|
|
187
|
-
const extensionViews = extensions.views ?? [];
|
|
188
163
|
const editing = extensions.editing;
|
|
189
164
|
|
|
190
165
|
const { workspace, active, activeId, activities, fatal, busy } = storeToRefs(store);
|
|
@@ -209,7 +184,6 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
|
|
|
209
184
|
const importRecords = ref<ImportRecord[]>([]);
|
|
210
185
|
const agentPanel = ref(false);
|
|
211
186
|
const recyclePanel = ref(false);
|
|
212
|
-
const systemSyncPanel = ref(false);
|
|
213
187
|
const templateLibraryOpen = ref(false);
|
|
214
188
|
const templatePaneId = ref('');
|
|
215
189
|
const templateSource = ref('');
|
|
@@ -227,22 +201,6 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
|
|
|
227
201
|
if (compact) sidebar.value = false;
|
|
228
202
|
});
|
|
229
203
|
|
|
230
|
-
// Navigation & view tabs
|
|
231
|
-
const SETTINGS_TAB_ID = 'view:settings';
|
|
232
|
-
const settingsTabView: WorkbenchViewTab = {
|
|
233
|
-
id: SETTINGS_TAB_ID,
|
|
234
|
-
get label() {
|
|
235
|
-
return t('设置');
|
|
236
|
-
},
|
|
237
|
-
icon: Settings2,
|
|
238
|
-
scope: 'account',
|
|
239
|
-
detachable: true,
|
|
240
|
-
};
|
|
241
|
-
store.registerViews([
|
|
242
|
-
...extensionViews,
|
|
243
|
-
settingsTabView,
|
|
244
|
-
{ id: ASSISTANT_TAB_ID, label: t('助手'), icon: Bot },
|
|
245
|
-
]);
|
|
246
204
|
store.setBeforeWorkspaceChange(async () => {
|
|
247
205
|
if (!(await auxiliaryWindows.closeAll()))
|
|
248
206
|
throw new Error(t('还有未保存的修改,请先处理保存错误。'));
|
|
@@ -250,294 +208,31 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
|
|
|
250
208
|
await inlineRunner.settle();
|
|
251
209
|
await agentInbox.settle();
|
|
252
210
|
});
|
|
253
|
-
const activeExtensionView = computed(() =>
|
|
254
|
-
extensionViews.find((view) => view.id === store.activeId),
|
|
255
|
-
);
|
|
256
|
-
watch(
|
|
257
|
-
activeExtensionView,
|
|
258
|
-
(view) => {
|
|
259
|
-
if (view?.collapseSidebarOnOpen) sidebar.value = false;
|
|
260
|
-
},
|
|
261
|
-
{ immediate: true },
|
|
262
|
-
);
|
|
263
211
|
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
isAuxiliaryWindow
|
|
267
|
-
? undefined
|
|
268
|
-
: {
|
|
269
|
-
getItem: (key) => localStorage.getItem(key),
|
|
270
|
-
setItem: (key, value) => localStorage.setItem(key, value),
|
|
271
|
-
},
|
|
272
|
-
);
|
|
273
|
-
const { context: navigationContext, module: navigationModule, workspaceView, sidebarView } =
|
|
274
|
-
navigation;
|
|
275
|
-
let personalPlanScope: typeof plans.view = 'all';
|
|
276
|
-
// Migrate the former workspace plan mode to the workspace view switcher.
|
|
277
|
-
watch(
|
|
278
|
-
[navigationContext, navigationModule],
|
|
279
|
-
([context, module]) => {
|
|
280
|
-
if (context === 'workspace' && module === 'plan') navigation.selectWorkspaceView('events');
|
|
281
|
-
},
|
|
282
|
-
{ immediate: true },
|
|
283
|
-
);
|
|
284
|
-
|
|
285
|
-
const homeContent = ref<string>();
|
|
286
|
-
const homeExtension = computed(() =>
|
|
287
|
-
extensionViews.find((view) => view.id === homeContent.value),
|
|
288
|
-
);
|
|
289
|
-
|
|
290
|
-
const calendar = useWorkbenchCalendar({
|
|
212
|
+
// Views, sidebar navigation, calendar & toolbar visibility items
|
|
213
|
+
const views = useWorkbenchViews({
|
|
291
214
|
store,
|
|
292
215
|
plans,
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
homeContent,
|
|
216
|
+
extensions,
|
|
217
|
+
attachments,
|
|
218
|
+
isAuxiliaryWindow,
|
|
297
219
|
compactPanes,
|
|
298
220
|
sidebar,
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
function selectContext(context: 'home' | 'workspace') {
|
|
303
|
-
calendar.rememberCalendar();
|
|
304
|
-
if (navigationContext.value === 'home') personalPlanScope = plans.view;
|
|
305
|
-
navigation.selectContext(context);
|
|
306
|
-
plans.view = navigationContext.value === 'home' ? personalPlanScope : 'workspace';
|
|
307
|
-
calendar.restoreCalendar();
|
|
308
|
-
workspaceMenu.value = false;
|
|
309
|
-
}
|
|
310
|
-
watch(navigationContext, (context) => {
|
|
311
|
-
plans.view = context === 'home' ? personalPlanScope : 'workspace';
|
|
312
|
-
});
|
|
313
|
-
function selectWorkspaceView(id: string) {
|
|
314
|
-
calendar.rememberCalendar();
|
|
315
|
-
if (navigationContext.value === 'home') personalPlanScope = plans.view;
|
|
316
|
-
navigation.selectWorkspaceView(id as WorkspaceSidebarView);
|
|
317
|
-
calendar.restoreCalendar();
|
|
318
|
-
if (id === 'events') plans.view = 'workspace';
|
|
319
|
-
}
|
|
320
|
-
function selectModule(id: string) {
|
|
321
|
-
calendar.rememberCalendar();
|
|
322
|
-
if (navigationContext.value === 'home') personalPlanScope = plans.view;
|
|
323
|
-
if (id === 'plan' && navigationContext.value === 'workspace')
|
|
324
|
-
navigation.selectWorkspaceView('events');
|
|
325
|
-
else navigation.selectModule(id);
|
|
326
|
-
calendar.restoreCalendar();
|
|
327
|
-
plans.view = navigationContext.value === 'home' ? personalPlanScope : 'workspace';
|
|
328
|
-
sidebar.value = true;
|
|
329
|
-
}
|
|
330
|
-
watch(
|
|
331
|
-
() => store.activePluginSidebar,
|
|
332
|
-
(key) => {
|
|
333
|
-
if (key) {
|
|
334
|
-
sidebarView.value = `plugin-sidebar:${key}`;
|
|
335
|
-
sidebar.value = true;
|
|
336
|
-
}
|
|
337
|
-
},
|
|
338
|
-
);
|
|
339
|
-
watch(
|
|
340
|
-
[
|
|
341
|
-
() => store.workspaceLoading.plugins || store.installedPluginWorkspace !== store.workspace?.id,
|
|
342
|
-
() => store.pluginViews,
|
|
343
|
-
sidebarView,
|
|
344
|
-
],
|
|
345
|
-
([loading, views, current]) => {
|
|
346
|
-
const resolved = resolvePluginSidebar(current, loading, views);
|
|
347
|
-
if (resolved !== current) sidebarView.value = resolved;
|
|
348
|
-
},
|
|
349
|
-
);
|
|
350
|
-
watch(sidebarView, (current) => {
|
|
351
|
-
if (store.activePluginSidebar && current !== `plugin-sidebar:${store.activePluginSidebar}`)
|
|
352
|
-
store.activePluginSidebar = '';
|
|
221
|
+
workspaceMenu,
|
|
222
|
+
openSettings: (page) => settingsCtrl.openSettings(page),
|
|
353
223
|
});
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
calendar.restoreCalendar();
|
|
367
|
-
if (!store.workspace) homeContent.value = id;
|
|
368
|
-
else store.openViewTab(id);
|
|
369
|
-
if (compactPanes.value) sidebar.value = false;
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
const viewActions = Object.fromEntries(
|
|
373
|
-
extensionViews.map((view) => [
|
|
374
|
-
view.id,
|
|
375
|
-
{
|
|
376
|
-
open: () => {
|
|
377
|
-
openExtensionView(view.id);
|
|
378
|
-
if (compactPanes.value) sidebar.value = false;
|
|
379
|
-
},
|
|
380
|
-
showSidebar: () => {
|
|
381
|
-
selectModule(view.id);
|
|
382
|
-
sidebar.value = true;
|
|
383
|
-
},
|
|
384
|
-
},
|
|
385
|
-
]),
|
|
386
|
-
);
|
|
387
|
-
|
|
388
|
-
// Header / toolbar visibility item descriptors
|
|
389
|
-
const sidebarNavigationItems = computed(() => [
|
|
390
|
-
{
|
|
391
|
-
id: 'plan',
|
|
392
|
-
get label() {
|
|
393
|
-
return t('计划');
|
|
394
|
-
},
|
|
395
|
-
},
|
|
396
|
-
...extensionViews
|
|
397
|
-
.filter((view) => view.sidebar)
|
|
398
|
-
.map((view) => ({ id: view.id, label: view.label })),
|
|
399
|
-
]);
|
|
400
|
-
const sidebarHeaderItems = computed(() => [
|
|
401
|
-
...(navigationModule.value === 'workspace'
|
|
402
|
-
? [
|
|
403
|
-
{
|
|
404
|
-
id: 'search',
|
|
405
|
-
get label() {
|
|
406
|
-
return t('查找文档');
|
|
407
|
-
},
|
|
408
|
-
},
|
|
409
|
-
...(store.workspaceSettings.showGraph
|
|
410
|
-
? [
|
|
411
|
-
{
|
|
412
|
-
id: 'graph',
|
|
413
|
-
get label() {
|
|
414
|
-
return t('关系图谱');
|
|
415
|
-
},
|
|
416
|
-
},
|
|
417
|
-
]
|
|
418
|
-
: []),
|
|
419
|
-
]
|
|
420
|
-
: []),
|
|
421
|
-
...extensionViews
|
|
422
|
-
.filter((view) => view.header)
|
|
423
|
-
.map((view) => ({ id: view.id, label: view.label })),
|
|
424
|
-
]);
|
|
425
|
-
const repositoryActionItems = computed(() => [
|
|
426
|
-
{
|
|
427
|
-
id: 'create',
|
|
428
|
-
get label() {
|
|
429
|
-
return t('新建文档');
|
|
430
|
-
},
|
|
431
|
-
},
|
|
432
|
-
{
|
|
433
|
-
id: 'folder',
|
|
434
|
-
get label() {
|
|
435
|
-
return t('新建文件夹');
|
|
436
|
-
},
|
|
437
|
-
},
|
|
438
|
-
]);
|
|
439
|
-
const documentToolItems = [
|
|
440
|
-
{
|
|
441
|
-
id: 'markdown-reveal',
|
|
442
|
-
get label() {
|
|
443
|
-
return t('光标展开源码');
|
|
444
|
-
},
|
|
445
|
-
},
|
|
446
|
-
{
|
|
447
|
-
id: 'source-mode',
|
|
448
|
-
get label() {
|
|
449
|
-
return t('源码模式');
|
|
450
|
-
},
|
|
451
|
-
},
|
|
452
|
-
];
|
|
453
|
-
const topbarItems = [
|
|
454
|
-
{
|
|
455
|
-
id: 'breadcrumb',
|
|
456
|
-
get label() {
|
|
457
|
-
return t('面包屑');
|
|
458
|
-
},
|
|
459
|
-
},
|
|
460
|
-
];
|
|
461
|
-
const calendarToolItems = [
|
|
462
|
-
{
|
|
463
|
-
id: 'calendar-period',
|
|
464
|
-
get label() {
|
|
465
|
-
return t('日历日期');
|
|
466
|
-
},
|
|
467
|
-
},
|
|
468
|
-
{
|
|
469
|
-
id: 'calendar-today',
|
|
470
|
-
get label() {
|
|
471
|
-
return t('今天');
|
|
472
|
-
},
|
|
473
|
-
},
|
|
474
|
-
{
|
|
475
|
-
id: 'calendar-previous',
|
|
476
|
-
get label() {
|
|
477
|
-
return t('上一时段');
|
|
478
|
-
},
|
|
479
|
-
},
|
|
480
|
-
{
|
|
481
|
-
id: 'calendar-next',
|
|
482
|
-
get label() {
|
|
483
|
-
return t('下一时段');
|
|
484
|
-
},
|
|
485
|
-
},
|
|
486
|
-
{
|
|
487
|
-
id: 'calendar-mode',
|
|
488
|
-
get label() {
|
|
489
|
-
return t('日历视图');
|
|
490
|
-
},
|
|
491
|
-
},
|
|
492
|
-
{
|
|
493
|
-
id: 'calendar-events',
|
|
494
|
-
get label() {
|
|
495
|
-
return t('管理事件');
|
|
496
|
-
},
|
|
497
|
-
},
|
|
498
|
-
];
|
|
499
|
-
function topbarVisibilityItems(tabId: string, hasDocument: boolean, activePane: boolean) {
|
|
500
|
-
return [
|
|
501
|
-
...topbarItems.filter(
|
|
502
|
-
(item) => item.id !== 'breadcrumb' || (tabId !== CALENDAR_TAB_ID && tabId !== GRAPH_TAB_ID),
|
|
503
|
-
),
|
|
504
|
-
...(hasDocument || tabId.startsWith('attachment:')
|
|
505
|
-
? [
|
|
506
|
-
{
|
|
507
|
-
id: 'document-status',
|
|
508
|
-
get label() {
|
|
509
|
-
return t('文章状态');
|
|
510
|
-
},
|
|
511
|
-
},
|
|
512
|
-
]
|
|
513
|
-
: []),
|
|
514
|
-
...(activePane && extensions.regions['editing-status']
|
|
515
|
-
? [
|
|
516
|
-
{
|
|
517
|
-
id: 'editing-status',
|
|
518
|
-
get label() {
|
|
519
|
-
return t('同步状态');
|
|
520
|
-
},
|
|
521
|
-
},
|
|
522
|
-
]
|
|
523
|
-
: []),
|
|
524
|
-
...(tabId === CALENDAR_TAB_ID ? calendarToolItems : []),
|
|
525
|
-
...(tabId.startsWith('attachment:') && attachments
|
|
526
|
-
? [
|
|
527
|
-
{
|
|
528
|
-
id: 'attachment-export',
|
|
529
|
-
get label() {
|
|
530
|
-
return t('导出附件');
|
|
531
|
-
},
|
|
532
|
-
},
|
|
533
|
-
]
|
|
534
|
-
: []),
|
|
535
|
-
...(hasDocument ? documentToolItems : []),
|
|
536
|
-
].map((item, index, items) => ({
|
|
537
|
-
...item,
|
|
538
|
-
separatorBefore: items[index - 1]?.id === 'document-status',
|
|
539
|
-
}));
|
|
540
|
-
}
|
|
224
|
+
const {
|
|
225
|
+
extensionViews,
|
|
226
|
+
navigation,
|
|
227
|
+
navigationContext,
|
|
228
|
+
navigationModule,
|
|
229
|
+
workspaceView,
|
|
230
|
+
sidebarView,
|
|
231
|
+
calendar,
|
|
232
|
+
selectContext,
|
|
233
|
+
selectWorkspaceView,
|
|
234
|
+
selectModule,
|
|
235
|
+
} = views;
|
|
541
236
|
|
|
542
237
|
// Attachment status
|
|
543
238
|
const attachmentStates = ref<Record<string, AttachmentStatusUpdate>>({});
|
|
@@ -575,7 +270,7 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
|
|
|
575
270
|
store.workspace?.readOnly ? t('只读权限') : store.isDemo ? t('浏览器演示') : null,
|
|
576
271
|
);
|
|
577
272
|
|
|
578
|
-
// Workbench session
|
|
273
|
+
// Workbench session
|
|
579
274
|
const workbenchSession = retainWorkbenchSession(store, () => {
|
|
580
275
|
void extensions.disconnect().catch(store.report);
|
|
581
276
|
assistant.stop();
|
|
@@ -583,40 +278,9 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
|
|
|
583
278
|
void editing.dispose().catch(store.report);
|
|
584
279
|
store.dispose();
|
|
585
280
|
});
|
|
586
|
-
let unmounted = false;
|
|
587
281
|
assistant.setManaged((id) => editing.isManaging(id));
|
|
588
282
|
inlineRunner.setManaged((id) => editing.isManaging(id));
|
|
589
283
|
|
|
590
|
-
const workspaceSync = createWorkspaceSync(store, extensions);
|
|
591
|
-
function openSystemSync(event?: Event) {
|
|
592
|
-
const id = (event as CustomEvent | undefined)?.detail?.workspaceId;
|
|
593
|
-
if (!native || mobile || !store.workspace || store.isWeb || (id && id !== store.workspace.id))
|
|
594
|
-
return;
|
|
595
|
-
workspaceMenu.value = false;
|
|
596
|
-
systemSyncPanel.value = true;
|
|
597
|
-
void workspaceSync.action('status');
|
|
598
|
-
}
|
|
599
|
-
let syncTimer: ReturnType<typeof setInterval> | undefined;
|
|
600
|
-
onMounted(() => {
|
|
601
|
-
window.addEventListener(syncEvent, openSystemSync);
|
|
602
|
-
if (native && !mobile)
|
|
603
|
-
syncTimer = setInterval(() => {
|
|
604
|
-
void workspaceSync.tick();
|
|
605
|
-
}, 30_000);
|
|
606
|
-
});
|
|
607
|
-
onBeforeUnmount(() => {
|
|
608
|
-
window.removeEventListener(syncEvent, openSystemSync);
|
|
609
|
-
clearInterval(syncTimer);
|
|
610
|
-
workspaceSync.reset();
|
|
611
|
-
});
|
|
612
|
-
watch(
|
|
613
|
-
() => store.workspace?.id,
|
|
614
|
-
() => {
|
|
615
|
-
systemSyncPanel.value = false;
|
|
616
|
-
workspaceSync.reset();
|
|
617
|
-
},
|
|
618
|
-
);
|
|
619
|
-
|
|
620
284
|
const updates = useUpdatesStore();
|
|
621
285
|
const updateLock = computed(() => ['downloading', 'installing'].includes(updates.state.phase));
|
|
622
286
|
|
|
@@ -639,7 +303,6 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
|
|
|
639
303
|
templatePaneId.value = store.activePaneId;
|
|
640
304
|
templateSource.value = store.active?.content ?? '';
|
|
641
305
|
templateInitialization.value = undefined;
|
|
642
|
-
// Let the captured pane settle before showing the page; the editor stays mounted.
|
|
643
306
|
void nextTick(() => {
|
|
644
307
|
templateLibraryOpen.value = true;
|
|
645
308
|
});
|
|
@@ -679,7 +342,6 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
|
|
|
679
342
|
activeWindow,
|
|
680
343
|
editing,
|
|
681
344
|
extensions,
|
|
682
|
-
workspaceSync,
|
|
683
345
|
attachments,
|
|
684
346
|
localNative,
|
|
685
347
|
compactPanes,
|
|
@@ -774,7 +436,6 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
|
|
|
774
436
|
selectContext,
|
|
775
437
|
openEntry: (file, newTab) => openEntry(file, newTab),
|
|
776
438
|
openImport,
|
|
777
|
-
showFileObject,
|
|
778
439
|
createNewEntry: (kind, parent) => modals.createNewEntry(kind, parent),
|
|
779
440
|
removeDocument: (target) => modals.removeDocument(target),
|
|
780
441
|
removeDocuments: (entries) => modals.removeDocuments(entries),
|
|
@@ -812,43 +473,30 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
|
|
|
812
473
|
markInitialPageRouteSuperseded: history.markInitialPageRouteSuperseded,
|
|
813
474
|
});
|
|
814
475
|
|
|
815
|
-
// Objects
|
|
816
|
-
const
|
|
817
|
-
|
|
818
|
-
const objectPanelMounted = ref(false);
|
|
819
|
-
watch(
|
|
820
|
-
objectPanel,
|
|
821
|
-
(open) => {
|
|
822
|
-
if (open) objectPanelMounted.value = true;
|
|
823
|
-
},
|
|
824
|
-
{ flush: 'sync' },
|
|
825
|
-
);
|
|
826
|
-
const selectedObjectId = ref<string>();
|
|
827
|
-
const selectedResourceIdentity = shallowRef<ReferenceIdentity>();
|
|
828
|
-
const selectedPersonal = ref(false);
|
|
476
|
+
// Objects & plans
|
|
477
|
+
const objectDetail = shallowRef<{ record?: ObjectRecord; initialType?: string }>();
|
|
478
|
+
const planArchiveOpen = ref(false);
|
|
829
479
|
const planDetail = shallowRef<ObjectRecord>();
|
|
830
|
-
const assetInput = ref<HTMLInputElement>();
|
|
831
|
-
const assetImportBusy = ref(false);
|
|
832
480
|
|
|
833
|
-
function
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
481
|
+
function openObjectDetail(record: ObjectRecord) {
|
|
482
|
+
planDetail.value = undefined;
|
|
483
|
+
objectDetail.value = { record };
|
|
484
|
+
workspaceMenu.value = false;
|
|
485
|
+
if (compactPanes.value) sidebar.value = false;
|
|
486
|
+
}
|
|
487
|
+
function createPluginObject(initialType: string) {
|
|
488
|
+
planDetail.value = undefined;
|
|
489
|
+
objectDetail.value = { initialType };
|
|
838
490
|
workspaceMenu.value = false;
|
|
839
491
|
}
|
|
840
|
-
function
|
|
841
|
-
|
|
842
|
-
selectedPersonal.value = false;
|
|
843
|
-
selectedObjectId.value = undefined;
|
|
844
|
-
selectedResourceIdentity.value = identity;
|
|
845
|
-
objectPanel.value = true;
|
|
492
|
+
function openPlanArchive() {
|
|
493
|
+
planArchiveOpen.value = true;
|
|
846
494
|
workspaceMenu.value = false;
|
|
847
495
|
}
|
|
848
496
|
function showPlanEvent(key: string) {
|
|
849
497
|
const personal = plans.personal.find((item) => planKey(item) === key);
|
|
850
498
|
const local = store.objects.find(
|
|
851
|
-
(item) => item.object.id === key &&
|
|
499
|
+
(item) => item.object.id === key && isPlanObject(item.object),
|
|
852
500
|
);
|
|
853
501
|
const record =
|
|
854
502
|
personal ??
|
|
@@ -866,15 +514,11 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
|
|
|
866
514
|
store.report(t('事项已不存在,请刷新计划后重试'));
|
|
867
515
|
return;
|
|
868
516
|
}
|
|
869
|
-
|
|
517
|
+
objectDetail.value = undefined;
|
|
870
518
|
if (record.source?.scope === 'workspace') selectContext('workspace');
|
|
871
519
|
planDetail.value = record;
|
|
872
520
|
if (compactPanes.value) sidebar.value = false;
|
|
873
521
|
}
|
|
874
|
-
function managePlanEvents() {
|
|
875
|
-
showObjects();
|
|
876
|
-
selectedPersonal.value = plans.view === 'personal';
|
|
877
|
-
}
|
|
878
522
|
async function openBreadcrumbDirectory(path: string, newTab = false) {
|
|
879
523
|
const home = tree.folderHomes.value.get(path);
|
|
880
524
|
if (home) await openEntry(home, newTab);
|
|
@@ -890,8 +534,9 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
|
|
|
890
534
|
const handler = fileHandlers.resolve(file.path);
|
|
891
535
|
if (isObjectPath(file.path)) {
|
|
892
536
|
const record = store.objects.find((item) => item.path === file.path);
|
|
893
|
-
if (record)
|
|
894
|
-
else
|
|
537
|
+
if (!record) store.report(t('对象文件不可用,请检查格式或是否存在重复 ID'));
|
|
538
|
+
else if (isPlanObject(record.object)) showPlanEvent(record.object.id);
|
|
539
|
+
else openObjectDetail(record);
|
|
895
540
|
return;
|
|
896
541
|
}
|
|
897
542
|
if (handler.preview === 'markdown' || handler.preview === 'table') {
|
|
@@ -912,39 +557,40 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
|
|
|
912
557
|
async function openReference(identity: ReferenceIdentity) {
|
|
913
558
|
const result = resolveReference(store.referenceTargets, identity);
|
|
914
559
|
if (!result.target) {
|
|
560
|
+
if (result.error === 'unregistered') {
|
|
561
|
+
const legacy = store.objects.find(
|
|
562
|
+
(item) => item.object.type === identity.type && item.object.id === identity.id,
|
|
563
|
+
);
|
|
564
|
+
if (legacy) {
|
|
565
|
+
openObjectDetail(legacy);
|
|
566
|
+
return;
|
|
567
|
+
}
|
|
568
|
+
}
|
|
915
569
|
store.report(t('当前工作区中引用目标不可用,请检查对象是否被移除或 ID 是否重复'));
|
|
916
570
|
return;
|
|
917
571
|
}
|
|
918
|
-
if (identity.type
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
572
|
+
if (identity.type === 'document' || identity.type === 'asset') {
|
|
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);
|
|
577
|
+
if (file) await openEntry(file);
|
|
922
578
|
return;
|
|
923
579
|
}
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
const
|
|
929
|
-
|
|
930
|
-
const file = workspace.value?.files.find(
|
|
931
|
-
(file) => file.id === identity.id && file.path === result.target!.path,
|
|
580
|
+
if (isPlanObjectType(identity.type)) {
|
|
581
|
+
showPlanEvent(identity.id);
|
|
582
|
+
return;
|
|
583
|
+
}
|
|
584
|
+
const record = store.objects.find(
|
|
585
|
+
(item) => item.object.type === identity.type && item.object.id === identity.id,
|
|
932
586
|
);
|
|
933
|
-
if (
|
|
934
|
-
if (identity.type === 'document') objectPanel.value = false;
|
|
935
|
-
await openEntry(file);
|
|
587
|
+
if (record) openObjectDetail(record);
|
|
936
588
|
}
|
|
937
589
|
async function openObjectReference(identity: ReferenceIdentity) {
|
|
938
|
-
if (identity.type === 'document'
|
|
590
|
+
if (identity.type === 'document' || identity.type === 'asset' || isPlanObjectType(identity.type))
|
|
591
|
+
objectDetail.value = undefined;
|
|
939
592
|
await openReference(identity);
|
|
940
593
|
}
|
|
941
|
-
async function openWorkspaceViewSourceFile(file: FileEntry) {
|
|
942
|
-
if (isMarkdown(file.path) || isDataTableFilePath(file.path)) await openEntry(file);
|
|
943
|
-
else store.openAttachmentInNewTab(file);
|
|
944
|
-
}
|
|
945
|
-
function openWorkspaceViewSourceObject(identity: ReferenceIdentity) {
|
|
946
|
-
void openObjectReference(identity);
|
|
947
|
-
}
|
|
948
594
|
async function openPlanReference(identity: ReferenceIdentity) {
|
|
949
595
|
const current = planDetail.value;
|
|
950
596
|
if (current?.source?.scope === 'personal') {
|
|
@@ -961,151 +607,28 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
|
|
|
961
607
|
if (docSource && identity.type === 'document' && identity.id === docSource.fileId)
|
|
962
608
|
await docs.revealAssistantSelection(docSource);
|
|
963
609
|
}
|
|
964
|
-
async function importObjectAssets(event: Event) {
|
|
965
|
-
const inputEl = event.target as HTMLInputElement;
|
|
966
|
-
const files = Array.from(inputEl.files ?? []);
|
|
967
|
-
inputEl.value = '';
|
|
968
|
-
const selectedWorkspace = workspace.value;
|
|
969
|
-
if (
|
|
970
|
-
!attachments ||
|
|
971
|
-
!selectedWorkspace ||
|
|
972
|
-
selectedWorkspace.readOnly ||
|
|
973
|
-
!store.capabilities.features.objectReferences ||
|
|
974
|
-
assetImportBusy.value
|
|
975
|
-
)
|
|
976
|
-
return;
|
|
977
|
-
assetImportBusy.value = true;
|
|
978
|
-
try {
|
|
979
|
-
for (const file of files) {
|
|
980
|
-
if (workspace.value?.id !== selectedWorkspace.id)
|
|
981
|
-
throw new Error(t('工作区已切换,已导入的资产保留在原工作区'));
|
|
982
|
-
await attachments.importAttachment(selectedWorkspace.id, '', file, false);
|
|
983
|
-
}
|
|
984
|
-
} catch (error) {
|
|
985
|
-
store.report(error);
|
|
986
|
-
} finally {
|
|
987
|
-
if (workspace.value?.id === selectedWorkspace.id) await store.refresh();
|
|
988
|
-
assetImportBusy.value = false;
|
|
989
|
-
}
|
|
990
|
-
}
|
|
991
|
-
function assetPreview(target: ReferenceTarget) {
|
|
992
|
-
return attachments &&
|
|
993
|
-
target.type === 'asset' &&
|
|
994
|
-
['image/png', 'image/jpeg', 'image/gif', 'image/webp'].includes(target.mime ?? '')
|
|
995
|
-
? attachments.imageUrl(workspace.value, '', relativeWorkspaceReference('', target.path))
|
|
996
|
-
: null;
|
|
997
|
-
}
|
|
998
610
|
|
|
999
|
-
// Settings
|
|
1000
|
-
const
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
await auxiliaryWindows.open('settings', 'settings', t('设置') + ' — Tano / 同页')
|
|
1021
|
-
).context;
|
|
1022
|
-
} catch (error) {
|
|
1023
|
-
settingsPanel.value = true;
|
|
1024
|
-
store.report(error);
|
|
1025
|
-
} finally {
|
|
1026
|
-
openingSettingsWindow.value = false;
|
|
1027
|
-
}
|
|
1028
|
-
}
|
|
1029
|
-
function openSettings(page: SettingsPageId = readSettingsPage(settingsPage.value)) {
|
|
1030
|
-
menu.value = false;
|
|
1031
|
-
workspaceMenu.value = false;
|
|
1032
|
-
settingsPage.value = page === 'preferences' ? 'appearance' : page;
|
|
1033
|
-
const pane = store.panes.find((pane) => pane.tabs.includes(SETTINGS_TAB_ID));
|
|
1034
|
-
if (pane) {
|
|
1035
|
-
store.focusPane(pane.id);
|
|
1036
|
-
openSettingsTab(settingsPage.value);
|
|
1037
|
-
return;
|
|
1038
|
-
}
|
|
1039
|
-
settingsPanel.value = true;
|
|
1040
|
-
}
|
|
1041
|
-
function settingsAction(
|
|
1042
|
-
action: 'open-folder' | 'switch-mode' | 'reveal' | 'agent' | 'history' | 'recycle' | 'sign-out',
|
|
1043
|
-
) {
|
|
1044
|
-
if (!settingsWorkspace.value && ['reveal', 'agent', 'history', 'recycle'].includes(action))
|
|
1045
|
-
return;
|
|
1046
|
-
settingsPanel.value = false;
|
|
1047
|
-
if (action === 'open-folder') void store.openWorkspace();
|
|
1048
|
-
else if (action === 'reveal') void store.reveal();
|
|
1049
|
-
else if (action === 'agent') agentPanel.value = true;
|
|
1050
|
-
else if (action === 'history') extensions.showHistory?.();
|
|
1051
|
-
else if (action === 'recycle') recyclePanel.value = true;
|
|
1052
|
-
}
|
|
1053
|
-
const settingsContext = computed(() => ({
|
|
1054
|
-
pluginPages: settingsWorkspace.value ? store.pluginSettingsPages : [],
|
|
1055
|
-
workspace: settingsWorkspace.value
|
|
1056
|
-
? {
|
|
1057
|
-
id: settingsWorkspace.value.id,
|
|
1058
|
-
name: settingsWorkspace.value.name,
|
|
1059
|
-
path: settingsWorkspace.value.path,
|
|
1060
|
-
readOnly: settingsWorkspace.value.readOnly,
|
|
1061
|
-
canDelete: settingsWorkspace.value.canDelete,
|
|
1062
|
-
canManageSettings: settingsWorkspace.value.canManageSettings,
|
|
1063
|
-
}
|
|
1064
|
-
: null,
|
|
1065
|
-
activeFile:
|
|
1066
|
-
settingsWorkspace.value && store.active
|
|
1067
|
-
? { id: store.active.id, path: store.active.path }
|
|
1068
|
-
: null,
|
|
1069
|
-
workspaceSettings: store.workspaceSettings,
|
|
1070
|
-
workspacePages:
|
|
1071
|
-
settingsWorkspace.value?.files
|
|
1072
|
-
.filter(
|
|
1073
|
-
(file) =>
|
|
1074
|
-
file.kind === 'file' && isMarkdown(file.path) && !isWorkspaceInternalPath(file.path),
|
|
1075
|
-
)
|
|
1076
|
-
.map((file) => ({ id: file.id, path: file.path })) ?? [],
|
|
1077
|
-
workspaceSettingsError: store.workspaceSettingsError,
|
|
1078
|
-
workspaceSettingsSaving: store.workspaceSettingsSaving,
|
|
1079
|
-
workspaceExporting: modals.workspaceExporting.value,
|
|
1080
|
-
workspaceExportError: modals.workspaceExportError.value,
|
|
1081
|
-
workspaceDeletionSupported: !!workspaceAdapter.deleteWorkspace,
|
|
1082
|
-
workspaceDeleting: modals.workspaceDeleting.value || store.busy,
|
|
1083
|
-
workspaceDeletionError: modals.workspaceDeletionError.value,
|
|
1084
|
-
mode: store.isDemo ? 'demo' : store.isWeb ? 'web' : 'local',
|
|
1085
|
-
defaultSource: prefs.defaultSource.value,
|
|
1086
|
-
theme: prefs.theme.value,
|
|
1087
|
-
appearance: prefs.appearance.value,
|
|
1088
|
-
visualFontChoice: prefs.visualFontChoice.value,
|
|
1089
|
-
customFontName: prefs.customFontName.value,
|
|
1090
|
-
splitFontSettings: prefs.splitFontSettings.value,
|
|
1091
|
-
revealMarkdown: prefs.revealMarkdown.value,
|
|
1092
|
-
toolbarMode: prefs.toolbarMode.value,
|
|
1093
|
-
shortcuts: prefs.shortcuts.value,
|
|
1094
|
-
showPageTitle: prefs.showPageTitle.value,
|
|
1095
|
-
showDocumentProperties: prefs.showDocumentProperties.value,
|
|
1096
|
-
showDocumentDiscussion: prefs.showDocumentDiscussion.value,
|
|
1097
|
-
showOutline: outlineCtrl.showOutline.value,
|
|
1098
|
-
outlineOnLeft: outlineCtrl.outlineOnLeft.value,
|
|
1099
|
-
visualFontSize: prefs.visualFontSize.value,
|
|
1100
|
-
sourceFontSize: prefs.sourceFontSize.value,
|
|
1101
|
-
editorPreferences: prefs.editorPreferences.value,
|
|
1102
|
-
historyEnabled: !!extensions.historyEnabled,
|
|
1103
|
-
capabilities: store.capabilities,
|
|
1104
|
-
capabilityError: store.capabilityError,
|
|
1105
|
-
capabilitySaving: store.capabilitySaving,
|
|
1106
|
-
version: updates.state.status?.currentVersion ?? appVersion,
|
|
1107
|
-
updates: updates.state,
|
|
1108
|
-
}));
|
|
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
|
+
});
|
|
1109
632
|
|
|
1110
633
|
const extensionActions: WorkbenchActions = {
|
|
1111
634
|
closeMenus: () => {
|
|
@@ -1115,7 +638,7 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
|
|
|
1115
638
|
createWorkspace: () => {
|
|
1116
639
|
void modals.createNewWorkspace();
|
|
1117
640
|
},
|
|
1118
|
-
openSettings,
|
|
641
|
+
openSettings: settingsCtrl.openSettings,
|
|
1119
642
|
showDiff: (value) => {
|
|
1120
643
|
selectedDiff.value = value;
|
|
1121
644
|
},
|
|
@@ -1145,13 +668,6 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
|
|
|
1145
668
|
sidebar.value = !sidebar.value;
|
|
1146
669
|
workspaceMenu.value = false;
|
|
1147
670
|
}
|
|
1148
|
-
async function dragPaneWindow(event: MouseEvent) {
|
|
1149
|
-
if (event.button !== 0 || event.detail !== 1) return;
|
|
1150
|
-
await activeWindow.value.native?.startDragging();
|
|
1151
|
-
}
|
|
1152
|
-
async function maximizePaneWindow() {
|
|
1153
|
-
await activeWindow.value.native?.toggleMaximize();
|
|
1154
|
-
}
|
|
1155
671
|
|
|
1156
672
|
// Commands, shortcuts, window listeners & auxiliary window event bindings
|
|
1157
673
|
const { workbenchCommands } = useWorkbenchShortcuts({
|
|
@@ -1194,7 +710,8 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
|
|
|
1194
710
|
commandPaletteOpened,
|
|
1195
711
|
importPanel,
|
|
1196
712
|
agentPanel,
|
|
1197
|
-
|
|
713
|
+
objectDetail,
|
|
714
|
+
planArchiveOpen,
|
|
1198
715
|
recyclePanel,
|
|
1199
716
|
historyPanel,
|
|
1200
717
|
historyPage,
|
|
@@ -1235,8 +752,7 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
|
|
|
1235
752
|
toggleWorkspaceMenu,
|
|
1236
753
|
selectModule,
|
|
1237
754
|
openCalendar: calendar.openCalendar,
|
|
1238
|
-
|
|
1239
|
-
openSettings,
|
|
755
|
+
openSettings: settingsCtrl.openSettings,
|
|
1240
756
|
closeFileContextMenu: tree.closeFileContextMenu,
|
|
1241
757
|
closeDirectoryContextMenu: tree.closeDirectoryContextMenu,
|
|
1242
758
|
closeWorkspaceEntryContextMenu: tree.closeWorkspaceEntryContextMenu,
|
|
@@ -1252,584 +768,446 @@ export function useWorkbench(props: WorkbenchProps, emit: (event: 'ready') => vo
|
|
|
1252
768
|
constrainSidebarToViewport: prefs.constrainSidebarToViewport,
|
|
1253
769
|
});
|
|
1254
770
|
|
|
1255
|
-
// Cross-domain watchers & lifecycle
|
|
1256
|
-
watch(
|
|
1257
|
-
() => store.workspace?.id,
|
|
1258
|
-
(id, previous) => {
|
|
1259
|
-
agentPanel.value = false;
|
|
1260
|
-
selectedDiff.value = undefined;
|
|
1261
|
-
recyclePanel.value = false;
|
|
1262
|
-
if (navigationModule.value === 'workspace') {
|
|
1263
|
-
if (previous) calendar.rememberCalendar(previous);
|
|
1264
|
-
calendar.restoreCalendar(id);
|
|
1265
|
-
}
|
|
1266
|
-
calendar.calendarModeOpen.value = false;
|
|
1267
|
-
workspaceMenu.value = false;
|
|
1268
|
-
settingsPanel.value = false;
|
|
1269
|
-
},
|
|
1270
|
-
);
|
|
1271
|
-
watch(activeId, (id) => {
|
|
1272
|
-
calendar.calendarModeOpen.value = false;
|
|
1273
|
-
if (id === ASSISTANT_TAB_ID && compactPanes.value) sidebar.value = false;
|
|
1274
|
-
docs.closePageContextMenu();
|
|
1275
|
-
const treeId = activeId.value.startsWith('table:')
|
|
1276
|
-
? tableFileId(activeId.value)
|
|
1277
|
-
: activeId.value;
|
|
1278
|
-
if (!tree.pendingTreeOpenIds.has(treeId) || !tree.selectedEntryIds.value.has(treeId))
|
|
1279
|
-
tree.selectActiveFileInTree();
|
|
1280
|
-
historyPanel.value = false;
|
|
1281
|
-
menu.value = false;
|
|
1282
|
-
outlineCtrl.resetOnActiveChange();
|
|
1283
|
-
});
|
|
1284
|
-
watch(
|
|
1285
|
-
() => [store.activeId, assistant.loading, store.busy] as const,
|
|
1286
|
-
([id, loading, switching]) => {
|
|
1287
|
-
if (id === ASSISTANT_TAB_ID && !loading && !switching) openAssistantPage(store, assistant);
|
|
1288
|
-
},
|
|
1289
|
-
);
|
|
1290
|
-
watch(sidebar, (visible) => {
|
|
1291
|
-
if (!visible) {
|
|
1292
|
-
tree.closeFileContextMenu();
|
|
1293
|
-
tree.closeDirectoryContextMenu();
|
|
1294
|
-
outlineCtrl.closeOutlineContextMenu();
|
|
1295
|
-
}
|
|
1296
|
-
});
|
|
1297
|
-
|
|
1298
|
-
const noteCount = computed(
|
|
1299
|
-
() =>
|
|
1300
|
-
workspace.value?.files.filter(
|
|
1301
|
-
(f) =>
|
|
1302
|
-
f.kind === 'file' &&
|
|
1303
|
-
!isWorkspaceInternalPath(f.path) &&
|
|
1304
|
-
(isMarkdown(f.path) || isDataTableFilePath(f.path)),
|
|
1305
|
-
).length ?? 0,
|
|
1306
|
-
);
|
|
1307
|
-
|
|
1308
771
|
// Help guidance state
|
|
1309
|
-
const
|
|
1310
|
-
if (activeId.value === ASSISTANT_TAB_ID || sidebarView.value === 'assistant')
|
|
1311
|
-
return 'assistant';
|
|
1312
|
-
if (isTableTab(activeId.value)) return 'tables';
|
|
1313
|
-
if (activeId.value === GRAPH_TAB_ID) return 'graph';
|
|
1314
|
-
if (activeId.value === PLUGINS_TAB_ID) return 'plugins';
|
|
1315
|
-
if (activeId.value === CALENDAR_TAB_ID || sidebarView.value === 'plan') return 'plan';
|
|
1316
|
-
if (!active.value) return 'welcome';
|
|
1317
|
-
if (docs.editorReadonly.value) return 'reading';
|
|
1318
|
-
if (docs.source.value) return 'source';
|
|
1319
|
-
return active.value.content.trim() ? 'document' : 'empty-document';
|
|
1320
|
-
});
|
|
1321
|
-
const helpAvailability = computed<HelpAvailability>(() => ({
|
|
1322
|
-
'document-write': !!active.value && !docs.editorReadonly.value,
|
|
1323
|
-
'workspace-write': !!workspace.value && !workspace.value.readOnly,
|
|
1324
|
-
plans: plans.personalWritable || plans.workspaceWritable,
|
|
1325
|
-
comments: !!active.value && !docs.editorReadonly.value,
|
|
1326
|
-
templates: !!workspace.value && !workspace.value.readOnly,
|
|
1327
|
-
import: !!workspace.value && !workspace.value.readOnly,
|
|
1328
|
-
duplicate: !!workspace.value && !workspace.value.readOnly && !!workspaceAdapter.duplicate,
|
|
1329
|
-
'folder-home': !!workspace.value && !!store.workspaceSettings.folderHomeFileName,
|
|
1330
|
-
'folder-conversion':
|
|
1331
|
-
!!workspace.value &&
|
|
1332
|
-
!workspace.value.readOnly &&
|
|
1333
|
-
store.canConvertFolderDocuments &&
|
|
1334
|
-
!!store.workspaceSettings.folderHomeFileName,
|
|
1335
|
-
panes: !!workspace.value && !compactPanes.value,
|
|
1336
|
-
assistant: !!workspace.value && assistant.available,
|
|
1337
|
-
'assistant-configure':
|
|
1338
|
-
!!workspace.value && assistant.available && assistant.canConfigure && !assistant.demo,
|
|
1339
|
-
suggestions:
|
|
1340
|
-
!!active.value && !docs.editorReadonly.value && !editing.isManaging(active.value.id),
|
|
1341
|
-
math: !!active.value && !docs.editorReadonly.value && store.capabilities.features.math,
|
|
1342
|
-
mermaid: !!active.value && !docs.editorReadonly.value && store.capabilities.features.mermaid,
|
|
1343
|
-
}));
|
|
1344
|
-
const helpBlocked = computed(
|
|
1345
|
-
() =>
|
|
1346
|
-
!!(
|
|
1347
|
-
activeExtensionView.value ||
|
|
1348
|
-
activeId.value === SETTINGS_TAB_ID ||
|
|
1349
|
-
activeId.value.startsWith('attachment:') ||
|
|
1350
|
-
(assistant.opened && assistant.displayMode === 'fullscreen') ||
|
|
1351
|
-
busy.value ||
|
|
1352
|
-
fatal.value ||
|
|
1353
|
-
store.pending ||
|
|
1354
|
-
active.value?.conflict ||
|
|
1355
|
-
active.value?.error ||
|
|
1356
|
-
workspaceMenu.value ||
|
|
1357
|
-
menu.value ||
|
|
1358
|
-
modals.modal.value ||
|
|
1359
|
-
settingsPanel.value ||
|
|
1360
|
-
importPanel.value ||
|
|
1361
|
-
templateLibraryOpen.value ||
|
|
1362
|
-
agentPanel.value ||
|
|
1363
|
-
objectPanel.value ||
|
|
1364
|
-
selectedDiff.value ||
|
|
1365
|
-
inlineAssist.selectionTodo.value ||
|
|
1366
|
-
recyclePanel.value ||
|
|
1367
|
-
docs.referenceGraphOpened.value ||
|
|
1368
|
-
tree.fileContextMenu.value ||
|
|
1369
|
-
tree.directoryContextMenu.value ||
|
|
1370
|
-
docs.pageContextMenu.value ||
|
|
1371
|
-
outlineCtrl.outlineContextMenu.value ||
|
|
1372
|
-
prefs.resizingSidebar.value ||
|
|
1373
|
-
tree.draggedEntry.value ||
|
|
1374
|
-
updateLock.value
|
|
1375
|
-
),
|
|
1376
|
-
);
|
|
1377
|
-
|
|
1378
|
-
// Startup & native window lifecycle
|
|
1379
|
-
let unlistenClose: (() => void) | undefined;
|
|
1380
|
-
let unlistenWatchError: (() => void) | undefined;
|
|
1381
|
-
|
|
1382
|
-
onMounted(async () => {
|
|
1383
|
-
if (history.webPageRouting) {
|
|
1384
|
-
history.initializePageHistory();
|
|
1385
|
-
window.addEventListener('popstate', history.handlePagePopState);
|
|
1386
|
-
}
|
|
1387
|
-
try {
|
|
1388
|
-
await workbenchSession.initialize(async () => {
|
|
1389
|
-
if (props.createWorkspace) await modals.createNewWorkspace();
|
|
1390
|
-
else
|
|
1391
|
-
await store.initialize(
|
|
1392
|
-
history.initialPageRoute?.workspaceId ??
|
|
1393
|
-
(props.resolveInitialWorkspace
|
|
1394
|
-
? await props.resolveInitialWorkspace()
|
|
1395
|
-
: props.initialWorkspace),
|
|
1396
|
-
);
|
|
1397
|
-
});
|
|
1398
|
-
} finally {
|
|
1399
|
-
navigation.restore();
|
|
1400
|
-
if (
|
|
1401
|
-
navigation.homeModule.value !== 'plan' &&
|
|
1402
|
-
!extensionViews.some(
|
|
1403
|
-
(view) => view.id === navigation.homeModule.value && view.sidebar,
|
|
1404
|
-
)
|
|
1405
|
-
)
|
|
1406
|
-
navigation.homeModule.value = 'plan';
|
|
1407
|
-
plans.view = navigationContext.value === 'home' ? personalPlanScope : 'workspace';
|
|
1408
|
-
startupPending.value = false;
|
|
1409
|
-
}
|
|
1410
|
-
if (unmounted) return;
|
|
1411
|
-
emit('ready');
|
|
1412
|
-
await nextTick();
|
|
1413
|
-
|
|
1414
|
-
await history.finishInitialPageRouting(props.createWorkspace);
|
|
1415
|
-
if (native && !mobile) {
|
|
1416
|
-
void updates.initialize();
|
|
1417
|
-
}
|
|
1418
|
-
if (native) {
|
|
1419
|
-
if (localNative)
|
|
1420
|
-
unlistenWatchError = await listen<string>('workspace-watch-error', (event) => {
|
|
1421
|
-
store.enableWorkspacePolling();
|
|
1422
|
-
store.report(t('文件监听遇到错误:{0}。目录仍会定期自动检查。', [event.payload]));
|
|
1423
|
-
});
|
|
1424
|
-
if (!mobile)
|
|
1425
|
-
unlistenClose = await mainWindow.native!.onCloseRequested(async (event) => {
|
|
1426
|
-
event.preventDefault();
|
|
1427
|
-
if (updates.state.phase === 'installing') return;
|
|
1428
|
-
try {
|
|
1429
|
-
await editing.flush();
|
|
1430
|
-
if (await store.flush()) {
|
|
1431
|
-
await assistant.settle();
|
|
1432
|
-
await inlineRunner.settle();
|
|
1433
|
-
await agentInbox.settle();
|
|
1434
|
-
if (!(await auxiliaryWindows.closeAll())) {
|
|
1435
|
-
agentInbox.resume();
|
|
1436
|
-
return;
|
|
1437
|
-
}
|
|
1438
|
-
await editing.suspendAll();
|
|
1439
|
-
await mainWindow.native!.destroy();
|
|
1440
|
-
} else store.report(t('还有未保存的内容,窗口已保留。请先保存或另存副本。'));
|
|
1441
|
-
} catch (error) {
|
|
1442
|
-
agentInbox.resume();
|
|
1443
|
-
store.report(error);
|
|
1444
|
-
}
|
|
1445
|
-
});
|
|
1446
|
-
}
|
|
1447
|
-
});
|
|
1448
|
-
|
|
1449
|
-
onBeforeUnmount(() => {
|
|
1450
|
-
unmounted = true;
|
|
1451
|
-
document.documentElement.style.removeProperty('--sidebar-width');
|
|
1452
|
-
workbenchSession.release();
|
|
1453
|
-
window.removeEventListener('popstate', history.handlePagePopState);
|
|
1454
|
-
unlistenClose?.();
|
|
1455
|
-
unlistenWatchError?.();
|
|
1456
|
-
});
|
|
1457
|
-
|
|
1458
|
-
return {
|
|
1459
|
-
auxiliaryWindows,
|
|
1460
|
-
activeWindow,
|
|
1461
|
-
detachedTitle: modals.detachedTitle,
|
|
1462
|
-
native,
|
|
1463
|
-
mobile,
|
|
1464
|
-
workspace,
|
|
1465
|
-
compactPanes,
|
|
1466
|
-
isAuxiliaryWindow,
|
|
1467
|
-
sidebar,
|
|
1468
|
-
t,
|
|
1469
|
-
shortcuts: prefs.shortcuts,
|
|
1470
|
-
toggleSidebar,
|
|
1471
|
-
sessionPending,
|
|
1472
|
-
tabFileDrag: tree.tabFileDrag,
|
|
1473
|
-
fileDragEnd: tree.fileDragEnd,
|
|
772
|
+
const help = useWorkbenchHelp({
|
|
1474
773
|
store,
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
butterfly,
|
|
1481
|
-
fileMetadataTarget: tree.fileMetadataTarget,
|
|
1482
|
-
switchingWorkspace,
|
|
1483
|
-
mainColumn,
|
|
1484
|
-
returnHome: modals.returnHome,
|
|
1485
|
-
sidebarHeaderItems,
|
|
1486
|
-
closeButtonVisibilityMenus,
|
|
1487
|
-
extensionViews,
|
|
1488
|
-
viewActions,
|
|
1489
|
-
navigationContext,
|
|
1490
|
-
sidebarNavigationItems,
|
|
1491
|
-
navigationModule,
|
|
1492
|
-
selectModule,
|
|
774
|
+
assistant,
|
|
775
|
+
plans,
|
|
776
|
+
workspaceAdapter,
|
|
777
|
+
editing,
|
|
778
|
+
compactPanes,
|
|
1493
779
|
sidebarView,
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
fileDragOver: tree.fileDragOver,
|
|
1498
|
-
fileDragLeave: tree.fileDragLeave,
|
|
1499
|
-
fileDrop: tree.fileDrop,
|
|
1500
|
-
workspaceView,
|
|
1501
|
-
selectWorkspaceView,
|
|
780
|
+
activeExtensionView: views.activeExtensionView,
|
|
781
|
+
editorReadonly: docs.editorReadonly,
|
|
782
|
+
source: docs.source,
|
|
1502
783
|
workspaceMenu,
|
|
784
|
+
menu,
|
|
1503
785
|
modal: modals.modal,
|
|
1504
786
|
settingsPanel,
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
activeId,
|
|
1508
|
-
GRAPH_TAB_ID,
|
|
1509
|
-
busy,
|
|
1510
|
-
openDirectoryContextMenu: tree.openDirectoryContextMenu,
|
|
1511
|
-
startupPending,
|
|
1512
|
-
filesPending,
|
|
1513
|
-
treeFiles: tree.treeFiles,
|
|
1514
|
-
fileTree: tree.fileTree,
|
|
1515
|
-
revealedHomeId: tree.revealedHomeId,
|
|
1516
|
-
treeDocumentIcons: tree.treeDocumentIcons,
|
|
1517
|
-
loadTreeDocumentIcon: tree.loadTreeDocumentIcon,
|
|
1518
|
-
selectedEntryIds: tree.selectedEntryIds,
|
|
1519
|
-
fileContextMenu: tree.fileContextMenu,
|
|
1520
|
-
canDragEntry: tree.canDragEntry,
|
|
1521
|
-
treeRename: tree.treeRename,
|
|
1522
|
-
renameTreeEntry: tree.renameTreeEntry,
|
|
1523
|
-
openTreeEntry: tree.openTreeEntry,
|
|
1524
|
-
selectFileTreeEntry: tree.selectFileTreeEntry,
|
|
1525
|
-
openFileContextMenu: tree.openFileContextMenu,
|
|
1526
|
-
fileDragStart: tree.fileDragStart,
|
|
1527
|
-
finishTreeRename: tree.finishTreeRename,
|
|
1528
|
-
noteCount,
|
|
1529
|
-
showObjects,
|
|
1530
|
-
sidebarCalendarDate: calendar.sidebarCalendarDate,
|
|
1531
|
-
openCalendar: calendar.openCalendar,
|
|
1532
|
-
showPlanEvent,
|
|
1533
|
-
multipleContextEntries: tree.multipleContextEntries,
|
|
1534
|
-
contextEntries: tree.contextEntries,
|
|
1535
|
-
fileContextKeydown: tree.fileContextKeydown,
|
|
1536
|
-
localNative,
|
|
1537
|
-
selectionDeleteDisabled: tree.selectionDeleteDisabled,
|
|
1538
|
-
fileContextAction: tree.fileContextAction,
|
|
1539
|
-
shortcutHint: prefs.shortcutHint,
|
|
1540
|
-
contextFolderHome: tree.contextFolderHome,
|
|
1541
|
-
folderHomeContextAction: tree.folderHomeContextAction,
|
|
1542
|
-
fileMutationDisabled: tree.fileMutationDisabled,
|
|
1543
|
-
directoryHasManagedFile: tree.directoryHasManagedFile,
|
|
1544
|
-
isMarkdown,
|
|
1545
|
-
isDataTableFilePath,
|
|
1546
|
-
attachments,
|
|
1547
|
-
tabsEnabled,
|
|
1548
|
-
canDuplicateEntry: tree.canDuplicateEntry,
|
|
1549
|
-
isWorkspaceInternalPath,
|
|
1550
|
-
folderConversionIssue: tree.folderConversionIssue,
|
|
1551
|
-
convertDocumentStructure: tree.convertDocumentStructure,
|
|
1552
|
-
closeFileContextMenu: tree.closeFileContextMenu,
|
|
1553
|
-
fileDeleteDisabled: tree.fileDeleteDisabled,
|
|
1554
|
-
directoryContextMenu: tree.directoryContextMenu,
|
|
1555
|
-
directoryContextAction: tree.directoryContextAction,
|
|
1556
|
-
directoryContextDuplicateDisabled: tree.directoryContextDuplicateDisabled,
|
|
1557
|
-
directoryContextRenameDisabled: tree.directoryContextRenameDisabled,
|
|
1558
|
-
directoryContextDeleteDisabled: tree.directoryContextDeleteDisabled,
|
|
1559
|
-
workspaceEntryContextMenu: tree.workspaceEntryContextMenu,
|
|
1560
|
-
workspaceEntryContextMenuElement: tree.workspaceEntryContextMenuElement,
|
|
1561
|
-
workspaceEntryContextKeydown: tree.workspaceEntryContextKeydown,
|
|
1562
|
-
workspaceEntryContextAction: tree.workspaceEntryContextAction,
|
|
1563
|
-
toggleWorkspaceMenu,
|
|
1564
|
-
workspaceDropdownContextMenu: tree.workspaceDropdownContextMenu,
|
|
1565
|
-
selectContext,
|
|
1566
|
-
extensions,
|
|
1567
|
-
extensionActions,
|
|
1568
|
-
commandPaletteOpened,
|
|
1569
|
-
openSystemSync,
|
|
1570
|
-
openImport,
|
|
1571
|
-
openTemplateLibrary,
|
|
1572
|
-
openSettings,
|
|
1573
|
-
updates,
|
|
1574
|
-
recyclePanel,
|
|
787
|
+
importPanel,
|
|
788
|
+
templateLibraryOpen,
|
|
1575
789
|
agentPanel,
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
documentationBaseUrl,
|
|
1582
|
-
menu,
|
|
1583
|
-
openExternalUrl,
|
|
1584
|
-
sidebarWidth: prefs.sidebarWidth,
|
|
1585
|
-
defaultSidebarWidth: prefs.defaultSidebarWidth,
|
|
1586
|
-
SIDEBAR_MIN_WIDTH: prefs.SIDEBAR_MIN_WIDTH,
|
|
1587
|
-
sidebarWidthLimit: prefs.sidebarWidthLimit,
|
|
1588
|
-
startSidebarResize: prefs.startSidebarResize,
|
|
1589
|
-
resizeSidebarWithKeyboard: prefs.resizeSidebarWithKeyboard,
|
|
1590
|
-
referenceGraphTarget: docs.referenceGraphTarget,
|
|
790
|
+
objectDetail,
|
|
791
|
+
planArchiveOpen,
|
|
792
|
+
selectedDiff,
|
|
793
|
+
selectionTodo: inlineAssist.selectionTodo,
|
|
794
|
+
recyclePanel,
|
|
1591
795
|
referenceGraphOpened: docs.referenceGraphOpened,
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
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,
|
|
1597
811
|
assistant,
|
|
1598
|
-
|
|
1599
|
-
|
|
1600
|
-
ASSISTANT_TAB_ID,
|
|
1601
|
-
revealAssistantSelection: docs.revealAssistantSelection,
|
|
1602
|
-
templateLibraryOpen,
|
|
1603
|
-
templatePaneId,
|
|
1604
|
-
templateSource,
|
|
1605
|
-
templateInitialization,
|
|
1606
|
-
workspaceStatusLabel,
|
|
1607
|
-
openEntry,
|
|
1608
|
-
openBreadcrumbDirectory,
|
|
1609
|
-
setAssistantHost,
|
|
1610
|
-
topbarVisibilityItems,
|
|
1611
|
-
canNavigatePage: history.canNavigatePage,
|
|
1612
|
-
navigatePage: history.navigatePage,
|
|
1613
|
-
CALENDAR_TAB_ID,
|
|
1614
|
-
paneButterflyScope,
|
|
1615
|
-
pluginViewHeader,
|
|
1616
|
-
pluginPreviewStatus,
|
|
1617
|
-
paneDocumentStatus: docs.paneDocumentStatus,
|
|
1618
|
-
attachmentStatus,
|
|
1619
|
-
currentAttachmentStatus,
|
|
1620
|
-
PLUGINS_TAB_ID,
|
|
1621
|
-
settingsTabView,
|
|
1622
|
-
touchLayout,
|
|
1623
|
-
showOutline: outlineCtrl.showOutline,
|
|
1624
|
-
touchOutlineOpen: outlineCtrl.touchOutlineOpen,
|
|
1625
|
-
panel: outlineCtrl.panel,
|
|
1626
|
-
isTableTab,
|
|
1627
|
-
calendarToolItems,
|
|
1628
|
-
calendarPeriod: calendar.calendarPeriod,
|
|
1629
|
-
calendarDate: calendar.calendarDate,
|
|
1630
|
-
moveCalendarPeriod: calendar.moveCalendarPeriod,
|
|
1631
|
-
calendarModeOpen: calendar.calendarModeOpen,
|
|
1632
|
-
calendarModeLabel: calendar.calendarModeLabel,
|
|
1633
|
-
calendarModeOptions: calendar.calendarModeOptions,
|
|
1634
|
-
calendarMode: calendar.calendarMode,
|
|
1635
|
-
selectCalendarMode: calendar.selectCalendarMode,
|
|
1636
|
-
managePlanEvents,
|
|
1637
|
-
documentSuggestions,
|
|
1638
|
-
editing,
|
|
1639
|
-
suggestionModeBusy,
|
|
1640
|
-
toggleSuggestionMode,
|
|
1641
|
-
documentToolItems,
|
|
1642
|
-
revealMarkdown: prefs.revealMarkdown,
|
|
1643
|
-
paneSource: docs.paneSource,
|
|
1644
|
-
shortcutAriaLabel,
|
|
1645
|
-
shortcutKeys,
|
|
1646
|
-
setPaneSource: docs.setPaneSource,
|
|
1647
|
-
documentMenuElement: docs.documentMenuElement,
|
|
1648
|
-
toggleDocumentMenu: docs.toggleDocumentMenu,
|
|
1649
|
-
documentMenuTriggerKeydown: docs.documentMenuTriggerKeydown,
|
|
1650
|
-
documentMenuKeydown: docs.documentMenuKeydown,
|
|
1651
|
-
openPaneSearch: docs.openPaneSearch,
|
|
1652
|
-
editorReadonly: docs.editorReadonly,
|
|
1653
|
-
documentUndoAvailable: docs.documentUndoAvailable,
|
|
1654
|
-
undoDocument: docs.undoDocument,
|
|
1655
|
-
documentRedoAvailable: docs.documentRedoAvailable,
|
|
1656
|
-
redoDocument: docs.redoDocument,
|
|
1657
|
-
canAddDocumentProperty: docs.canAddDocumentProperty,
|
|
1658
|
-
addDocumentProperty: docs.addDocumentProperty,
|
|
1659
|
-
paneComments: docs.paneComments,
|
|
1660
|
-
openDocumentDiscussion: docs.openDocumentDiscussion,
|
|
1661
|
-
paneReadonly: docs.paneReadonly,
|
|
1662
|
-
showReferenceGraph: docs.showReferenceGraph,
|
|
1663
|
-
limitPageWidth: prefs.limitPageWidth,
|
|
1664
|
-
pageWidthWritable: prefs.pageWidthWritable,
|
|
1665
|
-
setLimitPageWidth: prefs.setLimitPageWidth,
|
|
1666
|
-
workspaceLocked: prefs.workspaceLocked,
|
|
1667
|
-
pageLocked: prefs.pageLocked,
|
|
1668
|
-
togglePageLock: prefs.togglePageLock,
|
|
1669
|
-
historyPage,
|
|
1670
|
-
historyPanel,
|
|
1671
|
-
editorPreferences: prefs.editorPreferences,
|
|
1672
|
-
showPageTitle: prefs.showPageTitle,
|
|
1673
|
-
showDocumentProperties: prefs.showDocumentProperties,
|
|
1674
|
-
showAllLineNumbers: prefs.showAllLineNumbers,
|
|
1675
|
-
togglePageOption: docs.togglePageOption,
|
|
1676
|
-
toggleWorkspaceLock: prefs.toggleWorkspaceLock,
|
|
1677
|
-
exportBusy: docs.exportBusy,
|
|
1678
|
-
exportDocument: docs.exportDocument,
|
|
1679
|
-
printBusy: docs.printBusy,
|
|
1680
|
-
printActiveDocument: docs.printActiveDocument,
|
|
1681
|
-
sessionBlocksFileMutation: docs.sessionBlocksFileMutation,
|
|
1682
|
-
removeDocument: modals.removeDocument,
|
|
1683
|
-
tableFileId,
|
|
1684
|
-
openAssistant: inlineAssist.openAssistant,
|
|
1685
|
-
parentPath,
|
|
1686
|
-
openWorkspaceViewSourceFile,
|
|
1687
|
-
openWorkspaceViewSourceObject,
|
|
1688
|
-
calendarScope: calendar.calendarScope,
|
|
812
|
+
inlineRunner,
|
|
813
|
+
agentInbox,
|
|
1689
814
|
plans,
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
beginSelectionTodo: inlineAssist.beginSelectionTodo,
|
|
1706
|
-
paneEditorScrolls: docs.paneEditorScrolls,
|
|
1707
|
-
paneSelections: docs.paneSelections,
|
|
1708
|
-
defaultSelectionContext,
|
|
1709
|
-
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,
|
|
1710
830
|
selectedDiff,
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
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
|
+
},
|
|
1834
1212
|
};
|
|
1835
1213
|
}
|