perf: 对话式运行状态归6类
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user