perf: 中断打字
This commit is contained in:
@ -31,18 +31,19 @@ import {
|
||||
REMOTE_ASSISTANT_ROLE,
|
||||
FILE_TYPE_MAP,
|
||||
} from './constants';
|
||||
import type { UseChatHandlerReturn } from './constants';
|
||||
import type { UseChatHandlerReturn, UseChatHandlerOptions } from './constants';
|
||||
|
||||
/**
|
||||
* 聊天处理器Hook
|
||||
* @returns 包含角色配置、消息处理函数和对话列表的对象
|
||||
*/
|
||||
export default function useChatHandler({ initSse }): UseChatHandlerReturn {
|
||||
export default function useChatHandler(options: UseChatHandlerOptions): UseChatHandlerReturn {
|
||||
const { initSse } = options;
|
||||
// 在内部定义对话列表
|
||||
const { copy } = useClipboard();
|
||||
|
||||
const senderRef = ref(null);
|
||||
const conversationList = ref<any[]>([]);
|
||||
const conversationList = ref<MESSAGE.Answer[]>([]);
|
||||
const generateLoading = ref<boolean>(false);
|
||||
const generateTeamRunTaskId = ref<string | null>(null);
|
||||
const showRightView = ref(false);
|
||||
|
||||
Reference in New Issue
Block a user