@inkeep/agents-ui 0.14.13 → 0.14.15
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.cts +14 -11
- package/dist/index.d.ts +14 -11
- package/dist/primitives/atoms/dialog.cjs +1 -1
- package/dist/primitives/atoms/dialog.js +129 -131
- package/dist/primitives/components/embedded-chat/use-stream-processor.cjs +1 -1
- package/dist/primitives/components/embedded-chat/use-stream-processor.js +35 -33
- package/dist/primitives/components/embedded-chat.cjs +4 -4
- package/dist/primitives/components/embedded-chat.js +262 -258
- package/dist/primitives/providers/base-events-provider.cjs +1 -1
- package/dist/primitives/providers/base-events-provider.js +1 -1
- package/dist/styled/components/data-summary-group.cjs +1 -1
- package/dist/styled/components/data-summary-group.js +35 -31
- package/dist/types/types.d.cts +3 -1
- package/dist/types/types.d.ts +3 -1
- package/package.json +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react/jsx-runtime"),t=require("react"),l=require("./config-provider.cjs"),a=t.createContext(void 0),p=({children:e})=>{const{baseSettings:s,componentType:n}=l.useInkeepConfig(),{tags:o,analyticsProperties:r}=s,i=t.useMemo(()=>({widgetLibraryVersion:"0.14.
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("react/jsx-runtime"),t=require("react"),l=require("./config-provider.cjs"),a=t.createContext(void 0),p=({children:e})=>{const{baseSettings:s,componentType:n}=l.useInkeepConfig(),{tags:o,analyticsProperties:r}=s,i=t.useMemo(()=>({widgetLibraryVersion:"0.14.14",componentType:n,tags:o}),[n,o]),u={logEvent:t.useCallback(async c=>{const v={...i,...c.properties,...r},d={eventName:c.eventName,properties:v};return s.onEvent?.(d)},[s,i,r])};return E.jsx(a.Provider,{value:u,children:e})},g=()=>{const e=t.useContext(a);if(!e)throw new Error("useBaseEvents must be used within a BaseEventsProvider");return e};exports.BaseEventsProvider=p;exports.useBaseEvents=g;
|
|
@@ -5,7 +5,7 @@ import { useInkeepConfig as g } from "./config-provider.js";
|
|
|
5
5
|
const a = d(void 0), P = ({ children: e }) => {
|
|
6
6
|
const { baseSettings: t, componentType: o } = g(), { tags: s, analyticsProperties: n } = t, r = u(
|
|
7
7
|
() => ({
|
|
8
|
-
widgetLibraryVersion: "0.14.
|
|
8
|
+
widgetLibraryVersion: "0.14.14",
|
|
9
9
|
componentType: o,
|
|
10
10
|
tags: s
|
|
11
11
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("react"),
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),n=require("react"),t=require("lucide-react"),x=a=>{const{type:s,label:r}=a;return r||s.replace(/_/g," ").replace(/\b\w/g,l=>l.toUpperCase())},d={agent_generate:e.jsx(t.RefreshCw,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),agent_reasoning:e.jsx(t.Brain,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),tool_call:e.jsx(t.Hammer,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),tool_result:e.jsx(t.Hammer,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),transfer:e.jsx(t.ArrowRight,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),delegation_sent:e.jsx(t.Forward,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),delegation_returned:e.jsx(t.CheckCheck,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),artifact_saved:e.jsx(t.Download,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),error:e.jsx(t.TriangleAlert,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),agent_initializing:e.jsx(t.CircleDot,{className:"w-3 h-3 animate-spin"}),completion:e.jsx(t.CheckCheck,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),default:e.jsx(t.Dot,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"})},h={retrieve:e.jsx(t.Search,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),action:e.jsx(t.CheckCheck,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),default:e.jsx(t.Dot,{className:"w-3 h-3 text-gray-500 dark:text-white-alpha-500"}),...d},p=n.memo(({summary:a,index:s,showConnector:r})=>{const l=n.useMemo(()=>a.details?JSON.stringify(a.details,null,2):null,[a.details]),o=n.useMemo(()=>x(a),[a]),i=n.useMemo(()=>h[a.type]||h.default,[a.type]);return e.jsxs("div",{className:"flex items-start gap-2 text-xs relative",children:[r&&e.jsx("div",{className:"absolute left-1.5 top-4 bottom-0 w-px bg-gray-200 dark:bg-white-alpha-200 -mb-3"}),e.jsx("div",{className:"flex items-center justify-center w-3 h-3 relative z-10 mt-0.5",children:i}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:" text-gray-700 dark:text-white-alpha-600",children:o}),l&&e.jsx("pre",{className:"mt-2 text-xs whitespace-pre-wrap font-mono bg-gray-50 dark:bg-gray-dark-900 p-2 rounded-md px-3 py-2",children:l})]})]},`op-${a.type}-${s}`)}),m=n.memo(({summaries:a,isCompleted:s})=>{const[r,l]=n.useState(!s);n.useEffect(()=>{let i;return s?i=setTimeout(()=>{l(!1)},1e3):l(!0),()=>{i&&clearTimeout(i)}},[s]);const o=n.useCallback(()=>{l(!r)},[r]);return e.jsxs("div",{className:"flex flex-col items-start mb-2.5 mt-2.5 first:mt-1 relative",children:[e.jsx("button",{type:"button",onClick:o,"data-expanded":r,className:"inline-flex items-center group gap-2 text-xs text-gray-500 dark:text-white-alpha-600 hover:text-gray-700 dark:hover:text-white-alpha-700 transition-colors cursor-pointer",children:s?e.jsxs(e.Fragment,{children:[e.jsx(t.Check,{className:"check-icon w-3 h-3 text-gray-500 dark:text-white-alpha-500 transition-all duration-200 absolute opacity-100 group-hover:opacity-0 group-data-[expanded=true]:opacity-0"}),e.jsx(t.ChevronRight,{className:"chevron-icon w-3 h-3 text-gray-500 dark:text-white-alpha-500 transition-all duration-200 transform opacity-0 rotate-0 group-hover:opacity-100 group-data-[expanded=true]:opacity-100 group-data-[expanded=true]:rotate-90"}),e.jsx("span",{className:"font-medium",children:"Completed"})]}):e.jsxs(e.Fragment,{children:[e.jsx(t.LoaderCircle,{className:"w-3 h-3 animate-spin"}),e.jsx("span",{className:"font-medium",children:"Thinking..."})]})}),e.jsx("div",{"data-expanded":r,className:"overflow-hidden transition-all duration-300 ease-in-out data-[expanded=true]:opacity-100 data-[expanded=false]:max-h-0 data-[expanded=false]:opacity-0 max-w-full",children:e.jsx("div",{className:"pb-2 mt-1.5 space-y-3 relative",children:a.map((i,c)=>e.jsx(p,{summary:i,index:c,showConnector:a.length>1&&c<a.length-1},`op-${i.type}-${c}`))})})]})});exports.DataSummaryGroup=m;
|
|
@@ -1,27 +1,31 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as s, jsx as e, Fragment as
|
|
3
|
-
import { memo as
|
|
4
|
-
import { Check as f, ChevronRight as
|
|
5
|
-
const
|
|
2
|
+
import { jsxs as s, jsx as e, Fragment as h } from "react/jsx-runtime";
|
|
3
|
+
import { memo as m, useState as w, useEffect as u, useCallback as y, useMemo as c } from "react";
|
|
4
|
+
import { Check as f, ChevronRight as N, LoaderCircle as k, Dot as g, CheckCheck as d, Search as v, CircleDot as b, TriangleAlert as _, Download as C, Forward as S, ArrowRight as A, Hammer as p, Brain as D, RefreshCw as E } from "lucide-react";
|
|
5
|
+
const I = (t) => {
|
|
6
6
|
const { type: r, label: a } = t;
|
|
7
7
|
return a || r.replace(/_/g, " ").replace(/\b\w/g, (l) => l.toUpperCase());
|
|
8
|
-
},
|
|
9
|
-
agent_generate: /* @__PURE__ */ e(
|
|
10
|
-
agent_reasoning: /* @__PURE__ */ e(
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
default: /* @__PURE__ */ e(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
8
|
+
}, M = {
|
|
9
|
+
agent_generate: /* @__PURE__ */ e(E, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" }),
|
|
10
|
+
agent_reasoning: /* @__PURE__ */ e(D, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" }),
|
|
11
|
+
tool_call: /* @__PURE__ */ e(p, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" }),
|
|
12
|
+
tool_result: /* @__PURE__ */ e(p, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" }),
|
|
13
|
+
transfer: /* @__PURE__ */ e(A, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" }),
|
|
14
|
+
delegation_sent: /* @__PURE__ */ e(S, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" }),
|
|
15
|
+
delegation_returned: /* @__PURE__ */ e(d, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" }),
|
|
16
|
+
artifact_saved: /* @__PURE__ */ e(C, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" }),
|
|
17
|
+
error: /* @__PURE__ */ e(_, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" }),
|
|
18
|
+
agent_initializing: /* @__PURE__ */ e(b, { className: "w-3 h-3 animate-spin" }),
|
|
19
|
+
completion: /* @__PURE__ */ e(d, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" }),
|
|
20
|
+
default: /* @__PURE__ */ e(g, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" })
|
|
21
|
+
}, x = {
|
|
22
|
+
retrieve: /* @__PURE__ */ e(v, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" }),
|
|
23
|
+
action: /* @__PURE__ */ e(d, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" }),
|
|
24
|
+
default: /* @__PURE__ */ e(g, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500" }),
|
|
25
|
+
...M
|
|
26
|
+
}, O = m(({ summary: t, index: r, showConnector: a }) => {
|
|
27
|
+
const l = c(() => t.details ? JSON.stringify(t.details, null, 2) : null, [t.details]), n = c(() => I(t), [t]), i = c(
|
|
28
|
+
() => x[t.type] || x.default,
|
|
25
29
|
[t.type]
|
|
26
30
|
);
|
|
27
31
|
return /* @__PURE__ */ s("div", { className: "flex items-start gap-2 text-xs relative", children: [
|
|
@@ -32,9 +36,9 @@ const E = (t) => {
|
|
|
32
36
|
l && /* @__PURE__ */ e("pre", { className: "mt-2 text-xs whitespace-pre-wrap font-mono bg-gray-50 dark:bg-gray-dark-900 p-2 rounded-md px-3 py-2", children: l })
|
|
33
37
|
] })
|
|
34
38
|
] }, `op-${t.type}-${r}`);
|
|
35
|
-
}),
|
|
36
|
-
const [a, l] =
|
|
37
|
-
|
|
39
|
+
}), j = m(({ summaries: t, isCompleted: r }) => {
|
|
40
|
+
const [a, l] = w(!r);
|
|
41
|
+
u(() => {
|
|
38
42
|
let i;
|
|
39
43
|
return r ? i = setTimeout(() => {
|
|
40
44
|
l(!1);
|
|
@@ -42,7 +46,7 @@ const E = (t) => {
|
|
|
42
46
|
i && clearTimeout(i);
|
|
43
47
|
};
|
|
44
48
|
}, [r]);
|
|
45
|
-
const n =
|
|
49
|
+
const n = y(() => {
|
|
46
50
|
l(!a);
|
|
47
51
|
}, [a]);
|
|
48
52
|
return /* @__PURE__ */ s("div", { className: "flex flex-col items-start mb-2.5 mt-2.5 first:mt-1 relative", children: [
|
|
@@ -53,12 +57,12 @@ const E = (t) => {
|
|
|
53
57
|
onClick: n,
|
|
54
58
|
"data-expanded": a,
|
|
55
59
|
className: "inline-flex items-center group gap-2 text-xs text-gray-500 dark:text-white-alpha-600 hover:text-gray-700 dark:hover:text-white-alpha-700 transition-colors cursor-pointer",
|
|
56
|
-
children: r ? /* @__PURE__ */ s(
|
|
60
|
+
children: r ? /* @__PURE__ */ s(h, { children: [
|
|
57
61
|
/* @__PURE__ */ e(f, { className: "check-icon w-3 h-3 text-gray-500 dark:text-white-alpha-500 transition-all duration-200 absolute opacity-100 group-hover:opacity-0 group-data-[expanded=true]:opacity-0" }),
|
|
58
|
-
/* @__PURE__ */ e(
|
|
62
|
+
/* @__PURE__ */ e(N, { className: "chevron-icon w-3 h-3 text-gray-500 dark:text-white-alpha-500 transition-all duration-200 transform opacity-0 rotate-0 group-hover:opacity-100 group-data-[expanded=true]:opacity-100 group-data-[expanded=true]:rotate-90" }),
|
|
59
63
|
/* @__PURE__ */ e("span", { className: "font-medium", children: "Completed" })
|
|
60
|
-
] }) : /* @__PURE__ */ s(
|
|
61
|
-
/* @__PURE__ */ e(
|
|
64
|
+
] }) : /* @__PURE__ */ s(h, { children: [
|
|
65
|
+
/* @__PURE__ */ e(k, { className: "w-3 h-3 animate-spin" }),
|
|
62
66
|
/* @__PURE__ */ e("span", { className: "font-medium", children: "Thinking..." })
|
|
63
67
|
] })
|
|
64
68
|
}
|
|
@@ -69,7 +73,7 @@ const E = (t) => {
|
|
|
69
73
|
"data-expanded": a,
|
|
70
74
|
className: "overflow-hidden transition-all duration-300 ease-in-out data-[expanded=true]:opacity-100 data-[expanded=false]:max-h-0 data-[expanded=false]:opacity-0 max-w-full",
|
|
71
75
|
children: /* @__PURE__ */ e("div", { className: "pb-2 mt-1.5 space-y-3 relative", children: t.map((i, o) => /* @__PURE__ */ e(
|
|
72
|
-
|
|
76
|
+
O,
|
|
73
77
|
{
|
|
74
78
|
summary: i,
|
|
75
79
|
index: o,
|
|
@@ -82,5 +86,5 @@ const E = (t) => {
|
|
|
82
86
|
] });
|
|
83
87
|
});
|
|
84
88
|
export {
|
|
85
|
-
|
|
89
|
+
j as DataSummaryGroup
|
|
86
90
|
};
|
package/dist/types/types.d.cts
CHANGED
|
@@ -317,7 +317,7 @@ export declare interface CustomIcons {
|
|
|
317
317
|
|
|
318
318
|
export declare type DataParts = {
|
|
319
319
|
operation: {
|
|
320
|
-
type:
|
|
320
|
+
type: OperationType;
|
|
321
321
|
ctx: Record<string, unknown>;
|
|
322
322
|
message?: string;
|
|
323
323
|
label?: string;
|
|
@@ -1164,6 +1164,8 @@ export declare interface OpenUrlAction {
|
|
|
1164
1164
|
url: string;
|
|
1165
1165
|
}
|
|
1166
1166
|
|
|
1167
|
+
export declare type OperationType = 'error' | 'agent_initializing' | 'completion' | 'agent_generate' | 'agent_reasoning' | 'tool_call' | 'tool_result' | 'transfer' | 'delegation_sent' | 'delegation_returned' | 'artifact_saved';
|
|
1168
|
+
|
|
1167
1169
|
declare type QueryCondition = {
|
|
1168
1170
|
$eq: QueryValue;
|
|
1169
1171
|
} | {
|
package/dist/types/types.d.ts
CHANGED
|
@@ -317,7 +317,7 @@ export declare interface CustomIcons {
|
|
|
317
317
|
|
|
318
318
|
export declare type DataParts = {
|
|
319
319
|
operation: {
|
|
320
|
-
type:
|
|
320
|
+
type: OperationType;
|
|
321
321
|
ctx: Record<string, unknown>;
|
|
322
322
|
message?: string;
|
|
323
323
|
label?: string;
|
|
@@ -1164,6 +1164,8 @@ export declare interface OpenUrlAction {
|
|
|
1164
1164
|
url: string;
|
|
1165
1165
|
}
|
|
1166
1166
|
|
|
1167
|
+
export declare type OperationType = 'error' | 'agent_initializing' | 'completion' | 'agent_generate' | 'agent_reasoning' | 'tool_call' | 'tool_result' | 'transfer' | 'delegation_sent' | 'delegation_returned' | 'artifact_saved';
|
|
1168
|
+
|
|
1167
1169
|
declare type QueryCondition = {
|
|
1168
1170
|
$eq: QueryValue;
|
|
1169
1171
|
} | {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-ui",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.15",
|
|
4
4
|
"description": "",
|
|
5
5
|
"homepage": "",
|
|
6
6
|
"repository": {
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
"@zag-js/focus-trap": "^1.7.0",
|
|
71
71
|
"@zag-js/presence": "^1.13.1",
|
|
72
72
|
"@zag-js/react": "^1.13.1",
|
|
73
|
+
"@zag-js/remove-scroll": "^1.26.2",
|
|
73
74
|
"ai": "5.0.5",
|
|
74
75
|
"altcha-lib": "^1.2.0",
|
|
75
76
|
"aria-hidden": "^1.2.4",
|