First Version

This commit is contained in:
2026-07-10 15:02:09 +01:00
commit 38494a85a9
562 changed files with 196313 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
use std::sync::Arc;
use axum::{Json, extract::State};
use core_api::command::{CommandApi, CommandInfo};
use crate::core::skald::Skald;
/// `GET /api/commands` — list enabled custom slash commands (name + description)
/// for the composer autocomplete and the dynamic `/help`. Read-only: commands are
/// created by adding files under `commands/<name>/` (like agents), not via the API.
pub async fn list(State(skald): State<Arc<Skald>>) -> Json<Vec<CommandInfo>> {
Json(skald.command_manager().list_enabled())
}