@flowdrop/flowdrop 1.15.0 → 2.0.0-beta.10
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 +648 -0
- package/MIGRATION-2.0.md +642 -0
- package/README.md +28 -28
- package/dist/adapters/WorkflowAdapter.d.ts +1 -1
- package/dist/adapters/WorkflowAdapter.js +18 -13
- package/dist/adapters/agentspec/AgentSpecAdapter.js +10 -10
- package/dist/adapters/agentspec/defaultNodeTypes.js +9 -9
- package/dist/api/enhanced-client.js +6 -11
- package/dist/chat/batchFeedback.d.ts +39 -0
- package/dist/chat/batchFeedback.js +51 -0
- package/dist/commands/executor.js +66 -27
- package/dist/commands/storeIntegration.svelte.d.ts +4 -1
- package/dist/commands/storeIntegration.svelte.js +36 -21
- package/dist/commands/types.d.ts +2 -0
- package/dist/commands/types.js +5 -5
- package/dist/components/App.svelte +696 -565
- package/dist/components/App.svelte.d.ts +63 -16
- package/dist/components/Button.stories.svelte +65 -0
- package/dist/components/Button.stories.svelte.d.ts +19 -0
- package/dist/components/Button.svelte +62 -0
- package/dist/components/Button.svelte.d.ts +24 -0
- package/dist/components/CanvasIconButton.svelte +76 -0
- package/dist/components/CanvasIconButton.svelte.d.ts +18 -0
- package/dist/components/ConfigForm.svelte +181 -552
- package/dist/components/ConfigForm.svelte.d.ts +24 -7
- package/dist/components/ConfigModal.svelte +16 -3
- package/dist/components/ConfigPanel.svelte +234 -15
- package/dist/components/ConfigPanel.svelte.d.ts +6 -0
- package/dist/components/ConnectionLine.svelte +4 -2
- package/dist/components/EditorStatusBar.stories.svelte +44 -0
- package/dist/components/EditorStatusBar.stories.svelte.d.ts +27 -0
- package/dist/components/EditorStatusBar.svelte +99 -0
- package/dist/components/EditorStatusBar.svelte.d.ts +15 -0
- package/dist/components/IconButton.svelte +80 -0
- package/dist/components/IconButton.svelte.d.ts +30 -0
- package/dist/components/Input.svelte +74 -0
- package/dist/components/Input.svelte.d.ts +17 -0
- package/dist/components/LogoWordmark.svelte +113 -0
- package/dist/components/LogoWordmark.svelte.d.ts +26 -0
- package/dist/components/Navbar.svelte +78 -64
- package/dist/components/Navbar.svelte.d.ts +3 -0
- package/dist/components/NodeSidebar.svelte +48 -171
- package/dist/components/NodeStatusOverlay.svelte +94 -6
- package/dist/components/NodeSwapPicker.svelte +22 -38
- package/dist/components/PipelineStatus.svelte +22 -68
- package/dist/components/PipelineStatus.svelte.d.ts +3 -0
- package/dist/components/PortCoordinateTracker.svelte +5 -6
- package/dist/components/PortMappingRow.svelte +0 -2
- package/dist/components/SchemaForm.stories.svelte +1 -3
- package/dist/components/SchemaForm.svelte +22 -39
- package/dist/components/SchemaForm.svelte.d.ts +0 -8
- package/dist/components/Select.svelte +53 -0
- package/dist/components/Select.svelte.d.ts +15 -0
- package/dist/components/SettingsModal.svelte +8 -8
- package/dist/components/SettingsPanel.svelte +44 -10
- package/dist/components/SwapMappingEditor.svelte +67 -49
- package/dist/components/SwapMappingEditor.svelte.d.ts +0 -2
- package/dist/components/Textarea.svelte +39 -0
- package/dist/components/Textarea.svelte.d.ts +12 -0
- package/dist/components/ThemeToggle.svelte +15 -94
- package/dist/components/UniversalNode.svelte +45 -11
- package/dist/components/UniversalNode.svelte.d.ts +1 -1
- package/dist/components/WorkflowEditor.svelte +183 -162
- package/dist/components/WorkflowEditor.svelte.d.ts +39 -10
- package/dist/components/chat/AIChatPanel.svelte +99 -90
- package/dist/components/chat/AIChatPanel.svelte.d.ts +0 -4
- package/dist/components/chat/CommandPreview.svelte +2 -1
- package/dist/components/console/CommandConsole.svelte +7 -5
- package/dist/components/console/ConsoleAutocomplete.svelte +11 -12
- package/dist/components/console/ConsoleAutocomplete.svelte.d.ts +6 -0
- package/dist/components/console/ConsoleInput.svelte +18 -9
- package/dist/components/console/ConsoleOutput.svelte +4 -3
- package/dist/components/form/FormArray.svelte +42 -182
- package/dist/components/form/FormArray.svelte.d.ts +2 -1
- package/dist/components/form/FormAutocomplete.svelte +26 -21
- package/dist/components/form/FormCheckboxGroup.svelte +1 -5
- package/dist/components/form/FormCodeEditor.svelte +9 -7
- package/dist/components/form/FormField.svelte +22 -44
- package/dist/components/form/FormFieldLight.svelte +56 -50
- package/dist/components/form/FormFieldLight.svelte.d.ts +12 -0
- package/dist/components/form/FormFieldset.svelte +45 -11
- package/dist/components/form/FormMarkdownEditor.svelte +17 -9
- package/dist/components/form/FormNumberField.svelte +4 -36
- package/dist/components/form/FormPorts.svelte +262 -0
- package/dist/components/form/FormPorts.svelte.d.ts +13 -0
- package/dist/components/form/FormRangeField.svelte +62 -30
- package/dist/components/form/FormSelect.svelte +13 -75
- package/dist/components/form/FormTemplateEditor.svelte +17 -7
- package/dist/components/form/FormTextField.svelte +3 -35
- package/dist/components/form/FormTextarea.svelte +4 -39
- package/dist/components/form/FormToggle.svelte +5 -16
- package/dist/components/form/FormToggle.svelte.d.ts +4 -2
- package/dist/components/form/FormUISchemaRenderer.svelte +3 -1
- package/dist/components/form/resolveFieldType.d.ts +24 -0
- package/dist/components/form/resolveFieldType.js +55 -0
- package/dist/components/form/templateAutocomplete.js +1 -5
- package/dist/components/form/types.d.ts +1 -14
- package/dist/components/icons/CloseIcon.svelte +6 -0
- package/dist/components/icons/CloseIcon.svelte.d.ts +26 -0
- package/dist/components/icons/CommandLineIcon.svelte +15 -0
- package/dist/components/icons/CommandLineIcon.svelte.d.ts +26 -0
- package/dist/components/icons/MenuIcon.svelte +4 -0
- package/dist/components/icons/MenuIcon.svelte.d.ts +26 -0
- package/dist/components/icons/MenuOpenIcon.svelte +6 -0
- package/dist/components/icons/MenuOpenIcon.svelte.d.ts +26 -0
- package/dist/components/interrupt/ChoicePrompt.svelte +0 -10
- package/dist/components/interrupt/ConfirmationPrompt.svelte +0 -5
- package/dist/components/interrupt/FormPrompt.svelte +3 -2
- package/dist/components/interrupt/InterruptBubble.svelte +25 -27
- package/dist/components/interrupt/ReviewPrompt.svelte +10 -23
- package/dist/components/interrupt/TextInputPrompt.svelte +2 -7
- package/dist/components/layouts/MainLayout.svelte +24 -18
- package/dist/components/layouts/MainLayout.svelte.d.ts +4 -0
- package/dist/components/nodes/AtomNode.svelte +70 -72
- package/dist/components/nodes/AtomNode.svelte.d.ts +1 -1
- package/dist/components/nodes/GatewayNode.svelte +134 -172
- package/dist/components/nodes/GatewayNode.svelte.d.ts +1 -1
- package/dist/components/nodes/IdeaNode.svelte +79 -98
- package/dist/components/nodes/IdeaNode.svelte.d.ts +8 -4
- package/dist/components/nodes/NodeConfigButton.svelte +86 -0
- package/dist/components/nodes/NodeConfigButton.svelte.d.ts +15 -0
- package/dist/components/nodes/NotesNode.svelte +76 -85
- package/dist/components/nodes/NotesNode.svelte.d.ts +8 -4
- package/dist/components/nodes/SimpleNode.svelte +68 -137
- package/dist/components/nodes/SimpleNode.svelte.d.ts +4 -4
- package/dist/components/nodes/SquareNode.svelte +122 -169
- package/dist/components/nodes/SquareNode.svelte.d.ts +4 -4
- package/dist/components/nodes/TerminalNode.svelte +70 -127
- package/dist/components/nodes/TerminalNode.svelte.d.ts +4 -4
- package/dist/components/nodes/ToolNode.svelte +99 -104
- package/dist/components/nodes/ToolNode.svelte.d.ts +6 -6
- package/dist/components/nodes/WorkflowNode.svelte +145 -195
- package/dist/components/nodes/WorkflowNode.svelte.d.ts +1 -1
- package/dist/components/playground/ChatInput.svelte +11 -15
- package/dist/components/playground/ChatPanel.svelte +6 -49
- package/dist/components/playground/ChatPanel.svelte.d.ts +0 -14
- package/dist/components/playground/ControlPanel.svelte +134 -123
- package/dist/components/playground/ControlPanel.svelte.d.ts +3 -0
- package/dist/components/playground/ExecutionLogs.svelte +11 -9
- package/dist/components/playground/InputCollector.svelte +22 -57
- package/dist/components/playground/MessageStream.svelte +17 -23
- package/dist/components/playground/PipelineKanbanView.svelte +69 -8
- package/dist/components/playground/PipelineKanbanView.svelte.d.ts +2 -0
- package/dist/components/playground/PipelinePanel.svelte +31 -8
- package/dist/components/playground/PipelinePanel.svelte.d.ts +2 -0
- package/dist/components/playground/PipelineTableView.svelte +188 -44
- package/dist/components/playground/PipelineTableView.svelte.d.ts +2 -0
- package/dist/components/playground/Playground.svelte +154 -105
- package/dist/components/playground/Playground.svelte.d.ts +5 -0
- package/dist/components/playground/PlaygroundApp.svelte +12 -2
- package/dist/components/playground/PlaygroundApp.svelte.d.ts +6 -0
- package/dist/components/playground/PlaygroundModal.svelte +18 -3
- package/dist/components/playground/PlaygroundModal.svelte.d.ts +6 -0
- package/dist/components/playground/PlaygroundStudio.svelte +40 -37
- package/dist/components/playground/PlaygroundStudio.svelte.d.ts +6 -0
- package/dist/components/playground/SessionManager.svelte +9 -12
- package/dist/components/playground/pipelineViewUtils.svelte.d.ts +30 -1
- package/dist/components/playground/pipelineViewUtils.svelte.js +40 -3
- package/dist/components/surfaces/SurfaceOverlay.svelte +153 -0
- package/dist/components/surfaces/SurfaceOverlay.svelte.d.ts +14 -0
- package/dist/components/surfaces/TabbedSurface.svelte +133 -0
- package/dist/components/surfaces/TabbedSurface.svelte.d.ts +27 -0
- package/dist/config/endpoints.d.ts +23 -7
- package/dist/config/endpoints.js +30 -10
- package/dist/core/index.d.ts +6 -7
- package/dist/core/index.js +8 -12
- package/dist/display/index.d.ts +6 -3
- package/dist/display/index.js +7 -5
- package/dist/editor/index.d.ts +20 -21
- package/dist/editor/index.js +26 -36
- package/dist/form/code.d.ts +25 -15
- package/dist/form/code.js +44 -41
- package/dist/form/fieldRegistry.d.ts +17 -13
- package/dist/form/fieldRegistry.js +32 -12
- package/dist/form/full.d.ts +19 -14
- package/dist/form/full.js +26 -28
- package/dist/form/index.d.ts +3 -4
- package/dist/form/index.js +6 -5
- package/dist/form/markdown.d.ts +13 -8
- package/dist/form/markdown.js +22 -23
- package/dist/helpers/proximityConnect.d.ts +3 -2
- package/dist/helpers/proximityConnect.js +2 -5
- package/dist/helpers/workflowEditorHelper.d.ts +14 -5
- package/dist/helpers/workflowEditorHelper.js +32 -30
- package/dist/index.d.ts +28 -24
- package/dist/index.js +27 -50
- package/dist/messages/defaults.d.ts +2 -5
- package/dist/messages/defaults.js +3 -6
- package/dist/messages/index.d.ts +1 -2
- package/dist/messages/index.js +1 -2
- package/dist/mocks/app-forms.d.ts +6 -2
- package/dist/mocks/app-forms.js +11 -4
- package/dist/openapi/v1/openapi.yaml +38 -26
- package/dist/playground/index.d.ts +4 -5
- package/dist/playground/index.js +4 -32
- package/dist/playground/mount.d.ts +34 -5
- package/dist/playground/mount.js +58 -24
- package/dist/registry/{BaseRegistry.d.ts → BaseRegistry.svelte.d.ts} +22 -1
- package/dist/registry/{BaseRegistry.js → BaseRegistry.svelte.js} +37 -1
- package/dist/registry/builtinFormats.d.ts +9 -18
- package/dist/registry/builtinFormats.js +9 -39
- package/dist/registry/builtinNodeTypes.d.ts +53 -0
- package/dist/registry/builtinNodeTypes.js +67 -0
- package/dist/registry/builtinNodes.d.ts +2 -64
- package/dist/registry/builtinNodes.js +7 -103
- package/dist/registry/index.d.ts +3 -4
- package/dist/registry/index.js +4 -6
- package/dist/registry/nodeComponentRegistry.d.ts +184 -16
- package/dist/registry/nodeComponentRegistry.js +235 -17
- package/dist/registry/workflowFormatRegistry.d.ts +14 -9
- package/dist/registry/workflowFormatRegistry.js +24 -8
- package/dist/{schema → schemas}/index.d.ts +2 -2
- package/dist/{schema → schemas}/index.js +2 -2
- package/dist/schemas/v1/workflow.schema.json +19 -17
- package/dist/services/agentSpecExecutionService.d.ts +0 -2
- package/dist/services/agentSpecExecutionService.js +0 -3
- package/dist/services/apiVariableService.d.ts +2 -1
- package/dist/services/apiVariableService.js +16 -47
- package/dist/services/autoSaveService.d.ts +7 -0
- package/dist/services/autoSaveService.js +6 -4
- package/dist/services/categoriesApi.js +3 -6
- package/dist/services/chatService.d.ts +9 -4
- package/dist/services/chatService.js +23 -28
- package/dist/services/draftStorage.d.ts +129 -13
- package/dist/services/draftStorage.js +185 -37
- package/dist/services/dynamicSchemaService.d.ts +33 -5
- package/dist/services/dynamicSchemaService.js +67 -55
- package/dist/services/globalSave.d.ts +13 -12
- package/dist/services/globalSave.js +29 -51
- package/dist/services/historyService.d.ts +39 -11
- package/dist/services/historyService.js +60 -18
- package/dist/services/interruptService.d.ts +15 -9
- package/dist/services/interruptService.js +35 -37
- package/dist/services/nodeExecutionService.d.ts +18 -3
- package/dist/services/nodeExecutionService.js +71 -45
- package/dist/services/playgroundService.d.ts +16 -10
- package/dist/services/playgroundService.js +42 -43
- package/dist/services/portConfigApi.js +3 -6
- package/dist/services/settingsService.d.ts +9 -4
- package/dist/services/settingsService.js +23 -12
- package/dist/services/variableService.d.ts +2 -1
- package/dist/services/variableService.js +2 -2
- package/dist/services/workflowStorage.js +6 -6
- package/dist/skins/drafter.d.ts +30 -0
- package/dist/skins/drafter.js +198 -0
- package/dist/skins/index.d.ts +2 -1
- package/dist/skins/index.js +4 -2
- package/dist/stores/apiContext.d.ts +56 -0
- package/dist/stores/apiContext.js +80 -0
- package/dist/stores/categoriesStore.svelte.d.ts +28 -23
- package/dist/stores/categoriesStore.svelte.js +69 -64
- package/dist/stores/getInstance.svelte.d.ts +39 -0
- package/dist/stores/getInstance.svelte.js +65 -0
- package/dist/stores/historyStore.svelte.d.ts +89 -91
- package/dist/stores/historyStore.svelte.js +159 -158
- package/dist/stores/instanceContainer.svelte.d.ts +111 -0
- package/dist/stores/instanceContainer.svelte.js +119 -0
- package/dist/stores/interruptStore.svelte.d.ts +112 -82
- package/dist/stores/interruptStore.svelte.js +253 -226
- package/dist/stores/pipelinePanelStore.svelte.d.ts +27 -3
- package/dist/stores/pipelinePanelStore.svelte.js +61 -14
- package/dist/stores/playgroundStore.svelte.d.ts +169 -222
- package/dist/stores/playgroundStore.svelte.js +513 -580
- package/dist/stores/portCoordinateStore.svelte.d.ts +57 -51
- package/dist/stores/portCoordinateStore.svelte.js +109 -98
- package/dist/stores/settingsStore.svelte.d.ts +17 -1
- package/dist/stores/settingsStore.svelte.js +79 -12
- package/dist/stores/workflowStore.svelte.d.ts +212 -210
- package/dist/stores/workflowStore.svelte.js +527 -502
- package/dist/stories/EdgeDecorator.svelte +5 -2
- package/dist/stories/NodeDecorator.svelte +5 -3
- package/dist/styles/base.css +285 -14
- package/dist/styles/tokens.css +60 -2
- package/dist/svelte-app.d.ts +78 -11
- package/dist/svelte-app.js +210 -141
- package/dist/themes/drafter.d.ts +2 -0
- package/dist/themes/drafter.js +15 -0
- package/dist/themes/index.d.ts +2 -1
- package/dist/themes/index.js +8 -2
- package/dist/types/auth.d.ts +9 -51
- package/dist/types/auth.js +4 -54
- package/dist/types/events.d.ts +24 -3
- package/dist/types/events.js +2 -1
- package/dist/types/index.d.ts +117 -32
- package/dist/types/index.js +0 -1
- package/dist/types/navbar.d.ts +7 -0
- package/dist/types/playground.d.ts +18 -3
- package/dist/types/settings.d.ts +30 -1
- package/dist/types/settings.js +5 -2
- package/dist/types/skin.d.ts +1 -1
- package/dist/types/theme.d.ts +16 -2
- package/dist/types/uischema.d.ts +5 -0
- package/dist/utils/colors.d.ts +74 -21
- package/dist/utils/colors.js +92 -68
- package/dist/utils/connections.d.ts +9 -15
- package/dist/utils/connections.js +33 -88
- package/dist/utils/duration.d.ts +13 -0
- package/dist/utils/duration.js +45 -0
- package/dist/utils/edgeStyling.js +9 -5
- package/dist/utils/fetchWithAuth.d.ts +36 -15
- package/dist/utils/fetchWithAuth.js +53 -23
- package/dist/utils/icons.d.ts +5 -2
- package/dist/utils/icons.js +6 -5
- package/dist/utils/nodeIds.d.ts +1 -1
- package/dist/utils/nodeIds.js +1 -1
- package/dist/utils/nodeSwap.d.ts +6 -2
- package/dist/utils/nodeSwap.js +62 -129
- package/dist/utils/nodeTypes.d.ts +17 -8
- package/dist/utils/nodeTypes.js +27 -20
- package/dist/utils/performanceUtils.js +7 -0
- package/dist/utils/portUtils.d.ts +47 -11
- package/dist/utils/portUtils.js +67 -14
- package/dist/utils/portal.d.ts +18 -0
- package/dist/utils/portal.js +34 -0
- package/dist/utils/schemaMerge.d.ts +25 -0
- package/dist/utils/schemaMerge.js +61 -0
- package/package.json +7 -5
- package/dist/messages/deprecation.d.ts +0 -20
- package/dist/messages/deprecation.js +0 -33
- package/dist/registry/plugin.d.ts +0 -215
- package/dist/registry/plugin.js +0 -249
- package/dist/services/api.d.ts +0 -129
- package/dist/services/api.js +0 -217
|
@@ -4,18 +4,23 @@
|
|
|
4
4
|
import type { UIAction } from '../../commands/types.js';
|
|
5
5
|
import type { EndpointConfig } from '../../config/endpoints.js';
|
|
6
6
|
import { chatService } from '../../services/chatService.js';
|
|
7
|
-
import {
|
|
7
|
+
import { getInstance } from '../../stores/getInstance.svelte.js';
|
|
8
8
|
import { getBehaviorSettings } from '../../stores/settingsStore.svelte.js';
|
|
9
9
|
import { extractCommands } from '../../chat/responseParser.js';
|
|
10
10
|
import { isMutatingCommand } from '../../chat/commandClassifier.js';
|
|
11
11
|
import { parseCommand } from '../../commands/parser.js';
|
|
12
12
|
import { executeCommand } from '../../commands/index.js';
|
|
13
13
|
import { createStoreCommandContext } from '../../commands/storeIntegration.svelte.js';
|
|
14
|
+
import {
|
|
15
|
+
buildRetryFeedback,
|
|
16
|
+
type BatchOutcome,
|
|
17
|
+
type ParseFailure
|
|
18
|
+
} from '../../chat/batchFeedback.js';
|
|
14
19
|
import CommandPreview from './CommandPreview.svelte';
|
|
15
20
|
import MarkdownDisplay from '../MarkdownDisplay.svelte';
|
|
16
21
|
import { tick } from 'svelte';
|
|
17
22
|
import Icon from '@iconify/svelte';
|
|
18
|
-
import { m
|
|
23
|
+
import { m } from '../../messages/index.js';
|
|
19
24
|
|
|
20
25
|
// =========================================================================
|
|
21
26
|
// Internal Display Message Type
|
|
@@ -36,26 +41,17 @@
|
|
|
36
41
|
nodeTypes: NodeMetadata[];
|
|
37
42
|
workflowId?: string;
|
|
38
43
|
onUIAction?: (action: UIAction) => void;
|
|
39
|
-
/**
|
|
40
|
-
* @deprecated since v1.8 — use `messages.chat.placeholder`. Removed in v2.0.
|
|
41
|
-
*/
|
|
42
|
-
placeholder?: string;
|
|
43
44
|
endpointConfig?: EndpointConfig | null;
|
|
44
45
|
}
|
|
45
46
|
|
|
46
|
-
let { nodeTypes, workflowId, onUIAction,
|
|
47
|
+
let { nodeTypes, workflowId, onUIAction, endpointConfig }: Props = $props();
|
|
47
48
|
|
|
48
|
-
|
|
49
|
-
if (placeholder !== undefined) {
|
|
50
|
-
warnDeprecatedProp('AIChatPanel', 'placeholder', 'messages.chat.placeholder');
|
|
51
|
-
}
|
|
49
|
+
const fd = getInstance();
|
|
52
50
|
|
|
53
51
|
// Hoist the chat branch — read in placeholder, header, three welcome states,
|
|
54
52
|
// auto-retry banner, and the send button aria-label.
|
|
55
53
|
const t = $derived(m().chat);
|
|
56
54
|
|
|
57
|
-
const resolvedPlaceholder = $derived(placeholder ?? t.placeholder);
|
|
58
|
-
|
|
59
55
|
// =========================================================================
|
|
60
56
|
// State
|
|
61
57
|
// =========================================================================
|
|
@@ -84,8 +80,8 @@
|
|
|
84
80
|
// =========================================================================
|
|
85
81
|
|
|
86
82
|
$effect(() => {
|
|
87
|
-
|
|
88
|
-
isLoading;
|
|
83
|
+
// Read scroll-relevant state so the effect re-runs when messages change
|
|
84
|
+
const _deps = [displayMessages.length, isLoading];
|
|
89
85
|
tick().then(() => {
|
|
90
86
|
if (messagesElement) {
|
|
91
87
|
messagesElement.scrollTop = messagesElement.scrollHeight;
|
|
@@ -103,7 +99,7 @@
|
|
|
103
99
|
}
|
|
104
100
|
|
|
105
101
|
function getWorkflowState(): unknown {
|
|
106
|
-
const workflow =
|
|
102
|
+
const workflow = fd.workflow.current;
|
|
107
103
|
if (!workflow) return null;
|
|
108
104
|
return {
|
|
109
105
|
nodes: workflow.nodes.map((n) => ({
|
|
@@ -123,7 +119,7 @@
|
|
|
123
119
|
}
|
|
124
120
|
|
|
125
121
|
function getCommandContext() {
|
|
126
|
-
return createStoreCommandContext(nodeTypes, onUIAction);
|
|
122
|
+
return createStoreCommandContext(nodeTypes, onUIAction, fd);
|
|
127
123
|
}
|
|
128
124
|
|
|
129
125
|
// =========================================================================
|
|
@@ -186,28 +182,21 @@
|
|
|
186
182
|
return msg;
|
|
187
183
|
}
|
|
188
184
|
|
|
189
|
-
/**
|
|
185
|
+
/**
|
|
186
|
+
* Execute the parseable commands in a batch one by one with progressive UI
|
|
187
|
+
* feedback.
|
|
188
|
+
*
|
|
189
|
+
* Commands that failed to parse are *isolated* — they stay marked as errors
|
|
190
|
+
* and are skipped, but they no longer abort the whole batch, so the healthy
|
|
191
|
+
* subset still applies (matching the long-standing "applied to a certain
|
|
192
|
+
* extent" expectation). After execution, if anything failed to parse or
|
|
193
|
+
* execute and auto-retry is enabled, specific feedback is sent back so the
|
|
194
|
+
* assistant can resend corrected commands.
|
|
195
|
+
*/
|
|
190
196
|
async function handleApproveCommands(messageIndex: number) {
|
|
191
197
|
const msg = displayMessages[messageIndex];
|
|
192
198
|
if (!msg?.commandPreview) return;
|
|
193
199
|
|
|
194
|
-
// Refuse to run the batch if any command failed to parse. A corrupted batch
|
|
195
|
-
// (e.g. multiline set without """) causes partial execution and can hang the
|
|
196
|
-
// app — rejecting the whole batch is safer than executing the healthy subset.
|
|
197
|
-
const parseErrorCount = msg.commandPreview.filter((c) => c.status === 'error').length;
|
|
198
|
-
if (parseErrorCount > 0) {
|
|
199
|
-
for (const cmd of msg.commandPreview) {
|
|
200
|
-
if (cmd.status === 'pending') {
|
|
201
|
-
cmd.status = 'error';
|
|
202
|
-
cmd.result = 'Batch refused: fix parse errors before executing';
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
appendErrorToHistory(
|
|
206
|
-
`Batch was not executed: ${parseErrorCount} command${parseErrorCount > 1 ? 's have' : ' has'} parse errors. Dismiss this batch and ask the AI to provide corrected commands.`
|
|
207
|
-
);
|
|
208
|
-
return;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
200
|
const context = getCommandContext();
|
|
212
201
|
if (!context) {
|
|
213
202
|
for (const cmd of msg.commandPreview) {
|
|
@@ -220,7 +209,13 @@
|
|
|
220
209
|
return;
|
|
221
210
|
}
|
|
222
211
|
|
|
223
|
-
//
|
|
212
|
+
// Commands that failed to parse (in processResponse) are isolated, not run.
|
|
213
|
+
// Capture their raw text + reason so we can feed specific corrections back.
|
|
214
|
+
const parseErrors: ParseFailure[] = msg.commandPreview
|
|
215
|
+
.filter((c) => c.status === 'error')
|
|
216
|
+
.map((c) => ({ raw: c.raw, error: c.result ?? 'Parse error' }));
|
|
217
|
+
|
|
218
|
+
// Re-parse the pending (parseable) commands, preserving order.
|
|
224
219
|
const pendingItems = msg.commandPreview.filter((c) => c.status === 'pending');
|
|
225
220
|
const parsedCommands: {
|
|
226
221
|
item: CommandPreviewItem;
|
|
@@ -230,23 +225,37 @@
|
|
|
230
225
|
for (const item of pendingItems) {
|
|
231
226
|
const parsed = parseCommand(item.raw);
|
|
232
227
|
if (!parsed.ok) {
|
|
228
|
+
// Re-parse disagreed with processResponse — isolate it like a parse error.
|
|
233
229
|
item.status = 'error';
|
|
234
230
|
item.result = parsed.error;
|
|
235
|
-
|
|
236
|
-
|
|
231
|
+
parseErrors.push({ raw: item.raw, error: parsed.error });
|
|
232
|
+
continue;
|
|
237
233
|
}
|
|
238
234
|
parsedCommands.push({ item, command: parsed.command });
|
|
239
235
|
}
|
|
240
236
|
|
|
241
|
-
// Execute commands one by one inside a single transaction.
|
|
242
|
-
// A 100ms pause between commands lets the canvas visibly update at each step.
|
|
243
237
|
const totalCount = parsedCommands.length;
|
|
238
|
+
|
|
239
|
+
// Nothing parseable to run — feed the parse errors straight back so the
|
|
240
|
+
// assistant can resend a corrected batch.
|
|
241
|
+
if (totalCount === 0) {
|
|
242
|
+
await resolveBatchOutcome({
|
|
243
|
+
completedCount: 0,
|
|
244
|
+
executionError: undefined,
|
|
245
|
+
rolledBack: false,
|
|
246
|
+
parseErrors
|
|
247
|
+
});
|
|
248
|
+
return;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
// Execute the healthy subset one by one inside a single transaction.
|
|
252
|
+
// A 100ms pause between commands lets the canvas visibly update at each step.
|
|
244
253
|
context.dispatch.startTransaction(
|
|
245
254
|
totalCount === 1 ? 'batch: 1 command' : `batch: ${totalCount} commands`
|
|
246
255
|
);
|
|
247
256
|
|
|
248
257
|
let completedCount = 0;
|
|
249
|
-
let
|
|
258
|
+
let executionError: string | undefined;
|
|
250
259
|
|
|
251
260
|
try {
|
|
252
261
|
for (let i = 0; i < parsedCommands.length; i++) {
|
|
@@ -258,7 +267,7 @@
|
|
|
258
267
|
if (!result.ok) {
|
|
259
268
|
item.status = 'error';
|
|
260
269
|
item.result = result.error;
|
|
261
|
-
|
|
270
|
+
executionError = result.error;
|
|
262
271
|
context.dispatch.cancelTransaction();
|
|
263
272
|
break;
|
|
264
273
|
}
|
|
@@ -283,24 +292,48 @@
|
|
|
283
292
|
return;
|
|
284
293
|
}
|
|
285
294
|
|
|
286
|
-
if (
|
|
287
|
-
|
|
295
|
+
if (executionError !== undefined) {
|
|
296
|
+
// An executed command failed — the whole batch is rolled back (atomic,
|
|
297
|
+
// long-standing behaviour). Retry feedback covers both the execution
|
|
298
|
+
// failure and any parse-skipped commands.
|
|
299
|
+
await resolveBatchOutcome({
|
|
300
|
+
completedCount,
|
|
301
|
+
executionError,
|
|
302
|
+
rolledBack: true,
|
|
303
|
+
parseErrors
|
|
304
|
+
});
|
|
288
305
|
return;
|
|
289
306
|
}
|
|
290
307
|
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
308
|
+
// Every parseable command applied — commit so the subset persists.
|
|
309
|
+
context.dispatch.commitTransaction();
|
|
310
|
+
|
|
311
|
+
// If some commands couldn't be parsed, ask the assistant to resend them.
|
|
312
|
+
if (parseErrors.length > 0) {
|
|
313
|
+
await resolveBatchOutcome({
|
|
294
314
|
completedCount,
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
);
|
|
299
|
-
|
|
315
|
+
executionError: undefined,
|
|
316
|
+
rolledBack: false,
|
|
317
|
+
parseErrors
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* After a batch finishes with failures (parse and/or execution), either
|
|
324
|
+
* auto-retry with specific feedback so the assistant can self-correct, or —
|
|
325
|
+
* when auto-retry is off/exhausted — surface the same summary in the log.
|
|
326
|
+
*/
|
|
327
|
+
async function resolveBatchOutcome(outcome: BatchOutcome) {
|
|
328
|
+
const feedback = buildRetryFeedback(outcome);
|
|
329
|
+
const canRetry =
|
|
330
|
+
getBehaviorSettings().chatAutoRetry && !!workflowId && autoRetryCount < MAX_AUTO_RETRIES;
|
|
331
|
+
|
|
332
|
+
if (canRetry) {
|
|
333
|
+
autoRetryCount++;
|
|
334
|
+
await sendMessageInternal(feedback, autoRetryCount);
|
|
300
335
|
} else {
|
|
301
|
-
appendErrorToHistory(
|
|
302
|
-
`Command execution failed at command ${completedCount + 1}/${totalCount}: ${batchError}`
|
|
303
|
-
);
|
|
336
|
+
appendErrorToHistory(feedback);
|
|
304
337
|
}
|
|
305
338
|
}
|
|
306
339
|
|
|
@@ -317,36 +350,6 @@
|
|
|
317
350
|
});
|
|
318
351
|
}
|
|
319
352
|
|
|
320
|
-
/** Build a structured error report from a failed batch for the LLM */
|
|
321
|
-
function buildBatchErrorMessage(
|
|
322
|
-
completedCount: number,
|
|
323
|
-
totalCount: number,
|
|
324
|
-
error: string,
|
|
325
|
-
items: CommandPreviewItem[]
|
|
326
|
-
): string {
|
|
327
|
-
const lines: string[] = [
|
|
328
|
-
`Batch execution failed at command ${completedCount + 1}/${totalCount}: ${error}`
|
|
329
|
-
];
|
|
330
|
-
|
|
331
|
-
if (completedCount > 0) {
|
|
332
|
-
lines.push('\nCommands that succeeded (rolled back):');
|
|
333
|
-
for (let i = 0; i < completedCount; i++) {
|
|
334
|
-
lines.push(` ${i + 1}. ${items[i].raw}`);
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
|
|
338
|
-
lines.push('\nFailed command:');
|
|
339
|
-
lines.push(` ${items[completedCount]?.raw ?? '(unknown)'}`);
|
|
340
|
-
|
|
341
|
-
const remaining = totalCount - completedCount - 1;
|
|
342
|
-
if (remaining > 0) {
|
|
343
|
-
lines.push(`\n${remaining} command(s) were skipped.`);
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
lines.push('\nPlease provide corrected commands to achieve the same goal.');
|
|
347
|
-
return lines.join('\n');
|
|
348
|
-
}
|
|
349
|
-
|
|
350
353
|
// =========================================================================
|
|
351
354
|
// Message Handling
|
|
352
355
|
// =========================================================================
|
|
@@ -366,7 +369,12 @@
|
|
|
366
369
|
history: history.slice(0, -1) // all except current message
|
|
367
370
|
};
|
|
368
371
|
|
|
369
|
-
const response = await chatService.sendMessage(
|
|
372
|
+
const response = await chatService.sendMessage(
|
|
373
|
+
fd.api.config,
|
|
374
|
+
workflowId,
|
|
375
|
+
request,
|
|
376
|
+
fd.api.authProvider
|
|
377
|
+
);
|
|
370
378
|
const displayMsg = processResponse(response.content);
|
|
371
379
|
displayMessages.push(displayMsg);
|
|
372
380
|
} catch (err) {
|
|
@@ -419,7 +427,8 @@
|
|
|
419
427
|
<span>{t.helpBuild}</span>
|
|
420
428
|
</div>
|
|
421
429
|
{/if}
|
|
422
|
-
|
|
430
|
+
<!-- Append-only chat log without stable IDs — index is the identity -->
|
|
431
|
+
{#each displayMessages as message, msgIndex (msgIndex)}
|
|
423
432
|
{#if message.retryAttempt !== undefined}
|
|
424
433
|
<div
|
|
425
434
|
class="ai-chat-panel__retry-notice"
|
|
@@ -440,7 +449,7 @@
|
|
|
440
449
|
{/if}
|
|
441
450
|
{#if message.readOnlyResults && message.readOnlyResults.length > 0}
|
|
442
451
|
<div class="ai-chat-panel__readonly-results">
|
|
443
|
-
{#each message.readOnlyResults as result}
|
|
452
|
+
{#each message.readOnlyResults as result, i (i)}
|
|
444
453
|
<pre class="ai-chat-panel__readonly-result">{result}</pre>
|
|
445
454
|
{/each}
|
|
446
455
|
</div>
|
|
@@ -475,7 +484,7 @@
|
|
|
475
484
|
bind:value={inputValue}
|
|
476
485
|
onkeydown={handleKeydown}
|
|
477
486
|
class="ai-chat-panel__input"
|
|
478
|
-
placeholder={
|
|
487
|
+
placeholder={t.placeholder}
|
|
479
488
|
rows="1"
|
|
480
489
|
disabled={isLoading}
|
|
481
490
|
></textarea>
|
|
@@ -543,7 +552,7 @@
|
|
|
543
552
|
|
|
544
553
|
.ai-chat-panel__messages::-webkit-scrollbar-thumb {
|
|
545
554
|
background: var(--fd-scrollbar-thumb);
|
|
546
|
-
border-radius:
|
|
555
|
+
border-radius: var(--fd-scrollbar-radius);
|
|
547
556
|
}
|
|
548
557
|
|
|
549
558
|
.ai-chat-panel__messages::-webkit-scrollbar-thumb:hover {
|
|
@@ -5,10 +5,6 @@ interface Props {
|
|
|
5
5
|
nodeTypes: NodeMetadata[];
|
|
6
6
|
workflowId?: string;
|
|
7
7
|
onUIAction?: (action: UIAction) => void;
|
|
8
|
-
/**
|
|
9
|
-
* @deprecated since v1.8 — use `messages.chat.placeholder`. Removed in v2.0.
|
|
10
|
-
*/
|
|
11
|
-
placeholder?: string;
|
|
12
8
|
endpointConfig?: EndpointConfig | null;
|
|
13
9
|
}
|
|
14
10
|
declare const AIChatPanel: import("svelte").Component<Props, {}, "">;
|
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
|
|
33
33
|
<div class="command-preview" role="region" aria-label={t.ariaLabel}>
|
|
34
34
|
<div class="command-preview__list">
|
|
35
|
-
|
|
35
|
+
<!-- Fixed positional batch (raw strings may repeat) — index is the identity -->
|
|
36
|
+
{#each commands as command, i (i)}
|
|
36
37
|
<div class="command-preview__item command-preview__item--{command.status}">
|
|
37
38
|
<span class="command-preview__status">
|
|
38
39
|
{#if command.status === 'pending'}
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
type HelpResultData
|
|
21
21
|
} from '../../commands/index.js';
|
|
22
22
|
import { createStoreCommandContext } from '../../commands/storeIntegration.svelte.js';
|
|
23
|
+
import { getInstance } from '../../stores/getInstance.svelte.js';
|
|
23
24
|
import { updateSettings, getUiSettings } from '../../stores/settingsStore.svelte.js';
|
|
24
25
|
import ConsoleInput from './ConsoleInput.svelte';
|
|
25
26
|
import ConsoleOutput, { type ConsoleEntry } from './ConsoleOutput.svelte';
|
|
@@ -41,13 +42,14 @@
|
|
|
41
42
|
|
|
42
43
|
let { nodeTypes, onUIAction }: Props = $props();
|
|
43
44
|
|
|
45
|
+
const fd = getInstance();
|
|
46
|
+
|
|
44
47
|
let outputEntries: ConsoleEntry[] = $state([]);
|
|
45
|
-
let commandContext: CommandContext | null = $state(null);
|
|
46
48
|
|
|
47
|
-
//
|
|
48
|
-
$
|
|
49
|
-
|
|
50
|
-
|
|
49
|
+
// Recreated whenever nodeTypes changes; null while no workflow is loaded
|
|
50
|
+
const commandContext: CommandContext | null = $derived(
|
|
51
|
+
createStoreCommandContext(nodeTypes, onUIAction, fd)
|
|
52
|
+
);
|
|
51
53
|
|
|
52
54
|
/**
|
|
53
55
|
* Attempts to format CommandResult data into a rich display string.
|
|
@@ -6,8 +6,6 @@
|
|
|
6
6
|
-->
|
|
7
7
|
|
|
8
8
|
<script lang="ts">
|
|
9
|
-
import { tick } from 'svelte';
|
|
10
|
-
|
|
11
9
|
export interface Suggestion {
|
|
12
10
|
/** The text to insert into the input */
|
|
13
11
|
value: string;
|
|
@@ -26,9 +24,15 @@
|
|
|
26
24
|
selectedIndex: number;
|
|
27
25
|
/** Called when a suggestion is accepted */
|
|
28
26
|
onAccept: (suggestion: Suggestion) => void;
|
|
27
|
+
/**
|
|
28
|
+
* Listbox element id — supplied by the owning combobox (ConsoleInput) so
|
|
29
|
+
* its aria-controls/aria-activedescendant match, and unique per instance
|
|
30
|
+
* so two FlowDrop editors on one page don't render colliding DOM ids.
|
|
31
|
+
*/
|
|
32
|
+
listboxId: string;
|
|
29
33
|
}
|
|
30
34
|
|
|
31
|
-
let { suggestions, visible, selectedIndex, onAccept }: Props = $props();
|
|
35
|
+
let { suggestions, visible, selectedIndex, onAccept, listboxId }: Props = $props();
|
|
32
36
|
|
|
33
37
|
let listElement: HTMLDivElement | undefined = $state();
|
|
34
38
|
|
|
@@ -43,18 +47,13 @@
|
|
|
43
47
|
</script>
|
|
44
48
|
|
|
45
49
|
{#if visible && suggestions.length > 0}
|
|
46
|
-
<div
|
|
47
|
-
|
|
48
|
-
role="listbox"
|
|
49
|
-
id="console-autocomplete-listbox"
|
|
50
|
-
bind:this={listElement}
|
|
51
|
-
>
|
|
52
|
-
{#each suggestions as suggestion, i}
|
|
50
|
+
<div class="console-autocomplete" role="listbox" id={listboxId} bind:this={listElement}>
|
|
51
|
+
{#each suggestions as suggestion, i (suggestion.value)}
|
|
53
52
|
<div
|
|
54
53
|
class="console-autocomplete__item"
|
|
55
54
|
class:console-autocomplete__item--selected={i === selectedIndex}
|
|
56
55
|
role="option"
|
|
57
|
-
id="
|
|
56
|
+
id="{listboxId}-option-{i}"
|
|
58
57
|
tabindex="-1"
|
|
59
58
|
aria-selected={i === selectedIndex}
|
|
60
59
|
onmousedown={(e: MouseEvent) => {
|
|
@@ -99,7 +98,7 @@
|
|
|
99
98
|
|
|
100
99
|
.console-autocomplete::-webkit-scrollbar-thumb {
|
|
101
100
|
background: var(--fd-scrollbar-thumb);
|
|
102
|
-
border-radius:
|
|
101
|
+
border-radius: var(--fd-scrollbar-radius);
|
|
103
102
|
}
|
|
104
103
|
|
|
105
104
|
.console-autocomplete__item {
|
|
@@ -15,6 +15,12 @@ interface Props {
|
|
|
15
15
|
selectedIndex: number;
|
|
16
16
|
/** Called when a suggestion is accepted */
|
|
17
17
|
onAccept: (suggestion: Suggestion) => void;
|
|
18
|
+
/**
|
|
19
|
+
* Listbox element id — supplied by the owning combobox (ConsoleInput) so
|
|
20
|
+
* its aria-controls/aria-activedescendant match, and unique per instance
|
|
21
|
+
* so two FlowDrop editors on one page don't render colliding DOM ids.
|
|
22
|
+
*/
|
|
23
|
+
listboxId: string;
|
|
18
24
|
}
|
|
19
25
|
declare const ConsoleAutocomplete: import("svelte").Component<Props, {}, "">;
|
|
20
26
|
type ConsoleAutocomplete = ReturnType<typeof ConsoleAutocomplete>;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
<script lang="ts">
|
|
9
9
|
import type { NodeMetadata } from '../../types/index.js';
|
|
10
|
-
import {
|
|
10
|
+
import { getInstance } from '../../stores/getInstance.svelte.js';
|
|
11
11
|
import { toShortId, resolveNode } from '../../commands/index.js';
|
|
12
12
|
import ConsoleAutocomplete, { type Suggestion } from './ConsoleAutocomplete.svelte';
|
|
13
13
|
|
|
@@ -26,6 +26,14 @@
|
|
|
26
26
|
|
|
27
27
|
let { open, nodeTypes = [], onSubmit, onBatchSubmit, onClose }: Props = $props();
|
|
28
28
|
|
|
29
|
+
const fd = getInstance();
|
|
30
|
+
|
|
31
|
+
// Unique per component instance so two FlowDrop editors on one page
|
|
32
|
+
// don't render colliding DOM ids; shared with the autocomplete listbox so
|
|
33
|
+
// aria-controls/aria-activedescendant stay consistent.
|
|
34
|
+
const uid = $props.id();
|
|
35
|
+
const listboxId = `${uid}-console-autocomplete-listbox`;
|
|
36
|
+
|
|
29
37
|
let inputValue = $state('');
|
|
30
38
|
let inputElement: HTMLInputElement | undefined = $state();
|
|
31
39
|
|
|
@@ -94,7 +102,7 @@
|
|
|
94
102
|
* Returns suggestions with short IDs and labels.
|
|
95
103
|
*/
|
|
96
104
|
function getWorkflowNodeSuggestions(prefix: string): Suggestion[] {
|
|
97
|
-
const workflow =
|
|
105
|
+
const workflow = fd.workflow.current;
|
|
98
106
|
if (!workflow) return [];
|
|
99
107
|
|
|
100
108
|
const lowerPrefix = prefix.toLowerCase();
|
|
@@ -207,7 +215,7 @@
|
|
|
207
215
|
partial: string,
|
|
208
216
|
filter: 'input' | 'output' | 'all'
|
|
209
217
|
): Suggestion[] {
|
|
210
|
-
const workflow =
|
|
218
|
+
const workflow = fd.workflow.current;
|
|
211
219
|
if (!workflow) return [];
|
|
212
220
|
|
|
213
221
|
const node = resolveNode(nodeId, workflow.nodes);
|
|
@@ -256,7 +264,7 @@
|
|
|
256
264
|
* Get config key suggestions for a resolved node, filtered by prefix.
|
|
257
265
|
*/
|
|
258
266
|
function getConfigKeySuggestions(nodeId: string, partial: string): Suggestion[] {
|
|
259
|
-
const workflow =
|
|
267
|
+
const workflow = fd.workflow.current;
|
|
260
268
|
if (!workflow) return [];
|
|
261
269
|
|
|
262
270
|
const node = resolveNode(nodeId, workflow.nodes);
|
|
@@ -333,10 +341,10 @@
|
|
|
333
341
|
if (nodeTypeContext !== null) {
|
|
334
342
|
const prefix = nodeTypeContext.toLowerCase();
|
|
335
343
|
return nodeTypes
|
|
336
|
-
.filter((nt) => nt.
|
|
344
|
+
.filter((nt) => nt.node_type_id.toLowerCase().startsWith(prefix))
|
|
337
345
|
.map((nt) => ({
|
|
338
|
-
value: nt.
|
|
339
|
-
label: nt.
|
|
346
|
+
value: nt.node_type_id,
|
|
347
|
+
label: nt.node_type_id,
|
|
340
348
|
detail: `${nt.name} (${nt.category})`
|
|
341
349
|
}))
|
|
342
350
|
.slice(0, 50);
|
|
@@ -657,6 +665,7 @@
|
|
|
657
665
|
visible={acVisible}
|
|
658
666
|
selectedIndex={acSelectedIndex}
|
|
659
667
|
onAccept={acceptSuggestion}
|
|
668
|
+
{listboxId}
|
|
660
669
|
/>
|
|
661
670
|
<input
|
|
662
671
|
bind:this={inputElement}
|
|
@@ -668,9 +677,9 @@
|
|
|
668
677
|
autocomplete="off"
|
|
669
678
|
role="combobox"
|
|
670
679
|
aria-expanded={acVisible}
|
|
671
|
-
aria-controls=
|
|
680
|
+
aria-controls={listboxId}
|
|
672
681
|
aria-activedescendant={acVisible && acSuggestions.length > 0
|
|
673
|
-
?
|
|
682
|
+
? `${listboxId}-option-${acSelectedIndex}`
|
|
674
683
|
: undefined}
|
|
675
684
|
onkeydown={handleKeydown}
|
|
676
685
|
oninput={handleInput}
|
|
@@ -33,7 +33,8 @@
|
|
|
33
33
|
</script>
|
|
34
34
|
|
|
35
35
|
<div class="console-output" bind:this={outputElement} role="log" aria-live="polite">
|
|
36
|
-
|
|
36
|
+
<!-- Append-only log without stable IDs — index is the identity -->
|
|
37
|
+
{#each entries as entry, i (i)}
|
|
37
38
|
<div class="console-output__entry console-output__entry--{entry.type}">
|
|
38
39
|
{#if entry.type === 'input'}
|
|
39
40
|
<span class="console-output__prefix">></span>
|
|
@@ -67,12 +68,12 @@
|
|
|
67
68
|
|
|
68
69
|
.console-output::-webkit-scrollbar-track {
|
|
69
70
|
background: var(--fd-scrollbar-track);
|
|
70
|
-
border-radius:
|
|
71
|
+
border-radius: var(--fd-scrollbar-radius);
|
|
71
72
|
}
|
|
72
73
|
|
|
73
74
|
.console-output::-webkit-scrollbar-thumb {
|
|
74
75
|
background: var(--fd-scrollbar-thumb);
|
|
75
|
-
border-radius:
|
|
76
|
+
border-radius: var(--fd-scrollbar-radius);
|
|
76
77
|
}
|
|
77
78
|
|
|
78
79
|
.console-output::-webkit-scrollbar-thumb:hover {
|