From 633a350bfcd07dc59575ae6664efc57e919a7e24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=91=A3=E5=AE=8F=E5=87=AF?= Date: Sun, 31 May 2026 14:42:51 +0800 Subject: [PATCH] =?UTF-8?q?AI=E5=86=99=E4=BD=9C=EF=BC=9A=E6=8A=80=E8=83=BD?= =?UTF-8?q?=E6=A3=80=E7=B4=A2=E8=BF=9B=E5=BA=A6=E5=8F=8D=E9=A6=88=E4=B8=8E?= =?UTF-8?q?=E8=B6=85=E6=97=B6=E5=85=9C=E5=BA=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 检索等待时 SkillStepsCard 显示 spinner;单技能检索 25s 超时避免卡死;前后端增加 skill-timing 调试日志。 Co-authored-by: Cursor --- .../components/ai-writing/SkillStepsCard.tsx | 27 +++++++++++++----- .../open-canvas/hooks/useAIWritingStream.ts | 13 +++++++++ .../agents/ai_writing/nodes/researcher.py | 28 ++++++++++++++++--- .../agents/ai_writing/search/skill_search.py | 8 ++++++ 4 files changed, 65 insertions(+), 11 deletions(-) diff --git a/frontend-web/src/open-canvas/components/ai-writing/SkillStepsCard.tsx b/frontend-web/src/open-canvas/components/ai-writing/SkillStepsCard.tsx index a243e295..cb8c349c 100644 --- a/frontend-web/src/open-canvas/components/ai-writing/SkillStepsCard.tsx +++ b/frontend-web/src/open-canvas/components/ai-writing/SkillStepsCard.tsx @@ -32,6 +32,14 @@ export function SkillStepsCard({ steps, inProgress }: SkillStepsCardProps) { const [expanded, setExpanded] = useState(true); if (steps.length === 0 && !inProgress) return null; + // 进行中的步骤:最后一条是 invoke_skill 且还没出对应的 skill_result, + // 说明该技能的 web 检索正在 await 中——把它的序号徽标换成 spinner, + // 让每次(可能数秒~数十秒的)检索等待都有"正在调用技能X检索中"的实时反馈。 + const activeIdx = + inProgress && steps.length > 0 && steps[steps.length - 1].type === 'invoke_skill' + ? steps.length - 1 + : -1; + return (