@qwen-code/web-shell 0.24.1-preview.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 +651 -0
- package/dist/daemon-react-sdk.js +53 -0
- package/dist/index.js +109094 -0
- package/dist/sw.js +9 -0
- package/dist/toolNames-DgCpmhML.js +17992 -0
- package/dist/transcript.js +31609 -0
- package/dist/types/App.d.ts +419 -0
- package/dist/types/WebShellContexts.d.ts +31 -0
- package/dist/types/adapters/localizedMessages.d.ts +24 -0
- package/dist/types/adapters/messageTypes.d.ts +194 -0
- package/dist/types/adapters/parallelAgentGrouping.d.ts +18 -0
- package/dist/types/adapters/promptTypes.d.ts +12 -0
- package/dist/types/adapters/toolClassification.d.ts +10 -0
- package/dist/types/adapters/transcriptAdapter.d.ts +3 -0
- package/dist/types/adapters/transcriptToMessages.d.ts +41 -0
- package/dist/types/adapters/types.d.ts +123 -0
- package/dist/types/brandContext.d.ts +44 -0
- package/dist/types/browser-turn-notifications.d.ts +36 -0
- package/dist/types/completions/slashCompletion.d.ts +35 -0
- package/dist/types/components/AtMentionPanel.d.ts +13 -0
- package/dist/types/components/BranchPickerPopover.d.ts +73 -0
- package/dist/types/components/ChatContextHeader.d.ts +18 -0
- package/dist/types/components/ChatEditor.d.ts +134 -0
- package/dist/types/components/ChatPane.d.ts +93 -0
- package/dist/types/components/ContextCompressionFeedback.d.ts +5 -0
- package/dist/types/components/ContextUsagePopover.d.ts +10 -0
- package/dist/types/components/ErrorBoundary.d.ts +40 -0
- package/dist/types/components/FileAttachmentContent.d.ts +4 -0
- package/dist/types/components/FileTypeIcon.d.ts +6 -0
- package/dist/types/components/GitBranchIndicator.d.ts +66 -0
- package/dist/types/components/GitModePopover.d.ts +23 -0
- package/dist/types/components/GlobalTurnNavigation.d.ts +16 -0
- package/dist/types/components/GoalStatusStrip.d.ts +13 -0
- package/dist/types/components/InsightProgress.d.ts +12 -0
- package/dist/types/components/InsightReady.d.ts +6 -0
- package/dist/types/components/LocalControlQrButton.d.ts +12 -0
- package/dist/types/components/LocalFilesControl.d.ts +74 -0
- package/dist/types/components/MessageItem.d.ts +43 -0
- package/dist/types/components/MessageList.d.ts +222 -0
- package/dist/types/components/MessageTimestamp.d.ts +32 -0
- package/dist/types/components/ModeIcon.d.ts +3 -0
- package/dist/types/components/MonitorIcon.d.ts +2 -0
- package/dist/types/components/PaneHeaderActions.d.ts +23 -0
- package/dist/types/components/PromptChevron.d.ts +7 -0
- package/dist/types/components/QueuedPromptDisplay.d.ts +57 -0
- package/dist/types/components/RootErrorFallback.d.ts +21 -0
- package/dist/types/components/SessionOverviewPanel.d.ts +46 -0
- package/dist/types/components/SessionPrBadge.d.ts +24 -0
- package/dist/types/components/SessionPrStateIcon.d.ts +32 -0
- package/dist/types/components/SessionRecoveryBanner.d.ts +3 -0
- package/dist/types/components/ShadowDomBoundary.d.ts +11 -0
- package/dist/types/components/SplitView.d.ts +69 -0
- package/dist/types/components/StandaloneAuth.d.ts +17 -0
- package/dist/types/components/StatusBar.d.ts +26 -0
- package/dist/types/components/StreamingStatus.d.ts +20 -0
- package/dist/types/components/Tips.d.ts +1 -0
- package/dist/types/components/ToastHost.d.ts +25 -0
- package/dist/types/components/TranscriptViewport.d.ts +17 -0
- package/dist/types/components/WebShellTranscript.d.ts +38 -0
- package/dist/types/components/WelcomeHeader.d.ts +8 -0
- package/dist/types/components/WorkspaceIndicator.d.ts +27 -0
- package/dist/types/components/WorkspaceSelector.d.ts +29 -0
- package/dist/types/components/WorkspaceSessionProvider.d.ts +19 -0
- package/dist/types/components/WorkspaceUnavailableState.d.ts +11 -0
- package/dist/types/components/agents/AgentCreatePage.d.ts +9 -0
- package/dist/types/components/agents/AgentsManagerPage.d.ts +8 -0
- package/dist/types/components/agents/agent-tool-options.d.ts +9 -0
- package/dist/types/components/agents/agents-manager-logic.d.ts +8 -0
- package/dist/types/components/artifacts/AgentWorkflow.d.ts +7 -0
- package/dist/types/components/artifacts/ArtifactIcon.d.ts +9 -0
- package/dist/types/components/artifacts/ArtifactPanel.d.ts +229 -0
- package/dist/types/components/artifacts/CodeReviewArtifactDetail.d.ts +63 -0
- package/dist/types/components/artifacts/ContextUsagePanel.d.ts +7 -0
- package/dist/types/components/artifacts/LineStats.d.ts +12 -0
- package/dist/types/components/artifacts/SideTaskPanel.d.ts +24 -0
- package/dist/types/components/artifacts/SubagentDetail.d.ts +14 -0
- package/dist/types/components/artifacts/TokenUsagePanel.d.ts +7 -0
- package/dist/types/components/artifacts/TurnOutputs.d.ts +121 -0
- package/dist/types/components/artifacts/artifactUtils.d.ts +37 -0
- package/dist/types/components/artifacts/turnOutputSelectors.d.ts +7 -0
- package/dist/types/components/artifacts/useArtifactWorkspaceTarget.d.ts +16 -0
- package/dist/types/components/channels/ChannelEditorDialog.d.ts +25 -0
- package/dist/types/components/channels/ChannelPairingRequests.d.ts +15 -0
- package/dist/types/components/channels/ChannelsManagerPage.d.ts +12 -0
- package/dist/types/components/channels/channel-editor-state.d.ts +25 -0
- package/dist/types/components/channels/channel-platform.d.ts +9 -0
- package/dist/types/components/composer/AddMenu.d.ts +20 -0
- package/dist/types/components/composer/prependSkillInvocation.d.ts +12 -0
- package/dist/types/components/dialogs/AddWorkspaceDialog.d.ts +24 -0
- package/dist/types/components/dialogs/ApprovalModeDialog.d.ts +7 -0
- package/dist/types/components/dialogs/DaemonStatusDialog.d.ts +3 -0
- package/dist/types/components/dialogs/DeleteSessionDialog.d.ts +8 -0
- package/dist/types/components/dialogs/DialogShell.d.ts +15 -0
- package/dist/types/components/dialogs/GitDialog.d.ts +14 -0
- package/dist/types/components/dialogs/GitDiffDialog.d.ts +14 -0
- package/dist/types/components/dialogs/GitHubPrsDialog.d.ts +9 -0
- package/dist/types/components/dialogs/GitLogDialog.d.ts +14 -0
- package/dist/types/components/dialogs/GoalEditDialog.d.ts +9 -0
- package/dist/types/components/dialogs/GoalsDialog.d.ts +16 -0
- package/dist/types/components/dialogs/HelpDialog.d.ts +6 -0
- package/dist/types/components/dialogs/ModelDialog.d.ts +28 -0
- package/dist/types/components/dialogs/ModelFallbacksDialog.d.ts +14 -0
- package/dist/types/components/dialogs/ReleaseSessionDialog.d.ts +8 -0
- package/dist/types/components/dialogs/ResumeDialog.d.ts +7 -0
- package/dist/types/components/dialogs/RewindDialog.d.ts +12 -0
- package/dist/types/components/dialogs/ScheduledTasksDialog.d.ts +30 -0
- package/dist/types/components/dialogs/SessionRow.d.ts +46 -0
- package/dist/types/components/dialogs/SvgLineChart.d.ts +35 -0
- package/dist/types/components/dialogs/ThemeDialog.d.ts +8 -0
- package/dist/types/components/dialogs/TokenHeatmap.d.ts +18 -0
- package/dist/types/components/dialogs/ToolsDialog.d.ts +1 -0
- package/dist/types/components/dialogs/UsageDashboardTab.d.ts +13 -0
- package/dist/types/components/dialogs/dialogStyles.d.ts +2 -0
- package/dist/types/components/dialogs/scheduledTasksSchedule.d.ts +62 -0
- package/dist/types/components/extensions/ExtensionsManagerPage.d.ts +9 -0
- package/dist/types/components/extensions/extensions-manager-logic.d.ts +3 -0
- package/dist/types/components/local-control-api.d.ts +30 -0
- package/dist/types/components/mcp/McpManagerPage.d.ts +12 -0
- package/dist/types/components/messages/AskUserQuestion.d.ts +18 -0
- package/dist/types/components/messages/AssistantMessage.d.ts +40 -0
- package/dist/types/components/messages/AuthMessage.d.ts +6 -0
- package/dist/types/components/messages/BtwMessage.d.ts +7 -0
- package/dist/types/components/messages/ContextUsageMessage.d.ts +9 -0
- package/dist/types/components/messages/EnhancedMarkdownTable.d.ts +31 -0
- package/dist/types/components/messages/FootnoteCard.d.ts +11 -0
- package/dist/types/components/messages/FootnotePreviewContent.d.ts +9 -0
- package/dist/types/components/messages/GoalApprovalContent.d.ts +5 -0
- package/dist/types/components/messages/GoalStatusMessage.d.ts +15 -0
- package/dist/types/components/messages/LinkifiedText.d.ts +8 -0
- package/dist/types/components/messages/LocalControlSettingsCard.d.ts +1 -0
- package/dist/types/components/messages/Markdown.d.ts +38 -0
- package/dist/types/components/messages/MarkdownChartRenderer.d.ts +65 -0
- package/dist/types/components/messages/McpApp.d.ts +21 -0
- package/dist/types/components/messages/McpStatusMessage.d.ts +22 -0
- package/dist/types/components/messages/MemoryMessage.d.ts +9 -0
- package/dist/types/components/messages/ModelManagementSection.d.ts +23 -0
- package/dist/types/components/messages/PlanExecutionView.d.ts +91 -0
- package/dist/types/components/messages/PlanMessage.d.ts +8 -0
- package/dist/types/components/messages/QuestionAnswerMessage.d.ts +7 -0
- package/dist/types/components/messages/SettingsMessage.d.ts +46 -0
- package/dist/types/components/messages/StatsMessage.d.ts +14 -0
- package/dist/types/components/messages/StatusMessage.d.ts +18 -0
- package/dist/types/components/messages/SystemMessage.d.ts +29 -0
- package/dist/types/components/messages/TasksStatusMessage.d.ts +38 -0
- package/dist/types/components/messages/TodoView.d.ts +17 -0
- package/dist/types/components/messages/ToolApproval.d.ts +28 -0
- package/dist/types/components/messages/ToolFilePreviewButton.d.ts +7 -0
- package/dist/types/components/messages/ToolGroup.d.ts +50 -0
- package/dist/types/components/messages/UserMessage.d.ts +46 -0
- package/dist/types/components/messages/UserShellMessage.d.ts +6 -0
- package/dist/types/components/messages/WorkflowExecutionView.d.ts +48 -0
- package/dist/types/components/messages/agentForest.d.ts +96 -0
- package/dist/types/components/messages/codeHighlighter.d.ts +25 -0
- package/dist/types/components/messages/rehype-footnote-cards.d.ts +22 -0
- package/dist/types/components/messages/toolFormatting.d.ts +63 -0
- package/dist/types/components/messages/tools/DiffView.d.ts +5 -0
- package/dist/types/components/messages/tools/ParallelAgentsGroup.d.ts +12 -0
- package/dist/types/components/messages/tools/SubAgentPanel.d.ts +10 -0
- package/dist/types/components/messages/tools/toolDisplay.d.ts +7 -0
- package/dist/types/components/panels/EnvironmentPanel.d.ts +45 -0
- package/dist/types/components/panels/SourcesSection.d.ts +25 -0
- package/dist/types/components/panels/TodoPanel.d.ts +11 -0
- package/dist/types/components/plugins/PluginManagerPage.d.ts +8 -0
- package/dist/types/components/plugins/manager-page.d.ts +4 -0
- package/dist/types/components/preview/SavedWebPreview.d.ts +5 -0
- package/dist/types/components/preview/WebPreviewPanel.d.ts +5 -0
- package/dist/types/components/preview/web-preview.d.ts +7 -0
- package/dist/types/components/sidebar/SessionDetailsTooltip.d.ts +17 -0
- package/dist/types/components/sidebar/SessionGroupSection.d.ts +19 -0
- package/dist/types/components/sidebar/StandaloneRecents.d.ts +33 -0
- package/dist/types/components/sidebar/WebShellSidebar.d.ts +139 -0
- package/dist/types/components/sidebar/WorkspaceDetailsTooltip.d.ts +49 -0
- package/dist/types/components/sidebar/WorkspaceMenu.d.ts +41 -0
- package/dist/types/components/sidebar/WorkspaceRenameDialog.d.ts +18 -0
- package/dist/types/components/sidebar/WorkspaceSection.d.ts +112 -0
- package/dist/types/components/sidebar/channelSessionGroups.d.ts +7 -0
- package/dist/types/components/sidebar/collapsedSessionSections.d.ts +25 -0
- package/dist/types/components/sidebar/scheduled-task-session-groups.d.ts +12 -0
- package/dist/types/components/sidebar/sessionDetailsCollisionBoundary.d.ts +1 -0
- package/dist/types/components/sidebar/sessionSearch.d.ts +28 -0
- package/dist/types/components/sidebar/sessionTitleScroll.d.ts +7 -0
- package/dist/types/components/sidebar/sidebarToggleShortcut.d.ts +18 -0
- package/dist/types/components/sidebar/useSessionContentSearch.d.ts +20 -0
- package/dist/types/components/sidebar/useWorkspaceOverview.d.ts +40 -0
- package/dist/types/components/sidebar/workspaceExpansion.d.ts +4 -0
- package/dist/types/components/sidebar/workspaceOverviewModel.d.ts +123 -0
- package/dist/types/components/skills/SkillInstallDialog.d.ts +8 -0
- package/dist/types/components/skills/SkillsManagerPage.d.ts +11 -0
- package/dist/types/components/skills/skills-manager-logic.d.ts +6 -0
- package/dist/types/components/sources/SourceList.d.ts +5 -0
- package/dist/types/components/sources/TurnSources.d.ts +5 -0
- package/dist/types/components/sources/sourceEntries.d.ts +8 -0
- package/dist/types/components/summaryRunId.d.ts +9 -0
- package/dist/types/components/terminal/TerminalPanel.d.ts +17 -0
- package/dist/types/components/toolbarDropdown.d.ts +39 -0
- package/dist/types/components/ui/alert-dialog.d.ts +19 -0
- package/dist/types/components/ui/alert.d.ts +10 -0
- package/dist/types/components/ui/badge.d.ts +9 -0
- package/dist/types/components/ui/breadcrumb.d.ts +11 -0
- package/dist/types/components/ui/button.d.ts +11 -0
- package/dist/types/components/ui/card.d.ts +11 -0
- package/dist/types/components/ui/checkbox.d.ts +4 -0
- package/dist/types/components/ui/data-table.d.ts +31 -0
- package/dist/types/components/ui/dialog.d.ts +19 -0
- package/dist/types/components/ui/drawer.d.ts +16 -0
- package/dist/types/components/ui/dropdown-menu.d.ts +29 -0
- package/dist/types/components/ui/empty.d.ts +11 -0
- package/dist/types/components/ui/field.d.ts +24 -0
- package/dist/types/components/ui/input.d.ts +3 -0
- package/dist/types/components/ui/label.d.ts +4 -0
- package/dist/types/components/ui/management-notice.d.ts +12 -0
- package/dist/types/components/ui/popover.d.ts +13 -0
- package/dist/types/components/ui/radio-group.d.ts +5 -0
- package/dist/types/components/ui/scroll-area.d.ts +5 -0
- package/dist/types/components/ui/select.d.ts +16 -0
- package/dist/types/components/ui/separator.d.ts +4 -0
- package/dist/types/components/ui/skeleton.d.ts +2 -0
- package/dist/types/components/ui/spinner.d.ts +2 -0
- package/dist/types/components/ui/switch.d.ts +6 -0
- package/dist/types/components/ui/table.d.ts +10 -0
- package/dist/types/components/ui/tabs.d.ts +13 -0
- package/dist/types/components/ui/textarea.d.ts +3 -0
- package/dist/types/components/ui/toggle-group.d.ts +10 -0
- package/dist/types/components/ui/toggle.d.ts +9 -0
- package/dist/types/components/ui/tooltip.d.ts +7 -0
- package/dist/types/components/workflow/SessionWorkflowCockpit.d.ts +17 -0
- package/dist/types/components/workflow/SessionWorkflowInspector.d.ts +15 -0
- package/dist/types/components/workflow/session-workflow-model.d.ts +32 -0
- package/dist/types/components/workflows/WorkflowRunsPage.d.ts +6 -0
- package/dist/types/components/workspaces/WorkspaceRemovalDialog.d.ts +20 -0
- package/dist/types/components/workspaces/WorkspacesOverviewPanel.d.ts +21 -0
- package/dist/types/components/workspaces/useWorkspaceRemoval.d.ts +47 -0
- package/dist/types/config/daemon.d.ts +41 -0
- package/dist/types/config/standalone.d.ts +1 -0
- package/dist/types/constants/loadingPhrases.d.ts +4 -0
- package/dist/types/constants/localCommands.d.ts +27 -0
- package/dist/types/constants/sessions.d.ts +43 -0
- package/dist/types/constants/toolNames.d.ts +9 -0
- package/dist/types/customization.d.ts +508 -0
- package/dist/types/daemon/followupSidechannel.d.ts +11 -0
- package/dist/types/daemon/index.d.ts +14 -0
- package/dist/types/daemon/midTurnInjectedSidechannel.d.ts +37 -0
- package/dist/types/daemon/pendingPromptVersion.d.ts +19 -0
- package/dist/types/daemon/session/DaemonSessionProvider.d.ts +45 -0
- package/dist/types/daemon/session/actions.d.ts +100 -0
- package/dist/types/daemon/session/clientLifecycle.d.ts +21 -0
- package/dist/types/daemon/session/httpErrors.d.ts +9 -0
- package/dist/types/daemon/session/index.d.ts +15 -0
- package/dist/types/daemon/session/live-journal-repair.d.ts +19 -0
- package/dist/types/daemon/session/mappers.d.ts +71 -0
- package/dist/types/daemon/session/promptContent.d.ts +11 -0
- package/dist/types/daemon/session/selectors.d.ts +21 -0
- package/dist/types/daemon/session/session-context.d.ts +16 -0
- package/dist/types/daemon/session/status.d.ts +12 -0
- package/dist/types/daemon/session/transcript-page-table.d.ts +147 -0
- package/dist/types/daemon/session/turn-navigation-store.d.ts +117 -0
- package/dist/types/daemon/session/turn-notification-context.d.ts +43 -0
- package/dist/types/daemon/session/types.d.ts +568 -0
- package/dist/types/daemon/timing.d.ts +14 -0
- package/dist/types/daemon/useDaemonFollowupSuggestion.d.ts +77 -0
- package/dist/types/daemon/useDaemonMidTurnInjected.d.ts +30 -0
- package/dist/types/daemon/workspace/DaemonWorkspaceProvider.d.ts +21 -0
- package/dist/types/daemon/workspace/actions.d.ts +14 -0
- package/dist/types/daemon/workspace/hooks/index.d.ts +21 -0
- package/dist/types/daemon/workspace/hooks/useDaemonAgents.d.ts +22 -0
- package/dist/types/daemon/workspace/hooks/useDaemonAuth.d.ts +24 -0
- package/dist/types/daemon/workspace/hooks/useDaemonChannels.d.ts +33 -0
- package/dist/types/daemon/workspace/hooks/useDaemonDiagnostics.d.ts +10 -0
- package/dist/types/daemon/workspace/hooks/useDaemonFiles.d.ts +10 -0
- package/dist/types/daemon/workspace/hooks/useDaemonGlob.d.ts +8 -0
- package/dist/types/daemon/workspace/hooks/useDaemonMcp.d.ts +31 -0
- package/dist/types/daemon/workspace/hooks/useDaemonMemory.d.ts +16 -0
- package/dist/types/daemon/workspace/hooks/useDaemonProviders.d.ts +20 -0
- package/dist/types/daemon/workspace/hooks/useDaemonResource.d.ts +7 -0
- package/dist/types/daemon/workspace/hooks/useDaemonSessions.d.ts +48 -0
- package/dist/types/daemon/workspace/hooks/useDaemonSettings.d.ts +20 -0
- package/dist/types/daemon/workspace/hooks/useDaemonSkills.d.ts +30 -0
- package/dist/types/daemon/workspace/hooks/useDaemonStatusReport.d.ts +18 -0
- package/dist/types/daemon/workspace/hooks/useDaemonTools.d.ts +16 -0
- package/dist/types/daemon/workspace/hooks/useDaemonUsageDashboard.d.ts +27 -0
- package/dist/types/daemon/workspace/hooks/useWorkspaceEventReload.d.ts +6 -0
- package/dist/types/daemon/workspace/index.d.ts +10 -0
- package/dist/types/daemon/workspace/load-ready-skills.d.ts +7 -0
- package/dist/types/daemon/workspace/types.d.ts +415 -0
- package/dist/types/daemon-react-sdk.d.ts +319 -0
- package/dist/types/extensions/inputHighlight.d.ts +10 -0
- package/dist/types/hooks/daemonSessionMappers.d.ts +2 -0
- package/dist/types/hooks/useAnimationFrameTranscriptBlocks.d.ts +10 -0
- package/dist/types/hooks/useAnimationFrameValue.d.ts +1 -0
- package/dist/types/hooks/useAtMentionMenu.d.ts +72 -0
- package/dist/types/hooks/useAtMentionSources.d.ts +113 -0
- package/dist/types/hooks/useBackgroundTasks.d.ts +8 -0
- package/dist/types/hooks/useChatNavigationVisible.d.ts +2 -0
- package/dist/types/hooks/useComposerCore.d.ts +226 -0
- package/dist/types/hooks/useContextUsageControls.d.ts +26 -0
- package/dist/types/hooks/useCopiedFlash.d.ts +15 -0
- package/dist/types/hooks/useDelayedGlobalKeyDown.d.ts +1 -0
- package/dist/types/hooks/useExternalLinkOpener.d.ts +11 -0
- package/dist/types/hooks/useFileUpload.d.ts +62 -0
- package/dist/types/hooks/useFilterInput.d.ts +27 -0
- package/dist/types/hooks/useInputHistory.d.ts +17 -0
- package/dist/types/hooks/useIsLargeScreen.d.ts +20 -0
- package/dist/types/hooks/useIsTouchComposer.d.ts +36 -0
- package/dist/types/hooks/useListboxKeyboard.d.ts +42 -0
- package/dist/types/hooks/useMessages.d.ts +20 -0
- package/dist/types/hooks/useModelConfigurations.d.ts +11 -0
- package/dist/types/hooks/useNewSessionSuggestion.d.ts +26 -0
- package/dist/types/hooks/useOtherWorkspaceSessions.d.ts +11 -0
- package/dist/types/hooks/usePrefersReducedMotion.d.ts +1 -0
- package/dist/types/hooks/useQueuedPrompts.d.ts +74 -0
- package/dist/types/hooks/useScopedSessions.d.ts +65 -0
- package/dist/types/hooks/useSessionArtifacts.d.ts +10 -0
- package/dist/types/hooks/useSessionArtifactsChange.d.ts +12 -0
- package/dist/types/hooks/useSessionSources.d.ts +13 -0
- package/dist/types/hooks/useShallowMemo.d.ts +2 -0
- package/dist/types/hooks/useSharedNow.d.ts +1 -0
- package/dist/types/hooks/useStreamingLoadingMetrics.d.ts +19 -0
- package/dist/types/hooks/useTranscriptViewport.d.ts +31 -0
- package/dist/types/i18n.d.ts +14 -0
- package/dist/types/index.d.ts +69 -0
- package/dist/types/interactionBlockContext.d.ts +3 -0
- package/dist/types/lib/utils.d.ts +2 -0
- package/dist/types/live/HotkeySetter.d.ts +16 -0
- package/dist/types/live/LiveVoiceButton.d.ts +7 -0
- package/dist/types/live/LiveVoiceSettingsCard.d.ts +9 -0
- package/dist/types/live/useLiveVoice.d.ts +17 -0
- package/dist/types/live/useLiveVoiceSetup.d.ts +19 -0
- package/dist/types/local-files/bridge-client.d.ts +207 -0
- package/dist/types/local-files/capabilities.d.ts +33 -0
- package/dist/types/local-files/directory-handle-store.d.ts +15 -0
- package/dist/types/local-files/local-directory.d.ts +130 -0
- package/dist/types/local-files/mcp-server.d.ts +57 -0
- package/dist/types/local-files/pick-directory.d.ts +49 -0
- package/dist/types/local-files/useLocalFilesBridge.d.ts +64 -0
- package/dist/types/main.d.ts +6 -0
- package/dist/types/mcpAppHostContext.d.ts +1 -0
- package/dist/types/midTurnDedup.d.ts +52 -0
- package/dist/types/monitorDetailsContext.d.ts +12 -0
- package/dist/types/notification-text.d.ts +8 -0
- package/dist/types/portalRoot.d.ts +2 -0
- package/dist/types/pwa-registration.d.ts +10 -0
- package/dist/types/session-catalog/session-catalog-hooks.d.ts +121 -0
- package/dist/types/session-catalog/session-catalog-store.d.ts +143 -0
- package/dist/types/session-catalog/session-live-state-poll-interval.d.ts +2 -0
- package/dist/types/session-catalog/workspace-session-live-state.d.ts +20 -0
- package/dist/types/settings.d.ts +70 -0
- package/dist/types/shadowDom.d.ts +17 -0
- package/dist/types/subagentDetailsContext.d.ts +15 -0
- package/dist/types/themeContext.d.ts +12 -0
- package/dist/types/transcript.d.ts +33 -0
- package/dist/types/transcriptRenderMode.d.ts +5 -0
- package/dist/types/utils/ansi.d.ts +9 -0
- package/dist/types/utils/askUserPermission.d.ts +13 -0
- package/dist/types/utils/base64.d.ts +1 -0
- package/dist/types/utils/bounded-map.d.ts +11 -0
- package/dist/types/utils/clipboard.d.ts +31 -0
- package/dist/types/utils/commandDisplay.d.ts +7 -0
- package/dist/types/utils/composerInputState.d.ts +19 -0
- package/dist/types/utils/composerModels.d.ts +28 -0
- package/dist/types/utils/composerTag.d.ts +42 -0
- package/dist/types/utils/composerTasks.d.ts +16 -0
- package/dist/types/utils/contextUsage.d.ts +9 -0
- package/dist/types/utils/copyCommand.d.ts +18 -0
- package/dist/types/utils/cssUrlVar.d.ts +3 -0
- package/dist/types/utils/dialogLabels.d.ts +1 -0
- package/dist/types/utils/dom.d.ts +2 -0
- package/dist/types/utils/errorDetail.d.ts +1 -0
- package/dist/types/utils/escapeIntent.d.ts +29 -0
- package/dist/types/utils/externalOpen.d.ts +15 -0
- package/dist/types/utils/formatDateTime.d.ts +7 -0
- package/dist/types/utils/formatRelativeTime.d.ts +4 -0
- package/dist/types/utils/formatRuntime.d.ts +1 -0
- package/dist/types/utils/formatTokenCount.d.ts +13 -0
- package/dist/types/utils/gitModeIntent.d.ts +22 -0
- package/dist/types/utils/goalCondition.d.ts +43 -0
- package/dist/types/utils/goalControlRequest.d.ts +20 -0
- package/dist/types/utils/goalGate.d.ts +39 -0
- package/dist/types/utils/imageIngestion.d.ts +47 -0
- package/dist/types/utils/largePaste.d.ts +44 -0
- package/dist/types/utils/linkify.d.ts +19 -0
- package/dist/types/utils/localCommandQueue.d.ts +47 -0
- package/dist/types/utils/modelDisplay.d.ts +1 -0
- package/dist/types/utils/modelEncoding.d.ts +15 -0
- package/dist/types/utils/modelSwitchMessages.d.ts +4 -0
- package/dist/types/utils/monitorTasks.d.ts +3 -0
- package/dist/types/utils/planMode.d.ts +5 -0
- package/dist/types/utils/promptAdmission.d.ts +1 -0
- package/dist/types/utils/queueDrain.d.ts +21 -0
- package/dist/types/utils/remote-name-skeleton.d.ts +1 -0
- package/dist/types/utils/sentinelMessage.d.ts +4 -0
- package/dist/types/utils/sessionErrors.d.ts +2 -0
- package/dist/types/utils/sessionPath.d.ts +19 -0
- package/dist/types/utils/sessionPreparation.d.ts +77 -0
- package/dist/types/utils/slash-command-action.d.ts +3 -0
- package/dist/types/utils/slashSectionPlan.d.ts +26 -0
- package/dist/types/utils/splitUrl.d.ts +37 -0
- package/dist/types/utils/standalone-session-routing.d.ts +2 -0
- package/dist/types/utils/systemInfo.d.ts +26 -0
- package/dist/types/utils/taskActivity.d.ts +18 -0
- package/dist/types/utils/timeAgo.d.ts +10 -0
- package/dist/types/utils/todos.d.ts +165 -0
- package/dist/types/utils/unicodeConfusables.d.ts +1 -0
- package/dist/types/utils/unifiedDiff.d.ts +12 -0
- package/dist/types/utils/workflowTasks.d.ts +3 -0
- package/dist/types/utils/workspace.d.ts +34 -0
- package/dist/types/utils/workspaceColor.d.ts +15 -0
- package/dist/types/voice/VoiceButton.d.ts +16 -0
- package/dist/types/voice/use-voice-workspace-settings.d.ts +13 -0
- package/dist/types/voice/useVoiceCapture.d.ts +42 -0
- package/dist/types/voice/voice-workspace-target.d.ts +45 -0
- package/dist/types/voice/voiceModels.d.ts +23 -0
- package/dist/types/workflowDetailsContext.d.ts +11 -0
- package/package.json +102 -0
|
@@ -0,0 +1,419 @@
|
|
|
1
|
+
import './styles/globals.css';
|
|
2
|
+
import { type DaemonProductSessionContext, type DaemonStreamingState } from '@qwen-code/web-shell/daemon-react-sdk';
|
|
3
|
+
import type { DaemonAgentTrace, DaemonSessionAgentTaskStatus, DaemonTranscriptBlock, DaemonSessionMonitorTaskStatus, DaemonSessionTaskWithWorkflowStatus, DaemonWorkspaceCapability } from '@qwen-code/sdk/daemon';
|
|
4
|
+
import { type ComposerToolbarAction } from './components/ChatEditor';
|
|
5
|
+
import { type ToastTone } from './components/ToastHost';
|
|
6
|
+
import { type EnvironmentAgentTask } from './components/panels/EnvironmentPanel';
|
|
7
|
+
import { type ModelDialogModel } from './components/dialogs/ModelDialog';
|
|
8
|
+
import type { PaneHeaderActionsRenderer } from './components/ChatPane';
|
|
9
|
+
import { type SideTaskListItem } from './components/artifacts/ArtifactPanel';
|
|
10
|
+
import type { TurnOutputKind, TurnOutputOpenRequest } from './components/artifacts/TurnOutputs';
|
|
11
|
+
import { type WebShellSettingsOptions } from './settings';
|
|
12
|
+
import { type WebShellShadowDom } from './shadowDom';
|
|
13
|
+
import { type WebShellSidebarBranding, type WebShellSidebarFooterOptions, type WebShellSidebarWorkspaceOverviewOptions, type WebShellSidebarLockedWorkspace, type WebShellSidebarPrimaryNavOptions, type WebShellSidebarSessionActionsOptions } from './components/sidebar/WebShellSidebar';
|
|
14
|
+
import { type WebShellLanguage } from './i18n';
|
|
15
|
+
import { type ComposerPlaceholderState } from './utils/composerInputState';
|
|
16
|
+
import type { CommandInfo, Message } from './adapters/types';
|
|
17
|
+
import { type WebShellBrand, type WebShellResolvedBrand } from './brandContext';
|
|
18
|
+
import { type WebShellTheme } from './themeContext';
|
|
19
|
+
import { type WebShellComposerApi, type WebShellComposerInput, type WebShellMarkdownCustomization, type WebShellSourceIconResolver, type WebShellSourceReference, type ToolHeaderExtraRenderer, type UserMessageContentRenderer, type UserMessageContentParser, type AssistantTurnFooterRenderer, type WebShellArtifactCustomization, type WelcomeHeaderRenderer, type WelcomeFooterRenderer, type ComposerToolbarStartRenderer, type ComposerToolbarEndRenderer, type ComposerToolbarRightRenderer, type ComposerHeaderRenderer, type ComposerFooterRenderer, type ChatHeaderRenderer, type WebShellChatHeaderOptions, type WebShellRightPanelOptions, type WebShellEnvironmentPanelOptions, type FooterRenderer, type LoadingPhrasesResolver, type MarkdownTableMode, type WebShellAtProvider, type WebShellBuiltinAtProvidersConfig, type ComposerTagClickHandler, type ComposerTagRenderer, type WebShellComposerTagIconMap, type WebShellBottomStatusItem, type WebShellPreparedSubmit, type WebShellSubmitSnapshot, type WebShellSessionArtifactsChange } from './customization';
|
|
20
|
+
import type { CommandDisplayCategoryOrder } from './utils/commandDisplay';
|
|
21
|
+
export interface BugReportInfo {
|
|
22
|
+
title: string;
|
|
23
|
+
systemInfo: Record<string, string>;
|
|
24
|
+
}
|
|
25
|
+
export interface WebShellSidebarOptions {
|
|
26
|
+
enabled?: boolean;
|
|
27
|
+
defaultCollapsed?: boolean;
|
|
28
|
+
/** Whether to show WebShell's built-in compact drawer toggle. Defaults to true. */
|
|
29
|
+
showCompactToggle?: boolean;
|
|
30
|
+
/** Whether to show the Tasks/Channels session-source switch. Defaults to true. */
|
|
31
|
+
showSessionSourceSwitch?: boolean;
|
|
32
|
+
/** Whether to show daemon-owned Live conversations. Defaults to false. */
|
|
33
|
+
showLive?: boolean;
|
|
34
|
+
/** Hide or replace the complete sidebar branding row. */
|
|
35
|
+
branding?: false | WebShellSidebarBranding;
|
|
36
|
+
/** Customize the primary navigation area (new task button, custom entries). */
|
|
37
|
+
primaryNav?: WebShellSidebarPrimaryNavOptions;
|
|
38
|
+
/** Whether to hide the "Projects" header row (with search and add workspace). Defaults to false (shown). */
|
|
39
|
+
hideProjectHeader?: boolean;
|
|
40
|
+
/** Customize which action buttons appear on session rows. */
|
|
41
|
+
sessionActions?: WebShellSidebarSessionActionsOptions;
|
|
42
|
+
/** Hide the footer completely or select the built-in entries it exposes. */
|
|
43
|
+
footer?: false | WebShellSidebarFooterOptions;
|
|
44
|
+
/** Customize the workspace row shown when lockWorkspaceCwd is active. */
|
|
45
|
+
lockedWorkspace?: WebShellSidebarLockedWorkspace;
|
|
46
|
+
/**
|
|
47
|
+
* Session counts, full path and facet chips (MCP, skills, …) on workspace
|
|
48
|
+
* rows. Pass `false` to keep plain folder headers.
|
|
49
|
+
*/
|
|
50
|
+
workspaceOverview?: false | WebShellSidebarWorkspaceOverviewOptions;
|
|
51
|
+
}
|
|
52
|
+
export type SessionChangeEvent = {
|
|
53
|
+
type: 'rename';
|
|
54
|
+
sessionId: string;
|
|
55
|
+
newName: string;
|
|
56
|
+
} | {
|
|
57
|
+
type: 'submit';
|
|
58
|
+
sessionId: string;
|
|
59
|
+
prompt: string;
|
|
60
|
+
queued: boolean;
|
|
61
|
+
} | {
|
|
62
|
+
type: 'turn_complete';
|
|
63
|
+
sessionId: string;
|
|
64
|
+
error?: Error;
|
|
65
|
+
};
|
|
66
|
+
export interface WebShellApi {
|
|
67
|
+
/** Open the in-window split view, matching the built-in sidebar button. */
|
|
68
|
+
openSplitView: () => void;
|
|
69
|
+
/** Open the Session Overview panel, matching the built-in sidebar button. */
|
|
70
|
+
openSessionOverview: () => void;
|
|
71
|
+
/** Open the compact session drawer, matching the hamburger control. */
|
|
72
|
+
openSessionDrawer: () => void;
|
|
73
|
+
/** Start a new session using the same lifecycle as the built-in New Chat action. */
|
|
74
|
+
createNewSession: () => Promise<boolean>;
|
|
75
|
+
/** Open the right panel with a new side-task draft. */
|
|
76
|
+
createSideTask: () => boolean;
|
|
77
|
+
/** Resolve the visible approval, optionally binding it to an exact request. */
|
|
78
|
+
respondToPendingPermission?: {
|
|
79
|
+
(decision: 'allow' | 'reject'): Promise<boolean>;
|
|
80
|
+
(requestId: string, decision: 'allow' | 'reject'): Promise<boolean>;
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
export type WebShellComposerPlaceholderState = ComposerPlaceholderState;
|
|
84
|
+
export type WebShellComposerPlaceholders = Readonly<Partial<Record<WebShellComposerPlaceholderState, string>>>;
|
|
85
|
+
export interface WebShellSlashCommand {
|
|
86
|
+
/** Slash command name without the leading slash, normalized to lower case. */
|
|
87
|
+
command: string;
|
|
88
|
+
/** Trimmed text following the command name. */
|
|
89
|
+
args: string;
|
|
90
|
+
/** Original text submitted from the composer. */
|
|
91
|
+
input: string;
|
|
92
|
+
}
|
|
93
|
+
export type WebShellSlashCommandHandler = (command: WebShellSlashCommand) => boolean | void;
|
|
94
|
+
export interface WebShellProps {
|
|
95
|
+
/** Native settings-page presentation. Does not restrict commands or daemon access. */
|
|
96
|
+
settings?: WebShellSettingsOptions;
|
|
97
|
+
/** Host-specific label for the Ask User Question free-text choice. */
|
|
98
|
+
askUserFreeTextLabel?: string;
|
|
99
|
+
/** Called whenever the attached daemon session or workspace changes. */
|
|
100
|
+
onSessionIdChange?: (sessionId: string | undefined, workspaceId?: string, workspaceCwd?: string, sessionContext?: DaemonProductSessionContext) => void;
|
|
101
|
+
/** Called when the active session id or display name changes. */
|
|
102
|
+
onSessionInfoChange?: (session: {
|
|
103
|
+
sessionId?: string;
|
|
104
|
+
sessionName?: string;
|
|
105
|
+
}) => void;
|
|
106
|
+
/** Called after a new session is created. Session setup waits up to 30 seconds. */
|
|
107
|
+
onSessionCreated?: (sessionId: string) => Promise<void> | void;
|
|
108
|
+
/** Visual theme for the embedded shell. */
|
|
109
|
+
theme?: WebShellTheme;
|
|
110
|
+
/** Called when `/theme` changes the web-shell theme. */
|
|
111
|
+
onThemeChange?: (theme: WebShellTheme) => void;
|
|
112
|
+
/**
|
|
113
|
+
* Called when no `theme` prop was provided and the shell resolved a theme
|
|
114
|
+
* from the daemon's effective `ui.theme` setting. Unlike `onThemeChange`
|
|
115
|
+
* this is not a user action: a host that mirrors the theme onto document
|
|
116
|
+
* chrome (html class, `theme-color` meta) should follow it without
|
|
117
|
+
* persisting the value as its own preference, or the next settings edit
|
|
118
|
+
* would be shadowed by the stale copy.
|
|
119
|
+
*/
|
|
120
|
+
onThemeResolved?: (theme: WebShellTheme) => void;
|
|
121
|
+
/** UI language for the web-shell. Defaults to `?language=` or browser language. */
|
|
122
|
+
language?: 'en' | 'zh-CN' | 'zh' | 'zh-cn';
|
|
123
|
+
/** Called when `/language ui` changes the web-shell UI language. */
|
|
124
|
+
onLanguageChange?: (language: WebShellLanguage) => void;
|
|
125
|
+
/**
|
|
126
|
+
* Called when no `language` prop was provided and the effective UI language
|
|
127
|
+
* changes without becoming a host opinion, including settings resolution and
|
|
128
|
+
* optimistic changes or rollbacks. Hosts may mirror document chrome but must
|
|
129
|
+
* not persist this value.
|
|
130
|
+
*/
|
|
131
|
+
onLanguageResolved?: (language: WebShellLanguage) => void;
|
|
132
|
+
/**
|
|
133
|
+
* Product branding for the embedded shell. Replaces the daemon-resolved brand
|
|
134
|
+
* wholesale when provided: a host that sets `brand` owns both the name and the
|
|
135
|
+
* logo. `logo` may be any node, because the host owns its own document and
|
|
136
|
+
* Content Security Policy.
|
|
137
|
+
*/
|
|
138
|
+
brand?: WebShellBrand;
|
|
139
|
+
/**
|
|
140
|
+
* Called with the resolved brand's name and logo URI once the brand is known,
|
|
141
|
+
* and again only when one of those two values changes — so a host may pass an
|
|
142
|
+
* inline handler alongside an inline `brand` object without re-firing on every
|
|
143
|
+
* render. The shell itself never writes `document.title` or the favicon; an
|
|
144
|
+
* embedded shell must not hijack its host page's tab.
|
|
145
|
+
*/
|
|
146
|
+
onBrandResolved?: (brand: WebShellResolvedBrand) => void;
|
|
147
|
+
/** Additional CSS class name appended to the root element. */
|
|
148
|
+
className?: string;
|
|
149
|
+
/** Inline styles applied to the root element. */
|
|
150
|
+
style?: React.CSSProperties;
|
|
151
|
+
/** Optional Shadow DOM isolation for plugin content and/or all portals. */
|
|
152
|
+
shadowDom?: WebShellShadowDom;
|
|
153
|
+
/** Maximum chat content width in regular mode. Defaults to 1000px. */
|
|
154
|
+
chatMaxWidth?: number;
|
|
155
|
+
/** Optional workspace sidebar. Disabled by default. */
|
|
156
|
+
sidebar?: boolean | WebShellSidebarOptions;
|
|
157
|
+
/** Persistent chat header options. */
|
|
158
|
+
header?: WebShellChatHeaderOptions;
|
|
159
|
+
/** Right extension panel options. */
|
|
160
|
+
rightPanel?: WebShellRightPanelOptions;
|
|
161
|
+
/** Environment information panel options. */
|
|
162
|
+
environmentPanel?: WebShellEnvironmentPanelOptions;
|
|
163
|
+
/** Session ids to control the split view; an empty array closes it. */
|
|
164
|
+
splitSessionIds?: readonly string[];
|
|
165
|
+
/** Called when the split pane list changes from inside WebShell. */
|
|
166
|
+
onSplitSessionIdsChange?: (sessionIds: string[]) => void;
|
|
167
|
+
/**
|
|
168
|
+
* Extra actions rendered in each split-pane header, before the built-in
|
|
169
|
+
* close button. Receives the pane's session id (and workspace when known).
|
|
170
|
+
* When the actions no longer fit they collapse into a `…` overflow menu.
|
|
171
|
+
*/
|
|
172
|
+
renderPaneHeaderActions?: PaneHeaderActionsRenderer;
|
|
173
|
+
/**
|
|
174
|
+
* Called instead of the built-in right panel open behavior when a user clicks
|
|
175
|
+
* a turn output such as review changes, an artifact, or a scheduled task.
|
|
176
|
+
*/
|
|
177
|
+
onRightPanelOpen?: (request: TurnOutputOpenRequest) => void;
|
|
178
|
+
/** Override file-review links without replacing the other right panels. */
|
|
179
|
+
onFileReviewOpen?: (request: Extract<TurnOutputOpenRequest, {
|
|
180
|
+
kind: 'review';
|
|
181
|
+
}>) => void;
|
|
182
|
+
/** Open a workspace file in the embedding host instead of WebShell preview. */
|
|
183
|
+
onWorkspaceFileOpen?: (path: string) => void;
|
|
184
|
+
/** Open a completed Insight report in a host-native surface. */
|
|
185
|
+
onInsightReportOpen?: (path: string) => void;
|
|
186
|
+
/** Open context usage details in the host instead of the built-in panel. */
|
|
187
|
+
onContextUsageOpen?: (sessionId: string) => void;
|
|
188
|
+
/**
|
|
189
|
+
* Controls which turn output cards appear below messages. Defaults to all.
|
|
190
|
+
*/
|
|
191
|
+
messageTurnOutputs?: readonly TurnOutputKind[];
|
|
192
|
+
/** Imperative handle for externally opening WebShell surfaces. */
|
|
193
|
+
shellRef?: React.Ref<WebShellApi>;
|
|
194
|
+
/**
|
|
195
|
+
* Built-in composer toolbar actions to show. Omitted uses the defaults.
|
|
196
|
+
* Excluding gitBranch skips chat Git reads unless the environment panel
|
|
197
|
+
* needs them. Plan must be explicitly included.
|
|
198
|
+
*/
|
|
199
|
+
composerToolbarActions?: readonly ComposerToolbarAction[];
|
|
200
|
+
/** Optionally filter main-model entries without changing shared defaults. */
|
|
201
|
+
mainModelFilter?: (model: ModelDialogModel) => boolean;
|
|
202
|
+
/** Stack completion details vertically for narrow embedded hosts. */
|
|
203
|
+
compactComposerOverlays?: boolean;
|
|
204
|
+
/** Submit slash items marked as immediate actions when selected. */
|
|
205
|
+
autoSubmitSlashCommands?: boolean;
|
|
206
|
+
/** Host-only slash entries or presentation overrides. */
|
|
207
|
+
additionalSlashCommands?: readonly CommandInfo[];
|
|
208
|
+
/** Keep Context Usage available while restored-session usage is loading. */
|
|
209
|
+
contextUsageAlwaysVisible?: boolean;
|
|
210
|
+
/**
|
|
211
|
+
* Offer the last user turn's edit-and-resend action. On by default. Editing
|
|
212
|
+
* happens in place in the message bubble, and the rewind is deferred to send
|
|
213
|
+
* time, so abandoning the edit keeps the turns after it. Hosts that own the
|
|
214
|
+
* lifecycle pass `false`, or answer `onUserMessageEditRequest` with `true` to
|
|
215
|
+
* keep their own editor.
|
|
216
|
+
*/
|
|
217
|
+
userMessageEditing?: boolean;
|
|
218
|
+
/**
|
|
219
|
+
* Called before WebShell starts its built-in user-message edit flow. Return
|
|
220
|
+
* true when the host owns the edit-and-resend lifecycle.
|
|
221
|
+
*/
|
|
222
|
+
onUserMessageEditRequest?: (turnIndex: number, content: string) => boolean | void;
|
|
223
|
+
/** Cycle the approval mode when an otherwise-unhandled Tab is pressed. */
|
|
224
|
+
cycleModeOnTab?: boolean;
|
|
225
|
+
/**
|
|
226
|
+
* Creator attribution recorded on sessions this shell creates, and the
|
|
227
|
+
* source filter embedded hosts use to list only their own sessions. Defaults
|
|
228
|
+
* to the browser Web Shell's `'default'`; the VS Code companion overrides it
|
|
229
|
+
* so its sessions stay distinguishable from CLI and browser ones.
|
|
230
|
+
*/
|
|
231
|
+
sessionSourceType?: string;
|
|
232
|
+
/** Built-in actions appended to the context-sensitive default toolbar. */
|
|
233
|
+
composerToolbarAdditionalActions?: readonly ComposerToolbarAction[];
|
|
234
|
+
/**
|
|
235
|
+
* Main-composer copy by semantic state. Omitted or blank entries retain the
|
|
236
|
+
* WebShell localized default; shell-mode and follow-up copy still wins.
|
|
237
|
+
*/
|
|
238
|
+
composerPlaceholders?: WebShellComposerPlaceholders;
|
|
239
|
+
/** Called when connection status changes (idle/connecting/connected/disconnected/error). */
|
|
240
|
+
onConnectionChange?: (status: string) => void;
|
|
241
|
+
/** Called when prompt status changes (idle/waiting/responding). */
|
|
242
|
+
onStreamingStateChange?: (state: DaemonStreamingState) => void;
|
|
243
|
+
/**
|
|
244
|
+
* Called with the initial merged agent task snapshot and when its roster,
|
|
245
|
+
* status, or stable metadata changes. Poll-only runtime, stats, and activity
|
|
246
|
+
* updates are suppressed.
|
|
247
|
+
*/
|
|
248
|
+
onAgentTasksChange?: (tasks: readonly DaemonSessionAgentTaskStatus[]) => void;
|
|
249
|
+
/**
|
|
250
|
+
* Called whenever transcript blocks change. Receives the full blocks array
|
|
251
|
+
* at most once per animation frame during active generation.
|
|
252
|
+
*/
|
|
253
|
+
onTranscriptChange?: (blocks: readonly DaemonTranscriptBlock[]) => void;
|
|
254
|
+
/** Called with the complete Artifact snapshot after restore or change. */
|
|
255
|
+
onSessionArtifactsChange?: (change: WebShellSessionArtifactsChange) => void;
|
|
256
|
+
/**
|
|
257
|
+
* Called when a critical error occurs (auth failure, session gone, etc).
|
|
258
|
+
* Each distinct connection error value is reported once; reporting resets
|
|
259
|
+
* when the connection recovers. Replacing the handler while an error
|
|
260
|
+
* persists does not re-deliver that error.
|
|
261
|
+
*/
|
|
262
|
+
onError?: (error: Error) => void;
|
|
263
|
+
/** Called when `/bug` is invoked. Receives system info. If omitted, web-shell opens the report URL itself. */
|
|
264
|
+
onBugReport?: (info: BugReportInfo) => void;
|
|
265
|
+
/** Slash command names to hide from completion/help, for example `['approval-mode']`. */
|
|
266
|
+
hiddenSlashCommands?: string[];
|
|
267
|
+
/** Slash command category order. Defaults to custom, skill, system. */
|
|
268
|
+
slashCommandCategoryOrder?: CommandDisplayCategoryOrder;
|
|
269
|
+
/**
|
|
270
|
+
* Called before Web Shell handles a slash command. Return true to skip the
|
|
271
|
+
* built-in or daemon behavior after handling the command in the host.
|
|
272
|
+
*/
|
|
273
|
+
onSlashCommand?: WebShellSlashCommandHandler;
|
|
274
|
+
/** Built-in @ mention providers to enable. Defaults to all built-ins. */
|
|
275
|
+
builtinAtProviders?: WebShellBuiltinAtProvidersConfig;
|
|
276
|
+
/**
|
|
277
|
+
* Controls whether the composer's file-upload entry points (drag-and-drop
|
|
278
|
+
* and the @ panel upload item) are enabled. Does not disable attachments.
|
|
279
|
+
* Works alongside the daemon's
|
|
280
|
+
* `workspace_file_upload` capability, not instead of it: `false` force-
|
|
281
|
+
* disables upload even when the daemon advertises the capability, while
|
|
282
|
+
* `true`/omitted still requires the capability to be satisfied.
|
|
283
|
+
*/
|
|
284
|
+
fileUploadEnabled?: boolean;
|
|
285
|
+
/** Preferred file-drop destination. Omitted: ask only when both are available.
|
|
286
|
+
* If the preference is unavailable, use the sole available destination.
|
|
287
|
+
*/
|
|
288
|
+
fileDropAction?: 'upload' | 'attach';
|
|
289
|
+
/**
|
|
290
|
+
* Directory that drag-and-dropped files upload into, **relative to the
|
|
291
|
+
* workspace root**. Use a relative path WITHOUT a leading `/` — e.g.
|
|
292
|
+
* `'uploads'`, `'uploads/images'`, or omit it to upload into the
|
|
293
|
+
* workspace root (the default). A leading-slash path like `'/uploads'`
|
|
294
|
+
* is rejected by the daemon as outside the workspace. The directory
|
|
295
|
+
* (including intermediate components) is created automatically on upload
|
|
296
|
+
* when it does not exist.
|
|
297
|
+
*/
|
|
298
|
+
fileUploadDirectory?: string;
|
|
299
|
+
/** Additional @ mention categories shown alongside built-in files/extensions. */
|
|
300
|
+
atProviders?: readonly WebShellAtProvider[];
|
|
301
|
+
/** Icon URLs for custom composer tag kinds used by @ mention chips. */
|
|
302
|
+
composerTagIcons?: WebShellComposerTagIconMap;
|
|
303
|
+
/** Custom renderer for the tool-card header content after the status icon and tool name. */
|
|
304
|
+
renderToolHeaderExtra?: ToolHeaderExtraRenderer;
|
|
305
|
+
/** Artifact-card rendering overrides. */
|
|
306
|
+
artifact?: WebShellArtifactCustomization;
|
|
307
|
+
/** Custom renderer for the welcome header. Receives version, cwd, model, and mode. */
|
|
308
|
+
renderWelcomeHeader?: WelcomeHeaderRenderer;
|
|
309
|
+
/** Custom renderer shown below the chat composer in the empty welcome state. */
|
|
310
|
+
renderWelcomeFooter?: WelcomeFooterRenderer;
|
|
311
|
+
/**
|
|
312
|
+
* Show renderWelcomeFooter between the welcome header and composer on
|
|
313
|
+
* mobile empty state. Requires renderWelcomeFooter to be provided for the
|
|
314
|
+
* mobile CSS reordering to take effect.
|
|
315
|
+
*/
|
|
316
|
+
mobileWelcomeFooterMiddle?: boolean;
|
|
317
|
+
/** Parse user-message text into display parts such as chips. */
|
|
318
|
+
parseUserMessageContent?: UserMessageContentParser;
|
|
319
|
+
/** Custom renderer for the inside of user chat bubbles. Defaults to plain text. */
|
|
320
|
+
renderUserMessageContent?: UserMessageContentRenderer;
|
|
321
|
+
/** Custom renderer for composer and user-message tags. */
|
|
322
|
+
renderComposerTag?: ComposerTagRenderer;
|
|
323
|
+
/** Custom hover content for composer and user-message tags. */
|
|
324
|
+
renderComposerTagTooltip?: ComposerTagRenderer;
|
|
325
|
+
/** Click handler for composer and user-message tags. */
|
|
326
|
+
onComposerTagClick?: ComposerTagClickHandler;
|
|
327
|
+
/** Custom renderer displayed after the final assistant message of each turn. */
|
|
328
|
+
renderAssistantTurnFooter?: AssistantTurnFooterRenderer;
|
|
329
|
+
getAssistantSourcesIcon?: WebShellSourceIconResolver;
|
|
330
|
+
sourceReferences?: readonly WebShellSourceReference[];
|
|
331
|
+
/** Custom renderer inserted before the built-in chat composer toolbar controls. */
|
|
332
|
+
renderComposerToolbarStart?: ComposerToolbarStartRenderer;
|
|
333
|
+
/** Custom renderer inserted after the built-in composer toolbar controls. */
|
|
334
|
+
renderComposerToolbarEnd?: ComposerToolbarEndRenderer;
|
|
335
|
+
/** Custom renderer inserted into the composer toolbar's right-side action area. */
|
|
336
|
+
renderComposerToolbarRight?: ComposerToolbarRightRenderer;
|
|
337
|
+
/** Custom renderer shown directly above the chat composer input. */
|
|
338
|
+
renderComposerHeader?: ComposerHeaderRenderer;
|
|
339
|
+
/** Custom renderer shown directly below the chat composer input. */
|
|
340
|
+
renderComposerFooter?: ComposerFooterRenderer;
|
|
341
|
+
/**
|
|
342
|
+
* Replaces the complete persistent chat header. Only rendered when a
|
|
343
|
+
* session is active (not in the welcome/empty state).
|
|
344
|
+
*/
|
|
345
|
+
renderChatHeader?: ChatHeaderRenderer;
|
|
346
|
+
/** Custom component for the footer area below the Editor. Replaces the built-in StatusBar. */
|
|
347
|
+
renderFooter?: FooterRenderer;
|
|
348
|
+
/** Extra status items shown in the floating bottom panel beside the TODO summary. */
|
|
349
|
+
bottomStatusItems?: readonly WebShellBottomStatusItem[];
|
|
350
|
+
/** Collapse thinking blocks to 5 lines with a click-to-expand toggle. */
|
|
351
|
+
compactThinking?: boolean;
|
|
352
|
+
/** Let the host own pending Edit diff previews instead of the inline tool row. */
|
|
353
|
+
hostOwnsEditDiffPreview?: boolean;
|
|
354
|
+
/** Auto-collapse completed turns to just the prompt and final answer, with a per-turn toggle. Defaults to true. */
|
|
355
|
+
collapseCompletedTurns?: boolean;
|
|
356
|
+
/** Markdown table rendering mode. Defaults to basic. */
|
|
357
|
+
markdownTableMode?: MarkdownTableMode;
|
|
358
|
+
/** Enable virtual scrolling only when rendered transcript rows exceed this threshold. Defaults to 200. */
|
|
359
|
+
virtualScrollThreshold?: number;
|
|
360
|
+
/** Custom Markdown behavior for assistant content only. */
|
|
361
|
+
markdown?: WebShellMarkdownCustomization;
|
|
362
|
+
/**
|
|
363
|
+
* Override the witty phrases cycled while a prompt is streaming. Receives the
|
|
364
|
+
* resolved UI language; return phrases to replace the built-in defaults, an
|
|
365
|
+
* empty array to hide the phrase, or `undefined`/`null` to keep the defaults.
|
|
366
|
+
*/
|
|
367
|
+
loadingPhrases?: LoadingPhrasesResolver;
|
|
368
|
+
/** When provided, all toast notifications are forwarded to this callback and the built-in ToastHost is hidden. */
|
|
369
|
+
onToast?: (tone: ToastTone, message: string) => void;
|
|
370
|
+
/** Imperative handle for externally controlling the composer input. */
|
|
371
|
+
composerRef?: React.Ref<WebShellComposerApi>;
|
|
372
|
+
/** Called once the real composer API is mounted and safe to call. */
|
|
373
|
+
onComposerReady?: (api: WebShellComposerApi) => void;
|
|
374
|
+
/** Declarative composer input value. Increment composerInputVersion to replay the same value. */
|
|
375
|
+
composerInput?: WebShellComposerInput;
|
|
376
|
+
/** Replay key for composerInput. */
|
|
377
|
+
composerInputVersion?: number;
|
|
378
|
+
/** Called when a session-level event occurs (rename, submit, turn complete). */
|
|
379
|
+
onSessionChange?: (event: SessionChangeEvent) => void;
|
|
380
|
+
/**
|
|
381
|
+
* Prepare the immutable payload for a daemon submission. Called once for a
|
|
382
|
+
* direct or queued logical submit, after local command routing and before
|
|
383
|
+
* session creation, composer commit, optimistic rendering, or admission.
|
|
384
|
+
* Retries reuse the previously prepared payload and skip this callback.
|
|
385
|
+
* If this callback rejects, the submission is cancelled and the rejection's
|
|
386
|
+
* `Error.message` is surfaced to the user, so hosts must localize it.
|
|
387
|
+
*/
|
|
388
|
+
prepareSubmit?: (submission: WebShellSubmitSnapshot) => Promise<void | WebShellPreparedSubmit>;
|
|
389
|
+
/**
|
|
390
|
+
* Called before a prompt is submitted. Return a Promise — the prompt is held
|
|
391
|
+
* until the Promise resolves. If the Promise rejects, the prompt is cancelled.
|
|
392
|
+
* `sessionId` is `undefined` when the session has not yet been created (deferred).
|
|
393
|
+
* Also called for queued prompts (submitted while a turn is streaming).
|
|
394
|
+
* A rejection's `Error.message` is surfaced to the user, so hosts must
|
|
395
|
+
* localize it.
|
|
396
|
+
*/
|
|
397
|
+
onSubmitBefore?: (params: {
|
|
398
|
+
sessionId: string | undefined;
|
|
399
|
+
prompt: string;
|
|
400
|
+
}) => Promise<void>;
|
|
401
|
+
}
|
|
402
|
+
interface AppProps extends WebShellProps {
|
|
403
|
+
initialSelectedWorkspaceCwd?: string;
|
|
404
|
+
lockedWorkspaceCwd?: string;
|
|
405
|
+
lockedWorkspaceCapability?: DaemonWorkspaceCapability;
|
|
406
|
+
restartSseOnPrompt?: boolean;
|
|
407
|
+
historyPageSize?: number;
|
|
408
|
+
}
|
|
409
|
+
export { getTaskActivityKey } from './utils/taskActivity';
|
|
410
|
+
export declare function mergeMonitorTaskSnapshot(current: DaemonSessionMonitorTaskStatus, next: DaemonSessionMonitorTaskStatus): DaemonSessionMonitorTaskStatus;
|
|
411
|
+
interface SideTaskCatalogState {
|
|
412
|
+
parentSessionId?: string;
|
|
413
|
+
items: SideTaskListItem[];
|
|
414
|
+
loaded: boolean;
|
|
415
|
+
}
|
|
416
|
+
export declare function mergeSideTaskCatalog(catalog: SideTaskCatalogState, parentSessionId: string, listedItems: SideTaskListItem[], optimisticIds: ReadonlySet<string>): SideTaskCatalogState;
|
|
417
|
+
export declare function getEnvironmentAgentTasks(messages: readonly Message[], sessionTasks: readonly DaemonSessionTaskWithWorkflowStatus[]): EnvironmentAgentTask[];
|
|
418
|
+
export declare function mergeAgentTrace(liveAgents: readonly EnvironmentAgentTask[], trace: DaemonAgentTrace | undefined, now?: number): EnvironmentAgentTask[];
|
|
419
|
+
export declare function App({ askUserFreeTextLabel, onSessionIdChange, onSessionInfoChange, onSessionCreated, theme: providedTheme, onThemeChange, onThemeResolved, language: providedLanguage, onLanguageChange, onLanguageResolved, brand: providedBrand, onBrandResolved, className: externalClassName, style: externalStyle, shadowDom, onConnectionChange, onStreamingStateChange, onError, onBugReport, hiddenSlashCommands, slashCommandCategoryOrder, onSlashCommand, builtinAtProviders, atProviders, composerTagIcons, fileUploadEnabled, fileUploadDirectory, artifact, fileDropAction, renderToolHeaderExtra, renderWelcomeHeader, renderWelcomeFooter, mobileWelcomeFooterMiddle, parseUserMessageContent, renderUserMessageContent, renderComposerTag, renderComposerTagTooltip, onComposerTagClick, renderAssistantTurnFooter, getAssistantSourcesIcon, sourceReferences, renderComposerToolbarStart, renderComposerToolbarEnd, renderComposerToolbarRight, renderComposerHeader, renderComposerFooter, renderChatHeader, renderFooter, bottomStatusItems, chatMaxWidth, sidebar, settings: settingsPresentation, header, rightPanel, environmentPanel, splitSessionIds: externalSplitSessionIds, onSplitSessionIdsChange, renderPaneHeaderActions, onRightPanelOpen, onFileReviewOpen, onWorkspaceFileOpen, onInsightReportOpen, onContextUsageOpen, messageTurnOutputs, shellRef, composerToolbarActions, mainModelFilter, compactComposerOverlays, autoSubmitSlashCommands, additionalSlashCommands, contextUsageAlwaysVisible, userMessageEditing, onUserMessageEditRequest, cycleModeOnTab, sessionSourceType, composerToolbarAdditionalActions, composerPlaceholders, compactThinking, hostOwnsEditDiffPreview, collapseCompletedTurns, markdownTableMode, virtualScrollThreshold, markdown, loadingPhrases, onAgentTasksChange, onTranscriptChange, onSessionArtifactsChange, onToast, composerRef, onComposerReady, composerInput, composerInputVersion, onSessionChange, prepareSubmit, onSubmitBefore, restartSseOnPrompt, historyPageSize, initialSelectedWorkspaceCwd, lockedWorkspaceCwd, lockedWorkspaceCapability, }?: AppProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { type ReactNode } from 'react';
|
|
7
|
+
import type { TodoDetail, TodoSnapshotDiff } from './utils/todos';
|
|
8
|
+
export declare const CompactModeContext: import("react").Context<boolean>;
|
|
9
|
+
/**
|
|
10
|
+
* Per-snapshot status diffs (keyed by tool callId or plan message id), so a
|
|
11
|
+
* history row can render what changed in that snapshot without re-deriving it
|
|
12
|
+
* from the whole transcript. Empty by default so a row rendered outside the
|
|
13
|
+
* provider still falls back gracefully.
|
|
14
|
+
*/
|
|
15
|
+
export declare const TodoTimelineContext: import("react").Context<Map<string, TodoSnapshotDiff>>;
|
|
16
|
+
/**
|
|
17
|
+
* Per-todo timing and resource detail keyed by todoStateKey, consumed by the
|
|
18
|
+
* expanded todo list so a finished task can reveal when it ran and what it
|
|
19
|
+
* spent. Empty by default so a row rendered outside the provider (or in tests)
|
|
20
|
+
* simply shows no expander.
|
|
21
|
+
*/
|
|
22
|
+
export declare const TodoDetailContext: import("react").Context<Map<string, TodoDetail>>;
|
|
23
|
+
/**
|
|
24
|
+
* Provides both todo contexts in one wrapper so the message list stays at a
|
|
25
|
+
* single nesting level (one provider in the tree, not two).
|
|
26
|
+
*/
|
|
27
|
+
export declare function TodoContextsProvider({ timeline, details, children, }: {
|
|
28
|
+
timeline: Map<string, TodoSnapshotDiff>;
|
|
29
|
+
details: Map<string, TodoDetail>;
|
|
30
|
+
children: ReactNode;
|
|
31
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2026 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Leaf module for projecting transcript blocks into localized messages.
|
|
8
|
+
*
|
|
9
|
+
* This lives outside `hooks/useMessages.ts` on purpose. That module is a daemon
|
|
10
|
+
* consumer — it value-imports `useConnection` / `useTranscriptBlocks` /
|
|
11
|
+
* `useWorkspace` from the `daemon-react-sdk` barrel — so importing this one
|
|
12
|
+
* function from it dragged the daemon provider stack into the read-only
|
|
13
|
+
* transcript entry, which advertises the opposite. Same treatment as
|
|
14
|
+
* `utils/composerTag.ts`: the pure projection lives in a module with no daemon
|
|
15
|
+
* or editor imports, and `useMessages.ts` re-exports it for existing callers.
|
|
16
|
+
*
|
|
17
|
+
* Keep this module free of React hooks and of anything reaching
|
|
18
|
+
* `@qwen-code/web-shell/daemon-react-sdk`. `client/build-artifact.test.ts`
|
|
19
|
+
* asserts that `dist/transcript.js` carries no daemon provider code.
|
|
20
|
+
*/
|
|
21
|
+
import type { DaemonTranscriptBlock } from '@qwen-code/sdk/daemon';
|
|
22
|
+
import type { Message } from './types';
|
|
23
|
+
export type Translator = (key: string, vars?: Record<string, string | number>) => string;
|
|
24
|
+
export declare function transcriptBlocksToLocalizedMessages(blocks: readonly DaemonTranscriptBlock[], t: Translator, safeToolProjection?: boolean): Message[];
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Qwen Team
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import type { DaemonBackgroundTurn, DaemonInputAnnotation } from '@qwen-code/sdk/daemon';
|
|
7
|
+
export interface AttachmentPreviewRequest {
|
|
8
|
+
name: string;
|
|
9
|
+
mimeType?: string;
|
|
10
|
+
data?: Blob;
|
|
11
|
+
text?: string;
|
|
12
|
+
workspacePath?: string;
|
|
13
|
+
attachmentId?: string;
|
|
14
|
+
}
|
|
15
|
+
export type DaemonMessageToolCallStatus = 'pending' | 'in_progress' | 'completed' | 'failed';
|
|
16
|
+
export type DaemonMessageToolKind = 'read' | 'edit' | 'delete' | 'move' | 'search' | 'execute' | 'think' | 'fetch' | 'switch_mode' | 'other';
|
|
17
|
+
export interface DaemonMessageToolCallLocation {
|
|
18
|
+
file: string;
|
|
19
|
+
line?: number;
|
|
20
|
+
}
|
|
21
|
+
export interface DaemonMessageToolCallContent {
|
|
22
|
+
type: 'content' | 'diff' | 'terminal';
|
|
23
|
+
content?: {
|
|
24
|
+
type: string;
|
|
25
|
+
text?: string;
|
|
26
|
+
[key: string]: unknown;
|
|
27
|
+
};
|
|
28
|
+
path?: string;
|
|
29
|
+
oldText?: string;
|
|
30
|
+
newText?: string;
|
|
31
|
+
terminalId?: string;
|
|
32
|
+
}
|
|
33
|
+
export interface DaemonMessageToolCall {
|
|
34
|
+
callId: string;
|
|
35
|
+
toolName: string;
|
|
36
|
+
args?: Record<string, unknown>;
|
|
37
|
+
executionMode?: 'foreground' | 'background';
|
|
38
|
+
subagentSessionReady?: boolean;
|
|
39
|
+
backgroundResultPending?: boolean;
|
|
40
|
+
status: DaemonMessageToolCallStatus;
|
|
41
|
+
parentToolCallId?: string;
|
|
42
|
+
title?: string;
|
|
43
|
+
content?: readonly DaemonMessageToolCallContent[];
|
|
44
|
+
rawOutput?: unknown;
|
|
45
|
+
locations?: DaemonMessageToolCallLocation[];
|
|
46
|
+
kind?: DaemonMessageToolKind;
|
|
47
|
+
startTime?: number;
|
|
48
|
+
endTime?: number;
|
|
49
|
+
wasCancelled?: boolean;
|
|
50
|
+
subContent?: string;
|
|
51
|
+
subTools?: DaemonMessageToolCall[];
|
|
52
|
+
/** Transcript blocks folded into this tool presentation. */
|
|
53
|
+
sourceBlockIds?: string[];
|
|
54
|
+
}
|
|
55
|
+
export interface DaemonMessageTodoItem {
|
|
56
|
+
id: string;
|
|
57
|
+
content: string;
|
|
58
|
+
status: 'pending' | 'in_progress' | 'completed';
|
|
59
|
+
priority?: 'high' | 'medium' | 'low';
|
|
60
|
+
blockedBy?: string[];
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Fields shared by every history message. Kept as a base interface so a new
|
|
64
|
+
* cross-cutting field is declared once rather than on each role.
|
|
65
|
+
*/
|
|
66
|
+
export interface DaemonMessageMeta {
|
|
67
|
+
backgroundTurn?: DaemonBackgroundTurn;
|
|
68
|
+
/**
|
|
69
|
+
* Wall-clock epoch milliseconds when the backing transcript block was first
|
|
70
|
+
* observed, populated from `serverTimestamp ?? clientReceivedAt`. Surfaced
|
|
71
|
+
* as a hover tooltip in the message list. Undefined for synthetic messages
|
|
72
|
+
* that have no backing block.
|
|
73
|
+
*/
|
|
74
|
+
timestamp?: number;
|
|
75
|
+
/** Stable transcript blocks folded into this rendered message. */
|
|
76
|
+
sourceBlockIds?: string[];
|
|
77
|
+
}
|
|
78
|
+
export interface DaemonUserMessage extends DaemonMessageMeta {
|
|
79
|
+
id: string;
|
|
80
|
+
role: 'user';
|
|
81
|
+
content: string;
|
|
82
|
+
images?: Array<{
|
|
83
|
+
data: string;
|
|
84
|
+
mimeType: string;
|
|
85
|
+
/** Present when the image is a session attachment; keeps it re-fetchable. */
|
|
86
|
+
attachmentId?: string;
|
|
87
|
+
}>;
|
|
88
|
+
files?: Array<{
|
|
89
|
+
name: string;
|
|
90
|
+
mimeType: string;
|
|
91
|
+
data?: Blob;
|
|
92
|
+
text?: string;
|
|
93
|
+
attachmentId?: string;
|
|
94
|
+
}>;
|
|
95
|
+
inputAnnotations?: DaemonInputAnnotation[];
|
|
96
|
+
source?: string;
|
|
97
|
+
}
|
|
98
|
+
export interface DaemonAssistantMessage extends DaemonMessageMeta {
|
|
99
|
+
id: string;
|
|
100
|
+
role: 'assistant';
|
|
101
|
+
content: string;
|
|
102
|
+
isStreaming?: boolean;
|
|
103
|
+
branchRecordId?: string;
|
|
104
|
+
/**
|
|
105
|
+
* Token usage folded onto this assistant block by the daemon SDK reducer
|
|
106
|
+
* (summed when several blocks merge into one message). Summed again across a
|
|
107
|
+
* turn's assistant messages for the per-turn total shown on the fold toggle.
|
|
108
|
+
* Absent on sessions whose agent predates usage stamping.
|
|
109
|
+
*/
|
|
110
|
+
usage?: {
|
|
111
|
+
inputTokens: number;
|
|
112
|
+
outputTokens: number;
|
|
113
|
+
cachedTokens?: number;
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
export interface DaemonThinkingMessage extends DaemonMessageMeta {
|
|
117
|
+
id: string;
|
|
118
|
+
role: 'thinking';
|
|
119
|
+
content: string;
|
|
120
|
+
isStreaming?: boolean;
|
|
121
|
+
}
|
|
122
|
+
export interface DaemonToolGroupMessage extends DaemonMessageMeta {
|
|
123
|
+
id: string;
|
|
124
|
+
role: 'tool_group';
|
|
125
|
+
tools: DaemonMessageToolCall[];
|
|
126
|
+
/**
|
|
127
|
+
* Thinking folded into this group like a tool (compact mode). Streaming
|
|
128
|
+
* entries carry `isStreaming` so the summary can read "Thinking…" while
|
|
129
|
+
* the model works, then settle to a click-to-expand row when done.
|
|
130
|
+
* `beforeToolCallId` pins each thought to the tool that follows it so the
|
|
131
|
+
* group renders in the original interleaved order; thoughts without one
|
|
132
|
+
* trail the last tool.
|
|
133
|
+
*/
|
|
134
|
+
thoughts?: Array<{
|
|
135
|
+
content: string;
|
|
136
|
+
isStreaming?: boolean;
|
|
137
|
+
beforeToolCallId?: string;
|
|
138
|
+
}>;
|
|
139
|
+
}
|
|
140
|
+
export interface DaemonPlanMessage extends DaemonMessageMeta {
|
|
141
|
+
id: string;
|
|
142
|
+
role: 'plan';
|
|
143
|
+
todos: DaemonMessageTodoItem[];
|
|
144
|
+
}
|
|
145
|
+
export interface DaemonSystemMessage extends DaemonMessageMeta {
|
|
146
|
+
id: string;
|
|
147
|
+
role: 'system';
|
|
148
|
+
content: string;
|
|
149
|
+
variant: 'info' | 'error' | 'warning';
|
|
150
|
+
retryable?: boolean;
|
|
151
|
+
source?: string;
|
|
152
|
+
data?: unknown;
|
|
153
|
+
images?: Array<{
|
|
154
|
+
data: string;
|
|
155
|
+
mimeType: string;
|
|
156
|
+
}>;
|
|
157
|
+
files?: Array<{
|
|
158
|
+
name: string;
|
|
159
|
+
mimeType: string;
|
|
160
|
+
attachmentId?: string;
|
|
161
|
+
}>;
|
|
162
|
+
}
|
|
163
|
+
export interface DaemonUserShellMessage extends DaemonMessageMeta {
|
|
164
|
+
id: string;
|
|
165
|
+
role: 'user_shell';
|
|
166
|
+
command: string;
|
|
167
|
+
output: string;
|
|
168
|
+
cwd?: string;
|
|
169
|
+
}
|
|
170
|
+
export interface DaemonBtwMessage extends DaemonMessageMeta {
|
|
171
|
+
id: string;
|
|
172
|
+
role: 'btw';
|
|
173
|
+
question: string;
|
|
174
|
+
answer: string;
|
|
175
|
+
isPending: boolean;
|
|
176
|
+
}
|
|
177
|
+
export interface DaemonInsightProgressMessage extends DaemonMessageMeta {
|
|
178
|
+
id: string;
|
|
179
|
+
role: 'insight_progress';
|
|
180
|
+
stage: string;
|
|
181
|
+
progress: number;
|
|
182
|
+
detail?: string;
|
|
183
|
+
}
|
|
184
|
+
export interface DaemonInsightReadyMessage extends DaemonMessageMeta {
|
|
185
|
+
id: string;
|
|
186
|
+
role: 'insight_ready';
|
|
187
|
+
path: string;
|
|
188
|
+
}
|
|
189
|
+
export interface DaemonInsightErrorMessage extends DaemonMessageMeta {
|
|
190
|
+
id: string;
|
|
191
|
+
role: 'insight_error';
|
|
192
|
+
error: string;
|
|
193
|
+
}
|
|
194
|
+
export type DaemonMessage = DaemonUserMessage | DaemonAssistantMessage | DaemonThinkingMessage | DaemonToolGroupMessage | DaemonPlanMessage | DaemonSystemMessage | DaemonUserShellMessage | DaemonBtwMessage | DaemonInsightProgressMessage | DaemonInsightReadyMessage | DaemonInsightErrorMessage;
|