Skip to main content

aether_cli/
prompt.rs

1use aether_core::core::Prompt;
2use mcp_utils::client::ServerInstructions;
3use std::path::Path;
4
5pub async fn build_system_prompt(
6    roots_path: &Path,
7    instructions: Vec<ServerInstructions>,
8    prompt_patterns: Vec<String>,
9) -> Result<String, String> {
10    let parts =
11        vec![Prompt::from_globs(prompt_patterns, roots_path.to_path_buf()), Prompt::mcp_instructions(instructions)];
12
13    Prompt::build_all(&parts).await.map_err(|e| format!("Failed to build system prompt: {e}"))
14}