mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
Clarify resume hints for renamed threads (#23234)
Addresses #23181 ## Why Renamed threads can share names, so hints that suggest resuming directly by name are ambiguous. Issue #23181 asks for the picker hint to include the thread name and thread ID in parens so users can disambiguate safely. ## What - Adds a shared resume hint formatter for named threads: run `codex resume`, then select `<name> (<thread-id>)`. - Uses that hint for /rename confirmations, TUI session summaries, and CLI/TUI exit messages. - Keeps direct `codex resume <thread-id>` guidance for unnamed threads. ## Verification Manually verified that message after `/rename` and after `/exit` include session ID in parens. --------- Co-authored-by: Felipe Coury <felipe.coury@openai.com>
This commit is contained in:
co-authored by
Felipe Coury
parent
0d344aca9b
commit
4ac3ea20a2
@@ -861,7 +861,8 @@ async fn live_app_server_invalid_thread_name_update_is_ignored() {
|
||||
#[tokio::test]
|
||||
async fn live_app_server_thread_name_update_shows_resume_hint() {
|
||||
let (mut chat, mut rx, _op_rx) = make_chatwidget_manual(/*model_override*/ None).await;
|
||||
let thread_id = ThreadId::new();
|
||||
let thread_id =
|
||||
ThreadId::from_string("123e4567-e89b-12d3-a456-426614174000").expect("thread id");
|
||||
chat.thread_id = Some(thread_id);
|
||||
|
||||
chat.handle_server_notification(
|
||||
@@ -878,8 +879,7 @@ async fn live_app_server_thread_name_update_shows_resume_hint() {
|
||||
let cells = drain_insert_history(&mut rx);
|
||||
assert_eq!(cells.len(), 1);
|
||||
let rendered = lines_to_single_string(&cells[0]);
|
||||
assert!(rendered.contains("Thread renamed to review-fix"));
|
||||
assert!(rendered.contains("codex resume review-fix"));
|
||||
assert_chatwidget_snapshot!("thread_name_update_resume_hint", rendered);
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
||||
Reference in New Issue
Block a user