Skip to content

Commit 8b08ef4

Browse files
authored
fix(amazonq): progress bar persists after cancelling README creation aws#6144
## Problem If a user creates or updates a README using /doc and hits "Cancel" during the "Scanning source files" step, the prompt input progress bar persists. ## Solution Do not display the prompt progress bar if a user has cancelled the current task.
1 parent 848b6bb commit 8b08ef4

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Bug Fix",
3+
"description": "Amazon Q /doc: progress bar persists after cancelling README creation"
4+
}

packages/core/src/amazonqDoc/session/sessionState.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,9 @@ export class CodeGenState extends CodeGenBase implements SessionState {
244244
action.telemetry.setGenerateCodeIteration(this.currentIteration)
245245
action.telemetry.setGenerateCodeLastInvocationTime()
246246
const codeGenerationId = randomUUID()
247-
248-
action.messenger.sendDocProgress(this.tabID, DocGenerationStep.SUMMARIZING_FILES, 0, action.mode)
249-
247+
if (!action.tokenSource?.token.isCancellationRequested) {
248+
action.messenger.sendDocProgress(this.tabID, DocGenerationStep.SUMMARIZING_FILES, 0, action.mode)
249+
}
250250
await this.config.proxyClient.startCodeGeneration(
251251
this.config.conversationId,
252252
this.config.uploadId,

0 commit comments

Comments
 (0)