feat: 对话式首页接口对接,逻辑调整

This commit is contained in:
rd
2025-08-26 17:59:42 +08:00
parent 6211c78c07
commit a125f6f092
12 changed files with 320 additions and 178 deletions

View File

@ -2,6 +2,8 @@ import type { Ref } from 'vue';
import type { BubbleListProps } from '@/components/xt-chat/xt-bubble/types';
// 定义角色常量
export const LOADING_ROLE = 'loading'; // 加载中
export const INTELLECTUAL_THINKING_ROLE = 'intellectual_thinking'; // 智能思考标题
export const QUESTION_ROLE = 'question';
export const ANSWER_ROLE = 'text';
export const FILE_ROLE = 'file';
@ -23,9 +25,16 @@ export const ANSWER_STYLE = {
export interface UseChatHandlerReturn {
roles: BubbleListProps['roles'];
currentTaskId: Ref<string | null>;
handleMessage: (parsedData: { event: string; data: any }) => void;
handleMessage: (parsedData: { event: string; data: MESSAGE.Answer }) => void;
handleOpen: (data: Response) => void;
generateLoading: Ref<boolean>;
conversationList: Ref<any[]>;
showRightView: Ref<boolean>;
rightViewContent: Ref<string>;
rightViewInfo: Ref<any>;
senderRef: Ref<null>
}
export enum EnumTeamRunStatus {
TeamRunStarted = 'TeamRunStarted', // 开始
TeamRunResponseContent = 'TeamRunResponseContent', // 执行中
TeamRunCompleted = 'TeamRunCompleted', // 完成
}