mulmoclaude 0.1.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/README.md +44 -0
- package/bin/mulmoclaude.js +202 -0
- package/bin/prepare-dist.js +93 -0
- package/client/assets/chunk-vKJrgz-R-C_I3GbVV.js +1 -0
- package/client/assets/html2canvas-Cx501zZr-BF5dYYkY.js +5 -0
- package/client/assets/index-D8rhwXLq.js +4906 -0
- package/client/assets/index-KNLBjwuh.css +1 -0
- package/client/assets/index.es-D4YyL_Dg-BfRHLTZV.js +5 -0
- package/client/assets/material-icons-Dr0goTwe.woff +0 -0
- package/client/assets/material-icons-kAwBdRge.woff2 +0 -0
- package/client/assets/material-icons-outlined-BpWbwl2n.woff +0 -0
- package/client/assets/material-icons-outlined-DZhiGvEA.woff2 +0 -0
- package/client/assets/material-icons-round-BDlwx-sv.woff +0 -0
- package/client/assets/material-icons-round-DrirKXBx.woff2 +0 -0
- package/client/assets/material-icons-sharp-CH1KkVu7.woff +0 -0
- package/client/assets/material-icons-sharp-gidztirS.woff2 +0 -0
- package/client/assets/material-icons-two-tone-B7wz7mED.woff +0 -0
- package/client/assets/material-icons-two-tone-DuNIpaEj.woff2 +0 -0
- package/client/assets/mulmo_bw-ERmkSv0a.png +0 -0
- package/client/assets/purify.es-Fx1Nqyry-PeS5RUhs.js +2 -0
- package/client/assets/typeof-DBp4T-Ny-BC0P-2DM.js +1 -0
- package/client/index.html +28 -0
- package/package.json +66 -0
- package/server/agent/attachmentConverter.ts +270 -0
- package/server/agent/config.ts +414 -0
- package/server/agent/index.ts +260 -0
- package/server/agent/mcp-server.ts +412 -0
- package/server/agent/mcp-tools/index.ts +63 -0
- package/server/agent/mcp-tools/x.ts +188 -0
- package/server/agent/plugin-names.ts +75 -0
- package/server/agent/prompt.ts +349 -0
- package/server/agent/resumeFailover.ts +129 -0
- package/server/agent/sandboxMounts.ts +329 -0
- package/server/agent/stream.ts +194 -0
- package/server/api/auth/bearerAuth.ts +61 -0
- package/server/api/auth/token.ts +98 -0
- package/server/api/csrfGuard.ts +85 -0
- package/server/api/routes/agent.ts +478 -0
- package/server/api/routes/chart.ts +98 -0
- package/server/api/routes/chat-index.ts +46 -0
- package/server/api/routes/config.ts +258 -0
- package/server/api/routes/dispatchResponse.ts +79 -0
- package/server/api/routes/files.ts +812 -0
- package/server/api/routes/html.ts +101 -0
- package/server/api/routes/image.ts +169 -0
- package/server/api/routes/mulmo-script.ts +712 -0
- package/server/api/routes/mulmoScriptValidate.ts +101 -0
- package/server/api/routes/notifications.ts +69 -0
- package/server/api/routes/pdf.ts +163 -0
- package/server/api/routes/plugins.ts +276 -0
- package/server/api/routes/presentHtml.ts +48 -0
- package/server/api/routes/roles.ts +125 -0
- package/server/api/routes/scheduler.ts +153 -0
- package/server/api/routes/schedulerHandlers.ts +151 -0
- package/server/api/routes/schedulerTasks.ts +163 -0
- package/server/api/routes/sessions.ts +294 -0
- package/server/api/routes/sessionsCursor.ts +59 -0
- package/server/api/routes/skills.ts +195 -0
- package/server/api/routes/sources.ts +540 -0
- package/server/api/routes/todos.ts +263 -0
- package/server/api/routes/todosColumnsHandlers.ts +347 -0
- package/server/api/routes/todosHandlers.ts +274 -0
- package/server/api/routes/todosItemsHandlers.ts +386 -0
- package/server/api/routes/wiki/pageIndex.ts +53 -0
- package/server/api/routes/wiki.ts +363 -0
- package/server/api/sandboxStatus.ts +64 -0
- package/server/events/notifications.ts +160 -0
- package/server/events/pub-sub/index.ts +45 -0
- package/server/events/relay-client.ts +288 -0
- package/server/events/scheduler-adapter.ts +302 -0
- package/server/events/session-store/index.ts +492 -0
- package/server/events/task-manager/index.ts +181 -0
- package/server/index.ts +572 -0
- package/server/system/config.ts +243 -0
- package/server/system/credentials.ts +220 -0
- package/server/system/docker.ts +97 -0
- package/server/system/env.ts +109 -0
- package/server/system/logger/config.ts +112 -0
- package/server/system/logger/formatters.ts +40 -0
- package/server/system/logger/index.ts +53 -0
- package/server/system/logger/rotation.ts +37 -0
- package/server/system/logger/sinks.ts +101 -0
- package/server/system/logger/types.ts +29 -0
- package/server/utils/date.ts +57 -0
- package/server/utils/errors.ts +7 -0
- package/server/utils/fetch.ts +27 -0
- package/server/utils/files/atomic.ts +125 -0
- package/server/utils/files/html-io.ts +20 -0
- package/server/utils/files/image-store.ts +66 -0
- package/server/utils/files/index.ts +45 -0
- package/server/utils/files/journal-io.ts +213 -0
- package/server/utils/files/json.ts +69 -0
- package/server/utils/files/markdown-store.ts +33 -0
- package/server/utils/files/naming.ts +50 -0
- package/server/utils/files/reference-dirs-io.ts +45 -0
- package/server/utils/files/roles-io.ts +45 -0
- package/server/utils/files/safe.ts +106 -0
- package/server/utils/files/scheduler-io.ts +20 -0
- package/server/utils/files/scheduler-overrides-io.ts +64 -0
- package/server/utils/files/session-io.ts +136 -0
- package/server/utils/files/spreadsheet-store.ts +63 -0
- package/server/utils/files/todos-io.ts +29 -0
- package/server/utils/files/user-tasks-io.ts +25 -0
- package/server/utils/files/workspace-io.ts +221 -0
- package/server/utils/gemini.ts +59 -0
- package/server/utils/gitignore.ts +69 -0
- package/server/utils/http.ts +15 -0
- package/server/utils/httpError.ts +61 -0
- package/server/utils/id.ts +16 -0
- package/server/utils/json.ts +83 -0
- package/server/utils/logBackgroundError.ts +22 -0
- package/server/utils/markdown.ts +82 -0
- package/server/utils/request.ts +29 -0
- package/server/utils/slug.ts +50 -0
- package/server/utils/spawn.ts +62 -0
- package/server/utils/time.ts +34 -0
- package/server/utils/types.ts +47 -0
- package/server/workspace/chat-index/index.ts +153 -0
- package/server/workspace/chat-index/indexer.ts +209 -0
- package/server/workspace/chat-index/paths.ts +34 -0
- package/server/workspace/chat-index/summarizer.ts +247 -0
- package/server/workspace/chat-index/types.ts +38 -0
- package/server/workspace/custom-dirs.ts +220 -0
- package/server/workspace/helps/business.md +104 -0
- package/server/workspace/helps/github.md +23 -0
- package/server/workspace/helps/index.md +60 -0
- package/server/workspace/helps/mulmoscript.md +249 -0
- package/server/workspace/helps/sandbox.md +90 -0
- package/server/workspace/helps/spreadsheet.md +43 -0
- package/server/workspace/helps/telegram.md +135 -0
- package/server/workspace/helps/wiki.md +131 -0
- package/server/workspace/journal/archivist.ts +386 -0
- package/server/workspace/journal/dailyPass.ts +743 -0
- package/server/workspace/journal/diff.ts +71 -0
- package/server/workspace/journal/index.ts +185 -0
- package/server/workspace/journal/indexFile.ts +136 -0
- package/server/workspace/journal/linkRewrite.ts +4 -0
- package/server/workspace/journal/memoryExtractor.ts +130 -0
- package/server/workspace/journal/optimizationPass.ts +160 -0
- package/server/workspace/journal/paths.ts +76 -0
- package/server/workspace/journal/state.ts +125 -0
- package/server/workspace/paths.ts +158 -0
- package/server/workspace/reference-dirs.ts +252 -0
- package/server/workspace/roles.ts +37 -0
- package/server/workspace/skills/discovery.ts +125 -0
- package/server/workspace/skills/index.ts +10 -0
- package/server/workspace/skills/parser.ts +144 -0
- package/server/workspace/skills/paths.ts +41 -0
- package/server/workspace/skills/scheduler.ts +149 -0
- package/server/workspace/skills/types.ts +30 -0
- package/server/workspace/skills/user-tasks.ts +257 -0
- package/server/workspace/skills/writer.ts +189 -0
- package/server/workspace/sources/arxivDiscovery.ts +182 -0
- package/server/workspace/sources/classifier.ts +268 -0
- package/server/workspace/sources/fetchers/arxiv.ts +170 -0
- package/server/workspace/sources/fetchers/github.ts +106 -0
- package/server/workspace/sources/fetchers/githubIssues.ts +208 -0
- package/server/workspace/sources/fetchers/githubReleases.ts +186 -0
- package/server/workspace/sources/fetchers/index.ts +71 -0
- package/server/workspace/sources/fetchers/registerAll.ts +15 -0
- package/server/workspace/sources/fetchers/rss.ts +141 -0
- package/server/workspace/sources/fetchers/rssParser.ts +295 -0
- package/server/workspace/sources/httpFetcher.ts +230 -0
- package/server/workspace/sources/interests.ts +120 -0
- package/server/workspace/sources/paths.ts +110 -0
- package/server/workspace/sources/pipeline/dedup.ts +60 -0
- package/server/workspace/sources/pipeline/fetch.ts +136 -0
- package/server/workspace/sources/pipeline/index.ts +249 -0
- package/server/workspace/sources/pipeline/notify.ts +72 -0
- package/server/workspace/sources/pipeline/plan.ts +66 -0
- package/server/workspace/sources/pipeline/summarize.ts +189 -0
- package/server/workspace/sources/pipeline/write.ts +185 -0
- package/server/workspace/sources/rateLimiter.ts +148 -0
- package/server/workspace/sources/registry.ts +326 -0
- package/server/workspace/sources/robots.ts +271 -0
- package/server/workspace/sources/sourceState.ts +135 -0
- package/server/workspace/sources/taxonomy.ts +74 -0
- package/server/workspace/sources/types.ts +144 -0
- package/server/workspace/sources/urls.ts +112 -0
- package/server/workspace/tool-trace/classify.ts +114 -0
- package/server/workspace/tool-trace/index.ts +250 -0
- package/server/workspace/tool-trace/writeSearch.ts +98 -0
- package/server/workspace/wiki-backlinks/index.ts +107 -0
- package/server/workspace/wiki-backlinks/sessionBacklinks.ts +144 -0
- package/server/workspace/workspace.ts +66 -0
- package/src/App.vue +720 -0
- package/src/assets/mulmo_bw.png +0 -0
- package/src/components/CanvasViewToggle.vue +27 -0
- package/src/components/ChatAttachmentPreview.vue +45 -0
- package/src/components/ChatImagePreview.vue +17 -0
- package/src/components/ChatInput.vue +208 -0
- package/src/components/FileContentHeader.vue +49 -0
- package/src/components/FileContentRenderer.vue +162 -0
- package/src/components/FileTree.vue +115 -0
- package/src/components/FileTreePane.vue +85 -0
- package/src/components/FilesView.vue +206 -0
- package/src/components/LockStatusPopup.vue +111 -0
- package/src/components/NotificationBell.vue +131 -0
- package/src/components/NotificationToast.vue +72 -0
- package/src/components/PluginLauncher.vue +138 -0
- package/src/components/RightSidebar.vue +113 -0
- package/src/components/RoleSelector.vue +64 -0
- package/src/components/SessionHistoryPanel.vue +176 -0
- package/src/components/SessionTabBar.vue +81 -0
- package/src/components/SettingsMcpTab.vue +350 -0
- package/src/components/SettingsModal.vue +275 -0
- package/src/components/SettingsReferenceDirsTab.vue +173 -0
- package/src/components/SettingsWorkspaceDirsTab.vue +174 -0
- package/src/components/SidebarHeader.vue +69 -0
- package/src/components/StackView.vue +360 -0
- package/src/components/SuggestionsPanel.vue +65 -0
- package/src/components/TodoExplorer.vue +358 -0
- package/src/components/ToolResultsPanel.vue +77 -0
- package/src/components/todo/TodoAddDialog.vue +131 -0
- package/src/components/todo/TodoEditDialog.vue +47 -0
- package/src/components/todo/TodoEditPanel.vue +113 -0
- package/src/components/todo/TodoKanbanView.vue +249 -0
- package/src/components/todo/TodoListView.vue +79 -0
- package/src/components/todo/TodoTableView.vue +177 -0
- package/src/composables/useActiveSession.ts +40 -0
- package/src/composables/useAppApi.ts +45 -0
- package/src/composables/useCanvasViewMode.ts +121 -0
- package/src/composables/useChatScroll.ts +47 -0
- package/src/composables/useClickOutside.ts +26 -0
- package/src/composables/useClipboardCopy.ts +44 -0
- package/src/composables/useContentDisplay.ts +52 -0
- package/src/composables/useDebugBeat.ts +23 -0
- package/src/composables/useDynamicFavicon.ts +115 -0
- package/src/composables/useEventListeners.ts +42 -0
- package/src/composables/useExpandedDirs.ts +64 -0
- package/src/composables/useFaviconState.ts +30 -0
- package/src/composables/useFileSelection.ts +115 -0
- package/src/composables/useFileSortMode.ts +24 -0
- package/src/composables/useFileTree.ts +85 -0
- package/src/composables/useFreshPluginData.ts +89 -0
- package/src/composables/useHealth.ts +38 -0
- package/src/composables/useImeAwareEnter.ts +57 -0
- package/src/composables/useKeyNavigation.ts +60 -0
- package/src/composables/useMarkdownLinkHandler.ts +46 -0
- package/src/composables/useMarkdownMode.ts +17 -0
- package/src/composables/useMcpTools.ts +71 -0
- package/src/composables/useMergedSessions.ts +27 -0
- package/src/composables/useNotifications.ts +90 -0
- package/src/composables/usePdfDownload.ts +60 -0
- package/src/composables/usePendingCalls.ts +77 -0
- package/src/composables/usePubSub.ts +85 -0
- package/src/composables/useRightSidebar.ts +23 -0
- package/src/composables/useRoles.ts +34 -0
- package/src/composables/useSandboxStatus.ts +67 -0
- package/src/composables/useSelectedResult.ts +49 -0
- package/src/composables/useSessionDerived.ts +51 -0
- package/src/composables/useSessionHistory.ts +81 -0
- package/src/composables/useSessionSync.ts +57 -0
- package/src/composables/useViewLayout.ts +55 -0
- package/src/config/apiRoutes.ts +173 -0
- package/src/config/pubsubChannels.ts +45 -0
- package/src/config/roles.ts +335 -0
- package/src/config/schedulerActions.ts +25 -0
- package/src/config/toolNames.ts +71 -0
- package/src/config/workspacePaths.ts +24 -0
- package/src/index.css +107 -0
- package/src/main.ts +25 -0
- package/src/plugins/canvas/Preview.vue +13 -0
- package/src/plugins/canvas/View.vue +333 -0
- package/src/plugins/canvas/definition.ts +38 -0
- package/src/plugins/canvas/index.ts +36 -0
- package/src/plugins/chart/Preview.vue +49 -0
- package/src/plugins/chart/View.vue +143 -0
- package/src/plugins/chart/definition.ts +58 -0
- package/src/plugins/chart/index.ts +52 -0
- package/src/plugins/editImage/Preview.vue +13 -0
- package/src/plugins/editImage/View.vue +13 -0
- package/src/plugins/editImage/definition.ts +27 -0
- package/src/plugins/editImage/index.ts +36 -0
- package/src/plugins/generateImage/Preview.vue +13 -0
- package/src/plugins/generateImage/View.vue +33 -0
- package/src/plugins/generateImage/definition.ts +32 -0
- package/src/plugins/generateImage/index.ts +56 -0
- package/src/plugins/manageRoles/Preview.vue +49 -0
- package/src/plugins/manageRoles/View.vue +525 -0
- package/src/plugins/manageRoles/definition.ts +43 -0
- package/src/plugins/manageRoles/index.ts +47 -0
- package/src/plugins/manageSkills/Preview.vue +21 -0
- package/src/plugins/manageSkills/View.vue +321 -0
- package/src/plugins/manageSkills/definition.ts +49 -0
- package/src/plugins/manageSkills/index.ts +49 -0
- package/src/plugins/manageSource/Preview.vue +33 -0
- package/src/plugins/manageSource/View.vue +697 -0
- package/src/plugins/manageSource/definition.ts +63 -0
- package/src/plugins/manageSource/index.ts +66 -0
- package/src/plugins/markdown/Preview.vue +77 -0
- package/src/plugins/markdown/View.vue +476 -0
- package/src/plugins/markdown/definition.ts +50 -0
- package/src/plugins/markdown/index.ts +36 -0
- package/src/plugins/presentHtml/Preview.vue +25 -0
- package/src/plugins/presentHtml/View.vue +52 -0
- package/src/plugins/presentHtml/definition.ts +27 -0
- package/src/plugins/presentHtml/helpers.ts +72 -0
- package/src/plugins/presentHtml/index.ts +41 -0
- package/src/plugins/presentMulmoScript/Preview.vue +23 -0
- package/src/plugins/presentMulmoScript/View.vue +1166 -0
- package/src/plugins/presentMulmoScript/definition.ts +95 -0
- package/src/plugins/presentMulmoScript/helpers.ts +162 -0
- package/src/plugins/presentMulmoScript/index.ts +40 -0
- package/src/plugins/scheduler/Preview.vue +67 -0
- package/src/plugins/scheduler/TasksTab.vue +205 -0
- package/src/plugins/scheduler/View.vue +565 -0
- package/src/plugins/scheduler/definition.ts +57 -0
- package/src/plugins/scheduler/index.ts +45 -0
- package/src/plugins/scheduler/viewModes.ts +26 -0
- package/src/plugins/spreadsheet/Preview.vue +29 -0
- package/src/plugins/spreadsheet/View.vue +997 -0
- package/src/plugins/spreadsheet/cellHighlights.ts +79 -0
- package/src/plugins/spreadsheet/definition.ts +121 -0
- package/src/plugins/spreadsheet/engine/calculator.ts +459 -0
- package/src/plugins/spreadsheet/engine/cellBuilder.ts +81 -0
- package/src/plugins/spreadsheet/engine/date-parser.ts +220 -0
- package/src/plugins/spreadsheet/engine/date-utils.ts +56 -0
- package/src/plugins/spreadsheet/engine/engine.ts +176 -0
- package/src/plugins/spreadsheet/engine/evaluator.ts +390 -0
- package/src/plugins/spreadsheet/engine/formatter.ts +172 -0
- package/src/plugins/spreadsheet/engine/formulaRefs.ts +101 -0
- package/src/plugins/spreadsheet/engine/functions/date.ts +299 -0
- package/src/plugins/spreadsheet/engine/functions/financial.ts +387 -0
- package/src/plugins/spreadsheet/engine/functions/index.ts +16 -0
- package/src/plugins/spreadsheet/engine/functions/logical.ts +262 -0
- package/src/plugins/spreadsheet/engine/functions/lookup.ts +400 -0
- package/src/plugins/spreadsheet/engine/functions/mathematical.ts +297 -0
- package/src/plugins/spreadsheet/engine/functions/statistical.ts +338 -0
- package/src/plugins/spreadsheet/engine/functions/text.ts +389 -0
- package/src/plugins/spreadsheet/engine/index.ts +27 -0
- package/src/plugins/spreadsheet/engine/jsonCellLocator.ts +111 -0
- package/src/plugins/spreadsheet/engine/parser.ts +143 -0
- package/src/plugins/spreadsheet/engine/registry.ts +150 -0
- package/src/plugins/spreadsheet/engine/responseDecoder.ts +67 -0
- package/src/plugins/spreadsheet/engine/types.ts +64 -0
- package/src/plugins/spreadsheet/index.ts +36 -0
- package/src/plugins/textResponse/Preview.vue +94 -0
- package/src/plugins/textResponse/View.vue +503 -0
- package/src/plugins/textResponse/definition.ts +34 -0
- package/src/plugins/textResponse/index.ts +27 -0
- package/src/plugins/textResponse/plugin.ts +29 -0
- package/src/plugins/textResponse/samples.ts +97 -0
- package/src/plugins/textResponse/types.ts +11 -0
- package/src/plugins/todo/Preview.vue +63 -0
- package/src/plugins/todo/View.vue +364 -0
- package/src/plugins/todo/composables/useTodos.ts +177 -0
- package/src/plugins/todo/definition.ts +45 -0
- package/src/plugins/todo/index.ts +61 -0
- package/src/plugins/todo/labels.ts +163 -0
- package/src/plugins/todo/priority.ts +98 -0
- package/src/plugins/todo/viewModes.ts +19 -0
- package/src/plugins/ui-image/ImagePreview.vue +23 -0
- package/src/plugins/ui-image/ImageView.vue +34 -0
- package/src/plugins/ui-image/index.ts +3 -0
- package/src/plugins/ui-image/types.ts +4 -0
- package/src/plugins/wiki/Preview.vue +65 -0
- package/src/plugins/wiki/View.vue +342 -0
- package/src/plugins/wiki/definition.ts +25 -0
- package/src/plugins/wiki/helpers.ts +59 -0
- package/src/plugins/wiki/index.ts +52 -0
- package/src/router/guards.ts +61 -0
- package/src/router/index.ts +50 -0
- package/src/tools/index.ts +52 -0
- package/src/tools/types.ts +27 -0
- package/src/types/events.ts +16 -0
- package/src/types/fileTree.ts +13 -0
- package/src/types/notification.ts +67 -0
- package/src/types/session.ts +116 -0
- package/src/types/sse.ts +90 -0
- package/src/types/toolCallHistory.ts +13 -0
- package/src/utils/agent/eventDispatch.ts +74 -0
- package/src/utils/agent/request.ts +55 -0
- package/src/utils/agent/toolCalls.ts +62 -0
- package/src/utils/api.ts +218 -0
- package/src/utils/canvas/viewMode.ts +46 -0
- package/src/utils/dom/authTokenMeta.ts +20 -0
- package/src/utils/dom/clickOutside.ts +11 -0
- package/src/utils/dom/externalLink.ts +57 -0
- package/src/utils/dom/scrollable.ts +24 -0
- package/src/utils/errors.ts +11 -0
- package/src/utils/files/expandedDirs.ts +25 -0
- package/src/utils/files/filename.ts +12 -0
- package/src/utils/files/sortChildren.ts +20 -0
- package/src/utils/filesPreview/schedulerPreview.ts +38 -0
- package/src/utils/filesPreview/todoPreview.ts +40 -0
- package/src/utils/format/date.ts +85 -0
- package/src/utils/format/frontmatter.ts +80 -0
- package/src/utils/format/jsonSyntax.ts +109 -0
- package/src/utils/html/previewCsp.ts +65 -0
- package/src/utils/image/resolve.ts +8 -0
- package/src/utils/image/rewriteMarkdownImageRefs.ts +182 -0
- package/src/utils/markdown/extractFirstH1.ts +39 -0
- package/src/utils/notification/dispatch.ts +22 -0
- package/src/utils/path/relativeLink.ts +130 -0
- package/src/utils/role/icon.ts +20 -0
- package/src/utils/role/merge.ts +10 -0
- package/src/utils/role/plugins.ts +12 -0
- package/src/utils/session/mergeSessions.ts +103 -0
- package/src/utils/session/seedRoleDefault.ts +35 -0
- package/src/utils/session/sessionEntries.ts +121 -0
- package/src/utils/session/sessionFactory.ts +22 -0
- package/src/utils/session/sessionHelpers.ts +99 -0
- package/src/utils/tools/dedup.ts +17 -0
- package/src/utils/tools/mcp.ts +33 -0
- package/src/utils/tools/pendingCalls.ts +16 -0
- package/src/utils/tools/result.ts +40 -0
- package/src/utils/types.ts +44 -0
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref, onMounted } from "vue";
|
|
3
|
+
import { apiGet, apiPut } from "../utils/api";
|
|
4
|
+
import { API_ROUTES } from "../config/apiRoutes";
|
|
5
|
+
|
|
6
|
+
interface RefDirEntry {
|
|
7
|
+
hostPath: string;
|
|
8
|
+
label: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const dirs = ref<RefDirEntry[]>([]);
|
|
12
|
+
const loading = ref(true);
|
|
13
|
+
const error = ref("");
|
|
14
|
+
const saving = ref(false);
|
|
15
|
+
const saveStatus = ref("");
|
|
16
|
+
|
|
17
|
+
const draftPath = ref("");
|
|
18
|
+
const draftLabel = ref("");
|
|
19
|
+
const draftError = ref("");
|
|
20
|
+
|
|
21
|
+
async function load(): Promise<void> {
|
|
22
|
+
loading.value = true;
|
|
23
|
+
error.value = "";
|
|
24
|
+
const result = await apiGet<{ dirs: RefDirEntry[] }>(API_ROUTES.config.referenceDirs);
|
|
25
|
+
loading.value = false;
|
|
26
|
+
if (!result.ok) {
|
|
27
|
+
error.value = result.error;
|
|
28
|
+
return;
|
|
29
|
+
}
|
|
30
|
+
dirs.value = result.data.dirs;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
async function save(): Promise<void> {
|
|
34
|
+
saving.value = true;
|
|
35
|
+
saveStatus.value = "";
|
|
36
|
+
const result = await apiPut<{ dirs: RefDirEntry[] }>(API_ROUTES.config.referenceDirs, { dirs: dirs.value });
|
|
37
|
+
saving.value = false;
|
|
38
|
+
if (!result.ok) {
|
|
39
|
+
saveStatus.value = result.error;
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
dirs.value = result.data.dirs;
|
|
43
|
+
saveStatus.value = "Saved";
|
|
44
|
+
setTimeout(() => {
|
|
45
|
+
saveStatus.value = "";
|
|
46
|
+
}, 2000);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
function addEntry(): void {
|
|
50
|
+
draftError.value = "";
|
|
51
|
+
const p = draftPath.value.trim();
|
|
52
|
+
if (!p) {
|
|
53
|
+
draftError.value = "Path required";
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
if (!p.startsWith("/") && !p.startsWith("~/")) {
|
|
57
|
+
draftError.value = "Must be an absolute path or start with ~/";
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
// Normalize: trim trailing slashes for consistent comparison
|
|
61
|
+
let normalized = p;
|
|
62
|
+
while (normalized.length > 1 && normalized.endsWith("/")) {
|
|
63
|
+
normalized = normalized.slice(0, -1);
|
|
64
|
+
}
|
|
65
|
+
const stripSlash = (s: string): string => {
|
|
66
|
+
let r = s;
|
|
67
|
+
while (r.length > 1 && r.endsWith("/")) r = r.slice(0, -1);
|
|
68
|
+
return r;
|
|
69
|
+
};
|
|
70
|
+
if (dirs.value.some((d) => stripSlash(d.hostPath) === normalized)) {
|
|
71
|
+
draftError.value = "Already exists";
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const lastSeg = normalized.split("/").pop();
|
|
75
|
+
const label = draftLabel.value.trim() || lastSeg || normalized;
|
|
76
|
+
// Reject duplicate labels — @ref/<label> routing requires uniqueness
|
|
77
|
+
if (dirs.value.some((d) => d.label === label)) {
|
|
78
|
+
draftError.value = `Label "${label}" already exists`;
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
dirs.value.push({ hostPath: normalized, label });
|
|
82
|
+
draftPath.value = "";
|
|
83
|
+
draftLabel.value = "";
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function removeEntry(index: number): void {
|
|
87
|
+
dirs.value.splice(index, 1);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
onMounted(load);
|
|
91
|
+
</script>
|
|
92
|
+
|
|
93
|
+
<template>
|
|
94
|
+
<div class="space-y-3">
|
|
95
|
+
<p class="text-xs text-gray-600 leading-relaxed">
|
|
96
|
+
External directories Claude can read but not modify. In Docker mode, these are mounted read-only. Useful for referencing Obsidian vaults, project code, or
|
|
97
|
+
document folders.
|
|
98
|
+
</p>
|
|
99
|
+
|
|
100
|
+
<!-- Loading -->
|
|
101
|
+
<div v-if="loading" class="text-sm text-gray-400">Loading...</div>
|
|
102
|
+
<div v-else-if="error" class="text-sm text-red-600 bg-red-50 rounded px-3 py-2">
|
|
103
|
+
{{ error }}
|
|
104
|
+
</div>
|
|
105
|
+
|
|
106
|
+
<template v-else>
|
|
107
|
+
<!-- Existing entries -->
|
|
108
|
+
<div v-if="dirs.length === 0" class="text-sm text-gray-400">No reference directories configured.</div>
|
|
109
|
+
<div v-else class="space-y-1.5">
|
|
110
|
+
<div
|
|
111
|
+
v-for="(dir, i) in dirs"
|
|
112
|
+
:key="dir.hostPath"
|
|
113
|
+
class="flex items-center gap-2 px-2 py-1.5 bg-gray-50 rounded text-sm"
|
|
114
|
+
:data-testid="`reference-dir-${i}`"
|
|
115
|
+
>
|
|
116
|
+
<span class="material-icons text-sm text-gray-400 shrink-0">folder_open</span>
|
|
117
|
+
<div class="flex-1 min-w-0">
|
|
118
|
+
<div class="font-mono text-xs text-gray-800 truncate">
|
|
119
|
+
{{ dir.hostPath }}
|
|
120
|
+
</div>
|
|
121
|
+
<div v-if="dir.label" class="text-xs text-gray-500 truncate">
|
|
122
|
+
{{ dir.label }}
|
|
123
|
+
</div>
|
|
124
|
+
</div>
|
|
125
|
+
<span class="text-[10px] px-1.5 py-0.5 rounded bg-blue-100 text-blue-600 shrink-0"> read-only </span>
|
|
126
|
+
<button class="text-gray-300 hover:text-red-500 shrink-0" title="Remove" data-testid="reference-dir-remove-btn" @click="removeEntry(i)">
|
|
127
|
+
<span class="material-icons text-sm">close</span>
|
|
128
|
+
</button>
|
|
129
|
+
</div>
|
|
130
|
+
</div>
|
|
131
|
+
|
|
132
|
+
<!-- Add new -->
|
|
133
|
+
<div class="border border-gray-200 rounded p-2 space-y-2">
|
|
134
|
+
<div class="text-xs font-semibold text-gray-600">Add reference directory</div>
|
|
135
|
+
<input
|
|
136
|
+
v-model="draftPath"
|
|
137
|
+
class="w-full px-2 py-1 text-xs font-mono border border-gray-300 rounded focus:outline-none focus:border-blue-400"
|
|
138
|
+
placeholder="/Users/me/ObsidianVault or ~/Documents/notes"
|
|
139
|
+
data-testid="reference-dir-path-input"
|
|
140
|
+
@keydown.enter="addEntry"
|
|
141
|
+
@keydown.stop
|
|
142
|
+
/>
|
|
143
|
+
<input
|
|
144
|
+
v-model="draftLabel"
|
|
145
|
+
class="w-full px-2 py-1 text-xs border border-gray-300 rounded focus:outline-none focus:border-blue-400"
|
|
146
|
+
placeholder="Label (optional — defaults to folder name)"
|
|
147
|
+
data-testid="reference-dir-label-input"
|
|
148
|
+
@keydown.enter="addEntry"
|
|
149
|
+
@keydown.stop
|
|
150
|
+
/>
|
|
151
|
+
<div class="flex items-center gap-2">
|
|
152
|
+
<button class="px-2 py-1 text-xs rounded bg-blue-500 text-white hover:bg-blue-600" data-testid="reference-dir-add-btn" @click="addEntry">Add</button>
|
|
153
|
+
<span v-if="draftError" class="text-xs text-red-500">{{ draftError }}</span>
|
|
154
|
+
</div>
|
|
155
|
+
</div>
|
|
156
|
+
|
|
157
|
+
<!-- Save -->
|
|
158
|
+
<div class="flex items-center gap-2">
|
|
159
|
+
<button
|
|
160
|
+
class="px-3 py-1.5 text-sm rounded bg-blue-500 text-white hover:bg-blue-600 disabled:bg-gray-300"
|
|
161
|
+
:disabled="saving"
|
|
162
|
+
data-testid="reference-dirs-save-btn"
|
|
163
|
+
@click="save"
|
|
164
|
+
>
|
|
165
|
+
{{ saving ? "Saving..." : "Save" }}
|
|
166
|
+
</button>
|
|
167
|
+
<span v-if="saveStatus" class="text-xs" :class="saveStatus === 'Saved' ? 'text-green-600' : 'text-red-600'">
|
|
168
|
+
{{ saveStatus }}
|
|
169
|
+
</span>
|
|
170
|
+
</div>
|
|
171
|
+
</template>
|
|
172
|
+
</div>
|
|
173
|
+
</template>
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref, onMounted } from "vue";
|
|
3
|
+
import { apiGet, apiPut } from "../utils/api";
|
|
4
|
+
import { API_ROUTES } from "../config/apiRoutes";
|
|
5
|
+
|
|
6
|
+
interface DirEntry {
|
|
7
|
+
path: string;
|
|
8
|
+
description: string;
|
|
9
|
+
structure: "flat" | "by-name" | "by-date";
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const dirs = ref<DirEntry[]>([]);
|
|
13
|
+
const loading = ref(true);
|
|
14
|
+
const error = ref("");
|
|
15
|
+
const saving = ref(false);
|
|
16
|
+
const saveStatus = ref("");
|
|
17
|
+
|
|
18
|
+
// Draft for new entry
|
|
19
|
+
const draftPath = ref("");
|
|
20
|
+
const draftDescription = ref("");
|
|
21
|
+
const draftStructure = ref<DirEntry["structure"]>("flat");
|
|
22
|
+
const draftError = ref("");
|
|
23
|
+
|
|
24
|
+
async function load(): Promise<void> {
|
|
25
|
+
loading.value = true;
|
|
26
|
+
error.value = "";
|
|
27
|
+
const result = await apiGet<{ dirs: DirEntry[] }>(API_ROUTES.config.workspaceDirs);
|
|
28
|
+
loading.value = false;
|
|
29
|
+
if (!result.ok) {
|
|
30
|
+
error.value = result.error;
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
dirs.value = result.data.dirs;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
async function save(): Promise<void> {
|
|
37
|
+
saving.value = true;
|
|
38
|
+
saveStatus.value = "";
|
|
39
|
+
const result = await apiPut<{ dirs: DirEntry[] }>(API_ROUTES.config.workspaceDirs, { dirs: dirs.value });
|
|
40
|
+
saving.value = false;
|
|
41
|
+
if (!result.ok) {
|
|
42
|
+
saveStatus.value = result.error;
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
dirs.value = result.data.dirs;
|
|
46
|
+
saveStatus.value = "Saved";
|
|
47
|
+
setTimeout(() => {
|
|
48
|
+
saveStatus.value = "";
|
|
49
|
+
}, 2000);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function addEntry(): void {
|
|
53
|
+
draftError.value = "";
|
|
54
|
+
const p = draftPath.value.trim();
|
|
55
|
+
if (!p) {
|
|
56
|
+
draftError.value = "Path required";
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
if (!p.startsWith("data/") && !p.startsWith("artifacts/")) {
|
|
60
|
+
draftError.value = "Must start with data/ or artifacts/";
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
if (dirs.value.some((d) => d.path === p)) {
|
|
64
|
+
draftError.value = "Already exists";
|
|
65
|
+
return;
|
|
66
|
+
}
|
|
67
|
+
dirs.value.push({
|
|
68
|
+
path: p,
|
|
69
|
+
description: draftDescription.value.trim(),
|
|
70
|
+
structure: draftStructure.value,
|
|
71
|
+
});
|
|
72
|
+
draftPath.value = "";
|
|
73
|
+
draftDescription.value = "";
|
|
74
|
+
draftStructure.value = "flat";
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function removeEntry(index: number): void {
|
|
78
|
+
dirs.value.splice(index, 1);
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
onMounted(load);
|
|
82
|
+
</script>
|
|
83
|
+
|
|
84
|
+
<template>
|
|
85
|
+
<div class="space-y-3">
|
|
86
|
+
<p class="text-xs text-gray-600 leading-relaxed">
|
|
87
|
+
Custom directories for organizing files under
|
|
88
|
+
<code class="bg-gray-100 px-1 rounded">data/</code> and <code class="bg-gray-100 px-1 rounded">artifacts/</code>. Claude uses these to route file saves.
|
|
89
|
+
</p>
|
|
90
|
+
|
|
91
|
+
<!-- Loading -->
|
|
92
|
+
<div v-if="loading" class="text-sm text-gray-400">Loading...</div>
|
|
93
|
+
<div v-else-if="error" class="text-sm text-red-600 bg-red-50 rounded px-3 py-2">
|
|
94
|
+
{{ error }}
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
<template v-else>
|
|
98
|
+
<!-- Existing entries -->
|
|
99
|
+
<div v-if="dirs.length === 0" class="text-sm text-gray-400">No custom directories configured.</div>
|
|
100
|
+
<div v-else class="space-y-1.5">
|
|
101
|
+
<div
|
|
102
|
+
v-for="(dir, i) in dirs"
|
|
103
|
+
:key="dir.path"
|
|
104
|
+
class="flex items-center gap-2 px-2 py-1.5 bg-gray-50 rounded text-sm"
|
|
105
|
+
:data-testid="`workspace-dir-${i}`"
|
|
106
|
+
>
|
|
107
|
+
<div class="flex-1 min-w-0">
|
|
108
|
+
<div class="font-mono text-xs text-gray-800">{{ dir.path }}/</div>
|
|
109
|
+
<div v-if="dir.description" class="text-xs text-gray-500 truncate">
|
|
110
|
+
{{ dir.description }}
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
<span class="text-[10px] px-1.5 py-0.5 rounded bg-gray-200 text-gray-600 shrink-0">
|
|
114
|
+
{{ dir.structure }}
|
|
115
|
+
</span>
|
|
116
|
+
<button class="text-gray-300 hover:text-red-500 shrink-0" title="Remove" @click="removeEntry(i)">
|
|
117
|
+
<span class="material-icons text-sm">close</span>
|
|
118
|
+
</button>
|
|
119
|
+
</div>
|
|
120
|
+
</div>
|
|
121
|
+
|
|
122
|
+
<!-- Add new -->
|
|
123
|
+
<div class="border border-gray-200 rounded p-2 space-y-2">
|
|
124
|
+
<div class="text-xs font-semibold text-gray-600">Add directory</div>
|
|
125
|
+
<div class="flex gap-2">
|
|
126
|
+
<input
|
|
127
|
+
v-model="draftPath"
|
|
128
|
+
class="flex-1 px-2 py-1 text-xs font-mono border border-gray-300 rounded focus:outline-none focus:border-blue-400"
|
|
129
|
+
placeholder="data/clients or artifacts/reports"
|
|
130
|
+
data-testid="workspace-dir-path-input"
|
|
131
|
+
@keydown.enter="addEntry"
|
|
132
|
+
@keydown.stop
|
|
133
|
+
/>
|
|
134
|
+
<select
|
|
135
|
+
v-model="draftStructure"
|
|
136
|
+
class="text-xs border border-gray-300 rounded px-1 py-1 focus:outline-none"
|
|
137
|
+
data-testid="workspace-dir-structure-select"
|
|
138
|
+
>
|
|
139
|
+
<option value="flat">flat</option>
|
|
140
|
+
<option value="by-name">by-name</option>
|
|
141
|
+
<option value="by-date">by-date</option>
|
|
142
|
+
</select>
|
|
143
|
+
</div>
|
|
144
|
+
<input
|
|
145
|
+
v-model="draftDescription"
|
|
146
|
+
class="w-full px-2 py-1 text-xs border border-gray-300 rounded focus:outline-none focus:border-blue-400"
|
|
147
|
+
placeholder="Description (what goes in this folder)"
|
|
148
|
+
data-testid="workspace-dir-desc-input"
|
|
149
|
+
@keydown.enter="addEntry"
|
|
150
|
+
@keydown.stop
|
|
151
|
+
/>
|
|
152
|
+
<div class="flex items-center gap-2">
|
|
153
|
+
<button class="px-2 py-1 text-xs rounded bg-blue-500 text-white hover:bg-blue-600" data-testid="workspace-dir-add-btn" @click="addEntry">Add</button>
|
|
154
|
+
<span v-if="draftError" class="text-xs text-red-500">{{ draftError }}</span>
|
|
155
|
+
</div>
|
|
156
|
+
</div>
|
|
157
|
+
|
|
158
|
+
<!-- Save -->
|
|
159
|
+
<div class="flex items-center gap-2">
|
|
160
|
+
<button
|
|
161
|
+
class="px-3 py-1.5 text-sm rounded bg-blue-500 text-white hover:bg-blue-600 disabled:bg-gray-300"
|
|
162
|
+
:disabled="saving"
|
|
163
|
+
data-testid="workspace-dirs-save-btn"
|
|
164
|
+
@click="save"
|
|
165
|
+
>
|
|
166
|
+
{{ saving ? "Saving..." : "Save" }}
|
|
167
|
+
</button>
|
|
168
|
+
<span v-if="saveStatus" class="text-xs" :class="saveStatus === 'Saved' ? 'text-green-600' : 'text-red-600'">
|
|
169
|
+
{{ saveStatus }}
|
|
170
|
+
</span>
|
|
171
|
+
</div>
|
|
172
|
+
</template>
|
|
173
|
+
</div>
|
|
174
|
+
</template>
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="flex items-center gap-2">
|
|
3
|
+
<img :src="logoUrl" alt="" class="h-[50px] w-auto -my-3.5 -ml-3 rounded object-contain shrink-0" />
|
|
4
|
+
<h1 data-testid="app-title" class="text-sm font-semibold text-gray-800 mr-1" :style="titleStyle">MulmoClaude</h1>
|
|
5
|
+
<div class="flex gap-2">
|
|
6
|
+
<LockStatusPopup
|
|
7
|
+
ref="lockPopup"
|
|
8
|
+
:sandbox-enabled="sandboxEnabled"
|
|
9
|
+
:open="lockPopupOpen"
|
|
10
|
+
@update:open="lockPopupOpen = $event"
|
|
11
|
+
@test-query="(q) => emit('testQuery', q)"
|
|
12
|
+
/>
|
|
13
|
+
<NotificationBell :force-close="lockPopupOpen" @navigate="(action) => emit('notificationNavigate', action)" @update:open="onNotificationOpen" />
|
|
14
|
+
<button
|
|
15
|
+
class="text-gray-400 hover:text-gray-700"
|
|
16
|
+
:class="{ 'text-blue-500': showRightSidebar }"
|
|
17
|
+
title="Tool call history"
|
|
18
|
+
@click="emit('toggleRightSidebar')"
|
|
19
|
+
>
|
|
20
|
+
<span class="material-icons">build</span>
|
|
21
|
+
</button>
|
|
22
|
+
<button class="text-gray-400 hover:text-gray-700" data-testid="settings-btn" title="Settings" aria-label="Settings" @click="emit('openSettings')">
|
|
23
|
+
<span class="material-icons">settings</span>
|
|
24
|
+
</button>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
</template>
|
|
28
|
+
|
|
29
|
+
<script setup lang="ts">
|
|
30
|
+
import { computed, onBeforeUnmount, onMounted, ref, type CSSProperties } from "vue";
|
|
31
|
+
import LockStatusPopup from "./LockStatusPopup.vue";
|
|
32
|
+
import NotificationBell from "./NotificationBell.vue";
|
|
33
|
+
import { useClickOutside } from "../composables/useClickOutside";
|
|
34
|
+
import type { NotificationPayload } from "../types/notification";
|
|
35
|
+
import logoUrl from "../assets/mulmo_bw.png";
|
|
36
|
+
|
|
37
|
+
defineProps<{
|
|
38
|
+
sandboxEnabled: boolean;
|
|
39
|
+
showRightSidebar: boolean;
|
|
40
|
+
titleStyle?: CSSProperties;
|
|
41
|
+
}>();
|
|
42
|
+
|
|
43
|
+
const emit = defineEmits<{
|
|
44
|
+
testQuery: [query: string];
|
|
45
|
+
notificationNavigate: [action: NotificationPayload["action"]];
|
|
46
|
+
toggleRightSidebar: [];
|
|
47
|
+
openSettings: [];
|
|
48
|
+
}>();
|
|
49
|
+
|
|
50
|
+
const lockPopupOpen = ref(false);
|
|
51
|
+
const lockPopup = ref<{
|
|
52
|
+
button: HTMLButtonElement | null;
|
|
53
|
+
popup: HTMLDivElement | null;
|
|
54
|
+
} | null>(null);
|
|
55
|
+
const lockButton = computed(() => lockPopup.value?.button ?? null);
|
|
56
|
+
const lockPopupEl = computed(() => lockPopup.value?.popup ?? null);
|
|
57
|
+
|
|
58
|
+
const { handler } = useClickOutside({
|
|
59
|
+
isOpen: lockPopupOpen,
|
|
60
|
+
buttonRef: lockButton,
|
|
61
|
+
popupRef: lockPopupEl,
|
|
62
|
+
});
|
|
63
|
+
onMounted(() => document.addEventListener("mousedown", handler));
|
|
64
|
+
onBeforeUnmount(() => document.removeEventListener("mousedown", handler));
|
|
65
|
+
|
|
66
|
+
function onNotificationOpen(isOpen: boolean): void {
|
|
67
|
+
if (isOpen) lockPopupOpen.value = false;
|
|
68
|
+
}
|
|
69
|
+
</script>
|