windmill-components 1.677.1 → 1.695.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/package/components/AppConnectInner.svelte +6 -0
- package/package/components/ArgInput.svelte +2 -0
- package/package/components/AutoscalingConfigEditor.svelte +18 -4
- package/package/components/CiTestResults.svelte +64 -0
- package/package/components/CiTestResults.svelte.d.ts +7 -0
- package/package/components/CompareWorkspaces.svelte +741 -484
- package/package/components/DBManager.svelte +35 -4
- package/package/components/DBManager.svelte.d.ts +2 -0
- package/package/components/DBManagerContent.svelte +3 -1
- package/package/components/DBManagerContent.svelte.d.ts +3 -0
- package/package/components/DBManagerDrawer.svelte +145 -3
- package/package/components/DBTableEditor.svelte +14 -4
- package/package/components/DatatablePicker.svelte +2 -5
- package/package/components/DatatableSchemaDiff.svelte +531 -0
- package/package/components/DatatableSchemaDiff.svelte.d.ts +29 -0
- package/package/components/DedicatedWorkersSelector.svelte +4 -2
- package/package/components/DefaultTagsInner.svelte +42 -2
- package/package/components/DeployWorkspaceDrawer.svelte +1 -1
- package/package/components/Dev.svelte +407 -74
- package/package/components/EditableSchemaForm.svelte +4 -0
- package/package/components/Editor.svelte +1 -1
- package/package/components/EditorBar.svelte +1 -1
- package/package/components/EditorBar.svelte.d.ts +1 -1
- package/package/components/ErrorOrRecoveryHandler.svelte +2 -2
- package/package/components/FlowPreviewContent.svelte +32 -30
- package/package/components/FlowRestartButton.svelte +143 -61
- package/package/components/FlowRestartButton.svelte.d.ts +37 -0
- package/package/components/FlowStatusViewer.svelte +15 -1
- package/package/components/FlowStatusViewer.svelte.d.ts +10 -2
- package/package/components/FlowStatusViewerInner.svelte +270 -222
- package/package/components/FlowStatusViewerInner.svelte.d.ts +6 -2
- package/package/components/FlowTimeline.svelte +1 -1
- package/package/components/FolderEditor.svelte +189 -4
- package/package/components/ForkConflictModal.svelte +57 -0
- package/package/components/ForkConflictModal.svelte.d.ts +3 -0
- package/package/components/ForkWorkspaceBanner.svelte +82 -11
- package/package/components/GitRepoViewer.svelte +251 -97
- package/package/components/GlobalUserOffboardingModal.svelte +293 -0
- package/package/components/GlobalUserOffboardingModal.svelte.d.ts +10 -0
- package/package/components/InputTransformSchemaForm.svelte +1 -1
- package/package/components/InstanceSettings.svelte +58 -19
- package/package/components/Login.svelte +133 -36
- package/package/components/Login.svelte.d.ts +1 -0
- package/package/components/ModuleTest.svelte +2 -1
- package/package/components/NoMainFuncBadge.svelte +1 -1
- package/package/components/OffboardItemsBox.svelte +56 -0
- package/package/components/OffboardItemsBox.svelte.d.ts +12 -0
- package/package/components/OffboardReassignControls.svelte +47 -0
- package/package/components/OffboardReassignControls.svelte.d.ts +20 -0
- package/package/components/OffboardWorkspaceSection.svelte +110 -0
- package/package/components/OffboardWorkspaceSection.svelte.d.ts +24 -0
- package/package/components/OnBehalfOfSelector.svelte +21 -3
- package/package/components/OnBehalfOfSelector.svelte.d.ts +7 -0
- package/package/components/Path.svelte +7 -1
- package/package/components/Path.svelte.d.ts +1 -1
- package/package/components/QueueAlerts.svelte +10 -10
- package/package/components/ResourcePicker.svelte +2 -2
- package/package/components/RunsPage.svelte +2 -1
- package/package/components/S3FilePickerInner.svelte +89 -89
- package/package/components/ScriptBuilder.svelte +52 -11
- package/package/components/ScriptEditor.svelte +19 -8
- package/package/components/ScriptEditor.svelte.d.ts +1 -1
- package/package/components/ShareModal.svelte +236 -98
- package/package/components/ShareModal.svelte.d.ts +1 -1
- package/package/components/SuperadminSettingsInner.svelte +362 -315
- package/package/components/UserOffboardingModal.svelte +238 -0
- package/package/components/UserOffboardingModal.svelte.d.ts +10 -0
- package/package/components/WorkspaceDeployLayout.svelte +3 -3
- package/package/components/WorkspaceDeployLayout.svelte.d.ts +1 -0
- package/package/components/apps/components/helpers/RunnableComponent.svelte.d.ts +3 -0
- package/package/components/apps/components/helpers/executeRunnable.js +2 -1
- package/package/components/apps/editor/AppReportsDrawerInner.svelte +1 -1
- package/package/components/apps/editor/appPolicy.js +2 -1
- package/package/components/apps/editor/commonAppUtils.d.ts +3 -0
- package/package/components/apps/editor/inlineScriptsPanel/CacheTtlPopup.svelte +1 -1
- package/package/components/apps/editor/inlineScriptsPanel/InlineScriptEditor.svelte +7 -0
- package/package/components/apps/editor/inlineScriptsPanel/InlineScriptRunnableByPath.svelte +4 -2
- package/package/components/apps/editor/inlineScriptsPanel/TagPopup.svelte +49 -0
- package/package/components/apps/editor/inlineScriptsPanel/TagPopup.svelte.d.ts +9 -0
- package/package/components/apps/editor/settingsPanel/mainInput/RunnableSelector.svelte +12 -0
- package/package/components/apps/inputType.d.ts +1 -0
- package/package/components/apps/sharedTypes.d.ts +1 -0
- package/package/components/assets/AssetsDropdownButton.svelte +1 -1
- package/package/components/auditLogs/AuditLogsFilters.svelte +8 -3
- package/package/components/common/confirmationModal/ConfirmationModal.svelte +1 -1
- package/package/components/common/fileUpload/S3ArgInput.svelte +12 -10
- package/package/components/common/fileUpload/S3ArgInput.svelte.d.ts +2 -0
- package/package/components/common/table/AppRow.svelte +3 -3
- package/package/components/common/table/FlowRow.svelte +3 -3
- package/package/components/common/table/RawAppRow.svelte +4 -4
- package/package/components/common/table/Row.svelte +6 -2
- package/package/components/common/table/ScriptRow.svelte +11 -3
- package/package/components/copilot/chat/AIChatDisplay.svelte +5 -36
- package/package/components/copilot/chat/AIChatInput.svelte +56 -47
- package/package/components/copilot/chat/AIChatManager.svelte.js +50 -48
- package/package/components/copilot/chat/ContextElementBadge.svelte +6 -4
- package/package/components/copilot/chat/anthropic.d.ts +7 -1
- package/package/components/copilot/chat/anthropic.js +5 -2
- package/package/components/copilot/chat/app/core.d.ts +12 -20
- package/package/components/copilot/chat/app/core.js +230 -159
- package/package/components/copilot/chat/app/core.test.js +417 -0
- package/package/components/copilot/chat/chatLoop.d.ts +3 -0
- package/package/components/copilot/chat/chatLoop.js +13 -5
- package/package/components/copilot/chat/context.js +44 -0
- package/package/components/copilot/chat/flow/FlowAIChat.svelte +57 -76
- package/package/components/copilot/chat/flow/core.d.ts +14 -3
- package/package/components/copilot/chat/flow/core.js +494 -116
- package/package/components/copilot/chat/flow/helperUtils.d.ts +22 -0
- package/package/components/copilot/chat/flow/helperUtils.js +100 -0
- package/package/components/copilot/chat/flow/helperUtils.test.js +231 -0
- package/package/components/copilot/chat/flow/inlineScriptsUtils.d.ts +5 -24
- package/package/components/copilot/chat/flow/inlineScriptsUtils.js +30 -55
- package/package/components/copilot/chat/flow/openFlow.json +1 -1
- package/package/components/copilot/chat/flow/openFlowZod.gen.js +24 -0
- package/package/components/copilot/chat/flow/utils.test.js +59 -0
- package/package/components/copilot/chat/openai-responses.d.ts +7 -1
- package/package/components/copilot/chat/openai-responses.js +5 -2
- package/package/components/copilot/chat/script/core.js +3 -0
- package/package/components/copilot/chat/shared.d.ts +7 -2
- package/package/components/copilot/chat/shared.js +116 -53
- package/package/components/copilot/chat/shared.test.d.ts +1 -0
- package/package/components/copilot/chat/shared.test.js +412 -0
- package/package/components/copilot/chat/tokenUsage.d.ts +23 -0
- package/package/components/copilot/chat/tokenUsage.js +42 -0
- package/package/components/copilot/chat/workspaceTools.d.ts +7 -0
- package/package/components/copilot/chat/workspaceTools.js +239 -0
- package/package/components/copilot/chat/workspaceToolsZod.gen.d.ts +1295 -0
- package/package/components/copilot/chat/workspaceToolsZod.gen.js +424 -0
- package/package/components/copilot/lib.d.ts +5 -1
- package/package/components/copilot/lib.js +24 -6
- package/package/components/copilot/lib.test.d.ts +1 -0
- package/package/components/copilot/lib.test.js +19 -0
- package/package/components/copilot/modelConfig.d.ts +3 -0
- package/package/components/copilot/modelConfig.js +10 -0
- package/package/components/deploymentRequest/DeploymentRequestPanel.svelte +337 -0
- package/package/components/deploymentRequest/DeploymentRequestPanel.svelte.d.ts +15 -0
- package/package/components/details/CopyableCodeBlock.svelte +18 -8
- package/package/components/details/CopyableCodeBlock.svelte.d.ts +1 -0
- package/package/components/flows/FlowAssetsHandler.svelte +19 -21
- package/package/components/flows/FlowProgressBar.svelte +5 -2
- package/package/components/flows/agentToolTree.d.ts +17 -0
- package/package/components/flows/agentToolTree.js +114 -0
- package/package/components/flows/agentToolTree.test.d.ts +1 -0
- package/package/components/flows/agentToolTree.test.js +86 -0
- package/package/components/flows/agentToolUtils.d.ts +0 -5
- package/package/components/flows/agentToolUtils.js +0 -49
- package/package/components/flows/content/FlowLoop.svelte +7 -4
- package/package/components/flows/content/FlowModuleComponent.svelte +636 -599
- package/package/components/flows/content/FlowModuleDeleteAfterUse.svelte +15 -7
- package/package/components/flows/content/FlowSettings.svelte +29 -0
- package/package/components/flows/conversations/FlowChatManager.svelte.js +21 -10
- package/package/components/flows/dfs.d.ts +6 -2
- package/package/components/flows/dfs.js +19 -11
- package/package/components/flows/flowDeleteController.d.ts +32 -0
- package/package/components/flows/flowDeleteController.js +54 -0
- package/package/components/flows/flowDeleteController.test.d.ts +1 -0
- package/package/components/flows/flowDeleteController.test.js +121 -0
- package/package/components/flows/flowDeleteUtils.d.ts +48 -0
- package/package/components/flows/flowDeleteUtils.js +150 -0
- package/package/components/flows/flowDeleteUtils.test.d.ts +1 -0
- package/package/components/flows/flowDeleteUtils.test.js +131 -0
- package/package/components/flows/flowDiff.d.ts +2 -47
- package/package/components/flows/flowDiff.js +16 -293
- package/package/components/flows/flowDiff.testUtils.d.ts +8 -0
- package/package/components/flows/flowDiff.testUtils.js +26 -0
- package/package/components/flows/flowDiffManager.svelte.js +20 -75
- package/package/components/flows/flowDiffManager.svelte.test.js +103 -2
- package/package/components/flows/flowExplorer.d.ts +4 -0
- package/package/components/flows/flowExplorer.js +7 -30
- package/package/components/flows/flowState.d.ts +1 -0
- package/package/components/flows/flowStateUtils.svelte.js +11 -2
- package/package/components/flows/flowTree.d.ts +91 -0
- package/package/components/flows/flowTree.js +326 -0
- package/package/components/flows/flowTree.test.d.ts +1 -0
- package/package/components/flows/flowTree.test.js +236 -0
- package/package/components/flows/map/FlowJobsMenu.svelte +36 -30
- package/package/components/flows/map/FlowModuleSchemaItem.svelte +1 -1
- package/package/components/flows/map/FlowModuleSchemaMap.svelte +73 -229
- package/package/components/flows/map/FlowModuleSchemaMap.svelte.d.ts +1 -2
- package/package/components/flows/pickers/PickHubScriptQuick.svelte +2 -2
- package/package/components/flows/previousResults.js +13 -41
- package/package/components/flows/previousResults.test.d.ts +1 -0
- package/package/components/flows/previousResults.test.js +65 -0
- package/package/components/flows/propPicker/OutputPicker.svelte +2 -1
- package/package/components/flows/propPicker/OutputPickerInner.svelte +41 -4
- package/package/components/flows/propPicker/StepHistory.svelte +9 -1
- package/package/components/git_sync/GitSyncContext.svelte.js +11 -7
- package/package/components/git_sync/GitSyncRepositoryCard.svelte +2 -29
- package/package/components/git_sync/PullWorkspaceModal.svelte +6 -7
- package/package/components/graph/FlowGraphV2.svelte +8 -4
- package/package/components/graph/FlowGraphV2.svelte.d.ts +2 -0
- package/package/components/graph/groupedModulesProxy.svelte.d.ts +10 -0
- package/package/components/graph/groupedModulesProxy.svelte.js +17 -1
- package/package/components/graph/renderers/triggers/TriggersBadge.svelte +8 -2
- package/package/components/home/HomeConnectDrawer.svelte +125 -0
- package/package/components/home/HomeConnectDrawer.svelte.d.ts +5 -0
- package/package/components/home/deploy_ui.js +1 -1
- package/package/components/icons/AzureIcon.svelte +12 -25
- package/package/components/icons/AzureIcon.svelte.d.ts +3 -2
- package/package/components/icons/GithubIcon.svelte +4 -4
- package/package/components/icons/GithubIcon.svelte.d.ts +5 -2
- package/package/components/instanceSettings/ExternalJwtTokens.svelte +85 -0
- package/package/components/instanceSettings/ExternalJwtTokens.svelte.d.ts +12 -0
- package/package/components/instanceSettings/GhesAppSettings.svelte +17 -0
- package/package/components/instanceSettings/IndexerMemorySettings.svelte +56 -29
- package/package/components/instanceSettings/SecretBackendConfig.svelte +9 -2
- package/package/components/instanceSettings.d.ts +1 -0
- package/package/components/instanceSettings.js +66 -8
- package/package/components/mcp/McpScopeSelector.svelte +119 -9
- package/package/components/mcp/McpScopeSelector.svelte.d.ts +1 -0
- package/package/components/offboarding-utils.d.ts +11 -0
- package/package/components/offboarding-utils.js +102 -0
- package/package/components/progressBar/ProgressBar.svelte +9 -5
- package/package/components/progressBar/ProgressBar.svelte.d.ts +1 -0
- package/package/components/raw_apps/DeleteAfterUsePopup.svelte +52 -0
- package/package/components/raw_apps/DeleteAfterUsePopup.svelte.d.ts +9 -0
- package/package/components/raw_apps/RawAppBackgroundRunner.svelte +5 -1
- package/package/components/raw_apps/RawAppDataTableDrawer.svelte +1 -1
- package/package/components/raw_apps/RawAppEditor.svelte +186 -102
- package/package/components/raw_apps/RawAppEditorHeader.svelte +6 -1
- package/package/components/raw_apps/RawAppEditorHeader.svelte.d.ts +1 -0
- package/package/components/raw_apps/RawAppInlineScriptEditor.svelte +9 -3
- package/package/components/raw_apps/RawAppInlineScriptEditor.svelte.d.ts +2 -1
- package/package/components/raw_apps/RawAppInlineScriptRunnable.svelte +1 -0
- package/package/components/raw_apps/RawAppInlineScriptRunnable.svelte.d.ts +1 -0
- package/package/components/raw_apps/RawAppInputsSpecEditor.svelte +48 -5
- package/package/components/raw_apps/RawAppSharedUiDrawer.svelte +129 -0
- package/package/components/raw_apps/RawAppSharedUiDrawer.svelte.d.ts +5 -0
- package/package/components/raw_apps/RawAppSidebar.svelte +12 -0
- package/package/components/raw_apps/RawAppYamlEditor.svelte +81 -0
- package/package/components/raw_apps/RawAppYamlEditor.svelte.d.ts +20 -0
- package/package/components/raw_apps/dataTableRefUtils.d.ts +7 -0
- package/package/components/raw_apps/dataTableRefUtils.js +34 -0
- package/package/components/raw_apps/dataTableRefUtils.test.d.ts +1 -0
- package/package/components/raw_apps/dataTableRefUtils.test.js +29 -0
- package/package/components/raw_apps/datatableUtils.svelte.js +1 -1
- package/package/components/raw_apps/rawAppPolicy.d.ts +1 -0
- package/package/components/raw_apps/rawAppPolicy.js +17 -2
- package/package/components/resources/resourceTypesFilter.d.ts +19 -0
- package/package/components/resources/resourceTypesFilter.js +21 -0
- package/package/components/restartFromStepPath.d.ts +39 -0
- package/package/components/restartFromStepPath.js +89 -0
- package/package/components/runs/JobDetailFieldConfig.d.ts +1 -0
- package/package/components/runs/JobDetailFieldConfig.js +57 -10
- package/package/components/runs/JobDetailHeader.svelte +24 -3
- package/package/components/runs/runsFilter.d.ts +1 -1
- package/package/components/schema/FlowPropertyEditor.svelte +30 -1
- package/package/components/schema/FlowPropertyEditor.svelte.d.ts +5 -2
- package/package/components/script_builder.d.ts +1 -1
- package/package/components/search/GlobalSearchModal.svelte +8 -1
- package/package/components/select/Select.svelte +3 -2
- package/package/components/select/Select.svelte.d.ts +1 -0
- package/package/components/settings/CreateToken.svelte +91 -71
- package/package/components/settings/CreateToken.svelte.d.ts +3 -0
- package/package/components/settings/EditTokenScopesModal.svelte +57 -0
- package/package/components/settings/EditTokenScopesModal.svelte.d.ts +10 -0
- package/package/components/settings/ScopesPicker.svelte +43 -0
- package/package/components/settings/ScopesPicker.svelte.d.ts +11 -0
- package/package/components/settings/TokensTable.svelte +51 -15
- package/package/components/settings/WorkspaceUserSettings.svelte +34 -28
- package/package/components/sidebar/OperatorMenu.svelte +6 -0
- package/package/components/sidebar/SidebarContent.svelte +68 -2
- package/package/components/sidebar/WorkspaceMenu.svelte +8 -4
- package/package/components/triggers/AddTriggersButton.svelte +17 -0
- package/package/components/triggers/CaptureWrapper.svelte +19 -1
- package/package/components/triggers/PermissionedAsLine.svelte +37 -3
- package/package/components/triggers/PermissionedAsLine.svelte.d.ts +6 -0
- package/package/components/triggers/TriggerEditorToolbar.svelte.d.ts +1 -1
- package/package/components/triggers/TriggerModeToggle.svelte +36 -7
- package/package/components/triggers/TriggerModeToggle.svelte.d.ts +1 -1
- package/package/components/triggers/TriggerSuspendedJobsModal.svelte.d.ts +1 -1
- package/package/components/triggers/TriggersEditor.svelte +10 -2
- package/package/components/triggers/TriggersWrapper.svelte +20 -0
- package/package/components/triggers/azure/AzureCapture.svelte +41 -0
- package/package/components/triggers/azure/AzureCapture.svelte.d.ts +44 -0
- package/package/components/triggers/azure/AzureTriggerEditor.svelte +20 -0
- package/package/components/triggers/azure/AzureTriggerEditor.svelte.d.ts +9 -0
- package/package/components/triggers/azure/AzureTriggerEditorConfigSection.svelte +301 -0
- package/package/components/triggers/azure/AzureTriggerEditorConfigSection.svelte.d.ts +16 -0
- package/package/components/triggers/azure/AzureTriggerEditorInner.svelte +422 -0
- package/package/components/triggers/azure/AzureTriggerEditorInner.svelte.d.ts +25 -0
- package/package/components/triggers/azure/AzureTriggerPanel.svelte +55 -0
- package/package/components/triggers/azure/AzureTriggerPanel.svelte.d.ts +10 -0
- package/{dist/sharedUtils/components/triggers/kafka → package/components/triggers/azure}/utils.d.ts +1 -1
- package/package/components/triggers/azure/utils.js +56 -0
- package/package/components/triggers/email/EmailTriggerEditorInner.svelte +15 -11
- package/package/components/triggers/gcp/GcpTriggerEditorInner.svelte +22 -14
- package/package/components/triggers/http/RouteEditorConfigSection.svelte +15 -7
- package/package/components/triggers/http/RouteEditorInner.svelte +16 -14
- package/package/components/triggers/http/RoutesGenerator.svelte +6 -1
- package/package/components/triggers/http/RoutesPanel.svelte +1 -1
- package/package/components/triggers/http/utils.d.ts +1 -1
- package/package/components/triggers/http/utils.js +2 -2
- package/package/components/triggers/kafka/KafkaTriggerEditorInner.svelte +22 -14
- package/package/components/triggers/mqtt/MqttTriggerEditorInner.svelte +22 -14
- package/package/components/triggers/native/NativeTriggerEditor.svelte +3 -0
- package/package/components/triggers/native/services/github/GitHubTriggerForm.svelte +118 -0
- package/package/components/triggers/native/services/github/GitHubTriggerForm.svelte.d.ts +17 -0
- package/package/components/triggers/native/utils.js +14 -0
- package/package/components/triggers/nats/NatsTriggerEditor.svelte.d.ts +4 -3
- package/package/components/triggers/nats/NatsTriggerEditorInner.svelte +22 -14
- package/package/components/triggers/postgres/PostgresTriggerEditor.svelte.d.ts +4 -3
- package/package/components/triggers/postgres/PostgresTriggerEditorInner.svelte +22 -14
- package/package/components/triggers/schedules/ScheduleEditorInner.svelte +22 -14
- package/package/components/triggers/sqs/SqsTriggerEditor.svelte.d.ts +4 -3
- package/package/components/triggers/sqs/SqsTriggerEditorInner.svelte +22 -14
- package/package/components/triggers/triggers.svelte.d.ts +1 -0
- package/package/components/triggers/triggers.svelte.js +24 -1
- package/package/components/triggers/utils.js +47 -6
- package/package/components/triggers/websocket/WebsocketTriggerEditorInner.svelte +22 -14
- package/package/components/triggers.d.ts +1 -1
- package/package/components/useFolderDefaultPermissionedAs.svelte.d.ts +13 -0
- package/package/components/useFolderDefaultPermissionedAs.svelte.js +63 -0
- package/package/components/useNestedRestartState.svelte.d.ts +56 -0
- package/package/components/useNestedRestartState.svelte.js +320 -0
- package/package/components/workspaceSettings/CreateWorkspace.svelte +16 -677
- package/package/components/workspaceSettings/CreateWorkspaceInner.svelte +604 -0
- package/package/components/workspaceSettings/CreateWorkspaceInner.svelte.d.ts +7 -0
- package/package/components/workspaceSettings/CustomInstanceDbSelect.svelte +27 -25
- package/package/components/workspaceSettings/CustomInstanceDbWizardModal.svelte +46 -8
- package/package/components/workspaceSettings/DataTableSettings.svelte +27 -22
- package/package/components/workspaceSettings/DucklakeSettings.svelte +1 -1
- package/package/components/workspaceSettings/ForkDatatableSection.svelte +228 -0
- package/package/components/workspaceSettings/ForkDatatableSection.svelte.d.ts +28 -0
- package/package/components/workspaceSettings/GitSyncFilterSettings.svelte +8 -2
- package/package/components/workspaceSettings/RulesetEditor.svelte +27 -2
- package/package/components/workspaceSettings/SharedUiSettings.svelte +175 -0
- package/package/components/workspaceSettings/SharedUiSettings.svelte.d.ts +3 -0
- package/package/components/workspaceSettings/VolumeStorageSettings.svelte +1 -1
- package/package/components/workspaceSettings/WorkspaceIntegrations.svelte +17 -1
- package/package/consts.d.ts +3 -0
- package/package/consts.js +10 -0
- package/package/gen/core/OpenAPI.js +1 -1
- package/package/gen/schemas.gen.d.ts +795 -59
- package/package/gen/schemas.gen.js +801 -60
- package/package/gen/services.gen.d.ts +475 -5
- package/package/gen/services.gen.js +976 -23
- package/package/gen/types.gen.d.ts +1865 -75
- package/package/githubApp.js +5 -1
- package/package/hubPaths.json +2 -8
- package/package/infer.d.ts +1 -1
- package/package/infer.js +50 -52
- package/package/infer.svelte.js +10 -1
- package/package/mcpEndpointTools.js +60 -4
- package/package/monaco_workers/sqlTypePlugin.worker.d.ts +10 -0
- package/package/monaco_workers/sqlTypePlugin.worker.js +39 -0
- package/package/script_helpers.d.ts +8 -2
- package/package/script_helpers.js +31 -0
- package/package/stores.d.ts +11 -0
- package/package/stores.js +6 -0
- package/package/system_prompts/index.d.ts +1 -0
- package/package/system_prompts/index.js +8 -0
- package/package/system_prompts/prompts.d.ts +17 -13
- package/package/system_prompts/prompts.js +921 -61
- package/package/templates/ci_test_bun.ts.template +27 -0
- package/package/templates/ci_test_python.py.template +26 -0
- package/package/utils/forkConflict.d.ts +26 -0
- package/package/utils/forkConflict.js +56 -0
- package/package/utils_deployable.d.ts +164 -121
- package/package/utils_deployable.js +61 -11
- package/package/utils_workspace_deploy.d.ts +8 -8
- package/package/utils_workspace_deploy.js +89 -421
- package/package.json +30 -6
- package/dist/sharedUtils/assets/tokens/colorTokensConfig.d.ts +0 -2
- package/dist/sharedUtils/base.d.ts +0 -1
- package/dist/sharedUtils/cloud.d.ts +0 -1
- package/dist/sharedUtils/common.d.ts +0 -111
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/count.d.ts +0 -5
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/delete.d.ts +0 -5
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/insert.d.ts +0 -5
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/select.d.ts +0 -13
- package/dist/sharedUtils/components/apps/components/display/dbtable/queries/update.d.ts +0 -11
- package/dist/sharedUtils/components/apps/components/display/dbtable/utils.d.ts +0 -95
- package/dist/sharedUtils/components/apps/editor/appPolicy.d.ts +0 -6
- package/dist/sharedUtils/components/apps/editor/appUtilsCore.d.ts +0 -7
- package/dist/sharedUtils/components/apps/editor/appUtilsS3.d.ts +0 -33
- package/dist/sharedUtils/components/apps/editor/commonAppUtils.d.ts +0 -10
- package/dist/sharedUtils/components/apps/editor/component/components.d.ts +0 -5371
- package/dist/sharedUtils/components/apps/editor/component/default-codes.d.ts +0 -3
- package/dist/sharedUtils/components/apps/editor/component/index.d.ts +0 -3
- package/dist/sharedUtils/components/apps/editor/component/sets.d.ts +0 -7
- package/dist/sharedUtils/components/apps/editor/componentsPanel/componentDefaultProps.d.ts +0 -3
- package/dist/sharedUtils/components/apps/gridUtils.d.ts +0 -14
- package/dist/sharedUtils/components/apps/inputType.d.ts +0 -178
- package/dist/sharedUtils/components/apps/rx.d.ts +0 -29
- package/dist/sharedUtils/components/apps/sharedTypes.d.ts +0 -21
- package/dist/sharedUtils/components/apps/types.d.ts +0 -274
- package/dist/sharedUtils/components/assets/lib.d.ts +0 -25
- package/dist/sharedUtils/components/common/alert/model.d.ts +0 -2
- package/dist/sharedUtils/components/common/badge/model.d.ts +0 -8
- package/dist/sharedUtils/components/common/button/model.d.ts +0 -45
- package/dist/sharedUtils/components/common/fileInput/model.d.ts +0 -1
- package/dist/sharedUtils/components/common/index.d.ts +0 -24
- package/dist/sharedUtils/components/common/skeleton/model.d.ts +0 -21
- package/dist/sharedUtils/components/dbTypes.d.ts +0 -14
- package/dist/sharedUtils/components/diff_drawer.d.ts +0 -26
- package/dist/sharedUtils/components/ducklake.d.ts +0 -1
- package/dist/sharedUtils/components/flows/scheduleUtils.d.ts +0 -7
- package/dist/sharedUtils/components/icons/index.d.ts +0 -101
- package/dist/sharedUtils/components/random_positive_adjetive.d.ts +0 -1
- package/dist/sharedUtils/components/raw_apps/rawAppPolicy.d.ts +0 -10
- package/dist/sharedUtils/components/raw_apps/utils.d.ts +0 -15
- package/dist/sharedUtils/components/triggers/email/utils.d.ts +0 -4
- package/dist/sharedUtils/components/triggers/gcp/utils.d.ts +0 -2
- package/dist/sharedUtils/components/triggers/http/utils.d.ts +0 -11
- package/dist/sharedUtils/components/triggers/mqtt/utils.d.ts +0 -2
- package/dist/sharedUtils/components/triggers/nats/utils.d.ts +0 -2
- package/dist/sharedUtils/components/triggers/postgres/utils.d.ts +0 -8
- package/dist/sharedUtils/components/triggers/sqs/utils.d.ts +0 -2
- package/dist/sharedUtils/components/triggers/triggers.svelte.d.ts +0 -32
- package/dist/sharedUtils/components/triggers/utils.d.ts +0 -80
- package/dist/sharedUtils/components/triggers/websocket/utils.d.ts +0 -2
- package/dist/sharedUtils/components/triggers.d.ts +0 -20
- package/dist/sharedUtils/gen/core/ApiError.d.ts +0 -10
- package/dist/sharedUtils/gen/core/ApiRequestOptions.d.ts +0 -13
- package/dist/sharedUtils/gen/core/ApiResult.d.ts +0 -7
- package/dist/sharedUtils/gen/core/CancelablePromise.d.ts +0 -26
- package/dist/sharedUtils/gen/core/OpenAPI.d.ts +0 -27
- package/dist/sharedUtils/gen/core/request.d.ts +0 -29
- package/dist/sharedUtils/gen/index.d.ts +0 -6
- package/dist/sharedUtils/gen/schemas.gen.d.ts +0 -7036
- package/dist/sharedUtils/gen/services.gen.d.ts +0 -6047
- package/dist/sharedUtils/gen/types.gen.d.ts +0 -21881
- package/dist/sharedUtils/history.svelte.d.ts +0 -9
- package/dist/sharedUtils/hub.d.ts +0 -49
- package/dist/sharedUtils/jsr.json +0 -6
- package/dist/sharedUtils/lib.d.ts +0 -5
- package/dist/sharedUtils/lib.es.js +0 -1588
- package/dist/sharedUtils/package.json +0 -12
- package/dist/sharedUtils/schema.d.ts +0 -3
- package/dist/sharedUtils/stores.d.ts +0 -97
- package/dist/sharedUtils/svelte5Utils.svelte.d.ts +0 -80
- package/dist/sharedUtils/toast.d.ts +0 -8
- package/dist/sharedUtils/utils.d.ts +0 -265
- package/package/components/copilot/chat/__tests__/app/appChat.eval.test.js +0 -153
- package/package/components/copilot/chat/__tests__/app/appEvalComparison.d.ts +0 -21
- package/package/components/copilot/chat/__tests__/app/appEvalComparison.js +0 -136
- package/package/components/copilot/chat/__tests__/app/appEvalHelpers.d.ts +0 -15
- package/package/components/copilot/chat/__tests__/app/appEvalHelpers.js +0 -107
- package/package/components/copilot/chat/__tests__/app/appEvalRunner.d.ts +0 -50
- package/package/components/copilot/chat/__tests__/app/appEvalRunner.js +0 -93
- package/package/components/copilot/chat/__tests__/app/appFixtureLoader.d.ts +0 -29
- package/package/components/copilot/chat/__tests__/app/appFixtureLoader.js +0 -134
- package/package/components/copilot/chat/__tests__/app/appResultsWriter.d.ts +0 -30
- package/package/components/copilot/chat/__tests__/app/appResultsWriter.js +0 -197
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/createFolder/main.d.ts +0 -10
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/createFolder/main.js +0 -9
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/createFolder/meta.json +0 -4
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/deleteItem/main.d.ts +0 -6
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/deleteItem/main.js +0 -5
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/deleteItem/meta.json +0 -4
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/listFiles/main.d.ts +0 -12
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/listFiles/main.js +0 -14
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/listFiles/meta.json +0 -4
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/listFolders/main.d.ts +0 -8
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/listFolders/main.js +0 -25
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/listFolders/meta.json +0 -4
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/moveItem/main.d.ts +0 -7
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/moveItem/main.js +0 -5
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/moveItem/meta.json +0 -4
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/renameItem/main.d.ts +0 -8
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/renameItem/main.js +0 -5
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/backend/renameItem/meta.json +0 -4
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/frontend/components/Breadcrumb.d.ts +0 -10
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/frontend/components/Breadcrumb.tsx +0 -26
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/frontend/components/FileItem.d.ts +0 -10
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/frontend/components/FileItem.tsx +0 -79
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/frontend/components/FileList.d.ts +0 -10
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/frontend/components/FileList.tsx +0 -46
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/frontend/components/FolderTree.d.ts +0 -10
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/frontend/components/FolderTree.tsx +0 -56
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/frontend/components/Toolbar.d.ts +0 -6
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/frontend/components/Toolbar.tsx +0 -59
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/frontend/index.d.ts +0 -16
- package/package/components/copilot/chat/__tests__/app/initial/file_manager/frontend/index.tsx +0 -119
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/backend/addToCart/main.d.ts +0 -15
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/backend/addToCart/main.js +0 -14
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/backend/addToCart/meta.json +0 -4
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/backend/calculateTotal/main.d.ts +0 -14
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/backend/calculateTotal/main.js +0 -5
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/backend/calculateTotal/meta.json +0 -4
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/backend/getProducts/main.d.ts +0 -6
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/backend/getProducts/main.js +0 -41
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/backend/getProducts/meta.json +0 -4
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/backend/removeFromCart/main.d.ts +0 -15
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/backend/removeFromCart/main.js +0 -3
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/backend/removeFromCart/meta.json +0 -4
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/frontend/components/Cart.d.ts +0 -9
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/frontend/components/Cart.tsx +0 -51
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/frontend/components/ProductCard.d.ts +0 -8
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/frontend/components/ProductCard.tsx +0 -27
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/frontend/components/ProductList.d.ts +0 -8
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/frontend/components/ProductList.tsx +0 -18
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/frontend/index.d.ts +0 -12
- package/package/components/copilot/chat/__tests__/app/initial/shopping_cart/frontend/index.tsx +0 -81
- package/package/components/copilot/chat/__tests__/app/initial/test1_counter_app/backend/decrementCounter/main.d.ts +0 -3
- package/package/components/copilot/chat/__tests__/app/initial/test1_counter_app/backend/decrementCounter/main.js +0 -3
- package/package/components/copilot/chat/__tests__/app/initial/test1_counter_app/backend/decrementCounter/meta.json +0 -4
- package/package/components/copilot/chat/__tests__/app/initial/test1_counter_app/backend/incrementCounter/main.d.ts +0 -3
- package/package/components/copilot/chat/__tests__/app/initial/test1_counter_app/backend/incrementCounter/main.js +0 -3
- package/package/components/copilot/chat/__tests__/app/initial/test1_counter_app/backend/incrementCounter/meta.json +0 -4
- package/package/components/copilot/chat/__tests__/app/initial/test1_counter_app/frontend/index.d.ts +0 -2
- package/package/components/copilot/chat/__tests__/app/initial/test1_counter_app/frontend/index.tsx +0 -38
- package/package/components/copilot/chat/__tests__/app/variants/baseline.d.ts +0 -6
- package/package/components/copilot/chat/__tests__/app/variants/baseline.js +0 -10
- package/package/components/copilot/chat/__tests__/app/variants/index.d.ts +0 -3
- package/package/components/copilot/chat/__tests__/app/variants/index.js +0 -3
- package/package/components/copilot/chat/__tests__/app/variants/streamlined.d.ts +0 -6
- package/package/components/copilot/chat/__tests__/app/variants/streamlined.js +0 -137
- package/package/components/copilot/chat/__tests__/flow/expected/test1.json +0 -134
- package/package/components/copilot/chat/__tests__/flow/expected/test2.json +0 -183
- package/package/components/copilot/chat/__tests__/flow/expected/test3.json +0 -204
- package/package/components/copilot/chat/__tests__/flow/expected/test4.json +0 -175
- package/package/components/copilot/chat/__tests__/flow/expected/test5_modify_simple.json +0 -68
- package/package/components/copilot/chat/__tests__/flow/expected/test6_modify_medium.json +0 -142
- package/package/components/copilot/chat/__tests__/flow/expected/test7_modify_complex.json +0 -136
- package/package/components/copilot/chat/__tests__/flow/flowChat.eval.test.js +0 -294
- package/package/components/copilot/chat/__tests__/flow/flowEvalComparison.d.ts +0 -17
- package/package/components/copilot/chat/__tests__/flow/flowEvalComparison.js +0 -49
- package/package/components/copilot/chat/__tests__/flow/flowEvalHelpers.d.ts +0 -12
- package/package/components/copilot/chat/__tests__/flow/flowEvalHelpers.js +0 -79
- package/package/components/copilot/chat/__tests__/flow/flowEvalRunner.d.ts +0 -50
- package/package/components/copilot/chat/__tests__/flow/flowEvalRunner.js +0 -102
- package/package/components/copilot/chat/__tests__/flow/initial/test5_initial.json +0 -53
- package/package/components/copilot/chat/__tests__/flow/initial/test6_initial.json +0 -68
- package/package/components/copilot/chat/__tests__/flow/initial/test7_initial.json +0 -120
- package/package/components/copilot/chat/__tests__/flow/variants/baseline.d.ts +0 -6
- package/package/components/copilot/chat/__tests__/flow/variants/baseline.js +0 -10
- package/package/components/copilot/chat/__tests__/flow/variants/index.d.ts +0 -3
- package/package/components/copilot/chat/__tests__/flow/variants/index.js +0 -3
- package/package/components/copilot/chat/__tests__/flow/variants/minimal-single-tool.d.ts +0 -15
- package/package/components/copilot/chat/__tests__/flow/variants/minimal-single-tool.js +0 -388
- package/package/components/copilot/chat/__tests__/shared/baseEvalRunner.d.ts +0 -45
- package/package/components/copilot/chat/__tests__/shared/baseEvalRunner.js +0 -121
- package/package/components/copilot/chat/__tests__/shared/baseLLMEvaluator.d.ts +0 -28
- package/package/components/copilot/chat/__tests__/shared/baseLLMEvaluator.js +0 -96
- package/package/components/copilot/chat/__tests__/shared/baseResultsWriter.d.ts +0 -32
- package/package/components/copilot/chat/__tests__/shared/baseResultsWriter.js +0 -130
- package/package/components/copilot/chat/__tests__/shared/baseVariants.d.ts +0 -45
- package/package/components/copilot/chat/__tests__/shared/baseVariants.js +0 -57
- package/package/components/copilot/chat/__tests__/shared/index.d.ts +0 -10
- package/package/components/copilot/chat/__tests__/shared/index.js +0 -5
- package/package/components/copilot/chat/__tests__/shared/types.d.ts +0 -105
- package/package/components/copilot/chat/__tests__/shared/types.js +0 -9
- package/package/components/copilot/chat/flow/openFlowZod.js +0 -24
- package/package/components/copilot/chat/flow/utils.d.ts +0 -14
- package/package/components/copilot/chat/flow/utils.js +0 -108
- package/package/components/flows/agentToolUtils.test.js +0 -55
- /package/package/components/copilot/chat/{__tests__/app/appChat.eval.test.d.ts → app/core.test.d.ts} +0 -0
- /package/package/components/copilot/chat/{__tests__/flow/flowChat.eval.test.d.ts → flow/helperUtils.test.d.ts} +0 -0
- /package/package/components/copilot/chat/flow/{openFlowZod.d.ts → openFlowZod.gen.d.ts} +0 -0
- /package/package/components/{flows/agentToolUtils.test.d.ts → copilot/chat/flow/utils.test.d.ts} +0 -0
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
function isFlowModuleToolCandidate(tool) {
|
|
2
|
+
const toolValue = tool.value;
|
|
3
|
+
return toolValue.tool_type === undefined || toolValue.tool_type === 'flowmodule';
|
|
4
|
+
}
|
|
5
|
+
export function getChildModuleBranches(module) {
|
|
6
|
+
if (module.value.type === 'forloopflow' || module.value.type === 'whileloopflow') {
|
|
7
|
+
return [module.value.modules];
|
|
8
|
+
}
|
|
9
|
+
if (module.value.type === 'branchone') {
|
|
10
|
+
return [module.value.default, ...module.value.branches.map((branch) => branch.modules)];
|
|
11
|
+
}
|
|
12
|
+
if (module.value.type === 'branchall') {
|
|
13
|
+
return module.value.branches.map((branch) => branch.modules);
|
|
14
|
+
}
|
|
15
|
+
if (module.value.type === 'aiagent' && module.value.tools) {
|
|
16
|
+
return [
|
|
17
|
+
module.value.tools.filter((tool) => isFlowModuleToolCandidate(tool))
|
|
18
|
+
];
|
|
19
|
+
}
|
|
20
|
+
return [];
|
|
21
|
+
}
|
|
22
|
+
export function collectDescendantFlowModules(module) {
|
|
23
|
+
return getChildModuleBranches(module).flatMap((branch) => branch.flatMap((childModule) => [childModule, ...collectDescendantFlowModules(childModule)]));
|
|
24
|
+
}
|
|
25
|
+
function visitNestedFlowNodesOfModule(module, visit) {
|
|
26
|
+
if (module.value.type === 'aiagent' && module.value.tools) {
|
|
27
|
+
const tools = module.value.tools;
|
|
28
|
+
for (let toolIndex = 0; toolIndex < tools.length; toolIndex++) {
|
|
29
|
+
const tool = tools[toolIndex];
|
|
30
|
+
if (!isFlowModuleToolCandidate(tool)) {
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
const toolMatch = {
|
|
34
|
+
module: tool,
|
|
35
|
+
location: {
|
|
36
|
+
type: 'aiagent',
|
|
37
|
+
parentId: module.id,
|
|
38
|
+
index: toolIndex
|
|
39
|
+
},
|
|
40
|
+
container: tools
|
|
41
|
+
};
|
|
42
|
+
if (visit(toolMatch) || visitNestedFlowNodesOfModule(tool, visit)) {
|
|
43
|
+
return true;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
const childBranches = getChildModuleBranches(module);
|
|
49
|
+
for (let branchIndex = 0; branchIndex < childBranches.length; branchIndex++) {
|
|
50
|
+
const branch = childBranches[branchIndex];
|
|
51
|
+
const locationBuilder = module.value.type === 'forloopflow'
|
|
52
|
+
? (childIndex) => ({
|
|
53
|
+
type: 'forloop',
|
|
54
|
+
parentId: module.id,
|
|
55
|
+
index: childIndex
|
|
56
|
+
})
|
|
57
|
+
: module.value.type === 'whileloopflow'
|
|
58
|
+
? (childIndex) => ({
|
|
59
|
+
type: 'whileloop',
|
|
60
|
+
parentId: module.id,
|
|
61
|
+
index: childIndex
|
|
62
|
+
})
|
|
63
|
+
: module.value.type === 'branchone'
|
|
64
|
+
? branchIndex === 0
|
|
65
|
+
? (childIndex) => ({
|
|
66
|
+
type: 'branchone-default',
|
|
67
|
+
parentId: module.id,
|
|
68
|
+
index: childIndex
|
|
69
|
+
})
|
|
70
|
+
: (childIndex) => ({
|
|
71
|
+
type: 'branchone-branch',
|
|
72
|
+
parentId: module.id,
|
|
73
|
+
branchIndex: branchIndex - 1,
|
|
74
|
+
index: childIndex
|
|
75
|
+
})
|
|
76
|
+
: (childIndex) => ({
|
|
77
|
+
type: 'branchall-branch',
|
|
78
|
+
parentId: module.id,
|
|
79
|
+
branchIndex,
|
|
80
|
+
index: childIndex
|
|
81
|
+
});
|
|
82
|
+
if (visitFlowNodesInModules(branch, locationBuilder, visit)) {
|
|
83
|
+
return true;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
return false;
|
|
87
|
+
}
|
|
88
|
+
function visitFlowNodesInModules(modules, locationBuilder, visit) {
|
|
89
|
+
for (let index = 0; index < modules.length; index++) {
|
|
90
|
+
const module = modules[index];
|
|
91
|
+
if (visit({
|
|
92
|
+
module,
|
|
93
|
+
location: locationBuilder(index),
|
|
94
|
+
container: modules
|
|
95
|
+
})) {
|
|
96
|
+
return true;
|
|
97
|
+
}
|
|
98
|
+
if (visitNestedFlowNodesOfModule(module, visit)) {
|
|
99
|
+
return true;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return false;
|
|
103
|
+
}
|
|
104
|
+
function findFlowNodeInModules(modules, moduleId, locationBuilder) {
|
|
105
|
+
let match = null;
|
|
106
|
+
visitFlowNodesInModules(modules, locationBuilder, (nodeMatch) => {
|
|
107
|
+
if (nodeMatch.module.id !== moduleId) {
|
|
108
|
+
return false;
|
|
109
|
+
}
|
|
110
|
+
match = nodeMatch;
|
|
111
|
+
return true;
|
|
112
|
+
});
|
|
113
|
+
return match;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Collect every module ID in a flow tree, including ALL aiagent tool IDs
|
|
117
|
+
* (both flowmodule and non-flowmodule like MCP). Used for ID uniqueness
|
|
118
|
+
* validation where every tool's ID must be reserved regardless of type.
|
|
119
|
+
*/
|
|
120
|
+
export function collectAllFlowModuleIds(flow) {
|
|
121
|
+
const ids = [];
|
|
122
|
+
function walkModules(modules) {
|
|
123
|
+
for (const module of modules) {
|
|
124
|
+
if (module.id) {
|
|
125
|
+
ids.push(module.id);
|
|
126
|
+
}
|
|
127
|
+
if (module.value.type === 'forloopflow' || module.value.type === 'whileloopflow') {
|
|
128
|
+
walkModules(module.value.modules);
|
|
129
|
+
}
|
|
130
|
+
else if (module.value.type === 'branchone') {
|
|
131
|
+
for (const branch of module.value.branches) {
|
|
132
|
+
walkModules(branch.modules);
|
|
133
|
+
}
|
|
134
|
+
walkModules(module.value.default);
|
|
135
|
+
}
|
|
136
|
+
else if (module.value.type === 'branchall') {
|
|
137
|
+
for (const branch of module.value.branches) {
|
|
138
|
+
walkModules(branch.modules);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
else if (module.value.type === 'aiagent' && module.value.tools) {
|
|
142
|
+
walkModules(module.value.tools);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
if (flow.modules) {
|
|
147
|
+
walkModules(flow.modules);
|
|
148
|
+
}
|
|
149
|
+
if (flow.failure_module?.id) {
|
|
150
|
+
ids.push(flow.failure_module.id);
|
|
151
|
+
}
|
|
152
|
+
if (flow.preprocessor_module?.id) {
|
|
153
|
+
ids.push(flow.preprocessor_module.id);
|
|
154
|
+
}
|
|
155
|
+
return ids;
|
|
156
|
+
}
|
|
157
|
+
/**
|
|
158
|
+
* Like collectAllFlowModuleIds but operates on a modules array directly
|
|
159
|
+
* (without failure_module/preprocessor_module).
|
|
160
|
+
*/
|
|
161
|
+
export function collectAllFlowModuleIdsFromModules(modules) {
|
|
162
|
+
return collectAllFlowModuleIds({ modules });
|
|
163
|
+
}
|
|
164
|
+
export function collectFlowNodes(flow) {
|
|
165
|
+
const matches = [];
|
|
166
|
+
if (flow.failure_module) {
|
|
167
|
+
matches.push({
|
|
168
|
+
module: flow.failure_module,
|
|
169
|
+
location: { type: 'failure', index: -1 }
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
if (flow.preprocessor_module) {
|
|
173
|
+
matches.push({
|
|
174
|
+
module: flow.preprocessor_module,
|
|
175
|
+
location: { type: 'preprocessor', index: -1 }
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
visitFlowNodesInModules(flow.modules ?? [], (index) => ({ type: 'root', index }), (match) => {
|
|
179
|
+
matches.push({
|
|
180
|
+
module: match.module,
|
|
181
|
+
location: match.location
|
|
182
|
+
});
|
|
183
|
+
});
|
|
184
|
+
return matches;
|
|
185
|
+
}
|
|
186
|
+
export function findModuleInModules(modules, moduleId) {
|
|
187
|
+
return (findFlowNodeInModules(modules, moduleId, (index) => ({ type: 'root', index }))?.module ??
|
|
188
|
+
undefined);
|
|
189
|
+
}
|
|
190
|
+
export function findFlowNode(flow, moduleId) {
|
|
191
|
+
if (flow.failure_module?.id === moduleId) {
|
|
192
|
+
return {
|
|
193
|
+
module: flow.failure_module,
|
|
194
|
+
location: { type: 'failure', index: -1 }
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
if (flow.preprocessor_module?.id === moduleId) {
|
|
198
|
+
return {
|
|
199
|
+
module: flow.preprocessor_module,
|
|
200
|
+
location: { type: 'preprocessor', index: -1 }
|
|
201
|
+
};
|
|
202
|
+
}
|
|
203
|
+
return findFlowNodeInModules(flow.modules ?? [], moduleId, (index) => ({ type: 'root', index }));
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
* Returns the live stored module for any module id in the flow tree.
|
|
207
|
+
* This includes nested modules, AI-agent flowmodule tools, and special modules.
|
|
208
|
+
*/
|
|
209
|
+
export function findModuleInFlow(flow, moduleId) {
|
|
210
|
+
return findFlowNode(flow, moduleId)?.module ?? null;
|
|
211
|
+
}
|
|
212
|
+
export function findModuleParent(flow, moduleId) {
|
|
213
|
+
return findFlowNode(flow, moduleId)?.location ?? null;
|
|
214
|
+
}
|
|
215
|
+
function resolveModuleArrayByLocation(flow, location, options = {}) {
|
|
216
|
+
if (location.type === 'root') {
|
|
217
|
+
if (!flow.modules && options.createIfMissing) {
|
|
218
|
+
flow.modules = [];
|
|
219
|
+
}
|
|
220
|
+
return flow.modules ?? null;
|
|
221
|
+
}
|
|
222
|
+
const parentModule = findModuleInFlow(flow, location.parentId);
|
|
223
|
+
if (!parentModule) {
|
|
224
|
+
return null;
|
|
225
|
+
}
|
|
226
|
+
if (location.type === 'forloop' && parentModule.value.type === 'forloopflow') {
|
|
227
|
+
return parentModule.value.modules ?? null;
|
|
228
|
+
}
|
|
229
|
+
if (location.type === 'whileloop' && parentModule.value.type === 'whileloopflow') {
|
|
230
|
+
return parentModule.value.modules ?? null;
|
|
231
|
+
}
|
|
232
|
+
if (location.type === 'branchone-default' && parentModule.value.type === 'branchone') {
|
|
233
|
+
return parentModule.value.default ?? null;
|
|
234
|
+
}
|
|
235
|
+
if (location.type === 'branchone-branch' && parentModule.value.type === 'branchone') {
|
|
236
|
+
let branch = parentModule.value.branches[location.branchIndex];
|
|
237
|
+
if (!branch && options.templateFlow) {
|
|
238
|
+
const templateParent = findModuleInFlow(options.templateFlow, location.parentId);
|
|
239
|
+
const templateBranch = templateParent?.value.type === 'branchone'
|
|
240
|
+
? templateParent.value.branches[location.branchIndex]
|
|
241
|
+
: undefined;
|
|
242
|
+
if (templateBranch) {
|
|
243
|
+
while (parentModule.value.branches.length <= location.branchIndex) {
|
|
244
|
+
parentModule.value.branches.push({ expr: '', modules: [] });
|
|
245
|
+
}
|
|
246
|
+
parentModule.value.branches[location.branchIndex] = {
|
|
247
|
+
...templateBranch,
|
|
248
|
+
modules: []
|
|
249
|
+
};
|
|
250
|
+
branch = parentModule.value.branches[location.branchIndex];
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
return branch?.modules ?? null;
|
|
254
|
+
}
|
|
255
|
+
if (location.type === 'branchall-branch' && parentModule.value.type === 'branchall') {
|
|
256
|
+
let branch = parentModule.value.branches[location.branchIndex];
|
|
257
|
+
if (!branch && options.templateFlow) {
|
|
258
|
+
const templateParent = findModuleInFlow(options.templateFlow, location.parentId);
|
|
259
|
+
const templateBranch = templateParent?.value.type === 'branchall'
|
|
260
|
+
? templateParent.value.branches[location.branchIndex]
|
|
261
|
+
: undefined;
|
|
262
|
+
if (templateBranch) {
|
|
263
|
+
while (parentModule.value.branches.length <= location.branchIndex) {
|
|
264
|
+
parentModule.value.branches.push({ modules: [] });
|
|
265
|
+
}
|
|
266
|
+
parentModule.value.branches[location.branchIndex] = {
|
|
267
|
+
...templateBranch,
|
|
268
|
+
modules: []
|
|
269
|
+
};
|
|
270
|
+
branch = parentModule.value.branches[location.branchIndex];
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
return branch?.modules ?? null;
|
|
274
|
+
}
|
|
275
|
+
if (location.type === 'aiagent' && parentModule.value.type === 'aiagent') {
|
|
276
|
+
if (!parentModule.value.tools && options.createIfMissing) {
|
|
277
|
+
parentModule.value.tools = [];
|
|
278
|
+
}
|
|
279
|
+
return parentModule.value.tools ?? null;
|
|
280
|
+
}
|
|
281
|
+
return null;
|
|
282
|
+
}
|
|
283
|
+
export function getModuleArrayByLocation(flow, location) {
|
|
284
|
+
return resolveModuleArrayByLocation(flow, location);
|
|
285
|
+
}
|
|
286
|
+
export function ensureModuleArrayByLocation(flow, location, templateFlow) {
|
|
287
|
+
return resolveModuleArrayByLocation(flow, location, {
|
|
288
|
+
createIfMissing: true,
|
|
289
|
+
templateFlow
|
|
290
|
+
});
|
|
291
|
+
}
|
|
292
|
+
export function getModuleArrayContainer(flow, moduleId) {
|
|
293
|
+
const match = findFlowNode(flow, moduleId);
|
|
294
|
+
if (!match || !('container' in match)) {
|
|
295
|
+
return null;
|
|
296
|
+
}
|
|
297
|
+
return {
|
|
298
|
+
index: match.location.index,
|
|
299
|
+
modules: match.container
|
|
300
|
+
};
|
|
301
|
+
}
|
|
302
|
+
export function removeFlowModule(flow, moduleId) {
|
|
303
|
+
if (flow.preprocessor_module?.id === moduleId) {
|
|
304
|
+
const removed = flow.preprocessor_module;
|
|
305
|
+
flow.preprocessor_module = undefined;
|
|
306
|
+
return removed;
|
|
307
|
+
}
|
|
308
|
+
if (flow.failure_module?.id === moduleId) {
|
|
309
|
+
const removed = flow.failure_module;
|
|
310
|
+
flow.failure_module = undefined;
|
|
311
|
+
return removed;
|
|
312
|
+
}
|
|
313
|
+
const match = findFlowNode(flow, moduleId);
|
|
314
|
+
if (!match || !('container' in match)) {
|
|
315
|
+
return null;
|
|
316
|
+
}
|
|
317
|
+
const [removed] = match.container.splice(match.location.index, 1);
|
|
318
|
+
return removed ?? null;
|
|
319
|
+
}
|
|
320
|
+
export function replaceFlowModule(target, next) {
|
|
321
|
+
for (const key of Object.keys(target)) {
|
|
322
|
+
delete target[key];
|
|
323
|
+
}
|
|
324
|
+
Object.assign(target, next);
|
|
325
|
+
return target;
|
|
326
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
import { describe, expect, it } from 'vitest';
|
|
2
|
+
import { collectAllFlowModuleIds, collectAllFlowModuleIdsFromModules, collectFlowNodes, ensureModuleArrayByLocation, findFlowNode, findModuleInFlow, findModuleInModules, findModuleParent, getModuleArrayContainer, removeFlowModule, replaceFlowModule } from './flowTree';
|
|
3
|
+
function makeRawModule(id) {
|
|
4
|
+
return {
|
|
5
|
+
id,
|
|
6
|
+
summary: id,
|
|
7
|
+
value: { type: 'rawscript', content: '', language: 'python3', input_transforms: {} }
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
function makeFlowModuleTool(module) {
|
|
11
|
+
return {
|
|
12
|
+
id: module.id,
|
|
13
|
+
summary: module.summary,
|
|
14
|
+
value: {
|
|
15
|
+
tool_type: 'flowmodule',
|
|
16
|
+
...module.value
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
function makeAiAgent(id, tools) {
|
|
21
|
+
return {
|
|
22
|
+
id,
|
|
23
|
+
summary: id,
|
|
24
|
+
value: {
|
|
25
|
+
type: 'aiagent',
|
|
26
|
+
tools,
|
|
27
|
+
input_transforms: {}
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
function makeMcpTool(id) {
|
|
32
|
+
return {
|
|
33
|
+
id,
|
|
34
|
+
summary: id,
|
|
35
|
+
value: {
|
|
36
|
+
tool_type: 'mcp',
|
|
37
|
+
resource_path: ''
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
describe('flowTree', () => {
|
|
42
|
+
it('returns the root container for top-level modules', () => {
|
|
43
|
+
const first = makeRawModule('first');
|
|
44
|
+
const second = makeRawModule('second');
|
|
45
|
+
const flow = {
|
|
46
|
+
modules: [first, second]
|
|
47
|
+
};
|
|
48
|
+
expect(findModuleParent(flow, 'second')).toEqual({ type: 'root', index: 1 });
|
|
49
|
+
expect(findModuleInFlow(flow, 'second')).toBe(second);
|
|
50
|
+
expect(getModuleArrayContainer(flow, 'second')).toEqual({
|
|
51
|
+
index: 1,
|
|
52
|
+
modules: flow.modules
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
it('returns nested branch containers from the live flow tree', () => {
|
|
56
|
+
const nested = makeRawModule('nested');
|
|
57
|
+
const branch = makeRawModule('branch');
|
|
58
|
+
const flow = {
|
|
59
|
+
modules: [
|
|
60
|
+
{
|
|
61
|
+
id: 'router',
|
|
62
|
+
summary: 'router',
|
|
63
|
+
value: {
|
|
64
|
+
type: 'branchone',
|
|
65
|
+
default: [nested],
|
|
66
|
+
branches: [{ expr: 'true', modules: [branch] }],
|
|
67
|
+
input_transforms: {}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
]
|
|
71
|
+
};
|
|
72
|
+
expect(findModuleParent(flow, 'nested')).toEqual({
|
|
73
|
+
type: 'branchone-default',
|
|
74
|
+
parentId: 'router',
|
|
75
|
+
index: 0
|
|
76
|
+
});
|
|
77
|
+
expect(getModuleArrayContainer(flow, 'branch')).toEqual({
|
|
78
|
+
index: 0,
|
|
79
|
+
modules: ((flow.modules?.[0].value).branches[0].modules ?? [])
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
it('returns ai agent tool containers as mutable flow module arrays', () => {
|
|
83
|
+
const lookup = makeFlowModuleTool(makeRawModule('lookup_user'));
|
|
84
|
+
const sum = makeFlowModuleTool(makeRawModule('sum'));
|
|
85
|
+
const agent = makeAiAgent('agent', [lookup, sum]);
|
|
86
|
+
const agentTools = (agent.value.tools ?? []);
|
|
87
|
+
const flow = {
|
|
88
|
+
modules: [agent]
|
|
89
|
+
};
|
|
90
|
+
const match = findFlowNode(flow, 'sum');
|
|
91
|
+
const container = getModuleArrayContainer(flow, 'sum');
|
|
92
|
+
expect(match).toMatchObject({
|
|
93
|
+
location: { type: 'aiagent', parentId: 'agent', index: 1 }
|
|
94
|
+
});
|
|
95
|
+
expect(findModuleInFlow(flow, 'sum')).toBe(sum);
|
|
96
|
+
expect(container).toEqual({
|
|
97
|
+
index: 1,
|
|
98
|
+
modules: agentTools
|
|
99
|
+
});
|
|
100
|
+
container?.modules.splice(container.index, 1);
|
|
101
|
+
expect(agentTools.map((module) => module.id)).toEqual(['lookup_user']);
|
|
102
|
+
});
|
|
103
|
+
it('finds ai agent flowmodule tools inside a plain modules array', () => {
|
|
104
|
+
const tool = makeFlowModuleTool(makeRawModule('sum'));
|
|
105
|
+
const flowModules = [makeAiAgent('agent', [tool])];
|
|
106
|
+
expect(findModuleInModules(flowModules, 'sum')).toBe(tool);
|
|
107
|
+
});
|
|
108
|
+
it('skips non-flowmodule ai agent tools in module traversal', () => {
|
|
109
|
+
const lookup = makeFlowModuleTool(makeRawModule('lookup_user'));
|
|
110
|
+
const agent = makeAiAgent('agent', [lookup, makeMcpTool('search_docs')]);
|
|
111
|
+
const flow = {
|
|
112
|
+
modules: [agent]
|
|
113
|
+
};
|
|
114
|
+
expect(findModuleInModules(flow.modules ?? [], 'search_docs')).toBeUndefined();
|
|
115
|
+
expect(findModuleInFlow(flow, 'search_docs')).toBeNull();
|
|
116
|
+
expect(collectFlowNodes(flow).map((entry) => entry.module.id)).toEqual(['agent', 'lookup_user']);
|
|
117
|
+
});
|
|
118
|
+
it('returns special modules without pretending they belong to an array container', () => {
|
|
119
|
+
const failure = makeRawModule('failure');
|
|
120
|
+
const preprocessor = makeRawModule('preprocessor');
|
|
121
|
+
const flow = {
|
|
122
|
+
modules: [],
|
|
123
|
+
failure_module: failure,
|
|
124
|
+
preprocessor_module: preprocessor
|
|
125
|
+
};
|
|
126
|
+
expect(findModuleParent(flow, 'failure')).toEqual({ type: 'failure', index: -1 });
|
|
127
|
+
expect(findModuleParent(flow, 'preprocessor')).toEqual({
|
|
128
|
+
type: 'preprocessor',
|
|
129
|
+
index: -1
|
|
130
|
+
});
|
|
131
|
+
expect(findModuleInFlow(flow, 'failure')).toBe(failure);
|
|
132
|
+
expect(findModuleInFlow(flow, 'preprocessor')).toBe(preprocessor);
|
|
133
|
+
expect(getModuleArrayContainer(flow, 'failure')).toBeNull();
|
|
134
|
+
expect(getModuleArrayContainer(flow, 'preprocessor')).toBeNull();
|
|
135
|
+
});
|
|
136
|
+
it('removes nested ai agent tools from the real stored tools array', () => {
|
|
137
|
+
const lookup = makeFlowModuleTool(makeRawModule('lookup_user'));
|
|
138
|
+
const sum = makeFlowModuleTool(makeRawModule('sum'));
|
|
139
|
+
const agent = makeAiAgent('agent', [lookup, sum]);
|
|
140
|
+
const flow = {
|
|
141
|
+
modules: [agent]
|
|
142
|
+
};
|
|
143
|
+
const removed = removeFlowModule(flow, 'sum');
|
|
144
|
+
expect(removed?.id).toBe('sum');
|
|
145
|
+
expect((agent.value.tools ?? []).map((module) => module.id)).toEqual([
|
|
146
|
+
'lookup_user'
|
|
147
|
+
]);
|
|
148
|
+
});
|
|
149
|
+
it('replaces module content while preserving the original object reference', () => {
|
|
150
|
+
const original = makeRawModule('sum');
|
|
151
|
+
const replacement = makeRawModule('sum');
|
|
152
|
+
replacement.value.content = 'updated';
|
|
153
|
+
const result = replaceFlowModule(original, replacement);
|
|
154
|
+
expect(result).toBe(original);
|
|
155
|
+
expect(original.value.content).toBe('updated');
|
|
156
|
+
});
|
|
157
|
+
it('collectAllFlowModuleIds includes all aiagent tool IDs including non-flowmodule', () => {
|
|
158
|
+
const lookup = makeFlowModuleTool(makeRawModule('lookup_user'));
|
|
159
|
+
const mcp = makeMcpTool('search_docs');
|
|
160
|
+
const agent = makeAiAgent('agent', [lookup, mcp]);
|
|
161
|
+
const failure = makeRawModule('failure');
|
|
162
|
+
const flow = {
|
|
163
|
+
modules: [makeRawModule('step_a'), agent],
|
|
164
|
+
failure_module: failure
|
|
165
|
+
};
|
|
166
|
+
const ids = collectAllFlowModuleIds(flow);
|
|
167
|
+
// Should include ALL tool IDs (both flowmodule and MCP)
|
|
168
|
+
expect(ids).toContain('step_a');
|
|
169
|
+
expect(ids).toContain('agent');
|
|
170
|
+
expect(ids).toContain('lookup_user');
|
|
171
|
+
expect(ids).toContain('search_docs');
|
|
172
|
+
expect(ids).toContain('failure');
|
|
173
|
+
expect(ids).toHaveLength(5);
|
|
174
|
+
});
|
|
175
|
+
it('collectAllFlowModuleIdsFromModules works without special modules', () => {
|
|
176
|
+
const agent = makeAiAgent('agent', [
|
|
177
|
+
makeFlowModuleTool(makeRawModule('sum')),
|
|
178
|
+
makeMcpTool('websearch')
|
|
179
|
+
]);
|
|
180
|
+
const ids = collectAllFlowModuleIdsFromModules([agent]);
|
|
181
|
+
expect(ids).toEqual(['agent', 'sum', 'websearch']);
|
|
182
|
+
});
|
|
183
|
+
it('collectFlowNodes excludes non-flowmodule tools (MCP)', () => {
|
|
184
|
+
// Verify that collectFlowNodes still filters non-flowmodule tools
|
|
185
|
+
const lookup = makeFlowModuleTool(makeRawModule('lookup_user'));
|
|
186
|
+
const mcp = makeMcpTool('search_docs');
|
|
187
|
+
const agent = makeAiAgent('agent', [lookup, mcp]);
|
|
188
|
+
const flow = { modules: [agent] };
|
|
189
|
+
const nodeIds = collectFlowNodes(flow).map((n) => n.module.id);
|
|
190
|
+
expect(nodeIds).toContain('agent');
|
|
191
|
+
expect(nodeIds).toContain('lookup_user');
|
|
192
|
+
expect(nodeIds).not.toContain('search_docs');
|
|
193
|
+
});
|
|
194
|
+
it('recreates a missing branch container from the source flow location', () => {
|
|
195
|
+
const nested = makeRawModule('nested');
|
|
196
|
+
const beforeFlow = {
|
|
197
|
+
modules: [
|
|
198
|
+
{
|
|
199
|
+
id: 'router',
|
|
200
|
+
summary: 'router',
|
|
201
|
+
value: {
|
|
202
|
+
type: 'branchone',
|
|
203
|
+
default: [],
|
|
204
|
+
branches: [{ expr: 'true', modules: [nested] }],
|
|
205
|
+
input_transforms: {}
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
]
|
|
209
|
+
};
|
|
210
|
+
const targetFlow = {
|
|
211
|
+
modules: [
|
|
212
|
+
{
|
|
213
|
+
id: 'router',
|
|
214
|
+
summary: 'router',
|
|
215
|
+
value: {
|
|
216
|
+
type: 'branchone',
|
|
217
|
+
default: [],
|
|
218
|
+
branches: [],
|
|
219
|
+
input_transforms: {}
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
]
|
|
223
|
+
};
|
|
224
|
+
const recreatedContainer = ensureModuleArrayByLocation(targetFlow, {
|
|
225
|
+
type: 'branchone-branch',
|
|
226
|
+
parentId: 'router',
|
|
227
|
+
branchIndex: 0,
|
|
228
|
+
index: 0
|
|
229
|
+
}, beforeFlow);
|
|
230
|
+
expect(recreatedContainer).toEqual([]);
|
|
231
|
+
expect(((targetFlow.modules?.[0].value).branches ?? [])[0]).toMatchObject({
|
|
232
|
+
expr: 'true',
|
|
233
|
+
modules: []
|
|
234
|
+
});
|
|
235
|
+
});
|
|
236
|
+
});
|
|
@@ -94,8 +94,7 @@ $effect(() => {
|
|
|
94
94
|
class={twMerge(
|
|
95
95
|
'text-xs bg-surface border-[1px] border-gray-300 dark:border-gray-500 focus:outline-none',
|
|
96
96
|
'hover:bg-surface-hover focus:ring-4 focus:ring-surface-selected font-medium rounded-sm w-[40px] gap-1 h-[20px]',
|
|
97
|
-
'flex items-center justify-center'
|
|
98
|
-
flowJobsSuccess?.[selected] == false ? 'text-red-400' : 'text-secondary'
|
|
97
|
+
'flex items-center justify-center text-secondary'
|
|
99
98
|
)}
|
|
100
99
|
meltElement={trigger}
|
|
101
100
|
>
|
|
@@ -113,34 +112,41 @@ $effect(() => {
|
|
|
113
112
|
<div class="max-h-[300px]">
|
|
114
113
|
{#key items}
|
|
115
114
|
{#if items.length > 0}
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
115
|
+
<VirtualList height={300} width="100%" itemCount={items.length} itemSize={24}>
|
|
116
|
+
{#snippet header()}{/snippet}
|
|
117
|
+
{#snippet footer()}{/snippet}
|
|
118
|
+
{#snippet item({ index: idx, style })}
|
|
119
|
+
<div {style}>
|
|
120
|
+
<MenuItem
|
|
121
|
+
class={twMerge(
|
|
122
|
+
'text-primary text-xs w-full text-left py-1 pl-2 hover:bg-surface-hover whitespace-nowrap flex flex-row gap-2 items-center',
|
|
123
|
+
'data-[highlighted]:bg-surface-hover',
|
|
124
|
+
items[idx].index == selected ? 'bg-surface-selected' : ''
|
|
125
|
+
)}
|
|
126
|
+
onClick={() => {
|
|
127
|
+
onSelectedIteration?.({
|
|
128
|
+
moduleId: moduleId,
|
|
129
|
+
index: items[idx].index,
|
|
130
|
+
id: items[idx].id,
|
|
131
|
+
manuallySet: true
|
|
132
|
+
})
|
|
133
|
+
menu?.close()
|
|
134
|
+
}}
|
|
135
|
+
item={childrenItem}
|
|
136
|
+
>
|
|
137
|
+
<span
|
|
138
|
+
class="inline-block w-2 h-2 rounded-full shrink-0 {items[idx].success ===
|
|
139
|
+
true
|
|
140
|
+
? 'bg-green-500'
|
|
141
|
+
: items[idx].success === false
|
|
142
|
+
? 'bg-red-500'
|
|
143
|
+
: 'bg-yellow-400'}"
|
|
144
|
+
></span>
|
|
145
|
+
#{items[idx].index + 1}
|
|
146
|
+
</MenuItem>
|
|
147
|
+
</div>
|
|
148
|
+
{/snippet}
|
|
149
|
+
</VirtualList>
|
|
144
150
|
{:else}
|
|
145
151
|
<div class="text-xs text-tertiary py-2 px-2">No iterations</div>
|
|
146
152
|
{/if}
|
|
@@ -443,7 +443,7 @@ let historyOpen = $derived.by(() => outputPickerInner?.getHistoryOpen?.() ?? fal
|
|
|
443
443
|
onmouseleave={() => (hover = false)}
|
|
444
444
|
>
|
|
445
445
|
{#if !isMultiSelected && (hover || selected || testRunDropdownOpen) && outputPickerVisible}
|
|
446
|
-
<div class="bg-surface rounded-md" transition:fade={{ duration: 100 }}>
|
|
446
|
+
<div class="bg-surface rounded-md" transition:fade={{ duration: 100 }} data-run-button={id}>
|
|
447
447
|
{#if !testIsLoading}
|
|
448
448
|
<Button
|
|
449
449
|
size="xs"
|