diff --git a/web/src/widgets/VisitorChat.tsx b/web/src/widgets/VisitorChat.tsx index baa5a44..7278d13 100644 --- a/web/src/widgets/VisitorChat.tsx +++ b/web/src/widgets/VisitorChat.tsx @@ -720,15 +720,6 @@ const VisitorChat = ({ })) }, [sessionId, sessionEnded]) - const emitTyping = () => { - // 兼容:无正文的旧 typing;正文走 emitInputDraft - if (!sessionId || sessionEnded || !agentsOnline) return - const now = Date.now() - if (now - lastTypingAt.current < 1200 || socketRef.current?.readyState !== WebSocket.OPEN) return - lastTypingAt.current = now - socketRef.current.send(JSON.stringify({ type: 'typing', session_id: sessionId })) - } - const postMessage = async (content: string, type: 'text' | 'image') => { if (!sessionId || !visitorToken) throw new Error('会话未就绪') const res = await fetch('/api/widget/message', {