Apply composer editing preferences to TUI text prompts (#39618)

## What changed

- Initialize custom text prompts with the main composer's editor keybindings and Vim setting.
- Support Vim mode transitions, operator sequences, cursor styles, keymap contexts, and mode-aware footer hints in these prompts.
- Start Vim prompts in insert mode, use the first `Esc` to enter normal mode, and preserve `Esc` cancellation outside Vim.

## Testing

- Cover remapped editor and Vim commands, mode and context transitions, paste handling, cancellation, and footer rendering at different widths.

GitOrigin-RevId: 7a678310639dafb938084197df23d6d2a080a051
This commit is contained in:
Benjamin Carlsson authored and copyberry committed 2026-08-20 06:35:47 +00:00
1 parent bc3545b805
commit 4bb7804a23
10 files changed
+245 -28

No files matched your search

+1 -1
View File
@@ -33,7 +33,7 @@ impl ChatWidget {
});
}),
);
self.bottom_pane.show_view(Box::new(view));
self.bottom_pane.show_text_prompt(view);
}
pub(crate) fn show_resume_paused_goal_prompt(
+1 -2
View File
@@ -357,8 +357,7 @@ impl ChatWidget {
tx.set_thread_name(name);
}),
);
self.bottom_pane.show_view(Box::new(view));
self.bottom_pane.show_text_prompt(view);
}
pub(super) fn ensure_thread_rename_allowed(&mut self) -> bool {
+1 -1
View File
@@ -303,7 +303,7 @@ impl ChatWidget {
});
}),
);
self.bottom_pane.show_view(Box::new(view));
self.bottom_pane.show_text_prompt(view);
}
pub(crate) fn open_marketplace_add_loading_popup(&mut self, _source: &str) {
+1 -1
View File
@@ -142,7 +142,7 @@ impl ChatWidget {
});
}),
);
self.bottom_pane.show_view(Box::new(view));
self.bottom_pane.show_text_prompt(view);
}
}
@@ -68,7 +68,7 @@ impl ChatWidget {
});
}),
);
self.bottom_pane.show_view(Box::new(view));
self.bottom_pane.show_text_prompt(view);
self.request_redraw();
}
}