Files
j-sanaa 02813aa703 Feat/agentflow Add support for create credential (#6048)
* Initial flow

* Fix styling to look the same as v2

* Add new atoms - SwitxhInput, Dropdown and ToolTipWithParser similar to v2

* Add test cases for all changes

* Refactor input default value handling and consolidate utility functions

* Allow imports from utils for atoms

* Fix gemini comments

* Fixed buold issues

* FIx styling and create credentiall behavior

* Add support for edit credentials

* Fix bug to display tool and vector embeddign parameters

* Add CredentialTypeSelector for HTTP node

* Fix to add falback icon in case of error

* Move inputDefaults under core/primitives

* Added fix to check if all mandatory fields have value before submittign a credential

* Fix new credential not being selected on creating

* Fixes made to address comments

* Gemini comment fix

* Fix test error by adding theme

* Refactor getDefaultValueForType to remove null/undefined handling

* Fixed getDefaultValueForType to be generic

* Fixed getDefaultValueForType to take single destructured object parameter
2026-03-25 15:00:22 -07:00

65 lines
2.2 KiB
TypeScript

import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
import dts from 'vite-plugin-dts'
import { resolve } from 'path'
export default defineConfig(({ mode }) => {
const isDev = mode === 'development'
return {
plugins: [
react(),
dts({
insertTypesEntry: true,
include: ['src/**/*'],
exclude: ['src/**/*.test.ts', 'src/**/*.test.tsx', 'src/**/__*__/**']
})
],
resolve: {
alias: {
'@': resolve(__dirname, 'src')
}
},
build: {
lib: {
entry: resolve(__dirname, 'src/index.ts'),
name: 'FlowiseAgentflow',
formats: ['es', 'umd'],
fileName: (format) => `index.${format === 'es' ? 'js' : 'umd.js'}`
},
rollupOptions: {
external: [
'react',
'react-dom',
'react/jsx-runtime',
'@mui/material',
'@mui/material/styles',
'@mui/icons-material',
'@emotion/react',
'@emotion/styled',
'reactflow'
],
output: {
globals: {
react: 'React',
'react-dom': 'ReactDOM',
'react/jsx-runtime': 'jsxRuntime',
'@mui/material': 'MaterialUI',
'@mui/material/styles': 'MaterialUIStyles',
'@mui/icons-material': 'MaterialUIIcons',
'@emotion/react': 'emotionReact',
'@emotion/styled': 'emotionStyled',
reactflow: 'ReactFlow'
},
assetFileNames: (assetInfo) => {
if (assetInfo.name === 'style.css') return 'flowise.css'
return assetInfo.name || 'asset'
}
}
},
cssCodeSplit: false,
sourcemap: isDev ? true : false
}
}
})