perf: 对话式运行状态归6类

This commit is contained in:
rd
2025-08-27 12:04:23 +08:00
parent 4baf054d5c
commit 6e7bf7f9e4
6 changed files with 135 additions and 57 deletions

View File

@ -37,6 +37,7 @@ export default {
antdMessage.warning('停止生成后可发送');
return;
}
conversationList.value.push({
role: QUESTION_ROLE,
content: message,
@ -47,6 +48,7 @@ export default {
const handleCancel = () => {
// 中止当前正在输出的回答
console.log('handleCancel', currentTaskId.value)
if (generateLoading.value) {
bubbleListRef.value?.abortTypingByKey(currentTaskId.value);
sseController.value?.abort?.();
@ -105,9 +107,10 @@ export default {
() => props.inputInfo,
(newVal) => {
if (newVal) {
const { message } = newVal;
conversationList.value.push({
role: QUESTION_ROLE,
content: newVal,
content: message,
});
initSse(newVal);
}