feat: enchance chat user experience (#660)

This commit is contained in:
Joel
2023-07-27 18:04:41 +08:00
committed by GitHub
parent b5825142d1
commit eae670ea4a
4 changed files with 43 additions and 8 deletions

View File

@@ -45,8 +45,12 @@ const Thought: FC<IThoughtProps> = ({
return t('explore.universalChat.thought.res.dataset').replace('{datasetName}', `<span class="text-gray-700">${datasetName}</span>`)
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>`)
default: // google, wikipedia
return t('explore.universalChat.thought.res.search', { query: input.query })
case 'google_search':
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) {