feat: Set chat name (#4974)

Set chat name with `/name` so they appear in the codex resume page:


https://github.com/user-attachments/assets/c0252bba-3a53-44c7-a740-f4690a3ad405
This commit is contained in:
dedrisian-oai
2025-10-08 16:35:35 -07:00
committed by GitHub
parent b6165aee0c
commit ec238a2c39
13 changed files with 167 additions and 22 deletions

View File

@@ -88,6 +88,7 @@ use crate::protocol::ReviewDecision;
use crate::protocol::ReviewOutputEvent;
use crate::protocol::SandboxPolicy;
use crate::protocol::SessionConfiguredEvent;
use crate::protocol::SessionRenamedEvent;
use crate::protocol::StreamErrorEvent;
use crate::protocol::Submission;
use crate::protocol::TokenCountEvent;
@@ -1507,6 +1508,16 @@ async fn submission_loop(
};
sess.send_event(event).await;
}
Op::SetSessionName { name } => {
// Persist a rename event and notify the client. We rely on the
// recorder's filtering to include this in the rollout.
let sub_id = sub.id.clone();
let event = Event {
id: sub_id,
msg: EventMsg::SessionRenamed(SessionRenamedEvent { name }),
};
sess.send_event(event).await;
}
Op::Review { review_request } => {
spawn_review_thread(
sess.clone(),