@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.
Files changed (413) hide show
  1. package/README.md +651 -0
  2. package/dist/daemon-react-sdk.js +53 -0
  3. package/dist/index.js +109094 -0
  4. package/dist/sw.js +9 -0
  5. package/dist/toolNames-DgCpmhML.js +17992 -0
  6. package/dist/transcript.js +31609 -0
  7. package/dist/types/App.d.ts +419 -0
  8. package/dist/types/WebShellContexts.d.ts +31 -0
  9. package/dist/types/adapters/localizedMessages.d.ts +24 -0
  10. package/dist/types/adapters/messageTypes.d.ts +194 -0
  11. package/dist/types/adapters/parallelAgentGrouping.d.ts +18 -0
  12. package/dist/types/adapters/promptTypes.d.ts +12 -0
  13. package/dist/types/adapters/toolClassification.d.ts +10 -0
  14. package/dist/types/adapters/transcriptAdapter.d.ts +3 -0
  15. package/dist/types/adapters/transcriptToMessages.d.ts +41 -0
  16. package/dist/types/adapters/types.d.ts +123 -0
  17. package/dist/types/brandContext.d.ts +44 -0
  18. package/dist/types/browser-turn-notifications.d.ts +36 -0
  19. package/dist/types/completions/slashCompletion.d.ts +35 -0
  20. package/dist/types/components/AtMentionPanel.d.ts +13 -0
  21. package/dist/types/components/BranchPickerPopover.d.ts +73 -0
  22. package/dist/types/components/ChatContextHeader.d.ts +18 -0
  23. package/dist/types/components/ChatEditor.d.ts +134 -0
  24. package/dist/types/components/ChatPane.d.ts +93 -0
  25. package/dist/types/components/ContextCompressionFeedback.d.ts +5 -0
  26. package/dist/types/components/ContextUsagePopover.d.ts +10 -0
  27. package/dist/types/components/ErrorBoundary.d.ts +40 -0
  28. package/dist/types/components/FileAttachmentContent.d.ts +4 -0
  29. package/dist/types/components/FileTypeIcon.d.ts +6 -0
  30. package/dist/types/components/GitBranchIndicator.d.ts +66 -0
  31. package/dist/types/components/GitModePopover.d.ts +23 -0
  32. package/dist/types/components/GlobalTurnNavigation.d.ts +16 -0
  33. package/dist/types/components/GoalStatusStrip.d.ts +13 -0
  34. package/dist/types/components/InsightProgress.d.ts +12 -0
  35. package/dist/types/components/InsightReady.d.ts +6 -0
  36. package/dist/types/components/LocalControlQrButton.d.ts +12 -0
  37. package/dist/types/components/LocalFilesControl.d.ts +74 -0
  38. package/dist/types/components/MessageItem.d.ts +43 -0
  39. package/dist/types/components/MessageList.d.ts +222 -0
  40. package/dist/types/components/MessageTimestamp.d.ts +32 -0
  41. package/dist/types/components/ModeIcon.d.ts +3 -0
  42. package/dist/types/components/MonitorIcon.d.ts +2 -0
  43. package/dist/types/components/PaneHeaderActions.d.ts +23 -0
  44. package/dist/types/components/PromptChevron.d.ts +7 -0
  45. package/dist/types/components/QueuedPromptDisplay.d.ts +57 -0
  46. package/dist/types/components/RootErrorFallback.d.ts +21 -0
  47. package/dist/types/components/SessionOverviewPanel.d.ts +46 -0
  48. package/dist/types/components/SessionPrBadge.d.ts +24 -0
  49. package/dist/types/components/SessionPrStateIcon.d.ts +32 -0
  50. package/dist/types/components/SessionRecoveryBanner.d.ts +3 -0
  51. package/dist/types/components/ShadowDomBoundary.d.ts +11 -0
  52. package/dist/types/components/SplitView.d.ts +69 -0
  53. package/dist/types/components/StandaloneAuth.d.ts +17 -0
  54. package/dist/types/components/StatusBar.d.ts +26 -0
  55. package/dist/types/components/StreamingStatus.d.ts +20 -0
  56. package/dist/types/components/Tips.d.ts +1 -0
  57. package/dist/types/components/ToastHost.d.ts +25 -0
  58. package/dist/types/components/TranscriptViewport.d.ts +17 -0
  59. package/dist/types/components/WebShellTranscript.d.ts +38 -0
  60. package/dist/types/components/WelcomeHeader.d.ts +8 -0
  61. package/dist/types/components/WorkspaceIndicator.d.ts +27 -0
  62. package/dist/types/components/WorkspaceSelector.d.ts +29 -0
  63. package/dist/types/components/WorkspaceSessionProvider.d.ts +19 -0
  64. package/dist/types/components/WorkspaceUnavailableState.d.ts +11 -0
  65. package/dist/types/components/agents/AgentCreatePage.d.ts +9 -0
  66. package/dist/types/components/agents/AgentsManagerPage.d.ts +8 -0
  67. package/dist/types/components/agents/agent-tool-options.d.ts +9 -0
  68. package/dist/types/components/agents/agents-manager-logic.d.ts +8 -0
  69. package/dist/types/components/artifacts/AgentWorkflow.d.ts +7 -0
  70. package/dist/types/components/artifacts/ArtifactIcon.d.ts +9 -0
  71. package/dist/types/components/artifacts/ArtifactPanel.d.ts +229 -0
  72. package/dist/types/components/artifacts/CodeReviewArtifactDetail.d.ts +63 -0
  73. package/dist/types/components/artifacts/ContextUsagePanel.d.ts +7 -0
  74. package/dist/types/components/artifacts/LineStats.d.ts +12 -0
  75. package/dist/types/components/artifacts/SideTaskPanel.d.ts +24 -0
  76. package/dist/types/components/artifacts/SubagentDetail.d.ts +14 -0
  77. package/dist/types/components/artifacts/TokenUsagePanel.d.ts +7 -0
  78. package/dist/types/components/artifacts/TurnOutputs.d.ts +121 -0
  79. package/dist/types/components/artifacts/artifactUtils.d.ts +37 -0
  80. package/dist/types/components/artifacts/turnOutputSelectors.d.ts +7 -0
  81. package/dist/types/components/artifacts/useArtifactWorkspaceTarget.d.ts +16 -0
  82. package/dist/types/components/channels/ChannelEditorDialog.d.ts +25 -0
  83. package/dist/types/components/channels/ChannelPairingRequests.d.ts +15 -0
  84. package/dist/types/components/channels/ChannelsManagerPage.d.ts +12 -0
  85. package/dist/types/components/channels/channel-editor-state.d.ts +25 -0
  86. package/dist/types/components/channels/channel-platform.d.ts +9 -0
  87. package/dist/types/components/composer/AddMenu.d.ts +20 -0
  88. package/dist/types/components/composer/prependSkillInvocation.d.ts +12 -0
  89. package/dist/types/components/dialogs/AddWorkspaceDialog.d.ts +24 -0
  90. package/dist/types/components/dialogs/ApprovalModeDialog.d.ts +7 -0
  91. package/dist/types/components/dialogs/DaemonStatusDialog.d.ts +3 -0
  92. package/dist/types/components/dialogs/DeleteSessionDialog.d.ts +8 -0
  93. package/dist/types/components/dialogs/DialogShell.d.ts +15 -0
  94. package/dist/types/components/dialogs/GitDialog.d.ts +14 -0
  95. package/dist/types/components/dialogs/GitDiffDialog.d.ts +14 -0
  96. package/dist/types/components/dialogs/GitHubPrsDialog.d.ts +9 -0
  97. package/dist/types/components/dialogs/GitLogDialog.d.ts +14 -0
  98. package/dist/types/components/dialogs/GoalEditDialog.d.ts +9 -0
  99. package/dist/types/components/dialogs/GoalsDialog.d.ts +16 -0
  100. package/dist/types/components/dialogs/HelpDialog.d.ts +6 -0
  101. package/dist/types/components/dialogs/ModelDialog.d.ts +28 -0
  102. package/dist/types/components/dialogs/ModelFallbacksDialog.d.ts +14 -0
  103. package/dist/types/components/dialogs/ReleaseSessionDialog.d.ts +8 -0
  104. package/dist/types/components/dialogs/ResumeDialog.d.ts +7 -0
  105. package/dist/types/components/dialogs/RewindDialog.d.ts +12 -0
  106. package/dist/types/components/dialogs/ScheduledTasksDialog.d.ts +30 -0
  107. package/dist/types/components/dialogs/SessionRow.d.ts +46 -0
  108. package/dist/types/components/dialogs/SvgLineChart.d.ts +35 -0
  109. package/dist/types/components/dialogs/ThemeDialog.d.ts +8 -0
  110. package/dist/types/components/dialogs/TokenHeatmap.d.ts +18 -0
  111. package/dist/types/components/dialogs/ToolsDialog.d.ts +1 -0
  112. package/dist/types/components/dialogs/UsageDashboardTab.d.ts +13 -0
  113. package/dist/types/components/dialogs/dialogStyles.d.ts +2 -0
  114. package/dist/types/components/dialogs/scheduledTasksSchedule.d.ts +62 -0
  115. package/dist/types/components/extensions/ExtensionsManagerPage.d.ts +9 -0
  116. package/dist/types/components/extensions/extensions-manager-logic.d.ts +3 -0
  117. package/dist/types/components/local-control-api.d.ts +30 -0
  118. package/dist/types/components/mcp/McpManagerPage.d.ts +12 -0
  119. package/dist/types/components/messages/AskUserQuestion.d.ts +18 -0
  120. package/dist/types/components/messages/AssistantMessage.d.ts +40 -0
  121. package/dist/types/components/messages/AuthMessage.d.ts +6 -0
  122. package/dist/types/components/messages/BtwMessage.d.ts +7 -0
  123. package/dist/types/components/messages/ContextUsageMessage.d.ts +9 -0
  124. package/dist/types/components/messages/EnhancedMarkdownTable.d.ts +31 -0
  125. package/dist/types/components/messages/FootnoteCard.d.ts +11 -0
  126. package/dist/types/components/messages/FootnotePreviewContent.d.ts +9 -0
  127. package/dist/types/components/messages/GoalApprovalContent.d.ts +5 -0
  128. package/dist/types/components/messages/GoalStatusMessage.d.ts +15 -0
  129. package/dist/types/components/messages/LinkifiedText.d.ts +8 -0
  130. package/dist/types/components/messages/LocalControlSettingsCard.d.ts +1 -0
  131. package/dist/types/components/messages/Markdown.d.ts +38 -0
  132. package/dist/types/components/messages/MarkdownChartRenderer.d.ts +65 -0
  133. package/dist/types/components/messages/McpApp.d.ts +21 -0
  134. package/dist/types/components/messages/McpStatusMessage.d.ts +22 -0
  135. package/dist/types/components/messages/MemoryMessage.d.ts +9 -0
  136. package/dist/types/components/messages/ModelManagementSection.d.ts +23 -0
  137. package/dist/types/components/messages/PlanExecutionView.d.ts +91 -0
  138. package/dist/types/components/messages/PlanMessage.d.ts +8 -0
  139. package/dist/types/components/messages/QuestionAnswerMessage.d.ts +7 -0
  140. package/dist/types/components/messages/SettingsMessage.d.ts +46 -0
  141. package/dist/types/components/messages/StatsMessage.d.ts +14 -0
  142. package/dist/types/components/messages/StatusMessage.d.ts +18 -0
  143. package/dist/types/components/messages/SystemMessage.d.ts +29 -0
  144. package/dist/types/components/messages/TasksStatusMessage.d.ts +38 -0
  145. package/dist/types/components/messages/TodoView.d.ts +17 -0
  146. package/dist/types/components/messages/ToolApproval.d.ts +28 -0
  147. package/dist/types/components/messages/ToolFilePreviewButton.d.ts +7 -0
  148. package/dist/types/components/messages/ToolGroup.d.ts +50 -0
  149. package/dist/types/components/messages/UserMessage.d.ts +46 -0
  150. package/dist/types/components/messages/UserShellMessage.d.ts +6 -0
  151. package/dist/types/components/messages/WorkflowExecutionView.d.ts +48 -0
  152. package/dist/types/components/messages/agentForest.d.ts +96 -0
  153. package/dist/types/components/messages/codeHighlighter.d.ts +25 -0
  154. package/dist/types/components/messages/rehype-footnote-cards.d.ts +22 -0
  155. package/dist/types/components/messages/toolFormatting.d.ts +63 -0
  156. package/dist/types/components/messages/tools/DiffView.d.ts +5 -0
  157. package/dist/types/components/messages/tools/ParallelAgentsGroup.d.ts +12 -0
  158. package/dist/types/components/messages/tools/SubAgentPanel.d.ts +10 -0
  159. package/dist/types/components/messages/tools/toolDisplay.d.ts +7 -0
  160. package/dist/types/components/panels/EnvironmentPanel.d.ts +45 -0
  161. package/dist/types/components/panels/SourcesSection.d.ts +25 -0
  162. package/dist/types/components/panels/TodoPanel.d.ts +11 -0
  163. package/dist/types/components/plugins/PluginManagerPage.d.ts +8 -0
  164. package/dist/types/components/plugins/manager-page.d.ts +4 -0
  165. package/dist/types/components/preview/SavedWebPreview.d.ts +5 -0
  166. package/dist/types/components/preview/WebPreviewPanel.d.ts +5 -0
  167. package/dist/types/components/preview/web-preview.d.ts +7 -0
  168. package/dist/types/components/sidebar/SessionDetailsTooltip.d.ts +17 -0
  169. package/dist/types/components/sidebar/SessionGroupSection.d.ts +19 -0
  170. package/dist/types/components/sidebar/StandaloneRecents.d.ts +33 -0
  171. package/dist/types/components/sidebar/WebShellSidebar.d.ts +139 -0
  172. package/dist/types/components/sidebar/WorkspaceDetailsTooltip.d.ts +49 -0
  173. package/dist/types/components/sidebar/WorkspaceMenu.d.ts +41 -0
  174. package/dist/types/components/sidebar/WorkspaceRenameDialog.d.ts +18 -0
  175. package/dist/types/components/sidebar/WorkspaceSection.d.ts +112 -0
  176. package/dist/types/components/sidebar/channelSessionGroups.d.ts +7 -0
  177. package/dist/types/components/sidebar/collapsedSessionSections.d.ts +25 -0
  178. package/dist/types/components/sidebar/scheduled-task-session-groups.d.ts +12 -0
  179. package/dist/types/components/sidebar/sessionDetailsCollisionBoundary.d.ts +1 -0
  180. package/dist/types/components/sidebar/sessionSearch.d.ts +28 -0
  181. package/dist/types/components/sidebar/sessionTitleScroll.d.ts +7 -0
  182. package/dist/types/components/sidebar/sidebarToggleShortcut.d.ts +18 -0
  183. package/dist/types/components/sidebar/useSessionContentSearch.d.ts +20 -0
  184. package/dist/types/components/sidebar/useWorkspaceOverview.d.ts +40 -0
  185. package/dist/types/components/sidebar/workspaceExpansion.d.ts +4 -0
  186. package/dist/types/components/sidebar/workspaceOverviewModel.d.ts +123 -0
  187. package/dist/types/components/skills/SkillInstallDialog.d.ts +8 -0
  188. package/dist/types/components/skills/SkillsManagerPage.d.ts +11 -0
  189. package/dist/types/components/skills/skills-manager-logic.d.ts +6 -0
  190. package/dist/types/components/sources/SourceList.d.ts +5 -0
  191. package/dist/types/components/sources/TurnSources.d.ts +5 -0
  192. package/dist/types/components/sources/sourceEntries.d.ts +8 -0
  193. package/dist/types/components/summaryRunId.d.ts +9 -0
  194. package/dist/types/components/terminal/TerminalPanel.d.ts +17 -0
  195. package/dist/types/components/toolbarDropdown.d.ts +39 -0
  196. package/dist/types/components/ui/alert-dialog.d.ts +19 -0
  197. package/dist/types/components/ui/alert.d.ts +10 -0
  198. package/dist/types/components/ui/badge.d.ts +9 -0
  199. package/dist/types/components/ui/breadcrumb.d.ts +11 -0
  200. package/dist/types/components/ui/button.d.ts +11 -0
  201. package/dist/types/components/ui/card.d.ts +11 -0
  202. package/dist/types/components/ui/checkbox.d.ts +4 -0
  203. package/dist/types/components/ui/data-table.d.ts +31 -0
  204. package/dist/types/components/ui/dialog.d.ts +19 -0
  205. package/dist/types/components/ui/drawer.d.ts +16 -0
  206. package/dist/types/components/ui/dropdown-menu.d.ts +29 -0
  207. package/dist/types/components/ui/empty.d.ts +11 -0
  208. package/dist/types/components/ui/field.d.ts +24 -0
  209. package/dist/types/components/ui/input.d.ts +3 -0
  210. package/dist/types/components/ui/label.d.ts +4 -0
  211. package/dist/types/components/ui/management-notice.d.ts +12 -0
  212. package/dist/types/components/ui/popover.d.ts +13 -0
  213. package/dist/types/components/ui/radio-group.d.ts +5 -0
  214. package/dist/types/components/ui/scroll-area.d.ts +5 -0
  215. package/dist/types/components/ui/select.d.ts +16 -0
  216. package/dist/types/components/ui/separator.d.ts +4 -0
  217. package/dist/types/components/ui/skeleton.d.ts +2 -0
  218. package/dist/types/components/ui/spinner.d.ts +2 -0
  219. package/dist/types/components/ui/switch.d.ts +6 -0
  220. package/dist/types/components/ui/table.d.ts +10 -0
  221. package/dist/types/components/ui/tabs.d.ts +13 -0
  222. package/dist/types/components/ui/textarea.d.ts +3 -0
  223. package/dist/types/components/ui/toggle-group.d.ts +10 -0
  224. package/dist/types/components/ui/toggle.d.ts +9 -0
  225. package/dist/types/components/ui/tooltip.d.ts +7 -0
  226. package/dist/types/components/workflow/SessionWorkflowCockpit.d.ts +17 -0
  227. package/dist/types/components/workflow/SessionWorkflowInspector.d.ts +15 -0
  228. package/dist/types/components/workflow/session-workflow-model.d.ts +32 -0
  229. package/dist/types/components/workflows/WorkflowRunsPage.d.ts +6 -0
  230. package/dist/types/components/workspaces/WorkspaceRemovalDialog.d.ts +20 -0
  231. package/dist/types/components/workspaces/WorkspacesOverviewPanel.d.ts +21 -0
  232. package/dist/types/components/workspaces/useWorkspaceRemoval.d.ts +47 -0
  233. package/dist/types/config/daemon.d.ts +41 -0
  234. package/dist/types/config/standalone.d.ts +1 -0
  235. package/dist/types/constants/loadingPhrases.d.ts +4 -0
  236. package/dist/types/constants/localCommands.d.ts +27 -0
  237. package/dist/types/constants/sessions.d.ts +43 -0
  238. package/dist/types/constants/toolNames.d.ts +9 -0
  239. package/dist/types/customization.d.ts +508 -0
  240. package/dist/types/daemon/followupSidechannel.d.ts +11 -0
  241. package/dist/types/daemon/index.d.ts +14 -0
  242. package/dist/types/daemon/midTurnInjectedSidechannel.d.ts +37 -0
  243. package/dist/types/daemon/pendingPromptVersion.d.ts +19 -0
  244. package/dist/types/daemon/session/DaemonSessionProvider.d.ts +45 -0
  245. package/dist/types/daemon/session/actions.d.ts +100 -0
  246. package/dist/types/daemon/session/clientLifecycle.d.ts +21 -0
  247. package/dist/types/daemon/session/httpErrors.d.ts +9 -0
  248. package/dist/types/daemon/session/index.d.ts +15 -0
  249. package/dist/types/daemon/session/live-journal-repair.d.ts +19 -0
  250. package/dist/types/daemon/session/mappers.d.ts +71 -0
  251. package/dist/types/daemon/session/promptContent.d.ts +11 -0
  252. package/dist/types/daemon/session/selectors.d.ts +21 -0
  253. package/dist/types/daemon/session/session-context.d.ts +16 -0
  254. package/dist/types/daemon/session/status.d.ts +12 -0
  255. package/dist/types/daemon/session/transcript-page-table.d.ts +147 -0
  256. package/dist/types/daemon/session/turn-navigation-store.d.ts +117 -0
  257. package/dist/types/daemon/session/turn-notification-context.d.ts +43 -0
  258. package/dist/types/daemon/session/types.d.ts +568 -0
  259. package/dist/types/daemon/timing.d.ts +14 -0
  260. package/dist/types/daemon/useDaemonFollowupSuggestion.d.ts +77 -0
  261. package/dist/types/daemon/useDaemonMidTurnInjected.d.ts +30 -0
  262. package/dist/types/daemon/workspace/DaemonWorkspaceProvider.d.ts +21 -0
  263. package/dist/types/daemon/workspace/actions.d.ts +14 -0
  264. package/dist/types/daemon/workspace/hooks/index.d.ts +21 -0
  265. package/dist/types/daemon/workspace/hooks/useDaemonAgents.d.ts +22 -0
  266. package/dist/types/daemon/workspace/hooks/useDaemonAuth.d.ts +24 -0
  267. package/dist/types/daemon/workspace/hooks/useDaemonChannels.d.ts +33 -0
  268. package/dist/types/daemon/workspace/hooks/useDaemonDiagnostics.d.ts +10 -0
  269. package/dist/types/daemon/workspace/hooks/useDaemonFiles.d.ts +10 -0
  270. package/dist/types/daemon/workspace/hooks/useDaemonGlob.d.ts +8 -0
  271. package/dist/types/daemon/workspace/hooks/useDaemonMcp.d.ts +31 -0
  272. package/dist/types/daemon/workspace/hooks/useDaemonMemory.d.ts +16 -0
  273. package/dist/types/daemon/workspace/hooks/useDaemonProviders.d.ts +20 -0
  274. package/dist/types/daemon/workspace/hooks/useDaemonResource.d.ts +7 -0
  275. package/dist/types/daemon/workspace/hooks/useDaemonSessions.d.ts +48 -0
  276. package/dist/types/daemon/workspace/hooks/useDaemonSettings.d.ts +20 -0
  277. package/dist/types/daemon/workspace/hooks/useDaemonSkills.d.ts +30 -0
  278. package/dist/types/daemon/workspace/hooks/useDaemonStatusReport.d.ts +18 -0
  279. package/dist/types/daemon/workspace/hooks/useDaemonTools.d.ts +16 -0
  280. package/dist/types/daemon/workspace/hooks/useDaemonUsageDashboard.d.ts +27 -0
  281. package/dist/types/daemon/workspace/hooks/useWorkspaceEventReload.d.ts +6 -0
  282. package/dist/types/daemon/workspace/index.d.ts +10 -0
  283. package/dist/types/daemon/workspace/load-ready-skills.d.ts +7 -0
  284. package/dist/types/daemon/workspace/types.d.ts +415 -0
  285. package/dist/types/daemon-react-sdk.d.ts +319 -0
  286. package/dist/types/extensions/inputHighlight.d.ts +10 -0
  287. package/dist/types/hooks/daemonSessionMappers.d.ts +2 -0
  288. package/dist/types/hooks/useAnimationFrameTranscriptBlocks.d.ts +10 -0
  289. package/dist/types/hooks/useAnimationFrameValue.d.ts +1 -0
  290. package/dist/types/hooks/useAtMentionMenu.d.ts +72 -0
  291. package/dist/types/hooks/useAtMentionSources.d.ts +113 -0
  292. package/dist/types/hooks/useBackgroundTasks.d.ts +8 -0
  293. package/dist/types/hooks/useChatNavigationVisible.d.ts +2 -0
  294. package/dist/types/hooks/useComposerCore.d.ts +226 -0
  295. package/dist/types/hooks/useContextUsageControls.d.ts +26 -0
  296. package/dist/types/hooks/useCopiedFlash.d.ts +15 -0
  297. package/dist/types/hooks/useDelayedGlobalKeyDown.d.ts +1 -0
  298. package/dist/types/hooks/useExternalLinkOpener.d.ts +11 -0
  299. package/dist/types/hooks/useFileUpload.d.ts +62 -0
  300. package/dist/types/hooks/useFilterInput.d.ts +27 -0
  301. package/dist/types/hooks/useInputHistory.d.ts +17 -0
  302. package/dist/types/hooks/useIsLargeScreen.d.ts +20 -0
  303. package/dist/types/hooks/useIsTouchComposer.d.ts +36 -0
  304. package/dist/types/hooks/useListboxKeyboard.d.ts +42 -0
  305. package/dist/types/hooks/useMessages.d.ts +20 -0
  306. package/dist/types/hooks/useModelConfigurations.d.ts +11 -0
  307. package/dist/types/hooks/useNewSessionSuggestion.d.ts +26 -0
  308. package/dist/types/hooks/useOtherWorkspaceSessions.d.ts +11 -0
  309. package/dist/types/hooks/usePrefersReducedMotion.d.ts +1 -0
  310. package/dist/types/hooks/useQueuedPrompts.d.ts +74 -0
  311. package/dist/types/hooks/useScopedSessions.d.ts +65 -0
  312. package/dist/types/hooks/useSessionArtifacts.d.ts +10 -0
  313. package/dist/types/hooks/useSessionArtifactsChange.d.ts +12 -0
  314. package/dist/types/hooks/useSessionSources.d.ts +13 -0
  315. package/dist/types/hooks/useShallowMemo.d.ts +2 -0
  316. package/dist/types/hooks/useSharedNow.d.ts +1 -0
  317. package/dist/types/hooks/useStreamingLoadingMetrics.d.ts +19 -0
  318. package/dist/types/hooks/useTranscriptViewport.d.ts +31 -0
  319. package/dist/types/i18n.d.ts +14 -0
  320. package/dist/types/index.d.ts +69 -0
  321. package/dist/types/interactionBlockContext.d.ts +3 -0
  322. package/dist/types/lib/utils.d.ts +2 -0
  323. package/dist/types/live/HotkeySetter.d.ts +16 -0
  324. package/dist/types/live/LiveVoiceButton.d.ts +7 -0
  325. package/dist/types/live/LiveVoiceSettingsCard.d.ts +9 -0
  326. package/dist/types/live/useLiveVoice.d.ts +17 -0
  327. package/dist/types/live/useLiveVoiceSetup.d.ts +19 -0
  328. package/dist/types/local-files/bridge-client.d.ts +207 -0
  329. package/dist/types/local-files/capabilities.d.ts +33 -0
  330. package/dist/types/local-files/directory-handle-store.d.ts +15 -0
  331. package/dist/types/local-files/local-directory.d.ts +130 -0
  332. package/dist/types/local-files/mcp-server.d.ts +57 -0
  333. package/dist/types/local-files/pick-directory.d.ts +49 -0
  334. package/dist/types/local-files/useLocalFilesBridge.d.ts +64 -0
  335. package/dist/types/main.d.ts +6 -0
  336. package/dist/types/mcpAppHostContext.d.ts +1 -0
  337. package/dist/types/midTurnDedup.d.ts +52 -0
  338. package/dist/types/monitorDetailsContext.d.ts +12 -0
  339. package/dist/types/notification-text.d.ts +8 -0
  340. package/dist/types/portalRoot.d.ts +2 -0
  341. package/dist/types/pwa-registration.d.ts +10 -0
  342. package/dist/types/session-catalog/session-catalog-hooks.d.ts +121 -0
  343. package/dist/types/session-catalog/session-catalog-store.d.ts +143 -0
  344. package/dist/types/session-catalog/session-live-state-poll-interval.d.ts +2 -0
  345. package/dist/types/session-catalog/workspace-session-live-state.d.ts +20 -0
  346. package/dist/types/settings.d.ts +70 -0
  347. package/dist/types/shadowDom.d.ts +17 -0
  348. package/dist/types/subagentDetailsContext.d.ts +15 -0
  349. package/dist/types/themeContext.d.ts +12 -0
  350. package/dist/types/transcript.d.ts +33 -0
  351. package/dist/types/transcriptRenderMode.d.ts +5 -0
  352. package/dist/types/utils/ansi.d.ts +9 -0
  353. package/dist/types/utils/askUserPermission.d.ts +13 -0
  354. package/dist/types/utils/base64.d.ts +1 -0
  355. package/dist/types/utils/bounded-map.d.ts +11 -0
  356. package/dist/types/utils/clipboard.d.ts +31 -0
  357. package/dist/types/utils/commandDisplay.d.ts +7 -0
  358. package/dist/types/utils/composerInputState.d.ts +19 -0
  359. package/dist/types/utils/composerModels.d.ts +28 -0
  360. package/dist/types/utils/composerTag.d.ts +42 -0
  361. package/dist/types/utils/composerTasks.d.ts +16 -0
  362. package/dist/types/utils/contextUsage.d.ts +9 -0
  363. package/dist/types/utils/copyCommand.d.ts +18 -0
  364. package/dist/types/utils/cssUrlVar.d.ts +3 -0
  365. package/dist/types/utils/dialogLabels.d.ts +1 -0
  366. package/dist/types/utils/dom.d.ts +2 -0
  367. package/dist/types/utils/errorDetail.d.ts +1 -0
  368. package/dist/types/utils/escapeIntent.d.ts +29 -0
  369. package/dist/types/utils/externalOpen.d.ts +15 -0
  370. package/dist/types/utils/formatDateTime.d.ts +7 -0
  371. package/dist/types/utils/formatRelativeTime.d.ts +4 -0
  372. package/dist/types/utils/formatRuntime.d.ts +1 -0
  373. package/dist/types/utils/formatTokenCount.d.ts +13 -0
  374. package/dist/types/utils/gitModeIntent.d.ts +22 -0
  375. package/dist/types/utils/goalCondition.d.ts +43 -0
  376. package/dist/types/utils/goalControlRequest.d.ts +20 -0
  377. package/dist/types/utils/goalGate.d.ts +39 -0
  378. package/dist/types/utils/imageIngestion.d.ts +47 -0
  379. package/dist/types/utils/largePaste.d.ts +44 -0
  380. package/dist/types/utils/linkify.d.ts +19 -0
  381. package/dist/types/utils/localCommandQueue.d.ts +47 -0
  382. package/dist/types/utils/modelDisplay.d.ts +1 -0
  383. package/dist/types/utils/modelEncoding.d.ts +15 -0
  384. package/dist/types/utils/modelSwitchMessages.d.ts +4 -0
  385. package/dist/types/utils/monitorTasks.d.ts +3 -0
  386. package/dist/types/utils/planMode.d.ts +5 -0
  387. package/dist/types/utils/promptAdmission.d.ts +1 -0
  388. package/dist/types/utils/queueDrain.d.ts +21 -0
  389. package/dist/types/utils/remote-name-skeleton.d.ts +1 -0
  390. package/dist/types/utils/sentinelMessage.d.ts +4 -0
  391. package/dist/types/utils/sessionErrors.d.ts +2 -0
  392. package/dist/types/utils/sessionPath.d.ts +19 -0
  393. package/dist/types/utils/sessionPreparation.d.ts +77 -0
  394. package/dist/types/utils/slash-command-action.d.ts +3 -0
  395. package/dist/types/utils/slashSectionPlan.d.ts +26 -0
  396. package/dist/types/utils/splitUrl.d.ts +37 -0
  397. package/dist/types/utils/standalone-session-routing.d.ts +2 -0
  398. package/dist/types/utils/systemInfo.d.ts +26 -0
  399. package/dist/types/utils/taskActivity.d.ts +18 -0
  400. package/dist/types/utils/timeAgo.d.ts +10 -0
  401. package/dist/types/utils/todos.d.ts +165 -0
  402. package/dist/types/utils/unicodeConfusables.d.ts +1 -0
  403. package/dist/types/utils/unifiedDiff.d.ts +12 -0
  404. package/dist/types/utils/workflowTasks.d.ts +3 -0
  405. package/dist/types/utils/workspace.d.ts +34 -0
  406. package/dist/types/utils/workspaceColor.d.ts +15 -0
  407. package/dist/types/voice/VoiceButton.d.ts +16 -0
  408. package/dist/types/voice/use-voice-workspace-settings.d.ts +13 -0
  409. package/dist/types/voice/useVoiceCapture.d.ts +42 -0
  410. package/dist/types/voice/voice-workspace-target.d.ts +45 -0
  411. package/dist/types/voice/voiceModels.d.ts +23 -0
  412. package/dist/types/workflowDetailsContext.d.ts +11 -0
  413. package/package.json +102 -0
@@ -0,0 +1,47 @@
1
+ import type { PromptFile, PromptImage } from '../adapters/promptTypes';
2
+ export type ImageIngestionRejectionReason = 'unavailable' | 'too-large' | 'read-failed';
3
+ export interface ImageIngestionRejection {
4
+ name?: string;
5
+ reason: ImageIngestionRejectionReason;
6
+ }
7
+ export interface ImageFileCandidate {
8
+ file: File;
9
+ mediaType: string;
10
+ }
11
+ export interface AttachmentFileCandidate {
12
+ file: File;
13
+ mediaType: string;
14
+ }
15
+ export interface ExtractedFileTransfer {
16
+ claimed: boolean;
17
+ imageCandidates: ImageFileCandidate[];
18
+ fileCandidates: AttachmentFileCandidate[];
19
+ rejected: ImageIngestionRejection[];
20
+ }
21
+ export interface ImageIngestionBatchResult {
22
+ accepted: PromptImage[];
23
+ rejected: ImageIngestionRejection[];
24
+ }
25
+ export interface FileIngestionBatchResult {
26
+ accepted: PromptFile[];
27
+ rejected: ImageIngestionRejection[];
28
+ }
29
+ interface ReaderLifecycle {
30
+ onReaderCreated?: (reader: FileReader) => void;
31
+ onReaderSettled?: (reader: FileReader) => void;
32
+ maxBytes?: number;
33
+ }
34
+ export declare const MAX_IMAGE_ATTACHMENT_DATA_BYTES: number;
35
+ export declare const MAX_FILE_ATTACHMENT_DATA_BYTES: number;
36
+ export declare function normalizeImageMediaType(mediaType: string, fileName?: string): string | undefined;
37
+ export declare function normalizeTextMediaType(mediaType: string, fileName?: string): string | undefined;
38
+ export declare function sanitizeAttachmentName(name: string): string;
39
+ export declare function dedupeAttachmentName(name: string, taken: ReadonlySet<string>): string;
40
+ export declare function hasFileTransferPayload(dataTransfer: DataTransfer): boolean;
41
+ export declare function extractFiles(files: readonly File[]): ExtractedFileTransfer;
42
+ export declare function extractFileTransfer(dataTransfer: DataTransfer, source: 'paste' | 'drop'): ExtractedFileTransfer;
43
+ export declare function readImageTransfer(imageCandidates: readonly ImageFileCandidate[], lifecycle?: ReaderLifecycle): Promise<ImageIngestionBatchResult>;
44
+ export declare function readFileTransfer(fileCandidates: readonly AttachmentFileCandidate[], options?: {
45
+ maxBytes?: number;
46
+ }): Promise<FileIngestionBatchResult>;
47
+ export {};
@@ -0,0 +1,44 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { PromptFile } from '../adapters/promptTypes';
7
+ /**
8
+ * A paste at or above either threshold is folded into an attachment card
9
+ * instead of being inserted into the editor.
10
+ *
11
+ * The line count keeps the rule legible to a user; the character count keeps it
12
+ * honest, because one minified line can carry megabytes. A fragment left inline
13
+ * stays under the daemon's 16,384-character mid-turn insertion limit — that
14
+ * limit bounds one queued message, so a draft assembled from several sub-
15
+ * threshold pastes or from typing can still exceed it.
16
+ *
17
+ * These thresholds are deliberately larger than the terminal UI's
18
+ * `isLargePaste` thresholds (10 lines / 1,000 characters): the terminal folds
19
+ * into a placeholder inside a single-line prompt, while this folds into an
20
+ * attachment card. Neither consumer can import the other's module, so the two
21
+ * are separate policies by intent, not by oversight.
22
+ */
23
+ export declare const PASTE_FOLD_MIN_LINES = 200;
24
+ export declare const PASTE_FOLD_MIN_CHARS = 8000;
25
+ /** How much of the paste the card shows as its title. */
26
+ export declare const PASTE_TITLE_MAX_CHARS = 24;
27
+ /**
28
+ * Titles a folded card with the beginning of the paste itself, and doubles as
29
+ * the attachment's name: line breaks and runs of whitespace collapse to single
30
+ * spaces, and characters a file name cannot carry become spaces too, so a paste
31
+ * whose first line is one word still yields a title that reads and a name the
32
+ * sanitizer will not rewrite. Falls back to the stem when there is no content.
33
+ */
34
+ export declare function pastedTextTitle(text: string, fallbackName: string): string;
35
+ export declare function countTextLines(text: string): number;
36
+ export declare function shouldFoldPastedText(text: string): boolean;
37
+ /**
38
+ * Builds the card for a folded paste. The name is the card's title with a
39
+ * `.txt` suffix, so the sent message shows what the card showed; the suffix is
40
+ * load-bearing, not cosmetic — the daemon derives a stored attachment's type
41
+ * from its stored name, so a name without it resolves the content as an opaque
42
+ * blob instead of text.
43
+ */
44
+ export declare function createPastedTextFile(text: string, taken: ReadonlySet<string>): PromptFile;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Split plain text into URL and non-URL segments so callers can render the URL
3
+ * parts as anchors. Only explicit `http://` / `https://` URLs match — bare
4
+ * domains and emails are left as text on purpose. The character set is an
5
+ * allowlist of the ASCII URL grammar, so anything else — whitespace, markup
6
+ * delimiters, CJK prose, emoji — terminates the match (`详情见https://a.com即可`
7
+ * splits at the boundary, `https://a.com👍` does not absorb the emoji).
8
+ * Trailing ASCII sentence punctuation, markdown emphasis delimiters (`*`,
9
+ * `_`, `~`), and closing brackets with no matching opener inside the URL are
10
+ * trimmed from it (so `https://en.wikipedia.org/wiki/Foo_(bar)` keeps its `)`
11
+ * while `(see https://example.com/foo)` drops it, and `**https://a.com**`
12
+ * sheds the asterisks). A match that trims down to the bare scheme
13
+ * (`https://`) is not a URL and stays text.
14
+ */
15
+ export interface LinkifySegment {
16
+ type: 'text' | 'url';
17
+ value: string;
18
+ }
19
+ export declare function splitTextByUrls(text: string): LinkifySegment[];
@@ -0,0 +1,47 @@
1
+ import type { PromptImage } from '../adapters/promptTypes';
2
+ /**
3
+ * Single choke point for echoing a local slash command into the transcript.
4
+ *
5
+ * Some local commands "echo": they append a local user message
6
+ * (`store.appendLocalUserMessage`) and render their result inline. If one runs
7
+ * while a turn is streaming, the injected user row acts as a turn boundary in
8
+ * `applyTurnCollapse` (a turn spans one user message up to the next) and splits
9
+ * the active turn into two — its tool/thinking/token counters are then computed
10
+ * per fragment and come out wrong.
11
+ *
12
+ * Routing every echo through this helper means a command can never append to the
13
+ * transcript mid-turn. While a turn is in flight the command is suppressed
14
+ * instead of being added to the daemon pending-prompt queue, because local
15
+ * commands must not be replayed as model-facing prompt text.
16
+ *
17
+ * The only call sites that should bypass this and append mid-stream are the
18
+ * deliberate "busy acknowledgement" paths (e.g. clearing a goal while a turn
19
+ * runs), which opt in by calling `append` directly. Read-only display
20
+ * commands (/stats, /about, /context) go through the same helper but ignore
21
+ * its suppression signal: they skip the echo mid-turn and still run
22
+ * immediately.
23
+ */
24
+ export interface LocalEchoSink {
25
+ /** Append the command as a local user message (renders inline immediately). */
26
+ append: (text: string) => void;
27
+ }
28
+ /**
29
+ * Append a local command's echo, or suppress it if a turn is streaming.
30
+ *
31
+ * @returns `true` if the command was suppressed — the caller must stop and not
32
+ * run its inline side effects. `false` if it was appended and the caller
33
+ * should proceed. Read-only display commands are the deliberate exception:
34
+ * they ignore the signal and run mid-turn anyway (see the module docstring).
35
+ */
36
+ export declare function appendOrDeferLocalUserMessage(isStreaming: boolean, text: string, _images: PromptImage[] | undefined, sink: LocalEchoSink): boolean;
37
+ /**
38
+ * Whether a queued prompt is a slash (`/…`) or shell (`!…`) command rather than
39
+ * model-facing prose.
40
+ *
41
+ * The queue's "insert" action injects the raw text into the running turn via
42
+ * `enqueueMidTurnMessage` — it is NOT re-dispatched as a command, so a command
43
+ * inserted this way reaches the model as the literal string "/context …" and
44
+ * never runs. Callers use this to disable "insert" for command entries that may
45
+ * still exist from daemon/custom command paths or from older sessions.
46
+ */
47
+ export declare function isCommandPrompt(text: string): boolean;
@@ -0,0 +1 @@
1
+ export declare function getModelDisplayName(modelId: string): string;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Encodes a model ID from ACP format (modelId(authType)) to storage format
3
+ * (authType:modelId). Core's resolveVisionModelSelection() expects this format.
4
+ * If the input is not in ACP format, returns it unchanged.
5
+ */
6
+ export declare function encodeVisionModelForSetting(modelId: string): string;
7
+ export declare function extractBareModelId(modelId: string): string;
8
+ /**
9
+ * Decodes a stored model ID from authType:modelId format back to ACP format
10
+ * (modelId(authType)). Used for picker comparison where model IDs are in ACP
11
+ * format. Splits on the first colon — safe for colon-bearing model IDs
12
+ * (e.g., 'openai:gpt-4o:online' → 'gpt-4o:online(openai)').
13
+ * If the input has no colon, returns it unchanged.
14
+ */
15
+ export declare function decodeVisionModelForPicker(storedValue: string): string;
@@ -0,0 +1,4 @@
1
+ import type { Message, SystemMessage } from '../adapters/types';
2
+ export declare function parseModelSwitchStatusModel(content: string): string | null;
3
+ export declare function isModelSwitchSummaryMessage(message: Message): message is SystemMessage;
4
+ export declare function filterModelSwitchMessages(messages: readonly Message[]): Message[];
@@ -0,0 +1,3 @@
1
+ import type { DaemonSessionMonitorTaskStatus, DaemonSessionTaskStatus } from '@qwen-code/sdk/daemon';
2
+ import type { ACPToolCall } from '../adapters/types';
3
+ export declare function findMonitorTaskForTool(tasks: readonly DaemonSessionTaskStatus[], tool: ACPToolCall): DaemonSessionMonitorTaskStatus | undefined;
@@ -0,0 +1,5 @@
1
+ export declare const EXECUTION_APPROVAL_MODES: ("auto" | "default" | "auto-edit" | "yolo")[];
2
+ export declare function parsePlanCommand(args: string, enabled: boolean): {
3
+ enabled: boolean;
4
+ prompt?: string;
5
+ };
@@ -0,0 +1 @@
1
+ export declare function isDefinitelyRejectedPromptAdmission(error: unknown): boolean;
@@ -0,0 +1,21 @@
1
+ export interface QueueDrainGate {
2
+ /** A drain is already in flight this tick. */
3
+ draining: boolean;
4
+ /** Waiting for the previously drained prompt's turn to start. */
5
+ awaitingTurnStart: boolean;
6
+ /** The daemon connection is live. */
7
+ connected: boolean;
8
+ /** A turn is in flight (streamingState !== 'idle'). */
9
+ streaming: boolean;
10
+ /** Some interaction (dialog, catch-up) is blocking input. */
11
+ interactionBlocked: boolean;
12
+ /** A tool approval is pending. */
13
+ pendingApproval: boolean;
14
+ /** Number of prompts currently queued. */
15
+ queueLength: number;
16
+ }
17
+ /**
18
+ * Whether the next queued prompt may be auto-drained into a new turn right now.
19
+ * Every condition must hold; any one being unmet holds the queue.
20
+ */
21
+ export declare function canDrainQueue(gate: QueueDrainGate): boolean;
@@ -0,0 +1 @@
1
+ export declare function remoteNameSkeleton(name: string): string;
@@ -0,0 +1,4 @@
1
+ export declare function createSentinelSerializer<T>(sentinel: string): {
2
+ serialize(data: T): string;
3
+ parse(content: string): T | null;
4
+ };
@@ -0,0 +1,2 @@
1
+ export declare function isSessionDisconnectedError(error: unknown): boolean;
2
+ export declare function isTransientSessionReadError(error: unknown): boolean;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * Build the pathname for a standalone session URL while preserving any base
8
+ * path the app is deployed under (e.g. `/app/session/<id>` stays under
9
+ * `/app` instead of being reset to `/session/<id>`). With no session id,
10
+ * returns the base path (or `/` at the root).
11
+ */
12
+ export declare function buildSessionPathname(currentPathname: string, sessionId: string | undefined): string;
13
+ /**
14
+ * Extract the session id from a standalone pathname. Anchored to the last
15
+ * `/session/<id>` segment so it agrees with `buildSessionPathname`'s greedy
16
+ * writer; a first-match parse would read the literal `session` segment when
17
+ * the base path itself ends in `/session` (e.g. `/app/session/session/<id>`).
18
+ */
19
+ export declare function parseSessionId(pathname: string): string | undefined;
@@ -0,0 +1,77 @@
1
+ import { type DaemonApprovalMode, type DaemonProductSessionContext } from '@qwen-code/web-shell/daemon-react-sdk';
2
+ import type { ReasoningSelection } from '@qwen-code/sdk/daemon';
3
+ type PromptSessionActions = {
4
+ createSession: (options?: {
5
+ workspaceCwd?: string;
6
+ sessionContext?: DaemonProductSessionContext;
7
+ modelServiceId?: string;
8
+ approvalMode?: DaemonApprovalMode;
9
+ sourceType?: string;
10
+ worktree?: {
11
+ slug?: string;
12
+ };
13
+ branch?: {
14
+ name: string;
15
+ };
16
+ }) => Promise<{
17
+ sessionId: string;
18
+ worktree?: {
19
+ slug: string;
20
+ path: string;
21
+ branch: string;
22
+ };
23
+ branch?: {
24
+ name: string;
25
+ baseBranch: string;
26
+ };
27
+ modelApplied?: boolean;
28
+ }>;
29
+ attachSession: () => Promise<void>;
30
+ clearSession: () => Promise<void>;
31
+ releaseSession: (sessionId: string) => Promise<void>;
32
+ setApprovalMode?: (mode: DaemonApprovalMode, opts?: {
33
+ planMode?: boolean;
34
+ }) => Promise<{
35
+ mode: string;
36
+ }>;
37
+ setModel: (modelId: string) => Promise<unknown>;
38
+ setReasoningEffort: (value: ReasoningSelection, opts?: {
39
+ persist?: boolean;
40
+ }) => Promise<void>;
41
+ };
42
+ export declare function isDaemonApprovalMode(mode: string): mode is DaemonApprovalMode;
43
+ export declare function createAndAttachSessionForPrompt({ sessionActions, modelId, reasoningEffort, modeId, planMode, workspaceCwd, sessionContext, worktree, branch, sessionSourceType, onSessionCreated, onSessionAllocated, getCurrentSessionId, warn, }: {
44
+ sessionActions: PromptSessionActions;
45
+ modelId?: string;
46
+ reasoningEffort?: ReasoningSelection;
47
+ modeId?: string;
48
+ planMode?: boolean;
49
+ workspaceCwd?: string;
50
+ sessionContext?: DaemonProductSessionContext;
51
+ worktree?: {
52
+ slug?: string;
53
+ };
54
+ branch?: {
55
+ name: string;
56
+ };
57
+ /**
58
+ * Creator attribution recorded on the session. Embedded hosts pass their own
59
+ * value so their sessions stay distinguishable from browser Web Shell ones.
60
+ */
61
+ sessionSourceType?: string;
62
+ onSessionCreated?: (sessionId: string) => Promise<void> | void;
63
+ onSessionAllocated?: (sessionId: string) => void;
64
+ getCurrentSessionId: () => string | undefined;
65
+ warn?: (message?: unknown, ...optionalParams: unknown[]) => void;
66
+ }): Promise<{
67
+ worktree?: {
68
+ slug: string;
69
+ path: string;
70
+ branch: string;
71
+ };
72
+ branch?: {
73
+ name: string;
74
+ baseBranch: string;
75
+ };
76
+ }>;
77
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { WebShellSlashCommandHandler } from '../App';
2
+ export declare const SLASH_COMMAND_PATTERN: RegExp;
3
+ export declare function invokeSlashCommandHandler(input: string, handler: WebShellSlashCommandHandler | undefined, reportError: (error: unknown, fallback: string) => void): boolean;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /** Per-row rendering plan for the slash command panel's section grouping. */
7
+ export interface SlashSectionRowPlan {
8
+ /** Render the category header above this row (group boundary). */
9
+ showHeader: boolean;
10
+ /** Render the divider above the header (every boundary except the first row). */
11
+ showDivider: boolean;
12
+ /** Number of rows in this row's section; 0 when no header is shown. */
13
+ count: number;
14
+ }
15
+ /**
16
+ * Decide, for each item, whether it starts a new section (and so needs a header,
17
+ * a divider, and the group count). Extracted as a pure function so the section
18
+ * boundary logic — headers at group boundaries, a header but no divider on the
19
+ * first row, and no redundant headers for adjacent duplicate sections — is unit
20
+ * testable without rendering the panel.
21
+ *
22
+ * Only 'command' menus are grouped; subcommand menus render flat (no headers).
23
+ */
24
+ export declare function planSlashSectionRows(items: ReadonlyArray<{
25
+ section?: string;
26
+ }>, kind: 'command' | 'subcommand'): SlashSectionRowPlan[];
@@ -0,0 +1,37 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * Max sessions shown side by side in the split view. Each pane is a full
8
+ * session (its own SSE + transcript), so this bounds live connections and keeps
9
+ * panes readable. Shared so the overview caps a selection to the same limit
10
+ * before it ever builds a `?split=` URL or opens the in-window split.
11
+ */
12
+ export declare const MAX_SPLIT_PANES = 6;
13
+ /**
14
+ * Build an absolute URL that opens the app straight into the split view for the
15
+ * given sessions. Derived from the current location so it inherits the origin
16
+ * and any `?daemon=`/`?token=` query a dev deployment relies on; the trailing
17
+ * `/session/<id>` deep-link is stripped while preserving any deployment base
18
+ * path, so no single session competes with the split.
19
+ */
20
+ export declare function buildSplitUrl(sessionIds: string[], currentHref: string, token?: string): string;
21
+ /** Read the session ids from a `?split=a,b,c` query string (empty when absent). */
22
+ export declare function parseSplitSessionIds(search: string): string[];
23
+ /**
24
+ * Persist the in-window split's session set so a refresh restores it. Uses
25
+ * `sessionStorage` (not `localStorage`) on purpose: it is scoped per browser
26
+ * tab, so a split opened in its own tab (via {@link buildSplitUrl}) and the
27
+ * in-window split never clobber each other, and a fresh unrelated tab restores
28
+ * nothing. It still survives a refresh of the same tab — the case this fixes.
29
+ */
30
+ export declare function saveSplitSessions(sessions: readonly string[]): void;
31
+ /**
32
+ * The persisted split session set, or `[]` when absent/unavailable/malformed —
33
+ * and when it was saved for a different daemon target than the live one.
34
+ */
35
+ export declare function loadSplitSessions(): string[];
36
+ /** Forget the persisted split (e.g. when the user leaves the split view). */
37
+ export declare function clearSplitSessions(): void;
@@ -0,0 +1,2 @@
1
+ import { type DaemonClient, type DaemonCapabilities } from '@qwen-code/sdk/daemon';
2
+ export declare function keepWorkspaceSplitSessionIds(client: DaemonClient, capabilities: DaemonCapabilities | undefined, sessionIds: readonly string[]): Promise<string[]>;
@@ -0,0 +1,26 @@
1
+ interface PreflightCell {
2
+ kind: string;
3
+ detail?: Record<string, unknown>;
4
+ }
5
+ interface EnvCell {
6
+ kind: string;
7
+ name: string;
8
+ present?: boolean;
9
+ value?: string;
10
+ }
11
+ export interface SystemInfo {
12
+ nodeVersion: string;
13
+ npmVersion: string;
14
+ authSource: string;
15
+ platform: string;
16
+ arch: string;
17
+ sandbox: string;
18
+ proxy: string;
19
+ memoryUsage: string;
20
+ }
21
+ export declare function collectSystemInfo(preflight: {
22
+ cells: PreflightCell[];
23
+ } | null, env: {
24
+ cells: EnvCell[];
25
+ } | null): SystemInfo;
26
+ export {};
@@ -0,0 +1,18 @@
1
+ import type { Message } from '../adapters/types';
2
+ /**
3
+ * Change-detection key only. `callId` is unconstrained text, so the
4
+ * rendering is not injective and the key must never be parsed back —
5
+ * ask {@link hasActiveTaskActivity} for the activity fact instead.
6
+ */
7
+ export declare function getTaskActivityKey(messages: readonly Message[]): string;
8
+ /**
9
+ * Whether any background task tool call is still running.
10
+ *
11
+ * Derived from the same walk as the key rather than by re-parsing it: a
12
+ * callId containing `:in_progress|` renders a key that any such regex
13
+ * reads as active, which pins both polling stop conditions open for the
14
+ * life of the view.
15
+ */
16
+ export declare function hasActiveTaskActivity(messages: readonly Message[], options?: {
17
+ workflowsEnabled?: boolean;
18
+ }): boolean;
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2026 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * Format an epoch-seconds timestamp as a localized relative time
8
+ * ("3 hours ago"). `now` is also epoch seconds.
9
+ */
10
+ export declare function timeAgo(timestamp: number, now: number, language: string): string;
@@ -0,0 +1,165 @@
1
+ import type { ACPToolCall, Message, PermissionRequest, TodoItem } from '../adapters/types.js';
2
+ /**
3
+ * The todo tool is registered as `todo_write` on the wire, but older paths and
4
+ * the ACP plan bridge use `todowrite`. Match both so detection never hinges on
5
+ * the (unrelated) tool `kind`, which is `think` for this tool.
6
+ */
7
+ export declare function isTodoWriteToolName(name: string): boolean;
8
+ /**
9
+ * The full exit-plan approval rule: the switch_mode frame kind plus the
10
+ * exit_plan_mode wire name. Shared by App, ChatPane, and ToolApproval so the
11
+ * surfaces that gate the revision-bound approval UI never drift.
12
+ */
13
+ export declare function isExitPlanApprovalRequest(request: Pick<PermissionRequest, 'toolKind' | 'toolName'> | null | undefined): boolean;
14
+ export declare function parseTodoItemsFromEntries(entries: readonly unknown[]): TodoItem[];
15
+ export declare function extractTodosFromToolCall(tool: ACPToolCall): TodoItem[] | undefined;
16
+ export declare function hasActiveTodos(todos: readonly TodoItem[]): boolean;
17
+ export declare function getTodoStatusIcon(status: TodoItem['status']): string;
18
+ export interface FloatingTodosState {
19
+ todos: TodoItem[];
20
+ planId: string | null;
21
+ /** Every item is completed — the panel shows a transient "all done" state. */
22
+ allCompleted: boolean;
23
+ /** Transcript message the latest todo update came from. */
24
+ sourceMessageId: string | null;
25
+ }
26
+ export declare function getFloatingTodos(messages: readonly Message[]): FloatingTodosState;
27
+ export declare function getSessionWorkflowTodos(messages: readonly Message[]): FloatingTodosState;
28
+ export declare function getActiveTodosForPlanRevision(messages: readonly Message[], revision: {
29
+ planId: string;
30
+ sourceCallId: string;
31
+ } | null | undefined): TodoItem[];
32
+ export declare function getAgentToolsForPlan(messages: readonly Message[], plan: Pick<FloatingTodosState, 'planId' | 'sourceMessageId'>): ACPToolCall[];
33
+ /** A status transition surfaced for a single todo snapshot. */
34
+ export interface TodoEvent {
35
+ kind: 'started' | 'completed';
36
+ id: string;
37
+ content: string;
38
+ }
39
+ /** What changed in one todo snapshot relative to the conversation so far. */
40
+ export interface TodoSnapshotDiff {
41
+ events: TodoEvent[];
42
+ }
43
+ /**
44
+ * Identity used to track an item across snapshots. Folds content into the key
45
+ * because todo ids are NOT globally unique. Modern Qwen plan metadata preserves
46
+ * the core id, but legacy ACP records fall back to positional ids (`plan-0`,
47
+ * `plan-1`, …), and models commonly restart numbering at `1, 2, 3` for a new
48
+ * `todo_write` plan. Keying on id alone would diff a new plan's items against a
49
+ * previous plan's stale terminal status; id+content keeps distinct tasks
50
+ * separate and, unlike a user-turn reset, still tracks a list correctly when it
51
+ * spans turns (a "continue" turn that completes an item carried over from
52
+ * before).
53
+ *
54
+ * Two rare cases this trades for, affecting the collapsed diff and the per-task
55
+ * detail ({@link computeTodoDetails}) but not the expanded list itself:
56
+ * - A todo reworded on a stable id reads as a new task. Reworded while still
57
+ * `in_progress` it emits a spurious `started`; reworded straight to
58
+ * `completed` (`1 "Write report"` → `1 "Write the final report" completed`)
59
+ * the completion is treated as first-seen and dropped.
60
+ * - Two unrelated plans that reuse both the id AND the exact content (a generic
61
+ * recurring todo like `"Run tests"`) still collide. computeTodoDetails resets
62
+ * a task's window when a completed key restarts as `in_progress`, so the
63
+ * common reuse keeps correct numbers; a reused id+content that goes *straight*
64
+ * to `completed` (never observed `in_progress`) still shares the earlier
65
+ * task's detail slot.
66
+ */
67
+ export declare function todoStateKey(todo: TodoItem): string;
68
+ /**
69
+ * Walk the todo snapshots in order and, for each one, derive what changed
70
+ * relative to the running state: which items just started and which just
71
+ * completed.
72
+ *
73
+ * Keyed by snapshot id (tool callId or plan message id) so a history row can
74
+ * look up its own diff. Only transitions actually witnessed produce events — an
75
+ * item first seen already completed (e.g. a restored session's opening
76
+ * snapshot) is recorded silently so its old completion is not replayed as if it
77
+ * just happened.
78
+ */
79
+ export declare function computeTodoTimeline(messages: readonly Message[]): Map<string, TodoSnapshotDiff>;
80
+ /**
81
+ * A cheap signature of the todo snapshots in a transcript: each snapshot's key
82
+ * plus its items' id, status, and content. App memoizes the timeline on this so
83
+ * the context provider value stays referentially stable across unrelated
84
+ * streaming ticks (which would otherwise re-render every todo/plan row that
85
+ * consumes the timeline).
86
+ */
87
+ export declare function todoTimelineSignature(messages: readonly Message[]): string;
88
+ /**
89
+ * Like {@link todoTimelineSignature} but folds in everything
90
+ * {@link computeTodoDetails} reads beyond item status: each snapshot's boundary
91
+ * timestamp and stamped stats, plus every tool span (non-todo spans feed tool
92
+ * time; todo spans supply snapshot boundaries). App memoizes the detail map on
93
+ * this so the TodoDetailContext value stays referentially stable across
94
+ * streaming ticks that touch none of it.
95
+ */
96
+ export declare function todoDetailSignature(messages: readonly Message[]): string;
97
+ export interface TodoWindow {
98
+ start: number;
99
+ end: number;
100
+ }
101
+ /**
102
+ * Natural-order window of up to maxVisible items anchored on the current
103
+ * item (first in_progress, else first pending): one item of completed
104
+ * context above the anchor, the rest of the budget below it.
105
+ */
106
+ export declare function getTodoWindow(todos: readonly TodoItem[], maxVisible: number): TodoWindow;
107
+ /**
108
+ * Cumulative-usage baseline the agent stamps onto each todo update
109
+ * (`_meta.stats`, surfaced via the tool call's rawOutput). The web-shell diffs
110
+ * consecutive snapshots to attribute a task's spend. `apiTimeMs` only advances
111
+ * live — replayed sessions carry tokens but not per-turn durations.
112
+ */
113
+ export interface TodoStatsSnapshot {
114
+ promptTokens: number;
115
+ cachedTokens: number;
116
+ candidateTokens: number;
117
+ apiTimeMs: number;
118
+ }
119
+ /**
120
+ * Read the cumulative-usage snapshot the agent stamped onto a todo_write tool
121
+ * call's rawOutput. Absent for snapshots emitted by an agent that predates the
122
+ * stamping, or non-tool todo sources (plain plan messages).
123
+ */
124
+ export declare function extractTodoStats(tool: ACPToolCall): TodoStatsSnapshot | undefined;
125
+ /**
126
+ * Resource usage consumed during a single todo's [start, end] window. Every
127
+ * field is optional: tokens/API time come from the snapshot diff (absent on
128
+ * sessions whose agent didn't stamp snapshots; API time is also absent on
129
+ * replay), while tool time comes from transcript tool durations and is shown
130
+ * whenever any tool ran in the window.
131
+ */
132
+ export interface TodoResources {
133
+ inputTokens?: number;
134
+ cachedTokens?: number;
135
+ outputTokens?: number;
136
+ apiTimeMs?: number;
137
+ toolTimeMs?: number;
138
+ }
139
+ /** Per-todo timing and resource breakdown. */
140
+ export interface TodoDetail {
141
+ /** Wall-clock ms when the item first became in_progress. */
142
+ startTs?: number;
143
+ /** Wall-clock ms when the item became completed. */
144
+ endTs?: number;
145
+ /**
146
+ * Tokens and time spent while this item was the active task. Tokens and API
147
+ * time come from diffing the cumulative-usage snapshots stamped on its start
148
+ * and end todo boundaries; tool time is summed from the transcript's tool
149
+ * durations in the window. Undefined when nothing could be measured.
150
+ */
151
+ resources?: TodoResources;
152
+ }
153
+ /**
154
+ * Per-todo detail keyed by {@link todoStateKey}: when each item started and
155
+ * completed, plus the resources spent in that window.
156
+ *
157
+ * Mirrors {@link computeTodoTimeline}'s state machine — a todo's start is its
158
+ * first in_progress transition and its end the completed transition — but
159
+ * records timestamps, the snapshot diff (tokens + API time) between the start
160
+ * and end boundaries, and the transcript tool time in the window. An item first
161
+ * seen already completed (a restored opening snapshot) yields no detail, exactly
162
+ * as it produces no timeline event.
163
+ */
164
+ export declare function computeTodoDetails(messages: readonly Message[]): Map<string, TodoDetail>;
165
+ export declare function getTodoPlanId(tool: ACPToolCall): string | null;
@@ -0,0 +1 @@
1
+ export declare const CONFUSABLE_PROTOTYPES: ReadonlyMap<string, string>;
@@ -0,0 +1,12 @@
1
+ interface UnifiedDiffLine {
2
+ type: 'add' | 'del' | 'context' | 'header';
3
+ content: string;
4
+ oldLine?: number;
5
+ newLine?: number;
6
+ }
7
+ export declare function parseUnifiedDiff(diff: string): {
8
+ lines: UnifiedDiffLine[];
9
+ additions: number;
10
+ deletions: number;
11
+ };
12
+ export {};
@@ -0,0 +1,3 @@
1
+ import type { DaemonSessionTaskWithWorkflowStatus, DaemonSessionWorkflowTaskStatus } from '@qwen-code/sdk/daemon';
2
+ import type { ACPToolCall } from '../adapters/types';
3
+ export declare function findWorkflowTaskForTool(tasks: readonly DaemonSessionTaskWithWorkflowStatus[], tool: ACPToolCall): DaemonSessionWorkflowTaskStatus | undefined;