Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "Feature",
"description": "disable generating message while waiting for inline suggestion"
}
9 changes: 6 additions & 3 deletions packages/amazonq/src/app/inline/recommendationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
) {}
/**
Expand Down Expand Up @@ -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()
}

Expand Down Expand Up @@ -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"
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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)
})
Expand Down
Loading