diff --git a/packages/amazonq/.changes/next-release/Feature-78cd26f7-38b9-4363-8fde-20008c088cc2.json b/packages/amazonq/.changes/next-release/Feature-78cd26f7-38b9-4363-8fde-20008c088cc2.json new file mode 100644 index 00000000000..63ade5f4857 --- /dev/null +++ b/packages/amazonq/.changes/next-release/Feature-78cd26f7-38b9-4363-8fde-20008c088cc2.json @@ -0,0 +1,4 @@ +{ + "type": "Feature", + "description": "disable generating message while waiting for inline suggestion" +} diff --git a/packages/amazonq/src/app/inline/recommendationService.ts b/packages/amazonq/src/app/inline/recommendationService.ts index eafdf39a3b2..2ad21aa526f 100644 --- a/packages/amazonq/src/app/inline/recommendationService.ts +++ b/packages/amazonq/src/app/inline/recommendationService.ts @@ -25,7 +25,8 @@ export interface GetAllRecommendationsOptions { export class RecommendationService { constructor( private readonly sessionManager: SessionManager, - private readonly inlineGeneratingMessage: InlineGeneratingMessage, + // uncomment the below line to re-enable generating message + // private readonly inlineGeneratingMessage: InlineGeneratingMessage, private cursorUpdateRecorder?: ICursorUpdateRecorder ) {} /** @@ -65,7 +66,8 @@ export class RecommendationService { try { // Show UI indicators only if UI is enabled if (options.showUi) { - await this.inlineGeneratingMessage.showGenerating(context.triggerKind) + // uncomment the below line to re-enable generating message + // await this.inlineGeneratingMessage.showGenerating(context.triggerKind) await statusBar.setLoading() } @@ -149,7 +151,8 @@ export class RecommendationService { } finally { // Remove all UI indicators if UI is enabled if (options.showUi) { - this.inlineGeneratingMessage.hideGenerating() + // uncomment the below line to re-enable generating message + // this.inlineGeneratingMessage.hideGenerating() void statusBar.refreshStatusBar() // effectively "stop loading" } } diff --git a/packages/amazonq/test/unit/amazonq/apps/inline/recommendationService.test.ts b/packages/amazonq/test/unit/amazonq/apps/inline/recommendationService.test.ts index c79c615e520..3476a5f021f 100644 --- a/packages/amazonq/test/unit/amazonq/apps/inline/recommendationService.test.ts +++ b/packages/amazonq/test/unit/amazonq/apps/inline/recommendationService.test.ts @@ -274,7 +274,7 @@ describe('RecommendationService', () => { }) it('should show UI indicators when showUi option is true (default)', async () => { - const { showGeneratingStub, hideGeneratingStub } = setupUITest() + // const { showGeneratingStub, hideGeneratingStub } = setupUITest() // Call with default options (showUi: true) await service.getAllRecommendations( @@ -287,8 +287,8 @@ describe('RecommendationService', () => { ) // Verify UI methods were called - sinon.assert.calledOnce(showGeneratingStub) - sinon.assert.calledOnce(hideGeneratingStub) + // sinon.assert.calledOnce(showGeneratingStub) + // sinon.assert.calledOnce(hideGeneratingStub) sinon.assert.calledOnce(statusBarStub.setLoading) sinon.assert.calledOnce(statusBarStub.refreshStatusBar) })