@icanbwell/baileyai-chat-ui 1.0.3 → 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 +209 -186
- package/dist/index.d.ts +20 -2
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -48,9 +48,12 @@ export declare interface BaileyChatInputMessage {
|
|
|
48
48
|
* signal the backend without it being rendered as part of the input array's own shape
|
|
49
49
|
* (e.g. a request-level metadata flag) — see BaileyMessage.hidden. */
|
|
50
50
|
hidden?: boolean;
|
|
51
|
+
/** Carried through from the originating BaileyMessage's `titleHint`, same pattern as
|
|
52
|
+
* `hidden` — see BaileyMessage.titleHint. */
|
|
53
|
+
titleHint?: string;
|
|
51
54
|
}
|
|
52
55
|
|
|
53
|
-
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;
|
|
54
57
|
|
|
55
58
|
export declare interface BaileyChatPanelLabels {
|
|
56
59
|
/** Visible text on the header's reset control. */
|
|
@@ -58,6 +61,9 @@ export declare interface BaileyChatPanelLabels {
|
|
|
58
61
|
/** Accessible name for the reset control — lowercase to match this component's other
|
|
59
62
|
* aria-labels (send/stop/dismiss), which are also lowercase by existing convention. */
|
|
60
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;
|
|
61
67
|
/** Heading above the suggestion cards in the empty state. */
|
|
62
68
|
suggestionsTitle: string;
|
|
63
69
|
/** Shown in the empty state when no `suggestions` prop is supplied. */
|
|
@@ -100,6 +106,13 @@ export declare interface BaileyChatPanelProps extends BaileyMarkdownRenderers {
|
|
|
100
106
|
* been sent. Clicking one calls chat.send(value ?? label). Omit to keep the plain
|
|
101
107
|
* "Ask Bailey a question to get started." empty state. */
|
|
102
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;
|
|
103
116
|
/** A short privacy/compliance note rendered below the input row, as the panel's bottom-most
|
|
104
117
|
* element — empty state only by default, or every state if `privacyNote.alwaysVisible` is
|
|
105
118
|
* set. No default — the exact copy/link is host-specific, so nothing is shown unless a host
|
|
@@ -199,6 +212,11 @@ export declare interface BaileyMessage {
|
|
|
199
212
|
* part of `historyRef` sent to the model. Distinguishes a hidden context message from the
|
|
200
213
|
* user's real first question so logic like `firstUserMessagePrefix` doesn't bind to it. */
|
|
201
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;
|
|
202
220
|
}
|
|
203
221
|
|
|
204
222
|
export declare interface BaileyOutputItem {
|
|
@@ -493,7 +511,7 @@ export declare interface UseBaileyChatResult {
|
|
|
493
511
|
* to the model on this and every later turn. For seeding Bailey with page/context-specific
|
|
494
512
|
* information a host wants answered but doesn't want cluttering the visible transcript.
|
|
495
513
|
* No-ops (does not start a new turn) while a turn is already in flight. */
|
|
496
|
-
sendHidden: (text: string) => void;
|
|
514
|
+
sendHidden: (text: string, titleHint?: string) => void;
|
|
497
515
|
stop: () => void;
|
|
498
516
|
retryLast: () => void;
|
|
499
517
|
clearTrace: () => void;
|