Review fixes: keep the keyboard off the settings form, and key the waits apart

The settings dialog was a dialog, so the platform moved it off the
keyboard; a screen is not, and the lower half of the form was under it.

A tool call registered its abandonable wait under the call's own id, which
the model chooses -- one named `generating` would have taken the turn's
entry and left the other wait with nobody to answer it.
This commit is contained in:
iris-ai committed 2026-09-21 03:39:06 -04:00
1 parent 7278a58387
commit 4b5ed6e398
2 files changed
+9 -3

No files matched your search

+5 -2
View File
@@ -1433,7 +1433,9 @@ fn run_tool(
// Read here rather than in the thread: the filter is live, and this is the
// call it applies to.
let chosen = shared.tools_wanted.lock().unwrap().clone();
awaiting(shared, &call.id, cancel, move || {
// Keyed apart from the turn's own wait, which the model could otherwise
// collide with by naming a call `generating`.
awaiting(shared, &format!("call:{}", call.id), cancel, move || {
match tools.execute(&name, &arguments, cwd.as_deref(), &chosen) {
Ok(output) => output,
// Reaching the tool failed, which is this server's problem and not
@@ -1448,7 +1450,8 @@ fn run_tool(
/// The id [`awaiting`] registers a completion under. One name is enough: a
/// session runs one turn at a time, and an abandoned turn's entry is taken by
/// the abandoning.
/// the abandoning. A tool call's id is prefixed rather than used raw, so the
/// model cannot name a call this and take the turn's own entry.
const GENERATING: &str = "generating";
/// Runs `work` on a thread of its own and waits for it in a way an interrupt