perf: Add tool call prompt (#4683)

* update i18n

* perf: Add tool call prompt
This commit is contained in:
Archer
2025-04-27 18:29:10 +08:00
committed by GitHub
parent 9923a402d9
commit 5357aa402b
6 changed files with 38 additions and 14 deletions

View File

@@ -25,14 +25,6 @@ import { getSourceNameIcon } from '@fastgpt/global/core/dataset/utils';
const A = ({ children, ...props }: any) => {
const { t } = useTranslation();
const {
data: quoteData,
loading,
runAsync
} = useRequest2(getQuoteData, {
manual: true
});
const { isOpen, onOpen, onClose } = useDisclosure();
// empty href link
@@ -56,6 +48,13 @@ const A = ({ children, ...props }: any) => {
// Quote
if (props.href?.startsWith('QUOTE') && typeof children?.[0] === 'string') {
const {
data: quoteData,
loading,
runAsync: getQuoteDataById
} = useRequest2(getQuoteData, {
manual: true
});
const sourceData = useMemo(
() => getCollectionSourceData(quoteData?.collection),
[quoteData?.collection]
@@ -75,7 +74,7 @@ const A = ({ children, ...props }: any) => {
onClose={onClose}
onOpen={() => {
onOpen();
runAsync(String(children));
getQuoteDataById(String(children));
}}
trigger={'hover'}
gutter={4}