fix(agent): require explicit local prompt for model workflow steps
This commit is contained in:
1 parent
6e8a62928b
commit
6705e2e6b7
1 file changed
+2
-1
@@ -93,6 +93,7 @@ fn validate_steps(args: &Value) -> Result<Value, String> {
|
||||
.ok_or_else(|| "choice step requires options list".to_string())?;
|
||||
let _ = choice::parse_choice(&json!({"reply":"","options":options}))?;
|
||||
if kind == "input" { let _ = field(s, "question")?; }
|
||||
if kind == "model" { let _ = field(s, "prompt")?; }
|
||||
}
|
||||
if kind == "skill" { let _ = field(s, "skill")?; }
|
||||
if kind == "parallel" && !s.get("tasks").is_some_and(Value::is_array) {
|
||||
@@ -406,7 +407,7 @@ mod tests {
|
||||
"resume_dir":format!("target/workflow-test-{}-{n}",std::process::id()),
|
||||
"source_revision":"v1",
|
||||
"steps":[
|
||||
{"id":"choose","kind":"model","options":["chat","office"]},
|
||||
{"id":"choose","kind":"model","prompt":"Choose a skill","options":["chat","office"]},
|
||||
{"id":"answer","kind":"input","question":"OK?","options":["yes","no"]},
|
||||
{"id":"end","kind":"return"}
|
||||
]})
|
||||
|
||||
Reference in new issue
Block a user