@superinterface/react 3.6.3 → 3.7.1
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 +328 -363
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +155 -190
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.cts +10 -1
- package/dist/types/index.d.ts +10 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -589,9 +589,9 @@ var SuperinterfaceProvider = function(_ref) {
|
|
|
589
589
|
// src/components/threads/Thread/Messages/index.tsx
|
|
590
590
|
var import_themes45 = require("@radix-ui/themes");
|
|
591
591
|
// src/components/threads/Thread/Message/index.tsx
|
|
592
|
-
var
|
|
593
|
-
var
|
|
594
|
-
var
|
|
592
|
+
var import_react_compiler_runtime25 = require("react-compiler-runtime");
|
|
593
|
+
var import_react30 = require("react");
|
|
594
|
+
var import_radash11 = require("radash");
|
|
595
595
|
var import_themes33 = require("@radix-ui/themes");
|
|
596
596
|
// src/components/skeletons/StartingContentSkeleton/index.tsx
|
|
597
597
|
var import_themes = require("@radix-ui/themes");
|
|
@@ -1274,13 +1274,13 @@ var Attachments = function(t0) {
|
|
|
1274
1274
|
return t3;
|
|
1275
1275
|
};
|
|
1276
1276
|
// src/components/threads/Thread/Message/ContentPart/index.tsx
|
|
1277
|
-
var
|
|
1277
|
+
var import_react_compiler_runtime24 = require("react-compiler-runtime");
|
|
1278
1278
|
// src/components/threads/Thread/Message/ContentPart/TextContent.tsx
|
|
1279
|
-
var
|
|
1280
|
-
var
|
|
1279
|
+
var import_react_compiler_runtime22 = require("react-compiler-runtime");
|
|
1280
|
+
var import_react28 = __toESM(require("react"), 1);
|
|
1281
1281
|
var import_themes32 = require("@radix-ui/themes");
|
|
1282
1282
|
var import_mdx = require("@mdx-js/mdx");
|
|
1283
|
-
var
|
|
1283
|
+
var import_react29 = require("@mdx-js/react");
|
|
1284
1284
|
var runtime = __toESM(require("react/jsx-runtime"), 1);
|
|
1285
1285
|
// src/lib/recma/recmaFallbackComponentPlugin.ts
|
|
1286
1286
|
var import_estree_util_visit = require("estree-util-visit");
|
|
@@ -1424,9 +1424,9 @@ var recmaFallbackComponentPlugin = function() {
|
|
|
1424
1424
|
};
|
|
1425
1425
|
};
|
|
1426
1426
|
// src/hooks/markdown/useMarkdownContext/index.ts
|
|
1427
|
-
var
|
|
1427
|
+
var import_react26 = require("react");
|
|
1428
1428
|
// src/contexts/markdown/MarkdownContext/index.ts
|
|
1429
|
-
var
|
|
1429
|
+
var import_react25 = require("react");
|
|
1430
1430
|
// src/contexts/markdown/MarkdownContext/lib/components/index.tsx
|
|
1431
1431
|
var import_themes31 = require("@radix-ui/themes");
|
|
1432
1432
|
// src/contexts/markdown/MarkdownContext/lib/components/Paragraph.tsx
|
|
@@ -1525,11 +1525,11 @@ var Pre = function(_ref) {
|
|
|
1525
1525
|
});
|
|
1526
1526
|
};
|
|
1527
1527
|
// src/contexts/markdown/MarkdownContext/lib/components/Code.tsx
|
|
1528
|
-
var
|
|
1528
|
+
var import_react_compiler_runtime14 = require("react-compiler-runtime");
|
|
1529
1529
|
var import_themes21 = require("@radix-ui/themes");
|
|
1530
1530
|
// src/components/suggestions/Suggestions/index.tsx
|
|
1531
|
-
var
|
|
1532
|
-
var
|
|
1531
|
+
var import_react_compiler_runtime13 = require("react-compiler-runtime");
|
|
1532
|
+
var import_react17 = require("react");
|
|
1533
1533
|
// src/hooks/messages/useLatestMessage/index.ts
|
|
1534
1534
|
var import_react_compiler_runtime11 = require("react-compiler-runtime");
|
|
1535
1535
|
var import_react12 = require("react");
|
|
@@ -1916,17 +1916,16 @@ var useLatestMessage = function() {
|
|
|
1916
1916
|
return t0;
|
|
1917
1917
|
};
|
|
1918
1918
|
// src/components/suggestions/Suggestions/Content.tsx
|
|
1919
|
-
var
|
|
1920
|
-
var
|
|
1919
|
+
var import_react16 = require("react");
|
|
1920
|
+
var import_radash9 = require("radash");
|
|
1921
1921
|
var import_react_children_utilities = require("react-children-utilities");
|
|
1922
1922
|
var import_themes20 = require("@radix-ui/themes");
|
|
1923
1923
|
// src/components/suggestions/Suggestions/Item.tsx
|
|
1924
|
-
var
|
|
1924
|
+
var import_react_compiler_runtime12 = require("react-compiler-runtime");
|
|
1925
1925
|
var import_react_icons4 = require("@radix-ui/react-icons");
|
|
1926
1926
|
var import_themes19 = require("@radix-ui/themes");
|
|
1927
1927
|
// src/hooks/messages/useCreateMessage/index.ts
|
|
1928
|
-
var
|
|
1929
|
-
var import_radash9 = require("radash");
|
|
1928
|
+
var import_react13 = require("react");
|
|
1930
1929
|
var import_react_query4 = require("@tanstack/react-query");
|
|
1931
1930
|
// src/hooks/messages/useCreateMessage/lib/mutationOptions/onMutate/index.ts
|
|
1932
1931
|
var import_radash2 = require("radash");
|
|
@@ -2882,7 +2881,7 @@ var threadRunRequiresAction = /* @__PURE__ */ function() {
|
|
|
2882
2881
|
4,
|
|
2883
2882
|
(0, import_radash8.map)(toolCalls, /* @__PURE__ */ function() {
|
|
2884
2883
|
var _ref3 = _asyncToGenerator3(function(toolCall) {
|
|
2885
|
-
var fn, args, parsedArgs, output, error;
|
|
2884
|
+
var fn, args, parsedArgs, output, _yield$fn, error, serializedOutput;
|
|
2886
2885
|
return _ts_generator(this, function(_state) {
|
|
2887
2886
|
switch(_state.label){
|
|
2888
2887
|
case 0:
|
|
@@ -2920,7 +2919,7 @@ var threadRunRequiresAction = /* @__PURE__ */ function() {
|
|
|
2920
2919
|
fn(parsedArgs)
|
|
2921
2920
|
];
|
|
2922
2921
|
case 2:
|
|
2923
|
-
output = _state.sent();
|
|
2922
|
+
output = (_yield$fn = _state.sent()) !== null && _yield$fn !== void 0 ? _yield$fn : "";
|
|
2924
2923
|
return [
|
|
2925
2924
|
3,
|
|
2926
2925
|
4
|
|
@@ -2933,11 +2932,20 @@ var threadRunRequiresAction = /* @__PURE__ */ function() {
|
|
|
2933
2932
|
4
|
|
2934
2933
|
];
|
|
2935
2934
|
case 4:
|
|
2935
|
+
try {
|
|
2936
|
+
if (typeof output === "string") {
|
|
2937
|
+
serializedOutput = output;
|
|
2938
|
+
} else {
|
|
2939
|
+
serializedOutput = JSON.stringify(output);
|
|
2940
|
+
}
|
|
2941
|
+
} catch (error) {
|
|
2942
|
+
serializedOutput = "Error: ".concat(error.message);
|
|
2943
|
+
}
|
|
2936
2944
|
return [
|
|
2937
2945
|
2,
|
|
2938
2946
|
{
|
|
2939
2947
|
toolCallId: toolCall.id,
|
|
2940
|
-
output:
|
|
2948
|
+
output: serializedOutput
|
|
2941
2949
|
}
|
|
2942
2950
|
];
|
|
2943
2951
|
}
|
|
@@ -3291,85 +3299,42 @@ function _toPrimitive18(t, r) {
|
|
|
3291
3299
|
}
|
|
3292
3300
|
return ("string" === r ? String : Number)(t);
|
|
3293
3301
|
}
|
|
3294
|
-
var useCreateMessage = function(
|
|
3295
|
-
var
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
t1 = t0 === void 0 ? {
|
|
3299
|
-
onError: _temp
|
|
3300
|
-
} : t0;
|
|
3301
|
-
$[0] = t0;
|
|
3302
|
-
$[1] = t1;
|
|
3303
|
-
} else {
|
|
3304
|
-
t1 = $[1];
|
|
3305
|
-
}
|
|
3306
|
-
var t2 = t1.onError;
|
|
3307
|
-
var t3;
|
|
3308
|
-
if ($[2] !== t2) {
|
|
3309
|
-
t3 = t2 === void 0 ? _temp2 : t2;
|
|
3310
|
-
$[2] = t2;
|
|
3311
|
-
$[3] = t3;
|
|
3312
|
-
} else {
|
|
3313
|
-
t3 = $[3];
|
|
3314
|
-
}
|
|
3315
|
-
var onError = t3;
|
|
3302
|
+
var useCreateMessage = function useCreateMessage2() {
|
|
3303
|
+
var _ref = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {
|
|
3304
|
+
onError: function() {}
|
|
3305
|
+
}, _ref_onError = _ref.onError, onError = _ref_onError === void 0 ? function() {} : _ref_onError;
|
|
3316
3306
|
var queryClient = (0, import_react_query4.useQueryClient)();
|
|
3317
3307
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
3318
3308
|
var threadContext = useSuperinterfaceContext();
|
|
3319
|
-
var
|
|
3320
|
-
|
|
3321
|
-
|
|
3322
|
-
|
|
3323
|
-
|
|
3324
|
-
|
|
3325
|
-
|
|
3326
|
-
});
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
}
|
|
3335
|
-
var props = (0, import_react_query4.useMutation)(t4);
|
|
3336
|
-
var t5;
|
|
3337
|
-
if ($[9] !== props.mutateAsync || $[10] !== threadContext.variables) {
|
|
3338
|
-
t5 = (0, import_radash9.partob)(props.mutateAsync, threadContext.variables);
|
|
3339
|
-
$[9] = props.mutateAsync;
|
|
3340
|
-
$[10] = threadContext.variables;
|
|
3341
|
-
$[11] = t5;
|
|
3342
|
-
} else {
|
|
3343
|
-
t5 = $[11];
|
|
3344
|
-
}
|
|
3345
|
-
var t6;
|
|
3346
|
-
if ($[12] !== props || $[13] !== t5) {
|
|
3347
|
-
t6 = _objectSpread18(_objectSpread18({}, props), {}, {
|
|
3348
|
-
createMessage: t5
|
|
3349
|
-
});
|
|
3350
|
-
$[12] = props;
|
|
3351
|
-
$[13] = t5;
|
|
3352
|
-
$[14] = t6;
|
|
3353
|
-
} else {
|
|
3354
|
-
t6 = $[14];
|
|
3355
|
-
}
|
|
3356
|
-
return t6;
|
|
3309
|
+
var props = (0, import_react_query4.useMutation)(mutationOptions({
|
|
3310
|
+
queryClient: queryClient,
|
|
3311
|
+
threadContext: threadContext,
|
|
3312
|
+
superinterfaceContext: superinterfaceContext,
|
|
3313
|
+
onError: onError
|
|
3314
|
+
}));
|
|
3315
|
+
var createMessage = (0, import_react13.useCallback)(function(variables) {
|
|
3316
|
+
return props.mutateAsync(_objectSpread18(_objectSpread18({}, threadContext.variables), variables));
|
|
3317
|
+
}, [
|
|
3318
|
+
props.mutateAsync,
|
|
3319
|
+
threadContext.variables
|
|
3320
|
+
]);
|
|
3321
|
+
return _objectSpread18(_objectSpread18({}, props), {}, {
|
|
3322
|
+
createMessage: createMessage
|
|
3323
|
+
});
|
|
3357
3324
|
};
|
|
3358
|
-
function _temp() {}
|
|
3359
|
-
function _temp2() {}
|
|
3360
3325
|
// src/components/suggestions/Suggestions/Item.tsx
|
|
3361
3326
|
var import_react_query5 = require("@tanstack/react-query");
|
|
3362
3327
|
// src/hooks/toasts/useToasts/index.ts
|
|
3363
|
-
var
|
|
3328
|
+
var import_react15 = require("react");
|
|
3364
3329
|
// src/contexts/toasts/ToastsContext/index.ts
|
|
3365
|
-
var
|
|
3366
|
-
var ToastsContext = /* @__PURE__ */ (0,
|
|
3330
|
+
var import_react14 = require("react");
|
|
3331
|
+
var ToastsContext = /* @__PURE__ */ (0, import_react14.createContext)({
|
|
3367
3332
|
toasts: [],
|
|
3368
3333
|
addToast: function() {}
|
|
3369
3334
|
});
|
|
3370
3335
|
// src/hooks/toasts/useToasts/index.ts
|
|
3371
3336
|
var useToasts = function() {
|
|
3372
|
-
return (0,
|
|
3337
|
+
return (0, import_react15.useContext)(ToastsContext);
|
|
3373
3338
|
};
|
|
3374
3339
|
// src/lib/errors/createMessageDefaultOnError.ts
|
|
3375
3340
|
var createMessageDefaultOnError = function(_ref) {
|
|
@@ -3442,7 +3407,7 @@ function _toPrimitive19(t, r) {
|
|
|
3442
3407
|
return ("string" === r ? String : Number)(t);
|
|
3443
3408
|
}
|
|
3444
3409
|
var Item = function(t0) {
|
|
3445
|
-
var $ = (0,
|
|
3410
|
+
var $ = (0, import_react_compiler_runtime12.c)(16);
|
|
3446
3411
|
var suggestion = t0.suggestion, isDisabled = t0.isDisabled, className = t0.className, style = t0.style;
|
|
3447
3412
|
var addToast = useToasts().addToast;
|
|
3448
3413
|
var queryClient = (0, import_react_query5.useQueryClient)();
|
|
@@ -3542,16 +3507,16 @@ var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
|
3542
3507
|
var Content4 = function(_ref) {
|
|
3543
3508
|
var children = _ref.children, className = _ref.className, style = _ref.style;
|
|
3544
3509
|
var isMutatingMessage = useIsMutatingMessage();
|
|
3545
|
-
var suggestions = (0,
|
|
3510
|
+
var suggestions = (0, import_react16.useMemo)(function() {
|
|
3546
3511
|
return (0, import_react_children_utilities.onlyText)(children).split(/\r?\n/).filter(function(c) {
|
|
3547
|
-
return !(0,
|
|
3512
|
+
return !(0, import_radash9.isEmpty)(c);
|
|
3548
3513
|
}).map(function(c_0) {
|
|
3549
3514
|
return c_0.trim();
|
|
3550
3515
|
});
|
|
3551
3516
|
}, [
|
|
3552
3517
|
children
|
|
3553
3518
|
]);
|
|
3554
|
-
if ((0,
|
|
3519
|
+
if ((0, import_radash9.isEmpty)(suggestions)) return null;
|
|
3555
3520
|
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_themes20.Flex, {
|
|
3556
3521
|
gap: "2",
|
|
3557
3522
|
py: "2",
|
|
@@ -3570,7 +3535,7 @@ var Content4 = function(_ref) {
|
|
|
3570
3535
|
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
3571
3536
|
var Suggestions = function(t0) {
|
|
3572
3537
|
var _latestMessageProps$l;
|
|
3573
|
-
var $ = (0,
|
|
3538
|
+
var $ = (0, import_react_compiler_runtime13.c)(4);
|
|
3574
3539
|
var children = t0.children, className = t0.className, style = t0.style;
|
|
3575
3540
|
var latestMessageProps = useLatestMessage();
|
|
3576
3541
|
var t1;
|
|
@@ -3602,7 +3567,7 @@ Suggestions.Item = Item;
|
|
|
3602
3567
|
// src/contexts/markdown/MarkdownContext/lib/components/Code.tsx
|
|
3603
3568
|
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
3604
3569
|
var Code3 = function(t0) {
|
|
3605
|
-
var $ = (0,
|
|
3570
|
+
var $ = (0, import_react_compiler_runtime14.c)(4);
|
|
3606
3571
|
var children = t0.children, className = t0.className;
|
|
3607
3572
|
if (className === "language-suggestions") {
|
|
3608
3573
|
var _t;
|
|
@@ -3630,7 +3595,7 @@ var Code3 = function(t0) {
|
|
|
3630
3595
|
return t1;
|
|
3631
3596
|
};
|
|
3632
3597
|
// src/contexts/markdown/MarkdownContext/lib/components/Img/index.tsx
|
|
3633
|
-
var
|
|
3598
|
+
var import_react_compiler_runtime19 = require("react-compiler-runtime");
|
|
3634
3599
|
// src/components/images/Image.tsx
|
|
3635
3600
|
var import_themes22 = require("@radix-ui/themes");
|
|
3636
3601
|
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
@@ -3737,22 +3702,22 @@ var isAudioSrc = function(_ref) {
|
|
|
3737
3702
|
// src/contexts/markdown/MarkdownContext/lib/components/Img/Video/index.tsx
|
|
3738
3703
|
var import_themes28 = require("@radix-ui/themes");
|
|
3739
3704
|
var import_base = require("@vidstack/react/player/styles/base.css");
|
|
3740
|
-
var
|
|
3705
|
+
var import_react23 = require("@vidstack/react");
|
|
3741
3706
|
// src/components/media/PlayButton.tsx
|
|
3742
|
-
var
|
|
3743
|
-
var
|
|
3707
|
+
var import_react_compiler_runtime15 = require("react-compiler-runtime");
|
|
3708
|
+
var import_react18 = require("@vidstack/react");
|
|
3744
3709
|
var import_themes23 = require("@radix-ui/themes");
|
|
3745
3710
|
var import_react_icons5 = require("@radix-ui/react-icons");
|
|
3746
3711
|
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
3747
3712
|
var PlayButton = function() {
|
|
3748
|
-
var $ = (0,
|
|
3749
|
-
var isPaused = (0,
|
|
3713
|
+
var $ = (0, import_react_compiler_runtime15.c)(2);
|
|
3714
|
+
var isPaused = (0, import_react18.useMediaState)("paused");
|
|
3750
3715
|
var t0;
|
|
3751
3716
|
if ($[0] !== isPaused) {
|
|
3752
3717
|
t0 = /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_themes23.IconButton, {
|
|
3753
3718
|
variant: "ghost",
|
|
3754
3719
|
asChild: true,
|
|
3755
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(
|
|
3720
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react18.PlayButton, {
|
|
3756
3721
|
children: isPaused ? /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_icons5.PlayIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react_icons5.PauseIcon, {})
|
|
3757
3722
|
})
|
|
3758
3723
|
});
|
|
@@ -3764,23 +3729,23 @@ var PlayButton = function() {
|
|
|
3764
3729
|
return t0;
|
|
3765
3730
|
};
|
|
3766
3731
|
// src/components/media/VolumeButton.tsx
|
|
3767
|
-
var
|
|
3768
|
-
var
|
|
3732
|
+
var import_react_compiler_runtime16 = require("react-compiler-runtime");
|
|
3733
|
+
var import_react19 = require("@vidstack/react");
|
|
3769
3734
|
var import_themes24 = require("@radix-ui/themes");
|
|
3770
3735
|
var import_react_icons6 = require("@radix-ui/react-icons");
|
|
3771
3736
|
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
3772
3737
|
var VolumeButton = function() {
|
|
3773
|
-
var $ = (0,
|
|
3774
|
-
var volume = (0,
|
|
3775
|
-
var isMuted = (0,
|
|
3776
|
-
var remote = (0,
|
|
3738
|
+
var $ = (0, import_react_compiler_runtime16.c)(13);
|
|
3739
|
+
var volume = (0, import_react19.useMediaState)("volume");
|
|
3740
|
+
var isMuted = (0, import_react19.useMediaState)("muted");
|
|
3741
|
+
var remote = (0, import_react19.useMediaRemote)();
|
|
3777
3742
|
var t0;
|
|
3778
3743
|
if ($[0] !== isMuted || $[1] !== volume) {
|
|
3779
3744
|
t0 = /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_themes24.HoverCard.Trigger, {
|
|
3780
3745
|
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_themes24.IconButton, {
|
|
3781
3746
|
variant: "ghost",
|
|
3782
3747
|
asChild: true,
|
|
3783
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
3748
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react19.MuteButton, {
|
|
3784
3749
|
children: isMuted || volume === 0 ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_icons6.SpeakerOffIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react_icons6.SpeakerModerateIcon, {})
|
|
3785
3750
|
})
|
|
3786
3751
|
})
|
|
@@ -3850,19 +3815,19 @@ var VolumeButton = function() {
|
|
|
3850
3815
|
return t5;
|
|
3851
3816
|
};
|
|
3852
3817
|
// src/components/media/Time.tsx
|
|
3853
|
-
var
|
|
3854
|
-
var
|
|
3855
|
-
var
|
|
3818
|
+
var import_react_compiler_runtime17 = require("react-compiler-runtime");
|
|
3819
|
+
var import_react20 = require("react");
|
|
3820
|
+
var import_react21 = require("@vidstack/react");
|
|
3856
3821
|
var import_themes25 = require("@radix-ui/themes");
|
|
3857
3822
|
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
3858
3823
|
var Time = function() {
|
|
3859
|
-
var $ = (0,
|
|
3860
|
-
var time = (0,
|
|
3861
|
-
var duration = (0,
|
|
3862
|
-
var seeking = (0,
|
|
3863
|
-
var canSeek = (0,
|
|
3864
|
-
var remote = (0,
|
|
3865
|
-
var _ref = _sliced_to_array((0,
|
|
3824
|
+
var $ = (0, import_react_compiler_runtime17.c)(17);
|
|
3825
|
+
var time = (0, import_react21.useMediaState)("currentTime");
|
|
3826
|
+
var duration = (0, import_react21.useMediaState)("duration");
|
|
3827
|
+
var seeking = (0, import_react21.useMediaState)("seeking");
|
|
3828
|
+
var canSeek = (0, import_react21.useMediaState)("canSeek");
|
|
3829
|
+
var remote = (0, import_react21.useMediaRemote)();
|
|
3830
|
+
var _ref = _sliced_to_array((0, import_react20.useState)(0), 2), value = _ref[0], setValue = _ref[1];
|
|
3866
3831
|
var t0;
|
|
3867
3832
|
var t1;
|
|
3868
3833
|
if ($[0] !== duration || $[1] !== seeking || $[2] !== time) {
|
|
@@ -3886,7 +3851,7 @@ var Time = function() {
|
|
|
3886
3851
|
t0 = $[3];
|
|
3887
3852
|
t1 = $[4];
|
|
3888
3853
|
}
|
|
3889
|
-
(0,
|
|
3854
|
+
(0, import_react20.useEffect)(t0, t1);
|
|
3890
3855
|
var t2;
|
|
3891
3856
|
t2 = 1 / duration * 100;
|
|
3892
3857
|
var step = t2;
|
|
@@ -3962,20 +3927,20 @@ var MediaContainer = function(_ref) {
|
|
|
3962
3927
|
});
|
|
3963
3928
|
};
|
|
3964
3929
|
// src/contexts/markdown/MarkdownContext/lib/components/Img/Video/FullscreenButton.tsx
|
|
3965
|
-
var
|
|
3966
|
-
var
|
|
3930
|
+
var import_react_compiler_runtime18 = require("react-compiler-runtime");
|
|
3931
|
+
var import_react22 = require("@vidstack/react");
|
|
3967
3932
|
var import_themes27 = require("@radix-ui/themes");
|
|
3968
3933
|
var import_react_icons7 = require("@radix-ui/react-icons");
|
|
3969
3934
|
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
3970
3935
|
var FullscreenButton = function() {
|
|
3971
|
-
var $ = (0,
|
|
3972
|
-
var isFullscreen = (0,
|
|
3936
|
+
var $ = (0, import_react_compiler_runtime18.c)(2);
|
|
3937
|
+
var isFullscreen = (0, import_react22.useMediaState)("fullscreen");
|
|
3973
3938
|
var t0;
|
|
3974
3939
|
if ($[0] !== isFullscreen) {
|
|
3975
3940
|
t0 = /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_themes27.IconButton, {
|
|
3976
3941
|
variant: "ghost",
|
|
3977
3942
|
asChild: true,
|
|
3978
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
3943
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react22.FullscreenButton, {
|
|
3979
3944
|
children: isFullscreen ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_icons7.ExitFullScreenIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_icons7.EnterFullScreenIcon, {})
|
|
3980
3945
|
})
|
|
3981
3946
|
});
|
|
@@ -3991,7 +3956,7 @@ var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
|
3991
3956
|
var Video = function(_ref) {
|
|
3992
3957
|
var src = _ref.src;
|
|
3993
3958
|
return /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(MediaContainer, {
|
|
3994
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
3959
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_react23.MediaPlayer, {
|
|
3995
3960
|
src: {
|
|
3996
3961
|
src: src,
|
|
3997
3962
|
type: "video/".concat(src.split(".").pop())
|
|
@@ -4000,7 +3965,7 @@ var Video = function(_ref) {
|
|
|
4000
3965
|
hideControlsOnMouseLeave: true,
|
|
4001
3966
|
crossOrigin: true,
|
|
4002
3967
|
children: [
|
|
4003
|
-
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3968
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react23.MediaProvider, {}),
|
|
4004
3969
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)("style", {
|
|
4005
3970
|
children: "\n .superinterface-video-controls {\n opacity: 0;\n transition: opacity 0.2s ease-out;\n }\n\n .superinterface-video-controls[data-visible] {\n opacity: 1;\n }\n "
|
|
4006
3971
|
}),
|
|
@@ -4016,13 +3981,13 @@ var Video = function(_ref) {
|
|
|
4016
3981
|
zIndex: 10,
|
|
4017
3982
|
background: "var(--accent-4)"
|
|
4018
3983
|
},
|
|
4019
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
3984
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react23.Controls.Root, {
|
|
4020
3985
|
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_themes28.Flex, {
|
|
4021
3986
|
asChild: true,
|
|
4022
3987
|
align: "center",
|
|
4023
3988
|
gap: "3",
|
|
4024
3989
|
flexGrow: "1",
|
|
4025
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(
|
|
3990
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_react23.Controls.Group, {
|
|
4026
3991
|
children: [
|
|
4027
3992
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(PlayButton, {}),
|
|
4028
3993
|
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Time, {}),
|
|
@@ -4040,12 +4005,12 @@ var Video = function(_ref) {
|
|
|
4040
4005
|
// src/contexts/markdown/MarkdownContext/lib/components/Img/Audio/index.tsx
|
|
4041
4006
|
var import_themes29 = require("@radix-ui/themes");
|
|
4042
4007
|
var import_base2 = require("@vidstack/react/player/styles/base.css");
|
|
4043
|
-
var
|
|
4008
|
+
var import_react24 = require("@vidstack/react");
|
|
4044
4009
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
4045
4010
|
var Audio = function(_ref) {
|
|
4046
4011
|
var src = _ref.src;
|
|
4047
4012
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(MediaContainer, {
|
|
4048
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
4013
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_react24.MediaPlayer, {
|
|
4049
4014
|
src: {
|
|
4050
4015
|
src: src,
|
|
4051
4016
|
type: "audio/".concat(src.split(".").pop())
|
|
@@ -4054,7 +4019,7 @@ var Audio = function(_ref) {
|
|
|
4054
4019
|
crossOrigin: true,
|
|
4055
4020
|
playsInline: true,
|
|
4056
4021
|
children: [
|
|
4057
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4022
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react24.MediaProvider, {}),
|
|
4058
4023
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_themes29.Flex, {
|
|
4059
4024
|
asChild: true,
|
|
4060
4025
|
p: "3",
|
|
@@ -4063,13 +4028,13 @@ var Audio = function(_ref) {
|
|
|
4063
4028
|
zIndex: 10,
|
|
4064
4029
|
background: "var(--accent-4)"
|
|
4065
4030
|
},
|
|
4066
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
4031
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react24.Controls.Root, {
|
|
4067
4032
|
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_themes29.Flex, {
|
|
4068
4033
|
asChild: true,
|
|
4069
4034
|
align: "center",
|
|
4070
4035
|
gap: "3",
|
|
4071
4036
|
flexGrow: "1",
|
|
4072
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
4037
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(import_react24.Controls.Group, {
|
|
4073
4038
|
children: [
|
|
4074
4039
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(PlayButton, {}),
|
|
4075
4040
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Time, {}),
|
|
@@ -4129,7 +4094,7 @@ function _toPrimitive21(t, r) {
|
|
|
4129
4094
|
return ("string" === r ? String : Number)(t);
|
|
4130
4095
|
}
|
|
4131
4096
|
var Img = function(props) {
|
|
4132
|
-
var $ = (0,
|
|
4097
|
+
var $ = (0, import_react_compiler_runtime19.c)(8);
|
|
4133
4098
|
if (!props.src) {
|
|
4134
4099
|
var t0;
|
|
4135
4100
|
if ($[0] !== props) {
|
|
@@ -4185,7 +4150,7 @@ var Img = function(props) {
|
|
|
4185
4150
|
}
|
|
4186
4151
|
};
|
|
4187
4152
|
// src/contexts/markdown/MarkdownContext/lib/components/Annotation/index.tsx
|
|
4188
|
-
var
|
|
4153
|
+
var import_react_compiler_runtime21 = require("react-compiler-runtime");
|
|
4189
4154
|
var import_react_icons8 = require("@radix-ui/react-icons");
|
|
4190
4155
|
// src/contexts/markdown/MarkdownContext/lib/components/Annotation/AnnotationBase.tsx
|
|
4191
4156
|
var import_themes30 = require("@radix-ui/themes");
|
|
@@ -4217,10 +4182,10 @@ var AnnotationBase = function(_ref) {
|
|
|
4217
4182
|
});
|
|
4218
4183
|
};
|
|
4219
4184
|
// src/contexts/markdown/MarkdownContext/lib/components/Annotation/FilePathAnnotation.tsx
|
|
4220
|
-
var
|
|
4185
|
+
var import_react_compiler_runtime20 = require("react-compiler-runtime");
|
|
4221
4186
|
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
4222
4187
|
var FilePathAnnotation = function(t0) {
|
|
4223
|
-
var $ = (0,
|
|
4188
|
+
var $ = (0, import_react_compiler_runtime20.c)(3);
|
|
4224
4189
|
var annotation = t0.annotation, children = t0.children;
|
|
4225
4190
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
4226
4191
|
var nextSearchParams = new URLSearchParams(superinterfaceContext.variables);
|
|
@@ -4244,7 +4209,7 @@ var FilePathAnnotation = function(t0) {
|
|
|
4244
4209
|
// src/contexts/markdown/MarkdownContext/lib/components/Annotation/index.tsx
|
|
4245
4210
|
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
4246
4211
|
var Annotation = function(t0) {
|
|
4247
|
-
var $ = (0,
|
|
4212
|
+
var $ = (0, import_react_compiler_runtime21.c)(4);
|
|
4248
4213
|
var annotation = t0.annotation, children = t0.children;
|
|
4249
4214
|
if (annotation.type === "file_citation") {
|
|
4250
4215
|
var t1;
|
|
@@ -4430,7 +4395,7 @@ var components = {
|
|
|
4430
4395
|
// src/contexts/markdown/MarkdownContext/lib/getRemarkPlugins.ts
|
|
4431
4396
|
var import_remark_gfm = __toESM(require("remark-gfm"), 1);
|
|
4432
4397
|
// src/lib/remark/remarkAnnotation.ts
|
|
4433
|
-
var
|
|
4398
|
+
var import_radash10 = require("radash");
|
|
4434
4399
|
var import_unist_util_flatmap = __toESM(require("unist-util-flatmap"), 1);
|
|
4435
4400
|
function ownKeys23(e, r) {
|
|
4436
4401
|
var t = Object.keys(e);
|
|
@@ -4553,7 +4518,7 @@ var processTextNode = function(_ref4) {
|
|
|
4553
4518
|
}
|
|
4554
4519
|
var nodeStart = node.position.start.offset;
|
|
4555
4520
|
var nodeEnd = node.position.end.offset;
|
|
4556
|
-
if (!(0,
|
|
4521
|
+
if (!(0, import_radash10.isNumber)(nodeStart) || !(0, import_radash10.isNumber)(nodeEnd)) {
|
|
4557
4522
|
return [
|
|
4558
4523
|
node
|
|
4559
4524
|
];
|
|
@@ -4643,23 +4608,23 @@ var getRemarkPlugins = function(_ref) {
|
|
|
4643
4608
|
];
|
|
4644
4609
|
};
|
|
4645
4610
|
// src/contexts/markdown/MarkdownContext/index.ts
|
|
4646
|
-
var MarkdownContext = /* @__PURE__ */ (0,
|
|
4611
|
+
var MarkdownContext = /* @__PURE__ */ (0, import_react25.createContext)({
|
|
4647
4612
|
components: components,
|
|
4648
4613
|
getRemarkPlugins: getRemarkPlugins
|
|
4649
4614
|
});
|
|
4650
4615
|
// src/hooks/markdown/useMarkdownContext/index.ts
|
|
4651
4616
|
var useMarkdownContext = function() {
|
|
4652
|
-
return (0,
|
|
4617
|
+
return (0, import_react26.useContext)(MarkdownContext);
|
|
4653
4618
|
};
|
|
4654
4619
|
// ../../node_modules/react-error-boundary/dist/react-error-boundary.esm.js
|
|
4655
|
-
var
|
|
4656
|
-
var ErrorBoundaryContext = /* @__PURE__ */ (0,
|
|
4620
|
+
var import_react27 = require("react");
|
|
4621
|
+
var ErrorBoundaryContext = /* @__PURE__ */ (0, import_react27.createContext)(null);
|
|
4657
4622
|
var initialState = {
|
|
4658
4623
|
didCatch: false,
|
|
4659
4624
|
error: null
|
|
4660
4625
|
};
|
|
4661
|
-
var ErrorBoundary = /*#__PURE__*/ function(
|
|
4662
|
-
_inherits(ErrorBoundary,
|
|
4626
|
+
var ErrorBoundary = /*#__PURE__*/ function(_import_react27_Component) {
|
|
4627
|
+
_inherits(ErrorBoundary, _import_react27_Component);
|
|
4663
4628
|
function ErrorBoundary(props) {
|
|
4664
4629
|
_class_call_check(this, ErrorBoundary);
|
|
4665
4630
|
var _this;
|
|
@@ -4725,14 +4690,14 @@ var ErrorBoundary = /*#__PURE__*/ function(_import_react26_Component) {
|
|
|
4725
4690
|
if (typeof fallbackRender === "function") {
|
|
4726
4691
|
childToRender = fallbackRender(props);
|
|
4727
4692
|
} else if (FallbackComponent) {
|
|
4728
|
-
childToRender = /* @__PURE__ */ (0,
|
|
4693
|
+
childToRender = /* @__PURE__ */ (0, import_react27.createElement)(FallbackComponent, props);
|
|
4729
4694
|
} else if (fallback !== void 0) {
|
|
4730
4695
|
childToRender = fallback;
|
|
4731
4696
|
} else {
|
|
4732
4697
|
throw error;
|
|
4733
4698
|
}
|
|
4734
4699
|
}
|
|
4735
|
-
return /* @__PURE__ */ (0,
|
|
4700
|
+
return /* @__PURE__ */ (0, import_react27.createElement)(ErrorBoundaryContext.Provider, {
|
|
4736
4701
|
value: {
|
|
4737
4702
|
didCatch: didCatch,
|
|
4738
4703
|
error: error,
|
|
@@ -4753,7 +4718,7 @@ var ErrorBoundary = /*#__PURE__*/ function(_import_react26_Component) {
|
|
|
4753
4718
|
}
|
|
4754
4719
|
]);
|
|
4755
4720
|
return ErrorBoundary;
|
|
4756
|
-
}(
|
|
4721
|
+
}(import_react27.Component);
|
|
4757
4722
|
function hasArrayChanged() {
|
|
4758
4723
|
var a = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [];
|
|
4759
4724
|
var b = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
@@ -4838,7 +4803,7 @@ var evaluate = /* @__PURE__ */ function() {
|
|
|
4838
4803
|
return [
|
|
4839
4804
|
2,
|
|
4840
4805
|
fn(_objectSpread24(_objectSpread24({}, runtime), {}, {
|
|
4841
|
-
useMDXComponents:
|
|
4806
|
+
useMDXComponents: import_react29.useMDXComponents
|
|
4842
4807
|
}))
|
|
4843
4808
|
];
|
|
4844
4809
|
});
|
|
@@ -4854,7 +4819,7 @@ var replaceExpressionsWithLiterals = function(_ref3) {
|
|
|
4854
4819
|
});
|
|
4855
4820
|
};
|
|
4856
4821
|
var TextContent = function(t0) {
|
|
4857
|
-
var $ = (0,
|
|
4822
|
+
var $ = (0, import_react_compiler_runtime22.c)(13);
|
|
4858
4823
|
var content = t0.content;
|
|
4859
4824
|
var _useMarkdownContext = useMarkdownContext(), getRemarkPlugins2 = _useMarkdownContext.getRemarkPlugins, components2 = _useMarkdownContext.components;
|
|
4860
4825
|
var t1;
|
|
@@ -4871,7 +4836,7 @@ var TextContent = function(t0) {
|
|
|
4871
4836
|
}
|
|
4872
4837
|
t1 = t2;
|
|
4873
4838
|
var remarkPlugins = t1;
|
|
4874
|
-
var _ref = _sliced_to_array((0,
|
|
4839
|
+
var _ref = _sliced_to_array((0, import_react28.useState)(null), 2), MDXComponent = _ref[0], setMDXComponent = _ref[1];
|
|
4875
4840
|
var t3;
|
|
4876
4841
|
var t4;
|
|
4877
4842
|
if ($[3] !== content || $[4] !== remarkPlugins) {
|
|
@@ -4952,7 +4917,7 @@ var TextContent = function(t0) {
|
|
|
4952
4917
|
t3 = $[5];
|
|
4953
4918
|
t4 = $[6];
|
|
4954
4919
|
}
|
|
4955
|
-
(0,
|
|
4920
|
+
(0, import_react28.useEffect)(t3, t4);
|
|
4956
4921
|
if (!MDXComponent) {
|
|
4957
4922
|
return content.text.value;
|
|
4958
4923
|
}
|
|
@@ -4979,7 +4944,7 @@ var TextContent = function(t0) {
|
|
|
4979
4944
|
if ($[10] !== components2 || $[11] !== t6) {
|
|
4980
4945
|
t7 = /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(ErrorBoundary, {
|
|
4981
4946
|
fallback: t5,
|
|
4982
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
4947
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react29.MDXProvider, {
|
|
4983
4948
|
components: components2,
|
|
4984
4949
|
children: t6
|
|
4985
4950
|
})
|
|
@@ -4993,10 +4958,10 @@ var TextContent = function(t0) {
|
|
|
4993
4958
|
return t7;
|
|
4994
4959
|
};
|
|
4995
4960
|
// src/components/threads/Thread/Message/ContentPart/ImageFileContent.tsx
|
|
4996
|
-
var
|
|
4961
|
+
var import_react_compiler_runtime23 = require("react-compiler-runtime");
|
|
4997
4962
|
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
4998
4963
|
var ImageFileContent = function(t0) {
|
|
4999
|
-
var $ = (0,
|
|
4964
|
+
var $ = (0, import_react_compiler_runtime23.c)(2);
|
|
5000
4965
|
var content = t0.content;
|
|
5001
4966
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
5002
4967
|
var nextSearchParams = new URLSearchParams(superinterfaceContext.variables);
|
|
@@ -5017,7 +4982,7 @@ var ImageFileContent = function(t0) {
|
|
|
5017
4982
|
// src/components/threads/Thread/Message/ContentPart/index.tsx
|
|
5018
4983
|
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
5019
4984
|
var ContentPart = function(t0) {
|
|
5020
|
-
var $ = (0,
|
|
4985
|
+
var $ = (0, import_react_compiler_runtime24.c)(4);
|
|
5021
4986
|
var content = t0.content;
|
|
5022
4987
|
if (content.type === "text") {
|
|
5023
4988
|
var t1;
|
|
@@ -5050,7 +5015,7 @@ var ContentPart = function(t0) {
|
|
|
5050
5015
|
// src/components/threads/Thread/Message/index.tsx
|
|
5051
5016
|
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
5052
5017
|
var Message = function(t0) {
|
|
5053
|
-
var $ = (0,
|
|
5018
|
+
var $ = (0, import_react_compiler_runtime25.c)(51);
|
|
5054
5019
|
var message = t0.message, className = t0.className, style = t0.style;
|
|
5055
5020
|
var t1;
|
|
5056
5021
|
bb0: {
|
|
@@ -5084,7 +5049,7 @@ var Message = function(t0) {
|
|
|
5084
5049
|
var messageCreationRunStepIndex = message.runSteps.findIndex(_t2);
|
|
5085
5050
|
var _t3;
|
|
5086
5051
|
if ($[3] !== message.runSteps || $[4] !== messageCreationRunStepIndex) {
|
|
5087
|
-
var nextRunStepIndex = message.runSteps.slice(0, messageCreationRunStepIndex).findLastIndex(
|
|
5052
|
+
var nextRunStepIndex = message.runSteps.slice(0, messageCreationRunStepIndex).findLastIndex(_temp);
|
|
5088
5053
|
if (nextRunStepIndex === -1) {
|
|
5089
5054
|
nextRunStepIndex = 0;
|
|
5090
5055
|
}
|
|
@@ -5098,7 +5063,7 @@ var Message = function(t0) {
|
|
|
5098
5063
|
var laterRunSteps = _t3;
|
|
5099
5064
|
var _t4;
|
|
5100
5065
|
if ($[6] !== message.runSteps || $[7] !== messageCreationRunStepIndex) {
|
|
5101
|
-
_t4 = message.runSteps.slice(messageCreationRunStepIndex + 1).findIndex(
|
|
5066
|
+
_t4 = message.runSteps.slice(messageCreationRunStepIndex + 1).findIndex(_temp2);
|
|
5102
5067
|
$[6] = message.runSteps;
|
|
5103
5068
|
$[7] = messageCreationRunStepIndex;
|
|
5104
5069
|
$[8] = _t4;
|
|
@@ -5159,7 +5124,7 @@ var Message = function(t0) {
|
|
|
5159
5124
|
}
|
|
5160
5125
|
var _t8;
|
|
5161
5126
|
if ($[19] !== message.runSteps) {
|
|
5162
|
-
_t8 = message.runSteps.some(
|
|
5127
|
+
_t8 = message.runSteps.some(_temp3);
|
|
5163
5128
|
$[19] = message.runSteps;
|
|
5164
5129
|
$[20] = _t8;
|
|
5165
5130
|
} else {
|
|
@@ -5208,7 +5173,7 @@ var Message = function(t0) {
|
|
|
5208
5173
|
}
|
|
5209
5174
|
var t7;
|
|
5210
5175
|
if ($[29] !== isInProgress || $[30] !== laterRunSteps_0) {
|
|
5211
|
-
t7 = isInProgress && (0,
|
|
5176
|
+
t7 = isInProgress && (0, import_radash11.isEmpty)(laterRunSteps_0) && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(StartingContentSkeleton, {});
|
|
5212
5177
|
$[29] = isInProgress;
|
|
5213
5178
|
$[30] = laterRunSteps_0;
|
|
5214
5179
|
$[31] = t7;
|
|
@@ -5243,7 +5208,7 @@ var Message = function(t0) {
|
|
|
5243
5208
|
}
|
|
5244
5209
|
var t10;
|
|
5245
5210
|
if ($[38] !== isInProgress || $[39] !== laterRunSteps_0) {
|
|
5246
|
-
t10 = isInProgress && !(0,
|
|
5211
|
+
t10 = isInProgress && !(0, import_radash11.isEmpty)(laterRunSteps_0) && /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_themes33.Box, {
|
|
5247
5212
|
children: /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(StartingContentSkeleton, {})
|
|
5248
5213
|
});
|
|
5249
5214
|
$[38] = isInProgress;
|
|
@@ -5288,13 +5253,13 @@ var Message = function(t0) {
|
|
|
5288
5253
|
}
|
|
5289
5254
|
return t12;
|
|
5290
5255
|
};
|
|
5291
|
-
function
|
|
5256
|
+
function _temp(runStep_0) {
|
|
5292
5257
|
return runStep_0.step_details.type === "message_creation";
|
|
5293
5258
|
}
|
|
5294
|
-
function
|
|
5259
|
+
function _temp2(runStep_1) {
|
|
5295
5260
|
return runStep_1.step_details.type === "message_creation";
|
|
5296
5261
|
}
|
|
5297
|
-
function
|
|
5262
|
+
function _temp3(rs) {
|
|
5298
5263
|
return rs.status === "in_progress";
|
|
5299
5264
|
}
|
|
5300
5265
|
function _temp4(content, index) {
|
|
@@ -5303,19 +5268,19 @@ function _temp4(content, index) {
|
|
|
5303
5268
|
}, index);
|
|
5304
5269
|
}
|
|
5305
5270
|
// src/components/threads/Thread/Messages/Content/index.tsx
|
|
5306
|
-
var
|
|
5307
|
-
var
|
|
5271
|
+
var import_react_compiler_runtime32 = require("react-compiler-runtime");
|
|
5272
|
+
var import_react40 = require("react");
|
|
5308
5273
|
// src/hooks/messageGroups/useMessageGroups/index.ts
|
|
5309
|
-
var
|
|
5310
|
-
var
|
|
5274
|
+
var import_react_compiler_runtime26 = require("react-compiler-runtime");
|
|
5275
|
+
var import_react31 = require("react");
|
|
5311
5276
|
// src/hooks/messageGroups/useMessageGroups/lib/messageGroups/index.ts
|
|
5312
5277
|
var import_lodash6 = __toESM(require("lodash"), 1);
|
|
5313
|
-
var import_radash14 = require("radash");
|
|
5314
|
-
// src/lib/messages/order.ts
|
|
5315
5278
|
var import_radash13 = require("radash");
|
|
5279
|
+
// src/lib/messages/order.ts
|
|
5280
|
+
var import_radash12 = require("radash");
|
|
5316
5281
|
var order = function(_ref) {
|
|
5317
5282
|
var messages2 = _ref.messages;
|
|
5318
|
-
return (0,
|
|
5283
|
+
return (0, import_radash12.sort)(messages2, function(m) {
|
|
5319
5284
|
return m.created_at;
|
|
5320
5285
|
}, true);
|
|
5321
5286
|
};
|
|
@@ -5389,7 +5354,7 @@ var messageGroups = function(_ref) {
|
|
|
5389
5354
|
return import_lodash6.default.reduce(order({
|
|
5390
5355
|
messages: messages2
|
|
5391
5356
|
}), function(groups, message) {
|
|
5392
|
-
var group = (0,
|
|
5357
|
+
var group = (0, import_radash13.last)(groups);
|
|
5393
5358
|
if (!group) return newGroup({
|
|
5394
5359
|
groups: groups,
|
|
5395
5360
|
message: message
|
|
@@ -5411,7 +5376,7 @@ var messageGroups = function(_ref) {
|
|
|
5411
5376
|
};
|
|
5412
5377
|
// src/hooks/messageGroups/useMessageGroups/index.ts
|
|
5413
5378
|
var useMessageGroups = function(t0) {
|
|
5414
|
-
var $ = (0,
|
|
5379
|
+
var $ = (0, import_react_compiler_runtime26.c)(4);
|
|
5415
5380
|
var messages2 = t0.messages;
|
|
5416
5381
|
var t1;
|
|
5417
5382
|
var t2;
|
|
@@ -5438,16 +5403,16 @@ var useMessageGroups = function(t0) {
|
|
|
5438
5403
|
return t1;
|
|
5439
5404
|
};
|
|
5440
5405
|
// src/components/skeletons/MessagesSkeleton/index.tsx
|
|
5441
|
-
var
|
|
5442
|
-
var
|
|
5406
|
+
var import_react_compiler_runtime28 = require("react-compiler-runtime");
|
|
5407
|
+
var import_react33 = require("react");
|
|
5443
5408
|
var import_themes36 = require("@radix-ui/themes");
|
|
5444
5409
|
// src/components/messageGroups/MessageGroupBase/index.tsx
|
|
5445
|
-
var
|
|
5446
|
-
var
|
|
5410
|
+
var import_react_compiler_runtime27 = require("react-compiler-runtime");
|
|
5411
|
+
var import_react32 = require("react");
|
|
5447
5412
|
var import_themes34 = require("@radix-ui/themes");
|
|
5448
5413
|
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
5449
|
-
var MessageGroupBase = /* @__PURE__ */ (0,
|
|
5450
|
-
var $ = (0,
|
|
5414
|
+
var MessageGroupBase = /* @__PURE__ */ (0, import_react32.forwardRef)(function MessageGroupBase2(t0, ref) {
|
|
5415
|
+
var $ = (0, import_react_compiler_runtime27.c)(5);
|
|
5451
5416
|
var children = t0.children;
|
|
5452
5417
|
var t1;
|
|
5453
5418
|
if ($[0] !== children) {
|
|
@@ -5494,8 +5459,8 @@ var Name = function(_ref) {
|
|
|
5494
5459
|
};
|
|
5495
5460
|
// src/components/skeletons/MessagesSkeleton/index.tsx
|
|
5496
5461
|
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
5497
|
-
var MessagesSkeleton = /* @__PURE__ */ (0,
|
|
5498
|
-
var $ = (0,
|
|
5462
|
+
var MessagesSkeleton = /* @__PURE__ */ (0, import_react33.forwardRef)(function MessagesSkeleton2(_props, ref) {
|
|
5463
|
+
var $ = (0, import_react_compiler_runtime28.c)(7);
|
|
5499
5464
|
var t0;
|
|
5500
5465
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
5501
5466
|
t0 = /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_themes36.Skeleton, {
|
|
@@ -5586,27 +5551,27 @@ var MessagesSkeleton = /* @__PURE__ */ (0, import_react32.forwardRef)(function M
|
|
|
5586
5551
|
return t5;
|
|
5587
5552
|
});
|
|
5588
5553
|
// src/components/threads/Thread/Messages/Content/MessageGroup/index.tsx
|
|
5589
|
-
var
|
|
5590
|
-
var
|
|
5554
|
+
var import_react_compiler_runtime31 = require("react-compiler-runtime");
|
|
5555
|
+
var import_react39 = require("react");
|
|
5591
5556
|
var import_themes42 = require("@radix-ui/themes");
|
|
5592
5557
|
// src/components/messageGroups/MessageGroupBase/AssistantAvatar.tsx
|
|
5593
|
-
var
|
|
5594
|
-
var
|
|
5558
|
+
var import_react_compiler_runtime29 = require("react-compiler-runtime");
|
|
5559
|
+
var import_react35 = require("react");
|
|
5595
5560
|
var import_themes38 = require("@radix-ui/themes");
|
|
5596
5561
|
// src/contexts/assistants/AssistantAvatarContext/index.tsx
|
|
5597
|
-
var
|
|
5562
|
+
var import_react34 = require("react");
|
|
5598
5563
|
var import_themes37 = require("@radix-ui/themes");
|
|
5599
5564
|
var import_react_icons9 = require("@radix-ui/react-icons");
|
|
5600
5565
|
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
5601
|
-
var AssistantAvatarContext = /* @__PURE__ */ (0,
|
|
5566
|
+
var AssistantAvatarContext = /* @__PURE__ */ (0, import_react34.createContext)(/* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_themes37.Avatar, {
|
|
5602
5567
|
fallback: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react_icons9.LightningBoltIcon, {}),
|
|
5603
5568
|
size: "1"
|
|
5604
5569
|
}));
|
|
5605
5570
|
// src/components/messageGroups/MessageGroupBase/AssistantAvatar.tsx
|
|
5606
5571
|
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
5607
5572
|
var AssistantAvatar = function() {
|
|
5608
|
-
var $ = (0,
|
|
5609
|
-
var AssistantAvatarContextValue = (0,
|
|
5573
|
+
var $ = (0, import_react_compiler_runtime29.c)(3);
|
|
5574
|
+
var AssistantAvatarContextValue = (0, import_react35.useContext)(AssistantAvatarContext);
|
|
5610
5575
|
var t0;
|
|
5611
5576
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
5612
5577
|
t0 = {
|
|
@@ -5634,26 +5599,26 @@ var AssistantAvatar = function() {
|
|
|
5634
5599
|
return t1;
|
|
5635
5600
|
};
|
|
5636
5601
|
// src/contexts/assistants/AssistantNameContext/index.tsx
|
|
5637
|
-
var
|
|
5638
|
-
var AssistantNameContext = /* @__PURE__ */ (0,
|
|
5602
|
+
var import_react36 = require("react");
|
|
5603
|
+
var AssistantNameContext = /* @__PURE__ */ (0, import_react36.createContext)("Assistant");
|
|
5639
5604
|
// src/components/messageGroups/MessageGroupBase/UserAvatar.tsx
|
|
5640
|
-
var
|
|
5641
|
-
var
|
|
5605
|
+
var import_react_compiler_runtime30 = require("react-compiler-runtime");
|
|
5606
|
+
var import_react38 = require("react");
|
|
5642
5607
|
var import_themes40 = require("@radix-ui/themes");
|
|
5643
5608
|
// src/contexts/users/UserAvatarContext/index.tsx
|
|
5644
|
-
var
|
|
5609
|
+
var import_react37 = require("react");
|
|
5645
5610
|
var import_themes39 = require("@radix-ui/themes");
|
|
5646
5611
|
var import_react_icons10 = require("@radix-ui/react-icons");
|
|
5647
5612
|
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
5648
|
-
var UserAvatarContext = /* @__PURE__ */ (0,
|
|
5613
|
+
var UserAvatarContext = /* @__PURE__ */ (0, import_react37.createContext)(/* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_themes39.Avatar, {
|
|
5649
5614
|
fallback: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(import_react_icons10.PersonIcon, {}),
|
|
5650
5615
|
size: "1"
|
|
5651
5616
|
}));
|
|
5652
5617
|
// src/components/messageGroups/MessageGroupBase/UserAvatar.tsx
|
|
5653
5618
|
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
5654
5619
|
var UserAvatar = function() {
|
|
5655
|
-
var $ = (0,
|
|
5656
|
-
var UserAvatarContextValue = (0,
|
|
5620
|
+
var $ = (0, import_react_compiler_runtime30.c)(3);
|
|
5621
|
+
var UserAvatarContextValue = (0, import_react38.useContext)(UserAvatarContext);
|
|
5657
5622
|
var t0;
|
|
5658
5623
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
5659
5624
|
t0 = {
|
|
@@ -5697,9 +5662,9 @@ var Content5 = function(_ref) {
|
|
|
5697
5662
|
// src/components/threads/Thread/Messages/Content/MessageGroup/index.tsx
|
|
5698
5663
|
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
5699
5664
|
var MessageGroup = function(t0) {
|
|
5700
|
-
var $ = (0,
|
|
5665
|
+
var $ = (0, import_react_compiler_runtime31.c)(12);
|
|
5701
5666
|
var messageGroup = t0.messageGroup;
|
|
5702
|
-
var assistantNameContext = (0,
|
|
5667
|
+
var assistantNameContext = (0, import_react39.useContext)(AssistantNameContext);
|
|
5703
5668
|
var t1;
|
|
5704
5669
|
if ($[0] !== messageGroup.role) {
|
|
5705
5670
|
t1 = messageGroup.role === "user" ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(UserAvatar, {}) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(AssistantAvatar, {});
|
|
@@ -5763,7 +5728,7 @@ var MessageGroup = function(t0) {
|
|
|
5763
5728
|
// src/components/threads/Thread/Messages/Content/index.tsx
|
|
5764
5729
|
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
5765
5730
|
var Content6 = function() {
|
|
5766
|
-
var $ = (0,
|
|
5731
|
+
var $ = (0, import_react_compiler_runtime32.c)(11);
|
|
5767
5732
|
var _useMessages = useMessages(), messages2 = _useMessages.messages, isLoading = _useMessages.isLoading, isLoadingError = _useMessages.isLoadingError;
|
|
5768
5733
|
var addToast = useToasts().addToast;
|
|
5769
5734
|
var t0;
|
|
@@ -5800,7 +5765,7 @@ var Content6 = function() {
|
|
|
5800
5765
|
t1 = $[4];
|
|
5801
5766
|
t2 = $[5];
|
|
5802
5767
|
}
|
|
5803
|
-
(0,
|
|
5768
|
+
(0, import_react40.useEffect)(t1, t2);
|
|
5804
5769
|
if (isLoading || isLoadingError) {
|
|
5805
5770
|
var _t;
|
|
5806
5771
|
if ($[6] === Symbol.for("react.memo_cache_sentinel")) {
|
|
@@ -5837,17 +5802,17 @@ function _temp5(messageGroup) {
|
|
|
5837
5802
|
}, messageGroup.id);
|
|
5838
5803
|
}
|
|
5839
5804
|
// src/components/threads/Thread/Messages/Progress/index.tsx
|
|
5840
|
-
var import_react_compiler_runtime35 = require("react-compiler-runtime");
|
|
5841
|
-
var import_react41 = require("react");
|
|
5842
|
-
// src/components/skeletons/StartingSkeleton/index.tsx
|
|
5843
5805
|
var import_react_compiler_runtime34 = require("react-compiler-runtime");
|
|
5844
|
-
var
|
|
5806
|
+
var import_react42 = require("react");
|
|
5807
|
+
// src/components/skeletons/StartingSkeleton/index.tsx
|
|
5808
|
+
var import_react_compiler_runtime33 = require("react-compiler-runtime");
|
|
5809
|
+
var import_react41 = require("react");
|
|
5845
5810
|
var import_themes43 = require("@radix-ui/themes");
|
|
5846
5811
|
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
5847
5812
|
var StartingSkeleton = function(t0) {
|
|
5848
|
-
var $ = (0,
|
|
5813
|
+
var $ = (0, import_react_compiler_runtime33.c)(7);
|
|
5849
5814
|
var children = t0.children;
|
|
5850
|
-
var assistantNameContext = (0,
|
|
5815
|
+
var assistantNameContext = (0, import_react41.useContext)(AssistantNameContext);
|
|
5851
5816
|
var t1;
|
|
5852
5817
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
5853
5818
|
t1 = /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(AssistantAvatar, {});
|
|
@@ -5897,7 +5862,7 @@ var StartingSkeleton = function(t0) {
|
|
|
5897
5862
|
// src/components/threads/Thread/Messages/Progress/index.tsx
|
|
5898
5863
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
5899
5864
|
var Progress = function() {
|
|
5900
|
-
var $ = (0,
|
|
5865
|
+
var $ = (0, import_react_compiler_runtime34.c)(1);
|
|
5901
5866
|
var latestMessage = useLatestMessage().latestMessage;
|
|
5902
5867
|
var isMutatingMessage = useIsMutatingMessage();
|
|
5903
5868
|
var t0;
|
|
@@ -5940,17 +5905,17 @@ var Progress = function() {
|
|
|
5940
5905
|
return t1;
|
|
5941
5906
|
};
|
|
5942
5907
|
// src/components/threads/Thread/Messages/Root/index.tsx
|
|
5943
|
-
var
|
|
5908
|
+
var import_react_compiler_runtime35 = require("react-compiler-runtime");
|
|
5944
5909
|
var import_themes44 = require("@radix-ui/themes");
|
|
5945
5910
|
// src/hooks/misc/useInfiniteScroll/index.tsx
|
|
5946
|
-
var
|
|
5911
|
+
var import_react44 = require("react");
|
|
5947
5912
|
var import_react_intersection_observer = require("react-intersection-observer");
|
|
5948
5913
|
// src/hooks/misc/useThrottledEffect/index.tsx
|
|
5949
5914
|
var import_lodash7 = __toESM(require("lodash"), 1);
|
|
5950
|
-
var
|
|
5915
|
+
var import_react43 = require("react");
|
|
5951
5916
|
var useThrottledEffect = function(cb, delay, additionalDeps) {
|
|
5952
|
-
var cbRef = (0,
|
|
5953
|
-
var throttledCb = (0,
|
|
5917
|
+
var cbRef = (0, import_react43.useRef)(cb);
|
|
5918
|
+
var throttledCb = (0, import_react43.useCallback)(import_lodash7.default.throttle(function() {
|
|
5954
5919
|
var _cbRef;
|
|
5955
5920
|
return (_cbRef = cbRef).current.apply(_cbRef, arguments);
|
|
5956
5921
|
}, delay, {
|
|
@@ -5959,17 +5924,17 @@ var useThrottledEffect = function(cb, delay, additionalDeps) {
|
|
|
5959
5924
|
}), [
|
|
5960
5925
|
delay
|
|
5961
5926
|
]);
|
|
5962
|
-
(0,
|
|
5927
|
+
(0, import_react43.useEffect)(function() {
|
|
5963
5928
|
cbRef.current = cb;
|
|
5964
5929
|
});
|
|
5965
|
-
(0,
|
|
5930
|
+
(0, import_react43.useEffect)(throttledCb, [
|
|
5966
5931
|
throttledCb
|
|
5967
5932
|
].concat(_to_consumable_array(additionalDeps)));
|
|
5968
5933
|
};
|
|
5969
5934
|
// src/hooks/misc/useInfiniteScroll/index.tsx
|
|
5970
5935
|
var useInfiniteScroll = function(_ref) {
|
|
5971
5936
|
var isFetchingNextPage = _ref.isFetchingNextPage, hasNextPage = _ref.hasNextPage, fetchNextPage = _ref.fetchNextPage;
|
|
5972
|
-
var containerRef = (0,
|
|
5937
|
+
var containerRef = (0, import_react44.useRef)(null);
|
|
5973
5938
|
var _$_ref = (0, import_react_intersection_observer.useInView)({
|
|
5974
5939
|
root: containerRef.current,
|
|
5975
5940
|
rootMargin: "0px",
|
|
@@ -6038,7 +6003,7 @@ function _toPrimitive26(t, r) {
|
|
|
6038
6003
|
return ("string" === r ? String : Number)(t);
|
|
6039
6004
|
}
|
|
6040
6005
|
var Root2 = function(t0) {
|
|
6041
|
-
var $ = (0,
|
|
6006
|
+
var $ = (0, import_react_compiler_runtime35.c)(18);
|
|
6042
6007
|
var children = t0.children, style = t0.style, className = t0.className;
|
|
6043
6008
|
var _useMessages = useMessages(), isFetchingNextPage = _useMessages.isFetchingNextPage, hasNextPage = _useMessages.hasNextPage, fetchNextPage = _useMessages.fetchNextPage;
|
|
6044
6009
|
var t1;
|
|
@@ -6121,10 +6086,10 @@ var Root2 = function(t0) {
|
|
|
6121
6086
|
return t6;
|
|
6122
6087
|
};
|
|
6123
6088
|
// src/components/threads/Thread/Messages/NextPageSkeleton.tsx
|
|
6124
|
-
var
|
|
6089
|
+
var import_react_compiler_runtime36 = require("react-compiler-runtime");
|
|
6125
6090
|
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
6126
6091
|
var NextPageSkeleton = function() {
|
|
6127
|
-
var $ = (0,
|
|
6092
|
+
var $ = (0, import_react_compiler_runtime36.c)(1);
|
|
6128
6093
|
var hasNextPage = useMessages().hasNextPage;
|
|
6129
6094
|
if (!hasNextPage) {
|
|
6130
6095
|
return null;
|
|
@@ -6166,14 +6131,14 @@ Messages.Root = Root2;
|
|
|
6166
6131
|
Messages.Message = Message;
|
|
6167
6132
|
Messages.NextPageSkeleton = NextPageSkeleton;
|
|
6168
6133
|
// src/components/threads/Thread/MessageForm/Submit/index.tsx
|
|
6169
|
-
var
|
|
6134
|
+
var import_react_compiler_runtime37 = require("react-compiler-runtime");
|
|
6170
6135
|
var import_react_icons11 = require("@radix-ui/react-icons");
|
|
6171
6136
|
var import_themes46 = require("@radix-ui/themes");
|
|
6172
6137
|
// src/hooks/messages/useMessageFormContext/index.ts
|
|
6173
|
-
var
|
|
6138
|
+
var import_react46 = require("react");
|
|
6174
6139
|
// src/contexts/messages/MessageFormContext/index.ts
|
|
6175
|
-
var
|
|
6176
|
-
var MessageFormContext = /* @__PURE__ */ (0,
|
|
6140
|
+
var import_react45 = require("react");
|
|
6141
|
+
var MessageFormContext = /* @__PURE__ */ (0, import_react45.createContext)({
|
|
6177
6142
|
content: "",
|
|
6178
6143
|
isDisabled: false,
|
|
6179
6144
|
isLoading: false,
|
|
@@ -6183,7 +6148,7 @@ var MessageFormContext = /* @__PURE__ */ (0, import_react44.createContext)({
|
|
|
6183
6148
|
});
|
|
6184
6149
|
// src/hooks/messages/useMessageFormContext/index.ts
|
|
6185
6150
|
var useMessageFormContext = function() {
|
|
6186
|
-
return (0,
|
|
6151
|
+
return (0, import_react46.useContext)(MessageFormContext);
|
|
6187
6152
|
};
|
|
6188
6153
|
// src/components/threads/Thread/MessageForm/Submit/index.tsx
|
|
6189
6154
|
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
@@ -6241,7 +6206,7 @@ var Root3 = function(_ref) {
|
|
|
6241
6206
|
});
|
|
6242
6207
|
};
|
|
6243
6208
|
var Button3 = function(props) {
|
|
6244
|
-
var $ = (0,
|
|
6209
|
+
var $ = (0, import_react_compiler_runtime37.c)(10);
|
|
6245
6210
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
6246
6211
|
var _useMessageFormContext = useMessageFormContext(), isDisabled = _useMessageFormContext.isDisabled, isLoading = _useMessageFormContext.isLoading, isFileLoading = _useMessageFormContext.isFileLoading;
|
|
6247
6212
|
if (isLoading) {
|
|
@@ -6312,7 +6277,7 @@ Submit.Root = Root3;
|
|
|
6312
6277
|
Submit.Button = Button3;
|
|
6313
6278
|
// src/components/threads/Thread/MessageForm/Root/index.tsx
|
|
6314
6279
|
var import_react_query6 = require("@tanstack/react-query");
|
|
6315
|
-
var
|
|
6280
|
+
var import_react47 = require("react");
|
|
6316
6281
|
var import_react_hook_form = require("react-hook-form");
|
|
6317
6282
|
var import_themes47 = require("@radix-ui/themes");
|
|
6318
6283
|
// src/components/threads/Thread/MessageForm/Root/lib/formOptions.ts
|
|
@@ -6325,7 +6290,7 @@ var formOptions = {
|
|
|
6325
6290
|
resolver: (0, import_zod2.zodResolver)(schema)
|
|
6326
6291
|
};
|
|
6327
6292
|
// src/components/threads/Thread/MessageForm/Root/index.tsx
|
|
6328
|
-
var
|
|
6293
|
+
var import_radash14 = require("radash");
|
|
6329
6294
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
6330
6295
|
function ownKeys28(e, r) {
|
|
6331
6296
|
var t = Object.keys(e);
|
|
@@ -6396,7 +6361,7 @@ function _asyncToGenerator6(n) {
|
|
|
6396
6361
|
var Root4 = function(_ref) {
|
|
6397
6362
|
"use no memo";
|
|
6398
6363
|
var children = _ref.children, onSubmitArg = _ref.onSubmit, isDisabledArg = _ref.isDisabled, style = _ref.style, className = _ref.className;
|
|
6399
|
-
var _$_ref = _sliced_to_array((0,
|
|
6364
|
+
var _$_ref = _sliced_to_array((0, import_react47.useState)([]), 2), files = _$_ref[0], setFiles = _$_ref[1];
|
|
6400
6365
|
var formProps = (0, import_react_hook_form.useForm)(formOptions);
|
|
6401
6366
|
var handleSubmit = formProps.handleSubmit, isSubmitting = formProps.formState.isSubmitting, reset = formProps.reset, watch = formProps.watch;
|
|
6402
6367
|
var addToast = useToasts().addToast;
|
|
@@ -6410,7 +6375,7 @@ var Root4 = function(_ref) {
|
|
|
6410
6375
|
})
|
|
6411
6376
|
}).createMessage;
|
|
6412
6377
|
var isMutatingMessage = useIsMutatingMessage();
|
|
6413
|
-
var isFileLoading = (0,
|
|
6378
|
+
var isFileLoading = (0, import_react47.useMemo)(function() {
|
|
6414
6379
|
return files.some(function(file) {
|
|
6415
6380
|
return isOptimistic({
|
|
6416
6381
|
id: file.id
|
|
@@ -6419,14 +6384,14 @@ var Root4 = function(_ref) {
|
|
|
6419
6384
|
}, [
|
|
6420
6385
|
files
|
|
6421
6386
|
]);
|
|
6422
|
-
var isLoading = (0,
|
|
6387
|
+
var isLoading = (0, import_react47.useMemo)(function() {
|
|
6423
6388
|
return isMutatingMessage || isSubmitting;
|
|
6424
6389
|
}, [
|
|
6425
6390
|
isMutatingMessage,
|
|
6426
6391
|
isSubmitting
|
|
6427
6392
|
]);
|
|
6428
6393
|
var latestMessage = useLatestMessage().latestMessage;
|
|
6429
|
-
var isDisabled = (0,
|
|
6394
|
+
var isDisabled = (0, import_react47.useMemo)(function() {
|
|
6430
6395
|
var _latestMessage$metada;
|
|
6431
6396
|
return(// @ts-ignore-next-line
|
|
6432
6397
|
(latestMessage === null || latestMessage === void 0 || (_latestMessage$metada = latestMessage.metadata) === null || _latestMessage$metada === void 0 ? void 0 : _latestMessage$metada.isBlocking) || isDisabledArg);
|
|
@@ -6434,7 +6399,7 @@ var Root4 = function(_ref) {
|
|
|
6434
6399
|
latestMessage,
|
|
6435
6400
|
isDisabledArg
|
|
6436
6401
|
]);
|
|
6437
|
-
var onSubmit = onSubmitArg ? (0,
|
|
6402
|
+
var onSubmit = onSubmitArg ? (0, import_radash14.partob)(onSubmitArg, {
|
|
6438
6403
|
reset: reset,
|
|
6439
6404
|
createMessage: createMessage
|
|
6440
6405
|
}) : /* @__PURE__ */ function() {
|
|
@@ -6516,19 +6481,19 @@ var import_themes51 = require("@radix-ui/themes");
|
|
|
6516
6481
|
var import_themes48 = require("@radix-ui/themes");
|
|
6517
6482
|
var import_react_hook_form2 = require("react-hook-form");
|
|
6518
6483
|
// src/hooks/misc/usePrevious.ts
|
|
6519
|
-
var
|
|
6484
|
+
var import_react48 = require("react");
|
|
6520
6485
|
var usePrevious = function(state) {
|
|
6521
|
-
var ref = (0,
|
|
6522
|
-
(0,
|
|
6486
|
+
var ref = (0, import_react48.useRef)();
|
|
6487
|
+
(0, import_react48.useEffect)(function() {
|
|
6523
6488
|
ref.current = state;
|
|
6524
6489
|
});
|
|
6525
6490
|
return ref.current;
|
|
6526
6491
|
};
|
|
6527
6492
|
// src/components/threads/Thread/MessageForm/Field/Control.tsx
|
|
6528
|
-
var
|
|
6493
|
+
var import_react50 = require("react");
|
|
6529
6494
|
// src/components/textareas/TextareaBase/index.tsx
|
|
6530
|
-
var
|
|
6531
|
-
var
|
|
6495
|
+
var import_react_compiler_runtime38 = require("react-compiler-runtime");
|
|
6496
|
+
var import_react49 = require("react");
|
|
6532
6497
|
var import_react_textarea_autosize = __toESM(require("react-textarea-autosize"), 1);
|
|
6533
6498
|
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
6534
6499
|
var _excluded2 = [
|
|
@@ -6596,9 +6561,9 @@ function _objectWithoutPropertiesLoose2(r, e) {
|
|
|
6596
6561
|
}
|
|
6597
6562
|
return t;
|
|
6598
6563
|
}
|
|
6599
|
-
var TextareaBase = /* @__PURE__ */ (0,
|
|
6564
|
+
var TextareaBase = /* @__PURE__ */ (0, import_react49.forwardRef)(function TextareaBase2(t0, ref) {
|
|
6600
6565
|
var _className;
|
|
6601
|
-
var $ = (0,
|
|
6566
|
+
var $ = (0, import_react_compiler_runtime38.c)(14);
|
|
6602
6567
|
var className;
|
|
6603
6568
|
var rest;
|
|
6604
6569
|
var style;
|
|
@@ -6732,19 +6697,19 @@ var Root5 = function(_ref) {
|
|
|
6732
6697
|
var Input = function(props) {
|
|
6733
6698
|
"use no memo";
|
|
6734
6699
|
var _props$placeholder;
|
|
6735
|
-
var assistantNameContext = (0,
|
|
6700
|
+
var assistantNameContext = (0, import_react50.useContext)(AssistantNameContext);
|
|
6736
6701
|
var register = (0, import_react_hook_form2.useFormContext)().register;
|
|
6737
6702
|
var _useMessageFormContext = useMessageFormContext(), isDisabled = _useMessageFormContext.isDisabled, isLoading = _useMessageFormContext.isLoading;
|
|
6738
|
-
var isSubmitDisabled = (0,
|
|
6703
|
+
var isSubmitDisabled = (0, import_react50.useMemo)(function() {
|
|
6739
6704
|
return isDisabled || isLoading;
|
|
6740
6705
|
}, [
|
|
6741
6706
|
isDisabled,
|
|
6742
6707
|
isLoading
|
|
6743
6708
|
]);
|
|
6744
6709
|
var isDisabledPrevious = usePrevious(isDisabled);
|
|
6745
|
-
var textareaRef = (0,
|
|
6710
|
+
var textareaRef = (0, import_react50.useRef)(null);
|
|
6746
6711
|
var textareaProps = register("content");
|
|
6747
|
-
(0,
|
|
6712
|
+
(0, import_react50.useEffect)(function() {
|
|
6748
6713
|
if (isDisabled) return;
|
|
6749
6714
|
if (!isDisabledPrevious) return;
|
|
6750
6715
|
if (!textareaRef.current) return;
|
|
@@ -6781,7 +6746,7 @@ var Control = function(props) {
|
|
|
6781
6746
|
Control.Root = Root5;
|
|
6782
6747
|
Control.Input = Input;
|
|
6783
6748
|
// src/components/threads/Thread/MessageForm/Field/Files/Preview.tsx
|
|
6784
|
-
var
|
|
6749
|
+
var import_react_compiler_runtime39 = require("react-compiler-runtime");
|
|
6785
6750
|
var import_themes49 = require("@radix-ui/themes");
|
|
6786
6751
|
var import_react_icons12 = require("@radix-ui/react-icons");
|
|
6787
6752
|
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
@@ -6829,7 +6794,7 @@ function _toPrimitive31(t, r) {
|
|
|
6829
6794
|
return ("string" === r ? String : Number)(t);
|
|
6830
6795
|
}
|
|
6831
6796
|
var Preview = function(props) {
|
|
6832
|
-
var $ = (0,
|
|
6797
|
+
var $ = (0, import_react_compiler_runtime39.c)(8);
|
|
6833
6798
|
var _useMessageFormContext = useMessageFormContext(), files = _useMessageFormContext.files, setFiles = _useMessageFormContext.setFiles;
|
|
6834
6799
|
if (!files.length) {
|
|
6835
6800
|
return null;
|
|
@@ -6921,13 +6886,13 @@ var Preview = function(props) {
|
|
|
6921
6886
|
return t1;
|
|
6922
6887
|
};
|
|
6923
6888
|
// src/components/threads/Thread/MessageForm/Field/Files/Control.tsx
|
|
6924
|
-
var
|
|
6925
|
-
var
|
|
6889
|
+
var import_react51 = require("react");
|
|
6890
|
+
var import_radash15 = require("radash");
|
|
6926
6891
|
var import_dayjs2 = __toESM(require("dayjs"), 1);
|
|
6927
6892
|
var import_react_icons13 = require("@radix-ui/react-icons");
|
|
6928
6893
|
var import_themes50 = require("@radix-ui/themes");
|
|
6929
6894
|
// src/hooks/files/useCreateFile/index.ts
|
|
6930
|
-
var
|
|
6895
|
+
var import_react_compiler_runtime40 = require("react-compiler-runtime");
|
|
6931
6896
|
var import_react_query7 = require("@tanstack/react-query");
|
|
6932
6897
|
// src/hooks/files/useCreateFile/lib/mutationOptions/mutationFn/body/formData.ts
|
|
6933
6898
|
var formData = function(variables) {
|
|
@@ -7163,7 +7128,7 @@ function _toPrimitive34(t, r) {
|
|
|
7163
7128
|
return ("string" === r ? String : Number)(t);
|
|
7164
7129
|
}
|
|
7165
7130
|
var useCreateFile = function(t0) {
|
|
7166
|
-
var $ = (0,
|
|
7131
|
+
var $ = (0, import_react_compiler_runtime40.c)(15);
|
|
7167
7132
|
var t1;
|
|
7168
7133
|
if ($[0] !== t0) {
|
|
7169
7134
|
t1 = t0 === void 0 ? {
|
|
@@ -7177,7 +7142,7 @@ var useCreateFile = function(t0) {
|
|
|
7177
7142
|
var t2 = t1.onError;
|
|
7178
7143
|
var t3;
|
|
7179
7144
|
if ($[2] !== t2) {
|
|
7180
|
-
t3 = t2 === void 0 ?
|
|
7145
|
+
t3 = t2 === void 0 ? _temp22 : t2;
|
|
7181
7146
|
$[2] = t2;
|
|
7182
7147
|
$[3] = t3;
|
|
7183
7148
|
} else {
|
|
@@ -7237,7 +7202,7 @@ var useCreateFile = function(t0) {
|
|
|
7237
7202
|
return t6;
|
|
7238
7203
|
};
|
|
7239
7204
|
function _temp6() {}
|
|
7240
|
-
function
|
|
7205
|
+
function _temp22() {}
|
|
7241
7206
|
// src/components/threads/Thread/MessageForm/Field/Files/Control.tsx
|
|
7242
7207
|
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
7243
7208
|
function ownKeys35(e, r) {
|
|
@@ -7352,7 +7317,7 @@ var Control2 = function(props) {
|
|
|
7352
7317
|
var _useMessageFormContext = useMessageFormContext(), isDisabled = _useMessageFormContext.isDisabled, isLoading = _useMessageFormContext.isLoading, setFiles = _useMessageFormContext.setFiles;
|
|
7353
7318
|
var createFile = useCreateFile().createFile;
|
|
7354
7319
|
var addToast = useToasts().addToast;
|
|
7355
|
-
var onChange = (0,
|
|
7320
|
+
var onChange = (0, import_react51.useCallback)(/* @__PURE__ */ function() {
|
|
7356
7321
|
var _ref = _asyncToGenerator8(function(event) {
|
|
7357
7322
|
var fileObjects, newFiles, _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _loop, _iterator, _step, err;
|
|
7358
7323
|
return _ts_generator(this, function(_state) {
|
|
@@ -7376,7 +7341,7 @@ var Control2 = function(props) {
|
|
|
7376
7341
|
});
|
|
7377
7342
|
setFiles(function(prev) {
|
|
7378
7343
|
return _to_consumable_array(prev).concat(_to_consumable_array(newFiles.map(function(file) {
|
|
7379
|
-
return (0,
|
|
7344
|
+
return (0, import_radash15.omit)(file, [
|
|
7380
7345
|
"fileObject"
|
|
7381
7346
|
]);
|
|
7382
7347
|
})));
|
|
@@ -7706,8 +7671,8 @@ var import_themes53 = require("@radix-ui/themes");
|
|
|
7706
7671
|
// src/components/threads/Thread/Provider/index.tsx
|
|
7707
7672
|
var Provider2 = SuperinterfaceProvider;
|
|
7708
7673
|
// src/components/toasts/ToastsProvider/index.tsx
|
|
7709
|
-
var
|
|
7710
|
-
var
|
|
7674
|
+
var import_react_compiler_runtime41 = require("react-compiler-runtime");
|
|
7675
|
+
var import_react52 = require("react");
|
|
7711
7676
|
var Toast2 = __toESM(require("@radix-ui/react-toast"), 1);
|
|
7712
7677
|
// src/components/toasts/ToastsProvider/CustomToast.tsx
|
|
7713
7678
|
var Toast = __toESM(require("@radix-ui/react-toast"), 1);
|
|
@@ -7745,7 +7710,7 @@ var CustomToast = function(_ref) {
|
|
|
7745
7710
|
// src/components/toasts/ToastsProvider/index.tsx
|
|
7746
7711
|
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
7747
7712
|
var ToastsProvider = function(t0) {
|
|
7748
|
-
var $ = (0,
|
|
7713
|
+
var $ = (0, import_react_compiler_runtime41.c)(15);
|
|
7749
7714
|
var children = t0.children, t1 = t0.bottom;
|
|
7750
7715
|
var bottom = t1 === void 0 ? 0 : t1;
|
|
7751
7716
|
var t2;
|
|
@@ -7755,7 +7720,7 @@ var ToastsProvider = function(t0) {
|
|
|
7755
7720
|
} else {
|
|
7756
7721
|
t2 = $[0];
|
|
7757
7722
|
}
|
|
7758
|
-
var _ref = _sliced_to_array((0,
|
|
7723
|
+
var _ref = _sliced_to_array((0, import_react52.useState)(t2), 2), toasts = _ref[0], setToasts = _ref[1];
|
|
7759
7724
|
var t3;
|
|
7760
7725
|
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
7761
7726
|
t3 = function(toast) {
|
|
@@ -7988,13 +7953,13 @@ Thread.Root = Root8;
|
|
|
7988
7953
|
Thread.Messages = Messages;
|
|
7989
7954
|
Thread.MessageForm = MessageForm;
|
|
7990
7955
|
// src/hooks/messages/useMessageContext/index.ts
|
|
7991
|
-
var
|
|
7956
|
+
var import_react53 = require("react");
|
|
7992
7957
|
var useMessageContext = function() {
|
|
7993
|
-
return (0,
|
|
7958
|
+
return (0, import_react53.useContext)(MessageContext);
|
|
7994
7959
|
};
|
|
7995
7960
|
// src/hooks/assistants/useAssistant/index.ts
|
|
7996
|
-
var
|
|
7997
|
-
var
|
|
7961
|
+
var import_react_compiler_runtime42 = require("react-compiler-runtime");
|
|
7962
|
+
var import_react54 = require("react");
|
|
7998
7963
|
var import_react_query9 = require("@tanstack/react-query");
|
|
7999
7964
|
// src/hooks/assistants/useAssistant/lib/queryOptions/index.ts
|
|
8000
7965
|
var import_react_query8 = require("@tanstack/react-query");
|
|
@@ -8143,7 +8108,7 @@ function _toPrimitive40(t, r) {
|
|
|
8143
8108
|
return ("string" === r ? String : Number)(t);
|
|
8144
8109
|
}
|
|
8145
8110
|
var useAssistant = function(t0) {
|
|
8146
|
-
var $ = (0,
|
|
8111
|
+
var $ = (0, import_react_compiler_runtime42.c)(6);
|
|
8147
8112
|
var assistantId = t0.assistantId;
|
|
8148
8113
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
8149
8114
|
var t1;
|
|
@@ -8176,26 +8141,26 @@ var useAssistant = function(t0) {
|
|
|
8176
8141
|
return t2;
|
|
8177
8142
|
};
|
|
8178
8143
|
// src/components/threads/ThreadDialog/Provider/index.tsx
|
|
8179
|
-
var
|
|
8180
|
-
var
|
|
8144
|
+
var import_react_compiler_runtime43 = require("react-compiler-runtime");
|
|
8145
|
+
var import_react57 = require("react");
|
|
8181
8146
|
// src/contexts/threads/ThreadDialogContext/index.ts
|
|
8182
|
-
var
|
|
8183
|
-
var ThreadDialogContext = /* @__PURE__ */ (0,
|
|
8147
|
+
var import_react55 = require("react");
|
|
8148
|
+
var ThreadDialogContext = /* @__PURE__ */ (0, import_react55.createContext)({
|
|
8184
8149
|
isOpen: false,
|
|
8185
8150
|
setIsOpen: function() {}
|
|
8186
8151
|
});
|
|
8187
8152
|
// src/hooks/threads/useThreadDialogContext/index.ts
|
|
8188
|
-
var
|
|
8153
|
+
var import_react56 = require("react");
|
|
8189
8154
|
var useThreadDialogContext = function() {
|
|
8190
|
-
return (0,
|
|
8155
|
+
return (0, import_react56.useContext)(ThreadDialogContext);
|
|
8191
8156
|
};
|
|
8192
8157
|
// src/components/threads/ThreadDialog/Provider/index.tsx
|
|
8193
8158
|
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
8194
8159
|
var Provider4 = function(t0) {
|
|
8195
|
-
var $ = (0,
|
|
8160
|
+
var $ = (0, import_react_compiler_runtime43.c)(5);
|
|
8196
8161
|
var children = t0.children;
|
|
8197
8162
|
var threadDialogContext = useThreadDialogContext();
|
|
8198
|
-
var _ref = _sliced_to_array((0,
|
|
8163
|
+
var _ref = _sliced_to_array((0, import_react57.useState)(threadDialogContext.isOpen), 2), isOpen = _ref[0], setIsOpen = _ref[1];
|
|
8199
8164
|
var t1;
|
|
8200
8165
|
if ($[0] !== isOpen) {
|
|
8201
8166
|
t1 = {
|
|
@@ -8230,7 +8195,7 @@ var Root9 = function(_ref) {
|
|
|
8230
8195
|
});
|
|
8231
8196
|
};
|
|
8232
8197
|
// src/components/threads/ThreadDialog/Trigger/index.tsx
|
|
8233
|
-
var
|
|
8198
|
+
var import_react_compiler_runtime44 = require("react-compiler-runtime");
|
|
8234
8199
|
var import_themes55 = require("@radix-ui/themes");
|
|
8235
8200
|
// src/components/threads/ThreadDialog/Trigger/Button.tsx
|
|
8236
8201
|
var import_themes54 = require("@radix-ui/themes");
|
|
@@ -8333,7 +8298,7 @@ function _toPrimitive42(t, r) {
|
|
|
8333
8298
|
return ("string" === r ? String : Number)(t);
|
|
8334
8299
|
}
|
|
8335
8300
|
var Root10 = function(t0) {
|
|
8336
|
-
var $ = (0,
|
|
8301
|
+
var $ = (0, import_react_compiler_runtime44.c)(14);
|
|
8337
8302
|
var children = t0.children, style = t0.style, className = t0.className;
|
|
8338
8303
|
var _useThreadDialogContext = useThreadDialogContext(), setIsOpen = _useThreadDialogContext.setIsOpen, isOpen = _useThreadDialogContext.isOpen;
|
|
8339
8304
|
var t1 = isOpen ? "none" : "flex";
|
|
@@ -8414,15 +8379,15 @@ function _temp8(prev) {
|
|
|
8414
8379
|
return !prev;
|
|
8415
8380
|
}
|
|
8416
8381
|
// src/components/threads/ThreadDialog/Content/index.tsx
|
|
8417
|
-
var
|
|
8382
|
+
var import_react_compiler_runtime46 = require("react-compiler-runtime");
|
|
8418
8383
|
var import_themes57 = require("@radix-ui/themes");
|
|
8419
8384
|
// src/components/threads/ThreadDialog/Close/index.tsx
|
|
8420
|
-
var
|
|
8385
|
+
var import_react_compiler_runtime45 = require("react-compiler-runtime");
|
|
8421
8386
|
var import_react_icons16 = require("@radix-ui/react-icons");
|
|
8422
8387
|
var import_themes56 = require("@radix-ui/themes");
|
|
8423
8388
|
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
8424
8389
|
var Close = function() {
|
|
8425
|
-
var $ = (0,
|
|
8390
|
+
var $ = (0, import_react_compiler_runtime45.c)(9);
|
|
8426
8391
|
var _useThreadDialogContext = useThreadDialogContext(), setIsOpen = _useThreadDialogContext.setIsOpen, isOpen = _useThreadDialogContext.isOpen;
|
|
8427
8392
|
var t0 = isOpen ? "flex" : "none";
|
|
8428
8393
|
var t1;
|
|
@@ -8538,7 +8503,7 @@ function _toPrimitive43(t, r) {
|
|
|
8538
8503
|
return ("string" === r ? String : Number)(t);
|
|
8539
8504
|
}
|
|
8540
8505
|
var Root11 = function(t0) {
|
|
8541
|
-
var $ = (0,
|
|
8506
|
+
var $ = (0, import_react_compiler_runtime46.c)(19);
|
|
8542
8507
|
var children = t0.children, className = t0.className, style = t0.style;
|
|
8543
8508
|
var isOpen = useThreadDialogContext().isOpen;
|
|
8544
8509
|
if (!isOpen) {
|
|
@@ -8737,10 +8702,10 @@ ThreadDialog.Root = Root9;
|
|
|
8737
8702
|
ThreadDialog.Trigger = Trigger;
|
|
8738
8703
|
ThreadDialog.Content = Content7;
|
|
8739
8704
|
// src/components/threads/AudioThread/Root/index.tsx
|
|
8740
|
-
var
|
|
8705
|
+
var import_react_compiler_runtime51 = require("react-compiler-runtime");
|
|
8741
8706
|
var import_themes58 = require("@radix-ui/themes");
|
|
8742
8707
|
// src/contexts/threads/AudioThreadContext/index.ts
|
|
8743
|
-
var
|
|
8708
|
+
var import_react58 = require("react");
|
|
8744
8709
|
function asyncGeneratorStep10(n, t, e, r, o, a, c) {
|
|
8745
8710
|
try {
|
|
8746
8711
|
var i = n[a](c), u = i.value;
|
|
@@ -8764,7 +8729,7 @@ function _asyncToGenerator10(n) {
|
|
|
8764
8729
|
});
|
|
8765
8730
|
};
|
|
8766
8731
|
}
|
|
8767
|
-
var AudioThreadContext = /* @__PURE__ */ (0,
|
|
8732
|
+
var AudioThreadContext = /* @__PURE__ */ (0, import_react58.createContext)({
|
|
8768
8733
|
status: "idle",
|
|
8769
8734
|
recorderProps: {
|
|
8770
8735
|
status: "idle",
|
|
@@ -8857,8 +8822,8 @@ var AudioThreadContext = /* @__PURE__ */ (0, import_react57.createContext)({
|
|
|
8857
8822
|
}
|
|
8858
8823
|
});
|
|
8859
8824
|
// src/hooks/misc/usePermission/index.ts
|
|
8860
|
-
var
|
|
8861
|
-
var
|
|
8825
|
+
var import_react_compiler_runtime47 = require("react-compiler-runtime");
|
|
8826
|
+
var import_react59 = require("react");
|
|
8862
8827
|
// src/hooks/misc/usePermission/util.ts
|
|
8863
8828
|
var noop = function() {};
|
|
8864
8829
|
function on(obj) {
|
|
@@ -8881,8 +8846,8 @@ function off(obj) {
|
|
|
8881
8846
|
}
|
|
8882
8847
|
// src/hooks/misc/usePermission/index.ts
|
|
8883
8848
|
var usePermission = function(permissionDesc) {
|
|
8884
|
-
var $ = (0,
|
|
8885
|
-
var _ref = _sliced_to_array((0,
|
|
8849
|
+
var $ = (0, import_react_compiler_runtime47.c)(3);
|
|
8850
|
+
var _ref = _sliced_to_array((0, import_react59.useState)(""), 2), state = _ref[0], setState = _ref[1];
|
|
8886
8851
|
var t0;
|
|
8887
8852
|
var t1;
|
|
8888
8853
|
if ($[0] !== permissionDesc) {
|
|
@@ -8921,7 +8886,7 @@ var usePermission = function(permissionDesc) {
|
|
|
8921
8886
|
t0 = $[1];
|
|
8922
8887
|
t1 = $[2];
|
|
8923
8888
|
}
|
|
8924
|
-
(0,
|
|
8889
|
+
(0, import_react59.useEffect)(t0, t1);
|
|
8925
8890
|
return state;
|
|
8926
8891
|
};
|
|
8927
8892
|
// src/components/threads/AudioThread/Root/lib/blobToData.ts
|
|
@@ -8935,10 +8900,10 @@ var blobToData = function(blob) {
|
|
|
8935
8900
|
});
|
|
8936
8901
|
};
|
|
8937
8902
|
// src/hooks/audioThreads/useStatus/index.ts
|
|
8938
|
-
var
|
|
8939
|
-
var
|
|
8903
|
+
var import_react_compiler_runtime48 = require("react-compiler-runtime");
|
|
8904
|
+
var import_react60 = require("react");
|
|
8940
8905
|
var useStatus = function(t0) {
|
|
8941
|
-
var $ = (0,
|
|
8906
|
+
var $ = (0, import_react_compiler_runtime48.c)(2);
|
|
8942
8907
|
var messageAudioProps = t0.messageAudioProps, recorderProps = t0.recorderProps, createMessageProps = t0.createMessageProps;
|
|
8943
8908
|
var latestMessageProps = useLatestMessage();
|
|
8944
8909
|
var t1;
|
|
@@ -8994,14 +8959,14 @@ var useStatus = function(t0) {
|
|
|
8994
8959
|
// src/hooks/audioThreads/useRecorder/index.ts
|
|
8995
8960
|
var import_dayjs3 = __toESM(require("dayjs"), 1);
|
|
8996
8961
|
var import_use_audio_capture = require("use-audio-capture");
|
|
8997
|
-
var
|
|
8962
|
+
var import_react62 = require("react");
|
|
8998
8963
|
var import_react_use_audio_player = require("react-use-audio-player");
|
|
8999
8964
|
// src/hooks/misc/useInterval.ts
|
|
9000
|
-
var
|
|
9001
|
-
var
|
|
8965
|
+
var import_react_compiler_runtime49 = require("react-compiler-runtime");
|
|
8966
|
+
var import_react61 = require("react");
|
|
9002
8967
|
var useInterval = function(callback, delay) {
|
|
9003
|
-
var $ = (0,
|
|
9004
|
-
var savedCallback = (0,
|
|
8968
|
+
var $ = (0, import_react_compiler_runtime49.c)(5);
|
|
8969
|
+
var savedCallback = (0, import_react61.useRef)(_temp10);
|
|
9005
8970
|
var t0;
|
|
9006
8971
|
if ($[0] !== callback) {
|
|
9007
8972
|
t0 = function() {
|
|
@@ -9012,7 +8977,7 @@ var useInterval = function(callback, delay) {
|
|
|
9012
8977
|
} else {
|
|
9013
8978
|
t0 = $[1];
|
|
9014
8979
|
}
|
|
9015
|
-
(0,
|
|
8980
|
+
(0, import_react61.useEffect)(t0);
|
|
9016
8981
|
var t1;
|
|
9017
8982
|
var t2;
|
|
9018
8983
|
if ($[2] !== delay) {
|
|
@@ -9036,7 +9001,7 @@ var useInterval = function(callback, delay) {
|
|
|
9036
9001
|
t1 = $[3];
|
|
9037
9002
|
t2 = $[4];
|
|
9038
9003
|
}
|
|
9039
|
-
(0,
|
|
9004
|
+
(0, import_react61.useEffect)(t1, t2);
|
|
9040
9005
|
};
|
|
9041
9006
|
function _temp10() {}
|
|
9042
9007
|
// src/hooks/audioThreads/useRecorder/index.ts
|
|
@@ -9108,14 +9073,14 @@ function _asyncToGenerator11(n) {
|
|
|
9108
9073
|
}
|
|
9109
9074
|
var useRecorder = function(_ref) {
|
|
9110
9075
|
var isStopOnSilence = _ref.isStopOnSilence, _onStart = _ref.onStart, _onStop = _ref.onStop;
|
|
9111
|
-
var _$_ref = _sliced_to_array((0,
|
|
9112
|
-
var _$_ref1 = _sliced_to_array((0,
|
|
9113
|
-
var _$_ref2 = _sliced_to_array((0,
|
|
9114
|
-
var _$_ref3 = _sliced_to_array((0,
|
|
9076
|
+
var _$_ref = _sliced_to_array((0, import_react62.useState)(null), 2), silenceStart = _$_ref[0], setSilenceStart = _$_ref[1];
|
|
9077
|
+
var _$_ref1 = _sliced_to_array((0, import_react62.useState)(null), 2), noiseStart = _$_ref1[0], setNoiseStart = _$_ref1[1];
|
|
9078
|
+
var _$_ref2 = _sliced_to_array((0, import_react62.useState)(null), 2), mediaStream = _$_ref2[0], setMediaStream = _$_ref2[1];
|
|
9079
|
+
var _$_ref3 = _sliced_to_array((0, import_react62.useState)("idle"), 2), status = _$_ref3[0], setStatus = _$_ref3[1];
|
|
9115
9080
|
var startAudioPlayer = (0, import_react_use_audio_player.useAudioPlayer)();
|
|
9116
9081
|
var endAudioPlayer = (0, import_react_use_audio_player.useAudioPlayer)();
|
|
9117
|
-
var _$_ref4 = _sliced_to_array((0,
|
|
9118
|
-
(0,
|
|
9082
|
+
var _$_ref4 = _sliced_to_array((0, import_react62.useState)(false), 2), isLoaded = _$_ref4[0], setIsLoaded = _$_ref4[1];
|
|
9083
|
+
(0, import_react62.useEffect)(function() {
|
|
9119
9084
|
if (isLoaded) return;
|
|
9120
9085
|
setIsLoaded(true);
|
|
9121
9086
|
}, [
|
|
@@ -9175,9 +9140,9 @@ var useRecorder = function(_ref) {
|
|
|
9175
9140
|
setNoiseStart(null);
|
|
9176
9141
|
}
|
|
9177
9142
|
});
|
|
9178
|
-
var _$_ref5 = _sliced_to_array((0,
|
|
9179
|
-
var isInited = (0,
|
|
9180
|
-
(0,
|
|
9143
|
+
var _$_ref5 = _sliced_to_array((0, import_react62.useState)(null), 2), audioEngine = _$_ref5[0], setAudioEngine = _$_ref5[1];
|
|
9144
|
+
var isInited = (0, import_react62.useRef)(false);
|
|
9145
|
+
(0, import_react62.useEffect)(function() {
|
|
9181
9146
|
if (!mediaStream) return;
|
|
9182
9147
|
if (isInited.current) return;
|
|
9183
9148
|
isInited.current = true;
|
|
@@ -9190,7 +9155,7 @@ var useRecorder = function(_ref) {
|
|
|
9190
9155
|
isInited,
|
|
9191
9156
|
mediaStream
|
|
9192
9157
|
]);
|
|
9193
|
-
var visualizationAnalyser = (0,
|
|
9158
|
+
var visualizationAnalyser = (0, import_react62.useMemo)(function() {
|
|
9194
9159
|
if (!audioEngine) return null;
|
|
9195
9160
|
var result = audioEngine.audioContext.createAnalyser();
|
|
9196
9161
|
audioEngine.source.connect(result);
|
|
@@ -9198,7 +9163,7 @@ var useRecorder = function(_ref) {
|
|
|
9198
9163
|
}, [
|
|
9199
9164
|
audioEngine
|
|
9200
9165
|
]);
|
|
9201
|
-
var silenceAnalyser = (0,
|
|
9166
|
+
var silenceAnalyser = (0, import_react62.useMemo)(function() {
|
|
9202
9167
|
if (!audioEngine) return null;
|
|
9203
9168
|
var result_0 = audioEngine.audioContext.createAnalyser();
|
|
9204
9169
|
result_0.minDecibels = -60;
|
|
@@ -9207,7 +9172,7 @@ var useRecorder = function(_ref) {
|
|
|
9207
9172
|
}, [
|
|
9208
9173
|
audioEngine
|
|
9209
9174
|
]);
|
|
9210
|
-
var handleSilence = (0,
|
|
9175
|
+
var handleSilence = (0, import_react62.useCallback)(function() {
|
|
9211
9176
|
if (!silenceAnalyser) return;
|
|
9212
9177
|
var frequencyData = new Uint8Array(silenceAnalyser.frequencyBinCount);
|
|
9213
9178
|
silenceAnalyser.getByteFrequencyData(frequencyData);
|
|
@@ -9230,7 +9195,7 @@ var useRecorder = function(_ref) {
|
|
|
9230
9195
|
setNoiseStart,
|
|
9231
9196
|
setSilenceStart
|
|
9232
9197
|
]);
|
|
9233
|
-
(0,
|
|
9198
|
+
(0, import_react62.useEffect)(function() {
|
|
9234
9199
|
if (!isStopOnSilence) return;
|
|
9235
9200
|
requestAnimationFrame(function() {
|
|
9236
9201
|
return handleSilence();
|
|
@@ -9253,13 +9218,13 @@ var useRecorder = function(_ref) {
|
|
|
9253
9218
|
});
|
|
9254
9219
|
};
|
|
9255
9220
|
// src/hooks/audioThreads/useMessageAudio/index.ts
|
|
9256
|
-
var
|
|
9257
|
-
var
|
|
9221
|
+
var import_react_compiler_runtime50 = require("react-compiler-runtime");
|
|
9222
|
+
var import_react63 = require("react");
|
|
9258
9223
|
var import_compromise = __toESM(require("compromise"), 1);
|
|
9259
9224
|
var import_howler = require("howler");
|
|
9260
9225
|
var import_react_use_audio_player2 = require("react-use-audio-player");
|
|
9261
9226
|
// src/hooks/audioThreads/useMessageAudio/lib/input.ts
|
|
9262
|
-
var
|
|
9227
|
+
var import_radash16 = require("radash");
|
|
9263
9228
|
var input = function(_ref) {
|
|
9264
9229
|
var message = _ref.message;
|
|
9265
9230
|
var textContents = message.content.filter(function(c) {
|
|
@@ -9268,7 +9233,7 @@ var input = function(_ref) {
|
|
|
9268
9233
|
var result = textContents.map(function(c) {
|
|
9269
9234
|
return c.text.value;
|
|
9270
9235
|
}).join(" ");
|
|
9271
|
-
if ((0,
|
|
9236
|
+
if ((0, import_radash16.isEmpty)(result)) return null;
|
|
9272
9237
|
return result;
|
|
9273
9238
|
};
|
|
9274
9239
|
// src/hooks/audioThreads/useMessageAudio/lib/isHtmlAudioSupported.ts
|
|
@@ -9335,9 +9300,9 @@ var getMessageSentences = function(_ref) {
|
|
|
9335
9300
|
});
|
|
9336
9301
|
};
|
|
9337
9302
|
var useMessageAudio = function(t0) {
|
|
9338
|
-
var $ = (0,
|
|
9303
|
+
var $ = (0, import_react_compiler_runtime50.c)(44);
|
|
9339
9304
|
var onEnd = t0.onEnd;
|
|
9340
|
-
var _ref = _sliced_to_array((0,
|
|
9305
|
+
var _ref = _sliced_to_array((0, import_react63.useState)(false), 2), isAudioPlayed = _ref[0], setIsAudioPlayed = _ref[1];
|
|
9341
9306
|
var t1;
|
|
9342
9307
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
9343
9308
|
t1 = [];
|
|
@@ -9345,7 +9310,7 @@ var useMessageAudio = function(t0) {
|
|
|
9345
9310
|
} else {
|
|
9346
9311
|
t1 = $[0];
|
|
9347
9312
|
}
|
|
9348
|
-
var _ref1 = _sliced_to_array((0,
|
|
9313
|
+
var _ref1 = _sliced_to_array((0, import_react63.useState)(t1), 2), stoppedMessageIds = _ref1[0], setStoppedMessageIds = _ref1[1];
|
|
9349
9314
|
var t2;
|
|
9350
9315
|
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
9351
9316
|
t2 = [];
|
|
@@ -9353,11 +9318,11 @@ var useMessageAudio = function(t0) {
|
|
|
9353
9318
|
} else {
|
|
9354
9319
|
t2 = $[1];
|
|
9355
9320
|
}
|
|
9356
|
-
var _ref2 = _sliced_to_array((0,
|
|
9321
|
+
var _ref2 = _sliced_to_array((0, import_react63.useState)(t2), 2), playedMessageSentences = _ref2[0], setPlayedMessageSentences = _ref2[1];
|
|
9357
9322
|
var audioPlayer = (0, import_react_use_audio_player2.useAudioPlayer)();
|
|
9358
9323
|
var nextAudioPlayer = (0, import_react_use_audio_player2.useAudioPlayer)();
|
|
9359
9324
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
9360
|
-
var _ref3 = _sliced_to_array((0,
|
|
9325
|
+
var _ref3 = _sliced_to_array((0, import_react63.useState)(false), 2), isPlaying = _ref3[0], setIsPlaying = _ref3[1];
|
|
9361
9326
|
var latestMessageProps = useLatestMessage();
|
|
9362
9327
|
var t3;
|
|
9363
9328
|
bb0: {
|
|
@@ -9549,7 +9514,7 @@ var useMessageAudio = function(t0) {
|
|
|
9549
9514
|
} else {
|
|
9550
9515
|
t5 = $[29];
|
|
9551
9516
|
}
|
|
9552
|
-
(0,
|
|
9517
|
+
(0, import_react63.useEffect)(t4, t5);
|
|
9553
9518
|
var t6;
|
|
9554
9519
|
if ($[30] !== audioPlayer) {
|
|
9555
9520
|
t6 = [
|
|
@@ -9560,9 +9525,9 @@ var useMessageAudio = function(t0) {
|
|
|
9560
9525
|
} else {
|
|
9561
9526
|
t6 = $[31];
|
|
9562
9527
|
}
|
|
9563
|
-
(0,
|
|
9564
|
-
var _ref4 = _sliced_to_array((0,
|
|
9565
|
-
var isAudioEngineInited = (0,
|
|
9528
|
+
(0, import_react63.useEffect)(_temp11, t6);
|
|
9529
|
+
var _ref4 = _sliced_to_array((0, import_react63.useState)(null), 2), audioEngine = _ref4[0], setAudioEngine = _ref4[1];
|
|
9530
|
+
var isAudioEngineInited = (0, import_react63.useRef)(false);
|
|
9566
9531
|
var t7;
|
|
9567
9532
|
if ($[32] !== audioPlayer.playing) {
|
|
9568
9533
|
t7 = function() {
|
|
@@ -9602,7 +9567,7 @@ var useMessageAudio = function(t0) {
|
|
|
9602
9567
|
} else {
|
|
9603
9568
|
t8 = $[35];
|
|
9604
9569
|
}
|
|
9605
|
-
(0,
|
|
9570
|
+
(0, import_react63.useEffect)(t7, t8);
|
|
9606
9571
|
var t9;
|
|
9607
9572
|
bb1: {
|
|
9608
9573
|
if (!audioEngine) {
|
|
@@ -9744,7 +9709,7 @@ function _asyncToGenerator12(n) {
|
|
|
9744
9709
|
};
|
|
9745
9710
|
}
|
|
9746
9711
|
var Content8 = function(t0) {
|
|
9747
|
-
var $ = (0,
|
|
9712
|
+
var $ = (0, import_react_compiler_runtime51.c)(21);
|
|
9748
9713
|
var children = t0.children, className = t0.className, style = t0.style;
|
|
9749
9714
|
var addToast = useToasts().addToast;
|
|
9750
9715
|
var queryClient = (0, import_react_query10.useQueryClient)();
|
|
@@ -9897,38 +9862,38 @@ var Root12 = function(_ref) {
|
|
|
9897
9862
|
});
|
|
9898
9863
|
};
|
|
9899
9864
|
function _temp12() {
|
|
9900
|
-
return
|
|
9865
|
+
return _temp23.apply(this, arguments);
|
|
9901
9866
|
}
|
|
9902
|
-
function
|
|
9903
|
-
|
|
9867
|
+
function _temp23() {
|
|
9868
|
+
_temp23 = _asyncToGenerator12(function() {
|
|
9904
9869
|
return _ts_generator(this, function(_state) {
|
|
9905
9870
|
return [
|
|
9906
9871
|
2
|
|
9907
9872
|
];
|
|
9908
9873
|
});
|
|
9909
9874
|
});
|
|
9910
|
-
return
|
|
9875
|
+
return _temp23.apply(this, arguments);
|
|
9911
9876
|
}
|
|
9912
9877
|
// src/components/threads/AudioThread/Visualization/index.tsx
|
|
9913
|
-
var
|
|
9878
|
+
var import_react66 = require("react");
|
|
9914
9879
|
var import_lodash9 = __toESM(require("lodash"), 1);
|
|
9915
9880
|
var import_themes60 = require("@radix-ui/themes");
|
|
9916
9881
|
// src/hooks/threads/useAudioThreadContext/index.ts
|
|
9917
|
-
var
|
|
9882
|
+
var import_react64 = require("react");
|
|
9918
9883
|
var useAudioThreadContext = function() {
|
|
9919
|
-
return (0,
|
|
9884
|
+
return (0, import_react64.useContext)(AudioThreadContext);
|
|
9920
9885
|
};
|
|
9921
9886
|
// src/components/threads/AudioThread/BarsVisualizer/index.tsx
|
|
9922
9887
|
var import_lodash8 = __toESM(require("lodash"), 1);
|
|
9923
9888
|
var import_themes59 = require("@radix-ui/themes");
|
|
9924
|
-
var
|
|
9925
|
-
var
|
|
9889
|
+
var import_react65 = require("react");
|
|
9890
|
+
var import_radash17 = require("radash");
|
|
9926
9891
|
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
9927
9892
|
var barCount = 4;
|
|
9928
9893
|
var BarsVisualizer = function(_ref) {
|
|
9929
9894
|
var visualizationAnalyser = _ref.visualizationAnalyser, backgroundColor = _ref.backgroundColor, height = _ref.height, barWidth = _ref.barWidth;
|
|
9930
|
-
var _$_ref = _sliced_to_array((0,
|
|
9931
|
-
var draw = (0,
|
|
9895
|
+
var _$_ref = _sliced_to_array((0, import_react65.useState)([]), 2), barHeights = _$_ref[0], setBarHeights = _$_ref[1];
|
|
9896
|
+
var draw = (0, import_react65.useCallback)(function(_ref2) {
|
|
9932
9897
|
var visualizationAnalyser_0 = _ref2.visualizationAnalyser;
|
|
9933
9898
|
if (!visualizationAnalyser_0) {
|
|
9934
9899
|
setBarHeights(Array(barCount).fill(0));
|
|
@@ -9936,7 +9901,7 @@ var BarsVisualizer = function(_ref) {
|
|
|
9936
9901
|
}
|
|
9937
9902
|
var frequencyData = new Uint8Array(visualizationAnalyser_0.frequencyBinCount / 15);
|
|
9938
9903
|
visualizationAnalyser_0.getByteFrequencyData(frequencyData);
|
|
9939
|
-
var clusteredFrequencyData = (0,
|
|
9904
|
+
var clusteredFrequencyData = (0, import_radash17.cluster)(frequencyData, frequencyData.length / barCount);
|
|
9940
9905
|
setBarHeights(clusteredFrequencyData.map(function(frequencyDataCluster) {
|
|
9941
9906
|
return import_lodash8.default.mean(frequencyDataCluster) / 255 * 100;
|
|
9942
9907
|
}));
|
|
@@ -9946,7 +9911,7 @@ var BarsVisualizer = function(_ref) {
|
|
|
9946
9911
|
});
|
|
9947
9912
|
});
|
|
9948
9913
|
}, []);
|
|
9949
|
-
(0,
|
|
9914
|
+
(0, import_react65.useEffect)(function() {
|
|
9950
9915
|
draw({
|
|
9951
9916
|
visualizationAnalyser: visualizationAnalyser
|
|
9952
9917
|
});
|
|
@@ -10029,9 +9994,9 @@ function _toPrimitive47(t, r) {
|
|
|
10029
9994
|
}
|
|
10030
9995
|
var Visualization = function(props) {
|
|
10031
9996
|
var audioThreadContext = useAudioThreadContext();
|
|
10032
|
-
var assistantNameContext = (0,
|
|
10033
|
-
var _ref = _sliced_to_array((0,
|
|
10034
|
-
var draw = (0,
|
|
9997
|
+
var assistantNameContext = (0, import_react66.useContext)(AssistantNameContext);
|
|
9998
|
+
var _ref = _sliced_to_array((0, import_react66.useState)(0), 2), scale = _ref[0], setScale = _ref[1];
|
|
9999
|
+
var draw = (0, import_react66.useCallback)(function(_ref) {
|
|
10035
10000
|
var visualizationAnalyser = _ref.visualizationAnalyser;
|
|
10036
10001
|
if (!visualizationAnalyser) {
|
|
10037
10002
|
setScale(1);
|
|
@@ -10046,7 +10011,7 @@ var Visualization = function(props) {
|
|
|
10046
10011
|
});
|
|
10047
10012
|
});
|
|
10048
10013
|
}, []);
|
|
10049
|
-
(0,
|
|
10014
|
+
(0, import_react66.useEffect)(function() {
|
|
10050
10015
|
draw({
|
|
10051
10016
|
visualizationAnalyser: audioThreadContext.recorderProps.visualizationAnalyser
|
|
10052
10017
|
});
|
|
@@ -10094,7 +10059,7 @@ var Visualization = function(props) {
|
|
|
10094
10059
|
}));
|
|
10095
10060
|
};
|
|
10096
10061
|
// src/components/threads/AudioThread/Status/index.tsx
|
|
10097
|
-
var
|
|
10062
|
+
var import_react_compiler_runtime52 = require("react-compiler-runtime");
|
|
10098
10063
|
// src/components/threads/AudioThread/Status/StatusMessages.tsx
|
|
10099
10064
|
var import_themes61 = require("@radix-ui/themes");
|
|
10100
10065
|
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
@@ -10174,7 +10139,7 @@ function _toPrimitive48(t, r) {
|
|
|
10174
10139
|
return ("string" === r ? String : Number)(t);
|
|
10175
10140
|
}
|
|
10176
10141
|
var Status = function(props) {
|
|
10177
|
-
var $ = (0,
|
|
10142
|
+
var $ = (0, import_react_compiler_runtime52.c)(12);
|
|
10178
10143
|
var audioThreadContext = useAudioThreadContext();
|
|
10179
10144
|
if (audioThreadContext.status === "recording") {
|
|
10180
10145
|
var _t;
|
|
@@ -10271,7 +10236,7 @@ var Status = function(props) {
|
|
|
10271
10236
|
return t1;
|
|
10272
10237
|
};
|
|
10273
10238
|
// src/components/threads/AudioThread/Form/index.tsx
|
|
10274
|
-
var
|
|
10239
|
+
var import_react_compiler_runtime54 = require("react-compiler-runtime");
|
|
10275
10240
|
var import_themes63 = require("@radix-ui/themes");
|
|
10276
10241
|
// src/components/threads/AudioThread/Form/MicIcon.tsx
|
|
10277
10242
|
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
@@ -10335,12 +10300,12 @@ var MicIcon = function(props) {
|
|
|
10335
10300
|
}));
|
|
10336
10301
|
};
|
|
10337
10302
|
// src/components/threads/AudioThread/Form/ActionButton/index.tsx
|
|
10338
|
-
var
|
|
10303
|
+
var import_react_compiler_runtime53 = require("react-compiler-runtime");
|
|
10339
10304
|
var import_themes62 = require("@radix-ui/themes");
|
|
10340
10305
|
var import_react_icons17 = require("@radix-ui/react-icons");
|
|
10341
10306
|
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
10342
10307
|
var ActionButton = function() {
|
|
10343
|
-
var $ = (0,
|
|
10308
|
+
var $ = (0, import_react_compiler_runtime53.c)(27);
|
|
10344
10309
|
var audioThreadContext = useAudioThreadContext();
|
|
10345
10310
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
10346
10311
|
if (audioThreadContext.status === "recording") {
|
|
@@ -10577,7 +10542,7 @@ function _toPrimitive50(t, r) {
|
|
|
10577
10542
|
return ("string" === r ? String : Number)(t);
|
|
10578
10543
|
}
|
|
10579
10544
|
var Form = function(props) {
|
|
10580
|
-
var $ = (0,
|
|
10545
|
+
var $ = (0, import_react_compiler_runtime54.c)(17);
|
|
10581
10546
|
var audioThreadContext = useAudioThreadContext();
|
|
10582
10547
|
var t0 = audioThreadContext.status === "recording" ? "var(--accent-11)" : "var(--gray-11)";
|
|
10583
10548
|
var t1;
|
|
@@ -10797,8 +10762,8 @@ AudioThreadDialog.Root = Root9;
|
|
|
10797
10762
|
AudioThreadDialog.Trigger = Trigger;
|
|
10798
10763
|
AudioThreadDialog.Content = Content7;
|
|
10799
10764
|
// src/components/markdown/MarkdownProvider/index.tsx
|
|
10800
|
-
var
|
|
10801
|
-
var
|
|
10765
|
+
var import_react_compiler_runtime55 = require("react-compiler-runtime");
|
|
10766
|
+
var import_react67 = require("react");
|
|
10802
10767
|
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
10803
10768
|
var _excluded5 = [
|
|
10804
10769
|
"children"
|
|
@@ -10822,7 +10787,7 @@ function _objectWithoutPropertiesLoose5(r, e) {
|
|
|
10822
10787
|
return t;
|
|
10823
10788
|
}
|
|
10824
10789
|
var MarkdownProvider = function(t0) {
|
|
10825
|
-
var $ = (0,
|
|
10790
|
+
var $ = (0, import_react_compiler_runtime55.c)(9);
|
|
10826
10791
|
var children;
|
|
10827
10792
|
var rest;
|
|
10828
10793
|
if ($[0] !== t0) {
|
|
@@ -10865,7 +10830,7 @@ var MarkdownProvider = function(t0) {
|
|
|
10865
10830
|
return t3;
|
|
10866
10831
|
};
|
|
10867
10832
|
// src/components/avatars/Avatar.tsx
|
|
10868
|
-
var
|
|
10833
|
+
var import_react_compiler_runtime58 = require("react-compiler-runtime");
|
|
10869
10834
|
// src/lib/enums/index.ts
|
|
10870
10835
|
var IconAvatarName = /* @__PURE__ */ function(IconAvatarName2) {
|
|
10871
10836
|
IconAvatarName2["BACKPACK"] = "BACKPACK";
|
|
@@ -10890,7 +10855,7 @@ var AvatarType = /* @__PURE__ */ function(AvatarType2) {
|
|
|
10890
10855
|
// src/components/avatars/Avatar.tsx
|
|
10891
10856
|
var import_themes66 = require("@radix-ui/themes");
|
|
10892
10857
|
// src/components/imageAvatars/ImageAvatar/index.tsx
|
|
10893
|
-
var
|
|
10858
|
+
var import_react_compiler_runtime56 = require("react-compiler-runtime");
|
|
10894
10859
|
var import_themes64 = require("@radix-ui/themes");
|
|
10895
10860
|
// src/components/imageAvatars/ImageAvatar/lib/optimizedSrc/path.ts
|
|
10896
10861
|
var width = function(_ref) {
|
|
@@ -10944,7 +10909,7 @@ var optimizedSrc = function(_ref) {
|
|
|
10944
10909
|
// src/components/imageAvatars/ImageAvatar/index.tsx
|
|
10945
10910
|
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
10946
10911
|
var ImageAvatar = function(t0) {
|
|
10947
|
-
var $ = (0,
|
|
10912
|
+
var $ = (0, import_react_compiler_runtime56.c)(9);
|
|
10948
10913
|
var imageAvatar = t0.imageAvatar, size = t0.size, className = t0.className, style = t0.style;
|
|
10949
10914
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
10950
10915
|
var t1;
|
|
@@ -10981,8 +10946,8 @@ var ImageAvatar = function(t0) {
|
|
|
10981
10946
|
return t2;
|
|
10982
10947
|
};
|
|
10983
10948
|
// src/components/iconAvatars/IconAvatar.tsx
|
|
10984
|
-
var
|
|
10985
|
-
var
|
|
10949
|
+
var import_react_compiler_runtime57 = require("react-compiler-runtime");
|
|
10950
|
+
var import_react68 = require("react");
|
|
10986
10951
|
var import_themes65 = require("@radix-ui/themes");
|
|
10987
10952
|
// src/lib/iconAvatars/iconAvatarComponents.ts
|
|
10988
10953
|
var import_react_icons18 = require("@radix-ui/react-icons");
|
|
@@ -10991,7 +10956,7 @@ var iconAvatarComponents = (_obj = {}, _define_property(_obj, IconAvatarName.BAC
|
|
|
10991
10956
|
// src/components/iconAvatars/IconAvatar.tsx
|
|
10992
10957
|
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
10993
10958
|
var IconAvatar = function(t0) {
|
|
10994
|
-
var $ = (0,
|
|
10959
|
+
var $ = (0, import_react_compiler_runtime57.c)(7);
|
|
10995
10960
|
var iconAvatar = t0.iconAvatar, size = t0.size, className = t0.className, style = t0.style;
|
|
10996
10961
|
var t1;
|
|
10997
10962
|
t1 = iconAvatarComponents[iconAvatar.name];
|
|
@@ -11025,7 +10990,7 @@ var IconAvatar = function(t0) {
|
|
|
11025
10990
|
// src/components/avatars/Avatar.tsx
|
|
11026
10991
|
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
11027
10992
|
var Avatar6 = function(t0) {
|
|
11028
|
-
var $ = (0,
|
|
10993
|
+
var $ = (0, import_react_compiler_runtime58.c)(14);
|
|
11029
10994
|
var avatar = t0.avatar, t1 = t0.size, className = t0.className, style = t0.style;
|
|
11030
10995
|
var size = t1 === void 0 ? "1" : t1;
|
|
11031
10996
|
if (avatar) {
|
|
@@ -11086,12 +11051,12 @@ var Avatar6 = function(t0) {
|
|
|
11086
11051
|
return t2;
|
|
11087
11052
|
};
|
|
11088
11053
|
// src/components/components/ComponentsProvider.tsx
|
|
11089
|
-
var
|
|
11090
|
-
var
|
|
11054
|
+
var import_react_compiler_runtime59 = require("react-compiler-runtime");
|
|
11055
|
+
var import_react70 = require("react");
|
|
11091
11056
|
// src/hooks/components/useComponents.ts
|
|
11092
|
-
var
|
|
11057
|
+
var import_react69 = require("react");
|
|
11093
11058
|
var useComponents = function() {
|
|
11094
|
-
return (0,
|
|
11059
|
+
return (0, import_react69.useContext)(ComponentsContext);
|
|
11095
11060
|
};
|
|
11096
11061
|
// src/components/components/ComponentsProvider.tsx
|
|
11097
11062
|
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
@@ -11117,7 +11082,7 @@ function _objectWithoutPropertiesLoose6(r, e) {
|
|
|
11117
11082
|
return t;
|
|
11118
11083
|
}
|
|
11119
11084
|
var ComponentsProvider = function(t0) {
|
|
11120
|
-
var $ = (0,
|
|
11085
|
+
var $ = (0, import_react_compiler_runtime59.c)(9);
|
|
11121
11086
|
var children;
|
|
11122
11087
|
var rest;
|
|
11123
11088
|
if ($[0] !== t0) {
|
|
@@ -11160,11 +11125,11 @@ var ComponentsProvider = function(t0) {
|
|
|
11160
11125
|
return t3;
|
|
11161
11126
|
};
|
|
11162
11127
|
// src/components/assistants/AssistantProvider/index.tsx
|
|
11163
|
-
var
|
|
11128
|
+
var import_react_compiler_runtime60 = require("react-compiler-runtime");
|
|
11164
11129
|
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
11165
11130
|
var AssistantProvider = function(t0) {
|
|
11166
11131
|
var _assistant$name;
|
|
11167
|
-
var $ = (0,
|
|
11132
|
+
var $ = (0, import_react_compiler_runtime60.c)(10);
|
|
11168
11133
|
var children = t0.children;
|
|
11169
11134
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
11170
11135
|
var t1;
|