@inkeep/agents-ui 0.15.8 → 0.15.10
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/primitives/components/embedded-chat/use-inkeep-chat.cjs +2 -2
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.d.ts +21 -0
- package/dist/primitives/components/embedded-chat/use-inkeep-chat.js +83 -80
- package/dist/primitives/components/embedded-chat/use-stream-processor.cjs +1 -1
- package/dist/primitives/components/embedded-chat/use-stream-processor.js +82 -79
- 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 +70 -63
- package/dist/styled/components/message.cjs +1 -1
- package/dist/styled/components/message.js +271 -88
- package/dist/styled/components/ui/recipes/button.cjs +1 -1
- package/dist/styled/components/ui/recipes/button.d.ts +1 -1
- package/dist/styled/components/ui/recipes/button.js +6 -0
- package/dist/styled/inkeep.css.cjs +78 -0
- package/dist/styled/inkeep.css.js +78 -0
- package/dist/types/config/components.d.ts +6 -0
- package/package.json +4 -5
|
@@ -1,142 +1,325 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import { useBaseEvents as
|
|
4
|
-
import { useInkeepConfig as
|
|
5
|
-
import { useMessage as
|
|
6
|
-
import { EmbeddedChatPrimitiveMarkdown as
|
|
7
|
-
import { useChat as
|
|
8
|
-
import { merge as
|
|
9
|
-
import { cn as
|
|
10
|
-
import { markdownStyles as
|
|
11
|
-
import { useStreamProcessor as
|
|
12
|
-
import { DataSummaryGroup as
|
|
13
|
-
import { useMemo as
|
|
14
|
-
import { MessageLoading as
|
|
15
|
-
import { Library as
|
|
16
|
-
|
|
2
|
+
import { jsx as e, jsxs as o, Fragment as re } from "react/jsx-runtime";
|
|
3
|
+
import { useBaseEvents as ne } from "../../primitives/providers/base-events-provider.js";
|
|
4
|
+
import { useInkeepConfig as oe } from "../../primitives/providers/config-provider.js";
|
|
5
|
+
import { useMessage as se } from "../../primitives/providers/message-provider.js";
|
|
6
|
+
import { EmbeddedChatPrimitiveMarkdown as ie, PrimitiveMessagePart as v, EmbeddedChatPrimitiveDynamicComponent as q } from "../../primitives/components/embedded-chat.js";
|
|
7
|
+
import { useChat as le } from "../../primitives/components/embedded-chat/chat-provider.js";
|
|
8
|
+
import { merge as pe } from "merge-anything";
|
|
9
|
+
import { cn as b } from "../utils.js";
|
|
10
|
+
import { markdownStyles as de } from "./ui/markdown-styles.js";
|
|
11
|
+
import { useStreamProcessor as ce } from "../../primitives/components/embedded-chat/use-stream-processor.js";
|
|
12
|
+
import { DataSummaryGroup as me } from "./data-summary-group.js";
|
|
13
|
+
import { useState as A, useRef as ue, useEffect as _, useMemo as L, useCallback as P } from "react";
|
|
14
|
+
import { DynamicComponent as he, MessageLoading as fe } from "./embedded-chat.js";
|
|
15
|
+
import { Hammer as ge, ChevronDown as xe, Check as J, X as ye, Library as we, ComponentIcon as ve, XCircle as B, CheckCircle as F, Clock as be, Loader2 as Ce, Circle as ke } from "lucide-react";
|
|
16
|
+
import { button as K } from "./ui/recipes/button.js";
|
|
17
|
+
const Ne = {
|
|
18
|
+
"input-streaming": "Pending",
|
|
19
|
+
"input-available": "Running",
|
|
20
|
+
"approval-requested": "Awaiting Approval",
|
|
21
|
+
"approval-responded": "Responded",
|
|
22
|
+
"output-available": "Completed",
|
|
23
|
+
"output-error": "Error",
|
|
24
|
+
"output-denied": "Denied"
|
|
25
|
+
};
|
|
26
|
+
function Se(t) {
|
|
27
|
+
if (!t || typeof t != "object") return !1;
|
|
28
|
+
const n = t;
|
|
29
|
+
return typeof n.type == "string" && n.type.startsWith("tool-");
|
|
30
|
+
}
|
|
31
|
+
const De = (t) => {
|
|
32
|
+
if (!t || typeof t != "object" || !("status" in t)) return;
|
|
33
|
+
const n = t.status;
|
|
34
|
+
return typeof n == "string" ? n : void 0;
|
|
35
|
+
}, Te = () => /* @__PURE__ */ e("div", { className: "flex space-x-1", children: [0, 1, 2].map((t) => /* @__PURE__ */ e(
|
|
17
36
|
"span",
|
|
18
37
|
{
|
|
19
38
|
className: "animate-bounce-dot opacity-30",
|
|
20
39
|
style: {
|
|
21
|
-
animationDelay: `${
|
|
40
|
+
animationDelay: `${t * 0.2}s`
|
|
22
41
|
},
|
|
23
42
|
children: "."
|
|
24
43
|
},
|
|
25
|
-
|
|
26
|
-
)) }),
|
|
27
|
-
/* @__PURE__ */
|
|
28
|
-
/* @__PURE__ */
|
|
29
|
-
/* @__PURE__ */
|
|
30
|
-
/* @__PURE__ */
|
|
44
|
+
t
|
|
45
|
+
)) }), U = ({ name: t, Icon: n, props: s, componentType: l }) => /* @__PURE__ */ o("div", { className: "border rounded-lg bg-gray-50 dark:bg-gray-dark-800 mb-3", children: [
|
|
46
|
+
/* @__PURE__ */ o("div", { className: "flex justify-between px-4 py-2 text-xs", children: [
|
|
47
|
+
/* @__PURE__ */ o("div", { className: "font-medium flex items-center gap-2", children: [
|
|
48
|
+
/* @__PURE__ */ e(n, { className: "w-3 h-3 text-gray-600 dark:text-white-alpha-600" }),
|
|
49
|
+
/* @__PURE__ */ e("span", { children: t })
|
|
31
50
|
] }),
|
|
32
|
-
/* @__PURE__ */
|
|
51
|
+
/* @__PURE__ */ e("div", { className: "flex items-center px-1.5 py-0.5 rounded-md text-2xs uppercase tracking-wider bg-gray-200 dark:bg-white-alpha-200 font-medium text-gray-700 dark:text-white-alpha-700 font-mono", children: l })
|
|
33
52
|
] }),
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
] }),
|
|
36
|
-
|
|
53
|
+
/* @__PURE__ */ e("pre", { className: "whitespace-pre-wrap text-xs text-gray-700 dark:text-white-alpha-700 font-mono px-4 py-2", children: JSON.stringify(s, null, 2) })
|
|
54
|
+
] }), Ie = ({ name: t, props: n }) => /* @__PURE__ */ e(U, { name: t, Icon: ve, props: n, componentType: "component" }), Ee = ({ name: t, props: n }) => /* @__PURE__ */ e(U, { name: t, Icon: we, props: n, componentType: "artifact" }), Le = ({ part: t, approve: n, isDebug: s = !1 }) => {
|
|
55
|
+
const l = t.type, C = l.startsWith("tool-") ? l.slice(5) : l, r = t.state, m = !!t.approval?.id, g = r === "approval-requested", k = De(t.output), [u, N] = A(m || !s), S = r ? Ne[r] ?? r : "tool";
|
|
56
|
+
return _(() => {
|
|
57
|
+
g && N(!0);
|
|
58
|
+
}, [g]), /* @__PURE__ */ o("div", { className: "border rounded-lg mb-3 overflow-hidden", children: [
|
|
59
|
+
s && /* @__PURE__ */ o(
|
|
60
|
+
"button",
|
|
61
|
+
{
|
|
62
|
+
type: "button",
|
|
63
|
+
className: "inline-flex items-center group gap-2 text-xs text-gray-700 dark:text-white-alpha-700 hover:text-gray-800 dark:hover:text-white-alpha-800 transition-colors cursor-pointer w-full justify-between px-4 py-2",
|
|
64
|
+
onClick: () => N(!u),
|
|
65
|
+
"data-expanded": u,
|
|
66
|
+
children: [
|
|
67
|
+
/* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ o("div", { className: "font-medium flex items-center gap-2", children: [
|
|
68
|
+
/* @__PURE__ */ e(ge, { className: "w-3 h-3 text-gray-600 dark:text-white-alpha-600" }),
|
|
69
|
+
/* @__PURE__ */ e("span", { children: C })
|
|
70
|
+
] }) }),
|
|
71
|
+
/* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: [
|
|
72
|
+
/* @__PURE__ */ o("div", { className: "flex items-center gap-1.5 px-1.5 py-0.5 rounded-md text-2xs uppercase tracking-wider bg-gray-100 dark:bg-white-alpha-100 font-medium text-gray-700 dark:text-white-alpha-700 font-mono", children: [
|
|
73
|
+
(() => {
|
|
74
|
+
switch (r) {
|
|
75
|
+
case "input-streaming":
|
|
76
|
+
return /* @__PURE__ */ e(ke, { className: "w-3 h-3" });
|
|
77
|
+
case "input-available":
|
|
78
|
+
return /* @__PURE__ */ e(Ce, { className: "w-3 h-3 animate-spin" });
|
|
79
|
+
case "approval-requested":
|
|
80
|
+
return /* @__PURE__ */ e(be, { className: "w-3 h-3" });
|
|
81
|
+
case "approval-responded":
|
|
82
|
+
return /* @__PURE__ */ e(F, { className: "w-3 h-3" });
|
|
83
|
+
case "output-available":
|
|
84
|
+
return /* @__PURE__ */ e(F, { className: "w-3 h-3" });
|
|
85
|
+
case "output-error":
|
|
86
|
+
return /* @__PURE__ */ e(B, { className: "w-3 h-3" });
|
|
87
|
+
case "output-denied":
|
|
88
|
+
return /* @__PURE__ */ e(B, { className: "w-3 h-3" });
|
|
89
|
+
default:
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
})(),
|
|
93
|
+
S
|
|
94
|
+
] }),
|
|
95
|
+
/* @__PURE__ */ e(xe, { className: "w-3 h-3 text-gray-500 dark:text-white-alpha-500 transition-all duration-200 transform rotate-0 group-data-[expanded=true]:rotate-180" })
|
|
96
|
+
] })
|
|
97
|
+
]
|
|
98
|
+
}
|
|
99
|
+
),
|
|
100
|
+
/* @__PURE__ */ e(
|
|
101
|
+
"div",
|
|
102
|
+
{
|
|
103
|
+
"data-expanded": u,
|
|
104
|
+
className: b(
|
|
105
|
+
"relative",
|
|
106
|
+
'before:content-[""] before:absolute before:inset-x-0 before:-top-px before:h-3 before:pointer-events-none before:z-10',
|
|
107
|
+
'after:content-[""] after:absolute after:inset-x-0 after:bottom-0 after:h-3 after:pointer-events-none after:z-10',
|
|
108
|
+
"before:bg-[linear-gradient(white,_transparent)] after:bg-[linear-gradient(transparent,_white)]",
|
|
109
|
+
"dark:before:bg-[linear-gradient(var(--ikp-color-gray-dark-950),_transparent)] dark:after:bg-[linear-gradient(transparent,_var(--ikp-color-gray-dark-950))]",
|
|
110
|
+
"data-[expanded=false]:before:opacity-0 data-[expanded=false]:after:opacity-0"
|
|
111
|
+
),
|
|
112
|
+
children: /* @__PURE__ */ o(
|
|
113
|
+
"div",
|
|
114
|
+
{
|
|
115
|
+
"data-expanded": u,
|
|
116
|
+
className: b(
|
|
117
|
+
"px-4 data-[expanded=true]:pb-3 [scrollbar-width:thin] 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",
|
|
118
|
+
m ? "" : "data-[expanded=true]:max-h-48 data-[expanded=true]:overflow-y-auto"
|
|
119
|
+
),
|
|
120
|
+
children: [
|
|
121
|
+
t.input != null && s && /* @__PURE__ */ e("pre", { className: "whitespace-pre-wrap text-xs text-gray-700 dark:text-white-alpha-700 font-mono py-2", children: JSON.stringify(t.input, null, 2) }),
|
|
122
|
+
!s && /* @__PURE__ */ o("div", { className: "whitespace-pre-wrap text-sm text-gray-700 dark:text-white-alpha-700 py-2", children: [
|
|
123
|
+
"Approval is needed to run ",
|
|
124
|
+
/* @__PURE__ */ e("strong", { children: C }),
|
|
125
|
+
"."
|
|
126
|
+
] }),
|
|
127
|
+
g && t.approval?.id && /* @__PURE__ */ o("div", { className: "flex justify-end gap-2 pt-1", children: [
|
|
128
|
+
/* @__PURE__ */ e(
|
|
129
|
+
"button",
|
|
130
|
+
{
|
|
131
|
+
type: "button",
|
|
132
|
+
className: b(
|
|
133
|
+
K({ size: "xs", variant: "outline" }),
|
|
134
|
+
"px-2 py-1 rounded-md text-xs text-gray-700 dark:text-white-alpha-700"
|
|
135
|
+
),
|
|
136
|
+
onClick: () => n(!1),
|
|
137
|
+
children: "Deny"
|
|
138
|
+
}
|
|
139
|
+
),
|
|
140
|
+
/* @__PURE__ */ o(
|
|
141
|
+
"button",
|
|
142
|
+
{
|
|
143
|
+
type: "button",
|
|
144
|
+
className: b(
|
|
145
|
+
K({ size: "xs", variant: "primaryFilled" }),
|
|
146
|
+
"px-2 py-1 rounded-md text-xs gap-1"
|
|
147
|
+
),
|
|
148
|
+
onClick: () => n(!0),
|
|
149
|
+
children: [
|
|
150
|
+
/* @__PURE__ */ e(J, { className: "w-3 h-3" }),
|
|
151
|
+
"Approve"
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
)
|
|
155
|
+
] }),
|
|
156
|
+
r === "output-available" && t.output != null && !s && /* @__PURE__ */ o("div", { className: "flex justify-end items-center gap-1 whitespace-pre-wrap text-xs text-gray-700 dark:text-white-alpha-700 capitalize", children: [
|
|
157
|
+
k === "approved" && /* @__PURE__ */ e(J, { className: "w-3 h-3" }),
|
|
158
|
+
k
|
|
159
|
+
] }),
|
|
160
|
+
r === "output-denied" && !s && /* @__PURE__ */ o("div", { className: "flex justify-end items-center gap-1 whitespace-pre-wrap text-xs text-gray-700 dark:text-white-alpha-700 capitalize", children: [
|
|
161
|
+
/* @__PURE__ */ e(ye, { className: "w-3 h-3" }),
|
|
162
|
+
S
|
|
163
|
+
] }),
|
|
164
|
+
r === "output-available" && t.output != null && s && /* @__PURE__ */ e("pre", { className: "whitespace-pre-wrap text-xs text-gray-700 dark:text-white-alpha-700 font-mono py-2", children: typeof t.output == "string" ? t.output : JSON.stringify(t.output, null, 2) })
|
|
165
|
+
]
|
|
166
|
+
}
|
|
167
|
+
)
|
|
168
|
+
}
|
|
169
|
+
)
|
|
170
|
+
] });
|
|
171
|
+
}, We = ({
|
|
172
|
+
className: t,
|
|
37
173
|
componentStyles: n,
|
|
38
|
-
children:
|
|
39
|
-
isLast:
|
|
40
|
-
...
|
|
174
|
+
children: s,
|
|
175
|
+
isLast: l,
|
|
176
|
+
...C
|
|
41
177
|
}) => {
|
|
42
|
-
const { message:
|
|
43
|
-
aiChatSettings: { components:
|
|
44
|
-
} =
|
|
45
|
-
|
|
46
|
-
|
|
178
|
+
const { message: r } = se(), { logEvent: f } = ne(), { conversationId: m, isStreaming: g, isLoading: k, setError: u, addToolApprovalResponse: N, sendMessage: S } = le(), {
|
|
179
|
+
aiChatSettings: { components: D, artifacts: W, headers: X }
|
|
180
|
+
} = oe(), M = X?.["x-emit-operations"] === "true", G = r.role === "user", H = (g || k) && l && r.role === "assistant", { processedParts: V, summaryTimings: Q, shouldShowInitialLoading: Y, shouldShowStreamDelayLoading: Z } = ce(r.parts, H, u), [x, j] = A(null), [ee, I] = A(!1), p = ue(null);
|
|
181
|
+
_(() => {
|
|
182
|
+
if (!x) {
|
|
183
|
+
I(!1), p.current && (clearTimeout(p.current), p.current = null);
|
|
184
|
+
return;
|
|
185
|
+
}
|
|
186
|
+
return I(!1), p.current && clearTimeout(p.current), p.current = window.setTimeout(() => {
|
|
187
|
+
I(!0);
|
|
188
|
+
}, 1e3), () => {
|
|
189
|
+
p.current && (clearTimeout(p.current), p.current = null);
|
|
190
|
+
};
|
|
191
|
+
}, [x]), _(() => {
|
|
192
|
+
x && (!l || r.parts.length > x.partCount) && j(null);
|
|
193
|
+
}, [x, l, r.parts.length]);
|
|
194
|
+
const $ = L(
|
|
195
|
+
() => r.parts.filter(
|
|
196
|
+
(a) => a.type === "data-artifact" && a.data?.type?.toLowerCase() === "citation"
|
|
47
197
|
),
|
|
48
|
-
[
|
|
49
|
-
),
|
|
50
|
-
() =>
|
|
198
|
+
[r.parts]
|
|
199
|
+
), O = L(
|
|
200
|
+
() => pe(de, n ?? {}),
|
|
51
201
|
[n]
|
|
52
|
-
),
|
|
53
|
-
(
|
|
54
|
-
|
|
202
|
+
), z = P(
|
|
203
|
+
(a, i) => {
|
|
204
|
+
f({
|
|
55
205
|
eventName: "assistant_message_inline_link_opened",
|
|
56
206
|
properties: {
|
|
57
|
-
title:
|
|
58
|
-
url:
|
|
207
|
+
title: i?.toString(),
|
|
208
|
+
url: a
|
|
59
209
|
}
|
|
60
210
|
});
|
|
61
211
|
},
|
|
62
|
-
[
|
|
63
|
-
),
|
|
64
|
-
(
|
|
65
|
-
|
|
212
|
+
[f]
|
|
213
|
+
), R = P(
|
|
214
|
+
(a, i) => {
|
|
215
|
+
f({
|
|
66
216
|
eventName: "assistant_code_block_copied",
|
|
67
217
|
properties: {
|
|
68
|
-
conversationId:
|
|
69
|
-
language:
|
|
70
|
-
code:
|
|
218
|
+
conversationId: m,
|
|
219
|
+
language: a,
|
|
220
|
+
code: i
|
|
71
221
|
}
|
|
72
222
|
});
|
|
73
223
|
},
|
|
74
|
-
[
|
|
75
|
-
),
|
|
76
|
-
(
|
|
77
|
-
|
|
224
|
+
[f, m]
|
|
225
|
+
), E = P(
|
|
226
|
+
(a) => /* @__PURE__ */ e(
|
|
227
|
+
ie,
|
|
78
228
|
{
|
|
79
|
-
text:
|
|
80
|
-
componentStyles:
|
|
81
|
-
onLinkClick:
|
|
82
|
-
onCodeCopy:
|
|
83
|
-
artifacts:
|
|
229
|
+
text: a,
|
|
230
|
+
componentStyles: O,
|
|
231
|
+
onLinkClick: z,
|
|
232
|
+
onCodeCopy: R,
|
|
233
|
+
artifacts: $
|
|
84
234
|
}
|
|
85
235
|
),
|
|
86
|
-
[
|
|
87
|
-
),
|
|
88
|
-
() =>
|
|
236
|
+
[O, z, R, $]
|
|
237
|
+
), te = L(
|
|
238
|
+
() => b(
|
|
89
239
|
"data-[role=user]:whitespace-pre-wrap mb-3 data-[role=user]:mb-0 [&[data-role=user]>p]:mb-0 max-w-full",
|
|
90
|
-
|
|
240
|
+
t
|
|
91
241
|
),
|
|
92
|
-
[
|
|
242
|
+
[t]
|
|
93
243
|
);
|
|
94
|
-
return /* @__PURE__ */
|
|
95
|
-
|
|
96
|
-
const
|
|
97
|
-
"data-role":
|
|
98
|
-
"data-type":
|
|
99
|
-
...
|
|
100
|
-
className:
|
|
244
|
+
return /* @__PURE__ */ o(re, { children: [
|
|
245
|
+
V.map((a, i) => {
|
|
246
|
+
const h = {
|
|
247
|
+
"data-role": r.role,
|
|
248
|
+
"data-type": a?.type === "data-component" ? a.data.type : a?.type,
|
|
249
|
+
...C,
|
|
250
|
+
className: te
|
|
101
251
|
};
|
|
102
|
-
switch (
|
|
252
|
+
switch (a?.type) {
|
|
103
253
|
case "text":
|
|
104
|
-
return /* @__PURE__ */
|
|
254
|
+
return /* @__PURE__ */ e(v, { ...h, children: G ? a.text : E(a.text || "") }, i);
|
|
105
255
|
case "data-component": {
|
|
106
|
-
const { type:
|
|
107
|
-
switch (
|
|
256
|
+
const { type: d } = a.data;
|
|
257
|
+
switch (d) {
|
|
108
258
|
case "text":
|
|
109
|
-
return /* @__PURE__ */
|
|
259
|
+
return /* @__PURE__ */ e("div", { ...h, children: E(a.data.text || "") }, i);
|
|
110
260
|
default: {
|
|
111
|
-
const
|
|
112
|
-
return /* @__PURE__ */
|
|
261
|
+
const T = a.data, { name: c, props: y } = T, w = D?.[c];
|
|
262
|
+
return /* @__PURE__ */ e(v, { ...h, children: /* @__PURE__ */ e(w ? q : Ie, { name: c, props: y, componentDef: w }) }, `${c}-${i}`);
|
|
113
263
|
}
|
|
114
264
|
}
|
|
115
265
|
}
|
|
116
266
|
case "data-artifact": {
|
|
117
|
-
const
|
|
118
|
-
return /* @__PURE__ */
|
|
267
|
+
const d = a.data, { name: T, type: c, artifactSummary: y } = d, w = W?.[c];
|
|
268
|
+
return /* @__PURE__ */ e(v, { ...h, children: /* @__PURE__ */ e(w ? q : Ee, { name: c, props: y, componentDef: w }) }, `${T}-${i}`);
|
|
119
269
|
}
|
|
120
270
|
case "summary-group": {
|
|
121
|
-
const
|
|
271
|
+
const d = Q.get(a.groupKey) || {
|
|
122
272
|
isCompleted: !1
|
|
123
273
|
};
|
|
124
|
-
return /* @__PURE__ */
|
|
125
|
-
|
|
274
|
+
return /* @__PURE__ */ e(v, { ...h, children: /* @__PURE__ */ e(
|
|
275
|
+
me,
|
|
126
276
|
{
|
|
127
|
-
summaries:
|
|
128
|
-
isCompleted:
|
|
277
|
+
summaries: a.summaries || [],
|
|
278
|
+
isCompleted: d.isCompleted
|
|
129
279
|
}
|
|
130
|
-
) }, `${
|
|
280
|
+
) }, `${a.groupKey}-${i}`);
|
|
131
281
|
}
|
|
132
282
|
default:
|
|
283
|
+
if (Se(a)) {
|
|
284
|
+
const d = a.approval?.id;
|
|
285
|
+
if (!(M || d)) return null;
|
|
286
|
+
const c = async (y = !0) => {
|
|
287
|
+
d && (j({ partCount: r.parts.length }), N({ id: d, approved: y }), await S(void 0, {
|
|
288
|
+
body: {
|
|
289
|
+
conversationId: m
|
|
290
|
+
}
|
|
291
|
+
}));
|
|
292
|
+
};
|
|
293
|
+
return /* @__PURE__ */ e(
|
|
294
|
+
v,
|
|
295
|
+
{
|
|
296
|
+
...h,
|
|
297
|
+
children: D?.IkpTool ? /* @__PURE__ */ e(
|
|
298
|
+
he,
|
|
299
|
+
{
|
|
300
|
+
name: "IkpTool",
|
|
301
|
+
props: { tool: a, approve: c, renderMarkdown: E },
|
|
302
|
+
componentDef: D.IkpTool
|
|
303
|
+
}
|
|
304
|
+
) : /* @__PURE__ */ e(
|
|
305
|
+
Le,
|
|
306
|
+
{
|
|
307
|
+
part: a,
|
|
308
|
+
approve: c,
|
|
309
|
+
isDebug: M
|
|
310
|
+
}
|
|
311
|
+
)
|
|
312
|
+
},
|
|
313
|
+
a.toolCallId ?? `${a.type}-${i}`
|
|
314
|
+
);
|
|
315
|
+
}
|
|
133
316
|
return null;
|
|
134
317
|
}
|
|
135
318
|
}),
|
|
136
|
-
|
|
137
|
-
|
|
319
|
+
Y && /* @__PURE__ */ e(fe, {}),
|
|
320
|
+
(Z || ee) && /* @__PURE__ */ e(Te, {})
|
|
138
321
|
] });
|
|
139
322
|
};
|
|
140
323
|
export {
|
|
141
|
-
|
|
324
|
+
We as EmbeddedChatMessagePart
|
|
142
325
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("class-variance-authority"),a=e.cva(["inline-flex","items-center","justify-center","align-middle","select-none","relative","whitespace-nowrap","appearance-none","rounded-md","leading-[1.2]","transition-all","duration-300","cursor-pointer","font-semibold","focus:outline-none","focus:z-base","focus-visible:ring","focus-visible:ring-gray-500","dark:focus-visible:ring-white-alpha-900","focus-visible:ring-2","disabled:opacity-40","disabled:cursor-not-allowed","disabled:shadow-none"],{variants:{variant:{solid:["bg-gray-100 dark:bg-white-alpha-100","text-gray-800 dark:text-white-alpha-950","hover:bg-gray-200 dark:hover:bg-white-alpha-200","hover:disabled:bg-gray-100 dark:hover:disabled:bg-white-alpha-100","active:bg-gray-300 dark:active:bg-white-alpha-400"],iconButton:["px-1 text-gray-500 text-md","hover:text-inkeep-primary-strong","dark:text-gray-dark-200","dark:hover:text-inkeep-expanded-primary-300"],ghost:["text-gray-800 dark:text-white-alpha-950","hover:bg-gray-100 dark:hover:bg-white-alpha-100","active:bg-gray-200 dark:active:bg-white-alpha-200"],outline:["border dark:border-white-alpha-200","text-gray-600 dark:text-gray-200","hover:bg-gray-50 dark:hover:bg-white-alpha-100","active:bg-gray-50 dark:active:bg-white-alpha-100"]},size:{sm:"h-8 min-w-8 text-sm px-3",md:"h-9 min-w-9 text-sm px-4",xs:"h-6 min-w-6 text-xs px-2"},preset:{neutralFilled:["bg-gray-1000 text-white hover:bg-gray-900 active:bg-gray-900","dark:bg-inkeep-expanded-primary-300 dark:text-gray-dark-950","dark:hover:bg-inkeep-expanded-primary-200","dark:active:bg-inkeep-expanded-primary-200"]}},defaultVariants:{size:"md"}});exports.button=a;
|
|
1
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("class-variance-authority"),a=e.cva(["inline-flex","items-center","justify-center","align-middle","select-none","relative","whitespace-nowrap","appearance-none","rounded-md","leading-[1.2]","transition-all","duration-300","cursor-pointer","font-semibold","focus:outline-none","focus:z-base","focus-visible:ring","focus-visible:ring-gray-500","dark:focus-visible:ring-white-alpha-900","focus-visible:ring-2","disabled:opacity-40","disabled:cursor-not-allowed","disabled:shadow-none"],{variants:{variant:{solid:["bg-gray-100 dark:bg-white-alpha-100","text-gray-800 dark:text-white-alpha-950","hover:bg-gray-200 dark:hover:bg-white-alpha-200","hover:disabled:bg-gray-100 dark:hover:disabled:bg-white-alpha-100","active:bg-gray-300 dark:active:bg-white-alpha-400"],iconButton:["px-1 text-gray-500 text-md","hover:text-inkeep-primary-strong","dark:text-gray-dark-200","dark:hover:text-inkeep-expanded-primary-300"],ghost:["text-gray-800 dark:text-white-alpha-950","hover:bg-gray-100 dark:hover:bg-white-alpha-100","active:bg-gray-200 dark:active:bg-white-alpha-200"],outline:["border dark:border-white-alpha-200","text-gray-600 dark:text-gray-200","hover:bg-gray-50 dark:hover:bg-white-alpha-100","active:bg-gray-50 dark:active:bg-white-alpha-100"],primaryFilled:["bg-inkeep-expanded-primary-500 text-inkeep-primary-text-color-on-primary hover:bg-inkeep-expanded-primary-700 active:bg-inkeep-expanded-primary-700","dark:bg-inkeep-expanded-primary-300 dark:text-gray-dark-950","dark:hover:bg-inkeep-expanded-primary-200","dark:active:bg-inkeep-expanded-primary-200"]},size:{sm:"h-8 min-w-8 text-sm px-3",md:"h-9 min-w-9 text-sm px-4",xs:"h-6 min-w-6 text-xs px-2"},preset:{neutralFilled:["bg-gray-1000 text-white hover:bg-gray-900 active:bg-gray-900","dark:bg-inkeep-expanded-primary-300 dark:text-gray-dark-950","dark:hover:bg-inkeep-expanded-primary-200","dark:active:bg-inkeep-expanded-primary-200"]}},defaultVariants:{size:"md"}});exports.button=a;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ClassProp } from 'class-variance-authority/types';
|
|
2
2
|
export declare const button: (props?: ({
|
|
3
|
-
variant?: "solid" | "iconButton" | "ghost" | "outline" | null | undefined;
|
|
3
|
+
variant?: "solid" | "iconButton" | "ghost" | "outline" | "primaryFilled" | null | undefined;
|
|
4
4
|
size?: "sm" | "md" | "xs" | null | undefined;
|
|
5
5
|
preset?: "neutralFilled" | null | undefined;
|
|
6
6
|
} & ClassProp) | undefined) => string;
|
|
@@ -55,6 +55,12 @@ const r = e(
|
|
|
55
55
|
"text-gray-600 dark:text-gray-200",
|
|
56
56
|
"hover:bg-gray-50 dark:hover:bg-white-alpha-100",
|
|
57
57
|
"active:bg-gray-50 dark:active:bg-white-alpha-100"
|
|
58
|
+
],
|
|
59
|
+
primaryFilled: [
|
|
60
|
+
"bg-inkeep-expanded-primary-500 text-inkeep-primary-text-color-on-primary hover:bg-inkeep-expanded-primary-700 active:bg-inkeep-expanded-primary-700",
|
|
61
|
+
"dark:bg-inkeep-expanded-primary-300 dark:text-gray-dark-950",
|
|
62
|
+
"dark:hover:bg-inkeep-expanded-primary-200",
|
|
63
|
+
"dark:active:bg-inkeep-expanded-primary-200"
|
|
58
64
|
]
|
|
59
65
|
},
|
|
60
66
|
size: {
|
|
@@ -1456,6 +1456,9 @@ video {
|
|
|
1456
1456
|
.bg-inherit {
|
|
1457
1457
|
background-color: inherit;
|
|
1458
1458
|
}
|
|
1459
|
+
.bg-inkeep-expanded-primary-500 {
|
|
1460
|
+
background-color: var(--ikp-color-inkeep-expanded-primary-500);
|
|
1461
|
+
}
|
|
1459
1462
|
.bg-inkeep-primary-medium {
|
|
1460
1463
|
background-color: var(--ikp-color-inkeep-primary-medium);
|
|
1461
1464
|
}
|
|
@@ -1704,6 +1707,9 @@ video {
|
|
|
1704
1707
|
.lowercase {
|
|
1705
1708
|
text-transform: lowercase;
|
|
1706
1709
|
}
|
|
1710
|
+
.capitalize {
|
|
1711
|
+
text-transform: capitalize;
|
|
1712
|
+
}
|
|
1707
1713
|
.leading-4 {
|
|
1708
1714
|
line-height: 1rem;
|
|
1709
1715
|
}
|
|
@@ -2171,6 +2177,17 @@ slot {
|
|
|
2171
2177
|
position: absolute;
|
|
2172
2178
|
}
|
|
2173
2179
|
|
|
2180
|
+
.before\\:inset-x-0::before {
|
|
2181
|
+
content: var(--tw-content);
|
|
2182
|
+
left: 0px;
|
|
2183
|
+
right: 0px;
|
|
2184
|
+
}
|
|
2185
|
+
|
|
2186
|
+
.before\\:-top-px::before {
|
|
2187
|
+
content: var(--tw-content);
|
|
2188
|
+
top: -1px;
|
|
2189
|
+
}
|
|
2190
|
+
|
|
2174
2191
|
.before\\:left-0::before {
|
|
2175
2192
|
content: var(--tw-content);
|
|
2176
2193
|
left: 0px;
|
|
@@ -2181,6 +2198,11 @@ slot {
|
|
|
2181
2198
|
top: 0px;
|
|
2182
2199
|
}
|
|
2183
2200
|
|
|
2201
|
+
.before\\:z-10::before {
|
|
2202
|
+
content: var(--tw-content);
|
|
2203
|
+
z-index: 10;
|
|
2204
|
+
}
|
|
2205
|
+
|
|
2184
2206
|
.before\\:z-hide::before {
|
|
2185
2207
|
content: var(--tw-content);
|
|
2186
2208
|
z-index: var(--ikp-z-index-hide);
|
|
@@ -2242,6 +2264,11 @@ slot {
|
|
|
2242
2264
|
background-repeat: no-repeat;
|
|
2243
2265
|
}
|
|
2244
2266
|
|
|
2267
|
+
.before\\:content-\\[\\"\\"\\]::before {
|
|
2268
|
+
--tw-content: "";
|
|
2269
|
+
content: var(--tw-content);
|
|
2270
|
+
}
|
|
2271
|
+
|
|
2245
2272
|
.before\\:\\[background-position\\:0_0\\]::before {
|
|
2246
2273
|
content: var(--tw-content);
|
|
2247
2274
|
background-position: 0 0;
|
|
@@ -2252,6 +2279,11 @@ slot {
|
|
|
2252
2279
|
background-size: cover;
|
|
2253
2280
|
}
|
|
2254
2281
|
|
|
2282
|
+
.after\\:pointer-events-none::after {
|
|
2283
|
+
content: var(--tw-content);
|
|
2284
|
+
pointer-events: none;
|
|
2285
|
+
}
|
|
2286
|
+
|
|
2255
2287
|
.after\\:invisible::after {
|
|
2256
2288
|
content: var(--tw-content);
|
|
2257
2289
|
visibility: hidden;
|
|
@@ -2262,6 +2294,12 @@ slot {
|
|
|
2262
2294
|
position: absolute;
|
|
2263
2295
|
}
|
|
2264
2296
|
|
|
2297
|
+
.after\\:inset-x-0::after {
|
|
2298
|
+
content: var(--tw-content);
|
|
2299
|
+
left: 0px;
|
|
2300
|
+
right: 0px;
|
|
2301
|
+
}
|
|
2302
|
+
|
|
2265
2303
|
.after\\:bottom-0::after {
|
|
2266
2304
|
content: var(--tw-content);
|
|
2267
2305
|
bottom: 0px;
|
|
@@ -2292,6 +2330,11 @@ slot {
|
|
|
2292
2330
|
top: 100%;
|
|
2293
2331
|
}
|
|
2294
2332
|
|
|
2333
|
+
.after\\:z-10::after {
|
|
2334
|
+
content: var(--tw-content);
|
|
2335
|
+
z-index: 10;
|
|
2336
|
+
}
|
|
2337
|
+
|
|
2295
2338
|
.after\\:z-base::after {
|
|
2296
2339
|
content: var(--tw-content);
|
|
2297
2340
|
z-index: var(--ikp-z-index-base);
|
|
@@ -2448,6 +2491,10 @@ slot {
|
|
|
2448
2491
|
background-color: var(--ikp-color-gray-900);
|
|
2449
2492
|
}
|
|
2450
2493
|
|
|
2494
|
+
.active\\:bg-inkeep-expanded-primary-700:active {
|
|
2495
|
+
background-color: var(--ikp-color-inkeep-expanded-primary-700);
|
|
2496
|
+
}
|
|
2497
|
+
|
|
2451
2498
|
.active\\:transition-transform:active {
|
|
2452
2499
|
transition-property: transform;
|
|
2453
2500
|
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
@@ -2570,6 +2617,10 @@ slot {
|
|
|
2570
2617
|
max-height: 0px;
|
|
2571
2618
|
}
|
|
2572
2619
|
|
|
2620
|
+
.data-\\[expanded\\=true\\]\\:max-h-48[data-expanded="true"] {
|
|
2621
|
+
max-height: 12rem;
|
|
2622
|
+
}
|
|
2623
|
+
|
|
2573
2624
|
.data-\\[composite\\]\\:w-full[data-composite] {
|
|
2574
2625
|
width: 100%;
|
|
2575
2626
|
}
|
|
@@ -2744,6 +2795,10 @@ slot {
|
|
|
2744
2795
|
justify-content: flex-end;
|
|
2745
2796
|
}
|
|
2746
2797
|
|
|
2798
|
+
.data-\\[expanded\\=true\\]\\:overflow-y-auto[data-expanded="true"] {
|
|
2799
|
+
overflow-y: auto;
|
|
2800
|
+
}
|
|
2801
|
+
|
|
2747
2802
|
.data-\\[role\\=user\\]\\:whitespace-pre-wrap[data-role="user"] {
|
|
2748
2803
|
white-space: pre-wrap;
|
|
2749
2804
|
}
|
|
@@ -2808,6 +2863,10 @@ slot {
|
|
|
2808
2863
|
padding-bottom: 0.5rem;
|
|
2809
2864
|
}
|
|
2810
2865
|
|
|
2866
|
+
.data-\\[expanded\\=true\\]\\:pb-3[data-expanded="true"] {
|
|
2867
|
+
padding-bottom: 0.75rem;
|
|
2868
|
+
}
|
|
2869
|
+
|
|
2811
2870
|
.data-\\[has-content\\]\\:pb-2[data-has-content] {
|
|
2812
2871
|
padding-bottom: 0.5rem;
|
|
2813
2872
|
}
|
|
@@ -2935,6 +2994,11 @@ slot {
|
|
|
2935
2994
|
--start-color: var(--ikp-color-inkeep-expanded-primary-50);
|
|
2936
2995
|
}
|
|
2937
2996
|
|
|
2997
|
+
.data-\\[expanded\\=false\\]\\:before\\:opacity-0[data-expanded="false"]::before {
|
|
2998
|
+
content: var(--tw-content);
|
|
2999
|
+
opacity: 0;
|
|
3000
|
+
}
|
|
3001
|
+
|
|
2938
3002
|
.data-\\[required\\]\\:after\\:absolute[data-required]::after {
|
|
2939
3003
|
content: var(--tw-content);
|
|
2940
3004
|
position: absolute;
|
|
@@ -2997,6 +3061,11 @@ slot {
|
|
|
2997
3061
|
color: rgb(255 255 255 / var(--tw-text-opacity, 1));
|
|
2998
3062
|
}
|
|
2999
3063
|
|
|
3064
|
+
.data-\\[expanded\\=false\\]\\:after\\:opacity-0[data-expanded="false"]::after {
|
|
3065
|
+
content: var(--tw-content);
|
|
3066
|
+
opacity: 0;
|
|
3067
|
+
}
|
|
3068
|
+
|
|
3000
3069
|
.data-\\[required\\]\\:after\\:\\[content\\:\\"\\*\\"\\][data-required]::after {
|
|
3001
3070
|
content: "*";
|
|
3002
3071
|
}
|
|
@@ -3019,6 +3088,11 @@ slot {
|
|
|
3019
3088
|
background-image: conic-gradient(transparent,var(--ikp-color-inkeep-expanded-primary-600),transparent 30%);
|
|
3020
3089
|
}
|
|
3021
3090
|
|
|
3091
|
+
.group[data-expanded="true"] .group-data-\\[expanded\\=true\\]\\:rotate-180 {
|
|
3092
|
+
--tw-rotate: 180deg;
|
|
3093
|
+
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
3094
|
+
}
|
|
3095
|
+
|
|
3022
3096
|
.group[data-expanded="true"] .group-data-\\[expanded\\=true\\]\\:rotate-90 {
|
|
3023
3097
|
--tw-rotate: 90deg;
|
|
3024
3098
|
transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
|
|
@@ -3107,6 +3181,10 @@ slot {
|
|
|
3107
3181
|
background-color: var(--ikp-color-gray-900);
|
|
3108
3182
|
}
|
|
3109
3183
|
|
|
3184
|
+
.hover\\:bg-inkeep-expanded-primary-700:hover:not(:disabled) {
|
|
3185
|
+
background-color: var(--ikp-color-inkeep-expanded-primary-700);
|
|
3186
|
+
}
|
|
3187
|
+
|
|
3110
3188
|
.hover\\:bg-inkeep-primary-light-subtle:hover:not(:disabled) {
|
|
3111
3189
|
background-color: var(--ikp-color-inkeep-primary-light-subtle);
|
|
3112
3190
|
}
|