Skip to content

Commit cb5f1a6

Browse files
fix: remove try-except in CacheExecutor
1 parent 8d75ab6 commit cb5f1a6

1 file changed

Lines changed: 11 additions & 21 deletions

File tree

src/askui/speaker/cache_executor.py

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -570,29 +570,19 @@ def _get_next_step(
570570
)
571571

572572
# Create assistant message (tool use) - DON'T execute yet
573-
try:
574-
logger.debug("Preparing step %d: %s", step_index, step.name)
575-
576-
assistant_message = MessageParam(
577-
role="assistant",
578-
content=[substituted_step],
579-
)
573+
logger.debug("Preparing step %d: %s", step_index, step.name)
580574

581-
return ExecutionResult(
582-
status="SUCCESS",
583-
step_index=step_index,
584-
tool_result=None,
585-
message_history=[assistant_message],
586-
)
575+
assistant_message = MessageParam(
576+
role="assistant",
577+
content=[substituted_step],
578+
)
587579

588-
except Exception as e:
589-
logger.exception("Error preparing step %d: %s", step_index, step.name)
590-
return ExecutionResult(
591-
status="FAILED",
592-
step_index=step_index,
593-
error_message=str(e),
594-
message_history=self._message_history.copy(),
595-
)
580+
return ExecutionResult(
581+
status="SUCCESS",
582+
step_index=step_index,
583+
tool_result=None,
584+
message_history=[assistant_message],
585+
)
596586

597587
def _should_pause_for_agent(self, step: ToolUseBlockParam) -> bool:
598588
"""Check if execution should pause for agent intervention."""

0 commit comments

Comments
 (0)