Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
0d94db43
authored
Sep 20, 2023
by
Archer
Committed by
GitHub
Sep 20, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: ts and default dataset (#329)
parent
177482b3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
15 deletions
+21
-15
client/src/pages/app/detail/components/AdEdit/components/Nodes/NodeKbSearch.tsx
+9
-6
client/src/pages/app/detail/components/BasicEdit/index.tsx
+12
-9
No files found.
client/src/pages/app/detail/components/AdEdit/components/Nodes/NodeKbSearch.tsx
View file @
0d94db43
...
...
@@ -21,7 +21,7 @@ const KBSelect = ({
onChange
:
(
e
:
SelectedKbType
)
=>
void
;
})
=>
{
const
theme
=
useTheme
();
const
{
d
atasets
,
loadAllDatasets
}
=
useDatasetStore
();
const
{
allD
atasets
,
loadAllDatasets
}
=
useDatasetStore
();
const
{
isOpen
:
isOpenKbSelect
,
onOpen
:
onOpenKbSelect
,
...
...
@@ -29,8 +29,8 @@ const KBSelect = ({
}
=
useDisclosure
();
const
showKbList
=
useMemo
(
()
=>
d
atasets
.
filter
((
item
)
=>
activeKbs
.
find
((
kb
)
=>
kb
.
kbId
===
item
.
_id
)),
[
d
atasets
,
activeKbs
]
()
=>
allD
atasets
.
filter
((
item
)
=>
activeKbs
.
find
((
kb
)
=>
kb
.
kbId
===
item
.
_id
)),
[
allD
atasets
,
activeKbs
]
);
useQuery
([
'loadAllDatasets'
],
loadAllDatasets
);
...
...
@@ -57,9 +57,12 @@ const KBSelect = ({
</
Flex
>
))
}
</
Grid
>
{
isOpenKbSelect
&&
(
<
KBSelectModal
activeKbs=
{
activeKbs
}
onChange=
{
onChange
}
onClose=
{
onCloseKbSelect
}
/>
)
}
<
KBSelectModal
isOpen=
{
isOpenKbSelect
}
activeKbs=
{
activeKbs
}
onChange=
{
onChange
}
onClose=
{
onCloseKbSelect
}
/>
</>
);
};
...
...
client/src/pages/app/detail/components/BasicEdit/index.tsx
View file @
0d94db43
...
...
@@ -564,15 +564,18 @@ const Settings = ({ appId }: { appId: string }) => {
defaultData=
{
getValues
(
'chatModel'
)
}
/>
)
}
<
KBSelectModal
isOpen=
{
isOpenKbSelect
}
activeKbs=
{
selectedKbList
.
map
((
item
)
=>
({
kbId
:
item
.
_id
,
vectorModel
:
item
.
vectorModel
}))
}
onClose=
{
onCloseKbSelect
}
onChange=
{
replaceKbList
}
/>
{
isOpenKbSelect
&&
(
<
KBSelectModal
isOpen=
{
isOpenKbSelect
}
activeKbs=
{
selectedKbList
.
map
((
item
)
=>
({
kbId
:
item
.
_id
,
vectorModel
:
item
.
vectorModel
}))
}
onClose=
{
onCloseKbSelect
}
onChange=
{
replaceKbList
}
/>
)
}
{
isOpenKbParams
&&
(
<
KbParamsModal
searchEmptyText=
{
getValues
(
'kb.searchEmptyText'
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment