@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.js CHANGED
@@ -1137,15 +1137,27 @@ const createConfigUtils = (config2) => ({
1137
1137
  cache: createLruCache(config2.cacheSize),
1138
1138
  parseClassName: createParseClassName(config2),
1139
1139
  sortModifiers: createSortModifiers(config2),
1140
+ postfixLookupClassGroupIds: createPostfixLookupClassGroupIds(config2),
1140
1141
  ...createClassGroupUtils(config2)
1141
1142
  });
1143
+ const createPostfixLookupClassGroupIds = (config2) => {
1144
+ const lookup = /* @__PURE__ */ Object.create(null);
1145
+ const classGroupIds = config2.postfixLookupClassGroups;
1146
+ if (classGroupIds) {
1147
+ for (let i = 0; i < classGroupIds.length; i++) {
1148
+ lookup[classGroupIds[i]] = true;
1149
+ }
1150
+ }
1151
+ return lookup;
1152
+ };
1142
1153
  const SPLIT_CLASSES_REGEX = /\s+/;
1143
1154
  const mergeClassList = (classList, configUtils) => {
1144
1155
  const {
1145
1156
  parseClassName,
1146
1157
  getClassGroupId,
1147
1158
  getConflictingClassGroupIds,
1148
- sortModifiers
1159
+ sortModifiers,
1160
+ postfixLookupClassGroupIds
1149
1161
  } = configUtils;
1150
1162
  const classGroupsInConflict = [];
1151
1163
  const classNames = classList.trim().split(SPLIT_CLASSES_REGEX);
@@ -1164,7 +1176,18 @@ const mergeClassList = (classList, configUtils) => {
1164
1176
  continue;
1165
1177
  }
1166
1178
  let hasPostfixModifier = !!maybePostfixModifierPosition;
1167
- let classGroupId = getClassGroupId(hasPostfixModifier ? baseClassName.substring(0, maybePostfixModifierPosition) : baseClassName);
1179
+ let classGroupId;
1180
+ if (hasPostfixModifier) {
1181
+ const baseClassNameWithoutPostfix = baseClassName.substring(0, maybePostfixModifierPosition);
1182
+ classGroupId = getClassGroupId(baseClassNameWithoutPostfix);
1183
+ const classGroupIdWithPostfix = classGroupId && postfixLookupClassGroupIds[classGroupId] ? getClassGroupId(baseClassName) : void 0;
1184
+ if (classGroupIdWithPostfix && classGroupIdWithPostfix !== classGroupId) {
1185
+ classGroupId = classGroupIdWithPostfix;
1186
+ hasPostfixModifier = false;
1187
+ }
1188
+ } else {
1189
+ classGroupId = getClassGroupId(baseClassName);
1190
+ }
1168
1191
  if (!classGroupId) {
1169
1192
  if (!hasPostfixModifier) {
1170
1193
  result = originalClassName + (result.length > 0 ? " " + result : result);
@@ -1279,6 +1302,7 @@ const isNever = () => false;
1279
1302
  const isShadow = (value) => shadowRegex.test(value);
1280
1303
  const isImage = (value) => imageRegex.test(value);
1281
1304
  const isAnyNonArbitrary = (value) => !isArbitraryValue(value) && !isArbitraryVariable(value);
1305
+ 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));
1282
1306
  const isArbitrarySize = (value) => getIsArbitraryValue(value, isLabelSize, isNever);
1283
1307
  const isArbitraryValue = (value) => arbitraryValueRegex.test(value);
1284
1308
  const isArbitraryLength = (value) => getIsArbitraryValue(value, isLabelLength, isLengthOnly);
@@ -1457,6 +1481,18 @@ const getDefaultConfig = () => {
1457
1481
  * @deprecated since Tailwind CSS v4.0.0
1458
1482
  */
1459
1483
  container: ["container"],
1484
+ /**
1485
+ * Container Type
1486
+ * @see https://tailwindcss.com/docs/responsive-design#container-queries
1487
+ */
1488
+ "container-type": [{
1489
+ "@container": ["", "normal", "size", isArbitraryVariable, isArbitraryValue]
1490
+ }],
1491
+ /**
1492
+ * Container Name
1493
+ * @see https://tailwindcss.com/docs/responsive-design#named-containers
1494
+ */
1495
+ "container-named": [isNamedContainerQuery],
1460
1496
  /**
1461
1497
  * Columns
1462
1498
  * @see https://tailwindcss.com/docs/columns
@@ -2400,6 +2436,13 @@ const getDefaultConfig = () => {
2400
2436
  indent: [{
2401
2437
  indent: scaleUnambiguousSpacing()
2402
2438
  }],
2439
+ /**
2440
+ * Tab Size
2441
+ * @see https://tailwindcss.com/docs/tab-size
2442
+ */
2443
+ "tab-size": [{
2444
+ tab: [isInteger, isArbitraryVariable, isArbitraryValue]
2445
+ }],
2403
2446
  /**
2404
2447
  * Vertical Alignment
2405
2448
  * @see https://tailwindcss.com/docs/vertical-align
@@ -3625,6 +3668,13 @@ const getDefaultConfig = () => {
3625
3668
  * @see https://tailwindcss.com/docs/translate
3626
3669
  */
3627
3670
  "translate-none": ["translate-none"],
3671
+ /**
3672
+ * Zoom
3673
+ * @see https://tailwindcss.com/docs/zoom
3674
+ */
3675
+ zoom: [{
3676
+ zoom: [isInteger, isArbitraryVariable, isArbitraryValue]
3677
+ }],
3628
3678
  // ---------------------
3629
3679
  // --- Interactivity ---
3630
3680
  // ---------------------
@@ -3691,6 +3741,34 @@ const getDefaultConfig = () => {
3691
3741
  "scroll-behavior": [{
3692
3742
  scroll: ["auto", "smooth"]
3693
3743
  }],
3744
+ /**
3745
+ * Scrollbar Thumb Color
3746
+ * @see https://tailwindcss.com/docs/scrollbar-color
3747
+ */
3748
+ "scrollbar-thumb-color": [{
3749
+ "scrollbar-thumb": scaleColor()
3750
+ }],
3751
+ /**
3752
+ * Scrollbar Track Color
3753
+ * @see https://tailwindcss.com/docs/scrollbar-color
3754
+ */
3755
+ "scrollbar-track-color": [{
3756
+ "scrollbar-track": scaleColor()
3757
+ }],
3758
+ /**
3759
+ * Scrollbar Gutter
3760
+ * @see https://tailwindcss.com/docs/scrollbar-gutter
3761
+ */
3762
+ "scrollbar-gutter": [{
3763
+ "scrollbar-gutter": ["auto", "stable", "both"]
3764
+ }],
3765
+ /**
3766
+ * Scrollbar Width
3767
+ * @see https://tailwindcss.com/docs/scrollbar-width
3768
+ */
3769
+ "scrollbar-w": [{
3770
+ scrollbar: ["auto", "thin", "none"]
3771
+ }],
3694
3772
  /**
3695
3773
  * Scroll Margin
3696
3774
  * @see https://tailwindcss.com/docs/scroll-margin
@@ -3949,6 +4027,7 @@ const getDefaultConfig = () => {
3949
4027
  }]
3950
4028
  },
3951
4029
  conflictingClassGroups: {
4030
+ "container-named": ["container-type"],
3952
4031
  overflow: ["overflow-x", "overflow-y"],
3953
4032
  overscroll: ["overscroll-x", "overscroll-y"],
3954
4033
  inset: ["inset-x", "inset-y", "inset-bs", "inset-be", "start", "end", "top", "right", "bottom", "left"],
@@ -4001,6 +4080,7 @@ const getDefaultConfig = () => {
4001
4080
  conflictingClassGroupModifiers: {
4002
4081
  "font-size": ["leading"]
4003
4082
  },
4083
+ postfixLookupClassGroups: ["container-type"],
4004
4084
  orderSensitiveModifiers: ["*", "**", "after", "backdrop", "before", "details-content", "file", "first-letter", "first-line", "marker", "placeholder", "selection"]
4005
4085
  };
4006
4086
  };
@@ -13647,6 +13727,7 @@ const DEFAULT_AUTO_OPEN_TOOLS = {
13647
13727
  create_document_from_markdown: openOnResult("document"),
13648
13728
  create_new_sheet: openOnResult("spreadsheet"),
13649
13729
  create_powerpoint_deck: openOnResult("presentation"),
13730
+ create_presentation_pptx_studio: openOnResult("presentation"),
13650
13731
  create_new_notebook: openOnResult("notebook"),
13651
13732
  // Open / read existing assets
13652
13733
  open_asset_in_workspace: openFromArgs("unknown"),
@@ -45016,51 +45097,51 @@ const createLucideIcon = (iconName, iconNode) => {
45016
45097
  * This source code is licensed under the ISC license.
45017
45098
  * See the LICENSE file in the root directory of this source tree.
45018
45099
  */
45019
- const __iconNode$18 = [
45100
+ const __iconNode$19 = [
45020
45101
  ["path", { d: "M12 5v14", key: "s699le" }],
45021
45102
  ["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
45022
45103
  ];
45023
- const ArrowDown = createLucideIcon("arrow-down", __iconNode$18);
45104
+ const ArrowDown = createLucideIcon("arrow-down", __iconNode$19);
45024
45105
  /**
45025
45106
  * @license lucide-react v0.575.0 - ISC
45026
45107
  *
45027
45108
  * This source code is licensed under the ISC license.
45028
45109
  * See the LICENSE file in the root directory of this source tree.
45029
45110
  */
45030
- const __iconNode$17 = [
45111
+ const __iconNode$18 = [
45031
45112
  ["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
45032
45113
  ["path", { d: "M19 12H5", key: "x3x0zl" }]
45033
45114
  ];
45034
- const ArrowLeft = createLucideIcon("arrow-left", __iconNode$17);
45115
+ const ArrowLeft = createLucideIcon("arrow-left", __iconNode$18);
45035
45116
  /**
45036
45117
  * @license lucide-react v0.575.0 - ISC
45037
45118
  *
45038
45119
  * This source code is licensed under the ISC license.
45039
45120
  * See the LICENSE file in the root directory of this source tree.
45040
45121
  */
45041
- const __iconNode$16 = [
45122
+ const __iconNode$17 = [
45042
45123
  ["path", { d: "M5 12h14", key: "1ays0h" }],
45043
45124
  ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
45044
45125
  ];
45045
- const ArrowRight = createLucideIcon("arrow-right", __iconNode$16);
45126
+ const ArrowRight = createLucideIcon("arrow-right", __iconNode$17);
45046
45127
  /**
45047
45128
  * @license lucide-react v0.575.0 - ISC
45048
45129
  *
45049
45130
  * This source code is licensed under the ISC license.
45050
45131
  * See the LICENSE file in the root directory of this source tree.
45051
45132
  */
45052
- const __iconNode$15 = [
45133
+ const __iconNode$16 = [
45053
45134
  ["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
45054
45135
  ["path", { d: "M12 19V5", key: "x0mq9r" }]
45055
45136
  ];
45056
- const ArrowUp = createLucideIcon("arrow-up", __iconNode$15);
45137
+ const ArrowUp = createLucideIcon("arrow-up", __iconNode$16);
45057
45138
  /**
45058
45139
  * @license lucide-react v0.575.0 - ISC
45059
45140
  *
45060
45141
  * This source code is licensed under the ISC license.
45061
45142
  * See the LICENSE file in the root directory of this source tree.
45062
45143
  */
45063
- const __iconNode$14 = [
45144
+ const __iconNode$15 = [
45064
45145
  ["path", { d: "M12 7v14", key: "1akyts" }],
45065
45146
  [
45066
45147
  "path",
@@ -45070,14 +45151,14 @@ const __iconNode$14 = [
45070
45151
  }
45071
45152
  ]
45072
45153
  ];
45073
- const BookOpen = createLucideIcon("book-open", __iconNode$14);
45154
+ const BookOpen = createLucideIcon("book-open", __iconNode$15);
45074
45155
  /**
45075
45156
  * @license lucide-react v0.575.0 - ISC
45076
45157
  *
45077
45158
  * This source code is licensed under the ISC license.
45078
45159
  * See the LICENSE file in the root directory of this source tree.
45079
45160
  */
45080
- const __iconNode$13 = [
45161
+ const __iconNode$14 = [
45081
45162
  [
45082
45163
  "path",
45083
45164
  {
@@ -45109,14 +45190,14 @@ const __iconNode$13 = [
45109
45190
  ["path", { d: "m12 8 4.74-2.85", key: "3rx089" }],
45110
45191
  ["path", { d: "M12 13.5V8", key: "1io7kd" }]
45111
45192
  ];
45112
- const Boxes = createLucideIcon("boxes", __iconNode$13);
45193
+ const Boxes = createLucideIcon("boxes", __iconNode$14);
45113
45194
  /**
45114
45195
  * @license lucide-react v0.575.0 - ISC
45115
45196
  *
45116
45197
  * This source code is licensed under the ISC license.
45117
45198
  * See the LICENSE file in the root directory of this source tree.
45118
45199
  */
45119
- const __iconNode$12 = [
45200
+ const __iconNode$13 = [
45120
45201
  ["path", { d: "M12 18V5", key: "adv99a" }],
45121
45202
  ["path", { d: "M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4", key: "1e3is1" }],
45122
45203
  ["path", { d: "M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5", key: "1gqd8o" }],
@@ -45126,27 +45207,27 @@ const __iconNode$12 = [
45126
45207
  ["path", { d: "M6 18a4 4 0 0 1-2-7.464", key: "k1g0md" }],
45127
45208
  ["path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77", key: "q97ue3" }]
45128
45209
  ];
45129
- const Brain = createLucideIcon("brain", __iconNode$12);
45210
+ const Brain = createLucideIcon("brain", __iconNode$13);
45130
45211
  /**
45131
45212
  * @license lucide-react v0.575.0 - ISC
45132
45213
  *
45133
45214
  * This source code is licensed under the ISC license.
45134
45215
  * See the LICENSE file in the root directory of this source tree.
45135
45216
  */
45136
- const __iconNode$11 = [
45217
+ const __iconNode$12 = [
45137
45218
  ["path", { d: "M12 12h.01", key: "1mp3jc" }],
45138
45219
  ["path", { d: "M16 6V4a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v2", key: "1ksdt3" }],
45139
45220
  ["path", { d: "M22 13a18.15 18.15 0 0 1-20 0", key: "12hx5q" }],
45140
45221
  ["rect", { width: "20", height: "14", x: "2", y: "6", rx: "2", key: "i6l2r4" }]
45141
45222
  ];
45142
- const BriefcaseBusiness = createLucideIcon("briefcase-business", __iconNode$11);
45223
+ const BriefcaseBusiness = createLucideIcon("briefcase-business", __iconNode$12);
45143
45224
  /**
45144
45225
  * @license lucide-react v0.575.0 - ISC
45145
45226
  *
45146
45227
  * This source code is licensed under the ISC license.
45147
45228
  * See the LICENSE file in the root directory of this source tree.
45148
45229
  */
45149
- const __iconNode$10 = [
45230
+ const __iconNode$11 = [
45150
45231
  [
45151
45232
  "path",
45152
45233
  { 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" }
@@ -45161,27 +45242,27 @@ const __iconNode$10 = [
45161
45242
  ],
45162
45243
  ["path", { d: "M7 5V3", key: "1t1388" }]
45163
45244
  ];
45164
- const Cable = createLucideIcon("cable", __iconNode$10);
45245
+ const Cable = createLucideIcon("cable", __iconNode$11);
45165
45246
  /**
45166
45247
  * @license lucide-react v0.575.0 - ISC
45167
45248
  *
45168
45249
  * This source code is licensed under the ISC license.
45169
45250
  * See the LICENSE file in the root directory of this source tree.
45170
45251
  */
45171
- const __iconNode$$ = [
45252
+ const __iconNode$10 = [
45172
45253
  ["path", { d: "M8 2v4", key: "1cmpym" }],
45173
45254
  ["path", { d: "M16 2v4", key: "4m81vk" }],
45174
45255
  ["rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", key: "1hopcy" }],
45175
45256
  ["path", { d: "M3 10h18", key: "8toen8" }]
45176
45257
  ];
45177
- const Calendar = createLucideIcon("calendar", __iconNode$$);
45258
+ const Calendar = createLucideIcon("calendar", __iconNode$10);
45178
45259
  /**
45179
45260
  * @license lucide-react v0.575.0 - ISC
45180
45261
  *
45181
45262
  * This source code is licensed under the ISC license.
45182
45263
  * See the LICENSE file in the root directory of this source tree.
45183
45264
  */
45184
- const __iconNode$_ = [
45265
+ const __iconNode$$ = [
45185
45266
  [
45186
45267
  "path",
45187
45268
  {
@@ -45191,57 +45272,65 @@ const __iconNode$_ = [
45191
45272
  ],
45192
45273
  ["circle", { cx: "12", cy: "13", r: "3", key: "1vg3eu" }]
45193
45274
  ];
45194
- const Camera = createLucideIcon("camera", __iconNode$_);
45275
+ const Camera = createLucideIcon("camera", __iconNode$$);
45195
45276
  /**
45196
45277
  * @license lucide-react v0.575.0 - ISC
45197
45278
  *
45198
45279
  * This source code is licensed under the ISC license.
45199
45280
  * See the LICENSE file in the root directory of this source tree.
45200
45281
  */
45201
- const __iconNode$Z = [
45282
+ const __iconNode$_ = [
45202
45283
  ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
45203
45284
  ["path", { d: "M7 16h8", key: "srdodz" }],
45204
45285
  ["path", { d: "M7 11h12", key: "127s9w" }],
45205
45286
  ["path", { d: "M7 6h3", key: "w9rmul" }]
45206
45287
  ];
45207
- const ChartBar = createLucideIcon("chart-bar", __iconNode$Z);
45288
+ const ChartBar = createLucideIcon("chart-bar", __iconNode$_);
45208
45289
  /**
45209
45290
  * @license lucide-react v0.575.0 - ISC
45210
45291
  *
45211
45292
  * This source code is licensed under the ISC license.
45212
45293
  * See the LICENSE file in the root directory of this source tree.
45213
45294
  */
45214
- const __iconNode$Y = [
45295
+ const __iconNode$Z = [
45215
45296
  ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
45216
45297
  ["path", { d: "M18 17V9", key: "2bz60n" }],
45217
45298
  ["path", { d: "M13 17V5", key: "1frdt8" }],
45218
45299
  ["path", { d: "M8 17v-3", key: "17ska0" }]
45219
45300
  ];
45220
- const ChartColumn = createLucideIcon("chart-column", __iconNode$Y);
45301
+ const ChartColumn = createLucideIcon("chart-column", __iconNode$Z);
45302
+ /**
45303
+ * @license lucide-react v0.575.0 - ISC
45304
+ *
45305
+ * This source code is licensed under the ISC license.
45306
+ * See the LICENSE file in the root directory of this source tree.
45307
+ */
45308
+ const __iconNode$Y = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
45309
+ const Check = createLucideIcon("check", __iconNode$Y);
45221
45310
  /**
45222
45311
  * @license lucide-react v0.575.0 - ISC
45223
45312
  *
45224
45313
  * This source code is licensed under the ISC license.
45225
45314
  * See the LICENSE file in the root directory of this source tree.
45226
45315
  */
45227
- const __iconNode$X = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
45228
- const Check = createLucideIcon("check", __iconNode$X);
45316
+ const __iconNode$X = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
45317
+ const ChevronDown = createLucideIcon("chevron-down", __iconNode$X);
45229
45318
  /**
45230
45319
  * @license lucide-react v0.575.0 - ISC
45231
45320
  *
45232
45321
  * This source code is licensed under the ISC license.
45233
45322
  * See the LICENSE file in the root directory of this source tree.
45234
45323
  */
45235
- const __iconNode$W = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
45236
- const ChevronDown = createLucideIcon("chevron-down", __iconNode$W);
45324
+ const __iconNode$W = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
45325
+ const ChevronRight = createLucideIcon("chevron-right", __iconNode$W);
45237
45326
  /**
45238
45327
  * @license lucide-react v0.575.0 - ISC
45239
45328
  *
45240
45329
  * This source code is licensed under the ISC license.
45241
45330
  * See the LICENSE file in the root directory of this source tree.
45242
45331
  */
45243
- const __iconNode$V = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
45244
- const ChevronRight = createLucideIcon("chevron-right", __iconNode$V);
45332
+ const __iconNode$V = [["path", { d: "m18 15-6-6-6 6", key: "153udz" }]];
45333
+ const ChevronUp = createLucideIcon("chevron-up", __iconNode$V);
45245
45334
  /**
45246
45335
  * @license lucide-react v0.575.0 - ISC
45247
45336
  *
@@ -52523,6 +52612,51 @@ function normalizeContentResult(result) {
52523
52612
  }
52524
52613
  return [];
52525
52614
  }
52615
+ function useFreshPresignedUrl({
52616
+ s3Key,
52617
+ fallbackUrl
52618
+ }) {
52619
+ const [freshUrl, setFreshUrl] = useState(null);
52620
+ const config2 = useAthenaConfig();
52621
+ const configRef = useRef(config2);
52622
+ configRef.current = config2;
52623
+ useEffect(() => {
52624
+ setFreshUrl(null);
52625
+ if (!s3Key) return;
52626
+ let cancelled = false;
52627
+ (async () => {
52628
+ try {
52629
+ const { backendUrl, token, apiKey } = configRef.current;
52630
+ const baseUrl = backendUrl.replace(/\/api\/assistant-ui\/?$/, "");
52631
+ const url = `${baseUrl}/api/asset/fetch-attachment-presigned-url`;
52632
+ const headers = {
52633
+ "Content-Type": "application/json"
52634
+ };
52635
+ if (token) {
52636
+ headers["Authorization"] = `Bearer ${token}`;
52637
+ } else if (apiKey) {
52638
+ headers["X-API-KEY"] = apiKey;
52639
+ }
52640
+ const resp = await fetch(url, {
52641
+ method: "POST",
52642
+ headers,
52643
+ body: JSON.stringify({ s3_key: s3Key })
52644
+ });
52645
+ if (!cancelled && resp.ok) {
52646
+ const data = await resp.json();
52647
+ if (!cancelled && data.presigned_url) {
52648
+ setFreshUrl(data.presigned_url);
52649
+ }
52650
+ }
52651
+ } catch {
52652
+ }
52653
+ })();
52654
+ return () => {
52655
+ cancelled = true;
52656
+ };
52657
+ }, [s3Key]);
52658
+ return freshUrl ?? fallbackUrl;
52659
+ }
52526
52660
  function getSlideScreenshotResult(result) {
52527
52661
  let text2 = null;
52528
52662
  let imageUrl = null;
@@ -52562,10 +52696,11 @@ const CaptureSlideScreenshotToolUIImpl = ({
52562
52696
  const typedArgs = args;
52563
52697
  const assetId = getStringField(typedArgs, ["asset_id", "assetId"]);
52564
52698
  const slideNumber = getNumberField(typedArgs, ["slide_number", "slideNumber"]) ?? void 0;
52565
- const { text: text2, imageUrl, mediaType } = useMemo(
52699
+ const { text: text2, imageUrl, mediaType, s3Key } = useMemo(
52566
52700
  () => getSlideScreenshotResult(result),
52567
52701
  [result]
52568
52702
  );
52703
+ const freshImageUrl = useFreshPresignedUrl({ s3Key, fallbackUrl: imageUrl });
52569
52704
  const isRunning = (status == null ? void 0 : status.type) === "running";
52570
52705
  const isComplete = (status == null ? void 0 : status.type) === "complete" || !status;
52571
52706
  const isCancelled = (status == null ? void 0 : status.type) === "incomplete" && status.reason === "cancelled";
@@ -52597,11 +52732,11 @@ const CaptureSlideScreenshotToolUIImpl = ({
52597
52732
  result,
52598
52733
  error: errorMsg,
52599
52734
  children: [
52600
- isComplete && !isCancelled && imageUrl && /* @__PURE__ */ jsxs("div", { className: "border-t border-border/40 p-3", children: [
52735
+ isComplete && !isCancelled && freshImageUrl && /* @__PURE__ */ jsxs("div", { className: "border-t border-border/40 p-3", children: [
52601
52736
  /* @__PURE__ */ jsx("div", { className: "overflow-hidden rounded-lg border border-border/50 bg-muted/20", children: /* @__PURE__ */ jsx(
52602
52737
  "img",
52603
52738
  {
52604
- src: imageUrl,
52739
+ src: freshImageUrl,
52605
52740
  alt: slideNumber ? `Slide ${slideNumber} screenshot` : "Slide screenshot",
52606
52741
  className: "aspect-video w-full object-contain",
52607
52742
  loading: "lazy"
@@ -52622,10 +52757,10 @@ const CaptureSlideScreenshotToolUIImpl = ({
52622
52757
  ]
52623
52758
  }
52624
52759
  ),
52625
- imageUrl && /* @__PURE__ */ jsxs(
52760
+ freshImageUrl && /* @__PURE__ */ jsxs(
52626
52761
  "a",
52627
52762
  {
52628
- href: imageUrl,
52763
+ href: freshImageUrl,
52629
52764
  target: "_blank",
52630
52765
  rel: "noreferrer",
52631
52766
  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",
@@ -52655,6 +52790,7 @@ const TOOL_UI_REGISTRY = {
52655
52790
  create_document_from_markdown: CreateDocumentToolUI,
52656
52791
  create_new_sheet: CreateSheetToolUI,
52657
52792
  create_powerpoint_deck: CreatePresentationToolUI,
52793
+ create_presentation_pptx_studio: CreatePresentationToolUI,
52658
52794
  create_new_notebook: CreateNotebookToolUI,
52659
52795
  // Studio SDK nested PTC tools
52660
52796
  CreateWorkbook: StudioCreateWorkbookToolUI,
@@ -52682,6 +52818,482 @@ const TOOL_UI_REGISTRY = {
52682
52818
  run_database_sql: RunSqlToolUI,
52683
52819
  run_sql_query_tool: RunSqlToolUI
52684
52820
  };
52821
+ const TOOLKIT_THEMES = {
52822
+ Web: { color: "#7BCCFA" },
52823
+ Document: { color: "#4586F9" },
52824
+ "Document (Word)": { color: "#4586F9" },
52825
+ Notebook: { color: "#FFAB00" },
52826
+ Python: { color: "#00A76F" },
52827
+ Spreadsheet: { color: "#00A76F" },
52828
+ Email: { color: "#B584FF" },
52829
+ AOP: { color: "#336DFF" },
52830
+ App: { color: "#7336F5" },
52831
+ "Presentation (PowerPoint)": { color: "#F56B36" },
52832
+ Presentation: { color: "#F56B36" },
52833
+ "User Interface": { color: "#7336F5" },
52834
+ Canvas: { color: "#002542" },
52835
+ Computer: { color: "#3E0042" },
52836
+ Database: { color: "#7336F5" }
52837
+ };
52838
+ const DEFAULT_THEME = { color: "#919EAB" };
52839
+ const CollapsibleGroup = ({ groupKey, indices, children }) => {
52840
+ const isMessageRunning = useAuiState((s) => {
52841
+ var _a2;
52842
+ return ((_a2 = s.message.status) == null ? void 0 : _a2.type) === "running";
52843
+ });
52844
+ const [userOpened, setOpen] = useState();
52845
+ const open = userOpened ?? isMessageRunning;
52846
+ const toolCallCount = useAuiState((s) => {
52847
+ if (s.message.role !== "assistant") return 0;
52848
+ const parts = s.message.content;
52849
+ if (!parts) return 0;
52850
+ return indices.reduce((acc, idx) => {
52851
+ const part = parts[idx];
52852
+ return (part == null ? void 0 : part.type) === "tool-call" ? acc + 1 : acc;
52853
+ }, 0);
52854
+ });
52855
+ const theme = useMemo(
52856
+ () => groupKey ? TOOLKIT_THEMES[groupKey] ?? DEFAULT_THEME : DEFAULT_THEME,
52857
+ [groupKey]
52858
+ );
52859
+ if (!groupKey || indices.length <= 1) return /* @__PURE__ */ jsx(Fragment$1, { children });
52860
+ return /* @__PURE__ */ jsxs(
52861
+ "div",
52862
+ {
52863
+ className: "my-4 rounded-2xl border shadow-sm",
52864
+ style: {
52865
+ borderColor: `${theme.color}33`,
52866
+ background: `linear-gradient(to right, ${theme.color}0d, transparent, ${theme.color}0d)`
52867
+ },
52868
+ children: [
52869
+ /* @__PURE__ */ jsxs(
52870
+ "button",
52871
+ {
52872
+ type: "button",
52873
+ onClick: () => setOpen(!open),
52874
+ 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",
52875
+ "aria-expanded": open,
52876
+ children: [
52877
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 text-foreground/90", children: [
52878
+ /* @__PURE__ */ jsx(
52879
+ "span",
52880
+ {
52881
+ className: "inline-block size-2 rounded-full",
52882
+ style: { backgroundColor: theme.color },
52883
+ "aria-hidden": "true"
52884
+ }
52885
+ ),
52886
+ /* @__PURE__ */ jsxs("span", { className: "text-sm font-semibold", children: [
52887
+ isMessageRunning ? "Using " : "Used ",
52888
+ groupKey,
52889
+ " Toolkit"
52890
+ ] })
52891
+ ] }),
52892
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
52893
+ /* @__PURE__ */ jsxs("span", { className: "text-xs font-medium text-muted-foreground", children: [
52894
+ toolCallCount,
52895
+ " tool ",
52896
+ toolCallCount === 1 ? "call" : "calls"
52897
+ ] }),
52898
+ open ? /* @__PURE__ */ jsx(ChevronUp, { size: 16 }) : /* @__PURE__ */ jsx(ChevronDown, { size: 16 })
52899
+ ] })
52900
+ ]
52901
+ }
52902
+ ),
52903
+ /* @__PURE__ */ jsx(
52904
+ "div",
52905
+ {
52906
+ className: cn(
52907
+ "grid overflow-hidden border-t transition-[grid-template-rows] duration-200 ease-in-out",
52908
+ open ? "grid-rows-[1fr]" : "grid-rows-[0fr]"
52909
+ ),
52910
+ style: { borderColor: `${theme.color}33` },
52911
+ children: /* @__PURE__ */ jsx("div", { className: "overflow-hidden", children: /* @__PURE__ */ jsx("div", { className: "space-y-2 px-5 py-4", children }) })
52912
+ }
52913
+ )
52914
+ ]
52915
+ }
52916
+ );
52917
+ };
52918
+ const createToolBasedGroupingFunction = (getToolGroupKey) => (parts) => {
52919
+ const groups = [];
52920
+ let currentGroup = null;
52921
+ for (let idx = 0; idx < parts.length; idx++) {
52922
+ const part = parts[idx];
52923
+ if ((part == null ? void 0 : part.type) === "reasoning") {
52924
+ if (currentGroup) {
52925
+ currentGroup.indices.push(idx);
52926
+ } else {
52927
+ groups.push({ groupKey: void 0, indices: [idx] });
52928
+ }
52929
+ continue;
52930
+ }
52931
+ let key;
52932
+ if ((part == null ? void 0 : part.type) === "tool-call" && part.toolName) {
52933
+ key = getToolGroupKey(part.toolName);
52934
+ } else if ((part == null ? void 0 : part.type) === "text") {
52935
+ const prevKey = currentGroup == null ? void 0 : currentGroup.groupKey;
52936
+ let nextKey;
52937
+ for (let lookIdx = idx + 1; lookIdx < parts.length; lookIdx++) {
52938
+ const lookPart = parts[lookIdx];
52939
+ if ((lookPart == null ? void 0 : lookPart.type) === "reasoning" || (lookPart == null ? void 0 : lookPart.type) === "text") continue;
52940
+ if ((lookPart == null ? void 0 : lookPart.type) === "tool-call" && lookPart.toolName) {
52941
+ nextKey = getToolGroupKey(lookPart.toolName);
52942
+ }
52943
+ break;
52944
+ }
52945
+ if (prevKey && nextKey && prevKey === nextKey) {
52946
+ key = prevKey;
52947
+ }
52948
+ }
52949
+ if (currentGroup && currentGroup.groupKey === key) {
52950
+ currentGroup.indices.push(idx);
52951
+ } else {
52952
+ if (currentGroup) groups.push(currentGroup);
52953
+ currentGroup = { groupKey: key, indices: [idx] };
52954
+ }
52955
+ }
52956
+ if (currentGroup) groups.push(currentGroup);
52957
+ return groups;
52958
+ };
52959
+ const TOOL_STATUS_LABELS = {
52960
+ // Document tools
52961
+ read_asset: { running: "Reviewing asset content", complete: "Asset content reviewed" },
52962
+ read_full_asset: { running: "Reviewing asset content", complete: "Asset content reviewed" },
52963
+ create_new_document: { running: "Creating document", complete: "Created document" },
52964
+ create_document_from_markdown: { running: "Creating document", complete: "Created document" },
52965
+ append_markdown_to_athena_document: { running: "Updating document", complete: "Updated document" },
52966
+ replace_markdown_in_athena_document: { running: "Updating document", complete: "Updated document" },
52967
+ convert_athena_doc_to_pdf: { running: "Converting to PDF", complete: "Converted to PDF" },
52968
+ convert_to_pdf: { running: "Converting to PDF", complete: "Converted to PDF" },
52969
+ // Spreadsheet tools
52970
+ create_new_sheet: { running: "Creating spreadsheet", complete: "Created spreadsheet" },
52971
+ update_sheet_range: { running: "Updating spreadsheet", complete: "Updated spreadsheet" },
52972
+ format_sheet_range: { running: "Formatting spreadsheet", complete: "Formatted spreadsheet" },
52973
+ bulk_format_sheet_range: { running: "Formatting spreadsheet ranges", complete: "Formatted spreadsheet ranges" },
52974
+ create_table: { running: "Creating table", complete: "Created table" },
52975
+ update_table: { running: "Updating table", complete: "Updated table" },
52976
+ create_chart: { running: "Creating chart", complete: "Created chart" },
52977
+ update_chart: { running: "Updating chart", complete: "Updated chart" },
52978
+ // Web / search
52979
+ search: { running: "Searching the web", complete: "Web search complete" },
52980
+ browse: { running: "Reading webpage", complete: "Read webpage" },
52981
+ web_search: { running: "Searching the web", complete: "Web search complete" },
52982
+ search_web: { running: "Searching the web", complete: "Web search complete" },
52983
+ web_scrape: { running: "Reading webpage", complete: "Read webpage" },
52984
+ scrape_web: { running: "Reading webpage", complete: "Read webpage" },
52985
+ open_asset_in_workspace: { running: "Opening in workspace", complete: "Opened in workspace" },
52986
+ // Email / calendar
52987
+ create_email_draft: { running: "Drafting email", complete: "Email drafted" },
52988
+ send_email: { running: "Sending email", complete: "Email sent" },
52989
+ unified_email_create_draft: { running: "Drafting email", complete: "Email drafted" },
52990
+ unified_email_send: { running: "Sending email", complete: "Email sent" },
52991
+ unified_email_edit_draft: { running: "Editing email draft", complete: "Draft updated" },
52992
+ search_email: { running: "Searching email", complete: "Email search complete" },
52993
+ unified_email_search: { running: "Searching email", complete: "Email search complete" },
52994
+ // Python / code execution
52995
+ run_python: { running: "Running Python code", complete: "Python execution complete" },
52996
+ run_python_code: { running: "Running Python code", complete: "Python execution complete" },
52997
+ run_sql: { running: "Running database query", complete: "Query complete" },
52998
+ execute_sql: { running: "Running database query", complete: "Query complete" },
52999
+ run_database_sql: { running: "Running database query", complete: "Query complete" },
53000
+ run_sql_query_tool: { running: "Running database query", complete: "Query complete" },
53001
+ // Presentation
53002
+ create_powerpoint_deck: { running: "Creating presentation", complete: "Created presentation" },
53003
+ create_presentation_pptx_studio: { running: "Creating presentation", complete: "Created presentation" },
53004
+ execute_presentation_code: { running: "Updating presentation", complete: "Updated presentation" },
53005
+ capture_slide_screenshot: { running: "Capturing slide", complete: "Slide captured" },
53006
+ // Notebook
53007
+ create_new_notebook: { running: "Creating notebook", complete: "Created notebook" },
53008
+ run_notebook_cell: { running: "Running notebook cell", complete: "Cell execution complete" },
53009
+ // Media capture
53010
+ capture_moment: { running: "Capturing moment", complete: "Moment captured" }
53011
+ };
53012
+ function getToolStatusLabel(toolName, status) {
53013
+ const entry = TOOL_STATUS_LABELS[toolName];
53014
+ if (entry) return status === "complete" ? entry.complete : entry.running;
53015
+ const formatted = formatToolName(toolName);
53016
+ return status === "complete" ? formatted : `Running ${formatted.toLowerCase()}`;
53017
+ }
53018
+ const DEFAULT_TOOL_TO_TOOLKIT = {
53019
+ // Web
53020
+ search: "Web",
53021
+ browse: "Web",
53022
+ web_search: "Web",
53023
+ search_web: "Web",
53024
+ web_scrape: "Web",
53025
+ scrape_web: "Web",
53026
+ // Document
53027
+ create_new_document: "Document",
53028
+ create_document_from_markdown: "Document",
53029
+ append_markdown_to_athena_document: "Document",
53030
+ replace_markdown_in_athena_document: "Document",
53031
+ delete_blocks_from_athena_document: "Document",
53032
+ convert_athena_doc_to_pdf: "Document",
53033
+ convert_to_pdf: "Document",
53034
+ // Word document (Studio)
53035
+ CreateDocument: "Document (Word)",
53036
+ CreateParagraph: "Document (Word)",
53037
+ OpenDocument: "Document (Word)",
53038
+ execute_word_commands: "Document (Word)",
53039
+ create_new_word_document: "Document (Word)",
53040
+ // Spreadsheet
53041
+ create_new_sheet: "Spreadsheet",
53042
+ update_sheet_range: "Spreadsheet",
53043
+ format_sheet_range: "Spreadsheet",
53044
+ bulk_format_sheet_range: "Spreadsheet",
53045
+ create_table: "Spreadsheet",
53046
+ update_table: "Spreadsheet",
53047
+ create_chart: "Spreadsheet",
53048
+ update_chart: "Spreadsheet",
53049
+ // Studio sheet PTC
53050
+ CreateWorkbook: "Spreadsheet",
53051
+ AddSheet: "Spreadsheet",
53052
+ OpenWorkbook: "Spreadsheet",
53053
+ // Presentation
53054
+ create_powerpoint_deck: "Presentation",
53055
+ create_presentation_pptx_studio: "Presentation",
53056
+ execute_presentation_code: "Presentation",
53057
+ capture_slide_screenshot: "Presentation",
53058
+ // Studio presentation PTC
53059
+ CreatePresentation: "Presentation",
53060
+ OpenPresentation: "Presentation",
53061
+ AddSlide: "Presentation",
53062
+ // Notebook
53063
+ create_new_notebook: "Notebook",
53064
+ run_notebook_cell: "Notebook",
53065
+ // Python / code execution
53066
+ run_python_code: "Python",
53067
+ run_python: "Python",
53068
+ // Database
53069
+ run_sql: "Database",
53070
+ run_database_sql: "Database",
53071
+ run_sql_query_tool: "Database",
53072
+ execute_sql: "Database",
53073
+ describe_database: "Database",
53074
+ list_database_tables: "Database",
53075
+ get_database_table_schema: "Database",
53076
+ // Email / calendar
53077
+ search_email: "Email",
53078
+ unified_email_search: "Email",
53079
+ // Media
53080
+ capture_moment: "Computer"
53081
+ };
53082
+ const UNGROUPED_TOOLS = [
53083
+ "read_asset",
53084
+ "read_full_asset",
53085
+ "open_asset_in_workspace",
53086
+ "create_email_draft",
53087
+ "unified_email_create_draft",
53088
+ "unified_email_send",
53089
+ "unified_email_edit_draft"
53090
+ ];
53091
+ const defaultGetToolGroupKey = (toolName) => {
53092
+ if (UNGROUPED_TOOLS.includes(toolName)) return void 0;
53093
+ return DEFAULT_TOOL_TO_TOOLKIT[toolName];
53094
+ };
53095
+ const MAX_VISIBLE_STATUSES = 5;
53096
+ const EMPTY_STATUSES = [];
53097
+ function PulsingDots() {
53098
+ return /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-[3px]", "aria-hidden": "true", children: [
53099
+ /* @__PURE__ */ jsx("span", { className: "h-[5px] w-[5px] rounded-full bg-gray-800 animate-[aui-sg-pulse-dot_1.4s_ease-in-out_infinite]" }),
53100
+ /* @__PURE__ */ 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]" }),
53101
+ /* @__PURE__ */ 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]" }),
53102
+ /* @__PURE__ */ jsx("style", { children: `
53103
+ @keyframes aui-sg-pulse-dot {
53104
+ 0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
53105
+ 40% { opacity: 1; transform: scale(1); }
53106
+ }
53107
+ @keyframes aui-sg-shimmer-bar {
53108
+ 0% { transform: translateX(-100%); }
53109
+ 100% { transform: translateX(400%); }
53110
+ }
53111
+ ` })
53112
+ ] });
53113
+ }
53114
+ const SuperGroupingFinalText = memo(function SuperGroupingFinalText2({
53115
+ TextComponent
53116
+ }) {
53117
+ const messageContent = useAuiState((s) => s.message.content);
53118
+ const isRunning = useAuiState((s) => {
53119
+ var _a2;
53120
+ return ((_a2 = s.message.status) == null ? void 0 : _a2.type) === "running";
53121
+ });
53122
+ const finalText = useMemo(() => {
53123
+ if (!(messageContent == null ? void 0 : messageContent.length)) return null;
53124
+ let lastToolIdx = -1;
53125
+ for (let i = messageContent.length - 1; i >= 0; i--) {
53126
+ if (messageContent[i].type === "tool-call") {
53127
+ lastToolIdx = i;
53128
+ break;
53129
+ }
53130
+ }
53131
+ if (lastToolIdx === -1) return null;
53132
+ const texts = [];
53133
+ for (let i = lastToolIdx + 1; i < messageContent.length; i++) {
53134
+ const part = messageContent[i];
53135
+ if (part.type === "text" && part.text) texts.push(part.text);
53136
+ }
53137
+ return texts.length > 0 ? texts.join("\n\n") : null;
53138
+ }, [messageContent]);
53139
+ if (isRunning || !finalText) return null;
53140
+ return /* @__PURE__ */ jsx(TextComponent, { type: "text", text: finalText, status: { type: "complete" } });
53141
+ });
53142
+ const SuperGroupingCard = memo(function SuperGroupingCard2({
53143
+ toolUIs,
53144
+ TextComponent,
53145
+ ReasoningComponent,
53146
+ getToolGroupKey = defaultGetToolGroupKey
53147
+ }) {
53148
+ const [showDetails, setShowDetails] = useState(false);
53149
+ const handleToggleDetails = useCallback(() => setShowDetails((p) => !p), []);
53150
+ const handleHideDetails = useCallback(() => setShowDetails(false), []);
53151
+ const messageStatus = useAuiState((s) => {
53152
+ var _a2;
53153
+ return (_a2 = s.message.status) == null ? void 0 : _a2.type;
53154
+ });
53155
+ const isRunning = messageStatus === "running";
53156
+ const isError = messageStatus === "incomplete";
53157
+ const isComplete = !isRunning && !isError;
53158
+ const groupingFunction = useMemo(() => {
53159
+ const inner = createToolBasedGroupingFunction(getToolGroupKey);
53160
+ return (parts) => {
53161
+ const lastToolIdx = parts.findLastIndex((p) => (p == null ? void 0 : p.type) === "tool-call");
53162
+ return inner(parts).map((g) => ({
53163
+ ...g,
53164
+ indices: g.indices.filter((i) => {
53165
+ var _a2;
53166
+ return ((_a2 = parts[i]) == null ? void 0 : _a2.type) !== "text" || i <= lastToolIdx;
53167
+ })
53168
+ })).filter((g) => g.indices.length > 0);
53169
+ };
53170
+ }, [getToolGroupKey]);
53171
+ const messageContent = useAuiState((s) => s.message.content);
53172
+ const toolStatuses = useMemo(() => {
53173
+ if (!messageContent) return EMPTY_STATUSES;
53174
+ const statuses = [];
53175
+ for (const part of messageContent) {
53176
+ if (part.type === "tool-call") {
53177
+ const isToolComplete = part.result !== void 0;
53178
+ statuses.push({
53179
+ toolName: part.toolName,
53180
+ label: getToolStatusLabel(part.toolName, isToolComplete ? "complete" : "running"),
53181
+ isComplete: isToolComplete
53182
+ });
53183
+ }
53184
+ }
53185
+ return statuses.length > 0 ? statuses : EMPTY_STATUSES;
53186
+ }, [messageContent]);
53187
+ const hasToolCalls = toolStatuses.length > 0;
53188
+ const visibleStatuses = useMemo(
53189
+ () => toolStatuses.length <= MAX_VISIBLE_STATUSES ? toolStatuses : toolStatuses.slice(-MAX_VISIBLE_STATUSES),
53190
+ [toolStatuses]
53191
+ );
53192
+ const hiddenCount = toolStatuses.length - visibleStatuses.length;
53193
+ const latestStatusLine = useMemo(() => {
53194
+ var _a2;
53195
+ if (!hasToolCalls) return "Planning approach";
53196
+ return ((_a2 = toolStatuses[toolStatuses.length - 1]) == null ? void 0 : _a2.label) ?? "Working";
53197
+ }, [toolStatuses, hasToolCalls]);
53198
+ const detailsPanel = /* @__PURE__ */ jsxs("div", { className: "space-y-2 border-t border-border/60 bg-background/80 px-4 py-4", children: [
53199
+ /* @__PURE__ */ jsx(
53200
+ MessagePrimitive.Unstable_PartsGrouped,
53201
+ {
53202
+ groupingFunction,
53203
+ components: {
53204
+ tools: { by_name: toolUIs, Fallback: ToolFallback },
53205
+ Text: TextComponent,
53206
+ ...ReasoningComponent ? { Reasoning: ReasoningComponent } : {},
53207
+ Group: CollapsibleGroup
53208
+ }
53209
+ }
53210
+ ),
53211
+ /* @__PURE__ */ jsxs(
53212
+ "button",
53213
+ {
53214
+ type: "button",
53215
+ onClick: handleHideDetails,
53216
+ 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",
53217
+ children: [
53218
+ /* @__PURE__ */ jsx(ChevronUp, { className: "size-3" }),
53219
+ "Hide details"
53220
+ ]
53221
+ }
53222
+ )
53223
+ ] });
53224
+ if (isComplete && hasToolCalls) {
53225
+ return /* @__PURE__ */ jsxs("section", { className: "my-3 overflow-hidden rounded-2xl border border-border/60 bg-muted/10", children: [
53226
+ /* @__PURE__ */ jsxs(
53227
+ "button",
53228
+ {
53229
+ type: "button",
53230
+ onClick: handleToggleDetails,
53231
+ "aria-expanded": showDetails,
53232
+ className: "flex w-full items-center justify-between px-4 py-3 text-left transition-colors hover:bg-muted/30",
53233
+ children: [
53234
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
53235
+ /* @__PURE__ */ jsx("span", { className: "flex size-4 items-center justify-center text-emerald-500", "aria-hidden": "true", children: /* @__PURE__ */ jsx("svg", { width: "10", height: "10", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M10 3L4.5 8.5L2 6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) }),
53236
+ /* @__PURE__ */ jsxs("span", { className: "text-[12px] text-muted-foreground", children: [
53237
+ "Used ",
53238
+ toolStatuses.length,
53239
+ " ",
53240
+ toolStatuses.length === 1 ? "tool" : "tools"
53241
+ ] })
53242
+ ] }),
53243
+ showDetails ? /* @__PURE__ */ jsx(ChevronDown, { className: "size-3.5 text-muted-foreground/70" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "size-3.5 text-muted-foreground/70" })
53244
+ ]
53245
+ }
53246
+ ),
53247
+ showDetails && detailsPanel
53248
+ ] });
53249
+ }
53250
+ if (isComplete) return null;
53251
+ return /* @__PURE__ */ jsxs(
53252
+ "section",
53253
+ {
53254
+ "aria-busy": isRunning ? "true" : "false",
53255
+ "aria-describedby": "aui-sg-status",
53256
+ className: cn(
53257
+ "my-3 overflow-hidden rounded-2xl border transition-colors duration-200",
53258
+ isError ? "border-destructive/30 bg-destructive/5" : "border-border/70 bg-muted/10"
53259
+ ),
53260
+ children: [
53261
+ /* @__PURE__ */ jsx("div", { className: "px-4 pt-4 pb-2", children: /* @__PURE__ */ jsx("div", { className: "flex items-center justify-between", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
53262
+ /* @__PURE__ */ jsx("h3", { className: "text-[13px] font-semibold text-foreground", children: isError ? "Something went wrong" : "Athena is working" }),
53263
+ isRunning && !isError && /* @__PURE__ */ jsx(PulsingDots, {})
53264
+ ] }) }) }),
53265
+ isRunning && /* @__PURE__ */ jsx("div", { className: "px-4 pb-1", children: /* @__PURE__ */ jsx("div", { className: "h-[2px] w-full overflow-hidden rounded-full bg-muted/40", children: /* @__PURE__ */ 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]" }) }) }),
53266
+ /* @__PURE__ */ jsx("output", { id: "aui-sg-status", "aria-live": "polite", "aria-atomic": "true", className: "sr-only", children: latestStatusLine }),
53267
+ hasToolCalls && /* @__PURE__ */ jsxs("ul", { className: "space-y-1 px-4 pt-1.5 pb-1", "aria-label": "Work status updates", children: [
53268
+ hiddenCount > 0 && /* @__PURE__ */ jsxs("li", { className: "pl-[22px] text-[11px] text-muted-foreground/70", children: [
53269
+ hiddenCount,
53270
+ " earlier ",
53271
+ hiddenCount === 1 ? "step" : "steps"
53272
+ ] }),
53273
+ visibleStatuses.map((s, i) => /* @__PURE__ */ jsxs("li", { className: "flex items-center gap-2 text-[12px]", children: [
53274
+ s.isComplete ? /* @__PURE__ */ jsx("span", { className: "flex size-3.5 items-center justify-center text-emerald-500", "aria-hidden": "true", children: /* @__PURE__ */ jsx("svg", { width: "10", height: "10", viewBox: "0 0 12 12", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M10 3L4.5 8.5L2 6", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) }) : /* @__PURE__ */ jsx("span", { className: "flex size-3.5 items-center justify-center", "aria-hidden": "true", children: /* @__PURE__ */ jsx("span", { className: "size-1.5 animate-pulse rounded-full bg-blue-500" }) }),
53275
+ /* @__PURE__ */ jsx("span", { className: cn("leading-relaxed", s.isComplete ? "text-muted-foreground/70" : "text-foreground/80"), children: s.label })
53276
+ ] }, `${s.toolName}-${i}`))
53277
+ ] }),
53278
+ !hasToolCalls && /* @__PURE__ */ jsx("div", { className: "px-4 pt-1 pb-2", children: /* @__PURE__ */ jsx("span", { className: "shimmer text-[12px] text-muted-foreground", children: "Planning approach..." }) }),
53279
+ /* @__PURE__ */ jsx("div", { className: "px-4 pb-3 pt-0.5", children: /* @__PURE__ */ jsxs(
53280
+ "button",
53281
+ {
53282
+ type: "button",
53283
+ onClick: handleToggleDetails,
53284
+ "aria-expanded": showDetails,
53285
+ className: "flex items-center gap-1 text-[11px] font-medium text-muted-foreground transition-colors hover:text-foreground",
53286
+ children: [
53287
+ showDetails ? /* @__PURE__ */ jsx(ChevronDown, { className: "size-3" }) : /* @__PURE__ */ jsx(ChevronRight, { className: "size-3" }),
53288
+ showDetails ? "Hide details" : "Show details"
53289
+ ]
53290
+ }
53291
+ ) }),
53292
+ showDetails && detailsPanel
53293
+ ]
53294
+ }
53295
+ );
53296
+ });
52685
53297
  const falsyToString = (value) => typeof value === "boolean" ? `${value}` : value === 0 ? "0" : value;
52686
53298
  const cx = clsx;
52687
53299
  const cva = (base2, config2) => (props) => {
@@ -53027,8 +53639,12 @@ const Toolkits = {
53027
53639
  NOTEBOOK: "notebook_toolkit",
53028
53640
  /** Presentation slide editing. */
53029
53641
  PRESENTATION: "presentation_toolkit",
53642
+ /** Presentation slide editing (OnlyOffice, deprecated). */
53643
+ PRESENTATION_ONLYOFFICE: "presentation_onlyoffice_toolkit",
53030
53644
  /** PowerPoint presentation creation from templates. */
53031
53645
  POWERPOINT: "powerpoint_deck_toolkit",
53646
+ /** PowerPoint presentation creation from templates (pptx-studio). */
53647
+ PRESENTATION_PPTX_STUDIO: "presentation_pptx_studio_toolkit",
53032
53648
  /** Workspace file management (Olympus Drive). */
53033
53649
  DRIVE: "olympus_drive_toolkit",
53034
53650
  /** Python code execution. */
@@ -53133,11 +53749,21 @@ const TOOLKIT_DISPLAY_INFO = {
53133
53749
  description: "Edit presentation slides.",
53134
53750
  icon: "Presentation"
53135
53751
  },
53752
+ [Toolkits.PRESENTATION_ONLYOFFICE]: {
53753
+ name: "Presentation v0 (deprecated)",
53754
+ description: "Edit presentation slides (OnlyOffice, deprecated).",
53755
+ icon: "Presentation"
53756
+ },
53136
53757
  [Toolkits.POWERPOINT]: {
53137
53758
  name: "PowerPoint",
53138
53759
  description: "Create PowerPoint decks from templates.",
53139
53760
  icon: "Presentation"
53140
53761
  },
53762
+ [Toolkits.PRESENTATION_PPTX_STUDIO]: {
53763
+ name: "Presentation",
53764
+ description: "Create PowerPoint presentations from templates (pptx-studio).",
53765
+ icon: "Presentation"
53766
+ },
53141
53767
  [Toolkits.DRIVE]: {
53142
53768
  name: "Olympus Drive",
53143
53769
  description: "Find and manage workspace files.",
@@ -53608,6 +54234,17 @@ const AthenaAssistantMessageEmpty = ({ status }) => {
53608
54234
  if ((status == null ? void 0 : status.type) !== "running") return null;
53609
54235
  return /* @__PURE__ */ jsx("span", { className: "shimmer text-[13px] text-muted-foreground", children: "Thinking..." });
53610
54236
  };
54237
+ const AthenaMessageEmptyIndicator = ({
54238
+ EmptyComponent: EmptyComponent2
54239
+ }) => {
54240
+ const hasParts = useAuiState((s) => s.message.parts.length > 0);
54241
+ const isRunning = useAuiState((s) => {
54242
+ var _a2;
54243
+ return ((_a2 = s.message.status) == null ? void 0 : _a2.type) === "running";
54244
+ });
54245
+ if (hasParts || !isRunning) return null;
54246
+ return /* @__PURE__ */ jsx(EmptyComponent2, { status: { type: "running" } });
54247
+ };
53611
54248
  const AthenaReasoningPart = ({
53612
54249
  text: text2,
53613
54250
  status,
@@ -53683,7 +54320,6 @@ const AthenaReasoningPart = ({
53683
54320
  }
53684
54321
  );
53685
54322
  };
53686
- const groupAdjacentToolCalls = (part) => part.type === "tool-call" ? ["group-tool"] : null;
53687
54323
  const noToolGrouping = () => null;
53688
54324
  const AthenaAssistantMessage = ({
53689
54325
  toolUIs,
@@ -53720,31 +54356,42 @@ const AthenaAssistantMessage = ({
53720
54356
  "data-role": "assistant",
53721
54357
  children: [
53722
54358
  /* @__PURE__ */ jsx(AthenaReasoningTextComponentContext.Provider, { value: TextComponent, children: /* @__PURE__ */ jsxs("div", { className: "aui-assistant-message-content wrap-break-word px-2 text-foreground leading-relaxed", children: [
53723
- /* @__PURE__ */ jsx(NestedPtcComponentsProvider, { components: nestedPtcComponents, children: /* @__PURE__ */ jsx(MessagePrimitive.GroupedParts, { groupBy: groupToolCalls ? groupAdjacentToolCalls : noToolGrouping, children: ({ part, children }) => {
53724
- var _a2, _b;
53725
- switch (part.type) {
53726
- case "group-tool":
53727
- return /* @__PURE__ */ jsx(AthenaToolGroup, { count: ((_a2 = part.indices) == null ? void 0 : _a2.length) ?? 0, children });
53728
- case "tool-call": {
53729
- const ToolUI = toolUIsWithNestedMessages[part.toolName];
53730
- const toolProps = part;
53731
- return ToolUI ? /* @__PURE__ */ jsx(ToolUI, { ...toolProps }) : /* @__PURE__ */ jsx(ToolFallback, { ...toolProps });
53732
- }
53733
- case "reasoning": {
53734
- const ReasoningRenderer = effectiveReasoningComponent;
53735
- return /* @__PURE__ */ jsx(ReasoningRenderer, { ...part });
54359
+ /* @__PURE__ */ jsx(NestedPtcComponentsProvider, { components: nestedPtcComponents, children: groupToolCalls ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col space-y-2", children: [
54360
+ /* @__PURE__ */ jsx(
54361
+ SuperGroupingCard,
54362
+ {
54363
+ toolUIs: toolUIsWithNestedMessages,
54364
+ TextComponent,
54365
+ ReasoningComponent: effectiveReasoningComponent
53736
54366
  }
53737
- case "text": {
53738
- const textPart = part;
53739
- if (textPart.text === "" && ((_b = textPart.status) == null ? void 0 : _b.type) === "running") {
53740
- return /* @__PURE__ */ jsx(EmptyComponent2, { status: textPart.status });
54367
+ ),
54368
+ /* @__PURE__ */ jsx(SuperGroupingFinalText, { TextComponent })
54369
+ ] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [
54370
+ /* @__PURE__ */ jsx(AthenaMessageEmptyIndicator, { EmptyComponent: EmptyComponent2 }),
54371
+ /* @__PURE__ */ jsx(MessagePrimitive.GroupedParts, { groupBy: noToolGrouping, children: ({ part }) => {
54372
+ var _a2;
54373
+ switch (part.type) {
54374
+ case "tool-call": {
54375
+ const ToolUI = toolUIsWithNestedMessages[part.toolName];
54376
+ const toolProps = part;
54377
+ return ToolUI ? /* @__PURE__ */ jsx(ToolUI, { ...toolProps }) : /* @__PURE__ */ jsx(ToolFallback, { ...toolProps });
54378
+ }
54379
+ case "reasoning": {
54380
+ const ReasoningRenderer = effectiveReasoningComponent;
54381
+ return /* @__PURE__ */ jsx(ReasoningRenderer, { ...part });
53741
54382
  }
53742
- return /* @__PURE__ */ jsx(TextComponent, { ...textPart });
54383
+ case "text": {
54384
+ const textPart = part;
54385
+ if (textPart.text === "" && ((_a2 = textPart.status) == null ? void 0 : _a2.type) === "running") {
54386
+ return /* @__PURE__ */ jsx(EmptyComponent2, { status: textPart.status });
54387
+ }
54388
+ return /* @__PURE__ */ jsx(TextComponent, { ...textPart });
54389
+ }
54390
+ default:
54391
+ return null;
53743
54392
  }
53744
- default:
53745
- return null;
53746
- }
53747
- } }) }),
54393
+ } })
54394
+ ] }) }),
53748
54395
  /* @__PURE__ */ jsx(MessageError, {})
53749
54396
  ] }) }),
53750
54397
  /* @__PURE__ */ jsx("div", { className: "aui-assistant-message-footer mt-1 ml-2 flex", children: /* @__PURE__ */ jsx(ActionBarComponent, {}) })
@@ -53752,38 +54399,6 @@ const AthenaAssistantMessage = ({
53752
54399
  }
53753
54400
  );
53754
54401
  };
53755
- const AthenaToolGroup = ({ children, count: count2 }) => {
53756
- const [expanded, setExpanded] = useState(false);
53757
- return /* @__PURE__ */ jsxs("div", { className: "my-3 w-full overflow-hidden rounded-xl border border-border/60 bg-background shadow-sm", children: [
53758
- /* @__PURE__ */ jsxs(
53759
- "button",
53760
- {
53761
- type: "button",
53762
- onClick: () => setExpanded((v) => !v),
53763
- className: "flex w-full items-center gap-3 px-4 py-3 text-left transition-colors hover:bg-muted/20",
53764
- "aria-expanded": expanded,
53765
- children: [
53766
- /* @__PURE__ */ jsx("div", { className: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted/60 text-muted-foreground", children: /* @__PURE__ */ jsx(Layers, { className: "size-4" }) }),
53767
- /* @__PURE__ */ jsx("div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ jsxs("span", { className: "text-[13px] font-medium text-foreground", children: [
53768
- count2,
53769
- " tool ",
53770
- count2 === 1 ? "call" : "calls"
53771
- ] }) }),
53772
- /* @__PURE__ */ jsx(
53773
- ChevronDown,
53774
- {
53775
- className: cn(
53776
- "size-4 shrink-0 text-muted-foreground transition-transform duration-200",
53777
- !expanded && "-rotate-90"
53778
- )
53779
- }
53780
- )
53781
- ]
53782
- }
53783
- ),
53784
- expanded && /* @__PURE__ */ jsx("div", { className: "border-t border-border/40 bg-muted/5 px-3 pt-1 pb-2 [&>*]:my-2", children })
53785
- ] });
53786
- };
53787
54402
  const AthenaAssistantActionBar = ({ className }) => {
53788
54403
  const threadId = useAthenaThreadId();
53789
54404
  const { appUrl } = useAthenaConfig();