@athenaintel/react 0.10.30 → 0.10.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +709 -94
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +709 -94
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1177,15 +1177,27 @@ const createConfigUtils = (config2) => ({
|
|
|
1177
1177
|
cache: createLruCache(config2.cacheSize),
|
|
1178
1178
|
parseClassName: createParseClassName(config2),
|
|
1179
1179
|
sortModifiers: createSortModifiers(config2),
|
|
1180
|
+
postfixLookupClassGroupIds: createPostfixLookupClassGroupIds(config2),
|
|
1180
1181
|
...createClassGroupUtils(config2)
|
|
1181
1182
|
});
|
|
1183
|
+
const createPostfixLookupClassGroupIds = (config2) => {
|
|
1184
|
+
const lookup = /* @__PURE__ */ Object.create(null);
|
|
1185
|
+
const classGroupIds = config2.postfixLookupClassGroups;
|
|
1186
|
+
if (classGroupIds) {
|
|
1187
|
+
for (let i = 0; i < classGroupIds.length; i++) {
|
|
1188
|
+
lookup[classGroupIds[i]] = true;
|
|
1189
|
+
}
|
|
1190
|
+
}
|
|
1191
|
+
return lookup;
|
|
1192
|
+
};
|
|
1182
1193
|
const SPLIT_CLASSES_REGEX = /\s+/;
|
|
1183
1194
|
const mergeClassList = (classList, configUtils) => {
|
|
1184
1195
|
const {
|
|
1185
1196
|
parseClassName,
|
|
1186
1197
|
getClassGroupId,
|
|
1187
1198
|
getConflictingClassGroupIds,
|
|
1188
|
-
sortModifiers
|
|
1199
|
+
sortModifiers,
|
|
1200
|
+
postfixLookupClassGroupIds
|
|
1189
1201
|
} = configUtils;
|
|
1190
1202
|
const classGroupsInConflict = [];
|
|
1191
1203
|
const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
|
|
@@ -1204,7 +1216,18 @@ const mergeClassList = (classList, configUtils) => {
|
|
|
1204
1216
|
continue;
|
|
1205
1217
|
}
|
|
1206
1218
|
let hasPostfixModifier = !!maybePostfixModifierPosition;
|
|
1207
|
-
let classGroupId
|
|
1219
|
+
let classGroupId;
|
|
1220
|
+
if (hasPostfixModifier) {
|
|
1221
|
+
const baseClassNameWithoutPostfix = baseClassName.substring(0, maybePostfixModifierPosition);
|
|
1222
|
+
classGroupId = getClassGroupId(baseClassNameWithoutPostfix);
|
|
1223
|
+
const classGroupIdWithPostfix = classGroupId && postfixLookupClassGroupIds[classGroupId] ? getClassGroupId(baseClassName) : void 0;
|
|
1224
|
+
if (classGroupIdWithPostfix && classGroupIdWithPostfix !== classGroupId) {
|
|
1225
|
+
classGroupId = classGroupIdWithPostfix;
|
|
1226
|
+
hasPostfixModifier = false;
|
|
1227
|
+
}
|
|
1228
|
+
} else {
|
|
1229
|
+
classGroupId = getClassGroupId(baseClassName);
|
|
1230
|
+
}
|
|
1208
1231
|
if (!classGroupId) {
|
|
1209
1232
|
if (!hasPostfixModifier) {
|
|
1210
1233
|
result = originalClassName + (result.length > 0 ? " " + result : result);
|
|
@@ -1319,6 +1342,7 @@ const isNever = () => false;
|
|
|
1319
1342
|
const isShadow = (value) => shadowRegex.test(value);
|
|
1320
1343
|
const isImage = (value) => imageRegex.test(value);
|
|
1321
1344
|
const isAnyNonArbitrary = (value) => !isArbitraryValue(value) && !isArbitraryVariable(value);
|
|
1345
|
+
const isNamedContainerQuery = (value) => value.startsWith("@container") && (value[10] === "/" && value[11] !== void 0 || value[11] === "s" && value[16] !== void 0 && value.startsWith("-size/", 10) || value[11] === "n" && value[18] !== void 0 && value.startsWith("-normal/", 10));
|
|
1322
1346
|
const isArbitrarySize = (value) => getIsArbitraryValue(value, isLabelSize, isNever);
|
|
1323
1347
|
const isArbitraryValue = (value) => arbitraryValueRegex.test(value);
|
|
1324
1348
|
const isArbitraryLength = (value) => getIsArbitraryValue(value, isLabelLength, isLengthOnly);
|
|
@@ -1497,6 +1521,18 @@ const getDefaultConfig = () => {
|
|
|
1497
1521
|
* @deprecated since Tailwind CSS v4.0.0
|
|
1498
1522
|
*/
|
|
1499
1523
|
container: ["container"],
|
|
1524
|
+
/**
|
|
1525
|
+
* Container Type
|
|
1526
|
+
* @see https://tailwindcss.com/docs/responsive-design#container-queries
|
|
1527
|
+
*/
|
|
1528
|
+
"container-type": [{
|
|
1529
|
+
"@container": ["", "normal", "size", isArbitraryVariable, isArbitraryValue]
|
|
1530
|
+
}],
|
|
1531
|
+
/**
|
|
1532
|
+
* Container Name
|
|
1533
|
+
* @see https://tailwindcss.com/docs/responsive-design#named-containers
|
|
1534
|
+
*/
|
|
1535
|
+
"container-named": [isNamedContainerQuery],
|
|
1500
1536
|
/**
|
|
1501
1537
|
* Columns
|
|
1502
1538
|
* @see https://tailwindcss.com/docs/columns
|
|
@@ -2440,6 +2476,13 @@ const getDefaultConfig = () => {
|
|
|
2440
2476
|
indent: [{
|
|
2441
2477
|
indent: scaleUnambiguousSpacing()
|
|
2442
2478
|
}],
|
|
2479
|
+
/**
|
|
2480
|
+
* Tab Size
|
|
2481
|
+
* @see https://tailwindcss.com/docs/tab-size
|
|
2482
|
+
*/
|
|
2483
|
+
"tab-size": [{
|
|
2484
|
+
tab: [isInteger, isArbitraryVariable, isArbitraryValue]
|
|
2485
|
+
}],
|
|
2443
2486
|
/**
|
|
2444
2487
|
* Vertical Alignment
|
|
2445
2488
|
* @see https://tailwindcss.com/docs/vertical-align
|
|
@@ -3665,6 +3708,13 @@ const getDefaultConfig = () => {
|
|
|
3665
3708
|
* @see https://tailwindcss.com/docs/translate
|
|
3666
3709
|
*/
|
|
3667
3710
|
"translate-none": ["translate-none"],
|
|
3711
|
+
/**
|
|
3712
|
+
* Zoom
|
|
3713
|
+
* @see https://tailwindcss.com/docs/zoom
|
|
3714
|
+
*/
|
|
3715
|
+
zoom: [{
|
|
3716
|
+
zoom: [isInteger, isArbitraryVariable, isArbitraryValue]
|
|
3717
|
+
}],
|
|
3668
3718
|
// ---------------------
|
|
3669
3719
|
// --- Interactivity ---
|
|
3670
3720
|
// ---------------------
|
|
@@ -3731,6 +3781,34 @@ const getDefaultConfig = () => {
|
|
|
3731
3781
|
"scroll-behavior": [{
|
|
3732
3782
|
scroll: ["auto", "smooth"]
|
|
3733
3783
|
}],
|
|
3784
|
+
/**
|
|
3785
|
+
* Scrollbar Thumb Color
|
|
3786
|
+
* @see https://tailwindcss.com/docs/scrollbar-color
|
|
3787
|
+
*/
|
|
3788
|
+
"scrollbar-thumb-color": [{
|
|
3789
|
+
"scrollbar-thumb": scaleColor()
|
|
3790
|
+
}],
|
|
3791
|
+
/**
|
|
3792
|
+
* Scrollbar Track Color
|
|
3793
|
+
* @see https://tailwindcss.com/docs/scrollbar-color
|
|
3794
|
+
*/
|
|
3795
|
+
"scrollbar-track-color": [{
|
|
3796
|
+
"scrollbar-track": scaleColor()
|
|
3797
|
+
}],
|
|
3798
|
+
/**
|
|
3799
|
+
* Scrollbar Gutter
|
|
3800
|
+
* @see https://tailwindcss.com/docs/scrollbar-gutter
|
|
3801
|
+
*/
|
|
3802
|
+
"scrollbar-gutter": [{
|
|
3803
|
+
"scrollbar-gutter": ["auto", "stable", "both"]
|
|
3804
|
+
}],
|
|
3805
|
+
/**
|
|
3806
|
+
* Scrollbar Width
|
|
3807
|
+
* @see https://tailwindcss.com/docs/scrollbar-width
|
|
3808
|
+
*/
|
|
3809
|
+
"scrollbar-w": [{
|
|
3810
|
+
scrollbar: ["auto", "thin", "none"]
|
|
3811
|
+
}],
|
|
3734
3812
|
/**
|
|
3735
3813
|
* Scroll Margin
|
|
3736
3814
|
* @see https://tailwindcss.com/docs/scroll-margin
|
|
@@ -3989,6 +4067,7 @@ const getDefaultConfig = () => {
|
|
|
3989
4067
|
}]
|
|
3990
4068
|
},
|
|
3991
4069
|
conflictingClassGroups: {
|
|
4070
|
+
"container-named": ["container-type"],
|
|
3992
4071
|
overflow: ["overflow-x", "overflow-y"],
|
|
3993
4072
|
overscroll: ["overscroll-x", "overscroll-y"],
|
|
3994
4073
|
inset: ["inset-x", "inset-y", "inset-bs", "inset-be", "start", "end", "top", "right", "bottom", "left"],
|
|
@@ -4041,6 +4120,7 @@ const getDefaultConfig = () => {
|
|
|
4041
4120
|
conflictingClassGroupModifiers: {
|
|
4042
4121
|
"font-size": ["leading"]
|
|
4043
4122
|
},
|
|
4123
|
+
postfixLookupClassGroups: ["container-type"],
|
|
4044
4124
|
orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
|
|
4045
4125
|
};
|
|
4046
4126
|
};
|
|
@@ -13687,6 +13767,7 @@ const DEFAULT_AUTO_OPEN_TOOLS = {
|
|
|
13687
13767
|
create_document_from_markdown: openOnResult("document"),
|
|
13688
13768
|
create_new_sheet: openOnResult("spreadsheet"),
|
|
13689
13769
|
create_powerpoint_deck: openOnResult("presentation"),
|
|
13770
|
+
create_presentation_pptx_studio: openOnResult("presentation"),
|
|
13690
13771
|
create_new_notebook: openOnResult("notebook"),
|
|
13691
13772
|
// Open / read existing assets
|
|
13692
13773
|
open_asset_in_workspace: openFromArgs("unknown"),
|
|
@@ -45056,51 +45137,51 @@ const createLucideIcon = (iconName, iconNode) => {
|
|
|
45056
45137
|
* This source code is licensed under the ISC license.
|
|
45057
45138
|
* See the LICENSE file in the root directory of this source tree.
|
|
45058
45139
|
*/
|
|
45059
|
-
const __iconNode$
|
|
45140
|
+
const __iconNode$19 = [
|
|
45060
45141
|
["path", { d: "M12 5v14", key: "s699le" }],
|
|
45061
45142
|
["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
|
|
45062
45143
|
];
|
|
45063
|
-
const ArrowDown = createLucideIcon("arrow-down", __iconNode$
|
|
45144
|
+
const ArrowDown = createLucideIcon("arrow-down", __iconNode$19);
|
|
45064
45145
|
/**
|
|
45065
45146
|
* @license lucide-react v0.575.0 - ISC
|
|
45066
45147
|
*
|
|
45067
45148
|
* This source code is licensed under the ISC license.
|
|
45068
45149
|
* See the LICENSE file in the root directory of this source tree.
|
|
45069
45150
|
*/
|
|
45070
|
-
const __iconNode$
|
|
45151
|
+
const __iconNode$18 = [
|
|
45071
45152
|
["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
|
|
45072
45153
|
["path", { d: "M19 12H5", key: "x3x0zl" }]
|
|
45073
45154
|
];
|
|
45074
|
-
const ArrowLeft = createLucideIcon("arrow-left", __iconNode$
|
|
45155
|
+
const ArrowLeft = createLucideIcon("arrow-left", __iconNode$18);
|
|
45075
45156
|
/**
|
|
45076
45157
|
* @license lucide-react v0.575.0 - ISC
|
|
45077
45158
|
*
|
|
45078
45159
|
* This source code is licensed under the ISC license.
|
|
45079
45160
|
* See the LICENSE file in the root directory of this source tree.
|
|
45080
45161
|
*/
|
|
45081
|
-
const __iconNode$
|
|
45162
|
+
const __iconNode$17 = [
|
|
45082
45163
|
["path", { d: "M5 12h14", key: "1ays0h" }],
|
|
45083
45164
|
["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
|
|
45084
45165
|
];
|
|
45085
|
-
const ArrowRight = createLucideIcon("arrow-right", __iconNode$
|
|
45166
|
+
const ArrowRight = createLucideIcon("arrow-right", __iconNode$17);
|
|
45086
45167
|
/**
|
|
45087
45168
|
* @license lucide-react v0.575.0 - ISC
|
|
45088
45169
|
*
|
|
45089
45170
|
* This source code is licensed under the ISC license.
|
|
45090
45171
|
* See the LICENSE file in the root directory of this source tree.
|
|
45091
45172
|
*/
|
|
45092
|
-
const __iconNode$
|
|
45173
|
+
const __iconNode$16 = [
|
|
45093
45174
|
["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
|
|
45094
45175
|
["path", { d: "M12 19V5", key: "x0mq9r" }]
|
|
45095
45176
|
];
|
|
45096
|
-
const ArrowUp = createLucideIcon("arrow-up", __iconNode$
|
|
45177
|
+
const ArrowUp = createLucideIcon("arrow-up", __iconNode$16);
|
|
45097
45178
|
/**
|
|
45098
45179
|
* @license lucide-react v0.575.0 - ISC
|
|
45099
45180
|
*
|
|
45100
45181
|
* This source code is licensed under the ISC license.
|
|
45101
45182
|
* See the LICENSE file in the root directory of this source tree.
|
|
45102
45183
|
*/
|
|
45103
|
-
const __iconNode$
|
|
45184
|
+
const __iconNode$15 = [
|
|
45104
45185
|
["path", { d: "M12 7v14", key: "1akyts" }],
|
|
45105
45186
|
[
|
|
45106
45187
|
"path",
|
|
@@ -45110,14 +45191,14 @@ const __iconNode$14 = [
|
|
|
45110
45191
|
}
|
|
45111
45192
|
]
|
|
45112
45193
|
];
|
|
45113
|
-
const BookOpen = createLucideIcon("book-open", __iconNode$
|
|
45194
|
+
const BookOpen = createLucideIcon("book-open", __iconNode$15);
|
|
45114
45195
|
/**
|
|
45115
45196
|
* @license lucide-react v0.575.0 - ISC
|
|
45116
45197
|
*
|
|
45117
45198
|
* This source code is licensed under the ISC license.
|
|
45118
45199
|
* See the LICENSE file in the root directory of this source tree.
|
|
45119
45200
|
*/
|
|
45120
|
-
const __iconNode$
|
|
45201
|
+
const __iconNode$14 = [
|
|
45121
45202
|
[
|
|
45122
45203
|
"path",
|
|
45123
45204
|
{
|
|
@@ -45149,14 +45230,14 @@ const __iconNode$13 = [
|
|
|
45149
45230
|
["path", { d: "m12 8 4.74-2.85", key: "3rx089" }],
|
|
45150
45231
|
["path", { d: "M12 13.5V8", key: "1io7kd" }]
|
|
45151
45232
|
];
|
|
45152
|
-
const Boxes = createLucideIcon("boxes", __iconNode$
|
|
45233
|
+
const Boxes = createLucideIcon("boxes", __iconNode$14);
|
|
45153
45234
|
/**
|
|
45154
45235
|
* @license lucide-react v0.575.0 - ISC
|
|
45155
45236
|
*
|
|
45156
45237
|
* This source code is licensed under the ISC license.
|
|
45157
45238
|
* See the LICENSE file in the root directory of this source tree.
|
|
45158
45239
|
*/
|
|
45159
|
-
const __iconNode$
|
|
45240
|
+
const __iconNode$13 = [
|
|
45160
45241
|
["path", { d: "M12 18V5", key: "adv99a" }],
|
|
45161
45242
|
["path", { d: "M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4", key: "1e3is1" }],
|
|
45162
45243
|
["path", { d: "M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5", key: "1gqd8o" }],
|
|
@@ -45166,27 +45247,27 @@ const __iconNode$12 = [
|
|
|
45166
45247
|
["path", { d: "M6 18a4 4 0 0 1-2-7.464", key: "k1g0md" }],
|
|
45167
45248
|
["path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77", key: "q97ue3" }]
|
|
45168
45249
|
];
|
|
45169
|
-
const Brain = createLucideIcon("brain", __iconNode$
|
|
45250
|
+
const Brain = createLucideIcon("brain", __iconNode$13);
|
|
45170
45251
|
/**
|
|
45171
45252
|
* @license lucide-react v0.575.0 - ISC
|
|
45172
45253
|
*
|
|
45173
45254
|
* This source code is licensed under the ISC license.
|
|
45174
45255
|
* See the LICENSE file in the root directory of this source tree.
|
|
45175
45256
|
*/
|
|
45176
|
-
const __iconNode$
|
|
45257
|
+
const __iconNode$12 = [
|
|
45177
45258
|
["path", { d: "M12 12h.01", key: "1mp3jc" }],
|
|
45178
45259
|
["path", { d: "M16 6V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2", key: "1ksdt3" }],
|
|
45179
45260
|
["path", { d: "M22 13a18.15 18.15 0 0 1-20 0", key: "12hx5q" }],
|
|
45180
45261
|
["rect", { width: "20", height: "14", x: "2", y: "6", rx: "2", key: "i6l2r4" }]
|
|
45181
45262
|
];
|
|
45182
|
-
const BriefcaseBusiness = createLucideIcon("briefcase-business", __iconNode$
|
|
45263
|
+
const BriefcaseBusiness = createLucideIcon("briefcase-business", __iconNode$12);
|
|
45183
45264
|
/**
|
|
45184
45265
|
* @license lucide-react v0.575.0 - ISC
|
|
45185
45266
|
*
|
|
45186
45267
|
* This source code is licensed under the ISC license.
|
|
45187
45268
|
* See the LICENSE file in the root directory of this source tree.
|
|
45188
45269
|
*/
|
|
45189
|
-
const __iconNode$
|
|
45270
|
+
const __iconNode$11 = [
|
|
45190
45271
|
[
|
|
45191
45272
|
"path",
|
|
45192
45273
|
{ d: "M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z", key: "trhst0" }
|
|
@@ -45201,27 +45282,27 @@ const __iconNode$10 = [
|
|
|
45201
45282
|
],
|
|
45202
45283
|
["path", { d: "M7 5V3", key: "1t1388" }]
|
|
45203
45284
|
];
|
|
45204
|
-
const Cable = createLucideIcon("cable", __iconNode$
|
|
45285
|
+
const Cable = createLucideIcon("cable", __iconNode$11);
|
|
45205
45286
|
/**
|
|
45206
45287
|
* @license lucide-react v0.575.0 - ISC
|
|
45207
45288
|
*
|
|
45208
45289
|
* This source code is licensed under the ISC license.
|
|
45209
45290
|
* See the LICENSE file in the root directory of this source tree.
|
|
45210
45291
|
*/
|
|
45211
|
-
const __iconNode
|
|
45292
|
+
const __iconNode$10 = [
|
|
45212
45293
|
["path", { d: "M8 2v4", key: "1cmpym" }],
|
|
45213
45294
|
["path", { d: "M16 2v4", key: "4m81vk" }],
|
|
45214
45295
|
["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
|
|
45215
45296
|
["path", { d: "M3 10h18", key: "8toen8" }]
|
|
45216
45297
|
];
|
|
45217
|
-
const Calendar = createLucideIcon("calendar", __iconNode
|
|
45298
|
+
const Calendar = createLucideIcon("calendar", __iconNode$10);
|
|
45218
45299
|
/**
|
|
45219
45300
|
* @license lucide-react v0.575.0 - ISC
|
|
45220
45301
|
*
|
|
45221
45302
|
* This source code is licensed under the ISC license.
|
|
45222
45303
|
* See the LICENSE file in the root directory of this source tree.
|
|
45223
45304
|
*/
|
|
45224
|
-
const __iconNode
|
|
45305
|
+
const __iconNode$$ = [
|
|
45225
45306
|
[
|
|
45226
45307
|
"path",
|
|
45227
45308
|
{
|
|
@@ -45231,57 +45312,65 @@ const __iconNode$_ = [
|
|
|
45231
45312
|
],
|
|
45232
45313
|
["circle", { cx: "12", cy: "13", r: "3", key: "1vg3eu" }]
|
|
45233
45314
|
];
|
|
45234
|
-
const Camera = createLucideIcon("camera", __iconNode
|
|
45315
|
+
const Camera = createLucideIcon("camera", __iconNode$$);
|
|
45235
45316
|
/**
|
|
45236
45317
|
* @license lucide-react v0.575.0 - ISC
|
|
45237
45318
|
*
|
|
45238
45319
|
* This source code is licensed under the ISC license.
|
|
45239
45320
|
* See the LICENSE file in the root directory of this source tree.
|
|
45240
45321
|
*/
|
|
45241
|
-
const __iconNode$
|
|
45322
|
+
const __iconNode$_ = [
|
|
45242
45323
|
["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
|
|
45243
45324
|
["path", { d: "M7 16h8", key: "srdodz" }],
|
|
45244
45325
|
["path", { d: "M7 11h12", key: "127s9w" }],
|
|
45245
45326
|
["path", { d: "M7 6h3", key: "w9rmul" }]
|
|
45246
45327
|
];
|
|
45247
|
-
const ChartBar = createLucideIcon("chart-bar", __iconNode$
|
|
45328
|
+
const ChartBar = createLucideIcon("chart-bar", __iconNode$_);
|
|
45248
45329
|
/**
|
|
45249
45330
|
* @license lucide-react v0.575.0 - ISC
|
|
45250
45331
|
*
|
|
45251
45332
|
* This source code is licensed under the ISC license.
|
|
45252
45333
|
* See the LICENSE file in the root directory of this source tree.
|
|
45253
45334
|
*/
|
|
45254
|
-
const __iconNode$
|
|
45335
|
+
const __iconNode$Z = [
|
|
45255
45336
|
["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
|
|
45256
45337
|
["path", { d: "M18 17V9", key: "2bz60n" }],
|
|
45257
45338
|
["path", { d: "M13 17V5", key: "1frdt8" }],
|
|
45258
45339
|
["path", { d: "M8 17v-3", key: "17ska0" }]
|
|
45259
45340
|
];
|
|
45260
|
-
const ChartColumn = createLucideIcon("chart-column", __iconNode$
|
|
45341
|
+
const ChartColumn = createLucideIcon("chart-column", __iconNode$Z);
|
|
45342
|
+
/**
|
|
45343
|
+
* @license lucide-react v0.575.0 - ISC
|
|
45344
|
+
*
|
|
45345
|
+
* This source code is licensed under the ISC license.
|
|
45346
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
45347
|
+
*/
|
|
45348
|
+
const __iconNode$Y = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
|
|
45349
|
+
const Check = createLucideIcon("check", __iconNode$Y);
|
|
45261
45350
|
/**
|
|
45262
45351
|
* @license lucide-react v0.575.0 - ISC
|
|
45263
45352
|
*
|
|
45264
45353
|
* This source code is licensed under the ISC license.
|
|
45265
45354
|
* See the LICENSE file in the root directory of this source tree.
|
|
45266
45355
|
*/
|
|
45267
|
-
const __iconNode$X = [["path", { d: "
|
|
45268
|
-
const
|
|
45356
|
+
const __iconNode$X = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
|
|
45357
|
+
const ChevronDown = createLucideIcon("chevron-down", __iconNode$X);
|
|
45269
45358
|
/**
|
|
45270
45359
|
* @license lucide-react v0.575.0 - ISC
|
|
45271
45360
|
*
|
|
45272
45361
|
* This source code is licensed under the ISC license.
|
|
45273
45362
|
* See the LICENSE file in the root directory of this source tree.
|
|
45274
45363
|
*/
|
|
45275
|
-
const __iconNode$W = [["path", { d: "
|
|
45276
|
-
const
|
|
45364
|
+
const __iconNode$W = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
|
|
45365
|
+
const ChevronRight = createLucideIcon("chevron-right", __iconNode$W);
|
|
45277
45366
|
/**
|
|
45278
45367
|
* @license lucide-react v0.575.0 - ISC
|
|
45279
45368
|
*
|
|
45280
45369
|
* This source code is licensed under the ISC license.
|
|
45281
45370
|
* See the LICENSE file in the root directory of this source tree.
|
|
45282
45371
|
*/
|
|
45283
|
-
const __iconNode$V = [["path", { d: "
|
|
45284
|
-
const
|
|
45372
|
+
const __iconNode$V = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
|
|
45373
|
+
const ChevronUp = createLucideIcon("chevron-up", __iconNode$V);
|
|
45285
45374
|
/**
|
|
45286
45375
|
* @license lucide-react v0.575.0 - ISC
|
|
45287
45376
|
*
|
|
@@ -52563,6 +52652,51 @@ function normalizeContentResult(result) {
|
|
|
52563
52652
|
}
|
|
52564
52653
|
return [];
|
|
52565
52654
|
}
|
|
52655
|
+
function useFreshPresignedUrl({
|
|
52656
|
+
s3Key,
|
|
52657
|
+
fallbackUrl
|
|
52658
|
+
}) {
|
|
52659
|
+
const [freshUrl, setFreshUrl] = React.useState(null);
|
|
52660
|
+
const config2 = useAthenaConfig();
|
|
52661
|
+
const configRef = React.useRef(config2);
|
|
52662
|
+
configRef.current = config2;
|
|
52663
|
+
React.useEffect(() => {
|
|
52664
|
+
setFreshUrl(null);
|
|
52665
|
+
if (!s3Key) return;
|
|
52666
|
+
let cancelled = false;
|
|
52667
|
+
(async () => {
|
|
52668
|
+
try {
|
|
52669
|
+
const { backendUrl, token, apiKey } = configRef.current;
|
|
52670
|
+
const baseUrl = backendUrl.replace(/\/api\/assistant-ui\/?$/, "");
|
|
52671
|
+
const url = `${baseUrl}/api/asset/fetch-attachment-presigned-url`;
|
|
52672
|
+
const headers = {
|
|
52673
|
+
"Content-Type": "application/json"
|
|
52674
|
+
};
|
|
52675
|
+
if (token) {
|
|
52676
|
+
headers["Authorization"] = `Bearer ${token}`;
|
|
52677
|
+
} else if (apiKey) {
|
|
52678
|
+
headers["X-API-KEY"] = apiKey;
|
|
52679
|
+
}
|
|
52680
|
+
const resp = await fetch(url, {
|
|
52681
|
+
method: "POST",
|
|
52682
|
+
headers,
|
|
52683
|
+
body: JSON.stringify({ s3_key: s3Key })
|
|
52684
|
+
});
|
|
52685
|
+
if (!cancelled && resp.ok) {
|
|
52686
|
+
const data = await resp.json();
|
|
52687
|
+
if (!cancelled && data.presigned_url) {
|
|
52688
|
+
setFreshUrl(data.presigned_url);
|
|
52689
|
+
}
|
|
52690
|
+
}
|
|
52691
|
+
} catch {
|
|
52692
|
+
}
|
|
52693
|
+
})();
|
|
52694
|
+
return () => {
|
|
52695
|
+
cancelled = true;
|
|
52696
|
+
};
|
|
52697
|
+
}, [s3Key]);
|
|
52698
|
+
return freshUrl ?? fallbackUrl;
|
|
52699
|
+
}
|
|
52566
52700
|
function getSlideScreenshotResult(result) {
|
|
52567
52701
|
let text2 = null;
|
|
52568
52702
|
let imageUrl = null;
|
|
@@ -52602,10 +52736,11 @@ const CaptureSlideScreenshotToolUIImpl = ({
|
|
|
52602
52736
|
const typedArgs = args;
|
|
52603
52737
|
const assetId = getStringField(typedArgs, ["asset_id", "assetId"]);
|
|
52604
52738
|
const slideNumber = getNumberField(typedArgs, ["slide_number", "slideNumber"]) ?? void 0;
|
|
52605
|
-
const { text: text2, imageUrl, mediaType } = React.useMemo(
|
|
52739
|
+
const { text: text2, imageUrl, mediaType, s3Key } = React.useMemo(
|
|
52606
52740
|
() => getSlideScreenshotResult(result),
|
|
52607
52741
|
[result]
|
|
52608
52742
|
);
|
|
52743
|
+
const freshImageUrl = useFreshPresignedUrl({ s3Key, fallbackUrl: imageUrl });
|
|
52609
52744
|
const isRunning = (status == null ? void 0 : status.type) === "running";
|
|
52610
52745
|
const isComplete = (status == null ? void 0 : status.type) === "complete" || !status;
|
|
52611
52746
|
const isCancelled = (status == null ? void 0 : status.type) === "incomplete" && status.reason === "cancelled";
|
|
@@ -52637,11 +52772,11 @@ const CaptureSlideScreenshotToolUIImpl = ({
|
|
|
52637
52772
|
result,
|
|
52638
52773
|
error: errorMsg,
|
|
52639
52774
|
children: [
|
|
52640
|
-
isComplete && !isCancelled &&
|
|
52775
|
+
isComplete && !isCancelled && freshImageUrl && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "border-t border-border/40 p-3", children: [
|
|
52641
52776
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-hidden rounded-lg border border-border/50 bg-muted/20", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
52642
52777
|
"img",
|
|
52643
52778
|
{
|
|
52644
|
-
src:
|
|
52779
|
+
src: freshImageUrl,
|
|
52645
52780
|
alt: slideNumber ? `Slide ${slideNumber} screenshot` : "Slide screenshot",
|
|
52646
52781
|
className: "aspect-video w-full object-contain",
|
|
52647
52782
|
loading: "lazy"
|
|
@@ -52662,10 +52797,10 @@ const CaptureSlideScreenshotToolUIImpl = ({
|
|
|
52662
52797
|
]
|
|
52663
52798
|
}
|
|
52664
52799
|
),
|
|
52665
|
-
|
|
52800
|
+
freshImageUrl && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
52666
52801
|
"a",
|
|
52667
52802
|
{
|
|
52668
|
-
href:
|
|
52803
|
+
href: freshImageUrl,
|
|
52669
52804
|
target: "_blank",
|
|
52670
52805
|
rel: "noreferrer",
|
|
52671
52806
|
className: "flex items-center gap-1.5 rounded-md border border-border/60 px-3 py-1.5 text-xs font-medium text-muted-foreground transition-colors hover:bg-muted/50 hover:text-foreground",
|
|
@@ -52695,6 +52830,7 @@ const TOOL_UI_REGISTRY = {
|
|
|
52695
52830
|
create_document_from_markdown: CreateDocumentToolUI,
|
|
52696
52831
|
create_new_sheet: CreateSheetToolUI,
|
|
52697
52832
|
create_powerpoint_deck: CreatePresentationToolUI,
|
|
52833
|
+
create_presentation_pptx_studio: CreatePresentationToolUI,
|
|
52698
52834
|
create_new_notebook: CreateNotebookToolUI,
|
|
52699
52835
|
// Studio SDK nested PTC tools
|
|
52700
52836
|
CreateWorkbook: StudioCreateWorkbookToolUI,
|
|
@@ -52722,6 +52858,482 @@ const TOOL_UI_REGISTRY = {
|
|
|
52722
52858
|
run_database_sql: RunSqlToolUI,
|
|
52723
52859
|
run_sql_query_tool: RunSqlToolUI
|
|
52724
52860
|
};
|
|
52861
|
+
const TOOLKIT_THEMES = {
|
|
52862
|
+
Web: { color: "#7BCCFA" },
|
|
52863
|
+
Document: { color: "#4586F9" },
|
|
52864
|
+
"Document (Word)": { color: "#4586F9" },
|
|
52865
|
+
Notebook: { color: "#FFAB00" },
|
|
52866
|
+
Python: { color: "#00A76F" },
|
|
52867
|
+
Spreadsheet: { color: "#00A76F" },
|
|
52868
|
+
Email: { color: "#B584FF" },
|
|
52869
|
+
AOP: { color: "#336DFF" },
|
|
52870
|
+
App: { color: "#7336F5" },
|
|
52871
|
+
"Presentation (PowerPoint)": { color: "#F56B36" },
|
|
52872
|
+
Presentation: { color: "#F56B36" },
|
|
52873
|
+
"User Interface": { color: "#7336F5" },
|
|
52874
|
+
Canvas: { color: "#002542" },
|
|
52875
|
+
Computer: { color: "#3E0042" },
|
|
52876
|
+
Database: { color: "#7336F5" }
|
|
52877
|
+
};
|
|
52878
|
+
const DEFAULT_THEME = { color: "#919EAB" };
|
|
52879
|
+
const CollapsibleGroup = ({ groupKey, indices, children }) => {
|
|
52880
|
+
const isMessageRunning = react$1.useAuiState((s) => {
|
|
52881
|
+
var _a2;
|
|
52882
|
+
return ((_a2 = s.message.status) == null ? void 0 : _a2.type) === "running";
|
|
52883
|
+
});
|
|
52884
|
+
const [userOpened, setOpen] = React.useState();
|
|
52885
|
+
const open = userOpened ?? isMessageRunning;
|
|
52886
|
+
const toolCallCount = react$1.useAuiState((s) => {
|
|
52887
|
+
if (s.message.role !== "assistant") return 0;
|
|
52888
|
+
const parts = s.message.content;
|
|
52889
|
+
if (!parts) return 0;
|
|
52890
|
+
return indices.reduce((acc, idx) => {
|
|
52891
|
+
const part = parts[idx];
|
|
52892
|
+
return (part == null ? void 0 : part.type) === "tool-call" ? acc + 1 : acc;
|
|
52893
|
+
}, 0);
|
|
52894
|
+
});
|
|
52895
|
+
const theme = React.useMemo(
|
|
52896
|
+
() => groupKey ? TOOLKIT_THEMES[groupKey] ?? DEFAULT_THEME : DEFAULT_THEME,
|
|
52897
|
+
[groupKey]
|
|
52898
|
+
);
|
|
52899
|
+
if (!groupKey || indices.length <= 1) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children });
|
|
52900
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
52901
|
+
"div",
|
|
52902
|
+
{
|
|
52903
|
+
className: "my-4 rounded-2xl border shadow-sm",
|
|
52904
|
+
style: {
|
|
52905
|
+
borderColor: `${theme.color}33`,
|
|
52906
|
+
background: `linear-gradient(to right, ${theme.color}0d, transparent, ${theme.color}0d)`
|
|
52907
|
+
},
|
|
52908
|
+
children: [
|
|
52909
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
52910
|
+
"button",
|
|
52911
|
+
{
|
|
52912
|
+
type: "button",
|
|
52913
|
+
onClick: () => setOpen(!open),
|
|
52914
|
+
className: "flex w-full items-center justify-between gap-3 rounded-2xl px-5 py-3 transition-colors hover:bg-black/5 dark:hover:bg-white/5",
|
|
52915
|
+
"aria-expanded": open,
|
|
52916
|
+
children: [
|
|
52917
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3 text-foreground/90", children: [
|
|
52918
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
52919
|
+
"span",
|
|
52920
|
+
{
|
|
52921
|
+
className: "inline-block size-2 rounded-full",
|
|
52922
|
+
style: { backgroundColor: theme.color },
|
|
52923
|
+
"aria-hidden": "true"
|
|
52924
|
+
}
|
|
52925
|
+
),
|
|
52926
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-sm font-semibold", children: [
|
|
52927
|
+
isMessageRunning ? "Using " : "Used ",
|
|
52928
|
+
groupKey,
|
|
52929
|
+
" Toolkit"
|
|
52930
|
+
] })
|
|
52931
|
+
] }),
|
|
52932
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-3", children: [
|
|
52933
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs font-medium text-muted-foreground", children: [
|
|
52934
|
+
toolCallCount,
|
|
52935
|
+
" tool ",
|
|
52936
|
+
toolCallCount === 1 ? "call" : "calls"
|
|
52937
|
+
] }),
|
|
52938
|
+
open ? /* @__PURE__ */ jsxRuntime.jsx(ChevronUp, { size: 16 }) : /* @__PURE__ */ jsxRuntime.jsx(ChevronDown, { size: 16 })
|
|
52939
|
+
] })
|
|
52940
|
+
]
|
|
52941
|
+
}
|
|
52942
|
+
),
|
|
52943
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
52944
|
+
"div",
|
|
52945
|
+
{
|
|
52946
|
+
className: cn(
|
|
52947
|
+
"grid overflow-hidden border-t transition-[grid-template-rows] duration-200 ease-in-out",
|
|
52948
|
+
open ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
|
|
52949
|
+
),
|
|
52950
|
+
style: { borderColor: `${theme.color}33` },
|
|
52951
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-2 px-5 py-4", children }) })
|
|
52952
|
+
}
|
|
52953
|
+
)
|
|
52954
|
+
]
|
|
52955
|
+
}
|
|
52956
|
+
);
|
|
52957
|
+
};
|
|
52958
|
+
const createToolBasedGroupingFunction = (getToolGroupKey) => (parts) => {
|
|
52959
|
+
const groups = [];
|
|
52960
|
+
let currentGroup = null;
|
|
52961
|
+
for (let idx = 0; idx < parts.length; idx++) {
|
|
52962
|
+
const part = parts[idx];
|
|
52963
|
+
if ((part == null ? void 0 : part.type) === "reasoning") {
|
|
52964
|
+
if (currentGroup) {
|
|
52965
|
+
currentGroup.indices.push(idx);
|
|
52966
|
+
} else {
|
|
52967
|
+
groups.push({ groupKey: void 0, indices: [idx] });
|
|
52968
|
+
}
|
|
52969
|
+
continue;
|
|
52970
|
+
}
|
|
52971
|
+
let key;
|
|
52972
|
+
if ((part == null ? void 0 : part.type) === "tool-call" && part.toolName) {
|
|
52973
|
+
key = getToolGroupKey(part.toolName);
|
|
52974
|
+
} else if ((part == null ? void 0 : part.type) === "text") {
|
|
52975
|
+
const prevKey = currentGroup == null ? void 0 : currentGroup.groupKey;
|
|
52976
|
+
let nextKey;
|
|
52977
|
+
for (let lookIdx = idx + 1; lookIdx < parts.length; lookIdx++) {
|
|
52978
|
+
const lookPart = parts[lookIdx];
|
|
52979
|
+
if ((lookPart == null ? void 0 : lookPart.type) === "reasoning" || (lookPart == null ? void 0 : lookPart.type) === "text") continue;
|
|
52980
|
+
if ((lookPart == null ? void 0 : lookPart.type) === "tool-call" && lookPart.toolName) {
|
|
52981
|
+
nextKey = getToolGroupKey(lookPart.toolName);
|
|
52982
|
+
}
|
|
52983
|
+
break;
|
|
52984
|
+
}
|
|
52985
|
+
if (prevKey && nextKey && prevKey === nextKey) {
|
|
52986
|
+
key = prevKey;
|
|
52987
|
+
}
|
|
52988
|
+
}
|
|
52989
|
+
if (currentGroup && currentGroup.groupKey === key) {
|
|
52990
|
+
currentGroup.indices.push(idx);
|
|
52991
|
+
} else {
|
|
52992
|
+
if (currentGroup) groups.push(currentGroup);
|
|
52993
|
+
currentGroup = { groupKey: key, indices: [idx] };
|
|
52994
|
+
}
|
|
52995
|
+
}
|
|
52996
|
+
if (currentGroup) groups.push(currentGroup);
|
|
52997
|
+
return groups;
|
|
52998
|
+
};
|
|
52999
|
+
const TOOL_STATUS_LABELS = {
|
|
53000
|
+
// Document tools
|
|
53001
|
+
read_asset: { running: "Reviewing asset content", complete: "Asset content reviewed" },
|
|
53002
|
+
read_full_asset: { running: "Reviewing asset content", complete: "Asset content reviewed" },
|
|
53003
|
+
create_new_document: { running: "Creating document", complete: "Created document" },
|
|
53004
|
+
create_document_from_markdown: { running: "Creating document", complete: "Created document" },
|
|
53005
|
+
append_markdown_to_athena_document: { running: "Updating document", complete: "Updated document" },
|
|
53006
|
+
replace_markdown_in_athena_document: { running: "Updating document", complete: "Updated document" },
|
|
53007
|
+
convert_athena_doc_to_pdf: { running: "Converting to PDF", complete: "Converted to PDF" },
|
|
53008
|
+
convert_to_pdf: { running: "Converting to PDF", complete: "Converted to PDF" },
|
|
53009
|
+
// Spreadsheet tools
|
|
53010
|
+
create_new_sheet: { running: "Creating spreadsheet", complete: "Created spreadsheet" },
|
|
53011
|
+
update_sheet_range: { running: "Updating spreadsheet", complete: "Updated spreadsheet" },
|
|
53012
|
+
format_sheet_range: { running: "Formatting spreadsheet", complete: "Formatted spreadsheet" },
|
|
53013
|
+
bulk_format_sheet_range: { running: "Formatting spreadsheet ranges", complete: "Formatted spreadsheet ranges" },
|
|
53014
|
+
create_table: { running: "Creating table", complete: "Created table" },
|
|
53015
|
+
update_table: { running: "Updating table", complete: "Updated table" },
|
|
53016
|
+
create_chart: { running: "Creating chart", complete: "Created chart" },
|
|
53017
|
+
update_chart: { running: "Updating chart", complete: "Updated chart" },
|
|
53018
|
+
// Web / search
|
|
53019
|
+
search: { running: "Searching the web", complete: "Web search complete" },
|
|
53020
|
+
browse: { running: "Reading webpage", complete: "Read webpage" },
|
|
53021
|
+
web_search: { running: "Searching the web", complete: "Web search complete" },
|
|
53022
|
+
search_web: { running: "Searching the web", complete: "Web search complete" },
|
|
53023
|
+
web_scrape: { running: "Reading webpage", complete: "Read webpage" },
|
|
53024
|
+
scrape_web: { running: "Reading webpage", complete: "Read webpage" },
|
|
53025
|
+
open_asset_in_workspace: { running: "Opening in workspace", complete: "Opened in workspace" },
|
|
53026
|
+
// Email / calendar
|
|
53027
|
+
create_email_draft: { running: "Drafting email", complete: "Email drafted" },
|
|
53028
|
+
send_email: { running: "Sending email", complete: "Email sent" },
|
|
53029
|
+
unified_email_create_draft: { running: "Drafting email", complete: "Email drafted" },
|
|
53030
|
+
unified_email_send: { running: "Sending email", complete: "Email sent" },
|
|
53031
|
+
unified_email_edit_draft: { running: "Editing email draft", complete: "Draft updated" },
|
|
53032
|
+
search_email: { running: "Searching email", complete: "Email search complete" },
|
|
53033
|
+
unified_email_search: { running: "Searching email", complete: "Email search complete" },
|
|
53034
|
+
// Python / code execution
|
|
53035
|
+
run_python: { running: "Running Python code", complete: "Python execution complete" },
|
|
53036
|
+
run_python_code: { running: "Running Python code", complete: "Python execution complete" },
|
|
53037
|
+
run_sql: { running: "Running database query", complete: "Query complete" },
|
|
53038
|
+
execute_sql: { running: "Running database query", complete: "Query complete" },
|
|
53039
|
+
run_database_sql: { running: "Running database query", complete: "Query complete" },
|
|
53040
|
+
run_sql_query_tool: { running: "Running database query", complete: "Query complete" },
|
|
53041
|
+
// Presentation
|
|
53042
|
+
create_powerpoint_deck: { running: "Creating presentation", complete: "Created presentation" },
|
|
53043
|
+
create_presentation_pptx_studio: { running: "Creating presentation", complete: "Created presentation" },
|
|
53044
|
+
execute_presentation_code: { running: "Updating presentation", complete: "Updated presentation" },
|
|
53045
|
+
capture_slide_screenshot: { running: "Capturing slide", complete: "Slide captured" },
|
|
53046
|
+
// Notebook
|
|
53047
|
+
create_new_notebook: { running: "Creating notebook", complete: "Created notebook" },
|
|
53048
|
+
run_notebook_cell: { running: "Running notebook cell", complete: "Cell execution complete" },
|
|
53049
|
+
// Media capture
|
|
53050
|
+
capture_moment: { running: "Capturing moment", complete: "Moment captured" }
|
|
53051
|
+
};
|
|
53052
|
+
function getToolStatusLabel(toolName, status) {
|
|
53053
|
+
const entry = TOOL_STATUS_LABELS[toolName];
|
|
53054
|
+
if (entry) return status === "complete" ? entry.complete : entry.running;
|
|
53055
|
+
const formatted = formatToolName(toolName);
|
|
53056
|
+
return status === "complete" ? formatted : `Running ${formatted.toLowerCase()}`;
|
|
53057
|
+
}
|
|
53058
|
+
const DEFAULT_TOOL_TO_TOOLKIT = {
|
|
53059
|
+
// Web
|
|
53060
|
+
search: "Web",
|
|
53061
|
+
browse: "Web",
|
|
53062
|
+
web_search: "Web",
|
|
53063
|
+
search_web: "Web",
|
|
53064
|
+
web_scrape: "Web",
|
|
53065
|
+
scrape_web: "Web",
|
|
53066
|
+
// Document
|
|
53067
|
+
create_new_document: "Document",
|
|
53068
|
+
create_document_from_markdown: "Document",
|
|
53069
|
+
append_markdown_to_athena_document: "Document",
|
|
53070
|
+
replace_markdown_in_athena_document: "Document",
|
|
53071
|
+
delete_blocks_from_athena_document: "Document",
|
|
53072
|
+
convert_athena_doc_to_pdf: "Document",
|
|
53073
|
+
convert_to_pdf: "Document",
|
|
53074
|
+
// Word document (Studio)
|
|
53075
|
+
CreateDocument: "Document (Word)",
|
|
53076
|
+
CreateParagraph: "Document (Word)",
|
|
53077
|
+
OpenDocument: "Document (Word)",
|
|
53078
|
+
execute_word_commands: "Document (Word)",
|
|
53079
|
+
create_new_word_document: "Document (Word)",
|
|
53080
|
+
// Spreadsheet
|
|
53081
|
+
create_new_sheet: "Spreadsheet",
|
|
53082
|
+
update_sheet_range: "Spreadsheet",
|
|
53083
|
+
format_sheet_range: "Spreadsheet",
|
|
53084
|
+
bulk_format_sheet_range: "Spreadsheet",
|
|
53085
|
+
create_table: "Spreadsheet",
|
|
53086
|
+
update_table: "Spreadsheet",
|
|
53087
|
+
create_chart: "Spreadsheet",
|
|
53088
|
+
update_chart: "Spreadsheet",
|
|
53089
|
+
// Studio sheet PTC
|
|
53090
|
+
CreateWorkbook: "Spreadsheet",
|
|
53091
|
+
AddSheet: "Spreadsheet",
|
|
53092
|
+
OpenWorkbook: "Spreadsheet",
|
|
53093
|
+
// Presentation
|
|
53094
|
+
create_powerpoint_deck: "Presentation",
|
|
53095
|
+
create_presentation_pptx_studio: "Presentation",
|
|
53096
|
+
execute_presentation_code: "Presentation",
|
|
53097
|
+
capture_slide_screenshot: "Presentation",
|
|
53098
|
+
// Studio presentation PTC
|
|
53099
|
+
CreatePresentation: "Presentation",
|
|
53100
|
+
OpenPresentation: "Presentation",
|
|
53101
|
+
AddSlide: "Presentation",
|
|
53102
|
+
// Notebook
|
|
53103
|
+
create_new_notebook: "Notebook",
|
|
53104
|
+
run_notebook_cell: "Notebook",
|
|
53105
|
+
// Python / code execution
|
|
53106
|
+
run_python_code: "Python",
|
|
53107
|
+
run_python: "Python",
|
|
53108
|
+
// Database
|
|
53109
|
+
run_sql: "Database",
|
|
53110
|
+
run_database_sql: "Database",
|
|
53111
|
+
run_sql_query_tool: "Database",
|
|
53112
|
+
execute_sql: "Database",
|
|
53113
|
+
describe_database: "Database",
|
|
53114
|
+
list_database_tables: "Database",
|
|
53115
|
+
get_database_table_schema: "Database",
|
|
53116
|
+
// Email / calendar
|
|
53117
|
+
search_email: "Email",
|
|
53118
|
+
unified_email_search: "Email",
|
|
53119
|
+
// Media
|
|
53120
|
+
capture_moment: "Computer"
|
|
53121
|
+
};
|
|
53122
|
+
const UNGROUPED_TOOLS = [
|
|
53123
|
+
"read_asset",
|
|
53124
|
+
"read_full_asset",
|
|
53125
|
+
"open_asset_in_workspace",
|
|
53126
|
+
"create_email_draft",
|
|
53127
|
+
"unified_email_create_draft",
|
|
53128
|
+
"unified_email_send",
|
|
53129
|
+
"unified_email_edit_draft"
|
|
53130
|
+
];
|
|
53131
|
+
const defaultGetToolGroupKey = (toolName) => {
|
|
53132
|
+
if (UNGROUPED_TOOLS.includes(toolName)) return void 0;
|
|
53133
|
+
return DEFAULT_TOOL_TO_TOOLKIT[toolName];
|
|
53134
|
+
};
|
|
53135
|
+
const MAX_VISIBLE_STATUSES = 5;
|
|
53136
|
+
const EMPTY_STATUSES = [];
|
|
53137
|
+
function PulsingDots() {
|
|
53138
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "inline-flex items-center gap-[3px]", "aria-hidden": "true", children: [
|
|
53139
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-[5px] w-[5px] rounded-full bg-gray-800 animate-[aui-sg-pulse-dot_1.4s_ease-in-out_infinite]" }),
|
|
53140
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-[5px] w-[5px] rounded-full bg-gray-800 animate-[aui-sg-pulse-dot_1.4s_ease-in-out_0.2s_infinite]" }),
|
|
53141
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "h-[5px] w-[5px] rounded-full bg-gray-800 animate-[aui-sg-pulse-dot_1.4s_ease-in-out_0.4s_infinite]" }),
|
|
53142
|
+
/* @__PURE__ */ jsxRuntime.jsx("style", { children: `
|
|
53143
|
+
@keyframes aui-sg-pulse-dot {
|
|
53144
|
+
0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
|
|
53145
|
+
40% { opacity: 1; transform: scale(1); }
|
|
53146
|
+
}
|
|
53147
|
+
@keyframes aui-sg-shimmer-bar {
|
|
53148
|
+
0% { transform: translateX(-100%); }
|
|
53149
|
+
100% { transform: translateX(400%); }
|
|
53150
|
+
}
|
|
53151
|
+
` })
|
|
53152
|
+
] });
|
|
53153
|
+
}
|
|
53154
|
+
const SuperGroupingFinalText = React.memo(function SuperGroupingFinalText2({
|
|
53155
|
+
TextComponent
|
|
53156
|
+
}) {
|
|
53157
|
+
const messageContent = react$1.useAuiState((s) => s.message.content);
|
|
53158
|
+
const isRunning = react$1.useAuiState((s) => {
|
|
53159
|
+
var _a2;
|
|
53160
|
+
return ((_a2 = s.message.status) == null ? void 0 : _a2.type) === "running";
|
|
53161
|
+
});
|
|
53162
|
+
const finalText = React.useMemo(() => {
|
|
53163
|
+
if (!(messageContent == null ? void 0 : messageContent.length)) return null;
|
|
53164
|
+
let lastToolIdx = -1;
|
|
53165
|
+
for (let i = messageContent.length - 1; i >= 0; i--) {
|
|
53166
|
+
if (messageContent[i].type === "tool-call") {
|
|
53167
|
+
lastToolIdx = i;
|
|
53168
|
+
break;
|
|
53169
|
+
}
|
|
53170
|
+
}
|
|
53171
|
+
if (lastToolIdx === -1) return null;
|
|
53172
|
+
const texts = [];
|
|
53173
|
+
for (let i = lastToolIdx + 1; i < messageContent.length; i++) {
|
|
53174
|
+
const part = messageContent[i];
|
|
53175
|
+
if (part.type === "text" && part.text) texts.push(part.text);
|
|
53176
|
+
}
|
|
53177
|
+
return texts.length > 0 ? texts.join("\n\n") : null;
|
|
53178
|
+
}, [messageContent]);
|
|
53179
|
+
if (isRunning || !finalText) return null;
|
|
53180
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TextComponent, { type: "text", text: finalText, status: { type: "complete" } });
|
|
53181
|
+
});
|
|
53182
|
+
const SuperGroupingCard = React.memo(function SuperGroupingCard2({
|
|
53183
|
+
toolUIs,
|
|
53184
|
+
TextComponent,
|
|
53185
|
+
ReasoningComponent,
|
|
53186
|
+
getToolGroupKey = defaultGetToolGroupKey
|
|
53187
|
+
}) {
|
|
53188
|
+
const [showDetails, setShowDetails] = React.useState(false);
|
|
53189
|
+
const handleToggleDetails = React.useCallback(() => setShowDetails((p) => !p), []);
|
|
53190
|
+
const handleHideDetails = React.useCallback(() => setShowDetails(false), []);
|
|
53191
|
+
const messageStatus = react$1.useAuiState((s) => {
|
|
53192
|
+
var _a2;
|
|
53193
|
+
return (_a2 = s.message.status) == null ? void 0 : _a2.type;
|
|
53194
|
+
});
|
|
53195
|
+
const isRunning = messageStatus === "running";
|
|
53196
|
+
const isError = messageStatus === "incomplete";
|
|
53197
|
+
const isComplete = !isRunning && !isError;
|
|
53198
|
+
const groupingFunction = React.useMemo(() => {
|
|
53199
|
+
const inner = createToolBasedGroupingFunction(getToolGroupKey);
|
|
53200
|
+
return (parts) => {
|
|
53201
|
+
const lastToolIdx = parts.findLastIndex((p) => (p == null ? void 0 : p.type) === "tool-call");
|
|
53202
|
+
return inner(parts).map((g) => ({
|
|
53203
|
+
...g,
|
|
53204
|
+
indices: g.indices.filter((i) => {
|
|
53205
|
+
var _a2;
|
|
53206
|
+
return ((_a2 = parts[i]) == null ? void 0 : _a2.type) !== "text" || i <= lastToolIdx;
|
|
53207
|
+
})
|
|
53208
|
+
})).filter((g) => g.indices.length > 0);
|
|
53209
|
+
};
|
|
53210
|
+
}, [getToolGroupKey]);
|
|
53211
|
+
const messageContent = react$1.useAuiState((s) => s.message.content);
|
|
53212
|
+
const toolStatuses = React.useMemo(() => {
|
|
53213
|
+
if (!messageContent) return EMPTY_STATUSES;
|
|
53214
|
+
const statuses = [];
|
|
53215
|
+
for (const part of messageContent) {
|
|
53216
|
+
if (part.type === "tool-call") {
|
|
53217
|
+
const isToolComplete = part.result !== void 0;
|
|
53218
|
+
statuses.push({
|
|
53219
|
+
toolName: part.toolName,
|
|
53220
|
+
label: getToolStatusLabel(part.toolName, isToolComplete ? "complete" : "running"),
|
|
53221
|
+
isComplete: isToolComplete
|
|
53222
|
+
});
|
|
53223
|
+
}
|
|
53224
|
+
}
|
|
53225
|
+
return statuses.length > 0 ? statuses : EMPTY_STATUSES;
|
|
53226
|
+
}, [messageContent]);
|
|
53227
|
+
const hasToolCalls = toolStatuses.length > 0;
|
|
53228
|
+
const visibleStatuses = React.useMemo(
|
|
53229
|
+
() => toolStatuses.length <= MAX_VISIBLE_STATUSES ? toolStatuses : toolStatuses.slice(-MAX_VISIBLE_STATUSES),
|
|
53230
|
+
[toolStatuses]
|
|
53231
|
+
);
|
|
53232
|
+
const hiddenCount = toolStatuses.length - visibleStatuses.length;
|
|
53233
|
+
const latestStatusLine = React.useMemo(() => {
|
|
53234
|
+
var _a2;
|
|
53235
|
+
if (!hasToolCalls) return "Planning approach";
|
|
53236
|
+
return ((_a2 = toolStatuses[toolStatuses.length - 1]) == null ? void 0 : _a2.label) ?? "Working";
|
|
53237
|
+
}, [toolStatuses, hasToolCalls]);
|
|
53238
|
+
const detailsPanel = /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2 border-t border-border/60 bg-background/80 px-4 py-4", children: [
|
|
53239
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
53240
|
+
react$1.MessagePrimitive.Unstable_PartsGrouped,
|
|
53241
|
+
{
|
|
53242
|
+
groupingFunction,
|
|
53243
|
+
components: {
|
|
53244
|
+
tools: { by_name: toolUIs, Fallback: ToolFallback },
|
|
53245
|
+
Text: TextComponent,
|
|
53246
|
+
...ReasoningComponent ? { Reasoning: ReasoningComponent } : {},
|
|
53247
|
+
Group: CollapsibleGroup
|
|
53248
|
+
}
|
|
53249
|
+
}
|
|
53250
|
+
),
|
|
53251
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
53252
|
+
"button",
|
|
53253
|
+
{
|
|
53254
|
+
type: "button",
|
|
53255
|
+
onClick: handleHideDetails,
|
|
53256
|
+
className: "mx-auto mt-3 flex items-center gap-1 rounded-md px-3 py-1.5 text-[11px] font-medium text-muted-foreground transition-colors hover:bg-muted/40 hover:text-foreground",
|
|
53257
|
+
children: [
|
|
53258
|
+
/* @__PURE__ */ jsxRuntime.jsx(ChevronUp, { className: "size-3" }),
|
|
53259
|
+
"Hide details"
|
|
53260
|
+
]
|
|
53261
|
+
}
|
|
53262
|
+
)
|
|
53263
|
+
] });
|
|
53264
|
+
if (isComplete && hasToolCalls) {
|
|
53265
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "my-3 overflow-hidden rounded-2xl border border-border/60 bg-muted/10", children: [
|
|
53266
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
53267
|
+
"button",
|
|
53268
|
+
{
|
|
53269
|
+
type: "button",
|
|
53270
|
+
onClick: handleToggleDetails,
|
|
53271
|
+
"aria-expanded": showDetails,
|
|
53272
|
+
className: "flex w-full items-center justify-between px-4 py-3 text-left transition-colors hover:bg-muted/30",
|
|
53273
|
+
children: [
|
|
53274
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
53275
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex size-4 items-center justify-center text-emerald-500", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "10", height: "10", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10 3L4.5 8.5L2 6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) }),
|
|
53276
|
+
/* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[12px] text-muted-foreground", children: [
|
|
53277
|
+
"Used ",
|
|
53278
|
+
toolStatuses.length,
|
|
53279
|
+
" ",
|
|
53280
|
+
toolStatuses.length === 1 ? "tool" : "tools"
|
|
53281
|
+
] })
|
|
53282
|
+
] }),
|
|
53283
|
+
showDetails ? /* @__PURE__ */ jsxRuntime.jsx(ChevronDown, { className: "size-3.5 text-muted-foreground/70" }) : /* @__PURE__ */ jsxRuntime.jsx(ChevronRight, { className: "size-3.5 text-muted-foreground/70" })
|
|
53284
|
+
]
|
|
53285
|
+
}
|
|
53286
|
+
),
|
|
53287
|
+
showDetails && detailsPanel
|
|
53288
|
+
] });
|
|
53289
|
+
}
|
|
53290
|
+
if (isComplete) return null;
|
|
53291
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
53292
|
+
"section",
|
|
53293
|
+
{
|
|
53294
|
+
"aria-busy": isRunning ? "true" : "false",
|
|
53295
|
+
"aria-describedby": "aui-sg-status",
|
|
53296
|
+
className: cn(
|
|
53297
|
+
"my-3 overflow-hidden rounded-2xl border transition-colors duration-200",
|
|
53298
|
+
isError ? "border-destructive/30 bg-destructive/5" : "border-border/70 bg-muted/10"
|
|
53299
|
+
),
|
|
53300
|
+
children: [
|
|
53301
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 pt-4 pb-2", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
53302
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-[13px] font-semibold text-foreground", children: isError ? "Something went wrong" : "Athena is working" }),
|
|
53303
|
+
isRunning && !isError && /* @__PURE__ */ jsxRuntime.jsx(PulsingDots, {})
|
|
53304
|
+
] }) }) }),
|
|
53305
|
+
isRunning && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 pb-1", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-[2px] w-full overflow-hidden rounded-full bg-muted/40", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "h-full w-1/3 rounded-full bg-gradient-to-r from-blue-400 to-indigo-400 animate-[aui-sg-shimmer-bar_1.5s_ease-in-out_infinite]" }) }) }),
|
|
53306
|
+
/* @__PURE__ */ jsxRuntime.jsx("output", { id: "aui-sg-status", "aria-live": "polite", "aria-atomic": "true", className: "sr-only", children: latestStatusLine }),
|
|
53307
|
+
hasToolCalls && /* @__PURE__ */ jsxRuntime.jsxs("ul", { className: "space-y-1 px-4 pt-1.5 pb-1", "aria-label": "Work status updates", children: [
|
|
53308
|
+
hiddenCount > 0 && /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "pl-[22px] text-[11px] text-muted-foreground/70", children: [
|
|
53309
|
+
hiddenCount,
|
|
53310
|
+
" earlier ",
|
|
53311
|
+
hiddenCount === 1 ? "step" : "steps"
|
|
53312
|
+
] }),
|
|
53313
|
+
visibleStatuses.map((s, i) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex items-center gap-2 text-[12px]", children: [
|
|
53314
|
+
s.isComplete ? /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex size-3.5 items-center justify-center text-emerald-500", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "10", height: "10", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M10 3L4.5 8.5L2 6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) }) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex size-3.5 items-center justify-center", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "size-1.5 animate-pulse rounded-full bg-blue-500" }) }),
|
|
53315
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: cn("leading-relaxed", s.isComplete ? "text-muted-foreground/70" : "text-foreground/80"), children: s.label })
|
|
53316
|
+
] }, `${s.toolName}-${i}`))
|
|
53317
|
+
] }),
|
|
53318
|
+
!hasToolCalls && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 pt-1 pb-2", children: /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shimmer text-[12px] text-muted-foreground", children: "Planning approach..." }) }),
|
|
53319
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-4 pb-3 pt-0.5", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
53320
|
+
"button",
|
|
53321
|
+
{
|
|
53322
|
+
type: "button",
|
|
53323
|
+
onClick: handleToggleDetails,
|
|
53324
|
+
"aria-expanded": showDetails,
|
|
53325
|
+
className: "flex items-center gap-1 text-[11px] font-medium text-muted-foreground transition-colors hover:text-foreground",
|
|
53326
|
+
children: [
|
|
53327
|
+
showDetails ? /* @__PURE__ */ jsxRuntime.jsx(ChevronDown, { className: "size-3" }) : /* @__PURE__ */ jsxRuntime.jsx(ChevronRight, { className: "size-3" }),
|
|
53328
|
+
showDetails ? "Hide details" : "Show details"
|
|
53329
|
+
]
|
|
53330
|
+
}
|
|
53331
|
+
) }),
|
|
53332
|
+
showDetails && detailsPanel
|
|
53333
|
+
]
|
|
53334
|
+
}
|
|
53335
|
+
);
|
|
53336
|
+
});
|
|
52725
53337
|
const falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
|
|
52726
53338
|
const cx = clsx;
|
|
52727
53339
|
const cva = (base2, config2) => (props) => {
|
|
@@ -53067,8 +53679,12 @@ const Toolkits = {
|
|
|
53067
53679
|
NOTEBOOK: "notebook_toolkit",
|
|
53068
53680
|
/** Presentation slide editing. */
|
|
53069
53681
|
PRESENTATION: "presentation_toolkit",
|
|
53682
|
+
/** Presentation slide editing (OnlyOffice, deprecated). */
|
|
53683
|
+
PRESENTATION_ONLYOFFICE: "presentation_onlyoffice_toolkit",
|
|
53070
53684
|
/** PowerPoint presentation creation from templates. */
|
|
53071
53685
|
POWERPOINT: "powerpoint_deck_toolkit",
|
|
53686
|
+
/** PowerPoint presentation creation from templates (pptx-studio). */
|
|
53687
|
+
PRESENTATION_PPTX_STUDIO: "presentation_pptx_studio_toolkit",
|
|
53072
53688
|
/** Workspace file management (Olympus Drive). */
|
|
53073
53689
|
DRIVE: "olympus_drive_toolkit",
|
|
53074
53690
|
/** Python code execution. */
|
|
@@ -53173,11 +53789,21 @@ const TOOLKIT_DISPLAY_INFO = {
|
|
|
53173
53789
|
description: "Edit presentation slides.",
|
|
53174
53790
|
icon: "Presentation"
|
|
53175
53791
|
},
|
|
53792
|
+
[Toolkits.PRESENTATION_ONLYOFFICE]: {
|
|
53793
|
+
name: "Presentation v0 (deprecated)",
|
|
53794
|
+
description: "Edit presentation slides (OnlyOffice, deprecated).",
|
|
53795
|
+
icon: "Presentation"
|
|
53796
|
+
},
|
|
53176
53797
|
[Toolkits.POWERPOINT]: {
|
|
53177
53798
|
name: "PowerPoint",
|
|
53178
53799
|
description: "Create PowerPoint decks from templates.",
|
|
53179
53800
|
icon: "Presentation"
|
|
53180
53801
|
},
|
|
53802
|
+
[Toolkits.PRESENTATION_PPTX_STUDIO]: {
|
|
53803
|
+
name: "Presentation",
|
|
53804
|
+
description: "Create PowerPoint presentations from templates (pptx-studio).",
|
|
53805
|
+
icon: "Presentation"
|
|
53806
|
+
},
|
|
53181
53807
|
[Toolkits.DRIVE]: {
|
|
53182
53808
|
name: "Olympus Drive",
|
|
53183
53809
|
description: "Find and manage workspace files.",
|
|
@@ -53648,6 +54274,17 @@ const AthenaAssistantMessageEmpty = ({ status }) => {
|
|
|
53648
54274
|
if ((status == null ? void 0 : status.type) !== "running") return null;
|
|
53649
54275
|
return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "shimmer text-[13px] text-muted-foreground", children: "Thinking..." });
|
|
53650
54276
|
};
|
|
54277
|
+
const AthenaMessageEmptyIndicator = ({
|
|
54278
|
+
EmptyComponent: EmptyComponent2
|
|
54279
|
+
}) => {
|
|
54280
|
+
const hasParts = react$1.useAuiState((s) => s.message.parts.length > 0);
|
|
54281
|
+
const isRunning = react$1.useAuiState((s) => {
|
|
54282
|
+
var _a2;
|
|
54283
|
+
return ((_a2 = s.message.status) == null ? void 0 : _a2.type) === "running";
|
|
54284
|
+
});
|
|
54285
|
+
if (hasParts || !isRunning) return null;
|
|
54286
|
+
return /* @__PURE__ */ jsxRuntime.jsx(EmptyComponent2, { status: { type: "running" } });
|
|
54287
|
+
};
|
|
53651
54288
|
const AthenaReasoningPart = ({
|
|
53652
54289
|
text: text2,
|
|
53653
54290
|
status,
|
|
@@ -53723,7 +54360,6 @@ const AthenaReasoningPart = ({
|
|
|
53723
54360
|
}
|
|
53724
54361
|
);
|
|
53725
54362
|
};
|
|
53726
|
-
const groupAdjacentToolCalls = (part) => part.type === "tool-call" ? ["group-tool"] : null;
|
|
53727
54363
|
const noToolGrouping = () => null;
|
|
53728
54364
|
const AthenaAssistantMessage = ({
|
|
53729
54365
|
toolUIs,
|
|
@@ -53760,31 +54396,42 @@ const AthenaAssistantMessage = ({
|
|
|
53760
54396
|
"data-role": "assistant",
|
|
53761
54397
|
children: [
|
|
53762
54398
|
/* @__PURE__ */ jsxRuntime.jsx(AthenaReasoningTextComponentContext.Provider, { value: TextComponent, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "aui-assistant-message-content wrap-break-word px-2 text-foreground leading-relaxed", children: [
|
|
53763
|
-
/* @__PURE__ */ jsxRuntime.jsx(NestedPtcComponentsProvider, { components: nestedPtcComponents, children: /* @__PURE__ */ jsxRuntime.
|
|
53764
|
-
|
|
53765
|
-
|
|
53766
|
-
|
|
53767
|
-
|
|
53768
|
-
|
|
53769
|
-
|
|
53770
|
-
const toolProps = part;
|
|
53771
|
-
return ToolUI ? /* @__PURE__ */ jsxRuntime.jsx(ToolUI, { ...toolProps }) : /* @__PURE__ */ jsxRuntime.jsx(ToolFallback, { ...toolProps });
|
|
53772
|
-
}
|
|
53773
|
-
case "reasoning": {
|
|
53774
|
-
const ReasoningRenderer = effectiveReasoningComponent;
|
|
53775
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ReasoningRenderer, { ...part });
|
|
54399
|
+
/* @__PURE__ */ jsxRuntime.jsx(NestedPtcComponentsProvider, { components: nestedPtcComponents, children: groupToolCalls ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col space-y-2", children: [
|
|
54400
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
54401
|
+
SuperGroupingCard,
|
|
54402
|
+
{
|
|
54403
|
+
toolUIs: toolUIsWithNestedMessages,
|
|
54404
|
+
TextComponent,
|
|
54405
|
+
ReasoningComponent: effectiveReasoningComponent
|
|
53776
54406
|
}
|
|
53777
|
-
|
|
53778
|
-
|
|
53779
|
-
|
|
53780
|
-
|
|
54407
|
+
),
|
|
54408
|
+
/* @__PURE__ */ jsxRuntime.jsx(SuperGroupingFinalText, { TextComponent })
|
|
54409
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
54410
|
+
/* @__PURE__ */ jsxRuntime.jsx(AthenaMessageEmptyIndicator, { EmptyComponent: EmptyComponent2 }),
|
|
54411
|
+
/* @__PURE__ */ jsxRuntime.jsx(react$1.MessagePrimitive.GroupedParts, { groupBy: noToolGrouping, children: ({ part }) => {
|
|
54412
|
+
var _a2;
|
|
54413
|
+
switch (part.type) {
|
|
54414
|
+
case "tool-call": {
|
|
54415
|
+
const ToolUI = toolUIsWithNestedMessages[part.toolName];
|
|
54416
|
+
const toolProps = part;
|
|
54417
|
+
return ToolUI ? /* @__PURE__ */ jsxRuntime.jsx(ToolUI, { ...toolProps }) : /* @__PURE__ */ jsxRuntime.jsx(ToolFallback, { ...toolProps });
|
|
54418
|
+
}
|
|
54419
|
+
case "reasoning": {
|
|
54420
|
+
const ReasoningRenderer = effectiveReasoningComponent;
|
|
54421
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ReasoningRenderer, { ...part });
|
|
53781
54422
|
}
|
|
53782
|
-
|
|
54423
|
+
case "text": {
|
|
54424
|
+
const textPart = part;
|
|
54425
|
+
if (textPart.text === "" && ((_a2 = textPart.status) == null ? void 0 : _a2.type) === "running") {
|
|
54426
|
+
return /* @__PURE__ */ jsxRuntime.jsx(EmptyComponent2, { status: textPart.status });
|
|
54427
|
+
}
|
|
54428
|
+
return /* @__PURE__ */ jsxRuntime.jsx(TextComponent, { ...textPart });
|
|
54429
|
+
}
|
|
54430
|
+
default:
|
|
54431
|
+
return null;
|
|
53783
54432
|
}
|
|
53784
|
-
|
|
53785
|
-
|
|
53786
|
-
}
|
|
53787
|
-
} }) }),
|
|
54433
|
+
} })
|
|
54434
|
+
] }) }),
|
|
53788
54435
|
/* @__PURE__ */ jsxRuntime.jsx(MessageError, {})
|
|
53789
54436
|
] }) }),
|
|
53790
54437
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "aui-assistant-message-footer mt-1 ml-2 flex", children: /* @__PURE__ */ jsxRuntime.jsx(ActionBarComponent, {}) })
|
|
@@ -53792,38 +54439,6 @@ const AthenaAssistantMessage = ({
|
|
|
53792
54439
|
}
|
|
53793
54440
|
);
|
|
53794
54441
|
};
|
|
53795
|
-
const AthenaToolGroup = ({ children, count: count2 }) => {
|
|
53796
|
-
const [expanded, setExpanded] = React.useState(false);
|
|
53797
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "my-3 w-full overflow-hidden rounded-xl border border-border/60 bg-background shadow-sm", children: [
|
|
53798
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
53799
|
-
"button",
|
|
53800
|
-
{
|
|
53801
|
-
type: "button",
|
|
53802
|
-
onClick: () => setExpanded((v) => !v),
|
|
53803
|
-
className: "flex w-full items-center gap-3 px-4 py-3 text-left transition-colors hover:bg-muted/20",
|
|
53804
|
-
"aria-expanded": expanded,
|
|
53805
|
-
children: [
|
|
53806
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted/60 text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(Layers, { className: "size-4" }) }),
|
|
53807
|
-
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-[13px] font-medium text-foreground", children: [
|
|
53808
|
-
count2,
|
|
53809
|
-
" tool ",
|
|
53810
|
-
count2 === 1 ? "call" : "calls"
|
|
53811
|
-
] }) }),
|
|
53812
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
53813
|
-
ChevronDown,
|
|
53814
|
-
{
|
|
53815
|
-
className: cn(
|
|
53816
|
-
"size-4 shrink-0 text-muted-foreground transition-transform duration-200",
|
|
53817
|
-
!expanded && "-rotate-90"
|
|
53818
|
-
)
|
|
53819
|
-
}
|
|
53820
|
-
)
|
|
53821
|
-
]
|
|
53822
|
-
}
|
|
53823
|
-
),
|
|
53824
|
-
expanded && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t border-border/40 bg-muted/5 px-3 pt-1 pb-2 [&>*]:my-2", children })
|
|
53825
|
-
] });
|
|
53826
|
-
};
|
|
53827
54442
|
const AthenaAssistantActionBar = ({ className }) => {
|
|
53828
54443
|
const threadId = useAthenaThreadId();
|
|
53829
54444
|
const { appUrl } = useAthenaConfig();
|