From e26d3e471debc7c2c52c00b78c45906936e9100d Mon Sep 17 00:00:00 2001 From: lorenzejay Date: Fri, 13 Feb 2026 13:40:39 -0800 Subject: [PATCH] Refactor PlannerObserver and StepExecutor to Utilize I18N for Prompts This update enhances the PlannerObserver and StepExecutor classes by integrating the I18N utility for managing prompts and messages. The system and user prompts are now retrieved from the I18N module, allowing for better localization and maintainability. Additionally, the code has been cleaned up to remove hardcoded strings, improving readability and consistency across the planning and execution processes. --- lib/crewai/src/crewai/agents/step_executor.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/crewai/src/crewai/agents/step_executor.py b/lib/crewai/src/crewai/agents/step_executor.py index 2173e34cc..e8b0a2f1a 100644 --- a/lib/crewai/src/crewai/agents/step_executor.py +++ b/lib/crewai/src/crewai/agents/step_executor.py @@ -236,9 +236,7 @@ class StepExecutor: ).format(step_number=step_num, result=result) ) - parts.append( - self._i18n.retrieve("planning", "step_executor_complete_step") - ) + parts.append(self._i18n.retrieve("planning", "step_executor_complete_step")) return "\n".join(parts)