codex-rs: Rename /clear to /new, make it start an entirely new chat (#1264)

I noticed that `/clear` wasn't fully clearing chat history; it would
clear the chat history widgets _in the UI_, but the LLM still had access
to information from previous messages.

This PR renames `/clear` to `/new` for clarity as per Michael's
suggestion, resetting `app_state` to a fresh `ChatWidget`.
This commit is contained in:
Reilly Wood
2025-06-06 16:29:37 -07:00
committed by GitHub
parent 029f39b9da
commit 345a38502d
4 changed files with 24 additions and 21 deletions

View File

@@ -207,11 +207,6 @@ impl ChatWidget<'_> {
self.conversation_history.scroll_to_bottom();
}
pub(crate) fn clear_conversation_history(&mut self) {
self.conversation_history.clear();
self.request_redraw();
}
pub(crate) fn handle_codex_event(&mut self, event: Event) {
let Event { id, msg } = event;
match msg {