Skip to content

Commit 8bc318b

Browse files
laileni-awsjguoamztsmithszctlai95suprajaven
authored
Merge main to agentic-mcp branch (#1366)
* 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) * fix: update ignore pattern of glob for sspc (#1319) * chore: stub timeout (#1316) * fix: open initial tab using mynahUI defaults instead of waiting for ChatOptions (#1322) * fix: open initial tab using mynahUI defaults instead of waiting for ChatOptions * fix: push banner message to initial tab after chat options are received * fix: bump runtimes and fix broken test (#1323) * chore: bump runtimes version * fix: broken test after bumping runtimes --------- Co-authored-by: Francesco Piccoli <[email protected]> * feat(amazonq): telemetry for chat history and export (#1314) * fix: update fileSearch toolSpec and implementation (#1320) * fix: update fileSearch toolSpec and implementation * fix: update unit test * fix(amazonq): 500k max input limit in user input box. Align payload prompt with user typed prompt. (#1325) * fix: truncate userInputMessage to first 500k characters (#1327) * fix: truncate userInputMessage to 500k * fix: duplicate suggestion in inline response (#1331) * fix: welcome card shows everytime (#1332) * chore: script to create local build (#1301) * chore: script to create local build * fix: refactor custom webpack config to allow .node files to be created inside build directory add local-build script usage to package.json add README for local-build --------- Co-authored-by: Paras <[email protected]> * chore(release): release packages from branch main (#1305) * 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]> * chore: bump runtimes-types and chat-client-ui-types version to latest (#1333) Co-authored-by: Francesco Piccoli <[email protected]> * fix(amazonq): export q chat in windows not working due to invalid path (#1330) * fix(amazonq): export chat in Windows not working due to invalid path * chore: emit telemetry for inline chat result (#1131) * feat: change to emit STE event for inline chat action * chore: add support for emitting telemetry related to inlineChatResult * fix: fix merge conflict * chore: remove the unused imports from TelemetryService class --------- Co-authored-by: Paras <[email protected]> * refactor(amazonq): optimization: remove validation call for selected profile (#1329) * refactor(amazonq): optimization: only call listAvailableProfile with region associated with the arn * revert(amazonq): console.log * refactor(amazonq): stop validating profile availability on configurationChanged * fix(amazonq): fix typo * fix(amazonq): test * test(amazonq): amazonQTokenServiceManager.test.ts * refactor(amazonq): revert unneeded changes * refactor(amazonq): nit * refactor(amazonq): more nit * refactor(amazonq): fix test * refactor(amazonq): fix test * refactor(amazonq): nit * refactor(amazonq): revert unneeded changes * chore(release): release packages from branch main (#1334) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix: don't force commit-lint locally (#1337) Problem: Forcing commit-lint locally is very disruptive. Solution: Drop it. * fix: add requestIds for each LLM call for amazonq_addMessage metric (#1338) * fix: adding new telemetry metrics and addtional fields for existing metrics (#1341) * fix: adding new telemetry metrics and addtional fields for existing metrics * Minor edits * fix: failing tests * fix: adding agenticCodingMode to emitMessageResponseError metric * chore: bumping language server runtime versions (#1344) * feat: migrate inline completion telemetry to Flare (#1336) * feat: migrate inline completion telemetry to Flare * feat: migrate inline completion telemetry to Flare * chore: bump the typescript-eslint group with 2 updates (#1255) Bumps the typescript-eslint group with 2 updates: [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) and [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser). Updates `@typescript-eslint/eslint-plugin` from 8.31.0 to 8.31.1 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.31.1/packages/eslint-plugin) Updates `@typescript-eslint/parser` from 8.31.0 to 8.31.1 - [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases) - [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md) - [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v8.31.1/packages/parser) --- updated-dependencies: - dependency-name: "@typescript-eslint/eslint-plugin" dependency-version: 8.31.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: typescript-eslint - dependency-name: "@typescript-eslint/parser" dependency-version: 8.31.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: typescript-eslint ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * fix: adding error handling for export tab (#1350) Current export chat functionality doesn't properly handle user cancellation of the save dialog, leading to incorrect telemetry reporting and runs into errors. Solution Added proper handling of save dialog cancellation. Enhanced error handling to differentiate between user cancellation and other failure cases. Updated telemetry emission to accurately reflect the export operation outcome. * fix: add robust validation logic to fixHistory (#1340) * fix: Reduce perceived latency of fsWrite. Show fsWrite errors in the UX (#1351) * fix: reduce perceived latency * fix: only do render on partial results for fsWrite (#1354) * fix: re-categorize error status code (#1355) * chore: revert "chore: bump the typescript-eslint group with 2 updates (#1255)" (#1357) This reverts commit 140104a. * fix: convert RTS improperly formed request error to 500 (#1356) --------- Signed-off-by: dependabot[bot] <[email protected]> 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]> Co-authored-by: wweitao <[email protected]> Co-authored-by: Oksana Volodkevych <[email protected]> Co-authored-by: Viktor Shcherba <[email protected]> Co-authored-by: Avi Alpert <[email protected]> Co-authored-by: Lei Gao <[email protected]> Co-authored-by: Will Lo <[email protected]> Co-authored-by: Justin M. Keyes <[email protected]> Co-authored-by: chungjac <[email protected]> Co-authored-by: yzhangok <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Lokesh <[email protected]> Co-authored-by: Natalia Durlik <[email protected]>
1 parent c9933c1 commit 8bc318b

File tree

69 files changed

+2179
-541
lines changed

Some content is hidden

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

69 files changed

+2179
-541
lines changed

.husky/commit-msg

Lines changed: 0 additions & 3 deletions
This file was deleted.

.release-please-manifest.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
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",
7-
"server/aws-lsp-partiql": "0.0.8",
8-
"server/aws-lsp-yaml": "0.1.7"
2+
"chat-client": "0.1.10",
3+
"core/aws-lsp-core": "0.0.8",
4+
"server/aws-lsp-antlr4": "0.1.8",
5+
"server/aws-lsp-codewhisperer": "0.0.39",
6+
"server/aws-lsp-json": "0.1.8",
7+
"server/aws-lsp-partiql": "0.0.9",
8+
"server/aws-lsp-yaml": "0.1.8"
99
}

app/aws-lsp-codewhisperer-runtimes/README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,13 @@ or
2525
node ./out/iam-standalone.js --stdio
2626
```
2727

28+
### Creating packaged build for agent-standalone server and chat-client
29+
There is a single shortcut command to generate packaged build for the mentioned server and client without having to run multiple commands inside separate directories.
30+
This aims to ease the integration with the clients for testing purposes. The command has to run inside `app/aws-lsp-codewhisperer-runtimes` directory. Following is the command:
31+
```bash
32+
npm run local-build
33+
```
34+
2835
### Creating (new) bundle configurations
2936

3037
**It is important to note** that any configuration should atleast contain a variation of the [AmazonQServiceServer](https://github.com/aws/language-servers/blob/main/server/aws-lsp-codewhisperer/src/shared/amazonQServer.ts) (either IAM or Token). For standalone configurations, the
@@ -72,4 +79,4 @@ The server is managed via scripts/dev-server.js, which ensures:
7279
#### Tests configuration
7380
- Test settings are defined in `wdio.conf.ts`
7481
- The actual test implementation is in the `test/e2e` folder
75-
- Max timeout is 5 minutes (300000ms) to allow for the devhost to load the webpage with the bundled webworker which requires some time.
82+
- Max timeout is 5 minutes (300000ms) to allow for the devhost to load the webpage with the bundled webworker which requires some time.
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
var path = require('path')
2+
3+
const baseConfig = {
4+
mode: 'production',
5+
resolve: {
6+
extensions: ['.ts', '.tsx', '.js', '.node'],
7+
},
8+
module: {
9+
rules: [
10+
{
11+
test: /\.tsx?$/,
12+
use: 'ts-loader',
13+
exclude: /node_modules/,
14+
},
15+
{
16+
test: /\.node$/,
17+
loader: 'node-loader',
18+
options: {
19+
name: '[name].[ext]', // Preserves original path and filename
20+
},
21+
},
22+
],
23+
},
24+
output: {
25+
path: path.resolve(__dirname, 'build'),
26+
globalObject: 'this',
27+
library: {
28+
type: 'umd',
29+
},
30+
},
31+
target: 'node',
32+
experiments: {
33+
asyncWebAssembly: true,
34+
},
35+
}
36+
37+
const nodeJsBearerTokenBundleConfig = {
38+
...baseConfig,
39+
experiments: {
40+
asyncWebAssembly: true,
41+
},
42+
entry: {
43+
'aws-lsp-codewhisperer': path.join(__dirname, 'src/agent-standalone.ts'),
44+
},
45+
output: {
46+
...baseConfig.output,
47+
filename: `[name].js`,
48+
chunkFormat: false,
49+
},
50+
resolve: {
51+
...baseConfig.resolve,
52+
},
53+
target: 'node',
54+
}
55+
56+
module.exports = [nodeJsBearerTokenBundleConfig]

app/aws-lsp-codewhisperer-runtimes/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
"start": "cross-env NODE_OPTIONS=--max_old_space_size=8172 node scripts/dev-server.js start",
1212
"stop-dev-server": "node scripts/dev-server.js stop",
1313
"test": "node scripts/test-runner.js",
14-
"test-bundles": "node scripts/test-bundles.js"
14+
"test-bundles": "node scripts/test-bundles.js",
15+
"local-build": "node scripts/local-build.js"
1516
},
1617
"dependencies": {
1718
"@aws/language-server-runtimes": "^0.2.83",
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
const { execSync } = require('child_process')
2+
const path = require('path')
3+
const fs = require('fs')
4+
5+
const SCRIPT_DIR = __dirname
6+
const ROOT_DIR = path.resolve(SCRIPT_DIR, '../../../')
7+
const CHAT_CLIENT_PATH = path.resolve(ROOT_DIR, 'chat-client')
8+
const CODE_WHISPERER_RUNTIMES_PATH = path.resolve(ROOT_DIR, 'app/aws-lsp-codewhisperer-runtimes')
9+
const CUSTOM_WEBPACK_PATH = path.join(SCRIPT_DIR, '../custom-webpack-config.js')
10+
11+
function executeCommand(command, cwd) {
12+
try {
13+
console.log(`Executing: ${command}`)
14+
execSync(`${command}`, {
15+
cwd,
16+
stdio: 'pipe',
17+
})
18+
} catch (error) {
19+
console.error(`Error executing command "${command}": ${error.message}`)
20+
if (error.signal === 'SIGINT' || error.signal === 'SIGTERM') {
21+
cleanupInterruptedState()
22+
}
23+
if (error.message.includes('Command failed: npm run clean')) {
24+
// ignore this error as it is expected to fail in case clean is run without install
25+
return
26+
}
27+
process.exit(1)
28+
}
29+
}
30+
31+
function handleWebpackConfig(action) {
32+
const webpackPath = path.join(SCRIPT_DIR, '../webpack.config.js')
33+
const backupPath = path.join(SCRIPT_DIR, '../webpack.config.js.backup')
34+
35+
if (action === 'backup' && fs.existsSync(webpackPath)) {
36+
fs.renameSync(webpackPath, backupPath)
37+
fs.copyFileSync(CUSTOM_WEBPACK_PATH, webpackPath)
38+
} else if (action === 'restore' && fs.existsSync(backupPath)) {
39+
if (fs.existsSync(webpackPath)) {
40+
fs.unlinkSync(webpackPath)
41+
}
42+
fs.renameSync(backupPath, webpackPath)
43+
}
44+
}
45+
46+
function cleanupInterruptedState() {
47+
const webpackPath = path.join(SCRIPT_DIR, '../webpack.config.js')
48+
const backupPath = path.join(SCRIPT_DIR, '../webpack.config.js.backup')
49+
50+
if (fs.existsSync(backupPath)) {
51+
console.log('Found backup webpack config from previous interrupted run. Restoring...')
52+
if (fs.existsSync(webpackPath)) {
53+
fs.unlinkSync(webpackPath)
54+
}
55+
fs.renameSync(backupPath, webpackPath)
56+
console.log('Restored original webpack config.')
57+
}
58+
}
59+
60+
function createServerArtifact() {
61+
try {
62+
// Clean up any interrupted state from previous runs
63+
cleanupInterruptedState()
64+
65+
if (!fs.existsSync(ROOT_DIR)) {
66+
throw new Error(`Directory not found: ${ROOT_DIR}`)
67+
}
68+
69+
if (!fs.existsSync(CUSTOM_WEBPACK_PATH)) {
70+
throw new Error(`Custom webpack config not found: ${CUSTOM_WEBPACK_PATH}`)
71+
}
72+
73+
console.log('\nStep 1: Running clean in root directory...')
74+
executeCommand('npm run clean', ROOT_DIR)
75+
76+
console.log('\nStep 2: Installing dependencies in root directory...')
77+
executeCommand('npm i', ROOT_DIR)
78+
79+
console.log('\nStep 3: Running compile in root directory...')
80+
executeCommand('npm run compile', ROOT_DIR)
81+
82+
console.log('\nStep 4: Running package in target directory...')
83+
84+
handleWebpackConfig('backup')
85+
86+
try {
87+
executeCommand('npm run package', CODE_WHISPERER_RUNTIMES_PATH)
88+
} finally {
89+
handleWebpackConfig('restore')
90+
}
91+
92+
console.log('\nServer artifact created successfully! 🎉')
93+
} catch (error) {
94+
console.error('\nServer artifact creation failed:', error.message)
95+
process.exit(1)
96+
}
97+
}
98+
99+
function createClientArtifact() {
100+
try {
101+
if (!fs.existsSync(CHAT_CLIENT_PATH)) {
102+
throw new Error(`Chat client path not found: ${CHAT_CLIENT_PATH}`)
103+
}
104+
executeCommand('npm run compile', CHAT_CLIENT_PATH)
105+
console.log('\nClient artifact created successfully! 🎉')
106+
} catch (error) {
107+
console.error('\nClient artifact creation failed:', error.message)
108+
process.exit(1)
109+
}
110+
}
111+
112+
try {
113+
createServerArtifact()
114+
createClientArtifact()
115+
console.log(
116+
'\nServer artifact created at: language-servers/app/aws-lsp-codewhisperer-runtimes/build/aws-lsp-codewhisperer.js'
117+
)
118+
console.log('\nClient artifact created at: language-servers/chat-client/build/amazonq-ui.js')
119+
} catch (er) {
120+
console.error('\nArtifacts creation failed:', er.message)
121+
process.exit(1)
122+
}

app/aws-lsp-partiql-runtimes/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"package": "npm run compile && npm run compile:webpack"
1212
},
1313
"dependencies": {
14-
"@aws/language-server-runtimes": "^0.2.78",
14+
"@aws/language-server-runtimes": "^0.2.80",
1515
"@aws/lsp-partiql": "^0.0.5"
1616
},
1717
"devDependencies": {

chat-client/CHANGELOG.md

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

3+
## [0.1.10](https://github.com/aws/language-servers/compare/chat-client/v0.1.9...chat-client/v0.1.10) (2025-05-14)
4+
5+
6+
### Features
7+
8+
* **amazonq:** telemetry for chat history and export ([#1314](https://github.com/aws/language-servers/issues/1314)) ([aaa08a4](https://github.com/aws/language-servers/commit/aaa08a4f29ac34f85ec9badf975d6e2e8d114627))
9+
10+
11+
### Bug Fixes
12+
13+
* **amazonq:** 500k max input limit in user input box. Align payload prompt with user typed prompt. ([#1325](https://github.com/aws/language-servers/issues/1325)) ([3338cc1](https://github.com/aws/language-servers/commit/3338cc1b5dcfd375385d7db2fa693870687dba8a))
14+
* open initial tab using mynahUI defaults instead of waiting for ChatOptions ([#1322](https://github.com/aws/language-servers/issues/1322)) ([87178a5](https://github.com/aws/language-servers/commit/87178a554f23decb45fbdf26f067d0d9801f91a0))
15+
* remove @ mention in placeholder q chat text if agentic mode not available ([#1311](https://github.com/aws/language-servers/issues/1311)) ([28f84fc](https://github.com/aws/language-servers/commit/28f84fc82fd5e55ec1cdc61d1bcca6e4e447b12f))
16+
* stop buttom work expected ([#1307](https://github.com/aws/language-servers/issues/1307)) ([06c752e](https://github.com/aws/language-servers/commit/06c752e1dee106be73daa73f336213aad5413e67))
17+
* welcome card shows everytime ([#1332](https://github.com/aws/language-servers/issues/1332)) ([e030bdd](https://github.com/aws/language-servers/commit/e030bdd2f0daf61c062f64baa92563b539746e71))
18+
319
## [0.1.9](https://github.com/aws/language-servers/compare/chat-client/v0.1.8...chat-client/v0.1.9) (2025-05-09)
420

521

@@ -177,8 +193,8 @@
177193

178194
### Changed
179195

180-
- Update `@aws/chat-client-ui-types` to 0.1.0
181-
- Update `@aws/language-server-runtimes-types` to 0.1.0
196+
- Update `@aws/chat-client-ui-types` to 0.1.35
197+
- Update `@aws/language-server-runtimes-types` to 0.1.29
182198
- Shortened legal text in the footer
183199

184200
## [0.0.9] - 2024-11-20
@@ -202,8 +218,8 @@
202218
### Changed
203219

204220
- Changed legal text in the footer
205-
- Update `@aws/chat-client-ui-types` to 0.0.8
206-
- Update `@aws/language-server-runtimes-types` to to 0.0.7
221+
- Update `@aws/chat-client-ui-types` to 0.1.35
222+
- Update `@aws/language-server-runtimes-types` to 0.1.29
207223
- Upgraded dependency: `@aws/mynah-ui` from 4.15.11 to 4.18.0:
208224
- Inline code elements now wrap onto new lines
209225
- Send button no longer shifts out of the window when horizontally filling the prompt input without spaces (now it wraps)

chat-client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aws/chat-client",
3-
"version": "0.1.9",
3+
"version": "0.1.10",
44
"description": "AWS Chat Client",
55
"main": "out/index.js",
66
"repository": {

chat-client/src/client/chat.test.ts

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -69,40 +69,25 @@ describe('Chat', () => {
6969
})
7070

7171
it('publishes ready event when initialized', () => {
72-
assert.calledWithExactly(clientApi.postMessage.firstCall, { command: READY_NOTIFICATION_METHOD })
73-
})
74-
75-
it('creates initial tab when chat options are provided', () => {
76-
const bannerText = 'This is a test banner message'
77-
const eventParams = {
78-
command: CHAT_OPTIONS,
79-
params: {
80-
chatNotifications: {
81-
bannerText: bannerText,
82-
},
83-
},
84-
}
85-
const sendToPromptEvent = createInboundEvent(eventParams)
86-
window.dispatchEvent(sendToPromptEvent)
87-
88-
assert.calledWithExactly(clientApi.postMessage.firstCall, { command: READY_NOTIFICATION_METHOD })
72+
assert.callCount(clientApi.postMessage, 4)
8973

90-
assert.calledWithExactly(clientApi.postMessage.secondCall, {
74+
assert.calledWithExactly(clientApi.postMessage.firstCall, {
9175
command: TELEMETRY,
92-
params: { name: ENTER_FOCUS },
76+
params: { name: 'enterFocus' },
9377
})
78+
assert.calledWithExactly(clientApi.postMessage.secondCall, { command: READY_NOTIFICATION_METHOD })
9479

9580
assert.calledWithExactly(clientApi.postMessage.thirdCall, {
9681
command: TAB_ADD_NOTIFICATION_METHOD,
97-
params: { tabId: sinon.match.string },
82+
params: { tabId: initialTabId },
9883
})
9984

10085
assert.calledWithExactly(clientApi.postMessage.lastCall, {
10186
command: TELEMETRY,
10287
params: {
10388
triggerType: 'click',
10489
name: TAB_ADD_TELEMETRY_EVENT,
105-
tabId: sinon.match.string,
90+
tabId: initialTabId,
10691
},
10792
})
10893
})

0 commit comments

Comments
 (0)