Implement CLI send flows and refactor plugin event handling

This commit is contained in:
Gregory Schier
2026-02-17 15:41:09 -08:00
parent 1f588d0498
commit a4f96fca11
29 changed files with 1587 additions and 252 deletions

View File

@@ -28,7 +28,8 @@ pub fn run(ctx: &CliContext, args: WorkspaceArgs) -> i32 {
}
fn list(ctx: &CliContext) -> CommandResult {
let workspaces = ctx.db().list_workspaces().map_err(|e| format!("Failed to list workspaces: {e}"))?;
let workspaces =
ctx.db().list_workspaces().map_err(|e| format!("Failed to list workspaces: {e}"))?;
if workspaces.is_empty() {
println!("No workspaces found");
} else {
@@ -75,8 +76,9 @@ fn create(
return Ok(());
}
let name =
name.ok_or_else(|| "workspace create requires --name unless JSON payload is provided".to_string())?;
let name = name.ok_or_else(|| {
"workspace create requires --name unless JSON payload is provided".to_string()
})?;
let workspace = Workspace { name, ..Default::default() };
let created = ctx