fix(conversation): 优化对话列表滚动与播放队列并发
- 使用 InteractionManager.runAfterInteractions 包裹 scrollToEnd,避免滚动卡顿 - 提取 flattenedData 变量,减少重复计算 - 输入框增加 minHeight:22,空内容时保持一行高度 - use-player: 用 isPlayNextInProgressRef 防止 playNext 并发执行 - hooks: 格式化 useEffect 依赖数组
This commit is contained in:
@@ -184,7 +184,14 @@ export function useRealtimeSession({
|
||||
setConnectionState('disconnected');
|
||||
setStreamingMessage(null);
|
||||
};
|
||||
}, [conversationId, enabled, queryClient, handleStreamingText, handleError, onTtsAudio]);
|
||||
}, [
|
||||
conversationId,
|
||||
enabled,
|
||||
queryClient,
|
||||
handleStreamingText,
|
||||
handleError,
|
||||
onTtsAudio,
|
||||
]);
|
||||
|
||||
const sendText = useCallback(
|
||||
(text: string) => {
|
||||
|
||||
Reference in New Issue
Block a user