Create an execution plan for a prompt Delegates to [`LlmPlanner`] for structured JSON plan generation, falling back to heuristic planning if the LLM call fails.
(&self, prompt: &str, _context: Option<&str>)
| 43 | /// Delegates to [`LlmPlanner`] for structured JSON plan generation, |
| 44 | /// falling back to heuristic planning if the LLM call fails. |
| 45 | pub async fn plan(&self, prompt: &str, _context: Option<&str>) -> Result<ExecutionPlan> { |
| 46 | match LlmPlanner::create_plan(&self.llm_client, prompt).await { |
| 47 | Ok(plan) => Ok(plan), |
| 48 | Err(e) => { |
| 49 | tracing::warn!("LLM plan creation failed, using fallback: {}", e); |
| 50 | Ok(LlmPlanner::fallback_plan(prompt)) |
| 51 | } |
| 52 | } |
| 53 | } |
| 54 | |
| 55 | /// Execute with planning phase. |
| 56 | /// |
no outgoing calls
no test coverage detected