npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@aws/chat-client

v0.1.46

Published

AWS Chat Client

Readme

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

| 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 |

Outbound events

| 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

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