@superinterface/react 3.9.1 → 3.9.2
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/cloud.cjs +613 -0
- package/dist/cloud.cjs.map +1 -0
- package/dist/cloud.d.cts +13 -0
- package/dist/cloud.d.ts +13 -0
- package/dist/cloud.js +543 -0
- package/dist/cloud.js.map +1 -0
- package/dist/index-CmzywRJS.d.cts +19 -0
- package/dist/index-CmzywRJS.d.ts +19 -0
- package/dist/index.cjs +34 -399
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -22
- package/dist/index.d.ts +4 -22
- package/dist/index.js +26 -387
- package/dist/index.js.map +1 -1
- package/dist/utils.d.cts +1 -1
- package/dist/utils.d.ts +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -10,9 +10,11 @@ import { Dispatch, SetStateAction } from 'react';
|
|
|
10
10
|
import * as openai_resources from 'openai/resources';
|
|
11
11
|
import * as react_use_audio_player from 'react-use-audio-player';
|
|
12
12
|
import { UseAudioCaptureProps } from 'use-audio-capture';
|
|
13
|
+
import { M as MarkdownContextType } from './index-CmzywRJS.cjs';
|
|
14
|
+
export { a as MarkdownContext, u as useMarkdownContext } from './index-CmzywRJS.cjs';
|
|
13
15
|
import OpenAI from 'openai';
|
|
14
|
-
import remarkGfm from 'remark-gfm';
|
|
15
16
|
import * as openai_resources_beta_threads_runs_steps from 'openai/resources/beta/threads/runs/steps';
|
|
17
|
+
import 'remark-gfm';
|
|
16
18
|
|
|
17
19
|
type Args$a = {
|
|
18
20
|
children: React.ReactNode;
|
|
@@ -637,30 +639,10 @@ declare const Suggestions: {
|
|
|
637
639
|
};
|
|
638
640
|
};
|
|
639
641
|
|
|
640
|
-
declare const components: Record<string, any>;
|
|
641
|
-
|
|
642
|
-
declare const getRemarkPlugins: ({ content, }: {
|
|
643
|
-
content: OpenAI.Beta.Threads.Messages.TextContentBlock;
|
|
644
|
-
}) => ((() => (tree: any) => void) | typeof remarkGfm)[];
|
|
645
|
-
|
|
646
|
-
type MarkdownContextType = {
|
|
647
|
-
components: typeof components;
|
|
648
|
-
getRemarkPlugins: typeof getRemarkPlugins;
|
|
649
|
-
};
|
|
650
|
-
declare const MarkdownContext: react.Context<MarkdownContextType>;
|
|
651
|
-
|
|
652
642
|
declare const MarkdownProvider: ({ children, ...rest }: {
|
|
653
643
|
children: React.ReactNode;
|
|
654
644
|
} & Partial<MarkdownContextType>) => react_jsx_runtime.JSX.Element;
|
|
655
645
|
|
|
656
|
-
declare const useMarkdownContext: () => MarkdownContextType;
|
|
657
|
-
|
|
658
|
-
declare const SourceAnnotation: ({ annotation, markdownContext, children, }: {
|
|
659
|
-
annotation: OpenAI.Beta.Threads.Messages.Annotation;
|
|
660
|
-
markdownContext: ReturnType<typeof useMarkdownContext>;
|
|
661
|
-
children: React.ReactNode;
|
|
662
|
-
}) => react_jsx_runtime.JSX.Element | null;
|
|
663
|
-
|
|
664
646
|
declare const AssistantAvatarContext: react.Context<react_jsx_runtime.JSX.Element>;
|
|
665
647
|
|
|
666
648
|
declare const AssistantNameContext: react.Context<string>;
|
|
@@ -738,4 +720,4 @@ type Args = {
|
|
|
738
720
|
};
|
|
739
721
|
declare const AssistantProvider: ({ children, }: Args) => react_jsx_runtime.JSX.Element;
|
|
740
722
|
|
|
741
|
-
export { AssistantAvatarContext, AssistantNameContext, AssistantProvider, AudioThread, AudioThreadDialog, Avatar, ComponentsProvider, FunctionBase, FunctionComponentsContext,
|
|
723
|
+
export { AssistantAvatarContext, AssistantNameContext, AssistantProvider, AudioThread, AudioThreadDialog, Avatar, ComponentsProvider, FunctionBase, FunctionComponentsContext, MarkdownProvider, RunStep, Suggestions, SuperinterfaceProvider, Thread, ThreadDialog, ThreadDialogContext, UserAvatarContext, useAssistant, useAudioThreadContext, useComponents, useCreateMessage, useIsMutatingMessage, useLatestMessage, useMessageContext, useMessageFormContext, useMessages, useSuperinterfaceContext, useSuperinterfaceContext as useThreadContext, useThreadDialogContext };
|
package/dist/index.d.ts
CHANGED
|
@@ -10,9 +10,11 @@ import { Dispatch, SetStateAction } from 'react';
|
|
|
10
10
|
import * as openai_resources from 'openai/resources';
|
|
11
11
|
import * as react_use_audio_player from 'react-use-audio-player';
|
|
12
12
|
import { UseAudioCaptureProps } from 'use-audio-capture';
|
|
13
|
+
import { M as MarkdownContextType } from './index-CmzywRJS.js';
|
|
14
|
+
export { a as MarkdownContext, u as useMarkdownContext } from './index-CmzywRJS.js';
|
|
13
15
|
import OpenAI from 'openai';
|
|
14
|
-
import remarkGfm from 'remark-gfm';
|
|
15
16
|
import * as openai_resources_beta_threads_runs_steps from 'openai/resources/beta/threads/runs/steps';
|
|
17
|
+
import 'remark-gfm';
|
|
16
18
|
|
|
17
19
|
type Args$a = {
|
|
18
20
|
children: React.ReactNode;
|
|
@@ -637,30 +639,10 @@ declare const Suggestions: {
|
|
|
637
639
|
};
|
|
638
640
|
};
|
|
639
641
|
|
|
640
|
-
declare const components: Record<string, any>;
|
|
641
|
-
|
|
642
|
-
declare const getRemarkPlugins: ({ content, }: {
|
|
643
|
-
content: OpenAI.Beta.Threads.Messages.TextContentBlock;
|
|
644
|
-
}) => ((() => (tree: any) => void) | typeof remarkGfm)[];
|
|
645
|
-
|
|
646
|
-
type MarkdownContextType = {
|
|
647
|
-
components: typeof components;
|
|
648
|
-
getRemarkPlugins: typeof getRemarkPlugins;
|
|
649
|
-
};
|
|
650
|
-
declare const MarkdownContext: react.Context<MarkdownContextType>;
|
|
651
|
-
|
|
652
642
|
declare const MarkdownProvider: ({ children, ...rest }: {
|
|
653
643
|
children: React.ReactNode;
|
|
654
644
|
} & Partial<MarkdownContextType>) => react_jsx_runtime.JSX.Element;
|
|
655
645
|
|
|
656
|
-
declare const useMarkdownContext: () => MarkdownContextType;
|
|
657
|
-
|
|
658
|
-
declare const SourceAnnotation: ({ annotation, markdownContext, children, }: {
|
|
659
|
-
annotation: OpenAI.Beta.Threads.Messages.Annotation;
|
|
660
|
-
markdownContext: ReturnType<typeof useMarkdownContext>;
|
|
661
|
-
children: React.ReactNode;
|
|
662
|
-
}) => react_jsx_runtime.JSX.Element | null;
|
|
663
|
-
|
|
664
646
|
declare const AssistantAvatarContext: react.Context<react_jsx_runtime.JSX.Element>;
|
|
665
647
|
|
|
666
648
|
declare const AssistantNameContext: react.Context<string>;
|
|
@@ -738,4 +720,4 @@ type Args = {
|
|
|
738
720
|
};
|
|
739
721
|
declare const AssistantProvider: ({ children, }: Args) => react_jsx_runtime.JSX.Element;
|
|
740
722
|
|
|
741
|
-
export { AssistantAvatarContext, AssistantNameContext, AssistantProvider, AudioThread, AudioThreadDialog, Avatar, ComponentsProvider, FunctionBase, FunctionComponentsContext,
|
|
723
|
+
export { AssistantAvatarContext, AssistantNameContext, AssistantProvider, AudioThread, AudioThreadDialog, Avatar, ComponentsProvider, FunctionBase, FunctionComponentsContext, MarkdownProvider, RunStep, Suggestions, SuperinterfaceProvider, Thread, ThreadDialog, ThreadDialogContext, UserAvatarContext, useAssistant, useAudioThreadContext, useComponents, useCreateMessage, useIsMutatingMessage, useLatestMessage, useMessageContext, useMessageFormContext, useMessages, useSuperinterfaceContext, useSuperinterfaceContext as useThreadContext, useThreadDialogContext };
|
package/dist/index.js
CHANGED
|
@@ -10814,369 +10814,8 @@ var MarkdownProvider = function(t0) {
|
|
|
10814
10814
|
}
|
|
10815
10815
|
return t3;
|
|
10816
10816
|
};
|
|
10817
|
-
// src/components/annotations/SourceAnnotation/index.tsx
|
|
10818
|
-
import { c as _c60 } from "react-compiler-runtime";
|
|
10819
|
-
// src/components/annotations/SourceAnnotation/FileCitation/index.tsx
|
|
10820
|
-
import { c as _c59 } from "react-compiler-runtime";
|
|
10821
|
-
import { useState as useState12 } from "react";
|
|
10822
|
-
import { QuoteIcon as QuoteIcon2 } from "@radix-ui/react-icons";
|
|
10823
|
-
import { Dialog, VisuallyHidden, IconButton as IconButton12 } from "@radix-ui/themes";
|
|
10824
|
-
// src/components/annotations/SourceAnnotation/FileCitation/Content/index.tsx
|
|
10825
|
-
import { c as _c58 } from "react-compiler-runtime";
|
|
10826
|
-
import { Flex as Flex36, Card as Card6, Inset as Inset3 } from "@radix-ui/themes";
|
|
10827
|
-
import { usePDFSlick } from "@pdfslick/react";
|
|
10828
|
-
import "@pdfslick/react/dist/pdf_viewer.css";
|
|
10829
|
-
// src/components/annotations/SourceAnnotation/FileCitation/Content/Navigation.tsx
|
|
10830
|
-
import { Card as Card5, IconButton as IconButton11, Flex as Flex35 } from "@radix-ui/themes";
|
|
10831
|
-
import { ZoomInIcon, ZoomOutIcon } from "@radix-ui/react-icons";
|
|
10832
|
-
import { jsx as _jsx93, jsxs as _jsxs37 } from "react/jsx-runtime";
|
|
10833
|
-
var Navigation = function(_ref) {
|
|
10834
|
-
var usePDFSlickStore = _ref.usePDFSlickStore;
|
|
10835
|
-
var pdfSlick = usePDFSlickStore(function(s) {
|
|
10836
|
-
return s.pdfSlick;
|
|
10837
|
-
});
|
|
10838
|
-
return /* @__PURE__ */ _jsx93(Flex35, {
|
|
10839
|
-
justify: "center",
|
|
10840
|
-
position: "absolute",
|
|
10841
|
-
bottom: "var(--space-2)",
|
|
10842
|
-
left: "0",
|
|
10843
|
-
right: "0",
|
|
10844
|
-
style: {
|
|
10845
|
-
zIndex: 99999
|
|
10846
|
-
},
|
|
10847
|
-
children: /* @__PURE__ */ _jsx93(Card5, {
|
|
10848
|
-
children: /* @__PURE__ */ _jsxs37(Flex35, {
|
|
10849
|
-
gap: "2",
|
|
10850
|
-
children: [
|
|
10851
|
-
/* @__PURE__ */ _jsx93(IconButton11, {
|
|
10852
|
-
variant: "soft",
|
|
10853
|
-
onClick: function() {
|
|
10854
|
-
var _pdfSlick$viewer;
|
|
10855
|
-
return pdfSlick === null || pdfSlick === void 0 || (_pdfSlick$viewer = pdfSlick.viewer) === null || _pdfSlick$viewer === void 0 ? void 0 : _pdfSlick$viewer.decreaseScale();
|
|
10856
|
-
},
|
|
10857
|
-
children: /* @__PURE__ */ _jsx93(ZoomOutIcon, {})
|
|
10858
|
-
}),
|
|
10859
|
-
/* @__PURE__ */ _jsx93(IconButton11, {
|
|
10860
|
-
variant: "soft",
|
|
10861
|
-
onClick: function() {
|
|
10862
|
-
var _pdfSlick$viewer2;
|
|
10863
|
-
return pdfSlick === null || pdfSlick === void 0 || (_pdfSlick$viewer2 = pdfSlick.viewer) === null || _pdfSlick$viewer2 === void 0 ? void 0 : _pdfSlick$viewer2.increaseScale();
|
|
10864
|
-
},
|
|
10865
|
-
children: /* @__PURE__ */ _jsx93(ZoomInIcon, {})
|
|
10866
|
-
})
|
|
10867
|
-
]
|
|
10868
|
-
})
|
|
10869
|
-
})
|
|
10870
|
-
});
|
|
10871
|
-
};
|
|
10872
|
-
// src/components/annotations/SourceAnnotation/FileCitation/Content/index.tsx
|
|
10873
|
-
import { jsx as _jsx94, jsxs as _jsxs38 } from "react/jsx-runtime";
|
|
10874
|
-
function ownKeys53(e, r) {
|
|
10875
|
-
var t = Object.keys(e);
|
|
10876
|
-
if (Object.getOwnPropertySymbols) {
|
|
10877
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
10878
|
-
r && (o = o.filter(function(r2) {
|
|
10879
|
-
return Object.getOwnPropertyDescriptor(e, r2).enumerable;
|
|
10880
|
-
})), t.push.apply(t, o);
|
|
10881
|
-
}
|
|
10882
|
-
return t;
|
|
10883
|
-
}
|
|
10884
|
-
function _objectSpread53(e) {
|
|
10885
|
-
for(var r = 1; r < arguments.length; r++){
|
|
10886
|
-
var t = null != arguments[r] ? arguments[r] : {};
|
|
10887
|
-
r % 2 ? ownKeys53(Object(t), true).forEach(function(r2) {
|
|
10888
|
-
_defineProperty53(e, r2, t[r2]);
|
|
10889
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys53(Object(t)).forEach(function(r2) {
|
|
10890
|
-
Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
|
|
10891
|
-
});
|
|
10892
|
-
}
|
|
10893
|
-
return e;
|
|
10894
|
-
}
|
|
10895
|
-
function _defineProperty53(e, r, t) {
|
|
10896
|
-
return (r = _toPropertyKey53(r)) in e ? Object.defineProperty(e, r, {
|
|
10897
|
-
value: t,
|
|
10898
|
-
enumerable: true,
|
|
10899
|
-
configurable: true,
|
|
10900
|
-
writable: true
|
|
10901
|
-
}) : e[r] = t, e;
|
|
10902
|
-
}
|
|
10903
|
-
function _toPropertyKey53(t) {
|
|
10904
|
-
var i = _toPrimitive53(t, "string");
|
|
10905
|
-
return "symbol" == (typeof i === "undefined" ? "undefined" : _type_of(i)) ? i : i + "";
|
|
10906
|
-
}
|
|
10907
|
-
function _toPrimitive53(t, r) {
|
|
10908
|
-
if ("object" != (typeof t === "undefined" ? "undefined" : _type_of(t)) || !t) return t;
|
|
10909
|
-
var e = t[Symbol.toPrimitive];
|
|
10910
|
-
if (void 0 !== e) {
|
|
10911
|
-
var i = e.call(t, r || "default");
|
|
10912
|
-
if ("object" != (typeof i === "undefined" ? "undefined" : _type_of(i))) return i;
|
|
10913
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
10914
|
-
}
|
|
10915
|
-
return ("string" === r ? String : Number)(t);
|
|
10916
|
-
}
|
|
10917
|
-
var Content9 = function(t0) {
|
|
10918
|
-
var $ = _c58(14);
|
|
10919
|
-
var fileId = t0.fileId;
|
|
10920
|
-
var superinterfaceContext = useSuperinterfaceContext();
|
|
10921
|
-
var nextSearchParams = new URLSearchParams(superinterfaceContext.variables);
|
|
10922
|
-
var t1;
|
|
10923
|
-
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10924
|
-
t1 = {
|
|
10925
|
-
scaleValue: "page-width",
|
|
10926
|
-
removePageBorders: true
|
|
10927
|
-
};
|
|
10928
|
-
$[0] = t1;
|
|
10929
|
-
} else {
|
|
10930
|
-
t1 = $[0];
|
|
10931
|
-
}
|
|
10932
|
-
var _usePDFSlick = usePDFSlick("".concat(superinterfaceContext.baseUrl, "/api/cloud/files/").concat(fileId, "/contents?").concat(nextSearchParams), t1), viewerRef = _usePDFSlick.viewerRef, usePDFSlickStore = _usePDFSlick.usePDFSlickStore, PDFSlickViewer = _usePDFSlick.PDFSlickViewer;
|
|
10933
|
-
var t2;
|
|
10934
|
-
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10935
|
-
t2 = {
|
|
10936
|
-
display: "flex",
|
|
10937
|
-
flexGrow: "1"
|
|
10938
|
-
};
|
|
10939
|
-
$[1] = t2;
|
|
10940
|
-
} else {
|
|
10941
|
-
t2 = $[1];
|
|
10942
|
-
}
|
|
10943
|
-
var t3;
|
|
10944
|
-
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
10945
|
-
t3 = {
|
|
10946
|
-
display: "flex",
|
|
10947
|
-
flexGrow: "1"
|
|
10948
|
-
};
|
|
10949
|
-
$[2] = t3;
|
|
10950
|
-
} else {
|
|
10951
|
-
t3 = $[2];
|
|
10952
|
-
}
|
|
10953
|
-
var t4;
|
|
10954
|
-
if ($[3] !== usePDFSlickStore || $[4] !== viewerRef) {
|
|
10955
|
-
t4 = {
|
|
10956
|
-
viewerRef: viewerRef,
|
|
10957
|
-
usePDFSlickStore: usePDFSlickStore
|
|
10958
|
-
};
|
|
10959
|
-
$[3] = usePDFSlickStore;
|
|
10960
|
-
$[4] = viewerRef;
|
|
10961
|
-
$[5] = t4;
|
|
10962
|
-
} else {
|
|
10963
|
-
t4 = $[5];
|
|
10964
|
-
}
|
|
10965
|
-
var t5;
|
|
10966
|
-
if ($[6] !== PDFSlickViewer || $[7] !== t4) {
|
|
10967
|
-
t5 = /* @__PURE__ */ _jsx94(PDFSlickViewer, _objectSpread53({}, t4));
|
|
10968
|
-
$[6] = PDFSlickViewer;
|
|
10969
|
-
$[7] = t4;
|
|
10970
|
-
$[8] = t5;
|
|
10971
|
-
} else {
|
|
10972
|
-
t5 = $[8];
|
|
10973
|
-
}
|
|
10974
|
-
var t6;
|
|
10975
|
-
if ($[9] !== usePDFSlickStore) {
|
|
10976
|
-
t6 = /* @__PURE__ */ _jsx94(Navigation, {
|
|
10977
|
-
usePDFSlickStore: usePDFSlickStore
|
|
10978
|
-
});
|
|
10979
|
-
$[9] = usePDFSlickStore;
|
|
10980
|
-
$[10] = t6;
|
|
10981
|
-
} else {
|
|
10982
|
-
t6 = $[10];
|
|
10983
|
-
}
|
|
10984
|
-
var t7;
|
|
10985
|
-
if ($[11] !== t5 || $[12] !== t6) {
|
|
10986
|
-
t7 = /* @__PURE__ */ _jsx94(Flex36, {
|
|
10987
|
-
direction: "column",
|
|
10988
|
-
flexGrow: "1",
|
|
10989
|
-
gap: "3",
|
|
10990
|
-
children: /* @__PURE__ */ _jsx94(Card6, {
|
|
10991
|
-
style: t2,
|
|
10992
|
-
children: /* @__PURE__ */ _jsx94(Inset3, {
|
|
10993
|
-
clip: "padding-box",
|
|
10994
|
-
style: t3,
|
|
10995
|
-
children: /* @__PURE__ */ _jsxs38(Flex36, {
|
|
10996
|
-
flexGrow: "1",
|
|
10997
|
-
position: "relative",
|
|
10998
|
-
children: [
|
|
10999
|
-
t5,
|
|
11000
|
-
t6
|
|
11001
|
-
]
|
|
11002
|
-
})
|
|
11003
|
-
})
|
|
11004
|
-
})
|
|
11005
|
-
});
|
|
11006
|
-
$[11] = t5;
|
|
11007
|
-
$[12] = t6;
|
|
11008
|
-
$[13] = t7;
|
|
11009
|
-
} else {
|
|
11010
|
-
t7 = $[13];
|
|
11011
|
-
}
|
|
11012
|
-
return t7;
|
|
11013
|
-
};
|
|
11014
|
-
// src/components/annotations/SourceAnnotation/FileCitation/index.tsx
|
|
11015
|
-
import { jsx as _jsx95, jsxs as _jsxs39, Fragment as _Fragment4 } from "react/jsx-runtime";
|
|
11016
|
-
var FileCitation = function(t0) {
|
|
11017
|
-
var $ = _c59(18);
|
|
11018
|
-
var annotation = t0.annotation;
|
|
11019
|
-
var _useState12 = _sliced_to_array(useState12(null), 2), activeFileId = _useState12[0], setActiveFileId = _useState12[1];
|
|
11020
|
-
var t1;
|
|
11021
|
-
if ($[0] !== annotation.file_citation.file_id) {
|
|
11022
|
-
t1 = function() {
|
|
11023
|
-
setActiveFileId(annotation.file_citation.file_id);
|
|
11024
|
-
};
|
|
11025
|
-
$[0] = annotation.file_citation.file_id;
|
|
11026
|
-
$[1] = t1;
|
|
11027
|
-
} else {
|
|
11028
|
-
t1 = $[1];
|
|
11029
|
-
}
|
|
11030
|
-
var t2;
|
|
11031
|
-
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
11032
|
-
t2 = /* @__PURE__ */ _jsx95(QuoteIcon2, {});
|
|
11033
|
-
$[2] = t2;
|
|
11034
|
-
} else {
|
|
11035
|
-
t2 = $[2];
|
|
11036
|
-
}
|
|
11037
|
-
var t3;
|
|
11038
|
-
if ($[3] !== t1) {
|
|
11039
|
-
t3 = /* @__PURE__ */ _jsx95(IconButton12, {
|
|
11040
|
-
variant: "soft",
|
|
11041
|
-
color: "gray",
|
|
11042
|
-
size: "1",
|
|
11043
|
-
onClick: t1,
|
|
11044
|
-
children: t2
|
|
11045
|
-
});
|
|
11046
|
-
$[3] = t1;
|
|
11047
|
-
$[4] = t3;
|
|
11048
|
-
} else {
|
|
11049
|
-
t3 = $[4];
|
|
11050
|
-
}
|
|
11051
|
-
var t4 = !!activeFileId;
|
|
11052
|
-
var t5;
|
|
11053
|
-
if ($[5] === Symbol.for("react.memo_cache_sentinel")) {
|
|
11054
|
-
t5 = function(open) {
|
|
11055
|
-
if (!open) {
|
|
11056
|
-
setActiveFileId(null);
|
|
11057
|
-
}
|
|
11058
|
-
};
|
|
11059
|
-
$[5] = t5;
|
|
11060
|
-
} else {
|
|
11061
|
-
t5 = $[5];
|
|
11062
|
-
}
|
|
11063
|
-
var t6;
|
|
11064
|
-
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
11065
|
-
t6 = {
|
|
11066
|
-
display: "flex",
|
|
11067
|
-
flexDirection: "column"
|
|
11068
|
-
};
|
|
11069
|
-
$[6] = t6;
|
|
11070
|
-
} else {
|
|
11071
|
-
t6 = $[6];
|
|
11072
|
-
}
|
|
11073
|
-
var t7;
|
|
11074
|
-
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
11075
|
-
t7 = /* @__PURE__ */ _jsx95(VisuallyHidden, {
|
|
11076
|
-
asChild: true,
|
|
11077
|
-
children: /* @__PURE__ */ _jsx95(Dialog.Title, {
|
|
11078
|
-
children: "Source"
|
|
11079
|
-
})
|
|
11080
|
-
});
|
|
11081
|
-
$[7] = t7;
|
|
11082
|
-
} else {
|
|
11083
|
-
t7 = $[7];
|
|
11084
|
-
}
|
|
11085
|
-
var t8;
|
|
11086
|
-
if ($[8] !== activeFileId) {
|
|
11087
|
-
t8 = activeFileId && /* @__PURE__ */ _jsx95(Content9, {
|
|
11088
|
-
fileId: activeFileId
|
|
11089
|
-
});
|
|
11090
|
-
$[8] = activeFileId;
|
|
11091
|
-
$[9] = t8;
|
|
11092
|
-
} else {
|
|
11093
|
-
t8 = $[9];
|
|
11094
|
-
}
|
|
11095
|
-
var t9;
|
|
11096
|
-
if ($[10] !== t8) {
|
|
11097
|
-
t9 = /* @__PURE__ */ _jsxs39(Dialog.Content, {
|
|
11098
|
-
width: "1000px",
|
|
11099
|
-
height: "90vh",
|
|
11100
|
-
maxWidth: "calc(100vw - 2 * var(--space-4))",
|
|
11101
|
-
"aria-describedby": void 0,
|
|
11102
|
-
style: t6,
|
|
11103
|
-
children: [
|
|
11104
|
-
t7,
|
|
11105
|
-
t8
|
|
11106
|
-
]
|
|
11107
|
-
});
|
|
11108
|
-
$[10] = t8;
|
|
11109
|
-
$[11] = t9;
|
|
11110
|
-
} else {
|
|
11111
|
-
t9 = $[11];
|
|
11112
|
-
}
|
|
11113
|
-
var t10;
|
|
11114
|
-
if ($[12] !== t4 || $[13] !== t9) {
|
|
11115
|
-
t10 = /* @__PURE__ */ _jsx95(Dialog.Root, {
|
|
11116
|
-
open: t4,
|
|
11117
|
-
onOpenChange: t5,
|
|
11118
|
-
children: t9
|
|
11119
|
-
});
|
|
11120
|
-
$[12] = t4;
|
|
11121
|
-
$[13] = t9;
|
|
11122
|
-
$[14] = t10;
|
|
11123
|
-
} else {
|
|
11124
|
-
t10 = $[14];
|
|
11125
|
-
}
|
|
11126
|
-
var t11;
|
|
11127
|
-
if ($[15] !== t10 || $[16] !== t3) {
|
|
11128
|
-
t11 = /* @__PURE__ */ _jsxs39(_Fragment4, {
|
|
11129
|
-
children: [
|
|
11130
|
-
t3,
|
|
11131
|
-
t10
|
|
11132
|
-
]
|
|
11133
|
-
});
|
|
11134
|
-
$[15] = t10;
|
|
11135
|
-
$[16] = t3;
|
|
11136
|
-
$[17] = t11;
|
|
11137
|
-
} else {
|
|
11138
|
-
t11 = $[17];
|
|
11139
|
-
}
|
|
11140
|
-
return t11;
|
|
11141
|
-
};
|
|
11142
|
-
// src/components/annotations/SourceAnnotation/index.tsx
|
|
11143
|
-
import { jsx as _jsx96 } from "react/jsx-runtime";
|
|
11144
|
-
var SourceAnnotation = function(t0) {
|
|
11145
|
-
var $ = _c60(5);
|
|
11146
|
-
var annotation = t0.annotation, children = t0.children;
|
|
11147
|
-
if (annotation.type === "file_citation") {
|
|
11148
|
-
var t1;
|
|
11149
|
-
if ($[0] !== annotation) {
|
|
11150
|
-
t1 = /* @__PURE__ */ _jsx96(FileCitation, {
|
|
11151
|
-
annotation: annotation
|
|
11152
|
-
});
|
|
11153
|
-
$[0] = annotation;
|
|
11154
|
-
$[1] = t1;
|
|
11155
|
-
} else {
|
|
11156
|
-
t1 = $[1];
|
|
11157
|
-
}
|
|
11158
|
-
return t1;
|
|
11159
|
-
} else {
|
|
11160
|
-
if (annotation.type === "file_path") {
|
|
11161
|
-
var _t;
|
|
11162
|
-
if ($[2] !== annotation || $[3] !== children) {
|
|
11163
|
-
_t = /* @__PURE__ */ _jsx96(FilePathAnnotation, {
|
|
11164
|
-
annotation: annotation,
|
|
11165
|
-
children: children
|
|
11166
|
-
});
|
|
11167
|
-
$[2] = annotation;
|
|
11168
|
-
$[3] = children;
|
|
11169
|
-
$[4] = _t;
|
|
11170
|
-
} else {
|
|
11171
|
-
_t = $[4];
|
|
11172
|
-
}
|
|
11173
|
-
return _t;
|
|
11174
|
-
}
|
|
11175
|
-
}
|
|
11176
|
-
return null;
|
|
11177
|
-
};
|
|
11178
10817
|
// src/components/avatars/Avatar.tsx
|
|
11179
|
-
import { c as
|
|
10818
|
+
import { c as _c60 } from "react-compiler-runtime";
|
|
11180
10819
|
// src/lib/enums/index.ts
|
|
11181
10820
|
var IconAvatarName = /* @__PURE__ */ function(IconAvatarName2) {
|
|
11182
10821
|
IconAvatarName2["BACKPACK"] = "BACKPACK";
|
|
@@ -11201,7 +10840,7 @@ var AvatarType = /* @__PURE__ */ function(AvatarType2) {
|
|
|
11201
10840
|
// src/components/avatars/Avatar.tsx
|
|
11202
10841
|
import { Avatar as RadixAvatar } from "@radix-ui/themes";
|
|
11203
10842
|
// src/components/imageAvatars/ImageAvatar/index.tsx
|
|
11204
|
-
import { c as
|
|
10843
|
+
import { c as _c58 } from "react-compiler-runtime";
|
|
11205
10844
|
import { Avatar as Avatar4 } from "@radix-ui/themes";
|
|
11206
10845
|
// src/components/imageAvatars/ImageAvatar/lib/optimizedSrc/path.ts
|
|
11207
10846
|
var width = function(_ref) {
|
|
@@ -11253,9 +10892,9 @@ var optimizedSrc = function(_ref) {
|
|
|
11253
10892
|
}));
|
|
11254
10893
|
};
|
|
11255
10894
|
// src/components/imageAvatars/ImageAvatar/index.tsx
|
|
11256
|
-
import { jsx as
|
|
10895
|
+
import { jsx as _jsx93 } from "react/jsx-runtime";
|
|
11257
10896
|
var ImageAvatar = function(t0) {
|
|
11258
|
-
var $ =
|
|
10897
|
+
var $ = _c58(9);
|
|
11259
10898
|
var imageAvatar = t0.imageAvatar, size = t0.size, className = t0.className, style = t0.style;
|
|
11260
10899
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
11261
10900
|
var t1;
|
|
@@ -11274,7 +10913,7 @@ var ImageAvatar = function(t0) {
|
|
|
11274
10913
|
}
|
|
11275
10914
|
var t2;
|
|
11276
10915
|
if ($[4] !== className || $[5] !== size || $[6] !== style || $[7] !== t1) {
|
|
11277
|
-
t2 = /* @__PURE__ */
|
|
10916
|
+
t2 = /* @__PURE__ */ _jsx93(Avatar4, {
|
|
11278
10917
|
className: className,
|
|
11279
10918
|
style: style,
|
|
11280
10919
|
fallback: "",
|
|
@@ -11292,7 +10931,7 @@ var ImageAvatar = function(t0) {
|
|
|
11292
10931
|
return t2;
|
|
11293
10932
|
};
|
|
11294
10933
|
// src/components/iconAvatars/IconAvatar.tsx
|
|
11295
|
-
import { c as
|
|
10934
|
+
import { c as _c59 } from "react-compiler-runtime";
|
|
11296
10935
|
import { useMemo as useMemo20 } from "react";
|
|
11297
10936
|
import { Avatar as Avatar5 } from "@radix-ui/themes";
|
|
11298
10937
|
// src/lib/iconAvatars/iconAvatarComponents.ts
|
|
@@ -11300,16 +10939,16 @@ import { BackpackIcon, RocketIcon, MagicWandIcon, CubeIcon, TargetIcon, DiscIcon
|
|
|
11300
10939
|
var _obj;
|
|
11301
10940
|
var iconAvatarComponents = (_obj = {}, _define_property(_obj, IconAvatarName.BACKPACK, BackpackIcon), _define_property(_obj, IconAvatarName.ROCKET, RocketIcon), _define_property(_obj, IconAvatarName.MAGIC_WAND, MagicWandIcon), _define_property(_obj, IconAvatarName.CUBE, CubeIcon), _define_property(_obj, IconAvatarName.TARGET, TargetIcon), _define_property(_obj, IconAvatarName.DISC, DiscIcon), _define_property(_obj, IconAvatarName.GLOBE, GlobeIcon), _define_property(_obj, IconAvatarName.STAR, StarIcon), _define_property(_obj, IconAvatarName.LIGHTNING_BOLT, LightningBoltIcon2), _define_property(_obj, IconAvatarName.FACE, FaceIcon), _define_property(_obj, IconAvatarName.PERSON, PersonIcon2), _define_property(_obj, IconAvatarName.HEART, HeartIcon), _obj);
|
|
11302
10941
|
// src/components/iconAvatars/IconAvatar.tsx
|
|
11303
|
-
import { jsx as
|
|
10942
|
+
import { jsx as _jsx94 } from "react/jsx-runtime";
|
|
11304
10943
|
var IconAvatar = function(t0) {
|
|
11305
|
-
var $ =
|
|
10944
|
+
var $ = _c59(7);
|
|
11306
10945
|
var iconAvatar = t0.iconAvatar, size = t0.size, className = t0.className, style = t0.style;
|
|
11307
10946
|
var t1;
|
|
11308
10947
|
t1 = iconAvatarComponents[iconAvatar.name];
|
|
11309
10948
|
var Component2 = t1;
|
|
11310
10949
|
var t2;
|
|
11311
10950
|
if ($[0] !== Component2) {
|
|
11312
|
-
t2 = Component2 ? /* @__PURE__ */
|
|
10951
|
+
t2 = Component2 ? /* @__PURE__ */ _jsx94(Component2, {}) : "";
|
|
11313
10952
|
$[0] = Component2;
|
|
11314
10953
|
$[1] = t2;
|
|
11315
10954
|
} else {
|
|
@@ -11317,7 +10956,7 @@ var IconAvatar = function(t0) {
|
|
|
11317
10956
|
}
|
|
11318
10957
|
var t3;
|
|
11319
10958
|
if ($[2] !== className || $[3] !== size || $[4] !== style || $[5] !== t2) {
|
|
11320
|
-
t3 = /* @__PURE__ */
|
|
10959
|
+
t3 = /* @__PURE__ */ _jsx94(Avatar5, {
|
|
11321
10960
|
className: className,
|
|
11322
10961
|
style: style,
|
|
11323
10962
|
size: size,
|
|
@@ -11334,16 +10973,16 @@ var IconAvatar = function(t0) {
|
|
|
11334
10973
|
return t3;
|
|
11335
10974
|
};
|
|
11336
10975
|
// src/components/avatars/Avatar.tsx
|
|
11337
|
-
import { jsx as
|
|
10976
|
+
import { jsx as _jsx95 } from "react/jsx-runtime";
|
|
11338
10977
|
var Avatar6 = function(t0) {
|
|
11339
|
-
var $ =
|
|
10978
|
+
var $ = _c60(14);
|
|
11340
10979
|
var avatar = t0.avatar, t1 = t0.size, className = t0.className, style = t0.style;
|
|
11341
10980
|
var size = t1 === void 0 ? "1" : t1;
|
|
11342
10981
|
if (avatar) {
|
|
11343
10982
|
if (avatar.type === AvatarType.IMAGE && avatar.imageAvatar) {
|
|
11344
10983
|
var _t;
|
|
11345
10984
|
if ($[0] !== avatar.imageAvatar || $[1] !== className || $[2] !== size || $[3] !== style) {
|
|
11346
|
-
_t = /* @__PURE__ */
|
|
10985
|
+
_t = /* @__PURE__ */ _jsx95(ImageAvatar, {
|
|
11347
10986
|
imageAvatar: avatar.imageAvatar,
|
|
11348
10987
|
size: size,
|
|
11349
10988
|
className: className,
|
|
@@ -11362,7 +11001,7 @@ var Avatar6 = function(t0) {
|
|
|
11362
11001
|
if (avatar.type === AvatarType.ICON && avatar.iconAvatar) {
|
|
11363
11002
|
var _t2;
|
|
11364
11003
|
if ($[5] !== avatar.iconAvatar || $[6] !== className || $[7] !== size || $[8] !== style) {
|
|
11365
|
-
_t2 = /* @__PURE__ */
|
|
11004
|
+
_t2 = /* @__PURE__ */ _jsx95(IconAvatar, {
|
|
11366
11005
|
iconAvatar: avatar.iconAvatar,
|
|
11367
11006
|
size: size,
|
|
11368
11007
|
className: className,
|
|
@@ -11381,7 +11020,7 @@ var Avatar6 = function(t0) {
|
|
|
11381
11020
|
}
|
|
11382
11021
|
var t2;
|
|
11383
11022
|
if ($[10] !== className || $[11] !== size || $[12] !== style) {
|
|
11384
|
-
t2 = /* @__PURE__ */
|
|
11023
|
+
t2 = /* @__PURE__ */ _jsx95(RadixAvatar, {
|
|
11385
11024
|
fallback: "",
|
|
11386
11025
|
size: size,
|
|
11387
11026
|
className: className,
|
|
@@ -11397,7 +11036,7 @@ var Avatar6 = function(t0) {
|
|
|
11397
11036
|
return t2;
|
|
11398
11037
|
};
|
|
11399
11038
|
// src/components/components/ComponentsProvider.tsx
|
|
11400
|
-
import { c as
|
|
11039
|
+
import { c as _c61 } from "react-compiler-runtime";
|
|
11401
11040
|
import { useMemo as useMemo21 } from "react";
|
|
11402
11041
|
// src/hooks/components/useComponents.ts
|
|
11403
11042
|
import { useContext as useContext17 } from "react";
|
|
@@ -11405,7 +11044,7 @@ var useComponents = function() {
|
|
|
11405
11044
|
return useContext17(ComponentsContext);
|
|
11406
11045
|
};
|
|
11407
11046
|
// src/components/components/ComponentsProvider.tsx
|
|
11408
|
-
import { jsx as
|
|
11047
|
+
import { jsx as _jsx96 } from "react/jsx-runtime";
|
|
11409
11048
|
var _excluded6 = [
|
|
11410
11049
|
"children"
|
|
11411
11050
|
];
|
|
@@ -11428,7 +11067,7 @@ function _objectWithoutPropertiesLoose6(r, e) {
|
|
|
11428
11067
|
return t;
|
|
11429
11068
|
}
|
|
11430
11069
|
var ComponentsProvider = function(t0) {
|
|
11431
|
-
var $ =
|
|
11070
|
+
var $ = _c61(9);
|
|
11432
11071
|
var children;
|
|
11433
11072
|
var rest;
|
|
11434
11073
|
if ($[0] !== t0) {
|
|
@@ -11458,7 +11097,7 @@ var ComponentsProvider = function(t0) {
|
|
|
11458
11097
|
var value = t1;
|
|
11459
11098
|
var t3;
|
|
11460
11099
|
if ($[6] !== children || $[7] !== value) {
|
|
11461
|
-
t3 = /* @__PURE__ */
|
|
11100
|
+
t3 = /* @__PURE__ */ _jsx96(ComponentsContext.Provider, {
|
|
11462
11101
|
value: value,
|
|
11463
11102
|
children: children
|
|
11464
11103
|
});
|
|
@@ -11471,11 +11110,11 @@ var ComponentsProvider = function(t0) {
|
|
|
11471
11110
|
return t3;
|
|
11472
11111
|
};
|
|
11473
11112
|
// src/components/assistants/AssistantProvider/index.tsx
|
|
11474
|
-
import { c as
|
|
11475
|
-
import { jsx as
|
|
11113
|
+
import { c as _c62 } from "react-compiler-runtime";
|
|
11114
|
+
import { jsx as _jsx97 } from "react/jsx-runtime";
|
|
11476
11115
|
var AssistantProvider = function(t0) {
|
|
11477
11116
|
var _assistant$name;
|
|
11478
|
-
var $ =
|
|
11117
|
+
var $ = _c62(10);
|
|
11479
11118
|
var children = t0.children;
|
|
11480
11119
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
11481
11120
|
var t1;
|
|
@@ -11493,7 +11132,7 @@ var AssistantProvider = function(t0) {
|
|
|
11493
11132
|
var t3 = assistant === null || assistant === void 0 ? void 0 : assistant.avatar;
|
|
11494
11133
|
var t4;
|
|
11495
11134
|
if ($[2] !== t3) {
|
|
11496
|
-
t4 = /* @__PURE__ */
|
|
11135
|
+
t4 = /* @__PURE__ */ _jsx97(Avatar6, {
|
|
11497
11136
|
avatar: t3
|
|
11498
11137
|
});
|
|
11499
11138
|
$[2] = t3;
|
|
@@ -11503,7 +11142,7 @@ var AssistantProvider = function(t0) {
|
|
|
11503
11142
|
}
|
|
11504
11143
|
var t5;
|
|
11505
11144
|
if ($[4] !== children || $[5] !== t4) {
|
|
11506
|
-
t5 = /* @__PURE__ */
|
|
11145
|
+
t5 = /* @__PURE__ */ _jsx97(AssistantAvatarContext.Provider, {
|
|
11507
11146
|
value: t4,
|
|
11508
11147
|
children: children
|
|
11509
11148
|
});
|
|
@@ -11515,7 +11154,7 @@ var AssistantProvider = function(t0) {
|
|
|
11515
11154
|
}
|
|
11516
11155
|
var t6;
|
|
11517
11156
|
if ($[7] !== t2 || $[8] !== t5) {
|
|
11518
|
-
t6 = /* @__PURE__ */
|
|
11157
|
+
t6 = /* @__PURE__ */ _jsx97(AssistantNameContext.Provider, {
|
|
11519
11158
|
value: t2,
|
|
11520
11159
|
children: t5
|
|
11521
11160
|
});
|
|
@@ -11527,5 +11166,5 @@ var AssistantProvider = function(t0) {
|
|
|
11527
11166
|
}
|
|
11528
11167
|
return t6;
|
|
11529
11168
|
};
|
|
11530
|
-
export { AssistantAvatarContext, AssistantNameContext, AssistantProvider, AudioThread, AudioThreadDialog, Avatar6 as Avatar, ComponentsProvider, FunctionBase, FunctionComponentsContext, MarkdownContext, MarkdownProvider, RunStep,
|
|
11169
|
+
export { AssistantAvatarContext, AssistantNameContext, AssistantProvider, AudioThread, AudioThreadDialog, Avatar6 as Avatar, ComponentsProvider, FunctionBase, FunctionComponentsContext, MarkdownContext, MarkdownProvider, RunStep, Suggestions, SuperinterfaceProvider, Thread, ThreadDialog, ThreadDialogContext, UserAvatarContext, useAssistant, useAudioThreadContext, useComponents, useCreateMessage, useIsMutatingMessage, useLatestMessage, useMarkdownContext, useMessageContext, useMessageFormContext, useMessages, useSuperinterfaceContext, useSuperinterfaceContext as useThreadContext, useThreadDialogContext };
|
|
11531
11170
|
//# sourceMappingURL=index.js.map
|