@intent-hq/web 2.388.0 → 2.389.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 (275) hide show
  1. package/package.json +1 -1
  2. package/web/app/immutable/chunks/0AIorxUa.js +411 -0
  3. package/web/app/immutable/chunks/{DOXxx9SZ.js → 2mfr9mCI.js} +1 -1
  4. package/web/app/immutable/chunks/{CAvh8i5c.js → 2sf1Yn-s.js} +1 -1
  5. package/web/app/immutable/chunks/{DypPlx7r.js → 4VEtxogG.js} +1 -1
  6. package/web/app/immutable/chunks/5J_xNo3h.js +2 -0
  7. package/web/app/immutable/chunks/{Dk9NNzZE.js → 85NDZF0c.js} +7 -7
  8. package/web/app/immutable/chunks/{s59tMRX6.js → 86aXQThN.js} +1 -1
  9. package/web/app/immutable/chunks/{Az9cm1af.js → 958SNXkw.js} +1 -1
  10. package/web/app/immutable/chunks/{cOfTiXUW.js → 96V4v2iI.js} +1 -1
  11. package/web/app/immutable/chunks/{dSWRjbXG.js → 97-360Ms.js} +1 -1
  12. package/web/app/immutable/chunks/{D8vs9kOP.js → B-I8ZlVM.js} +1 -1
  13. package/web/app/immutable/chunks/{CJ6d7atw.js → B-r8Ld9c.js} +1 -1
  14. package/web/app/immutable/chunks/{BCG_mh8x.js → B4JMAhvp.js} +3 -3
  15. package/web/app/immutable/chunks/{DjpNk5RK.js → B5N8LmEF.js} +1 -1
  16. package/web/app/immutable/chunks/{Bzh81gre.js → B6CGcXmK.js} +1 -1
  17. package/web/app/immutable/chunks/{1EMxL5fo.js → B6dUCFoz.js} +1 -1
  18. package/web/app/immutable/chunks/{CgkqJVb4.js → B91tdOJm.js} +1 -1
  19. package/web/app/immutable/chunks/{BlDw7Cnz.js → B9vHutcJ.js} +5 -5
  20. package/web/app/immutable/chunks/{BqymqbDk.js → BE4rQlti.js} +1 -1
  21. package/web/app/immutable/chunks/{CZkav0tO.js → BF_gPEg7.js} +2 -2
  22. package/web/app/immutable/chunks/{Bggsay0U.js → BGniv2IE.js} +1 -1
  23. package/web/app/immutable/chunks/{4o_ZQ4nq.js → BGrimfDs.js} +1 -1
  24. package/web/app/immutable/chunks/{D81tH0Kz.js → BHy9cRzo.js} +1 -1
  25. package/web/app/immutable/chunks/{D9tGn9lI.js → BIFBPuAO.js} +1 -1
  26. package/web/app/immutable/chunks/BIVpRSxo.js +2 -0
  27. package/web/app/immutable/chunks/{BG4hSkx5.js → BId1zNus.js} +1 -1
  28. package/web/app/immutable/chunks/{BHMZ-wPE.js → BNJ3edFz.js} +1 -1
  29. package/web/app/immutable/chunks/{BMOvHKEB.js → BNSbhHFY.js} +1 -1
  30. package/web/app/immutable/chunks/{BexVHAqu.js → BOVEEbKv.js} +1 -1
  31. package/web/app/immutable/chunks/{B9dzo0Kz.js → BPQFiQQc.js} +2 -2
  32. package/web/app/immutable/chunks/{BZljJ1HD.js → BQGIKN0g.js} +53 -53
  33. package/web/app/immutable/chunks/{D7wcXEUr.js → BR02ohTI.js} +1 -1
  34. package/web/app/immutable/chunks/{CRTEJPHA.js → BR1TNOav.js} +1 -1
  35. package/web/app/immutable/chunks/BT5v4htV.js +1 -0
  36. package/web/app/immutable/chunks/{Psr77Z1X.js → BVXrO_xP.js} +1 -1
  37. package/web/app/immutable/chunks/{BLv7f62Z.js → BWFaOHKx.js} +1 -1
  38. package/web/app/immutable/chunks/{yOonr4tS.js → BWfc0sSK.js} +1 -1
  39. package/web/app/immutable/chunks/{DU_cYENL.js → Ba3e0br1.js} +5 -5
  40. package/web/app/immutable/chunks/{C9UZoxqu.js → Bauem7Ke.js} +1 -1
  41. package/web/app/immutable/chunks/{Dz9x1eR4.js → BbYWP3Ow.js} +1 -1
  42. package/web/app/immutable/chunks/BbhtQrkZ.js +6 -0
  43. package/web/app/immutable/chunks/{o2-I6h0N.js → BdNfyyl1.js} +1 -1
  44. package/web/app/immutable/chunks/{big6nIIy.js → BdQ54KL0.js} +1 -1
  45. package/web/app/immutable/chunks/{nxvUsKcZ.js → Be-9sO50.js} +1 -1
  46. package/web/app/immutable/chunks/{alqbgjrN.js → Beb33qQi.js} +1 -1
  47. package/web/app/immutable/chunks/{UJ0k3Qud.js → BhCMc9G0.js} +1 -1
  48. package/web/app/immutable/chunks/BhVbCtBE.js +1 -0
  49. package/web/app/immutable/chunks/{DJCr4XPV.js → BiYZcl7D.js} +1 -1
  50. package/web/app/immutable/chunks/{CFArS1mZ.js → BkYN9M7z.js} +2 -2
  51. package/web/app/immutable/chunks/{BMyJogTr.js → BksTLNI4.js} +1 -1
  52. package/web/app/immutable/chunks/{CgpdwzlC.js → BlTdGk3A.js} +1 -1
  53. package/web/app/immutable/chunks/{DMxa_WW_.js → Bm_geQt1.js} +2 -2
  54. package/web/app/immutable/chunks/Bmlx0yvl.js +2 -0
  55. package/web/app/immutable/chunks/{DPhsGkGk.js → BniyCzQ9.js} +1 -1
  56. package/web/app/immutable/chunks/{Ca8LQU_k.js → BoCCPZlL.js} +1 -1
  57. package/web/app/immutable/chunks/{BUCW0wKH.js → BpMXdC4H.js} +1 -1
  58. package/web/app/immutable/chunks/{CZ6MUIg2.js → Bq2Q6gce.js} +1 -1
  59. package/web/app/immutable/chunks/{k9WXffYo.js → BrMDTgLg.js} +1 -1
  60. package/web/app/immutable/chunks/{CSeQ6fVV.js → BsY6roFy.js} +1 -1
  61. package/web/app/immutable/chunks/{Ci82uJM3.js → BtmHyUSg.js} +1 -1
  62. package/web/app/immutable/chunks/{Cah19Qux.js → Bviyt-Xy.js} +1 -1
  63. package/web/app/immutable/chunks/{DVqkJDVT.js → BwCICkMn.js} +8 -8
  64. package/web/app/immutable/chunks/{BQDKsQdE.js → BwVhyX7o.js} +1 -1
  65. package/web/app/immutable/chunks/ByZRLPfm.js +13 -0
  66. package/web/app/immutable/chunks/{CcNxrHIL.js → ByyFoG6W.js} +1 -1
  67. package/web/app/immutable/chunks/{DYu0VnZ5.js → BzWT_wQw.js} +1 -1
  68. package/web/app/immutable/chunks/{B49CUktc.js → C-HR_nje.js} +1 -1
  69. package/web/app/immutable/chunks/{B3K7_JP4.js → C2UL5Ler.js} +13 -13
  70. package/web/app/immutable/chunks/{bMZUbxIs.js → C3dytrTL.js} +1 -1
  71. package/web/app/immutable/chunks/{xQhx6K61.js → C3vs7E1W.js} +1 -1
  72. package/web/app/immutable/chunks/{C0AUQZ53.js → C4JKtRY1.js} +1 -1
  73. package/web/app/immutable/chunks/{Cj3bM-Zt.js → C4UYdkwZ.js} +1 -1
  74. package/web/app/immutable/chunks/{CBq8Km8c.js → C4sNRwZN.js} +1 -1
  75. package/web/app/immutable/chunks/{j5i4TEa8.js → C6RhewOE.js} +1 -1
  76. package/web/app/immutable/chunks/{DxMjS0Pm.js → C8A41C8K.js} +1 -1
  77. package/web/app/immutable/chunks/{DkXzy_Gt.js → C9szebIt.js} +1 -1
  78. package/web/app/immutable/chunks/{C_nSNvQ3.js → CB2iSm6U.js} +2 -2
  79. package/web/app/immutable/chunks/{B2KfKpOG.js → CDwhmkPo.js} +1 -1
  80. package/web/app/immutable/chunks/{Q6zM48G9.js → CFjHgtjF.js} +4 -4
  81. package/web/app/immutable/chunks/{UxV1HNfb.js → CIuThArl.js} +28 -28
  82. package/web/app/immutable/chunks/{BkPn8_Se.js → CJ9ZGIU3.js} +22 -22
  83. package/web/app/immutable/chunks/CM3NPzxs.js +1 -0
  84. package/web/app/immutable/chunks/{B6blQkaw.js → CRPk37P7.js} +1 -1
  85. package/web/app/immutable/chunks/CRSiOiSR.js +1 -0
  86. package/web/app/immutable/chunks/{DUbMVsk9.js → CS9nZ0mb.js} +1 -1
  87. package/web/app/immutable/chunks/{D9zIaPA4.js → CUE71p7a.js} +1 -1
  88. package/web/app/immutable/chunks/{DipTZipA.js → CVWwz1Ss.js} +1 -1
  89. package/web/app/immutable/chunks/{BCO6MiJi.js → CWsj4Hb7.js} +1 -1
  90. package/web/app/immutable/chunks/{XTW5roGp.js → CXfRSojK.js} +1 -1
  91. package/web/app/immutable/chunks/{Cq_g40U8.js → CYxt6gzD.js} +1 -1
  92. package/web/app/immutable/chunks/{BbUT7tLT.js → CdfbvT19.js} +1 -1
  93. package/web/app/immutable/chunks/{FkijJXdh.js → CeWx_dfN.js} +1 -1
  94. package/web/app/immutable/chunks/{loi-djHu.js → CeZGOup4.js} +1 -1
  95. package/web/app/immutable/chunks/{DsBP9KJQ.js → CfYmMj5F.js} +1 -1
  96. package/web/app/immutable/chunks/{CPOCLD3T.js → CgGsxeG7.js} +1 -1
  97. package/web/app/immutable/chunks/{ts9pKvJh.js → CgzHyieN.js} +1 -1
  98. package/web/app/immutable/chunks/{D_ht3M25.js → CheN8m7G.js} +1 -1
  99. package/web/app/immutable/chunks/{7-8cUxTO.js → Chj-azz7.js} +1 -1
  100. package/web/app/immutable/chunks/{DugE9z8T.js → Ci0dPfzv.js} +1 -1
  101. package/web/app/immutable/chunks/{D3lPsVN4.js → CiRuCsUo.js} +1 -1
  102. package/web/app/immutable/chunks/{lVUEwTET.js → CjPEI4fg.js} +1 -1
  103. package/web/app/immutable/chunks/{DUfqsoW8.js → CkTunFkP.js} +1 -1
  104. package/web/app/immutable/chunks/CmBouCgt.js +2 -0
  105. package/web/app/immutable/chunks/{WULeRaWs.js → Cmw8ZiCg.js} +1 -1
  106. package/web/app/immutable/chunks/{DJz92Kg0.js → Cn4A9AjR.js} +1 -1
  107. package/web/app/immutable/chunks/CndXvgyH.js +12 -0
  108. package/web/app/immutable/chunks/{C-9CUgEH.js → Cp1B7D7t.js} +2 -2
  109. package/web/app/immutable/chunks/{C4K5_BxH.js → Cp5royN1.js} +1 -1
  110. package/web/app/immutable/chunks/{Dz_XrTI6.js → CqqkIXTJ.js} +1 -1
  111. package/web/app/immutable/chunks/CrK7N1sc.js +1 -0
  112. package/web/app/immutable/chunks/{Bl0JLobe.js → CrpG0ldr.js} +1 -1
  113. package/web/app/immutable/chunks/{CONcCUKk.js → Crz8kvLc.js} +1 -1
  114. package/web/app/immutable/chunks/{DTxjOiRH.js → Ctp-YfoS.js} +3 -3
  115. package/web/app/immutable/chunks/{B0fKMUbz.js → CwEjDuJ3.js} +1 -1
  116. package/web/app/immutable/chunks/Cy--ZUaj.js +2 -0
  117. package/web/app/immutable/chunks/{BohdTsJs.js → CzFnnQhI.js} +1 -1
  118. package/web/app/immutable/chunks/{CWwM8FRm.js → CzJm3Kxa.js} +1 -1
  119. package/web/app/immutable/chunks/{pI1-Ias6.js → D-q3diCz.js} +7 -7
  120. package/web/app/immutable/chunks/{BfBRsDbv.js → D17rwSNZ.js} +1 -1
  121. package/web/app/immutable/chunks/{rarafMnz.js → D2McplNW.js} +1 -1
  122. package/web/app/immutable/chunks/{ekoFDkzg.js → D2YDfFKv.js} +1 -1
  123. package/web/app/immutable/chunks/{DnOdQmdW.js → D36a16oA.js} +2 -2
  124. package/web/app/immutable/chunks/{CvpYq92u.js → D3shmp0V.js} +1 -1
  125. package/web/app/immutable/chunks/{CLO80vIO.js → D3vsaFn3.js} +1 -1
  126. package/web/app/immutable/chunks/{fvo80nOp.js → D4d1iyeR.js} +1 -1
  127. package/web/app/immutable/chunks/{DqYxTMZw.js → D4ytz2EC.js} +1 -1
  128. package/web/app/immutable/chunks/{FUsdAFUM.js → D5dii3q-.js} +1 -1
  129. package/web/app/immutable/chunks/D63urNNT.js +1 -0
  130. package/web/app/immutable/chunks/{Du8gfHWh.js → D7QZQ0zf.js} +1 -1
  131. package/web/app/immutable/chunks/{CIlqNohY.js → D7b2VLAz.js} +1 -1
  132. package/web/app/immutable/chunks/{DthwyZkm.js → D8EdnE4r.js} +1 -1
  133. package/web/app/immutable/chunks/{D_jbKDL6.js → DBwApbzS.js} +1 -1
  134. package/web/app/immutable/chunks/{JNgcLoIR.js → DCFeaWgZ.js} +1 -1
  135. package/web/app/immutable/chunks/{BR5drfgy.js → DCLLUF6K.js} +1 -1
  136. package/web/app/immutable/chunks/{DwYVNqD8.js → DCs992HX.js} +1 -1
  137. package/web/app/immutable/chunks/DDVnHnMH.js +5 -0
  138. package/web/app/immutable/chunks/DFh0CfhB.js +1 -0
  139. package/web/app/immutable/chunks/{2KaAZLR-.js → DHz7ym-I.js} +1 -1
  140. package/web/app/immutable/chunks/{pXRM_ktM.js → DIPIWs2Q.js} +4 -4
  141. package/web/app/immutable/chunks/{Do_lk8OO.js → DJ9ILql1.js} +1 -1
  142. package/web/app/immutable/chunks/{BuPCiCZt.js → DM3Yrkkb.js} +1 -1
  143. package/web/app/immutable/chunks/{DnEc5FO1.js → DMrzeQEi.js} +1 -1
  144. package/web/app/immutable/chunks/{0PlO4O3i.js → DN-c0DDt.js} +1 -1
  145. package/web/app/immutable/chunks/{DPA7Wx7i.js → DOmB999d.js} +1 -1
  146. package/web/app/immutable/chunks/{C6aNGAOC.js → DQw0Iiac.js} +2 -2
  147. package/web/app/immutable/chunks/{B0Uv1AyY.js → DRND1Lha.js} +1 -1
  148. package/web/app/immutable/chunks/{CThyVptW.js → DRbQVjcG.js} +1 -1
  149. package/web/app/immutable/chunks/{BL19ZvCq.js → DUJ7Uicl.js} +5 -5
  150. package/web/app/immutable/chunks/DVsXJTH5.js +1 -0
  151. package/web/app/immutable/chunks/{Cr0pYxvG.js → DZKOpbCv.js} +1 -1
  152. package/web/app/immutable/chunks/{Dkwq1aon.js → DZOkhMcO.js} +1 -1
  153. package/web/app/immutable/chunks/{BYTf4lKv.js → DZz-0U7K.js} +1 -1
  154. package/web/app/immutable/chunks/{D66KCqXw.js → Da5bNPjQ.js} +1 -1
  155. package/web/app/immutable/chunks/{DX9jQ0PS.js → DaWmj23r.js} +1 -1
  156. package/web/app/immutable/chunks/{DmyX6ZHD.js → Dd-LQrG1.js} +1 -1
  157. package/web/app/immutable/chunks/{KlB4Fhnb.js → DdNhEgdc.js} +1 -1
  158. package/web/app/immutable/chunks/{CZU3aMzM.js → DfheqyY9.js} +1 -1
  159. package/web/app/immutable/chunks/{DH-IPuJJ.js → Dfp6ssYD.js} +1 -1
  160. package/web/app/immutable/chunks/{CFwpAHza.js → Di3tMG_J.js} +1 -1
  161. package/web/app/immutable/chunks/{gMSGQkcm.js → Dl8k4QUp.js} +1 -1
  162. package/web/app/immutable/chunks/{Cl88aId_.js → Dp7Hm0g0.js} +1 -1
  163. package/web/app/immutable/chunks/{BwGrKGev.js → DpCic98X.js} +1 -1
  164. package/web/app/immutable/chunks/{CahSXEZY.js → DqRvDwkX.js} +1 -1
  165. package/web/app/immutable/chunks/{KHaGo8p4.js → Dqi2LMpO.js} +2 -2
  166. package/web/app/immutable/chunks/{BgGvUY8M.js → DrF6vLLb.js} +1 -1
  167. package/web/app/immutable/chunks/{Cm3tXeMM.js → Dsyh_lG5.js} +1 -1
  168. package/web/app/immutable/chunks/{DjVRdKmG.js → DtXgUHCj.js} +1 -1
  169. package/web/app/immutable/chunks/{COujhQNX.js → DtluaQEg.js} +4 -4
  170. package/web/app/immutable/chunks/{BtXBr5gW.js → DuaPhBil.js} +1 -1
  171. package/web/app/immutable/chunks/{g0WwLJKD.js → DxyD9o0t.js} +1 -1
  172. package/web/app/immutable/chunks/{DbRN_fBN.js → GnUYJfg_.js} +1 -1
  173. package/web/app/immutable/chunks/HYdiaHV7.js +3 -0
  174. package/web/app/immutable/chunks/{wKnHEtxm.js → Jg5r77fy.js} +1 -1
  175. package/web/app/immutable/chunks/{yvk0NmWm.js → JrdZaYjT.js} +1 -1
  176. package/web/app/immutable/chunks/{ChgSqVu2.js → KZwZoyIt.js} +1 -1
  177. package/web/app/immutable/chunks/{CgXlgTpj.js → KnkAG0HD.js} +1 -1
  178. package/web/app/immutable/chunks/KvHDUk_b.js +2 -0
  179. package/web/app/immutable/chunks/{Csg_svg6.js → Ll0WtNFW.js} +1 -1
  180. package/web/app/immutable/chunks/{AuPnYXvq.js → Nthsb-68.js} +1 -1
  181. package/web/app/immutable/chunks/{B-DC5RDK.js → R-UFG3MB.js} +1 -1
  182. package/web/app/immutable/chunks/{Dre9I3wQ.js → R69_F6ow.js} +1 -1
  183. package/web/app/immutable/chunks/{B5XUeaKM.js → T6fchQhT.js} +2 -2
  184. package/web/app/immutable/chunks/{B5M97fab.js → T7iqVsMb.js} +1 -1
  185. package/web/app/immutable/chunks/{BhvXSFFd.js → TB9r2XJy.js} +2 -2
  186. package/web/app/immutable/chunks/{CS2-6GJW.js → TBtn8giw.js} +1 -1
  187. package/web/app/immutable/chunks/{DnebYpJB.js → X0RLj3lE.js} +1 -1
  188. package/web/app/immutable/chunks/Z2wqUYyr.js +2 -0
  189. package/web/app/immutable/chunks/{CdcEumin.js → Z4vtXCdu.js} +1 -1
  190. package/web/app/immutable/chunks/_UjuBCOJ.js +1 -0
  191. package/web/app/immutable/chunks/{klTuOngC.js → aZdb_rCN.js} +1 -1
  192. package/web/app/immutable/chunks/{D3tfczF3.js → dEPZ-XrU.js} +1 -1
  193. package/web/app/immutable/chunks/{CTDDNWu2.js → etz9IKpr.js} +1 -1
  194. package/web/app/immutable/chunks/{Bfu4Gbpb.js → fCCFSMRf.js} +3 -3
  195. package/web/app/immutable/chunks/{HA0DfJ2t.js → g-pOypvE.js} +1 -1
  196. package/web/app/immutable/chunks/{B4p5jAE9.js → gsePksRf.js} +1 -1
  197. package/web/app/immutable/chunks/{BM_biE0y.js → hgE6oWwa.js} +1 -1
  198. package/web/app/immutable/chunks/{sKA-ObYb.js → hkJYqn41.js} +1 -1
  199. package/web/app/immutable/chunks/{D5b9qBIq.js → i5FUlYpy.js} +1 -1
  200. package/web/app/immutable/chunks/{BfhtD4DE.js → iIsyEXfi.js} +1 -1
  201. package/web/app/immutable/chunks/k1pjOtcg.js +2 -0
  202. package/web/app/immutable/chunks/mq9vi3Up.js +4 -0
  203. package/web/app/immutable/chunks/{CSIMWELR.js → nfiajAfR.js} +1 -1
  204. package/web/app/immutable/chunks/{DREHsvwt.js → nxtepGjE.js} +1 -1
  205. package/web/app/immutable/chunks/{Db1LGTgG.js → oBc79yRV.js} +1 -1
  206. package/web/app/immutable/chunks/{CSKrS9aV.js → oEGQGYxq.js} +1 -1
  207. package/web/app/immutable/chunks/{CuL2i1ch.js → pfX_M-aK.js} +1 -1
  208. package/web/app/immutable/chunks/{DIdR5gOD.js → qWMP3EPi.js} +1 -1
  209. package/web/app/immutable/chunks/{Bm0gGnEs.js → qhd9g-fv.js} +1 -1
  210. package/web/app/immutable/chunks/{CPR6kk_T.js → qtHim0jP.js} +1 -1
  211. package/web/app/immutable/chunks/{B3Jjdo5U.js → s6Wn05Cg.js} +2 -2
  212. package/web/app/immutable/chunks/{CJubsryt.js → sQSEv8Vy.js} +5 -5
  213. package/web/app/immutable/chunks/{CihSsq_c.js → tCg_s90g.js} +1 -1
  214. package/web/app/immutable/chunks/{D3CypRQj.js → ublLekYt.js} +1 -1
  215. package/web/app/immutable/chunks/{BOROOVR9.js → uftNwUIw.js} +1 -1
  216. package/web/app/immutable/chunks/{BVaTfwe9.js → uvhZkGDU.js} +2 -2
  217. package/web/app/immutable/chunks/{DDeZr78m.js → vJJhwCPu.js} +1 -1
  218. package/web/app/immutable/chunks/{DkdNV_U4.js → vj8NdGWd.js} +1 -1
  219. package/web/app/immutable/chunks/{BmVm-Xb9.js → vpQRVk8F.js} +1 -1
  220. package/web/app/immutable/chunks/{Ojuc-F9K.js → wX0L7qir.js} +3 -3
  221. package/web/app/immutable/chunks/{B1B2tR2P.js → x0vz7jUI.js} +1 -1
  222. package/web/app/immutable/chunks/{D5a_4V3Z.js → xXDRZ4UR.js} +1 -1
  223. package/web/app/immutable/chunks/{GMS9kh4f.js → zA4TFq_E.js} +2 -2
  224. package/web/app/immutable/entry/app.Beuvfwpq.js +4 -0
  225. package/web/app/immutable/entry/start.dSf-uLxv.js +1 -0
  226. package/web/app/immutable/nodes/{0.CZkIfk8Y.js → 0.cL5zt7Bt.js} +1 -1
  227. package/web/app/immutable/nodes/{1.DsBryxJC.js → 1.Dj9s42wq.js} +1 -1
  228. package/web/app/immutable/nodes/{10.BouqyFdq.js → 10.CQpwV39P.js} +18 -18
  229. package/web/app/immutable/nodes/{11.DVteTP5Z.js → 11.ryjds32c.js} +4 -4
  230. package/web/app/immutable/nodes/{13.ptNmqZph.js → 13.jK1i4wo4.js} +1 -1
  231. package/web/app/immutable/nodes/{14.C60Y_MCU.js → 14.DdHtnE9x.js} +1 -1
  232. package/web/app/immutable/nodes/{15.vdYCFIAo.js → 15.ffzaVnT8.js} +1 -1
  233. package/web/app/immutable/nodes/{16.BHeY8GWk.js → 16.DFPLVaTv.js} +1 -1
  234. package/web/app/immutable/nodes/{17.De1hIcCz.js → 17.Dylz7DBe.js} +1 -1
  235. package/web/app/immutable/nodes/{18.CSiSULsM.js → 18.CxblUMg0.js} +1 -1
  236. package/web/app/immutable/nodes/{19.BzhIGKWf.js → 19.COuvk-IK.js} +2 -2
  237. package/web/app/immutable/nodes/{2.DrLLJODs.js → 2.CyeHTGza.js} +11 -11
  238. package/web/app/immutable/nodes/{20.C1njt326.js → 20.CXw8Twm7.js} +1 -1
  239. package/web/app/immutable/nodes/{3.CwnUfLZi.js → 3.Cli5S3q6.js} +1 -1
  240. package/web/app/immutable/nodes/{4.BKuWUXgs.js → 4.DnwVlUKb.js} +1 -1
  241. package/web/app/immutable/nodes/5.BBLKg00X.js +1 -0
  242. package/web/app/immutable/nodes/{6.B0Ra98Z1.js → 6.D_zrx8Je.js} +2 -2
  243. package/web/app/immutable/nodes/{7.fJBI0akH.js → 7.CbiG1FxN.js} +1 -1
  244. package/web/app/immutable/nodes/{8.CGqCPOoO.js → 8.BqucsZP2.js} +1 -1
  245. package/web/app/immutable/nodes/{9.D1ubXHAz.js → 9.YctElBWI.js} +4 -4
  246. package/web/app/version.json +1 -1
  247. package/web/index.html +12 -12
  248. package/web/app/immutable/chunks/66ia1joD.js +0 -5
  249. package/web/app/immutable/chunks/8HAvvSzV.js +0 -411
  250. package/web/app/immutable/chunks/AprTGyyw.js +0 -2
  251. package/web/app/immutable/chunks/B7eueH-o.js +0 -12
  252. package/web/app/immutable/chunks/BTlwEESv.js +0 -2
  253. package/web/app/immutable/chunks/BYLBGCLl.js +0 -1
  254. package/web/app/immutable/chunks/BZCMFrfO.js +0 -1
  255. package/web/app/immutable/chunks/BhyNZfPE.js +0 -2
  256. package/web/app/immutable/chunks/BnRr64jv.js +0 -1
  257. package/web/app/immutable/chunks/CCfiEL_H.js +0 -3
  258. package/web/app/immutable/chunks/CEFRvkrn.js +0 -2
  259. package/web/app/immutable/chunks/CFPxKCYR.js +0 -1
  260. package/web/app/immutable/chunks/CJDEvb-Q.js +0 -2
  261. package/web/app/immutable/chunks/CKQfIyvh.js +0 -1
  262. package/web/app/immutable/chunks/CLwSZ8qQ.js +0 -1
  263. package/web/app/immutable/chunks/CaF73o7d.js +0 -13
  264. package/web/app/immutable/chunks/CeQeE8PY.js +0 -1
  265. package/web/app/immutable/chunks/Cgj3WZRk.js +0 -1
  266. package/web/app/immutable/chunks/Csw_wMoM.js +0 -2
  267. package/web/app/immutable/chunks/CxkFheMN.js +0 -1
  268. package/web/app/immutable/chunks/DmkTrs6I.js +0 -2
  269. package/web/app/immutable/chunks/DypB-Dwi.js +0 -1
  270. package/web/app/immutable/chunks/lNtFAHH9.js +0 -4
  271. package/web/app/immutable/chunks/nRNuB5kp.js +0 -2
  272. package/web/app/immutable/chunks/oOxvDsoj.js +0 -6
  273. package/web/app/immutable/entry/app.BszOT5UA.js +0 -4
  274. package/web/app/immutable/entry/start.BtnupdoQ.js +0 -1
  275. package/web/app/immutable/nodes/5.DBOSwfI-.js +0 -1
@@ -1,13 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/oOxvDsoj.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/CLAmm_T1.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/BlDw7Cnz.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BBFoj-dS.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/BwNrQXlF.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/BhvXSFFd.js","/app/immutable/chunks/UTM5G-w-.js","/app/immutable/chunks/CcJmuwXr.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/BYLBGCLl.js","/app/immutable/chunks/DTxjOiRH.js","/app/immutable/chunks/Bm0gGnEs.js","/app/immutable/chunks/yofTuS8P.js","/app/immutable/chunks/BjE6fvlI.js","/app/immutable/chunks/C4fj9uDh.js","/app/immutable/assets/register.CUyDR59i.css","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/CQ409-Pj.js","/app/immutable/chunks/4o_ZQ4nq.js","/app/immutable/chunks/CPOCLD3T.js","/app/immutable/assets/terminal-manager.MhP_vFvK.css","/app/immutable/chunks/nxvUsKcZ.js","/app/immutable/chunks/CZkav0tO.js","/app/immutable/chunks/B3K7_JP4.js","/app/immutable/chunks/DPttSllj.js","/app/immutable/chunks/BwH4Bvte.js","/app/immutable/chunks/BFgvMDua.js","/app/immutable/chunks/B1CKzIA2.js","/app/immutable/chunks/Cu5e4npY.js","/app/immutable/chunks/CL3a4Hm1.js","/app/immutable/chunks/C6aNGAOC.js","/app/immutable/chunks/klTuOngC.js","/app/immutable/chunks/B9dzo0Kz.js","/app/immutable/chunks/CgXlgTpj.js","/app/immutable/chunks/AprTGyyw.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/CSKrS9aV.js","/app/immutable/chunks/DMxa_WW_.js","/app/immutable/chunks/BZljJ1HD.js","/app/immutable/chunks/cOfTiXUW.js","/app/immutable/chunks/DREHsvwt.js","/app/immutable/chunks/Dn334wJv.js","/app/immutable/chunks/CIbfGsF-.js","/app/immutable/chunks/Dz9x1eR4.js","/app/immutable/chunks/D9tVylVS.js","/app/immutable/chunks/CfNIzRu8.js","/app/immutable/chunks/DU3vNstz.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.DylRFR3N.css","/app/immutable/chunks/D4WPlvMg.js"])))=>i.map(i=>d[i]);
2
- import{JG as n,o7 as I,nZ as g,nY as k,ms as Z,r0 as Q,iq as ee,oe as Ce,mv as te,vX as He,jY as $e,D$ as Be,vs as Ve,qz as ze,mu as Ke,m7 as Je,aU as le,mh as Ye,mn as Xe,yI as Ze,GC as Qe,DZ as et,Af as tt,oc as st,mx as rt}from"./BlDw7Cnz.js";import{selectActiveWorkspaceIds as nt}from"./klTuOngC.js";import{b8 as V,b3 as se,cR as _,cU as ue,cC as at,dI as M,cx as ot,b4 as ct,cS as it,dD as lt,v as de,Z as ut,dF as dt,ch as pt,aw as mt,aG as ht,ao as ft,bQ as St,cO as gt,db as yt,cA as bt,bR as kt}from"./B3K7_JP4.js";import{x as wt}from"./CgXlgTpj.js";import{ag as It,cP as vt,aZ as _t,av as Ct,p as At}from"./BZljJ1HD.js";import{h as Rt}from"./oOxvDsoj.js";import{bm as p,_ as q}from"./CLAmm_T1.js";import{i as w}from"./CL3a4Hm1.js";import{I as Et}from"./Bqd7fdCF.js";import{L as P}from"./B-DC5RDK.js";import{ag as Tt,l as Pt,i as O,a9 as Ot,q as Wt}from"./DMxa_WW_.js";import{c as Nt}from"./ChTqQfQN.js";import{r as x}from"./uXuxG9cN.js";import{j as xt,u as Mt,n as Lt}from"./B9dzo0Kz.js";import{u as Dt}from"./4o_ZQ4nq.js";import{aq as Ut,p as Gt}from"./CZkav0tO.js";import{M as pe,O as me,h as Ae}from"./BhvXSFFd.js";import{d as jt,o as he,l as fe,s as Se}from"./CIyUrgF0.js";import{m as qt,p as Ft}from"./DYu0VnZ5.js";const ur=n.createSelector(e=>e.workspaceShare.open),dr=n.createSelector(e=>e.workspaceShare.workspaceId),pr=n.createSelector(e=>{const{open:t,workspaceId:s,session:r}=e.workspaceShare;return t&&s?{workspaceId:s,session:r}:null}),re=n.createSelector(e=>{const{open:t,workspaceId:s,withheld:r}=e.workspaceShare;return!t||!s||r||I(e.workspaceShare,s).inviteWithheld?!1:V.select(e,s)}),mr=n.createSelector(e=>e.workspaceShare.createRequest),hr=n.createSelector(e=>e.workspaceShare.mutationGeneration),fr=n.createSelector(e=>e.workspaceShare.workspaceTitle),Sr=n.createSelector(e=>g(e.workspaceShare.members)),gr=n.createSelector((e,t)=>k(e.workspaceShare.members,t)!==void 0),yr=n.createSelector(e=>e.workspaceShare.open&&e.workspaceShare.workspaceId&&!e.workspaceShare.withheld&&!I(e.workspaceShare,e.workspaceShare.workspaceId).inviteWithheld?g(e.workspaceShare.invites).filter(t=>t.workspaceId===e.workspaceShare.workspaceId):[]),br=n.createSelector(e=>{const{principals:t,members:s}=e.workspaceShare;return g(t).filter(r=>!k(s,r.principalId)&&(r.hostRole===void 0||r.hostRole==="guest"))}),kr=n.createSelector(e=>e.workspaceShare.guestCount),wr=n.createSelector(e=>e.workspaceShare.guestLimit),Ir=n.createSelector(e=>e.workspaceShare.loadStatus==="loading"),vr=n.createSelector(e=>e.workspaceShare.loadError),_r=n.createSelector(e=>e.workspaceShare.creating),Cr=n.createSelector(e=>e.workspaceShare.createError),Ar=n.createSelector(e=>e.workspaceShare.createdLink),Rr=n.createSelector(e=>e.workspaceShare.revokingInviteId),Er=n.createSelector(e=>e.workspaceShare.removingPrincipalId),Tr=n.createSelector(e=>e.workspaceShare.addingPrincipalId),Pr=n.createSelector(e=>e.workspaceShare.actionError),Or=n.createSelector((e,t)=>I(e.workspaceShare,t).loadStatus!=="idle"),Wr=n.createSelector((e,t)=>t?g(I(e.workspaceShare,t).members):[]),Nr=n.createSelector((e,t)=>!!t&&!I(e.workspaceShare,t).withheld&&V.select(e,t));n.createSelector((e,t)=>!!t&&I(e.workspaceShare,t).withheld);const xr=n.createSelector((e,t)=>t?I(e.workspaceShare,t).removingPrincipalId:null);n.createSelector((e,t)=>t?I(e.workspaceShare,t).removeError:null);const Mr=n.createSelector(e=>e.workspaceShare.integrationAuth),Lr=n.createSelector(e=>e.workspaceShare.ownerForgeMissing),z=n.createSelector(e=>re.select(e)&&se.select(e)&&e.workspaceShare.sharingContext!==null&&e.workspaceShare.sharingContext===_.select(e)),Ht=n.createSelector(e=>z.select(e)?e.workspaceShare.sharingEnabled:null),Dr=n.createSelector(e=>z.select(e)&&e.workspaceShare.sharingChecking),$t=n.createSelector(e=>z.select(e)&&e.workspaceShare.sharingEnabling),Bt=n.createSelector(e=>z.select(e)?e.workspaceShare.sharingError:null),Ur=n.createSelector(e=>{if(!re.select(e))return!1;const t=e.workspaceShare;return!t.integrationAuthLoaded||se.select(e)&&Ht.select(e)===null&&Bt.select(e)===null&&!$t.select(e)?!0:g(t.members).length===0&&(t.loadStatus==="idle"||t.loadStatus==="loading")}),Gr=n.createSelector(e=>re.select(e)&&!!e.workspaceShare.workspaceId&&(se.select(e)||(ge.select(e)?ge.select(e)===ue.select(e)?.principal.id:at.select(e,e.workspaceShare.workspaceId)))&&ue.select(e)?.capabilities.workspaceGuestRoles===!0),jr=n.createSelector(e=>e.workspaceShare.pendingRolePrincipalIds),qr=n.createSelector(e=>e.workspaceShare.roleErrors),ge=n.createSelector(e=>{const t=e.workspaceShare.workspaceId;return t?M.select(e,t)?.ownerPrincipalId??null:null}),Vt=n.createSelector(e=>{const t=_.select(e),s=nt.select(e);return{context:t,workspaceIds:t?s.filter(r=>V.select(e,r)):[]}}),Fr=n.createSelector((e,t)=>{const s=I(e.workspaceShare,t);return{context:s.inviteContext,generation:s.inviteGeneration,withheld:s.inviteWithheld}}),zt=[],Kt=n.createSelector((e,t)=>{const s=_.select(e),r=I(e.workspaceShare,t);if(!s||r.inviteContext!==s||r.inviteWithheld||!V.select(e,t))return zt;const a=e.presence?.context===s?e.presence.members[t]:void 0,o=new Set(a?g(a).flatMap(i=>i.identity?[JSON.stringify([i.identity.provider,i.identity.host.toLowerCase(),i.identity.externalUserId])]:[]):[]),c=new Set;return g(e.workspaceShare.invites).filter(i=>{if(i.workspaceId!==t||!i.pinLogin?.trim()||i.revokedAt||i.redeemedAt&&!i.reusable||!(Date.parse(i.expiresAt)>r.inviteReceivedAt))return!1;const l=i.pinIdentity??(i.pinGithubUserId!==void 0?{provider:"github",host:"github.com",externalUserId:String(i.pinGithubUserId)}:null);if(a&&i.redeemedByPrincipalId&&k(a,i.redeemedByPrincipalId))return!1;if(!l)return!0;const m=JSON.stringify([l.provider,l.host.toLowerCase(),l.externalUserId]);return o.has(m)||c.has(m)?!1:(c.add(m),!0)})}),Hr=n.createSelector(e=>{const s=Vt.select(e).workspaceIds.flatMap(r=>Kt.select(e,r).map(a=>Date.parse(a.expiresAt)));return s.length?Math.min(...s):null});function $r(e){return Object.entries(e).some(([t,s])=>s.available&&wt(t,s.authenticated))}const Br=n.createSelector(e=>e.hostRequirements.git),Vr=n.createSelector(e=>e.hostRequirements.node),zr=n.createSelector(e=>e.hostRequirements.gh),Kr=n.createSelector(e=>e.hostRequirements.checking),Jr=n.createSelector(e=>e.hostRequirements.hasCheckedOnce);function Re(e){const t=e.gitlabAuth?.statusFailed===!0;return It({labsEnabled:e.userPreferences?.labsPlainFolderWorkspacesEnabled===!0,protocolVersion:e.daemonHealth?.stats?.protocolVersion,githubConnected:e.githubAuth?.isAuthenticated===!0,githubSettled:e.githubAuth?.statusSettled===!0,githubFailed:e.githubAuth?.statusFailed===!0,gitlabConnected:e.gitlabAuth?.isConfigured===!0,gitlabSettled:e.gitlabAuth?.statusReady===!0||t,gitlabFailed:t})}const Yr=n.createSelector(Re),Jt=n.createSelector(e=>!ot.select(e)),Xr=n.createSelector(e=>(e.hostRequirements.node.ok||!Jt.select(e))&&(e.hostRequirements.git.available||Re(e))),Zr=n.createSelector(e=>{const t=e.hostRequirements.providerCli;return t?{context:t.context,warnings:g(t.warnings)}:void 0}),Qr="22.0.0";function Yt(e){return e.length>15?`${e.slice(0,15)}…`:e}function H(e){return e.name?.trim()||Yt(e.clientId)}function en(e){const{eligibleClients:t,ownClientId:s,driving:r,pinnedClientId:a}=e,o=t.find(l=>l.clientId===s&&l.connected),c=r!==null&&!r.connected,i=!r||r.clientId===s;return{mode:c?"offline":i?"here":"elsewhere",hostName:r?H(r):o?H(o):"",canSwitchHere:!!(o&&a!==s)}}const tn=n.createSelector(e=>e?.browserClients?.ownClientId??null),sn=n.createSelector(e=>e?.browserClients?.ownClientIdConfirmed===!0);n.createSelector(e=>g(e.browserClients.liveClients));const rn=n.createSelector((e,t)=>t?e?.browserClients?.byWorkspaceId[t]?.liveClientsLoaded??!1:e?.browserClients?.liveClientsLoaded??!1);n.createSelector((e,t)=>k(e.browserClients.liveClients,t));const nn=n.createSelector((e,t)=>(e?.browserClients?.byWorkspaceId[t]??Z).browserClient),an=n.createSelector((e,t)=>{const s=e?.browserClients?.byWorkspaceId[t];return s?.pinnedClientId!==void 0||s?.browserClient!=null});function X(e){const t=e.prettyHostname??e.hostname??e.name;return{clientId:e.clientId,...t!==void 0?{name:t}:{},connected:!0}}const on=n.createSelector((e,t)=>{const s=e?.browserClients??Q,r=s.byWorkspaceId[t]?.liveClients??ee(),a=g(r).filter(y=>y.capabilities.browserExec===!0).map(X),o=(s.byWorkspaceId[t]??Z).browserClient,c=s.byWorkspaceId[t],i=c?.pinnedClientId!==void 0?c.pinnedClientId:o?.source==="workspace"?o.clientId:null,l=i===null?Rt(o):void 0;let m=null;if(o?.resolved){const y=k(r,o.resolved.clientId);m=y?X(y):{...o.resolved,connected:!0}}else o?.source==="workspace"?m={clientId:o.clientId,connected:!1}:l&&(m={clientId:l.clientId,connected:!1});return{eligibleClients:a,ownClientId:s.ownClientId??"",routedVia:o?.source==="default"?l?.via:void 0,driving:m,pinnedClientId:i}}),cn=n.createSelector((e,t)=>{const s=e?.browserClients??Q;if(!s.ownClientId||!s.ownClientIdConfirmed)return!1;const r=s.byWorkspaceId[t]?.liveClients??ee(),a=k(r,s.ownClientId);return a!==void 0&&a.capabilities.browserExec!==!0}),ln=n.createSelector((e,t,s)=>{const r=e?.browserClients??Q,a=s?r.byWorkspaceId[s]?.liveClients??ee():r.liveClients,o=s?r.byWorkspaceId[s]?.liveClientsLoaded:r.liveClientsLoaded,c=k(a,t);return c?{name:H(X(c)),connected:!0}:{name:H({clientId:t}),connected:!o}}),un=n.createSelector((e,t)=>(e?.browserClients?.byWorkspaceId[t]??Z).tabsRevision),dn=n.createSelector(e=>Object.entries(e.browserClients?.byWorkspaceId??{}).filter(([,t])=>Object.keys(t.consumers??{}).length>0).map(([t])=>t)),N=new Map;function pn(e,t){return N.set(e,t),()=>{N.get(e)===t&&N.delete(e)}}async function mn(e){const t=N.get(e);return t?t():null}function hn(e){N.delete(e)}const Ee="From repo config",fn="repo-config";function Sn(e,t){return t==="repo-config"?p.workspace_setupScriptEditor_fromRepoConfig_name():t==="custom"?p.workspace_setupScriptEditor_custom_name():e}function Te(e){if(!e||typeof e!="object"||Array.isArray(e))return{setupScript:null};const t=e.setupScript;return{setupScript:typeof t=="string"&&t.trim().length>0?t:null}}function Xt(e){let t;try{t=JSON.parse(e)}catch{return null}return Te(t).setupScript}async function gn(e){if(!e)return null;try{const t=await w(Et.SETUP_SCRIPTS.READ_REPO_CONFIG,{repoPath:e}),s=t?.success?t.data?.content:null;return typeof s=="string"?Xt(s):null}catch{return null}}async function yn(e,t,s){if(!e||!t)return null;try{const{appClient:r}=await q(async()=>{const{appClient:o}=await import("./oOxvDsoj.js").then(c=>c.s);return{appClient:o}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22]),import.meta.url),a=await r.integrations.githubRepoConfig(e,t,s);return Te(a.config).setupScript}catch{return null}}function bn(e){const t=e.setupScript.trim();return t?e.setupScriptNameSource==="repo-config"&&e.setupScriptName===Ee&&e.repoConfigScriptRepo===e.repoPath&&t===(e.repoConfigScript??"").trim()?void 0:t:e.explicitChoice?"cd .":void 0}function kn(e){const{repoConfigScript:t,lastUsed:s,genericTemplate:r}=e;return t?{content:t,name:Ee,source:"repo-config"}:s?{content:s.content,name:s.nameSource==="repo-config"?"Custom":s.name,source:s.nameSource==="repo-config"?"custom":s.nameSource??"named"}:r?{content:r.content,name:r.name,source:"named"}:{content:"",name:"Custom",source:"custom"}}const Pe="setup-scripts:last-used-by-repo",Oe="setup-scripts:recent-by-repo",$=20,We=10,Zt=["repo-config","custom","named"];function ne(e,t){return t?`${e}\0${t}`:e}function Ne(e){if(!e||typeof e!="object"||Array.isArray(e))return!1;const t=e;return typeof t.name=="string"&&typeof t.content=="string"&&t.content.trim().length>0&&typeof t.usedAt=="string"&&(t.nameSource===void 0||Zt.includes(t.nameSource))}function B(){try{const e=localStorage.getItem(Pe);if(!e)return{};const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t))return{};const s={};for(const[r,a]of Object.entries(t))r&&Ne(a)&&(s[r]=a);return s}catch{return{}}}function xe(){try{const e=localStorage.getItem(Oe);if(!e)return{};const t=JSON.parse(e);if(!t||typeof t!="object"||Array.isArray(t))return{};const s={};for(const[r,a]of Object.entries(t)){if(!r||!Array.isArray(a))continue;const o=a.filter(Ne);o.length>0&&(s[r]=o)}return s}catch{return{}}}function Qt(e,t){return e.name===t.name&&(e.nameSource??"named")===(t.nameSource??"named")&&e.content.trim()===t.content.trim()}function Me(e){return[...e].sort((t,s)=>s.usedAt.localeCompare(t.usedAt))}function Le(e){const t=[];for(const s of e)t.some(r=>Qt(r,s))||t.push(s);return t}function wn(e,t){if(!e)return[];const s=ne(e,t),r=xe()[s]??[],a=B()[s];return Le(Me(a?[...r,a]:r)).slice(0,We).map(c=>({name:c.name,content:c.content,nameSource:c.nameSource??"named",usedAt:c.usedAt}))}function es(e,t,s){try{const r=xe(),a=r[e]??(s?[s]:[]);r[e]=Le([t,...Me(a)]).slice(0,We);const o=Object.entries(r);o.length>$&&(o.sort(([,c],[,i])=>i[0].usedAt.localeCompare(c[0].usedAt)),o.length=$),localStorage.setItem(Oe,JSON.stringify(Object.fromEntries(o)))}catch{}}function In(e,t){if(!e)return;const s=B()[ne(e,t)];return s?{name:s.name,content:s.content,nameSource:s.nameSource??"named"}:void 0}function vn(e,t,s){const r=t.content.trim();if(!e||!r)return;const a=ne(e,s),o={name:t.name,content:r,usedAt:new Date().toISOString(),nameSource:t.nameSource??"named"};es(a,o,B()[a]);try{const c=B();c[a]=o;const i=Object.entries(c);i.length>$&&(i.sort(([,l],[,m])=>m.usedAt.localeCompare(l.usedAt)),i.length=$),localStorage.setItem(Pe,JSON.stringify(Object.fromEntries(i)))}catch{}}const ts={async isAuthenticated(e){try{return await w(P.IS_AUTHENTICATED,...e===void 0?[]:[{workspaceId:e}])}catch{return!1}},async getAuthState(e=!1,t){try{return await w(P.GET_AUTH_STATE,e,...t===void 0?[]:[{workspaceId:t}])}catch{return{isAuthenticated:!1,requiresDaemonAuth:!0}}},async getStatus(e){try{return await w(P.GET_STATUS,...e===void 0?[]:[{workspaceId:e}])}catch{return{isConfigured:!1,oauthUrl:""}}},async fetchMyIssues(e="assigned",t){return(await this.fetchMyIssuesPage(e,t===void 0?void 0:{workspaceId:t})).issues},async fetchMyIssuesPage(e="assigned",t){try{return await w(P.FETCH_MY_ISSUES,e,t)}catch{return{issues:[],nextToken:null}}},async searchIssues(e,t){return(await this.searchIssuesPage(e,t===void 0?void 0:{workspaceId:t})).issues},async searchIssuesPage(e,t){try{return await w(P.SEARCH_ISSUES,e,t)}catch{return{issues:[],nextToken:null}}}},_n=Object.freeze(Object.defineProperty({__proto__:null,linearAuthClient:ts},Symbol.toStringTag,{value:"Module"})),v={IS_AUTHENTICATED:"sentry-auth:is-authenticated",SAVE_CONFIG:"sentry-auth:save-config",GET_AUTH_STATE:"sentry-auth:get-auth-state",LOGOUT:"sentry-auth:logout",FETCH_PROJECTS:"sentry-auth:fetch-projects",FETCH_ISSUES:"sentry-auth:fetch-issues",SEARCH_ISSUES:"sentry-auth:search-issues",GET_ISSUE:"sentry-auth:get-issue"},ss={async isAuthenticated(e){try{return await w(v.IS_AUTHENTICATED,...e===void 0?[]:[{workspaceId:e}])}catch{return!1}},async saveConfig(e,t){return await w(v.SAVE_CONFIG,{organization:e,apiToken:t})},async getAuthState(e){try{return await w(v.GET_AUTH_STATE,...e===void 0?[]:[{workspaceId:e}])}catch{return{isAuthenticated:!1}}},async logout(){await w(v.LOGOUT)},async fetchProjects(e){try{return await w(v.FETCH_PROJECTS,...e===void 0?[]:[{workspaceId:e}])}catch{return[]}},async fetchIssues(e){return(await this.fetchIssuesPage(e)).issues},async fetchIssuesPage(e){try{return await w(v.FETCH_ISSUES,e)}catch{return{issues:[],nextToken:null}}},async searchIssues(e,t){return(await this.searchIssuesPage(e,t)).issues},async searchIssuesPage(e,t,s){try{return await w(v.SEARCH_ISSUES,{query:e,project:t,...s})}catch{return{issues:[],nextToken:null}}},async getIssue(e,t){try{return await w(v.GET_ISSUE,e,...t===void 0?[]:[{workspaceId:t}])}catch{return null}}},Cn=Object.freeze(Object.defineProperty({__proto__:null,sentryAuthClient:ss},Symbol.toStringTag,{value:"Module"})),ae=n.createSelector(e=>{const t=_.select(e);return!t||!ct.select(e)?null:JSON.stringify([t,e.hostExecution.generation,e.repositoryCheckout.authorityGeneration,e.gitlabAuth.host,e.gitlabAuth.instanceBaseUrl,e.gitlabAuth.statusReady,e.gitlabAuth.isConfigured,e.gitlabAuth.user])}),K=n.createSelector((e,t)=>k(e.repositoryCheckout.forms,t)??null),An=n.createSelector((e,t)=>{const s=K.select(e,t);return s?.admission===ae.select(e)&&s.status==="ready"?g(s.projects):[]}),Rn=n.createSelector((e,t)=>{const s=K.select(e,t);return s?.admission===ae.select(e)&&s.status==="ready"?g(s.branches):[]}),rs=n.createSelector((e,t)=>{const s=K.select(e,t);return!s||s.status!=="ready"||s.admission!==ae.select(e)||!s.capture||!s.project||!s.branch?null:{checkoutId:s.capture.checkoutId,revision:s.capture.revision,projectPath:s.project.projectPath,branch:s.branch.name,commitSha:s.branch.commitSha,mode:s.mode}}),En=n.createSelector((e,t)=>{const s=rs.select(e,t);return!!s&&(s.mode==="direct"||K.select(e,t)?.warmStatus==="ready")}),Tn="__new-workspace__",Pn="__initializer__",On="compact-workspace-initializer-state-prompt",Wn="onboarding-prompt",U=20*1024*1024,ye=Nt("NewWorkspaceDraft");function Nn(e,t){if(e.length>U)return ye.warn("Draft text exceeds the size guard; skipping persistence",{textLength:e.length,limit:U}),null;const s=Tt(t);if(s.length===0)return{text:e};const r=[];let a=e.length+2,o=0;for(const c of s){const i=JSON.stringify(c).length+1;if(a+i>U){o+=1;continue}r.push(c),a+=i}return o>0&&ye.warn("Draft attachments exceed the size guard; persisting the ones that fit",{limit:U,attachmentCount:s.length,droppedCount:o}),r.length>0?{text:e,attachments:r}:{text:e}}const ns="host.providerAuthStatus";function as(e={}){const t={};return e.workspaceId&&(t.workspaceId=e.workspaceId),typeof e.providerId=="string"&&e.providerId.length>0&&(t.providerId=e.providerId),typeof e.force=="boolean"&&(t.force=e.force),t}function os(e,t){const s=t.toLowerCase(),r=e.toLowerCase();return s.startsWith(r)?/^(['’]s\s+organization)?$/.test(s.slice(r.length)):!1}function cs(e){const{email:t,orgName:s}=e??{};return t&&s?os(t,s)?t:`${t} · ${s}`:t||s||void 0}function is(e){const t={};for(const s of e?.providers??[]){const r={authenticated:s.authenticated??void 0},a=cs(s.identity);a!==void 0&&(r.authDetails=a),s.identity?.email&&(r.email=s.identity.email),t[s.id]=r}return t}const ls=6e4,R=new Map,G=new Map,A=new Map;let F=0,De=0;const us=e=>JSON.stringify([it.select(n.state),De,e.workspaceId??null,e.providerId??"*"]);function ds(e){if(e.method!=="events.event"||!e.params)return;const t=e.params,r=(t.event&&typeof t.event=="object"?t.event:t).type;return typeof r=="string"?r:void 0}function J(e){if(F+=1,e)for(const t of R.keys()){const[,,,s]=JSON.parse(t);(s===e||s==="*")&&R.delete(t)}else R.clear()}typeof pe=="function"&&pe(e=>{["provider:auth-changed","host:execution-context-changed"].includes(ds(e)??"")&&J()});typeof me=="function"&&me(()=>{De+=1,J()});function ps(e={}){const t=us(e);if(e.force)J(e.providerId);else{const o=R.get(t);if(o&&o.expiresAt>Date.now())return Promise.resolve(o.verdicts);o&&R.delete(t)}const s=G.get(t);if(!e.force&&s?.generation===F)return s.promise;if(s){const o=A.get(t);if(o)return o.force||=e.force===!0,o.promise;let c;const i=s.promise.catch(()=>({})).then(()=>(A.get(t)===c&&A.delete(t),ps({...e,force:c.force}))).finally(()=>{A.get(t)===c&&A.delete(t)});return c={force:e.force===!0,promise:i},A.set(t,c),i}const r=F,a=Ae(ns,as(e)).then(is).then(o=>(r===F&&R.set(t,{verdicts:o,expiresAt:Date.now()+ls}),o)).finally(()=>{G.get(t)?.promise===a&&G.delete(t)});return G.set(t,{generation:r,promise:a}),a}function xn(e,t){return e.name?.trim()?e.name.trim():e.kind==="workspace"?e.id&&e.id!=="default"?p.workspace_discussion_conversation_title():p.workspace_discussion_title():e.participants.filter(r=>r.principalId!==t).map(r=>r.displayName||r.login||p.workspace_discussion_unknownAuthor_label()).join(", ")||p.workspace_discussion_group_title()}const ms=n.createSelector((e,t,s)=>{const r=Ce(e.repositoryContext,t);return s!==null&&r.binding===s?r:null});n.createSelector((e,t,s)=>{const r=ms.select(e,t.workspaceId,s);return r?.status==="ready"?k(r.roots,x(t))?.context:void 0});const Mn=n.createSelector((e,t)=>{if(t.admission===null||_.select(e)!==t.admission)return null;const s=Ce(e.repositoryContext,t.workspaceId),r=s.ownership;return!r||r.demandId!==t.demandId||r.admission!==t.admission||r.request.workspaceId!==t.workspaceId?null:{status:s.status,scope:s.scope,revision:s.revision,roots:s.status==="ready"?g(s.roots).map(a=>a.context):[],unavailableReason:s.unavailableReason}}),Ln=n.createSelector((e,t)=>{if(t.admission===null||_.select(e)!==t.admission)return null;const s=e.repositoryContext.selectionEdits,r=s?k(s,t.editId):void 0;return r&&r.status!=="closed"&&r.owner.admission===t.admission&&x(r.owner.root)===x(t.root)?r:null}),Dn=n.createSelector((e,t)=>{const s=e.repositoryContext.selectionEdits;return!!s&&g(s).some(r=>r.owner.root.workspaceId===t&&r.owner.admission===_.select(e)&&(r.status==="capturing"||r.status==="pending"&&(!r.observation||r.observation.attempt?.status==="pending")))}),Un=n.createSelector((e,t)=>{if(t.admission===null||_.select(e)!==t.admission||t.hostContext===null||lt.select(e,t.root.workspaceId)!==t.hostContext)return null;const s=e.repositoryContext.nativeReviewAttempts,r=s?k(s,t.attemptId):void 0;return r&&r.status!=="closed"&&r.owner.admission===t.admission&&r.owner.hostContext===t.hostContext&&x(r.owner.root)===x(t.root)?r:null}),Gn=n.createSelector((e,t)=>e.repositoryContext.nativeReviewAttempts?k(e.repositoryContext.nativeReviewAttempts,t):void 0),be={auggie:"npm install -g @augmentcode/auggie","claude-code":"curl -fsSL https://claude.ai/install.sh | bash",codex:"npm i -g @openai/codex",opencode:"curl -fsSL https://opencode.ai/install | bash",droid:"curl -fsSL https://app.factory.ai/cli | sh",grok:"npm i -g @xai-official/grok",cursor:"curl https://cursor.com/install -fsS | bash",cortex:"curl -LsS https://ai.snowflake.com/static/cc-scripts/install.sh | sh"};function jn(e){return Object.hasOwn(be,e)?be[e]:void 0}const hs=["venv",".venv","virtualenv","node_modules","google-cloud-sdk","__pycache__",".pytest_cache",".mypy_cache",".ruff_cache",".tox",".nox"];function fs(e){return e.replace(/\\/g,"/").split("/").filter(t=>t.length>0&&t!==".")}function Ss(e){const t=new Set(hs);return fs(e).some(s=>t.has(s))}const gs=new Set(["lastActivity","statusMessage","statusImageAssetId"]),ys=new Set([".git",".playwright-cli",".svelte-kit",".vite",".turbo",".cache",".parcel-cache",".next",".nuxt",".output","build","coverage","dist","playwright-report","target","test-results"]);function bs(e){return e.replace(/\\/g,"/").split("/").filter(t=>t.length>0&&t!==".")}function ks(e){if(!e.type.startsWith("file:"))return null;const t=e.data,s=t?.relativePath??t?.path??t?.filePath;return typeof s=="string"&&s.length>0?s:null}function ws(e){const t=ks(e);return!t||Ss(t)?!1:!bs(t).some(s=>ys.has(s))}function Is(e){if(e.type==="workspace:displayStatus-changed")return!0;if(e.type!=="workspace:updated")return!1;const t=e.data;if(!t?.changes||typeof t.changes!="object"||Array.isArray(t.changes))return!1;const s=Object.keys(t.changes).filter(r=>r!=="workspaceId");return s.length>0&&s.every(r=>gs.has(r))}function h(e){return typeof e=="string"?e.trim():""}function E(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:{}}function ke(e){const t=E(e.data),s=h(t.agentId)||h(e.sessionId),r=h(t.messageId);return s&&r?JSON.stringify([s,r]):""}function vs(e){const t=E(e.data),s={workspaceId:e.workspaceId,closable:!0},r=a=>a?{...s,type:"note",noteId:a,title:h(t.title)||h(t.noteTitle)||p.layout_tabTypes_note_title()}:null;switch(e.type){case"note:created":case"note:updated":case"comment:added":case"comment:resolved":return r(h(t.noteId));case"task:status-changed":return r(h(t.noteId)||h(t.linkedNoteId));case"spec:updated":case"goal:updated":return r("spec");case"agent:created":case"agent:renamed":case"agent:restored":case"agent:updated":case"agent:message":case"agent:user-message:sent":{const a=h(t.agentId)||h(e.sessionId);return a?{...s,type:"agent",agentId:a,title:h(t.agentName)||p.layout_tabTypes_agent_title()}:null}case"file:changed":{const a=h(t.path)||h(t.relativePath);return a&&t.action!=="delete"?{...s,type:"file",filePath:a,title:a.split(/[\\/]/).pop()||a}:null}case"git:commit":{const a=h(t.commit),o=h(t.gitRootId);return a?{...s,type:"changes",title:p.layout_tabTypes_changes_title(),data:{commitHash:a,...o?{gitRootId:o}:{}}}:null}default:return null}}function we(e,t){const s=E(e.data),r=Object.fromEntries(Object.entries(s).filter(([,c])=>typeof c=="string")),a=c=>t?p.workspace_peopleActivity_actorAction_label({name:t,action:c}):c;switch(e.type){case"note:created":case"note:updated":case"note:deleted":case"spec:updated":case"goal:updated":return O({...e,actor:{...e.actor,name:t},data:r});case"agent:created":case"agent:renamed":case"agent:deleted":case"agent:restored":case"git:commit":case"git:push":case"git:pull":case"git:branch":case"git:merge":return a(O({...e,actor:{...e.actor,name:void 0},data:r}));case"agent:updated":return h(s.modelId)||s.completionReportCleared===!0?a(O({...e,actor:{...e.actor,name:void 0},data:s})):null;case"file:changed":return ws(e)?O({...e,actor:{...e.actor,name:t},data:{path:h(s.path)||h(s.relativePath),action:h(s.action)}}):null;case"comment:added":return t?p.events_activity_authorCommented_label({author:t}):p.workspace_peopleActivity_commented_label();case"comment:resolved":return s.resolved===!1?a(p.events_activity_reopenedCommentThread_label()):s.resolved===!0?a(p.events_activity_resolvedCommentThread_label()):null;case"agent:message":case"agent:user-message:sent":{const c=h(s.agentName)||h(s.toAgentName);return a(c?p.workspace_peopleActivity_messagedAgent_label({agent:c}):p.workspace_peopleActivity_sentMessage_label())}case"task:status-changed":return a(O({...e,actor:{...e.actor,name:void 0},data:{taskName:h(s.taskName)||h(s.noteTitle),newStatus:h(s.newStatus)||h(s.status)}}));case"workspace:created":return a(p.events_activity_createdWorkspace_label());case"workspace:updated":{if(Is(e))return null;const c=E(s.changes);if(Object.keys(c).filter(l=>l!=="workspaceId").length===0)return null;const i=h(c.title);return a(i?p.events_activity_renamedWorkspaceTo_label({title:i}):p.events_activity_updatedWorkspace_label())}default:return null}}function W(e,t){const s=h(e);return s===t||/^(user|you|system|unknown|anonymous|local user)$/i.test(s)?"":s}function _s(e,t,s,r){const a=new Map(s.map(u=>[u.principalId,u])),o=new Map;for(const u of t){if(u.workspaceId!==e||u.type!=="agent:last-message")continue;const d=E(u.data),f=de({role:d.role==="user"?"user":"system",author:d.author,metadata:d.metadata}),S=ke(u);if(!f||!S||typeof d.lastUserMessage!="string")continue;const b=Pt({id:h(d.messageId),role:"user",timestamp:u.timestamp,contentBlocks:[{type:"text",text:d.lastUserMessage}],author:f,metadata:d.metadata},r);b&&o.set(S,b)}const c=new Set,i=new Set,l=[];let m=0;for(const u of t){if(u.workspaceId!==e||!h(u.id)||c.has(u.id))continue;const d=Date.parse(u.timestamp);if(!Number.isFinite(d)){m++;continue}const f=E(u.data),S=u.type==="agent:message",b=S?de({role:f.role==="user"?"user":"system",author:f.author,metadata:f.metadata}):null;if(S?!b:u.actor?.type!=="user"){S&&f.role==="user"&&u.actor?.type==="user"&&ut(f.metadata)&&l.push({row:null,timestamp:d,segment:m});continue}const Fe=S?h(f.messageId):"",T=S?ke(u):"";if(T&&i.has(T))continue;const C=h(u.actor?.id),Y=C?a.get(C):void 0,L=b?W(b.displayName,b.principalId??"")||W(b.login,b.principalId??""):W(u.actor.name,C)||W(Y?.displayName,C)||W(Y?.login,C),ce=we(u,"");if(!ce)continue;if(!L){l.push({row:null,timestamp:d,segment:m});continue}const D=S?o.get(T)??null:null,ie=D?p.workspace_peopleActivity_actorAction_label({name:L,action:D}):we(u,L);ie&&(c.add(u.id),T&&i.add(T),l.push({timestamp:d,segment:m,row:{id:u.id,name:L,principalId:b?h(b.principalId)||null:C||null,avatarUrl:b?b.avatarUrl:Y?.avatarUrl??null,label:ie,actionLabel:D??ce,continuation:!1,timestamp:u.timestamp,destination:vs(u),messageId:Fe||null,messagePreview:D}}))}l.sort((u,d)=>d.timestamp-u.timestamp);const y=[];for(const[u,d]of l.entries()){if(!d.row)continue;const f=l[u-1],S=f?f.timestamp-d.timestamp:NaN;d.row.continuation=!!(d.row.principalId&&f?.row?.principalId===d.row.principalId&&f.segment===d.segment&&Number.isFinite(S)&&S>=0&&S<=15*6e4),y.push(d.row)}return y}const qn=n.createSelector(e=>e.workspaceEvents.subscriptionAttempt),Fn=n.createSelector(e=>e.workspaceEvents.subscriptionGeneration),Cs=n.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??te).events),Hn=n.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??te).nextToken),$n=n.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]?.peopleRequestId??null)!==null),Bn=n.createSelector((e,t)=>e.workspaceEvents.byWorkspaceId[t]?.peopleError??null),Vn=n.createSelector((e,t)=>e.workspaceEvents.byWorkspaceId[t]?.peopleInitialized??!1),Ue=n.createSelector((e,t)=>(e.workspaceEvents.byWorkspaceId[t]??te).peopleStreams),zn=n.createSelector((e,t)=>Object.values(Ue.select(e,t)).every(s=>s.initialized&&s.nextToken===null)),Kn=n.createSelector((e,t,s)=>{const r=Cs.select(e,t),o=_s(t,r,vt.select(e,t),M.select(e,t)?.ownerPrincipalId)[s-1]?.timestamp,c=Ue.select(e,t);return["user","message"].filter(i=>{const l=c[i];if(!l.initialized)return!0;if(l.nextToken===null)return!1;const m=r.find(y=>y.id===l.oldestEventId)?.timestamp;return!o||!m||!(Date.parse(m)<=Date.parse(o))})});function Jn(e,t=e,s="default",r,a){if(!Dt.select(n.state))return;const o=a??xt.select(n.state,t)??Mt.select(n.state,t)[0];if(!o)return;const c=Lt.select(n.state,t,o),i={type:"discussion",title:r??(s==="new"?p.workspace_discussion_new_title():p.workspace_discussion_title()),workspaceId:e,closable:!0,data:{conversationId:s}},l=c?.tabs.find(m=>He(m,i));s==="new"&&n.dispatch($e(e)),n.dispatch(l?Be(t,l.id,o):Ve(t,i,o,void 0,!0,void 0,!0))}const Yn=n.createSelector((e,t)=>{const s=[],r=new Set,a=new Set,o=c=>{const i=c.block.attachmentId??c.id;if(!r.has(i)){if(!c.block.attachmentId&&c.block.data&&!c.block.dataTruncated){const l=`${c.block.mimeType}/${c.block.data}`;if(a.has(l))return;a.add(l)}r.add(i),s.push(c)}};for(const[c,i]of Object.entries(Ot.select(e,t)))for(const l of g(i))l.imageData&&l.imageMimeType?o({id:`draft/${c}/${l.id}`,name:l.label,block:{type:"image",data:l.imageData,mimeType:l.imageMimeType}}):l.type==="file"&&(l.attachmentId||l.placementStatus)&&o({id:`draft/${c}/${l.id}`,name:l.label,placementStatus:l.placementStatus,block:{type:l.attachmentMimeType?.startsWith("image/")?"image":"file",attachmentId:l.attachmentId,mimeType:l.attachmentMimeType,fileName:l.label,size:l.attachmentSize}});for(const c of dt.select(e,t)){const i=pt.select(e,c),l=[...mt.select(e,c),...ht.select(e,c)];for(const m of l)if(m.role==="user")for(const[y,u]of(m.contentBlocks??[]).entries()){if(u.type!=="image"&&!Wt(u))continue;const d=u.id?i?.[ze(m.id,u.id)]:void 0,f=d?.status==="loaded"?d.block:u;o({id:`${c}/${m.id}/${u.id??y}`,name:f.fileName,block:f,agentId:c,messageId:m.id,hydration:d})}}return s}),As=n.createSelector((e,t)=>e.context.byWorkspaceId[t]??Ke),Rs=n.createSelector((e,t)=>g(As.select(e,t).items)),Xn=n.createSelector((e,t)=>Rs.select(e,t).filter(s=>!s.parentNoteId)),Zn=n.createSelector((e,t)=>e.agentLock.byWorkspaceId[t]?.lockedAgentIds??Ge),Qn=n.createSelector((e,t)=>e.agentLock.byWorkspaceId[t]?.lockedFilePaths??Ge),Ge={},ea=n.createSelector((e,t,s)=>{const r=e.gitWrite.byWorkspaceId[t]?.operations;return r?k(r,s):void 0}),je=n.createSelector((e,t)=>{const s=e.gitWrite.byWorkspaceId[t]?.operations;return s?g(s):[]}),ta=n.createSelector((e,t)=>je.select(e,t).some(s=>s.status==="queued"||s.status==="running")),sa=n.createSelector((e,t)=>je.select(e,t).filter(s=>s.operation.kind==="partialCommit"&&(s.status==="queued"||s.status==="running")));function Ie(e){return e.title||`PR #${e.number}`}const oe=n.createSelector((e,t)=>{const s=e.gitRoots?.byWorkspaceId?.[t];return s?g(s.gitRoots):[]});function Es(e){return{key:"primary",isPrimary:!0,path:e.worktreePath??e.path,branch:e.branch,repoOwner:e.repositoryOwner,repoName:e.repositoryName,prNumber:e.prNumber,prUrl:e.prUrl,prStatus:e.prStatus,pullRequests:e.pullRequests}}function Ts(e){return{key:e.id,isPrimary:!1,path:e.path,branch:e.branch,repoOwner:e.repoOwner,repoName:e.repoName,prNumber:e.prNumber,prUrl:e.prUrl,prStatus:e.prStatus,pullRequests:e.pullRequests,gitRoot:e}}const ra=n.createSelector((e,t)=>{const s=M.select(e,t),r=oe.select(e,t).map(Ts);return s?[Es(s),...r]:r}),na=n.createSelector((e,t)=>oe.select(e,t).length>0),aa=n.createSelector(e=>Object.entries(e.gitRoots?.byWorkspaceId??{}).filter(([,t])=>Object.keys(t.consumers??{}).length>0).map(([t])=>t)),Ps=n.createSelector((e,t,s)=>k((e.acceptWorkflow.byWorkspaceId[t]??Je).operations,s)),oa=n.createSelector((e,t,s)=>Ps.select(e,t,s)?.status==="running"),ca=n.createSelector((e,t)=>e.acceptWorkflow.byWorkspaceId[t]?.mergeDrawerOpen??!1),ia=n.createSelector((e,t)=>{const s=ft.select(e,t)?.hasRemote??!1,r=M.select(e,t)?.pullRequests?.some(a=>a.status===le.Open||a.status===le.Draft)??!1;return{squash:!1,viaPR:s&&r,pushAfter:s,...e.acceptWorkflow.byWorkspaceId[t]?.mergeOptions}}),la=n.createSelector(e=>Object.keys(e.acceptWorkflow.byWorkspaceId).filter(t=>e.acceptWorkflow.byWorkspaceId[t].observerRequested)),ua=n.createSelector((e,t)=>{const s=M.select(e,t),r=St.select(e,t),a=gt.select(e,t),o=s?.repositoryOwner&&s.repositoryName?`${s.repositoryOwner}/${s.repositoryName}`:void 0,c=_t(Ct(s?.pullRequests,s?.activePullRequest,(i,l)=>At(i,s?.repositoryOwner,s?.repositoryName,l),Ie,o),yt.select(e,t),o,oe.select(e,t),Ie).own;return{visible:(e.acceptWorkflow.byWorkspaceId[t]?.consumerCount??0)>0,ready:kt.select(e,t),owner:!bt.select(e,t),authenticated:Ut.select(e),pushedCount:r.filter(i=>i.isPushed).length,hasRemote:a.hasRemote,clearReset:a.hasResetToTrunk&&c.some(i=>i.status!=="merged"),clearMerge:!!(a.mergeHeadSha&&r[0]?.hash&&a.mergeHeadSha!==r[0].hash)}}),da=n.createSelector((e,t,s)=>e.bgExecutor?.byWorkspaceId[t]?.executors[s]??Ye),Os=n.createSelector((e,t)=>e.prWorkflow.byWorkspaceId[t]??Xe);n.createSelector((e,t,s)=>Os.select(e,t).operations[s]);const pa=n.createSelector(e=>Object.keys(e.noteReadTracking.unreadNoteIds)),ma=n.createSelector(e=>e.noteReadTracking.readRecords),Ws="host.providerTestPrompt",Ns=jt("ok",[he({ok:fe(!0)}).passthrough(),he({ok:fe(!1),reason:Se().min(1),message:Se()}).passthrough()]),xs=3e5;async function ha(e){const t=await Ae(Ws,{providerId:e.providerId,...e.model?{model:e.model}:{}},{timeoutMs:xs}),s=Ns.parse(t);return(s.ok||s.reason==="auth-required")&&J(e.providerId),s}const Ms=-1,Ls=/^remote-script-lost:\s*/,Ds=["idle","starting","running","restarting","exited"],ve=e=>!!e&&typeof e=="object"&&!Array.isArray(e),_e=e=>typeof e=="string"&&e.trim().length>0;function Us(e){return ve(e)&&_e(e.remoteAgentId)&&_e(e.nodeId)&&ve(e.runtime)&&Ds.includes(e.runtime.status)}function fa(e){return Array.isArray(e.machineRuns)?e.machineRuns.filter(Us):[]}function Sa(e,t,s){const r=qt(e.nodeId,s)??{nodeId:e.nodeId,name:p.remoteAgent_location_unknownMachine(),platform:null,state:"ready"};if(s&&s.id===e.nodeId)return r;const a=t?.nodeId===e.nodeId?t:null;return{...r,name:a?.nodeName?.trim()||r.name,platform:Ft(a?.placement?.os,a?.placement?.arch)}}function Gs(e){return e.status==="exited"&&e.exitCode===Ms}function js(e){const t=e.error?.trim().replace(Ls,"").trim();switch(t){case"the machine disconnected":return p.scripts_remote_lostDisconnected_label();case"the machine was removed":return p.scripts_remote_lostRemoved_label();case"the agent was deleted":return p.scripts_remote_lostAgentDeleted_label();case"the agent was stopped for good":return p.scripts_remote_lostAgentStopped_label();default:return t||p.scripts_remote_lostReason_fallback()}}function ga(e){if(Gs(e))return{kind:"lost",label:p.scripts_remote_lost_tooltip({reason:js(e)})};const t=Gt(e);switch(t){case"running":return{kind:t,label:p.terminal_quakeOverlay_status_running()};case"restarting":return{kind:t,label:p.workspace_devScripts_restarting_label()};case"idle":return{kind:t,label:p.terminal_quakeOverlay_status_idle()};case"succeeded":return{kind:t,label:p.terminal_quakeOverlay_status_exitedZero()};case"failed":return{kind:t,label:p.terminal_quakeOverlay_status_errorCode({code:e.exitCode??1})};case"stopped":return{kind:t,label:p.terminal_quakeOverlay_status_stoppedSignal({signal:(e.exitCode??128)-128})};default:return{kind:t,label:p.terminal_quakeOverlay_status_exited()}}}const j=e=>typeof e=="string"&&e.length>0,qs=/\bremote-script-agent-ending:/;function ya(e){return!!e&&qs.test(e)}function ba(e){if(!e||typeof e!="object")return null;const t=e.data;if(!t||typeof t!="object")return null;const s=t,r=e instanceof Error&&e.message?{message:e.message}:{};return s.code==="machine-update-required"?{success:!1,code:"machine-update-required",update:s.update==="backend"?"backend":"machine",...j(s.machineVersion)?{machineVersion:s.machineVersion}:{},...j(s.backendVersion)?{backendVersion:s.backendVersion}:{},...r}:s.code==="machine-unreachable"?{success:!1,code:"machine-unreachable",attempts:Array.isArray(s.attempts)?s.attempts.flatMap(o=>{const c=o??{};return j(c.route)&&j(c.error)?[{route:c.route,error:c.error}]:[]}):[],...r}:null}function ka(e){const s=e.filter(a=>a.runtime.status==="running"&&a.runtime.detectedUrl?.trim()).sort((a,o)=>(o.runtime.startedAt??"").localeCompare(a.runtime.startedAt??""))[0],r=s?.runtime.detectedUrl?.trim();return!s||!r?null:{scriptId:s.id,name:s.name,url:r}}const Fs={status:"idle",error:null},Hs=n.createSelector((e,t)=>e.workspaceLifecycle.loadByWorkspaceId[t]??Fs);n.createSelector((e,t)=>Hs.select(e,t).error);const wa=n.createSelector((e,t)=>k(e.workspace.workspaces,t)??e.workspace.pendingCreations[t]),qe=n.createSelector((e,t)=>e.workspaceLifecycle.sessionPhaseByWorkspaceId[t]),$s=e=>e==="hydrated"||e==="live",Ia=n.createSelector((e,t)=>{const s=qe.select(e,t);return s==="hydrated"||s==="live"}),va=n.createSelector(e=>{const t=e.workspaceLifecycle.sessionPhaseByWorkspaceId;return Object.keys(t).filter(s=>$s(t[s]))}),_a=n.createSelector((e,t)=>qe.select(e,t)==="live");function Ca(e){const{selectedProviderId:t,activeProviderId:s,recommitActive:r,dispatch:a}=e;if(!t)return;const o=s&&Ze(s)===t?s:t;if(!(!r&&o===s))return a(Qe({providerId:t,enabled:!0})),a(et(o)),a(tt()),t}function Aa(e){const t=[];for(const s of e){let r={};if(s.metadata)try{r=JSON.parse(s.metadata)}catch{}const a=[];if(a.push(`[${s.identifier}] ${s.title}`),s.url&&a.push(`URL: ${s.url}`),s.description&&a.push(`
3
- Description:
4
- ${s.description}`),r.state&&a.push(`Status: ${r.state}`),r.teamName&&a.push(`Team: ${r.teamName}`),r.priority!==void 0){const o=["No priority","Urgent","High","Medium","Low"];a.push(`Priority: ${o[r.priority]||r.priority}`)}r.assignee&&a.push(`Assignee: ${r.assignee}`),t.push({type:s.itemType||"unknown",provider:s.provider,identifier:s.identifier,title:s.title,url:s.url,content:a.join(`
5
- `),metadata:r})}return t}function Ra(e){const t=[];for(const s of e){if(s.type!=="file")continue;let r=s.meta?.fullPath||s.meta?.path||"";if(!r&&s.id?.startsWith("file-")){const a=s.id.slice(5);(a.startsWith("/")||/^[A-Za-z]:/.test(a))&&(r=a)}if(!r&&s.uri)if(s.uri.startsWith("devspace://file/"))try{r=decodeURIComponent(s.uri.slice(16))}catch{}else s.uri.startsWith("file:")&&(r=s.uri.slice(5));r||(r=s.label||s.meta?.name||""),t.push({type:"file",path:r,title:s.label})}return t}async function Ea(e,t){const s=[];for(const r of e){if(r.type==="terminal")try{const{terminalManager:a}=await q(async()=>{const{terminalManager:l}=await import("./DTxjOiRH.js").then(m=>m.b);return{terminalManager:l}},__vite__mapDeps([23,3,2,18,19,12,8,0,1,4,5,6,7,9,10,11,13,14,15,16,17,20,21,22,24,25,26,27,28,29,30,31,32,33]),import.meta.url),o=r.meta?.workspaceId||"",c=r.id??"",i=await a.getBufferContent(c,o);i&&s.push({type:"terminal",content:i,title:r.label,metadata:{terminalName:r.label,terminalId:c}})}catch(a){t?.warn("[OnboardingContext] Failed to read terminal buffer:",a)}if(r.type==="script")try{const{selectScriptById:a,selectScriptRuntime:o}=await q(async()=>{const{selectScriptById:S,selectScriptRuntime:b}=await import("./nxvUsKcZ.js");return{selectScriptById:S,selectScriptRuntime:b}},__vite__mapDeps([34,4,5,3,6,7,8,9,2,10,11,12,35,36,37,38,39,15,16,40,21,13,14,17,31,41,42,19,18,43,44,22,45,46,1,47,48]),import.meta.url),{readScriptContextOutputLines:c}=await q(async()=>{const{readScriptContextOutputLines:S}=await import("./CSKrS9aV.js");return{readScriptContextOutputLines:S}},__vite__mapDeps([49,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,50,36,37,38,39,40,31,41,51,35,42,43,44,45,46,47,48,52,53,54,55,56,57,58,59,60,61,62,34]),import.meta.url),i=r.meta?.workspaceId||"",l=r.id??"",m=n.state,y=await c(m,i,l),u=a.select(m,i,l),d=o.select(m,i,l);let f=`Script: ${u?.name||r.label}
6
- `;if(f+=`Command: ${u?.command||"unknown"}
7
- `,f+=`Status: ${d.status}`,d.exitCode!==null&&d.exitCode!==void 0&&(f+=` (exit code: ${d.exitCode})`),f+=`
8
- `,d.detectedUrl&&(f+=`URL: ${d.detectedUrl}
9
- `),y.length>0){const S=y.slice(-100).join(`
10
- `);f+=`
11
- Output (last ${Math.min(y.length,100)} lines):
12
- ${S}`}else f+=`
13
- No output yet.`;s.push({type:"script",content:f,title:u?.name||r.label,metadata:{scriptId:l,command:u?.command,status:d.status,exitCode:d.exitCode,detectedUrl:d.detectedUrl}})}catch(a){t?.warn("[OnboardingContext] Failed to resolve script context:",a)}}return s}function Ta(e){const t=e.find(r=>r.type==="linear-issue");if(!t)return;const s=t.metadata??{};return{id:s.id??t.identifier??"",identifier:t.identifier??"",title:t.title??"",description:s.description,url:t.url,teamName:s.teamName,teamKey:s.teamKey,state:s.state,priority:s.priority}}function Pa(e){const t=e.find(r=>r.type==="sentry-issue");if(!t)return;const s=t.metadata??{};return{id:s.id??t.identifier??"",shortId:t.identifier??"",title:t.title??"",culprit:s.culprit,permalink:t.url||s.permalink,projectSlug:s.projectSlug,projectName:s.projectName,level:s.level,status:s.status,count:s.count,firstSeen:s.firstSeen,lastSeen:s.lastSeen}}function Oa(e,t){if(!e||e.length===0)return[];const s=new Map;for(const a of e){if(!a.repositoryPath)continue;const o=a.repositoryPath,c=s.get(o),i=st(a),l=i>0?new Date(i).toISOString():a.updatedAt,m=c&&Date.parse(c.updatedAt)||0;(!c||i>m)&&s.set(o,{path:a.repositoryPath,name:a.repositoryName||a.repositoryPath.split("/").pop()||"Unknown",updatedAt:l,owner:a.repositoryOwner})}const r=Array.from(s.values()).sort((a,o)=>o.updatedAt.localeCompare(a.updatedAt));return t!==void 0?r.slice(0,t):r}const Wa=n.createSelector((e,t)=>(e.workspaceSettings.byWorkspaceId[t]??rt).autoCommitEnabled),Na=n.createSelector(e=>Object.keys(e.workspaceSettings.byWorkspaceId));export{ln as $,Sa as A,ga as B,Jn as C,Aa as D,Ra as E,Ea as F,jn as G,vn as H,pn as I,hn as J,en as K,Wn as L,Qr as M,Pn as N,bn as O,ns as P,mn as Q,fn as R,v as S,ha as T,fa as U,ua as V,la as W,oa as X,Xr as Y,Wa as Z,dn as _,On as a,Mr as a$,ae as a0,Rn as a1,En as a2,K as a3,An as a4,rs as a5,Rs as a6,qn as a7,Fn as a8,da as a9,cn as aA,Os as aB,zn as aC,Bn as aD,Vn as aE,$n as aF,Ue as aG,Kn as aH,Zr as aI,ma as aJ,Mn as aK,Ln as aL,Dn as aM,Na as aN,Pr as aO,Tr as aP,re as aQ,Gr as aR,Cr as aS,mr as aT,Ar as aU,_r as aV,ur as aW,Ur as aX,kr as aY,wr as aZ,gr as a_,zr as aa,sa as ab,Yr as ac,Br as ad,aa as ae,oe as af,ea as ag,ta as ah,na as ai,Kr as aj,Jr as ak,Ia as al,_a as am,rn as an,Zn as ao,Qn as ap,ca as aq,ia as ar,va as as,Un as at,Gn as au,Jt as av,Vr as aw,Hn as ax,tn as ay,sn as az,Tn as b,br as b0,yr as b1,vr as b2,Ir as b3,Sr as b4,hr as b5,Lr as b6,ge as b7,jr as b8,Er as b9,xr as bA,Or as bB,ss as bC,Cn as bD,Sn as bE,Te as bF,Rr as ba,qr as bb,Dr as bc,Ht as bd,$t as be,Bt as bf,pr as bg,dr as bh,fr as bi,Xn as bj,pa as bk,nn as bl,an as bm,un as bn,Yn as bo,on as bp,Cs as bq,ra as br,Fr as bs,wa as bt,Hs as bu,Hr as bv,Vt as bw,Kt as bx,Nr as by,Wr as bz,Ee as c,Nn as d,as as e,kn as f,Ca as g,xn as h,Ta as i,Pa as j,yn as k,gn as l,In as m,Ie as n,_s as o,ps as p,Oa as q,wn as r,ka as s,$r as t,J as u,ya as v,Gs as w,ts as x,_n as y,ba as z};
@@ -1 +0,0 @@
1
- import{n as i}from"./AprTGyyw.js";import{o as n}from"./CFwpAHza.js";import{m as o,JG as a,EA as s,vq as r,v0 as f}from"./BlDw7Cnz.js";async function h(t,e){if(!(!t||!e)){if(t===o){await i("/"),a.dispatch(s(e)),a.dispatch(r("chief"));return}await n(t)&&a.dispatch(f(t,{agentId:e}))}}export{h as n};
@@ -1 +0,0 @@
1
- import{g as t}from"./YqTahsxp.js";import{JG as r}from"./BlDw7Cnz.js";import{aK as o}from"./C6aNGAOC.js";function l(e){return!e||t().status!=="connected"?null:o.select(r.state,e)}export{l as resolveConnectedWorkspaceKeySlot};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/Psr77Z1X.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/oOxvDsoj.js","/app/immutable/chunks/CLAmm_T1.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/BlDw7Cnz.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BBFoj-dS.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/BwNrQXlF.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/BhvXSFFd.js","/app/immutable/chunks/UTM5G-w-.js","/app/immutable/chunks/CcJmuwXr.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/BYLBGCLl.js","/app/immutable/chunks/B3K7_JP4.js","/app/immutable/chunks/DPttSllj.js","/app/immutable/chunks/BwH4Bvte.js","/app/immutable/chunks/BFgvMDua.js","/app/immutable/chunks/B1CKzIA2.js","/app/immutable/chunks/4o_ZQ4nq.js","/app/immutable/chunks/Cu5e4npY.js","/app/immutable/chunks/B0Z-1lwJ.js","/app/immutable/chunks/AprTGyyw.js","/app/immutable/chunks/DKwAaLwd.js","/app/immutable/chunks/CFwpAHza.js"])))=>i.map(i=>d[i]);
2
- import{bm as c,_ as p}from"./CLAmm_T1.js";import{m as I}from"./cOfTiXUW.js";import"./3SdAC2_C.js";import"./CcJmuwXr.js";import"./BwNrQXlF.js";import{Q as A}from"./BhvXSFFd.js";import"./ChTqQfQN.js";import"./Dz9x1eR4.js";import{m as L,JG as d,vJ as g,vL as v}from"./BlDw7Cnz.js";import{a9 as R}from"./B3K7_JP4.js";import{selectCurrentWorkspaceTabId as P}from"./klTuOngC.js";const F="intent://local/note/{note-id}",S="intent://local/{workspace-id}/note/{note-id}";function f(){return c.ui_linkHandler_invalidFormat_error({shortFormat:F,longFormat:S})}class u extends Error{constructor(r){super(r),this.name="NotFoundError"}}function W(e){try{const r=new URL(e.replace("intent://","http://")),t=r.hostname,n=r.pathname.replace(/^\/+/,"").split("/").filter(l=>l.length>0),a=e.replace("intent://","").split(/[?#]/)[0].split("/").slice(1);if(!t||n.length<2)return{type:"unknown",orgId:t||"",resourceId:"",valid:!1,error:f()};let o,s,i,_,w;if(a[0]==="workspace"&&(a.length===2||a.length===3&&a[2]==="")){const l=O(a[1]);if(!l)return{type:"unknown",orgId:t,resourceId:"",valid:!1,error:f()};o=l,s="workspace",i=l}else if(a[0]==="file")s="file",i=m(a.slice(1));else if(a.length>=3&&k(a[0])&&a[1]==="file")o=a[0],s="file",i=m(a.slice(2));else if(a.length===5&&a[1]==="agent"&&a[3]==="message"&&k(a[0])&&k(a[2])&&k(a[4])&&n.length===5&&n[1]==="agent"&&n[3]==="message")o=n[0],s="message",_=n[2],i=n[4];else if(n[0]==="note"||n[0]==="task")s=n[0],i=n[1];else if(n.length>=3&&(n[1]==="note"||n[1]==="task"))o=n[0],s=n[1],i=n[2];else return{type:"unknown",orgId:t,resourceId:"",valid:!1,error:f()};if(!i||i.trim().length===0)return{type:"unknown",orgId:t,resourceId:"",valid:!1,error:c.ui_linkHandler_emptyResourceId_error()};if(s==="note"||s==="task")return{type:s,orgId:t,workspaceId:o,resourceId:i,valid:!0};if(s==="file"){const l=/^#L\d+(?:-\d+|C\d+)?$/.test(r.hash)?r.hash:"",E=a.slice(o?2:1).join("/"),h=A(E+l);return i=m(h.path.split("/")),w=h.line,H(i)?{type:"file",orgId:t,workspaceId:o,resourceId:i,...w!==void 0?{line:w}:{},valid:!0}:{type:"unknown",orgId:t,workspaceId:o,resourceId:"",valid:!1,error:c.ui_linkHandler_invalidFilePath_error()}}return s==="workspace"&&o?{type:"workspace",orgId:t,workspaceId:o,resourceId:i,valid:!0}:s==="message"&&o&&_?{type:"message",orgId:t,workspaceId:o,resourceId:i,agentId:_,valid:!0}:{type:"unknown",orgId:t,workspaceId:o,resourceId:i,valid:!1,error:c.ui_linkHandler_unknownResourceType_error({type:s})}}catch(r){return{type:"unknown",orgId:"",resourceId:"",valid:!1,error:r instanceof Error?r.message:c.ui_linkHandler_parseFailed_error()}}}function m(e){return e.map(r=>decodeURIComponent(r)).join("/")}function H(e){return/^[A-Za-z]:/.test(e)?!1:e.split(/[\\/]/).every(t=>t.length>0&&t!=="."&&t!=="..")}const j=new Set([L,"new"]);function O(e){if(e===void 0||!k(e))return null;const r=decodeURIComponent(e);return j.has(r)?null:r}function k(e){let r;try{r=decodeURIComponent(e)}catch{return!1}return r.length>0&&r!=="."&&r!==".."&&!/[\\/]/.test(r)}async function T(e,r={}){if(!e.startsWith("intent://"))return!1;const t=W(e);if(!t.valid)return I.error(c.ui_linkHandler_invalidLink_title(),{description:t.error||c.ui_linkHandler_invalidLink_description()}),!0;try{switch(t.type){case"note":case"task":await N(t,r);break;case"file":await b(t,r);break;case"workspace":await C(t.resourceId);break;case"message":{const{openMessage:n}=await p(async()=>{const{openMessage:a}=await import("./Psr77Z1X.js");return{openMessage:a}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34]),import.meta.url);await n({workspaceId:t.workspaceId,agentId:t.agentId,messageId:t.resourceId});break}default:I.error(c.ui_linkHandler_unsupportedLink_title(),{description:c.ui_linkHandler_unsupportedLink_description({type:t.type})})}}catch(n){n instanceof u?I.error(c.ui_linkHandler_notFound_title(),{description:n.message}):I.error(c.ui_linkHandler_navigationFailed_title(),{description:n instanceof Error?n.message:c.ui_linkHandler_unknownError_label()})}return!0}function Q(e,r){return R(e,r)}function Z(){return async(e,r,t)=>{const a=t.target.closest("a");return a?.href?.startsWith("intent://")?(t.preventDefault(),await T(a.href)):!1}}async function C(e){const{appClient:r}=await p(async()=>{const{appClient:a}=await import("./oOxvDsoj.js").then(o=>o.s);return{appClient:a}},__vite__mapDeps([3,1,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,2,20,21,22,23]),import.meta.url);if(!await r.workspaces.get(e).catch(()=>null))throw new u(c.workspace_loader_notFound_title());const{openAndShowWorkspace:n}=await p(async()=>{const{openAndShowWorkspace:a}=await import("./CFwpAHza.js").then(o=>o.s);return{openAndShowWorkspace:a}},__vite__mapDeps([34,7,5,6,8,9,10,11,4,12,13,14,32,33]),import.meta.url);await n(e)}async function N(e,r){const t=r.workspaceId??P.select(d.state)??void 0;if(e.workspaceId){const a=!t||e.workspaceId!==t;if(!await y(e.workspaceId,e.resourceId))throw new u(c.ui_linkHandler_noteNotFound_error({noteId:e.resourceId,workspaceId:e.workspaceId}));if(a){const{openAndShowWorkspace:s}=await p(async()=>{const{openAndShowWorkspace:i}=await import("./CFwpAHza.js").then(_=>_.s);return{openAndShowWorkspace:i}},__vite__mapDeps([34,7,5,6,8,9,10,11,4,12,13,14,32,33]),import.meta.url);await s(e.workspaceId,{query:{note:e.resourceId}})}else d.dispatch(v(e.workspaceId,e.resourceId,{openInAdjacentPanel:r.openInAdjacentPanel??!1,openInNewAdjacentPanel:r.openInNewAdjacentPanel??!1,sourcePanelId:r.sourcePanelId}));return}if(!t)throw new u(c.ui_linkHandler_noSpaceOpen_error());if(!await y(t,e.resourceId))throw new u(c.ui_linkHandler_noteNotFoundCurrent_error({noteId:e.resourceId}));d.dispatch(v(t,e.resourceId,{openInAdjacentPanel:r.openInAdjacentPanel??!1,openInNewAdjacentPanel:r.openInNewAdjacentPanel??!1,sourcePanelId:r.sourcePanelId}))}async function b(e,r){const t=r.workspaceId??P.select(d.state)??void 0;if(e.workspaceId){const n=!t||e.workspaceId!==t;if(n){const{openAndShowWorkspace:a}=await p(async()=>{const{openAndShowWorkspace:o}=await import("./CFwpAHza.js").then(s=>s.s);return{openAndShowWorkspace:o}},__vite__mapDeps([34,7,5,6,8,9,10,11,4,12,13,14,32,33]),import.meta.url);if(!await a(e.workspaceId))return}d.dispatch(g(e.workspaceId,e.resourceId,{filePathIsLiteral:!0,...e.line!==void 0?{line:e.line}:{},openInAdjacentPanel:n?!1:r.openInAdjacentPanel??!1,sourcePanelId:n?void 0:r.sourcePanelId}));return}if(!t)throw new u(c.ui_linkHandler_noSpaceOpen_error());d.dispatch(g(t,e.resourceId,{filePathIsLiteral:!0,...e.line!==void 0?{line:e.line}:{},openInAdjacentPanel:r.openInAdjacentPanel??!1,sourcePanelId:r.sourcePanelId}))}async function y(e,r){try{const{backendRequest:t}=await p(async()=>{const{backendRequest:o}=await import("./BhvXSFFd.js").then(s=>s.j);return{backendRequest:o}},__vite__mapDeps([15,4,5,14,10,16,13,17,11,18,19]),import.meta.url),n=await t("note.get",{workspaceId:e,noteId:r}),a=n&&typeof n=="object"&&"note"in n?n.note:n;return a!=null&&typeof a=="object"}catch{return!1}}export{u as NotFoundError,Z as createIntentLinkClickHandler,Q as generateNoteLink,T as handleIntentLink,W as parseIntentLink};
@@ -1 +0,0 @@
1
- var De=Object.defineProperty;var Ce=(i,s,e)=>s in i?De(i,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[s]=e;var E=(i,s,e)=>Ce(i,typeof s!="symbol"?s+"":s,e);import{K as Le,P as ce,a6 as le,as as z,aC as ve}from"./pXRM_ktM.js";import{b_ as we,c_ as ue,cq as de,cp as be}from"./BZljJ1HD.js";import{JG as p,Cf as Fe,bJ as ke,i as Ge,LL as me,ir as Ee,bV as Pe,Eb as H,CE as xe,fl as Ve,AK as Ue,e3 as fe,fh as _e,e2 as he,Bd as Be,Lp as $e,wx as Xe}from"./BlDw7Cnz.js";import{aO as Se,dX as ge,A as K,P as Re,aK as Q}from"./B3K7_JP4.js";import{h as qe}from"./BhvXSFFd.js";import{c as W}from"./ChTqQfQN.js";import{a as We}from"./BdWqymET.js";import{m as j}from"./cOfTiXUW.js";import"./3SdAC2_C.js";import{bm as n}from"./CLAmm_T1.js";import"./CcJmuwXr.js";import"./BwNrQXlF.js";import"./Dz9x1eR4.js";import{R as pe}from"./B5aYN90J.js";import{L as Ye}from"./CSiaiLHL.js";function ze(i,s){return i.some(e=>e.id===s.id)?i.map(e=>e.id===s.id?{...s,...s.author==null&&e.author!==void 0?{author:e.author}:{}}:e):[...i,s]}const Te="confirmUnslothModelSwitch";function He(i){if(!i||typeof i!="object")return!1;const{agentId:s,agentName:e,workspaceId:t,workspaceTitle:r}=i;return typeof s=="string"&&typeof e=="string"&&typeof t=="string"&&(r===null||typeof r=="string")}function Ke(i){for(let s=i,e=0;s&&e<4;e++){const t=s.data;if(t&&typeof t=="object"){const{code:r,currentModel:a,requestedModel:l,agents:o}=t;if(r==="unsloth-model-switch-confirmation-required"&&typeof a=="string"&&typeof l=="string"&&Array.isArray(o)&&o.every(He))return{currentModel:a,requestedModel:l,agents:o}}s=s.cause}}function bt(i){if(!i||!(Te in i))return i;const{[Te]:s,...e}=i;return Object.keys(e).length>0?e:void 0}const Z=typeof performance<"u"?performance:{now:()=>Date.now()},V=new We("PerformanceOptimizer"),w=class w{constructor(){E(this,"metricsBuffer");E(this,"metricsIndex",0);E(this,"metricsCount",0);E(this,"MAX_METRICS",500);E(this,"TARGET_RESPONSE_TIME",100);E(this,"memoCache",new Map);E(this,"MEMO_TTL",6e4);E(this,"MAX_CACHE_SIZE",100);E(this,"cacheHits",0);E(this,"cacheMisses",0);E(this,"pendingRequests",new Map);E(this,"requestQueue",[]);E(this,"cleanupInterval",null);this.metricsBuffer=new Array(this.MAX_METRICS).fill(null),this.startCacheCleanup(),V.info("PerformanceOptimizer initialized")}static getInstance(){return w.instance||(w.instance=new w),w.instance}reset(){this.metricsBuffer=new Array(this.MAX_METRICS).fill(null),this.metricsIndex=0,this.metricsCount=0,this.memoCache.clear(),this.pendingRequests.clear(),this.requestQueue=[],this.cacheHits=0,this.cacheMisses=0}clearCache(){this.memoCache.clear(),this.cacheHits=0,this.cacheMisses=0}async processBatch(s,e,t={}){const{batchSize:r=10,concurrency:a=4}=t,l=[];for(let o=0;o<s.length;o+=r){const _=s.slice(o,o+r).map((c,R)=>{const g=Math.floor(R/a)*10;return new Promise(d=>{setTimeout(async()=>{const k=await e(c);d(k)},g)})}),u=await Promise.all(_);l.push(...u)}return l}startCacheCleanup(){this.cleanupInterval=setInterval(()=>{this.cleanupCache()},3e4)}stopCacheCleanup(){this.cleanupInterval&&(clearInterval(this.cleanupInterval),this.cleanupInterval=null)}cleanupCache(){const s=Date.now(),e=[];this.memoCache.forEach((t,r)=>{s-t.timestamp>this.MEMO_TTL&&e.push(r)}),e.forEach(t=>this.memoCache.delete(t)),this.memoCache.size>this.MAX_CACHE_SIZE&&Array.from(this.memoCache.entries()).sort((a,l)=>a[1].hits-l[1].hits||a[1].timestamp-l[1].timestamp).slice(0,this.memoCache.size-this.MAX_CACHE_SIZE).forEach(([a])=>this.memoCache.delete(a))}async track(s,e,t={}){const r=Z.now();try{const a=t.cacheKey||s;if(t.memoize){const _=this.getMemoized(a);if(_!==void 0)return this.cacheHits++,V.debug("Memoized result used",{operation:s,cacheKey:a,hits:this.cacheHits}),_;this.cacheMisses++}if(t.coalesce){const _=this.pendingRequests.get(s);if(_)return V.debug("Request coalesced",{operation:s}),_}let l;t.coalesce?(l=t.timeout?this.withTimeout(e(),t.timeout):e(),this.pendingRequests.set(s,l)):l=t.timeout?this.withTimeout(e(),t.timeout):e();const o=await l;t.memoize&&this.memoize(a,o);const f=Z.now()-r;return this.recordMetric(s,f,!0,{strategy:t.priority||"normal",memoized:t.memoize||!1,coalesced:t.coalesce||!1}),f>this.TARGET_RESPONSE_TIME&&V.warn("Operation exceeded target time",{operation:s,duration:Math.round(f),target:this.TARGET_RESPONSE_TIME}),o}catch(a){const l=Z.now()-r;throw this.recordMetric(s,l,!1,{error:a instanceof Error?a.message:"Unknown error"}),a}finally{t.coalesce&&this.pendingRequests.delete(s)}}getStats(){if(this.metricsCount===0)return{avgResponseTime:0,p95ResponseTime:0,p99ResponseTime:0,successRate:100,slowOperations:[]};const s=[],e=this.metricsCount<this.MAX_METRICS?0:this.metricsIndex;for(let u=0;u<this.metricsCount;u++){const c=this.metricsBuffer[(e+u)%this.MAX_METRICS];c&&s.push(c)}if(s.length===0)return{avgResponseTime:0,p95ResponseTime:0,p99ResponseTime:0,successRate:100,slowOperations:[]};const t=s.sort((u,c)=>u.duration-c.duration);let r=0,a=0;const l=new Set;for(const u of s)a+=u.duration,u.success&&r++,u.duration>this.TARGET_RESPONSE_TIME&&l.add(u.operation);const o=a/s.length,f=Math.floor(t.length*.95),_=Math.floor(t.length*.99);return{avgResponseTime:Math.round(o),p95ResponseTime:Math.round(t[f]?.duration||0),p99ResponseTime:Math.round(t[_]?.duration||0),successRate:r/s.length*100,slowOperations:Array.from(l)}}getCacheStats(){const s=this.cacheHits+this.cacheMisses;return{size:this.memoCache.size,hitRate:s>0?this.cacheHits/s*100:0,hits:this.cacheHits,misses:this.cacheMisses}}getMemoized(s){const e=this.memoCache.get(s);if(e){if(Date.now()-e.timestamp>this.MEMO_TTL){this.memoCache.delete(s);return}return e.hits++,e.value}}memoize(s,e){const t=JSON.stringify(e).length;this.memoCache.set(s,{value:e,timestamp:Date.now(),hits:0,size:t}),this.memoCache.size>this.MAX_CACHE_SIZE&&this.cleanupCache()}async withTimeout(s,e){return Promise.race([s,new Promise((t,r)=>setTimeout(()=>r(new Error(`Operation timed out after ${e}ms`)),e))])}recordMetric(s,e,t,r){this.metricsBuffer[this.metricsIndex]={operation:s,duration:e,timestamp:Date.now(),success:t,metadata:r},this.metricsIndex=(this.metricsIndex+1)%this.MAX_METRICS,this.metricsCount<this.MAX_METRICS&&this.metricsCount++,e>this.TARGET_RESPONSE_TIME&&V.warn("Slow operation detected",{operation:s,duration:`${e.toFixed(2)}ms`,target:`${this.TARGET_RESPONSE_TIME}ms`,metadata:r})}};E(w,"instance");let te=w;const Qe=te.getInstance(),Ae={AGENT_CREATION:"https://docs.example.com/agent-creation",STREAMING:"https://docs.example.com/streaming-issues",STORAGE:"https://docs.example.com/storage-troubleshooting",MEMORY:"https://docs.example.com/memory-management",PROVIDER:"https://docs.example.com/provider-setup",GENERAL:"https://docs.example.com/help"},J={get AGENT_CREATION_FAILED(){return n.errors_catalog_agentCreationFailed_template({agentName:"{agentName}",details:"{details}"})},get AGENT_ALREADY_EXISTS(){return n.errors_catalog_agentAlreadyExists_template({agentName:"{agentName}"})},get INVALID_AGENT_CONFIG(){return n.errors_catalog_invalidAgentConfig_template({details:"{details}"})},get INVALID_CONFIG(){return n.errors_catalog_invalidConfig_template({details:"{details}"})},get SESSION_NOT_FOUND(){return n.errors_catalog_sessionNotFound_template({sessionId:"{sessionId}"})},get SESSION_ALREADY_ACTIVE(){return n.errors_catalog_sessionAlreadyActive_template()},get SESSION_INITIALIZATION_FAILED(){return n.errors_catalog_sessionInitializationFailed_template({details:"{details}"})},get STREAM_CONNECTION_FAILED(){return n.errors_catalog_streamConnectionFailed_template({details:"{details}"})},get STREAM_TIMEOUT(){return n.errors_catalog_streamTimeout_template({timeout:"{timeout}"})},get STREAM_INTERRUPTED(){return n.errors_catalog_streamInterrupted_template({attempt:"{attempt}",maxAttempts:"{maxAttempts}"})},get STREAM_RECOVERY_FAILED(){return n.errors_catalog_streamRecoveryFailed_template({attempts:"{attempts}"})},get MESSAGE_SEND_FAILED(){return n.errors_catalog_messageSendFailed_template({details:"{details}"})},get MESSAGE_VALIDATION_FAILED(){return n.errors_catalog_messageValidationFailed_template({details:"{details}"})},get MESSAGE_TOO_LONG(){return n.errors_catalog_messageTooLong_template({maxLength:"{maxLength}",currentLength:"{currentLength}"})},get PROVIDER_NOT_FOUND(){return n.errors_catalog_providerNotFound_template({provider:"{provider}"})},get PROVIDER_CONNECTION_FAILED(){return n.errors_catalog_providerConnectionFailed_template({provider:"{provider}",details:"{details}"})},get PROVIDER_PROCESS_DIED(){return n.errors_catalog_providerProcessDied_template({provider:"{provider}"})},get STORAGE_READ_FAILED(){return n.errors_catalog_storageReadFailed_template({details:"{details}"})},get STORAGE_WRITE_FAILED(){return n.errors_catalog_storageWriteFailed_template({details:"{details}"})},get STORAGE_CORRUPTED(){return n.errors_catalog_storageCorrupted_template({lastBackup:"{lastBackup}"})},get MEMORY_LIMIT_EXCEEDED(){return n.errors_catalog_memoryLimitExceeded_template({currentUsage:"{currentUsage}",limit:"{limit}"})},get RATE_LIMIT_EXCEEDED(){return n.errors_catalog_rateLimitExceeded_template({count:"{count}",window:"{window}"})},get CONCURRENT_LIMIT_EXCEEDED(){return n.errors_catalog_concurrentLimitExceeded_template({current:"{current}",max:"{max}"})}},je={get AGENT_CREATION_FAILED(){return n.errors_catalog_agentCreationFailed_friendly()},get AGENT_ALREADY_EXISTS(){return n.errors_catalog_agentAlreadyExists_friendly()},get INVALID_AGENT_CONFIG(){return n.errors_catalog_invalidAgentConfig_friendly()},get INVALID_CONFIG(){return n.errors_catalog_invalidConfig_friendly()},get SESSION_NOT_FOUND(){return n.errors_catalog_sessionNotFound_friendly()},get SESSION_ALREADY_ACTIVE(){return n.errors_catalog_sessionAlreadyActive_friendly()},get SESSION_INITIALIZATION_FAILED(){return n.errors_catalog_sessionInitializationFailed_friendly()},get STREAM_CONNECTION_FAILED(){return n.errors_catalog_streamConnectionFailed_friendly()},get STREAM_TIMEOUT(){return n.errors_catalog_streamTimeout_friendly()},get STREAM_INTERRUPTED(){return n.errors_catalog_streamInterrupted_friendly()},get STREAM_RECOVERY_FAILED(){return n.errors_catalog_streamRecoveryFailed_friendly()},get MESSAGE_SEND_FAILED(){return n.errors_catalog_messageSendFailed_friendly()},get MESSAGE_VALIDATION_FAILED(){return n.errors_catalog_messageValidationFailed_friendly()},get MESSAGE_TOO_LONG(){return n.errors_catalog_messageTooLong_friendly()},get PROVIDER_NOT_FOUND(){return n.errors_catalog_providerNotFound_friendly()},get PROVIDER_CONNECTION_FAILED(){return n.errors_catalog_providerConnectionFailed_friendly()},get PROVIDER_PROCESS_DIED(){return n.errors_catalog_providerProcessDied_friendly()},get STORAGE_READ_FAILED(){return n.errors_catalog_storageReadFailed_friendly()},get STORAGE_WRITE_FAILED(){return n.errors_catalog_storageWriteFailed_friendly()},get STORAGE_CORRUPTED(){return n.errors_catalog_storageCorrupted_friendly()},get MEMORY_LIMIT_EXCEEDED(){return n.errors_catalog_memoryLimitExceeded_friendly()},get RATE_LIMIT_EXCEEDED(){return n.errors_catalog_rateLimitExceeded_friendly()},get CONCURRENT_LIMIT_EXCEEDED(){return n.errors_catalog_concurrentLimitExceeded_friendly()}};function Ze(i){return(i.match(/{(\w+)}/g)||[]).map(e=>e.slice(1,-1))}function Je(i,s){return Ze(i).every(t=>t in s)}function Oe(i,s={}){return i.replace(/{(\w+)}/g,(e,t)=>String(s[t]??e))}function ee(i){const s=n.errors_cleanMessage_fallback_error();if(!i)return s;let e=i;return e=e.replace(/^.*?failed(?:\s+to\s+.*?)?\s+after\s+\d+\s+attempts:\s*/i,""),e=e.replace(/^Error invoking remote method '[^']+':(\s*Error:)?\s*/i,""),e=e.replace(/^(Error:\s*)+/i,""),e=e.replace(/\n\s*at .+/g,""),e=e.replace(/\s+/g," ").trim(),e||s}function et(i,s){return s&&J[i]&&Je(J[i],s)?Oe(J[i],s):je[i]||n.errors_userFriendly_fallback_error()}function tt(i){const e={AGENT_CREATION_FAILED:"AGENT_CREATION",AGENT_ALREADY_EXISTS:"AGENT_CREATION",INVALID_AGENT_CONFIG:"AGENT_CREATION",STREAM_CONNECTION_FAILED:"STREAMING",STREAM_TIMEOUT:"STREAMING",STREAM_INTERRUPTED:"STREAMING",STREAM_RECOVERY_FAILED:"STREAMING",STORAGE_READ_FAILED:"STORAGE",STORAGE_WRITE_FAILED:"STORAGE",STORAGE_CORRUPTED:"STORAGE",MEMORY_LIMIT_EXCEEDED:"MEMORY",RATE_LIMIT_EXCEEDED:"MEMORY",CONCURRENT_LIMIT_EXCEEDED:"MEMORY",PROVIDER_NOT_FOUND:"PROVIDER",PROVIDER_CONNECTION_FAILED:"PROVIDER",PROVIDER_PROCESS_DIED:"PROVIDER"}[i];return e?Ae[e]:Ae.GENERAL}const st={AGENT_CREATION_FAILED:[{action:"retry",description:"Try creating the agent again",automatic:!1,priority:"high"},{action:"check-config",description:"Verify agent configuration in settings",automatic:!1,priority:"high"},{action:"check-resources",description:"Ensure sufficient memory and disk space",automatic:!1,priority:"medium"}],AGENT_ALREADY_EXISTS:[{action:"rename",description:"Choose a different name for the agent",automatic:!1,priority:"high"},{action:"delete-existing",description:"Delete the existing agent first",automatic:!1,priority:"medium"}],INVALID_AGENT_CONFIG:[{action:"review-config",description:"Review and correct the configuration",automatic:!1,priority:"high"},{action:"use-defaults",description:"Reset to default configuration",automatic:!1,priority:"medium"}],INVALID_CONFIG:[{action:"review-config",description:"Review and correct the configuration",automatic:!1,priority:"high"},{action:"use-defaults",description:"Reset to default configuration",automatic:!1,priority:"medium"}],SESSION_NOT_FOUND:[{action:"start-new",description:"Start a new agent session",automatic:!1,priority:"high"},{action:"check-history",description:"Check session history for recent sessions",automatic:!1,priority:"medium"}],SESSION_ALREADY_ACTIVE:[{action:"wait",description:"Wait for the current session to complete",automatic:!1,priority:"high"},{action:"cancel",description:"Cancel the active session first",automatic:!1,priority:"high"}],SESSION_INITIALIZATION_FAILED:[{action:"retry",description:"Try initializing the session again",automatic:!1,priority:"high"},{action:"check-resources",description:"Ensure sufficient resources are available",automatic:!1,priority:"medium"}],MESSAGE_SEND_FAILED:[{action:"retry",description:"Try sending the message again",automatic:!1,priority:"high"},{action:"check-connection",description:"Check your network connection",automatic:!1,priority:"high"}],MESSAGE_VALIDATION_FAILED:[{action:"review-config",description:"Review and correct the message format",automatic:!1,priority:"high"},{action:"check-config",description:"Check configuration for valid message format",automatic:!1,priority:"medium"}],MESSAGE_TOO_LONG:[{action:"retry",description:"Shorten the message and try again",automatic:!1,priority:"high"},{action:"batch",description:"Split the message into multiple parts",automatic:!1,priority:"medium"}],PROVIDER_NOT_FOUND:[{action:"check-config",description:"Verify provider is properly configured",automatic:!1,priority:"high"},{action:"recreate",description:"Install or reinstall the provider",automatic:!1,priority:"high"}],PROVIDER_CONNECTION_FAILED:[{action:"retry",description:"Try connecting to the provider again",automatic:!1,priority:"high"},{action:"check-config",description:"Verify provider configuration",automatic:!1,priority:"high"}],STORAGE_READ_FAILED:[{action:"retry",description:"Try reading the data again",automatic:!1,priority:"high"},{action:"restore",description:"Restore from a recent backup",automatic:!1,priority:"medium"}],STORAGE_WRITE_FAILED:[{action:"retry",description:"Try saving again",automatic:!1,priority:"high"},{action:"check-resources",description:"Check available disk space",automatic:!1,priority:"high"}],STREAM_CONNECTION_FAILED:[{action:"retry",description:"Try connecting again",automatic:!1,priority:"high"},{action:"check-connection",description:"Check your network connection",automatic:!1,priority:"high"}],STREAM_RECOVERY_FAILED:[{action:"restart",description:"Restart the agent",automatic:!1,priority:"high"},{action:"check-config",description:"Check error logs for more details",automatic:!1,priority:"medium"}],STREAM_INTERRUPTED:[{action:"reconnect",description:"Attempting automatic reconnection",automatic:!0,priority:"high"},{action:"retry",description:"Retry sending the message",automatic:!1,priority:"high"},{action:"check-connection",description:"Check your internet connection",automatic:!1,priority:"medium"}],STREAM_TIMEOUT:[{action:"wait",description:"Wait for agent to complete processing",automatic:!1,priority:"high"},{action:"cancel",description:"Cancel current operation",automatic:!1,priority:"medium"},{action:"increase-timeout",description:"Increase timeout in settings",automatic:!1,priority:"low"}],PROVIDER_PROCESS_DIED:[{action:"restart",description:"Restart agent process",automatic:!0,priority:"high"},{action:"recreate",description:"Create new agent session",automatic:!1,priority:"high"}],STORAGE_CORRUPTED:[{action:"restore",description:"Restore from backup",automatic:!1,priority:"high"},{action:"reset",description:"Reset agent data",automatic:!1,priority:"medium"}],MEMORY_LIMIT_EXCEEDED:[{action:"cleanup",description:"Close unused agents",automatic:!1,priority:"high"},{action:"increase-limit",description:"Increase memory limit in settings",automatic:!1,priority:"medium"}],RATE_LIMIT_EXCEEDED:[{action:"wait",description:"Wait before making more requests",automatic:!1,priority:"high"},{action:"batch",description:"Batch requests together",automatic:!1,priority:"medium"}],CONCURRENT_LIMIT_EXCEEDED:[{action:"close-agents",description:"Close some running agents",automatic:!1,priority:"high"},{action:"queue",description:"Queue operation for later",automatic:!1,priority:"medium"}]};function it(i){return st[i]||[{action:"retry",description:"Try the operation again",automatic:!1,priority:"high"}]}var N=(i=>(i.AGENT_CREATION_FAILED="AGENT_CREATION_FAILED",i.AGENT_ALREADY_EXISTS="AGENT_ALREADY_EXISTS",i.INVALID_AGENT_CONFIG="INVALID_AGENT_CONFIG",i.INVALID_CONFIG="INVALID_CONFIG",i.SESSION_NOT_FOUND="SESSION_NOT_FOUND",i.SESSION_ALREADY_ACTIVE="SESSION_ALREADY_ACTIVE",i.SESSION_INITIALIZATION_FAILED="SESSION_INITIALIZATION_FAILED",i.STREAM_CONNECTION_FAILED="STREAM_CONNECTION_FAILED",i.STREAM_TIMEOUT="STREAM_TIMEOUT",i.STREAM_INTERRUPTED="STREAM_INTERRUPTED",i.STREAM_RECOVERY_FAILED="STREAM_RECOVERY_FAILED",i.MESSAGE_SEND_FAILED="MESSAGE_SEND_FAILED",i.MESSAGE_VALIDATION_FAILED="MESSAGE_VALIDATION_FAILED",i.MESSAGE_TOO_LONG="MESSAGE_TOO_LONG",i.PROVIDER_NOT_FOUND="PROVIDER_NOT_FOUND",i.PROVIDER_CONNECTION_FAILED="PROVIDER_CONNECTION_FAILED",i.PROVIDER_PROCESS_DIED="PROVIDER_PROCESS_DIED",i.PROVIDER_UNAVAILABLE="PROVIDER_UNAVAILABLE",i.PROVIDER_ERROR="PROVIDER_ERROR",i.STORAGE_READ_FAILED="STORAGE_READ_FAILED",i.STORAGE_WRITE_FAILED="STORAGE_WRITE_FAILED",i.STORAGE_CORRUPTED="STORAGE_CORRUPTED",i.STORAGE_ERROR="STORAGE_ERROR",i.STORAGE_QUOTA_EXCEEDED="STORAGE_QUOTA_EXCEEDED",i.MEMORY_LIMIT_EXCEEDED="MEMORY_LIMIT_EXCEEDED",i.RATE_LIMIT_EXCEEDED="RATE_LIMIT_EXCEEDED",i.CONCURRENT_LIMIT_EXCEEDED="CONCURRENT_LIMIT_EXCEEDED",i.RESOURCE_NOT_FOUND="RESOURCE_NOT_FOUND",i.RESOURCE_EXHAUSTED="RESOURCE_EXHAUSTED",i.NETWORK_ERROR="NETWORK_ERROR",i.PERMISSION_DENIED="PERMISSION_DENIED",i.OPERATION_FAILED="OPERATION_FAILED",i.VALIDATION_ERROR="VALIDATION_ERROR",i.INVALID_RESPONSE="INVALID_RESPONSE",i.STATE_CORRUPTION="STATE_CORRUPTION",i.CONTEXT_OVERFLOW="CONTEXT_OVERFLOW",i))(N||{});class q extends Error{constructor(e,t,r={},a){super(e);E(this,"code");E(this,"context");E(this,"recoverySuggestions");E(this,"userMessage");E(this,"isRecoverable");E(this,"cause");this.name="AgentError",this.code=t,this.context={...r,timestamp:new Date,stackTrace:this.stack},this.userMessage=a?.userMessage||this.getDefaultUserMessage(t),this.recoverySuggestions=a?.recoverySuggestions||this.getDefaultRecoverySuggestions(t),this.isRecoverable=a?.isRecoverable??this.isErrorRecoverable(t),a?.cause&&(this.cause=a.cause)}getDefaultUserMessage(e){return et(e,this.context)}getDefaultRecoverySuggestions(e){return it(e)}isErrorRecoverable(e){return["STREAM_INTERRUPTED","STREAM_TIMEOUT","MESSAGE_SEND_FAILED","PROVIDER_PROCESS_DIED","STORAGE_READ_FAILED","STORAGE_WRITE_FAILED"].includes(e)}getHelpLink(){return tt(this.code)}formatMessage(e){return Oe(e,this.context)}toJSON(){return{name:this.name,code:this.code,message:this.message,userMessage:this.userMessage,context:this.context,recoverySuggestions:this.recoverySuggestions,isRecoverable:this.isRecoverable,helpLink:this.getHelpLink(),stack:this.stack}}}const rt={NON_RETRYABLE_ERRORS:["EACCES","EPERM","ENOSPC","EMFILE","permission","memory","fatal","process died","not available on your current plan","agent binary","rate limit","too many requests","hit your limit","you've hit your limit","quota exceeded"]};function re(i){const s=i.toLowerCase();for(const e of rt.NON_RETRYABLE_ERRORS)if(s.includes(e.toLowerCase()))return!0;return!1}const at="Agent already has an in-flight prompt. Message was not delivered.",v=W("ErrorBoundary"),b=class b{constructor(){}static getInstance(){return b.instance||(b.instance=new b),b.instance}async wrap(s,e,t={}){const{retries:r=pe.DEFAULT_ATTEMPTS,retryDelay:a=pe.BASE_DELAY,exponentialBackoff:l=!0,notify:o=!1,notifyOnRetry:f=!1,context:_={},onError:u,onRetry:c,shouldRetry:R=this.defaultShouldRetry}=t;let g=null,d=0;for(d=1;d<=r+1;d++)try{v.debug(`[${e}] Attempt ${d}/${r+1}`);const C=await s();return d>1&&v.info(`[${e}] Succeeded after ${d} attempts`),C}catch(C){if(g=C,v.error(`[${e}] Attempt ${d} failed`,{error:g.message,attempt:d,maxAttempts:r+1,context:_}),u?.(g,d),d<=r&&R(g)){const h=l?a*Math.pow(2,d-1):a;f&&j.warning(n.agent_errorBoundary_retrying_message({seconds:h/1e3})),c?.(d),v.info(`[${e}] Retrying in ${h}ms`),await this.sleep(h)}else break}const k=`${e} failed after ${d} attempt${d===1?"":"s"}: ${g?.message}`,P=ee(g?.message||n.agent_errorBoundary_generic_error()),D=g?.message?.toLowerCase()||"",$=D.includes("no available models")||D.includes("all models exhausted")||D.includes("all models unavailable");throw o&&!$&&j.error(P),new q(P,N.OPERATION_FAILED,{originalError:g?.message,detailedMessage:k,attempts:d,context:_})}async wrapVoid(s,e,t={}){await this.wrap(s,e,t)}wrapSync(s,e,t={}){try{return s()}catch(r){const a=r;throw v.error(`[${e}] Failed`,{error:a.message,context:t.context}),t.notify&&j.error(ee(a.message)),new q(ee(a.message),N.OPERATION_FAILED,t.context)}}defaultShouldRetry(s){const e=s.message.toLowerCase();return re(s.message)?!1:e.includes("network")||e.includes("timeout")?!0:s instanceof q?[N.NETWORK_ERROR,N.STREAM_TIMEOUT,N.STREAM_CONNECTION_FAILED,N.PROVIDER_CONNECTION_FAILED,N.PROVIDER_UNAVAILABLE].includes(s.code):!(e.includes("invalid")||e.includes("interrupted")||e.includes("cancel")||e.includes("not found")||e.includes("not available")||e.includes("404")||e.includes("no available models")||e.includes("all models exhausted")||e.includes("all models unavailable")||e.includes("413")||e.includes("too long for the agent")||e.includes("request entity too large")||e.includes("payload too large")||e.includes("content too large")||e.includes("body too large")||e.includes("unauthorized")||e.includes("forbidden")||e.includes("401")||e.includes("403"))}sleep(s){return new Promise(e=>setTimeout(e,s))}async withTimeout(s,e,t){return Promise.race([s(),new Promise((r,a)=>setTimeout(()=>a(new q(`${t} timed out after ${e}ms`,N.STREAM_TIMEOUT)),e))])}async batchOperations(s,e,t={}){const{concurrency:r=5,continueOnError:a=!0,operationName:l="batch operation"}=t,o=[],f=[];for(let _=0;_<s.length;_+=r){const u=s.slice(_,_+r);(await Promise.allSettled(u.map(R=>e(R)))).forEach((R,g)=>{if(R.status==="fulfilled")o.push(R.value);else{const d=R.reason;if(f.push({item:u[g],error:d}),v.error(`[${l}] Batch item failed`,{item:u[g],error:d.message}),!a)throw d}})}return f.length>0&&v.warn(`[${l}] Completed with ${f.length} errors`),{results:o,errors:f}}};E(b,"instance");let se=b;const nt=se.getInstance(),ie=W("browser/index"),F=new Map,B=new Map;let U;function ot(i,s,e){for(const t of s)try{t(e)}catch(r){ie.error("Error in agent subscriber callback",{agentId:i,error:r})}}function ct(){if(U)return;let i=!1;U=p.createSelector(e=>e.agentSessions)().subscribe(()=>{if(!i){i=!0;return}if(F.size===0)return;const e=p.state;for(const[t,r]of F){const a=Se.select(e,t);B.get(t)!==a&&(B.set(t,a),ot(t,r,a))}})}function lt(){F.size>0||!U||(U(),U=void 0,B.clear())}function Ft(i,s,e){let t=F.get(i);const r=!t;t||(t=new Set,F.set(i,t)),t.add(s),ct();const a=p.state,l=Se.select(a,i);return r&&B.set(i,l),l?ie.debug("[subscribeToAgent] Initial callback data",{agentId:i,workspaceId:e??"current",hasSession:!0}):ie.debug("[subscribeToAgent] No session found",{agentId:i,workspaceId:e??"current"}),s(l),()=>{const o=F.get(i);o&&(o.delete(s),o.size===0&&(F.delete(i),B.delete(i))),lt()}}const y=W("ErrorRecovery"),ye={network:{maxRetries:3,initialBackoffMs:1e3,maxBackoffMs:1e4,backoffMultiplier:2,shouldRetry:i=>{const s=i.message.toLowerCase();return s.includes("network")||s.includes("fetch")||s.includes("connection")||s.includes("timeout")}},streaming:{maxRetries:5,initialBackoffMs:500,maxBackoffMs:5e3,backoffMultiplier:1.5,shouldRetry:(i,s)=>{if(s>=5)return!1;const e=i.message.toLowerCase();return e.includes("no available models")||e.includes("all models exhausted")||e.includes("all models unavailable")||re(i.message)?!1:e.includes("stream")||e.includes("chunk")||e.includes("incomplete")}},persistence:{maxRetries:2,initialBackoffMs:100,maxBackoffMs:1e3,backoffMultiplier:2,shouldRetry:i=>{const s=i.message.toLowerCase();return s.includes("save")||s.includes("write")||s.includes("persist")}},rateLimit:{maxRetries:3,initialBackoffMs:5e3,maxBackoffMs:3e4,backoffMultiplier:2,shouldRetry:i=>{const s=i.message.toLowerCase();return s.includes("rate")||s.includes("limit")||s.includes("429")}}};class ut{constructor(){E(this,"listeners",new Map)}on(s,e){let t=this.listeners.get(s);t||(t=new Set,this.listeners.set(s,t)),t.add(e)}off(s,e){this.listeners.get(s)?.delete(e)}emit(s,...e){this.listeners.get(s)?.forEach(t=>{try{t(...e)}catch(r){y.error(`Error in event listener for ${s}:`,r)}})}removeAllListeners(){this.listeners.clear()}}class dt extends ut{constructor(){super(...arguments);E(this,"activeRecoveries",new Map);E(this,"recoveryStats",new Map)}async executeWithRecovery(e,t=ye.network,r){const a=Date.now(),l=new AbortController;r&&(this.cancelRecovery(r),this.activeRecoveries.set(r,l));let o,f=t.initialBackoffMs,_=0;for(let u=1;u<=t.maxRetries;u++){if(_=u,l.signal.aborted){y.info(`Recovery cancelled for operation ${r}`);break}try{y.debug(`Attempting operation (attempt ${u}/${t.maxRetries})`,{operationId:r});const c=await e();return this.updateStats(r,!0),this.emit("recovery:success",{operationId:r,attempt:u,duration:Date.now()-a}),r&&this.activeRecoveries.delete(r),{success:!0,data:c,attempts:u,totalTime:Date.now()-a}}catch(c){o=c,y.warn(`Operation failed (attempt ${u}/${t.maxRetries})`,{operationId:r,error:o.message});const R=o.message.toLowerCase();if(R.includes("interrupted")||R.includes("cancelled")||R.includes("canceled")){y.debug("User-initiated interruption/cancellation, not retrying",{operationId:r,error:o.message});break}if(R.includes("no available models")||R.includes("all models exhausted")||R.includes("all models unavailable")){y.debug("All models exhausted, not retrying",{operationId:r,error:o.message});break}if(re(o.message)){y.debug("Fatal error detected, not retrying",{operationId:r,error:o.message});break}if(!t.shouldRetry(o,u)){y.debug("Error not retryable, stopping recovery",{operationId:r,error:o.message});break}if(u<t.maxRetries){const g=Math.random()*.2*f,d=Math.min(f+g,t.maxBackoffMs);t.onRetry?.(u,d),this.emit("recovery:retry",{operationId:r,attempt:u,delay:d,error:o.message}),await this.delay(d,l.signal),f=Math.min(f*t.backoffMultiplier,t.maxBackoffMs)}}}return this.updateStats(r,!1),t.onFailure?.(o,_),this.emit("recovery:failure",{operationId:r,attempts:_,duration:Date.now()-a,error:o?.message}),r&&this.activeRecoveries.delete(r),{success:!1,error:o,attempts:_,totalTime:Date.now()-a}}cancelRecovery(e){const t=this.activeRecoveries.get(e);t&&(t.abort(),this.activeRecoveries.delete(e),y.info(`Cancelled recovery for operation ${e}`))}cancelAllRecoveries(){for(const[e,t]of this.activeRecoveries)t.abort(),y.info(`Cancelled recovery for operation ${e}`);this.activeRecoveries.clear()}getStats(e){if(e)return this.recoveryStats.get(e)||{successes:0,failures:0};const t={};for(const[r,a]of this.recoveryStats)t[r]=a;return t}clearStats(e){e?this.recoveryStats.delete(e):this.recoveryStats.clear()}isRetryable(e,t){const r=e.message.toLowerCase();if(t)switch(t){case"NETWORK":return r.includes("network")||r.includes("fetch");case"TIMEOUT":return r.includes("timeout")||r.includes("timed out");case"RATE_LIMIT":return r.includes("rate")||r.includes("limit")||r.includes("429");case"TEMPORARY":return r.includes("temporary")||r.includes("transient");case"CONFLICT":return r.includes("conflict")||r.includes("concurrent");default:return!1}return this.isRetryable(e,"NETWORK")||this.isRetryable(e,"TIMEOUT")||this.isRetryable(e,"RATE_LIMIT")||this.isRetryable(e,"TEMPORARY")||this.isRetryable(e,"CONFLICT")}delay(e,t){return new Promise((r,a)=>{const l=setTimeout(r,e);if(t){const o=()=>{clearTimeout(l),a(new Error("Delay aborted"))};t.addEventListener("abort",o);const f=r;r=()=>{t.removeEventListener("abort",o),f()}}})}updateStats(e,t){if(!e)return;const r=this.recoveryStats.get(e)||{successes:0,failures:0};t?r.successes++:r.failures++,this.recoveryStats.set(e,r)}dispose(){this.cancelAllRecoveries(),this.recoveryStats.clear(),this.removeAllListeners()}}const mt=new dt,O=new Ye({category:"WorkspaceMetrics"}),Et=100;class ft{constructor(){E(this,"metrics",new Map);E(this,"operations",new Map)}startWorkspaceCreation(s){const e=Date.now();for(this.metrics.delete(s),this.metrics.set(s,{workspaceId:s,creationStarted:e});this.metrics.size>Et;){const t=this.metrics.keys().next().value;if(t===void 0)break;this.metrics.delete(t)}O.info("Started tracking workspace creation",{workspaceId:s})}recordMilestone(s,e){const t=this.metrics.get(s);if(!t){O.warn("No metrics found for workspace",{workspaceId:s,milestone:e});return}const r=Date.now();switch(e){case"optimisticNavigation":t.optimisticNavigation=r;break;case"realWorkspaceCreated":t.realWorkspaceCreated=r;break;case"agentCreated":t.agentCreated=r;break;case"agentReady":t.agentReady=r;break;case"firstMessageSent":t.firstMessageSent=r;break;case"firstResponseReceived":t.firstResponseReceived=r;break;case"firstChunkReceived":t.firstChunkReceived=r;break;case"totalDuration":t.totalDuration=r;break;case"workspaceId":case"creationStarted":O.warn("Cannot update milestone",{milestone:e});return}const a=r-t.creationStarted;O.info(`Milestone: ${e}`,{workspaceId:s,elapsed:`${a}ms`,timestamp:r}),e==="firstResponseReceived"&&(t.totalDuration=r-t.creationStarted,this.logSummary(s))}startOperation(s,e){this.operations.set(s,{startTime:Date.now(),metadata:e})}endOperation(s,e){const t=this.operations.get(s);if(!t)return O.warn("Operation not found",{operationId:s}),null;const r=Date.now();return t.endTime=r,t.duration=r-t.startTime,e&&(t.metadata={...t.metadata,...e}),O.info("Operation completed",{operationId:s,duration:`${t.duration}ms`,metadata:t.metadata}),this.operations.delete(s),t.duration}getMetrics(s){return this.metrics.get(s)}logSummary(s){const e=this.metrics.get(s);if(!e)return;const t={workspaceId:s,totalDuration:`${e.totalDuration}ms`,stages:{optimisticNavigation:e.optimisticNavigation?`${e.optimisticNavigation-e.creationStarted}ms`:"N/A",realWorkspaceCreation:e.realWorkspaceCreated?`${e.realWorkspaceCreated-e.creationStarted}ms`:"N/A",agentCreation:e.agentCreated?`${e.agentCreated-e.creationStarted}ms`:"N/A",agentReady:e.agentReady?`${e.agentReady-e.creationStarted}ms`:"N/A",firstMessage:e.firstMessageSent?`${e.firstMessageSent-e.creationStarted}ms`:"N/A",firstResponse:e.firstResponseReceived?`${e.firstResponseReceived-e.creationStarted}ms`:"N/A"}};O.info("=== Workspace Creation Metrics Summary ===",t),O.info("Workspace Creation Metrics:",t)}clearMetrics(s){this.metrics.delete(s)}incrementAgentCreated(s){const e=this.metrics.get(s);e&&(e.agentCreated=Date.now(),O.info("Agent created",{workspaceId:s}))}incrementMessageSent(s){const e=this.metrics.get(s);e&&!e.firstMessageSent&&(e.firstMessageSent=Date.now(),O.info("First message sent",{workspaceId:s}))}}const _t=new ft,M=W("AgentSend");function A(i){p.dispatch(i)}function Ie(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)}function ht(i){const s=Ie(i)&&i.success===!0&&"data"in i?i.data:i;return!Ie(s)||s.success!==!1?!1:typeof s.error=="string"&&s.error.includes(at)}async function kt(i,s,e,t={}){const r=ge.select(p.state,e.id);if(!r)return;const a=Le(i,e.id),l=t.submission,o=!!l&&we.select(p.state,l.scope)?.supported===!0,f=(c,R,g=!1)=>{l&&A(Xe(l.scope,l.id,c,Date.now(),R,g))};let _=!1;const u=()=>(!l||_||be.select(p.state,l))&&r===ge.select(p.state,e.id)&&a.isCurrent(p.state.agentSessions?.byAgentId[i]?.workspaceId);return Qe.track(`sendMessage:${a.key}:${i}:${l?.id??"legacy"}`,async()=>{if(!u())return;M.debug(`Sending message to agent ${i}`,{contentLength:s.length,hasContextReferences:!!t.contextReferences?.length,model:t.model});let c=await p.dispatch(Fe(e.id,i));if(u()){if(!c)throw new Error(n.agent_streamLifecycle_sessionNotFound_error({agentId:i}));c={...c,isStreaming:c.isStreaming??!1};{if(c&&(c.status==="pending"||!c.id)&&!c.backendSessionId&&c.activationState!==K.ACTIVE&&c.activationState!==K.ACTIVATING){const h=e.id.startsWith("optimistic-"),Y=e.worktreePath||e.repositoryPath||e.path;if(!h&&Y){M.info("Activating pending session in sendMessage",{agentId:i,status:c.status,activationState:c.activationState,hasBackendSessionId:!!c.backendSessionId});const x=await p.dispatch(ke(e.id,i));if(!u())return;x&&(c=x)}else throw M.warn("Cannot activate agent - workspace not ready",{agentId:i,workspaceId:e.id,isOptimistic:h,hasWorktreePath:!!e.worktreePath,hasRepositoryPath:!!e.repositoryPath,hasPath:!!e.path}),new Error(n.agent_streamLifecycle_spaceNotReady_error())}else c&&c.status==="pending"&&c.backendSessionId&&(M.info("Fixing status for already-activated session",{agentId:i,backendSessionId:c.backendSessionId,activationState:c.activationState}),c={...c,status:Ge.Active,activationState:K.ACTIVE},A(me({...c,workspaceId:e.id})));if(!c)throw new Error(`Failed to get or create session for agent ${i}`);A(me({...c,workspaceId:e.id}));const g=[{type:"text",text:s}];if(t.imageBlocks)for(const h of t.imageBlocks)g.push({type:"image",...h.data!==void 0?{data:h.data}:{},...h.mimeType!==void 0?{mimeType:h.mimeType}:{},...h.attachmentId!==void 0?{attachmentId:h.attachmentId}:{}});if(t.fileBlocks)for(const h of t.fileBlocks)g.push({type:"file",attachmentId:h.attachmentId,fileName:h.fileName,...h.mimeType!==void 0?{mimeType:h.mimeType}:{},...h.size!==void 0?{size:h.size}:{}});const d=t.userAppMessageId??ce(),k=t.messageMetadata?.[Re],P={...t.contextReferences?.length?{contextReferences:t.contextReferences}:{},...k!==void 0?{[Re]:k}:{}},D={id:Ee(ue()),appMessageId:d,role:"user",contentBlocks:g,timestamp:new Date().toISOString(),metadata:{...P,...t.messageMetadata??{}}};o||(l&&(f("rejected"),_=!0),A(Pe(c.id,D))),A(H(c.id,!0));let $=!1,C;try{o||await p.dispatch(xe(e.id,i,!0,{allowTruncation:t.resetHistory}));const h=Ee(`msg_${ue()}`),Y=ce(),x=async()=>nt.wrap(async()=>{if(!u())return;M.info("Agent Service: Sending message to backend with image and file blocks",{agentId:i,sessionId:c.id,hasImageBlocks:!!t.imageBlocks,imageBlocksCount:t.imageBlocks?.length||0,imageBlockDetails:t.imageBlocks?.map(m=>({type:m.type,mimeType:m.mimeType,dataLength:m.data?.length||0}))||[],hasFileBlocks:!!t.fileBlocks,fileBlocksCount:t.fileBlocks?.length||0,fileBlockDetails:t.fileBlocks?.map(m=>({type:m.type,fileName:m.fileName,mimeType:m.mimeType,attachmentId:m.attachmentId,size:m.size}))||[]});const Me=t.model??t.modelId??c.model??void 0;A(Ve(i));const Ne=le(i,e.id),ne=p.state.chatState?.byAgentId[i]?.attemptGeneration??0,T=await qe("agent.sendMessage",{agentId:i,...o&&l?{messageId:l.id}:{},workspaceId:e.id,content:s,model:Me,contextReferences:t.contextReferences,imageBlocks:t.imageBlocks,fileBlocks:t.fileBlocks,noteIds:t.noteIds,stdinContext:t.stdinContext,assistantMessageId:h,userAppMessageId:d,assistantAppMessageId:Y,priority:t.priority,...t.messageMetadata?{messageMetadata:t.messageMetadata}:{}}).catch(m=>{if(u())throw Ke(m)&&(C=m),m});if(u()){if(ht(T)){M.info("Backend dropped duplicate in-flight prompt",{agentId:i,sessionId:c.id}),f("rejected");return}if(T&&typeof T=="object"&&"success"in T){if(!T.success){const m=T.error,I=typeof m=="string"?m:m?.message;throw $=!0,new Error(I||n.agent_streamLifecycle_sendToBackendFailed_error())}if("queued"in T&&T.queued===!0){if(M.info("sendMessage auto-queued by daemon (mid-turn or turn-startup race)",{agentId:i,sessionId:c.id,queuedMessageId:T.queuedMessage?.id}),(!o||!l||!de.select(p.state,l))&&A(H(c.id,!1)),o||A(Ue(c.id,D.id)),o){const I=T.queuedMessage,G=T.turnId,L=typeof G=="string"?G:I?.turnId;if(I&&typeof L=="string"){const S=fe(s,t),X=Q.select(p.state,i,e.id).find(oe=>oe.id===I.id||oe.turnId===L);A(_e(i,I.id,S,L,he(X??I,S),!X&&!!l&&de.select(p.state,l),ne))}f("accepted",I,!0),z(i,e.id);return}const m=T.queuedMessage;if(m){const I=T.turnId,G=typeof I=="string"?I:m.turnId;let L=m;if(u()&&le(i,e.id)===Ne){const S=Q.select(p.state,i,e.id),X=ze(S,m);A(Be(i,X,e.id))}else u()&&(M.debug("queued-response queue seed superseded by an authoritative snapshot; reconciling via hydrate",{agentId:i,queuedMessageId:m.id}),await z(i,e.id).catch(()=>{}),L=Q.select(p.state,i,e.id).find(S=>S.id===m.id||S.turnId===G));if(u()&&typeof G=="string"){const S=fe(s,t);A(_e(i,m.id,S,G,he(L??m,S),!L,ne))}else u()&&M.warn("auto-queued sendMessage response carried no turnId; retry record not parked",{agentId:i,queuedMessageId:m.id})}return}}o&&(f("accepted"),z(i,e.id),ve(i,e.id)),_t.incrementMessageSent(e.id)}},"send message",{retries:o?0:2,notify:!1,context:{agentId:i,workspace:e.id}}),ae=o?await x().then(()=>({success:!0,error:void 0})):await mt.executeWithRecovery(x,ye.streaming,`send-message-${i}`);if(!ae.success)throw ae.error||new Error(n.agent_streamLifecycle_sendFailed_error())}catch(h){if(!u())return;throw A(H(c.id,!1)),!o&&t.messageMetadata&&A($e(c.id,D.id,{metadata:P})),o&&f($||C?"rejected":"uncertain"),C??h}}}},{memoize:!1,coalesce:!0,priority:"high"})}export{Te as U,Ft as a,ee as c,ze as r,kt as s,Ke as u,bt as w};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["/app/immutable/chunks/DnOdQmdW.js","/app/immutable/chunks/CLAmm_T1.js","/app/immutable/chunks/3SdAC2_C.js","/app/immutable/chunks/BlDw7Cnz.js","/app/immutable/chunks/Dms_DO28.js","/app/immutable/chunks/ChTqQfQN.js","/app/immutable/chunks/BBFoj-dS.js","/app/immutable/chunks/CIyUrgF0.js","/app/immutable/chunks/BwNrQXlF.js","/app/immutable/chunks/DxwfiAWm.js","/app/immutable/chunks/uXuxG9cN.js","/app/immutable/chunks/Bqd7fdCF.js","/app/immutable/chunks/oOxvDsoj.js","/app/immutable/chunks/B5aYN90J.js","/app/immutable/chunks/BhvXSFFd.js","/app/immutable/chunks/UTM5G-w-.js","/app/immutable/chunks/CcJmuwXr.js","/app/immutable/assets/spinner.D_TRo5Hy.css","/app/immutable/assets/button.-yaUNjRS.css","/app/immutable/chunks/BdWqymET.js","/app/immutable/chunks/BBWuirRW.js","/app/immutable/chunks/DONrLvvt.js","/app/immutable/chunks/DypB-Dwi.js","/app/immutable/chunks/BYLBGCLl.js","/app/immutable/chunks/Csw_wMoM.js","/app/immutable/chunks/cOfTiXUW.js","/app/immutable/chunks/BFgvMDua.js","/app/immutable/chunks/DREHsvwt.js","/app/immutable/chunks/Dn334wJv.js","/app/immutable/chunks/B1CKzIA2.js","/app/immutable/chunks/BwH4Bvte.js","/app/immutable/chunks/CIbfGsF-.js","/app/immutable/chunks/Cu5e4npY.js","/app/immutable/chunks/Dz9x1eR4.js","/app/immutable/chunks/D9tVylVS.js","/app/immutable/chunks/DPttSllj.js","/app/immutable/chunks/CfNIzRu8.js","/app/immutable/chunks/DU3vNstz.js","/app/immutable/chunks/XJv96NUg.js","/app/immutable/assets/notify.DylRFR3N.css","/app/immutable/chunks/B3K7_JP4.js","/app/immutable/chunks/4o_ZQ4nq.js","/app/immutable/chunks/klTuOngC.js","/app/immutable/chunks/B9dzo0Kz.js","/app/immutable/chunks/BVaTfwe9.js"])))=>i.map(i=>d[i]);
2
- import{_ as ue,t as re,bo as v,bw as ne,b as se,bm as k}from"./CLAmm_T1.js";import{JG as pe}from"./BlDw7Cnz.js";import{bs as ie,a7 as le,ay as X,aD as n,W as f,bn as oe,c9 as A,aA as h,a5 as U,bA as q,b_ as S,aB as P,bl as G,bO as K,bS as T,ca as de,bH as fe,bV as _e,aC as H}from"./3SdAC2_C.js";import{i as L}from"./BFgvMDua.js";import{c as ge,e as me,f as te,g as ce,s as M}from"./CcJmuwXr.js";import{m as ve}from"./Cu5e4npY.js";import{e as he}from"./B1CKzIA2.js";import{t as Ce}from"./DAsc1V4f.js";import{F as we}from"./DPttSllj.js";import{M as ke}from"./BNCKMxAC.js";import{b as be}from"./B3K7_JP4.js";import{aO as xe}from"./BZljJ1HD.js";import{n as z,e as $,s as J}from"./CfNIzRu8.js";import{f as Se}from"./DREHsvwt.js";import"./BhvXSFFd.js";function ut(r,t,c){if(r.metaKey||r.ctrlKey||!(r.currentTarget instanceof Element)||!r.currentTarget.closest("[data-assistant-panels]"))return!1;const e=pe.state.agentSessions.byAgentId[c]?.workspaceId??t,i=r.currentTarget.closest("[data-assistant-layout-id]")?.dataset.assistantLayoutId;return ue(async()=>{const{showAssistantContent:o}=await import("./DnOdQmdW.js");return{showAssistantContent:o}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44]),import.meta.url).then(({showAssistantContent:o})=>o(`intent://local/${e}/agent/${c}`,{layoutId:i})),!0}var Te=P('<span class="text-subtle animate-pulse"> </span>'),ye=P('<span class="text-green-600 dark:text-green-400 flex items-center gap-0.5"><span class="opacity-70">+</span> <span> </span></span>'),Ee=P('<span class="text-red-600 dark:text-red-400 flex items-center gap-0.5"><span class="opacity-70">-</span> <span> </span></span>'),Ie=P('<span class="text-subtle"> </span>'),Me=P("<!> <!> <!>",1),Le=P("<div><!></div>");function Ae(r,t){if(new.target)return re({component:Ae,...r});ie(t,!0);let c=v(t,"additions",7,0),e=v(t,"deletions",7,0),i=v(t,"showZero",7,!1),o=v(t,"size",7,"sm"),g=v(t,"inline",7,!0),u=v(t,"loading",7,!1),d=v(t,"class",7,""),y=A(()=>i()||c()>0||e()>0||u()),R=A(()=>{switch(o()){case"xs":return"text-ui gap-1";case"sm":return"text-xs gap-1.5";case"md":return"text-sm gap-2";case"lg":return"text-base gap-2.5";default:return"text-xs gap-1.5"}});function B(a){return ve(a,{notation:"compact"})}var F={get additions(){return c()},set additions(a=0){c(a),h()},get deletions(){return e()},set deletions(a=0){e(a),h()},get showZero(){return i()},set showZero(a=!1){i(a),h()},get size(){return o()},set size(a="sm"){o(a),h()},get inline(){return g()},set inline(a=!0){g(a),h()},get loading(){return u()},set loading(a=!1){u(a),h()},get class(){return d()},set class(a=""){d(a),h()},$set:ne,$on:(a,w)=>se(t,a,w)},C=le(),D=X(C);{var p=a=>{var w=Le(),W=U(w);{var E=_=>{var m=Te(),N=G(m,!0);S(O=>K(N,O),[()=>k.shared_lineChangeStats_calculating_label()]),f(_,m)},V=_=>{var m=Me(),N=X(m);{var O=s=>{var l=ye(),b=T(U(l),2),I=G(b,!0);q(l),S(Y=>K(I,Y),[()=>B(c())]),f(s,l)};L(N,s=>{(c()>0||i())&&s(O)})}var Z=T(N,2);{var j=s=>{var l=Ee(),b=T(U(l),2),I=G(b,!0);q(l),S(Y=>K(I,Y),[()=>B(e())]),f(s,l)};L(Z,s=>{(e()>0||i())&&s(j)})}var x=T(Z,2);{var Q=s=>{var l=Ie(),b=G(l,!0);S(I=>K(b,I),[()=>k.shared_lineChangeStats_noChanges_label()]),f(s,l)};L(x,s=>{!c()&&!e()&&!i()&&s(Q)})}f(_,m)};L(W,_=>{u()?_(E):_(V,-1)})}q(w),S(_=>te(w,1,_),[()=>ge(me("whitespace-nowrap",g()?"inline-flex":"flex","items-center font-mono",n(R),d()))]),f(a,w)};L(D,a=>{n(y)&&a(p)})}return f(r,C),oe(F)}const Ne=new Map([["STRONG","strong"],["B","strong"],["EM","em"],["I","em"],["CODE","code"]]),Pe=new Set(["AUDIO","BUTTON","CANVAS","DETAILS","EMBED","HR","IFRAME","IMG","INPUT","OBJECT","PICTURE","PRE","SELECT","SVG","TABLE","TEXTAREA","VIDEO"]),Re=new Set(["ARTICLE","BLOCKQUOTE","DD","DIV","DT","FOOTER","H1","H2","H3","H4","H5","H6","HEADER","LI","P","SECTION"]);function De(r){return typeof Intl.Segmenter=="function"?Array.from(new Intl.Segmenter(void 0,{granularity:"grapheme"}).segment(r),({segment:t})=>t):Array.from(r)}function ee(r,t,c,e){for(const i of De(t.replace(/\s+/gu," "))){const o=i===" ";if(!(o&&(!e.hasText||e.lastWasSpace))){if(e.visibleLength>=c){if(o)return;e.truncated||r.append(document.createTextNode("…")),e.truncated=!0;return}r.append(document.createTextNode(i)),e.visibleLength+=1,e.hasText=!0,e.lastWasSpace=o}}}function ae(r,t,c,e){if(e.truncated)return;if(r.nodeType===Node.TEXT_NODE){ee(t,r.textContent??"",c,e);return}if(!(r instanceof HTMLElement)||Pe.has(r.tagName))return;if(r.tagName==="BR"){ee(t," ",c,e);return}const i=Ne.get(r.tagName);if(i){const o=document.createElement(i);t.append(o);for(const g of r.childNodes)ae(g,o,c,e);o.textContent||o.remove();return}Re.has(r.tagName)&&e.hasText&&ee(t," ",c,e);for(const o of r.childNodes)ae(o,t,c,e)}async function Oe(r,t=80){const c=await xe(r,{allowEmpty:!0,skipIfHTML:!1,preserveAnchors:!1,processPrimitives:!1,taskBlockRenderMode:"content"}),e=document.createElement("template");e.innerHTML=c;const i=document.createElement("span"),o={visibleLength:0,hasText:!1,lastWasSpace:!1,truncated:!1},g=Math.max(0,Math.floor(t));for(const u of e.content.childNodes)ae(u,i,g,o);return i.innerHTML.trim()}async function ze(r){const t=await Oe(r,Number.MAX_SAFE_INTEGER),c=document.createElement("span");return c.innerHTML=t,(c.textContent??"").replace(/<\/?[A-Za-z][^>]*>/gu,"").replace(/\s+/gu," ").trim()}var He=P('<span data-testid="agent-preview-tool-icon"><!></span>'),Be=P('<span><!> <span class="min-w-0 flex-1 truncate text-inherit opacity-[inherit]" data-testid="agent-preview-tool-text"> </span></span>');function Fe(r,t){if(new.target)return re({component:Fe,...r});ie(t,!0);const c=new Set(["figma","sentry","playwright","github","linear","slack","context7"]);let e=v(t,"toolUse",7),i=v(t,"animate",7,!1),o=v(t,"iconSize",7,12),g=v(t,"showIcon",7,!0),u=v(t,"class",7,"");const d=A(()=>be(e().name,e().input||{})),y=A(()=>[n(d).verb,n(d).subject,n(d).path].filter(Boolean).join(" ").trim()||n(d).verb||k.chat_previewToolLabel_tool_fallback());let R=_e("");de(()=>{const p=n(y);let a=!1;return ze(p).then(w=>{a||fe(R,w,!0)}),()=>{a=!0}});var B={get toolUse(){return e()},set toolUse(p){e(p),h()},get animate(){return i()},set animate(p=!1){i(p),h()},get iconSize(){return o()},set iconSize(p=12){o(p),h()},get showIcon(){return g()},set showIcon(p=!0){g(p),h()},get class(){return u()},set class(p=""){u(p),h()},$set:ne,$on:(p,a)=>se(t,p,a)},F=le(),C=X(F);{var D=p=>{var a=Be(),w=U(a);{var W=_=>{var m=He(),N=U(m);{var O=x=>{ke(x,{get iconName(){return n(d).mcpSource},get label(){return n(d).mcpSource},get size(){return o()}})},Z=A(()=>n(d).mcpSource&&c.has(n(d).mcpSource)),j=x=>{we(x,{get icon(){return n(d).icon},class:"h-full! w-full! text-inherit opacity-[inherit]"})};L(N,x=>{n(Z)?x(O):x(j,-1)})}q(m),S(()=>{te(m,1,`agent-preview-tool-icon inline-flex shrink-0 items-center justify-center text-inherit opacity-[inherit] ${i()?"animate-pulse":""}`,"svelte-115ywqs"),ce(m,`width: ${o()??""}px; height: ${o()??""}px;`)}),f(_,m)};L(w,_=>{g()&&_(W)})}var E=T(w,2),V=G(E,!0);he(E,(_,m)=>Ce?.(_,m),()=>n(R)),q(a),S(()=>{te(a,1,`type-body inline-flex w-full min-w-0 items-center font-normal ${g()?"gap-1.5":""} ${u()??""}`,"svelte-115ywqs"),K(V,n(R))}),f(p,a)};L(C,p=>{n(d).hidden||p(D)})}return f(r,F),oe(B)}var Ve=H('<circle cx="12" cy="12" r="10" stroke-width="2" fill="none"></circle>'),Ze=H('<path d="M7 12.5L10.5 16L17 9" stroke="white" stroke-width="3.5" stroke-linecap="round" stroke-linejoin="round" fill="none"></path>'),Ge=H('<path d="M5 19L19 5" stroke-width="2.5" stroke-linecap="round"></path>'),Ue=H('<path d="M13.1372 17.7135C13.1372 18.1682 12.9566 18.6042 12.6351 18.9257C12.3136 19.2472 11.8776 19.4278 11.4229 19.4278C10.9683 19.4278 10.5322 19.2472 10.2107 18.9257C9.88925 18.6042 9.70864 18.1682 9.70864 17.7135C9.70864 17.2589 9.88925 16.8228 10.2107 16.5014C10.5322 16.1799 10.9683 15.9993 11.4229 15.9993C11.8776 15.9993 12.3136 16.1799 12.6351 16.5014C12.9566 16.8228 13.1372 17.2589 13.1372 17.7135ZM10.2109 7.07297C10.3957 6.88872 10.6201 6.7491 10.8671 6.66473C11.114 6.58037 11.377 6.55349 11.6359 6.58615C11.8948 6.61881 12.1428 6.71015 12.361 6.8532C12.5793 6.99625 12.762 7.18724 12.8953 7.4116C13.0285 7.63597 13.1088 7.8878 13.1299 8.14789C13.1511 8.40799 13.1126 8.66948 13.0174 8.91244C12.9222 9.1554 12.7728 9.37342 12.5805 9.54988C12.3883 9.72634 12.1583 9.85659 11.9081 9.93068C11.1212 10.1604 10.1372 10.901 10.1372 12.1421V12.5707C10.1372 12.9117 10.2727 13.2387 10.5138 13.4798C10.7549 13.7209 11.0819 13.8564 11.4229 13.8564C11.7639 13.8564 12.0909 13.7209 12.3321 13.4798C12.5732 13.2387 12.7086 12.9117 12.7086 12.5707V12.3735C13.3281 12.1785 13.8952 11.8451 14.3669 11.3988C14.8387 10.9524 15.2029 10.4046 15.4319 9.79683C15.6609 9.18906 15.7487 8.53719 15.6888 7.89048C15.6289 7.24377 15.4228 6.61913 15.0861 6.06376C14.7494 5.50838 14.2908 5.03681 13.7451 4.68466C13.1994 4.33251 12.5808 4.10899 11.936 4.03101C11.2912 3.95302 10.6371 4.0226 10.0232 4.23449C9.40925 4.44638 8.8515 4.79503 8.39207 5.25411C8.26933 5.37277 8.17145 5.51469 8.10414 5.67158C8.03683 5.82848 8.00145 5.9972 8.00004 6.16792C7.99864 6.33864 8.03125 6.50792 8.09597 6.6659C8.16069 6.82388 8.25623 6.96739 8.37701 7.08805C8.49778 7.20871 8.64138 7.30411 8.79942 7.36868C8.95746 7.43326 9.12677 7.46571 9.29749 7.46414C9.4682 7.46258 9.6369 7.42703 9.79373 7.35958C9.95056 7.29212 10.0924 7.19411 10.2109 7.07125V7.07297Z" fill="white" class="origin-center"></path>'),qe=H('<path d="M12 5.5V13.5" stroke="white" stroke-width="3" stroke-linecap="round"></path><circle cx="12" cy="17.5" r="1.6" fill="white" class="origin-center"></circle>',1),We=H('<path d="M11.6668 13.649C12.1044 13.649 12.5241 13.4751 12.8336 13.1656C13.1431 12.8562 13.3169 12.4365 13.3169 11.9988C13.3169 11.5611 13.1431 11.1414 12.8336 10.832C12.5241 10.5225 12.1044 10.3486 11.6668 10.3486C11.2291 10.3486 10.8094 10.5225 10.4999 10.832C10.1905 11.1414 10.0166 11.5611 10.0166 11.9988C10.0166 12.4365 10.1905 12.8562 10.4999 13.1656C10.8094 13.4751 11.2291 13.649 11.6668 13.649Z" fill="white" class="origin-center"></path><path fill-rule="evenodd" clip-rule="evenodd" d="M4.38506 12.3064C4.31566 12.1046 4.31566 11.8855 4.38506 11.6837C4.90912 10.1693 5.89241 8.85596 7.198 7.92665C8.50359 6.99734 10.0665 6.4983 11.669 6.49902C13.2716 6.49975 14.834 7.00021 16.1388 7.9307C17.4435 8.8612 18.4256 10.1754 18.9483 11.6903C19.0177 11.8921 19.0177 12.1112 18.9483 12.313C18.4245 13.8278 17.4412 15.1416 16.1355 16.0712C14.8298 17.0008 13.2666 17.5 11.6638 17.4993C10.0609 17.4986 8.49824 16.9979 7.19336 16.0671C5.88848 15.1363 4.90641 13.8217 4.38396 12.3064H4.38506ZM14.9681 11.9984C14.9681 12.8737 14.6204 13.7131 14.0015 14.3321C13.3825 14.951 12.5431 15.2987 11.6678 15.2987C10.7925 15.2987 9.95304 14.951 9.33411 14.3321C8.71517 13.7131 8.36746 12.8737 8.36746 11.9984C8.36746 11.1231 8.71517 10.2836 9.33411 9.66468C9.95304 9.04575 10.7925 8.69803 11.6678 8.69803C12.5431 8.69803 13.3825 9.04575 14.0015 9.66468C14.6204 10.2836 14.9681 11.1231 14.9681 11.9984Z" fill="white" class="origin-center"></path>',1),je=H('<svg viewBox="0 0 24 24" fill="none"><defs><clipPath><rect x="48%" y="0" width="100%" height="100%"></rect></clipPath></defs><circle cx="50%" cy="50%" class="transition-all duration-spring-slow ease-spring-slow motion-reduce:transition-none origin-center"></circle><circle cx="50%" cy="50%" r="45%" stroke-width="2.5" fill="none" class="transition-all duration-spring-slow ease-spring-slow motion-reduce:transition-none"></circle><!></svg>');function Ke(r,t){if(new.target)return re({component:Ke,...r});ie(t,!0);const c=new Set(["not_started","waiting","discussion_needed","blocked","in_progress","review_required","complete","cancelled"]);let e=v(t,"status",7),i=v(t,"size",7,16),o=v(t,"onclick",7);const g=Math.random().toString(36).substring(2,9);let u=A(()=>e()==="todo"?"not_started":e()==="in-progress"?"in_progress":e()==="done"?"complete":typeof e()=="string"&&c.has(e())?e():"unknown");const d={not_started:{stroke:"#99999966",fill:"transparent",innerCircleRPercentage:0},waiting:{stroke:"#99999966",fill:"transparent",innerCircleRPercentage:0},discussion_needed:{stroke:"#f59e0b",fill:"#f59e0b",innerCircleRPercentage:100},blocked:{stroke:"#ef4444",fill:"#ef4444",innerCircleRPercentage:100},in_progress:{stroke:"#00BCFF",fill:"#00BCFF",innerCircleRPercentage:55},review_required:{stroke:"#3b82f6",fill:"#3b82f6",innerCircleRPercentage:100},complete:{stroke:"#22c55e",fill:"#00BD7D",innerCircleRPercentage:100},cancelled:{stroke:"#99999966",fill:"#99999966",innerCircleRPercentage:0},unknown:{stroke:"#99999966",fill:"transparent",innerCircleRPercentage:0}};let y=A(()=>d[n(u)]||d.not_started);const R={not_started:k.tiptap_taskStatus_notStarted_label,waiting:k.tiptap_taskStatus_waiting_label,discussion_needed:k.tiptap_taskStatus_discussionNeeded_label,blocked:k.tiptap_taskStatus_blocked_label,in_progress:k.tiptap_taskStatus_inProgress_label,review_required:k.tiptap_taskStatus_reviewRequired_label,complete:k.tiptap_taskStatus_complete_label,cancelled:k.tiptap_taskStatus_cancelled_label,unknown:k.tiptap_taskStatus_unknown_label};let B=A(()=>(R[n(u)]??k.tiptap_taskStatus_unknown_label)());var F={get status(){return e()},set status(C){e(C),h()},get size(){return i()},set size(C=16){i(C),h()},get onclick(){return o()},set onclick(C){o(C),h()},$set:ne,$on:(C,D)=>se(t,C,D)};{let C=A(()=>k.tiptap_taskStatus_status_tooltip({status:n(B)}));Se(r,{type:"button",variant:"ghost",size:"icon-compact",iconOnly:!0,class:"task-status-icon shrink-0 cursor-pointer bg-transparent border-0 focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-1 focus-visible:ring-primary-ink rounded-full",get style(){return`width: ${i()??""}px; height: ${i()??""}px;`},get onclick(){return o()},get title(){return n(C)},children:(D,p)=>{var a=je(),w=U(a),W=G(w),E=T(w),V=T(E),_=T(V);{var m=s=>{},N=s=>{var l=Ve();S(()=>M(l,"stroke",n(y).stroke)),f(s,l)},O=s=>{var l=Ze();z(3,l,()=>$,()=>({tier:"slow"})),f(s,l)},Z=s=>{var l=Ge();S(()=>M(l,"stroke",n(y).stroke)),z(3,l,()=>$,()=>({tier:"slow"})),f(s,l)},j=s=>{var l=Ue();z(3,l,()=>J,()=>({tier:"slow"})),f(s,l)},x=s=>{var l=qe(),b=X(l),I=T(b);z(3,b,()=>$,()=>({tier:"slow"})),z(3,I,()=>J,()=>({tier:"slow"})),f(s,l)},Q=s=>{var l=We(),b=X(l),I=T(b);z(3,b,()=>J,()=>({tier:"slow"})),z(3,I,()=>J,()=>({tier:"slow"})),f(s,l)};L(_,s=>{n(u)==="not_started"||n(u)==="waiting"?s(m):n(u)==="in_progress"?s(N,1):n(u)==="complete"?s(O,2):n(u)==="cancelled"?s(Z,3):n(u)==="discussion_needed"?s(j,4):n(u)==="blocked"?s(x,5):n(u)==="review_required"&&s(Q,6)})}q(a),S(()=>{M(a,"width",i()),M(a,"height",i()),ce(a,`width: ${i()??""}px; height: ${i()??""}px;`),M(W,"id",`half-clip-${g??""}`),M(E,"r",`${n(y).innerCircleRPercentage*.5}%`),M(E,"fill",n(y).fill),M(E,"clip-path",n(u)==="in_progress"?`url(#half-clip-${g})`:"none"),M(V,"stroke",n(y).stroke)}),f(D,a)},$$slots:{default:!0}})}return oe(F)}export{Fe as A,Ae as L,Ke as T,Oe as a,ut as o,ze as r};
@@ -1 +0,0 @@
1
- function e(n){return!n.connections?.hasReceivedList||n.daemonHealth?.health==="down"||!n.workspaceEvents?.subscriptionGeneration||n.workspaceEvents.subscriptionPending===!0||n.connections.authRejected?.id===n.connections.windowBackendId?null:JSON.stringify([n.connections.windowBackendId,n.daemonHealth?.connectionGeneration,n.workspaceEvents.subscriptionGeneration])}function p(n){const i=e(n),t=n.principal;if(t?.status!=="ready"||!i||t.context!==i)return null;const r=t.snapshot;if(!r)return null;const o=r.capabilities.hostMembership?r.principal.hostRole??null:r.principal.isAdministrator?"owner":"guest";return JSON.stringify([i,r.principal.id,r.principal.hostMembershipRevision??null,o,t.invalidation,t.presentationVersion])}function a(n){const i=e(n),t=n.principal;if(t?.status!=="ready"||!i||t.context!==i)return null;const r=t.snapshot?.principal.id;return r?JSON.stringify([n.connections.windowBackendId,r]):null}function s(n){if(n.provider==="github")return n.host==="github.com";if(n.provider!=="gitlab"||!n.host)return!1;try{const i=new URL(`https://${n.host}`);return i.host===n.host&&i.pathname==="/"&&!i.username&&!i.password&&!i.search&&!i.hash}catch{return!1}}function d(n){if(!n||typeof n!="object")return!1;const i=n;return s(i)&&typeof i.externalUserId=="string"&&i.externalUserId.length>0}var c=(n=>(n.Unstaged="unstaged",n.Staged="staged",n.Committed="committed",n.Pushed="pushed",n.PullRequest="pull_request",n.Merged="merged",n.Trunk="trunk",n))(c||{});export{c as C,e as a,a as b,p as g,d as i};