bamboo_engine/runtime/managers/adapters/
mini_loop.rs1use async_trait::async_trait;
2use bamboo_agent_core::tools::ToolCall;
3use bamboo_agent_core::{AgentError, Session};
4
5use crate::runtime::managers::mini_loop::{MiniLoopDecision, MiniLoopExecutor};
6
7pub struct DefaultMiniLoopExecutor;
12
13#[async_trait]
14impl MiniLoopExecutor for DefaultMiniLoopExecutor {
15 async fn decide(
16 &self,
17 _session: &Session,
18 prompt: &str,
19 _context: &str,
20 ) -> Result<MiniLoopDecision, AgentError> {
21 Ok(MiniLoopDecision {
23 answer: prompt.to_string(),
24 prompt_tokens: 0,
25 completion_tokens: 0,
26 })
27 }
28
29 async fn evaluate_task(
30 &self,
31 _session: &Session,
32 _tool_calls: &[ToolCall],
33 _round: usize,
34 ) -> Result<MiniLoopDecision, AgentError> {
35 Ok(MiniLoopDecision {
37 answer: String::new(),
38 prompt_tokens: 0,
39 completion_tokens: 0,
40 })
41 }
42}