@invect/ui 0.0.1
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/LICENSE +21 -0
- package/README.md +77 -0
- package/dist/Invect-CWpIwZ5F.js +92738 -0
- package/dist/Invect.d.ts +25 -0
- package/dist/InvectShell.d.ts +14 -0
- package/dist/api/agent-tools.api.d.ts +1 -0
- package/dist/api/client.d.ts +207 -0
- package/dist/api/credentials.api.d.ts +47 -0
- package/dist/api/executions.api.d.ts +43 -0
- package/dist/api/flows.api.d.ts +100 -0
- package/dist/api/index.d.ts +9 -0
- package/dist/api/node-data.api.d.ts +66 -0
- package/dist/api/query-keys.d.ts +22 -0
- package/dist/api/triggers.api.d.ts +44 -0
- package/dist/api/types.d.ts +147 -0
- package/dist/api/use-flow-run-stream.d.ts +12 -0
- package/dist/assets/invect-branding.d.ts +4 -0
- package/dist/assets/provider-icons/index.d.ts +8 -0
- package/dist/babel-C9OtljFZ.js +9721 -0
- package/dist/components/PageLayout.d.ts +17 -0
- package/dist/components/chat/ChatInput.d.ts +17 -0
- package/dist/components/chat/ChatMessageList.d.ts +14 -0
- package/dist/components/chat/ChatModelSelector.d.ts +11 -0
- package/dist/components/chat/ChatPanel.d.ts +19 -0
- package/dist/components/chat/ChatPromptOverlay.d.ts +13 -0
- package/dist/components/chat/ChatProviderSelector.d.ts +9 -0
- package/dist/components/chat/ChatSettingsPanel.d.ts +11 -0
- package/dist/components/chat/InlineCredentialSetup.d.ts +9 -0
- package/dist/components/chat/MarkdownRenderer.d.ts +7 -0
- package/dist/components/chat/chat-memory.d.ts +21 -0
- package/dist/components/chat/chat.store.d.ts +416 -0
- package/dist/components/chat/index.d.ts +5 -0
- package/dist/components/chat/use-chat.d.ts +28 -0
- package/dist/components/credentials/CreateCredentialModal.d.ts +13 -0
- package/dist/components/credentials/CredentialDetailDialog.d.ts +17 -0
- package/dist/components/credentials/EditCredentialModal.d.ts +11 -0
- package/dist/components/credentials/OAuth2ConnectButton.d.ts +38 -0
- package/dist/components/credentials/OAuth2ProviderSelector.d.ts +15 -0
- package/dist/components/credentials/credential-utils.d.ts +12 -0
- package/dist/components/credentials/index.d.ts +9 -0
- package/dist/components/dashboard/FailedRunsAlert.d.ts +3 -0
- package/dist/components/dashboard/FlowCard.d.ts +7 -0
- package/dist/components/dashboard/RecentActivityTable.d.ts +9 -0
- package/dist/components/dashboard/StatCard.d.ts +10 -0
- package/dist/components/dashboard/index.d.ts +5 -0
- package/dist/components/dashboard/status-helpers.d.ts +5 -0
- package/dist/components/flow-editor/ActionsSidebar.d.ts +2 -0
- package/dist/components/flow-editor/FlowEditor.d.ts +21 -0
- package/dist/components/flow-editor/FlowHeader.d.ts +9 -0
- package/dist/components/flow-editor/FlowLayout.d.ts +24 -0
- package/dist/components/flow-editor/ModeSwitcher.d.ts +7 -0
- package/dist/components/flow-editor/NodeSidebar.d.ts +24 -0
- package/dist/components/flow-editor/RunControls.d.ts +12 -0
- package/dist/components/flow-editor/ToolConfigPanel.d.ts +16 -0
- package/dist/components/flow-editor/ValidationPanel.d.ts +5 -0
- package/dist/components/flow-editor/flow-editor.store.d.ts +1 -0
- package/dist/components/flow-editor/index.d.ts +6 -0
- package/dist/components/flow-editor/inline-edit.d.ts +10 -0
- package/dist/components/flow-editor/node-config-panel/ConfigFieldWithTemplate.d.ts +26 -0
- package/dist/components/flow-editor/node-config-panel/CredentialCombobox.d.ts +21 -0
- package/dist/components/flow-editor/node-config-panel/CredentialsSection.d.ts +19 -0
- package/dist/components/flow-editor/node-config-panel/DroppableInput.d.ts +20 -0
- package/dist/components/flow-editor/node-config-panel/DynamicSelectField.d.ts +22 -0
- package/dist/components/flow-editor/node-config-panel/JsonPreviewPanel.d.ts +25 -0
- package/dist/components/flow-editor/node-config-panel/NodeConfigPanel.d.ts +14 -0
- package/dist/components/flow-editor/node-config-panel/NodeConfigPanelHeader.d.ts +15 -0
- package/dist/components/flow-editor/node-config-panel/ParametersSection.d.ts +16 -0
- package/dist/components/flow-editor/node-config-panel/SearchableSelectField.d.ts +17 -0
- package/dist/components/flow-editor/node-config-panel/SwitchCasesField.d.ts +18 -0
- package/dist/components/flow-editor/node-config-panel/hooks/index.d.ts +2 -0
- package/dist/components/flow-editor/node-config-panel/hooks/use-node-config-panel-state.d.ts +24 -0
- package/dist/components/flow-editor/node-config-panel/hooks/use-node-execution.d.ts +46 -0
- package/dist/components/flow-editor/node-config-panel/hooks/use-upstream-slots.d.ts +16 -0
- package/dist/components/flow-editor/node-config-panel/panels/AgentToolsPanel.d.ts +18 -0
- package/dist/components/flow-editor/node-config-panel/panels/ConfigurationPanel.d.ts +49 -0
- package/dist/components/flow-editor/node-config-panel/panels/DataMapperPane.d.ts +40 -0
- package/dist/components/flow-editor/node-config-panel/panels/InputPanel.d.ts +49 -0
- package/dist/components/flow-editor/node-config-panel/panels/OutputPanel.d.ts +7 -0
- package/dist/components/flow-editor/node-config-panel/panels/index.d.ts +4 -0
- package/dist/components/flow-editor/node-config-panel/types.d.ts +19 -0
- package/dist/components/flow-editor/node-config-panel/use-node-config-panel-store.d.ts +49 -0
- package/dist/components/flow-editor/node-config-panel/use-node-config-state.d.ts +26 -0
- package/dist/components/flow-editor/node-config-panel/use-run-node.d.ts +16 -0
- package/dist/components/flow-editor/node-config-panel/utils.d.ts +9 -0
- package/dist/components/flow-editor/serialize-to-sdk.d.ts +20 -0
- package/dist/components/flow-editor/toolbar-context.d.ts +2 -0
- package/dist/components/flow-editor/use-copy-paste.d.ts +7 -0
- package/dist/components/flow-editor/use-copy-paste.types.d.ts +38 -0
- package/dist/components/flow-editor/use-flow-editor.d.ts +44 -0
- package/dist/components/flow-runs-table/FlowRunsTable.d.ts +6 -0
- package/dist/components/flow-runs-table/index.d.ts +1 -0
- package/dist/components/flow-viewer/FlowRunsView.d.ts +7 -0
- package/dist/components/flow-viewer/FlowStatusView.d.ts +21 -0
- package/dist/components/flow-viewer/RunSelector.d.ts +13 -0
- package/dist/components/flow-viewer/RunsSidebar.d.ts +14 -0
- package/dist/components/flow-viewer/agent-tool-executions-list.d.ts +7 -0
- package/dist/components/flow-viewer/index.d.ts +1 -0
- package/dist/components/flow-viewer/logs-panel.d.ts +18 -0
- package/dist/components/flow-viewer/use-execution-log-data.d.ts +113 -0
- package/dist/components/graph/BatchFlowEdge.d.ts +33 -0
- package/dist/components/graph/LayoutSelector.d.ts +9 -0
- package/dist/components/graph/index.d.ts +47 -0
- package/dist/components/graph/styleUtils.d.ts +124 -0
- package/dist/components/nodes/AgentConfigPanel.d.ts +24 -0
- package/dist/components/nodes/AgentNode.d.ts +8 -0
- package/dist/components/nodes/AgentToolsBox.d.ts +41 -0
- package/dist/components/nodes/NodeAppendix.d.ts +19 -0
- package/dist/components/nodes/NodeStatusIndicator.d.ts +30 -0
- package/dist/components/nodes/NodeViewContext.d.ts +18 -0
- package/dist/components/nodes/ToolParamField.d.ts +28 -0
- package/dist/components/nodes/ToolSelectorModal.d.ts +80 -0
- package/dist/components/nodes/ToolSelectorParts.d.ts +30 -0
- package/dist/components/nodes/UniversalNode.d.ts +2 -0
- package/dist/components/nodes/createContextAwareNodes.d.ts +6 -0
- package/dist/components/nodes/index.d.ts +22 -0
- package/dist/components/nodes/nodeRegistry.d.ts +13 -0
- package/dist/components/nodes/withNodeContext.d.ts +7 -0
- package/dist/components/shared/InvectLoader.d.ts +8 -0
- package/dist/components/shared/InvectLogo.d.ts +9 -0
- package/dist/components/shared/ProviderIcon.d.ts +23 -0
- package/dist/components/side-menu/side-menu.d.ts +4 -0
- package/dist/components/sidebar/BaseSidebar.d.ts +17 -0
- package/dist/components/sidebar/index.d.ts +1 -0
- package/dist/components/triggers/CronPreview.d.ts +12 -0
- package/dist/components/triggers/index.d.ts +1 -0
- package/dist/components/ui/alert-dialog.d.ts +18 -0
- package/dist/components/ui/badge.d.ts +9 -0
- package/dist/components/ui/button.d.ts +13 -0
- package/dist/components/ui/card.d.ts +9 -0
- package/dist/components/ui/codemirror-js-editor.d.ts +25 -0
- package/dist/components/ui/codemirror-json-editor.d.ts +18 -0
- package/dist/components/ui/codemirror-nunjucks-editor.d.ts +13 -0
- package/dist/components/ui/codemirror-vscode-theme.d.ts +24 -0
- package/dist/components/ui/collapsible.d.ts +6 -0
- package/dist/components/ui/command.d.ts +18 -0
- package/dist/components/ui/dialog.d.ts +18 -0
- package/dist/components/ui/dropdown-menu.d.ts +25 -0
- package/dist/components/ui/empty-state.d.ts +21 -0
- package/dist/components/ui/input.d.ts +3 -0
- package/dist/components/ui/label.d.ts +4 -0
- package/dist/components/ui/popover.d.ts +10 -0
- package/dist/components/ui/resizable.d.ts +8 -0
- package/dist/components/ui/scroll-area.d.ts +5 -0
- package/dist/components/ui/select.d.ts +18 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/slider.d.ts +4 -0
- package/dist/components/ui/switch.d.ts +3 -0
- package/dist/components/ui/table.d.ts +10 -0
- package/dist/components/ui/textarea.d.ts +3 -0
- package/dist/components/ui/tooltip.d.ts +7 -0
- package/dist/components/ui/tree-view.d.ts +107 -0
- package/dist/contexts/AgentToolCallbacksContext.d.ts +23 -0
- package/dist/contexts/ApiContext.d.ts +11 -0
- package/dist/contexts/FlowDataContext.d.ts +9 -0
- package/dist/contexts/NodeRegistryContext.d.ts +14 -0
- package/dist/contexts/PluginRegistryContext.d.ts +39 -0
- package/dist/contexts/ThemeProvider.d.ts +18 -0
- package/dist/contexts/ValidationContext.d.ts +22 -0
- package/dist/demo/DemoInvect.d.ts +11 -0
- package/dist/demo/FlowViewer.d.ts +31 -0
- package/dist/demo/demo-api-client.d.ts +33 -0
- package/dist/demo/index.d.ts +6 -0
- package/dist/demo/sample-data.d.ts +1538 -0
- package/dist/demo.d.ts +2 -0
- package/dist/demo.js +2774 -0
- package/dist/estree-ClbRfS-1.js +7076 -0
- package/dist/fonts/geist-cyrillic-wght-normal.woff2 +0 -0
- package/dist/fonts/geist-latin-ext-wght-normal.woff2 +0 -0
- package/dist/fonts/geist-latin-wght-normal.woff2 +0 -0
- package/dist/fonts/iosevka-latin-400-normal.woff2 +0 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/use-document-title.d.ts +1 -0
- package/dist/hooks/use-flow-data.d.ts +22 -0
- package/dist/hooks/use-invect-portal-class.d.ts +21 -0
- package/dist/hooks/useFlowEditorStore.d.ts +1 -0
- package/dist/index.css +3 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +717 -0
- package/dist/lib/utils.d.ts +2 -0
- package/dist/prettier.d.ts +13 -0
- package/dist/routes/all-flow-runs.d.ts +5 -0
- package/dist/routes/credentials.d.ts +5 -0
- package/dist/routes/flow-route-layout.d.ts +19 -0
- package/dist/routes/flow-runs.d.ts +5 -0
- package/dist/routes/flow.d.ts +5 -0
- package/dist/routes/home.d.ts +5 -0
- package/dist/services/index.d.ts +1 -0
- package/dist/standalone-C3Df7W52.js +3463 -0
- package/dist/stores/executionViewStore.d.ts +64 -0
- package/dist/stores/flow-editor.store.d.ts +137 -0
- package/dist/stores/flowEditorStore.d.ts +1 -0
- package/dist/stores/index.d.ts +2 -0
- package/dist/stores/uiStore.d.ts +45 -0
- package/dist/types/agent-tools.types.d.ts +53 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/node-definition.types.d.ts +85 -0
- package/dist/types/plugin.types.d.ts +100 -0
- package/dist/utils/credentialBranding.d.ts +8 -0
- package/dist/utils/credentialFiltering.d.ts +20 -0
- package/dist/utils/flowTransformations.d.ts +16 -0
- package/dist/utils/layoutUtils.d.ts +23 -0
- package/dist/utils/nodeReferenceUtils.d.ts +37 -0
- package/dist/vendor.d.ts +5 -0
- package/package.json +130 -0
- package/src/.DS_Store +0 -0
- package/src/Invect.tsx +229 -0
- package/src/InvectShell.tsx +55 -0
- package/src/api/agent-tools.api.ts +23 -0
- package/src/api/client.ts +899 -0
- package/src/api/credentials.api.ts +197 -0
- package/src/api/executions.api.ts +228 -0
- package/src/api/flows.api.ts +195 -0
- package/src/api/index.ts +17 -0
- package/src/api/node-data.api.ts +167 -0
- package/src/api/query-keys.ts +44 -0
- package/src/api/triggers.api.ts +120 -0
- package/src/api/types.ts +212 -0
- package/src/api/use-flow-run-stream.ts +206 -0
- package/src/app.css +560 -0
- package/src/assets/.DS_Store +0 -0
- package/src/assets/favicon.ico +0 -0
- package/src/assets/fonts/geist-cyrillic-wght-normal.woff2 +0 -0
- package/src/assets/fonts/geist-latin-ext-wght-normal.woff2 +0 -0
- package/src/assets/fonts/geist-latin-wght-normal.woff2 +0 -0
- package/src/assets/fonts/iosevka-latin-400-normal.woff2 +0 -0
- package/src/assets/invect-branding.ts +51 -0
- package/src/assets/provider-icons/anthropic.svg +1 -0
- package/src/assets/provider-icons/anthropic_light.svg +1 -0
- package/src/assets/provider-icons/github.svg +1 -0
- package/src/assets/provider-icons/github_light.svg +1 -0
- package/src/assets/provider-icons/gmail.svg +1 -0
- package/src/assets/provider-icons/google_calendar.svg +1 -0
- package/src/assets/provider-icons/google_docs.svg +1 -0
- package/src/assets/provider-icons/google_drive.svg +1 -0
- package/src/assets/provider-icons/google_sheets.svg +1 -0
- package/src/assets/provider-icons/index.ts +55 -0
- package/src/assets/provider-icons/linear.svg +1 -0
- package/src/assets/provider-icons/openai.svg +1 -0
- package/src/assets/provider-icons/postgres.svg +1 -0
- package/src/assets/provider-icons/slack.svg +1 -0
- package/src/assets/small-loader-dark.svg +22 -0
- package/src/assets/small-loader-light.svg +22 -0
- package/src/assets/small.svg +7 -0
- package/src/components/.DS_Store +0 -0
- package/src/components/PageLayout.tsx +55 -0
- package/src/components/chat/ChatInput.tsx +115 -0
- package/src/components/chat/ChatMessageList.tsx +788 -0
- package/src/components/chat/ChatModelSelector.tsx +208 -0
- package/src/components/chat/ChatPanel.tsx +243 -0
- package/src/components/chat/ChatPromptOverlay.tsx +150 -0
- package/src/components/chat/ChatProviderSelector.tsx +135 -0
- package/src/components/chat/ChatSettingsPanel.tsx +277 -0
- package/src/components/chat/InlineCredentialSetup.tsx +343 -0
- package/src/components/chat/MarkdownRenderer.tsx +140 -0
- package/src/components/chat/chat-memory.ts +88 -0
- package/src/components/chat/chat.store.ts +479 -0
- package/src/components/chat/index.ts +5 -0
- package/src/components/chat/use-chat.ts +473 -0
- package/src/components/credentials/CreateCredentialModal.tsx +609 -0
- package/src/components/credentials/CredentialDetailDialog.tsx +882 -0
- package/src/components/credentials/EditCredentialModal.tsx +399 -0
- package/src/components/credentials/OAuth2ConnectButton.tsx +288 -0
- package/src/components/credentials/OAuth2ProviderSelector.tsx +360 -0
- package/src/components/credentials/credential-utils.ts +99 -0
- package/src/components/credentials/index.ts +10 -0
- package/src/components/dashboard/FailedRunsAlert.tsx +67 -0
- package/src/components/dashboard/FlowCard.tsx +64 -0
- package/src/components/dashboard/RecentActivityTable.tsx +92 -0
- package/src/components/dashboard/StatCard.tsx +32 -0
- package/src/components/dashboard/index.ts +5 -0
- package/src/components/dashboard/status-helpers.tsx +102 -0
- package/src/components/flow-editor/ActionsSidebar.tsx +503 -0
- package/src/components/flow-editor/FlowEditor.tsx +1002 -0
- package/src/components/flow-editor/FlowHeader.tsx +87 -0
- package/src/components/flow-editor/FlowLayout.tsx +117 -0
- package/src/components/flow-editor/ModeSwitcher.tsx +49 -0
- package/src/components/flow-editor/NodeSidebar.tsx +343 -0
- package/src/components/flow-editor/RunControls.tsx +109 -0
- package/src/components/flow-editor/ToolConfigPanel.tsx +434 -0
- package/src/components/flow-editor/ValidationPanel.tsx +167 -0
- package/src/components/flow-editor/flow-editor.store.ts +2 -0
- package/src/components/flow-editor/index.ts +6 -0
- package/src/components/flow-editor/inline-edit.tsx +111 -0
- package/src/components/flow-editor/node-config-panel/ConfigFieldWithTemplate.tsx +334 -0
- package/src/components/flow-editor/node-config-panel/CredentialCombobox.tsx +217 -0
- package/src/components/flow-editor/node-config-panel/CredentialsSection.tsx +154 -0
- package/src/components/flow-editor/node-config-panel/DroppableInput.tsx +45 -0
- package/src/components/flow-editor/node-config-panel/DynamicSelectField.tsx +223 -0
- package/src/components/flow-editor/node-config-panel/JsonPreviewPanel.tsx +134 -0
- package/src/components/flow-editor/node-config-panel/NodeConfigPanel.tsx +650 -0
- package/src/components/flow-editor/node-config-panel/NodeConfigPanelHeader.tsx +91 -0
- package/src/components/flow-editor/node-config-panel/ParametersSection.tsx +144 -0
- package/src/components/flow-editor/node-config-panel/SearchableSelectField.tsx +126 -0
- package/src/components/flow-editor/node-config-panel/SwitchCasesField.tsx +212 -0
- package/src/components/flow-editor/node-config-panel/hooks/index.ts +2 -0
- package/src/components/flow-editor/node-config-panel/hooks/use-node-config-panel-state.ts +284 -0
- package/src/components/flow-editor/node-config-panel/hooks/use-node-execution.ts +287 -0
- package/src/components/flow-editor/node-config-panel/hooks/use-upstream-slots.ts +310 -0
- package/src/components/flow-editor/node-config-panel/panels/AgentToolsPanel.tsx +837 -0
- package/src/components/flow-editor/node-config-panel/panels/ConfigurationPanel.tsx +383 -0
- package/src/components/flow-editor/node-config-panel/panels/DataMapperPane.tsx +456 -0
- package/src/components/flow-editor/node-config-panel/panels/InputPanel.tsx +338 -0
- package/src/components/flow-editor/node-config-panel/panels/OutputPanel.tsx +109 -0
- package/src/components/flow-editor/node-config-panel/panels/index.ts +4 -0
- package/src/components/flow-editor/node-config-panel/types.ts +20 -0
- package/src/components/flow-editor/node-config-panel/use-node-config-panel-store.ts +283 -0
- package/src/components/flow-editor/node-config-panel/use-node-config-state.ts +172 -0
- package/src/components/flow-editor/node-config-panel/use-run-node.ts +147 -0
- package/src/components/flow-editor/node-config-panel/utils.ts +73 -0
- package/src/components/flow-editor/serialize-to-sdk.ts +204 -0
- package/src/components/flow-editor/toolbar-context.ts +9 -0
- package/src/components/flow-editor/use-copy-paste.ts +575 -0
- package/src/components/flow-editor/use-copy-paste.types.ts +35 -0
- package/src/components/flow-editor/use-flow-editor.ts +241 -0
- package/src/components/flow-runs-table/FlowRunsTable.tsx +631 -0
- package/src/components/flow-runs-table/index.ts +1 -0
- package/src/components/flow-viewer/FlowRunsView.tsx +268 -0
- package/src/components/flow-viewer/FlowStatusView.tsx +351 -0
- package/src/components/flow-viewer/RunSelector.tsx +422 -0
- package/src/components/flow-viewer/RunsSidebar.tsx +125 -0
- package/src/components/flow-viewer/agent-tool-executions-list.tsx +298 -0
- package/src/components/flow-viewer/index.ts +1 -0
- package/src/components/flow-viewer/logs-panel.tsx +567 -0
- package/src/components/flow-viewer/use-execution-log-data.ts +374 -0
- package/src/components/graph/BatchFlowEdge.tsx +229 -0
- package/src/components/graph/LayoutSelector.tsx +42 -0
- package/src/components/graph/index.ts +61 -0
- package/src/components/graph/styleUtils.ts +375 -0
- package/src/components/nodes/.DS_Store +0 -0
- package/src/components/nodes/AgentConfigPanel.tsx +1033 -0
- package/src/components/nodes/AgentNode.tsx +298 -0
- package/src/components/nodes/AgentToolsBox.tsx +193 -0
- package/src/components/nodes/NodeAppendix.tsx +98 -0
- package/src/components/nodes/NodeStatusIndicator.tsx +74 -0
- package/src/components/nodes/NodeViewContext.tsx +45 -0
- package/src/components/nodes/ToolParamField.tsx +282 -0
- package/src/components/nodes/ToolSelectorModal.tsx +648 -0
- package/src/components/nodes/ToolSelectorParts.tsx +505 -0
- package/src/components/nodes/UniversalNode.tsx +356 -0
- package/src/components/nodes/createContextAwareNodes.ts +19 -0
- package/src/components/nodes/index.ts +45 -0
- package/src/components/nodes/nodeRegistry.ts +50 -0
- package/src/components/nodes/withNodeContext.tsx +55 -0
- package/src/components/shared/InvectLoader.tsx +59 -0
- package/src/components/shared/InvectLogo.tsx +59 -0
- package/src/components/shared/ProviderIcon.tsx +115 -0
- package/src/components/side-menu/side-menu.tsx +267 -0
- package/src/components/sidebar/BaseSidebar.tsx +148 -0
- package/src/components/sidebar/index.ts +1 -0
- package/src/components/triggers/CronPreview.tsx +243 -0
- package/src/components/triggers/index.ts +1 -0
- package/src/components/ui/alert-dialog.tsx +152 -0
- package/src/components/ui/badge.tsx +39 -0
- package/src/components/ui/button.tsx +58 -0
- package/src/components/ui/card.tsx +75 -0
- package/src/components/ui/codemirror-js-editor.tsx +432 -0
- package/src/components/ui/codemirror-json-editor.tsx +816 -0
- package/src/components/ui/codemirror-nunjucks-editor.tsx +451 -0
- package/src/components/ui/codemirror-vscode-theme.ts +243 -0
- package/src/components/ui/collapsible.tsx +12 -0
- package/src/components/ui/command.tsx +162 -0
- package/src/components/ui/dialog.tsx +140 -0
- package/src/components/ui/dropdown-menu.tsx +232 -0
- package/src/components/ui/empty-state.tsx +93 -0
- package/src/components/ui/input.tsx +26 -0
- package/src/components/ui/label.tsx +19 -0
- package/src/components/ui/popover.tsx +53 -0
- package/src/components/ui/resizable.tsx +61 -0
- package/src/components/ui/scroll-area.tsx +56 -0
- package/src/components/ui/select.tsx +179 -0
- package/src/components/ui/separator.tsx +26 -0
- package/src/components/ui/slider.tsx +58 -0
- package/src/components/ui/switch.tsx +22 -0
- package/src/components/ui/table.tsx +90 -0
- package/src/components/ui/textarea.tsx +23 -0
- package/src/components/ui/tooltip.tsx +54 -0
- package/src/components/ui/tree-view.tsx +574 -0
- package/src/contexts/AgentToolCallbacksContext.tsx +31 -0
- package/src/contexts/ApiContext.tsx +51 -0
- package/src/contexts/FlowDataContext.tsx +21 -0
- package/src/contexts/NodeRegistryContext.tsx +54 -0
- package/src/contexts/PluginRegistryContext.tsx +182 -0
- package/src/contexts/ThemeProvider.tsx +106 -0
- package/src/contexts/ValidationContext.tsx +122 -0
- package/src/demo/DemoInvect.tsx +42 -0
- package/src/demo/FlowViewer.tsx +294 -0
- package/src/demo/demo-api-client.ts +246 -0
- package/src/demo/index.ts +28 -0
- package/src/demo/sample-data.ts +1980 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use-document-title.ts +8 -0
- package/src/hooks/use-flow-data.ts +144 -0
- package/src/hooks/use-invect-portal-class.ts +27 -0
- package/src/hooks/useFlowEditorStore.ts +2 -0
- package/src/index.ts +70 -0
- package/src/lib/utils.ts +6 -0
- package/src/prettier.d.ts +13 -0
- package/src/routes/all-flow-runs.tsx +27 -0
- package/src/routes/credentials.tsx +362 -0
- package/src/routes/flow-route-layout.tsx +113 -0
- package/src/routes/flow-runs.tsx +22 -0
- package/src/routes/flow.tsx +22 -0
- package/src/routes/home.tsx +282 -0
- package/src/services/index.ts +6 -0
- package/src/stores/executionViewStore.ts +211 -0
- package/src/stores/flow-editor.store.ts +738 -0
- package/src/stores/flowEditorStore.ts +2 -0
- package/src/stores/index.ts +10 -0
- package/src/stores/uiStore.ts +189 -0
- package/src/types/agent-tools.types.ts +64 -0
- package/src/types/index.ts +5 -0
- package/src/types/node-definition.types.ts +104 -0
- package/src/types/plugin.types.ts +123 -0
- package/src/utils/credentialBranding.ts +116 -0
- package/src/utils/credentialFiltering.ts +68 -0
- package/src/utils/flowTransformations.ts +137 -0
- package/src/utils/layoutUtils.ts +127 -0
- package/src/utils/nodeReferenceUtils.ts +135 -0
- package/src/vendor.d.ts +7 -0
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
import { cn } from '../../lib/utils';
|
|
2
|
+
import { NodeExecutionStatus } from '@invect/core/types';
|
|
3
|
+
|
|
4
|
+
// Utility functions for styling nodes and edges, inspired by Invect
|
|
5
|
+
|
|
6
|
+
export type NodeType =
|
|
7
|
+
| 'ChatInput'
|
|
8
|
+
| 'TextInput'
|
|
9
|
+
| 'Input'
|
|
10
|
+
| 'ChatOutput'
|
|
11
|
+
| 'TextOutput'
|
|
12
|
+
| 'Output'
|
|
13
|
+
| 'OpenAIModel'
|
|
14
|
+
| 'AnthropicModel'
|
|
15
|
+
| 'LLM'
|
|
16
|
+
| 'Prompt'
|
|
17
|
+
| 'PromptTemplate'
|
|
18
|
+
| 'Agent'
|
|
19
|
+
| 'Memory'
|
|
20
|
+
| 'Tool'
|
|
21
|
+
| 'Chain'
|
|
22
|
+
| 'Retriever'
|
|
23
|
+
| 'Embedding'
|
|
24
|
+
| 'VectorStore'
|
|
25
|
+
| 'DocumentLoader' // Added based on Invect's categories
|
|
26
|
+
| 'TextSplitter' // Added based on Invect's categories
|
|
27
|
+
| 'Note'
|
|
28
|
+
| 'Unknown';
|
|
29
|
+
|
|
30
|
+
// Use proper status types from types package, plus UI-specific 'inactive' status
|
|
31
|
+
export type NodeStatus = 'idle' | 'running' | 'success' | 'error' | 'inactive';
|
|
32
|
+
|
|
33
|
+
// Map execution status to UI status
|
|
34
|
+
export const mapExecutionStatusToNodeStatus = (
|
|
35
|
+
status: NodeExecutionStatus | string,
|
|
36
|
+
): NodeStatus => {
|
|
37
|
+
switch (status) {
|
|
38
|
+
case NodeExecutionStatus.SUCCESS:
|
|
39
|
+
case 'SUCCESS':
|
|
40
|
+
return 'success';
|
|
41
|
+
case NodeExecutionStatus.FAILED:
|
|
42
|
+
case 'FAILED':
|
|
43
|
+
return 'error';
|
|
44
|
+
case NodeExecutionStatus.RUNNING:
|
|
45
|
+
case 'RUNNING':
|
|
46
|
+
return 'running';
|
|
47
|
+
case NodeExecutionStatus.PENDING:
|
|
48
|
+
case 'PENDING':
|
|
49
|
+
return 'running';
|
|
50
|
+
case NodeExecutionStatus.SKIPPED:
|
|
51
|
+
case 'SKIPPED':
|
|
52
|
+
return 'inactive';
|
|
53
|
+
// Handle additional execution statuses that might not be in NodeExecutionStatus
|
|
54
|
+
case 'PAUSED':
|
|
55
|
+
case 'PAUSED_FOR_BATCH':
|
|
56
|
+
return 'running'; // Show as running but with different visual indicator
|
|
57
|
+
case 'CANCELLED':
|
|
58
|
+
return 'error'; // Show as error with orange/yellow color
|
|
59
|
+
default:
|
|
60
|
+
return 'idle';
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
// Invect-inspired color palette (simplified)
|
|
65
|
+
// Reference: https://github.com/invect-ai/invect/blob/main/src/frontend/src/utils/styleUtils.ts
|
|
66
|
+
// and https://github.com/invect-ai/invect/blob/main/src/frontend/src/style/index.css
|
|
67
|
+
export const langflowColors = {
|
|
68
|
+
// Categories (using names from invect's nodeColorsName for consistency)
|
|
69
|
+
emerald: { light: '#d1fae5', DEFAULT: '#10b981', dark: '#059669' }, // inputs
|
|
70
|
+
sky: { light: '#dbeafe', DEFAULT: '#3b82f6', dark: '#2563eb' }, // outputs (using sky for blue from invect)
|
|
71
|
+
fuchsia: { light: '#f5d0fe', DEFAULT: '#c026d3', dark: '#a21caf' }, // models
|
|
72
|
+
amber: { light: '#fef3c7', DEFAULT: '#f59e0b', dark: '#d97706' }, // prompts
|
|
73
|
+
orange: { light: '#fed7aa', DEFAULT: '#f97316', dark: '#ea580c' }, // chains
|
|
74
|
+
red: { light: '#fee2e2', DEFAULT: '#ef4444', dark: '#dc2626' }, // agents
|
|
75
|
+
cyan: { light: '#cffafe', DEFAULT: '#06b6d4', dark: '#0891b2' }, // memory
|
|
76
|
+
lime: { light: '#ecfccb', DEFAULT: '#84cc16', dark: '#65a30d' }, // tools
|
|
77
|
+
teal: { light: '#ccfbf1', DEFAULT: '#14b8a6', dark: '#0d9488' }, // vectorstores
|
|
78
|
+
indigo: { light: '#e0e7ff', DEFAULT: '#6366f1', dark: '#4f46e5' }, // embeddings
|
|
79
|
+
pink: { light: '#fce7f3', DEFAULT: '#ec4899', dark: '#db2777' }, // retrievers
|
|
80
|
+
purple: { light: '#ede9fe', DEFAULT: '#8b5cf6', dark: '#7c3aed' }, // documentloaders (using purple as a distinct color)
|
|
81
|
+
rose: { light: '#ffe4e6', DEFAULT: '#f43f5e', dark: '#e11d48' }, // textsplitters
|
|
82
|
+
slate: { light: '#f1f5f9', DEFAULT: '#64748b', dark: '#475569' }, // generic/unknown
|
|
83
|
+
|
|
84
|
+
// Status
|
|
85
|
+
success: { DEFAULT: '#22c55e', light: '#dcfce7', dark: '#166534' }, // green-500
|
|
86
|
+
error: { DEFAULT: '#ef4444', light: '#fee2e2', dark: '#991b1b' }, // red-500
|
|
87
|
+
running: { DEFAULT: '#3b82f6', light: '#dbeafe', dark: '#1e40af' }, // blue-500
|
|
88
|
+
|
|
89
|
+
// UI Elements
|
|
90
|
+
border: 'hsl(var(--border))', // from shadcn/ui
|
|
91
|
+
background: 'hsl(var(--background))', // from shadcn/ui
|
|
92
|
+
foreground: 'hsl(var(--foreground))', // from shadcn/ui
|
|
93
|
+
muted: 'hsl(var(--muted))', // from shadcn/ui
|
|
94
|
+
mutedForeground: 'hsl(var(--muted-foreground))', // from shadcn/ui
|
|
95
|
+
primary: 'hsl(var(--primary))', // from shadcn/ui
|
|
96
|
+
secondary: 'hsl(var(--secondary))', // from shadcn/ui
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
// Mapping our NodeType to Invect's color names for consistency
|
|
100
|
+
export const nodeTypeToColorName: Record<NodeType, keyof typeof langflowColors> = {
|
|
101
|
+
ChatInput: 'emerald',
|
|
102
|
+
TextInput: 'emerald',
|
|
103
|
+
Input: 'emerald',
|
|
104
|
+
ChatOutput: 'sky',
|
|
105
|
+
TextOutput: 'sky',
|
|
106
|
+
Output: 'sky',
|
|
107
|
+
OpenAIModel: 'fuchsia',
|
|
108
|
+
AnthropicModel: 'fuchsia',
|
|
109
|
+
LLM: 'fuchsia',
|
|
110
|
+
Prompt: 'amber',
|
|
111
|
+
PromptTemplate: 'amber',
|
|
112
|
+
Agent: 'red',
|
|
113
|
+
Memory: 'cyan',
|
|
114
|
+
Tool: 'lime',
|
|
115
|
+
Chain: 'orange',
|
|
116
|
+
Retriever: 'pink',
|
|
117
|
+
Embedding: 'indigo',
|
|
118
|
+
VectorStore: 'teal',
|
|
119
|
+
DocumentLoader: 'purple',
|
|
120
|
+
TextSplitter: 'rose',
|
|
121
|
+
Note: 'amber', // Notes can share prompt styling or have their own
|
|
122
|
+
Unknown: 'slate',
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
// Get icon name (Lucide icon names) for different node types
|
|
126
|
+
// Reference: https://github.com/invect-ai/invect/blob/main/src/frontend/src/utils/styleUtils.ts nodeIconToDisplayIconMap
|
|
127
|
+
export const getNodeIconName = (type: NodeType, icon?: string): string => {
|
|
128
|
+
if (icon && icon !== 'Default' /* Handle Invect's "Default" placeholder */) {
|
|
129
|
+
// Attempt to map known Invect icon names to Lucide, or use directly if valid
|
|
130
|
+
const langflowIconMap: Record<string, string> = {
|
|
131
|
+
OpenAI: 'Bot', // Example, assuming 'Bot' is a Lucide icon
|
|
132
|
+
MessagesSquare: 'MessagesSquare', // Already a Lucide icon
|
|
133
|
+
// Add more mappings as identified from Invect's usage
|
|
134
|
+
};
|
|
135
|
+
if (langflowIconMap[icon]) {
|
|
136
|
+
return langflowIconMap[icon];
|
|
137
|
+
}
|
|
138
|
+
// A simple check; ideally, we'd validate against all Lucide names
|
|
139
|
+
if (icon.match(/^[A-Z][a-zA-Z0-9]+$/)) {
|
|
140
|
+
return icon;
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
switch (type) {
|
|
145
|
+
case 'ChatInput':
|
|
146
|
+
case 'TextInput':
|
|
147
|
+
case 'Input':
|
|
148
|
+
return 'Download'; // Invect: Download
|
|
149
|
+
case 'ChatOutput':
|
|
150
|
+
case 'TextOutput':
|
|
151
|
+
case 'Output':
|
|
152
|
+
return 'Upload'; // Invect: Upload
|
|
153
|
+
case 'OpenAIModel':
|
|
154
|
+
case 'AnthropicModel':
|
|
155
|
+
case 'LLM':
|
|
156
|
+
return 'BrainCircuit'; // Invect: BrainCircuit
|
|
157
|
+
case 'Prompt':
|
|
158
|
+
case 'PromptTemplate':
|
|
159
|
+
return 'TerminalSquare'; // Invect: TerminalSquare
|
|
160
|
+
case 'Agent':
|
|
161
|
+
return 'Bot'; // Invect: Bot
|
|
162
|
+
case 'Memory':
|
|
163
|
+
return 'Cpu'; // Invect: Cpu
|
|
164
|
+
case 'Tool':
|
|
165
|
+
return 'Hammer'; // Invect: Hammer
|
|
166
|
+
case 'Chain':
|
|
167
|
+
return 'Link'; // Invect: Link
|
|
168
|
+
case 'Retriever':
|
|
169
|
+
return 'FileSearch'; // Invect: FileSearch
|
|
170
|
+
case 'Embedding':
|
|
171
|
+
return 'Binary'; // Invect: Binary
|
|
172
|
+
case 'VectorStore':
|
|
173
|
+
return 'Layers'; // Invect: Layers (for vectorstores)
|
|
174
|
+
case 'DocumentLoader':
|
|
175
|
+
return 'Paperclip'; // Invect: Paperclip
|
|
176
|
+
case 'TextSplitter':
|
|
177
|
+
return 'Scissors'; // Invect: Scissors
|
|
178
|
+
case 'Note':
|
|
179
|
+
return 'StickyNote';
|
|
180
|
+
default:
|
|
181
|
+
return 'Cog'; // Default Lucide icon
|
|
182
|
+
}
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
export const getNodeTailwindStyles = (type: NodeType, selected?: boolean) => {
|
|
186
|
+
const colorName = nodeTypeToColorName[type] || 'slate';
|
|
187
|
+
const colors =
|
|
188
|
+
(langflowColors[colorName] as { light: string; DEFAULT: string; dark: string }) ||
|
|
189
|
+
langflowColors.slate;
|
|
190
|
+
|
|
191
|
+
// Node type colors using concrete Tailwind classes
|
|
192
|
+
const getNodeTypeStyles = (type: NodeType) => {
|
|
193
|
+
switch (type) {
|
|
194
|
+
case 'ChatInput':
|
|
195
|
+
case 'TextInput':
|
|
196
|
+
case 'Input':
|
|
197
|
+
return 'border-emerald-500 dark:border-emerald-400';
|
|
198
|
+
case 'ChatOutput':
|
|
199
|
+
case 'TextOutput':
|
|
200
|
+
case 'Output':
|
|
201
|
+
return 'border-blue-500 dark:border-blue-400';
|
|
202
|
+
case 'OpenAIModel':
|
|
203
|
+
case 'AnthropicModel':
|
|
204
|
+
case 'LLM':
|
|
205
|
+
return 'border-purple-500 dark:border-purple-400';
|
|
206
|
+
case 'Prompt':
|
|
207
|
+
case 'PromptTemplate':
|
|
208
|
+
return 'border-amber-500 dark:border-amber-400';
|
|
209
|
+
case 'Agent':
|
|
210
|
+
return 'border-red-500 dark:border-red-400';
|
|
211
|
+
case 'Memory':
|
|
212
|
+
return 'border-cyan-500 dark:border-cyan-400';
|
|
213
|
+
case 'Tool':
|
|
214
|
+
return 'border-lime-500 dark:border-lime-400';
|
|
215
|
+
case 'Chain':
|
|
216
|
+
return 'border-orange-500 dark:border-orange-400';
|
|
217
|
+
case 'Retriever':
|
|
218
|
+
return 'border-pink-500 dark:border-pink-400';
|
|
219
|
+
case 'Embedding':
|
|
220
|
+
return 'border-indigo-500 dark:border-indigo-400';
|
|
221
|
+
case 'VectorStore':
|
|
222
|
+
return 'border-teal-500 dark:border-teal-400';
|
|
223
|
+
case 'DocumentLoader':
|
|
224
|
+
return 'border-violet-500 dark:border-violet-400';
|
|
225
|
+
case 'TextSplitter':
|
|
226
|
+
return 'border-rose-500 dark:border-rose-400';
|
|
227
|
+
case 'Note':
|
|
228
|
+
return 'border-yellow-500 dark:border-yellow-400';
|
|
229
|
+
default:
|
|
230
|
+
return 'border-border';
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
return {
|
|
235
|
+
card: cn(
|
|
236
|
+
// Base card styling with explicit classes
|
|
237
|
+
'relative bg-card backdrop-blur-sm',
|
|
238
|
+
'border-2 rounded-xl shadow-md hover:shadow-xl',
|
|
239
|
+
'transition-all duration-300 ease-out',
|
|
240
|
+
'hover:bg-muted/50',
|
|
241
|
+
// Node type specific border color
|
|
242
|
+
getNodeTypeStyles(type),
|
|
243
|
+
// Selected state
|
|
244
|
+
selected &&
|
|
245
|
+
'!ring-2 !ring-blue-500 !ring-offset-2 !ring-offset-background !shadow-2xl !scale-[1.02]',
|
|
246
|
+
),
|
|
247
|
+
header: cn(
|
|
248
|
+
'p-3 pb-2 border-b border-border/30 bg-gradient-to-b from-muted/10 to-transparent',
|
|
249
|
+
'rounded-t-xl',
|
|
250
|
+
),
|
|
251
|
+
iconContainer: cn(
|
|
252
|
+
'flex h-8 w-8 items-center justify-center rounded-lg',
|
|
253
|
+
'bg-gradient-to-br from-muted/40 to-muted/20 border border-border/20',
|
|
254
|
+
'shadow-sm',
|
|
255
|
+
),
|
|
256
|
+
icon: cn('transition-colors duration-200', `text-[${colors.DEFAULT}]`),
|
|
257
|
+
title: 'font-semibold text-sm text-foreground truncate leading-tight',
|
|
258
|
+
typeBadge: cn(
|
|
259
|
+
'text-xs px-2 py-0.5 rounded-full',
|
|
260
|
+
'bg-gradient-to-r from-muted/60 to-muted/40',
|
|
261
|
+
'text-muted-foreground border border-border/40',
|
|
262
|
+
'shadow-sm font-medium',
|
|
263
|
+
),
|
|
264
|
+
description: 'text-xs text-muted-foreground leading-relaxed py-1',
|
|
265
|
+
parametersSection: 'space-y-2',
|
|
266
|
+
parameterTitle: 'text-xs font-semibold text-foreground/90 mb-1.5 flex items-center gap-1',
|
|
267
|
+
parameterValue: cn(
|
|
268
|
+
'text-xs text-foreground/90 bg-muted/40 rounded-lg px-3 py-2',
|
|
269
|
+
'font-mono border border-border/30 shadow-sm',
|
|
270
|
+
'transition-colors duration-200 hover:bg-muted/60',
|
|
271
|
+
),
|
|
272
|
+
handleBase: '!w-3 !h-3 !border-2',
|
|
273
|
+
categoryColorName: colorName,
|
|
274
|
+
categoryDefaultColor: colors.DEFAULT,
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
|
|
278
|
+
// Get node color for minimap
|
|
279
|
+
export const getNodeMinimapColor = (nodeType: NodeType): string => {
|
|
280
|
+
const colorName = nodeTypeToColorName[nodeType] || 'slate';
|
|
281
|
+
const colors =
|
|
282
|
+
(langflowColors[colorName] as { light: string; DEFAULT: string; dark: string }) ||
|
|
283
|
+
langflowColors.slate;
|
|
284
|
+
return colors.DEFAULT;
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
// Status styling using concrete Tailwind classes
|
|
288
|
+
export const getNodeStatusStyles = (status: NodeStatus | undefined, _baseBorderColor: string) => {
|
|
289
|
+
switch (status) {
|
|
290
|
+
case 'running':
|
|
291
|
+
return cn('!border-4 !border-blue-600 !shadow-xl !shadow-blue-500/40 animate-pulse');
|
|
292
|
+
case 'success':
|
|
293
|
+
return cn(
|
|
294
|
+
'!border-4 !border-green-600 !shadow-xl !shadow-green-500/40',
|
|
295
|
+
'bg-gradient-to-br from-white to-green-50 dark:from-gray-900 dark:to-green-950',
|
|
296
|
+
);
|
|
297
|
+
case 'error':
|
|
298
|
+
return cn(
|
|
299
|
+
'!border-4 !border-red-600 !shadow-xl !shadow-red-500/40',
|
|
300
|
+
'bg-gradient-to-br from-white to-red-50 dark:from-gray-900 dark:to-red-950',
|
|
301
|
+
);
|
|
302
|
+
default:
|
|
303
|
+
return ''; // Use default border from component
|
|
304
|
+
}
|
|
305
|
+
};
|
|
306
|
+
|
|
307
|
+
// Truncate text with ellipsis
|
|
308
|
+
export const truncateText = (text: string, maxLength: number): string => {
|
|
309
|
+
if (text.length <= maxLength) {
|
|
310
|
+
return text;
|
|
311
|
+
}
|
|
312
|
+
return text.slice(0, maxLength) + '...';
|
|
313
|
+
};
|
|
314
|
+
|
|
315
|
+
// Parse node type from string - this seems fine, ensure it covers all your types
|
|
316
|
+
export const parseNodeType = (type: string): NodeType => {
|
|
317
|
+
const typeMap: Record<string, NodeType> = {
|
|
318
|
+
chatinput: 'ChatInput',
|
|
319
|
+
textinput: 'TextInput',
|
|
320
|
+
chatoutput: 'ChatOutput',
|
|
321
|
+
textoutput: 'TextOutput',
|
|
322
|
+
openaimodel: 'OpenAIModel',
|
|
323
|
+
anthropicmodel: 'AnthropicModel',
|
|
324
|
+
prompttemplate: 'PromptTemplate',
|
|
325
|
+
vectorstore: 'VectorStore',
|
|
326
|
+
documentloader: 'DocumentLoader',
|
|
327
|
+
textsplitter: 'TextSplitter',
|
|
328
|
+
// Add all type string variations from your actual node data if they differ from NodeType values
|
|
329
|
+
};
|
|
330
|
+
|
|
331
|
+
const normalizedType = type.toLowerCase().replace(/[^a-z0-9]/g, ''); // Allow numbers for e.g. gpt-3.5
|
|
332
|
+
if (typeMap[normalizedType]) {
|
|
333
|
+
return typeMap[normalizedType];
|
|
334
|
+
}
|
|
335
|
+
// Check if the original type string is a valid NodeType
|
|
336
|
+
const allNodeTypes = [
|
|
337
|
+
'ChatInput',
|
|
338
|
+
'TextInput',
|
|
339
|
+
'Input',
|
|
340
|
+
'ChatOutput',
|
|
341
|
+
'TextOutput',
|
|
342
|
+
'Output',
|
|
343
|
+
'OpenAIModel',
|
|
344
|
+
'AnthropicModel',
|
|
345
|
+
'LLM',
|
|
346
|
+
'Prompt',
|
|
347
|
+
'PromptTemplate',
|
|
348
|
+
'Agent',
|
|
349
|
+
'Memory',
|
|
350
|
+
'Tool',
|
|
351
|
+
'Chain',
|
|
352
|
+
'Retriever',
|
|
353
|
+
'Embedding',
|
|
354
|
+
'VectorStore',
|
|
355
|
+
'DocumentLoader',
|
|
356
|
+
'TextSplitter',
|
|
357
|
+
'Note',
|
|
358
|
+
'Unknown',
|
|
359
|
+
];
|
|
360
|
+
if (allNodeTypes.includes(type as NodeType)) {
|
|
361
|
+
return type as NodeType;
|
|
362
|
+
}
|
|
363
|
+
return 'Unknown';
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
// Helper to get specific color values for dynamic Tailwind classes if needed
|
|
367
|
+
// Tailwind JIT might not pick up dynamically constructed class names like border-[${color}]
|
|
368
|
+
// This is a fallback or for cases where direct hex/rgb is needed.
|
|
369
|
+
export const getRawNodeColors = (type: NodeType) => {
|
|
370
|
+
const colorName = nodeTypeToColorName[type] || 'slate';
|
|
371
|
+
return (
|
|
372
|
+
(langflowColors[colorName] as { light: string; DEFAULT: string; dark: string }) ||
|
|
373
|
+
langflowColors.slate
|
|
374
|
+
);
|
|
375
|
+
};
|
|
Binary file
|