mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-22 20:37:48 +00:00
45 lines
1016 B
TypeScript
45 lines
1016 B
TypeScript
import { ChatRoleEnum } from '@/constants/chat';
|
|
import type { InitChatResponse, InitShareChatResponse } from '@/api/response/chat';
|
|
import { QuoteItemType } from '@/pages/api/openapi/kb/appKbSearch';
|
|
|
|
export type ExportChatType = 'md' | 'pdf' | 'html';
|
|
|
|
export type ChatItemSimpleType = {
|
|
obj: `${ChatRoleEnum}`;
|
|
value: string;
|
|
quoteLen?: number;
|
|
quote?: QuoteItemType[];
|
|
};
|
|
export type ChatItemType = {
|
|
_id: string;
|
|
} & ChatItemSimpleType;
|
|
|
|
export type ChatSiteItemType = {
|
|
status: 'loading' | 'finish';
|
|
} & ChatItemType;
|
|
|
|
export interface ChatType extends InitChatResponse {
|
|
history: ChatSiteItemType[];
|
|
}
|
|
|
|
export interface ShareChatType extends InitShareChatResponse {
|
|
history: ChatSiteItemType[];
|
|
}
|
|
|
|
export type HistoryItemType = {
|
|
_id: string;
|
|
updateTime: Date;
|
|
modelId: string;
|
|
title: string;
|
|
latestChat: string;
|
|
};
|
|
|
|
export type ShareChatHistoryItemType = {
|
|
_id: string;
|
|
shareId: string;
|
|
updateTime: Date;
|
|
title: string;
|
|
latestChat: string;
|
|
chats: ChatSiteItemType[];
|
|
};
|