@docyrus/rn-assistant 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 (314) hide show
  1. package/README.md +477 -0
  2. package/dist/commonjs/components/agent-selector/agent-selector.js +300 -0
  3. package/dist/commonjs/components/agent-selector/agent-selector.js.map +1 -0
  4. package/dist/commonjs/components/agent-selector/index.js +17 -0
  5. package/dist/commonjs/components/agent-selector/index.js.map +1 -0
  6. package/dist/commonjs/components/assistant-animations/assistant-animations.js +169 -0
  7. package/dist/commonjs/components/assistant-animations/assistant-animations.js.map +1 -0
  8. package/dist/commonjs/components/assistant-animations/index.js +17 -0
  9. package/dist/commonjs/components/assistant-animations/index.js.map +1 -0
  10. package/dist/commonjs/components/assistant-screen/assistant-screen.js +809 -0
  11. package/dist/commonjs/components/assistant-screen/assistant-screen.js.map +1 -0
  12. package/dist/commonjs/components/assistant-screen/index.js +17 -0
  13. package/dist/commonjs/components/assistant-screen/index.js.map +1 -0
  14. package/dist/commonjs/components/index.js +116 -0
  15. package/dist/commonjs/components/index.js.map +1 -0
  16. package/dist/commonjs/components/message-parts/index.js +13 -0
  17. package/dist/commonjs/components/message-parts/index.js.map +1 -0
  18. package/dist/commonjs/components/message-parts/message-parts.js +209 -0
  19. package/dist/commonjs/components/message-parts/message-parts.js.map +1 -0
  20. package/dist/commonjs/components/new-chat/index.js +17 -0
  21. package/dist/commonjs/components/new-chat/index.js.map +1 -0
  22. package/dist/commonjs/components/new-chat/new-chat.js +100 -0
  23. package/dist/commonjs/components/new-chat/new-chat.js.map +1 -0
  24. package/dist/commonjs/components/prompt-input/attachment-picker.js +341 -0
  25. package/dist/commonjs/components/prompt-input/attachment-picker.js.map +1 -0
  26. package/dist/commonjs/components/prompt-input/attachment-preview.js +229 -0
  27. package/dist/commonjs/components/prompt-input/attachment-preview.js.map +1 -0
  28. package/dist/commonjs/components/prompt-input/index.js +41 -0
  29. package/dist/commonjs/components/prompt-input/index.js.map +1 -0
  30. package/dist/commonjs/components/prompt-input/prompt-input.js +288 -0
  31. package/dist/commonjs/components/prompt-input/prompt-input.js.map +1 -0
  32. package/dist/commonjs/components/prompt-input/provider-selector.js +542 -0
  33. package/dist/commonjs/components/prompt-input/provider-selector.js.map +1 -0
  34. package/dist/commonjs/components/prompt-input/reasoning-level-selector.js +350 -0
  35. package/dist/commonjs/components/prompt-input/reasoning-level-selector.js.map +1 -0
  36. package/dist/commonjs/components/prompt-input/voice-recorder.js +260 -0
  37. package/dist/commonjs/components/prompt-input/voice-recorder.js.map +1 -0
  38. package/dist/commonjs/components/sessions-list/index.js +17 -0
  39. package/dist/commonjs/components/sessions-list/index.js.map +1 -0
  40. package/dist/commonjs/components/sessions-list/sessions-list.js +820 -0
  41. package/dist/commonjs/components/sessions-list/sessions-list.js.map +1 -0
  42. package/dist/commonjs/hooks/index.js +34 -0
  43. package/dist/commonjs/hooks/index.js.map +1 -0
  44. package/dist/commonjs/hooks/use-agent-models.js +104 -0
  45. package/dist/commonjs/hooks/use-agent-models.js.map +1 -0
  46. package/dist/commonjs/hooks/use-assistant.js +402 -0
  47. package/dist/commonjs/hooks/use-assistant.js.map +1 -0
  48. package/dist/commonjs/hooks/use-attachment-picker.js +308 -0
  49. package/dist/commonjs/hooks/use-attachment-picker.js.map +1 -0
  50. package/dist/commonjs/hooks/use-voice-recorder.js +217 -0
  51. package/dist/commonjs/hooks/use-voice-recorder.js.map +1 -0
  52. package/dist/commonjs/index.js +112 -0
  53. package/dist/commonjs/index.js.map +1 -0
  54. package/dist/commonjs/package.json +1 -0
  55. package/dist/commonjs/theme/assistant-theme.js +105 -0
  56. package/dist/commonjs/theme/assistant-theme.js.map +1 -0
  57. package/dist/commonjs/theme/index.js +19 -0
  58. package/dist/commonjs/theme/index.js.map +1 -0
  59. package/dist/commonjs/types/index.js +2 -0
  60. package/dist/commonjs/types/index.js.map +1 -0
  61. package/dist/commonjs/ui/action-sheet.js +348 -0
  62. package/dist/commonjs/ui/action-sheet.js.map +1 -0
  63. package/dist/commonjs/ui/alert-dialog.js +134 -0
  64. package/dist/commonjs/ui/alert-dialog.js.map +1 -0
  65. package/dist/commonjs/ui/docyrus-brand-mark.js +52 -0
  66. package/dist/commonjs/ui/docyrus-brand-mark.js.map +1 -0
  67. package/dist/commonjs/ui/docyrus-icon.js +298 -0
  68. package/dist/commonjs/ui/docyrus-icon.js.map +1 -0
  69. package/dist/commonjs/ui/index.js +34 -0
  70. package/dist/commonjs/ui/index.js.map +1 -0
  71. package/dist/commonjs/utils/api-client.js +99 -0
  72. package/dist/commonjs/utils/api-client.js.map +1 -0
  73. package/dist/commonjs/utils/default-api-config.js +195 -0
  74. package/dist/commonjs/utils/default-api-config.js.map +1 -0
  75. package/dist/commonjs/utils/index.js +39 -0
  76. package/dist/commonjs/utils/index.js.map +1 -0
  77. package/dist/commonjs/utils/resolve-api-headers.js +16 -0
  78. package/dist/commonjs/utils/resolve-api-headers.js.map +1 -0
  79. package/dist/module/components/agent-selector/agent-selector.js +296 -0
  80. package/dist/module/components/agent-selector/agent-selector.js.map +1 -0
  81. package/dist/module/components/agent-selector/index.js +4 -0
  82. package/dist/module/components/agent-selector/index.js.map +1 -0
  83. package/dist/module/components/assistant-animations/assistant-animations.js +164 -0
  84. package/dist/module/components/assistant-animations/assistant-animations.js.map +1 -0
  85. package/dist/module/components/assistant-animations/index.js +4 -0
  86. package/dist/module/components/assistant-animations/index.js.map +1 -0
  87. package/dist/module/components/assistant-screen/assistant-screen.js +801 -0
  88. package/dist/module/components/assistant-screen/assistant-screen.js.map +1 -0
  89. package/dist/module/components/assistant-screen/index.js +4 -0
  90. package/dist/module/components/assistant-screen/index.js.map +1 -0
  91. package/dist/module/components/index.js +23 -0
  92. package/dist/module/components/index.js.map +1 -0
  93. package/dist/module/components/message-parts/index.js +4 -0
  94. package/dist/module/components/message-parts/index.js.map +1 -0
  95. package/dist/module/components/message-parts/message-parts.js +205 -0
  96. package/dist/module/components/message-parts/message-parts.js.map +1 -0
  97. package/dist/module/components/new-chat/index.js +4 -0
  98. package/dist/module/components/new-chat/index.js.map +1 -0
  99. package/dist/module/components/new-chat/new-chat.js +96 -0
  100. package/dist/module/components/new-chat/new-chat.js.map +1 -0
  101. package/dist/module/components/prompt-input/attachment-picker.js +337 -0
  102. package/dist/module/components/prompt-input/attachment-picker.js.map +1 -0
  103. package/dist/module/components/prompt-input/attachment-preview.js +225 -0
  104. package/dist/module/components/prompt-input/attachment-preview.js.map +1 -0
  105. package/dist/module/components/prompt-input/index.js +15 -0
  106. package/dist/module/components/prompt-input/index.js.map +1 -0
  107. package/dist/module/components/prompt-input/prompt-input.js +284 -0
  108. package/dist/module/components/prompt-input/prompt-input.js.map +1 -0
  109. package/dist/module/components/prompt-input/provider-selector.js +538 -0
  110. package/dist/module/components/prompt-input/provider-selector.js.map +1 -0
  111. package/dist/module/components/prompt-input/reasoning-level-selector.js +346 -0
  112. package/dist/module/components/prompt-input/reasoning-level-selector.js.map +1 -0
  113. package/dist/module/components/prompt-input/voice-recorder.js +256 -0
  114. package/dist/module/components/prompt-input/voice-recorder.js.map +1 -0
  115. package/dist/module/components/sessions-list/index.js +4 -0
  116. package/dist/module/components/sessions-list/index.js.map +1 -0
  117. package/dist/module/components/sessions-list/sessions-list.js +816 -0
  118. package/dist/module/components/sessions-list/sessions-list.js.map +1 -0
  119. package/dist/module/hooks/index.js +18 -0
  120. package/dist/module/hooks/index.js.map +1 -0
  121. package/dist/module/hooks/use-agent-models.js +100 -0
  122. package/dist/module/hooks/use-agent-models.js.map +1 -0
  123. package/dist/module/hooks/use-assistant.js +398 -0
  124. package/dist/module/hooks/use-assistant.js.map +1 -0
  125. package/dist/module/hooks/use-attachment-picker.js +303 -0
  126. package/dist/module/hooks/use-attachment-picker.js.map +1 -0
  127. package/dist/module/hooks/use-voice-recorder.js +214 -0
  128. package/dist/module/hooks/use-voice-recorder.js.map +1 -0
  129. package/dist/module/index.js +59 -0
  130. package/dist/module/index.js.map +1 -0
  131. package/dist/module/package.json +1 -0
  132. package/dist/module/theme/assistant-theme.js +100 -0
  133. package/dist/module/theme/assistant-theme.js.map +1 -0
  134. package/dist/module/theme/index.js +4 -0
  135. package/dist/module/theme/index.js.map +1 -0
  136. package/dist/module/types/index.js +2 -0
  137. package/dist/module/types/index.js.map +1 -0
  138. package/dist/module/ui/action-sheet.js +344 -0
  139. package/dist/module/ui/action-sheet.js.map +1 -0
  140. package/dist/module/ui/alert-dialog.js +130 -0
  141. package/dist/module/ui/alert-dialog.js.map +1 -0
  142. package/dist/module/ui/docyrus-brand-mark.js +48 -0
  143. package/dist/module/ui/docyrus-brand-mark.js.map +1 -0
  144. package/dist/module/ui/docyrus-icon.js +294 -0
  145. package/dist/module/ui/docyrus-icon.js.map +1 -0
  146. package/dist/module/ui/index.js +7 -0
  147. package/dist/module/ui/index.js.map +1 -0
  148. package/dist/module/utils/api-client.js +95 -0
  149. package/dist/module/utils/api-client.js.map +1 -0
  150. package/dist/module/utils/default-api-config.js +190 -0
  151. package/dist/module/utils/default-api-config.js.map +1 -0
  152. package/dist/module/utils/index.js +12 -0
  153. package/dist/module/utils/index.js.map +1 -0
  154. package/dist/module/utils/resolve-api-headers.js +12 -0
  155. package/dist/module/utils/resolve-api-headers.js.map +1 -0
  156. package/dist/typescript/commonjs/eslint.config.d.mts +4 -0
  157. package/dist/typescript/commonjs/eslint.config.d.mts.map +1 -0
  158. package/dist/typescript/commonjs/package.json +1 -0
  159. package/dist/typescript/commonjs/src/components/agent-selector/agent-selector.d.ts +49 -0
  160. package/dist/typescript/commonjs/src/components/agent-selector/agent-selector.d.ts.map +1 -0
  161. package/dist/typescript/commonjs/src/components/agent-selector/index.d.ts +2 -0
  162. package/dist/typescript/commonjs/src/components/agent-selector/index.d.ts.map +1 -0
  163. package/dist/typescript/commonjs/src/components/assistant-animations/assistant-animations.d.ts +8 -0
  164. package/dist/typescript/commonjs/src/components/assistant-animations/assistant-animations.d.ts.map +1 -0
  165. package/dist/typescript/commonjs/src/components/assistant-animations/index.d.ts +2 -0
  166. package/dist/typescript/commonjs/src/components/assistant-animations/index.d.ts.map +1 -0
  167. package/dist/typescript/commonjs/src/components/assistant-screen/assistant-screen.d.ts +122 -0
  168. package/dist/typescript/commonjs/src/components/assistant-screen/assistant-screen.d.ts.map +1 -0
  169. package/dist/typescript/commonjs/src/components/assistant-screen/index.d.ts +2 -0
  170. package/dist/typescript/commonjs/src/components/assistant-screen/index.d.ts.map +1 -0
  171. package/dist/typescript/commonjs/src/components/index.d.ts +11 -0
  172. package/dist/typescript/commonjs/src/components/index.d.ts.map +1 -0
  173. package/dist/typescript/commonjs/src/components/message-parts/index.d.ts +2 -0
  174. package/dist/typescript/commonjs/src/components/message-parts/index.d.ts.map +1 -0
  175. package/dist/typescript/commonjs/src/components/message-parts/message-parts.d.ts +22 -0
  176. package/dist/typescript/commonjs/src/components/message-parts/message-parts.d.ts.map +1 -0
  177. package/dist/typescript/commonjs/src/components/new-chat/index.d.ts +2 -0
  178. package/dist/typescript/commonjs/src/components/new-chat/index.d.ts.map +1 -0
  179. package/dist/typescript/commonjs/src/components/new-chat/new-chat.d.ts +34 -0
  180. package/dist/typescript/commonjs/src/components/new-chat/new-chat.d.ts.map +1 -0
  181. package/dist/typescript/commonjs/src/components/prompt-input/attachment-picker.d.ts +53 -0
  182. package/dist/typescript/commonjs/src/components/prompt-input/attachment-picker.d.ts.map +1 -0
  183. package/dist/typescript/commonjs/src/components/prompt-input/attachment-preview.d.ts +42 -0
  184. package/dist/typescript/commonjs/src/components/prompt-input/attachment-preview.d.ts.map +1 -0
  185. package/dist/typescript/commonjs/src/components/prompt-input/index.d.ts +9 -0
  186. package/dist/typescript/commonjs/src/components/prompt-input/index.d.ts.map +1 -0
  187. package/dist/typescript/commonjs/src/components/prompt-input/prompt-input.d.ts +139 -0
  188. package/dist/typescript/commonjs/src/components/prompt-input/prompt-input.d.ts.map +1 -0
  189. package/dist/typescript/commonjs/src/components/prompt-input/provider-selector.d.ts +11 -0
  190. package/dist/typescript/commonjs/src/components/prompt-input/provider-selector.d.ts.map +1 -0
  191. package/dist/typescript/commonjs/src/components/prompt-input/reasoning-level-selector.d.ts +35 -0
  192. package/dist/typescript/commonjs/src/components/prompt-input/reasoning-level-selector.d.ts.map +1 -0
  193. package/dist/typescript/commonjs/src/components/prompt-input/voice-recorder.d.ts +48 -0
  194. package/dist/typescript/commonjs/src/components/prompt-input/voice-recorder.d.ts.map +1 -0
  195. package/dist/typescript/commonjs/src/components/sessions-list/index.d.ts +2 -0
  196. package/dist/typescript/commonjs/src/components/sessions-list/index.d.ts.map +1 -0
  197. package/dist/typescript/commonjs/src/components/sessions-list/sessions-list.d.ts +59 -0
  198. package/dist/typescript/commonjs/src/components/sessions-list/sessions-list.d.ts.map +1 -0
  199. package/dist/typescript/commonjs/src/hooks/index.d.ts +8 -0
  200. package/dist/typescript/commonjs/src/hooks/index.d.ts.map +1 -0
  201. package/dist/typescript/commonjs/src/hooks/use-agent-models.d.ts +68 -0
  202. package/dist/typescript/commonjs/src/hooks/use-agent-models.d.ts.map +1 -0
  203. package/dist/typescript/commonjs/src/hooks/use-assistant.d.ts +55 -0
  204. package/dist/typescript/commonjs/src/hooks/use-assistant.d.ts.map +1 -0
  205. package/dist/typescript/commonjs/src/hooks/use-attachment-picker.d.ts +99 -0
  206. package/dist/typescript/commonjs/src/hooks/use-attachment-picker.d.ts.map +1 -0
  207. package/dist/typescript/commonjs/src/hooks/use-voice-recorder.d.ts +101 -0
  208. package/dist/typescript/commonjs/src/hooks/use-voice-recorder.d.ts.map +1 -0
  209. package/dist/typescript/commonjs/src/index.d.ts +47 -0
  210. package/dist/typescript/commonjs/src/index.d.ts.map +1 -0
  211. package/dist/typescript/commonjs/src/theme/assistant-theme.d.ts +51 -0
  212. package/dist/typescript/commonjs/src/theme/assistant-theme.d.ts.map +1 -0
  213. package/dist/typescript/commonjs/src/theme/index.d.ts +2 -0
  214. package/dist/typescript/commonjs/src/theme/index.d.ts.map +1 -0
  215. package/dist/typescript/commonjs/src/types/index.d.ts +167 -0
  216. package/dist/typescript/commonjs/src/types/index.d.ts.map +1 -0
  217. package/dist/typescript/commonjs/src/ui/action-sheet.d.ts +29 -0
  218. package/dist/typescript/commonjs/src/ui/action-sheet.d.ts.map +1 -0
  219. package/dist/typescript/commonjs/src/ui/alert-dialog.d.ts +12 -0
  220. package/dist/typescript/commonjs/src/ui/alert-dialog.d.ts.map +1 -0
  221. package/dist/typescript/commonjs/src/ui/docyrus-brand-mark.d.ts +5 -0
  222. package/dist/typescript/commonjs/src/ui/docyrus-brand-mark.d.ts.map +1 -0
  223. package/dist/typescript/commonjs/src/ui/docyrus-icon.d.ts +11 -0
  224. package/dist/typescript/commonjs/src/ui/docyrus-icon.d.ts.map +1 -0
  225. package/dist/typescript/commonjs/src/ui/index.d.ts +5 -0
  226. package/dist/typescript/commonjs/src/ui/index.d.ts.map +1 -0
  227. package/dist/typescript/commonjs/src/utils/api-client.d.ts +35 -0
  228. package/dist/typescript/commonjs/src/utils/api-client.d.ts.map +1 -0
  229. package/dist/typescript/commonjs/src/utils/default-api-config.d.ts +38 -0
  230. package/dist/typescript/commonjs/src/utils/default-api-config.d.ts.map +1 -0
  231. package/dist/typescript/commonjs/src/utils/index.d.ts +9 -0
  232. package/dist/typescript/commonjs/src/utils/index.d.ts.map +1 -0
  233. package/dist/typescript/commonjs/src/utils/resolve-api-headers.d.ts +3 -0
  234. package/dist/typescript/commonjs/src/utils/resolve-api-headers.d.ts.map +1 -0
  235. package/dist/typescript/module/eslint.config.d.mts +4 -0
  236. package/dist/typescript/module/eslint.config.d.mts.map +1 -0
  237. package/dist/typescript/module/package.json +1 -0
  238. package/dist/typescript/module/src/components/agent-selector/agent-selector.d.ts +49 -0
  239. package/dist/typescript/module/src/components/agent-selector/agent-selector.d.ts.map +1 -0
  240. package/dist/typescript/module/src/components/agent-selector/index.d.ts +2 -0
  241. package/dist/typescript/module/src/components/agent-selector/index.d.ts.map +1 -0
  242. package/dist/typescript/module/src/components/assistant-animations/assistant-animations.d.ts +8 -0
  243. package/dist/typescript/module/src/components/assistant-animations/assistant-animations.d.ts.map +1 -0
  244. package/dist/typescript/module/src/components/assistant-animations/index.d.ts +2 -0
  245. package/dist/typescript/module/src/components/assistant-animations/index.d.ts.map +1 -0
  246. package/dist/typescript/module/src/components/assistant-screen/assistant-screen.d.ts +122 -0
  247. package/dist/typescript/module/src/components/assistant-screen/assistant-screen.d.ts.map +1 -0
  248. package/dist/typescript/module/src/components/assistant-screen/index.d.ts +2 -0
  249. package/dist/typescript/module/src/components/assistant-screen/index.d.ts.map +1 -0
  250. package/dist/typescript/module/src/components/index.d.ts +11 -0
  251. package/dist/typescript/module/src/components/index.d.ts.map +1 -0
  252. package/dist/typescript/module/src/components/message-parts/index.d.ts +2 -0
  253. package/dist/typescript/module/src/components/message-parts/index.d.ts.map +1 -0
  254. package/dist/typescript/module/src/components/message-parts/message-parts.d.ts +22 -0
  255. package/dist/typescript/module/src/components/message-parts/message-parts.d.ts.map +1 -0
  256. package/dist/typescript/module/src/components/new-chat/index.d.ts +2 -0
  257. package/dist/typescript/module/src/components/new-chat/index.d.ts.map +1 -0
  258. package/dist/typescript/module/src/components/new-chat/new-chat.d.ts +34 -0
  259. package/dist/typescript/module/src/components/new-chat/new-chat.d.ts.map +1 -0
  260. package/dist/typescript/module/src/components/prompt-input/attachment-picker.d.ts +53 -0
  261. package/dist/typescript/module/src/components/prompt-input/attachment-picker.d.ts.map +1 -0
  262. package/dist/typescript/module/src/components/prompt-input/attachment-preview.d.ts +42 -0
  263. package/dist/typescript/module/src/components/prompt-input/attachment-preview.d.ts.map +1 -0
  264. package/dist/typescript/module/src/components/prompt-input/index.d.ts +9 -0
  265. package/dist/typescript/module/src/components/prompt-input/index.d.ts.map +1 -0
  266. package/dist/typescript/module/src/components/prompt-input/prompt-input.d.ts +139 -0
  267. package/dist/typescript/module/src/components/prompt-input/prompt-input.d.ts.map +1 -0
  268. package/dist/typescript/module/src/components/prompt-input/provider-selector.d.ts +11 -0
  269. package/dist/typescript/module/src/components/prompt-input/provider-selector.d.ts.map +1 -0
  270. package/dist/typescript/module/src/components/prompt-input/reasoning-level-selector.d.ts +35 -0
  271. package/dist/typescript/module/src/components/prompt-input/reasoning-level-selector.d.ts.map +1 -0
  272. package/dist/typescript/module/src/components/prompt-input/voice-recorder.d.ts +48 -0
  273. package/dist/typescript/module/src/components/prompt-input/voice-recorder.d.ts.map +1 -0
  274. package/dist/typescript/module/src/components/sessions-list/index.d.ts +2 -0
  275. package/dist/typescript/module/src/components/sessions-list/index.d.ts.map +1 -0
  276. package/dist/typescript/module/src/components/sessions-list/sessions-list.d.ts +59 -0
  277. package/dist/typescript/module/src/components/sessions-list/sessions-list.d.ts.map +1 -0
  278. package/dist/typescript/module/src/hooks/index.d.ts +8 -0
  279. package/dist/typescript/module/src/hooks/index.d.ts.map +1 -0
  280. package/dist/typescript/module/src/hooks/use-agent-models.d.ts +68 -0
  281. package/dist/typescript/module/src/hooks/use-agent-models.d.ts.map +1 -0
  282. package/dist/typescript/module/src/hooks/use-assistant.d.ts +55 -0
  283. package/dist/typescript/module/src/hooks/use-assistant.d.ts.map +1 -0
  284. package/dist/typescript/module/src/hooks/use-attachment-picker.d.ts +99 -0
  285. package/dist/typescript/module/src/hooks/use-attachment-picker.d.ts.map +1 -0
  286. package/dist/typescript/module/src/hooks/use-voice-recorder.d.ts +101 -0
  287. package/dist/typescript/module/src/hooks/use-voice-recorder.d.ts.map +1 -0
  288. package/dist/typescript/module/src/index.d.ts +47 -0
  289. package/dist/typescript/module/src/index.d.ts.map +1 -0
  290. package/dist/typescript/module/src/theme/assistant-theme.d.ts +51 -0
  291. package/dist/typescript/module/src/theme/assistant-theme.d.ts.map +1 -0
  292. package/dist/typescript/module/src/theme/index.d.ts +2 -0
  293. package/dist/typescript/module/src/theme/index.d.ts.map +1 -0
  294. package/dist/typescript/module/src/types/index.d.ts +167 -0
  295. package/dist/typescript/module/src/types/index.d.ts.map +1 -0
  296. package/dist/typescript/module/src/ui/action-sheet.d.ts +29 -0
  297. package/dist/typescript/module/src/ui/action-sheet.d.ts.map +1 -0
  298. package/dist/typescript/module/src/ui/alert-dialog.d.ts +12 -0
  299. package/dist/typescript/module/src/ui/alert-dialog.d.ts.map +1 -0
  300. package/dist/typescript/module/src/ui/docyrus-brand-mark.d.ts +5 -0
  301. package/dist/typescript/module/src/ui/docyrus-brand-mark.d.ts.map +1 -0
  302. package/dist/typescript/module/src/ui/docyrus-icon.d.ts +11 -0
  303. package/dist/typescript/module/src/ui/docyrus-icon.d.ts.map +1 -0
  304. package/dist/typescript/module/src/ui/index.d.ts +5 -0
  305. package/dist/typescript/module/src/ui/index.d.ts.map +1 -0
  306. package/dist/typescript/module/src/utils/api-client.d.ts +35 -0
  307. package/dist/typescript/module/src/utils/api-client.d.ts.map +1 -0
  308. package/dist/typescript/module/src/utils/default-api-config.d.ts +38 -0
  309. package/dist/typescript/module/src/utils/default-api-config.d.ts.map +1 -0
  310. package/dist/typescript/module/src/utils/index.d.ts +9 -0
  311. package/dist/typescript/module/src/utils/index.d.ts.map +1 -0
  312. package/dist/typescript/module/src/utils/resolve-api-headers.d.ts +3 -0
  313. package/dist/typescript/module/src/utils/resolve-api-headers.d.ts.map +1 -0
  314. package/package.json +176 -0
@@ -0,0 +1,820 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.SessionsList = SessionsList;
7
+ var _react = require("react");
8
+ var _reactNative = require("react-native");
9
+ var _lucideReactNative = require("lucide-react-native");
10
+ var _rn = require("@docyrus/i18n/rn");
11
+ var _apiClient = require("../../utils/api-client.js");
12
+ var _resolveApiHeaders = require("../../utils/resolve-api-headers.js");
13
+ var _index = require("../../theme/index.js");
14
+ var _index2 = require("../../ui/index.js");
15
+ var _jsxRuntime = require("react/jsx-runtime");
16
+ /**
17
+ * Sessions List Component
18
+ *
19
+ * Displays list of user's chat sessions with the agent.
20
+ * Sessions are ordered by last modified date.
21
+ *
22
+ * @example
23
+ * ```tsx
24
+ * <SessionsList
25
+ * api="https://api.docyrus.com"
26
+ * agentId="agent-123"
27
+ * token={userToken}
28
+ * onSelectSession={(session) => navigate('Chat', { sessionId: session.id })}
29
+ * onNewChat={() => navigate('Chat')}
30
+ * />
31
+ * ```
32
+ */
33
+ function SessionsList({
34
+ apiConfig,
35
+ agentId,
36
+ userId,
37
+ dataSourceId = 'f42b3daa-ca43-11ed-be9d-6fe3a1a7b37c',
38
+ headers = {},
39
+ onSelectSession,
40
+ onNewChat,
41
+ showHeader = true
42
+ }) {
43
+ const theme = (0, _index.useDocyrusRNAssistantTheme)();
44
+ const {
45
+ t
46
+ } = (0, _rn.useI18n)();
47
+ const [sessions, setSessions] = (0, _react.useState)([]);
48
+ const [loading, setLoading] = (0, _react.useState)(true);
49
+ const [refreshing, setRefreshing] = (0, _react.useState)(false);
50
+ const [deletingSessionId, setDeletingSessionId] = (0, _react.useState)(null);
51
+ const [sessionToDelete, setSessionToDelete] = (0, _react.useState)(null);
52
+ const fetchSessions = (0, _react.useCallback)(async (isRefresh = false) => {
53
+ if (isRefresh) {
54
+ setRefreshing(true);
55
+ } else {
56
+ setLoading(true);
57
+ }
58
+ try {
59
+ // Build filters for query API
60
+ const filters = {
61
+ combinator: 'and',
62
+ rules: [{
63
+ field: 'tenant_ai_agent_id',
64
+ operator: '=',
65
+ value: agentId
66
+ }]
67
+ };
68
+
69
+ // Add user filter if userId is provided
70
+ if (userId) {
71
+ filters.rules.push({
72
+ field: 'created_by',
73
+ operator: '=',
74
+ value: userId
75
+ });
76
+ }
77
+
78
+ // Build query params (matching web version format)
79
+ const params = new URLSearchParams({
80
+ columns: JSON.stringify(['subject', 'created_on', 'last_modified_on', 'created_by']),
81
+ limit: '100',
82
+ orderBy: JSON.stringify([{
83
+ field: 'created_on',
84
+ direction: 'desc'
85
+ }]),
86
+ dataSourceId,
87
+ filters: JSON.stringify(filters),
88
+ fullCount: 'true',
89
+ expand: 'record_owner,created_by,last_modified_by,request_type,incoming_channel,parent_record_id,followers,contact,tenant_data_source_id,tenant_ai_agent_id,organization,priority,case_status,category,product,hold_reason,thread_type,tenant_ai_agent_deployment_id,thread_mode,tenant_view_id'
90
+ });
91
+ const url = `${apiConfig.baseUrl}${apiConfig.endpoints.sessions}?${params.toString()}`;
92
+ const resolvedApiHeaders = await (0, _resolveApiHeaders.resolveAPIHeaders)(apiConfig.headers);
93
+
94
+ // Use centralized API client
95
+ const data = await (0, _apiClient.apiClient)(url, {
96
+ headers: {
97
+ ...resolvedApiHeaders,
98
+ ...headers
99
+ },
100
+ transformResponse: apiConfig.transformResponse
101
+ });
102
+
103
+ // API returns array directly after transform, or records array
104
+ const records = Array.isArray(data) ? data : data.records || data || [];
105
+
106
+ // Map records to AISession format
107
+ const mappedSessions = records.map(record => ({
108
+ id: record.id,
109
+ subject: record.subject || t('assistant.untitled-session', 'Untitled Session'),
110
+ preview: record.preview,
111
+ agentId: record.tenant_ai_agent_id || agentId,
112
+ agentDeploymentId: record.tenant_ai_agent_deployment_id,
113
+ createdOn: new Date(record.created_on || record.createdOn),
114
+ lastModifiedOn: new Date(record.last_modified_on || record.updatedOn),
115
+ messageCount: record.message_count || 0
116
+ }));
117
+ setSessions(mappedSessions);
118
+ } catch (error) {
119
+ console.error('Error fetching sessions:', error);
120
+ setSessions([]);
121
+ } finally {
122
+ setLoading(false);
123
+ setRefreshing(false);
124
+ }
125
+ }, [agentId, apiConfig.baseUrl, apiConfig.endpoints.sessions, apiConfig.headers, apiConfig.transformResponse, dataSourceId, headers, userId, t]);
126
+ (0, _react.useEffect)(() => {
127
+ fetchSessions();
128
+ }, [fetchSessions]);
129
+ const deleteSession = async sessionId => {
130
+ try {
131
+ setDeletingSessionId(sessionId);
132
+ const url = `${apiConfig.baseUrl}${apiConfig.endpoints.deleteSession.replace(':sessionId', sessionId)}`;
133
+ const resolvedApiHeaders = await (0, _resolveApiHeaders.resolveAPIHeaders)(apiConfig.headers);
134
+
135
+ // Use centralized API client
136
+ await (0, _apiClient.apiClient)(url, {
137
+ method: 'DELETE',
138
+ headers: {
139
+ ...resolvedApiHeaders,
140
+ ...headers
141
+ }
142
+ });
143
+
144
+ // Refresh sessions list
145
+ await fetchSessions();
146
+ } catch (error) {
147
+ console.error('Error deleting session:', error);
148
+ } finally {
149
+ setDeletingSessionId(null);
150
+ }
151
+ };
152
+ const formatDate = (0, _react.useCallback)(date => {
153
+ try {
154
+ const now = new Date();
155
+ const messageDate = new Date(date);
156
+
157
+ // Check if date is valid
158
+ if (isNaN(messageDate.getTime())) {
159
+ return t('common.time-recently', 'Recently');
160
+ }
161
+ const diff = now.getTime() - messageDate.getTime();
162
+
163
+ // Handle future dates or negative diffs
164
+ if (diff < 0) {
165
+ return t('common.time-just-now', 'Just now');
166
+ }
167
+ const minutes = Math.floor(diff / (1000 * 60));
168
+ const hours = Math.floor(diff / (1000 * 60 * 60));
169
+ const days = Math.floor(diff / (1000 * 60 * 60 * 24));
170
+ if (minutes < 1) return t('common.time-now', 'now');
171
+ if (minutes < 60) return `${minutes}${t('common.time-minutes-ago', 'm ago')}`;
172
+ if (hours < 24) return `${hours}${t('common.time-hours-ago', 'h ago')}`;
173
+ if (days < 7) return `${days}${t('common.time-days-ago', 'd ago')}`;
174
+ if (days < 30) return `${Math.floor(days / 7)}${t('common.time-weeks-ago', 'w ago')}`;
175
+ return messageDate.toLocaleDateString('en-US', {
176
+ month: 'short',
177
+ day: 'numeric',
178
+ year: 'numeric'
179
+ });
180
+ } catch {
181
+ return t('common.time-recently', 'Recently');
182
+ }
183
+ }, [t]);
184
+ const formatAbsoluteDate = (0, _react.useCallback)(date => {
185
+ try {
186
+ const value = new Date(date);
187
+ if (isNaN(value.getTime())) {
188
+ return t('common.time-recently', 'Recently');
189
+ }
190
+ return value.toLocaleDateString('en-US', {
191
+ month: 'short',
192
+ day: 'numeric'
193
+ });
194
+ } catch {
195
+ return t('common.time-recently', 'Recently');
196
+ }
197
+ }, [t]);
198
+ const getSessionPreview = (0, _react.useCallback)(session => {
199
+ if (session.preview?.trim()) {
200
+ return session.preview;
201
+ }
202
+ if (session.messageCount && session.messageCount > 0) {
203
+ return t('assistant.session-has-messages', 'Continue this conversation where you left off.');
204
+ }
205
+ return t('assistant.session-awaiting-first-message', 'A fresh thread ready for the next prompt.');
206
+ }, [t]);
207
+ const renderSession = ({
208
+ item
209
+ }) => {
210
+ const isDeleting = deletingSessionId === item.id;
211
+ const preview = getSessionPreview(item);
212
+ const messageCountLabel = item.messageCount === 1 ? t('assistant.msg', 'msg') : t('assistant.msgs', 'msgs');
213
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
214
+ onPress: () => !isDeleting && onSelectSession(item),
215
+ disabled: isDeleting,
216
+ activeOpacity: 0.88,
217
+ style: [styles.sessionPressable, {
218
+ opacity: isDeleting ? 0.5 : 1
219
+ }],
220
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
221
+ style: [styles.sessionItem, {
222
+ paddingVertical: theme.spacing[4],
223
+ paddingHorizontal: theme.spacing[4],
224
+ borderRadius: theme.borderRadius.xl,
225
+ backgroundColor: theme.colors.card,
226
+ borderWidth: 1,
227
+ borderColor: theme.colors.border,
228
+ shadowColor: '#0f172a',
229
+ shadowOffset: {
230
+ width: 0,
231
+ height: 10
232
+ },
233
+ shadowOpacity: theme.isDark ? 0.18 : 0.08,
234
+ shadowRadius: 24,
235
+ elevation: 3
236
+ }],
237
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
238
+ style: styles.sessionTopRow,
239
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
240
+ style: [styles.sessionAvatar, {
241
+ backgroundColor: `${theme.colors.primary}14`,
242
+ borderRadius: theme.borderRadius.lg
243
+ }],
244
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.MessageSquareText, {
245
+ size: 18,
246
+ color: theme.colors.primary,
247
+ strokeWidth: 2.2
248
+ })
249
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
250
+ style: styles.sessionContent,
251
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
252
+ style: styles.sessionHeaderRow,
253
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
254
+ style: [styles.sessionTitle, {
255
+ color: theme.colors.foreground
256
+ }],
257
+ numberOfLines: 1,
258
+ children: item.subject || t('assistant.untitled-session', 'Untitled Session')
259
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
260
+ style: [styles.dateChip, {
261
+ backgroundColor: theme.colors.muted,
262
+ borderRadius: theme.borderRadius.full
263
+ }],
264
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.Clock3, {
265
+ size: 12,
266
+ color: theme.colors.mutedForeground,
267
+ strokeWidth: 2.1
268
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
269
+ style: [styles.dateChipText, {
270
+ color: theme.colors.mutedForeground
271
+ }],
272
+ children: formatAbsoluteDate(item.lastModifiedOn)
273
+ })]
274
+ })]
275
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
276
+ style: [styles.previewText, {
277
+ color: theme.colors.mutedForeground
278
+ }],
279
+ numberOfLines: 2,
280
+ children: preview
281
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
282
+ style: [styles.metaRow, {
283
+ marginTop: theme.spacing[2]
284
+ }],
285
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
286
+ style: [styles.metaChip, {
287
+ backgroundColor: theme.colors.muted,
288
+ borderRadius: theme.borderRadius.full
289
+ }],
290
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.RefreshCw, {
291
+ size: 12,
292
+ color: theme.colors.mutedForeground,
293
+ strokeWidth: 2.1
294
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
295
+ style: [styles.metaChipText, {
296
+ color: theme.colors.mutedForeground
297
+ }],
298
+ children: `${t('assistant.updated', 'Updated')} ${formatDate(item.lastModifiedOn)}`
299
+ })]
300
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
301
+ style: [styles.metaChip, {
302
+ backgroundColor: `${theme.colors.primary}12`,
303
+ borderRadius: theme.borderRadius.full
304
+ }],
305
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.MessagesSquare, {
306
+ size: 12,
307
+ color: theme.colors.primary,
308
+ strokeWidth: 2.1
309
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
310
+ style: [styles.metaChipText, {
311
+ color: theme.colors.primary
312
+ }],
313
+ children: `${item.messageCount || 0} ${messageCountLabel}`
314
+ })]
315
+ })]
316
+ })]
317
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
318
+ style: styles.trailingActions,
319
+ children: [isDeleting ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
320
+ style: {
321
+ width: 36,
322
+ height: 36,
323
+ borderRadius: theme.borderRadius.full,
324
+ backgroundColor: theme.colors.muted,
325
+ opacity: 0.5
326
+ }
327
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
328
+ onPress: e => {
329
+ e.stopPropagation();
330
+ setSessionToDelete(item);
331
+ },
332
+ style: [styles.iconButton, {
333
+ borderRadius: theme.borderRadius.full,
334
+ backgroundColor: theme.colors.muted
335
+ }],
336
+ hitSlop: {
337
+ top: 10,
338
+ bottom: 10,
339
+ left: 10,
340
+ right: 10
341
+ },
342
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.Trash2, {
343
+ size: 16,
344
+ color: theme.colors.mutedForeground,
345
+ strokeWidth: 2.2
346
+ })
347
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
348
+ style: [styles.arrowBadge, {
349
+ backgroundColor: `${theme.colors.primary}10`,
350
+ borderRadius: theme.borderRadius.full
351
+ }],
352
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.ArrowRight, {
353
+ size: 16,
354
+ color: theme.colors.primary,
355
+ strokeWidth: 2.2
356
+ })
357
+ })]
358
+ })]
359
+ })
360
+ })
361
+ });
362
+ };
363
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
364
+ style: [styles.container, {
365
+ backgroundColor: theme.colors.background
366
+ }],
367
+ children: [showHeader && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
368
+ style: [styles.heroWrap, {
369
+ padding: theme.spacing[4],
370
+ backgroundColor: theme.colors.background,
371
+ borderBottomWidth: 1,
372
+ borderBottomColor: theme.colors.border
373
+ }],
374
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
375
+ style: [styles.heroCard, {
376
+ backgroundColor: theme.colors.card,
377
+ borderColor: theme.colors.border,
378
+ borderRadius: theme.borderRadius.xl,
379
+ shadowColor: '#0f172a',
380
+ shadowOffset: {
381
+ width: 0,
382
+ height: 10
383
+ },
384
+ shadowOpacity: theme.isDark ? 0.16 : 0.08,
385
+ shadowRadius: 24,
386
+ elevation: 3
387
+ }],
388
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
389
+ style: styles.heroTopRow,
390
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
391
+ style: styles.heroTitleWrap,
392
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
393
+ style: [styles.heroIconWrap, {
394
+ backgroundColor: `${theme.colors.primary}12`,
395
+ borderRadius: theme.borderRadius.lg
396
+ }],
397
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.MessagesSquare, {
398
+ size: 22,
399
+ color: theme.colors.primary,
400
+ strokeWidth: 2.2
401
+ })
402
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
403
+ style: [styles.heroTitle, {
404
+ color: theme.colors.foreground,
405
+ marginLeft: theme.spacing[2]
406
+ }],
407
+ children: t('assistant.sessions', 'Sessions')
408
+ })]
409
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
410
+ onPress: onNewChat,
411
+ style: [styles.newChatButton, {
412
+ borderRadius: theme.borderRadius.full,
413
+ backgroundColor: theme.colors.primary
414
+ }],
415
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.Plus, {
416
+ size: 16,
417
+ color: theme.colors.primaryForeground,
418
+ strokeWidth: 2.4
419
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
420
+ style: [styles.newChatButtonText, {
421
+ color: theme.colors.primaryForeground
422
+ }],
423
+ children: t('assistant.new-chat', 'New Chat')
424
+ })]
425
+ })]
426
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
427
+ style: [styles.heroDescription, {
428
+ color: theme.colors.mutedForeground,
429
+ marginTop: theme.spacing[2]
430
+ }],
431
+ children: t('assistant.sessions-desc', 'Resume earlier threads, revisit ideas, and jump back into recent work instantly.')
432
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
433
+ style: [styles.heroMetaRow, {
434
+ marginTop: theme.spacing[3]
435
+ }],
436
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
437
+ style: [styles.heroStatChip, {
438
+ backgroundColor: theme.colors.muted,
439
+ borderRadius: theme.borderRadius.full
440
+ }],
441
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.MessagesSquare, {
442
+ size: 13,
443
+ color: theme.colors.foreground,
444
+ strokeWidth: 2.2
445
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
446
+ style: [styles.heroStatText, {
447
+ color: theme.colors.foreground
448
+ }],
449
+ children: `${sessions.length} ${t('assistant.sessions', 'Sessions')}`
450
+ })]
451
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
452
+ style: [styles.heroStatChip, {
453
+ backgroundColor: `${theme.colors.primary}12`,
454
+ borderRadius: theme.borderRadius.full
455
+ }],
456
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.Sparkles, {
457
+ size: 13,
458
+ color: theme.colors.primary,
459
+ strokeWidth: 2.2
460
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
461
+ style: [styles.heroStatText, {
462
+ color: theme.colors.primary
463
+ }],
464
+ children: t('assistant.pick-up-where-left-off', 'Pick up where you left off')
465
+ })]
466
+ })]
467
+ })]
468
+ })
469
+ }), loading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
470
+ style: {
471
+ flex: 1,
472
+ padding: theme.spacing[4]
473
+ },
474
+ children: [1, 2, 3, 4, 5].map(i => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
475
+ style: [styles.loadingCard, {
476
+ marginBottom: theme.spacing[3],
477
+ paddingVertical: theme.spacing[4],
478
+ paddingHorizontal: theme.spacing[4],
479
+ borderRadius: theme.borderRadius.xl,
480
+ backgroundColor: theme.colors.card,
481
+ borderWidth: 1,
482
+ borderColor: theme.colors.border
483
+ }],
484
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
485
+ style: styles.sessionTopRow,
486
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
487
+ style: {
488
+ width: 48,
489
+ height: 48,
490
+ backgroundColor: theme.colors.muted,
491
+ borderRadius: theme.borderRadius.lg,
492
+ marginRight: theme.spacing[3],
493
+ opacity: 0.6
494
+ }
495
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
496
+ style: {
497
+ flex: 1
498
+ },
499
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
500
+ style: {
501
+ height: 16,
502
+ backgroundColor: theme.colors.muted,
503
+ borderRadius: theme.borderRadius.sm,
504
+ marginBottom: theme.spacing[1.5],
505
+ width: `${56 + Math.random() * 22}%`,
506
+ opacity: 0.7
507
+ }
508
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
509
+ style: {
510
+ height: 12,
511
+ backgroundColor: theme.colors.muted,
512
+ borderRadius: theme.borderRadius.sm,
513
+ width: `${70 + Math.random() * 18}%`,
514
+ opacity: 0.45
515
+ }
516
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
517
+ style: {
518
+ flexDirection: 'row',
519
+ marginTop: theme.spacing[2],
520
+ gap: theme.spacing[2]
521
+ },
522
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
523
+ style: {
524
+ height: 26,
525
+ width: 110,
526
+ backgroundColor: theme.colors.muted,
527
+ borderRadius: theme.borderRadius.full,
528
+ opacity: 0.35
529
+ }
530
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
531
+ style: {
532
+ height: 26,
533
+ width: 72,
534
+ backgroundColor: theme.colors.muted,
535
+ borderRadius: theme.borderRadius.full,
536
+ opacity: 0.35
537
+ }
538
+ })]
539
+ })]
540
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
541
+ style: {
542
+ marginLeft: theme.spacing[3],
543
+ gap: theme.spacing[2]
544
+ },
545
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
546
+ style: {
547
+ width: 36,
548
+ height: 36,
549
+ borderRadius: theme.borderRadius.full,
550
+ backgroundColor: theme.colors.muted,
551
+ opacity: 0.35
552
+ }
553
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
554
+ style: {
555
+ width: 36,
556
+ height: 36,
557
+ borderRadius: theme.borderRadius.full,
558
+ backgroundColor: theme.colors.muted,
559
+ opacity: 0.25
560
+ }
561
+ })]
562
+ })]
563
+ })
564
+ }, i))
565
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.FlatList, {
566
+ data: sessions,
567
+ renderItem: renderSession,
568
+ keyExtractor: item => item.id,
569
+ style: {
570
+ flex: 1
571
+ },
572
+ contentContainerStyle: {
573
+ padding: theme.spacing[4]
574
+ },
575
+ refreshing: refreshing,
576
+ onRefresh: () => fetchSessions(true),
577
+ ListEmptyComponent: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
578
+ style: [styles.emptyWrap, {
579
+ paddingVertical: theme.spacing[6]
580
+ }],
581
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
582
+ style: [styles.emptyCard, {
583
+ backgroundColor: theme.colors.card,
584
+ borderColor: theme.colors.border,
585
+ borderRadius: theme.borderRadius.xl
586
+ }],
587
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
588
+ style: [styles.emptyIconWrap, {
589
+ backgroundColor: `${theme.colors.primary}12`,
590
+ borderRadius: theme.borderRadius.xl
591
+ }],
592
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.MessagesSquare, {
593
+ size: 34,
594
+ color: theme.colors.primary,
595
+ strokeWidth: 2.1
596
+ })
597
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
598
+ style: {
599
+ marginTop: theme.spacing[3],
600
+ fontSize: 18,
601
+ fontWeight: '700',
602
+ color: theme.colors.foreground
603
+ },
604
+ children: t('assistant.no-sessions', 'No sessions yet')
605
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
606
+ style: {
607
+ marginTop: theme.spacing[1.5],
608
+ fontSize: 14,
609
+ lineHeight: 21,
610
+ color: theme.colors.mutedForeground,
611
+ textAlign: 'center'
612
+ },
613
+ children: t('assistant.no-sessions-desc', 'Start a new conversation to create your first session')
614
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
615
+ onPress: onNewChat,
616
+ style: {
617
+ marginTop: theme.spacing[4],
618
+ paddingVertical: theme.spacing[3],
619
+ paddingHorizontal: theme.spacing[4],
620
+ borderRadius: theme.borderRadius.full,
621
+ backgroundColor: theme.colors.primary,
622
+ flexDirection: 'row',
623
+ alignItems: 'center'
624
+ },
625
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.Plus, {
626
+ size: 16,
627
+ color: theme.colors.primaryForeground,
628
+ strokeWidth: 2.4
629
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
630
+ style: {
631
+ fontSize: 14,
632
+ fontWeight: '700',
633
+ color: theme.colors.primaryForeground,
634
+ marginLeft: theme.spacing[1.5]
635
+ },
636
+ children: t('assistant.start-new-chat', 'Start New Chat')
637
+ })]
638
+ })]
639
+ })
640
+ })
641
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_index2.AlertDialog, {
642
+ visible: !!sessionToDelete,
643
+ onCancel: () => setSessionToDelete(null),
644
+ onConfirm: () => {
645
+ if (sessionToDelete) {
646
+ deleteSession(sessionToDelete.id);
647
+ setSessionToDelete(null);
648
+ }
649
+ },
650
+ title: t('assistant.delete-session-title', 'Delete Session?'),
651
+ description: t('assistant.delete-session-desc', 'Are you sure you want to delete this session? This action cannot be undone. Please confirm your choice.\n\nThe associated child records from the following data source will be deleted automatically:\n• Messages'),
652
+ variant: "destructive",
653
+ confirmText: t('common.delete', 'Delete'),
654
+ cancelText: t('common.cancel', 'Cancel')
655
+ })]
656
+ });
657
+ }
658
+ const styles = _reactNative.StyleSheet.create({
659
+ container: {
660
+ flex: 1
661
+ },
662
+ heroWrap: {},
663
+ heroCard: {
664
+ borderWidth: 1,
665
+ padding: 16
666
+ },
667
+ heroTopRow: {
668
+ flexDirection: 'row',
669
+ alignItems: 'center',
670
+ justifyContent: 'space-between'
671
+ },
672
+ heroTitleWrap: {
673
+ flexDirection: 'row',
674
+ alignItems: 'center',
675
+ flex: 1,
676
+ marginRight: 12
677
+ },
678
+ heroIconWrap: {
679
+ width: 44,
680
+ height: 44,
681
+ alignItems: 'center',
682
+ justifyContent: 'center'
683
+ },
684
+ heroTitle: {
685
+ fontSize: 22,
686
+ fontWeight: '700',
687
+ letterSpacing: -0.4
688
+ },
689
+ heroDescription: {
690
+ fontSize: 14,
691
+ lineHeight: 21
692
+ },
693
+ heroMetaRow: {
694
+ flexDirection: 'row',
695
+ flexWrap: 'wrap',
696
+ gap: 10
697
+ },
698
+ heroStatChip: {
699
+ flexDirection: 'row',
700
+ alignItems: 'center',
701
+ paddingHorizontal: 12,
702
+ paddingVertical: 8
703
+ },
704
+ heroStatText: {
705
+ fontSize: 12,
706
+ fontWeight: '700',
707
+ marginLeft: 6
708
+ },
709
+ newChatButton: {
710
+ flexDirection: 'row',
711
+ alignItems: 'center',
712
+ paddingHorizontal: 14,
713
+ paddingVertical: 10
714
+ },
715
+ newChatButtonText: {
716
+ fontSize: 14,
717
+ fontWeight: '700',
718
+ marginLeft: 8
719
+ },
720
+ sessionPressable: {
721
+ marginBottom: 12
722
+ },
723
+ sessionItem: {
724
+ overflow: 'hidden'
725
+ },
726
+ sessionTopRow: {
727
+ flexDirection: 'row',
728
+ alignItems: 'flex-start'
729
+ },
730
+ sessionAvatar: {
731
+ width: 48,
732
+ height: 48,
733
+ alignItems: 'center',
734
+ justifyContent: 'center',
735
+ marginRight: 12
736
+ },
737
+ sessionContent: {
738
+ flex: 1
739
+ },
740
+ sessionHeaderRow: {
741
+ flexDirection: 'row',
742
+ alignItems: 'center'
743
+ },
744
+ sessionTitle: {
745
+ flex: 1,
746
+ fontSize: 16,
747
+ fontWeight: '700',
748
+ letterSpacing: -0.3,
749
+ marginRight: 8
750
+ },
751
+ dateChip: {
752
+ flexDirection: 'row',
753
+ alignItems: 'center',
754
+ paddingHorizontal: 10,
755
+ paddingVertical: 6
756
+ },
757
+ dateChipText: {
758
+ fontSize: 11,
759
+ fontWeight: '700',
760
+ marginLeft: 6
761
+ },
762
+ previewText: {
763
+ fontSize: 14,
764
+ lineHeight: 20,
765
+ marginTop: 6
766
+ },
767
+ metaRow: {
768
+ flexDirection: 'row',
769
+ flexWrap: 'wrap',
770
+ gap: 8
771
+ },
772
+ metaChip: {
773
+ flexDirection: 'row',
774
+ alignItems: 'center',
775
+ paddingHorizontal: 10,
776
+ paddingVertical: 7
777
+ },
778
+ metaChipText: {
779
+ fontSize: 11,
780
+ fontWeight: '700',
781
+ marginLeft: 6
782
+ },
783
+ trailingActions: {
784
+ marginLeft: 12,
785
+ gap: 10,
786
+ alignItems: 'center'
787
+ },
788
+ iconButton: {
789
+ width: 36,
790
+ height: 36,
791
+ alignItems: 'center',
792
+ justifyContent: 'center'
793
+ },
794
+ arrowBadge: {
795
+ width: 36,
796
+ height: 36,
797
+ alignItems: 'center',
798
+ justifyContent: 'center'
799
+ },
800
+ loadingCard: {},
801
+ emptyWrap: {
802
+ alignItems: 'center',
803
+ justifyContent: 'center'
804
+ },
805
+ emptyCard: {
806
+ width: '100%',
807
+ borderWidth: 1,
808
+ alignItems: 'center',
809
+ paddingVertical: 32,
810
+ paddingHorizontal: 24
811
+ },
812
+ emptyIconWrap: {
813
+ width: 72,
814
+ height: 72,
815
+ alignItems: 'center',
816
+ justifyContent: 'center'
817
+ }
818
+ });
819
+ SessionsList.displayName = 'SessionsList';
820
+ //# sourceMappingURL=sessions-list.js.map