mirror of
https://github.com/openai/codex.git
synced 2026-11-19 23:05:23 +00:00
Resolve session labels uniquely before acting on them (#43315)
## Why Selecting the first matching session name can target the wrong conversation when labels are duplicated. Session commands also need to accept preview text when no explicit name is set. ## What changed - Share app-server label lookup across resume, fork, archive, unarchive, delete, and queue commands, matching the trimmed name or fallback preview. - Reject distinct matching sessions across collections and source filters, and require a UUID when pagination prevents verifying uniqueness. - Revalidate listed candidates with `thread/read`, skip unusable local rollouts, and retain compatibility with older servers that cannot read unloaded threads. - Show ambiguous resume errors in the TUI without replacing the current conversation. - Disable implicit local daemon reuse with `--oss`. ## Testing Add regression coverage for name and preview lookup, provider filtering, duplicate labels across pages and collections, stale rollouts, older-server compatibility, queue ambiguity, and preserving the current conversation after an ambiguous resume. GitOrigin-RevId: e2766276a16140fb674c9640f7050c11ac0d0f6f
This commit is contained in:
1 parent
455318c202
commit
02d4529f55
11 files changed
+699
-772
No files matched your search
@@ -314,18 +314,26 @@ impl App {
|
||||
&self.config,
|
||||
&id_or_name,
|
||||
)
|
||||
.await?
|
||||
.await
|
||||
{
|
||||
Some(target_session) => {
|
||||
Ok(Some(target_session)) => {
|
||||
return self
|
||||
.resume_target_session(tui, app_server, target_session)
|
||||
.await;
|
||||
}
|
||||
None => {
|
||||
Ok(None) => {
|
||||
self.chat_widget.add_error_message(format!(
|
||||
"No saved chat found matching '{id_or_name}'."
|
||||
));
|
||||
}
|
||||
Err(err)
|
||||
if err
|
||||
.downcast_ref::<crate::named_session_lookup::AmbiguousSessionName>()
|
||||
.is_some() =>
|
||||
{
|
||||
self.chat_widget.add_error_message(err.to_string());
|
||||
}
|
||||
Err(err) => return Err(err),
|
||||
}
|
||||
}
|
||||
AppEvent::ArchiveCurrentThread => {
|
||||
|
||||
Reference in new issue
Block a user