MCPcopy Create free account
hub / github.com/AI45Lab/Code / plan

Method plan

core/src/agent/planning_runtime.rs:45–53  ·  view source on GitHub ↗

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>)

Source from the content-addressed store, hash-verified

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 ///

Callers 1

execute_with_planningMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected