Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
aa87ae2
fix(amazonq): dedupe openTabs supplemental contexts (#2172)
andrewyuq Aug 26, 2025
d7b184c
fix: fix pkce windows url path (#2173)
bywang56 Aug 27, 2025
8600c52
feat: Auto fetch models from listAvailableModels API (#2171)
laileni-aws Aug 27, 2025
23f5ec3
fix(amazonq): fix to add mcp server tool error handling and status fo…
ashishrp-aws Aug 27, 2025
08720c6
revert: reduce auto trigger frequency for VSC (#2168)" (#2177)
leigaol Aug 27, 2025
4893344
fix(amazonq): status message update for mcp tool permission accpetanc…
ashishrp-aws Aug 27, 2025
28567e3
deps: update indexing bundle to 042c98e6 (#2174)
rli Aug 27, 2025
5a3f481
feat(amazonq): emit metric for each issue (#2179)
BlakeLazarine Aug 27, 2025
b5f5373
chore(release): release packages from branch main (#2152)
github-actions[bot] Aug 27, 2025
8d5b839
chore: bump agentic version: 1.30.0
Aug 28, 2025
ecb86a0
chore: empty commit to trigger workflow
rli Aug 28, 2025
baf20b7
revert: deps: update indexing bundle to 042c98e6 (#2174) (#2183)
rli Aug 28, 2025
1c9e8a1
chore: merge agentic version 1.30.0
rli Aug 28, 2025
c53f672
fix: emit acceptedLineCount metric and AgenticCodeAccepted interactio…
tsmithsz Aug 29, 2025
852b21b
fix: auto trigger should only respect previous decisions in the past …
Will-ShaoHua Aug 29, 2025
4fd0def
chore: supplemental context log (#2185)
Will-ShaoHua Aug 29, 2025
f4e2e6e
fix: should send classifier score after taking sigmoid (#2188)
Will-ShaoHua Aug 29, 2025
b497540
perf: only process edit requests 1 at a time (#2187)
Will-ShaoHua Aug 29, 2025
66742ad
feat: passing suggestionTypes and pluginVersion/lspVersion to STE (#2…
atonaamz Aug 29, 2025
ef7d793
fix: compact UI is not updated correctly when multiple nudges are dis…
jguoamz Aug 29, 2025
fd71e6c
fix: fix calculation for num-lines contributed by the LLM (#2191)
tsmithsz Sep 2, 2025
94723d4
revert: PR 2172 dedupe openTabs supplemental contexts (#2194)
Will-ShaoHua Sep 2, 2025
58f2064
fix: emit errorMessage in addMessage (#2197)
chungjac Sep 2, 2025
cb2b9a8
chore(release): release packages from branch main (#2190)
github-actions[bot] Sep 3, 2025
34bc9bd
feat: model selection for code review tool (#2196)
mkovelam Sep 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"chat-client": "0.1.33",
"chat-client": "0.1.34",
"core/aws-lsp-core": "0.0.14",
"server/aws-lsp-antlr4": "0.1.18",
"server/aws-lsp-codewhisperer": "0.0.75",
"server/aws-lsp-codewhisperer": "0.0.77",
"server/aws-lsp-json": "0.1.18",
"server/aws-lsp-partiql": "0.0.17",
"server/aws-lsp-yaml": "0.1.18"
Expand Down
2 changes: 1 addition & 1 deletion app/aws-lsp-codewhisperer-runtimes/src/version.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"agenticChat": "1.29.0"
"agenticChat": "1.30.0"
}
12 changes: 12 additions & 0 deletions chat-client/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# Changelog

## [0.1.34](https://github.com/aws/language-servers/compare/chat-client/v0.1.33...chat-client/v0.1.34) (2025-08-27)


### Features

* Auto fetch models from listAvailableModels API ([#2171](https://github.com/aws/language-servers/issues/2171)) ([8600c52](https://github.com/aws/language-servers/commit/8600c524877abb459e9338399352446c0dcff6f0))


### Bug Fixes

* **amazonq:** disable typewriter animation ([#2160](https://github.com/aws/language-servers/issues/2160)) ([db45d01](https://github.com/aws/language-servers/commit/db45d01adba10e8a04d868e1062f899df4f5b7e4))

## [0.1.33](https://github.com/aws/language-servers/compare/chat-client/v0.1.32...chat-client/v0.1.33) (2025-08-19)


Expand Down
2 changes: 1 addition & 1 deletion chat-client/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aws/chat-client",
"version": "0.1.33",
"version": "0.1.34",
"description": "AWS Chat Client",
"main": "out/index.js",
"repository": {
Expand Down
15 changes: 0 additions & 15 deletions chat-client/src/client/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ import { InboundChatApi, createMynahUi } from './mynahUi'
import { TabFactory } from './tabs/tabFactory'
import { ChatClientAdapter } from '../contracts/chatClientAdapter'
import { toMynahContextCommand, toMynahIcon } from './utils'
import { modelSelectionForRegion } from './texts/modelSelection'

const getDefaultTabConfig = (agenticMode?: boolean) => {
return {
Expand Down Expand Up @@ -264,20 +263,6 @@ export const createChat = (
return option
}),
})
} else if (message.params.region) {
// TODO: This can be removed after all clients support aws/chat/listAvailableModels
// get all tabs and update region
const allExistingTabs: MynahUITabStoreModel = mynahUi.getAllTabs()
for (const tabId in allExistingTabs) {
const options = mynahUi.getTabData(tabId).getStore()?.promptInputOptions
mynahUi.updateStore(tabId, {
promptInputOptions: options?.map(option =>
option.id === 'model-selection'
? modelSelectionForRegion[message.params.region]
: option
),
})
}
} else {
tabFactory.setInfoMessages((message.params as ChatOptionsUpdateParams).chatNotifications)
}
Expand Down
4 changes: 3 additions & 1 deletion chat-client/src/client/mynahUi.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,8 @@ describe('MynahUI', () => {
sinon.assert.calledThrice(updateStoreSpy)
})

it('should create a new tab if current tab is loading', () => {
it('should create a new tab if current tab is loading', function (done) {
this.timeout(8000)
// clear create tab stub since set up process calls it twice
createTabStub.resetHistory()
getAllTabsStub.returns({ 'tab-1': { store: { loadingChat: true } } })
Expand All @@ -274,6 +275,7 @@ describe('MynahUI', () => {

sinon.assert.calledOnceWithExactly(createTabStub, false)
sinon.assert.calledThrice(updateStoreSpy)
done()
})

it('should not create a new tab if one exists already', () => {
Expand Down
23 changes: 19 additions & 4 deletions chat-client/src/client/mynahUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,20 @@ export const handlePromptInputChange = (mynahUi: MynahUI, tabId: string, options
}
}

const updatedPromptInputOptions = promptInputOptions?.map(option => {
option.value = optionsValues[option.id]
return option
})

mynahUi.updateStore(tabId, {
promptInputOptions: promptInputOptions?.map(option => {
option.value = optionsValues[option.id]
return option
}),
promptInputOptions: updatedPromptInputOptions,
})

// Store the updated values in tab defaults for new tabs
mynahUi.updateTabDefaults({
store: {
promptInputOptions: updatedPromptInputOptions,
},
})
}

Expand Down Expand Up @@ -414,6 +423,12 @@ export const createMynahUi = (
}

const tabStore = mynahUi.getTabData(tabId).getStore()
const storedPromptInputOptions = mynahUi.getTabDefaults().store?.promptInputOptions

// Retrieve stored model selection and pair programming mode from defaults
if (storedPromptInputOptions) {
defaultTabConfig.promptInputOptions = storedPromptInputOptions
}

// Tabs can be opened through different methods, including server-initiated 'openTab' requests.
// The 'openTab' request is specifically used for loading historical chat sessions with pre-existing messages.
Expand Down
7 changes: 2 additions & 5 deletions chat-client/src/client/tabs/tabFactory.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { ChatHistory } from '../features/history'
import { TabFactory } from './tabFactory'
import * as assert from 'assert'
import { pairProgrammingPromptInput } from '../texts/pairProgramming'
import { modelSelectionForRegion } from '../texts/modelSelection'
import { modelSelection } from '../texts/modelSelection'

describe('tabFactory', () => {
describe('getDefaultTabData', () => {
Expand Down Expand Up @@ -92,10 +92,7 @@ describe('tabFactory', () => {

const result = tabFactory.createTab(false)

assert.deepStrictEqual(result.promptInputOptions, [
pairProgrammingPromptInput,
modelSelectionForRegion['us-east-1'],
])
assert.deepStrictEqual(result.promptInputOptions, [pairProgrammingPromptInput, modelSelection])
})

it('should not include model selection when only agentic mode is enabled', () => {
Expand Down
7 changes: 2 additions & 5 deletions chat-client/src/client/tabs/tabFactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { disclaimerCard } from '../texts/disclaimer'
import { ChatMessage } from '@aws/language-server-runtimes-types'
import { ChatHistory } from '../features/history'
import { pairProgrammingPromptInput, programmerModeCard } from '../texts/pairProgramming'
import { modelSelectionForRegion } from '../texts/modelSelection'
import { modelSelection } from '../texts/modelSelection'

export type DefaultTabData = MynahUIDataModel

Expand Down Expand Up @@ -52,10 +52,7 @@ export class TabFactory {
...this.getDefaultTabData(),
...(disclaimerCardActive ? { promptInputStickyCard: disclaimerCard } : {}),
promptInputOptions: this.agenticMode
? [
pairProgrammingPromptInput,
...(this.modelSelectionEnabled ? [modelSelectionForRegion['us-east-1']] : []),
]
? [pairProgrammingPromptInput, ...(this.modelSelectionEnabled ? [modelSelection] : [])]
: [],
cancelButtonWhenLoading: this.agenticMode, // supported for agentic chat only
}
Expand Down
51 changes: 1 addition & 50 deletions chat-client/src/client/texts/modelSelection.test.ts
Original file line number Diff line number Diff line change
@@ -1,60 +1,11 @@
import * as assert from 'assert'
import {
BedrockModel,
modelSelectionForRegion,
getModelSelectionChatItem,
modelUnavailableBanner,
modelThrottledBanner,
} from './modelSelection'
import { getModelSelectionChatItem, modelUnavailableBanner, modelThrottledBanner } from './modelSelection'
import { ChatItemType } from '@aws/mynah-ui'

/**
* Tests for modelSelection functionality
*
* Note: Some tests are for deprecated code (marked with 'legacy') that is maintained
* for backward compatibility with older clients. These should be removed once
* all clients have been updated to use the new API (aws/chat/listAvailableModels).
*/
describe('modelSelection', () => {
describe('BedrockModel enum (legacy)', () => {
it('should have the correct model IDs', () => {
assert.strictEqual(BedrockModel.CLAUDE_3_7_SONNET_20250219_V1_0, 'CLAUDE_3_7_SONNET_20250219_V1_0')
assert.strictEqual(BedrockModel.CLAUDE_SONNET_4_20250514_V1_0, 'CLAUDE_SONNET_4_20250514_V1_0')
})
})

describe('modelSelectionForRegion (legacy)', () => {
it('should provide all models for us-east-1 region', () => {
const usEast1ModelSelection = modelSelectionForRegion['us-east-1']
assert.ok(usEast1ModelSelection, 'usEast1ModelSelection should exist')
assert.ok(usEast1ModelSelection.type === 'select', 'usEast1ModelSelection should be type select')
assert.ok(Array.isArray(usEast1ModelSelection.options), 'options should be an array')
assert.strictEqual(usEast1ModelSelection.options.length, 2, 'should have 2 options')

const modelIds = usEast1ModelSelection.options.map(option => option.value)
assert.ok(modelIds.includes(BedrockModel.CLAUDE_SONNET_4_20250514_V1_0), 'should include Claude Sonnet 4')
assert.ok(
modelIds.includes(BedrockModel.CLAUDE_3_7_SONNET_20250219_V1_0),
'should include Claude Sonnet 3.7'
)
})

it('should provide all models for eu-central-1 region', () => {
const euCentral1ModelSelection = modelSelectionForRegion['eu-central-1']
assert.ok(euCentral1ModelSelection, 'euCentral1ModelSelection should exist')
assert.ok(euCentral1ModelSelection.type === 'select', 'euCentral1ModelSelection should be type select')
assert.ok(Array.isArray(euCentral1ModelSelection.options), 'options should be an array')
assert.strictEqual(euCentral1ModelSelection.options.length, 2, 'should have 2 option')

const modelIds = euCentral1ModelSelection.options.map(option => option.value)
assert.ok(modelIds.includes(BedrockModel.CLAUDE_SONNET_4_20250514_V1_0), 'should include Claude Sonnet 4')
assert.ok(
modelIds.includes(BedrockModel.CLAUDE_3_7_SONNET_20250219_V1_0),
'should include Claude Sonnet 3.7'
)
})
})

describe('getModelSelectionChatItem', () => {
it('should return a chat item with the correct model name', () => {
const modelName = 'Claude Sonnet 4'
Expand Down
14 changes: 3 additions & 11 deletions chat-client/src/client/texts/modelSelection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type ModelDetails = {
}

const modelRecord: Record<BedrockModel, ModelDetails> = {
[BedrockModel.CLAUDE_3_7_SONNET_20250219_V1_0]: { label: 'Claude Sonnet 3.7' },
[BedrockModel.CLAUDE_3_7_SONNET_20250219_V1_0]: { label: 'Claude 3.7 Sonnet' },
[BedrockModel.CLAUDE_SONNET_4_20250514_V1_0]: { label: 'Claude Sonnet 4' },
}

Expand All @@ -22,24 +22,16 @@ const modelOptions = Object.entries(modelRecord).map(([value, { label }]) => ({
label,
}))

const modelSelection: ChatItemFormItem = {
export const modelSelection: ChatItemFormItem = {
type: 'select',
id: 'model-selection',
options: modelOptions,
mandatory: true,
hideMandatoryIcon: true,
options: modelOptions,
border: false,
autoWidth: true,
}

/**
* @deprecated use aws/chat/listAvailableModels server request instead
*/
export const modelSelectionForRegion: Record<string, ChatItemFormItem> = {
'us-east-1': modelSelection,
'eu-central-1': modelSelection,
}

export const getModelSelectionChatItem = (modelName: string): ChatItem => ({
type: ChatItemType.DIRECTIVE,
contentHorizontalAlignment: 'center',
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

55 changes: 55 additions & 0 deletions server/aws-lsp-codewhisperer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,60 @@
# Changelog

## [0.0.77](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.76...lsp-codewhisperer/v0.0.77) (2025-09-02)


### Features

* passing suggestionTypes and pluginVersion/lspVersion to STE ([#2180](https://github.com/aws/language-servers/issues/2180)) ([66742ad](https://github.com/aws/language-servers/commit/66742adfc44f33efbd8dd33b803000e08241e5ce))


### Bug Fixes

* auto trigger should only respect previous decisions in the past 2mins ([#2189](https://github.com/aws/language-servers/issues/2189)) ([852b21b](https://github.com/aws/language-servers/commit/852b21b66f793102c52e35c2baec07a772e5134a))
* compact UI is not updated correctly when multiple nudges are displayed ([#2192](https://github.com/aws/language-servers/issues/2192)) ([ef7d793](https://github.com/aws/language-servers/commit/ef7d7931954f5083e4a5c358e67c6dc652fa1a40))
* emit acceptedLineCount metric and AgenticCodeAccepted interaction type ([#2167](https://github.com/aws/language-servers/issues/2167)) ([c53f672](https://github.com/aws/language-servers/commit/c53f672b6173ebda530917ccb4e0c2f26f5c8f79))
* emit errorMessage in addMessage ([#2197](https://github.com/aws/language-servers/issues/2197)) ([58f2064](https://github.com/aws/language-servers/commit/58f20649d345f159080006120e23cde559826df1))
* fix calculation for num-lines contributed by the LLM ([#2191](https://github.com/aws/language-servers/issues/2191)) ([fd71e6c](https://github.com/aws/language-servers/commit/fd71e6cf3fc843242936564061061418edf83f56))
* should send classifier score after taking sigmoid ([#2188](https://github.com/aws/language-servers/issues/2188)) ([f4e2e6e](https://github.com/aws/language-servers/commit/f4e2e6e885e665834a5d7b7cbb5f4ba4ff9bbb65))


### Performance Improvements

* only process edit requests 1 at a time ([#2187](https://github.com/aws/language-servers/issues/2187)) ([b497540](https://github.com/aws/language-servers/commit/b4975409a3ed518550290b72ac310895a293be4b))


### Reverts

* PR 2172 dedupe openTabs supplemental contexts ([#2194](https://github.com/aws/language-servers/issues/2194)) ([94723d4](https://github.com/aws/language-servers/commit/94723d46073a1ea8211e7ae8f9dfce3fcb809604))

## [0.0.76](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.75...lsp-codewhisperer/v0.0.76) (2025-08-27)


### Features

* add basic OAuth client for remote MCP ([#2136](https://github.com/aws/language-servers/issues/2136)) ([2fb896e](https://github.com/aws/language-servers/commit/2fb896e094de0bc5a1b4881067e7dcceb3826015))
* **amazonq:** emit metric for each issue ([#2179](https://github.com/aws/language-servers/issues/2179)) ([5a3f481](https://github.com/aws/language-servers/commit/5a3f481ebe8c6033e3833abcd81799d26c2aa03e))
* Auto fetch models from listAvailableModels API ([#2171](https://github.com/aws/language-servers/issues/2171)) ([8600c52](https://github.com/aws/language-servers/commit/8600c524877abb459e9338399352446c0dcff6f0))
* disable pkce flow during plugin load ([#2153](https://github.com/aws/language-servers/issues/2153)) ([71b3595](https://github.com/aws/language-servers/commit/71b35952333e7581921644ce40fabbc1e6d3c02f))
* update MCP manager and utilities ([#2158](https://github.com/aws/language-servers/issues/2158)) ([b99df82](https://github.com/aws/language-servers/commit/b99df82826d0ba1a1d52df578cb80674c90505b9))


### Bug Fixes

* adding streakTracker to track streakLength across Completions and Edits ([#2147](https://github.com/aws/language-servers/issues/2147)) ([a6c64f2](https://github.com/aws/language-servers/commit/a6c64f2995a17697e3d71d30a1f411f5cf0db279))
* **amazonq:** dedupe openTabs supplemental contexts ([#2172](https://github.com/aws/language-servers/issues/2172)) ([aa87ae2](https://github.com/aws/language-servers/commit/aa87ae2bd95edc1f38bf90f56093c5bf5ff18c53))
* **amazonq:** fix for mcp servers operations to edit server config only ([#2165](https://github.com/aws/language-servers/issues/2165)) ([d28df09](https://github.com/aws/language-servers/commit/d28df09ae41871430cd53064eac1f3050c95ea84))
* **amazonq:** fix to add mcp server tool error handling and status for card ([#2176](https://github.com/aws/language-servers/issues/2176)) ([23f5ec3](https://github.com/aws/language-servers/commit/23f5ec343cb4e0de32926204dbcf99e51af829f9))
* **amazonq:** status message update for mcp tool permission accpetance ([#2178](https://github.com/aws/language-servers/issues/2178)) ([4893344](https://github.com/aws/language-servers/commit/489334466fa084774d6e4737569468d654dc6359))
* fix pkce windows url path ([#2173](https://github.com/aws/language-servers/issues/2173)) ([d7b184c](https://github.com/aws/language-servers/commit/d7b184cb12979877722fa0293e9aebec91ff2c18))
* multiple fixes on auth flow edge cases ([#2155](https://github.com/aws/language-servers/issues/2155)) ([472220a](https://github.com/aws/language-servers/commit/472220a745cff4fe91a2cabae4ae059a164ceddd))
* reduce auto trigger frequency for VSC ([#2168](https://github.com/aws/language-servers/issues/2168)) ([00e11ff](https://github.com/aws/language-servers/commit/00e11ff48eafaa0baec48177fa4aa6d60048af2f))


### Reverts

* reduce auto trigger frequency for VSC ([#2168](https://github.com/aws/language-servers/issues/2168))" ([#2177](https://github.com/aws/language-servers/issues/2177)) ([08720c6](https://github.com/aws/language-servers/commit/08720c6c3fa83f9b3b6775d4ae4d848ce145b94b))

## [0.0.75](https://github.com/aws/language-servers/compare/lsp-codewhisperer/v0.0.74...lsp-codewhisperer/v0.0.75) (2025-08-21)


Expand Down
2 changes: 1 addition & 1 deletion server/aws-lsp-codewhisperer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aws/lsp-codewhisperer",
"version": "0.0.75",
"version": "0.0.77",
"description": "CodeWhisperer Language Server",
"main": "out/index.js",
"repository": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* THIS FILE IS AUTOGENERATED BY 'generateServiceClient.ts'.
* DO NOT EDIT BY HAND.
*/

import {Request} from 'aws-sdk/lib/request';
import {Response} from 'aws-sdk/lib/response';
import {AWSError} from 'aws-sdk/lib/error';
Expand Down
Loading
Loading