@icanbwell/baileyai-chat-ui 1.0.29 → 1.1.1
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/README.md +49 -15
- package/dist/baileyai-chat-ui.cjs +3 -3
- package/dist/baileyai-chat-ui.css +1 -1
- package/dist/baileyai-chat-ui.js +818 -809
- package/dist/index.d.ts +22 -7
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -77,7 +77,7 @@ export declare interface BaileyChatInputMessage {
|
|
|
77
77
|
titleHint?: string;
|
|
78
78
|
}
|
|
79
79
|
|
|
80
|
-
export declare function BaileyChatPanel({ chat, placeholder, replyPlaceholder, emptyPlaceholder, suggestions, onHistoryClick, history, locale, privacyNote, resolveActivityIcon, sendIcon, className, height, width, hideDeveloperDetails, renderMessageActions, feedback, renderTable, renderChart, renderMcpApp, labels: labelsProp, formatMessageTime: formatMessageTimeProp, }: BaileyChatPanelProps): JSX_2.Element;
|
|
80
|
+
export declare function BaileyChatPanel({ chat, placeholder, replyPlaceholder, emptyPlaceholder, assistantName, suggestions, suggestionsAlign, hideMenuButton, onHistoryClick, history, locale, privacyNote, resolveActivityIcon, sendIcon, className, height, width, hideDeveloperDetails, renderMessageActions, feedback, renderTable, renderChart, renderMcpApp, labels: labelsProp, formatMessageTime: formatMessageTimeProp, }: BaileyChatPanelProps): JSX_2.Element;
|
|
81
81
|
|
|
82
82
|
export declare interface BaileyChatPanelLabels extends ToolStepLabels, Partial<BaileyHistoryLabels> {
|
|
83
83
|
/** Visible text of the "new chat" item in the "..." menu. */
|
|
@@ -160,8 +160,19 @@ export declare interface BaileyChatPanelProps extends BaileyMarkdownRenderers {
|
|
|
160
160
|
emptyPlaceholder?: string;
|
|
161
161
|
/** Suggested prompts shown ("Suggested for you") in the empty state before any message has
|
|
162
162
|
* been sent. Clicking one calls chat.send(value ?? label). Omit to keep the plain
|
|
163
|
-
* "Ask
|
|
163
|
+
* "Ask bailey a question to get started." empty state. */
|
|
164
164
|
suggestions?: BaileySuggestion[];
|
|
165
|
+
/** What the assistant is called in the panel's default copy (empty-state message, input
|
|
166
|
+
* placeholders, feedback prompt). Defaults to 'bailey'. An explicit `labels`, `placeholder`,
|
|
167
|
+
* `emptyPlaceholder` or `replyPlaceholder` still wins. Pass the same value to `useBaileyChat`
|
|
168
|
+
* to rename the assistant in its error messages. */
|
|
169
|
+
assistantName?: string;
|
|
170
|
+
/** Placement of the suggestion cards. Defaults to 'start' (full-width cards at the top). 'end'
|
|
171
|
+
* right-aligns them and anchors them to the bottom of the transcript, just above the input. */
|
|
172
|
+
suggestionsAlign?: 'start' | 'end';
|
|
173
|
+
/** Hides the "..." menu button beside the input row entirely — including its "New chat" and
|
|
174
|
+
* history items, so a host that sets this must provide its own entry points for both. */
|
|
175
|
+
hideMenuButton?: boolean;
|
|
165
176
|
/** Adds a history item to the "..." menu beside the input row, beneath "New chat" — a host's
|
|
166
177
|
* entry point into its own conversation-history UI (this package has no opinion on how
|
|
167
178
|
* history is stored/listed; it only renders the trigger). Rendered regardless of `isEmpty`,
|
|
@@ -213,8 +224,8 @@ export declare interface BaileyChatPanelProps extends BaileyMarkdownRenderers {
|
|
|
213
224
|
/** Thumbs up/down feedback on completed assistant messages. On by default whenever `chat` was
|
|
214
225
|
* created with a `client` (`chat.feedback`), a conversation id is held, and the message has a `serverMessageId`; the
|
|
215
226
|
* buttons render before `renderMessageActions`. Pass `false` to turn it off (e.g. when the
|
|
216
|
-
* host renders its own `BaileyFeedbackButtons
|
|
217
|
-
*
|
|
227
|
+
* host renders its own `BaileyFeedbackButtons`), or an object to tune the reason chips, comment
|
|
228
|
+
* limit or labels. The buttons hide for the session on a 503 or 405 from the feedback API. */
|
|
218
229
|
feedback?: false | Pick<BaileyFeedbackButtonsProps, 'reasonOptions' | 'maxCommentLength' | 'labels'>;
|
|
219
230
|
/** Overrides individual UI strings for localization — merged shallowly with English
|
|
220
231
|
* defaults, so a host only needs to supply the keys its i18n system actually translates.
|
|
@@ -417,6 +428,8 @@ export declare interface BaileyFeedbackButtonsProps {
|
|
|
417
428
|
/** Comment length limit; defaults to 2000 and can only be lowered. */
|
|
418
429
|
maxCommentLength?: number;
|
|
419
430
|
labels?: Partial<BaileyFeedbackLabels>;
|
|
431
|
+
/** What the assistant is called in the default comment placeholder. Defaults to 'bailey'. */
|
|
432
|
+
assistantName?: string;
|
|
420
433
|
className?: string;
|
|
421
434
|
}
|
|
422
435
|
|
|
@@ -1033,12 +1046,14 @@ export declare type TraceSegment = {
|
|
|
1033
1046
|
|
|
1034
1047
|
export declare function traceSummaryLine(events: BaileyTraceEvent[]): string;
|
|
1035
1048
|
|
|
1036
|
-
export declare const useBaileyChat: ({ transport, model, instructions, tools, toolChoice, firstUserMessagePrefix, onAssistantMessageComplete, idleTimeoutMs, client, conversationId: seedConversationId, sub: rawSub, storage: storageOption, storageKey, sendFullTranscript, onStorageError, onContextLoss, }: UseBaileyChatConfig) => UseBaileyChatResult;
|
|
1049
|
+
export declare const useBaileyChat: ({ transport, model, instructions, assistantName, tools, toolChoice, firstUserMessagePrefix, onAssistantMessageComplete, idleTimeoutMs, client, conversationId: seedConversationId, sub: rawSub, storage: storageOption, storageKey, sendFullTranscript, onStorageError, onContextLoss, }: UseBaileyChatConfig) => UseBaileyChatResult;
|
|
1037
1050
|
|
|
1038
1051
|
export declare interface UseBaileyChatConfig {
|
|
1039
1052
|
transport: BaileyChatTransport;
|
|
1040
1053
|
model: string;
|
|
1041
1054
|
instructions: string;
|
|
1055
|
+
/** What the assistant is called in user-facing error messages. Defaults to 'bailey'. */
|
|
1056
|
+
assistantName?: string;
|
|
1042
1057
|
/** Passed verbatim to transport.streamChat on every turn. Memoize this array (e.g. via
|
|
1043
1058
|
* useMemo) to avoid recreating send/stop/retryLast on every render. */
|
|
1044
1059
|
tools?: BaileyMcpToolConfig[];
|
|
@@ -1185,8 +1200,8 @@ export declare interface UseBaileyChatResult {
|
|
|
1185
1200
|
/** Feedback handlers bound to `client` and the held conversation id; present only when the hook
|
|
1186
1201
|
* was given a `client`. `BaileyChatPanel` uses them to show thumbs up/down on assistant
|
|
1187
1202
|
* messages by default. Becomes undefined once the feedback API answers 503 (disabled for the
|
|
1188
|
-
* environment), until `client` changes. Optional in
|
|
1189
|
-
* result objects still compile. */
|
|
1203
|
+
* environment) or 405 (route does not accept the method), until `client` changes. Optional in
|
|
1204
|
+
* the type so hosts that construct their own result objects still compile. */
|
|
1190
1205
|
feedback?: BaileyFeedbackHandlers;
|
|
1191
1206
|
}
|
|
1192
1207
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icanbwell/baileyai-chat-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.1",
|
|
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": {
|
|
@@ -127,6 +127,6 @@
|
|
|
127
127
|
},
|
|
128
128
|
"resolutions": {
|
|
129
129
|
"minimatch/brace-expansion": "2.1.4-aikido.2",
|
|
130
|
-
"node-gyp/undici": "8.10.2"
|
|
130
|
+
"node-gyp/undici": "8.10.2-aikido.3"
|
|
131
131
|
}
|
|
132
132
|
}
|