diff --git a/web_new/ant-components/chat/input/Resource.tsx b/web_new/ant-components/chat/input/Resource.tsx index fc7e5c764..b133cf345 100644 --- a/web_new/ant-components/chat/input/Resource.tsx +++ b/web_new/ant-components/chat/input/Resource.tsx @@ -75,7 +75,7 @@ const Resource: React.FC<{ {db.param} ), - value: db.space_id || db.param, + value: db.param, }; }), [dbs], diff --git a/web_new/components/knowledge/doc-panel.tsx b/web_new/components/knowledge/doc-panel.tsx index 557cf71cc..b472a0484 100644 --- a/web_new/components/knowledge/doc-panel.tsx +++ b/web_new/components/knowledge/doc-panel.tsx @@ -233,7 +233,7 @@ export default function DocPanel(props: IProps) { const { run: search, loading: searchLoading } = useRequest( async (id, doc_name: string) => { - const [, res] = await apiInterceptors(searchDocumentList(id, { doc_name })); + const [, res] = await apiInterceptors(searchDocumentList(space.name, { doc_name })); return res; }, { @@ -249,7 +249,7 @@ export default function DocPanel(props: IProps) { const { run: editChunkRun, loading: chunkLoading } = useRequest( async (values: any) => { return await editChunk(props.space.name, { - questions: values.questions.map((item: any) => item.question), + questions: values.questions?.map((item: any) => item.question), doc_id: curDoc?.id || '', doc_name: values.doc_name, }); diff --git a/web_new/pages/chat/index.tsx b/web_new/pages/chat/index.tsx index 60e589230..e4a716cca 100644 --- a/web_new/pages/chat/index.tsx +++ b/web_new/pages/chat/index.tsx @@ -250,21 +250,27 @@ const Chat: React.FC = () => { setHistory([]); } }, [isChatDefault]); - - // if (scene === 'chat_dashboard') { - // return ( - //
- // - // {isContract ? : } - //
- // ); - // } + + const contentRender = () => { + if (scene === 'chat_dashboard') { + return (isContract ? + : + ); + } else { + return (isChatDefault ? ( + + + + ) : ( + + + + + + + )); + } + } return ( { order={order} /> - {scene === 'chat_dashboard' ? (isContract ? : ) : null} - {scene !== 'chat_dashboard' ? (isChatDefault ? ( - - - - ) : ( - - - - - - - )) : null} + {contentRender()}