Skip to content

Commit c555f1c

Browse files
authored
Merge master into feature/q-region-expansion
2 parents bab1a70 + 14c269a commit c555f1c

File tree

127 files changed

+8755
-6424
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

127 files changed

+8755
-6424
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,6 +439,7 @@ Example:
439439
"supportedVersions": "4.0.0",
440440
"id": "AmazonQ",
441441
"path": "/custom/path/to/local/lsp/folder",
442+
"ui": "/custom/path/to/chat-client/ui"
442443
}
443444
```
444445

@@ -503,11 +504,12 @@ Unlike the user setting overrides, not all of these environment variables have t
503504
- `__AMAZONQLSP_MANIFEST_URL`: for aws.dev.amazonqLsp.manifestUrl
504505
- `__AMAZONQLSP_SUPPORTED_VERSIONS`: for aws.dev.amazonqLsp.supportedVersions
505506
- `__AMAZONQLSP_ID`: for aws.dev.amazonqLsp.id
506-
- `__AMAZONQLSP_PATH`: for aws.dev.amazonqWorkspaceLsp.locationOverride
507+
- `__AMAZONQLSP_PATH`: for aws.dev.amazonqLsp.path
508+
- `__AMAZONQLSP_UI`: for aws.dev.amazonqLsp.ui
507509
- `__AMAZONQWORKSPACELSP_MANIFEST_URL`: for aws.dev.amazonqWorkspaceLsp.manifestUrl
508510
- `__AMAZONQWORKSPACELSP_SUPPORTED_VERSIONS`: for aws.dev.amazonqWorkspaceLsp.supportedVersions
509511
- `__AMAZONQWORKSPACELSP_ID`: for aws.dev.amazonqWorkspaceLsp.id
510-
- `__AMAZONQWORKSPACELSP_PATH`: for aws.dev.amazonqWorkspaceLsp.locationOverride
512+
- `__AMAZONQWORKSPACELSP_PATH`: for aws.dev.amazonqWorkspaceLsp.path
511513

512514
#### Lambda
513515

docs/lsp.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,17 @@ sequenceDiagram
4545
npm run package
4646
```
4747
to get the project setup
48-
3. Uncomment the `__AMAZONQLSP_PATH` variable in `amazonq/.vscode/launch.json` Extension configuration
49-
4. Use the `Launch LSP with Debugging` configuration and set breakpoints in VSCode or the language server
48+
3. Enable the lsp experiment:
49+
```
50+
"aws.experiments": {
51+
"amazonqLSP": true,
52+
"amazonqLSPInline": true, // optional: enables inline completion from flare
53+
"amazonqLSPChat": true // optional: enables chat from flare
54+
}
55+
```
56+
4. Uncomment the `__AMAZONQLSP_PATH` variable in `amazonq/.vscode/launch.json` Extension configuration
57+
1. Uncomment the `__AMAZONQLSP_UI` variable in `amazonq/.vscode/launch.json` Extension configuration if you want to debug the flare chat-client as well
58+
5. Use the `Launch LSP with Debugging` configuration and set breakpoints in VSCode or the language server
5059
5160
## Amazon Q Inline Activation
5261

package-lock.json

Lines changed: 2684 additions & 2335 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"newChange": "echo 'Must specify subproject/workspace with -w packages/<subproject>' && false",
3434
"createRelease": "echo 'Must specify subproject/workspace with -w packages/<subproject>' && false",
3535
"lint": "npm run lint -w packages/ --if-present",
36-
"lintfix": "eslint -c .eslintrc.js --ignore-path .gitignore --ignore-pattern '**/*.json' --ignore-pattern '**/*.gen.ts' --ignore-pattern '**/types/*.d.ts' --ignore-pattern '**/src/testFixtures/**' --ignore-pattern '**/resources/js/graphStateMachine.js' --fix --ext .ts packages plugins",
36+
"lintfix": "eslint -c .eslintrc.js --ignore-path .gitignore --ignore-pattern '**/*.json' --ignore-pattern '**/*.gen.ts' --ignore-pattern '**/types/*.d.ts' --ignore-pattern '**/src/testFixtures/**' --fix --ext .ts packages plugins",
3737
"clean": "npm run clean -w packages/ -w plugins/",
3838
"reset": "npm run clean && ts-node ./scripts/clean.ts node_modules && npm install",
3939
"generateNonCodeFiles": "npm run generateNonCodeFiles -w packages/ --if-present",
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
{
2+
"date": "2025-04-03",
3+
"version": "1.54.0",
4+
"entries": [
5+
{
6+
"type": "Bug Fix",
7+
"description": "Amazon Q chat: `@prompts` not added to context"
8+
},
9+
{
10+
"type": "Feature",
11+
"description": "Amazon Q chat: View and search chat history"
12+
},
13+
{
14+
"type": "Feature",
15+
"description": "SageMaker Unified Studio: Disable Sign out"
16+
},
17+
{
18+
"type": "Feature",
19+
"description": "SageMaker Unified Studio: Update Q Chat Introduction message"
20+
},
21+
{
22+
"type": "Feature",
23+
"description": "/review: automatically generate fix without clicking Generate Fix button"
24+
},
25+
{
26+
"type": "Feature",
27+
"description": "Amazon Q chat: Automatically persist chats between IDE sessions"
28+
},
29+
{
30+
"type": "Feature",
31+
"description": "Save user command execution logs to plugin output."
32+
},
33+
{
34+
"type": "Feature",
35+
"description": "Amazon Q chat: Code blocks in chat messages have a max-height of 21 lines and can be scrolled inside"
36+
}
37+
]
38+
}

packages/amazonq/.vscode/launch.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"SSMDOCUMENT_LANGUAGESERVER_PORT": "6010",
1616
"WEBPACK_DEVELOPER_SERVER": "http://localhost:8080"
1717
// "__AMAZONQLSP_PATH": "${workspaceFolder}/../../../language-servers/app/aws-lsp-codewhisperer-runtimes/out/token-standalone.js",
18+
// "__AMAZONQLSP_UI": "${workspaceFolder}/../../../language-servers/chat-client/build/amazonq-ui.js"
1819
},
1920
"envFile": "${workspaceFolder}/.local.env",
2021
"outFiles": ["${workspaceFolder}/dist/**/*.js", "${workspaceFolder}/../core/dist/**/*.js"],

packages/amazonq/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
## 1.54.0 2025-04-03
2+
3+
- **Bug Fix** Amazon Q chat: `@prompts` not added to context
4+
- **Feature** Amazon Q chat: View and search chat history
5+
- **Feature** SageMaker Unified Studio: Disable Sign out
6+
- **Feature** SageMaker Unified Studio: Update Q Chat Introduction message
7+
- **Feature** /review: automatically generate fix without clicking Generate Fix button
8+
- **Feature** Amazon Q chat: Automatically persist chats between IDE sessions
9+
- **Feature** Save user command execution logs to plugin output.
10+
- **Feature** Amazon Q chat: Code blocks in chat messages have a max-height of 21 lines and can be scrolled inside
11+
112
## 1.53.0 2025-03-28
213

314
- **Bug Fix** Amazon Q Chat: Choosing a nested subfolder for `/doc` on Windows results in `The folder you chose did not contain any source files` error

packages/amazonq/package.json

Lines changed: 11 additions & 3 deletions
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 building, operating, and transforming software, with advanced capabilities for managing data and AI",
5-
"version": "1.54.0-SNAPSHOT",
5+
"version": "1.55.0-SNAPSHOT",
66
"extensionKind": [
77
"workspace"
88
],
@@ -119,6 +119,14 @@
119119
"ssoCacheError": {
120120
"type": "boolean",
121121
"default": false
122+
},
123+
"amazonQLspManifestMessage": {
124+
"type": "boolean",
125+
"default": false
126+
},
127+
"amazonQWorkspaceLspManifestMessage": {
128+
"type": "boolean",
129+
"default": false
122130
}
123131
},
124132
"additionalProperties": false
@@ -356,7 +364,7 @@
356364
},
357365
{
358366
"command": "aws.amazonq.signout",
359-
"when": "(view == aws.amazonq.AmazonQChatView) && aws.codewhisperer.connected",
367+
"when": "(view == aws.amazonq.AmazonQChatView) && aws.codewhisperer.connected && !aws.isSageMakerUnifiedStudio",
360368
"group": "2_amazonQ@4"
361369
},
362370
{
@@ -638,7 +646,7 @@
638646
"title": "%AWS.command.codewhisperer.signout%",
639647
"category": "%AWS.amazonq.title%",
640648
"icon": "$(debug-disconnect)",
641-
"enablement": "aws.codewhisperer.connected"
649+
"enablement": "aws.codewhisperer.connected && !aws.isSageMakerUnifiedStudio"
642650
},
643651
{
644652
"command": "aws.amazonq.learnMore",

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import {
2929
ReferenceHoverProvider,
3030
ReferenceInlineProvider,
3131
ReferenceLogViewProvider,
32+
ImportAdderProvider,
3233
} from 'aws-core-vscode/codewhisperer'
3334

3435
export class InlineCompletionManager implements Disposable {
@@ -66,6 +67,7 @@ export class InlineCompletionManager implements Disposable {
6667
item: InlineCompletionItemWithReferences,
6768
editor: TextEditor,
6869
requestStartTime: number,
70+
startLine: number,
6971
firstCompletionDisplayLatency?: number
7072
) => {
7173
// TODO: also log the seen state for other suggestions in session
@@ -96,6 +98,9 @@ export class InlineCompletionManager implements Disposable {
9698
ReferenceLogViewProvider.instance.addReferenceLog(referenceLog)
9799
ReferenceHoverProvider.instance.addCodeReferences(item.insertText as string, item.references)
98100
}
101+
if (item.mostRelevantMissingImports?.length) {
102+
await ImportAdderProvider.instance.onAcceptRecommendation(editor, item, startLine)
103+
}
99104
}
100105
commands.registerCommand('aws.amazonq.acceptInline', onInlineAcceptance)
101106

@@ -200,6 +205,7 @@ export class AmazonQInlineCompletionItemProvider implements InlineCompletionItem
200205
item,
201206
editor,
202207
session.requestStartTime,
208+
position.line,
203209
session.firstCompletionDisplayLatency,
204210
],
205211
}
@@ -208,6 +214,7 @@ export class AmazonQInlineCompletionItemProvider implements InlineCompletionItem
208214
item.insertText as string,
209215
item.references
210216
)
217+
ImportAdderProvider.instance.onShowRecommendation(document, position.line, item)
211218
}
212219
return items as InlineCompletionItem[]
213220
}

packages/amazonq/src/extension.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ import {
3232
setupUninstallHandler,
3333
maybeShowMinVscodeWarning,
3434
Experiments,
35+
isSageMaker,
3536
} from 'aws-core-vscode/shared'
3637
import { ExtStartUpSources } from 'aws-core-vscode/telemetry'
3738
import { VSCODE_EXTENSION_ID } from 'aws-core-vscode/utils'
@@ -120,7 +121,9 @@ export async function activateAmazonQCommon(context: vscode.ExtensionContext, is
120121
await activateCodeWhisperer(extContext as ExtContext)
121122
if (Experiments.instance.get('amazonqLSP', false)) {
122123
await activateAmazonqLsp(context)
123-
} else {
124+
}
125+
126+
if (!Experiments.instance.get('amazonqLSPInline', false)) {
124127
await activateInlineCompletion()
125128
}
126129

@@ -144,6 +147,9 @@ export async function activateAmazonQCommon(context: vscode.ExtensionContext, is
144147
// Hide the Amazon Q tree in toolkit explorer
145148
await setContext('aws.toolkit.amazonq.dismissed', true)
146149

150+
// set context var to check if its SageMaker Unified Studio or not
151+
await setContext('aws.isSageMakerUnifiedStudio', isSageMaker('SMUS'))
152+
147153
// reload webviews
148154
await vscode.commands.executeCommand('workbench.action.webview.reloadWebviewAction')
149155

@@ -157,7 +163,7 @@ export async function activateAmazonQCommon(context: vscode.ExtensionContext, is
157163

158164
context.subscriptions.push(
159165
Experiments.instance.onDidChange(async (event) => {
160-
if (event.key === 'amazonqLSP' || event.key === 'amazonqChatLSP') {
166+
if (event.key === 'amazonqLSP' || event.key === 'amazonqChatLSP' || event.key === 'amazonqLSPInline') {
161167
await vscode.window
162168
.showInformationMessage(
163169
'Amazon Q LSP setting has changed. Reload VS Code for the changes to take effect.',

0 commit comments

Comments
 (0)