@icanbwell/baileyai-chat-ui 1.0.28 → 1.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/README.md +14 -2
- package/dist/baileyai-chat-ui.cjs +3 -3
- package/dist/baileyai-chat-ui.js +1049 -1033
- package/dist/chart.js +1 -2
- package/dist/index.d.ts +13 -1
- package/dist/{safeMarkdownUrl-Bqv6Q4u1.js → safeMarkdownUrl-Dpm09Re7.js} +1 -2
- package/dist/table.js +2 -3
- package/package.json +2 -2
package/dist/chart.js
CHANGED
|
@@ -3,7 +3,7 @@ import { jsx as t } from "react/jsx-runtime";
|
|
|
3
3
|
import { Box as n } from "@mui/material";
|
|
4
4
|
import { ArcElement as r, BarController as i, BarElement as a, CategoryScale as o, Chart as s, DoughnutController as c, Legend as l, LineController as u, LineElement as d, LinearScale as f, PieController as p, PointElement as m, ScatterController as h, Title as g, Tooltip as _ } from "chart.js";
|
|
5
5
|
import { Chart as v } from "react-chartjs-2";
|
|
6
|
-
|
|
6
|
+
// src/ui/BaileyChart.tsx
|
|
7
7
|
s.register(o, f, m, d, a, r, g, _, l, i, u, p, c, h);
|
|
8
8
|
var y = [
|
|
9
9
|
"#2563eb",
|
|
@@ -63,5 +63,4 @@ var y = [
|
|
|
63
63
|
})
|
|
64
64
|
});
|
|
65
65
|
};
|
|
66
|
-
//#endregion
|
|
67
66
|
export { x as BaileyChart, b as DEFAULT_DARK_PALETTE, y as DEFAULT_LIGHT_PALETTE };
|
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, renderTable, renderChart, renderMcpApp, labels: labelsProp, formatMessageTime: formatMessageTimeProp, }: BaileyChatPanelProps): JSX_2.Element;
|
|
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;
|
|
81
81
|
|
|
82
82
|
export declare interface BaileyChatPanelLabels extends ToolStepLabels, Partial<BaileyHistoryLabels> {
|
|
83
83
|
/** Visible text of the "new chat" item in the "..." menu. */
|
|
@@ -210,6 +210,12 @@ export declare interface BaileyChatPanelProps extends BaileyMarkdownRenderers {
|
|
|
210
210
|
* Content-derived actions (e.g. baileyai-skills-service's save-as-skill artifact UI) are a
|
|
211
211
|
* host-side composition around useBaileyChat, not this prop — see the Phase 4 plan. */
|
|
212
212
|
renderMessageActions?: (message: BaileyMessage) => ReactNode;
|
|
213
|
+
/** Thumbs up/down feedback on completed assistant messages. On by default whenever `chat` was
|
|
214
|
+
* created with a `client` (`chat.feedback`), a conversation id is held, and the message has a `serverMessageId`; the
|
|
215
|
+
* buttons render before `renderMessageActions`. Pass `false` to turn it off (e.g. when the
|
|
216
|
+
* host renders its own `BaileyFeedbackButtons`, or on a 503 from the feedback API), or an
|
|
217
|
+
* object to tune the reason chips, comment limit or labels. */
|
|
218
|
+
feedback?: false | Pick<BaileyFeedbackButtonsProps, 'reasonOptions' | 'maxCommentLength' | 'labels'>;
|
|
213
219
|
/** Overrides individual UI strings for localization — merged shallowly with English
|
|
214
220
|
* defaults, so a host only needs to supply the keys its i18n system actually translates.
|
|
215
221
|
* Pass fully-resolved strings, not translation keys — this package has no opinion on which
|
|
@@ -1176,6 +1182,12 @@ export declare interface UseBaileyChatResult {
|
|
|
1176
1182
|
hasEarlier?: boolean;
|
|
1177
1183
|
/** State of the most recent history load. */
|
|
1178
1184
|
historyStatus?: 'idle' | 'loading' | 'error';
|
|
1185
|
+
/** Feedback handlers bound to `client` and the held conversation id; present only when the hook
|
|
1186
|
+
* was given a `client`. `BaileyChatPanel` uses them to show thumbs up/down on assistant
|
|
1187
|
+
* messages by default. Becomes undefined once the feedback API answers 503 (disabled for the
|
|
1188
|
+
* environment), until `client` changes. Optional in the type so hosts that construct their own
|
|
1189
|
+
* result objects still compile. */
|
|
1190
|
+
feedback?: BaileyFeedbackHandlers;
|
|
1179
1191
|
}
|
|
1180
1192
|
|
|
1181
1193
|
/** Lists the caller's conversations through `client` (loading, error, refresh, load more, delete with
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/utils/safeMarkdownUrl.ts
|
|
2
2
|
var e = /^(https?|mailto):/i, t = (e) => e.replace(/[\t\n\r]/g, "").trim(), n = (n) => {
|
|
3
3
|
let r = t(n);
|
|
4
4
|
return !/^[a-z][a-z0-9+.-]*:/i.test(r) || e.test(r);
|
|
@@ -6,5 +6,4 @@ var e = /^(https?|mailto):/i, t = (e) => e.replace(/[\t\n\r]/g, "").trim(), n =
|
|
|
6
6
|
let n = t(e);
|
|
7
7
|
return r.test(n) ? !0 : n.length <= a && i.test(n);
|
|
8
8
|
};
|
|
9
|
-
//#endregion
|
|
10
9
|
export { n, o as t };
|
package/dist/table.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { n as e } from "./safeMarkdownUrl-
|
|
1
|
+
import { n as e } from "./safeMarkdownUrl-Dpm09Re7.js";
|
|
2
2
|
import { useMemo as t } from "react";
|
|
3
3
|
import { Fragment as n, jsx as r } from "react/jsx-runtime";
|
|
4
4
|
import { Box as i, Link as a } from "@mui/material";
|
|
5
5
|
import { AgGridReact as o } from "ag-grid-react";
|
|
6
6
|
import { ClientSideRowModelModule as s, ColumnAutoSizeModule as c, ColumnHoverModule as l, ModuleRegistry as u, NumberFilterModule as d, RowAutoHeightModule as f, RowStyleModule as p, TextFilterModule as m, TooltipModule as h, themeBalham as g } from "ag-grid-community";
|
|
7
|
-
|
|
7
|
+
// src/ui/BaileyTable.tsx
|
|
8
8
|
u.registerModules([
|
|
9
9
|
c,
|
|
10
10
|
l,
|
|
@@ -61,5 +61,4 @@ var _ = {
|
|
|
61
61
|
})
|
|
62
62
|
});
|
|
63
63
|
};
|
|
64
|
-
//#endregion
|
|
65
64
|
export { b as BaileyTable };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icanbwell/baileyai-chat-ui",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.29",
|
|
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": {
|
|
@@ -121,7 +121,7 @@
|
|
|
121
121
|
"tailwindcss": "^4.3.1",
|
|
122
122
|
"typescript": "^6.0.3",
|
|
123
123
|
"typescript-eslint": "^8.67.0",
|
|
124
|
-
"vite": "^8.
|
|
124
|
+
"vite": "^8.3.5",
|
|
125
125
|
"vite-plugin-dts": "^4.5.4",
|
|
126
126
|
"vitest": "^4.1.10"
|
|
127
127
|
},
|