diff --git a/src/components/Common/Playground/IodRelevant.tsx b/src/components/Common/Playground/IodRelevant.tsx index 78c018a..237ab36 100644 --- a/src/components/Common/Playground/IodRelevant.tsx +++ b/src/components/Common/Playground/IodRelevant.tsx @@ -228,15 +228,21 @@ export const PlaygroundIodRelevant: React.FC = ({ className }) => { return iodSearch && messages.length > 0 && !iodLoading }, [iodSearch, messages, iodLoading]) + + const data = useMemo(() => { const currentMessage = messages?.find( (message) => message.id === currentMessageId ) + + const text = (iodSearch && iodLoading) ? '正' : '已' + const text2 = (iodSearch && iodLoading) ? '进行' : '完成' + const text3 = (iodSearch && iodLoading) ? '……' : '' return [ { title: (

- 已在 + {text}在 @@ -250,7 +256,7 @@ export const PlaygroundIodRelevant: React.FC = ({ className }) => { 万个 - 科学数据集中进行搜索 + 科学数据集中{text2}搜索{text3}

), description: showSearchData ? ( @@ -274,7 +280,7 @@ export const PlaygroundIodRelevant: React.FC = ({ className }) => { { title: (

- 已在 + {text}在 万篇 @@ -284,7 +290,7 @@ export const PlaygroundIodRelevant: React.FC = ({ className }) => { 万个 - 数据项目中进行搜索 + 数据项目中{text2}搜索{text3}

), description: showSearchData ? ( @@ -308,7 +314,7 @@ export const PlaygroundIodRelevant: React.FC = ({ className }) => { { title: (

- 已在 + {text}在 @@ -322,7 +328,7 @@ export const PlaygroundIodRelevant: React.FC = ({ className }) => { {" "} 万 - 科技人才中进行搜索 + 科技人才中{text2}搜索{text3}

), description: showSearchData ? ( diff --git a/src/hooks/useMessage.tsx b/src/hooks/useMessage.tsx index 1b528b7..088f6b7 100644 --- a/src/hooks/useMessage.tsx +++ b/src/hooks/useMessage.tsx @@ -507,7 +507,7 @@ export const useMessage = () => { content: fullText } ]) - + debugger await saveMessageOnSuccess({ historyId, setHistoryId, diff --git a/src/web/iod.ts b/src/web/iod.ts index a0fec91..114edf3 100644 --- a/src/web/iod.ts +++ b/src/web/iod.ts @@ -271,7 +271,7 @@ export const updateDialog = async function ( traceId: r?.traceId })) ?? [] updateBody.IoDSources = - botMessage.iodSources?.map((r) => ({ + Object.values( botMessage.iodSources as AllIodRegistryEntry).flatMap(iod => iod.data)?.map((r) => ({ id: r.doId, tokenCount: r.content || r.description