Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
2 changes: 1 addition & 1 deletion app/aws-lsp-antlr4-runtimes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"webpack": "webpack"
},
"dependencies": {
"@aws/language-server-runtimes": "^0.2.69",
"@aws/language-server-runtimes": "^0.2.70",
"@aws/lsp-antlr4": "*",
"antlr4-c3": "^3.4.1",
"antlr4ng": "^3.0.4"
Expand Down
2 changes: 1 addition & 1 deletion app/aws-lsp-codewhisperer-runtimes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"test": "node scripts/test-runner.js"
},
"dependencies": {
"@aws/language-server-runtimes": "^0.2.68",
"@aws/language-server-runtimes": "^0.2.70",
"@aws/lsp-codewhisperer": "*",
"copyfiles": "^2.4.1",
"cross-env": "^7.0.3",
Expand Down
2 changes: 1 addition & 1 deletion app/aws-lsp-identity-runtimes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"compile": "tsc --build"
},
"dependencies": {
"@aws/language-server-runtimes": "^0.2.67",
"@aws/language-server-runtimes": "^0.2.70",
"@aws/lsp-identity": "^0.0.1"
}
}
2 changes: 1 addition & 1 deletion app/aws-lsp-json-runtimes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"webpack": "webpack"
},
"dependencies": {
"@aws/language-server-runtimes": "^0.2.67",
"@aws/language-server-runtimes": "^0.2.70",
"@aws/lsp-json": "*"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion app/aws-lsp-notification-runtimes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"compile": "tsc --build"
},
"dependencies": {
"@aws/language-server-runtimes": "^0.2.69",
"@aws/language-server-runtimes": "^0.2.70",
"@aws/lsp-notification": "^0.0.1"
}
}
2 changes: 1 addition & 1 deletion app/aws-lsp-yaml-json-webworker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"serve:webpack": "NODE_ENV=development webpack serve"
},
"dependencies": {
"@aws/language-server-runtimes": "^0.2.67",
"@aws/language-server-runtimes": "^0.2.70",
"@aws/lsp-json": "*",
"@aws/lsp-yaml": "*"
},
Expand Down
2 changes: 1 addition & 1 deletion app/aws-lsp-yaml-runtimes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"webpack": "webpack"
},
"dependencies": {
"@aws/language-server-runtimes": "^0.2.69",
"@aws/language-server-runtimes": "^0.2.70",
"@aws/lsp-yaml": "*"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion app/hello-world-lsp-runtimes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"dependencies": {
"@aws/hello-world-lsp": "^0.0.1",
"@aws/language-server-runtimes": "^0.2.67"
"@aws/language-server-runtimes": "^0.2.70"
},
"devDependencies": {
"@types/chai": "^4.3.5",
Expand Down
4 changes: 4 additions & 0 deletions chat-client/src/client/chat.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
STOP_CHAT_RESPONSE,
} from '@aws/chat-client-ui-types'
import {
BUTTON_CLICK_REQUEST_METHOD,
CHAT_REQUEST_METHOD,
CONTEXT_COMMAND_NOTIFICATION_METHOD,
CONVERSATION_CLICK_REQUEST_METHOD,
Expand Down Expand Up @@ -318,6 +319,9 @@ export const createChat = (
stopChatResponse: (tabId: string) => {
sendMessageToClient({ command: STOP_CHAT_RESPONSE, params: { tabId } })
},
sendButtonClickEvent: params => {
sendMessageToClient({ command: BUTTON_CLICK_REQUEST_METHOD, params: params })
},
}

const messager = new Messager(chatApi)
Expand Down
6 changes: 6 additions & 0 deletions chat-client/src/client/messager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import {
TriggerType,
} from '@aws/chat-client-ui-types'
import {
ButtonClickParams,
ChatParams,
ConversationAction,
ConversationClickParams,
Expand Down Expand Up @@ -91,6 +92,7 @@ export interface OutboundChatApi {
onGetSerializedChat(requestId: string, result: GetSerializedChatResult | ErrorResult): void
promptInputOptionChange(params: PromptInputOptionChangeParams): void
stopChatResponse(tabId: string): void
sendButtonClickEvent(params: ButtonClickParams): void
}

export class Messager {
Expand Down Expand Up @@ -225,4 +227,8 @@ export class Messager {
onStopChatResponse = (tabId: string): void => {
this.chatApi.stopChatResponse(tabId)
}

onButtonClick = (params: ButtonClickParams): void => {
this.chatApi.sendButtonClickEvent(params)
}
}
1 change: 1 addition & 0 deletions chat-client/src/client/mynahUi.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ describe('MynahUI', () => {
onGetSerializedChat: sinon.stub(),
promptInputOptionChange: sinon.stub(),
stopChatResponse: sinon.stub(),
sendButtonClickEvent: sinon.stub(),
}

messager = new Messager(outboundChatApi)
Expand Down
8 changes: 8 additions & 0 deletions chat-client/src/client/mynahUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import {
isValidAuthFollowUpType,
} from '@aws/chat-client-ui-types'
import {
ButtonClickParams,
ChatMessage,
ChatResult,
ContextCommand,
Expand Down Expand Up @@ -311,6 +312,13 @@ export const createMynahUi = (
Object.keys(mynahUi.getAllTabs()).forEach(storeTabKey => {
mynahUi.updateStore(storeTabKey, { promptInputStickyCard: null })
})
} else {
const payload: ButtonClickParams = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh wait so tool clicks are going to come through onInBodyButtonClicked?

Copy link
Contributor Author

@Hweinstock Hweinstock Apr 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, this is how its implemented on agentic-chat branch here. Which took forever to find since its redirected almost 10 times.

tabId,
messageId,
buttonId: action.id,
}
messager.onButtonClick(payload)
}
},
onContextSelected: (contextItem, tabId) => {
Expand Down
2 changes: 2 additions & 0 deletions chat-client/src/contracts/serverContracts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import {
TabBarActionParams,
GetSerializedChatResult,
PROMPT_INPUT_OPTION_CHANGE_METHOD,
BUTTON_CLICK_REQUEST_METHOD,
} from '@aws/language-server-runtimes-types'

export const TELEMETRY = 'telemetry/event'
Expand All @@ -59,6 +60,7 @@ export type ServerMessageCommand =
| typeof TAB_BAR_ACTION_REQUEST_METHOD
| typeof GET_SERIALIZED_CHAT_REQUEST_METHOD
| typeof PROMPT_INPUT_OPTION_CHANGE_METHOD
| typeof BUTTON_CLICK_REQUEST_METHOD

export interface ServerMessage {
command: ServerMessageCommand
Expand Down
2 changes: 1 addition & 1 deletion client/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@
"@aws-sdk/credential-providers": "^3.731.1",
"@aws-sdk/types": "^3.734.0",
"@aws/chat-client-ui-types": "^0.1.16",
"@aws/language-server-runtimes": "^0.2.69",
"@aws/language-server-runtimes": "^0.2.70",
"@types/uuid": "^9.0.8",
"@types/vscode": "^1.98.0",
"jose": "^5.2.4",
Expand Down
43 changes: 22 additions & 21 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion server/aws-lsp-antlr4/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"clean": "rm -rf node_modules"
},
"dependencies": {
"@aws/language-server-runtimes": "^0.2.69",
"@aws/language-server-runtimes": "^0.2.70",
"@aws/lsp-core": "^0.0.3"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion server/aws-lsp-codewhisperer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@aws-sdk/util-arn-parser": "^3.723.0",
"@aws-sdk/util-retry": "^3.374.0",
"@aws/chat-client-ui-types": "^0.1.16",
"@aws/language-server-runtimes": "^0.2.69",
"@aws/language-server-runtimes": "^0.2.70",
"@aws/lsp-core": "^0.0.3",
"@smithy/node-http-handler": "^2.5.0",
"adm-zip": "^0.5.10",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Will be deleted or merged.
*/

import * as path from 'path'

Check warning on line 6 in server/aws-lsp-codewhisperer/src/language-server/agenticChat/agenticChatController.ts

View workflow job for this annotation

GitHub Actions / Test

Do not import Node.js builtin module "path"

Check warning on line 6 in server/aws-lsp-codewhisperer/src/language-server/agenticChat/agenticChatController.ts

View workflow job for this annotation

GitHub Actions / Test (Windows)

Do not import Node.js builtin module "path"
import {
ChatTriggerType,
GenerateAssistantResponseCommandInput,
Expand Down Expand Up @@ -147,6 +147,7 @@
}

async onButtonClick(params: ButtonClickParams): Promise<ButtonClickResult> {
this.#log(`onButtonClick event with params: ${params}`)
return {
success: false,
failureReason: 'not implemented',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export const QAgenticChatServer =
chat.onConversationClick(params => {
return chatController.onConversationClick(params)
})

chat.onCreatePrompt((params) => {
return chatController.onCreatePrompt(params)
})
Expand All @@ -157,6 +157,10 @@ export const QAgenticChatServer =
return chatController.onPromptInputOptionChange(params)
})

chat.onButtonClick(params => {
return chatController.onButtonClick(params)
})

logging.log('Q Chat server has been initialized')

return () => {
Expand Down
Loading
Loading