Fix dialog dismiss command parsing (#605)

This commit is contained in:
layla
2026-03-04 17:14:12 -06:00
committed by GitHub
parent de5ea1d8cf
commit 8f6ad817f1
2 changed files with 13 additions and 1 deletions
+7
View File
@@ -959,6 +959,13 @@ pub fn parse_command(args: &[String], flags: &Flags) -> Result<Value, ParseError
}
Ok(cmd)
}
Some("dismiss") => {
let mut cmd = json!({ "id": id, "action": "dialog", "response": "dismiss" });
if let Some(prompt_text) = rest.get(1) {
cmd["promptText"] = json!(prompt_text);
}
Ok(cmd)
}
Some(sub) => Err(ParseError::UnknownSubcommand {
subcommand: sub.to_string(),
valid_options: VALID,