feat: share chat page

This commit is contained in:
archer
2023-05-14 21:37:26 +08:00
parent d3e7923040
commit d31bdf0ee0
23 changed files with 2047 additions and 65 deletions

15
src/types/chat.d.ts vendored
View File

@@ -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[];
};