fix: optimize leaderboard and agent handoff

This commit is contained in:
吉鑫升 committed 2026-06-05 21:06:23 +08:00
1 parent 24a5ca0c06
commit f4ccef8c70
3 files changed
+135 -59

No files matched your search

+2 -2
View File
@@ -131,7 +131,7 @@ export default function AgentChatPage() {
const pendingMessageHandled = useRef(false);
useEffect(() => {
if (pendingMessageHandled.current) return;
if (!agent_id || !isNewThread || hasStartedConversation) return;
if (!agent_id || !isNewThread) return;
let pending: { agentId?: string; text?: string } | null = null;
try {
const raw = sessionStorage.getItem("pendingAgentMessage");
@@ -143,7 +143,7 @@ export default function AgentChatPage() {
pendingMessageHandled.current = true;
sessionStorage.removeItem("pendingAgentMessage");
handleSubmit({ text: pending.text, files: [] });
}, [agent_id, isNewThread, hasStartedConversation, handleSubmit]);
}, [agent_id, isNewThread, handleSubmit]);
const handleClarificationSubmit = useCallback(
(answer: string) => {