@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.js
CHANGED
|
@@ -8292,7 +8292,7 @@ var require_lib = __commonJS({
|
|
|
8292
8292
|
key: "parseMaybeAssign",
|
|
8293
8293
|
value: function parseMaybeAssign(refExpressionErrors, afterLeftParse) {
|
|
8294
8294
|
var _this = this;
|
|
8295
|
-
var
|
|
8295
|
+
var _jsx108;
|
|
8296
8296
|
var state = null;
|
|
8297
8297
|
var jsx2;
|
|
8298
8298
|
if (this.hasPlugin("jsx") && (this.match(143) || this.match(47))) {
|
|
@@ -8307,7 +8307,7 @@ var require_lib = __commonJS({
|
|
|
8307
8307
|
context.pop();
|
|
8308
8308
|
}
|
|
8309
8309
|
}
|
|
8310
|
-
if ((
|
|
8310
|
+
if ((_jsx108 = jsx2) != null && _jsx108.error || this.match(47)) {
|
|
8311
8311
|
var _jsx210, _jsx310;
|
|
8312
8312
|
state = state || this.state.clone();
|
|
8313
8313
|
var typeParameters;
|
|
@@ -13173,7 +13173,7 @@ var require_lib = __commonJS({
|
|
|
13173
13173
|
key: "parseMaybeAssign",
|
|
13174
13174
|
value: function parseMaybeAssign(refExpressionErrors, afterLeftParse) {
|
|
13175
13175
|
var _this = this;
|
|
13176
|
-
var
|
|
13176
|
+
var _jsx108, _jsx210, _typeCast, _jsx310, _typeCast2;
|
|
13177
13177
|
var state;
|
|
13178
13178
|
var jsx2;
|
|
13179
13179
|
var typeCast;
|
|
@@ -13189,7 +13189,7 @@ var require_lib = __commonJS({
|
|
|
13189
13189
|
context.pop();
|
|
13190
13190
|
}
|
|
13191
13191
|
}
|
|
13192
|
-
if (!((
|
|
13192
|
+
if (!((_jsx108 = jsx2) != null && _jsx108.error) && !this.match(47)) {
|
|
13193
13193
|
return _get(_get_prototype_of(TypeScriptParserMixin.prototype), "parseMaybeAssign", this).call(this, refExpressionErrors, afterLeftParse);
|
|
13194
13194
|
}
|
|
13195
13195
|
if (!state || state === this.state) state = this.state.clone();
|
|
@@ -38027,11 +38027,11 @@ var Root = function(t0) {
|
|
|
38027
38027
|
var StartingToolCalls = function() {
|
|
38028
38028
|
var $ = _c6(2);
|
|
38029
38029
|
var _useComponents = useComponents(), t0 = _useComponents.components;
|
|
38030
|
-
var
|
|
38030
|
+
var StartingToolCalls4 = t0.StartingToolCalls;
|
|
38031
38031
|
var t1;
|
|
38032
|
-
if ($[0] !==
|
|
38033
|
-
t1 = /* @__PURE__ */ _jsx7(
|
|
38034
|
-
$[0] =
|
|
38032
|
+
if ($[0] !== StartingToolCalls4) {
|
|
38033
|
+
t1 = /* @__PURE__ */ _jsx7(StartingToolCalls4, {});
|
|
38034
|
+
$[0] = StartingToolCalls4;
|
|
38035
38035
|
$[1] = t1;
|
|
38036
38036
|
} else {
|
|
38037
38037
|
t1 = $[1];
|
|
@@ -50434,10 +50434,268 @@ var WebrtcAudioRuntimeProvider = function(t0) {
|
|
|
50434
50434
|
}
|
|
50435
50435
|
return t2;
|
|
50436
50436
|
};
|
|
50437
|
-
// src/components/
|
|
50437
|
+
// src/components/gui/Gui/index.tsx
|
|
50438
|
+
import { c as _c102 } from "react-compiler-runtime";
|
|
50439
|
+
import { useMemo as useMemo23 } from "react";
|
|
50440
|
+
import { Flex as Flex35, Card as Card5, Spinner as Spinner3 } from "@radix-ui/themes";
|
|
50441
|
+
// src/hooks/messages/useLatestAssistantMessage/index.ts
|
|
50438
50442
|
import { c as _c100 } from "react-compiler-runtime";
|
|
50439
50443
|
import { useMemo as useMemo21 } from "react";
|
|
50440
|
-
|
|
50444
|
+
var useLatestAssistantMessage = function() {
|
|
50445
|
+
var $ = _c100(4);
|
|
50446
|
+
var _useMessages = useMessages(), messages2 = _useMessages.messages;
|
|
50447
|
+
var t0;
|
|
50448
|
+
var t1;
|
|
50449
|
+
if ($[0] !== messages2) {
|
|
50450
|
+
var _messages$find;
|
|
50451
|
+
t1 = (_messages$find = messages2.find(_temp11)) !== null && _messages$find !== void 0 ? _messages$find : null;
|
|
50452
|
+
$[0] = messages2;
|
|
50453
|
+
$[1] = t1;
|
|
50454
|
+
} else {
|
|
50455
|
+
t1 = $[1];
|
|
50456
|
+
}
|
|
50457
|
+
var t2;
|
|
50458
|
+
if ($[2] !== t1) {
|
|
50459
|
+
t2 = {
|
|
50460
|
+
latestAssistantMessage: t1
|
|
50461
|
+
};
|
|
50462
|
+
$[2] = t1;
|
|
50463
|
+
$[3] = t2;
|
|
50464
|
+
} else {
|
|
50465
|
+
t2 = $[3];
|
|
50466
|
+
}
|
|
50467
|
+
t0 = t2;
|
|
50468
|
+
return t0;
|
|
50469
|
+
};
|
|
50470
|
+
function _temp11(message) {
|
|
50471
|
+
return message.role === "assistant";
|
|
50472
|
+
}
|
|
50473
|
+
// src/hooks/messages/useLatestAssistantMessageWithContent/index.ts
|
|
50474
|
+
import { c as _c101 } from "react-compiler-runtime";
|
|
50475
|
+
import { isEmpty as isEmpty3 } from "radash";
|
|
50476
|
+
import { useMemo as useMemo22 } from "react";
|
|
50477
|
+
var useLatestAssistantMessageWithContent = function() {
|
|
50478
|
+
var $ = _c101(4);
|
|
50479
|
+
var _useMessages = useMessages(), messages2 = _useMessages.messages;
|
|
50480
|
+
var t0;
|
|
50481
|
+
var t1;
|
|
50482
|
+
if ($[0] !== messages2) {
|
|
50483
|
+
var _messages$find;
|
|
50484
|
+
t1 = (_messages$find = messages2.find(_temp25)) !== null && _messages$find !== void 0 ? _messages$find : null;
|
|
50485
|
+
$[0] = messages2;
|
|
50486
|
+
$[1] = t1;
|
|
50487
|
+
} else {
|
|
50488
|
+
t1 = $[1];
|
|
50489
|
+
}
|
|
50490
|
+
var t2;
|
|
50491
|
+
if ($[2] !== t1) {
|
|
50492
|
+
t2 = {
|
|
50493
|
+
latestAssistantMessageWithContent: t1
|
|
50494
|
+
};
|
|
50495
|
+
$[2] = t1;
|
|
50496
|
+
$[3] = t2;
|
|
50497
|
+
} else {
|
|
50498
|
+
t2 = $[3];
|
|
50499
|
+
}
|
|
50500
|
+
t0 = t2;
|
|
50501
|
+
return t0;
|
|
50502
|
+
};
|
|
50503
|
+
function _temp12(content2) {
|
|
50504
|
+
return content2.type === "text" && !isEmpty3(content2.text.value);
|
|
50505
|
+
}
|
|
50506
|
+
function _temp25(message) {
|
|
50507
|
+
return message.role === "assistant" && message.content.some(_temp12);
|
|
50508
|
+
}
|
|
50509
|
+
// src/components/gui/Gui/index.tsx
|
|
50510
|
+
import { jsx as _jsx98, jsxs as _jsxs37 } from "react/jsx-runtime";
|
|
50511
|
+
var StartingToolCalls3 = function() {
|
|
50512
|
+
var $ = _c102(2);
|
|
50513
|
+
var _useComponents = useComponents(), t0 = _useComponents.components;
|
|
50514
|
+
var StartingToolCalls4 = t0.StartingToolCalls;
|
|
50515
|
+
var t1;
|
|
50516
|
+
if ($[0] !== StartingToolCalls4) {
|
|
50517
|
+
t1 = /* @__PURE__ */ _jsx98(StartingToolCalls4, {});
|
|
50518
|
+
$[0] = StartingToolCalls4;
|
|
50519
|
+
$[1] = t1;
|
|
50520
|
+
} else {
|
|
50521
|
+
t1 = $[1];
|
|
50522
|
+
}
|
|
50523
|
+
return t1;
|
|
50524
|
+
};
|
|
50525
|
+
var Content10 = function(t0) {
|
|
50526
|
+
var $ = _c102(5);
|
|
50527
|
+
var latestRunStep = t0.latestRunStep;
|
|
50528
|
+
var t1;
|
|
50529
|
+
bb0: {
|
|
50530
|
+
if (!latestRunStep) {
|
|
50531
|
+
t1 = null;
|
|
50532
|
+
break bb0;
|
|
50533
|
+
}
|
|
50534
|
+
if (!latestRunStep.step_details) {
|
|
50535
|
+
t1 = null;
|
|
50536
|
+
break bb0;
|
|
50537
|
+
}
|
|
50538
|
+
if (latestRunStep.step_details.type !== "tool_calls") {
|
|
50539
|
+
t1 = null;
|
|
50540
|
+
break bb0;
|
|
50541
|
+
}
|
|
50542
|
+
t1 = latestRunStep.step_details.tool_calls[0];
|
|
50543
|
+
}
|
|
50544
|
+
var latestToolCall = t1;
|
|
50545
|
+
if (!latestRunStep || latestRunStep.step_details.type !== "tool_calls") {
|
|
50546
|
+
var _t;
|
|
50547
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
50548
|
+
_t = /* @__PURE__ */ _jsx98(Spinner3, {});
|
|
50549
|
+
$[0] = _t;
|
|
50550
|
+
} else {
|
|
50551
|
+
_t = $[0];
|
|
50552
|
+
}
|
|
50553
|
+
return _t;
|
|
50554
|
+
}
|
|
50555
|
+
if (!latestToolCall) {
|
|
50556
|
+
var _t2;
|
|
50557
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
50558
|
+
_t2 = /* @__PURE__ */ _jsx98(StartingToolCalls3, {});
|
|
50559
|
+
$[1] = _t2;
|
|
50560
|
+
} else {
|
|
50561
|
+
_t2 = $[1];
|
|
50562
|
+
}
|
|
50563
|
+
return _t2;
|
|
50564
|
+
}
|
|
50565
|
+
var t2;
|
|
50566
|
+
if ($[2] !== latestRunStep || $[3] !== latestToolCall) {
|
|
50567
|
+
t2 = /* @__PURE__ */ _jsx98(ToolCall, {
|
|
50568
|
+
runStep: latestRunStep,
|
|
50569
|
+
toolCall: latestToolCall
|
|
50570
|
+
});
|
|
50571
|
+
$[2] = latestRunStep;
|
|
50572
|
+
$[3] = latestToolCall;
|
|
50573
|
+
$[4] = t2;
|
|
50574
|
+
} else {
|
|
50575
|
+
t2 = $[4];
|
|
50576
|
+
}
|
|
50577
|
+
return t2;
|
|
50578
|
+
};
|
|
50579
|
+
var Progress2 = function(t0) {
|
|
50580
|
+
var $ = _c102(5);
|
|
50581
|
+
var latestAssistantMessage = t0.latestAssistantMessage;
|
|
50582
|
+
var isMutatingMessage = useIsMutatingMessage();
|
|
50583
|
+
var t1;
|
|
50584
|
+
var t2;
|
|
50585
|
+
if ($[0] !== latestAssistantMessage.runSteps) {
|
|
50586
|
+
var _latestAssistantMessa;
|
|
50587
|
+
t2 = (_latestAssistantMessa = latestAssistantMessage.runSteps.find(_temp13)) !== null && _latestAssistantMessa !== void 0 ? _latestAssistantMessa : null;
|
|
50588
|
+
$[0] = latestAssistantMessage.runSteps;
|
|
50589
|
+
$[1] = t2;
|
|
50590
|
+
} else {
|
|
50591
|
+
t2 = $[1];
|
|
50592
|
+
}
|
|
50593
|
+
t1 = t2;
|
|
50594
|
+
var latestRunStep = t1;
|
|
50595
|
+
if (latestAssistantMessage.status !== "in_progress" && !isMutatingMessage) {
|
|
50596
|
+
return null;
|
|
50597
|
+
}
|
|
50598
|
+
var t3;
|
|
50599
|
+
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
50600
|
+
t3 = {
|
|
50601
|
+
position: "fixed",
|
|
50602
|
+
left: 0,
|
|
50603
|
+
bottom: 0,
|
|
50604
|
+
right: 0,
|
|
50605
|
+
justifyContent: "center",
|
|
50606
|
+
padding: "var(--space-5)"
|
|
50607
|
+
};
|
|
50608
|
+
$[2] = t3;
|
|
50609
|
+
} else {
|
|
50610
|
+
t3 = $[2];
|
|
50611
|
+
}
|
|
50612
|
+
var t4;
|
|
50613
|
+
if ($[3] !== latestRunStep) {
|
|
50614
|
+
t4 = /* @__PURE__ */ _jsx98(Flex35, {
|
|
50615
|
+
style: t3,
|
|
50616
|
+
children: /* @__PURE__ */ _jsx98(Card5, {
|
|
50617
|
+
children: /* @__PURE__ */ _jsx98(Content10, {
|
|
50618
|
+
latestRunStep: latestRunStep
|
|
50619
|
+
})
|
|
50620
|
+
})
|
|
50621
|
+
});
|
|
50622
|
+
$[3] = latestRunStep;
|
|
50623
|
+
$[4] = t4;
|
|
50624
|
+
} else {
|
|
50625
|
+
t4 = $[4];
|
|
50626
|
+
}
|
|
50627
|
+
return t4;
|
|
50628
|
+
};
|
|
50629
|
+
var Gui = function() {
|
|
50630
|
+
var $ = _c102(8);
|
|
50631
|
+
var latestAssistantMessage = useLatestAssistantMessage().latestAssistantMessage;
|
|
50632
|
+
var latestAssistantMessageWithContent = useLatestAssistantMessageWithContent().latestAssistantMessageWithContent;
|
|
50633
|
+
if (!latestAssistantMessage || !latestAssistantMessageWithContent) {
|
|
50634
|
+
var _t3;
|
|
50635
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
50636
|
+
_t3 = /* @__PURE__ */ _jsx98(Flex35, {
|
|
50637
|
+
direction: "column",
|
|
50638
|
+
flexGrow: "1",
|
|
50639
|
+
children: /* @__PURE__ */ _jsx98(Flex35, {
|
|
50640
|
+
align: "center",
|
|
50641
|
+
justify: "center",
|
|
50642
|
+
flexGrow: "1",
|
|
50643
|
+
children: /* @__PURE__ */ _jsx98(Spinner3, {
|
|
50644
|
+
size: "3"
|
|
50645
|
+
})
|
|
50646
|
+
})
|
|
50647
|
+
});
|
|
50648
|
+
$[0] = _t3;
|
|
50649
|
+
} else {
|
|
50650
|
+
_t3 = $[0];
|
|
50651
|
+
}
|
|
50652
|
+
return _t3;
|
|
50653
|
+
}
|
|
50654
|
+
var t0;
|
|
50655
|
+
if ($[1] !== latestAssistantMessageWithContent) {
|
|
50656
|
+
t0 = /* @__PURE__ */ _jsx98(MessageContent, {
|
|
50657
|
+
message: latestAssistantMessageWithContent
|
|
50658
|
+
});
|
|
50659
|
+
$[1] = latestAssistantMessageWithContent;
|
|
50660
|
+
$[2] = t0;
|
|
50661
|
+
} else {
|
|
50662
|
+
t0 = $[2];
|
|
50663
|
+
}
|
|
50664
|
+
var t1;
|
|
50665
|
+
if ($[3] !== latestAssistantMessage) {
|
|
50666
|
+
t1 = /* @__PURE__ */ _jsx98(Progress2, {
|
|
50667
|
+
latestAssistantMessage: latestAssistantMessage
|
|
50668
|
+
});
|
|
50669
|
+
$[3] = latestAssistantMessage;
|
|
50670
|
+
$[4] = t1;
|
|
50671
|
+
} else {
|
|
50672
|
+
t1 = $[4];
|
|
50673
|
+
}
|
|
50674
|
+
var t2;
|
|
50675
|
+
if ($[5] !== t0 || $[6] !== t1) {
|
|
50676
|
+
t2 = /* @__PURE__ */ _jsxs37(Flex35, {
|
|
50677
|
+
direction: "column",
|
|
50678
|
+
flexGrow: "1",
|
|
50679
|
+
children: [
|
|
50680
|
+
t0,
|
|
50681
|
+
t1
|
|
50682
|
+
]
|
|
50683
|
+
});
|
|
50684
|
+
$[5] = t0;
|
|
50685
|
+
$[6] = t1;
|
|
50686
|
+
$[7] = t2;
|
|
50687
|
+
} else {
|
|
50688
|
+
t2 = $[7];
|
|
50689
|
+
}
|
|
50690
|
+
return t2;
|
|
50691
|
+
};
|
|
50692
|
+
function _temp13(rs) {
|
|
50693
|
+
return rs.status === "in_progress";
|
|
50694
|
+
}
|
|
50695
|
+
// src/components/markdown/MarkdownProvider/index.tsx
|
|
50696
|
+
import { c as _c103 } from "react-compiler-runtime";
|
|
50697
|
+
import { useMemo as useMemo24 } from "react";
|
|
50698
|
+
import { jsx as _jsx99 } from "react/jsx-runtime";
|
|
50441
50699
|
var _excluded7 = [
|
|
50442
50700
|
"children"
|
|
50443
50701
|
];
|
|
@@ -50460,7 +50718,7 @@ function _objectWithoutPropertiesLoose7(r, e) {
|
|
|
50460
50718
|
return t;
|
|
50461
50719
|
}
|
|
50462
50720
|
var MarkdownProvider = function(t0) {
|
|
50463
|
-
var $ =
|
|
50721
|
+
var $ = _c103(9);
|
|
50464
50722
|
var children;
|
|
50465
50723
|
var rest;
|
|
50466
50724
|
if ($[0] !== t0) {
|
|
@@ -50490,7 +50748,7 @@ var MarkdownProvider = function(t0) {
|
|
|
50490
50748
|
var value = t1;
|
|
50491
50749
|
var t3;
|
|
50492
50750
|
if ($[6] !== children || $[7] !== value) {
|
|
50493
|
-
t3 = /* @__PURE__ */
|
|
50751
|
+
t3 = /* @__PURE__ */ _jsx99(MarkdownContext.Provider, {
|
|
50494
50752
|
value: value,
|
|
50495
50753
|
children: children
|
|
50496
50754
|
});
|
|
@@ -50503,18 +50761,18 @@ var MarkdownProvider = function(t0) {
|
|
|
50503
50761
|
return t3;
|
|
50504
50762
|
};
|
|
50505
50763
|
// src/components/annotations/SourceAnnotation/index.tsx
|
|
50506
|
-
import { c as
|
|
50764
|
+
import { c as _c106 } from "react-compiler-runtime";
|
|
50507
50765
|
// src/components/annotations/SourceAnnotation/FileCitation/index.tsx
|
|
50508
|
-
import { c as
|
|
50766
|
+
import { c as _c105 } from "react-compiler-runtime";
|
|
50509
50767
|
import { useState as useState13 } from "react";
|
|
50510
50768
|
import { QuoteIcon as QuoteIcon2 } from "@radix-ui/react-icons";
|
|
50511
50769
|
import { Dialog, VisuallyHidden, IconButton as IconButton11 } from "@radix-ui/themes";
|
|
50512
50770
|
// src/components/annotations/SourceAnnotation/FileCitation/Content.tsx
|
|
50513
|
-
import { c as
|
|
50514
|
-
import { Flex as
|
|
50515
|
-
import { jsx as
|
|
50516
|
-
var
|
|
50517
|
-
var $ =
|
|
50771
|
+
import { c as _c104 } from "react-compiler-runtime";
|
|
50772
|
+
import { Flex as Flex36, Card as Card6, Inset as Inset3 } from "@radix-ui/themes";
|
|
50773
|
+
import { jsx as _jsx100 } from "react/jsx-runtime";
|
|
50774
|
+
var Content11 = function(t0) {
|
|
50775
|
+
var $ = _c104(5);
|
|
50518
50776
|
var fileId = t0.fileId;
|
|
50519
50777
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
50520
50778
|
var nextSearchParams = new URLSearchParams(superinterfaceContext.variables);
|
|
@@ -50551,18 +50809,18 @@ var Content10 = function(t0) {
|
|
|
50551
50809
|
}
|
|
50552
50810
|
var t5;
|
|
50553
50811
|
if ($[3] !== t3) {
|
|
50554
|
-
t5 = /* @__PURE__ */
|
|
50812
|
+
t5 = /* @__PURE__ */ _jsx100(Flex36, {
|
|
50555
50813
|
direction: "column",
|
|
50556
50814
|
flexGrow: "1",
|
|
50557
50815
|
gap: "3",
|
|
50558
|
-
children: /* @__PURE__ */
|
|
50816
|
+
children: /* @__PURE__ */ _jsx100(Card6, {
|
|
50559
50817
|
style: t1,
|
|
50560
|
-
children: /* @__PURE__ */
|
|
50818
|
+
children: /* @__PURE__ */ _jsx100(Inset3, {
|
|
50561
50819
|
clip: "padding-box",
|
|
50562
50820
|
style: t2,
|
|
50563
|
-
children: /* @__PURE__ */
|
|
50821
|
+
children: /* @__PURE__ */ _jsx100(Flex36, {
|
|
50564
50822
|
flexGrow: "1",
|
|
50565
|
-
children: /* @__PURE__ */
|
|
50823
|
+
children: /* @__PURE__ */ _jsx100("embed", {
|
|
50566
50824
|
src: t3,
|
|
50567
50825
|
style: t4
|
|
50568
50826
|
})
|
|
@@ -50578,9 +50836,9 @@ var Content10 = function(t0) {
|
|
|
50578
50836
|
return t5;
|
|
50579
50837
|
};
|
|
50580
50838
|
// src/components/annotations/SourceAnnotation/FileCitation/index.tsx
|
|
50581
|
-
import { jsx as
|
|
50839
|
+
import { jsx as _jsx101, jsxs as _jsxs38, Fragment as _Fragment6 } from "react/jsx-runtime";
|
|
50582
50840
|
var FileCitation = function(t0) {
|
|
50583
|
-
var $ =
|
|
50841
|
+
var $ = _c105(18);
|
|
50584
50842
|
var annotation = t0.annotation;
|
|
50585
50843
|
var _useState13 = _sliced_to_array(useState13(null), 2), activeFileId = _useState13[0], setActiveFileId = _useState13[1];
|
|
50586
50844
|
var t1;
|
|
@@ -50595,14 +50853,14 @@ var FileCitation = function(t0) {
|
|
|
50595
50853
|
}
|
|
50596
50854
|
var t2;
|
|
50597
50855
|
if ($[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
50598
|
-
t2 = /* @__PURE__ */
|
|
50856
|
+
t2 = /* @__PURE__ */ _jsx101(QuoteIcon2, {});
|
|
50599
50857
|
$[2] = t2;
|
|
50600
50858
|
} else {
|
|
50601
50859
|
t2 = $[2];
|
|
50602
50860
|
}
|
|
50603
50861
|
var t3;
|
|
50604
50862
|
if ($[3] !== t1) {
|
|
50605
|
-
t3 = /* @__PURE__ */
|
|
50863
|
+
t3 = /* @__PURE__ */ _jsx101(IconButton11, {
|
|
50606
50864
|
variant: "soft",
|
|
50607
50865
|
color: "gray",
|
|
50608
50866
|
size: "1",
|
|
@@ -50638,9 +50896,9 @@ var FileCitation = function(t0) {
|
|
|
50638
50896
|
}
|
|
50639
50897
|
var t7;
|
|
50640
50898
|
if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
|
|
50641
|
-
t7 = /* @__PURE__ */
|
|
50899
|
+
t7 = /* @__PURE__ */ _jsx101(VisuallyHidden, {
|
|
50642
50900
|
asChild: true,
|
|
50643
|
-
children: /* @__PURE__ */
|
|
50901
|
+
children: /* @__PURE__ */ _jsx101(Dialog.Title, {
|
|
50644
50902
|
children: "Source"
|
|
50645
50903
|
})
|
|
50646
50904
|
});
|
|
@@ -50650,7 +50908,7 @@ var FileCitation = function(t0) {
|
|
|
50650
50908
|
}
|
|
50651
50909
|
var t8;
|
|
50652
50910
|
if ($[8] !== activeFileId) {
|
|
50653
|
-
t8 = activeFileId && /* @__PURE__ */
|
|
50911
|
+
t8 = activeFileId && /* @__PURE__ */ _jsx101(Content11, {
|
|
50654
50912
|
fileId: activeFileId
|
|
50655
50913
|
});
|
|
50656
50914
|
$[8] = activeFileId;
|
|
@@ -50660,7 +50918,7 @@ var FileCitation = function(t0) {
|
|
|
50660
50918
|
}
|
|
50661
50919
|
var t9;
|
|
50662
50920
|
if ($[10] !== t8) {
|
|
50663
|
-
t9 = /* @__PURE__ */
|
|
50921
|
+
t9 = /* @__PURE__ */ _jsxs38(Dialog.Content, {
|
|
50664
50922
|
width: "1000px",
|
|
50665
50923
|
height: "90vh",
|
|
50666
50924
|
maxWidth: "calc(100vw - 2 * var(--space-4))",
|
|
@@ -50678,7 +50936,7 @@ var FileCitation = function(t0) {
|
|
|
50678
50936
|
}
|
|
50679
50937
|
var t10;
|
|
50680
50938
|
if ($[12] !== t4 || $[13] !== t9) {
|
|
50681
|
-
t10 = /* @__PURE__ */
|
|
50939
|
+
t10 = /* @__PURE__ */ _jsx101(Dialog.Root, {
|
|
50682
50940
|
open: t4,
|
|
50683
50941
|
onOpenChange: t5,
|
|
50684
50942
|
children: t9
|
|
@@ -50691,7 +50949,7 @@ var FileCitation = function(t0) {
|
|
|
50691
50949
|
}
|
|
50692
50950
|
var t11;
|
|
50693
50951
|
if ($[15] !== t10 || $[16] !== t3) {
|
|
50694
|
-
t11 = /* @__PURE__ */
|
|
50952
|
+
t11 = /* @__PURE__ */ _jsxs38(_Fragment6, {
|
|
50695
50953
|
children: [
|
|
50696
50954
|
t3,
|
|
50697
50955
|
t10
|
|
@@ -50706,7 +50964,7 @@ var FileCitation = function(t0) {
|
|
|
50706
50964
|
return t11;
|
|
50707
50965
|
};
|
|
50708
50966
|
// src/components/annotations/SourceAnnotation/index.tsx
|
|
50709
|
-
import { jsx as
|
|
50967
|
+
import { jsx as _jsx102 } from "react/jsx-runtime";
|
|
50710
50968
|
var _excluded8 = [
|
|
50711
50969
|
"children"
|
|
50712
50970
|
];
|
|
@@ -50729,7 +50987,7 @@ function _objectWithoutPropertiesLoose8(r, e) {
|
|
|
50729
50987
|
return t;
|
|
50730
50988
|
}
|
|
50731
50989
|
var SourceAnnotation = function(t0) {
|
|
50732
|
-
var $ =
|
|
50990
|
+
var $ = _c106(10);
|
|
50733
50991
|
var children;
|
|
50734
50992
|
var rest;
|
|
50735
50993
|
if ($[0] !== t0) {
|
|
@@ -50757,7 +51015,7 @@ var SourceAnnotation = function(t0) {
|
|
|
50757
51015
|
if (annotation.type === "file_citation") {
|
|
50758
51016
|
var t2;
|
|
50759
51017
|
if ($[5] !== annotation) {
|
|
50760
|
-
t2 = /* @__PURE__ */
|
|
51018
|
+
t2 = /* @__PURE__ */ _jsx102(FileCitation, {
|
|
50761
51019
|
annotation: annotation
|
|
50762
51020
|
});
|
|
50763
51021
|
$[5] = annotation;
|
|
@@ -50770,7 +51028,7 @@ var SourceAnnotation = function(t0) {
|
|
|
50770
51028
|
if (annotation.type === "file_path") {
|
|
50771
51029
|
var _t2;
|
|
50772
51030
|
if ($[7] !== annotation || $[8] !== children) {
|
|
50773
|
-
_t2 = /* @__PURE__ */
|
|
51031
|
+
_t2 = /* @__PURE__ */ _jsx102(FilePathAnnotation, {
|
|
50774
51032
|
annotation: annotation,
|
|
50775
51033
|
children: children
|
|
50776
51034
|
});
|
|
@@ -50786,7 +51044,7 @@ var SourceAnnotation = function(t0) {
|
|
|
50786
51044
|
return null;
|
|
50787
51045
|
};
|
|
50788
51046
|
// src/components/avatars/Avatar.tsx
|
|
50789
|
-
import { c as
|
|
51047
|
+
import { c as _c109 } from "react-compiler-runtime";
|
|
50790
51048
|
// src/lib/enums/index.ts
|
|
50791
51049
|
var IconAvatarName = /* @__PURE__ */ function(IconAvatarName2) {
|
|
50792
51050
|
IconAvatarName2["BACKPACK"] = "BACKPACK";
|
|
@@ -50811,7 +51069,7 @@ var AvatarType = /* @__PURE__ */ function(AvatarType2) {
|
|
|
50811
51069
|
// src/components/avatars/Avatar.tsx
|
|
50812
51070
|
import { Avatar as RadixAvatar } from "@radix-ui/themes";
|
|
50813
51071
|
// src/components/imageAvatars/ImageAvatar/index.tsx
|
|
50814
|
-
import { c as
|
|
51072
|
+
import { c as _c107 } from "react-compiler-runtime";
|
|
50815
51073
|
import { Avatar as Avatar4 } from "@radix-ui/themes";
|
|
50816
51074
|
// src/components/imageAvatars/ImageAvatar/lib/optimizedSrc/path.ts
|
|
50817
51075
|
var width = function(_ref) {
|
|
@@ -50863,9 +51121,9 @@ var optimizedSrc = function(_ref) {
|
|
|
50863
51121
|
}));
|
|
50864
51122
|
};
|
|
50865
51123
|
// src/components/imageAvatars/ImageAvatar/index.tsx
|
|
50866
|
-
import { jsx as
|
|
51124
|
+
import { jsx as _jsx103 } from "react/jsx-runtime";
|
|
50867
51125
|
var ImageAvatar = function(t0) {
|
|
50868
|
-
var $ =
|
|
51126
|
+
var $ = _c107(9);
|
|
50869
51127
|
var imageAvatar = t0.imageAvatar, size = t0.size, className = t0.className, style = t0.style;
|
|
50870
51128
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
50871
51129
|
var t1;
|
|
@@ -50884,7 +51142,7 @@ var ImageAvatar = function(t0) {
|
|
|
50884
51142
|
}
|
|
50885
51143
|
var t2;
|
|
50886
51144
|
if ($[4] !== className || $[5] !== size || $[6] !== style || $[7] !== t1) {
|
|
50887
|
-
t2 = /* @__PURE__ */
|
|
51145
|
+
t2 = /* @__PURE__ */ _jsx103(Avatar4, {
|
|
50888
51146
|
className: className,
|
|
50889
51147
|
style: style,
|
|
50890
51148
|
fallback: "",
|
|
@@ -50902,24 +51160,24 @@ var ImageAvatar = function(t0) {
|
|
|
50902
51160
|
return t2;
|
|
50903
51161
|
};
|
|
50904
51162
|
// src/components/iconAvatars/IconAvatar.tsx
|
|
50905
|
-
import { c as
|
|
50906
|
-
import { useMemo as
|
|
51163
|
+
import { c as _c108 } from "react-compiler-runtime";
|
|
51164
|
+
import { useMemo as useMemo25 } from "react";
|
|
50907
51165
|
import { Avatar as Avatar5 } from "@radix-ui/themes";
|
|
50908
51166
|
// src/lib/iconAvatars/iconAvatarComponents.ts
|
|
50909
51167
|
import { BackpackIcon, RocketIcon, MagicWandIcon, CubeIcon, TargetIcon, DiscIcon, GlobeIcon, StarIcon, LightningBoltIcon as LightningBoltIcon2, FaceIcon, PersonIcon as PersonIcon2, HeartIcon } from "@radix-ui/react-icons";
|
|
50910
51168
|
var _obj;
|
|
50911
51169
|
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);
|
|
50912
51170
|
// src/components/iconAvatars/IconAvatar.tsx
|
|
50913
|
-
import { jsx as
|
|
51171
|
+
import { jsx as _jsx104 } from "react/jsx-runtime";
|
|
50914
51172
|
var IconAvatar = function(t0) {
|
|
50915
|
-
var $ =
|
|
51173
|
+
var $ = _c108(7);
|
|
50916
51174
|
var iconAvatar = t0.iconAvatar, size = t0.size, className = t0.className, style = t0.style;
|
|
50917
51175
|
var t1;
|
|
50918
51176
|
t1 = iconAvatarComponents[iconAvatar.name];
|
|
50919
51177
|
var Component2 = t1;
|
|
50920
51178
|
var t2;
|
|
50921
51179
|
if ($[0] !== Component2) {
|
|
50922
|
-
t2 = Component2 ? /* @__PURE__ */
|
|
51180
|
+
t2 = Component2 ? /* @__PURE__ */ _jsx104(Component2, {}) : "";
|
|
50923
51181
|
$[0] = Component2;
|
|
50924
51182
|
$[1] = t2;
|
|
50925
51183
|
} else {
|
|
@@ -50927,7 +51185,7 @@ var IconAvatar = function(t0) {
|
|
|
50927
51185
|
}
|
|
50928
51186
|
var t3;
|
|
50929
51187
|
if ($[2] !== className || $[3] !== size || $[4] !== style || $[5] !== t2) {
|
|
50930
|
-
t3 = /* @__PURE__ */
|
|
51188
|
+
t3 = /* @__PURE__ */ _jsx104(Avatar5, {
|
|
50931
51189
|
className: className,
|
|
50932
51190
|
style: style,
|
|
50933
51191
|
size: size,
|
|
@@ -50944,16 +51202,16 @@ var IconAvatar = function(t0) {
|
|
|
50944
51202
|
return t3;
|
|
50945
51203
|
};
|
|
50946
51204
|
// src/components/avatars/Avatar.tsx
|
|
50947
|
-
import { jsx as
|
|
51205
|
+
import { jsx as _jsx105 } from "react/jsx-runtime";
|
|
50948
51206
|
var Avatar6 = function(t0) {
|
|
50949
|
-
var $ =
|
|
51207
|
+
var $ = _c109(14);
|
|
50950
51208
|
var avatar = t0.avatar, t1 = t0.size, className = t0.className, style = t0.style;
|
|
50951
51209
|
var size = t1 === void 0 ? "1" : t1;
|
|
50952
51210
|
if (avatar) {
|
|
50953
51211
|
if (avatar.type === AvatarType.IMAGE && avatar.imageAvatar) {
|
|
50954
51212
|
var _t;
|
|
50955
51213
|
if ($[0] !== avatar.imageAvatar || $[1] !== className || $[2] !== size || $[3] !== style) {
|
|
50956
|
-
_t = /* @__PURE__ */
|
|
51214
|
+
_t = /* @__PURE__ */ _jsx105(ImageAvatar, {
|
|
50957
51215
|
imageAvatar: avatar.imageAvatar,
|
|
50958
51216
|
size: size,
|
|
50959
51217
|
className: className,
|
|
@@ -50972,7 +51230,7 @@ var Avatar6 = function(t0) {
|
|
|
50972
51230
|
if (avatar.type === AvatarType.ICON && avatar.iconAvatar) {
|
|
50973
51231
|
var _t2;
|
|
50974
51232
|
if ($[5] !== avatar.iconAvatar || $[6] !== className || $[7] !== size || $[8] !== style) {
|
|
50975
|
-
_t2 = /* @__PURE__ */
|
|
51233
|
+
_t2 = /* @__PURE__ */ _jsx105(IconAvatar, {
|
|
50976
51234
|
iconAvatar: avatar.iconAvatar,
|
|
50977
51235
|
size: size,
|
|
50978
51236
|
className: className,
|
|
@@ -50991,7 +51249,7 @@ var Avatar6 = function(t0) {
|
|
|
50991
51249
|
}
|
|
50992
51250
|
var t2;
|
|
50993
51251
|
if ($[10] !== className || $[11] !== size || $[12] !== style) {
|
|
50994
|
-
t2 = /* @__PURE__ */
|
|
51252
|
+
t2 = /* @__PURE__ */ _jsx105(RadixAvatar, {
|
|
50995
51253
|
fallback: "",
|
|
50996
51254
|
size: size,
|
|
50997
51255
|
className: className,
|
|
@@ -51007,9 +51265,9 @@ var Avatar6 = function(t0) {
|
|
|
51007
51265
|
return t2;
|
|
51008
51266
|
};
|
|
51009
51267
|
// src/components/components/ComponentsProvider.tsx
|
|
51010
|
-
import { c as
|
|
51011
|
-
import { useMemo as
|
|
51012
|
-
import { jsx as
|
|
51268
|
+
import { c as _c110 } from "react-compiler-runtime";
|
|
51269
|
+
import { useMemo as useMemo26 } from "react";
|
|
51270
|
+
import { jsx as _jsx106 } from "react/jsx-runtime";
|
|
51013
51271
|
var _excluded9 = [
|
|
51014
51272
|
"children"
|
|
51015
51273
|
];
|
|
@@ -51032,7 +51290,7 @@ function _objectWithoutPropertiesLoose9(r, e) {
|
|
|
51032
51290
|
return t;
|
|
51033
51291
|
}
|
|
51034
51292
|
var ComponentsProvider = function(t0) {
|
|
51035
|
-
var $ =
|
|
51293
|
+
var $ = _c110(9);
|
|
51036
51294
|
var children;
|
|
51037
51295
|
var rest;
|
|
51038
51296
|
if ($[0] !== t0) {
|
|
@@ -51062,7 +51320,7 @@ var ComponentsProvider = function(t0) {
|
|
|
51062
51320
|
var value = t1;
|
|
51063
51321
|
var t3;
|
|
51064
51322
|
if ($[6] !== children || $[7] !== value) {
|
|
51065
|
-
t3 = /* @__PURE__ */
|
|
51323
|
+
t3 = /* @__PURE__ */ _jsx106(ComponentsContext.Provider, {
|
|
51066
51324
|
value: value,
|
|
51067
51325
|
children: children
|
|
51068
51326
|
});
|
|
@@ -51075,11 +51333,11 @@ var ComponentsProvider = function(t0) {
|
|
|
51075
51333
|
return t3;
|
|
51076
51334
|
};
|
|
51077
51335
|
// src/components/assistants/AssistantProvider/index.tsx
|
|
51078
|
-
import { c as
|
|
51079
|
-
import { jsx as
|
|
51336
|
+
import { c as _c111 } from "react-compiler-runtime";
|
|
51337
|
+
import { jsx as _jsx107 } from "react/jsx-runtime";
|
|
51080
51338
|
var AssistantProvider = function(t0) {
|
|
51081
51339
|
var _assistant$name;
|
|
51082
|
-
var $ =
|
|
51340
|
+
var $ = _c111(10);
|
|
51083
51341
|
var children = t0.children;
|
|
51084
51342
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
51085
51343
|
var t1;
|
|
@@ -51097,7 +51355,7 @@ var AssistantProvider = function(t0) {
|
|
|
51097
51355
|
var t3 = assistant === null || assistant === void 0 ? void 0 : assistant.avatar;
|
|
51098
51356
|
var t4;
|
|
51099
51357
|
if ($[2] !== t3) {
|
|
51100
|
-
t4 = /* @__PURE__ */
|
|
51358
|
+
t4 = /* @__PURE__ */ _jsx107(Avatar6, {
|
|
51101
51359
|
avatar: t3
|
|
51102
51360
|
});
|
|
51103
51361
|
$[2] = t3;
|
|
@@ -51107,7 +51365,7 @@ var AssistantProvider = function(t0) {
|
|
|
51107
51365
|
}
|
|
51108
51366
|
var t5;
|
|
51109
51367
|
if ($[4] !== children || $[5] !== t4) {
|
|
51110
|
-
t5 = /* @__PURE__ */
|
|
51368
|
+
t5 = /* @__PURE__ */ _jsx107(AssistantAvatarContext.Provider, {
|
|
51111
51369
|
value: t4,
|
|
51112
51370
|
children: children
|
|
51113
51371
|
});
|
|
@@ -51119,7 +51377,7 @@ var AssistantProvider = function(t0) {
|
|
|
51119
51377
|
}
|
|
51120
51378
|
var t6;
|
|
51121
51379
|
if ($[7] !== t2 || $[8] !== t5) {
|
|
51122
|
-
t6 = /* @__PURE__ */
|
|
51380
|
+
t6 = /* @__PURE__ */ _jsx107(AssistantNameContext.Provider, {
|
|
51123
51381
|
value: t2,
|
|
51124
51382
|
children: t5
|
|
51125
51383
|
});
|
|
@@ -51131,5 +51389,5 @@ var AssistantProvider = function(t0) {
|
|
|
51131
51389
|
}
|
|
51132
51390
|
return t6;
|
|
51133
51391
|
};
|
|
51134
|
-
export { AssistantAvatarContext, AssistantNameContext, AssistantProvider, AudioThread, AudioThreadDialog, Avatar6 as Avatar, ComponentsProvider, FunctionBase, FunctionComponentsContext, MarkdownContext, MarkdownProvider, MessageContent, MessageGroup, RunStep, SourceAnnotation, StartingSkeleton, Suggestions, SuperinterfaceProvider, Thread, ThreadDialog, ThreadDialogContext, TtsAudioRuntimeProvider, UserAvatarContext, WebrtcAudioRuntimeProvider, useAssistant, useAudioThreadContext, useComponents, useCreateFile, useCreateMessage, useIsMutatingMessage, useLatestMessage, useMarkdownContext, useMessageContext, useMessageFormContext, useMessages, useSuperinterfaceContext, useSuperinterfaceContext as useThreadContext, useThreadDialogContext, useTtsAudioRuntime, useWebrtcAudioRuntime };
|
|
51392
|
+
export { AssistantAvatarContext, AssistantNameContext, AssistantProvider, AudioThread, AudioThreadDialog, Avatar6 as Avatar, ComponentsProvider, FunctionBase, FunctionComponentsContext, Gui, MarkdownContext, MarkdownProvider, MessageContent, MessageGroup, RunStep, SourceAnnotation, StartingSkeleton, Suggestions, SuperinterfaceProvider, Thread, ThreadDialog, ThreadDialogContext, TtsAudioRuntimeProvider, UserAvatarContext, WebrtcAudioRuntimeProvider, useAssistant, useAudioThreadContext, useComponents, useCreateFile, useCreateMessage, useIsMutatingMessage, useLatestMessage, useMarkdownContext, useMessageContext, useMessageFormContext, useMessages, useSuperinterfaceContext, useSuperinterfaceContext as useThreadContext, useThreadDialogContext, useTtsAudioRuntime, useWebrtcAudioRuntime };
|
|
51135
51393
|
//# sourceMappingURL=index.js.map
|