Remove automatic README loading from context window
README.md is no longer auto-loaded into the LLM context at startup. This saves ~4,600 tokens per session while AGENTS.md and memory.md still provide all critical information for code tasks. Changes: - Delete read_project_readme() function - Remove readme_content parameter from combine_project_content() - Rename extract_readme_heading() -> extract_project_heading() - Rename Agent constructors: *_with_readme_* -> *_with_project_context_* - Update context preservation to only check for Agent Configuration - Remove has_readme field from LoadedContent - Update all tests to use new markers and function names The LLM can still read README.md on-demand via read_file when needed.
This commit is contained in:
@@ -157,7 +157,7 @@ pub async fn run_accumulative_mode(
|
||||
// Create agent for this autonomous run
|
||||
let ui_writer = ConsoleUiWriter::new();
|
||||
ui_writer.set_workspace_path(workspace_dir.clone());
|
||||
let agent = Agent::new_autonomous_with_readme_and_quiet(
|
||||
let agent = Agent::new_autonomous_with_project_context_and_quiet(
|
||||
config.clone(),
|
||||
ui_writer,
|
||||
combined_content.clone(),
|
||||
@@ -291,7 +291,7 @@ async fn handle_command(
|
||||
// Create agent for interactive mode with requirements context
|
||||
let ui_writer = ConsoleUiWriter::new();
|
||||
ui_writer.set_workspace_path(workspace_dir.clone());
|
||||
let agent = Agent::new_with_readme_and_quiet(
|
||||
let agent = Agent::new_with_project_context_and_quiet(
|
||||
config,
|
||||
ui_writer,
|
||||
chat_combined_content.clone(),
|
||||
|
||||
Reference in New Issue
Block a user