Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
8cd876d
feat(lambda): Add Remote debugging support to Lambda Remote Invoke (#…
roger-zhangg Jul 16, 2025
3f34419
fix: update Q profile and customizations on language-servers crash re…
floralph Jul 12, 2025
da9755a
test(lambda): Remove duplicate code in Lambda tests (#7672)
rhamilt Jul 16, 2025
fdf1849
Merge branch 'master' into floralph/V1787412020
floralph Jul 16, 2025
26c5a6b
fix tests
floralph Jul 16, 2025
85f5045
Fix lint issues
floralph Jul 16, 2025
b39ab4e
feat(sagemaker): Merge sagemaker to master (#7681)
laileni-aws Jul 16, 2025
2eb0891
fix(sagemaker): Fix race-condition with multiple remote spaces trying…
aws-asolidu Jul 16, 2025
ef702fa
Release 3.69.0
Jul 16, 2025
9923793
fix(amazonq): Reduce plugin start-up latency
tsmithsz Jul 15, 2025
c267700
Update version to snapshot version: 3.70.0-SNAPSHOT
Jul 16, 2025
b7e8494
fix: should check if partialResultToken is empty for EDITS trigger on…
atonaamz Jul 16, 2025
7ba15ce
feature(amazonq): start rotating logging to disk with cleanup
abhraina-aws Jul 17, 2025
d0bcc40
fix(amazonq): should check if partialResultToken is empty for EDITS t…
atonaamz Jul 17, 2025
c6c5d76
fix(amazonq): remove feature flag for CodeReview tool, update change …
singhAws Jul 17, 2025
f07287d
Release 1.84.0
Jul 17, 2025
1a5e376
fix(amazonq): enable qCodeReview tool feature flag
singhAws Jul 17, 2025
3c76e30
fix(amazonq): Increase region profiles cache expiration to 1 hour
tsmithsz Jul 17, 2025
c9c061e
fix(amazonq): handle suppress single finding in agentic reviewer
blakelaz-amazon Jul 17, 2025
c9a3e9e
fix(amazonq): changed the icon for security issue hover fix option to…
mkovelam Jul 17, 2025
9bb3be3
fix(core): fixing Fix icon failed unit test
mkovelam Jul 17, 2025
4f9da7f
Update version to snapshot version: 1.85.0-SNAPSHOT
Jul 17, 2025
c43ff0f
feat(amazonq): write logs to disk with rotation & cleanup #7691
abhraina-aws Jul 17, 2025
3898ca2
Merge pull request #7696 from singhAws/code-review-tool
BlakeLazarine Jul 17, 2025
a3c1c03
fix(amazonq): skip edit suggestion if applyDiff fail (#7693)
Will-ShaoHua Jul 17, 2025
df9a02b
fix(test): add unit test for auth activation initialize method (#7679)
yueny2020 Jul 17, 2025
f2e9403
fix(amazonq): Use document change event for auto trigger classifier i…
leigaol Jul 17, 2025
477b71a
fix(amazonq): Let Enter invoke auto completion more consistently (#7700)
leigaol Jul 17, 2025
9b51191
fix(amazonq): rename QCodeReview tool to CodeReview
blakelaz-amazon Jul 17, 2025
20ec152
Merge pull request #7695 from tsmithsz/increase-cache
tsmithsz Jul 17, 2025
e49f15f
Merge pull request #7673 from tsmithsz/reduce-latency
tsmithsz Jul 17, 2025
5dbbbd7
feat(amazonq): added logs of toolkit to the same disk place too
abhraina-aws Jul 18, 2025
dfdf377
fix(amazonq): fix issue with casing
blakelaz-amazon Jul 18, 2025
5e256b9
feat(amazonq): added logs of toolkit to the same disk file too #7701
abhraina-aws Jul 18, 2025
34e7f1b
Make sso quickpick option display profiles
reedham-aws Jul 18, 2025
efb2d49
test: make sso quickpick option display profiles
reedham-aws Jul 18, 2025
9f082d9
changelog update
reedham-aws Jul 18, 2025
fb6b847
fix(amazonq): match rotating logger level
abhraina-aws Jul 18, 2025
d6fc897
fix(amazonq): match rotating logger level #7708
abhraina-aws Jul 18, 2025
88caf6b
fix(amazonq): update Q profile and customizations on language-servers…
floralph Jul 18, 2025
aff7180
Merge branch 'aws:master' into code-review-tool
mkovelam Jul 18, 2025
e62889f
feat(amazonq): enabling code review tool
mkovelam Jul 18, 2025
4fd2d45
revert(amazonq): should pass nextToken to Flare for Edits on acc… (#7…
yueny2020 Jul 18, 2025
c5b9976
Merge branch 'aws:master' into code-review-tool
singhAws Jul 19, 2025
ab7fb6a
fix(amazonq): reverting for Amazon Q (#7714)
laileni-aws Jul 19, 2025
ca66d79
fix(amazonq): removing unwanted files (#7715)
laileni-aws Jul 19, 2025
9facfdd
Release 1.85.0
Jul 19, 2025
6c7f040
Update version to snapshot version: 1.86.0-SNAPSHOT
Jul 19, 2025
990def6
Merge master branch and resolve conflicts
singhAws Jul 20, 2025
e193525
deps: bump @aws-toolkits/telemetry to 1.0.329
singhAws Jul 21, 2025
2770a81
fix(amazonq): handle suppress single finding in agentic reviewer
blakelaz-amazon Jul 21, 2025
06b4df6
fix(amazonq): changed the icon for security issue hover fix option to…
blakelaz-amazon Jul 21, 2025
34a6675
fix(amazonq): disable codeReviewInChat feature flag
blakelaz-amazon Jul 21, 2025
9562ccc
fix(amazonq): reverting for Amazon Q (#7714) (#7730)
yueny2020 Jul 22, 2025
532c37f
Merge branch 'master' into code-review-tool
BlakeLazarine Jul 22, 2025
ff9d816
fix(amazonq): correctly update the on show inlay hints for code refer…
leigaol Jul 22, 2025
683e49f
Merge branch 'aws:master' into code-review-tool
singhAws Jul 22, 2025
2fb0926
telemetry(lambda): nit to use sessionDuration correctly for debug dur…
roger-zhangg Jul 22, 2025
5211459
Merge branch 'aws:master' into code-review-tool
singhAws Jul 22, 2025
4a3f0e0
feat(amazonq): enable show logs (#7733)
abhraina-aws Jul 22, 2025
f2699b1
Merge branch 'aws:master' into code-review-tool
singhAws Jul 22, 2025
61d328d
Merge pull request #7731 from singhAws/code-review-tool
BlakeLazarine Jul 22, 2025
b980406
fix(amazonq): fix Inline completion acceptance and reject telemetry r…
leigaol Jul 23, 2025
72f5168
Merge pull request #7707 from rhamilt/ssoQuickPickUpdate
bywang56 Jul 23, 2025
d0082e6
other(amazonq): remove unnecessary notes file
floralph Jul 23, 2025
41019e6
feat(amazonq): add keyboard shortcut for stop/reject/run commands (#7…
dungdong-aws Jul 23, 2025
2fe85cd
Revert "other(amazonq): remove unnecessary notes file"
floralph Jul 23, 2025
109a674
revert(amazonq): remove unnecessary notes file (#7737)
floralph Jul 23, 2025
669354b
fix(amazonq): update shortcut name to reuse for MCP tools
dungdong-aws Jul 23, 2025
95811a6
fix: revert dev config
dungdong-aws Jul 23, 2025
2093c59
fix(amazonq): point to the log file inside the folder (#7744)
abhraina-aws Jul 23, 2025
62fab80
Merge pull request #7742 from dungdong-aws/fix/shortcutname
dungdong-aws Jul 23, 2025
8748fc3
fix(amazonq): use diffWordsWithSpace instead of diffChars to calculat…
atonaamz Jul 23, 2025
9128f47
feat(amazonq): added show logs to the top menu bar dropdown (#7745)
abhraina-aws Jul 24, 2025
2d9440a
refactor(amazonq): Removing unwanted / agents code (#7735)
laileni-aws Jul 24, 2025
4543593
fix(amazonq): use diffWordsWithSpace instead of diffChars to calculat…
atonaamz Jul 24, 2025
6c79154
fix(amazonq): disable SageMakerUnifiedStudio for show logs (#7747)
abhraina-aws Jul 24, 2025
7f36a2d
config(amazonq): disable inline tutorial since it's taking ~250ms for…
Will-ShaoHua Jul 24, 2025
69516f4
fix(amazonq): early stop pagination requests when user decision is ma…
leigaol Jul 24, 2025
cf5d9b3
fix(amazonq): fix line break format when getting the current text doc…
atonaamz Jul 24, 2025
3084ae1
fix(amazonq): fix line break format when getting the current text doc…
atonaamz Jul 25, 2025
0769acb
fix(amazonq): Faster and more responsive auto trigger UX. (#7763)
leigaol Jul 25, 2025
64fae72
refactor(amazonq): Removing unwanted /dev and /doc code (#7760)
laileni-aws Jul 25, 2025
0bfc338
fix(auth): Fix for SSO Profile Role Chaining Regression (#7764)
laileni-aws Jul 25, 2025
6ac1207
config(amazonq): codewhisperer endpoint via settings.json (#7761)
Will-ShaoHua Jul 25, 2025
f36023f
fix(auth): Apply static workspace ID for Eclipse Che instances (#7614)
bryceitoc9 Jul 28, 2025
3b85269
telemetry(amazonq): flare is now source of truth for metrics (#7768)
chungjac Jul 28, 2025
f724fe9
refactor(amazonq): removing agentWalkThrough workflow (#7775)
laileni-aws Jul 28, 2025
0fcd624
fix(amazonq): switch off the feature flag incase sagemaker is involve…
abhraina-aws Jul 28, 2025
3a2df64
Merge remote-tracking branch 'origin/master' into HEAD
surajrdy-aws Jul 29, 2025
0be5c10
update package-lock.json
surajrdy-aws Jul 29, 2025
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
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ src.gen/*
**/src/shared/telemetry/clienttelemetry.d.ts
**/src/codewhisperer/client/codewhispererclient.d.ts
**/src/codewhisperer/client/codewhispereruserclient.d.ts
**/src/amazonqFeatureDev/client/featuredevproxyclient.d.ts
**/src/auth/sso/oidcclientpkce.d.ts

# Generated by tests
Expand Down
23 changes: 1 addition & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"type": "Bug Fix",
"description": "Faster and more responsive inline completion UX"
}
21 changes: 7 additions & 14 deletions packages/amazonq/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -521,22 +521,17 @@
"command": "aws.amazonq.walkthrough.show",
"group": "1_help@1"
},
{
"command": "aws.amazonq.exploreAgents",
"when": "!aws.isSageMaker",
"group": "1_help@2"
},
{
"command": "aws.amazonq.github",
"group": "1_help@3"
"group": "1_help@2"
},
{
"command": "aws.amazonq.aboutExtension",
"group": "1_help@4"
"group": "1_help@3"
},
{
"command": "aws.amazonq.viewLogs",
"group": "1_help@5"
"group": "1_help@4"
}
],
"aws.amazonq.submenu.securityIssueMoreActions": [
Expand Down Expand Up @@ -843,12 +838,6 @@
"title": "%AWS.amazonq.openChat%",
"category": "%AWS.amazonq.title%"
},
{
"command": "aws.amazonq.exploreAgents",
"title": "%AWS.amazonq.exploreAgents%",
"category": "%AWS.amazonq.title%",
"enablement": "aws.codewhisperer.connected && !aws.isSageMaker"
},
{
"command": "aws.amazonq.walkthrough.show",
"title": "%AWS.amazonq.welcomeWalkthrough%"
Expand Down Expand Up @@ -972,6 +961,10 @@
"command": "aws.amazonq.showPrev",
"when": "inlineSuggestionVisible && !editorReadonly && aws.codewhisperer.connected"
},
{
"command": "aws.amazonq.checkInlineSuggestionVisibility",
"when": "inlineSuggestionVisible && !editorReadonly && aws.codewhisperer.connected"
},
{
"command": "aws.amazonq.inline.invokeChat",
"win": "ctrl+i",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class SvgGenerationService {
origionalCodeHighlightRange: Range[]
}> {
const textDoc = await vscode.workspace.openTextDocument(filePath)
const originalCode = textDoc.getText()
const originalCode = textDoc.getText().replaceAll('\r\n', '\n')
if (originalCode === '') {
logger.error(`udiff format error`)
throw new ToolkitError('udiff format error')
Expand Down
74 changes: 45 additions & 29 deletions packages/amazonq/src/app/inline/completion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
* SPDX-License-Identifier: Apache-2.0
*/

import * as vscode from 'vscode'
import {
CancellationToken,
InlineCompletionContext,
Expand Down Expand Up @@ -32,7 +32,6 @@ import {
ImportAdderProvider,
CodeSuggestionsState,
vsCodeState,
inlineCompletionsDebounceDelay,
noInlineSuggestionsMsg,
getDiagnosticsDifferences,
getDiagnosticsOfCurrentFile,
Expand All @@ -42,7 +41,7 @@ import { LineTracker } from './stateTracker/lineTracker'
import { InlineTutorialAnnotation } from './tutorials/inlineTutorialAnnotation'
import { TelemetryHelper } from './telemetryHelper'
import { Experiments, getLogger, sleep } from 'aws-core-vscode/shared'
import { debounce, messageUtils } from 'aws-core-vscode/utils'
import { messageUtils } from 'aws-core-vscode/utils'
import { showEdits } from './EditRendering/imageRenderer'
import { ICursorUpdateRecorder } from './cursorUpdateManager'
import { DocumentEventListener } from './documentEventListener'
Expand Down Expand Up @@ -164,6 +163,11 @@ export class InlineCompletionManager implements Disposable {
const onInlineRejection = async () => {
try {
vsCodeState.isCodeWhispererEditing = true
if (this.sessionManager.getActiveSession() === undefined) {
return
}
const requestStartTime = this.sessionManager.getActiveSession()!.requestStartTime
const totalSessionDisplayTime = performance.now() - requestStartTime
await commands.executeCommand('editor.action.inlineSuggest.hide')
// TODO: also log the seen state for other suggestions in session
this.disposable.dispose()
Expand All @@ -185,6 +189,7 @@ export class InlineCompletionManager implements Disposable {
discarded: false,
},
},
totalSessionDisplayTime: totalSessionDisplayTime,
}
this.languageClient.sendNotification(this.logSessionResultMessageName, params)
// clear session manager states once rejected
Expand All @@ -198,7 +203,7 @@ export class InlineCompletionManager implements Disposable {
}

export class AmazonQInlineCompletionItemProvider implements InlineCompletionItemProvider {
private logger = getLogger('nextEditPrediction')
private logger = getLogger()
constructor(
private readonly languageClient: LanguageClient,
private readonly recommendationService: RecommendationService,
Expand All @@ -208,13 +213,23 @@ export class AmazonQInlineCompletionItemProvider implements InlineCompletionItem
) {}

private readonly logSessionResultMessageName = 'aws/logInlineCompletionSessionResults'
provideInlineCompletionItems = debounce(
this._provideInlineCompletionItems.bind(this),
inlineCompletionsDebounceDelay,
true
)

private async _provideInlineCompletionItems(
// Ideally use this API handleDidShowCompletionItem
// https://github.com/microsoft/vscode/blob/main/src/vscode-dts/vscode.proposed.inlineCompletionsAdditions.d.ts#L83
// we need this because the returned items of provideInlineCompletionItems may not be actually rendered on screen
// if VS Code believes the user is actively typing then it will not show such item
async checkWhetherInlineCompletionWasShown() {
// this line is to force VS Code to re-render the inline completion
// if it decides the inline completion can be shown
await vscode.commands.executeCommand('editor.action.inlineSuggest.trigger')
// yield event loop to let backend state transition finish plus wait for vsc to render
await sleep(10)
// run the command to detect if inline suggestion is really shown or not
await vscode.commands.executeCommand(`aws.amazonq.checkInlineSuggestionVisibility`)
}

// this method is automatically invoked by VS Code as user types
async provideInlineCompletionItems(
document: TextDocument,
position: Position,
context: InlineCompletionContext,
Expand Down Expand Up @@ -299,26 +314,28 @@ export class AmazonQInlineCompletionItemProvider implements InlineCompletionItem
}
// re-use previous suggestions as long as new typed prefix matches
if (prevItemMatchingPrefix.length > 0) {
getLogger().debug(`Re-using suggestions that match user typed characters`)
logstr += `- not call LSP and reuse previous suggestions that match user typed characters
- duration between trigger to completion suggestion is displayed ${performance.now() - t0}`
void this.checkWhetherInlineCompletionWasShown()
return prevItemMatchingPrefix
}
getLogger().debug(`Auto rejecting suggestions from previous session`)
// if no such suggestions, report the previous suggestion as Reject

// if no such suggestions, report the previous suggestion as Reject or Discarded
const params: LogInlineCompletionSessionResultsParams = {
sessionId: prevSessionId,
completionSessionResult: {
[prevItemId]: {
seen: true,
seen: prevSession.displayed,
accepted: false,
discarded: false,
discarded: !prevSession.displayed,
},
},
totalSessionDisplayTime: performance.now() - prevSession.requestStartTime,
}
this.languageClient.sendNotification(this.logSessionResultMessageName, params)
this.sessionManager.clear()
}

// TODO: this line will take ~200ms each trigger, need to root cause and maybe better to disable it for now
// tell the tutorial that completions has been triggered
await this.inlineTutorialAnnotation.triggered(context.triggerKind)

Expand Down Expand Up @@ -346,12 +363,13 @@ export class AmazonQInlineCompletionItemProvider implements InlineCompletionItem

const t2 = performance.now()

logstr = logstr += `- number of suggestions: ${items.length}
logstr += `- number of suggestions: ${items.length}
- sessionId: ${this.sessionManager.getActiveSession()?.sessionId}
- first suggestion content (next line):
${itemLog}
- duration since trigger to before sending Flare call: ${t1 - t0}ms
- duration since trigger to receiving responses from Flare: ${t2 - t0}ms
- duration between trigger to before sending LSP call: ${t1 - t0}ms
- duration between trigger to after receiving LSP response: ${t2 - t0}ms
- duration between before sending LSP call to after receving LSP response: ${t2 - t1}ms
`
const session = this.sessionManager.getActiveSession()

Expand All @@ -361,16 +379,13 @@ ${itemLog}
}

if (!session || !items.length || !editor) {
getLogger().debug(
`Failed to produce inline suggestion results. Received ${items.length} items from service`
)
logstr += `Failed to produce inline suggestion results. Received ${items.length} items from service`
return []
}

const cursorPosition = document.validatePosition(position)

if (position.isAfter(editor.selection.active)) {
getLogger().debug(`Cursor moved behind trigger position. Discarding suggestion...`)
const params: LogInlineCompletionSessionResultsParams = {
sessionId: session.sessionId,
completionSessionResult: {
Expand All @@ -383,6 +398,7 @@ ${itemLog}
}
this.languageClient.sendNotification(this.logSessionResultMessageName, params)
this.sessionManager.clear()
logstr += `- cursor moved behind trigger position. Discarding suggestion...`
return []
}

Expand Down Expand Up @@ -410,9 +426,7 @@ ${itemLog}
// Check if Next Edit Prediction feature flag is enabled
if (Experiments.instance.get('amazonqLSPNEP', true)) {
await showEdits(item, editor, session, this.languageClient, this)
const t3 = performance.now()
logstr = logstr + `- duration since trigger to NEP suggestion is displayed: ${t3 - t0}ms`
this.logger.info(logstr)
logstr += `- duration between trigger to edits suggestion is displayed: ${performance.now() - t0}ms`
}
return []
}
Expand All @@ -438,9 +452,6 @@ ${itemLog}

// report discard if none of suggestions match typeahead
if (itemsMatchingTypeahead.length === 0) {
getLogger().debug(
`Suggestion does not match user typeahead from insertion position. Discarding suggestion...`
)
const params: LogInlineCompletionSessionResultsParams = {
sessionId: session.sessionId,
completionSessionResult: {
Expand All @@ -453,17 +464,22 @@ ${itemLog}
}
this.languageClient.sendNotification(this.logSessionResultMessageName, params)
this.sessionManager.clear()
logstr += `- suggestion does not match user typeahead from insertion position. Discarding suggestion...`
return []
}

this.sessionManager.updateCodeReferenceAndImports()
// suggestions returned here will be displayed on screen
logstr += `- duration between trigger to completion suggestion is displayed: ${performance.now() - t0}ms`
void this.checkWhetherInlineCompletionWasShown()
return itemsMatchingTypeahead as InlineCompletionItem[]
} catch (e) {
getLogger('amazonqLsp').error('Failed to provide completion items: %O', e)
logstr += `- failed to provide completion items ${(e as Error).message}`
return []
} finally {
vsCodeState.isRecommendationsActive = false
this.logger.info(logstr)
}
}
}
18 changes: 13 additions & 5 deletions packages/amazonq/src/app/inline/recommendationService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ import {
import { CancellationToken, InlineCompletionContext, Position, TextDocument } from 'vscode'
import { LanguageClient } from 'vscode-languageclient'
import { SessionManager } from './sessionManager'
import { AuthUtil, CodeWhispererStatusBarManager } from 'aws-core-vscode/codewhisperer'
import { AuthUtil, CodeWhispererStatusBarManager, vsCodeState } from 'aws-core-vscode/codewhisperer'
import { TelemetryHelper } from './telemetryHelper'
import { ICursorUpdateRecorder } from './cursorUpdateManager'
import { globals, getLogger } from 'aws-core-vscode/shared'
import { getLogger } from 'aws-core-vscode/shared'

export interface GetAllRecommendationsOptions {
emitTelemetry?: boolean
Expand Down Expand Up @@ -68,7 +68,7 @@ export class RecommendationService {
if (options.editsStreakToken) {
request = { ...request, partialResultToken: options.editsStreakToken }
}
const requestStartTime = globals.clock.Date.now()
const requestStartTime = performance.now()
const statusBar = CodeWhispererStatusBarManager.instance

// Only track telemetry if enabled
Expand All @@ -92,13 +92,15 @@ export class RecommendationService {
nextToken: request.partialResultToken,
},
})
const t0 = performance.now()
const result: InlineCompletionListWithReferences = await languageClient.sendRequest(
inlineCompletionWithReferencesRequestType.method,
request,
token
)
getLogger().info('Received inline completion response: %O', {
getLogger().info('Received inline completion response from LSP: %O', {
sessionId: result.sessionId,
latency: performance.now() - t0,
itemCount: result.items?.length || 0,
items: result.items?.map((item) => ({
itemId: item.itemId,
Expand All @@ -117,7 +119,7 @@ export class RecommendationService {
}
TelemetryHelper.instance.setFirstSuggestionShowTime()

const firstCompletionDisplayLatency = globals.clock.Date.now() - requestStartTime
const firstCompletionDisplayLatency = performance.now() - requestStartTime
this.sessionManager.startSession(
result.sessionId,
result.items,
Expand All @@ -128,6 +130,7 @@ export class RecommendationService {

const isInlineEdit = result.items.some((item) => item.isInlineEdit)

// TODO: question, is it possible that the first request returns empty suggestion but has non-empty next token?
if (result.partialResultToken) {
if (!isInlineEdit) {
// If the suggestion is COMPLETIONS and there are more results to fetch, handle them in the background
Expand Down Expand Up @@ -183,6 +186,11 @@ export class RecommendationService {
request,
token
)
// when pagination is in progress, but user has already accepted or rejected an inline completion
// then stop pagination
if (this.sessionManager.getActiveSession() === undefined || vsCodeState.isCodeWhispererEditing) {
break
}
this.sessionManager.updateSessionSuggestions(result.items)
nextToken = result.partialResultToken
}
Expand Down
Loading
Loading