Implement chat and markdown views, enhance status bar, and add workflow panel
- Added `chat.rs` for rendering chat messages with timestamps and roles. - Introduced `markdown.rs` for rendering markdown content with styling. - Created `status.rs` to display the application status bar with session and message counts. - Developed `workflow.rs` to show the current workflow status, including tool calls and active jobs. - Established a `theme.rs` for centralized color management across the UI. - Updated `mod.rs` to include new modules and manage rendering logic.
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
use serde_json::{json, Value};
|
||||
use anyhow::{Result, anyhow};
|
||||
use super::Tool;
|
||||
use super::ToolCtx;
|
||||
|
||||
pub struct WorkflowRun;
|
||||
|
||||
impl Tool for WorkflowRun {
|
||||
fn name(&self) -> &'static str {
|
||||
"workflow_run"
|
||||
}
|
||||
|
||||
fn description(&self) -> &'static str {
|
||||
"Execute a workflow script by delegating to the workflow engine"
|
||||
}
|
||||
|
||||
fn parameters(&self) -> Value {
|
||||
json!({
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"script": {
|
||||
"type": "string",
|
||||
"description": "Workflow script content or path to a workflow file"
|
||||
},
|
||||
"args": {
|
||||
"type": "object",
|
||||
"description": "Optional arguments passed to the workflow script"
|
||||
}
|
||||
},
|
||||
"required": ["script"]
|
||||
})
|
||||
}
|
||||
|
||||
fn run(&self, _ctx: &ToolCtx, args: &Value) -> Result<String> {
|
||||
let _script = args.get("script")
|
||||
.and_then(|v| v.as_str())
|
||||
.ok_or_else(|| anyhow!("missing required argument: script"))?;
|
||||
let _workflow_args = args.get("args");
|
||||
Ok("workflow delegated to workflow engine".to_string())
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user