Skip to content

Commit 529b539

Browse files
authored
Add analytics for /rename and /fork (openai#10655)
1 parent 5602edc commit 529b539

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

codex-rs/tui/src/app.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,6 +1056,7 @@ impl App {
10561056
ChatWidget::new_from_existing(init, resumed.thread, resumed.session_configured)
10571057
}
10581058
SessionSelection::Fork(path) => {
1059+
otel_manager.counter("codex.thread.fork", 1, &[("source", "cli_subcommand")]);
10591060
let forked = thread_manager
10601061
.fork_thread(usize::MAX, config.clone(), path.clone())
10611062
.await
@@ -1433,6 +1434,8 @@ impl App {
14331434
tui.frame_requester().schedule_frame();
14341435
}
14351436
AppEvent::ForkCurrentSession => {
1437+
self.otel_manager
1438+
.counter("codex.thread.fork", 1, &[("source", "slash_command")]);
14361439
let summary = session_summary(
14371440
self.chat_widget.token_usage(),
14381441
self.chat_widget.thread_id(),

codex-rs/tui/src/chatwidget.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3123,6 +3123,7 @@ impl ChatWidget {
31233123
self.open_review_popup();
31243124
}
31253125
SlashCommand::Rename => {
3126+
self.otel_manager.counter("codex.thread.rename", 1, &[]);
31263127
self.show_rename_prompt();
31273128
}
31283129
SlashCommand::Model => {
@@ -3342,6 +3343,7 @@ impl ChatWidget {
33423343
let trimmed = args.trim();
33433344
match cmd {
33443345
SlashCommand::Rename if !trimmed.is_empty() => {
3346+
self.otel_manager.counter("codex.thread.rename", 1, &[]);
33453347
let Some((prepared_args, _prepared_elements)) =
33463348
self.bottom_pane.prepare_inline_args_submission(false)
33473349
else {

0 commit comments

Comments
 (0)