优化: 聊天体验批与Web规范合规
This commit is contained in:
@@ -19,7 +19,7 @@ import { state } from '@/stores/ai'
|
||||
import { nextMsgId, setConvState, convStates, switchingConvs, getConvStreamState, setConvCurrentText, setConvStreaming, clearConvStreamState, clearAllApprovalTimers, clearAllToolSlowTimers, flushCurrentText, friendlyError, notifyConversationChanged, clearLastDelta, discardConvPendingApprovals, addConvAgentFinished, clearConvAgentFinished, type AgentFinishedStatus } from './aiShared'
|
||||
import { resetStreamWatchdog, clearAllStreamWatchdogs, clearResumeAttempts } from './useAiStream'
|
||||
import { setStreaming } from './streamingGuard'
|
||||
import { scheduleConversationsRefresh } from './useAiConversations'
|
||||
import { scheduleConversationsRefresh, activeConvKvKey } from './useAiConversations'
|
||||
import { pendingTaskParked, pendingTaskProgress } from './useAiPendingState'
|
||||
import { clearConvBoundaryCache } from './useTaskBoundary'
|
||||
import { handleStreamingEvent } from './useAiStreamingEvents'
|
||||
@@ -187,7 +187,7 @@ export function handleEvent(event: AiChatEvent) {
|
||||
// 首次收到事件时同步当前对话 id(后端自动建对话的场景)并持久化
|
||||
if (convId && !state.activeConversationId) {
|
||||
state.activeConversationId = convId
|
||||
void appSettings.set('df-ai-active-conv', convId)
|
||||
void appSettings.set(activeConvKvKey(), convId)
|
||||
}
|
||||
// L2 状态机:AiConvStateChanged 是 per-conv 状态信号,在 isCurrent 守卫之前处理
|
||||
// (切走会话时也须更新 conv_state,防停止按钮/MaxRoundsCard 错态)
|
||||
|
||||
Reference in New Issue
Block a user