Factory: skills per phase
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
0fd10df43d
commit
43b07aca48
6 files changed
+64
-3
No files matched your search
@@ -49,6 +49,9 @@ pub struct PhaseCfg {
|
||||
/// Extra instructions appended to the phase prompt.
|
||||
#[serde(default)]
|
||||
pub extra_prompt: String,
|
||||
/// Skills (names) switched on for the chat of this phase; only the CodeCraft agent uses them.
|
||||
#[serde(default)]
|
||||
pub skills: Vec<String>,
|
||||
}
|
||||
|
||||
fn default_agent() -> String {
|
||||
@@ -69,7 +72,7 @@ fn default_rework() -> i64 {
|
||||
|
||||
impl Default for PhaseCfg {
|
||||
fn default() -> Self {
|
||||
Self { model: String::new(), agent: default_agent(), permission_mode: default_mode(), timeout_minutes: default_timeout(), max_attempts: default_attempts(), extra_prompt: String::new() }
|
||||
Self { model: String::new(), agent: default_agent(), permission_mode: default_mode(), timeout_minutes: default_timeout(), max_attempts: default_attempts(), extra_prompt: String::new(), skills: Vec::new() }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -171,6 +174,7 @@ impl RepoCfg {
|
||||
}
|
||||
p.timeout_minutes = p.timeout_minutes.clamp(1, 24 * 60);
|
||||
p.max_attempts = p.max_attempts.clamp(1, 10);
|
||||
p.skills = p.skills.iter().map(|n| n.trim().to_string()).filter(|n| !n.is_empty() && n.len() <= 64).take(10).collect();
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
@@ -881,7 +885,8 @@ fn start_phase(app: &Arc<App>, user: &User, cfg: &RepoCfg, issue: i64, phase: &s
|
||||
telegram_quiet: true,
|
||||
summary: String::new(),
|
||||
color: None,
|
||||
icon: None, skills: Vec::new(),
|
||||
icon: None,
|
||||
skills: pc.skills.clone(),
|
||||
};
|
||||
let session = app.save_session(session)?;
|
||||
let run_id = crate::types::new_id();
|
||||
|
||||
Reference in new issue
Block a user