@promptbook/cli 0.112.0-27 → 0.112.0-29

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
@@ -57,7 +57,7 @@ const BOOK_LANGUAGE_VERSION = '2.0.0';
57
57
  * @generated
58
58
  * @see https://github.com/webgptorg/promptbook
59
59
  */
60
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-27';
60
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-29';
61
61
  /**
62
62
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
63
63
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -17,6 +17,7 @@ import type { AgentChatProps } from '../book-components/Chat/AgentChat/AgentChat
17
17
  import { Chat } from '../book-components/Chat/Chat/Chat';
18
18
  import type { ChatFeedbackResponse } from '../book-components/Chat/Chat/ChatProps';
19
19
  import type { ChatFeedbackMode } from '../book-components/Chat/Chat/ChatProps';
20
+ import type { ChatFeedbackTranslations } from '../book-components/Chat/Chat/ChatProps';
20
21
  import type { ChatSoundSystem } from '../book-components/Chat/Chat/ChatProps';
21
22
  import type { ChatProps } from '../book-components/Chat/Chat/ChatProps';
22
23
  import { ChatSoundToggle } from '../book-components/Chat/Chat/ChatSoundToggle';
@@ -94,6 +95,7 @@ export type { AgentChatProps };
94
95
  export { Chat };
95
96
  export type { ChatFeedbackResponse };
96
97
  export type { ChatFeedbackMode };
98
+ export type { ChatFeedbackTranslations };
97
99
  export type { ChatSoundSystem };
98
100
  export type { ChatProps };
99
101
  export { ChatSoundToggle };
@@ -18,6 +18,7 @@ import type { AgentChipData } from '../book-components/Chat/AgentChip/AgentChip'
18
18
  import type { AgentChipProps } from '../book-components/Chat/AgentChip/AgentChip';
19
19
  import type { ChatFeedbackResponse } from '../book-components/Chat/Chat/ChatProps';
20
20
  import type { ChatFeedbackMode } from '../book-components/Chat/Chat/ChatProps';
21
+ import type { ChatFeedbackTranslations } from '../book-components/Chat/Chat/ChatProps';
21
22
  import type { ChatSoundSystem } from '../book-components/Chat/Chat/ChatProps';
22
23
  import type { ChatProps } from '../book-components/Chat/Chat/ChatProps';
23
24
  import type { ChatSoundToggleProps } from '../book-components/Chat/Chat/ChatSoundToggle';
@@ -442,6 +443,7 @@ export type { AgentChipData };
442
443
  export type { AgentChipProps };
443
444
  export type { ChatFeedbackResponse };
444
445
  export type { ChatFeedbackMode };
446
+ export type { ChatFeedbackTranslations };
445
447
  export type { ChatSoundSystem };
446
448
  export type { ChatProps };
447
449
  export type { ChatSoundToggleProps };
@@ -30,6 +30,10 @@ type ChatMessageItemProps = Pick<ChatProps, 'onMessage' | 'onActionButton' | 'pa
30
30
  * Chooses which feedback controls should be rendered.
31
31
  */
32
32
  feedbackMode?: ChatProps['feedbackMode'];
33
+ /**
34
+ * Optional localized labels used by feedback controls.
35
+ */
36
+ feedbackTranslations?: ChatProps['feedbackTranslations'];
33
37
  /**
34
38
  * Called when the copy button is pressed.
35
39
  */
@@ -24,6 +24,10 @@ export type ChatMessageListProps = {
24
24
  * Chooses which feedback controls should be rendered.
25
25
  */
26
26
  feedbackMode?: ChatProps['feedbackMode'];
27
+ /**
28
+ * Optional localized labels used by feedback controls.
29
+ */
30
+ feedbackTranslations?: ChatProps['feedbackTranslations'];
27
31
  onCopy?: () => void;
28
32
  onMessage?: (messageContent: string) => Promisable<void>;
29
33
  onActionButton?: ChatProps['onActionButton'];
@@ -24,6 +24,85 @@ export type ChatFeedbackResponse = {
24
24
  * @public exported from `@promptbook/components`
25
25
  */
26
26
  export type ChatFeedbackMode = 'off' | 'stars' | 'report_issue';
27
+ /**
28
+ * Optional text overrides for feedback UI copy.
29
+ *
30
+ * @public exported from `@promptbook/components`
31
+ */
32
+ export type ChatFeedbackTranslations = {
33
+ /**
34
+ * Tooltip shown on the report-issue quick action button.
35
+ */
36
+ readonly reportIssueButtonTitle?: string;
37
+ /**
38
+ * Accessible label shown on the report-issue quick action button.
39
+ */
40
+ readonly reportIssueButtonAriaLabel?: string;
41
+ /**
42
+ * Modal heading shown when user reports an issue.
43
+ */
44
+ readonly reportIssueModalTitle?: string;
45
+ /**
46
+ * Modal heading shown when user rates a response with stars.
47
+ */
48
+ readonly rateResponseModalTitle?: string;
49
+ /**
50
+ * Label shown above the original user question preview.
51
+ */
52
+ readonly userQuestionLabel?: string;
53
+ /**
54
+ * Label for expected-answer field in report-issue mode.
55
+ */
56
+ readonly reportIssueExpectedAnswerLabel?: string;
57
+ /**
58
+ * Label for expected-answer field in stars mode.
59
+ */
60
+ readonly expectedAnswerLabel?: string;
61
+ /**
62
+ * Placeholder for expected-answer input.
63
+ */
64
+ readonly expectedAnswerPlaceholder?: string;
65
+ /**
66
+ * Label for free-form issue details in report-issue mode.
67
+ */
68
+ readonly reportIssueDetailsLabel?: string;
69
+ /**
70
+ * Label for free-form note input in stars mode.
71
+ */
72
+ readonly noteLabel?: string;
73
+ /**
74
+ * Placeholder for free-form issue details input.
75
+ */
76
+ readonly reportIssueDetailsPlaceholder?: string;
77
+ /**
78
+ * Placeholder for free-form note input.
79
+ */
80
+ readonly notePlaceholder?: string;
81
+ /**
82
+ * Cancel button label shown in the feedback modal.
83
+ */
84
+ readonly cancelLabel?: string;
85
+ /**
86
+ * Submit button label shown in report-issue mode.
87
+ */
88
+ readonly reportIssueSubmitLabel?: string;
89
+ /**
90
+ * Submit button label shown in stars mode.
91
+ */
92
+ readonly submitLabel?: string;
93
+ /**
94
+ * Toast message shown when generic feedback is stored.
95
+ */
96
+ readonly feedbackSuccessMessage?: string;
97
+ /**
98
+ * Toast message shown when issue report is stored.
99
+ */
100
+ readonly reportIssueSuccessMessage?: string;
101
+ /**
102
+ * Toast message shown when feedback storage fails.
103
+ */
104
+ readonly feedbackErrorMessage?: string;
105
+ };
27
106
  /**
28
107
  * Interface for sound system that can be passed to Chat component
29
108
  * This allows the chat to trigger sounds without tight coupling
@@ -305,6 +384,10 @@ export type ChatProps = {
305
384
  * @default 'stars'
306
385
  */
307
386
  readonly feedbackMode?: ChatFeedbackMode;
387
+ /**
388
+ * Optional localized feedback labels for buttons, modal copy, and status toasts.
389
+ */
390
+ readonly feedbackTranslations?: ChatFeedbackTranslations;
308
391
  /**
309
392
  * Optional callback for handling file uploads
310
393
  * When provided, enables file upload functionality via drag-and-drop and file button
@@ -1,6 +1,6 @@
1
1
  import type { id } from '../../../types/typeAliases';
2
2
  import type { ChatMessage } from '../types/ChatMessage';
3
- import type { ChatFeedbackMode } from './ChatProps';
3
+ import type { ChatFeedbackMode, ChatProps } from './ChatProps';
4
4
  /**
5
5
  * Props for the rating modal used in Chat.
6
6
  *
@@ -18,6 +18,10 @@ export type ChatRatingModalProps = {
18
18
  * Chooses which feedback flow the modal should render.
19
19
  */
20
20
  feedbackMode: ChatFeedbackMode;
21
+ /**
22
+ * Optional localized labels used by feedback controls.
23
+ */
24
+ feedbackTranslations?: ChatProps['feedbackTranslations'];
21
25
  mode: 'LIGHT' | 'DARK';
22
26
  isMobile: boolean;
23
27
  onClose: () => void;
@@ -1,7 +1,7 @@
1
1
  import type { Promisable } from 'type-fest';
2
2
  import type { id } from '../../../types/typeAliases';
3
3
  import type { ChatMessage } from '../types/ChatMessage';
4
- import type { ChatFeedbackMode, ChatFeedbackResponse } from '../Chat/ChatProps';
4
+ import type { ChatFeedbackMode, ChatFeedbackResponse, ChatProps } from '../Chat/ChatProps';
5
5
  /**
6
6
  * Input parameters for the chat rating hook.
7
7
  *
@@ -27,6 +27,10 @@ export type UseChatRatingsOptions = {
27
27
  * Feedback mode currently used by the chat UI.
28
28
  */
29
29
  feedbackMode: ChatFeedbackMode;
30
+ /**
31
+ * Optional localized labels and status messages used by the feedback UI.
32
+ */
33
+ feedbackTranslations?: ChatProps['feedbackTranslations'];
30
34
  /**
31
35
  * Whether the UI should apply mobile-specific behavior.
32
36
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@promptbook/cli",
3
- "version": "0.112.0-27",
3
+ "version": "0.112.0-29",
4
4
  "description": "Promptbook: Turn your company's scattered knowledge into AI ready books",
5
5
  "private": false,
6
6
  "sideEffects": false,
package/umd/index.umd.js CHANGED
@@ -60,7 +60,7 @@
60
60
  * @generated
61
61
  * @see https://github.com/webgptorg/promptbook
62
62
  */
63
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-27';
63
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-29';
64
64
  /**
65
65
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
66
66
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -17,6 +17,7 @@ import type { AgentChatProps } from '../book-components/Chat/AgentChat/AgentChat
17
17
  import { Chat } from '../book-components/Chat/Chat/Chat';
18
18
  import type { ChatFeedbackResponse } from '../book-components/Chat/Chat/ChatProps';
19
19
  import type { ChatFeedbackMode } from '../book-components/Chat/Chat/ChatProps';
20
+ import type { ChatFeedbackTranslations } from '../book-components/Chat/Chat/ChatProps';
20
21
  import type { ChatSoundSystem } from '../book-components/Chat/Chat/ChatProps';
21
22
  import type { ChatProps } from '../book-components/Chat/Chat/ChatProps';
22
23
  import { ChatSoundToggle } from '../book-components/Chat/Chat/ChatSoundToggle';
@@ -94,6 +95,7 @@ export type { AgentChatProps };
94
95
  export { Chat };
95
96
  export type { ChatFeedbackResponse };
96
97
  export type { ChatFeedbackMode };
98
+ export type { ChatFeedbackTranslations };
97
99
  export type { ChatSoundSystem };
98
100
  export type { ChatProps };
99
101
  export { ChatSoundToggle };
@@ -18,6 +18,7 @@ import type { AgentChipData } from '../book-components/Chat/AgentChip/AgentChip'
18
18
  import type { AgentChipProps } from '../book-components/Chat/AgentChip/AgentChip';
19
19
  import type { ChatFeedbackResponse } from '../book-components/Chat/Chat/ChatProps';
20
20
  import type { ChatFeedbackMode } from '../book-components/Chat/Chat/ChatProps';
21
+ import type { ChatFeedbackTranslations } from '../book-components/Chat/Chat/ChatProps';
21
22
  import type { ChatSoundSystem } from '../book-components/Chat/Chat/ChatProps';
22
23
  import type { ChatProps } from '../book-components/Chat/Chat/ChatProps';
23
24
  import type { ChatSoundToggleProps } from '../book-components/Chat/Chat/ChatSoundToggle';
@@ -442,6 +443,7 @@ export type { AgentChipData };
442
443
  export type { AgentChipProps };
443
444
  export type { ChatFeedbackResponse };
444
445
  export type { ChatFeedbackMode };
446
+ export type { ChatFeedbackTranslations };
445
447
  export type { ChatSoundSystem };
446
448
  export type { ChatProps };
447
449
  export type { ChatSoundToggleProps };
@@ -30,6 +30,10 @@ type ChatMessageItemProps = Pick<ChatProps, 'onMessage' | 'onActionButton' | 'pa
30
30
  * Chooses which feedback controls should be rendered.
31
31
  */
32
32
  feedbackMode?: ChatProps['feedbackMode'];
33
+ /**
34
+ * Optional localized labels used by feedback controls.
35
+ */
36
+ feedbackTranslations?: ChatProps['feedbackTranslations'];
33
37
  /**
34
38
  * Called when the copy button is pressed.
35
39
  */
@@ -24,6 +24,10 @@ export type ChatMessageListProps = {
24
24
  * Chooses which feedback controls should be rendered.
25
25
  */
26
26
  feedbackMode?: ChatProps['feedbackMode'];
27
+ /**
28
+ * Optional localized labels used by feedback controls.
29
+ */
30
+ feedbackTranslations?: ChatProps['feedbackTranslations'];
27
31
  onCopy?: () => void;
28
32
  onMessage?: (messageContent: string) => Promisable<void>;
29
33
  onActionButton?: ChatProps['onActionButton'];
@@ -24,6 +24,85 @@ export type ChatFeedbackResponse = {
24
24
  * @public exported from `@promptbook/components`
25
25
  */
26
26
  export type ChatFeedbackMode = 'off' | 'stars' | 'report_issue';
27
+ /**
28
+ * Optional text overrides for feedback UI copy.
29
+ *
30
+ * @public exported from `@promptbook/components`
31
+ */
32
+ export type ChatFeedbackTranslations = {
33
+ /**
34
+ * Tooltip shown on the report-issue quick action button.
35
+ */
36
+ readonly reportIssueButtonTitle?: string;
37
+ /**
38
+ * Accessible label shown on the report-issue quick action button.
39
+ */
40
+ readonly reportIssueButtonAriaLabel?: string;
41
+ /**
42
+ * Modal heading shown when user reports an issue.
43
+ */
44
+ readonly reportIssueModalTitle?: string;
45
+ /**
46
+ * Modal heading shown when user rates a response with stars.
47
+ */
48
+ readonly rateResponseModalTitle?: string;
49
+ /**
50
+ * Label shown above the original user question preview.
51
+ */
52
+ readonly userQuestionLabel?: string;
53
+ /**
54
+ * Label for expected-answer field in report-issue mode.
55
+ */
56
+ readonly reportIssueExpectedAnswerLabel?: string;
57
+ /**
58
+ * Label for expected-answer field in stars mode.
59
+ */
60
+ readonly expectedAnswerLabel?: string;
61
+ /**
62
+ * Placeholder for expected-answer input.
63
+ */
64
+ readonly expectedAnswerPlaceholder?: string;
65
+ /**
66
+ * Label for free-form issue details in report-issue mode.
67
+ */
68
+ readonly reportIssueDetailsLabel?: string;
69
+ /**
70
+ * Label for free-form note input in stars mode.
71
+ */
72
+ readonly noteLabel?: string;
73
+ /**
74
+ * Placeholder for free-form issue details input.
75
+ */
76
+ readonly reportIssueDetailsPlaceholder?: string;
77
+ /**
78
+ * Placeholder for free-form note input.
79
+ */
80
+ readonly notePlaceholder?: string;
81
+ /**
82
+ * Cancel button label shown in the feedback modal.
83
+ */
84
+ readonly cancelLabel?: string;
85
+ /**
86
+ * Submit button label shown in report-issue mode.
87
+ */
88
+ readonly reportIssueSubmitLabel?: string;
89
+ /**
90
+ * Submit button label shown in stars mode.
91
+ */
92
+ readonly submitLabel?: string;
93
+ /**
94
+ * Toast message shown when generic feedback is stored.
95
+ */
96
+ readonly feedbackSuccessMessage?: string;
97
+ /**
98
+ * Toast message shown when issue report is stored.
99
+ */
100
+ readonly reportIssueSuccessMessage?: string;
101
+ /**
102
+ * Toast message shown when feedback storage fails.
103
+ */
104
+ readonly feedbackErrorMessage?: string;
105
+ };
27
106
  /**
28
107
  * Interface for sound system that can be passed to Chat component
29
108
  * This allows the chat to trigger sounds without tight coupling
@@ -305,6 +384,10 @@ export type ChatProps = {
305
384
  * @default 'stars'
306
385
  */
307
386
  readonly feedbackMode?: ChatFeedbackMode;
387
+ /**
388
+ * Optional localized feedback labels for buttons, modal copy, and status toasts.
389
+ */
390
+ readonly feedbackTranslations?: ChatFeedbackTranslations;
308
391
  /**
309
392
  * Optional callback for handling file uploads
310
393
  * When provided, enables file upload functionality via drag-and-drop and file button
@@ -1,6 +1,6 @@
1
1
  import type { id } from '../../../types/typeAliases';
2
2
  import type { ChatMessage } from '../types/ChatMessage';
3
- import type { ChatFeedbackMode } from './ChatProps';
3
+ import type { ChatFeedbackMode, ChatProps } from './ChatProps';
4
4
  /**
5
5
  * Props for the rating modal used in Chat.
6
6
  *
@@ -18,6 +18,10 @@ export type ChatRatingModalProps = {
18
18
  * Chooses which feedback flow the modal should render.
19
19
  */
20
20
  feedbackMode: ChatFeedbackMode;
21
+ /**
22
+ * Optional localized labels used by feedback controls.
23
+ */
24
+ feedbackTranslations?: ChatProps['feedbackTranslations'];
21
25
  mode: 'LIGHT' | 'DARK';
22
26
  isMobile: boolean;
23
27
  onClose: () => void;
@@ -1,7 +1,7 @@
1
1
  import type { Promisable } from 'type-fest';
2
2
  import type { id } from '../../../types/typeAliases';
3
3
  import type { ChatMessage } from '../types/ChatMessage';
4
- import type { ChatFeedbackMode, ChatFeedbackResponse } from '../Chat/ChatProps';
4
+ import type { ChatFeedbackMode, ChatFeedbackResponse, ChatProps } from '../Chat/ChatProps';
5
5
  /**
6
6
  * Input parameters for the chat rating hook.
7
7
  *
@@ -27,6 +27,10 @@ export type UseChatRatingsOptions = {
27
27
  * Feedback mode currently used by the chat UI.
28
28
  */
29
29
  feedbackMode: ChatFeedbackMode;
30
+ /**
31
+ * Optional localized labels and status messages used by the feedback UI.
32
+ */
33
+ feedbackTranslations?: ChatProps['feedbackTranslations'];
30
34
  /**
31
35
  * Whether the UI should apply mobile-specific behavior.
32
36
  */