@icanbwell/baileyai-chat-ui 1.0.2 → 1.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/dist/baileyai-chat-ui.cjs +3 -3
- package/dist/baileyai-chat-ui.css +1 -1
- package/dist/baileyai-chat-ui.js +211 -186
- package/dist/index.d.ts +24 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -44,9 +44,16 @@ export declare type BaileyChartType = 'bar' | 'line' | 'pie' | 'doughnut' | 'sca
|
|
|
44
44
|
export declare interface BaileyChatInputMessage {
|
|
45
45
|
role: 'user' | 'assistant';
|
|
46
46
|
content: string;
|
|
47
|
+
/** Carried through from the originating BaileyMessage's `hidden` flag so a transport can
|
|
48
|
+
* signal the backend without it being rendered as part of the input array's own shape
|
|
49
|
+
* (e.g. a request-level metadata flag) — see BaileyMessage.hidden. */
|
|
50
|
+
hidden?: boolean;
|
|
51
|
+
/** Carried through from the originating BaileyMessage's `titleHint`, same pattern as
|
|
52
|
+
* `hidden` — see BaileyMessage.titleHint. */
|
|
53
|
+
titleHint?: string;
|
|
47
54
|
}
|
|
48
55
|
|
|
49
|
-
export declare function BaileyChatPanel({ chat, placeholder, replyPlaceholder, emptyPlaceholder, suggestions, privacyNote, resolveActivityIcon, className, height, width, hideDeveloperDetails, renderMessageActions, renderTable, renderChart, labels: labelsProp, formatMessageTime: formatMessageTimeProp, }: BaileyChatPanelProps): JSX_2.Element;
|
|
56
|
+
export declare function BaileyChatPanel({ chat, placeholder, replyPlaceholder, emptyPlaceholder, suggestions, onHistoryClick, privacyNote, resolveActivityIcon, className, height, width, hideDeveloperDetails, renderMessageActions, renderTable, renderChart, labels: labelsProp, formatMessageTime: formatMessageTimeProp, }: BaileyChatPanelProps): JSX_2.Element;
|
|
50
57
|
|
|
51
58
|
export declare interface BaileyChatPanelLabels {
|
|
52
59
|
/** Visible text on the header's reset control. */
|
|
@@ -54,6 +61,9 @@ export declare interface BaileyChatPanelLabels {
|
|
|
54
61
|
/** Accessible name for the reset control — lowercase to match this component's other
|
|
55
62
|
* aria-labels (send/stop/dismiss), which are also lowercase by existing convention. */
|
|
56
63
|
newChatAriaLabel: string;
|
|
64
|
+
/** Accessible name for the history control — only rendered when `onHistoryClick` is
|
|
65
|
+
* supplied (see BaileyChatPanelProps). Lowercase, same convention as newChatAriaLabel. */
|
|
66
|
+
historyAriaLabel: string;
|
|
57
67
|
/** Heading above the suggestion cards in the empty state. */
|
|
58
68
|
suggestionsTitle: string;
|
|
59
69
|
/** Shown in the empty state when no `suggestions` prop is supplied. */
|
|
@@ -96,6 +106,13 @@ export declare interface BaileyChatPanelProps extends BaileyMarkdownRenderers {
|
|
|
96
106
|
* been sent. Clicking one calls chat.send(value ?? label). Omit to keep the plain
|
|
97
107
|
* "Ask Bailey a question to get started." empty state. */
|
|
98
108
|
suggestions?: BaileySuggestion[];
|
|
109
|
+
/** Renders a history-icon control in the toolbar row, next to "New chat" — a host's entry
|
|
110
|
+
* point into its own conversation-history UI (this package has no opinion on how history
|
|
111
|
+
* is stored/listed; it only renders the trigger). Rendered regardless of `isEmpty`, unlike
|
|
112
|
+
* "New chat" (which only appears once a conversation has started) — history should stay
|
|
113
|
+
* reachable even before the first message. Omit entirely to keep today's toolbar row
|
|
114
|
+
* (just "New chat", nothing when empty). */
|
|
115
|
+
onHistoryClick?: () => void;
|
|
99
116
|
/** A short privacy/compliance note rendered below the input row, as the panel's bottom-most
|
|
100
117
|
* element — empty state only by default, or every state if `privacyNote.alwaysVisible` is
|
|
101
118
|
* set. No default — the exact copy/link is host-specific, so nothing is shown unless a host
|
|
@@ -195,6 +212,11 @@ export declare interface BaileyMessage {
|
|
|
195
212
|
* part of `historyRef` sent to the model. Distinguishes a hidden context message from the
|
|
196
213
|
* user's real first question so logic like `firstUserMessagePrefix` doesn't bind to it. */
|
|
197
214
|
hidden?: boolean;
|
|
215
|
+
/** Optional short, human-readable hint a host can pass to `sendHidden`, carried through to
|
|
216
|
+
* the outgoing input message unchanged (see BaileyChatInputMessage.titleHint). This package
|
|
217
|
+
* never reads or interprets it — it exists purely as a pass-through so a transport/backend
|
|
218
|
+
* can use it as a conversation-title fallback for a turn whose only content is hidden. */
|
|
219
|
+
titleHint?: string;
|
|
198
220
|
}
|
|
199
221
|
|
|
200
222
|
export declare interface BaileyOutputItem {
|
|
@@ -489,7 +511,7 @@ export declare interface UseBaileyChatResult {
|
|
|
489
511
|
* to the model on this and every later turn. For seeding Bailey with page/context-specific
|
|
490
512
|
* information a host wants answered but doesn't want cluttering the visible transcript.
|
|
491
513
|
* No-ops (does not start a new turn) while a turn is already in flight. */
|
|
492
|
-
sendHidden: (text: string) => void;
|
|
514
|
+
sendHidden: (text: string, titleHint?: string) => void;
|
|
493
515
|
stop: () => void;
|
|
494
516
|
retryLast: () => void;
|
|
495
517
|
clearTrace: () => void;
|