@vetta-org/theme-ui 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (406) hide show
  1. package/package.json +195 -0
  2. package/src/action-approval/AppearanceActionPickerView.tsx +291 -0
  3. package/src/action-approval/AppearanceApprovalDrawerView.tsx +69 -0
  4. package/src/action-approval/AppearancePickerApprovalView.tsx +31 -0
  5. package/src/action-approval/ApprovalParts.tsx +376 -0
  6. package/src/action-approval/BatchTasksApprovalFrameView.tsx +138 -0
  7. package/src/action-approval/BatchTasksExecutionApprovalView.tsx +158 -0
  8. package/src/action-approval/BatchTasksTaskApprovalView.tsx +152 -0
  9. package/src/action-approval/GeneralSetExecutionModeApprovalView.tsx +76 -0
  10. package/src/action-approval/GenericActionApprovalView.tsx +127 -0
  11. package/src/action-approval/ManageActionApprovalFrameTypes.ts +27 -0
  12. package/src/action-approval/ManageActionApprovalFrameView.tsx +136 -0
  13. package/src/action-approval/NavigationOpenApprovalView.tsx +119 -0
  14. package/src/action-approval/SchedulerActionApprovalDialogView.tsx +191 -0
  15. package/src/action-approval/SchedulerEditApprovalDrawerView.tsx +113 -0
  16. package/src/action-approval/SchedulerUpdateApprovalView.tsx +14 -0
  17. package/src/action-approval/ThemeChangeApprovalView.tsx +30 -0
  18. package/src/action-approval/WebhookDeleteApprovalView.tsx +56 -0
  19. package/src/action-approval/WebhookTestApprovalView.tsx +51 -0
  20. package/src/action-approval/cn.ts +4 -0
  21. package/src/action-approval/index.ts +88 -0
  22. package/src/activity/ActivityPanel.tsx +269 -0
  23. package/src/activity/ActivityPanelFrame.tsx +36 -0
  24. package/src/activity/BackgroundTasksTabPanelView.tsx +382 -0
  25. package/src/activity/BatchProgressTabPanelView.tsx +22 -0
  26. package/src/activity/BrowserPanelView.tsx +169 -0
  27. package/src/activity/ChatTabPanelView.tsx +36 -0
  28. package/src/activity/CodePreview.tsx +57 -0
  29. package/src/activity/DebugTabPanelView.tsx +67 -0
  30. package/src/activity/FileTabContentView.tsx +46 -0
  31. package/src/activity/FloatingActivityTabView.tsx +107 -0
  32. package/src/activity/HtmlPreviewView.tsx +135 -0
  33. package/src/activity/JourneyPanelView.tsx +327 -0
  34. package/src/activity/KnowledgeHistoryPanelView.tsx +93 -0
  35. package/src/activity/MarkdownPreviewView.tsx +217 -0
  36. package/src/activity/PluginTabPickerView.tsx +182 -0
  37. package/src/activity/RequestHistorySubTabView.tsx +102 -0
  38. package/src/activity/ScheduleExecutionTabPanelView.tsx +162 -0
  39. package/src/activity/TodoTabPanelView.tsx +66 -0
  40. package/src/activity/ToolCallsSubTabView.tsx +184 -0
  41. package/src/activity/WorkflowTabPanelView.tsx +129 -0
  42. package/src/activity/index.ts +110 -0
  43. package/src/app/AppBackground.tsx +24 -0
  44. package/src/app/AppBootLoadingView.tsx +51 -0
  45. package/src/app/RouteContentLoadingView.tsx +20 -0
  46. package/src/app/index.ts +13 -0
  47. package/src/app-boot.ts +1 -0
  48. package/src/app-shell/DefaultPageHeader.tsx +46 -0
  49. package/src/app-shell/DefaultWindowControls.tsx +32 -0
  50. package/src/app-shell/PageHeaderActionGroup.tsx +15 -0
  51. package/src/app-shell/PageHeaderContent.tsx +70 -0
  52. package/src/app-shell/PageHeaderFrame.tsx +53 -0
  53. package/src/app-shell/PageHeaderSidebarTrigger.tsx +21 -0
  54. package/src/app-shell/PageHeaderTitle.tsx +25 -0
  55. package/src/app-shell/PageHeaderWindowActions.tsx +22 -0
  56. package/src/app-shell/WindowControlButton.tsx +35 -0
  57. package/src/app-shell/index.ts +49 -0
  58. package/src/appearance/BackgroundImageFrame.tsx +57 -0
  59. package/src/appearance/CenterSliceImageFrame.tsx +64 -0
  60. package/src/appearance/CornerImageFrame.tsx +63 -0
  61. package/src/appearance/HorizontalSliceImageFrame.tsx +97 -0
  62. package/src/appearance/NineSliceImageFrame.tsx +65 -0
  63. package/src/appearance/ThemeSurface.tsx +91 -0
  64. package/src/appearance/index.ts +12 -0
  65. package/src/batch-tasks/BatchProjectArtifactFieldView.tsx +36 -0
  66. package/src/batch-tasks/BatchProjectDialogView.tsx +61 -0
  67. package/src/batch-tasks/BatchProjectFoldersFieldView.tsx +108 -0
  68. package/src/batch-tasks/BatchProjectGroupView.tsx +77 -0
  69. package/src/batch-tasks/BatchProjectNameFieldView.tsx +29 -0
  70. package/src/batch-tasks/BatchProjectNotificationFieldView.tsx +42 -0
  71. package/src/batch-tasks/BatchProjectRuntimeFieldsView.tsx +67 -0
  72. package/src/batch-tasks/BatchTaskActionButtonsView.tsx +67 -0
  73. package/src/batch-tasks/BatchTaskCardView.tsx +142 -0
  74. package/src/batch-tasks/BatchTaskGridView.tsx +95 -0
  75. package/src/batch-tasks/BatchTaskListView.tsx +10 -0
  76. package/src/batch-tasks/BatchTaskProjectActionsView.tsx +73 -0
  77. package/src/batch-tasks/BatchTaskProjectBlockView.tsx +117 -0
  78. package/src/batch-tasks/BatchTaskProjectHeaderView.tsx +74 -0
  79. package/src/batch-tasks/BatchTasksPageView.tsx +126 -0
  80. package/src/batch-tasks/batchTaskUi.tsx +101 -0
  81. package/src/batch-tasks/index.ts +70 -0
  82. package/src/batch-tasks/types.ts +120 -0
  83. package/src/chat/ActionButtonBarView.tsx +45 -0
  84. package/src/chat/AgentAvatarView.tsx +59 -0
  85. package/src/chat/AppshotCardView.tsx +89 -0
  86. package/src/chat/AskUserQuestionView.tsx +177 -0
  87. package/src/chat/AssistantMessageView.tsx +147 -0
  88. package/src/chat/AtPanelView.tsx +220 -0
  89. package/src/chat/BackgroundTasksBadgeView.tsx +28 -0
  90. package/src/chat/BashTerminalCard.tsx +225 -0
  91. package/src/chat/ChatExportHostView.tsx +17 -0
  92. package/src/chat/ChatHeaderActionsView.tsx +75 -0
  93. package/src/chat/ContextRingView.tsx +100 -0
  94. package/src/chat/CopyIconButton.tsx +61 -0
  95. package/src/chat/DefaultGuidingWords.tsx +75 -0
  96. package/src/chat/DefaultSceneCarousel.tsx +113 -0
  97. package/src/chat/DefaultSkillBadgeRow.tsx +103 -0
  98. package/src/chat/DrawerCard.tsx +149 -0
  99. package/src/chat/EditDiffView.tsx +137 -0
  100. package/src/chat/ExecutionModeSelectorView.tsx +124 -0
  101. package/src/chat/ExportMessageListView.tsx +20 -0
  102. package/src/chat/GuideBadgeSwiperView.tsx +79 -0
  103. package/src/chat/InlineTokenChip.tsx +68 -0
  104. package/src/chat/InputActionBarView.tsx +112 -0
  105. package/src/chat/InputBarBackground.tsx +25 -0
  106. package/src/chat/InputBarCapsule.tsx +56 -0
  107. package/src/chat/InputBarContextMenuView.tsx +79 -0
  108. package/src/chat/InputBarPlaceholder.tsx +84 -0
  109. package/src/chat/InputBarToolbarButton.tsx +42 -0
  110. package/src/chat/KnowledgeToolViews.tsx +119 -0
  111. package/src/chat/LiveThinkingView.tsx +102 -0
  112. package/src/chat/MessageActions.tsx +109 -0
  113. package/src/chat/MessageBlockSegmentsView.tsx +203 -0
  114. package/src/chat/MessageBoundaryViews.tsx +93 -0
  115. package/src/chat/MessageCardsView.tsx +126 -0
  116. package/src/chat/MessageFeedContext.tsx +14 -0
  117. package/src/chat/MessageFeedLayoutView.tsx +97 -0
  118. package/src/chat/MessageFeedView.tsx +228 -0
  119. package/src/chat/MessageInputView.tsx +193 -0
  120. package/src/chat/MessageLayoutView.tsx +156 -0
  121. package/src/chat/MessageListFooterView.tsx +127 -0
  122. package/src/chat/MessageSelectionContextMenuView.tsx +66 -0
  123. package/src/chat/MessageTimelineView.tsx +261 -0
  124. package/src/chat/MessageView.tsx +82 -0
  125. package/src/chat/MessageVisualView.tsx +43 -0
  126. package/src/chat/ModelSelectorView.tsx +407 -0
  127. package/src/chat/NewSession.ts +107 -0
  128. package/src/chat/NewSessionBackground.tsx +54 -0
  129. package/src/chat/NewSessionPageLayoutView.tsx +96 -0
  130. package/src/chat/NewSessionPicker.tsx +270 -0
  131. package/src/chat/ProgressGroupView.tsx +323 -0
  132. package/src/chat/ProjectSelectorView.tsx +253 -0
  133. package/src/chat/QueueCardView.tsx +151 -0
  134. package/src/chat/ReadImageView.tsx +73 -0
  135. package/src/chat/SandboxGrantsBadgeView.tsx +101 -0
  136. package/src/chat/SandboxPermissionCard.tsx +64 -0
  137. package/src/chat/SceneCard.tsx +138 -0
  138. package/src/chat/SendButton.tsx +135 -0
  139. package/src/chat/SessionDropZoneView.tsx +85 -0
  140. package/src/chat/SessionViewerPageView.tsx +56 -0
  141. package/src/chat/SkillCard.tsx +56 -0
  142. package/src/chat/SkillPromptAreaView.tsx +129 -0
  143. package/src/chat/SuggestionBubblesView.tsx +58 -0
  144. package/src/chat/TextBlockView.tsx +770 -0
  145. package/src/chat/TextPreview.tsx +37 -0
  146. package/src/chat/ThinkingBlockView.tsx +183 -0
  147. package/src/chat/TodoCard.tsx +243 -0
  148. package/src/chat/TodoProgress.tsx +205 -0
  149. package/src/chat/TodoStatusBarView.tsx +140 -0
  150. package/src/chat/ToolCallBlockView.tsx +188 -0
  151. package/src/chat/UsageBarView.tsx +19 -0
  152. package/src/chat/UserMessageContextMenuView.tsx +87 -0
  153. package/src/chat/UserMessageView.tsx +241 -0
  154. package/src/chat/WorkflowFooterItemsView.tsx +170 -0
  155. package/src/chat/WriteContentView.tsx +12 -0
  156. package/src/chat/index.ts +524 -0
  157. package/src/chat/markdown-link.test.ts +238 -0
  158. package/src/chat/markdown-link.ts +279 -0
  159. package/src/chat/send-button.css +318 -0
  160. package/src/chat/useHorizontalDragScroll.ts +146 -0
  161. package/src/file-explorer/ConfirmDeleteDialogView.tsx +62 -0
  162. package/src/file-explorer/FileContextMenuView.tsx +209 -0
  163. package/src/file-explorer/FileTreeCreateRow.tsx +82 -0
  164. package/src/file-explorer/FileTreeNodeView.tsx +274 -0
  165. package/src/file-explorer/FileTreeView.tsx +301 -0
  166. package/src/file-explorer/FilesPanelView.tsx +91 -0
  167. package/src/file-explorer/drag-target.test.ts +34 -0
  168. package/src/file-explorer/drag-target.ts +26 -0
  169. package/src/file-explorer/fileIcons.ts +1 -0
  170. package/src/file-explorer/index.ts +28 -0
  171. package/src/file-explorer/nativeFileDrag.test.ts +30 -0
  172. package/src/file-explorer/nativeFileDrag.ts +14 -0
  173. package/src/file-explorer/types.ts +40 -0
  174. package/src/file-explorer/useFileTreeMarqueeSelection.ts +115 -0
  175. package/src/file-preview/FilePreviewDialogView.tsx +241 -0
  176. package/src/file-preview/FilePreviewView.tsx +162 -0
  177. package/src/file-preview/LightboxImageView.tsx +131 -0
  178. package/src/file-preview/PluginFilePreviewView.tsx +24 -0
  179. package/src/file-preview/PreviewBodyView.tsx +99 -0
  180. package/src/file-preview/PreviewErrorBoundary.tsx +51 -0
  181. package/src/file-preview/TextCodeEditorView.tsx +72 -0
  182. package/src/file-preview/TextFileEditorView.tsx +213 -0
  183. package/src/file-preview/index.ts +56 -0
  184. package/src/file-preview/keyboard-target.test.ts +49 -0
  185. package/src/file-preview/keyboard-target.ts +33 -0
  186. package/src/file-preview/syntax-tokens.css +77 -0
  187. package/src/file-preview/syntax-tokens.test.ts +31 -0
  188. package/src/file-preview/syntax-tokens.ts +155 -0
  189. package/src/file-preview/text-code-editor-theme.ts +321 -0
  190. package/src/file-preview/text-editor-language.test.ts +58 -0
  191. package/src/file-preview/text-editor-language.ts +182 -0
  192. package/src/file-preview/types.ts +29 -0
  193. package/src/flowing/FlowingPanelView.tsx +79 -0
  194. package/src/flowing/FlowingWorkflowView.tsx +54 -0
  195. package/src/flowing/UserNodeView.tsx +148 -0
  196. package/src/flowing/WorkflowBindDialogView.tsx +145 -0
  197. package/src/flowing/WorkflowProgressView.tsx +149 -0
  198. package/src/flowing/index.ts +27 -0
  199. package/src/flowing-chat/ChatBubbleView.tsx +219 -0
  200. package/src/flowing-chat/ChatComposerView.tsx +362 -0
  201. package/src/flowing-chat/ChatMembersBarView.tsx +86 -0
  202. package/src/flowing-chat/ChatPanelView.tsx +73 -0
  203. package/src/flowing-chat/index.ts +21 -0
  204. package/src/index.ts +22 -0
  205. package/src/knowledge/KnowledgeBaseSwitcherView.tsx +154 -0
  206. package/src/knowledge/KnowledgeBreadcrumbView.tsx +92 -0
  207. package/src/knowledge/KnowledgeContentsPanelView.tsx +77 -0
  208. package/src/knowledge/KnowledgeContextMenuView.tsx +70 -0
  209. package/src/knowledge/KnowledgeFilesSkeleton.tsx +22 -0
  210. package/src/knowledge/KnowledgeGridView.tsx +113 -0
  211. package/src/knowledge/KnowledgeHowItWorksDialogView.tsx +85 -0
  212. package/src/knowledge/KnowledgeImportDialogView.tsx +153 -0
  213. package/src/knowledge/KnowledgeListView.tsx +107 -0
  214. package/src/knowledge/KnowledgePendingFilesDialogView.tsx +76 -0
  215. package/src/knowledge/KnowledgeProcessingBadgeView.tsx +18 -0
  216. package/src/knowledge/KnowledgeRenameDialogView.tsx +66 -0
  217. package/src/knowledge/KnowledgeSourcePickerView.tsx +60 -0
  218. package/src/knowledge/KnowledgeViewShared.tsx +103 -0
  219. package/src/knowledge/cn.ts +4 -0
  220. package/src/knowledge/coloredFileIcons.ts +1 -0
  221. package/src/knowledge/index.ts +66 -0
  222. package/src/knowledge/types.ts +31 -0
  223. package/src/knowledge/useMarqueeSelection.ts +95 -0
  224. package/src/layout/AppFrame.tsx +34 -0
  225. package/src/layout/MainContentFrame.tsx +54 -0
  226. package/src/layout/ResizeHandle.tsx +91 -0
  227. package/src/layout/SidebarDock.tsx +33 -0
  228. package/src/layout/SidebarOverlay.tsx +36 -0
  229. package/src/layout/index.ts +10 -0
  230. package/src/overlays/CommandMenuRow.tsx +119 -0
  231. package/src/overlays/CommandMenuView.tsx +183 -0
  232. package/src/overlays/ConfirmDialogView.tsx +109 -0
  233. package/src/overlays/DetailDrawer.tsx +63 -0
  234. package/src/overlays/DetailDrawerEnter.tsx +37 -0
  235. package/src/overlays/KnowledgeDropOverlayView.tsx +43 -0
  236. package/src/overlays/RouteErrorPageView.tsx +72 -0
  237. package/src/overlays/ToasterView.tsx +76 -0
  238. package/src/overlays/UpdateCheckerView.tsx +206 -0
  239. package/src/overlays/UpdateRestartDialogView.tsx +107 -0
  240. package/src/overlays/command-menu-types.ts +47 -0
  241. package/src/overlays/command-menu.css +69 -0
  242. package/src/overlays/detail-drawer-guard.test.ts +16 -0
  243. package/src/overlays/detail-drawer-guard.ts +13 -0
  244. package/src/overlays/index.ts +44 -0
  245. package/src/plugin-ui/index.ts +26 -0
  246. package/src/project/BatchQueueStatusView.tsx +352 -0
  247. package/src/project/ConversationTagDotsView.tsx +130 -0
  248. package/src/project/ConversationTagEditorDialogView.tsx +273 -0
  249. package/src/project/DefaultConversationSectionView.tsx +74 -0
  250. package/src/project/DefaultSessionListView.tsx +128 -0
  251. package/src/project/DefaultSessionRowView.tsx +125 -0
  252. package/src/project/NewProjectDialogView.tsx +140 -0
  253. package/src/project/ProjectContextMenuView.tsx +187 -0
  254. package/src/project/ProjectDetailPageView.tsx +351 -0
  255. package/src/project/ProjectGroupView.tsx +37 -0
  256. package/src/project/ProjectRowView.tsx +111 -0
  257. package/src/project/ProjectSessionsLoadingView.tsx +14 -0
  258. package/src/project/ProjectSessionsView.tsx +96 -0
  259. package/src/project/ProjectsLoadingView.tsx +15 -0
  260. package/src/project/ProjectsPanelMenusView.tsx +23 -0
  261. package/src/project/ProjectsPanelView.tsx +56 -0
  262. package/src/project/QuickScrollOverlay.tsx +188 -0
  263. package/src/project/ScheduleStatusView.tsx +110 -0
  264. package/src/project/SessionContextMenuView.tsx +71 -0
  265. package/src/project/SessionRenameInputView.tsx +49 -0
  266. package/src/project/SessionRowView.tsx +119 -0
  267. package/src/project/SidebarProjectsSectionView.tsx +35 -0
  268. package/src/project/index.ts +87 -0
  269. package/src/project/types.ts +21 -0
  270. package/src/project/useActiveSessionAutoScroll.ts +171 -0
  271. package/src/registry.ts +62 -0
  272. package/src/scheduler/AutomationPageView.tsx +159 -0
  273. package/src/scheduler/ExecutionHistoryView.tsx +179 -0
  274. package/src/scheduler/HistoryDrawerView.tsx +149 -0
  275. package/src/scheduler/TaskFormDialogView.tsx +60 -0
  276. package/src/scheduler/TaskListView.tsx +219 -0
  277. package/src/scheduler/index.ts +30 -0
  278. package/src/settings/AchievementNavigationButtonView.tsx +90 -0
  279. package/src/settings/AchievementPromotionDialogView.tsx +91 -0
  280. package/src/settings/AchievementSettingsView.tsx +44 -0
  281. package/src/settings/AppshotSettingsView.tsx +132 -0
  282. package/src/settings/ArchivedProjectsSettingsView.tsx +80 -0
  283. package/src/settings/BuiltinMcpSecretsDialogView.tsx +278 -0
  284. package/src/settings/BuiltinMcpSectionView.tsx +164 -0
  285. package/src/settings/EnvironmentSettingsView.tsx +176 -0
  286. package/src/settings/GeneralSettingsView.tsx +174 -0
  287. package/src/settings/ImChannelCardView.tsx +152 -0
  288. package/src/settings/ImChannelGuideDialogView.tsx +126 -0
  289. package/src/settings/ImFeishuDialogView.tsx +156 -0
  290. package/src/settings/ImLegacyImportBannerView.tsx +44 -0
  291. package/src/settings/ImLogDrawerView.tsx +75 -0
  292. package/src/settings/ImStatusBadgeView.tsx +39 -0
  293. package/src/settings/McpDefaultIcon.tsx +27 -0
  294. package/src/settings/McpJsonEditorView.tsx +56 -0
  295. package/src/settings/ModelsProviderFormView.tsx +128 -0
  296. package/src/settings/ModelsProvidersSectionView.tsx +52 -0
  297. package/src/settings/MotionSelect.tsx +125 -0
  298. package/src/settings/PermissionsSettingsView.tsx +106 -0
  299. package/src/settings/PetBubbleStylePreviewView.tsx +44 -0
  300. package/src/settings/PetSettingsView.tsx +165 -0
  301. package/src/settings/PresetProviderModelsListView.tsx +58 -0
  302. package/src/settings/PresetProviderRowView.tsx +302 -0
  303. package/src/settings/PresetProvidersSectionView.tsx +70 -0
  304. package/src/settings/QrBindDialogView.tsx +165 -0
  305. package/src/settings/QuickPanelSettingsSectionView.tsx +66 -0
  306. package/src/settings/RemoteMcpSectionView.tsx +192 -0
  307. package/src/settings/SettingChrome.tsx +104 -0
  308. package/src/settings/SettingsAiAssistButtonView.tsx +150 -0
  309. package/src/settings/SettingsAiAssistDialogView.tsx +251 -0
  310. package/src/settings/SettingsFormFields.tsx +121 -0
  311. package/src/settings/SettingsPageShellView.tsx +84 -0
  312. package/src/settings/SettingsSidebarView.tsx +133 -0
  313. package/src/settings/ShortcutRecorderView.tsx +88 -0
  314. package/src/settings/ShortcutsSettingsView.tsx +66 -0
  315. package/src/settings/SubscriptionActionsView.tsx +63 -0
  316. package/src/settings/SubscriptionCardsView.tsx +212 -0
  317. package/src/settings/TeamDetailView.tsx +148 -0
  318. package/src/settings/TeamDialogsView.tsx +151 -0
  319. package/src/settings/TeamListView.tsx +57 -0
  320. package/src/settings/TeamSettingsView.tsx +51 -0
  321. package/src/settings/TokenActivityChartView.tsx +286 -0
  322. package/src/settings/UsageStatsView.tsx +101 -0
  323. package/src/settings/WebhookEndpointListView.tsx +123 -0
  324. package/src/settings/WechatBindDialogView.tsx +45 -0
  325. package/src/settings/achievements/AchievementCurtains.tsx +50 -0
  326. package/src/settings/achievements/AchievementPromotionBadge3D.tsx +350 -0
  327. package/src/settings/achievements/AchievementPromotionConfetti.tsx +71 -0
  328. package/src/settings/achievements/AchievementTitle.tsx +52 -0
  329. package/src/settings/achievements/index.ts +13 -0
  330. package/src/settings/index.ts +226 -0
  331. package/src/settings/shouldCloseEmptyApiKeyEditor.test.ts +135 -0
  332. package/src/settings/shouldCloseEmptyApiKeyEditor.ts +40 -0
  333. package/src/settings/token-activity.test.ts +195 -0
  334. package/src/settings/token-activity.ts +320 -0
  335. package/src/shared/AvatarStackView.tsx +45 -0
  336. package/src/shared/BotAvatar.tsx +395 -0
  337. package/src/shared/CodeBlockCopyButton.tsx +48 -0
  338. package/src/shared/CollapsePanel.tsx +125 -0
  339. package/src/shared/ContextMenuView.tsx +134 -0
  340. package/src/shared/MacKeyboardPreview.tsx +260 -0
  341. package/src/shared/MarkdownTable.tsx +216 -0
  342. package/src/shared/MultiplierTag.tsx +15 -0
  343. package/src/shared/ScrollFade.tsx +114 -0
  344. package/src/shared/SegmentedControl.tsx +82 -0
  345. package/src/shared/SyntaxHighlightedCode.tsx +0 -0
  346. package/src/shared/TabBar.tsx +696 -0
  347. package/src/shared/TimePicker.tsx +96 -0
  348. package/src/shared/connected-tab-outline.test.ts +22 -0
  349. package/src/shared/connected-tab-outline.ts +39 -0
  350. package/src/shared/fileIcons.test.ts +28 -0
  351. package/src/shared/fileIcons.ts +322 -0
  352. package/src/shared/index.ts +38 -0
  353. package/src/shared/markdown-table-clipboard.ts +31 -0
  354. package/src/shared/provider-icon/icons.ts +56 -0
  355. package/src/shared/provider-icon/index.tsx +42 -0
  356. package/src/shared/provider-icon/svg-url.d.ts +4 -0
  357. package/src/shared/tab-drag.test.ts +14 -0
  358. package/src/shared/tab-drag.ts +15 -0
  359. package/src/shared/useDelayedUnmount.ts +36 -0
  360. package/src/sidebar/AddProjectMenuItem.tsx +21 -0
  361. package/src/sidebar/AddProjectMenuPopoverView.tsx +52 -0
  362. package/src/sidebar/AddProjectMenuTriggerView.tsx +50 -0
  363. package/src/sidebar/ChatMessageListView.tsx +66 -0
  364. package/src/sidebar/DefaultSidebar.tsx +91 -0
  365. package/src/sidebar/FlowingMessageListView.tsx +111 -0
  366. package/src/sidebar/MessageCenterDialogView.tsx +81 -0
  367. package/src/sidebar/MessageCenterEmptyState.tsx +24 -0
  368. package/src/sidebar/MessageCenterTabs.tsx +86 -0
  369. package/src/sidebar/MessageCenterToolbarButton.tsx +25 -0
  370. package/src/sidebar/MessageCenterTriggerView.tsx +39 -0
  371. package/src/sidebar/NotificationMessageListView.tsx +136 -0
  372. package/src/sidebar/ProjectsPanelEmptyState.tsx +20 -0
  373. package/src/sidebar/RunningPulseDot.tsx +10 -0
  374. package/src/sidebar/SessionStatusIcon.tsx +43 -0
  375. package/src/sidebar/SettingsMenuAccountSection.tsx +32 -0
  376. package/src/sidebar/SettingsMenuActionButton.tsx +24 -0
  377. package/src/sidebar/SettingsMenuDivider.tsx +5 -0
  378. package/src/sidebar/SettingsMenuQuotaSection.tsx +45 -0
  379. package/src/sidebar/SettingsMenuSettingsItem.tsx +18 -0
  380. package/src/sidebar/SettingsMenuThemeSection.tsx +51 -0
  381. package/src/sidebar/SettingsMenuTriggerView.tsx +65 -0
  382. package/src/sidebar/ShowMoreSessionsButton.tsx +37 -0
  383. package/src/sidebar/SidebarFilterSelectView.tsx +95 -0
  384. package/src/sidebar/SidebarNavBadgeView.tsx +58 -0
  385. package/src/sidebar/SidebarNavIcon.tsx +33 -0
  386. package/src/sidebar/SidebarNavItemButton.tsx +59 -0
  387. package/src/sidebar/SidebarNavMorePanel.tsx +199 -0
  388. package/src/sidebar/SidebarNavigation.tsx +223 -0
  389. package/src/sidebar/SidebarPanel.tsx +48 -0
  390. package/src/sidebar/SidebarTopBar.tsx +103 -0
  391. package/src/sidebar/SidebarUpdateIcon.tsx +79 -0
  392. package/src/sidebar/index.ts +118 -0
  393. package/src/sidebar/nav-badge-text.test.ts +23 -0
  394. package/src/sidebar/nav-badge-text.ts +19 -0
  395. package/src/sidebar/useSidebarNavDrag.ts +139 -0
  396. package/src/skills/PluginCardView.tsx +150 -0
  397. package/src/skills/SceneCardView.tsx +194 -0
  398. package/src/skills/SkillCardView.tsx +186 -0
  399. package/src/skills/SkillDetailDialogView.tsx +138 -0
  400. package/src/skills/SkillTagGroupView.tsx +56 -0
  401. package/src/skills/SkillToggleSwitch.tsx +31 -0
  402. package/src/skills/index.ts +29 -0
  403. package/src/skills/skill-icon.test.ts +38 -0
  404. package/src/skills/skill-icon.tsx +126 -0
  405. package/src/styles.css +75 -0
  406. package/src/utils/platform.ts +2 -0
@@ -0,0 +1,269 @@
1
+ import { cn } from "@vetta-org/ui";
2
+ import { AnimatePresence, motion } from "motion/react";
3
+ import {
4
+ createContext,
5
+ forwardRef,
6
+ type ComponentPropsWithoutRef,
7
+ type JSX,
8
+ type ReactNode,
9
+ useCallback,
10
+ useContext,
11
+ useRef,
12
+ useState,
13
+ } from "react";
14
+ import { ResizeHandle } from "../layout/ResizeHandle";
15
+
16
+ interface ActivityPanelContextValue {
17
+ readonly displayedWidth: number;
18
+ readonly isOpen: boolean;
19
+ readonly isResizing: boolean;
20
+ readonly close: () => void;
21
+ readonly resize: (delta: number) => void;
22
+ readonly resizeEnd: () => void;
23
+ readonly resizeStart: () => void;
24
+ }
25
+
26
+ const ActivityPanelContext = createContext<ActivityPanelContextValue | null>(null);
27
+
28
+ export interface ActivityPanelRootProps {
29
+ readonly children: ReactNode;
30
+ readonly isOpen: boolean;
31
+ readonly isResizing?: boolean;
32
+ readonly width: number;
33
+ readonly minWidth: number;
34
+ readonly maxWidth: number;
35
+ readonly onOpenChange: (open: boolean) => void;
36
+ readonly onResizeStart?: () => void;
37
+ /** Reports the absolute live width while the local shell follows the pointer. */
38
+ readonly onResize?: (width: number) => void;
39
+ readonly onResizeEnd?: (width: number) => void;
40
+ }
41
+
42
+ /** Owns controlled panel state and resize behavior. Layout remains explicit children. */
43
+ export function ActivityPanelRoot({
44
+ children,
45
+ isOpen,
46
+ isResizing = false,
47
+ width,
48
+ minWidth,
49
+ maxWidth,
50
+ onOpenChange,
51
+ onResizeStart,
52
+ onResize,
53
+ onResizeEnd,
54
+ }: ActivityPanelRootProps): JSX.Element {
55
+ const liveWidthRef = useRef(width);
56
+ const [liveWidth, setLiveWidth] = useState(width);
57
+ const [locallyResizing, setLocallyResizing] = useState(false);
58
+ const resizeBoundsRef = useRef({ minWidth, maxWidth });
59
+ resizeBoundsRef.current = { minWidth, maxWidth };
60
+
61
+ const resizeStart = useCallback((): void => {
62
+ liveWidthRef.current = width;
63
+ setLiveWidth(width);
64
+ setLocallyResizing(true);
65
+ onResizeStart?.();
66
+ }, [onResizeStart, width]);
67
+ const resize = useCallback(
68
+ (delta: number): void => {
69
+ const bounds = resizeBoundsRef.current;
70
+ const nextWidth = Math.min(
71
+ bounds.maxWidth,
72
+ Math.max(bounds.minWidth, liveWidthRef.current + delta),
73
+ );
74
+ if (nextWidth === liveWidthRef.current) return;
75
+ liveWidthRef.current = nextWidth;
76
+ setLiveWidth(nextWidth);
77
+ onResize?.(nextWidth);
78
+ },
79
+ [onResize],
80
+ );
81
+ const resizeEnd = useCallback((): void => {
82
+ const finalWidth = liveWidthRef.current;
83
+ onResizeEnd?.(finalWidth);
84
+ setLocallyResizing(false);
85
+ }, [onResizeEnd]);
86
+ const close = useCallback(() => onOpenChange(false), [onOpenChange]);
87
+
88
+ return (
89
+ <ActivityPanelContext.Provider
90
+ value={{
91
+ close,
92
+ displayedWidth: locallyResizing ? liveWidth : width,
93
+ isOpen,
94
+ isResizing: locallyResizing || isResizing,
95
+ resize,
96
+ resizeEnd,
97
+ resizeStart,
98
+ }}
99
+ >
100
+ {children}
101
+ </ActivityPanelContext.Provider>
102
+ );
103
+ }
104
+
105
+ export interface ActivityPanelDesktopProps extends ComponentPropsWithoutRef<"aside"> {
106
+ /** The host decides whether desktop layout applies at the current breakpoint. */
107
+ readonly present?: boolean;
108
+ }
109
+
110
+ /** Desktop width boundary. Callers explicitly compose Surface and ResizeHandle inside it. */
111
+ export const ActivityPanelDesktop = forwardRef<HTMLElement, ActivityPanelDesktopProps>(
112
+ function ActivityPanelDesktop(
113
+ { present = true, className, children, style, ...props },
114
+ forwardedRef,
115
+ ) {
116
+ const { displayedWidth, isOpen, isResizing } = useActivityPanelContext("Desktop");
117
+ if (!present) return null;
118
+ return (
119
+ <aside
120
+ ref={forwardedRef}
121
+ className={cn(
122
+ "relative flex h-full min-h-0 shrink-0 flex-col overflow-visible",
123
+ className,
124
+ )}
125
+ style={{
126
+ ...style,
127
+ width: isOpen ? displayedWidth : 0,
128
+ transition: isResizing ? "none" : "width 0.2s ease-in-out",
129
+ }}
130
+ {...props}
131
+ >
132
+ {children}
133
+ </aside>
134
+ );
135
+ },
136
+ );
137
+
138
+ export interface ActivityPanelSurfaceProps extends ComponentPropsWithoutRef<"div"> {}
139
+
140
+ /** Visual content surface whose mount lifetime is independent from open/closed state. */
141
+ export const ActivityPanelSurface = forwardRef<HTMLDivElement, ActivityPanelSurfaceProps>(
142
+ function ActivityPanelSurface({ className, children, style, ...props }, forwardedRef) {
143
+ const { displayedWidth, isOpen } = useActivityPanelContext("Surface");
144
+ return (
145
+ <div
146
+ ref={forwardedRef}
147
+ aria-hidden={!isOpen}
148
+ className={cn(
149
+ "flex h-full min-h-0 flex-col transition-opacity duration-150",
150
+ isOpen ? "opacity-100" : "pointer-events-none opacity-0",
151
+ className,
152
+ )}
153
+ style={{ ...style, width: displayedWidth }}
154
+ {...props}
155
+ >
156
+ {children}
157
+ </div>
158
+ );
159
+ },
160
+ );
161
+
162
+ export interface ActivityPanelHeaderProps extends ComponentPropsWithoutRef<"div"> {}
163
+
164
+ export const ActivityPanelHeader = forwardRef<HTMLDivElement, ActivityPanelHeaderProps>(
165
+ function ActivityPanelHeader({ className, ...props }, forwardedRef) {
166
+ return (
167
+ <div
168
+ ref={forwardedRef}
169
+ className={cn(
170
+ "group/activity-tabs relative z-20 flex shrink-0 items-end pt-1",
171
+ className,
172
+ )}
173
+ {...props}
174
+ />
175
+ );
176
+ },
177
+ );
178
+
179
+ export interface ActivityPanelBodyProps extends ComponentPropsWithoutRef<"div"> {}
180
+
181
+ export const ActivityPanelBody = forwardRef<HTMLDivElement, ActivityPanelBodyProps>(
182
+ function ActivityPanelBody({ className, ...props }, forwardedRef) {
183
+ return (
184
+ <div
185
+ ref={forwardedRef}
186
+ className={cn("flex min-h-0 flex-1 flex-col", className)}
187
+ {...props}
188
+ />
189
+ );
190
+ },
191
+ );
192
+
193
+ export function ActivityPanelResizeHandle(): JSX.Element | null {
194
+ const { isOpen, resize, resizeEnd, resizeStart } = useActivityPanelContext("ResizeHandle");
195
+ if (!isOpen) return null;
196
+ return (
197
+ <ResizeHandle
198
+ side="left"
199
+ onResizeStart={resizeStart}
200
+ onResize={resize}
201
+ onResizeEnd={resizeEnd}
202
+ />
203
+ );
204
+ }
205
+
206
+ export interface ActivityPanelSheetProps extends ComponentPropsWithoutRef<typeof motion.div> {
207
+ /** The host decides whether sheet layout applies at the current breakpoint. */
208
+ readonly present?: boolean;
209
+ readonly backdropClassName?: string;
210
+ }
211
+
212
+ /** Responsive sheet recipe with an explicit child tree and shared Root close behavior. */
213
+ export function ActivityPanelSheet({
214
+ present = true,
215
+ backdropClassName,
216
+ className,
217
+ children,
218
+ ...props
219
+ }: ActivityPanelSheetProps): JSX.Element {
220
+ const { close, isOpen } = useActivityPanelContext("Sheet");
221
+ return (
222
+ <AnimatePresence>
223
+ {present && isOpen ? (
224
+ <>
225
+ <motion.div
226
+ key="activity-sheet-backdrop"
227
+ initial={{ opacity: 0 }}
228
+ animate={{ opacity: 1 }}
229
+ exit={{ opacity: 0 }}
230
+ transition={{ duration: 0.2 }}
231
+ onClick={close}
232
+ className={cn("fixed inset-0 z-40 bg-black/25", backdropClassName)}
233
+ />
234
+ <motion.div
235
+ key="activity-sheet"
236
+ initial={{ y: "100%" }}
237
+ animate={{ y: 0 }}
238
+ exit={{ y: "100%" }}
239
+ transition={{ duration: 0.26, ease: [0.22, 0.61, 0.36, 1] }}
240
+ className={cn(
241
+ "fixed inset-x-0 bottom-0 top-16 z-50 flex flex-col rounded-t-2xl border-t border-border bg-background p-2 shadow-2xl shadow-black/40",
242
+ className,
243
+ )}
244
+ {...props}
245
+ >
246
+ {children}
247
+ </motion.div>
248
+ </>
249
+ ) : null}
250
+ </AnimatePresence>
251
+ );
252
+ }
253
+
254
+ function useActivityPanelContext(part: string): ActivityPanelContextValue {
255
+ const context = useContext(ActivityPanelContext);
256
+ if (!context) throw new Error(`ActivityPanel.${part} must be used within ActivityPanel.Root`);
257
+ return context;
258
+ }
259
+
260
+ /** Compound primitives for composing host-specific activity workspaces. */
261
+ export const ActivityPanel = {
262
+ Root: ActivityPanelRoot,
263
+ Desktop: ActivityPanelDesktop,
264
+ Surface: ActivityPanelSurface,
265
+ Header: ActivityPanelHeader,
266
+ Body: ActivityPanelBody,
267
+ ResizeHandle: ActivityPanelResizeHandle,
268
+ Sheet: ActivityPanelSheet,
269
+ } as const;
@@ -0,0 +1,36 @@
1
+ import type { ComponentPropsWithoutRef, JSX, ReactNode } from "react";
2
+ import { cn } from "@vetta-org/ui";
3
+ import { ThemeSurface } from "../appearance/ThemeSurface";
4
+
5
+ export interface ActivityPanelFrameProps extends ComponentPropsWithoutRef<"div"> {
6
+ children: ReactNode;
7
+ contentClassName?: string;
8
+ }
9
+
10
+ export function ActivityPanelFrame({
11
+ children,
12
+ className,
13
+ contentClassName,
14
+ ...props
15
+ }: ActivityPanelFrameProps): JSX.Element {
16
+ return (
17
+ <div
18
+ className={cn(
19
+ "relative z-10 flex min-h-0 flex-1 flex-col overflow-visible rounded-xl border border-border bg-muted",
20
+ className,
21
+ )}
22
+ data-theme-surface-root="activity.panel"
23
+ {...props}
24
+ >
25
+ <ThemeSurface slot="activity.panel" />
26
+ <div
27
+ className={cn(
28
+ "relative z-10 flex min-h-0 flex-1 flex-col overflow-hidden rounded-[inherit]",
29
+ contentClassName,
30
+ )}
31
+ >
32
+ {children}
33
+ </div>
34
+ </div>
35
+ );
36
+ }
@@ -0,0 +1,382 @@
1
+ import { Button } from "@vetta-org/ui";
2
+ import type { JSX, ReactNode } from "react";
3
+ import { useEffect, useRef } from "react";
4
+
5
+ export type BackgroundTaskStatus = "running" | "completed" | "failed" | "killed";
6
+
7
+ export type SubagentWorkStatus = "queued" | "pending" | "running" | "completed" | "failed" | "interrupted";
8
+ export type McpTaskWorkStatus = "working" | "input_required" | "completed" | "failed" | "cancelled";
9
+
10
+ /** Bash background task row (run_in_background). */
11
+ export interface BackgroundTaskViewItem {
12
+ kind?: "bash";
13
+ id: string;
14
+ command: string;
15
+ status: BackgroundTaskStatus;
16
+ tail: string;
17
+ exitCode?: number;
18
+ statusIcon: string;
19
+ statusLabel: string;
20
+ statusClassName: string;
21
+ durationLabel: string;
22
+ }
23
+
24
+ /** Subagent child row (explorer / future types) — same tab, different card. */
25
+ export interface SubagentWorkViewItem {
26
+ kind: "subagent";
27
+ id: string;
28
+ agentType: string;
29
+ taskName: string;
30
+ path: string;
31
+ status: SubagentWorkStatus;
32
+ taskPreview: string;
33
+ finalText?: string;
34
+ errorLabel?: string;
35
+ errorDetail?: string;
36
+ progressLabel?: string;
37
+ usageLabel: string;
38
+ statusIcon: string;
39
+ statusLabel: string;
40
+ statusClassName: string;
41
+ durationLabel: string;
42
+ }
43
+
44
+ /** MCP 2026 Tasks extension row. It is not a local process or subagent. */
45
+ export interface McpTaskWorkViewItem {
46
+ kind: "mcp";
47
+ id: string;
48
+ serverName: string;
49
+ toolName: string;
50
+ status: McpTaskWorkStatus;
51
+ statusMessage?: string;
52
+ statusIcon: string;
53
+ statusLabel: string;
54
+ statusClassName: string;
55
+ durationLabel: string;
56
+ }
57
+
58
+ export type BackgroundWorkViewItem = BackgroundTaskViewItem | SubagentWorkViewItem | McpTaskWorkViewItem;
59
+
60
+ export interface BackgroundTasksTabPanelViewProps {
61
+ items: readonly BackgroundWorkViewItem[];
62
+ emptyLabel: string;
63
+ /** Null when there are no finished bash tasks (hide clear button). */
64
+ clearFinishedLabel: string | null;
65
+ onClearFinished: () => void;
66
+ /** Label for the per-task stop button (running tasks only). */
67
+ stopLabel: string;
68
+ /** Bash: task id; Subagent: child id / path. */
69
+ onStop: (id: string, kind: "bash" | "subagent" | "mcp") => void;
70
+ }
71
+
72
+ /**
73
+ * Shared card shell: a bordered surface so rows stay separable on a wide panel,
74
+ * plus a status-tinted left rail that carries the state without extra chrome.
75
+ */
76
+ function WorkCard({ active, children }: { active: boolean; children: ReactNode }): JSX.Element {
77
+ return (
78
+ <div
79
+ className={`relative min-w-0 overflow-hidden rounded-xl border bg-card/50 pl-3.5 pr-3 py-2.5 transition-colors duration-200 hover:bg-card ${
80
+ active ? "border-primary/25 hover:border-primary/40" : "border-border/50 hover:border-border"
81
+ }`}
82
+ >
83
+ <span
84
+ aria-hidden
85
+ className={`absolute inset-y-0 left-0 w-[3px] ${active ? "bg-primary/50" : "bg-border/60"}`}
86
+ />
87
+ {children}
88
+ </div>
89
+ );
90
+ }
91
+
92
+ /** Header row: kind badge + identity on the left, status meta + stop pinned right. */
93
+ function WorkCardHeader({
94
+ statusIcon,
95
+ statusClassName,
96
+ statusLabel,
97
+ durationLabel,
98
+ badge,
99
+ identity,
100
+ extraMeta,
101
+ action,
102
+ }: {
103
+ statusIcon: string;
104
+ statusClassName: string;
105
+ statusLabel: string;
106
+ durationLabel: string;
107
+ badge: ReactNode;
108
+ identity: ReactNode;
109
+ extraMeta?: ReactNode;
110
+ action?: ReactNode;
111
+ }): JSX.Element {
112
+ return (
113
+ <div className="flex min-w-0 items-center gap-2">
114
+ <span className={`${statusIcon} h-3.5 w-3.5 shrink-0 ${statusClassName}`} />
115
+ {badge}
116
+ <div className="min-w-0 flex-1">{identity}</div>
117
+ <div className="flex shrink-0 items-center gap-2 pl-2">
118
+ <span className={`whitespace-nowrap text-[11px] font-medium ${statusClassName}`}>{statusLabel}</span>
119
+ {extraMeta}
120
+ <span className="whitespace-nowrap font-mono text-[10px] tabular-nums text-muted-foreground/60">
121
+ {durationLabel}
122
+ </span>
123
+ {action}
124
+ </div>
125
+ </div>
126
+ );
127
+ }
128
+
129
+ function KindBadge({ tone, children }: { tone: "neutral" | "primary"; children: ReactNode }): JSX.Element {
130
+ return (
131
+ <span
132
+ className={`shrink-0 rounded-md px-1.5 py-0.5 text-[10px] font-medium uppercase tracking-wide ${
133
+ tone === "primary" ? "bg-primary/10 text-primary" : "bg-muted text-muted-foreground"
134
+ }`}
135
+ >
136
+ {children}
137
+ </span>
138
+ );
139
+ }
140
+
141
+ function StopButton({
142
+ label,
143
+ iconOnly,
144
+ onClick,
145
+ }: {
146
+ label: string;
147
+ iconOnly: boolean;
148
+ onClick: () => void;
149
+ }): JSX.Element {
150
+ return (
151
+ <Button
152
+ type="button"
153
+ variant="ghost"
154
+ size={iconOnly ? "icon-xs" : "xs"}
155
+ onClick={onClick}
156
+ title={label}
157
+ aria-label={label}
158
+ className={`shrink-0 rounded-lg text-muted-foreground hover:bg-destructive/10 hover:text-destructive ${
159
+ iconOnly ? "h-6 w-6" : "h-6 px-1.5 text-[10px]"
160
+ }`}
161
+ >
162
+ <span className={`icon-[solar--stop-circle-linear] ${iconOnly ? "h-3.5 w-3.5" : "h-3 w-3"}`} />
163
+ {!iconOnly && <span>{label}</span>}
164
+ </Button>
165
+ );
166
+ }
167
+
168
+ /** Terminal-like block that keeps the command and its output visually joined. */
169
+ function OutputBlock({ children, mono = true }: { children: ReactNode; mono?: boolean }): JSX.Element {
170
+ return (
171
+ <div
172
+ className={`mt-2 max-h-[140px] overflow-auto whitespace-pre-wrap break-all rounded-lg bg-muted/40 px-2 py-1.5 text-[10px] leading-relaxed text-muted-foreground ${
173
+ mono ? "font-mono" : ""
174
+ }`}
175
+ >
176
+ {children}
177
+ </div>
178
+ );
179
+ }
180
+
181
+ function BashTaskCard({
182
+ task,
183
+ stopLabel,
184
+ onStop,
185
+ }: {
186
+ task: BackgroundTaskViewItem;
187
+ stopLabel: string;
188
+ onStop: (taskId: string) => void;
189
+ }): JSX.Element {
190
+ const tailRef = useRef<HTMLPreElement>(null);
191
+
192
+ useEffect(() => {
193
+ const el = tailRef.current;
194
+ if (el) el.scrollTop = el.scrollHeight;
195
+ }, [task.tail]);
196
+
197
+ const running = task.status === "running";
198
+
199
+ return (
200
+ <WorkCard active={running}>
201
+ <WorkCardHeader
202
+ statusIcon={task.statusIcon}
203
+ statusClassName={task.statusClassName}
204
+ statusLabel={task.statusLabel}
205
+ durationLabel={task.durationLabel}
206
+ badge={<KindBadge tone="neutral">bash</KindBadge>}
207
+ identity={
208
+ <span className="block truncate font-mono text-[10px] text-muted-foreground/70" title={task.id}>
209
+ {task.id}
210
+ </span>
211
+ }
212
+ extraMeta={
213
+ task.exitCode !== undefined ? (
214
+ <span className="whitespace-nowrap rounded-md bg-muted px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground/70">
215
+ exit {task.exitCode}
216
+ </span>
217
+ ) : undefined
218
+ }
219
+ action={running ? <StopButton label={stopLabel} iconOnly={false} onClick={() => onStop(task.id)} /> : undefined}
220
+ />
221
+ <div className="mt-2 flex min-w-0 items-start gap-1.5 rounded-lg bg-muted/40 px-2 py-1.5">
222
+ <span aria-hidden className="shrink-0 select-none font-mono text-[11px] text-muted-foreground/50">
223
+ $
224
+ </span>
225
+ <span className="min-w-0 flex-1 truncate font-mono text-[11px] text-foreground" title={task.command}>
226
+ {task.command}
227
+ </span>
228
+ </div>
229
+ {task.tail && (
230
+ <pre
231
+ ref={tailRef}
232
+ className="mt-1 max-h-[140px] overflow-auto whitespace-pre-wrap break-all rounded-lg border border-border/40 bg-background/40 px-2 py-1.5 font-mono text-[10px] leading-relaxed text-muted-foreground"
233
+ >
234
+ {task.tail}
235
+ </pre>
236
+ )}
237
+ </WorkCard>
238
+ );
239
+ }
240
+
241
+ function SubagentCard({
242
+ item,
243
+ stopLabel,
244
+ onStop,
245
+ }: {
246
+ item: SubagentWorkViewItem;
247
+ stopLabel: string;
248
+ onStop: (id: string) => void;
249
+ }): JSX.Element {
250
+ const active = item.status === "queued" || item.status === "pending" || item.status === "running";
251
+ return (
252
+ <WorkCard active={active}>
253
+ <WorkCardHeader
254
+ statusIcon={item.statusIcon}
255
+ statusClassName={item.statusClassName}
256
+ statusLabel={item.statusLabel}
257
+ durationLabel={item.durationLabel}
258
+ badge={<KindBadge tone="primary">{item.agentType}</KindBadge>}
259
+ identity={
260
+ <span className="block truncate font-mono text-[10px] text-muted-foreground/70" title={item.taskName}>
261
+ {item.taskName}
262
+ </span>
263
+ }
264
+ action={active ? <StopButton label={stopLabel} iconOnly onClick={() => onStop(item.id)} /> : undefined}
265
+ />
266
+ <div className="mt-2 min-w-0 line-clamp-2 text-[11px] leading-relaxed text-foreground" title={item.taskPreview}>
267
+ {item.taskPreview}
268
+ </div>
269
+ {(item.progressLabel || item.usageLabel) && (
270
+ <div className="mt-1.5 flex flex-wrap items-center gap-x-2 gap-y-1 font-mono text-[10px] tabular-nums text-muted-foreground/70">
271
+ {item.progressLabel && <span>{item.progressLabel}</span>}
272
+ {item.progressLabel && item.usageLabel && <span aria-hidden className="text-border">·</span>}
273
+ {item.usageLabel && <span>{item.usageLabel}</span>}
274
+ </div>
275
+ )}
276
+ {item.errorLabel && (
277
+ <div className="mt-2 min-w-0 rounded-lg border border-destructive/20 bg-destructive/10 px-2.5 py-2 text-[10px] text-destructive">
278
+ <div className="font-medium">{item.errorLabel}</div>
279
+ {item.errorDetail && <div className="mt-0.5 max-h-16 overflow-auto break-words">{item.errorDetail}</div>}
280
+ </div>
281
+ )}
282
+ {item.finalText && <OutputBlock>{item.finalText}</OutputBlock>}
283
+ </WorkCard>
284
+ );
285
+ }
286
+
287
+ function McpTaskCard({
288
+ item,
289
+ stopLabel,
290
+ onStop,
291
+ }: {
292
+ item: McpTaskWorkViewItem;
293
+ stopLabel: string;
294
+ onStop: (id: string) => void;
295
+ }): JSX.Element {
296
+ const active = item.status === "working" || item.status === "input_required";
297
+ return (
298
+ <WorkCard active={active}>
299
+ <WorkCardHeader
300
+ statusIcon={item.statusIcon}
301
+ statusClassName={item.statusClassName}
302
+ statusLabel={item.statusLabel}
303
+ durationLabel={item.durationLabel}
304
+ badge={<KindBadge tone="primary">MCP</KindBadge>}
305
+ identity={
306
+ <span className="block truncate text-[11px] text-foreground" title={`${item.serverName}: ${item.toolName}`}>
307
+ {item.serverName}: {item.toolName}
308
+ </span>
309
+ }
310
+ action={active ? <StopButton label={stopLabel} iconOnly onClick={() => onStop(item.id)} /> : undefined}
311
+ />
312
+ {item.statusMessage && (
313
+ <div className="mt-1.5 line-clamp-3 break-words text-[11px] leading-relaxed text-muted-foreground">
314
+ {item.statusMessage}
315
+ </div>
316
+ )}
317
+ </WorkCard>
318
+ );
319
+ }
320
+
321
+ export function BackgroundTasksTabPanelView({
322
+ items,
323
+ emptyLabel,
324
+ clearFinishedLabel,
325
+ onClearFinished,
326
+ stopLabel,
327
+ onStop,
328
+ }: BackgroundTasksTabPanelViewProps): JSX.Element {
329
+ if (items.length === 0) {
330
+ return (
331
+ <div className="flex flex-1 flex-col items-center justify-center gap-2 p-4 text-[12px] text-muted-foreground">
332
+ <span className="icon-[solar--server-square-cloud-linear] h-8 w-8 text-muted-foreground/40" />
333
+ <span>{emptyLabel}</span>
334
+ </div>
335
+ );
336
+ }
337
+
338
+ return (
339
+ <div className="flex min-h-0 min-w-0 flex-1 flex-col">
340
+ {clearFinishedLabel !== null && (
341
+ <div className="flex shrink-0 items-center justify-end border-b border-border/40 px-2.5 py-1.5">
342
+ <Button
343
+ type="button"
344
+ variant="ghost"
345
+ size="xs"
346
+ onClick={onClearFinished}
347
+ className="h-6 max-w-full rounded-lg px-1.5 text-[11px] text-muted-foreground"
348
+ >
349
+ <span className="icon-[solar--trash-bin-minimalistic-linear] h-3 w-3 shrink-0" />
350
+ <span className="truncate">{clearFinishedLabel}</span>
351
+ </Button>
352
+ </div>
353
+ )}
354
+ <div className="min-w-0 flex-1 space-y-2 overflow-y-auto overflow-x-hidden p-2.5">
355
+ {items.map((item) =>
356
+ item.kind === "subagent" ? (
357
+ <SubagentCard
358
+ key={`subagent:${item.id}`}
359
+ item={item}
360
+ stopLabel={stopLabel}
361
+ onStop={(id) => onStop(id, "subagent")}
362
+ />
363
+ ) : item.kind === "mcp" ? (
364
+ <McpTaskCard
365
+ key={`mcp:${item.id}`}
366
+ item={item}
367
+ stopLabel={stopLabel}
368
+ onStop={(id) => onStop(id, "mcp")}
369
+ />
370
+ ) : (
371
+ <BashTaskCard
372
+ key={`bash:${item.id}`}
373
+ task={item}
374
+ stopLabel={stopLabel}
375
+ onStop={(id) => onStop(id, "bash")}
376
+ />
377
+ ),
378
+ )}
379
+ </div>
380
+ </div>
381
+ );
382
+ }
@@ -0,0 +1,22 @@
1
+ import type { JSX, ReactNode } from "react";
2
+
3
+ export interface BatchProgressTabPanelViewProps {
4
+ /** When null/undefined, show empty state. */
5
+ children?: ReactNode;
6
+ emptyLabel: string;
7
+ }
8
+
9
+ export function BatchProgressTabPanelView({
10
+ children,
11
+ emptyLabel,
12
+ }: BatchProgressTabPanelViewProps): JSX.Element {
13
+ if (!children) {
14
+ return (
15
+ <div className="flex h-full items-center justify-center text-[12px] text-muted-foreground/50">
16
+ {emptyLabel}
17
+ </div>
18
+ );
19
+ }
20
+
21
+ return <div className="h-full overflow-y-auto px-3 py-3">{children}</div>;
22
+ }