Skip to content

Commit

Permalink
Adding credentialUrl to differentiate the Internal Users vs External …
Browse files Browse the repository at this point in the history
…users
  • Loading branch information
laileni-aws committed Dec 3, 2024
1 parent 337959a commit c5ea1f0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions packages/core/src/amazonqTest/chat/controller/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ export class TestController {
result: isCancel ? 'Cancelled' : 'Failed',
reasonDesc: getTelemetryReasonDesc(data.error),
isSupportedLanguage: true,
credentialStartUrl: AuthUtil.instance.startUrl,
})
if (session.stopIteration) {
// Error from Science
Expand Down Expand Up @@ -733,6 +734,7 @@ export class TestController {
isCodeBlockSelected: session.isCodeBlockSelected,
perfClientLatency: session.latencyOfTestGeneration,
isSupportedLanguage: true,
credentialStartUrl: AuthUtil.instance.startUrl,
result: 'Succeeded',
})

Expand Down Expand Up @@ -855,6 +857,7 @@ export class TestController {
isCodeBlockSelected: session.isCodeBlockSelected,
perfClientLatency: session.latencyOfTestGeneration,
isSupportedLanguage: true,
credentialStartUrl: AuthUtil.instance.startUrl,
result: 'Succeeded',
})
telemetry.ui_click.emit({ elementId: 'unitTestGeneration_rejectDiff' })
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import { CodeReference } from '../../../../amazonq/webview/ui/apps/amazonqCommon
import { getHttpStatusCode, getRequestId, getTelemetryReasonDesc, ToolkitError } from '../../../../shared/errors'
import { sleep, waitUntil } from '../../../../shared/utilities/timeoutUtils'
import { keys } from '../../../../shared/utilities/tsUtils'
import { testGenState } from '../../../../codewhisperer'
import { AuthUtil, testGenState } from '../../../../codewhisperer'
import { cancellingProgressField, testGenCompletedField } from '../../../models/constants'
import { telemetry } from '../../../../shared/telemetry/telemetry'

Expand Down Expand Up @@ -281,6 +281,7 @@ export class Messenger {
result: 'Cancelled',
reasonDesc: getTelemetryReasonDesc(CodeWhispererConstants.unitTestGenerationCancelMessage),
isSupportedLanguage: false,
credentialStartUrl: AuthUtil.instance.startUrl,
})

this.dispatcher.sendUpdatePromptProgress(
Expand All @@ -294,6 +295,7 @@ export class Messenger {
perfClientLatency: performance.now() - session.testGenerationStartTime,
result: 'Succeeded',
isSupportedLanguage: false,
credentialStartUrl: AuthUtil.instance.startUrl,
})
this.dispatcher.sendUpdatePromptProgress(
new UpdatePromptProgressMessage(tabID, testGenCompletedField)
Expand Down

0 comments on commit c5ea1f0

Please sign in to comment.