mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-23 04:21:31 -07:00
Add telemetry to rewind (#18122)
This commit is contained in:
@@ -41,6 +41,8 @@ vi.mock('@google/gemini-cli-core', async (importOriginal) => {
|
||||
...actual.coreEvents,
|
||||
emitFeedback: vi.fn(),
|
||||
},
|
||||
logRewind: vi.fn(),
|
||||
RewindEvent: class {},
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user