@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.
- package/lib/Agent.js +2 -18
- package/lib/AgentDocument.js +5 -55
- package/lib/AgentNode.js +31 -208
- package/lib/AgentNotebook.js +5 -59
- package/lib/agent-node/AgentNodeGallery.js +23 -111
- package/lib/agents/AgentDetails.js +36 -274
- package/lib/agents/AgentRuntimeChat.js +1 -8
- package/lib/chat/Chat.js +7 -46
- package/lib/chat/ChatFloating.js +15 -100
- package/lib/chat/ChatInline.js +5 -47
- package/lib/chat/ChatPopupStandalone.js +5 -53
- package/lib/chat/ChatSidebar.js +4 -51
- package/lib/chat/ChatStandalone.js +4 -45
- package/lib/chat/EphemeralSurfaceControl.js +5 -25
- package/lib/chat/assistant/AssistantContextMenu.d.ts +8 -0
- package/lib/chat/assistant/AssistantContextMenu.js +17 -1
- package/lib/chat/assistant/AssistantStage.js +6 -25
- package/lib/chat/assistant/BalloonParts.js +8 -40
- package/lib/chat/assistant/BalloonVisual.js +2 -2
- package/lib/chat/assistant/ConversationBalloon.js +2 -11
- package/lib/chat/assistant/DecisionAsk.js +3 -3
- package/lib/chat/assistant/SandboxDetailsDialog.js +3 -17
- package/lib/chat/assistant/SpeechBalloon.js +14 -78
- package/lib/chat/base/ChatBase.js +37 -172
- package/lib/chat/display/EmptyState.js +7 -35
- package/lib/chat/display/FloatingBrandButton.js +4 -34
- package/lib/chat/display/PoweredByTag.js +3 -14
- package/lib/chat/document/EphemeralDocument.js +3 -18
- package/lib/chat/header/ChatHeader.js +1 -17
- package/lib/chat/header/ChatHeaderBase.js +2 -24
- package/lib/chat/header/ChatViewModeToggle.js +7 -29
- package/lib/chat/indicators/McpStatusIndicator.js +3 -12
- package/lib/chat/indicators/SandboxStatusIndicator.js +6 -34
- package/lib/chat/indicators/SkillsStatusIndicator.js +3 -12
- package/lib/chat/indicators/TypingDots.js +1 -11
- package/lib/chat/messages/ChatMessageList.js +58 -185
- package/lib/chat/messages/ChatMessages.js +15 -79
- package/lib/chat/messages/FormSubmissionMessage.js +2 -33
- package/lib/chat/messages/NotebookToolSurfaces.js +12 -41
- package/lib/chat/messages/TurnFooter.js +4 -10
- package/lib/chat/notebook/EphemeralNotebook.js +2 -10
- package/lib/chat/parts/ReasoningPart.js +2 -16
- package/lib/chat/parts/TextPart.js +2 -12
- package/lib/chat/parts/ToolPart.js +16 -90
- package/lib/chat/presence/Presence.js +5 -33
- package/lib/chat/prompt/FloatingCard.js +1 -13
- package/lib/chat/prompt/InputPrompt.js +1 -6
- package/lib/chat/prompt/InputPromptBase.js +4 -17
- package/lib/chat/prompt/InputPromptLexical.js +44 -45
- package/lib/chat/prompt/InputPromptText.js +1 -1
- package/lib/chat/prompt/footer/InPromptFooter.js +1 -8
- package/lib/chat/prompt/menus/AgentsMenu.js +1 -1
- package/lib/chat/prompt/menus/InlineAgentsMenu.js +1 -1
- package/lib/chat/prompt/menus/ModelSelector.js +1 -5
- package/lib/chat/prompt/menus/SkillsMenu.js +3 -30
- package/lib/chat/prompt/menus/SuggestionsMenu.js +1 -1
- package/lib/chat/prompt/menus/ToolsMenu.js +4 -48
- package/lib/chat/prompt/plugins/AgentMentionPlugin.js +2 -9
- package/lib/chat/prompt/plugins/CommandPlugin.js +2 -9
- package/lib/chat/prompt/plugins/MentionChip.js +1 -15
- package/lib/chat/prompt/stack.js +1 -19
- package/lib/chat/tools/A2AAgentDialog.js +9 -42
- package/lib/chat/tools/SubagentActivity.js +5 -22
- package/lib/chat/tools/ToolApprovalBanner.js +4 -34
- package/lib/chat/tools/ToolApprovalDialog.js +4 -19
- package/lib/chat/tools/ToolCallDisplay.js +12 -97
- package/lib/chat/usage/ContextPie.js +4 -45
- package/lib/chat/words.d.ts +7 -0
- package/lib/chat/words.js +12 -0
- package/lib/components/a2ui/datalayer/Chart.js +4 -10
- package/lib/components/a2ui/datalayer/Chat.js +2 -10
- package/lib/components/a2ui/datalayer/Download.js +1 -1
- package/lib/components/a2ui/datalayer/Evidence.js +1 -15
- package/lib/components/a2ui/datalayer/FileUpload.js +1 -12
- package/lib/components/a2ui/datalayer/Table.js +9 -17
- package/lib/components/a2ui/datalayer/formWidgets.js +3 -2
- package/lib/components/a2ui/datalayer/parts.js +1 -16
- package/lib/components/a2ui/styles.js +16 -5
- package/lib/components/agents/AgentSummary.js +1 -51
- package/lib/components/cards/NotificationEventCard.js +6 -72
- package/lib/components/cards/OutputCard.js +4 -48
- package/lib/components/cards/ToolApprovalCard.js +2 -35
- package/lib/components/code-sandboxes/CodeSandboxCellVariables.js +1 -1
- package/lib/components/code-sandboxes/CodeSandboxEnvironmentSelect.js +4 -14
- package/lib/components/code-sandboxes/CodeSandboxPicker.js +16 -21
- package/lib/components/code-sandboxes/CodeSandboxVariables.js +2 -2
- package/lib/components/scheduler/ScheduleMenu.js +5 -10
- package/lib/components/specs/SpecPayloadPreview.js +1 -26
- package/lib/components/teams/A2ATeamGraph.d.ts +4 -3
- package/lib/components/teams/A2ATeamGraph.js +25 -71
- package/lib/components/teams/AnswerSurfacesView.js +2 -2
- package/lib/components/teams/NotebookPreview.js +1 -10
- package/lib/components/teams/NotebookPreviewView.js +2 -3
- package/lib/components/teams/SceneTranscript.js +3 -17
- package/lib/components/teams/SceneView.js +1 -8
- package/lib/components/teams/TeamNotebook.js +5 -13
- package/lib/components/teams/TeamNotebookView.js +2 -12
- package/lib/components/teams/index.d.ts +1 -0
- package/lib/components/teams/index.js +1 -0
- package/lib/components/teams/useBalloonRoom.d.ts +39 -0
- package/lib/components/teams/useBalloonRoom.js +89 -0
- package/lib/config/AgentConfiguration.js +22 -225
- package/lib/context/ContextDistribution.js +7 -41
- package/lib/context/ContextInspector.js +9 -107
- package/lib/context/ContextPanel.js +11 -86
- package/lib/context/ContextUsage.js +6 -34
- package/lib/context/CostTracker.js +7 -42
- package/lib/context/MessageHistory.js +3 -37
- package/lib/context/TurnGraphChart.js +9 -41
- package/lib/examples/A2UiAgentExample.js +6 -108
- package/lib/examples/A2UiComponentsGalleryExample.js +1 -1
- package/lib/examples/A2UiContactCardExample.js +1 -1
- package/lib/examples/A2UiJupyterOutputExample.js +25 -125
- package/lib/examples/A2UiRestaurantExample.js +1 -1
- package/lib/examples/A2UiViewerExample.js +1 -1
- package/lib/examples/AgUiAgenticExample.js +3 -35
- package/lib/examples/AgUiBackendToolRenderingExample.js +2 -25
- package/lib/examples/AgUiHaikuGenUiExample.js +2 -32
- package/lib/examples/AgUiHumanInTheLoopExample.js +5 -59
- package/lib/examples/AgUiSharedStateExample.js +6 -56
- package/lib/examples/AgUiToolsBasedGenUiExample.js +25 -120
- package/lib/examples/AgentA2AExample.js +1 -15
- package/lib/examples/AgentA2ATeamExample.js +6 -30
- package/lib/examples/AgentCheckpointsExample.js +11 -145
- package/lib/examples/AgentCodeSandboxExample.js +5 -108
- package/lib/examples/AgentCodeSandboxesExample.js +3 -30
- package/lib/examples/AgentCodemodeExample.js +9 -85
- package/lib/examples/AgentCompactionExample.js +3 -64
- package/lib/examples/AgentDecideExample.js +1 -13
- package/lib/examples/AgentEvalsExample.js +5 -60
- package/lib/examples/AgentGuardrailsExample.js +4 -28
- package/lib/examples/AgentHooksExample.js +1 -1
- package/lib/examples/AgentInferenceProviderExample.js +5 -96
- package/lib/examples/AgentMCPExample.js +7 -105
- package/lib/examples/AgentMemoryExample.js +5 -74
- package/lib/examples/AgentMonitoringExample.js +7 -53
- package/lib/examples/AgentNotificationsExample.js +3 -61
- package/lib/examples/AgentOtelExample.js +3 -72
- package/lib/examples/AgentOutputsExample.js +6 -81
- package/lib/examples/AgentParametersExample.js +2 -37
- package/lib/examples/AgentSkillsExample.js +3 -45
- package/lib/examples/AgentSubagentsExample.js +6 -56
- package/lib/examples/AgentToolApprovalsExample.js +1 -11
- package/lib/examples/AgentTriggersExample.js +29 -239
- package/lib/examples/AgentspecsExample.js +6 -60
- package/lib/examples/AssistantExample.js +5 -5
- package/lib/examples/AssistantGalleryExample.js +8 -65
- package/lib/examples/CellExample.js +1 -6
- package/lib/examples/ChatCustomExample.js +2 -31
- package/lib/examples/ChatExample.js +1 -9
- package/lib/examples/ChatStandaloneExample.js +3 -37
- package/lib/examples/CopilotKitLexicalExample.js +1 -24
- package/lib/examples/DecksAgent.js +1 -1
- package/lib/examples/DocumentPageAgent.js +1 -1
- package/lib/examples/HomeExample.js +14 -62
- package/lib/examples/Lexical2Example.js +3 -32
- package/lib/examples/LexicalAgentExample.js +2 -34
- package/lib/examples/LexicalAgentSidebarExample.js +3 -34
- package/lib/examples/LoopAppComputerExample.js +1 -1
- package/lib/examples/LoopShellExample.js +2 -2
- package/lib/examples/LoopStrategyExample.js +15 -87
- package/lib/examples/LoopWorkspaceEmbed.js +2 -18
- package/lib/examples/LoopWorkspaceExample.js +2 -2
- package/lib/examples/NotebookAgentExample.js +2 -33
- package/lib/examples/NotebookAgentSidebarExample.js +3 -46
- package/lib/examples/NotebookCollaborationExample.js +1 -31
- package/lib/examples/NotebookExample.js +1 -18
- package/lib/examples/NotebookPageAgent.js +1 -1
- package/lib/examples/ScenesExample.js +5 -24
- package/lib/examples/VoiceChatExample.js +1 -1
- package/lib/examples/components/AuthRequiredView.js +1 -7
- package/lib/examples/components/ErrorView.js +1 -8
- package/lib/examples/components/ExampleErrorBoundary.js +1 -14
- package/lib/examples/components/FooterMetrics.js +1 -7
- package/lib/examples/components/Header.js +12 -51
- package/lib/examples/components/HeaderControls.js +1 -9
- package/lib/examples/components/LexicalEditor.js +1 -8
- package/lib/examples/components/MainContent.js +1 -13
- package/lib/examples/components/MockFileBrowser.js +4 -40
- package/lib/examples/components/SessionTabs.js +1 -1
- package/lib/examples/components/TimeTravel.js +1 -13
- package/lib/examples/main.js +13 -81
- package/lib/examples/scenes/A2UiComponentsGalleryScene.js +3 -34
- package/lib/examples/scenes/A2UiContactCardScene.js +3 -35
- package/lib/examples/scenes/A2UiRestaurantScene.js +3 -53
- package/lib/examples/scenes/A2UiViewerScene.js +3 -34
- package/lib/examples/utils/AssistantGalleryGrid.js +6 -35
- package/lib/examples2/DatalayerNotebookExample.js +3 -33
- package/lib/examples2/NativeNavigationExample.js +4 -10
- package/lib/examples2/NotebookMutationsKernel.js +2 -1
- package/lib/examples2/NotebookMutationsServiceManager.js +2 -1
- package/lib/examples2/ReactRouterExample.js +14 -42
- package/lib/hooks/useToolApprovals.d.ts +2 -34
- package/lib/hooks/useToolApprovals.js +1 -64
- package/lib/identity/AgentIdentity.js +17 -62
- package/lib/identity/IdentityConnect.js +13 -59
- package/lib/identity/OAuthCallback.js +6 -44
- package/lib/lexical/ChatInlinePlugin.js +6 -14
- package/lib/loop/apps/AppFeedback.js +12 -3
- package/lib/loop/apps/AppRenderer.d.ts +4 -3
- package/lib/loop/apps/AppRenderer.js +11 -12
- package/lib/loop/apps/appspec.js +6 -3
- package/lib/loop/apps/feedback.d.ts +3 -2
- package/lib/loop/apps/feedback.js +4 -2
- package/lib/loop/core/index.d.ts +19 -0
- package/lib/loop/core/index.js +27 -0
- package/lib/loop/embed/AppEmbed.d.ts +1 -1
- package/lib/loop/embed/AppEmbed.js +2 -1
- package/lib/loop/embed/LoopEmbed.js +1 -7
- package/lib/loop/embed/embedConfig.d.ts +3 -3
- package/lib/loop/embed/embedConfig.js +2 -3
- package/lib/loop/embed/embedTheme.d.ts +4 -4
- package/lib/loop/embed/embedTheme.js +11 -7
- package/lib/loop/plugins/a2a-sidebar/A2ASidebar.js +7 -34
- package/lib/loop/plugins/a2ui/A2uiView.js +4 -12
- package/lib/loop/plugins/a2ui-surface/InlineSurface.js +1 -16
- package/lib/loop/plugins/a2ui-surface/SurfaceToolResult.js +2 -12
- package/lib/loop/plugins/agents/AnonymousKeyBadge.js +3 -2
- package/lib/loop/plugins/agents/SandboxSelector.js +3 -7
- package/lib/loop/plugins/agents/SandboxView.js +4 -27
- package/lib/loop/plugins/agents/TeamMemberPicker.js +2 -2
- package/lib/loop/plugins/agentspecs/AgentspecPicker.js +3 -2
- package/lib/loop/plugins/app-activity/AppActivity.js +1 -1
- package/lib/loop/plugins/app-computer/AppComputer.js +32 -27
- package/lib/loop/plugins/app-elements/AppElements.js +2 -31
- package/lib/loop/plugins/app-page/AppPage.js +26 -8
- package/lib/loop/plugins/app-rules/AppRulesCard.js +4 -20
- package/lib/loop/plugins/assistant/index.js +1 -13
- package/lib/loop/plugins/chat/ChatView.js +89 -130
- package/lib/loop/plugins/checkpoints-sidebar/CheckpointsSidebar.js +2 -13
- package/lib/loop/plugins/decks/DeckSurface.js +2 -2
- package/lib/loop/plugins/document/DocumentView.js +4 -12
- package/lib/loop/plugins/document-toolbar/SandboxStatusItem.js +3 -8
- package/lib/loop/plugins/graph/GraphView.js +2 -2
- package/lib/loop/plugins/input-prompt/ComposerView.js +1 -1
- package/lib/loop/plugins/notebook/NotebookView.js +3 -11
- package/lib/loop/plugins/page-layout/SplitLayout.js +11 -34
- package/lib/loop/plugins/page-layout/TurnPanel.js +9 -35
- package/lib/loop/plugins/shell/useEditorPreviews.js +3 -2
- package/lib/loop/plugins/subagent-activity/SubagentPulse.js +1 -13
- package/lib/loop/plugins/window-frame/WindowFrame.js +10 -44
- package/lib/loop/plugins/window-frame/index.js +1 -1
- package/lib/loop/shell/LoopWorkspace.js +34 -77
- package/lib/loop/shell/PluginToggles.js +4 -15
- package/lib/loop/shell/SidebarRail.js +8 -40
- package/lib/loop/shell/ViewSwitcher.js +4 -24
- package/lib/loop-main.js +2 -3
- package/lib/mcp/McpServerManager.js +6 -37
- package/lib/portable/index.d.ts +11 -0
- package/lib/portable/index.js +20 -0
- package/lib/protocols/AGUIAdapter.js +2 -2
- package/lib/protocols/BaseProtocolAdapter.d.ts +2 -0
- package/lib/protocols/BaseProtocolAdapter.js +4 -0
- package/lib/specs/apps.js +6 -0
- package/lib/specs/appspecSchema.js +11 -4
- package/lib/stories/loop/ReferenceScreens.js +17 -91
- package/lib/stories/loop/pictures-main.js +1 -1
- package/lib/types/agentspecs.d.ts +5 -2
- package/lib/types/protocol.d.ts +2 -0
- package/lib/utils/approvals.d.ts +59 -0
- package/lib/utils/approvals.js +101 -0
- package/lib/voice/VoiceInput.js +3 -39
- package/package.json +2 -2
- package/lib/shims/primerAddonsBox.d.ts +0 -1
- package/lib/shims/primerAddonsBox.js +0 -7
|
@@ -142,18 +142,10 @@ function Scene({ scene }) {
|
|
|
142
142
|
};
|
|
143
143
|
const notReached = runtimeMembers.filter(member => reachedOf(member.id).error);
|
|
144
144
|
const notebookGiver = stage.peers[0] ?? entry;
|
|
145
|
-
return (_jsxs(Box, { "data-scene-example": scene.id, children: [_jsx(Text, { as: "p", sx: { color: 'fg.muted', mt: 0 }, "data-scene-assumes": "", children: stage.assumes }), anonymous.status === 'active' && anonymous.expiresAt && (_jsx(Box, {
|
|
145
|
+
return (_jsxs(Box, { "data-scene-example": scene.id, children: [_jsx(Text, { as: "p", sx: { color: 'fg.muted', mt: 0 }, "data-scene-assumes": "", children: stage.assumes }), anonymous.status === 'active' && anonymous.expiresAt && (_jsx(Box, { mb: 3, children: _jsx(AnonymousKeyTimer, { expiresAt: anonymous.expiresAt, grantedMs: anonymous.grantedMs, label: `${entry.app.name}'s trial key`, onExpire: () => useAnonymousSessionStore.getState().expire() }) })), anonymous.status === 'expired' && (_jsx(Box, { mb: 3, children: _jsx(AnonymousKeyExpired, { agentName: entry.app.name, onSignedIn: () => useAnonymousSessionStore.getState().clear() }) })), entryInBrowser && needsSignIn && (_jsxs(Flash, { variant: "warning", sx: { mb: 3 }, children: [entry.app.name, " asks its model through the Datalayer inference service: sign in, or wait for a visitor\u2019s trial key."] })), notReached.map(member => (_jsx(Flash, { variant: "danger", sx: { mb: 3 }, "data-scene-needs": member.app.id, children: memberNeeds(member, reachedOf(member.id).error ?? '').map(line => (_jsx(Text, { as: "p", sx: { m: 0 }, children: line }, line))) }, member.id))), runtimeMembers.map(member => (_jsx(ReachMember, { member: member,
|
|
146
146
|
// Its requests are the entry's, or the person's own when the
|
|
147
147
|
// page asks it itself.
|
|
148
|
-
asker: member.entry ? PERSON : entry.app.name, tracer: inspector, onReached: onReached }, member.id))), _jsx(Box, {
|
|
149
|
-
border: '1px solid',
|
|
150
|
-
borderColor: 'border.default',
|
|
151
|
-
borderRadius: 2,
|
|
152
|
-
bg: 'canvas.subtle',
|
|
153
|
-
px: 2,
|
|
154
|
-
pt: 2,
|
|
155
|
-
mb: 3,
|
|
156
|
-
}, children: _jsx(SceneView, { members: transcriptMembers, tracer: inspector, emptyText: `Nothing said yet: ask ${entry.app.name} with one of the suggestions.`, children: _jsx(A2ATeamGraph, { entry: {
|
|
148
|
+
asker: member.entry ? PERSON : entry.app.name, tracer: inspector, onReached: onReached }, member.id))), _jsx(Box, { border: "1px solid", borderColor: "border.default", borderRadius: 2, bg: "canvas.subtle", px: 2, pt: 2, mb: 3, children: _jsx(SceneView, { members: transcriptMembers, tracer: inspector, emptyText: `Nothing said yet: ask ${entry.app.name} with one of the suggestions.`, children: _jsx(A2ATeamGraph, { entry: {
|
|
157
149
|
id: entry.app.id,
|
|
158
150
|
name: entry.app.name,
|
|
159
151
|
emoji: entry.cast.persona.face || entry.app.emoji,
|
|
@@ -208,29 +200,18 @@ function Scene({ scene }) {
|
|
|
208
200
|
];
|
|
209
201
|
})),
|
|
210
202
|
// Room for the balloons: suggestions, *more* and a notebook.
|
|
211
|
-
balloonRoom: 320 }) }) }), _jsx(Box, { ref: notebookArea,
|
|
203
|
+
balloonRoom: 320 }) }) }), _jsx(Box, { ref: notebookArea, mb: team.notebook ? 3 : 0, "data-team-notebook-placement": "under-graph" }), _jsxs(Box, { display: "flex", gap: 3, flexWrap: "wrap", children: [_jsxs(Box, { flex: "1 1 420px", minWidth: 0, children: [_jsxs(Heading, { as: "h3", sx: { fontSize: 2, mb: 2 }, children: ["Ask ", entry.app.name] }), _jsx(Text, { as: "p", sx: { color: 'fg.muted', fontSize: 1, mt: 0 }, children: "Or choose one of its suggestions in its balloon: the script\u2019s cues." }), _jsx(Textarea, { ref: composer, block: true, rows: 3, value: draft, placeholder: suggestions[0]?.prompt ?? 'Ask…', onChange: event => setDraft(event.target.value), onKeyDown: event => {
|
|
212
204
|
if (event.key === 'Enter' && !event.shiftKey) {
|
|
213
205
|
event.preventDefault();
|
|
214
206
|
send(draft);
|
|
215
207
|
}
|
|
216
|
-
} }), _jsxs(Box, {
|
|
217
|
-
p: 2,
|
|
218
|
-
mb: 2,
|
|
219
|
-
borderRadius: 2,
|
|
220
|
-
bg: turn.role === 'user' ? 'accent.subtle' : 'canvas.subtle',
|
|
221
|
-
}, children: [_jsx(Text, { sx: { fontSize: 0, color: 'fg.muted', display: 'block' }, children: turn.role === 'user' ? PERSON : entry.app.name }), _jsx(Streamdown, { children: turn.text })] }, index))) })] }), _jsxs(Box, { sx: { flex: '1 1 360px', minWidth: 0 }, children: [!team.notebook && stage.peers.length > 0 && (_jsxs(_Fragment, { children: [_jsx(Heading, { as: "h3", sx: { fontSize: 2, mb: 2 }, children: "The report" }), _jsx(Box, { sx: {
|
|
222
|
-
p: 3,
|
|
223
|
-
border: '1px solid',
|
|
224
|
-
borderColor: 'border.default',
|
|
225
|
-
borderRadius: 2,
|
|
226
|
-
minHeight: 120,
|
|
227
|
-
}, "data-team-report": "", children: team.report ? (_jsx(Streamdown, { children: team.report })) : (_jsx(Text, { sx: { color: 'fg.muted' }, children: "What the last member asked returns appears here, as it returned it, or as a notebook to run when it gives one." })) })] })), scene.setup.length > 0 && (_jsxs(Box, { sx: { mt: 3 }, "data-scene-setup": "", children: [_jsx(Heading, { as: "h3", sx: { fontSize: 1, mb: 1 }, children: "What this scene needs" }), scene.setup.map(line => (_jsx(Text, { as: "p", sx: { fontSize: 0, color: 'fg.muted', m: 0 }, children: line }, line)))] }))] })] })] }));
|
|
208
|
+
} }), _jsxs(Box, { display: "flex", gap: 2, mt: 2, children: [_jsx(Button, { variant: "primary", disabled: !team.ready || team.busy || !draft.trim(), onClick: () => send(draft), children: "Ask" }), team.busy && _jsx(Button, { onClick: team.stop, children: "Stop" })] }), _jsx(Box, { mt: 3, "data-team-conversation": "", children: team.turns.map((turn, index) => (_jsxs(Box, { p: 2, mb: 2, borderRadius: 2, bg: turn.role === 'user' ? 'accent.subtle' : 'canvas.subtle', children: [_jsx(Text, { sx: { fontSize: 0, color: 'fg.muted', display: 'block' }, children: turn.role === 'user' ? PERSON : entry.app.name }), _jsx(Streamdown, { children: turn.text })] }, index))) })] }), _jsxs(Box, { flex: "1 1 360px", minWidth: 0, children: [!team.notebook && stage.peers.length > 0 && (_jsxs(_Fragment, { children: [_jsx(Heading, { as: "h3", sx: { fontSize: 2, mb: 2 }, children: "The report" }), _jsx(Box, { p: 3, border: "1px solid", borderColor: "border.default", borderRadius: 2, minHeight: 120, "data-team-report": "", children: team.report ? (_jsx(Streamdown, { children: team.report })) : (_jsx(Text, { sx: { color: 'fg.muted' }, children: "What the last member asked returns appears here, as it returned it, or as a notebook to run when it gives one." })) })] })), scene.setup.length > 0 && (_jsxs(Box, { mt: 3, "data-scene-setup": "", children: [_jsx(Heading, { as: "h3", sx: { fontSize: 1, mb: 1 }, children: "What this scene needs" }), scene.setup.map(line => (_jsx(Text, { as: "p", sx: { fontSize: 0, color: 'fg.muted', m: 0 }, children: line }, line)))] }))] })] })] }));
|
|
228
209
|
}
|
|
229
210
|
function Scenes() {
|
|
230
211
|
const scenes = useMemo(() => listSceneSpecs(), []);
|
|
231
212
|
const [selected, setSelected] = useState(scenes[0]?.id ?? '');
|
|
232
213
|
const scene = scenes.find(one => one.id === selected) ?? scenes[0];
|
|
233
|
-
return (_jsxs(Box, {
|
|
214
|
+
return (_jsxs(Box, { p: 4, maxWidth: 1080, mx: "auto", children: [_jsx(Heading, { as: "h2", sx: { fontSize: 4, mb: 1 }, children: "Scenes" }), _jsxs(Text, { as: "p", sx: { color: 'fg.muted', mt: 0 }, children: ["The catalogue\u2019s scenes, played against the local servers: each member on a runtime is served over A2A by ", _jsx("code", { children: "serve_scenes.py" }), "; the entry in your browser asks on your token or a visitor\u2019s trial key."] }), _jsx(UnderlineNav, { "aria-label": "Scenes", sx: { mb: 3 }, children: scenes.map(one => (_jsxs(UnderlineNav.Item, { "aria-current": one.id === scene?.id ? 'page' : undefined, onSelect: event => {
|
|
234
215
|
event.preventDefault();
|
|
235
216
|
setSelected(one.id);
|
|
236
217
|
}, "data-scene-tab": one.id, children: [one.emoji, " ", one.name] }, one.id))) }), scene && _jsx(Scene, { scene: scene }, scene.id)] }));
|
|
@@ -60,6 +60,6 @@ const VoiceChatExample = () => {
|
|
|
60
60
|
token: token || undefined,
|
|
61
61
|
consentKey: 'voice-chat-example',
|
|
62
62
|
}), [language, voiceSpec.id, token]);
|
|
63
|
-
return (_jsx(ThemedProvider, { children: _jsxs(Box, {
|
|
63
|
+
return (_jsx(ThemedProvider, { children: _jsxs(Box, { minHeight: "100vh", bg: "canvas.default", p: 4, children: [_jsxs(Box, { maxWidth: 720, mx: "auto", children: [_jsx(Heading, { as: "h1", sx: { mb: 2 }, children: "Voice chat" }), _jsxs(Text, { as: "p", sx: { color: 'fg.muted', mb: 3 }, children: ["Talk to the assistant instead of typing: hold the microphone in its composer, or ", _jsx("kbd", { children: "Ctrl" }), "+", _jsx("kbd", { children: "Space" }), ", speak, and let go. What you say is heard in this page and never leaves it; the words go in the message box for you to send. Its answers are read aloud as they are written, by Datalayer\u2019s speech service, and not kept.", ' ', _jsx("kbd", { children: "Esc" }), " stops its voice."] }), _jsxs(Box, { display: "flex", alignItems: "center", gap: 3, mb: 3, children: [_jsx(SegmentedControl, { "aria-label": "Language", children: LANGUAGES.map(option => (_jsx(SegmentedControl.Button, { selected: language === option.tag, onClick: () => setLanguage(option.tag), "data-voice-language": option.tag, children: option.label }, option.tag))) }), _jsxs(Text, { sx: { color: 'fg.muted', fontSize: 1 }, children: ["Voice: ", voiceSpec.name] })] }), voiceSpec.attribution && (_jsx(Text, { as: "p", sx: { fontSize: 0, color: 'fg.muted', mb: 3 }, children: voiceSpec.attribution })), _jsxs(Text, { as: "p", sx: { fontSize: 0, color: 'fg.muted' }, children: ["Models from ", MODELS, ", speech from ", SPEECH, ", the agent at ", SERVER, ". See", ' ', _jsx(Link, { href: "https://agent-runtimes.datalayer.tech/chat/voice", children: "Voice" }), ' ', "for how to run each."] })] }), _jsx(ChatFloating, { defaultViewMode: "assistant", assistantCharacter: "paperclip", protocol: "vercel-ai", endpoint: `${SERVER}/api/v1/vercel-ai/assistant`, title: "Assistant", description: "Hello! Hold the microphone and ask me anything.", position: "bottom-right", useStore: false, voice: voice })] }) }));
|
|
64
64
|
};
|
|
65
65
|
export default VoiceChatExample;
|
|
@@ -22,12 +22,6 @@ export const AuthRequiredView = () => {
|
|
|
22
22
|
setAuth(newToken, handle);
|
|
23
23
|
syncTokenToIamStore(newToken);
|
|
24
24
|
}, [setAuth, syncTokenToIamStore]);
|
|
25
|
-
return (_jsx(Box, {
|
|
26
|
-
height: '100%',
|
|
27
|
-
display: 'flex',
|
|
28
|
-
alignItems: 'center',
|
|
29
|
-
justifyContent: 'center',
|
|
30
|
-
p: 3,
|
|
31
|
-
}, children: _jsx(Box, { sx: { width: '100%', maxWidth: 640 }, children: _jsx(SignInSimple, { onSignIn: handleSignIn, onApiKeySignIn: apiKey => handleSignIn(apiKey, 'api-key-user'), title: "Agent Runtimes Examples", description: "Sign in to run authenticated examples and tools.", leadingIcon: _jsx(HomeIcon, { size: 24 }) }) }) }));
|
|
25
|
+
return (_jsx(Box, { height: "100%", display: "flex", alignItems: "center", justifyContent: "center", p: 3, children: _jsx(Box, { width: "100%", maxWidth: 640, children: _jsx(SignInSimple, { onSignIn: handleSignIn, onApiKeySignIn: apiKey => handleSignIn(apiKey, 'api-key-user'), title: "Agent Runtimes Examples", description: "Sign in to run authenticated examples and tools.", leadingIcon: _jsx(HomeIcon, { size: 24 }) }) }) }));
|
|
32
26
|
};
|
|
33
27
|
export default AuthRequiredView;
|
|
@@ -9,12 +9,5 @@ import { Box } from '@datalayer/primer-addons';
|
|
|
9
9
|
export const ErrorView = ({ error, detail, onLogout, }) => {
|
|
10
10
|
const message = error || 'Agent failed to start';
|
|
11
11
|
const is401 = String(message).includes('401') || String(detail || '').includes('401');
|
|
12
|
-
return (_jsxs(Box, { sx: {
|
|
13
|
-
display: 'flex',
|
|
14
|
-
flexDirection: 'column',
|
|
15
|
-
alignItems: 'center',
|
|
16
|
-
justifyContent: 'center',
|
|
17
|
-
height: '100vh',
|
|
18
|
-
gap: 3,
|
|
19
|
-
}, children: [_jsx(AlertIcon, { size: 48 }), _jsx(Text, { sx: { color: 'danger.fg', fontSize: 2 }, children: message }), detail && _jsx(Text, { sx: { color: 'fg.muted' }, children: detail }), is401 && onLogout && (_jsx(Button, { variant: "danger", leadingVisual: SignOutIcon, onClick: onLogout, children: "Sign out" }))] }));
|
|
12
|
+
return (_jsxs(Box, { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", height: "100vh", gap: 3, children: [_jsx(AlertIcon, { size: 48 }), _jsx(Text, { sx: { color: 'danger.fg', fontSize: 2 }, children: message }), detail && _jsx(Text, { sx: { color: 'fg.muted' }, children: detail }), is401 && onLogout && (_jsx(Button, { variant: "danger", leadingVisual: SignOutIcon, onClick: onLogout, children: "Sign out" }))] }));
|
|
20
13
|
};
|
|
@@ -49,19 +49,6 @@ export class ExampleErrorBoundary extends React.Component {
|
|
|
49
49
|
if (!error) {
|
|
50
50
|
return this.props.children;
|
|
51
51
|
}
|
|
52
|
-
return (_jsx(Box, {
|
|
53
|
-
p: 3,
|
|
54
|
-
border: '1px solid',
|
|
55
|
-
borderColor: 'danger.muted',
|
|
56
|
-
borderRadius: 2,
|
|
57
|
-
bg: 'danger.subtle',
|
|
58
|
-
color: 'danger.fg',
|
|
59
|
-
}, children: [_jsx(Box, { sx: { fontWeight: 600, mb: 2 }, children: "This example failed to load" }), _jsx(Box, { as: "pre", sx: {
|
|
60
|
-
m: 0,
|
|
61
|
-
whiteSpace: 'pre-wrap',
|
|
62
|
-
wordBreak: 'break-word',
|
|
63
|
-
fontFamily: 'mono',
|
|
64
|
-
fontSize: 0,
|
|
65
|
-
}, children: error.message || String(error) })] }) }));
|
|
52
|
+
return (_jsx(Box, { p: 4, children: _jsxs(Box, { p: 3, border: "1px solid", borderColor: "danger.muted", borderRadius: 2, bg: "danger.subtle", color: "danger.fg", children: [_jsx(Box, { fontWeight: 600, mb: 2, children: "This example failed to load" }), _jsx(Box, { as: "pre", m: 0, whiteSpace: "pre-wrap", wordBreak: "break-word", fontFamily: "mono", fontSize: 0, children: error.message || String(error) })] }) }));
|
|
66
53
|
}
|
|
67
54
|
}
|
|
@@ -7,11 +7,5 @@ import { Box } from '@datalayer/primer-addons';
|
|
|
7
7
|
* Displays token usage and cost.
|
|
8
8
|
*/
|
|
9
9
|
export const FooterMetrics = ({ tokens, cost, }) => {
|
|
10
|
-
return (_jsxs(Box, { sx: {
|
|
11
|
-
display: 'flex',
|
|
12
|
-
alignItems: 'center',
|
|
13
|
-
gap: 3,
|
|
14
|
-
py: 2,
|
|
15
|
-
px: 3,
|
|
16
|
-
}, children: [_jsxs(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: ["Tokens:", ' ', _jsx(Text, { as: "span", sx: { fontWeight: 'bold', color: 'fg.default' }, children: tokens.toLocaleString() })] }), _jsxs(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: ["Cost:", ' ', _jsxs(Text, { as: "span", sx: { fontWeight: 'bold', color: 'fg.default' }, children: ["$", cost.toFixed(2), " USD"] })] })] }));
|
|
10
|
+
return (_jsxs(Box, { display: "flex", alignItems: "center", gap: 3, py: 2, px: 3, children: [_jsxs(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: ["Tokens:", ' ', _jsx(Text, { as: "span", sx: { fontWeight: 'bold', color: 'fg.default' }, children: tokens.toLocaleString() })] }), _jsxs(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: ["Cost:", ' ', _jsxs(Text, { as: "span", sx: { fontWeight: 'bold', color: 'fg.default' }, children: ["$", cost.toFixed(2), " USD"] })] })] }));
|
|
17
11
|
};
|
|
@@ -126,31 +126,14 @@ export const Header = ({ activeSession, agentName, agentDescription, agentStatus
|
|
|
126
126
|
setIsOptimizing(false);
|
|
127
127
|
}, 2000);
|
|
128
128
|
};
|
|
129
|
-
return (_jsxs(PageLayout.Header, { divider: "none", children: [_jsxs(Box, {
|
|
130
|
-
display: 'flex',
|
|
131
|
-
alignItems: 'center',
|
|
132
|
-
gap: 3,
|
|
133
|
-
py: 2,
|
|
134
|
-
}, children: [agentName && (_jsx(SessionTabs, { sessions: MOCK_SESSIONS, activeSession: activeSession, agentName: agentName, agentDescription: agentDescription, onSessionChange: onSessionChange, onAddSession: () => {
|
|
129
|
+
return (_jsxs(PageLayout.Header, { divider: "none", children: [_jsxs(Box, { display: "flex", alignItems: "center", gap: 3, py: 2, children: [agentName && (_jsx(SessionTabs, { sessions: MOCK_SESSIONS, activeSession: activeSession, agentName: agentName, agentDescription: agentDescription, onSessionChange: onSessionChange, onAddSession: () => {
|
|
135
130
|
/* Add session */
|
|
136
|
-
} })), agentName && (_jsxs(Box, {
|
|
131
|
+
} })), agentName && (_jsxs(Box, { display: "flex", alignItems: "center", gap: 2, children: [agentStatus && onToggleStatus && (_jsx(IconButton, { "aria-label": agentStatus === 'running' ? 'Pause agent' : 'Play agent', icon: agentStatus === 'running' ? PauseIcon : PlayIcon, onClick: onToggleStatus, variant: "invisible", size: "small", sx: {
|
|
137
132
|
color: agentStatus === 'running' ? 'attention.fg' : 'success.fg',
|
|
138
|
-
} })), _jsx(HeaderControls, { onToggleContextTree: onToggleContextTree })] })), agentName && (_jsx(Box, { onClick: () => setShowAvatarView(!showAvatarView),
|
|
139
|
-
mt: 2,
|
|
140
|
-
p: 2,
|
|
141
|
-
border: '1px solid',
|
|
142
|
-
borderColor: 'border.default',
|
|
143
|
-
borderRadius: 2,
|
|
144
|
-
bg: 'canvas.default',
|
|
145
|
-
}, children: [_jsxs(Box, { sx: {
|
|
146
|
-
display: 'flex',
|
|
147
|
-
justifyContent: 'space-between',
|
|
148
|
-
alignItems: 'center',
|
|
149
|
-
mb: 2,
|
|
150
|
-
}, children: [_jsxs(Text, { sx: {
|
|
133
|
+
} })), _jsx(HeaderControls, { onToggleContextTree: onToggleContextTree })] })), agentName && (_jsx(Box, { onClick: () => setShowAvatarView(!showAvatarView), cursor: "pointer", children: _jsxs(AvatarStack, { size: 24, disableExpand: true, children: [_jsx(Avatar, { alt: "Primer logo", src: "https://avatars.githubusercontent.com/primer" }), _jsx(Avatar, { alt: "GitHub logo", src: "https://avatars.githubusercontent.com/github" }), _jsx(Avatar, { alt: "Atom logo", src: "https://avatars.githubusercontent.com/atom" }), _jsx(Avatar, { alt: "GitHub Desktop logo", src: "https://avatars.githubusercontent.com/desktop" })] }) }))] }), agentName && showContextTree && (_jsxs(Box, { mt: 2, p: 2, border: "1px solid", borderColor: "border.default", borderRadius: 2, bg: "canvas.default", children: [_jsxs(Box, { display: "flex", justifyContent: "space-between", alignItems: "center", mb: 2, children: [_jsxs(Text, { sx: {
|
|
151
134
|
fontSize: 1,
|
|
152
135
|
fontWeight: 'bold',
|
|
153
|
-
}, children: ["Context Distribution (", totalTokens, " tokens)"] }), _jsxs(Box, {
|
|
136
|
+
}, children: ["Context Distribution (", totalTokens, " tokens)"] }), _jsxs(Box, { display: "flex", gap: 2, children: [_jsx(Button, { size: "small", onClick: () => setShowDetails(!showDetails), leadingVisual: ListUnorderedIcon, children: "Details" }), _jsx(Button, { size: "small", onClick: handleOptimize, disabled: isOptimizing, leadingVisual: isOptimizing ? Spinner : ZapIcon, children: "Optimize" })] })] }), _jsx(ReactECharts, { option: {
|
|
154
137
|
series: [
|
|
155
138
|
{
|
|
156
139
|
type: 'treemap',
|
|
@@ -189,58 +172,36 @@ export const Header = ({ activeSession, agentName, agentDescription, agentStatus
|
|
|
189
172
|
],
|
|
190
173
|
},
|
|
191
174
|
],
|
|
192
|
-
}, style: { height: '300px' } }), showDetails && (_jsxs(Box, { sx: {
|
|
193
|
-
mt: 3,
|
|
194
|
-
p: 2,
|
|
195
|
-
border: '1px solid',
|
|
196
|
-
borderColor: 'border.default',
|
|
197
|
-
borderRadius: 2,
|
|
198
|
-
bg: 'canvas.default',
|
|
199
|
-
fontFamily: 'mono',
|
|
200
|
-
fontSize: 0,
|
|
201
|
-
}, children: [_jsx(Text, { sx: { fontWeight: 'bold', display: 'block', mb: 2 }, children: "Context Breakdown:" }), contextData.children.map((category) => (_jsxs(Box, { sx: { mb: 2 }, children: [_jsxs(Text, { sx: { fontWeight: 'bold' }, children: [category.name, ": ", (category.value / 1000).toFixed(0), "K tokens"] }), category.children && (_jsx(Box, { sx: { ml: 3, mt: 1 }, children: category.children.map((item) => (_jsxs(Text, { sx: { display: 'block' }, children: ["\u2022 ", item.name, ": ", (item.value / 1000).toFixed(0), "K tokens"] }, item.name))) }))] }, category.name)))] }))] })), agentName && showAvatarView && (_jsxs(Box, { sx: {
|
|
202
|
-
mt: 2,
|
|
203
|
-
p: 3,
|
|
204
|
-
border: '1px solid',
|
|
205
|
-
borderColor: 'border.default',
|
|
206
|
-
borderRadius: 2,
|
|
207
|
-
bg: 'canvas.default',
|
|
208
|
-
}, children: [_jsx(Text, { sx: {
|
|
175
|
+
}, style: { height: '300px' } }), showDetails && (_jsxs(Box, { mt: 3, p: 2, border: "1px solid", borderColor: "border.default", borderRadius: 2, bg: "canvas.default", fontFamily: "mono", fontSize: 0, children: [_jsx(Text, { sx: { fontWeight: 'bold', display: 'block', mb: 2 }, children: "Context Breakdown:" }), contextData.children.map((category) => (_jsxs(Box, { mb: 2, children: [_jsxs(Text, { sx: { fontWeight: 'bold' }, children: [category.name, ": ", (category.value / 1000).toFixed(0), "K tokens"] }), category.children && (_jsx(Box, { ml: 3, mt: 1, children: category.children.map((item) => (_jsxs(Text, { sx: { display: 'block' }, children: ["\u2022 ", item.name, ": ", (item.value / 1000).toFixed(0), "K tokens"] }, item.name))) }))] }, category.name)))] }))] })), agentName && showAvatarView && (_jsxs(Box, { mt: 2, p: 3, border: "1px solid", borderColor: "border.default", borderRadius: 2, bg: "canvas.default", children: [_jsx(Text, { sx: {
|
|
209
176
|
fontSize: 1,
|
|
210
177
|
fontWeight: 'bold',
|
|
211
178
|
display: 'block',
|
|
212
179
|
mb: 3,
|
|
213
|
-
}, children: "Share and Collaborate" }), _jsxs(Box, {
|
|
180
|
+
}, children: "Share and Collaborate" }), _jsxs(Box, { mb: 3, children: [_jsx(Text, { sx: {
|
|
214
181
|
fontSize: 0,
|
|
215
182
|
fontWeight: 'semibold',
|
|
216
183
|
display: 'block',
|
|
217
184
|
mb: 2,
|
|
218
|
-
}, children: "Current Members" }), _jsxs(Box, {
|
|
185
|
+
}, children: "Current Members" }), _jsxs(Box, { display: "flex", flexDirection: "column", gap: 2, children: [_jsxs(Box, { display: "flex", alignItems: "center", gap: 2, children: [_jsx(Avatar, { size: 32, alt: "Primer logo", src: "https://avatars.githubusercontent.com/primer" }), _jsxs(Box, { flex: 1, children: [_jsx(Text, { sx: {
|
|
219
186
|
fontSize: 0,
|
|
220
187
|
fontWeight: 'semibold',
|
|
221
188
|
display: 'block',
|
|
222
|
-
}, children: "Primer" }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: "primer@github.com" })] }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: "Admin" })] }), _jsxs(Box, {
|
|
189
|
+
}, children: "Primer" }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: "primer@github.com" })] }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: "Admin" })] }), _jsxs(Box, { display: "flex", alignItems: "center", gap: 2, children: [_jsx(Avatar, { size: 32, alt: "GitHub logo", src: "https://avatars.githubusercontent.com/github" }), _jsxs(Box, { flex: 1, children: [_jsx(Text, { sx: {
|
|
223
190
|
fontSize: 0,
|
|
224
191
|
fontWeight: 'semibold',
|
|
225
192
|
display: 'block',
|
|
226
|
-
}, children: "GitHub" }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: "support@github.com" })] }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: "Read-Write" })] }), _jsxs(Box, {
|
|
193
|
+
}, children: "GitHub" }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: "support@github.com" })] }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: "Read-Write" })] }), _jsxs(Box, { display: "flex", alignItems: "center", gap: 2, children: [_jsx(Avatar, { size: 32, alt: "Atom logo", src: "https://avatars.githubusercontent.com/atom" }), _jsxs(Box, { flex: 1, children: [_jsx(Text, { sx: {
|
|
227
194
|
fontSize: 0,
|
|
228
195
|
fontWeight: 'semibold',
|
|
229
196
|
display: 'block',
|
|
230
|
-
}, children: "Atom" }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: "atom@github.com" })] }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: "Read-Only" })] }), _jsxs(Box, {
|
|
197
|
+
}, children: "Atom" }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: "atom@github.com" })] }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: "Read-Only" })] }), _jsxs(Box, { display: "flex", alignItems: "center", gap: 2, children: [_jsx(Avatar, { size: 32, alt: "GitHub Desktop logo", src: "https://avatars.githubusercontent.com/desktop" }), _jsxs(Box, { flex: 1, children: [_jsx(Text, { sx: {
|
|
231
198
|
fontSize: 0,
|
|
232
199
|
fontWeight: 'semibold',
|
|
233
200
|
display: 'block',
|
|
234
|
-
}, children: "GitHub Desktop" }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: "desktop@github.com" })] }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: "Read-Write" })] })] })] }), _jsx(Box, {
|
|
201
|
+
}, children: "GitHub Desktop" }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: "desktop@github.com" })] }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: "Read-Write" })] })] })] }), _jsx(Box, { mb: 3, children: _jsxs(FormControl, { children: [_jsx(FormControl.Label, { children: "Add people" }), _jsx(TextInput, { placeholder: "Enter email address", sx: { width: '100%' } })] }) }), _jsx(Box, { mb: 3, children: _jsxs(FormControl, { children: [_jsx(FormControl.Label, { children: "Message" }), _jsx(TextInput, { placeholder: "Optional message for invitees", sx: { width: '100%' } })] }) }), _jsxs(Box, { children: [_jsx(Text, { sx: {
|
|
235
202
|
fontSize: 0,
|
|
236
203
|
fontWeight: 'semibold',
|
|
237
204
|
display: 'block',
|
|
238
205
|
mb: 2,
|
|
239
|
-
}, children: "General Access" }), _jsx(Box, { sx: {
|
|
240
|
-
p: 2,
|
|
241
|
-
border: '1px solid',
|
|
242
|
-
borderColor: 'border.default',
|
|
243
|
-
borderRadius: 2,
|
|
244
|
-
bg: 'canvas.default',
|
|
245
|
-
}, children: _jsxs(Box, { sx: { display: 'flex', flexDirection: 'column', gap: 2 }, children: [_jsxs(Box, { sx: { display: 'flex', justifyContent: 'space-between' }, children: [_jsx(Text, { sx: { fontSize: 0 }, children: "foo" }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: "Read-Only" })] }), _jsxs(Box, { sx: { display: 'flex', justifyContent: 'space-between' }, children: [_jsx(Text, { sx: { fontSize: 0 }, children: "bar" }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: "Read-Write" })] })] }) })] })] }))] }));
|
|
206
|
+
}, children: "General Access" }), _jsx(Box, { p: 2, border: "1px solid", borderColor: "border.default", borderRadius: 2, bg: "canvas.default", children: _jsxs(Box, { display: "flex", flexDirection: "column", gap: 2, children: [_jsxs(Box, { display: "flex", justifyContent: "space-between", children: [_jsx(Text, { sx: { fontSize: 0 }, children: "foo" }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: "Read-Only" })] }), _jsxs(Box, { display: "flex", justifyContent: "space-between", children: [_jsx(Text, { sx: { fontSize: 0 }, children: "bar" }), _jsx(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: "Read-Write" })] })] }) })] })] }))] }));
|
|
246
207
|
};
|
|
@@ -12,13 +12,5 @@ export const HeaderControls = ({ onToggleContextTree, }) => {
|
|
|
12
12
|
120, 200, 150, 180, 170, 210, 200, 220, 180, 210, 230, 250, 260, 270, 280,
|
|
13
13
|
290, 300, 320, 310, 330,
|
|
14
14
|
];
|
|
15
|
-
return (_jsx(Box, {
|
|
16
|
-
display: 'flex',
|
|
17
|
-
alignItems: 'center',
|
|
18
|
-
gap: 2,
|
|
19
|
-
cursor: 'pointer',
|
|
20
|
-
'&:hover': {
|
|
21
|
-
opacity: 0.8,
|
|
22
|
-
},
|
|
23
|
-
}, onClick: onToggleContextTree, children: _jsx(Box, { sx: { width: '120px', height: '30px' }, children: _jsx(Sparklines, { data: sparklineData, width: 120, height: 30, children: _jsx(SparklinesLine, { color: "var(--fgColor-accent, #16A085)", style: { strokeWidth: '2' } }) }) }) }));
|
|
15
|
+
return (_jsx(Box, { display: "flex", alignItems: "center", gap: 2, cursor: "pointer", hover: { opacity: 0.8 }, onClick: onToggleContextTree, children: _jsx(Box, { width: "120px", height: "30px", children: _jsx(Sparklines, { data: sparklineData, width: 120, height: 30, children: _jsx(SparklinesLine, { color: "var(--fgColor-accent, #16A085)", style: { strokeWidth: '2' } }) }) }) }));
|
|
24
16
|
};
|
|
@@ -77,12 +77,5 @@ export const LexicalEditor = ({ content = INITIAL_CONTENT, serviceManager, extra
|
|
|
77
77
|
const handleChange = useCallback((_editorState) => {
|
|
78
78
|
// onChange handler - can be used for tracking changes
|
|
79
79
|
}, []);
|
|
80
|
-
return (_jsx(Box, {
|
|
81
|
-
border: '1px solid',
|
|
82
|
-
borderColor: 'border.default',
|
|
83
|
-
borderRadius: 2,
|
|
84
|
-
padding: 3,
|
|
85
|
-
backgroundColor: 'canvas.default',
|
|
86
|
-
minHeight: '600px',
|
|
87
|
-
}, children: _jsx(LexicalConfigProvider, { lexicalId: LEXICAL_ID, serviceManager: serviceManager, children: _jsx(LexicalExtensionComposer, { extension: editorExtension, contentEditable: null, children: _jsxs("div", { className: "lexical-editor-inner", ref: onRef, children: [_jsx(LexicalStatePlugin, {}), _jsx(ContentEditable, { className: "lexical-editor-content", "aria-label": "Lexical Editor" }), _jsx(OnChangePlugin, { onChange: handleChange }), _jsx(LoadContentPlugin, { content: content }), _jsx(JupyterReactTheme, { useBaseStyles: false, children: _jsx(SimpleKernelPluginsInner, {}) }), floatingAnchorElem && (_jsxs(_Fragment, { children: [_jsx(DraggableBlockPlugin, { anchorElem: floatingAnchorElem }), _jsx(FloatingTextFormatToolbarPlugin, { anchorElem: floatingAnchorElem, setIsLinkEditMode: setIsLinkEditMode, extraItems: extraItems }), _jsx(CodeActionMenuPlugin, { anchorElem: floatingAnchorElem })] })), children] }) }) }) }));
|
|
80
|
+
return (_jsx(Box, { border: "1px solid", borderColor: "border.default", borderRadius: 2, padding: 3, backgroundColor: "canvas.default", minHeight: "600px", children: _jsx(LexicalConfigProvider, { lexicalId: LEXICAL_ID, serviceManager: serviceManager, children: _jsx(LexicalExtensionComposer, { extension: editorExtension, contentEditable: null, children: _jsxs("div", { className: "lexical-editor-inner", ref: onRef, children: [_jsx(LexicalStatePlugin, {}), _jsx(ContentEditable, { className: "lexical-editor-content", "aria-label": "Lexical Editor" }), _jsx(OnChangePlugin, { onChange: handleChange }), _jsx(LoadContentPlugin, { content: content }), _jsx(JupyterReactTheme, { useBaseStyles: false, children: _jsx(SimpleKernelPluginsInner, {}) }), floatingAnchorElem && (_jsxs(_Fragment, { children: [_jsx(DraggableBlockPlugin, { anchorElem: floatingAnchorElem }), _jsx(FloatingTextFormatToolbarPlugin, { anchorElem: floatingAnchorElem, setIsLinkEditMode: setIsLinkEditMode, extraItems: extraItems }), _jsx(CodeActionMenuPlugin, { anchorElem: floatingAnchorElem })] })), children] }) }) }) }));
|
|
88
81
|
};
|
|
@@ -9,17 +9,5 @@ import { McpServerManager } from '../../mcp/McpServerManager';
|
|
|
9
9
|
* When an agent is running (isConfigured=true), also shows the MCP Server Manager for runtime management.
|
|
10
10
|
*/
|
|
11
11
|
export const MainContent = ({ showWelcomeMessage = true, baseUrl, agentId, enableCodemode, selectedMcpServers, onSelectedMcpServersChange, onMcpServersChange, isConfigured, }) => {
|
|
12
|
-
return (_jsxs(Box, {
|
|
13
|
-
mb: 4,
|
|
14
|
-
p: 3,
|
|
15
|
-
bg: 'canvas.default',
|
|
16
|
-
borderRadius: 2,
|
|
17
|
-
border: '1px solid',
|
|
18
|
-
borderColor: 'border.default',
|
|
19
|
-
}, children: _jsx(McpServerManager, { baseUrl: baseUrl, agentId: agentId, enableCodemode: enableCodemode, selectedServers: selectedMcpServers, onSelectedServersChange: onSelectedMcpServersChange, onServersChange: onMcpServersChange, disabled: false }) })), showWelcomeMessage && (_jsx(Box, { sx: {
|
|
20
|
-
display: 'flex',
|
|
21
|
-
alignItems: 'center',
|
|
22
|
-
justifyContent: 'center',
|
|
23
|
-
height: '100%',
|
|
24
|
-
}, children: _jsx(Text, { sx: { color: 'fg.muted', fontSize: 1 }, children: "Configure your agent and start a conversation using the chat panel." }) }))] }));
|
|
12
|
+
return (_jsxs(Box, { height: "100%", overflow: "auto", padding: 3, children: [isConfigured && baseUrl && (_jsx(Box, { mb: 4, p: 3, bg: "canvas.default", borderRadius: 2, border: "1px solid", borderColor: "border.default", children: _jsx(McpServerManager, { baseUrl: baseUrl, agentId: agentId, enableCodemode: enableCodemode, selectedServers: selectedMcpServers, onSelectedServersChange: onSelectedMcpServersChange, onServersChange: onMcpServersChange, disabled: false }) })), showWelcomeMessage && (_jsx(Box, { display: "flex", alignItems: "center", justifyContent: "center", height: "100%", children: _jsx(Text, { sx: { color: 'fg.muted', fontSize: 1 }, children: "Configure your agent and start a conversation using the chat panel." }) }))] }));
|
|
25
13
|
};
|
|
@@ -15,7 +15,7 @@ import { Box } from '@datalayer/primer-addons';
|
|
|
15
15
|
*/
|
|
16
16
|
export const MockFileBrowser = ({ codemode = false, }) => {
|
|
17
17
|
const [activeTab, setActiveTab] = useState('sandbox');
|
|
18
|
-
return (_jsxs(Box, {
|
|
18
|
+
return (_jsxs(Box, { height: "100%", display: "flex", flexDirection: "column", children: [_jsx(Box, { p: 2, borderBottom: "1px solid", borderColor: "border.default", children: _jsxs(SegmentedControl, { "aria-label": "Left pane navigation", children: [_jsx(SegmentedControl.Button, { selected: activeTab === 'sandbox', onClick: () => setActiveTab('sandbox'), children: "Code" }), _jsx(SegmentedControl.Button, { selected: activeTab === 'tools', onClick: () => setActiveTab('tools'), children: "Tools" })] }) }), _jsx(Box, { p: 2, flex: 1, overflow: "auto", children: activeTab === 'sandbox' ? (_jsxs(_Fragment, { children: [_jsxs(Box, { mb: 4, children: [_jsx(Text, { sx: {
|
|
19
19
|
fontSize: 1,
|
|
20
20
|
fontWeight: 'semibold',
|
|
21
21
|
display: 'block',
|
|
@@ -26,49 +26,13 @@ export const MockFileBrowser = ({ codemode = false, }) => {
|
|
|
26
26
|
display: 'block',
|
|
27
27
|
mb: 1,
|
|
28
28
|
color: 'fg.muted',
|
|
29
|
-
}, children: "Documents" }), _jsxs(Box, {
|
|
30
|
-
py: 1,
|
|
31
|
-
cursor: 'pointer',
|
|
32
|
-
'&:hover': { bg: 'canvas.default' },
|
|
33
|
-
}, children: "\uD83D\uDCC1 notebooks/" }), _jsx(Box, { sx: {
|
|
34
|
-
py: 1,
|
|
35
|
-
pl: 3,
|
|
36
|
-
cursor: 'pointer',
|
|
37
|
-
'&:hover': { bg: 'canvas.default' },
|
|
38
|
-
}, children: "\uD83D\uDCD3 analysis.ipynb" }), _jsx(Box, { sx: {
|
|
39
|
-
py: 1,
|
|
40
|
-
pl: 3,
|
|
41
|
-
cursor: 'pointer',
|
|
42
|
-
'&:hover': { bg: 'canvas.default' },
|
|
43
|
-
}, children: "\uD83D\uDCD3 demo.ipynb" }), _jsx(Box, { sx: {
|
|
44
|
-
py: 1,
|
|
45
|
-
cursor: 'pointer',
|
|
46
|
-
'&:hover': { bg: 'canvas.default' },
|
|
47
|
-
}, children: "\uD83D\uDCC1 data/" }), _jsx(Box, { sx: {
|
|
48
|
-
py: 1,
|
|
49
|
-
pl: 3,
|
|
50
|
-
cursor: 'pointer',
|
|
51
|
-
'&:hover': { bg: 'canvas.default' },
|
|
52
|
-
}, children: "\uD83D\uDCC4 dataset.csv" }), _jsx(Box, { sx: {
|
|
53
|
-
py: 1,
|
|
54
|
-
cursor: 'pointer',
|
|
55
|
-
'&:hover': { bg: 'canvas.default' },
|
|
56
|
-
}, children: "\uD83D\uDCC1 models/" }), _jsx(Box, { sx: {
|
|
57
|
-
py: 1,
|
|
58
|
-
pl: 3,
|
|
59
|
-
cursor: 'pointer',
|
|
60
|
-
'&:hover': { bg: 'canvas.default' },
|
|
61
|
-
}, children: "\uD83D\uDCC4 agent.py" })] }), _jsx(Text, { sx: {
|
|
29
|
+
}, children: "Documents" }), _jsxs(Box, { fontSize: 0, mb: 2, children: [_jsx(Box, { py: 1, cursor: "pointer", hover: { bg: 'canvas.default' }, children: "\uD83D\uDCC1 notebooks/" }), _jsx(Box, { py: 1, pl: 3, cursor: "pointer", hover: { bg: 'canvas.default' }, children: "\uD83D\uDCD3 analysis.ipynb" }), _jsx(Box, { py: 1, pl: 3, cursor: "pointer", hover: { bg: 'canvas.default' }, children: "\uD83D\uDCD3 demo.ipynb" }), _jsx(Box, { py: 1, cursor: "pointer", hover: { bg: 'canvas.default' }, children: "\uD83D\uDCC1 data/" }), _jsx(Box, { py: 1, pl: 3, cursor: "pointer", hover: { bg: 'canvas.default' }, children: "\uD83D\uDCC4 dataset.csv" }), _jsx(Box, { py: 1, cursor: "pointer", hover: { bg: 'canvas.default' }, children: "\uD83D\uDCC1 models/" }), _jsx(Box, { py: 1, pl: 3, cursor: "pointer", hover: { bg: 'canvas.default' }, children: "\uD83D\uDCC4 agent.py" })] }), _jsx(Text, { sx: {
|
|
62
30
|
fontSize: 0,
|
|
63
31
|
fontWeight: 'semibold',
|
|
64
32
|
display: 'block',
|
|
65
33
|
mb: 1,
|
|
66
34
|
color: 'fg.muted',
|
|
67
|
-
}, children: "Buckets" }), _jsx(Box, {
|
|
68
|
-
py: 1,
|
|
69
|
-
cursor: 'pointer',
|
|
70
|
-
'&:hover': { bg: 'canvas.default' },
|
|
71
|
-
}, children: "\uD83E\uDEA3 s3://nasa-1" }) })] }), _jsxs(Box, { children: [_jsx(Text, { sx: {
|
|
35
|
+
}, children: "Buckets" }), _jsx(Box, { fontSize: 0, children: _jsx(Box, { py: 1, cursor: "pointer", hover: { bg: 'canvas.default' }, children: "\uD83E\uDEA3 s3://nasa-1" }) })] }), _jsxs(Box, { children: [_jsx(Text, { sx: {
|
|
72
36
|
fontSize: 1,
|
|
73
37
|
fontWeight: 'semibold',
|
|
74
38
|
display: 'block',
|
|
@@ -89,7 +53,7 @@ export const MockFileBrowser = ({ codemode = false, }) => {
|
|
|
89
53
|
field: 'type',
|
|
90
54
|
renderCell: row => (_jsx(Text, { sx: { color: 'fg.muted', fontSize: 0 }, children: row.type })),
|
|
91
55
|
},
|
|
92
|
-
] })] })] })) : (_jsxs(_Fragment, { children: [_jsxs(Box, {
|
|
56
|
+
] })] })] })) : (_jsxs(_Fragment, { children: [_jsxs(Box, { mb: 4, children: [_jsx(Text, { sx: {
|
|
93
57
|
fontSize: 1,
|
|
94
58
|
fontWeight: 'semibold',
|
|
95
59
|
display: 'block',
|
|
@@ -7,5 +7,5 @@ import { Box } from '@datalayer/primer-addons';
|
|
|
7
7
|
* Displays the current session name.
|
|
8
8
|
*/
|
|
9
9
|
export const SessionTabs = ({ sessions: _sessions, activeSession: _activeSession, agentName = 'Earthquake Detector', agentDescription, onSessionChange: _onSessionChange, onAddSession: _onAddSession, }) => {
|
|
10
|
-
return (_jsxs(Box, {
|
|
10
|
+
return (_jsxs(Box, { display: "flex", flexDirection: "column", gap: 1, children: [_jsx(Text, { sx: { fontWeight: 'bold', fontSize: 2 }, children: agentName }), agentDescription && (_jsx(Text, { sx: { fontSize: 1, color: 'fg.muted' }, children: agentDescription }))] }));
|
|
11
11
|
};
|
|
@@ -7,17 +7,5 @@ import { Box, Slider } from '@datalayer/primer-addons';
|
|
|
7
7
|
* Slider for navigating through document history.
|
|
8
8
|
*/
|
|
9
9
|
export const TimeTravel = ({ value, onChange, min = 0, max = 100, step = 1, }) => {
|
|
10
|
-
return (_jsxs(Box, { sx: {
|
|
11
|
-
marginTop: 3,
|
|
12
|
-
padding: 3,
|
|
13
|
-
border: '1px solid',
|
|
14
|
-
borderColor: 'border.default',
|
|
15
|
-
borderRadius: 2,
|
|
16
|
-
backgroundColor: 'canvas.default',
|
|
17
|
-
}, children: [_jsxs(Box, { sx: {
|
|
18
|
-
display: 'flex',
|
|
19
|
-
alignItems: 'center',
|
|
20
|
-
gap: 3,
|
|
21
|
-
marginBottom: 2,
|
|
22
|
-
}, children: [_jsx(Text, { sx: { fontSize: 0, fontWeight: 'semibold' }, children: "Time Travel" }), _jsxs(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: ["Navigate through history: ", value, " steps"] })] }), _jsx(Slider, { value: value, min: min, max: max, step: step, onChange: onChange, "aria-label": "Time travel slider" })] }));
|
|
10
|
+
return (_jsxs(Box, { marginTop: 3, padding: 3, border: "1px solid", borderColor: "border.default", borderRadius: 2, backgroundColor: "canvas.default", children: [_jsxs(Box, { display: "flex", alignItems: "center", gap: 3, marginBottom: 2, children: [_jsx(Text, { sx: { fontSize: 0, fontWeight: 'semibold' }, children: "Time Travel" }), _jsxs(Text, { sx: { fontSize: 0, color: 'fg.muted' }, children: ["Navigate through history: ", value, " steps"] })] }), _jsx(Slider, { value: value, min: min, max: max, step: step, onChange: onChange, "aria-label": "Time travel slider" })] }));
|
|
23
11
|
};
|