Skip to content

Commit

Permalink
fix: api dataset reference tag preview (#3600)
Browse files Browse the repository at this point in the history
  • Loading branch information
newfish-cmyk authored and c121914yu committed Jan 15, 2025
1 parent 80e6706 commit 2d82db0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions packages/service/core/dataset/search/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ export async function searchDatasetData(props: SearchDatasetDataProps) {
{
_id: { $in: collectionIdList }
},
'_id name fileId rawLink externalFileId externalFileUrl',
'_id name fileId rawLink apiFileId externalFileId externalFileUrl',
{ ...readFromSecondary }
).lean()
]);
Expand Down Expand Up @@ -525,7 +525,7 @@ export async function searchDatasetData(props: SearchDatasetDataProps) {
{
_id: { $in: searchResults.map((item) => item.collectionId) }
},
'_id name fileId rawLink externalFileId externalFileUrl',
'_id name fileId rawLink apiFileId externalFileId externalFileUrl',
{ ...readFromSecondary }
).lean()
]);
Expand Down
4 changes: 1 addition & 3 deletions projects/app/src/components/core/dataset/RawSourceBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { useTranslation } from 'next-i18next';
import { getCollectionSourceAndOpen } from '@/web/core/dataset/hooks/readCollectionSource';
import { getSourceNameIcon } from '@fastgpt/global/core/dataset/utils';
import MyIcon from '@fastgpt/web/components/common/Icon';
import { useI18n } from '@/web/context/I18n';
import type { readCollectionSourceBody } from '@/pages/api/core/dataset/collection/read';

type Props = BoxProps &
Expand Down Expand Up @@ -33,7 +32,6 @@ const RawSourceBox = ({
...props
}: Props) => {
const { t } = useTranslation();
const { fileT } = useI18n();

const canPreview = !!sourceId && canView;

Expand All @@ -51,7 +49,7 @@ const RawSourceBox = ({

return (
<MyTooltip
label={canPreview ? fileT('click_to_view_raw_source') : ''}
label={canPreview ? t('file:click_to_view_raw_source') : ''}
shouldWrapChildren={false}
>
<Box
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ export const SwitchAuthTmb = React.memo(function SwitchAuthTmb({
[inputs]
);

console.log(authTmbIdInput, '--');

return authTmbIdInput ? (
<Flex alignItems={'center'}>
<Box fontSize={'sm'}>{t('workflow:auth_tmb_id')}</Box>
Expand Down

0 comments on commit 2d82db0

Please sign in to comment.