
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@aws/chat-client
Advanced tools
This package contains a chat client for the Q Language Server, that can be embedded in a webview. It uses MynahUI to render a web based chat interface.
The chat client communicates with the host application (e.g., an IDE extension) through postMessage
requests to the webview:
postMessage
to the host application that rendered the chat clientTo use the chat client, embed it in a webview within your application and handle the postMessage
communication as needed. Chat client is based on inbound (from a destination to the chat client) and outbound events (from the chat client to a destination). Events consist of command
and params
:
interface SomeEvent {
command: string;
params: SomeOptions;
}
Name | Description | command | params |
---|---|---|---|
sendChatPrompt response | Provides response to sendChatPrompt request | aws/chat/sendChatPrompt | ChatResult |
openTab request | Request to open tab (creates tab if no tabId provided) | aws/chat/openTab | requestID - ID shared between the webview and vscode client, OpenTabParams |
sendToPrompt | Request to send selection to prompt | sendToPrompt | SendToPromptParams |
genericCommand | Request to execute generic command | genericCommand | GenericCommandParams |
errorMessage | Request to show error in chat UI | errorMessage | ErrorParams |
chatOptions | Configures chat startup options | chatOptions | ChatOptions |
chatUpdate | Updates existing chat messages | aws/chat/sendChatUpdate | ChatUpdateParams |
contextCommand | Sends context commands to the UI | aws/chat/sendContextCommands | ContextCommandParams |
listConversations response | Provides response with list of history conversations to the UI | aws/chat/listConversations | ListConversationsResult |
conversationClick response | Provides response to conversation click or action, specifying action execution result | aws/chat/conversationClick | ConversationClickResult |
getSerializedChat request | Request to get serialized chat | aws/chat/getSerializedChat | GetSerializedChatParams |
chatOptionsUpdate | Sends chat options update request from server | aws/chat/chatOptionsUpdate | ChatOptionsUpdateParams |
listRules response | Provides response with list of workspace rules to the UI | aws/chat/listRules | ListRulesResult |
ruleClicked response | Provides response to rule click or action, specifying action execution result | aws/chat/ruleClick | RuleClickResult |
addSelectedFilesToContext | Request to add selected files to context | aws/chat/openFileDialog | OpenFileDialogResult |
sendPinnedContext | Sends pinned context information to the UI | aws/chat/sendPinnedContext | PinnedContextParams |
Name | Description | command | params |
---|---|---|---|
openTab response | Provides response to openTab request | aws/chat/openTab | requestID - ID shared between the webview and vscode client, UiMessageResultParams with result of type OpenTabResult |
disclaimerAcknowledged | Notifies destination that legal disclaimer was acknowledged by a user | disclaimerAcknowledged | N/A |
sendChatPrompt | Sends a chat prompt to the server | aws/chat/sendChatPrompt | ChatParams |
sendQuickActionCommand | Sends a quick action command | aws/chat/quickAction | QuickActionParams |
tabAdded | Notifies when a tab is added | aws/chat/tabAdd | TabAddParams |
tabChanged | Notifies when a tab is changed | aws/chat/tabChange | TabChangeParams |
tabRemoved | Notifies when a tab is removed | aws/chat/tabRemove | TabRemoveParams |
insertToCursorPosition | Requests to insert code at cursor position | insertToCursorPosition | InsertToCursorPositionParams |
copyToClipboard | Requests to copy code to clipboard | copyToClipboard | CopyCodeToClipboardParams |
authFollowUpClicked | Notifies when an auth follow-up is clicked | authFollowUpClicked | AuthFollowUpClickedParams |
followUpClicked | Notifies when a follow-up suggestion is clicked | aws/chat/followUpClick | FollowUpClickParams |
sendFeedback | Sends user feedback | aws/chat/feedback | FeedbackParams |
linkClick | Notifies when a link is clicked | aws/chat/linkClick | LinkClickParams |
sourceLinkClick | Notifies when a source link is clicked | aws/chat/sourceLinkClick | SourceLinkClickParams |
infoLinkClick | Notifies when an info link is clicked | aws/chat/infoLinkClick | InfoLinkClickParams |
uiReady | Notifies when the UI is ready | aws/chat/ready | N/A |
chatPromptOptionAcknowledged | Notifies when a chat prompt option is acknowledged | chatPromptOptionAcknowledged | ChatPromptOptionAcknowledgedParams |
createPrompt | Requests to create a prompt | aws/chat/createPrompt | CreatePromptParams |
fileClick | Notifies when a file is clicked | aws/chat/fileClick | FileClickParams |
listConversations | Requests to list conversations with filter provided | aws/chat/listConversations | ListConversationsParams |
conversationClick | Notifies when a conversation is clicked | aws/chat/conversationClick | ConversationClickParams |
tabBarAction | Notifies when a tab bar action is requested | aws/chat/tabBarAction | TabBarActionParams |
getSerializedChat response | Provides response to getSerializedChat request | aws/chat/getSerializedChat | GetSerializedChatResult |
stopChatResponse | Requests to stop current chat response | stopChatResponse | StopChatResponseParams |
sendButtonClickEvent | Sends button click event | aws/chat/buttonClick | ButtonClickParams |
onOpenSettings | Requests to open settings | openSettings | OpenSettingsParams |
onRuleClick | Notifies when a rule is clicked | aws/chat/ruleClick | RuleClickParams |
listRules | Requests to list workspace rules | aws/chat/listRules | ListRulesParams |
onAddPinnedContext | Requests to add pinned context | aws/chat/addPinnedContext | PinnedContextParams |
onRemovePinnedContext | Requests to remove pinned context | aws/chat/removePinnedContext | PinnedContextParams |
onOpenFileDialogClick | Requests to open file dialog | openFileDialog | OpenFileDialogParams |
onFilesDropped | Notifies when files are dropped | filesDropped | FilesDroppedParams |
promptInputOptionChange | Notifies when prompt input options change | aws/chat/promptInputOptionChange | PromptInputOptionChangeParams |
Configuration can be passed as an explicit parameter when creating chat inside of webview, for example:
amazonQChat.createChat(acquireVsCodeApi(), configuration);
Configuration values:
// Configures quick actions
quickActionCommands?: QuickActionCommandGroup[]
// Configures chat client not to show legal disclaimer as it has already been acknowledged before
disclaimerAcknowledged?: boolean
FAQs
AWS Chat Client
The npm package @aws/chat-client receives a total of 3,190 weekly downloads. As such, @aws/chat-client popularity was classified as popular.
We found that @aws/chat-client demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 8 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.