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;
|
||||
}
|
||||
// Turn started — input was consumed
|
||||
if cur.turn_active && !prev.turn_active && !prev.input.is_empty() {
|
||||
// Input consumed — Mind started a turn with it
|
||||
if !prev.input.is_empty() && cur.input.is_empty() {
|
||||
let text = prev.input.join("\n");
|
||||
let _ = ui_tx.send(UiMessage::UserInput(text));
|
||||
*dirty = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue