Skip to content

feat(amazonq): Move inline completion to Flare #7480

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 62 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
15efdd9
feat(amazonq): enable inline suggestions through flare by default (#7…
jpinkney-aws May 6, 2025
da499d5
fix(amazonq): respect suggestions enabled setting for auto trigger (#…
jpinkney-aws May 6, 2025
d91bbbb
Merge master into feature/flare-inline
aws-toolkit-automation May 6, 2025
f14533d
Merge master into feature/flare-inline
aws-toolkit-automation May 6, 2025
15ad617
Merge master into feature/flare-inline
aws-toolkit-automation May 6, 2025
d57cac5
refactor(amazonq): deprecate amazon q inline through vscode (#7237)
jpinkney-aws May 6, 2025
71040b4
Merge master into feature/flare-inline
aws-toolkit-automation May 6, 2025
c6fb67c
Merge master into feature/flare-inline
aws-toolkit-automation May 6, 2025
b7cab24
Merge master into feature/flare-inline
aws-toolkit-automation May 6, 2025
3e1614d
Merge master into feature/flare-inline
aws-toolkit-automation May 6, 2025
f114894
refactor(amazonq): deprecate codewhisperer context utils (#7241)
jpinkney-aws May 6, 2025
059a140
Merge master into feature/flare-inline
aws-toolkit-automation May 7, 2025
4a279d8
feat(amazonq): add experiment for basic e2e flow of inline chat throu…
Hweinstock May 7, 2025
86ceeba
feat(amazonq): add experiment for basic e2e flow of inline chat throu…
Hweinstock May 7, 2025
0b751ac
Merge master into feature/flare-inline
aws-toolkit-automation May 7, 2025
aeca817
refactor(amazonq): pull out all decryption logic to one place (#7248)
Hweinstock May 7, 2025
ddad4ec
Merge master into feature/flare-inline
aws-toolkit-automation May 7, 2025
858cad6
telemetry(amazonq): align flare/vscode codewhisperer_serviceInvocatio…
jpinkney-aws May 8, 2025
972d1af
Merge master into feature/flare-inline
aws-toolkit-automation May 8, 2025
8022cd3
Merge master into feature/flare-inline
aws-toolkit-automation May 8, 2025
1a728f1
Merge master into feature/flare-inline
aws-toolkit-automation May 8, 2025
bbf7b0e
feat(amazonq): re-add activeState/line trackers (#7257)
jpinkney-aws May 8, 2025
c77668d
refactor(amazonq): rename inline "generating" message class (#7267)
nkomonen-amazon May 8, 2025
4eac908
fix: Ensure we clear the "generating" inline message when done
nkomonen-amazon May 8, 2025
dd3b829
fix: show spinning icon on status bar when generating suggestion
nkomonen-amazon May 8, 2025
0d2c7fb
feat(amazonq): add tutorial trackers for lsp (#7264)
jpinkney-aws May 9, 2025
260fb37
Merge pull request #7272 from nkomonen-amazon/spinningStatusBar
jpinkney-aws May 9, 2025
7e65155
refactor(amazonq): remove local workspace indexing library
jpinkney-aws May 9, 2025
079bb52
refactor(amazonq): refactor base lsp config
jpinkney-aws May 9, 2025
6995107
telemetry(amazonq): implement codewhisperer_clientComponentLatency (#…
jpinkney-aws May 9, 2025
9a793ee
Merge pull request #7275 from jpinkney-aws/remove3
jpinkney-aws May 9, 2025
5f6ee4e
Merge pull request #7277 from jpinkney-aws/closingBrackets
jpinkney-aws May 9, 2025
4b52ff4
test(amazonq): update inline tests for flare (#7274)
jpinkney-aws May 9, 2025
0429352
fix(amazonq): debounce inline suggestion requests. (#7289)
Hweinstock May 12, 2025
2f7c3d9
refactor(amazonq): move debounce to top level. (#7292)
Hweinstock May 13, 2025
7bb3dac
Merge master into feature/flare-inline (#7261)
aws-toolkit-automation May 13, 2025
b649dbd
Merge master into feature/flare-inline (#7299)
aws-toolkit-automation May 14, 2025
692847a
test(amazonq): add tests for edge cases (#7305)
Hweinstock May 14, 2025
ffb6ec1
fix(amazonq): standardize reference type for reference log (#7311)
Hweinstock May 14, 2025
b5540e2
feat(amazonq): show a message when no suggestions are found on manual…
Hweinstock May 15, 2025
a814ee0
Merge master into feature/flare-inline (#7310)
aws-toolkit-automation May 15, 2025
042ce00
fix(amazonq): inline suggestion scrolling now uses built-in VSC comma…
Hweinstock May 16, 2025
3e21737
fix(amazonq): code reference codelense works (#7331)
Hweinstock May 16, 2025
acc037a
merge
leigaol Jun 12, 2025
945ce53
merge
leigaol Jun 12, 2025
038da1c
rm unused code
leigaol Jun 12, 2025
848ba96
Merge pull request #7478 from leigaol/master_into_f_inline
leigaol Jun 12, 2025
9630312
rm unused code
leigaol Jun 12, 2025
db63fe4
Merge pull request #7482 from leigaol/feature/flare-inline
leigaol Jun 12, 2025
f7af06d
Merge master into feature/flare-inline
aws-toolkit-automation Jun 12, 2025
9bab14c
deps(amazonq): remove unused code part 2 for flare inline (#7483)
leigaol Jun 12, 2025
e9bf115
Merge master into feature/flare-inline
aws-toolkit-automation Jun 12, 2025
8b3e797
Merge master into feature/flare-inline
aws-toolkit-automation Jun 13, 2025
cfd9aec
Merge master into feature/flare-inline
aws-toolkit-automation Jun 13, 2025
553414b
Merge master into feature/flare-inline
aws-toolkit-automation Jun 13, 2025
845f445
Merge master into feature/flare-inline
aws-toolkit-automation Jun 16, 2025
1d89d5d
fix(amazonq): bring back experimental config (#7495)
leigaol Jun 16, 2025
76649f7
fix(amazonq): Correctly report suggestion state. (#7502)
leigaol Jun 17, 2025
dbb0d38
Merge branch 'feature/flare-inline' into autoMerge/feature/flare-inline
leigaol Jun 17, 2025
38a318e
Merge pull request #7500 from aws/autoMerge/feature/flare-inline
leigaol Jun 17, 2025
068ba67
Merge master into feature/flare-inline
aws-toolkit-automation Jun 17, 2025
181b5bb
fix(amazonq): improve typeahead experience (#7512)
leigaol Jun 17, 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
40 changes: 35 additions & 5 deletions package-lock.json

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

58 changes: 1 addition & 57 deletions packages/amazonq/src/app/inline/activation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,68 +6,26 @@
import vscode from 'vscode'
import {
AuthUtil,
CodeSuggestionsState,
CodeWhispererCodeCoverageTracker,
CodeWhispererConstants,
CodeWhispererSettings,
ConfigurationEntry,
DefaultCodeWhispererClient,
invokeRecommendation,
isInlineCompletionEnabled,
KeyStrokeHandler,
RecommendationHandler,
runtimeLanguageContext,
TelemetryHelper,
UserWrittenCodeTracker,
vsCodeState,
} from 'aws-core-vscode/codewhisperer'
import { Commands, getLogger, globals, sleep } from 'aws-core-vscode/shared'
import { globals, sleep } from 'aws-core-vscode/shared'

export async function activate() {
const codewhispererSettings = CodeWhispererSettings.instance
const client = new DefaultCodeWhispererClient()

if (isInlineCompletionEnabled()) {
await setSubscriptionsforInlineCompletion()
await AuthUtil.instance.setVscodeContextProps()
}

function getAutoTriggerStatus(): boolean {
return CodeSuggestionsState.instance.isSuggestionsEnabled()
}

async function getConfigEntry(): Promise<ConfigurationEntry> {
const isShowMethodsEnabled: boolean =
vscode.workspace.getConfiguration('editor').get('suggest.showMethods') || false
const isAutomatedTriggerEnabled: boolean = getAutoTriggerStatus()
const isManualTriggerEnabled: boolean = true
const isSuggestionsWithCodeReferencesEnabled = codewhispererSettings.isSuggestionsWithCodeReferencesEnabled()

// TODO:remove isManualTriggerEnabled
return {
isShowMethodsEnabled,
isManualTriggerEnabled,
isAutomatedTriggerEnabled,
isSuggestionsWithCodeReferencesEnabled,
}
}

async function setSubscriptionsforInlineCompletion() {
RecommendationHandler.instance.subscribeSuggestionCommands()

/**
* Automated trigger
*/
globals.context.subscriptions.push(
vscode.window.onDidChangeActiveTextEditor(async (editor) => {
await RecommendationHandler.instance.onEditorChange()
}),
vscode.window.onDidChangeWindowState(async (e) => {
await RecommendationHandler.instance.onFocusChange()
}),
vscode.window.onDidChangeTextEditorSelection(async (e) => {
await RecommendationHandler.instance.onCursorChange(e)
}),
vscode.workspace.onDidChangeTextDocument(async (e) => {
const editor = vscode.window.activeTextEditor
if (!editor) {
Expand All @@ -80,7 +38,6 @@ export async function activate() {
return
}

CodeWhispererCodeCoverageTracker.getTracker(e.document.languageId)?.countTotalTokens(e)
UserWrittenCodeTracker.instance.onTextDocumentChange(e)
/**
* Handle this keystroke event only when
Expand All @@ -105,19 +62,6 @@ export async function activate() {
* Then this event can be processed by our code.
*/
await sleep(CodeWhispererConstants.vsCodeCursorUpdateDelay)
if (!RecommendationHandler.instance.isSuggestionVisible()) {
await KeyStrokeHandler.instance.processKeyStroke(e, editor, client, await getConfigEntry())
}
}),
// manual trigger
Commands.register({ id: 'aws.amazonq.invokeInlineCompletion', autoconnect: true }, async () => {
invokeRecommendation(
vscode.window.activeTextEditor as vscode.TextEditor,
client,
await getConfigEntry()
).catch((e) => {
getLogger().error('invokeRecommendation failed: %s', (e as Error).message)
})
})
)
}
Expand Down
Loading
Loading