Improve long product-data generation runs
This commit is contained in:
@@ -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':
|
||||
|
||||
Reference in New Issue
Block a user