@superinterface/react 2.19.2 → 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 +521 -391
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +18 -4
- package/dist/index.d.ts +18 -4
- package/dist/index.js +517 -387
- 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
|
})
|
|
@@ -1175,14 +1216,16 @@ import Markdown from "react-markdown";
|
|
|
1175
1216
|
import { useContext as useContext7 } from "react";
|
|
1176
1217
|
// src/contexts/markdown/MarkdownContext/index.ts
|
|
1177
1218
|
import { createContext as createContext9 } from "react";
|
|
1219
|
+
// src/contexts/markdown/MarkdownContext/lib/components/index.tsx
|
|
1220
|
+
import { Heading } from "@radix-ui/themes";
|
|
1178
1221
|
// src/contexts/markdown/MarkdownContext/lib/components/Paragraph.tsx
|
|
1179
|
-
import { Box as
|
|
1180
|
-
import { jsx as
|
|
1222
|
+
import { Box as Box4, Text as Text4 } from "@radix-ui/themes";
|
|
1223
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
1181
1224
|
var Paragraph = function(param) {
|
|
1182
1225
|
var children = param.children;
|
|
1183
|
-
return /* @__PURE__ */
|
|
1226
|
+
return /* @__PURE__ */ jsx26(Box4, {
|
|
1184
1227
|
pb: "3",
|
|
1185
|
-
children: /* @__PURE__ */
|
|
1228
|
+
children: /* @__PURE__ */ jsx26(Text4, {
|
|
1186
1229
|
size: "3",
|
|
1187
1230
|
style: {
|
|
1188
1231
|
whiteSpace: "pre-line",
|
|
@@ -1194,23 +1237,25 @@ var Paragraph = function(param) {
|
|
|
1194
1237
|
};
|
|
1195
1238
|
// src/contexts/markdown/MarkdownContext/lib/components/Link.tsx
|
|
1196
1239
|
import { Link as RadixLink } from "@radix-ui/themes";
|
|
1197
|
-
import { jsx as
|
|
1240
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
1198
1241
|
var Link = function(param) {
|
|
1199
|
-
var children = param.children, href = param.href;
|
|
1200
|
-
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, {
|
|
1201
1244
|
href: href,
|
|
1245
|
+
target: target,
|
|
1246
|
+
download: download,
|
|
1202
1247
|
children: children
|
|
1203
1248
|
});
|
|
1204
1249
|
};
|
|
1205
1250
|
// src/contexts/markdown/MarkdownContext/lib/components/UnorderedList.tsx
|
|
1206
|
-
import { Box as
|
|
1207
|
-
import { jsx as
|
|
1251
|
+
import { Box as Box5 } from "@radix-ui/themes";
|
|
1252
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
1208
1253
|
var UnorderedList = function(param) {
|
|
1209
1254
|
var children = param.children;
|
|
1210
|
-
return /* @__PURE__ */
|
|
1255
|
+
return /* @__PURE__ */ jsx28(Box5, {
|
|
1211
1256
|
pb: "3",
|
|
1212
1257
|
asChild: true,
|
|
1213
|
-
children: /* @__PURE__ */
|
|
1258
|
+
children: /* @__PURE__ */ jsx28("ul", {
|
|
1214
1259
|
style: {
|
|
1215
1260
|
listStylePosition: "inside"
|
|
1216
1261
|
},
|
|
@@ -1219,14 +1264,14 @@ var UnorderedList = function(param) {
|
|
|
1219
1264
|
});
|
|
1220
1265
|
};
|
|
1221
1266
|
// src/contexts/markdown/MarkdownContext/lib/components/OrderedList.tsx
|
|
1222
|
-
import { Box as
|
|
1223
|
-
import { jsx as
|
|
1267
|
+
import { Box as Box6 } from "@radix-ui/themes";
|
|
1268
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
1224
1269
|
var OrderedList = function(param) {
|
|
1225
1270
|
var children = param.children;
|
|
1226
|
-
return /* @__PURE__ */
|
|
1271
|
+
return /* @__PURE__ */ jsx29(Box6, {
|
|
1227
1272
|
pb: "3",
|
|
1228
1273
|
asChild: true,
|
|
1229
|
-
children: /* @__PURE__ */
|
|
1274
|
+
children: /* @__PURE__ */ jsx29("ol", {
|
|
1230
1275
|
style: {
|
|
1231
1276
|
listStylePosition: "inside"
|
|
1232
1277
|
},
|
|
@@ -1235,32 +1280,32 @@ var OrderedList = function(param) {
|
|
|
1235
1280
|
});
|
|
1236
1281
|
};
|
|
1237
1282
|
// src/contexts/markdown/MarkdownContext/lib/components/ListItem.tsx
|
|
1238
|
-
import { Box as
|
|
1239
|
-
import { jsx as
|
|
1283
|
+
import { Box as Box7 } from "@radix-ui/themes";
|
|
1284
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
1240
1285
|
var ListItem = function(param) {
|
|
1241
1286
|
var children = param.children;
|
|
1242
|
-
return /* @__PURE__ */
|
|
1287
|
+
return /* @__PURE__ */ jsx30(Box7, {
|
|
1243
1288
|
pb: "1",
|
|
1244
|
-
children: /* @__PURE__ */
|
|
1289
|
+
children: /* @__PURE__ */ jsx30("li", {
|
|
1245
1290
|
children: children
|
|
1246
1291
|
})
|
|
1247
1292
|
});
|
|
1248
1293
|
};
|
|
1249
1294
|
// src/contexts/markdown/MarkdownContext/lib/components/Strong.tsx
|
|
1250
1295
|
import { Strong as RadixStrong } from "@radix-ui/themes";
|
|
1251
|
-
import { jsx as
|
|
1296
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
1252
1297
|
var Strong = function(param) {
|
|
1253
1298
|
var children = param.children;
|
|
1254
|
-
return /* @__PURE__ */
|
|
1299
|
+
return /* @__PURE__ */ jsx31(RadixStrong, {
|
|
1255
1300
|
children: children
|
|
1256
1301
|
});
|
|
1257
1302
|
};
|
|
1258
1303
|
// src/contexts/markdown/MarkdownContext/lib/components/Pre.tsx
|
|
1259
|
-
import { Box as
|
|
1260
|
-
import { jsx as
|
|
1304
|
+
import { Box as Box8 } from "@radix-ui/themes";
|
|
1305
|
+
import { jsx as jsx32 } from "react/jsx-runtime";
|
|
1261
1306
|
var Pre = function(param) {
|
|
1262
1307
|
var children = param.children;
|
|
1263
|
-
return /* @__PURE__ */
|
|
1308
|
+
return /* @__PURE__ */ jsx32(Box8, {
|
|
1264
1309
|
style: {
|
|
1265
1310
|
whiteSpace: "pre-wrap",
|
|
1266
1311
|
wordBreak: "break-word"
|
|
@@ -1270,20 +1315,20 @@ var Pre = function(param) {
|
|
|
1270
1315
|
};
|
|
1271
1316
|
// src/contexts/markdown/MarkdownContext/lib/components/Code.tsx
|
|
1272
1317
|
import { Code as RadixCode } from "@radix-ui/themes";
|
|
1273
|
-
import { jsx as
|
|
1274
|
-
var
|
|
1318
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
1319
|
+
var Code3 = function(param) {
|
|
1275
1320
|
var children = param.children;
|
|
1276
|
-
return /* @__PURE__ */
|
|
1321
|
+
return /* @__PURE__ */ jsx33(RadixCode, {
|
|
1277
1322
|
children: children
|
|
1278
1323
|
});
|
|
1279
1324
|
};
|
|
1280
1325
|
// src/contexts/markdown/MarkdownContext/lib/components/Img.tsx
|
|
1281
|
-
import { Box as
|
|
1282
|
-
import { jsx as
|
|
1326
|
+
import { Box as Box9 } from "@radix-ui/themes";
|
|
1327
|
+
import { jsx as jsx34 } from "react/jsx-runtime";
|
|
1283
1328
|
var Img = function(props) {
|
|
1284
|
-
return /* @__PURE__ */
|
|
1329
|
+
return /* @__PURE__ */ jsx34(Box9, {
|
|
1285
1330
|
pb: "3",
|
|
1286
|
-
children: /* @__PURE__ */
|
|
1331
|
+
children: /* @__PURE__ */ jsx34("img", _object_spread_props(_object_spread({}, props), {
|
|
1287
1332
|
style: {
|
|
1288
1333
|
maxWidth: "100%",
|
|
1289
1334
|
height: "auto"
|
|
@@ -1292,27 +1337,27 @@ var Img = function(props) {
|
|
|
1292
1337
|
});
|
|
1293
1338
|
};
|
|
1294
1339
|
// src/contexts/markdown/MarkdownContext/lib/components/Annotation/index.tsx
|
|
1295
|
-
import { QuoteIcon
|
|
1340
|
+
import { QuoteIcon } from "@radix-ui/react-icons";
|
|
1296
1341
|
// src/contexts/markdown/MarkdownContext/lib/components/Annotation/AnnotationBase.tsx
|
|
1297
|
-
import { IconButton, Popover as
|
|
1298
|
-
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";
|
|
1299
1344
|
var AnnotationBase = function(param) {
|
|
1300
1345
|
var icon = param.icon, content = param.content;
|
|
1301
|
-
return /* @__PURE__ */
|
|
1346
|
+
return /* @__PURE__ */ jsxs10(Popover4.Root, {
|
|
1302
1347
|
children: [
|
|
1303
|
-
/* @__PURE__ */
|
|
1304
|
-
children: /* @__PURE__ */
|
|
1348
|
+
/* @__PURE__ */ jsx35(Popover4.Trigger, {
|
|
1349
|
+
children: /* @__PURE__ */ jsx35(IconButton, {
|
|
1305
1350
|
variant: "soft",
|
|
1306
1351
|
color: "gray",
|
|
1307
1352
|
size: "1",
|
|
1308
1353
|
children: icon
|
|
1309
1354
|
})
|
|
1310
1355
|
}),
|
|
1311
|
-
/* @__PURE__ */
|
|
1356
|
+
/* @__PURE__ */ jsx35(Popover4.Content, {
|
|
1312
1357
|
size: "1",
|
|
1313
|
-
children: /* @__PURE__ */
|
|
1358
|
+
children: /* @__PURE__ */ jsx35(Flex11, {
|
|
1314
1359
|
direction: "column",
|
|
1315
|
-
children: /* @__PURE__ */
|
|
1360
|
+
children: /* @__PURE__ */ jsx35(Text5, {
|
|
1316
1361
|
size: "1",
|
|
1317
1362
|
color: "gray",
|
|
1318
1363
|
children: content
|
|
@@ -1322,24 +1367,38 @@ var AnnotationBase = function(param) {
|
|
|
1322
1367
|
]
|
|
1323
1368
|
});
|
|
1324
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
|
+
};
|
|
1325
1383
|
// src/contexts/markdown/MarkdownContext/lib/components/Annotation/index.tsx
|
|
1326
|
-
import { jsx as
|
|
1384
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
1327
1385
|
var Annotation = function(param) {
|
|
1328
|
-
var annotation = param.annotation;
|
|
1386
|
+
var annotation = param.annotation, children = param.children;
|
|
1329
1387
|
if (annotation.type === "file_citation") {
|
|
1330
|
-
return /* @__PURE__ */
|
|
1331
|
-
icon: /* @__PURE__ */
|
|
1388
|
+
return /* @__PURE__ */ jsx37(AnnotationBase, {
|
|
1389
|
+
icon: /* @__PURE__ */ jsx37(QuoteIcon, {}),
|
|
1332
1390
|
content: "File cited."
|
|
1333
1391
|
});
|
|
1334
1392
|
} else if (annotation.type === "file_path") {
|
|
1335
|
-
return /* @__PURE__ */
|
|
1336
|
-
|
|
1337
|
-
|
|
1393
|
+
return /* @__PURE__ */ jsx37(FilePathAnnotation, {
|
|
1394
|
+
annotation: annotation,
|
|
1395
|
+
children: children
|
|
1338
1396
|
});
|
|
1339
1397
|
}
|
|
1340
1398
|
return null;
|
|
1341
1399
|
};
|
|
1342
1400
|
// src/contexts/markdown/MarkdownContext/lib/components/index.tsx
|
|
1401
|
+
import { jsx as jsx38 } from "react/jsx-runtime";
|
|
1343
1402
|
var components = {
|
|
1344
1403
|
p: Paragraph,
|
|
1345
1404
|
a: Link,
|
|
@@ -1348,20 +1407,70 @@ var components = {
|
|
|
1348
1407
|
ol: OrderedList,
|
|
1349
1408
|
li: ListItem,
|
|
1350
1409
|
pre: Pre,
|
|
1351
|
-
code:
|
|
1410
|
+
code: Code3,
|
|
1352
1411
|
img: Img,
|
|
1353
|
-
annotation: Annotation
|
|
1412
|
+
annotation: Annotation,
|
|
1413
|
+
h1: function(props) {
|
|
1414
|
+
return /* @__PURE__ */ jsx38(Heading, {
|
|
1415
|
+
as: "h1",
|
|
1416
|
+
children: props.children
|
|
1417
|
+
});
|
|
1418
|
+
},
|
|
1419
|
+
h2: function(props) {
|
|
1420
|
+
return /* @__PURE__ */ jsx38(Heading, {
|
|
1421
|
+
as: "h2",
|
|
1422
|
+
size: "5",
|
|
1423
|
+
children: props.children
|
|
1424
|
+
});
|
|
1425
|
+
},
|
|
1426
|
+
h3: function(props) {
|
|
1427
|
+
return /* @__PURE__ */ jsx38(Heading, {
|
|
1428
|
+
as: "h3",
|
|
1429
|
+
size: "4",
|
|
1430
|
+
children: props.children
|
|
1431
|
+
});
|
|
1432
|
+
},
|
|
1433
|
+
h4: function(props) {
|
|
1434
|
+
return /* @__PURE__ */ jsx38(Heading, {
|
|
1435
|
+
as: "h4",
|
|
1436
|
+
size: "3",
|
|
1437
|
+
children: props.children
|
|
1438
|
+
});
|
|
1439
|
+
},
|
|
1440
|
+
h5: function(props) {
|
|
1441
|
+
return /* @__PURE__ */ jsx38(Heading, {
|
|
1442
|
+
as: "h5",
|
|
1443
|
+
size: "3",
|
|
1444
|
+
children: props.children
|
|
1445
|
+
});
|
|
1446
|
+
},
|
|
1447
|
+
h6: function(props) {
|
|
1448
|
+
return /* @__PURE__ */ jsx38(Heading, {
|
|
1449
|
+
as: "h6",
|
|
1450
|
+
size: "3",
|
|
1451
|
+
children: props.children
|
|
1452
|
+
});
|
|
1453
|
+
}
|
|
1354
1454
|
};
|
|
1355
1455
|
// src/lib/remark/remarkAnnotation.ts
|
|
1356
1456
|
import { isNumber } from "radash";
|
|
1357
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
|
+
};
|
|
1358
1464
|
var remarkAnnotation = function(param) {
|
|
1359
1465
|
var content = param.content;
|
|
1360
1466
|
return function() {
|
|
1361
1467
|
return function(tree) {
|
|
1362
1468
|
flatMap(tree, function(node) {
|
|
1363
1469
|
var _content_text_annotations, _content_text;
|
|
1364
|
-
if (
|
|
1470
|
+
if (![
|
|
1471
|
+
"text",
|
|
1472
|
+
"link"
|
|
1473
|
+
].includes(node.type)) {
|
|
1365
1474
|
return [
|
|
1366
1475
|
node
|
|
1367
1476
|
];
|
|
@@ -1389,16 +1498,35 @@ var remarkAnnotation = function(param) {
|
|
|
1389
1498
|
];
|
|
1390
1499
|
}
|
|
1391
1500
|
var newNodes = [];
|
|
1392
|
-
var sortedAnnotations = content.text.annotations.sort(function(a, b) {
|
|
1393
|
-
return a.start_index - b.start_index;
|
|
1394
|
-
});
|
|
1395
1501
|
var lastProcessedIndex = nodeStart;
|
|
1396
|
-
sortedAnnotations
|
|
1502
|
+
sortedAnnotations({
|
|
1503
|
+
content: content
|
|
1504
|
+
}).forEach(function(annotation) {
|
|
1397
1505
|
var annotationStart = annotation.start_index;
|
|
1398
1506
|
var annotationEnd = annotation.end_index;
|
|
1399
1507
|
if (nodeEnd < annotationStart || nodeStart > annotationEnd) {
|
|
1400
1508
|
return;
|
|
1401
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
|
+
}
|
|
1402
1530
|
var startIndex = Math.max(nodeStart, annotationStart);
|
|
1403
1531
|
var endIndex = Math.min(nodeEnd, annotationEnd);
|
|
1404
1532
|
if (lastProcessedIndex < startIndex) {
|
|
@@ -1443,23 +1571,25 @@ var remarkAnnotation = function(param) {
|
|
|
1443
1571
|
});
|
|
1444
1572
|
lastProcessedIndex = endIndex;
|
|
1445
1573
|
});
|
|
1446
|
-
if (
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
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
|
+
}
|
|
1460
1590
|
}
|
|
1461
|
-
}
|
|
1462
|
-
}
|
|
1591
|
+
});
|
|
1592
|
+
}
|
|
1463
1593
|
}
|
|
1464
1594
|
return newNodes;
|
|
1465
1595
|
});
|
|
@@ -1485,13 +1615,13 @@ var useMarkdownContext = function() {
|
|
|
1485
1615
|
return useContext7(MarkdownContext);
|
|
1486
1616
|
};
|
|
1487
1617
|
// src/components/threads/Thread/Message/TextContent.tsx
|
|
1488
|
-
import { jsx as
|
|
1618
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
1489
1619
|
var TextContent = function(param) {
|
|
1490
1620
|
var content = param.content;
|
|
1491
1621
|
var _useMarkdownContext = useMarkdownContext(), getRemarkPlugins2 = _useMarkdownContext.getRemarkPlugins, rest = _object_without_properties(_useMarkdownContext, [
|
|
1492
1622
|
"getRemarkPlugins"
|
|
1493
1623
|
]);
|
|
1494
|
-
return /* @__PURE__ */
|
|
1624
|
+
return /* @__PURE__ */ jsx39(Markdown, _object_spread_props(_object_spread({}, rest), {
|
|
1495
1625
|
remarkPlugins: getRemarkPlugins2({
|
|
1496
1626
|
content: content
|
|
1497
1627
|
}),
|
|
@@ -1499,21 +1629,21 @@ var TextContent = function(param) {
|
|
|
1499
1629
|
}));
|
|
1500
1630
|
};
|
|
1501
1631
|
// src/components/threads/Thread/Message/Attachments/index.tsx
|
|
1502
|
-
import { Flex as
|
|
1503
|
-
import { FileIcon
|
|
1504
|
-
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";
|
|
1505
1635
|
var Attachments = function(param) {
|
|
1506
1636
|
var message = param.message;
|
|
1507
1637
|
var _message_attachments;
|
|
1508
1638
|
if (!((_message_attachments = message.attachments) === null || _message_attachments === void 0 ? void 0 : _message_attachments.length)) return null;
|
|
1509
|
-
return /* @__PURE__ */
|
|
1639
|
+
return /* @__PURE__ */ jsx40(Flex12, {
|
|
1510
1640
|
align: "start",
|
|
1511
1641
|
pb: "1",
|
|
1512
|
-
children: /* @__PURE__ */
|
|
1642
|
+
children: /* @__PURE__ */ jsxs11(Badge, {
|
|
1513
1643
|
color: "gray",
|
|
1514
1644
|
variant: "surface",
|
|
1515
1645
|
children: [
|
|
1516
|
-
/* @__PURE__ */
|
|
1646
|
+
/* @__PURE__ */ jsx40(FileIcon, {}),
|
|
1517
1647
|
message.attachments.length,
|
|
1518
1648
|
" file",
|
|
1519
1649
|
message.attachments.length > 1 ? "s" : ""
|
|
@@ -1522,7 +1652,7 @@ var Attachments = function(param) {
|
|
|
1522
1652
|
});
|
|
1523
1653
|
};
|
|
1524
1654
|
// src/components/threads/Thread/Message/index.tsx
|
|
1525
|
-
import { jsx as
|
|
1655
|
+
import { jsx as jsx41, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
1526
1656
|
var Message = function(param) {
|
|
1527
1657
|
var message = param.message;
|
|
1528
1658
|
var _useMemo5 = _sliced_to_array(useMemo5(function() {
|
|
@@ -1567,68 +1697,68 @@ var Message = function(param) {
|
|
|
1567
1697
|
}, [
|
|
1568
1698
|
message
|
|
1569
1699
|
]);
|
|
1570
|
-
return /* @__PURE__ */
|
|
1700
|
+
return /* @__PURE__ */ jsx41(Provider, {
|
|
1571
1701
|
value: {
|
|
1572
1702
|
message: message
|
|
1573
1703
|
},
|
|
1574
|
-
children: /* @__PURE__ */
|
|
1704
|
+
children: /* @__PURE__ */ jsxs12(Box10, {
|
|
1575
1705
|
children: [
|
|
1576
|
-
/* @__PURE__ */
|
|
1706
|
+
/* @__PURE__ */ jsx41(RunSteps, {
|
|
1577
1707
|
runSteps: olderRunSteps
|
|
1578
1708
|
}),
|
|
1579
|
-
/* @__PURE__ */
|
|
1709
|
+
/* @__PURE__ */ jsxs12(Box10, {
|
|
1580
1710
|
children: [
|
|
1581
|
-
/* @__PURE__ */
|
|
1711
|
+
/* @__PURE__ */ jsx41(Attachments, {
|
|
1582
1712
|
message: message
|
|
1583
1713
|
}),
|
|
1584
1714
|
message.content.map(function(content, index) {
|
|
1585
|
-
return /* @__PURE__ */
|
|
1586
|
-
children: content.type === "text" && /* @__PURE__ */
|
|
1715
|
+
return /* @__PURE__ */ jsx41(Fragment, {
|
|
1716
|
+
children: content.type === "text" && /* @__PURE__ */ jsx41(TextContent, {
|
|
1587
1717
|
content: content
|
|
1588
1718
|
})
|
|
1589
1719
|
}, index);
|
|
1590
1720
|
}),
|
|
1591
|
-
isInProgress && isEmpty(laterRunSteps) && /* @__PURE__ */
|
|
1721
|
+
isInProgress && isEmpty(laterRunSteps) && /* @__PURE__ */ jsx41(StartingContentSkeleton, {})
|
|
1592
1722
|
]
|
|
1593
1723
|
}),
|
|
1594
|
-
/* @__PURE__ */
|
|
1724
|
+
/* @__PURE__ */ jsx41(RunSteps, {
|
|
1595
1725
|
runSteps: laterRunSteps
|
|
1596
1726
|
}),
|
|
1597
|
-
isInProgress && !isEmpty(laterRunSteps) && /* @__PURE__ */
|
|
1598
|
-
children: /* @__PURE__ */
|
|
1727
|
+
isInProgress && !isEmpty(laterRunSteps) && /* @__PURE__ */ jsx41(Box10, {
|
|
1728
|
+
children: /* @__PURE__ */ jsx41(StartingContentSkeleton, {})
|
|
1599
1729
|
})
|
|
1600
1730
|
]
|
|
1601
1731
|
})
|
|
1602
1732
|
});
|
|
1603
1733
|
};
|
|
1604
1734
|
// src/components/threads/Thread/Messages/Content/MessageGroup/Content/index.tsx
|
|
1605
|
-
import { jsx as
|
|
1606
|
-
var
|
|
1735
|
+
import { jsx as jsx42 } from "react/jsx-runtime";
|
|
1736
|
+
var Content3 = function(param) {
|
|
1607
1737
|
var messageGroup = param.messageGroup;
|
|
1608
|
-
return /* @__PURE__ */
|
|
1738
|
+
return /* @__PURE__ */ jsx42(Flex13, {
|
|
1609
1739
|
direction: "column-reverse",
|
|
1610
1740
|
children: messageGroup.messages.map(function(message) {
|
|
1611
|
-
return /* @__PURE__ */
|
|
1741
|
+
return /* @__PURE__ */ jsx42(Message, {
|
|
1612
1742
|
message: message
|
|
1613
1743
|
}, message.id);
|
|
1614
1744
|
})
|
|
1615
1745
|
});
|
|
1616
1746
|
};
|
|
1617
1747
|
// src/components/threads/Thread/Messages/Content/MessageGroup/index.tsx
|
|
1618
|
-
import { jsx as
|
|
1748
|
+
import { jsx as jsx43, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
1619
1749
|
var MessageGroup = function(param) {
|
|
1620
1750
|
var messageGroup = param.messageGroup;
|
|
1621
1751
|
var assistantNameContext = useContext8(AssistantNameContext);
|
|
1622
|
-
return /* @__PURE__ */
|
|
1752
|
+
return /* @__PURE__ */ jsxs13(MessageGroupBase, {
|
|
1623
1753
|
children: [
|
|
1624
|
-
messageGroup.role === "user" ? /* @__PURE__ */
|
|
1625
|
-
/* @__PURE__ */
|
|
1754
|
+
messageGroup.role === "user" ? /* @__PURE__ */ jsx43(UserAvatar, {}) : /* @__PURE__ */ jsx43(AssistantAvatar, {}),
|
|
1755
|
+
/* @__PURE__ */ jsxs13(Box11, {
|
|
1626
1756
|
flexGrow: "1",
|
|
1627
1757
|
children: [
|
|
1628
|
-
/* @__PURE__ */
|
|
1758
|
+
/* @__PURE__ */ jsx43(Name, {
|
|
1629
1759
|
children: messageGroup.role === "user" ? "You" : assistantNameContext
|
|
1630
1760
|
}),
|
|
1631
|
-
/* @__PURE__ */
|
|
1761
|
+
/* @__PURE__ */ jsx43(Content3, {
|
|
1632
1762
|
messageGroup: messageGroup
|
|
1633
1763
|
})
|
|
1634
1764
|
]
|
|
@@ -1637,8 +1767,8 @@ var MessageGroup = function(param) {
|
|
|
1637
1767
|
});
|
|
1638
1768
|
};
|
|
1639
1769
|
// src/components/threads/Thread/Messages/Content/index.tsx
|
|
1640
|
-
import { Fragment as Fragment2, jsx as
|
|
1641
|
-
var
|
|
1770
|
+
import { Fragment as Fragment2, jsx as jsx44 } from "react/jsx-runtime";
|
|
1771
|
+
var Content4 = function() {
|
|
1642
1772
|
var _useMessages = useMessages(), messages2 = _useMessages.messages, isLoading = _useMessages.isLoading, isLoadingError = _useMessages.isLoadingError;
|
|
1643
1773
|
var addToast = useToasts().addToast;
|
|
1644
1774
|
var _useMessageGroups = useMessageGroups({
|
|
@@ -1656,11 +1786,11 @@ var Content3 = function() {
|
|
|
1656
1786
|
addToast
|
|
1657
1787
|
]);
|
|
1658
1788
|
if (isLoading || isLoadingError) {
|
|
1659
|
-
return /* @__PURE__ */
|
|
1789
|
+
return /* @__PURE__ */ jsx44(MessagesSkeleton, {});
|
|
1660
1790
|
}
|
|
1661
|
-
return /* @__PURE__ */
|
|
1791
|
+
return /* @__PURE__ */ jsx44(Fragment2, {
|
|
1662
1792
|
children: messageGroups2.map(function(messageGroup) {
|
|
1663
|
-
return /* @__PURE__ */
|
|
1793
|
+
return /* @__PURE__ */ jsx44(MessageGroup, {
|
|
1664
1794
|
messageGroup: messageGroup
|
|
1665
1795
|
}, messageGroup.id);
|
|
1666
1796
|
})
|
|
@@ -1670,21 +1800,21 @@ var Content3 = function() {
|
|
|
1670
1800
|
import { useMemo as useMemo7 } from "react";
|
|
1671
1801
|
// src/components/skeletons/StartingSkeleton/index.tsx
|
|
1672
1802
|
import { useContext as useContext9 } from "react";
|
|
1673
|
-
import { Box as
|
|
1674
|
-
import { jsx as
|
|
1803
|
+
import { Box as Box12 } from "@radix-ui/themes";
|
|
1804
|
+
import { jsx as jsx45, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
1675
1805
|
var StartingSkeleton = function(param) {
|
|
1676
1806
|
var children = param.children;
|
|
1677
1807
|
var assistantNameContext = useContext9(AssistantNameContext);
|
|
1678
|
-
return /* @__PURE__ */
|
|
1808
|
+
return /* @__PURE__ */ jsxs14(MessageGroupBase, {
|
|
1679
1809
|
children: [
|
|
1680
|
-
/* @__PURE__ */
|
|
1681
|
-
/* @__PURE__ */
|
|
1810
|
+
/* @__PURE__ */ jsx45(AssistantAvatar, {}),
|
|
1811
|
+
/* @__PURE__ */ jsxs14(Box12, {
|
|
1682
1812
|
children: [
|
|
1683
|
-
/* @__PURE__ */
|
|
1813
|
+
/* @__PURE__ */ jsx45(Name, {
|
|
1684
1814
|
children: assistantNameContext
|
|
1685
1815
|
}),
|
|
1686
1816
|
children,
|
|
1687
|
-
/* @__PURE__ */
|
|
1817
|
+
/* @__PURE__ */ jsx45(StartingContentSkeleton, {})
|
|
1688
1818
|
]
|
|
1689
1819
|
})
|
|
1690
1820
|
]
|
|
@@ -1709,7 +1839,7 @@ var isOptimistic = function(param) {
|
|
|
1709
1839
|
return _4.startsWith(id, "-");
|
|
1710
1840
|
};
|
|
1711
1841
|
// src/components/threads/Thread/Messages/Progress/index.tsx
|
|
1712
|
-
import { jsx as
|
|
1842
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
1713
1843
|
var Progress = function() {
|
|
1714
1844
|
var latestMessage = useLatestMessage().latestMessage;
|
|
1715
1845
|
var isMutatingMessage = useIsMutatingMessage();
|
|
@@ -1727,10 +1857,10 @@ var Progress = function() {
|
|
|
1727
1857
|
isMutatingMessage
|
|
1728
1858
|
]);
|
|
1729
1859
|
if (!isVisible) return null;
|
|
1730
|
-
return /* @__PURE__ */
|
|
1860
|
+
return /* @__PURE__ */ jsx46(StartingSkeleton, {});
|
|
1731
1861
|
};
|
|
1732
1862
|
// src/components/threads/Thread/Messages/Root/index.tsx
|
|
1733
|
-
import { Flex as
|
|
1863
|
+
import { Flex as Flex14 } from "@radix-ui/themes";
|
|
1734
1864
|
// src/hooks/misc/useInfiniteScroll/index.tsx
|
|
1735
1865
|
import { useRef as useRef3 } from "react";
|
|
1736
1866
|
import { useInView } from "react-intersection-observer";
|
|
@@ -1785,7 +1915,7 @@ var useInfiniteScroll = function(param) {
|
|
|
1785
1915
|
};
|
|
1786
1916
|
};
|
|
1787
1917
|
// src/components/threads/Thread/Messages/Root/index.tsx
|
|
1788
|
-
import { jsx as
|
|
1918
|
+
import { jsx as jsx47, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
1789
1919
|
var Root2 = function(param) {
|
|
1790
1920
|
var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
|
|
1791
1921
|
var _useMessages = useMessages(), isFetchingNextPage = _useMessages.isFetchingNextPage, hasNextPage = _useMessages.hasNextPage, fetchNextPage = _useMessages.fetchNextPage;
|
|
@@ -1794,7 +1924,7 @@ var Root2 = function(param) {
|
|
|
1794
1924
|
hasNextPage: hasNextPage,
|
|
1795
1925
|
fetchNextPage: fetchNextPage
|
|
1796
1926
|
}), containerRef = _useInfiniteScroll.containerRef, loaderRef = _useInfiniteScroll.loaderRef;
|
|
1797
|
-
return /* @__PURE__ */
|
|
1927
|
+
return /* @__PURE__ */ jsxs15(Flex14, {
|
|
1798
1928
|
ref: containerRef,
|
|
1799
1929
|
direction: "column-reverse",
|
|
1800
1930
|
flexGrow: "1",
|
|
@@ -1803,10 +1933,10 @@ var Root2 = function(param) {
|
|
|
1803
1933
|
}),
|
|
1804
1934
|
children: [
|
|
1805
1935
|
children,
|
|
1806
|
-
hasNextPage && /* @__PURE__ */
|
|
1936
|
+
hasNextPage && /* @__PURE__ */ jsx47(Flex14, {
|
|
1807
1937
|
ref: loaderRef
|
|
1808
1938
|
}),
|
|
1809
|
-
/* @__PURE__ */
|
|
1939
|
+
/* @__PURE__ */ jsx47(Flex14, {
|
|
1810
1940
|
flexShrink: "0",
|
|
1811
1941
|
flexGrow: "1"
|
|
1812
1942
|
})
|
|
@@ -1814,30 +1944,30 @@ var Root2 = function(param) {
|
|
|
1814
1944
|
});
|
|
1815
1945
|
};
|
|
1816
1946
|
// src/components/threads/Thread/Messages/NextPageSkeleton.tsx
|
|
1817
|
-
import { jsx as
|
|
1947
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
1818
1948
|
var NextPageSkeleton = function() {
|
|
1819
1949
|
var hasNextPage = useMessages().hasNextPage;
|
|
1820
1950
|
if (!hasNextPage) {
|
|
1821
1951
|
return null;
|
|
1822
1952
|
}
|
|
1823
|
-
return /* @__PURE__ */
|
|
1953
|
+
return /* @__PURE__ */ jsx48(MessagesSkeleton, {});
|
|
1824
1954
|
};
|
|
1825
1955
|
// src/components/threads/Thread/Messages/index.tsx
|
|
1826
|
-
import { jsx as
|
|
1956
|
+
import { jsx as jsx49, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
1827
1957
|
var Messages = function(param) {
|
|
1828
1958
|
var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
|
|
1829
|
-
return /* @__PURE__ */
|
|
1959
|
+
return /* @__PURE__ */ jsxs16(Root2, {
|
|
1830
1960
|
style: style,
|
|
1831
1961
|
children: [
|
|
1832
|
-
/* @__PURE__ */
|
|
1962
|
+
/* @__PURE__ */ jsx49(Flex15, {
|
|
1833
1963
|
flexShrink: "0",
|
|
1834
1964
|
height: "var(--space-3)"
|
|
1835
1965
|
}),
|
|
1836
|
-
/* @__PURE__ */
|
|
1966
|
+
/* @__PURE__ */ jsx49(Progress, {}),
|
|
1837
1967
|
children,
|
|
1838
|
-
/* @__PURE__ */
|
|
1839
|
-
/* @__PURE__ */
|
|
1840
|
-
/* @__PURE__ */
|
|
1968
|
+
/* @__PURE__ */ jsx49(Content4, {}),
|
|
1969
|
+
/* @__PURE__ */ jsx49(NextPageSkeleton, {}),
|
|
1970
|
+
/* @__PURE__ */ jsx49(Flex15, {
|
|
1841
1971
|
flexShrink: "0",
|
|
1842
1972
|
flexGrow: "1",
|
|
1843
1973
|
minHeight: "var(--space-5)"
|
|
@@ -1850,7 +1980,7 @@ Messages.Message = Message;
|
|
|
1850
1980
|
Messages.NextPageSkeleton = NextPageSkeleton;
|
|
1851
1981
|
// src/components/threads/Thread/MessageForm/Submit/index.tsx
|
|
1852
1982
|
import { ArrowUpIcon, StopIcon } from "@radix-ui/react-icons";
|
|
1853
|
-
import { IconButton as IconButton2, Flex as
|
|
1983
|
+
import { IconButton as IconButton2, Flex as Flex16 } from "@radix-ui/themes";
|
|
1854
1984
|
// src/hooks/messages/useMessageFormContext/index.ts
|
|
1855
1985
|
import { useContext as useContext10 } from "react";
|
|
1856
1986
|
// src/contexts/messages/MessageFormContext/index.ts
|
|
@@ -1868,10 +1998,10 @@ var useMessageFormContext = function() {
|
|
|
1868
1998
|
return useContext10(MessageFormContext);
|
|
1869
1999
|
};
|
|
1870
2000
|
// src/components/threads/Thread/MessageForm/Submit/index.tsx
|
|
1871
|
-
import { jsx as
|
|
2001
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
1872
2002
|
var Root3 = function(param) {
|
|
1873
2003
|
var children = param.children;
|
|
1874
|
-
return /* @__PURE__ */
|
|
2004
|
+
return /* @__PURE__ */ jsx50(Flex16, {
|
|
1875
2005
|
flexShrink: "0",
|
|
1876
2006
|
align: "end",
|
|
1877
2007
|
children: children
|
|
@@ -1881,24 +2011,24 @@ var Button2 = function() {
|
|
|
1881
2011
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
1882
2012
|
var _useMessageFormContext = useMessageFormContext(), isDisabled = _useMessageFormContext.isDisabled, isLoading = _useMessageFormContext.isLoading, isFileLoading = _useMessageFormContext.isFileLoading;
|
|
1883
2013
|
if (isLoading) {
|
|
1884
|
-
return /* @__PURE__ */
|
|
2014
|
+
return /* @__PURE__ */ jsx50(IconButton2, {
|
|
1885
2015
|
type: "button",
|
|
1886
2016
|
onClick: function() {
|
|
1887
2017
|
var _superinterfaceContext_createMessageAbortControllerRef_current;
|
|
1888
2018
|
return (_superinterfaceContext_createMessageAbortControllerRef_current = superinterfaceContext.createMessageAbortControllerRef.current) === null || _superinterfaceContext_createMessageAbortControllerRef_current === void 0 ? void 0 : _superinterfaceContext_createMessageAbortControllerRef_current.abort();
|
|
1889
2019
|
},
|
|
1890
|
-
children: /* @__PURE__ */
|
|
2020
|
+
children: /* @__PURE__ */ jsx50(StopIcon, {})
|
|
1891
2021
|
});
|
|
1892
2022
|
}
|
|
1893
|
-
return /* @__PURE__ */
|
|
2023
|
+
return /* @__PURE__ */ jsx50(IconButton2, {
|
|
1894
2024
|
type: "submit",
|
|
1895
2025
|
disabled: isDisabled || isFileLoading,
|
|
1896
|
-
children: /* @__PURE__ */
|
|
2026
|
+
children: /* @__PURE__ */ jsx50(ArrowUpIcon, {})
|
|
1897
2027
|
});
|
|
1898
2028
|
};
|
|
1899
2029
|
var Submit = function() {
|
|
1900
|
-
return /* @__PURE__ */
|
|
1901
|
-
children: /* @__PURE__ */
|
|
2030
|
+
return /* @__PURE__ */ jsx50(Root3, {
|
|
2031
|
+
children: /* @__PURE__ */ jsx50(Button2, {})
|
|
1902
2032
|
});
|
|
1903
2033
|
};
|
|
1904
2034
|
Submit.Root = Root3;
|
|
@@ -1907,7 +2037,7 @@ Submit.Button = Button2;
|
|
|
1907
2037
|
import { useQueryClient as useQueryClient4 } from "@tanstack/react-query";
|
|
1908
2038
|
import { useMemo as useMemo8, useState } from "react";
|
|
1909
2039
|
import { useForm, FormProvider } from "react-hook-form";
|
|
1910
|
-
import { Box as
|
|
2040
|
+
import { Box as Box13 } from "@radix-ui/themes";
|
|
1911
2041
|
// src/hooks/messages/useCreateMessage/index.ts
|
|
1912
2042
|
import { partob } from "radash";
|
|
1913
2043
|
import { useMutation, useQueryClient as useQueryClient3 } from "@tanstack/react-query";
|
|
@@ -2530,7 +2660,7 @@ var formOptions = {
|
|
|
2530
2660
|
};
|
|
2531
2661
|
// src/components/threads/Thread/MessageForm/Root/index.tsx
|
|
2532
2662
|
import { partob as partob2 } from "radash";
|
|
2533
|
-
import { jsx as
|
|
2663
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
2534
2664
|
var Root4 = function(param) {
|
|
2535
2665
|
var children = param.children, onSubmitArg = param.onSubmit, isDisabledArg = param.isDisabled;
|
|
2536
2666
|
var _useState = _sliced_to_array(useState([]), 2), files = _useState[0], setFiles = _useState[1];
|
|
@@ -2639,7 +2769,7 @@ var Root4 = function(param) {
|
|
|
2639
2769
|
};
|
|
2640
2770
|
}();
|
|
2641
2771
|
var content = watch("content");
|
|
2642
|
-
return /* @__PURE__ */
|
|
2772
|
+
return /* @__PURE__ */ jsx51(MessageFormContext.Provider, {
|
|
2643
2773
|
value: {
|
|
2644
2774
|
isDisabled: isDisabled,
|
|
2645
2775
|
isLoading: isLoading,
|
|
@@ -2648,11 +2778,11 @@ var Root4 = function(param) {
|
|
|
2648
2778
|
isFileLoading: isFileLoading,
|
|
2649
2779
|
content: content
|
|
2650
2780
|
},
|
|
2651
|
-
children: /* @__PURE__ */
|
|
2652
|
-
children: /* @__PURE__ */
|
|
2781
|
+
children: /* @__PURE__ */ jsx51(FormProvider, _object_spread_props(_object_spread({}, formProps), {
|
|
2782
|
+
children: /* @__PURE__ */ jsx51(Box13, {
|
|
2653
2783
|
asChild: true,
|
|
2654
2784
|
flexShrink: "0",
|
|
2655
|
-
children: /* @__PURE__ */
|
|
2785
|
+
children: /* @__PURE__ */ jsx51("form", {
|
|
2656
2786
|
onSubmit: handleSubmit(onSubmit),
|
|
2657
2787
|
children: children
|
|
2658
2788
|
})
|
|
@@ -2662,9 +2792,9 @@ var Root4 = function(param) {
|
|
|
2662
2792
|
};
|
|
2663
2793
|
// src/components/threads/Thread/MessageForm/Field/index.tsx
|
|
2664
2794
|
import { useFormContext as useFormContext2 } from "react-hook-form";
|
|
2665
|
-
import { Container as RadixContainer, Flex as
|
|
2795
|
+
import { Container as RadixContainer, Flex as Flex20 } from "@radix-ui/themes";
|
|
2666
2796
|
// src/components/threads/Thread/MessageForm/Field/Control.tsx
|
|
2667
|
-
import { Flex as
|
|
2797
|
+
import { Flex as Flex17 } from "@radix-ui/themes";
|
|
2668
2798
|
import { useFormContext } from "react-hook-form";
|
|
2669
2799
|
// src/hooks/misc/usePrevious.ts
|
|
2670
2800
|
import { useEffect as useEffect3, useRef as useRef4 } from "react";
|
|
@@ -2680,14 +2810,14 @@ import { useContext as useContext11, useMemo as useMemo9, useRef as useRef5, use
|
|
|
2680
2810
|
// src/components/textareas/TextareaBase/index.tsx
|
|
2681
2811
|
import { forwardRef as forwardRef3 } from "react";
|
|
2682
2812
|
import TextareaAutosize from "react-textarea-autosize";
|
|
2683
|
-
import { Fragment as Fragment3, jsx as
|
|
2813
|
+
import { Fragment as Fragment3, jsx as jsx52, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2684
2814
|
var TextareaBase = forwardRef3(function TextareaBase2(props, ref) {
|
|
2685
|
-
return /* @__PURE__ */
|
|
2815
|
+
return /* @__PURE__ */ jsxs17(Fragment3, {
|
|
2686
2816
|
children: [
|
|
2687
|
-
/* @__PURE__ */
|
|
2817
|
+
/* @__PURE__ */ jsx52("style", {
|
|
2688
2818
|
children: ".superinterface-textarea { min-height: inherit; height: 30px; }\n.superinterface-textarea::placeholder { color: var(--gray-a10); }"
|
|
2689
2819
|
}),
|
|
2690
|
-
/* @__PURE__ */
|
|
2820
|
+
/* @__PURE__ */ jsx52(TextareaAutosize, _object_spread({
|
|
2691
2821
|
ref: ref,
|
|
2692
2822
|
className: "rt-reset superinterface-textarea",
|
|
2693
2823
|
style: {
|
|
@@ -2704,10 +2834,10 @@ var TextareaBase = forwardRef3(function TextareaBase2(props, ref) {
|
|
|
2704
2834
|
});
|
|
2705
2835
|
});
|
|
2706
2836
|
// src/components/threads/Thread/MessageForm/Field/Control.tsx
|
|
2707
|
-
import { jsx as
|
|
2837
|
+
import { jsx as jsx53 } from "react/jsx-runtime";
|
|
2708
2838
|
var Root5 = function(param) {
|
|
2709
2839
|
var children = param.children;
|
|
2710
|
-
return /* @__PURE__ */
|
|
2840
|
+
return /* @__PURE__ */ jsx53(Flex17, {
|
|
2711
2841
|
flexGrow: "1",
|
|
2712
2842
|
pt: "4px",
|
|
2713
2843
|
children: children
|
|
@@ -2736,7 +2866,7 @@ var Input = function() {
|
|
|
2736
2866
|
isDisabledPrevious,
|
|
2737
2867
|
textareaProps
|
|
2738
2868
|
]);
|
|
2739
|
-
return /* @__PURE__ */
|
|
2869
|
+
return /* @__PURE__ */ jsx53(TextareaBase, _object_spread_props(_object_spread({
|
|
2740
2870
|
minRows: 1,
|
|
2741
2871
|
placeholder: "Message ".concat(assistantNameContext, "..."),
|
|
2742
2872
|
disabled: isDisabled,
|
|
@@ -2756,51 +2886,51 @@ var Input = function() {
|
|
|
2756
2886
|
}));
|
|
2757
2887
|
};
|
|
2758
2888
|
var Control = function() {
|
|
2759
|
-
return /* @__PURE__ */
|
|
2760
|
-
children: /* @__PURE__ */
|
|
2889
|
+
return /* @__PURE__ */ jsx53(Root5, {
|
|
2890
|
+
children: /* @__PURE__ */ jsx53(Input, {})
|
|
2761
2891
|
});
|
|
2762
2892
|
};
|
|
2763
2893
|
Control.Root = Root5;
|
|
2764
2894
|
Control.Input = Input;
|
|
2765
2895
|
// src/components/threads/Thread/MessageForm/Field/Files/Preview.tsx
|
|
2766
|
-
import { Flex as
|
|
2767
|
-
import { FileIcon as
|
|
2768
|
-
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";
|
|
2769
2899
|
var Preview = function() {
|
|
2770
2900
|
var _useMessageFormContext = useMessageFormContext(), files = _useMessageFormContext.files, setFiles = _useMessageFormContext.setFiles;
|
|
2771
2901
|
if (!files.length) {
|
|
2772
2902
|
return null;
|
|
2773
2903
|
}
|
|
2774
|
-
return /* @__PURE__ */
|
|
2904
|
+
return /* @__PURE__ */ jsx54(Flex18, {
|
|
2775
2905
|
flexBasis: "100%",
|
|
2776
2906
|
direction: "column",
|
|
2777
2907
|
pb: "2",
|
|
2778
2908
|
gap: "1",
|
|
2779
2909
|
children: files.map(function(file) {
|
|
2780
|
-
return /* @__PURE__ */
|
|
2910
|
+
return /* @__PURE__ */ jsx54(Card, {
|
|
2781
2911
|
variant: "ghost",
|
|
2782
|
-
children: /* @__PURE__ */
|
|
2912
|
+
children: /* @__PURE__ */ jsxs18(Flex18, {
|
|
2783
2913
|
align: "center",
|
|
2784
2914
|
justify: "between",
|
|
2785
2915
|
gap: "1",
|
|
2786
2916
|
children: [
|
|
2787
|
-
/* @__PURE__ */
|
|
2917
|
+
/* @__PURE__ */ jsxs18(Flex18, {
|
|
2788
2918
|
align: "center",
|
|
2789
2919
|
gap: "1",
|
|
2790
2920
|
flexShrink: "1",
|
|
2791
2921
|
minWidth: "0",
|
|
2792
2922
|
maxWidth: "250px",
|
|
2793
2923
|
children: [
|
|
2794
|
-
/* @__PURE__ */
|
|
2924
|
+
/* @__PURE__ */ jsx54(Flex18, {
|
|
2795
2925
|
flexShrink: "0",
|
|
2796
|
-
children: /* @__PURE__ */
|
|
2926
|
+
children: /* @__PURE__ */ jsx54(Spinner, {
|
|
2797
2927
|
loading: isOptimistic({
|
|
2798
2928
|
id: file.id
|
|
2799
2929
|
}),
|
|
2800
|
-
children: /* @__PURE__ */
|
|
2930
|
+
children: /* @__PURE__ */ jsx54(FileIcon2, {})
|
|
2801
2931
|
})
|
|
2802
2932
|
}),
|
|
2803
|
-
/* @__PURE__ */
|
|
2933
|
+
/* @__PURE__ */ jsx54(Text6, {
|
|
2804
2934
|
size: "2",
|
|
2805
2935
|
truncate: true,
|
|
2806
2936
|
wrap: "nowrap",
|
|
@@ -2808,9 +2938,9 @@ var Preview = function() {
|
|
|
2808
2938
|
})
|
|
2809
2939
|
]
|
|
2810
2940
|
}),
|
|
2811
|
-
/* @__PURE__ */
|
|
2941
|
+
/* @__PURE__ */ jsx54(Flex18, {
|
|
2812
2942
|
flexShrink: "0",
|
|
2813
|
-
children: /* @__PURE__ */
|
|
2943
|
+
children: /* @__PURE__ */ jsx54(IconButton3, {
|
|
2814
2944
|
onClick: function() {
|
|
2815
2945
|
return setFiles(function(prev) {
|
|
2816
2946
|
return prev.filter(function(prevFile) {
|
|
@@ -2821,7 +2951,7 @@ var Preview = function() {
|
|
|
2821
2951
|
color: "gray",
|
|
2822
2952
|
variant: "ghost",
|
|
2823
2953
|
size: "1",
|
|
2824
|
-
children: /* @__PURE__ */
|
|
2954
|
+
children: /* @__PURE__ */ jsx54(Cross2Icon, {})
|
|
2825
2955
|
})
|
|
2826
2956
|
})
|
|
2827
2957
|
]
|
|
@@ -2835,7 +2965,7 @@ import { useCallback as useCallback2 } from "react";
|
|
|
2835
2965
|
import { omit as omit4 } from "radash";
|
|
2836
2966
|
import dayjs2 from "dayjs";
|
|
2837
2967
|
import { FilePlusIcon } from "@radix-ui/react-icons";
|
|
2838
|
-
import { IconButton as IconButton4, Flex as
|
|
2968
|
+
import { IconButton as IconButton4, Flex as Flex19 } from "@radix-ui/themes";
|
|
2839
2969
|
// src/hooks/files/useCreateFile/index.ts
|
|
2840
2970
|
import { useMutation as useMutation2, useQueryClient as useQueryClient5 } from "@tanstack/react-query";
|
|
2841
2971
|
// src/hooks/files/useCreateFile/lib/mutationOptions/mutationFn/body/formData.ts
|
|
@@ -2946,7 +3076,7 @@ var useCreateFile = function() {
|
|
|
2946
3076
|
});
|
|
2947
3077
|
};
|
|
2948
3078
|
// src/components/threads/Thread/MessageForm/Field/Files/Control.tsx
|
|
2949
|
-
import { jsx as
|
|
3079
|
+
import { jsx as jsx55, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
2950
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";
|
|
2951
3081
|
var Control2 = function() {
|
|
2952
3082
|
var _useMessageFormContext = useMessageFormContext(), isDisabled = _useMessageFormContext.isDisabled, isLoading = _useMessageFormContext.isLoading, setFiles = _useMessageFormContext.setFiles;
|
|
@@ -3120,11 +3250,11 @@ var Control2 = function() {
|
|
|
3120
3250
|
createFile,
|
|
3121
3251
|
setFiles
|
|
3122
3252
|
]);
|
|
3123
|
-
return /* @__PURE__ */
|
|
3253
|
+
return /* @__PURE__ */ jsx55(Flex19, {
|
|
3124
3254
|
pt: "2",
|
|
3125
3255
|
pr: "2",
|
|
3126
3256
|
flexGrow: "0",
|
|
3127
|
-
children: /* @__PURE__ */
|
|
3257
|
+
children: /* @__PURE__ */ jsxs19(IconButton4, {
|
|
3128
3258
|
type: "button",
|
|
3129
3259
|
variant: "ghost",
|
|
3130
3260
|
color: "gray",
|
|
@@ -3134,8 +3264,8 @@ var Control2 = function() {
|
|
|
3134
3264
|
overflow: "hidden"
|
|
3135
3265
|
},
|
|
3136
3266
|
children: [
|
|
3137
|
-
/* @__PURE__ */
|
|
3138
|
-
/* @__PURE__ */
|
|
3267
|
+
/* @__PURE__ */ jsx55(FilePlusIcon, {}),
|
|
3268
|
+
/* @__PURE__ */ jsx55("input", {
|
|
3139
3269
|
type: "file",
|
|
3140
3270
|
multiple: true,
|
|
3141
3271
|
accept: accept,
|
|
@@ -3160,20 +3290,20 @@ var Files = {
|
|
|
3160
3290
|
Control: Control2
|
|
3161
3291
|
};
|
|
3162
3292
|
// src/components/threads/Thread/MessageForm/Field/index.tsx
|
|
3163
|
-
import { jsx as
|
|
3293
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
3164
3294
|
var Root6 = function(param) {
|
|
3165
3295
|
var children = param.children;
|
|
3166
3296
|
var _useFormContext2 = useFormContext2(), errors = _useFormContext2.formState.errors;
|
|
3167
|
-
return /* @__PURE__ */
|
|
3297
|
+
return /* @__PURE__ */ jsx56(RadixContainer, {
|
|
3168
3298
|
size: "2",
|
|
3169
3299
|
flexGrow: "0",
|
|
3170
|
-
children: /* @__PURE__ */
|
|
3300
|
+
children: /* @__PURE__ */ jsx56(Flex20, {
|
|
3171
3301
|
direction: "column",
|
|
3172
3302
|
flexShrink: "0",
|
|
3173
|
-
children: /* @__PURE__ */
|
|
3303
|
+
children: /* @__PURE__ */ jsx56(Flex20, {
|
|
3174
3304
|
direction: "column",
|
|
3175
3305
|
flexShrink: "0",
|
|
3176
|
-
children: /* @__PURE__ */
|
|
3306
|
+
children: /* @__PURE__ */ jsx56(Flex20, {
|
|
3177
3307
|
style: _object_spread({
|
|
3178
3308
|
borderRadius: "var(--radius-2)",
|
|
3179
3309
|
borderWidth: "1px",
|
|
@@ -3197,13 +3327,13 @@ var Field = {
|
|
|
3197
3327
|
Files: Files
|
|
3198
3328
|
};
|
|
3199
3329
|
// src/components/threads/Thread/MessageForm/index.tsx
|
|
3200
|
-
import { jsx as
|
|
3330
|
+
import { jsx as jsx57, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
3201
3331
|
var MessageForm = function() {
|
|
3202
|
-
return /* @__PURE__ */
|
|
3203
|
-
children: /* @__PURE__ */
|
|
3332
|
+
return /* @__PURE__ */ jsx57(Root4, {
|
|
3333
|
+
children: /* @__PURE__ */ jsxs20(Field.Root, {
|
|
3204
3334
|
children: [
|
|
3205
|
-
/* @__PURE__ */
|
|
3206
|
-
/* @__PURE__ */
|
|
3335
|
+
/* @__PURE__ */ jsx57(Field.Control, {}),
|
|
3336
|
+
/* @__PURE__ */ jsx57(Submit, {})
|
|
3207
3337
|
]
|
|
3208
3338
|
})
|
|
3209
3339
|
});
|
|
@@ -3212,17 +3342,17 @@ MessageForm.Root = Root4;
|
|
|
3212
3342
|
MessageForm.Field = Field;
|
|
3213
3343
|
MessageForm.Submit = Submit;
|
|
3214
3344
|
// src/components/threads/Thread/Root/index.tsx
|
|
3215
|
-
import { Flex as
|
|
3345
|
+
import { Flex as Flex21 } from "@radix-ui/themes";
|
|
3216
3346
|
// src/components/threads/Thread/Provider/index.tsx
|
|
3217
3347
|
var Provider2 = SuperinterfaceProvider;
|
|
3218
3348
|
// src/components/threads/Thread/Root/index.tsx
|
|
3219
|
-
import { jsx as
|
|
3349
|
+
import { jsx as jsx58 } from "react/jsx-runtime";
|
|
3220
3350
|
var Root7 = function(_param) {
|
|
3221
3351
|
var children = _param.children, rest = _object_without_properties(_param, [
|
|
3222
3352
|
"children"
|
|
3223
3353
|
]);
|
|
3224
|
-
return /* @__PURE__ */
|
|
3225
|
-
children: /* @__PURE__ */
|
|
3354
|
+
return /* @__PURE__ */ jsx58(Provider2, _object_spread_props(_object_spread({}, rest), {
|
|
3355
|
+
children: /* @__PURE__ */ jsx58(Flex21, {
|
|
3226
3356
|
direction: "column",
|
|
3227
3357
|
flexGrow: "1",
|
|
3228
3358
|
children: children
|
|
@@ -3230,12 +3360,12 @@ var Root7 = function(_param) {
|
|
|
3230
3360
|
}));
|
|
3231
3361
|
};
|
|
3232
3362
|
// src/components/threads/Thread/index.tsx
|
|
3233
|
-
import { jsx as
|
|
3363
|
+
import { jsx as jsx59, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
3234
3364
|
var Thread = function(props) {
|
|
3235
|
-
return /* @__PURE__ */
|
|
3365
|
+
return /* @__PURE__ */ jsxs21(Root7, _object_spread_props(_object_spread({}, props), {
|
|
3236
3366
|
children: [
|
|
3237
|
-
/* @__PURE__ */
|
|
3238
|
-
/* @__PURE__ */
|
|
3367
|
+
/* @__PURE__ */ jsx59(Messages, {}),
|
|
3368
|
+
/* @__PURE__ */ jsx59(MessageForm, {})
|
|
3239
3369
|
]
|
|
3240
3370
|
}));
|
|
3241
3371
|
};
|
|
@@ -3359,12 +3489,12 @@ var useThreadDialogContext = function() {
|
|
|
3359
3489
|
return useContext13(ThreadDialogContext);
|
|
3360
3490
|
};
|
|
3361
3491
|
// src/components/threads/ThreadDialog/Provider/index.tsx
|
|
3362
|
-
import { jsx as
|
|
3492
|
+
import { jsx as jsx60 } from "react/jsx-runtime";
|
|
3363
3493
|
var Provider3 = function(param) {
|
|
3364
3494
|
var children = param.children;
|
|
3365
3495
|
var threadDialogContext = useThreadDialogContext();
|
|
3366
3496
|
var _useState2 = _sliced_to_array(useState2(threadDialogContext.isOpen), 2), isOpen = _useState2[0], setIsOpen = _useState2[1];
|
|
3367
|
-
return /* @__PURE__ */
|
|
3497
|
+
return /* @__PURE__ */ jsx60(ThreadDialogContext.Provider, {
|
|
3368
3498
|
value: {
|
|
3369
3499
|
isOpen: isOpen,
|
|
3370
3500
|
setIsOpen: setIsOpen
|
|
@@ -3377,27 +3507,27 @@ import { useState as useState3, useCallback as useCallback3 } from "react";
|
|
|
3377
3507
|
import * as Toast2 from "@radix-ui/react-toast";
|
|
3378
3508
|
// src/components/toasts/ToastsProvider/CustomToast.tsx
|
|
3379
3509
|
import * as Toast from "@radix-ui/react-toast";
|
|
3380
|
-
import { Card as
|
|
3510
|
+
import { Card as Card2, Text as Text7, Flex as Flex22 } from "@radix-ui/themes";
|
|
3381
3511
|
import { CheckCircledIcon as CheckCircledIcon2, CrossCircledIcon } from "@radix-ui/react-icons";
|
|
3382
|
-
import { jsx as
|
|
3512
|
+
import { jsx as jsx61, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
3383
3513
|
var CustomToast = function(param) {
|
|
3384
3514
|
var toast = param.toast;
|
|
3385
|
-
return /* @__PURE__ */
|
|
3386
|
-
children: /* @__PURE__ */
|
|
3387
|
-
children: /* @__PURE__ */
|
|
3388
|
-
children: /* @__PURE__ */
|
|
3515
|
+
return /* @__PURE__ */ jsx61(Toast.Root, {
|
|
3516
|
+
children: /* @__PURE__ */ jsx61(Card2, {
|
|
3517
|
+
children: /* @__PURE__ */ jsx61(Toast.Title, {
|
|
3518
|
+
children: /* @__PURE__ */ jsxs22(Flex22, {
|
|
3389
3519
|
children: [
|
|
3390
|
-
/* @__PURE__ */
|
|
3520
|
+
/* @__PURE__ */ jsx61(Flex22, {
|
|
3391
3521
|
pr: "2",
|
|
3392
3522
|
height: "14px",
|
|
3393
3523
|
align: "center",
|
|
3394
|
-
children: toast.type === "success" ? /* @__PURE__ */
|
|
3524
|
+
children: toast.type === "success" ? /* @__PURE__ */ jsx61(CheckCircledIcon2, {
|
|
3395
3525
|
color: "var(--accent-9)"
|
|
3396
|
-
}) : /* @__PURE__ */
|
|
3526
|
+
}) : /* @__PURE__ */ jsx61(CrossCircledIcon, {
|
|
3397
3527
|
color: "var(--red-9)"
|
|
3398
3528
|
})
|
|
3399
3529
|
}),
|
|
3400
|
-
/* @__PURE__ */
|
|
3530
|
+
/* @__PURE__ */ jsx61(Text7, {
|
|
3401
3531
|
weight: "medium",
|
|
3402
3532
|
size: "1",
|
|
3403
3533
|
children: toast.message
|
|
@@ -3409,7 +3539,7 @@ var CustomToast = function(param) {
|
|
|
3409
3539
|
});
|
|
3410
3540
|
};
|
|
3411
3541
|
// src/components/toasts/ToastsProvider/index.tsx
|
|
3412
|
-
import { jsx as
|
|
3542
|
+
import { jsx as jsx62, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3413
3543
|
var ToastsProvider = function(param) {
|
|
3414
3544
|
var children = param.children;
|
|
3415
3545
|
var _useState3 = _sliced_to_array(useState3([]), 2), toasts = _useState3[0], setToasts = _useState3[1];
|
|
@@ -3420,20 +3550,20 @@ var ToastsProvider = function(param) {
|
|
|
3420
3550
|
]);
|
|
3421
3551
|
});
|
|
3422
3552
|
}, []);
|
|
3423
|
-
return /* @__PURE__ */
|
|
3553
|
+
return /* @__PURE__ */ jsx62(ToastsContext.Provider, {
|
|
3424
3554
|
value: {
|
|
3425
3555
|
toasts: toasts,
|
|
3426
3556
|
addToast: addToast
|
|
3427
3557
|
},
|
|
3428
|
-
children: /* @__PURE__ */
|
|
3558
|
+
children: /* @__PURE__ */ jsxs23(Toast2.Provider, {
|
|
3429
3559
|
children: [
|
|
3430
3560
|
children,
|
|
3431
3561
|
Array.from(toasts).map(function(toast, index) {
|
|
3432
|
-
return /* @__PURE__ */
|
|
3562
|
+
return /* @__PURE__ */ jsx62(CustomToast, {
|
|
3433
3563
|
toast: toast
|
|
3434
3564
|
}, index);
|
|
3435
3565
|
}),
|
|
3436
|
-
/* @__PURE__ */
|
|
3566
|
+
/* @__PURE__ */ jsx62(Toast2.Viewport, {
|
|
3437
3567
|
style: {
|
|
3438
3568
|
position: "absolute",
|
|
3439
3569
|
bottom: 0,
|
|
@@ -3455,34 +3585,34 @@ var ToastsProvider = function(param) {
|
|
|
3455
3585
|
});
|
|
3456
3586
|
};
|
|
3457
3587
|
// src/components/threads/ThreadDialog/Root/index.tsx
|
|
3458
|
-
import { jsx as
|
|
3588
|
+
import { jsx as jsx63 } from "react/jsx-runtime";
|
|
3459
3589
|
var Root9 = function(param) {
|
|
3460
3590
|
var children = param.children;
|
|
3461
|
-
return /* @__PURE__ */
|
|
3462
|
-
children: /* @__PURE__ */
|
|
3591
|
+
return /* @__PURE__ */ jsx63(ToastsProvider, {
|
|
3592
|
+
children: /* @__PURE__ */ jsx63(Provider3, {
|
|
3463
3593
|
children: children
|
|
3464
3594
|
})
|
|
3465
3595
|
});
|
|
3466
3596
|
};
|
|
3467
3597
|
// src/components/threads/ThreadDialog/Trigger/index.tsx
|
|
3468
|
-
import { Flex as
|
|
3598
|
+
import { Flex as Flex23 } from "@radix-ui/themes";
|
|
3469
3599
|
// src/components/threads/ThreadDialog/Trigger/Button.tsx
|
|
3470
3600
|
import { IconButton as IconButton5 } from "@radix-ui/themes";
|
|
3471
3601
|
import { ChatBubbleIcon } from "@radix-ui/react-icons";
|
|
3472
|
-
import { jsx as
|
|
3602
|
+
import { jsx as jsx64 } from "react/jsx-runtime";
|
|
3473
3603
|
var Button3 = function() {
|
|
3474
|
-
return /* @__PURE__ */
|
|
3604
|
+
return /* @__PURE__ */ jsx64(IconButton5, {
|
|
3475
3605
|
size: "4",
|
|
3476
3606
|
radius: "full",
|
|
3477
|
-
children: /* @__PURE__ */
|
|
3607
|
+
children: /* @__PURE__ */ jsx64(ChatBubbleIcon, {})
|
|
3478
3608
|
});
|
|
3479
3609
|
};
|
|
3480
3610
|
// src/components/threads/ThreadDialog/Trigger/index.tsx
|
|
3481
|
-
import { jsx as
|
|
3611
|
+
import { jsx as jsx65 } from "react/jsx-runtime";
|
|
3482
3612
|
var Root10 = function(param) {
|
|
3483
3613
|
var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
|
|
3484
3614
|
var _useThreadDialogContext = useThreadDialogContext(), setIsOpen = _useThreadDialogContext.setIsOpen, isOpen = _useThreadDialogContext.isOpen;
|
|
3485
|
-
return /* @__PURE__ */
|
|
3615
|
+
return /* @__PURE__ */ jsx65(Flex23, {
|
|
3486
3616
|
display: {
|
|
3487
3617
|
initial: isOpen ? "none" : "flex",
|
|
3488
3618
|
sm: "flex"
|
|
@@ -3506,21 +3636,21 @@ var Root10 = function(param) {
|
|
|
3506
3636
|
});
|
|
3507
3637
|
};
|
|
3508
3638
|
var Trigger = function(args) {
|
|
3509
|
-
return /* @__PURE__ */
|
|
3510
|
-
children: /* @__PURE__ */
|
|
3639
|
+
return /* @__PURE__ */ jsx65(Root10, _object_spread_props(_object_spread({}, args), {
|
|
3640
|
+
children: /* @__PURE__ */ jsx65(Button3, {})
|
|
3511
3641
|
}));
|
|
3512
3642
|
};
|
|
3513
3643
|
Trigger.Root = Root10;
|
|
3514
3644
|
Trigger.Button = Button3;
|
|
3515
3645
|
// src/components/threads/ThreadDialog/Content/index.tsx
|
|
3516
|
-
import { Card as
|
|
3646
|
+
import { Card as Card3, Inset, Flex as Flex25 } from "@radix-ui/themes";
|
|
3517
3647
|
// src/components/threads/ThreadDialog/Close/index.tsx
|
|
3518
3648
|
import { Cross1Icon } from "@radix-ui/react-icons";
|
|
3519
|
-
import { IconButton as IconButton6, Flex as
|
|
3520
|
-
import { jsx as
|
|
3649
|
+
import { IconButton as IconButton6, Flex as Flex24 } from "@radix-ui/themes";
|
|
3650
|
+
import { jsx as jsx66 } from "react/jsx-runtime";
|
|
3521
3651
|
var Close = function() {
|
|
3522
3652
|
var _useThreadDialogContext = useThreadDialogContext(), setIsOpen = _useThreadDialogContext.setIsOpen, isOpen = _useThreadDialogContext.isOpen;
|
|
3523
|
-
return /* @__PURE__ */
|
|
3653
|
+
return /* @__PURE__ */ jsx66(Flex24, {
|
|
3524
3654
|
display: {
|
|
3525
3655
|
initial: isOpen ? "flex" : "none",
|
|
3526
3656
|
sm: "none"
|
|
@@ -3540,20 +3670,20 @@ var Close = function() {
|
|
|
3540
3670
|
style: {
|
|
3541
3671
|
zIndex: 9999999999
|
|
3542
3672
|
},
|
|
3543
|
-
children: /* @__PURE__ */
|
|
3673
|
+
children: /* @__PURE__ */ jsx66(IconButton6, {
|
|
3544
3674
|
size: "2",
|
|
3545
3675
|
variant: "soft",
|
|
3546
|
-
children: /* @__PURE__ */
|
|
3676
|
+
children: /* @__PURE__ */ jsx66(Cross1Icon, {})
|
|
3547
3677
|
})
|
|
3548
3678
|
});
|
|
3549
3679
|
};
|
|
3550
3680
|
// src/components/threads/ThreadDialog/Content/index.tsx
|
|
3551
|
-
import { jsx as
|
|
3681
|
+
import { jsx as jsx67, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3552
3682
|
var Root11 = function(param) {
|
|
3553
3683
|
var children = param.children, _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
|
|
3554
3684
|
var isOpen = useThreadDialogContext().isOpen;
|
|
3555
3685
|
if (!isOpen) return null;
|
|
3556
|
-
return /* @__PURE__ */
|
|
3686
|
+
return /* @__PURE__ */ jsx67(Flex25, {
|
|
3557
3687
|
direction: "column",
|
|
3558
3688
|
justify: "end",
|
|
3559
3689
|
position: "fixed",
|
|
@@ -3581,7 +3711,7 @@ var Root11 = function(param) {
|
|
|
3581
3711
|
style: _object_spread({
|
|
3582
3712
|
zIndex: 9999999999
|
|
3583
3713
|
}, style),
|
|
3584
|
-
children: /* @__PURE__ */
|
|
3714
|
+
children: /* @__PURE__ */ jsxs24(Card3, {
|
|
3585
3715
|
mb: {
|
|
3586
3716
|
initial: void 0,
|
|
3587
3717
|
sm: "3"
|
|
@@ -3592,7 +3722,7 @@ var Root11 = function(param) {
|
|
|
3592
3722
|
flexGrow: 1
|
|
3593
3723
|
},
|
|
3594
3724
|
children: [
|
|
3595
|
-
/* @__PURE__ */
|
|
3725
|
+
/* @__PURE__ */ jsx67(Inset, {
|
|
3596
3726
|
clip: "padding-box",
|
|
3597
3727
|
side: "all",
|
|
3598
3728
|
pb: "current",
|
|
@@ -3602,13 +3732,13 @@ var Root11 = function(param) {
|
|
|
3602
3732
|
},
|
|
3603
3733
|
children: children
|
|
3604
3734
|
}),
|
|
3605
|
-
/* @__PURE__ */
|
|
3735
|
+
/* @__PURE__ */ jsx67(Close, {})
|
|
3606
3736
|
]
|
|
3607
3737
|
})
|
|
3608
3738
|
});
|
|
3609
3739
|
};
|
|
3610
3740
|
var Messages2 = function() {
|
|
3611
|
-
return /* @__PURE__ */
|
|
3741
|
+
return /* @__PURE__ */ jsx67(Thread.Messages, {
|
|
3612
3742
|
style: {
|
|
3613
3743
|
paddingTop: "var(--space-5)",
|
|
3614
3744
|
paddingRight: "var(--space-5)",
|
|
@@ -3618,7 +3748,7 @@ var Messages2 = function() {
|
|
|
3618
3748
|
};
|
|
3619
3749
|
var FormContainer = function(param) {
|
|
3620
3750
|
var children = param.children;
|
|
3621
|
-
return /* @__PURE__ */
|
|
3751
|
+
return /* @__PURE__ */ jsx67(Flex25, {
|
|
3622
3752
|
direction: "column",
|
|
3623
3753
|
pl: "5",
|
|
3624
3754
|
pr: "5",
|
|
@@ -3627,38 +3757,38 @@ var FormContainer = function(param) {
|
|
|
3627
3757
|
children: children
|
|
3628
3758
|
});
|
|
3629
3759
|
};
|
|
3630
|
-
var
|
|
3760
|
+
var Content5 = function(param) {
|
|
3631
3761
|
var _param_style = param.style, style = _param_style === void 0 ? {} : _param_style;
|
|
3632
|
-
return /* @__PURE__ */
|
|
3762
|
+
return /* @__PURE__ */ jsx67(Root11, {
|
|
3633
3763
|
style: style,
|
|
3634
|
-
children: /* @__PURE__ */
|
|
3764
|
+
children: /* @__PURE__ */ jsxs24(Thread.Root, {
|
|
3635
3765
|
children: [
|
|
3636
|
-
/* @__PURE__ */
|
|
3637
|
-
/* @__PURE__ */
|
|
3638
|
-
children: /* @__PURE__ */
|
|
3766
|
+
/* @__PURE__ */ jsx67(Messages2, {}),
|
|
3767
|
+
/* @__PURE__ */ jsx67(FormContainer, {
|
|
3768
|
+
children: /* @__PURE__ */ jsx67(Thread.MessageForm, {})
|
|
3639
3769
|
})
|
|
3640
3770
|
]
|
|
3641
3771
|
})
|
|
3642
3772
|
});
|
|
3643
3773
|
};
|
|
3644
|
-
|
|
3645
|
-
|
|
3646
|
-
|
|
3774
|
+
Content5.Root = Root11;
|
|
3775
|
+
Content5.Messages = Messages2;
|
|
3776
|
+
Content5.FormContainer = FormContainer;
|
|
3647
3777
|
// src/components/threads/ThreadDialog/index.tsx
|
|
3648
|
-
import { jsx as
|
|
3778
|
+
import { jsx as jsx68, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3649
3779
|
var ThreadDialog = function() {
|
|
3650
|
-
return /* @__PURE__ */
|
|
3780
|
+
return /* @__PURE__ */ jsxs25(Root9, {
|
|
3651
3781
|
children: [
|
|
3652
|
-
/* @__PURE__ */
|
|
3653
|
-
/* @__PURE__ */
|
|
3782
|
+
/* @__PURE__ */ jsx68(Content5, {}),
|
|
3783
|
+
/* @__PURE__ */ jsx68(Trigger, {})
|
|
3654
3784
|
]
|
|
3655
3785
|
});
|
|
3656
3786
|
};
|
|
3657
3787
|
ThreadDialog.Root = Root9;
|
|
3658
3788
|
ThreadDialog.Trigger = Trigger;
|
|
3659
|
-
ThreadDialog.Content =
|
|
3789
|
+
ThreadDialog.Content = Content5;
|
|
3660
3790
|
// src/components/threads/AudioThread/Root/index.tsx
|
|
3661
|
-
import { Flex as
|
|
3791
|
+
import { Flex as Flex26 } from "@radix-ui/themes";
|
|
3662
3792
|
// src/contexts/threads/AudioThreadContext/index.ts
|
|
3663
3793
|
import { createContext as createContext12 } from "react";
|
|
3664
3794
|
var AudioThreadContext = createContext12({
|
|
@@ -4166,7 +4296,7 @@ var useMessageAudio = function(param) {
|
|
|
4166
4296
|
});
|
|
4167
4297
|
};
|
|
4168
4298
|
// src/components/threads/AudioThread/Root/index.tsx
|
|
4169
|
-
import { jsx as
|
|
4299
|
+
import { jsx as jsx69 } from "react/jsx-runtime";
|
|
4170
4300
|
var Root12 = function(param) {
|
|
4171
4301
|
var children = param.children;
|
|
4172
4302
|
var createMessageProps = useCreateMessage();
|
|
@@ -4224,13 +4354,13 @@ var Root12 = function(param) {
|
|
|
4224
4354
|
createMessageProps: createMessageProps,
|
|
4225
4355
|
messageAudioProps: messageAudioProps
|
|
4226
4356
|
}).status;
|
|
4227
|
-
return /* @__PURE__ */
|
|
4357
|
+
return /* @__PURE__ */ jsx69(AudioThreadContext.Provider, {
|
|
4228
4358
|
value: {
|
|
4229
4359
|
status: status,
|
|
4230
4360
|
recorderProps: recorderProps,
|
|
4231
4361
|
messageAudioProps: messageAudioProps
|
|
4232
4362
|
},
|
|
4233
|
-
children: /* @__PURE__ */
|
|
4363
|
+
children: /* @__PURE__ */ jsx69(Flex26, {
|
|
4234
4364
|
direction: "column",
|
|
4235
4365
|
flexGrow: "1",
|
|
4236
4366
|
p: "9",
|
|
@@ -4241,7 +4371,7 @@ var Root12 = function(param) {
|
|
|
4241
4371
|
// src/components/threads/AudioThread/Visualization/index.tsx
|
|
4242
4372
|
import { useContext as useContext15, useState as useState8, useCallback as useCallback6, useEffect as useEffect10 } from "react";
|
|
4243
4373
|
import _9 from "lodash";
|
|
4244
|
-
import { Flex as
|
|
4374
|
+
import { Flex as Flex28 } from "@radix-ui/themes";
|
|
4245
4375
|
// src/hooks/threads/useAudioThreadContext/index.ts
|
|
4246
4376
|
import { useContext as useContext14 } from "react";
|
|
4247
4377
|
var useAudioThreadContext = function() {
|
|
@@ -4249,10 +4379,10 @@ var useAudioThreadContext = function() {
|
|
|
4249
4379
|
};
|
|
4250
4380
|
// src/components/threads/AudioThread/BarsVisualizer/index.tsx
|
|
4251
4381
|
import _8 from "lodash";
|
|
4252
|
-
import { Flex as
|
|
4382
|
+
import { Flex as Flex27, Grid } from "@radix-ui/themes";
|
|
4253
4383
|
import { useState as useState7, useEffect as useEffect9, useCallback as useCallback5 } from "react";
|
|
4254
4384
|
import { cluster } from "radash";
|
|
4255
|
-
import { jsx as
|
|
4385
|
+
import { jsx as jsx70 } from "react/jsx-runtime";
|
|
4256
4386
|
var barCount = 4;
|
|
4257
4387
|
var BarsVisualizer = function(param) {
|
|
4258
4388
|
var visualizationAnalyser = param.visualizationAnalyser, backgroundColor = param.backgroundColor, height = param.height, barWidth = param.barWidth;
|
|
@@ -4283,7 +4413,7 @@ var BarsVisualizer = function(param) {
|
|
|
4283
4413
|
draw,
|
|
4284
4414
|
visualizationAnalyser
|
|
4285
4415
|
]);
|
|
4286
|
-
return /* @__PURE__ */
|
|
4416
|
+
return /* @__PURE__ */ jsx70(Grid, {
|
|
4287
4417
|
columns: "".concat(barCount),
|
|
4288
4418
|
gap: "1",
|
|
4289
4419
|
width: "auto",
|
|
@@ -4292,12 +4422,12 @@ var BarsVisualizer = function(param) {
|
|
|
4292
4422
|
gridTemplateColumns: "repeat(4, minmax(0, 1fr))"
|
|
4293
4423
|
},
|
|
4294
4424
|
children: barHeights.map(function(barHeight, index) {
|
|
4295
|
-
return /* @__PURE__ */
|
|
4425
|
+
return /* @__PURE__ */ jsx70(Flex27, {
|
|
4296
4426
|
direction: "column",
|
|
4297
4427
|
align: "center",
|
|
4298
4428
|
justify: "center",
|
|
4299
4429
|
height: height,
|
|
4300
|
-
children: /* @__PURE__ */
|
|
4430
|
+
children: /* @__PURE__ */ jsx70(Flex27, {
|
|
4301
4431
|
minHeight: "50%",
|
|
4302
4432
|
maxHeight: "100%",
|
|
4303
4433
|
height: "".concat(barHeight + 20, "%"),
|
|
@@ -4312,7 +4442,7 @@ var BarsVisualizer = function(param) {
|
|
|
4312
4442
|
});
|
|
4313
4443
|
};
|
|
4314
4444
|
// src/components/threads/AudioThread/Visualization/index.tsx
|
|
4315
|
-
import { jsx as
|
|
4445
|
+
import { jsx as jsx71, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
4316
4446
|
var Visualization = function() {
|
|
4317
4447
|
var audioThreadContext = useAudioThreadContext();
|
|
4318
4448
|
var assistantNameContext = useContext15(AssistantNameContext);
|
|
@@ -4340,14 +4470,14 @@ var Visualization = function() {
|
|
|
4340
4470
|
draw,
|
|
4341
4471
|
audioThreadContext
|
|
4342
4472
|
]);
|
|
4343
|
-
return /* @__PURE__ */
|
|
4473
|
+
return /* @__PURE__ */ jsxs26(Flex28, {
|
|
4344
4474
|
direction: "column",
|
|
4345
4475
|
align: "center",
|
|
4346
4476
|
justify: "center",
|
|
4347
4477
|
mb: "3",
|
|
4348
4478
|
flexGrow: "1",
|
|
4349
4479
|
children: [
|
|
4350
|
-
/* @__PURE__ */
|
|
4480
|
+
/* @__PURE__ */ jsx71(Flex28, {
|
|
4351
4481
|
align: "center",
|
|
4352
4482
|
justify: "center",
|
|
4353
4483
|
height: "200px",
|
|
@@ -4357,20 +4487,20 @@ var Visualization = function() {
|
|
|
4357
4487
|
borderRadius: "9999px",
|
|
4358
4488
|
scale: scale
|
|
4359
4489
|
},
|
|
4360
|
-
children: /* @__PURE__ */
|
|
4490
|
+
children: /* @__PURE__ */ jsx71(BarsVisualizer, {
|
|
4361
4491
|
visualizationAnalyser: audioThreadContext.messageAudioProps.visualizationAnalyser,
|
|
4362
4492
|
backgroundColor: audioThreadContext.status === "playing" ? "var(--accent-11)" : "var(--gray-11)",
|
|
4363
4493
|
height: "40px",
|
|
4364
4494
|
barWidth: "24px"
|
|
4365
4495
|
})
|
|
4366
4496
|
}),
|
|
4367
|
-
/* @__PURE__ */
|
|
4497
|
+
/* @__PURE__ */ jsxs26(Flex28, {
|
|
4368
4498
|
ml: "-22.5px",
|
|
4369
4499
|
gap: "3",
|
|
4370
4500
|
pt: "5",
|
|
4371
4501
|
children: [
|
|
4372
|
-
/* @__PURE__ */
|
|
4373
|
-
/* @__PURE__ */
|
|
4502
|
+
/* @__PURE__ */ jsx71(AssistantAvatar, {}),
|
|
4503
|
+
/* @__PURE__ */ jsx71(Name, {
|
|
4374
4504
|
children: assistantNameContext
|
|
4375
4505
|
})
|
|
4376
4506
|
]
|
|
@@ -4379,8 +4509,8 @@ var Visualization = function() {
|
|
|
4379
4509
|
});
|
|
4380
4510
|
};
|
|
4381
4511
|
// src/components/threads/AudioThread/Status/StatusMessages.tsx
|
|
4382
|
-
import { Flex as
|
|
4383
|
-
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";
|
|
4384
4514
|
var html = function(param) {
|
|
4385
4515
|
var texts = param.texts;
|
|
4386
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) {
|
|
@@ -4389,17 +4519,17 @@ var html = function(param) {
|
|
|
4389
4519
|
};
|
|
4390
4520
|
var StatusMessages = function(param) {
|
|
4391
4521
|
var texts = param.texts;
|
|
4392
|
-
return /* @__PURE__ */
|
|
4522
|
+
return /* @__PURE__ */ jsxs27(Flex29, {
|
|
4393
4523
|
justify: "center",
|
|
4394
4524
|
pb: "5",
|
|
4395
4525
|
children: [
|
|
4396
|
-
/* @__PURE__ */
|
|
4526
|
+
/* @__PURE__ */ jsx72(Text8, {
|
|
4397
4527
|
size: "2",
|
|
4398
4528
|
weight: "regular",
|
|
4399
4529
|
color: "gray",
|
|
4400
4530
|
className: "status-messages-texts"
|
|
4401
4531
|
}),
|
|
4402
|
-
/* @__PURE__ */
|
|
4532
|
+
/* @__PURE__ */ jsx72("style", {
|
|
4403
4533
|
dangerouslySetInnerHTML: {
|
|
4404
4534
|
__html: html({
|
|
4405
4535
|
texts: texts
|
|
@@ -4410,11 +4540,11 @@ var StatusMessages = function(param) {
|
|
|
4410
4540
|
});
|
|
4411
4541
|
};
|
|
4412
4542
|
// src/components/threads/AudioThread/Status/index.tsx
|
|
4413
|
-
import { jsx as
|
|
4543
|
+
import { jsx as jsx73 } from "react/jsx-runtime";
|
|
4414
4544
|
var Status = function() {
|
|
4415
4545
|
var audioThreadContext = useAudioThreadContext();
|
|
4416
4546
|
if (audioThreadContext.status === "recording") {
|
|
4417
|
-
return /* @__PURE__ */
|
|
4547
|
+
return /* @__PURE__ */ jsx73(StatusMessages, {
|
|
4418
4548
|
texts: [
|
|
4419
4549
|
"Start speaking",
|
|
4420
4550
|
"Listening",
|
|
@@ -4428,31 +4558,31 @@ var Status = function() {
|
|
|
4428
4558
|
"idle",
|
|
4429
4559
|
"playerPaused"
|
|
4430
4560
|
].includes(audioThreadContext.status)) {
|
|
4431
|
-
return /* @__PURE__ */
|
|
4561
|
+
return /* @__PURE__ */ jsx73(StatusMessages, {
|
|
4432
4562
|
texts: [
|
|
4433
4563
|
"Click the button below to activate"
|
|
4434
4564
|
]
|
|
4435
4565
|
});
|
|
4436
4566
|
}
|
|
4437
4567
|
if (audioThreadContext.status === "playing") {
|
|
4438
|
-
return /* @__PURE__ */
|
|
4568
|
+
return /* @__PURE__ */ jsx73(StatusMessages, {
|
|
4439
4569
|
texts: [
|
|
4440
4570
|
"Click the button below to interrupt"
|
|
4441
4571
|
]
|
|
4442
4572
|
});
|
|
4443
4573
|
}
|
|
4444
|
-
return /* @__PURE__ */
|
|
4574
|
+
return /* @__PURE__ */ jsx73(StatusMessages, {
|
|
4445
4575
|
texts: [
|
|
4446
4576
|
"Thinking"
|
|
4447
4577
|
]
|
|
4448
4578
|
});
|
|
4449
4579
|
};
|
|
4450
4580
|
// src/components/threads/AudioThread/Form/index.tsx
|
|
4451
|
-
import { Flex as
|
|
4581
|
+
import { Flex as Flex31 } from "@radix-ui/themes";
|
|
4452
4582
|
// src/components/threads/AudioThread/Form/MicIcon.tsx
|
|
4453
|
-
import { jsx as
|
|
4583
|
+
import { jsx as jsx74 } from "react/jsx-runtime";
|
|
4454
4584
|
var MicIcon = function(props) {
|
|
4455
|
-
return /* @__PURE__ */
|
|
4585
|
+
return /* @__PURE__ */ jsx74("svg", _object_spread_props(_object_spread({
|
|
4456
4586
|
xmlns: "http://www.w3.org/2000/svg",
|
|
4457
4587
|
fill: "currentColor",
|
|
4458
4588
|
stroke: "currentColor",
|
|
@@ -4461,54 +4591,54 @@ var MicIcon = function(props) {
|
|
|
4461
4591
|
height: "15",
|
|
4462
4592
|
width: "15"
|
|
4463
4593
|
}, props), {
|
|
4464
|
-
children: /* @__PURE__ */
|
|
4594
|
+
children: /* @__PURE__ */ jsx74("path", {
|
|
4465
4595
|
stroke: "none",
|
|
4466
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"
|
|
4467
4597
|
})
|
|
4468
4598
|
}));
|
|
4469
4599
|
};
|
|
4470
4600
|
// src/components/threads/AudioThread/Form/ActionButton/index.tsx
|
|
4471
|
-
import { Flex as
|
|
4601
|
+
import { Flex as Flex30, IconButton as IconButton7 } from "@radix-ui/themes";
|
|
4472
4602
|
import { StopIcon as StopIcon2, PauseIcon, ArrowUpIcon as ArrowUpIcon2, ResumeIcon } from "@radix-ui/react-icons";
|
|
4473
|
-
import { jsx as
|
|
4603
|
+
import { jsx as jsx75, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
4474
4604
|
var ActionButton = function() {
|
|
4475
4605
|
var audioThreadContext = useAudioThreadContext();
|
|
4476
4606
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
4477
4607
|
if (audioThreadContext.status === "recording") {
|
|
4478
|
-
return /* @__PURE__ */
|
|
4608
|
+
return /* @__PURE__ */ jsxs28(Flex30, {
|
|
4479
4609
|
align: "center",
|
|
4480
4610
|
children: [
|
|
4481
|
-
/* @__PURE__ */
|
|
4611
|
+
/* @__PURE__ */ jsx75(Flex30, {
|
|
4482
4612
|
mr: "3",
|
|
4483
4613
|
ml: "-7",
|
|
4484
|
-
children: /* @__PURE__ */
|
|
4614
|
+
children: /* @__PURE__ */ jsx75(IconButton7, {
|
|
4485
4615
|
onClick: audioThreadContext.recorderProps.pause,
|
|
4486
4616
|
color: "gray",
|
|
4487
4617
|
variant: "soft",
|
|
4488
4618
|
size: "1",
|
|
4489
|
-
children: /* @__PURE__ */
|
|
4619
|
+
children: /* @__PURE__ */ jsx75(PauseIcon, {})
|
|
4490
4620
|
})
|
|
4491
4621
|
}),
|
|
4492
|
-
/* @__PURE__ */
|
|
4622
|
+
/* @__PURE__ */ jsx75(IconButton7, {
|
|
4493
4623
|
onClick: audioThreadContext.recorderProps.stop,
|
|
4494
4624
|
highContrast: true,
|
|
4495
4625
|
variant: "soft",
|
|
4496
4626
|
size: "4",
|
|
4497
|
-
children: /* @__PURE__ */
|
|
4627
|
+
children: /* @__PURE__ */ jsx75(ArrowUpIcon2, {})
|
|
4498
4628
|
})
|
|
4499
4629
|
]
|
|
4500
4630
|
});
|
|
4501
4631
|
}
|
|
4502
4632
|
if (audioThreadContext.status === "recorderPaused") {
|
|
4503
|
-
return /* @__PURE__ */
|
|
4633
|
+
return /* @__PURE__ */ jsx75(IconButton7, {
|
|
4504
4634
|
onClick: audioThreadContext.recorderProps.resume,
|
|
4505
4635
|
color: "red",
|
|
4506
4636
|
size: "4",
|
|
4507
|
-
children: /* @__PURE__ */
|
|
4637
|
+
children: /* @__PURE__ */ jsx75(ResumeIcon, {})
|
|
4508
4638
|
});
|
|
4509
4639
|
}
|
|
4510
4640
|
if (audioThreadContext.status === "idle") {
|
|
4511
|
-
return /* @__PURE__ */
|
|
4641
|
+
return /* @__PURE__ */ jsx75(IconButton7, {
|
|
4512
4642
|
onClick: function() {
|
|
4513
4643
|
return audioThreadContext.recorderProps.start();
|
|
4514
4644
|
},
|
|
@@ -4517,7 +4647,7 @@ var ActionButton = function() {
|
|
|
4517
4647
|
});
|
|
4518
4648
|
}
|
|
4519
4649
|
if (audioThreadContext.status === "playing") {
|
|
4520
|
-
return /* @__PURE__ */
|
|
4650
|
+
return /* @__PURE__ */ jsx75(IconButton7, {
|
|
4521
4651
|
onClick: function() {
|
|
4522
4652
|
var _superinterfaceContext_createMessageAbortControllerRef_current;
|
|
4523
4653
|
audioThreadContext.messageAudioProps.stop();
|
|
@@ -4527,54 +4657,54 @@ var ActionButton = function() {
|
|
|
4527
4657
|
size: "4",
|
|
4528
4658
|
color: "gray",
|
|
4529
4659
|
variant: "soft",
|
|
4530
|
-
children: /* @__PURE__ */
|
|
4660
|
+
children: /* @__PURE__ */ jsx75(StopIcon2, {})
|
|
4531
4661
|
});
|
|
4532
4662
|
}
|
|
4533
4663
|
if (audioThreadContext.status === "playerPaused") {
|
|
4534
|
-
return /* @__PURE__ */
|
|
4664
|
+
return /* @__PURE__ */ jsx75(IconButton7, {
|
|
4535
4665
|
onClick: function() {
|
|
4536
4666
|
return audioThreadContext.messageAudioProps.play();
|
|
4537
4667
|
},
|
|
4538
4668
|
size: "4",
|
|
4539
|
-
children: /* @__PURE__ */
|
|
4669
|
+
children: /* @__PURE__ */ jsx75(ResumeIcon, {})
|
|
4540
4670
|
});
|
|
4541
4671
|
}
|
|
4542
|
-
return /* @__PURE__ */
|
|
4672
|
+
return /* @__PURE__ */ jsx75(IconButton7, {
|
|
4543
4673
|
size: "4",
|
|
4544
4674
|
variant: "soft",
|
|
4545
4675
|
disabled: true
|
|
4546
4676
|
});
|
|
4547
4677
|
};
|
|
4548
4678
|
// src/components/threads/AudioThread/Form/index.tsx
|
|
4549
|
-
import { jsx as
|
|
4679
|
+
import { jsx as jsx76, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
4550
4680
|
var Form = function() {
|
|
4551
4681
|
var audioThreadContext = useAudioThreadContext();
|
|
4552
|
-
return /* @__PURE__ */
|
|
4682
|
+
return /* @__PURE__ */ jsxs29(Flex31, {
|
|
4553
4683
|
direction: "column",
|
|
4554
4684
|
align: "center",
|
|
4555
4685
|
children: [
|
|
4556
|
-
/* @__PURE__ */
|
|
4686
|
+
/* @__PURE__ */ jsxs29(Flex31, {
|
|
4557
4687
|
pb: "3",
|
|
4558
4688
|
align: "center",
|
|
4559
4689
|
children: [
|
|
4560
|
-
/* @__PURE__ */
|
|
4690
|
+
/* @__PURE__ */ jsx76(Flex31, {
|
|
4561
4691
|
ml: "-22.5px",
|
|
4562
4692
|
mr: "2",
|
|
4563
4693
|
align: "center",
|
|
4564
|
-
children: /* @__PURE__ */
|
|
4694
|
+
children: /* @__PURE__ */ jsx76(MicIcon, {
|
|
4565
4695
|
style: {
|
|
4566
4696
|
color: audioThreadContext.status === "recording" ? "var(--accent-11)" : "var(--gray-11)"
|
|
4567
4697
|
}
|
|
4568
4698
|
})
|
|
4569
4699
|
}),
|
|
4570
|
-
/* @__PURE__ */
|
|
4700
|
+
/* @__PURE__ */ jsx76(Flex31, {
|
|
4571
4701
|
px: "2",
|
|
4572
4702
|
py: "1",
|
|
4573
4703
|
style: {
|
|
4574
4704
|
backgroundColor: audioThreadContext.status === "recording" ? "var(--accent-4)" : "var(--gray-4)",
|
|
4575
4705
|
borderRadius: "var(--radius-6)"
|
|
4576
4706
|
},
|
|
4577
|
-
children: /* @__PURE__ */
|
|
4707
|
+
children: /* @__PURE__ */ jsx76(BarsVisualizer, {
|
|
4578
4708
|
visualizationAnalyser: audioThreadContext.recorderProps.visualizationAnalyser,
|
|
4579
4709
|
backgroundColor: audioThreadContext.status === "recording" ? "var(--accent-11)" : "var(--gray-11)",
|
|
4580
4710
|
height: "20px",
|
|
@@ -4583,18 +4713,18 @@ var Form = function() {
|
|
|
4583
4713
|
})
|
|
4584
4714
|
]
|
|
4585
4715
|
}),
|
|
4586
|
-
/* @__PURE__ */
|
|
4716
|
+
/* @__PURE__ */ jsx76(ActionButton, {})
|
|
4587
4717
|
]
|
|
4588
4718
|
});
|
|
4589
4719
|
};
|
|
4590
4720
|
// src/components/threads/AudioThread/index.tsx
|
|
4591
|
-
import { jsx as
|
|
4721
|
+
import { jsx as jsx77, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
4592
4722
|
var AudioThread = function(props) {
|
|
4593
|
-
return /* @__PURE__ */
|
|
4723
|
+
return /* @__PURE__ */ jsxs30(Root12, _object_spread_props(_object_spread({}, props), {
|
|
4594
4724
|
children: [
|
|
4595
|
-
/* @__PURE__ */
|
|
4596
|
-
/* @__PURE__ */
|
|
4597
|
-
/* @__PURE__ */
|
|
4725
|
+
/* @__PURE__ */ jsx77(Visualization, {}),
|
|
4726
|
+
/* @__PURE__ */ jsx77(Status, {}),
|
|
4727
|
+
/* @__PURE__ */ jsx77(Form, {})
|
|
4598
4728
|
]
|
|
4599
4729
|
}));
|
|
4600
4730
|
};
|
|
@@ -4602,35 +4732,35 @@ AudioThread.Root = Root12;
|
|
|
4602
4732
|
AudioThread.Visualization = Visualization;
|
|
4603
4733
|
AudioThread.Form = Form;
|
|
4604
4734
|
// src/components/threads/AudioThreadDialog/index.tsx
|
|
4605
|
-
import { jsx as
|
|
4735
|
+
import { jsx as jsx78, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
4606
4736
|
var AudioThreadDialog = function() {
|
|
4607
|
-
return /* @__PURE__ */
|
|
4737
|
+
return /* @__PURE__ */ jsxs31(Root9, {
|
|
4608
4738
|
children: [
|
|
4609
|
-
/* @__PURE__ */
|
|
4610
|
-
children: /* @__PURE__ */
|
|
4739
|
+
/* @__PURE__ */ jsx78(Content5.Root, {
|
|
4740
|
+
children: /* @__PURE__ */ jsx78(AudioThread, {})
|
|
4611
4741
|
}),
|
|
4612
|
-
/* @__PURE__ */
|
|
4742
|
+
/* @__PURE__ */ jsx78(Trigger, {})
|
|
4613
4743
|
]
|
|
4614
4744
|
});
|
|
4615
4745
|
};
|
|
4616
4746
|
AudioThreadDialog.Root = Root9;
|
|
4617
4747
|
AudioThreadDialog.Trigger = Trigger;
|
|
4618
|
-
AudioThreadDialog.Content =
|
|
4748
|
+
AudioThreadDialog.Content = Content5;
|
|
4619
4749
|
// src/components/suggestions/Suggestions/index.tsx
|
|
4620
4750
|
import { useMemo as useMemo15 } from "react";
|
|
4621
4751
|
// src/components/suggestions/Suggestions/Content.tsx
|
|
4622
4752
|
import { useMemo as useMemo14 } from "react";
|
|
4623
4753
|
import { isEmpty as isEmpty3 } from "radash";
|
|
4624
4754
|
import { onlyText } from "react-children-utilities";
|
|
4625
|
-
import { Flex as
|
|
4755
|
+
import { Flex as Flex32 } from "@radix-ui/themes";
|
|
4626
4756
|
// src/components/suggestions/Suggestions/Item.tsx
|
|
4627
4757
|
import { ArrowUpIcon as ArrowUpIcon3 } from "@radix-ui/react-icons";
|
|
4628
|
-
import { Text as
|
|
4629
|
-
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";
|
|
4630
4760
|
var Item = function(param) {
|
|
4631
4761
|
var suggestion = param.suggestion, isDisabled = param.isDisabled;
|
|
4632
4762
|
var _useCreateMessage = useCreateMessage(), createMessage = _useCreateMessage.createMessage, isPending = _useCreateMessage.isPending;
|
|
4633
|
-
return /* @__PURE__ */
|
|
4763
|
+
return /* @__PURE__ */ jsx79(Content6, {
|
|
4634
4764
|
onClick: function() {
|
|
4635
4765
|
createMessage({
|
|
4636
4766
|
// @ts-ignore-next-line
|
|
@@ -4642,9 +4772,9 @@ var Item = function(param) {
|
|
|
4642
4772
|
children: suggestion
|
|
4643
4773
|
});
|
|
4644
4774
|
};
|
|
4645
|
-
var
|
|
4775
|
+
var Content6 = function(param) {
|
|
4646
4776
|
var onClick = param.onClick, isDisabled = param.isDisabled, isPending = param.isPending, children = param.children;
|
|
4647
|
-
return /* @__PURE__ */
|
|
4777
|
+
return /* @__PURE__ */ jsxs32(Button4, {
|
|
4648
4778
|
variant: "soft",
|
|
4649
4779
|
onClick: onClick,
|
|
4650
4780
|
disabled: isDisabled,
|
|
@@ -4654,14 +4784,14 @@ var Content5 = function(param) {
|
|
|
4654
4784
|
flexShrink: 1
|
|
4655
4785
|
},
|
|
4656
4786
|
children: [
|
|
4657
|
-
/* @__PURE__ */
|
|
4787
|
+
/* @__PURE__ */ jsx79(Text9, {
|
|
4658
4788
|
size: "1",
|
|
4659
4789
|
weight: "regular",
|
|
4660
4790
|
children: children
|
|
4661
4791
|
}),
|
|
4662
|
-
/* @__PURE__ */
|
|
4792
|
+
/* @__PURE__ */ jsx79(Spinner2, {
|
|
4663
4793
|
loading: isPending,
|
|
4664
|
-
children: /* @__PURE__ */
|
|
4794
|
+
children: /* @__PURE__ */ jsx79(ArrowUpIcon3, {
|
|
4665
4795
|
style: {
|
|
4666
4796
|
flexShrink: 0
|
|
4667
4797
|
}
|
|
@@ -4670,10 +4800,10 @@ var Content5 = function(param) {
|
|
|
4670
4800
|
]
|
|
4671
4801
|
});
|
|
4672
4802
|
};
|
|
4673
|
-
Item.Content =
|
|
4803
|
+
Item.Content = Content6;
|
|
4674
4804
|
// src/components/suggestions/Suggestions/Content.tsx
|
|
4675
|
-
import { jsx as
|
|
4676
|
-
var
|
|
4805
|
+
import { jsx as jsx80 } from "react/jsx-runtime";
|
|
4806
|
+
var Content7 = function(param) {
|
|
4677
4807
|
var children = param.children;
|
|
4678
4808
|
var isMutatingMessage = useIsMutatingMessage();
|
|
4679
4809
|
var suggestions = useMemo14(function() {
|
|
@@ -4686,12 +4816,12 @@ var Content6 = function(param) {
|
|
|
4686
4816
|
children
|
|
4687
4817
|
]);
|
|
4688
4818
|
if (isEmpty3(suggestions)) return null;
|
|
4689
|
-
return /* @__PURE__ */
|
|
4819
|
+
return /* @__PURE__ */ jsx80(Flex32, {
|
|
4690
4820
|
gap: "2",
|
|
4691
4821
|
py: "2",
|
|
4692
4822
|
wrap: "wrap",
|
|
4693
4823
|
children: suggestions.map(function(suggestion) {
|
|
4694
|
-
return /* @__PURE__ */
|
|
4824
|
+
return /* @__PURE__ */ jsx80(Item, {
|
|
4695
4825
|
suggestion: suggestion,
|
|
4696
4826
|
isDisabled: isMutatingMessage
|
|
4697
4827
|
}, suggestion);
|
|
@@ -4699,7 +4829,7 @@ var Content6 = function(param) {
|
|
|
4699
4829
|
});
|
|
4700
4830
|
};
|
|
4701
4831
|
// src/components/suggestions/Suggestions/index.tsx
|
|
4702
|
-
import { jsx as
|
|
4832
|
+
import { jsx as jsx81 } from "react/jsx-runtime";
|
|
4703
4833
|
var Suggestions = function(param) {
|
|
4704
4834
|
var children = param.children;
|
|
4705
4835
|
var latestMessageProps = useLatestMessage();
|
|
@@ -4712,14 +4842,14 @@ var Suggestions = function(param) {
|
|
|
4712
4842
|
]);
|
|
4713
4843
|
if (latestMessageProps.isLoading) return null;
|
|
4714
4844
|
if (isDisabled) return null;
|
|
4715
|
-
return /* @__PURE__ */
|
|
4845
|
+
return /* @__PURE__ */ jsx81(Content7, {
|
|
4716
4846
|
children: children
|
|
4717
4847
|
});
|
|
4718
4848
|
};
|
|
4719
4849
|
Suggestions.Item = Item;
|
|
4720
4850
|
// src/components/markdown/MarkdownProvider/index.tsx
|
|
4721
4851
|
import { useMemo as useMemo16 } from "react";
|
|
4722
|
-
import { jsx as
|
|
4852
|
+
import { jsx as jsx82 } from "react/jsx-runtime";
|
|
4723
4853
|
var MarkdownProvider = function(_param) {
|
|
4724
4854
|
var children = _param.children, rest = _object_without_properties(_param, [
|
|
4725
4855
|
"children"
|
|
@@ -4731,7 +4861,7 @@ var MarkdownProvider = function(_param) {
|
|
|
4731
4861
|
rest,
|
|
4732
4862
|
prevMarkdownContext
|
|
4733
4863
|
]);
|
|
4734
|
-
return /* @__PURE__ */
|
|
4864
|
+
return /* @__PURE__ */ jsx82(MarkdownContext.Provider, {
|
|
4735
4865
|
value: value,
|
|
4736
4866
|
children: children
|
|
4737
4867
|
});
|
|
@@ -4790,11 +4920,11 @@ var optimizedSrc = function(param) {
|
|
|
4790
4920
|
}));
|
|
4791
4921
|
};
|
|
4792
4922
|
// src/components/imageAvatars/ImageAvatar/index.tsx
|
|
4793
|
-
import { jsx as
|
|
4923
|
+
import { jsx as jsx83 } from "react/jsx-runtime";
|
|
4794
4924
|
var ImageAvatar = function(param) {
|
|
4795
4925
|
var imageAvatar = param.imageAvatar, size = param.size;
|
|
4796
4926
|
var superinterfaceContext = useSuperinterfaceContext();
|
|
4797
|
-
return /* @__PURE__ */
|
|
4927
|
+
return /* @__PURE__ */ jsx83(Avatar4, {
|
|
4798
4928
|
fallback: "",
|
|
4799
4929
|
src: optimizedSrc({
|
|
4800
4930
|
imageAvatar: imageAvatar,
|
|
@@ -4812,7 +4942,7 @@ import { BackpackIcon, RocketIcon, MagicWandIcon, CubeIcon, TargetIcon, DiscIcon
|
|
|
4812
4942
|
var _obj;
|
|
4813
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);
|
|
4814
4944
|
// src/components/iconAvatars/IconAvatar.tsx
|
|
4815
|
-
import { jsx as
|
|
4945
|
+
import { jsx as jsx84 } from "react/jsx-runtime";
|
|
4816
4946
|
var IconAvatar = function(param) {
|
|
4817
4947
|
var iconAvatar = param.iconAvatar, size = param.size;
|
|
4818
4948
|
var Component = useMemo17(function() {
|
|
@@ -4820,30 +4950,30 @@ var IconAvatar = function(param) {
|
|
|
4820
4950
|
}, [
|
|
4821
4951
|
iconAvatar
|
|
4822
4952
|
]);
|
|
4823
|
-
return /* @__PURE__ */
|
|
4953
|
+
return /* @__PURE__ */ jsx84(Avatar5, {
|
|
4824
4954
|
size: size,
|
|
4825
|
-
fallback: Component ? /* @__PURE__ */
|
|
4955
|
+
fallback: Component ? /* @__PURE__ */ jsx84(Component, {}) : ""
|
|
4826
4956
|
});
|
|
4827
4957
|
};
|
|
4828
4958
|
// src/components/avatars/Avatar.tsx
|
|
4829
|
-
import { jsx as
|
|
4959
|
+
import { jsx as jsx85 } from "react/jsx-runtime";
|
|
4830
4960
|
var Avatar6 = function(param) {
|
|
4831
4961
|
var avatar = param.avatar, _param_size = param.size, size = _param_size === void 0 ? "1" : _param_size;
|
|
4832
4962
|
if (avatar) {
|
|
4833
4963
|
if (avatar.type === "IMAGE" /* IMAGE */ && avatar.imageAvatar) {
|
|
4834
|
-
return /* @__PURE__ */
|
|
4964
|
+
return /* @__PURE__ */ jsx85(ImageAvatar, {
|
|
4835
4965
|
imageAvatar: avatar.imageAvatar,
|
|
4836
4966
|
size: size
|
|
4837
4967
|
});
|
|
4838
4968
|
}
|
|
4839
4969
|
if (avatar.type === "ICON" /* ICON */ && avatar.iconAvatar) {
|
|
4840
|
-
return /* @__PURE__ */
|
|
4970
|
+
return /* @__PURE__ */ jsx85(IconAvatar, {
|
|
4841
4971
|
iconAvatar: avatar.iconAvatar,
|
|
4842
4972
|
size: size
|
|
4843
4973
|
});
|
|
4844
4974
|
}
|
|
4845
4975
|
}
|
|
4846
|
-
return /* @__PURE__ */
|
|
4976
|
+
return /* @__PURE__ */ jsx85(RadixAvatar, {
|
|
4847
4977
|
fallback: "",
|
|
4848
4978
|
size: size
|
|
4849
4979
|
});
|
|
@@ -4856,7 +4986,7 @@ var useComponents = function() {
|
|
|
4856
4986
|
return useContext16(ComponentsContext);
|
|
4857
4987
|
};
|
|
4858
4988
|
// src/components/components/ComponentsProvider.tsx
|
|
4859
|
-
import { jsx as
|
|
4989
|
+
import { jsx as jsx86 } from "react/jsx-runtime";
|
|
4860
4990
|
var ComponentsProvider = function(_param) {
|
|
4861
4991
|
var children = _param.children, rest = _object_without_properties(_param, [
|
|
4862
4992
|
"children"
|
|
@@ -4868,7 +4998,7 @@ var ComponentsProvider = function(_param) {
|
|
|
4868
4998
|
rest,
|
|
4869
4999
|
prevComponents
|
|
4870
5000
|
]);
|
|
4871
|
-
return /* @__PURE__ */
|
|
5001
|
+
return /* @__PURE__ */ jsx86(ComponentsContext.Provider, {
|
|
4872
5002
|
value: value,
|
|
4873
5003
|
children: children
|
|
4874
5004
|
});
|