修复新会话可能出现响应不显示的情况

This commit is contained in:
xintaofei
2026-03-11 13:06:05 +08:00
parent 7dabb74de3
commit f74fe371da
3 changed files with 16 additions and 3 deletions

View File

@@ -277,6 +277,11 @@ const ConversationTabView = memo(function ConversationTabView({
async (refreshConversationId: number) => {
try {
const refreshed = await refreshDetailCache(refreshConversationId)
// Skip ACK during prompting to avoid clearing liveMessage /
// resetting syncState while streaming. The useEffect with the
// connStatus === "prompting" guard will handle it naturally
// once prompting ends.
if (prevStatusRef.current === "prompting") return
acknowledgePersistedDetail(refreshConversationId, refreshed)
} catch (error) {
setSyncState(refreshConversationId, "failed")