feat: share chat page
This commit is contained in:
15
src/types/chat.d.ts
vendored
15
src/types/chat.d.ts
vendored
@@ -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[];
|
||||
};
|
||||
|
||||
6
src/types/model.d.ts
vendored
6
src/types/model.d.ts
vendored
@@ -33,3 +33,9 @@ export interface ShareModelItem {
|
||||
share: ModelSchema['share'];
|
||||
isCollection: boolean;
|
||||
}
|
||||
|
||||
export type ShareChatEditType = {
|
||||
name: string;
|
||||
password: string;
|
||||
maxContext: number;
|
||||
};
|
||||
|
||||
11
src/types/mongoSchema.d.ts
vendored
11
src/types/mongoSchema.d.ts
vendored
@@ -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