Skip to content

Commit fbf0847

Browse files
authored
Merge branch 'main' into unittests
2 parents 189d11b + 8a2aa34 commit fbf0847

File tree

22 files changed

+209
-56
lines changed

22 files changed

+209
-56
lines changed

.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.37",
3-
"core/aws-lsp-core": "0.0.15",
4-
"server/aws-lsp-antlr4": "0.1.19",
5-
"server/aws-lsp-codewhisperer": "0.0.82",
6-
"server/aws-lsp-json": "0.1.19",
2+
"chat-client": "0.1.38",
3+
"core/aws-lsp-core": "0.0.16",
4+
"server/aws-lsp-antlr4": "0.1.20",
5+
"server/aws-lsp-codewhisperer": "0.0.83",
6+
"server/aws-lsp-json": "0.1.20",
77
"server/aws-lsp-partiql": "0.0.18",
8-
"server/aws-lsp-yaml": "0.1.19"
8+
"server/aws-lsp-yaml": "0.1.20"
99
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"agenticChat": "1.36.0"
2+
"agenticChat": "1.37.0"
33
}

chat-client/CHANGELOG.md

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

3+
## [0.1.38](https://github.com/aws/language-servers/compare/chat-client/v0.1.37...chat-client/v0.1.38) (2025-10-01)
4+
5+
6+
### Bug Fixes
7+
8+
* **amazonq:** Fix mock fs clean; Node version upgrade ([#2324](https://github.com/aws/language-servers/issues/2324)) ([1d9afd4](https://github.com/aws/language-servers/commit/1d9afd410e19624223e300ca06ea7d08a112cc82))
9+
* optimize memory bank token usage and add new tab support ([#2366](https://github.com/aws/language-servers/issues/2366)) ([3057d56](https://github.com/aws/language-servers/commit/3057d56e4a3047d1715d6e3560e9f934d1de469c))
10+
311
## [0.1.37](https://github.com/aws/language-servers/compare/chat-client/v0.1.36...chat-client/v0.1.37) (2025-09-24)
412

513

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.37",
3+
"version": "0.1.38",
44
"description": "AWS Chat Client",
55
"main": "out/index.js",
66
"repository": {

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,17 @@ describe('rules', () => {
1616
mynahUi = {
1717
openTopBarButtonOverlay: sinon.stub(),
1818
showCustomForm: sinon.stub(),
19+
getAllTabs: sinon.stub().returns({}),
20+
updateStore: sinon.stub().returns('new-tab-id'),
21+
notify: sinon.stub(),
1922
} as unknown as MynahUI
2023
openTopBarButtonOverlayStub = mynahUi.openTopBarButtonOverlay as sinon.SinonStub
2124
showCustomFormStub = mynahUi.showCustomForm as sinon.SinonStub
2225

2326
messager = {
2427
onRuleClick: sinon.stub(),
2528
onChatPrompt: sinon.stub(),
29+
onTabAdd: sinon.stub(),
2630
} as unknown as Messager
2731

2832
rulesList = new RulesList(mynahUi, messager)
@@ -151,12 +155,17 @@ describe('rules', () => {
151155

152156
onItemClick(createMemoryBankItem)
153157

154-
// Should send a chat prompt
158+
// Should create new tab and send chat prompt
159+
sinon.assert.calledOnce(messager.onTabAdd as sinon.SinonStub)
155160
sinon.assert.calledOnce(messager.onChatPrompt as sinon.SinonStub)
156161

162+
const tabAddArgs = (messager.onTabAdd as sinon.SinonStub).getCall(0).args[0]
163+
assert.equal(tabAddArgs, 'new-tab-id')
164+
157165
const chatPromptArgs = (messager.onChatPrompt as sinon.SinonStub).getCall(0).args[0]
158166
assert.equal(chatPromptArgs.prompt.prompt, 'Generate a Memory Bank for this project')
159167
assert.equal(chatPromptArgs.prompt.escapedPrompt, 'Generate a Memory Bank for this project')
168+
assert.equal(chatPromptArgs.tabId, 'new-tab-id')
160169
})
161170

162171
it('calls messager when regular rule is clicked', () => {

chat-client/src/client/features/rules.ts

Lines changed: 40 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,11 @@
1-
import { MynahIconsType, MynahUI, DetailedListItem, DetailedListItemGroup, MynahIcons } from '@aws/mynah-ui'
1+
import {
2+
MynahIconsType,
3+
MynahUI,
4+
DetailedListItem,
5+
DetailedListItemGroup,
6+
MynahIcons,
7+
NotificationType,
8+
} from '@aws/mynah-ui'
29
import { Messager } from '../messager'
310
import { ListRulesResult } from '@aws/language-server-runtimes-types'
411
import { RulesFolder } from '@aws/language-server-runtimes-types'
@@ -82,14 +89,38 @@ export class RulesList {
8289
// Close the rules list first
8390
this.rulesList?.close()
8491

85-
// Use the current tab, the tabId should be the same as the one used for the rules list
86-
this.messager.onChatPrompt({
87-
prompt: {
88-
prompt: 'Generate a Memory Bank for this project',
89-
escapedPrompt: 'Generate a Memory Bank for this project',
90-
},
91-
tabId: this.tabId,
92-
})
92+
// Check if we're at the tab limit (10 tabs max)
93+
const currentTabCount = Object.keys(this.mynahUi.getAllTabs()).length
94+
if (currentTabCount >= 10) {
95+
// Show notification that max tabs reached
96+
this.mynahUi.notify({
97+
content: 'You can only open ten conversation tabs at a time.',
98+
type: NotificationType.WARNING,
99+
})
100+
return
101+
}
102+
103+
// Create a new tab for the memory bank generation
104+
const newTabId = this.mynahUi.updateStore('', { tabTitle: 'Memory Bank' })
105+
if (newTabId) {
106+
// Add the new tab and switch to it
107+
this.messager.onTabAdd(newTabId)
108+
109+
// Send the chat prompt to the new tab
110+
this.messager.onChatPrompt({
111+
prompt: {
112+
prompt: 'Generate a Memory Bank for this project',
113+
escapedPrompt: 'Generate a Memory Bank for this project',
114+
},
115+
tabId: newTabId,
116+
})
117+
} else {
118+
// Show error notification if tab creation failed
119+
this.mynahUi.notify({
120+
content: 'Failed to create new tab for Memory Bank generation.',
121+
type: NotificationType.ERROR,
122+
})
123+
}
93124
}
94125

95126
showLoading(tabId: string) {

core/aws-lsp-core/CHANGELOG.md

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

3+
## [0.0.16](https://github.com/aws/language-servers/compare/lsp-core/v0.0.15...lsp-core/v0.0.16) (2025-10-01)
4+
5+
6+
### Bug Fixes
7+
8+
* **amazonq:** Fix mock fs clean; Node version upgrade ([#2324](https://github.com/aws/language-servers/issues/2324)) ([1d9afd4](https://github.com/aws/language-servers/commit/1d9afd410e19624223e300ca06ea7d08a112cc82))
9+
* **amazonq:** handle IAM credentials expiration field to be aws sdk versions compatible and add refresh logic to codewhisperer IAM client ([#2349](https://github.com/aws/language-servers/issues/2349)) ([5eb3768](https://github.com/aws/language-servers/commit/5eb3768bf020d61d0ade767d62e13839048146e4))
10+
311
## [0.0.15](https://github.com/aws/language-servers/compare/lsp-core/v0.0.14...lsp-core/v0.0.15) (2025-09-09)
412

513

core/aws-lsp-core/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@aws/lsp-core",
3-
"version": "0.0.15",
3+
"version": "0.0.16",
44
"description": "Core library, contains common code and utilities",
55
"main": "out/index.js",
66
"repository": {

package-lock.json

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

server/aws-lsp-antlr4/CHANGELOG.md

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

3+
## [0.1.20](https://github.com/aws/language-servers/compare/lsp-antlr4/v0.1.19...lsp-antlr4/v0.1.20) (2025-10-01)
4+
5+
6+
### Dependencies
7+
8+
* The following workspace dependencies were updated
9+
* dependencies
10+
* @aws/lsp-core bumped from ^0.0.15 to ^0.0.16
11+
312
## [0.1.19](https://github.com/aws/language-servers/compare/lsp-antlr4/v0.1.18...lsp-antlr4/v0.1.19) (2025-09-09)
413

514

0 commit comments

Comments
 (0)