@actioneer/ads 0.1.0
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/LICENSE +21 -0
- package/bin/ads-init.mjs +314 -0
- package/components/accordion.d.ts +13 -0
- package/components/accordion.js +91 -0
- package/components/agents-ui/agent-audio-visualizer-aura.d.ts +11 -0
- package/components/agents-ui/agent-audio-visualizer-aura.js +277 -0
- package/components/agents-ui/agent-audio-visualizer-wave.d.ts +12 -0
- package/components/agents-ui/agent-audio-visualizer-wave.js +203 -0
- package/components/agents-ui/react-shader-toy.d.ts +87 -0
- package/components/agents-ui/react-shader-toy.js +531 -0
- package/components/ai-elements/chain-of-thought.d.ts +30 -0
- package/components/ai-elements/chain-of-thought.js +182 -0
- package/components/ai-elements/index.d.ts +11 -0
- package/components/ai-elements/inline-citation.d.ts +44 -0
- package/components/ai-elements/inline-citation.js +314 -0
- package/components/ai-elements/message.d.ts +96 -0
- package/components/ai-elements/message.js +308 -0
- package/components/ai-elements/queue.d.ts +60 -0
- package/components/ai-elements/queue.js +193 -0
- package/components/ai-elements/reasoning.d.ts +26 -0
- package/components/ai-elements/reasoning.js +131 -0
- package/components/ai-elements/shimmer.d.ts +25 -0
- package/components/ai-elements/shimmer.js +44 -0
- package/components/ai-elements/speech-input.d.ts +16 -0
- package/components/ai-elements/speech-input.js +151 -0
- package/components/ai-elements/task-progress.d.ts +41 -0
- package/components/ai-elements/task-progress.js +211 -0
- package/components/ai-elements/task.d.ts +35 -0
- package/components/ai-elements/task.js +73 -0
- package/components/ai-elements/tool.d.ts +53 -0
- package/components/ai-elements/tool.js +116 -0
- package/components/ai-elements/voice.d.ts +74 -0
- package/components/ai-elements/voice.js +875 -0
- package/components/alert.d.ts +21 -0
- package/components/alert.js +76 -0
- package/components/answer.d.ts +984 -0
- package/components/answer.js +543 -0
- package/components/assistant-ui/action-bar.d.ts +3 -0
- package/components/assistant-ui/action-bar.js +57 -0
- package/components/assistant-ui/answer-tool-ui.d.ts +5 -0
- package/components/assistant-ui/answer-tool-ui.js +42 -0
- package/components/assistant-ui/attachment.d.ts +50 -0
- package/components/assistant-ui/attachment.js +353 -0
- package/components/assistant-ui/badge.d.ts +11 -0
- package/components/assistant-ui/badge.js +54 -0
- package/components/assistant-ui/branch-picker.d.ts +3 -0
- package/components/assistant-ui/branch-picker.js +36 -0
- package/components/assistant-ui/chain-of-thought.d.ts +46 -0
- package/components/assistant-ui/composer-add-context.d.ts +50 -0
- package/components/assistant-ui/composer-add-context.js +209 -0
- package/components/assistant-ui/composer-deep-research.d.ts +16 -0
- package/components/assistant-ui/composer-deep-research.js +38 -0
- package/components/assistant-ui/composer-harness.d.ts +18 -0
- package/components/assistant-ui/composer-harness.js +186 -0
- package/components/assistant-ui/composer-trigger-popover.d.ts +47 -0
- package/components/assistant-ui/composer-trigger-popover.js +147 -0
- package/components/assistant-ui/composer.d.ts +8 -0
- package/components/assistant-ui/composer.js +276 -0
- package/components/assistant-ui/directive-text.d.ts +16 -0
- package/components/assistant-ui/directive-text.js +40 -0
- package/components/assistant-ui/error.d.ts +6 -0
- package/components/assistant-ui/error.js +39 -0
- package/components/assistant-ui/file.d.ts +37 -0
- package/components/assistant-ui/file.js +159 -0
- package/components/assistant-ui/follow-up-suggestions.d.ts +7 -0
- package/components/assistant-ui/follow-up-suggestions.js +44 -0
- package/components/assistant-ui/image.d.ts +46 -0
- package/components/assistant-ui/image.js +351 -0
- package/components/assistant-ui/index.d.ts +28 -0
- package/components/assistant-ui/markdown-text.d.ts +1 -0
- package/components/assistant-ui/markdown-text.js +242 -0
- package/components/assistant-ui/message-timing.d.ts +25 -0
- package/components/assistant-ui/message-timing.js +56 -0
- package/components/assistant-ui/message.d.ts +4 -0
- package/components/assistant-ui/message.js +159 -0
- package/components/assistant-ui/primitives.d.ts +2 -0
- package/components/assistant-ui/quote.d.ts +37 -0
- package/components/assistant-ui/quote.js +150 -0
- package/components/assistant-ui/reasoning.d.ts +44 -0
- package/components/assistant-ui/reasoning.js +261 -0
- package/components/assistant-ui/selection-toolbar.d.ts +29 -0
- package/components/assistant-ui/selection-toolbar.js +91 -0
- package/components/assistant-ui/smart-message-text.d.ts +15 -0
- package/components/assistant-ui/smart-message-text.js +29 -0
- package/components/assistant-ui/sources.d.ts +17 -0
- package/components/assistant-ui/sources.js +121 -0
- package/components/assistant-ui/suggestions.d.ts +7 -0
- package/components/assistant-ui/suggestions.js +19 -0
- package/components/assistant-ui/thread-context.d.ts +37 -0
- package/components/assistant-ui/thread-context.js +8 -0
- package/components/assistant-ui/thread.d.ts +5 -0
- package/components/assistant-ui/thread.js +77 -0
- package/components/assistant-ui/tool-fallback.d.ts +36 -0
- package/components/assistant-ui/tool-fallback.js +428 -0
- package/components/assistant-ui/tool-group.d.ts +33 -0
- package/components/assistant-ui/tool-group.js +173 -0
- package/components/assistant-ui/tooltip-icon-button.d.ts +7 -0
- package/components/assistant-ui/tooltip-icon-button.js +31 -0
- package/components/assistant-ui/voice.d.ts +18 -0
- package/components/autocomplete.d.ts +18 -0
- package/components/autocomplete.js +162 -0
- package/components/avatar.d.ts +26 -0
- package/components/avatar.js +92 -0
- package/components/badge.d.ts +10 -0
- package/components/badge.js +83 -0
- package/components/brand-loader.d.ts +16 -0
- package/components/brand-loader.js +64 -0
- package/components/breadcrumbs.d.ts +8 -0
- package/components/breadcrumbs.js +58 -0
- package/components/button.d.ts +13 -0
- package/components/button.js +100 -0
- package/components/card.d.ts +19 -0
- package/components/card.js +82 -0
- package/components/carousel.d.ts +31 -0
- package/components/carousel.js +351 -0
- package/components/chart.d.ts +165 -0
- package/components/chart.js +841 -0
- package/components/checkbox.d.ts +13 -0
- package/components/checkbox.js +84 -0
- package/components/chip.d.ts +13 -0
- package/components/chip.js +112 -0
- package/components/collapsible.d.ts +5 -0
- package/components/collapsible.js +31 -0
- package/components/connector-card.d.ts +62 -0
- package/components/connector-card.js +154 -0
- package/components/divider.d.ts +23 -0
- package/components/divider.js +69 -0
- package/components/drawer.d.ts +45 -0
- package/components/drawer.js +234 -0
- package/components/dropdown.d.ts +33 -0
- package/components/dropdown.js +198 -0
- package/components/empty-state.d.ts +8 -0
- package/components/empty-state.js +30 -0
- package/components/field.d.ts +20 -0
- package/components/field.js +74 -0
- package/components/index.d.ts +56 -0
- package/components/index.js +444 -0
- package/components/input-field.d.ts +22 -0
- package/components/input-field.js +91 -0
- package/components/input.d.ts +8 -0
- package/components/input.js +61 -0
- package/components/kbd.d.ts +6 -0
- package/components/kbd.js +26 -0
- package/components/link.d.ts +14 -0
- package/components/link.js +72 -0
- package/components/modal.d.ts +18 -0
- package/components/modal.js +156 -0
- package/components/navbar.d.ts +15 -0
- package/components/navbar.js +68 -0
- package/components/number-field.d.ts +11 -0
- package/components/number-field.js +89 -0
- package/components/pagination.d.ts +28 -0
- package/components/pagination.js +179 -0
- package/components/panel.d.ts +14 -0
- package/components/panel.js +71 -0
- package/components/pixel-blast-svg.d.ts +22 -0
- package/components/pixel-blast-svg.js +154 -0
- package/components/popover.d.ts +20 -0
- package/components/popover.js +101 -0
- package/components/progress-circle.d.ts +11 -0
- package/components/progress-circle.js +75 -0
- package/components/progress.d.ts +22 -0
- package/components/progress.js +66 -0
- package/components/radio.d.ts +16 -0
- package/components/radio.js +101 -0
- package/components/segmented.d.ts +16 -0
- package/components/segmented.js +103 -0
- package/components/select.d.ts +28 -0
- package/components/select.js +180 -0
- package/components/selection-action-bar.d.ts +11 -0
- package/components/selection-action-bar.js +59 -0
- package/components/sidebar.d.ts +118 -0
- package/components/sidebar.js +375 -0
- package/components/skeleton.d.ts +6 -0
- package/components/skeleton.js +26 -0
- package/components/slider.d.ts +11 -0
- package/components/slider.js +62 -0
- package/components/spinner.d.ts +11 -0
- package/components/spinner.js +62 -0
- package/components/switch.d.ts +7 -0
- package/components/switch.js +61 -0
- package/components/table.d.ts +59 -0
- package/components/table.js +254 -0
- package/components/tabs.d.ts +29 -0
- package/components/tabs.js +371 -0
- package/components/textarea.d.ts +5 -0
- package/components/textarea.js +24 -0
- package/components/timeline.d.ts +7 -0
- package/components/timeline.js +47 -0
- package/components/toast.d.ts +74 -0
- package/components/toast.js +211 -0
- package/components/tooltip.d.ts +11 -0
- package/components/tooltip.js +143 -0
- package/components/tree.d.ts +42 -0
- package/components/tree.js +86 -0
- package/components/typography.d.ts +33 -0
- package/components/typography.js +65 -0
- package/components/ui/avatar.d.ts +11 -0
- package/components/ui/avatar.js +56 -0
- package/components/ui/button.d.ts +10 -0
- package/components/ui/button.js +57 -0
- package/components/ui/collapsible.d.ts +5 -0
- package/components/ui/collapsible.js +35 -0
- package/components/ui/dialog.d.ts +17 -0
- package/components/ui/dialog.js +93 -0
- package/components/ui/tabs.d.ts +22 -0
- package/components/ui/tooltip.d.ts +7 -0
- package/components/ui/tooltip.js +56 -0
- package/fonts/aribau-grotesk-400.otf +0 -0
- package/fonts/aribau-grotesk-700.otf +0 -0
- package/fonts.css +21 -0
- package/hooks/agents-ui/use-agent-audio-visualizer-aura.d.ts +8 -0
- package/hooks/agents-ui/use-agent-audio-visualizer-aura.js +62 -0
- package/hooks/agents-ui/use-agent-audio-visualizer-wave.d.ts +7 -0
- package/hooks/agents-ui/use-agent-audio-visualizer-wave.js +60 -0
- package/hooks/agents-ui/voice-visualizer-types.d.ts +9 -0
- package/lib/cn.d.ts +3 -0
- package/lib/cn.js +9 -0
- package/lib/icons.d.ts +378 -0
- package/lib/icons.js +119 -0
- package/lib/interactive.d.ts +24 -0
- package/lib/interactive.js +36 -0
- package/lib/motion.d.ts +58 -0
- package/lib/motion.js +70 -0
- package/lib/router.d.ts +3 -0
- package/lib/utils.d.ts +6 -0
- package/llms.txt +537 -0
- package/manifest.json +5085 -0
- package/package.json +60 -0
- package/styles.css +653 -0
- package/theme.css +273 -0
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var $ = Object.defineProperty;
|
|
3
|
+
var D = (o, t, a) => t in o ? $(o, t, { enumerable: !0, configurable: !0, writable: !0, value: a }) : o[t] = a;
|
|
4
|
+
var N = (o, t, a) => D(o, typeof t != "symbol" ? t + "" : t, a);
|
|
5
|
+
import { jsxs as m, Fragment as I, jsx as n } from "react/jsx-runtime";
|
|
6
|
+
import { createContext as R, useContext as E, useState as y, useRef as A, useLayoutEffect as U, useEffect as z } from "react";
|
|
7
|
+
import { createPortal as W } from "react-dom";
|
|
8
|
+
import { MotionConfig as F, AnimatePresence as q, motion as H } from "motion/react";
|
|
9
|
+
import { useComposerRuntime as V, useComposer as X } from "@assistant-ui/react";
|
|
10
|
+
import { TooltipIconButton as G } from "./tooltip-icon-button.js";
|
|
11
|
+
import { At as J, ChevronLeft as Q, Plus as Y, Check as L, ChevronRight as Z } from "../../lib/icons.js";
|
|
12
|
+
import { cn as K } from "../../lib/cn.js";
|
|
13
|
+
import { floatVariants as ee } from "../../lib/motion.js";
|
|
14
|
+
const p = "application/x-actioneer-context", j = () => {
|
|
15
|
+
}, S = R([]), T = R(j);
|
|
16
|
+
function ue({
|
|
17
|
+
tree: o,
|
|
18
|
+
onStageUsage: t,
|
|
19
|
+
children: a
|
|
20
|
+
}) {
|
|
21
|
+
return /* @__PURE__ */ n(S.Provider, { value: o, children: /* @__PURE__ */ n(T.Provider, { value: t ?? j, children: a }) });
|
|
22
|
+
}
|
|
23
|
+
const w = "flex w-full items-center gap-2.5 rounded-md px-2 py-1.5 text-xs text-left outline-none transition-colors hover:bg-muted focus-visible:bg-muted [&_svg]:size-4 [&_svg]:shrink-0 [&_img]:size-4 [&_img]:shrink-0 [&_img]:rounded-xs", _ = (o) => o.map((t) => t.label).slice(1).join(" · "), te = (o) => o.startsWith("mem.") || o.startsWith("skill.");
|
|
24
|
+
function fe() {
|
|
25
|
+
const o = E(S), t = E(T), a = V(), B = X((e) => e.attachments), [c, b] = y(!1), [u, h] = y([]), g = A(null), k = A(null), [d, O] = y(null);
|
|
26
|
+
if (U(() => {
|
|
27
|
+
if (!c) return;
|
|
28
|
+
const e = g.current;
|
|
29
|
+
if (!e) return;
|
|
30
|
+
const r = () => {
|
|
31
|
+
const s = e.getBoundingClientRect();
|
|
32
|
+
O({ left: s.left, bottom: window.innerHeight - s.top + 8 });
|
|
33
|
+
};
|
|
34
|
+
return r(), window.addEventListener("resize", r), window.addEventListener("scroll", r, !0), () => {
|
|
35
|
+
window.removeEventListener("resize", r), window.removeEventListener("scroll", r, !0);
|
|
36
|
+
};
|
|
37
|
+
}, [c]), z(() => {
|
|
38
|
+
c || h([]);
|
|
39
|
+
}, [c]), z(() => {
|
|
40
|
+
if (!c) return;
|
|
41
|
+
const e = (s) => {
|
|
42
|
+
var f, x;
|
|
43
|
+
const i = s.target;
|
|
44
|
+
(f = k.current) != null && f.contains(i) || (x = g.current) != null && x.contains(i) || b(!1);
|
|
45
|
+
}, r = (s) => {
|
|
46
|
+
s.key === "Escape" && (s.preventDefault(), h((i) => i.length ? i.slice(0, -1) : (b(!1), i)));
|
|
47
|
+
};
|
|
48
|
+
return document.addEventListener("pointerdown", e), document.addEventListener("keydown", r), () => {
|
|
49
|
+
document.removeEventListener("pointerdown", e), document.removeEventListener("keydown", r);
|
|
50
|
+
};
|
|
51
|
+
}, [c]), o.length === 0) return null;
|
|
52
|
+
const l = u[u.length - 1], M = l ? l.children ?? [] : o, v = new Set(B.map((e) => e.name)), C = (e, r) => {
|
|
53
|
+
if (v.has(e)) return;
|
|
54
|
+
a.addAttachment(
|
|
55
|
+
new File([e], `${e}.context`, { type: p })
|
|
56
|
+
);
|
|
57
|
+
const s = Array.isArray(r) ? r : r ? [r] : [];
|
|
58
|
+
t(e, s.filter(te));
|
|
59
|
+
};
|
|
60
|
+
return /* @__PURE__ */ m(I, { children: [
|
|
61
|
+
/* @__PURE__ */ n(
|
|
62
|
+
G,
|
|
63
|
+
{
|
|
64
|
+
ref: g,
|
|
65
|
+
tooltip: "Add context",
|
|
66
|
+
side: "top",
|
|
67
|
+
"aria-label": "Add context",
|
|
68
|
+
"aria-expanded": c,
|
|
69
|
+
type: "button",
|
|
70
|
+
onClick: () => b((e) => !e),
|
|
71
|
+
className: "aui-composer-add-context hover:bg-muted-foreground/15 size-7 rounded-full p-1",
|
|
72
|
+
children: /* @__PURE__ */ n(J, { className: "size-4.5 stroke-[1.5px]" })
|
|
73
|
+
}
|
|
74
|
+
),
|
|
75
|
+
W(
|
|
76
|
+
/* @__PURE__ */ n(F, { reducedMotion: "user", children: /* @__PURE__ */ n(q, { children: c && /* @__PURE__ */ m(
|
|
77
|
+
H.div,
|
|
78
|
+
{
|
|
79
|
+
ref: k,
|
|
80
|
+
role: "menu",
|
|
81
|
+
variants: ee,
|
|
82
|
+
initial: "hidden",
|
|
83
|
+
animate: "visible",
|
|
84
|
+
exit: "hidden",
|
|
85
|
+
style: {
|
|
86
|
+
position: "fixed",
|
|
87
|
+
left: (d == null ? void 0 : d.left) ?? 0,
|
|
88
|
+
bottom: (d == null ? void 0 : d.bottom) ?? 0,
|
|
89
|
+
visibility: d ? "visible" : "hidden",
|
|
90
|
+
transformOrigin: "bottom left"
|
|
91
|
+
},
|
|
92
|
+
className: "z-50 w-72 rounded-xl border border-border bg-elevated p-1 text-foreground shadow-elevation outline-none",
|
|
93
|
+
children: [
|
|
94
|
+
l ? /* @__PURE__ */ m("div", { className: "mb-0.5 flex items-center gap-1 px-1", children: [
|
|
95
|
+
/* @__PURE__ */ n(
|
|
96
|
+
"button",
|
|
97
|
+
{
|
|
98
|
+
type: "button",
|
|
99
|
+
"aria-label": "Back",
|
|
100
|
+
onClick: () => h((e) => e.slice(0, -1)),
|
|
101
|
+
className: "flex size-6 shrink-0 items-center justify-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring [&_svg]:size-4",
|
|
102
|
+
children: /* @__PURE__ */ n(Q, {})
|
|
103
|
+
}
|
|
104
|
+
),
|
|
105
|
+
/* @__PURE__ */ n("span", { className: "min-w-0 flex-1 truncate text-xs font-semibold text-muted-foreground", children: u.map((e) => e.label).join(" · ") })
|
|
106
|
+
] }) : /* @__PURE__ */ n("div", { className: "px-2 py-1 text-xs font-semibold text-muted-foreground", children: "Agent's context" }),
|
|
107
|
+
(l == null ? void 0 : l.addable) && (() => {
|
|
108
|
+
const e = _(u), r = v.has(e);
|
|
109
|
+
return /* @__PURE__ */ m(
|
|
110
|
+
"button",
|
|
111
|
+
{
|
|
112
|
+
type: "button",
|
|
113
|
+
onClick: () => {
|
|
114
|
+
var s;
|
|
115
|
+
return C(e, (s = l.children) == null ? void 0 : s.map((i) => i.id));
|
|
116
|
+
},
|
|
117
|
+
className: K(w, "mb-0.5 font-medium text-brand"),
|
|
118
|
+
children: [
|
|
119
|
+
/* @__PURE__ */ n(Y, {}),
|
|
120
|
+
/* @__PURE__ */ m("span", { className: "min-w-0 flex-1 truncate", children: [
|
|
121
|
+
"Add all of ",
|
|
122
|
+
l.label
|
|
123
|
+
] }),
|
|
124
|
+
r && /* @__PURE__ */ n(L, { className: "text-brand" })
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
);
|
|
128
|
+
})(),
|
|
129
|
+
/* @__PURE__ */ n("div", { className: "max-h-72 overflow-y-auto", children: M.map((e) => {
|
|
130
|
+
var f;
|
|
131
|
+
if (!!((f = e.children) != null && f.length))
|
|
132
|
+
return /* @__PURE__ */ m(
|
|
133
|
+
"button",
|
|
134
|
+
{
|
|
135
|
+
type: "button",
|
|
136
|
+
onClick: () => h((x) => [...x, e]),
|
|
137
|
+
className: w,
|
|
138
|
+
children: [
|
|
139
|
+
e.icon ?? /* @__PURE__ */ n(P, {}),
|
|
140
|
+
/* @__PURE__ */ n("span", { className: "min-w-0 flex-1 truncate", children: e.label }),
|
|
141
|
+
/* @__PURE__ */ n(Z, { className: "text-muted-foreground" })
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
e.id
|
|
145
|
+
);
|
|
146
|
+
const s = _([...u, e]), i = v.has(s);
|
|
147
|
+
return /* @__PURE__ */ m(
|
|
148
|
+
"button",
|
|
149
|
+
{
|
|
150
|
+
type: "button",
|
|
151
|
+
onClick: () => C(s, e.id),
|
|
152
|
+
className: w,
|
|
153
|
+
children: [
|
|
154
|
+
e.icon ?? /* @__PURE__ */ n(P, {}),
|
|
155
|
+
/* @__PURE__ */ n("span", { className: "min-w-0 flex-1 truncate", children: e.label }),
|
|
156
|
+
e.hint && /* @__PURE__ */ n("span", { className: "shrink-0 text-xs tabular-nums text-muted-foreground", children: e.hint }),
|
|
157
|
+
i && /* @__PURE__ */ n(L, { className: "shrink-0 text-brand" })
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
e.id
|
|
161
|
+
);
|
|
162
|
+
}) })
|
|
163
|
+
]
|
|
164
|
+
}
|
|
165
|
+
) }) }),
|
|
166
|
+
document.body
|
|
167
|
+
)
|
|
168
|
+
] });
|
|
169
|
+
}
|
|
170
|
+
function P() {
|
|
171
|
+
return /* @__PURE__ */ n("span", { className: "flex size-4 shrink-0 items-center justify-center", children: /* @__PURE__ */ n("span", { className: "size-1.5 rounded-full bg-muted-foreground/40" }) });
|
|
172
|
+
}
|
|
173
|
+
class pe {
|
|
174
|
+
constructor() {
|
|
175
|
+
N(this, "accept", p);
|
|
176
|
+
}
|
|
177
|
+
async add(t) {
|
|
178
|
+
return {
|
|
179
|
+
id: t.file.name,
|
|
180
|
+
type: "document",
|
|
181
|
+
name: t.file.name.replace(/\.context$/, ""),
|
|
182
|
+
contentType: p,
|
|
183
|
+
file: t.file,
|
|
184
|
+
status: { type: "requires-action", reason: "composer-send" }
|
|
185
|
+
};
|
|
186
|
+
}
|
|
187
|
+
async send(t) {
|
|
188
|
+
return {
|
|
189
|
+
...t,
|
|
190
|
+
status: { type: "complete" },
|
|
191
|
+
content: [
|
|
192
|
+
{
|
|
193
|
+
type: "file",
|
|
194
|
+
filename: t.name,
|
|
195
|
+
mimeType: p,
|
|
196
|
+
data: `data:${p};base64,${btoa(t.name)}`
|
|
197
|
+
}
|
|
198
|
+
]
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
async remove(t) {
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
export {
|
|
205
|
+
p as CONTEXT_MIME,
|
|
206
|
+
fe as ComposerAddContext,
|
|
207
|
+
ue as ComposerContextProvider,
|
|
208
|
+
pe as ContextAttachmentAdapter
|
|
209
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* "Deep research" toggle for the chat composer — a pill next to the "@"
|
|
4
|
+
* context button (ChatGPT-style). State lives in the product screen and is
|
|
5
|
+
* supplied via `DeepResearchProvider`; without a provider the button doesn't
|
|
6
|
+
* render, keeping the vendored composer product-agnostic.
|
|
7
|
+
*/
|
|
8
|
+
export interface DeepResearchState {
|
|
9
|
+
enabled: boolean;
|
|
10
|
+
setEnabled: (enabled: boolean) => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function DeepResearchProvider({ value, children, }: {
|
|
13
|
+
value: DeepResearchState;
|
|
14
|
+
children: ReactNode;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
16
|
+
export declare function ComposerDeepResearch(): import("react").JSX.Element | null;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as s, jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import { createContext as i, useContext as u } from "react";
|
|
4
|
+
import { Telescope as c } from "../../lib/icons.js";
|
|
5
|
+
import { cn as f } from "../../lib/cn.js";
|
|
6
|
+
const t = i(null);
|
|
7
|
+
function x({
|
|
8
|
+
value: r,
|
|
9
|
+
children: e
|
|
10
|
+
}) {
|
|
11
|
+
return /* @__PURE__ */ o(t.Provider, { value: r, children: e });
|
|
12
|
+
}
|
|
13
|
+
function a() {
|
|
14
|
+
const r = u(t);
|
|
15
|
+
if (!r) return null;
|
|
16
|
+
const { enabled: e, setEnabled: n } = r;
|
|
17
|
+
return /* @__PURE__ */ s(
|
|
18
|
+
"button",
|
|
19
|
+
{
|
|
20
|
+
type: "button",
|
|
21
|
+
"aria-pressed": e,
|
|
22
|
+
onClick: () => n(!e),
|
|
23
|
+
className: f(
|
|
24
|
+
"flex h-7 shrink-0 items-center gap-1.5 rounded-full px-2.5 text-xs font-medium outline-none transition-colors",
|
|
25
|
+
"focus-visible:ring-3 focus-visible:ring-ring [&_svg]:size-4 [&_svg]:shrink-0",
|
|
26
|
+
e ? "bg-info-50 text-info-700 hover:bg-info-100" : "text-muted-foreground hover:bg-muted-foreground/15 hover:text-foreground"
|
|
27
|
+
),
|
|
28
|
+
children: [
|
|
29
|
+
/* @__PURE__ */ o(c, {}),
|
|
30
|
+
"Deep research"
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
export {
|
|
36
|
+
a as ComposerDeepResearch,
|
|
37
|
+
x as DeepResearchProvider
|
|
38
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { AttachmentAdapter, Attachment, CompleteAttachment, PendingAttachment } from '@assistant-ui/react';
|
|
2
|
+
/** A harness is a reusable instruction set applied to one agent turn. */
|
|
3
|
+
export declare const HARNESS_MIME = "application/x-actioneer-harness";
|
|
4
|
+
/**
|
|
5
|
+
* Reusable composer control for adding an instruction harness. The selected
|
|
6
|
+
* harness is a regular assistant-ui attachment, so it is removable and stays
|
|
7
|
+
* paired with the message that used it.
|
|
8
|
+
*/
|
|
9
|
+
export declare function ComposerHarness(): import("react").JSX.Element;
|
|
10
|
+
/** Serializes a selected harness as prompt text when the composer sends. */
|
|
11
|
+
export declare class HarnessAttachmentAdapter implements AttachmentAdapter {
|
|
12
|
+
accept: string;
|
|
13
|
+
add(state: {
|
|
14
|
+
file: File;
|
|
15
|
+
}): Promise<PendingAttachment>;
|
|
16
|
+
send(attachment: PendingAttachment): Promise<CompleteAttachment>;
|
|
17
|
+
remove(_attachment: Attachment): Promise<void>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
var c = Object.defineProperty;
|
|
3
|
+
var l = (e, t, o) => t in e ? c(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o;
|
|
4
|
+
var p = (e, t, o) => l(e, typeof t != "symbol" ? t + "" : t, o);
|
|
5
|
+
import { jsxs as m, jsx as r } from "react/jsx-runtime";
|
|
6
|
+
import { useComposerRuntime as d, useComposer as u } from "@assistant-ui/react";
|
|
7
|
+
import "clsx";
|
|
8
|
+
import "tailwind-merge";
|
|
9
|
+
import "../../lib/interactive.js";
|
|
10
|
+
import "radix-ui";
|
|
11
|
+
import "../button.js";
|
|
12
|
+
import "../spinner.js";
|
|
13
|
+
import "../field.js";
|
|
14
|
+
import "../typography.js";
|
|
15
|
+
import "../link.js";
|
|
16
|
+
import "../divider.js";
|
|
17
|
+
import "../kbd.js";
|
|
18
|
+
import "../input.js";
|
|
19
|
+
import "../input-field.js";
|
|
20
|
+
import "../textarea.js";
|
|
21
|
+
import "../checkbox.js";
|
|
22
|
+
import "../radio.js";
|
|
23
|
+
import "../switch.js";
|
|
24
|
+
import "../number-field.js";
|
|
25
|
+
import "../select.js";
|
|
26
|
+
import "../autocomplete.js";
|
|
27
|
+
import "../slider.js";
|
|
28
|
+
import "../segmented.js";
|
|
29
|
+
import "../modal.js";
|
|
30
|
+
import "../drawer.js";
|
|
31
|
+
import "../popover.js";
|
|
32
|
+
import "react";
|
|
33
|
+
import "react-dom";
|
|
34
|
+
import "motion/react";
|
|
35
|
+
import { Dropdown as f, DropdownTrigger as h, DropdownContent as g, DropdownLabel as b, DropdownItem as v } from "../dropdown.js";
|
|
36
|
+
import "../toast.js";
|
|
37
|
+
import "../answer.js";
|
|
38
|
+
import "../card.js";
|
|
39
|
+
import "../carousel.js";
|
|
40
|
+
import "../chart.js";
|
|
41
|
+
import "../connector-card.js";
|
|
42
|
+
import "../table.js";
|
|
43
|
+
import "../tabs.js";
|
|
44
|
+
import "../tree.js";
|
|
45
|
+
import "../accordion.js";
|
|
46
|
+
import "../avatar.js";
|
|
47
|
+
import "../badge.js";
|
|
48
|
+
import "../chip.js";
|
|
49
|
+
import "../timeline.js";
|
|
50
|
+
import "../alert.js";
|
|
51
|
+
import "../pixel-blast-svg.js";
|
|
52
|
+
import "../progress.js";
|
|
53
|
+
import "../progress-circle.js";
|
|
54
|
+
import "../skeleton.js";
|
|
55
|
+
import "../empty-state.js";
|
|
56
|
+
import "../navbar.js";
|
|
57
|
+
import "../breadcrumbs.js";
|
|
58
|
+
import "../pagination.js";
|
|
59
|
+
import "../sidebar.js";
|
|
60
|
+
import "../panel.js";
|
|
61
|
+
import "../collapsible.js";
|
|
62
|
+
import "../selection-action-bar.js";
|
|
63
|
+
import "../ai-elements/chain-of-thought.js";
|
|
64
|
+
import "../ai-elements/inline-citation.js";
|
|
65
|
+
import "../ai-elements/message.js";
|
|
66
|
+
import { Bolt as s, CheckList as x, Sparkles as y } from "../../lib/icons.js";
|
|
67
|
+
import "../ai-elements/reasoning.js";
|
|
68
|
+
import "../ai-elements/shimmer.js";
|
|
69
|
+
import "../ai-elements/task.js";
|
|
70
|
+
import "../ai-elements/task-progress.js";
|
|
71
|
+
import "../ai-elements/tool.js";
|
|
72
|
+
import "../ai-elements/voice.js";
|
|
73
|
+
import "./composer.js";
|
|
74
|
+
import "./answer-tool-ui.js";
|
|
75
|
+
import "./follow-up-suggestions.js";
|
|
76
|
+
import "./composer-add-context.js";
|
|
77
|
+
import "zustand/shallow";
|
|
78
|
+
import "../ui/button.js";
|
|
79
|
+
import "./tooltip-icon-button.js";
|
|
80
|
+
import "./quote.js";
|
|
81
|
+
import "./reasoning.js";
|
|
82
|
+
import "./smart-message-text.js";
|
|
83
|
+
import "./thread-context.js";
|
|
84
|
+
import "./tool-fallback.js";
|
|
85
|
+
import "./tool-group.js";
|
|
86
|
+
import "./selection-toolbar.js";
|
|
87
|
+
import "./composer-deep-research.js";
|
|
88
|
+
import "./composer-trigger-popover.js";
|
|
89
|
+
import "./directive-text.js";
|
|
90
|
+
import "./file.js";
|
|
91
|
+
import "./image.js";
|
|
92
|
+
import "./markdown-text.js";
|
|
93
|
+
import "./sources.js";
|
|
94
|
+
const n = "application/x-actioneer-harness", w = [
|
|
95
|
+
{
|
|
96
|
+
id: "investigate",
|
|
97
|
+
label: "Data investigation",
|
|
98
|
+
icon: /* @__PURE__ */ r(s, {}),
|
|
99
|
+
instructions: "Investigate the question against the available context. State the conclusion first, identify the relevant sources, and clearly separate verified facts from assumptions."
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
id: "metric",
|
|
103
|
+
label: "Metric analysis",
|
|
104
|
+
icon: /* @__PURE__ */ r(x, {}),
|
|
105
|
+
instructions: "Define the metric, grain, population, and time window before calculating. Call out comparisons, denominator changes, and any data-quality caveats."
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
id: "brief",
|
|
109
|
+
label: "Executive brief",
|
|
110
|
+
icon: /* @__PURE__ */ r(y, {}),
|
|
111
|
+
instructions: "Write a concise executive brief: lead with the decision or insight, use only decision-relevant evidence, and end with the recommended next action."
|
|
112
|
+
}
|
|
113
|
+
];
|
|
114
|
+
function ri() {
|
|
115
|
+
const e = d(), t = u((i) => i.attachments), o = new Set(
|
|
116
|
+
t.filter((i) => i.contentType === n).map((i) => i.name)
|
|
117
|
+
), a = (i) => {
|
|
118
|
+
o.has(i.label) || e.addAttachment(
|
|
119
|
+
new File([i.instructions], `${i.label}.harness`, { type: n })
|
|
120
|
+
);
|
|
121
|
+
};
|
|
122
|
+
return /* @__PURE__ */ m(f, { children: [
|
|
123
|
+
/* @__PURE__ */ r(h, { children: /* @__PURE__ */ m(
|
|
124
|
+
"button",
|
|
125
|
+
{
|
|
126
|
+
type: "button",
|
|
127
|
+
className: "flex h-7 shrink-0 items-center gap-1.5 rounded-full px-2.5 text-xs font-medium text-muted-foreground outline-none transition-colors hover:bg-muted-foreground/15 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring [&_svg]:size-4 [&_svg]:shrink-0",
|
|
128
|
+
"aria-label": "Add harness",
|
|
129
|
+
children: [
|
|
130
|
+
/* @__PURE__ */ r(s, {}),
|
|
131
|
+
"Add harness"
|
|
132
|
+
]
|
|
133
|
+
}
|
|
134
|
+
) }),
|
|
135
|
+
/* @__PURE__ */ m(g, { side: "top", align: "start", className: "w-56", autoFocusFirstItem: !1, children: [
|
|
136
|
+
/* @__PURE__ */ r(b, { children: "Add a harness" }),
|
|
137
|
+
w.map((i) => /* @__PURE__ */ r(
|
|
138
|
+
v,
|
|
139
|
+
{
|
|
140
|
+
startContent: i.icon,
|
|
141
|
+
disabled: o.has(i.label),
|
|
142
|
+
onSelect: () => a(i),
|
|
143
|
+
children: i.label
|
|
144
|
+
},
|
|
145
|
+
i.id
|
|
146
|
+
))
|
|
147
|
+
] })
|
|
148
|
+
] });
|
|
149
|
+
}
|
|
150
|
+
class ni {
|
|
151
|
+
constructor() {
|
|
152
|
+
p(this, "accept", n);
|
|
153
|
+
}
|
|
154
|
+
async add(t) {
|
|
155
|
+
return {
|
|
156
|
+
id: t.file.name,
|
|
157
|
+
type: "document",
|
|
158
|
+
name: t.file.name.replace(/\.harness$/, "").replace(/-/g, " "),
|
|
159
|
+
contentType: n,
|
|
160
|
+
file: t.file,
|
|
161
|
+
status: { type: "requires-action", reason: "composer-send" }
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
async send(t) {
|
|
165
|
+
const o = await t.file.text();
|
|
166
|
+
return {
|
|
167
|
+
...t,
|
|
168
|
+
status: { type: "complete" },
|
|
169
|
+
content: [
|
|
170
|
+
{
|
|
171
|
+
type: "text",
|
|
172
|
+
text: `<harness name="${t.name}">
|
|
173
|
+
${o}
|
|
174
|
+
</harness>`
|
|
175
|
+
}
|
|
176
|
+
]
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
async remove(t) {
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
export {
|
|
183
|
+
ri as ComposerHarness,
|
|
184
|
+
n as HARNESS_MIME,
|
|
185
|
+
ni as HarnessAttachmentAdapter
|
|
186
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef, FC } from 'react';
|
|
2
|
+
import { ComposerPrimitive, Unstable_DirectiveFormatter, Unstable_TriggerItem } from '@assistant-ui/react';
|
|
3
|
+
type IconComponent = FC<{
|
|
4
|
+
className?: string;
|
|
5
|
+
}>;
|
|
6
|
+
type DirectiveBehaviorProps = {
|
|
7
|
+
/** Formatter used to serialize the selected item into composer text. */
|
|
8
|
+
formatter?: Unstable_DirectiveFormatter | undefined;
|
|
9
|
+
/** Called after the directive text has been inserted into the composer. */
|
|
10
|
+
onInserted?: ((item: Unstable_TriggerItem) => void) | undefined;
|
|
11
|
+
};
|
|
12
|
+
type ActionBehaviorProps = {
|
|
13
|
+
/** Formatter used to serialize the audit-trail chip (when `removeOnExecute` is false). */
|
|
14
|
+
formatter?: Unstable_DirectiveFormatter | undefined;
|
|
15
|
+
/** Invoked with the selected item at the moment of selection. */
|
|
16
|
+
onExecute: (item: Unstable_TriggerItem) => void;
|
|
17
|
+
/** If `true`, strip the trigger text from the composer after executing. @default false */
|
|
18
|
+
removeOnExecute?: boolean | undefined;
|
|
19
|
+
};
|
|
20
|
+
type ComposerTriggerPopoverBaseProps = Omit<ComponentPropsWithoutRef<typeof ComposerPrimitive.Unstable_TriggerPopover>, "children"> & {
|
|
21
|
+
/**
|
|
22
|
+
* Maps icon keys to components. Items look up via `item.metadata?.icon`
|
|
23
|
+
* (string); categories look up via their `id`.
|
|
24
|
+
*/
|
|
25
|
+
iconMap?: Record<string, IconComponent>;
|
|
26
|
+
/** Fallback icon when no entry in `iconMap` matches. */
|
|
27
|
+
fallbackIcon?: IconComponent;
|
|
28
|
+
/** Label shown on the back button. @default "Back" */
|
|
29
|
+
backLabel?: string;
|
|
30
|
+
/** Label shown when no categories are available. @default "No items available" */
|
|
31
|
+
emptyCategoriesLabel?: string;
|
|
32
|
+
/** Label shown when no items match. @default "No matching items" */
|
|
33
|
+
emptyItemsLabel?: string;
|
|
34
|
+
/** Label shown while an async adapter is resolving items. @default "Loading…" */
|
|
35
|
+
loadingLabel?: string;
|
|
36
|
+
};
|
|
37
|
+
type ComposerTriggerPopoverProps = ComposerTriggerPopoverBaseProps & ({
|
|
38
|
+
/** Insert-directive behavior. */
|
|
39
|
+
directive: DirectiveBehaviorProps;
|
|
40
|
+
action?: never;
|
|
41
|
+
} | {
|
|
42
|
+
/** Action behavior. */
|
|
43
|
+
action: ActionBehaviorProps;
|
|
44
|
+
directive?: never;
|
|
45
|
+
});
|
|
46
|
+
export declare const ComposerTriggerPopover: FC<ComposerTriggerPopoverProps>;
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
3
|
+
import { memo as h, useRef as b } from "react";
|
|
4
|
+
import { ComposerPrimitive as n, unstable_defaultDirectiveFormatter as u, unstable_useTriggerPopoverScopeContext as N } from "@assistant-ui/react";
|
|
5
|
+
import { Sparkles as y, ChevronRight as P, ChevronLeft as T } from "../../lib/icons.js";
|
|
6
|
+
import { cn as C } from "../../lib/cn.js";
|
|
7
|
+
function x(o, r, l) {
|
|
8
|
+
return o && (r != null && r[o]) ? r[o] : l;
|
|
9
|
+
}
|
|
10
|
+
const I = ({
|
|
11
|
+
iconMap: o,
|
|
12
|
+
fallbackIcon: r,
|
|
13
|
+
emptyLabel: l
|
|
14
|
+
}) => /* @__PURE__ */ e(n.Unstable_TriggerPopoverCategories, { children: (i) => /* @__PURE__ */ s(
|
|
15
|
+
"div",
|
|
16
|
+
{
|
|
17
|
+
"data-slot": "composer-trigger-popover-categories",
|
|
18
|
+
className: "flex flex-col py-1",
|
|
19
|
+
children: [
|
|
20
|
+
i.map((a) => {
|
|
21
|
+
const m = x(a.id, o, r);
|
|
22
|
+
return /* @__PURE__ */ s(
|
|
23
|
+
n.Unstable_TriggerPopoverCategoryItem,
|
|
24
|
+
{
|
|
25
|
+
categoryId: a.id,
|
|
26
|
+
className: "hover:bg-accent focus:bg-accent data-[highlighted]:bg-accent flex cursor-pointer items-center justify-between gap-2 px-3 py-2 text-sm transition-colors outline-none",
|
|
27
|
+
children: [
|
|
28
|
+
/* @__PURE__ */ s("span", { className: "flex items-center gap-2", children: [
|
|
29
|
+
/* @__PURE__ */ e(m, { className: "text-muted-foreground size-4" }),
|
|
30
|
+
a.label
|
|
31
|
+
] }),
|
|
32
|
+
/* @__PURE__ */ e(P, { className: "text-muted-foreground size-4" })
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
a.id
|
|
36
|
+
);
|
|
37
|
+
}),
|
|
38
|
+
i.length === 0 && /* @__PURE__ */ e("div", { className: "text-muted-foreground px-3 py-2 text-sm", children: l })
|
|
39
|
+
]
|
|
40
|
+
}
|
|
41
|
+
) }), _ = ({
|
|
42
|
+
iconMap: o,
|
|
43
|
+
fallbackIcon: r,
|
|
44
|
+
backLabel: l,
|
|
45
|
+
emptyLabel: i,
|
|
46
|
+
loadingLabel: a
|
|
47
|
+
}) => {
|
|
48
|
+
const { isLoading: m } = N();
|
|
49
|
+
return /* @__PURE__ */ e(n.Unstable_TriggerPopoverItems, { children: (g) => /* @__PURE__ */ s(
|
|
50
|
+
"div",
|
|
51
|
+
{
|
|
52
|
+
"data-slot": "composer-trigger-popover-items",
|
|
53
|
+
className: "flex flex-col",
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ s(n.Unstable_TriggerPopoverBack, { className: "text-muted-foreground hover:bg-accent flex cursor-pointer items-center gap-1.5 border-b px-3 py-2 text-xs tracking-wide uppercase transition-colors", children: [
|
|
56
|
+
/* @__PURE__ */ e(T, { className: "size-3.5" }),
|
|
57
|
+
l
|
|
58
|
+
] }),
|
|
59
|
+
/* @__PURE__ */ s("div", { className: "py-1", children: [
|
|
60
|
+
g.map((t, c) => {
|
|
61
|
+
var d;
|
|
62
|
+
const p = typeof ((d = t.metadata) == null ? void 0 : d.icon) == "string" ? t.metadata.icon : void 0, v = x(p, o, r);
|
|
63
|
+
return /* @__PURE__ */ s(
|
|
64
|
+
n.Unstable_TriggerPopoverItem,
|
|
65
|
+
{
|
|
66
|
+
item: t,
|
|
67
|
+
index: c,
|
|
68
|
+
className: "hover:bg-accent focus:bg-accent data-[highlighted]:bg-accent flex w-full cursor-pointer flex-col items-start gap-0.5 px-3 py-2 text-start transition-colors outline-none",
|
|
69
|
+
children: [
|
|
70
|
+
/* @__PURE__ */ s("span", { className: "flex items-center gap-2 text-sm font-medium", children: [
|
|
71
|
+
/* @__PURE__ */ e(v, { className: "text-primary size-3.5" }),
|
|
72
|
+
t.label
|
|
73
|
+
] }),
|
|
74
|
+
t.description && /* @__PURE__ */ e("span", { className: "text-muted-foreground ms-5.5 text-xs leading-tight", children: t.description })
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
t.id
|
|
78
|
+
);
|
|
79
|
+
}),
|
|
80
|
+
g.length === 0 && /* @__PURE__ */ e("div", { className: "text-muted-foreground px-3 py-2 text-sm", children: m ? a : i })
|
|
81
|
+
] })
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
) });
|
|
85
|
+
}, f = ({
|
|
86
|
+
iconMap: o,
|
|
87
|
+
fallbackIcon: r = y,
|
|
88
|
+
backLabel: l = "Back",
|
|
89
|
+
emptyCategoriesLabel: i = "No items available",
|
|
90
|
+
emptyItemsLabel: a = "No matching items",
|
|
91
|
+
loadingLabel: m = "Loading…",
|
|
92
|
+
className: g,
|
|
93
|
+
directive: t,
|
|
94
|
+
action: c,
|
|
95
|
+
...p
|
|
96
|
+
}) => (b(!1), /* @__PURE__ */ s(
|
|
97
|
+
n.Unstable_TriggerPopover,
|
|
98
|
+
{
|
|
99
|
+
"data-slot": "composer-trigger-popover",
|
|
100
|
+
className: C(
|
|
101
|
+
"aui-composer-trigger-popover bg-popover text-popover-foreground absolute start-0 bottom-full z-50 mb-2 w-64 overflow-hidden rounded-xl border shadow-lg",
|
|
102
|
+
g
|
|
103
|
+
),
|
|
104
|
+
...p,
|
|
105
|
+
children: [
|
|
106
|
+
t ? /* @__PURE__ */ e(
|
|
107
|
+
n.Unstable_TriggerPopover.Directive,
|
|
108
|
+
{
|
|
109
|
+
formatter: t.formatter ?? u,
|
|
110
|
+
onInserted: t.onInserted
|
|
111
|
+
}
|
|
112
|
+
) : c ? /* @__PURE__ */ e(
|
|
113
|
+
n.Unstable_TriggerPopover.Action,
|
|
114
|
+
{
|
|
115
|
+
formatter: c.formatter ?? u,
|
|
116
|
+
onExecute: c.onExecute,
|
|
117
|
+
removeOnExecute: c.removeOnExecute
|
|
118
|
+
}
|
|
119
|
+
) : null,
|
|
120
|
+
/* @__PURE__ */ e(
|
|
121
|
+
I,
|
|
122
|
+
{
|
|
123
|
+
iconMap: o,
|
|
124
|
+
fallbackIcon: r,
|
|
125
|
+
emptyLabel: i
|
|
126
|
+
}
|
|
127
|
+
),
|
|
128
|
+
/* @__PURE__ */ e(
|
|
129
|
+
_,
|
|
130
|
+
{
|
|
131
|
+
iconMap: o,
|
|
132
|
+
fallbackIcon: r,
|
|
133
|
+
backLabel: l,
|
|
134
|
+
emptyLabel: a,
|
|
135
|
+
loadingLabel: m
|
|
136
|
+
}
|
|
137
|
+
)
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
));
|
|
141
|
+
f.displayName = "ComposerTriggerPopover";
|
|
142
|
+
const j = h(
|
|
143
|
+
f
|
|
144
|
+
);
|
|
145
|
+
export {
|
|
146
|
+
j as ComposerTriggerPopover
|
|
147
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
export declare function ComposerPlaceholdersProvider({ prompts, children, }: {
|
|
4
|
+
prompts?: string[];
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}): React.JSX.Element;
|
|
7
|
+
export declare const Composer: FC;
|
|
8
|
+
export declare const EditComposer: FC;
|