matrixcode_core/command/handlers/
workflow.rs1use std::future::Future;
4use std::pin::Pin;
5
6use crate::command::{Command, BackendContext};
7
8pub struct Workflow;
9
10impl Command for Workflow {
11 fn name(&self) -> &'static str {
12 "workflow"
13 }
14
15 fn help(&self) -> Option<&'static str> {
16 Some("列出可用工作流")
17 }
18
19 fn execute<'a>(&'a self, ctx: &'a mut BackendContext<'_>)
20 -> Pin<Box<dyn Future<Output = bool> + Send + 'a>>
21 {
22 Box::pin(async move {
23 let info = "🔄 可用工作流:\n\n暂无已注册的工作流。\n\n提示:使用 /workflow run <name> 运行工作流".to_string();
25 let _ = ctx.event_tx.send(crate::AgentEvent::progress(info, None)).await;
26 false
27 })
28 }
29}