mirror of
https://github.com/labring/FastGPT.git
synced 2026-05-07 01:02:55 +08:00
feat: share chat page
This commit is contained in:
Vendored
+14
-1
@@ -1,5 +1,5 @@
|
||||
import { ChatRoleEnum } from '@/constants/chat';
|
||||
import type { InitChatResponse } from '@/api/response/chat';
|
||||
import type { InitChatResponse, InitShareChatResponse } from '@/api/response/chat';
|
||||
|
||||
export type ExportChatType = 'md' | 'pdf' | 'html';
|
||||
|
||||
@@ -20,6 +20,10 @@ export interface ChatType extends InitChatResponse {
|
||||
history: ChatSiteItemType[];
|
||||
}
|
||||
|
||||
export interface ShareChatType extends InitShareChatResponse {
|
||||
history: ChatSiteItemType[];
|
||||
}
|
||||
|
||||
export type HistoryItemType = {
|
||||
_id: string;
|
||||
updateTime: Date;
|
||||
@@ -27,3 +31,12 @@ export type HistoryItemType = {
|
||||
title: string;
|
||||
latestChat: string;
|
||||
};
|
||||
|
||||
export type ShareChatHistoryItemType = {
|
||||
_id: string;
|
||||
shareId: string;
|
||||
updateTime: Date;
|
||||
title: string;
|
||||
latestChat: string;
|
||||
chats: ChatSiteItemType[];
|
||||
};
|
||||
|
||||
Vendored
+6
@@ -33,3 +33,9 @@ export interface ShareModelItem {
|
||||
share: ModelSchema['share'];
|
||||
isCollection: boolean;
|
||||
}
|
||||
|
||||
export type ShareChatEditType = {
|
||||
name: string;
|
||||
password: string;
|
||||
maxContext: number;
|
||||
};
|
||||
|
||||
Vendored
+11
@@ -137,3 +137,14 @@ export interface PromotionRecordSchema {
|
||||
createTime: Date; // 记录时间
|
||||
amount: number;
|
||||
}
|
||||
|
||||
export interface ShareChatSchema {
|
||||
_id: string;
|
||||
userId: string;
|
||||
modelId: string;
|
||||
password: string;
|
||||
name: string;
|
||||
tokens: number;
|
||||
maxContext: number;
|
||||
lastTime: Date;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user