mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
fix: drop conversation when /new (#7297)
This commit is contained in:
committed by
GitHub
Unverified
parent
d8a7a63959
commit
2845e2c006
@@ -1745,6 +1745,10 @@ mod handlers {
|
||||
|
||||
pub async fn shutdown(sess: &Arc<Session>, sub_id: String) -> bool {
|
||||
sess.abort_all_tasks(TurnAbortReason::Interrupted).await;
|
||||
sess.services
|
||||
.unified_exec_manager
|
||||
.terminate_all_sessions()
|
||||
.await;
|
||||
info!("Shutting down Codex instance");
|
||||
|
||||
// Gracefully flush and shutdown rollout recorder on session end so tests
|
||||
|
||||
@@ -617,6 +617,11 @@ impl UnifiedExecSessionManager {
|
||||
.find(|(session_id, _, _)| !protected.contains(session_id))
|
||||
.map(|(session_id, _, _)| session_id)
|
||||
}
|
||||
|
||||
pub(crate) async fn terminate_all_sessions(&self) {
|
||||
let mut sessions = self.sessions.lock().await;
|
||||
sessions.clear();
|
||||
}
|
||||
}
|
||||
|
||||
enum SessionStatus {
|
||||
|
||||
Reference in New Issue
Block a user