feat: new ui

This commit is contained in:
archer
2023-05-04 23:30:59 +08:00
parent 4d043e0e46
commit 014fb504a4
133 changed files with 2426 additions and 1696 deletions

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

@@ -1,4 +1,7 @@
import { ChatRoleEnum } from '@/constants/chat';
import type { InitChatResponse } from '@/api/response/chat';
export type ExportChatType = 'md' | 'pdf' | 'html';
export type ChatItemSimpleType = {
obj: `${ChatRoleEnum}`;
@@ -8,3 +11,19 @@ export type ChatItemSimpleType = {
export type ChatItemType = {
_id: string;
} & ChatItemSimpleType;
export type ChatSiteItemType = {
status: 'loading' | 'finish';
} & ChatItemType;
export interface ChatType extends InitChatResponse {
history: ChatSiteItemType[];
}
export type HistoryItemType = {
_id: string;
updateTime: Date;
modelId: string;
title: string;
latestChat: string;
};