mirror of
https://github.com/openai/codex.git
synced 2026-11-03 00:21:31 +00:00
Changed codex resume --last to honor the current cwd (#9245)
This PR changes `codex resume --last` to work consistently with `codex resume`. Namely, it filters based on the cwd when selecting the last session. It also supports the `--all` modifier as an override. This addresses #8700
This commit is contained in:
1 parent
3fc487e0e0
commit
ae96a15312
3 files changed
+81
-18
No files matched your search
@@ -522,22 +522,22 @@ async fn run_ratatui_app(
|
||||
}
|
||||
} else if cli.resume_last {
|
||||
let provider_filter = vec![config.model_provider_id.clone()];
|
||||
match RolloutRecorder::list_threads(
|
||||
let filter_cwd = if cli.resume_show_all {
|
||||
None
|
||||
} else {
|
||||
Some(config.cwd.as_path())
|
||||
};
|
||||
match RolloutRecorder::find_latest_thread_path(
|
||||
&config.codex_home,
|
||||
1,
|
||||
None,
|
||||
INTERACTIVE_SESSION_SOURCES,
|
||||
Some(provider_filter.as_slice()),
|
||||
&config.model_provider_id,
|
||||
filter_cwd,
|
||||
)
|
||||
.await
|
||||
{
|
||||
Ok(page) => page
|
||||
.items
|
||||
.first()
|
||||
.map(|it| resume_picker::SessionSelection::Resume(it.path.clone()))
|
||||
.unwrap_or(resume_picker::SessionSelection::StartFresh),
|
||||
Err(_) => resume_picker::SessionSelection::StartFresh,
|
||||
Ok(Some(path)) => resume_picker::SessionSelection::Resume(path),
|
||||
_ => resume_picker::SessionSelection::StartFresh,
|
||||
}
|
||||
} else if cli.resume_picker {
|
||||
match resume_picker::run_resume_picker(
|
||||
|
||||
Reference in new issue
Block a user