@flowdrop/flowdrop 2.6.0 → 2.8.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 +56 -0
- package/dist/api/enhanced-client.d.ts +29 -1
- package/dist/api/enhanced-client.js +83 -9
- package/dist/chat/commandClassifier.d.ts +2 -1
- package/dist/chat/commandClassifier.js +4 -1
- package/dist/chat/index.d.ts +5 -1
- package/dist/chat/index.js +2 -0
- package/dist/chat/toolCatalogue.d.ts +27 -0
- package/dist/chat/toolCatalogue.js +35 -0
- package/dist/chat/turnDriver.d.ts +143 -0
- package/dist/chat/turnDriver.js +124 -0
- package/dist/commands/executor.js +270 -37
- package/dist/commands/index.d.ts +1 -1
- package/dist/commands/parser.js +20 -0
- package/dist/commands/types.d.ts +77 -12
- package/dist/components/App.svelte +47 -56
- package/dist/components/SettingsPanel.svelte +13 -0
- package/dist/components/WorkflowEditor.svelte +4 -2
- package/dist/components/WorkflowEditor.svelte.d.ts +2 -0
- package/dist/components/chat/AIChatPanel.svelte +410 -22
- package/dist/components/console/CommandConsole.svelte +8 -0
- package/dist/components/console/formatters.d.ts +9 -1
- package/dist/components/console/formatters.js +54 -0
- package/dist/components/toast/DismissibleToast.svelte +53 -0
- package/dist/components/toast/DismissibleToast.svelte.d.ts +24 -0
- package/dist/components/toast/WarningIcon.svelte +28 -0
- package/dist/components/toast/WarningIcon.svelte.d.ts +26 -0
- package/dist/config/constants.d.ts +7 -3
- package/dist/config/constants.js +7 -3
- package/dist/config/endpoints.d.ts +7 -0
- package/dist/config/endpoints.js +2 -1
- package/dist/core/index.d.ts +1 -1
- package/dist/editor/index.d.ts +1 -1
- package/dist/editor/index.js +1 -1
- package/dist/messages/defaults.d.ts +74 -0
- package/dist/messages/defaults.js +35 -1
- package/dist/services/chatService.d.ts +21 -3
- package/dist/services/chatService.js +33 -1
- package/dist/services/globalSave.d.ts +7 -1
- package/dist/services/globalSave.js +20 -4
- package/dist/services/toastService.d.ts +23 -2
- package/dist/services/toastService.js +72 -28
- package/dist/stores/instanceContainer.svelte.d.ts +34 -0
- package/dist/stores/instanceContainer.svelte.js +30 -0
- package/dist/stores/workflowStore.svelte.d.ts +10 -0
- package/dist/stores/workflowStore.svelte.js +15 -0
- package/dist/styles/toast.css +62 -0
- package/dist/styles/tokens.css +6 -0
- package/dist/svelte-app.d.ts +16 -4
- package/dist/svelte-app.js +45 -14
- package/dist/types/chat.d.ts +59 -0
- package/dist/types/events.d.ts +23 -0
- package/dist/types/events.js +3 -1
- package/dist/types/index.d.ts +49 -0
- package/dist/types/settings.d.ts +18 -1
- package/dist/types/settings.js +1 -0
- package/dist/webmcp/WebMCPConfirm.svelte +168 -61
- package/dist/webmcp/WebMCPConfirm.svelte.d.ts +14 -4
- package/dist/webmcp/bridge.d.ts +63 -0
- package/dist/webmcp/bridge.js +106 -0
- package/dist/webmcp/descriptors.d.ts +8 -1
- package/dist/webmcp/descriptors.js +108 -17
- package/dist/webmcp/gate.d.ts +44 -2
- package/dist/webmcp/gate.js +61 -10
- package/dist/webmcp/index.d.ts +7 -2
- package/dist/webmcp/index.js +4 -1
- package/dist/webmcp/register.d.ts +11 -10
- package/dist/webmcp/register.js +72 -160
- package/dist/webmcp/runtime.d.ts +33 -0
- package/dist/webmcp/runtime.js +500 -0
- package/dist/webmcp/types.d.ts +196 -2
- package/package.json +1 -1
package/dist/commands/types.d.ts
CHANGED
|
@@ -36,7 +36,8 @@ export interface SetConfigCommand {
|
|
|
36
36
|
export interface GetConfigCommand {
|
|
37
37
|
type: 'get_config';
|
|
38
38
|
nodeId: string;
|
|
39
|
-
key
|
|
39
|
+
/** One key; omit to read every value together with the node's config schema. */
|
|
40
|
+
key?: string;
|
|
40
41
|
}
|
|
41
42
|
export interface ConnectCommand {
|
|
42
43
|
type: 'connect';
|
|
@@ -65,6 +66,16 @@ export interface ListEdgesCommand {
|
|
|
65
66
|
export interface ListTypesCommand {
|
|
66
67
|
type: 'list_types';
|
|
67
68
|
}
|
|
69
|
+
/** Describe one node type — ports, config schema, defaults — before adding it. */
|
|
70
|
+
export interface DescribeTypeCommand {
|
|
71
|
+
type: 'describe_type';
|
|
72
|
+
nodeTypeId: string;
|
|
73
|
+
}
|
|
74
|
+
/** Find node types by a case-insensitive substring of id, name, description or tags. */
|
|
75
|
+
export interface SearchTypesCommand {
|
|
76
|
+
type: 'search_types';
|
|
77
|
+
query: string;
|
|
78
|
+
}
|
|
68
79
|
export interface InfoCommand {
|
|
69
80
|
type: 'info';
|
|
70
81
|
nodeId: string;
|
|
@@ -136,7 +147,7 @@ export interface CanvasResetViewCommand {
|
|
|
136
147
|
type: 'canvas_reset_view';
|
|
137
148
|
}
|
|
138
149
|
/** Discriminated union of all commands */
|
|
139
|
-
export type Command = AddNodeCommand | DeleteNodeCommand | RenameNodeCommand | SetConfigCommand | GetConfigCommand | ConnectCommand | DisconnectPortsCommand | DisconnectNodeCommand | ListNodesCommand | ListEdgesCommand | ListTypesCommand | InfoCommand | UndoCommand | RedoCommand | ConfigOpenCommand | SelectNodeCommand | HelpCommand | ClearCommand | SwapNodeCommand | MoveNodeCommand | AutoLayoutCommand | BeautifyLayoutCommand | CanvasFitViewCommand | CanvasZoomInCommand | CanvasZoomOutCommand | CanvasZoomToCommand | CanvasPanToCommand | CanvasResetViewCommand;
|
|
150
|
+
export type Command = AddNodeCommand | DeleteNodeCommand | RenameNodeCommand | SetConfigCommand | GetConfigCommand | ConnectCommand | DisconnectPortsCommand | DisconnectNodeCommand | ListNodesCommand | ListEdgesCommand | ListTypesCommand | DescribeTypeCommand | SearchTypesCommand | InfoCommand | UndoCommand | RedoCommand | ConfigOpenCommand | SelectNodeCommand | HelpCommand | ClearCommand | SwapNodeCommand | MoveNodeCommand | AutoLayoutCommand | BeautifyLayoutCommand | CanvasFitViewCommand | CanvasZoomInCommand | CanvasZoomOutCommand | CanvasZoomToCommand | CanvasPanToCommand | CanvasResetViewCommand;
|
|
140
151
|
export type ParseResult = {
|
|
141
152
|
ok: true;
|
|
142
153
|
command: Command;
|
|
@@ -145,7 +156,9 @@ export type ParseResult = {
|
|
|
145
156
|
error: string;
|
|
146
157
|
input: string;
|
|
147
158
|
};
|
|
148
|
-
export type CommandErrorCode = 'NODE_NOT_FOUND' | 'NODE_TYPE_NOT_FOUND' | 'PORT_NOT_FOUND' | 'EDGE_NOT_FOUND' | 'INVALID_CONNECTION' | 'CYCLE_DETECTED' | 'NO_WORKFLOW' | 'PARSE_ERROR' | 'UNKNOWN_COMMAND' | 'CONFIG_KEY_NOT_FOUND'
|
|
159
|
+
export type CommandErrorCode = 'NODE_NOT_FOUND' | 'NODE_TYPE_NOT_FOUND' | 'PORT_NOT_FOUND' | 'EDGE_NOT_FOUND' | 'INVALID_CONNECTION' | 'CYCLE_DETECTED' | 'NO_WORKFLOW' | 'PARSE_ERROR' | 'UNKNOWN_COMMAND' | 'CONFIG_KEY_NOT_FOUND'
|
|
160
|
+
/** search_types with a blank query — use list_types for the whole catalog. */
|
|
161
|
+
| 'EMPTY_QUERY' | 'CONFIG_VALIDATION_ERROR' | 'UNDO_UNAVAILABLE' | 'REDO_UNAVAILABLE';
|
|
149
162
|
/** Result data for add_node — nodeId is DSL-format short ID (e.g. "llm_node.1") */
|
|
150
163
|
export interface AddNodeResultData {
|
|
151
164
|
nodeId: string;
|
|
@@ -174,13 +187,54 @@ export interface ListEdgesResultData {
|
|
|
174
187
|
targetPort: string;
|
|
175
188
|
}>;
|
|
176
189
|
}
|
|
190
|
+
/** One row of list_types / search_types — `typeId` is the short id add_node accepts. */
|
|
191
|
+
export interface TypeSummary {
|
|
192
|
+
typeId: string;
|
|
193
|
+
name: string;
|
|
194
|
+
category: string;
|
|
195
|
+
description?: string;
|
|
196
|
+
tags?: string[];
|
|
197
|
+
}
|
|
177
198
|
/** Result data for list_types — type IDs are short names usable with add command */
|
|
178
199
|
export interface ListTypesResultData {
|
|
179
|
-
types:
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
200
|
+
types: TypeSummary[];
|
|
201
|
+
}
|
|
202
|
+
/** Result data for search_types — the matching rows, in catalog order */
|
|
203
|
+
export interface SearchTypesResultData {
|
|
204
|
+
query: string;
|
|
205
|
+
types: TypeSummary[];
|
|
206
|
+
}
|
|
207
|
+
/** One config key as described by describe_type / get_config */
|
|
208
|
+
export interface ConfigKeyDescription {
|
|
209
|
+
key: string;
|
|
210
|
+
/** JSON Schema type — a literal, or a list when the schema declares several. */
|
|
211
|
+
type?: string | string[];
|
|
212
|
+
title?: string;
|
|
213
|
+
description?: string;
|
|
214
|
+
enum?: unknown[];
|
|
215
|
+
default?: unknown;
|
|
216
|
+
required?: boolean;
|
|
217
|
+
}
|
|
218
|
+
/** One port as described by describe_type */
|
|
219
|
+
export interface PortDescription {
|
|
220
|
+
portId: string;
|
|
221
|
+
name: string;
|
|
222
|
+
dataType: string;
|
|
223
|
+
required?: boolean;
|
|
224
|
+
description?: string;
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Result data for describe_type — everything an agent needs to know about a
|
|
228
|
+
* node type before adding one. `confirmation`, `can` and `agent` are passed
|
|
229
|
+
* through from the host's payload untouched when present.
|
|
230
|
+
*/
|
|
231
|
+
export interface DescribeTypeResultData extends TypeSummary {
|
|
232
|
+
inputs: PortDescription[];
|
|
233
|
+
outputs: PortDescription[];
|
|
234
|
+
config: ConfigKeyDescription[];
|
|
235
|
+
confirmation?: NodeMetadata['confirmation'];
|
|
236
|
+
can?: NodeMetadata['can'];
|
|
237
|
+
agent?: NodeMetadata['agent'];
|
|
184
238
|
}
|
|
185
239
|
/** Result data for info command — all IDs are DSL-format short IDs */
|
|
186
240
|
export interface InfoResultData {
|
|
@@ -210,12 +264,21 @@ export interface InfoResultData {
|
|
|
210
264
|
localPort: string;
|
|
211
265
|
}>;
|
|
212
266
|
}
|
|
213
|
-
/**
|
|
214
|
-
export interface
|
|
267
|
+
/** get_config with a key: that key's value and its schema entry, if declared. */
|
|
268
|
+
export interface GetConfigKeyResultData {
|
|
215
269
|
nodeId: string;
|
|
216
270
|
key: string;
|
|
217
271
|
value: unknown;
|
|
272
|
+
schema?: ConfigKeyDescription;
|
|
273
|
+
}
|
|
274
|
+
/** get_config without a key: every current value and the whole config schema. */
|
|
275
|
+
export interface GetConfigAllResultData {
|
|
276
|
+
nodeId: string;
|
|
277
|
+
values: Record<string, unknown>;
|
|
278
|
+
schema: ConfigKeyDescription[];
|
|
218
279
|
}
|
|
280
|
+
/** Result data for get_config — narrow on `'key' in data`. */
|
|
281
|
+
export type GetConfigResultData = GetConfigKeyResultData | GetConfigAllResultData;
|
|
219
282
|
/** Result data for help command */
|
|
220
283
|
export interface HelpResultData {
|
|
221
284
|
commands: Array<{
|
|
@@ -231,11 +294,13 @@ export interface SetConfigResultData {
|
|
|
231
294
|
value: unknown;
|
|
232
295
|
/** Validation warnings (non-blocking unless strict mode) */
|
|
233
296
|
warnings?: Array<{
|
|
234
|
-
type: 'enum' | 'type_mismatch';
|
|
297
|
+
type: 'enum' | 'type_mismatch' | 'unknown_key';
|
|
235
298
|
message: string;
|
|
236
299
|
allowedValues?: unknown[];
|
|
237
300
|
expectedType?: string;
|
|
238
301
|
actualType?: string;
|
|
302
|
+
/** For `unknown_key`: the keys the node's config schema does declare. */
|
|
303
|
+
knownKeys?: string[];
|
|
239
304
|
}>;
|
|
240
305
|
}
|
|
241
306
|
/** Result data for swap_node command */
|
|
@@ -252,7 +317,7 @@ export interface SwapNodeResultData {
|
|
|
252
317
|
configReset: string[];
|
|
253
318
|
}
|
|
254
319
|
/** Result data types union for typed access */
|
|
255
|
-
export type CommandResultData = AddNodeResultData | ListNodesResultData | ListEdgesResultData | ListTypesResultData | InfoResultData | GetConfigResultData | SetConfigResultData | HelpResultData | SwapNodeResultData;
|
|
320
|
+
export type CommandResultData = AddNodeResultData | ListNodesResultData | ListEdgesResultData | ListTypesResultData | SearchTypesResultData | DescribeTypeResultData | InfoResultData | GetConfigResultData | SetConfigResultData | HelpResultData | SwapNodeResultData;
|
|
256
321
|
/** Successful command result */
|
|
257
322
|
export interface CommandResultOk {
|
|
258
323
|
ok: true;
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
import CommandConsole from './console/CommandConsole.svelte';
|
|
21
21
|
import AIChatPanel from './chat/AIChatPanel.svelte';
|
|
22
22
|
import TabbedSurface from './surfaces/TabbedSurface.svelte';
|
|
23
|
+
import type { Snippet } from 'svelte';
|
|
23
24
|
import type { SurfaceTab } from './surfaces/TabbedSurface.svelte';
|
|
24
25
|
import SurfaceOverlay from './surfaces/SurfaceOverlay.svelte';
|
|
25
26
|
import type { UIAction } from '../commands/index.js';
|
|
@@ -861,7 +862,7 @@
|
|
|
861
862
|
const errorObj = error instanceof Error ? error : new Error('Unknown error occurred');
|
|
862
863
|
logger.error('Workflow import failed:', errorObj);
|
|
863
864
|
if (features.showToasts) {
|
|
864
|
-
apiToasts.error('Import workflow', errorObj
|
|
865
|
+
apiToasts.error('Import workflow', errorObj);
|
|
865
866
|
}
|
|
866
867
|
}
|
|
867
868
|
};
|
|
@@ -994,8 +995,40 @@
|
|
|
994
995
|
|
|
995
996
|
/** Config surface has something to show (node config or workflow settings). */
|
|
996
997
|
const configActive = $derived(isWorkflowSettingsOpen || !!selectedNodeForConfig);
|
|
997
|
-
/** Console
|
|
998
|
-
const
|
|
998
|
+
/** The Command Console tab is offered by this mount. */
|
|
999
|
+
const consoleTabOffered = features.console;
|
|
1000
|
+
/** The AI Assistant tab is offered: switched on, and a chat backend exists. */
|
|
1001
|
+
const chatTabOffered = $derived(
|
|
1002
|
+
features.assistant && endpointConfig?.endpoints?.chat !== undefined
|
|
1003
|
+
);
|
|
1004
|
+
/** At least one surface of the console/chat group is offered. */
|
|
1005
|
+
const consoleGroupOffered = $derived(consoleTabOffered || chatTabOffered);
|
|
1006
|
+
/** Console/chat group is available (offered, editable canvas, console toggled open). */
|
|
1007
|
+
const consoleActive = $derived(
|
|
1008
|
+
consoleGroupOffered && getUiSettings().consoleOpen && canvasEditable
|
|
1009
|
+
);
|
|
1010
|
+
|
|
1011
|
+
/**
|
|
1012
|
+
* The console-group tabs this mount offers, for whichever host renders them.
|
|
1013
|
+
* Snippets are passed in because they are declared in the template.
|
|
1014
|
+
*/
|
|
1015
|
+
function consoleGroupTabs(consoleBody: Snippet, chatBody: Snippet): SurfaceTab[] {
|
|
1016
|
+
return [
|
|
1017
|
+
...(consoleTabOffered
|
|
1018
|
+
? [
|
|
1019
|
+
{
|
|
1020
|
+
id: 'console',
|
|
1021
|
+
label: mergedMessages.navigation.bottomPanel.console,
|
|
1022
|
+
content: consoleBody,
|
|
1023
|
+
display: 'contents' as const
|
|
1024
|
+
}
|
|
1025
|
+
]
|
|
1026
|
+
: []),
|
|
1027
|
+
...(chatTabOffered
|
|
1028
|
+
? [{ id: 'chat', label: mergedMessages.navigation.bottomPanel.chat, content: chatBody }]
|
|
1029
|
+
: [])
|
|
1030
|
+
];
|
|
1031
|
+
}
|
|
999
1032
|
/** Node-swap sub-flow occupies the right sidebar regardless of placement. */
|
|
1000
1033
|
const swapActive = $derived(swapMode !== 'idle');
|
|
1001
1034
|
|
|
@@ -1100,6 +1133,7 @@
|
|
|
1100
1133
|
target.tagName === 'INPUT' || target.tagName === 'TEXTAREA' || target.isContentEditable;
|
|
1101
1134
|
|
|
1102
1135
|
if (isInputElement) return;
|
|
1136
|
+
if (!consoleGroupOffered) return;
|
|
1103
1137
|
|
|
1104
1138
|
event.preventDefault();
|
|
1105
1139
|
toggleConsole();
|
|
@@ -1381,19 +1415,7 @@
|
|
|
1381
1415
|
Console + chat tabs, shared by whichever host the console group is routed to.
|
|
1382
1416
|
-->
|
|
1383
1417
|
{#snippet consoleChatTabs()}
|
|
1384
|
-
{@const tabs =
|
|
1385
|
-
{
|
|
1386
|
-
id: 'console',
|
|
1387
|
-
label: mergedMessages.navigation.bottomPanel.console,
|
|
1388
|
-
content: consoleSurfaceBody,
|
|
1389
|
-
display: 'contents' as const
|
|
1390
|
-
},
|
|
1391
|
-
{
|
|
1392
|
-
id: 'chat',
|
|
1393
|
-
label: mergedMessages.navigation.bottomPanel.chat,
|
|
1394
|
-
content: chatSurfaceBody
|
|
1395
|
-
}
|
|
1396
|
-
]}
|
|
1418
|
+
{@const tabs = consoleGroupTabs(consoleSurfaceBody, chatSurfaceBody)}
|
|
1397
1419
|
<TabbedSurface {tabs} activeId={activeSurface} onSelect={selectSurface} />
|
|
1398
1420
|
{/snippet}
|
|
1399
1421
|
|
|
@@ -1506,21 +1528,7 @@
|
|
|
1506
1528
|
}
|
|
1507
1529
|
]
|
|
1508
1530
|
: []),
|
|
1509
|
-
...(consoleHere('sidebar')
|
|
1510
|
-
? [
|
|
1511
|
-
{
|
|
1512
|
-
id: 'console',
|
|
1513
|
-
label: mergedMessages.navigation.bottomPanel.console,
|
|
1514
|
-
content: consoleSurfaceBody,
|
|
1515
|
-
display: 'contents' as const
|
|
1516
|
-
},
|
|
1517
|
-
{
|
|
1518
|
-
id: 'chat',
|
|
1519
|
-
label: mergedMessages.navigation.bottomPanel.chat,
|
|
1520
|
-
content: chatSurfaceBody
|
|
1521
|
-
}
|
|
1522
|
-
]
|
|
1523
|
-
: [])
|
|
1531
|
+
...(consoleHere('sidebar') ? consoleGroupTabs(consoleSurfaceBody, chatSurfaceBody) : [])
|
|
1524
1532
|
] as SurfaceTab[]}
|
|
1525
1533
|
<TabbedSurface {tabs} activeId={activeSurface} onSelect={selectSurface} />
|
|
1526
1534
|
{/if}
|
|
@@ -1541,21 +1549,7 @@
|
|
|
1541
1549
|
}
|
|
1542
1550
|
]
|
|
1543
1551
|
: []),
|
|
1544
|
-
...(consoleHere('below')
|
|
1545
|
-
? [
|
|
1546
|
-
{
|
|
1547
|
-
id: 'console',
|
|
1548
|
-
label: mergedMessages.navigation.bottomPanel.console,
|
|
1549
|
-
content: consoleSurfaceBody,
|
|
1550
|
-
display: 'contents' as const
|
|
1551
|
-
},
|
|
1552
|
-
{
|
|
1553
|
-
id: 'chat',
|
|
1554
|
-
label: mergedMessages.navigation.bottomPanel.chat,
|
|
1555
|
-
content: chatSurfaceBody
|
|
1556
|
-
}
|
|
1557
|
-
]
|
|
1558
|
-
: [])
|
|
1552
|
+
...(consoleHere('below') ? consoleGroupTabs(consoleSurfaceBody, chatSurfaceBody) : [])
|
|
1559
1553
|
] as SurfaceTab[]}
|
|
1560
1554
|
<TabbedSurface {tabs} activeId={activeSurface} onSelect={selectSurface} />
|
|
1561
1555
|
{/snippet}
|
|
@@ -1620,8 +1614,11 @@
|
|
|
1620
1614
|
{refreshTrigger}
|
|
1621
1615
|
builtinEditors={features.builtinEditors}
|
|
1622
1616
|
gridVariant={themeConfig?.canvas?.grid ?? 'dots'}
|
|
1623
|
-
consoleOpen={
|
|
1624
|
-
onToggleConsole={toggleConsole}
|
|
1617
|
+
consoleOpen={consoleActive}
|
|
1618
|
+
onToggleConsole={consoleGroupOffered ? toggleConsole : undefined}
|
|
1619
|
+
consoleToggleLabel={consoleTabOffered
|
|
1620
|
+
? undefined
|
|
1621
|
+
: mergedMessages.navigation.bottomPanel.chat}
|
|
1625
1622
|
/>
|
|
1626
1623
|
</div>
|
|
1627
1624
|
</MainLayout>
|
|
@@ -1643,13 +1640,7 @@
|
|
|
1643
1640
|
>
|
|
1644
1641
|
{@const tabs = [
|
|
1645
1642
|
{ id: 'config', label: activeConfig?.title ?? 'Configuration', content: configBareContent },
|
|
1646
|
-
|
|
1647
|
-
id: 'console',
|
|
1648
|
-
label: mergedMessages.navigation.bottomPanel.console,
|
|
1649
|
-
content: consoleSurfaceBody,
|
|
1650
|
-
display: 'contents' as const
|
|
1651
|
-
},
|
|
1652
|
-
{ id: 'chat', label: mergedMessages.navigation.bottomPanel.chat, content: chatSurfaceBody }
|
|
1643
|
+
...consoleGroupTabs(consoleSurfaceBody, chatSurfaceBody)
|
|
1653
1644
|
] as SurfaceTab[]}
|
|
1654
1645
|
<TabbedSurface {tabs} activeId={activeSurface} onSelect={selectSurface} />
|
|
1655
1646
|
</SurfaceOverlay>
|
|
@@ -1663,7 +1654,7 @@
|
|
|
1663
1654
|
</SurfaceOverlay>
|
|
1664
1655
|
{:else if consoleHere('modal')}
|
|
1665
1656
|
<SurfaceOverlay
|
|
1666
|
-
title={activeSurface === 'chat'
|
|
1657
|
+
title={activeSurface === 'chat' || !consoleTabOffered
|
|
1667
1658
|
? mergedMessages.navigation.bottomPanel.chat
|
|
1668
1659
|
: mergedMessages.navigation.bottomPanel.console}
|
|
1669
1660
|
closeLabel={mergedMessages.layout.closeConfigPanel}
|
|
@@ -268,6 +268,19 @@
|
|
|
268
268
|
description: 'Show confirmation before deleting nodes',
|
|
269
269
|
default: true
|
|
270
270
|
},
|
|
271
|
+
chatMode: {
|
|
272
|
+
type: 'string',
|
|
273
|
+
title: 'AI Assistant Mode',
|
|
274
|
+
description:
|
|
275
|
+
'Tools: the assistant calls the editor tools in a loop and asks before changing the workflow. ' +
|
|
276
|
+
'Text (legacy): one reply with a command block you apply by hand. ' +
|
|
277
|
+
'Tools needs a backend that supports tool-calling turns; otherwise the panel falls back to Text.',
|
|
278
|
+
oneOf: [
|
|
279
|
+
{ const: 'tools', title: 'Tools' },
|
|
280
|
+
{ const: 'dsl', title: 'Text (legacy)' }
|
|
281
|
+
],
|
|
282
|
+
default: 'tools'
|
|
283
|
+
},
|
|
271
284
|
chatAutoRetry: {
|
|
272
285
|
type: 'boolean',
|
|
273
286
|
title: 'AI Assistant Auto-retry',
|
|
@@ -86,6 +86,8 @@
|
|
|
86
86
|
// Console toggle
|
|
87
87
|
consoleOpen?: boolean;
|
|
88
88
|
onToggleConsole?: () => void;
|
|
89
|
+
/** Label of the console-group toggle; defaults to the Command Console wording. */
|
|
90
|
+
consoleToggleLabel?: string;
|
|
89
91
|
/** Per-instance state container (created by mount functions). Defaults to the page-default instance. */
|
|
90
92
|
instance?: FlowDropInstance;
|
|
91
93
|
/**
|
|
@@ -718,7 +720,7 @@
|
|
|
718
720
|
} catch (error) {
|
|
719
721
|
const errorObj = error instanceof Error ? error : new Error('Unknown error occurred');
|
|
720
722
|
logger.error('Workflow file drop import failed:', errorObj);
|
|
721
|
-
apiToasts.error('Import workflow', errorObj
|
|
723
|
+
apiToasts.error('Import workflow', errorObj);
|
|
722
724
|
}
|
|
723
725
|
};
|
|
724
726
|
reader.onerror = () => {
|
|
@@ -925,7 +927,7 @@
|
|
|
925
927
|
{#if canvasEditable && props.onToggleConsole}
|
|
926
928
|
<CanvasIconButton
|
|
927
929
|
class="flowdrop-console-toggle"
|
|
928
|
-
label={m().layout.commandConsole}
|
|
930
|
+
label={props.consoleToggleLabel ?? m().layout.commandConsole}
|
|
929
931
|
active={props.consoleOpen}
|
|
930
932
|
onclick={props.onToggleConsole}
|
|
931
933
|
>
|
|
@@ -26,6 +26,8 @@ interface Props {
|
|
|
26
26
|
refreshTrigger?: number;
|
|
27
27
|
consoleOpen?: boolean;
|
|
28
28
|
onToggleConsole?: () => void;
|
|
29
|
+
/** Label of the console-group toggle; defaults to the Command Console wording. */
|
|
30
|
+
consoleToggleLabel?: string;
|
|
29
31
|
/** Per-instance state container (created by mount functions). Defaults to the page-default instance. */
|
|
30
32
|
instance?: FlowDropInstance;
|
|
31
33
|
/**
|