@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,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { LucideIcon } from 'lucide-react';
|
|
3
|
+
export interface PageLayoutProps {
|
|
4
|
+
/** Page title shown in the header */
|
|
5
|
+
title: string;
|
|
6
|
+
/** Optional subtitle below the title */
|
|
7
|
+
subtitle?: string;
|
|
8
|
+
/** Optional Lucide icon component shown before the title */
|
|
9
|
+
icon?: LucideIcon;
|
|
10
|
+
/** Optional elements rendered on the right side of the header (buttons, links, etc.) */
|
|
11
|
+
actions?: ReactNode;
|
|
12
|
+
/** Page content */
|
|
13
|
+
children: ReactNode;
|
|
14
|
+
/** Max-width variant. Defaults to 'default' (max-w-6xl). */
|
|
15
|
+
maxWidth?: 'sm' | 'md' | 'default' | 'full';
|
|
16
|
+
}
|
|
17
|
+
export declare const PageLayout: import('react').ForwardRefExoticComponent<PageLayoutProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ChatInput — Input area for the chat panel with send/stop controls.
|
|
3
|
+
*
|
|
4
|
+
* Copilot-style layout: textarea on top, toolbar row below with
|
|
5
|
+
* model selector, provider selector, and send button.
|
|
6
|
+
*/
|
|
7
|
+
interface ChatInputProps {
|
|
8
|
+
isStreaming: boolean;
|
|
9
|
+
isLoadingHistory: boolean;
|
|
10
|
+
hasConfiguredCredential: boolean;
|
|
11
|
+
hasAvailableLlmCredentials: boolean;
|
|
12
|
+
onSend: (text: string) => void;
|
|
13
|
+
onStop: () => void;
|
|
14
|
+
onOpenSettings: () => void;
|
|
15
|
+
}
|
|
16
|
+
export declare function ChatInput({ isStreaming, isLoadingHistory, hasConfiguredCredential, hasAvailableLlmCredentials, onSend, onStop, onOpenSettings, }: ChatInputProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ChatMessage } from './chat.store';
|
|
2
|
+
interface ChatMessageListProps {
|
|
3
|
+
messages: ChatMessage[];
|
|
4
|
+
isStreaming: boolean;
|
|
5
|
+
isLoadingHistory: boolean;
|
|
6
|
+
streamingText: string;
|
|
7
|
+
error: string | null;
|
|
8
|
+
hasConfiguredCredential: boolean;
|
|
9
|
+
hasAvailableLlmCredentials: boolean;
|
|
10
|
+
onOpenSettings: () => void;
|
|
11
|
+
onSendMessage: (text: string) => void;
|
|
12
|
+
}
|
|
13
|
+
export declare function ChatMessageList({ messages, isStreaming, isLoadingHistory, streamingText, error, hasConfiguredCredential, hasAvailableLlmCredentials: _hasAvailableLlmCredentials, onOpenSettings: _onOpenSettings, onSendMessage, }: ChatMessageListProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ChatModelSelector — Combobox for selecting the LLM model in the chat input area.
|
|
3
|
+
*
|
|
4
|
+
* Shows models from the provider's API (server-filtered with debounced search),
|
|
5
|
+
* with a "Recent" section for recently used models tracked via localStorage.
|
|
6
|
+
*/
|
|
7
|
+
interface ChatModelSelectorProps {
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function ChatModelSelector({ className }: ChatModelSelectorProps): import("react/jsx-runtime").JSX.Element | null;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ChatPanel — Main chat assistant sidebar component.
|
|
3
|
+
*
|
|
4
|
+
* Slim composition shell that wires up hooks and composes
|
|
5
|
+
* ChatMessageList, ChatInput, and ChatSettingsPanel.
|
|
6
|
+
*/
|
|
7
|
+
interface ChatPanelProps {
|
|
8
|
+
flowId?: string;
|
|
9
|
+
selectedNodeId?: string;
|
|
10
|
+
selectedRunId?: string;
|
|
11
|
+
viewMode?: 'edit' | 'runs';
|
|
12
|
+
basePath?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function ChatPanel({ flowId, selectedNodeId, selectedRunId, viewMode, basePath, className, }: ChatPanelProps): import("react/jsx-runtime").JSX.Element | null;
|
|
16
|
+
export declare function ChatToggleButton({ className }: {
|
|
17
|
+
className?: string;
|
|
18
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ChatPromptOverlay — Centered empty-flow prompt.
|
|
3
|
+
*
|
|
4
|
+
* Appears in the center of the flow editor viewport when the flow
|
|
5
|
+
* has no nodes. Shows an "Add Node" button, an "or" separator,
|
|
6
|
+
* and a chat input encouraging users to describe what they need.
|
|
7
|
+
* On submit, opens the full ChatPanel and sends the prompt.
|
|
8
|
+
*/
|
|
9
|
+
interface ChatPromptOverlayProps {
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function ChatPromptOverlay({ className }: ChatPromptOverlayProps): import("react/jsx-runtime").JSX.Element | null;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ChatProviderSelector — Inline combobox for selecting the LLM credential/provider
|
|
3
|
+
* directly from the chat input toolbar.
|
|
4
|
+
*/
|
|
5
|
+
interface ChatProviderSelectorProps {
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function ChatProviderSelector({ className }: ChatProviderSelectorProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ChatSettingsPanel — Inline panel for configuring chat assistant settings.
|
|
3
|
+
*
|
|
4
|
+
* Renders within the ChatPanel as a slide-over view when the user clicks
|
|
5
|
+
* the settings gear icon. Settings are persisted to localStorage.
|
|
6
|
+
*/
|
|
7
|
+
interface ChatSettingsPanelProps {
|
|
8
|
+
onClose: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function ChatSettingsPanel({ onClose }: ChatSettingsPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* InlineCredentialSetup — Inline form for creating an LLM credential
|
|
3
|
+
* directly inside the chat panel (no modal, no navigation).
|
|
4
|
+
*
|
|
5
|
+
* If existing LLM credentials exist, shows a quick picker first.
|
|
6
|
+
* Otherwise shows: Provider (OpenAI/Anthropic/OpenRouter), Name, API Key.
|
|
7
|
+
* On submit: creates credential → validates via list-models → auto-selects.
|
|
8
|
+
*/
|
|
9
|
+
export declare function InlineCredentialSetup(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chat Memory — Browser-local persistence via localStorage.
|
|
3
|
+
*
|
|
4
|
+
* Stores notes in two scopes:
|
|
5
|
+
* - Flow-scoped: localStorage key = `invect:chat-memory:flow:<flowId>`
|
|
6
|
+
* - Workspace-scoped: localStorage key = `invect:chat-memory:workspace`
|
|
7
|
+
*
|
|
8
|
+
* Each key stores a JSON array of strings (the note contents).
|
|
9
|
+
* Maximum 50 notes per scope to prevent unbounded growth.
|
|
10
|
+
*/
|
|
11
|
+
export declare function getMemoryNotes(scope: 'flow' | 'workspace', flowId?: string): string[];
|
|
12
|
+
export declare function saveMemoryNote(scope: 'flow' | 'workspace', content: string, flowId?: string): void;
|
|
13
|
+
export declare function deleteMemoryNote(scope: 'flow' | 'workspace', content: string, flowId?: string): void;
|
|
14
|
+
/**
|
|
15
|
+
* Get all memory notes for a flow (flow-scoped + workspace-scoped).
|
|
16
|
+
* Returns the shape expected by ChatContext.memoryNotes.
|
|
17
|
+
*/
|
|
18
|
+
export declare function getAllMemoryNotes(flowId?: string): {
|
|
19
|
+
flowNotes: string[];
|
|
20
|
+
workspaceNotes: string[];
|
|
21
|
+
};
|
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Chat Store (Zustand)
|
|
3
|
+
*
|
|
4
|
+
* Manages the chat assistant UI state: messages, streaming status,
|
|
5
|
+
* panel visibility, and the SSE connection lifecycle.
|
|
6
|
+
*
|
|
7
|
+
* Messages are scoped per flow — each flow has its own conversation.
|
|
8
|
+
* The store auto-loads messages from the backend when switching flows
|
|
9
|
+
* and saves them when the conversation changes.
|
|
10
|
+
*/
|
|
11
|
+
export interface ChatMessage {
|
|
12
|
+
id: string;
|
|
13
|
+
role: 'user' | 'assistant' | 'system' | 'tool';
|
|
14
|
+
content: string;
|
|
15
|
+
toolCalls?: Array<{
|
|
16
|
+
id: string;
|
|
17
|
+
name: string;
|
|
18
|
+
input: Record<string, unknown>;
|
|
19
|
+
}>;
|
|
20
|
+
toolCallId?: string;
|
|
21
|
+
/** Metadata for rendering tool call/result UI */
|
|
22
|
+
toolMeta?: {
|
|
23
|
+
toolName: string;
|
|
24
|
+
args?: Record<string, unknown>;
|
|
25
|
+
result?: {
|
|
26
|
+
success: boolean;
|
|
27
|
+
data?: unknown;
|
|
28
|
+
error?: string;
|
|
29
|
+
};
|
|
30
|
+
status: 'pending' | 'done' | 'error';
|
|
31
|
+
startedAt?: number;
|
|
32
|
+
durationMs?: number;
|
|
33
|
+
};
|
|
34
|
+
createdAt: number;
|
|
35
|
+
}
|
|
36
|
+
export interface ChatStreamEvent {
|
|
37
|
+
type: 'text_delta' | 'tool_call_start' | 'tool_call_result' | 'ui_action' | 'suggestions' | 'error' | 'done';
|
|
38
|
+
text?: string;
|
|
39
|
+
toolName?: string;
|
|
40
|
+
toolCallId?: string;
|
|
41
|
+
args?: Record<string, unknown>;
|
|
42
|
+
result?: {
|
|
43
|
+
success: boolean;
|
|
44
|
+
data?: unknown;
|
|
45
|
+
error?: string;
|
|
46
|
+
};
|
|
47
|
+
action?: string;
|
|
48
|
+
data?: Record<string, unknown>;
|
|
49
|
+
message?: string;
|
|
50
|
+
recoverable?: boolean;
|
|
51
|
+
usage?: {
|
|
52
|
+
promptTokens?: number;
|
|
53
|
+
completionTokens?: number;
|
|
54
|
+
totalTokens?: number;
|
|
55
|
+
};
|
|
56
|
+
suggestions?: Array<{
|
|
57
|
+
label: string;
|
|
58
|
+
prompt: string;
|
|
59
|
+
}>;
|
|
60
|
+
}
|
|
61
|
+
export interface PlanStep {
|
|
62
|
+
index: number;
|
|
63
|
+
title: string;
|
|
64
|
+
status: 'pending' | 'in_progress' | 'done' | 'skipped';
|
|
65
|
+
}
|
|
66
|
+
export interface ChatPlan {
|
|
67
|
+
summary: string;
|
|
68
|
+
steps: PlanStep[];
|
|
69
|
+
}
|
|
70
|
+
export interface ChatSettings {
|
|
71
|
+
/** Max tool-calling steps per message (1-200, default 50) */
|
|
72
|
+
maxSteps: number;
|
|
73
|
+
/** Selected credential ID for the chat assistant LLM provider */
|
|
74
|
+
credentialId: string | null;
|
|
75
|
+
/** Selected model ID override (null = provider default) */
|
|
76
|
+
model: string | null;
|
|
77
|
+
/** Recently used model IDs */
|
|
78
|
+
recentModels: string[];
|
|
79
|
+
}
|
|
80
|
+
interface ChatState {
|
|
81
|
+
/** Whether the chat panel is open */
|
|
82
|
+
isOpen: boolean;
|
|
83
|
+
/** The flow ID the current messages belong to (null = no flow) */
|
|
84
|
+
activeFlowId: string | null;
|
|
85
|
+
/** All messages in the current conversation (for the active flow) */
|
|
86
|
+
messages: ChatMessage[];
|
|
87
|
+
/** Whether we're loading messages from the backend */
|
|
88
|
+
isLoadingHistory: boolean;
|
|
89
|
+
/** Whether the assistant is currently streaming a response */
|
|
90
|
+
isStreaming: boolean;
|
|
91
|
+
/** Active AbortController for cancelling the stream */
|
|
92
|
+
abortController: AbortController | null;
|
|
93
|
+
/** Accumulated text for the current streaming assistant message */
|
|
94
|
+
streamingText: string;
|
|
95
|
+
/** Error message to display */
|
|
96
|
+
error: string | null;
|
|
97
|
+
/** Prompt queued from the overlay — ChatPanel consumes and clears it */
|
|
98
|
+
pendingPrompt: string | null;
|
|
99
|
+
/** Whether messages have been modified since last save */
|
|
100
|
+
_dirty: boolean;
|
|
101
|
+
/** Whether the settings panel is open */
|
|
102
|
+
isSettingsPanelOpen: boolean;
|
|
103
|
+
/** Chat settings (persisted to localStorage) */
|
|
104
|
+
settings: ChatSettings;
|
|
105
|
+
/** Current plan from the assistant (set via show_plan / update_plan uiActions) */
|
|
106
|
+
currentPlan: ChatPlan | null;
|
|
107
|
+
/** Suggested follow-up actions from the assistant */
|
|
108
|
+
suggestions: Array<{
|
|
109
|
+
label: string;
|
|
110
|
+
prompt: string;
|
|
111
|
+
}>;
|
|
112
|
+
}
|
|
113
|
+
interface ChatActions {
|
|
114
|
+
togglePanel: () => void;
|
|
115
|
+
setOpen: (open: boolean) => void;
|
|
116
|
+
/** Switch to a different flow's conversation. Clears current messages in-memory. */
|
|
117
|
+
setActiveFlow: (flowId: string | null) => void;
|
|
118
|
+
/** Load messages from the backend into the store */
|
|
119
|
+
loadMessages: (messages: ChatMessage[]) => void;
|
|
120
|
+
setLoadingHistory: (loading: boolean) => void;
|
|
121
|
+
addUserMessage: (content: string) => string;
|
|
122
|
+
startStreaming: (controller: AbortController) => void;
|
|
123
|
+
appendStreamingText: (text: string) => void;
|
|
124
|
+
addToolCallMessage: (toolName: string, toolCallId: string, args: Record<string, unknown>) => void;
|
|
125
|
+
updateToolCallResult: (toolCallId: string, result: {
|
|
126
|
+
success: boolean;
|
|
127
|
+
data?: unknown;
|
|
128
|
+
error?: string;
|
|
129
|
+
}) => void;
|
|
130
|
+
finalizeAssistantMessage: () => void;
|
|
131
|
+
stopStreaming: () => void;
|
|
132
|
+
setError: (error: string | null) => void;
|
|
133
|
+
clearMessages: () => void;
|
|
134
|
+
/** Mark any pending tool calls as errored (stream ended before result arrived) */
|
|
135
|
+
finalizePendingToolCalls: () => void;
|
|
136
|
+
/** Queue a prompt from the overlay — opens the panel automatically */
|
|
137
|
+
setPendingPrompt: (prompt: string) => void;
|
|
138
|
+
/** Consume (clear) the pending prompt — called by ChatPanel after sending */
|
|
139
|
+
consumePendingPrompt: () => string | null;
|
|
140
|
+
/** Mark messages as synced (not dirty) */
|
|
141
|
+
markClean: () => void;
|
|
142
|
+
/** Check if messages need saving */
|
|
143
|
+
isDirty: () => boolean;
|
|
144
|
+
/** Get messages suitable for backend persistence */
|
|
145
|
+
getSerializableMessages: () => Array<{
|
|
146
|
+
role: ChatMessage['role'];
|
|
147
|
+
content: string;
|
|
148
|
+
toolMeta?: Record<string, unknown> | null;
|
|
149
|
+
}>;
|
|
150
|
+
/** Toggle the settings panel open/closed */
|
|
151
|
+
toggleSettingsPanel: () => void;
|
|
152
|
+
/** Update chat settings (merges with existing) */
|
|
153
|
+
updateSettings: (patch: Partial<ChatSettings>) => void;
|
|
154
|
+
/** Truncate messages from a given message ID onwards (for edit+resend) */
|
|
155
|
+
truncateFrom: (messageId: string) => void;
|
|
156
|
+
/** Set or update the current plan */
|
|
157
|
+
setPlan: (plan: ChatPlan) => void;
|
|
158
|
+
/** Set follow-up suggestions (cleared on next user message) */
|
|
159
|
+
setSuggestions: (suggestions: Array<{
|
|
160
|
+
label: string;
|
|
161
|
+
prompt: string;
|
|
162
|
+
}>) => void;
|
|
163
|
+
}
|
|
164
|
+
type ChatStore = ChatState & ChatActions;
|
|
165
|
+
export declare const useChatStore: import('zustand').UseBoundStore<Omit<Omit<import('zustand').StoreApi<ChatStore>, "setState" | "devtools"> & {
|
|
166
|
+
setState(partial: ChatStore | Partial<ChatStore> | ((state: ChatStore) => ChatStore | Partial<ChatStore>), replace?: false | undefined, action?: (string | {
|
|
167
|
+
[x: string]: unknown;
|
|
168
|
+
[x: number]: unknown;
|
|
169
|
+
[x: symbol]: unknown;
|
|
170
|
+
type: string;
|
|
171
|
+
}) | undefined): void;
|
|
172
|
+
setState(state: ChatStore | ((state: ChatStore) => ChatStore), replace: true, action?: (string | {
|
|
173
|
+
[x: string]: unknown;
|
|
174
|
+
[x: number]: unknown;
|
|
175
|
+
[x: symbol]: unknown;
|
|
176
|
+
type: string;
|
|
177
|
+
}) | undefined): void;
|
|
178
|
+
devtools: {
|
|
179
|
+
cleanup: () => void;
|
|
180
|
+
};
|
|
181
|
+
}, "setState"> & {
|
|
182
|
+
setState(nextStateOrUpdater: ChatStore | Partial<ChatStore> | ((state: {
|
|
183
|
+
isOpen: boolean;
|
|
184
|
+
activeFlowId: string | null;
|
|
185
|
+
messages: {
|
|
186
|
+
id: string;
|
|
187
|
+
role: "user" | "assistant" | "system" | "tool";
|
|
188
|
+
content: string;
|
|
189
|
+
toolCalls?: {
|
|
190
|
+
id: string;
|
|
191
|
+
name: string;
|
|
192
|
+
input: {
|
|
193
|
+
[x: string]: unknown;
|
|
194
|
+
};
|
|
195
|
+
}[] | undefined;
|
|
196
|
+
toolCallId?: string | undefined;
|
|
197
|
+
toolMeta?: {
|
|
198
|
+
toolName: string;
|
|
199
|
+
args?: {
|
|
200
|
+
[x: string]: unknown;
|
|
201
|
+
} | undefined;
|
|
202
|
+
result?: {
|
|
203
|
+
success: boolean;
|
|
204
|
+
data?: unknown;
|
|
205
|
+
error?: string | undefined;
|
|
206
|
+
} | undefined;
|
|
207
|
+
status: "pending" | "done" | "error";
|
|
208
|
+
startedAt?: number | undefined;
|
|
209
|
+
durationMs?: number | undefined;
|
|
210
|
+
} | undefined;
|
|
211
|
+
createdAt: number;
|
|
212
|
+
}[];
|
|
213
|
+
isLoadingHistory: boolean;
|
|
214
|
+
isStreaming: boolean;
|
|
215
|
+
abortController: {
|
|
216
|
+
signal: {
|
|
217
|
+
aborted: boolean;
|
|
218
|
+
onabort: ((this: AbortSignal, ev: Event) => any) | null;
|
|
219
|
+
reason: any;
|
|
220
|
+
throwIfAborted: () => void;
|
|
221
|
+
addEventListener: {
|
|
222
|
+
<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
223
|
+
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
224
|
+
};
|
|
225
|
+
removeEventListener: {
|
|
226
|
+
<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
227
|
+
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
228
|
+
};
|
|
229
|
+
dispatchEvent: (event: Event) => boolean;
|
|
230
|
+
};
|
|
231
|
+
abort: (reason?: any) => void;
|
|
232
|
+
} | null;
|
|
233
|
+
streamingText: string;
|
|
234
|
+
error: string | null;
|
|
235
|
+
pendingPrompt: string | null;
|
|
236
|
+
_dirty: boolean;
|
|
237
|
+
isSettingsPanelOpen: boolean;
|
|
238
|
+
settings: {
|
|
239
|
+
maxSteps: number;
|
|
240
|
+
credentialId: string | null;
|
|
241
|
+
model: string | null;
|
|
242
|
+
recentModels: string[];
|
|
243
|
+
};
|
|
244
|
+
currentPlan: {
|
|
245
|
+
summary: string;
|
|
246
|
+
steps: {
|
|
247
|
+
index: number;
|
|
248
|
+
title: string;
|
|
249
|
+
status: "pending" | "in_progress" | "done" | "skipped";
|
|
250
|
+
}[];
|
|
251
|
+
} | null;
|
|
252
|
+
suggestions: {
|
|
253
|
+
label: string;
|
|
254
|
+
prompt: string;
|
|
255
|
+
}[];
|
|
256
|
+
togglePanel: () => void;
|
|
257
|
+
setOpen: (open: boolean) => void;
|
|
258
|
+
setActiveFlow: (flowId: string | null) => void;
|
|
259
|
+
loadMessages: (messages: ChatMessage[]) => void;
|
|
260
|
+
setLoadingHistory: (loading: boolean) => void;
|
|
261
|
+
addUserMessage: (content: string) => string;
|
|
262
|
+
startStreaming: (controller: AbortController) => void;
|
|
263
|
+
appendStreamingText: (text: string) => void;
|
|
264
|
+
addToolCallMessage: (toolName: string, toolCallId: string, args: Record<string, unknown>) => void;
|
|
265
|
+
updateToolCallResult: (toolCallId: string, result: {
|
|
266
|
+
success: boolean;
|
|
267
|
+
data?: unknown;
|
|
268
|
+
error?: string;
|
|
269
|
+
}) => void;
|
|
270
|
+
finalizeAssistantMessage: () => void;
|
|
271
|
+
stopStreaming: () => void;
|
|
272
|
+
setError: (error: string | null) => void;
|
|
273
|
+
clearMessages: () => void;
|
|
274
|
+
finalizePendingToolCalls: () => void;
|
|
275
|
+
setPendingPrompt: (prompt: string) => void;
|
|
276
|
+
consumePendingPrompt: () => string | null;
|
|
277
|
+
markClean: () => void;
|
|
278
|
+
isDirty: () => boolean;
|
|
279
|
+
getSerializableMessages: () => Array<{
|
|
280
|
+
role: ChatMessage["role"];
|
|
281
|
+
content: string;
|
|
282
|
+
toolMeta?: Record<string, unknown> | null;
|
|
283
|
+
}>;
|
|
284
|
+
toggleSettingsPanel: () => void;
|
|
285
|
+
updateSettings: (patch: Partial<ChatSettings>) => void;
|
|
286
|
+
truncateFrom: (messageId: string) => void;
|
|
287
|
+
setPlan: (plan: ChatPlan) => void;
|
|
288
|
+
setSuggestions: (suggestions: Array<{
|
|
289
|
+
label: string;
|
|
290
|
+
prompt: string;
|
|
291
|
+
}>) => void;
|
|
292
|
+
}) => void), shouldReplace?: false, action?: (string | {
|
|
293
|
+
[x: string]: unknown;
|
|
294
|
+
[x: number]: unknown;
|
|
295
|
+
[x: symbol]: unknown;
|
|
296
|
+
type: string;
|
|
297
|
+
}) | undefined): void;
|
|
298
|
+
setState(nextStateOrUpdater: ChatStore | ((state: {
|
|
299
|
+
isOpen: boolean;
|
|
300
|
+
activeFlowId: string | null;
|
|
301
|
+
messages: {
|
|
302
|
+
id: string;
|
|
303
|
+
role: "user" | "assistant" | "system" | "tool";
|
|
304
|
+
content: string;
|
|
305
|
+
toolCalls?: {
|
|
306
|
+
id: string;
|
|
307
|
+
name: string;
|
|
308
|
+
input: {
|
|
309
|
+
[x: string]: unknown;
|
|
310
|
+
};
|
|
311
|
+
}[] | undefined;
|
|
312
|
+
toolCallId?: string | undefined;
|
|
313
|
+
toolMeta?: {
|
|
314
|
+
toolName: string;
|
|
315
|
+
args?: {
|
|
316
|
+
[x: string]: unknown;
|
|
317
|
+
} | undefined;
|
|
318
|
+
result?: {
|
|
319
|
+
success: boolean;
|
|
320
|
+
data?: unknown;
|
|
321
|
+
error?: string | undefined;
|
|
322
|
+
} | undefined;
|
|
323
|
+
status: "pending" | "done" | "error";
|
|
324
|
+
startedAt?: number | undefined;
|
|
325
|
+
durationMs?: number | undefined;
|
|
326
|
+
} | undefined;
|
|
327
|
+
createdAt: number;
|
|
328
|
+
}[];
|
|
329
|
+
isLoadingHistory: boolean;
|
|
330
|
+
isStreaming: boolean;
|
|
331
|
+
abortController: {
|
|
332
|
+
signal: {
|
|
333
|
+
aborted: boolean;
|
|
334
|
+
onabort: ((this: AbortSignal, ev: Event) => any) | null;
|
|
335
|
+
reason: any;
|
|
336
|
+
throwIfAborted: () => void;
|
|
337
|
+
addEventListener: {
|
|
338
|
+
<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
|
|
339
|
+
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
|
|
340
|
+
};
|
|
341
|
+
removeEventListener: {
|
|
342
|
+
<K extends keyof AbortSignalEventMap>(type: K, listener: (this: AbortSignal, ev: AbortSignalEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
|
|
343
|
+
(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
|
|
344
|
+
};
|
|
345
|
+
dispatchEvent: (event: Event) => boolean;
|
|
346
|
+
};
|
|
347
|
+
abort: (reason?: any) => void;
|
|
348
|
+
} | null;
|
|
349
|
+
streamingText: string;
|
|
350
|
+
error: string | null;
|
|
351
|
+
pendingPrompt: string | null;
|
|
352
|
+
_dirty: boolean;
|
|
353
|
+
isSettingsPanelOpen: boolean;
|
|
354
|
+
settings: {
|
|
355
|
+
maxSteps: number;
|
|
356
|
+
credentialId: string | null;
|
|
357
|
+
model: string | null;
|
|
358
|
+
recentModels: string[];
|
|
359
|
+
};
|
|
360
|
+
currentPlan: {
|
|
361
|
+
summary: string;
|
|
362
|
+
steps: {
|
|
363
|
+
index: number;
|
|
364
|
+
title: string;
|
|
365
|
+
status: "pending" | "in_progress" | "done" | "skipped";
|
|
366
|
+
}[];
|
|
367
|
+
} | null;
|
|
368
|
+
suggestions: {
|
|
369
|
+
label: string;
|
|
370
|
+
prompt: string;
|
|
371
|
+
}[];
|
|
372
|
+
togglePanel: () => void;
|
|
373
|
+
setOpen: (open: boolean) => void;
|
|
374
|
+
setActiveFlow: (flowId: string | null) => void;
|
|
375
|
+
loadMessages: (messages: ChatMessage[]) => void;
|
|
376
|
+
setLoadingHistory: (loading: boolean) => void;
|
|
377
|
+
addUserMessage: (content: string) => string;
|
|
378
|
+
startStreaming: (controller: AbortController) => void;
|
|
379
|
+
appendStreamingText: (text: string) => void;
|
|
380
|
+
addToolCallMessage: (toolName: string, toolCallId: string, args: Record<string, unknown>) => void;
|
|
381
|
+
updateToolCallResult: (toolCallId: string, result: {
|
|
382
|
+
success: boolean;
|
|
383
|
+
data?: unknown;
|
|
384
|
+
error?: string;
|
|
385
|
+
}) => void;
|
|
386
|
+
finalizeAssistantMessage: () => void;
|
|
387
|
+
stopStreaming: () => void;
|
|
388
|
+
setError: (error: string | null) => void;
|
|
389
|
+
clearMessages: () => void;
|
|
390
|
+
finalizePendingToolCalls: () => void;
|
|
391
|
+
setPendingPrompt: (prompt: string) => void;
|
|
392
|
+
consumePendingPrompt: () => string | null;
|
|
393
|
+
markClean: () => void;
|
|
394
|
+
isDirty: () => boolean;
|
|
395
|
+
getSerializableMessages: () => Array<{
|
|
396
|
+
role: ChatMessage["role"];
|
|
397
|
+
content: string;
|
|
398
|
+
toolMeta?: Record<string, unknown> | null;
|
|
399
|
+
}>;
|
|
400
|
+
toggleSettingsPanel: () => void;
|
|
401
|
+
updateSettings: (patch: Partial<ChatSettings>) => void;
|
|
402
|
+
truncateFrom: (messageId: string) => void;
|
|
403
|
+
setPlan: (plan: ChatPlan) => void;
|
|
404
|
+
setSuggestions: (suggestions: Array<{
|
|
405
|
+
label: string;
|
|
406
|
+
prompt: string;
|
|
407
|
+
}>) => void;
|
|
408
|
+
}) => void), shouldReplace: true, action?: (string | {
|
|
409
|
+
[x: string]: unknown;
|
|
410
|
+
[x: number]: unknown;
|
|
411
|
+
[x: symbol]: unknown;
|
|
412
|
+
type: string;
|
|
413
|
+
}) | undefined): void;
|
|
414
|
+
}>;
|
|
415
|
+
export declare const useChatOpen: () => boolean;
|
|
416
|
+
export {};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ChatMessage } from './chat.store';
|
|
2
|
+
interface UseChatOptions {
|
|
3
|
+
flowId?: string;
|
|
4
|
+
selectedNodeId?: string;
|
|
5
|
+
selectedRunId?: string;
|
|
6
|
+
viewMode?: 'edit' | 'runs';
|
|
7
|
+
basePath?: string;
|
|
8
|
+
}
|
|
9
|
+
export declare function useChat(options?: UseChatOptions): {
|
|
10
|
+
sendMessage: (content: string, opts?: {
|
|
11
|
+
isEdit?: boolean;
|
|
12
|
+
}) => Promise<void>;
|
|
13
|
+
stopStreaming: () => void;
|
|
14
|
+
clearMessages: () => Promise<void>;
|
|
15
|
+
messages: ChatMessage[];
|
|
16
|
+
isStreaming: boolean;
|
|
17
|
+
isLoadingHistory: boolean;
|
|
18
|
+
streamingText: string;
|
|
19
|
+
error: string | null;
|
|
20
|
+
isOpen: boolean;
|
|
21
|
+
togglePanel: () => void;
|
|
22
|
+
setOpen: (open: boolean) => void;
|
|
23
|
+
settings: import('./chat.store').ChatSettings;
|
|
24
|
+
isSettingsPanelOpen: boolean;
|
|
25
|
+
toggleSettingsPanel: () => void;
|
|
26
|
+
updateSettings: (patch: Partial<import('./chat.store').ChatSettings>) => void;
|
|
27
|
+
};
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CreateCredentialInput, CredentialType } from '../../api/types';
|
|
3
|
+
interface CreateCredentialModalProps {
|
|
4
|
+
open: boolean;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
onSubmit: (data: CreateCredentialInput) => void;
|
|
7
|
+
isLoading?: boolean;
|
|
8
|
+
portalContainer?: HTMLElement | null;
|
|
9
|
+
/** Pre-select a credential type when the modal opens (e.g. 'llm') */
|
|
10
|
+
initialType?: CredentialType;
|
|
11
|
+
}
|
|
12
|
+
export declare const CreateCredentialModal: React.FC<CreateCredentialModalProps>;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Credential, UpdateCredentialInput } from '../../api/types';
|
|
2
|
+
interface CredentialDetailDialogProps {
|
|
3
|
+
credential: Credential | null;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
onDelete: (credential: Credential) => void;
|
|
6
|
+
onTest: (id: string) => void;
|
|
7
|
+
testingId: string | null;
|
|
8
|
+
testResult: {
|
|
9
|
+
success: boolean;
|
|
10
|
+
error?: string;
|
|
11
|
+
} | null;
|
|
12
|
+
onUpdate: (id: string, data: UpdateCredentialInput) => void;
|
|
13
|
+
isUpdating: boolean;
|
|
14
|
+
portalContainer: HTMLElement | null;
|
|
15
|
+
}
|
|
16
|
+
export declare function CredentialDetailDialog({ credential, onClose, onDelete, onTest, testingId, testResult, onUpdate, isUpdating, portalContainer, }: CredentialDetailDialogProps): import("react/jsx-runtime").JSX.Element | null;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Credential, UpdateCredentialInput } from '../../api/types';
|
|
3
|
+
interface EditCredentialModalProps {
|
|
4
|
+
credential: Credential;
|
|
5
|
+
open: boolean;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
onSubmit: (data: UpdateCredentialInput) => void;
|
|
8
|
+
isLoading?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare const EditCredentialModal: React.FC<EditCredentialModalProps>;
|
|
11
|
+
export {};
|