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

@@ -171,6 +171,11 @@ pub enum Op {
/// to generate a summary which will be returned as an AgentMessage event.
Compact,
/// Set a human-friendly name for the current session.
/// The agent will persist this to the rollout as an event so that UIs can
/// surface it when listing sessions.
SetSessionName { name: String },
/// Request a code review from the agent.
Review { review_request: ReviewRequest },
@@ -458,6 +463,9 @@ pub enum EventMsg {
/// Signaled when the model begins a new reasoning summary section (e.g., a new titled block).
AgentReasoningSectionBreak(AgentReasoningSectionBreakEvent),
/// Session was given a human-friendly name by the user.
SessionRenamed(SessionRenamedEvent),
/// Ack the client's configure message.
SessionConfigured(SessionConfiguredEvent),
@@ -895,6 +903,11 @@ pub struct WebSearchEndEvent {
pub query: String,
}
#[derive(Debug, Clone, Deserialize, Serialize, TS)]
pub struct SessionRenamedEvent {
pub name: String,
}
/// Response payload for `Op::GetHistory` containing the current session's
/// in-memory transcript.
#[derive(Debug, Clone, Deserialize, Serialize, TS)]