fix: make it poll more often and keep expandedd

This commit is contained in:
Lluis Agusti
2026-02-12 23:02:16 +08:00
parent c0f741a149
commit ae6d890c70
3 changed files with 6 additions and 4 deletions

View File

@@ -6,6 +6,7 @@ Enable via AGENTGENERATOR_USE_DUMMY=true in settings.
WARNING: This is for testing only. Do not use in production.
"""
import asyncio
import logging
import uuid
from typing import Any
@@ -103,8 +104,9 @@ async def generate_agent_dummy(
operation_id: str | None = None,
task_id: str | None = None,
) -> dict[str, Any]:
"""Return dummy agent JSON."""
logger.info("Using dummy agent generator for generate_agent")
"""Return dummy agent JSON after a simulated delay."""
logger.info("Using dummy agent generator for generate_agent (30s delay)")
await asyncio.sleep(30)
return _generate_dummy_agent_json()

View File

@@ -10,7 +10,7 @@ const OPERATING_TYPES = new Set([
"operation_in_progress",
]);
const POLL_INTERVAL_MS = 5_000;
const POLL_INTERVAL_MS = 1_500;
/**
* Detects whether any message contains a tool part whose output indicates

View File

@@ -52,7 +52,7 @@ function getAccordionMeta(output: CreateAgentToolOutput) {
const icon = <AccordionIcon />;
if (isAgentSavedOutput(output)) {
return { icon, title: output.agent_name };
return { icon, title: output.agent_name, expanded: true };
}
if (isAgentPreviewOutput(output)) {
return {