Skip to content

Commit aab4e59

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 <104926752+atonaamz@users.noreply.github.com> Co-authored-by: 🥩 Flora <floralph@amazon.com>
1 parent 824ab91 commit aab4e59

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
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'
@@ -291,22 +290,13 @@ export async function displaySvgDecoration(
291290
// Handle accept
292291
getLogger().info('Edit suggestion accepted')
293292

294-
// Replace content
295-
296-
// Calculate cursor position before replacing content
297-
const endPosition = getEndOfEditPosition(originalCode, newCode)
298-
299293
// Replace content
300294
replaceEditorContent(editor, newCode)
301295

302296
// Move cursor to end of the actual changed content
303297
const endPosition = getEndOfEditPosition(originalCode, newCode)
304298
editor.selection = new vscode.Selection(endPosition, endPosition)
305299

306-
// Move cursor to end of the actual changed content
307-
editor.selection = new vscode.Selection(endPosition, endPosition)
308-
309-
310300
// Move cursor to end of the actual changed content
311301
editor.selection = new vscode.Selection(endPosition, endPosition)
312302

0 commit comments

Comments
 (0)