@superinterface/react 2.19.3 → 2.20.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +484 -398
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -4
- package/dist/index.d.ts +6 -4
- package/dist/index.js +479 -393
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -414,7 +414,7 @@ var SuperinterfaceProvider = function(param) {
|
|
|
414
414
|
});
|
|
415
415
|
};
|
|
416
416
|
// src/components/threads/Thread/Messages/index.tsx
|
|
417
|
-
import { Flex as
|
|
417
|
+
import { Flex as Flex15 } from "@radix-ui/themes";
|
|
418
418
|
// src/components/threads/Thread/Messages/Content/index.tsx
|
|
419
419
|
import { useEffect } from "react";
|
|
420
420
|
// src/hooks/messages/useMessages/index.tsx
|
|
@@ -728,7 +728,7 @@ var useToasts = function() {
|
|
|
728
728
|
};
|
|
729
729
|
// src/components/threads/Thread/Messages/Content/MessageGroup/index.tsx
|
|
730
730
|
import { useContext as useContext8 } from "react";
|
|
731
|
-
import { Box as
|
|
731
|
+
import { Box as Box11 } from "@radix-ui/themes";
|
|
732
732
|
// src/components/messageGroups/MessageGroupBase/AssistantAvatar.tsx
|
|
733
733
|
import { useContext as useContext3 } from "react";
|
|
734
734
|
import { Flex as Flex4 } from "@radix-ui/themes";
|
|
@@ -787,11 +787,11 @@ var UserAvatar = function() {
|
|
|
787
787
|
});
|
|
788
788
|
};
|
|
789
789
|
// src/components/threads/Thread/Messages/Content/MessageGroup/Content/index.tsx
|
|
790
|
-
import { Flex as
|
|
790
|
+
import { Flex as Flex13 } from "@radix-ui/themes";
|
|
791
791
|
// src/components/threads/Thread/Message/index.tsx
|
|
792
792
|
import { useMemo as useMemo5, Fragment } from "react";
|
|
793
793
|
import { isEmpty } from "radash";
|
|
794
|
-
import { Box as
|
|
794
|
+
import { Box as Box10 } from "@radix-ui/themes";
|
|
795
795
|
// src/components/skeletons/StartingContentSkeleton/index.tsx
|
|
796
796
|
import { Skeleton as Skeleton2 } from "@radix-ui/themes";
|
|
797
797
|
import { jsx as jsx9 } from "react/jsx-runtime";
|
|
@@ -808,12 +808,12 @@ var StartingContentSkeleton = function() {
|
|
|
808
808
|
});
|
|
809
809
|
};
|
|
810
810
|
// src/components/runSteps/RunSteps/index.tsx
|
|
811
|
-
import { Flex as
|
|
811
|
+
import { Flex as Flex10 } from "@radix-ui/themes";
|
|
812
812
|
import { useContext as useContext6 } from "react";
|
|
813
813
|
// src/contexts/components/ComponentsContext/index.tsx
|
|
814
814
|
import { createContext as createContext7 } from "react";
|
|
815
815
|
// src/components/runSteps/RunStep/ToolCalls/index.tsx
|
|
816
|
-
import { Flex as
|
|
816
|
+
import { Flex as Flex9 } from "@radix-ui/themes";
|
|
817
817
|
// src/components/runSteps/RunStep/ToolCalls/ToolCall/Fn/index.tsx
|
|
818
818
|
import { useContext as useContext5 } from "react";
|
|
819
819
|
// src/contexts/functions/FunctionComponentsContext/index.tsx
|
|
@@ -983,46 +983,87 @@ var Fn = function(param) {
|
|
|
983
983
|
runStep: runStep
|
|
984
984
|
}));
|
|
985
985
|
};
|
|
986
|
-
// src/components/runSteps/RunStep/ToolCalls/ToolCall/CodeInterpreter.tsx
|
|
986
|
+
// src/components/runSteps/RunStep/ToolCalls/ToolCall/CodeInterpreter/index.tsx
|
|
987
|
+
import { Popover as Popover2, Flex as Flex8 } from "@radix-ui/themes";
|
|
988
|
+
// src/components/runSteps/RunStep/ToolCalls/ToolCall/CodeInterpreter/Content.tsx
|
|
989
|
+
import { Code as Code2, Box as Box3 } from "@radix-ui/themes";
|
|
987
990
|
import { jsx as jsx17, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
991
|
+
var Content2 = function(param) {
|
|
992
|
+
var codeInterpreter = param.codeInterpreter;
|
|
993
|
+
if (!codeInterpreter.input) {
|
|
994
|
+
return null;
|
|
995
|
+
}
|
|
996
|
+
return /* @__PURE__ */ jsxs4(Code2, {
|
|
997
|
+
variant: "ghost",
|
|
998
|
+
color: "gold",
|
|
999
|
+
style: {
|
|
1000
|
+
whiteSpace: "pre",
|
|
1001
|
+
wordBreak: "break-word"
|
|
1002
|
+
},
|
|
1003
|
+
children: [
|
|
1004
|
+
/* @__PURE__ */ jsx17(Box3, {
|
|
1005
|
+
children: codeInterpreter.input
|
|
1006
|
+
}),
|
|
1007
|
+
/* @__PURE__ */ jsx17(Box3, {
|
|
1008
|
+
children: JSON.stringify(codeInterpreter.outputs)
|
|
1009
|
+
})
|
|
1010
|
+
]
|
|
1011
|
+
});
|
|
1012
|
+
};
|
|
1013
|
+
// src/components/runSteps/RunStep/ToolCalls/ToolCall/CodeInterpreter/index.tsx
|
|
1014
|
+
import { jsx as jsx18, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
988
1015
|
var CodeInterpreter = function(param) {
|
|
989
|
-
var
|
|
990
|
-
return /* @__PURE__ */
|
|
1016
|
+
var codeInterpreter = param.codeInterpreter, runStep = param.runStep;
|
|
1017
|
+
return /* @__PURE__ */ jsxs5(Popover2.Root, {
|
|
991
1018
|
children: [
|
|
992
|
-
/* @__PURE__ */
|
|
993
|
-
|
|
1019
|
+
/* @__PURE__ */ jsx18(Popover2.Trigger, {
|
|
1020
|
+
children: /* @__PURE__ */ jsx18(Flex8, {
|
|
1021
|
+
children: /* @__PURE__ */ jsxs5(ToolCallBase, {
|
|
1022
|
+
children: [
|
|
1023
|
+
/* @__PURE__ */ jsx18(ToolCallIcon, {
|
|
1024
|
+
runStep: runStep
|
|
1025
|
+
}),
|
|
1026
|
+
/* @__PURE__ */ jsx18(ToolCallTitle, {
|
|
1027
|
+
children: "Using code interpreter"
|
|
1028
|
+
})
|
|
1029
|
+
]
|
|
1030
|
+
})
|
|
1031
|
+
})
|
|
994
1032
|
}),
|
|
995
|
-
/* @__PURE__ */
|
|
996
|
-
|
|
1033
|
+
/* @__PURE__ */ jsx18(Popover2.Content, {
|
|
1034
|
+
maxHeight: "200px",
|
|
1035
|
+
children: /* @__PURE__ */ jsx18(Content2, {
|
|
1036
|
+
codeInterpreter: codeInterpreter
|
|
1037
|
+
})
|
|
997
1038
|
})
|
|
998
1039
|
]
|
|
999
1040
|
});
|
|
1000
1041
|
};
|
|
1001
1042
|
// src/components/runSteps/RunStep/ToolCalls/ToolCall/FileSearch.tsx
|
|
1002
|
-
import { jsx as
|
|
1043
|
+
import { jsx as jsx19, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1003
1044
|
var FileSearch = function(param) {
|
|
1004
1045
|
var runStep = param.runStep, toolCall = param.toolCall;
|
|
1005
|
-
return /* @__PURE__ */
|
|
1046
|
+
return /* @__PURE__ */ jsxs6(ToolCallBase, {
|
|
1006
1047
|
children: [
|
|
1007
|
-
/* @__PURE__ */
|
|
1048
|
+
/* @__PURE__ */ jsx19(ToolCallIcon, {
|
|
1008
1049
|
runStep: runStep
|
|
1009
1050
|
}),
|
|
1010
|
-
/* @__PURE__ */
|
|
1051
|
+
/* @__PURE__ */ jsx19(ToolCallTitle, {
|
|
1011
1052
|
children: "Searching files"
|
|
1012
1053
|
})
|
|
1013
1054
|
]
|
|
1014
1055
|
});
|
|
1015
1056
|
};
|
|
1016
1057
|
// src/components/runSteps/RunStep/ToolCalls/ToolCall/Fallback.tsx
|
|
1017
|
-
import { jsx as
|
|
1058
|
+
import { jsx as jsx20, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1018
1059
|
var Fallback = function(param) {
|
|
1019
1060
|
var runStep = param.runStep, toolCall = param.toolCall;
|
|
1020
|
-
return /* @__PURE__ */
|
|
1061
|
+
return /* @__PURE__ */ jsxs7(ToolCallBase, {
|
|
1021
1062
|
children: [
|
|
1022
|
-
/* @__PURE__ */
|
|
1063
|
+
/* @__PURE__ */ jsx20(ToolCallIcon, {
|
|
1023
1064
|
runStep: runStep
|
|
1024
1065
|
}),
|
|
1025
|
-
/* @__PURE__ */
|
|
1066
|
+
/* @__PURE__ */ jsxs7(ToolCallTitle, {
|
|
1026
1067
|
children: [
|
|
1027
1068
|
"Using tool: ",
|
|
1028
1069
|
toolCall.type
|
|
@@ -1032,52 +1073,52 @@ var Fallback = function(param) {
|
|
|
1032
1073
|
});
|
|
1033
1074
|
};
|
|
1034
1075
|
// src/components/runSteps/RunStep/ToolCalls/ToolCall/index.tsx
|
|
1035
|
-
import { jsx as
|
|
1076
|
+
import { jsx as jsx21 } from "react/jsx-runtime";
|
|
1036
1077
|
var ToolCall = function(param) {
|
|
1037
1078
|
var toolCall = param.toolCall, runStep = param.runStep;
|
|
1038
1079
|
if (toolCall.type === "function") {
|
|
1039
|
-
return /* @__PURE__ */
|
|
1080
|
+
return /* @__PURE__ */ jsx21(Fn, {
|
|
1040
1081
|
fn: toolCall.function,
|
|
1041
1082
|
runStep: runStep
|
|
1042
1083
|
});
|
|
1043
1084
|
}
|
|
1044
1085
|
if (toolCall.type === "code_interpreter") {
|
|
1045
|
-
return /* @__PURE__ */
|
|
1046
|
-
|
|
1086
|
+
return /* @__PURE__ */ jsx21(CodeInterpreter, {
|
|
1087
|
+
codeInterpreter: toolCall.code_interpreter,
|
|
1047
1088
|
runStep: runStep
|
|
1048
1089
|
});
|
|
1049
1090
|
}
|
|
1050
1091
|
if (toolCall.type === "file_search") {
|
|
1051
|
-
return /* @__PURE__ */
|
|
1092
|
+
return /* @__PURE__ */ jsx21(FileSearch, {
|
|
1052
1093
|
toolCall: toolCall,
|
|
1053
1094
|
runStep: runStep
|
|
1054
1095
|
});
|
|
1055
1096
|
}
|
|
1056
|
-
return /* @__PURE__ */
|
|
1097
|
+
return /* @__PURE__ */ jsx21(Fallback, {
|
|
1057
1098
|
toolCall: toolCall,
|
|
1058
1099
|
runStep: runStep
|
|
1059
1100
|
});
|
|
1060
1101
|
};
|
|
1061
1102
|
// src/components/runSteps/RunStep/ToolCalls/Starting/index.tsx
|
|
1062
|
-
import { Popover as
|
|
1103
|
+
import { Popover as Popover3, Text as Text3 } from "@radix-ui/themes";
|
|
1063
1104
|
import { CircleIcon as CircleIcon2 } from "@radix-ui/react-icons";
|
|
1064
|
-
import { jsx as
|
|
1105
|
+
import { jsx as jsx22, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1065
1106
|
var Starting = function() {
|
|
1066
|
-
return /* @__PURE__ */
|
|
1107
|
+
return /* @__PURE__ */ jsxs8(Popover3.Root, {
|
|
1067
1108
|
children: [
|
|
1068
|
-
/* @__PURE__ */
|
|
1109
|
+
/* @__PURE__ */ jsxs8(ToolCallBase, {
|
|
1069
1110
|
children: [
|
|
1070
|
-
/* @__PURE__ */
|
|
1071
|
-
/* @__PURE__ */
|
|
1111
|
+
/* @__PURE__ */ jsx22(CircleIcon2, {}),
|
|
1112
|
+
/* @__PURE__ */ jsx22(ToolCallTitle, {
|
|
1072
1113
|
children: "Starting actions"
|
|
1073
1114
|
})
|
|
1074
1115
|
]
|
|
1075
1116
|
}),
|
|
1076
|
-
/* @__PURE__ */
|
|
1117
|
+
/* @__PURE__ */ jsx22(Popover3.Content, {
|
|
1077
1118
|
style: {
|
|
1078
1119
|
maxHeight: "500px"
|
|
1079
1120
|
},
|
|
1080
|
-
children: /* @__PURE__ */
|
|
1121
|
+
children: /* @__PURE__ */ jsx22(Text3, {
|
|
1081
1122
|
children: "Getting ready to connect to domain API"
|
|
1082
1123
|
})
|
|
1083
1124
|
})
|
|
@@ -1085,21 +1126,21 @@ var Starting = function() {
|
|
|
1085
1126
|
});
|
|
1086
1127
|
};
|
|
1087
1128
|
// src/components/runSteps/RunStep/ToolCalls/index.tsx
|
|
1088
|
-
import { jsx as
|
|
1129
|
+
import { jsx as jsx23, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1089
1130
|
var Root = function(param) {
|
|
1090
1131
|
var children = param.children;
|
|
1091
|
-
return /* @__PURE__ */
|
|
1132
|
+
return /* @__PURE__ */ jsx23(Flex9, {
|
|
1092
1133
|
direction: "column",
|
|
1093
1134
|
children: children
|
|
1094
1135
|
});
|
|
1095
1136
|
};
|
|
1096
1137
|
var ToolCalls = function(param) {
|
|
1097
1138
|
var stepDetails = param.stepDetails, runStep = param.runStep;
|
|
1098
|
-
return /* @__PURE__ */
|
|
1139
|
+
return /* @__PURE__ */ jsxs9(Root, {
|
|
1099
1140
|
children: [
|
|
1100
|
-
!stepDetails.tool_calls.length && /* @__PURE__ */
|
|
1141
|
+
!stepDetails.tool_calls.length && /* @__PURE__ */ jsx23(Starting, {}),
|
|
1101
1142
|
stepDetails.tool_calls.map(function(toolCall) {
|
|
1102
|
-
return /* @__PURE__ */
|
|
1143
|
+
return /* @__PURE__ */ jsx23(ToolCall, {
|
|
1103
1144
|
toolCall: toolCall,
|
|
1104
1145
|
runStep: runStep
|
|
1105
1146
|
}, toolCall.id);
|
|
@@ -1111,11 +1152,11 @@ ToolCalls.Root = Root;
|
|
|
1111
1152
|
ToolCalls.Starting = Starting;
|
|
1112
1153
|
ToolCalls.ToolCall = ToolCall;
|
|
1113
1154
|
// src/components/runSteps/RunStep/index.tsx
|
|
1114
|
-
import { jsx as
|
|
1155
|
+
import { jsx as jsx24 } from "react/jsx-runtime";
|
|
1115
1156
|
var RunStep = function(param) {
|
|
1116
1157
|
var runStep = param.runStep;
|
|
1117
1158
|
if (runStep.step_details.type === "tool_calls") {
|
|
1118
|
-
return /* @__PURE__ */
|
|
1159
|
+
return /* @__PURE__ */ jsx24(ToolCalls, {
|
|
1119
1160
|
stepDetails: runStep.step_details,
|
|
1120
1161
|
runStep: runStep
|
|
1121
1162
|
});
|
|
@@ -1130,15 +1171,15 @@ var ComponentsContext = createContext7({
|
|
|
1130
1171
|
}
|
|
1131
1172
|
});
|
|
1132
1173
|
// src/components/runSteps/RunSteps/index.tsx
|
|
1133
|
-
import { jsx as
|
|
1174
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
1134
1175
|
var RunSteps = function(param) {
|
|
1135
1176
|
var runSteps = param.runSteps;
|
|
1136
1177
|
var componentsContext = useContext6(ComponentsContext);
|
|
1137
1178
|
var Component = componentsContext.components.RunStep;
|
|
1138
|
-
return /* @__PURE__ */
|
|
1179
|
+
return /* @__PURE__ */ jsx25(Flex10, {
|
|
1139
1180
|
direction: "column-reverse",
|
|
1140
1181
|
children: runSteps.map(function(runStep) {
|
|
1141
|
-
return /* @__PURE__ */
|
|
1182
|
+
return /* @__PURE__ */ jsx25(Component, {
|
|
1142
1183
|
runStep: runStep
|
|
1143
1184
|
}, runStep.id);
|
|
1144
1185
|
})
|
|
@@ -1178,13 +1219,13 @@ import { createContext as createContext9 } from "react";
|
|
|
1178
1219
|
// src/contexts/markdown/MarkdownContext/lib/components/index.tsx
|
|
1179
1220
|
import { Heading } from "@radix-ui/themes";
|
|
1180
1221
|
// src/contexts/markdown/MarkdownContext/lib/components/Paragraph.tsx
|
|
1181
|
-
import { Box as
|
|
1182
|
-
import { jsx as
|
|
1222
|
+
import { Box as Box4, Text as Text4 } from "@radix-ui/themes";
|
|
1223
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1183
1224
|
var Paragraph = function(param) {
|
|
1184
1225
|
var children = param.children;
|
|
1185
|
-
return /* @__PURE__ */
|
|
1226
|
+
return /* @__PURE__ */ jsx26(Box4, {
|
|
1186
1227
|
pb: "3",
|
|
1187
|
-
children: /* @__PURE__ */
|
|
1228
|
+
children: /* @__PURE__ */ jsx26(Text4, {
|
|
1188
1229
|
size: "3",
|
|
1189
1230
|
style: {
|
|
1190
1231
|
whiteSpace: "pre-line",
|
|
@@ -1196,23 +1237,25 @@ var Paragraph = function(param) {
|
|
|
1196
1237
|
};
|
|
1197
1238
|
// src/contexts/markdown/MarkdownContext/lib/components/Link.tsx
|
|
1198
1239
|
import { Link as RadixLink } from "@radix-ui/themes";
|
|
1199
|
-
import { jsx as
|
|
1240
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1200
1241
|
var Link = function(param) {
|
|
1201
|
-
var children = param.children, href = param.href;
|
|
1202
|
-
return /* @__PURE__ */
|
|
1242
|
+
var children = param.children, href = param.href, download = param.download, _param_target = param.target, target = _param_target === void 0 ? "_blank" : _param_target;
|
|
1243
|
+
return /* @__PURE__ */ jsx27(RadixLink, {
|
|
1203
1244
|
href: href,
|
|
1245
|
+
target: target,
|
|
1246
|
+
download: download,
|
|
1204
1247
|
children: children
|
|
1205
1248
|
});
|
|
1206
1249
|
};
|
|
1207
1250
|
// src/contexts/markdown/MarkdownContext/lib/components/UnorderedList.tsx
|
|
1208
|
-
import { Box as
|
|
1209
|
-
import { jsx as
|
|
1251
|
+
import { Box as Box5 } from "@radix-ui/themes";
|
|
1252
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1210
1253
|
var UnorderedList = function(param) {
|
|
1211
1254
|
var children = param.children;
|
|
1212
|
-
return /* @__PURE__ */
|
|
1255
|
+
return /* @__PURE__ */ jsx28(Box5, {
|
|
1213
1256
|
pb: "3",
|
|
1214
1257
|
asChild: true,
|
|
1215
|
-
children: /* @__PURE__ */
|
|
1258
|
+
children: /* @__PURE__ */ jsx28("ul", {
|
|
1216
1259
|
style: {
|
|
1217
1260
|
listStylePosition: "inside"
|
|
1218
1261
|
},
|
|
@@ -1221,14 +1264,14 @@ var UnorderedList = function(param) {
|
|
|
1221
1264
|
});
|
|
1222
1265
|
};
|
|
1223
1266
|
// src/contexts/markdown/MarkdownContext/lib/components/OrderedList.tsx
|
|
1224
|
-
import { Box as
|
|
1225
|
-
import { jsx as
|
|
1267
|
+
import { Box as Box6 } from "@radix-ui/themes";
|
|
1268
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1226
1269
|
var OrderedList = function(param) {
|
|
1227
1270
|
var children = param.children;
|
|
1228
|
-
return /* @__PURE__ */
|
|
1271
|
+
return /* @__PURE__ */ jsx29(Box6, {
|
|
1229
1272
|
pb: "3",
|
|
1230
1273
|
asChild: true,
|
|
1231
|
-
children: /* @__PURE__ */
|
|
1274
|
+
children: /* @__PURE__ */ jsx29("ol", {
|
|
1232
1275
|
style: {
|
|
1233
1276
|
listStylePosition: "inside"
|
|
1234
1277
|
},
|
|
@@ -1237,32 +1280,32 @@ var OrderedList = function(param) {
|
|
|
1237
1280
|
});
|
|
1238
1281
|
};
|
|
1239
1282
|
// src/contexts/markdown/MarkdownContext/lib/components/ListItem.tsx
|
|
1240
|
-
import { Box as
|
|
1241
|
-
import { jsx as
|
|
1283
|
+
import { Box as Box7 } from "@radix-ui/themes";
|
|
1284
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1242
1285
|
var ListItem = function(param) {
|
|
1243
1286
|
var children = param.children;
|
|
1244
|
-
return /* @__PURE__ */
|
|
1287
|
+
return /* @__PURE__ */ jsx30(Box7, {
|
|
1245
1288
|
pb: "1",
|
|
1246
|
-
children: /* @__PURE__ */
|
|
1289
|
+
children: /* @__PURE__ */ jsx30("li", {
|
|
1247
1290
|
children: children
|
|
1248
1291
|
})
|
|
1249
1292
|
});
|
|
1250
1293
|
};
|
|
1251
1294
|
// src/contexts/markdown/MarkdownContext/lib/components/Strong.tsx
|
|
1252
1295
|
import { Strong as RadixStrong } from "@radix-ui/themes";
|
|
1253
|
-
import { jsx as
|
|
1296
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1254
1297
|
var Strong = function(param) {
|
|
1255
1298
|
var children = param.children;
|
|
1256
|
-
return /* @__PURE__ */
|
|
1299
|
+
return /* @__PURE__ */ jsx31(RadixStrong, {
|
|
1257
1300
|
children: children
|
|
1258
1301
|
});
|
|
1259
1302
|
};
|
|
1260
1303
|
// src/contexts/markdown/MarkdownContext/lib/components/Pre.tsx
|
|
1261
|
-
import { Box as
|
|
1262
|
-
import { jsx as
|
|
1304
|
+
import { Box as Box8 } from "@radix-ui/themes";
|
|
1305
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1263
1306
|
var Pre = function(param) {
|
|
1264
1307
|
var children = param.children;
|
|
1265
|
-
return /* @__PURE__ */
|
|
1308
|
+
return /* @__PURE__ */ jsx32(Box8, {
|
|
1266
1309
|
style: {
|
|
1267
1310
|
whiteSpace: "pre-wrap",
|
|
1268
1311
|
wordBreak: "break-word"
|
|
@@ -1272,20 +1315,20 @@ var Pre = function(param) {
|
|
|
1272
1315
|
};
|
|
1273
1316
|
// src/contexts/markdown/MarkdownContext/lib/components/Code.tsx
|
|
1274
1317
|
import { Code as RadixCode } from "@radix-ui/themes";
|
|
1275
|
-
import { jsx as
|
|
1276
|
-
var
|
|
1318
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1319
|
+
var Code3 = function(param) {
|
|
1277
1320
|
var children = param.children;
|
|
1278
|
-
return /* @__PURE__ */
|
|
1321
|
+
return /* @__PURE__ */ jsx33(RadixCode, {
|
|
1279
1322
|
children: children
|
|
1280
1323
|
});
|
|
1281
1324
|
};
|
|
1282
1325
|
// src/contexts/markdown/MarkdownContext/lib/components/Img.tsx
|
|
1283
|
-
import { Box as
|
|
1284
|
-
import { jsx as
|
|
1326
|
+
import { Box as Box9 } from "@radix-ui/themes";
|
|
1327
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
1285
1328
|
var Img = function(props) {
|
|
1286
|
-
return /* @__PURE__ */
|
|
1329
|
+
return /* @__PURE__ */ jsx34(Box9, {
|
|
1287
1330
|
pb: "3",
|
|
1288
|
-
children: /* @__PURE__ */
|
|
1331
|
+
children: /* @__PURE__ */ jsx34("img", _object_spread_props(_object_spread({}, props), {
|
|
1289
1332
|
style: {
|
|
1290
1333
|
maxWidth: "100%",
|
|
1291
1334
|
height: "auto"
|
|
@@ -1294,27 +1337,27 @@ var Img = function(props) {
|
|
|
1294
1337
|
});
|
|
1295
1338
|
};
|
|
1296
1339
|
// src/contexts/markdown/MarkdownContext/lib/components/Annotation/index.tsx
|
|
1297
|
-
import { QuoteIcon
|
|
1340
|
+
import { QuoteIcon } from "@radix-ui/react-icons";
|
|
1298
1341
|
// src/contexts/markdown/MarkdownContext/lib/components/Annotation/AnnotationBase.tsx
|
|
1299
|
-
import { IconButton, Popover as
|
|
1300
|
-
import { jsx as
|
|
1342
|
+
import { IconButton, Popover as Popover4, Flex as Flex11, Text as Text5 } from "@radix-ui/themes";
|
|
1343
|
+
import { jsx as jsx35, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1301
1344
|
var AnnotationBase = function(param) {
|
|
1302
1345
|
var icon = param.icon, content = param.content;
|
|
1303
|
-
return /* @__PURE__ */
|
|
1346
|
+
return /* @__PURE__ */ jsxs10(Popover4.Root, {
|
|
1304
1347
|
children: [
|
|
1305
|
-
/* @__PURE__ */
|
|
1306
|
-
children: /* @__PURE__ */
|
|
1348
|
+
/* @__PURE__ */ jsx35(Popover4.Trigger, {
|
|
1349
|
+
children: /* @__PURE__ */ jsx35(IconButton, {
|
|
1307
1350
|
variant: "soft",
|
|
1308
1351
|
color: "gray",
|
|
1309
1352
|
size: "1",
|
|
1310
1353
|
children: icon
|
|
1311
1354
|
})
|
|
1312
1355
|
}),
|
|
1313
|
-
/* @__PURE__ */
|
|
1356
|
+
/* @__PURE__ */ jsx35(Popover4.Content, {
|
|
1314
1357
|
size: "1",
|
|
1315
|
-
children: /* @__PURE__ */
|
|
1358
|
+
children: /* @__PURE__ */ jsx35(Flex11, {
|
|
1316
1359
|
direction: "column",
|
|
1317
|
-
children: /* @__PURE__ */
|
|
1360
|
+
children: /* @__PURE__ */ jsx35(Text5, {
|
|
1318
1361
|
size: "1",
|
|
1319
1362
|
color: "gray",
|
|
1320
1363
|
children: content
|
|
@@ -1324,25 +1367,38 @@ var AnnotationBase = function(param) {
|
|
|
1324
1367
|
]
|
|
1325
1368
|
});
|
|
1326
1369
|
};
|
|
1370
|
+
// src/contexts/markdown/MarkdownContext/lib/components/Annotation/FilePathAnnotation.tsx
|
|
1371
|
+
import { jsx as jsx36 } from "react/jsx-runtime";
|
|
1372
|
+
var FilePathAnnotation = function(param) {
|
|
1373
|
+
var annotation = param.annotation, children = param.children;
|
|
1374
|
+
var superinterfaceContext = useSuperinterfaceContext();
|
|
1375
|
+
var nextSearchParams = new URLSearchParams(superinterfaceContext.variables);
|
|
1376
|
+
return /* @__PURE__ */ jsx36(Link, {
|
|
1377
|
+
href: "".concat(superinterfaceContext.baseUrl, "/files/").concat(annotation.file_path.file_id, "/contents?").concat(nextSearchParams),
|
|
1378
|
+
target: "_self",
|
|
1379
|
+
download: true,
|
|
1380
|
+
children: children
|
|
1381
|
+
});
|
|
1382
|
+
};
|
|
1327
1383
|
// src/contexts/markdown/MarkdownContext/lib/components/Annotation/index.tsx
|
|
1328
|
-
import { jsx as
|
|
1384
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
1329
1385
|
var Annotation = function(param) {
|
|
1330
|
-
var annotation = param.annotation;
|
|
1386
|
+
var annotation = param.annotation, children = param.children;
|
|
1331
1387
|
if (annotation.type === "file_citation") {
|
|
1332
|
-
return /* @__PURE__ */
|
|
1333
|
-
icon: /* @__PURE__ */
|
|
1388
|
+
return /* @__PURE__ */ jsx37(AnnotationBase, {
|
|
1389
|
+
icon: /* @__PURE__ */ jsx37(QuoteIcon, {}),
|
|
1334
1390
|
content: "File cited."
|
|
1335
1391
|
});
|
|
1336
1392
|
} else if (annotation.type === "file_path") {
|
|
1337
|
-
return /* @__PURE__ */
|
|
1338
|
-
|
|
1339
|
-
|
|
1393
|
+
return /* @__PURE__ */ jsx37(FilePathAnnotation, {
|
|
1394
|
+
annotation: annotation,
|
|
1395
|
+
children: children
|
|
1340
1396
|
});
|
|
1341
1397
|
}
|
|
1342
1398
|
return null;
|
|
1343
1399
|
};
|
|
1344
1400
|
// src/contexts/markdown/MarkdownContext/lib/components/index.tsx
|
|
1345
|
-
import { jsx as
|
|
1401
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
1346
1402
|
var components = {
|
|
1347
1403
|
p: Paragraph,
|
|
1348
1404
|
a: Link,
|
|
@@ -1351,45 +1407,45 @@ var components = {
|
|
|
1351
1407
|
ol: OrderedList,
|
|
1352
1408
|
li: ListItem,
|
|
1353
1409
|
pre: Pre,
|
|
1354
|
-
code:
|
|
1410
|
+
code: Code3,
|
|
1355
1411
|
img: Img,
|
|
1356
1412
|
annotation: Annotation,
|
|
1357
1413
|
h1: function(props) {
|
|
1358
|
-
return /* @__PURE__ */
|
|
1414
|
+
return /* @__PURE__ */ jsx38(Heading, {
|
|
1359
1415
|
as: "h1",
|
|
1360
1416
|
children: props.children
|
|
1361
1417
|
});
|
|
1362
1418
|
},
|
|
1363
1419
|
h2: function(props) {
|
|
1364
|
-
return /* @__PURE__ */
|
|
1420
|
+
return /* @__PURE__ */ jsx38(Heading, {
|
|
1365
1421
|
as: "h2",
|
|
1366
1422
|
size: "5",
|
|
1367
1423
|
children: props.children
|
|
1368
1424
|
});
|
|
1369
1425
|
},
|
|
1370
1426
|
h3: function(props) {
|
|
1371
|
-
return /* @__PURE__ */
|
|
1427
|
+
return /* @__PURE__ */ jsx38(Heading, {
|
|
1372
1428
|
as: "h3",
|
|
1373
1429
|
size: "4",
|
|
1374
1430
|
children: props.children
|
|
1375
1431
|
});
|
|
1376
1432
|
},
|
|
1377
1433
|
h4: function(props) {
|
|
1378
|
-
return /* @__PURE__ */
|
|
1434
|
+
return /* @__PURE__ */ jsx38(Heading, {
|
|
1379
1435
|
as: "h4",
|
|
1380
1436
|
size: "3",
|
|
1381
1437
|
children: props.children
|
|
1382
1438
|
});
|
|
1383
1439
|
},
|
|
1384
1440
|
h5: function(props) {
|
|
1385
|
-
return /* @__PURE__ */
|
|
1441
|
+
return /* @__PURE__ */ jsx38(Heading, {
|
|
1386
1442
|
as: "h5",
|
|
1387
1443
|
size: "3",
|
|
1388
1444
|
children: props.children
|
|
1389
1445
|
});
|
|
1390
1446
|
},
|
|
1391
1447
|
h6: function(props) {
|
|
1392
|
-
return /* @__PURE__ */
|
|
1448
|
+
return /* @__PURE__ */ jsx38(Heading, {
|
|
1393
1449
|
as: "h6",
|
|
1394
1450
|
size: "3",
|
|
1395
1451
|
children: props.children
|
|
@@ -1399,13 +1455,22 @@ var components = {
|
|
|
1399
1455
|
// src/lib/remark/remarkAnnotation.ts
|
|
1400
1456
|
import { isNumber } from "radash";
|
|
1401
1457
|
import flatMap from "unist-util-flatmap";
|
|
1458
|
+
var sortedAnnotations = function(param) {
|
|
1459
|
+
var content = param.content;
|
|
1460
|
+
return content.text.annotations.sort(function(a, b) {
|
|
1461
|
+
return a.start_index - b.start_index;
|
|
1462
|
+
});
|
|
1463
|
+
};
|
|
1402
1464
|
var remarkAnnotation = function(param) {
|
|
1403
1465
|
var content = param.content;
|
|
1404
1466
|
return function() {
|
|
1405
1467
|
return function(tree) {
|
|
1406
1468
|
flatMap(tree, function(node) {
|
|
1407
1469
|
var _content_text_annotations, _content_text;
|
|
1408
|
-
if (
|
|
1470
|
+
if (![
|
|
1471
|
+
"text",
|
|
1472
|
+
"link"
|
|
1473
|
+
].includes(node.type)) {
|
|
1409
1474
|
return [
|
|
1410
1475
|
node
|
|
1411
1476
|
];
|
|
@@ -1433,16 +1498,35 @@ var remarkAnnotation = function(param) {
|
|
|
1433
1498
|
];
|
|
1434
1499
|
}
|
|
1435
1500
|
var newNodes = [];
|
|
1436
|
-
var sortedAnnotations = content.text.annotations.sort(function(a, b) {
|
|
1437
|
-
return a.start_index - b.start_index;
|
|
1438
|
-
});
|
|
1439
1501
|
var lastProcessedIndex = nodeStart;
|
|
1440
|
-
sortedAnnotations
|
|
1502
|
+
sortedAnnotations({
|
|
1503
|
+
content: content
|
|
1504
|
+
}).forEach(function(annotation) {
|
|
1441
1505
|
var annotationStart = annotation.start_index;
|
|
1442
1506
|
var annotationEnd = annotation.end_index;
|
|
1443
1507
|
if (nodeEnd < annotationStart || nodeStart > annotationEnd) {
|
|
1444
1508
|
return;
|
|
1445
1509
|
}
|
|
1510
|
+
if (node.type === "link") {
|
|
1511
|
+
if (annotation.type === "file_path") {
|
|
1512
|
+
console.log({
|
|
1513
|
+
annotation: annotation,
|
|
1514
|
+
node: node
|
|
1515
|
+
});
|
|
1516
|
+
newNodes.push(_object_spread_props(_object_spread({}, node), {
|
|
1517
|
+
type: "annotation",
|
|
1518
|
+
// @ts-ignore-next-line
|
|
1519
|
+
url: annotation.file_path.file_id,
|
|
1520
|
+
data: {
|
|
1521
|
+
hName: "annotation",
|
|
1522
|
+
hProperties: {
|
|
1523
|
+
annotation: annotation
|
|
1524
|
+
}
|
|
1525
|
+
}
|
|
1526
|
+
}));
|
|
1527
|
+
}
|
|
1528
|
+
return;
|
|
1529
|
+
}
|
|
1446
1530
|
var startIndex = Math.max(nodeStart, annotationStart);
|
|
1447
1531
|
var endIndex = Math.min(nodeEnd, annotationEnd);
|
|
1448
1532
|
if (lastProcessedIndex < startIndex) {
|
|
@@ -1487,23 +1571,25 @@ var remarkAnnotation = function(param) {
|
|
|
1487
1571
|
});
|
|
1488
1572
|
lastProcessedIndex = endIndex;
|
|
1489
1573
|
});
|
|
1490
|
-
if (
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1574
|
+
if (node.type === "text") {
|
|
1575
|
+
if (lastProcessedIndex < nodeEnd) {
|
|
1576
|
+
newNodes.push({
|
|
1577
|
+
type: "text",
|
|
1578
|
+
value: node.value.slice(lastProcessedIndex - nodeStart, nodeEnd - nodeStart),
|
|
1579
|
+
position: {
|
|
1580
|
+
start: {
|
|
1581
|
+
line: node.position.start.line,
|
|
1582
|
+
column: node.position.start.column,
|
|
1583
|
+
offset: lastProcessedIndex
|
|
1584
|
+
},
|
|
1585
|
+
end: {
|
|
1586
|
+
line: node.position.end.line,
|
|
1587
|
+
column: node.position.end.column,
|
|
1588
|
+
offset: nodeEnd
|
|
1589
|
+
}
|
|
1504
1590
|
}
|
|
1505
|
-
}
|
|
1506
|
-
}
|
|
1591
|
+
});
|
|
1592
|
+
}
|
|
1507
1593
|
}
|
|
1508
1594
|
return newNodes;
|
|
1509
1595
|
});
|
|
@@ -1529,13 +1615,13 @@ var useMarkdownContext = function() {
|
|
|
1529
1615
|
return useContext7(MarkdownContext);
|
|
1530
1616
|
};
|
|
1531
1617
|
// src/components/threads/Thread/Message/TextContent.tsx
|
|
1532
|
-
import { jsx as
|
|
1618
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
1533
1619
|
var TextContent = function(param) {
|
|
1534
1620
|
var content = param.content;
|
|
1535
1621
|
var _useMarkdownContext = useMarkdownContext(), getRemarkPlugins2 = _useMarkdownContext.getRemarkPlugins, rest = _object_without_properties(_useMarkdownContext, [
|
|
1536
1622
|
"getRemarkPlugins"
|
|
1537
1623
|
]);
|
|
1538
|
-
return /* @__PURE__ */
|
|
1624
|
+
return /* @__PURE__ */ jsx39(Markdown, _object_spread_props(_object_spread({}, rest), {
|
|
1539
1625
|
remarkPlugins: getRemarkPlugins2({
|
|
1540
1626
|
content: content
|
|
1541
1627
|
}),
|
|
@@ -1543,21 +1629,21 @@ var TextContent = function(param) {
|
|
|
1543
1629
|
}));
|
|
1544
1630
|
};
|
|
1545
1631
|
// src/components/threads/Thread/Message/Attachments/index.tsx
|
|
1546
|
-
import { Flex as
|
|
1547
|
-
import { FileIcon
|
|
1548
|
-
import { jsx as
|
|
1632
|
+
import { Flex as Flex12, Badge } from "@radix-ui/themes";
|
|
1633
|
+
import { FileIcon } from "@radix-ui/react-icons";
|
|
1634
|
+
import { jsx as jsx40, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
1549
1635
|
var Attachments = function(param) {
|
|
1550
1636
|
var message = param.message;
|
|
1551
1637
|
var _message_attachments;
|
|
1552
1638
|
if (!((_message_attachments = message.attachments) === null || _message_attachments === void 0 ? void 0 : _message_attachments.length)) return null;
|
|
1553
|
-
return /* @__PURE__ */
|
|
1639
|
+
return /* @__PURE__ */ jsx40(Flex12, {
|
|
1554
1640
|
align: "start",
|
|
1555
1641
|
pb: "1",
|
|
1556
|
-
children: /* @__PURE__ */
|
|
1642
|
+
children: /* @__PURE__ */ jsxs11(Badge, {
|
|
1557
1643
|
color: "gray",
|
|
1558
1644
|
variant: "surface",
|
|
1559
1645
|
children: [
|
|
1560
|
-
/* @__PURE__ */
|
|
1646
|
+
/* @__PURE__ */ jsx40(FileIcon, {}),
|
|
1561
1647
|
message.attachments.length,
|
|
1562
1648
|
" file",
|
|
1563
1649
|
message.attachments.length > 1 ? "s" : ""
|
|
@@ -1566,7 +1652,7 @@ var Attachments = function(param) {
|
|
|
1566
1652
|
});
|
|
1567
1653
|
};
|
|
1568
1654
|
// src/components/threads/Thread/Message/index.tsx
|
|
1569
|
-
import { jsx as
|
|
1655
|
+
import { jsx as jsx41, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1570
1656
|
var Message = function(param) {
|
|
1571
1657
|
var message = param.message;
|
|
1572
1658
|
var _useMemo5 = _sliced_to_array(useMemo5(function() {
|
|
@@ -1611,68 +1697,68 @@ var Message = function(param) {
|
|
|
1611
1697
|
}, [
|
|
1612
1698
|
message
|
|
1613
1699
|
]);
|
|
1614
|
-
return /* @__PURE__ */
|
|
1700
|
+
return /* @__PURE__ */ jsx41(Provider, {
|
|
1615
1701
|
value: {
|
|
1616
1702
|
message: message
|
|
1617
1703
|
},
|
|
1618
|
-
children: /* @__PURE__ */
|
|
1704
|
+
children: /* @__PURE__ */ jsxs12(Box10, {
|
|
1619
1705
|
children: [
|
|
1620
|
-
/* @__PURE__ */
|
|
1706
|
+
/* @__PURE__ */ jsx41(RunSteps, {
|
|
1621
1707
|
runSteps: olderRunSteps
|
|
1622
1708
|
}),
|
|
1623
|
-
/* @__PURE__ */
|
|
1709
|
+
/* @__PURE__ */ jsxs12(Box10, {
|
|
1624
1710
|
children: [
|
|
1625
|
-
/* @__PURE__ */
|
|
1711
|
+
/* @__PURE__ */ jsx41(Attachments, {
|
|
1626
1712
|
message: message
|
|
1627
1713
|
}),
|
|
1628
1714
|
message.content.map(function(content, index) {
|
|
1629
|
-
return /* @__PURE__ */
|
|
1630
|
-
children: content.type === "text" && /* @__PURE__ */
|
|
1715
|
+
return /* @__PURE__ */ jsx41(Fragment, {
|
|
1716
|
+
children: content.type === "text" && /* @__PURE__ */ jsx41(TextContent, {
|
|
1631
1717
|
content: content
|
|
1632
1718
|
})
|
|
1633
1719
|
}, index);
|
|
1634
1720
|
}),
|
|
1635
|
-
isInProgress && isEmpty(laterRunSteps) && /* @__PURE__ */
|
|
1721
|
+
isInProgress && isEmpty(laterRunSteps) && /* @__PURE__ */ jsx41(StartingContentSkeleton, {})
|
|
1636
1722
|
]
|
|
1637
1723
|
}),
|
|
1638
|
-
/* @__PURE__ */
|
|
1724
|
+
/* @__PURE__ */ jsx41(RunSteps, {
|
|
1639
1725
|
runSteps: laterRunSteps
|
|
1640
1726
|
}),
|
|
1641
|
-
isInProgress && !isEmpty(laterRunSteps) && /* @__PURE__ */
|
|
1642
|
-
children: /* @__PURE__ */
|
|
1727
|
+
isInProgress && !isEmpty(laterRunSteps) && /* @__PURE__ */ jsx41(Box10, {
|
|
1728
|
+
children: /* @__PURE__ */ jsx41(StartingContentSkeleton, {})
|
|
1643
1729
|
})
|
|
1644
1730
|
]
|
|
1645
1731
|
})
|
|
1646
1732
|
});
|
|
1647
1733
|
};
|
|
1648
1734
|
// src/components/threads/Thread/Messages/Content/MessageGroup/Content/index.tsx
|
|
1649
|
-
import { jsx as
|
|
1650
|
-
var
|
|
1735
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
1736
|
+
var Content3 = function(param) {
|
|
1651
1737
|
var messageGroup = param.messageGroup;
|
|
1652
|
-
return /* @__PURE__ */
|
|
1738
|
+
return /* @__PURE__ */ jsx42(Flex13, {
|
|
1653
1739
|
direction: "column-reverse",
|
|
1654
1740
|
children: messageGroup.messages.map(function(message) {
|
|
1655
|
-
return /* @__PURE__ */
|
|
1741
|
+
return /* @__PURE__ */ jsx42(Message, {
|
|
1656
1742
|
message: message
|
|
1657
1743
|
}, message.id);
|
|
1658
1744
|
})
|
|
1659
1745
|
});
|
|
1660
1746
|
};
|
|
1661
1747
|
// src/components/threads/Thread/Messages/Content/MessageGroup/index.tsx
|
|
1662
|
-
import { jsx as
|
|
1748
|
+
import { jsx as jsx43, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1663
1749
|
var MessageGroup = function(param) {
|
|
1664
1750
|
var messageGroup = param.messageGroup;
|
|
1665
1751
|
var assistantNameContext = useContext8(AssistantNameContext);
|
|
1666
|
-
return /* @__PURE__ */
|
|
1752
|
+
return /* @__PURE__ */ jsxs13(MessageGroupBase, {
|
|
1667
1753
|
children: [
|
|
1668
|
-
messageGroup.role === "user" ? /* @__PURE__ */
|
|
1669
|
-
/* @__PURE__ */
|
|
1754
|
+
messageGroup.role === "user" ? /* @__PURE__ */ jsx43(UserAvatar, {}) : /* @__PURE__ */ jsx43(AssistantAvatar, {}),
|
|
1755
|
+
/* @__PURE__ */ jsxs13(Box11, {
|
|
1670
1756
|
flexGrow: "1",
|
|
1671
1757
|
children: [
|
|
1672
|
-
/* @__PURE__ */
|
|
1758
|
+
/* @__PURE__ */ jsx43(Name, {
|
|
1673
1759
|
children: messageGroup.role === "user" ? "You" : assistantNameContext
|
|
1674
1760
|
}),
|
|
1675
|
-
/* @__PURE__ */
|
|
1761
|
+
/* @__PURE__ */ jsx43(Content3, {
|
|
1676
1762
|
messageGroup: messageGroup
|
|
1677
1763
|
})
|
|
1678
1764
|
]
|
|
@@ -1681,8 +1767,8 @@ var MessageGroup = function(param) {
|
|
|
1681
1767
|
});
|
|
1682
1768
|
};
|
|
1683
1769
|
// src/components/threads/Thread/Messages/Content/index.tsx
|
|
1684
|
-
import { Fragment as Fragment2, jsx as
|
|
1685
|
-
var
|
|
1770
|
+
import { Fragment as Fragment2, jsx as jsx44 } from "react/jsx-runtime";
|
|
1771
|
+
var Content4 = function() {
|
|
1686
1772
|
var _useMessages = useMessages(), messages2 = _useMessages.messages, isLoading = _useMessages.isLoading, isLoadingError = _useMessages.isLoadingError;
|
|
1687
1773
|
var addToast = useToasts().addToast;
|
|
1688
1774
|
var _useMessageGroups = useMessageGroups({
|
|
@@ -1700,11 +1786,11 @@ var Content3 = function() {
|
|
|
1700
1786
|
addToast
|
|
1701
1787
|
]);
|
|
1702
1788
|
if (isLoading || isLoadingError) {
|
|
1703
|
-
return /* @__PURE__ */
|
|
1789
|
+
return /* @__PURE__ */ jsx44(MessagesSkeleton, {});
|
|
1704
1790
|
}
|
|
1705
|
-
return /* @__PURE__ */
|
|
1791
|
+
return /* @__PURE__ */ jsx44(Fragment2, {
|
|
1706
1792
|
children: messageGroups2.map(function(messageGroup) {
|
|
1707
|
-
return /* @__PURE__ */
|
|
1793
|
+
return /* @__PURE__ */ jsx44(MessageGroup, {
|
|
1708
1794
|
messageGroup: messageGroup
|
|
1709
1795
|
}, messageGroup.id);
|
|
1710
1796
|
})
|
|
@@ -1714,21 +1800,21 @@ var Content3 = function() {
|
|
|
1714
1800
|
import { useMemo as useMemo7 } from "react";
|
|
1715
1801
|
// src/components/skeletons/StartingSkeleton/index.tsx
|
|
1716
1802
|
import { useContext as useContext9 } from "react";
|
|
1717
|
-
import { Box as
|
|
1718
|
-
import { jsx as
|
|
1803
|
+
import { Box as Box12 } from "@radix-ui/themes";
|
|
1804
|
+
import { jsx as jsx45, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1719
1805
|
var StartingSkeleton = function(param) {
|
|
1720
1806
|
var children = param.children;
|
|
1721
1807
|
var assistantNameContext = useContext9(AssistantNameContext);
|
|
1722
|
-
return /* @__PURE__ */
|
|
1808
|
+
return /* @__PURE__ */ jsxs14(MessageGroupBase, {
|
|
1723
1809
|
children: [
|
|
1724
|
-
/* @__PURE__ */
|
|
1725
|
-
/* @__PURE__ */
|
|
1810
|
+
/* @__PURE__ */ jsx45(AssistantAvatar, {}),
|
|
1811
|
+
/* @__PURE__ */ jsxs14(Box12, {
|
|
1726
1812
|
children: [
|
|
1727
|
-
/* @__PURE__ */
|
|
1813
|
+
/* @__PURE__ */ jsx45(Name, {
|
|
1728
1814
|
children: assistantNameContext
|
|
1729
1815
|
}),
|
|
1730
1816
|
children,
|
|
1731
|
-
/* @__PURE__ */
|
|
1817
|
+
/* @__PURE__ */ jsx45(StartingContentSkeleton, {})
|
|
1732
1818
|
]
|
|
1733
1819
|
})
|
|
1734
1820
|
]
|
|
@@ -1753,7 +1839,7 @@ var isOptimistic = function(param) {
|
|
|
1753
1839
|
return _4.startsWith(id, "-");
|
|
1754
1840
|
};
|
|
1755
1841
|
// src/components/threads/Thread/Messages/Progress/index.tsx
|
|
1756
|
-
import { jsx as
|
|
1842
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
1757
1843
|
var Progress = function() {
|
|
1758
1844
|
var latestMessage = useLatestMessage().latestMessage;
|
|
1759
1845
|
var isMutatingMessage = useIsMutatingMessage();
|
|
@@ -1771,10 +1857,10 @@ var Progress = function() {
|
|
|
1771
1857
|
isMutatingMessage
|
|
1772
1858
|
]);
|
|
1773
1859
|
if (!isVisible) return null;
|
|
1774
|
-
return /* @__PURE__ */
|
|
1860
|
+
return /* @__PURE__ */ jsx46(StartingSkeleton, {});
|
|
1775
1861
|
};
|
|
1776
1862
|
// src/components/threads/Thread/Messages/Root/index.tsx
|
|
1777
|
-
import { Flex as
|
|
1863
|
+
import { Flex as Flex14 } from "@radix-ui/themes";
|
|
1778
1864
|
// src/hooks/misc/useInfiniteScroll/index.tsx
|
|
1779
1865
|
import { useRef as useRef3 } from "react";
|
|
1780
1866
|
import { useInView } from "react-intersection-observer";
|
|
@@ -1829,7 +1915,7 @@ var useInfiniteScroll = function(param) {
|
|
|
1829
1915
|
};
|
|
1830
1916
|
};
|
|
1831
1917
|
// src/components/threads/Thread/Messages/Root/index.tsx
|
|
1832
|
-
import { jsx as
|
|
1918
|
+
import { jsx as jsx47, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1833
1919
|
var Root2 = function(param) {
|
|
1834
1920
|
var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
|
|
1835
1921
|
var _useMessages = useMessages(), isFetchingNextPage = _useMessages.isFetchingNextPage, hasNextPage = _useMessages.hasNextPage, fetchNextPage = _useMessages.fetchNextPage;
|
|
@@ -1838,7 +1924,7 @@ var Root2 = function(param) {
|
|
|
1838
1924
|
hasNextPage: hasNextPage,
|
|
1839
1925
|
fetchNextPage: fetchNextPage
|
|
1840
1926
|
}), containerRef = _useInfiniteScroll.containerRef, loaderRef = _useInfiniteScroll.loaderRef;
|
|
1841
|
-
return /* @__PURE__ */
|
|
1927
|
+
return /* @__PURE__ */ jsxs15(Flex14, {
|
|
1842
1928
|
ref: containerRef,
|
|
1843
1929
|
direction: "column-reverse",
|
|
1844
1930
|
flexGrow: "1",
|
|
@@ -1847,10 +1933,10 @@ var Root2 = function(param) {
|
|
|
1847
1933
|
}),
|
|
1848
1934
|
children: [
|
|
1849
1935
|
children,
|
|
1850
|
-
hasNextPage && /* @__PURE__ */
|
|
1936
|
+
hasNextPage && /* @__PURE__ */ jsx47(Flex14, {
|
|
1851
1937
|
ref: loaderRef
|
|
1852
1938
|
}),
|
|
1853
|
-
/* @__PURE__ */
|
|
1939
|
+
/* @__PURE__ */ jsx47(Flex14, {
|
|
1854
1940
|
flexShrink: "0",
|
|
1855
1941
|
flexGrow: "1"
|
|
1856
1942
|
})
|
|
@@ -1858,30 +1944,30 @@ var Root2 = function(param) {
|
|
|
1858
1944
|
});
|
|
1859
1945
|
};
|
|
1860
1946
|
// src/components/threads/Thread/Messages/NextPageSkeleton.tsx
|
|
1861
|
-
import { jsx as
|
|
1947
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
1862
1948
|
var NextPageSkeleton = function() {
|
|
1863
1949
|
var hasNextPage = useMessages().hasNextPage;
|
|
1864
1950
|
if (!hasNextPage) {
|
|
1865
1951
|
return null;
|
|
1866
1952
|
}
|
|
1867
|
-
return /* @__PURE__ */
|
|
1953
|
+
return /* @__PURE__ */ jsx48(MessagesSkeleton, {});
|
|
1868
1954
|
};
|
|
1869
1955
|
// src/components/threads/Thread/Messages/index.tsx
|
|
1870
|
-
import { jsx as
|
|
1956
|
+
import { jsx as jsx49, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1871
1957
|
var Messages = function(param) {
|
|
1872
1958
|
var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
|
|
1873
|
-
return /* @__PURE__ */
|
|
1959
|
+
return /* @__PURE__ */ jsxs16(Root2, {
|
|
1874
1960
|
style: style,
|
|
1875
1961
|
children: [
|
|
1876
|
-
/* @__PURE__ */
|
|
1962
|
+
/* @__PURE__ */ jsx49(Flex15, {
|
|
1877
1963
|
flexShrink: "0",
|
|
1878
1964
|
height: "var(--space-3)"
|
|
1879
1965
|
}),
|
|
1880
|
-
/* @__PURE__ */
|
|
1966
|
+
/* @__PURE__ */ jsx49(Progress, {}),
|
|
1881
1967
|
children,
|
|
1882
|
-
/* @__PURE__ */
|
|
1883
|
-
/* @__PURE__ */
|
|
1884
|
-
/* @__PURE__ */
|
|
1968
|
+
/* @__PURE__ */ jsx49(Content4, {}),
|
|
1969
|
+
/* @__PURE__ */ jsx49(NextPageSkeleton, {}),
|
|
1970
|
+
/* @__PURE__ */ jsx49(Flex15, {
|
|
1885
1971
|
flexShrink: "0",
|
|
1886
1972
|
flexGrow: "1",
|
|
1887
1973
|
minHeight: "var(--space-5)"
|
|
@@ -1894,7 +1980,7 @@ Messages.Message = Message;
|
|
|
1894
1980
|
Messages.NextPageSkeleton = NextPageSkeleton;
|
|
1895
1981
|
// src/components/threads/Thread/MessageForm/Submit/index.tsx
|
|
1896
1982
|
import { ArrowUpIcon, StopIcon } from "@radix-ui/react-icons";
|
|
1897
|
-
import { IconButton as IconButton2, Flex as
|
|
1983
|
+
import { IconButton as IconButton2, Flex as Flex16 } from "@radix-ui/themes";
|
|
1898
1984
|
// src/hooks/messages/useMessageFormContext/index.ts
|
|
1899
1985
|
import { useContext as useContext10 } from "react";
|
|
1900
1986
|
// src/contexts/messages/MessageFormContext/index.ts
|
|
@@ -1912,10 +1998,10 @@ var useMessageFormContext = function() {
|
|
|
1912
1998
|
return useContext10(MessageFormContext);
|
|
1913
1999
|
};
|
|
1914
2000
|
// src/components/threads/Thread/MessageForm/Submit/index.tsx
|
|
1915
|
-
import { jsx as
|
|
2001
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
1916
2002
|
var Root3 = function(param) {
|
|
1917
2003
|
var children = param.children;
|
|
1918
|
-
return /* @__PURE__ */
|
|
2004
|
+
return /* @__PURE__ */ jsx50(Flex16, {
|
|
1919
2005
|
flexShrink: "0",
|
|
1920
2006
|
align: "end",
|
|
1921
2007
|
children: children
|
|
@@ -1925,24 +2011,24 @@ var Button2 = function() {
|
|
|
1925
2011
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
1926
2012
|
var _useMessageFormContext = useMessageFormContext(), isDisabled = _useMessageFormContext.isDisabled, isLoading = _useMessageFormContext.isLoading, isFileLoading = _useMessageFormContext.isFileLoading;
|
|
1927
2013
|
if (isLoading) {
|
|
1928
|
-
return /* @__PURE__ */
|
|
2014
|
+
return /* @__PURE__ */ jsx50(IconButton2, {
|
|
1929
2015
|
type: "button",
|
|
1930
2016
|
onClick: function() {
|
|
1931
2017
|
var _superinterfaceContext_createMessageAbortControllerRef_current;
|
|
1932
2018
|
return (_superinterfaceContext_createMessageAbortControllerRef_current = superinterfaceContext.createMessageAbortControllerRef.current) === null || _superinterfaceContext_createMessageAbortControllerRef_current === void 0 ? void 0 : _superinterfaceContext_createMessageAbortControllerRef_current.abort();
|
|
1933
2019
|
},
|
|
1934
|
-
children: /* @__PURE__ */
|
|
2020
|
+
children: /* @__PURE__ */ jsx50(StopIcon, {})
|
|
1935
2021
|
});
|
|
1936
2022
|
}
|
|
1937
|
-
return /* @__PURE__ */
|
|
2023
|
+
return /* @__PURE__ */ jsx50(IconButton2, {
|
|
1938
2024
|
type: "submit",
|
|
1939
2025
|
disabled: isDisabled || isFileLoading,
|
|
1940
|
-
children: /* @__PURE__ */
|
|
2026
|
+
children: /* @__PURE__ */ jsx50(ArrowUpIcon, {})
|
|
1941
2027
|
});
|
|
1942
2028
|
};
|
|
1943
2029
|
var Submit = function() {
|
|
1944
|
-
return /* @__PURE__ */
|
|
1945
|
-
children: /* @__PURE__ */
|
|
2030
|
+
return /* @__PURE__ */ jsx50(Root3, {
|
|
2031
|
+
children: /* @__PURE__ */ jsx50(Button2, {})
|
|
1946
2032
|
});
|
|
1947
2033
|
};
|
|
1948
2034
|
Submit.Root = Root3;
|
|
@@ -1951,7 +2037,7 @@ Submit.Button = Button2;
|
|
|
1951
2037
|
import { useQueryClient as useQueryClient4 } from "@tanstack/react-query";
|
|
1952
2038
|
import { useMemo as useMemo8, useState } from "react";
|
|
1953
2039
|
import { useForm, FormProvider } from "react-hook-form";
|
|
1954
|
-
import { Box as
|
|
2040
|
+
import { Box as Box13 } from "@radix-ui/themes";
|
|
1955
2041
|
// src/hooks/messages/useCreateMessage/index.ts
|
|
1956
2042
|
import { partob } from "radash";
|
|
1957
2043
|
import { useMutation, useQueryClient as useQueryClient3 } from "@tanstack/react-query";
|
|
@@ -2574,7 +2660,7 @@ var formOptions = {
|
|
|
2574
2660
|
};
|
|
2575
2661
|
// src/components/threads/Thread/MessageForm/Root/index.tsx
|
|
2576
2662
|
import { partob as partob2 } from "radash";
|
|
2577
|
-
import { jsx as
|
|
2663
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
2578
2664
|
var Root4 = function(param) {
|
|
2579
2665
|
var children = param.children, onSubmitArg = param.onSubmit, isDisabledArg = param.isDisabled;
|
|
2580
2666
|
var _useState = _sliced_to_array(useState([]), 2), files = _useState[0], setFiles = _useState[1];
|
|
@@ -2683,7 +2769,7 @@ var Root4 = function(param) {
|
|
|
2683
2769
|
};
|
|
2684
2770
|
}();
|
|
2685
2771
|
var content = watch("content");
|
|
2686
|
-
return /* @__PURE__ */
|
|
2772
|
+
return /* @__PURE__ */ jsx51(MessageFormContext.Provider, {
|
|
2687
2773
|
value: {
|
|
2688
2774
|
isDisabled: isDisabled,
|
|
2689
2775
|
isLoading: isLoading,
|
|
@@ -2692,11 +2778,11 @@ var Root4 = function(param) {
|
|
|
2692
2778
|
isFileLoading: isFileLoading,
|
|
2693
2779
|
content: content
|
|
2694
2780
|
},
|
|
2695
|
-
children: /* @__PURE__ */
|
|
2696
|
-
children: /* @__PURE__ */
|
|
2781
|
+
children: /* @__PURE__ */ jsx51(FormProvider, _object_spread_props(_object_spread({}, formProps), {
|
|
2782
|
+
children: /* @__PURE__ */ jsx51(Box13, {
|
|
2697
2783
|
asChild: true,
|
|
2698
2784
|
flexShrink: "0",
|
|
2699
|
-
children: /* @__PURE__ */
|
|
2785
|
+
children: /* @__PURE__ */ jsx51("form", {
|
|
2700
2786
|
onSubmit: handleSubmit(onSubmit),
|
|
2701
2787
|
children: children
|
|
2702
2788
|
})
|
|
@@ -2706,9 +2792,9 @@ var Root4 = function(param) {
|
|
|
2706
2792
|
};
|
|
2707
2793
|
// src/components/threads/Thread/MessageForm/Field/index.tsx
|
|
2708
2794
|
import { useFormContext as useFormContext2 } from "react-hook-form";
|
|
2709
|
-
import { Container as RadixContainer, Flex as
|
|
2795
|
+
import { Container as RadixContainer, Flex as Flex20 } from "@radix-ui/themes";
|
|
2710
2796
|
// src/components/threads/Thread/MessageForm/Field/Control.tsx
|
|
2711
|
-
import { Flex as
|
|
2797
|
+
import { Flex as Flex17 } from "@radix-ui/themes";
|
|
2712
2798
|
import { useFormContext } from "react-hook-form";
|
|
2713
2799
|
// src/hooks/misc/usePrevious.ts
|
|
2714
2800
|
import { useEffect as useEffect3, useRef as useRef4 } from "react";
|
|
@@ -2724,14 +2810,14 @@ import { useContext as useContext11, useMemo as useMemo9, useRef as useRef5, use
|
|
|
2724
2810
|
// src/components/textareas/TextareaBase/index.tsx
|
|
2725
2811
|
import { forwardRef as forwardRef3 } from "react";
|
|
2726
2812
|
import TextareaAutosize from "react-textarea-autosize";
|
|
2727
|
-
import { Fragment as Fragment3, jsx as
|
|
2813
|
+
import { Fragment as Fragment3, jsx as jsx52, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2728
2814
|
var TextareaBase = forwardRef3(function TextareaBase2(props, ref) {
|
|
2729
|
-
return /* @__PURE__ */
|
|
2815
|
+
return /* @__PURE__ */ jsxs17(Fragment3, {
|
|
2730
2816
|
children: [
|
|
2731
|
-
/* @__PURE__ */
|
|
2817
|
+
/* @__PURE__ */ jsx52("style", {
|
|
2732
2818
|
children: ".superinterface-textarea { min-height: inherit; height: 30px; }\n.superinterface-textarea::placeholder { color: var(--gray-a10); }"
|
|
2733
2819
|
}),
|
|
2734
|
-
/* @__PURE__ */
|
|
2820
|
+
/* @__PURE__ */ jsx52(TextareaAutosize, _object_spread({
|
|
2735
2821
|
ref: ref,
|
|
2736
2822
|
className: "rt-reset superinterface-textarea",
|
|
2737
2823
|
style: {
|
|
@@ -2748,10 +2834,10 @@ var TextareaBase = forwardRef3(function TextareaBase2(props, ref) {
|
|
|
2748
2834
|
});
|
|
2749
2835
|
});
|
|
2750
2836
|
// src/components/threads/Thread/MessageForm/Field/Control.tsx
|
|
2751
|
-
import { jsx as
|
|
2837
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
2752
2838
|
var Root5 = function(param) {
|
|
2753
2839
|
var children = param.children;
|
|
2754
|
-
return /* @__PURE__ */
|
|
2840
|
+
return /* @__PURE__ */ jsx53(Flex17, {
|
|
2755
2841
|
flexGrow: "1",
|
|
2756
2842
|
pt: "4px",
|
|
2757
2843
|
children: children
|
|
@@ -2780,7 +2866,7 @@ var Input = function() {
|
|
|
2780
2866
|
isDisabledPrevious,
|
|
2781
2867
|
textareaProps
|
|
2782
2868
|
]);
|
|
2783
|
-
return /* @__PURE__ */
|
|
2869
|
+
return /* @__PURE__ */ jsx53(TextareaBase, _object_spread_props(_object_spread({
|
|
2784
2870
|
minRows: 1,
|
|
2785
2871
|
placeholder: "Message ".concat(assistantNameContext, "..."),
|
|
2786
2872
|
disabled: isDisabled,
|
|
@@ -2800,51 +2886,51 @@ var Input = function() {
|
|
|
2800
2886
|
}));
|
|
2801
2887
|
};
|
|
2802
2888
|
var Control = function() {
|
|
2803
|
-
return /* @__PURE__ */
|
|
2804
|
-
children: /* @__PURE__ */
|
|
2889
|
+
return /* @__PURE__ */ jsx53(Root5, {
|
|
2890
|
+
children: /* @__PURE__ */ jsx53(Input, {})
|
|
2805
2891
|
});
|
|
2806
2892
|
};
|
|
2807
2893
|
Control.Root = Root5;
|
|
2808
2894
|
Control.Input = Input;
|
|
2809
2895
|
// src/components/threads/Thread/MessageForm/Field/Files/Preview.tsx
|
|
2810
|
-
import { Flex as
|
|
2811
|
-
import { FileIcon as
|
|
2812
|
-
import { jsx as
|
|
2896
|
+
import { Flex as Flex18, Card, Spinner, Text as Text6, IconButton as IconButton3 } from "@radix-ui/themes";
|
|
2897
|
+
import { FileIcon as FileIcon2, Cross2Icon } from "@radix-ui/react-icons";
|
|
2898
|
+
import { jsx as jsx54, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
2813
2899
|
var Preview = function() {
|
|
2814
2900
|
var _useMessageFormContext = useMessageFormContext(), files = _useMessageFormContext.files, setFiles = _useMessageFormContext.setFiles;
|
|
2815
2901
|
if (!files.length) {
|
|
2816
2902
|
return null;
|
|
2817
2903
|
}
|
|
2818
|
-
return /* @__PURE__ */
|
|
2904
|
+
return /* @__PURE__ */ jsx54(Flex18, {
|
|
2819
2905
|
flexBasis: "100%",
|
|
2820
2906
|
direction: "column",
|
|
2821
2907
|
pb: "2",
|
|
2822
2908
|
gap: "1",
|
|
2823
2909
|
children: files.map(function(file) {
|
|
2824
|
-
return /* @__PURE__ */
|
|
2910
|
+
return /* @__PURE__ */ jsx54(Card, {
|
|
2825
2911
|
variant: "ghost",
|
|
2826
|
-
children: /* @__PURE__ */
|
|
2912
|
+
children: /* @__PURE__ */ jsxs18(Flex18, {
|
|
2827
2913
|
align: "center",
|
|
2828
2914
|
justify: "between",
|
|
2829
2915
|
gap: "1",
|
|
2830
2916
|
children: [
|
|
2831
|
-
/* @__PURE__ */
|
|
2917
|
+
/* @__PURE__ */ jsxs18(Flex18, {
|
|
2832
2918
|
align: "center",
|
|
2833
2919
|
gap: "1",
|
|
2834
2920
|
flexShrink: "1",
|
|
2835
2921
|
minWidth: "0",
|
|
2836
2922
|
maxWidth: "250px",
|
|
2837
2923
|
children: [
|
|
2838
|
-
/* @__PURE__ */
|
|
2924
|
+
/* @__PURE__ */ jsx54(Flex18, {
|
|
2839
2925
|
flexShrink: "0",
|
|
2840
|
-
children: /* @__PURE__ */
|
|
2926
|
+
children: /* @__PURE__ */ jsx54(Spinner, {
|
|
2841
2927
|
loading: isOptimistic({
|
|
2842
2928
|
id: file.id
|
|
2843
2929
|
}),
|
|
2844
|
-
children: /* @__PURE__ */
|
|
2930
|
+
children: /* @__PURE__ */ jsx54(FileIcon2, {})
|
|
2845
2931
|
})
|
|
2846
2932
|
}),
|
|
2847
|
-
/* @__PURE__ */
|
|
2933
|
+
/* @__PURE__ */ jsx54(Text6, {
|
|
2848
2934
|
size: "2",
|
|
2849
2935
|
truncate: true,
|
|
2850
2936
|
wrap: "nowrap",
|
|
@@ -2852,9 +2938,9 @@ var Preview = function() {
|
|
|
2852
2938
|
})
|
|
2853
2939
|
]
|
|
2854
2940
|
}),
|
|
2855
|
-
/* @__PURE__ */
|
|
2941
|
+
/* @__PURE__ */ jsx54(Flex18, {
|
|
2856
2942
|
flexShrink: "0",
|
|
2857
|
-
children: /* @__PURE__ */
|
|
2943
|
+
children: /* @__PURE__ */ jsx54(IconButton3, {
|
|
2858
2944
|
onClick: function() {
|
|
2859
2945
|
return setFiles(function(prev) {
|
|
2860
2946
|
return prev.filter(function(prevFile) {
|
|
@@ -2865,7 +2951,7 @@ var Preview = function() {
|
|
|
2865
2951
|
color: "gray",
|
|
2866
2952
|
variant: "ghost",
|
|
2867
2953
|
size: "1",
|
|
2868
|
-
children: /* @__PURE__ */
|
|
2954
|
+
children: /* @__PURE__ */ jsx54(Cross2Icon, {})
|
|
2869
2955
|
})
|
|
2870
2956
|
})
|
|
2871
2957
|
]
|
|
@@ -2879,7 +2965,7 @@ import { useCallback as useCallback2 } from "react";
|
|
|
2879
2965
|
import { omit as omit4 } from "radash";
|
|
2880
2966
|
import dayjs2 from "dayjs";
|
|
2881
2967
|
import { FilePlusIcon } from "@radix-ui/react-icons";
|
|
2882
|
-
import { IconButton as IconButton4, Flex as
|
|
2968
|
+
import { IconButton as IconButton4, Flex as Flex19 } from "@radix-ui/themes";
|
|
2883
2969
|
// src/hooks/files/useCreateFile/index.ts
|
|
2884
2970
|
import { useMutation as useMutation2, useQueryClient as useQueryClient5 } from "@tanstack/react-query";
|
|
2885
2971
|
// src/hooks/files/useCreateFile/lib/mutationOptions/mutationFn/body/formData.ts
|
|
@@ -2990,7 +3076,7 @@ var useCreateFile = function() {
|
|
|
2990
3076
|
});
|
|
2991
3077
|
};
|
|
2992
3078
|
// src/components/threads/Thread/MessageForm/Field/Files/Control.tsx
|
|
2993
|
-
import { jsx as
|
|
3079
|
+
import { jsx as jsx55, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2994
3080
|
var accept = ".c,text/x-c,\n.cs,text/x-csharp,\n.cpp,text/x-c++,\n.doc,application/msword,\n.docx,application/vnd.openxmlformats-officedocument.wordprocessingml.document,\n.html,text/html,\n.java,text/x-java,\n.json,application/json,\n.md,text/markdown,\n.pdf,application/pdf,\n.php,text/x-php,\n.pptx,application/vnd.openxmlformats-officedocument.presentationml.presentation,\n.py,text/x-python,\n.py,text/x-script.python,\n.rb,text/x-ruby,\n.tex,text/x-tex,\n.txt,text/plain,\n.css,text/css,\n.js,text/javascript,\n.sh,application/x-sh,\n.ts,application/typescript";
|
|
2995
3081
|
var Control2 = function() {
|
|
2996
3082
|
var _useMessageFormContext = useMessageFormContext(), isDisabled = _useMessageFormContext.isDisabled, isLoading = _useMessageFormContext.isLoading, setFiles = _useMessageFormContext.setFiles;
|
|
@@ -3164,11 +3250,11 @@ var Control2 = function() {
|
|
|
3164
3250
|
createFile,
|
|
3165
3251
|
setFiles
|
|
3166
3252
|
]);
|
|
3167
|
-
return /* @__PURE__ */
|
|
3253
|
+
return /* @__PURE__ */ jsx55(Flex19, {
|
|
3168
3254
|
pt: "2",
|
|
3169
3255
|
pr: "2",
|
|
3170
3256
|
flexGrow: "0",
|
|
3171
|
-
children: /* @__PURE__ */
|
|
3257
|
+
children: /* @__PURE__ */ jsxs19(IconButton4, {
|
|
3172
3258
|
type: "button",
|
|
3173
3259
|
variant: "ghost",
|
|
3174
3260
|
color: "gray",
|
|
@@ -3178,8 +3264,8 @@ var Control2 = function() {
|
|
|
3178
3264
|
overflow: "hidden"
|
|
3179
3265
|
},
|
|
3180
3266
|
children: [
|
|
3181
|
-
/* @__PURE__ */
|
|
3182
|
-
/* @__PURE__ */
|
|
3267
|
+
/* @__PURE__ */ jsx55(FilePlusIcon, {}),
|
|
3268
|
+
/* @__PURE__ */ jsx55("input", {
|
|
3183
3269
|
type: "file",
|
|
3184
3270
|
multiple: true,
|
|
3185
3271
|
accept: accept,
|
|
@@ -3204,20 +3290,20 @@ var Files = {
|
|
|
3204
3290
|
Control: Control2
|
|
3205
3291
|
};
|
|
3206
3292
|
// src/components/threads/Thread/MessageForm/Field/index.tsx
|
|
3207
|
-
import { jsx as
|
|
3293
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
3208
3294
|
var Root6 = function(param) {
|
|
3209
3295
|
var children = param.children;
|
|
3210
3296
|
var _useFormContext2 = useFormContext2(), errors = _useFormContext2.formState.errors;
|
|
3211
|
-
return /* @__PURE__ */
|
|
3297
|
+
return /* @__PURE__ */ jsx56(RadixContainer, {
|
|
3212
3298
|
size: "2",
|
|
3213
3299
|
flexGrow: "0",
|
|
3214
|
-
children: /* @__PURE__ */
|
|
3300
|
+
children: /* @__PURE__ */ jsx56(Flex20, {
|
|
3215
3301
|
direction: "column",
|
|
3216
3302
|
flexShrink: "0",
|
|
3217
|
-
children: /* @__PURE__ */
|
|
3303
|
+
children: /* @__PURE__ */ jsx56(Flex20, {
|
|
3218
3304
|
direction: "column",
|
|
3219
3305
|
flexShrink: "0",
|
|
3220
|
-
children: /* @__PURE__ */
|
|
3306
|
+
children: /* @__PURE__ */ jsx56(Flex20, {
|
|
3221
3307
|
style: _object_spread({
|
|
3222
3308
|
borderRadius: "var(--radius-2)",
|
|
3223
3309
|
borderWidth: "1px",
|
|
@@ -3241,13 +3327,13 @@ var Field = {
|
|
|
3241
3327
|
Files: Files
|
|
3242
3328
|
};
|
|
3243
3329
|
// src/components/threads/Thread/MessageForm/index.tsx
|
|
3244
|
-
import { jsx as
|
|
3330
|
+
import { jsx as jsx57, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3245
3331
|
var MessageForm = function() {
|
|
3246
|
-
return /* @__PURE__ */
|
|
3247
|
-
children: /* @__PURE__ */
|
|
3332
|
+
return /* @__PURE__ */ jsx57(Root4, {
|
|
3333
|
+
children: /* @__PURE__ */ jsxs20(Field.Root, {
|
|
3248
3334
|
children: [
|
|
3249
|
-
/* @__PURE__ */
|
|
3250
|
-
/* @__PURE__ */
|
|
3335
|
+
/* @__PURE__ */ jsx57(Field.Control, {}),
|
|
3336
|
+
/* @__PURE__ */ jsx57(Submit, {})
|
|
3251
3337
|
]
|
|
3252
3338
|
})
|
|
3253
3339
|
});
|
|
@@ -3256,17 +3342,17 @@ MessageForm.Root = Root4;
|
|
|
3256
3342
|
MessageForm.Field = Field;
|
|
3257
3343
|
MessageForm.Submit = Submit;
|
|
3258
3344
|
// src/components/threads/Thread/Root/index.tsx
|
|
3259
|
-
import { Flex as
|
|
3345
|
+
import { Flex as Flex21 } from "@radix-ui/themes";
|
|
3260
3346
|
// src/components/threads/Thread/Provider/index.tsx
|
|
3261
3347
|
var Provider2 = SuperinterfaceProvider;
|
|
3262
3348
|
// src/components/threads/Thread/Root/index.tsx
|
|
3263
|
-
import { jsx as
|
|
3349
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
3264
3350
|
var Root7 = function(_param) {
|
|
3265
3351
|
var children = _param.children, rest = _object_without_properties(_param, [
|
|
3266
3352
|
"children"
|
|
3267
3353
|
]);
|
|
3268
|
-
return /* @__PURE__ */
|
|
3269
|
-
children: /* @__PURE__ */
|
|
3354
|
+
return /* @__PURE__ */ jsx58(Provider2, _object_spread_props(_object_spread({}, rest), {
|
|
3355
|
+
children: /* @__PURE__ */ jsx58(Flex21, {
|
|
3270
3356
|
direction: "column",
|
|
3271
3357
|
flexGrow: "1",
|
|
3272
3358
|
children: children
|
|
@@ -3274,12 +3360,12 @@ var Root7 = function(_param) {
|
|
|
3274
3360
|
}));
|
|
3275
3361
|
};
|
|
3276
3362
|
// src/components/threads/Thread/index.tsx
|
|
3277
|
-
import { jsx as
|
|
3363
|
+
import { jsx as jsx59, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3278
3364
|
var Thread = function(props) {
|
|
3279
|
-
return /* @__PURE__ */
|
|
3365
|
+
return /* @__PURE__ */ jsxs21(Root7, _object_spread_props(_object_spread({}, props), {
|
|
3280
3366
|
children: [
|
|
3281
|
-
/* @__PURE__ */
|
|
3282
|
-
/* @__PURE__ */
|
|
3367
|
+
/* @__PURE__ */ jsx59(Messages, {}),
|
|
3368
|
+
/* @__PURE__ */ jsx59(MessageForm, {})
|
|
3283
3369
|
]
|
|
3284
3370
|
}));
|
|
3285
3371
|
};
|
|
@@ -3403,12 +3489,12 @@ var useThreadDialogContext = function() {
|
|
|
3403
3489
|
return useContext13(ThreadDialogContext);
|
|
3404
3490
|
};
|
|
3405
3491
|
// src/components/threads/ThreadDialog/Provider/index.tsx
|
|
3406
|
-
import { jsx as
|
|
3492
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
3407
3493
|
var Provider3 = function(param) {
|
|
3408
3494
|
var children = param.children;
|
|
3409
3495
|
var threadDialogContext = useThreadDialogContext();
|
|
3410
3496
|
var _useState2 = _sliced_to_array(useState2(threadDialogContext.isOpen), 2), isOpen = _useState2[0], setIsOpen = _useState2[1];
|
|
3411
|
-
return /* @__PURE__ */
|
|
3497
|
+
return /* @__PURE__ */ jsx60(ThreadDialogContext.Provider, {
|
|
3412
3498
|
value: {
|
|
3413
3499
|
isOpen: isOpen,
|
|
3414
3500
|
setIsOpen: setIsOpen
|
|
@@ -3421,27 +3507,27 @@ import { useState as useState3, useCallback as useCallback3 } from "react";
|
|
|
3421
3507
|
import * as Toast2 from "@radix-ui/react-toast";
|
|
3422
3508
|
// src/components/toasts/ToastsProvider/CustomToast.tsx
|
|
3423
3509
|
import * as Toast from "@radix-ui/react-toast";
|
|
3424
|
-
import { Card as
|
|
3510
|
+
import { Card as Card2, Text as Text7, Flex as Flex22 } from "@radix-ui/themes";
|
|
3425
3511
|
import { CheckCircledIcon as CheckCircledIcon2, CrossCircledIcon } from "@radix-ui/react-icons";
|
|
3426
|
-
import { jsx as
|
|
3512
|
+
import { jsx as jsx61, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3427
3513
|
var CustomToast = function(param) {
|
|
3428
3514
|
var toast = param.toast;
|
|
3429
|
-
return /* @__PURE__ */
|
|
3430
|
-
children: /* @__PURE__ */
|
|
3431
|
-
children: /* @__PURE__ */
|
|
3432
|
-
children: /* @__PURE__ */
|
|
3515
|
+
return /* @__PURE__ */ jsx61(Toast.Root, {
|
|
3516
|
+
children: /* @__PURE__ */ jsx61(Card2, {
|
|
3517
|
+
children: /* @__PURE__ */ jsx61(Toast.Title, {
|
|
3518
|
+
children: /* @__PURE__ */ jsxs22(Flex22, {
|
|
3433
3519
|
children: [
|
|
3434
|
-
/* @__PURE__ */
|
|
3520
|
+
/* @__PURE__ */ jsx61(Flex22, {
|
|
3435
3521
|
pr: "2",
|
|
3436
3522
|
height: "14px",
|
|
3437
3523
|
align: "center",
|
|
3438
|
-
children: toast.type === "success" ? /* @__PURE__ */
|
|
3524
|
+
children: toast.type === "success" ? /* @__PURE__ */ jsx61(CheckCircledIcon2, {
|
|
3439
3525
|
color: "var(--accent-9)"
|
|
3440
|
-
}) : /* @__PURE__ */
|
|
3526
|
+
}) : /* @__PURE__ */ jsx61(CrossCircledIcon, {
|
|
3441
3527
|
color: "var(--red-9)"
|
|
3442
3528
|
})
|
|
3443
3529
|
}),
|
|
3444
|
-
/* @__PURE__ */
|
|
3530
|
+
/* @__PURE__ */ jsx61(Text7, {
|
|
3445
3531
|
weight: "medium",
|
|
3446
3532
|
size: "1",
|
|
3447
3533
|
children: toast.message
|
|
@@ -3453,7 +3539,7 @@ var CustomToast = function(param) {
|
|
|
3453
3539
|
});
|
|
3454
3540
|
};
|
|
3455
3541
|
// src/components/toasts/ToastsProvider/index.tsx
|
|
3456
|
-
import { jsx as
|
|
3542
|
+
import { jsx as jsx62, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3457
3543
|
var ToastsProvider = function(param) {
|
|
3458
3544
|
var children = param.children;
|
|
3459
3545
|
var _useState3 = _sliced_to_array(useState3([]), 2), toasts = _useState3[0], setToasts = _useState3[1];
|
|
@@ -3464,20 +3550,20 @@ var ToastsProvider = function(param) {
|
|
|
3464
3550
|
]);
|
|
3465
3551
|
});
|
|
3466
3552
|
}, []);
|
|
3467
|
-
return /* @__PURE__ */
|
|
3553
|
+
return /* @__PURE__ */ jsx62(ToastsContext.Provider, {
|
|
3468
3554
|
value: {
|
|
3469
3555
|
toasts: toasts,
|
|
3470
3556
|
addToast: addToast
|
|
3471
3557
|
},
|
|
3472
|
-
children: /* @__PURE__ */
|
|
3558
|
+
children: /* @__PURE__ */ jsxs23(Toast2.Provider, {
|
|
3473
3559
|
children: [
|
|
3474
3560
|
children,
|
|
3475
3561
|
Array.from(toasts).map(function(toast, index) {
|
|
3476
|
-
return /* @__PURE__ */
|
|
3562
|
+
return /* @__PURE__ */ jsx62(CustomToast, {
|
|
3477
3563
|
toast: toast
|
|
3478
3564
|
}, index);
|
|
3479
3565
|
}),
|
|
3480
|
-
/* @__PURE__ */
|
|
3566
|
+
/* @__PURE__ */ jsx62(Toast2.Viewport, {
|
|
3481
3567
|
style: {
|
|
3482
3568
|
position: "absolute",
|
|
3483
3569
|
bottom: 0,
|
|
@@ -3499,34 +3585,34 @@ var ToastsProvider = function(param) {
|
|
|
3499
3585
|
});
|
|
3500
3586
|
};
|
|
3501
3587
|
// src/components/threads/ThreadDialog/Root/index.tsx
|
|
3502
|
-
import { jsx as
|
|
3588
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
3503
3589
|
var Root9 = function(param) {
|
|
3504
3590
|
var children = param.children;
|
|
3505
|
-
return /* @__PURE__ */
|
|
3506
|
-
children: /* @__PURE__ */
|
|
3591
|
+
return /* @__PURE__ */ jsx63(ToastsProvider, {
|
|
3592
|
+
children: /* @__PURE__ */ jsx63(Provider3, {
|
|
3507
3593
|
children: children
|
|
3508
3594
|
})
|
|
3509
3595
|
});
|
|
3510
3596
|
};
|
|
3511
3597
|
// src/components/threads/ThreadDialog/Trigger/index.tsx
|
|
3512
|
-
import { Flex as
|
|
3598
|
+
import { Flex as Flex23 } from "@radix-ui/themes";
|
|
3513
3599
|
// src/components/threads/ThreadDialog/Trigger/Button.tsx
|
|
3514
3600
|
import { IconButton as IconButton5 } from "@radix-ui/themes";
|
|
3515
3601
|
import { ChatBubbleIcon } from "@radix-ui/react-icons";
|
|
3516
|
-
import { jsx as
|
|
3602
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
3517
3603
|
var Button3 = function() {
|
|
3518
|
-
return /* @__PURE__ */
|
|
3604
|
+
return /* @__PURE__ */ jsx64(IconButton5, {
|
|
3519
3605
|
size: "4",
|
|
3520
3606
|
radius: "full",
|
|
3521
|
-
children: /* @__PURE__ */
|
|
3607
|
+
children: /* @__PURE__ */ jsx64(ChatBubbleIcon, {})
|
|
3522
3608
|
});
|
|
3523
3609
|
};
|
|
3524
3610
|
// src/components/threads/ThreadDialog/Trigger/index.tsx
|
|
3525
|
-
import { jsx as
|
|
3611
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
3526
3612
|
var Root10 = function(param) {
|
|
3527
3613
|
var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
|
|
3528
3614
|
var _useThreadDialogContext = useThreadDialogContext(), setIsOpen = _useThreadDialogContext.setIsOpen, isOpen = _useThreadDialogContext.isOpen;
|
|
3529
|
-
return /* @__PURE__ */
|
|
3615
|
+
return /* @__PURE__ */ jsx65(Flex23, {
|
|
3530
3616
|
display: {
|
|
3531
3617
|
initial: isOpen ? "none" : "flex",
|
|
3532
3618
|
sm: "flex"
|
|
@@ -3550,21 +3636,21 @@ var Root10 = function(param) {
|
|
|
3550
3636
|
});
|
|
3551
3637
|
};
|
|
3552
3638
|
var Trigger = function(args) {
|
|
3553
|
-
return /* @__PURE__ */
|
|
3554
|
-
children: /* @__PURE__ */
|
|
3639
|
+
return /* @__PURE__ */ jsx65(Root10, _object_spread_props(_object_spread({}, args), {
|
|
3640
|
+
children: /* @__PURE__ */ jsx65(Button3, {})
|
|
3555
3641
|
}));
|
|
3556
3642
|
};
|
|
3557
3643
|
Trigger.Root = Root10;
|
|
3558
3644
|
Trigger.Button = Button3;
|
|
3559
3645
|
// src/components/threads/ThreadDialog/Content/index.tsx
|
|
3560
|
-
import { Card as
|
|
3646
|
+
import { Card as Card3, Inset, Flex as Flex25 } from "@radix-ui/themes";
|
|
3561
3647
|
// src/components/threads/ThreadDialog/Close/index.tsx
|
|
3562
3648
|
import { Cross1Icon } from "@radix-ui/react-icons";
|
|
3563
|
-
import { IconButton as IconButton6, Flex as
|
|
3564
|
-
import { jsx as
|
|
3649
|
+
import { IconButton as IconButton6, Flex as Flex24 } from "@radix-ui/themes";
|
|
3650
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
3565
3651
|
var Close = function() {
|
|
3566
3652
|
var _useThreadDialogContext = useThreadDialogContext(), setIsOpen = _useThreadDialogContext.setIsOpen, isOpen = _useThreadDialogContext.isOpen;
|
|
3567
|
-
return /* @__PURE__ */
|
|
3653
|
+
return /* @__PURE__ */ jsx66(Flex24, {
|
|
3568
3654
|
display: {
|
|
3569
3655
|
initial: isOpen ? "flex" : "none",
|
|
3570
3656
|
sm: "none"
|
|
@@ -3584,20 +3670,20 @@ var Close = function() {
|
|
|
3584
3670
|
style: {
|
|
3585
3671
|
zIndex: 9999999999
|
|
3586
3672
|
},
|
|
3587
|
-
children: /* @__PURE__ */
|
|
3673
|
+
children: /* @__PURE__ */ jsx66(IconButton6, {
|
|
3588
3674
|
size: "2",
|
|
3589
3675
|
variant: "soft",
|
|
3590
|
-
children: /* @__PURE__ */
|
|
3676
|
+
children: /* @__PURE__ */ jsx66(Cross1Icon, {})
|
|
3591
3677
|
})
|
|
3592
3678
|
});
|
|
3593
3679
|
};
|
|
3594
3680
|
// src/components/threads/ThreadDialog/Content/index.tsx
|
|
3595
|
-
import { jsx as
|
|
3681
|
+
import { jsx as jsx67, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3596
3682
|
var Root11 = function(param) {
|
|
3597
3683
|
var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
|
|
3598
3684
|
var isOpen = useThreadDialogContext().isOpen;
|
|
3599
3685
|
if (!isOpen) return null;
|
|
3600
|
-
return /* @__PURE__ */
|
|
3686
|
+
return /* @__PURE__ */ jsx67(Flex25, {
|
|
3601
3687
|
direction: "column",
|
|
3602
3688
|
justify: "end",
|
|
3603
3689
|
position: "fixed",
|
|
@@ -3625,7 +3711,7 @@ var Root11 = function(param) {
|
|
|
3625
3711
|
style: _object_spread({
|
|
3626
3712
|
zIndex: 9999999999
|
|
3627
3713
|
}, style),
|
|
3628
|
-
children: /* @__PURE__ */
|
|
3714
|
+
children: /* @__PURE__ */ jsxs24(Card3, {
|
|
3629
3715
|
mb: {
|
|
3630
3716
|
initial: void 0,
|
|
3631
3717
|
sm: "3"
|
|
@@ -3636,7 +3722,7 @@ var Root11 = function(param) {
|
|
|
3636
3722
|
flexGrow: 1
|
|
3637
3723
|
},
|
|
3638
3724
|
children: [
|
|
3639
|
-
/* @__PURE__ */
|
|
3725
|
+
/* @__PURE__ */ jsx67(Inset, {
|
|
3640
3726
|
clip: "padding-box",
|
|
3641
3727
|
side: "all",
|
|
3642
3728
|
pb: "current",
|
|
@@ -3646,13 +3732,13 @@ var Root11 = function(param) {
|
|
|
3646
3732
|
},
|
|
3647
3733
|
children: children
|
|
3648
3734
|
}),
|
|
3649
|
-
/* @__PURE__ */
|
|
3735
|
+
/* @__PURE__ */ jsx67(Close, {})
|
|
3650
3736
|
]
|
|
3651
3737
|
})
|
|
3652
3738
|
});
|
|
3653
3739
|
};
|
|
3654
3740
|
var Messages2 = function() {
|
|
3655
|
-
return /* @__PURE__ */
|
|
3741
|
+
return /* @__PURE__ */ jsx67(Thread.Messages, {
|
|
3656
3742
|
style: {
|
|
3657
3743
|
paddingTop: "var(--space-5)",
|
|
3658
3744
|
paddingRight: "var(--space-5)",
|
|
@@ -3662,7 +3748,7 @@ var Messages2 = function() {
|
|
|
3662
3748
|
};
|
|
3663
3749
|
var FormContainer = function(param) {
|
|
3664
3750
|
var children = param.children;
|
|
3665
|
-
return /* @__PURE__ */
|
|
3751
|
+
return /* @__PURE__ */ jsx67(Flex25, {
|
|
3666
3752
|
direction: "column",
|
|
3667
3753
|
pl: "5",
|
|
3668
3754
|
pr: "5",
|
|
@@ -3671,38 +3757,38 @@ var FormContainer = function(param) {
|
|
|
3671
3757
|
children: children
|
|
3672
3758
|
});
|
|
3673
3759
|
};
|
|
3674
|
-
var
|
|
3760
|
+
var Content5 = function(param) {
|
|
3675
3761
|
var _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
|
|
3676
|
-
return /* @__PURE__ */
|
|
3762
|
+
return /* @__PURE__ */ jsx67(Root11, {
|
|
3677
3763
|
style: style,
|
|
3678
|
-
children: /* @__PURE__ */
|
|
3764
|
+
children: /* @__PURE__ */ jsxs24(Thread.Root, {
|
|
3679
3765
|
children: [
|
|
3680
|
-
/* @__PURE__ */
|
|
3681
|
-
/* @__PURE__ */
|
|
3682
|
-
children: /* @__PURE__ */
|
|
3766
|
+
/* @__PURE__ */ jsx67(Messages2, {}),
|
|
3767
|
+
/* @__PURE__ */ jsx67(FormContainer, {
|
|
3768
|
+
children: /* @__PURE__ */ jsx67(Thread.MessageForm, {})
|
|
3683
3769
|
})
|
|
3684
3770
|
]
|
|
3685
3771
|
})
|
|
3686
3772
|
});
|
|
3687
3773
|
};
|
|
3688
|
-
|
|
3689
|
-
|
|
3690
|
-
|
|
3774
|
+
Content5.Root = Root11;
|
|
3775
|
+
Content5.Messages = Messages2;
|
|
3776
|
+
Content5.FormContainer = FormContainer;
|
|
3691
3777
|
// src/components/threads/ThreadDialog/index.tsx
|
|
3692
|
-
import { jsx as
|
|
3778
|
+
import { jsx as jsx68, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3693
3779
|
var ThreadDialog = function() {
|
|
3694
|
-
return /* @__PURE__ */
|
|
3780
|
+
return /* @__PURE__ */ jsxs25(Root9, {
|
|
3695
3781
|
children: [
|
|
3696
|
-
/* @__PURE__ */
|
|
3697
|
-
/* @__PURE__ */
|
|
3782
|
+
/* @__PURE__ */ jsx68(Content5, {}),
|
|
3783
|
+
/* @__PURE__ */ jsx68(Trigger, {})
|
|
3698
3784
|
]
|
|
3699
3785
|
});
|
|
3700
3786
|
};
|
|
3701
3787
|
ThreadDialog.Root = Root9;
|
|
3702
3788
|
ThreadDialog.Trigger = Trigger;
|
|
3703
|
-
ThreadDialog.Content =
|
|
3789
|
+
ThreadDialog.Content = Content5;
|
|
3704
3790
|
// src/components/threads/AudioThread/Root/index.tsx
|
|
3705
|
-
import { Flex as
|
|
3791
|
+
import { Flex as Flex26 } from "@radix-ui/themes";
|
|
3706
3792
|
// src/contexts/threads/AudioThreadContext/index.ts
|
|
3707
3793
|
import { createContext as createContext12 } from "react";
|
|
3708
3794
|
var AudioThreadContext = createContext12({
|
|
@@ -4210,7 +4296,7 @@ var useMessageAudio = function(param) {
|
|
|
4210
4296
|
});
|
|
4211
4297
|
};
|
|
4212
4298
|
// src/components/threads/AudioThread/Root/index.tsx
|
|
4213
|
-
import { jsx as
|
|
4299
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
4214
4300
|
var Root12 = function(param) {
|
|
4215
4301
|
var children = param.children;
|
|
4216
4302
|
var createMessageProps = useCreateMessage();
|
|
@@ -4268,13 +4354,13 @@ var Root12 = function(param) {
|
|
|
4268
4354
|
createMessageProps: createMessageProps,
|
|
4269
4355
|
messageAudioProps: messageAudioProps
|
|
4270
4356
|
}).status;
|
|
4271
|
-
return /* @__PURE__ */
|
|
4357
|
+
return /* @__PURE__ */ jsx69(AudioThreadContext.Provider, {
|
|
4272
4358
|
value: {
|
|
4273
4359
|
status: status,
|
|
4274
4360
|
recorderProps: recorderProps,
|
|
4275
4361
|
messageAudioProps: messageAudioProps
|
|
4276
4362
|
},
|
|
4277
|
-
children: /* @__PURE__ */
|
|
4363
|
+
children: /* @__PURE__ */ jsx69(Flex26, {
|
|
4278
4364
|
direction: "column",
|
|
4279
4365
|
flexGrow: "1",
|
|
4280
4366
|
p: "9",
|
|
@@ -4285,7 +4371,7 @@ var Root12 = function(param) {
|
|
|
4285
4371
|
// src/components/threads/AudioThread/Visualization/index.tsx
|
|
4286
4372
|
import { useContext as useContext15, useState as useState8, useCallback as useCallback6, useEffect as useEffect10 } from "react";
|
|
4287
4373
|
import _9 from "lodash";
|
|
4288
|
-
import { Flex as
|
|
4374
|
+
import { Flex as Flex28 } from "@radix-ui/themes";
|
|
4289
4375
|
// src/hooks/threads/useAudioThreadContext/index.ts
|
|
4290
4376
|
import { useContext as useContext14 } from "react";
|
|
4291
4377
|
var useAudioThreadContext = function() {
|
|
@@ -4293,10 +4379,10 @@ var useAudioThreadContext = function() {
|
|
|
4293
4379
|
};
|
|
4294
4380
|
// src/components/threads/AudioThread/BarsVisualizer/index.tsx
|
|
4295
4381
|
import _8 from "lodash";
|
|
4296
|
-
import { Flex as
|
|
4382
|
+
import { Flex as Flex27, Grid } from "@radix-ui/themes";
|
|
4297
4383
|
import { useState as useState7, useEffect as useEffect9, useCallback as useCallback5 } from "react";
|
|
4298
4384
|
import { cluster } from "radash";
|
|
4299
|
-
import { jsx as
|
|
4385
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
4300
4386
|
var barCount = 4;
|
|
4301
4387
|
var BarsVisualizer = function(param) {
|
|
4302
4388
|
var visualizationAnalyser = param.visualizationAnalyser, backgroundColor = param.backgroundColor, height = param.height, barWidth = param.barWidth;
|
|
@@ -4327,7 +4413,7 @@ var BarsVisualizer = function(param) {
|
|
|
4327
4413
|
draw,
|
|
4328
4414
|
visualizationAnalyser
|
|
4329
4415
|
]);
|
|
4330
|
-
return /* @__PURE__ */
|
|
4416
|
+
return /* @__PURE__ */ jsx70(Grid, {
|
|
4331
4417
|
columns: "".concat(barCount),
|
|
4332
4418
|
gap: "1",
|
|
4333
4419
|
width: "auto",
|
|
@@ -4336,12 +4422,12 @@ var BarsVisualizer = function(param) {
|
|
|
4336
4422
|
gridTemplateColumns: "repeat(4, minmax(0, 1fr))"
|
|
4337
4423
|
},
|
|
4338
4424
|
children: barHeights.map(function(barHeight, index) {
|
|
4339
|
-
return /* @__PURE__ */
|
|
4425
|
+
return /* @__PURE__ */ jsx70(Flex27, {
|
|
4340
4426
|
direction: "column",
|
|
4341
4427
|
align: "center",
|
|
4342
4428
|
justify: "center",
|
|
4343
4429
|
height: height,
|
|
4344
|
-
children: /* @__PURE__ */
|
|
4430
|
+
children: /* @__PURE__ */ jsx70(Flex27, {
|
|
4345
4431
|
minHeight: "50%",
|
|
4346
4432
|
maxHeight: "100%",
|
|
4347
4433
|
height: "".concat(barHeight + 20, "%"),
|
|
@@ -4356,7 +4442,7 @@ var BarsVisualizer = function(param) {
|
|
|
4356
4442
|
});
|
|
4357
4443
|
};
|
|
4358
4444
|
// src/components/threads/AudioThread/Visualization/index.tsx
|
|
4359
|
-
import { jsx as
|
|
4445
|
+
import { jsx as jsx71, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
4360
4446
|
var Visualization = function() {
|
|
4361
4447
|
var audioThreadContext = useAudioThreadContext();
|
|
4362
4448
|
var assistantNameContext = useContext15(AssistantNameContext);
|
|
@@ -4384,14 +4470,14 @@ var Visualization = function() {
|
|
|
4384
4470
|
draw,
|
|
4385
4471
|
audioThreadContext
|
|
4386
4472
|
]);
|
|
4387
|
-
return /* @__PURE__ */
|
|
4473
|
+
return /* @__PURE__ */ jsxs26(Flex28, {
|
|
4388
4474
|
direction: "column",
|
|
4389
4475
|
align: "center",
|
|
4390
4476
|
justify: "center",
|
|
4391
4477
|
mb: "3",
|
|
4392
4478
|
flexGrow: "1",
|
|
4393
4479
|
children: [
|
|
4394
|
-
/* @__PURE__ */
|
|
4480
|
+
/* @__PURE__ */ jsx71(Flex28, {
|
|
4395
4481
|
align: "center",
|
|
4396
4482
|
justify: "center",
|
|
4397
4483
|
height: "200px",
|
|
@@ -4401,20 +4487,20 @@ var Visualization = function() {
|
|
|
4401
4487
|
borderRadius: "9999px",
|
|
4402
4488
|
scale: scale
|
|
4403
4489
|
},
|
|
4404
|
-
children: /* @__PURE__ */
|
|
4490
|
+
children: /* @__PURE__ */ jsx71(BarsVisualizer, {
|
|
4405
4491
|
visualizationAnalyser: audioThreadContext.messageAudioProps.visualizationAnalyser,
|
|
4406
4492
|
backgroundColor: audioThreadContext.status === "playing" ? "var(--accent-11)" : "var(--gray-11)",
|
|
4407
4493
|
height: "40px",
|
|
4408
4494
|
barWidth: "24px"
|
|
4409
4495
|
})
|
|
4410
4496
|
}),
|
|
4411
|
-
/* @__PURE__ */
|
|
4497
|
+
/* @__PURE__ */ jsxs26(Flex28, {
|
|
4412
4498
|
ml: "-22.5px",
|
|
4413
4499
|
gap: "3",
|
|
4414
4500
|
pt: "5",
|
|
4415
4501
|
children: [
|
|
4416
|
-
/* @__PURE__ */
|
|
4417
|
-
/* @__PURE__ */
|
|
4502
|
+
/* @__PURE__ */ jsx71(AssistantAvatar, {}),
|
|
4503
|
+
/* @__PURE__ */ jsx71(Name, {
|
|
4418
4504
|
children: assistantNameContext
|
|
4419
4505
|
})
|
|
4420
4506
|
]
|
|
@@ -4423,8 +4509,8 @@ var Visualization = function() {
|
|
|
4423
4509
|
});
|
|
4424
4510
|
};
|
|
4425
4511
|
// src/components/threads/AudioThread/Status/StatusMessages.tsx
|
|
4426
|
-
import { Flex as
|
|
4427
|
-
import { jsx as
|
|
4512
|
+
import { Flex as Flex29, Text as Text8 } from "@radix-ui/themes";
|
|
4513
|
+
import { jsx as jsx72, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
4428
4514
|
var html = function(param) {
|
|
4429
4515
|
var texts = param.texts;
|
|
4430
4516
|
return "\n .status-messages-texts:after {\n content: '".concat(texts[0], "';\n animation: texts ").concat(texts.length * 5, "s linear infinite;\n }\n\n @keyframes texts {\n ").concat(texts.map(function(_10, i) {
|
|
@@ -4433,17 +4519,17 @@ var html = function(param) {
|
|
|
4433
4519
|
};
|
|
4434
4520
|
var StatusMessages = function(param) {
|
|
4435
4521
|
var texts = param.texts;
|
|
4436
|
-
return /* @__PURE__ */
|
|
4522
|
+
return /* @__PURE__ */ jsxs27(Flex29, {
|
|
4437
4523
|
justify: "center",
|
|
4438
4524
|
pb: "5",
|
|
4439
4525
|
children: [
|
|
4440
|
-
/* @__PURE__ */
|
|
4526
|
+
/* @__PURE__ */ jsx72(Text8, {
|
|
4441
4527
|
size: "2",
|
|
4442
4528
|
weight: "regular",
|
|
4443
4529
|
color: "gray",
|
|
4444
4530
|
className: "status-messages-texts"
|
|
4445
4531
|
}),
|
|
4446
|
-
/* @__PURE__ */
|
|
4532
|
+
/* @__PURE__ */ jsx72("style", {
|
|
4447
4533
|
dangerouslySetInnerHTML: {
|
|
4448
4534
|
__html: html({
|
|
4449
4535
|
texts: texts
|
|
@@ -4454,11 +4540,11 @@ var StatusMessages = function(param) {
|
|
|
4454
4540
|
});
|
|
4455
4541
|
};
|
|
4456
4542
|
// src/components/threads/AudioThread/Status/index.tsx
|
|
4457
|
-
import { jsx as
|
|
4543
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
4458
4544
|
var Status = function() {
|
|
4459
4545
|
var audioThreadContext = useAudioThreadContext();
|
|
4460
4546
|
if (audioThreadContext.status === "recording") {
|
|
4461
|
-
return /* @__PURE__ */
|
|
4547
|
+
return /* @__PURE__ */ jsx73(StatusMessages, {
|
|
4462
4548
|
texts: [
|
|
4463
4549
|
"Start speaking",
|
|
4464
4550
|
"Listening",
|
|
@@ -4472,31 +4558,31 @@ var Status = function() {
|
|
|
4472
4558
|
"idle",
|
|
4473
4559
|
"playerPaused"
|
|
4474
4560
|
].includes(audioThreadContext.status)) {
|
|
4475
|
-
return /* @__PURE__ */
|
|
4561
|
+
return /* @__PURE__ */ jsx73(StatusMessages, {
|
|
4476
4562
|
texts: [
|
|
4477
4563
|
"Click the button below to activate"
|
|
4478
4564
|
]
|
|
4479
4565
|
});
|
|
4480
4566
|
}
|
|
4481
4567
|
if (audioThreadContext.status === "playing") {
|
|
4482
|
-
return /* @__PURE__ */
|
|
4568
|
+
return /* @__PURE__ */ jsx73(StatusMessages, {
|
|
4483
4569
|
texts: [
|
|
4484
4570
|
"Click the button below to interrupt"
|
|
4485
4571
|
]
|
|
4486
4572
|
});
|
|
4487
4573
|
}
|
|
4488
|
-
return /* @__PURE__ */
|
|
4574
|
+
return /* @__PURE__ */ jsx73(StatusMessages, {
|
|
4489
4575
|
texts: [
|
|
4490
4576
|
"Thinking"
|
|
4491
4577
|
]
|
|
4492
4578
|
});
|
|
4493
4579
|
};
|
|
4494
4580
|
// src/components/threads/AudioThread/Form/index.tsx
|
|
4495
|
-
import { Flex as
|
|
4581
|
+
import { Flex as Flex31 } from "@radix-ui/themes";
|
|
4496
4582
|
// src/components/threads/AudioThread/Form/MicIcon.tsx
|
|
4497
|
-
import { jsx as
|
|
4583
|
+
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
4498
4584
|
var MicIcon = function(props) {
|
|
4499
|
-
return /* @__PURE__ */
|
|
4585
|
+
return /* @__PURE__ */ jsx74("svg", _object_spread_props(_object_spread({
|
|
4500
4586
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4501
4587
|
fill: "currentColor",
|
|
4502
4588
|
stroke: "currentColor",
|
|
@@ -4505,54 +4591,54 @@ var MicIcon = function(props) {
|
|
|
4505
4591
|
height: "15",
|
|
4506
4592
|
width: "15"
|
|
4507
4593
|
}, props), {
|
|
4508
|
-
children: /* @__PURE__ */
|
|
4594
|
+
children: /* @__PURE__ */ jsx74("path", {
|
|
4509
4595
|
stroke: "none",
|
|
4510
4596
|
d: "M192 0c-53 0-96 43-96 96v160c0 53 43 96 96 96s96-43 96-96V96c0-53-43-96-96-96zM64 216c0-13.3-10.7-24-24-24s-24 10.7-24 24v40c0 89.1 66.2 162.7 152 174.4V464h-48c-13.3 0-24 10.7-24 24s10.7 24 24 24h144c13.3 0 24-10.7 24-24s-10.7-24-24-24h-48v-33.6c85.8-11.7 152-85.3 152-174.4v-40c0-13.3-10.7-24-24-24s-24 10.7-24 24v40c0 70.7-57.3 128-128 128S64 326.7 64 256v-40z"
|
|
4511
4597
|
})
|
|
4512
4598
|
}));
|
|
4513
4599
|
};
|
|
4514
4600
|
// src/components/threads/AudioThread/Form/ActionButton/index.tsx
|
|
4515
|
-
import { Flex as
|
|
4601
|
+
import { Flex as Flex30, IconButton as IconButton7 } from "@radix-ui/themes";
|
|
4516
4602
|
import { StopIcon as StopIcon2, PauseIcon, ArrowUpIcon as ArrowUpIcon2, ResumeIcon } from "@radix-ui/react-icons";
|
|
4517
|
-
import { jsx as
|
|
4603
|
+
import { jsx as jsx75, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
4518
4604
|
var ActionButton = function() {
|
|
4519
4605
|
var audioThreadContext = useAudioThreadContext();
|
|
4520
4606
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
4521
4607
|
if (audioThreadContext.status === "recording") {
|
|
4522
|
-
return /* @__PURE__ */
|
|
4608
|
+
return /* @__PURE__ */ jsxs28(Flex30, {
|
|
4523
4609
|
align: "center",
|
|
4524
4610
|
children: [
|
|
4525
|
-
/* @__PURE__ */
|
|
4611
|
+
/* @__PURE__ */ jsx75(Flex30, {
|
|
4526
4612
|
mr: "3",
|
|
4527
4613
|
ml: "-7",
|
|
4528
|
-
children: /* @__PURE__ */
|
|
4614
|
+
children: /* @__PURE__ */ jsx75(IconButton7, {
|
|
4529
4615
|
onClick: audioThreadContext.recorderProps.pause,
|
|
4530
4616
|
color: "gray",
|
|
4531
4617
|
variant: "soft",
|
|
4532
4618
|
size: "1",
|
|
4533
|
-
children: /* @__PURE__ */
|
|
4619
|
+
children: /* @__PURE__ */ jsx75(PauseIcon, {})
|
|
4534
4620
|
})
|
|
4535
4621
|
}),
|
|
4536
|
-
/* @__PURE__ */
|
|
4622
|
+
/* @__PURE__ */ jsx75(IconButton7, {
|
|
4537
4623
|
onClick: audioThreadContext.recorderProps.stop,
|
|
4538
4624
|
highContrast: true,
|
|
4539
4625
|
variant: "soft",
|
|
4540
4626
|
size: "4",
|
|
4541
|
-
children: /* @__PURE__ */
|
|
4627
|
+
children: /* @__PURE__ */ jsx75(ArrowUpIcon2, {})
|
|
4542
4628
|
})
|
|
4543
4629
|
]
|
|
4544
4630
|
});
|
|
4545
4631
|
}
|
|
4546
4632
|
if (audioThreadContext.status === "recorderPaused") {
|
|
4547
|
-
return /* @__PURE__ */
|
|
4633
|
+
return /* @__PURE__ */ jsx75(IconButton7, {
|
|
4548
4634
|
onClick: audioThreadContext.recorderProps.resume,
|
|
4549
4635
|
color: "red",
|
|
4550
4636
|
size: "4",
|
|
4551
|
-
children: /* @__PURE__ */
|
|
4637
|
+
children: /* @__PURE__ */ jsx75(ResumeIcon, {})
|
|
4552
4638
|
});
|
|
4553
4639
|
}
|
|
4554
4640
|
if (audioThreadContext.status === "idle") {
|
|
4555
|
-
return /* @__PURE__ */
|
|
4641
|
+
return /* @__PURE__ */ jsx75(IconButton7, {
|
|
4556
4642
|
onClick: function() {
|
|
4557
4643
|
return audioThreadContext.recorderProps.start();
|
|
4558
4644
|
},
|
|
@@ -4561,7 +4647,7 @@ var ActionButton = function() {
|
|
|
4561
4647
|
});
|
|
4562
4648
|
}
|
|
4563
4649
|
if (audioThreadContext.status === "playing") {
|
|
4564
|
-
return /* @__PURE__ */
|
|
4650
|
+
return /* @__PURE__ */ jsx75(IconButton7, {
|
|
4565
4651
|
onClick: function() {
|
|
4566
4652
|
var _superinterfaceContext_createMessageAbortControllerRef_current;
|
|
4567
4653
|
audioThreadContext.messageAudioProps.stop();
|
|
@@ -4571,54 +4657,54 @@ var ActionButton = function() {
|
|
|
4571
4657
|
size: "4",
|
|
4572
4658
|
color: "gray",
|
|
4573
4659
|
variant: "soft",
|
|
4574
|
-
children: /* @__PURE__ */
|
|
4660
|
+
children: /* @__PURE__ */ jsx75(StopIcon2, {})
|
|
4575
4661
|
});
|
|
4576
4662
|
}
|
|
4577
4663
|
if (audioThreadContext.status === "playerPaused") {
|
|
4578
|
-
return /* @__PURE__ */
|
|
4664
|
+
return /* @__PURE__ */ jsx75(IconButton7, {
|
|
4579
4665
|
onClick: function() {
|
|
4580
4666
|
return audioThreadContext.messageAudioProps.play();
|
|
4581
4667
|
},
|
|
4582
4668
|
size: "4",
|
|
4583
|
-
children: /* @__PURE__ */
|
|
4669
|
+
children: /* @__PURE__ */ jsx75(ResumeIcon, {})
|
|
4584
4670
|
});
|
|
4585
4671
|
}
|
|
4586
|
-
return /* @__PURE__ */
|
|
4672
|
+
return /* @__PURE__ */ jsx75(IconButton7, {
|
|
4587
4673
|
size: "4",
|
|
4588
4674
|
variant: "soft",
|
|
4589
4675
|
disabled: true
|
|
4590
4676
|
});
|
|
4591
4677
|
};
|
|
4592
4678
|
// src/components/threads/AudioThread/Form/index.tsx
|
|
4593
|
-
import { jsx as
|
|
4679
|
+
import { jsx as jsx76, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
4594
4680
|
var Form = function() {
|
|
4595
4681
|
var audioThreadContext = useAudioThreadContext();
|
|
4596
|
-
return /* @__PURE__ */
|
|
4682
|
+
return /* @__PURE__ */ jsxs29(Flex31, {
|
|
4597
4683
|
direction: "column",
|
|
4598
4684
|
align: "center",
|
|
4599
4685
|
children: [
|
|
4600
|
-
/* @__PURE__ */
|
|
4686
|
+
/* @__PURE__ */ jsxs29(Flex31, {
|
|
4601
4687
|
pb: "3",
|
|
4602
4688
|
align: "center",
|
|
4603
4689
|
children: [
|
|
4604
|
-
/* @__PURE__ */
|
|
4690
|
+
/* @__PURE__ */ jsx76(Flex31, {
|
|
4605
4691
|
ml: "-22.5px",
|
|
4606
4692
|
mr: "2",
|
|
4607
4693
|
align: "center",
|
|
4608
|
-
children: /* @__PURE__ */
|
|
4694
|
+
children: /* @__PURE__ */ jsx76(MicIcon, {
|
|
4609
4695
|
style: {
|
|
4610
4696
|
color: audioThreadContext.status === "recording" ? "var(--accent-11)" : "var(--gray-11)"
|
|
4611
4697
|
}
|
|
4612
4698
|
})
|
|
4613
4699
|
}),
|
|
4614
|
-
/* @__PURE__ */
|
|
4700
|
+
/* @__PURE__ */ jsx76(Flex31, {
|
|
4615
4701
|
px: "2",
|
|
4616
4702
|
py: "1",
|
|
4617
4703
|
style: {
|
|
4618
4704
|
backgroundColor: audioThreadContext.status === "recording" ? "var(--accent-4)" : "var(--gray-4)",
|
|
4619
4705
|
borderRadius: "var(--radius-6)"
|
|
4620
4706
|
},
|
|
4621
|
-
children: /* @__PURE__ */
|
|
4707
|
+
children: /* @__PURE__ */ jsx76(BarsVisualizer, {
|
|
4622
4708
|
visualizationAnalyser: audioThreadContext.recorderProps.visualizationAnalyser,
|
|
4623
4709
|
backgroundColor: audioThreadContext.status === "recording" ? "var(--accent-11)" : "var(--gray-11)",
|
|
4624
4710
|
height: "20px",
|
|
@@ -4627,18 +4713,18 @@ var Form = function() {
|
|
|
4627
4713
|
})
|
|
4628
4714
|
]
|
|
4629
4715
|
}),
|
|
4630
|
-
/* @__PURE__ */
|
|
4716
|
+
/* @__PURE__ */ jsx76(ActionButton, {})
|
|
4631
4717
|
]
|
|
4632
4718
|
});
|
|
4633
4719
|
};
|
|
4634
4720
|
// src/components/threads/AudioThread/index.tsx
|
|
4635
|
-
import { jsx as
|
|
4721
|
+
import { jsx as jsx77, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
4636
4722
|
var AudioThread = function(props) {
|
|
4637
|
-
return /* @__PURE__ */
|
|
4723
|
+
return /* @__PURE__ */ jsxs30(Root12, _object_spread_props(_object_spread({}, props), {
|
|
4638
4724
|
children: [
|
|
4639
|
-
/* @__PURE__ */
|
|
4640
|
-
/* @__PURE__ */
|
|
4641
|
-
/* @__PURE__ */
|
|
4725
|
+
/* @__PURE__ */ jsx77(Visualization, {}),
|
|
4726
|
+
/* @__PURE__ */ jsx77(Status, {}),
|
|
4727
|
+
/* @__PURE__ */ jsx77(Form, {})
|
|
4642
4728
|
]
|
|
4643
4729
|
}));
|
|
4644
4730
|
};
|
|
@@ -4646,35 +4732,35 @@ AudioThread.Root = Root12;
|
|
|
4646
4732
|
AudioThread.Visualization = Visualization;
|
|
4647
4733
|
AudioThread.Form = Form;
|
|
4648
4734
|
// src/components/threads/AudioThreadDialog/index.tsx
|
|
4649
|
-
import { jsx as
|
|
4735
|
+
import { jsx as jsx78, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
4650
4736
|
var AudioThreadDialog = function() {
|
|
4651
|
-
return /* @__PURE__ */
|
|
4737
|
+
return /* @__PURE__ */ jsxs31(Root9, {
|
|
4652
4738
|
children: [
|
|
4653
|
-
/* @__PURE__ */
|
|
4654
|
-
children: /* @__PURE__ */
|
|
4739
|
+
/* @__PURE__ */ jsx78(Content5.Root, {
|
|
4740
|
+
children: /* @__PURE__ */ jsx78(AudioThread, {})
|
|
4655
4741
|
}),
|
|
4656
|
-
/* @__PURE__ */
|
|
4742
|
+
/* @__PURE__ */ jsx78(Trigger, {})
|
|
4657
4743
|
]
|
|
4658
4744
|
});
|
|
4659
4745
|
};
|
|
4660
4746
|
AudioThreadDialog.Root = Root9;
|
|
4661
4747
|
AudioThreadDialog.Trigger = Trigger;
|
|
4662
|
-
AudioThreadDialog.Content =
|
|
4748
|
+
AudioThreadDialog.Content = Content5;
|
|
4663
4749
|
// src/components/suggestions/Suggestions/index.tsx
|
|
4664
4750
|
import { useMemo as useMemo15 } from "react";
|
|
4665
4751
|
// src/components/suggestions/Suggestions/Content.tsx
|
|
4666
4752
|
import { useMemo as useMemo14 } from "react";
|
|
4667
4753
|
import { isEmpty as isEmpty3 } from "radash";
|
|
4668
4754
|
import { onlyText } from "react-children-utilities";
|
|
4669
|
-
import { Flex as
|
|
4755
|
+
import { Flex as Flex32 } from "@radix-ui/themes";
|
|
4670
4756
|
// src/components/suggestions/Suggestions/Item.tsx
|
|
4671
4757
|
import { ArrowUpIcon as ArrowUpIcon3 } from "@radix-ui/react-icons";
|
|
4672
|
-
import { Text as
|
|
4673
|
-
import { jsx as
|
|
4758
|
+
import { Text as Text9, Button as Button4, Spinner as Spinner2 } from "@radix-ui/themes";
|
|
4759
|
+
import { jsx as jsx79, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
4674
4760
|
var Item = function(param) {
|
|
4675
4761
|
var suggestion = param.suggestion, isDisabled = param.isDisabled;
|
|
4676
4762
|
var _useCreateMessage = useCreateMessage(), createMessage = _useCreateMessage.createMessage, isPending = _useCreateMessage.isPending;
|
|
4677
|
-
return /* @__PURE__ */
|
|
4763
|
+
return /* @__PURE__ */ jsx79(Content6, {
|
|
4678
4764
|
onClick: function() {
|
|
4679
4765
|
createMessage({
|
|
4680
4766
|
// @ts-ignore-next-line
|
|
@@ -4686,9 +4772,9 @@ var Item = function(param) {
|
|
|
4686
4772
|
children: suggestion
|
|
4687
4773
|
});
|
|
4688
4774
|
};
|
|
4689
|
-
var
|
|
4775
|
+
var Content6 = function(param) {
|
|
4690
4776
|
var onClick = param.onClick, isDisabled = param.isDisabled, isPending = param.isPending, children = param.children;
|
|
4691
|
-
return /* @__PURE__ */
|
|
4777
|
+
return /* @__PURE__ */ jsxs32(Button4, {
|
|
4692
4778
|
variant: "soft",
|
|
4693
4779
|
onClick: onClick,
|
|
4694
4780
|
disabled: isDisabled,
|
|
@@ -4698,14 +4784,14 @@ var Content5 = function(param) {
|
|
|
4698
4784
|
flexShrink: 1
|
|
4699
4785
|
},
|
|
4700
4786
|
children: [
|
|
4701
|
-
/* @__PURE__ */
|
|
4787
|
+
/* @__PURE__ */ jsx79(Text9, {
|
|
4702
4788
|
size: "1",
|
|
4703
4789
|
weight: "regular",
|
|
4704
4790
|
children: children
|
|
4705
4791
|
}),
|
|
4706
|
-
/* @__PURE__ */
|
|
4792
|
+
/* @__PURE__ */ jsx79(Spinner2, {
|
|
4707
4793
|
loading: isPending,
|
|
4708
|
-
children: /* @__PURE__ */
|
|
4794
|
+
children: /* @__PURE__ */ jsx79(ArrowUpIcon3, {
|
|
4709
4795
|
style: {
|
|
4710
4796
|
flexShrink: 0
|
|
4711
4797
|
}
|
|
@@ -4714,10 +4800,10 @@ var Content5 = function(param) {
|
|
|
4714
4800
|
]
|
|
4715
4801
|
});
|
|
4716
4802
|
};
|
|
4717
|
-
Item.Content =
|
|
4803
|
+
Item.Content = Content6;
|
|
4718
4804
|
// src/components/suggestions/Suggestions/Content.tsx
|
|
4719
|
-
import { jsx as
|
|
4720
|
-
var
|
|
4805
|
+
import { jsx as jsx80 } from "react/jsx-runtime";
|
|
4806
|
+
var Content7 = function(param) {
|
|
4721
4807
|
var children = param.children;
|
|
4722
4808
|
var isMutatingMessage = useIsMutatingMessage();
|
|
4723
4809
|
var suggestions = useMemo14(function() {
|
|
@@ -4730,12 +4816,12 @@ var Content6 = function(param) {
|
|
|
4730
4816
|
children
|
|
4731
4817
|
]);
|
|
4732
4818
|
if (isEmpty3(suggestions)) return null;
|
|
4733
|
-
return /* @__PURE__ */
|
|
4819
|
+
return /* @__PURE__ */ jsx80(Flex32, {
|
|
4734
4820
|
gap: "2",
|
|
4735
4821
|
py: "2",
|
|
4736
4822
|
wrap: "wrap",
|
|
4737
4823
|
children: suggestions.map(function(suggestion) {
|
|
4738
|
-
return /* @__PURE__ */
|
|
4824
|
+
return /* @__PURE__ */ jsx80(Item, {
|
|
4739
4825
|
suggestion: suggestion,
|
|
4740
4826
|
isDisabled: isMutatingMessage
|
|
4741
4827
|
}, suggestion);
|
|
@@ -4743,7 +4829,7 @@ var Content6 = function(param) {
|
|
|
4743
4829
|
});
|
|
4744
4830
|
};
|
|
4745
4831
|
// src/components/suggestions/Suggestions/index.tsx
|
|
4746
|
-
import { jsx as
|
|
4832
|
+
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
4747
4833
|
var Suggestions = function(param) {
|
|
4748
4834
|
var children = param.children;
|
|
4749
4835
|
var latestMessageProps = useLatestMessage();
|
|
@@ -4756,14 +4842,14 @@ var Suggestions = function(param) {
|
|
|
4756
4842
|
]);
|
|
4757
4843
|
if (latestMessageProps.isLoading) return null;
|
|
4758
4844
|
if (isDisabled) return null;
|
|
4759
|
-
return /* @__PURE__ */
|
|
4845
|
+
return /* @__PURE__ */ jsx81(Content7, {
|
|
4760
4846
|
children: children
|
|
4761
4847
|
});
|
|
4762
4848
|
};
|
|
4763
4849
|
Suggestions.Item = Item;
|
|
4764
4850
|
// src/components/markdown/MarkdownProvider/index.tsx
|
|
4765
4851
|
import { useMemo as useMemo16 } from "react";
|
|
4766
|
-
import { jsx as
|
|
4852
|
+
import { jsx as jsx82 } from "react/jsx-runtime";
|
|
4767
4853
|
var MarkdownProvider = function(_param) {
|
|
4768
4854
|
var children = _param.children, rest = _object_without_properties(_param, [
|
|
4769
4855
|
"children"
|
|
@@ -4775,7 +4861,7 @@ var MarkdownProvider = function(_param) {
|
|
|
4775
4861
|
rest,
|
|
4776
4862
|
prevMarkdownContext
|
|
4777
4863
|
]);
|
|
4778
|
-
return /* @__PURE__ */
|
|
4864
|
+
return /* @__PURE__ */ jsx82(MarkdownContext.Provider, {
|
|
4779
4865
|
value: value,
|
|
4780
4866
|
children: children
|
|
4781
4867
|
});
|
|
@@ -4834,11 +4920,11 @@ var optimizedSrc = function(param) {
|
|
|
4834
4920
|
}));
|
|
4835
4921
|
};
|
|
4836
4922
|
// src/components/imageAvatars/ImageAvatar/index.tsx
|
|
4837
|
-
import { jsx as
|
|
4923
|
+
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
4838
4924
|
var ImageAvatar = function(param) {
|
|
4839
4925
|
var imageAvatar = param.imageAvatar, size = param.size;
|
|
4840
4926
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
4841
|
-
return /* @__PURE__ */
|
|
4927
|
+
return /* @__PURE__ */ jsx83(Avatar4, {
|
|
4842
4928
|
fallback: "",
|
|
4843
4929
|
src: optimizedSrc({
|
|
4844
4930
|
imageAvatar: imageAvatar,
|
|
@@ -4856,7 +4942,7 @@ import { BackpackIcon, RocketIcon, MagicWandIcon, CubeIcon, TargetIcon, DiscIcon
|
|
|
4856
4942
|
var _obj;
|
|
4857
4943
|
var iconAvatarComponents = (_obj = {}, _define_property(_obj, "BACKPACK" /* BACKPACK */ , BackpackIcon), _define_property(_obj, "ROCKET" /* ROCKET */ , RocketIcon), _define_property(_obj, "MAGIC_WAND" /* MAGIC_WAND */ , MagicWandIcon), _define_property(_obj, "CUBE" /* CUBE */ , CubeIcon), _define_property(_obj, "TARGET" /* TARGET */ , TargetIcon), _define_property(_obj, "DISC" /* DISC */ , DiscIcon), _define_property(_obj, "GLOBE" /* GLOBE */ , GlobeIcon), _define_property(_obj, "STAR" /* STAR */ , StarIcon), _define_property(_obj, "LIGHTNING_BOLT" /* LIGHTNING_BOLT */ , LightningBoltIcon2), _define_property(_obj, "FACE" /* FACE */ , FaceIcon), _define_property(_obj, "PERSON" /* PERSON */ , PersonIcon2), _define_property(_obj, "HEART" /* HEART */ , HeartIcon), _obj);
|
|
4858
4944
|
// src/components/iconAvatars/IconAvatar.tsx
|
|
4859
|
-
import { jsx as
|
|
4945
|
+
import { jsx as jsx84 } from "react/jsx-runtime";
|
|
4860
4946
|
var IconAvatar = function(param) {
|
|
4861
4947
|
var iconAvatar = param.iconAvatar, size = param.size;
|
|
4862
4948
|
var Component = useMemo17(function() {
|
|
@@ -4864,30 +4950,30 @@ var IconAvatar = function(param) {
|
|
|
4864
4950
|
}, [
|
|
4865
4951
|
iconAvatar
|
|
4866
4952
|
]);
|
|
4867
|
-
return /* @__PURE__ */
|
|
4953
|
+
return /* @__PURE__ */ jsx84(Avatar5, {
|
|
4868
4954
|
size: size,
|
|
4869
|
-
fallback: Component ? /* @__PURE__ */
|
|
4955
|
+
fallback: Component ? /* @__PURE__ */ jsx84(Component, {}) : ""
|
|
4870
4956
|
});
|
|
4871
4957
|
};
|
|
4872
4958
|
// src/components/avatars/Avatar.tsx
|
|
4873
|
-
import { jsx as
|
|
4959
|
+
import { jsx as jsx85 } from "react/jsx-runtime";
|
|
4874
4960
|
var Avatar6 = function(param) {
|
|
4875
4961
|
var avatar = param.avatar, _param_size = param.size, size = _param_size === void 0 ? "1" : _param_size;
|
|
4876
4962
|
if (avatar) {
|
|
4877
4963
|
if (avatar.type === "IMAGE" /* IMAGE */ && avatar.imageAvatar) {
|
|
4878
|
-
return /* @__PURE__ */
|
|
4964
|
+
return /* @__PURE__ */ jsx85(ImageAvatar, {
|
|
4879
4965
|
imageAvatar: avatar.imageAvatar,
|
|
4880
4966
|
size: size
|
|
4881
4967
|
});
|
|
4882
4968
|
}
|
|
4883
4969
|
if (avatar.type === "ICON" /* ICON */ && avatar.iconAvatar) {
|
|
4884
|
-
return /* @__PURE__ */
|
|
4970
|
+
return /* @__PURE__ */ jsx85(IconAvatar, {
|
|
4885
4971
|
iconAvatar: avatar.iconAvatar,
|
|
4886
4972
|
size: size
|
|
4887
4973
|
});
|
|
4888
4974
|
}
|
|
4889
4975
|
}
|
|
4890
|
-
return /* @__PURE__ */
|
|
4976
|
+
return /* @__PURE__ */ jsx85(RadixAvatar, {
|
|
4891
4977
|
fallback: "",
|
|
4892
4978
|
size: size
|
|
4893
4979
|
});
|
|
@@ -4900,7 +4986,7 @@ var useComponents = function() {
|
|
|
4900
4986
|
return useContext16(ComponentsContext);
|
|
4901
4987
|
};
|
|
4902
4988
|
// src/components/components/ComponentsProvider.tsx
|
|
4903
|
-
import { jsx as
|
|
4989
|
+
import { jsx as jsx86 } from "react/jsx-runtime";
|
|
4904
4990
|
var ComponentsProvider = function(_param) {
|
|
4905
4991
|
var children = _param.children, rest = _object_without_properties(_param, [
|
|
4906
4992
|
"children"
|
|
@@ -4912,7 +4998,7 @@ var ComponentsProvider = function(_param) {
|
|
|
4912
4998
|
rest,
|
|
4913
4999
|
prevComponents
|
|
4914
5000
|
]);
|
|
4915
|
-
return /* @__PURE__ */
|
|
5001
|
+
return /* @__PURE__ */ jsx86(ComponentsContext.Provider, {
|
|
4916
5002
|
value: value,
|
|
4917
5003
|
children: children
|
|
4918
5004
|
});
|