@gemies/sdk 9.1.0 → 10.0.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 (92) hide show
  1. package/CHANGELOG.md +103 -0
  2. package/README.md +9 -6
  3. package/package.json +4 -11
  4. package/src/accounts.ts +7 -1
  5. package/src/ask-eager.ts +0 -2
  6. package/src/ask-text.ts +0 -1
  7. package/src/ask.ts +0 -1
  8. package/src/components/AmbientField.tsx +13 -2
  9. package/src/components/ComposerDropZone.tsx +20 -4
  10. package/src/components/ComposerSuggestions.tsx +9 -2
  11. package/src/components/GemieActivityLine.tsx +11 -5
  12. package/src/components/GemieBetweenGemies.tsx +23 -10
  13. package/src/components/GemieChatContent.tsx +65 -23
  14. package/src/components/GemieChatScreen.tsx +7 -4
  15. package/src/components/GemieChatSheet.tsx +6 -2
  16. package/src/components/GemieComposer.tsx +17 -7
  17. package/src/components/GemieGroupWelcome.tsx +16 -2
  18. package/src/components/GemieRecentConversations.tsx +13 -10
  19. package/src/components/GemieSharedConversation.tsx +38 -6
  20. package/src/components/GemieWelcomeMessage.tsx +23 -7
  21. package/src/components/IdentityMark.tsx +6 -12
  22. package/src/components/PlanPreviewCard.tsx +18 -7
  23. package/src/components/QuestionCard.tsx +6 -2
  24. package/src/components/ReplyMarkdown.tsx +32 -6
  25. package/src/components/RichBlocks.tsx +20 -15
  26. package/src/components/accounts/GemieAccountGrants.tsx +27 -10
  27. package/src/components/accounts/GemieConnectedAccounts.tsx +87 -51
  28. package/src/components/canvas/CanvasComponent.tsx +6 -2
  29. package/src/components/canvas/DashboardRenderer.tsx +25 -8
  30. package/src/components/canvas/DeckRenderer.tsx +23 -6
  31. package/src/components/canvas/FormRenderer.tsx +8 -3
  32. package/src/components/connectors/ConnectorLogo.tsx +15 -9
  33. package/src/components/connectors/GemieConnectedConnectors.tsx +51 -25
  34. package/src/components/connectors/GemieConnectorsStore.tsx +99 -41
  35. package/src/components/connectors/GrantSwitchRow.tsx +18 -5
  36. package/src/components/thought/ThoughtPanel.tsx +26 -12
  37. package/src/components/thought/ToolStep.tsx +14 -6
  38. package/src/components/thread/AgentResultCard.tsx +10 -4
  39. package/src/components/thread/AgentTaskCard.tsx +8 -3
  40. package/src/components/thread/ApprovalCard.tsx +118 -0
  41. package/src/components/thread/ChatBubble.tsx +66 -25
  42. package/src/components/thread/GemieThread.tsx +36 -8
  43. package/src/components/thread/ThreadRow.tsx +20 -15
  44. package/src/components/thread/ThreadSearch.tsx +27 -10
  45. package/src/components/thread/ThreadSkeleton.tsx +12 -6
  46. package/src/components/thread/ToolResultCard.tsx +10 -4
  47. package/src/components/thread/TurnAttachments.tsx +17 -8
  48. package/src/components/voice/VoiceControls.tsx +9 -6
  49. package/src/connectors.ts +15 -2
  50. package/src/hooks/useChatVoice.ts +2 -10
  51. package/src/hooks/useMessageReactions.ts +5 -5
  52. package/src/hooks/useThoughtScope.ts +9 -8
  53. package/src/index.ts +2 -3
  54. package/src/lib/copy-en.ts +7 -0
  55. package/src/lib/copy-es.ts +7 -0
  56. package/src/lib/tool-call-status.ts +1 -1
  57. package/src/lib/utils.ts +1 -8
  58. package/src/realtime/react.tsx +9 -9
  59. package/src/realtime/reread.ts +28 -0
  60. package/src/realtime/store.ts +123 -0
  61. package/src/runtime/agents.ts +46 -27
  62. package/src/runtime/approvals.ts +99 -0
  63. package/src/runtime/collections.ts +35 -136
  64. package/src/runtime/config.tsx +10 -0
  65. package/src/runtime/connected-accounts.ts +175 -88
  66. package/src/runtime/connectors.ts +244 -127
  67. package/src/runtime/conversations.ts +181 -607
  68. package/src/runtime/data/answer.ts +76 -0
  69. package/src/runtime/data/collections.ts +168 -0
  70. package/src/runtime/data/conversations.ts +626 -0
  71. package/src/runtime/data/reactions.ts +29 -0
  72. package/src/runtime/data/read.ts +37 -0
  73. package/src/runtime/data/threads.ts +149 -0
  74. package/src/runtime/index.ts +74 -8
  75. package/src/runtime/model.ts +0 -2
  76. package/src/runtime/routes.ts +2 -2
  77. package/src/runtime/sharing.ts +69 -56
  78. package/src/runtime/types.ts +8 -16
  79. package/src/runtime/use-bound-action.ts +27 -0
  80. package/src/runtime/use-conversation-stream.ts +47 -31
  81. package/src/runtime/use-conversation-thread.ts +44 -51
  82. package/src/runtime/use-gemie-thread.ts +32 -43
  83. package/src/runtime/use-start-conversation.ts +14 -15
  84. package/src/runtime/use-thread-history.ts +26 -36
  85. package/src/runtime/use-thread-search.ts +29 -76
  86. package/src/text.ts +0 -1
  87. package/src/voice.ts +0 -1
  88. package/src/components/Image.tsx +0 -12
  89. package/src/realtime/cache.ts +0 -257
  90. package/src/runtime/conversation-dates.ts +0 -31
  91. package/src/runtime/query-keys.ts +0 -66
  92. package/src/runtime/reaction-cache.ts +0 -45
@@ -45,6 +45,7 @@ import {
45
45
  useWebSignInReturn,
46
46
  } from '../../runtime/connectors';
47
47
  import { ConnectorLogo } from './ConnectorLogo';
48
+ import { createTokenStyles } from '@oxy.so/bloom/theme';
48
49
 
49
50
  /** This component's own strings. */
50
51
  const K = 'gemie.connectors';
@@ -98,6 +99,7 @@ export function GemieConnectorsStore({
98
99
  t = englishCopy,
99
100
  onConnected,
100
101
  }: GemieConnectorsStoreProps) {
102
+ const styles = useStyles();
101
103
  const [query, setQuery] = useState('');
102
104
  const [category, setCategory] = useState<ConnectorCategory | null>(null);
103
105
  const [filters, setFilters] = useState<ReadonlySet<StoreFilter>>(new Set());
@@ -126,18 +128,15 @@ export function GemieConnectorsStore({
126
128
 
127
129
  const accountsOf = useMemo(() => {
128
130
  const counts = new Map<string, number>();
129
- for (const connection of connections.data ?? []) {
131
+ for (const connection of connections.value ?? []) {
130
132
  if (connection.registryId) {
131
133
  counts.set(connection.registryId, (counts.get(connection.registryId) ?? 0) + 1);
132
134
  }
133
135
  }
134
136
  return counts;
135
- }, [connections.data]);
137
+ }, [connections.value]);
136
138
 
137
- const pages = store.data?.pages ?? [];
138
- const entries = pages.flatMap((page) => page.servers);
139
- const total = pages[0]?.total ?? 0;
140
- const categories = pages[0]?.categories ?? [];
139
+ const { entries, total, categories } = store;
141
140
  const browsing = !q && category === null && filters.size === 0 && sort === 'featured';
142
141
  const featured = browsing ? entries.filter((entry) => entry.featured) : [];
143
142
  const rest = browsing ? entries.filter((entry) => !entry.featured) : entries;
@@ -153,7 +152,7 @@ export function GemieConnectorsStore({
153
152
  const connect = async (entry: ConnectorEntry) => {
154
153
  setPending(entry.id);
155
154
  try {
156
- const connection = await actions.connect.mutateAsync(entry.id);
155
+ const connection = await actions.connect.run(entry.id);
157
156
  if (connection) {
158
157
  toast.success(t(`${K}.signIn.connected`, { name: entry.name }));
159
158
  onConnected?.();
@@ -177,7 +176,7 @@ export function GemieConnectorsStore({
177
176
  );
178
177
 
179
178
  return (
180
- <View className="gap-4">
179
+ <View style={styles.store}>
181
180
  <Search
182
181
  label={t(`${K}.store.search`)}
183
182
  value={query}
@@ -207,7 +206,7 @@ export function GemieConnectorsStore({
207
206
  ))}
208
207
  </ChipRow>
209
208
  ) : null}
210
- <View className="flex-row flex-wrap items-center justify-between gap-3">
209
+ <View style={styles.filters}>
211
210
  <ChipRow role="group" accessibilityLabel={t(`${K}.store.filters`)}>
212
211
  {FILTERS.map((filter) => (
213
212
  <Chip
@@ -224,14 +223,19 @@ export function GemieConnectorsStore({
224
223
  <SortSelect value={sort} onChange={setSort} t={t} />
225
224
  </View>
226
225
 
227
- {store.isPending ? (
226
+ {store.isLoading ? (
228
227
  <StoreSkeleton />
229
228
  ) : store.isError && entries.length === 0 ? (
230
- <View className="items-start gap-2 py-4">
231
- <Text variant="body-2-regular" className="text-text-secondary">
229
+ <View style={styles.failure}>
230
+ <Text variant="body-2-regular" style={styles.muted}>
232
231
  {t(`${K}.store.loadFailed`)}
233
232
  </Text>
234
- <Button size="sm" appearance="outline" tone="neutral" onPress={() => store.refetch()}>
233
+ <Button
234
+ size="sm"
235
+ appearance="outline"
236
+ tone="neutral"
237
+ onPress={() => void store.refresh()}
238
+ >
235
239
  {t(`${K}.store.retry`)}
236
240
  </Button>
237
241
  </View>
@@ -252,18 +256,18 @@ export function GemieConnectorsStore({
252
256
  </StoreGroup>
253
257
  ) : null}
254
258
  {entries.length === 0 ? (
255
- <Text variant="body-2-regular" className="py-4 text-text-secondary">
259
+ <Text variant="body-2-regular" style={styles.emptyText}>
256
260
  {q ? t(`${K}.store.noResults`, { query: q }) : t(`${K}.store.empty`)}
257
261
  </Text>
258
262
  ) : null}
259
- {store.hasNextPage ? (
260
- <View className="items-center">
263
+ {store.hasMore ? (
264
+ <View style={styles.more}>
261
265
  <Button
262
266
  size="sm"
263
267
  appearance="outline"
264
268
  tone="neutral"
265
- loading={store.isFetchingNextPage}
266
- onPress={() => void store.fetchNextPage()}
269
+ loading={store.isLoadingMore}
270
+ onPress={() => void store.more()}
267
271
  >
268
272
  {t(`${K}.store.more`, { count: total - entries.length })}
269
273
  </Button>
@@ -275,14 +279,14 @@ export function GemieConnectorsStore({
275
279
  <Pressable
276
280
  accessibilityRole="button"
277
281
  onPress={() => setCustomOpen(true)}
278
- className="flex-row items-center gap-3 rounded-2xl border border-dashed border-border p-4"
282
+ style={styles.customTile}
279
283
  >
280
- <View className="h-10 w-10 items-center justify-center rounded-xl bg-background-tertiary-default">
284
+ <View style={styles.customIcon}>
281
285
  <RiAddLine width={20} height={20} />
282
286
  </View>
283
- <View className="flex-1 gap-0.5">
287
+ <View style={styles.customText}>
284
288
  <Text variant="body-2-semibold">{t(`${K}.custom.title`)}</Text>
285
- <Text variant="body-2-regular" className="text-text-secondary">
289
+ <Text variant="body-2-regular" style={styles.muted}>
286
290
  {t(`${K}.custom.description`)}
287
291
  </Text>
288
292
  </View>
@@ -292,7 +296,7 @@ export function GemieConnectorsStore({
292
296
  open={customOpen}
293
297
  onClose={() => setCustomOpen(false)}
294
298
  onAdd={async (input) => {
295
- await actions.addCustom.mutateAsync(input);
299
+ await actions.addCustom.run(input);
296
300
  toast.success(t(`${K}.signIn.connected`, { name: input.name }));
297
301
  onConnected?.();
298
302
  }}
@@ -338,10 +342,11 @@ function SortSelect({
338
342
  }
339
343
 
340
344
  function StoreGroup({ title, children }: { title?: string; children: React.ReactNode }) {
345
+ const styles = useStyles();
341
346
  return (
342
- <View className="gap-2">
347
+ <View style={styles.section}>
343
348
  {title ? <Text variant="headline-semibold">{title}</Text> : null}
344
- <View className="flex-row flex-wrap gap-3">{children}</View>
349
+ <View style={styles.grid}>{children}</View>
345
350
  </View>
346
351
  );
347
352
  }
@@ -359,15 +364,16 @@ function StoreCard({
359
364
  onConnect: (entry: ConnectorEntry) => void;
360
365
  t: Translate;
361
366
  }) {
367
+ const styles = useStyles();
362
368
  return (
363
- <View className="min-w-[260px] flex-1 basis-[260px] gap-3 rounded-2xl border border-border p-4">
364
- <View className="flex-row items-center gap-3">
369
+ <View style={styles.entry}>
370
+ <View style={styles.entryHeader}>
365
371
  <ConnectorLogo name={entry.name} logoUrl={entry.logoUrl} size={40} />
366
- <View className="flex-1 gap-1">
372
+ <View style={styles.entryText}>
367
373
  <Text variant="body-2-semibold" numberOfLines={1}>
368
374
  {entry.name}
369
375
  </Text>
370
- <View className="flex-row flex-wrap items-center gap-1.5">
376
+ <View style={styles.badges}>
371
377
  <Badge
372
378
  size="label-small"
373
379
  variant="subtle"
@@ -384,7 +390,7 @@ function StoreCard({
384
390
  content={t(`${K}.store.filter.noSignIn`)}
385
391
  />
386
392
  ) : null}
387
- <Text variant="body-2-regular" className="text-text-secondary" numberOfLines={1}>
393
+ <Text variant="body-2-regular" style={styles.muted} numberOfLines={1}>
388
394
  {accounts > 0
389
395
  ? t(`${K}.store.connectedCount`, { count: accounts })
390
396
  : t(`${K}.category.${entry.category}`)}
@@ -392,10 +398,10 @@ function StoreCard({
392
398
  </View>
393
399
  </View>
394
400
  </View>
395
- <Text variant="body-2-regular" className="text-text-secondary" numberOfLines={2}>
401
+ <Text variant="body-2-regular" style={styles.muted} numberOfLines={2}>
396
402
  {entry.description}
397
403
  </Text>
398
- <View className="flex-row items-center gap-2">
404
+ <View style={styles.entryActions}>
399
405
  <Button
400
406
  size="sm"
401
407
  appearance={accounts > 0 ? 'outline' : 'solid'}
@@ -431,6 +437,7 @@ function CustomServerDialog({
431
437
  onAdd: (input: { name: string; url: string; headers?: Record<string, string> }) => Promise<void>;
432
438
  t: Translate;
433
439
  }) {
440
+ const styles = useStyles();
434
441
  const [name, setName] = useState('');
435
442
  const [url, setUrl] = useState('');
436
443
  const [headerName, setHeaderName] = useState('');
@@ -483,7 +490,7 @@ function CustomServerDialog({
483
490
  },
484
491
  ]}
485
492
  >
486
- <View className="gap-3">
493
+ <View style={styles.form}>
487
494
  <View>
488
495
  <TextFieldLabel>{t(`${K}.custom.name`)}</TextFieldLabel>
489
496
  <TextFieldInput
@@ -514,7 +521,7 @@ function CustomServerDialog({
514
521
  <AccordionItem value="advanced">
515
522
  <AccordionTrigger>{t(`${K}.custom.advanced`)}</AccordionTrigger>
516
523
  <AccordionContent>
517
- <View className="gap-3">
524
+ <View style={styles.form}>
518
525
  <View>
519
526
  <TextFieldLabel>{t(`${K}.custom.headerName`)}</TextFieldLabel>
520
527
  <TextFieldInput
@@ -549,17 +556,15 @@ function CustomServerDialog({
549
556
 
550
557
  /** The store's shape while the catalogue is read: cards, never a spinner. */
551
558
  function StoreSkeleton() {
559
+ const styles = useStyles();
552
560
  return (
553
561
  <Skeleton.Region>
554
- <View className="flex-row flex-wrap gap-3">
562
+ <View style={styles.grid}>
555
563
  {[0, 1, 2, 3].map((index) => (
556
- <View
557
- key={index}
558
- className="min-w-[260px] flex-1 basis-[260px] gap-3 rounded-2xl border border-border p-4"
559
- >
560
- <View className="flex-row items-center gap-3">
564
+ <View key={index} style={styles.entry}>
565
+ <View style={styles.entryHeader}>
561
566
  <Skeleton.Box width={40} height={40} borderRadius={9} />
562
- <View className="flex-1 gap-1.5">
567
+ <View style={styles.loadingText}>
563
568
  <Skeleton.Box width={120} height={14} />
564
569
  <Skeleton.Box width={80} height={12} />
565
570
  </View>
@@ -572,3 +577,56 @@ function StoreSkeleton() {
572
577
  </Skeleton.Region>
573
578
  );
574
579
  }
580
+
581
+ const useStyles = createTokenStyles((t) => ({
582
+ store: { gap: 16 },
583
+ filters: {
584
+ flexDirection: 'row',
585
+ flexWrap: 'wrap',
586
+ alignItems: 'center',
587
+ justifyContent: 'space-between',
588
+ gap: 12,
589
+ },
590
+ failure: { alignItems: 'flex-start', gap: 8, paddingVertical: 16 },
591
+ muted: { color: t.mutedForeground },
592
+ emptyText: { paddingVertical: 16, color: t.mutedForeground },
593
+ more: { alignItems: 'center' },
594
+ customTile: {
595
+ flexDirection: 'row',
596
+ alignItems: 'center',
597
+ gap: 12,
598
+ borderRadius: 16,
599
+ borderStyle: 'dashed',
600
+ borderWidth: 1,
601
+ borderColor: t.border,
602
+ padding: 16,
603
+ },
604
+ customIcon: {
605
+ height: 40,
606
+ width: 40,
607
+ alignItems: 'center',
608
+ justifyContent: 'center',
609
+ borderRadius: 12,
610
+ backgroundColor: t.popover,
611
+ },
612
+ customText: { flexGrow: 1, flexShrink: 1, flexBasis: '0%', gap: 2 },
613
+ section: { gap: 8 },
614
+ grid: { flexDirection: 'row', flexWrap: 'wrap', gap: 12 },
615
+ entry: {
616
+ minWidth: 260,
617
+ flexGrow: 1,
618
+ flexShrink: 1,
619
+ flexBasis: 260,
620
+ gap: 12,
621
+ borderRadius: 16,
622
+ borderWidth: 1,
623
+ borderColor: t.border,
624
+ padding: 16,
625
+ },
626
+ entryHeader: { flexDirection: 'row', alignItems: 'center', gap: 12 },
627
+ entryText: { flexGrow: 1, flexShrink: 1, flexBasis: '0%', gap: 4 },
628
+ badges: { flexDirection: 'row', flexWrap: 'wrap', alignItems: 'center', gap: 6 },
629
+ entryActions: { flexDirection: 'row', alignItems: 'center', gap: 8 },
630
+ form: { gap: 12 },
631
+ loadingText: { flexGrow: 1, flexShrink: 1, flexBasis: '0%', gap: 6 },
632
+ }));
@@ -2,6 +2,7 @@ import { Switch } from '@oxy.so/bloom/switch';
2
2
  import { Text } from '@oxy.so/bloom/typography';
3
3
  import type { ReactNode } from 'react';
4
4
  import { View } from 'react-native';
5
+ import { createTokenStyles } from '@oxy.so/bloom/theme';
5
6
 
6
7
  export interface GrantSwitchRowProps {
7
8
  /** What the row grants, drawn before its name: a connector's logo, a platform's mark. */
@@ -31,17 +32,16 @@ export function GrantSwitchRow({
31
32
  onCheckedChange,
32
33
  first,
33
34
  }: GrantSwitchRowProps) {
35
+ const styles = useStyles();
34
36
  return (
35
- <View
36
- className={`flex-row items-center gap-2.5 py-2.5 pe-2.5 ${first ? '' : 'border-t border-border'}`}
37
- >
37
+ <View style={[styles.row, !first && styles.divider]}>
38
38
  {leading}
39
- <View className="flex-1 gap-0.5">
39
+ <View style={styles.text}>
40
40
  <Text variant="body-2-regular" numberOfLines={1}>
41
41
  {label}
42
42
  </Text>
43
43
  {detail ? (
44
- <Text variant="body-2-regular" className="text-text-secondary" numberOfLines={1}>
44
+ <Text variant="body-2-regular" style={styles.detail} numberOfLines={1}>
45
45
  {detail}
46
46
  </Text>
47
47
  ) : null}
@@ -55,3 +55,16 @@ export function GrantSwitchRow({
55
55
  </View>
56
56
  );
57
57
  }
58
+
59
+ const useStyles = createTokenStyles((t) => ({
60
+ text: { flexGrow: 1, flexShrink: 1, flexBasis: '0%', gap: 2 },
61
+ detail: { color: t.mutedForeground },
62
+ row: {
63
+ flexDirection: 'row',
64
+ alignItems: 'center',
65
+ gap: 10,
66
+ paddingVertical: 10,
67
+ paddingInlineEnd: 10,
68
+ },
69
+ divider: { borderTopWidth: 1, borderColor: t.border },
70
+ }));
@@ -44,7 +44,7 @@ import { useTheme } from '@oxy.so/bloom/theme';
44
44
  import { Muted, Text } from '@oxy.so/bloom/typography';
45
45
  import * as WebBrowser from 'expo-web-browser';
46
46
  import { useCallback, useMemo, useState } from 'react';
47
- import { Platform, ScrollView, View } from 'react-native';
47
+ import { Platform, ScrollView, View, StyleSheet } from 'react-native';
48
48
 
49
49
  /** One array for "nothing selected", so the memos below hold across renders. */
50
50
  const NO_MESSAGES: Message[] = [];
@@ -100,7 +100,7 @@ function PhaseRow({ step, isActive }: { step: PhaseStep; isActive: boolean }) {
100
100
  const label = t(STEP_LABEL_KEYS[step.type]);
101
101
  const ending = step.type === 'done' || step.type === 'failed';
102
102
  return (
103
- <View className="flex-row items-center gap-1.5 py-1" accessible accessibilityLabel={label}>
103
+ <View style={styles.step} accessible accessibilityLabel={label}>
104
104
  <PhaseIcon type={step.type} />
105
105
  <Text variant={ending ? 'body-medium' : 'body-regular'}>
106
106
  {isActive ? <AgentLogShimmerText>{label}</AgentLogShimmerText> : label}
@@ -209,8 +209,8 @@ function ActivityTab({ entries }: { entries: AuditEntry[] }) {
209
209
  last={index === entries.length - 1}
210
210
  reduce={reduce}
211
211
  >
212
- <View className="py-1">
213
- <View className="flex-row items-center gap-1.5">
212
+ <View style={styles.entry}>
213
+ <View style={styles.entryHeader}>
214
214
  {entry.status === 'interrupted' ? (
215
215
  <RiForbidLine size="xs" fill={colors.textSecondary} />
216
216
  ) : null}
@@ -242,11 +242,11 @@ function SelectionState({ status }: { status: 'loading' | 'failed' | 'gone' }) {
242
242
  if (status === 'loading') {
243
243
  // The steps are on their way: rows shaped like them, not a word about waiting.
244
244
  return (
245
- <Skeleton.Region className="gap-4 p-3" testID="thought-loading">
245
+ <Skeleton.Region style={styles.loading} testID="thought-loading">
246
246
  {[0, 1, 2].map((row) => (
247
- <View key={row} className="flex-row items-center gap-3">
247
+ <View key={row} style={styles.loadingRow}>
248
248
  <Skeleton.Circle size={20} />
249
- <View className="flex-1 gap-1.5">
249
+ <View style={styles.loadingText}>
250
250
  <Skeleton.Box width={row === 1 ? '55%' : '75%'} height={13} borderRadius={6} />
251
251
  <Skeleton.Box width="40%" height={11} borderRadius={6} />
252
252
  </View>
@@ -397,9 +397,9 @@ export function ThoughtPanel({ onClose, outputActions }: ThoughtPanelProps) {
397
397
  );
398
398
 
399
399
  return (
400
- <View className="min-h-0 flex-1 gap-2.5 pt-2">
401
- <View className="h-[30px] flex-row items-center justify-between">
402
- <View className="min-w-0 shrink">
400
+ <View style={styles.panel}>
401
+ <View style={styles.tabs}>
402
+ <View style={styles.tabToggle}>
403
403
  <TabToggle value={activeTab} onChange={setActiveTab} />
404
404
  </View>
405
405
  {!shell?.compact && (
@@ -415,8 +415,8 @@ export function ThoughtPanel({ onClose, outputActions }: ThoughtPanelProps) {
415
415
  </View>
416
416
 
417
417
  <ScrollView
418
- className="flex-1 px-4"
419
- contentContainerClassName="pb-4"
418
+ style={styles.scroll}
419
+ contentContainerStyle={styles.scrollContent}
420
420
  showsVerticalScrollIndicator={false}
421
421
  >
422
422
  {content}
@@ -437,3 +437,17 @@ function ToolGlyph({ toolName, fill }: { toolName: string | undefined; fill: str
437
437
  const ToolIcon = getToolIcon(toolName || '');
438
438
  return <ToolIcon width={14} height={14} fill={fill} />;
439
439
  }
440
+
441
+ const styles = StyleSheet.create({
442
+ step: { flexDirection: 'row', alignItems: 'center', gap: 6, paddingVertical: 4 },
443
+ entry: { paddingVertical: 4 },
444
+ entryHeader: { flexDirection: 'row', alignItems: 'center', gap: 6 },
445
+ loading: { gap: 16, padding: 12 },
446
+ loadingRow: { flexDirection: 'row', alignItems: 'center', gap: 12 },
447
+ loadingText: { flexGrow: 1, flexShrink: 1, flexBasis: '0%', gap: 6 },
448
+ panel: { minHeight: 0, flexGrow: 1, flexShrink: 1, flexBasis: '0%', gap: 10, paddingTop: 8 },
449
+ tabs: { height: 30, flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between' },
450
+ tabToggle: { minWidth: 0, flexShrink: 1 },
451
+ scroll: { flexGrow: 1, flexShrink: 1, flexBasis: '0%', paddingHorizontal: 16 },
452
+ scrollContent: { paddingBottom: 16 },
453
+ });
@@ -10,7 +10,7 @@ import { Loading } from '@oxy.so/bloom/loading';
10
10
  import { useTheme } from '@oxy.so/bloom/theme';
11
11
  import { Muted } from '@oxy.so/bloom/typography';
12
12
  import type { ReactNode } from 'react';
13
- import { ScrollView, View } from 'react-native';
13
+ import { ScrollView, View, StyleSheet } from 'react-native';
14
14
 
15
15
  /**
16
16
  * One execution row: a tool call, its state, and — expanded — what went in
@@ -79,7 +79,7 @@ export function ToolStep({
79
79
  subtitle={description}
80
80
  destructive={status === 'error'}
81
81
  trailing={
82
- <View className="flex-row items-center gap-1.5">
82
+ <View style={styles.trailing}>
83
83
  {statusWord === null ? null : <Muted>{statusWord}</Muted>}
84
84
  <Chevron size="sm" fill={colors.textSecondary} />
85
85
  </View>
@@ -90,11 +90,11 @@ export function ToolStep({
90
90
  />
91
91
 
92
92
  {expanded ? (
93
- <View className="gap-2 pb-2">
93
+ <View style={styles.details}>
94
94
  {input.length > 0 || output.length > 0 ? (
95
95
  <ScrollView
96
- className="max-h-[200px]"
97
- contentContainerClassName="gap-2"
96
+ style={styles.detailsScroll}
97
+ contentContainerStyle={styles.detailsContent}
98
98
  nestedScrollEnabled
99
99
  >
100
100
  {input.length > 0 ? (
@@ -118,7 +118,7 @@ export function ToolStep({
118
118
  </ScrollView>
119
119
  ) : null}
120
120
  {chips.length > 0 ? (
121
- <View className="flex-row flex-wrap gap-1.5">
121
+ <View style={styles.chips}>
122
122
  {chips.map((source) => (
123
123
  <Chip key={source.url} size="sm" leadingIcon={RiGlobalLine}>
124
124
  {source.domain}
@@ -132,3 +132,11 @@ export function ToolStep({
132
132
  </View>
133
133
  );
134
134
  }
135
+
136
+ const styles = StyleSheet.create({
137
+ trailing: { flexDirection: 'row', alignItems: 'center', gap: 6 },
138
+ details: { gap: 8, paddingBottom: 8 },
139
+ detailsScroll: { maxHeight: 200 },
140
+ detailsContent: { gap: 8 },
141
+ chips: { flexDirection: 'row', flexWrap: 'wrap', gap: 6 },
142
+ });
@@ -15,7 +15,7 @@ import { RiCloseCircleLine } from '@oxy.so/bloom/icons/RiCloseCircleLine';
15
15
  import { Item } from '@oxy.so/bloom/item';
16
16
  import { Muted, Text } from '@oxy.so/bloom/typography';
17
17
  import React, { useState } from 'react';
18
- import { View } from 'react-native';
18
+ import { View, StyleSheet } from 'react-native';
19
19
 
20
20
  /**
21
21
  * AgentResultCard — the summary an agent run leaves in the chat when it ends.
@@ -76,7 +76,7 @@ export const AgentResultCard = React.memo(function AgentResultCard({
76
76
  return (
77
77
  <Card>
78
78
  <CardHeader>
79
- <View className="flex-row items-center gap-2">
79
+ <View style={styles.header}>
80
80
  <Badge
81
81
  variant="subtle"
82
82
  color={isSuccess ? 'success' : hasError ? 'error' : 'default'}
@@ -88,7 +88,7 @@ export const AgentResultCard = React.memo(function AgentResultCard({
88
88
  : 'chat.agentRun.unknown',
89
89
  )}
90
90
  />
91
- <View className="min-w-0 flex-1">
91
+ <View style={styles.title}>
92
92
  <Text variant="headline-semibold">
93
93
  {t(isSuccess ? 'chat.agentRun.taskComplete' : 'chat.agentRun.taskFailed')}
94
94
  </Text>
@@ -97,7 +97,7 @@ export const AgentResultCard = React.memo(function AgentResultCard({
97
97
  </View>
98
98
  </CardHeader>
99
99
  <CardBody>
100
- <View className="gap-3">
100
+ <View style={styles.body}>
101
101
  <Muted>{stats.join(' · ')}</Muted>
102
102
 
103
103
  {hasError && lastError ? <Admonition type="error">{lastError}</Admonition> : null}
@@ -123,3 +123,9 @@ export const AgentResultCard = React.memo(function AgentResultCard({
123
123
  </Card>
124
124
  );
125
125
  });
126
+
127
+ const styles = StyleSheet.create({
128
+ header: { flexDirection: 'row', alignItems: 'center', gap: 8 },
129
+ title: { minWidth: 0, flexGrow: 1, flexShrink: 1, flexBasis: '0%' },
130
+ body: { gap: 12 },
131
+ });
@@ -8,7 +8,7 @@ import { Badge } from '@oxy.so/bloom/badge';
8
8
  import { Card, CardBody, CardHeader } from '@oxy.so/bloom/card';
9
9
  import { Muted } from '@oxy.so/bloom/typography';
10
10
  import React, { useEffect, useState } from 'react';
11
- import { View } from 'react-native';
11
+ import { View, StyleSheet } from 'react-native';
12
12
 
13
13
  /**
14
14
  * AgentTaskCard — an agent run in progress, inline in the chat.
@@ -80,7 +80,7 @@ export const AgentTaskCard = React.memo(function AgentTaskCard({ activity }: Age
80
80
  return (
81
81
  <Card>
82
82
  <CardHeader>
83
- <View className="flex-row items-center justify-between gap-2">
83
+ <View style={styles.header}>
84
84
  <Badge variant="subtle" color={status.color} content={status.label} />
85
85
  <Muted>
86
86
  {[elapsed, plan && plan.total > 0 ? `${plan.completed}/${plan.total}` : '']
@@ -90,7 +90,7 @@ export const AgentTaskCard = React.memo(function AgentTaskCard({ activity }: Age
90
90
  </View>
91
91
  </CardHeader>
92
92
  <CardBody>
93
- <View className="gap-3">
93
+ <View style={styles.body}>
94
94
  {plan && plan.items.length > 0 ? (
95
95
  <AgentProgress
96
96
  steps={uniqueStepLabels(plan.items.map((item) => item.text))}
@@ -125,3 +125,8 @@ export const AgentTaskCard = React.memo(function AgentTaskCard({ activity }: Age
125
125
  </Card>
126
126
  );
127
127
  });
128
+
129
+ const styles = StyleSheet.create({
130
+ header: { flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', gap: 8 },
131
+ body: { gap: 12 },
132
+ });