@flowdrop/flowdrop 2.13.0 → 2.15.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 +82 -0
- package/dist/commands/executor.js +58 -8
- package/dist/commands/parser.js +3 -3
- package/dist/commands/types.d.ts +8 -2
- package/dist/commands/uiActionTarget.d.ts +24 -0
- package/dist/commands/uiActionTarget.js +31 -0
- package/dist/commands/validate.d.ts +15 -0
- package/dist/commands/validate.js +115 -0
- package/dist/components/App.svelte +44 -2
- package/dist/components/App.svelte.d.ts +3 -1
- package/dist/components/Button.svelte +7 -7
- package/dist/components/Button.svelte.d.ts +10 -0
- package/dist/components/CanvasBanner.svelte +19 -6
- package/dist/components/CanvasBanner.svelte.d.ts +15 -3
- package/dist/components/CanvasContextMenu.svelte +9 -9
- package/dist/components/CanvasContextMenu.svelte.d.ts +10 -0
- package/dist/components/CanvasToolbar.svelte +8 -7
- package/dist/components/CanvasToolbar.svelte.d.ts +10 -0
- package/dist/components/CanvasZoomControls.svelte +10 -9
- package/dist/components/CanvasZoomControls.svelte.d.ts +13 -0
- package/dist/components/ConfigForm.svelte +51 -18
- package/dist/components/ConfigForm.svelte.d.ts +20 -1
- package/dist/components/ConfigPanel.svelte +9 -5
- package/dist/components/ConfigPanel.svelte.d.ts +10 -0
- package/dist/components/EditorStatusBar.svelte +6 -5
- package/dist/components/EditorStatusBar.svelte.d.ts +7 -0
- package/dist/components/ExternalLinkRow.svelte +16 -1
- package/dist/components/ExternalLinkRow.svelte.d.ts +5 -0
- package/dist/components/FlowDropEdge.svelte +15 -12
- package/dist/components/FlowDropEdge.svelte.d.ts +16 -0
- package/dist/components/InterfaceTag.svelte +13 -15
- package/dist/components/InterfaceTag.svelte.d.ts +19 -0
- package/dist/components/LoadingSpinner.svelte +8 -2
- package/dist/components/LoadingSpinner.svelte.d.ts +9 -0
- package/dist/components/Logo.svelte +11 -0
- package/dist/components/Logo.svelte.d.ts +9 -0
- package/dist/components/LogoWordmark.svelte +8 -3
- package/dist/components/LogoWordmark.svelte.d.ts +9 -0
- package/dist/components/LoopbackLanes.svelte +12 -6
- package/dist/components/LoopbackLanes.svelte.d.ts +13 -0
- package/dist/components/MarkdownDisplay.svelte +10 -3
- package/dist/components/MarkdownDisplay.svelte.d.ts +11 -0
- package/dist/components/Navbar.svelte +13 -5
- package/dist/components/Navbar.svelte.d.ts +14 -0
- package/dist/components/NodeInspector.svelte +7 -8
- package/dist/components/NodeInspector.svelte.d.ts +10 -0
- package/dist/components/NodeSidebar.svelte +9 -3
- package/dist/components/NodeSidebar.svelte.d.ts +10 -0
- package/dist/components/NodeStatusOverlay.svelte +30 -19
- package/dist/components/NodeStatusOverlay.svelte.d.ts +19 -0
- package/dist/components/NodeSwapPicker.svelte +1 -1
- package/dist/components/RunBar.svelte +10 -13
- package/dist/components/RunBar.svelte.d.ts +15 -0
- package/dist/components/RunsMenu.svelte +14 -13
- package/dist/components/RunsMenu.svelte.d.ts +15 -0
- package/dist/components/SchemaForm.svelte +10 -13
- package/dist/components/SchemaForm.svelte.d.ts +51 -0
- package/dist/components/SettingsPanel.svelte +5 -5
- package/dist/components/StatusIcon.svelte +14 -3
- package/dist/components/StatusIcon.svelte.d.ts +15 -0
- package/dist/components/StatusLabel.svelte +10 -2
- package/dist/components/StatusLabel.svelte.d.ts +11 -0
- package/dist/components/ThemeToggle.svelte +8 -5
- package/dist/components/ThemeToggle.svelte.d.ts +10 -0
- package/dist/components/UniversalNode.svelte +13 -5
- package/dist/components/UniversalNode.svelte.d.ts +15 -0
- package/dist/components/WorkflowInterfaceEntryCard.svelte +1 -1
- package/dist/components/WorkflowInterfaceEntryComposer.svelte +1 -2
- package/dist/components/ZoomTier.svelte +13 -10
- package/dist/components/ZoomTier.svelte.d.ts +14 -0
- package/dist/components/console/CommandConsole.svelte +9 -3
- package/dist/components/console/CommandConsole.svelte.d.ts +10 -0
- package/dist/components/console/ConsoleAutocomplete.svelte +4 -4
- package/dist/components/console/ConsoleAutocomplete.svelte.d.ts +5 -0
- package/dist/components/console/ConsoleInput.svelte +6 -4
- package/dist/components/console/ConsoleInput.svelte.d.ts +7 -0
- package/dist/components/console/ConsoleOutput.svelte +5 -3
- package/dist/components/console/ConsoleOutput.svelte.d.ts +6 -0
- package/dist/components/console/ConsoleStrip.svelte +9 -5
- package/dist/components/console/ConsoleStrip.svelte.d.ts +10 -0
- package/dist/components/form/FieldFactory.svelte +6 -2
- package/dist/components/form/FieldFactory.svelte.d.ts +46 -0
- package/dist/components/form/FormArray.svelte +9 -16
- package/dist/components/form/FormArray.svelte.d.ts +10 -0
- package/dist/components/form/FormArrayRows.svelte +8 -8
- package/dist/components/form/FormArrayRows.svelte.d.ts +11 -0
- package/dist/components/form/FormAutocomplete.svelte +6 -3
- package/dist/components/form/FormAutocomplete.svelte.d.ts +23 -0
- package/dist/components/form/FormCheckboxGroup.svelte +5 -5
- package/dist/components/form/FormCheckboxGroup.svelte.d.ts +6 -0
- package/dist/components/form/FormCodeEditor.svelte +8 -13
- package/dist/components/form/FormCodeEditor.svelte.d.ts +9 -0
- package/dist/components/form/FormField.svelte +7 -8
- package/dist/components/form/FormField.svelte.d.ts +10 -0
- package/dist/components/form/FormFieldLight.svelte +6 -5
- package/dist/components/form/FormFieldLight.svelte.d.ts +8 -0
- package/dist/components/form/FormFieldWrapper.svelte +8 -8
- package/dist/components/form/FormFieldWrapper.svelte.d.ts +9 -0
- package/dist/components/form/FormFieldset.svelte +6 -12
- package/dist/components/form/FormFieldset.svelte.d.ts +7 -0
- package/dist/components/form/FormMarkdownEditor.svelte +8 -15
- package/dist/components/form/FormMarkdownEditor.svelte.d.ts +9 -0
- package/dist/components/form/FormNumberField.svelte +5 -7
- package/dist/components/form/FormNumberField.svelte.d.ts +6 -0
- package/dist/components/form/FormPorts.svelte +133 -27
- package/dist/components/form/FormPorts.svelte.d.ts +19 -0
- package/dist/components/form/FormRangeField.svelte +5 -9
- package/dist/components/form/FormRangeField.svelte.d.ts +6 -0
- package/dist/components/form/FormSelect.svelte +5 -7
- package/dist/components/form/FormSelect.svelte.d.ts +6 -0
- package/dist/components/form/FormTemplateEditor.svelte +8 -16
- package/dist/components/form/FormTemplateEditor.svelte.d.ts +9 -0
- package/dist/components/form/FormTextField.svelte +5 -7
- package/dist/components/form/FormTextField.svelte.d.ts +6 -0
- package/dist/components/form/FormTextarea.svelte +5 -7
- package/dist/components/form/FormTextarea.svelte.d.ts +6 -0
- package/dist/components/form/FormToggle.svelte +6 -8
- package/dist/components/form/FormToggle.svelte.d.ts +7 -0
- package/dist/components/form/FormUISchemaRenderer.svelte +5 -9
- package/dist/components/form/FormUISchemaRenderer.svelte.d.ts +7 -0
- package/dist/components/interrupt/ChoicePrompt.svelte +6 -6
- package/dist/components/interrupt/ChoicePrompt.svelte.d.ts +7 -0
- package/dist/components/interrupt/ConfirmationPrompt.svelte +6 -5
- package/dist/components/interrupt/ConfirmationPrompt.svelte.d.ts +7 -0
- package/dist/components/interrupt/FormPrompt.svelte +6 -6
- package/dist/components/interrupt/FormPrompt.svelte.d.ts +7 -0
- package/dist/components/interrupt/InterruptBubble.svelte +10 -9
- package/dist/components/interrupt/InterruptBubble.svelte.d.ts +11 -0
- package/dist/components/interrupt/ReviewPrompt.svelte +5 -6
- package/dist/components/interrupt/ReviewPrompt.svelte.d.ts +7 -0
- package/dist/components/interrupt/TextInputPrompt.svelte +6 -6
- package/dist/components/interrupt/TextInputPrompt.svelte.d.ts +7 -0
- package/dist/components/nodes/AtomNode.svelte +31 -6
- package/dist/components/nodes/AtomNode.svelte.d.ts +15 -0
- package/dist/components/nodes/CaptionNode.svelte +50 -7
- package/dist/components/nodes/CaptionNode.svelte.d.ts +13 -0
- package/dist/components/nodes/GatewayNode.svelte +18 -11
- package/dist/components/nodes/GatewayNode.svelte.d.ts +21 -0
- package/dist/components/nodes/IdeaNode.svelte +47 -6
- package/dist/components/nodes/IdeaNode.svelte.d.ts +17 -0
- package/dist/components/nodes/NodeCard.svelte +26 -18
- package/dist/components/nodes/NodeCard.svelte.d.ts +20 -0
- package/dist/components/nodes/NodeConfigButton.svelte +15 -2
- package/dist/components/nodes/NodeConfigButton.svelte.d.ts +11 -0
- package/dist/components/nodes/NodeProblemMark.svelte +15 -10
- package/dist/components/nodes/NodeProblemMark.svelte.d.ts +16 -0
- package/dist/components/nodes/NodeTip.svelte +10 -7
- package/dist/components/nodes/NodeTip.svelte.d.ts +13 -0
- package/dist/components/nodes/NotesNode.svelte +30 -0
- package/dist/components/nodes/NotesNode.svelte.d.ts +14 -0
- package/dist/components/nodes/SimpleNode.svelte +35 -8
- package/dist/components/nodes/SimpleNode.svelte.d.ts +17 -0
- package/dist/components/nodes/SquareNode.svelte +38 -8
- package/dist/components/nodes/SquareNode.svelte.d.ts +17 -0
- package/dist/components/nodes/TerminalNode.svelte +24 -10
- package/dist/components/nodes/TerminalNode.svelte.d.ts +17 -0
- package/dist/components/nodes/ToolNode.svelte +14 -5
- package/dist/components/nodes/ToolNode.svelte.d.ts +15 -0
- package/dist/components/nodes/WorkflowNode.svelte +18 -15
- package/dist/components/nodes/WorkflowNode.svelte.d.ts +21 -0
- package/dist/components/playground/ChatBubble.svelte +4 -3
- package/dist/components/playground/ChatBubble.svelte.d.ts +5 -0
- package/dist/components/playground/ChatInput.svelte +11 -6
- package/dist/components/playground/ChatInput.svelte.d.ts +14 -0
- package/dist/components/playground/ChatPanel.svelte +15 -7
- package/dist/components/playground/ChatPanel.svelte.d.ts +17 -0
- package/dist/components/playground/ControlPanel.svelte +26 -9
- package/dist/components/playground/ControlPanel.svelte.d.ts +29 -0
- package/dist/components/playground/DockedPlayground.svelte +7 -10
- package/dist/components/playground/DockedPlayground.svelte.d.ts +10 -0
- package/dist/components/playground/ExecutionConsole.svelte +10 -5
- package/dist/components/playground/ExecutionConsole.svelte.d.ts +12 -0
- package/dist/components/playground/ExecutionList.svelte +13 -0
- package/dist/components/playground/ExecutionList.svelte.d.ts +11 -0
- package/dist/components/playground/ExecutionLogs.svelte +6 -9
- package/dist/components/playground/ExecutionLogs.svelte.d.ts +7 -0
- package/dist/components/playground/HeaderMenu.svelte +6 -8
- package/dist/components/playground/HeaderMenu.svelte.d.ts +9 -0
- package/dist/components/playground/HierarchyTrail.svelte +6 -6
- package/dist/components/playground/HierarchyTrail.svelte.d.ts +8 -0
- package/dist/components/playground/InputCollector.svelte +6 -5
- package/dist/components/playground/InputCollector.svelte.d.ts +7 -0
- package/dist/components/playground/InputFields.svelte +8 -12
- package/dist/components/playground/InputFields.svelte.d.ts +9 -0
- package/dist/components/playground/InterfaceInputForm.svelte +6 -13
- package/dist/components/playground/InterfaceInputForm.svelte.d.ts +9 -0
- package/dist/components/playground/InterfaceJsonInput.svelte +6 -5
- package/dist/components/playground/InterfaceJsonInput.svelte.d.ts +8 -0
- package/dist/components/playground/LogRow.svelte +4 -5
- package/dist/components/playground/LogRow.svelte.d.ts +6 -0
- package/dist/components/playground/MessageBubble.svelte +13 -7
- package/dist/components/playground/MessageBubble.svelte.d.ts +15 -0
- package/dist/components/playground/MessageCard.svelte +5 -2
- package/dist/components/playground/MessageCard.svelte.d.ts +6 -0
- package/dist/components/playground/MessageMarkdown.svelte +8 -9
- package/dist/components/playground/MessageMarkdown.svelte.d.ts +11 -0
- package/dist/components/playground/MessageNotice.svelte +7 -0
- package/dist/components/playground/MessageNotice.svelte.d.ts +5 -0
- package/dist/components/playground/MessageStream.svelte +8 -6
- package/dist/components/playground/MessageStream.svelte.d.ts +11 -0
- package/dist/components/playground/MessageTagChip.svelte +7 -7
- package/dist/components/playground/MessageTagChip.svelte.d.ts +10 -0
- package/dist/components/playground/MessageTagStrip.svelte +6 -3
- package/dist/components/playground/MessageTagStrip.svelte.d.ts +8 -0
- package/dist/components/playground/OriginBadge.svelte +7 -4
- package/dist/components/playground/OriginBadge.svelte.d.ts +8 -0
- package/dist/components/playground/PipelineKanbanView.svelte +14 -0
- package/dist/components/playground/PipelineKanbanView.svelte.d.ts +12 -0
- package/dist/components/playground/PipelinePanel.svelte +14 -0
- package/dist/components/playground/PipelinePanel.svelte.d.ts +12 -0
- package/dist/components/playground/PipelineTableView.svelte +14 -0
- package/dist/components/playground/PipelineTableView.svelte.d.ts +12 -0
- package/dist/components/playground/Playground.svelte +17 -11
- package/dist/components/playground/Playground.svelte.d.ts +20 -0
- package/dist/components/playground/PlaygroundApp.svelte +24 -10
- package/dist/components/playground/PlaygroundApp.svelte.d.ts +26 -0
- package/dist/components/playground/PlaygroundHeader.svelte +8 -12
- package/dist/components/playground/PlaygroundHeader.svelte.d.ts +11 -0
- package/dist/components/playground/PlaygroundModal.svelte +6 -8
- package/dist/components/playground/PlaygroundModal.svelte.d.ts +7 -0
- package/dist/components/playground/PlaygroundStudio.svelte +9 -0
- package/dist/components/playground/PlaygroundStudio.svelte.d.ts +7 -0
- package/dist/components/playground/PlaygroundSurface.svelte +19 -14
- package/dist/components/playground/PlaygroundSurface.svelte.d.ts +20 -0
- package/dist/components/playground/SessionManager.svelte +6 -5
- package/dist/components/playground/SessionManager.svelte.d.ts +7 -0
- package/dist/components/playground/StepsSummary.svelte +8 -9
- package/dist/components/playground/StepsSummary.svelte.d.ts +10 -0
- package/dist/components/primitives/Button.svelte +15 -7
- package/dist/components/primitives/Button.svelte.d.ts +18 -1
- package/dist/components/primitives/Card.svelte +8 -6
- package/dist/components/primitives/Card.svelte.d.ts +11 -0
- package/dist/components/primitives/Checkbox.svelte +8 -5
- package/dist/components/primitives/Checkbox.svelte.d.ts +11 -0
- package/dist/components/primitives/Chip.svelte +8 -4
- package/dist/components/primitives/Chip.svelte.d.ts +11 -0
- package/dist/components/primitives/Combobox.svelte +27 -18
- package/dist/components/primitives/Combobox.svelte.d.ts +33 -0
- package/dist/components/primitives/Composer.svelte +15 -16
- package/dist/components/primitives/Composer.svelte.d.ts +20 -0
- package/dist/components/primitives/EmptyState.svelte +9 -3
- package/dist/components/primitives/EmptyState.svelte.d.ts +11 -0
- package/dist/components/primitives/Field.svelte +12 -9
- package/dist/components/primitives/Field.svelte.d.ts +16 -0
- package/dist/components/primitives/IconButton.svelte +10 -5
- package/dist/components/primitives/IconButton.svelte.d.ts +13 -0
- package/dist/components/primitives/Menu.svelte +15 -14
- package/dist/components/primitives/Menu.svelte.d.ts +20 -0
- package/dist/components/primitives/Notice.svelte +11 -8
- package/dist/components/primitives/Notice.svelte.d.ts +14 -0
- package/dist/components/primitives/PanelHeader.svelte +10 -7
- package/dist/components/primitives/PanelHeader.svelte.d.ts +13 -0
- package/dist/components/primitives/Segmented.svelte +11 -4
- package/dist/components/primitives/Segmented.svelte.d.ts +14 -0
- package/dist/components/primitives/Select.svelte +13 -16
- package/dist/components/primitives/Select.svelte.d.ts +18 -0
- package/dist/components/primitives/StatusPill.svelte +11 -8
- package/dist/components/primitives/StatusPill.svelte.d.ts +15 -0
- package/dist/components/primitives/Switch.svelte +9 -6
- package/dist/components/primitives/Switch.svelte.d.ts +12 -0
- package/dist/components/primitives/Tabs.svelte +16 -15
- package/dist/components/primitives/Tabs.svelte.d.ts +22 -0
- package/dist/components/primitives/Toolbar.svelte +14 -13
- package/dist/components/primitives/Toolbar.svelte.d.ts +18 -0
- package/dist/components/primitives/ToolbarSeparator.svelte +5 -4
- package/dist/components/primitives/ToolbarSeparator.svelte.d.ts +7 -0
- package/dist/core/index.d.ts +2 -2
- package/dist/core/index.js +1 -1
- package/dist/editor/index.d.ts +3 -3
- package/dist/index.d.ts +3 -2
- package/dist/layout/index.d.ts +1 -1
- package/dist/layout/index.js +1 -1
- package/dist/layout/toWorkflow.d.ts +8 -7
- package/dist/layout/toWorkflow.js +20 -40
- package/dist/messages/defaults.d.ts +24 -0
- package/dist/messages/defaults.js +15 -0
- package/dist/skins/graphite.d.ts +1 -1
- package/dist/skins/graphite.js +1 -1
- package/dist/stores/settingsStore.svelte.js +3 -0
- package/dist/stores/workflowStore.svelte.d.ts +10 -0
- package/dist/stores/workflowStore.svelte.js +65 -20
- package/dist/styles/base.css +2 -126
- package/dist/styles/tokenAliases.js +1 -0
- package/dist/styles/tokens.css +9 -5
- package/dist/svelte-app.d.ts +63 -2
- package/dist/svelte-app.js +144 -1
- package/dist/themes/classic.d.ts +9 -0
- package/dist/themes/classic.js +16 -0
- package/dist/themes/index.d.ts +7 -2
- package/dist/themes/index.js +20 -10
- package/dist/types/events.d.ts +18 -1
- package/dist/types/index.d.ts +10 -0
- package/dist/types/settings.d.ts +6 -2
- package/dist/types/theme.d.ts +6 -2
- package/dist/utils/externalEdit.svelte.d.ts +48 -0
- package/dist/utils/externalEdit.svelte.js +62 -0
- package/dist/utils/inspectorContext.d.ts +5 -0
- package/dist/utils/playgroundChat.d.ts +10 -0
- package/dist/utils/playgroundChat.js +25 -0
- package/dist/utils/portExposure.d.ts +24 -1
- package/dist/utils/portExposure.js +46 -13
- package/dist/utils/portUtils.d.ts +5 -1
- package/dist/utils/portUtils.js +15 -4
- package/package.json +2 -1
- package/dist/components/IconButton.svelte +0 -80
- package/dist/components/IconButton.svelte.d.ts +0 -30
- package/dist/themes/default.d.ts +0 -2
- package/dist/themes/default.js +0 -9
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
A
|
|
4
|
-
Styled with BEM syntax
|
|
2
|
+
@component
|
|
3
|
+
A square node that shows only its icon, with the ports on its edges.
|
|
5
4
|
|
|
6
5
|
Port rendering:
|
|
7
|
-
- Exposure (data.config.ports
|
|
8
|
-
|
|
9
|
-
- Order: data.config.ports
|
|
10
|
-
|
|
6
|
+
- Exposure (`data.config.ports`, falling back to each port's `exposedByDefault`) decides
|
|
7
|
+
which ports render. A port that is not exposed is hidden.
|
|
8
|
+
- Order: `data.config.ports` overrides the metadata default (`displayOrder`); ports it does
|
|
9
|
+
not list follow in the default order.
|
|
10
|
+
|
|
11
|
+
**Use it for** a node type that declares `type: "square"`, where the icon says enough.
|
|
12
|
+
**Not for** a node that needs a title or a description; use `WorkflowNode`.
|
|
11
13
|
-->
|
|
12
14
|
|
|
13
15
|
<script lang="ts">
|
|
@@ -36,7 +38,9 @@
|
|
|
36
38
|
import AlertCircleIcon from '../icons/AlertCircleIcon.svelte';
|
|
37
39
|
|
|
38
40
|
interface Props {
|
|
41
|
+
/** The node's id on the canvas. */
|
|
39
42
|
id: string;
|
|
43
|
+
/** The node: label, config (`ports`, dynamic ports) and node type. */
|
|
40
44
|
data: {
|
|
41
45
|
label: string;
|
|
42
46
|
config: ConfigValues;
|
|
@@ -48,8 +52,11 @@
|
|
|
48
52
|
data: { label: string; config: ConfigValues; metadata: NodeMetadata };
|
|
49
53
|
}) => void;
|
|
50
54
|
};
|
|
55
|
+
/** Whether the node is selected. A selected node draws its selection border and keeps the config gear visible. */
|
|
51
56
|
selected?: boolean;
|
|
57
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
52
58
|
isProcessing?: boolean;
|
|
59
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
53
60
|
isError?: boolean;
|
|
54
61
|
}
|
|
55
62
|
|
|
@@ -207,6 +214,7 @@
|
|
|
207
214
|
></span>
|
|
208
215
|
</div>
|
|
209
216
|
|
|
217
|
+
<!-- The Doctor's mark: a badge on the tile's bottom-right, clear of the ports, the gear and the top edge. -->
|
|
210
218
|
<NodeProblemMark />
|
|
211
219
|
|
|
212
220
|
<!-- Processing indicator -->
|
|
@@ -224,7 +232,12 @@
|
|
|
224
232
|
{/if}
|
|
225
233
|
|
|
226
234
|
<!-- Config button -->
|
|
227
|
-
|
|
235
|
+
<!-- Above the square, as on TerminalNode: the corners carry the ports. -->
|
|
236
|
+
<NodeConfigButton
|
|
237
|
+
onclick={openConfigSidebar}
|
|
238
|
+
title={m().nodes.configure}
|
|
239
|
+
placement="top-center"
|
|
240
|
+
/>
|
|
228
241
|
</div>
|
|
229
242
|
</div>
|
|
230
243
|
|
|
@@ -322,6 +335,23 @@
|
|
|
322
335
|
background-color: var(--fd-error-muted) !important;
|
|
323
336
|
}
|
|
324
337
|
|
|
338
|
+
/* The Doctor's mark, centred at the top of the square just below the gear that
|
|
339
|
+
floats above it (as on TerminalNode): in the middle of the band between the
|
|
340
|
+
square's edge and the 48px icon tile. A disc in the card colour keeps it
|
|
341
|
+
legible where it meets the border. */
|
|
342
|
+
.flowdrop-square-node__square :global(.fd-node-problem) {
|
|
343
|
+
position: absolute;
|
|
344
|
+
top: calc((16px - var(--fd-node-problem-size)) / 2);
|
|
345
|
+
left: 50%;
|
|
346
|
+
right: auto;
|
|
347
|
+
translate: -50% 0;
|
|
348
|
+
transform-origin: top center;
|
|
349
|
+
z-index: 2;
|
|
350
|
+
border-radius: var(--fd-radius-full);
|
|
351
|
+
background: var(--fd-node-bg);
|
|
352
|
+
outline: 1px solid var(--fd-node-bg);
|
|
353
|
+
}
|
|
354
|
+
|
|
325
355
|
/* Compact layout styles */
|
|
326
356
|
.flowdrop-square-node__compact-content {
|
|
327
357
|
display: flex;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { ConfigValues, NodeMetadata, NodeExtensions } from '../../types/index.js';
|
|
2
2
|
interface Props {
|
|
3
|
+
/** The node's id on the canvas. */
|
|
3
4
|
id: string;
|
|
5
|
+
/** The node: label, config (`ports`, dynamic ports) and node type. */
|
|
4
6
|
data: {
|
|
5
7
|
label: string;
|
|
6
8
|
config: ConfigValues;
|
|
@@ -16,10 +18,25 @@ interface Props {
|
|
|
16
18
|
};
|
|
17
19
|
}) => void;
|
|
18
20
|
};
|
|
21
|
+
/** Whether the node is selected. A selected node draws its selection border and keeps the config gear visible. */
|
|
19
22
|
selected?: boolean;
|
|
23
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
20
24
|
isProcessing?: boolean;
|
|
25
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
21
26
|
isError?: boolean;
|
|
22
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* A square node that shows only its icon, with the ports on its edges.
|
|
30
|
+
*
|
|
31
|
+
* Port rendering:
|
|
32
|
+
* - Exposure (`data.config.ports`, falling back to each port's `exposedByDefault`) decides
|
|
33
|
+
* which ports render. A port that is not exposed is hidden.
|
|
34
|
+
* - Order: `data.config.ports` overrides the metadata default (`displayOrder`); ports it does
|
|
35
|
+
* not list follow in the default order.
|
|
36
|
+
*
|
|
37
|
+
* **Use it for** a node type that declares `type: "square"`, where the icon says enough.
|
|
38
|
+
* **Not for** a node that needs a title or a description; use `WorkflowNode`.
|
|
39
|
+
*/
|
|
23
40
|
declare const SquareNode: import("svelte").Component<Props, {}, "">;
|
|
24
41
|
type SquareNode = ReturnType<typeof SquareNode>;
|
|
25
42
|
export default SquareNode;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
A
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
-
|
|
8
|
-
|
|
2
|
+
@component
|
|
3
|
+
A circle for a workflow's start, end or exit.
|
|
4
|
+
|
|
5
|
+
The variant comes from `config.variant`, then from the node type's tags, then from its
|
|
6
|
+
id or name:
|
|
7
|
+
- start: green with a play icon, output only.
|
|
8
|
+
- end: grey with a stop icon, input only.
|
|
9
|
+
- exit: red with a cross, input only. For an early stop, for example on an error.
|
|
10
|
+
|
|
11
|
+
**Use it for** a node type that declares `type: "terminal"`.
|
|
12
|
+
**Not for** a step in the middle of a flow; use `WorkflowNode`.
|
|
9
13
|
-->
|
|
10
14
|
|
|
11
15
|
<script lang="ts">
|
|
@@ -79,7 +83,9 @@
|
|
|
79
83
|
};
|
|
80
84
|
|
|
81
85
|
interface Props {
|
|
86
|
+
/** The node's id on the canvas. */
|
|
82
87
|
id: string;
|
|
88
|
+
/** The node: label, config (`variant`) and node type. */
|
|
83
89
|
data: {
|
|
84
90
|
label: string;
|
|
85
91
|
config: ConfigValues;
|
|
@@ -91,8 +97,11 @@
|
|
|
91
97
|
data: { label: string; config: ConfigValues; metadata: NodeMetadata };
|
|
92
98
|
}) => void;
|
|
93
99
|
};
|
|
100
|
+
/** Whether the node is selected. A selected node draws its selection border and keeps the config gear visible. */
|
|
94
101
|
selected?: boolean;
|
|
102
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
95
103
|
isProcessing?: boolean;
|
|
104
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
96
105
|
isError?: boolean;
|
|
97
106
|
}
|
|
98
107
|
|
|
@@ -594,15 +603,20 @@
|
|
|
594
603
|
color: var(--fd-node-terminal-icon-color, var(--fd-node-icon));
|
|
595
604
|
}
|
|
596
605
|
|
|
597
|
-
/* The Doctor's glyph, at the
|
|
606
|
+
/* The Doctor's glyph, centred at the top of the circle, just below the gear that
|
|
607
|
+
floats above it: in the middle of the band between the circle's edge and the
|
|
608
|
+
44px icon tile. */
|
|
598
609
|
.flowdrop-terminal-node__circle-wrapper {
|
|
599
|
-
--_pm-inset: calc(var(--_d)
|
|
610
|
+
--_pm-inset: calc(((var(--_d) - 44px) / 2 - var(--fd-node-problem-size)) / 2);
|
|
600
611
|
}
|
|
601
612
|
|
|
602
613
|
.flowdrop-terminal-node__circle-wrapper > :global(.fd-node-problem) {
|
|
603
614
|
position: absolute;
|
|
604
615
|
top: var(--_pm-inset);
|
|
605
|
-
|
|
616
|
+
left: 50%;
|
|
617
|
+
right: auto;
|
|
618
|
+
translate: -50% 0;
|
|
619
|
+
transform-origin: top center;
|
|
606
620
|
z-index: 31;
|
|
607
621
|
}
|
|
608
622
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { ConfigValues, NodeMetadata, NodeExtensions } from '../../types/index.js';
|
|
2
2
|
interface Props {
|
|
3
|
+
/** The node's id on the canvas. */
|
|
3
4
|
id: string;
|
|
5
|
+
/** The node: label, config (`variant`) and node type. */
|
|
4
6
|
data: {
|
|
5
7
|
label: string;
|
|
6
8
|
config: ConfigValues;
|
|
@@ -16,10 +18,25 @@ interface Props {
|
|
|
16
18
|
};
|
|
17
19
|
}) => void;
|
|
18
20
|
};
|
|
21
|
+
/** Whether the node is selected. A selected node draws its selection border and keeps the config gear visible. */
|
|
19
22
|
selected?: boolean;
|
|
23
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
20
24
|
isProcessing?: boolean;
|
|
25
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
21
26
|
isError?: boolean;
|
|
22
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* A circle for a workflow's start, end or exit.
|
|
30
|
+
*
|
|
31
|
+
* The variant comes from `config.variant`, then from the node type's tags, then from its
|
|
32
|
+
* id or name:
|
|
33
|
+
* - start: green with a play icon, output only.
|
|
34
|
+
* - end: grey with a stop icon, input only.
|
|
35
|
+
* - exit: red with a cross, input only. For an early stop, for example on an error.
|
|
36
|
+
*
|
|
37
|
+
* **Use it for** a node type that declares `type: "terminal"`.
|
|
38
|
+
* **Not for** a step in the middle of a flow; use `WorkflowNode`.
|
|
39
|
+
*/
|
|
23
40
|
declare const TerminalNode: import("svelte").Component<Props, {}, "">;
|
|
24
41
|
type TerminalNode = ReturnType<typeof TerminalNode>;
|
|
25
42
|
export default TerminalNode;
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
A
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
tool colour
|
|
2
|
+
@component
|
|
3
|
+
A node an agent can call, drawn on the shared card.
|
|
4
|
+
|
|
5
|
+
It has the same header as `WorkflowNode` (see `NodeCard`), with the tool's badge and
|
|
6
|
+
version on the kind line and a wash in the tool colour. Its tool ports (those of
|
|
7
|
+
`metadata.portDataType`, default `tool`) are one row.
|
|
8
|
+
|
|
9
|
+
**Use it for** a node type that declares `type: "tool"`.
|
|
10
|
+
**Not for** a node that only has ordinary data ports; use `WorkflowNode`.
|
|
7
11
|
-->
|
|
8
12
|
|
|
9
13
|
<script lang="ts">
|
|
@@ -20,7 +24,9 @@
|
|
|
20
24
|
}
|
|
21
25
|
|
|
22
26
|
interface Props {
|
|
27
|
+
/** The node's id on the canvas. */
|
|
23
28
|
id: string;
|
|
29
|
+
/** The node: label, config (tool name, description, version, parameters) and node type. */
|
|
24
30
|
data: {
|
|
25
31
|
label: string;
|
|
26
32
|
config: ConfigValues & {
|
|
@@ -42,8 +48,11 @@
|
|
|
42
48
|
};
|
|
43
49
|
}) => void;
|
|
44
50
|
};
|
|
51
|
+
/** Whether the node is selected. A selected node draws its selection border and keeps the config gear visible. */
|
|
45
52
|
selected?: boolean;
|
|
53
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
46
54
|
isProcessing?: boolean;
|
|
55
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
47
56
|
isError?: boolean;
|
|
48
57
|
}
|
|
49
58
|
|
|
@@ -5,7 +5,9 @@ interface ToolNodeParameter {
|
|
|
5
5
|
description?: string;
|
|
6
6
|
}
|
|
7
7
|
interface Props {
|
|
8
|
+
/** The node's id on the canvas. */
|
|
8
9
|
id: string;
|
|
10
|
+
/** The node: label, config (tool name, description, version, parameters) and node type. */
|
|
9
11
|
data: {
|
|
10
12
|
label: string;
|
|
11
13
|
config: ConfigValues & {
|
|
@@ -27,10 +29,23 @@ interface Props {
|
|
|
27
29
|
};
|
|
28
30
|
}) => void;
|
|
29
31
|
};
|
|
32
|
+
/** Whether the node is selected. A selected node draws its selection border and keeps the config gear visible. */
|
|
30
33
|
selected?: boolean;
|
|
34
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
31
35
|
isProcessing?: boolean;
|
|
36
|
+
/** Not passed by the editor: run state is drawn by `NodeStatusOverlay`. */
|
|
32
37
|
isError?: boolean;
|
|
33
38
|
}
|
|
39
|
+
/**
|
|
40
|
+
* A node an agent can call, drawn on the shared card.
|
|
41
|
+
*
|
|
42
|
+
* It has the same header as `WorkflowNode` (see `NodeCard`), with the tool's badge and
|
|
43
|
+
* version on the kind line and a wash in the tool colour. Its tool ports (those of
|
|
44
|
+
* `metadata.portDataType`, default `tool`) are one row.
|
|
45
|
+
*
|
|
46
|
+
* **Use it for** a node type that declares `type: "tool"`.
|
|
47
|
+
* **Not for** a node that only has ordinary data ports; use `WorkflowNode`.
|
|
48
|
+
*/
|
|
34
49
|
declare const ToolNode: import("svelte").Component<Props, {}, "">;
|
|
35
50
|
type ToolNode = ReturnType<typeof ToolNode>;
|
|
36
51
|
export default ToolNode;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
the width is 280 or 320 and the border is drawn inside the box, so every
|
|
11
|
-
handle centre is a multiple of 20 and any output can meet any input in a
|
|
12
|
-
straight wire. Every handle is placed from the geometry, never from layout.
|
|
2
|
+
@component
|
|
3
|
+
The editor's standard node: a header, then ports as rows. The card the editor draws most.
|
|
4
|
+
|
|
5
|
+
It is the default for any node type that does not name another type, and the fallback for
|
|
6
|
+
one the editor does not know. One fixed geometry (see `NodeCard`): the header is 60 px, the
|
|
7
|
+
completion `trigger` ports are pins in it, every other port is a half-pill on a shared row,
|
|
8
|
+
the width is 280 or 320, and the border is drawn inside the box. Every handle centre
|
|
9
|
+
falls on the 20 px grid, so any output can meet any input in a straight wire.
|
|
13
10
|
|
|
14
11
|
Port rendering:
|
|
15
|
-
- Exposure (data.config.ports
|
|
16
|
-
|
|
17
|
-
- Order: data.config.ports
|
|
18
|
-
|
|
12
|
+
- Exposure (`data.config.ports`, falling back to each port's `exposedByDefault`) decides
|
|
13
|
+
which ports render. A port that is not exposed is hidden.
|
|
14
|
+
- Order: `data.config.ports` overrides the metadata default (`displayOrder`). Cosmetic
|
|
15
|
+
only; it has no effect on execution.
|
|
16
|
+
|
|
17
|
+
**Use it for** most node types. It needs no `type` in the node's metadata.
|
|
18
|
+
**Not for** branching or tools; use `GatewayNode` or `ToolNode`.
|
|
19
19
|
-->
|
|
20
20
|
|
|
21
21
|
<script lang="ts">
|
|
@@ -30,10 +30,13 @@
|
|
|
30
30
|
import { orderPortsFor, isPortVisible } from '../../utils/portUtils.js';
|
|
31
31
|
|
|
32
32
|
interface Props {
|
|
33
|
+
/** The node's id on the canvas. */
|
|
33
34
|
id: string;
|
|
35
|
+
/** The node: label, config (`ports`, dynamic ports, `instanceTitle`) and node type. */
|
|
34
36
|
data: WorkflowNode['data'] & {
|
|
35
37
|
onConfigOpen?: (node: { id: string; type: string; data: WorkflowNode['data'] }) => void;
|
|
36
38
|
};
|
|
39
|
+
/** Whether the node is selected. A selected node draws its selection border and keeps the config gear visible. */
|
|
37
40
|
selected?: boolean;
|
|
38
41
|
}
|
|
39
42
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import type { WorkflowNode } from '../../types/index.js';
|
|
2
2
|
interface Props {
|
|
3
|
+
/** The node's id on the canvas. */
|
|
3
4
|
id: string;
|
|
5
|
+
/** The node: label, config (`ports`, dynamic ports, `instanceTitle`) and node type. */
|
|
4
6
|
data: WorkflowNode['data'] & {
|
|
5
7
|
onConfigOpen?: (node: {
|
|
6
8
|
id: string;
|
|
@@ -8,8 +10,27 @@ interface Props {
|
|
|
8
10
|
data: WorkflowNode['data'];
|
|
9
11
|
}) => void;
|
|
10
12
|
};
|
|
13
|
+
/** Whether the node is selected. A selected node draws its selection border and keeps the config gear visible. */
|
|
11
14
|
selected?: boolean;
|
|
12
15
|
}
|
|
16
|
+
/**
|
|
17
|
+
* The editor's standard node: a header, then ports as rows. The card the editor draws most.
|
|
18
|
+
*
|
|
19
|
+
* It is the default for any node type that does not name another type, and the fallback for
|
|
20
|
+
* one the editor does not know. One fixed geometry (see `NodeCard`): the header is 60 px, the
|
|
21
|
+
* completion `trigger` ports are pins in it, every other port is a half-pill on a shared row,
|
|
22
|
+
* the width is 280 or 320, and the border is drawn inside the box. Every handle centre
|
|
23
|
+
* falls on the 20 px grid, so any output can meet any input in a straight wire.
|
|
24
|
+
*
|
|
25
|
+
* Port rendering:
|
|
26
|
+
* - Exposure (`data.config.ports`, falling back to each port's `exposedByDefault`) decides
|
|
27
|
+
* which ports render. A port that is not exposed is hidden.
|
|
28
|
+
* - Order: `data.config.ports` overrides the metadata default (`displayOrder`). Cosmetic
|
|
29
|
+
* only; it has no effect on execution.
|
|
30
|
+
*
|
|
31
|
+
* **Use it for** most node types. It needs no `type` in the node's metadata.
|
|
32
|
+
* **Not for** branching or tools; use `GatewayNode` or `ToolNode`.
|
|
33
|
+
*/
|
|
13
34
|
declare const WorkflowNode: import("svelte").Component<Props, {}, "">;
|
|
14
35
|
type WorkflowNode = ReturnType<typeof WorkflowNode>;
|
|
15
36
|
export default WorkflowNode;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
@component
|
|
3
|
+
The avatar and bubble layout for user, assistant and system messages. `MessageBubble` picks it.
|
|
4
|
+
|
|
5
|
+
**Use it for** nothing on its own. Render a message with `MessageBubble`.
|
|
5
6
|
-->
|
|
6
7
|
|
|
7
8
|
<script lang="ts">
|
|
@@ -5,6 +5,11 @@ interface Props {
|
|
|
5
5
|
isLast?: boolean;
|
|
6
6
|
enableMarkdown?: boolean;
|
|
7
7
|
}
|
|
8
|
+
/**
|
|
9
|
+
* The avatar and bubble layout for user, assistant and system messages. `MessageBubble` picks it.
|
|
10
|
+
*
|
|
11
|
+
* **Use it for** nothing on its own. Render a message with `MessageBubble`.
|
|
12
|
+
*/
|
|
8
13
|
declare const ChatBubble: import("svelte").Component<Props, {}, "">;
|
|
9
14
|
type ChatBubble = ReturnType<typeof ChatBubble>;
|
|
10
15
|
export default ChatBubble;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
2
|
+
@component
|
|
3
|
+
The composer at the bottom of the Playground: a text field with Send, a palette for / commands, or just a Run button
|
|
4
|
+
when the workflow has no chat. While a run is going it shows Stop.
|
|
3
5
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
(orchestration controls).
|
|
6
|
+
Reads the run state from the instance and sends through `onSendMessage` or `onRunWorkflow`. When the workflow has
|
|
7
|
+
unsaved edits, the button reads "Save & send" and `beforeSend` runs first.
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
9
|
+
**Use it for** typing to a workflow or starting a run.
|
|
10
|
+
**Not for** forms with several inputs (use `InterfaceInputForm`).
|
|
10
11
|
-->
|
|
11
12
|
|
|
12
13
|
<script lang="ts">
|
|
@@ -29,6 +30,7 @@
|
|
|
29
30
|
const fd = getInstance();
|
|
30
31
|
|
|
31
32
|
interface Props {
|
|
33
|
+
/** Text shown in the empty field. */
|
|
32
34
|
placeholder?: string;
|
|
33
35
|
/** Show the textarea (default: true). When false, only the Run button is shown. */
|
|
34
36
|
showTextarea?: boolean;
|
|
@@ -43,7 +45,9 @@
|
|
|
43
45
|
* Leaving it unset is what lets Run launch without fabricating a turn.
|
|
44
46
|
*/
|
|
45
47
|
predefinedMessage?: string;
|
|
48
|
+
/** Send the typed text as a chat turn. */
|
|
46
49
|
onSendMessage?: (content: string) => void;
|
|
50
|
+
/** Stop the run in progress (the Stop button). */
|
|
47
51
|
onStopExecution?: () => void;
|
|
48
52
|
/**
|
|
49
53
|
* Start a run without posting a chat message.
|
|
@@ -73,6 +77,7 @@
|
|
|
73
77
|
enableCommands?: boolean;
|
|
74
78
|
/** Transient result of the last slash command. Never a session message. */
|
|
75
79
|
commandFeedback?: CommandOutcome | null;
|
|
80
|
+
/** Close the command feedback line. */
|
|
76
81
|
onDismissCommandFeedback?: () => void;
|
|
77
82
|
/**
|
|
78
83
|
* The first send creates the session, so typing and sending are allowed
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type CommandOutcome } from '../../playground/commands/index.js';
|
|
2
2
|
interface Props {
|
|
3
|
+
/** Text shown in the empty field. */
|
|
3
4
|
placeholder?: string;
|
|
4
5
|
/** Show the textarea (default: true). When false, only the Run button is shown. */
|
|
5
6
|
showTextarea?: boolean;
|
|
@@ -14,7 +15,9 @@ interface Props {
|
|
|
14
15
|
* Leaving it unset is what lets Run launch without fabricating a turn.
|
|
15
16
|
*/
|
|
16
17
|
predefinedMessage?: string;
|
|
18
|
+
/** Send the typed text as a chat turn. */
|
|
17
19
|
onSendMessage?: (content: string) => void;
|
|
20
|
+
/** Stop the run in progress (the Stop button). */
|
|
18
21
|
onStopExecution?: () => void;
|
|
19
22
|
/**
|
|
20
23
|
* Start a run without posting a chat message.
|
|
@@ -44,6 +47,7 @@ interface Props {
|
|
|
44
47
|
enableCommands?: boolean;
|
|
45
48
|
/** Transient result of the last slash command. Never a session message. */
|
|
46
49
|
commandFeedback?: CommandOutcome | null;
|
|
50
|
+
/** Close the command feedback line. */
|
|
47
51
|
onDismissCommandFeedback?: () => void;
|
|
48
52
|
/**
|
|
49
53
|
* The first send creates the session, so typing and sending are allowed
|
|
@@ -63,6 +67,16 @@ interface Props {
|
|
|
63
67
|
*/
|
|
64
68
|
saveFirst?: boolean;
|
|
65
69
|
}
|
|
70
|
+
/**
|
|
71
|
+
* The composer at the bottom of the Playground: a text field with Send, a palette for / commands, or just a Run button
|
|
72
|
+
* when the workflow has no chat. While a run is going it shows Stop.
|
|
73
|
+
*
|
|
74
|
+
* Reads the run state from the instance and sends through `onSendMessage` or `onRunWorkflow`. When the workflow has
|
|
75
|
+
* unsaved edits, the button reads "Save & send" and `beforeSend` runs first.
|
|
76
|
+
*
|
|
77
|
+
* **Use it for** typing to a workflow or starting a run.
|
|
78
|
+
* **Not for** forms with several inputs (use `InterfaceInputForm`).
|
|
79
|
+
*/
|
|
66
80
|
declare const ChatInput: import("svelte").Component<Props, {}, "">;
|
|
67
81
|
type ChatInput = ReturnType<typeof ChatInput>;
|
|
68
82
|
export default ChatInput;
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
2
|
+
@component
|
|
3
|
+
**Exported for host apps; the editor does not render it.** A ready-made chat panel; the editor's Test mode uses `DockedPlayground` instead.
|
|
4
|
+
It shows the message feed above a text box with send and stop buttons. The user sees it only where a host app mounts it from the public API.
|
|
3
5
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
send/run/stop). Use this for chat-style agent interactions.
|
|
7
|
-
|
|
8
|
-
For view-only execution surfaces, use the MessageStream primitive directly.
|
|
9
|
-
Log visibility is managed by the playground store (fd.playground.setShowLogs).
|
|
6
|
+
**Use it for** a simple chat-style agent conversation in a host app that does not use the editor.
|
|
7
|
+
**Not for** a read-only view of a run; use `MessageStream` for that.
|
|
10
8
|
-->
|
|
11
9
|
|
|
12
10
|
<script lang="ts">
|
|
@@ -16,17 +14,27 @@
|
|
|
16
14
|
import { m } from '../../messages/index.js';
|
|
17
15
|
|
|
18
16
|
interface Props {
|
|
17
|
+
/** Show a time on each message. Default: true. */
|
|
19
18
|
showTimestamps?: boolean;
|
|
19
|
+
/** Keep the feed scrolled to the newest message. Default: true. */
|
|
20
20
|
autoScroll?: boolean;
|
|
21
|
+
/** Text shown in the empty input box. Default: the built-in message. */
|
|
21
22
|
placeholder?: string;
|
|
23
|
+
/** Called with the text when the user sends a message. */
|
|
22
24
|
onSendMessage?: (content: string) => void;
|
|
25
|
+
/** Called when the user presses Stop during a run. */
|
|
23
26
|
onStopExecution?: () => void;
|
|
27
|
+
/** Show log messages in the feed. Default: false. */
|
|
24
28
|
showLogsInline?: boolean;
|
|
29
|
+
/** Render message text as Markdown. Default: true. */
|
|
25
30
|
enableMarkdown?: boolean;
|
|
31
|
+
/** Called after the user answers a question the flow asked mid-run. */
|
|
26
32
|
onInterruptResolved?: () => void;
|
|
27
33
|
/** Render a "New session" CTA in the welcome state */
|
|
28
34
|
onCreateSession?: () => void;
|
|
35
|
+
/** Text to put in the input box before the user types. Default: none. */
|
|
29
36
|
predefinedMessage?: string;
|
|
37
|
+
/** Show system messages in a smaller, quieter style. Default: true. */
|
|
30
38
|
compactSystemMessages?: boolean;
|
|
31
39
|
}
|
|
32
40
|
|
|
@@ -1,17 +1,34 @@
|
|
|
1
1
|
interface Props {
|
|
2
|
+
/** Show a time on each message. Default: true. */
|
|
2
3
|
showTimestamps?: boolean;
|
|
4
|
+
/** Keep the feed scrolled to the newest message. Default: true. */
|
|
3
5
|
autoScroll?: boolean;
|
|
6
|
+
/** Text shown in the empty input box. Default: the built-in message. */
|
|
4
7
|
placeholder?: string;
|
|
8
|
+
/** Called with the text when the user sends a message. */
|
|
5
9
|
onSendMessage?: (content: string) => void;
|
|
10
|
+
/** Called when the user presses Stop during a run. */
|
|
6
11
|
onStopExecution?: () => void;
|
|
12
|
+
/** Show log messages in the feed. Default: false. */
|
|
7
13
|
showLogsInline?: boolean;
|
|
14
|
+
/** Render message text as Markdown. Default: true. */
|
|
8
15
|
enableMarkdown?: boolean;
|
|
16
|
+
/** Called after the user answers a question the flow asked mid-run. */
|
|
9
17
|
onInterruptResolved?: () => void;
|
|
10
18
|
/** Render a "New session" CTA in the welcome state */
|
|
11
19
|
onCreateSession?: () => void;
|
|
20
|
+
/** Text to put in the input box before the user types. Default: none. */
|
|
12
21
|
predefinedMessage?: string;
|
|
22
|
+
/** Show system messages in a smaller, quieter style. Default: true. */
|
|
13
23
|
compactSystemMessages?: boolean;
|
|
14
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* **Exported for host apps; the editor does not render it.** A ready-made chat panel; the editor's Test mode uses `DockedPlayground` instead.
|
|
27
|
+
* It shows the message feed above a text box with send and stop buttons. The user sees it only where a host app mounts it from the public API.
|
|
28
|
+
*
|
|
29
|
+
* **Use it for** a simple chat-style agent conversation in a host app that does not use the editor.
|
|
30
|
+
* **Not for** a read-only view of a run; use `MessageStream` for that.
|
|
31
|
+
*/
|
|
15
32
|
declare const ChatPanel: import("svelte").Component<Props, {}, "">;
|
|
16
33
|
type ChatPanel = ReturnType<typeof ChatPanel>;
|
|
17
34
|
export default ChatPanel;
|