@flowdrop/flowdrop 2.11.0 → 2.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +223 -0
- package/dist/adapters/agentspec/autoLayout.d.ts +18 -36
- package/dist/adapters/agentspec/autoLayout.js +75 -93
- package/dist/chat/activity.d.ts +49 -0
- package/dist/chat/activity.js +65 -0
- package/dist/chat/commandClassifier.js +2 -1
- package/dist/commands/executor.js +186 -27
- package/dist/commands/index.d.ts +2 -1
- package/dist/commands/index.js +2 -0
- package/dist/commands/parser.js +43 -3
- package/dist/commands/session.d.ts +60 -0
- package/dist/commands/session.js +332 -0
- package/dist/commands/storeIntegration.svelte.js +18 -1
- package/dist/commands/types.d.ts +77 -4
- package/dist/components/App.svelte +966 -226
- package/dist/components/App.svelte.d.ts +26 -2
- package/dist/components/BindablePortListbox.svelte +68 -369
- package/dist/components/Button.svelte +17 -14
- package/dist/components/Button.svelte.d.ts +2 -2
- package/dist/components/CanvasContextMenu.svelte +31 -10
- package/dist/components/CanvasController.svelte +146 -3
- package/dist/components/CanvasController.svelte.d.ts +25 -33
- package/dist/components/CanvasIconButton.svelte +6 -6
- package/dist/components/CanvasToolbar.svelte +103 -0
- package/dist/components/CanvasToolbar.svelte.d.ts +23 -0
- package/dist/components/CanvasZoomControls.svelte +122 -0
- package/dist/components/CanvasZoomControls.svelte.d.ts +15 -0
- package/dist/components/ConfigForm.svelte +159 -121
- package/dist/components/ConfigModal.svelte +11 -54
- package/dist/components/ConfigPanel.svelte +98 -228
- package/dist/components/ConfigPanel.svelte.d.ts +2 -2
- package/dist/components/ConnectPortPicker.svelte +153 -0
- package/dist/components/ConnectPortPicker.svelte.d.ts +22 -0
- package/dist/components/DoctorMenu.svelte +422 -0
- package/dist/components/DoctorMenu.svelte.d.ts +7 -0
- package/dist/components/ExternalLinkRow.svelte +82 -0
- package/dist/components/ExternalLinkRow.svelte.d.ts +14 -0
- package/dist/components/FlowDropEdge.svelte +52 -2
- package/dist/components/FlowDropEdge.svelte.d.ts +5 -1
- package/dist/components/InterfaceNameInput.svelte +103 -0
- package/dist/components/InterfaceNameInput.svelte.d.ts +13 -0
- package/dist/components/InterfaceTag.svelte +215 -0
- package/dist/components/InterfaceTag.svelte.d.ts +20 -0
- package/dist/components/InterfaceTagAnchor.svelte +103 -0
- package/dist/components/InterfaceTagAnchor.svelte.d.ts +12 -0
- package/dist/components/InterfaceTagLayer.svelte +314 -0
- package/dist/components/InterfaceTagLayer.svelte.d.ts +28 -0
- package/dist/components/LogsSidebar.svelte +43 -43
- package/dist/components/LoopbackLanes.svelte +54 -0
- package/dist/components/LoopbackLanes.svelte.d.ts +8 -0
- package/dist/components/Navbar.svelte +539 -169
- package/dist/components/Navbar.svelte.d.ts +20 -1
- package/dist/components/NodeInspector.svelte +153 -0
- package/dist/components/NodeInspector.svelte.d.ts +19 -0
- package/dist/components/NodeLastRun.svelte +212 -0
- package/dist/components/NodeLastRun.svelte.d.ts +13 -0
- package/dist/components/NodeSidebar.svelte +279 -23
- package/dist/components/NodeSidebar.svelte.d.ts +11 -0
- package/dist/components/NodeStatusOverlay.svelte +144 -353
- package/dist/components/NodeStatusOverlay.svelte.d.ts +4 -1
- package/dist/components/PortMappingRow.svelte +28 -44
- package/dist/components/PortPickerListbox.svelte +475 -0
- package/dist/components/PortPickerListbox.svelte.d.ts +73 -0
- package/dist/components/ReadOnlyDetails.svelte +52 -89
- package/dist/components/RunBar.svelte +222 -0
- package/dist/components/RunBar.svelte.d.ts +20 -0
- package/dist/components/RunsMenu.svelte +649 -0
- package/dist/components/RunsMenu.svelte.d.ts +14 -0
- package/dist/components/SettingsModal.svelte +27 -59
- package/dist/components/SettingsPanel.svelte +515 -241
- package/dist/components/StraightGuides.svelte +46 -0
- package/dist/components/StraightGuides.svelte.d.ts +7 -0
- package/dist/components/ThemeToggle.svelte +14 -4
- package/dist/components/UniversalNode.svelte +152 -51
- package/dist/components/WebMCPBridgeMenu.svelte +336 -0
- package/dist/components/WebMCPBridgeMenu.svelte.d.ts +3 -0
- package/dist/components/WorkflowEditor.svelte +789 -136
- package/dist/components/WorkflowEditor.svelte.d.ts +43 -1
- package/dist/components/WorkflowInterfaceEditor.svelte +63 -92
- package/dist/components/WorkflowInterfaceEntryCard.svelte +478 -549
- package/dist/components/WorkflowInterfaceEntryComposer.svelte +23 -67
- package/dist/components/WorkflowPlaygroundSettings.svelte +48 -85
- package/dist/components/WorkflowSettingsPanel.svelte +311 -0
- package/dist/components/WorkflowSettingsPanel.svelte.d.ts +20 -0
- package/dist/components/ZoomTier.svelte +56 -0
- package/dist/components/ZoomTier.svelte.d.ts +4 -0
- package/dist/components/chat/AIChatPanel.svelte +463 -312
- package/dist/components/chat/ActivityList.svelte +130 -0
- package/dist/components/chat/ActivityList.svelte.d.ts +11 -0
- package/dist/components/chat/ActivityRow.svelte +179 -0
- package/dist/components/chat/ActivityRow.svelte.d.ts +16 -0
- package/dist/components/chat/CommandPreview.svelte +42 -64
- package/dist/components/console/CommandConsole.svelte +106 -41
- package/dist/components/console/CommandConsole.svelte.d.ts +2 -0
- package/dist/components/console/ConsoleAutocomplete.svelte +14 -13
- package/dist/components/console/ConsoleInput.svelte +60 -27
- package/dist/components/console/ConsoleOutput.svelte +86 -24
- package/dist/components/console/ConsoleStrip.svelte +80 -0
- package/dist/components/console/ConsoleStrip.svelte.d.ts +13 -0
- package/dist/components/form/FieldFactory.svelte +30 -4
- package/dist/components/form/FormArray.svelte +306 -339
- package/dist/components/form/FormArray.svelte.d.ts +10 -0
- package/dist/components/form/FormArrayRows.svelte +443 -0
- package/dist/components/form/FormArrayRows.svelte.d.ts +18 -0
- package/dist/components/form/FormAutocomplete.svelte +2 -2
- package/dist/components/form/FormCheckboxGroup.svelte +10 -85
- package/dist/components/form/FormCodeEditor.svelte +3 -3
- package/dist/components/form/FormFieldWrapper.svelte +98 -18
- package/dist/components/form/FormFieldWrapper.svelte.d.ts +10 -0
- package/dist/components/form/FormFieldset.svelte +44 -28
- package/dist/components/form/FormMarkdownEditor.svelte +6 -6
- package/dist/components/form/FormPorts.svelte +437 -141
- package/dist/components/form/FormSelect.svelte +1 -1
- package/dist/components/form/FormTemplateEditor.svelte +22 -26
- package/dist/components/form/FormToggle.svelte +15 -106
- package/dist/components/form/FormToggle.svelte.d.ts +3 -2
- package/dist/components/form/FormUISchemaRenderer.svelte +38 -3
- package/dist/components/form/humanizeKey.d.ts +7 -0
- package/dist/components/form/humanizeKey.js +21 -0
- package/dist/components/form/types.d.ts +6 -0
- package/dist/components/icons/MenuOpenIcon.svelte +8 -1
- package/dist/components/interrupt/ChoicePrompt.svelte +51 -152
- package/dist/components/interrupt/ChoicePrompt.svelte.d.ts +0 -2
- package/dist/components/interrupt/ConfirmationPrompt.svelte +18 -201
- package/dist/components/interrupt/ConfirmationPrompt.svelte.d.ts +0 -4
- package/dist/components/interrupt/FormPrompt.svelte +22 -147
- package/dist/components/interrupt/FormPrompt.svelte.d.ts +0 -4
- package/dist/components/interrupt/InterruptBubble.svelte +198 -355
- package/dist/components/interrupt/InterruptBubble.svelte.d.ts +0 -2
- package/dist/components/interrupt/ReviewPrompt.svelte +0 -10
- package/dist/components/interrupt/TextInputPrompt.svelte +23 -120
- package/dist/components/interrupt/TextInputPrompt.svelte.d.ts +0 -2
- package/dist/components/layouts/MainLayout.svelte +110 -75
- package/dist/components/layouts/MainLayout.svelte.d.ts +17 -0
- package/dist/components/nodes/CaptionNode.svelte +7 -0
- package/dist/components/nodes/GatewayNode.svelte +66 -431
- package/dist/components/nodes/IdeaNode.svelte +6 -5
- package/dist/components/nodes/NodeCard.svelte +1051 -0
- package/dist/components/nodes/NodeCard.svelte.d.ts +30 -0
- package/dist/components/nodes/NodeConfigButton.svelte +28 -9
- package/dist/components/nodes/NodeProblemMark.svelte +113 -0
- package/dist/components/nodes/NodeProblemMark.svelte.d.ts +8 -0
- package/dist/components/nodes/NodeTip.svelte +104 -0
- package/dist/components/nodes/NodeTip.svelte.d.ts +15 -0
- package/dist/components/nodes/NotesNode.svelte +183 -150
- package/dist/components/nodes/SimpleNode.svelte +176 -44
- package/dist/components/nodes/SquareNode.svelte +127 -34
- package/dist/components/nodes/TerminalNode.svelte +232 -88
- package/dist/components/nodes/ToolNode.svelte +49 -381
- package/dist/components/nodes/WorkflowNode.svelte +40 -399
- package/dist/components/playground/ChatBubble.svelte +248 -62
- package/dist/components/playground/ChatInput.svelte +134 -297
- package/dist/components/playground/ChatInput.svelte.d.ts +17 -0
- package/dist/components/playground/ControlPanel.svelte +290 -190
- package/dist/components/playground/ControlPanel.svelte.d.ts +10 -2
- package/dist/components/playground/DockedPlayground.svelte +75 -0
- package/dist/components/playground/DockedPlayground.svelte.d.ts +24 -0
- package/dist/components/playground/ExecutionConsole.svelte +54 -36
- package/dist/components/playground/ExecutionConsole.svelte.d.ts +12 -0
- package/dist/components/playground/ExecutionLogs.svelte +4 -0
- package/dist/components/playground/HeaderMenu.svelte +170 -0
- package/dist/components/playground/HeaderMenu.svelte.d.ts +22 -0
- package/dist/components/playground/InputCollector.svelte +8 -32
- package/dist/components/playground/InputFields.svelte +246 -0
- package/dist/components/playground/InputFields.svelte.d.ts +16 -0
- package/dist/components/playground/InterfaceInputForm.svelte +285 -30
- package/dist/components/playground/InterfaceInputForm.svelte.d.ts +20 -0
- package/dist/components/playground/InterfaceJsonInput.svelte +92 -0
- package/dist/components/playground/InterfaceJsonInput.svelte.d.ts +10 -0
- package/dist/components/playground/LogRow.svelte +12 -12
- package/dist/components/playground/MessageMarkdown.svelte +11 -11
- package/dist/components/playground/MessageStream.svelte +154 -182
- package/dist/components/playground/Playground.svelte +17 -1139
- package/dist/components/playground/PlaygroundApp.svelte +12 -2
- package/dist/components/playground/PlaygroundApp.svelte.d.ts +2 -1
- package/dist/components/playground/PlaygroundHeader.svelte +309 -0
- package/dist/components/playground/PlaygroundHeader.svelte.d.ts +22 -0
- package/dist/components/playground/PlaygroundModal.svelte +6 -0
- package/dist/components/playground/PlaygroundStudio.svelte +30 -32
- package/dist/components/playground/PlaygroundSurface.svelte +648 -0
- package/dist/components/playground/PlaygroundSurface.svelte.d.ts +79 -0
- package/dist/components/playground/StepsSummary.svelte +312 -0
- package/dist/components/playground/StepsSummary.svelte.d.ts +11 -0
- package/dist/components/playground/messageDisplay.d.ts +9 -0
- package/dist/components/playground/messageDisplay.js +24 -2
- package/dist/components/playground/stepSummary.d.ts +71 -0
- package/dist/components/playground/stepSummary.js +152 -0
- package/dist/components/ports/PortTypeBadge.svelte +13 -1
- package/dist/components/primitives/Button.svelte +226 -0
- package/dist/components/primitives/Button.svelte.d.ts +31 -0
- package/dist/components/primitives/Card.svelte +110 -0
- package/dist/components/primitives/Card.svelte.d.ts +20 -0
- package/dist/components/primitives/Checkbox.svelte +126 -0
- package/dist/components/primitives/Checkbox.svelte.d.ts +15 -0
- package/dist/components/primitives/Chip.svelte +143 -0
- package/dist/components/primitives/Chip.svelte.d.ts +22 -0
- package/dist/components/primitives/Combobox.svelte +444 -0
- package/dist/components/primitives/Combobox.svelte.d.ts +22 -0
- package/dist/components/primitives/Composer.svelte +293 -0
- package/dist/components/primitives/Composer.svelte.d.ts +47 -0
- package/dist/components/primitives/EmptyState.svelte +113 -0
- package/dist/components/primitives/EmptyState.svelte.d.ts +18 -0
- package/dist/components/primitives/Field.svelte +178 -0
- package/dist/components/primitives/Field.svelte.d.ts +30 -0
- package/dist/components/primitives/IconButton.svelte +156 -0
- package/dist/components/primitives/IconButton.svelte.d.ts +27 -0
- package/dist/components/primitives/Menu.svelte +435 -0
- package/dist/components/primitives/Menu.svelte.d.ts +61 -0
- package/dist/components/primitives/Notice.svelte +161 -0
- package/dist/components/primitives/Notice.svelte.d.ts +22 -0
- package/dist/components/primitives/PanelHeader.svelte +134 -0
- package/dist/components/primitives/PanelHeader.svelte.d.ts +23 -0
- package/dist/components/primitives/Segmented.svelte +198 -0
- package/dist/components/primitives/Segmented.svelte.d.ts +32 -0
- package/dist/components/primitives/Select.svelte +130 -0
- package/dist/components/primitives/Select.svelte.d.ts +26 -0
- package/dist/components/primitives/StatusPill.svelte +218 -0
- package/dist/components/primitives/StatusPill.svelte.d.ts +24 -0
- package/dist/components/primitives/Switch.svelte +113 -0
- package/dist/components/primitives/Switch.svelte.d.ts +14 -0
- package/dist/components/primitives/Tabs.svelte +209 -0
- package/dist/components/primitives/Tabs.svelte.d.ts +32 -0
- package/dist/components/primitives/Toolbar.svelte +94 -0
- package/dist/components/primitives/Toolbar.svelte.d.ts +14 -0
- package/dist/components/primitives/ToolbarSeparator.svelte +40 -0
- package/dist/components/primitives/ToolbarSeparator.svelte.d.ts +7 -0
- package/dist/components/surfaces/SurfaceOverlay.svelte +10 -40
- package/dist/components/surfaces/TabbedSurface.svelte +49 -39
- package/dist/components/surfaces/TabbedSurface.svelte.d.ts +8 -0
- package/dist/components/toast/DismissibleToast.svelte +94 -32
- package/dist/components/toast/DismissibleToast.svelte.d.ts +17 -7
- package/dist/config/endpoints.d.ts +43 -1
- package/dist/config/endpoints.js +21 -3
- package/dist/core/index.d.ts +8 -5
- package/dist/core/index.js +1 -1
- package/dist/editor/connectCandidates.d.ts +56 -0
- package/dist/editor/connectCandidates.js +131 -0
- package/dist/editor/contextMenu.d.ts +31 -2
- package/dist/editor/contextMenu.js +96 -9
- package/dist/editor/index.d.ts +3 -1
- package/dist/editor/index.js +1 -0
- package/dist/editor/interfaceMenu.d.ts +35 -0
- package/dist/editor/interfaceMenu.js +47 -0
- package/dist/editor/portMenu.d.ts +23 -0
- package/dist/editor/portMenu.js +34 -0
- package/dist/editor/tidy.d.ts +30 -0
- package/dist/editor/tidy.js +66 -0
- package/dist/helpers/workflowEditorHelper.d.ts +3 -0
- package/dist/helpers/workflowEditorHelper.js +8 -3
- package/dist/layout/fromWorkflow.d.ts +42 -0
- package/dist/layout/fromWorkflow.js +135 -0
- package/dist/layout/geometry.d.ts +102 -0
- package/dist/layout/geometry.js +317 -0
- package/dist/layout/index.d.ts +21 -0
- package/dist/layout/index.js +14 -0
- package/dist/layout/inspect.d.ts +18 -0
- package/dist/layout/inspect.js +81 -0
- package/dist/layout/lanePath.d.ts +23 -0
- package/dist/layout/lanePath.js +47 -0
- package/dist/layout/measure.d.ts +141 -0
- package/dist/layout/measure.js +477 -0
- package/dist/layout/primitives.d.ts +124 -0
- package/dist/layout/primitives.js +461 -0
- package/dist/layout/sweep.d.ts +59 -0
- package/dist/layout/sweep.js +257 -0
- package/dist/layout/toWorkflow.d.ts +43 -0
- package/dist/layout/toWorkflow.js +131 -0
- package/dist/layout/types.d.ts +93 -0
- package/dist/layout/types.js +35 -0
- package/dist/messages/defaults.d.ts +641 -26
- package/dist/messages/defaults.js +578 -25
- package/dist/messages/types.d.ts +21 -1
- package/dist/openapi/v1/openapi.yaml +109 -0
- package/dist/playground/index.d.ts +28 -1
- package/dist/playground/index.js +29 -0
- package/dist/playground/mount.d.ts +28 -2
- package/dist/playground/mount.js +41 -15
- package/dist/playground/runAction.d.ts +29 -0
- package/dist/playground/runAction.js +38 -0
- package/dist/services/doctorService.d.ts +52 -0
- package/dist/services/doctorService.js +113 -0
- package/dist/services/globalSave.js +12 -29
- package/dist/services/nodeExecutionService.d.ts +12 -1
- package/dist/services/nodeExecutionService.js +58 -58
- package/dist/services/playgroundService.d.ts +17 -2
- package/dist/services/playgroundService.js +48 -5
- package/dist/services/runsService.d.ts +42 -0
- package/dist/services/runsService.js +87 -0
- package/dist/services/toastQueue.d.ts +33 -0
- package/dist/services/toastQueue.js +38 -0
- package/dist/services/toastService.d.ts +30 -9
- package/dist/services/toastService.js +81 -46
- package/dist/settings/index.d.ts +1 -0
- package/dist/skins/graphite.d.ts +26 -0
- package/dist/skins/graphite.js +473 -0
- package/dist/skins/index.d.ts +2 -1
- package/dist/skins/index.js +4 -2
- package/dist/skins/slate.js +4 -4
- package/dist/stores/attachedRunStore.svelte.d.ts +35 -0
- package/dist/stores/attachedRunStore.svelte.js +47 -0
- package/dist/stores/connectDragStore.svelte.d.ts +39 -0
- package/dist/stores/connectDragStore.svelte.js +42 -0
- package/dist/stores/doctorStore.svelte.d.ts +79 -0
- package/dist/stores/doctorStore.svelte.js +244 -0
- package/dist/stores/editedNodesStore.svelte.d.ts +42 -0
- package/dist/stores/editedNodesStore.svelte.js +84 -0
- package/dist/stores/editorModeStore.svelte.d.ts +34 -0
- package/dist/stores/editorModeStore.svelte.js +55 -0
- package/dist/stores/instanceContainer.svelte.d.ts +53 -0
- package/dist/stores/instanceContainer.svelte.js +38 -1
- package/dist/stores/loopbackLanesStore.svelte.d.ts +18 -0
- package/dist/stores/loopbackLanesStore.svelte.js +25 -0
- package/dist/stores/nodeHighlightStore.svelte.d.ts +34 -0
- package/dist/stores/nodeHighlightStore.svelte.js +56 -0
- package/dist/stores/playgroundStore.svelte.d.ts +66 -2
- package/dist/stores/playgroundStore.svelte.js +164 -2
- package/dist/stores/runController.svelte.d.ts +382 -0
- package/dist/stores/runController.svelte.js +1217 -0
- package/dist/stores/settingsStore.svelte.d.ts +80 -18
- package/dist/stores/settingsStore.svelte.js +180 -62
- package/dist/stores/workflowStore.svelte.d.ts +14 -0
- package/dist/stores/workflowStore.svelte.js +22 -1
- package/dist/styles/base.css +286 -25
- package/dist/styles/fonts/Inter-LICENSE.txt +93 -0
- package/dist/styles/fonts/inter-latin-wght-normal.woff2 +0 -0
- package/dist/styles/fonts/inter.css +19 -0
- package/dist/styles/toast.css +100 -20
- package/dist/styles/tokenAliases.js +118 -1
- package/dist/styles/tokens.css +586 -14
- package/dist/svelte-app.d.ts +38 -5
- package/dist/svelte-app.js +14 -3
- package/dist/themes/graphite.d.ts +2 -0
- package/dist/themes/graphite.js +15 -0
- package/dist/themes/index.d.ts +2 -1
- package/dist/themes/index.js +22 -3
- package/dist/themes/minimal.js +10 -0
- package/dist/themes/scopedSkinCss.d.ts +22 -5
- package/dist/themes/scopedSkinCss.js +136 -11
- package/dist/types/chat.d.ts +6 -0
- package/dist/types/doctor.d.ts +82 -0
- package/dist/types/doctor.js +11 -0
- package/dist/types/events.d.ts +35 -0
- package/dist/types/events.js +4 -1
- package/dist/types/index.d.ts +17 -2
- package/dist/types/navbar.d.ts +36 -0
- package/dist/types/playground.d.ts +66 -0
- package/dist/types/settings.d.ts +120 -7
- package/dist/types/settings.js +35 -3
- package/dist/types/skin.d.ts +21 -8
- package/dist/types/theme.d.ts +40 -2
- package/dist/utils/appearance.d.ts +19 -0
- package/dist/utils/appearance.js +13 -0
- package/dist/utils/canvasFit.d.ts +41 -0
- package/dist/utils/canvasFit.js +44 -0
- package/dist/utils/chipTitles.d.ts +9 -0
- package/dist/utils/chipTitles.js +19 -0
- package/dist/utils/connections.js +8 -0
- package/dist/utils/consoleHighlight.d.ts +28 -0
- package/dist/utils/consoleHighlight.js +269 -0
- package/dist/utils/deprecation.d.ts +17 -0
- package/dist/utils/deprecation.js +29 -0
- package/dist/utils/doctorOperations.d.ts +40 -0
- package/dist/utils/doctorOperations.js +237 -0
- package/dist/utils/duration.d.ts +13 -0
- package/dist/utils/duration.js +40 -0
- package/dist/utils/inspectorContext.d.ts +19 -0
- package/dist/utils/inspectorContext.js +12 -0
- package/dist/utils/inspectorSections.d.ts +20 -0
- package/dist/utils/inspectorSections.js +44 -0
- package/dist/utils/inspectorSurface.d.ts +46 -0
- package/dist/utils/inspectorSurface.js +51 -0
- package/dist/utils/interfaceTags.d.ts +102 -0
- package/dist/utils/interfaceTags.js +211 -0
- package/dist/utils/itemRef.d.ts +86 -0
- package/dist/utils/itemRef.js +106 -0
- package/dist/utils/lastRun.d.ts +35 -0
- package/dist/utils/lastRun.js +73 -0
- package/dist/utils/messageNodeLink.d.ts +17 -0
- package/dist/utils/messageNodeLink.js +16 -0
- package/dist/utils/minimapVisibility.d.ts +28 -0
- package/dist/utils/minimapVisibility.js +34 -0
- package/dist/utils/nodeAriaLabel.d.ts +12 -0
- package/dist/utils/nodeAriaLabel.js +17 -0
- package/dist/utils/nodeFingerprint.d.ts +27 -0
- package/dist/utils/nodeFingerprint.js +66 -0
- package/dist/utils/nodeFormSchema.d.ts +10 -0
- package/dist/utils/nodeFormSchema.js +2 -2
- package/dist/utils/nodeGeometry.d.ts +168 -0
- package/dist/utils/nodeGeometry.js +204 -0
- package/dist/utils/nodeProblem.d.ts +19 -0
- package/dist/utils/nodeProblem.js +9 -0
- package/dist/utils/nodeStatus.d.ts +38 -3
- package/dist/utils/nodeStatus.js +67 -39
- package/dist/utils/nodeSwap.js +9 -1
- package/dist/utils/nodeWrapper.d.ts +1 -0
- package/dist/utils/playgroundHistory.d.ts +48 -0
- package/dist/utils/playgroundHistory.js +38 -0
- package/dist/utils/playgroundInputRuns.d.ts +26 -0
- package/dist/utils/playgroundInputRuns.js +50 -0
- package/dist/utils/portExposure.d.ts +49 -0
- package/dist/utils/portExposure.js +122 -0
- package/dist/utils/portUtils.d.ts +16 -0
- package/dist/utils/portUtils.js +37 -0
- package/dist/utils/portal.d.ts +0 -19
- package/dist/utils/portal.js +8 -1
- package/dist/utils/reservedPorts.d.ts +59 -0
- package/dist/utils/reservedPorts.js +60 -0
- package/dist/utils/runEdges.d.ts +24 -0
- package/dist/utils/runEdges.js +35 -0
- package/dist/utils/runsList.d.ts +69 -0
- package/dist/utils/runsList.js +134 -0
- package/dist/utils/selectOptions.d.ts +62 -0
- package/dist/utils/selectOptions.js +137 -0
- package/dist/utils/sessionRuns.d.ts +62 -0
- package/dist/utils/sessionRuns.js +123 -0
- package/dist/utils/sheetWidths.d.ts +29 -0
- package/dist/utils/sheetWidths.js +41 -0
- package/dist/utils/sidebarWidths.d.ts +34 -0
- package/dist/utils/sidebarWidths.js +47 -0
- package/dist/utils/straightWires.d.ts +73 -0
- package/dist/utils/straightWires.js +99 -0
- package/dist/utils/themeScope.svelte.d.ts +10 -0
- package/dist/utils/themeScope.svelte.js +80 -0
- package/dist/utils/wiredHandles.d.ts +10 -0
- package/dist/utils/wiredHandles.js +14 -0
- package/dist/utils/workflowDraft.d.ts +9 -0
- package/dist/utils/workflowDraft.js +39 -0
- package/dist/utils/workflowInterface.d.ts +40 -7
- package/dist/utils/workflowInterface.js +66 -16
- package/dist/utils/zoomTier.d.ts +43 -0
- package/dist/utils/zoomTier.js +107 -0
- package/dist/utils/zoomTierRows.d.ts +41 -0
- package/dist/utils/zoomTierRows.js +103 -0
- package/dist/webmcp/WebMCPConfirm.svelte +1 -1
- package/dist/webmcp/bridge.d.ts +5 -0
- package/dist/webmcp/bridge.js +8 -0
- package/dist/webmcp/bridgeController.svelte.d.ts +84 -0
- package/dist/webmcp/bridgeController.svelte.js +224 -0
- package/dist/webmcp/descriptors.d.ts +1 -1
- package/dist/webmcp/descriptors.js +66 -5
- package/dist/webmcp/fakeWidget.d.ts +34 -0
- package/dist/webmcp/fakeWidget.js +75 -0
- package/dist/webmcp/gate.js +4 -0
- package/dist/webmcp/index.d.ts +2 -0
- package/dist/webmcp/index.js +1 -0
- package/dist/webmcp/runtime.js +4 -1
- package/dist/webmcp/types.d.ts +2 -0
- package/dist/webmcp/validate.js +5 -1
- package/package.json +8 -2
- package/dist/components/Select.svelte +0 -53
- package/dist/components/Select.svelte.d.ts +0 -15
- package/dist/components/icons/CommandLineIcon.svelte +0 -15
- package/dist/components/icons/CommandLineIcon.svelte.d.ts +0 -26
- package/dist/components/toast/WarningIcon.svelte +0 -28
- package/dist/components/toast/WarningIcon.svelte.d.ts +0 -26
|
@@ -5,15 +5,24 @@
|
|
|
5
5
|
(Run/Stop via ChatInput), and toolbar buttons (Pipeline toggle, Refresh,
|
|
6
6
|
Logs). Owns the session chip popover; delegates input behaviour to the
|
|
7
7
|
shared ChatInput primitive.
|
|
8
|
+
|
|
9
|
+
A workflow whose interface has inputs but no chat is form-first: the inputs
|
|
10
|
+
card (InterfaceInputForm) is the panel, with its own Run, and there is no
|
|
11
|
+
composer. With a chat as well, the inputs fold into one row above the
|
|
12
|
+
composer that opens the same card.
|
|
8
13
|
-->
|
|
9
14
|
|
|
10
15
|
<script lang="ts">
|
|
11
16
|
import Icon from '@iconify/svelte';
|
|
17
|
+
import Button from '../primitives/Button.svelte';
|
|
18
|
+
import IconButton from '../primitives/IconButton.svelte';
|
|
19
|
+
import PanelHeader from '../primitives/PanelHeader.svelte';
|
|
12
20
|
import ChatInput from './ChatInput.svelte';
|
|
13
21
|
import InterfaceInputForm from './InterfaceInputForm.svelte';
|
|
14
22
|
import type { WorkflowInterfaceEntry } from '../../types/index.js';
|
|
15
23
|
import { getInstance } from '../../stores/getInstance.svelte.js';
|
|
16
24
|
import { m } from '../../messages/index.js';
|
|
25
|
+
import { performRun } from '../../playground/runAction.js';
|
|
17
26
|
import type { CommandOutcome } from '../../playground/commands/index.js';
|
|
18
27
|
|
|
19
28
|
const fd = getInstance();
|
|
@@ -58,10 +67,12 @@
|
|
|
58
67
|
*/
|
|
59
68
|
formEntries?: WorkflowInterfaceEntry[];
|
|
60
69
|
/**
|
|
61
|
-
* One friendly line above the form and composer,
|
|
62
|
-
*
|
|
70
|
+
* @deprecated One friendly line above the form and composer. Still rendered, but the
|
|
71
|
+
* Playground reports this through its own notice now. Removed in 3.0.
|
|
63
72
|
*/
|
|
64
73
|
notice?: string;
|
|
74
|
+
/** Show the form's values as JSON instead of the typed form. */
|
|
75
|
+
formJson?: boolean;
|
|
65
76
|
/** Current form values, keyed by entry id. */
|
|
66
77
|
formValues?: Record<string, unknown>;
|
|
67
78
|
/** Called with the complete form values on every change. */
|
|
@@ -70,6 +81,12 @@
|
|
|
70
81
|
showSessionHeader?: boolean;
|
|
71
82
|
showNewSessionButton?: boolean;
|
|
72
83
|
showSessionList?: boolean;
|
|
84
|
+
/** The first send creates the session: see ChatInput's `sessionOptional`. */
|
|
85
|
+
sessionOptional?: boolean;
|
|
86
|
+
/** Runs before a send or Run goes out; `false` holds it back. See ChatInput. */
|
|
87
|
+
beforeSend?: () => Promise<boolean>;
|
|
88
|
+
/** Unsaved edits: the button reads "Save & send". See ChatInput. */
|
|
89
|
+
saveFirst?: boolean;
|
|
73
90
|
style?: string;
|
|
74
91
|
}
|
|
75
92
|
|
|
@@ -95,15 +112,66 @@
|
|
|
95
112
|
placeholder,
|
|
96
113
|
formEntries = [],
|
|
97
114
|
notice,
|
|
115
|
+
formJson = false,
|
|
98
116
|
formValues = {},
|
|
99
117
|
onFormChange,
|
|
100
118
|
showSessionHeader = true,
|
|
101
119
|
showNewSessionButton = true,
|
|
102
120
|
showSessionList = true,
|
|
121
|
+
sessionOptional = false,
|
|
122
|
+
beforeSend,
|
|
123
|
+
saveFirst = false,
|
|
103
124
|
style
|
|
104
125
|
}: Props = $props();
|
|
105
126
|
|
|
106
127
|
const cp = $derived(m().playground.controlPanel);
|
|
128
|
+
const inputForm = $derived(m().playground.inputForm);
|
|
129
|
+
const actions = $derived(m().playground.actions);
|
|
130
|
+
const chatLabels = $derived(m().playground.chat);
|
|
131
|
+
|
|
132
|
+
/** The inputs are the panel: a form and Run, no composer. */
|
|
133
|
+
const formFirst = $derived(formEntries.length > 0 && !showChatInput);
|
|
134
|
+
/** Chat and inputs both: the inputs fold into a row above the composer. */
|
|
135
|
+
const foldedInputs = $derived(formEntries.length > 0 && showChatInput);
|
|
136
|
+
|
|
137
|
+
let inputsOpen = $state(false);
|
|
138
|
+
/** `beforeSend` is running (a save before the run). */
|
|
139
|
+
let preparing = $state(false);
|
|
140
|
+
|
|
141
|
+
// A refused Run is named under the inputs, so open them for it.
|
|
142
|
+
$effect(() => {
|
|
143
|
+
if (foldedInputs && fd.playground.launchError) inputsOpen = true;
|
|
144
|
+
});
|
|
145
|
+
|
|
146
|
+
const filledCount = $derived(
|
|
147
|
+
formEntries.filter((entry) => {
|
|
148
|
+
const value = formValues[entry.id];
|
|
149
|
+
return value !== undefined && value !== '';
|
|
150
|
+
}).length
|
|
151
|
+
);
|
|
152
|
+
|
|
153
|
+
function runForm(): Promise<void> {
|
|
154
|
+
return performRun({
|
|
155
|
+
playground: fd.playground,
|
|
156
|
+
preparing,
|
|
157
|
+
beforeSend,
|
|
158
|
+
setPreparing: (value) => (preparing = value),
|
|
159
|
+
awaitEnableRun,
|
|
160
|
+
onRunWorkflow,
|
|
161
|
+
onSendMessage,
|
|
162
|
+
predefinedMessage,
|
|
163
|
+
defaultMessage: chatLabels.predefinedRun
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
const runTitle = $derived(
|
|
168
|
+
fd.playground.canRun
|
|
169
|
+
? saveFirst
|
|
170
|
+
? actions.saveAndRunTitle
|
|
171
|
+
: actions.runTitle
|
|
172
|
+
: actions.runWaitingTitle
|
|
173
|
+
);
|
|
174
|
+
|
|
107
175
|
const logsTitle = $derived(fd.playground.showLogs ? cp.hideLogs : cp.showLogs);
|
|
108
176
|
|
|
109
177
|
let sessionDropdownOpen = $state(false);
|
|
@@ -150,144 +218,144 @@
|
|
|
150
218
|
}
|
|
151
219
|
</script>
|
|
152
220
|
|
|
153
|
-
<section
|
|
221
|
+
<section
|
|
222
|
+
class="control-panel"
|
|
223
|
+
class:control-panel--notice={!!notice}
|
|
224
|
+
class:control-panel--form={formFirst}
|
|
225
|
+
{style}
|
|
226
|
+
>
|
|
154
227
|
{#if showSessionHeader}
|
|
155
|
-
<
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
<
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
if (e.key === 'Escape') sessionDropdownOpen = false;
|
|
171
|
-
}}
|
|
172
|
-
title={cp.switchSession}
|
|
173
|
-
>
|
|
174
|
-
<span class="control-panel__session-chip-name">
|
|
175
|
-
{fd.playground.currentSession?.name ?? cp.noSession}
|
|
176
|
-
</span>
|
|
177
|
-
<Icon
|
|
178
|
-
icon={sessionDropdownOpen ? 'mdi:chevron-up' : 'mdi:chevron-down'}
|
|
179
|
-
class="control-panel__session-chip-chevron"
|
|
180
|
-
/>
|
|
181
|
-
</button>
|
|
182
|
-
|
|
183
|
-
{#if sessionDropdownOpen}
|
|
184
|
-
<div
|
|
185
|
-
class="control-panel__session-popover"
|
|
186
|
-
bind:this={sessionPopoverEl}
|
|
187
|
-
role="menu"
|
|
188
|
-
tabindex="-1"
|
|
228
|
+
<PanelHeader class="control-panel__header">
|
|
229
|
+
{#snippet leading()}
|
|
230
|
+
<Icon icon="mdi:message-text-outline" class="control-panel__icon" />
|
|
231
|
+
<span class="control-panel__label">{cp.sessionsLabel}</span>
|
|
232
|
+
|
|
233
|
+
{#if showSessionList}
|
|
234
|
+
<div class="control-panel__session-chip-wrap" bind:this={chipWrapEl}>
|
|
235
|
+
<button
|
|
236
|
+
type="button"
|
|
237
|
+
class="control-panel__session-chip"
|
|
238
|
+
class:control-panel__session-chip--open={sessionDropdownOpen}
|
|
239
|
+
bind:this={sessionChipEl}
|
|
240
|
+
aria-haspopup="menu"
|
|
241
|
+
aria-expanded={sessionDropdownOpen}
|
|
242
|
+
onclick={() => (sessionDropdownOpen = !sessionDropdownOpen)}
|
|
189
243
|
onkeydown={(e) => {
|
|
190
|
-
if (e.key === 'Escape')
|
|
191
|
-
sessionDropdownOpen = false;
|
|
192
|
-
sessionChipEl?.focus();
|
|
193
|
-
}
|
|
244
|
+
if (e.key === 'Escape') sessionDropdownOpen = false;
|
|
194
245
|
}}
|
|
246
|
+
title={cp.switchSession}
|
|
195
247
|
>
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
248
|
+
<span class="control-panel__session-chip-name">
|
|
249
|
+
{fd.playground.currentSession?.name ?? cp.noSession}
|
|
250
|
+
</span>
|
|
251
|
+
<Icon
|
|
252
|
+
icon={sessionDropdownOpen ? 'mdi:chevron-up' : 'mdi:chevron-down'}
|
|
253
|
+
class="control-panel__session-chip-chevron"
|
|
254
|
+
/>
|
|
255
|
+
</button>
|
|
256
|
+
|
|
257
|
+
{#if sessionDropdownOpen}
|
|
258
|
+
<div
|
|
259
|
+
class="control-panel__session-popover"
|
|
260
|
+
bind:this={sessionPopoverEl}
|
|
261
|
+
role="menu"
|
|
262
|
+
tabindex="-1"
|
|
263
|
+
onkeydown={(e) => {
|
|
264
|
+
if (e.key === 'Escape') {
|
|
265
|
+
sessionDropdownOpen = false;
|
|
266
|
+
sessionChipEl?.focus();
|
|
267
|
+
}
|
|
268
|
+
}}
|
|
269
|
+
>
|
|
209
270
|
{#if showNewSessionButton}
|
|
210
|
-
<
|
|
271
|
+
<button
|
|
272
|
+
type="button"
|
|
273
|
+
role="menuitem"
|
|
274
|
+
class="control-panel__session-popover-item control-panel__session-popover-item--new"
|
|
275
|
+
disabled={fd.playground.isLoading}
|
|
276
|
+
onclick={handleCreate}
|
|
277
|
+
>
|
|
278
|
+
<Icon icon="mdi:plus" />
|
|
279
|
+
<span>{cp.newSession}</span>
|
|
280
|
+
</button>
|
|
211
281
|
{/if}
|
|
212
|
-
|
|
213
|
-
{#
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
282
|
+
{#if showSessionList && fd.playground.sessions.length > 0}
|
|
283
|
+
{#if showNewSessionButton}
|
|
284
|
+
<div class="control-panel__session-popover-divider"></div>
|
|
285
|
+
{/if}
|
|
286
|
+
<div class="control-panel__session-popover-list">
|
|
287
|
+
{#each fd.playground.sessions as session (session.id)}
|
|
288
|
+
{@const isActive = fd.playground.currentSession?.id === session.id}
|
|
289
|
+
<div class="control-panel__session-popover-row">
|
|
290
|
+
<button
|
|
291
|
+
type="button"
|
|
292
|
+
role="menuitem"
|
|
293
|
+
class="control-panel__session-popover-item"
|
|
294
|
+
class:control-panel__session-popover-item--active={isActive}
|
|
295
|
+
onclick={() => handleSelect(session.id)}
|
|
296
|
+
>
|
|
297
|
+
{#if isActive}
|
|
298
|
+
<Icon icon="mdi:check" class="control-panel__session-popover-check" />
|
|
299
|
+
{:else}
|
|
300
|
+
<Icon icon="mdi:message-outline" />
|
|
301
|
+
{/if}
|
|
302
|
+
<span>{session.name}</span>
|
|
303
|
+
</button>
|
|
304
|
+
<button
|
|
305
|
+
type="button"
|
|
306
|
+
role="menuitem"
|
|
307
|
+
class="control-panel__session-popover-delete"
|
|
308
|
+
onclick={(e) => handleDelete(e, session.id)}
|
|
309
|
+
title={cp.deleteSession}
|
|
310
|
+
aria-label={cp.deleteSession}
|
|
311
|
+
>
|
|
312
|
+
<Icon icon="mdi:delete-outline" />
|
|
313
|
+
</button>
|
|
314
|
+
</div>
|
|
315
|
+
{/each}
|
|
316
|
+
</div>
|
|
317
|
+
{/if}
|
|
318
|
+
</div>
|
|
319
|
+
{/if}
|
|
320
|
+
</div>
|
|
321
|
+
{/if}
|
|
322
|
+
{/snippet}
|
|
323
|
+
{#snippet actions()}
|
|
250
324
|
{#if onTogglePanel}
|
|
251
325
|
{@const pipelineTitle = isPipelinePanelOpen ? cp.hidePipeline : cp.showPipeline}
|
|
252
|
-
<
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
onclick={onTogglePanel}
|
|
326
|
+
<IconButton
|
|
327
|
+
size="sm"
|
|
328
|
+
active={isPipelinePanelOpen}
|
|
329
|
+
ariaLabel={pipelineTitle}
|
|
257
330
|
title={pipelineTitle}
|
|
258
|
-
|
|
331
|
+
onclick={onTogglePanel}
|
|
259
332
|
>
|
|
260
333
|
<Icon icon="mdi:source-branch" />
|
|
261
|
-
|
|
262
|
-
</button>
|
|
334
|
+
</IconButton>
|
|
263
335
|
{/if}
|
|
264
336
|
{#if fd.playground.currentSession}
|
|
265
|
-
<
|
|
266
|
-
|
|
267
|
-
class=
|
|
268
|
-
class:control-panel__toolbar-btn--spinning={isRefreshing}
|
|
269
|
-
onclick={onRefresh}
|
|
337
|
+
<IconButton
|
|
338
|
+
size="sm"
|
|
339
|
+
class={isRefreshing ? 'control-panel__spinning' : ''}
|
|
270
340
|
disabled={isRefreshing}
|
|
341
|
+
ariaLabel={cp.refreshTitle}
|
|
271
342
|
title={cp.refreshTitle}
|
|
272
|
-
|
|
343
|
+
onclick={onRefresh}
|
|
273
344
|
>
|
|
274
345
|
<Icon icon="mdi:refresh" />
|
|
275
|
-
|
|
276
|
-
</button>
|
|
346
|
+
</IconButton>
|
|
277
347
|
{/if}
|
|
278
|
-
<
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
onclick={() => fd.playground.toggleShowLogs()}
|
|
348
|
+
<IconButton
|
|
349
|
+
size="sm"
|
|
350
|
+
active={fd.playground.showLogs}
|
|
351
|
+
ariaLabel={logsTitle}
|
|
283
352
|
title={logsTitle}
|
|
284
|
-
|
|
353
|
+
onclick={() => fd.playground.toggleShowLogs()}
|
|
285
354
|
>
|
|
286
355
|
<Icon icon="mdi:console" />
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
</header>
|
|
356
|
+
</IconButton>
|
|
357
|
+
{/snippet}
|
|
358
|
+
</PanelHeader>
|
|
291
359
|
{/if}
|
|
292
360
|
|
|
293
361
|
{#if notice}
|
|
@@ -297,39 +365,86 @@
|
|
|
297
365
|
</p>
|
|
298
366
|
{/if}
|
|
299
367
|
|
|
300
|
-
{#if
|
|
368
|
+
{#if formFirst}
|
|
301
369
|
<InterfaceInputForm
|
|
302
370
|
entries={formEntries}
|
|
303
371
|
values={formValues}
|
|
304
372
|
onChange={(values) => onFormChange?.(values)}
|
|
373
|
+
json={formJson}
|
|
305
374
|
disabled={fd.playground.isExecuting}
|
|
375
|
+
onRun={showRunButton ? runForm : undefined}
|
|
376
|
+
onStop={onStopExecution}
|
|
377
|
+
running={fd.playground.isExecuting}
|
|
378
|
+
runDisabled={!fd.playground.canRun}
|
|
379
|
+
runBusy={preparing}
|
|
380
|
+
runLabel={saveFirst ? actions.saveAndRun : actions.run}
|
|
381
|
+
{runTitle}
|
|
382
|
+
error={fd.playground.launchError}
|
|
383
|
+
notice={commandFeedback?.message ?? null}
|
|
306
384
|
/>
|
|
385
|
+
{:else if foldedInputs}
|
|
386
|
+
<div class="control-panel__inputs">
|
|
387
|
+
<Button
|
|
388
|
+
variant="ghost"
|
|
389
|
+
class="control-panel__inputs-row"
|
|
390
|
+
aria-expanded={inputsOpen}
|
|
391
|
+
title={inputsOpen ? inputForm.foldedHide : inputForm.foldedShow}
|
|
392
|
+
onclick={() => (inputsOpen = !inputsOpen)}
|
|
393
|
+
>
|
|
394
|
+
<Icon icon={inputsOpen ? 'mdi:chevron-down' : 'mdi:chevron-right'} />
|
|
395
|
+
<span class="control-panel__inputs-title">{inputForm.folded}</span>
|
|
396
|
+
<span class="control-panel__inputs-count">
|
|
397
|
+
{inputForm.foldedCount({ filled: filledCount, total: formEntries.length })}
|
|
398
|
+
</span>
|
|
399
|
+
</Button>
|
|
400
|
+
{#if inputsOpen}
|
|
401
|
+
<InterfaceInputForm
|
|
402
|
+
entries={formEntries}
|
|
403
|
+
values={formValues}
|
|
404
|
+
onChange={(values) => onFormChange?.(values)}
|
|
405
|
+
json={formJson}
|
|
406
|
+
disabled={fd.playground.isExecuting}
|
|
407
|
+
/>
|
|
408
|
+
{/if}
|
|
409
|
+
</div>
|
|
307
410
|
{/if}
|
|
308
411
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
412
|
+
{#if !formFirst || !showRunButton}
|
|
413
|
+
<ChatInput
|
|
414
|
+
showTextarea={showChatInput}
|
|
415
|
+
{showRunButton}
|
|
416
|
+
{placeholder}
|
|
417
|
+
{predefinedMessage}
|
|
418
|
+
{onSendMessage}
|
|
419
|
+
{onStopExecution}
|
|
420
|
+
{onRunWorkflow}
|
|
421
|
+
{awaitEnableRun}
|
|
422
|
+
{enableCommands}
|
|
423
|
+
{commandFeedback}
|
|
424
|
+
{onDismissCommandFeedback}
|
|
425
|
+
{sessionOptional}
|
|
426
|
+
{beforeSend}
|
|
427
|
+
{saveFirst}
|
|
428
|
+
/>
|
|
429
|
+
{/if}
|
|
322
430
|
</section>
|
|
323
431
|
|
|
324
432
|
<style>
|
|
325
433
|
.control-panel {
|
|
326
434
|
display: flex;
|
|
435
|
+
flex: none;
|
|
327
436
|
flex-direction: column;
|
|
328
437
|
min-height: 0;
|
|
329
438
|
background-color: var(--fd-background);
|
|
330
439
|
border-top: 1px solid var(--fd-border);
|
|
331
440
|
}
|
|
332
441
|
|
|
442
|
+
/* A notice is taller than the 140px the split gives the panel by default;
|
|
443
|
+
without this it pushed the composer out of the panel in a narrow dock. */
|
|
444
|
+
.control-panel--notice {
|
|
445
|
+
min-height: min-content;
|
|
446
|
+
}
|
|
447
|
+
|
|
333
448
|
.control-panel__notice {
|
|
334
449
|
display: flex;
|
|
335
450
|
align-items: flex-start;
|
|
@@ -347,33 +462,62 @@
|
|
|
347
462
|
margin-top: 0.15em;
|
|
348
463
|
}
|
|
349
464
|
|
|
350
|
-
|
|
465
|
+
/* Form-first: the card sits on top of the conversation and scrolls itself
|
|
466
|
+
when the inputs are many, leaving the output its share. */
|
|
467
|
+
.control-panel--form {
|
|
468
|
+
flex: 0 1 auto;
|
|
469
|
+
max-height: 60%;
|
|
470
|
+
overflow-y: auto;
|
|
471
|
+
border-top: none;
|
|
472
|
+
border-bottom: 1px solid var(--fd-border);
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
.control-panel__inputs {
|
|
476
|
+
flex: 0 1 auto;
|
|
477
|
+
min-height: 0;
|
|
478
|
+
overflow-y: auto;
|
|
479
|
+
max-height: 50vh;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
.control-panel__inputs :global(.control-panel__inputs-row) {
|
|
483
|
+
width: 100%;
|
|
484
|
+
justify-content: flex-start;
|
|
485
|
+
border-radius: 0;
|
|
486
|
+
padding: 0 var(--fd-space-xl);
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
.control-panel__inputs :global(.control-panel__inputs-row .flowdrop-ui-button__label) {
|
|
351
490
|
display: flex;
|
|
352
491
|
align-items: center;
|
|
353
492
|
gap: var(--fd-space-xs);
|
|
354
|
-
padding: 0 var(--fd-space-xl);
|
|
355
|
-
height: var(--fd-playground-header-height);
|
|
356
|
-
min-height: var(--fd-playground-header-height);
|
|
357
|
-
border-bottom: 1px solid var(--fd-border);
|
|
358
|
-
flex-shrink: 0;
|
|
359
493
|
}
|
|
360
494
|
|
|
361
|
-
|
|
362
|
-
font-
|
|
495
|
+
.control-panel__inputs-title {
|
|
496
|
+
font-weight: 600;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
.control-panel__inputs-count {
|
|
363
500
|
color: var(--fd-muted-foreground);
|
|
501
|
+
font-size: var(--fd-text-xs);
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
/* Shrinks with the header (the chip's name ellipsizes) so the actions
|
|
505
|
+
stay inside a narrow dock instead of being clipped. */
|
|
506
|
+
:global(.control-panel__icon) {
|
|
364
507
|
flex-shrink: 0;
|
|
508
|
+
color: var(--fd-muted-foreground);
|
|
365
509
|
}
|
|
366
510
|
|
|
367
511
|
.control-panel__label {
|
|
512
|
+
flex-shrink: 0;
|
|
368
513
|
font-size: var(--fd-text-sm);
|
|
369
514
|
font-weight: 600;
|
|
370
|
-
color: var(--fd-foreground);
|
|
371
|
-
flex-shrink: 0;
|
|
372
515
|
}
|
|
373
516
|
|
|
374
517
|
.control-panel__session-chip-wrap {
|
|
375
518
|
position: relative;
|
|
376
|
-
flex
|
|
519
|
+
flex: 0 1 auto;
|
|
520
|
+
min-width: 0;
|
|
377
521
|
}
|
|
378
522
|
|
|
379
523
|
.control-panel__session-chip {
|
|
@@ -389,7 +533,7 @@
|
|
|
389
533
|
font-weight: 500;
|
|
390
534
|
cursor: pointer;
|
|
391
535
|
transition: all var(--fd-transition-fast);
|
|
392
|
-
max-width: 220px;
|
|
536
|
+
max-width: min(220px, 100%);
|
|
393
537
|
line-height: 1;
|
|
394
538
|
}
|
|
395
539
|
|
|
@@ -540,51 +684,7 @@
|
|
|
540
684
|
opacity: 1;
|
|
541
685
|
}
|
|
542
686
|
|
|
543
|
-
.control-
|
|
544
|
-
display: flex;
|
|
545
|
-
align-items: center;
|
|
546
|
-
gap: var(--fd-space-xs);
|
|
547
|
-
margin-left: auto;
|
|
548
|
-
}
|
|
549
|
-
|
|
550
|
-
.control-panel__toolbar-btn {
|
|
551
|
-
display: inline-flex;
|
|
552
|
-
align-items: center;
|
|
553
|
-
gap: var(--fd-space-3xs);
|
|
554
|
-
padding: var(--fd-space-3xs) var(--fd-space-sm);
|
|
555
|
-
border: 1px solid var(--fd-border);
|
|
556
|
-
border-radius: var(--fd-radius-md);
|
|
557
|
-
background: transparent;
|
|
558
|
-
color: var(--fd-muted-foreground);
|
|
559
|
-
font-size: var(--fd-text-xs);
|
|
560
|
-
font-weight: 500;
|
|
561
|
-
cursor: pointer;
|
|
562
|
-
transition: all var(--fd-transition-fast);
|
|
563
|
-
line-height: 1;
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
.control-panel__toolbar-btn :global(svg) {
|
|
567
|
-
font-size: var(--fd-text-xs);
|
|
568
|
-
}
|
|
569
|
-
|
|
570
|
-
.control-panel__toolbar-btn:hover:not(:disabled) {
|
|
571
|
-
background-color: var(--fd-muted);
|
|
572
|
-
color: var(--fd-foreground);
|
|
573
|
-
border-color: var(--fd-border-strong);
|
|
574
|
-
}
|
|
575
|
-
|
|
576
|
-
.control-panel__toolbar-btn:disabled {
|
|
577
|
-
opacity: 0.5;
|
|
578
|
-
cursor: not-allowed;
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
.control-panel__toolbar-btn--active {
|
|
582
|
-
background-color: var(--fd-primary-muted);
|
|
583
|
-
border-color: var(--fd-primary);
|
|
584
|
-
color: var(--fd-primary);
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
.control-panel__toolbar-btn--spinning :global(svg) {
|
|
687
|
+
:global(.control-panel__spinning svg) {
|
|
588
688
|
animation: control-panel-spin 0.8s linear infinite;
|
|
589
689
|
}
|
|
590
690
|
|
|
@@ -35,10 +35,12 @@ interface Props {
|
|
|
35
35
|
*/
|
|
36
36
|
formEntries?: WorkflowInterfaceEntry[];
|
|
37
37
|
/**
|
|
38
|
-
* One friendly line above the form and composer,
|
|
39
|
-
*
|
|
38
|
+
* @deprecated One friendly line above the form and composer. Still rendered, but the
|
|
39
|
+
* Playground reports this through its own notice now. Removed in 3.0.
|
|
40
40
|
*/
|
|
41
41
|
notice?: string;
|
|
42
|
+
/** Show the form's values as JSON instead of the typed form. */
|
|
43
|
+
formJson?: boolean;
|
|
42
44
|
/** Current form values, keyed by entry id. */
|
|
43
45
|
formValues?: Record<string, unknown>;
|
|
44
46
|
/** Called with the complete form values on every change. */
|
|
@@ -46,6 +48,12 @@ interface Props {
|
|
|
46
48
|
showSessionHeader?: boolean;
|
|
47
49
|
showNewSessionButton?: boolean;
|
|
48
50
|
showSessionList?: boolean;
|
|
51
|
+
/** The first send creates the session: see ChatInput's `sessionOptional`. */
|
|
52
|
+
sessionOptional?: boolean;
|
|
53
|
+
/** Runs before a send or Run goes out; `false` holds it back. See ChatInput. */
|
|
54
|
+
beforeSend?: () => Promise<boolean>;
|
|
55
|
+
/** Unsaved edits: the button reads "Save & send". See ChatInput. */
|
|
56
|
+
saveFirst?: boolean;
|
|
49
57
|
style?: string;
|
|
50
58
|
}
|
|
51
59
|
declare const ControlPanel: import("svelte").Component<Props, {}, "">;
|