@lobehub/chat
Version:
Lobe Chat - an open-source, high-performance chatbot framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.
77 lines (67 loc) • 1.76 kB
text/typescript
import type { PartialDeep } from 'type-fest';
import { z } from 'zod';
import { Plans } from '../subscription';
import { TopicDisplayMode } from '../topic';
import { UserSettings } from '../user/settings';
export interface LobeUser {
avatar?: string;
email?: string | null;
firstName?: string | null;
fullName?: string | null;
id: string;
latestName?: string | null;
username?: string | null;
}
export const UserGuideSchema = z.object({
/**
* Move the settings button to the avatar dropdown
*/
moveSettingsToAvatar: z.boolean().optional(),
/**
* Topic Guide
*/
topic: z.boolean().optional(),
/**
* tell user that uploaded files can be found in knowledge base
*/
uploadFileInKnowledgeBase: z.boolean().optional(),
});
export type UserGuide = z.infer<typeof UserGuideSchema>;
export interface UserPreference {
/**
* disable markdown rendering in chat input editor
*/
disableInputMarkdownRender?: boolean;
/**
* enable multi-agent group chat mode
*/
enableGroupChat?: boolean;
guide?: UserGuide;
hideSyncAlert?: boolean;
telemetry: boolean | null;
topicDisplayMode?: TopicDisplayMode;
/**
* whether to use cmd + enter to send message
*/
useCmdEnterToSend?: boolean;
}
export interface UserInitializationState {
avatar?: string;
canEnablePWAGuide?: boolean;
canEnableTrace?: boolean;
email?: string;
firstName?: string;
fullName?: string;
hasConversation?: boolean;
isOnboard?: boolean;
lastName?: string;
preference: UserPreference;
settings: PartialDeep<UserSettings>;
subscriptionPlan?: Plans;
userId?: string;
username?: string;
}
export const NextAuthAccountSchame = z.object({
provider: z.string(),
providerAccountId: z.string(),
});