Skip to content

Commit dc378a5

Browse files
laileni-awsjguoamztsmithszctlai95suprajaven
authored
Merge remote-tracking branch 'upstream/main' into agentic-mcp (#1318)
* fix: update listDirectory tool to output in tree-like format to reduce toolSize (#1260) * fix: clear history for `inputTooLong` errors (#1268) * fix: errors/cancellation not resetting undoAll state (#1273) * fix: errors/cancellation not resetting undoAll state * test: add unit tests * test: update test * style: revert formatting change * feat: adding a check before invoking workspace context (#1227) Co-authored-by: Supraja Venkatesh <[email protected]> * fix: improve data synchronization of server side workspace context (#1278) * fix: improve data synchronization of server side workspace context * fix: adding catch to snapshotWorkspace call --------- Co-authored-by: Weitao Wang <[email protected]> Co-authored-by: Paras <[email protected]> * chore: update netTransform unsupportedViewComponents * chore(release): release packages from branch main * fix: update versions manually (release-please bug) * fix: use the correct command name for testing bundles (#1280) * fix: use the correct command name for testing bundles * chore: change return type to pipe to see if more logs can be available --------- Co-authored-by: Paras <[email protected]> * fix: regex should match workspace text in bold style and startLine can be 0 (#1272) * fix: regex should match workspace text in bold style and startLine can be 0 * fix: remove unintended debug lines * fix: abandon requests with invalid toolResults (#1274) * fix: prevent timeout messages from displaying (#1282) * fix: set streamingClient timeout config (#1283) * fix: filter out .git folder from listDirectory (#1286) * fix: add requestId to chat for QModelResponse errors (#1284) * fix: add more common ignore patterns for listDirectory (#1287) * fix: wrap load chats on ready in try-catch (#1289) Problem Currently when the chat loads up a UI ready event is sent to the lsp, to load up previous chats and start indexing. If loading of previous chats fail, the LSP process crashes. This is particularly evident when openTab event has not been handled by the client. An error in that flow should not crash the LSP process or block the rest of the indexing from continuing. Solution This change surrounds the load chat logic within a try catch of its own to allow the rest of the indexing logic to proceed and not crash the server process * fix: stop chat response first when close tab (#1292) * fix: undo buttom not dimmed the card (#1276) * fix: undo buttom not dimmed the card * fix: fix more regression case for reject * fix: permission check ux changes (#1290) * fix: permission ux * fix: minor edits * fix: address bugs impacting indexing disabled functionality (#1293) * fix(amazonq): add codewhispererCustomizationArn to codewhisperer_perceivedLatency (#1285) ## Problem events between vscode and flare are not aligned ## Solution add codewhispererCustomizationArn * fix: show tooltip for warning message and remove the warning text (#1259) * fix: add tooltip for warning message * fix: fix the string * fix: add enum * fix: remove numbers * fix: the icon for different category icon and reject button * fix: add visibleName property to fix empty directory name when the directory ends with a slash (#1302) * fix: add visibleName property to fix empty directory name when the directory ends with a slash * fix: format --------- Co-authored-by: Francesco Piccoli <[email protected]> * chore: bump mynah-ui version (#1303) Co-authored-by: Francesco Piccoli <[email protected]> * chore(release): release packages from branch main (#1279) * chore(release): release packages from branch main * fix: update versions manually (release-please bug) --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Francesco Piccoli <[email protected]> * feat: merge updates for inline completions (#1299) * fix: stop buttom work expected (#1307) * fix: allowing reading multiple files with fsRead, minor tool validation fix (#1297) * fix: bug fix for exportResultsArchive to call with profileArn as parameter (#1300) * fix: for exportResultsArchive to call with profileArn --------- Co-authored-by: Pranav Firake <[email protected]> * chore: refactor common customization logic to a function and update corresponding CONTRIBUTION.md (#1281) Co-authored-by: Paras <[email protected]> * fix: remove @ mention in placeholder q chat text if agentic mode not available (#1311) * fix: remove @ mention in placeholder q chat text if agentic mode not available * style: rename DEFAULT_TAB_DATA to getDefaultTabConfig --------- Co-authored-by: Francesco Piccoli <[email protected]> * chore: update netTransform unsupportedViewComponents (#1306) * chore: update netTransform unsupportedViewComponents * chore: update netTransform unsupportedViewComponents * feat: add userWrittenCodeTracker (#1308) * feat: add userWrittenCodeTracker * fix: add unit test * fix: bug in skip edit for userWrittenCode (#1315) --------- Co-authored-by: Jason Guo <[email protected]> Co-authored-by: tsmithsz <[email protected]> Co-authored-by: Tai Lai <[email protected]> Co-authored-by: suprajaven <[email protected]> Co-authored-by: Supraja Venkatesh <[email protected]> Co-authored-by: Ivan <[email protected]> Co-authored-by: Weitao Wang <[email protected]> Co-authored-by: Paras <[email protected]> Co-authored-by: Jiayu Wang <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Ivan Mykhailovskyi <[email protected]> Co-authored-by: pras0131 <[email protected]> Co-authored-by: andrewyuq <[email protected]> Co-authored-by: Shruti Sinha <[email protected]> Co-authored-by: Na Yue <[email protected]> Co-authored-by: Randall-Jiang <[email protected]> Co-authored-by: Nicolas <[email protected]> Co-authored-by: Josh Pinkney <[email protected]> Co-authored-by: Francesco Piccoli <[email protected]> Co-authored-by: Francesco Piccoli <[email protected]> Co-authored-by: Zoe Lin <[email protected]> Co-authored-by: Pranav Firake <[email protected]> Co-authored-by: Pranav Firake <[email protected]> Co-authored-by: JiayuW2 <[email protected]>
1 parent 79624fe commit dc378a5

File tree

74 files changed

+2331
-566
lines changed

Some content is hidden

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

74 files changed

+2331
-566
lines changed

.github/workflows/lsp-ci.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
npm run package
4242
- name: Test bundles
4343
run: |
44-
npm run test:bundles --workspaces --if-present
44+
npm run test-bundles --workspaces --if-present
4545
- name: Attach bundles
4646
uses: actions/upload-artifact@v4
4747
with:
@@ -82,7 +82,7 @@ jobs:
8282
npm run package
8383
- name: Test bundles
8484
run: |
85-
npm run test:bundles --workspaces --if-present
85+
npm run test-bundles --workspaces --if-present
8686
- name: Attach bundles
8787
uses: actions/upload-artifact@v4
8888
with:

.release-please-manifest.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"chat-client": "0.1.7",
3-
"core/aws-lsp-core": "0.0.5",
4-
"server/aws-lsp-antlr4": "0.1.5",
5-
"server/aws-lsp-codewhisperer": "0.0.35",
6-
"server/aws-lsp-json": "0.1.5",
2+
"chat-client": "0.1.9",
3+
"core/aws-lsp-core": "0.0.7",
4+
"server/aws-lsp-antlr4": "0.1.7",
5+
"server/aws-lsp-codewhisperer": "0.0.37",
6+
"server/aws-lsp-json": "0.1.7",
77
"server/aws-lsp-partiql": "0.0.8",
8-
"server/aws-lsp-yaml": "0.1.5"
8+
"server/aws-lsp-yaml": "0.1.7"
99
}

CONTRIBUTING.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,20 @@ npm link @aws/language-server-runtimes @aws/language-server-runtimes-types &&
431431
npm run compile -- --force
432432
```
433433

434+
### Customization
435+
#### Single Profile Customizations
436+
To request customization information for a selected developer profile, use the `aws/getConfigurationFromServer` LSP extension with the section field set to `aws.q.customizations`.
437+
438+
#### Multiple Profile Customizations
439+
To request customization information for all valid developer profiles, use the same `aws/getConfigurationFromServer` LSP extension. However, this requires setting the following initialization parameters in the client:
440+
1. `initializationOptions.aws.awsClientCapabilities.q.customizationsWithMetadata`
441+
2. `initializationOptions.aws.awsClientCapabilities.q.developerProfiles`
442+
443+
Both the above-mentioned fields must be set to true.
444+
445+
#### Testing Customizations
446+
When testing customizations with the minimal VSCode extension, set the `ENABLE_CUSTOMIZATIONS_WITH_METADATA` environment variable to `true` in your launch configuration.
447+
434448
### Endpoint and region override
435449
It is possible to override the default region and default endpoint utilized by the AWS SDK clients (e.g. for the Q developer backend api endpoint) when building the capabilities servers.
436450

app/aws-lsp-codewhisperer-runtimes/scripts/test-bundles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function testBundle(bundlePath) {
88
let startupTimeout
99

1010
const serverProcess = spawn('node', [bundlePath, '--stdio'], {
11-
stdio: 'inherit',
11+
stdio: 'pipe',
1212
shell: true,
1313
})
1414

chat-client/CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,27 @@
11
# Changelog
22

3+
## [0.1.9](https://github.com/aws/language-servers/compare/chat-client/v0.1.8...chat-client/v0.1.9) (2025-05-09)
4+
5+
6+
### Bug Fixes
7+
8+
* add visibleName property to fix empty directory name when the directory ends with a slash ([#1302](https://github.com/aws/language-servers/issues/1302)) ([f6d573c](https://github.com/aws/language-servers/commit/f6d573cc8e6b23cfdcfd9baa5a5c8e705579b23c))
9+
* fix for status duplicates for permission checks ([#1237](https://github.com/aws/language-servers/issues/1237)) ([a77949a](https://github.com/aws/language-servers/commit/a77949a482cd352ebc5c7eeebb1468a052a5496d))
10+
* permission check ux changes ([#1290](https://github.com/aws/language-servers/issues/1290)) ([170113f](https://github.com/aws/language-servers/commit/170113f97eccf7827cfc72da33d9dc9c7e4afb3f))
11+
* prefix if user reject/stop command, whole card should be dimmed ([#1212](https://github.com/aws/language-servers/issues/1212)) ([394db61](https://github.com/aws/language-servers/commit/394db61133e09cfaeff2f7510ab60c571c562130))
12+
* stop button showing in non-agentic chat ([#1230](https://github.com/aws/language-servers/issues/1230)) ([5c1b6c2](https://github.com/aws/language-servers/commit/5c1b6c2ed992befca03120635a23b4aa8cda5ebf))
13+
* stop chat response first when close tab ([#1292](https://github.com/aws/language-servers/issues/1292)) ([3733b43](https://github.com/aws/language-servers/commit/3733b433a771ece77ae83f55c8e8e3bd13dcd96b))
14+
* undo buttom not dimmed the card ([#1276](https://github.com/aws/language-servers/issues/1276)) ([49bd9c9](https://github.com/aws/language-servers/commit/49bd9c95d8f9213fe878720a20c13d8f045778ee))
15+
16+
## [0.1.8](https://github.com/aws/language-servers/compare/chat-client/v0.1.7...chat-client/v0.1.8) (2025-05-07)
17+
18+
19+
### Bug Fixes
20+
21+
* fix for status duplicates for permission checks ([#1237](https://github.com/aws/language-servers/issues/1237)) ([a77949a](https://github.com/aws/language-servers/commit/a77949a482cd352ebc5c7eeebb1468a052a5496d))
22+
* prefix if user reject/stop command, whole card should be dimmed ([#1212](https://github.com/aws/language-servers/issues/1212)) ([394db61](https://github.com/aws/language-servers/commit/394db61133e09cfaeff2f7510ab60c571c562130))
23+
* stop button showing in non-agentic chat ([#1230](https://github.com/aws/language-servers/issues/1230)) ([5c1b6c2](https://github.com/aws/language-servers/commit/5c1b6c2ed992befca03120635a23b4aa8cda5ebf))
24+
325
## [0.1.7](https://github.com/aws/language-servers/compare/chat-client/v0.1.6...chat-client/v0.1.7) (2025-05-06)
426

527

chat-client/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aws/chat-client",
3-
"version": "0.1.7",
3+
"version": "0.1.9",
44
"description": "AWS Chat Client",
55
"main": "out/index.js",
66
"repository": {
@@ -23,7 +23,7 @@
2323
"dependencies": {
2424
"@aws/chat-client-ui-types": "^0.1.32",
2525
"@aws/language-server-runtimes-types": "^0.1.25",
26-
"@aws/mynah-ui": "^4.34.0"
26+
"@aws/mynah-ui": "^4.34.1"
2727
},
2828
"devDependencies": {
2929
"@types/jsdom": "^21.1.6",

chat-client/src/client/chat.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -91,11 +91,13 @@ import { TabFactory } from './tabs/tabFactory'
9191
import { ChatClientAdapter } from '../contracts/chatClientAdapter'
9292
import { toMynahContextCommand, toMynahIcon } from './utils'
9393

94-
const DEFAULT_TAB_DATA = {
95-
tabTitle: 'Chat',
96-
promptInputInfo:
97-
'Amazon Q Developer uses generative AI. You may need to verify responses. See the [AWS Responsible AI Policy](https://aws.amazon.com/machine-learning/responsible-ai/policy/).',
98-
promptInputPlaceholder: 'Ask a question. Use @ to add context, / for quick actions',
94+
const getDefaultTabConfig = (agenticMode?: Boolean) => {
95+
return {
96+
tabTitle: 'Chat',
97+
promptInputInfo:
98+
'Amazon Q Developer uses generative AI. You may need to verify responses. See the [AWS Responsible AI Policy](https://aws.amazon.com/machine-learning/responsible-ai/policy/).',
99+
promptInputPlaceholder: `Ask a question. Use${agenticMode ? ' @ to add context,' : ''} / for quick actions`,
100+
}
99101
}
100102

101103
type ChatClientConfig = Pick<MynahUIDataModel, 'quickActionCommands'> & {
@@ -374,7 +376,7 @@ export const createChat = (
374376
}
375377

376378
const messager = new Messager(chatApi)
377-
const tabFactory = new TabFactory(DEFAULT_TAB_DATA, [
379+
const tabFactory = new TabFactory(getDefaultTabConfig(config?.agenticMode), [
378380
...(config?.quickActionCommands ? config.quickActionCommands : []),
379381
])
380382

chat-client/src/client/mynahUi.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ export const createMynahUi = (
269269
messager.onTabAdd(tabId)
270270
},
271271
onTabRemove: (tabId: string) => {
272+
messager.onStopChatResponse(tabId)
272273
messager.onTabRemove(tabId)
273274
},
274275
onTabChange: (tabId: string) => {
@@ -873,7 +874,7 @@ export const createMynahUi = (
873874
}
874875
}
875876
if (!isPartialResult) {
876-
if (processedHeader) {
877+
if (processedHeader && processedHeader.status?.status !== 'error') {
877878
processedHeader.status = undefined
878879
}
879880
}
@@ -898,7 +899,8 @@ export const createMynahUi = (
898899
const contentHorizontalAlignment: ChatItem['contentHorizontalAlignment'] =
899900
message.type === 'directive' && message.messageId?.startsWith('stopped') ? 'center' : undefined
900901

901-
const shouldMute = message.header?.status?.text === 'Stopped' || message.header?.status?.text === 'Rejected'
902+
// If message.header?.status?.text is Stopped or Rejected or Ignored or Completed etc.. card should be in disabled state.
903+
const shouldMute = message.header?.status?.text !== undefined
902904

903905
return {
904906
body: message.body,

chat-client/src/client/utils.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ export function toMynahFileList(fileList: ChatMessage['fileList']): ChatItemCont
4040
)
4141
.join(', ') || '',
4242
description: fileDetails.description,
43+
visibleName:
44+
filePath.split('/').filter(Boolean).pop() || filePath.split('/').slice(-2, -1)[0] || filePath,
4345
clickable: true,
4446
data: {
4547
fullPath: fileDetails.fullPath || '',

client/vscode/src/inlineCompletionActivation.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ export const CodewhispererInlineCompletionLanguages = [
4141
{ scheme: 'file', language: 'scala' },
4242
{ scheme: 'file', language: 'vue' },
4343
{ scheme: 'file', language: 'csharp' },
44+
{ scheme: 'file', language: 'c' },
45+
{ scheme: 'file', language: 'cpp' },
46+
{ scheme: 'file', language: 'python' },
47+
{ scheme: 'file', language: 'sql' },
48+
{ scheme: 'file', language: 'jsx' },
49+
{ scheme: 'file', language: 'tsx' },
4450
]
4551

4652
export function registerInlineCompletion(languageClient: LanguageClient) {

0 commit comments

Comments
 (0)