Skip to content

armgit / codex

Public Imported from GitHub
0

Lightweight coding agent that runs in your terminal

Rust

feat(core): Add `remove_conversation` to `ConversationManager` for ma… (#2613)

Wangc229a6731211
diff --git a/codex-rs/core/src/conversation_manager.rs b/codex-rs/core/src/conversation_manager.rs
index fd90f54660..ae169ed56f 100644
--- a/codex-rs/core/src/conversation_manager.rs
+++ b/codex-rs/core/src/conversation_manager.rs
@@ -110,6 +110,10 @@ impl ConversationManager {
.ok_or_else(|| CodexErr::ConversationNotFound(conversation_id))
}
+ pub async fn remove_conversation(&self, conversation_id: Uuid) {
+ self.conversations.write().await.remove(&conversation_id);
+ }
+
/// Fork an existing conversation by dropping the last `drop_last_messages`
/// user/assistant messages from its transcript and starting a new
/// conversation with identical configuration (unless overridden by the