@adecore/agents-react 0.54.11 → 0.54.13
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/chat/ui/ChatEmptyScene.d.ts +3 -0
- package/dist/chat/ui/ChatEmptyScene.js +118 -0
- package/dist/chat/ui/Composer.js +296 -294
- package/dist/chat/ui/Timeline.js +42 -54
- package/dist/chat/ui/composer/placeholder.d.ts +13 -4
- package/dist/chat/ui/composer/placeholder.js +36 -16
- package/dist/chat/ui/composer/use-prompt-menus.d.ts +1 -0
- package/dist/chat/ui/composer/use-prompt-menus.js +16 -13
- package/dist/locales/en/agent-chat.d.ts +2 -1
- package/dist/locales/en/agent-chat.js +4 -3
- package/dist/locales/nl/agent-chat.d.ts +2 -1
- package/dist/locales/nl/agent-chat.js +4 -3
- package/dist/theme.css +20 -1
- package/package.json +9 -9
- package/src/chat/ui/ChatEmptyScene.tsx +31 -0
- package/src/chat/ui/Composer.tsx +8 -1
- package/src/chat/ui/Timeline.tsx +9 -15
- package/src/chat/ui/composer/placeholder.ts +35 -12
- package/src/chat/ui/composer/use-prompt-menus.ts +2 -0
- package/src/locales/en/agent-chat.ts +4 -3
- package/src/locales/nl/agent-chat.ts +4 -3
- package/src/theme.css +20 -1
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { EmptyScene } from '@adecore/ui';
|
|
3
|
+
import { AgentIcon } from '../../agents/AgentIcon.js';
|
|
4
|
+
/* A question goes out and the model answers. Its mark is the one accent here, so the typing dots stay neutral. */
|
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
export function ChatEmptyScene(t0) {
|
|
7
|
+
const $ = _c(9);
|
|
8
|
+
const {
|
|
9
|
+
provider
|
|
10
|
+
} = t0;
|
|
11
|
+
let t1;
|
|
12
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
13
|
+
t1 = /*#__PURE__*/_jsxs("g", {
|
|
14
|
+
className: "chat-scene-send",
|
|
15
|
+
children: [/*#__PURE__*/_jsx("g", {
|
|
16
|
+
className: "scene-lift",
|
|
17
|
+
children: /*#__PURE__*/_jsx("rect", {
|
|
18
|
+
className: "scene-shape",
|
|
19
|
+
x: "70",
|
|
20
|
+
y: "10",
|
|
21
|
+
width: "78",
|
|
22
|
+
height: "24",
|
|
23
|
+
rx: "12"
|
|
24
|
+
})
|
|
25
|
+
}), /*#__PURE__*/_jsx("path", {
|
|
26
|
+
className: "scene-text",
|
|
27
|
+
d: "M82 22h52"
|
|
28
|
+
})]
|
|
29
|
+
});
|
|
30
|
+
$[0] = t1;
|
|
31
|
+
} else {
|
|
32
|
+
t1 = $[0];
|
|
33
|
+
}
|
|
34
|
+
let t2;
|
|
35
|
+
if ($[1] !== provider) {
|
|
36
|
+
t2 = /*#__PURE__*/_jsx("g", {
|
|
37
|
+
className: "scene-reveal-2",
|
|
38
|
+
children: /*#__PURE__*/_jsx("svg", {
|
|
39
|
+
x: "11",
|
|
40
|
+
y: "43",
|
|
41
|
+
width: "20",
|
|
42
|
+
height: "20",
|
|
43
|
+
overflow: "visible",
|
|
44
|
+
children: /*#__PURE__*/_jsx(AgentIcon, {
|
|
45
|
+
kind: provider,
|
|
46
|
+
size: 20
|
|
47
|
+
})
|
|
48
|
+
})
|
|
49
|
+
});
|
|
50
|
+
$[1] = provider;
|
|
51
|
+
$[2] = t2;
|
|
52
|
+
} else {
|
|
53
|
+
t2 = $[2];
|
|
54
|
+
}
|
|
55
|
+
let t3;
|
|
56
|
+
let t4;
|
|
57
|
+
let t5;
|
|
58
|
+
let t6;
|
|
59
|
+
if ($[3] === Symbol.for("react.memo_cache_sentinel")) {
|
|
60
|
+
t3 = /*#__PURE__*/_jsxs("g", {
|
|
61
|
+
className: "chat-scene-typing",
|
|
62
|
+
children: [/*#__PURE__*/_jsx("circle", {
|
|
63
|
+
className: "scene-dot chat-scene-bounce",
|
|
64
|
+
cx: "42",
|
|
65
|
+
cy: "53",
|
|
66
|
+
r: "2.5"
|
|
67
|
+
}), /*#__PURE__*/_jsx("circle", {
|
|
68
|
+
className: "scene-dot chat-scene-bounce",
|
|
69
|
+
cx: "52",
|
|
70
|
+
cy: "53",
|
|
71
|
+
r: "2.5"
|
|
72
|
+
}), /*#__PURE__*/_jsx("circle", {
|
|
73
|
+
className: "scene-dot chat-scene-bounce",
|
|
74
|
+
cx: "62",
|
|
75
|
+
cy: "53",
|
|
76
|
+
r: "2.5"
|
|
77
|
+
})]
|
|
78
|
+
});
|
|
79
|
+
t4 = /*#__PURE__*/_jsx("path", {
|
|
80
|
+
className: "scene-text scene-type-5",
|
|
81
|
+
pathLength: 1,
|
|
82
|
+
d: "M40 53h98"
|
|
83
|
+
});
|
|
84
|
+
t5 = /*#__PURE__*/_jsx("path", {
|
|
85
|
+
className: "scene-text scene-type-7",
|
|
86
|
+
pathLength: 1,
|
|
87
|
+
d: "M40 66h84"
|
|
88
|
+
});
|
|
89
|
+
t6 = /*#__PURE__*/_jsx("path", {
|
|
90
|
+
className: "scene-text scene-type-9",
|
|
91
|
+
pathLength: 1,
|
|
92
|
+
d: "M40 79h56"
|
|
93
|
+
});
|
|
94
|
+
$[3] = t3;
|
|
95
|
+
$[4] = t4;
|
|
96
|
+
$[5] = t5;
|
|
97
|
+
$[6] = t6;
|
|
98
|
+
} else {
|
|
99
|
+
t3 = $[3];
|
|
100
|
+
t4 = $[4];
|
|
101
|
+
t5 = $[5];
|
|
102
|
+
t6 = $[6];
|
|
103
|
+
}
|
|
104
|
+
let t7;
|
|
105
|
+
if ($[7] !== t2) {
|
|
106
|
+
t7 = /*#__PURE__*/_jsx(EmptyScene, {
|
|
107
|
+
children: /*#__PURE__*/_jsxs("g", {
|
|
108
|
+
className: "scene-loop",
|
|
109
|
+
children: [t1, t2, t3, t4, t5, t6]
|
|
110
|
+
})
|
|
111
|
+
});
|
|
112
|
+
$[7] = t2;
|
|
113
|
+
$[8] = t7;
|
|
114
|
+
} else {
|
|
115
|
+
t7 = $[8];
|
|
116
|
+
}
|
|
117
|
+
return t7;
|
|
118
|
+
}
|