Skip to content

Commit 8c5666b

Browse files
authored
Merge branch 'feature/editable_diffview' into feature/editable_diffview
2 parents 83d81f7 + dcbac30 commit 8c5666b

File tree

17 files changed

+89
-714
lines changed

17 files changed

+89
-714
lines changed

docs/lsp.md

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,26 +77,60 @@ If you want to connect a local version of language-server-runtimes to aws-toolki
7777
/toolkit
7878
/core
7979
/amazonq
80+
/language-servers
8081
/language-server-runtimes
8182
```
8283
8384
2. Inside of the language-server-runtimes project run:
85+
8486
```
8587
npm install
8688
npm run compile
8789
cd runtimes
8890
npm run prepub
8991
cd out
92+
```
93+
94+
If you get an error running `npm run prepub`, you can instead run `npm run prepub:copyFiles` to skip cleaning and testing.
95+
96+
3. Choose one of the following approaches:
97+
98+
### Option A: Using npm pack (Recommended)
99+
100+
3a. Create a package file:
101+
102+
npm pack
103+
104+
You will see a file created like this: `aws-language-server-runtimes-0.*.*.tgz`
105+
106+
4a. Inside of language-servers, find the package where you need the change.
107+
108+
For example, if you would like the change in `language-servers/app/aws-lsp-codewhisperer-runtimes`, you would run:
109+
110+
cd language-servers/app/aws-lsp-codewhisperer-runtimes
111+
112+
npm install ../../../language-server-runtimes/runtimes/out/aws-language-server-runtimes-0.*.*.tgz
113+
114+
npm run compile
115+
116+
5a. If you need the change in aws-toolkit-vscode run:
117+
118+
cd aws-toolkit-vscode
119+
120+
npm install ../language-server-runtimes/runtimes/out/aws-language-server-runtimes-0.*.*.tgz
121+
122+
### Option B: Using npm link (Alternative)
123+
124+
3b. Create npm links:
125+
90126
npm link
91127
cd ../../types
92128
npm link
93-
```
94-
If you get an error running `npm run prepub`, you can instead run `npm run prepub:copyFiles` to skip cleaning and testing.
95-
3. Inside of aws-toolkit-vscode run:
96-
```
129+
130+
4b. Inside of aws-toolkit-vscode run:
131+
97132
npm install
98133
npm link @aws/language-server-runtimes @aws/language-server-runtimes-types
99-
```
100134
101135
## Amazon Q Inline Activation
102136

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"date": "2025-08-15",
3+
"version": "1.90.0",
4+
"entries": []
5+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Feature",
3+
"description": "Amazon Q supports admin control for MCP servers to restrict MCP server usage"
4+
}

packages/amazonq/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.90.0 2025-08-15
2+
3+
- Miscellaneous non-user-facing changes
4+
15
## 1.89.0 2025-08-13
26

37
- Miscellaneous non-user-facing changes

packages/amazonq/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "amazon-q-vscode",
33
"displayName": "Amazon Q",
44
"description": "The most capable generative AI–powered assistant for software development.",
5-
"version": "1.90.0-SNAPSHOT",
5+
"version": "1.91.0-SNAPSHOT",
66
"extensionKind": [
77
"workspace"
88
],
@@ -219,6 +219,11 @@
219219
"markdownDescription": "%AWS.configuration.description.amazonq.proxy.certificateAuthority%",
220220
"default": null,
221221
"scope": "application"
222+
},
223+
"amazonQ.proxy.enableProxyAndCertificateAutoDiscovery": {
224+
"type": "boolean",
225+
"markdownDescription": "%AWS.configuration.description.amazonq.proxy.enableProxyAndCertificateAutoDiscovery%",
226+
"default": true
222227
}
223228
}
224229
},

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

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ export const emptyDiffSvg = {
1818
originalCodeHighlightRange: [],
1919
}
2020

21+
const defaultLineHighlightLength = 4
22+
2123
export class SvgGenerationService {
2224
/**
2325
* Generates an SVG image representing a code diff
@@ -431,8 +433,12 @@ export class SvgGenerationService {
431433
for (let lineIndex = 0; lineIndex < originalCode.length; lineIndex++) {
432434
const line = originalCode[lineIndex]
433435

436+
/**
437+
* If [line] is an empty line or only contains whitespace char, [diffWordsWithSpace] will say it's not an "remove", i.e. [part.removed] will be undefined,
438+
* therefore the deletion will not be highlighted. Thus fallback this scenario to highlight the entire line
439+
*/
434440
// If line exists in modifiedLines as a key, process character diffs
435-
if (Array.from(modifiedLines.keys()).includes(line)) {
441+
if (Array.from(modifiedLines.keys()).includes(line) && line.trim().length > 0) {
436442
const modifiedLine = modifiedLines.get(line)!
437443
const changes = diffWordsWithSpace(line, modifiedLine)
438444

@@ -455,7 +461,7 @@ export class SvgGenerationService {
455461
originalRanges.push({
456462
line: lineIndex,
457463
start: 0,
458-
end: line.length,
464+
end: line.length ?? defaultLineHighlightLength,
459465
})
460466
}
461467
}

packages/amazonq/src/app/inline/activation.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import {
99
CodeWhispererConstants,
1010
isInlineCompletionEnabled,
1111
runtimeLanguageContext,
12-
TelemetryHelper,
1312
UserWrittenCodeTracker,
1413
vsCodeState,
1514
} from 'aws-core-vscode/codewhisperer'
@@ -52,11 +51,6 @@ export async function activate() {
5251
return
5352
}
5453

55-
if (vsCodeState.lastUserModificationTime) {
56-
TelemetryHelper.instance.setTimeSinceLastModification(
57-
performance.now() - vsCodeState.lastUserModificationTime
58-
)
59-
}
6054
vsCodeState.lastUserModificationTime = performance.now()
6155
/**
6256
* Important: Doing this sleep(10) is to make sure

packages/amazonq/src/app/inline/completion.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,9 @@ export class AmazonQInlineCompletionItemProvider implements InlineCompletionItem
391391
}
392392
this.languageClient.sendNotification(this.logSessionResultMessageName, params)
393393
this.sessionManager.clear()
394+
// Do not make auto trigger if user rejects a suggestion
395+
// by typing characters that does not match
396+
return []
394397
}
395398

396399
// tell the tutorial that completions has been triggered

packages/amazonq/src/lsp/client.ts

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

6-
import vscode from 'vscode'
6+
import vscode, { version } from 'vscode'
77
import * as nls from 'vscode-nls'
88
import { LanguageClient, LanguageClientOptions, RequestType, State } from 'vscode-languageclient'
99
import { InlineCompletionManager } from '../app/inline/completion'
@@ -165,7 +165,7 @@ export async function startLanguageServer(
165165
aws: {
166166
clientInfo: {
167167
name: getClientName(),
168-
version: extensionVersion,
168+
version: version,
169169
extension: {
170170
name: 'AmazonQ-For-VSCode',
171171
version: extensionVersion,

0 commit comments

Comments
 (0)