feat(cli): wire up --include-prompt in main CLI and agent mode

Updates lib.rs and agent_mode.rs to read the include prompt file
and pass it through to combine_project_content(). The include prompt
is placed after language prompts but before project memory.
This commit is contained in:
Dhanji R. Prasanna
2026-01-17 15:19:55 +05:30
parent 56e8fddfc4
commit e45d5b25f3
2 changed files with 10 additions and 3 deletions

View File

@@ -33,7 +33,7 @@ use accumulative::run_accumulative_mode;
use agent_mode::run_agent_mode;
use autonomous::run_autonomous;
use interactive::run_interactive;
use project_files::{combine_project_content, read_agents_config, read_project_memory, read_project_readme};
use project_files::{combine_project_content, read_agents_config, read_include_prompt, read_project_memory, read_project_readme};
use simple_output::SimpleOutput;
use ui_writer_impl::ConsoleUiWriter;
use utils::{initialize_logging, load_config_with_cli_overrides, setup_workspace_directory};
@@ -89,6 +89,7 @@ pub async fn run() -> Result<()> {
cli.chrome_headless,
cli.safari,
cli.chat,
cli.include_prompt.clone(),
)
.await;
}
@@ -101,6 +102,7 @@ pub async fn run() -> Result<()> {
let readme_content = read_project_readme(&workspace_dir);
let memory_content = read_project_memory(&workspace_dir);
let language_content = language_prompts::get_language_prompts_for_workspace(&workspace_dir);
let include_prompt = read_include_prompt(cli.include_prompt.as_deref());
// Create project model
let project = create_project(&cli, &workspace_dir)?;
@@ -113,7 +115,7 @@ pub async fn run() -> Result<()> {
let config = load_config_with_cli_overrides(&cli)?;
// Combine AGENTS.md, README, and memory content
let combined_content = combine_project_content(agents_content, readme_content, memory_content, language_content, &workspace_dir);
let combined_content = combine_project_content(agents_content, readme_content, memory_content, language_content, include_prompt, &workspace_dir);
run_console_mode(cli, config, project, combined_content, workspace_dir).await
}