From 5b35aa49a261dc4ade007d5e5eeb0048b0fb31d9 Mon Sep 17 00:00:00 2001 From: Jonas Pacheco Date: Mon, 23 Mar 2026 15:57:03 -0300 Subject: [PATCH] =?UTF-8?q?feat(agent):=20otimiza=C3=A7=C3=B5es=20para=20a?= =?UTF-8?q?presenta=C3=A7=C3=A3o=20+=20bot=C3=A3o=20cancelar?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - manus/service.ts: system prompt enxuto, sem frameworks desnecessários, data/hora real injetada - replit_integrations/chat: modelo gpt-4o → arcadia-agent, prompt limpo sem SWOT/Canvas/PDCA - litellm-config.yaml: fallback gpt-4o/gpt-4o-mini → arcadia-agent (evita carregar R1 14B) - Agent.tsx: botão cancelar (X vermelho) aparece durante processamento do Manus Co-Authored-By: Claude Sonnet 4.6 --- client/src/pages/Agent.tsx | 19 ++++ docker/litellm-config.yaml | 6 +- server/manus/service.ts | 133 +++------------------- server/replit_integrations/chat/prompt.ts | 88 +++----------- server/replit_integrations/chat/routes.ts | 4 +- 5 files changed, 50 insertions(+), 200 deletions(-) diff --git a/client/src/pages/Agent.tsx b/client/src/pages/Agent.tsx index af1b6da..d736d22 100644 --- a/client/src/pages/Agent.tsx +++ b/client/src/pages/Agent.tsx @@ -361,6 +361,10 @@ async function fetchManusRun(id: number): Promise { return response.json(); } +async function cancelManusRun(id: number): Promise { + await fetch(`/api/manus/runs/${id}`, { method: "DELETE", credentials: "include" }); +} + async function startManusRun(data: { prompt: string; attachedFiles?: AttachedFile[]; conversationHistory?: Array<{role: string; content: string}> }): Promise<{ runId: number }> { const response = await fetch("/api/manus/run", { method: "POST", @@ -1929,6 +1933,21 @@ export default function Agent() { className="flex-1 border-[#e1e8f0] focus:border-[#c89b3c] focus:ring-[#c89b3c]/20" data-testid="input-message" /> + {isStreaming && ( + + )}