feat: chat首页渲染优化
This commit is contained in:
31
src/components/xt-chat/chat-view/constants.ts
Normal file
31
src/components/xt-chat/chat-view/constants.ts
Normal file
@ -0,0 +1,31 @@
|
||||
import type { Ref } from 'vue';
|
||||
import type { BubbleListProps } from '@/components/xt-chat/xt-bubble/types';
|
||||
|
||||
// 定义角色常量
|
||||
export const QUESTION_ROLE = 'question';
|
||||
export const ANSWER_ROLE = 'text';
|
||||
export const FILE_ROLE = 'file';
|
||||
export const THOUGHT_ROLE = 'thought';
|
||||
|
||||
export const ROLE_STYLE = {
|
||||
width: '600px',
|
||||
margin: '0 auto',
|
||||
};
|
||||
|
||||
export const ANSWER_STYLE = {
|
||||
...ROLE_STYLE,
|
||||
paddingLeft: '12px',
|
||||
borderLeft: '1px solid #E6E6E8',
|
||||
position: 'relative',
|
||||
left: '6px',
|
||||
};
|
||||
|
||||
export interface UseChatHandlerReturn {
|
||||
roles: BubbleListProps['roles'];
|
||||
currentTaskId: Ref<string | null>;
|
||||
handleMessage: (parsedData: { event: string; data: any }) => void;
|
||||
generateLoading: Ref<boolean>;
|
||||
conversationList: Ref<any[]>;
|
||||
showRightView: Ref<boolean>;
|
||||
rightViewContent: Ref<string>;
|
||||
}
|
||||
Reference in New Issue
Block a user