@ateam-ai-mobile/ui 0.1.4 → 0.1.5
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.js +376 -309
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +342 -275
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/chat/MessageBubble.tsx +11 -1
- package/src/chat/QuestionChips.tsx +76 -0
- package/src/chat/UIActionsRow.tsx +7 -1
package/dist/index.mjs
CHANGED
|
@@ -3,18 +3,18 @@ import { useCallback as useCallback5, useEffect as useEffect6, useMemo as useMem
|
|
|
3
3
|
import {
|
|
4
4
|
FlatList,
|
|
5
5
|
KeyboardAvoidingView,
|
|
6
|
-
Platform as
|
|
6
|
+
Platform as Platform7,
|
|
7
7
|
RefreshControl,
|
|
8
|
-
StyleSheet as
|
|
9
|
-
View as
|
|
8
|
+
StyleSheet as StyleSheet11,
|
|
9
|
+
View as View12
|
|
10
10
|
} from "react-native";
|
|
11
|
-
import { ada as
|
|
11
|
+
import { ada as ada8, useChatStore as useChatStore2, pluginCommandEmitter as pluginCommandEmitter3 } from "@ateam-ai-mobile/core";
|
|
12
12
|
|
|
13
13
|
// src/chat/MessageBubble.tsx
|
|
14
14
|
import { useState as useState4, useCallback as useCallback3 } from "react";
|
|
15
|
-
import { View as
|
|
15
|
+
import { View as View8, Text as Text7, Pressable as Pressable4, StyleSheet as StyleSheet7, Image, Platform as Platform5 } from "react-native";
|
|
16
16
|
import Markdown from "react-native-markdown-display";
|
|
17
|
-
import { TABLE_BLOCK_OPEN, TABLE_BLOCK_CLOSE, getConfig as getConfig2, ada as
|
|
17
|
+
import { TABLE_BLOCK_OPEN, TABLE_BLOCK_CLOSE, getConfig as getConfig2, ada as ada7, borderRadius as borderRadius2, fontSize as fontSize5 } from "@ateam-ai-mobile/core";
|
|
18
18
|
import { AdaOrb, getHaptics as getHaptics2 } from "@ateam-ai-mobile/plugin-runtime";
|
|
19
19
|
|
|
20
20
|
// src/chat/JobProgressBar.tsx
|
|
@@ -923,7 +923,8 @@ function UIActionsRow({ actions }) {
|
|
|
923
923
|
const focus = a.payload?.id || a.payload?.entity_id || a.payload?.focusId;
|
|
924
924
|
const surface = useSurfaceStore2.getState().manifests[id];
|
|
925
925
|
if (surface) {
|
|
926
|
-
|
|
926
|
+
const props = { ...focus ? { focus } : {}, ...a.payload?.data || {} };
|
|
927
|
+
useSurfaceStore2.getState().show(id, Object.keys(props).length ? props : void 0);
|
|
927
928
|
return;
|
|
928
929
|
}
|
|
929
930
|
const params = {};
|
|
@@ -998,47 +999,107 @@ var styles4 = StyleSheet4.create({
|
|
|
998
999
|
}
|
|
999
1000
|
});
|
|
1000
1001
|
|
|
1001
|
-
// src/chat/
|
|
1002
|
-
import { View as View6, Text as Text5, StyleSheet as StyleSheet5, Platform as Platform3 } from "react-native";
|
|
1003
|
-
import { ada as ada5,
|
|
1004
|
-
import { jsx as jsx7
|
|
1002
|
+
// src/chat/QuestionChips.tsx
|
|
1003
|
+
import { View as View6, Text as Text5, Pressable as Pressable3, StyleSheet as StyleSheet5, Platform as Platform3 } from "react-native";
|
|
1004
|
+
import { ada as ada5, fontSize as fontSize3, useChatStore } from "@ateam-ai-mobile/core";
|
|
1005
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
1005
1006
|
var fontFam2 = Platform3.OS === "ios" ? "SF Pro Rounded" : void 0;
|
|
1007
|
+
function resolveOptions(inputType, options) {
|
|
1008
|
+
if (Array.isArray(options) && options.length) return options.filter((o) => typeof o === "string" && o.trim());
|
|
1009
|
+
if (inputType === "confirm") return ["Yes", "No"];
|
|
1010
|
+
return [];
|
|
1011
|
+
}
|
|
1012
|
+
function QuestionChips({
|
|
1013
|
+
inputType,
|
|
1014
|
+
options
|
|
1015
|
+
}) {
|
|
1016
|
+
const opts = resolveOptions(inputType, options);
|
|
1017
|
+
if (!opts.length) return null;
|
|
1018
|
+
const answer = (label) => {
|
|
1019
|
+
try {
|
|
1020
|
+
useChatStore.getState().sendMessage(label);
|
|
1021
|
+
} catch {
|
|
1022
|
+
}
|
|
1023
|
+
};
|
|
1024
|
+
return /* @__PURE__ */ jsx7(View6, { style: styles5.row, children: opts.map((label, i) => /* @__PURE__ */ jsx7(
|
|
1025
|
+
Pressable3,
|
|
1026
|
+
{
|
|
1027
|
+
accessibilityRole: "button",
|
|
1028
|
+
accessibilityLabel: label,
|
|
1029
|
+
onPress: () => answer(label),
|
|
1030
|
+
style: ({ pressed }) => [styles5.chip, pressed && styles5.chipPressed],
|
|
1031
|
+
children: /* @__PURE__ */ jsx7(Text5, { style: styles5.label, numberOfLines: 2, children: label })
|
|
1032
|
+
},
|
|
1033
|
+
`${label}-${i}`
|
|
1034
|
+
)) });
|
|
1035
|
+
}
|
|
1036
|
+
var styles5 = StyleSheet5.create({
|
|
1037
|
+
row: {
|
|
1038
|
+
flexDirection: "row",
|
|
1039
|
+
flexWrap: "wrap",
|
|
1040
|
+
gap: 6,
|
|
1041
|
+
marginTop: 10
|
|
1042
|
+
},
|
|
1043
|
+
chip: {
|
|
1044
|
+
paddingHorizontal: 12,
|
|
1045
|
+
paddingVertical: 8,
|
|
1046
|
+
backgroundColor: ada5.orangeSoft,
|
|
1047
|
+
borderColor: ada5.orange,
|
|
1048
|
+
borderWidth: 1,
|
|
1049
|
+
borderRadius: 14
|
|
1050
|
+
},
|
|
1051
|
+
chipPressed: {
|
|
1052
|
+
backgroundColor: ada5.orange
|
|
1053
|
+
},
|
|
1054
|
+
label: {
|
|
1055
|
+
color: ada5.orangeDeep,
|
|
1056
|
+
fontSize: fontSize3.xs,
|
|
1057
|
+
fontWeight: "600",
|
|
1058
|
+
fontFamily: fontFam2
|
|
1059
|
+
}
|
|
1060
|
+
});
|
|
1061
|
+
|
|
1062
|
+
// src/chat/TableCardBlock.tsx
|
|
1063
|
+
import { View as View7, Text as Text6, StyleSheet as StyleSheet6, Platform as Platform4 } from "react-native";
|
|
1064
|
+
import { ada as ada6, borderRadius, fontSize as fontSize4, spacing } from "@ateam-ai-mobile/core";
|
|
1065
|
+
import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
1066
|
+
var fontFam3 = Platform4.OS === "ios" ? "SF Pro Rounded" : void 0;
|
|
1006
1067
|
function TableCardBlock({ columns, rows }) {
|
|
1007
1068
|
if (!columns?.length || !rows?.length) return null;
|
|
1008
1069
|
const [titleCol, ...detailCols] = columns;
|
|
1009
|
-
return /* @__PURE__ */
|
|
1070
|
+
return /* @__PURE__ */ jsx8(View7, { style: styles6.wrap, children: rows.map((row, i) => {
|
|
1010
1071
|
const cells = Array.isArray(row) ? row : [row];
|
|
1011
1072
|
const title = cells[0];
|
|
1012
|
-
return /* @__PURE__ */ jsxs5(
|
|
1013
|
-
/* @__PURE__ */
|
|
1014
|
-
detailCols.length > 0 && /* @__PURE__ */
|
|
1073
|
+
return /* @__PURE__ */ jsxs5(View7, { style: styles6.card, children: [
|
|
1074
|
+
/* @__PURE__ */ jsx8(Text6, { style: styles6.title, children: String(title ?? "") }),
|
|
1075
|
+
detailCols.length > 0 && /* @__PURE__ */ jsx8(View7, { style: styles6.details, children: detailCols.map((col, ci) => {
|
|
1015
1076
|
const value = cells[ci + 1];
|
|
1016
1077
|
if (value == null || value === "") return null;
|
|
1017
|
-
return /* @__PURE__ */ jsxs5(
|
|
1018
|
-
/* @__PURE__ */
|
|
1019
|
-
/* @__PURE__ */
|
|
1078
|
+
return /* @__PURE__ */ jsxs5(View7, { style: styles6.row, children: [
|
|
1079
|
+
/* @__PURE__ */ jsx8(Text6, { style: styles6.label, children: String(col) }),
|
|
1080
|
+
/* @__PURE__ */ jsx8(Text6, { style: styles6.value, children: String(value) })
|
|
1020
1081
|
] }, ci);
|
|
1021
1082
|
}) })
|
|
1022
1083
|
] }, i);
|
|
1023
1084
|
}) });
|
|
1024
1085
|
}
|
|
1025
|
-
var
|
|
1086
|
+
var styles6 = StyleSheet6.create({
|
|
1026
1087
|
wrap: {
|
|
1027
1088
|
marginVertical: 6,
|
|
1028
1089
|
gap: 8
|
|
1029
1090
|
},
|
|
1030
1091
|
card: {
|
|
1031
|
-
backgroundColor:
|
|
1092
|
+
backgroundColor: ada6.paper,
|
|
1032
1093
|
borderRadius: borderRadius.md,
|
|
1033
1094
|
borderWidth: 1,
|
|
1034
|
-
borderColor:
|
|
1095
|
+
borderColor: ada6.border,
|
|
1035
1096
|
padding: spacing.md
|
|
1036
1097
|
},
|
|
1037
1098
|
title: {
|
|
1038
|
-
color:
|
|
1039
|
-
fontSize:
|
|
1099
|
+
color: ada6.ink,
|
|
1100
|
+
fontSize: fontSize4.md,
|
|
1040
1101
|
fontWeight: "600",
|
|
1041
|
-
fontFamily:
|
|
1102
|
+
fontFamily: fontFam3,
|
|
1042
1103
|
letterSpacing: -0.2,
|
|
1043
1104
|
marginBottom: 6
|
|
1044
1105
|
},
|
|
@@ -1051,9 +1112,9 @@ var styles5 = StyleSheet5.create({
|
|
|
1051
1112
|
gap: 8
|
|
1052
1113
|
},
|
|
1053
1114
|
label: {
|
|
1054
|
-
color:
|
|
1055
|
-
fontSize:
|
|
1056
|
-
fontFamily:
|
|
1115
|
+
color: ada6.inkMuted,
|
|
1116
|
+
fontSize: fontSize4.xs,
|
|
1117
|
+
fontFamily: fontFam3,
|
|
1057
1118
|
fontWeight: "500",
|
|
1058
1119
|
width: 84,
|
|
1059
1120
|
textTransform: "uppercase",
|
|
@@ -1062,9 +1123,9 @@ var styles5 = StyleSheet5.create({
|
|
|
1062
1123
|
},
|
|
1063
1124
|
value: {
|
|
1064
1125
|
flex: 1,
|
|
1065
|
-
color:
|
|
1066
|
-
fontSize:
|
|
1067
|
-
fontFamily:
|
|
1126
|
+
color: ada6.inkSoft,
|
|
1127
|
+
fontSize: fontSize4.sm,
|
|
1128
|
+
fontFamily: fontFam3,
|
|
1068
1129
|
lineHeight: 18
|
|
1069
1130
|
}
|
|
1070
1131
|
});
|
|
@@ -1078,8 +1139,8 @@ var useLightboxStore = create2((set) => ({
|
|
|
1078
1139
|
}));
|
|
1079
1140
|
|
|
1080
1141
|
// src/chat/MessageBubble.tsx
|
|
1081
|
-
import { Fragment, jsx as
|
|
1082
|
-
var
|
|
1142
|
+
import { Fragment, jsx as jsx9, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
1143
|
+
var fontFam4 = Platform5.OS === "ios" ? "SF Pro Rounded" : void 0;
|
|
1083
1144
|
function formatTime(date) {
|
|
1084
1145
|
const h = date.getHours();
|
|
1085
1146
|
const m = date.getMinutes().toString().padStart(2, "0");
|
|
@@ -1097,18 +1158,18 @@ function DaySeparator({ date }) {
|
|
|
1097
1158
|
} else {
|
|
1098
1159
|
label = date.toLocaleDateString(void 0, { weekday: "long", month: "short", day: "numeric" });
|
|
1099
1160
|
}
|
|
1100
|
-
return /* @__PURE__ */
|
|
1161
|
+
return /* @__PURE__ */ jsx9(View8, { style: separatorStyles.container, children: /* @__PURE__ */ jsx9(View8, { style: separatorStyles.pill, children: /* @__PURE__ */ jsx9(Text7, { style: separatorStyles.text, children: label }) }) });
|
|
1101
1162
|
}
|
|
1102
1163
|
function isSameDay(a, b) {
|
|
1103
1164
|
return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
|
1104
1165
|
}
|
|
1105
|
-
var separatorStyles =
|
|
1166
|
+
var separatorStyles = StyleSheet7.create({
|
|
1106
1167
|
container: {
|
|
1107
1168
|
alignItems: "center",
|
|
1108
1169
|
marginVertical: 14
|
|
1109
1170
|
},
|
|
1110
1171
|
pill: {
|
|
1111
|
-
backgroundColor:
|
|
1172
|
+
backgroundColor: ada7.paperSoft,
|
|
1112
1173
|
paddingHorizontal: 14,
|
|
1113
1174
|
paddingVertical: 5,
|
|
1114
1175
|
borderRadius: 999
|
|
@@ -1116,9 +1177,9 @@ var separatorStyles = StyleSheet6.create({
|
|
|
1116
1177
|
text: {
|
|
1117
1178
|
fontSize: 12,
|
|
1118
1179
|
fontWeight: "600",
|
|
1119
|
-
color:
|
|
1180
|
+
color: ada7.inkMuted,
|
|
1120
1181
|
letterSpacing: 0.4,
|
|
1121
|
-
fontFamily:
|
|
1182
|
+
fontFamily: fontFam4
|
|
1122
1183
|
}
|
|
1123
1184
|
});
|
|
1124
1185
|
function MessageBubble({ message }) {
|
|
@@ -1126,6 +1187,7 @@ function MessageBubble({ message }) {
|
|
|
1126
1187
|
const isSystem = message.role === "system";
|
|
1127
1188
|
const isNotification = !isUser && message.kind === "notification";
|
|
1128
1189
|
const st = message.jobProgress?.status;
|
|
1190
|
+
const pq = !isUser ? message.jobProgress?.pendingQuestion : void 0;
|
|
1129
1191
|
const isProgressOnly = !isUser && (st === "running" || st === "paused") && (!message.content?.trim() || message.content === "Working on it...");
|
|
1130
1192
|
const [copied, setCopied] = useState4("");
|
|
1131
1193
|
const showCopied = useCallback3((label) => {
|
|
@@ -1142,41 +1204,41 @@ function MessageBubble({ message }) {
|
|
|
1142
1204
|
const handleLongPress = useCallback3(() => {
|
|
1143
1205
|
copyText(message.content);
|
|
1144
1206
|
}, [message.content, copyText]);
|
|
1145
|
-
return /* @__PURE__ */ jsxs6(
|
|
1146
|
-
!isUser && !isNotification && /* @__PURE__ */
|
|
1207
|
+
return /* @__PURE__ */ jsxs6(View8, { style: [styles7.row, isUser && styles7.rowUser], children: [
|
|
1208
|
+
!isUser && !isNotification && /* @__PURE__ */ jsx9(View8, { style: styles7.avatarOrb, children: /* @__PURE__ */ jsx9(
|
|
1147
1209
|
AdaOrb,
|
|
1148
1210
|
{
|
|
1149
1211
|
size: 28,
|
|
1150
1212
|
state: message.jobProgress?.status === "running" ? "thinking" : "idle"
|
|
1151
1213
|
}
|
|
1152
1214
|
) }),
|
|
1153
|
-
isNotification && /* @__PURE__ */
|
|
1215
|
+
isNotification && /* @__PURE__ */ jsx9(View8, { style: styles7.notificationLeftStripe }),
|
|
1154
1216
|
/* @__PURE__ */ jsxs6(
|
|
1155
|
-
|
|
1217
|
+
Pressable4,
|
|
1156
1218
|
{
|
|
1157
1219
|
accessibilityRole: "text",
|
|
1158
1220
|
accessibilityLabel: `${isUser ? "You" : isNotification ? "Notification" : "Ada"}: ${message.content}`,
|
|
1159
1221
|
accessibilityHint: "Long-press to copy",
|
|
1160
1222
|
onLongPress: handleLongPress,
|
|
1161
1223
|
style: [
|
|
1162
|
-
|
|
1163
|
-
isUser &&
|
|
1164
|
-
isSystem &&
|
|
1165
|
-
isNotification &&
|
|
1166
|
-
isProgressOnly &&
|
|
1224
|
+
styles7.bubble,
|
|
1225
|
+
isUser && styles7.bubbleUser,
|
|
1226
|
+
isSystem && styles7.bubbleSystem,
|
|
1227
|
+
isNotification && styles7.bubbleNotification,
|
|
1228
|
+
isProgressOnly && styles7.bubbleProgress
|
|
1167
1229
|
],
|
|
1168
1230
|
children: [
|
|
1169
|
-
isNotification && /* @__PURE__ */ jsxs6(
|
|
1170
|
-
/* @__PURE__ */
|
|
1171
|
-
/* @__PURE__ */
|
|
1231
|
+
isNotification && /* @__PURE__ */ jsxs6(View8, { style: styles7.notificationHeader, children: [
|
|
1232
|
+
/* @__PURE__ */ jsx9(Text7, { style: styles7.notificationHeaderIcon, children: "\u{1F514}" }),
|
|
1233
|
+
/* @__PURE__ */ jsx9(Text7, { style: styles7.notificationHeaderText, children: "Notification" })
|
|
1172
1234
|
] }),
|
|
1173
|
-
message.attachments && message.attachments.length > 0 && /* @__PURE__ */
|
|
1174
|
-
|
|
1235
|
+
message.attachments && message.attachments.length > 0 && /* @__PURE__ */ jsx9(View8, { style: styles7.attachments, children: message.attachments.map((att, i) => att.previewUri ? /* @__PURE__ */ jsx9(
|
|
1236
|
+
Pressable4,
|
|
1175
1237
|
{
|
|
1176
1238
|
accessibilityRole: "imagebutton",
|
|
1177
1239
|
accessibilityLabel: `Photo${att.name ? `: ${att.name}` : ""}. Tap to enlarge.`,
|
|
1178
1240
|
onPress: () => useLightboxStore.getState().show(att.previewUri),
|
|
1179
|
-
children: /* @__PURE__ */
|
|
1241
|
+
children: /* @__PURE__ */ jsx9(
|
|
1180
1242
|
Image,
|
|
1181
1243
|
{
|
|
1182
1244
|
source: {
|
|
@@ -1185,36 +1247,41 @@ function MessageBubble({ message }) {
|
|
|
1185
1247
|
headers: { Authorization: `Bearer ${getConfig2().tokenProvider.getToken()}` }
|
|
1186
1248
|
} : {}
|
|
1187
1249
|
},
|
|
1188
|
-
style:
|
|
1250
|
+
style: styles7.attachmentImage,
|
|
1189
1251
|
resizeMode: "cover",
|
|
1190
1252
|
onError: (e) => console.warn("[Image] Failed to load:", att.previewUri?.slice(0, 100), e.nativeEvent.error)
|
|
1191
1253
|
}
|
|
1192
1254
|
)
|
|
1193
1255
|
},
|
|
1194
1256
|
i
|
|
1195
|
-
) : /* @__PURE__ */
|
|
1257
|
+
) : /* @__PURE__ */ jsx9(View8, { style: styles7.attachmentFile, children: /* @__PURE__ */ jsx9(Text7, { style: styles7.attachmentFileName, numberOfLines: 1, children: att.name }) }, i)) }),
|
|
1196
1258
|
isUser ? (
|
|
1197
1259
|
// Hide the "See attachment" placeholder when the bubble already shows the photo.
|
|
1198
|
-
message.content && !(message.content === "See attachment" && message.attachments?.length) ? /* @__PURE__ */
|
|
1260
|
+
message.content && !(message.content === "See attachment" && message.attachments?.length) ? /* @__PURE__ */ jsx9(Text7, { selectable: true, style: styles7.userText, children: message.content }) : null
|
|
1199
1261
|
) : isProgressOnly ? (
|
|
1200
1262
|
// No "Working on it…" text — the indicator below is the whole message.
|
|
1201
1263
|
null
|
|
1202
|
-
) :
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1264
|
+
) : (
|
|
1265
|
+
// When the turn asked a question, show its clean question string —
|
|
1266
|
+
// never message.content, which may carry the raw JSON payload.
|
|
1267
|
+
renderAssistantContent(pq?.question || message.content, copyText)
|
|
1268
|
+
),
|
|
1269
|
+
!!copied && /* @__PURE__ */ jsx9(View8, { style: styles7.copiedBadge, children: /* @__PURE__ */ jsx9(Text7, { style: styles7.copiedText, children: copied }) }),
|
|
1270
|
+
message.toolCalls && message.toolCalls.length > 0 && /* @__PURE__ */ jsx9(ToolCallsBadge, { calls: message.toolCalls }),
|
|
1271
|
+
message.jobProgress && /* @__PURE__ */ jsx9(JobProgressBar, { progress: message.jobProgress, standalone: isProgressOnly }),
|
|
1272
|
+
!isUser && message.actions && message.actions.length > 0 && /* @__PURE__ */ jsx9(UIActionsRow, { actions: message.actions }),
|
|
1273
|
+
pq && /* @__PURE__ */ jsx9(QuestionChips, { inputType: pq.inputType, options: pq.options }),
|
|
1274
|
+
!isProgressOnly && /* @__PURE__ */ jsx9(Text7, { style: [styles7.timeText, isUser && styles7.timeTextUser], children: formatTime(message.timestamp) })
|
|
1208
1275
|
]
|
|
1209
1276
|
}
|
|
1210
1277
|
),
|
|
1211
|
-
isUser && /* @__PURE__ */
|
|
1278
|
+
isUser && /* @__PURE__ */ jsx9(View8, { style: styles7.avatarSpacer })
|
|
1212
1279
|
] });
|
|
1213
1280
|
}
|
|
1214
1281
|
function renderAssistantContent(content, copyText) {
|
|
1215
1282
|
if (!content) return null;
|
|
1216
1283
|
if (!content.includes(TABLE_BLOCK_OPEN)) {
|
|
1217
|
-
return /* @__PURE__ */
|
|
1284
|
+
return /* @__PURE__ */ jsx9(MarkdownBubble, { content, copyText });
|
|
1218
1285
|
}
|
|
1219
1286
|
const segments = [];
|
|
1220
1287
|
let cursor = 0;
|
|
@@ -1236,28 +1303,28 @@ function renderAssistantContent(content, copyText) {
|
|
|
1236
1303
|
segments.push({ kind: "table", content: payload });
|
|
1237
1304
|
cursor = close + TABLE_BLOCK_CLOSE.length;
|
|
1238
1305
|
}
|
|
1239
|
-
return /* @__PURE__ */
|
|
1306
|
+
return /* @__PURE__ */ jsx9(Fragment, { children: segments.map((seg, i) => {
|
|
1240
1307
|
if (seg.kind === "md") {
|
|
1241
1308
|
const trimmed = seg.content.trim();
|
|
1242
1309
|
if (!trimmed) return null;
|
|
1243
|
-
return /* @__PURE__ */
|
|
1310
|
+
return /* @__PURE__ */ jsx9(MarkdownBubble, { content: seg.content, copyText }, i);
|
|
1244
1311
|
}
|
|
1245
1312
|
try {
|
|
1246
1313
|
const data = JSON.parse(decodeURIComponent(seg.content));
|
|
1247
|
-
return /* @__PURE__ */
|
|
1314
|
+
return /* @__PURE__ */ jsx9(TableCardBlock, { columns: data.columns, rows: data.rows }, i);
|
|
1248
1315
|
} catch {
|
|
1249
1316
|
return null;
|
|
1250
1317
|
}
|
|
1251
1318
|
}) });
|
|
1252
1319
|
}
|
|
1253
1320
|
function MarkdownBubble({ content, copyText }) {
|
|
1254
|
-
return /* @__PURE__ */
|
|
1321
|
+
return /* @__PURE__ */ jsx9(
|
|
1255
1322
|
Markdown,
|
|
1256
1323
|
{
|
|
1257
1324
|
style: markdownStyles,
|
|
1258
1325
|
rules: {
|
|
1259
|
-
code_inline: (node) => /* @__PURE__ */
|
|
1260
|
-
|
|
1326
|
+
code_inline: (node) => /* @__PURE__ */ jsx9(
|
|
1327
|
+
Text7,
|
|
1261
1328
|
{
|
|
1262
1329
|
style: markdownStyles.code_inline,
|
|
1263
1330
|
onPress: () => copyText(node.content),
|
|
@@ -1265,12 +1332,12 @@ function MarkdownBubble({ content, copyText }) {
|
|
|
1265
1332
|
},
|
|
1266
1333
|
node.key
|
|
1267
1334
|
),
|
|
1268
|
-
fence: (node) => /* @__PURE__ */
|
|
1269
|
-
|
|
1335
|
+
fence: (node) => /* @__PURE__ */ jsx9(
|
|
1336
|
+
Pressable4,
|
|
1270
1337
|
{
|
|
1271
1338
|
onPress: () => copyText(node.content),
|
|
1272
1339
|
style: markdownStyles.fence,
|
|
1273
|
-
children: /* @__PURE__ */
|
|
1340
|
+
children: /* @__PURE__ */ jsx9(Text7, { style: markdownStyles.fenceText, children: node.content })
|
|
1274
1341
|
},
|
|
1275
1342
|
node.key
|
|
1276
1343
|
)
|
|
@@ -1282,18 +1349,18 @@ function MarkdownBubble({ content, copyText }) {
|
|
|
1282
1349
|
function ToolCallsBadge({ calls }) {
|
|
1283
1350
|
const [expanded, setExpanded] = useState4(false);
|
|
1284
1351
|
const label = calls.filter((c) => c.name === "send_message_to_skill").map((c) => c.args.skill_name || c.skill).filter(Boolean).join(", ") || "Tool call";
|
|
1285
|
-
return /* @__PURE__ */ jsxs6(
|
|
1286
|
-
/* @__PURE__ */ jsxs6(
|
|
1287
|
-
/* @__PURE__ */
|
|
1288
|
-
/* @__PURE__ */
|
|
1352
|
+
return /* @__PURE__ */ jsxs6(View8, { style: styles7.toolCalls, children: [
|
|
1353
|
+
/* @__PURE__ */ jsxs6(Pressable4, { style: styles7.toolToggle, onPress: () => setExpanded(!expanded), children: [
|
|
1354
|
+
/* @__PURE__ */ jsx9(Text7, { style: styles7.toolLabel, children: label }),
|
|
1355
|
+
/* @__PURE__ */ jsx9(Text7, { style: styles7.toolChevron, children: expanded ? "\u25B2" : "\u25BC" })
|
|
1289
1356
|
] }),
|
|
1290
|
-
expanded && calls.map((tc, i) => /* @__PURE__ */ jsxs6(
|
|
1291
|
-
/* @__PURE__ */
|
|
1292
|
-
tc.skill && /* @__PURE__ */
|
|
1357
|
+
expanded && calls.map((tc, i) => /* @__PURE__ */ jsxs6(View8, { style: styles7.toolItem, children: [
|
|
1358
|
+
/* @__PURE__ */ jsx9(Text7, { style: styles7.toolName, children: tc.name }),
|
|
1359
|
+
tc.skill && /* @__PURE__ */ jsx9(Text7, { style: styles7.toolSkill, children: tc.skill })
|
|
1293
1360
|
] }, i))
|
|
1294
1361
|
] });
|
|
1295
1362
|
}
|
|
1296
|
-
var
|
|
1363
|
+
var styles7 = StyleSheet7.create({
|
|
1297
1364
|
row: {
|
|
1298
1365
|
flexDirection: "row",
|
|
1299
1366
|
alignItems: "flex-end",
|
|
@@ -1316,15 +1383,15 @@ var styles6 = StyleSheet6.create({
|
|
|
1316
1383
|
},
|
|
1317
1384
|
bubble: {
|
|
1318
1385
|
maxWidth: "78%",
|
|
1319
|
-
backgroundColor:
|
|
1386
|
+
backgroundColor: ada7.botBubble,
|
|
1320
1387
|
borderWidth: 1,
|
|
1321
|
-
borderColor:
|
|
1388
|
+
borderColor: ada7.botBubbleBorder,
|
|
1322
1389
|
borderRadius: borderRadius2.xl,
|
|
1323
1390
|
paddingHorizontal: 16,
|
|
1324
1391
|
paddingVertical: 12
|
|
1325
1392
|
},
|
|
1326
1393
|
bubbleUser: {
|
|
1327
|
-
backgroundColor:
|
|
1394
|
+
backgroundColor: ada7.userBubble,
|
|
1328
1395
|
borderColor: "transparent"
|
|
1329
1396
|
},
|
|
1330
1397
|
// Live-chain placeholder: no fill, no border, tighter padding — the
|
|
@@ -1336,12 +1403,12 @@ var styles6 = StyleSheet6.create({
|
|
|
1336
1403
|
paddingVertical: 2
|
|
1337
1404
|
},
|
|
1338
1405
|
bubbleSystem: {
|
|
1339
|
-
backgroundColor:
|
|
1340
|
-
borderColor:
|
|
1406
|
+
backgroundColor: ada7.orangeSoft,
|
|
1407
|
+
borderColor: ada7.orange,
|
|
1341
1408
|
maxWidth: "90%"
|
|
1342
1409
|
},
|
|
1343
1410
|
bubbleNotification: {
|
|
1344
|
-
backgroundColor:
|
|
1411
|
+
backgroundColor: ada7.orangeSoft,
|
|
1345
1412
|
borderColor: "rgba(255, 122, 40, 0.35)",
|
|
1346
1413
|
borderRadius: borderRadius2.lg,
|
|
1347
1414
|
maxWidth: "90%"
|
|
@@ -1349,7 +1416,7 @@ var styles6 = StyleSheet6.create({
|
|
|
1349
1416
|
notificationLeftStripe: {
|
|
1350
1417
|
width: 3,
|
|
1351
1418
|
alignSelf: "stretch",
|
|
1352
|
-
backgroundColor:
|
|
1419
|
+
backgroundColor: ada7.orange,
|
|
1353
1420
|
borderRadius: 2,
|
|
1354
1421
|
marginRight: 4
|
|
1355
1422
|
},
|
|
@@ -1363,25 +1430,25 @@ var styles6 = StyleSheet6.create({
|
|
|
1363
1430
|
fontSize: 12
|
|
1364
1431
|
},
|
|
1365
1432
|
notificationHeaderText: {
|
|
1366
|
-
color:
|
|
1433
|
+
color: ada7.orangeDeep,
|
|
1367
1434
|
fontSize: 11,
|
|
1368
1435
|
fontWeight: "700",
|
|
1369
1436
|
letterSpacing: 0.6,
|
|
1370
1437
|
textTransform: "uppercase",
|
|
1371
|
-
fontFamily:
|
|
1438
|
+
fontFamily: fontFam4
|
|
1372
1439
|
},
|
|
1373
1440
|
userText: {
|
|
1374
|
-
color:
|
|
1375
|
-
fontSize:
|
|
1441
|
+
color: ada7.userBubbleText,
|
|
1442
|
+
fontSize: fontSize5.md,
|
|
1376
1443
|
lineHeight: 22,
|
|
1377
|
-
fontFamily:
|
|
1444
|
+
fontFamily: fontFam4
|
|
1378
1445
|
},
|
|
1379
1446
|
timeText: {
|
|
1380
1447
|
fontSize: 11,
|
|
1381
|
-
color:
|
|
1448
|
+
color: ada7.inkMuted,
|
|
1382
1449
|
alignSelf: "flex-end",
|
|
1383
1450
|
marginTop: 4,
|
|
1384
|
-
fontFamily:
|
|
1451
|
+
fontFamily: fontFam4
|
|
1385
1452
|
},
|
|
1386
1453
|
timeTextUser: {
|
|
1387
1454
|
color: "rgba(250,246,238,0.55)"
|
|
@@ -1419,13 +1486,13 @@ var styles6 = StyleSheet6.create({
|
|
|
1419
1486
|
},
|
|
1420
1487
|
copiedText: {
|
|
1421
1488
|
color: "#fff",
|
|
1422
|
-
fontSize:
|
|
1489
|
+
fontSize: fontSize5.xs,
|
|
1423
1490
|
fontWeight: "600"
|
|
1424
1491
|
},
|
|
1425
1492
|
toolCalls: {
|
|
1426
1493
|
marginTop: 8,
|
|
1427
1494
|
borderTopWidth: 1,
|
|
1428
|
-
borderTopColor:
|
|
1495
|
+
borderTopColor: ada7.border,
|
|
1429
1496
|
paddingTop: 6
|
|
1430
1497
|
},
|
|
1431
1498
|
toolToggle: {
|
|
@@ -1434,12 +1501,12 @@ var styles6 = StyleSheet6.create({
|
|
|
1434
1501
|
gap: 6
|
|
1435
1502
|
},
|
|
1436
1503
|
toolLabel: {
|
|
1437
|
-
color:
|
|
1438
|
-
fontSize:
|
|
1504
|
+
color: ada7.inkSoft,
|
|
1505
|
+
fontSize: fontSize5.xs,
|
|
1439
1506
|
fontWeight: "500"
|
|
1440
1507
|
},
|
|
1441
1508
|
toolChevron: {
|
|
1442
|
-
color:
|
|
1509
|
+
color: ada7.inkMuted,
|
|
1443
1510
|
fontSize: 8
|
|
1444
1511
|
},
|
|
1445
1512
|
toolItem: {
|
|
@@ -1447,21 +1514,21 @@ var styles6 = StyleSheet6.create({
|
|
|
1447
1514
|
paddingLeft: 8
|
|
1448
1515
|
},
|
|
1449
1516
|
toolName: {
|
|
1450
|
-
color:
|
|
1451
|
-
fontSize:
|
|
1517
|
+
color: ada7.inkSoft,
|
|
1518
|
+
fontSize: fontSize5.xs,
|
|
1452
1519
|
fontFamily: "monospace"
|
|
1453
1520
|
},
|
|
1454
1521
|
toolSkill: {
|
|
1455
|
-
color:
|
|
1456
|
-
fontSize:
|
|
1522
|
+
color: ada7.orangeDeep,
|
|
1523
|
+
fontSize: fontSize5.xs
|
|
1457
1524
|
}
|
|
1458
1525
|
});
|
|
1459
|
-
var markdownStyles =
|
|
1526
|
+
var markdownStyles = StyleSheet7.create({
|
|
1460
1527
|
body: {
|
|
1461
|
-
color:
|
|
1462
|
-
fontSize:
|
|
1528
|
+
color: ada7.botBubbleText,
|
|
1529
|
+
fontSize: fontSize5.md,
|
|
1463
1530
|
lineHeight: 22,
|
|
1464
|
-
fontFamily:
|
|
1531
|
+
fontFamily: fontFam4
|
|
1465
1532
|
},
|
|
1466
1533
|
paragraph: {
|
|
1467
1534
|
marginTop: 0,
|
|
@@ -1469,35 +1536,35 @@ var markdownStyles = StyleSheet6.create({
|
|
|
1469
1536
|
},
|
|
1470
1537
|
strong: {
|
|
1471
1538
|
fontWeight: "700",
|
|
1472
|
-
color:
|
|
1539
|
+
color: ada7.botBubbleText
|
|
1473
1540
|
},
|
|
1474
1541
|
em: {
|
|
1475
1542
|
fontStyle: "italic"
|
|
1476
1543
|
},
|
|
1477
1544
|
code_inline: {
|
|
1478
|
-
backgroundColor:
|
|
1479
|
-
color:
|
|
1545
|
+
backgroundColor: ada7.paperDeep,
|
|
1546
|
+
color: ada7.orangeDeep,
|
|
1480
1547
|
paddingHorizontal: 5,
|
|
1481
1548
|
paddingVertical: 1,
|
|
1482
1549
|
borderRadius: 4,
|
|
1483
1550
|
fontFamily: "monospace",
|
|
1484
|
-
fontSize:
|
|
1551
|
+
fontSize: fontSize5.sm
|
|
1485
1552
|
},
|
|
1486
1553
|
fence: {
|
|
1487
|
-
backgroundColor:
|
|
1554
|
+
backgroundColor: ada7.paperDeep,
|
|
1488
1555
|
padding: 10,
|
|
1489
1556
|
borderRadius: 10
|
|
1490
1557
|
},
|
|
1491
1558
|
fenceText: {
|
|
1492
1559
|
fontFamily: "monospace",
|
|
1493
|
-
fontSize:
|
|
1494
|
-
color:
|
|
1560
|
+
fontSize: fontSize5.sm,
|
|
1561
|
+
color: ada7.ink
|
|
1495
1562
|
},
|
|
1496
1563
|
link: {
|
|
1497
|
-
color:
|
|
1564
|
+
color: ada7.orangeDeep
|
|
1498
1565
|
},
|
|
1499
1566
|
list_item: {
|
|
1500
|
-
color:
|
|
1567
|
+
color: ada7.botBubbleText
|
|
1501
1568
|
},
|
|
1502
1569
|
bullet_list: {
|
|
1503
1570
|
marginVertical: 4
|
|
@@ -1505,13 +1572,13 @@ var markdownStyles = StyleSheet6.create({
|
|
|
1505
1572
|
});
|
|
1506
1573
|
|
|
1507
1574
|
// src/chat/TypingIndicator.tsx
|
|
1508
|
-
import { View as
|
|
1575
|
+
import { View as View9, StyleSheet as StyleSheet8 } from "react-native";
|
|
1509
1576
|
import { AdaOrb as AdaOrb2 } from "@ateam-ai-mobile/plugin-runtime";
|
|
1510
|
-
import { jsx as
|
|
1577
|
+
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
1511
1578
|
function TypingIndicator() {
|
|
1512
|
-
return /* @__PURE__ */
|
|
1579
|
+
return /* @__PURE__ */ jsx10(View9, { style: styles8.row, children: /* @__PURE__ */ jsx10(AdaOrb2, { size: 32, state: "thinking" }) });
|
|
1513
1580
|
}
|
|
1514
|
-
var
|
|
1581
|
+
var styles8 = StyleSheet8.create({
|
|
1515
1582
|
row: {
|
|
1516
1583
|
flexDirection: "row",
|
|
1517
1584
|
alignItems: "center",
|
|
@@ -1524,16 +1591,16 @@ var styles7 = StyleSheet7.create({
|
|
|
1524
1591
|
// src/chat/ChatInput.tsx
|
|
1525
1592
|
import { useState as useState5, useRef as useRef3, useCallback as useCallback4, useEffect as useEffect5 } from "react";
|
|
1526
1593
|
import {
|
|
1527
|
-
View as
|
|
1594
|
+
View as View10,
|
|
1528
1595
|
TextInput,
|
|
1529
|
-
Pressable as
|
|
1530
|
-
StyleSheet as
|
|
1531
|
-
Platform as
|
|
1596
|
+
Pressable as Pressable5,
|
|
1597
|
+
StyleSheet as StyleSheet9,
|
|
1598
|
+
Platform as Platform6
|
|
1532
1599
|
} from "react-native";
|
|
1533
1600
|
import Svg, { Path, Line, Polygon } from "react-native-svg";
|
|
1534
1601
|
import { colors as colors2, borderRadius as borderRadius3 } from "@ateam-ai-mobile/core";
|
|
1535
1602
|
import { getHaptics as getHaptics3 } from "@ateam-ai-mobile/plugin-runtime";
|
|
1536
|
-
import { jsx as
|
|
1603
|
+
import { jsx as jsx11, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
1537
1604
|
function ChatInput({ onSend, onCallStart, loading, prefill, placeholder }) {
|
|
1538
1605
|
const [text, setText] = useState5("");
|
|
1539
1606
|
const [height, setHeight] = useState5(40);
|
|
@@ -1553,13 +1620,13 @@ function ChatInput({ onSend, onCallStart, loading, prefill, placeholder }) {
|
|
|
1553
1620
|
setHeight(40);
|
|
1554
1621
|
}, [text, loading, onSend]);
|
|
1555
1622
|
const canSend = text.trim().length > 0;
|
|
1556
|
-
return /* @__PURE__ */
|
|
1557
|
-
onCallStart && /* @__PURE__ */
|
|
1558
|
-
/* @__PURE__ */
|
|
1623
|
+
return /* @__PURE__ */ jsx11(View10, { style: styles9.dock, children: /* @__PURE__ */ jsxs7(View10, { style: styles9.inputRow, children: [
|
|
1624
|
+
onCallStart && /* @__PURE__ */ jsx11(Pressable5, { style: styles9.callBtn, onPress: onCallStart, children: /* @__PURE__ */ jsx11(Svg, { width: 20, height: 20, viewBox: "0 0 24 24", fill: "none", stroke: colors2.light.accent, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx11(Path, { d: "M22 16.92v3a2 2 0 01-2.18 2 19.79 19.79 0 01-8.63-3.07 19.5 19.5 0 01-6-6 19.79 19.79 0 01-3.07-8.63A2 2 0 014.11 2h3a2 2 0 012 1.72 12.84 12.84 0 00.7 2.81 2 2 0 01-.45 2.11L8.09 9.91a16 16 0 006 6l1.27-1.27a2 2 0 012.11-.45 12.84 12.84 0 002.81.7A2 2 0 0122 16.92z" }) }) }),
|
|
1625
|
+
/* @__PURE__ */ jsx11(
|
|
1559
1626
|
TextInput,
|
|
1560
1627
|
{
|
|
1561
1628
|
ref: inputRef,
|
|
1562
|
-
style: [
|
|
1629
|
+
style: [styles9.input, { height: Math.min(Math.max(40, height), 120) }],
|
|
1563
1630
|
value: text,
|
|
1564
1631
|
onChangeText: setText,
|
|
1565
1632
|
onContentSizeChange: (e) => setHeight(e.nativeEvent.contentSize.height),
|
|
@@ -1569,25 +1636,25 @@ function ChatInput({ onSend, onCallStart, loading, prefill, placeholder }) {
|
|
|
1569
1636
|
returnKeyType: "default",
|
|
1570
1637
|
blurOnSubmit: false,
|
|
1571
1638
|
onSubmitEditing: () => {
|
|
1572
|
-
if (
|
|
1639
|
+
if (Platform6.OS === "web") handleSend();
|
|
1573
1640
|
}
|
|
1574
1641
|
}
|
|
1575
1642
|
),
|
|
1576
|
-
/* @__PURE__ */
|
|
1577
|
-
|
|
1643
|
+
/* @__PURE__ */ jsx11(
|
|
1644
|
+
Pressable5,
|
|
1578
1645
|
{
|
|
1579
|
-
style: [
|
|
1646
|
+
style: [styles9.sendBtn, canSend && styles9.sendBtnActive],
|
|
1580
1647
|
onPress: handleSend,
|
|
1581
1648
|
disabled: !canSend,
|
|
1582
1649
|
children: /* @__PURE__ */ jsxs7(Svg, { width: 18, height: 18, viewBox: "0 0 24 24", fill: "none", stroke: canSend ? "#fff" : colors2.light.textMuted, strokeWidth: 2, children: [
|
|
1583
|
-
/* @__PURE__ */
|
|
1584
|
-
/* @__PURE__ */
|
|
1650
|
+
/* @__PURE__ */ jsx11(Line, { x1: "22", y1: "2", x2: "11", y2: "13" }),
|
|
1651
|
+
/* @__PURE__ */ jsx11(Polygon, { points: "22 2 15 22 11 13 2 9 22 2" })
|
|
1585
1652
|
] })
|
|
1586
1653
|
}
|
|
1587
1654
|
)
|
|
1588
1655
|
] }) });
|
|
1589
1656
|
}
|
|
1590
|
-
var
|
|
1657
|
+
var styles9 = StyleSheet9.create({
|
|
1591
1658
|
dock: {
|
|
1592
1659
|
paddingHorizontal: 12,
|
|
1593
1660
|
paddingVertical: 8,
|
|
@@ -1635,15 +1702,15 @@ var styles8 = StyleSheet8.create({
|
|
|
1635
1702
|
});
|
|
1636
1703
|
|
|
1637
1704
|
// src/Lightbox.tsx
|
|
1638
|
-
import { Modal, View as
|
|
1705
|
+
import { Modal, View as View11, Image as Image2, Pressable as Pressable6, Text as Text8, StyleSheet as StyleSheet10 } from "react-native";
|
|
1639
1706
|
import { getConfig as getConfig3 } from "@ateam-ai-mobile/core";
|
|
1640
|
-
import { jsx as
|
|
1707
|
+
import { jsx as jsx12, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
1641
1708
|
function Lightbox() {
|
|
1642
1709
|
const uri = useLightboxStore((s) => s.uri);
|
|
1643
1710
|
const hide = useLightboxStore((s) => s.hide);
|
|
1644
1711
|
if (!uri) return null;
|
|
1645
|
-
return /* @__PURE__ */
|
|
1646
|
-
/* @__PURE__ */
|
|
1712
|
+
return /* @__PURE__ */ jsx12(Modal, { visible: true, transparent: true, animationType: "fade", onRequestClose: hide, children: /* @__PURE__ */ jsxs8(Pressable6, { style: styles10.backdrop, onPress: hide, children: [
|
|
1713
|
+
/* @__PURE__ */ jsx12(
|
|
1647
1714
|
Image2,
|
|
1648
1715
|
{
|
|
1649
1716
|
source: {
|
|
@@ -1652,14 +1719,14 @@ function Lightbox() {
|
|
|
1652
1719
|
headers: { Authorization: `Bearer ${getConfig3().tokenProvider.getToken()}` }
|
|
1653
1720
|
} : {}
|
|
1654
1721
|
},
|
|
1655
|
-
style:
|
|
1722
|
+
style: styles10.image,
|
|
1656
1723
|
resizeMode: "contain"
|
|
1657
1724
|
}
|
|
1658
1725
|
),
|
|
1659
|
-
/* @__PURE__ */
|
|
1726
|
+
/* @__PURE__ */ jsx12(View11, { style: styles10.closeHint, children: /* @__PURE__ */ jsx12(Text8, { style: styles10.closeHintText, children: "Tap to close" }) })
|
|
1660
1727
|
] }) });
|
|
1661
1728
|
}
|
|
1662
|
-
var
|
|
1729
|
+
var styles10 = StyleSheet10.create({
|
|
1663
1730
|
backdrop: {
|
|
1664
1731
|
flex: 1,
|
|
1665
1732
|
backgroundColor: "rgba(0,0,0,0.92)",
|
|
@@ -1681,7 +1748,7 @@ var styles9 = StyleSheet9.create({
|
|
|
1681
1748
|
});
|
|
1682
1749
|
|
|
1683
1750
|
// src/AdasChatScreen.tsx
|
|
1684
|
-
import { jsx as
|
|
1751
|
+
import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
1685
1752
|
function isSameDay2(a, b) {
|
|
1686
1753
|
return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
|
1687
1754
|
}
|
|
@@ -1691,11 +1758,11 @@ function AdasChatScreen({
|
|
|
1691
1758
|
footerAccessory,
|
|
1692
1759
|
withLightbox = true
|
|
1693
1760
|
}) {
|
|
1694
|
-
const messages =
|
|
1695
|
-
const loading =
|
|
1696
|
-
const conversationLoaded =
|
|
1697
|
-
const loadConversation =
|
|
1698
|
-
const sendMessage =
|
|
1761
|
+
const messages = useChatStore2((s) => s.messages);
|
|
1762
|
+
const loading = useChatStore2((s) => s.loading);
|
|
1763
|
+
const conversationLoaded = useChatStore2((s) => s.conversationLoaded);
|
|
1764
|
+
const loadConversation = useChatStore2((s) => s.loadConversation);
|
|
1765
|
+
const sendMessage = useChatStore2((s) => s.sendMessage);
|
|
1699
1766
|
const listRef = useRef4(null);
|
|
1700
1767
|
const [refreshing, setRefreshing] = useState6(false);
|
|
1701
1768
|
const [prefill, setPrefill] = useState6("");
|
|
@@ -1708,7 +1775,7 @@ function AdasChatScreen({
|
|
|
1708
1775
|
});
|
|
1709
1776
|
return unsub;
|
|
1710
1777
|
}, []);
|
|
1711
|
-
const useInverted =
|
|
1778
|
+
const useInverted = Platform7.OS !== "web";
|
|
1712
1779
|
const listData = useMemo3(
|
|
1713
1780
|
() => useInverted ? [...messages].reverse() : messages,
|
|
1714
1781
|
[messages, useInverted]
|
|
@@ -1733,23 +1800,23 @@ function AdasChatScreen({
|
|
|
1733
1800
|
const renderItem = useCallback5(({ item, index }) => {
|
|
1734
1801
|
const older = useInverted ? listData[index + 1] : listData[index - 1];
|
|
1735
1802
|
const showDaySep = !older || !isSameDay2(older.timestamp, item.timestamp);
|
|
1736
|
-
return /* @__PURE__ */ jsxs9(
|
|
1737
|
-
showDaySep && /* @__PURE__ */
|
|
1738
|
-
/* @__PURE__ */
|
|
1803
|
+
return /* @__PURE__ */ jsxs9(View12, { children: [
|
|
1804
|
+
showDaySep && /* @__PURE__ */ jsx13(DaySeparator, { date: item.timestamp }),
|
|
1805
|
+
/* @__PURE__ */ jsx13(MessageBubble, { message: item })
|
|
1739
1806
|
] });
|
|
1740
1807
|
}, [listData, useInverted]);
|
|
1741
|
-
const typingIndicator = loading && !(useInverted ? listData[0] : listData[listData.length - 1])?.jobProgress ? /* @__PURE__ */
|
|
1808
|
+
const typingIndicator = loading && !(useInverted ? listData[0] : listData[listData.length - 1])?.jobProgress ? /* @__PURE__ */ jsx13(TypingIndicator, {}) : null;
|
|
1742
1809
|
return /* @__PURE__ */ jsxs9(
|
|
1743
1810
|
KeyboardAvoidingView,
|
|
1744
1811
|
{
|
|
1745
|
-
style:
|
|
1746
|
-
behavior:
|
|
1812
|
+
style: styles11.root,
|
|
1813
|
+
behavior: Platform7.OS === "ios" ? "padding" : void 0,
|
|
1747
1814
|
children: [
|
|
1748
|
-
/* @__PURE__ */
|
|
1815
|
+
/* @__PURE__ */ jsx13(
|
|
1749
1816
|
FlatList,
|
|
1750
1817
|
{
|
|
1751
1818
|
ref: listRef,
|
|
1752
|
-
style:
|
|
1819
|
+
style: styles11.list,
|
|
1753
1820
|
data: listData,
|
|
1754
1821
|
inverted: useInverted,
|
|
1755
1822
|
keyExtractor: (m) => m.id,
|
|
@@ -1757,13 +1824,13 @@ function AdasChatScreen({
|
|
|
1757
1824
|
ListHeaderComponent: useInverted ? typingIndicator : null,
|
|
1758
1825
|
ListFooterComponent: useInverted ? null : typingIndicator,
|
|
1759
1826
|
onContentSizeChange: useInverted ? void 0 : () => scrollToLatest(false),
|
|
1760
|
-
refreshControl: /* @__PURE__ */
|
|
1827
|
+
refreshControl: /* @__PURE__ */ jsx13(RefreshControl, { refreshing, onRefresh: handleRefresh, tintColor: ada8.orange }),
|
|
1761
1828
|
keyboardShouldPersistTaps: "handled",
|
|
1762
|
-
contentContainerStyle:
|
|
1829
|
+
contentContainerStyle: styles11.listContent
|
|
1763
1830
|
}
|
|
1764
1831
|
),
|
|
1765
1832
|
footerAccessory,
|
|
1766
|
-
/* @__PURE__ */
|
|
1833
|
+
/* @__PURE__ */ jsx13(
|
|
1767
1834
|
ChatInput,
|
|
1768
1835
|
{
|
|
1769
1836
|
onSend: handleSend,
|
|
@@ -1773,16 +1840,16 @@ function AdasChatScreen({
|
|
|
1773
1840
|
placeholder
|
|
1774
1841
|
}
|
|
1775
1842
|
),
|
|
1776
|
-
withLightbox && /* @__PURE__ */
|
|
1777
|
-
/* @__PURE__ */
|
|
1843
|
+
withLightbox && /* @__PURE__ */ jsx13(Lightbox, {}),
|
|
1844
|
+
/* @__PURE__ */ jsx13(WidgetHost, {})
|
|
1778
1845
|
]
|
|
1779
1846
|
}
|
|
1780
1847
|
);
|
|
1781
1848
|
}
|
|
1782
|
-
var
|
|
1849
|
+
var styles11 = StyleSheet11.create({
|
|
1783
1850
|
root: {
|
|
1784
1851
|
flex: 1,
|
|
1785
|
-
backgroundColor:
|
|
1852
|
+
backgroundColor: ada8.paper
|
|
1786
1853
|
},
|
|
1787
1854
|
list: {
|
|
1788
1855
|
flex: 1
|
|
@@ -1796,18 +1863,18 @@ var styles10 = StyleSheet10.create({
|
|
|
1796
1863
|
import { useMemo as useMemo4, useState as useState7 } from "react";
|
|
1797
1864
|
import {
|
|
1798
1865
|
Modal as Modal2,
|
|
1799
|
-
View as
|
|
1800
|
-
Text as
|
|
1801
|
-
Pressable as
|
|
1802
|
-
StyleSheet as
|
|
1866
|
+
View as View13,
|
|
1867
|
+
Text as Text9,
|
|
1868
|
+
Pressable as Pressable7,
|
|
1869
|
+
StyleSheet as StyleSheet12,
|
|
1803
1870
|
ActivityIndicator as ActivityIndicator4,
|
|
1804
|
-
Platform as
|
|
1871
|
+
Platform as Platform8
|
|
1805
1872
|
} from "react-native";
|
|
1806
1873
|
import { WebView as WebView2 } from "react-native-webview";
|
|
1807
|
-
import { ada as
|
|
1874
|
+
import { ada as ada9 } from "@ateam-ai-mobile/core";
|
|
1808
1875
|
import { getCoreApiUrl as getCoreApiUrl2 } from "@ateam-ai-mobile/core";
|
|
1809
|
-
import { Fragment as Fragment2, jsx as
|
|
1810
|
-
var
|
|
1876
|
+
import { Fragment as Fragment2, jsx as jsx14, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
1877
|
+
var fontFam5 = Platform8.OS === "ios" ? "SF Pro Rounded" : void 0;
|
|
1811
1878
|
function WidgetWebView({ visible, title, bundleUrl, onClose }) {
|
|
1812
1879
|
const [loading, setLoading] = useState7(true);
|
|
1813
1880
|
const [error, setError] = useState7(null);
|
|
@@ -1816,28 +1883,28 @@ function WidgetWebView({ visible, title, bundleUrl, onClose }) {
|
|
|
1816
1883
|
if (/^https?:\/\//i.test(bundleUrl)) return bundleUrl;
|
|
1817
1884
|
return `${getCoreApiUrl2()}${bundleUrl}`;
|
|
1818
1885
|
}, [bundleUrl]);
|
|
1819
|
-
return /* @__PURE__ */
|
|
1886
|
+
return /* @__PURE__ */ jsx14(
|
|
1820
1887
|
Modal2,
|
|
1821
1888
|
{
|
|
1822
1889
|
visible,
|
|
1823
1890
|
animationType: "slide",
|
|
1824
1891
|
presentationStyle: "pageSheet",
|
|
1825
1892
|
onRequestClose: onClose,
|
|
1826
|
-
children: /* @__PURE__ */ jsxs10(
|
|
1827
|
-
/* @__PURE__ */ jsxs10(
|
|
1828
|
-
/* @__PURE__ */
|
|
1829
|
-
/* @__PURE__ */
|
|
1830
|
-
/* @__PURE__ */
|
|
1893
|
+
children: /* @__PURE__ */ jsxs10(View13, { style: styles12.root, children: [
|
|
1894
|
+
/* @__PURE__ */ jsxs10(View13, { style: styles12.bar, children: [
|
|
1895
|
+
/* @__PURE__ */ jsx14(Pressable7, { onPress: onClose, hitSlop: 12, style: styles12.closeBtn, children: /* @__PURE__ */ jsx14(Text9, { style: styles12.closeIcon, children: "\u2715" }) }),
|
|
1896
|
+
/* @__PURE__ */ jsx14(Text9, { style: styles12.title, numberOfLines: 1, children: title || "Widget" }),
|
|
1897
|
+
/* @__PURE__ */ jsx14(View13, { style: styles12.closeBtn })
|
|
1831
1898
|
] }),
|
|
1832
|
-
!uri ? /* @__PURE__ */
|
|
1833
|
-
/* @__PURE__ */
|
|
1834
|
-
/* @__PURE__ */
|
|
1899
|
+
!uri ? /* @__PURE__ */ jsx14(View13, { style: styles12.errorWrap, children: /* @__PURE__ */ jsx14(Text9, { style: styles12.errorText, children: "No bundle available for this widget." }) }) : error ? /* @__PURE__ */ jsxs10(View13, { style: styles12.errorWrap, children: [
|
|
1900
|
+
/* @__PURE__ */ jsx14(Text9, { style: styles12.errorText, children: "Couldn't load widget" }),
|
|
1901
|
+
/* @__PURE__ */ jsx14(Text9, { style: styles12.errorSub, children: error })
|
|
1835
1902
|
] }) : /* @__PURE__ */ jsxs10(Fragment2, { children: [
|
|
1836
|
-
/* @__PURE__ */
|
|
1903
|
+
/* @__PURE__ */ jsx14(
|
|
1837
1904
|
WebView2,
|
|
1838
1905
|
{
|
|
1839
1906
|
source: { uri },
|
|
1840
|
-
style:
|
|
1907
|
+
style: styles12.web,
|
|
1841
1908
|
onLoadStart: () => {
|
|
1842
1909
|
setLoading(true);
|
|
1843
1910
|
setError(null);
|
|
@@ -1855,16 +1922,16 @@ function WidgetWebView({ visible, title, bundleUrl, onClose }) {
|
|
|
1855
1922
|
setSupportMultipleWindows: false
|
|
1856
1923
|
}
|
|
1857
1924
|
),
|
|
1858
|
-
loading && /* @__PURE__ */
|
|
1925
|
+
loading && /* @__PURE__ */ jsx14(View13, { pointerEvents: "none", style: styles12.spinner, children: /* @__PURE__ */ jsx14(ActivityIndicator4, { color: ada9.orange }) })
|
|
1859
1926
|
] })
|
|
1860
1927
|
] })
|
|
1861
1928
|
}
|
|
1862
1929
|
);
|
|
1863
1930
|
}
|
|
1864
|
-
var
|
|
1931
|
+
var styles12 = StyleSheet12.create({
|
|
1865
1932
|
root: {
|
|
1866
1933
|
flex: 1,
|
|
1867
|
-
backgroundColor:
|
|
1934
|
+
backgroundColor: ada9.paper
|
|
1868
1935
|
},
|
|
1869
1936
|
bar: {
|
|
1870
1937
|
flexDirection: "row",
|
|
@@ -1872,8 +1939,8 @@ var styles11 = StyleSheet11.create({
|
|
|
1872
1939
|
paddingHorizontal: 14,
|
|
1873
1940
|
paddingVertical: 12,
|
|
1874
1941
|
borderBottomWidth: 1,
|
|
1875
|
-
borderBottomColor:
|
|
1876
|
-
backgroundColor:
|
|
1942
|
+
borderBottomColor: ada9.border,
|
|
1943
|
+
backgroundColor: ada9.paperSoft
|
|
1877
1944
|
},
|
|
1878
1945
|
closeBtn: {
|
|
1879
1946
|
width: 32,
|
|
@@ -1883,7 +1950,7 @@ var styles11 = StyleSheet11.create({
|
|
|
1883
1950
|
},
|
|
1884
1951
|
closeIcon: {
|
|
1885
1952
|
fontSize: 18,
|
|
1886
|
-
color:
|
|
1953
|
+
color: ada9.ink,
|
|
1887
1954
|
fontWeight: "500"
|
|
1888
1955
|
},
|
|
1889
1956
|
title: {
|
|
@@ -1891,13 +1958,13 @@ var styles11 = StyleSheet11.create({
|
|
|
1891
1958
|
textAlign: "center",
|
|
1892
1959
|
fontSize: 16,
|
|
1893
1960
|
fontWeight: "600",
|
|
1894
|
-
color:
|
|
1895
|
-
fontFamily:
|
|
1961
|
+
color: ada9.ink,
|
|
1962
|
+
fontFamily: fontFam5,
|
|
1896
1963
|
letterSpacing: -0.2
|
|
1897
1964
|
},
|
|
1898
1965
|
web: {
|
|
1899
1966
|
flex: 1,
|
|
1900
|
-
backgroundColor:
|
|
1967
|
+
backgroundColor: ada9.paper
|
|
1901
1968
|
},
|
|
1902
1969
|
spinner: {
|
|
1903
1970
|
position: "absolute",
|
|
@@ -1914,23 +1981,23 @@ var styles11 = StyleSheet11.create({
|
|
|
1914
1981
|
},
|
|
1915
1982
|
errorText: {
|
|
1916
1983
|
fontSize: 15,
|
|
1917
|
-
color:
|
|
1984
|
+
color: ada9.ink,
|
|
1918
1985
|
fontWeight: "600",
|
|
1919
1986
|
marginBottom: 6
|
|
1920
1987
|
},
|
|
1921
1988
|
errorSub: {
|
|
1922
1989
|
fontSize: 13,
|
|
1923
|
-
color:
|
|
1990
|
+
color: ada9.inkMuted,
|
|
1924
1991
|
textAlign: "center"
|
|
1925
1992
|
}
|
|
1926
1993
|
});
|
|
1927
1994
|
|
|
1928
1995
|
// src/TenantPicker.tsx
|
|
1929
1996
|
import { useEffect as useEffect7, useState as useState8 } from "react";
|
|
1930
|
-
import { View as
|
|
1931
|
-
import { ada as
|
|
1932
|
-
import { jsx as
|
|
1933
|
-
var
|
|
1997
|
+
import { View as View14, Text as Text10, Pressable as Pressable8, ActivityIndicator as ActivityIndicator5, StyleSheet as StyleSheet13, Platform as Platform9 } from "react-native";
|
|
1998
|
+
import { ada as ada10, fontSize as fontSize6, borderRadius as borderRadius4, listMyTenants, switchTenant, getTenant as getTenant4 } from "@ateam-ai-mobile/core";
|
|
1999
|
+
import { jsx as jsx15, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
2000
|
+
var fontFam6 = Platform9.OS === "ios" ? "SF Pro Rounded" : void 0;
|
|
1934
2001
|
function TenantPicker({ onSwitched, onSelect, currentTenantId }) {
|
|
1935
2002
|
const [tenants, setTenants] = useState8(null);
|
|
1936
2003
|
const [error, setError] = useState8(null);
|
|
@@ -1964,36 +2031,36 @@ function TenantPicker({ onSwitched, onSelect, currentTenantId }) {
|
|
|
1964
2031
|
setSwitching(null);
|
|
1965
2032
|
}
|
|
1966
2033
|
};
|
|
1967
|
-
if (error) return /* @__PURE__ */
|
|
2034
|
+
if (error) return /* @__PURE__ */ jsx15(Text10, { style: styles13.error, children: error });
|
|
1968
2035
|
if (!tenants) {
|
|
1969
|
-
return /* @__PURE__ */
|
|
2036
|
+
return /* @__PURE__ */ jsx15(View14, { style: styles13.loading, children: /* @__PURE__ */ jsx15(ActivityIndicator5, { color: ada10.orange }) });
|
|
1970
2037
|
}
|
|
1971
|
-
if (tenants.length === 0) return /* @__PURE__ */
|
|
1972
|
-
return /* @__PURE__ */
|
|
2038
|
+
if (tenants.length === 0) return /* @__PURE__ */ jsx15(Text10, { style: styles13.empty, children: "No teams found for this account." });
|
|
2039
|
+
return /* @__PURE__ */ jsx15(View14, { style: styles13.list, children: tenants.map((t) => {
|
|
1973
2040
|
const isActive = t.id === active;
|
|
1974
2041
|
const isSwitching = switching === t.id;
|
|
1975
2042
|
return /* @__PURE__ */ jsxs11(
|
|
1976
|
-
|
|
2043
|
+
Pressable8,
|
|
1977
2044
|
{
|
|
1978
2045
|
accessibilityRole: "button",
|
|
1979
2046
|
accessibilityLabel: `Team ${t.name}${isActive ? ", current" : ""}`,
|
|
1980
2047
|
disabled: !!switching,
|
|
1981
2048
|
onPress: () => handlePress(t),
|
|
1982
|
-
style: [
|
|
2049
|
+
style: [styles13.row, isActive && styles13.rowActive],
|
|
1983
2050
|
children: [
|
|
1984
|
-
/* @__PURE__ */
|
|
1985
|
-
/* @__PURE__ */ jsxs11(
|
|
1986
|
-
/* @__PURE__ */
|
|
1987
|
-
/* @__PURE__ */
|
|
2051
|
+
/* @__PURE__ */ jsx15(View14, { style: styles13.dot }),
|
|
2052
|
+
/* @__PURE__ */ jsxs11(View14, { style: styles13.rowText, children: [
|
|
2053
|
+
/* @__PURE__ */ jsx15(Text10, { style: styles13.name, children: t.name }),
|
|
2054
|
+
/* @__PURE__ */ jsx15(Text10, { style: styles13.slug, children: t.id })
|
|
1988
2055
|
] }),
|
|
1989
|
-
isSwitching ? /* @__PURE__ */
|
|
2056
|
+
isSwitching ? /* @__PURE__ */ jsx15(ActivityIndicator5, { color: ada10.orange }) : isActive ? /* @__PURE__ */ jsx15(Text10, { style: styles13.check, children: "\u2713" }) : null
|
|
1990
2057
|
]
|
|
1991
2058
|
},
|
|
1992
2059
|
t.id
|
|
1993
2060
|
);
|
|
1994
2061
|
}) });
|
|
1995
2062
|
}
|
|
1996
|
-
var
|
|
2063
|
+
var styles13 = StyleSheet13.create({
|
|
1997
2064
|
list: {
|
|
1998
2065
|
gap: 10
|
|
1999
2066
|
},
|
|
@@ -2001,7 +2068,7 @@ var styles12 = StyleSheet12.create({
|
|
|
2001
2068
|
flexDirection: "row",
|
|
2002
2069
|
alignItems: "center",
|
|
2003
2070
|
gap: 12,
|
|
2004
|
-
backgroundColor:
|
|
2071
|
+
backgroundColor: ada10.paperSoft,
|
|
2005
2072
|
borderRadius: borderRadius4.lg,
|
|
2006
2073
|
borderWidth: 1,
|
|
2007
2074
|
borderColor: "transparent",
|
|
@@ -2009,32 +2076,32 @@ var styles12 = StyleSheet12.create({
|
|
|
2009
2076
|
paddingVertical: 14
|
|
2010
2077
|
},
|
|
2011
2078
|
rowActive: {
|
|
2012
|
-
backgroundColor:
|
|
2013
|
-
borderColor:
|
|
2079
|
+
backgroundColor: ada10.orangeSoft,
|
|
2080
|
+
borderColor: ada10.orange
|
|
2014
2081
|
},
|
|
2015
2082
|
dot: {
|
|
2016
2083
|
width: 10,
|
|
2017
2084
|
height: 10,
|
|
2018
2085
|
borderRadius: 5,
|
|
2019
|
-
backgroundColor:
|
|
2086
|
+
backgroundColor: ada10.orange
|
|
2020
2087
|
},
|
|
2021
2088
|
rowText: {
|
|
2022
2089
|
flex: 1
|
|
2023
2090
|
},
|
|
2024
2091
|
name: {
|
|
2025
|
-
color:
|
|
2026
|
-
fontSize:
|
|
2092
|
+
color: ada10.ink,
|
|
2093
|
+
fontSize: fontSize6.lg,
|
|
2027
2094
|
fontWeight: "600",
|
|
2028
|
-
fontFamily:
|
|
2095
|
+
fontFamily: fontFam6
|
|
2029
2096
|
},
|
|
2030
2097
|
slug: {
|
|
2031
|
-
color:
|
|
2032
|
-
fontSize:
|
|
2098
|
+
color: ada10.inkMuted,
|
|
2099
|
+
fontSize: fontSize6.sm,
|
|
2033
2100
|
fontFamily: "monospace"
|
|
2034
2101
|
},
|
|
2035
2102
|
check: {
|
|
2036
|
-
color:
|
|
2037
|
-
fontSize:
|
|
2103
|
+
color: ada10.orangeDeep,
|
|
2104
|
+
fontSize: fontSize6.lg,
|
|
2038
2105
|
fontWeight: "700"
|
|
2039
2106
|
},
|
|
2040
2107
|
loading: {
|
|
@@ -2042,14 +2109,14 @@ var styles12 = StyleSheet12.create({
|
|
|
2042
2109
|
alignItems: "center"
|
|
2043
2110
|
},
|
|
2044
2111
|
empty: {
|
|
2045
|
-
color:
|
|
2046
|
-
fontSize:
|
|
2112
|
+
color: ada10.inkMuted,
|
|
2113
|
+
fontSize: fontSize6.md,
|
|
2047
2114
|
textAlign: "center",
|
|
2048
2115
|
paddingVertical: 16
|
|
2049
2116
|
},
|
|
2050
2117
|
error: {
|
|
2051
2118
|
color: "#C15545",
|
|
2052
|
-
fontSize:
|
|
2119
|
+
fontSize: fontSize6.md,
|
|
2053
2120
|
textAlign: "center",
|
|
2054
2121
|
paddingVertical: 16
|
|
2055
2122
|
}
|
|
@@ -2058,16 +2125,16 @@ var styles12 = StyleSheet12.create({
|
|
|
2058
2125
|
// src/voice/VoiceCallSheet.tsx
|
|
2059
2126
|
import { useEffect as useEffect8, useRef as useRef6, useMemo as useMemo5 } from "react";
|
|
2060
2127
|
import {
|
|
2061
|
-
View as
|
|
2062
|
-
Text as
|
|
2063
|
-
StyleSheet as
|
|
2064
|
-
Platform as
|
|
2065
|
-
Pressable as
|
|
2128
|
+
View as View15,
|
|
2129
|
+
Text as Text11,
|
|
2130
|
+
StyleSheet as StyleSheet14,
|
|
2131
|
+
Platform as Platform10,
|
|
2132
|
+
Pressable as Pressable9,
|
|
2066
2133
|
ScrollView
|
|
2067
2134
|
} from "react-native";
|
|
2068
2135
|
import Svg2, { Path as Path2, Line as Line2 } from "react-native-svg";
|
|
2069
2136
|
import { WebView as WebView3 } from "react-native-webview";
|
|
2070
|
-
import { ada as
|
|
2137
|
+
import { ada as ada11 } from "@ateam-ai-mobile/core";
|
|
2071
2138
|
import { AdaOrb as AdaOrb3, SurfaceFullscreen as SurfaceFullscreen2 } from "@ateam-ai-mobile/plugin-runtime";
|
|
2072
2139
|
|
|
2073
2140
|
// src/voice/useVoiceCall.ts
|
|
@@ -2273,8 +2340,8 @@ function useVoiceCall({ skillSlug } = {}) {
|
|
|
2273
2340
|
}
|
|
2274
2341
|
|
|
2275
2342
|
// src/voice/VoiceCallSheet.tsx
|
|
2276
|
-
import { jsx as
|
|
2277
|
-
var
|
|
2343
|
+
import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
2344
|
+
var fontFam7 = Platform10.OS === "ios" ? "SF Pro Rounded" : void 0;
|
|
2278
2345
|
var HIGHLIGHT_PATTERNS = [
|
|
2279
2346
|
/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,
|
|
2280
2347
|
/(?:\+?\d[\s\-().]?){7,}\d/g,
|
|
@@ -2318,7 +2385,7 @@ function HighlightedText({
|
|
|
2318
2385
|
importantStyle
|
|
2319
2386
|
}) {
|
|
2320
2387
|
const segments = useMemo5(() => highlightSegments(text), [text]);
|
|
2321
|
-
return /* @__PURE__ */
|
|
2388
|
+
return /* @__PURE__ */ jsx16(Text11, { style: baseStyle, children: segments.map((seg, i) => /* @__PURE__ */ jsx16(Text11, { style: seg.important ? importantStyle : void 0, children: seg.text }, i)) });
|
|
2322
2389
|
}
|
|
2323
2390
|
function VoiceCallSheet({ visible, onClose, skillSlug }) {
|
|
2324
2391
|
const {
|
|
@@ -2370,7 +2437,7 @@ function VoiceCallSheet({ visible, onClose, skillSlug }) {
|
|
|
2370
2437
|
visible,
|
|
2371
2438
|
onClose: handleHangUp,
|
|
2372
2439
|
status: statusLabel,
|
|
2373
|
-
hero: /* @__PURE__ */
|
|
2440
|
+
hero: /* @__PURE__ */ jsx16(AdaOrb3, { size: 180, state: orbState }),
|
|
2374
2441
|
closeIcon: "hangup",
|
|
2375
2442
|
closeLabel: "End",
|
|
2376
2443
|
children: [
|
|
@@ -2378,58 +2445,58 @@ function VoiceCallSheet({ visible, onClose, skillSlug }) {
|
|
|
2378
2445
|
ScrollView,
|
|
2379
2446
|
{
|
|
2380
2447
|
ref: scrollRef,
|
|
2381
|
-
style:
|
|
2382
|
-
contentContainerStyle:
|
|
2448
|
+
style: styles14.transcript,
|
|
2449
|
+
contentContainerStyle: styles14.transcriptContent,
|
|
2383
2450
|
showsVerticalScrollIndicator: false,
|
|
2384
2451
|
children: [
|
|
2385
|
-
callState === "error" && error ? /* @__PURE__ */
|
|
2386
|
-
visibleEntries.map((entry, i) => /* @__PURE__ */ jsxs12(
|
|
2387
|
-
/* @__PURE__ */
|
|
2388
|
-
/* @__PURE__ */
|
|
2452
|
+
callState === "error" && error ? /* @__PURE__ */ jsx16(View15, { style: styles14.errorBox, children: /* @__PURE__ */ jsx16(Text11, { style: styles14.errorText, children: error }) }) : null,
|
|
2453
|
+
visibleEntries.map((entry, i) => /* @__PURE__ */ jsxs12(View15, { style: styles14.entry, children: [
|
|
2454
|
+
/* @__PURE__ */ jsx16(Text11, { style: styles14.role, children: entry.role === "user" ? "YOU" : "ADA" }),
|
|
2455
|
+
/* @__PURE__ */ jsx16(
|
|
2389
2456
|
HighlightedText,
|
|
2390
2457
|
{
|
|
2391
2458
|
text: entry.text,
|
|
2392
|
-
baseStyle:
|
|
2393
|
-
importantStyle:
|
|
2459
|
+
baseStyle: styles14.entryText,
|
|
2460
|
+
importantStyle: styles14.important
|
|
2394
2461
|
}
|
|
2395
2462
|
)
|
|
2396
2463
|
] }, `${entry.ts}-${i}`)),
|
|
2397
|
-
userPartial || aiPartial ? /* @__PURE__ */ jsxs12(
|
|
2398
|
-
/* @__PURE__ */
|
|
2399
|
-
/* @__PURE__ */
|
|
2464
|
+
userPartial || aiPartial ? /* @__PURE__ */ jsxs12(View15, { style: styles14.entry, children: [
|
|
2465
|
+
/* @__PURE__ */ jsx16(Text11, { style: styles14.role, children: userPartial ? "YOU" : "ADA" }),
|
|
2466
|
+
/* @__PURE__ */ jsx16(
|
|
2400
2467
|
HighlightedText,
|
|
2401
2468
|
{
|
|
2402
2469
|
text: userPartial || aiPartial,
|
|
2403
|
-
baseStyle:
|
|
2404
|
-
importantStyle:
|
|
2470
|
+
baseStyle: styles14.entryTextLive,
|
|
2471
|
+
importantStyle: styles14.important
|
|
2405
2472
|
}
|
|
2406
2473
|
)
|
|
2407
2474
|
] }) : null
|
|
2408
2475
|
]
|
|
2409
2476
|
}
|
|
2410
2477
|
),
|
|
2411
|
-
callState === "connected" || callState === "connecting" ? /* @__PURE__ */ jsxs12(
|
|
2412
|
-
/* @__PURE__ */
|
|
2413
|
-
|
|
2478
|
+
callState === "connected" || callState === "connecting" ? /* @__PURE__ */ jsxs12(View15, { style: styles14.muteWrap, pointerEvents: "box-none", children: [
|
|
2479
|
+
/* @__PURE__ */ jsx16(
|
|
2480
|
+
Pressable9,
|
|
2414
2481
|
{
|
|
2415
2482
|
onPress: toggleMute,
|
|
2416
2483
|
accessibilityRole: "button",
|
|
2417
2484
|
accessibilityLabel: muted ? "Unmute microphone" : "Mute microphone",
|
|
2418
2485
|
accessibilityState: { selected: muted },
|
|
2419
|
-
style: [
|
|
2486
|
+
style: [styles14.muteBtn, muted && styles14.muteBtnActive],
|
|
2420
2487
|
hitSlop: 12,
|
|
2421
|
-
children: /* @__PURE__ */ jsxs12(Svg2, { width: 22, height: 22, viewBox: "0 0 24 24", fill: "none", stroke: muted ?
|
|
2422
|
-
/* @__PURE__ */
|
|
2423
|
-
/* @__PURE__ */
|
|
2424
|
-
/* @__PURE__ */
|
|
2425
|
-
/* @__PURE__ */
|
|
2426
|
-
muted ? /* @__PURE__ */
|
|
2488
|
+
children: /* @__PURE__ */ jsxs12(Svg2, { width: 22, height: 22, viewBox: "0 0 24 24", fill: "none", stroke: muted ? ada11.paper : ada11.ink, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
2489
|
+
/* @__PURE__ */ jsx16(Path2, { d: "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z" }),
|
|
2490
|
+
/* @__PURE__ */ jsx16(Path2, { d: "M19 10v2a7 7 0 0 1-14 0v-2" }),
|
|
2491
|
+
/* @__PURE__ */ jsx16(Line2, { x1: "12", y1: "19", x2: "12", y2: "23" }),
|
|
2492
|
+
/* @__PURE__ */ jsx16(Line2, { x1: "8", y1: "23", x2: "16", y2: "23" }),
|
|
2493
|
+
muted ? /* @__PURE__ */ jsx16(Line2, { x1: "3", y1: "3", x2: "21", y2: "21", stroke: ada11.paper, strokeWidth: 2.4 }) : null
|
|
2427
2494
|
] })
|
|
2428
2495
|
}
|
|
2429
2496
|
),
|
|
2430
|
-
/* @__PURE__ */
|
|
2497
|
+
/* @__PURE__ */ jsx16(Text11, { style: styles14.muteLabel, children: muted ? "Muted" : "Mute" })
|
|
2431
2498
|
] }) : null,
|
|
2432
|
-
callState !== "idle" && /* @__PURE__ */
|
|
2499
|
+
callState !== "idle" && /* @__PURE__ */ jsx16(View15, { style: styles14.hiddenWebView, pointerEvents: "none", children: /* @__PURE__ */ jsx16(
|
|
2433
2500
|
WebView3,
|
|
2434
2501
|
{
|
|
2435
2502
|
ref: webViewRef,
|
|
@@ -2449,7 +2516,7 @@ function VoiceCallSheet({ visible, onClose, skillSlug }) {
|
|
|
2449
2516
|
}
|
|
2450
2517
|
);
|
|
2451
2518
|
}
|
|
2452
|
-
var
|
|
2519
|
+
var styles14 = StyleSheet14.create({
|
|
2453
2520
|
transcript: {
|
|
2454
2521
|
flex: 1,
|
|
2455
2522
|
paddingHorizontal: 28
|
|
@@ -2466,9 +2533,9 @@ var styles13 = StyleSheet13.create({
|
|
|
2466
2533
|
},
|
|
2467
2534
|
role: {
|
|
2468
2535
|
fontSize: 10,
|
|
2469
|
-
fontFamily:
|
|
2536
|
+
fontFamily: fontFam7,
|
|
2470
2537
|
fontWeight: "700",
|
|
2471
|
-
color:
|
|
2538
|
+
color: ada11.inkMuted,
|
|
2472
2539
|
letterSpacing: 1.4,
|
|
2473
2540
|
minWidth: 32,
|
|
2474
2541
|
paddingTop: 3,
|
|
@@ -2477,9 +2544,9 @@ var styles13 = StyleSheet13.create({
|
|
|
2477
2544
|
entryText: {
|
|
2478
2545
|
flex: 1,
|
|
2479
2546
|
fontSize: 14,
|
|
2480
|
-
fontFamily:
|
|
2547
|
+
fontFamily: fontFam7,
|
|
2481
2548
|
fontWeight: "400",
|
|
2482
|
-
color:
|
|
2549
|
+
color: ada11.inkSoft,
|
|
2483
2550
|
lineHeight: 20,
|
|
2484
2551
|
letterSpacing: -0.1,
|
|
2485
2552
|
opacity: 0.42
|
|
@@ -2487,18 +2554,18 @@ var styles13 = StyleSheet13.create({
|
|
|
2487
2554
|
entryTextLive: {
|
|
2488
2555
|
flex: 1,
|
|
2489
2556
|
fontSize: 14,
|
|
2490
|
-
fontFamily:
|
|
2557
|
+
fontFamily: fontFam7,
|
|
2491
2558
|
fontWeight: "400",
|
|
2492
|
-
color:
|
|
2559
|
+
color: ada11.inkSoft,
|
|
2493
2560
|
lineHeight: 20,
|
|
2494
2561
|
letterSpacing: -0.1,
|
|
2495
2562
|
opacity: 0.7
|
|
2496
2563
|
},
|
|
2497
2564
|
important: {
|
|
2498
2565
|
fontSize: 17,
|
|
2499
|
-
fontFamily:
|
|
2566
|
+
fontFamily: fontFam7,
|
|
2500
2567
|
fontWeight: "700",
|
|
2501
|
-
color:
|
|
2568
|
+
color: ada11.ink,
|
|
2502
2569
|
letterSpacing: -0.1,
|
|
2503
2570
|
opacity: 1
|
|
2504
2571
|
},
|
|
@@ -2513,14 +2580,14 @@ var styles13 = StyleSheet13.create({
|
|
|
2513
2580
|
},
|
|
2514
2581
|
errorText: {
|
|
2515
2582
|
fontSize: 13,
|
|
2516
|
-
fontFamily:
|
|
2583
|
+
fontFamily: fontFam7,
|
|
2517
2584
|
fontWeight: "500",
|
|
2518
2585
|
color: "#fca5a5",
|
|
2519
2586
|
lineHeight: 18
|
|
2520
2587
|
},
|
|
2521
2588
|
muteWrap: {
|
|
2522
2589
|
position: "absolute",
|
|
2523
|
-
bottom:
|
|
2590
|
+
bottom: Platform10.OS === "ios" ? 56 : 40,
|
|
2524
2591
|
left: 28,
|
|
2525
2592
|
alignItems: "center",
|
|
2526
2593
|
gap: 6
|
|
@@ -2529,9 +2596,9 @@ var styles13 = StyleSheet13.create({
|
|
|
2529
2596
|
width: 56,
|
|
2530
2597
|
height: 56,
|
|
2531
2598
|
borderRadius: 28,
|
|
2532
|
-
backgroundColor:
|
|
2599
|
+
backgroundColor: ada11.paperSoft,
|
|
2533
2600
|
borderWidth: 1,
|
|
2534
|
-
borderColor:
|
|
2601
|
+
borderColor: ada11.border,
|
|
2535
2602
|
justifyContent: "center",
|
|
2536
2603
|
alignItems: "center"
|
|
2537
2604
|
},
|
|
@@ -2541,9 +2608,9 @@ var styles13 = StyleSheet13.create({
|
|
|
2541
2608
|
},
|
|
2542
2609
|
muteLabel: {
|
|
2543
2610
|
fontSize: 12,
|
|
2544
|
-
fontFamily:
|
|
2611
|
+
fontFamily: fontFam7,
|
|
2545
2612
|
fontWeight: "500",
|
|
2546
|
-
color:
|
|
2613
|
+
color: ada11.inkMuted,
|
|
2547
2614
|
letterSpacing: 0.3
|
|
2548
2615
|
},
|
|
2549
2616
|
hiddenWebView: {
|