排队发送后不再立刻抹掉「已加入发送队列」提示
- apps/ai-game-creator-shell/src/view/project-development/chat/controller/useDirectProjectChatController.ts 拆出 clearDraftInput(只清输入与附件),排队成功分支改用它 - 原先同一事件里先 enqueueTurn 写提示、紧接着 clearPendingInput 把 composerNotice 置空,React 批处理下用户永远看不到队列确认文案
This commit is contained in:
+7
-2
@@ -346,12 +346,16 @@ export function useDirectProjectChatController({
|
||||
);
|
||||
}
|
||||
|
||||
function clearPendingInput() {
|
||||
function clearDraftInput() {
|
||||
setChatInput('');
|
||||
setChatReferences([]);
|
||||
setChatContent([]);
|
||||
setAttachments([]);
|
||||
setAttachmentNotice('');
|
||||
}
|
||||
|
||||
function clearPendingInput() {
|
||||
clearDraftInput();
|
||||
setComposerNotice('');
|
||||
}
|
||||
|
||||
@@ -373,7 +377,8 @@ export function useDirectProjectChatController({
|
||||
),
|
||||
})
|
||||
) {
|
||||
clearPendingInput();
|
||||
// 只清草稿:enqueueTurn 刚写入的「已加入发送队列」提示必须留给用户看到。
|
||||
clearDraftInput();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user