@flowdrop/flowdrop 1.5.0 → 1.6.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.
Files changed (434) hide show
  1. package/README.md +46 -47
  2. package/dist/adapters/WorkflowAdapter.d.ts +1 -1
  3. package/dist/adapters/WorkflowAdapter.js +26 -26
  4. package/dist/adapters/agentspec/AgentSpecAdapter.d.ts +2 -2
  5. package/dist/adapters/agentspec/AgentSpecAdapter.js +122 -133
  6. package/dist/adapters/agentspec/agentAdapter.d.ts +2 -2
  7. package/dist/adapters/agentspec/agentAdapter.js +10 -10
  8. package/dist/adapters/agentspec/autoLayout.d.ts +1 -1
  9. package/dist/adapters/agentspec/autoLayout.js +7 -9
  10. package/dist/adapters/agentspec/componentTypeDefaults.d.ts +1 -1
  11. package/dist/adapters/agentspec/componentTypeDefaults.js +120 -120
  12. package/dist/adapters/agentspec/defaultNodeTypes.d.ts +2 -2
  13. package/dist/adapters/agentspec/defaultNodeTypes.js +307 -307
  14. package/dist/adapters/agentspec/index.d.ts +10 -10
  15. package/dist/adapters/agentspec/index.js +6 -6
  16. package/dist/adapters/agentspec/validator.d.ts +2 -2
  17. package/dist/adapters/agentspec/validator.js +20 -22
  18. package/dist/api/enhanced-client.d.ts +3 -3
  19. package/dist/api/enhanced-client.js +72 -73
  20. package/dist/chat/commandClassifier.js +6 -6
  21. package/dist/chat/index.d.ts +5 -5
  22. package/dist/chat/index.js +4 -4
  23. package/dist/chat/responseParser.d.ts +6 -6
  24. package/dist/chat/responseParser.js +28 -24
  25. package/dist/commands/batch.d.ts +1 -1
  26. package/dist/commands/batch.js +5 -7
  27. package/dist/commands/executor.d.ts +2 -2
  28. package/dist/commands/executor.js +320 -231
  29. package/dist/commands/index.d.ts +6 -6
  30. package/dist/commands/index.js +5 -5
  31. package/dist/commands/parser.d.ts +1 -1
  32. package/dist/commands/parser.js +91 -74
  33. package/dist/commands/positioner.d.ts +2 -2
  34. package/dist/commands/positioner.js +1 -1
  35. package/dist/commands/storeIntegration.svelte.d.ts +2 -2
  36. package/dist/commands/storeIntegration.svelte.js +5 -5
  37. package/dist/commands/types.d.ts +42 -42
  38. package/dist/commands/types.js +2 -2
  39. package/dist/components/App.svelte +240 -294
  40. package/dist/components/App.svelte.d.ts +9 -9
  41. package/dist/components/CanvasBanner.stories.svelte +10 -16
  42. package/dist/components/CanvasBanner.stories.svelte.d.ts +1 -1
  43. package/dist/components/CanvasBanner.svelte +2 -2
  44. package/dist/components/CanvasBanner.svelte.d.ts +1 -1
  45. package/dist/components/CanvasController.svelte +3 -4
  46. package/dist/components/ConfigForm.svelte +118 -256
  47. package/dist/components/ConfigForm.svelte.d.ts +2 -2
  48. package/dist/components/ConfigMappingRow.svelte +7 -9
  49. package/dist/components/ConfigMappingRow.svelte.d.ts +1 -1
  50. package/dist/components/ConfigModal.svelte +3 -3
  51. package/dist/components/ConfigModal.svelte.d.ts +1 -1
  52. package/dist/components/ConfigPanel.stories.svelte +19 -19
  53. package/dist/components/ConfigPanel.stories.svelte.d.ts +1 -1
  54. package/dist/components/ConfigPanel.svelte +9 -20
  55. package/dist/components/ConfigPanel.svelte.d.ts +1 -1
  56. package/dist/components/ConnectionLine.svelte +4 -4
  57. package/dist/components/EdgeRefresher.svelte +1 -1
  58. package/dist/components/FlowDropEdge.stories.svelte +110 -110
  59. package/dist/components/FlowDropEdge.svelte +9 -9
  60. package/dist/components/FlowDropEdge.svelte.d.ts +1 -1
  61. package/dist/components/FlowDropZone.svelte +6 -9
  62. package/dist/components/FlowDropZone.svelte.d.ts +1 -1
  63. package/dist/components/LoadingSpinner.stories.svelte +13 -13
  64. package/dist/components/LoadingSpinner.stories.svelte.d.ts +1 -1
  65. package/dist/components/LoadingSpinner.svelte +3 -3
  66. package/dist/components/LoadingSpinner.svelte.d.ts +1 -1
  67. package/dist/components/Logo.stories.svelte +4 -4
  68. package/dist/components/Logo.stories.svelte.d.ts +1 -1
  69. package/dist/components/Logo.svelte +3 -9
  70. package/dist/components/LogsSidebar.svelte +41 -48
  71. package/dist/components/LogsSidebar.svelte.d.ts +1 -1
  72. package/dist/components/MarkdownDisplay.stories.svelte +10 -14
  73. package/dist/components/MarkdownDisplay.stories.svelte.d.ts +1 -1
  74. package/dist/components/MarkdownDisplay.svelte +4 -6
  75. package/dist/components/Navbar.stories.svelte +19 -19
  76. package/dist/components/Navbar.stories.svelte.d.ts +1 -1
  77. package/dist/components/Navbar.svelte +28 -49
  78. package/dist/components/Navbar.svelte.d.ts +2 -2
  79. package/dist/components/NodeSidebar.svelte +42 -88
  80. package/dist/components/NodeSidebar.svelte.d.ts +1 -1
  81. package/dist/components/NodeStatusOverlay.stories.svelte +19 -31
  82. package/dist/components/NodeStatusOverlay.stories.svelte.d.ts +1 -1
  83. package/dist/components/NodeStatusOverlay.svelte +40 -55
  84. package/dist/components/NodeStatusOverlay.svelte.d.ts +3 -3
  85. package/dist/components/NodeSwapPicker.svelte +20 -64
  86. package/dist/components/NodeSwapPicker.svelte.d.ts +1 -1
  87. package/dist/components/PipelineStatus.svelte +63 -89
  88. package/dist/components/PipelineStatus.svelte.d.ts +4 -4
  89. package/dist/components/PortCoordinateTracker.svelte +5 -7
  90. package/dist/components/PortCoordinateTracker.svelte.d.ts +1 -1
  91. package/dist/components/PortMappingRow.svelte +20 -24
  92. package/dist/components/PortMappingRow.svelte.d.ts +2 -2
  93. package/dist/components/ReadOnlyDetails.svelte +1 -1
  94. package/dist/components/SchemaForm.stories.svelte +53 -53
  95. package/dist/components/SchemaForm.stories.svelte.d.ts +1 -1
  96. package/dist/components/SchemaForm.svelte +24 -51
  97. package/dist/components/SchemaForm.svelte.d.ts +2 -2
  98. package/dist/components/SettingsModal.svelte +6 -9
  99. package/dist/components/SettingsModal.svelte.d.ts +1 -1
  100. package/dist/components/SettingsPanel.svelte +138 -158
  101. package/dist/components/SettingsPanel.svelte.d.ts +1 -1
  102. package/dist/components/StatusIcon.stories.svelte +16 -29
  103. package/dist/components/StatusIcon.stories.svelte.d.ts +1 -1
  104. package/dist/components/StatusIcon.svelte +19 -19
  105. package/dist/components/StatusIcon.svelte.d.ts +2 -2
  106. package/dist/components/StatusLabel.stories.svelte +8 -8
  107. package/dist/components/StatusLabel.stories.svelte.d.ts +1 -1
  108. package/dist/components/SwapMappingEditor.svelte +35 -56
  109. package/dist/components/SwapMappingEditor.svelte.d.ts +2 -2
  110. package/dist/components/ThemeToggle.stories.svelte +10 -10
  111. package/dist/components/ThemeToggle.stories.svelte.d.ts +1 -1
  112. package/dist/components/ThemeToggle.svelte +22 -33
  113. package/dist/components/ThemeToggle.svelte.d.ts +1 -1
  114. package/dist/components/UniversalNode.svelte +29 -41
  115. package/dist/components/UniversalNode.svelte.d.ts +3 -3
  116. package/dist/components/WorkflowEditor.svelte +113 -168
  117. package/dist/components/WorkflowEditor.svelte.d.ts +4 -4
  118. package/dist/components/chat/AIChatPanel.svelte +272 -133
  119. package/dist/components/chat/AIChatPanel.svelte.d.ts +3 -3
  120. package/dist/components/chat/CommandPreview.svelte +74 -24
  121. package/dist/components/chat/CommandPreview.svelte.d.ts +1 -1
  122. package/dist/components/console/CommandConsole.stories.svelte +71 -53
  123. package/dist/components/console/CommandConsole.stories.svelte.d.ts +1 -1
  124. package/dist/components/console/CommandConsole.svelte +39 -35
  125. package/dist/components/console/CommandConsole.svelte.d.ts +2 -2
  126. package/dist/components/console/ConsoleAutocomplete.svelte +6 -3
  127. package/dist/components/console/ConsoleInput.svelte +148 -89
  128. package/dist/components/console/ConsoleInput.svelte.d.ts +1 -1
  129. package/dist/components/console/ConsoleOutput.svelte +5 -10
  130. package/dist/components/console/ConsoleOutput.svelte.d.ts +1 -1
  131. package/dist/components/console/formatters.d.ts +1 -1
  132. package/dist/components/console/formatters.js +27 -29
  133. package/dist/components/form/FormArray.svelte +75 -132
  134. package/dist/components/form/FormArray.svelte.d.ts +1 -1
  135. package/dist/components/form/FormAutocomplete.svelte +65 -108
  136. package/dist/components/form/FormAutocomplete.svelte.d.ts +1 -1
  137. package/dist/components/form/FormCheckboxGroup.stories.svelte +13 -16
  138. package/dist/components/form/FormCheckboxGroup.stories.svelte.d.ts +1 -1
  139. package/dist/components/form/FormCheckboxGroup.svelte +2 -2
  140. package/dist/components/form/FormCodeEditor.svelte +42 -56
  141. package/dist/components/form/FormField.svelte +79 -90
  142. package/dist/components/form/FormField.svelte.d.ts +2 -2
  143. package/dist/components/form/FormFieldLight.svelte +72 -88
  144. package/dist/components/form/FormFieldLight.svelte.d.ts +1 -1
  145. package/dist/components/form/FormFieldWrapper.stories.svelte +14 -14
  146. package/dist/components/form/FormFieldWrapper.stories.svelte.d.ts +1 -1
  147. package/dist/components/form/FormFieldWrapper.svelte +2 -9
  148. package/dist/components/form/FormFieldWrapper.svelte.d.ts +1 -1
  149. package/dist/components/form/FormFieldset.svelte +3 -3
  150. package/dist/components/form/FormFieldset.svelte.d.ts +2 -2
  151. package/dist/components/form/FormMarkdownEditor.svelte +123 -156
  152. package/dist/components/form/FormNumberField.stories.svelte +18 -18
  153. package/dist/components/form/FormNumberField.stories.svelte.d.ts +1 -1
  154. package/dist/components/form/FormNumberField.svelte +6 -6
  155. package/dist/components/form/FormRangeField.stories.svelte +13 -13
  156. package/dist/components/form/FormRangeField.stories.svelte.d.ts +1 -1
  157. package/dist/components/form/FormRangeField.svelte +4 -12
  158. package/dist/components/form/FormSelect.stories.svelte +21 -21
  159. package/dist/components/form/FormSelect.stories.svelte.d.ts +1 -1
  160. package/dist/components/form/FormSelect.svelte +5 -5
  161. package/dist/components/form/FormSelect.svelte.d.ts +1 -1
  162. package/dist/components/form/FormTemplateEditor.svelte +126 -175
  163. package/dist/components/form/FormTemplateEditor.svelte.d.ts +1 -1
  164. package/dist/components/form/FormTextField.stories.svelte +17 -23
  165. package/dist/components/form/FormTextField.stories.svelte.d.ts +1 -1
  166. package/dist/components/form/FormTextField.svelte +4 -4
  167. package/dist/components/form/FormTextarea.stories.svelte +18 -21
  168. package/dist/components/form/FormTextarea.stories.svelte.d.ts +1 -1
  169. package/dist/components/form/FormTextarea.svelte +4 -4
  170. package/dist/components/form/FormToggle.stories.svelte +13 -16
  171. package/dist/components/form/FormToggle.stories.svelte.d.ts +1 -1
  172. package/dist/components/form/FormToggle.svelte +3 -3
  173. package/dist/components/form/FormUISchemaRenderer.svelte +12 -19
  174. package/dist/components/form/FormUISchemaRenderer.svelte.d.ts +3 -3
  175. package/dist/components/form/index.d.ts +19 -19
  176. package/dist/components/form/index.js +18 -18
  177. package/dist/components/form/templateAutocomplete.d.ts +2 -2
  178. package/dist/components/form/templateAutocomplete.js +55 -64
  179. package/dist/components/form/types.d.ts +6 -6
  180. package/dist/components/form/types.js +4 -9
  181. package/dist/components/icons/AlertCircleIcon.svelte +1 -6
  182. package/dist/components/icons/CogIcon.svelte +1 -6
  183. package/dist/components/interrupt/ChoicePrompt.stories.svelte +27 -27
  184. package/dist/components/interrupt/ChoicePrompt.stories.svelte.d.ts +1 -1
  185. package/dist/components/interrupt/ChoicePrompt.svelte +17 -41
  186. package/dist/components/interrupt/ChoicePrompt.svelte.d.ts +1 -1
  187. package/dist/components/interrupt/ConfirmationPrompt.stories.svelte +17 -17
  188. package/dist/components/interrupt/ConfirmationPrompt.stories.svelte.d.ts +1 -1
  189. package/dist/components/interrupt/ConfirmationPrompt.svelte +10 -16
  190. package/dist/components/interrupt/ConfirmationPrompt.svelte.d.ts +1 -1
  191. package/dist/components/interrupt/FormPrompt.svelte +10 -15
  192. package/dist/components/interrupt/FormPrompt.svelte.d.ts +1 -1
  193. package/dist/components/interrupt/InterruptBubble.svelte +87 -121
  194. package/dist/components/interrupt/InterruptBubble.svelte.d.ts +2 -2
  195. package/dist/components/interrupt/ReviewPrompt.stories.svelte +37 -37
  196. package/dist/components/interrupt/ReviewPrompt.stories.svelte.d.ts +1 -1
  197. package/dist/components/interrupt/ReviewPrompt.svelte +55 -75
  198. package/dist/components/interrupt/ReviewPrompt.svelte.d.ts +1 -1
  199. package/dist/components/interrupt/TextInputPrompt.stories.svelte +16 -17
  200. package/dist/components/interrupt/TextInputPrompt.stories.svelte.d.ts +1 -1
  201. package/dist/components/interrupt/TextInputPrompt.svelte +13 -18
  202. package/dist/components/interrupt/TextInputPrompt.svelte.d.ts +1 -1
  203. package/dist/components/interrupt/index.d.ts +6 -6
  204. package/dist/components/interrupt/index.js +6 -6
  205. package/dist/components/layouts/MainLayout.svelte +46 -84
  206. package/dist/components/layouts/MainLayout.svelte.d.ts +6 -6
  207. package/dist/components/nodes/GatewayNode.stories.svelte +64 -65
  208. package/dist/components/nodes/GatewayNode.svelte +37 -70
  209. package/dist/components/nodes/GatewayNode.svelte.d.ts +3 -3
  210. package/dist/components/nodes/IdeaNode.stories.svelte +25 -26
  211. package/dist/components/nodes/IdeaNode.svelte +22 -36
  212. package/dist/components/nodes/IdeaNode.svelte.d.ts +1 -1
  213. package/dist/components/nodes/NotesNode.stories.svelte +37 -38
  214. package/dist/components/nodes/NotesNode.svelte +28 -39
  215. package/dist/components/nodes/NotesNode.svelte.d.ts +1 -1
  216. package/dist/components/nodes/SimpleNode.stories.svelte +137 -138
  217. package/dist/components/nodes/SimpleNode.svelte +44 -74
  218. package/dist/components/nodes/SimpleNode.svelte.d.ts +1 -1
  219. package/dist/components/nodes/SquareNode.stories.svelte +75 -75
  220. package/dist/components/nodes/SquareNode.svelte +42 -68
  221. package/dist/components/nodes/SquareNode.svelte.d.ts +1 -1
  222. package/dist/components/nodes/TerminalNode.stories.svelte +10 -10
  223. package/dist/components/nodes/TerminalNode.svelte +74 -112
  224. package/dist/components/nodes/TerminalNode.svelte.d.ts +1 -1
  225. package/dist/components/nodes/ToolNode.stories.svelte +115 -116
  226. package/dist/components/nodes/ToolNode.svelte +31 -64
  227. package/dist/components/nodes/ToolNode.svelte.d.ts +1 -1
  228. package/dist/components/nodes/WorkflowNode.stories.svelte +84 -89
  229. package/dist/components/nodes/WorkflowNode.svelte +50 -103
  230. package/dist/components/nodes/WorkflowNode.svelte.d.ts +3 -3
  231. package/dist/components/playground/ChatPanel.svelte +47 -103
  232. package/dist/components/playground/ExecutionLogs.svelte +45 -68
  233. package/dist/components/playground/InputCollector.svelte +32 -51
  234. package/dist/components/playground/MessageBubble.stories.svelte +25 -25
  235. package/dist/components/playground/MessageBubble.stories.svelte.d.ts +1 -1
  236. package/dist/components/playground/MessageBubble.svelte +54 -70
  237. package/dist/components/playground/MessageBubble.svelte.d.ts +1 -1
  238. package/dist/components/playground/Playground.svelte +60 -91
  239. package/dist/components/playground/Playground.svelte.d.ts +3 -3
  240. package/dist/components/playground/PlaygroundModal.svelte +8 -12
  241. package/dist/components/playground/PlaygroundModal.svelte.d.ts +3 -3
  242. package/dist/components/playground/SessionManager.svelte +34 -40
  243. package/dist/components/playground/SessionManager.svelte.d.ts +1 -1
  244. package/dist/config/agentSpecEndpoints.d.ts +1 -1
  245. package/dist/config/agentSpecEndpoints.js +20 -20
  246. package/dist/config/constants.js +2 -2
  247. package/dist/config/defaultCategories.d.ts +1 -1
  248. package/dist/config/defaultCategories.js +86 -86
  249. package/dist/config/defaultPortConfig.d.ts +1 -1
  250. package/dist/config/defaultPortConfig.js +144 -144
  251. package/dist/config/endpoints.d.ts +4 -4
  252. package/dist/config/endpoints.js +68 -68
  253. package/dist/config/runtimeConfig.d.ts +2 -2
  254. package/dist/config/runtimeConfig.js +8 -8
  255. package/dist/core/index.d.ts +68 -68
  256. package/dist/core/index.js +38 -38
  257. package/dist/display/index.d.ts +2 -2
  258. package/dist/display/index.js +2 -2
  259. package/dist/editor/index.d.ts +64 -64
  260. package/dist/editor/index.js +54 -54
  261. package/dist/form/code.d.ts +5 -5
  262. package/dist/form/code.js +14 -14
  263. package/dist/form/fieldRegistry.d.ts +3 -3
  264. package/dist/form/fieldRegistry.js +9 -11
  265. package/dist/form/full.d.ts +8 -8
  266. package/dist/form/full.js +9 -9
  267. package/dist/form/index.d.ts +18 -18
  268. package/dist/form/index.js +16 -16
  269. package/dist/form/markdown.d.ts +4 -4
  270. package/dist/form/markdown.js +8 -8
  271. package/dist/helpers/proximityConnect.d.ts +3 -3
  272. package/dist/helpers/proximityConnect.js +32 -34
  273. package/dist/helpers/workflowEditorHelper.d.ts +6 -6
  274. package/dist/helpers/workflowEditorHelper.js +64 -68
  275. package/dist/index.d.ts +6 -6
  276. package/dist/index.js +6 -6
  277. package/dist/mocks/app-environment.js +2 -2
  278. package/dist/mocks/app-forms.js +1 -1
  279. package/dist/mocks/app-navigation.js +2 -2
  280. package/dist/mocks/app-stores.js +3 -3
  281. package/dist/playground/index.d.ts +19 -19
  282. package/dist/playground/index.js +16 -16
  283. package/dist/playground/mount.d.ts +3 -3
  284. package/dist/playground/mount.js +24 -24
  285. package/dist/registry/builtinFormats.js +13 -13
  286. package/dist/registry/builtinNodes.d.ts +2 -2
  287. package/dist/registry/builtinNodes.js +77 -77
  288. package/dist/registry/index.d.ts +4 -4
  289. package/dist/registry/index.js +4 -4
  290. package/dist/registry/nodeComponentRegistry.d.ts +8 -8
  291. package/dist/registry/nodeComponentRegistry.js +9 -11
  292. package/dist/registry/plugin.d.ts +2 -2
  293. package/dist/registry/plugin.js +11 -11
  294. package/dist/registry/workflowFormatRegistry.d.ts +3 -3
  295. package/dist/registry/workflowFormatRegistry.js +2 -2
  296. package/dist/schema/index.d.ts +1 -1
  297. package/dist/schema/index.js +2 -2
  298. package/dist/services/agentSpecExecutionService.d.ts +3 -3
  299. package/dist/services/agentSpecExecutionService.js +55 -56
  300. package/dist/services/api.d.ts +2 -2
  301. package/dist/services/api.js +37 -37
  302. package/dist/services/apiVariableService.d.ts +1 -1
  303. package/dist/services/apiVariableService.js +34 -41
  304. package/dist/services/autoSaveService.js +8 -8
  305. package/dist/services/categoriesApi.d.ts +2 -2
  306. package/dist/services/categoriesApi.js +8 -8
  307. package/dist/services/chatService.d.ts +1 -1
  308. package/dist/services/chatService.js +18 -18
  309. package/dist/services/draftStorage.d.ts +1 -1
  310. package/dist/services/draftStorage.js +11 -11
  311. package/dist/services/dynamicSchemaService.d.ts +1 -1
  312. package/dist/services/dynamicSchemaService.js +39 -41
  313. package/dist/services/globalSave.d.ts +2 -2
  314. package/dist/services/globalSave.js +38 -41
  315. package/dist/services/historyService.d.ts +1 -1
  316. package/dist/services/historyService.js +10 -10
  317. package/dist/services/interruptService.d.ts +1 -1
  318. package/dist/services/interruptService.js +29 -35
  319. package/dist/services/nodeExecutionService.d.ts +1 -1
  320. package/dist/services/nodeExecutionService.js +44 -45
  321. package/dist/services/playgroundService.d.ts +1 -1
  322. package/dist/services/playgroundService.js +29 -29
  323. package/dist/services/portConfigApi.d.ts +2 -2
  324. package/dist/services/portConfigApi.js +8 -8
  325. package/dist/services/settingsService.d.ts +2 -2
  326. package/dist/services/settingsService.js +19 -25
  327. package/dist/services/toastService.d.ts +4 -4
  328. package/dist/services/toastService.js +33 -33
  329. package/dist/services/variableService.d.ts +1 -1
  330. package/dist/services/variableService.js +36 -36
  331. package/dist/services/workflowStorage.d.ts +2 -2
  332. package/dist/services/workflowStorage.js +13 -13
  333. package/dist/settings/index.d.ts +7 -7
  334. package/dist/settings/index.js +6 -6
  335. package/dist/skins/default.d.ts +1 -1
  336. package/dist/skins/default.js +1 -1
  337. package/dist/skins/index.d.ts +3 -3
  338. package/dist/skins/index.js +7 -7
  339. package/dist/skins/slate.d.ts +1 -1
  340. package/dist/skins/slate.js +69 -69
  341. package/dist/stores/categoriesStore.svelte.d.ts +1 -1
  342. package/dist/stores/categoriesStore.svelte.js +5 -5
  343. package/dist/stores/editorStateMachine.svelte.d.ts +2 -2
  344. package/dist/stores/editorStateMachine.svelte.js +34 -34
  345. package/dist/stores/historyStore.svelte.d.ts +4 -4
  346. package/dist/stores/historyStore.svelte.js +4 -4
  347. package/dist/stores/interruptStore.svelte.d.ts +3 -3
  348. package/dist/stores/interruptStore.svelte.js +21 -21
  349. package/dist/stores/playgroundStore.svelte.d.ts +2 -2
  350. package/dist/stores/playgroundStore.svelte.js +18 -21
  351. package/dist/stores/portCoordinateStore.svelte.d.ts +2 -2
  352. package/dist/stores/portCoordinateStore.svelte.js +10 -13
  353. package/dist/stores/settingsStore.svelte.d.ts +2 -2
  354. package/dist/stores/settingsStore.svelte.js +57 -62
  355. package/dist/stores/workflowStore.svelte.d.ts +3 -3
  356. package/dist/stores/workflowStore.svelte.js +46 -47
  357. package/dist/stories/CanvasDecorator.svelte +7 -10
  358. package/dist/stories/CanvasDecorator.svelte.d.ts +2 -2
  359. package/dist/stories/EdgeDecorator.svelte +28 -31
  360. package/dist/stories/EdgeDecorator.svelte.d.ts +1 -1
  361. package/dist/stories/NodeDecorator.svelte +14 -20
  362. package/dist/stories/NodeDecorator.svelte.d.ts +1 -1
  363. package/dist/stories/utils.d.ts +2 -2
  364. package/dist/stories/utils.js +89 -93
  365. package/dist/styles/base.css +16 -50
  366. package/dist/styles/tokens.css +10 -28
  367. package/dist/svelte-app.d.ts +10 -10
  368. package/dist/svelte-app.js +39 -39
  369. package/dist/themes/default.d.ts +1 -1
  370. package/dist/themes/default.js +4 -4
  371. package/dist/themes/index.d.ts +3 -3
  372. package/dist/themes/index.js +11 -11
  373. package/dist/themes/minimal.d.ts +1 -1
  374. package/dist/themes/minimal.js +5 -5
  375. package/dist/types/agentspec.d.ts +18 -18
  376. package/dist/types/agentspec.js +2 -2
  377. package/dist/types/auth.d.ts +1 -1
  378. package/dist/types/auth.js +6 -6
  379. package/dist/types/chat.d.ts +2 -2
  380. package/dist/types/config.d.ts +6 -6
  381. package/dist/types/events.d.ts +3 -3
  382. package/dist/types/events.js +2 -2
  383. package/dist/types/index.d.ts +32 -32
  384. package/dist/types/index.js +6 -6
  385. package/dist/types/interrupt.d.ts +6 -6
  386. package/dist/types/interrupt.js +21 -21
  387. package/dist/types/interruptState.d.ts +12 -12
  388. package/dist/types/interruptState.js +66 -66
  389. package/dist/types/playground.d.ts +7 -7
  390. package/dist/types/playground.js +14 -14
  391. package/dist/types/settings.d.ts +7 -5
  392. package/dist/types/settings.js +19 -24
  393. package/dist/types/skin.d.ts +1 -1
  394. package/dist/types/theme.d.ts +2 -2
  395. package/dist/types/uischema.d.ts +4 -4
  396. package/dist/types/uischema.js +3 -3
  397. package/dist/utils/colors.d.ts +1 -1
  398. package/dist/utils/colors.js +95 -97
  399. package/dist/utils/config.d.ts +2 -2
  400. package/dist/utils/config.js +48 -48
  401. package/dist/utils/connections.d.ts +2 -2
  402. package/dist/utils/connections.js +15 -15
  403. package/dist/utils/edgeStyling.d.ts +2 -2
  404. package/dist/utils/edgeStyling.js +36 -39
  405. package/dist/utils/errors.js +3 -3
  406. package/dist/utils/fetchWithAuth.d.ts +1 -1
  407. package/dist/utils/fetchWithAuth.js +2 -2
  408. package/dist/utils/handleIds.d.ts +2 -2
  409. package/dist/utils/handleIds.js +8 -8
  410. package/dist/utils/handlePositioning.d.ts +1 -1
  411. package/dist/utils/handlePositioning.js +2 -2
  412. package/dist/utils/icons.d.ts +1 -1
  413. package/dist/utils/icons.js +74 -74
  414. package/dist/utils/logger.d.ts +1 -1
  415. package/dist/utils/logger.js +7 -7
  416. package/dist/utils/nodeIds.d.ts +1 -1
  417. package/dist/utils/nodeIds.js +1 -1
  418. package/dist/utils/nodeStatus.d.ts +1 -1
  419. package/dist/utils/nodeStatus.js +48 -48
  420. package/dist/utils/nodeSwap.d.ts +9 -9
  421. package/dist/utils/nodeSwap.js +52 -58
  422. package/dist/utils/nodeTypes.d.ts +1 -1
  423. package/dist/utils/nodeTypes.js +20 -21
  424. package/dist/utils/nodeWrapper.d.ts +7 -7
  425. package/dist/utils/nodeWrapper.js +19 -21
  426. package/dist/utils/performanceUtils.d.ts +1 -1
  427. package/dist/utils/performanceUtils.js +1 -2
  428. package/dist/utils/portUtils.d.ts +2 -2
  429. package/dist/utils/portUtils.js +1 -1
  430. package/dist/utils/sanitize.js +1 -1
  431. package/dist/utils/uischema.d.ts +2 -2
  432. package/dist/utils/uischema.js +8 -8
  433. package/dist/utils/validation.js +8 -8
  434. package/package.json +7 -11
@@ -1,30 +1,30 @@
1
1
  <script lang="ts">
2
- import type {
3
- ChatHistoryMessage,
4
- ChatRequest,
5
- CommandPreviewItem,
6
- } from "../../types/chat.js";
7
- import type { NodeMetadata } from "../../types/index.js";
8
- import type { UIAction } from "../../commands/types.js";
9
- import type { EndpointConfig } from "../../config/endpoints.js";
10
- import { chatService } from "../../services/chatService.js";
11
- import { getWorkflowStore } from "../../stores/workflowStore.svelte.js";
12
- import { extractCommands } from "../../chat/responseParser.js";
13
- import { isMutatingCommand } from "../../chat/commandClassifier.js";
14
- import { parseCommand } from "../../commands/parser.js";
15
- import { executeCommand, executeBatch } from "../../commands/index.js";
16
- import { createStoreCommandContext } from "../../commands/storeIntegration.svelte.js";
17
- import CommandPreview from "./CommandPreview.svelte";
18
- import { tick } from "svelte";
19
- import Icon from "@iconify/svelte";
2
+ import type { ChatHistoryMessage, ChatRequest, CommandPreviewItem } from '../../types/chat.js';
3
+ import type { NodeMetadata } from '../../types/index.js';
4
+ import type { UIAction } from '../../commands/types.js';
5
+ import type { EndpointConfig } from '../../config/endpoints.js';
6
+ import { chatService } from '../../services/chatService.js';
7
+ import { getWorkflowStore } from '../../stores/workflowStore.svelte.js';
8
+ import { getBehaviorSettings } from '../../stores/settingsStore.svelte.js';
9
+ import { extractCommands } from '../../chat/responseParser.js';
10
+ import { isMutatingCommand } from '../../chat/commandClassifier.js';
11
+ import { parseCommand } from '../../commands/parser.js';
12
+ import { executeCommand } from '../../commands/index.js';
13
+ import { createStoreCommandContext } from '../../commands/storeIntegration.svelte.js';
14
+ import CommandPreview from './CommandPreview.svelte';
15
+ import MarkdownDisplay from '../MarkdownDisplay.svelte';
16
+ import { tick } from 'svelte';
17
+ import Icon from '@iconify/svelte';
20
18
 
21
19
  // =========================================================================
22
20
  // Internal Display Message Type
23
21
  // =========================================================================
24
22
 
25
23
  interface DisplayMessage {
26
- role: "user" | "assistant";
24
+ role: 'user' | 'assistant';
27
25
  content: string;
26
+ /** Set on auto-retry messages — renders as a muted notice, not a user bubble */
27
+ retryAttempt?: number;
28
28
  /** Mutating commands awaiting approval */
29
29
  commandPreview?: CommandPreviewItem[];
30
30
  /** Results from auto-executed read-only commands */
@@ -45,25 +45,23 @@
45
45
  // State
46
46
  // =========================================================================
47
47
 
48
+ const MAX_AUTO_RETRIES = 3;
49
+
48
50
  let displayMessages: DisplayMessage[] = $state([]);
49
- let inputValue: string = $state("");
51
+ let inputValue: string = $state('');
50
52
  let isLoading: boolean = $state(false);
51
53
  let inputElement: HTMLTextAreaElement | undefined = $state();
52
54
  let messagesElement: HTMLDivElement | undefined = $state();
55
+ let autoRetryCount = 0;
53
56
 
54
57
  // =========================================================================
55
58
  // Derived State
56
59
  // =========================================================================
57
60
 
58
61
  const isDisabled = $derived(!workflowId);
59
- const isChatConfigured = $derived(
60
- endpointConfig?.endpoints?.chat !== undefined,
61
- );
62
+ const isChatConfigured = $derived(endpointConfig?.endpoints?.chat !== undefined);
62
63
  const canSend = $derived(
63
- inputValue.trim().length > 0 &&
64
- !isLoading &&
65
- !isDisabled &&
66
- isChatConfigured,
64
+ inputValue.trim().length > 0 && !isLoading && !isDisabled && isChatConfigured
67
65
  );
68
66
 
69
67
  // =========================================================================
@@ -71,8 +69,8 @@
71
69
  // =========================================================================
72
70
 
73
71
  $effect(() => {
74
- const _count = displayMessages.length;
75
- const _loading = isLoading;
72
+ displayMessages.length;
73
+ isLoading;
76
74
  tick().then(() => {
77
75
  if (messagesElement) {
78
76
  messagesElement.scrollTop = messagesElement.scrollHeight;
@@ -97,15 +95,15 @@
97
95
  id: n.id,
98
96
  type: n.type,
99
97
  data: n.data,
100
- position: n.position,
98
+ position: n.position
101
99
  })),
102
100
  edges: workflow.edges.map((e) => ({
103
101
  id: e.id,
104
102
  source: e.source,
105
103
  sourceHandle: e.sourceHandle,
106
104
  target: e.target,
107
- targetHandle: e.targetHandle,
108
- })),
105
+ targetHandle: e.targetHandle
106
+ }))
109
107
  };
110
108
  }
111
109
 
@@ -126,7 +124,7 @@
126
124
 
127
125
  // No commands — pure chat message
128
126
  if (commands.length === 0) {
129
- return { role: "assistant", content: explanation || responseContent };
127
+ return { role: 'assistant', content: explanation || responseContent };
130
128
  }
131
129
 
132
130
  const context = getCommandContext();
@@ -137,7 +135,7 @@
137
135
  const parsed = parseCommand(raw);
138
136
  if (!parsed.ok) {
139
137
  // Treat parse errors as mutating (show in preview as error)
140
- mutatingCommands.push({ raw, status: "error", result: parsed.error });
138
+ mutatingCommands.push({ raw, status: 'error', result: parsed.error });
141
139
  continue;
142
140
  }
143
141
 
@@ -154,13 +152,13 @@
154
152
  readOnlyResults.push(`> ${raw}\nError: No workflow loaded`);
155
153
  }
156
154
  } else {
157
- mutatingCommands.push({ raw, status: "pending" });
155
+ mutatingCommands.push({ raw, status: 'pending' });
158
156
  }
159
157
  }
160
158
 
161
159
  const msg: DisplayMessage = {
162
- role: "assistant",
163
- content: explanation || responseContent,
160
+ role: 'assistant',
161
+ content: explanation || responseContent
164
162
  };
165
163
 
166
164
  if (readOnlyResults.length > 0) {
@@ -173,119 +171,159 @@
173
171
  return msg;
174
172
  }
175
173
 
176
- /** Execute all pending mutating commands in a CommandPreview via executeBatch */
177
- function handleApproveCommands(messageIndex: number) {
174
+ /** Execute all pending mutating commands one by one with progressive UI feedback */
175
+ async function handleApproveCommands(messageIndex: number) {
178
176
  const msg = displayMessages[messageIndex];
179
177
  if (!msg?.commandPreview) return;
180
178
 
181
179
  const context = getCommandContext();
182
180
  if (!context) {
183
- // Mark all as error
184
181
  for (const cmd of msg.commandPreview) {
185
- if (cmd.status === "pending") {
186
- cmd.status = "error";
187
- cmd.result = "No workflow loaded";
182
+ if (cmd.status === 'pending') {
183
+ cmd.status = 'error';
184
+ cmd.result = 'No workflow loaded';
188
185
  }
189
186
  }
190
- appendErrorToHistory("Command execution failed: No workflow loaded");
187
+ appendErrorToHistory('Command execution failed: No workflow loaded');
191
188
  return;
192
189
  }
193
190
 
194
- // Parse all pending commands
195
- const pendingItems = msg.commandPreview.filter(
196
- (c) => c.status === "pending",
197
- );
198
- const parsedCommands: { item: CommandPreviewItem; command: unknown }[] = [];
191
+ // Parse all pending commands first, before touching any status
192
+ const pendingItems = msg.commandPreview.filter((c) => c.status === 'pending');
193
+ const parsedCommands: {
194
+ item: CommandPreviewItem;
195
+ command: import('../../commands/types.js').Command;
196
+ }[] = [];
199
197
 
200
198
  for (const item of pendingItems) {
201
- item.status = "executing";
202
199
  const parsed = parseCommand(item.raw);
203
200
  if (!parsed.ok) {
204
- item.status = "error";
201
+ item.status = 'error';
205
202
  item.result = parsed.error;
206
- // Revert other executing items back to pending
207
- for (const other of pendingItems) {
208
- if (other.status === "executing") other.status = "pending";
209
- }
210
- appendErrorToHistory(
211
- `Command parse error for "${item.raw}": ${parsed.error}`,
212
- );
203
+ appendErrorToHistory(`Command parse error for "${item.raw}": ${parsed.error}`);
213
204
  return;
214
205
  }
215
206
  parsedCommands.push({ item, command: parsed.command });
216
207
  }
217
208
 
218
- // Execute atomically via executeBatch
219
- const commands = parsedCommands.map(
220
- (p) => p.command,
221
- ) as import("../../commands/types.js").Command[];
209
+ // Execute commands one by one inside a single transaction.
210
+ // A 100ms pause between commands lets the canvas visibly update at each step.
211
+ const totalCount = parsedCommands.length;
212
+ context.dispatch.startTransaction(
213
+ totalCount === 1 ? 'batch: 1 command' : `batch: ${totalCount} commands`
214
+ );
215
+
216
+ let completedCount = 0;
217
+ let batchError: string | undefined;
222
218
 
223
- let batchResult: ReturnType<typeof executeBatch>;
224
219
  try {
225
- batchResult = executeBatch(commands, context);
220
+ for (let i = 0; i < parsedCommands.length; i++) {
221
+ const { item, command } = parsedCommands[i];
222
+ item.status = 'executing';
223
+
224
+ const result = executeCommand(command, context);
225
+
226
+ if (!result.ok) {
227
+ item.status = 'error';
228
+ item.result = result.error;
229
+ batchError = result.error;
230
+ context.dispatch.cancelTransaction();
231
+ break;
232
+ }
233
+
234
+ item.status = 'success';
235
+ item.result = result.message;
236
+ completedCount++;
237
+
238
+ // Pause between commands so canvas updates are visibly distinct
239
+ if (i < parsedCommands.length - 1) {
240
+ await new Promise<void>((resolve) => setTimeout(resolve, 100));
241
+ }
242
+ }
226
243
  } catch (err) {
227
- // Unexpected error — reset all items to pending so the UI isn't stuck
244
+ context.dispatch.cancelTransaction();
228
245
  for (const { item } of parsedCommands) {
229
- item.status = "pending";
246
+ if (item.status === 'executing') item.status = 'pending';
230
247
  }
231
248
  appendErrorToHistory(
232
- `Unexpected execution error: ${err instanceof Error ? err.message : String(err)}`,
249
+ `Unexpected execution error: ${err instanceof Error ? err.message : String(err)}`
233
250
  );
234
251
  return;
235
252
  }
236
253
 
237
- // Update status for each command
238
- for (let i = 0; i < parsedCommands.length; i++) {
239
- const { item } = parsedCommands[i];
240
- const result = batchResult.results[i];
241
- if (result) {
242
- if (result.ok) {
243
- item.status = "success";
244
- item.result = result.message;
245
- } else {
246
- item.status = "error";
247
- item.result = result.error;
248
- }
249
- } else {
250
- // Commands after the failed one weren't executed
251
- item.status = "pending";
252
- }
254
+ if (!batchError) {
255
+ context.dispatch.commitTransaction();
256
+ return;
253
257
  }
254
258
 
255
- if (!batchResult.ok) {
259
+ if (getBehaviorSettings().chatAutoRetry && workflowId && autoRetryCount < MAX_AUTO_RETRIES) {
260
+ autoRetryCount++;
261
+ const errorText = buildBatchErrorMessage(
262
+ completedCount,
263
+ totalCount,
264
+ batchError,
265
+ pendingItems
266
+ );
267
+ await sendMessageInternal(errorText, autoRetryCount);
268
+ } else {
256
269
  appendErrorToHistory(
257
- `Command execution failed at command ${batchResult.completedCount + 1}/${batchResult.totalCount}: ${batchResult.error}`,
270
+ `Command execution failed at command ${completedCount + 1}/${totalCount}: ${batchError}`
258
271
  );
259
272
  }
260
273
  }
261
274
 
262
- /** Dismiss a command preview without executing */
263
- function handleCancelCommands(messageIndex: number) {
264
- const msg = displayMessages[messageIndex];
265
- if (!msg?.commandPreview) return;
266
- // Remove the command preview entirely
267
- msg.commandPreview = undefined;
275
+ /** Dismiss a command preview without executing — CommandPreview shows its own cancelled state */
276
+ function handleCancelCommands(_messageIndex: number) {
277
+ // Intentionally empty: CommandPreview owns the "Dismissed" display via resolvedAction state
268
278
  }
269
279
 
270
280
  /** Append an error message to conversation history so the LLM can self-correct */
271
281
  function appendErrorToHistory(errorMessage: string) {
272
282
  displayMessages.push({
273
- role: "assistant",
274
- content: `Error: ${errorMessage}`,
283
+ role: 'assistant',
284
+ content: `Error: ${errorMessage}`
275
285
  });
276
286
  }
277
287
 
288
+ /** Build a structured error report from a failed batch for the LLM */
289
+ function buildBatchErrorMessage(
290
+ completedCount: number,
291
+ totalCount: number,
292
+ error: string,
293
+ items: CommandPreviewItem[]
294
+ ): string {
295
+ const lines: string[] = [
296
+ `Batch execution failed at command ${completedCount + 1}/${totalCount}: ${error}`
297
+ ];
298
+
299
+ if (completedCount > 0) {
300
+ lines.push('\nCommands that succeeded (rolled back):');
301
+ for (let i = 0; i < completedCount; i++) {
302
+ lines.push(` ${i + 1}. ${items[i].raw}`);
303
+ }
304
+ }
305
+
306
+ lines.push('\nFailed command:');
307
+ lines.push(` ${items[completedCount]?.raw ?? '(unknown)'}`);
308
+
309
+ const remaining = totalCount - completedCount - 1;
310
+ if (remaining > 0) {
311
+ lines.push(`\n${remaining} command(s) were skipped.`);
312
+ }
313
+
314
+ lines.push('\nPlease provide corrected commands to achieve the same goal.');
315
+ return lines.join('\n');
316
+ }
317
+
278
318
  // =========================================================================
279
319
  // Message Handling
280
320
  // =========================================================================
281
321
 
282
- async function sendMessage() {
283
- const text = inputValue.trim();
322
+ /** Core send logic — shared by manual sends and auto-retry */
323
+ async function sendMessageInternal(text: string, retryAttempt?: number) {
284
324
  if (!text || isLoading || !workflowId) return;
285
325
 
286
- // Add user message
287
- displayMessages.push({ role: "user", content: text });
288
- inputValue = "";
326
+ displayMessages.push({ role: 'user', content: text, retryAttempt });
289
327
  isLoading = true;
290
328
 
291
329
  try {
@@ -293,20 +331,17 @@
293
331
  const request: ChatRequest = {
294
332
  message: text,
295
333
  workflowState: getWorkflowState(),
296
- history: history.slice(0, -1), // all except current message (already sent as `message`)
334
+ history: history.slice(0, -1) // all except current message
297
335
  };
298
336
 
299
337
  const response = await chatService.sendMessage(workflowId, request);
300
-
301
- // Process response: extract commands, auto-execute read-only, queue mutating
302
338
  const displayMsg = processResponse(response.content);
303
339
  displayMessages.push(displayMsg);
304
340
  } catch (err) {
305
- const errorMessage =
306
- err instanceof Error ? err.message : "Failed to send message";
341
+ const errorMessage = err instanceof Error ? err.message : 'Failed to send message';
307
342
  displayMessages.push({
308
- role: "assistant",
309
- content: `Error: ${errorMessage}`,
343
+ role: 'assistant',
344
+ content: `Error: ${errorMessage}`
310
345
  });
311
346
  } finally {
312
347
  isLoading = false;
@@ -314,8 +349,16 @@
314
349
  }
315
350
  }
316
351
 
352
+ async function sendMessage() {
353
+ const text = inputValue.trim();
354
+ if (!text || isLoading || !workflowId) return;
355
+ inputValue = '';
356
+ autoRetryCount = 0;
357
+ await sendMessageInternal(text);
358
+ }
359
+
317
360
  function handleKeydown(event: KeyboardEvent) {
318
- if (event.key === "Enter" && !event.shiftKey) {
361
+ if (event.key === 'Enter' && !event.shiftKey) {
319
362
  event.preventDefault();
320
363
  sendMessage();
321
364
  }
@@ -337,12 +380,7 @@
337
380
  </div>
338
381
  {:else}
339
382
  <!-- Messages area -->
340
- <div
341
- class="ai-chat-panel__messages"
342
- bind:this={messagesElement}
343
- role="log"
344
- aria-live="polite"
345
- >
383
+ <div class="ai-chat-panel__messages" bind:this={messagesElement} role="log" aria-live="polite">
346
384
  {#if displayMessages.length === 0}
347
385
  <div class="ai-chat-panel__empty">
348
386
  <Icon icon="mdi:chat-outline" />
@@ -350,25 +388,42 @@
350
388
  </div>
351
389
  {/if}
352
390
  {#each displayMessages as message, msgIndex}
353
- <div class="ai-chat-panel__bubble ai-chat-panel__bubble--{message.role}">
354
- <div class="ai-chat-panel__bubble-content">{message.content}</div>
355
- {#if message.readOnlyResults && message.readOnlyResults.length > 0}
356
- <div class="ai-chat-panel__readonly-results">
357
- {#each message.readOnlyResults as result}
358
- <pre class="ai-chat-panel__readonly-result">{result}</pre>
359
- {/each}
360
- </div>
361
- {/if}
362
- {#if message.commandPreview && message.commandPreview.length > 0}
363
- <div class="ai-chat-panel__command-preview">
364
- <CommandPreview
365
- commands={message.commandPreview}
366
- onApprove={() => handleApproveCommands(msgIndex)}
367
- onCancel={() => handleCancelCommands(msgIndex)}
368
- />
369
- </div>
370
- {/if}
371
- </div>
391
+ {#if message.retryAttempt !== undefined}
392
+ <div
393
+ class="ai-chat-panel__retry-notice"
394
+ class:ai-chat-panel__retry-notice--active={isLoading &&
395
+ msgIndex === displayMessages.length - 1}
396
+ >
397
+ <Icon icon="mdi:autorenew" />
398
+ <span>Auto-retrying (attempt {message.retryAttempt}/{MAX_AUTO_RETRIES})…</span>
399
+ </div>
400
+ {:else}
401
+ <div class="ai-chat-panel__bubble ai-chat-panel__bubble--{message.role}">
402
+ {#if message.role === 'user'}
403
+ <div class="ai-chat-panel__bubble-content">{message.content}</div>
404
+ {:else}
405
+ <div class="ai-chat-panel__bubble-content">
406
+ <MarkdownDisplay content={message.content} />
407
+ </div>
408
+ {/if}
409
+ {#if message.readOnlyResults && message.readOnlyResults.length > 0}
410
+ <div class="ai-chat-panel__readonly-results">
411
+ {#each message.readOnlyResults as result}
412
+ <pre class="ai-chat-panel__readonly-result">{result}</pre>
413
+ {/each}
414
+ </div>
415
+ {/if}
416
+ {#if message.commandPreview && message.commandPreview.length > 0}
417
+ <div class="ai-chat-panel__command-preview">
418
+ <CommandPreview
419
+ commands={message.commandPreview}
420
+ onApprove={() => handleApproveCommands(msgIndex)}
421
+ onCancel={() => handleCancelCommands(msgIndex)}
422
+ />
423
+ </div>
424
+ {/if}
425
+ </div>
426
+ {/if}
372
427
  {/each}
373
428
  {#if isLoading}
374
429
  <div class="ai-chat-panel__bubble ai-chat-panel__bubble--assistant">
@@ -388,7 +443,7 @@
388
443
  bind:value={inputValue}
389
444
  onkeydown={handleKeydown}
390
445
  class="ai-chat-panel__input"
391
- placeholder={placeholder ?? "Describe what you want to build..."}
446
+ placeholder={placeholder ?? 'Describe what you want to build...'}
392
447
  rows="1"
393
448
  disabled={isLoading}
394
449
  ></textarea>
@@ -480,6 +535,23 @@
480
535
  font-size: 1.5rem;
481
536
  }
482
537
 
538
+ /* Auto-retry notice */
539
+ .ai-chat-panel__retry-notice {
540
+ display: flex;
541
+ align-items: center;
542
+ justify-content: center;
543
+ gap: var(--fd-space-xs);
544
+ font-size: var(--fd-text-xs);
545
+ color: var(--fd-muted-foreground);
546
+ opacity: 0.7;
547
+ padding: var(--fd-space-3xs) 0;
548
+ animation: fadeIn 0.15s ease-out;
549
+ }
550
+
551
+ .ai-chat-panel__retry-notice--active :global(svg) {
552
+ animation: spin 1s linear infinite;
553
+ }
554
+
483
555
  /* Message bubbles */
484
556
  .ai-chat-panel__bubble {
485
557
  max-width: 80%;
@@ -499,7 +571,6 @@
499
571
  border-radius: var(--fd-radius-md);
500
572
  font-size: var(--fd-text-sm);
501
573
  line-height: 1.5;
502
- white-space: pre-wrap;
503
574
  word-break: break-word;
504
575
  }
505
576
 
@@ -507,6 +578,7 @@
507
578
  background: var(--fd-primary);
508
579
  color: var(--fd-primary-foreground);
509
580
  border-bottom-right-radius: var(--fd-radius-xs);
581
+ white-space: pre-wrap;
510
582
  }
511
583
 
512
584
  .ai-chat-panel__bubble--assistant .ai-chat-panel__bubble-content {
@@ -515,6 +587,64 @@
515
587
  border-bottom-left-radius: var(--fd-radius-xs);
516
588
  }
517
589
 
590
+ /* Markdown typography inside assistant bubbles */
591
+ .ai-chat-panel__bubble--assistant .ai-chat-panel__bubble-content :global(.markdown-display) {
592
+ font-size: inherit;
593
+ line-height: inherit;
594
+ color: inherit;
595
+ }
596
+
597
+ .ai-chat-panel__bubble--assistant .ai-chat-panel__bubble-content :global(p) {
598
+ margin: 0 0 0.5em;
599
+ }
600
+
601
+ .ai-chat-panel__bubble--assistant .ai-chat-panel__bubble-content :global(p:last-child),
602
+ .ai-chat-panel__bubble--assistant .ai-chat-panel__bubble-content :global(ul:last-child),
603
+ .ai-chat-panel__bubble--assistant .ai-chat-panel__bubble-content :global(ol:last-child) {
604
+ margin-bottom: 0;
605
+ }
606
+
607
+ .ai-chat-panel__bubble--assistant .ai-chat-panel__bubble-content :global(ul),
608
+ .ai-chat-panel__bubble--assistant .ai-chat-panel__bubble-content :global(ol) {
609
+ margin: 0 0 0.5em;
610
+ padding-left: 1.25em;
611
+ }
612
+
613
+ .ai-chat-panel__bubble--assistant .ai-chat-panel__bubble-content :global(li) {
614
+ margin-bottom: 0.2em;
615
+ }
616
+
617
+ .ai-chat-panel__bubble--assistant .ai-chat-panel__bubble-content :global(code) {
618
+ font-family: var(--fd-font-mono);
619
+ font-size: 0.875em;
620
+ background: var(--fd-background);
621
+ padding: 0.1em 0.3em;
622
+ border-radius: var(--fd-radius-xs);
623
+ }
624
+
625
+ .ai-chat-panel__bubble--assistant .ai-chat-panel__bubble-content :global(pre) {
626
+ background: var(--fd-background);
627
+ border: 1px solid var(--fd-border);
628
+ border-radius: var(--fd-radius-sm);
629
+ padding: var(--fd-space-xs) var(--fd-space-sm);
630
+ overflow-x: auto;
631
+ margin: 0.5em 0;
632
+ }
633
+
634
+ .ai-chat-panel__bubble--assistant .ai-chat-panel__bubble-content :global(pre code) {
635
+ background: none;
636
+ padding: 0;
637
+ font-size: var(--fd-text-xs);
638
+ }
639
+
640
+ .ai-chat-panel__bubble--assistant .ai-chat-panel__bubble-content :global(strong) {
641
+ font-weight: 600;
642
+ }
643
+
644
+ .ai-chat-panel__bubble--assistant .ai-chat-panel__bubble-content :global(em) {
645
+ font-style: italic;
646
+ }
647
+
518
648
  /* Read-only command results */
519
649
  .ai-chat-panel__readonly-results {
520
650
  margin-top: var(--fd-space-xs);
@@ -580,6 +710,15 @@
580
710
  animation-delay: 0.4s;
581
711
  }
582
712
 
713
+ @keyframes spin {
714
+ from {
715
+ transform: rotate(0deg);
716
+ }
717
+ to {
718
+ transform: rotate(360deg);
719
+ }
720
+ }
721
+
583
722
  @keyframes bounce {
584
723
  0%,
585
724
  60%,
@@ -1,6 +1,6 @@
1
- import type { NodeMetadata } from "../../types/index.js";
2
- import type { UIAction } from "../../commands/types.js";
3
- import type { EndpointConfig } from "../../config/endpoints.js";
1
+ import type { NodeMetadata } from '../../types/index.js';
2
+ import type { UIAction } from '../../commands/types.js';
3
+ import type { EndpointConfig } from '../../config/endpoints.js';
4
4
  interface Props {
5
5
  nodeTypes: NodeMetadata[];
6
6
  workflowId?: string;