aether-agent-cli 0.9.16

CLI and ACP server for the Aether AI coding agent
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use agent_client_protocol::schema::v2::{self as acp, AvailableCommandInput, TextCommandInput};
use mcp_utils::gateway::ServerPrompt;

pub(crate) fn available_commands(prompts: &[ServerPrompt]) -> Vec<acp::AvailableCommand> {
    prompts.iter().map(|listed| available_command(&listed.prompt)).collect()
}

fn available_command(prompt: &mcp_utils::model::Prompt) -> acp::AvailableCommand {
    let hint = prompt
        .arguments
        .as_ref()
        .and_then(|args| args.iter().find(|a| a.name.as_str() == "ARGUMENTS").and_then(|a| a.description.as_deref()))
        .unwrap_or("optional arguments");
    let description = prompt.description.clone().unwrap_or_else(|| "No description available".to_string());
    acp::AvailableCommand::new(&prompt.name, description)
        .input(Some(AvailableCommandInput::Text(TextCommandInput::new(hint))))
}