mirror of
https://github.com/openai/codex.git
synced 2026-12-01 15:42:13 +00:00
Add persisted thread pinning to the app server (#34840)
## What changed - Add `isPinned` to thread responses and allow `thread/metadata/update` to pin or unpin stored threads. - Add an `isPinned` filter to `thread/list`, including cursor-based pagination and combinations with relationship filters. - Persist pin state in SQLite without modifying rollout files, default existing threads to unpinned, and preserve pins through reconciliation and archive transitions. ## Testing - Cover protocol serialization, database migration and indexing, pin updates, filtered pagination, rollout reconciliation, and archive/unarchive behavior. GitOrigin-RevId: c2eacabd6dae465e2ae6ce8a169e00740960cdb7
This commit is contained in:
1 parent
d7e8f4c3dc
commit
400ee190c3
71 files changed
+1058
-60
No files matched your search
@@ -458,6 +458,7 @@ impl RolloutRecorder {
|
||||
cwd_filters,
|
||||
/*relation_filter*/ None,
|
||||
archived,
|
||||
/*is_pinned*/ None,
|
||||
search_term,
|
||||
)
|
||||
.await
|
||||
@@ -567,6 +568,7 @@ impl RolloutRecorder {
|
||||
cwd_filters,
|
||||
/*relation_filter*/ None,
|
||||
archived,
|
||||
/*is_pinned*/ None,
|
||||
search_term,
|
||||
)
|
||||
.await;
|
||||
@@ -596,6 +598,7 @@ impl RolloutRecorder {
|
||||
cwd_filters,
|
||||
/*relation_filter*/ None,
|
||||
archived,
|
||||
/*is_pinned*/ None,
|
||||
search_term,
|
||||
)
|
||||
.await
|
||||
@@ -636,6 +639,7 @@ impl RolloutRecorder {
|
||||
cwd_filters,
|
||||
/*relation_filter*/ None,
|
||||
archived,
|
||||
/*is_pinned*/ None,
|
||||
search_term,
|
||||
)
|
||||
.await
|
||||
@@ -714,6 +718,7 @@ impl RolloutRecorder {
|
||||
cwd_filter.as_ref().map(std::slice::from_ref),
|
||||
/*relation_filter*/ None,
|
||||
/*archived*/ false,
|
||||
/*is_pinned*/ None,
|
||||
/*search_term*/ None,
|
||||
)
|
||||
.await
|
||||
@@ -1180,6 +1185,7 @@ fn fill_missing_thread_item_metadata(item: &mut ThreadItem, state_item: ThreadIt
|
||||
thread_id: _state_thread_id,
|
||||
first_user_message,
|
||||
preview,
|
||||
is_pinned,
|
||||
cwd,
|
||||
git_branch,
|
||||
git_sha,
|
||||
@@ -1202,6 +1208,7 @@ fn fill_missing_thread_item_metadata(item: &mut ThreadItem, state_item: ThreadIt
|
||||
if item.preview.is_none() {
|
||||
item.preview = preview;
|
||||
}
|
||||
item.is_pinned = is_pinned;
|
||||
if item.cwd.is_none() {
|
||||
item.cwd = cwd;
|
||||
}
|
||||
@@ -1928,6 +1935,7 @@ fn thread_item_from_state_metadata(
|
||||
thread_id: Some(item.id),
|
||||
first_user_message: item.first_user_message,
|
||||
preview: item.preview,
|
||||
is_pinned: item.is_pinned,
|
||||
cwd: Some(item.cwd),
|
||||
git_branch: item.git_branch,
|
||||
git_sha: item.git_sha,
|
||||
|
||||
Reference in new issue
Block a user