@athenaintel/react 0.17.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 +179 -43
- package/dist/AthenaContext-B1QMhIP-.cjs.map +1 -1
- package/dist/AthenaContext-MOslgOmE.js.map +1 -1
- 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-banners.d.ts +5 -9
- 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 +9 -0
- package/dist/chat-ui/mentions/suggestions/data/api-client.d.ts +24 -0
- package/dist/chat-ui/mentions/suggestions/data/sources/index.d.ts +5 -0
- package/dist/chat-ui/mentions/suggestions/data/use-mention-suggestions.d.ts +1 -1
- package/dist/chat-ui/mentions/suggestions/shims.d.ts +0 -4
- package/dist/chat-ui/messages/continue-pill.d.ts +13 -0
- package/dist/chat-ui/messages/message-components.d.ts +7 -2
- package/dist/chat-ui/messages/runtime-message.d.ts +21 -0
- package/dist/chat-ui/messages/statewire-continue-run.d.ts +82 -0
- 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-composer-dock.d.ts +1 -1
- 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 +292 -252
- package/dist/chat-ui.cjs.map +1 -1
- package/dist/chat-ui.js +289 -248
- package/dist/chat-ui.js.map +1 -1
- package/dist/diagnostics/athena-diagnostics.d.ts +1 -1
- package/dist/diagnostics/errors.d.ts +4 -4
- package/dist/index.cjs +20237 -26233
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +25 -14
- package/dist/index.js +18465 -24458
- package/dist/index.js.map +1 -1
- package/dist/lib/athena-urls.d.ts +0 -2
- package/dist/lib/posthog/wrap-posthog-client.d.ts +3 -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/AthenaContext.d.ts +0 -7
- package/dist/provider/AthenaProvider.d.ts +28 -52
- package/dist/provider/config.d.ts +19 -15
- package/dist/provider/statewire-lifecycle-context.d.ts +3 -4
- package/dist/provider/statewire-window-context.d.ts +12 -0
- package/dist/provider/types.d.ts +0 -1
- package/dist/runtime/statewire-auth-headers.d.ts +38 -0
- package/dist/runtime/statewire-lifecycle.d.ts +25 -1
- package/dist/runtime/statewire-run-config.d.ts +18 -5
- package/dist/runtime/statewire-session-key.d.ts +13 -0
- package/dist/runtime/useAthenaStatewireRuntime.d.ts +42 -16
- 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/ThreadList.d.ts +6 -1
- package/dist/threads/mint-thread-id.d.ts +8 -0
- package/dist/threads/statewire-thread-list.d.ts +26 -9
- package/dist/threads/thread-id-context.d.ts +9 -0
- package/dist/threads/use-statewire-conversation-history.d.ts +2 -0
- package/dist/threads/useAthenaThreadManager.d.ts +24 -12
- 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-BdnG8jEP.cjs → use-rest-conversation-history-Cm8qMRxp.cjs} +985 -5405
- package/dist/use-rest-conversation-history-Cm8qMRxp.cjs.map +1 -0
- package/dist/{use-rest-conversation-history-DpEswBqQ.js → use-rest-conversation-history-veDZS-oL.js} +1035 -5455
- 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/runtime/converter.d.ts +0 -5
- package/dist/runtime/external-message-converter.d.ts +0 -21
- package/dist/runtime/schemas.d.ts +0 -24
- package/dist/runtime/transport.d.ts +0 -39
- package/dist/runtime/useAthenaRuntime.d.ts +0 -47
- package/dist/threads/adapter.d.ts +0 -42
- package/dist/threads/useActiveThreadStateHydration.d.ts +0 -12
- package/dist/threads/useThreadTitlePolling.d.ts +0 -14
- package/dist/use-rest-conversation-history-BdnG8jEP.cjs.map +0 -1
- package/dist/use-rest-conversation-history-DpEswBqQ.js.map +0 -1
package/dist/chat-ui.js
CHANGED
|
@@ -1,15 +1,21 @@
|
|
|
1
1
|
var __defProp = Object.defineProperty;
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { T as THREAD_HEADER_ACTIONS_CLASS, a as THREAD_HEADER_PILL_CLASS, b as THREAD_HEADER_CLASS, R as RefreshCw, P as Plus, c as conversationDisplayTitle, d as assetTypeToThumb, N as Node, m as mergeAttributes, E as Extension, S as Suggestion, u as useFloating, F as FloatingPortal, e as autoUpdate, o as offset, f as flip, s as shift, g as getFilteredItems, h as getFetchState, i as getEntry, j as updateFetchState, k as addItems, r as registerSource, l as bindScopes, n as athenaDiagnostics, p as useStore, q as File$1, t as Sheet, L as LayoutGrid, v as FolderKanban, w as Store, x as getSearchScope, y as fetchGraphQL, z as PAGINATED_ASSETS_QUERY, W as WORKSPACE_MEMBERS_QUERY, A as SIMPLE_SEARCH_QUERY, B as assetTypeToIcon, C as TOOL_CATALOG_QUERY, D as useMentionAuth, G as createScopeRegistry, H as createItemCache, I as useEditor, J as StarterKit, K as Placeholder, M as EditorContent } from "./use-rest-conversation-history-veDZS-oL.js";
|
|
5
|
+
import { O, Q, U, V, X, Y, Z, _, $, a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, aa, ab, ac, ad, ae, af, ag, ah, ai, aj, ak, al, am } from "./use-rest-conversation-history-veDZS-oL.js";
|
|
6
|
+
import { L as LoaderCircle, Z as Zap } from "./statewire-history-edge-CPohUKMt.js";
|
|
7
|
+
import { C, g, H, a, R, S, b, c, d, T, u, e } from "./statewire-history-edge-CPohUKMt.js";
|
|
6
8
|
import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
|
|
7
|
-
import {
|
|
9
|
+
import { b as createLucideIcon, c as cn } from "./trash-2-CCwSURL-.js";
|
|
10
|
+
import { useRef, useCallback, useEffect, useMemo, useState, Fragment, useImperativeHandle, forwardRef, useId } from "react";
|
|
11
|
+
import { S as Search, B as Bot, M as MessageSquare, F as FileText, W as Workflow, a as Sparkles, b as BookOpen, L as LayoutDashboard, c as Palette, T as Table, D as Database, d as Phone, C as Calendar, e as Mail, V as Video, I as Image, f as Monitor, g as Code, h as Camera, H as HardDrive, P as Package, i as Wrench, U as Users, j as Star, G as Globe, k as Folder } from "./wrench-CbrOlVYm.js";
|
|
8
12
|
import { useAui, unstable_useComposerInput } from "@assistant-ui/react";
|
|
9
13
|
import "@assistant-ui/tap";
|
|
10
14
|
import "statewire";
|
|
11
|
-
import "@assistant-ui/store";
|
|
12
15
|
import "@assistant-ui/react-statewire";
|
|
16
|
+
import "@assistant-ui/store";
|
|
17
|
+
import "@assistant-ui/core";
|
|
18
|
+
import { S as S2, a as a10, b as b2 } from "./statewire-continue-run-D34gS7_1.js";
|
|
13
19
|
const mentionHandlersByThread = /* @__PURE__ */ new Map();
|
|
14
20
|
function registerChatAssetMentionHandler(threadId, handler) {
|
|
15
21
|
mentionHandlersByThread.set(threadId, handler);
|
|
@@ -25,22 +31,19 @@ function registerChatAssetMentionHandler(threadId, handler) {
|
|
|
25
31
|
* This source code is licensed under the ISC license.
|
|
26
32
|
* See the LICENSE file in the root directory of this source tree.
|
|
27
33
|
*/
|
|
28
|
-
const __iconNode$
|
|
29
|
-
["
|
|
30
|
-
["
|
|
31
|
-
["path", { d: "
|
|
32
|
-
["path", { d: "M20 14h2", key: "4cs60a" }],
|
|
33
|
-
["path", { d: "M15 13v2", key: "1xurst" }],
|
|
34
|
-
["path", { d: "M9 13v2", key: "rq6x2g" }]
|
|
34
|
+
const __iconNode$e = [
|
|
35
|
+
["rect", { width: "20", height: "5", x: "2", y: "3", rx: "1", key: "1wp1u1" }],
|
|
36
|
+
["path", { d: "M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8", key: "1s80jp" }],
|
|
37
|
+
["path", { d: "M10 12h4", key: "a56b0p" }]
|
|
35
38
|
];
|
|
36
|
-
const
|
|
39
|
+
const Archive = createLucideIcon("archive", __iconNode$e);
|
|
37
40
|
/**
|
|
38
41
|
* @license lucide-react v0.575.0 - ISC
|
|
39
42
|
*
|
|
40
43
|
* This source code is licensed under the ISC license.
|
|
41
44
|
* See the LICENSE file in the root directory of this source tree.
|
|
42
45
|
*/
|
|
43
|
-
const __iconNode$
|
|
46
|
+
const __iconNode$d = [
|
|
44
47
|
["path", { d: "M10 12h4", key: "a56b0p" }],
|
|
45
48
|
["path", { d: "M10 8h4", key: "1sr2af" }],
|
|
46
49
|
["path", { d: "M14 21v-3a2 2 0 0 0-4 0v3", key: "1rgiei" }],
|
|
@@ -53,24 +56,24 @@ const __iconNode$k = [
|
|
|
53
56
|
],
|
|
54
57
|
["path", { d: "M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16", key: "16ra0t" }]
|
|
55
58
|
];
|
|
56
|
-
const Building2 = createLucideIcon("building-2", __iconNode$
|
|
59
|
+
const Building2 = createLucideIcon("building-2", __iconNode$d);
|
|
57
60
|
/**
|
|
58
61
|
* @license lucide-react v0.575.0 - ISC
|
|
59
62
|
*
|
|
60
63
|
* This source code is licensed under the ISC license.
|
|
61
64
|
* See the LICENSE file in the root directory of this source tree.
|
|
62
65
|
*/
|
|
63
|
-
const __iconNode$
|
|
66
|
+
const __iconNode$c = [
|
|
64
67
|
["path", { d: "M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z", key: "p7xjir" }]
|
|
65
68
|
];
|
|
66
|
-
const Cloud = createLucideIcon("cloud", __iconNode$
|
|
69
|
+
const Cloud = createLucideIcon("cloud", __iconNode$c);
|
|
67
70
|
/**
|
|
68
71
|
* @license lucide-react v0.575.0 - ISC
|
|
69
72
|
*
|
|
70
73
|
* This source code is licensed under the ISC license.
|
|
71
74
|
* See the LICENSE file in the root directory of this source tree.
|
|
72
75
|
*/
|
|
73
|
-
const __iconNode$
|
|
76
|
+
const __iconNode$b = [
|
|
74
77
|
[
|
|
75
78
|
"path",
|
|
76
79
|
{
|
|
@@ -80,14 +83,14 @@ const __iconNode$i = [
|
|
|
80
83
|
],
|
|
81
84
|
["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
|
|
82
85
|
];
|
|
83
|
-
const Eye = createLucideIcon("eye", __iconNode$
|
|
86
|
+
const Eye = createLucideIcon("eye", __iconNode$b);
|
|
84
87
|
/**
|
|
85
88
|
* @license lucide-react v0.575.0 - ISC
|
|
86
89
|
*
|
|
87
90
|
* This source code is licensed under the ISC license.
|
|
88
91
|
* See the LICENSE file in the root directory of this source tree.
|
|
89
92
|
*/
|
|
90
|
-
const __iconNode$
|
|
93
|
+
const __iconNode$a = [
|
|
91
94
|
[
|
|
92
95
|
"path",
|
|
93
96
|
{
|
|
@@ -99,14 +102,14 @@ const __iconNode$h = [
|
|
|
99
102
|
["path", { d: "M10 12.5 8 15l2 2.5", key: "1tg20x" }],
|
|
100
103
|
["path", { d: "m14 12.5 2 2.5-2 2.5", key: "yinavb" }]
|
|
101
104
|
];
|
|
102
|
-
const FileCode = createLucideIcon("file-code", __iconNode$
|
|
105
|
+
const FileCode = createLucideIcon("file-code", __iconNode$a);
|
|
103
106
|
/**
|
|
104
107
|
* @license lucide-react v0.575.0 - ISC
|
|
105
108
|
*
|
|
106
109
|
* This source code is licensed under the ISC license.
|
|
107
110
|
* See the LICENSE file in the root directory of this source tree.
|
|
108
111
|
*/
|
|
109
|
-
const __iconNode$
|
|
112
|
+
const __iconNode$9 = [
|
|
110
113
|
[
|
|
111
114
|
"path",
|
|
112
115
|
{
|
|
@@ -115,26 +118,26 @@ const __iconNode$g = [
|
|
|
115
118
|
}
|
|
116
119
|
]
|
|
117
120
|
];
|
|
118
|
-
const Headphones = createLucideIcon("headphones", __iconNode$
|
|
121
|
+
const Headphones = createLucideIcon("headphones", __iconNode$9);
|
|
119
122
|
/**
|
|
120
123
|
* @license lucide-react v0.575.0 - ISC
|
|
121
124
|
*
|
|
122
125
|
* This source code is licensed under the ISC license.
|
|
123
126
|
* See the LICENSE file in the root directory of this source tree.
|
|
124
127
|
*/
|
|
125
|
-
const __iconNode$
|
|
128
|
+
const __iconNode$8 = [
|
|
126
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" }],
|
|
127
130
|
["path", { d: "m21 2-9.6 9.6", key: "1j0ho8" }],
|
|
128
131
|
["circle", { cx: "7.5", cy: "15.5", r: "5.5", key: "yqb3hr" }]
|
|
129
132
|
];
|
|
130
|
-
const Key = createLucideIcon("key", __iconNode$
|
|
133
|
+
const Key = createLucideIcon("key", __iconNode$8);
|
|
131
134
|
/**
|
|
132
135
|
* @license lucide-react v0.575.0 - ISC
|
|
133
136
|
*
|
|
134
137
|
* This source code is licensed under the ISC license.
|
|
135
138
|
* See the LICENSE file in the root directory of this source tree.
|
|
136
139
|
*/
|
|
137
|
-
const __iconNode$
|
|
140
|
+
const __iconNode$7 = [
|
|
138
141
|
["path", { d: "M10 8h.01", key: "1r9ogq" }],
|
|
139
142
|
["path", { d: "M12 12h.01", key: "1mp3jc" }],
|
|
140
143
|
["path", { d: "M14 8h.01", key: "1primd" }],
|
|
@@ -145,84 +148,51 @@ const __iconNode$e = [
|
|
|
145
148
|
["path", { d: "M8 12h.01", key: "czm47f" }],
|
|
146
149
|
["rect", { width: "20", height: "16", x: "2", y: "4", rx: "2", key: "18n3k1" }]
|
|
147
150
|
];
|
|
148
|
-
const Keyboard = createLucideIcon("keyboard", __iconNode$
|
|
151
|
+
const Keyboard = createLucideIcon("keyboard", __iconNode$7);
|
|
149
152
|
/**
|
|
150
153
|
* @license lucide-react v0.575.0 - ISC
|
|
151
154
|
*
|
|
152
155
|
* This source code is licensed under the ISC license.
|
|
153
156
|
* See the LICENSE file in the root directory of this source tree.
|
|
154
157
|
*/
|
|
155
|
-
const __iconNode$
|
|
156
|
-
["rect", { width: "7", height: "9", x: "3", y: "3", rx: "1", key: "10lvy0" }],
|
|
157
|
-
["rect", { width: "7", height: "5", x: "14", y: "3", rx: "1", key: "16une8" }],
|
|
158
|
-
["rect", { width: "7", height: "9", x: "14", y: "12", rx: "1", key: "1hutg5" }],
|
|
159
|
-
["rect", { width: "7", height: "5", x: "3", y: "16", rx: "1", key: "ldoo1y" }]
|
|
160
|
-
];
|
|
161
|
-
const LayoutDashboard = createLucideIcon("layout-dashboard", __iconNode$d);
|
|
162
|
-
/**
|
|
163
|
-
* @license lucide-react v0.575.0 - ISC
|
|
164
|
-
*
|
|
165
|
-
* This source code is licensed under the ISC license.
|
|
166
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
167
|
-
*/
|
|
168
|
-
const __iconNode$c = [
|
|
158
|
+
const __iconNode$6 = [
|
|
169
159
|
["path", { d: "m16 6 4 14", key: "ji33uf" }],
|
|
170
160
|
["path", { d: "M12 6v14", key: "1n7gus" }],
|
|
171
161
|
["path", { d: "M8 8v12", key: "1gg7y9" }],
|
|
172
162
|
["path", { d: "M4 4v16", key: "6qkkli" }]
|
|
173
163
|
];
|
|
174
|
-
const Library = createLucideIcon("library", __iconNode$
|
|
164
|
+
const Library = createLucideIcon("library", __iconNode$6);
|
|
175
165
|
/**
|
|
176
166
|
* @license lucide-react v0.575.0 - ISC
|
|
177
167
|
*
|
|
178
168
|
* This source code is licensed under the ISC license.
|
|
179
169
|
* See the LICENSE file in the root directory of this source tree.
|
|
180
170
|
*/
|
|
181
|
-
const __iconNode$
|
|
171
|
+
const __iconNode$5 = [
|
|
182
172
|
["path", { d: "M12 19v3", key: "npa21l" }],
|
|
183
173
|
["path", { d: "M19 10v2a7 7 0 0 1-14 0v-2", key: "1vc78b" }],
|
|
184
174
|
["rect", { x: "9", y: "2", width: "6", height: "13", rx: "3", key: "s6n7sd" }]
|
|
185
175
|
];
|
|
186
|
-
const Mic = createLucideIcon("mic", __iconNode$
|
|
187
|
-
/**
|
|
188
|
-
* @license lucide-react v0.575.0 - ISC
|
|
189
|
-
*
|
|
190
|
-
* This source code is licensed under the ISC license.
|
|
191
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
192
|
-
*/
|
|
193
|
-
const __iconNode$a = [
|
|
194
|
-
[
|
|
195
|
-
"path",
|
|
196
|
-
{
|
|
197
|
-
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",
|
|
198
|
-
key: "e79jfc"
|
|
199
|
-
}
|
|
200
|
-
],
|
|
201
|
-
["circle", { cx: "13.5", cy: "6.5", r: ".5", fill: "currentColor", key: "1okk4w" }],
|
|
202
|
-
["circle", { cx: "17.5", cy: "10.5", r: ".5", fill: "currentColor", key: "f64h9f" }],
|
|
203
|
-
["circle", { cx: "6.5", cy: "12.5", r: ".5", fill: "currentColor", key: "qy21gx" }],
|
|
204
|
-
["circle", { cx: "8.5", cy: "7.5", r: ".5", fill: "currentColor", key: "fotxhn" }]
|
|
205
|
-
];
|
|
206
|
-
const Palette = createLucideIcon("palette", __iconNode$a);
|
|
176
|
+
const Mic = createLucideIcon("mic", __iconNode$5);
|
|
207
177
|
/**
|
|
208
178
|
* @license lucide-react v0.575.0 - ISC
|
|
209
179
|
*
|
|
210
180
|
* This source code is licensed under the ISC license.
|
|
211
181
|
* See the LICENSE file in the root directory of this source tree.
|
|
212
182
|
*/
|
|
213
|
-
const __iconNode$
|
|
183
|
+
const __iconNode$4 = [
|
|
214
184
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
|
|
215
185
|
["path", { d: "M3 9h18", key: "1pudct" }],
|
|
216
186
|
["path", { d: "M9 21V9", key: "1oto5p" }]
|
|
217
187
|
];
|
|
218
|
-
const PanelsTopLeft = createLucideIcon("panels-top-left", __iconNode$
|
|
188
|
+
const PanelsTopLeft = createLucideIcon("panels-top-left", __iconNode$4);
|
|
219
189
|
/**
|
|
220
190
|
* @license lucide-react v0.575.0 - ISC
|
|
221
191
|
*
|
|
222
192
|
* This source code is licensed under the ISC license.
|
|
223
193
|
* See the LICENSE file in the root directory of this source tree.
|
|
224
194
|
*/
|
|
225
|
-
const __iconNode$
|
|
195
|
+
const __iconNode$3 = [
|
|
226
196
|
[
|
|
227
197
|
"path",
|
|
228
198
|
{
|
|
@@ -240,127 +210,43 @@ const __iconNode$8 = [
|
|
|
240
210
|
["path", { d: "m2.3 2.3 7.286 7.286", key: "1wuzzi" }],
|
|
241
211
|
["circle", { cx: "11", cy: "11", r: "2", key: "xmgehs" }]
|
|
242
212
|
];
|
|
243
|
-
const PenTool = createLucideIcon("pen-tool", __iconNode$
|
|
244
|
-
/**
|
|
245
|
-
* @license lucide-react v0.575.0 - ISC
|
|
246
|
-
*
|
|
247
|
-
* This source code is licensed under the ISC license.
|
|
248
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
249
|
-
*/
|
|
250
|
-
const __iconNode$7 = [
|
|
251
|
-
[
|
|
252
|
-
"path",
|
|
253
|
-
{
|
|
254
|
-
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",
|
|
255
|
-
key: "9njp5v"
|
|
256
|
-
}
|
|
257
|
-
]
|
|
258
|
-
];
|
|
259
|
-
const Phone = createLucideIcon("phone", __iconNode$7);
|
|
213
|
+
const PenTool = createLucideIcon("pen-tool", __iconNode$3);
|
|
260
214
|
/**
|
|
261
215
|
* @license lucide-react v0.575.0 - ISC
|
|
262
216
|
*
|
|
263
217
|
* This source code is licensed under the ISC license.
|
|
264
218
|
* See the LICENSE file in the root directory of this source tree.
|
|
265
219
|
*/
|
|
266
|
-
const __iconNode$
|
|
220
|
+
const __iconNode$2 = [
|
|
267
221
|
["rect", { width: "14", height: "20", x: "5", y: "2", rx: "2", ry: "2", key: "1yt0o3" }],
|
|
268
222
|
["path", { d: "M12 18h.01", key: "mhygvu" }]
|
|
269
223
|
];
|
|
270
|
-
const Smartphone = createLucideIcon("smartphone", __iconNode$
|
|
224
|
+
const Smartphone = createLucideIcon("smartphone", __iconNode$2);
|
|
271
225
|
/**
|
|
272
226
|
* @license lucide-react v0.575.0 - ISC
|
|
273
227
|
*
|
|
274
228
|
* This source code is licensed under the ISC license.
|
|
275
229
|
* See the LICENSE file in the root directory of this source tree.
|
|
276
230
|
*/
|
|
277
|
-
const __iconNode$
|
|
278
|
-
[
|
|
279
|
-
"path",
|
|
280
|
-
{
|
|
281
|
-
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",
|
|
282
|
-
key: "1s2grr"
|
|
283
|
-
}
|
|
284
|
-
],
|
|
285
|
-
["path", { d: "M20 2v4", key: "1rf3ol" }],
|
|
286
|
-
["path", { d: "M22 4h-4", key: "gwowj6" }],
|
|
287
|
-
["circle", { cx: "4", cy: "20", r: "2", key: "6kqj1y" }]
|
|
288
|
-
];
|
|
289
|
-
const Sparkles = createLucideIcon("sparkles", __iconNode$5);
|
|
290
|
-
/**
|
|
291
|
-
* @license lucide-react v0.575.0 - ISC
|
|
292
|
-
*
|
|
293
|
-
* This source code is licensed under the ISC license.
|
|
294
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
295
|
-
*/
|
|
296
|
-
const __iconNode$4 = [
|
|
231
|
+
const __iconNode$1 = [
|
|
297
232
|
[
|
|
298
233
|
"path",
|
|
299
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" }
|
|
300
235
|
],
|
|
301
236
|
["path", { d: "m9 11 3 3L22 4", key: "1pflzl" }]
|
|
302
237
|
];
|
|
303
|
-
const SquareCheckBig = createLucideIcon("square-check-big", __iconNode$
|
|
238
|
+
const SquareCheckBig = createLucideIcon("square-check-big", __iconNode$1);
|
|
304
239
|
/**
|
|
305
240
|
* @license lucide-react v0.575.0 - ISC
|
|
306
241
|
*
|
|
307
242
|
* This source code is licensed under the ISC license.
|
|
308
243
|
* See the LICENSE file in the root directory of this source tree.
|
|
309
244
|
*/
|
|
310
|
-
const __iconNode
|
|
311
|
-
[
|
|
312
|
-
"path",
|
|
313
|
-
{
|
|
314
|
-
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",
|
|
315
|
-
key: "r04s7s"
|
|
316
|
-
}
|
|
317
|
-
]
|
|
318
|
-
];
|
|
319
|
-
const Star = createLucideIcon("star", __iconNode$3);
|
|
320
|
-
/**
|
|
321
|
-
* @license lucide-react v0.575.0 - ISC
|
|
322
|
-
*
|
|
323
|
-
* This source code is licensed under the ISC license.
|
|
324
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
325
|
-
*/
|
|
326
|
-
const __iconNode$2 = [
|
|
245
|
+
const __iconNode = [
|
|
327
246
|
["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
|
|
328
247
|
["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
|
|
329
248
|
];
|
|
330
|
-
const User = createLucideIcon("user", __iconNode
|
|
331
|
-
/**
|
|
332
|
-
* @license lucide-react v0.575.0 - ISC
|
|
333
|
-
*
|
|
334
|
-
* This source code is licensed under the ISC license.
|
|
335
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
336
|
-
*/
|
|
337
|
-
const __iconNode$1 = [
|
|
338
|
-
[
|
|
339
|
-
"path",
|
|
340
|
-
{
|
|
341
|
-
d: "m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",
|
|
342
|
-
key: "ftymec"
|
|
343
|
-
}
|
|
344
|
-
],
|
|
345
|
-
["rect", { x: "2", y: "6", width: "14", height: "12", rx: "2", key: "158x01" }]
|
|
346
|
-
];
|
|
347
|
-
const Video = createLucideIcon("video", __iconNode$1);
|
|
348
|
-
/**
|
|
349
|
-
* @license lucide-react v0.575.0 - ISC
|
|
350
|
-
*
|
|
351
|
-
* This source code is licensed under the ISC license.
|
|
352
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
353
|
-
*/
|
|
354
|
-
const __iconNode = [
|
|
355
|
-
[
|
|
356
|
-
"path",
|
|
357
|
-
{
|
|
358
|
-
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",
|
|
359
|
-
key: "1xq2db"
|
|
360
|
-
}
|
|
361
|
-
]
|
|
362
|
-
];
|
|
363
|
-
const Zap = createLucideIcon("zap", __iconNode);
|
|
249
|
+
const User = createLucideIcon("user", __iconNode);
|
|
364
250
|
function ChatHeaderRoot({
|
|
365
251
|
children,
|
|
366
252
|
className
|
|
@@ -491,8 +377,51 @@ function ConversationHistoryPanel({
|
|
|
491
377
|
isRefreshing = false,
|
|
492
378
|
hasNextPage = false,
|
|
493
379
|
isFetchingNextPage = false,
|
|
494
|
-
onLoadMore
|
|
380
|
+
onLoadMore,
|
|
381
|
+
onHoverIntent,
|
|
382
|
+
onHoverIntentEnd,
|
|
383
|
+
hoverIntentDelayMs = 150
|
|
495
384
|
}) {
|
|
385
|
+
const hoverTimer = useRef(null);
|
|
386
|
+
const hoverIntentThreadId = useRef(null);
|
|
387
|
+
const onHoverIntentRef = useRef(onHoverIntent);
|
|
388
|
+
onHoverIntentRef.current = onHoverIntent;
|
|
389
|
+
const onHoverIntentEndRef = useRef(onHoverIntentEnd);
|
|
390
|
+
onHoverIntentEndRef.current = onHoverIntentEnd;
|
|
391
|
+
const cancelHoverTimer = useCallback(() => {
|
|
392
|
+
if (hoverTimer.current === null) return;
|
|
393
|
+
clearTimeout(hoverTimer.current);
|
|
394
|
+
hoverTimer.current = null;
|
|
395
|
+
}, []);
|
|
396
|
+
const endHoverIntent = 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
|
+
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
|
+
};
|
|
496
425
|
const origins = useMemo(
|
|
497
426
|
() => [...new Set(conversations.map(originKey))].sort(),
|
|
498
427
|
[conversations]
|
|
@@ -516,6 +445,14 @@ function ConversationHistoryPanel({
|
|
|
516
445
|
return items ? [{ group, items }] : [];
|
|
517
446
|
});
|
|
518
447
|
}, [activityFilter, conversations, originFilter]);
|
|
448
|
+
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]);
|
|
519
456
|
const visibleCount = grouped.reduce(
|
|
520
457
|
(count, group) => count + group.items.length,
|
|
521
458
|
0
|
|
@@ -616,6 +553,8 @@ function ConversationHistoryPanel({
|
|
|
616
553
|
"group flex items-start gap-2 rounded-md px-2 py-2 hover:bg-accent",
|
|
617
554
|
conversation.threadId === activeThreadId && "bg-primary/10 text-primary"
|
|
618
555
|
),
|
|
556
|
+
onMouseEnter: () => handleRowEnter(conversation.threadId),
|
|
557
|
+
onMouseLeave: () => handleRowLeave(conversation.threadId),
|
|
619
558
|
children: [
|
|
620
559
|
/* @__PURE__ */ jsxs(
|
|
621
560
|
"button",
|
|
@@ -689,8 +628,8 @@ function ConversationHistoryPanel({
|
|
|
689
628
|
);
|
|
690
629
|
}
|
|
691
630
|
function makeMentionUrl(attrs) {
|
|
692
|
-
if (attrs.type === "tool") {
|
|
693
|
-
return `mention
|
|
631
|
+
if (attrs.type === "tool" || attrs.type === "toolkit") {
|
|
632
|
+
return `mention://${attrs.type}?name=${encodeURIComponent(attrs.id)}&description=${encodeURIComponent(attrs.description ?? "")}`;
|
|
694
633
|
}
|
|
695
634
|
if (attrs.type === "asset") {
|
|
696
635
|
const params2 = new URLSearchParams({ asset_ids: attrs.id });
|
|
@@ -909,7 +848,7 @@ const MentionSuggestionPopup = ({ clientRect, children }) => {
|
|
|
909
848
|
ref: refs.setFloating,
|
|
910
849
|
style: floatingStyles,
|
|
911
850
|
className: "z-[9999]",
|
|
912
|
-
onMouseDown: (
|
|
851
|
+
onMouseDown: (e2) => e2.preventDefault(),
|
|
913
852
|
children
|
|
914
853
|
}
|
|
915
854
|
) });
|
|
@@ -1003,11 +942,28 @@ function triggerFetchIfNeeded(store, scope, query, _targetCount, parentScope) {
|
|
|
1003
942
|
);
|
|
1004
943
|
store.setState((prev) => ({ ...prev }));
|
|
1005
944
|
}).catch((error) => {
|
|
1006
|
-
console.error(`[orchestrator] Fetch error for scope ${scopeId}:`, error);
|
|
1007
945
|
const currentState = store.state;
|
|
1008
946
|
const currentMeta = fetchState.meta || {};
|
|
1009
947
|
const errorAttempts = (currentMeta.errorAttempts || 0) + 1;
|
|
1010
948
|
const retriable = errorAttempts < MAX_ERROR_RETRIES;
|
|
949
|
+
if (retriable) {
|
|
950
|
+
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
|
+
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
|
+
}
|
|
1011
967
|
updateFetchState(
|
|
1012
968
|
currentState.registry,
|
|
1013
969
|
scopeId,
|
|
@@ -1147,6 +1103,13 @@ const ICON_MAP = {
|
|
|
1147
1103
|
presentation: FileText
|
|
1148
1104
|
// Fallback for presentation type
|
|
1149
1105
|
};
|
|
1106
|
+
function toKebabIconName(name) {
|
|
1107
|
+
return name.replace(/([a-z0-9])([A-Z])/g, "$1-$2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1-$2").toLowerCase();
|
|
1108
|
+
}
|
|
1109
|
+
function resolveIcon(name) {
|
|
1110
|
+
return ICON_MAP[name] ?? ICON_MAP[toKebabIconName(name)];
|
|
1111
|
+
}
|
|
1112
|
+
const ICON_NAME_PATTERN = /^[A-Za-z][A-Za-z0-9-]*$/;
|
|
1150
1113
|
function MentionIcon({
|
|
1151
1114
|
fallbackIcon,
|
|
1152
1115
|
thumbnailUrl,
|
|
@@ -1156,9 +1119,11 @@ function MentionIcon({
|
|
|
1156
1119
|
if (thumbnailUrl) {
|
|
1157
1120
|
return /* @__PURE__ */ jsx("img", { src: thumbnailUrl, alt: alt ?? "", className });
|
|
1158
1121
|
}
|
|
1159
|
-
const Icon = fallbackIcon ?
|
|
1122
|
+
const Icon = fallbackIcon ? resolveIcon(fallbackIcon) : void 0;
|
|
1160
1123
|
if (Icon) return /* @__PURE__ */ jsx(Icon, { className });
|
|
1161
|
-
if (fallbackIcon
|
|
1124
|
+
if (fallbackIcon && !ICON_NAME_PATTERN.test(fallbackIcon)) {
|
|
1125
|
+
return /* @__PURE__ */ jsx("span", { className: "text-sm flex-shrink-0", children: fallbackIcon });
|
|
1126
|
+
}
|
|
1162
1127
|
return /* @__PURE__ */ jsx(File$1, { className });
|
|
1163
1128
|
}
|
|
1164
1129
|
function MenuItemRow({
|
|
@@ -1168,7 +1133,7 @@ function MenuItemRow({
|
|
|
1168
1133
|
onClick,
|
|
1169
1134
|
showArrow
|
|
1170
1135
|
}) {
|
|
1171
|
-
var _a, _b;
|
|
1136
|
+
var _a, _b, _c, _d;
|
|
1172
1137
|
const hasTwoLines = item.type === "tool" && item.description || item.type === "user" && item.email || item.type === "workspace_item" && item.description || item.type === "tab" && item.description;
|
|
1173
1138
|
return /* @__PURE__ */ jsxs(
|
|
1174
1139
|
"div",
|
|
@@ -1184,23 +1149,31 @@ function MenuItemRow({
|
|
|
1184
1149
|
isSelected && "bg-gray-100 is-selected"
|
|
1185
1150
|
),
|
|
1186
1151
|
children: [
|
|
1187
|
-
/* @__PURE__ */ jsx(
|
|
1188
|
-
|
|
1152
|
+
/* @__PURE__ */ jsx(
|
|
1153
|
+
"span",
|
|
1189
1154
|
{
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1155
|
+
className: `flex items-center flex-shrink-0 ${hasTwoLines ? "self-start mt-0.5" : ""}`,
|
|
1156
|
+
children: /* @__PURE__ */ jsx(
|
|
1157
|
+
MentionIcon,
|
|
1158
|
+
{
|
|
1159
|
+
fallbackIcon: item.fallbackIcon,
|
|
1160
|
+
thumbnailUrl: item.thumbnailUrl,
|
|
1161
|
+
alt: item.name
|
|
1162
|
+
}
|
|
1163
|
+
)
|
|
1193
1164
|
}
|
|
1194
|
-
)
|
|
1165
|
+
),
|
|
1195
1166
|
hasTwoLines ? /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col gap-0 min-w-0 -mt-0.5", children: [
|
|
1196
1167
|
/* @__PURE__ */ jsxs("span", { className: "text-sm leading-tight flex items-center gap-1.5", children: [
|
|
1197
1168
|
item.name,
|
|
1198
|
-
((_a = item.extra) == null ? void 0 : _a.isAdminOnly) && /* @__PURE__ */ jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-purple-400 flex-shrink-0" })
|
|
1169
|
+
((_a = item.extra) == null ? void 0 : _a.isAdminOnly) && /* @__PURE__ */ jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-purple-400 flex-shrink-0" }),
|
|
1170
|
+
((_b = item.extra) == null ? void 0 : _b.isExperimental) && /* @__PURE__ */ jsx("span", { className: "rounded-full bg-blue-50 px-1.5 py-0.5 text-[9px] font-medium text-blue-700", children: "Experimental" })
|
|
1199
1171
|
] }),
|
|
1200
1172
|
/* @__PURE__ */ jsx("span", { className: "text-xs text-gray-500 leading-tight mt-0.5 truncate", children: item.type === "user" ? item.email : item.description })
|
|
1201
1173
|
] }) : /* @__PURE__ */ jsxs("span", { className: "flex-1 text-sm truncate min-w-0 flex items-center gap-1.5", children: [
|
|
1202
1174
|
item.name,
|
|
1203
|
-
((
|
|
1175
|
+
((_c = item.extra) == null ? void 0 : _c.isAdminOnly) && /* @__PURE__ */ jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-purple-400 flex-shrink-0" }),
|
|
1176
|
+
((_d = item.extra) == null ? void 0 : _d.isExperimental) && /* @__PURE__ */ jsx("span", { className: "rounded-full bg-blue-50 px-1.5 py-0.5 text-[9px] font-medium text-blue-700", children: "Experimental" })
|
|
1204
1177
|
] }),
|
|
1205
1178
|
showArrow && /* @__PURE__ */ jsx("div", { className: "flex items-center gap-1 flex-shrink-0", children: /* @__PURE__ */ jsx("span", { className: "text-gray-400 text-sm px-1 rounded transition-all cursor-pointer hover:text-gray-600 hover:bg-gray-200", children: "→" }) })
|
|
1206
1179
|
]
|
|
@@ -1559,17 +1532,19 @@ const MentionSuggestionList = forwardRef(({ store, editor, query, command, close
|
|
|
1559
1532
|
MentionSuggestionList.displayName = "MentionSuggestionList";
|
|
1560
1533
|
function assetToMenuItem(asset) {
|
|
1561
1534
|
const isFolder = asset.athenaOriginalType === "folder";
|
|
1535
|
+
const displayType = asset.athenaConvertedType || asset.athenaOriginalType;
|
|
1562
1536
|
return {
|
|
1563
1537
|
id: asset.id,
|
|
1564
1538
|
name: asset.title || "Untitled",
|
|
1565
1539
|
type: isFolder ? "folder" : "asset",
|
|
1566
|
-
thumbnailUrl: assetTypeToThumb(
|
|
1567
|
-
fallbackIcon: assetTypeToIcon(
|
|
1540
|
+
thumbnailUrl: assetTypeToThumb(displayType),
|
|
1541
|
+
fallbackIcon: assetTypeToIcon(displayType),
|
|
1568
1542
|
navigatesToScope: isFolder ? asset.id : void 0,
|
|
1569
1543
|
visibleInScopes: /* @__PURE__ */ new Set(),
|
|
1570
1544
|
updatedAt: asset.updatedAt ?? void 0,
|
|
1571
1545
|
extra: {
|
|
1572
1546
|
athenaOriginalType: asset.athenaOriginalType,
|
|
1547
|
+
athenaConvertedType: asset.athenaConvertedType,
|
|
1573
1548
|
parentFolderId: asset.parentFolderId
|
|
1574
1549
|
}
|
|
1575
1550
|
};
|
|
@@ -1590,11 +1565,7 @@ async function querySimpleSearch(auth, opts) {
|
|
|
1590
1565
|
sort: { field: "UPDATED_AT", direction: "DESC" },
|
|
1591
1566
|
filterColumns: { isArchived: false, isHidden: false }
|
|
1592
1567
|
};
|
|
1593
|
-
const data = await fetchGraphQL(
|
|
1594
|
-
auth,
|
|
1595
|
-
SIMPLE_SEARCH_QUERY,
|
|
1596
|
-
{ input }
|
|
1597
|
-
);
|
|
1568
|
+
const data = await fetchGraphQL(auth, SIMPLE_SEARCH_QUERY, { input });
|
|
1598
1569
|
const assets = ((_b = data.simpleSearch) == null ? void 0 : _b.assets) || [];
|
|
1599
1570
|
return {
|
|
1600
1571
|
items: assets.map(assetToMenuItem),
|
|
@@ -1604,9 +1575,19 @@ async function querySimpleSearch(auth, opts) {
|
|
|
1604
1575
|
const CATEGORY_DEFS = {
|
|
1605
1576
|
favorites: { name: "Favorites", icon: "star", scope: "favorites" },
|
|
1606
1577
|
assets: { name: "Assets", icon: "file-text", scope: "athena_assets" },
|
|
1607
|
-
projects: {
|
|
1608
|
-
|
|
1578
|
+
projects: {
|
|
1579
|
+
name: "Projects",
|
|
1580
|
+
icon: "folder-kanban",
|
|
1581
|
+
scope: "athena_projects"
|
|
1582
|
+
},
|
|
1583
|
+
browse_profiles: {
|
|
1584
|
+
name: "Browse Profiles",
|
|
1585
|
+
icon: "globe",
|
|
1586
|
+
scope: "athena_browse_profiles"
|
|
1587
|
+
},
|
|
1609
1588
|
folders: { name: "Folders", icon: "folder", scope: "athena_folders" },
|
|
1589
|
+
tools: { name: "Tools", icon: "wrench", scope: "tools" },
|
|
1590
|
+
toolkits: { name: "Toolkits", icon: "package", scope: "toolkits" },
|
|
1610
1591
|
team: { name: "Team", icon: "users", scope: "team" },
|
|
1611
1592
|
drives: { name: "Drives", icon: "hard-drive", scope: "drive_catalogs" }
|
|
1612
1593
|
};
|
|
@@ -1673,7 +1654,14 @@ const fetchAssets = async (context) => {
|
|
|
1673
1654
|
query,
|
|
1674
1655
|
limit,
|
|
1675
1656
|
offset: offset2,
|
|
1676
|
-
excludeTypes: [
|
|
1657
|
+
excludeTypes: [
|
|
1658
|
+
"folder",
|
|
1659
|
+
"catalog",
|
|
1660
|
+
"spaces",
|
|
1661
|
+
"session",
|
|
1662
|
+
"table",
|
|
1663
|
+
"task_item"
|
|
1664
|
+
]
|
|
1677
1665
|
});
|
|
1678
1666
|
return {
|
|
1679
1667
|
items: result.items,
|
|
@@ -1685,21 +1673,17 @@ const fetchFavorites = async (context) => {
|
|
|
1685
1673
|
const limit = sourceConfig.limit ?? 50;
|
|
1686
1674
|
const meta = fetchState.meta || {};
|
|
1687
1675
|
const offset2 = meta.validatedCount || 0;
|
|
1688
|
-
const data = await fetchGraphQL(
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
isFavorited: true,
|
|
1698
|
-
isArchived: false,
|
|
1699
|
-
isHidden: false
|
|
1700
|
-
}
|
|
1676
|
+
const data = await fetchGraphQL(sourceConfig.auth, PAGINATED_ASSETS_QUERY, {
|
|
1677
|
+
limit,
|
|
1678
|
+
offset: offset2,
|
|
1679
|
+
parentFolderId: null,
|
|
1680
|
+
filterTypes: null,
|
|
1681
|
+
filterColumns: {
|
|
1682
|
+
isFavorited: true,
|
|
1683
|
+
isArchived: false,
|
|
1684
|
+
isHidden: false
|
|
1701
1685
|
}
|
|
1702
|
-
);
|
|
1686
|
+
});
|
|
1703
1687
|
const assets = data.getPaginatedAssetsForWorkspace || [];
|
|
1704
1688
|
const items = assets.map(assetToMenuItem);
|
|
1705
1689
|
return {
|
|
@@ -1729,24 +1713,20 @@ const fetchFolderContents = async (context) => {
|
|
|
1729
1713
|
const meta = fetchState.meta || {};
|
|
1730
1714
|
const offset2 = meta.validatedCount || 0;
|
|
1731
1715
|
const parentFolderId = scope === "internal_drive" ? null : scope;
|
|
1732
|
-
const data = await fetchGraphQL(
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
isArchived: false,
|
|
1742
|
-
isHidden: false,
|
|
1743
|
-
...query ? { title: [{ op: "LIKE", value: `%${query}%` }] } : {}
|
|
1744
|
-
}
|
|
1716
|
+
const data = await fetchGraphQL(sourceConfig.auth, PAGINATED_ASSETS_QUERY, {
|
|
1717
|
+
limit,
|
|
1718
|
+
offset: offset2,
|
|
1719
|
+
parentFolderId,
|
|
1720
|
+
filterTypes: null,
|
|
1721
|
+
filterColumns: {
|
|
1722
|
+
isArchived: false,
|
|
1723
|
+
isHidden: false,
|
|
1724
|
+
...query ? { title: [{ op: "LIKE", value: `%${query}%` }] } : {}
|
|
1745
1725
|
}
|
|
1746
|
-
);
|
|
1726
|
+
});
|
|
1747
1727
|
const rawAssets = data.getPaginatedAssetsForWorkspace || [];
|
|
1748
1728
|
const assets = rawAssets.filter(
|
|
1749
|
-
(
|
|
1729
|
+
(a11) => a11.athenaConvertedType !== "catalog" && a11.athenaOriginalType !== "catalog"
|
|
1750
1730
|
);
|
|
1751
1731
|
const items = assets.map(assetToMenuItem);
|
|
1752
1732
|
return {
|
|
@@ -1799,6 +1779,36 @@ const fetchTeam = async (context) => {
|
|
|
1799
1779
|
});
|
|
1800
1780
|
return { items, pagination: { hasMore: false } };
|
|
1801
1781
|
};
|
|
1782
|
+
async function queryToolCatalog(auth) {
|
|
1783
|
+
const data = await fetchGraphQL(auth, TOOL_CATALOG_QUERY);
|
|
1784
|
+
return data.getToolkitToToolsMapping;
|
|
1785
|
+
}
|
|
1786
|
+
const fetchTools = async (context) => {
|
|
1787
|
+
const catalog = await queryToolCatalog(context.sourceConfig.auth);
|
|
1788
|
+
const items = catalog.tools.filter((tool) => tool.isMentionable).map((tool) => ({
|
|
1789
|
+
id: tool.id,
|
|
1790
|
+
name: tool.name,
|
|
1791
|
+
type: "tool",
|
|
1792
|
+
fallbackIcon: tool.icon,
|
|
1793
|
+
description: tool.description ?? void 0,
|
|
1794
|
+
visibleInScopes: /* @__PURE__ */ new Set(),
|
|
1795
|
+
...tool.adminOnly ? { extra: { isAdminOnly: true } } : {}
|
|
1796
|
+
}));
|
|
1797
|
+
return { items, pagination: { hasMore: false } };
|
|
1798
|
+
};
|
|
1799
|
+
const fetchToolkits = async (context) => {
|
|
1800
|
+
const catalog = await queryToolCatalog(context.sourceConfig.auth);
|
|
1801
|
+
const items = catalog.toolkits.filter((toolkit) => toolkit.isMentionable && !toolkit.hideFromMenu).map((toolkit) => ({
|
|
1802
|
+
id: toolkit.name,
|
|
1803
|
+
name: toolkit.displayName,
|
|
1804
|
+
type: "toolkit",
|
|
1805
|
+
fallbackIcon: toolkit.icon,
|
|
1806
|
+
description: toolkit.description || void 0,
|
|
1807
|
+
visibleInScopes: /* @__PURE__ */ new Set(),
|
|
1808
|
+
...toolkit.onlyAdmin ? { extra: { isAdminOnly: true } } : {}
|
|
1809
|
+
}));
|
|
1810
|
+
return { items, pagination: { hasMore: false } };
|
|
1811
|
+
};
|
|
1802
1812
|
const fetchDrives = async (context) => {
|
|
1803
1813
|
const { fetchState, sourceConfig } = context;
|
|
1804
1814
|
const meta = fetchState.meta || {};
|
|
@@ -1858,6 +1868,8 @@ const ROOT_MENTION_CATEGORIES = [
|
|
|
1858
1868
|
"projects",
|
|
1859
1869
|
"browse_profiles",
|
|
1860
1870
|
"folders",
|
|
1871
|
+
"tools",
|
|
1872
|
+
"toolkits",
|
|
1861
1873
|
"team",
|
|
1862
1874
|
"drives"
|
|
1863
1875
|
];
|
|
@@ -1882,9 +1894,11 @@ function buildStore({
|
|
|
1882
1894
|
fetchFolders,
|
|
1883
1895
|
{ auth, limit: 50 },
|
|
1884
1896
|
true
|
|
1885
|
-
/* isFlat */
|
|
1886
1897
|
);
|
|
1887
|
-
registerSource(registry, "internal_drive", fetchFolderContents, {
|
|
1898
|
+
registerSource(registry, "internal_drive", fetchFolderContents, {
|
|
1899
|
+
auth,
|
|
1900
|
+
limit: 50
|
|
1901
|
+
});
|
|
1888
1902
|
registerSource(registry, "athena_projects", fetchTypedAssets, {
|
|
1889
1903
|
auth,
|
|
1890
1904
|
includeOnlyTypes: ["project"],
|
|
@@ -1895,6 +1909,8 @@ function buildStore({
|
|
|
1895
1909
|
includeOnlyTypes: ["browse_profile"],
|
|
1896
1910
|
limit: 50
|
|
1897
1911
|
});
|
|
1912
|
+
registerSource(registry, "tools", fetchTools, { auth });
|
|
1913
|
+
registerSource(registry, "toolkits", fetchToolkits, { auth });
|
|
1898
1914
|
registerSource(registry, "team", fetchTeam, { auth });
|
|
1899
1915
|
registerSource(registry, "drive_catalogs", fetchDrives, { auth });
|
|
1900
1916
|
return new Store({ registry, cache });
|
|
@@ -2126,7 +2142,12 @@ const TiptapComposer = forwardRef(({ placeholder = "Message Athena... (type @ to
|
|
|
2126
2142
|
const ext = item.type.split("/")[1] || "png";
|
|
2127
2143
|
const file = new File([blob], `pasted-image-${Date.now()}.${ext}`, { type: item.type });
|
|
2128
2144
|
void addAttachment(file).catch((error) => {
|
|
2129
|
-
|
|
2145
|
+
athenaDiagnostics.error(
|
|
2146
|
+
"composer.attachment.error",
|
|
2147
|
+
error,
|
|
2148
|
+
{ code: "attachment_failed", message: "Pasted image upload failed" },
|
|
2149
|
+
{ source: "paste", type: file.type }
|
|
2150
|
+
);
|
|
2130
2151
|
});
|
|
2131
2152
|
}
|
|
2132
2153
|
handled = true;
|
|
@@ -2146,7 +2167,12 @@ const TiptapComposer = forwardRef(({ placeholder = "Message Athena... (type @ to
|
|
|
2146
2167
|
if (file.type.startsWith("image/")) {
|
|
2147
2168
|
event.preventDefault();
|
|
2148
2169
|
void addAttachment(file).catch((error) => {
|
|
2149
|
-
|
|
2170
|
+
athenaDiagnostics.error(
|
|
2171
|
+
"composer.attachment.error",
|
|
2172
|
+
error,
|
|
2173
|
+
{ code: "attachment_failed", message: "Dropped image upload failed" },
|
|
2174
|
+
{ source: "drop", type: file.type }
|
|
2175
|
+
);
|
|
2150
2176
|
});
|
|
2151
2177
|
handled = true;
|
|
2152
2178
|
}
|
|
@@ -2374,36 +2400,41 @@ const SignInConsent = ({ checked, onChange, children }) => /* @__PURE__ */ jsxs(
|
|
|
2374
2400
|
/* @__PURE__ */ jsx("span", { children })
|
|
2375
2401
|
] });
|
|
2376
2402
|
export {
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2403
|
+
O as BranchPicker,
|
|
2404
|
+
Q as COMPOSER_DOCK_CLASS,
|
|
2405
|
+
U as COMPOSER_EDITOR_ROW_CLASS,
|
|
2406
|
+
V as COMPOSER_SURFACE_CLASS,
|
|
2407
|
+
X as COMPOSER_TOOLBAR_CLASS,
|
|
2408
|
+
Y as ChatComposerDock,
|
|
2383
2409
|
ChatHeader,
|
|
2384
2410
|
ChatHeaderActions,
|
|
2385
2411
|
ChatHeaderIdentity,
|
|
2386
2412
|
ChatHeaderRoot,
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2413
|
+
Z as ChatThreadShell,
|
|
2414
|
+
_ as ComposerSendButton,
|
|
2415
|
+
$ as ComposerSendOrStop,
|
|
2416
|
+
a0 as ComposerStopButton,
|
|
2417
|
+
C as ContinuePill,
|
|
2391
2418
|
ConversationHistoryPanel,
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2419
|
+
g as HISTORY_EDGE_NEAR_MARGIN_PX,
|
|
2420
|
+
H as HITL_PENDING_RESUME_GRACE_MS,
|
|
2421
|
+
a as HistoryEdgeRow,
|
|
2422
|
+
a1 as IconButton,
|
|
2423
|
+
a2 as MarkdownText,
|
|
2424
|
+
a3 as MentionAuthCtx,
|
|
2425
|
+
a4 as MentionChip,
|
|
2396
2426
|
MentionExtension,
|
|
2397
2427
|
MentionIcon,
|
|
2398
|
-
|
|
2428
|
+
a5 as MentionLink,
|
|
2399
2429
|
MentionMenuSection,
|
|
2400
2430
|
MentionSuggestionList,
|
|
2401
2431
|
MentionSuggestionPopup,
|
|
2402
2432
|
MentionSuggestionsExtension,
|
|
2403
2433
|
MenuList,
|
|
2404
|
-
|
|
2434
|
+
a6 as MessageActionsReadOnlyProvider,
|
|
2405
2435
|
PendingAttachmentUploads,
|
|
2406
2436
|
ROOT_MENTION_CATEGORIES,
|
|
2437
|
+
R as RuntimeMessageCard,
|
|
2407
2438
|
SIMPLE_SEARCH_QUERY,
|
|
2408
2439
|
SignInCard,
|
|
2409
2440
|
SignInConsent,
|
|
@@ -2411,35 +2442,45 @@ export {
|
|
|
2411
2442
|
SignInSecondaryButton,
|
|
2412
2443
|
SignInSelect,
|
|
2413
2444
|
SignInTextField,
|
|
2414
|
-
|
|
2445
|
+
a7 as SmallIconButton,
|
|
2446
|
+
S as StatewireApprovalCard,
|
|
2447
|
+
S2 as StatewireContinueRunAffordance,
|
|
2448
|
+
a10 as StatewireContinueRunButton,
|
|
2449
|
+
b as StatewireHistoryEdge,
|
|
2450
|
+
c as StatewireQueuedMessages,
|
|
2451
|
+
b2 as StatewireRunEndedFooter,
|
|
2452
|
+
d as StatewireToolOutputsContext,
|
|
2415
2453
|
THREAD_HEADER_ACTIONS_CLASS,
|
|
2416
2454
|
THREAD_HEADER_CLASS,
|
|
2417
|
-
|
|
2455
|
+
a8 as THREAD_HEADER_ICON_CLASS,
|
|
2418
2456
|
THREAD_HEADER_PILL_CLASS,
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2457
|
+
a9 as THREAD_PANEL_CLASS,
|
|
2458
|
+
aa as THREAD_SCROLL_TO_BOTTOM_CLASS,
|
|
2459
|
+
T as THREAD_VIEWPORT_ATTR,
|
|
2460
|
+
ab as TextShimmerLoader,
|
|
2461
|
+
ac as ThreadRunningIndicator,
|
|
2423
2462
|
TiptapComposer,
|
|
2424
|
-
|
|
2425
|
-
|
|
2463
|
+
ad as UserEditComposer,
|
|
2464
|
+
ae as UserMessage,
|
|
2426
2465
|
assetTypeToIcon,
|
|
2427
2466
|
assetTypeToThumb,
|
|
2428
2467
|
buildRootMenuItems,
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2468
|
+
af as configureAssetIconBasePath,
|
|
2469
|
+
ag as createAssistantMessage,
|
|
2470
|
+
ah as createOlympusAssetUrl,
|
|
2432
2471
|
fetchGraphQL,
|
|
2433
2472
|
makeMentionUrl,
|
|
2434
|
-
|
|
2473
|
+
ai as normalizeAthenaMentionHtml,
|
|
2435
2474
|
parseMentionAnchorAttributes,
|
|
2436
|
-
|
|
2437
|
-
|
|
2475
|
+
aj as parseMentionUrl,
|
|
2476
|
+
ak as parseMentionsInText,
|
|
2438
2477
|
plainTextToTiptapContent,
|
|
2439
|
-
|
|
2478
|
+
al as resolveComposerAction,
|
|
2440
2479
|
useMentionAuth,
|
|
2441
2480
|
useMentionSuggestions,
|
|
2442
|
-
|
|
2481
|
+
am as useMessageActionsReadOnly,
|
|
2482
|
+
u as useStatewireApprovalRequest,
|
|
2483
|
+
e as useStatewireToolOutputs,
|
|
2443
2484
|
webpageMentionFingerprint
|
|
2444
2485
|
};
|
|
2445
2486
|
//# sourceMappingURL=chat-ui.js.map
|