Skip to content

Commit 67e6838

Browse files
committed
Merge branch 'master' into appComposer/flakyTest
2 parents 19b7b2c + 1c1fb06 commit 67e6838

19 files changed

+98
-43
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"date": "2024-11-11",
3+
"version": "1.35.0",
4+
"entries": [
5+
{
6+
"type": "Breaking Change",
7+
"description": "Change focus chat keybind to win+alt+i on Windows, cmd+alt+i on macOS, and meta+alt+i on Linux"
8+
},
9+
{
10+
"type": "Bug Fix",
11+
"description": "Fix suboptimal inline suggestions from Amazon Q caused by improperly formatted supplemental context"
12+
},
13+
{
14+
"type": "Bug Fix",
15+
"description": "Fix empty chunks being sent to service and get validationException"
16+
}
17+
]
18+
}

packages/amazonq/.changes/next-release/Breaking Change-7a7320b8-e8a2-4d61-8f2d-7da04f1716da.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/amazonq/.changes/next-release/Bug Fix-15ddd682-232b-4bcd-a6e5-969f5c1c40c9.json

Lines changed: 0 additions & 4 deletions
This file was deleted.
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": "tutorial always showing on start"
4+
}

packages/amazonq/.changes/next-release/Bug Fix-9f5467f7-da28-455c-9471-a5799055ddb7.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

packages/amazonq/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 1.35.0 2024-11-11
2+
3+
- **Breaking Change** Change focus chat keybind to win+alt+i on Windows, cmd+alt+i on macOS, and meta+alt+i on Linux
4+
- **Bug Fix** Fix suboptimal inline suggestions from Amazon Q caused by improperly formatted supplemental context
5+
- **Bug Fix** Fix empty chunks being sent to service and get validationException
6+
17
## 1.34.0 2024-11-07
28

39
- **Bug Fix** Align example help text with prompt message in chat

packages/amazonq/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "amazon-q-vscode",
33
"displayName": "Amazon Q",
44
"description": "Amazon Q is your generative AI-powered assistant across the software development lifecycle.",
5-
"version": "1.35.0-SNAPSHOT",
5+
"version": "1.36.0-SNAPSHOT",
66
"extensionKind": [
77
"workspace"
88
],

packages/amazonq/src/inlineChat/controller/inlineChatController.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,10 @@ export class InlineChatController {
121121
await this.reset()
122122
}
123123

124-
public async updateTaskAndLenses(task: InlineTask, taskState?: TaskState) {
124+
public async updateTaskAndLenses(task?: InlineTask, taskState?: TaskState) {
125+
if (!task) {
126+
return
127+
}
125128
if (taskState) {
126129
task.state = taskState
127130
} else if (!task.diff || task.diff.length === 0) {
@@ -200,7 +203,7 @@ export class InlineChatController {
200203
this.task = await this.createTask(query, editor.document, editor.selection)
201204
await this.inlineLineAnnotationController.disable(editor)
202205
await this.computeDiffAndRenderOnEditor(query, editor.document).catch(async (err) => {
203-
getLogger().error(err)
206+
getLogger().error('computeDiffAndRenderOnEditor error: %s', (err as Error)?.message)
204207
if (err instanceof Error) {
205208
void vscode.window.showErrorMessage(`Amazon Q: ${err.message}`)
206209
} else {

packages/core/src/codewhisperer/views/lineAnnotationController.ts

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ function fromId(id: string | undefined): AnnotationState | undefined {
3838
return new TryMoreExState()
3939
case EndState.id:
4040
return new EndState()
41+
case InlineChatState.id:
42+
return new InlineChatState()
4143
default:
4244
return undefined
4345
}
@@ -201,16 +203,15 @@ export class EndState implements AnnotationState {
201203
}
202204

203205
export class InlineChatState implements AnnotationState {
204-
static static = 'amazonq_annotation_inline_chat'
205-
id = InlineChatState.static
206+
static id = 'amazonq_annotation_inline_chat'
207+
id = InlineChatState.id
206208
suppressWhileRunning = false
207209

208210
text = () => {
209211
if (os.platform() === 'darwin') {
210212
return 'Amazon Q: Edit \u2318I'
211-
} else {
212-
return 'Amazon Q: Edit (Ctrl+I)'
213213
}
214+
return 'Amazon Q: Edit (Ctrl+I)'
214215
}
215216
updateState(_changeSource: AnnotationChangeSource, _force: boolean): AnnotationState {
216217
return this
@@ -329,6 +330,10 @@ export class LineAnnotationController implements vscode.Disposable {
329330
return this._currentState.id === new EndState().id
330331
}
331332

333+
isInlineChatHint(): boolean {
334+
return this._currentState.id === new InlineChatState().id
335+
}
336+
332337
async dismissTutorial() {
333338
this._currentState = new EndState()
334339
await setContext('aws.codewhisperer.tutorial.workInProgress', false)
@@ -467,7 +472,9 @@ export class LineAnnotationController implements vscode.Disposable {
467472
decorationOptions.range = range
468473

469474
await globals.globalState.update(inlinehintKey, this._currentState.id)
470-
await setContext('aws.codewhisperer.tutorial.workInProgress', true)
475+
if (!this.isInlineChatHint()) {
476+
await setContext('aws.codewhisperer.tutorial.workInProgress', true)
477+
}
471478
editor.setDecorations(this.cwLineHintDecoration, [decorationOptions])
472479
}
473480

0 commit comments

Comments
 (0)