@promptbook/wizard 0.101.0-2 → 0.101.0-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/esm/index.es.js CHANGED
@@ -36,7 +36,7 @@ const BOOK_LANGUAGE_VERSION = '1.0.0';
36
36
  * @generated
37
37
  * @see https://github.com/webgptorg/promptbook
38
38
  */
39
- const PROMPTBOOK_ENGINE_VERSION = '0.101.0-2';
39
+ const PROMPTBOOK_ENGINE_VERSION = '0.101.0-4';
40
40
  /**
41
41
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
42
42
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -119,4 +119,24 @@ export type ChatProps = {
119
119
  * Keys should match ChatMessage.from values (e.g., 'USER', 'AGENT_{id}', etc.)
120
120
  */
121
121
  readonly participants?: ReadonlyArray<ChatParticipant>;
122
+ /**
123
+ * Optional callback for handling user feedback on messages
124
+ * When provided, star rating buttons (1-5 stars) will be displayed next to each message
125
+ *
126
+ * @param feedback - Object containing the feedback data
127
+ * @param feedback.message - The message being rated
128
+ * @param feedback.rating - Star rating from 1 to 5
129
+ * @param feedback.textRating - Optional text feedback/note from user
130
+ * @param feedback.chatThread - Complete chat thread as string
131
+ * @param feedback.expectedAnswer - Optional expected answer provided by user
132
+ * @param feedback.url - Current page URL where feedback was given
133
+ */
134
+ onFeedback?(feedback: {
135
+ message: ChatMessage;
136
+ rating: number;
137
+ textRating: string;
138
+ chatThread: string;
139
+ expectedAnswer: string | null;
140
+ url: string;
141
+ }): Promisable<void>;
122
142
  };
@@ -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.101.0-1`).
18
+ * It follows semantic versioning (e.g., `0.101.0-3`).
19
19
  *
20
20
  * @generated
21
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/wizard",
3
- "version": "0.101.0-2",
3
+ "version": "0.101.0-4",
4
4
  "description": "Promptbook: Run AI apps in plain human language across multiple models and platforms",
5
5
  "private": false,
6
6
  "sideEffects": false,
@@ -95,7 +95,7 @@
95
95
  "module": "./esm/index.es.js",
96
96
  "typings": "./esm/typings/src/_packages/wizard.index.d.ts",
97
97
  "peerDependencies": {
98
- "@promptbook/core": "0.101.0-2"
98
+ "@promptbook/core": "0.101.0-4"
99
99
  },
100
100
  "dependencies": {
101
101
  "@ai-sdk/deepseek": "0.1.6",
package/umd/index.umd.js CHANGED
@@ -48,7 +48,7 @@
48
48
  * @generated
49
49
  * @see https://github.com/webgptorg/promptbook
50
50
  */
51
- const PROMPTBOOK_ENGINE_VERSION = '0.101.0-2';
51
+ const PROMPTBOOK_ENGINE_VERSION = '0.101.0-4';
52
52
  /**
53
53
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
54
54
  * Note: [💞] Ignore a discrepancy between file name and entity name