@flowdrop/flowdrop 2.12.0 → 2.14.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 +54 -0
- package/dist/commands/executor.js +58 -8
- package/dist/commands/parser.js +3 -3
- package/dist/commands/types.d.ts +2 -0
- package/dist/components/App.svelte +11 -1
- package/dist/components/App.svelte.d.ts +9 -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 +9 -17
- package/dist/components/ConfigForm.svelte.d.ts +10 -0
- 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/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 +15 -11
- package/dist/components/playground/DockedPlayground.svelte.d.ts +16 -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 +1 -1
- package/dist/core/index.js +1 -1
- package/dist/editor/index.d.ts +1 -0
- 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/playground/index.d.ts +1 -1
- 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.js +24 -7
- 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 +10 -1
- package/dist/svelte-app.js +2 -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/index.d.ts +7 -0
- package/dist/types/playground.d.ts +9 -0
- package/dist/types/settings.d.ts +6 -2
- package/dist/types/theme.d.ts +6 -2
- 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
|
@@ -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;
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
2
|
+
@component
|
|
3
|
+
The part of the Playground where the user talks to the flow.
|
|
4
|
+
The user sees it at the bottom of the Playground (on top for a form-first workflow). It holds the session switcher, the text box with Run and Stop, and the toolbar buttons (Pipeline, Refresh, Logs). It reuses `ChatInput` for typing.
|
|
3
5
|
|
|
4
|
-
|
|
5
|
-
(Run/Stop via ChatInput), and toolbar buttons (Pipeline toggle, Refresh,
|
|
6
|
-
Logs). Owns the session chip popover; delegates input behaviour to the
|
|
7
|
-
shared ChatInput primitive.
|
|
6
|
+
A workflow with inputs but no chat shows the inputs form (`InterfaceInputForm`) with its own Run button and no text box. With a chat as well, the inputs fold into one row above the text box that opens the same form.
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
composer. With a chat as well, the inputs fold into one row above the
|
|
12
|
-
composer that opens the same card.
|
|
8
|
+
**Use it for** sending messages, starting runs and managing sessions in the Playground.
|
|
9
|
+
**Not for** showing what the flow says back; use `ExecutionConsole` instead.
|
|
13
10
|
-->
|
|
14
11
|
|
|
15
12
|
<script lang="ts">
|
|
@@ -29,12 +26,18 @@
|
|
|
29
26
|
|
|
30
27
|
interface Props {
|
|
31
28
|
// Session management
|
|
29
|
+
/** Called when the user asks for a new session. */
|
|
32
30
|
onCreateSession: () => void;
|
|
31
|
+
/** Called with the session id when the user picks a session. */
|
|
33
32
|
onSelectSession: (id: string) => void;
|
|
33
|
+
/** Called with the session id when the user deletes a session. */
|
|
34
34
|
onDeleteSession: (id: string) => void;
|
|
35
|
+
/** Called with the session id after a switch, so a host can update its URL. */
|
|
35
36
|
onSessionNavigate?: (id: string) => void;
|
|
36
37
|
// Orchestration
|
|
38
|
+
/** Called with the text when the user sends a message. */
|
|
37
39
|
onSendMessage: (content: string) => void;
|
|
40
|
+
/** Called when the user presses Stop during a run. */
|
|
38
41
|
onStopExecution: () => void;
|
|
39
42
|
/** Start a run without posting a chat message. See ChatInput. */
|
|
40
43
|
onRunWorkflow?: () => void;
|
|
@@ -49,17 +52,27 @@
|
|
|
49
52
|
*/
|
|
50
53
|
enableCommands?: boolean;
|
|
51
54
|
// Slash-command feedback (transient; never a session message)
|
|
55
|
+
/** The result of the last slash command, shown briefly. Default: none. */
|
|
52
56
|
commandFeedback?: CommandOutcome | null;
|
|
57
|
+
/** Called when the user closes the slash-command result. */
|
|
53
58
|
onDismissCommandFeedback?: () => void;
|
|
54
59
|
// Header actions
|
|
60
|
+
/** Called when the user presses the Pipeline button. */
|
|
55
61
|
onTogglePanel?: () => void;
|
|
62
|
+
/** Whether the pipeline panel is open, so the button looks pressed. Default: false. */
|
|
56
63
|
isPipelinePanelOpen?: boolean;
|
|
64
|
+
/** Called when the user presses Refresh. */
|
|
57
65
|
onRefresh: () => void;
|
|
66
|
+
/** Show the Refresh button as busy. Default: false. */
|
|
58
67
|
isRefreshing?: boolean;
|
|
59
68
|
// Input config
|
|
69
|
+
/** Show the text box. Default: true. */
|
|
60
70
|
showChatInput?: boolean;
|
|
71
|
+
/** Show the Run button. Default: true. */
|
|
61
72
|
showRunButton?: boolean;
|
|
73
|
+
/** Text to put in the text box before the user types. Default: none. */
|
|
62
74
|
predefinedMessage?: string;
|
|
75
|
+
/** Text shown in the empty text box. Default: the built-in message. */
|
|
63
76
|
placeholder?: string;
|
|
64
77
|
/**
|
|
65
78
|
* Interface inputs to collect in a form above the composer (inputs
|
|
@@ -78,8 +91,11 @@
|
|
|
78
91
|
/** Called with the complete form values on every change. */
|
|
79
92
|
onFormChange?: (values: Record<string, unknown>) => void;
|
|
80
93
|
// Session UI config
|
|
94
|
+
/** Show the session header row. Default: true. */
|
|
81
95
|
showSessionHeader?: boolean;
|
|
96
|
+
/** Show the New session button in the header. Default: true. */
|
|
82
97
|
showNewSessionButton?: boolean;
|
|
98
|
+
/** Show the session list in the session menu. Default: true. */
|
|
83
99
|
showSessionList?: boolean;
|
|
84
100
|
/** The first send creates the session: see ChatInput's `sessionOptional`. */
|
|
85
101
|
sessionOptional?: boolean;
|
|
@@ -87,6 +103,7 @@
|
|
|
87
103
|
beforeSend?: () => Promise<boolean>;
|
|
88
104
|
/** Unsaved edits: the button reads "Save & send". See ChatInput. */
|
|
89
105
|
saveFirst?: boolean;
|
|
106
|
+
/** Inline CSS applied to the panel root. Default: none. */
|
|
90
107
|
style?: string;
|
|
91
108
|
}
|
|
92
109
|
|
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
import type { WorkflowInterfaceEntry } from '../../types/index.js';
|
|
2
2
|
import type { CommandOutcome } from '../../playground/commands/index.js';
|
|
3
3
|
interface Props {
|
|
4
|
+
/** Called when the user asks for a new session. */
|
|
4
5
|
onCreateSession: () => void;
|
|
6
|
+
/** Called with the session id when the user picks a session. */
|
|
5
7
|
onSelectSession: (id: string) => void;
|
|
8
|
+
/** Called with the session id when the user deletes a session. */
|
|
6
9
|
onDeleteSession: (id: string) => void;
|
|
10
|
+
/** Called with the session id after a switch, so a host can update its URL. */
|
|
7
11
|
onSessionNavigate?: (id: string) => void;
|
|
12
|
+
/** Called with the text when the user sends a message. */
|
|
8
13
|
onSendMessage: (content: string) => void;
|
|
14
|
+
/** Called when the user presses Stop during a run. */
|
|
9
15
|
onStopExecution: () => void;
|
|
10
16
|
/** Start a run without posting a chat message. See ChatInput. */
|
|
11
17
|
onRunWorkflow?: () => void;
|
|
@@ -19,15 +25,25 @@ interface Props {
|
|
|
19
25
|
* ControlPanel to its own handler should not.
|
|
20
26
|
*/
|
|
21
27
|
enableCommands?: boolean;
|
|
28
|
+
/** The result of the last slash command, shown briefly. Default: none. */
|
|
22
29
|
commandFeedback?: CommandOutcome | null;
|
|
30
|
+
/** Called when the user closes the slash-command result. */
|
|
23
31
|
onDismissCommandFeedback?: () => void;
|
|
32
|
+
/** Called when the user presses the Pipeline button. */
|
|
24
33
|
onTogglePanel?: () => void;
|
|
34
|
+
/** Whether the pipeline panel is open, so the button looks pressed. Default: false. */
|
|
25
35
|
isPipelinePanelOpen?: boolean;
|
|
36
|
+
/** Called when the user presses Refresh. */
|
|
26
37
|
onRefresh: () => void;
|
|
38
|
+
/** Show the Refresh button as busy. Default: false. */
|
|
27
39
|
isRefreshing?: boolean;
|
|
40
|
+
/** Show the text box. Default: true. */
|
|
28
41
|
showChatInput?: boolean;
|
|
42
|
+
/** Show the Run button. Default: true. */
|
|
29
43
|
showRunButton?: boolean;
|
|
44
|
+
/** Text to put in the text box before the user types. Default: none. */
|
|
30
45
|
predefinedMessage?: string;
|
|
46
|
+
/** Text shown in the empty text box. Default: the built-in message. */
|
|
31
47
|
placeholder?: string;
|
|
32
48
|
/**
|
|
33
49
|
* Interface inputs to collect in a form above the composer (inputs
|
|
@@ -45,8 +61,11 @@ interface Props {
|
|
|
45
61
|
formValues?: Record<string, unknown>;
|
|
46
62
|
/** Called with the complete form values on every change. */
|
|
47
63
|
onFormChange?: (values: Record<string, unknown>) => void;
|
|
64
|
+
/** Show the session header row. Default: true. */
|
|
48
65
|
showSessionHeader?: boolean;
|
|
66
|
+
/** Show the New session button in the header. Default: true. */
|
|
49
67
|
showNewSessionButton?: boolean;
|
|
68
|
+
/** Show the session list in the session menu. Default: true. */
|
|
50
69
|
showSessionList?: boolean;
|
|
51
70
|
/** The first send creates the session: see ChatInput's `sessionOptional`. */
|
|
52
71
|
sessionOptional?: boolean;
|
|
@@ -54,8 +73,18 @@ interface Props {
|
|
|
54
73
|
beforeSend?: () => Promise<boolean>;
|
|
55
74
|
/** Unsaved edits: the button reads "Save & send". See ChatInput. */
|
|
56
75
|
saveFirst?: boolean;
|
|
76
|
+
/** Inline CSS applied to the panel root. Default: none. */
|
|
57
77
|
style?: string;
|
|
58
78
|
}
|
|
79
|
+
/**
|
|
80
|
+
* The part of the Playground where the user talks to the flow.
|
|
81
|
+
* The user sees it at the bottom of the Playground (on top for a form-first workflow). It holds the session switcher, the text box with Run and Stop, and the toolbar buttons (Pipeline, Refresh, Logs). It reuses `ChatInput` for typing.
|
|
82
|
+
*
|
|
83
|
+
* A workflow with inputs but no chat shows the inputs form (`InterfaceInputForm`) with its own Run button and no text box. With a chat as well, the inputs fold into one row above the text box that opens the same form.
|
|
84
|
+
*
|
|
85
|
+
* **Use it for** sending messages, starting runs and managing sessions in the Playground.
|
|
86
|
+
* **Not for** showing what the flow says back; use `ExecutionConsole` instead.
|
|
87
|
+
*/
|
|
59
88
|
declare const ControlPanel: import("svelte").Component<Props, {}, "">;
|
|
60
89
|
type ControlPanel = ReturnType<typeof ControlPanel>;
|
|
61
90
|
export default ControlPanel;
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
2
|
+
@component
|
|
3
|
+
The Playground of Test mode: the conversation docked beside the canvas, for the editor's workflow and the instance's
|
|
4
|
+
test session. It has the history header (`PlaygroundHeader`), the conversation and the composer, and no pipeline panel.
|
|
3
5
|
|
|
4
|
-
The
|
|
5
|
-
|
|
6
|
-
session (`fd.runs`). Compact by design: no minimum width and no pipeline
|
|
7
|
-
panel (the canvas shows the run). Its header is two controls: the history
|
|
8
|
-
chip (conversations and runs) and the ⋯ menu (PlaygroundHeader). Built on
|
|
9
|
-
PlaygroundSurface, not on the standalone Playground, so it does not go when
|
|
10
|
-
that one is removed in 3.0.
|
|
6
|
+
The conversation outlives this component. Switching back to Edit unmounts it, the run goes on, and Test finds the
|
|
7
|
+
conversation where it was left.
|
|
11
8
|
|
|
12
|
-
|
|
13
|
-
|
|
9
|
+
**Use it for** the left panel of Test mode.
|
|
10
|
+
**Not for** the standalone Playground page, which is deprecated.
|
|
14
11
|
-->
|
|
15
12
|
|
|
16
13
|
<script lang="ts">
|
|
17
14
|
import type { Snippet } from 'svelte';
|
|
18
15
|
import PlaygroundSurface from './PlaygroundSurface.svelte';
|
|
19
16
|
import type { Workflow } from '../../types/index.js';
|
|
17
|
+
import type { EditorPlaygroundConfig } from '../../types/playground.js';
|
|
20
18
|
|
|
21
19
|
interface Props {
|
|
22
20
|
/** The editor's workflow, live: its unsaved edits are what the next turn runs. */
|
|
@@ -34,9 +32,14 @@
|
|
|
34
32
|
* acting). The editor's own actions for a run go here.
|
|
35
33
|
*/
|
|
36
34
|
menuItems?: Snippet<[{ close: () => void }]>;
|
|
35
|
+
/**
|
|
36
|
+
* How the surface follows a run (`pollingInterval`, `shouldStopPolling`).
|
|
37
|
+
* Forwarded to PlaygroundSurface's `config`; unset, the defaults apply.
|
|
38
|
+
*/
|
|
39
|
+
config?: EditorPlaygroundConfig;
|
|
37
40
|
}
|
|
38
41
|
|
|
39
|
-
let { workflow, onOpenSettings, onSave, menuItems }: Props = $props();
|
|
42
|
+
let { workflow, onOpenSettings, onSave, menuItems, config }: Props = $props();
|
|
40
43
|
</script>
|
|
41
44
|
|
|
42
45
|
<div class="docked-playground" data-testid="docked-playground">
|
|
@@ -50,6 +53,7 @@
|
|
|
50
53
|
sessionOptional
|
|
51
54
|
playgroundSessionsOnly
|
|
52
55
|
historyHeader
|
|
56
|
+
{config}
|
|
53
57
|
{menuItems}
|
|
54
58
|
{onSave}
|
|
55
59
|
{onOpenSettings}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Snippet } from 'svelte';
|
|
2
2
|
import type { Workflow } from '../../types/index.js';
|
|
3
|
+
import type { EditorPlaygroundConfig } from '../../types/playground.js';
|
|
3
4
|
interface Props {
|
|
4
5
|
/** The editor's workflow, live: its unsaved edits are what the next turn runs. */
|
|
5
6
|
workflow: Workflow;
|
|
@@ -18,7 +19,22 @@ interface Props {
|
|
|
18
19
|
menuItems?: Snippet<[{
|
|
19
20
|
close: () => void;
|
|
20
21
|
}]>;
|
|
22
|
+
/**
|
|
23
|
+
* How the surface follows a run (`pollingInterval`, `shouldStopPolling`).
|
|
24
|
+
* Forwarded to PlaygroundSurface's `config`; unset, the defaults apply.
|
|
25
|
+
*/
|
|
26
|
+
config?: EditorPlaygroundConfig;
|
|
21
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* The Playground of Test mode: the conversation docked beside the canvas, for the editor's workflow and the instance's
|
|
30
|
+
* test session. It has the history header (`PlaygroundHeader`), the conversation and the composer, and no pipeline panel.
|
|
31
|
+
*
|
|
32
|
+
* The conversation outlives this component. Switching back to Edit unmounts it, the run goes on, and Test finds the
|
|
33
|
+
* conversation where it was left.
|
|
34
|
+
*
|
|
35
|
+
* **Use it for** the left panel of Test mode.
|
|
36
|
+
* **Not for** the standalone Playground page, which is deprecated.
|
|
37
|
+
*/
|
|
22
38
|
declare const DockedPlayground: import("svelte").Component<Props, {}, "">;
|
|
23
39
|
type DockedPlayground = ReturnType<typeof DockedPlayground>;
|
|
24
40
|
export default DockedPlayground;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
<!--
|
|
2
|
-
|
|
2
|
+
@component
|
|
3
|
+
The running workflow's own output surface.
|
|
4
|
+
The user sees it in the Playground above the input area. It lists the messages the flow sends during a run and shows any question the flow asks (an interrupt) right in the feed. It is not a chat box: what the user types goes through `ControlPanel`.
|
|
3
5
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
execution. This is *not* a chat — it's the console where the flow speaks
|
|
7
|
-
to the user during a run. User-initiated commands live in ControlPanel.
|
|
6
|
+
**Use it for** reading what a run says and answering its questions.
|
|
7
|
+
**Not for** typing messages or starting runs; use `ControlPanel` instead.
|
|
8
8
|
-->
|
|
9
9
|
|
|
10
10
|
<script lang="ts">
|
|
@@ -15,12 +15,17 @@
|
|
|
15
15
|
import { m } from '../../messages/index.js';
|
|
16
16
|
|
|
17
17
|
interface Props {
|
|
18
|
+
/** Show a time on each message. Default: true. */
|
|
18
19
|
showTimestamps?: boolean;
|
|
20
|
+
/** Keep the feed scrolled to the newest message. Default: true. */
|
|
19
21
|
autoScroll?: boolean;
|
|
22
|
+
/** Render message text as Markdown. Default: true. */
|
|
20
23
|
enableMarkdown?: boolean;
|
|
21
24
|
/** Whether log messages can appear when the user toggle is on. Defaults to true for the execution console. */
|
|
22
25
|
allowLogs?: boolean;
|
|
26
|
+
/** Show system messages in a smaller, quieter style. Default: true. */
|
|
23
27
|
compactSystemMessages?: boolean;
|
|
28
|
+
/** Called after the user answers a question the flow asked mid-run. */
|
|
24
29
|
onInterruptResolved?: () => void;
|
|
25
30
|
/** Optional callback that, when provided, shows a "New session" CTA in the welcome state */
|
|
26
31
|
onCreateSession?: () => void;
|
|
@@ -1,10 +1,15 @@
|
|
|
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
|
+
/** Render message text as Markdown. Default: true. */
|
|
4
7
|
enableMarkdown?: boolean;
|
|
5
8
|
/** Whether log messages can appear when the user toggle is on. Defaults to true for the execution console. */
|
|
6
9
|
allowLogs?: boolean;
|
|
10
|
+
/** Show system messages in a smaller, quieter style. Default: true. */
|
|
7
11
|
compactSystemMessages?: boolean;
|
|
12
|
+
/** Called after the user answers a question the flow asked mid-run. */
|
|
8
13
|
onInterruptResolved?: () => void;
|
|
9
14
|
/** Optional callback that, when provided, shows a "New session" CTA in the welcome state */
|
|
10
15
|
onCreateSession?: () => void;
|
|
@@ -23,6 +28,13 @@ interface Props {
|
|
|
23
28
|
/** Adds a "Playground settings" action to the notice. */
|
|
24
29
|
onOpenSettings?: () => void;
|
|
25
30
|
}
|
|
31
|
+
/**
|
|
32
|
+
* The running workflow's own output surface.
|
|
33
|
+
* The user sees it in the Playground above the input area. It lists the messages the flow sends during a run and shows any question the flow asks (an interrupt) right in the feed. It is not a chat box: what the user types goes through `ControlPanel`.
|
|
34
|
+
*
|
|
35
|
+
* **Use it for** reading what a run says and answering its questions.
|
|
36
|
+
* **Not for** typing messages or starting runs; use `ControlPanel` instead.
|
|
37
|
+
*/
|
|
26
38
|
declare const ExecutionConsole: import("svelte").Component<Props, {}, "">;
|
|
27
39
|
type ExecutionConsole = ReturnType<typeof ExecutionConsole>;
|
|
28
40
|
export default ExecutionConsole;
|