Skip to content

Commit 6a0b987

Browse files
committed
Merge remote-tracking branch 'upstream/feature/agentic-chat' into my-feature-agentic
2 parents ce978c6 + 093d5bc commit 6a0b987

File tree

67 files changed

+1309
-436
lines changed

Some content is hidden

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

67 files changed

+1309
-436
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: 43 additions & 23 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Bug Fix",
3+
"description": "Amazon Q chat: `@prompts` not added to context"
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Feature",
3+
"description": "SageMaker Unified Studio: Disable Sign out"
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Feature",
3+
"description": "SageMaker Unified Studio: Update Q Chat Introduction message"
4+
}
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 chat: Code blocks in chat messages have a max-height of 21 lines and can be scrolled inside"
4+
}

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/package.json

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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
@@ -351,7 +359,7 @@
351359
},
352360
{
353361
"command": "aws.amazonq.signout",
354-
"when": "(view == aws.amazonq.AmazonQChatView) && aws.codewhisperer.connected",
362+
"when": "(view == aws.amazonq.AmazonQChatView) && aws.codewhisperer.connected && !aws.isSageMakerUnifiedStudio",
355363
"group": "2_amazonQ@4"
356364
},
357365
{
@@ -627,7 +635,7 @@
627635
"title": "%AWS.command.codewhisperer.signout%",
628636
"category": "%AWS.amazonq.title%",
629637
"icon": "$(debug-disconnect)",
630-
"enablement": "aws.codewhisperer.connected"
638+
"enablement": "aws.codewhisperer.connected && !aws.isSageMakerUnifiedStudio"
631639
},
632640
{
633641
"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
}

0 commit comments

Comments
 (0)