@promptbook/utils 0.102.0-7 → 0.102.0-9

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/esm/index.es.js CHANGED
@@ -16,7 +16,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
16
16
  * @generated
17
17
  * @see https://github.com/webgptorg/promptbook
18
18
  */
19
- const PROMPTBOOK_ENGINE_VERSION = '0.102.0-7';
19
+ const PROMPTBOOK_ENGINE_VERSION = '0.102.0-9';
20
20
  /**
21
21
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
22
22
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -17,11 +17,15 @@ type ChatMessageItemProps = Pick<ChatProps, 'onMessage' | 'participants'> & {
17
17
  currentRating: number;
18
18
  handleRating: (message: ChatMessage, rating: number) => void;
19
19
  mode: 'LIGHT' | 'DARK';
20
+ /**
21
+ * Enables the copy button for this message bubble.
22
+ */
23
+ isCopyButtonEnabled?: boolean;
20
24
  };
21
25
  /**
22
26
  * Renders a single chat message item with avatar, content, buttons, and rating.
23
27
  *
24
28
  * @private internal subcomponent of `<Chat>` component
25
29
  */
26
- export declare const ChatMessageItem: import("react").MemoExoticComponent<({ message, participant, participants, isLastMessage, onMessage, setExpandedMessageId, isExpanded, currentRating, handleRating, mode, }: ChatMessageItemProps) => import("react/jsx-runtime").JSX.Element>;
30
+ export declare const ChatMessageItem: import("react").MemoExoticComponent<({ message, participant, participants, isLastMessage, onMessage, setExpandedMessageId, isExpanded, currentRating, handleRating, mode, isCopyButtonEnabled, }: ChatMessageItemProps) => import("react/jsx-runtime").JSX.Element>;
27
31
  export {};
@@ -161,6 +161,12 @@ export type ChatProps = {
161
161
  * @returns Promise or string with the text content to insert into the chat message
162
162
  */
163
163
  onFileUpload?(file: File): Promisable<string>;
164
+ /**
165
+ * Enables the copy button for each message bubble.
166
+ * When true, a copy button appears in the top-right of each message.
167
+ * @default true
168
+ */
169
+ isCopyButtonEnabled?: boolean;
164
170
  };
165
171
  /**
166
172
  * TODO: [☁️] Export component prop types only to `@promptbook/components` (not `@promptbook/types`)
@@ -10,6 +10,11 @@ import type { ChatParticipant } from '../types/ChatParticipant';
10
10
  * @public exported from `@promptbook/components`
11
11
  */
12
12
  export type LlmChatProps = Omit<ChatProps, 'messages' | 'onMessage' | 'onChange'> & {
13
+ /**
14
+ * Optional thread (full chat history) to be passed to LLM execution tools.
15
+ * If not provided, the internal messages state will be used.
16
+ */
17
+ readonly thread?: ReadonlyArray<ChatMessage>;
13
18
  /**
14
19
  * LLM execution tools for chatting with the model
15
20
  */
@@ -5,6 +5,7 @@ import type { string_html } from '../../types/typeAliases';
5
5
  * @param content raw html code
6
6
  * @returns formatted html code
7
7
  * @private withing the package because of HUGE size of prettier dependency
8
+ * @deprecated Prettier removed from Promptbook due to package size
8
9
  */
9
10
  export declare function prettifyMarkdown<TContent extends string_html>(content: TContent): TContent;
10
11
  /**
@@ -13,5 +14,6 @@ export declare function prettifyMarkdown<TContent extends string_html>(content:
13
14
  * @param content raw html code
14
15
  * @returns formatted html code
15
16
  * @private withing the package because of HUGE size of prettier dependency
17
+ * @deprecated Prettier removed from Promptbook due to package size
16
18
  */
17
19
  export declare function prettifyMarkdownAsync<TContent extends string_html>(content: TContent): Promise<TContent>;
@@ -15,7 +15,7 @@ export declare const BOOK_LANGUAGE_VERSION: string_semantic_version;
15
15
  export declare const PROMPTBOOK_ENGINE_VERSION: string_promptbook_version;
16
16
  /**
17
17
  * Represents the version string of the Promptbook engine.
18
- * It follows semantic versioning (e.g., `0.102.0-6`).
18
+ * It follows semantic versioning (e.g., `0.102.0-8`).
19
19
  *
20
20
  * @generated
21
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/utils",
3
- "version": "0.102.0-7",
3
+ "version": "0.102.0-9",
4
4
  "description": "Promptbook: Run AI apps in plain human language across multiple models and platforms",
5
5
  "private": false,
6
6
  "sideEffects": false,
package/umd/index.umd.js CHANGED
@@ -22,7 +22,7 @@
22
22
  * @generated
23
23
  * @see https://github.com/webgptorg/promptbook
24
24
  */
25
- const PROMPTBOOK_ENGINE_VERSION = '0.102.0-7';
25
+ const PROMPTBOOK_ENGINE_VERSION = '0.102.0-9';
26
26
  /**
27
27
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
28
28
  * Note: [💞] Ignore a discrepancy between file name and entity name