Code Assist backend telemetry for user accept/reject of suggestions (#15206)

This commit is contained in:
Christian Gunderman
2025-12-17 15:12:59 -08:00
committed by GitHub
parent c28ff3d5a5
commit 5d13145995
8 changed files with 508 additions and 74 deletions

View File

@@ -102,7 +102,10 @@ describe('CodeAssistServer', () => {
index: 0,
content: {
role: 'model',
parts: [{ text: 'response' }],
parts: [
{ text: 'response' },
{ functionCall: { name: 'test', args: {} } },
],
},
finishReason: FinishReason.SAFETY,
safetyRatings: [],
@@ -142,7 +145,10 @@ describe('CodeAssistServer', () => {
index: 0,
content: {
role: 'model',
parts: [{ text: 'response' }],
parts: [
{ text: 'response' },
{ functionCall: { name: 'test', args: {} } },
],
},
finishReason: FinishReason.STOP,
safetyRatings: [],
@@ -204,7 +210,16 @@ describe('CodeAssistServer', () => {
const mockResponseData = {
traceId: 'stream-trace-id',
response: {
candidates: [{ content: { parts: [{ text: 'chunk' }] } }],
candidates: [
{
content: {
parts: [
{ text: 'chunk' },
{ functionCall: { name: 'test', args: {} } },
],
},
},
],
sdkHttpResponse: {
responseInternal: {
ok: true,