feat: new ui
This commit is contained in:
19
src/types/chat.d.ts
vendored
19
src/types/chat.d.ts
vendored
@@ -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;
|
||||
};
|
||||
|
||||
7
src/types/model.d.ts
vendored
7
src/types/model.d.ts
vendored
@@ -1,6 +1,13 @@
|
||||
import { ModelStatusEnum } from '@/constants/model';
|
||||
import type { ModelSchema } from './mongoSchema';
|
||||
|
||||
export type ModelListItemType = {
|
||||
_id: string;
|
||||
name: string;
|
||||
avatar: string;
|
||||
systemPrompt: string;
|
||||
};
|
||||
|
||||
export interface ModelUpdateParams {
|
||||
name: string;
|
||||
avatar: string;
|
||||
|
||||
1
src/types/mongoSchema.d.ts
vendored
1
src/types/mongoSchema.d.ts
vendored
@@ -11,6 +11,7 @@ export interface UserModelSchema {
|
||||
_id: string;
|
||||
username: string;
|
||||
password: string;
|
||||
avatar: string;
|
||||
balance: number;
|
||||
inviterId?: string;
|
||||
promotionAmount: number;
|
||||
|
||||
4
src/types/user.d.ts
vendored
4
src/types/user.d.ts
vendored
@@ -1,6 +1,7 @@
|
||||
export interface UserType {
|
||||
_id: string;
|
||||
username: string;
|
||||
avatar: string;
|
||||
openaiKey: string;
|
||||
balance: number;
|
||||
promotion: {
|
||||
@@ -10,7 +11,8 @@ export interface UserType {
|
||||
|
||||
export interface UserUpdateParams {
|
||||
balance?: number;
|
||||
openaiKey: string;
|
||||
avatar?: string;
|
||||
openaiKey?: string;
|
||||
}
|
||||
|
||||
export interface UserBillType {
|
||||
|
||||
Reference in New Issue
Block a user