Add telemetry to rewind (#18122)

This commit is contained in:
Adib234
2026-02-03 16:17:29 -05:00
committed by GitHub
parent 69c0585ab2
commit 53027af94c
7 changed files with 76 additions and 0 deletions

View File

@@ -41,6 +41,8 @@ vi.mock('@google/gemini-cli-core', async (importOriginal) => {
...actual.coreEvents,
emitFeedback: vi.fn(),
},
logRewind: vi.fn(),
RewindEvent: class {},
};
});

View File

@@ -19,6 +19,8 @@ import {
checkExhaustive,
coreEvents,
debugLogger,
logRewind,
RewindEvent,
type ChatRecordingService,
type GeminiClient,
} from '@google/gemini-cli-core';
@@ -144,6 +146,9 @@ export const rewindCommand: SlashCommand = {
context.ui.removeComponent();
}}
onRewind={async (messageId, newText, outcome) => {
if (outcome !== RewindOutcome.Cancel) {
logRewind(config, new RewindEvent(outcome));
}
switch (outcome) {
case RewindOutcome.Cancel:
context.ui.removeComponent();