feat(tui): add usage overlay and sidebar for displaying usage statistics and tasks
feat(tui): implement status bar with connection and turn state indicators feat(tui): create workflow panel for agent status and progress visualization feat(web): introduce web frontend interface with static file serving feat(ws): add WebSocket interface for real-time communication and session management
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
//! Workflow execution — runs a parsed workflow script phase by phase.
|
||||
|
||||
use anyhow::Result;
|
||||
use tracing::info;
|
||||
|
||||
use crate::llm::provider::LlmClient;
|
||||
use crate::tools::ToolCtx;
|
||||
use crate::workflow::engine::primitives::execute_primitive;
|
||||
use crate::workflow::script::WorkflowScript;
|
||||
|
||||
/// Execute each phase of a workflow script sequentially.
|
||||
///
|
||||
/// Flow: for each phase → execute_primitive → collect result.
|
||||
pub async fn execute_workflow(
|
||||
script: &WorkflowScript,
|
||||
tool_ctx: &ToolCtx,
|
||||
_llm_client: &LlmClient,
|
||||
) -> Result<Vec<String>> {
|
||||
info!(
|
||||
"Executing workflow: {} ({} phases)",
|
||||
script.name,
|
||||
script.phases.len()
|
||||
);
|
||||
let mut results = Vec::new();
|
||||
for phase in &script.phases {
|
||||
info!("Executing phase: {}", phase.name);
|
||||
let result = execute_primitive(&phase.directive, tool_ctx).await?;
|
||||
results.push(result);
|
||||
}
|
||||
Ok(results)
|
||||
}
|
||||
Reference in New Issue
Block a user