From 529b53956408fcc87a75922185baf604d7f96e0d Mon Sep 17 00:00:00 2001 From: pap-openai Date: Thu, 5 Feb 2026 20:18:29 +0000 Subject: [PATCH] Add analytics for /rename and /fork (#10655) --- codex-rs/tui/src/app.rs | 3 +++ codex-rs/tui/src/chatwidget.rs | 2 ++ 2 files changed, 5 insertions(+) diff --git a/codex-rs/tui/src/app.rs b/codex-rs/tui/src/app.rs index 8ef4283c6..718615237 100644 --- a/codex-rs/tui/src/app.rs +++ b/codex-rs/tui/src/app.rs @@ -1056,6 +1056,7 @@ impl App { ChatWidget::new_from_existing(init, resumed.thread, resumed.session_configured) } SessionSelection::Fork(path) => { + otel_manager.counter("codex.thread.fork", 1, &[("source", "cli_subcommand")]); let forked = thread_manager .fork_thread(usize::MAX, config.clone(), path.clone()) .await @@ -1433,6 +1434,8 @@ impl App { tui.frame_requester().schedule_frame(); } AppEvent::ForkCurrentSession => { + self.otel_manager + .counter("codex.thread.fork", 1, &[("source", "slash_command")]); let summary = session_summary( self.chat_widget.token_usage(), self.chat_widget.thread_id(), diff --git a/codex-rs/tui/src/chatwidget.rs b/codex-rs/tui/src/chatwidget.rs index 4b260c67e..93d21610d 100644 --- a/codex-rs/tui/src/chatwidget.rs +++ b/codex-rs/tui/src/chatwidget.rs @@ -3123,6 +3123,7 @@ impl ChatWidget { self.open_review_popup(); } SlashCommand::Rename => { + self.otel_manager.counter("codex.thread.rename", 1, &[]); self.show_rename_prompt(); } SlashCommand::Model => { @@ -3342,6 +3343,7 @@ impl ChatWidget { let trimmed = args.trim(); match cmd { SlashCommand::Rename if !trimmed.is_empty() => { + self.otel_manager.counter("codex.thread.rename", 1, &[]); let Some((prepared_args, _prepared_elements)) = self.bottom_pane.prepare_inline_args_submission(false) else {