nastech-app 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1111) hide show
  1. package/.claude/agents/i18n-translator.md +119 -0
  2. package/.claude/settings.json +8 -0
  3. package/.eas/workflows/ota.yaml +9 -0
  4. package/.eas/workflows/preview.yaml +12 -0
  5. package/.easignore +12 -0
  6. package/.github/workflows/eas-build.yml +24 -0
  7. package/CHANGELOG.md +117 -0
  8. package/CLAUDE.md +413 -0
  9. package/GoogleService-Info.plist +30 -0
  10. package/LICENSE +21 -0
  11. package/NasTechapp.md +383 -0
  12. package/README.md +75 -0
  13. package/Stores.md +85 -0
  14. package/TERMS.md +83 -0
  15. package/app.config.js +153 -0
  16. package/babel.config.js +28 -0
  17. package/deploy/nastech-app.yaml +51 -0
  18. package/docs/marketing/README-creators.md +73 -0
  19. package/eas-build-post-install.sh +11 -0
  20. package/eas-build-pre-install.sh +27 -0
  21. package/eas.json +78 -0
  22. package/google-services.json +67 -0
  23. package/index.ts +3 -0
  24. package/logo.png +0 -0
  25. package/metro.config.js +54 -0
  26. package/nativewind-env.d.ts +1 -0
  27. package/package.json +233 -0
  28. package/patches/.keep +0 -0
  29. package/plugins/withEinkCompatibility.js +156 -0
  30. package/public/.well-known/apple-app-site-association +22 -0
  31. package/public/.well-known/assetlinks.json +12 -0
  32. package/public/canvaskit.wasm +0 -0
  33. package/public/favicon-active.ico +0 -0
  34. package/release-dev.sh +7 -0
  35. package/release-production.sh +3 -0
  36. package/release.cjs +160 -0
  37. package/sources/-session/SessionView.tsx +944 -0
  38. package/sources/-session/sessionOverlayNav.ts +34 -0
  39. package/sources/app/(app)/_layout.tsx +321 -0
  40. package/sources/app/(app)/artifacts/[id].tsx +279 -0
  41. package/sources/app/(app)/artifacts/edit/[id].tsx +318 -0
  42. package/sources/app/(app)/artifacts/index.tsx +264 -0
  43. package/sources/app/(app)/artifacts/new.tsx +219 -0
  44. package/sources/app/(app)/changelog.tsx +113 -0
  45. package/sources/app/(app)/dev/colors.tsx +197 -0
  46. package/sources/app/(app)/dev/device-info.tsx +183 -0
  47. package/sources/app/(app)/dev/expo-constants.tsx +394 -0
  48. package/sources/app/(app)/dev/index.tsx +400 -0
  49. package/sources/app/(app)/dev/input-styles.tsx +1951 -0
  50. package/sources/app/(app)/dev/inverted-list.tsx +295 -0
  51. package/sources/app/(app)/dev/list-demo.tsx +125 -0
  52. package/sources/app/(app)/dev/logs.tsx +160 -0
  53. package/sources/app/(app)/dev/messages-demo-data.ts +479 -0
  54. package/sources/app/(app)/dev/messages-demo.tsx +45 -0
  55. package/sources/app/(app)/dev/modal-demo.tsx +211 -0
  56. package/sources/app/(app)/dev/multi-text-input.tsx +224 -0
  57. package/sources/app/(app)/dev/purchases.tsx +228 -0
  58. package/sources/app/(app)/dev/qr-test.tsx +168 -0
  59. package/sources/app/(app)/dev/session-composer.tsx +812 -0
  60. package/sources/app/(app)/dev/shimmer-demo.tsx +275 -0
  61. package/sources/app/(app)/dev/tests.tsx +203 -0
  62. package/sources/app/(app)/dev/tools2.tsx +556 -0
  63. package/sources/app/(app)/dev/typography.tsx +177 -0
  64. package/sources/app/(app)/dev/unistyles-demo.tsx +376 -0
  65. package/sources/app/(app)/friends/index.tsx +167 -0
  66. package/sources/app/(app)/friends/search.tsx +232 -0
  67. package/sources/app/(app)/inbox/index.tsx +124 -0
  68. package/sources/app/(app)/index.tsx +264 -0
  69. package/sources/app/(app)/machine/[id].tsx +646 -0
  70. package/sources/app/(app)/new/index.tsx +1611 -0
  71. package/sources/app/(app)/restore/index.tsx +167 -0
  72. package/sources/app/(app)/restore/manual.tsx +138 -0
  73. package/sources/app/(app)/server.tsx +234 -0
  74. package/sources/app/(app)/session/[id]/file.tsx +527 -0
  75. package/sources/app/(app)/session/[id]/files.tsx +442 -0
  76. package/sources/app/(app)/session/[id]/info.tsx +655 -0
  77. package/sources/app/(app)/session/[id]/message/[messageId].tsx +125 -0
  78. package/sources/app/(app)/session/[id].tsx +10 -0
  79. package/sources/app/(app)/session/recent.tsx +270 -0
  80. package/sources/app/(app)/settings/account.tsx +600 -0
  81. package/sources/app/(app)/settings/agents.tsx +180 -0
  82. package/sources/app/(app)/settings/appearance.tsx +259 -0
  83. package/sources/app/(app)/settings/connect/claude.tsx +178 -0
  84. package/sources/app/(app)/settings/features.tsx +177 -0
  85. package/sources/app/(app)/settings/index.tsx +3 -0
  86. package/sources/app/(app)/settings/language.tsx +106 -0
  87. package/sources/app/(app)/settings/usage.tsx +11 -0
  88. package/sources/app/(app)/settings/voice/language.tsx +114 -0
  89. package/sources/app/(app)/settings/voice.tsx +274 -0
  90. package/sources/app/(app)/terminal/connect.tsx +241 -0
  91. package/sources/app/(app)/terminal/index.tsx +184 -0
  92. package/sources/app/(app)/text-selection.tsx +149 -0
  93. package/sources/app/(app)/user/[id].tsx +314 -0
  94. package/sources/app/+html.tsx +39 -0
  95. package/sources/app/_layout.tsx +402 -0
  96. package/sources/assets/animations/game.json +1 -0
  97. package/sources/assets/animations/owl.json +1 -0
  98. package/sources/assets/animations/popcorn.json +1 -0
  99. package/sources/assets/animations/robot.json +1 -0
  100. package/sources/assets/animations/sparkles.json +1 -0
  101. package/sources/assets/animations/stone.json +1 -0
  102. package/sources/assets/fonts/BricolageGrotesque-Bold.ttf +0 -0
  103. package/sources/assets/fonts/IBMPlexMono-Italic.ttf +0 -0
  104. package/sources/assets/fonts/IBMPlexMono-Regular.ttf +0 -0
  105. package/sources/assets/fonts/IBMPlexMono-SemiBold.ttf +0 -0
  106. package/sources/assets/fonts/IBMPlexSans-Italic.ttf +0 -0
  107. package/sources/assets/fonts/IBMPlexSans-Regular.ttf +0 -0
  108. package/sources/assets/fonts/IBMPlexSans-SemiBold.ttf +0 -0
  109. package/sources/assets/fonts/SpaceMono-Regular.ttf +0 -0
  110. package/sources/assets/images/brutalist/Abstract-1.png +0 -0
  111. package/sources/assets/images/brutalist/Abstract-10.png +0 -0
  112. package/sources/assets/images/brutalist/Abstract-100.png +0 -0
  113. package/sources/assets/images/brutalist/Abstract-101.png +0 -0
  114. package/sources/assets/images/brutalist/Abstract-102.png +0 -0
  115. package/sources/assets/images/brutalist/Abstract-103.png +0 -0
  116. package/sources/assets/images/brutalist/Abstract-104.png +0 -0
  117. package/sources/assets/images/brutalist/Abstract-105.png +0 -0
  118. package/sources/assets/images/brutalist/Abstract-106.png +0 -0
  119. package/sources/assets/images/brutalist/Abstract-107.png +0 -0
  120. package/sources/assets/images/brutalist/Abstract-108.png +0 -0
  121. package/sources/assets/images/brutalist/Abstract-109.png +0 -0
  122. package/sources/assets/images/brutalist/Abstract-11.png +0 -0
  123. package/sources/assets/images/brutalist/Abstract-110.png +0 -0
  124. package/sources/assets/images/brutalist/Abstract-111.png +0 -0
  125. package/sources/assets/images/brutalist/Abstract-112.png +0 -0
  126. package/sources/assets/images/brutalist/Abstract-113.png +0 -0
  127. package/sources/assets/images/brutalist/Abstract-114.png +0 -0
  128. package/sources/assets/images/brutalist/Abstract-115.png +0 -0
  129. package/sources/assets/images/brutalist/Abstract-116.png +0 -0
  130. package/sources/assets/images/brutalist/Abstract-117.png +0 -0
  131. package/sources/assets/images/brutalist/Abstract-118.png +0 -0
  132. package/sources/assets/images/brutalist/Abstract-119.png +0 -0
  133. package/sources/assets/images/brutalist/Abstract-12.png +0 -0
  134. package/sources/assets/images/brutalist/Abstract-120.png +0 -0
  135. package/sources/assets/images/brutalist/Abstract-121.png +0 -0
  136. package/sources/assets/images/brutalist/Abstract-122.png +0 -0
  137. package/sources/assets/images/brutalist/Abstract-123.png +0 -0
  138. package/sources/assets/images/brutalist/Abstract-124.png +0 -0
  139. package/sources/assets/images/brutalist/Abstract-125.png +0 -0
  140. package/sources/assets/images/brutalist/Abstract-126.png +0 -0
  141. package/sources/assets/images/brutalist/Abstract-127.png +0 -0
  142. package/sources/assets/images/brutalist/Abstract-128.png +0 -0
  143. package/sources/assets/images/brutalist/Abstract-129.png +0 -0
  144. package/sources/assets/images/brutalist/Abstract-13.png +0 -0
  145. package/sources/assets/images/brutalist/Abstract-130.png +0 -0
  146. package/sources/assets/images/brutalist/Abstract-131.png +0 -0
  147. package/sources/assets/images/brutalist/Abstract-132.png +0 -0
  148. package/sources/assets/images/brutalist/Abstract-133.png +0 -0
  149. package/sources/assets/images/brutalist/Abstract-134.png +0 -0
  150. package/sources/assets/images/brutalist/Abstract-135.png +0 -0
  151. package/sources/assets/images/brutalist/Abstract-136.png +0 -0
  152. package/sources/assets/images/brutalist/Abstract-137.png +0 -0
  153. package/sources/assets/images/brutalist/Abstract-138.png +0 -0
  154. package/sources/assets/images/brutalist/Abstract-139.png +0 -0
  155. package/sources/assets/images/brutalist/Abstract-14.png +0 -0
  156. package/sources/assets/images/brutalist/Abstract-140.png +0 -0
  157. package/sources/assets/images/brutalist/Abstract-141.png +0 -0
  158. package/sources/assets/images/brutalist/Abstract-142.png +0 -0
  159. package/sources/assets/images/brutalist/Abstract-143.png +0 -0
  160. package/sources/assets/images/brutalist/Abstract-144.png +0 -0
  161. package/sources/assets/images/brutalist/Abstract-145.png +0 -0
  162. package/sources/assets/images/brutalist/Abstract-146.png +0 -0
  163. package/sources/assets/images/brutalist/Abstract-147.png +0 -0
  164. package/sources/assets/images/brutalist/Abstract-148.png +0 -0
  165. package/sources/assets/images/brutalist/Abstract-149.png +0 -0
  166. package/sources/assets/images/brutalist/Abstract-15.png +0 -0
  167. package/sources/assets/images/brutalist/Abstract-150.png +0 -0
  168. package/sources/assets/images/brutalist/Abstract-151.png +0 -0
  169. package/sources/assets/images/brutalist/Abstract-152.png +0 -0
  170. package/sources/assets/images/brutalist/Abstract-153.png +0 -0
  171. package/sources/assets/images/brutalist/Abstract-154.png +0 -0
  172. package/sources/assets/images/brutalist/Abstract-155.png +0 -0
  173. package/sources/assets/images/brutalist/Abstract-156.png +0 -0
  174. package/sources/assets/images/brutalist/Abstract-157.png +0 -0
  175. package/sources/assets/images/brutalist/Abstract-158.png +0 -0
  176. package/sources/assets/images/brutalist/Abstract-159.png +0 -0
  177. package/sources/assets/images/brutalist/Abstract-16.png +0 -0
  178. package/sources/assets/images/brutalist/Abstract-160.png +0 -0
  179. package/sources/assets/images/brutalist/Abstract-161.png +0 -0
  180. package/sources/assets/images/brutalist/Abstract-162.png +0 -0
  181. package/sources/assets/images/brutalist/Abstract-163.png +0 -0
  182. package/sources/assets/images/brutalist/Abstract-164.png +0 -0
  183. package/sources/assets/images/brutalist/Abstract-165.png +0 -0
  184. package/sources/assets/images/brutalist/Abstract-166.png +0 -0
  185. package/sources/assets/images/brutalist/Abstract-167.png +0 -0
  186. package/sources/assets/images/brutalist/Abstract-168.png +0 -0
  187. package/sources/assets/images/brutalist/Abstract-169.png +0 -0
  188. package/sources/assets/images/brutalist/Abstract-17.png +0 -0
  189. package/sources/assets/images/brutalist/Abstract-170.png +0 -0
  190. package/sources/assets/images/brutalist/Abstract-171.png +0 -0
  191. package/sources/assets/images/brutalist/Abstract-172.png +0 -0
  192. package/sources/assets/images/brutalist/Abstract-173.png +0 -0
  193. package/sources/assets/images/brutalist/Abstract-174.png +0 -0
  194. package/sources/assets/images/brutalist/Abstract-175.png +0 -0
  195. package/sources/assets/images/brutalist/Abstract-176.png +0 -0
  196. package/sources/assets/images/brutalist/Abstract-177.png +0 -0
  197. package/sources/assets/images/brutalist/Abstract-178.png +0 -0
  198. package/sources/assets/images/brutalist/Abstract-179.png +0 -0
  199. package/sources/assets/images/brutalist/Abstract-18.png +0 -0
  200. package/sources/assets/images/brutalist/Abstract-180.png +0 -0
  201. package/sources/assets/images/brutalist/Abstract-181.png +0 -0
  202. package/sources/assets/images/brutalist/Abstract-182.png +0 -0
  203. package/sources/assets/images/brutalist/Abstract-183.png +0 -0
  204. package/sources/assets/images/brutalist/Abstract-184.png +0 -0
  205. package/sources/assets/images/brutalist/Abstract-185.png +0 -0
  206. package/sources/assets/images/brutalist/Abstract-186.png +0 -0
  207. package/sources/assets/images/brutalist/Abstract-187.png +0 -0
  208. package/sources/assets/images/brutalist/Abstract-188.png +0 -0
  209. package/sources/assets/images/brutalist/Abstract-189.png +0 -0
  210. package/sources/assets/images/brutalist/Abstract-19.png +0 -0
  211. package/sources/assets/images/brutalist/Abstract-190.png +0 -0
  212. package/sources/assets/images/brutalist/Abstract-191.png +0 -0
  213. package/sources/assets/images/brutalist/Abstract-192.png +0 -0
  214. package/sources/assets/images/brutalist/Abstract-193.png +0 -0
  215. package/sources/assets/images/brutalist/Abstract-194.png +0 -0
  216. package/sources/assets/images/brutalist/Abstract-195.png +0 -0
  217. package/sources/assets/images/brutalist/Abstract-196.png +0 -0
  218. package/sources/assets/images/brutalist/Abstract-197.png +0 -0
  219. package/sources/assets/images/brutalist/Abstract-198.png +0 -0
  220. package/sources/assets/images/brutalist/Abstract-199.png +0 -0
  221. package/sources/assets/images/brutalist/Abstract-2.png +0 -0
  222. package/sources/assets/images/brutalist/Abstract-20.png +0 -0
  223. package/sources/assets/images/brutalist/Abstract-200.png +0 -0
  224. package/sources/assets/images/brutalist/Abstract-201.png +0 -0
  225. package/sources/assets/images/brutalist/Abstract-202.png +0 -0
  226. package/sources/assets/images/brutalist/Abstract-203.png +0 -0
  227. package/sources/assets/images/brutalist/Abstract-204.png +0 -0
  228. package/sources/assets/images/brutalist/Abstract-205.png +0 -0
  229. package/sources/assets/images/brutalist/Abstract-206.png +0 -0
  230. package/sources/assets/images/brutalist/Abstract-207.png +0 -0
  231. package/sources/assets/images/brutalist/Abstract-208.png +0 -0
  232. package/sources/assets/images/brutalist/Abstract-209.png +0 -0
  233. package/sources/assets/images/brutalist/Abstract-21.png +0 -0
  234. package/sources/assets/images/brutalist/Abstract-210.png +0 -0
  235. package/sources/assets/images/brutalist/Abstract-211.png +0 -0
  236. package/sources/assets/images/brutalist/Abstract-212.png +0 -0
  237. package/sources/assets/images/brutalist/Abstract-213.png +0 -0
  238. package/sources/assets/images/brutalist/Abstract-214.png +0 -0
  239. package/sources/assets/images/brutalist/Abstract-215.png +0 -0
  240. package/sources/assets/images/brutalist/Abstract-216.png +0 -0
  241. package/sources/assets/images/brutalist/Abstract-217.png +0 -0
  242. package/sources/assets/images/brutalist/Abstract-218.png +0 -0
  243. package/sources/assets/images/brutalist/Abstract-219.png +0 -0
  244. package/sources/assets/images/brutalist/Abstract-22.png +0 -0
  245. package/sources/assets/images/brutalist/Abstract-220.png +0 -0
  246. package/sources/assets/images/brutalist/Abstract-221.png +0 -0
  247. package/sources/assets/images/brutalist/Abstract-222.png +0 -0
  248. package/sources/assets/images/brutalist/Abstract-223.png +0 -0
  249. package/sources/assets/images/brutalist/Abstract-224.png +0 -0
  250. package/sources/assets/images/brutalist/Abstract-225.png +0 -0
  251. package/sources/assets/images/brutalist/Abstract-226.png +0 -0
  252. package/sources/assets/images/brutalist/Abstract-227.png +0 -0
  253. package/sources/assets/images/brutalist/Abstract-228.png +0 -0
  254. package/sources/assets/images/brutalist/Abstract-229.png +0 -0
  255. package/sources/assets/images/brutalist/Abstract-23.png +0 -0
  256. package/sources/assets/images/brutalist/Abstract-230.png +0 -0
  257. package/sources/assets/images/brutalist/Abstract-231.png +0 -0
  258. package/sources/assets/images/brutalist/Abstract-232.png +0 -0
  259. package/sources/assets/images/brutalist/Abstract-233.png +0 -0
  260. package/sources/assets/images/brutalist/Abstract-234.png +0 -0
  261. package/sources/assets/images/brutalist/Abstract-235.png +0 -0
  262. package/sources/assets/images/brutalist/Abstract-236.png +0 -0
  263. package/sources/assets/images/brutalist/Abstract-237.png +0 -0
  264. package/sources/assets/images/brutalist/Abstract-238.png +0 -0
  265. package/sources/assets/images/brutalist/Abstract-239.png +0 -0
  266. package/sources/assets/images/brutalist/Abstract-24.png +0 -0
  267. package/sources/assets/images/brutalist/Abstract-240.png +0 -0
  268. package/sources/assets/images/brutalist/Abstract-241.png +0 -0
  269. package/sources/assets/images/brutalist/Abstract-242.png +0 -0
  270. package/sources/assets/images/brutalist/Abstract-243.png +0 -0
  271. package/sources/assets/images/brutalist/Abstract-244.png +0 -0
  272. package/sources/assets/images/brutalist/Abstract-245.png +0 -0
  273. package/sources/assets/images/brutalist/Abstract-246.png +0 -0
  274. package/sources/assets/images/brutalist/Abstract-247.png +0 -0
  275. package/sources/assets/images/brutalist/Abstract-248.png +0 -0
  276. package/sources/assets/images/brutalist/Abstract-249.png +0 -0
  277. package/sources/assets/images/brutalist/Abstract-25.png +0 -0
  278. package/sources/assets/images/brutalist/Abstract-250.png +0 -0
  279. package/sources/assets/images/brutalist/Abstract-251.png +0 -0
  280. package/sources/assets/images/brutalist/Abstract-252.png +0 -0
  281. package/sources/assets/images/brutalist/Abstract-253.png +0 -0
  282. package/sources/assets/images/brutalist/Abstract-254.png +0 -0
  283. package/sources/assets/images/brutalist/Abstract-255.png +0 -0
  284. package/sources/assets/images/brutalist/Abstract-256.png +0 -0
  285. package/sources/assets/images/brutalist/Abstract-257.png +0 -0
  286. package/sources/assets/images/brutalist/Abstract-258.png +0 -0
  287. package/sources/assets/images/brutalist/Abstract-259.png +0 -0
  288. package/sources/assets/images/brutalist/Abstract-26.png +0 -0
  289. package/sources/assets/images/brutalist/Abstract-260.png +0 -0
  290. package/sources/assets/images/brutalist/Abstract-261.png +0 -0
  291. package/sources/assets/images/brutalist/Abstract-262.png +0 -0
  292. package/sources/assets/images/brutalist/Abstract-27.png +0 -0
  293. package/sources/assets/images/brutalist/Abstract-28.png +0 -0
  294. package/sources/assets/images/brutalist/Abstract-29.png +0 -0
  295. package/sources/assets/images/brutalist/Abstract-3.png +0 -0
  296. package/sources/assets/images/brutalist/Abstract-30.png +0 -0
  297. package/sources/assets/images/brutalist/Abstract-31.png +0 -0
  298. package/sources/assets/images/brutalist/Abstract-32.png +0 -0
  299. package/sources/assets/images/brutalist/Abstract-33.png +0 -0
  300. package/sources/assets/images/brutalist/Abstract-34.png +0 -0
  301. package/sources/assets/images/brutalist/Abstract-35.png +0 -0
  302. package/sources/assets/images/brutalist/Abstract-36.png +0 -0
  303. package/sources/assets/images/brutalist/Abstract-37.png +0 -0
  304. package/sources/assets/images/brutalist/Abstract-38.png +0 -0
  305. package/sources/assets/images/brutalist/Abstract-39.png +0 -0
  306. package/sources/assets/images/brutalist/Abstract-4.png +0 -0
  307. package/sources/assets/images/brutalist/Abstract-40.png +0 -0
  308. package/sources/assets/images/brutalist/Abstract-41.png +0 -0
  309. package/sources/assets/images/brutalist/Abstract-42.png +0 -0
  310. package/sources/assets/images/brutalist/Abstract-43.png +0 -0
  311. package/sources/assets/images/brutalist/Abstract-44.png +0 -0
  312. package/sources/assets/images/brutalist/Abstract-45.png +0 -0
  313. package/sources/assets/images/brutalist/Abstract-46.png +0 -0
  314. package/sources/assets/images/brutalist/Abstract-47.png +0 -0
  315. package/sources/assets/images/brutalist/Abstract-48.png +0 -0
  316. package/sources/assets/images/brutalist/Abstract-49.png +0 -0
  317. package/sources/assets/images/brutalist/Abstract-5.png +0 -0
  318. package/sources/assets/images/brutalist/Abstract-50.png +0 -0
  319. package/sources/assets/images/brutalist/Abstract-51.png +0 -0
  320. package/sources/assets/images/brutalist/Abstract-52.png +0 -0
  321. package/sources/assets/images/brutalist/Abstract-53.png +0 -0
  322. package/sources/assets/images/brutalist/Abstract-54.png +0 -0
  323. package/sources/assets/images/brutalist/Abstract-55.png +0 -0
  324. package/sources/assets/images/brutalist/Abstract-56.png +0 -0
  325. package/sources/assets/images/brutalist/Abstract-57.png +0 -0
  326. package/sources/assets/images/brutalist/Abstract-58.png +0 -0
  327. package/sources/assets/images/brutalist/Abstract-59.png +0 -0
  328. package/sources/assets/images/brutalist/Abstract-6.png +0 -0
  329. package/sources/assets/images/brutalist/Abstract-60.png +0 -0
  330. package/sources/assets/images/brutalist/Abstract-61.png +0 -0
  331. package/sources/assets/images/brutalist/Abstract-62.png +0 -0
  332. package/sources/assets/images/brutalist/Abstract-63.png +0 -0
  333. package/sources/assets/images/brutalist/Abstract-64.png +0 -0
  334. package/sources/assets/images/brutalist/Abstract-65.png +0 -0
  335. package/sources/assets/images/brutalist/Abstract-66.png +0 -0
  336. package/sources/assets/images/brutalist/Abstract-67.png +0 -0
  337. package/sources/assets/images/brutalist/Abstract-68.png +0 -0
  338. package/sources/assets/images/brutalist/Abstract-69.png +0 -0
  339. package/sources/assets/images/brutalist/Abstract-7.png +0 -0
  340. package/sources/assets/images/brutalist/Abstract-70.png +0 -0
  341. package/sources/assets/images/brutalist/Abstract-71.png +0 -0
  342. package/sources/assets/images/brutalist/Abstract-72.png +0 -0
  343. package/sources/assets/images/brutalist/Abstract-73.png +0 -0
  344. package/sources/assets/images/brutalist/Abstract-74.png +0 -0
  345. package/sources/assets/images/brutalist/Abstract-75.png +0 -0
  346. package/sources/assets/images/brutalist/Abstract-76.png +0 -0
  347. package/sources/assets/images/brutalist/Abstract-77.png +0 -0
  348. package/sources/assets/images/brutalist/Abstract-78.png +0 -0
  349. package/sources/assets/images/brutalist/Abstract-79.png +0 -0
  350. package/sources/assets/images/brutalist/Abstract-8.png +0 -0
  351. package/sources/assets/images/brutalist/Abstract-80.png +0 -0
  352. package/sources/assets/images/brutalist/Abstract-81.png +0 -0
  353. package/sources/assets/images/brutalist/Abstract-82.png +0 -0
  354. package/sources/assets/images/brutalist/Abstract-83.png +0 -0
  355. package/sources/assets/images/brutalist/Abstract-84.png +0 -0
  356. package/sources/assets/images/brutalist/Abstract-85.png +0 -0
  357. package/sources/assets/images/brutalist/Abstract-86.png +0 -0
  358. package/sources/assets/images/brutalist/Abstract-87.png +0 -0
  359. package/sources/assets/images/brutalist/Abstract-88.png +0 -0
  360. package/sources/assets/images/brutalist/Abstract-89.png +0 -0
  361. package/sources/assets/images/brutalist/Abstract-9.png +0 -0
  362. package/sources/assets/images/brutalist/Abstract-90.png +0 -0
  363. package/sources/assets/images/brutalist/Abstract-91.png +0 -0
  364. package/sources/assets/images/brutalist/Abstract-92.png +0 -0
  365. package/sources/assets/images/brutalist/Abstract-93.png +0 -0
  366. package/sources/assets/images/brutalist/Abstract-94.png +0 -0
  367. package/sources/assets/images/brutalist/Abstract-95.png +0 -0
  368. package/sources/assets/images/brutalist/Abstract-96.png +0 -0
  369. package/sources/assets/images/brutalist/Abstract-97.png +0 -0
  370. package/sources/assets/images/brutalist/Abstract-98.png +0 -0
  371. package/sources/assets/images/brutalist/Abstract-99.png +0 -0
  372. package/sources/assets/images/brutalist/Bauhaus-1.png +0 -0
  373. package/sources/assets/images/brutalist/Bauhaus-10.png +0 -0
  374. package/sources/assets/images/brutalist/Bauhaus-11.png +0 -0
  375. package/sources/assets/images/brutalist/Bauhaus-12.png +0 -0
  376. package/sources/assets/images/brutalist/Bauhaus-13.png +0 -0
  377. package/sources/assets/images/brutalist/Bauhaus-14.png +0 -0
  378. package/sources/assets/images/brutalist/Bauhaus-15.png +0 -0
  379. package/sources/assets/images/brutalist/Bauhaus-16.png +0 -0
  380. package/sources/assets/images/brutalist/Bauhaus-17.png +0 -0
  381. package/sources/assets/images/brutalist/Bauhaus-18.png +0 -0
  382. package/sources/assets/images/brutalist/Bauhaus-19.png +0 -0
  383. package/sources/assets/images/brutalist/Bauhaus-2.png +0 -0
  384. package/sources/assets/images/brutalist/Bauhaus-20.png +0 -0
  385. package/sources/assets/images/brutalist/Bauhaus-21.png +0 -0
  386. package/sources/assets/images/brutalist/Bauhaus-22.png +0 -0
  387. package/sources/assets/images/brutalist/Bauhaus-23.png +0 -0
  388. package/sources/assets/images/brutalist/Bauhaus-24.png +0 -0
  389. package/sources/assets/images/brutalist/Bauhaus-25.png +0 -0
  390. package/sources/assets/images/brutalist/Bauhaus-26.png +0 -0
  391. package/sources/assets/images/brutalist/Bauhaus-27.png +0 -0
  392. package/sources/assets/images/brutalist/Bauhaus-28.png +0 -0
  393. package/sources/assets/images/brutalist/Bauhaus-29.png +0 -0
  394. package/sources/assets/images/brutalist/Bauhaus-3.png +0 -0
  395. package/sources/assets/images/brutalist/Bauhaus-30.png +0 -0
  396. package/sources/assets/images/brutalist/Bauhaus-31.png +0 -0
  397. package/sources/assets/images/brutalist/Bauhaus-32.png +0 -0
  398. package/sources/assets/images/brutalist/Bauhaus-33.png +0 -0
  399. package/sources/assets/images/brutalist/Bauhaus-34.png +0 -0
  400. package/sources/assets/images/brutalist/Bauhaus-35.png +0 -0
  401. package/sources/assets/images/brutalist/Bauhaus-36.png +0 -0
  402. package/sources/assets/images/brutalist/Bauhaus-37.png +0 -0
  403. package/sources/assets/images/brutalist/Bauhaus-38.png +0 -0
  404. package/sources/assets/images/brutalist/Bauhaus-39.png +0 -0
  405. package/sources/assets/images/brutalist/Bauhaus-4.png +0 -0
  406. package/sources/assets/images/brutalist/Bauhaus-40.png +0 -0
  407. package/sources/assets/images/brutalist/Bauhaus-5.png +0 -0
  408. package/sources/assets/images/brutalist/Bauhaus-6.png +0 -0
  409. package/sources/assets/images/brutalist/Bauhaus-7.png +0 -0
  410. package/sources/assets/images/brutalist/Bauhaus-8.png +0 -0
  411. package/sources/assets/images/brutalist/Bauhaus-9.png +0 -0
  412. package/sources/assets/images/brutalist/Brutalism-1.png +0 -0
  413. package/sources/assets/images/brutalist/Brutalism-10.png +0 -0
  414. package/sources/assets/images/brutalist/Brutalism-100.png +0 -0
  415. package/sources/assets/images/brutalist/Brutalism-101.png +0 -0
  416. package/sources/assets/images/brutalist/Brutalism-102.png +0 -0
  417. package/sources/assets/images/brutalist/Brutalism-103.png +0 -0
  418. package/sources/assets/images/brutalist/Brutalism-104.png +0 -0
  419. package/sources/assets/images/brutalist/Brutalism-105.png +0 -0
  420. package/sources/assets/images/brutalist/Brutalism-106.png +0 -0
  421. package/sources/assets/images/brutalist/Brutalism-107.png +0 -0
  422. package/sources/assets/images/brutalist/Brutalism-108.png +0 -0
  423. package/sources/assets/images/brutalist/Brutalism-109.png +0 -0
  424. package/sources/assets/images/brutalist/Brutalism-11.png +0 -0
  425. package/sources/assets/images/brutalist/Brutalism-110.png +0 -0
  426. package/sources/assets/images/brutalist/Brutalism-111.png +0 -0
  427. package/sources/assets/images/brutalist/Brutalism-112.png +0 -0
  428. package/sources/assets/images/brutalist/Brutalism-113.png +0 -0
  429. package/sources/assets/images/brutalist/Brutalism-114.png +0 -0
  430. package/sources/assets/images/brutalist/Brutalism-115.png +0 -0
  431. package/sources/assets/images/brutalist/Brutalism-116.png +0 -0
  432. package/sources/assets/images/brutalist/Brutalism-117.png +0 -0
  433. package/sources/assets/images/brutalist/Brutalism-118.png +0 -0
  434. package/sources/assets/images/brutalist/Brutalism-12.png +0 -0
  435. package/sources/assets/images/brutalist/Brutalism-13.png +0 -0
  436. package/sources/assets/images/brutalist/Brutalism-14.png +0 -0
  437. package/sources/assets/images/brutalist/Brutalism-15.png +0 -0
  438. package/sources/assets/images/brutalist/Brutalism-16.png +0 -0
  439. package/sources/assets/images/brutalist/Brutalism-17.png +0 -0
  440. package/sources/assets/images/brutalist/Brutalism-18.png +0 -0
  441. package/sources/assets/images/brutalist/Brutalism-19.png +0 -0
  442. package/sources/assets/images/brutalist/Brutalism-2.png +0 -0
  443. package/sources/assets/images/brutalist/Brutalism-20.png +0 -0
  444. package/sources/assets/images/brutalist/Brutalism-21.png +0 -0
  445. package/sources/assets/images/brutalist/Brutalism-22.png +0 -0
  446. package/sources/assets/images/brutalist/Brutalism-23.png +0 -0
  447. package/sources/assets/images/brutalist/Brutalism-24.png +0 -0
  448. package/sources/assets/images/brutalist/Brutalism-25.png +0 -0
  449. package/sources/assets/images/brutalist/Brutalism-26.png +0 -0
  450. package/sources/assets/images/brutalist/Brutalism-27.png +0 -0
  451. package/sources/assets/images/brutalist/Brutalism-28.png +0 -0
  452. package/sources/assets/images/brutalist/Brutalism-29.png +0 -0
  453. package/sources/assets/images/brutalist/Brutalism-3.png +0 -0
  454. package/sources/assets/images/brutalist/Brutalism-30.png +0 -0
  455. package/sources/assets/images/brutalist/Brutalism-31.png +0 -0
  456. package/sources/assets/images/brutalist/Brutalism-32.png +0 -0
  457. package/sources/assets/images/brutalist/Brutalism-33.png +0 -0
  458. package/sources/assets/images/brutalist/Brutalism-34.png +0 -0
  459. package/sources/assets/images/brutalist/Brutalism-35.png +0 -0
  460. package/sources/assets/images/brutalist/Brutalism-36.png +0 -0
  461. package/sources/assets/images/brutalist/Brutalism-37.png +0 -0
  462. package/sources/assets/images/brutalist/Brutalism-38.png +0 -0
  463. package/sources/assets/images/brutalist/Brutalism-39.png +0 -0
  464. package/sources/assets/images/brutalist/Brutalism-4.png +0 -0
  465. package/sources/assets/images/brutalist/Brutalism-40.png +0 -0
  466. package/sources/assets/images/brutalist/Brutalism-41.png +0 -0
  467. package/sources/assets/images/brutalist/Brutalism-42.png +0 -0
  468. package/sources/assets/images/brutalist/Brutalism-43.png +0 -0
  469. package/sources/assets/images/brutalist/Brutalism-44.png +0 -0
  470. package/sources/assets/images/brutalist/Brutalism-45.png +0 -0
  471. package/sources/assets/images/brutalist/Brutalism-46.png +0 -0
  472. package/sources/assets/images/brutalist/Brutalism-47.png +0 -0
  473. package/sources/assets/images/brutalist/Brutalism-48.png +0 -0
  474. package/sources/assets/images/brutalist/Brutalism-49.png +0 -0
  475. package/sources/assets/images/brutalist/Brutalism-5.png +0 -0
  476. package/sources/assets/images/brutalist/Brutalism-50.png +0 -0
  477. package/sources/assets/images/brutalist/Brutalism-51.png +0 -0
  478. package/sources/assets/images/brutalist/Brutalism-52.png +0 -0
  479. package/sources/assets/images/brutalist/Brutalism-53.png +0 -0
  480. package/sources/assets/images/brutalist/Brutalism-54.png +0 -0
  481. package/sources/assets/images/brutalist/Brutalism-55.png +0 -0
  482. package/sources/assets/images/brutalist/Brutalism-56.png +0 -0
  483. package/sources/assets/images/brutalist/Brutalism-57.png +0 -0
  484. package/sources/assets/images/brutalist/Brutalism-58.png +0 -0
  485. package/sources/assets/images/brutalist/Brutalism-59.png +0 -0
  486. package/sources/assets/images/brutalist/Brutalism-6.png +0 -0
  487. package/sources/assets/images/brutalist/Brutalism-60.png +0 -0
  488. package/sources/assets/images/brutalist/Brutalism-61.png +0 -0
  489. package/sources/assets/images/brutalist/Brutalism-62.png +0 -0
  490. package/sources/assets/images/brutalist/Brutalism-63.png +0 -0
  491. package/sources/assets/images/brutalist/Brutalism-64.png +0 -0
  492. package/sources/assets/images/brutalist/Brutalism-65.png +0 -0
  493. package/sources/assets/images/brutalist/Brutalism-66.png +0 -0
  494. package/sources/assets/images/brutalist/Brutalism-67.png +0 -0
  495. package/sources/assets/images/brutalist/Brutalism-68.png +0 -0
  496. package/sources/assets/images/brutalist/Brutalism-69.png +0 -0
  497. package/sources/assets/images/brutalist/Brutalism-7.png +0 -0
  498. package/sources/assets/images/brutalist/Brutalism-70.png +0 -0
  499. package/sources/assets/images/brutalist/Brutalism-71.png +0 -0
  500. package/sources/assets/images/brutalist/Brutalism-72.png +0 -0
  501. package/sources/assets/images/brutalist/Brutalism-73.png +0 -0
  502. package/sources/assets/images/brutalist/Brutalism-74.png +0 -0
  503. package/sources/assets/images/brutalist/Brutalism-75.png +0 -0
  504. package/sources/assets/images/brutalist/Brutalism-76.png +0 -0
  505. package/sources/assets/images/brutalist/Brutalism-77.png +0 -0
  506. package/sources/assets/images/brutalist/Brutalism-78.png +0 -0
  507. package/sources/assets/images/brutalist/Brutalism-79.png +0 -0
  508. package/sources/assets/images/brutalist/Brutalism-8.png +0 -0
  509. package/sources/assets/images/brutalist/Brutalism-80.png +0 -0
  510. package/sources/assets/images/brutalist/Brutalism-81.png +0 -0
  511. package/sources/assets/images/brutalist/Brutalism-82.png +0 -0
  512. package/sources/assets/images/brutalist/Brutalism-83.png +0 -0
  513. package/sources/assets/images/brutalist/Brutalism-84.png +0 -0
  514. package/sources/assets/images/brutalist/Brutalism-85.png +0 -0
  515. package/sources/assets/images/brutalist/Brutalism-86.png +0 -0
  516. package/sources/assets/images/brutalist/Brutalism-87.png +0 -0
  517. package/sources/assets/images/brutalist/Brutalism-88.png +0 -0
  518. package/sources/assets/images/brutalist/Brutalism-89.png +0 -0
  519. package/sources/assets/images/brutalist/Brutalism-9.png +0 -0
  520. package/sources/assets/images/brutalist/Brutalism-90.png +0 -0
  521. package/sources/assets/images/brutalist/Brutalism-91.png +0 -0
  522. package/sources/assets/images/brutalist/Brutalism-92.png +0 -0
  523. package/sources/assets/images/brutalist/Brutalism-93.png +0 -0
  524. package/sources/assets/images/brutalist/Brutalism-94.png +0 -0
  525. package/sources/assets/images/brutalist/Brutalism-95.png +0 -0
  526. package/sources/assets/images/brutalist/Brutalism-96.png +0 -0
  527. package/sources/assets/images/brutalist/Brutalism-97.png +0 -0
  528. package/sources/assets/images/brutalist/Brutalism-98.png +0 -0
  529. package/sources/assets/images/brutalist/Brutalism-99.png +0 -0
  530. package/sources/assets/images/favicon-active.png +0 -0
  531. package/sources/assets/images/favicon.png +0 -0
  532. package/sources/assets/images/gradients/01.png +0 -0
  533. package/sources/assets/images/gradients/02.png +0 -0
  534. package/sources/assets/images/gradients/03.png +0 -0
  535. package/sources/assets/images/gradients/04.png +0 -0
  536. package/sources/assets/images/gradients/05.png +0 -0
  537. package/sources/assets/images/gradients/06.png +0 -0
  538. package/sources/assets/images/gradients/07.png +0 -0
  539. package/sources/assets/images/gradients/08.png +0 -0
  540. package/sources/assets/images/gradients/09.png +0 -0
  541. package/sources/assets/images/gradients/10.png +0 -0
  542. package/sources/assets/images/gradients/100.png +0 -0
  543. package/sources/assets/images/gradients/11.png +0 -0
  544. package/sources/assets/images/gradients/12.png +0 -0
  545. package/sources/assets/images/gradients/13.png +0 -0
  546. package/sources/assets/images/gradients/14.png +0 -0
  547. package/sources/assets/images/gradients/15.png +0 -0
  548. package/sources/assets/images/gradients/16.png +0 -0
  549. package/sources/assets/images/gradients/17.png +0 -0
  550. package/sources/assets/images/gradients/18.png +0 -0
  551. package/sources/assets/images/gradients/19.png +0 -0
  552. package/sources/assets/images/gradients/20.png +0 -0
  553. package/sources/assets/images/gradients/21.png +0 -0
  554. package/sources/assets/images/gradients/22.png +0 -0
  555. package/sources/assets/images/gradients/23.png +0 -0
  556. package/sources/assets/images/gradients/24.png +0 -0
  557. package/sources/assets/images/gradients/25.png +0 -0
  558. package/sources/assets/images/gradients/26.png +0 -0
  559. package/sources/assets/images/gradients/27.png +0 -0
  560. package/sources/assets/images/gradients/28.png +0 -0
  561. package/sources/assets/images/gradients/29.png +0 -0
  562. package/sources/assets/images/gradients/30.png +0 -0
  563. package/sources/assets/images/gradients/31.png +0 -0
  564. package/sources/assets/images/gradients/32.png +0 -0
  565. package/sources/assets/images/gradients/33.png +0 -0
  566. package/sources/assets/images/gradients/34.png +0 -0
  567. package/sources/assets/images/gradients/35.png +0 -0
  568. package/sources/assets/images/gradients/36.png +0 -0
  569. package/sources/assets/images/gradients/37.png +0 -0
  570. package/sources/assets/images/gradients/38.png +0 -0
  571. package/sources/assets/images/gradients/39.png +0 -0
  572. package/sources/assets/images/gradients/40.png +0 -0
  573. package/sources/assets/images/gradients/41.png +0 -0
  574. package/sources/assets/images/gradients/42.png +0 -0
  575. package/sources/assets/images/gradients/43.png +0 -0
  576. package/sources/assets/images/gradients/44.png +0 -0
  577. package/sources/assets/images/gradients/45.png +0 -0
  578. package/sources/assets/images/gradients/46.png +0 -0
  579. package/sources/assets/images/gradients/47.png +0 -0
  580. package/sources/assets/images/gradients/48.png +0 -0
  581. package/sources/assets/images/gradients/49.png +0 -0
  582. package/sources/assets/images/gradients/50.png +0 -0
  583. package/sources/assets/images/gradients/51.png +0 -0
  584. package/sources/assets/images/gradients/52.png +0 -0
  585. package/sources/assets/images/gradients/53.png +0 -0
  586. package/sources/assets/images/gradients/54.png +0 -0
  587. package/sources/assets/images/gradients/55.png +0 -0
  588. package/sources/assets/images/gradients/56.png +0 -0
  589. package/sources/assets/images/gradients/57.png +0 -0
  590. package/sources/assets/images/gradients/58.png +0 -0
  591. package/sources/assets/images/gradients/59.png +0 -0
  592. package/sources/assets/images/gradients/60.png +0 -0
  593. package/sources/assets/images/gradients/61.png +0 -0
  594. package/sources/assets/images/gradients/62.png +0 -0
  595. package/sources/assets/images/gradients/63.png +0 -0
  596. package/sources/assets/images/gradients/64.png +0 -0
  597. package/sources/assets/images/gradients/65.png +0 -0
  598. package/sources/assets/images/gradients/66.png +0 -0
  599. package/sources/assets/images/gradients/67.png +0 -0
  600. package/sources/assets/images/gradients/68.png +0 -0
  601. package/sources/assets/images/gradients/69.png +0 -0
  602. package/sources/assets/images/gradients/70.png +0 -0
  603. package/sources/assets/images/gradients/71.png +0 -0
  604. package/sources/assets/images/gradients/72.png +0 -0
  605. package/sources/assets/images/gradients/73.png +0 -0
  606. package/sources/assets/images/gradients/74.png +0 -0
  607. package/sources/assets/images/gradients/75.png +0 -0
  608. package/sources/assets/images/gradients/76.png +0 -0
  609. package/sources/assets/images/gradients/77.png +0 -0
  610. package/sources/assets/images/gradients/78.png +0 -0
  611. package/sources/assets/images/gradients/79.png +0 -0
  612. package/sources/assets/images/gradients/80.png +0 -0
  613. package/sources/assets/images/gradients/81.png +0 -0
  614. package/sources/assets/images/gradients/82.png +0 -0
  615. package/sources/assets/images/gradients/83.png +0 -0
  616. package/sources/assets/images/gradients/84.png +0 -0
  617. package/sources/assets/images/gradients/85.png +0 -0
  618. package/sources/assets/images/gradients/86.png +0 -0
  619. package/sources/assets/images/gradients/87.png +0 -0
  620. package/sources/assets/images/gradients/88.png +0 -0
  621. package/sources/assets/images/gradients/89.png +0 -0
  622. package/sources/assets/images/gradients/90.png +0 -0
  623. package/sources/assets/images/gradients/91.png +0 -0
  624. package/sources/assets/images/gradients/92.png +0 -0
  625. package/sources/assets/images/gradients/93.png +0 -0
  626. package/sources/assets/images/gradients/94.png +0 -0
  627. package/sources/assets/images/gradients/95.png +0 -0
  628. package/sources/assets/images/gradients/96.png +0 -0
  629. package/sources/assets/images/gradients/97.png +0 -0
  630. package/sources/assets/images/gradients/98.png +0 -0
  631. package/sources/assets/images/gradients/99.png +0 -0
  632. package/sources/assets/images/icon-adaptive.png +0 -0
  633. package/sources/assets/images/icon-claude.png +0 -0
  634. package/sources/assets/images/icon-claude@2x.png +0 -0
  635. package/sources/assets/images/icon-claude@3x.png +0 -0
  636. package/sources/assets/images/icon-gemini.png +0 -0
  637. package/sources/assets/images/icon-gemini@2x.png +0 -0
  638. package/sources/assets/images/icon-gemini@3x.png +0 -0
  639. package/sources/assets/images/icon-gpt.png +0 -0
  640. package/sources/assets/images/icon-gpt@2x.png +0 -0
  641. package/sources/assets/images/icon-gpt@3x.png +0 -0
  642. package/sources/assets/images/icon-monochrome.png +0 -0
  643. package/sources/assets/images/icon-notification.png +0 -0
  644. package/sources/assets/images/icon-openclaw.png +0 -0
  645. package/sources/assets/images/icon-openclaw@2x.png +0 -0
  646. package/sources/assets/images/icon-openclaw@3x.png +0 -0
  647. package/sources/assets/images/icon-tauri.png +0 -0
  648. package/sources/assets/images/icon-voice-white.png +0 -0
  649. package/sources/assets/images/icon-voice.png +0 -0
  650. package/sources/assets/images/icon-voice@2x.png +0 -0
  651. package/sources/assets/images/icon-voice@3x.png +0 -0
  652. package/sources/assets/images/icon.png +0 -0
  653. package/sources/assets/images/logo-black.png +0 -0
  654. package/sources/assets/images/logo-white.png +0 -0
  655. package/sources/assets/images/logotype-dark.png +0 -0
  656. package/sources/assets/images/logotype-dark@2x.png +0 -0
  657. package/sources/assets/images/logotype-dark@3x.png +0 -0
  658. package/sources/assets/images/logotype-light.png +0 -0
  659. package/sources/assets/images/logotype-light@2x.png +0 -0
  660. package/sources/assets/images/logotype-light@3x.png +0 -0
  661. package/sources/assets/images/logotype.png +0 -0
  662. package/sources/assets/images/logotype@2x.png +0 -0
  663. package/sources/assets/images/logotype@3x.png +0 -0
  664. package/sources/assets/images/splash-android-dark.png +0 -0
  665. package/sources/assets/images/splash-android-light.png +0 -0
  666. package/sources/assets/images/transparent.png +0 -0
  667. package/sources/assets/images/zen-icon.png +0 -0
  668. package/sources/auth/AuthContext.tsx +100 -0
  669. package/sources/auth/authAccountApprove.ts +2 -0
  670. package/sources/auth/authApprove.ts +2 -0
  671. package/sources/auth/authChallenge.ts +8 -0
  672. package/sources/auth/authGetToken.ts +4 -0
  673. package/sources/auth/authQRStart.ts +17 -0
  674. package/sources/auth/authQRWait.ts +13 -0
  675. package/sources/auth/secretKeyBackup.spec.ts +465 -0
  676. package/sources/auth/secretKeyBackup.ts +179 -0
  677. package/sources/auth/tokenStorage.ts +27 -0
  678. package/sources/changelog/changelog.json +60 -0
  679. package/sources/changelog/index.ts +3 -0
  680. package/sources/changelog/parser.ts +23 -0
  681. package/sources/changelog/storage.ts +17 -0
  682. package/sources/changelog/types.ts +10 -0
  683. package/sources/components/ActiveSessionsGroupCompact.tsx +567 -0
  684. package/sources/components/AgentContentView.ios.tsx +70 -0
  685. package/sources/components/AgentContentView.tsx +48 -0
  686. package/sources/components/AgentInput.tsx +1468 -0
  687. package/sources/components/AgentInputAttachmentStrip.tsx +122 -0
  688. package/sources/components/AgentInputAutocomplete.tsx +96 -0
  689. package/sources/components/AgentInputSuggestionView.tsx +106 -0
  690. package/sources/components/AllFilesDiffView.tsx +515 -0
  691. package/sources/components/Avatar.tsx +149 -0
  692. package/sources/components/AvatarBrutalist.tsx +501 -0
  693. package/sources/components/AvatarGradient.tsx +147 -0
  694. package/sources/components/AvatarSkia.tsx +111 -0
  695. package/sources/components/AvatarSkia.web.tsx +113 -0
  696. package/sources/components/ChatFooter.tsx +50 -0
  697. package/sources/components/ChatHeaderView.tsx +180 -0
  698. package/sources/components/ChatList.tsx +283 -0
  699. package/sources/components/CodeEditor.tsx +22 -0
  700. package/sources/components/CodeEditor.web.tsx +180 -0
  701. package/sources/components/CodeView.tsx +33 -0
  702. package/sources/components/CommandPalette/CommandPalette.tsx +72 -0
  703. package/sources/components/CommandPalette/CommandPaletteInput.tsx +65 -0
  704. package/sources/components/CommandPalette/CommandPaletteItem.tsx +141 -0
  705. package/sources/components/CommandPalette/CommandPaletteModal.tsx +148 -0
  706. package/sources/components/CommandPalette/CommandPaletteProvider.tsx +141 -0
  707. package/sources/components/CommandPalette/CommandPaletteResults.tsx +129 -0
  708. package/sources/components/CommandPalette/index.ts +3 -0
  709. package/sources/components/CommandPalette/types.ts +15 -0
  710. package/sources/components/CommandPalette/useCommandPalette.ts +107 -0
  711. package/sources/components/CommandView.tsx +135 -0
  712. package/sources/components/CompactGitStatus.tsx +88 -0
  713. package/sources/components/ConnectButton.tsx +117 -0
  714. package/sources/components/Deferred.tsx +18 -0
  715. package/sources/components/DuplicateSheet.tsx +295 -0
  716. package/sources/components/EmptyMainScreen.tsx +171 -0
  717. package/sources/components/EmptyMessages.tsx +123 -0
  718. package/sources/components/EmptySessionsTablet.tsx +111 -0
  719. package/sources/components/ExternalLink.tsx +22 -0
  720. package/sources/components/FAB.tsx +53 -0
  721. package/sources/components/FABWide.tsx +59 -0
  722. package/sources/components/FeedItemCard.tsx +98 -0
  723. package/sources/components/FileIcon.tsx +63 -0
  724. package/sources/components/FileViewPanel.tsx +673 -0
  725. package/sources/components/FilesSidebar.tsx +739 -0
  726. package/sources/components/FloatingOverlay.tsx +48 -0
  727. package/sources/components/GitStatusBadge.tsx +82 -0
  728. package/sources/components/HeaderLogo.tsx +28 -0
  729. package/sources/components/HomeHeader.tsx +243 -0
  730. package/sources/components/HorizontalScrollView.tsx +88 -0
  731. package/sources/components/InboxView.tsx +260 -0
  732. package/sources/components/InlineFileDiff.tsx +277 -0
  733. package/sources/components/Item.tsx +315 -0
  734. package/sources/components/ItemGroup.tsx +147 -0
  735. package/sources/components/ItemList.tsx +102 -0
  736. package/sources/components/MainView.tsx +324 -0
  737. package/sources/components/MessageView.tsx +299 -0
  738. package/sources/components/MultiTextInput.tsx +285 -0
  739. package/sources/components/MultiTextInput.web.tsx +220 -0
  740. package/sources/components/OAuthView.tsx +374 -0
  741. package/sources/components/PermissionModeSelector.tsx +68 -0
  742. package/sources/components/PlaceholderContainerView.tsx +47 -0
  743. package/sources/components/PlusPlus.tsx +34 -0
  744. package/sources/components/PlusPlus.web.tsx +34 -0
  745. package/sources/components/ProjectGitStatus.tsx +102 -0
  746. package/sources/components/RoundButton.tsx +130 -0
  747. package/sources/components/SearchableListSelector.tsx +675 -0
  748. package/sources/components/SessionActionsNativeMenu.android.tsx +58 -0
  749. package/sources/components/SessionActionsNativeMenu.ios.tsx +55 -0
  750. package/sources/components/SessionActionsNativeMenu.tsx +20 -0
  751. package/sources/components/SessionActionsNativeMenu.web.tsx +13 -0
  752. package/sources/components/SessionActionsPopover.tsx +240 -0
  753. package/sources/components/SessionsList.tsx +471 -0
  754. package/sources/components/SessionsListWrapper.tsx +72 -0
  755. package/sources/components/SettingsView.tsx +470 -0
  756. package/sources/components/SettingsViewWrapper.tsx +21 -0
  757. package/sources/components/Shaker.tsx +42 -0
  758. package/sources/components/Shaker.web.tsx +46 -0
  759. package/sources/components/ShimmerView.tsx +106 -0
  760. package/sources/components/SidebarNavigator.tsx +218 -0
  761. package/sources/components/SidebarView.tsx +104 -0
  762. package/sources/components/SimpleSyntaxHighlighter.tsx +322 -0
  763. package/sources/components/StatusBarProvider.tsx +12 -0
  764. package/sources/components/StatusDot.tsx +49 -0
  765. package/sources/components/StyledText.tsx +35 -0
  766. package/sources/components/Switch.tsx +20 -0
  767. package/sources/components/TabBar.tsx +140 -0
  768. package/sources/components/ToolGroupView.tsx +101 -0
  769. package/sources/components/TransitionStack.tsx +14 -0
  770. package/sources/components/UpdateBanner.tsx +74 -0
  771. package/sources/components/UserCard.tsx +41 -0
  772. package/sources/components/UserSearchResult.tsx +129 -0
  773. package/sources/components/VoiceAssistantStatusBar.tsx +260 -0
  774. package/sources/components/VoiceBars.tsx +95 -0
  775. package/sources/components/autocomplete/applySuggestion.test.ts +194 -0
  776. package/sources/components/autocomplete/applySuggestion.ts +61 -0
  777. package/sources/components/autocomplete/findActiveWord.test.ts +365 -0
  778. package/sources/components/autocomplete/findActiveWord.ts +207 -0
  779. package/sources/components/autocomplete/suggestions.ts +79 -0
  780. package/sources/components/autocomplete/useActiveSuggestions.ts +130 -0
  781. package/sources/components/autocomplete/useActiveWord.ts +19 -0
  782. package/sources/components/diff/DiffView.tsx +188 -0
  783. package/sources/components/diff/PierreDiffView.tsx +253 -0
  784. package/sources/components/diff/calculateDiff.ts +317 -0
  785. package/sources/components/entityColor.ts +51 -0
  786. package/sources/components/haptics.ts +9 -0
  787. package/sources/components/haptics.web.ts +7 -0
  788. package/sources/components/layout.ts +44 -0
  789. package/sources/components/markdown/MarkdownView.tsx +670 -0
  790. package/sources/components/markdown/MermaidRenderer.tsx +233 -0
  791. package/sources/components/markdown/linkUtils.test.ts +17 -0
  792. package/sources/components/markdown/linkUtils.ts +5 -0
  793. package/sources/components/markdown/parseMarkdown.test.ts +64 -0
  794. package/sources/components/markdown/parseMarkdown.ts +46 -0
  795. package/sources/components/markdown/parseMarkdownBlock.test.ts +108 -0
  796. package/sources/components/markdown/parseMarkdownBlock.ts +200 -0
  797. package/sources/components/markdown/parseMarkdownSpans.ts +88 -0
  798. package/sources/components/modelModeOptions.test.ts +114 -0
  799. package/sources/components/modelModeOptions.ts +257 -0
  800. package/sources/components/navigation/Header.tsx +252 -0
  801. package/sources/components/parseLocalCommandMessage.spec.ts +96 -0
  802. package/sources/components/parseLocalCommandMessage.ts +97 -0
  803. package/sources/components/qr/QRCode.tsx +178 -0
  804. package/sources/components/qr/QRCode.web.tsx +229 -0
  805. package/sources/components/qr/index.ts +2 -0
  806. package/sources/components/qr/qrMatrix.ts +48 -0
  807. package/sources/components/tools/PermissionFooter.tsx +527 -0
  808. package/sources/components/tools/ToolDiffView.tsx +60 -0
  809. package/sources/components/tools/ToolError.tsx +49 -0
  810. package/sources/components/tools/ToolFullView.tsx +193 -0
  811. package/sources/components/tools/ToolHeader.tsx +93 -0
  812. package/sources/components/tools/ToolSectionView.tsx +42 -0
  813. package/sources/components/tools/ToolStatusIndicator.tsx +36 -0
  814. package/sources/components/tools/ToolView.tsx +340 -0
  815. package/sources/components/tools/knownTools.tsx +957 -0
  816. package/sources/components/tools/views/AskUserQuestionView.tsx +357 -0
  817. package/sources/components/tools/views/BashView.tsx +47 -0
  818. package/sources/components/tools/views/BashViewFull.tsx +81 -0
  819. package/sources/components/tools/views/CodexBashView.tsx +126 -0
  820. package/sources/components/tools/views/CodexDiffView.tsx +79 -0
  821. package/sources/components/tools/views/CodexPatchView.tsx +186 -0
  822. package/sources/components/tools/views/EditView.tsx +33 -0
  823. package/sources/components/tools/views/EditViewFull.tsx +38 -0
  824. package/sources/components/tools/views/ExitPlanToolView.tsx +21 -0
  825. package/sources/components/tools/views/FileView.tsx +118 -0
  826. package/sources/components/tools/views/GeminiEditView.tsx +75 -0
  827. package/sources/components/tools/views/GeminiExecuteView.tsx +92 -0
  828. package/sources/components/tools/views/MCPToolView.tsx +31 -0
  829. package/sources/components/tools/views/MultiEditView.tsx +41 -0
  830. package/sources/components/tools/views/MultiEditViewFull.tsx +84 -0
  831. package/sources/components/tools/views/TaskView.tsx +129 -0
  832. package/sources/components/tools/views/TodoView.tsx +90 -0
  833. package/sources/components/tools/views/WriteView.tsx +29 -0
  834. package/sources/components/tools/views/_all.tsx +88 -0
  835. package/sources/components/usage/UsageBar.tsx +80 -0
  836. package/sources/components/usage/UsageChart.tsx +164 -0
  837. package/sources/components/usage/UsagePanel.tsx +283 -0
  838. package/sources/components/web/FaviconPermissionIndicator.tsx +44 -0
  839. package/sources/config.ts +3 -0
  840. package/sources/constants/Languages.ts +116 -0
  841. package/sources/constants/Typography.ts +116 -0
  842. package/sources/dev/testRunner.ts +277 -0
  843. package/sources/docs/autocomplete-text-manipulation.md +224 -0
  844. package/sources/encryption/aes.appspec.ts +25 -0
  845. package/sources/encryption/aes.ts +21 -0
  846. package/sources/encryption/aes.web.test.ts +73 -0
  847. package/sources/encryption/aes.web.ts +79 -0
  848. package/sources/encryption/base64.appspec.ts +240 -0
  849. package/sources/encryption/base64.native.ts +12 -0
  850. package/sources/encryption/base64.ts +46 -0
  851. package/sources/encryption/blob.test.ts +120 -0
  852. package/sources/encryption/blob.ts +58 -0
  853. package/sources/encryption/deriveKey.appspec.ts +72 -0
  854. package/sources/encryption/deriveKey.ts +46 -0
  855. package/sources/encryption/hex.ts +17 -0
  856. package/sources/encryption/hmac_sha512.appspec.ts +40 -0
  857. package/sources/encryption/hmac_sha512.ts +42 -0
  858. package/sources/encryption/libsodium.lib.ts +2 -0
  859. package/sources/encryption/libsodium.lib.web.ts +2 -0
  860. package/sources/encryption/libsodium.ts +58 -0
  861. package/sources/encryption/text.test.ts +61 -0
  862. package/sources/encryption/text.ts +11 -0
  863. package/sources/hooks/useAsyncCommand.ts +25 -0
  864. package/sources/hooks/useAttachmentImage.ts +134 -0
  865. package/sources/hooks/useAutocomplete.ts +69 -0
  866. package/sources/hooks/useAutocompleteSession.ts +53 -0
  867. package/sources/hooks/useChangelog.ts +45 -0
  868. package/sources/hooks/useCheckCameraPermissions.ts +25 -0
  869. package/sources/hooks/useConnectAccount.ts +107 -0
  870. package/sources/hooks/useConnectTerminal.ts +112 -0
  871. package/sources/hooks/useDemoMessages.ts +48 -0
  872. package/sources/hooks/useDraft.ts +120 -0
  873. package/sources/hooks/useElapsedTime.ts +36 -0
  874. package/sources/hooks/useGetPath.ts +13 -0
  875. package/sources/hooks/useGitStatusFiles.ts +45 -0
  876. package/sources/hooks/useGlobalKeyboard.ts +29 -0
  877. package/sources/hooks/useGroupedMessages.ts +149 -0
  878. package/sources/hooks/useImagePicker.ts +135 -0
  879. package/sources/hooks/useInboxHasContent.ts +19 -0
  880. package/sources/hooks/useMultiClick.ts +56 -0
  881. package/sources/hooks/useNasTechAction.ts +45 -0
  882. package/sources/hooks/useNativeUpdate.ts +10 -0
  883. package/sources/hooks/useNavigateToSession.ts +20 -0
  884. package/sources/hooks/useNewSessionDraft.ts +70 -0
  885. package/sources/hooks/usePrefetchFileContents.ts +162 -0
  886. package/sources/hooks/useSearch.ts +120 -0
  887. package/sources/hooks/useSessionQuickActions.ts +325 -0
  888. package/sources/hooks/useTauriDrag.ts +76 -0
  889. package/sources/hooks/useTauriZoom.ts +67 -0
  890. package/sources/hooks/useUpdates.ts +84 -0
  891. package/sources/hooks/useVisibleSessionListViewData.ts +65 -0
  892. package/sources/hooks/useWorktreeCleanup.ts +69 -0
  893. package/sources/log.ts +108 -0
  894. package/sources/modal/ModalManager.ts +203 -0
  895. package/sources/modal/ModalProvider.tsx +103 -0
  896. package/sources/modal/components/BaseModal.tsx +122 -0
  897. package/sources/modal/components/CustomModal.tsx +42 -0
  898. package/sources/modal/components/WebAlertModal.tsx +139 -0
  899. package/sources/modal/components/WebPromptModal.tsx +185 -0
  900. package/sources/modal/index.ts +3 -0
  901. package/sources/modal/types.ts +79 -0
  902. package/sources/nastech-wire/index.ts +10 -0
  903. package/sources/nastech-wire/legacyProtocol.ts +27 -0
  904. package/sources/nastech-wire/messageMeta.ts +14 -0
  905. package/sources/nastech-wire/messages.ts +113 -0
  906. package/sources/nastech-wire/sessionProtocol.ts +134 -0
  907. package/sources/nastech-wire/voice.ts +34 -0
  908. package/sources/polyfills/screenOrientation.ts +33 -0
  909. package/sources/realtime/RealtimeProvider.tsx +20 -0
  910. package/sources/realtime/RealtimeProvider.web.tsx +15 -0
  911. package/sources/realtime/RealtimeSession.ts +200 -0
  912. package/sources/realtime/RealtimeVoiceSession.tsx +211 -0
  913. package/sources/realtime/RealtimeVoiceSession.web.tsx +209 -0
  914. package/sources/realtime/hooks/contextFormatters.ts +127 -0
  915. package/sources/realtime/hooks/voiceHooks.ts +232 -0
  916. package/sources/realtime/realtimeClientTools.ts +94 -0
  917. package/sources/realtime/types.ts +19 -0
  918. package/sources/realtime/voiceConfig.ts +31 -0
  919. package/sources/realtime/voiceExperiment.ts +91 -0
  920. package/sources/realtime/voiceSystemPrompt.ts +75 -0
  921. package/sources/scripts/compareTranslations.ts +217 -0
  922. package/sources/scripts/parseChangelog.ts +87 -0
  923. package/sources/sync/__testdata__/trace_0.json +3986 -0
  924. package/sources/sync/__testdata__/trace_1.json +1391 -0
  925. package/sources/sync/__testdata__/trace_2.json +182 -0
  926. package/sources/sync/agentDefaults.ts +108 -0
  927. package/sources/sync/apiArtifacts.ts +143 -0
  928. package/sources/sync/apiAttachments.ts +217 -0
  929. package/sources/sync/apiFeed.ts +60 -0
  930. package/sources/sync/apiFriends.ts +217 -0
  931. package/sources/sync/apiGithub.spec.ts +97 -0
  932. package/sources/sync/apiGithub.ts +103 -0
  933. package/sources/sync/apiKv.ts +270 -0
  934. package/sources/sync/apiPush.ts +83 -0
  935. package/sources/sync/apiServices.ts +64 -0
  936. package/sources/sync/apiSocket.ts +290 -0
  937. package/sources/sync/apiTypes.spec.ts +23 -0
  938. package/sources/sync/apiTypes.ts +213 -0
  939. package/sources/sync/apiUsage.ts +130 -0
  940. package/sources/sync/apiVoice.ts +57 -0
  941. package/sources/sync/appConfig.ts +95 -0
  942. package/sources/sync/artifactTypes.ts +85 -0
  943. package/sources/sync/attachmentTypes.ts +28 -0
  944. package/sources/sync/encryption/artifactEncryption.ts +83 -0
  945. package/sources/sync/encryption/encryption.ts +220 -0
  946. package/sources/sync/encryption/encryptionCache.ts +248 -0
  947. package/sources/sync/encryption/encryptor.appspec.ts +409 -0
  948. package/sources/sync/encryption/encryptor.ts +126 -0
  949. package/sources/sync/encryption/machineEncryption.ts +122 -0
  950. package/sources/sync/encryption/sessionEncryption.ts +207 -0
  951. package/sources/sync/feedTypes.ts +43 -0
  952. package/sources/sync/friendTypes.ts +92 -0
  953. package/sources/sync/git-parsers/LineParser.ts +62 -0
  954. package/sources/sync/git-parsers/parseBranch.ts +97 -0
  955. package/sources/sync/git-parsers/parseDiff.ts +180 -0
  956. package/sources/sync/git-parsers/parseStatus.ts +162 -0
  957. package/sources/sync/git-parsers/parseStatusV2.ts +307 -0
  958. package/sources/sync/gitStatusFiles.ts +185 -0
  959. package/sources/sync/gitStatusSync.ts +282 -0
  960. package/sources/sync/localSettings.ts +67 -0
  961. package/sources/sync/messageMeta.test.ts +87 -0
  962. package/sources/sync/messageMeta.ts +36 -0
  963. package/sources/sync/modeHacks.test.ts +29 -0
  964. package/sources/sync/modeHacks.ts +22 -0
  965. package/sources/sync/nastechApi.ts +124 -0
  966. package/sources/sync/ops.ts +776 -0
  967. package/sources/sync/persistence.ts +322 -0
  968. package/sources/sync/profile.ts +95 -0
  969. package/sources/sync/projectFiles.ts +54 -0
  970. package/sources/sync/prompt/systemPrompt.ts +20 -0
  971. package/sources/sync/purchases.ts +67 -0
  972. package/sources/sync/pushRegistration.ts +229 -0
  973. package/sources/sync/reducer/activityUpdateAccumulator.test.ts +492 -0
  974. package/sources/sync/reducer/activityUpdateAccumulator.ts +96 -0
  975. package/sources/sync/reducer/messageToEvent.ts +85 -0
  976. package/sources/sync/reducer/phase0-skipping.spec.ts +206 -0
  977. package/sources/sync/reducer/reducer.spec.ts +3169 -0
  978. package/sources/sync/reducer/reducer.ts +1214 -0
  979. package/sources/sync/reducer/reducerTracer.spec.ts +502 -0
  980. package/sources/sync/reducer/reducerTracer.ts +310 -0
  981. package/sources/sync/revenueCat/index.ts +21 -0
  982. package/sources/sync/revenueCat/revenueCat.ts +215 -0
  983. package/sources/sync/revenueCat/revenueCat.web.ts +238 -0
  984. package/sources/sync/revenueCat/types.ts +82 -0
  985. package/sources/sync/serverConfig.ts +72 -0
  986. package/sources/sync/settings.spec.ts +456 -0
  987. package/sources/sync/settings.ts +186 -0
  988. package/sources/sync/storage.ts +1653 -0
  989. package/sources/sync/storageTypes.spec.ts +24 -0
  990. package/sources/sync/storageTypes.ts +215 -0
  991. package/sources/sync/suggestionCommands.ts +149 -0
  992. package/sources/sync/suggestionFile.ts +206 -0
  993. package/sources/sync/sync.ts +2555 -0
  994. package/sources/sync/typesMessage.ts +69 -0
  995. package/sources/sync/typesMessageMeta.test.ts +14 -0
  996. package/sources/sync/typesMessageMeta.ts +17 -0
  997. package/sources/sync/typesRaw.spec.ts +2010 -0
  998. package/sources/sync/typesRaw.ts +1183 -0
  999. package/sources/sync/uploadFormFile.ts +29 -0
  1000. package/sources/sync/uploadFormFile.web.ts +14 -0
  1001. package/sources/sync/webTabTitle.ts +58 -0
  1002. package/sources/text/README.md +223 -0
  1003. package/sources/text/_all.ts +104 -0
  1004. package/sources/text/_default.ts +1015 -0
  1005. package/sources/text/index.ts +215 -0
  1006. package/sources/text/translations/ca.ts +993 -0
  1007. package/sources/text/translations/en.ts +1009 -0
  1008. package/sources/text/translations/es.ts +995 -0
  1009. package/sources/text/translations/it.ts +992 -0
  1010. package/sources/text/translations/ja.ts +993 -0
  1011. package/sources/text/translations/pl.ts +1024 -0
  1012. package/sources/text/translations/pt.ts +992 -0
  1013. package/sources/text/translations/ru.ts +1023 -0
  1014. package/sources/text/translations/zh-Hans.ts +992 -0
  1015. package/sources/text/translations/zh-Hant.ts +991 -0
  1016. package/sources/theme.css +72 -0
  1017. package/sources/theme.dark.json +31 -0
  1018. package/sources/theme.figma.json +457 -0
  1019. package/sources/theme.gen.ts +10 -0
  1020. package/sources/theme.light.json +31 -0
  1021. package/sources/theme.ts +452 -0
  1022. package/sources/track/index.ts +171 -0
  1023. package/sources/track/tracking.ts +12 -0
  1024. package/sources/track/useTrackScreens.ts +10 -0
  1025. package/sources/types/react-native-webrtc-web-shim.d.ts +6 -0
  1026. package/sources/unistyles.ts +97 -0
  1027. package/sources/utils/codexUnifiedDiff.spec.ts +43 -0
  1028. package/sources/utils/codexUnifiedDiff.ts +70 -0
  1029. package/sources/utils/consoleLogging.ts +145 -0
  1030. package/sources/utils/copySessionMetadataToClipboard.ts +53 -0
  1031. package/sources/utils/debounce.test.ts +646 -0
  1032. package/sources/utils/debounce.ts +122 -0
  1033. package/sources/utils/deviceCalculations.test.ts +318 -0
  1034. package/sources/utils/deviceCalculations.ts +87 -0
  1035. package/sources/utils/errors.ts +10 -0
  1036. package/sources/utils/formatPermissionParams.ts +23 -0
  1037. package/sources/utils/isTauri.ts +7 -0
  1038. package/sources/utils/loadSkia.ts +3 -0
  1039. package/sources/utils/loadSkia.web.ts +5 -0
  1040. package/sources/utils/lock.ts +40 -0
  1041. package/sources/utils/machineUtils.ts +6 -0
  1042. package/sources/utils/messageUtils.ts +254 -0
  1043. package/sources/utils/microphonePermissions.ts +109 -0
  1044. package/sources/utils/notificationRouting.test.ts +51 -0
  1045. package/sources/utils/notificationRouting.ts +81 -0
  1046. package/sources/utils/oauth.ts +143 -0
  1047. package/sources/utils/openExternalUrl.ts +19 -0
  1048. package/sources/utils/parseToken.ts +23 -0
  1049. package/sources/utils/pasteImages.web.ts +81 -0
  1050. package/sources/utils/pathUtils.spec.ts +226 -0
  1051. package/sources/utils/pathUtils.ts +75 -0
  1052. package/sources/utils/platform.ts +19 -0
  1053. package/sources/utils/readFileBytes.ts +11 -0
  1054. package/sources/utils/readFileBytes.web.ts +12 -0
  1055. package/sources/utils/requestReview.ts +135 -0
  1056. package/sources/utils/responsive.ts +87 -0
  1057. package/sources/utils/resumeCommand.test.ts +78 -0
  1058. package/sources/utils/resumeCommand.ts +70 -0
  1059. package/sources/utils/sessionFileLinks.test.ts +112 -0
  1060. package/sources/utils/sessionFileLinks.ts +388 -0
  1061. package/sources/utils/sessionUtils.ts +226 -0
  1062. package/sources/utils/stringUtils.ts +41 -0
  1063. package/sources/utils/sync.ts +164 -0
  1064. package/sources/utils/thumbhash.ts +17 -0
  1065. package/sources/utils/thumbhash.web.ts +85 -0
  1066. package/sources/utils/time.ts +41 -0
  1067. package/sources/utils/toSnakeCase.test.ts +182 -0
  1068. package/sources/utils/toSnakeCase.ts +40 -0
  1069. package/sources/utils/toolCommand.test.ts +23 -0
  1070. package/sources/utils/toolCommand.ts +35 -0
  1071. package/sources/utils/toolComparison.test.ts +101 -0
  1072. package/sources/utils/toolComparison.ts +73 -0
  1073. package/sources/utils/toolErrorParser.test.ts +126 -0
  1074. package/sources/utils/toolErrorParser.ts +102 -0
  1075. package/sources/utils/trimIdent.ts +27 -0
  1076. package/sources/utils/truncateForLogs.ts +37 -0
  1077. package/sources/utils/versionUtils.test.ts +58 -0
  1078. package/sources/utils/versionUtils.ts +69 -0
  1079. package/sources/utils/web/faviconGenerator.ts +39 -0
  1080. package/sources/utils/worktree.ts +192 -0
  1081. package/sources/wire/index.ts +97 -0
  1082. package/src-tauri/Cargo.lock +5978 -0
  1083. package/src-tauri/Cargo.toml +27 -0
  1084. package/src-tauri/build.rs +3 -0
  1085. package/src-tauri/capabilities/default.json +27 -0
  1086. package/src-tauri/deny.toml +53 -0
  1087. package/src-tauri/entitlements.plist +24 -0
  1088. package/src-tauri/icons/128x128.png +0 -0
  1089. package/src-tauri/icons/128x128@2x.png +0 -0
  1090. package/src-tauri/icons/32x32.png +0 -0
  1091. package/src-tauri/icons/64x64.png +0 -0
  1092. package/src-tauri/icons/Square107x107Logo.png +0 -0
  1093. package/src-tauri/icons/Square142x142Logo.png +0 -0
  1094. package/src-tauri/icons/Square150x150Logo.png +0 -0
  1095. package/src-tauri/icons/Square284x284Logo.png +0 -0
  1096. package/src-tauri/icons/Square30x30Logo.png +0 -0
  1097. package/src-tauri/icons/Square310x310Logo.png +0 -0
  1098. package/src-tauri/icons/Square44x44Logo.png +0 -0
  1099. package/src-tauri/icons/Square71x71Logo.png +0 -0
  1100. package/src-tauri/icons/Square89x89Logo.png +0 -0
  1101. package/src-tauri/icons/StoreLogo.png +0 -0
  1102. package/src-tauri/icons/icon.icns +0 -0
  1103. package/src-tauri/icons/icon.ico +0 -0
  1104. package/src-tauri/icons/icon.png +0 -0
  1105. package/src-tauri/src/lib.rs +18 -0
  1106. package/src-tauri/src/main.rs +6 -0
  1107. package/src-tauri/tauri.conf.json +51 -0
  1108. package/src-tauri/tauri.dev.conf.json +20 -0
  1109. package/src-tauri/tauri.preview.conf.json +20 -0
  1110. package/tsconfig.json +45 -0
  1111. package/vitest.config.ts +26 -0
@@ -0,0 +1,1468 @@
1
+ import { Ionicons, Octicons } from '@expo/vector-icons';
2
+ import * as React from 'react';
3
+ import { View, Platform, useWindowDimensions, ViewStyle, Text, ActivityIndicator, TouchableWithoutFeedback, Image as RNImage, Pressable } from 'react-native';
4
+ import { Image } from 'expo-image';
5
+ import { AgentInputAttachmentStrip } from './AgentInputAttachmentStrip';
6
+ import type { AttachmentPreview } from '@/sync/attachmentTypes';
7
+ import { generateThumbhash } from '@/utils/thumbhash';
8
+ import { layout } from './layout';
9
+ import { MultiTextInput, KeyPressEvent } from './MultiTextInput';
10
+ import { Typography } from '@/constants/Typography';
11
+ import { PermissionMode, ModelMode } from './PermissionModeSelector';
12
+ import { EffortLevel } from './modelModeOptions';
13
+ import { hapticsLight, hapticsError } from './haptics';
14
+ import { Shaker, ShakeInstance } from './Shaker';
15
+ import { StatusDot } from './StatusDot';
16
+ import { useActiveWord } from './autocomplete/useActiveWord';
17
+ import { useActiveSuggestions } from './autocomplete/useActiveSuggestions';
18
+ import { AgentInputAutocomplete } from './AgentInputAutocomplete';
19
+ import { FloatingOverlay } from './FloatingOverlay';
20
+ import { TextInputState, MultiTextInputHandle } from './MultiTextInput';
21
+ import { applySuggestion } from './autocomplete/applySuggestion';
22
+ import { GitStatusBadge, useHasMeaningfulGitStatus } from './GitStatusBadge';
23
+ import { StyleSheet, useUnistyles } from 'react-native-unistyles';
24
+ import { useSetting } from '@/sync/storage';
25
+ import { hackMode, hackModes } from '@/sync/modeHacks';
26
+ import { Theme } from '@/theme';
27
+ import { t } from '@/text';
28
+ import { Metadata } from '@/sync/storageTypes';
29
+
30
+ interface AgentInputProps {
31
+ // `initialValue` seeds the uncontrolled textarea once; keystrokes never
32
+ // round-trip back into it via React, which is what keeps fast typing/
33
+ // deletion crisp. The parent reads the live text via the imperative ref.
34
+ initialValue: string;
35
+ placeholder: string;
36
+ // Fires on every keystroke so the parent can sync derived state (drafts,
37
+ // hasText) — typically wrapped in startTransition / debounce by the caller.
38
+ onChangeText?: (text: string) => void;
39
+ sessionId?: string;
40
+ onSend: () => void;
41
+ sendIcon?: React.ReactNode;
42
+ onMicPress?: () => void;
43
+ isMicActive?: boolean;
44
+ permissionMode?: PermissionMode | null;
45
+ availableModes?: PermissionMode[];
46
+ onPermissionModeChange?: (mode: PermissionMode) => void;
47
+ modelMode?: ModelMode | null;
48
+ availableModels?: ModelMode[];
49
+ onModelModeChange?: (mode: ModelMode) => void;
50
+ effortLevel?: EffortLevel | null;
51
+ availableEffortLevels?: EffortLevel[];
52
+ onEffortLevelChange?: (level: EffortLevel) => void;
53
+ metadata?: Metadata | null;
54
+ onAbort?: () => void | Promise<void>;
55
+ showAbortButton?: boolean;
56
+ connectionStatus?: {
57
+ text: string;
58
+ color: string;
59
+ dotColor: string;
60
+ isPulsing?: boolean;
61
+ cliStatus?: {
62
+ claude: boolean | null;
63
+ codex: boolean | null;
64
+ gemini?: boolean | null;
65
+ };
66
+ };
67
+ autocompletePrefixes: string[];
68
+ autocompleteSuggestions: (query: string) => Promise<{ key: string, text: string, component: React.ElementType }[]>;
69
+ usageData?: {
70
+ inputTokens: number;
71
+ outputTokens: number;
72
+ cacheCreation: number;
73
+ cacheRead: number;
74
+ contextSize: number;
75
+ };
76
+ alwaysShowContextSize?: boolean;
77
+ onFileViewerPress?: () => void;
78
+ agentType?: 'claude' | 'codex' | 'gemini' | 'openclaw';
79
+ onAgentClick?: () => void;
80
+ machineName?: string | null;
81
+ onMachineClick?: () => void;
82
+ currentPath?: string | null;
83
+ onPathClick?: () => void;
84
+ blockSend?: boolean;
85
+ isSendDisabled?: boolean;
86
+ isSending?: boolean;
87
+ minHeight?: number;
88
+ zenMode?: boolean;
89
+ /** Image attachments waiting to be sent (expImageUpload feature). */
90
+ selectedImages?: AttachmentPreview[];
91
+ onPickImages?: () => void;
92
+ onRemoveImage?: (id: string) => void;
93
+ onAddImages?: (images: AttachmentPreview[]) => void;
94
+ }
95
+
96
+ const MAX_CONTEXT_SIZE = 190000;
97
+
98
+ const stylesheet = StyleSheet.create((theme, runtime) => ({
99
+ container: {
100
+ alignItems: 'center',
101
+ paddingBottom: 8,
102
+ paddingTop: 8,
103
+ },
104
+ innerContainer: {
105
+ width: '100%',
106
+ position: 'relative',
107
+ },
108
+ unifiedPanel: {
109
+ backgroundColor: theme.colors.input.background,
110
+ borderRadius: Platform.select({ default: 16, android: 20 }),
111
+ overflow: 'hidden',
112
+ paddingVertical: 2,
113
+ paddingBottom: 8,
114
+ paddingHorizontal: 8,
115
+ },
116
+ inputContainer: {
117
+ flexDirection: 'row',
118
+ alignItems: 'center',
119
+ borderWidth: 0,
120
+ paddingLeft: 8,
121
+ paddingRight: 8,
122
+ paddingVertical: 4,
123
+ minHeight: 40,
124
+ },
125
+
126
+ // Overlay styles
127
+ autocompleteOverlay: {
128
+ position: 'absolute',
129
+ bottom: '100%',
130
+ left: 0,
131
+ right: 0,
132
+ marginBottom: 8,
133
+ zIndex: 1000,
134
+ },
135
+ settingsOverlay: {
136
+ position: 'absolute',
137
+ bottom: '100%',
138
+ left: 0,
139
+ right: 0,
140
+ marginBottom: 8,
141
+ zIndex: 1000,
142
+ },
143
+ overlayBackdrop: {
144
+ position: 'absolute',
145
+ top: -1000,
146
+ left: -1000,
147
+ right: -1000,
148
+ bottom: -1000,
149
+ zIndex: 999,
150
+ },
151
+ overlaySection: {
152
+ paddingVertical: 8,
153
+ },
154
+ overlaySectionTitle: {
155
+ fontSize: 12,
156
+ fontWeight: '600',
157
+ color: theme.colors.textSecondary,
158
+ paddingHorizontal: 16,
159
+ paddingBottom: 4,
160
+ ...Typography.default('semiBold'),
161
+ },
162
+ overlayDivider: {
163
+ height: 1,
164
+ backgroundColor: theme.colors.divider,
165
+ marginHorizontal: 16,
166
+ },
167
+
168
+ // Selection styles
169
+ selectionItem: {
170
+ flexDirection: 'row',
171
+ alignItems: 'center',
172
+ paddingHorizontal: 16,
173
+ paddingVertical: 8,
174
+ backgroundColor: 'transparent',
175
+ },
176
+ selectionItemPressed: {
177
+ backgroundColor: theme.colors.surfacePressed,
178
+ },
179
+ radioButton: {
180
+ width: 16,
181
+ height: 16,
182
+ borderRadius: 8,
183
+ borderWidth: 2,
184
+ alignItems: 'center',
185
+ justifyContent: 'center',
186
+ marginRight: 12,
187
+ },
188
+ radioButtonActive: {
189
+ borderColor: theme.colors.radio.active,
190
+ },
191
+ radioButtonInactive: {
192
+ borderColor: theme.colors.radio.inactive,
193
+ },
194
+ radioButtonDot: {
195
+ width: 6,
196
+ height: 6,
197
+ borderRadius: 3,
198
+ backgroundColor: theme.colors.radio.dot,
199
+ },
200
+ selectionLabel: {
201
+ fontSize: 14,
202
+ ...Typography.default(),
203
+ },
204
+ selectionLabelActive: {
205
+ color: theme.colors.radio.active,
206
+ },
207
+ selectionLabelInactive: {
208
+ color: theme.colors.text,
209
+ },
210
+
211
+ // Status styles
212
+ statusContainer: {
213
+ flexDirection: 'row',
214
+ alignItems: 'center',
215
+ justifyContent: 'space-between',
216
+ paddingHorizontal: 16,
217
+ paddingBottom: 4,
218
+ },
219
+ statusRow: {
220
+ flexDirection: 'row',
221
+ alignItems: 'center',
222
+ },
223
+ statusText: {
224
+ fontSize: 11,
225
+ ...Typography.default(),
226
+ },
227
+ permissionModeContainer: {
228
+ flexDirection: 'column',
229
+ alignItems: 'flex-end',
230
+ },
231
+ permissionModeText: {
232
+ fontSize: 11,
233
+ ...Typography.default(),
234
+ },
235
+ contextWarningText: {
236
+ fontSize: 11,
237
+ marginLeft: 8,
238
+ ...Typography.default(),
239
+ },
240
+
241
+ // Button styles
242
+ actionButtonsContainer: {
243
+ flexDirection: 'row',
244
+ alignItems: 'center',
245
+ justifyContent: 'space-between',
246
+ paddingHorizontal: 0,
247
+ },
248
+ actionButtonsLeft: {
249
+ flexDirection: 'row',
250
+ gap: 8,
251
+ flex: 1,
252
+ overflow: 'hidden',
253
+ },
254
+ actionButton: {
255
+ flexDirection: 'row',
256
+ alignItems: 'center',
257
+ borderRadius: Platform.select({ default: 16, android: 20 }),
258
+ paddingHorizontal: 8,
259
+ paddingVertical: 6,
260
+ justifyContent: 'center',
261
+ height: 32,
262
+ },
263
+ actionButtonPressed: {
264
+ opacity: 0.7,
265
+ },
266
+ actionButtonIcon: {
267
+ color: theme.colors.button.secondary.tint,
268
+ },
269
+ sendButton: {
270
+ width: 32,
271
+ height: 32,
272
+ borderRadius: 16,
273
+ justifyContent: 'center',
274
+ alignItems: 'center',
275
+ flexShrink: 0,
276
+ marginLeft: 8,
277
+ },
278
+ sendButtonActive: {
279
+ backgroundColor: theme.colors.button.primary.background,
280
+ },
281
+ sendButtonInactive: {
282
+ backgroundColor: theme.colors.button.primary.disabled,
283
+ },
284
+ sendButtonLocked: {
285
+ backgroundColor: theme.colors.surfaceHigh,
286
+ borderWidth: 1,
287
+ borderColor: theme.colors.divider,
288
+ },
289
+ sendButtonInner: {
290
+ width: '100%',
291
+ height: '100%',
292
+ alignItems: 'center',
293
+ justifyContent: 'center',
294
+ },
295
+ sendButtonInnerPressed: {
296
+ opacity: 0.7,
297
+ },
298
+ sendButtonIcon: {
299
+ color: theme.colors.button.primary.tint,
300
+ },
301
+ }));
302
+
303
+ const getContextWarning = (contextSize: number, alwaysShow: boolean = false, theme: Theme) => {
304
+ const percentageUsed = (contextSize / MAX_CONTEXT_SIZE) * 100;
305
+ const percentageRemaining = Math.max(0, Math.min(100, 100 - percentageUsed));
306
+
307
+ if (percentageRemaining <= 5) {
308
+ return { text: t('agentInput.context.remaining', { percent: Math.round(percentageRemaining) }), color: theme.colors.warningCritical };
309
+ } else if (percentageRemaining <= 10) {
310
+ return { text: t('agentInput.context.remaining', { percent: Math.round(percentageRemaining) }), color: theme.colors.warning };
311
+ } else if (alwaysShow) {
312
+ // Show context remaining in neutral color when not near limit
313
+ return { text: t('agentInput.context.remaining', { percent: Math.round(percentageRemaining) }), color: theme.colors.warning };
314
+ }
315
+ return null; // No display needed
316
+ };
317
+
318
+ // Stable sub-trees extracted from AgentInput so they don't reconcile when
319
+ // the input's keystroke-derived state (hasText / inputState) flips. Their
320
+ // props are derived from session metadata, not from the textarea content,
321
+ // so memo skips re-render on typing entirely.
322
+
323
+ type StatusRowProps = {
324
+ connectionStatus?: AgentInputProps['connectionStatus'];
325
+ contextWarning: { text: string; color: string } | null;
326
+ displayPermissionMode: ReturnType<typeof hackMode> | null;
327
+ permissionModeKey: string;
328
+ isSandboxedYoloMode: boolean;
329
+ permissionLabel: string | null;
330
+ zenMode?: boolean;
331
+ };
332
+
333
+ const AgentInputStatusRow = React.memo(function AgentInputStatusRow(p: StatusRowProps) {
334
+ const { theme } = useUnistyles();
335
+ const showPermissionBadge = !!p.displayPermissionMode
336
+ && p.permissionModeKey !== 'default'
337
+ && !p.zenMode
338
+ && !!p.permissionLabel;
339
+ if (!p.connectionStatus && !p.contextWarning && !showPermissionBadge) {
340
+ return null;
341
+ }
342
+ return (
343
+ <View style={{
344
+ flexDirection: 'row',
345
+ alignItems: 'center',
346
+ justifyContent: 'space-between',
347
+ paddingHorizontal: 16,
348
+ paddingBottom: 4,
349
+ minHeight: 20,
350
+ }}>
351
+ <View style={{ flexDirection: 'row', alignItems: 'center', flex: 1, gap: 11 }}>
352
+ {p.connectionStatus && (
353
+ <>
354
+ <View style={{ flexDirection: 'row', alignItems: 'center', gap: 4 }}>
355
+ <StatusDot
356
+ color={p.connectionStatus.dotColor}
357
+ isPulsing={p.connectionStatus.isPulsing}
358
+ size={6}
359
+ />
360
+ <Text style={{
361
+ fontSize: 11,
362
+ color: p.connectionStatus.color,
363
+ ...Typography.default()
364
+ }}>
365
+ {p.connectionStatus.text}
366
+ </Text>
367
+ </View>
368
+ {p.connectionStatus.cliStatus && (
369
+ <>
370
+ <View style={{ flexDirection: 'row', alignItems: 'center', gap: 4 }}>
371
+ <Text style={{
372
+ fontSize: 11,
373
+ color: p.connectionStatus.cliStatus.claude ? theme.colors.success : theme.colors.textDestructive,
374
+ ...Typography.default()
375
+ }}>
376
+ {p.connectionStatus.cliStatus.claude ? '✓' : '✗'}
377
+ </Text>
378
+ <Text style={{
379
+ fontSize: 11,
380
+ color: p.connectionStatus.cliStatus.claude ? theme.colors.success : theme.colors.textDestructive,
381
+ ...Typography.default()
382
+ }}>
383
+ claude
384
+ </Text>
385
+ </View>
386
+ <View style={{ flexDirection: 'row', alignItems: 'center', gap: 4 }}>
387
+ <Text style={{
388
+ fontSize: 11,
389
+ color: p.connectionStatus.cliStatus.codex ? theme.colors.success : theme.colors.textDestructive,
390
+ ...Typography.default()
391
+ }}>
392
+ {p.connectionStatus.cliStatus.codex ? '✓' : '✗'}
393
+ </Text>
394
+ <Text style={{
395
+ fontSize: 11,
396
+ color: p.connectionStatus.cliStatus.codex ? theme.colors.success : theme.colors.textDestructive,
397
+ ...Typography.default()
398
+ }}>
399
+ codex
400
+ </Text>
401
+ </View>
402
+ {p.connectionStatus.cliStatus.gemini !== undefined && (
403
+ <View style={{ flexDirection: 'row', alignItems: 'center', gap: 4 }}>
404
+ <Text style={{
405
+ fontSize: 11,
406
+ color: p.connectionStatus.cliStatus.gemini ? theme.colors.success : theme.colors.textDestructive,
407
+ ...Typography.default()
408
+ }}>
409
+ {p.connectionStatus.cliStatus.gemini ? '✓' : '✗'}
410
+ </Text>
411
+ <Text style={{
412
+ fontSize: 11,
413
+ color: p.connectionStatus.cliStatus.gemini ? theme.colors.success : theme.colors.textDestructive,
414
+ ...Typography.default()
415
+ }}>
416
+ gemini
417
+ </Text>
418
+ </View>
419
+ )}
420
+ </>
421
+ )}
422
+ </>
423
+ )}
424
+ {p.contextWarning && (
425
+ <Text style={{
426
+ fontSize: 11,
427
+ color: p.contextWarning.color,
428
+ marginLeft: p.connectionStatus ? 8 : 0,
429
+ ...Typography.default()
430
+ }}>
431
+ {p.connectionStatus ? '• ' : ''}{p.contextWarning.text}
432
+ </Text>
433
+ )}
434
+ </View>
435
+ {showPermissionBadge && (() => {
436
+ const permColor = p.isSandboxedYoloMode ? '#4169E1' :
437
+ p.permissionModeKey === 'acceptEdits' ? theme.colors.permission.acceptEdits :
438
+ p.permissionModeKey === 'bypassPermissions' ? theme.colors.permission.bypass :
439
+ p.permissionModeKey === 'plan' ? theme.colors.permission.plan :
440
+ p.permissionModeKey === 'read-only' ? theme.colors.permission.readOnly :
441
+ p.permissionModeKey === 'safe-yolo' ? theme.colors.permission.safeYolo :
442
+ p.permissionModeKey === 'yolo' ? theme.colors.permission.yolo :
443
+ theme.colors.textSecondary;
444
+ const permIcon: 'play-forward' | 'pause' =
445
+ p.permissionModeKey === 'plan' || p.permissionModeKey === 'read-only'
446
+ ? 'pause' : 'play-forward';
447
+ return (
448
+ <View style={{ flexDirection: 'row', alignItems: 'center', gap: 4 }}>
449
+ <Ionicons name={permIcon} size={11} color={permColor} />
450
+ <Text style={{
451
+ fontSize: 11,
452
+ color: permColor,
453
+ ...Typography.default()
454
+ }}>
455
+ {p.permissionLabel}
456
+ </Text>
457
+ </View>
458
+ );
459
+ })()}
460
+ </View>
461
+ );
462
+ });
463
+
464
+ type ContextChipsProps = {
465
+ machineName?: string | null;
466
+ onMachineClick?: () => void;
467
+ currentPath?: string | null;
468
+ onPathClick?: () => void;
469
+ };
470
+
471
+ const AgentInputContextChips = React.memo(function AgentInputContextChips(p: ContextChipsProps) {
472
+ const { theme } = useUnistyles();
473
+ if (p.machineName === undefined && !p.currentPath) {
474
+ return null;
475
+ }
476
+ return (
477
+ <View style={{
478
+ backgroundColor: theme.colors.surfacePressed,
479
+ borderRadius: 12,
480
+ padding: 8,
481
+ marginBottom: 8,
482
+ gap: 4,
483
+ }}>
484
+ {p.machineName !== undefined && p.onMachineClick && (
485
+ <Pressable
486
+ onPress={() => {
487
+ hapticsLight();
488
+ p.onMachineClick?.();
489
+ }}
490
+ hitSlop={{ top: 5, bottom: 10, left: 0, right: 0 }}
491
+ style={(s) => ({
492
+ flexDirection: 'row',
493
+ alignItems: 'center',
494
+ borderRadius: Platform.select({ default: 16, android: 20 }),
495
+ paddingHorizontal: 10,
496
+ paddingVertical: 6,
497
+ height: 32,
498
+ opacity: s.pressed ? 0.7 : 1,
499
+ gap: 6,
500
+ })}
501
+ >
502
+ <Ionicons name="desktop-outline" size={14} color={theme.colors.textSecondary} />
503
+ <Text style={{
504
+ fontSize: 13,
505
+ color: theme.colors.text,
506
+ fontWeight: '600',
507
+ ...Typography.default('semiBold'),
508
+ }}>
509
+ {p.machineName === null ? t('agentInput.noMachinesAvailable') : p.machineName}
510
+ </Text>
511
+ </Pressable>
512
+ )}
513
+ {p.currentPath && p.onPathClick && (
514
+ <Pressable
515
+ onPress={() => {
516
+ hapticsLight();
517
+ p.onPathClick?.();
518
+ }}
519
+ hitSlop={{ top: 5, bottom: 10, left: 0, right: 0 }}
520
+ style={(s) => ({
521
+ flexDirection: 'row',
522
+ alignItems: 'center',
523
+ borderRadius: Platform.select({ default: 16, android: 20 }),
524
+ paddingHorizontal: 10,
525
+ paddingVertical: 6,
526
+ height: 32,
527
+ opacity: s.pressed ? 0.7 : 1,
528
+ gap: 6,
529
+ })}
530
+ >
531
+ <Ionicons name="folder-outline" size={14} color={theme.colors.textSecondary} />
532
+ <Text style={{
533
+ fontSize: 13,
534
+ color: theme.colors.text,
535
+ fontWeight: '600',
536
+ ...Typography.default('semiBold'),
537
+ }}>
538
+ {p.currentPath}
539
+ </Text>
540
+ </Pressable>
541
+ )}
542
+ </View>
543
+ );
544
+ });
545
+
546
+ export const AgentInput = React.memo(React.forwardRef<MultiTextInputHandle, AgentInputProps>((props, ref) => {
547
+ const styles = stylesheet;
548
+ const { theme } = useUnistyles();
549
+ const screenWidth = useWindowDimensions().width;
550
+ const isSendBlocked = props.blockSend ?? false;
551
+
552
+ // `hasText` drives only the send-button appearance/enabled state. It's
553
+ // updated via startTransition from the keystroke handler so a busy reducer
554
+ // never blocks the next character from landing in the textarea.
555
+ const [hasText, setHasText] = React.useState(() => props.initialValue.trim().length > 0);
556
+ const hasImages = (props.selectedImages?.length ?? 0) > 0;
557
+ const canPressSendButton = !props.isSending
558
+ && !props.isSendDisabled
559
+ && (isSendBlocked ? (hasText || hasImages) : (hasText || hasImages || !!props.onMicPress));
560
+
561
+ // Check if this is a Codex, Gemini, or OpenClaw session
562
+ // Use metadata.flavor for existing sessions, agentType prop for new sessions
563
+ const isCodex = props.metadata?.flavor === 'codex' || props.agentType === 'codex';
564
+ const isGemini = props.metadata?.flavor === 'gemini' || props.agentType === 'gemini';
565
+ const isOpenClaw = props.metadata?.flavor === 'openclaw' || props.agentType === 'openclaw';
566
+ const displayPermissionMode = React.useMemo(() => (
567
+ props.permissionMode ? hackMode(props.permissionMode) : null
568
+ ), [props.permissionMode]);
569
+ const permissionModeKey = displayPermissionMode?.key ?? 'default';
570
+ const availableModes = React.useMemo(() => (
571
+ hackModes(props.availableModes ?? [])
572
+ ), [props.availableModes]);
573
+ const availableModels = props.availableModels ?? [];
574
+ const availableEffortLevels = props.availableEffortLevels ?? [];
575
+ const isSandboxEnabled = React.useMemo(() => {
576
+ const sandbox = props.metadata?.sandbox as unknown;
577
+ if (!sandbox) {
578
+ return false;
579
+ }
580
+ if (typeof sandbox === 'object' && sandbox !== null && 'enabled' in sandbox) {
581
+ return Boolean((sandbox as { enabled?: unknown }).enabled);
582
+ }
583
+ return true;
584
+ }, [props.metadata?.sandbox]);
585
+ const isSandboxedYoloMode = isSandboxEnabled && (
586
+ permissionModeKey === 'bypassPermissions' || permissionModeKey === 'yolo'
587
+ );
588
+
589
+ const withSandboxSuffix = React.useCallback((label: string, modeKey?: string) => {
590
+ if (!isSandboxEnabled) {
591
+ return label;
592
+ }
593
+ if (modeKey === 'bypassPermissions' || modeKey === 'yolo') {
594
+ return `${label} (sandboxed)`;
595
+ }
596
+ return label;
597
+ }, [isSandboxEnabled]);
598
+
599
+ // Calculate context warning
600
+ const contextWarning = props.usageData?.contextSize
601
+ ? getContextWarning(props.usageData.contextSize, props.alwaysShowContextSize ?? false, theme)
602
+ : null;
603
+
604
+ const agentInputEnterToSend = useSetting('agentInputEnterToSend');
605
+
606
+
607
+ // Abort button state
608
+ const [isAborting, setIsAborting] = React.useState(false);
609
+ const shakerRef = React.useRef<ShakeInstance>(null);
610
+ const sendBlockShakerRef = React.useRef<ShakeInstance>(null);
611
+ const inputRef = React.useRef<MultiTextInputHandle>(null);
612
+
613
+ // Forward ref to the MultiTextInput
614
+ React.useImperativeHandle(ref, () => inputRef.current!, []);
615
+
616
+ // Web paste/drag — intercept image pastes and file drops for the
617
+ // attachment feature. Both handlers funnel through props.onAddImages.
618
+ React.useEffect(() => {
619
+ if (Platform.OS !== 'web' || !props.onAddImages) return;
620
+
621
+ const handlePaste = async (e: ClipboardEvent) => {
622
+ // Only handle pastes targeted at a focused text-editable element.
623
+ // The listener is attached to document, so without this guard a
624
+ // paste in the URL bar, another modal, or any focused-elsewhere
625
+ // input would steal images intended for somewhere else.
626
+ const active = document.activeElement;
627
+ const isEditableTarget = active instanceof HTMLInputElement
628
+ || active instanceof HTMLTextAreaElement
629
+ || (active instanceof HTMLElement && active.isContentEditable);
630
+ if (!isEditableTarget) return;
631
+
632
+ const { getImagesFromClipboard, fileToAttachmentPreview } = await import('@/utils/pasteImages.web');
633
+ const files = getImagesFromClipboard(e);
634
+ if (!files.length) return;
635
+ e.preventDefault();
636
+ const previews = (await Promise.all(
637
+ files.map((f) => fileToAttachmentPreview(f, generateThumbhash))
638
+ )).filter(Boolean) as Omit<AttachmentPreview, 'id'>[];
639
+ if (previews.length) {
640
+ props.onAddImages!(previews.map((p) => ({
641
+ ...p,
642
+ id: `paste_${Date.now()}_${Math.random().toString(36).slice(2)}`,
643
+ })));
644
+ }
645
+ };
646
+
647
+ // dragover must call preventDefault for drop to fire; we gate on
648
+ // `types.includes('Files')` so we don't hijack drag-text/HTML in the
649
+ // rest of the app.
650
+ const isFileDrag = (e: DragEvent) => {
651
+ const types = e.dataTransfer?.types;
652
+ if (!types) return false;
653
+ // DataTransferItemList vs DOMStringList — both expose .includes-ish.
654
+ for (let i = 0; i < types.length; i++) {
655
+ if (types[i] === 'Files') return true;
656
+ }
657
+ return false;
658
+ };
659
+
660
+ const handleDragOver = (e: DragEvent) => {
661
+ if (!isFileDrag(e)) return;
662
+ e.preventDefault();
663
+ if (e.dataTransfer) e.dataTransfer.dropEffect = 'copy';
664
+ };
665
+
666
+ const handleDrop = async (e: DragEvent) => {
667
+ if (!isFileDrag(e)) return;
668
+ e.preventDefault();
669
+ const { getImagesFromDrop, fileToAttachmentPreview } = await import('@/utils/pasteImages.web');
670
+ const files = getImagesFromDrop(e);
671
+ if (!files.length) return;
672
+ const previews = (await Promise.all(
673
+ files.map((f) => fileToAttachmentPreview(f, generateThumbhash))
674
+ )).filter(Boolean) as Omit<AttachmentPreview, 'id'>[];
675
+ if (previews.length) {
676
+ props.onAddImages!(previews.map((p) => ({
677
+ ...p,
678
+ id: `drop_${Date.now()}_${Math.random().toString(36).slice(2)}`,
679
+ })));
680
+ }
681
+ };
682
+
683
+ document.addEventListener('paste', handlePaste as any);
684
+ document.addEventListener('dragover', handleDragOver);
685
+ document.addEventListener('drop', handleDrop);
686
+ return () => {
687
+ document.removeEventListener('paste', handlePaste as any);
688
+ document.removeEventListener('dragover', handleDragOver);
689
+ document.removeEventListener('drop', handleDrop);
690
+ };
691
+ }, [props.onAddImages]);
692
+
693
+ // Autocomplete state — text + selection. Updated via startTransition so
694
+ // typing renders the character immediately and the autocomplete pipeline
695
+ // catches up on the next idle frame instead of blocking input.
696
+ const [inputState, setInputState] = React.useState<TextInputState>(() => ({
697
+ text: props.initialValue,
698
+ selection: { start: props.initialValue.length, end: props.initialValue.length }
699
+ }));
700
+
701
+ const onChangeTextProp = props.onChangeText;
702
+ const handleTextChange = React.useCallback((text: string) => {
703
+ React.startTransition(() => {
704
+ setHasText(text.trim().length > 0);
705
+ });
706
+ onChangeTextProp?.(text);
707
+ }, [onChangeTextProp]);
708
+
709
+ const handleInputStateChange = React.useCallback((newState: TextInputState) => {
710
+ React.startTransition(() => {
711
+ setInputState(newState);
712
+ });
713
+ }, []);
714
+
715
+ // Use the tracked selection from inputState
716
+ const activeWord = useActiveWord(inputState.text, inputState.selection, props.autocompletePrefixes);
717
+ // Using default options: clampSelection=true, autoSelectFirst=true, wrapAround=true
718
+ // To customize: useActiveSuggestions(activeWord, props.autocompleteSuggestions, { clampSelection: false, wrapAround: false })
719
+ const [suggestions, selected, moveUp, moveDown] = useActiveSuggestions(activeWord, props.autocompleteSuggestions, { clampSelection: true, wrapAround: true });
720
+
721
+ // Debug logging
722
+ // React.useEffect(() => {
723
+ // console.log('🔍 Autocomplete Debug:', JSON.stringify({
724
+ // value: props.value,
725
+ // inputState,
726
+ // activeWord,
727
+ // suggestionsCount: suggestions.length,
728
+ // selected,
729
+ // prefixes: props.autocompletePrefixes
730
+ // }, null, 2));
731
+ // }, [props.value, inputState, activeWord, suggestions.length, selected]);
732
+
733
+ // Handle suggestion selection
734
+ const handleSuggestionSelect = React.useCallback((index: number) => {
735
+ if (!suggestions[index] || !inputRef.current) return;
736
+
737
+ const suggestion = suggestions[index];
738
+
739
+ // Apply the suggestion
740
+ const result = applySuggestion(
741
+ inputState.text,
742
+ inputState.selection,
743
+ suggestion.text,
744
+ props.autocompletePrefixes,
745
+ true // add space after
746
+ );
747
+
748
+ // Use imperative API to set text and selection
749
+ inputRef.current.setTextAndSelection(result.text, {
750
+ start: result.cursorPosition,
751
+ end: result.cursorPosition
752
+ });
753
+
754
+ // console.log('Selected suggestion:', suggestion.text);
755
+
756
+ // Small haptic feedback
757
+ hapticsLight();
758
+ }, [suggestions, inputState, props.autocompletePrefixes]);
759
+
760
+ // Settings modal state
761
+ const [showSettings, setShowSettings] = React.useState(false);
762
+
763
+ // Handle settings button press
764
+ const handleSettingsPress = React.useCallback(() => {
765
+ hapticsLight();
766
+ setShowSettings(prev => !prev);
767
+ }, []);
768
+
769
+ // Handle settings selection
770
+ const handleSettingsSelect = React.useCallback((mode: PermissionMode) => {
771
+ hapticsLight();
772
+ props.onPermissionModeChange?.(mode);
773
+ setShowSettings(false);
774
+ }, [props.onPermissionModeChange]);
775
+
776
+ // Handle abort button press
777
+ const handleAbortPress = React.useCallback(async () => {
778
+ if (!props.onAbort) return;
779
+
780
+ hapticsError();
781
+ setIsAborting(true);
782
+ const startTime = Date.now();
783
+
784
+ try {
785
+ await props.onAbort?.();
786
+
787
+ // Ensure minimum 300ms loading time
788
+ const elapsed = Date.now() - startTime;
789
+ if (elapsed < 300) {
790
+ await new Promise(resolve => setTimeout(resolve, 300 - elapsed));
791
+ }
792
+ } catch (error) {
793
+ // Shake on error
794
+ shakerRef.current?.shake();
795
+ console.error('Abort RPC call failed:', error);
796
+ } finally {
797
+ setIsAborting(false);
798
+ }
799
+ }, [props.onAbort]);
800
+
801
+ const handleBlockedSendAttempt = React.useCallback(() => {
802
+ if (!isSendBlocked || !hasText || props.isSending) return;
803
+ hapticsError();
804
+ sendBlockShakerRef.current?.shake();
805
+ }, [hasText, isSendBlocked, props.isSending]);
806
+
807
+ const handleSendPress = React.useCallback(() => {
808
+ if (isSendBlocked) {
809
+ handleBlockedSendAttempt();
810
+ return;
811
+ }
812
+ if (props.isSendDisabled || props.isSending) return;
813
+
814
+ hapticsLight();
815
+ // Live read avoids stalling behind the transitioned `hasText`.
816
+ const liveHasText = (inputRef.current?.getText() ?? '').trim().length > 0;
817
+ if (liveHasText || hasImages) {
818
+ props.onSend();
819
+ } else {
820
+ props.onMicPress?.();
821
+ }
822
+ }, [handleBlockedSendAttempt, hasImages, isSendBlocked, props.isSendDisabled, props.isSending, props.onSend, props.onMicPress]);
823
+
824
+ // Handle keyboard navigation
825
+ const handleKeyPress = React.useCallback((event: KeyPressEvent): boolean => {
826
+ // Handle autocomplete navigation first
827
+ if (suggestions.length > 0) {
828
+ if (event.key === 'ArrowUp') {
829
+ moveUp();
830
+ return true;
831
+ } else if (event.key === 'ArrowDown') {
832
+ moveDown();
833
+ return true;
834
+ } else if ((event.key === 'Enter' || (event.key === 'Tab' && !event.shiftKey))) {
835
+ // Both Enter and Tab select the current suggestion
836
+ // If none selected (selected === -1), select the first one
837
+ const indexToSelect = selected >= 0 ? selected : 0;
838
+ handleSuggestionSelect(indexToSelect);
839
+ return true;
840
+ } else if (event.key === 'Escape') {
841
+ // Clear suggestions by collapsing selection (triggers activeWord to clear)
842
+ if (inputRef.current) {
843
+ const cursorPos = inputState.selection.start;
844
+ inputRef.current.setTextAndSelection(inputState.text, {
845
+ start: cursorPos,
846
+ end: cursorPos
847
+ });
848
+ }
849
+ return true;
850
+ }
851
+ }
852
+
853
+ // Handle Escape for abort when no suggestions are visible
854
+ if (event.key === 'Escape' && props.showAbortButton && props.onAbort && !isAborting) {
855
+ handleAbortPress();
856
+ return true;
857
+ }
858
+
859
+ // Original key handling
860
+ if (Platform.OS === 'web') {
861
+ // On mobile web (touch devices), Enter should insert a newline since
862
+ // there's no Shift key available. Users send via the send button instead.
863
+ // Use pointer:coarse media query instead of ontouchstart/maxTouchPoints
864
+ // to avoid false positives on Windows touch-screen laptops with keyboards.
865
+ const isTouchDevice = typeof window !== 'undefined' && window.matchMedia('(pointer: coarse)').matches;
866
+ if (agentInputEnterToSend && event.key === 'Enter' && !event.shiftKey && !isTouchDevice) {
867
+ // Read live text from the textarea — `hasText` is debounced via
868
+ // startTransition and would lag behind a quick type-then-Enter.
869
+ const liveText = inputRef.current?.getText() ?? '';
870
+ if (liveText.trim()) {
871
+ if (isSendBlocked) {
872
+ handleBlockedSendAttempt();
873
+ } else if (!props.isSendDisabled) {
874
+ props.onSend();
875
+ }
876
+ return true; // Key was handled
877
+ }
878
+ }
879
+ // Handle Shift+Tab for permission mode switching
880
+ if (event.key === 'Tab' && event.shiftKey && props.onPermissionModeChange && availableModes.length > 0) {
881
+ const currentIndex = availableModes.findIndex((mode) => mode.key === permissionModeKey);
882
+ const nextIndex = ((currentIndex >= 0 ? currentIndex : 0) + 1) % availableModes.length;
883
+ props.onPermissionModeChange(availableModes[nextIndex]);
884
+ hapticsLight();
885
+ return true; // Key was handled, prevent default tab behavior
886
+ }
887
+
888
+ }
889
+ return false; // Key was not handled
890
+ }, [suggestions, moveUp, moveDown, selected, handleSuggestionSelect, props.showAbortButton, props.onAbort, isAborting, handleAbortPress, agentInputEnterToSend, props.onSend, props.onPermissionModeChange, availableModes, permissionModeKey, isSendBlocked, handleBlockedSendAttempt, props.isSendDisabled]);
891
+
892
+
893
+
894
+
895
+ return (
896
+ <View style={[
897
+ styles.container,
898
+ { paddingHorizontal: screenWidth > 700 ? 12 : 8 }
899
+ ]}>
900
+ <View style={[
901
+ styles.innerContainer,
902
+ { maxWidth: layout.maxWidth }
903
+ ]}>
904
+ {/* Autocomplete suggestions overlay */}
905
+ {suggestions.length > 0 && (
906
+ <View style={[
907
+ styles.autocompleteOverlay,
908
+ { paddingHorizontal: screenWidth > 700 ? 0 : 8 }
909
+ ]}>
910
+ <AgentInputAutocomplete
911
+ suggestions={suggestions.map(s => {
912
+ const Component = s.component;
913
+ return <Component key={s.key} />;
914
+ })}
915
+ selectedIndex={selected}
916
+ onSelect={handleSuggestionSelect}
917
+ itemHeight={48}
918
+ />
919
+ </View>
920
+ )}
921
+
922
+ {/* Settings overlay */}
923
+ {showSettings && (
924
+ <>
925
+ <TouchableWithoutFeedback onPress={() => setShowSettings(false)}>
926
+ <View style={styles.overlayBackdrop} />
927
+ </TouchableWithoutFeedback>
928
+ <View style={[
929
+ styles.settingsOverlay,
930
+ { paddingHorizontal: screenWidth > 700 ? 0 : 8 }
931
+ ]}>
932
+ <FloatingOverlay maxHeight={400} keyboardShouldPersistTaps="always">
933
+ {/* Permission Mode Section */}
934
+ <View style={styles.overlaySection}>
935
+ <Text style={styles.overlaySectionTitle}>
936
+ {isCodex ? t('agentInput.codexPermissionMode.title') : isGemini ? t('agentInput.geminiPermissionMode.title') : t('agentInput.permissionMode.title')}
937
+ </Text>
938
+ {availableModes.map((mode) => {
939
+ const isSelected = permissionModeKey === mode.key;
940
+
941
+ return (
942
+ <Pressable
943
+ key={mode.key}
944
+ onPress={() => handleSettingsSelect(mode)}
945
+ style={({ pressed }) => ({
946
+ flexDirection: 'row',
947
+ alignItems: 'flex-start',
948
+ paddingHorizontal: 16,
949
+ paddingVertical: 8,
950
+ backgroundColor: pressed ? theme.colors.surfacePressed : 'transparent'
951
+ })}
952
+ >
953
+ <View style={{
954
+ width: 16,
955
+ height: 16,
956
+ borderRadius: 8,
957
+ borderWidth: 2,
958
+ borderColor: isSelected ? theme.colors.radio.active : theme.colors.radio.inactive,
959
+ alignItems: 'center',
960
+ justifyContent: 'center',
961
+ marginRight: 12,
962
+ marginTop: 2,
963
+ }}>
964
+ {isSelected && (
965
+ <View style={{
966
+ width: 6,
967
+ height: 6,
968
+ borderRadius: 3,
969
+ backgroundColor: theme.colors.radio.dot
970
+ }} />
971
+ )}
972
+ </View>
973
+ <View style={{ flex: 1 }}>
974
+ <Text style={{
975
+ fontSize: 14,
976
+ color: isSelected ? theme.colors.radio.active : theme.colors.text,
977
+ ...Typography.default()
978
+ }}>
979
+ {withSandboxSuffix(mode.name, mode.key)}
980
+ </Text>
981
+ {!!mode.description && (
982
+ <Text style={{
983
+ fontSize: 11,
984
+ color: theme.colors.textSecondary,
985
+ ...Typography.default()
986
+ }}>
987
+ {mode.description}
988
+ </Text>
989
+ )}
990
+ </View>
991
+ </Pressable>
992
+ );
993
+ })}
994
+ </View>
995
+
996
+ {/* Divider */}
997
+ <View style={{
998
+ height: 1,
999
+ backgroundColor: theme.colors.divider,
1000
+ marginHorizontal: 16
1001
+ }} />
1002
+
1003
+ {/* Model + Effort side by side */}
1004
+ <View style={{ flexDirection: 'row' }}>
1005
+ {/* Model Section */}
1006
+ <View style={{ paddingVertical: 8, flex: 1 }}>
1007
+ <Text style={{
1008
+ fontSize: 12,
1009
+ fontWeight: '600',
1010
+ color: theme.colors.textSecondary,
1011
+ paddingHorizontal: 16,
1012
+ paddingBottom: 4,
1013
+ ...Typography.default('semiBold')
1014
+ }}>
1015
+ {t('agentInput.model.title')}
1016
+ </Text>
1017
+ {availableModels.length > 0 ? (
1018
+ availableModels.map((model) => {
1019
+ const isSelected = props.modelMode?.key === model.key;
1020
+
1021
+ return (
1022
+ <Pressable
1023
+ key={model.key}
1024
+ onPress={() => {
1025
+ hapticsLight();
1026
+ props.onModelModeChange?.(model);
1027
+ setShowSettings(false);
1028
+ }}
1029
+ style={({ pressed }) => ({
1030
+ flexDirection: 'row',
1031
+ alignItems: 'flex-start',
1032
+ paddingHorizontal: 16,
1033
+ paddingVertical: 8,
1034
+ backgroundColor: pressed ? theme.colors.surfacePressed : 'transparent'
1035
+ })}
1036
+ >
1037
+ <View style={{
1038
+ width: 16,
1039
+ height: 16,
1040
+ borderRadius: 8,
1041
+ borderWidth: 2,
1042
+ borderColor: isSelected ? theme.colors.radio.active : theme.colors.radio.inactive,
1043
+ alignItems: 'center',
1044
+ justifyContent: 'center',
1045
+ marginRight: 12,
1046
+ marginTop: 2,
1047
+ }}>
1048
+ {isSelected && (
1049
+ <View style={{
1050
+ width: 6,
1051
+ height: 6,
1052
+ borderRadius: 3,
1053
+ backgroundColor: theme.colors.radio.dot
1054
+ }} />
1055
+ )}
1056
+ </View>
1057
+ <View>
1058
+ <Text style={{
1059
+ fontSize: 14,
1060
+ color: isSelected ? theme.colors.radio.active : theme.colors.text,
1061
+ ...Typography.default()
1062
+ }}>
1063
+ {model.name}
1064
+ </Text>
1065
+ {!!model.description && (
1066
+ <Text style={{
1067
+ fontSize: 11,
1068
+ color: theme.colors.textSecondary,
1069
+ ...Typography.default()
1070
+ }}>
1071
+ {model.description}
1072
+ </Text>
1073
+ )}
1074
+ </View>
1075
+ </Pressable>
1076
+ );
1077
+ })
1078
+ ) : (
1079
+ <Text style={{
1080
+ fontSize: 13,
1081
+ color: theme.colors.textSecondary,
1082
+ paddingHorizontal: 16,
1083
+ paddingVertical: 8,
1084
+ ...Typography.default()
1085
+ }}>
1086
+ {t('agentInput.model.configureInCli')}
1087
+ </Text>
1088
+ )}
1089
+ </View>
1090
+
1091
+ {/* Effort Level Section — second column */}
1092
+ {availableEffortLevels.length > 0 && props.onEffortLevelChange && (
1093
+ <>
1094
+ <View style={{
1095
+ width: 1,
1096
+ backgroundColor: theme.colors.divider,
1097
+ marginVertical: 8,
1098
+ }} />
1099
+ <View style={{ paddingVertical: 8, flex: 1 }}>
1100
+ <Text style={{
1101
+ fontSize: 12,
1102
+ fontWeight: '600',
1103
+ color: theme.colors.textSecondary,
1104
+ paddingHorizontal: 16,
1105
+ paddingBottom: 4,
1106
+ ...Typography.default('semiBold')
1107
+ }}>
1108
+ {t('agentInput.effort.title')}
1109
+ </Text>
1110
+ {availableEffortLevels.map((level) => {
1111
+ const isSelected = props.effortLevel?.key === level.key;
1112
+
1113
+ return (
1114
+ <Pressable
1115
+ key={level.key}
1116
+ onPress={() => {
1117
+ hapticsLight();
1118
+ props.onEffortLevelChange?.(level);
1119
+ setShowSettings(false);
1120
+ }}
1121
+ style={({ pressed }) => ({
1122
+ flexDirection: 'row',
1123
+ alignItems: 'flex-start',
1124
+ paddingHorizontal: 16,
1125
+ paddingVertical: 8,
1126
+ backgroundColor: pressed ? theme.colors.surfacePressed : 'transparent'
1127
+ })}
1128
+ >
1129
+ <View style={{
1130
+ width: 16,
1131
+ height: 16,
1132
+ borderRadius: 8,
1133
+ borderWidth: 2,
1134
+ borderColor: isSelected ? theme.colors.radio.active : theme.colors.radio.inactive,
1135
+ alignItems: 'center',
1136
+ justifyContent: 'center',
1137
+ marginRight: 12,
1138
+ marginTop: 2,
1139
+ }}>
1140
+ {isSelected && (
1141
+ <View style={{
1142
+ width: 6,
1143
+ height: 6,
1144
+ borderRadius: 3,
1145
+ backgroundColor: theme.colors.radio.dot
1146
+ }} />
1147
+ )}
1148
+ </View>
1149
+ <View>
1150
+ <Text style={{
1151
+ fontSize: 14,
1152
+ color: isSelected ? theme.colors.radio.active : theme.colors.text,
1153
+ ...Typography.default()
1154
+ }}>
1155
+ {level.name}
1156
+ </Text>
1157
+ {!!level.description && (
1158
+ <Text style={{
1159
+ fontSize: 11,
1160
+ color: theme.colors.textSecondary,
1161
+ ...Typography.default()
1162
+ }}>
1163
+ {level.description}
1164
+ </Text>
1165
+ )}
1166
+ </View>
1167
+ </Pressable>
1168
+ );
1169
+ })}
1170
+ </View>
1171
+ </>
1172
+ )}
1173
+ </View>
1174
+ </FloatingOverlay>
1175
+ </View>
1176
+ </>
1177
+ )}
1178
+
1179
+ <AgentInputStatusRow
1180
+ connectionStatus={props.connectionStatus}
1181
+ contextWarning={contextWarning}
1182
+ displayPermissionMode={displayPermissionMode}
1183
+ permissionModeKey={permissionModeKey}
1184
+ isSandboxedYoloMode={isSandboxedYoloMode}
1185
+ permissionLabel={displayPermissionMode ? withSandboxSuffix(displayPermissionMode.name, permissionModeKey) : null}
1186
+ zenMode={props.zenMode}
1187
+ />
1188
+
1189
+ <AgentInputContextChips
1190
+ machineName={props.machineName}
1191
+ onMachineClick={props.onMachineClick}
1192
+ currentPath={props.currentPath}
1193
+ onPathClick={props.onPathClick}
1194
+ />
1195
+
1196
+ {/* Box 2: Action Area (Input + Send) */}
1197
+ <Shaker ref={sendBlockShakerRef}>
1198
+ <View style={styles.unifiedPanel}>
1199
+ {/* Attachment preview strip */}
1200
+ {props.selectedImages && props.selectedImages.length > 0 && (
1201
+ <AgentInputAttachmentStrip
1202
+ images={props.selectedImages}
1203
+ onRemove={props.onRemoveImage ?? (() => {})}
1204
+ />
1205
+ )}
1206
+ {/* Input field */}
1207
+ <View style={[styles.inputContainer, props.minHeight ? { minHeight: props.minHeight } : undefined]}>
1208
+ <MultiTextInput
1209
+ ref={inputRef}
1210
+ defaultValue={props.initialValue}
1211
+ paddingTop={Platform.OS === 'web' ? 10 : 8}
1212
+ paddingBottom={Platform.OS === 'web' ? 10 : 8}
1213
+ onChangeText={handleTextChange}
1214
+ placeholder={props.placeholder}
1215
+ onKeyPress={handleKeyPress}
1216
+ onStateChange={handleInputStateChange}
1217
+ maxHeight={Platform.OS === 'web' ? 480 : 120}
1218
+ />
1219
+ </View>
1220
+
1221
+ {/* Action buttons below input */}
1222
+ <View style={styles.actionButtonsContainer}>
1223
+ <View style={{ flexDirection: 'column', flex: 1, gap: 2 }}>
1224
+ {/* Row 1: Settings, Profile (FIRST), Agent, Abort, Git Status */}
1225
+ <View style={{ flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between' }}>
1226
+ {props.zenMode && <View style={{ flex: 1 }} />}
1227
+ {!props.zenMode && <View style={styles.actionButtonsLeft}>
1228
+
1229
+ {/* Settings button */}
1230
+ {props.onPermissionModeChange && (
1231
+ <Pressable
1232
+ onPress={handleSettingsPress}
1233
+ hitSlop={{ top: 5, bottom: 10, left: 0, right: 0 }}
1234
+ style={(p) => ({
1235
+ flexDirection: 'row',
1236
+ alignItems: 'center',
1237
+ borderRadius: Platform.select({ default: 16, android: 20 }),
1238
+ paddingHorizontal: 8,
1239
+ paddingVertical: 6,
1240
+ justifyContent: 'center',
1241
+ height: 32,
1242
+ opacity: p.pressed ? 0.7 : 1,
1243
+ })}
1244
+ >
1245
+ <Octicons
1246
+ name={'gear'}
1247
+ size={16}
1248
+ color={theme.colors.button.secondary.tint}
1249
+ />
1250
+ </Pressable>
1251
+ )}
1252
+
1253
+ {/* Agent selector button */}
1254
+ {props.agentType && props.onAgentClick && (
1255
+ <Pressable
1256
+ onPress={() => {
1257
+ hapticsLight();
1258
+ props.onAgentClick?.();
1259
+ }}
1260
+ hitSlop={{ top: 5, bottom: 10, left: 0, right: 0 }}
1261
+ style={(p) => ({
1262
+ flexDirection: 'row',
1263
+ alignItems: 'center',
1264
+ borderRadius: Platform.select({ default: 16, android: 20 }),
1265
+ paddingHorizontal: 10,
1266
+ paddingVertical: 6,
1267
+ justifyContent: 'center',
1268
+ height: 32,
1269
+ opacity: p.pressed ? 0.7 : 1,
1270
+ gap: 6,
1271
+ })}
1272
+ >
1273
+ <Octicons
1274
+ name="cpu"
1275
+ size={14}
1276
+ color={theme.colors.button.secondary.tint}
1277
+ />
1278
+ <Text style={{
1279
+ fontSize: 13,
1280
+ color: theme.colors.button.secondary.tint,
1281
+ fontWeight: '600',
1282
+ ...Typography.default('semiBold'),
1283
+ }}>
1284
+ {props.agentType === 'claude' ? t('agentInput.agent.claude') : props.agentType === 'codex' ? t('agentInput.agent.codex') : props.agentType === 'openclaw' ? t('agentInput.agent.openclaw') : t('agentInput.agent.gemini')}
1285
+ </Text>
1286
+ </Pressable>
1287
+ )}
1288
+
1289
+ {/* Abort button */}
1290
+ {props.onAbort && (
1291
+ <Shaker ref={shakerRef}>
1292
+ <Pressable
1293
+ style={(p) => ({
1294
+ flexDirection: 'row',
1295
+ alignItems: 'center',
1296
+ borderRadius: Platform.select({ default: 16, android: 20 }),
1297
+ paddingHorizontal: 8,
1298
+ paddingVertical: 6,
1299
+ justifyContent: 'center',
1300
+ height: 32,
1301
+ opacity: p.pressed ? 0.7 : 1,
1302
+ })}
1303
+ hitSlop={{ top: 5, bottom: 10, left: 0, right: 0 }}
1304
+ onPress={handleAbortPress}
1305
+ disabled={isAborting}
1306
+ >
1307
+ {isAborting ? (
1308
+ <ActivityIndicator
1309
+ size="small"
1310
+ color={theme.colors.button.secondary.tint}
1311
+ />
1312
+ ) : (
1313
+ <Octicons
1314
+ name={"stop"}
1315
+ size={16}
1316
+ color={theme.colors.button.secondary.tint}
1317
+ />
1318
+ )}
1319
+ </Pressable>
1320
+ </Shaker>
1321
+ )}
1322
+
1323
+ {/* Git Status Badge */}
1324
+ <GitStatusButton sessionId={props.sessionId} onPress={props.onFileViewerPress} />
1325
+
1326
+ {/* Image picker button (expImageUpload) */}
1327
+ {props.onPickImages && (
1328
+ <Pressable
1329
+ onPress={props.onPickImages}
1330
+ hitSlop={{ top: 5, bottom: 10, left: 0, right: 0 }}
1331
+ style={(p) => ({
1332
+ flexDirection: 'row',
1333
+ alignItems: 'center',
1334
+ borderRadius: Platform.select({ default: 16, android: 20 }),
1335
+ paddingHorizontal: 8,
1336
+ paddingVertical: 6,
1337
+ justifyContent: 'center',
1338
+ height: 32,
1339
+ opacity: p.pressed ? 0.7 : 1,
1340
+ })}
1341
+ >
1342
+ <Ionicons
1343
+ name="image-outline"
1344
+ size={16}
1345
+ color={(props.selectedImages?.length ?? 0) > 0
1346
+ ? theme.colors.radio.active
1347
+ : theme.colors.button.secondary.tint}
1348
+ />
1349
+ </Pressable>
1350
+ )}
1351
+ </View>}
1352
+
1353
+ {/* Send/Voice button - aligned with first row */}
1354
+ <View
1355
+ style={[
1356
+ styles.sendButton,
1357
+ isSendBlocked ? styles.sendButtonLocked :
1358
+ (hasText || props.isSending || (props.onMicPress && !props.isMicActive))
1359
+ ? styles.sendButtonActive
1360
+ : styles.sendButtonInactive
1361
+ ]}
1362
+ >
1363
+ <Pressable
1364
+ style={(p) => ({
1365
+ width: '100%',
1366
+ height: '100%',
1367
+ alignItems: 'center',
1368
+ justifyContent: 'center',
1369
+ opacity: p.pressed ? 0.7 : 1,
1370
+ })}
1371
+ hitSlop={{ top: 5, bottom: 10, left: 0, right: 0 }}
1372
+ onPress={handleSendPress}
1373
+ disabled={!canPressSendButton}
1374
+ >
1375
+ {props.isSending ? (
1376
+ <ActivityIndicator
1377
+ size="small"
1378
+ color={theme.colors.button.primary.tint}
1379
+ />
1380
+ ) : isSendBlocked ? (
1381
+ <Ionicons
1382
+ name="lock-closed"
1383
+ size={15}
1384
+ color={theme.colors.textSecondary}
1385
+ />
1386
+ ) : hasText ? (
1387
+ <Octicons
1388
+ name="arrow-up"
1389
+ size={16}
1390
+ color={theme.colors.button.primary.tint}
1391
+ style={[
1392
+ styles.sendButtonIcon,
1393
+ { marginTop: Platform.OS === 'web' ? 2 : 0 }
1394
+ ]}
1395
+ />
1396
+ ) : props.onMicPress && !props.isMicActive ? (
1397
+ <Image
1398
+ source={require('@/assets/images/icon-voice-white.png')}
1399
+ style={{
1400
+ width: 24,
1401
+ height: 24,
1402
+ }}
1403
+ tintColor={theme.colors.button.primary.tint}
1404
+ />
1405
+ ) : (
1406
+ <Octicons
1407
+ name="arrow-up"
1408
+ size={16}
1409
+ color={theme.colors.button.primary.tint}
1410
+ style={[
1411
+ styles.sendButtonIcon,
1412
+ { marginTop: Platform.OS === 'web' ? 2 : 0 }
1413
+ ]}
1414
+ />
1415
+ )}
1416
+ </Pressable>
1417
+ </View>
1418
+ </View>
1419
+ </View>
1420
+ </View>
1421
+ </View>
1422
+ </Shaker>
1423
+ </View>
1424
+ </View>
1425
+ );
1426
+ }));
1427
+
1428
+ // Git Status Button Component
1429
+ function GitStatusButton({ sessionId, onPress }: { sessionId?: string, onPress?: () => void }) {
1430
+ const hasMeaningfulGitStatus = useHasMeaningfulGitStatus(sessionId || '');
1431
+ const styles = stylesheet;
1432
+ const { theme } = useUnistyles();
1433
+
1434
+ if (!sessionId || !onPress) {
1435
+ return null;
1436
+ }
1437
+
1438
+ return (
1439
+ <Pressable
1440
+ style={(p) => ({
1441
+ flexDirection: 'row',
1442
+ alignItems: 'center',
1443
+ borderRadius: Platform.select({ default: 16, android: 20 }),
1444
+ paddingHorizontal: 8,
1445
+ paddingVertical: 6,
1446
+ height: 32,
1447
+ opacity: p.pressed ? 0.7 : 1,
1448
+ flex: 1,
1449
+ overflow: 'hidden',
1450
+ })}
1451
+ hitSlop={{ top: 5, bottom: 10, left: 0, right: 0 }}
1452
+ onPress={() => {
1453
+ hapticsLight();
1454
+ onPress?.();
1455
+ }}
1456
+ >
1457
+ {hasMeaningfulGitStatus ? (
1458
+ <GitStatusBadge sessionId={sessionId} />
1459
+ ) : (
1460
+ <Octicons
1461
+ name="git-branch"
1462
+ size={16}
1463
+ color={theme.colors.button.secondary.tint}
1464
+ />
1465
+ )}
1466
+ </Pressable>
1467
+ );
1468
+ }