@athenaintel/react 0.10.1 → 0.10.3

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
@@ -11239,12 +11239,12 @@ var styleHookSingleton = function() {
11239
11239
  };
11240
11240
  var styleSingleton = function() {
11241
11241
  var useStyle = styleHookSingleton();
11242
- var Sheet = function(_a2) {
11242
+ var Sheet2 = function(_a2) {
11243
11243
  var styles = _a2.styles, dynamic = _a2.dynamic;
11244
11244
  useStyle(styles, dynamic);
11245
11245
  return null;
11246
11246
  };
11247
- return Sheet;
11247
+ return Sheet2;
11248
11248
  };
11249
11249
  var zeroGap = {
11250
11250
  left: 0,
@@ -24957,6 +24957,7 @@ function AthenaWithThreadList({
24957
24957
  linkClicks,
24958
24958
  citationLinks
24959
24959
  }) {
24960
+ var _a2;
24960
24961
  const adapter = useAthenaThreadListAdapter({
24961
24962
  backendUrl,
24962
24963
  apiKey,
@@ -24999,15 +25000,17 @@ function AthenaWithThreadList({
24999
25000
  adapter
25000
25001
  });
25001
25002
  const handleRefresh = useCallback(() => {
25002
- var _a2;
25003
- const core = (_a2 = runtime == null ? void 0 : runtime._core) == null ? void 0 : _a2.threads;
25003
+ var _a3;
25004
+ const core = (_a3 = runtime == null ? void 0 : runtime._core) == null ? void 0 : _a3.threads;
25004
25005
  if (core) {
25005
25006
  core._loadThreadsPromise = void 0;
25006
25007
  core.__internal_load();
25007
25008
  }
25008
25009
  }, [runtime]);
25009
25010
  const previousAuthRefreshKeyRef = useRef(null);
25010
- const authRefreshKey = `${backendUrl}::${apiKey ?? ""}::${token ?? ""}`;
25011
+ const authContext = useContext(AthenaAuthContext);
25012
+ const authUserId = ((_a2 = authContext == null ? void 0 : authContext.user) == null ? void 0 : _a2.userId) ?? "";
25013
+ const authRefreshKey = `${backendUrl}::${apiKey ?? ""}::${authUserId}`;
25011
25014
  useEffect(() => {
25012
25015
  const previousAuthRefreshKey = previousAuthRefreshKeyRef.current;
25013
25016
  previousAuthRefreshKeyRef.current = authRefreshKey;
@@ -61772,40 +61775,40 @@ const createLucideIcon = (iconName, iconNode) => {
61772
61775
  * This source code is licensed under the ISC license.
61773
61776
  * See the LICENSE file in the root directory of this source tree.
61774
61777
  */
61775
- const __iconNode$Q = [
61778
+ const __iconNode$R = [
61776
61779
  ["path", { d: "M12 5v14", key: "s699le" }],
61777
61780
  ["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
61778
61781
  ];
61779
- const ArrowDown = createLucideIcon("arrow-down", __iconNode$Q);
61782
+ const ArrowDown = createLucideIcon("arrow-down", __iconNode$R);
61780
61783
  /**
61781
61784
  * @license lucide-react v0.575.0 - ISC
61782
61785
  *
61783
61786
  * This source code is licensed under the ISC license.
61784
61787
  * See the LICENSE file in the root directory of this source tree.
61785
61788
  */
61786
- const __iconNode$P = [
61789
+ const __iconNode$Q = [
61787
61790
  ["path", { d: "M5 12h14", key: "1ays0h" }],
61788
61791
  ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
61789
61792
  ];
61790
- const ArrowRight = createLucideIcon("arrow-right", __iconNode$P);
61793
+ const ArrowRight = createLucideIcon("arrow-right", __iconNode$Q);
61791
61794
  /**
61792
61795
  * @license lucide-react v0.575.0 - ISC
61793
61796
  *
61794
61797
  * This source code is licensed under the ISC license.
61795
61798
  * See the LICENSE file in the root directory of this source tree.
61796
61799
  */
61797
- const __iconNode$O = [
61800
+ const __iconNode$P = [
61798
61801
  ["path", { d: "m5 12 7-7 7 7", key: "hav0vg" }],
61799
61802
  ["path", { d: "M12 19V5", key: "x0mq9r" }]
61800
61803
  ];
61801
- const ArrowUp = createLucideIcon("arrow-up", __iconNode$O);
61804
+ const ArrowUp = createLucideIcon("arrow-up", __iconNode$P);
61802
61805
  /**
61803
61806
  * @license lucide-react v0.575.0 - ISC
61804
61807
  *
61805
61808
  * This source code is licensed under the ISC license.
61806
61809
  * See the LICENSE file in the root directory of this source tree.
61807
61810
  */
61808
- const __iconNode$N = [
61811
+ const __iconNode$O = [
61809
61812
  ["path", { d: "M12 7v14", key: "1akyts" }],
61810
61813
  [
61811
61814
  "path",
@@ -61815,14 +61818,14 @@ const __iconNode$N = [
61815
61818
  }
61816
61819
  ]
61817
61820
  ];
61818
- const BookOpen = createLucideIcon("book-open", __iconNode$N);
61821
+ const BookOpen = createLucideIcon("book-open", __iconNode$O);
61819
61822
  /**
61820
61823
  * @license lucide-react v0.575.0 - ISC
61821
61824
  *
61822
61825
  * This source code is licensed under the ISC license.
61823
61826
  * See the LICENSE file in the root directory of this source tree.
61824
61827
  */
61825
- const __iconNode$M = [
61828
+ const __iconNode$N = [
61826
61829
  ["path", { d: "M12 18V5", key: "adv99a" }],
61827
61830
  ["path", { d: "M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4", key: "1e3is1" }],
61828
61831
  ["path", { d: "M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5", key: "1gqd8o" }],
@@ -61832,170 +61835,170 @@ const __iconNode$M = [
61832
61835
  ["path", { d: "M6 18a4 4 0 0 1-2-7.464", key: "k1g0md" }],
61833
61836
  ["path", { d: "M6.003 5.125a4 4 0 0 0-2.526 5.77", key: "q97ue3" }]
61834
61837
  ];
61835
- const Brain = createLucideIcon("brain", __iconNode$M);
61838
+ const Brain = createLucideIcon("brain", __iconNode$N);
61836
61839
  /**
61837
61840
  * @license lucide-react v0.575.0 - ISC
61838
61841
  *
61839
61842
  * This source code is licensed under the ISC license.
61840
61843
  * See the LICENSE file in the root directory of this source tree.
61841
61844
  */
61842
- const __iconNode$L = [
61845
+ const __iconNode$M = [
61843
61846
  ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
61844
61847
  ["path", { d: "M18 17V9", key: "2bz60n" }],
61845
61848
  ["path", { d: "M13 17V5", key: "1frdt8" }],
61846
61849
  ["path", { d: "M8 17v-3", key: "17ska0" }]
61847
61850
  ];
61848
- const ChartColumn = createLucideIcon("chart-column", __iconNode$L);
61851
+ const ChartColumn = createLucideIcon("chart-column", __iconNode$M);
61849
61852
  /**
61850
61853
  * @license lucide-react v0.575.0 - ISC
61851
61854
  *
61852
61855
  * This source code is licensed under the ISC license.
61853
61856
  * See the LICENSE file in the root directory of this source tree.
61854
61857
  */
61855
- const __iconNode$K = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
61856
- const Check = createLucideIcon("check", __iconNode$K);
61858
+ const __iconNode$L = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]];
61859
+ const Check = createLucideIcon("check", __iconNode$L);
61857
61860
  /**
61858
61861
  * @license lucide-react v0.575.0 - ISC
61859
61862
  *
61860
61863
  * This source code is licensed under the ISC license.
61861
61864
  * See the LICENSE file in the root directory of this source tree.
61862
61865
  */
61863
- const __iconNode$J = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
61864
- const ChevronDown = createLucideIcon("chevron-down", __iconNode$J);
61866
+ const __iconNode$K = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]];
61867
+ const ChevronDown = createLucideIcon("chevron-down", __iconNode$K);
61865
61868
  /**
61866
61869
  * @license lucide-react v0.575.0 - ISC
61867
61870
  *
61868
61871
  * This source code is licensed under the ISC license.
61869
61872
  * See the LICENSE file in the root directory of this source tree.
61870
61873
  */
61871
- const __iconNode$I = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
61872
- const ChevronRight = createLucideIcon("chevron-right", __iconNode$I);
61874
+ const __iconNode$J = [["path", { d: "m9 18 6-6-6-6", key: "mthhwq" }]];
61875
+ const ChevronRight = createLucideIcon("chevron-right", __iconNode$J);
61873
61876
  /**
61874
61877
  * @license lucide-react v0.575.0 - ISC
61875
61878
  *
61876
61879
  * This source code is licensed under the ISC license.
61877
61880
  * See the LICENSE file in the root directory of this source tree.
61878
61881
  */
61879
- const __iconNode$H = [
61882
+ const __iconNode$I = [
61880
61883
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
61881
61884
  ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
61882
61885
  ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
61883
61886
  ];
61884
- const CircleAlert = createLucideIcon("circle-alert", __iconNode$H);
61887
+ const CircleAlert = createLucideIcon("circle-alert", __iconNode$I);
61885
61888
  /**
61886
61889
  * @license lucide-react v0.575.0 - ISC
61887
61890
  *
61888
61891
  * This source code is licensed under the ISC license.
61889
61892
  * See the LICENSE file in the root directory of this source tree.
61890
61893
  */
61891
- const __iconNode$G = [
61894
+ const __iconNode$H = [
61892
61895
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
61893
61896
  ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
61894
61897
  ];
61895
- const CircleCheck = createLucideIcon("circle-check", __iconNode$G);
61898
+ const CircleCheck = createLucideIcon("circle-check", __iconNode$H);
61896
61899
  /**
61897
61900
  * @license lucide-react v0.575.0 - ISC
61898
61901
  *
61899
61902
  * This source code is licensed under the ISC license.
61900
61903
  * See the LICENSE file in the root directory of this source tree.
61901
61904
  */
61902
- const __iconNode$F = [
61905
+ const __iconNode$G = [
61903
61906
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
61904
61907
  ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
61905
61908
  ["path", { d: "m9 9 6 6", key: "z0biqf" }]
61906
61909
  ];
61907
- const CircleX = createLucideIcon("circle-x", __iconNode$F);
61910
+ const CircleX = createLucideIcon("circle-x", __iconNode$G);
61908
61911
  /**
61909
61912
  * @license lucide-react v0.575.0 - ISC
61910
61913
  *
61911
61914
  * This source code is licensed under the ISC license.
61912
61915
  * See the LICENSE file in the root directory of this source tree.
61913
61916
  */
61914
- const __iconNode$E = [
61917
+ const __iconNode$F = [
61915
61918
  ["rect", { width: "8", height: "4", x: "8", y: "2", rx: "1", ry: "1", key: "tgr4d6" }],
61916
61919
  ["path", { d: "M8 4H6a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2", key: "4jdomd" }],
61917
61920
  ["path", { d: "M16 4h2a2 2 0 0 1 2 2v4", key: "3hqy98" }],
61918
61921
  ["path", { d: "M21 14H11", key: "1bme5i" }],
61919
61922
  ["path", { d: "m15 10-4 4 4 4", key: "5dvupr" }]
61920
61923
  ];
61921
- const ClipboardCopy = createLucideIcon("clipboard-copy", __iconNode$E);
61924
+ const ClipboardCopy = createLucideIcon("clipboard-copy", __iconNode$F);
61922
61925
  /**
61923
61926
  * @license lucide-react v0.575.0 - ISC
61924
61927
  *
61925
61928
  * This source code is licensed under the ISC license.
61926
61929
  * See the LICENSE file in the root directory of this source tree.
61927
61930
  */
61928
- const __iconNode$D = [
61931
+ const __iconNode$E = [
61929
61932
  ["path", { d: "m16 18 6-6-6-6", key: "eg8j8" }],
61930
61933
  ["path", { d: "m8 6-6 6 6 6", key: "ppft3o" }]
61931
61934
  ];
61932
- const Code = createLucideIcon("code", __iconNode$D);
61935
+ const Code = createLucideIcon("code", __iconNode$E);
61933
61936
  /**
61934
61937
  * @license lucide-react v0.575.0 - ISC
61935
61938
  *
61936
61939
  * This source code is licensed under the ISC license.
61937
61940
  * See the LICENSE file in the root directory of this source tree.
61938
61941
  */
61939
- const __iconNode$C = [
61942
+ const __iconNode$D = [
61940
61943
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
61941
61944
  ["path", { d: "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2", key: "zix9uf" }]
61942
61945
  ];
61943
- const Copy = createLucideIcon("copy", __iconNode$C);
61946
+ const Copy = createLucideIcon("copy", __iconNode$D);
61944
61947
  /**
61945
61948
  * @license lucide-react v0.575.0 - ISC
61946
61949
  *
61947
61950
  * This source code is licensed under the ISC license.
61948
61951
  * See the LICENSE file in the root directory of this source tree.
61949
61952
  */
61950
- const __iconNode$B = [
61953
+ const __iconNode$C = [
61951
61954
  ["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
61952
61955
  ["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
61953
61956
  ["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
61954
61957
  ];
61955
- const Database = createLucideIcon("database", __iconNode$B);
61958
+ const Database = createLucideIcon("database", __iconNode$C);
61956
61959
  /**
61957
61960
  * @license lucide-react v0.575.0 - ISC
61958
61961
  *
61959
61962
  * This source code is licensed under the ISC license.
61960
61963
  * See the LICENSE file in the root directory of this source tree.
61961
61964
  */
61962
- const __iconNode$A = [
61965
+ const __iconNode$B = [
61963
61966
  ["path", { d: "M12 15V3", key: "m9g1x1" }],
61964
61967
  ["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }],
61965
61968
  ["path", { d: "m7 10 5 5 5-5", key: "brsn70" }]
61966
61969
  ];
61967
- const Download = createLucideIcon("download", __iconNode$A);
61970
+ const Download = createLucideIcon("download", __iconNode$B);
61968
61971
  /**
61969
61972
  * @license lucide-react v0.575.0 - ISC
61970
61973
  *
61971
61974
  * This source code is licensed under the ISC license.
61972
61975
  * See the LICENSE file in the root directory of this source tree.
61973
61976
  */
61974
- const __iconNode$z = [
61977
+ const __iconNode$A = [
61975
61978
  ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
61976
61979
  ["circle", { cx: "19", cy: "12", r: "1", key: "1wjl8i" }],
61977
61980
  ["circle", { cx: "5", cy: "12", r: "1", key: "1pcz8c" }]
61978
61981
  ];
61979
- const Ellipsis = createLucideIcon("ellipsis", __iconNode$z);
61982
+ const Ellipsis = createLucideIcon("ellipsis", __iconNode$A);
61980
61983
  /**
61981
61984
  * @license lucide-react v0.575.0 - ISC
61982
61985
  *
61983
61986
  * This source code is licensed under the ISC license.
61984
61987
  * See the LICENSE file in the root directory of this source tree.
61985
61988
  */
61986
- const __iconNode$y = [
61989
+ const __iconNode$z = [
61987
61990
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
61988
61991
  ["path", { d: "M10 14 21 3", key: "gplh6r" }],
61989
61992
  ["path", { d: "M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6", key: "a6xqqp" }]
61990
61993
  ];
61991
- const ExternalLink = createLucideIcon("external-link", __iconNode$y);
61994
+ const ExternalLink = createLucideIcon("external-link", __iconNode$z);
61992
61995
  /**
61993
61996
  * @license lucide-react v0.575.0 - ISC
61994
61997
  *
61995
61998
  * This source code is licensed under the ISC license.
61996
61999
  * See the LICENSE file in the root directory of this source tree.
61997
62000
  */
61998
- const __iconNode$x = [
62001
+ const __iconNode$y = [
61999
62002
  [
62000
62003
  "path",
62001
62004
  {
@@ -62007,14 +62010,14 @@ const __iconNode$x = [
62007
62010
  ["path", { d: "M9 15h6", key: "cctwl0" }],
62008
62011
  ["path", { d: "M12 18v-6", key: "17g6i2" }]
62009
62012
  ];
62010
- const FilePlus = createLucideIcon("file-plus", __iconNode$x);
62013
+ const FilePlus = createLucideIcon("file-plus", __iconNode$y);
62011
62014
  /**
62012
62015
  * @license lucide-react v0.575.0 - ISC
62013
62016
  *
62014
62017
  * This source code is licensed under the ISC license.
62015
62018
  * See the LICENSE file in the root directory of this source tree.
62016
62019
  */
62017
- const __iconNode$w = [
62020
+ const __iconNode$x = [
62018
62021
  [
62019
62022
  "path",
62020
62023
  {
@@ -62028,14 +62031,14 @@ const __iconNode$w = [
62028
62031
  ["path", { d: "M8 17h2", key: "2yhykz" }],
62029
62032
  ["path", { d: "M14 17h2", key: "10kma7" }]
62030
62033
  ];
62031
- const FileSpreadsheet = createLucideIcon("file-spreadsheet", __iconNode$w);
62034
+ const FileSpreadsheet = createLucideIcon("file-spreadsheet", __iconNode$x);
62032
62035
  /**
62033
62036
  * @license lucide-react v0.575.0 - ISC
62034
62037
  *
62035
62038
  * This source code is licensed under the ISC license.
62036
62039
  * See the LICENSE file in the root directory of this source tree.
62037
62040
  */
62038
- const __iconNode$v = [
62041
+ const __iconNode$w = [
62039
62042
  [
62040
62043
  "path",
62041
62044
  {
@@ -62048,14 +62051,14 @@ const __iconNode$v = [
62048
62051
  ["path", { d: "M16 13H8", key: "t4e002" }],
62049
62052
  ["path", { d: "M16 17H8", key: "z1uh3a" }]
62050
62053
  ];
62051
- const FileText = createLucideIcon("file-text", __iconNode$v);
62054
+ const FileText = createLucideIcon("file-text", __iconNode$w);
62052
62055
  /**
62053
62056
  * @license lucide-react v0.575.0 - ISC
62054
62057
  *
62055
62058
  * This source code is licensed under the ISC license.
62056
62059
  * See the LICENSE file in the root directory of this source tree.
62057
62060
  */
62058
- const __iconNode$u = [
62061
+ const __iconNode$v = [
62059
62062
  [
62060
62063
  "path",
62061
62064
  {
@@ -62065,14 +62068,14 @@ const __iconNode$u = [
62065
62068
  ],
62066
62069
  ["path", { d: "M14 2v5a1 1 0 0 0 1 1h5", key: "wfsgrz" }]
62067
62070
  ];
62068
- const File$1 = createLucideIcon("file", __iconNode$u);
62071
+ const File$1 = createLucideIcon("file", __iconNode$v);
62069
62072
  /**
62070
62073
  * @license lucide-react v0.575.0 - ISC
62071
62074
  *
62072
62075
  * This source code is licensed under the ISC license.
62073
62076
  * See the LICENSE file in the root directory of this source tree.
62074
62077
  */
62075
- const __iconNode$t = [
62078
+ const __iconNode$u = [
62076
62079
  [
62077
62080
  "path",
62078
62081
  {
@@ -62081,38 +62084,38 @@ const __iconNode$t = [
62081
62084
  }
62082
62085
  ]
62083
62086
  ];
62084
- const FolderOpen = createLucideIcon("folder-open", __iconNode$t);
62087
+ const FolderOpen = createLucideIcon("folder-open", __iconNode$u);
62085
62088
  /**
62086
62089
  * @license lucide-react v0.575.0 - ISC
62087
62090
  *
62088
62091
  * This source code is licensed under the ISC license.
62089
62092
  * See the LICENSE file in the root directory of this source tree.
62090
62093
  */
62091
- const __iconNode$s = [
62094
+ const __iconNode$t = [
62092
62095
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
62093
62096
  ["path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20", key: "13o1zl" }],
62094
62097
  ["path", { d: "M2 12h20", key: "9i4pu4" }]
62095
62098
  ];
62096
- const Globe = createLucideIcon("globe", __iconNode$s);
62099
+ const Globe = createLucideIcon("globe", __iconNode$t);
62097
62100
  /**
62098
62101
  * @license lucide-react v0.575.0 - ISC
62099
62102
  *
62100
62103
  * This source code is licensed under the ISC license.
62101
62104
  * See the LICENSE file in the root directory of this source tree.
62102
62105
  */
62103
- const __iconNode$r = [
62106
+ const __iconNode$s = [
62104
62107
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
62105
62108
  ["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
62106
62109
  ["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
62107
62110
  ];
62108
- const Image = createLucideIcon("image", __iconNode$r);
62111
+ const Image = createLucideIcon("image", __iconNode$s);
62109
62112
  /**
62110
62113
  * @license lucide-react v0.575.0 - ISC
62111
62114
  *
62112
62115
  * This source code is licensed under the ISC license.
62113
62116
  * See the LICENSE file in the root directory of this source tree.
62114
62117
  */
62115
- const __iconNode$q = [
62118
+ const __iconNode$r = [
62116
62119
  [
62117
62120
  "path",
62118
62121
  {
@@ -62135,46 +62138,46 @@ const __iconNode$q = [
62135
62138
  }
62136
62139
  ]
62137
62140
  ];
62138
- const Layers = createLucideIcon("layers", __iconNode$q);
62141
+ const Layers = createLucideIcon("layers", __iconNode$r);
62139
62142
  /**
62140
62143
  * @license lucide-react v0.575.0 - ISC
62141
62144
  *
62142
62145
  * This source code is licensed under the ISC license.
62143
62146
  * See the LICENSE file in the root directory of this source tree.
62144
62147
  */
62145
- const __iconNode$p = [
62148
+ const __iconNode$q = [
62146
62149
  ["rect", { width: "7", height: "7", x: "3", y: "3", rx: "1", key: "1g98yp" }],
62147
62150
  ["rect", { width: "7", height: "7", x: "14", y: "3", rx: "1", key: "6d4xhi" }],
62148
62151
  ["rect", { width: "7", height: "7", x: "14", y: "14", rx: "1", key: "nxv5o0" }],
62149
62152
  ["rect", { width: "7", height: "7", x: "3", y: "14", rx: "1", key: "1bb6yr" }]
62150
62153
  ];
62151
- const LayoutGrid = createLucideIcon("layout-grid", __iconNode$p);
62154
+ const LayoutGrid = createLucideIcon("layout-grid", __iconNode$q);
62152
62155
  /**
62153
62156
  * @license lucide-react v0.575.0 - ISC
62154
62157
  *
62155
62158
  * This source code is licensed under the ISC license.
62156
62159
  * See the LICENSE file in the root directory of this source tree.
62157
62160
  */
62158
- const __iconNode$o = [
62161
+ const __iconNode$p = [
62159
62162
  ["path", { d: "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71", key: "1cjeqo" }],
62160
62163
  ["path", { d: "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71", key: "19qd67" }]
62161
62164
  ];
62162
- const Link = createLucideIcon("link", __iconNode$o);
62165
+ const Link = createLucideIcon("link", __iconNode$p);
62163
62166
  /**
62164
62167
  * @license lucide-react v0.575.0 - ISC
62165
62168
  *
62166
62169
  * This source code is licensed under the ISC license.
62167
62170
  * See the LICENSE file in the root directory of this source tree.
62168
62171
  */
62169
- const __iconNode$n = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
62170
- const LoaderCircle = createLucideIcon("loader-circle", __iconNode$n);
62172
+ const __iconNode$o = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]];
62173
+ const LoaderCircle = createLucideIcon("loader-circle", __iconNode$o);
62171
62174
  /**
62172
62175
  * @license lucide-react v0.575.0 - ISC
62173
62176
  *
62174
62177
  * This source code is licensed under the ISC license.
62175
62178
  * See the LICENSE file in the root directory of this source tree.
62176
62179
  */
62177
- const __iconNode$m = [
62180
+ const __iconNode$n = [
62178
62181
  ["path", { d: "M12 2v4", key: "3427ic" }],
62179
62182
  ["path", { d: "m16.2 7.8 2.9-2.9", key: "r700ao" }],
62180
62183
  ["path", { d: "M18 12h4", key: "wj9ykh" }],
@@ -62184,38 +62187,38 @@ const __iconNode$m = [
62184
62187
  ["path", { d: "M2 12h4", key: "j09sii" }],
62185
62188
  ["path", { d: "m4.9 4.9 2.9 2.9", key: "giyufr" }]
62186
62189
  ];
62187
- const Loader = createLucideIcon("loader", __iconNode$m);
62190
+ const Loader = createLucideIcon("loader", __iconNode$n);
62188
62191
  /**
62189
62192
  * @license lucide-react v0.575.0 - ISC
62190
62193
  *
62191
62194
  * This source code is licensed under the ISC license.
62192
62195
  * See the LICENSE file in the root directory of this source tree.
62193
62196
  */
62194
- const __iconNode$l = [
62197
+ const __iconNode$m = [
62195
62198
  ["path", { d: "m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7", key: "132q7q" }],
62196
62199
  ["rect", { x: "2", y: "4", width: "20", height: "16", rx: "2", key: "izxlao" }]
62197
62200
  ];
62198
- const Mail = createLucideIcon("mail", __iconNode$l);
62201
+ const Mail = createLucideIcon("mail", __iconNode$m);
62199
62202
  /**
62200
62203
  * @license lucide-react v0.575.0 - ISC
62201
62204
  *
62202
62205
  * This source code is licensed under the ISC license.
62203
62206
  * See the LICENSE file in the root directory of this source tree.
62204
62207
  */
62205
- const __iconNode$k = [
62208
+ const __iconNode$l = [
62206
62209
  ["path", { d: "M15 3h6v6", key: "1q9fwt" }],
62207
62210
  ["path", { d: "m21 3-7 7", key: "1l2asr" }],
62208
62211
  ["path", { d: "m3 21 7-7", key: "tjx5ai" }],
62209
62212
  ["path", { d: "M9 21H3v-6", key: "wtvkvv" }]
62210
62213
  ];
62211
- const Maximize2 = createLucideIcon("maximize-2", __iconNode$k);
62214
+ const Maximize2 = createLucideIcon("maximize-2", __iconNode$l);
62212
62215
  /**
62213
62216
  * @license lucide-react v0.575.0 - ISC
62214
62217
  *
62215
62218
  * This source code is licensed under the ISC license.
62216
62219
  * See the LICENSE file in the root directory of this source tree.
62217
62220
  */
62218
- const __iconNode$j = [
62221
+ const __iconNode$k = [
62219
62222
  [
62220
62223
  "path",
62221
62224
  {
@@ -62224,39 +62227,39 @@ const __iconNode$j = [
62224
62227
  }
62225
62228
  ]
62226
62229
  ];
62227
- const MessageSquare = createLucideIcon("message-square", __iconNode$j);
62230
+ const MessageSquare = createLucideIcon("message-square", __iconNode$k);
62228
62231
  /**
62229
62232
  * @license lucide-react v0.575.0 - ISC
62230
62233
  *
62231
62234
  * This source code is licensed under the ISC license.
62232
62235
  * See the LICENSE file in the root directory of this source tree.
62233
62236
  */
62234
- const __iconNode$i = [
62237
+ const __iconNode$j = [
62235
62238
  ["path", { d: "m14 10 7-7", key: "oa77jy" }],
62236
62239
  ["path", { d: "M20 10h-6V4", key: "mjg0md" }],
62237
62240
  ["path", { d: "m3 21 7-7", key: "tjx5ai" }],
62238
62241
  ["path", { d: "M4 14h6v6", key: "rmj7iw" }]
62239
62242
  ];
62240
- const Minimize2 = createLucideIcon("minimize-2", __iconNode$i);
62243
+ const Minimize2 = createLucideIcon("minimize-2", __iconNode$j);
62241
62244
  /**
62242
62245
  * @license lucide-react v0.575.0 - ISC
62243
62246
  *
62244
62247
  * This source code is licensed under the ISC license.
62245
62248
  * See the LICENSE file in the root directory of this source tree.
62246
62249
  */
62247
- const __iconNode$h = [
62250
+ const __iconNode$i = [
62248
62251
  ["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
62249
62252
  ["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
62250
62253
  ["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
62251
62254
  ];
62252
- const Monitor = createLucideIcon("monitor", __iconNode$h);
62255
+ const Monitor = createLucideIcon("monitor", __iconNode$i);
62253
62256
  /**
62254
62257
  * @license lucide-react v0.575.0 - ISC
62255
62258
  *
62256
62259
  * This source code is licensed under the ISC license.
62257
62260
  * See the LICENSE file in the root directory of this source tree.
62258
62261
  */
62259
- const __iconNode$g = [
62262
+ const __iconNode$h = [
62260
62263
  ["path", { d: "M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4", key: "re6nr2" }],
62261
62264
  ["path", { d: "M2 6h4", key: "aawbzj" }],
62262
62265
  ["path", { d: "M2 10h4", key: "l0bgd4" }],
@@ -62270,14 +62273,14 @@ const __iconNode$g = [
62270
62273
  }
62271
62274
  ]
62272
62275
  ];
62273
- const NotebookPen = createLucideIcon("notebook-pen", __iconNode$g);
62276
+ const NotebookPen = createLucideIcon("notebook-pen", __iconNode$h);
62274
62277
  /**
62275
62278
  * @license lucide-react v0.575.0 - ISC
62276
62279
  *
62277
62280
  * This source code is licensed under the ISC license.
62278
62281
  * See the LICENSE file in the root directory of this source tree.
62279
62282
  */
62280
- const __iconNode$f = [
62283
+ const __iconNode$g = [
62281
62284
  [
62282
62285
  "path",
62283
62286
  {
@@ -62286,14 +62289,14 @@ const __iconNode$f = [
62286
62289
  }
62287
62290
  ]
62288
62291
  ];
62289
- const Paperclip = createLucideIcon("paperclip", __iconNode$f);
62292
+ const Paperclip = createLucideIcon("paperclip", __iconNode$g);
62290
62293
  /**
62291
62294
  * @license lucide-react v0.575.0 - ISC
62292
62295
  *
62293
62296
  * This source code is licensed under the ISC license.
62294
62297
  * See the LICENSE file in the root directory of this source tree.
62295
62298
  */
62296
- const __iconNode$e = [
62299
+ const __iconNode$f = [
62297
62300
  ["path", { d: "M13 21h8", key: "1jsn5i" }],
62298
62301
  [
62299
62302
  "path",
@@ -62303,14 +62306,14 @@ const __iconNode$e = [
62303
62306
  }
62304
62307
  ]
62305
62308
  ];
62306
- const PenLine = createLucideIcon("pen-line", __iconNode$e);
62309
+ const PenLine = createLucideIcon("pen-line", __iconNode$f);
62307
62310
  /**
62308
62311
  * @license lucide-react v0.575.0 - ISC
62309
62312
  *
62310
62313
  * This source code is licensed under the ISC license.
62311
62314
  * See the LICENSE file in the root directory of this source tree.
62312
62315
  */
62313
- const __iconNode$d = [
62316
+ const __iconNode$e = [
62314
62317
  [
62315
62318
  "path",
62316
62319
  {
@@ -62319,37 +62322,37 @@ const __iconNode$d = [
62319
62322
  }
62320
62323
  ]
62321
62324
  ];
62322
- const Play = createLucideIcon("play", __iconNode$d);
62325
+ const Play = createLucideIcon("play", __iconNode$e);
62323
62326
  /**
62324
62327
  * @license lucide-react v0.575.0 - ISC
62325
62328
  *
62326
62329
  * This source code is licensed under the ISC license.
62327
62330
  * See the LICENSE file in the root directory of this source tree.
62328
62331
  */
62329
- const __iconNode$c = [
62332
+ const __iconNode$d = [
62330
62333
  ["path", { d: "M5 12h14", key: "1ays0h" }],
62331
62334
  ["path", { d: "M12 5v14", key: "s699le" }]
62332
62335
  ];
62333
- const Plus = createLucideIcon("plus", __iconNode$c);
62336
+ const Plus = createLucideIcon("plus", __iconNode$d);
62334
62337
  /**
62335
62338
  * @license lucide-react v0.575.0 - ISC
62336
62339
  *
62337
62340
  * This source code is licensed under the ISC license.
62338
62341
  * See the LICENSE file in the root directory of this source tree.
62339
62342
  */
62340
- const __iconNode$b = [
62343
+ const __iconNode$c = [
62341
62344
  ["path", { d: "M2 3h20", key: "91anmk" }],
62342
62345
  ["path", { d: "M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3", key: "2k9sn8" }],
62343
62346
  ["path", { d: "m7 21 5-5 5 5", key: "bip4we" }]
62344
62347
  ];
62345
- const Presentation = createLucideIcon("presentation", __iconNode$b);
62348
+ const Presentation = createLucideIcon("presentation", __iconNode$c);
62346
62349
  /**
62347
62350
  * @license lucide-react v0.575.0 - ISC
62348
62351
  *
62349
62352
  * This source code is licensed under the ISC license.
62350
62353
  * See the LICENSE file in the root directory of this source tree.
62351
62354
  */
62352
- const __iconNode$a = [
62355
+ const __iconNode$b = [
62353
62356
  [
62354
62357
  "path",
62355
62358
  {
@@ -62365,38 +62368,38 @@ const __iconNode$a = [
62365
62368
  }
62366
62369
  ]
62367
62370
  ];
62368
- const Quote = createLucideIcon("quote", __iconNode$a);
62371
+ const Quote = createLucideIcon("quote", __iconNode$b);
62369
62372
  /**
62370
62373
  * @license lucide-react v0.575.0 - ISC
62371
62374
  *
62372
62375
  * This source code is licensed under the ISC license.
62373
62376
  * See the LICENSE file in the root directory of this source tree.
62374
62377
  */
62375
- const __iconNode$9 = [
62378
+ const __iconNode$a = [
62376
62379
  ["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
62377
62380
  ["path", { d: "M21 3v5h-5", key: "1q7to0" }],
62378
62381
  ["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
62379
62382
  ["path", { d: "M8 16H3v5", key: "1cv678" }]
62380
62383
  ];
62381
- const RefreshCw = createLucideIcon("refresh-cw", __iconNode$9);
62384
+ const RefreshCw = createLucideIcon("refresh-cw", __iconNode$a);
62382
62385
  /**
62383
62386
  * @license lucide-react v0.575.0 - ISC
62384
62387
  *
62385
62388
  * This source code is licensed under the ISC license.
62386
62389
  * See the LICENSE file in the root directory of this source tree.
62387
62390
  */
62388
- const __iconNode$8 = [
62391
+ const __iconNode$9 = [
62389
62392
  ["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
62390
62393
  ["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
62391
62394
  ];
62392
- const Search = createLucideIcon("search", __iconNode$8);
62395
+ const Search = createLucideIcon("search", __iconNode$9);
62393
62396
  /**
62394
62397
  * @license lucide-react v0.575.0 - ISC
62395
62398
  *
62396
62399
  * This source code is licensed under the ISC license.
62397
62400
  * See the LICENSE file in the root directory of this source tree.
62398
62401
  */
62399
- const __iconNode$7 = [
62402
+ const __iconNode$8 = [
62400
62403
  [
62401
62404
  "path",
62402
62405
  {
@@ -62406,7 +62409,21 @@ const __iconNode$7 = [
62406
62409
  ],
62407
62410
  ["circle", { cx: "12", cy: "12", r: "3", key: "1v7zrd" }]
62408
62411
  ];
62409
- const Settings = createLucideIcon("settings", __iconNode$7);
62412
+ const Settings = createLucideIcon("settings", __iconNode$8);
62413
+ /**
62414
+ * @license lucide-react v0.575.0 - ISC
62415
+ *
62416
+ * This source code is licensed under the ISC license.
62417
+ * See the LICENSE file in the root directory of this source tree.
62418
+ */
62419
+ const __iconNode$7 = [
62420
+ ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
62421
+ ["line", { x1: "3", x2: "21", y1: "9", y2: "9", key: "1vqk6q" }],
62422
+ ["line", { x1: "3", x2: "21", y1: "15", y2: "15", key: "o2sbyz" }],
62423
+ ["line", { x1: "9", x2: "9", y1: "9", y2: "21", key: "1ib60c" }],
62424
+ ["line", { x1: "15", x2: "15", y1: "9", y2: "21", key: "1n26ft" }]
62425
+ ];
62426
+ const Sheet = createLucideIcon("sheet", __iconNode$7);
62410
62427
  /**
62411
62428
  * @license lucide-react v0.575.0 - ISC
62412
62429
  *
@@ -62538,7 +62555,11 @@ const TOOL_META = {
62538
62555
  replace_markdown_in_athena_document: { displayName: "Updating document", icon: PenLine },
62539
62556
  // Spreadsheets
62540
62557
  create_new_sheet: { displayName: "Creating spreadsheet", icon: ChartColumn },
62541
- update_sheet_range: { displayName: "Updating spreadsheet", icon: ChartColumn },
62558
+ update_sheet_range: { displayName: "Updating spreadsheet", icon: ChartColumn, describer: (a) => {
62559
+ const range = a.range ?? "";
62560
+ const explanation = a.explanation ?? "";
62561
+ return explanation ? `${range}: ${truncateLine(explanation)}` : range;
62562
+ } },
62542
62563
  // Presentations
62543
62564
  create_powerpoint_deck: { displayName: "Building presentation", icon: Monitor },
62544
62565
  execute_presentation_code: { displayName: "Generating slides", icon: Monitor },
@@ -63263,7 +63284,7 @@ function isWorkbookFormat(value) {
63263
63284
  const workbook = obj.workbook;
63264
63285
  return Array.isArray(workbook.sheets);
63265
63286
  }
63266
- function parseA1Range(range) {
63287
+ function parseA1Range$1(range) {
63267
63288
  const match2 = range.match(/^([A-Z]+)(\d+)(?::([A-Z]+)(\d+))?$/i);
63268
63289
  if (!match2) return null;
63269
63290
  const colToNumber = (letters) => letters.toUpperCase().split("").reduce((acc, char) => acc * 26 + (char.charCodeAt(0) - 64), 0);
@@ -63291,7 +63312,7 @@ function formatCellValue(value) {
63291
63312
  }
63292
63313
  function WorkbookPreview({ workbook }) {
63293
63314
  return /* @__PURE__ */ jsx("div", { className: "space-y-3", children: workbook.workbook.sheets.map((sheet) => {
63294
- const parsedRange = parseA1Range(sheet.dimension);
63315
+ const parsedRange = parseA1Range$1(sheet.dimension);
63295
63316
  if (!parsedRange) return null;
63296
63317
  const maxRows = Math.min(parsedRange.endRow - parsedRange.startRow + 1, 12);
63297
63318
  const maxCols = Math.min(parsedRange.endCol - parsedRange.startCol + 1, 8);
@@ -64808,11 +64829,24 @@ function highlightSql(code2) {
64808
64829
  i += str.length;
64809
64830
  continue;
64810
64831
  }
64832
+ if (code2.slice(i, i + 2) === "/*") {
64833
+ const end = code2.indexOf("*/", i + 2);
64834
+ const str = end >= 0 ? code2.slice(i, end + 2) : code2.slice(i);
64835
+ result += `<span style="color:var(--aui-syn-comment, #6a9955)">${escapeHtml(str)}</span>`;
64836
+ i += str.length;
64837
+ continue;
64838
+ }
64811
64839
  if (code2[i] === "'" || code2[i] === '"') {
64812
64840
  const q = code2[i];
64813
64841
  let j = i + 1;
64814
- while (j < code2.length && code2[j] !== q) {
64815
- if (code2[j] === "\\") j++;
64842
+ while (j < code2.length) {
64843
+ if (code2[j] === q) {
64844
+ if (j + 1 < code2.length && code2[j + 1] === q) {
64845
+ j += 2;
64846
+ continue;
64847
+ }
64848
+ break;
64849
+ }
64816
64850
  j++;
64817
64851
  }
64818
64852
  const str = code2.slice(i, j + 1);
@@ -64961,9 +64995,11 @@ const RunSqlToolUIImpl = ({
64961
64995
  i
64962
64996
  )) })
64963
64997
  ] }) }),
64964
- parsed.rows.length > 50 && /* @__PURE__ */ jsxs("div", { className: "border-t border-border/30 px-4 py-1.5 text-[10px] text-muted-foreground", children: [
64965
- "Showing first 50 of ",
64966
- parsed.rows.length,
64998
+ (parsed.rows.length > 50 || parsed.rowCount !== null && parsed.rowCount > parsed.rows.length) && /* @__PURE__ */ jsxs("div", { className: "border-t border-border/30 px-4 py-1.5 text-[10px] text-muted-foreground", children: [
64999
+ "Showing first ",
65000
+ Math.min(50, parsed.rows.length),
65001
+ " of ",
65002
+ parsed.rowCount ?? parsed.rows.length,
64967
65003
  " rows"
64968
65004
  ] })
64969
65005
  ] }),
@@ -64976,6 +65012,170 @@ const RunSqlToolUI = memo(
64976
65012
  RunSqlToolUIImpl
64977
65013
  );
64978
65014
  RunSqlToolUI.displayName = "RunSqlToolUI";
65015
+ function parseA1Range(range) {
65016
+ const stripped = range.replace(/^(?:'[^']+'|[^'!]+)!/, "");
65017
+ const match2 = stripped.match(/^([A-Z]+)(\d+)/i);
65018
+ if (!match2) return null;
65019
+ return { startCol: match2[1].toUpperCase(), startRow: parseInt(match2[2], 10) };
65020
+ }
65021
+ function colNumToLetter(n) {
65022
+ let result = "";
65023
+ let num = n;
65024
+ while (num > 0) {
65025
+ num--;
65026
+ result = String.fromCharCode(65 + num % 26) + result;
65027
+ num = Math.floor(num / 26);
65028
+ }
65029
+ return result;
65030
+ }
65031
+ function parseCellsToGrid(cells) {
65032
+ let parsed = null;
65033
+ if (typeof cells === "string") {
65034
+ try {
65035
+ parsed = JSON.parse(cells);
65036
+ } catch {
65037
+ return null;
65038
+ }
65039
+ } else if (Array.isArray(cells)) {
65040
+ parsed = cells;
65041
+ }
65042
+ if (!parsed || !Array.isArray(parsed)) return null;
65043
+ return parsed.map((row) => {
65044
+ if (!Array.isArray(row)) return [];
65045
+ return row.map((cell) => {
65046
+ if (cell == null) return "";
65047
+ if (typeof cell === "object" && cell !== null) {
65048
+ const c = cell;
65049
+ if (c.formula) return c.formula;
65050
+ if (c.value !== void 0 && c.value !== null) return String(c.value);
65051
+ return "";
65052
+ }
65053
+ return String(cell);
65054
+ });
65055
+ });
65056
+ }
65057
+ const MAX_SHEET_DISPLAY_ROWS = 30;
65058
+ const UpdateSheetRangeToolUIImpl = ({
65059
+ toolName,
65060
+ args,
65061
+ result,
65062
+ status
65063
+ }) => {
65064
+ const typedArgs = args;
65065
+ const range = (typedArgs == null ? void 0 : typedArgs.range) ?? "";
65066
+ const explanation = (typedArgs == null ? void 0 : typedArgs.explanation) ?? "";
65067
+ const assetId = (typedArgs == null ? void 0 : typedArgs.asset_id) ?? (typedArgs == null ? void 0 : typedArgs.assetId) ?? "";
65068
+ const data = useMemo(() => normalizeResult(result), [result]);
65069
+ const success = (data == null ? void 0 : data.success) === true;
65070
+ const resultAssetId = extractAssetId(result);
65071
+ const isRunning = (status == null ? void 0 : status.type) === "running";
65072
+ const isComplete = (status == null ? void 0 : status.type) === "complete";
65073
+ const errorMsg = (status == null ? void 0 : status.type) === "incomplete" ? status.error : null;
65074
+ const grid = useMemo(
65075
+ () => parseCellsToGrid(typedArgs == null ? void 0 : typedArgs.cells),
65076
+ [typedArgs == null ? void 0 : typedArgs.cells]
65077
+ );
65078
+ const rangeInfo = useMemo(() => parseA1Range(range), [range]);
65079
+ const { headers, displayRows, totalRows } = useMemo(() => {
65080
+ if (!grid || grid.length === 0) {
65081
+ return { headers: [], displayRows: [], totalRows: 0 };
65082
+ }
65083
+ const maxCols = Math.max(...grid.map((r2) => r2.length));
65084
+ const startColNum = rangeInfo ? rangeInfo.startCol.split("").reduce((acc, c) => acc * 26 + c.charCodeAt(0) - 64, 0) : 1;
65085
+ const hdrs = Array.from(
65086
+ { length: maxCols },
65087
+ (_, i) => colNumToLetter(startColNum + i)
65088
+ );
65089
+ const capped = grid.slice(0, MAX_SHEET_DISPLAY_ROWS);
65090
+ return { headers: hdrs, displayRows: capped, totalRows: grid.length };
65091
+ }, [grid, rangeInfo]);
65092
+ const openAsset = useAssetPanelStore((s) => s.openAsset);
65093
+ const effectiveAssetId = resultAssetId ?? (assetId.startsWith("asset_") ? assetId : null);
65094
+ const title = isRunning ? explanation ? `Updating ${range}: ${explanation}` : `Updating sheet range ${range}...` : explanation ? `Updated ${range}: ${explanation}` : `Updated sheet range ${range}`;
65095
+ return /* @__PURE__ */ jsxs(
65096
+ ToolCard,
65097
+ {
65098
+ icon: Sheet,
65099
+ status: (status == null ? void 0 : status.type) ?? "complete",
65100
+ title: truncate(title, 80),
65101
+ subtitle: !explanation && range ? `Range: ${range}` : void 0,
65102
+ toolName,
65103
+ args: typedArgs,
65104
+ result,
65105
+ badge: isComplete && success && grid ? `${totalRows} ${totalRows === 1 ? "row" : "rows"}` : void 0,
65106
+ error: errorMsg,
65107
+ children: [
65108
+ headers.length > 0 && displayRows.length > 0 && /* @__PURE__ */ jsxs(
65109
+ ExpandableSection,
65110
+ {
65111
+ label: `Show data (${totalRows} ${totalRows === 1 ? "row" : "rows"})`,
65112
+ defaultOpen: totalRows <= 10,
65113
+ children: [
65114
+ /* @__PURE__ */ jsx("div", { className: "overflow-auto max-h-72", children: /* @__PURE__ */ jsxs("table", { className: "w-full text-[11px]", children: [
65115
+ /* @__PURE__ */ jsx("thead", { className: "sticky top-0 bg-muted/60 backdrop-blur", children: /* @__PURE__ */ jsxs("tr", { children: [
65116
+ /* @__PURE__ */ jsx("th", { className: "w-8 px-1.5 py-1 text-right font-medium text-muted-foreground/60", children: "#" }),
65117
+ headers.map((h2) => /* @__PURE__ */ jsx(
65118
+ "th",
65119
+ {
65120
+ className: "whitespace-nowrap px-2 py-1 text-center font-medium text-muted-foreground",
65121
+ children: h2
65122
+ },
65123
+ h2
65124
+ ))
65125
+ ] }) }),
65126
+ /* @__PURE__ */ jsx("tbody", { children: displayRows.map((row, i) => {
65127
+ const rowNum = ((rangeInfo == null ? void 0 : rangeInfo.startRow) ?? 1) + i;
65128
+ return /* @__PURE__ */ jsxs("tr", { className: "border-t border-border/30 hover:bg-muted/20", children: [
65129
+ /* @__PURE__ */ jsx("td", { className: "w-8 px-1.5 py-0.5 text-right tabular-nums text-muted-foreground/60", children: rowNum }),
65130
+ headers.map((h2, j) => {
65131
+ const val = row[j] ?? "";
65132
+ const isFormula = typeof val === "string" && val.startsWith("=");
65133
+ return /* @__PURE__ */ jsx(
65134
+ "td",
65135
+ {
65136
+ className: cn(
65137
+ "max-w-[180px] truncate whitespace-nowrap px-2 py-0.5 text-foreground/80",
65138
+ isFormula && "font-mono text-blue-600"
65139
+ ),
65140
+ title: val,
65141
+ children: val || /* @__PURE__ */ jsx("span", { className: "text-muted-foreground/30", children: "—" })
65142
+ },
65143
+ h2
65144
+ );
65145
+ })
65146
+ ] }, i);
65147
+ }) })
65148
+ ] }) }),
65149
+ totalRows > MAX_SHEET_DISPLAY_ROWS && /* @__PURE__ */ jsxs("div", { className: "px-2 py-1 text-[10px] text-muted-foreground", children: [
65150
+ "Showing first ",
65151
+ MAX_SHEET_DISPLAY_ROWS,
65152
+ " of ",
65153
+ totalRows,
65154
+ " rows"
65155
+ ] })
65156
+ ]
65157
+ }
65158
+ ),
65159
+ effectiveAssetId && isComplete && !errorMsg && /* @__PURE__ */ jsx("div", { className: "border-t border-border/40 px-4 py-2", children: /* @__PURE__ */ jsxs(
65160
+ "button",
65161
+ {
65162
+ type: "button",
65163
+ onClick: () => openAsset(effectiveAssetId, { type: "spreadsheet" }),
65164
+ 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",
65165
+ children: [
65166
+ /* @__PURE__ */ jsx(ExternalLink, { className: "size-3" }),
65167
+ "Open spreadsheet"
65168
+ ]
65169
+ }
65170
+ ) })
65171
+ ]
65172
+ }
65173
+ );
65174
+ };
65175
+ const UpdateSheetRangeToolUI = memo(
65176
+ UpdateSheetRangeToolUIImpl
65177
+ );
65178
+ UpdateSheetRangeToolUI.displayName = "UpdateSheetRangeToolUI";
64979
65179
  function createAssetToolUI(config2) {
64980
65180
  const Component = (props) => /* @__PURE__ */ jsx(
64981
65181
  CreateAssetToolUIImpl,
@@ -65006,6 +65206,8 @@ const TOOL_UI_REGISTRY = {
65006
65206
  execute_presentation_code: ExecutePresentationCodeToolUI,
65007
65207
  run_python_code: RunPythonCodeToolUI,
65008
65208
  open_asset_in_workspace: OpenAssetToolUI,
65209
+ // Spreadsheet toolkit
65210
+ update_sheet_range: UpdateSheetRangeToolUI,
65009
65211
  // Database toolkit
65010
65212
  describe_database: DescribeDatabaseToolUI,
65011
65213
  list_database_tables: ListDatabaseTablesToolUI,
@@ -66460,6 +66662,7 @@ export {
66460
66662
  TooltipIconButton,
66461
66663
  TooltipProvider,
66462
66664
  TooltipTrigger,
66665
+ UpdateSheetRangeToolUI,
66463
66666
  WebSearchToolUI,
66464
66667
  buttonVariants,
66465
66668
  clearAutoOpenedAssets,