thursday-agent 0.17.2 → 0.19.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 (444) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +4 -2
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/routes-manifest.json +28 -12
  6. package/.next/server/app/_global-error/page.js.nft.json +1 -1
  7. package/.next/server/app/_global-error.html +1 -1
  8. package/.next/server/app/_global-error.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  12. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  13. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  14. package/.next/server/app/_not-found.html +1 -1
  15. package/.next/server/app/_not-found.rsc +12 -12
  16. package/.next/server/app/_not-found.segments/_full.segment.rsc +12 -12
  17. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +11 -11
  18. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  19. package/.next/server/app/api/artifact/route.js +7 -7
  20. package/.next/server/app/api/artifact/route.js.nft.json +1 -1
  21. package/.next/server/app/api/bot/memory/files/route.js +4 -4
  22. package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -1
  23. package/.next/server/app/api/bot/memory/route.js +4 -4
  24. package/.next/server/app/api/bot/memory/route.js.nft.json +1 -1
  25. package/.next/server/app/api/bot/route.js +4 -4
  26. package/.next/server/app/api/bot/route.js.nft.json +1 -1
  27. package/.next/server/app/api/bot/thread/[id]/route.js +1 -1
  28. package/.next/server/app/api/bot/thread/[id]/route.js.nft.json +1 -1
  29. package/.next/server/app/api/bot/thread/file/route/app-paths-manifest.json +3 -0
  30. package/.next/server/app/api/bot/thread/file/route.js +29 -0
  31. package/.next/server/app/api/bot/thread/file/route.js.nft.json +1 -0
  32. package/.next/server/app/api/bot/thread/file/route_client-reference-manifest.js +3 -0
  33. package/.next/server/app/api/bot/thread/route.js +1 -1
  34. package/.next/server/app/api/bot/thread/route.js.nft.json +1 -1
  35. package/.next/server/app/api/config/route.js +1 -1
  36. package/.next/server/app/api/config/route.js.nft.json +1 -1
  37. package/.next/server/app/api/events/route.js +2 -2
  38. package/.next/server/app/api/events/route.js.nft.json +1 -1
  39. package/.next/server/app/api/favicon/[host]/route.js.nft.json +1 -1
  40. package/.next/server/app/api/file/[...path]/route.js +4 -4
  41. package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
  42. package/.next/server/app/api/llm-model/automatic/route.js +3 -3
  43. package/.next/server/app/api/llm-model/automatic/route.js.nft.json +1 -1
  44. package/.next/server/app/api/llm-model/catalog/[provider]/route/app-paths-manifest.json +3 -0
  45. package/.next/server/app/api/llm-model/catalog/{route.js → [provider]/route.js} +8 -8
  46. package/.next/server/app/api/llm-model/catalog/[provider]/route.js.nft.json +1 -0
  47. package/.next/server/app/api/llm-model/catalog/[provider]/route_client-reference-manifest.js +3 -0
  48. package/.next/server/app/api/llm-model/credits/[provider]/route/app-paths-manifest.json +3 -0
  49. package/.next/server/app/api/llm-model/credits/[provider]/route/build-manifest.json +12 -0
  50. package/.next/server/app/api/llm-model/credits/[provider]/route/server-reference-manifest.json +4 -0
  51. package/.next/server/app/api/llm-model/credits/{route.js → [provider]/route.js} +8 -8
  52. package/.next/server/app/api/llm-model/credits/[provider]/route.js.map +5 -0
  53. package/.next/server/app/api/llm-model/credits/[provider]/route.js.nft.json +1 -0
  54. package/.next/server/app/api/llm-model/credits/[provider]/route_client-reference-manifest.js +3 -0
  55. package/.next/server/app/api/llm-model/route.js +1 -1
  56. package/.next/server/app/api/llm-model/route.js.nft.json +1 -1
  57. package/.next/server/app/api/llm-model/subscription/route.js +1 -1
  58. package/.next/server/app/api/llm-model/subscription/route.js.nft.json +1 -1
  59. package/.next/server/app/api/mcp/[name]/route.js +1 -1
  60. package/.next/server/app/api/mcp/[name]/route.js.nft.json +1 -1
  61. package/.next/server/app/api/mcp/oauth/callback/route.js +2 -2
  62. package/.next/server/app/api/mcp/oauth/callback/route.js.nft.json +1 -1
  63. package/.next/server/app/api/mcp/route.js +1 -1
  64. package/.next/server/app/api/mcp/route.js.nft.json +1 -1
  65. package/.next/server/app/api/mcp/tools/route.js +1 -1
  66. package/.next/server/app/api/mcp/tools/route.js.nft.json +1 -1
  67. package/.next/server/app/api/memory/edit/route.js +12 -12
  68. package/.next/server/app/api/memory/edit/route.js.nft.json +1 -1
  69. package/.next/server/app/api/memory/route.js +1 -1
  70. package/.next/server/app/api/memory/route.js.nft.json +1 -1
  71. package/.next/server/app/api/reach/route.js +17 -17
  72. package/.next/server/app/api/reach/route.js.nft.json +1 -1
  73. package/.next/server/app/api/routine/route.js +6 -6
  74. package/.next/server/app/api/routine/route.js.nft.json +1 -1
  75. package/.next/server/app/api/running/route/app-paths-manifest.json +3 -0
  76. package/.next/server/app/api/running/route/build-manifest.json +12 -0
  77. package/.next/server/app/api/running/route/server-reference-manifest.json +4 -0
  78. package/.next/server/app/api/running/route.js +10 -0
  79. package/.next/server/app/api/running/route.js.map +5 -0
  80. package/.next/server/app/api/running/route.js.nft.json +1 -0
  81. package/.next/server/app/api/running/route_client-reference-manifest.js +3 -0
  82. package/.next/server/app/api/signins/route.js +4 -4
  83. package/.next/server/app/api/signins/route.js.nft.json +1 -1
  84. package/.next/server/app/api/skills/[source]/[name]/route.js +7 -7
  85. package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
  86. package/.next/server/app/api/skills/route.js +6 -6
  87. package/.next/server/app/api/skills/route.js.nft.json +1 -1
  88. package/.next/server/app/api/thursday/call/end/route.js +1 -1
  89. package/.next/server/app/api/thursday/call/end/route.js.nft.json +1 -1
  90. package/.next/server/app/api/thursday/call/route.js +1 -1
  91. package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
  92. package/.next/server/app/api/thursday/settings/route.js +1 -1
  93. package/.next/server/app/api/thursday/settings/route.js.nft.json +1 -1
  94. package/.next/server/app/api/thursday/text/route.js +12 -12
  95. package/.next/server/app/api/thursday/text/route.js.nft.json +1 -1
  96. package/.next/server/app/api/thursday/tool-call/route.js +13 -13
  97. package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
  98. package/.next/server/app/api/workspace/files/route.js +7 -7
  99. package/.next/server/app/api/workspace/files/route.js.nft.json +1 -1
  100. package/.next/server/app/api/workspace/route.js +6 -6
  101. package/.next/server/app/api/workspace/route.js.nft.json +1 -1
  102. package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +94 -6
  103. package/.next/server/app/artifact/[...path]/page.js +9 -5
  104. package/.next/server/app/artifact/[...path]/page.js.nft.json +1 -1
  105. package/.next/server/app/artifact/[...path]/page_client-reference-manifest.js +1 -1
  106. package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
  107. package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  108. package/.next/server/app/page/server-reference-manifest.json +161 -128
  109. package/.next/server/app/page.js +10 -9
  110. package/.next/server/app/page.js.nft.json +1 -1
  111. package/.next/server/app/page_client-reference-manifest.js +1 -1
  112. package/.next/server/app-paths-manifest.json +4 -2
  113. package/.next/server/chunks/[root-of-the-server]__00qyw01._.js +1 -1
  114. package/.next/server/chunks/[root-of-the-server]__02ra64t._.js +5 -0
  115. package/.next/server/chunks/{[root-of-the-server]__05dp5tr._.js → [root-of-the-server]__06ky9of._.js} +2 -2
  116. package/.next/server/chunks/[root-of-the-server]__0b565-x._.js +7 -0
  117. package/.next/server/chunks/[root-of-the-server]__0bmtib_._.js +7 -0
  118. package/.next/server/chunks/[root-of-the-server]__0bqveex._.js +1 -1
  119. package/.next/server/chunks/[root-of-the-server]__0brmiv2._.js +7 -0
  120. package/.next/server/chunks/[root-of-the-server]__0eivkvk._.js +2 -2
  121. package/.next/server/chunks/[root-of-the-server]__0f7m79q._.js +1 -1
  122. package/.next/server/chunks/[root-of-the-server]__0g38-aj._.js +2 -2
  123. package/.next/server/chunks/[root-of-the-server]__0gvdr2h._.js +5 -0
  124. package/.next/server/chunks/[root-of-the-server]__0h656y-._.js +2 -2
  125. package/.next/server/chunks/[root-of-the-server]__0hm3tiq._.js +2 -2
  126. package/.next/server/chunks/[root-of-the-server]__0hzdqnv._.js +2 -2
  127. package/.next/server/chunks/[root-of-the-server]__0kzmxpg._.js +3 -0
  128. package/.next/server/chunks/[root-of-the-server]__0mgyt8p._.js +2 -2
  129. package/.next/server/chunks/[root-of-the-server]__0mrk2it._.js +1 -1
  130. package/.next/server/chunks/[root-of-the-server]__0o5s5-o._.js +5 -0
  131. package/.next/server/chunks/[root-of-the-server]__0p80i1n._.js +1 -1
  132. package/.next/server/chunks/[root-of-the-server]__0qdoc_9._.js +5 -0
  133. package/.next/server/chunks/[root-of-the-server]__0qzho69._.js +1 -1
  134. package/.next/server/chunks/[root-of-the-server]__0sm5xvm._.js +1 -1
  135. package/.next/server/chunks/[root-of-the-server]__0v_kuor._.js +5 -0
  136. package/.next/server/chunks/{[root-of-the-server]__061o2_x._.js → [root-of-the-server]__0ypkfbu._.js} +1 -1
  137. package/.next/server/chunks/[root-of-the-server]__1-18_pz._.js +1 -1
  138. package/.next/server/chunks/[root-of-the-server]__13hng6h._.js +1 -1
  139. package/.next/server/chunks/{[root-of-the-server]__01k3vi3._.js → [root-of-the-server]__14iga7p._.js} +1 -1
  140. package/.next/server/chunks/[root-of-the-server]__16gn7zn._.js +3 -0
  141. package/.next/server/chunks/[root-of-the-server]__18e65_-._.js +3 -0
  142. package/.next/server/chunks/[root-of-the-server]__1_04mcf._.js +2 -2
  143. package/.next/server/chunks/[root-of-the-server]__1_cgawk._.js +5 -0
  144. package/.next/server/chunks/[root-of-the-server]__1ceammd._.js +1 -1
  145. package/.next/server/chunks/[root-of-the-server]__1ckt1yj._.js +1 -1
  146. package/.next/server/chunks/[root-of-the-server]__1cu5f3z._.js +1 -1
  147. package/.next/server/chunks/[root-of-the-server]__1dth047._.js +5 -0
  148. package/.next/server/chunks/{[root-of-the-server]__1k2qs1m._.js → [root-of-the-server]__1fc6v12._.js} +1 -1
  149. package/.next/server/chunks/[root-of-the-server]__1hviq62._.js +2 -2
  150. package/.next/server/chunks/[root-of-the-server]__1ksm9m-._.js +12 -0
  151. package/.next/server/chunks/[root-of-the-server]__1m1q6u5._.js +3 -0
  152. package/.next/server/chunks/[root-of-the-server]__1m_dmf6._.js +5 -0
  153. package/.next/server/chunks/[root-of-the-server]__1mys2c3._.js +5 -0
  154. package/.next/server/chunks/[root-of-the-server]__1ndi14y._.js +1 -1
  155. package/.next/server/chunks/[root-of-the-server]__1p0njle._.js +5 -0
  156. package/.next/server/chunks/[root-of-the-server]__1p47fbb._.js +2 -2
  157. package/.next/server/chunks/[root-of-the-server]__1pugoq0._.js +1 -1
  158. package/.next/server/chunks/{[root-of-the-server]__0ts7ai0._.js → [root-of-the-server]__1trns9g._.js} +1 -1
  159. package/.next/server/chunks/[root-of-the-server]__1ygplx1._.js +1 -1
  160. package/.next/server/chunks/[root-of-the-server]__1zn039k._.js +1 -1
  161. package/.next/server/chunks/[root-of-the-server]__20w_g71._.js +3 -0
  162. package/.next/server/chunks/_01c32w9._.js +1 -1
  163. package/.next/server/chunks/_02bov6_._.js +1 -1
  164. package/.next/server/chunks/_06hnfi8._.js +2 -2
  165. package/.next/server/chunks/_06u9yo-._.js +1 -1
  166. package/.next/server/chunks/_08354bn._.js +12 -11
  167. package/.next/server/chunks/_08_-9ay._.js +7 -0
  168. package/.next/server/chunks/_08s4vft._.js +1 -1
  169. package/.next/server/chunks/_0bgjf07._.js +5 -0
  170. package/.next/server/chunks/_0c49lmw._.js +1 -1
  171. package/.next/server/chunks/_0fb6dvr._.js +1 -1
  172. package/.next/server/chunks/_0hgvg55._.js +1 -1
  173. package/.next/server/chunks/_0iw19ig._.js +1 -1
  174. package/.next/server/chunks/_0poi1t2._.js +1 -1
  175. package/.next/server/chunks/_0s8ao8z._.js +1 -1
  176. package/.next/server/chunks/_0t_7gji._.js +1 -1
  177. package/.next/server/chunks/_0ucx1jv._.js +1 -1
  178. package/.next/server/chunks/_0uzj57i._.js +1 -1
  179. package/.next/server/chunks/_0wyh244._.js +112 -0
  180. package/.next/server/chunks/_1-sk_q4._.js +1 -1
  181. package/.next/server/chunks/_108gsm8._.js +2 -2
  182. package/.next/server/chunks/_136j09a._.js +5 -5
  183. package/.next/server/chunks/_15negpy._.js +2 -2
  184. package/.next/server/chunks/_1d7og_q._.js +1 -1
  185. package/.next/server/chunks/_1dxq827._.js +2 -2
  186. package/.next/server/chunks/_1e54wxa._.js +1 -1
  187. package/.next/server/chunks/_1frcwj1._.js +1 -1
  188. package/.next/server/chunks/_1gn2r2q._.js +8 -6
  189. package/.next/server/chunks/_1gxankq._.js +2 -2
  190. package/.next/server/chunks/_1i3uucm._.js +1 -1
  191. package/.next/server/chunks/_1jvy78-._.js +5 -0
  192. package/.next/server/chunks/_1lg0lsu._.js +53 -0
  193. package/.next/server/chunks/_1njolhx._.js +294 -0
  194. package/.next/server/chunks/_1q6e56i._.js +8 -6
  195. package/.next/server/chunks/_1qgix-j._.js +1 -1
  196. package/.next/server/chunks/_1wtb-77._.js +294 -0
  197. package/.next/server/chunks/_1wwl_7o._.js +1 -1
  198. package/.next/server/chunks/_1y8w80a._.js +5 -5
  199. package/.next/server/chunks/_1yx285_._.js +3 -0
  200. package/.next/server/chunks/_20qn224._.js +3 -0
  201. package/.next/server/chunks/_211dn2c._.js +1 -1
  202. package/.next/server/chunks/_next-internal_server_app_api_bot_thread_file_route_actions_0q3be0o.js +3 -0
  203. package/.next/server/chunks/_next-internal_server_app_api_llm-model_catalog_[provider]_route_actions_1i0449q.js +3 -0
  204. package/.next/server/chunks/_next-internal_server_app_api_llm-model_credits_[provider]_route_actions_0iui9hz.js +3 -0
  205. package/.next/server/chunks/_next-internal_server_app_api_running_route_actions_0o1g-aw.js +3 -0
  206. package/.next/server/chunks/config_ts_1g4sz5o._.js +1 -1
  207. package/.next/server/chunks/features_bot_08z387_._.js +3 -3
  208. package/.next/server/chunks/features_bot_0zy_q8y._.js +7 -7
  209. package/.next/server/chunks/features_bot_1dfrdsb._.js +7 -7
  210. package/.next/server/chunks/features_workspace_workspace_ts_13h82gv._.js +3 -3
  211. package/.next/server/chunks/features_workspace_workspace_ts_1iyjroj._.js +3 -3
  212. package/.next/server/chunks/{node_modules_1rosz79._.js → node_modules_035o7ku._.js} +1 -1
  213. package/.next/server/chunks/{node_modules_1er1u8w._.js → node_modules_0tn5t13._.js} +1 -1
  214. package/.next/server/chunks/{node_modules_103lpef._.js → node_modules_12oq3hr._.js} +1 -1
  215. package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0g87zst._.js → node_modules_consola_dist_chunks_prompt_mjs_0yd5xa0._.js} +1 -1
  216. package/.next/server/chunks/ssr/[root-of-the-server]__04upd5v._.js +1 -1
  217. package/.next/server/chunks/ssr/[root-of-the-server]__0p0mv2u._.js +3 -0
  218. package/.next/server/chunks/ssr/[root-of-the-server]__0sk5enu._.js +3 -0
  219. package/.next/server/chunks/ssr/[root-of-the-server]__0xyaud4._.js +3 -0
  220. package/.next/server/chunks/ssr/[root-of-the-server]__1-gi9sm._.js +3 -0
  221. package/.next/server/chunks/ssr/[root-of-the-server]__16nn3pe._.js +3 -0
  222. package/.next/server/chunks/ssr/[root-of-the-server]__1867koj._.js +1 -1
  223. package/.next/server/chunks/ssr/[root-of-the-server]__1c8-7cw._.js +3 -0
  224. package/.next/server/chunks/ssr/{[root-of-the-server]__1d7usu0._.js → [root-of-the-server]__1qn0axo._.js} +2 -2
  225. package/.next/server/chunks/ssr/[root-of-the-server]__1tb5vve._.js +47 -0
  226. package/.next/server/chunks/ssr/_02cm0fr._.js +5 -0
  227. package/.next/server/chunks/ssr/{features_bot_1knyan7._.js → _07nmtxo._.js} +2 -2
  228. package/.next/server/chunks/ssr/_088vzgn._.js +1 -1
  229. package/.next/server/chunks/ssr/{_1dfv66y._.js → _0bg1u1j._.js} +2 -2
  230. package/.next/server/chunks/ssr/_0cv9tmv._.js +1 -1
  231. package/.next/server/chunks/ssr/{_10-_awu._.js → _0f9hx5p._.js} +2 -2
  232. package/.next/server/chunks/ssr/_0g9ula_._.js +3 -0
  233. package/.next/server/chunks/ssr/{_1aqjk-1._.js → _0irozu9._.js} +2 -2
  234. package/.next/server/chunks/ssr/{_123y-ah._.js → _0is8m6y._.js} +2 -2
  235. package/.next/server/chunks/ssr/_0iwsdp7._.js +3 -0
  236. package/.next/server/chunks/ssr/_0l7rjg5._.js +1 -1
  237. package/.next/server/chunks/ssr/{lib_logger_ts_0-olsze._.js → _0mfgsk-._.js} +4 -2
  238. package/.next/server/chunks/ssr/{_0fo4552._.js → _0nk80t6._.js} +53 -13
  239. package/.next/server/chunks/ssr/_0p6w0ef._.js +3 -0
  240. package/.next/server/chunks/ssr/_0pbav_w._.js +3 -0
  241. package/.next/server/chunks/ssr/{_0vo_oym._.js → _0q-mdwv._.js} +8 -8
  242. package/.next/server/chunks/ssr/_0s5_ahb._.js +3 -0
  243. package/.next/server/chunks/ssr/{_0e2fnvg._.js → _0t5f2c3._.js} +2 -2
  244. package/.next/server/chunks/ssr/_0v9r8g2._.js +1 -1
  245. package/.next/server/chunks/ssr/_0x8ophf._.js +1 -1
  246. package/.next/server/chunks/ssr/_0x9f717._.js +60 -0
  247. package/.next/server/chunks/ssr/_107vtdk._.js +162 -0
  248. package/.next/server/chunks/ssr/{_17a4qyk._.js → _12lql1x._.js} +3 -3
  249. package/.next/server/chunks/ssr/{_163dr78._.js → _165wnr4._.js} +2 -2
  250. package/.next/server/chunks/ssr/_16_7zeo._.js +3 -0
  251. package/.next/server/chunks/ssr/_17komoi._.js +3 -0
  252. package/.next/server/chunks/ssr/_190hjys._.js +3 -0
  253. package/.next/server/chunks/ssr/_1bfrntd._.js +6 -0
  254. package/.next/server/chunks/ssr/{_01al00i._.js → _1booff4._.js} +2 -2
  255. package/.next/server/chunks/ssr/{_0xfafez._.js → _1ew1j7l._.js} +2 -2
  256. package/.next/server/chunks/ssr/_1i2swyr._.js +3 -0
  257. package/.next/server/chunks/ssr/_1neoj22._.js +1 -1
  258. package/.next/server/chunks/ssr/_1qsa25k._.js +3 -0
  259. package/.next/server/chunks/ssr/_1soynbw._.js +6 -0
  260. package/.next/server/chunks/ssr/_1vc2xmu._.js +3 -0
  261. package/.next/server/chunks/ssr/{_14oirtb._.js → _1wq90j8._.js} +2 -2
  262. package/.next/server/chunks/ssr/_1xwtbdz._.js +3 -0
  263. package/.next/server/chunks/ssr/_1zrhkf0._.js +310 -0
  264. package/.next/server/chunks/ssr/_21awrs2._.js +5 -0
  265. package/.next/server/chunks/ssr/features_0796o8r._.js +1 -1
  266. package/.next/server/chunks/ssr/features_bot_0tb4ui-._.js +2 -2
  267. package/.next/server/chunks/ssr/features_bot_1c56lew._.js +37 -0
  268. package/.next/server/chunks/ssr/features_bot_1fn_grf._.js +3 -0
  269. package/.next/server/chunks/ssr/{features_config_09n-q9q._.js → features_config_05zi68v._.js} +3 -3
  270. package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
  271. package/.next/server/chunks/ssr/features_memory_components_memory-setting_tsx_0oa43sw._.js +1 -1
  272. package/.next/server/chunks/ssr/features_routine_components_routine-setting_tsx_055fknz._.js +1 -1
  273. package/.next/server/chunks/ssr/features_workspace_workspace_ts_1wc7_u_._.js +4 -4
  274. package/.next/server/chunks/ssr/{node_modules_1k5i-_9._.js → node_modules_0-sux1a._.js} +1 -1
  275. package/.next/server/chunks/ssr/{node_modules_0msrhxf._.js → node_modules_01oezhb._.js} +1 -1
  276. package/.next/server/chunks/ssr/{node_modules_1gq3ght._.js → node_modules_04m6ebg._.js} +1 -1
  277. package/.next/server/chunks/ssr/{node_modules_0nmkv-v._.js → node_modules_067jfov._.js} +1 -1
  278. package/.next/server/chunks/ssr/{node_modules_0gd9hbz._.js → node_modules_06ugby3._.js} +1 -1
  279. package/.next/server/chunks/ssr/{node_modules_0d6j33x._.js → node_modules_07p51j3._.js} +1 -1
  280. package/.next/server/chunks/ssr/{node_modules_10_fv2a._.js → node_modules_0995xyq._.js} +1 -1
  281. package/.next/server/chunks/ssr/{node_modules_1lmyts8._.js → node_modules_0_uecwx._.js} +1 -1
  282. package/.next/server/chunks/ssr/{node_modules_04x5wyv._.js → node_modules_0dsyc90._.js} +1 -1
  283. package/.next/server/chunks/ssr/{node_modules_0__0tvm._.js → node_modules_0hli6s2._.js} +1 -1
  284. package/.next/server/chunks/ssr/{node_modules_0k8-y89._.js → node_modules_0m-bde_._.js} +1 -1
  285. package/.next/server/chunks/ssr/{node_modules_1p_6sq7._.js → node_modules_0oqfdbr._.js} +1 -1
  286. package/.next/server/chunks/ssr/node_modules_0qd7p5f._.js +3 -0
  287. package/.next/server/chunks/ssr/{node_modules_13g-d25._.js → node_modules_0tgy5s5._.js} +1 -1
  288. package/.next/server/chunks/ssr/{node_modules_1_8-jcj._.js → node_modules_1-kjmls._.js} +1 -1
  289. package/.next/server/chunks/ssr/{node_modules_0m73b88._.js → node_modules_1-l3ka5._.js} +1 -1
  290. package/.next/server/chunks/ssr/{node_modules_113l3e5._.js → node_modules_1-w3ayh._.js} +1 -1
  291. package/.next/server/chunks/ssr/{node_modules_0q-klni._.js → node_modules_133exgm._.js} +1 -1
  292. package/.next/server/chunks/ssr/{node_modules_1xb-ndg._.js → node_modules_17xc5_k._.js} +1 -1
  293. package/.next/server/chunks/ssr/{node_modules_021lid9._.js → node_modules_1_i_w30._.js} +1 -1
  294. package/.next/server/chunks/ssr/{node_modules_1ri_eip._.js → node_modules_1a2cjfk._.js} +1 -1
  295. package/.next/server/chunks/ssr/{node_modules_13bqv6i._.js → node_modules_1k752fe._.js} +1 -1
  296. package/.next/server/chunks/ssr/{node_modules_1qstb1x._.js → node_modules_1lie7z8._.js} +1 -1
  297. package/.next/server/chunks/ssr/{node_modules_096up6a._.js → node_modules_1mv70-y._.js} +1 -1
  298. package/.next/server/chunks/ssr/{node_modules_156kv_t._.js → node_modules_1r611t2._.js} +1 -1
  299. package/.next/server/chunks/ssr/node_modules_1vfd8dz._.js +3 -0
  300. package/.next/server/chunks/ssr/{node_modules_0cjnmzp._.js → node_modules_1yaowd7._.js} +1 -1
  301. package/.next/server/chunks/ssr/{node_modules_0nw5jz7._.js → node_modules_20a1wpo._.js} +1 -1
  302. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0amkw0b._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1r8pxbe._.js} +1 -1
  303. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0zq3l45._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1siiu4h._.js} +1 -1
  304. package/.next/server/middleware-build-manifest.js +3 -3
  305. package/.next/server/pages/404.html +1 -1
  306. package/.next/server/pages/500.html +1 -1
  307. package/.next/server/server-reference-manifest.js +1 -1
  308. package/.next/server/server-reference-manifest.json +205 -132
  309. package/.next/static/chunks/{0obogzscwwekj.js → 088d3w5qxu19g.js} +2 -2
  310. package/.next/static/chunks/0_s4z70lx1tgs.js +1 -0
  311. package/.next/static/chunks/0bxekp4hnuk1g.js +1 -0
  312. package/.next/static/chunks/{1cglo3a2mbeou.js → 0fw4u_s974j24.js} +1 -1
  313. package/.next/static/chunks/0hy2x7qhk8wgx.css +1 -0
  314. package/.next/static/chunks/{2zbl41hed17g3.js → 0n_eshmn_7wfn.js} +2 -2
  315. package/.next/static/chunks/0q9b2n6l4flqb.js +1 -0
  316. package/.next/static/chunks/0ulcp_u_y1u0b.js +15 -0
  317. package/.next/static/chunks/0vj93zo0yvix9.js +35 -0
  318. package/.next/static/chunks/{166smhw8v-s3j.js → 10f98bh4hdmhe.js} +1 -1
  319. package/.next/static/chunks/1b8bce_z_act0.js +1 -0
  320. package/.next/static/chunks/1c32d2azsjaj_.js +1 -0
  321. package/.next/static/chunks/{1xv4g10m-cl1s.js → 1fs829mz69pxz.js} +1 -1
  322. package/.next/static/chunks/1lwlh4mo_vv8d.js +1 -0
  323. package/.next/static/chunks/{0p2f6uv4xytfm.js → 1po8fkg40peu-.js} +1 -1
  324. package/.next/static/chunks/{0uxq_vs6uxi-b.js → 1rg6b9l5fm1hj.js} +1 -1
  325. package/.next/static/chunks/{3b96xy59nl_gd.js → 26g3iwfuad-7p.js} +1 -1
  326. package/.next/static/chunks/2bjnmtke_q43c.js +1 -0
  327. package/.next/static/chunks/2c86k0o-1p9_w.js +1 -0
  328. package/.next/static/chunks/2gf4t0d76bvyv.js +1 -0
  329. package/.next/static/chunks/2rj3q_ahctv19.js +1 -0
  330. package/.next/static/chunks/{2lhc74urf3acr.js → 2x6-fpctvucte.js} +1 -1
  331. package/.next/static/chunks/2yicf7bky866n.js +3 -0
  332. package/.next/static/chunks/337g9g_ux2gj-.js +1 -0
  333. package/.next/static/chunks/350ws7svim7ij.js +58 -0
  334. package/.next/static/chunks/{0o7o0eb7ihxi6.js → 396enq-m0sss5.js} +1 -1
  335. package/.next/static/chunks/3e1w_nwfb39j-.js +1 -0
  336. package/.next/static/chunks/3v3ooretb54ag.js +1 -0
  337. package/.next/static/chunks/40re_3ukjulg9.js +1 -0
  338. package/.next/static/chunks/{3gsxnqqqphh-1.js → 44bcbnmup71so.js} +1 -1
  339. package/.next/static/chunks/{2qgkbdshzpq1c.js → 458dtbsemx996.js} +1 -1
  340. package/README.md +5 -5
  341. package/bin/background.mjs +995 -0
  342. package/bin/lock.mjs +121 -5
  343. package/bin/thursday.mjs +126 -30
  344. package/bin/tools.mjs +72 -1
  345. package/database/migrations/20260926021847_thread_cache_tokens/migration.sql +2 -0
  346. package/database/migrations/20260926021847_thread_cache_tokens/snapshot.json +1949 -0
  347. package/guide/bots.md +173 -317
  348. package/guide/calls.md +106 -146
  349. package/guide/index.md +2 -2
  350. package/guide/memory.md +14 -18
  351. package/guide/phone.md +86 -133
  352. package/guide/setup.md +141 -172
  353. package/guide/trouble.md +42 -65
  354. package/package.json +1 -1
  355. package/seed-skills/concierge/travel/references/itinerary.md +1 -1
  356. package/seed-skills/concierge/travel/scripts/itinerary.mjs +8 -3
  357. package/skills/artifact/references/book.md +3 -3
  358. package/skills/artifact/runtime/shell/shell.js +32 -3
  359. package/.next/server/app/api/llm-model/catalog/route/app-paths-manifest.json +0 -3
  360. package/.next/server/app/api/llm-model/catalog/route.js.nft.json +0 -1
  361. package/.next/server/app/api/llm-model/catalog/route_client-reference-manifest.js +0 -3
  362. package/.next/server/app/api/llm-model/credits/route/app-paths-manifest.json +0 -3
  363. package/.next/server/app/api/llm-model/credits/route.js.nft.json +0 -1
  364. package/.next/server/app/api/llm-model/credits/route_client-reference-manifest.js +0 -3
  365. package/.next/server/chunks/[root-of-the-server]__01ypm_z._.js +0 -3
  366. package/.next/server/chunks/[root-of-the-server]__021dkui._.js +0 -3
  367. package/.next/server/chunks/[root-of-the-server]__03xamry._.js +0 -3
  368. package/.next/server/chunks/[root-of-the-server]__09gdscj._.js +0 -7
  369. package/.next/server/chunks/[root-of-the-server]__0ljizgj._.js +0 -5
  370. package/.next/server/chunks/[root-of-the-server]__0nmust6._.js +0 -5
  371. package/.next/server/chunks/[root-of-the-server]__0svzjwa._.js +0 -7
  372. package/.next/server/chunks/[root-of-the-server]__1-rmal0._.js +0 -5
  373. package/.next/server/chunks/[root-of-the-server]__10xnb7e._.js +0 -3
  374. package/.next/server/chunks/[root-of-the-server]__1_h4hf9._.js +0 -7
  375. package/.next/server/chunks/[root-of-the-server]__1c2kwku._.js +0 -12
  376. package/.next/server/chunks/[root-of-the-server]__1t02-1p._.js +0 -3
  377. package/.next/server/chunks/[root-of-the-server]__1t0jj1j._.js +0 -5
  378. package/.next/server/chunks/[root-of-the-server]__1v7x5ym._.js +0 -3
  379. package/.next/server/chunks/[root-of-the-server]__1vlxv19._.js +0 -5
  380. package/.next/server/chunks/_07nxi75._.js +0 -254
  381. package/.next/server/chunks/_08btiir._.js +0 -7
  382. package/.next/server/chunks/_0j0-gq6._.js +0 -5
  383. package/.next/server/chunks/_0p6v1fr._.js +0 -5
  384. package/.next/server/chunks/_0srlnvd._.js +0 -16
  385. package/.next/server/chunks/_0xygcxs._.js +0 -254
  386. package/.next/server/chunks/_1ic3bew._.js +0 -5
  387. package/.next/server/chunks/_next-internal_server_app_api_llm-model_catalog_route_actions_1eu2y41.js +0 -3
  388. package/.next/server/chunks/_next-internal_server_app_api_llm-model_credits_route_actions_0v424pb.js +0 -3
  389. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_04oxl25._.js +0 -3
  390. package/.next/server/chunks/ssr/[root-of-the-server]__0-af_o7._.js +0 -3
  391. package/.next/server/chunks/ssr/[root-of-the-server]__09f39cp._.js +0 -4
  392. package/.next/server/chunks/ssr/[root-of-the-server]__0ouu4qp._.js +0 -3
  393. package/.next/server/chunks/ssr/[root-of-the-server]__0q9g9ea._.js +0 -5
  394. package/.next/server/chunks/ssr/[root-of-the-server]__17h1ggo._.js +0 -46
  395. package/.next/server/chunks/ssr/[root-of-the-server]__1jyeu61._.js +0 -5
  396. package/.next/server/chunks/ssr/_0afrpci._.js +0 -3
  397. package/.next/server/chunks/ssr/_0bgse1c._.js +0 -162
  398. package/.next/server/chunks/ssr/_0jstvlg._.js +0 -39
  399. package/.next/server/chunks/ssr/_0qsmpcu._.js +0 -3
  400. package/.next/server/chunks/ssr/_0z38nha._.js +0 -3
  401. package/.next/server/chunks/ssr/_1-41lck._.js +0 -3
  402. package/.next/server/chunks/ssr/_10_ph1t._.js +0 -3
  403. package/.next/server/chunks/ssr/_116lfdc._.js +0 -3
  404. package/.next/server/chunks/ssr/_14dfh7a._.js +0 -4
  405. package/.next/server/chunks/ssr/_17qtuv7._.js +0 -3
  406. package/.next/server/chunks/ssr/_19jez1a._.js +0 -3
  407. package/.next/server/chunks/ssr/_1_5xof_._.js +0 -3
  408. package/.next/server/chunks/ssr/_1alxym6._.js +0 -3
  409. package/.next/server/chunks/ssr/_1ou5sj0._.js +0 -3
  410. package/.next/server/chunks/ssr/_1tmw842._.js +0 -5
  411. package/.next/server/chunks/ssr/_1uij_rj._.js +0 -3
  412. package/.next/server/chunks/ssr/_1w9w1ok._.js +0 -3
  413. package/.next/server/chunks/ssr/_20gq_24._.js +0 -3
  414. package/.next/server/chunks/ssr/features_bot_0ouemw8._.js +0 -3
  415. package/.next/server/chunks/ssr/node_modules_@base-ui_react_1j9i1ho._.js +0 -3
  416. package/.next/static/chunks/01l7kw74vfp32.js +0 -1
  417. package/.next/static/chunks/0a5_-jqhaktjj.js +0 -1
  418. package/.next/static/chunks/0npvak0wpgagb.js +0 -1
  419. package/.next/static/chunks/19l81deo_pyoc.js +0 -1
  420. package/.next/static/chunks/1bnhw-5fj7aiz.js +0 -1
  421. package/.next/static/chunks/1in6nxpu33iab.js +0 -1
  422. package/.next/static/chunks/1u7kg91f9qy3g.js +0 -1
  423. package/.next/static/chunks/2ajs12-fcdwzm.js +0 -1
  424. package/.next/static/chunks/2i7qtmxc1kuqg.js +0 -1
  425. package/.next/static/chunks/2kz1f6r59nky0.js +0 -3
  426. package/.next/static/chunks/31kn4_h2rvf6k.css +0 -1
  427. package/.next/static/chunks/35jj-5u4te56r.js +0 -1
  428. package/.next/static/chunks/37ixzapa06xlo.js +0 -1
  429. package/.next/static/chunks/3jtcieuk1l6tw.js +0 -1
  430. package/.next/static/chunks/3k1d8y03t5nax.js +0 -58
  431. package/.next/static/chunks/3sla-dm1puqd1.js +0 -35
  432. package/.next/static/chunks/3t2c76awm9k_p.js +0 -1
  433. package/.next/static/chunks/3vrmcm31ih7gb.js +0 -1
  434. package/.next/static/chunks/3yiqr95d7ybeq.js +0 -15
  435. package/bin/autostart.mjs +0 -162
  436. /package/.next/server/app/api/{llm-model/catalog → bot/thread/file}/route/build-manifest.json +0 -0
  437. /package/.next/server/app/api/{llm-model/catalog → bot/thread/file}/route/server-reference-manifest.json +0 -0
  438. /package/.next/server/app/api/{llm-model/catalog → bot/thread/file}/route.js.map +0 -0
  439. /package/.next/server/app/api/llm-model/{credits → catalog/[provider]}/route/build-manifest.json +0 -0
  440. /package/.next/server/app/api/llm-model/{credits → catalog/[provider]}/route/server-reference-manifest.json +0 -0
  441. /package/.next/server/app/api/llm-model/{credits → catalog/[provider]}/route.js.map +0 -0
  442. /package/.next/static/{8I2hKtciyA9LXvd8txuOz → YhaRHJqObuAcXZe5VLFs0}/_buildManifest.js +0 -0
  443. /package/.next/static/{8I2hKtciyA9LXvd8txuOz → YhaRHJqObuAcXZe5VLFs0}/_clientMiddlewareManifest.js +0 -0
  444. /package/.next/static/{8I2hKtciyA9LXvd8txuOz → YhaRHJqObuAcXZe5VLFs0}/_ssgManifest.js +0 -0
@@ -1,2 +1,2 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,986530,e=>{"use strict";var t=e.i(843476),a=e.i(225913);e.i(271645);var r=e.i(647163);function s({className:e,...a}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,r.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...a})}e.i(652225);let i=(0,a.cva)("group/field flex w-full gap-2 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:"flex-col *:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});e.s(["Field",0,function({className:e,orientation:a="vertical",...s}){return(0,t.jsx)("div",{role:"group","data-slot":"field","data-orientation":a,className:(0,r.cn)(i({orientation:a}),e),...s})},"FieldContent",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"field-content",className:(0,r.cn)("group/field-content flex flex-1 flex-col gap-0.5 leading-snug",e),...a})},"FieldLabel",0,function({className:e,...a}){return(0,t.jsx)(s,{"data-slot":"field-label",className:(0,r.cn)("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",e),...a})}],986530)},556133,e=>{"use strict";var t=e.i(843476),a=e.i(401851),r=e.i(689664),s=e.i(867927),i=e.i(456420);let n={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};n.node;let l=(0,i.default)(n);var o=e.i(77071),d=e.i(759659),c=e.i(263676),u=e.i(271645),m=e.i(798120),h=e.i(167881),f=e.i(986530),x=e.i(23750),p=e.i(917162),g=e.i(671428),v=e.i(127341),j=e.i(184762),b=e.i(41533),y=e.i(968978),k=e.i(265402),N=e.i(670097),S=e.i(640262),w=e.i(96892);let C={name:"book-open",size:24,node:[["path",{d:"M12 5v16",key:"1f6ucr"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z",key:"1fyvmf"}]]};C.node;let M=(0,i.default)(C);var z=e.i(716327),T=e.i(632781);let F={name:"minus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}]]};F.node;let A=(0,i.default)(F);var R=e.i(660302),L=e.i(146538),O=e.i(213377),E=e.i(647163);let I=new S.DefaultChatTransport({api:m.queryKey.memoryEdit});function $({notes:e}){let[a,r]=(0,u.useState)(""),[s,i]=(0,u.useState)({provider:null,model:""}),[n,l]=(0,u.useState)(!1),{messages:o,sendMessage:d,setMessages:c,status:m,stop:f,error:x,clearError:p}=(0,N.useChat)({transport:I}),g=(0,u.useRef)(f);g.current=f,(0,u.useEffect)(()=>()=>{g.current()},[]);let v=(0,u.useRef)(new Map);for(let t of e)for(let e of t.facts)v.current.set(e.id,{text:e.text,path:t.path});let j="submitted"===m||"streaming"===m,b=!!(s.provider&&s.model.trim()),k=[...o].reverse().find(e=>"assistant"===e.role),C=k?.parts??[],M=C.filter(S.isToolUIPart),T=C.flatMap(e=>"text"===e.type?[e.text]:[]).join(" ").trim(),F=!!x||M.some(e=>"output-error"===e.state),A=M.filter(e=>"output-available"===e.state&&(0,S.getToolName)(e)!==O.TOOL_NAMES.memory_recall).length;(0,u.useEffect)(()=>{if("ready"!==m||F||0===o.length)return;let e=setTimeout(()=>c([]),4e3);return()=>clearTimeout(e)},[m,F,o.length,c]);let P=j?(0,t.jsx)(R.ShinyText,{text:"Working on memory",className:"text-xs"}):x?(0,t.jsx)("span",{className:"text-xs text-destructive",children:x.message}):k?(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:T||(0===A?"Nothing to change":1===A?"1 change saved":`${A} changes saved`)}):null;return(0,t.jsx)("div",{className:"pointer-events-none absolute inset-x-0 bottom-18 z-10 flex justify-center px-8",children:(0,t.jsxs)("div",{className:"pointer-events-auto flex w-full max-w-120 flex-col items-center gap-2",children:[n&&(0,t.jsx)("div",{className:"w-full rounded-xl bg-popover p-2 shadow-lg ring-1 ring-foreground/10",children:(0,t.jsx)(L.ModelPicker,{provider:s.provider,model:s.model,unset:"Provider",onChange:i})}),M.length>0&&(0,t.jsx)("ul",{className:"w-full divide-y divide-border/60 overflow-hidden rounded-xl bg-popover shadow-lg ring-1 ring-foreground/10",children:M.map(e=>(0,t.jsx)(B,{name:(0,S.getToolName)(e),input:e.input,state:e.state,errorText:"output-error"===e.state?e.errorText:void 0,known:v.current},e.toolCallId))}),P&&(0,t.jsx)("p",{className:"max-w-full truncate px-1",children:P}),(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault();let t=a.trim();t&&b&&!j&&(r(""),l(!1),p(),c([]),d({text:t},{body:{model:s}}))},className:"flex h-10 w-full items-center gap-1.5 rounded-xl bg-popover pr-1.5 pl-3.5 shadow-lg ring-1 ring-foreground/10",children:[(0,t.jsx)("input",{autoFocus:!0,value:a,onChange:e=>r(e.target.value),disabled:j,"aria-label":"Edit memory",placeholder:"Tell memory what changed",className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground disabled:opacity-60"}),(0,t.jsxs)(h.Button,{type:"button",size:"xs",variant:"ghost",onClick:()=>l(!n),className:(0,E.cn)("max-w-44",!b&&"text-muted-foreground"),children:[b&&s.provider?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.ProviderIcon,{provider:s.provider,className:"size-3"}),(0,t.jsx)("span",{className:"truncate",children:s.model})]}):"Model",(0,t.jsx)(z.ChevronDown,{className:"text-muted-foreground"})]}),(0,t.jsx)(h.Button,{type:"submit",size:"icon-sm",loading:j,disabled:!a.trim()||!b||j,"aria-label":"Send",children:!j&&(0,t.jsx)(w.ArrowUp,{})})]})]})})}let P={Remember:o.Plus,Replace:l,Forget:A,Rename:l,Opened:M};function B({name:e,input:a,state:s,errorText:i,known:n}){let l=function(e,t,a){if(e===O.TOOL_NAMES.memory_recall)return{kind:"Opened",path:(t??{}).path??"",lines:[]};if(e===O.TOOL_NAMES.memory_describe){let e=t??{};return{kind:"Rename",path:e.path??"",lines:e.description?[{after:`“${e.description}”`}]:[]}}if(e===O.TOOL_NAMES.memory_forget){let e=((t??{}).factIds??[]).filter(e=>null!=e),r=e.map(e=>a.get(e));return{kind:"Forget",path:r.find(e=>e)?.path??"",lines:e.map((e,t)=>({before:r[t]?.text??`Fact #${e}`}))}}let r=t??{},s=r.path??"",i=(r.facts??[]).filter(e=>null!=e),n=i.map(e=>null!=e.replaces?{before:a.get(e.replaces)?.text??`Fact #${e.replaces}`,after:e.text}:{after:e.text});return e===O.TOOL_NAMES.memory_create&&r.description&&n.unshift({after:`“${r.description}”`}),{kind:i.some(e=>null!=e.replaces)?"Replace":"Remember",path:s,lines:n}}(e,a,n),o=P[l.kind],d="output-error"===s;return(0,t.jsxs)("li",{className:"flex animate-in items-start gap-2.5 px-3 py-2.5 duration-200 fade-in slide-in-from-bottom-1",children:[(0,t.jsx)(o,{className:"mt-1 size-3.5 shrink-0 text-muted-foreground"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-0.5",children:[l.lines.map((e,a)=>(0,t.jsxs)("div",{children:[e.before&&(0,t.jsx)("p",{className:"text-[13px] leading-5 text-muted-foreground/60 line-through",children:e.before}),e.after&&(0,t.jsx)("p",{className:"text-sm leading-5 text-foreground/90",children:e.after})]},`${l.kind}-${a}`)),(0,t.jsxs)("p",{className:"pt-0.5 font-mono text-[11px] text-muted-foreground",children:[l.kind,l.path&&` \xb7 ${l.path}`]}),d&&i&&(0,t.jsx)("p",{className:"text-xs text-destructive",children:i})]}),(0,t.jsx)("span",{className:"mt-0.5 flex size-5 shrink-0 items-center justify-center text-muted-foreground",children:d?(0,t.jsx)(c.X,{className:"size-3.5 text-destructive"}):"output-available"===s?(0,t.jsx)(r.Check,{className:"size-3.5"}):(0,t.jsx)(T.Loader2,{className:"size-3.5 animate-spin"})})]})}var D=e.i(95187);let _=(0,D.createServerReference)("7fe022a560d58fec05a4d6cc55756eb444e803ec98",D.callServer,void 0,D.findSourceMapURL,"addFactsAction"),K=(0,D.createServerReference)("7f87986b8db9fa1a8a63ffe3b75afef8357341a730",D.callServer,void 0,D.findSourceMapURL,"createNoteAction"),U=(0,D.createServerReference)("7fcf7797635deb5932094ed8356abca2cb31208841",D.callServer,void 0,D.findSourceMapURL,"deleteNoteAction"),q=(0,D.createServerReference)("7f744974248ce8b9081636cabcdf0c4e1697d77906",D.callServer,void 0,D.findSourceMapURL,"forgetFactAction"),V=(0,D.createServerReference)("7f09eb80967c0c8124e8a7128bef27a7d6068962e0",D.callServer,void 0,D.findSourceMapURL,"reviseFactAction"),Y=(0,D.createServerReference)("7f4ec3e8a8f7ca03c5ab2cc43a83bafddc6569ff2a",D.callServer,void 0,D.findSourceMapURL,"updateNoteAction");var H=e.i(681307),W=e.i(245629);let X=H.z.enum(["user","call","bot"]);H.z.string().trim().min(1,"A note needs a line saying what it is about").max(b.MEMORY_LIMITS.descriptionChars,`A note's line is one line: at most ${b.MEMORY_LIMITS.descriptionChars} characters`);let G=H.z.object({id:H.z.number(),text:H.z.string(),source:X.nullish(),createdAt:W.DateLikeSchema});H.z.object({id:H.z.number(),path:H.z.string(),description:H.z.string(),ownedByUser:H.z.boolean(),hits:H.z.number(),lastReadAt:W.DateLikeSchema.nullable(),createdAt:W.DateLikeSchema,updatedAt:W.DateLikeSchema,factCount:H.z.number(),facts:G.array()});let Z=[{path:"profile",of:"The user themselves — name, age, what they do, where they live, whatever else says who they are"},{path:"preferences",of:"How they want things done, and said — read whole on every call, so a rule for a particular situation goes here too"},{path:"people/",of:"Someone in their life, and what matters about them"},{path:"projects/",of:"Something with an end — a trip, a purchase, a deadline, a thing being built"},{path:"topics/",of:"Something ongoing that keeps coming back"}],J=Z.filter(e=>!e.path.endsWith("/")).map(e=>e.path),Q=Z.filter(e=>e.path.endsWith("/")).map(e=>e.path.slice(0,-1));RegExp(`^(?:${J.join("|")}|(?:${Q.join("|")})/.+)$`);var ee=e.i(895836),et=e.i(319841),ea=e.i(609856),er=e.i(661504),es=e.i(283653);let ei=[{key:"you",label:"You"},{key:"people",label:"People"},{key:"projects",label:"Projects"},{key:"topics",label:"Topics"},{key:"other",label:"Other"}],en={onOk:()=>(0,es.revalidate)(m.queryKey.memory)},el=k.textModelProviderSchema.options.filter(e=>"chatgpt"!==e).slice(0,3);function eo(){return(0,t.jsx)("span",{className:"mr-0.5 flex items-center",children:el.map(e=>(0,t.jsx)("span",{className:"-ml-1.5 grid size-5 place-items-center rounded-full bg-background ring-1 ring-border first:ml-0",children:(0,t.jsx)(y.ProviderIcon,{provider:e,className:"size-3"})},e))})}function ed(e,t){return a=>{(0,et.composing)(a)||("Enter"===a.key&&(a.preventDefault(),e()),"Escape"===a.key&&(a.stopPropagation(),t()))}}function ec({note:e,open:a,onToggle:r}){var i;let n,o,c,m,f,[x,g]=(0,u.useState)(!1),[v,j]=(0,ea.useServerAction)(U,en),b=async()=>{await p.notify.confirm({title:`Forget ${e.path}?`,description:"Every fact in this note is deleted for good.",okText:"Delete",destructive:!0})&&v(e.id)},y=(0,t.jsx)("span",{className:"w-36 shrink-0 truncate text-sm font-medium",children:-1===(n=(i=e.path).indexOf("/"))?i:i.slice(n+1)});return(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"flex h-12 items-center gap-3 pr-2 pl-4",children:x?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.ChevronRight,{className:"size-3.5 shrink-0 rotate-90 text-muted-foreground"}),y,(0,t.jsx)(eu,{note:e,onDone:()=>g(!1)})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{type:"button","aria-expanded":a,onClick:r,className:(0,E.cn)("flex h-full min-w-0 flex-1 items-center gap-3 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",(o=e.path,!J.includes(o)&&.15>(c=(0,W.toDate)(e.lastReadAt??e.createdAt),m=Math.max(0,(Date.now()-c.getTime())/864e5),(e.hits+1)/(1+m))&&!a&&"opacity-55")),children:[(0,t.jsx)(s.ChevronRight,{className:(0,E.cn)("size-3.5 shrink-0 text-muted-foreground transition-transform",a&&"rotate-90")}),y,(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-[13px] text-muted-foreground",children:e.description}),(0,t.jsxs)("span",{className:"w-16 shrink-0 text-right font-mono text-[11px] text-muted-foreground/70",children:[e.factCount," ",1===e.factCount?"fact":"facts"]}),(0,t.jsx)("span",{className:"w-10 shrink-0 text-right font-mono text-[11px] text-muted-foreground/50",title:e.lastReadAt?"Last read back":"Never read back",children:e.lastReadAt?(0,W.shortAgo)(e.lastReadAt):"—"})]}),(0,t.jsx)("span",{className:"flex w-15 shrink-0 justify-end",children:a&&(0,t.jsxs)(t.Fragment,{children:[(f=e.path,!J.includes(f)&&(0,t.jsx)(h.Button,{size:"icon-sm",variant:"ghost",className:"text-muted-foreground","aria-label":"Edit the note's line",onClick:()=>g(!0),children:(0,t.jsx)(l,{})})),(0,t.jsx)(h.Button,{size:"icon-sm",variant:"ghost",className:"text-muted-foreground","aria-label":"Forget this note",loading:j,onClick:b,children:!j&&(0,t.jsx)(d.Trash2,{})})]})})]})}),a&&(0,t.jsxs)("div",{className:"space-y-1 border-t border-border/60 bg-muted/40 py-2.5 pr-2 pl-10",children:[(0,t.jsx)(em,{noteId:e.id}),e.facts.map(a=>(0,t.jsx)(eh,{noteId:e.id,fact:a},a.id))]})]})}function eu({note:e,onDone:a}){let[s,i]=(0,u.useState)(e.description),[n,l]=(0,ea.useServerAction)(Y,{onOk:()=>{a(),(0,es.revalidate)(m.queryKey.memory)}}),o=()=>{let t=s.trim();if(!t||t===e.description)return a();n(e.id,{description:t})};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.Input,{autoFocus:!0,value:s,onChange:e=>i(e.target.value),onKeyDown:ed(o,a),"aria-label":"The note's line",placeholder:"One line Thursday sees in her list",maxLength:b.MEMORY_LIMITS.descriptionChars,className:"h-8 min-w-0 flex-1 text-[13px]"}),(0,t.jsx)(h.Button,{size:"icon-sm",variant:"ghost","aria-label":"Save",loading:l,onClick:o,children:!l&&(0,t.jsx)(r.Check,{})}),(0,t.jsx)(h.Button,{size:"icon-sm",variant:"ghost","aria-label":"Cancel",onClick:a,children:(0,t.jsx)(c.X,{})})]})}function em({noteId:e}){let[a,r]=(0,u.useState)(""),[s,i]=(0,ea.useServerAction)(_,{onOk:()=>{r(""),(0,es.revalidate)(m.queryKey.memory)}}),n=()=>{let t=a.trim();t&&!i&&s(e,[t])};return(0,t.jsxs)("div",{className:"flex items-center gap-1.5 pb-1",children:[(0,t.jsx)(x.Input,{value:a,onChange:e=>r(e.target.value),onKeyDown:ed(n,()=>r("")),"aria-label":"Add a fact",placeholder:"Add a fact",className:"h-8 min-w-0 flex-1 bg-background text-sm"}),(0,t.jsxs)(h.Button,{size:"sm",variant:"outline",loading:i,disabled:!a.trim(),onClick:n,children:[!i&&(0,t.jsx)(o.Plus,{}),"Add"]})]})}function eh({noteId:e,fact:s}){let i,[n,o]=(0,u.useState)(!1),[f,g]=(0,u.useState)(s.text),[v,j]=(0,ea.useServerAction)(V,{onOk:()=>{o(!1),(0,es.revalidate)(m.queryKey.memory)}}),[b,y]=(0,ea.useServerAction)(q,en),k=async()=>{await p.notify.confirm({title:"Forget this fact?",description:`"${s.text}" is deleted for good.`,okText:"Delete",destructive:!0})&&b(e,s.id)},N=()=>{let t=f.trim();if(!t||t===s.text)return o(!1);v(e,s.id,t)},S="user"===(i=s.source)?"you":"call"===i?"on a call":"bot"===i?"a bot":"";return(0,t.jsx)("div",{className:"flex min-h-10 items-center gap-1.5",children:n?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.Input,{autoFocus:!0,value:f,onChange:e=>g(e.target.value),onKeyDown:ed(N,()=>o(!1)),"aria-label":"Fact",className:"h-8 min-w-0 flex-1 bg-background text-sm"}),(0,t.jsx)(h.Button,{size:"icon-sm",variant:"ghost","aria-label":"Save",loading:j,onClick:N,children:!j&&(0,t.jsx)(r.Check,{})}),(0,t.jsx)(h.Button,{size:"icon-sm",variant:"ghost","aria-label":"Cancel",onClick:()=>o(!1),children:(0,t.jsx)(c.X,{})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 pl-1 text-sm leading-relaxed text-foreground/90",children:s.text}),(0,t.jsxs)("span",{className:"shrink-0 pr-1 font-mono text-[11px] text-muted-foreground/50",children:[(0,a.format)(s.createdAt,"yyyy.MM.dd"),S&&` \xb7 ${S}`]}),(0,t.jsx)(h.Button,{size:"icon-sm",variant:"ghost",className:"text-muted-foreground","aria-label":"Edit this fact",onClick:()=>{g(s.text),o(!0)},children:(0,t.jsx)(l,{})}),(0,t.jsx)(h.Button,{size:"icon-sm",variant:"ghost",className:"text-muted-foreground","aria-label":"Forget this fact",loading:y,onClick:()=>void k(),children:!y&&(0,t.jsx)(d.Trash2,{})})]})})}let ef=[{key:"people",label:"Person",placeholder:"jihoon",fact:"Moved to the platform team in March"},{key:"projects",label:"Project",placeholder:"thursday",fact:"Ships behind a feature flag until April"},{key:"topics",label:"Topic",placeholder:"scheduling",fact:"No meetings before 10am"}];function ex(){return p.notify.component({className:"sm:max-w-lg",renderer:({close:e})=>(0,t.jsx)(ep,{onDone:e})})}function ep({onDone:e}){let[a,r]=(0,u.useState)("people"),[s,i]=(0,u.useState)(""),[n,l]=(0,u.useState)(""),[d,c]=(0,u.useState)(""),[p,g,,y]=(0,ea.useServerAction)(K,{errorMessage:!1,onOk:()=>{(0,es.revalidate)(m.queryKey.memory),e()}}),k=ef.find(e=>e.key===a),N=s.trim()&&n.trim()&&!g,S=()=>{N&&p(`${a}/${s.trim()}`,n.trim(),d.split("\n").map(e=>e.trim()).filter(Boolean))};return(0,t.jsxs)(ee.SettingDialogContent,{title:"New note",description:"Where Thursday keeps what she learns about this.",footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.Button,{variant:"ghost",onClick:e,children:"Cancel"}),(0,t.jsxs)(h.Button,{disabled:!N,loading:g,onClick:S,children:[!g&&(0,t.jsx)(o.Plus,{}),"Create"]})]}),children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)(f.Field,{children:[(0,t.jsx)(f.FieldLabel,{children:"Kind"}),(0,t.jsx)(v.Tabs,{value:a,onValueChange:e=>r(e),children:(0,t.jsx)(v.TabsList,{className:"w-full",children:ef.map(e=>(0,t.jsx)(v.TabsTrigger,{value:e.key,children:e.label},e.key))})})]}),(0,t.jsxs)(f.Field,{children:[(0,t.jsx)(f.FieldLabel,{htmlFor:"note-name",children:"Name"}),(0,t.jsxs)(f.FieldContent,{children:[(0,t.jsx)(x.Input,{id:"note-name",value:s,onChange:e=>i(e.target.value),placeholder:k?.placeholder,spellCheck:!1,required:!0}),(0,t.jsxs)("p",{className:"font-mono text-[11px] text-muted-foreground",children:[a,"/",s.trim()||"…"]})]})]}),(0,t.jsxs)(f.Field,{children:[(0,t.jsx)(f.FieldLabel,{htmlFor:"note-summary",children:"Summary"}),(0,t.jsx)(f.FieldContent,{children:(0,t.jsx)(x.Input,{id:"note-summary",value:n,onChange:e=>l(e.target.value),onKeyDown:e=>{e.nativeEvent.isComposing||229===e.keyCode||"Enter"===e.key&&S()},placeholder:"One line Thursday sees in her list",maxLength:b.MEMORY_LIMITS.descriptionChars,required:!0})})]}),(0,t.jsxs)(f.Field,{children:[(0,t.jsx)(f.FieldLabel,{htmlFor:"note-facts",children:"Facts"}),(0,t.jsx)(j.Textarea,{id:"note-facts",value:d,onChange:e=>c(e.target.value),placeholder:`One per line
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,986530,e=>{"use strict";var t=e.i(843476),a=e.i(225913);e.i(271645);var r=e.i(647163);function s({className:e,...a}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,r.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...a})}e.i(652225);let i=(0,a.cva)("group/field flex w-full gap-2 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:"flex-col *:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});e.s(["Field",0,function({className:e,orientation:a="vertical",...s}){return(0,t.jsx)("div",{role:"group","data-slot":"field","data-orientation":a,className:(0,r.cn)(i({orientation:a}),e),...s})},"FieldContent",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"field-content",className:(0,r.cn)("group/field-content flex flex-1 flex-col gap-0.5 leading-snug",e),...a})},"FieldLabel",0,function({className:e,...a}){return(0,t.jsx)(s,{"data-slot":"field-label",className:(0,r.cn)("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",e),...a})}],986530)},556133,e=>{"use strict";var t=e.i(843476),a=e.i(401851),r=e.i(689664),s=e.i(867927),i=e.i(456420);let n={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};n.node;let l=(0,i.default)(n);var o=e.i(77071),d=e.i(759659),c=e.i(263676),u=e.i(271645),m=e.i(798120),h=e.i(167881),f=e.i(986530),x=e.i(23750),p=e.i(917162),g=e.i(671428),v=e.i(127341),j=e.i(184762),b=e.i(41533),y=e.i(968978),k=e.i(265402),N=e.i(670097),S=e.i(640262),w=e.i(96892);let C={name:"book-open",size:24,node:[["path",{d:"M12 5v16",key:"1f6ucr"}],["path",{d:"M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z",key:"1fyvmf"}]]};C.node;let M=(0,i.default)(C);var z=e.i(716327),T=e.i(632781);let F={name:"minus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}]]};F.node;let A=(0,i.default)(F);var R=e.i(660302),L=e.i(146538),O=e.i(213377),E=e.i(647163);let I=new S.DefaultChatTransport({api:m.queryKey.memoryEdit});function $({notes:e}){let[a,r]=(0,u.useState)(""),[s,i]=(0,u.useState)({provider:null,model:""}),[n,l]=(0,u.useState)(!1),{messages:o,sendMessage:d,setMessages:c,status:m,stop:f,error:x,clearError:p}=(0,N.useChat)({transport:I}),g=(0,u.useRef)(f);g.current=f,(0,u.useEffect)(()=>()=>{g.current()},[]);let v=(0,u.useRef)(new Map);for(let t of e)for(let e of t.facts)v.current.set(e.id,{text:e.text,path:t.path});let j="submitted"===m||"streaming"===m,b=!!(s.provider&&s.model.trim()),k=[...o].reverse().find(e=>"assistant"===e.role),C=k?.parts??[],M=C.filter(S.isToolUIPart),T=C.flatMap(e=>"text"===e.type?[e.text]:[]).join(" ").trim(),F=!!x||M.some(e=>"output-error"===e.state),A=M.filter(e=>"output-available"===e.state&&(0,S.getToolName)(e)!==O.TOOL_NAMES.memory_recall).length;(0,u.useEffect)(()=>{if("ready"!==m||F||0===o.length)return;let e=setTimeout(()=>c([]),4e3);return()=>clearTimeout(e)},[m,F,o.length,c]);let P=j?(0,t.jsx)(R.ShinyText,{text:"Working on memory",className:"text-xs"}):x?(0,t.jsx)("span",{className:"text-xs text-destructive",children:x.message}):k?(0,t.jsx)("span",{className:"text-xs text-muted-foreground",children:T||(0===A?"Nothing to change":1===A?"1 change saved":`${A} changes saved`)}):null;return(0,t.jsx)("div",{className:"pointer-events-none absolute inset-x-0 bottom-18 z-10 flex justify-center px-8",children:(0,t.jsxs)("div",{className:"pointer-events-auto flex w-full max-w-120 flex-col items-center gap-2",children:[n&&(0,t.jsx)("div",{className:"w-full rounded-xl bg-popover p-2 shadow-lg ring-1 ring-foreground/10",children:(0,t.jsx)(L.ModelPicker,{provider:s.provider,model:s.model,unset:"Provider",onChange:i})}),M.length>0&&(0,t.jsx)("ul",{className:"w-full divide-y divide-border/60 overflow-hidden rounded-xl bg-popover shadow-lg ring-1 ring-foreground/10",children:M.map(e=>(0,t.jsx)(B,{name:(0,S.getToolName)(e),input:e.input,state:e.state,errorText:"output-error"===e.state?e.errorText:void 0,known:v.current},e.toolCallId))}),P&&(0,t.jsx)("p",{className:"max-w-full truncate px-1",children:P}),(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault();let t=a.trim();t&&b&&!j&&(r(""),l(!1),p(),c([]),d({text:t},{body:{model:s}}))},className:"flex h-10 w-full items-center gap-1.5 rounded-xl bg-popover pr-1.5 pl-3.5 shadow-lg ring-1 ring-foreground/10",children:[(0,t.jsx)("input",{autoFocus:!0,value:a,onChange:e=>r(e.target.value),disabled:j,"aria-label":"Edit memory",placeholder:"Tell memory what changed",className:"min-w-0 flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground disabled:opacity-60"}),(0,t.jsxs)(h.Button,{type:"button",size:"xs",variant:"ghost",onClick:()=>l(!n),className:(0,E.cn)("max-w-44",!b&&"text-muted-foreground"),children:[b&&s.provider?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.ProviderIcon,{provider:s.provider,className:"size-3"}),(0,t.jsx)("span",{className:"truncate",children:s.model})]}):"Model",(0,t.jsx)(z.ChevronDown,{className:"text-muted-foreground"})]}),(0,t.jsx)(h.Button,{type:"submit",size:"icon-sm",loading:j,disabled:!a.trim()||!b||j,"aria-label":"Send",children:!j&&(0,t.jsx)(w.ArrowUp,{})})]})]})})}let P={Remember:o.Plus,Replace:l,Forget:A,Rename:l,Opened:M};function B({name:e,input:a,state:s,errorText:i,known:n}){let l=function(e,t,a){if(e===O.TOOL_NAMES.memory_recall)return{kind:"Opened",path:(t??{}).path??"",lines:[]};if(e===O.TOOL_NAMES.memory_describe){let e=t??{};return{kind:"Rename",path:e.path??"",lines:e.description?[{after:`“${e.description}”`}]:[]}}if(e===O.TOOL_NAMES.memory_forget){let e=((t??{}).factIds??[]).filter(e=>null!=e),r=e.map(e=>a.get(e));return{kind:"Forget",path:r.find(e=>e)?.path??"",lines:e.map((e,t)=>({before:r[t]?.text??`Fact #${e}`}))}}let r=t??{},s=r.path??"",i=(r.facts??[]).filter(e=>null!=e),n=i.map(e=>null!=e.replaces?{before:a.get(e.replaces)?.text??`Fact #${e.replaces}`,after:e.text}:{after:e.text});return e===O.TOOL_NAMES.memory_create&&r.description&&n.unshift({after:`“${r.description}”`}),{kind:i.some(e=>null!=e.replaces)?"Replace":"Remember",path:s,lines:n}}(e,a,n),o=P[l.kind],d="output-error"===s;return(0,t.jsxs)("li",{className:"flex animate-in items-start gap-2.5 px-3 py-2.5 duration-200 fade-in slide-in-from-bottom-1",children:[(0,t.jsx)(o,{className:"mt-1 size-3.5 shrink-0 text-muted-foreground"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1 space-y-0.5",children:[l.lines.map((e,a)=>(0,t.jsxs)("div",{children:[e.before&&(0,t.jsx)("p",{className:"text-[13px] leading-5 text-muted-foreground/60 line-through",children:e.before}),e.after&&(0,t.jsx)("p",{className:"text-sm leading-5 text-foreground/90",children:e.after})]},`${l.kind}-${a}`)),(0,t.jsxs)("p",{className:"pt-0.5 font-mono text-[11px] text-muted-foreground",children:[l.kind,l.path&&` \xb7 ${l.path}`]}),d&&i&&(0,t.jsx)("p",{className:"text-xs text-destructive",children:i})]}),(0,t.jsx)("span",{className:"mt-0.5 flex size-5 shrink-0 items-center justify-center text-muted-foreground",children:d?(0,t.jsx)(c.X,{className:"size-3.5 text-destructive"}):"output-available"===s?(0,t.jsx)(r.Check,{className:"size-3.5"}):(0,t.jsx)(T.Loader2,{className:"size-3.5 animate-spin"})})]})}var D=e.i(95187);let _=(0,D.createServerReference)("7fc9ce111da41e854550d81d32040be514de06366a",D.callServer,void 0,D.findSourceMapURL,"addFactsAction"),K=(0,D.createServerReference)("7f2fc0f6577174ca8ef3955b0b5f9671954efec55a",D.callServer,void 0,D.findSourceMapURL,"createNoteAction"),U=(0,D.createServerReference)("7f80c8dd127a02226d22e682b03a84fd9519251004",D.callServer,void 0,D.findSourceMapURL,"deleteNoteAction"),q=(0,D.createServerReference)("7f9f8c21fd08fa9fabd5c917a315a90274cb0f49c0",D.callServer,void 0,D.findSourceMapURL,"forgetFactAction"),V=(0,D.createServerReference)("7f2eb399eb579824b1370715048ff178b0a8875b2e",D.callServer,void 0,D.findSourceMapURL,"reviseFactAction"),Y=(0,D.createServerReference)("7f73c45e7c56401b782e74a6d54385b56aa00f1001",D.callServer,void 0,D.findSourceMapURL,"updateNoteAction");var H=e.i(681307),W=e.i(245629);let X=H.z.enum(["user","call","bot"]);H.z.string().trim().min(1,"A note needs a line saying what it is about").max(b.MEMORY_LIMITS.descriptionChars,`A note's line is one line: at most ${b.MEMORY_LIMITS.descriptionChars} characters`);let G=H.z.object({id:H.z.number(),text:H.z.string(),source:X.nullish(),createdAt:W.DateLikeSchema});H.z.object({id:H.z.number(),path:H.z.string(),description:H.z.string(),ownedByUser:H.z.boolean(),hits:H.z.number(),lastReadAt:W.DateLikeSchema.nullable(),createdAt:W.DateLikeSchema,updatedAt:W.DateLikeSchema,factCount:H.z.number(),facts:G.array()});let Z=[{path:"profile",of:"The user themselves — name, age, what they do, where they live, whatever else says who they are"},{path:"preferences",of:"How they want things done, and said — read whole on every call, so a rule for a particular situation goes here too"},{path:"people/",of:"Someone in their life, and what matters about them"},{path:"projects/",of:"Something with an end — a trip, a purchase, a deadline, a thing being built"},{path:"topics/",of:"Something ongoing that keeps coming back"}],J=Z.filter(e=>!e.path.endsWith("/")).map(e=>e.path),Q=Z.filter(e=>e.path.endsWith("/")).map(e=>e.path.slice(0,-1));RegExp(`^(?:${J.join("|")}|(?:${Q.join("|")})/.+)$`);var ee=e.i(895836),et=e.i(319841),ea=e.i(609856),er=e.i(661504),es=e.i(283653);let ei=[{key:"you",label:"You"},{key:"people",label:"People"},{key:"projects",label:"Projects"},{key:"topics",label:"Topics"},{key:"other",label:"Other"}],en={onOk:()=>(0,es.revalidate)(m.queryKey.memory)},el=k.textModelProviderSchema.options.filter(e=>"chatgpt"!==e).slice(0,3);function eo(){return(0,t.jsx)("span",{className:"mr-0.5 flex items-center",children:el.map(e=>(0,t.jsx)("span",{className:"-ml-1.5 grid size-5 place-items-center rounded-full bg-background ring-1 ring-border first:ml-0",children:(0,t.jsx)(y.ProviderIcon,{provider:e,className:"size-3"})},e))})}function ed(e,t){return a=>{(0,et.composing)(a)||("Enter"===a.key&&(a.preventDefault(),e()),"Escape"===a.key&&(a.stopPropagation(),t()))}}function ec({note:e,open:a,onToggle:r}){var i;let n,o,c,m,f,[x,g]=(0,u.useState)(!1),[v,j]=(0,ea.useServerAction)(U,en),b=async()=>{await p.notify.confirm({title:`Forget ${e.path}?`,description:"Every fact in this note is deleted for good.",okText:"Delete",destructive:!0})&&v(e.id)},y=(0,t.jsx)("span",{className:"w-36 shrink-0 truncate text-sm font-medium",children:-1===(n=(i=e.path).indexOf("/"))?i:i.slice(n+1)});return(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"flex h-12 items-center gap-3 pr-2 pl-4",children:x?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.ChevronRight,{className:"size-3.5 shrink-0 rotate-90 text-muted-foreground"}),y,(0,t.jsx)(eu,{note:e,onDone:()=>g(!1)})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("button",{type:"button","aria-expanded":a,onClick:r,className:(0,E.cn)("flex h-full min-w-0 flex-1 items-center gap-3 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",(o=e.path,!J.includes(o)&&.15>(c=(0,W.toDate)(e.lastReadAt??e.createdAt),m=Math.max(0,(Date.now()-c.getTime())/864e5),(e.hits+1)/(1+m))&&!a&&"opacity-55")),children:[(0,t.jsx)(s.ChevronRight,{className:(0,E.cn)("size-3.5 shrink-0 text-muted-foreground transition-transform",a&&"rotate-90")}),y,(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-[13px] text-muted-foreground",children:e.description}),(0,t.jsxs)("span",{className:"w-16 shrink-0 text-right font-mono text-[11px] text-muted-foreground/70",children:[e.factCount," ",1===e.factCount?"fact":"facts"]}),(0,t.jsx)("span",{className:"w-10 shrink-0 text-right font-mono text-[11px] text-muted-foreground/50",title:e.lastReadAt?"Last read back":"Never read back",children:e.lastReadAt?(0,W.shortAgo)(e.lastReadAt):"—"})]}),(0,t.jsx)("span",{className:"flex w-15 shrink-0 justify-end",children:a&&(0,t.jsxs)(t.Fragment,{children:[(f=e.path,!J.includes(f)&&(0,t.jsx)(h.Button,{size:"icon-sm",variant:"ghost",className:"text-muted-foreground","aria-label":"Edit the note's line",onClick:()=>g(!0),children:(0,t.jsx)(l,{})})),(0,t.jsx)(h.Button,{size:"icon-sm",variant:"ghost",className:"text-muted-foreground","aria-label":"Forget this note",loading:j,onClick:b,children:!j&&(0,t.jsx)(d.Trash2,{})})]})})]})}),a&&(0,t.jsxs)("div",{className:"space-y-1 border-t border-border/60 bg-muted/40 py-2.5 pr-2 pl-10",children:[(0,t.jsx)(em,{noteId:e.id}),e.facts.map(a=>(0,t.jsx)(eh,{noteId:e.id,fact:a},a.id))]})]})}function eu({note:e,onDone:a}){let[s,i]=(0,u.useState)(e.description),[n,l]=(0,ea.useServerAction)(Y,{onOk:()=>{a(),(0,es.revalidate)(m.queryKey.memory)}}),o=()=>{let t=s.trim();if(!t||t===e.description)return a();n(e.id,{description:t})};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.Input,{autoFocus:!0,value:s,onChange:e=>i(e.target.value),onKeyDown:ed(o,a),"aria-label":"The note's line",placeholder:"One line Thursday sees in her list",maxLength:b.MEMORY_LIMITS.descriptionChars,className:"h-8 min-w-0 flex-1 text-[13px]"}),(0,t.jsx)(h.Button,{size:"icon-sm",variant:"ghost","aria-label":"Save",loading:l,onClick:o,children:!l&&(0,t.jsx)(r.Check,{})}),(0,t.jsx)(h.Button,{size:"icon-sm",variant:"ghost","aria-label":"Cancel",onClick:a,children:(0,t.jsx)(c.X,{})})]})}function em({noteId:e}){let[a,r]=(0,u.useState)(""),[s,i]=(0,ea.useServerAction)(_,{onOk:()=>{r(""),(0,es.revalidate)(m.queryKey.memory)}}),n=()=>{let t=a.trim();t&&!i&&s(e,[t])};return(0,t.jsxs)("div",{className:"flex items-center gap-1.5 pb-1",children:[(0,t.jsx)(x.Input,{value:a,onChange:e=>r(e.target.value),onKeyDown:ed(n,()=>r("")),"aria-label":"Add a fact",placeholder:"Add a fact",className:"h-8 min-w-0 flex-1 bg-background text-sm"}),(0,t.jsxs)(h.Button,{size:"sm",variant:"outline",loading:i,disabled:!a.trim(),onClick:n,children:[!i&&(0,t.jsx)(o.Plus,{}),"Add"]})]})}function eh({noteId:e,fact:s}){let i,[n,o]=(0,u.useState)(!1),[f,g]=(0,u.useState)(s.text),[v,j]=(0,ea.useServerAction)(V,{onOk:()=>{o(!1),(0,es.revalidate)(m.queryKey.memory)}}),[b,y]=(0,ea.useServerAction)(q,en),k=async()=>{await p.notify.confirm({title:"Forget this fact?",description:`"${s.text}" is deleted for good.`,okText:"Delete",destructive:!0})&&b(e,s.id)},N=()=>{let t=f.trim();if(!t||t===s.text)return o(!1);v(e,s.id,t)},S="user"===(i=s.source)?"you":"call"===i?"on a call":"bot"===i?"a bot":"";return(0,t.jsx)("div",{className:"flex min-h-10 items-center gap-1.5",children:n?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.Input,{autoFocus:!0,value:f,onChange:e=>g(e.target.value),onKeyDown:ed(N,()=>o(!1)),"aria-label":"Fact",className:"h-8 min-w-0 flex-1 bg-background text-sm"}),(0,t.jsx)(h.Button,{size:"icon-sm",variant:"ghost","aria-label":"Save",loading:j,onClick:N,children:!j&&(0,t.jsx)(r.Check,{})}),(0,t.jsx)(h.Button,{size:"icon-sm",variant:"ghost","aria-label":"Cancel",onClick:()=>o(!1),children:(0,t.jsx)(c.X,{})})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 pl-1 text-sm leading-relaxed text-foreground/90",children:s.text}),(0,t.jsxs)("span",{className:"shrink-0 pr-1 font-mono text-[11px] text-muted-foreground/50",children:[(0,a.format)(s.createdAt,"yyyy.MM.dd"),S&&` \xb7 ${S}`]}),(0,t.jsx)(h.Button,{size:"icon-sm",variant:"ghost",className:"text-muted-foreground","aria-label":"Edit this fact",onClick:()=>{g(s.text),o(!0)},children:(0,t.jsx)(l,{})}),(0,t.jsx)(h.Button,{size:"icon-sm",variant:"ghost",className:"text-muted-foreground","aria-label":"Forget this fact",loading:y,onClick:()=>void k(),children:!y&&(0,t.jsx)(d.Trash2,{})})]})})}let ef=[{key:"people",label:"Person",placeholder:"jihoon",fact:"Moved to the platform team in March"},{key:"projects",label:"Project",placeholder:"thursday",fact:"Ships behind a feature flag until April"},{key:"topics",label:"Topic",placeholder:"scheduling",fact:"No meetings before 10am"}];function ex(){return p.notify.component({className:"sm:max-w-lg",renderer:({close:e})=>(0,t.jsx)(ep,{onDone:e})})}function ep({onDone:e}){let[a,r]=(0,u.useState)("people"),[s,i]=(0,u.useState)(""),[n,l]=(0,u.useState)(""),[d,c]=(0,u.useState)(""),[p,g,,y]=(0,ea.useServerAction)(K,{errorMessage:!1,onOk:()=>{(0,es.revalidate)(m.queryKey.memory),e()}}),k=ef.find(e=>e.key===a),N=s.trim()&&n.trim()&&!g,S=()=>{N&&p(`${a}/${s.trim()}`,n.trim(),d.split("\n").map(e=>e.trim()).filter(Boolean))};return(0,t.jsxs)(ee.SettingDialogContent,{title:"New note",description:"Where Thursday keeps what she learns about this.",footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(h.Button,{variant:"ghost",onClick:e,children:"Cancel"}),(0,t.jsxs)(h.Button,{disabled:!N,loading:g,onClick:S,children:[!g&&(0,t.jsx)(o.Plus,{}),"Create"]})]}),children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)(f.Field,{children:[(0,t.jsx)(f.FieldLabel,{children:"Kind"}),(0,t.jsx)(v.Tabs,{value:a,onValueChange:e=>r(e),children:(0,t.jsx)(v.TabsList,{className:"w-full",children:ef.map(e=>(0,t.jsx)(v.TabsTrigger,{value:e.key,children:e.label},e.key))})})]}),(0,t.jsxs)(f.Field,{children:[(0,t.jsx)(f.FieldLabel,{htmlFor:"note-name",children:"Name"}),(0,t.jsxs)(f.FieldContent,{children:[(0,t.jsx)(x.Input,{id:"note-name",value:s,onChange:e=>i(e.target.value),placeholder:k?.placeholder,spellCheck:!1,required:!0}),(0,t.jsxs)("p",{className:"font-mono text-[11px] text-muted-foreground",children:[a,"/",s.trim()||"…"]})]})]}),(0,t.jsxs)(f.Field,{children:[(0,t.jsx)(f.FieldLabel,{htmlFor:"note-summary",children:"Summary"}),(0,t.jsx)(f.FieldContent,{children:(0,t.jsx)(x.Input,{id:"note-summary",value:n,onChange:e=>l(e.target.value),onKeyDown:e=>{e.nativeEvent.isComposing||229===e.keyCode||"Enter"===e.key&&S()},placeholder:"One line Thursday sees in her list",maxLength:b.MEMORY_LIMITS.descriptionChars,required:!0})})]}),(0,t.jsxs)(f.Field,{children:[(0,t.jsx)(f.FieldLabel,{htmlFor:"note-facts",children:"Facts"}),(0,t.jsx)(j.Textarea,{id:"note-facts",value:d,onChange:e=>c(e.target.value),placeholder:`One per line
2
2
  ${k?.fact??""}`,className:"min-h-24 resize-none text-sm"})]})]}),y&&(0,t.jsx)("p",{className:"font-mono text-xs text-destructive",children:y})]})}e.s(["MemorySetting",0,function(){let{items:e,isLoading:a,isLoadingMore:r,error:s,hasMore:i,sentinelRef:n}=(0,er.useServerPages)({key:e=>m.queryKey.memoryPage(e*b.PAGE_SIZE)}),[l,d]=(0,u.useState)(""),[c,f]=(0,u.useState)(new Set),[x,p]=(0,u.useState)(!1);if(a)return(0,t.jsx)(ee.SettingSkeleton,{});if(s)return(0,t.jsx)(ee.SettingError,{message:s.message});let v=l.trim().toLowerCase(),j=v?e.filter(e=>[e.path,e.description,...e.facts.map(e=>e.text)].some(e=>e.toLowerCase().includes(v))):e,y=e.reduce((e,t)=>e+t.factCount,0),k=i?"+":"";return(0,t.jsxs)("div",{className:"relative h-full min-h-0",children:[(0,t.jsxs)(ee.SettingScreen,{footer:(0,t.jsxs)(h.Button,{size:"sm",variant:x?"secondary":"ghost","aria-pressed":x,onClick:()=>p(!x),children:[(0,t.jsx)(eo,{}),"Edit with a model"]}),children:[(0,t.jsx)(ee.SettingToolbar,{count:(0,t.jsxs)("span",{className:"flex items-center gap-3",children:[`${e.length}${k} notes \xb7 ${y}${k} facts`,(0,t.jsxs)(h.Button,{size:"sm",variant:"outline",className:"font-sans",onClick:ex,children:[(0,t.jsx)(o.Plus,{}),"New note"]})]}),children:(0,t.jsx)(ee.SettingFilter,{value:l,onChange:d,placeholder:"Filter memory"})}),v&&0===j.length&&(0,t.jsx)("p",{className:"px-1 text-xs text-muted-foreground/60",children:"Nothing matches"}),ei.map(({key:e,label:a})=>{let r=j.filter(t=>(function(e){if(J.includes(e))return"you";let t=e.slice(0,e.indexOf("/"));return Q.includes(t)?t:"other"})(t.path)===e);return 0===r.length?null:(0,t.jsx)(ee.SettingGroup,{label:a,children:(0,t.jsx)(ee.SettingItems,{children:r.map(e=>(0,t.jsx)(ec,{note:e,open:c.has(e.id)!==!!v,onToggle:()=>{let t;return t=e.id,f(e=>{let a=new Set(e);return a.delete(t)||a.add(t),a})}},e.id))})},e)}),(0,t.jsx)(ee.SettingMore,{hasMore:i,loading:r,sentinelRef:n,ghost:(0,t.jsxs)("div",{className:"flex h-12 items-center gap-3 px-4",children:[(0,t.jsx)(g.Skeleton,{className:"h-3 w-24"}),(0,t.jsx)(g.Skeleton,{className:"h-3 w-56"})]})})]}),x&&(0,t.jsx)($,{notes:e})]})}],556133)},759659,e=>{"use strict";var t=e.i(456420);let a={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};a.node;let r=(0,t.default)(a);e.s(["Trash2",0,r],759659)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,986530,e=>{"use strict";var t=e.i(843476),s=e.i(225913);e.i(271645);var i=e.i(647163);function n({className:e,...s}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,i.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...s})}e.i(652225);let l=(0,s.cva)("group/field flex w-full gap-2 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:"flex-col *:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});e.s(["Field",0,function({className:e,orientation:s="vertical",...n}){return(0,t.jsx)("div",{role:"group","data-slot":"field","data-orientation":s,className:(0,i.cn)(l({orientation:s}),e),...n})},"FieldContent",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"field-content",className:(0,i.cn)("group/field-content flex flex-1 flex-col gap-0.5 leading-snug",e),...s})},"FieldLabel",0,function({className:e,...s}){return(0,t.jsx)(n,{"data-slot":"field-label",className:(0,i.cn)("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",e),...s})}],986530)},833959,e=>{"use strict";var t=e.i(843476),s=e.i(437750),i=e.i(856539),n=e.i(24071),l=e.i(867927),r=e.i(829600),a=e.i(226091),o=e.i(726067),d=e.i(456420);let c={name:"frame",size:24,node:[["line",{x1:"22",x2:"2",y1:"6",y2:"6",key:"15w7dq"}],["line",{x1:"22",x2:"2",y1:"18",y2:"18",key:"1ip48p"}],["line",{x1:"6",x2:"6",y1:"2",y2:"22",key:"a2lnyx"}],["line",{x1:"18",x2:"18",y1:"2",y2:"22",key:"8vb6jd"}]]};c.node;let u=(0,d.default)(c);var m=e.i(91511),x=e.i(77071),f=e.i(566595);let h={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]};h.node;let p=(0,d.default)(h);var g=e.i(759659);let v={name:"upload",size:24,node:[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]};v.node;let b=(0,d.default)(v);var k=e.i(271645),j=e.i(798120),y=e.i(167881),w=e.i(986530),N=e.i(23750),S=e.i(683408),z=e.i(917162),C=e.i(671428),L=e.i(319036),F=e.i(127341),M=e.i(184762),R=e.i(41533),T=e.i(895836),$=e.i(95187);let D=(0,$.createServerReference)("7f85a49d039510ceee57ee7d2b329b96c06551a77a",$.callServer,void 0,$.findSourceMapURL,"createSkillAction"),A=(0,$.createServerReference)("7faafce42cf973bdbb9083a6b4124bc2d8bc91c5c8",$.callServer,void 0,$.findSourceMapURL,"deleteSkillAction"),B=(0,$.createServerReference)("7fddaddcbf8c9216c6e81cf69e08d528e77d5c9b95",$.callServer,void 0,$.findSourceMapURL,"setSkillDisabledAction"),q=(0,$.createServerReference)("7f8e1e7b0412e588b555987ced6892dc4303906f22",$.callServer,void 0,$.findSourceMapURL,"uploadSkillAction"),I=(0,$.createServerReference)("7f8623f0cd7d7e85bf12c1ecf92e572c093a2a4abb",$.callServer,void 0,$.findSourceMapURL,"writeSkillFileAction");var K=e.i(681307);K.z.union([K.z.enum(["custom","default"]),K.z.templateLiteral(["kit:",K.z.string().regex(/^[\p{L}\p{N}_-]+$/u)]),K.z.templateLiteral(["own:",K.z.string().regex(/^[\p{L}\p{N}_-]+$/u)])]);let E=e=>"custom"===e||e.startsWith("own:"),U=K.z.string().trim().min(1,"Skill name is required").max(64,"Skill name is too long").regex(/^[a-z0-9][a-z0-9_-]*$/i,"Use letters, numbers, dashes and underscores only"),O=K.z.string().trim().min(1,"Skill name is required").max(64,"Skill name is too long");K.z.object({name:O,description:K.z.string().trim().min(1,"Description is required"),metadata:K.z.record(K.z.string(),K.z.unknown()).optional(),disabled:K.z.boolean().optional(),platforms:K.z.array(K.z.string()).optional()}).extend({name:U,content:K.z.string().trim().min(1,"Content is required")});var P=e.i(609856),W=e.i(283653),_=e.i(647163);let H={artifact:u,browser:m.Globe,computer:s.AppWindow,"find-skills":f.Search,"skill-creator":p};function V({skill:e}){let[s,n]=(0,P.useServerAction)(A,{onOk:()=>(0,W.revalidate)(j.queryKey.skills)}),[r]=(0,P.useServerAction)(B,{onOk:()=>(0,W.revalidate)(j.queryKey.skills)}),a=async()=>{await z.notify.confirm({title:`Delete ${e.name}?`,description:"Every file in this skill is deleted for good.",okText:"Delete",destructive:!0})&&s(e.source,e.dir)},o="default"===e.source&&H[e.dir]||i.BookMarked;return(0,t.jsxs)("div",{className:"group flex items-center transition-colors hover:bg-muted/50",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>{var s;return s=e,z.notify.component({className:"sm:max-w-4xl",renderer:({guard:e})=>(0,t.jsx)(G,{skill:s,guard:e})})},className:"flex min-w-0 flex-1 items-center gap-3 py-4 pl-4 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)("span",{className:(0,_.cn)("grid size-10 shrink-0 place-items-center rounded-lg bg-muted text-muted-foreground",e.disabled&&"opacity-45"),children:(0,t.jsx)(o,{className:"size-4"})}),(0,t.jsxs)("span",{className:(0,_.cn)("min-w-0 flex-1 space-y-0.5",e.disabled&&"opacity-45"),children:[(0,t.jsx)("span",{className:"block truncate text-sm font-medium",children:e.name}),(0,t.jsx)("span",{className:"line-clamp-2 text-xs leading-relaxed text-muted-foreground",children:e.description.trim().split(/(?<=[.。])\s|\n/)[0].trim()})]}),(0,t.jsx)(l.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 group-hover:text-foreground"})]}),(0,t.jsxs)("div",{className:"mr-4 ml-5 flex w-18 shrink-0 items-center justify-end gap-3",children:[(0,t.jsx)(L.Switch,{checked:!e.disabled,onCheckedChange:t=>r(e.source,e.dir,!t),"aria-label":`${e.name} on or off`,className:"shrink-0"}),E(e.source)?(0,t.jsx)(y.Button,{size:"icon-sm",variant:"ghost",loading:n,onClick:a,"aria-label":`Delete ${e.name}`,className:"shrink-0 text-muted-foreground",children:(0,t.jsx)(g.Trash2,{})}):(0,t.jsx)("span",{className:"size-7 shrink-0"})]})]})}function G({skill:e,guard:s}){let[i,l]=(0,k.useState)(""),[r,a]=(0,k.useState)("SKILL.md"),o=(0,k.useRef)(!1);(0,k.useEffect)(()=>s(()=>o.current),[s]);let d=async e=>{let t=i?`${i}/${e.name}`:e.name;"dir"===e.kind?l(t):t===r||(!o.current||await z.notify.confirm({title:"Discard your changes?",description:`What you wrote in ${r?.split("/").pop()} is not saved.`,okText:"Discard",destructive:!0}))&&(o.current=!1,a(t))};return(0,t.jsx)(T.SettingDialogContent,{title:e.name,description:(0,t.jsx)(Y,{skill:e,path:r??i}),children:(0,t.jsxs)("div",{className:"flex h-[36rem] divide-x divide-border/60 overflow-hidden rounded-xl border border-border/60 bg-background",children:[(0,t.jsxs)("div",{className:"flex w-44 shrink-0 flex-col overflow-y-auto bg-muted/20 py-1",children:[i&&(0,t.jsxs)("button",{type:"button",onClick:()=>l(i.split("/").slice(0,-1).join("/")),className:"mx-1 mb-1 flex items-center gap-1 rounded-md px-2 py-1 text-left font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/50 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)(n.ChevronLeft,{className:"size-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:i.split("/").pop()})]}),(0,t.jsx)(J,{source:e.source,dir:e.dir,path:i,current:r,onPick:d})]}),(0,t.jsx)("div",{className:"min-w-0 flex-1 overflow-y-auto",children:r?(0,t.jsx)(X,{source:e.source,dir:e.dir,path:r,editable:E(e.source),onUnsaved:e=>{o.current=e}},r):(0,t.jsx)("p",{className:"p-6 text-sm text-muted-foreground/60",children:"Pick a file"})})]})})}function Y({skill:e,path:s}){if(!e)return(0,t.jsx)("span",{className:"truncate font-mono text-[11px] text-muted-foreground/60",children:"Pick a skill"});let i=[e.name,...s.split("/").filter(Boolean)];return(0,t.jsx)("span",{className:"flex min-w-0 items-center gap-1 font-mono text-[11px] text-muted-foreground",children:i.map((e,s)=>(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1",children:[s>0&&(0,t.jsx)(l.ChevronRight,{className:"size-3 shrink-0 opacity-50"}),(0,t.jsx)("span",{className:(0,_.cn)("truncate",s===i.length-1&&"text-foreground"),children:e})]},`${s}-${e}`))})}function Z({icon:e,label:s,active:i,hasChildren:n,onClick:r}){return(0,t.jsxs)("button",{type:"button",onClick:r,className:(0,_.cn)("mx-1 flex items-center gap-1.5 rounded-md px-2 py-1 text-left text-xs outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",i?T.PICKED_ROW:"text-muted-foreground hover:bg-muted/50 hover:text-foreground"),children:[(0,t.jsx)("span",{className:"shrink-0 text-muted-foreground/70 [&>svg]:size-3",children:e}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:s}),n&&(0,t.jsx)(l.ChevronRight,{className:"size-3 shrink-0 text-muted-foreground/50"})]})}function J({source:e,dir:s,path:i,current:n,onPick:l}){let{data:d,isLoading:c,error:u}=(0,W.useServerRoute)(j.queryKey.skillNode(e,s,i));return u?(0,t.jsx)("p",{className:"p-3 font-mono text-xs text-destructive",children:u.message}):c||!d?(0,t.jsxs)("div",{className:"space-y-2 p-2",children:[(0,t.jsx)(C.Skeleton,{className:"h-5 w-full"}),(0,t.jsx)(C.Skeleton,{className:"h-5 w-4/5"})]}):"dir"!==d.kind?null:(0,t.jsxs)(t.Fragment,{children:[d.entries.map(e=>(0,t.jsx)(Z,{icon:"dir"===e.kind?(0,t.jsx)(o.Folder,{}):e.name.endsWith(".md")?(0,t.jsx)(a.FileText,{}):(0,t.jsx)(r.File,{}),label:e.name,hasChildren:"dir"===e.kind,active:(i?`${i}/${e.name}`:e.name)===n,onClick:()=>l(e)},e.name)),0===d.entries.length&&(0,t.jsx)("p",{className:"p-3 text-xs text-muted-foreground/60",children:"Empty folder"})]})}function Q({content:e,description:s}){let i=/^---\r?\n([\s\S]*?)\r?\n---[ \t]*\r?\n?/.exec(e),n=s?.trim(),l=i?e.slice(i[0].length):e;return(0,t.jsxs)("div",{className:"min-w-0",children:[n&&(0,t.jsx)("p",{className:"border-b border-border/60 px-5 py-3 text-[13px] leading-relaxed text-muted-foreground",children:n}),(0,t.jsx)("div",{className:"px-5 py-4 text-sm leading-relaxed",children:(0,t.jsx)(S.Markdown,{children:l})})]})}function X({source:e,dir:s,path:i,editable:n,onUnsaved:l}){let[r,a]=(0,k.useState)(null),{data:o,isLoading:d,error:c}=(0,W.useServerRoute)(j.queryKey.skillNode(e,s,i)),u=null!==r&&(o?.kind!=="file"||r!==o.content);(0,k.useEffect)(()=>l?.(u),[u,l]);let[m,x]=(0,P.useServerAction)(I,{okMessage:"Saved",onOk:()=>{a(null),(0,W.revalidate)(j.queryKey.skills)}});if(c)return(0,t.jsx)("p",{className:"p-4 font-mono text-xs text-destructive",children:c.message});if(d||!o)return(0,t.jsxs)("div",{className:"space-y-3 p-5",children:[(0,t.jsx)(C.Skeleton,{className:"h-5 w-2/3"}),(0,t.jsx)(C.Skeleton,{className:"h-4 w-full"}),(0,t.jsx)(C.Skeleton,{className:"h-4 w-5/6"})]});if("file"!==o.kind)return null;let f=i.split("/").pop()??"";return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"sticky top-0 z-20 flex items-center justify-between gap-2 border-b border-border/60 bg-background/90 px-5 py-2 font-mono text-[11px] text-muted-foreground backdrop-blur",children:[(0,t.jsx)("span",{className:"truncate",children:f}),(0,t.jsxs)("span",{className:"flex shrink-0 items-center gap-2",children:[(0,t.jsx)("span",{children:(0,_.formatBytes)(o.size)}),n&&null!==o.content&&null===r&&(0,t.jsxs)(y.Button,{size:"xs",variant:"ghost",className:"font-mono",onClick:()=>a(o.content??""),children:[(0,t.jsx)(p,{}),"Edit"]}),null!==r&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.Button,{size:"xs",variant:"ghost",className:"font-mono",onClick:()=>a(null),children:"Cancel"}),(0,t.jsx)(y.Button,{size:"xs",className:"font-mono",loading:x,disabled:r===o.content,onClick:()=>m(e,s,i,r),children:"Save"})]})]})]}),null!==r?(0,t.jsx)(M.Textarea,{value:r,onChange:e=>a(e.target.value),spellCheck:!1,"aria-label":`${f} contents`,className:"min-h-120 resize-none rounded-none border-0 font-mono text-[13px] leading-relaxed shadow-none focus-visible:ring-0"}):null===o.content?(0,t.jsx)("p",{className:"px-5 py-4 text-sm text-muted-foreground/60",children:o.size>R.SKILL_FILES.inlineBytes?"Too long to show here — a bot still reads it from disk.":"Not a text file — a bot can still read it from disk."}):f.toLowerCase().endsWith(".md")?(0,t.jsx)(Q,{content:o.content,description:o.description}):(0,t.jsx)("pre",{className:"overflow-x-auto px-5 py-4 font-mono text-[13px] leading-relaxed whitespace-pre text-foreground/90",children:o.content})]})}function ee(){return z.notify.component({className:"sm:max-w-lg",renderer:({close:e,guard:s})=>(0,t.jsx)(et,{onDone:e,guard:s})})}function et({onDone:e,guard:s}){let[i,n]=(0,k.useState)("write"),[l,r]=(0,k.useState)(""),[a,o]=(0,k.useState)(""),[d,c]=(0,k.useState)(""),[u,m]=(0,k.useState)(null),[f,h]=(0,k.useState)(!1),p=(0,k.useRef)(null),g=(0,k.useRef)(!1);g.current=!!(l.trim()||a.trim()||d.trim()||u),(0,k.useEffect)(()=>s(()=>g.current),[s]);let v={errorMessage:!1,onOk:()=>{(0,W.revalidate)(j.queryKey.skills),e()}},[S,z,,C]=(0,P.useServerAction)(D,v),[L,$,,A]=(0,P.useServerAction)(q,v),B=z||$,I="write"===i?C:A,K=null!==u&&u.size>R.SKILL_FILES.uploadBytes,E=Math.round(R.SKILL_FILES.uploadBytes/1024/1024),U=!B&&("write"===i?l.trim()&&a.trim()&&d.trim():null!==u&&!K),O=async()=>{if(!U)return;if("write"===i)return void S({name:l.trim(),description:a.trim(),content:d});if(!u)return;let e=new FormData;e.append("file",u),L(e)},H=e=>{let t=e?.[0]??null;t&&m(t)};return(0,t.jsxs)(T.SettingDialogContent,{title:"New skill",description:"Instructions a bot reads when a job calls for them.",footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.Button,{variant:"ghost",onClick:e,children:"Cancel"}),(0,t.jsxs)(y.Button,{disabled:!U,loading:B,onClick:O,children:[!B&&("write"===i?(0,t.jsx)(x.Plus,{}):(0,t.jsx)(b,{})),"write"===i?"Create":"Upload"]})]}),children:[(0,t.jsxs)(F.Tabs,{value:i,onValueChange:e=>n(e),children:[(0,t.jsxs)(F.TabsList,{className:"w-full",children:[(0,t.jsx)(F.TabsTrigger,{value:"write",children:"Write"}),(0,t.jsx)(F.TabsTrigger,{value:"upload",children:"Upload"})]}),(0,t.jsxs)(F.TabsContent,{value:"write",className:"space-y-5 pt-4",children:[(0,t.jsxs)(w.Field,{children:[(0,t.jsx)(w.FieldLabel,{htmlFor:"skill-name",children:"Name"}),(0,t.jsxs)(w.FieldContent,{children:[(0,t.jsx)(N.Input,{id:"skill-name",value:l,onChange:e=>r(e.target.value),placeholder:"deploy-checklist",spellCheck:!1,autoFocus:!0}),(0,t.jsxs)("p",{className:"font-mono text-[11px] text-muted-foreground",children:[R.PATHS.skills.custom,"/",l.trim()||"…","/SKILL.md"]})]})]}),(0,t.jsxs)(w.Field,{children:[(0,t.jsx)(w.FieldLabel,{htmlFor:"skill-description",children:"Description"}),(0,t.jsx)(w.FieldContent,{children:(0,t.jsx)(N.Input,{id:"skill-description",value:a,onChange:e=>o(e.target.value),placeholder:"What it does, then when to use it — a bot reads this to decide"})})]}),(0,t.jsxs)(w.Field,{children:[(0,t.jsx)(w.FieldLabel,{htmlFor:"skill-content",children:"Content"}),(0,t.jsx)(M.Textarea,{id:"skill-content",value:d,onChange:e=>c(e.target.value),placeholder:"Markdown. The steps, the rules, the examples.",className:"min-h-40 resize-none font-mono text-xs"})]})]}),(0,t.jsxs)(F.TabsContent,{value:"upload",className:"space-y-4 pt-4",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>p.current?.click(),onDragOver:e=>{e.preventDefault(),h(!0)},onDragLeave:()=>h(!1),onDrop:e=>{e.preventDefault(),h(!1),H(e.dataTransfer.files)},className:(0,_.cn)("flex w-full flex-col items-center gap-2 rounded-xl border border-dashed px-6 py-10 text-center outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",f?"border-foreground/60 bg-muted/60":"border-border hover:bg-muted/40"),children:[(0,t.jsx)(b,{className:"size-5 text-muted-foreground"}),u?(0,t.jsxs)("span",{className:"text-sm",children:[u.name,(0,t.jsxs)("span",{className:(0,_.cn)("ml-2 font-mono text-[11px]",K?"text-destructive":"text-muted-foreground"),children:[(0,_.formatBytes)(u.size),K&&` \xb7 over ${E} MB`]})]}):(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"Drop a file here, or click to choose"})]}),(0,t.jsx)("input",{ref:p,type:"file",accept:".md,.zip,.skill",className:"hidden",onChange:e=>H(e.target.files)}),(0,t.jsxs)("div",{className:"space-y-1 text-xs text-muted-foreground",children:[(0,t.jsx)("p",{className:"font-medium text-foreground/80",children:"File requirements"}),(0,t.jsxs)("p",{children:["A ",(0,t.jsx)("span",{className:"font-mono",children:".md"})," file needs a YAML block with the skill's name and description."]}),(0,t.jsxs)("p",{children:["A ",(0,t.jsx)("span",{className:"font-mono",children:".zip"})," or"," ",(0,t.jsx)("span",{className:"font-mono",children:".skill"})," archive needs a SKILL.md inside — the rest of its folder comes along."]}),(0,t.jsxs)("p",{children:["Up to ",E," MB."]})]})]})]}),I&&(0,t.jsx)("p",{className:"font-mono text-xs text-destructive",children:I})]})}e.s(["SkillsSetting",0,function(){let[e,s]=(0,k.useState)(""),{data:i,isLoading:n,error:l}=(0,W.useServerRoute)(j.queryKey.skills),r=i??[];if(n)return(0,t.jsx)(T.SettingSkeleton,{rows:4});if(l)return(0,t.jsx)(T.SettingError,{message:l.message});let a=e.trim().toLowerCase(),o=r.filter(e=>!a||`${e.name} ${e.description}`.toLowerCase().includes(a)),d=r.filter(e=>!e.disabled).length,c=r.filter(e=>!e.disabled&&("default"===e.source||"custom"===e.source)).length,u=new Map;for(let e of o)e.bot&&u.set(e.bot,[...u.get(e.bot)??[],e]);return(0,t.jsxs)(T.SettingScreen,{footer:(0,t.jsxs)(T.SettingRailNote,{children:[r.filter(e=>!E(e.source)).length," ","shipped ·"," ",r.filter(e=>E(e.source)).length," ","installed"]}),children:[(0,t.jsx)(T.SettingToolbar,{count:`${d} on \xb7 ${r.length-d} off`,children:(0,t.jsx)(T.SettingFilter,{value:e,onChange:s,placeholder:"Filter skills"})}),(0,t.jsx)(T.SettingGroup,{label:"Custom",hint:"yours — added here · a Default skill of the same name wins",children:(0,t.jsx)(T.SettingItems,{addRow:{label:"Add skill",onClick:ee},children:o.filter(e=>"custom"===e.source).map(e=>(0,t.jsx)(V,{skill:e},`custom/${e.dir}`))})}),[...u].map(([e,s])=>(0,t.jsx)(T.SettingGroup,{label:`${e}'s own`,hint:`only ${e} reads these \xb7 what it found or wrote can be edited or deleted`,children:(0,t.jsx)(T.SettingItems,{children:s.map(e=>(0,t.jsx)(V,{skill:e},`${e.source}/${e.dir}`))})},e)),(0,t.jsx)(T.SettingGroup,{label:"Default",hint:"ships with the app · switch off, can't edit or delete",children:(0,t.jsx)(T.SettingItems,{children:o.filter(e=>"default"===e.source).map(e=>(0,t.jsx)(V,{skill:e},`default/${e.dir}`))})}),c>R.PROMPT_CROWDED.skills&&(0,t.jsxs)(T.SettingNote,{children:[c," skills are on for every bot. Each is a line in every prompt a bot reads, and one more to look past when it picks."]})]})}],833959)},437750,e=>{"use strict";var t=e.i(456420);let s={name:"app-window",size:24,node:[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]]};s.node;let i=(0,t.default)(s);e.s(["AppWindow",0,i],437750)},726067,e=>{"use strict";var t=e.i(456420);let s={name:"folder",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};s.node;let i=(0,t.default)(s);e.s(["Folder",0,i],726067)},759659,e=>{"use strict";var t=e.i(456420);let s={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};s.node;let i=(0,t.default)(s);e.s(["Trash2",0,i],759659)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,986530,e=>{"use strict";var t=e.i(843476),s=e.i(225913);e.i(271645);var i=e.i(647163);function n({className:e,...s}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,i.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...s})}e.i(652225);let l=(0,s.cva)("group/field flex w-full gap-2 data-[invalid=true]:text-destructive",{variants:{orientation:{vertical:"flex-col *:w-full [&>.sr-only]:w-auto",horizontal:"flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px",responsive:"flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px"}},defaultVariants:{orientation:"vertical"}});e.s(["Field",0,function({className:e,orientation:s="vertical",...n}){return(0,t.jsx)("div",{role:"group","data-slot":"field","data-orientation":s,className:(0,i.cn)(l({orientation:s}),e),...n})},"FieldContent",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"field-content",className:(0,i.cn)("group/field-content flex flex-1 flex-col gap-0.5 leading-snug",e),...s})},"FieldLabel",0,function({className:e,...s}){return(0,t.jsx)(n,{"data-slot":"field-label",className:(0,i.cn)("group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10","has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col",e),...s})}],986530)},833959,e=>{"use strict";var t=e.i(843476),s=e.i(437750),i=e.i(856539),n=e.i(24071),l=e.i(867927),r=e.i(829600),a=e.i(226091),o=e.i(726067),d=e.i(456420);let c={name:"frame",size:24,node:[["line",{x1:"22",x2:"2",y1:"6",y2:"6",key:"15w7dq"}],["line",{x1:"22",x2:"2",y1:"18",y2:"18",key:"1ip48p"}],["line",{x1:"6",x2:"6",y1:"2",y2:"22",key:"a2lnyx"}],["line",{x1:"18",x2:"18",y1:"2",y2:"22",key:"8vb6jd"}]]};c.node;let u=(0,d.default)(c);var m=e.i(91511),x=e.i(77071),f=e.i(566595);let h={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]};h.node;let p=(0,d.default)(h);var g=e.i(759659);let v={name:"upload",size:24,node:[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]};v.node;let b=(0,d.default)(v);var k=e.i(271645),j=e.i(798120),y=e.i(167881),w=e.i(986530),N=e.i(23750),S=e.i(683408),z=e.i(917162),C=e.i(671428),L=e.i(319036),F=e.i(127341),M=e.i(184762),R=e.i(41533),T=e.i(895836),$=e.i(95187);let D=(0,$.createServerReference)("7f713f3f9da1b4c12d01c01af85ff92a631f20aaea",$.callServer,void 0,$.findSourceMapURL,"createSkillAction"),A=(0,$.createServerReference)("7f2b5a2f6ca913bee0bd69084279ffadf31abf601d",$.callServer,void 0,$.findSourceMapURL,"deleteSkillAction"),B=(0,$.createServerReference)("7fc60a0e134ab56c08dfb7fd65ecef0b34c5701a6f",$.callServer,void 0,$.findSourceMapURL,"setSkillDisabledAction"),q=(0,$.createServerReference)("7f1de3baef5627e68ea692f0ed9b847d5812e29d0a",$.callServer,void 0,$.findSourceMapURL,"uploadSkillAction"),I=(0,$.createServerReference)("7ff78c9560983ead182b7c210b8e6e88d26ff5e043",$.callServer,void 0,$.findSourceMapURL,"writeSkillFileAction");var K=e.i(681307);K.z.union([K.z.enum(["custom","default"]),K.z.templateLiteral(["kit:",K.z.string().regex(/^[\p{L}\p{N}_-]+$/u)]),K.z.templateLiteral(["own:",K.z.string().regex(/^[\p{L}\p{N}_-]+$/u)])]);let E=e=>"custom"===e||e.startsWith("own:"),U=K.z.string().trim().min(1,"Skill name is required").max(64,"Skill name is too long").regex(/^[a-z0-9][a-z0-9_-]*$/i,"Use letters, numbers, dashes and underscores only"),O=K.z.string().trim().min(1,"Skill name is required").max(64,"Skill name is too long");K.z.object({name:O,description:K.z.string().trim().min(1,"Description is required"),metadata:K.z.record(K.z.string(),K.z.unknown()).optional(),disabled:K.z.boolean().optional(),platforms:K.z.array(K.z.string()).optional()}).extend({name:U,content:K.z.string().trim().min(1,"Content is required")});var P=e.i(609856),W=e.i(283653),_=e.i(647163);let H={artifact:u,browser:m.Globe,computer:s.AppWindow,"find-skills":f.Search,"skill-creator":p};function V({skill:e}){let[s,n]=(0,P.useServerAction)(A,{onOk:()=>(0,W.revalidate)(j.queryKey.skills)}),[r]=(0,P.useServerAction)(B,{onOk:()=>(0,W.revalidate)(j.queryKey.skills)}),a=async()=>{await z.notify.confirm({title:`Delete ${e.name}?`,description:"Every file in this skill is deleted for good.",okText:"Delete",destructive:!0})&&s(e.source,e.dir)},o="default"===e.source&&H[e.dir]||i.BookMarked;return(0,t.jsxs)("div",{className:"group flex items-center transition-colors hover:bg-muted/50",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>{var s;return s=e,z.notify.component({className:"sm:max-w-4xl",renderer:({guard:e})=>(0,t.jsx)(G,{skill:s,guard:e})})},className:"flex min-w-0 flex-1 items-center gap-3 py-4 pl-4 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)("span",{className:(0,_.cn)("grid size-10 shrink-0 place-items-center rounded-lg bg-muted text-muted-foreground",e.disabled&&"opacity-45"),children:(0,t.jsx)(o,{className:"size-4"})}),(0,t.jsxs)("span",{className:(0,_.cn)("min-w-0 flex-1 space-y-0.5",e.disabled&&"opacity-45"),children:[(0,t.jsx)("span",{className:"block truncate text-sm font-medium",children:e.name}),(0,t.jsx)("span",{className:"line-clamp-2 text-xs leading-relaxed text-muted-foreground",children:e.description.trim().split(/(?<=[.。])\s|\n/)[0].trim()})]}),(0,t.jsx)(l.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 group-hover:text-foreground"})]}),(0,t.jsxs)("div",{className:"mr-4 ml-5 flex w-18 shrink-0 items-center justify-end gap-3",children:[(0,t.jsx)(L.Switch,{checked:!e.disabled,onCheckedChange:t=>r(e.source,e.dir,!t),"aria-label":`${e.name} on or off`,className:"shrink-0"}),E(e.source)?(0,t.jsx)(y.Button,{size:"icon-sm",variant:"ghost",loading:n,onClick:a,"aria-label":`Delete ${e.name}`,className:"shrink-0 text-muted-foreground",children:(0,t.jsx)(g.Trash2,{})}):(0,t.jsx)("span",{className:"size-7 shrink-0"})]})]})}function G({skill:e,guard:s}){let[i,l]=(0,k.useState)(""),[r,a]=(0,k.useState)("SKILL.md"),o=(0,k.useRef)(!1);(0,k.useEffect)(()=>s(()=>o.current),[s]);let d=async e=>{let t=i?`${i}/${e.name}`:e.name;"dir"===e.kind?l(t):t===r||(!o.current||await z.notify.confirm({title:"Discard your changes?",description:`What you wrote in ${r?.split("/").pop()} is not saved.`,okText:"Discard",destructive:!0}))&&(o.current=!1,a(t))};return(0,t.jsx)(T.SettingDialogContent,{title:e.name,description:(0,t.jsx)(Y,{skill:e,path:r??i}),children:(0,t.jsxs)("div",{className:"flex h-[36rem] divide-x divide-border/60 overflow-hidden rounded-xl border border-border/60 bg-background",children:[(0,t.jsxs)("div",{className:"flex w-44 shrink-0 flex-col overflow-y-auto bg-muted/20 py-1",children:[i&&(0,t.jsxs)("button",{type:"button",onClick:()=>l(i.split("/").slice(0,-1).join("/")),className:"mx-1 mb-1 flex items-center gap-1 rounded-md px-2 py-1 text-left font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/50 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)(n.ChevronLeft,{className:"size-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:i.split("/").pop()})]}),(0,t.jsx)(J,{source:e.source,dir:e.dir,path:i,current:r,onPick:d})]}),(0,t.jsx)("div",{className:"min-w-0 flex-1 overflow-y-auto",children:r?(0,t.jsx)(X,{source:e.source,dir:e.dir,path:r,editable:E(e.source),onUnsaved:e=>{o.current=e}},r):(0,t.jsx)("p",{className:"p-6 text-sm text-muted-foreground/60",children:"Pick a file"})})]})})}function Y({skill:e,path:s}){if(!e)return(0,t.jsx)("span",{className:"truncate font-mono text-[11px] text-muted-foreground/60",children:"Pick a skill"});let i=[e.name,...s.split("/").filter(Boolean)];return(0,t.jsx)("span",{className:"flex min-w-0 items-center gap-1 font-mono text-[11px] text-muted-foreground",children:i.map((e,s)=>(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1",children:[s>0&&(0,t.jsx)(l.ChevronRight,{className:"size-3 shrink-0 opacity-50"}),(0,t.jsx)("span",{className:(0,_.cn)("truncate",s===i.length-1&&"text-foreground"),children:e})]},`${s}-${e}`))})}function Z({icon:e,label:s,active:i,hasChildren:n,onClick:r}){return(0,t.jsxs)("button",{type:"button",onClick:r,className:(0,_.cn)("mx-1 flex items-center gap-1.5 rounded-md px-2 py-1 text-left text-xs outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",i?T.PICKED_ROW:"text-muted-foreground hover:bg-muted/50 hover:text-foreground"),children:[(0,t.jsx)("span",{className:"shrink-0 text-muted-foreground/70 [&>svg]:size-3",children:e}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:s}),n&&(0,t.jsx)(l.ChevronRight,{className:"size-3 shrink-0 text-muted-foreground/50"})]})}function J({source:e,dir:s,path:i,current:n,onPick:l}){let{data:d,isLoading:c,error:u}=(0,W.useServerRoute)(j.queryKey.skillNode(e,s,i));return u?(0,t.jsx)("p",{className:"p-3 font-mono text-xs text-destructive",children:u.message}):c||!d?(0,t.jsxs)("div",{className:"space-y-2 p-2",children:[(0,t.jsx)(C.Skeleton,{className:"h-5 w-full"}),(0,t.jsx)(C.Skeleton,{className:"h-5 w-4/5"})]}):"dir"!==d.kind?null:(0,t.jsxs)(t.Fragment,{children:[d.entries.map(e=>(0,t.jsx)(Z,{icon:"dir"===e.kind?(0,t.jsx)(o.Folder,{}):e.name.endsWith(".md")?(0,t.jsx)(a.FileText,{}):(0,t.jsx)(r.File,{}),label:e.name,hasChildren:"dir"===e.kind,active:(i?`${i}/${e.name}`:e.name)===n,onClick:()=>l(e)},e.name)),0===d.entries.length&&(0,t.jsx)("p",{className:"p-3 text-xs text-muted-foreground/60",children:"Empty folder"})]})}function Q({content:e,description:s}){let i=/^---\r?\n([\s\S]*?)\r?\n---[ \t]*\r?\n?/.exec(e),n=s?.trim(),l=i?e.slice(i[0].length):e;return(0,t.jsxs)("div",{className:"min-w-0",children:[n&&(0,t.jsx)("p",{className:"border-b border-border/60 px-5 py-3 text-[13px] leading-relaxed text-muted-foreground",children:n}),(0,t.jsx)("div",{className:"px-5 py-4 text-sm leading-relaxed",children:(0,t.jsx)(S.Markdown,{children:l})})]})}function X({source:e,dir:s,path:i,editable:n,onUnsaved:l}){let[r,a]=(0,k.useState)(null),{data:o,isLoading:d,error:c}=(0,W.useServerRoute)(j.queryKey.skillNode(e,s,i)),u=null!==r&&(o?.kind!=="file"||r!==o.content);(0,k.useEffect)(()=>l?.(u),[u,l]);let[m,x]=(0,P.useServerAction)(I,{okMessage:"Saved",onOk:()=>{a(null),(0,W.revalidate)(j.queryKey.skills)}});if(c)return(0,t.jsx)("p",{className:"p-4 font-mono text-xs text-destructive",children:c.message});if(d||!o)return(0,t.jsxs)("div",{className:"space-y-3 p-5",children:[(0,t.jsx)(C.Skeleton,{className:"h-5 w-2/3"}),(0,t.jsx)(C.Skeleton,{className:"h-4 w-full"}),(0,t.jsx)(C.Skeleton,{className:"h-4 w-5/6"})]});if("file"!==o.kind)return null;let f=i.split("/").pop()??"";return(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"sticky top-0 z-20 flex items-center justify-between gap-2 border-b border-border/60 bg-background/90 px-5 py-2 font-mono text-[11px] text-muted-foreground backdrop-blur",children:[(0,t.jsx)("span",{className:"truncate",children:f}),(0,t.jsxs)("span",{className:"flex shrink-0 items-center gap-2",children:[(0,t.jsx)("span",{children:(0,_.formatBytes)(o.size)}),n&&null!==o.content&&null===r&&(0,t.jsxs)(y.Button,{size:"xs",variant:"ghost",className:"font-mono",onClick:()=>a(o.content??""),children:[(0,t.jsx)(p,{}),"Edit"]}),null!==r&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.Button,{size:"xs",variant:"ghost",className:"font-mono",onClick:()=>a(null),children:"Cancel"}),(0,t.jsx)(y.Button,{size:"xs",className:"font-mono",loading:x,disabled:r===o.content,onClick:()=>m(e,s,i,r),children:"Save"})]})]})]}),null!==r?(0,t.jsx)(M.Textarea,{value:r,onChange:e=>a(e.target.value),spellCheck:!1,"aria-label":`${f} contents`,className:"min-h-120 resize-none rounded-none border-0 font-mono text-[13px] leading-relaxed shadow-none focus-visible:ring-0"}):null===o.content?(0,t.jsx)("p",{className:"px-5 py-4 text-sm text-muted-foreground/60",children:o.size>R.SKILL_FILES.inlineBytes?"Too long to show here — a bot still reads it from disk.":"Not a text file — a bot can still read it from disk."}):f.toLowerCase().endsWith(".md")?(0,t.jsx)(Q,{content:o.content,description:o.description}):(0,t.jsx)("pre",{className:"overflow-x-auto px-5 py-4 font-mono text-[13px] leading-relaxed whitespace-pre text-foreground/90",children:o.content})]})}function ee(){return z.notify.component({className:"sm:max-w-lg",renderer:({close:e,guard:s})=>(0,t.jsx)(et,{onDone:e,guard:s})})}function et({onDone:e,guard:s}){let[i,n]=(0,k.useState)("write"),[l,r]=(0,k.useState)(""),[a,o]=(0,k.useState)(""),[d,c]=(0,k.useState)(""),[u,m]=(0,k.useState)(null),[f,h]=(0,k.useState)(!1),p=(0,k.useRef)(null),g=(0,k.useRef)(!1);g.current=!!(l.trim()||a.trim()||d.trim()||u),(0,k.useEffect)(()=>s(()=>g.current),[s]);let v={errorMessage:!1,onOk:()=>{(0,W.revalidate)(j.queryKey.skills),e()}},[S,z,,C]=(0,P.useServerAction)(D,v),[L,$,,A]=(0,P.useServerAction)(q,v),B=z||$,I="write"===i?C:A,K=null!==u&&u.size>R.SKILL_FILES.uploadBytes,E=Math.round(R.SKILL_FILES.uploadBytes/1024/1024),U=!B&&("write"===i?l.trim()&&a.trim()&&d.trim():null!==u&&!K),O=async()=>{if(!U)return;if("write"===i)return void S({name:l.trim(),description:a.trim(),content:d});if(!u)return;let e=new FormData;e.append("file",u),L(e)},H=e=>{let t=e?.[0]??null;t&&m(t)};return(0,t.jsxs)(T.SettingDialogContent,{title:"New skill",description:"Instructions a bot reads when a job calls for them.",footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(y.Button,{variant:"ghost",onClick:e,children:"Cancel"}),(0,t.jsxs)(y.Button,{disabled:!U,loading:B,onClick:O,children:[!B&&("write"===i?(0,t.jsx)(x.Plus,{}):(0,t.jsx)(b,{})),"write"===i?"Create":"Upload"]})]}),children:[(0,t.jsxs)(F.Tabs,{value:i,onValueChange:e=>n(e),children:[(0,t.jsxs)(F.TabsList,{className:"w-full",children:[(0,t.jsx)(F.TabsTrigger,{value:"write",children:"Write"}),(0,t.jsx)(F.TabsTrigger,{value:"upload",children:"Upload"})]}),(0,t.jsxs)(F.TabsContent,{value:"write",className:"space-y-5 pt-4",children:[(0,t.jsxs)(w.Field,{children:[(0,t.jsx)(w.FieldLabel,{htmlFor:"skill-name",children:"Name"}),(0,t.jsxs)(w.FieldContent,{children:[(0,t.jsx)(N.Input,{id:"skill-name",value:l,onChange:e=>r(e.target.value),placeholder:"deploy-checklist",spellCheck:!1,autoFocus:!0}),(0,t.jsxs)("p",{className:"font-mono text-[11px] text-muted-foreground",children:[R.PATHS.skills.custom,"/",l.trim()||"…","/SKILL.md"]})]})]}),(0,t.jsxs)(w.Field,{children:[(0,t.jsx)(w.FieldLabel,{htmlFor:"skill-description",children:"Description"}),(0,t.jsx)(w.FieldContent,{children:(0,t.jsx)(N.Input,{id:"skill-description",value:a,onChange:e=>o(e.target.value),placeholder:"What it does, then when to use it — a bot reads this to decide"})})]}),(0,t.jsxs)(w.Field,{children:[(0,t.jsx)(w.FieldLabel,{htmlFor:"skill-content",children:"Content"}),(0,t.jsx)(M.Textarea,{id:"skill-content",value:d,onChange:e=>c(e.target.value),placeholder:"Markdown. The steps, the rules, the examples.",className:"min-h-40 resize-none font-mono text-xs"})]})]}),(0,t.jsxs)(F.TabsContent,{value:"upload",className:"space-y-4 pt-4",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>p.current?.click(),onDragOver:e=>{e.preventDefault(),h(!0)},onDragLeave:()=>h(!1),onDrop:e=>{e.preventDefault(),h(!1),H(e.dataTransfer.files)},className:(0,_.cn)("flex w-full flex-col items-center gap-2 rounded-xl border border-dashed px-6 py-10 text-center outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",f?"border-foreground/60 bg-muted/60":"border-border hover:bg-muted/40"),children:[(0,t.jsx)(b,{className:"size-5 text-muted-foreground"}),u?(0,t.jsxs)("span",{className:"text-sm",children:[u.name,(0,t.jsxs)("span",{className:(0,_.cn)("ml-2 font-mono text-[11px]",K?"text-destructive":"text-muted-foreground"),children:[(0,_.formatBytes)(u.size),K&&` \xb7 over ${E} MB`]})]}):(0,t.jsx)("span",{className:"text-sm text-muted-foreground",children:"Drop a file here, or click to choose"})]}),(0,t.jsx)("input",{ref:p,type:"file",accept:".md,.zip,.skill",className:"hidden",onChange:e=>H(e.target.files)}),(0,t.jsxs)("div",{className:"space-y-1 text-xs text-muted-foreground",children:[(0,t.jsx)("p",{className:"font-medium text-foreground/80",children:"File requirements"}),(0,t.jsxs)("p",{children:["A ",(0,t.jsx)("span",{className:"font-mono",children:".md"})," file needs a YAML block with the skill's name and description."]}),(0,t.jsxs)("p",{children:["A ",(0,t.jsx)("span",{className:"font-mono",children:".zip"})," or"," ",(0,t.jsx)("span",{className:"font-mono",children:".skill"})," archive needs a SKILL.md inside — the rest of its folder comes along."]}),(0,t.jsxs)("p",{children:["Up to ",E," MB."]})]})]})]}),I&&(0,t.jsx)("p",{className:"font-mono text-xs text-destructive",children:I})]})}e.s(["SkillsSetting",0,function(){let[e,s]=(0,k.useState)(""),{data:i,isLoading:n,error:l}=(0,W.useServerRoute)(j.queryKey.skills),r=i??[];if(n)return(0,t.jsx)(T.SettingSkeleton,{rows:4});if(l)return(0,t.jsx)(T.SettingError,{message:l.message});let a=e.trim().toLowerCase(),o=r.filter(e=>!a||`${e.name} ${e.description}`.toLowerCase().includes(a)),d=r.filter(e=>!e.disabled).length,c=r.filter(e=>!e.disabled&&("default"===e.source||"custom"===e.source)).length,u=new Map;for(let e of o)e.bot&&u.set(e.bot,[...u.get(e.bot)??[],e]);return(0,t.jsxs)(T.SettingScreen,{footer:(0,t.jsxs)(T.SettingRailNote,{children:[r.filter(e=>!E(e.source)).length," ","shipped ·"," ",r.filter(e=>E(e.source)).length," ","installed"]}),children:[(0,t.jsx)(T.SettingToolbar,{count:`${d} on \xb7 ${r.length-d} off`,children:(0,t.jsx)(T.SettingFilter,{value:e,onChange:s,placeholder:"Filter skills"})}),(0,t.jsx)(T.SettingGroup,{label:"Custom",hint:"yours — added here · a Default skill of the same name wins",children:(0,t.jsx)(T.SettingItems,{addRow:{label:"Add skill",onClick:ee},children:o.filter(e=>"custom"===e.source).map(e=>(0,t.jsx)(V,{skill:e},`custom/${e.dir}`))})}),[...u].map(([e,s])=>(0,t.jsx)(T.SettingGroup,{label:`${e}'s own`,hint:`only ${e} reads these \xb7 what it found or wrote can be edited or deleted`,children:(0,t.jsx)(T.SettingItems,{children:s.map(e=>(0,t.jsx)(V,{skill:e},`${e.source}/${e.dir}`))})},e)),(0,t.jsx)(T.SettingGroup,{label:"Default",hint:"ships with the app · switch off, can't edit or delete",children:(0,t.jsx)(T.SettingItems,{children:o.filter(e=>"default"===e.source).map(e=>(0,t.jsx)(V,{skill:e},`default/${e.dir}`))})}),c>R.PROMPT_CROWDED.skills&&(0,t.jsxs)(T.SettingNote,{children:[c," skills are on for every bot. Each is a line in every prompt a bot reads, and one more to look past when it picks."]})]})}],833959)},437750,e=>{"use strict";var t=e.i(456420);let s={name:"app-window",size:24,node:[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]]};s.node;let i=(0,t.default)(s);e.s(["AppWindow",0,i],437750)},726067,e=>{"use strict";var t=e.i(456420);let s={name:"folder",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};s.node;let i=(0,t.default)(s);e.s(["Folder",0,i],726067)},759659,e=>{"use strict";var t=e.i(456420);let s={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};s.node;let i=(0,t.default)(s);e.s(["Trash2",0,i],759659)}]);
package/README.md CHANGED
@@ -41,7 +41,7 @@ A speech model that opens a browser goes silent for a minute, and a silent call
41
41
 
42
42
  <picture>
43
43
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/cgoinglove/thursday/main/docs/images/film-talk-dark.png">
44
- <img src="https://raw.githubusercontent.com/cgoinglove/thursday/main/docs/images/film-talk-light.png" alt="On a call: she says a bot is on it and will tell you when it is back, and the job is handed over" width="880">
44
+ <img src="https://raw.githubusercontent.com/cgoinglove/thursday/main/docs/images/film-talk-light.png" alt="On a call: she says a bot is on it and will tell you when it is back, while the job is handed over and a web search starts" width="880">
45
45
  </picture>
46
46
 
47
47
  ### One ask, a whole team
@@ -50,7 +50,7 @@ Bots hand parts of a job to each other, check what comes back, and ask you only
50
50
 
51
51
  <picture>
52
52
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/cgoinglove/thursday/main/docs/images/film-team-dark.png">
53
- <img src="https://raw.githubusercontent.com/cgoinglove/thursday/main/docs/images/film-team-light.png" alt="While she tells you what was compared, two bots work a shop in their browser, and a question waits on you: keep the two that ship late?" width="880">
53
+ <img src="https://raw.githubusercontent.com/cgoinglove/thursday/main/docs/images/film-team-light.png" alt="A thread between two bots: one hands the job over, the other reports six coats compared, and a question waits on you" width="880">
54
54
  </picture>
55
55
 
56
56
  ### Errands, in a real browser
@@ -59,7 +59,7 @@ Orders, bookings, forms, the inbox. A bot uses its own browser or the Chrome you
59
59
 
60
60
  <picture>
61
61
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/cgoinglove/thursday/main/docs/images/film-errands-dark.png">
62
- <img src="https://raw.githubusercontent.com/cgoinglove/thursday/main/docs/images/film-errands-light.png" alt="Two bots in a browser of their own, one handing the other the job, searching a shop while she stays on the call" width="880">
62
+ <img src="https://raw.githubusercontent.com/cgoinglove/thursday/main/docs/images/film-errands-light.png" alt="A checkout a bot filled in, stopped at the Pay button and left open on your screen" width="880">
63
63
  </picture>
64
64
 
65
65
  ### Results you can keep
@@ -68,14 +68,14 @@ Pages, charts, videos, slides, docs and scripts, saved as files on your machine.
68
68
 
69
69
  <picture>
70
70
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/cgoinglove/thursday/main/docs/images/film-results-dark.png">
71
- <img src="https://raw.githubusercontent.com/cgoinglove/thursday/main/docs/images/film-results-light.png" alt="A finished job lands in the corner as a card; opened, it is the page a bot made, saved as a file" width="880">
71
+ <img src="https://raw.githubusercontent.com/cgoinglove/thursday/main/docs/images/film-results-light.png" alt="A page a bot made, a chart and a deck from the same job, and the files they were saved as" width="880">
72
72
  </picture>
73
73
 
74
74
  ## And also
75
75
 
76
76
  <picture>
77
77
  <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/cgoinglove/thursday/main/docs/images/film-more-dark.png">
78
- <img src="https://raw.githubusercontent.com/cgoinglove/thursday/main/docs/images/film-more-light.png" alt="Routines: every weekday at nine, a bot, a job and a time. From your phone: write to her from Telegram, Discord or Slack. Memory you can read: plain notes you can open, edit or delete. Every bot, its own model, picked per bot" width="880">
78
+ <img src="https://raw.githubusercontent.com/cgoinglove/thursday/main/docs/images/film-more-light.png" alt="Every weekday at nine: a bot, a job and a time. From your phone: Telegram, Discord or Slack. Memory you can read: plain notes you can open, edit or delete. Every bot, its own model, from OpenAI, Anthropic, Google, xAI or the Vercel AI Gateway" width="880">
79
79
  </picture>
80
80
 
81
81
  ## How it works