@vvedantb/native-ui 0.37.2 → 0.39.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (385) hide show
  1. package/README.md +8 -7
  2. package/dist/Avatar.jsx +22 -19
  3. package/dist/BottomSheetContainer.jsx +0 -6
  4. package/dist/BulkActionBar.jsx +0 -24
  5. package/dist/Button.jsx +92 -116
  6. package/dist/Card.jsx +56 -50
  7. package/dist/ColorSwatches.jsx +0 -6
  8. package/dist/Dialog.jsx +0 -12
  9. package/dist/DropdownMenu.jsx +0 -10
  10. package/dist/EmptyState.jsx +0 -3
  11. package/dist/ExpoWebRoot.jsx +0 -6
  12. package/dist/Field.jsx +0 -17
  13. package/dist/FloatingSurface.jsx +95 -80
  14. package/dist/FloatingTabBar.jsx +0 -23
  15. package/dist/IconButton.jsx +0 -1
  16. package/dist/LoadingState.jsx +0 -6
  17. package/dist/PasswordInput.jsx +0 -15
  18. package/dist/PillTabs.jsx +39 -36
  19. package/dist/SearchInput.jsx +0 -13
  20. package/dist/SectionLabel.jsx +0 -1
  21. package/dist/SharedTransition.jsx +0 -3
  22. package/dist/Skeleton.jsx +0 -2
  23. package/dist/Spinner.jsx +0 -2
  24. package/dist/StatusDot.jsx +0 -5
  25. package/dist/Switch.jsx +32 -22
  26. package/dist/Tabs.jsx +27 -26
  27. package/dist/Textarea.jsx +0 -1
  28. package/dist/ThemeToggle.jsx +0 -1
  29. package/dist/Toast.jsx +80 -91
  30. package/dist/UpdateChecker.jsx +0 -1
  31. package/dist/ai/activity-question.jsx +0 -6
  32. package/dist/ai/activity-step-label.js +0 -6
  33. package/dist/ai/activity-step-types.js +0 -4
  34. package/dist/ai/activity-tasks-utils.js +0 -17
  35. package/dist/ai/activity-timeline.js +0 -8
  36. package/dist/ai/attachments.jsx +0 -2
  37. package/dist/ai/chain-of-thought.jsx +0 -3
  38. package/dist/ai/chat-text.js +0 -1
  39. package/dist/ai/chat-thread.jsx +0 -1
  40. package/dist/ai/choice-question.jsx +0 -10
  41. package/dist/ai/code-block.jsx +0 -31
  42. package/dist/ai/collapsible.jsx +0 -14
  43. package/dist/ai/conversation-context.js +0 -3
  44. package/dist/ai/conversation.jsx +2 -48
  45. package/dist/ai/file-chip.jsx +0 -2
  46. package/dist/ai/icon-button.jsx +0 -8
  47. package/dist/ai/index.js +0 -5
  48. package/dist/ai/message-context-menu.jsx +0 -7
  49. package/dist/ai/message.jsx +0 -21
  50. package/dist/ai/prompt-input-menu.jsx +0 -3
  51. package/dist/ai/prompt-input.jsx +0 -27
  52. package/dist/ai/response-text.jsx +0 -6
  53. package/dist/ai/sources.jsx +0 -1
  54. package/dist/ai/suggestion.jsx +0 -1
  55. package/dist/ai/trace.jsx +0 -11
  56. package/dist/ai/unified-diff.jsx +0 -4
  57. package/dist/app-root/AuthGroupGate.jsx +65 -0
  58. package/dist/app-root/SsoCallbackScreen.jsx +97 -0
  59. package/dist/app-root/fonts.js +88 -0
  60. package/dist/app-root/index.js +3 -0
  61. package/dist/auth/AuthScreen.jsx +250 -77
  62. package/dist/auth/GoogleSignInButton.jsx +0 -3
  63. package/dist/auth/SecondFactorScreen.jsx +18 -14
  64. package/dist/auth/SignInScreen.jsx +40 -34
  65. package/dist/auth/authErrors.js +0 -4
  66. package/dist/auth/clerkCore3.js +0 -7
  67. package/dist/auth/index.js +0 -4
  68. package/dist/auth/totp.js +0 -2
  69. package/dist/brand/GoogleMark.jsx +0 -1
  70. package/dist/brand/ProviderIcon.jsx +0 -2
  71. package/dist/brand/index.js +0 -3
  72. package/dist/brand/svg.js +0 -6
  73. package/dist/configureTheme.js +0 -9
  74. package/dist/controlStyles.js +0 -14
  75. package/dist/crash/LastCrashDialog.jsx +56 -0
  76. package/dist/crash/lastCrash.js +192 -0
  77. package/dist/entries/ai.js +0 -3
  78. package/dist/entries/ambient.js +0 -2
  79. package/dist/entries/app-root.js +1 -0
  80. package/dist/entries/auth.js +0 -4
  81. package/dist/entries/bottom-sheet.js +0 -2
  82. package/dist/entries/brand.js +0 -1
  83. package/dist/entries/button.js +0 -1
  84. package/dist/entries/crash.js +2 -0
  85. package/dist/entries/date-time.js +0 -2
  86. package/dist/entries/expo-router.js +0 -3
  87. package/dist/entries/expo-web-root.js +0 -2
  88. package/dist/entries/floating.js +0 -2
  89. package/dist/entries/generative-ui.js +0 -4
  90. package/dist/entries/gesture-handler.js +0 -3
  91. package/dist/entries/keyboard-controller.js +0 -3
  92. package/dist/entries/layout.js +0 -2
  93. package/dist/entries/markdown.js +0 -3
  94. package/dist/entries/marketing.js +0 -1
  95. package/dist/entries/page-title.js +0 -5
  96. package/dist/entries/password-input.js +0 -2
  97. package/dist/entries/paste-input.js +0 -3
  98. package/dist/entries/primitives.js +0 -6
  99. package/dist/entries/search-input.js +0 -2
  100. package/dist/entries/tab-bar.js +0 -2
  101. package/dist/entries/theme.js +4 -2
  102. package/dist/entries/toast.js +0 -3
  103. package/dist/entries/video.js +0 -2
  104. package/dist/entries/webview.js +0 -2
  105. package/dist/examples/AiChatGallery.jsx +0 -11
  106. package/dist/examples/ParityGallery.jsx +0 -12
  107. package/dist/floating.js +0 -8
  108. package/dist/generative-ui/GenerativeUiPanel.jsx +0 -2
  109. package/dist/generative-ui/components.jsx +0 -8
  110. package/dist/glass.js +55 -0
  111. package/dist/glassBlur.jsx +0 -12
  112. package/dist/highlight.js +0 -26
  113. package/dist/index.js +4 -2
  114. package/dist/loadingGrid.js +0 -13
  115. package/dist/markdown/Markdown.jsx +0 -59
  116. package/dist/markdown/MarkdownTable.jsx +0 -18
  117. package/dist/markdown/tableText.js +0 -5
  118. package/dist/marketing/UpgradeToProCard.jsx +0 -5
  119. package/dist/marketing/pricing.js +0 -3
  120. package/dist/media/ImageGallery.jsx +0 -16
  121. package/dist/media/imageZoom.js +0 -4
  122. package/dist/media/zoom-image-gesture.jsx +0 -8
  123. package/dist/media/zoomImage.js +0 -3
  124. package/dist/motion.js +0 -3
  125. package/dist/neutralTheme.js +158 -0
  126. package/dist/pagerSwipe.js +0 -16
  127. package/dist/palette.js +0 -10
  128. package/dist/primitives/button.jsx +0 -5
  129. package/dist/primitives/icon.jsx +0 -4
  130. package/dist/primitives/keyboard-controller.jsx +0 -27
  131. package/dist/primitives/native-only-animated-view.jsx +0 -5
  132. package/dist/primitives/overlay.jsx +0 -2
  133. package/dist/primitives/pager-gesture.jsx +3 -29
  134. package/dist/primitives/paste-input.jsx +0 -5
  135. package/dist/primitives/select.jsx +0 -10
  136. package/dist/primitives/sheet-drag.jsx +0 -3
  137. package/dist/primitives/sheet-gesture.jsx +0 -8
  138. package/dist/primitives/swipe-row-gesture.jsx +3 -45
  139. package/dist/primitives/text.jsx +0 -5
  140. package/dist/primitives/toast-drag-gesture.jsx +4 -24
  141. package/dist/primitives/web-click-guard.js +0 -3
  142. package/dist/primitives/window-layer.jsx +0 -14
  143. package/dist/push.js +0 -6
  144. package/dist/relativeTime.js +0 -13
  145. package/dist/settings/MoreFromProjectV.jsx +0 -5
  146. package/dist/settings/ThemeModePicker.jsx +2 -9
  147. package/dist/settings/projectVMobileApps.js +1 -6
  148. package/dist/sheetDrag.js +0 -10
  149. package/dist/swipeRow.js +0 -15
  150. package/dist/tabBarRoutes.js +0 -4
  151. package/dist/tabIndicator.js +0 -4
  152. package/dist/tailwind-preset.cjs +0 -54
  153. package/dist/tailwind-preset.d.cts +0 -8
  154. package/dist/theme.jsx +29 -21
  155. package/dist/themeModeStore.js +62 -0
  156. package/dist/themeModes.js +9 -0
  157. package/dist/toastChrome.js +0 -6
  158. package/dist/toastDrag.js +0 -14
  159. package/dist/toastStore.js +0 -4
  160. package/dist/updateCheck.js +0 -7
  161. package/dist/video/InlineVideo.jsx +0 -2
  162. package/dist/webview/htmlView.js +0 -5
  163. package/package.json +47 -19
  164. package/src/ArtifactList.tsx +0 -2
  165. package/src/Avatar.tsx +3 -3
  166. package/src/Badge.tsx +0 -1
  167. package/src/BottomSheetContainer.tsx +0 -11
  168. package/src/BulkActionBar.tsx +0 -66
  169. package/src/Button.tsx +4 -40
  170. package/src/CaptureButton.tsx +0 -1
  171. package/src/Card.tsx +3 -15
  172. package/src/Checkbox.tsx +0 -2
  173. package/src/ColorSwatches.tsx +0 -9
  174. package/src/ConfirmDialog.tsx +0 -7
  175. package/src/DateTimeField.tsx +0 -5
  176. package/src/Dialog.tsx +0 -27
  177. package/src/DividedList.tsx +0 -1
  178. package/src/DropdownMenu.tsx +0 -51
  179. package/src/EmptyState.tsx +0 -5
  180. package/src/ExpoWebRoot.tsx +0 -10
  181. package/src/Field.tsx +0 -14
  182. package/src/FloatingFAB.tsx +0 -3
  183. package/src/FloatingSurface.tsx +11 -8
  184. package/src/FloatingTabBar.tsx +0 -25
  185. package/src/IconButton.tsx +0 -5
  186. package/src/Input.tsx +0 -1
  187. package/src/Label.tsx +0 -1
  188. package/src/LabeledSwitchRow.tsx +0 -2
  189. package/src/ListRow.tsx +0 -12
  190. package/src/LoadingState.tsx +0 -12
  191. package/src/MenuSheet.tsx +0 -2
  192. package/src/PageIndicator.tsx +0 -2
  193. package/src/PageTitle.tsx +0 -15
  194. package/src/Pager.tsx +0 -9
  195. package/src/PasswordInput.tsx +0 -24
  196. package/src/PillTabs.tsx +3 -11
  197. package/src/PinnedBotTile.tsx +0 -6
  198. package/src/Progress.tsx +0 -3
  199. package/src/ReactionRow.tsx +0 -8
  200. package/src/ScreenContainer.tsx +0 -4
  201. package/src/SearchInput.tsx +0 -25
  202. package/src/SectionLabel.tsx +0 -2
  203. package/src/Select.tsx +0 -6
  204. package/src/Separator.tsx +0 -2
  205. package/src/SharedTransition.tsx +0 -7
  206. package/src/Sheet.tsx +0 -3
  207. package/src/SheetRow.tsx +0 -12
  208. package/src/Skeleton.tsx +0 -10
  209. package/src/Spinner.tsx +0 -6
  210. package/src/StackPageHeader.tsx +0 -16
  211. package/src/StatGrid.tsx +0 -1
  212. package/src/StatusDot.tsx +0 -6
  213. package/src/SurfaceRow.tsx +0 -12
  214. package/src/SwipeableRow.tsx +0 -4
  215. package/src/Switch.tsx +3 -4
  216. package/src/Tabs.tsx +3 -27
  217. package/src/Textarea.tsx +0 -2
  218. package/src/ThemeToggle.tsx +0 -1
  219. package/src/Toast.tsx +3 -19
  220. package/src/UpdateChecker.tsx +0 -46
  221. package/src/ai/activity-question.tsx +0 -8
  222. package/src/ai/activity-step-detail.tsx +0 -5
  223. package/src/ai/activity-step-label.ts +0 -5
  224. package/src/ai/activity-step-types.ts +0 -24
  225. package/src/ai/activity-step.tsx +0 -4
  226. package/src/ai/activity-tasks-utils.ts +0 -13
  227. package/src/ai/activity-timeline.ts +0 -6
  228. package/src/ai/attachments.tsx +0 -13
  229. package/src/ai/chain-of-thought.tsx +0 -5
  230. package/src/ai/chat-jump-rail.tsx +0 -2
  231. package/src/ai/chat-text.ts +0 -1
  232. package/src/ai/chat-thread.tsx +0 -9
  233. package/src/ai/choice-question.tsx +0 -36
  234. package/src/ai/code-block.tsx +0 -52
  235. package/src/ai/collapsible.tsx +0 -12
  236. package/src/ai/conversation-context.ts +0 -14
  237. package/src/ai/conversation.tsx +0 -58
  238. package/src/ai/file-chip.tsx +0 -1
  239. package/src/ai/icon-button.tsx +0 -17
  240. package/src/ai/index.ts +0 -5
  241. package/src/ai/message-action-sheet.tsx +0 -8
  242. package/src/ai/message-context-menu.tsx +0 -22
  243. package/src/ai/message-quote.tsx +0 -4
  244. package/src/ai/message.tsx +0 -66
  245. package/src/ai/prompt-input-menu.tsx +0 -19
  246. package/src/ai/prompt-input.tsx +0 -97
  247. package/src/ai/reasoning.tsx +0 -6
  248. package/src/ai/reply-quote-chip.tsx +0 -5
  249. package/src/ai/response-text.tsx +0 -8
  250. package/src/ai/shimmer.tsx +0 -2
  251. package/src/ai/sources.tsx +0 -3
  252. package/src/ai/subagent-cards.tsx +0 -13
  253. package/src/ai/suggestion.tsx +0 -4
  254. package/src/ai/tool-approval-card.tsx +0 -14
  255. package/src/ai/trace.tsx +0 -23
  256. package/src/ai/unified-diff.tsx +0 -16
  257. package/src/ai/use-streaming-disclosure.ts +0 -4
  258. package/src/app-root/AuthGroupGate.tsx +38 -0
  259. package/src/app-root/SsoCallbackScreen.tsx +52 -0
  260. package/src/app-root/fonts.ts +53 -0
  261. package/src/app-root/index.ts +6 -0
  262. package/src/auth/AccountScreens.tsx +0 -16
  263. package/src/auth/AuthProviders.tsx +0 -13
  264. package/src/auth/AuthScreen.tsx +95 -6
  265. package/src/auth/GoogleSignInButton.tsx +0 -12
  266. package/src/auth/SecondFactorScreen.tsx +17 -15
  267. package/src/auth/SignInScreen.tsx +103 -105
  268. package/src/auth/authErrors.ts +0 -6
  269. package/src/auth/clerkCore3.ts +0 -6
  270. package/src/auth/index.ts +0 -4
  271. package/src/auth/totp.ts +0 -13
  272. package/src/brand/AppIcons.tsx +0 -6
  273. package/src/brand/AppMark.tsx +0 -5
  274. package/src/brand/AppWordmark.tsx +0 -7
  275. package/src/brand/GoogleMark.tsx +0 -4
  276. package/src/brand/ProviderIcon.tsx +0 -6
  277. package/src/brand/familyApps.ts +0 -2
  278. package/src/brand/index.ts +0 -3
  279. package/src/brand/svg.ts +0 -9
  280. package/src/configureTheme.ts +0 -10
  281. package/src/controlStyles.ts +0 -12
  282. package/src/crash/LastCrashDialog.tsx +36 -0
  283. package/src/crash/lastCrash.ts +218 -0
  284. package/src/entries/ai.ts +0 -3
  285. package/src/entries/ambient.ts +0 -2
  286. package/src/entries/app-root.ts +1 -0
  287. package/src/entries/auth.ts +0 -4
  288. package/src/entries/bottom-sheet.ts +0 -2
  289. package/src/entries/brand.ts +0 -1
  290. package/src/entries/button.ts +0 -1
  291. package/src/entries/crash.ts +13 -0
  292. package/src/entries/date-time.ts +0 -2
  293. package/src/entries/expo-router.ts +0 -3
  294. package/src/entries/expo-web-root.ts +0 -2
  295. package/src/entries/floating.ts +0 -2
  296. package/src/entries/generative-ui.ts +0 -4
  297. package/src/entries/gesture-handler.ts +0 -3
  298. package/src/entries/keyboard-controller.ts +0 -3
  299. package/src/entries/layout.ts +0 -2
  300. package/src/entries/markdown.ts +0 -3
  301. package/src/entries/marketing.ts +0 -1
  302. package/src/entries/page-title.ts +0 -5
  303. package/src/entries/password-input.ts +0 -2
  304. package/src/entries/paste-input.ts +0 -3
  305. package/src/entries/primitives.ts +0 -6
  306. package/src/entries/search-input.ts +0 -2
  307. package/src/entries/tab-bar.ts +0 -2
  308. package/src/entries/theme.ts +8 -2
  309. package/src/entries/toast.ts +0 -3
  310. package/src/entries/video.ts +0 -2
  311. package/src/entries/webview.ts +0 -2
  312. package/src/examples/AiChatGallery.tsx +0 -11
  313. package/src/examples/ParityGallery.tsx +0 -25
  314. package/src/floating.ts +0 -6
  315. package/src/generative-ui/GenerativeUiPanel.tsx +0 -15
  316. package/src/generative-ui/components.tsx +0 -9
  317. package/src/generative-ui/context.ts +0 -2
  318. package/src/glass.ts +31 -0
  319. package/src/glassBlur.tsx +0 -15
  320. package/src/highlight.ts +1 -21
  321. package/src/index.ts +7 -2
  322. package/src/loadingGrid.ts +0 -12
  323. package/src/markdown/Markdown.tsx +0 -71
  324. package/src/markdown/MarkdownTable.tsx +0 -23
  325. package/src/markdown/tableText.ts +0 -3
  326. package/src/marketing/PricingModal.tsx +0 -13
  327. package/src/marketing/UpgradeToProCard.tsx +0 -14
  328. package/src/marketing/pricing.ts +0 -12
  329. package/src/media/ImageGallery.tsx +0 -18
  330. package/src/media/MediaCard.tsx +0 -8
  331. package/src/media/imageZoom.ts +0 -4
  332. package/src/media/zoom-image-gesture.tsx +0 -9
  333. package/src/media/zoomImage.ts +0 -5
  334. package/src/motion.ts +0 -3
  335. package/src/neutralTheme.ts +127 -0
  336. package/src/pagerSwipe.ts +0 -13
  337. package/src/palette.ts +0 -10
  338. package/src/pressScale.ts +0 -7
  339. package/src/primitives/button.tsx +0 -4
  340. package/src/primitives/card.tsx +0 -1
  341. package/src/primitives/icon.tsx +0 -2
  342. package/src/primitives/input.tsx +0 -4
  343. package/src/primitives/keyboard-controller.tsx +0 -25
  344. package/src/primitives/keyboard-parts.tsx +0 -27
  345. package/src/primitives/native-only-animated-view.tsx +0 -5
  346. package/src/primitives/overlay.tsx +0 -25
  347. package/src/primitives/pager-gesture.tsx +0 -20
  348. package/src/primitives/paste-input.tsx +0 -4
  349. package/src/primitives/paste-parts.tsx +0 -1
  350. package/src/primitives/select.tsx +0 -18
  351. package/src/primitives/sheet-drag.tsx +0 -19
  352. package/src/primitives/sheet-gesture.tsx +0 -22
  353. package/src/primitives/swipe-row-gesture.tsx +0 -33
  354. package/src/primitives/switch.tsx +0 -4
  355. package/src/primitives/text.tsx +0 -4
  356. package/src/primitives/toast-drag-gesture.tsx +0 -13
  357. package/src/primitives/web-click-guard.ts +0 -2
  358. package/src/primitives/window-layer.tsx +0 -18
  359. package/src/push.ts +0 -15
  360. package/src/relativeTime.ts +0 -21
  361. package/src/router/RouterStackPageHeader.tsx +0 -1
  362. package/src/settings/MoreFromProjectV.tsx +0 -8
  363. package/src/settings/SettingsEmptyState.tsx +0 -2
  364. package/src/settings/SettingsSection.tsx +0 -3
  365. package/src/settings/SettingsToggleRow.tsx +0 -4
  366. package/src/settings/ThemeModePicker.tsx +2 -16
  367. package/src/settings/projectVMobileApps.ts +0 -8
  368. package/src/sheetDrag.ts +0 -9
  369. package/src/swipeRow.ts +0 -23
  370. package/src/tabBarRoutes.ts +0 -13
  371. package/src/tabIndicator.ts +0 -5
  372. package/src/tailwind-preset.cjs +0 -54
  373. package/src/tailwind-preset.d.cts +0 -8
  374. package/src/theme.tsx +11 -2
  375. package/src/themeModeStore.ts +85 -0
  376. package/src/themeModes.ts +10 -0
  377. package/src/toastChrome.ts +0 -6
  378. package/src/toastDrag.ts +0 -13
  379. package/src/toastStore.ts +0 -7
  380. package/src/updateCheck.ts +0 -15
  381. package/src/video/InlineVideo.tsx +0 -5
  382. package/src/webview/HtmlView.tsx +0 -23
  383. package/src/webview/HtmlView.web.tsx +0 -1
  384. package/src/webview/htmlView.ts +0 -5
  385. package/types/prism-react-renderer.d.ts +22 -0
@@ -810,10 +810,6 @@ function joinCommandText(verb: string, target: string): string {
810
810
  return `${verb} ${target}`;
811
811
  }
812
812
 
813
- /**
814
- * Past-tense phrase used when a step type is folded into a group summary line.
815
- * Deliberately plural/vague — the exact call is one click away in the fold.
816
- */
817
813
  const GROUP_PHRASES: Record<ActivityStep["type"], string> = {
818
814
  read: "read files",
819
815
  edit: "edited files",
@@ -841,7 +837,6 @@ function groupPhraseForStep(step: ActivityStep): string {
841
837
  if (step.type !== "tool") {
842
838
  return GROUP_PHRASES[step.type];
843
839
  }
844
- // Codex reports edits as a `file_change` tool call, not an edit step.
845
840
  if (isFileChangeTool(step)) {
846
841
  return GROUP_PHRASES.edit;
847
842
  }
@@ -1,7 +1,3 @@
1
- // Pure step types for the activity timeline: no React, so `@vvedantb/native-ui`
2
- // keeps a byte-identical copy (`src/ai/activity-step-types.ts`), with the step
3
- // labels and grouping that read them.
4
-
5
1
  /** One item in a todo checklist step (type "todos"). */
6
2
  export interface ActivityTodoItem {
7
3
  content: string;
@@ -54,43 +50,23 @@ export interface ActivityStep {
54
50
  | "notice"
55
51
  | "hook"
56
52
  | "status"
57
- /** A queued user message the agent took into this live turn (Steer). */
58
53
  | "steer";
59
54
  label: string;
60
55
  detail?: string;
61
- /** Full, unshortened path for file-type steps. Powers the chat File Viewer. */
62
56
  path?: string;
63
- /** `pending`: a planned step that has not started (sandbox startup stages). */
64
57
  status: "complete" | "active" | "pending";
65
- /** The tool_use id that produced this step (Claude only). */
66
58
  toolUseId?: string;
67
- /** Parent `Agent` tool_use id — set on steps that ran inside a subagent. */
68
59
  parentToolUseId?: string;
69
- /** Todo checklist snapshot (type "todos" only). */
70
60
  todos?: ActivityTodoItem[];
71
- /** Bash command (fuller than detail, capped). */
72
61
  command?: string;
73
- /** Tool result transcript (tail-capped). */
74
62
  output?: ActivityStepOutput;
75
- /** Edit before/after snippets. */
76
63
  edits?: ActivityStepEdit[];
77
- /** Codex file_change paths. */
78
64
  files?: string[];
79
- /** Write tool content head preview. */
80
65
  contentPreview?: string;
81
- /** True when the tool failed or exited non-zero. */
82
66
  isError?: boolean;
83
- /** Wall time from push → complete (ms). */
84
67
  durationMs?: number;
85
- /** AskUserQuestion prompt (type "question" only): the questions and options shown to the user. */
86
68
  questions?: ActivityQuestion[];
87
- /** AskUserQuestion answers keyed by question text. Absent when the turn ended without a structured answer. */
88
69
  answers?: Record<string, string>;
89
- /**
90
- * The transcript query stripped this step's expanded-only fields (`output`,
91
- * `edits`, `contentPreview`) to keep the chat subscription small. The row
92
- * still opens; the body fills in once the full payload is fetched.
93
- */
94
70
  hasHiddenDetail?: boolean;
95
71
  }
96
72
 
@@ -7,13 +7,9 @@ import { AgentTraceDescription, AgentTraceIcon, AgentTraceLine, AgentTraceTitle
7
7
  export type ActivityStepStatus = "running" | "complete" | "error";
8
8
 
9
9
  export type ActivityStepProps = {
10
- /** What the AI is doing, such as "Searching the web" or "Reading 3 files". */
11
10
  label: string;
12
- /** The tool's icon. Without one, the line shows the status icon only. */
13
11
  icon?: ComponentType<IconProps>;
14
- /** `running` pulses the label and shows a spinner; `complete` a check; `error` a warning in the danger colour. Default `complete`. */
15
12
  status?: ActivityStepStatus;
16
- /** Faded detail after the label, such as "Worked for 12s" (see `formatElapsed`). */
17
13
  description?: string;
18
14
  testID?: string;
19
15
  };
@@ -9,11 +9,6 @@ export interface ActivityRow {
9
9
  children?: ActivityRow[];
10
10
  }
11
11
 
12
- /**
13
- * Status-filler thinking labels emitted by older callback versions (and by
14
- * prod until the current callback deploys). The response/reasoning text is
15
- * shown directly, so these narration rows are pure noise — hide them.
16
- */
17
12
  const LEGACY_NOISE_LABELS = new Set([
18
13
  "Generating response...",
19
14
  "Generated response",
@@ -22,10 +17,8 @@ const LEGACY_NOISE_LABELS = new Set([
22
17
  "Finalizing response...",
23
18
  ]);
24
19
 
25
- /** Thinking labels that mark model reasoning rather than status narration. */
26
20
  const REASONING_LABELS = new Set(["Thinking...", "Thought"]);
27
21
 
28
- /** Placeholder details older callbacks attached to reasoning-label steps. */
29
22
  const FILLER_DETAILS = new Set([
30
23
  "Claude is reasoning...",
31
24
  "Codex is reasoning...",
@@ -51,7 +44,6 @@ export function normalizeStep(step: ActivityStep): ActivityStep | null {
51
44
  return step;
52
45
  }
53
46
 
54
- /** Builds one row per normalized step (no consecutive-type merging). */
55
47
  function stepsToRows(steps: ActivityStep[]): ActivityRow[] {
56
48
  const rows: ActivityRow[] = [];
57
49
  for (const raw of steps) {
@@ -62,10 +54,6 @@ function stepsToRows(steps: ActivityStep[]): ActivityRow[] {
62
54
  return rows;
63
55
  }
64
56
 
65
- /**
66
- * Row types that read as narration rather than work: they already summarise
67
- * themselves, so folding them into an action group would hide their only text.
68
- */
69
57
  const STANDALONE_TYPES = new Set<ActivityStep["type"]>([
70
58
  "todos",
71
59
  "notice",
@@ -95,7 +83,6 @@ export function groupActivityRows(rows: ActivityRow[]): ActivitySegment[] {
95
83
  segments.push({ kind: "reasoning", step: row.step });
96
84
  continue;
97
85
  }
98
- // Mid-turn reply text: it ends the tool run before it, like reasoning.
99
86
  if (row.step.type === "response") {
100
87
  segments.push({ kind: "response", step: row.step });
101
88
  continue;
@@ -1,8 +1,3 @@
1
- // The folded (Codex-style) rules of the web `ActivityTasks`
2
- // (`@vvedantb/ui` `activity-tasks.tsx`), as pure logic for an app that draws
3
- // the rows with the `AgentTrace` parts. The row text, the grouping and the
4
- // step types are byte-identical copies of the web files
5
- // (`activity-step-label.ts`, `activity-tasks-utils.ts`, `activity-step-types.ts`).
6
1
  import type { ActivityRow, ActivitySegment } from "./activity-tasks-utils";
7
2
  import { buildActivityRows, groupActivityRows } from "./activity-tasks-utils";
8
3
  import type { ActivityStep } from "./activity-step-types";
@@ -13,7 +8,6 @@ export const ACTIVITY_MAX_VISIBLE_BLOCKS = 8;
13
8
  /** Child rows a subagent step shows before "+N more" (web `MAX_VISIBLE_CHILDREN`). */
14
9
  export const ACTIVITY_MAX_VISIBLE_CHILDREN = 8;
15
10
 
16
- /** Step types the folded layout hides: the reply text and the status thinking lines. */
17
11
  const HIDDEN_TYPES = new Set<ActivityStep["type"]>(["thinking", "response"]);
18
12
 
19
13
  /**
@@ -23,14 +23,10 @@ import { ResponseText } from "./response-text";
23
23
  */
24
24
  export type AttachmentData = {
25
25
  id: string;
26
- /** `"source-document"` for a referenced source. Default a file. */
27
26
  type?: "file" | "source-document";
28
27
  filename?: string;
29
- /** MIME type, such as `image/png`. */
30
28
  mediaType?: string;
31
- /** A local or remote URI. An image with one shows a thumbnail. */
32
29
  url?: string;
33
- /** A source document's title. */
34
30
  title?: string;
35
31
  };
36
32
 
@@ -86,14 +82,8 @@ export function Attachments({ variant = "inline", className, ...props }: Attachm
86
82
 
87
83
  export type AttachmentProps = {
88
84
  data: AttachmentData;
89
- /** Shows a remove button, labelled "Remove" and the attachment name. */
90
85
  onRemove?: () => void;
91
- /**
92
- * Makes the chip a button, such as to open the file. The remove button stays a
93
- * separate target and does not call this. Without it the chip is not pressable.
94
- */
95
86
  onPress?: () => void;
96
- /** Names the chip button, with `onPress`. Default the attachment name (`getAttachmentLabel`). */
97
87
  accessibilityLabel?: string;
98
88
  testID?: string;
99
89
  };
@@ -101,7 +91,6 @@ export type AttachmentProps = {
101
91
  /** The hit target of a pressable chip, in points, on each axis. */
102
92
  export const ATTACHMENT_PRESS_TARGET = 48;
103
93
 
104
- /** A remove cross of 20 in a 32 row: the slop brings it to 44. */
105
94
  const REMOVE_SIZE = 20;
106
95
 
107
96
  /**
@@ -175,8 +164,6 @@ export function Attachment({ data, onRemove, onPress, accessibilityLabel, testID
175
164
  <Pressable
176
165
  accessibilityRole="button"
177
166
  accessibilityLabel={`Remove ${label}`}
178
- // A pressable label sits 6 before it, and the next chip 8 past this
179
- // chip's edge: the slop stops short of both, so neither steals a tap.
180
167
  hitSlop={{ ...touchSlop(REMOVE_SIZE), left: onPress ? 3 : touchSlop(REMOVE_SIZE).left, right: 8 }}
181
168
  onPress={onRemove}
182
169
  className="items-center justify-center rounded-full active:opacity-70"
@@ -19,16 +19,12 @@ import {
19
19
  } from "./collapsible";
20
20
  import { ResponseText } from "./response-text";
21
21
 
22
- // The web `ChainOfThought`, simplified: a fold of steps with search-result
23
- // chips. `ChainOfThoughtImage` and the step enter animation are not ported.
24
-
25
22
  /** Holds its open state (default closed), or takes `open` and `onOpenChange`. */
26
23
  export function ChainOfThought({ className, ...props }: CollapsibleProps) {
27
24
  return <Collapsible className={cn("w-full gap-4", className)} {...props} />;
28
25
  }
29
26
 
30
27
  export type ChainOfThoughtHeaderProps = Omit<CollapsibleTriggerProps, "children"> & {
31
- /** Default "Chain of Thought". A string, as it is also the accessibility label. */
32
28
  children?: string;
33
29
  icon?: ComponentType<IconProps>;
34
30
  };
@@ -71,7 +67,6 @@ export type ChainOfThoughtStepProps = ViewProps & {
71
67
  icon?: ComponentType<IconProps>;
72
68
  label: string;
73
69
  description?: string;
74
- /** `active` is the foreground, `complete` muted, `pending` muted at half opacity, as on the web. Default `complete`. */
75
70
  status?: ChainOfThoughtStepStatus;
76
71
  className?: string;
77
72
  children?: ReactNode;
@@ -5,9 +5,7 @@ import { cn } from "../cn";
5
5
  export type ChatJumpRailItem = { id: string; label: string };
6
6
 
7
7
  export type ChatJumpRailProps = {
8
- /** The messages to jump between, such as the user messages of a long thread. */
9
8
  items: ChatJumpRailItem[];
10
- /** Called with the `id` of the pressed item. */
11
9
  onJump: (id: string) => void;
12
10
  className?: string;
13
11
  testID?: string;
@@ -1,4 +1,3 @@
1
- /** Type and copy shared by the AI chat parts. */
2
1
  import { Platform } from "react-native";
3
2
  import type { TextSize } from "../controlStyles";
4
3
 
@@ -19,25 +19,17 @@ export type UIMessage = {
19
19
 
20
20
  export type ChatThreadProps<M extends UIMessage = UIMessage> = {
21
21
  messages: M[];
22
- /** True while a reply is on its way. Marks the last assistant message as streaming and shows `thinking`. */
23
22
  working: boolean;
24
- /** Draws one message. `isStreaming` is true for the last assistant message while `working`. */
25
23
  renderMessage: (message: M, isStreaming: boolean) => ReactNode;
26
- /** A row after the last user message while `working`, such as a `Shimmer` "Thinking". */
27
24
  thinking?: ReactNode;
28
- /** Shown in place of the list when there are no messages. */
29
25
  emptyState?: ReactNode;
30
- /** Last in the column, lifted over the keyboard. A `PromptInput`. */
31
26
  footer: ReactNode;
32
- /** Merged into the `ConversationContent` column classes (`gap-4 px-3 py-3`), such as `px-4 py-4`. */
33
27
  contentContainerClassName?: string;
34
- /** Height of anything above the thread, such as a navigation header, for the keyboard lift. Default 0. */
35
28
  keyboardVerticalOffset?: number;
36
29
  className?: string;
37
30
  testID?: string;
38
31
  };
39
32
 
40
- /** Index of the last message with `role`, or -1. A loop, not `findLastIndex` (Hermes). */
41
33
  function lastIndexOfRole(messages: UIMessage[], role: UIMessage["role"]) {
42
34
  for (let index = messages.length - 1; index >= 0; index -= 1) {
43
35
  if (messages[index]!.role === role) return index;
@@ -71,7 +63,6 @@ export function ChatThread<M extends UIMessage = UIMessage>({
71
63
 
72
64
  return (
73
65
  <KeyboardAvoidingView testID={testID} keyboardVerticalOffset={keyboardVerticalOffset} style={styles.fill}>
74
- {/* The column lifts as a whole: the parts in it add no lift of their own. */}
75
66
  <KeyboardLiftContext.Provider value>
76
67
  <View className={cn("flex-1", className)}>
77
68
  <Conversation>
@@ -14,7 +14,6 @@ import { chatTextSize } from "./chat-text";
14
14
  /** One question, as an agent's AskUserQuestion sends it. */
15
15
  export type ChoiceQuestionItem = {
16
16
  question: string;
17
- /** Short tag shown as a badge beside the question. */
18
17
  header: string;
19
18
  multiSelect: boolean;
20
19
  options: ReadonlyArray<{ label: string; description: string }>;
@@ -22,23 +21,11 @@ export type ChoiceQuestionItem = {
22
21
 
23
22
  export type ChoiceQuestionProps = {
24
23
  questions: ReadonlyArray<ChoiceQuestionItem>;
25
- /**
26
- * Question text to the picked label, or the typed "Other" answer.
27
- * Multi-select joins labels with ", " (the shape AskUserQuestion reads).
28
- */
29
24
  onSubmit: (answers: Record<string, string>) => void | Promise<void>;
30
- /** Shows a spinner on the submit button and blocks input. */
31
25
  loading?: boolean;
32
- /** Default "Other...". */
33
26
  otherLabel?: string;
34
- /** Default "Type your answer...". */
35
27
  otherPlaceholder?: string;
36
- /** Inside the web dock card (`rounded-surface bg-card p-3`, scrolling past 60% of the screen). Default `true`. */
37
28
  framed?: boolean;
38
- /**
39
- * Back, Next and Submit label weight. Default `medium`, the `Button` label
40
- * (web `font-medium`). `semibold` for apps whose web buttons are semibold, as Eva.
41
- */
42
29
  buttonWeight?: "medium" | "semibold";
43
30
  };
44
31
 
@@ -83,7 +70,6 @@ export function ChoiceQuestion({
83
70
  const largerText = useLargerText();
84
71
  const icon = largerText ? 18 : 15;
85
72
  const buttonText = largerText ? "text-xl" : "text-sm";
86
- // A string child draws the `Button` medium label; a semibold one is drawn here, in the variant's label colour.
87
73
  const buttonLabel = (text: string, variant: "primary" | "ghost") =>
88
74
  buttonWeight === "medium" ? (
89
75
  text
@@ -128,7 +114,6 @@ export function ChoiceQuestion({
128
114
  <View className="flex-row items-center justify-between" style={{ gap: 8 }}>
129
115
  <Text
130
116
  className="flex-1 font-instrument-sans-medium"
131
- // Web `text-[15px] leading-snug` (15 / 20.625); larger text steps up to 18.
132
117
  style={[{ fontSize: largerText ? 18 : 15, lineHeight: largerText ? 24 : 15 * 1.375 }, textStyle("foreground", scheme), typeStyle("medium")]}
133
118
  >
134
119
  {question.question}
@@ -175,8 +160,6 @@ export function ChoiceQuestion({
175
160
  placeholder={otherPlaceholder}
176
161
  editable={!loading}
177
162
  autoFocus
178
- // Return is the Next or Submit button. Until there is an
179
- // answer it keeps the keyboard up, as the button does nothing.
180
163
  returnKeyType={isLast ? "send" : "next"}
181
164
  submitBehavior={isLast && hasAnswer ? "blurAndSubmit" : "submit"}
182
165
  onSubmitEditing={next}
@@ -255,10 +238,8 @@ export function TopicBadge({ children }: { children: string }) {
255
238
  );
256
239
  }
257
240
 
258
- /** The option card's `py-2 px-2.5`, which is also the slop of its press target. */
259
241
  const CARD_PADDING = { top: 8, bottom: 8, left: 10, right: 10 };
260
242
 
261
- /** A whole card is at least a 44 target: the press target inside is this much less its slop. */
262
243
  const CARD_MIN_HEIGHT = 44;
263
244
 
264
245
  /** The card while pressed: the kit 3% press scale, or a dim with Reduce Motion. */
@@ -267,11 +248,6 @@ export function choicePressStyle(pressed: boolean, reduceMotion: boolean) {
267
248
  return reduceMotion ? { opacity: 0.8 } : { transform: [{ scale: 0.97 }] };
268
249
  }
269
250
 
270
- /**
271
- * One option row (web `Card` with `bg-secondary`, `py-2 px-2.5`, radius 16): a round 24 mark
272
- * (30 with larger text; letter, or a pencil for "Other"; a check on the primary fill when picked),
273
- * the label and the description. Picked: a 1-wide primary ring outside, on the accent.
274
- */
275
251
  function ChoiceRow({
276
252
  selected,
277
253
  disabled,
@@ -284,7 +260,6 @@ function ChoiceRow({
284
260
  }: {
285
261
  selected: boolean;
286
262
  disabled: boolean;
287
- /** A multi-select question: each row is a `checkbox`, not a `radio`. */
288
263
  multiple: boolean;
289
264
  mark: string;
290
265
  label: string;
@@ -295,24 +270,18 @@ function ChoiceRow({
295
270
  const scheme = useScheme();
296
271
  const largerText = useLargerText();
297
272
  const reduceMotion = useReduceMotion();
298
- // The scale moves the whole card, which is not the Pressable (the "Other" field sits in it too).
299
273
  const [pressed, setPressed] = useState(false);
300
274
  const muted = tokens.color.muted[scheme];
301
275
  const markSize = largerText ? 30 : 24;
302
276
  const markText = largerText ? 14 : 11;
303
277
  const glyph = largerText ? 16 : 13;
304
278
  const small = chatTextSize("small", largerText);
305
- // Web: an option label is `text-sm leading-snug font-medium`; "Other..." is
306
- // plain `text-sm`, medium only once picked.
307
279
  const plain = mark === "other" && !selected;
308
- // The web label is an inline `leading-snug` span in a 16 / 24 block, so each
309
- // line box is the block's 24, not 19.25: rows are 24 a line, as on the web.
310
280
  const labelLine = largerText ? sizeStyle(small, "snug") : { ...sizeStyle(small, "snug"), lineHeight: 24 };
311
281
  return (
312
282
  <View
313
283
  style={[
314
284
  {
315
- // Web `Card` (rounded-surface, 16) with `py-2 px-2.5` and no border width.
316
285
  borderRadius: tokens.radius.lg,
317
286
  backgroundColor: selected ? tokens.color.background[scheme] : palette.default[scheme],
318
287
  opacity: disabled ? 0.5 : 1,
@@ -323,7 +292,6 @@ function ChoiceRow({
323
292
  ]}
324
293
  >
325
294
  {selected ? (
326
- // Web `ring-1 ring-primary`: a 1 line just outside the card, so picking a row moves nothing.
327
295
  <View
328
296
  pointerEvents="none"
329
297
  style={{
@@ -344,7 +312,6 @@ function ChoiceRow({
344
312
  accessibilityHint={description || undefined}
345
313
  accessibilityState={{ checked: selected, disabled }}
346
314
  disabled={disabled}
347
- // The card's own padding: a tap anywhere on the card picks it, and stops at its edge.
348
315
  hitSlop={CARD_PADDING}
349
316
  onPress={onPress}
350
317
  onPressIn={() => setPressed(true)}
@@ -360,7 +327,6 @@ function ChoiceRow({
360
327
  style={{
361
328
  width: markSize,
362
329
  height: markSize,
363
- // Web `rounded-md` (radius - 2 = 14 at the default 1rem) on a 24 box: round.
364
330
  borderRadius: markSize / 2,
365
331
  marginTop: description ? 2 : 0,
366
332
  alignItems: "center",
@@ -373,7 +339,6 @@ function ChoiceRow({
373
339
  ) : mark === "other" ? (
374
340
  <IconPencil size={glyph} color={muted} />
375
341
  ) : (
376
- // Web `text-2xs font-medium tracking-wide`, at semibold: native-ui draws no bold face.
377
342
  <Text
378
343
  className="font-instrument-sans-medium"
379
344
  style={[
@@ -400,7 +365,6 @@ function ChoiceRow({
400
365
  </Text>
401
366
  )}
402
367
  {description ? (
403
- // Web `text-xs mt-0.5 leading-relaxed` (12 / 19.5).
404
368
  <Text
405
369
  className="font-instrument-sans"
406
370
  style={[sizeStyle(chatTextSize("caption", largerText), "relaxed"), { color: muted, marginTop: 2 }]}
@@ -32,20 +32,10 @@ export const CODE_BLOCK_METRICS = {
32
32
 
33
33
  export type CodeBlockCopyButtonProps = {
34
34
  code: string;
35
- /**
36
- * Puts `code` on the clipboard. React Native's own `Clipboard` is
37
- * deprecated, and native-ui adds no clipboard package, so the app passes its
38
- * own (for example `expo-clipboard`'s `setStringAsync`). A rejected promise
39
- * leaves the copy icon.
40
- */
41
35
  onCopy: (code: string) => void | Promise<void>;
42
- /** Milliseconds the check shows after a copy. Default 2000, as on the web. */
43
36
  timeout?: number;
44
- /** Default "Copy code"; "Copied" while the check shows. */
45
37
  label?: string;
46
- /** Default `sm` (the web `CodeBlock` copy button); the markdown code block uses `xs`. */
47
38
  size?: ChatIconButtonSize;
48
- /** Default `"square"`. See `ChatIconButton`. */
49
39
  slop?: ChatIconButtonProps["slop"];
50
40
  };
51
41
 
@@ -57,7 +47,6 @@ export function CodeBlockCopyButton({ code, onCopy, timeout = 2000, label = "Cop
57
47
  useEffect(() => () => clearTimeout(timer.current), []);
58
48
 
59
49
  const copy = async () => {
60
- // As the web: presses while the check shows do nothing.
61
50
  if (copied) return;
62
51
  try {
63
52
  await onCopy(code);
@@ -81,39 +70,13 @@ export function CodeBlockCopyButton({ code, onCopy, timeout = 2000, label = "Cop
81
70
 
82
71
  export type CodeBlockProps = {
83
72
  code: string;
84
- /**
85
- * Shown in the header, and the Prism language for highlighting (`tsx`,
86
- * `python`, `json`…). An unknown language draws plain text.
87
- */
88
73
  language?: string;
89
- /**
90
- * Colour the code in the GitHub light and dark colours, as the web shiki
91
- * block. Default `true`. Needs the optional peer `prism-react-renderer` and a
92
- * `language`; without either the code is plain.
93
- */
94
74
  highlight?: boolean;
95
- /** With it, the header has a copy button. See `CodeBlockCopyButton`. */
96
75
  onCopy?: (code: string) => void | Promise<void>;
97
- /** Default `default`, the web `CodeBlock`. `markdown` is the web `MarkdownCodeBlock` (see `CodeBlock`). */
98
76
  variant?: "default" | "markdown";
99
77
  className?: string;
100
78
  };
101
79
 
102
- /**
103
- * Code on the flat panel at radius 16, selectable, long lines scrolling
104
- * sideways. With `prism-react-renderer` installed and a `language`, tokens
105
- * take the GitHub colours of the scheme.
106
- *
107
- * `default` is the web `CodeBlock` (`ai-elements/code-block.tsx`): `text-sm`
108
- * code in `p-4`, and a `px-3` header with the language and a copy button when
109
- * either is given. `markdown` is the web `MarkdownCodeBlock`, which `Markdown`
110
- * draws for fenced code: 13 / 20.15 code, a 32 header with `icon-xs` actions,
111
- * a wrap toggle ("Wrap long lines", foreground while on) and then copy.
112
- */
113
- /**
114
- * Android fades the code at a side with more to scroll (there is no scroll
115
- * bar), so a cut line reads as "scroll sideways". iOS ignores it.
116
- */
117
80
  const CODE_FADING_EDGE = 24;
118
81
 
119
82
  export function CodeBlock({ code, language, highlight = true, onCopy, variant = "default", className }: CodeBlockProps) {
@@ -142,7 +105,6 @@ export function CodeBlock({ code, language, highlight = true, onCopy, variant =
142
105
  );
143
106
  }
144
107
 
145
- /** The web `MarkdownCodeBlock`: `CodeBlock` with `variant="markdown"`. A component of its own for the wrap state. */
146
108
  function MarkdownCodeBlock({
147
109
  code,
148
110
  language,
@@ -164,8 +126,6 @@ function MarkdownCodeBlock({
164
126
  style={largerText ? { paddingLeft: headerBox.paddingLeft, paddingRight: headerBox.paddingRight } : headerBox}
165
127
  >
166
128
  {parts.label}
167
- {/* Web `.markdown-code-actions`: `gap-0.5`. The two sit 2 apart, so
168
- each slops only above and below and on its outer side. */}
169
129
  <View className="flex-row items-center gap-0.5">
170
130
  <ChatIconButton
171
131
  icon={IconTextWrap}
@@ -196,7 +156,6 @@ function MarkdownCodeBlock({
196
156
  );
197
157
  }
198
158
 
199
- /** The panel style, the language label and the code text both code blocks draw. */
200
159
  function useCodeParts(code: string, language: string | undefined, highlight: boolean, markdown: boolean) {
201
160
  const scheme = useScheme();
202
161
  const largerText = useLargerText();
@@ -226,10 +185,6 @@ function useCodeParts(code: string, language: string | undefined, highlight: boo
226
185
  };
227
186
  }
228
187
 
229
- /**
230
- * Coloured runs as nested `Text` spans, lines joined by newlines. They
231
- * inherit the size and font of the code `Text` around them.
232
- */
233
188
  function CodeRuns({ lines, scheme }: { lines: CodeToken[][]; scheme: "light" | "dark" }) {
234
189
  return (
235
190
  <>
@@ -247,12 +202,6 @@ function CodeRuns({ lines, scheme }: { lines: CodeToken[][]; scheme: "light" | "
247
202
  );
248
203
  }
249
204
 
250
- /**
251
- * The code in the web's Shiki colours: shell blocks through `shellTokens`
252
- * (no peer needed), other languages through Prism, the JavaScript family
253
- * recoloured where Prism and Shiki disagree (`scriptTokens`). Without
254
- * `prism-react-renderer` a non-shell block is the plain code.
255
- */
256
205
  function HighlightedCode({ code, language, scheme }: { code: string; language: string; scheme: "light" | "dark" }) {
257
206
  const lang = language.toLowerCase();
258
207
  const source = code.replace(/\n$/, "");
@@ -269,7 +218,6 @@ function HighlightedCode({ code, language, scheme }: { code: string; language: s
269
218
  {tokens.map((line, lineIndex) => (
270
219
  <Fragment key={lineIndex}>
271
220
  {lineIndex > 0 ? "\n" : null}
272
- {/* An empty line is one `empty` token whose content is "\n": the join above already breaks it. */}
273
221
  {line.map((token, tokenIndex) =>
274
222
  token.empty ? null : (
275
223
  <Text key={tokenIndex} style={{ color: codeTokenColor(token.types, scheme) }}>
@@ -7,17 +7,6 @@ import { MIN_TOUCH_TARGET, touchSlop } from "../controlStyles";
7
7
  import { useControllableState } from "../primitives/use-controllable-state";
8
8
  import { useReduceMotion } from "../useReduceMotion";
9
9
 
10
- // A small fold for the AI parts: native-ui has no `Collapsible`. A `Pressable`
11
- // trigger and content that mounts only while open. The content appears at
12
- // once: a fade would also run each time a list mounts an open fold (a chat
13
- // opening, a virtualised row scrolled back). The chevron turns in 150 ms; with
14
- // Reduce Motion it changes in place.
15
-
16
- /**
17
- * The web chevron: `transition-transform duration-150`. The curve is the
18
- * predefined `ease-out`: a `cubicBezier(...)` value in an `Animated.View`
19
- * style does not typecheck against `react-native-reanimated` 4.3.
20
- */
21
10
  const CHEVRON_TURN = {
22
11
  transitionProperty: "transform",
23
12
  transitionDuration: 150,
@@ -56,7 +45,6 @@ export function Collapsible({ open, defaultOpen = false, onOpenChange, ...props
56
45
  );
57
46
  }
58
47
 
59
- /** A `text-sm` line with the web `py-1`: 28 high. The slop brings it to 44. */
60
48
  const TRIGGER_ROW_HEIGHT = 28;
61
49
 
62
50
  export type CollapsibleTriggerProps = Omit<PressableProps, "children"> & {
@@ -1,9 +1,6 @@
1
1
  import { createContext, useContext, type RefObject } from "react";
2
2
  import type { NativeScrollEvent } from "react-native";
3
3
 
4
- // The `Conversation` context on its own, so a message can reach it without the
5
- // thread's components (`message.tsx` sets `overlay`).
6
-
7
4
  /**
8
5
  * What the thread scrolls with: the `ScrollView` of `ConversationContent` or
9
6
  * the `FlatList` of `ConversationList`. `scrollToEnd` goes to the newest
@@ -22,22 +19,11 @@ export type ConversationContextValue = {
22
19
  isAtBottom: boolean;
23
20
  scrollToBottom: () => void;
24
21
  scrollRef: RefObject<ConversationScroller | null>;
25
- /** `bottomInset` and `inverted`, as `isScrolledToBottom`. */
26
22
  onScroll: (event: NativeScrollEvent, bottomInset?: number, inverted?: boolean) => void;
27
23
  onUserScroll: () => void;
28
24
  followContent: () => void;
29
- /** The height of the `ConversationDock` under the thread, 0 without one. */
30
25
  dockHeight: number;
31
26
  setDockHeight: (height: number) => void;
32
- /**
33
- * A message's hold menu over the thread. Its window takes the focus on
34
- * Android, as it opens and again as it closes, and the keyboard handler of
35
- * `ConversationList` would scroll the thread to its end each time. The list
36
- * ignores the keyboard from `openOverlay` until the close has settled:
37
- * `closeOverlay` marks it `closing`, and `settleOverlay` ends that on the
38
- * close's last keyboard event (Android), the menu's dismiss (iOS) or the
39
- * reader's next drag. Android gives no dismiss callback for a `Modal`.
40
- */
41
27
  overlay: "none" | "open" | "closing";
42
28
  openOverlay: () => void;
43
29
  closeOverlay: () => void;