@superinterface/react 3.28.1 → 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +332 -70
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +324 -66
- package/dist/index.js.map +1 -1
- package/dist/utils.cjs +70 -4
- package/dist/utils.cjs.map +1 -1
- package/dist/utils.d.cts +10 -5
- package/dist/utils.d.ts +10 -5
- package/dist/utils.js +63 -5
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -8304,7 +8304,7 @@ var require_lib = __commonJS({
|
|
|
8304
8304
|
key: "parseMaybeAssign",
|
|
8305
8305
|
value: function parseMaybeAssign(refExpressionErrors, afterLeftParse) {
|
|
8306
8306
|
var _this = this;
|
|
8307
|
-
var
|
|
8307
|
+
var _jsx108;
|
|
8308
8308
|
var state = null;
|
|
8309
8309
|
var jsx2;
|
|
8310
8310
|
if (this.hasPlugin("jsx") && (this.match(143) || this.match(47))) {
|
|
@@ -8319,7 +8319,7 @@ var require_lib = __commonJS({
|
|
|
8319
8319
|
context.pop();
|
|
8320
8320
|
}
|
|
8321
8321
|
}
|
|
8322
|
-
if ((
|
|
8322
|
+
if ((_jsx108 = jsx2) != null && _jsx108.error || this.match(47)) {
|
|
8323
8323
|
var _jsx210, _jsx310;
|
|
8324
8324
|
state = state || this.state.clone();
|
|
8325
8325
|
var typeParameters;
|
|
@@ -13185,7 +13185,7 @@ var require_lib = __commonJS({
|
|
|
13185
13185
|
key: "parseMaybeAssign",
|
|
13186
13186
|
value: function parseMaybeAssign(refExpressionErrors, afterLeftParse) {
|
|
13187
13187
|
var _this = this;
|
|
13188
|
-
var
|
|
13188
|
+
var _jsx108, _jsx210, _typeCast, _jsx310, _typeCast2;
|
|
13189
13189
|
var state;
|
|
13190
13190
|
var jsx2;
|
|
13191
13191
|
var typeCast;
|
|
@@ -13201,7 +13201,7 @@ var require_lib = __commonJS({
|
|
|
13201
13201
|
context.pop();
|
|
13202
13202
|
}
|
|
13203
13203
|
}
|
|
13204
|
-
if (!((
|
|
13204
|
+
if (!((_jsx108 = jsx2) != null && _jsx108.error) && !this.match(47)) {
|
|
13205
13205
|
return _get(_get_prototype_of(TypeScriptParserMixin.prototype), "parseMaybeAssign", this).call(this, refExpressionErrors, afterLeftParse);
|
|
13206
13206
|
}
|
|
13207
13207
|
if (!state || state === this.state) state = this.state.clone();
|
|
@@ -37674,6 +37674,9 @@ __export(index_exports, {
|
|
|
37674
37674
|
FunctionComponentsContext: function() {
|
|
37675
37675
|
return FunctionComponentsContext;
|
|
37676
37676
|
},
|
|
37677
|
+
Gui: function() {
|
|
37678
|
+
return Gui;
|
|
37679
|
+
},
|
|
37677
37680
|
MarkdownContext: function() {
|
|
37678
37681
|
return MarkdownContext;
|
|
37679
37682
|
},
|
|
@@ -38164,11 +38167,11 @@ var Root = function(t0) {
|
|
|
38164
38167
|
var StartingToolCalls = function() {
|
|
38165
38168
|
var $ = (0, import_react_compiler_runtime6.c)(2);
|
|
38166
38169
|
var _useComponents = useComponents(), t0 = _useComponents.components;
|
|
38167
|
-
var
|
|
38170
|
+
var StartingToolCalls4 = t0.StartingToolCalls;
|
|
38168
38171
|
var t1;
|
|
38169
|
-
if ($[0] !==
|
|
38170
|
-
t1 = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
38171
|
-
$[0] =
|
|
38172
|
+
if ($[0] !== StartingToolCalls4) {
|
|
38173
|
+
t1 = /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(StartingToolCalls4, {});
|
|
38174
|
+
$[0] = StartingToolCalls4;
|
|
38172
38175
|
$[1] = t1;
|
|
38173
38176
|
} else {
|
|
38174
38177
|
t1 = $[1];
|
|
@@ -50570,10 +50573,268 @@ var WebrtcAudioRuntimeProvider = function(t0) {
|
|
|
50570
50573
|
}
|
|
50571
50574
|
return t2;
|
|
50572
50575
|
};
|
|
50573
|
-
// src/components/
|
|
50576
|
+
// src/components/gui/Gui/index.tsx
|
|
50577
|
+
var import_react_compiler_runtime102 = require("react-compiler-runtime");
|
|
50578
|
+
var import_react75 = require("react");
|
|
50579
|
+
var import_themes64 = require("@radix-ui/themes");
|
|
50580
|
+
// src/hooks/messages/useLatestAssistantMessage/index.ts
|
|
50574
50581
|
var import_react_compiler_runtime100 = require("react-compiler-runtime");
|
|
50575
50582
|
var import_react73 = require("react");
|
|
50583
|
+
var useLatestAssistantMessage = function() {
|
|
50584
|
+
var $ = (0, import_react_compiler_runtime100.c)(4);
|
|
50585
|
+
var _useMessages = useMessages(), messages2 = _useMessages.messages;
|
|
50586
|
+
var t0;
|
|
50587
|
+
var t1;
|
|
50588
|
+
if ($[0] !== messages2) {
|
|
50589
|
+
var _messages$find;
|
|
50590
|
+
t1 = (_messages$find = messages2.find(_temp11)) !== null && _messages$find !== void 0 ? _messages$find : null;
|
|
50591
|
+
$[0] = messages2;
|
|
50592
|
+
$[1] = t1;
|
|
50593
|
+
} else {
|
|
50594
|
+
t1 = $[1];
|
|
50595
|
+
}
|
|
50596
|
+
var t2;
|
|
50597
|
+
if ($[2] !== t1) {
|
|
50598
|
+
t2 = {
|
|
50599
|
+
latestAssistantMessage: t1
|
|
50600
|
+
};
|
|
50601
|
+
$[2] = t1;
|
|
50602
|
+
$[3] = t2;
|
|
50603
|
+
} else {
|
|
50604
|
+
t2 = $[3];
|
|
50605
|
+
}
|
|
50606
|
+
t0 = t2;
|
|
50607
|
+
return t0;
|
|
50608
|
+
};
|
|
50609
|
+
function _temp11(message) {
|
|
50610
|
+
return message.role === "assistant";
|
|
50611
|
+
}
|
|
50612
|
+
// src/hooks/messages/useLatestAssistantMessageWithContent/index.ts
|
|
50613
|
+
var import_react_compiler_runtime101 = require("react-compiler-runtime");
|
|
50614
|
+
var import_radash18 = require("radash");
|
|
50615
|
+
var import_react74 = require("react");
|
|
50616
|
+
var useLatestAssistantMessageWithContent = function() {
|
|
50617
|
+
var $ = (0, import_react_compiler_runtime101.c)(4);
|
|
50618
|
+
var _useMessages = useMessages(), messages2 = _useMessages.messages;
|
|
50619
|
+
var t0;
|
|
50620
|
+
var t1;
|
|
50621
|
+
if ($[0] !== messages2) {
|
|
50622
|
+
var _messages$find;
|
|
50623
|
+
t1 = (_messages$find = messages2.find(_temp25)) !== null && _messages$find !== void 0 ? _messages$find : null;
|
|
50624
|
+
$[0] = messages2;
|
|
50625
|
+
$[1] = t1;
|
|
50626
|
+
} else {
|
|
50627
|
+
t1 = $[1];
|
|
50628
|
+
}
|
|
50629
|
+
var t2;
|
|
50630
|
+
if ($[2] !== t1) {
|
|
50631
|
+
t2 = {
|
|
50632
|
+
latestAssistantMessageWithContent: t1
|
|
50633
|
+
};
|
|
50634
|
+
$[2] = t1;
|
|
50635
|
+
$[3] = t2;
|
|
50636
|
+
} else {
|
|
50637
|
+
t2 = $[3];
|
|
50638
|
+
}
|
|
50639
|
+
t0 = t2;
|
|
50640
|
+
return t0;
|
|
50641
|
+
};
|
|
50642
|
+
function _temp12(content2) {
|
|
50643
|
+
return content2.type === "text" && !(0, import_radash18.isEmpty)(content2.text.value);
|
|
50644
|
+
}
|
|
50645
|
+
function _temp25(message) {
|
|
50646
|
+
return message.role === "assistant" && message.content.some(_temp12);
|
|
50647
|
+
}
|
|
50648
|
+
// src/components/gui/Gui/index.tsx
|
|
50576
50649
|
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
50650
|
+
var StartingToolCalls3 = function() {
|
|
50651
|
+
var $ = (0, import_react_compiler_runtime102.c)(2);
|
|
50652
|
+
var _useComponents = useComponents(), t0 = _useComponents.components;
|
|
50653
|
+
var StartingToolCalls4 = t0.StartingToolCalls;
|
|
50654
|
+
var t1;
|
|
50655
|
+
if ($[0] !== StartingToolCalls4) {
|
|
50656
|
+
t1 = /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(StartingToolCalls4, {});
|
|
50657
|
+
$[0] = StartingToolCalls4;
|
|
50658
|
+
$[1] = t1;
|
|
50659
|
+
} else {
|
|
50660
|
+
t1 = $[1];
|
|
50661
|
+
}
|
|
50662
|
+
return t1;
|
|
50663
|
+
};
|
|
50664
|
+
var Content10 = function(t0) {
|
|
50665
|
+
var $ = (0, import_react_compiler_runtime102.c)(5);
|
|
50666
|
+
var latestRunStep = t0.latestRunStep;
|
|
50667
|
+
var t1;
|
|
50668
|
+
bb0: {
|
|
50669
|
+
if (!latestRunStep) {
|
|
50670
|
+
t1 = null;
|
|
50671
|
+
break bb0;
|
|
50672
|
+
}
|
|
50673
|
+
if (!latestRunStep.step_details) {
|
|
50674
|
+
t1 = null;
|
|
50675
|
+
break bb0;
|
|
50676
|
+
}
|
|
50677
|
+
if (latestRunStep.step_details.type !== "tool_calls") {
|
|
50678
|
+
t1 = null;
|
|
50679
|
+
break bb0;
|
|
50680
|
+
}
|
|
50681
|
+
t1 = latestRunStep.step_details.tool_calls[0];
|
|
50682
|
+
}
|
|
50683
|
+
var latestToolCall = t1;
|
|
50684
|
+
if (!latestRunStep || latestRunStep.step_details.type !== "tool_calls") {
|
|
50685
|
+
var _t;
|
|
50686
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
50687
|
+
_t = /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_themes64.Spinner, {});
|
|
50688
|
+
$[0] = _t;
|
|
50689
|
+
} else {
|
|
50690
|
+
_t = $[0];
|
|
50691
|
+
}
|
|
50692
|
+
return _t;
|
|
50693
|
+
}
|
|
50694
|
+
if (!latestToolCall) {
|
|
50695
|
+
var _t2;
|
|
50696
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
50697
|
+
_t2 = /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(StartingToolCalls3, {});
|
|
50698
|
+
$[1] = _t2;
|
|
50699
|
+
} else {
|
|
50700
|
+
_t2 = $[1];
|
|
50701
|
+
}
|
|
50702
|
+
return _t2;
|
|
50703
|
+
}
|
|
50704
|
+
var t2;
|
|
50705
|
+
if ($[2] !== latestRunStep || $[3] !== latestToolCall) {
|
|
50706
|
+
t2 = /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(ToolCall, {
|
|
50707
|
+
runStep: latestRunStep,
|
|
50708
|
+
toolCall: latestToolCall
|
|
50709
|
+
});
|
|
50710
|
+
$[2] = latestRunStep;
|
|
50711
|
+
$[3] = latestToolCall;
|
|
50712
|
+
$[4] = t2;
|
|
50713
|
+
} else {
|
|
50714
|
+
t2 = $[4];
|
|
50715
|
+
}
|
|
50716
|
+
return t2;
|
|
50717
|
+
};
|
|
50718
|
+
var Progress2 = function(t0) {
|
|
50719
|
+
var $ = (0, import_react_compiler_runtime102.c)(5);
|
|
50720
|
+
var latestAssistantMessage = t0.latestAssistantMessage;
|
|
50721
|
+
var isMutatingMessage = useIsMutatingMessage();
|
|
50722
|
+
var t1;
|
|
50723
|
+
var t2;
|
|
50724
|
+
if ($[0] !== latestAssistantMessage.runSteps) {
|
|
50725
|
+
var _latestAssistantMessa;
|
|
50726
|
+
t2 = (_latestAssistantMessa = latestAssistantMessage.runSteps.find(_temp13)) !== null && _latestAssistantMessa !== void 0 ? _latestAssistantMessa : null;
|
|
50727
|
+
$[0] = latestAssistantMessage.runSteps;
|
|
50728
|
+
$[1] = t2;
|
|
50729
|
+
} else {
|
|
50730
|
+
t2 = $[1];
|
|
50731
|
+
}
|
|
50732
|
+
t1 = t2;
|
|
50733
|
+
var latestRunStep = t1;
|
|
50734
|
+
if (latestAssistantMessage.status !== "in_progress" && !isMutatingMessage) {
|
|
50735
|
+
return null;
|
|
50736
|
+
}
|
|
50737
|
+
var t3;
|
|
50738
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
50739
|
+
t3 = {
|
|
50740
|
+
position: "fixed",
|
|
50741
|
+
left: 0,
|
|
50742
|
+
bottom: 0,
|
|
50743
|
+
right: 0,
|
|
50744
|
+
justifyContent: "center",
|
|
50745
|
+
padding: "var(--space-5)"
|
|
50746
|
+
};
|
|
50747
|
+
$[2] = t3;
|
|
50748
|
+
} else {
|
|
50749
|
+
t3 = $[2];
|
|
50750
|
+
}
|
|
50751
|
+
var t4;
|
|
50752
|
+
if ($[3] !== latestRunStep) {
|
|
50753
|
+
t4 = /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_themes64.Flex, {
|
|
50754
|
+
style: t3,
|
|
50755
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_themes64.Card, {
|
|
50756
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Content10, {
|
|
50757
|
+
latestRunStep: latestRunStep
|
|
50758
|
+
})
|
|
50759
|
+
})
|
|
50760
|
+
});
|
|
50761
|
+
$[3] = latestRunStep;
|
|
50762
|
+
$[4] = t4;
|
|
50763
|
+
} else {
|
|
50764
|
+
t4 = $[4];
|
|
50765
|
+
}
|
|
50766
|
+
return t4;
|
|
50767
|
+
};
|
|
50768
|
+
var Gui = function() {
|
|
50769
|
+
var $ = (0, import_react_compiler_runtime102.c)(8);
|
|
50770
|
+
var latestAssistantMessage = useLatestAssistantMessage().latestAssistantMessage;
|
|
50771
|
+
var latestAssistantMessageWithContent = useLatestAssistantMessageWithContent().latestAssistantMessageWithContent;
|
|
50772
|
+
if (!latestAssistantMessage || !latestAssistantMessageWithContent) {
|
|
50773
|
+
var _t3;
|
|
50774
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
50775
|
+
_t3 = /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_themes64.Flex, {
|
|
50776
|
+
direction: "column",
|
|
50777
|
+
flexGrow: "1",
|
|
50778
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_themes64.Flex, {
|
|
50779
|
+
align: "center",
|
|
50780
|
+
justify: "center",
|
|
50781
|
+
flexGrow: "1",
|
|
50782
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_themes64.Spinner, {
|
|
50783
|
+
size: "3"
|
|
50784
|
+
})
|
|
50785
|
+
})
|
|
50786
|
+
});
|
|
50787
|
+
$[0] = _t3;
|
|
50788
|
+
} else {
|
|
50789
|
+
_t3 = $[0];
|
|
50790
|
+
}
|
|
50791
|
+
return _t3;
|
|
50792
|
+
}
|
|
50793
|
+
var t0;
|
|
50794
|
+
if ($[1] !== latestAssistantMessageWithContent) {
|
|
50795
|
+
t0 = /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(MessageContent, {
|
|
50796
|
+
message: latestAssistantMessageWithContent
|
|
50797
|
+
});
|
|
50798
|
+
$[1] = latestAssistantMessageWithContent;
|
|
50799
|
+
$[2] = t0;
|
|
50800
|
+
} else {
|
|
50801
|
+
t0 = $[2];
|
|
50802
|
+
}
|
|
50803
|
+
var t1;
|
|
50804
|
+
if ($[3] !== latestAssistantMessage) {
|
|
50805
|
+
t1 = /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(Progress2, {
|
|
50806
|
+
latestAssistantMessage: latestAssistantMessage
|
|
50807
|
+
});
|
|
50808
|
+
$[3] = latestAssistantMessage;
|
|
50809
|
+
$[4] = t1;
|
|
50810
|
+
} else {
|
|
50811
|
+
t1 = $[4];
|
|
50812
|
+
}
|
|
50813
|
+
var t2;
|
|
50814
|
+
if ($[5] !== t0 || $[6] !== t1) {
|
|
50815
|
+
t2 = /* @__PURE__ */ (0, import_jsx_runtime98.jsxs)(import_themes64.Flex, {
|
|
50816
|
+
direction: "column",
|
|
50817
|
+
flexGrow: "1",
|
|
50818
|
+
children: [
|
|
50819
|
+
t0,
|
|
50820
|
+
t1
|
|
50821
|
+
]
|
|
50822
|
+
});
|
|
50823
|
+
$[5] = t0;
|
|
50824
|
+
$[6] = t1;
|
|
50825
|
+
$[7] = t2;
|
|
50826
|
+
} else {
|
|
50827
|
+
t2 = $[7];
|
|
50828
|
+
}
|
|
50829
|
+
return t2;
|
|
50830
|
+
};
|
|
50831
|
+
function _temp13(rs) {
|
|
50832
|
+
return rs.status === "in_progress";
|
|
50833
|
+
}
|
|
50834
|
+
// src/components/markdown/MarkdownProvider/index.tsx
|
|
50835
|
+
var import_react_compiler_runtime103 = require("react-compiler-runtime");
|
|
50836
|
+
var import_react76 = require("react");
|
|
50837
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
50577
50838
|
var _excluded7 = [
|
|
50578
50839
|
"children"
|
|
50579
50840
|
];
|
|
@@ -50596,7 +50857,7 @@ function _objectWithoutPropertiesLoose7(r, e) {
|
|
|
50596
50857
|
return t;
|
|
50597
50858
|
}
|
|
50598
50859
|
var MarkdownProvider = function(t0) {
|
|
50599
|
-
var $ = (0,
|
|
50860
|
+
var $ = (0, import_react_compiler_runtime103.c)(9);
|
|
50600
50861
|
var children;
|
|
50601
50862
|
var rest;
|
|
50602
50863
|
if ($[0] !== t0) {
|
|
@@ -50626,7 +50887,7 @@ var MarkdownProvider = function(t0) {
|
|
|
50626
50887
|
var value = t1;
|
|
50627
50888
|
var t3;
|
|
50628
50889
|
if ($[6] !== children || $[7] !== value) {
|
|
50629
|
-
t3 = /* @__PURE__ */ (0,
|
|
50890
|
+
t3 = /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(MarkdownContext.Provider, {
|
|
50630
50891
|
value: value,
|
|
50631
50892
|
children: children
|
|
50632
50893
|
});
|
|
@@ -50639,18 +50900,18 @@ var MarkdownProvider = function(t0) {
|
|
|
50639
50900
|
return t3;
|
|
50640
50901
|
};
|
|
50641
50902
|
// src/components/annotations/SourceAnnotation/index.tsx
|
|
50642
|
-
var
|
|
50903
|
+
var import_react_compiler_runtime106 = require("react-compiler-runtime");
|
|
50643
50904
|
// src/components/annotations/SourceAnnotation/FileCitation/index.tsx
|
|
50644
|
-
var
|
|
50645
|
-
var
|
|
50905
|
+
var import_react_compiler_runtime105 = require("react-compiler-runtime");
|
|
50906
|
+
var import_react77 = require("react");
|
|
50646
50907
|
var import_react_icons18 = require("@radix-ui/react-icons");
|
|
50647
|
-
var
|
|
50908
|
+
var import_themes66 = require("@radix-ui/themes");
|
|
50648
50909
|
// src/components/annotations/SourceAnnotation/FileCitation/Content.tsx
|
|
50649
|
-
var
|
|
50650
|
-
var
|
|
50651
|
-
var
|
|
50652
|
-
var
|
|
50653
|
-
var $ = (0,
|
|
50910
|
+
var import_react_compiler_runtime104 = require("react-compiler-runtime");
|
|
50911
|
+
var import_themes65 = require("@radix-ui/themes");
|
|
50912
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
50913
|
+
var Content11 = function(t0) {
|
|
50914
|
+
var $ = (0, import_react_compiler_runtime104.c)(5);
|
|
50654
50915
|
var fileId = t0.fileId;
|
|
50655
50916
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
50656
50917
|
var nextSearchParams = new URLSearchParams(superinterfaceContext.variables);
|
|
@@ -50687,18 +50948,18 @@ var Content10 = function(t0) {
|
|
|
50687
50948
|
}
|
|
50688
50949
|
var t5;
|
|
50689
50950
|
if ($[3] !== t3) {
|
|
50690
|
-
t5 = /* @__PURE__ */ (0,
|
|
50951
|
+
t5 = /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_themes65.Flex, {
|
|
50691
50952
|
direction: "column",
|
|
50692
50953
|
flexGrow: "1",
|
|
50693
50954
|
gap: "3",
|
|
50694
|
-
children: /* @__PURE__ */ (0,
|
|
50955
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_themes65.Card, {
|
|
50695
50956
|
style: t1,
|
|
50696
|
-
children: /* @__PURE__ */ (0,
|
|
50957
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_themes65.Inset, {
|
|
50697
50958
|
clip: "padding-box",
|
|
50698
50959
|
style: t2,
|
|
50699
|
-
children: /* @__PURE__ */ (0,
|
|
50960
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)(import_themes65.Flex, {
|
|
50700
50961
|
flexGrow: "1",
|
|
50701
|
-
children: /* @__PURE__ */ (0,
|
|
50962
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime100.jsx)("embed", {
|
|
50702
50963
|
src: t3,
|
|
50703
50964
|
style: t4
|
|
50704
50965
|
})
|
|
@@ -50714,11 +50975,11 @@ var Content10 = function(t0) {
|
|
|
50714
50975
|
return t5;
|
|
50715
50976
|
};
|
|
50716
50977
|
// src/components/annotations/SourceAnnotation/FileCitation/index.tsx
|
|
50717
|
-
var
|
|
50978
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
50718
50979
|
var FileCitation = function(t0) {
|
|
50719
|
-
var $ = (0,
|
|
50980
|
+
var $ = (0, import_react_compiler_runtime105.c)(18);
|
|
50720
50981
|
var annotation = t0.annotation;
|
|
50721
|
-
var _ref = _sliced_to_array((0,
|
|
50982
|
+
var _ref = _sliced_to_array((0, import_react77.useState)(null), 2), activeFileId = _ref[0], setActiveFileId = _ref[1];
|
|
50722
50983
|
var t1;
|
|
50723
50984
|
if ($[0] !== annotation.file_citation.file_id) {
|
|
50724
50985
|
t1 = function() {
|
|
@@ -50731,14 +50992,14 @@ var FileCitation = function(t0) {
|
|
|
50731
50992
|
}
|
|
50732
50993
|
var t2;
|
|
50733
50994
|
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
50734
|
-
t2 = /* @__PURE__ */ (0,
|
|
50995
|
+
t2 = /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_react_icons18.QuoteIcon, {});
|
|
50735
50996
|
$[2] = t2;
|
|
50736
50997
|
} else {
|
|
50737
50998
|
t2 = $[2];
|
|
50738
50999
|
}
|
|
50739
51000
|
var t3;
|
|
50740
51001
|
if ($[3] !== t1) {
|
|
50741
|
-
t3 = /* @__PURE__ */ (0,
|
|
51002
|
+
t3 = /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_themes66.IconButton, {
|
|
50742
51003
|
variant: "soft",
|
|
50743
51004
|
color: "gray",
|
|
50744
51005
|
size: "1",
|
|
@@ -50774,9 +51035,9 @@ var FileCitation = function(t0) {
|
|
|
50774
51035
|
}
|
|
50775
51036
|
var t7;
|
|
50776
51037
|
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
50777
|
-
t7 = /* @__PURE__ */ (0,
|
|
51038
|
+
t7 = /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_themes66.VisuallyHidden, {
|
|
50778
51039
|
asChild: true,
|
|
50779
|
-
children: /* @__PURE__ */ (0,
|
|
51040
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_themes66.Dialog.Title, {
|
|
50780
51041
|
children: "Source"
|
|
50781
51042
|
})
|
|
50782
51043
|
});
|
|
@@ -50786,7 +51047,7 @@ var FileCitation = function(t0) {
|
|
|
50786
51047
|
}
|
|
50787
51048
|
var t8;
|
|
50788
51049
|
if ($[8] !== activeFileId) {
|
|
50789
|
-
t8 = activeFileId && /* @__PURE__ */ (0,
|
|
51050
|
+
t8 = activeFileId && /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(Content11, {
|
|
50790
51051
|
fileId: activeFileId
|
|
50791
51052
|
});
|
|
50792
51053
|
$[8] = activeFileId;
|
|
@@ -50796,7 +51057,7 @@ var FileCitation = function(t0) {
|
|
|
50796
51057
|
}
|
|
50797
51058
|
var t9;
|
|
50798
51059
|
if ($[10] !== t8) {
|
|
50799
|
-
t9 = /* @__PURE__ */ (0,
|
|
51060
|
+
t9 = /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(import_themes66.Dialog.Content, {
|
|
50800
51061
|
width: "1000px",
|
|
50801
51062
|
height: "90vh",
|
|
50802
51063
|
maxWidth: "calc(100vw - 2 * var(--space-4))",
|
|
@@ -50814,7 +51075,7 @@ var FileCitation = function(t0) {
|
|
|
50814
51075
|
}
|
|
50815
51076
|
var t10;
|
|
50816
51077
|
if ($[12] !== t4 || $[13] !== t9) {
|
|
50817
|
-
t10 = /* @__PURE__ */ (0,
|
|
51078
|
+
t10 = /* @__PURE__ */ (0, import_jsx_runtime101.jsx)(import_themes66.Dialog.Root, {
|
|
50818
51079
|
open: t4,
|
|
50819
51080
|
onOpenChange: t5,
|
|
50820
51081
|
children: t9
|
|
@@ -50827,7 +51088,7 @@ var FileCitation = function(t0) {
|
|
|
50827
51088
|
}
|
|
50828
51089
|
var t11;
|
|
50829
51090
|
if ($[15] !== t10 || $[16] !== t3) {
|
|
50830
|
-
t11 = /* @__PURE__ */ (0,
|
|
51091
|
+
t11 = /* @__PURE__ */ (0, import_jsx_runtime101.jsxs)(import_jsx_runtime101.Fragment, {
|
|
50831
51092
|
children: [
|
|
50832
51093
|
t3,
|
|
50833
51094
|
t10
|
|
@@ -50842,7 +51103,7 @@ var FileCitation = function(t0) {
|
|
|
50842
51103
|
return t11;
|
|
50843
51104
|
};
|
|
50844
51105
|
// src/components/annotations/SourceAnnotation/index.tsx
|
|
50845
|
-
var
|
|
51106
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
50846
51107
|
var _excluded8 = [
|
|
50847
51108
|
"children"
|
|
50848
51109
|
];
|
|
@@ -50865,7 +51126,7 @@ function _objectWithoutPropertiesLoose8(r, e) {
|
|
|
50865
51126
|
return t;
|
|
50866
51127
|
}
|
|
50867
51128
|
var SourceAnnotation = function(t0) {
|
|
50868
|
-
var $ = (0,
|
|
51129
|
+
var $ = (0, import_react_compiler_runtime106.c)(10);
|
|
50869
51130
|
var children;
|
|
50870
51131
|
var rest;
|
|
50871
51132
|
if ($[0] !== t0) {
|
|
@@ -50893,7 +51154,7 @@ var SourceAnnotation = function(t0) {
|
|
|
50893
51154
|
if (annotation.type === "file_citation") {
|
|
50894
51155
|
var t2;
|
|
50895
51156
|
if ($[5] !== annotation) {
|
|
50896
|
-
t2 = /* @__PURE__ */ (0,
|
|
51157
|
+
t2 = /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(FileCitation, {
|
|
50897
51158
|
annotation: annotation
|
|
50898
51159
|
});
|
|
50899
51160
|
$[5] = annotation;
|
|
@@ -50906,7 +51167,7 @@ var SourceAnnotation = function(t0) {
|
|
|
50906
51167
|
if (annotation.type === "file_path") {
|
|
50907
51168
|
var _t2;
|
|
50908
51169
|
if ($[7] !== annotation || $[8] !== children) {
|
|
50909
|
-
_t2 = /* @__PURE__ */ (0,
|
|
51170
|
+
_t2 = /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(FilePathAnnotation, {
|
|
50910
51171
|
annotation: annotation,
|
|
50911
51172
|
children: children
|
|
50912
51173
|
});
|
|
@@ -50922,7 +51183,7 @@ var SourceAnnotation = function(t0) {
|
|
|
50922
51183
|
return null;
|
|
50923
51184
|
};
|
|
50924
51185
|
// src/components/avatars/Avatar.tsx
|
|
50925
|
-
var
|
|
51186
|
+
var import_react_compiler_runtime109 = require("react-compiler-runtime");
|
|
50926
51187
|
// src/lib/enums/index.ts
|
|
50927
51188
|
var IconAvatarName = /* @__PURE__ */ function(IconAvatarName2) {
|
|
50928
51189
|
IconAvatarName2["BACKPACK"] = "BACKPACK";
|
|
@@ -50945,10 +51206,10 @@ var AvatarType = /* @__PURE__ */ function(AvatarType2) {
|
|
|
50945
51206
|
return AvatarType2;
|
|
50946
51207
|
}({});
|
|
50947
51208
|
// src/components/avatars/Avatar.tsx
|
|
50948
|
-
var
|
|
51209
|
+
var import_themes69 = require("@radix-ui/themes");
|
|
50949
51210
|
// src/components/imageAvatars/ImageAvatar/index.tsx
|
|
50950
|
-
var
|
|
50951
|
-
var
|
|
51211
|
+
var import_react_compiler_runtime107 = require("react-compiler-runtime");
|
|
51212
|
+
var import_themes67 = require("@radix-ui/themes");
|
|
50952
51213
|
// src/components/imageAvatars/ImageAvatar/lib/optimizedSrc/path.ts
|
|
50953
51214
|
var width = function(_ref) {
|
|
50954
51215
|
var size = _ref.size;
|
|
@@ -50999,9 +51260,9 @@ var optimizedSrc = function(_ref) {
|
|
|
50999
51260
|
}));
|
|
51000
51261
|
};
|
|
51001
51262
|
// src/components/imageAvatars/ImageAvatar/index.tsx
|
|
51002
|
-
var
|
|
51263
|
+
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
51003
51264
|
var ImageAvatar = function(t0) {
|
|
51004
|
-
var $ = (0,
|
|
51265
|
+
var $ = (0, import_react_compiler_runtime107.c)(9);
|
|
51005
51266
|
var imageAvatar = t0.imageAvatar, size = t0.size, className = t0.className, style = t0.style;
|
|
51006
51267
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
51007
51268
|
var t1;
|
|
@@ -51020,7 +51281,7 @@ var ImageAvatar = function(t0) {
|
|
|
51020
51281
|
}
|
|
51021
51282
|
var t2;
|
|
51022
51283
|
if ($[4] !== className || $[5] !== size || $[6] !== style || $[7] !== t1) {
|
|
51023
|
-
t2 = /* @__PURE__ */ (0,
|
|
51284
|
+
t2 = /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_themes67.Avatar, {
|
|
51024
51285
|
className: className,
|
|
51025
51286
|
style: style,
|
|
51026
51287
|
fallback: "",
|
|
@@ -51038,24 +51299,24 @@ var ImageAvatar = function(t0) {
|
|
|
51038
51299
|
return t2;
|
|
51039
51300
|
};
|
|
51040
51301
|
// src/components/iconAvatars/IconAvatar.tsx
|
|
51041
|
-
var
|
|
51042
|
-
var
|
|
51043
|
-
var
|
|
51302
|
+
var import_react_compiler_runtime108 = require("react-compiler-runtime");
|
|
51303
|
+
var import_react78 = require("react");
|
|
51304
|
+
var import_themes68 = require("@radix-ui/themes");
|
|
51044
51305
|
// src/lib/iconAvatars/iconAvatarComponents.ts
|
|
51045
51306
|
var import_react_icons19 = require("@radix-ui/react-icons");
|
|
51046
51307
|
var _obj;
|
|
51047
51308
|
var iconAvatarComponents = (_obj = {}, _define_property(_obj, IconAvatarName.BACKPACK, import_react_icons19.BackpackIcon), _define_property(_obj, IconAvatarName.ROCKET, import_react_icons19.RocketIcon), _define_property(_obj, IconAvatarName.MAGIC_WAND, import_react_icons19.MagicWandIcon), _define_property(_obj, IconAvatarName.CUBE, import_react_icons19.CubeIcon), _define_property(_obj, IconAvatarName.TARGET, import_react_icons19.TargetIcon), _define_property(_obj, IconAvatarName.DISC, import_react_icons19.DiscIcon), _define_property(_obj, IconAvatarName.GLOBE, import_react_icons19.GlobeIcon), _define_property(_obj, IconAvatarName.STAR, import_react_icons19.StarIcon), _define_property(_obj, IconAvatarName.LIGHTNING_BOLT, import_react_icons19.LightningBoltIcon), _define_property(_obj, IconAvatarName.FACE, import_react_icons19.FaceIcon), _define_property(_obj, IconAvatarName.PERSON, import_react_icons19.PersonIcon), _define_property(_obj, IconAvatarName.HEART, import_react_icons19.HeartIcon), _obj);
|
|
51048
51309
|
// src/components/iconAvatars/IconAvatar.tsx
|
|
51049
|
-
var
|
|
51310
|
+
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
51050
51311
|
var IconAvatar = function(t0) {
|
|
51051
|
-
var $ = (0,
|
|
51312
|
+
var $ = (0, import_react_compiler_runtime108.c)(7);
|
|
51052
51313
|
var iconAvatar = t0.iconAvatar, size = t0.size, className = t0.className, style = t0.style;
|
|
51053
51314
|
var t1;
|
|
51054
51315
|
t1 = iconAvatarComponents[iconAvatar.name];
|
|
51055
51316
|
var Component2 = t1;
|
|
51056
51317
|
var t2;
|
|
51057
51318
|
if ($[0] !== Component2) {
|
|
51058
|
-
t2 = Component2 ? /* @__PURE__ */ (0,
|
|
51319
|
+
t2 = Component2 ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Component2, {}) : "";
|
|
51059
51320
|
$[0] = Component2;
|
|
51060
51321
|
$[1] = t2;
|
|
51061
51322
|
} else {
|
|
@@ -51063,7 +51324,7 @@ var IconAvatar = function(t0) {
|
|
|
51063
51324
|
}
|
|
51064
51325
|
var t3;
|
|
51065
51326
|
if ($[2] !== className || $[3] !== size || $[4] !== style || $[5] !== t2) {
|
|
51066
|
-
t3 = /* @__PURE__ */ (0,
|
|
51327
|
+
t3 = /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_themes68.Avatar, {
|
|
51067
51328
|
className: className,
|
|
51068
51329
|
style: style,
|
|
51069
51330
|
size: size,
|
|
@@ -51080,16 +51341,16 @@ var IconAvatar = function(t0) {
|
|
|
51080
51341
|
return t3;
|
|
51081
51342
|
};
|
|
51082
51343
|
// src/components/avatars/Avatar.tsx
|
|
51083
|
-
var
|
|
51344
|
+
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
51084
51345
|
var Avatar6 = function(t0) {
|
|
51085
|
-
var $ = (0,
|
|
51346
|
+
var $ = (0, import_react_compiler_runtime109.c)(14);
|
|
51086
51347
|
var avatar = t0.avatar, t1 = t0.size, className = t0.className, style = t0.style;
|
|
51087
51348
|
var size = t1 === void 0 ? "1" : t1;
|
|
51088
51349
|
if (avatar) {
|
|
51089
51350
|
if (avatar.type === AvatarType.IMAGE && avatar.imageAvatar) {
|
|
51090
51351
|
var _t;
|
|
51091
51352
|
if ($[0] !== avatar.imageAvatar || $[1] !== className || $[2] !== size || $[3] !== style) {
|
|
51092
|
-
_t = /* @__PURE__ */ (0,
|
|
51353
|
+
_t = /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(ImageAvatar, {
|
|
51093
51354
|
imageAvatar: avatar.imageAvatar,
|
|
51094
51355
|
size: size,
|
|
51095
51356
|
className: className,
|
|
@@ -51108,7 +51369,7 @@ var Avatar6 = function(t0) {
|
|
|
51108
51369
|
if (avatar.type === AvatarType.ICON && avatar.iconAvatar) {
|
|
51109
51370
|
var _t2;
|
|
51110
51371
|
if ($[5] !== avatar.iconAvatar || $[6] !== className || $[7] !== size || $[8] !== style) {
|
|
51111
|
-
_t2 = /* @__PURE__ */ (0,
|
|
51372
|
+
_t2 = /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(IconAvatar, {
|
|
51112
51373
|
iconAvatar: avatar.iconAvatar,
|
|
51113
51374
|
size: size,
|
|
51114
51375
|
className: className,
|
|
@@ -51127,7 +51388,7 @@ var Avatar6 = function(t0) {
|
|
|
51127
51388
|
}
|
|
51128
51389
|
var t2;
|
|
51129
51390
|
if ($[10] !== className || $[11] !== size || $[12] !== style) {
|
|
51130
|
-
t2 = /* @__PURE__ */ (0,
|
|
51391
|
+
t2 = /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_themes69.Avatar, {
|
|
51131
51392
|
fallback: "",
|
|
51132
51393
|
size: size,
|
|
51133
51394
|
className: className,
|
|
@@ -51143,9 +51404,9 @@ var Avatar6 = function(t0) {
|
|
|
51143
51404
|
return t2;
|
|
51144
51405
|
};
|
|
51145
51406
|
// src/components/components/ComponentsProvider.tsx
|
|
51146
|
-
var
|
|
51147
|
-
var
|
|
51148
|
-
var
|
|
51407
|
+
var import_react_compiler_runtime110 = require("react-compiler-runtime");
|
|
51408
|
+
var import_react79 = require("react");
|
|
51409
|
+
var import_jsx_runtime106 = require("react/jsx-runtime");
|
|
51149
51410
|
var _excluded9 = [
|
|
51150
51411
|
"children"
|
|
51151
51412
|
];
|
|
@@ -51168,7 +51429,7 @@ function _objectWithoutPropertiesLoose9(r, e) {
|
|
|
51168
51429
|
return t;
|
|
51169
51430
|
}
|
|
51170
51431
|
var ComponentsProvider = function(t0) {
|
|
51171
|
-
var $ = (0,
|
|
51432
|
+
var $ = (0, import_react_compiler_runtime110.c)(9);
|
|
51172
51433
|
var children;
|
|
51173
51434
|
var rest;
|
|
51174
51435
|
if ($[0] !== t0) {
|
|
@@ -51198,7 +51459,7 @@ var ComponentsProvider = function(t0) {
|
|
|
51198
51459
|
var value = t1;
|
|
51199
51460
|
var t3;
|
|
51200
51461
|
if ($[6] !== children || $[7] !== value) {
|
|
51201
|
-
t3 = /* @__PURE__ */ (0,
|
|
51462
|
+
t3 = /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(ComponentsContext.Provider, {
|
|
51202
51463
|
value: value,
|
|
51203
51464
|
children: children
|
|
51204
51465
|
});
|
|
@@ -51211,11 +51472,11 @@ var ComponentsProvider = function(t0) {
|
|
|
51211
51472
|
return t3;
|
|
51212
51473
|
};
|
|
51213
51474
|
// src/components/assistants/AssistantProvider/index.tsx
|
|
51214
|
-
var
|
|
51215
|
-
var
|
|
51475
|
+
var import_react_compiler_runtime111 = require("react-compiler-runtime");
|
|
51476
|
+
var import_jsx_runtime107 = require("react/jsx-runtime");
|
|
51216
51477
|
var AssistantProvider = function(t0) {
|
|
51217
51478
|
var _assistant$name;
|
|
51218
|
-
var $ = (0,
|
|
51479
|
+
var $ = (0, import_react_compiler_runtime111.c)(10);
|
|
51219
51480
|
var children = t0.children;
|
|
51220
51481
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
51221
51482
|
var t1;
|
|
@@ -51233,7 +51494,7 @@ var AssistantProvider = function(t0) {
|
|
|
51233
51494
|
var t3 = assistant === null || assistant === void 0 ? void 0 : assistant.avatar;
|
|
51234
51495
|
var t4;
|
|
51235
51496
|
if ($[2] !== t3) {
|
|
51236
|
-
t4 = /* @__PURE__ */ (0,
|
|
51497
|
+
t4 = /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(Avatar6, {
|
|
51237
51498
|
avatar: t3
|
|
51238
51499
|
});
|
|
51239
51500
|
$[2] = t3;
|
|
@@ -51243,7 +51504,7 @@ var AssistantProvider = function(t0) {
|
|
|
51243
51504
|
}
|
|
51244
51505
|
var t5;
|
|
51245
51506
|
if ($[4] !== children || $[5] !== t4) {
|
|
51246
|
-
t5 = /* @__PURE__ */ (0,
|
|
51507
|
+
t5 = /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(AssistantAvatarContext.Provider, {
|
|
51247
51508
|
value: t4,
|
|
51248
51509
|
children: children
|
|
51249
51510
|
});
|
|
@@ -51255,7 +51516,7 @@ var AssistantProvider = function(t0) {
|
|
|
51255
51516
|
}
|
|
51256
51517
|
var t6;
|
|
51257
51518
|
if ($[7] !== t2 || $[8] !== t5) {
|
|
51258
|
-
t6 = /* @__PURE__ */ (0,
|
|
51519
|
+
t6 = /* @__PURE__ */ (0, import_jsx_runtime107.jsx)(AssistantNameContext.Provider, {
|
|
51259
51520
|
value: t2,
|
|
51260
51521
|
children: t5
|
|
51261
51522
|
});
|
|
@@ -51278,6 +51539,7 @@ var AssistantProvider = function(t0) {
|
|
|
51278
51539
|
ComponentsProvider: ComponentsProvider,
|
|
51279
51540
|
FunctionBase: FunctionBase,
|
|
51280
51541
|
FunctionComponentsContext: FunctionComponentsContext,
|
|
51542
|
+
Gui: Gui,
|
|
51281
51543
|
MarkdownContext: MarkdownContext,
|
|
51282
51544
|
MarkdownProvider: MarkdownProvider,
|
|
51283
51545
|
MessageContent: MessageContent,
|