@base44/superagent-native 0.0.2 → 0.0.3

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 (306) hide show
  1. package/lib/commonjs/AgentSettingsPanel.js +123 -47
  2. package/lib/commonjs/AgentSettingsPanel.js.map +1 -1
  3. package/lib/commonjs/AgentSphereIcon.js +14 -118
  4. package/lib/commonjs/AgentSphereIcon.js.map +1 -1
  5. package/lib/commonjs/AttachmentPickerStatusModal.js +3 -2
  6. package/lib/commonjs/AttachmentPickerStatusModal.js.map +1 -1
  7. package/lib/commonjs/ChannelsPanel.js +66 -44
  8. package/lib/commonjs/ChannelsPanel.js.map +1 -1
  9. package/lib/commonjs/ConversationChat.js +11 -2
  10. package/lib/commonjs/ConversationChat.js.map +1 -1
  11. package/lib/commonjs/ConversationComposer.js +8 -7
  12. package/lib/commonjs/ConversationComposer.js.map +1 -1
  13. package/lib/commonjs/ConversationScreen.js +2 -0
  14. package/lib/commonjs/ConversationScreen.js.map +1 -1
  15. package/lib/commonjs/EditorDrawer.js +54 -24
  16. package/lib/commonjs/EditorDrawer.js.map +1 -1
  17. package/lib/commonjs/FilesPanel.js +56 -20
  18. package/lib/commonjs/FilesPanel.js.map +1 -1
  19. package/lib/commonjs/RenameAgentModal.js +2 -1
  20. package/lib/commonjs/RenameAgentModal.js.map +1 -1
  21. package/lib/commonjs/ShareAgentModal.js +11 -10
  22. package/lib/commonjs/ShareAgentModal.js.map +1 -1
  23. package/lib/commonjs/ShareAgentModal.styles.js +2 -2
  24. package/lib/commonjs/ShareAgentModal.styles.js.map +1 -1
  25. package/lib/commonjs/SuperagentHomeScreen.js +27 -9
  26. package/lib/commonjs/SuperagentHomeScreen.js.map +1 -1
  27. package/lib/commonjs/ToolApprovalCard.js +72 -14
  28. package/lib/commonjs/ToolApprovalCard.js.map +1 -1
  29. package/lib/commonjs/ToolCallSummary.js +14 -9
  30. package/lib/commonjs/ToolCallSummary.js.map +1 -1
  31. package/lib/commonjs/agentSphereAssets.js +327 -0
  32. package/lib/commonjs/agentSphereAssets.js.map +1 -0
  33. package/lib/commonjs/agentSphereStyles.js +3 -3
  34. package/lib/commonjs/agentSphereStyles.js.map +1 -1
  35. package/lib/commonjs/apiClient.js +7 -0
  36. package/lib/commonjs/apiClient.js.map +1 -1
  37. package/lib/commonjs/composerStyles.js +2 -2
  38. package/lib/commonjs/composerStyles.js.map +1 -1
  39. package/lib/commonjs/connectorBrandIcons.generated.js +625 -0
  40. package/lib/commonjs/connectorBrandIcons.generated.js.map +1 -0
  41. package/lib/commonjs/connectorBrandIcons.js +3 -55
  42. package/lib/commonjs/connectorBrandIcons.js.map +1 -1
  43. package/lib/commonjs/connectorCatalog.js +19 -1
  44. package/lib/commonjs/connectorCatalog.js.map +1 -1
  45. package/lib/commonjs/conversationParts.js +5 -4
  46. package/lib/commonjs/conversationParts.js.map +1 -1
  47. package/lib/commonjs/conversationRuntime.js +120 -12
  48. package/lib/commonjs/conversationRuntime.js.map +1 -1
  49. package/lib/commonjs/conversationStyles.js +2 -1
  50. package/lib/commonjs/conversationStyles.js.map +1 -1
  51. package/lib/commonjs/editorShellStyles.js +6 -2
  52. package/lib/commonjs/editorShellStyles.js.map +1 -1
  53. package/lib/commonjs/index.js +7 -0
  54. package/lib/commonjs/index.js.map +1 -1
  55. package/lib/commonjs/markdownStyles.js +2 -2
  56. package/lib/commonjs/markdownStyles.js.map +1 -1
  57. package/lib/commonjs/messageActionStyles.js +2 -2
  58. package/lib/commonjs/messageActionStyles.js.map +1 -1
  59. package/lib/commonjs/realtimeClient.js +4 -1
  60. package/lib/commonjs/realtimeClient.js.map +1 -1
  61. package/lib/commonjs/renameAgentModalStyles.js +2 -2
  62. package/lib/commonjs/renameAgentModalStyles.js.map +1 -1
  63. package/lib/commonjs/screenParts.js +24 -41
  64. package/lib/commonjs/screenParts.js.map +1 -1
  65. package/lib/commonjs/styles.js +71 -60
  66. package/lib/commonjs/styles.js.map +1 -1
  67. package/lib/commonjs/superagentApiClient.js +63 -18
  68. package/lib/commonjs/superagentApiClient.js.map +1 -1
  69. package/lib/commonjs/theme.js +249 -0
  70. package/lib/commonjs/theme.js.map +1 -0
  71. package/lib/commonjs/useSuperagentConversation.js +133 -20
  72. package/lib/commonjs/useSuperagentConversation.js.map +1 -1
  73. package/lib/commonjs/useSuperagentRuntime.js +167 -82
  74. package/lib/commonjs/useSuperagentRuntime.js.map +1 -1
  75. package/lib/module/AgentSettingsPanel.js +125 -49
  76. package/lib/module/AgentSettingsPanel.js.map +1 -1
  77. package/lib/module/AgentSphereIcon.js +15 -118
  78. package/lib/module/AgentSphereIcon.js.map +1 -1
  79. package/lib/module/AttachmentPickerStatusModal.js +4 -3
  80. package/lib/module/AttachmentPickerStatusModal.js.map +1 -1
  81. package/lib/module/ChannelsPanel.js +67 -45
  82. package/lib/module/ChannelsPanel.js.map +1 -1
  83. package/lib/module/ConversationChat.js +11 -2
  84. package/lib/module/ConversationChat.js.map +1 -1
  85. package/lib/module/ConversationComposer.js +8 -7
  86. package/lib/module/ConversationComposer.js.map +1 -1
  87. package/lib/module/ConversationScreen.js +2 -0
  88. package/lib/module/ConversationScreen.js.map +1 -1
  89. package/lib/module/EditorDrawer.js +55 -25
  90. package/lib/module/EditorDrawer.js.map +1 -1
  91. package/lib/module/FilesPanel.js +56 -20
  92. package/lib/module/FilesPanel.js.map +1 -1
  93. package/lib/module/RenameAgentModal.js +2 -1
  94. package/lib/module/RenameAgentModal.js.map +1 -1
  95. package/lib/module/ShareAgentModal.js +11 -10
  96. package/lib/module/ShareAgentModal.js.map +1 -1
  97. package/lib/module/ShareAgentModal.styles.js +2 -2
  98. package/lib/module/ShareAgentModal.styles.js.map +1 -1
  99. package/lib/module/SuperagentHomeScreen.js +27 -9
  100. package/lib/module/SuperagentHomeScreen.js.map +1 -1
  101. package/lib/module/ToolApprovalCard.js +72 -14
  102. package/lib/module/ToolApprovalCard.js.map +1 -1
  103. package/lib/module/ToolCallSummary.js +14 -9
  104. package/lib/module/ToolCallSummary.js.map +1 -1
  105. package/lib/module/agentSphereAssets.js +323 -0
  106. package/lib/module/agentSphereAssets.js.map +1 -0
  107. package/lib/module/agentSphereStyles.js +3 -3
  108. package/lib/module/agentSphereStyles.js.map +1 -1
  109. package/lib/module/apiClient.js +7 -0
  110. package/lib/module/apiClient.js.map +1 -1
  111. package/lib/module/composerStyles.js +2 -2
  112. package/lib/module/composerStyles.js.map +1 -1
  113. package/lib/module/connectorBrandIcons.generated.js +621 -0
  114. package/lib/module/connectorBrandIcons.generated.js.map +1 -0
  115. package/lib/module/connectorBrandIcons.js +1 -53
  116. package/lib/module/connectorBrandIcons.js.map +1 -1
  117. package/lib/module/connectorCatalog.js +17 -0
  118. package/lib/module/connectorCatalog.js.map +1 -1
  119. package/lib/module/conversationParts.js +5 -4
  120. package/lib/module/conversationParts.js.map +1 -1
  121. package/lib/module/conversationRuntime.js +118 -12
  122. package/lib/module/conversationRuntime.js.map +1 -1
  123. package/lib/module/conversationStyles.js +3 -2
  124. package/lib/module/conversationStyles.js.map +1 -1
  125. package/lib/module/editorShellStyles.js +6 -2
  126. package/lib/module/editorShellStyles.js.map +1 -1
  127. package/lib/module/index.js +1 -0
  128. package/lib/module/index.js.map +1 -1
  129. package/lib/module/markdownStyles.js +2 -2
  130. package/lib/module/markdownStyles.js.map +1 -1
  131. package/lib/module/messageActionStyles.js +2 -2
  132. package/lib/module/messageActionStyles.js.map +1 -1
  133. package/lib/module/realtimeClient.js +4 -1
  134. package/lib/module/realtimeClient.js.map +1 -1
  135. package/lib/module/renameAgentModalStyles.js +2 -2
  136. package/lib/module/renameAgentModalStyles.js.map +1 -1
  137. package/lib/module/screenParts.js +25 -42
  138. package/lib/module/screenParts.js.map +1 -1
  139. package/lib/module/styles.js +71 -60
  140. package/lib/module/styles.js.map +1 -1
  141. package/lib/module/superagentApiClient.js +63 -18
  142. package/lib/module/superagentApiClient.js.map +1 -1
  143. package/lib/module/theme.js +239 -0
  144. package/lib/module/theme.js.map +1 -0
  145. package/lib/module/useSuperagentConversation.js +135 -22
  146. package/lib/module/useSuperagentConversation.js.map +1 -1
  147. package/lib/module/useSuperagentRuntime.js +167 -82
  148. package/lib/module/useSuperagentRuntime.js.map +1 -1
  149. package/lib/typescript/commonjs/AgentSettingsPanel.d.ts.map +1 -1
  150. package/lib/typescript/commonjs/AgentSphereIcon.d.ts.map +1 -1
  151. package/lib/typescript/commonjs/AttachmentPickerStatusModal.d.ts.map +1 -1
  152. package/lib/typescript/commonjs/ChannelsPanel.d.ts.map +1 -1
  153. package/lib/typescript/commonjs/ConversationChat.d.ts +1 -1
  154. package/lib/typescript/commonjs/ConversationChat.d.ts.map +1 -1
  155. package/lib/typescript/commonjs/ConversationComposer.d.ts.map +1 -1
  156. package/lib/typescript/commonjs/ConversationMessageList.d.ts +1 -1
  157. package/lib/typescript/commonjs/ConversationMessageList.d.ts.map +1 -1
  158. package/lib/typescript/commonjs/ConversationScreen.d.ts +2 -1
  159. package/lib/typescript/commonjs/ConversationScreen.d.ts.map +1 -1
  160. package/lib/typescript/commonjs/EditorDrawer.d.ts +1 -1
  161. package/lib/typescript/commonjs/EditorDrawer.d.ts.map +1 -1
  162. package/lib/typescript/commonjs/FilesPanel.d.ts.map +1 -1
  163. package/lib/typescript/commonjs/RenameAgentModal.d.ts.map +1 -1
  164. package/lib/typescript/commonjs/ShareAgentModal.d.ts.map +1 -1
  165. package/lib/typescript/commonjs/ShareAgentModal.styles.d.ts.map +1 -1
  166. package/lib/typescript/commonjs/SuperagentHomeScreen.d.ts.map +1 -1
  167. package/lib/typescript/commonjs/ToolApprovalCard.d.ts +3 -3
  168. package/lib/typescript/commonjs/ToolApprovalCard.d.ts.map +1 -1
  169. package/lib/typescript/commonjs/ToolCallSummary.d.ts +1 -1
  170. package/lib/typescript/commonjs/ToolCallSummary.d.ts.map +1 -1
  171. package/lib/typescript/commonjs/agentSphereAssets.d.ts +2 -0
  172. package/lib/typescript/commonjs/agentSphereAssets.d.ts.map +1 -0
  173. package/lib/typescript/commonjs/agentSphereStyles.d.ts.map +1 -1
  174. package/lib/typescript/commonjs/apiClient.d.ts.map +1 -1
  175. package/lib/typescript/commonjs/composerStyles.d.ts.map +1 -1
  176. package/lib/typescript/commonjs/connectorBrandIcons.d.ts.map +1 -1
  177. package/lib/typescript/commonjs/connectorBrandIcons.generated.d.ts +2 -0
  178. package/lib/typescript/commonjs/connectorBrandIcons.generated.d.ts.map +1 -0
  179. package/lib/typescript/commonjs/connectorCatalog.d.ts +2 -0
  180. package/lib/typescript/commonjs/connectorCatalog.d.ts.map +1 -1
  181. package/lib/typescript/commonjs/conversationParts.d.ts +1 -1
  182. package/lib/typescript/commonjs/conversationParts.d.ts.map +1 -1
  183. package/lib/typescript/commonjs/conversationRuntime.d.ts +6 -1
  184. package/lib/typescript/commonjs/conversationRuntime.d.ts.map +1 -1
  185. package/lib/typescript/commonjs/conversationStyles.d.ts.map +1 -1
  186. package/lib/typescript/commonjs/editorShellStyles.d.ts +4 -0
  187. package/lib/typescript/commonjs/editorShellStyles.d.ts.map +1 -1
  188. package/lib/typescript/commonjs/index.d.ts +2 -0
  189. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  190. package/lib/typescript/commonjs/markdownStyles.d.ts.map +1 -1
  191. package/lib/typescript/commonjs/messageActionStyles.d.ts.map +1 -1
  192. package/lib/typescript/commonjs/realtimeClient.d.ts.map +1 -1
  193. package/lib/typescript/commonjs/renameAgentModalStyles.d.ts.map +1 -1
  194. package/lib/typescript/commonjs/screenParts.d.ts +1 -1
  195. package/lib/typescript/commonjs/screenParts.d.ts.map +1 -1
  196. package/lib/typescript/commonjs/styles.d.ts +20 -11
  197. package/lib/typescript/commonjs/styles.d.ts.map +1 -1
  198. package/lib/typescript/commonjs/superagentApiClient.d.ts +2 -1
  199. package/lib/typescript/commonjs/superagentApiClient.d.ts.map +1 -1
  200. package/lib/typescript/commonjs/theme.d.ts +36 -0
  201. package/lib/typescript/commonjs/theme.d.ts.map +1 -0
  202. package/lib/typescript/commonjs/types.d.ts +16 -2
  203. package/lib/typescript/commonjs/types.d.ts.map +1 -1
  204. package/lib/typescript/commonjs/useSuperagentConversation.d.ts +3 -2
  205. package/lib/typescript/commonjs/useSuperagentConversation.d.ts.map +1 -1
  206. package/lib/typescript/commonjs/useSuperagentRuntime.d.ts +2 -1
  207. package/lib/typescript/commonjs/useSuperagentRuntime.d.ts.map +1 -1
  208. package/lib/typescript/module/AgentSettingsPanel.d.ts.map +1 -1
  209. package/lib/typescript/module/AgentSphereIcon.d.ts.map +1 -1
  210. package/lib/typescript/module/AttachmentPickerStatusModal.d.ts.map +1 -1
  211. package/lib/typescript/module/ChannelsPanel.d.ts.map +1 -1
  212. package/lib/typescript/module/ConversationChat.d.ts +1 -1
  213. package/lib/typescript/module/ConversationChat.d.ts.map +1 -1
  214. package/lib/typescript/module/ConversationComposer.d.ts.map +1 -1
  215. package/lib/typescript/module/ConversationMessageList.d.ts +1 -1
  216. package/lib/typescript/module/ConversationMessageList.d.ts.map +1 -1
  217. package/lib/typescript/module/ConversationScreen.d.ts +2 -1
  218. package/lib/typescript/module/ConversationScreen.d.ts.map +1 -1
  219. package/lib/typescript/module/EditorDrawer.d.ts +1 -1
  220. package/lib/typescript/module/EditorDrawer.d.ts.map +1 -1
  221. package/lib/typescript/module/FilesPanel.d.ts.map +1 -1
  222. package/lib/typescript/module/RenameAgentModal.d.ts.map +1 -1
  223. package/lib/typescript/module/ShareAgentModal.d.ts.map +1 -1
  224. package/lib/typescript/module/ShareAgentModal.styles.d.ts.map +1 -1
  225. package/lib/typescript/module/SuperagentHomeScreen.d.ts.map +1 -1
  226. package/lib/typescript/module/ToolApprovalCard.d.ts +3 -3
  227. package/lib/typescript/module/ToolApprovalCard.d.ts.map +1 -1
  228. package/lib/typescript/module/ToolCallSummary.d.ts +1 -1
  229. package/lib/typescript/module/ToolCallSummary.d.ts.map +1 -1
  230. package/lib/typescript/module/agentSphereAssets.d.ts +2 -0
  231. package/lib/typescript/module/agentSphereAssets.d.ts.map +1 -0
  232. package/lib/typescript/module/agentSphereStyles.d.ts.map +1 -1
  233. package/lib/typescript/module/apiClient.d.ts.map +1 -1
  234. package/lib/typescript/module/composerStyles.d.ts.map +1 -1
  235. package/lib/typescript/module/connectorBrandIcons.d.ts.map +1 -1
  236. package/lib/typescript/module/connectorBrandIcons.generated.d.ts +2 -0
  237. package/lib/typescript/module/connectorBrandIcons.generated.d.ts.map +1 -0
  238. package/lib/typescript/module/connectorCatalog.d.ts +2 -0
  239. package/lib/typescript/module/connectorCatalog.d.ts.map +1 -1
  240. package/lib/typescript/module/conversationParts.d.ts +1 -1
  241. package/lib/typescript/module/conversationParts.d.ts.map +1 -1
  242. package/lib/typescript/module/conversationRuntime.d.ts +6 -1
  243. package/lib/typescript/module/conversationRuntime.d.ts.map +1 -1
  244. package/lib/typescript/module/conversationStyles.d.ts.map +1 -1
  245. package/lib/typescript/module/editorShellStyles.d.ts +4 -0
  246. package/lib/typescript/module/editorShellStyles.d.ts.map +1 -1
  247. package/lib/typescript/module/index.d.ts +2 -0
  248. package/lib/typescript/module/index.d.ts.map +1 -1
  249. package/lib/typescript/module/markdownStyles.d.ts.map +1 -1
  250. package/lib/typescript/module/messageActionStyles.d.ts.map +1 -1
  251. package/lib/typescript/module/realtimeClient.d.ts.map +1 -1
  252. package/lib/typescript/module/renameAgentModalStyles.d.ts.map +1 -1
  253. package/lib/typescript/module/screenParts.d.ts +1 -1
  254. package/lib/typescript/module/screenParts.d.ts.map +1 -1
  255. package/lib/typescript/module/styles.d.ts +20 -11
  256. package/lib/typescript/module/styles.d.ts.map +1 -1
  257. package/lib/typescript/module/superagentApiClient.d.ts +2 -1
  258. package/lib/typescript/module/superagentApiClient.d.ts.map +1 -1
  259. package/lib/typescript/module/theme.d.ts +36 -0
  260. package/lib/typescript/module/theme.d.ts.map +1 -0
  261. package/lib/typescript/module/types.d.ts +16 -2
  262. package/lib/typescript/module/types.d.ts.map +1 -1
  263. package/lib/typescript/module/useSuperagentConversation.d.ts +3 -2
  264. package/lib/typescript/module/useSuperagentConversation.d.ts.map +1 -1
  265. package/lib/typescript/module/useSuperagentRuntime.d.ts +2 -1
  266. package/lib/typescript/module/useSuperagentRuntime.d.ts.map +1 -1
  267. package/package.json +1 -1
  268. package/src/AgentSettingsPanel.tsx +118 -49
  269. package/src/AgentSphereIcon.tsx +11 -62
  270. package/src/AttachmentPickerStatusModal.tsx +4 -3
  271. package/src/ChannelsPanel.tsx +59 -39
  272. package/src/ConversationChat.tsx +12 -3
  273. package/src/ConversationComposer.tsx +7 -6
  274. package/src/ConversationMessageList.tsx +1 -1
  275. package/src/ConversationScreen.tsx +3 -0
  276. package/src/EditorDrawer.tsx +66 -41
  277. package/src/FilesPanel.tsx +48 -20
  278. package/src/RenameAgentModal.tsx +2 -1
  279. package/src/ShareAgentModal.styles.ts +2 -1
  280. package/src/ShareAgentModal.tsx +9 -8
  281. package/src/SuperagentHomeScreen.tsx +27 -7
  282. package/src/ToolApprovalCard.tsx +82 -14
  283. package/src/ToolCallSummary.tsx +18 -12
  284. package/src/agentSphereAssets.ts +325 -0
  285. package/src/agentSphereStyles.ts +3 -2
  286. package/src/apiClient.ts +7 -0
  287. package/src/composerStyles.ts +2 -1
  288. package/src/connectorBrandIcons.generated.ts +618 -0
  289. package/src/connectorBrandIcons.tsx +1 -53
  290. package/src/connectorCatalog.ts +24 -0
  291. package/src/conversationParts.tsx +6 -5
  292. package/src/conversationRuntime.ts +123 -12
  293. package/src/conversationStyles.ts +2 -1
  294. package/src/editorShellStyles.ts +6 -1
  295. package/src/index.ts +2 -0
  296. package/src/markdownStyles.ts +2 -1
  297. package/src/messageActionStyles.ts +2 -1
  298. package/src/realtimeClient.ts +7 -1
  299. package/src/renameAgentModalStyles.ts +2 -1
  300. package/src/screenParts.tsx +17 -29
  301. package/src/styles.ts +63 -54
  302. package/src/superagentApiClient.ts +68 -18
  303. package/src/theme.ts +254 -0
  304. package/src/types.ts +21 -2
  305. package/src/useSuperagentConversation.ts +141 -24
  306. package/src/useSuperagentRuntime.ts +165 -84
@@ -1,5 +1,6 @@
1
1
  import React, { useEffect, useMemo, useState } from 'react';
2
- import { ActivityIndicator, Modal, Pressable, ScrollView, Text, TextInput, View } from 'react-native';
2
+ import { themedColor } from './theme';
3
+ import { ActivityIndicator, Image, Modal, Pressable, ScrollView, Text, TextInput, View } from 'react-native';
3
4
  import {
4
5
  AlertCircle,
5
6
  Archive,
@@ -166,7 +167,7 @@ export function EditorDrawer({
166
167
  onCancelConnectorConnection?: (input: { agentId: string; connectorId: string }) => void;
167
168
  onArchiveAutomation?: (input: SuperagentAutomationActionInput) => Promise<void> | void;
168
169
  onCloneAgent?: SuperagentHomeScreenProps['onCloneAgent'];
169
- onConnectConnector?: (input: SuperagentConnectorActionInput) => Promise<boolean | void> | boolean | void;
170
+ onConnectConnector?: (input: SuperagentConnectorActionInput) => Promise<boolean | string | void> | boolean | string | void;
170
171
  onDeleteAgent?: SuperagentHomeScreenProps['onDeleteAgent'];
171
172
  onDeleteAutomation?: (input: SuperagentAutomationActionInput) => Promise<void> | void;
172
173
  onDeleteSecret?: SuperagentHomeScreenProps['onDeleteSecret'];
@@ -236,7 +237,7 @@ export function EditorDrawer({
236
237
  editorShellStyles.closeButton,
237
238
  pressed && styles.pressed,
238
239
  ]}>
239
- <X color="#F4F4F5" size={22} strokeWidth={2.5} />
240
+ <X color={themedColor('#F4F4F5')} size={22} strokeWidth={2.5} />
240
241
  </Pressable>
241
242
  <View style={editorShellStyles.modalTitleWrap}>
242
243
  <Text style={editorShellStyles.modalTitle}>Settings</Text>
@@ -387,7 +388,7 @@ function TasksPanel({
387
388
  if (isLoading) {
388
389
  return (
389
390
  <View style={editorShellStyles.loadingPanel}>
390
- <ActivityIndicator color="#FF5A1F" />
391
+ <ActivityIndicator color={themedColor('#FF5A1F')} />
391
392
  <Text style={editorShellStyles.loadingText}>Loading automations...</Text>
392
393
  </View>
393
394
  );
@@ -457,9 +458,9 @@ function TasksPanel({
457
458
  ) : (
458
459
  <View style={editorShellStyles.emptyPanel}>
459
460
  {viewTab === 'archived' ? (
460
- <Archive color="#8E8E93" size={22} strokeWidth={2.2} />
461
+ <Archive color={themedColor('#8E8E93')} size={22} strokeWidth={2.2} />
461
462
  ) : (
462
- <Timer color="#8E8E93" size={22} strokeWidth={2.2} />
463
+ <Timer color={themedColor('#8E8E93')} size={22} strokeWidth={2.2} />
463
464
  )}
464
465
  <Text style={editorShellStyles.emptyTitle}>
465
466
  {viewTab === 'archived' ? 'No archived automations' : 'No automations yet'}
@@ -528,7 +529,7 @@ function AutomationCard({
528
529
  return (
529
530
  <View style={editorShellStyles.automationCard}>
530
531
  <View style={editorShellStyles.automationIcon}>
531
- <Icon color="#F4F4F5" size={19} strokeWidth={2.35} />
532
+ <Icon color={themedColor('#F4F4F5')} size={19} strokeWidth={2.35} />
532
533
  </View>
533
534
  <View style={editorShellStyles.automationText}>
534
535
  <View style={editorShellStyles.inlineTitleRow}>
@@ -551,7 +552,7 @@ function AutomationCard({
551
552
  </Text>
552
553
  ) : null}
553
554
  <View style={editorShellStyles.automationCreditBadge}>
554
- <Coins color="#A1A1AA" size={11} strokeWidth={2.4} />
555
+ <Coins color={themedColor('#A1A1AA')} size={11} strokeWidth={2.4} />
555
556
  <Text numberOfLines={1} style={editorShellStyles.automationCreditText}>
556
557
  {credits ? `${formatCredits(credits.total)} credits used` : 'Consumes credits'}
557
558
  </Text>
@@ -687,9 +688,9 @@ function AutomationActionButton({
687
688
  ]}
688
689
  >
689
690
  {isLoading ? (
690
- <ActivityIndicator color={danger ? '#FCA5A5' : '#F4F4F5'} size="small" />
691
+ <ActivityIndicator color={danger ? themedColor('#FCA5A5') : themedColor('#F4F4F5')} size="small" />
691
692
  ) : (
692
- <Icon color={danger ? '#FCA5A5' : '#F4F4F5'} size={13} strokeWidth={2.45} />
693
+ <Icon color={danger ? themedColor('#FCA5A5') : themedColor('#F4F4F5')} size={13} strokeWidth={2.45} />
693
694
  )}
694
695
  <Text style={[
695
696
  editorShellStyles.automationActionText,
@@ -754,7 +755,7 @@ function ConnectorsPanel({
754
755
  connectingConnectorId?: string | null;
755
756
  isLoading?: boolean;
756
757
  onCancel?: (input: { agentId: string; connectorId: string }) => void;
757
- onConnect?: (input: SuperagentConnectorActionInput) => Promise<boolean | void> | boolean | void;
758
+ onConnect?: (input: SuperagentConnectorActionInput) => Promise<boolean | string | void> | boolean | string | void;
758
759
  onDisconnect?: (input: SuperagentConnectorActionInput) => Promise<void> | void;
759
760
  onRemove?: (input: SuperagentConnectorActionInput) => Promise<void> | void;
760
761
  }) {
@@ -788,7 +789,7 @@ function ConnectorsPanel({
788
789
  if (isLoading) {
789
790
  return (
790
791
  <View style={editorShellStyles.loadingPanel}>
791
- <ActivityIndicator color="#FF5A1F" />
792
+ <ActivityIndicator color={themedColor('#FF5A1F')} />
792
793
  <Text style={editorShellStyles.loadingText}>Loading connectors...</Text>
793
794
  </View>
794
795
  );
@@ -822,7 +823,7 @@ function ConnectorsPanel({
822
823
  </View>
823
824
  ) : (
824
825
  <View style={editorShellStyles.emptyPanel}>
825
- <Plug color="#8E8E93" size={22} strokeWidth={2.2} />
826
+ <Plug color={themedColor('#8E8E93')} size={22} strokeWidth={2.2} />
826
827
  <Text style={editorShellStyles.emptyTitle}>No connectors yet</Text>
827
828
  <Text style={editorShellStyles.emptyBody}>Connect a service below to let this agent use it from chat.</Text>
828
829
  </View>
@@ -838,14 +839,14 @@ function ConnectorsPanel({
838
839
  <Text style={editorShellStyles.countBadge}>{available.length}</Text>
839
840
  </View>
840
841
  <View style={editorShellStyles.connectorSearchWrap}>
841
- <Search color="#A1A1AA" size={16} strokeWidth={2.4} />
842
+ <Search color={themedColor('#A1A1AA')} size={16} strokeWidth={2.4} />
842
843
  <TextInput
843
844
  autoCapitalize="none"
844
845
  autoCorrect={false}
845
846
  clearButtonMode="while-editing"
846
847
  onChangeText={setSearchQuery}
847
848
  placeholder="Search connectors"
848
- placeholderTextColor="#8E8E93"
849
+ placeholderTextColor={themedColor('#8E8E93')}
849
850
  returnKeyType="search"
850
851
  style={editorShellStyles.connectorSearchInput}
851
852
  value={searchQuery}
@@ -865,7 +866,7 @@ function ConnectorsPanel({
865
866
  ))
866
867
  ) : (
867
868
  <View style={editorShellStyles.emptyPanel}>
868
- <Search color="#8E8E93" size={22} strokeWidth={2.2} />
869
+ <Search color={themedColor('#8E8E93')} size={22} strokeWidth={2.2} />
869
870
  <Text style={editorShellStyles.emptyTitle}>No matching connectors</Text>
870
871
  <Text style={editorShellStyles.emptyBody}>Try a different connector name or category.</Text>
871
872
  </View>
@@ -889,7 +890,7 @@ function ConnectedConnectorCard({
889
890
  connector: SuperagentConnector;
890
891
  isConnecting: boolean;
891
892
  onCancel?: (input: { agentId: string; connectorId: string }) => void;
892
- onConnect?: (input: SuperagentConnectorActionInput) => Promise<boolean | void> | boolean | void;
893
+ onConnect?: (input: SuperagentConnectorActionInput) => Promise<boolean | string | void> | boolean | string | void;
893
894
  onDisconnect?: (input: SuperagentConnectorActionInput) => Promise<void> | void;
894
895
  onRemove?: (input: SuperagentConnectorActionInput) => Promise<void> | void;
895
896
  }) {
@@ -914,7 +915,7 @@ function ConnectedConnectorCard({
914
915
  </View>
915
916
  {isConnecting ? (
916
917
  <View style={editorShellStyles.connectingWrap}>
917
- <ActivityIndicator color="#8B5CF6" size="small" />
918
+ <ActivityIndicator color={themedColor('#8B5CF6')} size="small" />
918
919
  <Pressable
919
920
  accessibilityLabel={`Cancel ${connector.name} connection`}
920
921
  accessibilityRole="button"
@@ -935,13 +936,13 @@ function ConnectedConnectorCard({
935
936
  pressed && styles.pressed,
936
937
  ]}
937
938
  >
938
- <MoreHorizontal color="#E4E4E7" size={19} strokeWidth={2.4} />
939
+ <MoreHorizontal color={themedColor('#E4E4E7')} size={19} strokeWidth={2.4} />
939
940
  </Pressable>
940
941
  </View>
941
942
  )}
942
943
  {menuOpen ? (
943
944
  <View style={editorShellStyles.connectorMenu}>
944
- {hasAccessModes && onConnect ? (
945
+ {hasAccessModes && onConnect && !connector.requiresConnectionConfig ? (
945
946
  <MenuAction
946
947
  label={oppositeMode === 'read_only' ? 'Switch to read only' : 'Switch to full access'}
947
948
  onPress={() => {
@@ -956,19 +957,28 @@ function ConnectedConnectorCard({
956
957
  }}
957
958
  />
958
959
  ) : null}
959
- <MenuAction
960
- label={status === 'active' ? 'Switch account' : 'Reconnect'}
961
- onPress={() => {
962
- setMenuOpen(false);
963
- onConnect?.({
964
- accessMode: connector.accessMode ?? undefined,
965
- agentId,
966
- connectorId: connector.id,
967
- forceReconnect: true,
968
- scopes: connector.scopes?.length ? connector.scopes : getConnectorScopesForMode(connector, connector.accessMode ?? 'full_access'),
969
- });
970
- }}
971
- />
960
+ {connector.requiresConnectionConfig ? (
961
+ // Reconnect/Switch account re-runs the same OAuth initiate that the
962
+ // backend rejects without a connection_config this native tab can't
963
+ // collect yet. Steer to the web app instead of an action that fails.
964
+ <View style={editorShellStyles.menuAction}>
965
+ <Text style={editorShellStyles.connectorSubtitle}>Manage on the web app</Text>
966
+ </View>
967
+ ) : (
968
+ <MenuAction
969
+ label={status === 'active' ? 'Switch account' : 'Reconnect'}
970
+ onPress={() => {
971
+ setMenuOpen(false);
972
+ onConnect?.({
973
+ accessMode: connector.accessMode ?? undefined,
974
+ agentId,
975
+ connectorId: connector.id,
976
+ forceReconnect: true,
977
+ scopes: connector.scopes?.length ? connector.scopes : getConnectorScopesForMode(connector, connector.accessMode ?? 'full_access'),
978
+ });
979
+ }}
980
+ />
981
+ )}
972
982
  {status !== 'disconnected' ? (
973
983
  <MenuAction
974
984
  destructive
@@ -1018,7 +1028,7 @@ function AvailableConnectorCard({
1018
1028
  connector: SuperagentConnector;
1019
1029
  isConnecting: boolean;
1020
1030
  onCancel?: (input: { agentId: string; connectorId: string }) => void;
1021
- onConnect?: (input: SuperagentConnectorActionInput) => Promise<boolean | void> | boolean | void;
1031
+ onConnect?: (input: SuperagentConnectorActionInput) => Promise<boolean | string | void> | boolean | string | void;
1022
1032
  }) {
1023
1033
  const [accessMode, setAccessMode] = useState<SuperagentConnectorAccessMode>(
1024
1034
  connector.accessMode ?? 'full_access',
@@ -1034,7 +1044,7 @@ function AvailableConnectorCard({
1034
1044
  </View>
1035
1045
  {isConnecting ? (
1036
1046
  <View style={editorShellStyles.connectingWrap}>
1037
- <ActivityIndicator color="#8B5CF6" size="small" />
1047
+ <ActivityIndicator color={themedColor('#8B5CF6')} size="small" />
1038
1048
  <Pressable
1039
1049
  accessibilityLabel={`Cancel ${connector.name} connection`}
1040
1050
  accessibilityRole="button"
@@ -1049,7 +1059,7 @@ function AvailableConnectorCard({
1049
1059
  <Pressable
1050
1060
  accessibilityLabel={`Connect ${connector.name}`}
1051
1061
  accessibilityRole="button"
1052
- disabled={!onConnect}
1062
+ disabled={!onConnect || connector.requiresConnectionConfig}
1053
1063
  onPress={() => onConnect?.({
1054
1064
  accessMode,
1055
1065
  agentId,
@@ -1058,13 +1068,19 @@ function AvailableConnectorCard({
1058
1068
  })}
1059
1069
  style={({ pressed }) => [
1060
1070
  editorShellStyles.webConnectButton,
1061
- !onConnect && editorShellStyles.disabledAction,
1071
+ (!onConnect || connector.requiresConnectionConfig) && editorShellStyles.disabledAction,
1062
1072
  pressed && styles.pressed,
1063
1073
  ]}
1064
1074
  >
1065
1075
  <Text style={editorShellStyles.webConnectText}>Connect</Text>
1066
1076
  </Pressable>
1067
- {hasAccessModes ? (
1077
+ {connector.requiresConnectionConfig ? (
1078
+ // The backend's initiate route validates a required connection_config
1079
+ // (e.g. subdomain) that this native tab can't collect yet, so the
1080
+ // OAuth would fail before it starts. Steer the user to the web app
1081
+ // instead of offering a button that can't succeed.
1082
+ <Text style={editorShellStyles.connectorSubtitle}>Connect this from the web app</Text>
1083
+ ) : hasAccessModes ? (
1068
1084
  <View style={editorShellStyles.accessToggle}>
1069
1085
  <AccessButton active={accessMode === 'read_only'} label="Read" onPress={() => setAccessMode('read_only')} />
1070
1086
  <AccessButton active={accessMode === 'full_access'} label="Full" onPress={() => setAccessMode('full_access')} />
@@ -1245,13 +1261,22 @@ function ConnectorIcon({ connector }: { connector: SuperagentConnector }) {
1245
1261
  const Icon = CONNECTOR_ICONS[connector.id] ?? Plug;
1246
1262
  const iconBackgroundColor = connector.iconBackgroundColor ?? '#FFFFFF';
1247
1263
  const hasBrandIcon = hasConnectorBrandIcon(connector.id);
1264
+ const [imageFailed, setImageFailed] = useState(false);
1265
+ const iconUrl = connector.iconUrl?.trim();
1248
1266
 
1249
1267
  return (
1250
1268
  <View style={[editorShellStyles.connectorIcon, { backgroundColor: iconBackgroundColor }]}>
1251
1269
  {hasBrandIcon ? (
1252
1270
  <ConnectorBrandIcon connectorId={connector.id} size={22} />
1271
+ ) : iconUrl && !imageFailed ? (
1272
+ <Image
1273
+ onError={() => setImageFailed(true)}
1274
+ resizeMode="contain"
1275
+ source={{ uri: iconUrl }}
1276
+ style={editorShellStyles.connectorIconImage}
1277
+ />
1253
1278
  ) : (
1254
- <Icon color="#111827" size={20} strokeWidth={2.35} />
1279
+ <Icon color={themedColor('#111827')} size={20} strokeWidth={2.35} />
1255
1280
  )}
1256
1281
  </View>
1257
1282
  );
@@ -1266,7 +1291,7 @@ function StatusBadge({ status }: { status: SuperagentConnector['status'] }) {
1266
1291
  editorShellStyles.statusBadge,
1267
1292
  isActive ? editorShellStyles.statusBadgeActive : isDisconnected ? editorShellStyles.statusBadgeDisconnected : editorShellStyles.statusBadgeWarning,
1268
1293
  ]}>
1269
- <Icon color={isActive ? '#34D399' : isDisconnected ? '#A1A1AA' : '#FCA5A5'} size={11} strokeWidth={2.7} />
1294
+ <Icon color={isActive ? themedColor('#34D399') : isDisconnected ? themedColor('#A1A1AA') : themedColor('#FCA5A5')} size={11} strokeWidth={2.7} />
1270
1295
  <Text style={[
1271
1296
  editorShellStyles.statusBadgeText,
1272
1297
  isActive ? editorShellStyles.statusBadgeTextActive : isDisconnected ? editorShellStyles.statusBadgeTextDisconnected : editorShellStyles.statusBadgeTextWarning,
@@ -1286,7 +1311,7 @@ function PlaceholderSettingsPanel({ tab }: { tab: SuperagentEditorTab }) {
1286
1311
  return (
1287
1312
  <View style={editorShellStyles.placeholderPanel}>
1288
1313
  <View style={editorShellStyles.placeholderIcon}>
1289
- <Icon color="#FF5A1F" size={24} strokeWidth={2.3} />
1314
+ <Icon color={themedColor('#FF5A1F')} size={24} strokeWidth={2.3} />
1290
1315
  </View>
1291
1316
  <Text style={editorShellStyles.placeholderTitle}>{label}</Text>
1292
1317
  <Text style={editorShellStyles.placeholderBody}>
@@ -1,4 +1,5 @@
1
1
  import React, { useMemo, useState } from 'react';
2
+ import { themedColor } from './theme';
2
3
  import {
3
4
  ActivityIndicator,
4
5
  Image,
@@ -102,6 +103,19 @@ export function FilesPanel({
102
103
  return;
103
104
  }
104
105
 
106
+ // Binary files (non-SVG images, PDFs) can't be read through the text-only
107
+ // sandbox content endpoint — it returns 415 for non-UTF-8 bytes — so don't
108
+ // fetch them. Open a placeholder instead of surfacing a confusing error;
109
+ // a real preview can return once a binary-safe read/download endpoint exists.
110
+ const category = getFileCategory(path);
111
+ const isBinaryUnreadable = (category === 'image' && getImageMimeType(path) !== 'image/svg+xml') || category === 'pdf';
112
+ if (isBinaryUnreadable) {
113
+ setFileError(null);
114
+ setOpenedFile({ content: '', path });
115
+ setDraftContent('');
116
+ return;
117
+ }
118
+
105
119
  setLoadingPath(path);
106
120
  setFileError(null);
107
121
  try {
@@ -200,9 +214,9 @@ export function FilesPanel({
200
214
  ]}
201
215
  >
202
216
  {isUploading ? (
203
- <ActivityIndicator color="#F4F4F5" size="small" />
217
+ <ActivityIndicator color={themedColor('#F4F4F5')} size="small" />
204
218
  ) : (
205
- <Upload color="#F4F4F5" size={16} strokeWidth={2.4} />
219
+ <Upload color={themedColor('#F4F4F5')} size={16} strokeWidth={2.4} />
206
220
  )}
207
221
  </Pressable>
208
222
  <Pressable
@@ -217,23 +231,23 @@ export function FilesPanel({
217
231
  ]}
218
232
  >
219
233
  {isRefreshing || isLoading ? (
220
- <ActivityIndicator color="#F4F4F5" size="small" />
234
+ <ActivityIndicator color={themedColor('#F4F4F5')} size="small" />
221
235
  ) : (
222
- <RefreshCw color="#F4F4F5" size={16} strokeWidth={2.4} />
236
+ <RefreshCw color={themedColor('#F4F4F5')} size={16} strokeWidth={2.4} />
223
237
  )}
224
238
  </Pressable>
225
239
  </View>
226
240
  </View>
227
241
 
228
242
  <View style={editorShellStyles.fileSearchWrap}>
229
- <Search color="#A1A1AA" size={16} strokeWidth={2.4} />
243
+ <Search color={themedColor('#A1A1AA')} size={16} strokeWidth={2.4} />
230
244
  <TextInput
231
245
  autoCapitalize="none"
232
246
  autoCorrect={false}
233
247
  clearButtonMode="while-editing"
234
248
  onChangeText={setQuery}
235
249
  placeholder="Search files"
236
- placeholderTextColor="#8E8E93"
250
+ placeholderTextColor={themedColor('#8E8E93')}
237
251
  returnKeyType="search"
238
252
  style={editorShellStyles.fileSearchInput}
239
253
  value={query}
@@ -244,7 +258,7 @@ export function FilesPanel({
244
258
  {uploadStatus ? <Text style={editorShellStyles.fileStatusText}>{uploadStatus}</Text> : null}
245
259
  {fileLoadFailed ? (
246
260
  <View style={editorShellStyles.fileStatusBanner}>
247
- <AlertCircle color="#FBBF24" size={15} strokeWidth={2.4} />
261
+ <AlertCircle color={themedColor('#FBBF24')} size={15} strokeWidth={2.4} />
248
262
  <Text style={editorShellStyles.fileStatusBannerText}>
249
263
  Files API did not return a list. Showing the default sandbox folders.
250
264
  </Text>
@@ -256,12 +270,12 @@ export function FilesPanel({
256
270
 
257
271
  {isLoading ? (
258
272
  <View style={editorShellStyles.loadingPanel}>
259
- <ActivityIndicator color="#FF5A1F" />
273
+ <ActivityIndicator color={themedColor('#FF5A1F')} />
260
274
  <Text style={editorShellStyles.loadingText}>Loading files...</Text>
261
275
  </View>
262
276
  ) : fileCount === 0 && folderCount === 0 && tree.length === 0 ? (
263
277
  <View style={editorShellStyles.emptyPanel}>
264
- <Folder color="#8E8E93" size={22} strokeWidth={2.2} />
278
+ <Folder color={themedColor('#8E8E93')} size={22} strokeWidth={2.2} />
265
279
  <Text style={editorShellStyles.emptyTitle}>No files yet</Text>
266
280
  <Text style={editorShellStyles.emptyBody}>Generated and uploaded sandbox files will appear here.</Text>
267
281
  </View>
@@ -279,7 +293,7 @@ export function FilesPanel({
279
293
  ))
280
294
  ) : (
281
295
  <View style={editorShellStyles.emptyPanel}>
282
- <Search color="#8E8E93" size={22} strokeWidth={2.2} />
296
+ <Search color={themedColor('#8E8E93')} size={22} strokeWidth={2.2} />
283
297
  <Text style={editorShellStyles.emptyTitle}>No matching files</Text>
284
298
  <Text style={editorShellStyles.emptyBody}>Try another folder or file name.</Text>
285
299
  </View>
@@ -350,11 +364,11 @@ function FileTreeNode({
350
364
  ]}
351
365
  >
352
366
  {expanded ? (
353
- <ChevronDown color="#8E8E93" size={16} strokeWidth={2.5} />
367
+ <ChevronDown color={themedColor('#8E8E93')} size={16} strokeWidth={2.5} />
354
368
  ) : (
355
- <ChevronRight color="#8E8E93" size={16} strokeWidth={2.5} />
369
+ <ChevronRight color={themedColor('#8E8E93')} size={16} strokeWidth={2.5} />
356
370
  )}
357
- <Folder color="#F59E0B" size={17} strokeWidth={2.3} />
371
+ <Folder color={themedColor('#F59E0B')} size={17} strokeWidth={2.3} />
358
372
  <Text numberOfLines={1} style={editorShellStyles.fileFolderName}>{node.name}</Text>
359
373
  <Text style={editorShellStyles.fileFolderCount}>{flattenFileTree(node.children ?? []).length}</Text>
360
374
  </Pressable>
@@ -397,7 +411,7 @@ function FileSearchRow({
397
411
  <Text numberOfLines={1} style={editorShellStyles.fileName}>{getFileName(path)}</Text>
398
412
  <Text numberOfLines={1} style={editorShellStyles.filePath}>{getFolderPath(path) || 'root'}</Text>
399
413
  </View>
400
- {isLoading ? <ActivityIndicator color="#F4F4F5" size="small" /> : null}
414
+ {isLoading ? <ActivityIndicator color={themedColor('#F4F4F5')} size="small" /> : null}
401
415
  </Pressable>
402
416
  );
403
417
  }
@@ -425,7 +439,7 @@ function FileTreeRow({
425
439
  >
426
440
  <FileKindIcon path={path} />
427
441
  <Text numberOfLines={1} style={editorShellStyles.fileName}>{getFileName(path)}</Text>
428
- {isLoading ? <ActivityIndicator color="#F4F4F5" size="small" /> : null}
442
+ {isLoading ? <ActivityIndicator color={themedColor('#F4F4F5')} size="small" /> : null}
429
443
  </Pressable>
430
444
  );
431
445
  }
@@ -440,7 +454,7 @@ function FileKindIcon({ path }: { path: string }) {
440
454
  ? FileText
441
455
  : File;
442
456
 
443
- return <Icon color={category === 'image' ? '#67E8F9' : '#A1A1AA'} size={16} strokeWidth={2.3} />;
457
+ return <Icon color={category === 'image' ? themedColor('#67E8F9') : themedColor('#A1A1AA')} size={16} strokeWidth={2.3} />;
444
458
  }
445
459
 
446
460
  function FileEditorModal({
@@ -476,7 +490,7 @@ function FileEditorModal({
476
490
  onPress={onClose}
477
491
  style={({ pressed }) => [editorShellStyles.fileIconButton, pressed && styles.pressed]}
478
492
  >
479
- <X color="#F4F4F5" size={18} strokeWidth={2.5} />
493
+ <X color={themedColor('#F4F4F5')} size={18} strokeWidth={2.5} />
480
494
  </Pressable>
481
495
  <View style={editorShellStyles.fileModalTitleWrap}>
482
496
  <Text numberOfLines={1} style={editorShellStyles.fileModalTitle}>{getFileName(file.path)}</Text>
@@ -495,9 +509,9 @@ function FileEditorModal({
495
509
  ]}
496
510
  >
497
511
  {isSaving ? (
498
- <ActivityIndicator color="#111111" size="small" />
512
+ <ActivityIndicator color={themedColor('#111111')} size="small" />
499
513
  ) : (
500
- <Save color="#111111" size={16} strokeWidth={2.5} />
514
+ <Save color={themedColor('#111111')} size={16} strokeWidth={2.5} />
501
515
  )}
502
516
  <Text style={editorShellStyles.fileSaveText}>Save</Text>
503
517
  </Pressable>
@@ -535,6 +549,20 @@ function FileContentView({
535
549
  path: string;
536
550
  }) {
537
551
  if (category === 'image' && getImageMimeType(path) !== 'image/svg+xml') {
552
+ // Binary images open without content (the text content endpoint can't return
553
+ // them); show a placeholder rather than a broken image. If a binary-safe
554
+ // endpoint later supplies base64/data-URI content, render it.
555
+ if (!content) {
556
+ return (
557
+ <View style={editorShellStyles.fileUnsupportedPreview}>
558
+ <File color={themedColor('#A1A1AA')} size={32} strokeWidth={2.2} />
559
+ <Text style={editorShellStyles.fileUnsupportedTitle}>Image preview</Text>
560
+ <Text style={editorShellStyles.fileUnsupportedBody}>
561
+ This file is available in the sandbox. Open it in the web app to view it — native preview of binary files isn&apos;t enabled in this build yet.
562
+ </Text>
563
+ </View>
564
+ );
565
+ }
538
566
  const source = content.startsWith('data:')
539
567
  ? content
540
568
  : `data:${getImageMimeType(path)};base64,${content}`;
@@ -548,7 +576,7 @@ function FileContentView({
548
576
  if (category === 'pdf') {
549
577
  return (
550
578
  <View style={editorShellStyles.fileUnsupportedPreview}>
551
- <File color="#A1A1AA" size={32} strokeWidth={2.2} />
579
+ <File color={themedColor('#A1A1AA')} size={32} strokeWidth={2.2} />
552
580
  <Text style={editorShellStyles.fileUnsupportedTitle}>PDF preview</Text>
553
581
  <Text style={editorShellStyles.fileUnsupportedBody}>
554
582
  This file is available in the sandbox. Native PDF viewing is not enabled in this build yet.
@@ -1,4 +1,5 @@
1
1
  import React, { useEffect, useState } from 'react';
2
+ import { themedColor } from './theme';
2
3
  import {
3
4
  KeyboardAvoidingView,
4
5
  Modal,
@@ -65,7 +66,7 @@ export function RenameAgentModal({
65
66
  }}
66
67
  onSubmitEditing={save}
67
68
  placeholder="Superagent name"
68
- placeholderTextColor="#8E8E93"
69
+ placeholderTextColor={themedColor('#8E8E93')}
69
70
  returnKeyType="done"
70
71
  selectTextOnFocus
71
72
  style={styles.input}
@@ -1,6 +1,7 @@
1
1
  import { StyleSheet } from 'react-native';
2
+ import { createThemedStyles } from './theme';
2
3
 
3
- export const shareAgentModalStyles = StyleSheet.create({
4
+ export const shareAgentModalStyles = createThemedStyles({
4
5
  agentTitle: { alignItems: 'center', flex: 1, flexDirection: 'row', minWidth: 0 },
5
6
  avatarImage: { height: '100%', width: '100%' },
6
7
  avatarWrap: {
@@ -1,4 +1,5 @@
1
1
  import React, { useEffect, useMemo, useState } from 'react';
2
+ import { themedColor } from './theme';
2
3
  import {
3
4
  ActivityIndicator,
4
5
  Image,
@@ -143,14 +144,14 @@ export function ShareAgentModal({
143
144
  <View style={localStyles.agentTitle}>
144
145
  <AgentSphereIcon agent={agent} size="md" />
145
146
  <View style={localStyles.titleTextWrap}>
146
- <Text numberOfLines={1} style={localStyles.title}>Share chat</Text>
147
+ <Text numberOfLines={1} style={localStyles.title}>Invite collaborator</Text>
147
148
  <Text numberOfLines={1} style={localStyles.subtitle}>
148
149
  {memberCount === 1 ? '1 person has access' : `${memberCount} people have access`}
149
150
  </Text>
150
151
  </View>
151
152
  </View>
152
153
  <Pressable accessibilityLabel="Close share" accessibilityRole="button" onPress={onClose} style={localStyles.closeButton}>
153
- <X color="#F4F4F5" size={20} strokeWidth={2.4} />
154
+ <X color={themedColor('#F4F4F5')} size={20} strokeWidth={2.4} />
154
155
  </Pressable>
155
156
  </View>
156
157
  <View style={localStyles.inputCard}>
@@ -163,7 +164,7 @@ export function ShareAgentModal({
163
164
  multiline
164
165
  onChangeText={setEmailText}
165
166
  placeholder="name@company.com"
166
- placeholderTextColor="#71717A"
167
+ placeholderTextColor={themedColor('#71717A')}
167
168
  style={localStyles.input}
168
169
  value={emailText}
169
170
  />
@@ -180,7 +181,7 @@ export function ShareAgentModal({
180
181
  pressed && sharedStyles.pressed,
181
182
  ]}
182
183
  >
183
- {isInviting ? <ActivityIndicator color="#111111" size="small" /> : <MailPlus color="#111111" size={18} strokeWidth={2.5} />}
184
+ {isInviting ? <ActivityIndicator color={themedColor('#111111')} size="small" /> : <MailPlus color={themedColor('#111111')} size={18} strokeWidth={2.5} />}
184
185
  <Text style={localStyles.inviteButtonText}>Invite</Text>
185
186
  </Pressable>
186
187
  </View>
@@ -208,7 +209,7 @@ export function ShareAgentModal({
208
209
  pressed && sharedStyles.pressed,
209
210
  ]}
210
211
  >
211
- {isInviting ? <ActivityIndicator color="#111111" size="small" /> : <UserPlus color="#111111" size={16} strokeWidth={2.6} />}
212
+ {isInviting ? <ActivityIndicator color={themedColor('#111111')} size="small" /> : <UserPlus color={themedColor('#111111')} size={16} strokeWidth={2.6} />}
212
213
  <Text style={localStyles.guestPrimaryButtonText}>Add as guest</Text>
213
214
  </Pressable>
214
215
  <Pressable
@@ -222,7 +223,7 @@ export function ShareAgentModal({
222
223
  pressed && sharedStyles.pressed,
223
224
  ]}
224
225
  >
225
- <Building2 color="#F4F4F5" size={16} strokeWidth={2.3} />
226
+ <Building2 color={themedColor('#F4F4F5')} size={16} strokeWidth={2.3} />
226
227
  <Text style={localStyles.guestSecondaryButtonText}>Add to workspace</Text>
227
228
  </Pressable>
228
229
  </View>
@@ -230,7 +231,7 @@ export function ShareAgentModal({
230
231
  ) : null}
231
232
  <View style={localStyles.membersHeader}>
232
233
  <Text style={localStyles.membersTitle}>People</Text>
233
- {isLoading ? <ActivityIndicator color="#F4F4F5" size="small" /> : null}
234
+ {isLoading ? <ActivityIndicator color={themedColor('#F4F4F5')} size="small" /> : null}
234
235
  </View>
235
236
  <ScrollView contentContainerStyle={localStyles.membersList} showsVerticalScrollIndicator={false}>
236
237
  {collaborators.map((collaborator) => (
@@ -253,7 +254,7 @@ function CollaboratorRow({collaborator}: {collaborator: SuperagentCollaborator})
253
254
  {collaborator.profile_image_url && !collaborator.is_pending ? (
254
255
  <Image source={{uri: collaborator.profile_image_url}} style={localStyles.avatarImage} />
255
256
  ) : (
256
- <User color="#F4F4F5" size={17} strokeWidth={2.2} />
257
+ <User color={themedColor('#F4F4F5')} size={17} strokeWidth={2.2} />
257
258
  )}
258
259
  </View>
259
260
  <View style={localStyles.memberTextWrap}>
@@ -1,4 +1,10 @@
1
1
  import React, { useCallback, useEffect, useMemo, useState } from 'react';
2
+ import {
3
+ SuperagentThemeContext,
4
+ syncSuperagentColorScheme,
5
+ themedColor,
6
+ type SuperagentColorScheme,
7
+ } from './theme';
2
8
  import {
3
9
  ActivityIndicator,
4
10
  SafeAreaView,
@@ -15,7 +21,23 @@ import type { SuperagentAgent, SuperagentHomeScreenProps, SuperagentRoute } from
15
21
  const DEFAULT_ROUTE: SuperagentRoute = { name: 'home' };
16
22
 
17
23
  export function SuperagentHomeScreen(props: SuperagentHomeScreenProps) {
18
- return <SuperagentHomeScreenContent {...props} />;
24
+ const [scheme, setSchemeState] = useState<SuperagentColorScheme>(props.defaultColorScheme ?? 'light');
25
+ // Sync the module-level scheme during render so themed styles resolve
26
+ // correctly for the whole subtree rendered after this point.
27
+ syncSuperagentColorScheme(scheme);
28
+
29
+ const { onColorSchemeChange } = props;
30
+ const setScheme = useCallback((next: SuperagentColorScheme) => {
31
+ setSchemeState(next);
32
+ onColorSchemeChange?.(next);
33
+ }, [onColorSchemeChange]);
34
+ const themeContextValue = useMemo(() => ({ scheme, setScheme }), [scheme, setScheme]);
35
+
36
+ return (
37
+ <SuperagentThemeContext.Provider value={themeContextValue}>
38
+ <SuperagentHomeScreenContent {...props} />
39
+ </SuperagentThemeContext.Provider>
40
+ );
19
41
  }
20
42
 
21
43
  function SuperagentHomeScreenContent({
@@ -39,6 +61,7 @@ function SuperagentHomeScreenContent({
39
61
  isSendingMessage = false,
40
62
  navigationMode = 'internal',
41
63
  currentUserAvatarUrl,
64
+ currentUserId,
42
65
  currentUserName,
43
66
  fileLoadError,
44
67
  fileLoadFailed,
@@ -177,6 +200,7 @@ function SuperagentHomeScreenContent({
177
200
  connectedConnectors={connectedConnectors}
178
201
  connectingConnectorId={connectingConnectorId}
179
202
  currentUserAvatarUrl={currentUserAvatarUrl}
203
+ currentUserId={currentUserId}
180
204
  fileLoadError={fileLoadError}
181
205
  fileLoadFailed={fileLoadFailed}
182
206
  filePaths={filePaths}
@@ -274,15 +298,11 @@ function SuperagentHomeScreenContent({
274
298
  </View>
275
299
  </View>
276
300
  <ScrollView contentContainerStyle={styles.container}>
277
- <View style={styles.homeIntro}>
278
- <Text style={styles.subtitle}>
279
- {currentUserName ? `Ready when you are, ${currentUserName}.` : 'Agents, tools, and tasks.'}
280
- </Text>
281
- </View>
301
+ <Text style={styles.homeTitle}>Pick up where you left off</Text>
282
302
 
283
303
  {isLoading ? (
284
304
  <View style={styles.loadingPanel}>
285
- <ActivityIndicator color="#FF5A1F" />
305
+ <ActivityIndicator color={themedColor('#FF5A1F')} />
286
306
  </View>
287
307
  ) : latestAgent ? (
288
308
  <AgentCard