Feature/DocumentStore (#2106)

* datasource: initial commit

* datasource: datasource details and chunks

* datasource: Document Store Node

* more changes

* Document Store - Base functionality

* Document Store Loader Component

* Document Store Loader Component

* before merging the modularity PR

* after merging the modularity PR

* preview mode

* initial draft PR

* fixes

* minor updates and  fixes

* preview with loader and splitter

* preview with credential

* show stored chunks

* preview update...

* edit config

* save, preview and other changes

* save, preview and other changes

* save, process and other changes

* save, process and other changes

* alpha1 - for internal testing

* rerouting urls

* bug fix on new leader create

* pagination support for chunks

* delete document store

* Update pnpm-lock.yaml

* doc store card view

* Update store files to use updated storage functions, Document Store Table View and other changes

* ui changes

* add expanded chunk dialog, improve ui

* change throw Error to InternalError

* Bug Fixes and removal of subFolder, adding of view chunks for store

* lint fixes

* merge changes

* DocumentStoreStatus component

* ui changes for doc store

* add remove metadata key field, add custom document loader

* add chatflows used doc store chips

* add types/interfaces to DocumentStore Services

* document loader list dialog title bar color change

* update interfaces

* Whereused Chatflow Name and Added chunkNo to retain order of created chunks.

* use typeorm order chunkNo, ui changes

---------

Co-authored-by: Henry <hzj94@hotmail.com>
Co-authored-by: Henry Heng <henryheng@flowiseai.com>
This commit is contained in:
Vinod Kiran
2024-05-06 19:53:27 +05:30
committed by GitHub
parent af4e28aa91
commit 40e36d1b39
91 changed files with 38713 additions and 32791 deletions
@@ -1,13 +1,26 @@
import PropTypes from 'prop-types'
// material-ui
import { Box, OutlinedInput, Toolbar, Typography } from '@mui/material'
import { IconButton, Box, OutlinedInput, Toolbar, Typography } from '@mui/material'
import { useTheme } from '@mui/material/styles'
import { StyledFab } from '@/ui-component/button/StyledFab'
// icons
import { IconSearch } from '@tabler/icons'
import { IconSearch, IconArrowLeft, IconEdit } from '@tabler/icons'
const ViewHeader = ({ children, filters = null, onSearchChange, search, searchPlaceholder = 'Search', title }) => {
const ViewHeader = ({
children,
filters = null,
onSearchChange,
search,
searchPlaceholder = 'Search',
title,
description,
isBackButton,
onBack,
isEditButton,
onEdit
}) => {
const theme = useTheme()
return (
@@ -21,15 +34,54 @@ const ViewHeader = ({ children, filters = null, onSearchChange, search, searchPl
width: '100%'
}}
>
<Typography
sx={{
fontSize: '2rem',
fontWeight: 600
}}
variant='h1'
>
{title}
</Typography>
<Box sx={{ display: 'flex', alignItems: 'center', flexDirection: 'row' }}>
{isBackButton && (
<StyledFab sx={{ mr: 3 }} size='small' color='secondary' aria-label='back' title='Back' onClick={onBack}>
<IconArrowLeft />
</StyledFab>
)}
<Box sx={{ display: 'flex', alignItems: 'start', flexDirection: 'column' }}>
<Typography
sx={{
fontSize: '2rem',
fontWeight: 600,
display: '-webkit-box',
WebkitLineClamp: 3,
WebkitBoxOrient: 'vertical',
textOverflow: 'ellipsis',
overflow: 'hidden',
flex: 1,
maxWidth: 'calc(100vh - 100px)'
}}
variant='h1'
>
{title}
</Typography>
{description && (
<Typography
sx={{
fontSize: '1rem',
fontWeight: 500,
mt: 2,
display: '-webkit-box',
WebkitLineClamp: 5,
WebkitBoxOrient: 'vertical',
textOverflow: 'ellipsis',
overflow: 'hidden',
flex: 1,
maxWidth: 'calc(100vh - 100px)'
}}
>
{description}
</Typography>
)}
</Box>
{isEditButton && (
<IconButton sx={{ ml: 3 }} color='secondary' title='Edit' onClick={onEdit}>
<IconEdit />
</IconButton>
)}
</Box>
<Box sx={{ height: 40, display: 'flex', alignItems: 'center', gap: 1 }}>
{search && (
<OutlinedInput
@@ -77,7 +129,12 @@ ViewHeader.propTypes = {
onSearchChange: PropTypes.func,
search: PropTypes.bool,
searchPlaceholder: PropTypes.string,
title: PropTypes.string
title: PropTypes.string,
description: PropTypes.string,
isBackButton: PropTypes.bool,
onBack: PropTypes.func,
isEditButton: PropTypes.bool,
onEdit: PropTypes.func
}
export default ViewHeader