@icanbwell/baileyai-chat-ui 1.0.3 → 1.0.5

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/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 {
@@ -341,7 +359,16 @@ export declare interface CopyMarkdownButtonProps {
341
359
 
342
360
  export declare function createBaileyMarkdownComponents({ renderTable, renderChart }?: BaileyMarkdownRenderers): Components;
343
361
 
344
- export declare function extractPseudoToolCalls(text: string): ExtractPseudoToolCallsResult;
362
+ export declare function extractPseudoToolCalls(text: string, options?: ExtractPseudoToolCallsOptions): ExtractPseudoToolCallsResult;
363
+
364
+ declare interface ExtractPseudoToolCallsOptions {
365
+ /** Hide a still-open (unclosed) recognized tag from cleanedText, the same as a completed
366
+ * block. Defaults to true for mid-stream calls, where the tag is expected to close on a later
367
+ * delta. Pass false once the stream has ended (no later delta is coming) so a tag that never
368
+ * closed - a truncated response, or a malformed tag - stays visible instead of being silently
369
+ * and permanently swallowed. */
370
+ hideOpenBlock?: boolean;
371
+ }
345
372
 
346
373
  declare interface ExtractPseudoToolCallsResult {
347
374
  /** `text` with every matched block removed. */
@@ -493,7 +520,7 @@ export declare interface UseBaileyChatResult {
493
520
  * to the model on this and every later turn. For seeding Bailey with page/context-specific
494
521
  * information a host wants answered but doesn't want cluttering the visible transcript.
495
522
  * No-ops (does not start a new turn) while a turn is already in flight. */
496
- sendHidden: (text: string) => void;
523
+ sendHidden: (text: string, titleHint?: string) => void;
497
524
  stop: () => void;
498
525
  retryLast: () => void;
499
526
  clearTrace: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icanbwell/baileyai-chat-ui",
3
- "version": "1.0.3",
3
+ "version": "1.0.5",
4
4
  "description": "Shared React chat UI and streaming logic for Bailey, the icanbwell AI assistant",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {