Socket
Book a DemoInstallSign in
Socket

@aws/chat-client

Package Overview
Dependencies
Maintainers
8
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws/chat-client

AWS Chat Client

0.1.34
latest
Source
npmnpm
Version published
Weekly downloads
3.3K
-33.73%
Maintainers
8
Weekly downloads
 
Created
Source

Q Chat Client

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.

Communication

The chat client communicates with the host application (e.g., an IDE extension) through postMessage requests to the webview:

  • When the host application sends a request, the client processes the message and sends it to the UI
  • When an event is triggered in the UI, the client sends a message through postMessage to the host application that rendered the chat client

Usage

To 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;
}

Inbound events

NameDescriptioncommandparams
sendChatPrompt responseProvides response to sendChatPrompt requestaws/chat/sendChatPromptChatResult
openTab requestRequest to open tab (creates tab if no tabId provided)aws/chat/openTabrequestID - ID shared between the webview and vscode client, OpenTabParams
sendToPromptRequest to send selection to promptsendToPromptSendToPromptParams
genericCommandRequest to execute generic commandgenericCommandGenericCommandParams
errorMessageRequest to show error in chat UIerrorMessageErrorParams
chatOptionsConfigures chat startup optionschatOptionsChatOptions
chatUpdateUpdates existing chat messagesaws/chat/sendChatUpdateChatUpdateParams
contextCommandSends context commands to the UIaws/chat/sendContextCommandsContextCommandParams
listConversations responseProvides response with list of history conversations to the UIaws/chat/listConversationsListConversationsResult
conversationClick responseProvides response to conversation click or action, specifying action execution resultaws/chat/conversationClickConversationClickResult
getSerializedChat requestRequest to get serialized chataws/chat/getSerializedChatGetSerializedChatParams
chatOptionsUpdateSends chat options update request from serveraws/chat/chatOptionsUpdateChatOptionsUpdateParams
listRules responseProvides response with list of workspace rules to the UIaws/chat/listRulesListRulesResult
ruleClicked responseProvides response to rule click or action, specifying action execution resultaws/chat/ruleClickRuleClickResult
addSelectedFilesToContextRequest to add selected files to contextaws/chat/openFileDialogOpenFileDialogResult
sendPinnedContextSends pinned context information to the UIaws/chat/sendPinnedContextPinnedContextParams

Outbound events

NameDescriptioncommandparams
openTab responseProvides response to openTab requestaws/chat/openTabrequestID - ID shared between the webview and vscode client, UiMessageResultParams with result of type OpenTabResult
disclaimerAcknowledgedNotifies destination that legal disclaimer was acknowledged by a userdisclaimerAcknowledgedN/A
sendChatPromptSends a chat prompt to the serveraws/chat/sendChatPromptChatParams
sendQuickActionCommandSends a quick action commandaws/chat/quickActionQuickActionParams
tabAddedNotifies when a tab is addedaws/chat/tabAddTabAddParams
tabChangedNotifies when a tab is changedaws/chat/tabChangeTabChangeParams
tabRemovedNotifies when a tab is removedaws/chat/tabRemoveTabRemoveParams
insertToCursorPositionRequests to insert code at cursor positioninsertToCursorPositionInsertToCursorPositionParams
copyToClipboardRequests to copy code to clipboardcopyToClipboardCopyCodeToClipboardParams
authFollowUpClickedNotifies when an auth follow-up is clickedauthFollowUpClickedAuthFollowUpClickedParams
followUpClickedNotifies when a follow-up suggestion is clickedaws/chat/followUpClickFollowUpClickParams
sendFeedbackSends user feedbackaws/chat/feedbackFeedbackParams
linkClickNotifies when a link is clickedaws/chat/linkClickLinkClickParams
sourceLinkClickNotifies when a source link is clickedaws/chat/sourceLinkClickSourceLinkClickParams
infoLinkClickNotifies when an info link is clickedaws/chat/infoLinkClickInfoLinkClickParams
uiReadyNotifies when the UI is readyaws/chat/readyN/A
chatPromptOptionAcknowledgedNotifies when a chat prompt option is acknowledgedchatPromptOptionAcknowledgedChatPromptOptionAcknowledgedParams
createPromptRequests to create a promptaws/chat/createPromptCreatePromptParams
fileClickNotifies when a file is clickedaws/chat/fileClickFileClickParams
listConversationsRequests to list conversations with filter providedaws/chat/listConversationsListConversationsParams
conversationClickNotifies when a conversation is clickedaws/chat/conversationClickConversationClickParams
tabBarActionNotifies when a tab bar action is requestedaws/chat/tabBarActionTabBarActionParams
getSerializedChat responseProvides response to getSerializedChat requestaws/chat/getSerializedChatGetSerializedChatResult
stopChatResponseRequests to stop current chat responsestopChatResponseStopChatResponseParams
sendButtonClickEventSends button click eventaws/chat/buttonClickButtonClickParams
onOpenSettingsRequests to open settingsopenSettingsOpenSettingsParams
onRuleClickNotifies when a rule is clickedaws/chat/ruleClickRuleClickParams
listRulesRequests to list workspace rulesaws/chat/listRulesListRulesParams
onAddPinnedContextRequests to add pinned contextaws/chat/addPinnedContextPinnedContextParams
onRemovePinnedContextRequests to remove pinned contextaws/chat/removePinnedContextPinnedContextParams
onOpenFileDialogClickRequests to open file dialogopenFileDialogOpenFileDialogParams
onFilesDroppedNotifies when files are droppedfilesDroppedFilesDroppedParams
promptInputOptionChangeNotifies when prompt input options changeaws/chat/promptInputOptionChangePromptInputOptionChangeParams

Configuration

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

Package last updated on 27 Aug 2025

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.