Skip to content
Merged
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
6 changes: 4 additions & 2 deletions packages/amazonq/src/app/inline/completion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,14 +290,16 @@ export class AmazonQInlineCompletionItemProvider implements InlineCompletionItem
const prevSessionId = prevSession?.sessionId
const prevItemId = this.sessionManager.getActiveRecommendation()?.[0]?.itemId
const prevStartPosition = prevSession?.startPosition
if (prevSession?.triggerOnAcceptance) {
const editsTriggerOnAcceptance = prevSession?.triggerOnAcceptance
if (editsTriggerOnAcceptance) {
getAllRecommendationsOptions = {
...getAllRecommendationsOptions,
editsStreakToken: prevSession?.editsStreakPartialResultToken,
}
}
const editor = window.activeTextEditor
if (prevSession && prevSessionId && prevItemId && prevStartPosition) {
// Skip prefix matching for Edits suggestions that trigger on acceptance.
if (prevSession && prevSessionId && prevItemId && prevStartPosition && !editsTriggerOnAcceptance) {
const prefix = document.getText(new Range(prevStartPosition, position))
const prevItemMatchingPrefix = []
for (const item of this.sessionManager.getActiveRecommendation()) {
Expand Down
Loading