Skip to content

Commit b4286bd

Browse files
committed
feat(amazonq): disable generating message while waiting for inline suggestion
1 parent 7b161da commit b4286bd

File tree

4 files changed

+30
-9
lines changed

4 files changed

+30
-9
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Feature",
3+
"description": "disable generating message while waiting for inline suggestion"
4+
}

packages/amazonq/package.json

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,26 +1325,40 @@
13251325
"fontCharacter": "\\f1de"
13261326
}
13271327
},
1328-
"aws-schemas-registry": {
1328+
"aws-sagemaker-code-editor": {
13291329
"description": "AWS Contributed Icon",
13301330
"default": {
13311331
"fontPath": "./resources/fonts/aws-toolkit-icons.woff",
13321332
"fontCharacter": "\\f1df"
13331333
}
13341334
},
1335-
"aws-schemas-schema": {
1335+
"aws-sagemaker-jupyter-lab": {
13361336
"description": "AWS Contributed Icon",
13371337
"default": {
13381338
"fontPath": "./resources/fonts/aws-toolkit-icons.woff",
13391339
"fontCharacter": "\\f1e0"
13401340
}
13411341
},
1342-
"aws-stepfunctions-preview": {
1342+
"aws-schemas-registry": {
13431343
"description": "AWS Contributed Icon",
13441344
"default": {
13451345
"fontPath": "./resources/fonts/aws-toolkit-icons.woff",
13461346
"fontCharacter": "\\f1e1"
13471347
}
1348+
},
1349+
"aws-schemas-schema": {
1350+
"description": "AWS Contributed Icon",
1351+
"default": {
1352+
"fontPath": "./resources/fonts/aws-toolkit-icons.woff",
1353+
"fontCharacter": "\\f1e2"
1354+
}
1355+
},
1356+
"aws-stepfunctions-preview": {
1357+
"description": "AWS Contributed Icon",
1358+
"default": {
1359+
"fontPath": "./resources/fonts/aws-toolkit-icons.woff",
1360+
"fontCharacter": "\\f1e3"
1361+
}
13481362
}
13491363
},
13501364
"walkthroughs": [

packages/amazonq/src/app/inline/recommendationService.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ export interface GetAllRecommendationsOptions {
2525
export class RecommendationService {
2626
constructor(
2727
private readonly sessionManager: SessionManager,
28-
private readonly inlineGeneratingMessage: InlineGeneratingMessage,
28+
// uncomment the below line to re-enable generating message
29+
// private readonly inlineGeneratingMessage: InlineGeneratingMessage,
2930
private cursorUpdateRecorder?: ICursorUpdateRecorder
3031
) {}
3132
/**
@@ -65,7 +66,8 @@ export class RecommendationService {
6566
try {
6667
// Show UI indicators only if UI is enabled
6768
if (options.showUi) {
68-
await this.inlineGeneratingMessage.showGenerating(context.triggerKind)
69+
// uncomment the below line to re-enable generating message
70+
// await this.inlineGeneratingMessage.showGenerating(context.triggerKind)
6971
await statusBar.setLoading()
7072
}
7173

@@ -149,7 +151,8 @@ export class RecommendationService {
149151
} finally {
150152
// Remove all UI indicators if UI is enabled
151153
if (options.showUi) {
152-
this.inlineGeneratingMessage.hideGenerating()
154+
// uncomment the below line to re-enable generating message
155+
// this.inlineGeneratingMessage.hideGenerating()
153156
void statusBar.refreshStatusBar() // effectively "stop loading"
154157
}
155158
}

packages/amazonq/test/unit/amazonq/apps/inline/recommendationService.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ describe('RecommendationService', () => {
274274
})
275275

276276
it('should show UI indicators when showUi option is true (default)', async () => {
277-
const { showGeneratingStub, hideGeneratingStub } = setupUITest()
277+
// const { showGeneratingStub, hideGeneratingStub } = setupUITest()
278278

279279
// Call with default options (showUi: true)
280280
await service.getAllRecommendations(
@@ -287,8 +287,8 @@ describe('RecommendationService', () => {
287287
)
288288

289289
// Verify UI methods were called
290-
sinon.assert.calledOnce(showGeneratingStub)
291-
sinon.assert.calledOnce(hideGeneratingStub)
290+
// sinon.assert.calledOnce(showGeneratingStub)
291+
// sinon.assert.calledOnce(hideGeneratingStub)
292292
sinon.assert.calledOnce(statusBarStub.setLoading)
293293
sinon.assert.calledOnce(statusBarStub.refreshStatusBar)
294294
})

0 commit comments

Comments
 (0)