Skip to content

Commit 56f9bee

Browse files
authored
chore: extended chat_client interface documentation (#1388)
* chore: extended chat_client interface documentation * chore: updated description
1 parent 8b071d0 commit 56f9bee

File tree

1 file changed

+39
-14
lines changed

1 file changed

+39
-14
lines changed

chat-client/README.md

Lines changed: 39 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,48 @@ interface SomeEvent {
2222

2323
### Inbound events
2424

25-
| Name | Description | command | params |
26-
| ----------------------- | -------------------------------------------------------- | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
27-
| sendChatPrompt response | Provides response to sendChatPrompt request | `aws/chat/sendChatPrompt` | [ChatResult](https://github.com/aws/language-server-runtimes/blob/10e67de47600f20bf090ce8ec0ea318038a387f2/types/chat.ts#L77C18-L77C28) |
28-
| 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](https://github.com/aws/language-server-runtimes/blob/10e67de47600f20bf090ce8ec0ea318038a387f2/types/chat.ts#L200) |
29-
| sendToPrompt | Request to send selection to prompt | `sendToPrompt` | [SendToPromptParams](https://github.com/aws/language-server-runtimes/blob/fe2669c34479d4925f2bdbe5527417ea8aed6c39/chat-client-ui-types/src/uiContracts.ts#L50C18-L50C36) |
30-
| genericCommand | Request to execute generic command | `genericCommand` | [GenericCommandParams](https://github.com/aws/language-server-runtimes/blob/fe2669c34479d4925f2bdbe5527417ea8aed6c39/chat-client-ui-types/src/uiContracts.ts#L76) |
31-
| errorMessage | Request to show error in chat UI | `errorMessage` | [ErrorParams](https://github.com/aws/language-server-runtimes/blob/fe2669c34479d4925f2bdbe5527417ea8aed6c39/chat-client-ui-types/src/uiContracts.ts#L88C18-L88C29) |
32-
| chatOptions | Configures chat startup options | `chatOptions` | [ChatOptions](https://github.com/aws/language-server-runtimes/blob/main/types/chat.ts#L127) |
25+
| Name | Description | command | params |
26+
| ------------------------------ | -------------------------------------------------------- | -------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
27+
| sendChatPrompt response | Provides response to sendChatPrompt request | `aws/chat/sendChatPrompt` | [ChatResult](https://github.com/aws/language-server-runtimes/blob/10e67de47600f20bf090ce8ec0ea318038a387f2/types/chat.ts#L77C18-L77C28) |
28+
| 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](https://github.com/aws/language-server-runtimes/blob/10e67de47600f20bf090ce8ec0ea318038a387f2/types/chat.ts#L200) |
29+
| sendToPrompt | Request to send selection to prompt | `sendToPrompt` | [SendToPromptParams](https://github.com/aws/language-server-runtimes/blob/fe2669c34479d4925f2bdbe5527417ea8aed6c39/chat-client-ui-types/src/uiContracts.ts#L50C18-L50C36) |
30+
| genericCommand | Request to execute generic command | `genericCommand` | [GenericCommandParams](https://github.com/aws/language-server-runtimes/blob/fe2669c34479d4925f2bdbe5527417ea8aed6c39/chat-client-ui-types/src/uiContracts.ts#L76) |
31+
| errorMessage | Request to show error in chat UI | `errorMessage` | [ErrorParams](https://github.com/aws/language-server-runtimes/blob/fe2669c34479d4925f2bdbe5527417ea8aed6c39/chat-client-ui-types/src/uiContracts.ts#L88C18-L88C29) |
32+
| chatOptions | Configures chat startup options | `chatOptions` | [ChatOptions](https://github.com/aws/language-server-runtimes/blob/main/types/chat.ts#L127) |
33+
| chatUpdate | Updates existing chat messages | `aws/chat/sendChatUpdate` | [ChatUpdateParams](https://github.com/aws/language-server-runtimes/blob/112feba70219a98a12f13727d67c540205fa9c9f/types/chat.ts#L355) |
34+
| contextCommand | Sends context commands to the UI | `aws/chat/sendContextCommands` | [ContextCommandParams](https://github.com/aws/language-server-runtimes/blob/112feba70219a98a12f13727d67c540205fa9c9f/types/chat.ts#L393) |
35+
| listConversations response | Provides response with list of history conversations to the UI | `aws/chat/listConversations` | [ListConversationsResult](https://github.com/aws/language-server-runtimes/blob/112feba70219a98a12f13727d67c540205fa9c9f/types/chat.ts#L478) |
36+
| conversationClick response | Provides response to conversation click or action, specifying action execution result | `aws/chat/conversationClick` | [ConversationClickResult](https://github.com/aws/language-server-runtimes/blob/112feba70219a98a12f13727d67c540205fa9c9f/types/chat.ts#L512) |
37+
| getSerializedChat request | Request to get serialized chat | `aws/chat/getSerializedChat` | [GetSerializedChatParams](https://github.com/aws/language-server-runtimes/blob/112feba70219a98a12f13727d67c540205fa9c9f/types/chat.ts#L550) |
38+
| chatOptionsUpdate | Sends chat options update request from server | `aws/chat/chatOptionsUpdate` | [ChatOptionsUpdateParams](https://github.com/aws/language-server-runtimes/blob/112feba70219a98a12f13727d67c540205fa9c9f/types/chat.ts#L365) |
3339

3440
### Outbound events
3541

36-
| Name | Description | command | params |
37-
| ---------------------- | --------------------------------------------------------------------- | ------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
38-
| openTab response | Provides response to openTab request | `aws/chat/openTab` | requestID - ID shared between the webview and vscode client, [UiMessageResultParams](https://github.com/aws/language-server-runtimes/blob/10e67de47600f20bf090ce8ec0ea318038a387f2/chat-client-ui-types/src/uiContracts.ts#L129) with `result` of type [OpenTabResult](https://github.com/aws/language-server-runtimes/blob/main/types/chat.ts#L201) |
39-
| disclaimerAcknowledged | Notifies destination that legal disclaimer was acknowlegded by a user | `disclaimerAcknowledged` | N/A |
40-
41-
TODO: Provide full list of events
42+
| Name | Description | command | params |
43+
| --------------------------- | -------------------------------------------------------------------------- | -------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
44+
| openTab response | Provides response to openTab request | `aws/chat/openTab` | requestID - ID shared between the webview and vscode client, [UiMessageResultParams](https://github.com/aws/language-server-runtimes/blob/10e67de47600f20bf090ce8ec0ea318038a387f2/chat-client-ui-types/src/uiContracts.ts#L129) with `result` of type [OpenTabResult](https://github.com/aws/language-server-runtimes/blob/main/types/chat.ts#L201) |
45+
| disclaimerAcknowledged | Notifies destination that legal disclaimer was acknowledged by a user | `disclaimerAcknowledged` | N/A |
46+
| sendChatPrompt | Sends a chat prompt to the server | `aws/chat/sendChatPrompt` | [ChatParams](https://github.com/aws/language-server-runtimes/blob/112feba70219a98a12f13727d67c540205fa9c9f/types/chat.ts#L87) |
47+
| sendQuickActionCommand | Sends a quick action command | `aws/chat/quickAction` | [QuickActionParams](https://github.com/aws/language-server-runtimes/blob/112feba70219a98a12f13727d67c540205fa9c9f/types/chat.ts#L261) |
48+
| tabAdded | Notifies when a tab is added | `aws/chat/tabAdd` | [TabAddParams](https://github.com/aws/language-server-runtimes/blob/112feba70219a98a12f13727d67c540205fa9c9f/types/chat.ts#L288) |
49+
| tabChanged | Notifies when a tab is changed | `aws/chat/tabChange` | [TabChangeParams](https://github.com/aws/language-server-runtimes/blob/112feba70219a98a12f13727d67c540205fa9c9f/types/chat.ts#L290) |
50+
| tabRemoved | Notifies when a tab is removed | `aws/chat/tabRemove` | [TabRemoveParams](https://github.com/aws/language-server-runtimes/blob/112feba70219a98a12f13727d67c540205fa9c9f/types/chat.ts#L292) |
51+
| insertToCursorPosition | Requests to insert code at cursor position | `insertToCursorPosition` | [InsertToCursorPositionParams](https://github.com/aws/language-server-runtimes/blob/112feba70219a98a12f13727d67c540205fa9c9f/types/chat.ts#L294) |
52+
| copyToClipboard | Requests to copy code to clipboard | `copyToClipboard` | [CopyCodeToClipboardParams](https://github.com/aws/language-server-runtimes/blob/112feba70219a98a12f13727d67c540205fa9c9f/chat-client-ui-types/src/uiContracts.ts#L142) |
53+
| authFollowUpClicked | Notifies when an auth follow-up is clicked | `authFollowUpClicked` | [AuthFollowUpClickedParams](https://github.com/aws/language-server-runtimes/blob/112feba70219a98a12f13727d67c540205fa9c9f/chat-client-ui-types/src/uiContracts.ts#L84) |
54+
| followUpClicked | Notifies when a follow-up suggestion is clicked | `aws/chat/followUpClick` | [FollowUpClickParams](https://github.com/aws/language-server-runtimes/blob/112feba70219a98a12f13727d67c540205fa9c9f/types/chat.ts#L320) |
55+
| sendFeedback | Sends user feedback | `aws/chat/feedback` | [FeedbackParams](https://github.com/aws/language-server-runtimes/blob/112feba70219a98a12f13727d67c540205fa9c9f/types/chat.ts#L278) |
56+
| linkClick | Notifies when a link is clicked | `aws/chat/linkClick` | [LinkClickParams](https://github.com/aws/language-server-runtimes/blob/112feba70219a98a12f13727d67c540205fa9c9f/types/chat.ts#L312) |
57+
| sourceLinkClick | Notifies when a source link is clicked | `aws/chat/sourceLinkClick` | [SourceLinkClickParams](https://github.com/aws/language-server-runtimes/blob/112feba70219a98a12f13727d67c540205fa9c9f/types/chat.ts#L316) |
58+
| infoLinkClick | Notifies when an info link is clicked | `aws/chat/infoLinkClick` | [InfoLinkClickParams](https://github.com/aws/language-server-runtimes/blob/112feba70219a98a12f13727d67c540205fa9c9f/types/chat.ts#L307) |
59+
| uiReady | Notifies when the UI is ready | `aws/chat/ready` | N/A |
60+
| chatPromptOptionAcknowledged | Notifies when a chat prompt option is acknowledged | `chatPromptOptionAcknowledged` | [ChatPromptOptionAcknowledgedParams](https://github.com/aws/language-server-runtimes/blob/112feba70219a98a12f13727d67c540205fa9c9f/chat-client-ui-types/src/uiContracts.ts#L107C18-L107C52) |
61+
| createPrompt | Requests to create a prompt | `aws/chat/createPrompt` | [CreatePromptParams](https://github.com/aws/language-server-runtimes/blob/112feba70219a98a12f13727d67c540205fa9c9f/types/chat.ts#L397) |
62+
| fileClick | Notifies when a file is clicked | `aws/chat/fileClick` | [FileClickParams](https://github.com/aws/language-server-runtimes/blob/112feba70219a98a12f13727d67c540205fa9c9f/types/chat.ts#L371) |
63+
| listConversations | Requests to list conversations with filter provided | `aws/chat/listConversations` | [ListConversationsParams](https://github.com/aws/language-server-runtimes/blob/112feba70219a98a12f13727d67c540205fa9c9f/types/chat.ts#L463) |
64+
| conversationClick | Notifies when a conversation is clicked | `aws/chat/conversationClick` | [ConversationClickParams](https://github.com/aws/language-server-runtimes/blob/112feba70219a98a12f13727d67c540205fa9c9f/types/chat.ts#L507) |
65+
| tabBarAction | Notifies when a tab bar action is requested | `aws/chat/tabBarAction` | [TabBarActionParams](https://github.com/aws/language-server-runtimes/blob/112feba70219a98a12f13727d67c540205fa9c9f/types/chat.ts#L541) |
66+
| getSerializedChat response | Provides response to getSerializedChat request | `aws/chat/getSerializedChat` | [GetSerializedChatResult](https://github.com/aws/language-server-runtimes/blob/112feba70219a98a12f13727d67c540205fa9c9f/types/chat.ts#L554) |
4267

4368
### Configuration
4469

0 commit comments

Comments
 (0)