feat: refactor agent step limits and enhance workflow orchestration with new findings tool
This commit is contained in:
@@ -37,12 +37,6 @@ const SKIP_REVIEW_FILES: &[&str] = &[
|
||||
".gitignore", ".env", ".env.example",
|
||||
];
|
||||
|
||||
/// Maximum LLM steps for a quick-review subagent. Keeps reviews fast.
|
||||
const QUICK_REVIEW_MAX_STEPS: usize = 2;
|
||||
|
||||
/// Maximum LLM steps for background subagents (test gen, arch, security).
|
||||
const BG_SUBAGENT_MAX_STEPS: usize = 8;
|
||||
|
||||
/// ─── Helpers ───
|
||||
///
|
||||
/// Check whether a file path is worth auto-reviewing (not config/lock/data).
|
||||
@@ -114,8 +108,7 @@ pub fn spawn_quick_review(
|
||||
"quick-reviewer".to_string(),
|
||||
"reviewer".to_string(),
|
||||
)
|
||||
.with_system_prompt(prompt)
|
||||
.with_max_steps(QUICK_REVIEW_MAX_STEPS);
|
||||
.with_system_prompt(prompt);
|
||||
|
||||
let mut ctx = build_subagent_context(&def);
|
||||
ctx.session_dir = session_dir.to_path_buf();
|
||||
@@ -189,7 +182,7 @@ pub fn spawn_background_test_gen(
|
||||
"coder".to_string(), // needs write access
|
||||
)
|
||||
.with_system_prompt(prompt)
|
||||
.with_max_steps(BG_SUBAGENT_MAX_STEPS);
|
||||
;
|
||||
|
||||
let mut ctx = build_subagent_context(&def);
|
||||
ctx.session_dir = sd;
|
||||
@@ -269,7 +262,7 @@ pub fn spawn_background_arch_review(
|
||||
"reviewer".to_string(),
|
||||
)
|
||||
.with_system_prompt(prompt)
|
||||
.with_max_steps(BG_SUBAGENT_MAX_STEPS);
|
||||
;
|
||||
|
||||
let mut ctx = build_subagent_context(&def);
|
||||
ctx.session_dir = sd;
|
||||
@@ -355,7 +348,7 @@ pub fn spawn_background_security_review(
|
||||
"reviewer".to_string(),
|
||||
)
|
||||
.with_system_prompt(prompt)
|
||||
.with_max_steps(BG_SUBAGENT_MAX_STEPS);
|
||||
;
|
||||
|
||||
let mut ctx = build_subagent_context(&def);
|
||||
ctx.session_dir = sd;
|
||||
|
||||
Reference in New Issue
Block a user