@athenaintel/react 0.18.0 → 0.19.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/README.md +106 -4
- package/dist/SuperGroupingCard-BsWbHyV_.js +795 -0
- package/dist/SuperGroupingCard-BsWbHyV_.js.map +1 -0
- package/dist/SuperGroupingCard-CRRFUgjN.cjs +794 -0
- package/dist/SuperGroupingCard-CRRFUgjN.cjs.map +1 -0
- package/dist/chat/StatewireApprovalCard.d.ts +59 -2
- package/dist/chat/StatewireClientToolBridge.d.ts +3 -3
- package/dist/chat/StatewireQueuedMessages.d.ts +105 -6
- package/dist/chat/statewire-approval.d.ts +1 -1
- package/dist/chat/statewire-client-tools.d.ts +15 -21
- package/dist/chat/super-grouping/CollapsibleGroup.d.ts +52 -11
- package/dist/chat/super-grouping/SuperGroupingCard.d.ts +78 -21
- package/dist/chat/super-grouping/activity-timeline.d.ts +91 -0
- package/dist/chat/super-grouping/grouping-function.d.ts +13 -10
- package/dist/chat/super-grouping/index.d.ts +12 -0
- package/dist/chat/super-grouping/toolkit-map.d.ts +8 -1
- package/dist/chat/use-statewire-approval-request.d.ts +44 -0
- package/dist/chat-ui/header/conversation-history-panel.d.ts +11 -1
- package/dist/chat-ui/index.d.ts +7 -1
- package/dist/chat-ui/mentions/suggestions/shims.d.ts +0 -4
- package/dist/chat-ui/messages/runtime-message.d.ts +2 -3
- package/dist/chat-ui/messages/statewire-continue-run.d.ts +48 -7
- package/dist/chat-ui/messages/user-edit-composer.d.ts +5 -2
- package/dist/chat-ui/statewire.d.ts +19 -0
- package/dist/chat-ui/thread/chat-thread-shell.d.ts +7 -1
- package/dist/chat-ui/thread/statewire-history-edge.d.ts +52 -0
- package/dist/chat-ui-statewire.cjs +25 -0
- package/dist/chat-ui-statewire.cjs.map +1 -0
- package/dist/chat-ui-statewire.js +25 -0
- package/dist/chat-ui-statewire.js.map +1 -0
- package/dist/chat-ui.cjs +174 -357
- package/dist/chat-ui.cjs.map +1 -1
- package/dist/chat-ui.js +173 -355
- package/dist/chat-ui.js.map +1 -1
- package/dist/diagnostics/athena-diagnostics.d.ts +1 -1
- package/dist/diagnostics/errors.d.ts +4 -0
- package/dist/index.cjs +2222 -5183
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +21 -6
- package/dist/index.js +4193 -7151
- package/dist/index.js.map +1 -1
- package/dist/misc-tool-uis-B2e0Okkn.cjs +43 -0
- package/dist/misc-tool-uis-B2e0Okkn.cjs.map +1 -0
- package/dist/misc-tool-uis-gAiQw0Yl.js +44 -0
- package/dist/misc-tool-uis-gAiQw0Yl.js.map +1 -0
- package/dist/provider/AthenaProvider.d.ts +4 -2
- package/dist/provider/config.d.ts +9 -2
- package/dist/provider/statewire-window-context.d.ts +12 -0
- package/dist/runtime/statewire-auth-headers.d.ts +38 -0
- package/dist/runtime/statewire-lifecycle.d.ts +25 -0
- package/dist/runtime/statewire-session-key.d.ts +13 -0
- package/dist/runtime/useAthenaStatewireRuntime.d.ts +36 -5
- package/dist/statewire-continue-run-D34gS7_1.js +132 -0
- package/dist/statewire-continue-run-D34gS7_1.js.map +1 -0
- package/dist/statewire-continue-run-nE9VCKUh.cjs +131 -0
- package/dist/statewire-continue-run-nE9VCKUh.cjs.map +1 -0
- package/dist/statewire-history-edge-C8uyTEjX.cjs +1711 -0
- package/dist/statewire-history-edge-C8uyTEjX.cjs.map +1 -0
- package/dist/statewire-history-edge-CPohUKMt.js +1712 -0
- package/dist/statewire-history-edge-CPohUKMt.js.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/super-grouping.cjs +22 -0
- package/dist/super-grouping.cjs.map +1 -0
- package/dist/super-grouping.js +22 -0
- package/dist/super-grouping.js.map +1 -0
- package/dist/threads/mint-thread-id.d.ts +8 -0
- package/dist/threads/statewire-thread-list.d.ts +20 -4
- package/dist/tool-fallback-DkQ3DLkn.js +4281 -0
- package/dist/tool-fallback-DkQ3DLkn.js.map +1 -0
- package/dist/tool-fallback-kfhpJQZa.cjs +4297 -0
- package/dist/tool-fallback-kfhpJQZa.cjs.map +1 -0
- package/dist/tools/index.d.ts +14 -0
- package/dist/tools/misc-tool-uis.d.ts +2 -0
- package/dist/tools/primitives.d.ts +41 -0
- package/dist/tools/tool-fallback.d.ts +78 -6
- package/dist/tools/tool-icons.d.ts +10 -0
- package/dist/tools/tool-uis.d.ts +1 -23
- package/dist/tools.cjs +41 -0
- package/dist/tools.cjs.map +1 -0
- package/dist/tools.js +41 -0
- package/dist/tools.js.map +1 -0
- package/dist/trash-2-B5OaNAL7.cjs +5096 -0
- package/dist/trash-2-B5OaNAL7.cjs.map +1 -0
- package/dist/trash-2-CCwSURL-.js +5081 -0
- package/dist/trash-2-CCwSURL-.js.map +1 -0
- package/dist/{use-rest-conversation-history-Dm0rdQgT.cjs → use-rest-conversation-history-Cm8qMRxp.cjs} +445 -5406
- package/dist/use-rest-conversation-history-Cm8qMRxp.cjs.map +1 -0
- package/dist/{use-rest-conversation-history-Bs5qn5G3.js → use-rest-conversation-history-veDZS-oL.js} +491 -5452
- package/dist/use-rest-conversation-history-veDZS-oL.js.map +1 -0
- package/dist/wrench-BEf72cyP.cjs +417 -0
- package/dist/wrench-BEf72cyP.cjs.map +1 -0
- package/dist/wrench-CbrOlVYm.js +418 -0
- package/dist/wrench-CbrOlVYm.js.map +1 -0
- package/dist/x-Dfd2NzK0.cjs +42 -0
- package/dist/x-Dfd2NzK0.cjs.map +1 -0
- package/dist/x-_DntAa_a.js +43 -0
- package/dist/x-_DntAa_a.js.map +1 -0
- package/package.json +29 -11
- package/dist/chat/super-grouping/tool-status-labels.d.ts +0 -1
- package/dist/use-rest-conversation-history-Bs5qn5G3.js.map +0 -1
- package/dist/use-rest-conversation-history-Dm0rdQgT.cjs.map +0 -1
package/dist/chat-ui.cjs
CHANGED
|
@@ -3,15 +3,19 @@ var __defProp = Object.defineProperty;
|
|
|
3
3
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
4
4
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
5
5
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
6
|
-
const useRestConversationHistory = require("./use-rest-conversation-history-
|
|
6
|
+
const useRestConversationHistory = require("./use-rest-conversation-history-Cm8qMRxp.cjs");
|
|
7
|
+
const statewireHistoryEdge = require("./statewire-history-edge-C8uyTEjX.cjs");
|
|
7
8
|
const jsxRuntime = require("react/jsx-runtime");
|
|
9
|
+
const trash2 = require("./trash-2-B5OaNAL7.cjs");
|
|
8
10
|
const React = require("react");
|
|
11
|
+
const wrench = require("./wrench-BEf72cyP.cjs");
|
|
9
12
|
const react = require("@assistant-ui/react");
|
|
10
13
|
require("@assistant-ui/tap");
|
|
11
14
|
require("statewire");
|
|
15
|
+
require("@assistant-ui/react-statewire");
|
|
12
16
|
require("@assistant-ui/store");
|
|
13
|
-
const reactStatewire = require("@assistant-ui/react-statewire");
|
|
14
17
|
require("@assistant-ui/core");
|
|
18
|
+
const statewireContinueRun = require("./statewire-continue-run-nE9VCKUh.cjs");
|
|
15
19
|
const mentionHandlersByThread = /* @__PURE__ */ new Map();
|
|
16
20
|
function registerChatAssetMentionHandler(threadId, handler) {
|
|
17
21
|
mentionHandlersByThread.set(threadId, handler);
|
|
@@ -27,34 +31,19 @@ function registerChatAssetMentionHandler(threadId, handler) {
|
|
|
27
31
|
* This source code is licensed under the ISC license.
|
|
28
32
|
* See the LICENSE file in the root directory of this source tree.
|
|
29
33
|
*/
|
|
30
|
-
const __iconNode$
|
|
34
|
+
const __iconNode$e = [
|
|
31
35
|
["rect", { width: "20", height: "5", x: "2", y: "3", rx: "1", key: "1wp1u1" }],
|
|
32
36
|
["path", { d: "M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8", key: "1s80jp" }],
|
|
33
37
|
["path", { d: "M10 12h4", key: "a56b0p" }]
|
|
34
38
|
];
|
|
35
|
-
const Archive =
|
|
39
|
+
const Archive = trash2.createLucideIcon("archive", __iconNode$e);
|
|
36
40
|
/**
|
|
37
41
|
* @license lucide-react v0.575.0 - ISC
|
|
38
42
|
*
|
|
39
43
|
* This source code is licensed under the ISC license.
|
|
40
44
|
* See the LICENSE file in the root directory of this source tree.
|
|
41
45
|
*/
|
|
42
|
-
const __iconNode$
|
|
43
|
-
["path", { d: "M12 8V4H8", key: "hb8ula" }],
|
|
44
|
-
["rect", { width: "16", height: "12", x: "4", y: "8", rx: "2", key: "enze0r" }],
|
|
45
|
-
["path", { d: "M2 14h2", key: "vft8re" }],
|
|
46
|
-
["path", { d: "M20 14h2", key: "4cs60a" }],
|
|
47
|
-
["path", { d: "M15 13v2", key: "1xurst" }],
|
|
48
|
-
["path", { d: "M9 13v2", key: "rq6x2g" }]
|
|
49
|
-
];
|
|
50
|
-
const Bot = useRestConversationHistory.createLucideIcon("bot", __iconNode$l);
|
|
51
|
-
/**
|
|
52
|
-
* @license lucide-react v0.575.0 - ISC
|
|
53
|
-
*
|
|
54
|
-
* This source code is licensed under the ISC license.
|
|
55
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
56
|
-
*/
|
|
57
|
-
const __iconNode$k = [
|
|
46
|
+
const __iconNode$d = [
|
|
58
47
|
["path", { d: "M10 12h4", key: "a56b0p" }],
|
|
59
48
|
["path", { d: "M10 8h4", key: "1sr2af" }],
|
|
60
49
|
["path", { d: "M14 21v-3a2 2 0 0 0-4 0v3", key: "1rgiei" }],
|
|
@@ -67,24 +56,24 @@ const __iconNode$k = [
|
|
|
67
56
|
],
|
|
68
57
|
["path", { d: "M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16", key: "16ra0t" }]
|
|
69
58
|
];
|
|
70
|
-
const Building2 =
|
|
59
|
+
const Building2 = trash2.createLucideIcon("building-2", __iconNode$d);
|
|
71
60
|
/**
|
|
72
61
|
* @license lucide-react v0.575.0 - ISC
|
|
73
62
|
*
|
|
74
63
|
* This source code is licensed under the ISC license.
|
|
75
64
|
* See the LICENSE file in the root directory of this source tree.
|
|
76
65
|
*/
|
|
77
|
-
const __iconNode$
|
|
66
|
+
const __iconNode$c = [
|
|
78
67
|
["path", { d: "M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z", key: "p7xjir" }]
|
|
79
68
|
];
|
|
80
|
-
const Cloud =
|
|
69
|
+
const Cloud = trash2.createLucideIcon("cloud", __iconNode$c);
|
|
81
70
|
/**
|
|
82
71
|
* @license lucide-react v0.575.0 - ISC
|
|
83
72
|
*
|
|
84
73
|
* This source code is licensed under the ISC license.
|
|
85
74
|
* See the LICENSE file in the root directory of this source tree.
|
|
86
75
|
*/
|
|
87
|
-
const __iconNode$
|
|
76
|
+
const __iconNode$b = [
|
|
88
77
|
[
|
|
89
78
|
"path",
|
|
90
79
|
{
|
|
@@ -94,14 +83,14 @@ const __iconNode$i = [
|
|
|
94
83
|
],
|
|
95
84
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
96
85
|
];
|
|
97
|
-
const Eye =
|
|
86
|
+
const Eye = trash2.createLucideIcon("eye", __iconNode$b);
|
|
98
87
|
/**
|
|
99
88
|
* @license lucide-react v0.575.0 - ISC
|
|
100
89
|
*
|
|
101
90
|
* This source code is licensed under the ISC license.
|
|
102
91
|
* See the LICENSE file in the root directory of this source tree.
|
|
103
92
|
*/
|
|
104
|
-
const __iconNode$
|
|
93
|
+
const __iconNode$a = [
|
|
105
94
|
[
|
|
106
95
|
"path",
|
|
107
96
|
{
|
|
@@ -113,14 +102,14 @@ const __iconNode$h = [
|
|
|
113
102
|
["path", { d: "M10 12.5 8 15l2 2.5", key: "1tg20x" }],
|
|
114
103
|
["path", { d: "m14 12.5 2 2.5-2 2.5", key: "yinavb" }]
|
|
115
104
|
];
|
|
116
|
-
const FileCode =
|
|
105
|
+
const FileCode = trash2.createLucideIcon("file-code", __iconNode$a);
|
|
117
106
|
/**
|
|
118
107
|
* @license lucide-react v0.575.0 - ISC
|
|
119
108
|
*
|
|
120
109
|
* This source code is licensed under the ISC license.
|
|
121
110
|
* See the LICENSE file in the root directory of this source tree.
|
|
122
111
|
*/
|
|
123
|
-
const __iconNode$
|
|
112
|
+
const __iconNode$9 = [
|
|
124
113
|
[
|
|
125
114
|
"path",
|
|
126
115
|
{
|
|
@@ -129,26 +118,26 @@ const __iconNode$g = [
|
|
|
129
118
|
}
|
|
130
119
|
]
|
|
131
120
|
];
|
|
132
|
-
const Headphones =
|
|
121
|
+
const Headphones = trash2.createLucideIcon("headphones", __iconNode$9);
|
|
133
122
|
/**
|
|
134
123
|
* @license lucide-react v0.575.0 - ISC
|
|
135
124
|
*
|
|
136
125
|
* This source code is licensed under the ISC license.
|
|
137
126
|
* See the LICENSE file in the root directory of this source tree.
|
|
138
127
|
*/
|
|
139
|
-
const __iconNode$
|
|
128
|
+
const __iconNode$8 = [
|
|
140
129
|
["path", { d: "m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4", key: "g0fldk" }],
|
|
141
130
|
["path", { d: "m21 2-9.6 9.6", key: "1j0ho8" }],
|
|
142
131
|
["circle", { cx: "7.5", cy: "15.5", r: "5.5", key: "yqb3hr" }]
|
|
143
132
|
];
|
|
144
|
-
const Key =
|
|
133
|
+
const Key = trash2.createLucideIcon("key", __iconNode$8);
|
|
145
134
|
/**
|
|
146
135
|
* @license lucide-react v0.575.0 - ISC
|
|
147
136
|
*
|
|
148
137
|
* This source code is licensed under the ISC license.
|
|
149
138
|
* See the LICENSE file in the root directory of this source tree.
|
|
150
139
|
*/
|
|
151
|
-
const __iconNode$
|
|
140
|
+
const __iconNode$7 = [
|
|
152
141
|
["path", { d: "M10 8h.01", key: "1r9ogq" }],
|
|
153
142
|
["path", { d: "M12 12h.01", key: "1mp3jc" }],
|
|
154
143
|
["path", { d: "M14 8h.01", key: "1primd" }],
|
|
@@ -159,84 +148,51 @@ const __iconNode$e = [
|
|
|
159
148
|
["path", { d: "M8 12h.01", key: "czm47f" }],
|
|
160
149
|
["rect", { width: "20", height: "16", x: "2", y: "4", rx: "2", key: "18n3k1" }]
|
|
161
150
|
];
|
|
162
|
-
const Keyboard =
|
|
151
|
+
const Keyboard = trash2.createLucideIcon("keyboard", __iconNode$7);
|
|
163
152
|
/**
|
|
164
153
|
* @license lucide-react v0.575.0 - ISC
|
|
165
154
|
*
|
|
166
155
|
* This source code is licensed under the ISC license.
|
|
167
156
|
* See the LICENSE file in the root directory of this source tree.
|
|
168
157
|
*/
|
|
169
|
-
const __iconNode$
|
|
170
|
-
["rect", { width: "7", height: "9", x: "3", y: "3", rx: "1", key: "10lvy0" }],
|
|
171
|
-
["rect", { width: "7", height: "5", x: "14", y: "3", rx: "1", key: "16une8" }],
|
|
172
|
-
["rect", { width: "7", height: "9", x: "14", y: "12", rx: "1", key: "1hutg5" }],
|
|
173
|
-
["rect", { width: "7", height: "5", x: "3", y: "16", rx: "1", key: "ldoo1y" }]
|
|
174
|
-
];
|
|
175
|
-
const LayoutDashboard = useRestConversationHistory.createLucideIcon("layout-dashboard", __iconNode$d);
|
|
176
|
-
/**
|
|
177
|
-
* @license lucide-react v0.575.0 - ISC
|
|
178
|
-
*
|
|
179
|
-
* This source code is licensed under the ISC license.
|
|
180
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
-
*/
|
|
182
|
-
const __iconNode$c = [
|
|
158
|
+
const __iconNode$6 = [
|
|
183
159
|
["path", { d: "m16 6 4 14", key: "ji33uf" }],
|
|
184
160
|
["path", { d: "M12 6v14", key: "1n7gus" }],
|
|
185
161
|
["path", { d: "M8 8v12", key: "1gg7y9" }],
|
|
186
162
|
["path", { d: "M4 4v16", key: "6qkkli" }]
|
|
187
163
|
];
|
|
188
|
-
const Library =
|
|
164
|
+
const Library = trash2.createLucideIcon("library", __iconNode$6);
|
|
189
165
|
/**
|
|
190
166
|
* @license lucide-react v0.575.0 - ISC
|
|
191
167
|
*
|
|
192
168
|
* This source code is licensed under the ISC license.
|
|
193
169
|
* See the LICENSE file in the root directory of this source tree.
|
|
194
170
|
*/
|
|
195
|
-
const __iconNode$
|
|
171
|
+
const __iconNode$5 = [
|
|
196
172
|
["path", { d: "M12 19v3", key: "npa21l" }],
|
|
197
173
|
["path", { d: "M19 10v2a7 7 0 0 1-14 0v-2", key: "1vc78b" }],
|
|
198
174
|
["rect", { x: "9", y: "2", width: "6", height: "13", rx: "3", key: "s6n7sd" }]
|
|
199
175
|
];
|
|
200
|
-
const Mic =
|
|
176
|
+
const Mic = trash2.createLucideIcon("mic", __iconNode$5);
|
|
201
177
|
/**
|
|
202
178
|
* @license lucide-react v0.575.0 - ISC
|
|
203
179
|
*
|
|
204
180
|
* This source code is licensed under the ISC license.
|
|
205
181
|
* See the LICENSE file in the root directory of this source tree.
|
|
206
182
|
*/
|
|
207
|
-
const __iconNode$
|
|
208
|
-
[
|
|
209
|
-
"path",
|
|
210
|
-
{
|
|
211
|
-
d: "M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",
|
|
212
|
-
key: "e79jfc"
|
|
213
|
-
}
|
|
214
|
-
],
|
|
215
|
-
["circle", { cx: "13.5", cy: "6.5", r: ".5", fill: "currentColor", key: "1okk4w" }],
|
|
216
|
-
["circle", { cx: "17.5", cy: "10.5", r: ".5", fill: "currentColor", key: "f64h9f" }],
|
|
217
|
-
["circle", { cx: "6.5", cy: "12.5", r: ".5", fill: "currentColor", key: "qy21gx" }],
|
|
218
|
-
["circle", { cx: "8.5", cy: "7.5", r: ".5", fill: "currentColor", key: "fotxhn" }]
|
|
219
|
-
];
|
|
220
|
-
const Palette = useRestConversationHistory.createLucideIcon("palette", __iconNode$a);
|
|
221
|
-
/**
|
|
222
|
-
* @license lucide-react v0.575.0 - ISC
|
|
223
|
-
*
|
|
224
|
-
* This source code is licensed under the ISC license.
|
|
225
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
-
*/
|
|
227
|
-
const __iconNode$9 = [
|
|
183
|
+
const __iconNode$4 = [
|
|
228
184
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
229
185
|
["path", { d: "M3 9h18", key: "1pudct" }],
|
|
230
186
|
["path", { d: "M9 21V9", key: "1oto5p" }]
|
|
231
187
|
];
|
|
232
|
-
const PanelsTopLeft =
|
|
188
|
+
const PanelsTopLeft = trash2.createLucideIcon("panels-top-left", __iconNode$4);
|
|
233
189
|
/**
|
|
234
190
|
* @license lucide-react v0.575.0 - ISC
|
|
235
191
|
*
|
|
236
192
|
* This source code is licensed under the ISC license.
|
|
237
193
|
* See the LICENSE file in the root directory of this source tree.
|
|
238
194
|
*/
|
|
239
|
-
const __iconNode$
|
|
195
|
+
const __iconNode$3 = [
|
|
240
196
|
[
|
|
241
197
|
"path",
|
|
242
198
|
{
|
|
@@ -254,144 +210,60 @@ const __iconNode$8 = [
|
|
|
254
210
|
["path", { d: "m2.3 2.3 7.286 7.286", key: "1wuzzi" }],
|
|
255
211
|
["circle", { cx: "11", cy: "11", r: "2", key: "xmgehs" }]
|
|
256
212
|
];
|
|
257
|
-
const PenTool =
|
|
213
|
+
const PenTool = trash2.createLucideIcon("pen-tool", __iconNode$3);
|
|
258
214
|
/**
|
|
259
215
|
* @license lucide-react v0.575.0 - ISC
|
|
260
216
|
*
|
|
261
217
|
* This source code is licensed under the ISC license.
|
|
262
218
|
* See the LICENSE file in the root directory of this source tree.
|
|
263
219
|
*/
|
|
264
|
-
const __iconNode$
|
|
265
|
-
[
|
|
266
|
-
"path",
|
|
267
|
-
{
|
|
268
|
-
d: "M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384",
|
|
269
|
-
key: "9njp5v"
|
|
270
|
-
}
|
|
271
|
-
]
|
|
272
|
-
];
|
|
273
|
-
const Phone = useRestConversationHistory.createLucideIcon("phone", __iconNode$7);
|
|
274
|
-
/**
|
|
275
|
-
* @license lucide-react v0.575.0 - ISC
|
|
276
|
-
*
|
|
277
|
-
* This source code is licensed under the ISC license.
|
|
278
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
279
|
-
*/
|
|
280
|
-
const __iconNode$6 = [
|
|
220
|
+
const __iconNode$2 = [
|
|
281
221
|
["rect", { width: "14", height: "20", x: "5", y: "2", rx: "2", ry: "2", key: "1yt0o3" }],
|
|
282
222
|
["path", { d: "M12 18h.01", key: "mhygvu" }]
|
|
283
223
|
];
|
|
284
|
-
const Smartphone =
|
|
285
|
-
/**
|
|
286
|
-
* @license lucide-react v0.575.0 - ISC
|
|
287
|
-
*
|
|
288
|
-
* This source code is licensed under the ISC license.
|
|
289
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
290
|
-
*/
|
|
291
|
-
const __iconNode$5 = [
|
|
292
|
-
[
|
|
293
|
-
"path",
|
|
294
|
-
{
|
|
295
|
-
d: "M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",
|
|
296
|
-
key: "1s2grr"
|
|
297
|
-
}
|
|
298
|
-
],
|
|
299
|
-
["path", { d: "M20 2v4", key: "1rf3ol" }],
|
|
300
|
-
["path", { d: "M22 4h-4", key: "gwowj6" }],
|
|
301
|
-
["circle", { cx: "4", cy: "20", r: "2", key: "6kqj1y" }]
|
|
302
|
-
];
|
|
303
|
-
const Sparkles = useRestConversationHistory.createLucideIcon("sparkles", __iconNode$5);
|
|
224
|
+
const Smartphone = trash2.createLucideIcon("smartphone", __iconNode$2);
|
|
304
225
|
/**
|
|
305
226
|
* @license lucide-react v0.575.0 - ISC
|
|
306
227
|
*
|
|
307
228
|
* This source code is licensed under the ISC license.
|
|
308
229
|
* See the LICENSE file in the root directory of this source tree.
|
|
309
230
|
*/
|
|
310
|
-
const __iconNode$
|
|
231
|
+
const __iconNode$1 = [
|
|
311
232
|
[
|
|
312
233
|
"path",
|
|
313
234
|
{ d: "M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344", key: "2acyp4" }
|
|
314
235
|
],
|
|
315
236
|
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
|
|
316
237
|
];
|
|
317
|
-
const SquareCheckBig =
|
|
318
|
-
/**
|
|
319
|
-
* @license lucide-react v0.575.0 - ISC
|
|
320
|
-
*
|
|
321
|
-
* This source code is licensed under the ISC license.
|
|
322
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
323
|
-
*/
|
|
324
|
-
const __iconNode$3 = [
|
|
325
|
-
[
|
|
326
|
-
"path",
|
|
327
|
-
{
|
|
328
|
-
d: "M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",
|
|
329
|
-
key: "r04s7s"
|
|
330
|
-
}
|
|
331
|
-
]
|
|
332
|
-
];
|
|
333
|
-
const Star = useRestConversationHistory.createLucideIcon("star", __iconNode$3);
|
|
238
|
+
const SquareCheckBig = trash2.createLucideIcon("square-check-big", __iconNode$1);
|
|
334
239
|
/**
|
|
335
240
|
* @license lucide-react v0.575.0 - ISC
|
|
336
241
|
*
|
|
337
242
|
* This source code is licensed under the ISC license.
|
|
338
243
|
* See the LICENSE file in the root directory of this source tree.
|
|
339
244
|
*/
|
|
340
|
-
const __iconNode
|
|
245
|
+
const __iconNode = [
|
|
341
246
|
["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
|
|
342
247
|
["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
|
|
343
248
|
];
|
|
344
|
-
const User =
|
|
345
|
-
/**
|
|
346
|
-
* @license lucide-react v0.575.0 - ISC
|
|
347
|
-
*
|
|
348
|
-
* This source code is licensed under the ISC license.
|
|
349
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
350
|
-
*/
|
|
351
|
-
const __iconNode$1 = [
|
|
352
|
-
[
|
|
353
|
-
"path",
|
|
354
|
-
{
|
|
355
|
-
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
356
|
-
key: "ftymec"
|
|
357
|
-
}
|
|
358
|
-
],
|
|
359
|
-
["rect", { x: "2", y: "6", width: "14", height: "12", rx: "2", key: "158x01" }]
|
|
360
|
-
];
|
|
361
|
-
const Video = useRestConversationHistory.createLucideIcon("video", __iconNode$1);
|
|
362
|
-
/**
|
|
363
|
-
* @license lucide-react v0.575.0 - ISC
|
|
364
|
-
*
|
|
365
|
-
* This source code is licensed under the ISC license.
|
|
366
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
367
|
-
*/
|
|
368
|
-
const __iconNode = [
|
|
369
|
-
[
|
|
370
|
-
"path",
|
|
371
|
-
{
|
|
372
|
-
d: "M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",
|
|
373
|
-
key: "1xq2db"
|
|
374
|
-
}
|
|
375
|
-
]
|
|
376
|
-
];
|
|
377
|
-
const Zap = useRestConversationHistory.createLucideIcon("zap", __iconNode);
|
|
249
|
+
const User = trash2.createLucideIcon("user", __iconNode);
|
|
378
250
|
function ChatHeaderRoot({
|
|
379
251
|
children,
|
|
380
252
|
className
|
|
381
253
|
}) {
|
|
382
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
254
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: trash2.cn(useRestConversationHistory.THREAD_HEADER_CLASS, className), children });
|
|
383
255
|
}
|
|
384
256
|
function ChatHeaderIdentity({
|
|
385
257
|
children,
|
|
386
258
|
className
|
|
387
259
|
}) {
|
|
388
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
260
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: trash2.cn(useRestConversationHistory.THREAD_HEADER_PILL_CLASS, className), children });
|
|
389
261
|
}
|
|
390
262
|
function ChatHeaderActions({
|
|
391
263
|
children,
|
|
392
264
|
className
|
|
393
265
|
}) {
|
|
394
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className:
|
|
266
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: trash2.cn(useRestConversationHistory.THREAD_HEADER_ACTIONS_CLASS, className), children });
|
|
395
267
|
}
|
|
396
268
|
const ChatHeader = {
|
|
397
269
|
Root: ChatHeaderRoot,
|
|
@@ -474,7 +346,7 @@ function ConversationTypeIcon({
|
|
|
474
346
|
}) {
|
|
475
347
|
if (conversation.state === "running") {
|
|
476
348
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
477
|
-
|
|
349
|
+
statewireHistoryEdge.LoaderCircle,
|
|
478
350
|
{
|
|
479
351
|
"aria-label": "Conversation running",
|
|
480
352
|
className: "mt-0.5 size-4 shrink-0 animate-spin text-primary"
|
|
@@ -485,7 +357,7 @@ function ConversationTypeIcon({
|
|
|
485
357
|
if (thumbnail) {
|
|
486
358
|
return /* @__PURE__ */ jsxRuntime.jsx("img", { src: thumbnail, alt: "", className: "mt-0.5 size-4 shrink-0" });
|
|
487
359
|
}
|
|
488
|
-
return automated ? /* @__PURE__ */ jsxRuntime.jsx(Bot, { className: "mt-0.5 size-4 shrink-0 text-primary" }) : /* @__PURE__ */ jsxRuntime.jsx(
|
|
360
|
+
return automated ? /* @__PURE__ */ jsxRuntime.jsx(wrench.Bot, { className: "mt-0.5 size-4 shrink-0 text-primary" }) : /* @__PURE__ */ jsxRuntime.jsx(wrench.MessageSquare, { className: "mt-0.5 size-4 shrink-0 text-emerald-500" });
|
|
489
361
|
}
|
|
490
362
|
function ConversationHistoryPanel({
|
|
491
363
|
conversations,
|
|
@@ -505,8 +377,51 @@ function ConversationHistoryPanel({
|
|
|
505
377
|
isRefreshing = false,
|
|
506
378
|
hasNextPage = false,
|
|
507
379
|
isFetchingNextPage = false,
|
|
508
|
-
onLoadMore
|
|
380
|
+
onLoadMore,
|
|
381
|
+
onHoverIntent,
|
|
382
|
+
onHoverIntentEnd,
|
|
383
|
+
hoverIntentDelayMs = 150
|
|
509
384
|
}) {
|
|
385
|
+
const hoverTimer = React.useRef(null);
|
|
386
|
+
const hoverIntentThreadId = React.useRef(null);
|
|
387
|
+
const onHoverIntentRef = React.useRef(onHoverIntent);
|
|
388
|
+
onHoverIntentRef.current = onHoverIntent;
|
|
389
|
+
const onHoverIntentEndRef = React.useRef(onHoverIntentEnd);
|
|
390
|
+
onHoverIntentEndRef.current = onHoverIntentEnd;
|
|
391
|
+
const cancelHoverTimer = React.useCallback(() => {
|
|
392
|
+
if (hoverTimer.current === null) return;
|
|
393
|
+
clearTimeout(hoverTimer.current);
|
|
394
|
+
hoverTimer.current = null;
|
|
395
|
+
}, []);
|
|
396
|
+
const endHoverIntent = React.useCallback(() => {
|
|
397
|
+
var _a;
|
|
398
|
+
const threadId = hoverIntentThreadId.current;
|
|
399
|
+
if (threadId === null) return;
|
|
400
|
+
hoverIntentThreadId.current = null;
|
|
401
|
+
(_a = onHoverIntentEndRef.current) == null ? void 0 : _a.call(onHoverIntentEndRef, threadId);
|
|
402
|
+
}, []);
|
|
403
|
+
React.useEffect(
|
|
404
|
+
() => () => {
|
|
405
|
+
cancelHoverTimer();
|
|
406
|
+
endHoverIntent();
|
|
407
|
+
},
|
|
408
|
+
[cancelHoverTimer, endHoverIntent]
|
|
409
|
+
);
|
|
410
|
+
const handleRowEnter = (threadId) => {
|
|
411
|
+
if (!onHoverIntentRef.current) return;
|
|
412
|
+
cancelHoverTimer();
|
|
413
|
+
hoverTimer.current = setTimeout(() => {
|
|
414
|
+
var _a;
|
|
415
|
+
hoverTimer.current = null;
|
|
416
|
+
hoverIntentThreadId.current = threadId;
|
|
417
|
+
(_a = onHoverIntentRef.current) == null ? void 0 : _a.call(onHoverIntentRef, threadId);
|
|
418
|
+
}, hoverIntentDelayMs);
|
|
419
|
+
};
|
|
420
|
+
const handleRowLeave = (threadId) => {
|
|
421
|
+
cancelHoverTimer();
|
|
422
|
+
if (hoverIntentThreadId.current !== threadId) return;
|
|
423
|
+
endHoverIntent();
|
|
424
|
+
};
|
|
510
425
|
const origins = React.useMemo(
|
|
511
426
|
() => [...new Set(conversations.map(originKey))].sort(),
|
|
512
427
|
[conversations]
|
|
@@ -530,6 +445,14 @@ function ConversationHistoryPanel({
|
|
|
530
445
|
return items ? [{ group, items }] : [];
|
|
531
446
|
});
|
|
532
447
|
}, [activityFilter, conversations, originFilter]);
|
|
448
|
+
React.useEffect(() => {
|
|
449
|
+
const threadId = hoverIntentThreadId.current;
|
|
450
|
+
if (threadId === null) return;
|
|
451
|
+
const stillVisible = grouped.some(
|
|
452
|
+
({ items }) => items.some((conversation) => conversation.threadId === threadId)
|
|
453
|
+
);
|
|
454
|
+
if (!stillVisible) endHoverIntent();
|
|
455
|
+
}, [grouped, endHoverIntent]);
|
|
533
456
|
const visibleCount = grouped.reduce(
|
|
534
457
|
(count, group) => count + group.items.length,
|
|
535
458
|
0
|
|
@@ -556,7 +479,7 @@ function ConversationHistoryPanel({
|
|
|
556
479
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
557
480
|
useRestConversationHistory.RefreshCw,
|
|
558
481
|
{
|
|
559
|
-
className:
|
|
482
|
+
className: trash2.cn("size-3.5", isRefreshing && "animate-spin")
|
|
560
483
|
}
|
|
561
484
|
)
|
|
562
485
|
}
|
|
@@ -575,7 +498,7 @@ function ConversationHistoryPanel({
|
|
|
575
498
|
)
|
|
576
499
|
] }),
|
|
577
500
|
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "relative block min-w-0 px-1 pb-2", children: [
|
|
578
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
501
|
+
/* @__PURE__ */ jsxRuntime.jsx(wrench.Search, { className: "pointer-events-none absolute left-3 top-1/2 size-3.5 -translate-y-[calc(50%+0.25rem)] text-muted-foreground" }),
|
|
579
502
|
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "sr-only", children: "Search sessions" }),
|
|
580
503
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
581
504
|
"input",
|
|
@@ -593,7 +516,7 @@ function ConversationHistoryPanel({
|
|
|
593
516
|
{
|
|
594
517
|
type: "button",
|
|
595
518
|
onClick: () => onActivityFilterChange(filter),
|
|
596
|
-
className:
|
|
519
|
+
className: trash2.cn(
|
|
597
520
|
"rounded-full border px-2 py-1 capitalize",
|
|
598
521
|
activityFilter === filter ? "border-primary bg-primary/10 text-primary" : "border-border text-muted-foreground"
|
|
599
522
|
),
|
|
@@ -617,7 +540,7 @@ function ConversationHistoryPanel({
|
|
|
617
540
|
] }),
|
|
618
541
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "max-h-[min(60vh,28rem)] overflow-y-auto px-0.5", children: [
|
|
619
542
|
isLoading ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2 px-2 py-4 text-xs text-muted-foreground", children: [
|
|
620
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
543
|
+
/* @__PURE__ */ jsxRuntime.jsx(statewireHistoryEdge.LoaderCircle, { className: "size-3.5 animate-spin" }),
|
|
621
544
|
" Loading sessions…"
|
|
622
545
|
] }) : visibleCount === 0 ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-2 py-4 text-xs text-muted-foreground", children: "No matching sessions." }) : grouped.map(({ group, items }) => /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
|
|
623
546
|
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "px-2 pb-1 pt-2 text-[10px] font-semibold uppercase tracking-[0.08em] text-muted-foreground/75", children: group }),
|
|
@@ -626,10 +549,12 @@ function ConversationHistoryPanel({
|
|
|
626
549
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
627
550
|
"div",
|
|
628
551
|
{
|
|
629
|
-
className:
|
|
552
|
+
className: trash2.cn(
|
|
630
553
|
"group flex items-start gap-2 rounded-md px-2 py-2 hover:bg-accent",
|
|
631
554
|
conversation.threadId === activeThreadId && "bg-primary/10 text-primary"
|
|
632
555
|
),
|
|
556
|
+
onMouseEnter: () => handleRowEnter(conversation.threadId),
|
|
557
|
+
onMouseLeave: () => handleRowLeave(conversation.threadId),
|
|
633
558
|
children: [
|
|
634
559
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
635
560
|
"button",
|
|
@@ -905,7 +830,7 @@ const MentionSuggestionsExtension = useRestConversationHistory.Extension.create(
|
|
|
905
830
|
}
|
|
906
831
|
});
|
|
907
832
|
const MentionSuggestionPopup = ({ clientRect, children }) => {
|
|
908
|
-
const { refs, floatingStyles } = useRestConversationHistory.useFloating
|
|
833
|
+
const { refs, floatingStyles } = useRestConversationHistory.useFloating({
|
|
909
834
|
placement: "bottom-start",
|
|
910
835
|
middleware: [useRestConversationHistory.offset(10), useRestConversationHistory.flip(), useRestConversationHistory.shift({ padding: 8 })],
|
|
911
836
|
whileElementsMounted: useRestConversationHistory.autoUpdate
|
|
@@ -1017,11 +942,28 @@ function triggerFetchIfNeeded(store, scope, query, _targetCount, parentScope) {
|
|
|
1017
942
|
);
|
|
1018
943
|
store.setState((prev) => ({ ...prev }));
|
|
1019
944
|
}).catch((error) => {
|
|
1020
|
-
console.error(`[orchestrator] Fetch error for scope ${scopeId}:`, error);
|
|
1021
945
|
const currentState = store.state;
|
|
1022
946
|
const currentMeta = fetchState.meta || {};
|
|
1023
947
|
const errorAttempts = (currentMeta.errorAttempts || 0) + 1;
|
|
1024
948
|
const retriable = errorAttempts < MAX_ERROR_RETRIES;
|
|
949
|
+
if (retriable) {
|
|
950
|
+
useRestConversationHistory.athenaDiagnostics.emit("mentions.fetch.error", {
|
|
951
|
+
level: "warn",
|
|
952
|
+
data: {
|
|
953
|
+
scopeId,
|
|
954
|
+
attempt: errorAttempts,
|
|
955
|
+
retriable,
|
|
956
|
+
error: error instanceof Error ? error.message : String(error)
|
|
957
|
+
}
|
|
958
|
+
});
|
|
959
|
+
} else {
|
|
960
|
+
useRestConversationHistory.athenaDiagnostics.error(
|
|
961
|
+
"mentions.fetch.error",
|
|
962
|
+
error,
|
|
963
|
+
{ code: "mentions_fetch_failed", message: `Mention suggestions failed for ${scopeId}` },
|
|
964
|
+
{ scopeId, attempt: errorAttempts, retriable }
|
|
965
|
+
);
|
|
966
|
+
}
|
|
1025
967
|
useRestConversationHistory.updateFetchState(
|
|
1026
968
|
currentState.registry,
|
|
1027
969
|
scopeId,
|
|
@@ -1114,51 +1056,51 @@ const MentionMenuSection = {
|
|
|
1114
1056
|
const ICON_MAP = {
|
|
1115
1057
|
// General
|
|
1116
1058
|
file: useRestConversationHistory.File,
|
|
1117
|
-
"file-text":
|
|
1059
|
+
"file-text": wrench.FileText,
|
|
1118
1060
|
"file-code": FileCode,
|
|
1119
|
-
folder:
|
|
1061
|
+
folder: wrench.Folder,
|
|
1120
1062
|
"folder-kanban": useRestConversationHistory.FolderKanban,
|
|
1121
|
-
globe:
|
|
1122
|
-
search:
|
|
1123
|
-
star: Star,
|
|
1124
|
-
users:
|
|
1063
|
+
globe: wrench.Globe,
|
|
1064
|
+
search: wrench.Search,
|
|
1065
|
+
star: wrench.Star,
|
|
1066
|
+
users: wrench.Users,
|
|
1125
1067
|
user: User,
|
|
1126
|
-
wrench:
|
|
1127
|
-
package:
|
|
1068
|
+
wrench: wrench.Wrench,
|
|
1069
|
+
package: wrench.Package,
|
|
1128
1070
|
"building-2": Building2,
|
|
1129
|
-
"hard-drive":
|
|
1071
|
+
"hard-drive": wrench.HardDrive,
|
|
1130
1072
|
"layout-grid": useRestConversationHistory.LayoutGrid,
|
|
1131
|
-
zap: Zap,
|
|
1073
|
+
zap: statewireHistoryEdge.Zap,
|
|
1132
1074
|
eye: Eye,
|
|
1133
1075
|
// Chrome tools
|
|
1134
|
-
camera:
|
|
1076
|
+
camera: wrench.Camera,
|
|
1135
1077
|
keyboard: Keyboard,
|
|
1136
|
-
code:
|
|
1137
|
-
monitor:
|
|
1078
|
+
code: wrench.Code,
|
|
1079
|
+
monitor: wrench.Monitor,
|
|
1138
1080
|
// Asset types
|
|
1139
|
-
image:
|
|
1140
|
-
video: Video,
|
|
1081
|
+
image: wrench.Image,
|
|
1082
|
+
video: wrench.Video,
|
|
1141
1083
|
headphones: Headphones,
|
|
1142
1084
|
mic: Mic,
|
|
1143
|
-
mail:
|
|
1144
|
-
calendar:
|
|
1145
|
-
phone: Phone,
|
|
1146
|
-
database:
|
|
1147
|
-
table:
|
|
1085
|
+
mail: wrench.Mail,
|
|
1086
|
+
calendar: wrench.Calendar,
|
|
1087
|
+
phone: wrench.Phone,
|
|
1088
|
+
database: wrench.Database,
|
|
1089
|
+
table: wrench.Table,
|
|
1148
1090
|
sheet: useRestConversationHistory.Sheet,
|
|
1149
|
-
palette: Palette,
|
|
1091
|
+
palette: wrench.Palette,
|
|
1150
1092
|
"pen-tool": PenTool,
|
|
1151
1093
|
layout: PanelsTopLeft,
|
|
1152
|
-
"layout-dashboard": LayoutDashboard,
|
|
1094
|
+
"layout-dashboard": wrench.LayoutDashboard,
|
|
1153
1095
|
library: Library,
|
|
1154
|
-
"book-open":
|
|
1155
|
-
sparkles: Sparkles,
|
|
1096
|
+
"book-open": wrench.BookOpen,
|
|
1097
|
+
sparkles: wrench.Sparkles,
|
|
1156
1098
|
"check-square": SquareCheckBig,
|
|
1157
1099
|
key: Key,
|
|
1158
1100
|
smartphone: Smartphone,
|
|
1159
1101
|
cloud: Cloud,
|
|
1160
|
-
workflow:
|
|
1161
|
-
presentation:
|
|
1102
|
+
workflow: wrench.Workflow,
|
|
1103
|
+
presentation: wrench.FileText
|
|
1162
1104
|
// Fallback for presentation type
|
|
1163
1105
|
};
|
|
1164
1106
|
function toKebabIconName(name) {
|
|
@@ -1200,7 +1142,7 @@ function MenuItemRow({
|
|
|
1200
1142
|
tabIndex: -1,
|
|
1201
1143
|
onClick,
|
|
1202
1144
|
onMouseEnter,
|
|
1203
|
-
className:
|
|
1145
|
+
className: trash2.cn(
|
|
1204
1146
|
"mention-item flex items-center justify-between gap-2 px-2 py-1.5 rounded cursor-pointer transition-colors",
|
|
1205
1147
|
"hover:bg-gray-100",
|
|
1206
1148
|
item.menuSection === MentionMenuSection.CURRENT_WEBPAGE && !isSelected && "bg-sky-50/70",
|
|
@@ -2200,7 +2142,12 @@ const TiptapComposer = React.forwardRef(({ placeholder = "Message Athena... (typ
|
|
|
2200
2142
|
const ext = item.type.split("/")[1] || "png";
|
|
2201
2143
|
const file = new File([blob], `pasted-image-${Date.now()}.${ext}`, { type: item.type });
|
|
2202
2144
|
void addAttachment(file).catch((error) => {
|
|
2203
|
-
|
|
2145
|
+
useRestConversationHistory.athenaDiagnostics.error(
|
|
2146
|
+
"composer.attachment.error",
|
|
2147
|
+
error,
|
|
2148
|
+
{ code: "attachment_failed", message: "Pasted image upload failed" },
|
|
2149
|
+
{ source: "paste", type: file.type }
|
|
2150
|
+
);
|
|
2204
2151
|
});
|
|
2205
2152
|
}
|
|
2206
2153
|
handled = true;
|
|
@@ -2220,7 +2167,12 @@ const TiptapComposer = React.forwardRef(({ placeholder = "Message Athena... (typ
|
|
|
2220
2167
|
if (file.type.startsWith("image/")) {
|
|
2221
2168
|
event.preventDefault();
|
|
2222
2169
|
void addAttachment(file).catch((error) => {
|
|
2223
|
-
|
|
2170
|
+
useRestConversationHistory.athenaDiagnostics.error(
|
|
2171
|
+
"composer.attachment.error",
|
|
2172
|
+
error,
|
|
2173
|
+
{ code: "attachment_failed", message: "Dropped image upload failed" },
|
|
2174
|
+
{ source: "drop", type: file.type }
|
|
2175
|
+
);
|
|
2224
2176
|
});
|
|
2225
2177
|
handled = true;
|
|
2226
2178
|
}
|
|
@@ -2393,7 +2345,7 @@ const SignInTextField = ({ label, placeholder, value, onChange, type = "text", c
|
|
|
2393
2345
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2394
2346
|
"input",
|
|
2395
2347
|
{
|
|
2396
|
-
className:
|
|
2348
|
+
className: trash2.cn(
|
|
2397
2349
|
"h-9 w-full rounded-md border bg-background px-2.5 text-xs outline-none focus:ring-2 focus:ring-ring/20",
|
|
2398
2350
|
className
|
|
2399
2351
|
),
|
|
@@ -2447,151 +2399,6 @@ const SignInConsent = ({ checked, onChange, children }) => /* @__PURE__ */ jsxRu
|
|
|
2447
2399
|
),
|
|
2448
2400
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children })
|
|
2449
2401
|
] });
|
|
2450
|
-
const EXIT_ANIMATION_MS = 200;
|
|
2451
|
-
const EXIT_RESET_MS = 2500;
|
|
2452
|
-
const ContinuePill = ({ onClick, ariaLabel, dataTestId }) => {
|
|
2453
|
-
const [isExiting, setIsExiting] = React.useState(false);
|
|
2454
|
-
const onClickRef = React.useRef(onClick);
|
|
2455
|
-
const pendingOnClickRef = React.useRef(onClick);
|
|
2456
|
-
onClickRef.current = onClick;
|
|
2457
|
-
React.useEffect(() => {
|
|
2458
|
-
if (!isExiting) return;
|
|
2459
|
-
const dispatchTimer = setTimeout(
|
|
2460
|
-
() => pendingOnClickRef.current(),
|
|
2461
|
-
EXIT_ANIMATION_MS
|
|
2462
|
-
);
|
|
2463
|
-
const resetTimer = setTimeout(() => setIsExiting(false), EXIT_RESET_MS);
|
|
2464
|
-
return () => {
|
|
2465
|
-
clearTimeout(dispatchTimer);
|
|
2466
|
-
clearTimeout(resetTimer);
|
|
2467
|
-
};
|
|
2468
|
-
}, [isExiting]);
|
|
2469
|
-
const handleClick = () => {
|
|
2470
|
-
if (isExiting) return;
|
|
2471
|
-
pendingOnClickRef.current = onClickRef.current;
|
|
2472
|
-
setIsExiting(true);
|
|
2473
|
-
};
|
|
2474
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2475
|
-
"button",
|
|
2476
|
-
{
|
|
2477
|
-
type: "button",
|
|
2478
|
-
onClick: handleClick,
|
|
2479
|
-
disabled: isExiting,
|
|
2480
|
-
className: useRestConversationHistory.cn(
|
|
2481
|
-
"group inline-flex items-center gap-1.5 rounded-full bg-primary px-3.5 py-1 text-xs font-medium text-primary-foreground shadow-sm",
|
|
2482
|
-
"transition-all duration-200 ease-out",
|
|
2483
|
-
"hover:bg-primary/90 hover:shadow-md active:scale-95",
|
|
2484
|
-
"animate-in fade-in slide-in-from-bottom-1",
|
|
2485
|
-
isExiting && "pointer-events-none scale-90 opacity-0"
|
|
2486
|
-
),
|
|
2487
|
-
"aria-label": ariaLabel,
|
|
2488
|
-
"data-testid": dataTestId,
|
|
2489
|
-
children: [
|
|
2490
|
-
/* @__PURE__ */ jsxRuntime.jsx(useRestConversationHistory.Play, { className: "size-3 fill-current transition-transform duration-200 ease-out group-hover:translate-x-0.5" }),
|
|
2491
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Continue" })
|
|
2492
|
-
]
|
|
2493
|
-
}
|
|
2494
|
-
);
|
|
2495
|
-
};
|
|
2496
|
-
function StatewireContinueRunButton({
|
|
2497
|
-
allowReadyFallback = false
|
|
2498
|
-
} = {}) {
|
|
2499
|
-
const status = useRestConversationHistory.useDeepAgentThreadStatus();
|
|
2500
|
-
const { runId } = reactStatewire.useStatewireRuns();
|
|
2501
|
-
const sendCommand = reactStatewire.useStatewireSendCommand();
|
|
2502
|
-
const isSettled = status === "stopped" || status === "error";
|
|
2503
|
-
if (!isSettled && !(allowReadyFallback && status === "ready")) return null;
|
|
2504
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2505
|
-
ContinuePill,
|
|
2506
|
-
{
|
|
2507
|
-
ariaLabel: "Continue this run from where it stopped",
|
|
2508
|
-
dataTestId: "statewire-continue-run",
|
|
2509
|
-
onClick: () => {
|
|
2510
|
-
sendCommand({
|
|
2511
|
-
type: "run/continue",
|
|
2512
|
-
...runId !== null && { runId }
|
|
2513
|
-
});
|
|
2514
|
-
}
|
|
2515
|
-
}
|
|
2516
|
-
);
|
|
2517
|
-
}
|
|
2518
|
-
function StatewireContinueRunAffordance() {
|
|
2519
|
-
const messageId = react.useAuiState((state) => state.message.id);
|
|
2520
|
-
const lastMessageId = react.useAuiState(
|
|
2521
|
-
(state) => {
|
|
2522
|
-
var _a;
|
|
2523
|
-
return (_a = state.thread.messages.at(-1)) == null ? void 0 : _a.id;
|
|
2524
|
-
}
|
|
2525
|
-
);
|
|
2526
|
-
const runMarker = react.useAuiState(
|
|
2527
|
-
(state) => {
|
|
2528
|
-
var _a;
|
|
2529
|
-
return (_a = useRestConversationHistory.readRunMarkerFromSourceMessages(state.message)) == null ? void 0 : _a.marker;
|
|
2530
|
-
}
|
|
2531
|
-
);
|
|
2532
|
-
const threadExtras = react.useAuiState((state) => state.thread.extras);
|
|
2533
|
-
const isContinuableMarker = runMarker === useRestConversationHistory.ATHENA_RUN_MARKER_CANCELLED || runMarker === useRestConversationHistory.ATHENA_RUN_MARKER_FAILED;
|
|
2534
|
-
if (messageId !== lastMessageId || !isContinuableMarker) return null;
|
|
2535
|
-
if (!useRestConversationHistory.hasStatewireThreadExtras(threadExtras)) return null;
|
|
2536
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex w-full justify-center py-1", children: /* @__PURE__ */ jsxRuntime.jsx(StatewireContinueRunButton, { allowReadyFallback: true }) });
|
|
2537
|
-
}
|
|
2538
|
-
function StatewireRunEndedFooter({
|
|
2539
|
-
className
|
|
2540
|
-
} = {}) {
|
|
2541
|
-
const threadExtras = react.useAuiState((state) => state.thread.extras);
|
|
2542
|
-
if (!useRestConversationHistory.hasStatewireThreadExtras(threadExtras)) return null;
|
|
2543
|
-
return /* @__PURE__ */ jsxRuntime.jsx(StatewireRunEndedFooterContent, { className });
|
|
2544
|
-
}
|
|
2545
|
-
function StatewireRunEndedFooterContent({
|
|
2546
|
-
className
|
|
2547
|
-
}) {
|
|
2548
|
-
const status = useRestConversationHistory.useDeepAgentThreadStatus();
|
|
2549
|
-
const { error } = reactStatewire.useStatewireRuns();
|
|
2550
|
-
const tailEndingKind = react.useAuiState((state) => {
|
|
2551
|
-
var _a;
|
|
2552
|
-
const last = state.thread.messages.at(-1);
|
|
2553
|
-
return last ? ((_a = useRestConversationHistory.readRuntimeMessageFromSourceMessages(last)) == null ? void 0 : _a.kind) ?? null : null;
|
|
2554
|
-
});
|
|
2555
|
-
const tailEndingSilent = react.useAuiState((state) => {
|
|
2556
|
-
var _a;
|
|
2557
|
-
const last = state.thread.messages.at(-1);
|
|
2558
|
-
return last ? ((_a = useRestConversationHistory.readRuntimeMessageFromSourceMessages(last)) == null ? void 0 : _a.silent) ?? false : false;
|
|
2559
|
-
});
|
|
2560
|
-
if (status !== "stopped" && status !== "error") return null;
|
|
2561
|
-
if (status === "stopped" && tailEndingSilent) return null;
|
|
2562
|
-
const tailRendersEnding = tailEndingKind !== null && !tailEndingSilent;
|
|
2563
|
-
const tailMatchesStatus = status === "error" ? tailEndingKind === "failed" : tailEndingKind === "stopped" || tailEndingKind === "paused";
|
|
2564
|
-
if (tailRendersEnding && tailMatchesStatus) return null;
|
|
2565
|
-
const tailOwnsContinue = tailRendersEnding && (tailEndingKind === "stopped" || tailEndingKind === "paused" || tailEndingKind === "failed");
|
|
2566
|
-
const action = tailOwnsContinue ? void 0 : /* @__PURE__ */ jsxRuntime.jsx(StatewireContinueRunButton, {});
|
|
2567
|
-
const message = status === "error" ? {
|
|
2568
|
-
kind: "failed",
|
|
2569
|
-
reason: "error",
|
|
2570
|
-
severity: "error",
|
|
2571
|
-
title: "Run failed",
|
|
2572
|
-
detail: void 0,
|
|
2573
|
-
text: (error == null ? void 0 : error.message) ? `⚠️ The run failed: ${error.message}` : void 0,
|
|
2574
|
-
silent: false,
|
|
2575
|
-
isSoleSourceMessage: true
|
|
2576
|
-
} : {
|
|
2577
|
-
kind: "stopped",
|
|
2578
|
-
reason: void 0,
|
|
2579
|
-
severity: "info",
|
|
2580
|
-
title: "Conversation stopped",
|
|
2581
|
-
detail: void 0,
|
|
2582
|
-
text: void 0,
|
|
2583
|
-
silent: false,
|
|
2584
|
-
isSoleSourceMessage: true
|
|
2585
|
-
};
|
|
2586
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2587
|
-
useRestConversationHistory.RuntimeMessageCard,
|
|
2588
|
-
{
|
|
2589
|
-
message,
|
|
2590
|
-
action,
|
|
2591
|
-
className: useRestConversationHistory.cn("mx-auto max-w-[95%]", className)
|
|
2592
|
-
}
|
|
2593
|
-
);
|
|
2594
|
-
}
|
|
2595
2402
|
exports.BranchPicker = useRestConversationHistory.BranchPicker;
|
|
2596
2403
|
exports.COMPOSER_DOCK_CLASS = useRestConversationHistory.COMPOSER_DOCK_CLASS;
|
|
2597
2404
|
exports.COMPOSER_EDITOR_ROW_CLASS = useRestConversationHistory.COMPOSER_EDITOR_ROW_CLASS;
|
|
@@ -2608,7 +2415,6 @@ exports.MentionAuthCtx = useRestConversationHistory.MentionAuthCtx;
|
|
|
2608
2415
|
exports.MentionChip = useRestConversationHistory.MentionChip;
|
|
2609
2416
|
exports.MentionLink = useRestConversationHistory.MentionLink;
|
|
2610
2417
|
exports.MessageActionsReadOnlyProvider = useRestConversationHistory.MessageActionsReadOnlyProvider;
|
|
2611
|
-
exports.RuntimeMessageCard = useRestConversationHistory.RuntimeMessageCard;
|
|
2612
2418
|
exports.SIMPLE_SEARCH_QUERY = useRestConversationHistory.SIMPLE_SEARCH_QUERY;
|
|
2613
2419
|
exports.SmallIconButton = useRestConversationHistory.SmallIconButton;
|
|
2614
2420
|
exports.THREAD_HEADER_ACTIONS_CLASS = useRestConversationHistory.THREAD_HEADER_ACTIONS_CLASS;
|
|
@@ -2633,11 +2439,25 @@ exports.parseMentionsInText = useRestConversationHistory.parseMentionsInText;
|
|
|
2633
2439
|
exports.resolveComposerAction = useRestConversationHistory.resolveComposerAction;
|
|
2634
2440
|
exports.useMentionAuth = useRestConversationHistory.useMentionAuth;
|
|
2635
2441
|
exports.useMessageActionsReadOnly = useRestConversationHistory.useMessageActionsReadOnly;
|
|
2442
|
+
exports.ContinuePill = statewireHistoryEdge.ContinuePill;
|
|
2443
|
+
exports.HISTORY_EDGE_NEAR_MARGIN_PX = statewireHistoryEdge.HISTORY_EDGE_NEAR_MARGIN_PX;
|
|
2444
|
+
exports.HITL_PENDING_RESUME_GRACE_MS = statewireHistoryEdge.HITL_PENDING_RESUME_GRACE_MS;
|
|
2445
|
+
exports.HistoryEdgeRow = statewireHistoryEdge.HistoryEdgeRow;
|
|
2446
|
+
exports.RuntimeMessageCard = statewireHistoryEdge.RuntimeMessageCard;
|
|
2447
|
+
exports.StatewireApprovalCard = statewireHistoryEdge.StatewireApprovalCard;
|
|
2448
|
+
exports.StatewireHistoryEdge = statewireHistoryEdge.StatewireHistoryEdge;
|
|
2449
|
+
exports.StatewireQueuedMessages = statewireHistoryEdge.StatewireQueuedMessages;
|
|
2450
|
+
exports.StatewireToolOutputsContext = statewireHistoryEdge.StatewireToolOutputsContext;
|
|
2451
|
+
exports.THREAD_VIEWPORT_ATTR = statewireHistoryEdge.THREAD_VIEWPORT_ATTR;
|
|
2452
|
+
exports.useStatewireApprovalRequest = statewireHistoryEdge.useStatewireApprovalRequest;
|
|
2453
|
+
exports.useStatewireToolOutputs = statewireHistoryEdge.useStatewireToolOutputs;
|
|
2454
|
+
exports.StatewireContinueRunAffordance = statewireContinueRun.StatewireContinueRunAffordance;
|
|
2455
|
+
exports.StatewireContinueRunButton = statewireContinueRun.StatewireContinueRunButton;
|
|
2456
|
+
exports.StatewireRunEndedFooter = statewireContinueRun.StatewireRunEndedFooter;
|
|
2636
2457
|
exports.ChatHeader = ChatHeader;
|
|
2637
2458
|
exports.ChatHeaderActions = ChatHeaderActions;
|
|
2638
2459
|
exports.ChatHeaderIdentity = ChatHeaderIdentity;
|
|
2639
2460
|
exports.ChatHeaderRoot = ChatHeaderRoot;
|
|
2640
|
-
exports.ContinuePill = ContinuePill;
|
|
2641
2461
|
exports.ConversationHistoryPanel = ConversationHistoryPanel;
|
|
2642
2462
|
exports.MentionExtension = MentionExtension;
|
|
2643
2463
|
exports.MentionIcon = MentionIcon;
|
|
@@ -2654,9 +2474,6 @@ exports.SignInFallbackSection = SignInFallbackSection;
|
|
|
2654
2474
|
exports.SignInSecondaryButton = SignInSecondaryButton;
|
|
2655
2475
|
exports.SignInSelect = SignInSelect;
|
|
2656
2476
|
exports.SignInTextField = SignInTextField;
|
|
2657
|
-
exports.StatewireContinueRunAffordance = StatewireContinueRunAffordance;
|
|
2658
|
-
exports.StatewireContinueRunButton = StatewireContinueRunButton;
|
|
2659
|
-
exports.StatewireRunEndedFooter = StatewireRunEndedFooter;
|
|
2660
2477
|
exports.TiptapComposer = TiptapComposer;
|
|
2661
2478
|
exports.buildRootMenuItems = buildRootMenuItems;
|
|
2662
2479
|
exports.makeMentionUrl = makeMentionUrl;
|