mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
Allow naming forked chats from the TUI (#36036)
## What changed - Accept an optional thread name with `/fork`, trimming surrounding whitespace. - Apply the name to the newly forked thread and update the active session metadata. - Keep the successful fork active and show an error when naming it fails. ## Testing - Cover unnamed and named `/fork` dispatch, persisted names, and naming failures. GitOrigin-RevId: 1799576f82ef0856f992a0378f041e4bab89621b
This commit is contained in:
1 parent
9cf6b3905c
commit
a1286d12a2
8 files changed
+143
-22
No files matched your search
@@ -242,7 +242,8 @@ impl ChatWidget {
|
||||
self.app_event_tx.send(AppEvent::OpenResumePicker);
|
||||
}
|
||||
SlashCommand::Fork => {
|
||||
self.app_event_tx.send(AppEvent::ForkCurrentSession);
|
||||
self.app_event_tx
|
||||
.send(AppEvent::ForkCurrentSession { name: None });
|
||||
}
|
||||
SlashCommand::App => {
|
||||
let Some(thread_id) = self.thread_id else {
|
||||
@@ -744,6 +745,11 @@ impl ChatWidget {
|
||||
name: Some(trimmed.to_string()),
|
||||
});
|
||||
}
|
||||
SlashCommand::Fork if !trimmed.is_empty() => {
|
||||
self.app_event_tx.send(AppEvent::ForkCurrentSession {
|
||||
name: Some(trimmed.to_string()),
|
||||
});
|
||||
}
|
||||
SlashCommand::Plan if !trimmed.is_empty() => {
|
||||
if !self.apply_plan_slash_command() {
|
||||
return;
|
||||
|
||||
Reference in new issue
Block a user