@ateam-ai-mobile/ui 0.1.3 → 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.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 Platform6,
6
+ Platform as Platform7,
7
7
  RefreshControl,
8
- StyleSheet as StyleSheet10,
9
- View as View11
8
+ StyleSheet as StyleSheet11,
9
+ View as View12
10
10
  } from "react-native";
11
- import { ada as ada7, useChatStore, pluginCommandEmitter as pluginCommandEmitter3 } from "@ateam-ai-mobile/core";
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 View7, Text as Text6, Pressable as Pressable3, StyleSheet as StyleSheet6, Image, Platform as Platform4 } from "react-native";
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 ada6, borderRadius as borderRadius2, fontSize as fontSize4 } from "@ateam-ai-mobile/core";
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
- useSurfaceStore2.getState().show(id, focus ? { focus } : void 0);
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/TableCardBlock.tsx
1002
- import { View as View6, Text as Text5, StyleSheet as StyleSheet5, Platform as Platform3 } from "react-native";
1003
- import { ada as ada5, borderRadius, fontSize as fontSize3, spacing } from "@ateam-ai-mobile/core";
1004
- import { jsx as jsx7, jsxs as jsxs5 } from "react/jsx-runtime";
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__ */ jsx7(View6, { style: styles5.wrap, children: rows.map((row, i) => {
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(View6, { style: styles5.card, children: [
1013
- /* @__PURE__ */ jsx7(Text5, { style: styles5.title, children: String(title ?? "") }),
1014
- detailCols.length > 0 && /* @__PURE__ */ jsx7(View6, { style: styles5.details, children: detailCols.map((col, ci) => {
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(View6, { style: styles5.row, children: [
1018
- /* @__PURE__ */ jsx7(Text5, { style: styles5.label, children: String(col) }),
1019
- /* @__PURE__ */ jsx7(Text5, { style: styles5.value, children: String(value) })
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 styles5 = StyleSheet5.create({
1086
+ var styles6 = StyleSheet6.create({
1026
1087
  wrap: {
1027
1088
  marginVertical: 6,
1028
1089
  gap: 8
1029
1090
  },
1030
1091
  card: {
1031
- backgroundColor: ada5.paper,
1092
+ backgroundColor: ada6.paper,
1032
1093
  borderRadius: borderRadius.md,
1033
1094
  borderWidth: 1,
1034
- borderColor: ada5.border,
1095
+ borderColor: ada6.border,
1035
1096
  padding: spacing.md
1036
1097
  },
1037
1098
  title: {
1038
- color: ada5.ink,
1039
- fontSize: fontSize3.md,
1099
+ color: ada6.ink,
1100
+ fontSize: fontSize4.md,
1040
1101
  fontWeight: "600",
1041
- fontFamily: fontFam2,
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: ada5.inkMuted,
1055
- fontSize: fontSize3.xs,
1056
- fontFamily: fontFam2,
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: ada5.inkSoft,
1066
- fontSize: fontSize3.sm,
1067
- fontFamily: fontFam2,
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 jsx8, jsxs as jsxs6 } from "react/jsx-runtime";
1082
- var fontFam3 = Platform4.OS === "ios" ? "SF Pro Rounded" : void 0;
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__ */ jsx8(View7, { style: separatorStyles.container, children: /* @__PURE__ */ jsx8(View7, { style: separatorStyles.pill, children: /* @__PURE__ */ jsx8(Text6, { style: separatorStyles.text, children: label }) }) });
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 = StyleSheet6.create({
1166
+ var separatorStyles = StyleSheet7.create({
1106
1167
  container: {
1107
1168
  alignItems: "center",
1108
1169
  marginVertical: 14
1109
1170
  },
1110
1171
  pill: {
1111
- backgroundColor: ada6.paperSoft,
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: ada6.inkMuted,
1180
+ color: ada7.inkMuted,
1120
1181
  letterSpacing: 0.4,
1121
- fontFamily: fontFam3
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(View7, { style: [styles6.row, isUser && styles6.rowUser], children: [
1146
- !isUser && !isNotification && /* @__PURE__ */ jsx8(View7, { style: styles6.avatarOrb, children: /* @__PURE__ */ jsx8(
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__ */ jsx8(View7, { style: styles6.notificationLeftStripe }),
1215
+ isNotification && /* @__PURE__ */ jsx9(View8, { style: styles7.notificationLeftStripe }),
1154
1216
  /* @__PURE__ */ jsxs6(
1155
- Pressable3,
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
- styles6.bubble,
1163
- isUser && styles6.bubbleUser,
1164
- isSystem && styles6.bubbleSystem,
1165
- isNotification && styles6.bubbleNotification,
1166
- isProgressOnly && styles6.bubbleProgress
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(View7, { style: styles6.notificationHeader, children: [
1170
- /* @__PURE__ */ jsx8(Text6, { style: styles6.notificationHeaderIcon, children: "\u{1F514}" }),
1171
- /* @__PURE__ */ jsx8(Text6, { style: styles6.notificationHeaderText, children: "Notification" })
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__ */ jsx8(View7, { style: styles6.attachments, children: message.attachments.map((att, i) => att.previewUri ? /* @__PURE__ */ jsx8(
1174
- Pressable3,
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__ */ jsx8(
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: styles6.attachmentImage,
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__ */ jsx8(View7, { style: styles6.attachmentFile, children: /* @__PURE__ */ jsx8(Text6, { style: styles6.attachmentFileName, numberOfLines: 1, children: att.name }) }, i)) }),
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__ */ jsx8(Text6, { selectable: true, style: styles6.userText, children: message.content }) : null
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
- ) : renderAssistantContent(message.content, copyText),
1203
- !!copied && /* @__PURE__ */ jsx8(View7, { style: styles6.copiedBadge, children: /* @__PURE__ */ jsx8(Text6, { style: styles6.copiedText, children: copied }) }),
1204
- message.toolCalls && message.toolCalls.length > 0 && /* @__PURE__ */ jsx8(ToolCallsBadge, { calls: message.toolCalls }),
1205
- message.jobProgress && /* @__PURE__ */ jsx8(JobProgressBar, { progress: message.jobProgress, standalone: isProgressOnly }),
1206
- !isUser && message.actions && message.actions.length > 0 && /* @__PURE__ */ jsx8(UIActionsRow, { actions: message.actions }),
1207
- !isProgressOnly && /* @__PURE__ */ jsx8(Text6, { style: [styles6.timeText, isUser && styles6.timeTextUser], children: formatTime(message.timestamp) })
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__ */ jsx8(View7, { style: styles6.avatarSpacer })
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__ */ jsx8(MarkdownBubble, { content, copyText });
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__ */ jsx8(Fragment, { children: segments.map((seg, i) => {
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__ */ jsx8(MarkdownBubble, { content: seg.content, copyText }, i);
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__ */ jsx8(TableCardBlock, { columns: data.columns, rows: data.rows }, i);
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__ */ jsx8(
1321
+ return /* @__PURE__ */ jsx9(
1255
1322
  Markdown,
1256
1323
  {
1257
1324
  style: markdownStyles,
1258
1325
  rules: {
1259
- code_inline: (node) => /* @__PURE__ */ jsx8(
1260
- Text6,
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__ */ jsx8(
1269
- Pressable3,
1335
+ fence: (node) => /* @__PURE__ */ jsx9(
1336
+ Pressable4,
1270
1337
  {
1271
1338
  onPress: () => copyText(node.content),
1272
1339
  style: markdownStyles.fence,
1273
- children: /* @__PURE__ */ jsx8(Text6, { style: markdownStyles.fenceText, children: node.content })
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(View7, { style: styles6.toolCalls, children: [
1286
- /* @__PURE__ */ jsxs6(Pressable3, { style: styles6.toolToggle, onPress: () => setExpanded(!expanded), children: [
1287
- /* @__PURE__ */ jsx8(Text6, { style: styles6.toolLabel, children: label }),
1288
- /* @__PURE__ */ jsx8(Text6, { style: styles6.toolChevron, children: expanded ? "\u25B2" : "\u25BC" })
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(View7, { style: styles6.toolItem, children: [
1291
- /* @__PURE__ */ jsx8(Text6, { style: styles6.toolName, children: tc.name }),
1292
- tc.skill && /* @__PURE__ */ jsx8(Text6, { style: styles6.toolSkill, children: tc.skill })
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 styles6 = StyleSheet6.create({
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: ada6.botBubble,
1386
+ backgroundColor: ada7.botBubble,
1320
1387
  borderWidth: 1,
1321
- borderColor: ada6.botBubbleBorder,
1388
+ borderColor: ada7.botBubbleBorder,
1322
1389
  borderRadius: borderRadius2.xl,
1323
1390
  paddingHorizontal: 16,
1324
1391
  paddingVertical: 12
1325
1392
  },
1326
1393
  bubbleUser: {
1327
- backgroundColor: ada6.userBubble,
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: ada6.orangeSoft,
1340
- borderColor: ada6.orange,
1406
+ backgroundColor: ada7.orangeSoft,
1407
+ borderColor: ada7.orange,
1341
1408
  maxWidth: "90%"
1342
1409
  },
1343
1410
  bubbleNotification: {
1344
- backgroundColor: ada6.orangeSoft,
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: ada6.orange,
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: ada6.orangeDeep,
1433
+ color: ada7.orangeDeep,
1367
1434
  fontSize: 11,
1368
1435
  fontWeight: "700",
1369
1436
  letterSpacing: 0.6,
1370
1437
  textTransform: "uppercase",
1371
- fontFamily: fontFam3
1438
+ fontFamily: fontFam4
1372
1439
  },
1373
1440
  userText: {
1374
- color: ada6.userBubbleText,
1375
- fontSize: fontSize4.md,
1441
+ color: ada7.userBubbleText,
1442
+ fontSize: fontSize5.md,
1376
1443
  lineHeight: 22,
1377
- fontFamily: fontFam3
1444
+ fontFamily: fontFam4
1378
1445
  },
1379
1446
  timeText: {
1380
1447
  fontSize: 11,
1381
- color: ada6.inkMuted,
1448
+ color: ada7.inkMuted,
1382
1449
  alignSelf: "flex-end",
1383
1450
  marginTop: 4,
1384
- fontFamily: fontFam3
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: fontSize4.xs,
1489
+ fontSize: fontSize5.xs,
1423
1490
  fontWeight: "600"
1424
1491
  },
1425
1492
  toolCalls: {
1426
1493
  marginTop: 8,
1427
1494
  borderTopWidth: 1,
1428
- borderTopColor: ada6.border,
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: ada6.inkSoft,
1438
- fontSize: fontSize4.xs,
1504
+ color: ada7.inkSoft,
1505
+ fontSize: fontSize5.xs,
1439
1506
  fontWeight: "500"
1440
1507
  },
1441
1508
  toolChevron: {
1442
- color: ada6.inkMuted,
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: ada6.inkSoft,
1451
- fontSize: fontSize4.xs,
1517
+ color: ada7.inkSoft,
1518
+ fontSize: fontSize5.xs,
1452
1519
  fontFamily: "monospace"
1453
1520
  },
1454
1521
  toolSkill: {
1455
- color: ada6.orangeDeep,
1456
- fontSize: fontSize4.xs
1522
+ color: ada7.orangeDeep,
1523
+ fontSize: fontSize5.xs
1457
1524
  }
1458
1525
  });
1459
- var markdownStyles = StyleSheet6.create({
1526
+ var markdownStyles = StyleSheet7.create({
1460
1527
  body: {
1461
- color: ada6.botBubbleText,
1462
- fontSize: fontSize4.md,
1528
+ color: ada7.botBubbleText,
1529
+ fontSize: fontSize5.md,
1463
1530
  lineHeight: 22,
1464
- fontFamily: fontFam3
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: ada6.botBubbleText
1539
+ color: ada7.botBubbleText
1473
1540
  },
1474
1541
  em: {
1475
1542
  fontStyle: "italic"
1476
1543
  },
1477
1544
  code_inline: {
1478
- backgroundColor: ada6.paperDeep,
1479
- color: ada6.orangeDeep,
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: fontSize4.sm
1551
+ fontSize: fontSize5.sm
1485
1552
  },
1486
1553
  fence: {
1487
- backgroundColor: ada6.paperDeep,
1554
+ backgroundColor: ada7.paperDeep,
1488
1555
  padding: 10,
1489
1556
  borderRadius: 10
1490
1557
  },
1491
1558
  fenceText: {
1492
1559
  fontFamily: "monospace",
1493
- fontSize: fontSize4.sm,
1494
- color: ada6.ink
1560
+ fontSize: fontSize5.sm,
1561
+ color: ada7.ink
1495
1562
  },
1496
1563
  link: {
1497
- color: ada6.orangeDeep
1564
+ color: ada7.orangeDeep
1498
1565
  },
1499
1566
  list_item: {
1500
- color: ada6.botBubbleText
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 View8, StyleSheet as StyleSheet7 } from "react-native";
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 jsx9 } from "react/jsx-runtime";
1577
+ import { jsx as jsx10 } from "react/jsx-runtime";
1511
1578
  function TypingIndicator() {
1512
- return /* @__PURE__ */ jsx9(View8, { style: styles7.row, children: /* @__PURE__ */ jsx9(AdaOrb2, { size: 32, state: "thinking" }) });
1579
+ return /* @__PURE__ */ jsx10(View9, { style: styles8.row, children: /* @__PURE__ */ jsx10(AdaOrb2, { size: 32, state: "thinking" }) });
1513
1580
  }
1514
- var styles7 = StyleSheet7.create({
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 View9,
1594
+ View as View10,
1528
1595
  TextInput,
1529
- Pressable as Pressable4,
1530
- StyleSheet as StyleSheet8,
1531
- Platform as Platform5
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 jsx10, jsxs as jsxs7 } from "react/jsx-runtime";
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__ */ jsx10(View9, { style: styles8.dock, children: /* @__PURE__ */ jsxs7(View9, { style: styles8.inputRow, children: [
1557
- onCallStart && /* @__PURE__ */ jsx10(Pressable4, { style: styles8.callBtn, onPress: onCallStart, children: /* @__PURE__ */ jsx10(Svg, { width: 20, height: 20, viewBox: "0 0 24 24", fill: "none", stroke: colors2.light.accent, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsx10(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" }) }) }),
1558
- /* @__PURE__ */ jsx10(
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: [styles8.input, { height: Math.min(Math.max(40, height), 120) }],
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 (Platform5.OS === "web") handleSend();
1639
+ if (Platform6.OS === "web") handleSend();
1573
1640
  }
1574
1641
  }
1575
1642
  ),
1576
- /* @__PURE__ */ jsx10(
1577
- Pressable4,
1643
+ /* @__PURE__ */ jsx11(
1644
+ Pressable5,
1578
1645
  {
1579
- style: [styles8.sendBtn, canSend && styles8.sendBtnActive],
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__ */ jsx10(Line, { x1: "22", y1: "2", x2: "11", y2: "13" }),
1584
- /* @__PURE__ */ jsx10(Polygon, { points: "22 2 15 22 11 13 2 9 22 2" })
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 styles8 = StyleSheet8.create({
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 View10, Image as Image2, Pressable as Pressable5, Text as Text7, StyleSheet as StyleSheet9 } from "react-native";
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 jsx11, jsxs as jsxs8 } from "react/jsx-runtime";
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__ */ jsx11(Modal, { visible: true, transparent: true, animationType: "fade", onRequestClose: hide, children: /* @__PURE__ */ jsxs8(Pressable5, { style: styles9.backdrop, onPress: hide, children: [
1646
- /* @__PURE__ */ jsx11(
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: styles9.image,
1722
+ style: styles10.image,
1656
1723
  resizeMode: "contain"
1657
1724
  }
1658
1725
  ),
1659
- /* @__PURE__ */ jsx11(View10, { style: styles9.closeHint, children: /* @__PURE__ */ jsx11(Text7, { style: styles9.closeHintText, children: "Tap to close" }) })
1726
+ /* @__PURE__ */ jsx12(View11, { style: styles10.closeHint, children: /* @__PURE__ */ jsx12(Text8, { style: styles10.closeHintText, children: "Tap to close" }) })
1660
1727
  ] }) });
1661
1728
  }
1662
- var styles9 = StyleSheet9.create({
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 jsx12, jsxs as jsxs9 } from "react/jsx-runtime";
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 = useChatStore((s) => s.messages);
1695
- const loading = useChatStore((s) => s.loading);
1696
- const conversationLoaded = useChatStore((s) => s.conversationLoaded);
1697
- const loadConversation = useChatStore((s) => s.loadConversation);
1698
- const sendMessage = useChatStore((s) => s.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 = Platform6.OS !== "web";
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(View11, { children: [
1737
- showDaySep && /* @__PURE__ */ jsx12(DaySeparator, { date: item.timestamp }),
1738
- /* @__PURE__ */ jsx12(MessageBubble, { message: item })
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__ */ jsx12(TypingIndicator, {}) : null;
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: styles10.root,
1746
- behavior: Platform6.OS === "ios" ? "padding" : void 0,
1812
+ style: styles11.root,
1813
+ behavior: Platform7.OS === "ios" ? "padding" : void 0,
1747
1814
  children: [
1748
- /* @__PURE__ */ jsx12(
1815
+ /* @__PURE__ */ jsx13(
1749
1816
  FlatList,
1750
1817
  {
1751
1818
  ref: listRef,
1752
- style: styles10.list,
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__ */ jsx12(RefreshControl, { refreshing, onRefresh: handleRefresh, tintColor: ada7.orange }),
1827
+ refreshControl: /* @__PURE__ */ jsx13(RefreshControl, { refreshing, onRefresh: handleRefresh, tintColor: ada8.orange }),
1761
1828
  keyboardShouldPersistTaps: "handled",
1762
- contentContainerStyle: styles10.listContent
1829
+ contentContainerStyle: styles11.listContent
1763
1830
  }
1764
1831
  ),
1765
1832
  footerAccessory,
1766
- /* @__PURE__ */ jsx12(
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__ */ jsx12(Lightbox, {}),
1777
- /* @__PURE__ */ jsx12(WidgetHost, {})
1843
+ withLightbox && /* @__PURE__ */ jsx13(Lightbox, {}),
1844
+ /* @__PURE__ */ jsx13(WidgetHost, {})
1778
1845
  ]
1779
1846
  }
1780
1847
  );
1781
1848
  }
1782
- var styles10 = StyleSheet10.create({
1849
+ var styles11 = StyleSheet11.create({
1783
1850
  root: {
1784
1851
  flex: 1,
1785
- backgroundColor: ada7.paper
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 View12,
1800
- Text as Text8,
1801
- Pressable as Pressable6,
1802
- StyleSheet as StyleSheet11,
1866
+ View as View13,
1867
+ Text as Text9,
1868
+ Pressable as Pressable7,
1869
+ StyleSheet as StyleSheet12,
1803
1870
  ActivityIndicator as ActivityIndicator4,
1804
- Platform as Platform7
1871
+ Platform as Platform8
1805
1872
  } from "react-native";
1806
1873
  import { WebView as WebView2 } from "react-native-webview";
1807
- import { ada as ada8 } from "@ateam-ai-mobile/core";
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 jsx13, jsxs as jsxs10 } from "react/jsx-runtime";
1810
- var fontFam4 = Platform7.OS === "ios" ? "SF Pro Rounded" : void 0;
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__ */ jsx13(
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(View12, { style: styles11.root, children: [
1827
- /* @__PURE__ */ jsxs10(View12, { style: styles11.bar, children: [
1828
- /* @__PURE__ */ jsx13(Pressable6, { onPress: onClose, hitSlop: 12, style: styles11.closeBtn, children: /* @__PURE__ */ jsx13(Text8, { style: styles11.closeIcon, children: "\u2715" }) }),
1829
- /* @__PURE__ */ jsx13(Text8, { style: styles11.title, numberOfLines: 1, children: title || "Widget" }),
1830
- /* @__PURE__ */ jsx13(View12, { style: styles11.closeBtn })
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__ */ jsx13(View12, { style: styles11.errorWrap, children: /* @__PURE__ */ jsx13(Text8, { style: styles11.errorText, children: "No bundle available for this widget." }) }) : error ? /* @__PURE__ */ jsxs10(View12, { style: styles11.errorWrap, children: [
1833
- /* @__PURE__ */ jsx13(Text8, { style: styles11.errorText, children: "Couldn't load widget" }),
1834
- /* @__PURE__ */ jsx13(Text8, { style: styles11.errorSub, children: error })
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__ */ jsx13(
1903
+ /* @__PURE__ */ jsx14(
1837
1904
  WebView2,
1838
1905
  {
1839
1906
  source: { uri },
1840
- style: styles11.web,
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__ */ jsx13(View12, { pointerEvents: "none", style: styles11.spinner, children: /* @__PURE__ */ jsx13(ActivityIndicator4, { color: ada8.orange }) })
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 styles11 = StyleSheet11.create({
1931
+ var styles12 = StyleSheet12.create({
1865
1932
  root: {
1866
1933
  flex: 1,
1867
- backgroundColor: ada8.paper
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: ada8.border,
1876
- backgroundColor: ada8.paperSoft
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: ada8.ink,
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: ada8.ink,
1895
- fontFamily: fontFam4,
1961
+ color: ada9.ink,
1962
+ fontFamily: fontFam5,
1896
1963
  letterSpacing: -0.2
1897
1964
  },
1898
1965
  web: {
1899
1966
  flex: 1,
1900
- backgroundColor: ada8.paper
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: ada8.ink,
1984
+ color: ada9.ink,
1918
1985
  fontWeight: "600",
1919
1986
  marginBottom: 6
1920
1987
  },
1921
1988
  errorSub: {
1922
1989
  fontSize: 13,
1923
- color: ada8.inkMuted,
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 View13, Text as Text9, Pressable as Pressable7, ActivityIndicator as ActivityIndicator5, StyleSheet as StyleSheet12, Platform as Platform8 } from "react-native";
1931
- import { ada as ada9, fontSize as fontSize5, borderRadius as borderRadius4, listMyTenants, switchTenant, getTenant as getTenant4 } from "@ateam-ai-mobile/core";
1932
- import { jsx as jsx14, jsxs as jsxs11 } from "react/jsx-runtime";
1933
- var fontFam5 = Platform8.OS === "ios" ? "SF Pro Rounded" : void 0;
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__ */ jsx14(Text9, { style: styles12.error, children: error });
2034
+ if (error) return /* @__PURE__ */ jsx15(Text10, { style: styles13.error, children: error });
1968
2035
  if (!tenants) {
1969
- return /* @__PURE__ */ jsx14(View13, { style: styles12.loading, children: /* @__PURE__ */ jsx14(ActivityIndicator5, { color: ada9.orange }) });
2036
+ return /* @__PURE__ */ jsx15(View14, { style: styles13.loading, children: /* @__PURE__ */ jsx15(ActivityIndicator5, { color: ada10.orange }) });
1970
2037
  }
1971
- if (tenants.length === 0) return /* @__PURE__ */ jsx14(Text9, { style: styles12.empty, children: "No teams found for this account." });
1972
- return /* @__PURE__ */ jsx14(View13, { style: styles12.list, children: tenants.map((t) => {
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
- Pressable7,
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: [styles12.row, isActive && styles12.rowActive],
2049
+ style: [styles13.row, isActive && styles13.rowActive],
1983
2050
  children: [
1984
- /* @__PURE__ */ jsx14(View13, { style: styles12.dot }),
1985
- /* @__PURE__ */ jsxs11(View13, { style: styles12.rowText, children: [
1986
- /* @__PURE__ */ jsx14(Text9, { style: styles12.name, children: t.name }),
1987
- /* @__PURE__ */ jsx14(Text9, { style: styles12.slug, children: t.id })
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__ */ jsx14(ActivityIndicator5, { color: ada9.orange }) : isActive ? /* @__PURE__ */ jsx14(Text9, { style: styles12.check, children: "\u2713" }) : null
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 styles12 = StyleSheet12.create({
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: ada9.paperSoft,
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: ada9.orangeSoft,
2013
- borderColor: ada9.orange
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: ada9.orange
2086
+ backgroundColor: ada10.orange
2020
2087
  },
2021
2088
  rowText: {
2022
2089
  flex: 1
2023
2090
  },
2024
2091
  name: {
2025
- color: ada9.ink,
2026
- fontSize: fontSize5.lg,
2092
+ color: ada10.ink,
2093
+ fontSize: fontSize6.lg,
2027
2094
  fontWeight: "600",
2028
- fontFamily: fontFam5
2095
+ fontFamily: fontFam6
2029
2096
  },
2030
2097
  slug: {
2031
- color: ada9.inkMuted,
2032
- fontSize: fontSize5.sm,
2098
+ color: ada10.inkMuted,
2099
+ fontSize: fontSize6.sm,
2033
2100
  fontFamily: "monospace"
2034
2101
  },
2035
2102
  check: {
2036
- color: ada9.orangeDeep,
2037
- fontSize: fontSize5.lg,
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: ada9.inkMuted,
2046
- fontSize: fontSize5.md,
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: fontSize5.md,
2119
+ fontSize: fontSize6.md,
2053
2120
  textAlign: "center",
2054
2121
  paddingVertical: 16
2055
2122
  }
@@ -2058,21 +2125,35 @@ 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 View14,
2062
- Text as Text10,
2063
- StyleSheet as StyleSheet13,
2064
- Platform as Platform9,
2065
- Pressable as Pressable8,
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 ada10 } from "@ateam-ai-mobile/core";
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
2074
2141
  import { useState as useState9, useRef as useRef5, useCallback as useCallback6 } from "react";
2075
- import { getVoiceApiUrl as getVoiceApiUrl2, getToken as getToken2, getTenant as getTenant5, getUser as getUser2 } from "@ateam-ai-mobile/core";
2142
+ import { getVoiceApiUrl as getVoiceApiUrl2, getToken as getToken2, getTenant as getTenant5, getUser as getUser2, refreshToken } from "@ateam-ai-mobile/core";
2143
+ var TOKEN_REFRESH_SKEW_MS = 9e4;
2144
+ function tokenNeedsRefresh(token) {
2145
+ if (!token) return true;
2146
+ try {
2147
+ const payloadB64 = token.split(".")[1];
2148
+ const padded = payloadB64.replace(/-/g, "+").replace(/_/g, "/");
2149
+ const json = typeof atob === "function" ? atob(padded) : Buffer.from(padded, "base64").toString("utf8");
2150
+ const exp = JSON.parse(json)?.exp;
2151
+ if (typeof exp !== "number") return false;
2152
+ return Date.now() >= exp * 1e3 - TOKEN_REFRESH_SKEW_MS;
2153
+ } catch {
2154
+ return false;
2155
+ }
2156
+ }
2076
2157
  var INJECT_TRACK_HOOK = `
2077
2158
  (function() {
2078
2159
  if (window._adaTrackHookInstalled) return;
@@ -2163,7 +2244,7 @@ var buildMuteScript = (muted) => `
2163
2244
  console.log('[ada-mute]', muted ? 'MUTED' : 'UNMUTED', 'tracks=', n);
2164
2245
  })(${muted}); true;
2165
2246
  `;
2166
- function useVoiceCall() {
2247
+ function useVoiceCall({ skillSlug } = {}) {
2167
2248
  const [callState, setCallState] = useState9("idle");
2168
2249
  const [sessionId, setSessionId] = useState9(null);
2169
2250
  const [error, setError] = useState9(null);
@@ -2204,12 +2285,18 @@ function useVoiceCall() {
2204
2285
  } catch {
2205
2286
  }
2206
2287
  }, []);
2207
- const startCall = useCallback6(() => {
2208
- setCallState("connecting");
2288
+ const startCall = useCallback6(async () => {
2209
2289
  setError(null);
2210
2290
  setTranscript([]);
2211
2291
  setAiPartial("");
2212
2292
  setUserPartial("");
2293
+ try {
2294
+ if (tokenNeedsRefresh(getToken2())) {
2295
+ await refreshToken();
2296
+ }
2297
+ } catch {
2298
+ }
2299
+ setCallState("connecting");
2213
2300
  }, []);
2214
2301
  const stopCall = useCallback6(() => {
2215
2302
  webViewRef.current?.injectJavaScript?.("window.hangUp && window.hangUp(); true;");
@@ -2229,10 +2316,11 @@ function useVoiceCall() {
2229
2316
  const token = getToken2();
2230
2317
  const tenant = getTenant5();
2231
2318
  const actorId = getUser2()?.actorId || "";
2319
+ const skillParam = skillSlug ? `&skillSlug=${encodeURIComponent(skillSlug)}` : "";
2232
2320
  return {
2233
- uri: `${getVoiceApiUrl2()}/app?mode=mini&embedded=rn&authToken=${encodeURIComponent(token || "")}&tenant=${encodeURIComponent(tenant)}&actorId=${encodeURIComponent(actorId)}`
2321
+ uri: `${getVoiceApiUrl2()}/app?mode=mini&embedded=rn&authToken=${encodeURIComponent(token || "")}&tenant=${encodeURIComponent(tenant)}&actorId=${encodeURIComponent(actorId)}${skillParam}`
2234
2322
  };
2235
- }, []);
2323
+ }, [skillSlug]);
2236
2324
  return {
2237
2325
  callState,
2238
2326
  sessionId,
@@ -2252,8 +2340,8 @@ function useVoiceCall() {
2252
2340
  }
2253
2341
 
2254
2342
  // src/voice/VoiceCallSheet.tsx
2255
- import { jsx as jsx15, jsxs as jsxs12 } from "react/jsx-runtime";
2256
- var fontFam6 = Platform9.OS === "ios" ? "SF Pro Rounded" : void 0;
2343
+ import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
2344
+ var fontFam7 = Platform10.OS === "ios" ? "SF Pro Rounded" : void 0;
2257
2345
  var HIGHLIGHT_PATTERNS = [
2258
2346
  /[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,
2259
2347
  /(?:\+?\d[\s\-().]?){7,}\d/g,
@@ -2297,9 +2385,9 @@ function HighlightedText({
2297
2385
  importantStyle
2298
2386
  }) {
2299
2387
  const segments = useMemo5(() => highlightSegments(text), [text]);
2300
- return /* @__PURE__ */ jsx15(Text10, { style: baseStyle, children: segments.map((seg, i) => /* @__PURE__ */ jsx15(Text10, { style: seg.important ? importantStyle : void 0, children: seg.text }, i)) });
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)) });
2301
2389
  }
2302
- function VoiceCallSheet({ visible, onClose }) {
2390
+ function VoiceCallSheet({ visible, onClose, skillSlug }) {
2303
2391
  const {
2304
2392
  callState,
2305
2393
  aiPartial,
@@ -2314,7 +2402,7 @@ function VoiceCallSheet({ visible, onClose }) {
2314
2402
  getWebViewSource,
2315
2403
  webViewRef,
2316
2404
  injectedTrackHook
2317
- } = useVoiceCall();
2405
+ } = useVoiceCall({ skillSlug });
2318
2406
  const scrollRef = useRef6(null);
2319
2407
  useEffect8(() => {
2320
2408
  if (visible && callState === "idle") startCall();
@@ -2349,7 +2437,7 @@ function VoiceCallSheet({ visible, onClose }) {
2349
2437
  visible,
2350
2438
  onClose: handleHangUp,
2351
2439
  status: statusLabel,
2352
- hero: /* @__PURE__ */ jsx15(AdaOrb3, { size: 180, state: orbState }),
2440
+ hero: /* @__PURE__ */ jsx16(AdaOrb3, { size: 180, state: orbState }),
2353
2441
  closeIcon: "hangup",
2354
2442
  closeLabel: "End",
2355
2443
  children: [
@@ -2357,58 +2445,58 @@ function VoiceCallSheet({ visible, onClose }) {
2357
2445
  ScrollView,
2358
2446
  {
2359
2447
  ref: scrollRef,
2360
- style: styles13.transcript,
2361
- contentContainerStyle: styles13.transcriptContent,
2448
+ style: styles14.transcript,
2449
+ contentContainerStyle: styles14.transcriptContent,
2362
2450
  showsVerticalScrollIndicator: false,
2363
2451
  children: [
2364
- callState === "error" && error ? /* @__PURE__ */ jsx15(View14, { style: styles13.errorBox, children: /* @__PURE__ */ jsx15(Text10, { style: styles13.errorText, children: error }) }) : null,
2365
- visibleEntries.map((entry, i) => /* @__PURE__ */ jsxs12(View14, { style: styles13.entry, children: [
2366
- /* @__PURE__ */ jsx15(Text10, { style: styles13.role, children: entry.role === "user" ? "YOU" : "ADA" }),
2367
- /* @__PURE__ */ jsx15(
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(
2368
2456
  HighlightedText,
2369
2457
  {
2370
2458
  text: entry.text,
2371
- baseStyle: styles13.entryText,
2372
- importantStyle: styles13.important
2459
+ baseStyle: styles14.entryText,
2460
+ importantStyle: styles14.important
2373
2461
  }
2374
2462
  )
2375
2463
  ] }, `${entry.ts}-${i}`)),
2376
- userPartial || aiPartial ? /* @__PURE__ */ jsxs12(View14, { style: styles13.entry, children: [
2377
- /* @__PURE__ */ jsx15(Text10, { style: styles13.role, children: userPartial ? "YOU" : "ADA" }),
2378
- /* @__PURE__ */ jsx15(
2464
+ userPartial || aiPartial ? /* @__PURE__ */ jsxs12(View15, { style: styles14.entry, children: [
2465
+ /* @__PURE__ */ jsx16(Text11, { style: styles14.role, children: userPartial ? "YOU" : "ADA" }),
2466
+ /* @__PURE__ */ jsx16(
2379
2467
  HighlightedText,
2380
2468
  {
2381
2469
  text: userPartial || aiPartial,
2382
- baseStyle: styles13.entryTextLive,
2383
- importantStyle: styles13.important
2470
+ baseStyle: styles14.entryTextLive,
2471
+ importantStyle: styles14.important
2384
2472
  }
2385
2473
  )
2386
2474
  ] }) : null
2387
2475
  ]
2388
2476
  }
2389
2477
  ),
2390
- callState === "connected" || callState === "connecting" ? /* @__PURE__ */ jsxs12(View14, { style: styles13.muteWrap, pointerEvents: "box-none", children: [
2391
- /* @__PURE__ */ jsx15(
2392
- Pressable8,
2478
+ callState === "connected" || callState === "connecting" ? /* @__PURE__ */ jsxs12(View15, { style: styles14.muteWrap, pointerEvents: "box-none", children: [
2479
+ /* @__PURE__ */ jsx16(
2480
+ Pressable9,
2393
2481
  {
2394
2482
  onPress: toggleMute,
2395
2483
  accessibilityRole: "button",
2396
2484
  accessibilityLabel: muted ? "Unmute microphone" : "Mute microphone",
2397
2485
  accessibilityState: { selected: muted },
2398
- style: [styles13.muteBtn, muted && styles13.muteBtnActive],
2486
+ style: [styles14.muteBtn, muted && styles14.muteBtnActive],
2399
2487
  hitSlop: 12,
2400
- children: /* @__PURE__ */ jsxs12(Svg2, { width: 22, height: 22, viewBox: "0 0 24 24", fill: "none", stroke: muted ? ada10.paper : ada10.ink, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
2401
- /* @__PURE__ */ jsx15(Path2, { d: "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z" }),
2402
- /* @__PURE__ */ jsx15(Path2, { d: "M19 10v2a7 7 0 0 1-14 0v-2" }),
2403
- /* @__PURE__ */ jsx15(Line2, { x1: "12", y1: "19", x2: "12", y2: "23" }),
2404
- /* @__PURE__ */ jsx15(Line2, { x1: "8", y1: "23", x2: "16", y2: "23" }),
2405
- muted ? /* @__PURE__ */ jsx15(Line2, { x1: "3", y1: "3", x2: "21", y2: "21", stroke: ada10.paper, strokeWidth: 2.4 }) : null
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
2406
2494
  ] })
2407
2495
  }
2408
2496
  ),
2409
- /* @__PURE__ */ jsx15(Text10, { style: styles13.muteLabel, children: muted ? "Muted" : "Mute" })
2497
+ /* @__PURE__ */ jsx16(Text11, { style: styles14.muteLabel, children: muted ? "Muted" : "Mute" })
2410
2498
  ] }) : null,
2411
- callState !== "idle" && /* @__PURE__ */ jsx15(View14, { style: styles13.hiddenWebView, pointerEvents: "none", children: /* @__PURE__ */ jsx15(
2499
+ callState !== "idle" && /* @__PURE__ */ jsx16(View15, { style: styles14.hiddenWebView, pointerEvents: "none", children: /* @__PURE__ */ jsx16(
2412
2500
  WebView3,
2413
2501
  {
2414
2502
  ref: webViewRef,
@@ -2428,7 +2516,7 @@ function VoiceCallSheet({ visible, onClose }) {
2428
2516
  }
2429
2517
  );
2430
2518
  }
2431
- var styles13 = StyleSheet13.create({
2519
+ var styles14 = StyleSheet14.create({
2432
2520
  transcript: {
2433
2521
  flex: 1,
2434
2522
  paddingHorizontal: 28
@@ -2445,9 +2533,9 @@ var styles13 = StyleSheet13.create({
2445
2533
  },
2446
2534
  role: {
2447
2535
  fontSize: 10,
2448
- fontFamily: fontFam6,
2536
+ fontFamily: fontFam7,
2449
2537
  fontWeight: "700",
2450
- color: ada10.inkMuted,
2538
+ color: ada11.inkMuted,
2451
2539
  letterSpacing: 1.4,
2452
2540
  minWidth: 32,
2453
2541
  paddingTop: 3,
@@ -2456,9 +2544,9 @@ var styles13 = StyleSheet13.create({
2456
2544
  entryText: {
2457
2545
  flex: 1,
2458
2546
  fontSize: 14,
2459
- fontFamily: fontFam6,
2547
+ fontFamily: fontFam7,
2460
2548
  fontWeight: "400",
2461
- color: ada10.inkSoft,
2549
+ color: ada11.inkSoft,
2462
2550
  lineHeight: 20,
2463
2551
  letterSpacing: -0.1,
2464
2552
  opacity: 0.42
@@ -2466,18 +2554,18 @@ var styles13 = StyleSheet13.create({
2466
2554
  entryTextLive: {
2467
2555
  flex: 1,
2468
2556
  fontSize: 14,
2469
- fontFamily: fontFam6,
2557
+ fontFamily: fontFam7,
2470
2558
  fontWeight: "400",
2471
- color: ada10.inkSoft,
2559
+ color: ada11.inkSoft,
2472
2560
  lineHeight: 20,
2473
2561
  letterSpacing: -0.1,
2474
2562
  opacity: 0.7
2475
2563
  },
2476
2564
  important: {
2477
2565
  fontSize: 17,
2478
- fontFamily: fontFam6,
2566
+ fontFamily: fontFam7,
2479
2567
  fontWeight: "700",
2480
- color: ada10.ink,
2568
+ color: ada11.ink,
2481
2569
  letterSpacing: -0.1,
2482
2570
  opacity: 1
2483
2571
  },
@@ -2492,14 +2580,14 @@ var styles13 = StyleSheet13.create({
2492
2580
  },
2493
2581
  errorText: {
2494
2582
  fontSize: 13,
2495
- fontFamily: fontFam6,
2583
+ fontFamily: fontFam7,
2496
2584
  fontWeight: "500",
2497
2585
  color: "#fca5a5",
2498
2586
  lineHeight: 18
2499
2587
  },
2500
2588
  muteWrap: {
2501
2589
  position: "absolute",
2502
- bottom: Platform9.OS === "ios" ? 56 : 40,
2590
+ bottom: Platform10.OS === "ios" ? 56 : 40,
2503
2591
  left: 28,
2504
2592
  alignItems: "center",
2505
2593
  gap: 6
@@ -2508,9 +2596,9 @@ var styles13 = StyleSheet13.create({
2508
2596
  width: 56,
2509
2597
  height: 56,
2510
2598
  borderRadius: 28,
2511
- backgroundColor: ada10.paperSoft,
2599
+ backgroundColor: ada11.paperSoft,
2512
2600
  borderWidth: 1,
2513
- borderColor: ada10.border,
2601
+ borderColor: ada11.border,
2514
2602
  justifyContent: "center",
2515
2603
  alignItems: "center"
2516
2604
  },
@@ -2520,9 +2608,9 @@ var styles13 = StyleSheet13.create({
2520
2608
  },
2521
2609
  muteLabel: {
2522
2610
  fontSize: 12,
2523
- fontFamily: fontFam6,
2611
+ fontFamily: fontFam7,
2524
2612
  fontWeight: "500",
2525
- color: ada10.inkMuted,
2613
+ color: ada11.inkMuted,
2526
2614
  letterSpacing: 0.3
2527
2615
  },
2528
2616
  hiddenWebView: {