@myrialabs/clopen 0.2.1 → 0.2.3
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/.dockerignore +5 -0
- package/.env.example +2 -5
- package/CONTRIBUTING.md +4 -0
- package/README.md +4 -2
- package/backend/{lib/auth → auth}/auth-service.ts +2 -2
- package/backend/{lib/chat → chat}/stream-manager.ts +1 -1
- package/backend/{lib/database → database}/queries/message-queries.ts +42 -0
- package/backend/{lib/database → database}/utils/connection.ts +5 -5
- package/backend/{lib/engine → engine}/adapters/claude/environment.ts +3 -4
- package/backend/{lib/engine → engine}/adapters/opencode/message-converter.ts +1 -1
- package/backend/{lib/engine → engine}/adapters/opencode/server.ts +7 -1
- package/backend/{lib/files → files}/file-watcher.ts +1 -1
- package/backend/{lib/git → git}/git-executor.ts +3 -2
- package/backend/index.ts +16 -16
- package/backend/{lib/mcp → mcp}/README.md +68 -79
- package/backend/{lib/mcp → mcp}/config.ts +1 -1
- package/backend/{lib/mcp → mcp}/servers/browser-automation/actions.ts +4 -4
- package/backend/{lib/mcp → mcp}/servers/browser-automation/browser.ts +3 -3
- package/backend/{lib/mcp → mcp}/servers/browser-automation/inspection.ts +3 -3
- package/backend/middleware/cors.ts +1 -1
- package/backend/middleware/error-handler.ts +1 -1
- package/backend/{lib/preview → preview}/browser/browser-preview-service.ts +1 -1
- package/backend/{lib/preview → preview}/browser/browser-tab-manager.ts +1 -1
- package/backend/{lib/preview → preview}/browser/types.ts +1 -1
- package/backend/{lib/project → project}/status-manager.ts +223 -223
- package/backend/{lib/snapshot → snapshot}/blob-store.ts +2 -2
- package/backend/{lib/terminal → terminal}/shell-utils.ts +1 -1
- package/backend/{lib/shared → utils}/env.ts +13 -15
- package/backend/{lib/shared → utils}/index.ts +4 -1
- package/backend/utils/paths.ts +11 -0
- package/backend/{lib/shared → utils}/port-utils.ts +19 -6
- package/backend/{lib/utils → utils}/ws.ts +2 -2
- package/backend/ws/README.md +9 -9
- package/backend/ws/auth/invites.ts +2 -2
- package/backend/ws/auth/login.ts +9 -9
- package/backend/ws/auth/status.ts +2 -2
- package/backend/ws/auth/users.ts +1 -1
- package/backend/ws/chat/background.ts +2 -2
- package/backend/ws/chat/stream.ts +3 -3
- package/backend/ws/engine/claude/accounts.ts +4 -4
- package/backend/ws/engine/claude/status.ts +1 -1
- package/backend/ws/files/read.ts +2 -2
- package/backend/ws/files/watch.ts +2 -2
- package/backend/ws/files/write.ts +1 -1
- package/backend/ws/git/branch.ts +2 -2
- package/backend/ws/git/commit.ts +2 -2
- package/backend/ws/git/conflict.ts +2 -2
- package/backend/ws/git/diff.ts +2 -2
- package/backend/ws/git/log.ts +2 -2
- package/backend/ws/git/remote.ts +2 -2
- package/backend/ws/git/staging.ts +2 -2
- package/backend/ws/git/status.ts +3 -3
- package/backend/ws/messages/crud.ts +53 -1
- package/backend/ws/preview/browser/cleanup.ts +2 -2
- package/backend/ws/preview/browser/console.ts +2 -2
- package/backend/ws/preview/browser/interact.ts +2 -2
- package/backend/ws/preview/browser/mcp.ts +1 -1
- package/backend/ws/preview/browser/native-ui.ts +2 -2
- package/backend/ws/preview/browser/stats.ts +2 -2
- package/backend/ws/preview/browser/tab-info.ts +2 -2
- package/backend/ws/preview/browser/tab.ts +2 -2
- package/backend/ws/preview/browser/webcodecs.ts +2 -2
- package/backend/ws/projects/crud.ts +3 -3
- package/backend/ws/projects/presence.ts +3 -3
- package/backend/ws/projects/status.ts +3 -3
- package/backend/ws/sessions/crud.ts +2 -2
- package/backend/ws/settings/crud.ts +2 -2
- package/backend/ws/snapshot/restore.ts +5 -5
- package/backend/ws/snapshot/timeline.ts +3 -3
- package/backend/ws/system/operations.ts +1 -1
- package/backend/ws/terminal/persistence.ts +3 -3
- package/backend/ws/terminal/session.ts +6 -6
- package/backend/ws/terminal/stream.ts +2 -2
- package/backend/ws/tunnel/operations.ts +1 -1
- package/backend/ws/user/crud.ts +4 -4
- package/bin/clopen.ts +15 -15
- package/docker-compose.yml +31 -0
- package/frontend/App.svelte +13 -13
- package/frontend/{lib/components → components}/auth/InvitePage.svelte +2 -2
- package/frontend/{lib/components → components}/auth/LoginPage.svelte +1 -1
- package/frontend/{lib/components → components}/auth/SetupPage.svelte +49 -17
- package/frontend/{lib/components → components}/chat/ChatInterface.svelte +14 -14
- package/frontend/{lib/components → components}/chat/formatters/ErrorMessage.svelte +1 -1
- package/frontend/{lib/components → components}/chat/formatters/MessageFormatter.svelte +4 -4
- package/frontend/{lib/components → components}/chat/formatters/TextMessage.svelte +1 -1
- package/frontend/{lib/components → components}/chat/formatters/Tools.svelte +1 -1
- package/frontend/{lib/components → components}/chat/input/ChatInput.svelte +12 -12
- package/frontend/{lib/components → components}/chat/input/components/ChatInputActions.svelte +1 -1
- package/frontend/{lib/components → components}/chat/input/components/EditModeIndicator.svelte +2 -2
- package/frontend/{lib/components → components}/chat/input/components/EngineModelPicker.svelte +9 -9
- package/frontend/{lib/components → components}/chat/input/components/FileAttachmentPreview.svelte +1 -1
- package/frontend/{lib/components → components}/chat/input/components/LoadingIndicator.svelte +2 -2
- package/frontend/{lib/components → components}/chat/input/composables/use-chat-actions.svelte.ts +8 -8
- package/frontend/{lib/components → components}/chat/input/composables/use-file-handling.svelte.ts +1 -1
- package/frontend/{lib/components → components}/chat/input/composables/use-input-state.svelte.ts +6 -6
- package/frontend/{lib/components → components}/chat/message/ChatMessage.svelte +8 -8
- package/frontend/{lib/components → components}/chat/message/ChatMessages.svelte +7 -7
- package/frontend/{lib/components → components}/chat/message/MessageBubble.svelte +1 -1
- package/frontend/{lib/components → components}/chat/message/MessageHeader.svelte +2 -2
- package/frontend/{lib/components → components}/chat/modal/DebugModal.svelte +2 -2
- package/frontend/{lib/components → components}/chat/modal/TokenUsageModal.svelte +2 -2
- package/frontend/{lib/components → components}/chat/tools/AskUserQuestionTool.svelte +4 -4
- package/frontend/{lib/components → components}/chat/tools/CustomMcpTool.svelte +1 -1
- package/frontend/{lib/components → components}/chat/tools/EditTool.svelte +1 -1
- package/frontend/{lib/components → components}/chat/tools/TodoWriteTool.svelte +1 -1
- package/frontend/{lib/components → components}/chat/tools/components/CodeBlock.svelte +2 -2
- package/frontend/{lib/components → components}/chat/tools/components/DiffBlock.svelte +1 -1
- package/frontend/{lib/components → components}/chat/tools/components/FileHeader.svelte +2 -2
- package/frontend/{lib/components → components}/chat/tools/components/InfoLine.svelte +1 -1
- package/frontend/{lib/components → components}/chat/widgets/FloatingTodoList.svelte +127 -13
- package/frontend/{lib/components → components}/chat/widgets/TokenUsage.svelte +4 -4
- package/frontend/{lib/components → components}/checkpoint/TimelineModal.svelte +10 -10
- package/frontend/{lib/components → components}/checkpoint/timeline/TimelineNode.svelte +1 -1
- package/frontend/{lib/components/common → components/common/display}/Icon.svelte +2 -2
- package/frontend/{lib/components/common → components/common/display}/PageTemplate.svelte +1 -1
- package/frontend/{lib/components/common → components/common/display}/ProjectUserAvatars.svelte +1 -1
- package/frontend/{lib/components/common → components/common/display}/ThemeToggle.svelte +1 -1
- package/frontend/{lib/components/common → components/common/editor}/MonacoEditor.svelte +2 -2
- package/frontend/{lib/components/common → components/common/feedback}/Alert.svelte +1 -1
- package/frontend/{lib/components/common → components/common/feedback}/ConnectionBanner.svelte +3 -3
- package/frontend/{lib/components/common → components/common/feedback}/LoadingScreen.svelte +1 -1
- package/frontend/{lib/components/common → components/common/feedback}/NotificationToast.svelte +2 -2
- package/frontend/{lib/components/common → components/common/feedback}/UpdateBanner.svelte +5 -5
- package/frontend/{lib/components/common → components/common/form}/Checkbox.svelte +1 -1
- package/frontend/{lib/components/common → components/common/form}/FolderBrowser.svelte +6 -6
- package/frontend/{lib/components/common → components/common/form}/Input.svelte +1 -1
- package/frontend/{lib/components/common → components/common/form}/ModelSelector.svelte +3 -3
- package/frontend/{lib/components/common → components/common/form}/Select.svelte +1 -1
- package/frontend/{lib/components/common → components/common/form}/Textarea.svelte +1 -1
- package/frontend/{lib/components/common → components/common/overlay}/Dialog.svelte +1 -1
- package/frontend/{lib/components/common → components/common/overlay}/Lightbox.svelte +3 -3
- package/frontend/{lib/components/common → components/common/overlay}/ModalProvider.svelte +2 -2
- package/frontend/{lib/components → components}/common/xterm/XTerm.svelte +5 -5
- package/frontend/{lib/components → components}/common/xterm/xterm-service.ts +2 -2
- package/frontend/{lib/components → components}/files/FileNode.svelte +3 -3
- package/frontend/{lib/components → components}/files/FileTree.svelte +5 -5
- package/frontend/{lib/components → components}/files/FileViewer.svelte +7 -7
- package/frontend/{lib/components → components}/files/SearchResults.svelte +3 -3
- package/frontend/{lib/components → components}/git/BranchManager.svelte +6 -6
- package/frontend/{lib/components → components}/git/ChangesSection.svelte +1 -1
- package/frontend/{lib/components → components}/git/CommitForm.svelte +1 -1
- package/frontend/{lib/components → components}/git/ConflictResolver.svelte +1 -1
- package/frontend/{lib/components → components}/git/DiffViewer.svelte +7 -7
- package/frontend/{lib/components → components}/git/FileChangeItem.svelte +3 -3
- package/frontend/{lib/components → components}/git/GitButton.svelte +1 -1
- package/frontend/{lib/components → components}/git/GitLog.svelte +2 -2
- package/frontend/{lib/components → components}/git/GitModal.svelte +3 -3
- package/frontend/{lib/components → components}/history/HistoryModal.svelte +41 -89
- package/frontend/{lib/components → components}/history/HistoryView.svelte +57 -104
- package/frontend/{lib/components → components}/index.ts +9 -9
- package/frontend/{lib/components → components}/preview/browser/BrowserPreview.svelte +3 -3
- package/frontend/{lib/components → components}/preview/browser/components/Canvas.svelte +2 -2
- package/frontend/{lib/components → components}/preview/browser/components/ConsolePanel.svelte +1 -1
- package/frontend/{lib/components → components}/preview/browser/components/Container.svelte +2 -2
- package/frontend/{lib/components → components}/preview/browser/components/ContextMenu.svelte +1 -1
- package/frontend/{lib/components → components}/preview/browser/components/SelectDropdown.svelte +1 -1
- package/frontend/{lib/components → components}/preview/browser/components/Toolbar.svelte +2 -2
- package/frontend/{lib/components → components}/preview/browser/core/cleanup.svelte.ts +1 -1
- package/frontend/{lib/components → components}/preview/browser/core/coordinator.svelte.ts +4 -4
- package/frontend/{lib/components → components}/preview/browser/core/interactions.svelte.ts +3 -3
- package/frontend/{lib/components → components}/preview/browser/core/mcp-handlers.svelte.ts +2 -2
- package/frontend/{lib/components → components}/preview/browser/core/native-ui-handlers.svelte.ts +2 -2
- package/frontend/{lib/components → components}/preview/browser/core/tab-manager.svelte.ts +1 -1
- package/frontend/{lib/components → components}/preview/browser/core/tab-operations.svelte.ts +3 -3
- package/frontend/{lib/components → components}/settings/SettingsModal.svelte +4 -4
- package/frontend/{lib/components → components}/settings/SettingsView.svelte +2 -2
- package/frontend/{lib/components → components}/settings/admin/InviteManagement.svelte +5 -5
- package/frontend/{lib/components → components}/settings/admin/UserManagement.svelte +5 -5
- package/frontend/{lib/components → components}/settings/appearance/AppearanceSettings.svelte +5 -5
- package/frontend/{lib/components → components}/settings/appearance/LayoutPresetSettings.svelte +3 -3
- package/frontend/{lib/components → components}/settings/appearance/LayoutPreview.svelte +1 -1
- package/frontend/{lib/components → components}/settings/engines/AIEnginesSettings.svelte +6 -6
- package/frontend/{lib/components → components}/settings/general/AdvancedSettings.svelte +5 -5
- package/frontend/{lib/components → components}/settings/general/AuthModeSettings.svelte +5 -5
- package/frontend/{lib/components → components}/settings/general/DataManagementSettings.svelte +9 -9
- package/frontend/{lib/components → components}/settings/general/UpdateSettings.svelte +3 -3
- package/frontend/{lib/components → components}/settings/model/ModelSettings.svelte +2 -2
- package/frontend/{lib/components → components}/settings/notifications/NotificationSettings.svelte +4 -4
- package/frontend/{lib/components → components}/settings/user/UserSettings.svelte +5 -5
- package/frontend/{lib/components → components}/terminal/Terminal.svelte +9 -9
- package/frontend/{lib/components → components}/terminal/TerminalTabs.svelte +1 -1
- package/frontend/{lib/components → components}/terminal/TerminalView.svelte +5 -5
- package/frontend/{lib/components → components}/tunnel/TunnelActive.svelte +3 -3
- package/frontend/{lib/components → components}/tunnel/TunnelButton.svelte +2 -2
- package/frontend/{lib/components → components}/tunnel/TunnelInactive.svelte +4 -4
- package/frontend/{lib/components → components}/tunnel/TunnelModal.svelte +2 -2
- package/frontend/{lib/components → components}/workspace/DesktopNavigator.svelte +372 -372
- package/frontend/{lib/components → components}/workspace/MobileNavigator.svelte +380 -380
- package/frontend/{lib/components → components}/workspace/PanelContainer.svelte +3 -3
- package/frontend/{lib/components → components}/workspace/PanelHeader.svelte +10 -10
- package/frontend/{lib/components → components}/workspace/ViewMenu.svelte +4 -4
- package/frontend/{lib/components → components}/workspace/WorkspaceLayout.svelte +17 -17
- package/frontend/{lib/components → components}/workspace/layout/DesktopLayout.svelte +1 -1
- package/frontend/{lib/components → components}/workspace/layout/MobileLayout.svelte +1 -1
- package/frontend/{lib/components → components}/workspace/layout/split-pane/Container.svelte +1 -1
- package/frontend/{lib/components → components}/workspace/layout/split-pane/Handle.svelte +2 -2
- package/frontend/{lib/components → components}/workspace/layout/split-pane/Layout.svelte +2 -2
- package/frontend/{lib/components → components}/workspace/panels/ChatPanel.svelte +14 -14
- package/frontend/{lib/components → components}/workspace/panels/FilesPanel.svelte +51 -13
- package/frontend/{lib/components → components}/workspace/panels/GitPanel.svelte +55 -17
- package/frontend/{lib/components → components}/workspace/panels/PreviewPanel.svelte +5 -5
- package/frontend/{lib/components → components}/workspace/panels/TerminalPanel.svelte +6 -6
- package/frontend/{lib/services → services}/chat/chat.service.ts +8 -8
- package/frontend/{lib/services → services}/notification/global-stream-monitor.ts +117 -117
- package/frontend/{lib/services → services}/notification/push.service.ts +1 -1
- package/frontend/{lib/services → services}/notification/sound.service.ts +1 -1
- package/frontend/{lib/services → services}/preview/browser/browser-console.service.ts +1 -1
- package/frontend/{lib/services → services}/preview/browser/browser-webcodecs.service.ts +1 -1
- package/frontend/{lib/services → services}/preview/browser/mcp-integration.svelte.ts +2 -2
- package/frontend/{lib/services → services}/project/status.service.ts +160 -160
- package/frontend/{lib/services → services}/snapshot/snapshot.service.ts +2 -2
- package/frontend/{lib/services → services}/terminal/background/index.ts +1 -1
- package/frontend/{lib/services → services}/terminal/background/session-restore.ts +1 -1
- package/frontend/{lib/services → services}/terminal/background/stream-manager.ts +1 -1
- package/frontend/{lib/services → services}/terminal/project.service.ts +2 -2
- package/frontend/{lib/services → services}/terminal/terminal.service.ts +2 -2
- package/frontend/{lib/stores → stores}/core/app.svelte.ts +1 -1
- package/frontend/{lib/stores → stores}/core/presence.svelte.ts +4 -4
- package/frontend/{lib/stores → stores}/core/projects.svelte.ts +5 -5
- package/frontend/{lib/stores → stores}/core/sessions.svelte.ts +3 -3
- package/frontend/{lib/stores → stores}/features/auth.svelte.ts +30 -2
- package/frontend/{lib/stores → stores}/features/claude-accounts.svelte.ts +1 -1
- package/frontend/{lib/stores → stores}/features/models.svelte.ts +1 -1
- package/frontend/{lib/stores → stores}/features/settings.svelte.ts +2 -2
- package/frontend/{lib/stores → stores}/features/terminal.svelte.ts +4 -4
- package/frontend/{lib/stores → stores}/features/tunnel.svelte.ts +1 -1
- package/frontend/{lib/stores → stores}/features/user.svelte.ts +1 -1
- package/frontend/{lib/stores → stores}/ui/edit-mode.svelte.ts +3 -3
- package/frontend/{lib/stores → stores}/ui/update.svelte.ts +8 -2
- package/frontend/{lib/utils → utils}/theme.ts +1 -1
- package/frontend/{lib/utils → utils}/ws.ts +1 -1
- package/package.json +2 -2
- package/scripts/dev.ts +4 -3
- package/scripts/generate-icons.ts +2 -2
- package/scripts/start.ts +24 -0
- package/shared/types/ui/icons.ts +4 -4
- package/shared/utils/anonymous-user.ts +1 -1
- package/shared/utils/ws-server.ts +3 -3
- package/vite.config.ts +2 -2
- /package/backend/{lib/auth → auth}/index.ts +0 -0
- /package/backend/{lib/auth → auth}/permissions.ts +0 -0
- /package/backend/{lib/auth → auth}/rate-limiter.ts +0 -0
- /package/backend/{lib/auth → auth}/tokens.ts +0 -0
- /package/backend/{lib/chat → chat}/helpers.ts +0 -0
- /package/backend/{lib/chat → chat}/index.ts +0 -0
- /package/backend/{lib/database → database}/README.md +0 -0
- /package/backend/{lib/database → database}/index.ts +0 -0
- /package/backend/{lib/database → database}/migrations/001_create_projects_table.ts +0 -0
- /package/backend/{lib/database → database}/migrations/002_create_chat_sessions_table.ts +0 -0
- /package/backend/{lib/database → database}/migrations/003_create_messages_table.ts +0 -0
- /package/backend/{lib/database → database}/migrations/004_create_prompt_templates_table.ts +0 -0
- /package/backend/{lib/database → database}/migrations/005_create_settings_table.ts +0 -0
- /package/backend/{lib/database → database}/migrations/006_add_user_to_messages.ts +0 -0
- /package/backend/{lib/database → database}/migrations/007_create_stream_states_table.ts +0 -0
- /package/backend/{lib/database → database}/migrations/008_create_message_snapshots_table.ts +0 -0
- /package/backend/{lib/database → database}/migrations/009_add_delta_snapshot_fields.ts +0 -0
- /package/backend/{lib/database → database}/migrations/010_add_soft_delete_and_branch_support.ts +0 -0
- /package/backend/{lib/database → database}/migrations/011_git_like_commit_graph.ts +0 -0
- /package/backend/{lib/database → database}/migrations/012_add_file_change_statistics.ts +0 -0
- /package/backend/{lib/database → database}/migrations/013_checkpoint_tree_state.ts +0 -0
- /package/backend/{lib/database → database}/migrations/014_add_engine_to_sessions.ts +0 -0
- /package/backend/{lib/database → database}/migrations/015_add_model_to_sessions.ts +0 -0
- /package/backend/{lib/database → database}/migrations/016_create_user_projects_table.ts +0 -0
- /package/backend/{lib/database → database}/migrations/017_add_current_session_to_user_projects.ts +0 -0
- /package/backend/{lib/database → database}/migrations/018_create_claude_accounts_table.ts +0 -0
- /package/backend/{lib/database → database}/migrations/019_add_claude_account_to_sessions.ts +0 -0
- /package/backend/{lib/database → database}/migrations/020_add_snapshot_tree_hash.ts +0 -0
- /package/backend/{lib/database → database}/migrations/021_drop_prompt_templates_table.ts +0 -0
- /package/backend/{lib/database → database}/migrations/022_add_snapshot_changes_column.ts +0 -0
- /package/backend/{lib/database → database}/migrations/023_create_user_unread_sessions_table.ts +0 -0
- /package/backend/{lib/database → database}/migrations/024_create_users_table.ts +0 -0
- /package/backend/{lib/database → database}/migrations/025_create_auth_sessions_table.ts +0 -0
- /package/backend/{lib/database → database}/migrations/026_create_invite_tokens_table.ts +0 -0
- /package/backend/{lib/database → database}/migrations/index.ts +0 -0
- /package/backend/{lib/database → database}/queries/auth-queries.ts +0 -0
- /package/backend/{lib/database → database}/queries/checkpoint-queries.ts +0 -0
- /package/backend/{lib/database → database}/queries/engine-queries.ts +0 -0
- /package/backend/{lib/database → database}/queries/index.ts +0 -0
- /package/backend/{lib/database → database}/queries/project-queries.ts +0 -0
- /package/backend/{lib/database → database}/queries/session-queries.ts +0 -0
- /package/backend/{lib/database → database}/queries/settings-queries.ts +0 -0
- /package/backend/{lib/database → database}/queries/snapshot-queries.ts +0 -0
- /package/backend/{lib/database → database}/queries/utils-queries.ts +0 -0
- /package/backend/{lib/database → database}/seeders/index.ts +0 -0
- /package/backend/{lib/database → database}/seeders/settings_seeder.ts +0 -0
- /package/backend/{lib/database → database}/utils/index.ts +0 -0
- /package/backend/{lib/database → database}/utils/migration-runner.ts +0 -0
- /package/backend/{lib/database → database}/utils/seeder-runner.ts +0 -0
- /package/backend/{lib/engine → engine}/adapters/claude/error-handler.ts +0 -0
- /package/backend/{lib/engine → engine}/adapters/claude/index.ts +0 -0
- /package/backend/{lib/engine → engine}/adapters/claude/path-utils.ts +0 -0
- /package/backend/{lib/engine → engine}/adapters/claude/stream.ts +0 -0
- /package/backend/{lib/engine → engine}/adapters/opencode/index.ts +0 -0
- /package/backend/{lib/engine → engine}/adapters/opencode/stream.ts +0 -0
- /package/backend/{lib/engine → engine}/index.ts +0 -0
- /package/backend/{lib/engine → engine}/types.ts +0 -0
- /package/backend/{lib/files → files}/file-operations.ts +0 -0
- /package/backend/{lib/files → files}/file-reading.ts +0 -0
- /package/backend/{lib/files → files}/path-browsing.ts +0 -0
- /package/backend/{lib/git → git}/git-parser.ts +0 -0
- /package/backend/{lib/git → git}/git-service.ts +0 -0
- /package/backend/{lib/mcp → mcp}/index.ts +0 -0
- /package/backend/{lib/mcp → mcp}/project-context.ts +0 -0
- /package/backend/{lib/mcp → mcp}/remote-server.ts +0 -0
- /package/backend/{lib/mcp → mcp}/servers/browser-automation/index.ts +0 -0
- /package/backend/{lib/mcp → mcp}/servers/helper.ts +0 -0
- /package/backend/{lib/mcp → mcp}/servers/index.ts +0 -0
- /package/backend/{lib/mcp → mcp}/servers/weather/get-temperature.ts +0 -0
- /package/backend/{lib/mcp → mcp}/servers/weather/index.ts +0 -0
- /package/backend/{lib/mcp → mcp}/types.ts +0 -0
- /package/backend/{lib/preview → preview}/browser/browser-audio-capture.ts +0 -0
- /package/backend/{lib/preview → preview}/browser/browser-console-manager.ts +0 -0
- /package/backend/{lib/preview → preview}/browser/browser-dialog-handler.ts +0 -0
- /package/backend/{lib/preview → preview}/browser/browser-interaction-handler.ts +0 -0
- /package/backend/{lib/preview → preview}/browser/browser-mcp-control.ts +0 -0
- /package/backend/{lib/preview → preview}/browser/browser-native-ui-handler.ts +0 -0
- /package/backend/{lib/preview → preview}/browser/browser-navigation-tracker.ts +0 -0
- /package/backend/{lib/preview → preview}/browser/browser-pool.ts +0 -0
- /package/backend/{lib/preview → preview}/browser/browser-video-capture.ts +0 -0
- /package/backend/{lib/preview → preview}/browser/scripts/audio-stream.ts +0 -0
- /package/backend/{lib/preview → preview}/browser/scripts/cursor-tracking.ts +0 -0
- /package/backend/{lib/preview → preview}/browser/scripts/video-stream.ts +0 -0
- /package/backend/{lib/preview → preview}/index.ts +0 -0
- /package/backend/{lib/project → project}/index.ts +0 -0
- /package/backend/{lib/snapshot → snapshot}/gitignore.ts +0 -0
- /package/backend/{lib/snapshot → snapshot}/helpers.ts +0 -0
- /package/backend/{lib/snapshot → snapshot}/snapshot-service.ts +0 -0
- /package/backend/{lib/terminal → terminal}/helpers.ts +0 -0
- /package/backend/{lib/terminal → terminal}/index.ts +0 -0
- /package/backend/{lib/terminal → terminal}/pty-manager.ts +0 -0
- /package/backend/{lib/terminal → terminal}/pty-session-manager.ts +0 -0
- /package/backend/{lib/terminal → terminal}/stream-manager.ts +0 -0
- /package/backend/{lib/tunnel → tunnel}/global-tunnel-manager.ts +0 -0
- /package/backend/{lib/tunnel → tunnel}/project-tunnel-manager.ts +0 -0
- /package/backend/{lib/shared → utils}/process-manager.ts +0 -0
- /package/backend/{lib/user/helpers.ts → utils/user-helpers.ts} +0 -0
- /package/frontend/{lib/app-environment.ts → app-environment.ts} +0 -0
- /package/frontend/{lib/components → components}/chat/formatters/index.ts +0 -0
- /package/frontend/{lib/components → components}/chat/input/components/DragDropOverlay.svelte +0 -0
- /package/frontend/{lib/components → components}/chat/input/composables/use-animations.svelte.ts +0 -0
- /package/frontend/{lib/components → components}/chat/input/composables/use-textarea-resize.svelte.ts +0 -0
- /package/frontend/{lib/components → components}/chat/message/DateSeparator.svelte +0 -0
- /package/frontend/{lib/components → components}/chat/shared/index.ts +0 -0
- /package/frontend/{lib/components → components}/chat/shared/utils.ts +0 -0
- /package/frontend/{lib/components → components}/chat/tools/AgentTool.svelte +0 -0
- /package/frontend/{lib/components → components}/chat/tools/BashOutputTool.svelte +0 -0
- /package/frontend/{lib/components → components}/chat/tools/BashTool.svelte +0 -0
- /package/frontend/{lib/components → components}/chat/tools/EnterPlanModeTool.svelte +0 -0
- /package/frontend/{lib/components → components}/chat/tools/ExitPlanModeTool.svelte +0 -0
- /package/frontend/{lib/components → components}/chat/tools/GlobTool.svelte +0 -0
- /package/frontend/{lib/components → components}/chat/tools/GrepTool.svelte +0 -0
- /package/frontend/{lib/components → components}/chat/tools/ListMcpResourcesTool.svelte +0 -0
- /package/frontend/{lib/components → components}/chat/tools/NotebookEditTool.svelte +0 -0
- /package/frontend/{lib/components → components}/chat/tools/ReadMcpResourceTool.svelte +0 -0
- /package/frontend/{lib/components → components}/chat/tools/ReadTool.svelte +0 -0
- /package/frontend/{lib/components → components}/chat/tools/TaskStopTool.svelte +0 -0
- /package/frontend/{lib/components → components}/chat/tools/TaskTool.svelte +0 -0
- /package/frontend/{lib/components → components}/chat/tools/WebFetchTool.svelte +0 -0
- /package/frontend/{lib/components → components}/chat/tools/WebSearchTool.svelte +0 -0
- /package/frontend/{lib/components → components}/chat/tools/WriteTool.svelte +0 -0
- /package/frontend/{lib/components → components}/chat/tools/components/StatsBadges.svelte +0 -0
- /package/frontend/{lib/components → components}/chat/tools/components/TerminalCommand.svelte +0 -0
- /package/frontend/{lib/components → components}/chat/tools/components/index.ts +0 -0
- /package/frontend/{lib/components → components}/chat/tools/index.ts +0 -0
- /package/frontend/{lib/components → components}/checkpoint/timeline/TimelineEdge.svelte +0 -0
- /package/frontend/{lib/components → components}/checkpoint/timeline/TimelineGraph.svelte +0 -0
- /package/frontend/{lib/components → components}/checkpoint/timeline/TimelineVersionGroup.svelte +0 -0
- /package/frontend/{lib/components → components}/checkpoint/timeline/animation.ts +0 -0
- /package/frontend/{lib/components → components}/checkpoint/timeline/config.ts +0 -0
- /package/frontend/{lib/components → components}/checkpoint/timeline/graph-builder.ts +0 -0
- /package/frontend/{lib/components → components}/checkpoint/timeline/types.ts +0 -0
- /package/frontend/{lib/components → components}/checkpoint/timeline/utils.ts +0 -0
- /package/frontend/{lib/components/common → components/common/display}/AvatarBubble.svelte +0 -0
- /package/frontend/{lib/components/common → components/common/display}/Button.svelte +0 -0
- /package/frontend/{lib/components/common → components/common/display}/Card.svelte +0 -0
- /package/frontend/{lib/components/common → components/common/feedback}/LoadingSpinner.svelte +0 -0
- /package/frontend/{lib/components → components}/common/lucide-icons.ts +0 -0
- /package/frontend/{lib/components → components}/common/material-icons.ts +0 -0
- /package/frontend/{lib/components/common → components/common/overlay}/Modal.svelte +0 -0
- /package/frontend/{lib/components → components}/common/xterm/index.ts +0 -0
- /package/frontend/{lib/components → components}/common/xterm/terminal-config.ts +0 -0
- /package/frontend/{lib/components → components}/common/xterm/types.ts +0 -0
- /package/frontend/{lib/components → components}/preview/browser/components/VirtualCursor.svelte +0 -0
- /package/frontend/{lib/components → components}/preview/browser/core/stream-handler.svelte.ts +0 -0
- /package/frontend/{lib/components → components}/preview/index.ts +0 -0
- /package/frontend/{lib/components → components}/settings/account/AccountSettings.svelte +0 -0
- /package/frontend/{lib/components → components}/settings/general/GeneralSettings.svelte +0 -0
- /package/frontend/{lib/components → components}/settings/security/SecuritySettings.svelte +0 -0
- /package/frontend/{lib/components → components}/settings/system/SystemSettings.svelte +0 -0
- /package/frontend/{lib/components → components}/tunnel/TunnelQRCode.svelte +0 -0
- /package/frontend/{lib/services → services}/chat/index.ts +0 -0
- /package/frontend/{lib/services → services}/notification/index.ts +0 -0
- /package/frontend/{lib/services → services}/preview/index.ts +0 -0
- /package/frontend/{lib/services → services}/project/index.ts +0 -0
- /package/frontend/{lib/services → services}/terminal/index.ts +0 -0
- /package/frontend/{lib/services → services}/terminal/persistence.service.ts +0 -0
- /package/frontend/{lib/services → services}/terminal/session.service.ts +0 -0
- /package/frontend/{lib/stores → stores}/core/files.svelte.ts +0 -0
- /package/frontend/{lib/stores → stores}/ui/chat-input.svelte.ts +0 -0
- /package/frontend/{lib/stores → stores}/ui/chat-model.svelte.ts +0 -0
- /package/frontend/{lib/stores → stores}/ui/connection.svelte.ts +0 -0
- /package/frontend/{lib/stores → stores}/ui/dialog.svelte.ts +0 -0
- /package/frontend/{lib/stores → stores}/ui/notification.svelte.ts +0 -0
- /package/frontend/{lib/stores → stores}/ui/settings-modal.svelte.ts +0 -0
- /package/frontend/{lib/stores → stores}/ui/theme.svelte.ts +0 -0
- /package/frontend/{lib/stores → stores}/ui/workspace.svelte.ts +0 -0
- /package/frontend/{lib/utils → utils}/chat/date-separator.ts +0 -0
- /package/frontend/{lib/utils → utils}/chat/message-grouper.ts +0 -0
- /package/frontend/{lib/utils → utils}/chat/message-processor.ts +0 -0
- /package/frontend/{lib/utils → utils}/chat/tool-handler.ts +0 -0
- /package/frontend/{lib/utils → utils}/chat/virtual-scroll.svelte.ts +0 -0
- /package/frontend/{lib/utils → utils}/click-outside.ts +0 -0
- /package/frontend/{lib/utils → utils}/context-manager.ts +0 -0
- /package/frontend/{lib/utils → utils}/file-icon-mappings.ts +0 -0
- /package/frontend/{lib/utils → utils}/folder-icon-mappings.ts +0 -0
- /package/frontend/{lib/utils → utils}/git-status.ts +0 -0
- /package/frontend/{lib/types → utils}/native-ui.ts +0 -0
- /package/frontend/{lib/utils → utils}/platform.ts +0 -0
- /package/frontend/{lib/utils → utils}/port-check.ts +0 -0
- /package/frontend/{lib/constants/preview.ts → utils/preview-constants.ts} +0 -0
- /package/frontend/{lib/utils/terminalFormatter.ts → utils/terminal-formatter.ts} +0 -0
- /package/frontend/{lib/utils → utils}/tree-visualizer.ts +0 -0
|
@@ -12,19 +12,19 @@
|
|
|
12
12
|
<script lang="ts">
|
|
13
13
|
import type { SDKMessage } from '$shared/types/messaging';
|
|
14
14
|
import type { SDKMessageFormatter } from '$shared/types/database/schema';
|
|
15
|
-
import Icon from '$frontend/
|
|
15
|
+
import Icon from '$frontend/components/common/display/Icon.svelte';
|
|
16
16
|
import type { IconName } from '$shared/types/ui/icons';
|
|
17
|
-
import { addNotification } from '$frontend/
|
|
18
|
-
import { appState } from '$frontend/
|
|
19
|
-
import { sessionState, loadMessagesForSession } from '$frontend/
|
|
20
|
-
import { setInputText } from '$frontend/
|
|
21
|
-
import { startEdit, shouldDimMessage } from '$frontend/
|
|
17
|
+
import { addNotification } from '$frontend/stores/ui/notification.svelte';
|
|
18
|
+
import { appState } from '$frontend/stores/core/app.svelte';
|
|
19
|
+
import { sessionState, loadMessagesForSession } from '$frontend/stores/core/sessions.svelte';
|
|
20
|
+
import { setInputText } from '$frontend/stores/ui/chat-input.svelte';
|
|
21
|
+
import { startEdit, shouldDimMessage } from '$frontend/stores/ui/edit-mode.svelte';
|
|
22
22
|
import { debug } from '$shared/utils/logger';
|
|
23
23
|
import MessageBubble from './MessageBubble.svelte';
|
|
24
24
|
import TokenUsageModal from '../modal/TokenUsageModal.svelte';
|
|
25
25
|
import DebugModal from '../modal/DebugModal.svelte';
|
|
26
|
-
import Dialog from '$frontend/
|
|
27
|
-
import ws from '$frontend/
|
|
26
|
+
import Dialog from '$frontend/components/common/overlay/Dialog.svelte';
|
|
27
|
+
import ws from '$frontend/utils/ws';
|
|
28
28
|
|
|
29
29
|
const {
|
|
30
30
|
message,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { sessionState } from '$frontend/
|
|
3
|
-
import { appState } from '$frontend/
|
|
2
|
+
import { sessionState } from '$frontend/stores/core/sessions.svelte';
|
|
3
|
+
import { appState } from '$frontend/stores/core/app.svelte';
|
|
4
4
|
import ChatMessage from './ChatMessage.svelte';
|
|
5
5
|
import DateSeparator from './DateSeparator.svelte';
|
|
6
6
|
import { onMount, tick } from 'svelte';
|
|
7
7
|
import { fade } from 'svelte/transition';
|
|
8
8
|
|
|
9
9
|
// Import utilities
|
|
10
|
-
import { shouldFilterMessage } from '$frontend/
|
|
11
|
-
import { groupMessages, embedToolResults } from '$frontend/
|
|
12
|
-
import { addDateSeparators, type DateSeparatorItem } from '$frontend/
|
|
13
|
-
import { editModeState } from '$frontend/
|
|
14
|
-
import { createVirtualScroll, VS_CONFIG } from '$frontend/
|
|
10
|
+
import { shouldFilterMessage } from '$frontend/utils/chat/message-processor';
|
|
11
|
+
import { groupMessages, embedToolResults } from '$frontend/utils/chat/message-grouper';
|
|
12
|
+
import { addDateSeparators, type DateSeparatorItem } from '$frontend/utils/chat/date-separator';
|
|
13
|
+
import { editModeState } from '$frontend/stores/ui/edit-mode.svelte';
|
|
14
|
+
import { createVirtualScroll, VS_CONFIG } from '$frontend/utils/chat/virtual-scroll.svelte';
|
|
15
15
|
|
|
16
16
|
interface Props {
|
|
17
17
|
scrollContainer?: HTMLElement | undefined;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<script lang="ts">
|
|
12
12
|
import type { SDKMessageFormatter } from '$shared/types/database/schema';
|
|
13
13
|
import type { IconName } from '$shared/types/ui/icons';
|
|
14
|
-
import Card from '$frontend/
|
|
14
|
+
import Card from '$frontend/components/common/display/Card.svelte';
|
|
15
15
|
import MessageFormatter from '../formatters/MessageFormatter.svelte';
|
|
16
16
|
import MessageHeader from './MessageHeader.svelte';
|
|
17
17
|
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
<script lang="ts">
|
|
12
12
|
import type { SDKMessageFormatter } from '$shared/types/database/schema';
|
|
13
13
|
import type { IconName } from '$shared/types/ui/icons';
|
|
14
|
-
import Icon from '$frontend/
|
|
15
|
-
import { appState } from '$frontend/
|
|
14
|
+
import Icon from '$frontend/components/common/display/Icon.svelte';
|
|
15
|
+
import { appState } from '$frontend/stores/core/app.svelte';
|
|
16
16
|
|
|
17
17
|
const {
|
|
18
18
|
message,
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
|
|
10
10
|
<script lang="ts">
|
|
11
11
|
import type { SDKMessageFormatter } from '$shared/types/database/schema';
|
|
12
|
-
import Modal from '$frontend/
|
|
13
|
-
import Icon from '$frontend/
|
|
12
|
+
import Modal from '$frontend/components/common/overlay/Modal.svelte';
|
|
13
|
+
import Icon from '$frontend/components/common/display/Icon.svelte';
|
|
14
14
|
|
|
15
15
|
let {
|
|
16
16
|
isOpen = $bindable(),
|
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
-->
|
|
9
9
|
|
|
10
10
|
<script lang="ts">
|
|
11
|
-
import Modal from '$frontend/
|
|
12
|
-
import Icon from '$frontend/
|
|
11
|
+
import Modal from '$frontend/components/common/overlay/Modal.svelte';
|
|
12
|
+
import Icon from '$frontend/components/common/display/Icon.svelte';
|
|
13
13
|
|
|
14
14
|
let {
|
|
15
15
|
isOpen = $bindable(),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { AskUserQuestionToolInput } from '$shared/types/messaging';
|
|
3
|
-
import Icon from '$frontend/
|
|
4
|
-
import ws from '$frontend/
|
|
5
|
-
import { currentSessionId } from '$frontend/
|
|
6
|
-
import { appState, updateSessionProcessState } from '$frontend/
|
|
3
|
+
import Icon from '$frontend/components/common/display/Icon.svelte';
|
|
4
|
+
import ws from '$frontend/utils/ws';
|
|
5
|
+
import { currentSessionId } from '$frontend/stores/core/sessions.svelte';
|
|
6
|
+
import { appState, updateSessionProcessState } from '$frontend/stores/core/app.svelte';
|
|
7
7
|
import { debug } from '$shared/utils/logger';
|
|
8
8
|
|
|
9
9
|
const { toolInput }: { toolInput: AskUserQuestionToolInput } = $props();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { FileHeader, CodeBlock } from './components';
|
|
3
|
-
import Icon from '$frontend/
|
|
3
|
+
import Icon from '$frontend/components/common/display/Icon.svelte';
|
|
4
4
|
import type { ToolInput } from '$shared/types/messaging';
|
|
5
5
|
|
|
6
6
|
const { toolInput }: { toolInput: ToolInput } = $props();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import type { EditToolInput } from '$shared/types/messaging';
|
|
3
3
|
import { FileHeader, DiffBlock } from './components';
|
|
4
|
-
import Icon from '$frontend/
|
|
4
|
+
import Icon from '$frontend/components/common/display/Icon.svelte';
|
|
5
5
|
|
|
6
6
|
const { toolInput }: { toolInput: EditToolInput } = $props();
|
|
7
7
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import Icon from '$frontend/
|
|
2
|
+
import Icon from '$frontend/components/common/display/Icon.svelte';
|
|
3
3
|
import type { TodoWriteToolInput } from '$shared/types/messaging';
|
|
4
4
|
import type { IconName } from '$shared/types/ui/icons';
|
|
5
5
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import Icon from '$frontend/
|
|
2
|
+
import Icon from '$frontend/components/common/display/Icon.svelte';
|
|
3
3
|
import type { IconName } from '$shared/types/ui/icons';
|
|
4
4
|
import { removeCommonIndentation } from '../../shared/utils';
|
|
5
|
-
import { isTerminalOutput, processAnsiCodes, escapeHtml } from '$frontend/
|
|
5
|
+
import { isTerminalOutput, processAnsiCodes, escapeHtml } from '$frontend/utils/terminal-formatter';
|
|
6
6
|
|
|
7
7
|
interface Props {
|
|
8
8
|
code: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import Icon from '$frontend/
|
|
2
|
+
import Icon from '$frontend/components/common/display/Icon.svelte';
|
|
3
3
|
import type { IconName } from '$shared/types/ui/icons';
|
|
4
|
-
import { getFileIcon } from '$frontend/
|
|
4
|
+
import { getFileIcon } from '$frontend/utils/file-icon-mappings';
|
|
5
5
|
import { formatPath } from '../../shared/utils';
|
|
6
6
|
|
|
7
7
|
interface Props {
|
|
@@ -6,15 +6,106 @@
|
|
|
6
6
|
-->
|
|
7
7
|
|
|
8
8
|
<script lang="ts">
|
|
9
|
-
import { sessionState } from '$frontend/
|
|
10
|
-
import { appState } from '$frontend/
|
|
11
|
-
import Icon from '$frontend/
|
|
12
|
-
import {
|
|
9
|
+
import { sessionState } from '$frontend/stores/core/sessions.svelte';
|
|
10
|
+
import { appState } from '$frontend/stores/core/app.svelte';
|
|
11
|
+
import Icon from '$frontend/components/common/display/Icon.svelte';
|
|
12
|
+
import { fly } from 'svelte/transition';
|
|
13
13
|
import type { TodoWriteToolInput } from '$shared/types/messaging';
|
|
14
14
|
|
|
15
15
|
let isExpanded = $state(true);
|
|
16
16
|
let isMinimized = $state(false);
|
|
17
17
|
|
|
18
|
+
// Drag & snap state
|
|
19
|
+
let posY = $state(80);
|
|
20
|
+
let posX = $state(0);
|
|
21
|
+
let snapSide = $state<'left' | 'right'>('right');
|
|
22
|
+
let isDragging = $state(false);
|
|
23
|
+
|
|
24
|
+
// Minimized button ref for measuring width at snap time
|
|
25
|
+
let minimizedBtn = $state<HTMLButtonElement | null>(null);
|
|
26
|
+
|
|
27
|
+
// Non-reactive drag tracking
|
|
28
|
+
let _sx = 0, _sy = 0, _mx = 0, _my = 0, _hasDragged = false;
|
|
29
|
+
|
|
30
|
+
function getPanelWidth() {
|
|
31
|
+
return isExpanded ? 330 : 230;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// Always use `left` property so CSS can transition in both directions
|
|
35
|
+
const panelDisplayLeft = $derived(
|
|
36
|
+
isDragging ? posX : snapSide === 'right' ? window.innerWidth - getPanelWidth() - 16 : 16
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
const minimizedDisplayLeft = $derived(
|
|
40
|
+
isDragging
|
|
41
|
+
? posX
|
|
42
|
+
: snapSide === 'right'
|
|
43
|
+
? window.innerWidth - (minimizedBtn?.offsetWidth ?? 90) - 16
|
|
44
|
+
: 16
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
// --- Main panel drag (from header) ---
|
|
48
|
+
function startDrag(e: PointerEvent) {
|
|
49
|
+
if ((e.target as HTMLElement).closest('button')) return;
|
|
50
|
+
isDragging = true;
|
|
51
|
+
// Use actual rendered position for accuracy
|
|
52
|
+
const panel = (e.currentTarget as HTMLElement).parentElement!;
|
|
53
|
+
const rect = panel.getBoundingClientRect();
|
|
54
|
+
_sx = rect.left;
|
|
55
|
+
_sy = rect.top;
|
|
56
|
+
_mx = e.clientX;
|
|
57
|
+
_my = e.clientY;
|
|
58
|
+
posX = _sx;
|
|
59
|
+
posY = _sy;
|
|
60
|
+
(e.currentTarget as HTMLElement).setPointerCapture(e.pointerId);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function onDrag(e: PointerEvent) {
|
|
64
|
+
if (!isDragging) return;
|
|
65
|
+
posX = _sx + e.clientX - _mx;
|
|
66
|
+
posY = Math.max(0, Math.min(window.innerHeight - 56, _sy + e.clientY - _my));
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
function endDrag(e: PointerEvent) {
|
|
70
|
+
if (!isDragging) return;
|
|
71
|
+
isDragging = false;
|
|
72
|
+
snapSide = posX + getPanelWidth() / 2 < window.innerWidth / 2 ? 'left' : 'right';
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// --- Minimized button drag (click = restore, drag = move) ---
|
|
76
|
+
function startMinimizedDrag(e: PointerEvent) {
|
|
77
|
+
isDragging = true;
|
|
78
|
+
_hasDragged = false;
|
|
79
|
+
const rect = (e.currentTarget as HTMLElement).getBoundingClientRect();
|
|
80
|
+
_sx = rect.left;
|
|
81
|
+
_sy = rect.top;
|
|
82
|
+
_mx = e.clientX;
|
|
83
|
+
_my = e.clientY;
|
|
84
|
+
posX = _sx;
|
|
85
|
+
posY = _sy;
|
|
86
|
+
(e.currentTarget as HTMLElement).setPointerCapture(e.pointerId);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
function onMinimizedDrag(e: PointerEvent) {
|
|
90
|
+
if (!isDragging) return;
|
|
91
|
+
const dx = e.clientX - _mx;
|
|
92
|
+
const dy = e.clientY - _my;
|
|
93
|
+
if (Math.abs(dx) > 5 || Math.abs(dy) > 5) _hasDragged = true;
|
|
94
|
+
posX = _sx + dx;
|
|
95
|
+
posY = Math.max(0, Math.min(window.innerHeight - 56, _sy + dy));
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
function endMinimizedDrag(e: PointerEvent) {
|
|
99
|
+
if (!isDragging) return;
|
|
100
|
+
isDragging = false;
|
|
101
|
+
if (!_hasDragged) {
|
|
102
|
+
restore();
|
|
103
|
+
return;
|
|
104
|
+
}
|
|
105
|
+
const el = e.currentTarget as HTMLElement;
|
|
106
|
+
snapSide = posX + el.offsetWidth / 2 < window.innerWidth / 2 ? 'left' : 'right';
|
|
107
|
+
}
|
|
108
|
+
|
|
18
109
|
// Extract the latest TodoWrite data from messages
|
|
19
110
|
const latestTodos = $derived.by(() => {
|
|
20
111
|
if (!sessionState.currentSession || sessionState.messages.length === 0) {
|
|
@@ -104,11 +195,22 @@
|
|
|
104
195
|
|
|
105
196
|
{#if shouldShow && !appState.isRestoring}
|
|
106
197
|
{#if isMinimized}
|
|
107
|
-
<!-- Minimized state - small floating button -->
|
|
198
|
+
<!-- Minimized state - small floating button, draggable -->
|
|
108
199
|
<button
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
200
|
+
bind:this={minimizedBtn}
|
|
201
|
+
onpointerdown={startMinimizedDrag}
|
|
202
|
+
onpointermove={onMinimizedDrag}
|
|
203
|
+
onpointerup={endMinimizedDrag}
|
|
204
|
+
onpointercancel={endMinimizedDrag}
|
|
205
|
+
class="fixed z-30 bg-violet-600 hover:bg-violet-700 dark:bg-violet-500 dark:hover:bg-violet-600 text-white rounded-full p-3 shadow-lg flex items-center gap-2"
|
|
206
|
+
style="
|
|
207
|
+
top: {posY}px;
|
|
208
|
+
left: {minimizedDisplayLeft}px;
|
|
209
|
+
touch-action: none;
|
|
210
|
+
cursor: {isDragging ? 'grabbing' : 'grab'};
|
|
211
|
+
transition: {isDragging ? 'none' : 'left 0.25s ease, top 0.15s ease'};
|
|
212
|
+
"
|
|
213
|
+
transition:fly={{ x: snapSide === 'right' ? 100 : -100, duration: 200 }}
|
|
112
214
|
>
|
|
113
215
|
<Icon name="lucide:list-todo" class="w-5 h-5" />
|
|
114
216
|
<span class="text-sm font-medium">{progress.completed}/{progress.total}</span>
|
|
@@ -116,13 +218,25 @@
|
|
|
116
218
|
{:else}
|
|
117
219
|
<!-- Floating panel -->
|
|
118
220
|
<div
|
|
119
|
-
class="fixed
|
|
120
|
-
style="
|
|
121
|
-
|
|
221
|
+
class="fixed z-30 bg-white dark:bg-slate-900 rounded-xl shadow-lg border border-slate-200 dark:border-slate-700 overflow-hidden"
|
|
222
|
+
style="
|
|
223
|
+
top: {posY}px;
|
|
224
|
+
left: {panelDisplayLeft}px;
|
|
225
|
+
width: {isExpanded ? '330px' : '230px'};
|
|
226
|
+
max-height: {isExpanded ? '600px' : '56px'};
|
|
227
|
+
transition: {isDragging ? 'none' : 'left 0.25s ease, top 0.15s ease, width 0.3s, max-height 0.3s'};
|
|
228
|
+
"
|
|
229
|
+
transition:fly={{ x: snapSide === 'right' ? 100 : -100, duration: 300 }}
|
|
122
230
|
>
|
|
123
|
-
<!-- Header -->
|
|
231
|
+
<!-- Header (drag handle) -->
|
|
124
232
|
<div
|
|
125
233
|
class="flex items-center justify-between px-4 py-3 bg-gradient-to-r from-violet-50 to-violet-50 dark:from-slate-800 dark:to-slate-800 border-b border-slate-200 dark:border-slate-700"
|
|
234
|
+
style="touch-action: none; cursor: {isDragging ? 'grabbing' : 'grab'};"
|
|
235
|
+
onpointerdown={startDrag}
|
|
236
|
+
onpointermove={onDrag}
|
|
237
|
+
onpointerup={endDrag}
|
|
238
|
+
onpointercancel={endDrag}
|
|
239
|
+
role="none"
|
|
126
240
|
>
|
|
127
241
|
<div class="flex items-center gap-3">
|
|
128
242
|
<Icon name="lucide:list-todo" class="w-5 h-5 text-violet-600 dark:text-violet-400" />
|
|
@@ -246,4 +360,4 @@
|
|
|
246
360
|
:global(.dark) div::-webkit-scrollbar-thumb:hover {
|
|
247
361
|
background: rgb(71 85 105);
|
|
248
362
|
}
|
|
249
|
-
</style>
|
|
363
|
+
</style>
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { sessionState } from '$frontend/
|
|
3
|
-
import { addNotification } from '$frontend/
|
|
4
|
-
import { manageConversationContext } from '$frontend/
|
|
5
|
-
import Icon from '$frontend/
|
|
2
|
+
import { sessionState } from '$frontend/stores/core/sessions.svelte';
|
|
3
|
+
import { addNotification } from '$frontend/stores/ui/notification.svelte';
|
|
4
|
+
import { manageConversationContext } from '$frontend/utils/context-manager';
|
|
5
|
+
import Icon from '$frontend/components/common/display/Icon.svelte';
|
|
6
6
|
|
|
7
7
|
const tokenUsage = $derived.by(() => {
|
|
8
8
|
const context = manageConversationContext(sessionState.messages);
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import Modal from '$frontend/
|
|
3
|
-
import Dialog from '$frontend/
|
|
4
|
-
import Icon from '$frontend/
|
|
5
|
-
import DiffBlock from '$frontend/
|
|
2
|
+
import Modal from '$frontend/components/common/overlay/Modal.svelte';
|
|
3
|
+
import Dialog from '$frontend/components/common/overlay/Dialog.svelte';
|
|
4
|
+
import Icon from '$frontend/components/common/display/Icon.svelte';
|
|
5
|
+
import DiffBlock from '$frontend/components/chat/tools/components/DiffBlock.svelte';
|
|
6
6
|
import TimelineGraph from './timeline/TimelineGraph.svelte';
|
|
7
|
-
import { sessionState, loadMessagesForSession } from '$frontend/
|
|
8
|
-
import { appState } from '$frontend/
|
|
9
|
-
import { addNotification } from '$frontend/
|
|
7
|
+
import { sessionState, loadMessagesForSession } from '$frontend/stores/core/sessions.svelte';
|
|
8
|
+
import { appState } from '$frontend/stores/core/app.svelte';
|
|
9
|
+
import { addNotification } from '$frontend/stores/ui/notification.svelte';
|
|
10
10
|
import { debug } from '$shared/utils/logger';
|
|
11
11
|
import { buildGraph } from './timeline/graph-builder';
|
|
12
12
|
import { startAnimation } from './timeline/animation';
|
|
13
|
-
import { snapshotService } from '$frontend/
|
|
14
|
-
import type { RestoreConflict, ConflictResolution } from '$frontend/
|
|
13
|
+
import { snapshotService } from '$frontend/services/snapshot/snapshot.service';
|
|
14
|
+
import type { RestoreConflict, ConflictResolution } from '$frontend/services/snapshot/snapshot.service';
|
|
15
15
|
import type { TimelineResponse, GraphNode, GraphEdge, VersionGroup, AnimationState } from './timeline/types';
|
|
16
|
-
import ws from '$frontend/
|
|
16
|
+
import ws from '$frontend/utils/ws';
|
|
17
17
|
|
|
18
18
|
let {
|
|
19
19
|
isOpen = $bindable(false),
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { formatTime } from './utils';
|
|
4
4
|
import type { GraphNode, AnimationState } from './types';
|
|
5
5
|
import { getInterpolatedPosition, getInterpolatedNodeClass } from './animation';
|
|
6
|
-
import Icon from '$frontend/
|
|
6
|
+
import Icon from '$frontend/components/common/display/Icon.svelte';
|
|
7
7
|
|
|
8
8
|
const {
|
|
9
9
|
node,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
// Import organized icon registries
|
|
3
|
-
import { lucideIconRegistry } from '
|
|
4
|
-
import { materialIconRegistry } from '
|
|
3
|
+
import { lucideIconRegistry } from '../lucide-icons';
|
|
4
|
+
import { materialIconRegistry } from '../material-icons';
|
|
5
5
|
import lucideData from '@iconify-json/lucide/icons.json';
|
|
6
6
|
import materialData from '@iconify-json/material-icon-theme/icons.json';
|
|
7
7
|
import type { IconName } from '$shared/types/ui/icons';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
<script lang="ts">
|
|
8
8
|
import Icon from './Icon.svelte';
|
|
9
|
-
import { themeStore, setTheme as setStoreTheme, themes } from '$frontend/
|
|
9
|
+
import { themeStore, setTheme as setStoreTheme, themes } from '$frontend/stores/ui/theme.svelte';
|
|
10
10
|
|
|
11
11
|
let isOpen = $state(false);
|
|
12
12
|
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { onMount } from 'svelte';
|
|
3
3
|
import loader from '@monaco-editor/loader';
|
|
4
4
|
import type { editor } from 'monaco-editor';
|
|
5
|
-
import { themeStore } from '$frontend/
|
|
6
|
-
import { settings } from '$frontend/
|
|
5
|
+
import { themeStore } from '$frontend/stores/ui/theme.svelte';
|
|
6
|
+
import { settings } from '$frontend/stores/features/settings.svelte';
|
|
7
7
|
import { debug } from '$shared/utils/logger';
|
|
8
8
|
|
|
9
9
|
interface Props {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { fade, scale } from 'svelte/transition';
|
|
3
3
|
import { cubicOut } from 'svelte/easing';
|
|
4
|
-
import Icon from '
|
|
4
|
+
import Icon from '../display/Icon.svelte';
|
|
5
5
|
import type { IconName } from '$shared/types/ui/icons';
|
|
6
6
|
|
|
7
7
|
interface Props {
|
package/frontend/{lib/components/common → components/common/feedback}/ConnectionBanner.svelte
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { connectionState } from '$frontend/
|
|
3
|
-
import Icon from '$frontend/
|
|
4
|
-
import ws from '$frontend/
|
|
2
|
+
import { connectionState } from '$frontend/stores/ui/connection.svelte';
|
|
3
|
+
import Icon from '$frontend/components/common/display/Icon.svelte';
|
|
4
|
+
import ws from '$frontend/utils/ws';
|
|
5
5
|
import { slide } from 'svelte/transition';
|
|
6
6
|
|
|
7
7
|
const showBanner = $derived(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { fade } from 'svelte/transition';
|
|
3
3
|
import { cubicOut } from 'svelte/easing';
|
|
4
|
-
import Icon from '
|
|
4
|
+
import Icon from '../display/Icon.svelte';
|
|
5
5
|
|
|
6
6
|
let { isVisible = $bindable(), progress = 0, loadingText = 'Initializing workspace...' } = $props();
|
|
7
7
|
</script>
|
package/frontend/{lib/components/common → components/common/feedback}/NotificationToast.svelte
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { onMount } from 'svelte';
|
|
3
|
-
import { removeNotification } from '$frontend/
|
|
3
|
+
import { removeNotification } from '$frontend/stores/ui/notification.svelte';
|
|
4
4
|
import type { ToastNotification } from '$shared/types/ui/notifications';
|
|
5
|
-
import Icon from '$frontend/
|
|
5
|
+
import Icon from '$frontend/components/common/display/Icon.svelte';
|
|
6
6
|
import type { IconName } from '$shared/types/ui/icons';
|
|
7
7
|
|
|
8
8
|
const { notification }: { notification: ToastNotification } = $props();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { updateState, runUpdate, dismissUpdate, checkForUpdate } from '$frontend/
|
|
3
|
-
import { systemSettings, updateSystemSettings } from '$frontend/
|
|
4
|
-
import Icon from '$frontend/
|
|
2
|
+
import { updateState, runUpdate, dismissUpdate, checkForUpdate } from '$frontend/stores/ui/update.svelte';
|
|
3
|
+
import { systemSettings, updateSystemSettings } from '$frontend/stores/features/settings.svelte';
|
|
4
|
+
import Icon from '$frontend/components/common/display/Icon.svelte';
|
|
5
5
|
import { slide } from 'svelte/transition';
|
|
6
6
|
|
|
7
7
|
const showBanner = $derived(
|
|
@@ -49,12 +49,12 @@
|
|
|
49
49
|
<span>Updated to v{updateState.latestVersion} — restart clopen to apply</span>
|
|
50
50
|
{:else if updateState.error}
|
|
51
51
|
<Icon name="lucide:package-x" class="w-4 h-4" />
|
|
52
|
-
<span>Update failed</span>
|
|
52
|
+
<span>{updateState.errorType === 'check' ? 'Unable to check for updates' : 'Update failed'}</span>
|
|
53
53
|
<button
|
|
54
54
|
onclick={handleRetry}
|
|
55
55
|
class="ml-1 px-2 py-0.5 text-xs font-semibold rounded bg-white/20 hover:bg-white/30 transition-colors"
|
|
56
56
|
>
|
|
57
|
-
Retry
|
|
57
|
+
{updateState.errorType === 'check' ? 'Check again' : 'Retry'}
|
|
58
58
|
</button>
|
|
59
59
|
<button
|
|
60
60
|
onclick={handleDismiss}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
// import { onMount } from 'svelte';
|
|
3
|
-
import Button from '
|
|
4
|
-
import Icon from '$frontend/
|
|
5
|
-
import Modal from '
|
|
6
|
-
import Dialog from '
|
|
3
|
+
import Button from '../display/Button.svelte';
|
|
4
|
+
import Icon from '$frontend/components/common/display/Icon.svelte';
|
|
5
|
+
import Modal from '../overlay/Modal.svelte';
|
|
6
|
+
import Dialog from '../overlay/Dialog.svelte';
|
|
7
7
|
import { debug } from '$shared/utils/logger';
|
|
8
|
-
import ws from '$frontend/
|
|
9
|
-
import { systemSettings } from '$frontend/
|
|
8
|
+
import ws from '$frontend/utils/ws';
|
|
9
|
+
import { systemSettings } from '$frontend/stores/features/settings.svelte';
|
|
10
10
|
|
|
11
11
|
interface FileItem {
|
|
12
12
|
name: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { DEFAULT_MODEL } from '$shared/constants/engines';
|
|
3
3
|
import type { EngineModel } from '$shared/types/engine';
|
|
4
|
-
import { settings } from '$frontend/
|
|
5
|
-
import { modelStore } from '$frontend/
|
|
6
|
-
import Icon from '$frontend/
|
|
4
|
+
import { settings } from '$frontend/stores/features/settings.svelte';
|
|
5
|
+
import { modelStore } from '$frontend/stores/features/models.svelte';
|
|
6
|
+
import Icon from '$frontend/components/common/display/Icon.svelte';
|
|
7
7
|
|
|
8
8
|
let {
|
|
9
9
|
value = $bindable(DEFAULT_MODEL),
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { onMount } from 'svelte';
|
|
3
3
|
import { fade, scale } from 'svelte/transition';
|
|
4
4
|
import { cubicOut } from 'svelte/easing';
|
|
5
|
-
import Icon from '
|
|
5
|
+
import Icon from '../display/Icon.svelte';
|
|
6
6
|
import type { IconName } from '$shared/types/ui/icons';
|
|
7
7
|
|
|
8
8
|
interface Props {
|