@heroui/agent 0.2.0-beta.5 → 0.2.0-beta.7
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/CHANGELOG.md +18 -0
- package/README.md +7 -2
- package/dist/{chart-content-7PZT4YWI.js → chart-content-E4NPTUPR.js} +1 -1
- package/dist/{chunk-XBYPU7PM.js → chunk-OQGXZY5L.js} +10 -4
- package/dist/{chunk-UUHEF6LC.js → chunk-V5S5FRGV.js} +3 -2
- package/dist/{component-renderer-PTMCOJHE.js → component-renderer-46EJDPTB.js} +2103 -1619
- package/dist/contracts.d.ts +4 -3
- package/dist/contracts.js +8 -2
- package/dist/css/index.css +1 -1
- package/dist/{embed-runtime-36S6KLDB.js → embed-runtime-UF7XJIFA.js} +535 -315
- package/dist/{identity-CuhZgpvp.d.ts → identity-Z6i6pL0F.d.ts} +2 -0
- package/dist/index.d.ts +7 -1
- package/dist/index.js +2 -2
- package/dist/next.js +2 -2
- package/dist/server.d.ts +1 -1
- package/dist/server.js +7 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.2.0-beta.7
|
|
4
|
+
|
|
5
|
+
- Polish the activity trail with smoother status transitions, semantic summary icons, bounded
|
|
6
|
+
live-step scrolling, and correctly aligned in-progress labels.
|
|
7
|
+
- Keep conversation positioning stable by anchoring new user turns without pulling the viewport
|
|
8
|
+
down for consecutive Agent responses.
|
|
9
|
+
- Resize the docked Agent panel itself, rather than shifting its contents inside a fixed-width
|
|
10
|
+
shell.
|
|
11
|
+
- Match chart tooltip markers to the hovered series or slice color, including generated pie and
|
|
12
|
+
donut charts.
|
|
13
|
+
|
|
14
|
+
## 0.2.0-beta.6
|
|
15
|
+
|
|
16
|
+
- Add opt-in recent news results with `capabilities.newsSearch`, including dashboard-managed remote
|
|
17
|
+
configuration and every preload, message, retry, and transport path.
|
|
18
|
+
- Keep long activity-trail titles inside the Agent panel with a truncated label and a visible
|
|
19
|
+
disclosure control.
|
|
20
|
+
|
|
3
21
|
## 0.2.0-beta.5
|
|
4
22
|
|
|
5
23
|
- No SDK API or bundle changes from `0.2.0-beta.4`; this prerelease accompanies Agent runtime
|
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ import {HeroUIAgent} from "@heroui/agent/next";
|
|
|
24
24
|
export function AppAgent() {
|
|
25
25
|
return (
|
|
26
26
|
<HeroUIAgent
|
|
27
|
-
agentId=
|
|
27
|
+
agentId={process.env.NEXT_PUBLIC_HEROUI_AGENT_ID!}
|
|
28
28
|
getAuthToken={async (context) => {
|
|
29
29
|
const response = await fetch("/api/heroui-agent/auth-token", {
|
|
30
30
|
method: "POST",
|
|
@@ -149,7 +149,12 @@ const tools = [
|
|
|
149
149
|
}),
|
|
150
150
|
];
|
|
151
151
|
|
|
152
|
-
<HeroUIAgent
|
|
152
|
+
<HeroUIAgent
|
|
153
|
+
agentId={process.env.NEXT_PUBLIC_HEROUI_AGENT_ID!}
|
|
154
|
+
getAuthToken={getAuthToken}
|
|
155
|
+
context={{apiClient}}
|
|
156
|
+
tools={tools}
|
|
157
|
+
/>;
|
|
153
158
|
```
|
|
154
159
|
|
|
155
160
|
Only tool names, descriptions, and JSON schemas reach the hosted agent. Implementations and `context` never leave the browser.
|
|
@@ -703,7 +703,7 @@ function ComponentTooltip({
|
|
|
703
703
|
items: payload.map((entry, index) => {
|
|
704
704
|
const format = series?.find((item) => item.dataKey === entry.dataKey)?.format;
|
|
705
705
|
return {
|
|
706
|
-
color: indicatorColor?.(entry, index) ?? entry.
|
|
706
|
+
color: indicatorColor?.(entry, index) ?? entry.color ?? entry.payload?.fill ?? entry.fill ?? entry.stroke ?? paletteChartColor(index),
|
|
707
707
|
id: String(entry.dataKey ?? entry.name ?? `series-${index}`),
|
|
708
708
|
label: entry.name ?? entry.dataKey,
|
|
709
709
|
value: typeof entry.value === "number" ? formatNumber(entry.value, format) : entry.value
|
|
@@ -496,8 +496,9 @@ function SidebarResizeHandle({
|
|
|
496
496
|
const dragRef = useRef(null);
|
|
497
497
|
const applyWidth = useCallback(
|
|
498
498
|
(nextWidth) => {
|
|
499
|
-
const
|
|
500
|
-
const
|
|
499
|
+
const panel = panelRef.current;
|
|
500
|
+
const root = panel?.getRootNode();
|
|
501
|
+
const host = root instanceof ShadowRoot ? root.host : panel?.closest("[data-heroui-agent]");
|
|
501
502
|
host?.style.setProperty("--ha-sidebar-width", `${nextWidth}px`);
|
|
502
503
|
if (window.innerWidth >= 640) {
|
|
503
504
|
document.documentElement.style.marginRight = `${Math.min(nextWidth, window.innerWidth)}px`;
|
|
@@ -539,6 +540,7 @@ function SidebarResizeHandle({
|
|
|
539
540
|
if (!drag) return;
|
|
540
541
|
dragRef.current = null;
|
|
541
542
|
delete event.currentTarget.dataset["resizing"];
|
|
543
|
+
if (panelRef.current) delete panelRef.current.dataset["dragResizing"];
|
|
542
544
|
document.documentElement.style.transition = drag.pageTransition;
|
|
543
545
|
resizeTo(drag.startWidth, false);
|
|
544
546
|
},
|
|
@@ -548,25 +550,28 @@ function SidebarResizeHandle({
|
|
|
548
550
|
event.currentTarget.setPointerCapture(event.pointerId);
|
|
549
551
|
event.currentTarget.dataset["resizing"] = "true";
|
|
550
552
|
dragRef.current = {
|
|
553
|
+
currentWidth: width,
|
|
551
554
|
pageTransition: document.documentElement.style.transition,
|
|
552
555
|
startWidth: width,
|
|
553
556
|
startX: event.clientX
|
|
554
557
|
};
|
|
555
558
|
document.documentElement.style.transition = "none";
|
|
559
|
+
if (panelRef.current) panelRef.current.dataset["dragResizing"] = "true";
|
|
556
560
|
},
|
|
557
561
|
onPointerMove: (event) => {
|
|
558
562
|
const drag = dragRef.current;
|
|
559
563
|
if (!drag) return;
|
|
560
|
-
resizeTo(drag.startWidth + (drag.startX - event.clientX), false);
|
|
564
|
+
drag.currentWidth = resizeTo(drag.startWidth + (drag.startX - event.clientX), false);
|
|
561
565
|
},
|
|
562
566
|
onPointerUp: (event) => {
|
|
563
567
|
const drag = dragRef.current;
|
|
564
568
|
if (!drag) return;
|
|
565
569
|
dragRef.current = null;
|
|
566
570
|
delete event.currentTarget.dataset["resizing"];
|
|
571
|
+
if (panelRef.current) delete panelRef.current.dataset["dragResizing"];
|
|
567
572
|
event.currentTarget.releasePointerCapture(event.pointerId);
|
|
568
573
|
document.documentElement.style.transition = drag.pageTransition;
|
|
569
|
-
persistSidebarWidth(agentId,
|
|
574
|
+
persistSidebarWidth(agentId, drag.currentWidth);
|
|
570
575
|
}
|
|
571
576
|
}
|
|
572
577
|
)
|
|
@@ -1028,6 +1033,7 @@ function resolveOptions(props) {
|
|
|
1028
1033
|
}
|
|
1029
1034
|
} : {},
|
|
1030
1035
|
imageSearch: (props.capabilities?.webSearch ?? false) && (props.capabilities?.imageSearch ?? true),
|
|
1036
|
+
newsSearch: (props.capabilities?.webSearch ?? false) && (props.capabilities?.newsSearch ?? false),
|
|
1031
1037
|
suggestedPrompts: props.startScreen?.prompts?.map((prompt) => prompt.trim()).filter(Boolean).slice(0, 5),
|
|
1032
1038
|
themeStyle: {
|
|
1033
1039
|
...buildThemeStyle(props.appearance?.theme),
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
resolveOptions,
|
|
11
11
|
scheduleIdleTask,
|
|
12
12
|
writeAgentShellHandoff
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-OQGXZY5L.js";
|
|
14
14
|
|
|
15
15
|
// src/embed/provider.tsx
|
|
16
16
|
import {
|
|
@@ -243,6 +243,7 @@ function parseAgentRemoteConfig(value) {
|
|
|
243
243
|
const capabilities = group(
|
|
244
244
|
shape(value["capabilities"], {
|
|
245
245
|
imageSearch: optionalBoolean,
|
|
246
|
+
newsSearch: optionalBoolean,
|
|
246
247
|
webSearch: optionalBoolean
|
|
247
248
|
})
|
|
248
249
|
);
|
|
@@ -531,7 +532,7 @@ var embedRuntimePromise;
|
|
|
531
532
|
function loadEmbedRuntime() {
|
|
532
533
|
embedRuntimePromise ??= import(
|
|
533
534
|
/* webpackPrefetch: true */
|
|
534
|
-
"./embed-runtime-
|
|
535
|
+
"./embed-runtime-UF7XJIFA.js"
|
|
535
536
|
).then(
|
|
536
537
|
(module) => module.default
|
|
537
538
|
);
|