Skip to content

Commit 43ddb97

Browse files
tomcat323atonaamzfloralph
committed
NEP: feature flag & bug fix (aws#7410)
1. Added a feature flag `amazonqLSPNEP` for NEP. Configure the settings.json like: ``` "aws.experiments": { "amazonqLSP": true, "amazonqLSPInline": true, // optional: enables inline completion from flare "amazonqLSPChat": true, // optional: enables chat from flare "amazonqLSPNEP": true, // optional: enables next edit prediction }, ``` 2. Fixed some UI/UX bugs: - Color theme matches IDE light/dark theme - Cursor move to the end of edit once accepted - Added conditions to the accept/reject commands so tab/esc works outside of NEP context. --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Co-authored-by: aws-toolkit-automation <> Co-authored-by: atontb <[email protected]> Co-authored-by: 🥩 Flora <[email protected]>
1 parent c2f46d3 commit 43ddb97

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

packages/amazonq/src/app/inline/EditRendering/displayImage.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
* SPDX-License-Identifier: Apache-2.0
44
*/
55

6-
import { getLogger, setContext } from 'aws-core-vscode/shared'
76
import { getLogger, setContext } from 'aws-core-vscode/shared'
87
import * as vscode from 'vscode'
98
import { diffLines } from 'diff'
@@ -262,18 +261,9 @@ export async function displaySvgDecoration(
262261
// Calculate cursor position before replacing content
263262
const endPosition = getEndOfEditPosition(originalCode, newCode)
264263

265-
// Replace content
266-
267-
// Calculate cursor position before replacing content
268-
const endPosition = getEndOfEditPosition(originalCode, newCode)
269-
270264
// Replace content
271265
replaceEditorContent(editor, newCode)
272266

273-
// Move cursor to end of the actual changed content
274-
editor.selection = new vscode.Selection(endPosition, endPosition)
275-
276-
277267
// Move cursor to end of the actual changed content
278268
editor.selection = new vscode.Selection(endPosition, endPosition)
279269

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ describe('RecommendationService', () => {
275275
const options = { showUi: true }
276276

277277
// Stub the UI methods to avoid errors
278-
sandbox.stub(activeStateController, 'showGenerating').resolves()
278+
// const showGeneratingStub = sandbox.stub(activeStateController, 'showGenerating').resolves()
279279
const hideGeneratingStub = sandbox.stub(activeStateController, 'hideGenerating')
280280

281281
// Temporarily replace console.error with a no-op function to prevent test failure

0 commit comments

Comments
 (0)