@aws/mynah-ui 4.23.0-beta.2 → 4.23.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/helper/serialize-chat.d.ts +12 -0
- package/dist/main.d.ts +6 -0
- package/dist/main.js +1 -1
- package/dist/main.js.map +1 -1
- package/docs/USAGE.md +20 -0
- package/package.json +1 -1
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Serialize all (non-empty) chat messages in a tab to a markdown string
|
|
3
|
+
* @param tabId Corresponding tab ID.
|
|
4
|
+
* @returns The bodies of chat cards in markdown format, separated by \n\n---\n\n
|
|
5
|
+
*/
|
|
6
|
+
export declare const serializeMarkdown: (tabId: string) => string;
|
|
7
|
+
/**
|
|
8
|
+
* Serialize all (non-empty) chat messages in a tab to an HTML string
|
|
9
|
+
* @param tabId Corresponding tab ID.
|
|
10
|
+
* @returns The bodies of chat cards in HTML format
|
|
11
|
+
*/
|
|
12
|
+
export declare const serializeHtml: (tabId: string) => string;
|
package/dist/main.d.ts
CHANGED
|
@@ -118,6 +118,12 @@ export declare class MynahUI {
|
|
|
118
118
|
* @param updateWith ChatItem object to update with.
|
|
119
119
|
*/
|
|
120
120
|
updateChatAnswerWithMessageId: (tabId: string, messageId: string, updateWith: Partial<ChatItem>) => void;
|
|
121
|
+
/**
|
|
122
|
+
* Serialize all (non-empty) chat messages in a tab into a string
|
|
123
|
+
* @param tabId Corresponding tab ID.
|
|
124
|
+
* @param format Whether to serialize to markdown or HTML format
|
|
125
|
+
*/
|
|
126
|
+
serializeChat: (tabId: string, format: 'markdown' | 'html') => string;
|
|
121
127
|
/**
|
|
122
128
|
* Converts a card to an ANSWER if it is an ANSWER_STREAM
|
|
123
129
|
* @param tabId Corresponding tab ID.
|