Commit 690ee344 authored by Joel's avatar Joel

feat: show google and wiki separately in thought

parent 23e34136
...@@ -45,8 +45,12 @@ const Thought: FC<IThoughtProps> = ({ ...@@ -45,8 +45,12 @@ const Thought: FC<IThoughtProps> = ({
return t('explore.universalChat.thought.res.dataset').replace('{datasetName}', `<span class="text-gray-700">${datasetName}</span>`) return t('explore.universalChat.thought.res.dataset').replace('{datasetName}', `<span class="text-gray-700">${datasetName}</span>`)
case 'web_reader': case 'web_reader':
return t(`explore.universalChat.thought.res.webReader.${!input.cursor ? 'normal' : 'hasPageInfo'}`).replace('{url}', `<a href="${input.url}" class="text-[#155EEF]">${input.url}</a>`) return t(`explore.universalChat.thought.res.webReader.${!input.cursor ? 'normal' : 'hasPageInfo'}`).replace('{url}', `<a href="${input.url}" class="text-[#155EEF]">${input.url}</a>`)
default: // google, wikipedia case 'google_search':
return t('explore.universalChat.thought.res.search', { query: input.query }) return t('explore.universalChat.thought.res.google', { query: input.query })
case 'wikipedia':
return t('explore.universalChat.thought.res.wikipedia', { query: input.query })
default:
return `Unknown tool: ${item.tool}`
} }
} }
catch (error) { catch (error) {
......
...@@ -66,7 +66,8 @@ const translation = { ...@@ -66,7 +66,8 @@ const translation = {
normal: 'Reading {url}', normal: 'Reading {url}',
hasPageInfo: 'Reading next page of {url}', hasPageInfo: 'Reading next page of {url}',
}, },
search: 'Searching {{query}}', google: 'Searching Google {{query}}',
wikipedia: 'Searching Wikipedia {{query}}',
dataset: 'Retrieving dataset {datasetName}', dataset: 'Retrieving dataset {datasetName}',
}, },
}, },
......
...@@ -66,7 +66,8 @@ const translation = { ...@@ -66,7 +66,8 @@ const translation = {
normal: '解析链接 {url}', normal: '解析链接 {url}',
hasPageInfo: '解析链接 {url} 的下一页', hasPageInfo: '解析链接 {url} 的下一页',
}, },
search: '搜索 {{query}}', google: '搜索谷歌 {{query}}',
wikipedia: '搜索维基百科 {{query}}',
dataset: '检索数据集 {datasetName}', dataset: '检索数据集 {datasetName}',
}, },
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment