@datalayer/agent-runtimes 1.3.89 → 1.3.91

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 (265) hide show
  1. package/lib/Agent.js +2 -18
  2. package/lib/AgentDocument.js +5 -55
  3. package/lib/AgentNode.js +31 -208
  4. package/lib/AgentNotebook.js +5 -59
  5. package/lib/agent-node/AgentNodeGallery.js +23 -111
  6. package/lib/agents/AgentDetails.js +36 -274
  7. package/lib/agents/AgentRuntimeChat.js +1 -8
  8. package/lib/chat/Chat.js +7 -46
  9. package/lib/chat/ChatFloating.js +15 -100
  10. package/lib/chat/ChatInline.js +5 -47
  11. package/lib/chat/ChatPopupStandalone.js +5 -53
  12. package/lib/chat/ChatSidebar.js +4 -51
  13. package/lib/chat/ChatStandalone.js +4 -45
  14. package/lib/chat/EphemeralSurfaceControl.js +5 -25
  15. package/lib/chat/assistant/AssistantContextMenu.d.ts +8 -0
  16. package/lib/chat/assistant/AssistantContextMenu.js +17 -1
  17. package/lib/chat/assistant/AssistantStage.js +6 -25
  18. package/lib/chat/assistant/BalloonParts.js +8 -40
  19. package/lib/chat/assistant/BalloonVisual.js +2 -2
  20. package/lib/chat/assistant/ConversationBalloon.js +2 -11
  21. package/lib/chat/assistant/DecisionAsk.js +3 -3
  22. package/lib/chat/assistant/SandboxDetailsDialog.js +3 -17
  23. package/lib/chat/assistant/SpeechBalloon.js +14 -78
  24. package/lib/chat/base/ChatBase.js +37 -172
  25. package/lib/chat/display/EmptyState.js +7 -35
  26. package/lib/chat/display/FloatingBrandButton.js +4 -34
  27. package/lib/chat/display/PoweredByTag.js +3 -14
  28. package/lib/chat/document/EphemeralDocument.js +3 -18
  29. package/lib/chat/header/ChatHeader.js +1 -17
  30. package/lib/chat/header/ChatHeaderBase.js +2 -24
  31. package/lib/chat/header/ChatViewModeToggle.js +7 -29
  32. package/lib/chat/indicators/McpStatusIndicator.js +3 -12
  33. package/lib/chat/indicators/SandboxStatusIndicator.js +6 -34
  34. package/lib/chat/indicators/SkillsStatusIndicator.js +3 -12
  35. package/lib/chat/indicators/TypingDots.js +1 -11
  36. package/lib/chat/messages/ChatMessageList.js +58 -185
  37. package/lib/chat/messages/ChatMessages.js +15 -79
  38. package/lib/chat/messages/FormSubmissionMessage.js +2 -33
  39. package/lib/chat/messages/NotebookToolSurfaces.js +12 -41
  40. package/lib/chat/messages/TurnFooter.js +4 -10
  41. package/lib/chat/notebook/EphemeralNotebook.js +2 -10
  42. package/lib/chat/parts/ReasoningPart.js +2 -16
  43. package/lib/chat/parts/TextPart.js +2 -12
  44. package/lib/chat/parts/ToolPart.js +16 -90
  45. package/lib/chat/presence/Presence.js +5 -33
  46. package/lib/chat/prompt/FloatingCard.js +1 -13
  47. package/lib/chat/prompt/InputPrompt.js +1 -6
  48. package/lib/chat/prompt/InputPromptBase.js +4 -17
  49. package/lib/chat/prompt/InputPromptLexical.js +44 -45
  50. package/lib/chat/prompt/InputPromptText.js +1 -1
  51. package/lib/chat/prompt/footer/InPromptFooter.js +1 -8
  52. package/lib/chat/prompt/menus/AgentsMenu.js +1 -1
  53. package/lib/chat/prompt/menus/InlineAgentsMenu.js +1 -1
  54. package/lib/chat/prompt/menus/ModelSelector.js +1 -5
  55. package/lib/chat/prompt/menus/SkillsMenu.js +3 -30
  56. package/lib/chat/prompt/menus/SuggestionsMenu.js +1 -1
  57. package/lib/chat/prompt/menus/ToolsMenu.js +4 -48
  58. package/lib/chat/prompt/plugins/AgentMentionPlugin.js +2 -9
  59. package/lib/chat/prompt/plugins/CommandPlugin.js +2 -9
  60. package/lib/chat/prompt/plugins/MentionChip.js +1 -15
  61. package/lib/chat/prompt/stack.js +1 -19
  62. package/lib/chat/tools/A2AAgentDialog.js +9 -42
  63. package/lib/chat/tools/SubagentActivity.js +5 -22
  64. package/lib/chat/tools/ToolApprovalBanner.js +4 -34
  65. package/lib/chat/tools/ToolApprovalDialog.js +4 -19
  66. package/lib/chat/tools/ToolCallDisplay.js +12 -97
  67. package/lib/chat/usage/ContextPie.js +4 -45
  68. package/lib/chat/words.d.ts +7 -0
  69. package/lib/chat/words.js +12 -0
  70. package/lib/components/a2ui/datalayer/Chart.js +4 -10
  71. package/lib/components/a2ui/datalayer/Chat.js +2 -10
  72. package/lib/components/a2ui/datalayer/Download.js +1 -1
  73. package/lib/components/a2ui/datalayer/Evidence.js +1 -15
  74. package/lib/components/a2ui/datalayer/FileUpload.js +1 -12
  75. package/lib/components/a2ui/datalayer/Table.js +9 -17
  76. package/lib/components/a2ui/datalayer/formWidgets.js +3 -2
  77. package/lib/components/a2ui/datalayer/parts.js +1 -16
  78. package/lib/components/a2ui/styles.js +16 -5
  79. package/lib/components/agents/AgentSummary.js +1 -51
  80. package/lib/components/cards/NotificationEventCard.js +6 -72
  81. package/lib/components/cards/OutputCard.js +4 -48
  82. package/lib/components/cards/ToolApprovalCard.js +2 -35
  83. package/lib/components/code-sandboxes/CodeSandboxCellVariables.js +1 -1
  84. package/lib/components/code-sandboxes/CodeSandboxEnvironmentSelect.js +4 -14
  85. package/lib/components/code-sandboxes/CodeSandboxPicker.js +16 -21
  86. package/lib/components/code-sandboxes/CodeSandboxVariables.js +2 -2
  87. package/lib/components/scheduler/ScheduleMenu.js +5 -10
  88. package/lib/components/specs/SpecPayloadPreview.js +1 -26
  89. package/lib/components/teams/A2ATeamGraph.d.ts +4 -3
  90. package/lib/components/teams/A2ATeamGraph.js +25 -71
  91. package/lib/components/teams/AnswerSurfacesView.js +2 -2
  92. package/lib/components/teams/NotebookPreview.js +1 -10
  93. package/lib/components/teams/NotebookPreviewView.js +2 -3
  94. package/lib/components/teams/SceneTranscript.js +3 -17
  95. package/lib/components/teams/SceneView.js +1 -8
  96. package/lib/components/teams/TeamNotebook.js +5 -13
  97. package/lib/components/teams/TeamNotebookView.js +2 -12
  98. package/lib/components/teams/index.d.ts +1 -0
  99. package/lib/components/teams/index.js +1 -0
  100. package/lib/components/teams/useBalloonRoom.d.ts +39 -0
  101. package/lib/components/teams/useBalloonRoom.js +89 -0
  102. package/lib/config/AgentConfiguration.js +22 -225
  103. package/lib/context/ContextDistribution.js +7 -41
  104. package/lib/context/ContextInspector.js +9 -107
  105. package/lib/context/ContextPanel.js +11 -86
  106. package/lib/context/ContextUsage.js +6 -34
  107. package/lib/context/CostTracker.js +7 -42
  108. package/lib/context/MessageHistory.js +3 -37
  109. package/lib/context/TurnGraphChart.js +9 -41
  110. package/lib/examples/A2UiAgentExample.js +6 -108
  111. package/lib/examples/A2UiComponentsGalleryExample.js +1 -1
  112. package/lib/examples/A2UiContactCardExample.js +1 -1
  113. package/lib/examples/A2UiJupyterOutputExample.js +25 -125
  114. package/lib/examples/A2UiRestaurantExample.js +1 -1
  115. package/lib/examples/A2UiViewerExample.js +1 -1
  116. package/lib/examples/AgUiAgenticExample.js +3 -35
  117. package/lib/examples/AgUiBackendToolRenderingExample.js +2 -25
  118. package/lib/examples/AgUiHaikuGenUiExample.js +2 -32
  119. package/lib/examples/AgUiHumanInTheLoopExample.js +5 -59
  120. package/lib/examples/AgUiSharedStateExample.js +6 -56
  121. package/lib/examples/AgUiToolsBasedGenUiExample.js +25 -120
  122. package/lib/examples/AgentA2AExample.js +1 -15
  123. package/lib/examples/AgentA2ATeamExample.js +6 -30
  124. package/lib/examples/AgentCheckpointsExample.js +11 -145
  125. package/lib/examples/AgentCodeSandboxExample.js +5 -108
  126. package/lib/examples/AgentCodeSandboxesExample.js +3 -30
  127. package/lib/examples/AgentCodemodeExample.js +9 -85
  128. package/lib/examples/AgentCompactionExample.js +3 -64
  129. package/lib/examples/AgentDecideExample.js +1 -13
  130. package/lib/examples/AgentEvalsExample.js +5 -60
  131. package/lib/examples/AgentGuardrailsExample.js +4 -28
  132. package/lib/examples/AgentHooksExample.js +1 -1
  133. package/lib/examples/AgentInferenceProviderExample.js +5 -96
  134. package/lib/examples/AgentMCPExample.js +7 -105
  135. package/lib/examples/AgentMemoryExample.js +5 -74
  136. package/lib/examples/AgentMonitoringExample.js +7 -53
  137. package/lib/examples/AgentNotificationsExample.js +3 -61
  138. package/lib/examples/AgentOtelExample.js +3 -72
  139. package/lib/examples/AgentOutputsExample.js +6 -81
  140. package/lib/examples/AgentParametersExample.js +2 -37
  141. package/lib/examples/AgentSkillsExample.js +3 -45
  142. package/lib/examples/AgentSubagentsExample.js +6 -56
  143. package/lib/examples/AgentToolApprovalsExample.js +1 -11
  144. package/lib/examples/AgentTriggersExample.js +29 -239
  145. package/lib/examples/AgentspecsExample.js +6 -60
  146. package/lib/examples/AssistantExample.js +5 -5
  147. package/lib/examples/AssistantGalleryExample.js +8 -65
  148. package/lib/examples/CellExample.js +1 -6
  149. package/lib/examples/ChatCustomExample.js +2 -31
  150. package/lib/examples/ChatExample.js +1 -9
  151. package/lib/examples/ChatStandaloneExample.js +3 -37
  152. package/lib/examples/CopilotKitLexicalExample.js +1 -24
  153. package/lib/examples/DecksAgent.js +1 -1
  154. package/lib/examples/DocumentPageAgent.js +1 -1
  155. package/lib/examples/HomeExample.js +14 -62
  156. package/lib/examples/Lexical2Example.js +3 -32
  157. package/lib/examples/LexicalAgentExample.js +2 -34
  158. package/lib/examples/LexicalAgentSidebarExample.js +3 -34
  159. package/lib/examples/LoopAppComputerExample.js +1 -1
  160. package/lib/examples/LoopShellExample.js +2 -2
  161. package/lib/examples/LoopStrategyExample.js +15 -87
  162. package/lib/examples/LoopWorkspaceEmbed.js +2 -18
  163. package/lib/examples/LoopWorkspaceExample.js +2 -2
  164. package/lib/examples/NotebookAgentExample.js +2 -33
  165. package/lib/examples/NotebookAgentSidebarExample.js +3 -46
  166. package/lib/examples/NotebookCollaborationExample.js +1 -31
  167. package/lib/examples/NotebookExample.js +1 -18
  168. package/lib/examples/NotebookPageAgent.js +1 -1
  169. package/lib/examples/ScenesExample.js +5 -24
  170. package/lib/examples/VoiceChatExample.js +1 -1
  171. package/lib/examples/components/AuthRequiredView.js +1 -7
  172. package/lib/examples/components/ErrorView.js +1 -8
  173. package/lib/examples/components/ExampleErrorBoundary.js +1 -14
  174. package/lib/examples/components/FooterMetrics.js +1 -7
  175. package/lib/examples/components/Header.js +12 -51
  176. package/lib/examples/components/HeaderControls.js +1 -9
  177. package/lib/examples/components/LexicalEditor.js +1 -8
  178. package/lib/examples/components/MainContent.js +1 -13
  179. package/lib/examples/components/MockFileBrowser.js +4 -40
  180. package/lib/examples/components/SessionTabs.js +1 -1
  181. package/lib/examples/components/TimeTravel.js +1 -13
  182. package/lib/examples/main.js +13 -81
  183. package/lib/examples/scenes/A2UiComponentsGalleryScene.js +3 -34
  184. package/lib/examples/scenes/A2UiContactCardScene.js +3 -35
  185. package/lib/examples/scenes/A2UiRestaurantScene.js +3 -53
  186. package/lib/examples/scenes/A2UiViewerScene.js +3 -34
  187. package/lib/examples/utils/AssistantGalleryGrid.js +6 -35
  188. package/lib/examples2/DatalayerNotebookExample.js +3 -33
  189. package/lib/examples2/NativeNavigationExample.js +4 -10
  190. package/lib/examples2/NotebookMutationsKernel.js +2 -1
  191. package/lib/examples2/NotebookMutationsServiceManager.js +2 -1
  192. package/lib/examples2/ReactRouterExample.js +14 -42
  193. package/lib/hooks/useToolApprovals.d.ts +2 -34
  194. package/lib/hooks/useToolApprovals.js +1 -64
  195. package/lib/identity/AgentIdentity.js +17 -62
  196. package/lib/identity/IdentityConnect.js +13 -59
  197. package/lib/identity/OAuthCallback.js +6 -44
  198. package/lib/lexical/ChatInlinePlugin.js +6 -14
  199. package/lib/loop/apps/AppFeedback.js +12 -3
  200. package/lib/loop/apps/AppRenderer.d.ts +4 -3
  201. package/lib/loop/apps/AppRenderer.js +11 -12
  202. package/lib/loop/apps/appspec.js +6 -3
  203. package/lib/loop/apps/feedback.d.ts +3 -2
  204. package/lib/loop/apps/feedback.js +4 -2
  205. package/lib/loop/core/index.d.ts +19 -0
  206. package/lib/loop/core/index.js +27 -0
  207. package/lib/loop/embed/AppEmbed.d.ts +1 -1
  208. package/lib/loop/embed/AppEmbed.js +2 -1
  209. package/lib/loop/embed/LoopEmbed.js +1 -7
  210. package/lib/loop/embed/embedConfig.d.ts +3 -3
  211. package/lib/loop/embed/embedConfig.js +2 -3
  212. package/lib/loop/embed/embedTheme.d.ts +4 -4
  213. package/lib/loop/embed/embedTheme.js +11 -7
  214. package/lib/loop/plugins/a2a-sidebar/A2ASidebar.js +7 -34
  215. package/lib/loop/plugins/a2ui/A2uiView.js +4 -12
  216. package/lib/loop/plugins/a2ui-surface/InlineSurface.js +1 -16
  217. package/lib/loop/plugins/a2ui-surface/SurfaceToolResult.js +2 -12
  218. package/lib/loop/plugins/agents/AnonymousKeyBadge.js +3 -2
  219. package/lib/loop/plugins/agents/SandboxSelector.js +3 -7
  220. package/lib/loop/plugins/agents/SandboxView.js +4 -27
  221. package/lib/loop/plugins/agents/TeamMemberPicker.js +2 -2
  222. package/lib/loop/plugins/agentspecs/AgentspecPicker.js +3 -2
  223. package/lib/loop/plugins/app-activity/AppActivity.js +1 -1
  224. package/lib/loop/plugins/app-computer/AppComputer.js +32 -27
  225. package/lib/loop/plugins/app-elements/AppElements.js +2 -31
  226. package/lib/loop/plugins/app-page/AppPage.js +26 -8
  227. package/lib/loop/plugins/app-rules/AppRulesCard.js +4 -20
  228. package/lib/loop/plugins/assistant/index.js +1 -13
  229. package/lib/loop/plugins/chat/ChatView.js +89 -130
  230. package/lib/loop/plugins/checkpoints-sidebar/CheckpointsSidebar.js +2 -13
  231. package/lib/loop/plugins/decks/DeckSurface.js +2 -2
  232. package/lib/loop/plugins/document/DocumentView.js +4 -12
  233. package/lib/loop/plugins/document-toolbar/SandboxStatusItem.js +3 -8
  234. package/lib/loop/plugins/graph/GraphView.js +2 -2
  235. package/lib/loop/plugins/input-prompt/ComposerView.js +1 -1
  236. package/lib/loop/plugins/notebook/NotebookView.js +3 -11
  237. package/lib/loop/plugins/page-layout/SplitLayout.js +11 -34
  238. package/lib/loop/plugins/page-layout/TurnPanel.js +9 -35
  239. package/lib/loop/plugins/shell/useEditorPreviews.js +3 -2
  240. package/lib/loop/plugins/subagent-activity/SubagentPulse.js +1 -13
  241. package/lib/loop/plugins/window-frame/WindowFrame.js +10 -44
  242. package/lib/loop/plugins/window-frame/index.js +1 -1
  243. package/lib/loop/shell/LoopWorkspace.js +34 -77
  244. package/lib/loop/shell/PluginToggles.js +4 -15
  245. package/lib/loop/shell/SidebarRail.js +8 -40
  246. package/lib/loop/shell/ViewSwitcher.js +4 -24
  247. package/lib/loop-main.js +2 -3
  248. package/lib/mcp/McpServerManager.js +6 -37
  249. package/lib/portable/index.d.ts +11 -0
  250. package/lib/portable/index.js +20 -0
  251. package/lib/protocols/AGUIAdapter.js +2 -2
  252. package/lib/protocols/BaseProtocolAdapter.d.ts +2 -0
  253. package/lib/protocols/BaseProtocolAdapter.js +4 -0
  254. package/lib/specs/apps.js +6 -0
  255. package/lib/specs/appspecSchema.js +11 -4
  256. package/lib/stories/loop/ReferenceScreens.js +17 -91
  257. package/lib/stories/loop/pictures-main.js +1 -1
  258. package/lib/types/agentspecs.d.ts +5 -2
  259. package/lib/types/protocol.d.ts +2 -0
  260. package/lib/utils/approvals.d.ts +59 -0
  261. package/lib/utils/approvals.js +101 -0
  262. package/lib/voice/VoiceInput.js +3 -39
  263. package/package.json +2 -2
  264. package/lib/shims/primerAddonsBox.d.ts +0 -1
  265. package/lib/shims/primerAddonsBox.js +0 -7
@@ -69,13 +69,9 @@ function deriveAggregate(status) {
69
69
  return 'idle';
70
70
  }
71
71
  function renderSandboxGlyph(aggregate) {
72
- return (_jsx(Box, { as: "span", sx: {
73
- display: 'inline-block',
74
- width: 10,
75
- height: 10,
76
- borderRadius: '50%',
77
- bg: SANDBOX_INDICATOR_COLORS[aggregate],
78
- ...(aggregate === 'executing' && {
72
+ return (_jsx(Box, { as: "span", display: "inline-block", width: 10, height: 10, borderRadius: "50%", bg: SANDBOX_INDICATOR_COLORS[aggregate], sx: aggregate !== 'executing'
73
+ ? undefined
74
+ : {
79
75
  animation: 'sandbox-busy-fade 1.2s ease-in-out infinite',
80
76
  '@keyframes sandbox-busy-fade': {
81
77
  '0%': {
@@ -94,8 +90,7 @@ function renderSandboxGlyph(aggregate) {
94
90
  filter: 'saturate(1)',
95
91
  },
96
92
  },
97
- }),
98
- } }));
93
+ } }));
99
94
  }
100
95
  /* ── Component ─────────────────────────────────────────── */
101
96
  export function SandboxStatusIndicator({ apiBase, authToken, agentId, statusOverride, }) {
@@ -166,12 +161,7 @@ export function SandboxStatusIndicator({ apiBase, authToken, agentId, statusOver
166
161
  }, [aggregate, effectiveStatus]);
167
162
  // Show a subtle gray dot when sandbox is unavailable.
168
163
  // The tooltip tells the user none is configured.
169
- return (_jsxs(Box, { as: "span", sx: {
170
- position: 'relative',
171
- display: 'inline-flex',
172
- alignItems: 'center',
173
- justifyContent: 'center',
174
- }, onMouseEnter: () => setIsOverlayOpen(true), onMouseLeave: () => setIsOverlayOpen(false), children: [_jsx("button", { type: "button", "aria-label": tooltipText, onClick: aggregate === 'executing' ? sendInterrupt : undefined, onFocus: () => setIsOverlayOpen(true), onBlur: () => setIsOverlayOpen(false), style: {
164
+ return (_jsxs(Box, { as: "span", position: "relative", display: "inline-flex", alignItems: "center", justifyContent: "center", onMouseEnter: () => setIsOverlayOpen(true), onMouseLeave: () => setIsOverlayOpen(false), children: [_jsx("button", { type: "button", "aria-label": tooltipText, onClick: aggregate === 'executing' ? sendInterrupt : undefined, onFocus: () => setIsOverlayOpen(true), onBlur: () => setIsOverlayOpen(false), style: {
175
165
  display: 'inline-flex',
176
166
  alignItems: 'center',
177
167
  justifyContent: 'center',
@@ -187,24 +177,6 @@ export function SandboxStatusIndicator({ apiBase, authToken, agentId, statusOver
187
177
  appearance: 'none',
188
178
  cursor: aggregate === 'executing' ? 'pointer' : 'default',
189
179
  lineHeight: 0,
190
- }, children: _jsx(Box, { as: "span", sx: { display: 'inline-flex', alignItems: 'center', flexShrink: 0 }, children: renderSandboxGlyph(aggregate) }) }), isOverlayOpen && (_jsxs(Box, { role: "tooltip", sx: {
191
- position: 'absolute',
192
- right: 0,
193
- top: 'calc(100% + 6px)',
194
- minWidth: 220,
195
- px: 2,
196
- py: 2,
197
- borderRadius: 2,
198
- bg: 'canvas.overlay',
199
- color: 'fg.default',
200
- fontSize: 0,
201
- lineHeight: 1.5,
202
- boxShadow: 'shadow.medium',
203
- border: '1px solid',
204
- borderColor: 'border.default',
205
- zIndex: 1000,
206
- fontFamily: 'mono',
207
- pointerEvents: 'none',
208
- }, children: [_jsx(Box, { sx: { mb: 1, fontWeight: 600, fontFamily: 'normal' }, children: tooltipText }), effectiveStatus ? (_jsxs(_Fragment, { children: [_jsxs(Box, { children: [_jsxs(Box, { as: "span", sx: { fontWeight: 600 }, children: ["variant:", ' '] }), _jsx(Box, { as: "span", children: effectiveStatus.variant })] }), _jsxs(Box, { children: [_jsxs(Box, { as: "span", sx: { fontWeight: 600 }, children: ["sandbox_running:", ' '] }), _jsx(Box, { as: "span", children: String(effectiveStatus.sandbox_running) })] }), _jsxs(Box, { children: [_jsxs(Box, { as: "span", sx: { fontWeight: 600 }, children: ["is_executing:", ' '] }), _jsx(Box, { as: "span", children: String(effectiveStatus.is_executing) })] }), effectiveStatus.jupyter_url && (_jsxs(Box, { sx: { wordBreak: 'break-all' }, children: [_jsxs(Box, { as: "span", sx: { fontWeight: 600 }, children: ["jupyter_url:", ' '] }), _jsx(Box, { as: "span", children: effectiveStatus.jupyter_url })] })), effectiveStatus.error && (_jsx(Box, { sx: { mt: 1, color: 'danger.fg' }, children: effectiveStatus.error })), aggregate === 'executing' && (_jsx(Box, { sx: { mt: 1, fontFamily: 'normal', color: 'fg.muted' }, children: "Click to interrupt execution" }))] })) : (_jsx(Box, { sx: { fontFamily: 'normal', color: 'fg.muted' }, children: "No sandbox configured for this agent." }))] }))] }));
180
+ }, children: _jsx(Box, { as: "span", display: "inline-flex", alignItems: "center", flexShrink: 0, children: renderSandboxGlyph(aggregate) }) }), isOverlayOpen && (_jsxs(Box, { role: "tooltip", position: "absolute", right: 0, top: "calc(100% + 6px)", minWidth: 220, px: 2, py: 2, borderRadius: 2, bg: "canvas.overlay", color: "fg.default", fontSize: 0, lineHeight: 1.5, boxShadow: "shadow.medium", border: "1px solid", borderColor: "border.default", zIndex: 1000, fontFamily: "mono", pointerEvents: "none", children: [_jsx(Box, { mb: 1, fontWeight: 600, fontFamily: "normal", children: tooltipText }), effectiveStatus ? (_jsxs(_Fragment, { children: [_jsxs(Box, { children: [_jsxs(Box, { as: "span", fontWeight: 600, children: ["variant:", ' '] }), _jsx(Box, { as: "span", children: effectiveStatus.variant })] }), _jsxs(Box, { children: [_jsxs(Box, { as: "span", fontWeight: 600, children: ["sandbox_running:", ' '] }), _jsx(Box, { as: "span", children: String(effectiveStatus.sandbox_running) })] }), _jsxs(Box, { children: [_jsxs(Box, { as: "span", fontWeight: 600, children: ["is_executing:", ' '] }), _jsx(Box, { as: "span", children: String(effectiveStatus.is_executing) })] }), effectiveStatus.jupyter_url && (_jsxs(Box, { wordBreak: "break-all", children: [_jsxs(Box, { as: "span", fontWeight: 600, children: ["jupyter_url:", ' '] }), _jsx(Box, { as: "span", children: effectiveStatus.jupyter_url })] })), effectiveStatus.error && (_jsx(Box, { mt: 1, color: "danger.fg", children: effectiveStatus.error })), aggregate === 'executing' && (_jsx(Box, { mt: 1, fontFamily: "normal", color: "fg.muted", children: "Click to interrupt execution" }))] })) : (_jsx(Box, { fontFamily: "normal", color: "fg.muted", children: "No sandbox configured for this agent." }))] }))] }));
209
181
  }
210
182
  export default SandboxStatusIndicator;
@@ -76,17 +76,8 @@ export function SkillsStatusIndicator({ skillsCount, enabledCount, loading = fal
76
76
  background: 'none',
77
77
  cursor: 'default',
78
78
  lineHeight: 0,
79
- }, children: _jsx(Box, { as: "span", sx: {
80
- display: 'inline-block',
81
- width: 12,
82
- height: 12,
83
- borderRadius: '50%',
84
- bg: SKILLS_STATUS_COLORS[aggregate],
85
- flexShrink: 0,
86
- ...(aggregate === 'loading' && {
87
- animation: 'skills-pulse 1.5s ease-in-out infinite',
88
- }),
89
- '@media (prefers-reduced-motion: reduce)': { animation: 'none' },
90
- } }) }) }));
79
+ }, children: _jsx(Box, { as: "span", display: "inline-block", width: 12, height: 12, borderRadius: "50%", bg: SKILLS_STATUS_COLORS[aggregate], flexShrink: 0, animation: aggregate === 'loading'
80
+ ? 'skills-pulse 1.5s ease-in-out infinite'
81
+ : undefined, reducedMotion: { animation: 'none' } }) }) }));
91
82
  }
92
83
  export default SkillsStatusIndicator;
@@ -1,21 +1,11 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Box } from '@datalayer/primer-addons';
3
3
  export function TypingDots({ size = 8 }) {
4
- return (_jsx(Box, { "aria-hidden": "true", "data-typing-dots": "", sx: { display: 'inline-flex', alignItems: 'center', gap: '4px' }, children: [0, 0.2, 0.4].map((delay, index) => (_jsx(Box, { sx: {
5
- width: size,
6
- height: size,
7
- borderRadius: '50%',
8
- bg: 'fg.muted',
9
- animation: 'typingPulse 1.4s ease-in-out infinite',
10
- animationDelay: `${delay}s`,
4
+ return (_jsx(Box, { "aria-hidden": "true", "data-typing-dots": "", display: "inline-flex", alignItems: "center", gap: "4px", children: [0, 0.2, 0.4].map((delay, index) => (_jsx(Box, { width: size, height: size, borderRadius: "50%", bg: "fg.muted", animation: "typingPulse 1.4s ease-in-out infinite", animationDelay: `${delay}s`, reducedMotion: { animation: 'none', opacity: 0.7 }, sx: {
11
5
  '@keyframes typingPulse': {
12
6
  '0%, 60%, 100%': { transform: 'scale(0.6)', opacity: 0.4 },
13
7
  '30%': { transform: 'scale(1)', opacity: 1 },
14
8
  },
15
- '@media (prefers-reduced-motion: reduce)': {
16
- animation: 'none',
17
- opacity: 0.7,
18
- },
19
9
  } }, index))) }));
20
10
  }
21
11
  export default TypingDots;
@@ -229,34 +229,7 @@ export function SubagentChatPanel({ toolCallId, subagentName: subagentNameHint,
229
229
  : overA2A && remote?.state === 'launching'
230
230
  ? 'launching\u2026'
231
231
  : 'working\u2026';
232
- return (_jsxs(Box, { "data-subagent-panel": subagentName, "data-subagent-transport": overA2A ? 'a2a' : 'in-process', sx: {
233
- mt: 2,
234
- display: 'flex',
235
- flexDirection: 'column',
236
- height,
237
- width: '100%',
238
- border: '1px solid',
239
- borderColor: `${tone}.emphasis`,
240
- borderRadius: 2,
241
- overflow: 'hidden',
242
- bg: 'canvas.default',
243
- }, children: [_jsxs(Box, { sx: {
244
- display: 'flex',
245
- alignItems: 'center',
246
- gap: 1,
247
- px: 2,
248
- py: 1,
249
- borderBottom: '1px solid',
250
- borderColor: `${tone}.muted`,
251
- bg: `${tone}.subtle`,
252
- flexShrink: 0,
253
- }, children: [_jsx(Box, { sx: { display: 'flex', color: `${tone}.fg` }, children: overA2A ? _jsx(BroadcastIcon, { size: 14 }) : _jsx(DependabotIcon, { size: 14 }) }), _jsx(Text, { sx: { fontSize: 0, color: `${tone}.fg` }, children: overA2A ? 'A2A agent' : 'Subagent' }), _jsx(Text, { sx: { fontSize: 0, fontWeight: 'bold', color: `${tone}.fg` }, children: subagentName }), remote?.launch ? (_jsx(Text, { sx: { fontSize: 0, color: `${tone}.fg`, opacity: 0.8 }, children: remote.launch })) : null, remote ? (_jsx(Link, { as: "button", type: "button", "data-a2a-card-button": true, onClick: () => setCardOpen(true), sx: { fontSize: 0, ml: 1 }, children: "card" })) : null, _jsx(Text, { sx: { fontSize: 0, color: `${tone}.fg`, ml: 'auto' }, children: progress })] }), cardOpen && remote ? (_jsx(A2AAgentDialog, { details: remote, onClose: () => setCardOpen(false) })) : null, _jsx(Box, { sx: { flex: 1, minHeight: 0, overflowY: 'auto' }, children: _jsx(ChatMessageList, { displayItems: displayItems, isLoading: !isDone, isStreaming: !isDone, showLoadingIndicator: !isDone, hideMessagesAfterToolUI: false, avatarConfig: avatarConfig, padding: 2, onRespond: handleRespond, messagesEndRef: messagesEndRef, emptyContent: _jsxs(Box, { sx: {
254
- display: 'flex',
255
- alignItems: 'center',
256
- gap: 1,
257
- color: 'fg.muted',
258
- p: 2,
259
- }, children: [_jsx(Spinner, { size: "small" }), _jsx(Text, { sx: { fontSize: 0 }, children: "Starting\u2026" })] }) }) })] }));
232
+ return (_jsxs(Box, { "data-subagent-panel": subagentName, "data-subagent-transport": overA2A ? 'a2a' : 'in-process', mt: 2, display: "flex", flexDirection: "column", height: height, width: "100%", border: "1px solid", borderColor: `${tone}.emphasis`, borderRadius: 2, overflow: "hidden", bg: "canvas.default", children: [_jsxs(Box, { display: "flex", alignItems: "center", gap: 1, px: 2, py: 1, borderBottom: "1px solid", borderColor: `${tone}.muted`, bg: `${tone}.subtle`, flexShrink: 0, children: [_jsx(Box, { display: "flex", color: `${tone}.fg`, children: overA2A ? _jsx(BroadcastIcon, { size: 14 }) : _jsx(DependabotIcon, { size: 14 }) }), _jsx(Text, { sx: { fontSize: 0, color: `${tone}.fg` }, children: overA2A ? 'A2A agent' : 'Subagent' }), _jsx(Text, { sx: { fontSize: 0, fontWeight: 'bold', color: `${tone}.fg` }, children: subagentName }), remote?.launch ? (_jsx(Text, { sx: { fontSize: 0, color: `${tone}.fg`, opacity: 0.8 }, children: remote.launch })) : null, remote ? (_jsx(Link, { as: "button", type: "button", "data-a2a-card-button": true, onClick: () => setCardOpen(true), sx: { fontSize: 0, ml: 1 }, children: "card" })) : null, _jsx(Text, { sx: { fontSize: 0, color: `${tone}.fg`, ml: 'auto' }, children: progress })] }), cardOpen && remote ? (_jsx(A2AAgentDialog, { details: remote, onClose: () => setCardOpen(false) })) : null, _jsx(Box, { flex: 1, minHeight: 0, overflowY: "auto", children: _jsx(ChatMessageList, { displayItems: displayItems, isLoading: !isDone, isStreaming: !isDone, showLoadingIndicator: !isDone, hideMessagesAfterToolUI: false, avatarConfig: avatarConfig, padding: 2, onRespond: handleRespond, messagesEndRef: messagesEndRef, emptyContent: _jsxs(Box, { display: "flex", alignItems: "center", gap: 1, color: "fg.muted", p: 2, children: [_jsx(Spinner, { size: "small" }), _jsx(Text, { sx: { fontSize: 0 }, children: "Starting\u2026" })] }) }) })] }));
260
233
  }
261
234
  // ---------------------------------------------------------------------------
262
235
  // DefaultToolCallRenderer — reads approvals from the Zustand store,
@@ -507,23 +480,17 @@ export function ChatMessageList({ displayItems, isLoading, isStreaming, showLoad
507
480
  : defaultUI;
508
481
  if (toolUI === null || toolUI === undefined)
509
482
  return null;
510
- return (_jsx(Box, { "data-chat-tool-row": item.toolName, sx: {
511
- display: 'flex',
512
- flexDirection: 'column',
513
- alignItems: 'flex-start',
514
- /*
515
- The full column. `maxWidth: '95%'` with content-driven
516
- width left every tool card as wide as its longest line, so
517
- a transcript of executions was a ragged stack of
518
- differently-sized boxes. The default row still hugs its
519
- content under `alignItems`; anything that declares
520
- `width: '100%'` — the cell and output surfaces do — gets
521
- the whole measure.
522
- */
523
- width: '100%',
524
- px: padding,
525
- py: compact ? '2px' : 1,
526
- }, children: toolUI }, item.id));
483
+ return (_jsx(Box, { "data-chat-tool-row": item.toolName, display: "flex", flexDirection: "column", alignItems: "flex-start",
484
+ /*
485
+ The full column. `maxWidth: '95%'` with content-driven
486
+ width left every tool card as wide as its longest line, so
487
+ a transcript of executions was a ragged stack of
488
+ differently-sized boxes. The default row still hugs its
489
+ content under `alignItems`; anything that declares
490
+ `width: '100%'` — the cell and output surfaces do — gets
491
+ the whole measure.
492
+ */
493
+ width: "100%", px: padding, py: compact ? '2px' : 1, children: toolUI }, item.id));
527
494
  }
528
495
  // ---- Chat message item ----
529
496
  const message = item;
@@ -545,20 +512,7 @@ export function ChatMessageList({ displayItems, isLoading, isStreaming, showLoad
545
512
  : message.note === 'waiting'
546
513
  ? ClockIcon
547
514
  : SkipIcon;
548
- return (_jsx(Box, { sx: { display: 'flex', justifyContent: 'center', px: padding, py: 1 }, children: _jsxs(Box, { sx: {
549
- display: 'inline-flex',
550
- gap: 2,
551
- alignItems: 'center',
552
- px: 3,
553
- py: 1,
554
- borderRadius: 999,
555
- bg: 'canvas.subtle',
556
- border: '1px solid',
557
- borderColor: 'border.muted',
558
- color: noteColor,
559
- fontSize: 0,
560
- maxWidth: '90%',
561
- }, children: [_jsx(NoteIcon, { size: 14 }), speaker ? (_jsx(Text, { sx: { fontWeight: 'semibold' }, children: speaker.name })) : null, _jsx(Text, { sx: { color: 'fg.muted' }, children: getMessageText(message) }), message.createdAt ? (_jsx(RelativeTime, { datetime: message.createdAt.toISOString(), sx: { color: 'fg.muted' } })) : null] }) }, message.id));
515
+ return (_jsx(Box, { display: "flex", justifyContent: "center", px: padding, py: 1, children: _jsxs(Box, { display: "inline-flex", gap: 2, alignItems: "center", px: 3, py: 1, borderRadius: 999, bg: "canvas.subtle", border: "1px solid", borderColor: "border.muted", color: noteColor, fontSize: 0, maxWidth: "90%", children: [_jsx(NoteIcon, { size: 14 }), speaker ? (_jsx(Text, { sx: { fontWeight: 'semibold' }, children: speaker.name })) : null, _jsx(Text, { sx: { color: 'fg.muted' }, children: getMessageText(message) }), message.createdAt ? (_jsx(RelativeTime, { datetime: message.createdAt.toISOString(), sx: { color: 'fg.muted' } })) : null] }) }, message.id));
562
516
  }
563
517
  // Optionally hide assistant messages that follow a rendered tool call
564
518
  if (!isUser && hideMessagesAfterToolUI && hasRenderedToolCall) {
@@ -591,63 +545,33 @@ export function ChatMessageList({ displayItems, isLoading, isStreaming, showLoad
591
545
  }
592
546
  }
593
547
  }
594
- return (_jsx(Box, { "data-chat-message": message.role, sx: {
595
- display: 'flex',
596
- flexDirection: 'column',
597
- alignItems: isUser ? 'flex-end' : 'flex-start',
598
- px: padding,
599
- py: compact ? '2px' : 1,
600
- }, children: _jsxs(Box, { sx: {
601
- display: 'flex',
602
- gap: 2,
603
- flexDirection: isUser ? 'row-reverse' : 'row',
604
- alignItems: 'flex-start',
605
- /*
606
- Full width, always.
607
-
608
- This row used to shrink to its content under the column's
609
- alignment, so the bubble's `maxWidth: '85%'` resolved
610
- against a parent whose width was itself the content's —
611
- circular geometry that re-settled with every streamed
612
- chunk, and the person's own message drifted leftward while
613
- the agent was answering. A full-width row is fixed ground:
614
- `row-reverse` pins the person's bubble to the right edge,
615
- `row` pins the agent's to the left, and 85% means 85% of
616
- the column whatever is being generated below.
617
- */
618
- width: '100%',
619
- }, children: [avatarConfig.showAvatars && (_jsx(Box, { sx: {
620
- width: avatarConfig.avatarSize,
621
- height: avatarConfig.avatarSize,
622
- borderRadius: '50%',
623
- bg: speaker
624
- ? toneColorsOf(speaker.tone).emphasis
625
- : isUser
626
- ? avatarConfig.userAvatarBg
627
- : avatarConfig.assistantAvatarBg,
628
- color: speaker
629
- ? 'fg.onEmphasis'
630
- : isUser
631
- ? 'fg.default'
632
- : 'var(--button-primary-fgColor-rest, var(--fgColor-onEmphasis))',
633
- display: 'flex',
634
- alignItems: 'center',
635
- justifyContent: 'center',
636
- flexShrink: 0,
637
- fontSize: speaker ? 0 : undefined,
638
- fontWeight: speaker ? 'bold' : undefined,
639
- }, children: speaker
548
+ return (_jsx(Box, { "data-chat-message": message.role, display: "flex", flexDirection: "column", alignItems: isUser ? 'flex-end' : 'flex-start', px: padding, py: compact ? '2px' : 1, children: _jsxs(Box, { display: "flex", gap: 2, flexDirection: isUser ? 'row-reverse' : 'row', alignItems: "flex-start",
549
+ /*
550
+ Full width, always.
551
+
552
+ This row used to shrink to its content under the column's
553
+ alignment, so the bubble's `maxWidth: '85%'` resolved
554
+ against a parent whose width was itself the content's —
555
+ circular geometry that re-settled with every streamed
556
+ chunk, and the person's own message drifted leftward while
557
+ the agent was answering. A full-width row is fixed ground:
558
+ `row-reverse` pins the person's bubble to the right edge,
559
+ `row` pins the agent's to the left, and 85% means 85% of
560
+ the column whatever is being generated below.
561
+ */
562
+ width: "100%", children: [avatarConfig.showAvatars && (_jsx(Box, { width: avatarConfig.avatarSize, height: avatarConfig.avatarSize, borderRadius: "50%", bg: speaker
563
+ ? toneColorsOf(speaker.tone).emphasis
564
+ : isUser
565
+ ? avatarConfig.userAvatarBg
566
+ : avatarConfig.assistantAvatarBg, color: speaker
567
+ ? 'fg.onEmphasis'
568
+ : isUser
569
+ ? 'fg.default'
570
+ : 'var(--button-primary-fgColor-rest, var(--fgColor-onEmphasis))', display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0, fontSize: speaker ? 0 : undefined, fontWeight: speaker ? 'bold' : undefined, children: speaker
640
571
  ? speaker.initials || '?'
641
572
  : isUser
642
573
  ? avatarConfig.userAvatar
643
- : avatarConfig.assistantAvatar })), _jsxs(Box, { sx: { maxWidth: compact ? '92%' : '85%', minWidth: 0 }, children: [speaker ? (_jsxs(Box, { sx: {
644
- display: 'flex',
645
- gap: 2,
646
- alignItems: 'baseline',
647
- flexWrap: 'wrap',
648
- flexDirection: isUser ? 'row-reverse' : 'row',
649
- mb: 1,
650
- }, children: [_jsx(Text, { sx: {
574
+ : avatarConfig.assistantAvatar })), _jsxs(Box, { maxWidth: compact ? '92%' : '85%', minWidth: 0, children: [speaker ? (_jsxs(Box, { display: "flex", gap: 2, alignItems: "baseline", flexWrap: "wrap", flexDirection: isUser ? 'row-reverse' : 'row', mb: 1, children: [_jsx(Text, { sx: {
651
575
  fontWeight: 'semibold',
652
576
  fontSize: 1,
653
577
  color: toneColorsOf(speaker.tone).fg,
@@ -661,42 +585,29 @@ export function ChatMessageList({ displayItems, isLoading, isStreaming, showLoad
661
585
  fontWeight: 'semibold',
662
586
  fontSize: 1,
663
587
  color: toneColorsOf(message.directedTo.tone).fg,
664
- }, children: message.directedTo.name })] })) : speaker.role ? (_jsx(Label, { size: "small", children: speaker.role })) : null, message.createdAt ? (_jsx(RelativeTime, { datetime: message.createdAt.toISOString(), sx: { fontSize: 0, color: 'fg.muted' } })) : null] })) : null, _jsxs(Box, { sx: {
665
- p: compact ? 1 : 2,
666
- px: compact ? 2 : 2,
667
- overflowX: 'auto',
668
- // The theme's bubble (LOOP T-03, T-06): today's 6px elsewhere.
669
- borderRadius: 'var(--theme-radius-bubble, 6px)',
670
- // A message arriving, at the theme's pace (LOOP T-10): no
671
- // motion in a theme that sets none, nor when motion is reduced.
672
- animation: 'chatMessageArrive var(--theme-motion-message, 0ms) var(--theme-motion-easing, ease) both',
588
+ }, children: message.directedTo.name })] })) : speaker.role ? (_jsx(Label, { size: "small", children: speaker.role })) : null, message.createdAt ? (_jsx(RelativeTime, { datetime: message.createdAt.toISOString(), sx: { fontSize: 0, color: 'fg.muted' } })) : null] })) : null, _jsxs(Box, { p: compact ? 1 : 2, px: compact ? 2 : 2, overflowX: "auto",
589
+ // The theme's bubble (LOOP T-03, T-06): today's 6px elsewhere.
590
+ borderRadius: "bubble",
591
+ // A message arriving, at the theme's pace (LOOP T-10): no
592
+ // motion in a theme that sets none, nor when motion is reduced.
593
+ animation: "chatMessageArrive var(--theme-motion-message) var(--theme-motion-easing) both", reducedMotion: { animation: 'none' }, backgroundColor: isUser
594
+ ? 'accent.emphasis'
595
+ : speaker
596
+ ? toneColorsOf(speaker.tone).subtle
597
+ : 'canvas.subtle', border: !isUser && speaker ? '1px solid' : undefined, borderColor: !isUser && speaker
598
+ ? toneColorsOf(speaker.tone).muted
599
+ : undefined,
600
+ // Use primary-button text token for better contrast when
601
+ // accent.emphasis is bright (e.g. Matrix dark theme).
602
+ color: isUser
603
+ ? 'var(--button-primary-fgColor-rest, var(--fgColor-onEmphasis))'
604
+ : 'fg.default', sx: {
673
605
  '@keyframes chatMessageArrive': {
674
606
  from: { opacity: 0, transform: 'translateY(4px)' },
675
607
  to: { opacity: 1, transform: 'none' },
676
608
  },
677
- '@media (prefers-reduced-motion: reduce)': {
678
- animation: 'none',
679
- },
680
- backgroundColor: isUser
681
- ? 'accent.emphasis'
682
- : speaker
683
- ? toneColorsOf(speaker.tone).subtle
684
- : 'canvas.subtle',
685
- border: !isUser && speaker ? '1px solid' : undefined,
686
- borderColor: !isUser && speaker
687
- ? toneColorsOf(speaker.tone).muted
688
- : undefined,
689
- // Use primary-button text token for better contrast when
690
- // accent.emphasis is bright (e.g. Matrix dark theme).
691
- color: isUser
692
- ? 'var(--button-primary-fgColor-rest, var(--fgColor-onEmphasis))'
693
- : 'fg.default',
694
609
  ...streamdownCodeBlockStyles,
695
- }, children: [message.toolChips?.length ? (_jsx(Box, { sx: { display: 'flex', gap: 1, flexWrap: 'wrap', mb: 2 }, children: message.toolChips.map((label, chipIndex) => (_jsx(Label, { variant: "secondary", size: "small", children: _jsxs(Box, { as: "span", sx: {
696
- display: 'inline-flex',
697
- gap: 1,
698
- alignItems: 'center',
699
- }, children: [_jsx(ToolsIcon, { size: 10 }), " ", label] }) }, `${label}-${chipIndex}`))) })) : null, isUser ? ((() => {
610
+ }, children: [message.toolChips?.length ? (_jsx(Box, { display: "flex", gap: 1, flexWrap: "wrap", mb: 2, children: message.toolChips.map((label, chipIndex) => (_jsx(Label, { variant: "secondary", size: "small", children: _jsxs(Box, { as: "span", display: "inline-flex", gap: 1, alignItems: "center", children: [_jsx(ToolsIcon, { size: 10 }), " ", label] }) }, `${label}-${chipIndex}`))) })) : null, isUser ? ((() => {
700
611
  // A submitted form is drawn as the form, not as the JSON
701
612
  // the agent reads — see `formSubmission`.
702
613
  const text = getMessageText(message);
@@ -705,20 +616,8 @@ export function ChatMessageList({ displayItems, isLoading, isStreaming, showLoad
705
616
  fontSize: compact ? 0 : 1,
706
617
  whiteSpace: 'pre-wrap',
707
618
  wordBreak: 'break-word',
708
- }, children: [message.metadata?.input === 'voice' ? (_jsx(Box, { as: "span", "data-spoken": "", title: "Said aloud", "aria-label": "Said aloud:", sx: {
709
- display: 'inline-flex',
710
- verticalAlign: 'text-bottom',
711
- mr: 1,
712
- opacity: 0.85,
713
- }, children: _jsx(MicrophoneIcon, { size: 14, "aria-hidden": "true" }) })) : null, text] }));
714
- })()) : message.live && !getMessageText(message) ? (_jsx(TypingDots, { size: 6 })) : (_jsx(ChatMarkdown, { density: density, text: getMessageText(message) || (isStreaming ? '...' : '') }))] }), renderMessageFooter ? (_jsx(Box, { sx: {
715
- display: 'flex',
716
- gap: 2,
717
- alignItems: 'center',
718
- mt: 1,
719
- flexWrap: 'wrap',
720
- flexDirection: isUser ? 'row-reverse' : 'row',
721
- }, children: renderMessageFooter(message) })) : null] })] }) }, message.id));
619
+ }, children: [message.metadata?.input === 'voice' ? (_jsx(Box, { as: "span", "data-spoken": "", title: "Said aloud", "aria-label": "Said aloud:", display: "inline-flex", verticalAlign: "text-bottom", mr: 1, opacity: 0.85, children: _jsx(MicrophoneIcon, { size: 14, "aria-hidden": "true" }) })) : null, text] }));
620
+ })()) : message.live && !getMessageText(message) ? (_jsx(TypingDots, { size: 6 })) : (_jsx(ChatMarkdown, { density: density, text: getMessageText(message) || (isStreaming ? '...' : '') }))] }), renderMessageFooter ? (_jsx(Box, { display: "flex", gap: 2, alignItems: "center", mt: 1, flexWrap: "wrap", flexDirection: isUser ? 'row-reverse' : 'row', children: renderMessageFooter(message) })) : null] })] }) }, message.id));
722
621
  };
723
622
  return (_jsxs(_Fragment, { children: [displayItems.map((item, index) => {
724
623
  const itemUI = renderItem(item, index);
@@ -727,31 +626,5 @@ export function ChatMessageList({ displayItems, isLoading, isStreaming, showLoad
727
626
  return null;
728
627
  }
729
628
  return (_jsxs(Fragment, { children: [itemUI, footer] }, item.id));
730
- }), showLoadingIndicator && (isLoading || isStreaming) && (_jsx(Box, { "data-chat-typing": "", sx: {
731
- display: 'flex',
732
- alignItems: 'flex-start',
733
- px: padding,
734
- py: 1,
735
- }, children: _jsxs(Box, { sx: {
736
- display: 'flex',
737
- gap: 2,
738
- alignItems: 'flex-start',
739
- }, children: [avatarConfig.showAvatars && (_jsx(Box, { sx: {
740
- width: avatarConfig.avatarSize,
741
- height: avatarConfig.avatarSize,
742
- borderRadius: '50%',
743
- bg: avatarConfig.assistantAvatarBg,
744
- color: 'var(--button-primary-fgColor-rest, var(--fgColor-onEmphasis))',
745
- display: 'flex',
746
- alignItems: 'center',
747
- justifyContent: 'center',
748
- flexShrink: 0,
749
- }, children: avatarConfig.assistantAvatar })), _jsx(Box, { sx: {
750
- display: 'flex',
751
- alignItems: 'center',
752
- p: compact ? 1 : 2,
753
- borderRadius: 'var(--theme-radius-bubble, 6px)',
754
- bg: 'canvas.subtle',
755
- minHeight: compact ? '20px' : '32px',
756
- }, children: _jsx(TypingDots, {}) })] }) })), _jsx("div", { ref: messagesEndRef })] }));
629
+ }), showLoadingIndicator && (isLoading || isStreaming) && (_jsx(Box, { "data-chat-typing": "", display: "flex", alignItems: "flex-start", px: padding, py: 1, children: _jsxs(Box, { display: "flex", gap: 2, alignItems: "flex-start", children: [avatarConfig.showAvatars && (_jsx(Box, { width: avatarConfig.avatarSize, height: avatarConfig.avatarSize, borderRadius: "50%", bg: avatarConfig.assistantAvatarBg, color: "var(--button-primary-fgColor-rest, var(--fgColor-onEmphasis))", display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0, children: avatarConfig.assistantAvatar })), _jsx(Box, { display: "flex", alignItems: "center", p: compact ? 1 : 2, borderRadius: "var(--theme-radius-bubble, 6px)", bg: "canvas.subtle", minHeight: compact ? '20px' : '32px', children: _jsx(TypingDots, {}) })] }) })), _jsx("div", { ref: messagesEndRef })] }));
757
630
  }
@@ -54,57 +54,27 @@ export function ChatMessages({ messageRenderer, activityRenderer, showTimestamps
54
54
  }
55
55
  }
56
56
  // Default rendering
57
- return (_jsxs(Box, { ref: isLast ? lastMessageRef : undefined, sx: {
58
- display: 'flex',
59
- gap: 3,
60
- p: 3,
57
+ return (_jsxs(Box, { ref: isLast ? lastMessageRef : undefined, display: "flex", gap: 3, p: 3, borderColor: "border.muted", bg: message.role === 'assistant' ? 'canvas.subtle' : 'canvas.default', sx: {
61
58
  borderBottom: '1px solid',
62
- borderColor: 'border.muted',
63
- bg: message.role === 'assistant' ? 'canvas.subtle' : 'canvas.default',
64
59
  '&:last-child': {
65
60
  borderBottom: 'none',
66
61
  },
67
- }, children: [showAvatars && (_jsx(Box, { sx: { flexShrink: 0 }, children: _jsx(Box, { sx: {
68
- width: 32,
69
- height: 32,
70
- borderRadius: '50%',
71
- display: 'flex',
72
- alignItems: 'center',
73
- justifyContent: 'center',
74
- bg: message.role === 'user'
75
- ? 'neutral.muted'
76
- : message.role === 'assistant'
77
- ? 'accent.emphasis'
78
- : 'attention.emphasis',
79
- color: message.role === 'user'
80
- ? 'fg.default'
81
- : 'var(--button-primary-fgColor-rest, var(--fgColor-onEmphasis))',
82
- }, children: message.role === 'user' ? (_jsx(PersonIcon, { size: 16 })) : message.role === 'assistant' ? (_jsx(AiAgentIcon, { size: 16, color: assistantIconColor })) : (_jsx(ToolsIcon, { size: 16 })) }) })), _jsxs(Box, { sx: { flex: 1, minWidth: 0 }, children: [_jsxs(Box, { sx: {
83
- display: 'flex',
84
- alignItems: 'center',
85
- gap: 2,
86
- mb: 1,
87
- }, children: [_jsx(Text, { sx: { fontWeight: 'semibold', fontSize: 1 }, children: message.role === 'user'
62
+ }, children: [showAvatars && (_jsx(Box, { flexShrink: 0, children: _jsx(Box, { width: 32, height: 32, borderRadius: "50%", display: "flex", alignItems: "center", justifyContent: "center", bg: message.role === 'user'
63
+ ? 'neutral.muted'
64
+ : message.role === 'assistant'
65
+ ? 'accent.emphasis'
66
+ : 'attention.emphasis', color: message.role === 'user'
67
+ ? 'fg.default'
68
+ : 'var(--button-primary-fgColor-rest, var(--fgColor-onEmphasis))', children: message.role === 'user' ? (_jsx(PersonIcon, { size: 16 })) : message.role === 'assistant' ? (_jsx(AiAgentIcon, { size: 16, color: assistantIconColor })) : (_jsx(ToolsIcon, { size: 16 })) }) })), _jsxs(Box, { flex: 1, minWidth: 0, children: [_jsxs(Box, { display: "flex", alignItems: "center", gap: 2, mb: 1, children: [_jsx(Text, { sx: { fontWeight: 'semibold', fontSize: 1 }, children: message.role === 'user'
88
69
  ? 'You'
89
70
  : message.role === 'assistant'
90
71
  ? 'Assistant'
91
- : 'System' }), showTimestamps && message.createdAt && (_jsx(RelativeTime, { datetime: message.createdAt.toISOString(), sx: { fontSize: 0, color: 'fg.muted' } }))] }), _jsx(Box, { sx: { fontSize: 1, lineHeight: 1.5 }, children: renderMessageContent(message, activityRenderer, uiPluginRegistry ?? undefined) })] })] }, message.id));
72
+ : 'System' }), showTimestamps && message.createdAt && (_jsx(RelativeTime, { datetime: message.createdAt.toISOString(), sx: { fontSize: 0, color: 'fg.muted' } }))] }), _jsx(Box, { fontSize: 1, lineHeight: 1.5, children: renderMessageContent(message, activityRenderer, uiPluginRegistry ?? undefined) })] })] }, message.id));
92
73
  };
93
74
  if (messages.length === 0) {
94
- return (_jsxs(Box, { className: className, sx: {
95
- display: 'flex',
96
- flexDirection: 'column',
97
- alignItems: 'center',
98
- justifyContent: 'center',
99
- height: '100%',
100
- p: 4,
101
- color: 'fg.muted',
102
- }, children: [_jsx(AiAgentIcon, { colored: true, size: 48 }), _jsx(Text, { sx: { mt: 3, fontSize: 2 }, children: chatText.startConversation }), _jsx(Text, { sx: { mt: 1, fontSize: 1 }, children: chatText.sendToBegin })] }));
75
+ return (_jsxs(Box, { className: className, display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", height: "100%", p: 4, color: "fg.muted", children: [_jsx(AiAgentIcon, { colored: true, size: 48 }), _jsx(Text, { sx: { mt: 3, fontSize: 2 }, children: chatText.startConversation }), _jsx(Text, { sx: { mt: 1, fontSize: 1 }, children: chatText.sendToBegin })] }));
103
76
  }
104
- return (_jsx(Box, { ref: containerRef, className: className, sx: {
105
- flex: 1,
106
- overflow: 'auto',
107
- }, children: messages.map((message, index) => renderMessage(message, index === messages.length - 1)) }));
77
+ return (_jsx(Box, { ref: containerRef, className: className, flex: 1, overflow: "auto", children: messages.map((message, index) => renderMessage(message, index === messages.length - 1)) }));
108
78
  }
109
79
  /**
110
80
  * Render message content based on type
@@ -117,7 +87,7 @@ function renderMessageContent(message, activityRenderer, uiPluginRegistry) {
117
87
  }
118
88
  // Array of content parts
119
89
  if (Array.isArray(content)) {
120
- return (_jsx(Box, { sx: { display: 'flex', flexDirection: 'column', gap: 2 }, children: content.map((part, index) => renderContentPart(part, index, activityRenderer, uiPluginRegistry)) }));
90
+ return (_jsx(Box, { display: "flex", flexDirection: "column", gap: 2, children: content.map((part, index) => renderContentPart(part, index, activityRenderer, uiPluginRegistry)) }));
121
91
  }
122
92
  return null;
123
93
  }
@@ -131,36 +101,13 @@ function renderContentPart(part, index, activityRenderer, uiPluginRegistry) {
131
101
  case 'image':
132
102
  return (_jsx(Box, { children: _jsx("img", { src: part.url, alt: part.alt || 'Image', style: { maxWidth: '100%', borderRadius: '8px' } }) }, index));
133
103
  case 'tool-call':
134
- return (_jsxs(Box, { sx: {
135
- p: 2,
136
- bg: 'canvas.subtle',
137
- borderRadius: 2,
138
- border: '1px solid',
139
- borderColor: 'border.default',
140
- }, children: [_jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 2, mb: 1 }, children: [_jsx(ToolsIcon, { size: 16 }), _jsxs(Text, { sx: { fontWeight: 'semibold', fontSize: 0 }, children: ["Tool: ", part.toolName] })] }), _jsx(Box, { as: "pre", sx: {
141
- fontSize: 0,
142
- overflow: 'auto',
143
- m: 0,
144
- p: 2,
145
- bg: 'canvas.inset',
146
- borderRadius: 1,
147
- }, children: JSON.stringify(part.args, null, 2) })] }, index));
104
+ return (_jsxs(Box, { p: 2, bg: "canvas.subtle", borderRadius: 2, border: "1px solid", borderColor: "border.default", children: [_jsxs(Box, { display: "flex", alignItems: "center", gap: 2, mb: 1, children: [_jsx(ToolsIcon, { size: 16 }), _jsxs(Text, { sx: { fontWeight: 'semibold', fontSize: 0 }, children: ["Tool: ", part.toolName] })] }), _jsx(Box, { as: "pre", fontSize: 0, overflow: "auto", m: 0, p: 2, bg: "canvas.inset", borderRadius: 1, children: JSON.stringify(part.args, null, 2) })] }, index));
148
105
  case 'tool-result': {
149
106
  const result = part.result;
150
107
  const isSuccess = result && typeof result === 'object' && 'success' in result
151
108
  ? result.success
152
109
  : true;
153
- return (_jsxs(Box, { sx: {
154
- p: 2,
155
- bg: isSuccess ? 'success.subtle' : 'danger.subtle',
156
- borderRadius: 2,
157
- border: '1px solid',
158
- borderColor: isSuccess ? 'success.muted' : 'danger.muted',
159
- }, children: [_jsxs(Text, { sx: { fontWeight: 'semibold', fontSize: 0, mb: 1 }, children: ["Result: ", part.toolName] }), _jsx(Box, { as: "pre", sx: {
160
- fontSize: 0,
161
- overflow: 'auto',
162
- m: 0,
163
- }, children: result?.error || JSON.stringify(result, null, 2) })] }, index));
110
+ return (_jsxs(Box, { p: 2, bg: isSuccess ? 'success.subtle' : 'danger.subtle', borderRadius: 2, border: "1px solid", borderColor: isSuccess ? 'success.muted' : 'danger.muted', children: [_jsxs(Text, { sx: { fontWeight: 'semibold', fontSize: 0, mb: 1 }, children: ["Result: ", part.toolName] }), _jsx(Box, { as: "pre", fontSize: 0, overflow: "auto", m: 0, children: result?.error || JSON.stringify(result, null, 2) })] }, index));
164
111
  }
165
112
  case 'activity':
166
113
  // Check for custom renderer
@@ -182,18 +129,7 @@ function renderContentPart(part, index, activityRenderer, uiPluginRegistry) {
182
129
  }
183
130
  }
184
131
  // Default activity rendering
185
- return (_jsxs(Box, { sx: {
186
- p: 2,
187
- bg: 'accent.subtle',
188
- borderRadius: 2,
189
- border: '1px solid',
190
- borderColor: 'accent.muted',
191
- }, children: [_jsxs(Text, { sx: { fontWeight: 'semibold', fontSize: 0 }, children: ["Activity: ", part.activityType] }), part.data != null && (_jsx(Box, { as: "pre", sx: {
192
- fontSize: 0,
193
- overflow: 'auto',
194
- mt: 1,
195
- m: 0,
196
- }, children: String(typeof part.data === 'object'
132
+ return (_jsxs(Box, { p: 2, bg: "accent.subtle", borderRadius: 2, border: "1px solid", borderColor: "accent.muted", children: [_jsxs(Text, { sx: { fontWeight: 'semibold', fontSize: 0 }, children: ["Activity: ", part.activityType] }), part.data != null && (_jsx(Box, { as: "pre", fontSize: 0, overflow: "auto", mt: 1, m: 0, children: String(typeof part.data === 'object'
197
133
  ? JSON.stringify(part.data, null, 2)
198
134
  : part.data) }))] }, index));
199
135
  default: