event_loop: display user input when Mind consumes it
Show user text in the conversation window when the MindState diff detects input was consumed (prev.input non-empty, cur.input empty). Input stays editable in the text area until Mind takes it. Co-Authored-By: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
755a359078
commit
71351574be
1 changed files with 2 additions and 2 deletions
|
|
@ -232,8 +232,8 @@ fn diff_mind_state(
|
||||||
}));
|
}));
|
||||||
*dirty = true;
|
*dirty = true;
|
||||||
}
|
}
|
||||||
// Turn started — input was consumed
|
// Input consumed — Mind started a turn with it
|
||||||
if cur.turn_active && !prev.turn_active && !prev.input.is_empty() {
|
if !prev.input.is_empty() && cur.input.is_empty() {
|
||||||
let text = prev.input.join("\n");
|
let text = prev.input.join("\n");
|
||||||
let _ = ui_tx.send(UiMessage::UserInput(text));
|
let _ = ui_tx.send(UiMessage::UserInput(text));
|
||||||
*dirty = true;
|
*dirty = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue