Fix --project flag not working in agent mode
- Add CommonFlags struct to group flags that apply across all modes - Refactor run_agent_mode() to accept CommonFlags instead of individual params - Add project loading logic for agent chat mode - Add integration tests for --project with agent mode This refactor prevents future bugs where new flags work in one mode but are forgotten in another.
This commit is contained in:
@@ -90,17 +90,9 @@ pub async fn run() -> Result<()> {
|
||||
if let Some(agent_name) = &cli.agent {
|
||||
return run_agent_mode(
|
||||
agent_name,
|
||||
cli.workspace.clone(),
|
||||
cli.config.as_deref(),
|
||||
cli.quiet,
|
||||
cli.new_session,
|
||||
cli.task.clone(),
|
||||
cli.chrome_headless,
|
||||
cli.safari,
|
||||
cli.chat,
|
||||
cli.include_prompt.clone(),
|
||||
cli.no_auto_memory,
|
||||
cli.acd,
|
||||
cli.common_flags(),
|
||||
)
|
||||
.await;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user