Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

chore: add list thread ids on manager (#8855)

jif-oai8a0c2e584189
diff --git a/codex-rs/core/src/thread_manager.rs b/codex-rs/core/src/thread_manager.rs
index d82b242fe5..2ef96f9ad3 100644
--- a/codex-rs/core/src/thread_manager.rs
+++ b/codex-rs/core/src/thread_manager.rs
@@ -132,6 +132,10 @@ impl ThreadManager {
self.state.models_manager.list_models(config).await
}
+ pub async fn list_thread_ids(&self) -> Vec<ThreadId> {
+ self.state.threads.read().await.keys().copied().collect()
+ }
+
pub async fn get_thread(&self, thread_id: ThreadId) -> CodexResult<Arc<CodexThread>> {
self.state.get_thread(thread_id).await
}