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:
@@ -12,7 +12,7 @@ use strum_macros::IntoStaticStr;
|
||||
)]
|
||||
#[strum(serialize_all = "kebab-case")]
|
||||
pub enum SlashCommand {
|
||||
Clear,
|
||||
New,
|
||||
ToggleMouseMode,
|
||||
Quit,
|
||||
}
|
||||
@@ -21,7 +21,7 @@ impl SlashCommand {
|
||||
/// User-visible description shown in the popup.
|
||||
pub fn description(self) -> &'static str {
|
||||
match self {
|
||||
SlashCommand::Clear => "Clear the chat history.",
|
||||
SlashCommand::New => "Start a new chat.",
|
||||
SlashCommand::ToggleMouseMode => {
|
||||
"Toggle mouse mode (enable for scrolling, disable for text selection)"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user