diff --git a/backend/integrations/chat_orchestrator.py b/backend/integrations/chat_orchestrator.py index 0eb35ffad..9a764f323 100644 --- a/backend/integrations/chat_orchestrator.py +++ b/backend/integrations/chat_orchestrator.py @@ -21561,9 +21561,10 @@ def _classify_intent(self, nlp_result) -> ChatIntent: CommandType.BUSINESS_HEALTH: ChatIntent.BUSINESS_HEALTH, CommandType.TRIGGER: ChatIntent.AUTOMATION_TRIGGER, CommandType.WORKFLOW_CREATION: ChatIntent.WORKFLOW_CREATION, + CommandType.UNKNOWN: ChatIntent.AGENT_REQUEST, } - return intent_mapping.get(command_type, ChatIntent.SEARCH_REQUEST) + return intent_mapping.get(command_type, ChatIntent.AGENT_REQUEST) def _fallback_intent_analysis(self, message: str) -> Dict[str, Any]: """Fallback intent analysis when NLP is unavailable""" @@ -21591,14 +21592,14 @@ def _fallback_intent_analysis(self, message: str) -> Dict[str, Any]: elif any(word in message_lower for word in ["deal", "lead", "pipeline", "sales", "prospect", "forecast"]): intent = ChatIntent.CRM else: - intent = ChatIntent.SEARCH_REQUEST + intent = ChatIntent.AGENT_REQUEST return { "primary_intent": intent, "confidence": 0.6, "entities": [], "platforms": [], - "command_type": "search" + "command_type": "agent" } def _continuation_decision( @@ -21808,9 +21809,11 @@ async def _route_to_features( logger.info(f"Feature handling complete. Handled: {handled}, Intent: {primary_intent}") - # Fallback to ComputerUseAgent if no specific feature handled it successfully - # OR if the intention was explicitly AGENT_REQUEST - if not handled or primary_intent == ChatIntent.AGENT_REQUEST: + # Fallback to ComputerUseAgent only when no feature handled the turn. + # A successful Atom/LLM agent response is already the user-facing answer; + # starting a background ComputerUse task here overwrites it with a + # generic "Task ID" status bubble. + if not handled: try: # Use the General Agent (ComputerUseAgent) for unhandled queries # Identity and size, not the goal text. The user's own words do diff --git a/frontend-nextjs/next-env.d.ts b/frontend-nextjs/next-env.d.ts index b63ee6f98..7996d352f 100644 --- a/frontend-nextjs/next-env.d.ts +++ b/frontend-nextjs/next-env.d.ts @@ -1,6 +1,6 @@ /// /// -import "./.next-preview-crosssrc_fix_0929/dev/types/routes.d.ts"; +import "./.next/dev/types/routes.d.ts"; // NOTE: This file should not be edited // see https://nextjs.org/docs/pages/api-reference/config/typescript for more information.