@base44/superagent-native 0.0.1

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 (465) hide show
  1. package/README.md +132 -0
  2. package/lib/commonjs/AgentSettingsPanel.js +1067 -0
  3. package/lib/commonjs/AgentSettingsPanel.js.map +1 -0
  4. package/lib/commonjs/AgentSphereIcon.js +243 -0
  5. package/lib/commonjs/AgentSphereIcon.js.map +1 -0
  6. package/lib/commonjs/AttachmentPickerStatusModal.js +96 -0
  7. package/lib/commonjs/AttachmentPickerStatusModal.js.map +1 -0
  8. package/lib/commonjs/AttachmentPreviewStrip.js +49 -0
  9. package/lib/commonjs/AttachmentPreviewStrip.js.map +1 -0
  10. package/lib/commonjs/ChannelsPanel.js +733 -0
  11. package/lib/commonjs/ChannelsPanel.js.map +1 -0
  12. package/lib/commonjs/ConversationChat.js +219 -0
  13. package/lib/commonjs/ConversationChat.js.map +1 -0
  14. package/lib/commonjs/ConversationComposer.js +323 -0
  15. package/lib/commonjs/ConversationComposer.js.map +1 -0
  16. package/lib/commonjs/ConversationMessageList.js +105 -0
  17. package/lib/commonjs/ConversationMessageList.js.map +1 -0
  18. package/lib/commonjs/ConversationScreen.js +241 -0
  19. package/lib/commonjs/ConversationScreen.js.map +1 -0
  20. package/lib/commonjs/EditorDrawer.js +1127 -0
  21. package/lib/commonjs/EditorDrawer.js.map +1 -0
  22. package/lib/commonjs/EditorTabPanel.js +28 -0
  23. package/lib/commonjs/EditorTabPanel.js.map +1 -0
  24. package/lib/commonjs/FilesPanel.js +533 -0
  25. package/lib/commonjs/FilesPanel.js.map +1 -0
  26. package/lib/commonjs/MarkdownText.js +313 -0
  27. package/lib/commonjs/MarkdownText.js.map +1 -0
  28. package/lib/commonjs/MessageActionBar.js +90 -0
  29. package/lib/commonjs/MessageActionBar.js.map +1 -0
  30. package/lib/commonjs/RenameAgentModal.js +99 -0
  31. package/lib/commonjs/RenameAgentModal.js.map +1 -0
  32. package/lib/commonjs/ShareAgentModal.js +349 -0
  33. package/lib/commonjs/ShareAgentModal.js.map +1 -0
  34. package/lib/commonjs/ShareAgentModal.styles.js +236 -0
  35. package/lib/commonjs/ShareAgentModal.styles.js.map +1 -0
  36. package/lib/commonjs/SuperagentHomeScreen.js +316 -0
  37. package/lib/commonjs/SuperagentHomeScreen.js.map +1 -0
  38. package/lib/commonjs/ToolApprovalCard.js +542 -0
  39. package/lib/commonjs/ToolApprovalCard.js.map +1 -0
  40. package/lib/commonjs/ToolCallSummary.js +632 -0
  41. package/lib/commonjs/ToolCallSummary.js.map +1 -0
  42. package/lib/commonjs/agentSphereStyles.js +38 -0
  43. package/lib/commonjs/agentSphereStyles.js.map +1 -0
  44. package/lib/commonjs/apiClient.js +158 -0
  45. package/lib/commonjs/apiClient.js.map +1 -0
  46. package/lib/commonjs/attachmentFileHelpers.js +104 -0
  47. package/lib/commonjs/attachmentFileHelpers.js.map +1 -0
  48. package/lib/commonjs/attachmentUpload.js +87 -0
  49. package/lib/commonjs/attachmentUpload.js.map +1 -0
  50. package/lib/commonjs/composerStyles.js +248 -0
  51. package/lib/commonjs/composerStyles.js.map +1 -0
  52. package/lib/commonjs/connectorBrandIcons.js +82 -0
  53. package/lib/commonjs/connectorBrandIcons.js.map +1 -0
  54. package/lib/commonjs/connectorCatalog.js +377 -0
  55. package/lib/commonjs/connectorCatalog.js.map +1 -0
  56. package/lib/commonjs/constants.js +15 -0
  57. package/lib/commonjs/constants.js.map +1 -0
  58. package/lib/commonjs/conversationParts.js +273 -0
  59. package/lib/commonjs/conversationParts.js.map +1 -0
  60. package/lib/commonjs/conversationRuntime.js +144 -0
  61. package/lib/commonjs/conversationRuntime.js.map +1 -0
  62. package/lib/commonjs/conversationStyles.js +758 -0
  63. package/lib/commonjs/conversationStyles.js.map +1 -0
  64. package/lib/commonjs/editorShellStyles.js +1032 -0
  65. package/lib/commonjs/editorShellStyles.js.map +1 -0
  66. package/lib/commonjs/editorTabs.js +42 -0
  67. package/lib/commonjs/editorTabs.js.map +1 -0
  68. package/lib/commonjs/fileTreeUtils.js +133 -0
  69. package/lib/commonjs/fileTreeUtils.js.map +1 -0
  70. package/lib/commonjs/index.js +110 -0
  71. package/lib/commonjs/index.js.map +1 -0
  72. package/lib/commonjs/markdownStyles.js +157 -0
  73. package/lib/commonjs/markdownStyles.js.map +1 -0
  74. package/lib/commonjs/mediaUtils.js +61 -0
  75. package/lib/commonjs/mediaUtils.js.map +1 -0
  76. package/lib/commonjs/messageActionStyles.js +45 -0
  77. package/lib/commonjs/messageActionStyles.js.map +1 -0
  78. package/lib/commonjs/messageUtils.js +55 -0
  79. package/lib/commonjs/messageUtils.js.map +1 -0
  80. package/lib/commonjs/nativeActionSheet.js +21 -0
  81. package/lib/commonjs/nativeActionSheet.js.map +1 -0
  82. package/lib/commonjs/nativeActionSheet.web.js +10 -0
  83. package/lib/commonjs/nativeActionSheet.web.js.map +1 -0
  84. package/lib/commonjs/package.json +1 -0
  85. package/lib/commonjs/paperTheme.js +59 -0
  86. package/lib/commonjs/paperTheme.js.map +1 -0
  87. package/lib/commonjs/realtimeClient.js +99 -0
  88. package/lib/commonjs/realtimeClient.js.map +1 -0
  89. package/lib/commonjs/renameAgentModalStyles.js +83 -0
  90. package/lib/commonjs/renameAgentModalStyles.js.map +1 -0
  91. package/lib/commonjs/screenParts.js +220 -0
  92. package/lib/commonjs/screenParts.js.map +1 -0
  93. package/lib/commonjs/styles.js +343 -0
  94. package/lib/commonjs/styles.js.map +1 -0
  95. package/lib/commonjs/superagentApiClient.js +613 -0
  96. package/lib/commonjs/superagentApiClient.js.map +1 -0
  97. package/lib/commonjs/types.js +6 -0
  98. package/lib/commonjs/types.js.map +1 -0
  99. package/lib/commonjs/useSuperagentAttachmentPicker.js +80 -0
  100. package/lib/commonjs/useSuperagentAttachmentPicker.js.map +1 -0
  101. package/lib/commonjs/useSuperagentConversation.js +216 -0
  102. package/lib/commonjs/useSuperagentConversation.js.map +1 -0
  103. package/lib/commonjs/useSuperagentRuntime.js +1207 -0
  104. package/lib/commonjs/useSuperagentRuntime.js.map +1 -0
  105. package/lib/module/AgentSettingsPanel.js +1062 -0
  106. package/lib/module/AgentSettingsPanel.js.map +1 -0
  107. package/lib/module/AgentSphereIcon.js +237 -0
  108. package/lib/module/AgentSphereIcon.js.map +1 -0
  109. package/lib/module/AttachmentPickerStatusModal.js +91 -0
  110. package/lib/module/AttachmentPickerStatusModal.js.map +1 -0
  111. package/lib/module/AttachmentPreviewStrip.js +44 -0
  112. package/lib/module/AttachmentPreviewStrip.js.map +1 -0
  113. package/lib/module/ChannelsPanel.js +728 -0
  114. package/lib/module/ChannelsPanel.js.map +1 -0
  115. package/lib/module/ConversationChat.js +214 -0
  116. package/lib/module/ConversationChat.js.map +1 -0
  117. package/lib/module/ConversationComposer.js +318 -0
  118. package/lib/module/ConversationComposer.js.map +1 -0
  119. package/lib/module/ConversationMessageList.js +100 -0
  120. package/lib/module/ConversationMessageList.js.map +1 -0
  121. package/lib/module/ConversationScreen.js +236 -0
  122. package/lib/module/ConversationScreen.js.map +1 -0
  123. package/lib/module/EditorDrawer.js +1122 -0
  124. package/lib/module/EditorDrawer.js.map +1 -0
  125. package/lib/module/EditorTabPanel.js +23 -0
  126. package/lib/module/EditorTabPanel.js.map +1 -0
  127. package/lib/module/FilesPanel.js +528 -0
  128. package/lib/module/FilesPanel.js.map +1 -0
  129. package/lib/module/MarkdownText.js +308 -0
  130. package/lib/module/MarkdownText.js.map +1 -0
  131. package/lib/module/MessageActionBar.js +85 -0
  132. package/lib/module/MessageActionBar.js.map +1 -0
  133. package/lib/module/RenameAgentModal.js +94 -0
  134. package/lib/module/RenameAgentModal.js.map +1 -0
  135. package/lib/module/ShareAgentModal.js +344 -0
  136. package/lib/module/ShareAgentModal.js.map +1 -0
  137. package/lib/module/ShareAgentModal.styles.js +232 -0
  138. package/lib/module/ShareAgentModal.styles.js.map +1 -0
  139. package/lib/module/SuperagentHomeScreen.js +311 -0
  140. package/lib/module/SuperagentHomeScreen.js.map +1 -0
  141. package/lib/module/ToolApprovalCard.js +537 -0
  142. package/lib/module/ToolApprovalCard.js.map +1 -0
  143. package/lib/module/ToolCallSummary.js +627 -0
  144. package/lib/module/ToolCallSummary.js.map +1 -0
  145. package/lib/module/agentSphereStyles.js +34 -0
  146. package/lib/module/agentSphereStyles.js.map +1 -0
  147. package/lib/module/apiClient.js +154 -0
  148. package/lib/module/apiClient.js.map +1 -0
  149. package/lib/module/attachmentFileHelpers.js +97 -0
  150. package/lib/module/attachmentFileHelpers.js.map +1 -0
  151. package/lib/module/attachmentUpload.js +82 -0
  152. package/lib/module/attachmentUpload.js.map +1 -0
  153. package/lib/module/composerStyles.js +244 -0
  154. package/lib/module/composerStyles.js.map +1 -0
  155. package/lib/module/connectorBrandIcons.js +76 -0
  156. package/lib/module/connectorBrandIcons.js.map +1 -0
  157. package/lib/module/connectorCatalog.js +373 -0
  158. package/lib/module/connectorCatalog.js.map +1 -0
  159. package/lib/module/constants.js +10 -0
  160. package/lib/module/constants.js.map +1 -0
  161. package/lib/module/conversationParts.js +266 -0
  162. package/lib/module/conversationParts.js.map +1 -0
  163. package/lib/module/conversationRuntime.js +129 -0
  164. package/lib/module/conversationRuntime.js.map +1 -0
  165. package/lib/module/conversationStyles.js +754 -0
  166. package/lib/module/conversationStyles.js.map +1 -0
  167. package/lib/module/editorShellStyles.js +1028 -0
  168. package/lib/module/editorShellStyles.js.map +1 -0
  169. package/lib/module/editorTabs.js +37 -0
  170. package/lib/module/editorTabs.js.map +1 -0
  171. package/lib/module/fileTreeUtils.js +120 -0
  172. package/lib/module/fileTreeUtils.js.map +1 -0
  173. package/lib/module/index.js +17 -0
  174. package/lib/module/index.js.map +1 -0
  175. package/lib/module/markdownStyles.js +153 -0
  176. package/lib/module/markdownStyles.js.map +1 -0
  177. package/lib/module/mediaUtils.js +53 -0
  178. package/lib/module/mediaUtils.js.map +1 -0
  179. package/lib/module/messageActionStyles.js +41 -0
  180. package/lib/module/messageActionStyles.js.map +1 -0
  181. package/lib/module/messageUtils.js +46 -0
  182. package/lib/module/messageUtils.js.map +1 -0
  183. package/lib/module/nativeActionSheet.js +17 -0
  184. package/lib/module/nativeActionSheet.js.map +1 -0
  185. package/lib/module/nativeActionSheet.web.js +6 -0
  186. package/lib/module/nativeActionSheet.web.js.map +1 -0
  187. package/lib/module/package.json +1 -0
  188. package/lib/module/paperTheme.js +55 -0
  189. package/lib/module/paperTheme.js.map +1 -0
  190. package/lib/module/realtimeClient.js +95 -0
  191. package/lib/module/realtimeClient.js.map +1 -0
  192. package/lib/module/renameAgentModalStyles.js +79 -0
  193. package/lib/module/renameAgentModalStyles.js.map +1 -0
  194. package/lib/module/screenParts.js +210 -0
  195. package/lib/module/screenParts.js.map +1 -0
  196. package/lib/module/styles.js +339 -0
  197. package/lib/module/styles.js.map +1 -0
  198. package/lib/module/superagentApiClient.js +609 -0
  199. package/lib/module/superagentApiClient.js.map +1 -0
  200. package/lib/module/types.js +4 -0
  201. package/lib/module/types.js.map +1 -0
  202. package/lib/module/useSuperagentAttachmentPicker.js +75 -0
  203. package/lib/module/useSuperagentAttachmentPicker.js.map +1 -0
  204. package/lib/module/useSuperagentConversation.js +212 -0
  205. package/lib/module/useSuperagentConversation.js.map +1 -0
  206. package/lib/module/useSuperagentRuntime.js +1203 -0
  207. package/lib/module/useSuperagentRuntime.js.map +1 -0
  208. package/lib/typescript/commonjs/AgentSettingsPanel.d.ts +19 -0
  209. package/lib/typescript/commonjs/AgentSettingsPanel.d.ts.map +1 -0
  210. package/lib/typescript/commonjs/AgentSphereIcon.d.ts +15 -0
  211. package/lib/typescript/commonjs/AgentSphereIcon.d.ts.map +1 -0
  212. package/lib/typescript/commonjs/AttachmentPickerStatusModal.d.ts +8 -0
  213. package/lib/typescript/commonjs/AttachmentPickerStatusModal.d.ts.map +1 -0
  214. package/lib/typescript/commonjs/AttachmentPreviewStrip.d.ts +7 -0
  215. package/lib/typescript/commonjs/AttachmentPreviewStrip.d.ts.map +1 -0
  216. package/lib/typescript/commonjs/ChannelsPanel.d.ts +21 -0
  217. package/lib/typescript/commonjs/ChannelsPanel.d.ts.map +1 -0
  218. package/lib/typescript/commonjs/ConversationChat.d.ts +22 -0
  219. package/lib/typescript/commonjs/ConversationChat.d.ts.map +1 -0
  220. package/lib/typescript/commonjs/ConversationComposer.d.ts +24 -0
  221. package/lib/typescript/commonjs/ConversationComposer.d.ts.map +1 -0
  222. package/lib/typescript/commonjs/ConversationMessageList.d.ts +17 -0
  223. package/lib/typescript/commonjs/ConversationMessageList.d.ts.map +1 -0
  224. package/lib/typescript/commonjs/ConversationScreen.d.ts +80 -0
  225. package/lib/typescript/commonjs/ConversationScreen.d.ts.map +1 -0
  226. package/lib/typescript/commonjs/EditorDrawer.d.ts +67 -0
  227. package/lib/typescript/commonjs/EditorDrawer.d.ts.map +1 -0
  228. package/lib/typescript/commonjs/EditorTabPanel.d.ts +6 -0
  229. package/lib/typescript/commonjs/EditorTabPanel.d.ts.map +1 -0
  230. package/lib/typescript/commonjs/FilesPanel.d.ts +14 -0
  231. package/lib/typescript/commonjs/FilesPanel.d.ts.map +1 -0
  232. package/lib/typescript/commonjs/MarkdownText.d.ts +10 -0
  233. package/lib/typescript/commonjs/MarkdownText.d.ts.map +1 -0
  234. package/lib/typescript/commonjs/MessageActionBar.d.ts +8 -0
  235. package/lib/typescript/commonjs/MessageActionBar.d.ts.map +1 -0
  236. package/lib/typescript/commonjs/RenameAgentModal.d.ts +10 -0
  237. package/lib/typescript/commonjs/RenameAgentModal.d.ts.map +1 -0
  238. package/lib/typescript/commonjs/ShareAgentModal.d.ts +15 -0
  239. package/lib/typescript/commonjs/ShareAgentModal.d.ts.map +1 -0
  240. package/lib/typescript/commonjs/ShareAgentModal.styles.d.ts +229 -0
  241. package/lib/typescript/commonjs/ShareAgentModal.styles.d.ts.map +1 -0
  242. package/lib/typescript/commonjs/SuperagentHomeScreen.d.ts +4 -0
  243. package/lib/typescript/commonjs/SuperagentHomeScreen.d.ts.map +1 -0
  244. package/lib/typescript/commonjs/ToolApprovalCard.d.ts +13 -0
  245. package/lib/typescript/commonjs/ToolApprovalCard.d.ts.map +1 -0
  246. package/lib/typescript/commonjs/ToolCallSummary.d.ts +16 -0
  247. package/lib/typescript/commonjs/ToolCallSummary.d.ts.map +1 -0
  248. package/lib/typescript/commonjs/agentSphereStyles.d.ts +31 -0
  249. package/lib/typescript/commonjs/agentSphereStyles.d.ts.map +1 -0
  250. package/lib/typescript/commonjs/apiClient.d.ts +4 -0
  251. package/lib/typescript/commonjs/apiClient.d.ts.map +1 -0
  252. package/lib/typescript/commonjs/attachmentFileHelpers.d.ts +6 -0
  253. package/lib/typescript/commonjs/attachmentFileHelpers.d.ts.map +1 -0
  254. package/lib/typescript/commonjs/attachmentUpload.d.ts +12 -0
  255. package/lib/typescript/commonjs/attachmentUpload.d.ts.map +1 -0
  256. package/lib/typescript/commonjs/composerStyles.d.ts +241 -0
  257. package/lib/typescript/commonjs/composerStyles.d.ts.map +1 -0
  258. package/lib/typescript/commonjs/connectorBrandIcons.d.ts +7 -0
  259. package/lib/typescript/commonjs/connectorBrandIcons.d.ts.map +1 -0
  260. package/lib/typescript/commonjs/connectorCatalog.d.ts +3 -0
  261. package/lib/typescript/commonjs/connectorCatalog.d.ts.map +1 -0
  262. package/lib/typescript/commonjs/constants.d.ts +4 -0
  263. package/lib/typescript/commonjs/constants.d.ts.map +1 -0
  264. package/lib/typescript/commonjs/conversationParts.d.ts +29 -0
  265. package/lib/typescript/commonjs/conversationParts.d.ts.map +1 -0
  266. package/lib/typescript/commonjs/conversationRuntime.d.ts +67 -0
  267. package/lib/typescript/commonjs/conversationRuntime.d.ts.map +1 -0
  268. package/lib/typescript/commonjs/conversationStyles.d.ts +742 -0
  269. package/lib/typescript/commonjs/conversationStyles.d.ts.map +1 -0
  270. package/lib/typescript/commonjs/editorShellStyles.d.ts +1025 -0
  271. package/lib/typescript/commonjs/editorShellStyles.d.ts.map +1 -0
  272. package/lib/typescript/commonjs/editorTabs.d.ts +11 -0
  273. package/lib/typescript/commonjs/editorTabs.d.ts.map +1 -0
  274. package/lib/typescript/commonjs/fileTreeUtils.d.ts +17 -0
  275. package/lib/typescript/commonjs/fileTreeUtils.d.ts.map +1 -0
  276. package/lib/typescript/commonjs/index.d.ts +20 -0
  277. package/lib/typescript/commonjs/index.d.ts.map +1 -0
  278. package/lib/typescript/commonjs/markdownStyles.d.ts +150 -0
  279. package/lib/typescript/commonjs/markdownStyles.d.ts.map +1 -0
  280. package/lib/typescript/commonjs/mediaUtils.d.ts +9 -0
  281. package/lib/typescript/commonjs/mediaUtils.d.ts.map +1 -0
  282. package/lib/typescript/commonjs/messageActionStyles.d.ts +38 -0
  283. package/lib/typescript/commonjs/messageActionStyles.d.ts.map +1 -0
  284. package/lib/typescript/commonjs/messageUtils.d.ts +8 -0
  285. package/lib/typescript/commonjs/messageUtils.d.ts.map +1 -0
  286. package/lib/typescript/commonjs/nativeActionSheet.d.ts +6 -0
  287. package/lib/typescript/commonjs/nativeActionSheet.d.ts.map +1 -0
  288. package/lib/typescript/commonjs/nativeActionSheet.web.d.ts +3 -0
  289. package/lib/typescript/commonjs/nativeActionSheet.web.d.ts.map +1 -0
  290. package/lib/typescript/commonjs/package.json +1 -0
  291. package/lib/typescript/commonjs/paperTheme.d.ts +3 -0
  292. package/lib/typescript/commonjs/paperTheme.d.ts.map +1 -0
  293. package/lib/typescript/commonjs/realtimeClient.d.ts +16 -0
  294. package/lib/typescript/commonjs/realtimeClient.d.ts.map +1 -0
  295. package/lib/typescript/commonjs/renameAgentModalStyles.d.ts +76 -0
  296. package/lib/typescript/commonjs/renameAgentModalStyles.d.ts.map +1 -0
  297. package/lib/typescript/commonjs/screenParts.d.ts +31 -0
  298. package/lib/typescript/commonjs/screenParts.d.ts.map +1 -0
  299. package/lib/typescript/commonjs/styles.d.ts +336 -0
  300. package/lib/typescript/commonjs/styles.d.ts.map +1 -0
  301. package/lib/typescript/commonjs/superagentApiClient.d.ts +66 -0
  302. package/lib/typescript/commonjs/superagentApiClient.d.ts.map +1 -0
  303. package/lib/typescript/commonjs/types.d.ts +437 -0
  304. package/lib/typescript/commonjs/types.d.ts.map +1 -0
  305. package/lib/typescript/commonjs/useSuperagentAttachmentPicker.d.ts +30 -0
  306. package/lib/typescript/commonjs/useSuperagentAttachmentPicker.d.ts.map +1 -0
  307. package/lib/typescript/commonjs/useSuperagentConversation.d.ts +36 -0
  308. package/lib/typescript/commonjs/useSuperagentConversation.d.ts.map +1 -0
  309. package/lib/typescript/commonjs/useSuperagentRuntime.d.ts +163 -0
  310. package/lib/typescript/commonjs/useSuperagentRuntime.d.ts.map +1 -0
  311. package/lib/typescript/module/AgentSettingsPanel.d.ts +19 -0
  312. package/lib/typescript/module/AgentSettingsPanel.d.ts.map +1 -0
  313. package/lib/typescript/module/AgentSphereIcon.d.ts +15 -0
  314. package/lib/typescript/module/AgentSphereIcon.d.ts.map +1 -0
  315. package/lib/typescript/module/AttachmentPickerStatusModal.d.ts +8 -0
  316. package/lib/typescript/module/AttachmentPickerStatusModal.d.ts.map +1 -0
  317. package/lib/typescript/module/AttachmentPreviewStrip.d.ts +7 -0
  318. package/lib/typescript/module/AttachmentPreviewStrip.d.ts.map +1 -0
  319. package/lib/typescript/module/ChannelsPanel.d.ts +21 -0
  320. package/lib/typescript/module/ChannelsPanel.d.ts.map +1 -0
  321. package/lib/typescript/module/ConversationChat.d.ts +22 -0
  322. package/lib/typescript/module/ConversationChat.d.ts.map +1 -0
  323. package/lib/typescript/module/ConversationComposer.d.ts +24 -0
  324. package/lib/typescript/module/ConversationComposer.d.ts.map +1 -0
  325. package/lib/typescript/module/ConversationMessageList.d.ts +17 -0
  326. package/lib/typescript/module/ConversationMessageList.d.ts.map +1 -0
  327. package/lib/typescript/module/ConversationScreen.d.ts +80 -0
  328. package/lib/typescript/module/ConversationScreen.d.ts.map +1 -0
  329. package/lib/typescript/module/EditorDrawer.d.ts +67 -0
  330. package/lib/typescript/module/EditorDrawer.d.ts.map +1 -0
  331. package/lib/typescript/module/EditorTabPanel.d.ts +6 -0
  332. package/lib/typescript/module/EditorTabPanel.d.ts.map +1 -0
  333. package/lib/typescript/module/FilesPanel.d.ts +14 -0
  334. package/lib/typescript/module/FilesPanel.d.ts.map +1 -0
  335. package/lib/typescript/module/MarkdownText.d.ts +10 -0
  336. package/lib/typescript/module/MarkdownText.d.ts.map +1 -0
  337. package/lib/typescript/module/MessageActionBar.d.ts +8 -0
  338. package/lib/typescript/module/MessageActionBar.d.ts.map +1 -0
  339. package/lib/typescript/module/RenameAgentModal.d.ts +10 -0
  340. package/lib/typescript/module/RenameAgentModal.d.ts.map +1 -0
  341. package/lib/typescript/module/ShareAgentModal.d.ts +15 -0
  342. package/lib/typescript/module/ShareAgentModal.d.ts.map +1 -0
  343. package/lib/typescript/module/ShareAgentModal.styles.d.ts +229 -0
  344. package/lib/typescript/module/ShareAgentModal.styles.d.ts.map +1 -0
  345. package/lib/typescript/module/SuperagentHomeScreen.d.ts +4 -0
  346. package/lib/typescript/module/SuperagentHomeScreen.d.ts.map +1 -0
  347. package/lib/typescript/module/ToolApprovalCard.d.ts +13 -0
  348. package/lib/typescript/module/ToolApprovalCard.d.ts.map +1 -0
  349. package/lib/typescript/module/ToolCallSummary.d.ts +16 -0
  350. package/lib/typescript/module/ToolCallSummary.d.ts.map +1 -0
  351. package/lib/typescript/module/agentSphereStyles.d.ts +31 -0
  352. package/lib/typescript/module/agentSphereStyles.d.ts.map +1 -0
  353. package/lib/typescript/module/apiClient.d.ts +4 -0
  354. package/lib/typescript/module/apiClient.d.ts.map +1 -0
  355. package/lib/typescript/module/attachmentFileHelpers.d.ts +6 -0
  356. package/lib/typescript/module/attachmentFileHelpers.d.ts.map +1 -0
  357. package/lib/typescript/module/attachmentUpload.d.ts +12 -0
  358. package/lib/typescript/module/attachmentUpload.d.ts.map +1 -0
  359. package/lib/typescript/module/composerStyles.d.ts +241 -0
  360. package/lib/typescript/module/composerStyles.d.ts.map +1 -0
  361. package/lib/typescript/module/connectorBrandIcons.d.ts +7 -0
  362. package/lib/typescript/module/connectorBrandIcons.d.ts.map +1 -0
  363. package/lib/typescript/module/connectorCatalog.d.ts +3 -0
  364. package/lib/typescript/module/connectorCatalog.d.ts.map +1 -0
  365. package/lib/typescript/module/constants.d.ts +4 -0
  366. package/lib/typescript/module/constants.d.ts.map +1 -0
  367. package/lib/typescript/module/conversationParts.d.ts +29 -0
  368. package/lib/typescript/module/conversationParts.d.ts.map +1 -0
  369. package/lib/typescript/module/conversationRuntime.d.ts +67 -0
  370. package/lib/typescript/module/conversationRuntime.d.ts.map +1 -0
  371. package/lib/typescript/module/conversationStyles.d.ts +742 -0
  372. package/lib/typescript/module/conversationStyles.d.ts.map +1 -0
  373. package/lib/typescript/module/editorShellStyles.d.ts +1025 -0
  374. package/lib/typescript/module/editorShellStyles.d.ts.map +1 -0
  375. package/lib/typescript/module/editorTabs.d.ts +11 -0
  376. package/lib/typescript/module/editorTabs.d.ts.map +1 -0
  377. package/lib/typescript/module/fileTreeUtils.d.ts +17 -0
  378. package/lib/typescript/module/fileTreeUtils.d.ts.map +1 -0
  379. package/lib/typescript/module/index.d.ts +20 -0
  380. package/lib/typescript/module/index.d.ts.map +1 -0
  381. package/lib/typescript/module/markdownStyles.d.ts +150 -0
  382. package/lib/typescript/module/markdownStyles.d.ts.map +1 -0
  383. package/lib/typescript/module/mediaUtils.d.ts +9 -0
  384. package/lib/typescript/module/mediaUtils.d.ts.map +1 -0
  385. package/lib/typescript/module/messageActionStyles.d.ts +38 -0
  386. package/lib/typescript/module/messageActionStyles.d.ts.map +1 -0
  387. package/lib/typescript/module/messageUtils.d.ts +8 -0
  388. package/lib/typescript/module/messageUtils.d.ts.map +1 -0
  389. package/lib/typescript/module/nativeActionSheet.d.ts +6 -0
  390. package/lib/typescript/module/nativeActionSheet.d.ts.map +1 -0
  391. package/lib/typescript/module/nativeActionSheet.web.d.ts +3 -0
  392. package/lib/typescript/module/nativeActionSheet.web.d.ts.map +1 -0
  393. package/lib/typescript/module/package.json +1 -0
  394. package/lib/typescript/module/paperTheme.d.ts +3 -0
  395. package/lib/typescript/module/paperTheme.d.ts.map +1 -0
  396. package/lib/typescript/module/realtimeClient.d.ts +16 -0
  397. package/lib/typescript/module/realtimeClient.d.ts.map +1 -0
  398. package/lib/typescript/module/renameAgentModalStyles.d.ts +76 -0
  399. package/lib/typescript/module/renameAgentModalStyles.d.ts.map +1 -0
  400. package/lib/typescript/module/screenParts.d.ts +31 -0
  401. package/lib/typescript/module/screenParts.d.ts.map +1 -0
  402. package/lib/typescript/module/styles.d.ts +336 -0
  403. package/lib/typescript/module/styles.d.ts.map +1 -0
  404. package/lib/typescript/module/superagentApiClient.d.ts +66 -0
  405. package/lib/typescript/module/superagentApiClient.d.ts.map +1 -0
  406. package/lib/typescript/module/types.d.ts +437 -0
  407. package/lib/typescript/module/types.d.ts.map +1 -0
  408. package/lib/typescript/module/useSuperagentAttachmentPicker.d.ts +30 -0
  409. package/lib/typescript/module/useSuperagentAttachmentPicker.d.ts.map +1 -0
  410. package/lib/typescript/module/useSuperagentConversation.d.ts +36 -0
  411. package/lib/typescript/module/useSuperagentConversation.d.ts.map +1 -0
  412. package/lib/typescript/module/useSuperagentRuntime.d.ts +163 -0
  413. package/lib/typescript/module/useSuperagentRuntime.d.ts.map +1 -0
  414. package/package.json +87 -0
  415. package/src/AgentSettingsPanel.tsx +1122 -0
  416. package/src/AgentSphereIcon.tsx +170 -0
  417. package/src/AttachmentPickerStatusModal.tsx +80 -0
  418. package/src/AttachmentPreviewStrip.tsx +38 -0
  419. package/src/ChannelsPanel.tsx +705 -0
  420. package/src/ConversationChat.tsx +245 -0
  421. package/src/ConversationComposer.tsx +368 -0
  422. package/src/ConversationMessageList.tsx +140 -0
  423. package/src/ConversationScreen.tsx +320 -0
  424. package/src/EditorDrawer.tsx +1297 -0
  425. package/src/EditorTabPanel.tsx +19 -0
  426. package/src/FilesPanel.tsx +577 -0
  427. package/src/MarkdownText.tsx +317 -0
  428. package/src/MessageActionBar.tsx +126 -0
  429. package/src/RenameAgentModal.tsx +107 -0
  430. package/src/ShareAgentModal.styles.ts +95 -0
  431. package/src/ShareAgentModal.tsx +320 -0
  432. package/src/SuperagentHomeScreen.tsx +318 -0
  433. package/src/ToolApprovalCard.tsx +592 -0
  434. package/src/ToolCallSummary.tsx +599 -0
  435. package/src/agentSphereStyles.ts +25 -0
  436. package/src/apiClient.ts +189 -0
  437. package/src/attachmentFileHelpers.ts +109 -0
  438. package/src/attachmentUpload.ts +112 -0
  439. package/src/composerStyles.ts +167 -0
  440. package/src/connectorBrandIcons.tsx +69 -0
  441. package/src/connectorCatalog.ts +414 -0
  442. package/src/constants.ts +9 -0
  443. package/src/conversationParts.tsx +307 -0
  444. package/src/conversationRuntime.ts +171 -0
  445. package/src/conversationStyles.ts +412 -0
  446. package/src/editorShellStyles.ts +1023 -0
  447. package/src/editorTabs.ts +26 -0
  448. package/src/fileTreeUtils.ts +165 -0
  449. package/src/index.ts +110 -0
  450. package/src/markdownStyles.ts +64 -0
  451. package/src/mediaUtils.ts +75 -0
  452. package/src/messageActionStyles.ts +26 -0
  453. package/src/messageUtils.ts +58 -0
  454. package/src/nativeActionSheet.ts +25 -0
  455. package/src/nativeActionSheet.web.ts +5 -0
  456. package/src/paperTheme.ts +52 -0
  457. package/src/realtimeClient.ts +149 -0
  458. package/src/renameAgentModalStyles.ts +77 -0
  459. package/src/screenParts.tsx +185 -0
  460. package/src/styles.ts +190 -0
  461. package/src/superagentApiClient.ts +895 -0
  462. package/src/types.ts +514 -0
  463. package/src/useSuperagentAttachmentPicker.tsx +117 -0
  464. package/src/useSuperagentConversation.ts +242 -0
  465. package/src/useSuperagentRuntime.ts +1371 -0
@@ -0,0 +1,632 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ToolCallSummary = ToolCallSummary;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNative = require("react-native");
9
+ var _lucideReactNative = require("lucide-react-native");
10
+ var _conversationStyles = require("./conversationStyles.js");
11
+ var _ToolApprovalCard = require("./ToolApprovalCard.js");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
14
+ const HIDDEN_TOOLS = new Set(['browserbase_get_session', 'browserbase_stop_session', 'browserbase_get_live_urls', 'browserbase_reset_context', 'browserbase_navigate', 'browserbase_click', 'browserbase_type', 'browserbase_get_content', 'write_file', 'edit_file', 'read_file']);
15
+ const FRIENDLY_TOOL_LABELS = {
16
+ anchor_replace: {
17
+ active: 'Editing code...',
18
+ completed: 'Edited code'
19
+ },
20
+ bash: {
21
+ active: 'Running commands...',
22
+ completed: 'Ran commands'
23
+ },
24
+ browserbase_screenshot: {
25
+ active: 'Taking screenshots...',
26
+ completed: 'Took screenshots'
27
+ },
28
+ call_backend_function: {
29
+ active: 'Calling backend...',
30
+ completed: 'Called backend'
31
+ },
32
+ create_automation: {
33
+ active: 'Creating automation...',
34
+ completed: 'Created automation'
35
+ },
36
+ create_scheduled_task: {
37
+ active: 'Creating task...',
38
+ completed: 'Created task'
39
+ },
40
+ delete_entities: {
41
+ active: 'Deleting data...',
42
+ completed: 'Deleted data'
43
+ },
44
+ delete_file: {
45
+ active: 'Deleting files...',
46
+ completed: 'Deleted files'
47
+ },
48
+ deploy_backend_functions: {
49
+ active: 'Deploying backend...',
50
+ completed: 'Deployed backend'
51
+ },
52
+ fetch_website: {
53
+ active: 'Reading websites...',
54
+ completed: 'Read websites'
55
+ },
56
+ find_replace: {
57
+ active: 'Editing code...',
58
+ completed: 'Edited code'
59
+ },
60
+ get_connectors_info: {
61
+ active: 'Checking connectors...',
62
+ completed: 'Checked connectors'
63
+ },
64
+ get_runtime_logs: {
65
+ active: 'Reading logs...',
66
+ completed: 'Read logs'
67
+ },
68
+ grep: {
69
+ active: 'Searching files...',
70
+ completed: 'Searched files'
71
+ },
72
+ install_npm_package: {
73
+ active: 'Installing packages...',
74
+ completed: 'Installed packages'
75
+ },
76
+ list_automations: {
77
+ active: 'Listing automations...',
78
+ completed: 'Listed automations'
79
+ },
80
+ list_files: {
81
+ active: 'Browsing files...',
82
+ completed: 'Browsed files'
83
+ },
84
+ list_scheduled_tasks: {
85
+ active: 'Listing tasks...',
86
+ completed: 'Listed tasks'
87
+ },
88
+ manage_app: {
89
+ active: 'Publishing pages...',
90
+ completed: 'Published pages'
91
+ },
92
+ request_oauth_authorization: {
93
+ active: 'Requesting connector access...',
94
+ completed: 'Requested connector access'
95
+ },
96
+ request_secrets: {
97
+ active: 'Requesting secrets...',
98
+ completed: 'Requested secrets'
99
+ },
100
+ run_skill: {
101
+ active: 'Running a skill...',
102
+ completed: 'Ran a skill'
103
+ },
104
+ search_base44_docs: {
105
+ active: 'Checking docs...',
106
+ completed: 'Checked docs'
107
+ },
108
+ search_web: {
109
+ active: 'Searching the web...',
110
+ completed: 'Searched the web'
111
+ },
112
+ send_message_to_user: {
113
+ active: 'Sending message...',
114
+ completed: 'Sent message'
115
+ },
116
+ set_app_user_connector: {
117
+ active: 'Requesting connector credentials...',
118
+ completed: 'Requested connector credentials'
119
+ },
120
+ set_secrets: {
121
+ active: 'Setting a secret...',
122
+ completed: 'Set a secret'
123
+ },
124
+ setup_slack_connection: {
125
+ active: 'Connecting Slack...',
126
+ completed: 'Connected Slack'
127
+ },
128
+ setup_telegram_connection: {
129
+ active: 'Connecting Telegram...',
130
+ completed: 'Connected Telegram'
131
+ },
132
+ suggest_payments_installation: {
133
+ active: 'Setting up payments...',
134
+ completed: 'Requested payment setup'
135
+ },
136
+ suggest_stripe_installation: {
137
+ active: 'Setting up Stripe...',
138
+ completed: 'Requested Stripe setup'
139
+ },
140
+ str_replace_based_edit_tool: {
141
+ active: 'Editing code...',
142
+ completed: 'Edited code'
143
+ },
144
+ test_backend_function: {
145
+ active: 'Testing backend...',
146
+ completed: 'Tested backend'
147
+ },
148
+ toggle_scheduled_task: {
149
+ active: 'Toggling task...',
150
+ completed: 'Toggled task'
151
+ },
152
+ update_entities: {
153
+ active: 'Updating data...',
154
+ completed: 'Updated data'
155
+ },
156
+ update_identity: {
157
+ active: 'Updating memory...',
158
+ completed: 'Updated memory'
159
+ },
160
+ update_scheduled_task: {
161
+ active: 'Updating task...',
162
+ completed: 'Updated task'
163
+ },
164
+ web_search: {
165
+ active: 'Searching the web...',
166
+ completed: 'Searched the web'
167
+ }
168
+ };
169
+ function ToolCallSummary({
170
+ agent,
171
+ availableConnectors,
172
+ conversationId,
173
+ isLastAssistantMessage,
174
+ message,
175
+ onConnectConnector,
176
+ submitToolCallInput,
177
+ toolCalls,
178
+ toolRenderers
179
+ }) {
180
+ const chunks = (0, _react.useMemo)(() => createToolChunks(toolCalls, toolRenderers), [toolCalls, toolRenderers]);
181
+ if (chunks.length === 0) return null;
182
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
183
+ style: _conversationStyles.conversationStyles.toolCallWrap,
184
+ children: chunks.map(chunk => {
185
+ if (chunk.type === 'timeline') {
186
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(DefaultToolTimeline, {
187
+ agent: agent,
188
+ availableConnectors: availableConnectors,
189
+ isLastAssistantMessage: isLastAssistantMessage,
190
+ onConnectConnector: onConnectConnector,
191
+ submitToolCallInput: submitToolCallInput,
192
+ toolCalls: chunk.toolCalls
193
+ }, chunk.key);
194
+ }
195
+ const Renderer = chunk.Renderer;
196
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
197
+ style: _conversationStyles.conversationStyles.toolCallSlot,
198
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
199
+ style: _conversationStyles.conversationStyles.customToolWidget,
200
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Renderer, {
201
+ agent: agent,
202
+ conversationId: conversationId,
203
+ message: message,
204
+ submitToolCallInput: submitToolCallInput,
205
+ toolCall: chunk.toolCall
206
+ })
207
+ })
208
+ }, chunk.key);
209
+ })
210
+ });
211
+ }
212
+ function DefaultToolTimeline({
213
+ agent,
214
+ availableConnectors,
215
+ isLastAssistantMessage,
216
+ onConnectConnector,
217
+ submitToolCallInput,
218
+ toolCalls
219
+ }) {
220
+ const visibleToolCalls = (0, _react.useMemo)(() => toolCalls.flatMap(flattenToolCall).filter(toolCall => !HIDDEN_TOOLS.has(toolCall.name || '')), [toolCalls]);
221
+ const hasWaitingTool = visibleToolCalls.some(isApprovalRequest);
222
+ const isRunning = visibleToolCalls.some(isRunningStatus);
223
+ const [expanded, setExpanded] = (0, _react.useState)(hasWaitingTool);
224
+ const [openRows, setOpenRows] = (0, _react.useState)({});
225
+ (0, _react.useEffect)(() => {
226
+ if (hasWaitingTool) setExpanded(true);
227
+ }, [hasWaitingTool]);
228
+ if (visibleToolCalls.length === 0) return null;
229
+ const label = getCollapsedLabel(visibleToolCalls, isRunning);
230
+ if (isRunning) {
231
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
232
+ style: _conversationStyles.conversationStyles.toolCallSlot,
233
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(RunningToolIndicator, {
234
+ label: label
235
+ })
236
+ });
237
+ }
238
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
239
+ style: _conversationStyles.conversationStyles.toolCallSlot,
240
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
241
+ accessibilityRole: "button",
242
+ onPress: () => setExpanded(current => !current),
243
+ style: _conversationStyles.conversationStyles.toolTimelineHeader,
244
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
245
+ style: _conversationStyles.conversationStyles.toolTimelineHeaderText,
246
+ children: label
247
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.ChevronRight, {
248
+ color: "#8E8E93",
249
+ size: 15,
250
+ strokeWidth: 2.3,
251
+ style: expanded ? _conversationStyles.conversationStyles.toolTimelineChevronOpen : _conversationStyles.conversationStyles.toolTimelineChevron
252
+ })]
253
+ }), expanded ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
254
+ style: _conversationStyles.conversationStyles.toolTimelineRows,
255
+ children: [visibleToolCalls.map((toolCall, index) => {
256
+ const rowKey = getToolCallKey(toolCall, index);
257
+ const isOpen = Boolean(openRows[rowKey]);
258
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(ToolTimelineRow, {
259
+ agent: agent,
260
+ availableConnectors: availableConnectors,
261
+ isLastAssistantMessage: isLastAssistantMessage,
262
+ isLast: index === visibleToolCalls.length - 1,
263
+ isOpen: isOpen,
264
+ onToggle: () => setOpenRows(current => ({
265
+ ...current,
266
+ [rowKey]: !current[rowKey]
267
+ })),
268
+ onConnectConnector: onConnectConnector,
269
+ submitToolCallInput: submitToolCallInput,
270
+ toolCall: toolCall
271
+ }, rowKey);
272
+ }), !hasWaitingTool ? /*#__PURE__*/(0, _jsxRuntime.jsx)(DoneRow, {}) : null]
273
+ }) : null]
274
+ });
275
+ }
276
+ function ToolTimelineRow({
277
+ agent,
278
+ availableConnectors,
279
+ isLastAssistantMessage,
280
+ isLast,
281
+ isOpen,
282
+ onConnectConnector,
283
+ onToggle,
284
+ submitToolCallInput,
285
+ toolCall
286
+ }) {
287
+ const preview = getToolPreview(toolCall);
288
+ const detail = getToolDetail(toolCall);
289
+ const showsApproval = isApprovalRequest(toolCall);
290
+ const canOpen = Boolean(detail) && !showsApproval;
291
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
292
+ style: _conversationStyles.conversationStyles.toolTimelineItem,
293
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
294
+ style: _conversationStyles.conversationStyles.toolTimelineRow,
295
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
296
+ style: _conversationStyles.conversationStyles.toolTimelineIconCol,
297
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(ToolStatusIcon, {
298
+ status: toolCall.status
299
+ }), !isLast ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
300
+ style: _conversationStyles.conversationStyles.toolTimelineLine
301
+ }) : null]
302
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
303
+ style: _conversationStyles.conversationStyles.toolTimelineMeta,
304
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
305
+ accessibilityRole: canOpen ? 'button' : undefined,
306
+ disabled: !canOpen,
307
+ onPress: onToggle,
308
+ style: _conversationStyles.conversationStyles.toolTimelineRowHeader,
309
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.ChevronRight, {
310
+ color: "#A1A1AA",
311
+ size: 15,
312
+ strokeWidth: 2.3,
313
+ style: isOpen ? _conversationStyles.conversationStyles.toolTimelineChevronOpen : _conversationStyles.conversationStyles.toolTimelineChevron
314
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
315
+ style: _conversationStyles.conversationStyles.toolTimelineTitle,
316
+ numberOfLines: 1,
317
+ children: getToolTitle(toolCall)
318
+ }), preview ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
319
+ style: _conversationStyles.conversationStyles.toolTimelineInline,
320
+ numberOfLines: 1,
321
+ children: preview
322
+ }) : null]
323
+ }), shouldShowStatusLine(toolCall, preview) ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
324
+ style: _conversationStyles.conversationStyles.toolTimelineStatus,
325
+ numberOfLines: 1,
326
+ children: formatStatus(toolCall.status || 'done')
327
+ }) : null]
328
+ })]
329
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
330
+ style: _conversationStyles.conversationStyles.toolTimelineDetailsSlot,
331
+ children: [showsApproval ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_ToolApprovalCard.ToolApprovalCard, {
332
+ agent: agent,
333
+ availableConnectors: availableConnectors,
334
+ isLastAssistantMessage: isLastAssistantMessage,
335
+ onConnectConnector: onConnectConnector,
336
+ submitToolCallInput: submitToolCallInput,
337
+ toolCall: toolCall
338
+ }) : null, !showsApproval && isOpen && detail ? /*#__PURE__*/(0, _jsxRuntime.jsx)(ToolDetailBox, {
339
+ detail: detail
340
+ }) : null]
341
+ })]
342
+ });
343
+ }
344
+ function ToolDetailBox({
345
+ detail
346
+ }) {
347
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
348
+ style: _conversationStyles.conversationStyles.toolTimelineDetails,
349
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
350
+ nestedScrollEnabled: true,
351
+ showsVerticalScrollIndicator: true,
352
+ style: _conversationStyles.conversationStyles.toolTimelineDetailVerticalScroll,
353
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
354
+ horizontal: true,
355
+ nestedScrollEnabled: true,
356
+ showsHorizontalScrollIndicator: true,
357
+ contentContainerStyle: _conversationStyles.conversationStyles.toolTimelineDetailScrollContent,
358
+ style: _conversationStyles.conversationStyles.toolTimelineDetailHorizontalScroll,
359
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
360
+ style: _conversationStyles.conversationStyles.toolTimelineDetailText,
361
+ children: detail
362
+ })
363
+ })
364
+ })
365
+ });
366
+ }
367
+ function DoneRow() {
368
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
369
+ style: _conversationStyles.conversationStyles.toolDoneRow,
370
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
371
+ style: _conversationStyles.conversationStyles.toolTimelineIconCol,
372
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
373
+ style: _conversationStyles.conversationStyles.toolCallIcon,
374
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.CheckCircle2, {
375
+ color: "#E4E4E7",
376
+ size: 17,
377
+ strokeWidth: 2.3
378
+ })
379
+ })
380
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
381
+ style: _conversationStyles.conversationStyles.toolDoneText,
382
+ children: "Done"
383
+ })]
384
+ });
385
+ }
386
+ function RunningToolIndicator({
387
+ label
388
+ }) {
389
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
390
+ style: _conversationStyles.conversationStyles.toolRunningWrap,
391
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
392
+ style: _conversationStyles.conversationStyles.toolRunningDots,
393
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
394
+ style: _conversationStyles.conversationStyles.toolRunningDot
395
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
396
+ style: _conversationStyles.conversationStyles.toolRunningDot
397
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
398
+ style: _conversationStyles.conversationStyles.toolRunningDot
399
+ })]
400
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
401
+ style: _conversationStyles.conversationStyles.toolRunningText,
402
+ children: label
403
+ })]
404
+ });
405
+ }
406
+ function ToolStatusIcon({
407
+ status
408
+ }) {
409
+ if (isRunningStatus({
410
+ status
411
+ })) {
412
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
413
+ style: _conversationStyles.conversationStyles.toolCallIcon,
414
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
415
+ color: "#C9CAF8",
416
+ size: "small"
417
+ })
418
+ });
419
+ }
420
+ if (isErrorStatus({
421
+ status
422
+ })) {
423
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
424
+ style: _conversationStyles.conversationStyles.toolCallIcon,
425
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.CircleAlert, {
426
+ color: "#FCA5A5",
427
+ size: 17,
428
+ strokeWidth: 2.3
429
+ })
430
+ });
431
+ }
432
+ if (isWaitingStatus({
433
+ status
434
+ })) {
435
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
436
+ style: _conversationStyles.conversationStyles.toolCallIcon,
437
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.Clock, {
438
+ color: "#FDE047",
439
+ size: 17,
440
+ strokeWidth: 2.3
441
+ })
442
+ });
443
+ }
444
+ if (isSuccessStatus({
445
+ status
446
+ })) {
447
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
448
+ style: _conversationStyles.conversationStyles.toolCallIcon,
449
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.CheckCircle2, {
450
+ color: "#86EFAC",
451
+ size: 17,
452
+ strokeWidth: 2.3
453
+ })
454
+ });
455
+ }
456
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
457
+ style: _conversationStyles.conversationStyles.toolCallIcon,
458
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.Wrench, {
459
+ color: "#A1A1AA",
460
+ size: 17,
461
+ strokeWidth: 2.3
462
+ })
463
+ });
464
+ }
465
+ function createToolChunks(toolCalls, toolRenderers) {
466
+ const chunks = [];
467
+ let timelineBuffer = [];
468
+ let timelineIndex = 0;
469
+ const flushTimeline = () => {
470
+ if (timelineBuffer.length === 0) return;
471
+ chunks.push({
472
+ key: `timeline-${timelineIndex}`,
473
+ toolCalls: timelineBuffer,
474
+ type: 'timeline'
475
+ });
476
+ timelineIndex += 1;
477
+ timelineBuffer = [];
478
+ };
479
+ toolCalls.forEach((toolCall, index) => {
480
+ const Renderer = toolRenderers?.[toolCall.name];
481
+ if (!Renderer) {
482
+ timelineBuffer.push(toolCall);
483
+ return;
484
+ }
485
+ flushTimeline();
486
+ chunks.push({
487
+ key: toolCall.id ?? `${toolCall.name}-${index}`,
488
+ Renderer,
489
+ toolCall,
490
+ type: 'custom'
491
+ });
492
+ });
493
+ flushTimeline();
494
+ return chunks;
495
+ }
496
+ function flattenToolCall(toolCall) {
497
+ if (toolCall.grouped && Array.isArray(toolCall.toolCalls)) return toolCall.toolCalls;
498
+ return [toolCall];
499
+ }
500
+ function getCollapsedLabel(toolCalls, isRunning) {
501
+ if (toolCalls.some(isApprovalRequest)) return 'Waiting for input';
502
+ const firstName = toolCalls[0]?.name || '';
503
+ if (toolCalls.length > 0 && toolCalls.every(toolCall => toolCall.name === firstName)) {
504
+ if (firstName === 'bash') {
505
+ if (isRunning) return 'Running commands...';
506
+ return toolCalls.length === 1 ? 'Ran a command' : `Ran ${toolCalls.length} commands`;
507
+ }
508
+ const label = FRIENDLY_TOOL_LABELS[firstName];
509
+ if (label) {
510
+ const base = isRunning ? label.active : label.completed;
511
+ return !isRunning && toolCalls.length > 1 ? `${base} (${toolCalls.length})` : base;
512
+ }
513
+ }
514
+ if (isRunning) return 'Working...';
515
+ return `${toolCalls.length} ${toolCalls.length === 1 ? 'action' : 'actions'}`;
516
+ }
517
+ function getToolTitle(toolCall) {
518
+ const label = FRIENDLY_TOOL_LABELS[toolCall.name || ''];
519
+ if (label) return isRunningStatus(toolCall) ? label.active.replace(/\.\.\.$/, '') : label.completed;
520
+ return formatToolName(toolCall.name || 'Tool');
521
+ }
522
+ function getToolPreview(toolCall) {
523
+ const args = getToolArgs(toolCall);
524
+ const rawArgs = getRawArgs(toolCall);
525
+ if (toolCall.name === 'bash') {
526
+ const command = getStringArg(args, ['command', 'cmd', 'script']) || (typeof rawArgs === 'string' ? rawArgs : '');
527
+ return command ? truncateSingleLine(command, 48) : null;
528
+ }
529
+ if (toolCall.name === 'grep') {
530
+ const pattern = getStringArg(args, ['pattern', 'query']);
531
+ const path = getStringArg(args, ['path', 'include']);
532
+ return truncateSingleLine([pattern, path].filter(Boolean).join(' in '), 48);
533
+ }
534
+ if (toolCall.name === 'search_web' || toolCall.name === 'web_search') {
535
+ return truncateSingleLine(getStringArg(args, ['query', 'q']) || '', 48);
536
+ }
537
+ if (toolCall.name === 'request_oauth_authorization') {
538
+ return 'waiting for user input / approval';
539
+ }
540
+ if (toolCall.name === 'get_connectors_info') {
541
+ return getResultPreview(toolCall.results);
542
+ }
543
+ return getStringArg(args, ['name', 'title', 'path', 'filename', 'integration_type', 'connector_id']) || null;
544
+ }
545
+ function getToolDetail(toolCall) {
546
+ const sections = [];
547
+ const args = getRawArgs(toolCall);
548
+ const results = toolCall.results;
549
+ if (args) sections.push(`Input:\n${formatValue(args)}`);
550
+ if (results) sections.push(`Output:\n${formatValue(results)}`);
551
+ return sections.length > 0 ? sections.join('\n\n') : null;
552
+ }
553
+ function getRawArgs(toolCall) {
554
+ return toolCall.arguments_string ?? toolCall.arguments ?? null;
555
+ }
556
+ function getToolArgs(toolCall) {
557
+ const raw = getRawArgs(toolCall);
558
+ if (!raw) return null;
559
+ if (typeof raw !== 'string') return raw;
560
+ try {
561
+ const parsed = JSON.parse(raw);
562
+ return parsed && typeof parsed === 'object' ? parsed : raw;
563
+ } catch {
564
+ return raw;
565
+ }
566
+ }
567
+ function getStringArg(args, keys) {
568
+ if (!args || typeof args === 'string') return '';
569
+ for (const key of keys) {
570
+ const value = args[key];
571
+ if (typeof value === 'string' && value.trim()) return value.trim();
572
+ }
573
+ return '';
574
+ }
575
+ function getResultPreview(result) {
576
+ if (!result) return null;
577
+ const value = typeof result === 'string' ? result : formatValue(result);
578
+ const firstLine = value.split('\n').find(line => line.trim());
579
+ return firstLine ? truncateSingleLine(firstLine, 52) : null;
580
+ }
581
+ function shouldShowStatusLine(toolCall, preview) {
582
+ if (!toolCall.status) return false;
583
+ if (toolCall.name === 'bash' || toolCall.name === 'grep') return false;
584
+ return !preview || isWaitingStatus(toolCall) || isErrorStatus(toolCall);
585
+ }
586
+ function isRunningStatus(toolCall) {
587
+ const normalized = normalizeStatus(toolCall.status);
588
+ return normalized === 'running' || normalized === 'pending';
589
+ }
590
+ function isWaitingStatus(toolCall) {
591
+ return normalizeStatus(toolCall.status).includes('waiting');
592
+ }
593
+ function isApprovalRequest(toolCall) {
594
+ if (isWaitingStatus(toolCall)) return true;
595
+ const resultPreview = getResultPreview(toolCall.results);
596
+ return Boolean(resultPreview?.toLowerCase().includes('waiting for user input'));
597
+ }
598
+ function isErrorStatus(toolCall) {
599
+ const normalized = normalizeStatus(toolCall.status);
600
+ return normalized.includes('error') || normalized.includes('failed') || normalized.includes('rejected');
601
+ }
602
+ function isSuccessStatus(toolCall) {
603
+ const normalized = normalizeStatus(toolCall.status);
604
+ return normalized.includes('success') || normalized.includes('complete');
605
+ }
606
+ function normalizeStatus(status) {
607
+ return (status || '').toLowerCase();
608
+ }
609
+ function formatToolName(name) {
610
+ return name.split('_').filter(Boolean).map(part => part.slice(0, 1).toUpperCase() + part.slice(1)).join(' ');
611
+ }
612
+ function formatStatus(status) {
613
+ return status.split('_').filter(Boolean).map(part => part.slice(0, 1).toUpperCase() + part.slice(1)).join(' ');
614
+ }
615
+ function formatValue(value) {
616
+ if (typeof value === 'string') return value.length > 900 ? `${value.slice(0, 900)}...` : value;
617
+ try {
618
+ const stringified = JSON.stringify(value, null, 2);
619
+ return stringified.length > 900 ? `${stringified.slice(0, 900)}...` : stringified;
620
+ } catch {
621
+ return String(value);
622
+ }
623
+ }
624
+ function truncateSingleLine(value, maxLength) {
625
+ const singleLine = value.replace(/\s+/g, ' ').trim();
626
+ if (!singleLine) return null;
627
+ return singleLine.length > maxLength ? `${singleLine.slice(0, maxLength - 3)}...` : singleLine;
628
+ }
629
+ function getToolCallKey(toolCall, index) {
630
+ return toolCall.id ?? `${toolCall.name || 'tool'}-${index}`;
631
+ }
632
+ //# sourceMappingURL=ToolCallSummary.js.map