Skip to content

Commit c5ea1f0

Browse files
committed
Adding credentialUrl to differentiate the Internal Users vs External users
1 parent 337959a commit c5ea1f0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

packages/core/src/amazonqTest/chat/controller/controller.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ export class TestController {
255255
result: isCancel ? 'Cancelled' : 'Failed',
256256
reasonDesc: getTelemetryReasonDesc(data.error),
257257
isSupportedLanguage: true,
258+
credentialStartUrl: AuthUtil.instance.startUrl,
258259
})
259260
if (session.stopIteration) {
260261
// Error from Science
@@ -733,6 +734,7 @@ export class TestController {
733734
isCodeBlockSelected: session.isCodeBlockSelected,
734735
perfClientLatency: session.latencyOfTestGeneration,
735736
isSupportedLanguage: true,
737+
credentialStartUrl: AuthUtil.instance.startUrl,
736738
result: 'Succeeded',
737739
})
738740

@@ -855,6 +857,7 @@ export class TestController {
855857
isCodeBlockSelected: session.isCodeBlockSelected,
856858
perfClientLatency: session.latencyOfTestGeneration,
857859
isSupportedLanguage: true,
860+
credentialStartUrl: AuthUtil.instance.startUrl,
858861
result: 'Succeeded',
859862
})
860863
telemetry.ui_click.emit({ elementId: 'unitTestGeneration_rejectDiff' })

packages/core/src/amazonqTest/chat/controller/messenger/messenger.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ import { CodeReference } from '../../../../amazonq/webview/ui/apps/amazonqCommon
3636
import { getHttpStatusCode, getRequestId, getTelemetryReasonDesc, ToolkitError } from '../../../../shared/errors'
3737
import { sleep, waitUntil } from '../../../../shared/utilities/timeoutUtils'
3838
import { keys } from '../../../../shared/utilities/tsUtils'
39-
import { testGenState } from '../../../../codewhisperer'
39+
import { AuthUtil, testGenState } from '../../../../codewhisperer'
4040
import { cancellingProgressField, testGenCompletedField } from '../../../models/constants'
4141
import { telemetry } from '../../../../shared/telemetry/telemetry'
4242

@@ -281,6 +281,7 @@ export class Messenger {
281281
result: 'Cancelled',
282282
reasonDesc: getTelemetryReasonDesc(CodeWhispererConstants.unitTestGenerationCancelMessage),
283283
isSupportedLanguage: false,
284+
credentialStartUrl: AuthUtil.instance.startUrl,
284285
})
285286

286287
this.dispatcher.sendUpdatePromptProgress(
@@ -294,6 +295,7 @@ export class Messenger {
294295
perfClientLatency: performance.now() - session.testGenerationStartTime,
295296
result: 'Succeeded',
296297
isSupportedLanguage: false,
298+
credentialStartUrl: AuthUtil.instance.startUrl,
297299
})
298300
this.dispatcher.sendUpdatePromptProgress(
299301
new UpdatePromptProgressMessage(tabID, testGenCompletedField)

0 commit comments

Comments
 (0)