Improve long product-data generation runs

This commit is contained in:
wuyang6
2026-05-11 20:26:06 +08:00
parent 4c29ce21f1
commit c4427bbd07
14 changed files with 57 additions and 6 deletions
+7
View File
@@ -278,6 +278,7 @@ class AgentInstanceConfig:
model: str
base_url: str
api_key: str
timeout_seconds: float
allow_shell: bool
allow_write: bool
@@ -483,6 +484,7 @@ class AgentState:
model: str,
base_url: str,
api_key: str,
timeout_seconds: float,
allow_shell: bool,
allow_write: bool,
session_directory: Path,
@@ -498,6 +500,7 @@ class AgentState:
model=model,
base_url=base_url,
api_key=api_key,
timeout_seconds=timeout_seconds,
allow_shell=allow_shell,
allow_write=allow_write,
)
@@ -772,6 +775,7 @@ class AgentState:
model=config.model,
base_url=config.base_url,
api_key=config.api_key,
timeout_seconds=config.timeout_seconds,
)
return LocalCodingAgent(
model_config=model_config,
@@ -1753,6 +1757,9 @@ def _interrupted_session_message(status: str) -> str:
def _runtime_event_stage(event: dict[str, object]) -> str:
event_type = event.get('type')
if event_type == 'tool_start':
stage_note = str(event.get('assistant_content') or '').strip()
if stage_note.startswith(('进度:', '进度:')):
return stage_note
tool_name = str(event.get('tool_name') or '').strip()
return f'调用工具 {tool_name}' if tool_name else '正在调用工具'
if event_type == 'tool_result':