INNER CODE UNIT · Rust
Some
mufeedvh/code2prompt · crates/code2prompt/src/model/mod.rs:694
if let Some((var_name, value)) = new_model.template.variables.finish_editing() {
new_model.status_message = format!("Set {} = {}", var_name, value);
new_model.template.sync_variables_with_template();
}
(new_model, Cmd::None)
}
Message::VariableInputCancel => {
new_model.template.variables.cancel_editing();
new_model.status_message = "Cancelled variable editing".to_string();
(new_model, Cmd::None)
}
Message::VariableNavigateUp => {
if new_model.template.variables.cursor > 0 {
new_model.template.variables.cursor -= 1;
}
(new_model, Cmd::None)