fix: avatar error remove (#4173)
* fix: avatar error remove * fix: index * fix: guide * fix: auth
This commit is contained in:
parent
fa0a8dd2da
commit
713d1901bf
@ -34,3 +34,4 @@ weight: 799
|
||||
6. 模型渠道测试时,实际未指定渠道测试。
|
||||
7. 新增自定义模型时,会把默认模型字段也保存,导致默认模型误判。
|
||||
8. 修复 promp 模式工具调用,未判空思考链,导致 UI 错误展示。
|
||||
9. 编辑应用信息导致头像丢失。
|
||||
|
||||
@ -76,7 +76,7 @@ export const refreshSourceAvatar = async (
|
||||
const newId = getIdFromPath(path);
|
||||
const oldId = getIdFromPath(oldPath);
|
||||
|
||||
if (!newId) return;
|
||||
if (!newId || newId === oldId) return;
|
||||
|
||||
await MongoImage.updateOne({ _id: newId }, { $unset: { expiredTime: 1 } }, { session });
|
||||
|
||||
|
||||
@ -96,7 +96,7 @@ function Code(e: any) {
|
||||
if (codeType === CodeClassNameEnum.guide) {
|
||||
return <ChatGuide text={strChildren} />;
|
||||
}
|
||||
if (codeType === CodeClassNameEnum.questionGuide) {
|
||||
if (codeType === CodeClassNameEnum.questionguide) {
|
||||
return <QuestionGuide text={strChildren} />;
|
||||
}
|
||||
if (codeType === CodeClassNameEnum.echarts) {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
export enum CodeClassNameEnum {
|
||||
guide = 'guide',
|
||||
questionGuide = 'questionGuide',
|
||||
questionguide = 'questionguide',
|
||||
mermaid = 'mermaid',
|
||||
echarts = 'echarts',
|
||||
quote = 'quote',
|
||||
|
||||
@ -59,7 +59,7 @@ type Props = BasicProps & {
|
||||
const RenderQuestionGuide = ({ questionGuides }: { questionGuides: string[] }) => {
|
||||
return (
|
||||
<Markdown
|
||||
source={`\`\`\`${CodeClassNameEnum.questionGuide}
|
||||
source={`\`\`\`${CodeClassNameEnum.questionguide}
|
||||
${JSON.stringify(questionGuides)}`}
|
||||
/>
|
||||
);
|
||||
|
||||
@ -70,8 +70,9 @@ const CollectionReader = ({
|
||||
appId: metadata.appId,
|
||||
...metadata.outLinkAuthData
|
||||
}),
|
||||
[metadata]
|
||||
[chatItemDataId, collectionId, metadata.appId, metadata.chatId, metadata.outLinkAuthData]
|
||||
);
|
||||
|
||||
const {
|
||||
dataList: datasetDataList,
|
||||
isLoading,
|
||||
@ -108,13 +109,22 @@ const CollectionReader = ({
|
||||
url: '/api/core/dataset/collection/export',
|
||||
filename: 'data.csv',
|
||||
body: {
|
||||
collectionId: collectionId,
|
||||
chatItemDataId
|
||||
appId: metadata.appId,
|
||||
chatId: metadata.chatId,
|
||||
chatItemDataId,
|
||||
collectionId,
|
||||
...metadata.outLinkAuthData
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
const handleRead = getCollectionSourceAndOpen(metadata);
|
||||
const handleRead = getCollectionSourceAndOpen({
|
||||
appId: metadata.appId,
|
||||
chatId: metadata.chatId,
|
||||
chatItemDataId,
|
||||
collectionId,
|
||||
...metadata.outLinkAuthData
|
||||
});
|
||||
|
||||
return (
|
||||
<MyBox display={'flex'} flexDirection={'column'} h={'full'}>
|
||||
|
||||
@ -8,6 +8,7 @@ import { FilterQuery, Types } from 'mongoose';
|
||||
import { quoteDataFieldSelector, QuoteDataItemType } from '@/service/core/chat/constants';
|
||||
import { processChatTimeFilter } from '@/service/core/chat/utils';
|
||||
import { ChatErrEnum } from '@fastgpt/global/common/error/code/chat';
|
||||
import { getCollectionWithDataset } from '@fastgpt/service/core/dataset/controller';
|
||||
|
||||
export type GetCollectionQuoteProps = LinkedPaginationProps & {
|
||||
chatId: string;
|
||||
@ -50,7 +51,8 @@ async function handler(
|
||||
|
||||
const limitedPageSize = Math.min(pageSize, 30);
|
||||
|
||||
const [{ chat, showRawSource }, { chatItem }] = await Promise.all([
|
||||
const [collection, { chat, showRawSource }, { chatItem }] = await Promise.all([
|
||||
getCollectionWithDataset(collectionId),
|
||||
authChatCrud({
|
||||
req,
|
||||
authToken: true,
|
||||
@ -69,6 +71,8 @@ async function handler(
|
||||
if (!chat) return Promise.reject(ChatErrEnum.unAuthChat);
|
||||
|
||||
const baseMatch: BaseMatchType = {
|
||||
teamId: collection.teamId,
|
||||
datasetId: collection.datasetId,
|
||||
collectionId,
|
||||
$or: [
|
||||
{ updateTime: { $lt: new Date(chatItem.time) } },
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user