@datalayer/agent-runtimes 1.3.88 → 1.3.90
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/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/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/AppRenderer.d.ts +4 -3
- package/lib/loop/apps/AppRenderer.js +11 -12
- package/lib/loop/apps/appspec.js +6 -3
- 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 +5 -21
- package/lib/loop/plugins/app-elements/AppElements.js +2 -31
- package/lib/loop/plugins/app-page/AppPage.js +1 -1
- 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 +40 -106
- 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/scripts/codegen/generate_envvars.py +0 -1
- package/lib/shims/primerAddonsBox.d.ts +0 -1
- package/lib/shims/primerAddonsBox.js +0 -7
|
@@ -103,25 +103,7 @@ const LexicalUI = React.memo(function LexicalUI({ content = INITIAL_CONTENT, ser
|
|
|
103
103
|
const handleChange = useCallback((_editorState) => {
|
|
104
104
|
// onChange handler - can be used for tracking changes
|
|
105
105
|
}, []);
|
|
106
|
-
return (_jsxs(Box, {
|
|
107
|
-
flex: 1,
|
|
108
|
-
display: 'flex',
|
|
109
|
-
flexDirection: 'column',
|
|
110
|
-
overflow: 'auto',
|
|
111
|
-
padding: 3,
|
|
112
|
-
}, children: [_jsxs(Box, { sx: {
|
|
113
|
-
marginBottom: 3,
|
|
114
|
-
paddingBottom: 3,
|
|
115
|
-
borderBottom: '1px solid',
|
|
116
|
-
borderColor: 'border.default',
|
|
117
|
-
}, children: [_jsx("h1", { children: "Lexical Example" }), _jsx("p", { children: "Platform-agnostic usage with agent-runtimes integration. Use the AI Agent to manipulate the Document." })] }), _jsx(Box, { sx: {
|
|
118
|
-
border: '1px solid',
|
|
119
|
-
borderColor: 'border.default',
|
|
120
|
-
borderRadius: 2,
|
|
121
|
-
padding: 3,
|
|
122
|
-
backgroundColor: 'canvas.default',
|
|
123
|
-
minHeight: '600px',
|
|
124
|
-
}, children: _jsxs(LexicalConfigProvider, { lexicalId: LEXICAL_ID, serviceManager: serviceManager, children: [_jsx(LexicalToolsPlugin, { onToolsReady: onToolsReady }), _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(TableCellResizerPlugin, {}), _jsx(ThemedJupyterProvider, { children: _jsx(SimpleKernelPluginsInner, { serviceManager: serviceManager }) }), floatingAnchorElem && (_jsxs(_Fragment, { children: [_jsx(DraggableBlockPlugin, { anchorElem: floatingAnchorElem }), _jsx(FloatingTextFormatToolbarPlugin, { anchorElem: floatingAnchorElem, setIsLinkEditMode: setIsLinkEditMode, extraItems: toolbarItems }), _jsx(CodeActionMenuPlugin, { anchorElem: floatingAnchorElem })] })), _jsx(ChatInlinePlugin, { protocol: {
|
|
106
|
+
return (_jsxs(Box, { flex: 1, display: "flex", flexDirection: "column", overflow: "auto", padding: 3, children: [_jsxs(Box, { marginBottom: 3, paddingBottom: 3, borderBottom: "1px solid", borderColor: "border.default", children: [_jsx("h1", { children: "Lexical Example" }), _jsx("p", { children: "Platform-agnostic usage with agent-runtimes integration. Use the AI Agent to manipulate the Document." })] }), _jsx(Box, { border: "1px solid", borderColor: "border.default", borderRadius: 2, padding: 3, backgroundColor: "canvas.default", minHeight: "600px", children: _jsxs(LexicalConfigProvider, { lexicalId: LEXICAL_ID, serviceManager: serviceManager, children: [_jsx(LexicalToolsPlugin, { onToolsReady: onToolsReady }), _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(TableCellResizerPlugin, {}), _jsx(ThemedJupyterProvider, { children: _jsx(SimpleKernelPluginsInner, { serviceManager: serviceManager }) }), floatingAnchorElem && (_jsxs(_Fragment, { children: [_jsx(DraggableBlockPlugin, { anchorElem: floatingAnchorElem }), _jsx(FloatingTextFormatToolbarPlugin, { anchorElem: floatingAnchorElem, setIsLinkEditMode: setIsLinkEditMode, extraItems: toolbarItems }), _jsx(CodeActionMenuPlugin, { anchorElem: floatingAnchorElem })] })), _jsx(ChatInlinePlugin, { protocol: {
|
|
125
107
|
type: 'vercel-ai',
|
|
126
108
|
endpoint,
|
|
127
109
|
}, isOpen: isAiOpen, onClose: closeAi, pendingPrompt: pendingPrompt, onPendingPromptConsumed: clearPendingPrompt })] }) })] }) })] }));
|
|
@@ -158,21 +140,7 @@ function LexicalWithChat({ content, serviceManager, }) {
|
|
|
158
140
|
console.log('[LexicalWithChat] 🔄 Tools received, updating state');
|
|
159
141
|
setTools(newTools);
|
|
160
142
|
}, []);
|
|
161
|
-
return (_jsxs(Box, {
|
|
162
|
-
height: '100vh',
|
|
163
|
-
width: '100vw',
|
|
164
|
-
display: 'flex',
|
|
165
|
-
overflow: 'hidden',
|
|
166
|
-
}, children: [_jsx(LexicalUI, { content: content, serviceManager: serviceManager, endpoint: protocolConfig.endpoint, onToolsReady: handleToolsReady }), chatError && (_jsxs(Box, { sx: {
|
|
167
|
-
position: 'fixed',
|
|
168
|
-
bottom: 20,
|
|
169
|
-
right: 20,
|
|
170
|
-
padding: 3,
|
|
171
|
-
backgroundColor: 'danger.subtle',
|
|
172
|
-
color: 'danger.fg',
|
|
173
|
-
borderRadius: 2,
|
|
174
|
-
maxWidth: 300,
|
|
175
|
-
}, children: [_jsx("strong", { children: "Error:" }), " ", chatError] })), effectiveReady && (_jsx(ChatFloating, { kernelIndicatorPlacement: "right", protocol: protocolConfig, title: "Lexical AI Agent Runtime", description: "Hi! I can help you edit documents. Try: 'Insert a heading', 'Add a code block', or 'Create a list'", defaultOpen: true, defaultViewMode: "panel", position: "bottom-right", frontendTools: chatFrontendTools, useStore: false, showModelSelector: true, showToolsMenu: true, showSkillsMenu: true, suggestions: [
|
|
143
|
+
return (_jsxs(Box, { height: "100vh", width: "100vw", display: "flex", overflow: "hidden", children: [_jsx(LexicalUI, { content: content, serviceManager: serviceManager, endpoint: protocolConfig.endpoint, onToolsReady: handleToolsReady }), chatError && (_jsxs(Box, { position: "fixed", bottom: 20, right: 20, padding: 3, backgroundColor: "danger.subtle", color: "danger.fg", borderRadius: 2, maxWidth: 300, children: [_jsx("strong", { children: "Error:" }), " ", chatError] })), effectiveReady && (_jsx(ChatFloating, { kernelIndicatorPlacement: "right", protocol: protocolConfig, title: "Lexical AI Agent Runtime", description: "Hi! I can help you edit documents. Try: 'Insert a heading', 'Add a code block', or 'Create a list'", defaultOpen: true, defaultViewMode: "panel", position: "bottom-right", frontendTools: chatFrontendTools, useStore: false, showModelSelector: true, showToolsMenu: true, showSkillsMenu: true, suggestions: [
|
|
176
144
|
{
|
|
177
145
|
title: 'Insert heading',
|
|
178
146
|
message: 'Insert a heading that says "Welcome"',
|
|
@@ -91,7 +91,7 @@ function LexicalEditor({ serviceManager, endpoint }) {
|
|
|
91
91
|
* inside it is what made them read `canvas.default` from the stock light
|
|
92
92
|
* palette — the same trap `NotebookAgentSidebarExample` documents.
|
|
93
93
|
*/
|
|
94
|
-
return (_jsx(LexicalPrimerThemeProvider, { useStore: useExampleThemeStore, children: _jsx(LexicalConfigProvider, { lexicalId: LEXICAL_ID, serviceManager: serviceManager, children: _jsxs(LexicalExtensionComposer, { extension: editorExtension, contentEditable: null, children: [_jsx(LexicalStatePlugin, {}), _jsxs(Box, {
|
|
94
|
+
return (_jsx(LexicalPrimerThemeProvider, { useStore: useExampleThemeStore, children: _jsx(LexicalConfigProvider, { lexicalId: LEXICAL_ID, serviceManager: serviceManager, children: _jsxs(LexicalExtensionComposer, { extension: editorExtension, contentEditable: null, children: [_jsx(LexicalStatePlugin, {}), _jsxs(Box, { position: "relative", width: "100%", children: [_jsx("div", { ref: onRef, children: _jsx(ContentEditable, { placeholder: _jsx("div", { style: {
|
|
95
95
|
position: 'absolute',
|
|
96
96
|
top: '24px',
|
|
97
97
|
left: '24px',
|
|
@@ -123,29 +123,7 @@ export function ChatLexicalAgentExampleInner({ serviceManager, }) {
|
|
|
123
123
|
const effectiveReady = agentReady;
|
|
124
124
|
// Get lexical tools for ChatSidebar
|
|
125
125
|
// Build Vercel AI protocol config
|
|
126
|
-
return (_jsxs(_Fragment, { children: [_jsxs(Box, {
|
|
127
|
-
height: 'calc(100vh - 70px)',
|
|
128
|
-
width: '100vw',
|
|
129
|
-
display: 'flex',
|
|
130
|
-
overflow: 'hidden',
|
|
131
|
-
}, children: [_jsxs(Box, { sx: {
|
|
132
|
-
flex: 1,
|
|
133
|
-
display: 'flex',
|
|
134
|
-
flexDirection: 'column',
|
|
135
|
-
overflow: 'hidden',
|
|
136
|
-
}, children: [_jsxs(Box, { sx: {
|
|
137
|
-
p: 3,
|
|
138
|
-
borderBottom: '1px solid',
|
|
139
|
-
borderColor: 'border.default',
|
|
140
|
-
bg: 'canvas.default',
|
|
141
|
-
}, children: [_jsx("h1", { style: { margin: 0, fontSize: '1.5rem' }, children: "Lexical Agent Sidebar Example" }), _jsx("p", { style: { margin: '8px 0 0', color: 'var(--fgColor-muted)' }, children: "Next generation chat with Lexical editor integration" })] }), _jsx(Box, { sx: {
|
|
142
|
-
flex: 1,
|
|
143
|
-
minHeight: 0,
|
|
144
|
-
display: 'flex',
|
|
145
|
-
flexDirection: 'column',
|
|
146
|
-
overflow: 'auto',
|
|
147
|
-
bg: 'canvas.default',
|
|
148
|
-
}, children: _jsx(LexicalEditor, { serviceManager: serviceManager, endpoint: protocolConfig.endpoint }) })] }), effectiveReady && (_jsx(ChatSidebar, { kernelIndicatorPlacement: "right", title: "AI Assistant", protocol: protocolConfig, position: "right", width: 400, showNewChatButton: true, showClearButton: true, showSettingsButton: true, defaultOpen: true, panelProps: {
|
|
126
|
+
return (_jsxs(_Fragment, { children: [_jsxs(Box, { height: "calc(100vh - 70px)", width: "100vw", display: "flex", overflow: "hidden", children: [_jsxs(Box, { flex: 1, display: "flex", flexDirection: "column", overflow: "hidden", children: [_jsxs(Box, { p: 3, borderBottom: "1px solid", borderColor: "border.default", bg: "canvas.default", children: [_jsx("h1", { style: { margin: 0, fontSize: '1.5rem' }, children: "Lexical Agent Sidebar Example" }), _jsx("p", { style: { margin: '8px 0 0', color: 'var(--fgColor-muted)' }, children: "Next generation chat with Lexical editor integration" })] }), _jsx(Box, { flex: 1, minHeight: 0, display: "flex", flexDirection: "column", overflow: "auto", bg: "canvas.default", children: _jsx(LexicalEditor, { serviceManager: serviceManager, endpoint: protocolConfig.endpoint }) })] }), effectiveReady && (_jsx(ChatSidebar, { kernelIndicatorPlacement: "right", title: "AI Assistant", protocol: protocolConfig, position: "right", width: 400, showNewChatButton: true, showClearButton: true, showSettingsButton: true, defaultOpen: true, panelProps: {
|
|
149
127
|
protocol: protocolConfig,
|
|
150
128
|
frontendTools: chatFrontendTools,
|
|
151
129
|
useStore: true,
|
|
@@ -170,16 +148,7 @@ export function ChatLexicalAgentExampleInner({ serviceManager, }) {
|
|
|
170
148
|
message: 'Can you summarize the content in the editor?',
|
|
171
149
|
},
|
|
172
150
|
],
|
|
173
|
-
} }))] }), chatError && (_jsxs(Box, {
|
|
174
|
-
position: 'fixed',
|
|
175
|
-
bottom: 20,
|
|
176
|
-
right: 20,
|
|
177
|
-
padding: 3,
|
|
178
|
-
backgroundColor: 'danger.subtle',
|
|
179
|
-
color: 'danger.fg',
|
|
180
|
-
borderRadius: 2,
|
|
181
|
-
maxWidth: 300,
|
|
182
|
-
}, children: [_jsx("strong", { children: "Error:" }), " ", chatError] }))] }));
|
|
151
|
+
} }))] }), chatError && (_jsxs(Box, { position: "fixed", bottom: 20, right: 20, padding: 3, backgroundColor: "danger.subtle", color: "danger.fg", borderRadius: 2, maxWidth: 300, children: [_jsx("strong", { children: "Error:" }), " ", chatError] }))] }));
|
|
183
152
|
}
|
|
184
153
|
/**
|
|
185
154
|
* The example, in the app's theme, on the shell's runtime.
|
|
@@ -51,7 +51,7 @@ function computerDesk() {
|
|
|
51
51
|
}
|
|
52
52
|
const LoopAppComputerExample = () => {
|
|
53
53
|
const app = useMemo(computerDesk, []);
|
|
54
|
-
return (_jsx(ThemedProvider, { children: _jsx(Box, {
|
|
54
|
+
return (_jsx(ThemedProvider, { children: _jsx(Box, { height: "100vh", minHeight: 0, children: _jsx(AppRenderer, { app: app,
|
|
55
55
|
// The examples Vite server has no /api proxy.
|
|
56
56
|
serverUrl: resolveExampleAgentRuntimesUrl('local'), target: "local", sidebar: true }) }) }));
|
|
57
57
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
|
-
import { Box } from '@primer
|
|
3
|
+
import { Box } from '@datalayer/primer-addons';
|
|
4
4
|
import { QueryClientProvider } from '@tanstack/react-query';
|
|
5
5
|
import { useReactor } from '@datalayer/reactor/react';
|
|
6
6
|
import { registerDeckComponents, registerDecks } from '@datalayer/decks';
|
|
@@ -55,7 +55,7 @@ export function LoopShellExample({ serverUrl = resolveExampleAgentRuntimesUrl('l
|
|
|
55
55
|
// Registered here rather than inside the workspace, because this component
|
|
56
56
|
// built it; the workspace is told not to manage it a second time.
|
|
57
57
|
useReactor(reactor);
|
|
58
|
-
const shell = (_jsx(QueryClientProvider, { client: internalQueryClient, children: _jsx(Box, {
|
|
58
|
+
const shell = (_jsx(QueryClientProvider, { client: internalQueryClient, children: _jsx(Box, { height: "100%", minHeight: 0, children: _jsx(LoopWorkspace, { serverUrl: serverUrl, agentId: agentId, reactor: reactor, manageReactor: false,
|
|
59
59
|
// The header stays for the one thing living in it — the editor
|
|
60
60
|
// selector on its trailing edge — but offers no view switcher:
|
|
61
61
|
// a blank shell with one control is the example.
|
|
@@ -87,13 +87,7 @@ function buildStrategySystemPrompt(strategy) {
|
|
|
87
87
|
}
|
|
88
88
|
function NotebookUI({ serviceManager }) {
|
|
89
89
|
if (!serviceManager) {
|
|
90
|
-
return (_jsx(Box, {
|
|
91
|
-
display: 'flex',
|
|
92
|
-
alignItems: 'center',
|
|
93
|
-
justifyContent: 'center',
|
|
94
|
-
height: '100%',
|
|
95
|
-
color: 'fg.muted',
|
|
96
|
-
}, children: "Loading Simple services..." }));
|
|
90
|
+
return (_jsx(Box, { display: "flex", alignItems: "center", justifyContent: "center", height: "100%", color: "fg.muted", children: "Loading Simple services..." }));
|
|
97
91
|
}
|
|
98
92
|
/*
|
|
99
93
|
* Scoped to the notebook, not to the example.
|
|
@@ -111,25 +105,7 @@ function NotebookUI({ serviceManager }) {
|
|
|
111
105
|
* A compact, read-only summary of the selected strategy specification.
|
|
112
106
|
*/
|
|
113
107
|
function StrategySummary({ strategy }) {
|
|
114
|
-
return (_jsxs(Box, {
|
|
115
|
-
mt: 2,
|
|
116
|
-
p: 2,
|
|
117
|
-
border: '1px solid',
|
|
118
|
-
borderColor: 'border.default',
|
|
119
|
-
borderRadius: 2,
|
|
120
|
-
bg: 'canvas.default',
|
|
121
|
-
fontSize: 0,
|
|
122
|
-
}, children: [_jsx(Box, { sx: { display: 'flex', flexWrap: 'wrap', gap: 2, mb: 1 }, children: strategy.phases.map((phase, index) => (_jsxs(Box, { sx: {
|
|
123
|
-
display: 'flex',
|
|
124
|
-
alignItems: 'center',
|
|
125
|
-
gap: 1,
|
|
126
|
-
px: 2,
|
|
127
|
-
py: '2px',
|
|
128
|
-
borderRadius: 6,
|
|
129
|
-
bg: 'neutral.muted',
|
|
130
|
-
color: 'fg.default',
|
|
131
|
-
fontWeight: 'bold',
|
|
132
|
-
}, children: [index + 1, ". ", phase] }, phase))) }), strategy.objective && (_jsxs(Box, { sx: { color: 'fg.muted' }, children: [_jsx("strong", { children: "Objective:" }), " ", strategy.objective] })), strategy.termination && (_jsxs(Box, { sx: { color: 'fg.muted', mt: 1 }, children: [_jsx("strong", { children: "Max iterations:" }), " ", strategy.termination.maxIterations, ' ', "\u00B7 ", _jsx("strong", { children: "On blocked:" }), " ", strategy.termination.onBlocked] }))] }));
|
|
108
|
+
return (_jsxs(Box, { mt: 2, p: 2, border: "1px solid", borderColor: "border.default", borderRadius: 2, bg: "canvas.default", fontSize: 0, children: [_jsx(Box, { display: "flex", flexWrap: "wrap", gap: 2, mb: 1, children: strategy.phases.map((phase, index) => (_jsxs(Box, { display: "flex", alignItems: "center", gap: 1, px: 2, py: "2px", borderRadius: 6, bg: "neutral.muted", color: "fg.default", fontWeight: "bold", children: [index + 1, ". ", phase] }, phase))) }), strategy.objective && (_jsxs(Box, { color: "fg.muted", children: [_jsx("strong", { children: "Objective:" }), " ", strategy.objective] })), strategy.termination && (_jsxs(Box, { color: "fg.muted", mt: 1, children: [_jsx("strong", { children: "Max iterations:" }), " ", strategy.termination.maxIterations, ' ', "\u00B7 ", _jsx("strong", { children: "On blocked:" }), " ", strategy.termination.onBlocked] }))] }));
|
|
133
109
|
}
|
|
134
110
|
export function LoopStrategyExampleInner({ serviceManager, }) {
|
|
135
111
|
// All available strategies come from the generated strategy catalogue.
|
|
@@ -177,57 +153,19 @@ export function LoopStrategyExampleInner({ serviceManager, }) {
|
|
|
177
153
|
message: 'Summarize the key findings and produce a final, decision-oriented report.',
|
|
178
154
|
},
|
|
179
155
|
], [selectedStrategy]);
|
|
180
|
-
return (_jsx(_Fragment, { children: _jsxs(Box
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
}, children: [_jsxs(Box, { sx: {
|
|
192
|
-
flex: 1,
|
|
193
|
-
display: 'flex',
|
|
194
|
-
flexDirection: 'column',
|
|
195
|
-
overflow: 'hidden',
|
|
196
|
-
}, children: [_jsxs(Box, { sx: {
|
|
197
|
-
p: 3,
|
|
198
|
-
borderBottom: '1px solid',
|
|
199
|
-
borderColor: 'border.default',
|
|
200
|
-
bg: 'canvas.default',
|
|
201
|
-
}, children: [_jsxs(Box, { sx: {
|
|
202
|
-
display: 'flex',
|
|
203
|
-
alignItems: 'center',
|
|
204
|
-
justifyContent: 'space-between',
|
|
205
|
-
gap: 3,
|
|
206
|
-
flexWrap: 'wrap',
|
|
207
|
-
}, children: [_jsxs(Box, { children: [_jsxs("h1", { style: { margin: 0, fontSize: '1.5rem' }, children: [selectedStrategy.emoji, " Loop Strategy Example"] }), _jsx("p", { style: { margin: '8px 0 0', color: 'var(--fgColor-muted)' }, children: "Define and launch an agent reasoning strategy \u2014 observe, think, act, evaluate \u2014 over a live notebook." })] }), _jsxs(Box, { sx: { display: 'flex', alignItems: 'center', gap: 2 }, title: isStrategySelectorDisabled
|
|
156
|
+
return (_jsx(_Fragment, { children: _jsxs(Box
|
|
157
|
+
// The wrapper is the viewport, not the window: it sits below the
|
|
158
|
+
// header and beside the sidebar, so viewport units size this box to
|
|
159
|
+
// an area it is not in — and the wrapper paints no background of its
|
|
160
|
+
// own, so wherever this box failed to reach showed through white.
|
|
161
|
+
, {
|
|
162
|
+
// The wrapper is the viewport, not the window: it sits below the
|
|
163
|
+
// header and beside the sidebar, so viewport units size this box to
|
|
164
|
+
// an area it is not in — and the wrapper paints no background of its
|
|
165
|
+
// own, so wherever this box failed to reach showed through white.
|
|
166
|
+
height: "100%", width: "100%", display: "flex", overflow: "hidden", bg: "canvas.default", color: "fg.default", children: [_jsxs(Box, { flex: 1, display: "flex", flexDirection: "column", overflow: "hidden", children: [_jsxs(Box, { p: 3, borderBottom: "1px solid", borderColor: "border.default", bg: "canvas.default", children: [_jsxs(Box, { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 3, flexWrap: "wrap", children: [_jsxs(Box, { children: [_jsxs("h1", { style: { margin: 0, fontSize: '1.5rem' }, children: [selectedStrategy.emoji, " Loop Strategy Example"] }), _jsx("p", { style: { margin: '8px 0 0', color: 'var(--fgColor-muted)' }, children: "Define and launch an agent reasoning strategy \u2014 observe, think, act, evaluate \u2014 over a live notebook." })] }), _jsxs(Box, { display: "flex", alignItems: "center", gap: 2, title: isStrategySelectorDisabled
|
|
208
167
|
? 'Strategy selector is temporarily disabled while launching the agent'
|
|
209
|
-
: 'Choose a strategy', children: [_jsx(Box, { as: "label",
|
|
210
|
-
px: 2,
|
|
211
|
-
py: '6px',
|
|
212
|
-
fontSize: 1,
|
|
213
|
-
borderRadius: 2,
|
|
214
|
-
border: '1px solid',
|
|
215
|
-
borderColor: 'border.default',
|
|
216
|
-
bg: 'canvas.default',
|
|
217
|
-
color: 'fg.default',
|
|
218
|
-
}, children: strategies.map(strategy => (_jsxs("option", { value: strategy.id, children: [strategy.emoji, " ", strategy.name] }, strategy.id))) })] })] }), _jsx(StrategySummary, { strategy: selectedStrategy })] }), _jsx(Box, { sx: {
|
|
219
|
-
flex: 1,
|
|
220
|
-
display: 'flex',
|
|
221
|
-
overflow: 'hidden',
|
|
222
|
-
bg: 'canvas.default',
|
|
223
|
-
p: 3,
|
|
224
|
-
}, children: _jsx(Box, { sx: {
|
|
225
|
-
flex: 1,
|
|
226
|
-
border: '1px solid',
|
|
227
|
-
borderColor: 'border.default',
|
|
228
|
-
borderRadius: 2,
|
|
229
|
-
overflow: 'hidden',
|
|
230
|
-
}, children: _jsx(NotebookUI, { serviceManager: serviceManager }) }) })] }), effectiveReady && (_jsx(ChatSidebar, { title: `${selectedStrategy.emoji} ${selectedStrategy.name}`, protocol: protocolConfig, position: "right", width: 400, clickOutsideToClose: false, showNewChatButton: true, showClearButton: true, showSettingsButton: true, defaultOpen: true, panelProps: {
|
|
168
|
+
: 'Choose a strategy', children: [_jsx(Box, { as: "label", fontSize: 1, fontWeight: "bold", children: "Strategy" }), _jsx(Box, { as: "select", value: selectedStrategyId, onChange: (e) => setSelectedStrategyId(e.target.value), disabled: isStrategySelectorDisabled, "aria-label": "Strategy specification", px: 2, py: "6px", fontSize: 1, borderRadius: 2, border: "1px solid", borderColor: "border.default", bg: "canvas.default", color: "fg.default", children: strategies.map(strategy => (_jsxs("option", { value: strategy.id, children: [strategy.emoji, " ", strategy.name] }, strategy.id))) })] })] }), _jsx(StrategySummary, { strategy: selectedStrategy })] }), _jsx(Box, { flex: 1, display: "flex", overflow: "hidden", bg: "canvas.default", p: 3, children: _jsx(Box, { flex: 1, border: "1px solid", borderColor: "border.default", borderRadius: 2, overflow: "hidden", children: _jsx(NotebookUI, { serviceManager: serviceManager }) }) })] }), effectiveReady && (_jsx(ChatSidebar, { title: `${selectedStrategy.emoji} ${selectedStrategy.name}`, protocol: protocolConfig, position: "right", width: 400, clickOutsideToClose: false, showNewChatButton: true, showClearButton: true, showSettingsButton: true, defaultOpen: true, panelProps: {
|
|
231
169
|
protocol: protocolConfig,
|
|
232
170
|
frontendTools: chatFrontendTools,
|
|
233
171
|
useStore: false,
|
|
@@ -235,17 +173,7 @@ export function LoopStrategyExampleInner({ serviceManager, }) {
|
|
|
235
173
|
showToolsMenu: true,
|
|
236
174
|
showSkillsMenu: true,
|
|
237
175
|
suggestions,
|
|
238
|
-
} })), chatError && (_jsxs(Box, {
|
|
239
|
-
position: 'fixed',
|
|
240
|
-
bottom: 20,
|
|
241
|
-
right: 20,
|
|
242
|
-
padding: 3,
|
|
243
|
-
backgroundColor: 'danger.subtle',
|
|
244
|
-
color: 'danger.fg',
|
|
245
|
-
borderRadius: 2,
|
|
246
|
-
maxWidth: 320,
|
|
247
|
-
zIndex: 999,
|
|
248
|
-
}, children: [_jsx("strong", { children: "Error:" }), " ", chatError] }))] }) }));
|
|
176
|
+
} })), chatError && (_jsxs(Box, { position: "fixed", bottom: 20, right: 20, padding: 3, backgroundColor: "danger.subtle", color: "danger.fg", borderRadius: 2, maxWidth: 320, zIndex: 999, children: [_jsx("strong", { children: "Error:" }), " ", chatError] }))] }) }));
|
|
249
177
|
}
|
|
250
178
|
/**
|
|
251
179
|
* Main example component with Jupyter provider wrapper.
|
|
@@ -23,27 +23,11 @@ export function preloadLoopWorkspace() {
|
|
|
23
23
|
}
|
|
24
24
|
/** Rendered while the editor and its runtime are arriving. */
|
|
25
25
|
function WorkspaceLoading() {
|
|
26
|
-
return (_jsxs(Box, { sx: {
|
|
27
|
-
height: '100%',
|
|
28
|
-
display: 'flex',
|
|
29
|
-
flexDirection: 'column',
|
|
30
|
-
alignItems: 'center',
|
|
31
|
-
justifyContent: 'center',
|
|
32
|
-
gap: 3,
|
|
33
|
-
}, children: [_jsx(Spinner, {}), _jsx(Text, { sx: { color: 'fg.muted', fontSize: 1 }, children: "Starting the workspace\u2026" })] }));
|
|
26
|
+
return (_jsxs(Box, { height: "100%", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", gap: 3, children: [_jsx(Spinner, {}), _jsx(Text, { sx: { color: 'fg.muted', fontSize: 1 }, children: "Starting the workspace\u2026" })] }));
|
|
34
27
|
}
|
|
35
28
|
/** Said when the workspace will not start, and the host offered nothing better. */
|
|
36
29
|
function WorkspaceUnavailable() {
|
|
37
|
-
return (_jsxs(Box, { sx: {
|
|
38
|
-
height: '100%',
|
|
39
|
-
display: 'flex',
|
|
40
|
-
flexDirection: 'column',
|
|
41
|
-
alignItems: 'center',
|
|
42
|
-
justifyContent: 'center',
|
|
43
|
-
gap: 2,
|
|
44
|
-
px: 4,
|
|
45
|
-
textAlign: 'center',
|
|
46
|
-
}, children: [_jsx(Text, { sx: { fontSize: 2, fontWeight: 'semibold' }, children: "The live workspace could not start in this browser." }), _jsx(Text, { sx: { color: 'fg.muted', fontSize: 1, maxWidth: 420 }, children: "It needs a modern browser that can run Python in a worker." })] }));
|
|
30
|
+
return (_jsxs(Box, { height: "100%", display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", gap: 2, px: 4, textAlign: "center", children: [_jsx(Text, { sx: { fontSize: 2, fontWeight: 'semibold' }, children: "The live workspace could not start in this browser." }), _jsx(Text, { sx: { color: 'fg.muted', fontSize: 1, maxWidth: 420 }, children: "It needs a modern browser that can run Python in a worker." })] }));
|
|
47
31
|
}
|
|
48
32
|
/** Keeps a failing workspace from taking its host's page with it. */
|
|
49
33
|
class WorkspaceBoundary extends Component {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useMemo } from 'react';
|
|
3
|
-
import { Box } from '@primer
|
|
3
|
+
import { Box } from '@datalayer/primer-addons';
|
|
4
4
|
import { QueryClientProvider } from '@tanstack/react-query';
|
|
5
5
|
import { useReactor, useSignalValue } from '@datalayer/reactor/react';
|
|
6
6
|
import { buildLoopReactor, LoopWorkspace } from '../loop/shell';
|
|
@@ -125,7 +125,7 @@ serverUrl = resolveExampleAgentRuntimesUrl('local'), agentId = 'loop-workspace',
|
|
|
125
125
|
* The room around it is what makes the frame read as a window sitting
|
|
126
126
|
* on a page rather than as a border drawn at the edges of the screen.
|
|
127
127
|
*/
|
|
128
|
-
_jsx(Box, {
|
|
128
|
+
_jsx(Box, { height: "100%", minHeight: 0, p: 3, boxSizing: "border-box", children: _jsx(WindowFrame, { title: _jsx(Box, { as: "span", fontSize: 1, fontWeight: "semibold", children: "Loop" }), children: shell }) })) : (_jsx(Box, { height: "100%", minHeight: 0, children: shell })) }));
|
|
129
129
|
// A host that owns the theme gets the workspace and nothing else.
|
|
130
130
|
if (inheritTheme) {
|
|
131
131
|
return workspace;
|
|
@@ -16,24 +16,7 @@ const NOTEBOOK_ID = 'agui-notebook-example';
|
|
|
16
16
|
const NOTEBOOK_CONTENT = MatplotlibNotebook;
|
|
17
17
|
const AGENT_ID = 'notebook-agent-runtime-example';
|
|
18
18
|
const NotebookUI = React.memo(function NotebookUI({ serviceManager, onSessionConnection, }) {
|
|
19
|
-
return (_jsxs(Box, {
|
|
20
|
-
flex: 1,
|
|
21
|
-
display: 'flex',
|
|
22
|
-
flexDirection: 'column',
|
|
23
|
-
overflow: 'auto',
|
|
24
|
-
padding: 3,
|
|
25
|
-
}, children: [_jsxs(Box, { sx: {
|
|
26
|
-
marginBottom: 3,
|
|
27
|
-
paddingBottom: 3,
|
|
28
|
-
borderBottom: '1px solid',
|
|
29
|
-
borderColor: 'border.default',
|
|
30
|
-
}, children: [_jsx(Box, { as: "h1", sx: { margin: 0 }, children: "Notebook Agent Example" }), _jsx("p", { children: "Platform-agnostic usage with agent-runtimes integration. Use the AI Agent to manipulate the Notebook." })] }), _jsx(Box, { sx: {
|
|
31
|
-
border: '1px solid',
|
|
32
|
-
borderColor: 'border.default',
|
|
33
|
-
borderRadius: 2,
|
|
34
|
-
padding: 3,
|
|
35
|
-
backgroundColor: 'canvas.default',
|
|
36
|
-
}, children: serviceManager ? (_jsx(ThemedJupyterProvider, { children: _jsx(Notebook, { nbformat: NOTEBOOK_CONTENT, id: NOTEBOOK_ID, Toolbar: ExampleNotebookToolbar, serviceManager: serviceManager, onSessionConnection: onSessionConnection, height: "calc(100vh - 300px)", cellSidebarMargin: 120, startDefaultKernel: true }) })) : (_jsx(Box, { sx: { padding: 3 }, children: _jsx("p", { children: "Loading service manager..." }) })) })] }));
|
|
19
|
+
return (_jsxs(Box, { flex: 1, display: "flex", flexDirection: "column", overflow: "auto", padding: 3, children: [_jsxs(Box, { marginBottom: 3, paddingBottom: 3, borderBottom: "1px solid", borderColor: "border.default", children: [_jsx(Box, { as: "h1", margin: 0, children: "Notebook Agent Example" }), _jsx("p", { children: "Platform-agnostic usage with agent-runtimes integration. Use the AI Agent to manipulate the Notebook." })] }), _jsx(Box, { border: "1px solid", borderColor: "border.default", borderRadius: 2, padding: 3, backgroundColor: "canvas.default", children: serviceManager ? (_jsx(ThemedJupyterProvider, { children: _jsx(Notebook, { nbformat: NOTEBOOK_CONTENT, id: NOTEBOOK_ID, Toolbar: ExampleNotebookToolbar, serviceManager: serviceManager, onSessionConnection: onSessionConnection, height: "calc(100vh - 300px)", cellSidebarMargin: 120, startDefaultKernel: true }) })) : (_jsx(Box, { padding: 3, children: _jsx("p", { children: "Loading service manager..." }) })) })] }));
|
|
37
20
|
});
|
|
38
21
|
function NotebookWithChat({ serviceManager, }) {
|
|
39
22
|
const [notebookKernel, setNotebookKernel] = useState(null);
|
|
@@ -56,21 +39,7 @@ function NotebookWithChat({ serviceManager, }) {
|
|
|
56
39
|
const handleSessionConnection = useCallback((session) => {
|
|
57
40
|
setNotebookKernel(session?.kernel ?? null);
|
|
58
41
|
}, []);
|
|
59
|
-
return (_jsxs(Box, {
|
|
60
|
-
height: '100%',
|
|
61
|
-
width: '100%',
|
|
62
|
-
display: 'flex',
|
|
63
|
-
overflow: 'hidden',
|
|
64
|
-
}, children: [_jsx(NotebookUI, { serviceManager: serviceManager, onSessionConnection: handleSessionConnection }), chatError && (_jsxs(Box, { sx: {
|
|
65
|
-
position: 'fixed',
|
|
66
|
-
bottom: 20,
|
|
67
|
-
right: 20,
|
|
68
|
-
padding: 3,
|
|
69
|
-
backgroundColor: 'danger.subtle',
|
|
70
|
-
color: 'danger.fg',
|
|
71
|
-
borderRadius: 2,
|
|
72
|
-
maxWidth: 300,
|
|
73
|
-
}, children: [_jsx("strong", { children: "Error:" }), " ", chatError] })), effectiveReady && (_jsx(ChatFloating, { protocol: protocolConfig, title: "Notebook AI Agent Runtime", description: "Hi! I can help you edit notebook cells. Try: 'Add a new code cell', 'Run cell 1', or 'Delete the last cell'", defaultOpen: true, defaultViewMode: "panel", position: "bottom-right", frontendTools: chatFrontendTools, useStore: false,
|
|
42
|
+
return (_jsxs(Box, { height: "100%", width: "100%", display: "flex", overflow: "hidden", children: [_jsx(NotebookUI, { serviceManager: serviceManager, onSessionConnection: handleSessionConnection }), chatError && (_jsxs(Box, { position: "fixed", bottom: 20, right: 20, padding: 3, backgroundColor: "danger.subtle", color: "danger.fg", borderRadius: 2, maxWidth: 300, children: [_jsx("strong", { children: "Error:" }), " ", chatError] })), effectiveReady && (_jsx(ChatFloating, { protocol: protocolConfig, title: "Notebook AI Agent Runtime", description: "Hi! I can help you edit notebook cells. Try: 'Add a new code cell', 'Run cell 1', or 'Delete the last cell'", defaultOpen: true, defaultViewMode: "panel", position: "bottom-right", frontendTools: chatFrontendTools, useStore: false,
|
|
74
43
|
/*
|
|
75
44
|
Every control this chat has, which is what an example is for.
|
|
76
45
|
|
|
@@ -35,13 +35,7 @@ const NOTEBOOK_CONTENT = MatplotlibNotebook;
|
|
|
35
35
|
const DEFAULT_AGENT_ID = import.meta.env.VITE_AGENT_ID || 'notebook-sidebar-agent-runtime-example';
|
|
36
36
|
function NotebookUI({ serviceManager }) {
|
|
37
37
|
if (!serviceManager) {
|
|
38
|
-
return (_jsx(Box, {
|
|
39
|
-
display: 'flex',
|
|
40
|
-
alignItems: 'center',
|
|
41
|
-
justifyContent: 'center',
|
|
42
|
-
height: '100%',
|
|
43
|
-
color: 'fg.muted',
|
|
44
|
-
}, children: "Loading Simple services..." }));
|
|
38
|
+
return (_jsx(Box, { display: "flex", alignItems: "center", justifyContent: "center", height: "100%", color: "fg.muted", children: "Loading Simple services..." }));
|
|
45
39
|
}
|
|
46
40
|
return (
|
|
47
41
|
// Only the notebook is wrapped. `JupyterReactTheme` nests a Primer theme
|
|
@@ -71,34 +65,7 @@ export function AgentRuntimeNotebookExampleInner({ serviceManager, }) {
|
|
|
71
65
|
const effectiveReady = agentReady;
|
|
72
66
|
// Get notebook tools for ChatSidebar
|
|
73
67
|
// Build Vercel AI protocol config
|
|
74
|
-
return (_jsx(_Fragment, { children: _jsxs(Box, {
|
|
75
|
-
height: 'calc(100vh - 70px)',
|
|
76
|
-
width: '100vw',
|
|
77
|
-
display: 'flex',
|
|
78
|
-
overflow: 'hidden',
|
|
79
|
-
}, children: [_jsxs(Box, { sx: {
|
|
80
|
-
flex: 1,
|
|
81
|
-
display: 'flex',
|
|
82
|
-
flexDirection: 'column',
|
|
83
|
-
overflow: 'hidden',
|
|
84
|
-
}, children: [_jsxs(Box, { sx: {
|
|
85
|
-
p: 3,
|
|
86
|
-
borderBottom: '1px solid',
|
|
87
|
-
borderColor: 'border.default',
|
|
88
|
-
bg: 'canvas.default',
|
|
89
|
-
}, children: [_jsx("h1", { style: { margin: 0, fontSize: '1.5rem' }, children: "Notebook Chat Sidebar Example" }), _jsx("p", { style: { margin: '8px 0 0', color: 'var(--fgColor-muted)' }, children: "Chat with Jupyter Notebook integration" })] }), _jsx(Box, { sx: {
|
|
90
|
-
flex: 1,
|
|
91
|
-
display: 'flex',
|
|
92
|
-
overflow: 'hidden',
|
|
93
|
-
bg: 'canvas.default',
|
|
94
|
-
p: 3,
|
|
95
|
-
}, children: _jsx(Box, { sx: {
|
|
96
|
-
flex: 1,
|
|
97
|
-
border: '1px solid',
|
|
98
|
-
borderColor: 'border.default',
|
|
99
|
-
borderRadius: 2,
|
|
100
|
-
overflow: 'hidden',
|
|
101
|
-
}, children: _jsx(NotebookUI, { serviceManager: serviceManager }) }) })] }), effectiveReady && (_jsx(ChatSidebar, { title: "AI Assistant", protocol: protocolConfig, position: "right", width: 400, showNewChatButton: true, showClearButton: true, showSettingsButton: true, defaultOpen: true, panelProps: {
|
|
68
|
+
return (_jsx(_Fragment, { children: _jsxs(Box, { height: "calc(100vh - 70px)", width: "100vw", display: "flex", overflow: "hidden", children: [_jsxs(Box, { flex: 1, display: "flex", flexDirection: "column", overflow: "hidden", children: [_jsxs(Box, { p: 3, borderBottom: "1px solid", borderColor: "border.default", bg: "canvas.default", children: [_jsx("h1", { style: { margin: 0, fontSize: '1.5rem' }, children: "Notebook Chat Sidebar Example" }), _jsx("p", { style: { margin: '8px 0 0', color: 'var(--fgColor-muted)' }, children: "Chat with Jupyter Notebook integration" })] }), _jsx(Box, { flex: 1, display: "flex", overflow: "hidden", bg: "canvas.default", p: 3, children: _jsx(Box, { flex: 1, border: "1px solid", borderColor: "border.default", borderRadius: 2, overflow: "hidden", children: _jsx(NotebookUI, { serviceManager: serviceManager }) }) })] }), effectiveReady && (_jsx(ChatSidebar, { title: "AI Assistant", protocol: protocolConfig, position: "right", width: 400, showNewChatButton: true, showClearButton: true, showSettingsButton: true, defaultOpen: true, panelProps: {
|
|
102
69
|
protocol: protocolConfig,
|
|
103
70
|
frontendTools: chatFrontendTools,
|
|
104
71
|
useStore: false,
|
|
@@ -123,17 +90,7 @@ export function AgentRuntimeNotebookExampleInner({ serviceManager, }) {
|
|
|
123
90
|
message: 'Can you suggest improvements for the code?',
|
|
124
91
|
},
|
|
125
92
|
],
|
|
126
|
-
} })), chatError && (_jsxs(Box, {
|
|
127
|
-
position: 'fixed',
|
|
128
|
-
bottom: 20,
|
|
129
|
-
right: 20,
|
|
130
|
-
padding: 3,
|
|
131
|
-
backgroundColor: 'danger.subtle',
|
|
132
|
-
color: 'danger.fg',
|
|
133
|
-
borderRadius: 2,
|
|
134
|
-
maxWidth: 320,
|
|
135
|
-
zIndex: 999,
|
|
136
|
-
}, children: [_jsx("strong", { children: "Error:" }), " ", chatError] }))] }) }));
|
|
93
|
+
} })), chatError && (_jsxs(Box, { position: "fixed", bottom: 20, right: 20, padding: 3, backgroundColor: "danger.subtle", color: "danger.fg", borderRadius: 2, maxWidth: 320, zIndex: 999, children: [_jsx("strong", { children: "Error:" }), " ", chatError] }))] }) }));
|
|
137
94
|
}
|
|
138
95
|
/**
|
|
139
96
|
* The example, in the app's theme.
|
|
@@ -155,36 +155,6 @@ const NotebookCollaborationExample = (props) => {
|
|
|
155
155
|
collaborationProviders.forEach(provider => provider?.dispose());
|
|
156
156
|
};
|
|
157
157
|
}, [collaborationProviders]);
|
|
158
|
-
return (_jsx(ThemedJupyterProvider, { children: _jsxs(Box, { p: 3, children: [_jsx(Heading, { as: "h2", sx: { mb: 3 }, children: "Notebook Collaboration Example" }), _jsxs(Box, {
|
|
159
|
-
display: 'flex',
|
|
160
|
-
gap: 2,
|
|
161
|
-
flexDirection: 'row',
|
|
162
|
-
}, children: [_jsxs(Box, { sx: {
|
|
163
|
-
flex: 1,
|
|
164
|
-
border: '1px solid',
|
|
165
|
-
borderColor: 'border.default',
|
|
166
|
-
borderRadius: 2,
|
|
167
|
-
}, children: [_jsx(Box, { sx: {
|
|
168
|
-
p: 2,
|
|
169
|
-
bg: 'canvas.default',
|
|
170
|
-
borderBottom: '1px solid',
|
|
171
|
-
borderColor: 'border.default',
|
|
172
|
-
fontWeight: 'bold',
|
|
173
|
-
}, children: "Collaborator 1" }), serviceManager ? (_jsx(Notebook, { id: NOTEBOOK_ID, Toolbar: ExampleNotebookToolbar, path: ROOM_PATH, height: "calc(100vh - 280px)", nbformat: nbformat, readonly: readonly, serviceManager: serviceManager, startDefaultKernel: true, collaborationProvider: collaborationProvider1 })) : (_jsx(Box, { sx: { p: 4, textAlign: 'center' }, children: "Loading ServiceManager..." }))] }), _jsxs(Box, { sx: {
|
|
174
|
-
flex: 1,
|
|
175
|
-
border: '1px solid',
|
|
176
|
-
borderColor: 'border.default',
|
|
177
|
-
borderRadius: 2,
|
|
178
|
-
}, children: [_jsx(Box, { sx: {
|
|
179
|
-
p: 2,
|
|
180
|
-
bg: 'canvas.default',
|
|
181
|
-
borderBottom: '1px solid',
|
|
182
|
-
borderColor: 'border.default',
|
|
183
|
-
fontWeight: 'bold',
|
|
184
|
-
}, children: "Collaborator 2" }), serviceManager ? (_jsx(Notebook, { id: NOTEBOOK_ID, Toolbar: ExampleNotebookToolbar, path: ROOM_PATH, height: "calc(100vh - 280px)", nbformat: nbformat, readonly: readonly, serviceManager: serviceManager, startDefaultKernel: false, collaborationProvider: collaborationProvider2 })) : (_jsx(Box, { sx: { p: 4, textAlign: 'center' }, children: "Loading ServiceManager..." }))] })] })) : (_jsx(Box, { sx: {
|
|
185
|
-
border: '1px solid',
|
|
186
|
-
borderColor: 'border.default',
|
|
187
|
-
borderRadius: 2,
|
|
188
|
-
}, children: serviceManager ? (_jsx(Notebook, { id: NOTEBOOK_ID, Toolbar: ExampleNotebookToolbar, height: "calc(100vh - 200px)", nbformat: nbformat, readonly: readonly, serviceManager: serviceManager, startDefaultKernel: true, collaborationProvider: collaborationProvider1 })) : (_jsx(Box, { sx: { p: 4, textAlign: 'center' }, children: "Loading ServiceManager..." })) })), _jsxs(Box, { sx: { mt: 2, fontSize: 1, color: 'fg.subtle' }, children: [_jsx(Box, { as: "p", sx: { m: 0, mb: 2 }, children: "This example demonstrates how to use Datalayer services with Notebook:" }), _jsxs(Box, { as: "ul", sx: { m: 0, pl: 3, '& li': { mb: 1 } }, children: [_jsxs("li", { children: [_jsx("strong", { children: "DatalayerServiceManager:" }), " Connects to Datalayer infrastructure for kernel management"] }), _jsxs("li", { children: [_jsx("strong", { children: "DatalayerCollaborationProvider:" }), " Enables real-time collaboration"] }), _jsx("li", { children: "Both require Datalayer credentials (spacerUrl and token)" }), _jsx("li", { children: "Pass them directly to the base Notebook component" }), _jsx("li", { children: "No wrapper components needed - just create the services and pass them as props" }), _jsx("li", { children: "This shows the explicit, composable pattern for Datalayer integration" })] })] })] }) }));
|
|
158
|
+
return (_jsx(ThemedJupyterProvider, { children: _jsxs(Box, { p: 3, children: [_jsx(Heading, { as: "h2", sx: { mb: 3 }, children: "Notebook Collaboration Example" }), _jsxs(Box, { mb: 3, children: [_jsxs(FormControl, { children: [_jsx(Checkbox, { checked: enableCollaboration, onChange: e => setEnableCollaboration(e.target.checked) }), _jsx(FormControl.Label, { children: "Enable Datalayer Collaboration" })] }), enableCollaboration && runtimeTarget !== 'datalayer' && (_jsx(Box, { mt: 1, color: "fg.muted", fontSize: 0, children: "Real-time Datalayer collaboration requires the cloud runtime target. Local mode does not expose a collaboration room." }))] }), (!configuration?.spacerUrl || !configuration?.token) && (_jsx(Box, { mb: 2, p: 2, bg: "danger.subtle", children: "Warning: Datalayer configuration is missing. Please configure spacerUrl and token to use DatalayerServiceManager and collaboration features." })), !serviceManager && (_jsx(Box, { mb: 2, p: 2, bg: "attention.subtle", children: "Note: DatalayerServiceManager is not available. Notebook functionality will be limited." })), collaborationError && (_jsxs(Box, { mb: 2, p: 2, bg: "danger.subtle", children: ["Collaboration could not start: ", collaborationError] })), enableCollaboration && collaborationReady ? (_jsxs(Box, { display: "flex", gap: 2, flexDirection: "row", children: [_jsxs(Box, { flex: 1, border: "1px solid", borderColor: "border.default", borderRadius: 2, children: [_jsx(Box, { p: 2, bg: "canvas.default", borderBottom: "1px solid", borderColor: "border.default", fontWeight: "bold", children: "Collaborator 1" }), serviceManager ? (_jsx(Notebook, { id: NOTEBOOK_ID, Toolbar: ExampleNotebookToolbar, path: ROOM_PATH, height: "calc(100vh - 280px)", nbformat: nbformat, readonly: readonly, serviceManager: serviceManager, startDefaultKernel: true, collaborationProvider: collaborationProvider1 })) : (_jsx(Box, { p: 4, textAlign: "center", children: "Loading ServiceManager..." }))] }), _jsxs(Box, { flex: 1, border: "1px solid", borderColor: "border.default", borderRadius: 2, children: [_jsx(Box, { p: 2, bg: "canvas.default", borderBottom: "1px solid", borderColor: "border.default", fontWeight: "bold", children: "Collaborator 2" }), serviceManager ? (_jsx(Notebook, { id: NOTEBOOK_ID, Toolbar: ExampleNotebookToolbar, path: ROOM_PATH, height: "calc(100vh - 280px)", nbformat: nbformat, readonly: readonly, serviceManager: serviceManager, startDefaultKernel: false, collaborationProvider: collaborationProvider2 })) : (_jsx(Box, { p: 4, textAlign: "center", children: "Loading ServiceManager..." }))] })] })) : (_jsx(Box, { border: "1px solid", borderColor: "border.default", borderRadius: 2, children: serviceManager ? (_jsx(Notebook, { id: NOTEBOOK_ID, Toolbar: ExampleNotebookToolbar, height: "calc(100vh - 200px)", nbformat: nbformat, readonly: readonly, serviceManager: serviceManager, startDefaultKernel: true, collaborationProvider: collaborationProvider1 })) : (_jsx(Box, { p: 4, textAlign: "center", children: "Loading ServiceManager..." })) })), _jsxs(Box, { mt: 2, fontSize: 1, color: "fg.subtle", children: [_jsx(Box, { as: "p", m: 0, mb: 2, children: "This example demonstrates how to use Datalayer services with Notebook:" }), _jsxs(Box, { as: "ul", m: 0, pl: 3, sx: { '& li': { mb: 1 } }, children: [_jsxs("li", { children: [_jsx("strong", { children: "DatalayerServiceManager:" }), " Connects to Datalayer infrastructure for kernel management"] }), _jsxs("li", { children: [_jsx("strong", { children: "DatalayerCollaborationProvider:" }), " Enables real-time collaboration"] }), _jsx("li", { children: "Both require Datalayer credentials (spacerUrl and token)" }), _jsx("li", { children: "Pass them directly to the base Notebook component" }), _jsx("li", { children: "No wrapper components needed - just create the services and pass them as props" }), _jsx("li", { children: "This shows the explicit, composable pattern for Datalayer integration" })] })] })] }) }));
|
|
189
159
|
};
|
|
190
160
|
export default NotebookCollaborationExample;
|
|
@@ -13,23 +13,6 @@ const NOTEBOOK_ID = 'notebook-example-1';
|
|
|
13
13
|
export const JupyterNotebookExample = (props) => {
|
|
14
14
|
const { serviceManager } = props;
|
|
15
15
|
const extensions = useMemo(() => [new CellSidebarExtension({ factory: CellSidebarButton })], []);
|
|
16
|
-
return (_jsxs(Box, {
|
|
17
|
-
flex: 1,
|
|
18
|
-
display: 'flex',
|
|
19
|
-
flexDirection: 'column',
|
|
20
|
-
overflow: 'auto',
|
|
21
|
-
padding: 3,
|
|
22
|
-
}, children: [_jsxs(Box, { sx: {
|
|
23
|
-
marginBottom: 3,
|
|
24
|
-
paddingBottom: 3,
|
|
25
|
-
borderBottom: '1px solid',
|
|
26
|
-
borderColor: 'border.default',
|
|
27
|
-
}, children: [_jsx(Box, { as: "h1", sx: { margin: 0 }, children: "Notebook Example" }), _jsx("p", { children: "A notebook on the selected sandbox, with the kernel indicator in its toolbar." })] }), _jsx(Box, { sx: {
|
|
28
|
-
border: '1px solid',
|
|
29
|
-
borderColor: 'border.default',
|
|
30
|
-
borderRadius: 2,
|
|
31
|
-
padding: 3,
|
|
32
|
-
backgroundColor: 'canvas.default',
|
|
33
|
-
}, children: serviceManager ? (_jsx(ThemedJupyterProvider, { children: _jsx(Notebook, { id: NOTEBOOK_ID, nbformat: nbformatExample, serviceManager: serviceManager, startDefaultKernel: true, extensions: extensions, Toolbar: ExampleNotebookToolbar, height: "calc(100vh - 300px)", cellSidebarMargin: 120 }) })) : (_jsx(Box, { sx: { padding: 3 }, children: _jsx("p", { children: "Loading service manager..." }) })) })] }));
|
|
16
|
+
return (_jsxs(Box, { flex: 1, display: "flex", flexDirection: "column", overflow: "auto", padding: 3, children: [_jsxs(Box, { marginBottom: 3, paddingBottom: 3, borderBottom: "1px solid", borderColor: "border.default", children: [_jsx(Box, { as: "h1", margin: 0, children: "Notebook Example" }), _jsx("p", { children: "A notebook on the selected sandbox, with the kernel indicator in its toolbar." })] }), _jsx(Box, { border: "1px solid", borderColor: "border.default", borderRadius: 2, padding: 3, backgroundColor: "canvas.default", children: serviceManager ? (_jsx(ThemedJupyterProvider, { children: _jsx(Notebook, { id: NOTEBOOK_ID, nbformat: nbformatExample, serviceManager: serviceManager, startDefaultKernel: true, extensions: extensions, Toolbar: ExampleNotebookToolbar, height: "calc(100vh - 300px)", cellSidebarMargin: 120 }) })) : (_jsx(Box, { padding: 3, children: _jsx("p", { children: "Loading service manager..." }) })) })] }));
|
|
34
17
|
};
|
|
35
18
|
export default JupyterNotebookExample;
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { Box } from '@datalayer/primer-addons';
|
|
3
3
|
import { ThemedProvider } from './utils/themedProvider';
|
|
4
4
|
import { LoopEmbed } from '../loop';
|
|
5
|
-
const NotebookPageAgent = () => (_jsx(ThemedProvider, { children: _jsx(Box, {
|
|
5
|
+
const NotebookPageAgent = () => (_jsx(ThemedProvider, { children: _jsx(Box, { height: "100vh", minHeight: 0, children: _jsx(LoopEmbed, { target: "browser",
|
|
6
6
|
/* The Analyst is the team's front door; the team puts the other
|
|
7
7
|
members one click away in the composer's agents menu. */
|
|
8
8
|
agentId: "jupyter-data-analyst", teamId: "jupyter",
|