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