refactor: improve code readability and consistency across multiple files
This commit is contained in:
@@ -26,7 +26,7 @@ const MAX_ITERATIONS: u32 = 25;
|
||||
/// a. Call the LLM (non-streaming) with accumulated messages + tool defs.
|
||||
/// b. If the response has no tool calls → return the text content.
|
||||
/// c. Otherwise execute each tool call and append the result as a
|
||||
/// tool-role message.
|
||||
/// tool-role message.
|
||||
/// d. If the response also contained text, append an assistant message.
|
||||
/// 4. If the loop exits naturally, return the iteration-limit message.
|
||||
pub async fn run_agent(
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//!
|
||||
//! Flow: `resolve_subagent_provider` is called at startup to pick a provider
|
||||
//! + model → `SubagentProvider` wraps that pair around an `LlmClient` for use
|
||||
//! inside the subagent engine loop.
|
||||
//! inside the subagent engine loop.
|
||||
|
||||
use anyhow::Result;
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//! Subagent workspace management — create isolated workspaces for subagents.
|
||||
|
||||
use std::path::PathBuf;
|
||||
use std::path::{Path, PathBuf};
|
||||
|
||||
/// Create an isolated workspace directory for a subagent.
|
||||
pub fn create_subagent_workspace(base_dir: &PathBuf, agent_id: &str) -> anyhow::Result<PathBuf> {
|
||||
pub fn create_subagent_workspace(base_dir: &Path, agent_id: &str) -> anyhow::Result<PathBuf> {
|
||||
let ws = base_dir.join("subagent-workspaces").join(agent_id);
|
||||
std::fs::create_dir_all(&ws)?;
|
||||
Ok(ws)
|
||||
|
||||
Reference in New Issue
Block a user