@acedatacloud/nexior 3.374.0 → 3.375.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 (276) hide show
  1. package/dist/assets/{ApiCodeButton-DBIIyPcm.js → ApiCodeButton-CpRdry19.js} +1 -1
  2. package/dist/assets/{ApiCodeDialog-SgTrP35-.js → ApiCodeDialog-DQHdLFaR.js} +1 -1
  3. package/dist/assets/{Artifacts-Bv8c6c23.js → Artifacts-fyaNSRoG.js} +1 -1
  4. package/dist/assets/{AskUserQuestionCard-5upmtI3F.js → AskUserQuestionCard-zjS9mzsZ.js} +1 -1
  5. package/dist/assets/{AudioPreview-CO5m-MPN.js → AudioPreview-Ca5mIJa5.js} +1 -1
  6. package/dist/assets/{Auth-C_3Q01T9.js → Auth-DPiRRvu4.js} +1 -1
  7. package/dist/assets/{Bare-Bgcy9ZBE.js → Bare-Vrvyud2o.js} +1 -1
  8. package/dist/assets/{BotPlaceholder-D9exsWtJ.js → BotPlaceholder-IDq9_Pl7.js} +1 -1
  9. package/dist/assets/{BottomFooter-Cpt55XyN.js → BottomFooter-B5jPrf43.js} +1 -1
  10. package/dist/assets/{BrowseConnectors-DDaCrhbs.js → BrowseConnectors-BbaZ-3Gl.js} +1 -1
  11. package/dist/assets/{BrowserPairingDialog-BrWPFDvv.js → BrowserPairingDialog-DGJRNlEF.js} +1 -1
  12. package/dist/assets/{Callback-Dxh5oYOa.js → Callback-CAXJEbR2.js} +1 -1
  13. package/dist/assets/{CodeSnippet-BsfF8y-K.js → CodeSnippet-C6tRl74T.js} +1 -1
  14. package/dist/assets/{Console-DX8ah6RZ.js → Console-Bxt_sQHu.js} +1 -1
  15. package/dist/assets/{Conversation-jOky6QFU.js → Conversation-NzkF1Blx.js} +1 -1
  16. package/dist/assets/{Conversation-CGF5Pv35.js → Conversation-Uf07xeEj.js} +1 -1
  17. package/dist/assets/{CopyToClipboard-CaPuzTeQ.js → CopyToClipboard-Db0qgR8j.js} +1 -1
  18. package/dist/assets/{Detail-Do_URYhR.js → Detail-BBG1XhXL.js} +1 -1
  19. package/dist/assets/{Extra-BALtwRjN.js → Extra-C_ZcHH2P.js} +1 -1
  20. package/dist/assets/{FilePreview-D9sljXpn.js → FilePreview-D99je5SC.js} +1 -1
  21. package/dist/assets/{Hailuo-Dqi6oENw.js → Hailuo-DL88nkFd.js} +1 -1
  22. package/dist/assets/{History-BnMHhtb9.js → History-dm4QC9PX.js} +1 -1
  23. package/dist/assets/{ImagePreview-DBaF-RWM.js → ImagePreview-BlNKx02Q.js} +1 -1
  24. package/dist/assets/{ImageWrapper-B7c3P7Rp.js → ImageWrapper-DnHe8CWn.js} +1 -1
  25. package/dist/assets/{Index-h8LHd7to.js → Index-6xPeGiTS.js} +1 -1
  26. package/dist/assets/{Index-D6RtTR0S.js → Index-B-tQAqdN.js} +1 -1
  27. package/dist/assets/{Index-o2Kv6S1v.js → Index-BCPqRkqx.js} +1 -1
  28. package/dist/assets/{Index-D2u3DAyP.js → Index-BDKr6UVg.js} +1 -1
  29. package/dist/assets/{Index-DHNhF-7Z.js → Index-BQcKkBQV.js} +1 -1
  30. package/dist/assets/{Index-B_e8X3lR.js → Index-BUFuoJpW.js} +1 -1
  31. package/dist/assets/{Index-D2uwTXnV.js → Index-B_lskLcP.js} +1 -1
  32. package/dist/assets/{Index-CBWvzpUv.js → Index-B_uNsFCN.js} +1 -1
  33. package/dist/assets/{Index-CgZQ_vHY.js → Index-C2Hutsln.js} +1 -1
  34. package/dist/assets/{Index-DuK9WzML.js → Index-CAG_Matm.js} +1 -1
  35. package/dist/assets/{Index-C3Xg5_rD.js → Index-CMkmQzkv.js} +1 -1
  36. package/dist/assets/{Index-D0VEtNow.js → Index-CPfJIKxq.js} +1 -1
  37. package/dist/assets/{Index-C5n7st14.js → Index-CUnqIKna.js} +1 -1
  38. package/dist/assets/{Index-C-MhLOpV.js → Index-CUvYnUrv.js} +1 -1
  39. package/dist/assets/{Index-BRcf8_aI.js → Index-CcIAplCO.js} +1 -1
  40. package/dist/assets/{Index-DEg9qoqB.js → Index-CfWu7MOz.js} +1 -1
  41. package/dist/assets/{Index-6EQp8Djd.js → Index-Cfu97lFN.js} +1 -1
  42. package/dist/assets/{Index-DZeE-ePv.js → Index-CjTjUpNt.js} +1 -1
  43. package/dist/assets/{Index-rnPbAWjw.js → Index-Cmn9yVV_.js} +1 -1
  44. package/dist/assets/{Index-lqpxMyXe.js → Index-Cns2moIZ.js} +1 -1
  45. package/dist/assets/{Index-LRgJ_nsN.js → Index-CrJEhROj.js} +1 -1
  46. package/dist/assets/{Index-DNEKHbbD2.js → Index-CysG2Ayn2.js} +1 -1
  47. package/dist/assets/{Index-N-brMCrR.js → Index-D2Tx3TCq.js} +1 -1
  48. package/dist/assets/{Index-BfvWsCCs.js → Index-DAlEnN66.js} +1 -1
  49. package/dist/assets/{Index-Dibj94eG.js → Index-DBDW2JkF.js} +1 -1
  50. package/dist/assets/{Index-DgOG6dMN.js → Index-DJDMoG-n.js} +1 -1
  51. package/dist/assets/{Index-DN1YZ-qD.js → Index-DROvjae_.js} +1 -1
  52. package/dist/assets/{Index-Bn8GR3Dp.js → Index-DT7VoneT.js} +1 -1
  53. package/dist/assets/{Index-D0dMY9JE.js → Index-DgwZrNrV.js} +1 -1
  54. package/dist/assets/{Index-DyHHY0TK.js → Index-DjsmPBRY.js} +1 -1
  55. package/dist/assets/{Index-Cxnk8D6L.js → Index-DpH023Wn.js} +1 -1
  56. package/dist/assets/{Index-BfEjGMYY.js → Index-DqI9S1Qv.js} +1 -1
  57. package/dist/assets/{Index-Cioeau9t.js → Index-DtzDibDm.js} +1 -1
  58. package/dist/assets/{Index-h7_JkwcG.js → Index-Jg0_Ku-L.js} +1 -1
  59. package/dist/assets/{Index-CH0Qtl-U.js → Index-WsRj_MOo.js} +1 -1
  60. package/dist/assets/{Index-Dq-UvUyY.js → Index-yNIuTCiR.js} +1 -1
  61. package/dist/assets/{Invitees-C7Z_tbfl.js → Invitees-DPqPcVpZ.js} +1 -1
  62. package/dist/assets/{List-neAXCyf2.js → List-BkjalFU4.js} +1 -1
  63. package/dist/assets/{List-D3pfOeks.js → List-C2WOJkui.js} +1 -1
  64. package/dist/assets/{List-sKWhZB_b.js → List-sGWA28Vp.js} +1 -1
  65. package/dist/assets/{LocalTools-Co4IuNQp.js → LocalTools-BsUYypvZ.js} +1 -1
  66. package/dist/assets/{LocalTools-CURjPTl3.js → LocalTools-DMPBDPUy.js} +1 -1
  67. package/dist/assets/{Logo-CcnyAHG2.js → Logo-a_IUpjyi.js} +1 -1
  68. package/dist/assets/{Main-Bh0TsiI3.js → Main-CXPtVUVE.js} +1 -1
  69. package/dist/assets/{Message-CkA6luHF.js → Message-DiVAOITE.js} +1 -1
  70. package/dist/assets/{Model-BY0CeF_w.js → Model-DtIwYhY2.js} +1 -1
  71. package/dist/assets/{Navigator-vxqlT7Zw.js → Navigator-CdBpZH4M.js} +3 -3
  72. package/dist/assets/{NotFound-DeOf4Lmk.js → NotFound-CXiMJNHM.js} +1 -1
  73. package/dist/assets/{PageHeader-CoIHTlzp.js → PageHeader-I_IWLi_J.js} +1 -1
  74. package/dist/assets/{Pay-D1qVtYXO.js → Pay-BWM8ZekE.js} +1 -1
  75. package/dist/assets/{Player-WwC32zK4.js → Player-BUZdaSKw.js} +1 -1
  76. package/dist/assets/{Poivelle-w3LUq8sQ.js → Poivelle-CMxBTbVF.js} +1 -1
  77. package/dist/assets/{RealtimeCall-DEptKr-y.js → RealtimeCall-KU7v4FMN.js} +1 -1
  78. package/dist/assets/{ReportButton-DqBK7S8_.js → ReportButton-DBohgBX5.js} +1 -1
  79. package/dist/assets/{ReportDialog-BcyM6Mys.js → ReportDialog-C8y-vb_7.js} +1 -1
  80. package/dist/assets/{ScenarioPaymentMode-D9JSjV3-.js → ScenarioPaymentMode-Dr25voqT.js} +1 -1
  81. package/dist/assets/{ScheduledTasks-DlpEvJc3.js → ScheduledTasks-Db4Cgk3f.js} +1 -1
  82. package/dist/assets/{ServicePricingSummary-C1I-y6dH.js → ServicePricingSummary-CN_kQ9E8.js} +1 -1
  83. package/dist/assets/{ShowcaseGrid-6Ma1uGZt.js → ShowcaseGrid-D8Kp-zms.js} +1 -1
  84. package/dist/assets/{ShowcaseResultTabs-rMhxrzq3.js → ShowcaseResultTabs-B_aFfiMi.js} +1 -1
  85. package/dist/assets/{SolanaWalletPickerDialog-DmzZ-uJQ.js → SolanaWalletPickerDialog-Csxb3VVL.js} +1 -1
  86. package/dist/assets/{Status-CkzKt4ib.js → Status-rvZfPjPj.js} +1 -1
  87. package/dist/assets/{Subscribe-BwmBt3UL.js → Subscribe-BvWQReSy.js} +1 -1
  88. package/dist/assets/{TabSwitcher-Jf2B0-vC.js → TabSwitcher-DSv6B8Qg.js} +1 -1
  89. package/dist/assets/{Tts-BC01zHR_.js → Tts-CzUoWexU.js} +1 -1
  90. package/dist/assets/{VideoPlayer-CC3Fzeqq.js → VideoPlayer-ByFIN8Pz.js} +1 -1
  91. package/dist/assets/{VideoPreview-gtqNXvtJ.js → VideoPreview-DI5UZhOF.js} +1 -1
  92. package/dist/assets/{WriteSkillDialog-DxKxdZbp.js → WriteSkillDialog-njtydyP6.js} +1 -1
  93. package/dist/assets/{airwallexCheckout-CdX6OLbg.js → airwallexCheckout-BHNIy2Tw.js} +1 -1
  94. package/dist/assets/arrow-down-3ZwcPIyd.js +1 -0
  95. package/dist/assets/{arrow-down-wide-narrow-Bm2Z5o2d.js → arrow-down-wide-narrow-D-uOJGHw.js} +1 -1
  96. package/dist/assets/arrow-left-BUfU72AI.js +1 -0
  97. package/dist/assets/arrow-right-DU9hmChJ.js +1 -0
  98. package/dist/assets/arrow-up-CO5DClih.js +1 -0
  99. package/dist/assets/{authorizeFlow-IFKM_0Z8.js → authorizeFlow-dn4MchJ4.js} +1 -1
  100. package/dist/assets/{avatar-B1N5e5xG.js → avatar-D_IhQdl8.js} +1 -1
  101. package/dist/assets/{basic-7j1i_FPI.js → basic-DfXHoRBw.js} +1 -1
  102. package/dist/assets/{book-open-CnBkGve5.js → book-open-D4JeSvu4.js} +1 -1
  103. package/dist/assets/{box-C0GiZ7-u.js → box-BwvfBbaH.js} +1 -1
  104. package/dist/assets/{boxes-2cg2oc78.js → boxes-AV1PM_5l.js} +1 -1
  105. package/dist/assets/{brain-De0zKChZ.js → brain-D6NjGmAq.js} +1 -1
  106. package/dist/assets/{chart-no-axes-combined-DXPCYBnP.js → chart-no-axes-combined-CchjemK1.js} +1 -1
  107. package/dist/assets/{chat-D6FZdAFD.js → chat-1JKPdNAq.js} +1 -1
  108. package/dist/assets/{chat-D_cVYex_.js → chat-B7El78KB.js} +1 -1
  109. package/dist/assets/{chat-CsiZHLys.js → chat-BcTLs_NM.js} +1 -1
  110. package/dist/assets/{chat-lBYpL1ru.js → chat-Bxi3u7ju.js} +1 -1
  111. package/dist/assets/{chat-C2uqNw3P.js → chat-C-1vIYv4.js} +1 -1
  112. package/dist/assets/{chat-B3V3PQNf.js → chat-C0Su2-1J.js} +2 -2
  113. package/dist/assets/{chat-8q4HYSBH.js → chat-Cd1V35RN.js} +1 -1
  114. package/dist/assets/{chat-B_H4N5wh.js → chat-ChRpjtn3.js} +1 -1
  115. package/dist/assets/{chat-woD5EAiM.js → chat-DIPpKhoC.js} +1 -1
  116. package/dist/assets/{chat-4B5e6M7H.js → chat-DqhoZFnm.js} +1 -1
  117. package/dist/assets/{chat-Bk_GtTmW.js → chat-ZEPRHnOI.js} +1 -1
  118. package/dist/assets/{chat-Bi4-iPLs.js → chat-tVSSthP6.js} +1 -1
  119. package/dist/assets/{chat-CJbcUBPg.js → chat-v0-8emSy.js} +1 -1
  120. package/dist/assets/check-8okPvRJR.js +1 -0
  121. package/dist/assets/chevron-down-CE-v7C1Z.js +1 -0
  122. package/dist/assets/chevron-right-DRnWPhch.js +1 -0
  123. package/dist/assets/{circle-alert-FynFeKnI.js → circle-alert-CPUqplyh.js} +1 -1
  124. package/dist/assets/circle-check-PAy9V8Na.js +1 -0
  125. package/dist/assets/{circle-question-mark-C8xvGTGb.js → circle-question-mark-BdMy3-zg.js} +1 -1
  126. package/dist/assets/{clipboard-list-841pTGDa.js → clipboard-list-BlrQhAiR.js} +1 -1
  127. package/dist/assets/clock-BksO_Z0W.js +1 -0
  128. package/dist/assets/code-D-ejRMRt.js +1 -0
  129. package/dist/assets/{codingBridge-CyaSQuc1.js → codingBridge-DJQaspTz.js} +1 -1
  130. package/dist/assets/{codingBridgeNotify-CfKf4JbW.js → codingBridgeNotify-DYB7QEzg.js} +1 -1
  131. package/dist/assets/{coins-DA-dIOC6.js → coins-zEgi9zer.js} +1 -1
  132. package/dist/assets/{collapse-B_bQM9KN.js → collapse-ErXMQ5WV.js} +1 -1
  133. package/dist/assets/constants-C4mNoJOb.js +1 -0
  134. package/dist/assets/{copy-BNJ4Vvq_.js → copy-7FG4ee2f.js} +1 -1
  135. package/dist/assets/{createTaskActions-DtPQuKJS.js → createTaskActions-CrzF1_nG.js} +1 -1
  136. package/dist/assets/{date-picker-DRc3s80w.js → date-picker-ZMpEcBpW.js} +1 -1
  137. package/dist/assets/{digitalhuman-DsHsrai7.js → digitalhuman-DgMTY8rl.js} +1 -1
  138. package/dist/assets/{dollar-sign-B7sFSE65.js → dollar-sign-MqotZ43I.js} +1 -1
  139. package/dist/assets/{download-CAwranau.js → download-hDh-L00F.js} +1 -1
  140. package/dist/assets/{drawer-CkM_NHcO.js → drawer-fIKO5R-t.js} +1 -1
  141. package/dist/assets/{dropdown-Dq3sNHZD.js → dropdown-BpdvxDue.js} +1 -1
  142. package/dist/assets/{dropdown-BpefDnJp.js → dropdown-Br1nVdp7.js} +1 -1
  143. package/dist/assets/{ellipsis-POyVAzgA.js → ellipsis-DwHZbxHC.js} +1 -1
  144. package/dist/assets/{esm-Bf4QHayu.js → esm-DclO1JPL.js} +2 -2
  145. package/dist/assets/{external-link-eI3g6xpp.js → external-link-C29Uuu4h.js} +1 -1
  146. package/dist/assets/{eye-Ces_jYmy.js → eye-CgU_4WhV.js} +1 -1
  147. package/dist/assets/{file-COdWS7Yw.js → file-VWYkzRuc.js} +1 -1
  148. package/dist/assets/{file-output-Rckcbv_F.js → file-output-D92hF3YQ.js} +1 -1
  149. package/dist/assets/{file-text-DhO9-O7o.js → file-text-BHxDInDT.js} +1 -1
  150. package/dist/assets/{fish-DDjd2Wg6.js → fish-B9PEbkB-.js} +1 -1
  151. package/dist/assets/{flux-DepHkctW.js → flux-D8usFLyj.js} +1 -1
  152. package/dist/assets/{folder-B4Jjo77l.js → folder-C0Vt7TDW.js} +1 -1
  153. package/dist/assets/gauge-38IC0I72.js +1 -0
  154. package/dist/assets/{generationInput-Df1upTx9.js → generationInput-ChFil-22.js} +1 -1
  155. package/dist/assets/{globe-CEk5a0cn.js → globe-DsTAId5U.js} +1 -1
  156. package/dist/assets/{grokvideo-Co5-RZJD.js → grokvideo-CImTv2UN.js} +1 -1
  157. package/dist/assets/{hailuo-DMoPPvUl.js → hailuo-CbRlh5hS.js} +1 -1
  158. package/dist/assets/{headphones-DxEzVzix.js → headphones-DWwur3q7.js} +1 -1
  159. package/dist/assets/{history-P1COJCLH.js → history-DAREAhUe.js} +1 -1
  160. package/dist/assets/{house-qa6WrFu9.js → house-C63Sbnaj.js} +1 -1
  161. package/dist/assets/{i18n-3aZQnVTW.js → i18n-BEtZpGSv.js} +1 -1
  162. package/dist/assets/{image-DfZ-yD3f.js → image-YNq1hsaX.js} +1 -1
  163. package/dist/assets/{imageRequests-DIYH9CLr.js → imageRequests-CNbusBG4.js} +1 -1
  164. package/dist/assets/{index-BHXtbt9o.js → index-Dn-8sNW2.js} +4 -4
  165. package/dist/assets/{index.es-C_Gq4vgy.js → index.es-O4UnpgB0.js} +1 -1
  166. package/dist/assets/{info-xIzYgAiV.js → info-CX46K-2a.js} +1 -1
  167. package/dist/assets/{input-number-VyPGUhHP.js → input-number-DQQ_jclw.js} +1 -1
  168. package/dist/assets/{key-round-CL1Zurw8.js → key-round-Dx21hPfT.js} +1 -1
  169. package/dist/assets/{kling-C1-5IiSC.js → kling-CWzyPsGB.js} +1 -1
  170. package/dist/assets/{languages-CDk9EAaf.js → languages-ry74yECk.js} +1 -1
  171. package/dist/assets/{laptop-BlMF8fEG.js → laptop-CmGkKcLs.js} +1 -1
  172. package/dist/assets/{lightbulb-d6wy4poq.js → lightbulb-DEnEsxma.js} +1 -1
  173. package/dist/assets/{link-6giGq_cF.js → link-S80Vo5YT.js} +1 -1
  174. package/dist/assets/loader-circle-CMan_y4T.js +1 -0
  175. package/dist/assets/{lock-cFepzwhs.js → lock-BACuEQud.js} +1 -1
  176. package/dist/assets/{luma-Eq1wRQnR.js → luma-CsqOTNTl.js} +1 -1
  177. package/dist/assets/{maestro-0ulY9gMw.js → maestro-Dr6BVUlA.js} +1 -1
  178. package/dist/assets/{maestroLanguages-CczPeCVu.js → maestroLanguages-BvTWQBEt.js} +1 -1
  179. package/dist/assets/{mail-NnEBpr3-.js → mail-BjsX70Ra.js} +1 -1
  180. package/dist/assets/{message-circle-DBJKZmSe.js → message-circle-BnmUAMcf.js} +1 -1
  181. package/dist/assets/{mic-DPRovWzT.js → mic-Cy088pRc.js} +1 -1
  182. package/dist/assets/{midjourney-K2rr_-Oi.js → midjourney-C73M_okC.js} +1 -1
  183. package/dist/assets/{minimax-CauLdfeU.js → minimax-B_1MYCHz.js} +1 -1
  184. package/dist/assets/{mobileLocalExec-mQzutnPF.js → mobileLocalExec-DBwASoYt.js} +1 -1
  185. package/dist/assets/{models-CSuuDqRA.js → models-BWtS-s13.js} +1 -1
  186. package/dist/assets/{monitor-Cf_suH9d.js → monitor-B2Fsh0_H.js} +1 -1
  187. package/dist/assets/{mouse-pointer-2-CgCiODhx.js → mouse-pointer-2-CdL9cbWa.js} +1 -1
  188. package/dist/assets/music-2-DaPeZgoi.js +1 -0
  189. package/dist/assets/{nanobanana-yHjhfh57.js → nanobanana-DiMJfARU.js} +1 -1
  190. package/dist/assets/{omni-CauuzHoU.js → omni-CoYnCYnO.js} +1 -1
  191. package/dist/assets/{openaiimage-BR52tx59.js → openaiimage-CTa5az1H.js} +1 -1
  192. package/dist/assets/{pagination-DuM0KuRQ.js → pagination-BG96U0D_.js} +1 -1
  193. package/dist/assets/{pagination-SWvC0yg5.js → pagination-CoBnk3Ai.js} +1 -1
  194. package/dist/assets/{pagination-BeJR0FnO.js → pagination-D8iNbVKJ.js} +1 -1
  195. package/dist/assets/{palette-DldUt8tv.js → palette-COM7QAlM.js} +1 -1
  196. package/dist/assets/{paperclip-CWFcTsCu.js → paperclip-CiFF6idQ.js} +1 -1
  197. package/dist/assets/{pause-CCpGY3qg.js → pause-BOLN-wzc.js} +1 -1
  198. package/dist/assets/{pencil-CviRmSpy.js → pencil-2LG-UuFD.js} +1 -1
  199. package/dist/assets/{pika-CGSOn140.js → pika-CAtsFh44.js} +1 -1
  200. package/dist/assets/{pixverse-hqijNgdF.js → pixverse-DKsGFE5o.js} +1 -1
  201. package/dist/assets/play-tG5O8bbR.js +1 -0
  202. package/dist/assets/{plug-CCpoxaDM.js → plug-BRLAjEWN.js} +1 -1
  203. package/dist/assets/plus-oRS-6XRp.js +1 -0
  204. package/dist/assets/{poivelle-BetUJVZU.js → poivelle-G50BPl4d.js} +1 -1
  205. package/dist/assets/{popover-14jHG21y.js → popover-IhXMoX-P.js} +1 -1
  206. package/dist/assets/{producer-FVRoLWlQ.js → producer-DVOljhLQ.js} +1 -1
  207. package/dist/assets/{qrart-DyTDi4GZ.js → qrart-Dpl4PdcX.js} +1 -1
  208. package/dist/assets/{qwenimage-nE6zZ0LS.js → qwenimage-DwUPocYl.js} +1 -1
  209. package/dist/assets/{realtime-CWG_Ti28.js → realtime-FlQvxNn2.js} +1 -1
  210. package/dist/assets/{refresh-cw-LcYscKQ-.js → refresh-cw-7WsjAEts.js} +1 -1
  211. package/dist/assets/rotate-ccw-M5uJlVv8.js +1 -0
  212. package/dist/assets/rotate-cw-BclxKwik.js +1 -0
  213. package/dist/assets/{row-D_DEh6Xl.js → row-C3d900Dh.js} +1 -1
  214. package/dist/assets/search-MoJY2mLN.js +1 -0
  215. package/dist/assets/{seedance-6PiEj-B2.js → seedance-MsEPFoYf.js} +1 -1
  216. package/dist/assets/{seedream-yHV_q-Ae.js → seedream-_xRcvVI9.js} +1 -1
  217. package/dist/assets/{select-CD3MG9sV.js → select-BhxIomVL.js} +1 -1
  218. package/dist/assets/{serp-Cq0cLf_x.js → serp-C0xhKx9W.js} +1 -1
  219. package/dist/assets/{shield-Cm7slfR-.js → shield-2D4IamW1.js} +1 -1
  220. package/dist/assets/{showcase-DYvH5oMm.js → showcase-_a8WgiCY.js} +1 -1
  221. package/dist/assets/{showcaseRecreateMixin-CT2Cvorb.js → showcaseRecreateMixin-DnJxBt5l.js} +1 -1
  222. package/dist/assets/{shuffle-B1KYbijI.js → shuffle-CO64087x.js} +1 -1
  223. package/dist/assets/{siteHome-DDAyaghg.js → siteHome-2MMd6PGi.js} +1 -1
  224. package/dist/assets/{slider-BIlpcCpb.js → slider-BQmgjRhY.js} +1 -1
  225. package/dist/assets/{solana-wallets-DR-tBP0Q.js → solana-wallets-DM2n_fl5.js} +2 -2
  226. package/dist/assets/{sora-D3Oa75Xq.js → sora-E5QXxv5E.js} +1 -1
  227. package/dist/assets/{sparkles-DP6P2HKD.js → sparkles-BbBPUybn.js} +1 -1
  228. package/dist/assets/square-N1_hTOAE.js +1 -0
  229. package/dist/assets/{store-LrvK8rpV.js → store-BRVYdymv.js} +1 -1
  230. package/dist/assets/{suno-CLaEQFqS.js → suno-8BfJH1ZD.js} +1 -1
  231. package/dist/assets/{switch-CPDNjdtX.js → switch-CYqcNNsc.js} +1 -1
  232. package/dist/assets/{table-CTGYIkVp.js → table-C3DgtnsI.js} +1 -1
  233. package/dist/assets/{tabs-O76shONs.js → tabs-BRZesBUp.js} +1 -1
  234. package/dist/assets/{tag-CrzKKwWK.js → tag-CGAMSdmM.js} +1 -1
  235. package/dist/assets/{taskPolling-Cpolqm-4.js → taskPolling-BZB1PW-e.js} +1 -1
  236. package/dist/assets/terminal-DohjAQkV.js +1 -0
  237. package/dist/assets/{time-picker-CB3JdUZX.js → time-picker-DFBRIpMK.js} +1 -1
  238. package/dist/assets/{tooltip-BKeGCQnC.js → tooltip-DnBNFRyX.js} +1 -1
  239. package/dist/assets/{trash-2-1--IdOz8.js → trash-2-UoD61laP.js} +1 -1
  240. package/dist/assets/{triangle-alert-CsggA_lm.js → triangle-alert-hKICrvdJ.js} +1 -1
  241. package/dist/assets/{upload-QoHt30kH.js → upload-BHlKa9Ox.js} +1 -1
  242. package/dist/assets/{upload-C1ZLDC6M.js → upload-BK5O5g9h.js} +1 -1
  243. package/dist/assets/user-DsJxBb48.js +1 -0
  244. package/dist/assets/{veo-DgIXEVsh.js → veo-CiVi874k.js} +1 -1
  245. package/dist/assets/{video-ByywsO-8.js → video-Bktq2Sxg.js} +1 -1
  246. package/dist/assets/{volume-2-qWcpmyoS.js → volume-2-BGmJGVXb.js} +1 -1
  247. package/dist/assets/{wallet-BnFgg2rL.js → wallet-s-F28wTh.js} +1 -1
  248. package/dist/assets/{wan-CAJwbpzm.js → wan-QsfHInEx.js} +1 -1
  249. package/dist/assets/{wand-sparkles-D1YhC4me.js → wand-sparkles-C34nh3wP.js} +1 -1
  250. package/dist/assets/{web-BqjUMapP.js → web-DDV8fE0w.js} +1 -1
  251. package/dist/assets/{webextrator-D2P5CJFc.js → webextrator-DZfVHymI.js} +1 -1
  252. package/dist/assets/{zap-B41N3VAA.js → zap-CvvvDO7R.js} +1 -1
  253. package/dist/index.html +4 -4
  254. package/package.json +1 -1
  255. package/dist/assets/arrow-down-CSGt9t2E.js +0 -1
  256. package/dist/assets/arrow-left-l3XZii7G.js +0 -1
  257. package/dist/assets/arrow-right-DldGU1an.js +0 -1
  258. package/dist/assets/arrow-up-4Sf4V16e.js +0 -1
  259. package/dist/assets/check-Cmnz4Bu0.js +0 -1
  260. package/dist/assets/chevron-down-DHjWJMvN.js +0 -1
  261. package/dist/assets/chevron-right-hDs_4ftT.js +0 -1
  262. package/dist/assets/circle-check-CrhnV2f6.js +0 -1
  263. package/dist/assets/clock-B7yL_XXj.js +0 -1
  264. package/dist/assets/code-CDH4NELE.js +0 -1
  265. package/dist/assets/constants-BmcMHgPT.js +0 -1
  266. package/dist/assets/gauge-CCcCam0v.js +0 -1
  267. package/dist/assets/loader-circle-B3QYalEy.js +0 -1
  268. package/dist/assets/music-2-BgZoB-sB.js +0 -1
  269. package/dist/assets/play-gSzuLJWl.js +0 -1
  270. package/dist/assets/plus-CwKarPA6.js +0 -1
  271. package/dist/assets/rotate-ccw-Bo7KtpMu.js +0 -1
  272. package/dist/assets/rotate-cw-CD8xES6w.js +0 -1
  273. package/dist/assets/search-b_c_47BV.js +0 -1
  274. package/dist/assets/square-DuewWOOD.js +0 -1
  275. package/dist/assets/terminal-TymL8Q-5.js +0 -1
  276. package/dist/assets/user-avGCO_1o.js +0 -1
@@ -1 +1 @@
1
- import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,N as s,T as c,at as l,j as u,mt as d,qt as f,rt as p,tt as m,z as h}from"./vendor-chart-Dw-P17PN.js";import{r as g,t as _}from"./select-CD3MG9sV.js";import{t as v}from"./upload-QoHt30kH.js";import{t as y}from"./tooltip-BKeGCQnC.js";import{t as b}from"./alert-BprQRUmf.js";import{h as x,v as S}from"./models-CSuuDqRA.js";import{t as C}from"./progress-BuyYfFZn.js";import{t as w}from"./clock-B7yL_XXj.js";import{a as T,i as E,n as D,r as O,s as k,t as A}from"./pagination-BeJR0FnO.js";import{t as ee}from"./info-xIzYgAiV.js";import{t as j}from"./trash-2-1--IdOz8.js";import{t as M}from"./triangle-alert-CsggA_lm.js";import{t as N}from"./upload-C1ZLDC6M.js";import{t as P}from"./wand-sparkles-D1YhC4me.js";import{A as F,Ba as te,Cn as ne,Ha as re,O as I,Vi as L,Wa as R,_r as z,at as B,ca as V,ct as H,ea as U,et as W,fo as G,io as K,it as q,ot as J,pi as Y,st as X,ui as ie,vr as Z,zi as Q}from"./index-BHXtbt9o.js";import{t as ae}from"./CopyToClipboard-CaPuzTeQ.js";import{t as oe}from"./ReportButton-DqBK7S8_.js";import{t as se}from"./ImagePreview-DBaF-RWM.js";import{t as ce}from"./ServicePricingSummary-C1I-y6dH.js";import{t as le}from"./AudioPreview-CO5m-MPN.js";import{t as ue}from"./VideoPlayer-CC3Fzeqq.js";import{t as de}from"./ScenarioPaymentMode-D9JSjV3-.js";import{t as fe}from"./BotPlaceholder-D9exsWtJ.js";import{t as pe}from"./taskPollingMixin-CcLxtz8z.js";import{t as me}from"./Hailuo-Dqi6oENw.js";var he=h({name:`MinimaxFieldTitle`,components:{InfoIcon:T},props:{title:{type:String,required:!0},description:{type:String,required:!0},inline:{type:Boolean,default:!1}}}),ge={class:`m-0 text-[14px] font-bold`};function _e(t,r,o,c,u,d){let f=l(`info-icon`);return m(),s(`div`,{class:n([`flex min-h-8 items-center`,{"mb-[10px]":!t.inline}])},[e(`h2`,ge,i(t.title),1),a(f,{content:t.description},null,8,[`content`])],2)}var ve=F(he,[[`render`,_e]]),ye=h({name:`MinimaxReferenceMediaInput`,components:{AudioPreview:le,CloseIcon:re,ElButton:K,ElProgress:C,ElUpload:v,ImagePreview:se,InfoIcon:T,UploadIcon:N},mixins:[H,X,B,W],props:{modelValue:{type:Array,default:()=>[]},kind:{type:String,required:!0},title:{type:String,required:!0},description:{type:String,required:!0},limit:{type:Number,required:!0}},emits:[`update:modelValue`],data(){return{fileList:[],uploadUrl:te()+`/api/v1/files/`}},computed:{accept(){return this.kind===`image`?`.png,.jpg,.jpeg,.gif,.bmp,.webp,image/*`:`.mp3,.wav,.m4a,.aac,.ogg,.flac,audio/*`},pasteAccept(){return this.accept},headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}}},watch:{modelValue:{immediate:!0,handler(e){let t=this.fileList.filter(e=>!this.uploadedUrl(e)),n=e.map(e=>this.fileList.find(t=>this.uploadedUrl(t)===e)||{name:e.split(`/`).pop()||e,url:e,status:`success`,percentage:100,response:{file_url:e}});this.fileList=[...n,...t]}}},methods:{uploadedUrl(e){return e.response?.file_url},onChange(e){!e.url&&e.raw&&(e.url=URL.createObjectURL(e.raw))},onError(){S.error(this.$t(`minimax.message.uploadError`))},onExceed(){S.warning(this.$t(`minimax.message.${this.kind}Limit`))},onSuccess(e,t){e?.file_url&&(t.url?.startsWith(`blob:`)&&URL.revokeObjectURL(t.url),t.url=e.file_url,t.response=e),this.emitUrls()},removeFile(e,t){this.fileList.splice(e,1),t.url?.startsWith(`blob:`)&&URL.revokeObjectURL(t.url),this.emitUrls()},emitUrls(){this.$emit(`update:modelValue`,this.fileList.map(e=>this.uploadedUrl(e)).filter(e=>!!e))}}}),be={class:`mb-[10px] flex min-h-8 w-full items-center justify-between gap-3`},xe={class:`flex min-w-0 items-center`},Se={class:`m-0 text-[14px] font-bold`},Ce={key:0,class:`flex flex-wrap gap-[10px]`},we=[`aria-label`,`onClick`];function Te(t,n,f,h,g,_){let v=l(`info-icon`),y=l(`upload-icon`),b=l(`el-button`),x=l(`el-upload`),S=l(`image-preview`),C=l(`audio-preview`),w=l(`el-progress`),T=l(`close-icon`);return m(),s(`div`,null,[e(`div`,be,[e(`div`,xe,[e(`h2`,Se,i(t.title),1),a(v,{content:t.description},null,8,[`content`])]),a(x,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,name:`file`,class:`shrink-0`,accept:t.accept,limit:t.limit,multiple:!0,"show-file-list":!1,"before-upload":t.beforeUploadSizeGuard,action:t.uploadUrl,headers:t.headers,"on-change":t.onChange,"on-error":t.onError,"on-exceed":t.onExceed,"on-success":t.onSuccess},{default:d(()=>[a(b,{size:`small`,type:`primary`,round:``},{default:d(()=>[a(y,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`minimax.button.upload`)),1)]),_:1})]),_:1},8,[`file-list`,`accept`,`limit`,`before-upload`,`action`,`headers`,`on-change`,`on-error`,`on-exceed`,`on-success`])]),t.fileList.length?(m(),s(`div`,Ce,[(m(!0),s(c,null,p(t.fileList,(n,r)=>(m(),s(`div`,{key:n.uid||t.uploadedUrl(n)||r,class:`relative`},[t.kind===`image`?(m(),u(S,{key:0,url:n.url||t.uploadedUrl(n),name:n.name,percentage:n.percentage,onRemove:e=>t.removeFile(r,n)},null,8,[`url`,`name`,`percentage`,`onRemove`])):(m(),s(c,{key:1},[t.uploadedUrl(n)?(m(),u(C,{key:0,url:t.uploadedUrl(n),name:n.name},null,8,[`url`,`name`])):(m(),u(w,{key:1,type:`circle`,percentage:n.percentage||0,width:50,"stroke-width":3},null,8,[`percentage`])),e(`button`,{type:`button`,class:`remove-button`,"aria-label":t.$t(`common.button.delete`),onClick:e=>t.removeFile(r,n)},[a(T,{size:`0.75em`,"aria-hidden":`true`,focusable:`false`})],8,we)],64))]))),128))])):o(``,!0)])}var Ee=F(ye,[[`render`,Te],[`__scopeId`,`data-v-155379bf`]]),De=e=>{if(!e.content.some(e=>e.type===`text`&&e.text.trim()))return`promptRequired`;if(e.content.filter(e=>e.type===`image_url`).length>9)return`imageLimit`;if(e.content.filter(e=>e.type===`audio_url`).length>3)return`audioLimit`;if(!e.content.some(e=>e.type!==`text`)&&e.ratio===`adaptive`)return`textRatioRequired`},Oe=h({name:`MinimaxConfigPanel`,components:{MagicIcon:P,ServicePricingSummary:ce,ElButton:K,ElInput:G,ElOption:_,ElSelect:g,FieldTitle:ve,PromptTextarea:E,ReferenceMediaInput:Ee,ScenarioPaymentMode:de},emits:[`generate`],data(){return{form:{prompt:``,imageUrls:[],audioUrls:[],resolution:`2K`,ratio:`16:9`,duration:4},resolutions:[`768P`,`2K`],ratios:[{value:`adaptive`,width:`21px`,height:`21px`},{value:`21:9`,width:`28px`,height:`12px`},{value:`16:9`,width:`25px`,height:`13px`},{value:`4:3`,width:`22px`,height:`17px`},{value:`1:1`,width:`19px`,height:`19px`},{value:`3:4`,width:`17px`,height:`22px`},{value:`9:16`,width:`13px`,height:`25px`}],durations:Array.from({length:12},(e,t)=>t+4),quoteTimer:0,quoteRunId:0}},computed:{config(){let e=[],t=this.form.prompt.trim();t&&e.push({type:`text`,text:t});let n=this.form.imageUrls.length>1||this.form.audioUrls.length>0;return this.form.imageUrls.forEach(t=>{e.push({type:`image_url`,image_url:{url:t},role:n?`reference_image`:`first_frame`})}),this.form.audioUrls.forEach(t=>{e.push({type:`audio_url`,audio_url:{url:t},role:`reference_audio`})}),{model:`MiniMax-H3`,content:e,resolution:this.form.resolution,ratio:this.form.imageUrls.length===1&&!this.form.audioUrls.length?`adaptive`:this.form.ratio,duration:this.form.duration}},consumption(){return ne(this.config,this.service?.cost)},service(){return this.$store.state.minimax?.service},walletMode(){return Q()&&L(`minimax`).mode===`wallet`}},watch:{walletMode:{handler(e){e&&this.scheduleQuote()},immediate:!0},config:{handler(e){this.$store.commit(`minimax/setConfig`,e),this.walletMode&&this.scheduleQuote()},deep:!0,immediate:!0}},beforeUnmount(){window.clearTimeout(this.quoteTimer),this.quoteRunId+=1},methods:{scheduleQuote(){window.clearTimeout(this.quoteTimer),this.quoteTimer=window.setTimeout(this.refreshQuote,350)},async refreshQuote(){let e=L(`minimax`),t=++this.quoteRunId;e.quoteLoading=!0,e.quoteUsdc=void 0;try{let n=await Z.quote(z(this.config));t===this.quoteRunId&&e.mode===`wallet`&&(e.quoteUsdc=n.amountUsdc)}catch(e){console.warn(`x402 quote failed`,e)}finally{t===this.quoteRunId&&(e.quoteLoading=!1)}},onGenerate(){let e=De(this.config);if(e){S.warning(this.$t(`minimax.message.${e}`));return}this.$emit(`generate`)}}}),ke={class:`flex flex-col h-full`},Ae={class:`flex-1 overflow-y-auto p-5`},je={class:`mb-4`},Me={class:`mb-4`},Ne={class:`option-grid`},Pe=[`aria-pressed`,`onClick`],Fe={class:`mb-4`},Ie={class:`ratio-options`},Le=[`aria-pressed`,`onClick`],Re={class:`ratio-preview`},ze={class:`setting-row mb-4`},Be={class:`flex flex-col items-center justify-center px-5 pb-5`};function Ve(t,h,g,_,v,y){let b=l(`field-title`),x=l(`el-input`),S=l(`prompt-textarea`),C=l(`reference-media-input`),w=l(`el-option`),T=l(`el-select`),E=l(`scenario-payment-mode`),D=l(`service-pricing-summary`),O=l(`magic-icon`),k=l(`el-button`);return m(),s(`div`,ke,[e(`div`,Ae,[e(`div`,je,[a(b,{title:t.$t(`minimax.name.model`),description:t.$t(`minimax.description.model`)},null,8,[`title`,`description`]),a(x,{"model-value":`MiniMax-H3`,disabled:``})]),a(S,{modelValue:t.form.prompt,"onUpdate:modelValue":h[0]||=e=>t.form.prompt=e,class:`mb-4`,title:t.$t(`minimax.name.prompt`),info:t.$t(`minimax.description.prompt`),placeholder:t.$t(`minimax.placeholder.prompt`),"min-rows":4},null,8,[`modelValue`,`title`,`info`,`placeholder`]),a(C,{modelValue:t.form.imageUrls,"onUpdate:modelValue":h[1]||=e=>t.form.imageUrls=e,class:`mb-4`,kind:`image`,title:t.$t(`minimax.name.referenceImages`),description:t.$t(`minimax.description.referenceImages`),limit:9},null,8,[`modelValue`,`title`,`description`]),a(C,{modelValue:t.form.audioUrls,"onUpdate:modelValue":h[2]||=e=>t.form.audioUrls=e,class:`mb-4`,kind:`audio`,title:t.$t(`minimax.name.referenceAudios`),description:t.$t(`minimax.description.referenceAudios`),limit:3},null,8,[`modelValue`,`title`,`description`]),e(`div`,Me,[a(b,{title:t.$t(`minimax.name.resolution`),description:t.$t(`minimax.description.resolution`)},null,8,[`title`,`description`]),e(`div`,Ne,[(m(!0),s(c,null,p(t.resolutions,e=>(m(),s(`button`,{key:e,type:`button`,class:n([`option-button`,{active:t.form.resolution===e}]),"aria-pressed":t.form.resolution===e,onClick:n=>t.form.resolution=e},i(e),11,Pe))),128))])]),e(`div`,Fe,[a(b,{title:t.$t(`minimax.name.ratio`),description:t.$t(`minimax.description.ratio`)},null,8,[`title`,`description`]),e(`div`,Ie,[(m(!0),s(c,null,p(t.ratios,r=>(m(),s(`button`,{key:r.value,type:`button`,class:n([`ratio-button`,{active:t.form.ratio===r.value}]),"aria-pressed":t.form.ratio===r.value,onClick:e=>t.form.ratio=r.value},[e(`span`,Re,[e(`span`,{style:f({width:r.width,height:r.height}),"aria-hidden":`true`},null,4)]),e(`span`,null,i(r.value),1)],10,Le))),128))])]),e(`div`,ze,[a(b,{inline:``,title:t.$t(`minimax.name.duration`),description:t.$t(`minimax.description.duration`)},null,8,[`title`,`description`]),a(T,{modelValue:t.form.duration,"onUpdate:modelValue":h[3]||=e=>t.form.duration=e,class:`setting-value`},{default:d(()=>[(m(!0),s(c,null,p(t.durations,e=>(m(),u(w,{key:e,label:`${e}s`,value:e},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])])]),e(`div`,Be,[a(E,{scenario:`minimax`}),t.walletMode?o(``,!0):(m(),u(D,{key:0,value:t.consumption,service:t.service},null,8,[`value`,`service`])),a(k,{type:`primary`,class:`btn w-full`,round:``,onClick:t.onGenerate},{default:d(()=>[a(O,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`minimax.button.generate`)),1)]),_:1},8,[`onClick`])])])}var He=F(Oe,[[`render`,Ve],[`__scopeId`,`data-v-c5d213da`]]),Ue=h({name:`TaskPreview`,components:{DeleteIcon:j,ChannelIcon:k,InfoIcon:ee,MagicIcon:P,TimeIcon:w,WarningIcon:M,CopyToClipboard:ae,ElAlert:b,VideoPlayer:ue,ElTooltip:y,ElButton:K,ReportButton:oe},props:{modelValue:{type:Object,required:!0}},computed:{isFailure(){return this.modelValue?.status===`failed`||this.modelValue?.status===`cancelled`},isWaiting(){return this.modelValue?.status===`queued`||this.modelValue?.status===`running`},application(){return this.$store.state.minimax?.application},config(){return this.$store.state.minimax?.config}},methods:{async onDelete(){let e=this.modelValue?.id;if(e){try{await R.confirm(this.$t(`common.message.deleteTaskConfirm`),this.$t(`common.button.delete`),{type:`warning`,confirmButtonText:this.$t(`common.button.delete`),cancelButtonText:this.$t(`common.button.cancel`),confirmButtonClass:`el-button--danger`})}catch{return}try{await this.$store.dispatch(`minimax/deleteTask`,{id:e}),S.success(this.$t(`common.message.deleteTaskSuccess`))}catch{S.error(this.$t(`common.message.deleteTaskFailed`))}}},onDownload(e){console.debug(`on download minimax video`,e),window.open(e,`_blank`)}}}),We={class:`preview`},Ge={class:`left`},Ke={class:`main`},qe={class:`bot`},Je={class:`datetime`},Ye=[`aria-label`],Xe={key:0,class:n({content:!0,failed:!0})},Ze={key:0,class:`mb-4`},Qe={key:1,class:n({operations:!0,"mt-2":!0})},$e={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},et={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},tt={key:1,class:n({content:!0})},$={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},nt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},rt={key:2,class:n({content:!0})},it={class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function at(n,c,f,p,h,g){let _=l(`capability-presentation`),v=l(`delete-icon`),y=l(`el-tooltip`),b=l(`video-player`),x=l(`el-button`),S=l(`report-button`),C=l(`channel-icon`),w=l(`copy-to-clipboard`),T=l(`magic-icon`),E=l(`el-alert`),D=l(`warning-icon`),O=l(`info-icon`),k=l(`time-icon`);return m(),s(`div`,We,[e(`div`,Ge,[a(_,{capability:`minimax`,part:`avatar`,class:`avatar`})]),e(`div`,Ke,[e(`div`,qe,[a(_,{capability:`minimax`,part:`name`}),e(`span`,Je,i(n.$dayjs.format(``+new Date(parseFloat((n.modelValue?.created_at||``).toString())*1e3))),1),a(y,{effect:`dark`,content:n.$t(`common.button.delete`),placement:`top`},{default:d(()=>[n.modelValue?.id?(m(),s(`button`,{key:0,type:`button`,class:`btn-delete`,"aria-label":n.$t(`common.button.delete`),onClick:c[0]||=t((...e)=>n.onDelete&&n.onDelete(...e),[`stop`])},[a(v,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,Ye)):o(``,!0)]),_:1},8,[`content`])]),c[2]||=e(`div`,{class:`info`},null,-1),n.modelValue?.status===`succeeded`?(m(),s(`div`,Xe,[n.modelValue?.content?.url?(m(),s(`div`,Ze,[a(b,{src:n.modelValue.content.url},null,8,[`src`])])):o(``,!0),n.modelValue?.content?.url?(m(),s(`div`,Qe,[a(y,{class:`box-item`,effect:`dark`,content:n.$t(`minimax.message.downloadVideo`),placement:`top-start`},{default:d(()=>[n.modelValue?.content?.url?(m(),u(x,{key:0,type:`info`,size:`small`,class:`mb-2`,onClick:c[1]||=t(e=>n.onDownload(n.modelValue.content.url),[`stop`])},{default:d(()=>[r(i(n.$t(`minimax.button.download`)),1)]),_:1})):o(``,!0)]),_:1},8,[`content`]),a(S,{service:`minimax`,"target-id":n.modelValue?.id,snapshot:{model:n.modelValue?.model,task_id:n.modelValue?.id}},null,8,[`target-id`,`snapshot`])])):o(``,!0),a(E,{closable:!1,class:`mt-2 success`},{default:d(()=>[n.modelValue?.model?(m(),s(`p`,$e,[a(C,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`minimax.name.model`))+`: `+i(n.modelValue?.model)+` `,1),a(w,{content:n.modelValue?.id},null,8,[`content`])])):o(``,!0),e(`p`,et,[a(T,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`minimax.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(w,{content:n.modelValue?.id},null,8,[`content`])])]),_:1})])):o(``,!0),n.isFailure?(m(),s(`div`,tt,[a(E,{closable:!1,class:`failure`},{template:d(()=>[a(D,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`minimax.name.failure`)),1)]),default:d(()=>[e(`p`,$,[a(T,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`minimax.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(w,{content:n.modelValue?.id},null,8,[`content`])]),e(`p`,nt,[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`minimax.name.failureReason`))+`: `+i(n.modelValue?.error?.message)+` `,1),a(w,{content:n.modelValue?.error?.message},null,8,[`content`])])]),_:1})])):o(``,!0),n.isWaiting?(m(),s(`div`,rt,[a(E,{closable:!1,class:`info`},{template:d(()=>[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(n.modelValue?.status===`queued`?`minimax.status.pending`:`minimax.status.processing`)),1)]),default:d(()=>[e(`p`,it,[a(T,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`minimax.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(w,{content:n.modelValue?.id},null,8,[`content`])])]),_:1})])):o(``,!0)])])}var ot=h({name:`RecentPanel`,components:{TaskPreview:F(Ue,[[`render`,at],[`__scopeId`,`data-v-2f8bed02`]]),BotPlaceholder:fe,NoTasks:O,ScrollList:D},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`],data(){return{job:0}},computed:{tasks(){return{...this.$store.state.minimax?.tasks,items:this.$store.state.minimax?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),st={key:0},ct={key:2,class:`w-full h-full flex items-center justify-center`};function lt(e,t,n,r,i,f){let h=l(`bot-placeholder`),g=l(`task-preview`),_=l(`scroll-list`),v=l(`no-tasks`);return m(),s(c,null,[e.tasks?.items===void 0?(m(),s(`div`,st,[a(h)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(m(),u(_,{key:1,ref:`scrollList`,class:`tasks w-full h-full overflow-y-auto`,loading:e.loading,onReachTop:t[0]||=t=>e.$emit(`reach-top`)},{default:d(()=>[(m(!0),s(c,null,p(e.tasks?.items,e=>(m(),u(g,{key:e.id,"model-value":e},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):o(``,!0),e.tasks?.items?.length===0?(m(),s(`div`,ct,[a(v)])):o(``,!0)],64)}var ut=h({name:`MinimaxIndex`,components:{ConfigPanel:He,Layout:me,RecentPanel:F(ot,[[`render`,lt]])},mixins:[J,pe(`minimax`)],inject:[`initialized`],data(){return{task:void 0,job:0,timer:void 0,loadingMore:!1,fetchingTasks:!1,walletTaskIds:[]}},computed:{applicationsLoading(){return this.$store.state.minimax?.status?.getApplications===x.Request},tasksLoading(){return this.$store.state.minimax?.status?.getTasks===x.Request||this.fetchingTasks},credential(){return this.$store.state.minimax.credential},config(){return this.$store.state.minimax.config},application(){return this.$store.state.minimax.application},tasks(){return this.$store.state.minimax.tasks},walletMode(){return Q()&&L(`minimax`).mode===`wallet`}},watch:{walletMode:{async handler(e,t){if(!(t===void 0||e===t)){if(this.$store.commit(`minimax/setTasks`,void 0),e&&!this.job&&(this.job=window.setInterval(this.onPollTasks,5e3)),!e&&!this.credential?.token){window.clearInterval(this.job),this.job=0,await this.onScrollDown();return}await this.onGetTasks(),await this.onScrollDown()}}},tasks:{handler(e,t){e?.items?.length>t?.items?.length&&console.debug(`new tasks detected`)},deep:!0},initialized:{async handler(e){e&&(console.debug(`layout initialized`),await this.onGetTasks(),await this.onScrollDown(),this.job||=window.setInterval(this.onPollTasks,5e3))},immediate:!0}},async mounted(){await this.onGetService()},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await A({tasks:this.tasks,getTasks:()=>this.tasks,loading:this.loadingMore,setLoading:e=>this.loadingMore=e,isBlocked:()=>this.tasksLoading||this.applicationsLoading,fetch:e=>this.onGetTasks({createdAtMax:e}),getScrollElement:()=>this.getTasksScrollElement()})},async onGetService(){console.debug(`start onGetService`),await this.$store.dispatch(`minimax/getService`),console.debug(`end onGetService`)},async onGetApplication(){console.debug(`start onGetApplication`),await this.$store.dispatch(`minimax/getApplications`),console.debug(`end onGetApplication`),await this.onGetTasks()},async onScrollDown(){await this.$nextTick();let e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.fetchingTasks){console.debug(`loading`);return}console.debug(`start onGetTasks`,e);let{limit:t=5,createdAtMin:n,createdAtMax:r}=e||{};console.debug(`limit`,t,`createdAtMin`,n,`createdAtMax`,r),this.fetchingTasks=!0;try{await this.$store.dispatch(`minimax/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r,...this.walletMode&&!this.credential?.token?{mode:`x402`,ids:this.walletTaskIds}:{}})}finally{this.fetchingTasks=!1}},async onGenerate(){if(!q(this.uploadTracker,e=>this.$t(e),e=>S.warning(e)))return;let e=z(this.config),t;if(this.walletMode){let n=this.getWalletContext();if(!n){S.warning(this.$t(`common.x402Scenario.connectWalletFirst`));return}t=Z.generate(e,{mode:`x402`,x402:{wallet:n,confirm:e=>this.confirmWalletPayment(e),identityToken:this.credential?.token}})}else{if(!V())return;let n=this.credential?.token;if(!n)return;t=Z.generate(e,{token:n})}S.info(this.$t(`minimax.message.startingTask`)),U(`minimax`,t).then(e=>{let t=e?.data?.task_id;this.walletMode&&!this.credential?.token&&t&&!this.walletTaskIds.includes(t)&&this.walletTaskIds.unshift(t),S.success(this.$t(`minimax.message.startTaskSuccess`))}).catch(e=>{e instanceof ie||I(e,`minimax`)||(this.walletMode?S.error(this.$t(`common.x402Scenario.paymentFailed`)):S.error(this.$t(`minimax.message.startTaskFailed`)))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getWalletContext(){return Y(this.$wallet)},async confirmWalletPayment(e){return R.confirm(this.$t(`common.x402Scenario.confirmPayment`,{amount:e.amountUsdc}),this.$t(`order.message.x402ConfirmTitle`),{confirmButtonText:this.$t(`order.message.x402WalletPayCta`),cancelButtonText:this.$t(`common.button.cancel`),type:`warning`}).then(()=>!0).catch(()=>!1)},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}});function dt(e,t,n,r,i,o){let s=l(`config-panel`),c=l(`recent-panel`),f=l(`layout`);return m(),u(f,null,{config:d(()=>[a(s,{onGenerate:e.onGenerate},null,8,[`onGenerate`])]),result:d(()=>[a(c,{ref:`recentPanel`,loading:e.loadingMore,onReachTop:e.onReachTop},null,8,[`loading`,`onReachTop`])]),_:1})}var ft=F(ut,[[`render`,dt]]);export{ft as default};
1
+ import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,N as s,T as c,at as l,j as u,mt as d,qt as f,rt as p,tt as m,z as h}from"./vendor-chart-Dw-P17PN.js";import{r as g,t as _}from"./select-BhxIomVL.js";import{t as v}from"./upload-BHlKa9Ox.js";import{t as y}from"./tooltip-DnBNFRyX.js";import{t as b}from"./alert-BprQRUmf.js";import{h as x,v as S}from"./models-BWtS-s13.js";import{t as C}from"./progress-BuyYfFZn.js";import{t as w}from"./clock-BksO_Z0W.js";import{a as T,i as E,n as D,r as O,s as k,t as A}from"./pagination-D8iNbVKJ.js";import{t as ee}from"./info-CX46K-2a.js";import{t as j}from"./trash-2-UoD61laP.js";import{t as M}from"./triangle-alert-hKICrvdJ.js";import{t as N}from"./upload-BK5O5g9h.js";import{t as P}from"./wand-sparkles-C34nh3wP.js";import{A as F,Ba as te,Cn as ne,Ha as re,O as I,Vi as L,Wa as R,_r as z,at as B,ca as V,ct as H,ea as U,et as W,fo as G,io as K,it as q,ot as J,pi as Y,st as X,ui as ie,vr as Z,zi as Q}from"./index-Dn-8sNW2.js";import{t as ae}from"./CopyToClipboard-Db0qgR8j.js";import{t as oe}from"./ReportButton-DBohgBX5.js";import{t as se}from"./ImagePreview-BlNKx02Q.js";import{t as ce}from"./ServicePricingSummary-CN_kQ9E8.js";import{t as le}from"./AudioPreview-Ca5mIJa5.js";import{t as ue}from"./VideoPlayer-ByFIN8Pz.js";import{t as de}from"./ScenarioPaymentMode-Dr25voqT.js";import{t as fe}from"./BotPlaceholder-IDq9_Pl7.js";import{t as pe}from"./taskPollingMixin-CcLxtz8z.js";import{t as me}from"./Hailuo-DL88nkFd.js";var he=h({name:`MinimaxFieldTitle`,components:{InfoIcon:T},props:{title:{type:String,required:!0},description:{type:String,required:!0},inline:{type:Boolean,default:!1}}}),ge={class:`m-0 text-[14px] font-bold`};function _e(t,r,o,c,u,d){let f=l(`info-icon`);return m(),s(`div`,{class:n([`flex min-h-8 items-center`,{"mb-[10px]":!t.inline}])},[e(`h2`,ge,i(t.title),1),a(f,{content:t.description},null,8,[`content`])],2)}var ve=F(he,[[`render`,_e]]),ye=h({name:`MinimaxReferenceMediaInput`,components:{AudioPreview:le,CloseIcon:re,ElButton:K,ElProgress:C,ElUpload:v,ImagePreview:se,InfoIcon:T,UploadIcon:N},mixins:[H,X,B,W],props:{modelValue:{type:Array,default:()=>[]},kind:{type:String,required:!0},title:{type:String,required:!0},description:{type:String,required:!0},limit:{type:Number,required:!0}},emits:[`update:modelValue`],data(){return{fileList:[],uploadUrl:te()+`/api/v1/files/`}},computed:{accept(){return this.kind===`image`?`.png,.jpg,.jpeg,.gif,.bmp,.webp,image/*`:`.mp3,.wav,.m4a,.aac,.ogg,.flac,audio/*`},pasteAccept(){return this.accept},headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}}},watch:{modelValue:{immediate:!0,handler(e){let t=this.fileList.filter(e=>!this.uploadedUrl(e)),n=e.map(e=>this.fileList.find(t=>this.uploadedUrl(t)===e)||{name:e.split(`/`).pop()||e,url:e,status:`success`,percentage:100,response:{file_url:e}});this.fileList=[...n,...t]}}},methods:{uploadedUrl(e){return e.response?.file_url},onChange(e){!e.url&&e.raw&&(e.url=URL.createObjectURL(e.raw))},onError(){S.error(this.$t(`minimax.message.uploadError`))},onExceed(){S.warning(this.$t(`minimax.message.${this.kind}Limit`))},onSuccess(e,t){e?.file_url&&(t.url?.startsWith(`blob:`)&&URL.revokeObjectURL(t.url),t.url=e.file_url,t.response=e),this.emitUrls()},removeFile(e,t){this.fileList.splice(e,1),t.url?.startsWith(`blob:`)&&URL.revokeObjectURL(t.url),this.emitUrls()},emitUrls(){this.$emit(`update:modelValue`,this.fileList.map(e=>this.uploadedUrl(e)).filter(e=>!!e))}}}),be={class:`mb-[10px] flex min-h-8 w-full items-center justify-between gap-3`},xe={class:`flex min-w-0 items-center`},Se={class:`m-0 text-[14px] font-bold`},Ce={key:0,class:`flex flex-wrap gap-[10px]`},we=[`aria-label`,`onClick`];function Te(t,n,f,h,g,_){let v=l(`info-icon`),y=l(`upload-icon`),b=l(`el-button`),x=l(`el-upload`),S=l(`image-preview`),C=l(`audio-preview`),w=l(`el-progress`),T=l(`close-icon`);return m(),s(`div`,null,[e(`div`,be,[e(`div`,xe,[e(`h2`,Se,i(t.title),1),a(v,{content:t.description},null,8,[`content`])]),a(x,{ref:`uploader`,"file-list":t.fileList,"onUpdate:fileList":n[0]||=e=>t.fileList=e,name:`file`,class:`shrink-0`,accept:t.accept,limit:t.limit,multiple:!0,"show-file-list":!1,"before-upload":t.beforeUploadSizeGuard,action:t.uploadUrl,headers:t.headers,"on-change":t.onChange,"on-error":t.onError,"on-exceed":t.onExceed,"on-success":t.onSuccess},{default:d(()=>[a(b,{size:`small`,type:`primary`,round:``},{default:d(()=>[a(y,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`minimax.button.upload`)),1)]),_:1})]),_:1},8,[`file-list`,`accept`,`limit`,`before-upload`,`action`,`headers`,`on-change`,`on-error`,`on-exceed`,`on-success`])]),t.fileList.length?(m(),s(`div`,Ce,[(m(!0),s(c,null,p(t.fileList,(n,r)=>(m(),s(`div`,{key:n.uid||t.uploadedUrl(n)||r,class:`relative`},[t.kind===`image`?(m(),u(S,{key:0,url:n.url||t.uploadedUrl(n),name:n.name,percentage:n.percentage,onRemove:e=>t.removeFile(r,n)},null,8,[`url`,`name`,`percentage`,`onRemove`])):(m(),s(c,{key:1},[t.uploadedUrl(n)?(m(),u(C,{key:0,url:t.uploadedUrl(n),name:n.name},null,8,[`url`,`name`])):(m(),u(w,{key:1,type:`circle`,percentage:n.percentage||0,width:50,"stroke-width":3},null,8,[`percentage`])),e(`button`,{type:`button`,class:`remove-button`,"aria-label":t.$t(`common.button.delete`),onClick:e=>t.removeFile(r,n)},[a(T,{size:`0.75em`,"aria-hidden":`true`,focusable:`false`})],8,we)],64))]))),128))])):o(``,!0)])}var Ee=F(ye,[[`render`,Te],[`__scopeId`,`data-v-155379bf`]]),De=e=>{if(!e.content.some(e=>e.type===`text`&&e.text.trim()))return`promptRequired`;if(e.content.filter(e=>e.type===`image_url`).length>9)return`imageLimit`;if(e.content.filter(e=>e.type===`audio_url`).length>3)return`audioLimit`;if(!e.content.some(e=>e.type!==`text`)&&e.ratio===`adaptive`)return`textRatioRequired`},Oe=h({name:`MinimaxConfigPanel`,components:{MagicIcon:P,ServicePricingSummary:ce,ElButton:K,ElInput:G,ElOption:_,ElSelect:g,FieldTitle:ve,PromptTextarea:E,ReferenceMediaInput:Ee,ScenarioPaymentMode:de},emits:[`generate`],data(){return{form:{prompt:``,imageUrls:[],audioUrls:[],resolution:`2K`,ratio:`16:9`,duration:4},resolutions:[`768P`,`2K`],ratios:[{value:`adaptive`,width:`21px`,height:`21px`},{value:`21:9`,width:`28px`,height:`12px`},{value:`16:9`,width:`25px`,height:`13px`},{value:`4:3`,width:`22px`,height:`17px`},{value:`1:1`,width:`19px`,height:`19px`},{value:`3:4`,width:`17px`,height:`22px`},{value:`9:16`,width:`13px`,height:`25px`}],durations:Array.from({length:12},(e,t)=>t+4),quoteTimer:0,quoteRunId:0}},computed:{config(){let e=[],t=this.form.prompt.trim();t&&e.push({type:`text`,text:t});let n=this.form.imageUrls.length>1||this.form.audioUrls.length>0;return this.form.imageUrls.forEach(t=>{e.push({type:`image_url`,image_url:{url:t},role:n?`reference_image`:`first_frame`})}),this.form.audioUrls.forEach(t=>{e.push({type:`audio_url`,audio_url:{url:t},role:`reference_audio`})}),{model:`MiniMax-H3`,content:e,resolution:this.form.resolution,ratio:this.form.imageUrls.length===1&&!this.form.audioUrls.length?`adaptive`:this.form.ratio,duration:this.form.duration}},consumption(){return ne(this.config,this.service?.cost)},service(){return this.$store.state.minimax?.service},walletMode(){return Q()&&L(`minimax`).mode===`wallet`}},watch:{walletMode:{handler(e){e&&this.scheduleQuote()},immediate:!0},config:{handler(e){this.$store.commit(`minimax/setConfig`,e),this.walletMode&&this.scheduleQuote()},deep:!0,immediate:!0}},beforeUnmount(){window.clearTimeout(this.quoteTimer),this.quoteRunId+=1},methods:{scheduleQuote(){window.clearTimeout(this.quoteTimer),this.quoteTimer=window.setTimeout(this.refreshQuote,350)},async refreshQuote(){let e=L(`minimax`),t=++this.quoteRunId;e.quoteLoading=!0,e.quoteUsdc=void 0;try{let n=await Z.quote(z(this.config));t===this.quoteRunId&&e.mode===`wallet`&&(e.quoteUsdc=n.amountUsdc)}catch(e){console.warn(`x402 quote failed`,e)}finally{t===this.quoteRunId&&(e.quoteLoading=!1)}},onGenerate(){let e=De(this.config);if(e){S.warning(this.$t(`minimax.message.${e}`));return}this.$emit(`generate`)}}}),ke={class:`flex flex-col h-full`},Ae={class:`flex-1 overflow-y-auto p-5`},je={class:`mb-4`},Me={class:`mb-4`},Ne={class:`option-grid`},Pe=[`aria-pressed`,`onClick`],Fe={class:`mb-4`},Ie={class:`ratio-options`},Le=[`aria-pressed`,`onClick`],Re={class:`ratio-preview`},ze={class:`setting-row mb-4`},Be={class:`flex flex-col items-center justify-center px-5 pb-5`};function Ve(t,h,g,_,v,y){let b=l(`field-title`),x=l(`el-input`),S=l(`prompt-textarea`),C=l(`reference-media-input`),w=l(`el-option`),T=l(`el-select`),E=l(`scenario-payment-mode`),D=l(`service-pricing-summary`),O=l(`magic-icon`),k=l(`el-button`);return m(),s(`div`,ke,[e(`div`,Ae,[e(`div`,je,[a(b,{title:t.$t(`minimax.name.model`),description:t.$t(`minimax.description.model`)},null,8,[`title`,`description`]),a(x,{"model-value":`MiniMax-H3`,disabled:``})]),a(S,{modelValue:t.form.prompt,"onUpdate:modelValue":h[0]||=e=>t.form.prompt=e,class:`mb-4`,title:t.$t(`minimax.name.prompt`),info:t.$t(`minimax.description.prompt`),placeholder:t.$t(`minimax.placeholder.prompt`),"min-rows":4},null,8,[`modelValue`,`title`,`info`,`placeholder`]),a(C,{modelValue:t.form.imageUrls,"onUpdate:modelValue":h[1]||=e=>t.form.imageUrls=e,class:`mb-4`,kind:`image`,title:t.$t(`minimax.name.referenceImages`),description:t.$t(`minimax.description.referenceImages`),limit:9},null,8,[`modelValue`,`title`,`description`]),a(C,{modelValue:t.form.audioUrls,"onUpdate:modelValue":h[2]||=e=>t.form.audioUrls=e,class:`mb-4`,kind:`audio`,title:t.$t(`minimax.name.referenceAudios`),description:t.$t(`minimax.description.referenceAudios`),limit:3},null,8,[`modelValue`,`title`,`description`]),e(`div`,Me,[a(b,{title:t.$t(`minimax.name.resolution`),description:t.$t(`minimax.description.resolution`)},null,8,[`title`,`description`]),e(`div`,Ne,[(m(!0),s(c,null,p(t.resolutions,e=>(m(),s(`button`,{key:e,type:`button`,class:n([`option-button`,{active:t.form.resolution===e}]),"aria-pressed":t.form.resolution===e,onClick:n=>t.form.resolution=e},i(e),11,Pe))),128))])]),e(`div`,Fe,[a(b,{title:t.$t(`minimax.name.ratio`),description:t.$t(`minimax.description.ratio`)},null,8,[`title`,`description`]),e(`div`,Ie,[(m(!0),s(c,null,p(t.ratios,r=>(m(),s(`button`,{key:r.value,type:`button`,class:n([`ratio-button`,{active:t.form.ratio===r.value}]),"aria-pressed":t.form.ratio===r.value,onClick:e=>t.form.ratio=r.value},[e(`span`,Re,[e(`span`,{style:f({width:r.width,height:r.height}),"aria-hidden":`true`},null,4)]),e(`span`,null,i(r.value),1)],10,Le))),128))])]),e(`div`,ze,[a(b,{inline:``,title:t.$t(`minimax.name.duration`),description:t.$t(`minimax.description.duration`)},null,8,[`title`,`description`]),a(T,{modelValue:t.form.duration,"onUpdate:modelValue":h[3]||=e=>t.form.duration=e,class:`setting-value`},{default:d(()=>[(m(!0),s(c,null,p(t.durations,e=>(m(),u(w,{key:e,label:`${e}s`,value:e},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])])]),e(`div`,Be,[a(E,{scenario:`minimax`}),t.walletMode?o(``,!0):(m(),u(D,{key:0,value:t.consumption,service:t.service},null,8,[`value`,`service`])),a(k,{type:`primary`,class:`btn w-full`,round:``,onClick:t.onGenerate},{default:d(()=>[a(O,{class:`mr-2`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`minimax.button.generate`)),1)]),_:1},8,[`onClick`])])])}var He=F(Oe,[[`render`,Ve],[`__scopeId`,`data-v-c5d213da`]]),Ue=h({name:`TaskPreview`,components:{DeleteIcon:j,ChannelIcon:k,InfoIcon:ee,MagicIcon:P,TimeIcon:w,WarningIcon:M,CopyToClipboard:ae,ElAlert:b,VideoPlayer:ue,ElTooltip:y,ElButton:K,ReportButton:oe},props:{modelValue:{type:Object,required:!0}},computed:{isFailure(){return this.modelValue?.status===`failed`||this.modelValue?.status===`cancelled`},isWaiting(){return this.modelValue?.status===`queued`||this.modelValue?.status===`running`},application(){return this.$store.state.minimax?.application},config(){return this.$store.state.minimax?.config}},methods:{async onDelete(){let e=this.modelValue?.id;if(e){try{await R.confirm(this.$t(`common.message.deleteTaskConfirm`),this.$t(`common.button.delete`),{type:`warning`,confirmButtonText:this.$t(`common.button.delete`),cancelButtonText:this.$t(`common.button.cancel`),confirmButtonClass:`el-button--danger`})}catch{return}try{await this.$store.dispatch(`minimax/deleteTask`,{id:e}),S.success(this.$t(`common.message.deleteTaskSuccess`))}catch{S.error(this.$t(`common.message.deleteTaskFailed`))}}},onDownload(e){console.debug(`on download minimax video`,e),window.open(e,`_blank`)}}}),We={class:`preview`},Ge={class:`left`},Ke={class:`main`},qe={class:`bot`},Je={class:`datetime`},Ye=[`aria-label`],Xe={key:0,class:n({content:!0,failed:!0})},Ze={key:0,class:`mb-4`},Qe={key:1,class:n({operations:!0,"mt-2":!0})},$e={key:0,class:`text-[var(--el-text-color-regular)] text-xs mb-2`},et={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},tt={key:1,class:n({content:!0})},$={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},nt={class:`text-[var(--el-text-color-regular)] text-xs mb-2`},rt={key:2,class:n({content:!0})},it={class:`text-[var(--el-text-color-regular)] text-xs mb-0`};function at(n,c,f,p,h,g){let _=l(`capability-presentation`),v=l(`delete-icon`),y=l(`el-tooltip`),b=l(`video-player`),x=l(`el-button`),S=l(`report-button`),C=l(`channel-icon`),w=l(`copy-to-clipboard`),T=l(`magic-icon`),E=l(`el-alert`),D=l(`warning-icon`),O=l(`info-icon`),k=l(`time-icon`);return m(),s(`div`,We,[e(`div`,Ge,[a(_,{capability:`minimax`,part:`avatar`,class:`avatar`})]),e(`div`,Ke,[e(`div`,qe,[a(_,{capability:`minimax`,part:`name`}),e(`span`,Je,i(n.$dayjs.format(``+new Date(parseFloat((n.modelValue?.created_at||``).toString())*1e3))),1),a(y,{effect:`dark`,content:n.$t(`common.button.delete`),placement:`top`},{default:d(()=>[n.modelValue?.id?(m(),s(`button`,{key:0,type:`button`,class:`btn-delete`,"aria-label":n.$t(`common.button.delete`),onClick:c[0]||=t((...e)=>n.onDelete&&n.onDelete(...e),[`stop`])},[a(v,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,Ye)):o(``,!0)]),_:1},8,[`content`])]),c[2]||=e(`div`,{class:`info`},null,-1),n.modelValue?.status===`succeeded`?(m(),s(`div`,Xe,[n.modelValue?.content?.url?(m(),s(`div`,Ze,[a(b,{src:n.modelValue.content.url},null,8,[`src`])])):o(``,!0),n.modelValue?.content?.url?(m(),s(`div`,Qe,[a(y,{class:`box-item`,effect:`dark`,content:n.$t(`minimax.message.downloadVideo`),placement:`top-start`},{default:d(()=>[n.modelValue?.content?.url?(m(),u(x,{key:0,type:`info`,size:`small`,class:`mb-2`,onClick:c[1]||=t(e=>n.onDownload(n.modelValue.content.url),[`stop`])},{default:d(()=>[r(i(n.$t(`minimax.button.download`)),1)]),_:1})):o(``,!0)]),_:1},8,[`content`]),a(S,{service:`minimax`,"target-id":n.modelValue?.id,snapshot:{model:n.modelValue?.model,task_id:n.modelValue?.id}},null,8,[`target-id`,`snapshot`])])):o(``,!0),a(E,{closable:!1,class:`mt-2 success`},{default:d(()=>[n.modelValue?.model?(m(),s(`p`,$e,[a(C,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`minimax.name.model`))+`: `+i(n.modelValue?.model)+` `,1),a(w,{content:n.modelValue?.id},null,8,[`content`])])):o(``,!0),e(`p`,et,[a(T,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`minimax.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(w,{content:n.modelValue?.id},null,8,[`content`])])]),_:1})])):o(``,!0),n.isFailure?(m(),s(`div`,tt,[a(E,{closable:!1,class:`failure`},{template:d(()=>[a(D,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`minimax.name.failure`)),1)]),default:d(()=>[e(`p`,$,[a(T,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`minimax.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(w,{content:n.modelValue?.id},null,8,[`content`])]),e(`p`,nt,[a(O,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`minimax.name.failureReason`))+`: `+i(n.modelValue?.error?.message)+` `,1),a(w,{content:n.modelValue?.error?.message},null,8,[`content`])])]),_:1})])):o(``,!0),n.isWaiting?(m(),s(`div`,rt,[a(E,{closable:!1,class:`info`},{template:d(()=>[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(n.modelValue?.status===`queued`?`minimax.status.pending`:`minimax.status.processing`)),1)]),default:d(()=>[e(`p`,it,[a(T,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(n.$t(`minimax.name.taskId`))+`: `+i(n.modelValue?.id)+` `,1),a(w,{content:n.modelValue?.id},null,8,[`content`])])]),_:1})])):o(``,!0)])])}var ot=h({name:`RecentPanel`,components:{TaskPreview:F(Ue,[[`render`,at],[`__scopeId`,`data-v-2f8bed02`]]),BotPlaceholder:fe,NoTasks:O,ScrollList:D},props:{loading:{type:Boolean,default:!1}},emits:[`reach-top`],data(){return{job:0}},computed:{tasks(){return{...this.$store.state.minimax?.tasks,items:this.$store.state.minimax?.tasks?.items?.slice()}}},methods:{getScrollElement(){return this.$refs.scrollList?.getScrollElement?.()}}}),st={key:0},ct={key:2,class:`w-full h-full flex items-center justify-center`};function lt(e,t,n,r,i,f){let h=l(`bot-placeholder`),g=l(`task-preview`),_=l(`scroll-list`),v=l(`no-tasks`);return m(),s(c,null,[e.tasks?.items===void 0?(m(),s(`div`,st,[a(h)])):e.tasks?.items?.length&&e.tasks?.items?.length>0?(m(),u(_,{key:1,ref:`scrollList`,class:`tasks w-full h-full overflow-y-auto`,loading:e.loading,onReachTop:t[0]||=t=>e.$emit(`reach-top`)},{default:d(()=>[(m(!0),s(c,null,p(e.tasks?.items,e=>(m(),u(g,{key:e.id,"model-value":e},null,8,[`model-value`]))),128))]),_:1},8,[`loading`])):o(``,!0),e.tasks?.items?.length===0?(m(),s(`div`,ct,[a(v)])):o(``,!0)],64)}var ut=h({name:`MinimaxIndex`,components:{ConfigPanel:He,Layout:me,RecentPanel:F(ot,[[`render`,lt]])},mixins:[J,pe(`minimax`)],inject:[`initialized`],data(){return{task:void 0,job:0,timer:void 0,loadingMore:!1,fetchingTasks:!1,walletTaskIds:[]}},computed:{applicationsLoading(){return this.$store.state.minimax?.status?.getApplications===x.Request},tasksLoading(){return this.$store.state.minimax?.status?.getTasks===x.Request||this.fetchingTasks},credential(){return this.$store.state.minimax.credential},config(){return this.$store.state.minimax.config},application(){return this.$store.state.minimax.application},tasks(){return this.$store.state.minimax.tasks},walletMode(){return Q()&&L(`minimax`).mode===`wallet`}},watch:{walletMode:{async handler(e,t){if(!(t===void 0||e===t)){if(this.$store.commit(`minimax/setTasks`,void 0),e&&!this.job&&(this.job=window.setInterval(this.onPollTasks,5e3)),!e&&!this.credential?.token){window.clearInterval(this.job),this.job=0,await this.onScrollDown();return}await this.onGetTasks(),await this.onScrollDown()}}},tasks:{handler(e,t){e?.items?.length>t?.items?.length&&console.debug(`new tasks detected`)},deep:!0},initialized:{async handler(e){e&&(console.debug(`layout initialized`),await this.onGetTasks(),await this.onScrollDown(),this.job||=window.setInterval(this.onPollTasks,5e3))},immediate:!0}},async mounted(){await this.onGetService()},async unmounted(){window.clearInterval(this.job)},methods:{async onReachTop(){await A({tasks:this.tasks,getTasks:()=>this.tasks,loading:this.loadingMore,setLoading:e=>this.loadingMore=e,isBlocked:()=>this.tasksLoading||this.applicationsLoading,fetch:e=>this.onGetTasks({createdAtMax:e}),getScrollElement:()=>this.getTasksScrollElement()})},async onGetService(){console.debug(`start onGetService`),await this.$store.dispatch(`minimax/getService`),console.debug(`end onGetService`)},async onGetApplication(){console.debug(`start onGetApplication`),await this.$store.dispatch(`minimax/getApplications`),console.debug(`end onGetApplication`),await this.onGetTasks()},async onScrollDown(){await this.$nextTick();let e=this.getTasksScrollElement();e&&(e.scrollTop=e.scrollHeight)},async onGetTasks(e){if(this.applicationsLoading||this.fetchingTasks){console.debug(`loading`);return}console.debug(`start onGetTasks`,e);let{limit:t=5,createdAtMin:n,createdAtMax:r}=e||{};console.debug(`limit`,t,`createdAtMin`,n,`createdAtMax`,r),this.fetchingTasks=!0;try{await this.$store.dispatch(`minimax/getTasks`,{limit:t,createdAtMin:n,createdAtMax:r,...this.walletMode&&!this.credential?.token?{mode:`x402`,ids:this.walletTaskIds}:{}})}finally{this.fetchingTasks=!1}},async onGenerate(){if(!q(this.uploadTracker,e=>this.$t(e),e=>S.warning(e)))return;let e=z(this.config),t;if(this.walletMode){let n=this.getWalletContext();if(!n){S.warning(this.$t(`common.x402Scenario.connectWalletFirst`));return}t=Z.generate(e,{mode:`x402`,x402:{wallet:n,confirm:e=>this.confirmWalletPayment(e),identityToken:this.credential?.token}})}else{if(!V())return;let n=this.credential?.token;if(!n)return;t=Z.generate(e,{token:n})}S.info(this.$t(`minimax.message.startingTask`)),U(`minimax`,t).then(e=>{let t=e?.data?.task_id;this.walletMode&&!this.credential?.token&&t&&!this.walletTaskIds.includes(t)&&this.walletTaskIds.unshift(t),S.success(this.$t(`minimax.message.startTaskSuccess`))}).catch(e=>{e instanceof ie||I(e,`minimax`)||(this.walletMode?S.error(this.$t(`common.x402Scenario.paymentFailed`)):S.error(this.$t(`minimax.message.startTaskFailed`)))}).finally(async()=>{setTimeout(async()=>{await this.onGetTasks(),await this.onScrollDown()},1e3)})},getWalletContext(){return Y(this.$wallet)},async confirmWalletPayment(e){return R.confirm(this.$t(`common.x402Scenario.confirmPayment`,{amount:e.amountUsdc}),this.$t(`order.message.x402ConfirmTitle`),{confirmButtonText:this.$t(`order.message.x402WalletPayCta`),cancelButtonText:this.$t(`common.button.cancel`),type:`warning`}).then(()=>!0).catch(()=>!1)},getTasksScrollElement(){return this.$refs.recentPanel?.getScrollElement?.()}}});function dt(e,t,n,r,i,o){let s=l(`config-panel`),c=l(`recent-panel`),f=l(`layout`);return m(),u(f,null,{config:d(()=>[a(s,{onGenerate:e.onGenerate},null,8,[`onGenerate`])]),result:d(()=>[a(c,{ref:`recentPanel`,loading:e.loadingMore,onReachTop:e.onReachTop},null,8,[`loading`,`onReachTop`])]),_:1})}var ft=F(ut,[[`render`,dt]]);export{ft as default};
@@ -1,2 +1,2 @@
1
- import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,N as s,S as c,T as l,at as u,ht as d,it as f,j as p,mt as m,ot as h,rt as g,st as _,tt as v,z as y}from"./vendor-chart-Dw-P17PN.js";import{t as b}from"./upload-QoHt30kH.js";import{h as x,v as S}from"./models-CSuuDqRA.js";import{t as C}from"./checkbox-DXMDpaxv.js";import{t as w}from"./drawer-CkM_NHcO.js";import{n as T,r as E,t as D}from"./dropdown-Dq3sNHZD.js";import{t as O}from"./popover-14jHG21y.js";import{n as ee,t as te}from"./skeleton-Dj_a_iIP.js";import{t as ne}from"./arrow-right-DldGU1an.js";import{t as k}from"./arrow-up-4Sf4V16e.js";import{t as re}from"./brain-De0zKChZ.js";import{t as A}from"./check-Cmnz4Bu0.js";import{t as ie}from"./chevron-down-DHjWJMvN.js";import{t as ae}from"./clipboard-list-841pTGDa.js";import{t as j}from"./code-CDH4NELE.js";import{t as M}from"./ellipsis-POyVAzgA.js";import{t as oe}from"./eye-Ces_jYmy.js";import{t as se}from"./file-text-DhO9-O7o.js";import{t as N}from"./file-COdWS7Yw.js";import{t as ce}from"./folder-B4Jjo77l.js";import{t as P}from"./gauge-CCcCam0v.js";import{t as F}from"./history-P1COJCLH.js";import{t as I}from"./info-xIzYgAiV.js";import{t as L}from"./laptop-BlMF8fEG.js";import{t as R}from"./link-6giGq_cF.js";import{t as z}from"./loader-circle-B3QYalEy.js";import{t as le}from"./mic-DPRovWzT.js";import{t as ue}from"./monitor-Cf_suH9d.js";import{t as B}from"./paperclip-CWFcTsCu.js";import{t as V}from"./pencil-CviRmSpy.js";import{t as H}from"./plus-CwKarPA6.js";import{t as U}from"./rotate-cw-CD8xES6w.js";import{t as de}from"./search-b_c_47BV.js";import{t as fe}from"./shield-Cm7slfR-.js";import{t as pe}from"./square-DuewWOOD.js";import{t as me}from"./terminal-TymL8Q-5.js";import{t as he}from"./trash-2-1--IdOz8.js";import{wa as ge}from"./constants-BmcMHgPT.js";import{O as _e}from"./i18n-3aZQnVTW.js";import{A as W,Ba as ve,Ha as G,Sn as ye,Tn as be,Ua as K,Wa as xe,Ya as q,ct as Se,fo as J,io as Y,oa as Ce,st as we}from"./index-BHXtbt9o.js";import"./vendor-highlight-Dd94xpKT.js";import{t as Te}from"./VueMarkdown-BgudlQNQ.js";import{t as Ee}from"./CopyToClipboard-CaPuzTeQ.js";import{t as De}from"./AskUserQuestionCard-5upmtI3F.js";import{s as Oe,t as ke}from"./codingBridgeNotify-CfKf4JbW.js";import{t as Ae}from"./CodeSnippet-BsfF8y-K.js";var je=K(`bell-off`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742`,key:`178tsu`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05`,key:`1hqiys`}]]),Me=K(`bell`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]),Ne=K(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),Pe=y({name:`CodingBridgeNotificationToggle`,components:{LoadingIcon:z,NotificationIcon:Me,NotificationOffIcon:je,ElButton:Y},data(){return{enabled:!1,busy:!1}},computed:{supported(){return _e()||Oe()}},mounted(){this.enabled=!_e()&&ke()===`granted`},methods:{async onToggle(){this.busy=!0;try{if(this.enabled){await this.$store.dispatch(`codingBridge/disableNotifications`),this.enabled=!1,S.success(this.$t(`codingBridge.notify.disabled`));return}let e=await this.$store.dispatch(`codingBridge/enableNotifications`);e===`enabled`?(this.enabled=!0,S.success(this.$t(`codingBridge.notify.enabled`))):e===`denied`?S.warning(this.$t(`codingBridge.notify.denied`)):S.warning(this.$t(`codingBridge.notify.unsupported`))}catch{S.error(this.$t(`codingBridge.notify.failed`))}finally{this.busy=!1}}}});function Fe(e,t,n,r,i,a){let s=u(`loading-icon`),c=u(`notification-icon`),l=u(`notification-off-icon`),d=u(`el-button`);return e.supported?(v(),p(d,{key:0,circle:``,size:`small`,type:e.enabled?`primary`:`default`,title:e.enabled?e.$t(`codingBridge.notify.disable`):e.$t(`codingBridge.notify.enable`),disabled:e.busy,"aria-label":e.enabled?e.$t(`codingBridge.notify.disable`):e.$t(`codingBridge.notify.enable`),onClick:e.onToggle},{default:m(()=>[e.busy?(v(),p(s,{key:0,class:`adc-icon-spin`,size:`1em`,"aria-hidden":`true`,focusable:`false`})):e.enabled?(v(),p(c,{key:1,size:`1em`,"aria-hidden":`true`,focusable:`false`})):(v(),p(l,{key:2,size:`1em`,"aria-hidden":`true`,focusable:`false`}))]),_:1},8,[`type`,`title`,`disabled`,`aria-label`,`onClick`])):o(``,!0)}var Ie=y({name:`CodingBridgeNodeList`,components:{AddIcon:H,DeleteIcon:he,DesktopIcon:ue,DeveloperIcon:L,EditIcon:V,RedoIcon:U,ElButton:Y,NotificationToggle:W(Pe,[[`render`,Fe]])},emits:[`pair`],computed:{nodes(){return this.$store.state.codingBridge?.nodes??[]},currentNodeId(){return this.$store.state.codingBridge?.currentNodeId},connection(){return this.$store.state.codingBridge?.connection??`disconnected`},connectionLabel(){return this.$t(`codingBridge.connection.${this.connection}`)},connectionDotClass(){switch(this.connection){case`connected`:return`bg-[var(--el-color-success)]`;case`connecting`:return`bg-[var(--el-color-warning)]`;case`error`:return`bg-[var(--el-color-danger)]`;default:return`bg-[var(--app-text-subtle)]`}}},methods:{onSelect(e){this.$store.dispatch(`codingBridge/selectNode`,e)},onRefresh(){this.$store.dispatch(`codingBridge/getNodes`)},async onRename(e){let t;try{t=((await xe.prompt(this.$t(`codingBridge.nodeList.renamePrompt`),this.$t(`codingBridge.nodeList.rename`),{confirmButtonText:this.$t(`common.button.confirm`),cancelButtonText:this.$t(`common.button.cancel`),inputValue:e.name,inputValidator:e=>{let t=(e??``).trim();return t?[...t].length>64?this.$t(`codingBridge.nodeList.renameTooLong`,{max:64}):!0:this.$t(`codingBridge.nodeList.renameEmpty`)}})).value??``).trim()}catch{return}if(!(!t||t===e.name))try{await this.$store.dispatch(`codingBridge/renameNode`,{nodeId:e.node_id,name:t}),S.success(this.$t(`codingBridge.nodeList.renameSuccess`))}catch{S.error(this.$t(`codingBridge.nodeList.renameFailed`))}},async onDelete(e){try{await xe.confirm(this.$t(`codingBridge.nodeList.removeConfirm`,{name:e.name}),this.$t(`codingBridge.nodeList.remove`),{confirmButtonText:this.$t(`codingBridge.nodeList.remove`),cancelButtonText:this.$t(`common.button.cancel`),type:`warning`})}catch{return}try{await this.$store.dispatch(`codingBridge/deleteNode`,e.node_id),S.success(this.$t(`codingBridge.nodeList.removeSuccess`))}catch{S.error(this.$t(`codingBridge.nodeList.removeFailed`))}}}}),Le={class:`node-list flex flex-col h-full bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]`},Re={class:`flex items-center justify-between px-4 py-3 border-b border-[var(--app-border-subtle)]`},ze={class:`flex items-center gap-2 font-medium`},Be={class:`flex items-center gap-1`},Ve={class:`flex items-center gap-2 px-4 py-2 text-xs border-b border-[var(--app-border-subtle)]`},He={class:`text-[var(--app-text-subtle)]`},Ue={class:`flex-1 overflow-y-auto`},We={key:0,class:`p-6 text-center text-sm text-[var(--app-text-subtle)]`},Ge={class:`mb-3`},Ke={key:1,class:`list-none m-0 p-0`},qe=[`onClick`],Je={class:`flex-1 min-w-0`},Ye={class:`flex items-center gap-2`},Xe={class:`truncate font-medium`},Ze=[`title`],Qe={class:`text-xs text-[var(--app-text-subtle)] truncate`};function $e(o,c,d,f,p,h){let _=u(`developer-icon`),y=u(`notification-toggle`),b=u(`redo-icon`),x=u(`el-button`),S=u(`add-icon`),C=u(`desktop-icon`),w=u(`edit-icon`),T=u(`delete-icon`);return v(),s(`div`,Le,[e(`div`,Re,[e(`div`,ze,[a(_,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,null,i(o.$t(`codingBridge.nodeList.title`)),1)]),e(`div`,Be,[a(y),a(x,{circle:``,size:`small`,"aria-label":o.$t(`codingBridge.nodeList.refresh`),title:o.$t(`codingBridge.nodeList.refresh`),onClick:o.onRefresh},{default:m(()=>[a(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`,`onClick`]),a(x,{type:`primary`,circle:``,size:`small`,"aria-label":o.$t(`codingBridge.nodeList.pair`),title:o.$t(`codingBridge.nodeList.pair`),onClick:c[0]||=e=>o.$emit(`pair`)},{default:m(()=>[a(S,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`])])]),e(`div`,Ve,[e(`span`,{class:n([`inline-block w-2 h-2 rounded-full`,o.connectionDotClass])},null,2),e(`span`,He,i(o.connectionLabel),1)]),e(`div`,Ue,[o.nodes.length?(v(),s(`ul`,Ke,[(v(!0),s(l,null,g(o.nodes,r=>(v(),s(`li`,{key:r.node_id,class:n([`group flex items-center gap-3 px-4 py-3 cursor-pointer border-b border-[var(--app-border-subtle)] hover:bg-[var(--app-content-bg)]`,{"bg-[var(--app-content-bg)]":r.node_id===o.currentNodeId}]),onClick:e=>o.onSelect(r.node_id)},[a(C,{class:`text-[var(--app-text-subtle)]`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`div`,Je,[e(`div`,Ye,[e(`span`,Xe,i(r.name),1),e(`span`,{class:n([`inline-block w-2 h-2 rounded-full flex-none`,r.status===`online`?`bg-[var(--el-color-success)]`:`bg-[var(--app-text-subtle)]`]),title:r.status===`online`?o.$t(`codingBridge.status.online`):o.$t(`codingBridge.status.offline`)},null,10,Ze)]),e(`div`,Qe,i(r.status===`online`?o.$t(`codingBridge.status.online`):o.$t(`codingBridge.status.offline`)),1)]),a(x,{class:`node-action`,text:``,circle:``,size:`small`,"aria-label":o.$t(`codingBridge.nodeList.rename`),title:o.$t(`codingBridge.nodeList.rename`),onClick:t(e=>o.onRename(r),[`stop`])},{default:m(()=>[a(w,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`,`onClick`]),a(x,{class:`node-action`,text:``,circle:``,size:`small`,"aria-label":o.$t(`codingBridge.nodeList.remove`),title:o.$t(`codingBridge.nodeList.remove`),onClick:t(e=>o.onDelete(r),[`stop`])},{default:m(()=>[a(T,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`,`onClick`])],10,qe))),128))])):(v(),s(`div`,We,[e(`p`,Ge,i(o.$t(`codingBridge.nodeList.empty`)),1),a(x,{type:`primary`,round:``,size:`small`,onClick:c[1]||=e=>o.$emit(`pair`)},{default:m(()=>[a(S,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(o.$t(`codingBridge.nodeList.pairFirst`)),1)]),_:1})]))])])}var et=W(Ie,[[`render`,$e],[`__scopeId`,`data-v-37e3f542`]]),tt=e=>{let t=e?.questions;return Array.isArray(t)&&t.length>0&&t.every(e=>e&&typeof e.question==`string`&&Array.isArray(e.options))},nt=e=>e?(e.tool||``).toLowerCase()===`askuserquestion`?!0:tt(e.input):!1,rt=e=>({questions:e.input?.questions??[]}),it=100,X=4e4,at=12e3,ot=6e3,st=50,ct=200,Z=(e,t)=>{if(e.length<=t)return e;let n=((e.length-t)/1024).toFixed(1);return`${e.slice(0,t)}\n\n··· +${n} KB ···`},lt=y({name:`CodingBridgeTranscriptItem`,directives:{highlight:be},components:{CloseIcon:G,ConfirmIcon:A,EditIcon:V,FileIcon:N,InfoIcon:I,VueMarkdown:Te,CodeSnippet:Ae,CopyToClipboard:Ee},props:{event:{type:Object,required:!0},editable:{type:Boolean,default:!1}},emits:[`edit`],data(){return{renderedText:Z(this.event.text||``,X),streamTimer:0}},computed:{commandText(){let e=this.event.input;if(!e)return``;for(let t of[`command`,`cmd`,`script`]){let n=e[t];if(typeof n==`string`&&n.trim())return Z(n,ot)}return``},filePath(){let e=this.event.input;if(!e)return``;for(let t of[`file_path`,`filePath`,`path`,`notebook_path`,`filename`]){let n=e[t];if(typeof n==`string`&&n.trim())return n}return``},toolDescription(){let e=this.event.input?.description;return typeof e==`string`?e:``},toolIcon(){if(this.todoList.length)return ae;if(this.commandText)return me;let e=(this.event.tool??``).toLowerCase();return/read|cat|view/.test(e)?se:/write|edit|create|update|insert/.test(e)?V:/grep|glob|search|find|list/.test(e)?de:j},questionLines(){let e=(this.event.tool??``).toLowerCase(),t=this.event.input?.questions;return!(e===`askuserquestion`||Array.isArray(t))||!Array.isArray(t)?[]:t.filter(e=>e&&typeof e.question==`string`).map(e=>({header:typeof e.header==`string`?e.header:``,question:e.question}))},todoList(){let e=this.event.input?.todos;return!Array.isArray(e)||!(this.event.tool??``).toLowerCase().includes(`todo`)&&Object.keys(this.event.input??{}).filter(e=>e!==`todos`&&e!==`description`).length?[]:e.filter(e=>e&&typeof e.content==`string`).map(e=>({content:e.content,status:typeof e.status==`string`?e.status:`pending`,activeForm:typeof e.activeForm==`string`?e.activeForm:void 0}))},todoItems(){return this.todoList.slice(0,st).map(e=>{let t=e.status===`in_progress`&&e.activeForm?e.activeForm:e.content,n=t.length>ct?`${t.slice(0,ct)}…`:t;return e.status===`completed`?{text:n,status:`completed`,statusLabel:this.$t(`codingBridge.transcript.todoCompleted`),icon:A,iconClass:`text-[var(--el-color-success)]`,textClass:`text-[var(--app-text-subtle)] line-through`}:e.status===`in_progress`?{text:n,status:`in_progress`,statusLabel:this.$t(`codingBridge.transcript.todoInProgress`),icon:z,iconClass:`text-[var(--el-color-primary)]`,textClass:`text-[var(--app-text)] font-medium`}:{text:n,status:`pending`,statusLabel:this.$t(`codingBridge.transcript.todoPending`),icon:pe,iconClass:`text-[var(--app-text-subtle)] opacity-60`,textClass:`text-[var(--app-text-subtle)]`}})},todoProgressLabel(){let e=this.todoList.filter(e=>e.status===`completed`).length;return this.$t(`codingBridge.transcript.todoProgress`,{done:e,total:this.todoList.length})},todoProgressId(){return`cb-todo-progress-${this.event.id}`},todoOverflow(){return Math.max(0,this.todoList.length-st)},inputText(){let e=this.event.input;if(!e)return``;let t={};for(let[n,r]of Object.entries(e))n===`timeout`||n===`description`||(t[n]=r);if(Object.keys(t).length===0)return``;try{return Z(JSON.stringify(t,null,2),ot)}catch{return Z(String(e),ot)}},thinkingText(){return Z(this.event.text||``,X)},resultText(){let e=this.event.content;return typeof e==`string`&&e.length>0?e:`—`},resultDisplay(){return Z(this.resultText,at)},resultLabel(){let e=[];return this.event.is_error?e.push(this.$t(`codingBridge.transcript.turnFailed`)):e.push(this.$t(`codingBridge.transcript.turnDone`)),typeof this.event.cost_usd==`number`&&this.event.cost_usd>0&&e.push(`$${this.event.cost_usd.toFixed(4)}`),e.join(` · `)},hasAttachments(){return!!this.event.attachments?.length},noticeText(){let e=this.event.subtype,t=this.event.command;if(t){if(e===`slash_unavailable`)return this.$t(`codingBridge.notice.slashUnavailable`,{command:t});if(e===`slash_codex_unsupported`)return this.$t(`codingBridge.notice.slashCodexUnsupported`,{command:t})}return this.event.text||``}},watch:{"event.text"(){this.scheduleRender()},"event.streaming"(e){e||this.flushRender()}},beforeUnmount(){this.streamTimer&&window.clearTimeout(this.streamTimer)},methods:{scheduleRender(){if(!this.event.streaming){this.flushRender();return}this.streamTimer||=window.setTimeout(()=>{this.streamTimer=0,this.renderedText=Z(this.event.text||``,X)},it)},flushRender(){this.streamTimer&&=(window.clearTimeout(this.streamTimer),0),this.renderedText=Z(this.event.text||``,X)}}}),ut={key:0,class:`group flex items-end justify-end gap-1.5`},dt=[`title`,`aria-label`],ft={class:`max-w-[85%] rounded-lg px-3 py-2 bg-[var(--el-color-primary)] text-white whitespace-pre-wrap break-words`},pt=[`src`],mt=[`href`],ht=[`src`],gt={key:1,class:`flex h-9 w-9 items-center justify-center rounded bg-white/15`},_t={class:`min-w-0 truncate`},vt={key:2},yt={key:2,class:`whitespace-pre-wrap break-words italic text-[var(--app-text-subtle)] border-l-2 border-[var(--app-border-subtle)] pl-3`},bt={key:3,class:`overflow-hidden rounded-md bg-[var(--app-sidebar-bg)] border border-[var(--app-border-subtle)]`},xt={class:`flex items-center gap-2 px-2.5 py-1.5 font-medium text-[var(--app-text-subtle)]`},St={key:0,class:`min-w-0 truncate text-xs font-normal opacity-70`},Ct={key:0,class:`flex flex-col gap-1.5 px-2.5 pb-2`},wt={key:0,class:`font-medium text-[var(--app-text)]`},Tt={class:`whitespace-pre-wrap break-words text-[var(--app-text-subtle)]`},Et={key:1,class:`px-2.5 pb-2`},Dt=[`id`],Ot=[`aria-labelledby`],kt={class:`sr-only`},At={key:0,class:`mt-1 text-xs text-[var(--app-text-subtle)]`},jt={key:2,class:`px-2.5 pb-2`},Mt={key:3,class:`px-2.5 pb-2 font-mono text-xs break-all text-[var(--app-text-subtle)]`},Nt={key:4,class:`px-2.5 pb-2`},Pt={key:0,class:`absolute right-1.5 top-1.5 z-10 rounded bg-[var(--app-content-bg)] px-1 opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100`},Ft={key:5,class:`flex items-center gap-2 text-xs text-[var(--app-text-subtle)]`},It={key:6,class:`flex items-start gap-2 rounded-md bg-[var(--app-sidebar-bg)] border border-[var(--app-border-subtle)] text-[var(--app-text-subtle)] px-3 py-2 text-xs`},Lt={class:`whitespace-pre-wrap break-words`},Rt={key:7,class:`rounded-md bg-[var(--el-color-danger-light-9)] text-[var(--el-color-danger)] px-3 py-2 whitespace-pre-wrap break-words`};function zt(t,r,c,f,m,y){let b=u(`edit-icon`),x=u(`file-icon`),S=u(`vue-markdown`),C=u(`code-snippet`),w=u(`copy-to-clipboard`),T=u(`close-icon`),E=u(`confirm-icon`),D=u(`info-icon`),O=h(`highlight`);return v(),s(`div`,{class:n([`transcript-item text-sm leading-relaxed`,`kind-${t.event.kind}`])},[t.event.kind===`prompt`?(v(),s(`div`,ut,[t.editable?(v(),s(`button`,{key:0,type:`button`,class:`cb-edit-btn opacity-0 transition-opacity group-hover:opacity-100 focus-visible:opacity-100`,title:t.$t(`codingBridge.session.editPrompt`),"aria-label":t.$t(`codingBridge.session.editPrompt`),onClick:r[0]||=e=>t.$emit(`edit`,t.event)},[a(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,dt)):o(``,!0),e(`div`,ft,[t.event.images&&t.event.images.length?(v(),s(`div`,{key:0,class:n([`flex flex-wrap gap-1.5`,{"mb-1.5":t.event.text||t.hasAttachments}])},[(v(!0),s(l,null,g(t.event.images,(e,t)=>(v(),s(`img`,{key:t,src:e,class:`w-16 h-16 rounded object-cover`,alt:``},null,8,pt))),128))],2)):o(``,!0),t.hasAttachments?(v(),s(`div`,{key:1,class:n([`flex flex-wrap gap-1.5`,{"mb-1.5":t.event.text}])},[(v(!0),s(l,null,g(t.event.attachments,(t,n)=>(v(),s(`a`,{key:`${t.url}-${n}`,href:t.url,target:`_blank`,rel:`noopener noreferrer`,class:`flex max-w-[220px] items-center gap-2 rounded-md bg-white/15 px-2 py-1.5 text-xs text-white hover:bg-white/20`},[t.type===`image`?(v(),s(`img`,{key:0,src:t.url,class:`h-9 w-9 rounded object-cover`,alt:``},null,8,ht)):(v(),s(`span`,gt,[a(x,{size:`1em`,"aria-hidden":`true`,focusable:`false`})])),e(`span`,_t,i(t.name||t.url),1)],8,mt))),128))],2)):o(``,!0),t.event.text?(v(),s(`span`,vt,i(t.event.text),1)):o(``,!0)])])):t.event.kind===`text`?(v(),s(`div`,{key:1,class:n([`cb-stream-text`,{"is-streaming":t.event.streaming}])},[d(a(S,{source:t.renderedText,class:`markdown-body bg-transparent text-[var(--app-text)]`},null,8,[`source`]),[[O]])],2)):t.event.kind===`thinking`?(v(),s(`div`,yt,i(t.thinkingText),1)):t.event.kind===`tool_use`?(v(),s(`div`,bt,[e(`div`,xt,[(v(),p(_(t.toolIcon),{class:`text-[var(--el-color-primary)]`,size:`1em`,"aria-hidden":`true`,focusable:`false`})),e(`span`,null,i(t.event.tool),1),t.toolDescription?(v(),s(`span`,St,i(t.toolDescription),1)):o(``,!0)]),t.questionLines.length?(v(),s(`div`,Ct,[(v(!0),s(l,null,g(t.questionLines,(t,n)=>(v(),s(`div`,{key:n,class:`rounded border border-[var(--app-border-subtle)] bg-[var(--app-content-bg)] px-2.5 py-1.5 text-xs`},[t.header?(v(),s(`div`,wt,i(t.header),1)):o(``,!0),e(`div`,Tt,i(t.question),1)]))),128))])):t.todoItems.length?(v(),s(`div`,Et,[e(`div`,{id:t.todoProgressId,class:`mb-1.5 text-xs text-[var(--app-text-subtle)]`},i(t.todoProgressLabel),9,Dt),e(`ul`,{class:`flex flex-col gap-1`,"aria-labelledby":t.todoProgressId},[(v(!0),s(l,null,g(t.todoItems,(t,r)=>(v(),s(`li`,{key:r,class:`flex items-start gap-2 text-xs`},[(v(),p(_(t.icon),{class:n([`mt-0.5 flex-none`,t.iconClass]),size:`1em`,"aria-hidden":`true`,focusable:`false`},null,8,[`class`])),e(`span`,kt,i(t.statusLabel),1),e(`span`,{class:n([`min-w-0 break-words`,t.textClass])},i(t.text),3)]))),128))],8,Ot),t.todoOverflow?(v(),s(`div`,At,i(t.$t(`codingBridge.transcript.todoOverflow`,{count:t.todoOverflow})),1)):o(``,!0)])):t.commandText?(v(),s(`div`,jt,[a(C,{code:t.commandText,lang:`bash`,copyable:``},null,8,[`code`])])):t.filePath?(v(),s(`div`,Mt,i(t.filePath),1)):t.inputText?(v(),s(`div`,Nt,[a(C,{code:t.inputText,lang:`json`,copyable:``},null,8,[`code`])])):o(``,!0)])):t.event.kind===`tool_result`?(v(),s(`div`,{key:4,class:n([`group relative overflow-hidden rounded-md`,t.event.is_error?`bg-[var(--el-color-danger-light-9)]`:`bg-[var(--app-sidebar-bg)]`])},[t.event.content?(v(),s(`div`,Pt,[a(w,{content:t.resultText},null,8,[`content`])])):o(``,!0),e(`pre`,{class:n([`m-0 max-h-72 overflow-auto whitespace-pre-wrap break-words px-2.5 py-2 font-mono text-xs`,t.event.is_error?`text-[var(--el-color-danger)]`:`text-[var(--app-text-subtle)]`])},i(t.resultDisplay),3)],2)):t.event.kind===`result`?(v(),s(`div`,Ft,[t.event.is_error?(v(),p(T,{key:0,size:`1em`,"aria-hidden":`true`,focusable:`false`})):(v(),p(E,{key:1,size:`1em`,"aria-hidden":`true`,focusable:`false`})),e(`span`,null,i(t.resultLabel),1)])):t.event.kind===`notice`?(v(),s(`div`,It,[a(D,{class:`mt-0.5 flex-none text-[var(--el-color-primary)]`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,Lt,i(t.noticeText),1)])):t.event.kind===`error`?(v(),s(`div`,Rt,i(t.event.text),1)):o(``,!0)],2)}var Bt=W(lt,[[`render`,zt],[`__scopeId`,`data-v-f71fa078`]]),Vt=`Pondering.Noodling.Conjuring.Brewing.Cooking.Crafting.Churning.Simmering.Percolating.Ruminating.Musing.Marinating.Synthesizing.Computing.Hatching.Forging.Vibing.Working.Thinking.Cogitating.Mulling.Stewing.Tinkering.Wrangling.Spinning.Reticulating.Manifesting.Deliberating`.split(`.`),Ht=[`思考中`,`酝酿中`,`沉思中`,`推敲中`,`构思中`,`计算中`,`琢磨中`,`捣鼓中`,`炼制中`,`召唤中`,`编织中`,`烹饪中`,`咀嚼中`,`盘算中`,`发酵中`,`运转中`,`冥想中`,`鼓捣中`,`熬制中`,`神游中`,`演算中`,`雕琢中`,`头脑风暴中`,`反复斟酌中`],Ut=60,Wt=1500,Gt=28,Kt=y({name:`CodingBridgeThinkingIndicator`,components:{LoadingIcon:z},data(){return{display:``,elapsed:0,charIndex:0,phase:`typing`,currentWord:``,elapsedTimer:0,typeTimer:0}},computed:{words(){return this.$i18n.locale.startsWith(`zh`)?Ht:Vt}},mounted(){this.currentWord=this.pickWord(),this.elapsedTimer=window.setInterval(()=>{this.elapsed+=1},1e3),this.scheduleType(Ut)},beforeUnmount(){window.clearInterval(this.elapsedTimer),window.clearTimeout(this.typeTimer)},methods:{pickWord(){let e=this.words;if(e.length<=1)return e[0]??``;let t=this.currentWord;for(;t===this.currentWord;)t=e[Math.floor(Math.random()*e.length)];return t},scheduleType(e){this.typeTimer=window.setTimeout(this.advance,e)},advance(){let e=this.currentWord;this.phase===`typing`?(this.charIndex+=1,this.display=e.slice(0,this.charIndex),this.charIndex>=e.length?(this.phase=`holding`,this.scheduleType(Wt)):this.scheduleType(Ut)):this.phase===`holding`?(this.phase=`deleting`,this.scheduleType(Gt)):(--this.charIndex,this.display=e.slice(0,Math.max(0,this.charIndex)),this.charIndex<=0?(this.currentWord=this.pickWord(),this.phase=`typing`,this.scheduleType(Ut)):this.scheduleType(Gt))}}}),qt={class:`cb-thinking flex items-center gap-2 text-sm text-[var(--app-text-subtle)] py-1`},Jt={class:`cb-thinking__word`},Yt={class:`cb-thinking__elapsed tabular-nums opacity-60`};function Xt(t,n,o,c,l,d){let f=u(`loading-icon`);return v(),s(`div`,qt,[a(f,{class:`cb-thinking__spinner adc-icon-spin text-[var(--el-color-primary)]`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,Jt,[r(i(t.display),1),n[0]||=e(`span`,{class:`cb-thinking__caret`},`▋`,-1)]),e(`span`,Yt,`(`+i(t.elapsed)+`s)`,1)])}var Zt=W(Kt,[[`render`,Xt],[`__scopeId`,`data-v-ae116215`]]),Qt=y({name:`CodingBridgeComposerSettings`,components:{ElButton:Y,ElDialog:q},props:{dialog:{type:Boolean,default:!1},open:{type:Boolean,default:!1}},emits:[`update:open`]}),$t={key:0,class:`cb-settings-inline`},en={class:`cb-settings-rows`};function tn(t,n,o,c,l,d){let h=u(`el-button`),g=u(`el-dialog`);return t.dialog?(v(),p(g,{key:1,"model-value":t.open,title:t.$t(`codingBridge.session.settings`),width:`min(420px, 92vw)`,"align-center":``,"append-to-body":``,class:`cb-settings-dialog`,"onUpdate:modelValue":n[1]||=e=>t.$emit(`update:open`,e)},{footer:m(()=>[a(h,{type:`primary`,round:``,onClick:n[0]||=e=>t.$emit(`update:open`,!1)},{default:m(()=>[r(i(t.$t(`common.button.close`)),1)]),_:1})]),default:m(()=>[e(`div`,en,[f(t.$slots,`default`,{},void 0,!0)])]),_:3},8,[`model-value`,`title`])):(v(),s(`div`,$t,[f(t.$slots,`default`,{},void 0,!0)]))}var nn=W(Qt,[[`render`,tn],[`__scopeId`,`data-v-20aa7356`]]),rn=y({name:`CodingBridgeDirectoryDialog`,components:{ContinueIcon:ne,FileIcon:N,FolderIcon:ce,RedoIcon:U,UpIcon:k,ElDialog:q,ElButton:Y,ElInput:J},props:{visible:{type:Boolean,default:!1},initialPath:{type:String,default:``}},emits:[`update:visible`,`select`],data(){return{pathInput:``}},computed:{listing(){return this.$store.state.codingBridge?.directory},loading(){return this.$store.state.codingBridge?.directoryLoading===!0},directories(){return(this.listing?.entries??[]).filter(e=>e.type===`dir`)},files(){return(this.listing?.entries??[]).filter(e=>e.type===`file`)},isEmpty(){return!!this.listing&&!this.listing.error&&(this.listing.entries??[]).length===0}},watch:{"listing.path"(e){this.pathInput=e??``}},methods:{onOpen(){this.pathInput=this.initialPath||``,this.$store.dispatch(`codingBridge/browseDir`,this.initialPath||void 0)},goPath(){let e=this.pathInput.trim();e&&this.$store.dispatch(`codingBridge/browseDir`,e)},syncPathInput(){this.pathInput=this.listing?.path??``},onVisibleChange(e){this.$emit(`update:visible`,e),e||this.$store.dispatch(`codingBridge/clearDirectory`)},openDir(e){this.$store.dispatch(`codingBridge/browseDir`,e)},goParent(){this.listing?.parent&&this.$store.dispatch(`codingBridge/browseDir`,this.listing.parent)},refresh(){this.$store.dispatch(`codingBridge/browseDir`,this.listing?.path||this.initialPath||void 0)},chooseCurrent(){this.listing&&!this.listing.error&&(this.$emit(`select`,this.listing.path),this.onVisibleChange(!1))}}}),an={class:`flex flex-col gap-2`},on={class:`flex items-center gap-2 min-w-0`},sn={class:`h-72 overflow-y-auto border border-[var(--app-border-subtle)] rounded-md divide-y divide-[var(--app-border-subtle)]`},cn={key:0,class:`h-full flex items-center justify-center text-sm text-[var(--app-text-subtle)]`},ln={key:1,class:`h-full flex items-center justify-center text-sm text-[var(--el-color-danger)]`},un=[`onClick`],dn={class:`truncate`,dir:`ltr`},fn={class:`truncate`,dir:`ltr`},pn={key:0,class:`h-full flex items-center justify-center text-sm text-[var(--app-text-subtle)] py-8`},mn={key:0,class:`text-[11px] text-[var(--app-text-subtle)] px-1`},hn={class:`flex items-center justify-end gap-2`};function gn(t,d,f,h,_,y){let b=u(`up-icon`),x=u(`el-button`),S=u(`continue-icon`),C=u(`el-input`),w=u(`redo-icon`),T=u(`folder-icon`),E=u(`file-icon`),D=u(`el-dialog`);return v(),p(D,{"model-value":t.visible,title:t.$t(`codingBridge.directory.title`),width:`520px`,"append-to-body":``,"onUpdate:modelValue":t.onVisibleChange,onOpen:t.onOpen},{footer:m(()=>[e(`div`,hn,[a(x,{round:``,onClick:d[1]||=e=>t.onVisibleChange(!1)},{default:m(()=>[r(i(t.$t(`common.button.cancel`)),1)]),_:1}),a(x,{type:`primary`,round:``,disabled:!t.listing||!!t.listing.error,onClick:t.chooseCurrent},{default:m(()=>[r(i(t.$t(`codingBridge.directory.choose`)),1)]),_:1},8,[`disabled`,`onClick`])])]),default:m(()=>[e(`div`,an,[e(`div`,on,[a(x,{size:`small`,circle:``,disabled:!t.listing||!t.listing.parent||t.loading,title:t.$t(`codingBridge.directory.up`),"aria-label":t.$t(`codingBridge.directory.up`),onClick:t.goParent},{default:m(()=>[a(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`disabled`,`title`,`aria-label`,`onClick`]),a(C,{modelValue:t.pathInput,"onUpdate:modelValue":d[0]||=e=>t.pathInput=e,size:`small`,class:`flex-1 min-w-0`,dir:`ltr`,placeholder:t.$t(`codingBridge.directory.pathPlaceholder`),disabled:t.loading,onKeyup:c(t.goPath,[`enter`]),onBlur:t.syncPathInput},{append:m(()=>[a(x,{title:t.$t(`codingBridge.directory.go`),disabled:t.loading||!t.pathInput.trim(),"aria-label":t.$t(`codingBridge.directory.go`),onClick:t.goPath},{default:m(()=>[a(S,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`title`,`disabled`,`aria-label`,`onClick`])]),_:1},8,[`modelValue`,`placeholder`,`disabled`,`onKeyup`,`onBlur`]),a(x,{size:`small`,circle:``,disabled:t.loading,title:t.$t(`codingBridge.directory.refresh`),"aria-label":t.$t(`codingBridge.directory.refresh`),onClick:t.refresh},{default:m(()=>[a(w,{class:n({"adc-icon-spin":t.loading}),size:`1em`,"aria-hidden":`true`,focusable:`false`},null,8,[`class`])]),_:1},8,[`disabled`,`title`,`aria-label`,`onClick`])]),e(`div`,sn,[t.loading&&!t.listing?(v(),s(`div`,cn,i(t.$t(`codingBridge.directory.loading`)),1)):t.listing&&t.listing.error?(v(),s(`div`,ln,i(t.listing.error),1)):(v(),s(l,{key:2},[(v(!0),s(l,null,g(t.directories,n=>(v(),s(`button`,{key:n.path,type:`button`,class:`w-full flex items-center gap-2 px-3 py-2 text-left text-sm hover:bg-[var(--app-content-hover-bg)]`,onClick:e=>t.openDir(n.path)},[a(T,{class:`text-[var(--el-color-warning)]`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,dn,i(n.name),1)],8,un))),128)),(v(!0),s(l,null,g(t.files,t=>(v(),s(`div`,{key:t.path,class:`w-full flex items-center gap-2 px-3 py-2 text-sm text-[var(--app-text-subtle)]`},[a(E,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,fn,i(t.name),1)]))),128)),t.isEmpty?(v(),s(`div`,pn,i(t.$t(`codingBridge.directory.empty`)),1)):o(``,!0)],64))]),t.listing&&t.listing.truncated?(v(),s(`p`,mn,i(t.$t(`codingBridge.directory.truncated`)),1)):o(``,!0)])]),_:1},8,[`model-value`,`title`,`onUpdate:modelValue`,`onOpen`])}var _n=W(rn,[[`render`,gn]]),vn=`data:image/svg+xml,%3csvg%20fill='%23D97757'%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eClaude%3c/title%3e%3cpath%20d='m4.7144%2015.9555%204.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608%201.5179.1032%202.2767.1578%201.6514.0972%202.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973%209.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686%201.9064%201.4754%202.4893%201.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335%206.6997%200l.9957.1336.419.3642.6192%201.4147%201.0018%202.2282%201.5543%203.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853%201.8517-.5586%202.9021-.3643%201.9429h.2125l.2429-.2429.9835-1.3053%201.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759%201.1293-.34%201.1657-1.0625%201.3478-.8804%201.1414-1.2628%201.7-.7893%201.36.0729.1093.1882-.0183%202.8535-.607%201.5421-.2794%201.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607%201.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929%201.0686%202.0035%201.8092%202.5075%202.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496%202.3436%203.5214.1214%201.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38%2017.959l-1.1414-1.9428-.1397.079-.674%207.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328%201.9672-2.1796%202.9446-1.7243%201.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889%202.386-3.0357%201.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385%204.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429%201.9064-1.3114Z'/%3e%3c/svg%3e`,yn=`data:image/svg+xml,%3csvg%20fill='%23000000'%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eOpenAI%3c/title%3e%3cpath%20d='M22.282%209.821a5.985%205.985%200%200%200-.516-4.91%206.046%206.046%200%200%200-6.51-2.9A6.065%206.065%200%200%200%204.981%204.18a5.985%205.985%200%200%200-3.998%202.9%206.046%206.046%200%200%200%20.743%207.097%205.98%205.98%200%200%200%20.51%204.911%206.051%206.051%200%200%200%206.515%202.9A5.985%205.985%200%200%200%2013.26%2024a6.056%206.056%200%200%200%205.772-4.206%205.99%205.99%200%200%200%203.997-2.9%206.056%206.056%200%200%200-.747-7.073zM13.26%2022.43a4.476%204.476%200%200%201-2.876-1.04l.141-.081%204.779-2.758a.795.795%200%200%200%20.392-.681v-6.737l2.02%201.168a.071.071%200%200%201%20.038.052v5.583a4.504%204.504%200%200%201-4.494%204.494zM3.6%2018.304a4.47%204.47%200%200%201-.535-3.014l.142.085%204.783%202.759a.771.771%200%200%200%20.78%200l5.843-3.369v2.332a.08.08%200%200%201-.033.062L9.74%2019.95a4.5%204.5%200%200%201-6.14-1.646zM2.34%207.896a4.485%204.485%200%200%201%202.366-1.973V11.6a.766.766%200%200%200%20.388.676l5.815%203.355-2.02%201.168a.076.076%200%200%201-.071%200l-4.83-2.786A4.504%204.504%200%200%201%202.34%207.872zm16.597%203.855l-5.833-3.387L15.119%207.2a.076.076%200%200%201%20.071%200l4.83%202.791a4.494%204.494%200%200%201-.676%208.105v-5.678a.79.79%200%200%200-.407-.667zm2.01-3.023l-.141-.085-4.774-2.782a.776.776%200%200%200-.785%200L9.409%209.23V6.897a.066.066%200%200%201%20.028-.061l4.83-2.787a4.5%204.5%200%200%201%206.68%204.66zm-12.64%204.135l-2.02-1.164a.08.08%200%200%201-.038-.057V6.075a4.5%204.5%200%200%201%207.375-3.453l-.142.08L8.704%205.46a.795.795%200%200%200-.393.681zm1.097-2.365l2.602-1.5%202.607%201.5v2.999l-2.597%201.5-2.607-1.5z'/%3e%3c/svg%3e`,bn=`data:image/svg+xml,%3csvg%20fill='%23000'%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eGitHub%20Copilot%3c/title%3e%3cpath%20d='M23.922%2016.997C23.061%2018.492%2018.063%2022.02%2012%2022.02%205.937%2022.02.939%2018.492.078%2016.997A.641.641%200%200%201%200%2016.741v-2.869a.883.883%200%200%201%20.053-.22c.372-.935%201.347-2.292%202.605-2.656.167-.429.414-1.055.644-1.517a10.098%2010.098%200%200%201-.052-1.086c0-1.331.282-2.499%201.132-3.368.397-.406.89-.717%201.474-.952C7.255%202.937%209.248%201.98%2011.978%201.98c2.731%200%204.767.957%206.166%202.093.584.235%201.077.546%201.474.952.85.869%201.132%202.037%201.132%203.368%200%20.368-.014.733-.052%201.086.23.462.477%201.088.644%201.517%201.258.364%202.233%201.721%202.605%202.656a.841.841%200%200%201%20.053.22v2.869a.641.641%200%200%201-.078.256Zm-11.75-5.992h-.344a4.359%204.359%200%200%201-.355.508c-.77.947-1.918%201.492-3.508%201.492-1.725%200-2.989-.359-3.782-1.259a2.137%202.137%200%200%201-.085-.104L4%2011.746v6.585c1.435.779%204.514%202.179%208%202.179%203.486%200%206.565-1.4%208-2.179v-6.585l-.098-.104s-.033.045-.085.104c-.793.9-2.057%201.259-3.782%201.259-1.59%200-2.738-.545-3.508-1.492a4.359%204.359%200%200%201-.355-.508Zm2.328%203.25c.549%200%201%20.451%201%201v2c0%20.549-.451%201-1%201-.549%200-1-.451-1-1v-2c0-.549.451-1%201-1Zm-5%200c.549%200%201%20.451%201%201v2c0%20.549-.451%201-1%201-.549%200-1-.451-1-1v-2c0-.549.451-1%201-1Zm3.313-6.185c.136%201.057.403%201.913.878%202.497.442.544%201.134.938%202.344.938%201.573%200%202.292-.337%202.657-.751.384-.435.558-1.15.558-2.361%200-1.14-.243-1.847-.705-2.319-.477-.488-1.319-.862-2.824-1.025-1.487-.161-2.192.138-2.533.529-.269.307-.437.808-.438%201.578v.021c0%20.265.021.562.063.893Zm-1.626%200c.042-.331.063-.628.063-.894v-.02c-.001-.77-.169-1.271-.438-1.578-.341-.391-1.046-.69-2.533-.529-1.505.163-2.347.537-2.824%201.025-.462.472-.705%201.179-.705%202.319%200%201.211.175%201.926.558%202.361.365.414%201.084.751%202.657.751%201.21%200%201.902-.394%202.344-.938.475-.584.742-1.44.878-2.497Z'/%3e%3c/svg%3e`;function xn(e){let t=(e instanceof Error?`${e.name} ${e.message}`:String(e??``)).toLowerCase().replaceAll(`_`,`-`);return t.includes(`notallowed`)||t.includes(`not-allowed`)||t.includes(`permission`)?`permission-denied`:t.includes(`notfound`)||t.includes(`not-found`)||t.includes(`audio-capture`)||t.includes(`microphone`)?`microphone-unavailable`:t.includes(`network`)||t.includes(`fetch`)?`network`:t.includes(`abort`)||t.includes(`cancel`)?`aborted`:`unknown`}function Sn(){return[`audio/webm;codecs=opus`,`audio/webm`,`audio/mp4`,`audio/ogg`].find(e=>MediaRecorder.isTypeSupported?.(e))}function Cn(e){return e.includes(`mp4`)?`m4a`:e.includes(`ogg`)?`ogg`:e.includes(`wav`)?`wav`:`webm`}async function wn(e,t,n,r){let i=new FormData;i.append(`file`,new File([e],t,{type:e.type||`audio/webm`})),i.append(`model`,`gpt-transcribe`),i.append(`response_format`,`json`),n&&i.append(`language`,n);let a=await fetch(`${ge}/v1/audio/transcriptions`,{method:`POST`,headers:{Authorization:`Bearer ${Ce(r)}`},body:i});if(!a.ok)throw Error(`transcription request failed (${a.status})`);return(await a.json()).text?.trim()??``}var Tn=class{mediaDevices;createRecorder;transcribe;stream;recorder;callbacks;chunks=[];language=``;token=``;generation=0;aborted=!1;constructor(e=typeof navigator>`u`?void 0:navigator.mediaDevices,t=(e,t)=>new MediaRecorder(e,t),n=wn){this.mediaDevices=e,this.createRecorder=t,this.transcribe=n}async isSupported(){return!!this.mediaDevices?.getUserMedia&&typeof MediaRecorder<`u`}async start(e,t,n){await this.abort();let r=++this.generation;this.callbacks=n,this.language=e,this.token=t,this.chunks=[],this.aborted=!1;try{let e=await this.mediaDevices?.getUserMedia({audio:{channelCount:1,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});if(!e||r!==this.generation){e?.getTracks().forEach(e=>e.stop());return}this.stream=e;let t=Sn();this.recorder=this.createRecorder(e,t?{mimeType:t}:void 0),this.recorder.ondataavailable=e=>{r===this.generation&&e.data.size>0&&this.chunks.push(e.data)},this.recorder.start()}catch(e){let t=xn(e);throw t!==`aborted`&&n.onError(t),await this.abort(),e}}async stop(){let e=this.recorder,t=this.generation;!e||e.state===`inactive`||!this.callbacks||await new Promise(n=>{e.onstop=async()=>{if(this.releaseStream(),t!==this.generation||this.aborted||!this.callbacks)return n();let r=this.callbacks,i=e.mimeType||this.chunks[0]?.type||`audio/webm`,a=new Blob(this.chunks,{type:i});try{if(!a.size)r.onError(`no-speech`);else{let e=await this.transcribe(a,`coding-bridge-voice.${Cn(i)}`,this.language,this.token);if(t!==this.generation||this.aborted)return n();e?r.onResult({finalText:e,interimText:``}):r.onError(`no-speech`)}}catch(e){t===this.generation&&!this.aborted&&r.onError(xn(e))}finally{t===this.generation&&(this.aborted||r.onEnd(),this.reset()),n()}},e.stop()})}async abort(){this.aborted=!0,this.generation+=1;let e=this.recorder;e&&e.state!==`inactive`&&(e.ondataavailable=null,e.onstop=null,e.stop()),this.releaseStream(),this.reset()}async dispose(){await this.abort()}releaseStream(){this.stream?.getTracks().forEach(e=>e.stop()),this.stream=void 0}reset(){this.recorder=void 0,this.callbacks=void 0,this.chunks=[],this.language=``,this.token=``}};function En(){return new Tn}var Dn=50*1024*1024,Q=10,On=60,kn=60,An=80,jn={claude:{src:vn,invertOnDark:!1},codex:{src:yn,invertOnDark:!0},copilot:{src:bn,invertOnDark:!0}},Mn=y({name:`CodingBridgeSessionView`,components:{AddIcon:H,AiIcon:re,AttachmentIcon:B,CloseIcon:G,CodeIcon:j,ConfirmIcon:A,DeveloperIcon:L,EditIcon:V,ExpandDownIcon:ie,FileIcon:N,FolderOpenIcon:Ne,HistoryIcon:F,MicrophoneIcon:le,MoreIcon:M,PerformanceIcon:P,RedoIcon:U,SecurityIcon:fe,StopIcon:pe,UpIcon:k,ViewIcon:oe,ElInput:J,ElButton:Y,ElPopover:O,ElDropdown:D,ElDropdownMenu:E,ElDropdownItem:T,ElUpload:b,ElCheckbox:C,ElSkeleton:te,ElSkeletonItem:ee,TranscriptItem:Bt,ThinkingIndicator:Zt,ComposerSettings:nn,DirectoryDialog:_n,AskUserQuestionCard:De,CopyToClipboard:Ee},mixins:[Se,we],emits:[`history`,`devices`],data(){return{prompt:``,cwd:``,model:``,customModelDraft:``,permissionMode:`bypassPermissions`,provider:`claude`,effort:``,directoryVisible:!1,moreOpen:!1,mobileSettings:!1,settingsMql:void 0,slashMenuOpen:!1,slashActiveIndex:0,editingEventId:``,restoreCode:!1,attachmentFileList:[],uploadUrl:ve()+`/api/v1/files/`,maxAttachments:Q,visibleCount:On,pinnedToBottom:!0,scrollPending:!1,transcriptObserver:void 0,observedTranscript:void 0,speechController:void 0,speechSupported:!1,speechState:`idle`,speechBasePrompt:``,speechFinalText:``,speechInterimText:``}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},currentNodeId(){return this.$store.state.codingBridge?.currentNodeId},lastComposer(){let e=this.currentNodeId;return(e?this.$store.state.codingBridge?.lastComposer?.[e]:void 0)??{}},currentNode(){return this.$store.state.codingBridge?.nodes?.find(e=>e.node_id===this.currentNodeId)},nodeOnline(){return this.currentNode?.status===`online`},currentSessionId(){return this.$store.state.codingBridge?.currentSessionId},currentSession(){let e=this.currentSessionId;return e?this.$store.state.codingBridge?.sessions?.[e]:void 0},events(){let e=this.currentSessionId;return e?this.$store.state.codingBridge?.events?.[e]??[]:[]},eventCount(){return this.events.length},visibleEvents(){let e=this.events;return e.length>this.visibleCount?e.slice(-this.visibleCount):e},hiddenEventCount(){return Math.max(0,this.events.length-this.visibleCount)},historyLoading(){return this.$store.state.codingBridge?.status?.getHistoryDetail===x.Request},pendingQuestion(){let e=this.currentSessionId;if(!e)return;let t=(this.$store.state.codingBridge?.permissions??[]).find(t=>t.session_id===e&&nt(t));return t?{request_id:t.request_id,payload:rt(t)}:void 0},isNewSession(){return!this.currentSessionId},canPickCwd(){return this.isNewSession||!this.currentSession?.started},readonly(){return this.currentSession?.readonly===!0},resumeHint(){return!!this.currentSession?.provider&&!this.currentSession?.started&&!this.readonly},replayLabel(){return!this.currentSession?.provider||this.currentSession?.started?``:this.currentSession.provider===`codex`?this.$t(`codingBridge.history.codexLabel`):this.currentSession.provider===`claude`?this.$t(`codingBridge.history.claudeLabel`):this.providerName(this.currentSession.provider)},running(){let e=this.currentSession?.status;return e===`running`||e===`starting`},thinking(){return this.running&&!this.pendingQuestion},connected(){return this.$store.state.codingBridge?.connection===`connected`},canRetry(){return this.currentSession?.status===`error`&&!this.readonly&&this.connected&&this.nodeOnline&&this.events.some(e=>e.kind===`prompt`)},attachments(){return(this.attachmentFileList||[]).map(e=>{let t=e.response?.file_url||(typeof e.url==`string`&&!e.url.startsWith(`blob:`)?e.url:``);if(!t)return;let n=e.raw,r=n?.type||e.mime_type||``;return{type:this.isImageAttachment(e)?`image`:`file`,url:t,name:e.name,mime_type:r,size:n?.size}}).filter(e=>!!e)},uploadingAttachments(){return(this.attachmentFileList||[]).some(e=>this.isAttachmentUploading(e))},speechActive(){return this.speechState!==`idle`},canSend(){return(!!this.prompt.trim()||this.attachments.length>0)&&!this.uploadingAttachments&&!this.speechActive&&this.connected&&this.nodeOnline},composerHint(){return this.speechState===`stopping`?this.$t(`codingBridge.session.voiceStopping`):this.speechState===`listening`?this.$t(`codingBridge.session.voiceListening`):this.uploadingAttachments?this.$t(`codingBridge.session.uploadingAttachment`):this.providerCaps.length&&!this.currentProviderAvailable?this.$t(`codingBridge.session.providerUnavailableHint`,{name:this.providerName(this.provider)}):this.resumeHint?this.$t(`codingBridge.history.resumeHint`):this.$t(`codingBridge.session.enterHint`)},nodeCapabilities(){let e=this.currentNodeId;return e?this.$store.state.codingBridge?.capabilities?.[e]:void 0},providerCaps(){return this.nodeCapabilities?.providers??[]},currentProviderCap(){return this.providerCaps.find(e=>e.name===this.provider)},canEdit(){return this.readonly?!1:!!this.providerCaps.find(e=>e.name===this.activeProviderName)?.supports_edit},canRestoreCode(){return!!this.providerCaps.find(e=>e.name===this.activeProviderName)?.supports_code_restore},editingActive(){return!!this.editingEventId},currentProviderAvailable(){return this.providerCaps.length?this.currentProviderCap?.available!==!1:!0},providerOptions(){return this.providerCaps.length?this.providerCaps.map(e=>({value:e.name,label:e.label,available:e.available!==!1})):[{label:this.$t(`codingBridge.session.providerClaude`),value:`claude`,available:!0},{label:this.$t(`codingBridge.session.providerCodex`),value:`codex`,available:!0},{label:`GitHub Copilot`,value:`copilot`,available:!0}]},modelOptions(){return this.currentProviderCap?.models??[]},allowCustomModel(){return this.currentProviderCap?.allow_custom_model??!0},effortOptions(){let e=this.currentProviderCap?.efforts;return(e&&e.length?e:[``]).map(e=>({value:e,label:this.effortLabel(e)}))},permissionModeOptions(){let e=this.currentProviderCap?.permission_modes;return(e&&e.length?e:[`default`,`acceptEdits`,`plan`,`bypassPermissions`]).map(e=>({value:e,label:this.permissionModeLabel(e)}))},sessionMeta(){let e=this.currentSession;if(!e)return``;let t=[];return e.provider&&t.push(this.providerName(e.provider)),e.cwd&&t.push(e.cwd),e.model&&t.push(e.model),t.join(` · `)},activeProviderName(){return this.currentSession?.provider||this.provider},slashCommands(){let e=this.activeProviderName;return this.providerCaps.find(t=>t.name===e)?.commands??[]},slashMatches(){let e=this.prompt.match(/^\/(\S*)$/);if(!e)return[];let t=e[1].toLowerCase();return this.slashCommands.filter(e=>[e.name,...e.aliases??[]].some(e=>e.toLowerCase().startsWith(t)))},slashMenuVisible(){return this.slashMenuOpen&&this.slashMatches.length>0},diagnostics(){let e=[];return this.currentNodeId&&e.push({label:this.$t(`codingBridge.session.nodeId`),value:this.currentNodeId}),this.currentSessionId&&e.push({label:this.$t(`codingBridge.session.sessionId`),value:this.currentSessionId}),this.currentSession?.trace_id&&e.push({label:this.$t(`codingBridge.session.traceId`),value:this.currentSession.trace_id}),e}},watch:{eventCount(){this.scrollToBottom()},pendingQuestion(){this.scrollToBottom()},thinking(){this.scrollToBottom()},currentSessionId(){this.cancelSpeechRecognition?.(),this.pinnedToBottom=!0,this.scrollToBottom(),this.visibleCount=On,this.editingEventId=``,this.restoreCode=!1,this.syncSessionSettings()},currentNodeId(){this.cancelSpeechRecognition?.(),this.requestCapabilities(),this.isNewSession&&this.restoreComposerPrefs()},nodeOnline(e){e||this.cancelSpeechRecognition?.()},providerCaps(){if(!this.isNewSession||!this.providerCaps.length)return;let e=this.providerCaps.find(e=>e.name===this.provider);if(!e||e.available===!1){let e=this.providerCaps.find(e=>e.available!==!1);e&&(this.provider=e.name)}},provider(){this.isNewSession&&(this.model=``,this.effort=``)},prompt(e){this.slashMenuOpen=/^\/\S*$/.test(e),this.slashActiveIndex>=this.slashMatches.length&&(this.slashActiveIndex=0)}},mounted(){this.requestCapabilities(),this.syncSessionSettings(),this.scrollToBottom(),this.observeTranscript(),this.watchSettingsBreakpoint(),this.initializeSpeechRecognition?.()},updated(){this.observeTranscript()},beforeUnmount(){this.transcriptObserver?.disconnect(),this.transcriptObserver=void 0,this.observedTranscript=void 0,this.settingsMql?.removeEventListener(`change`,this.onSettingsBreakpoint),this.settingsMql=void 0,this.speechController?.dispose(),this.speechController=void 0},methods:{async initializeSpeechRecognition(){let e=En();this.speechController=e,this.speechSupported=await e.isSupported()},async toggleSpeechRecognition(){if(this.speechState===`listening`){await this.stopSpeechRecognition();return}this.speechState===`idle`&&await this.startSpeechRecognition()},async startSpeechRecognition(){if(!this.speechController||!this.speechSupported)return;let e=await this.ensureSpeechCredential();if(!e){S.error(this.$t(`codingBridge.session.voiceError`));return}this.speechBasePrompt=this.prompt,this.speechFinalText=``,this.speechInterimText=``,this.speechState=`listening`;try{await this.speechController.start(this.$i18n.locale,e,{onResult:this.applySpeechSnapshot,onEnd:this.finishSpeechRecognition,onError:this.handleSpeechError})}catch{this.finishSpeechRecognition()}},async ensureSpeechCredential(){let e=this.$store.state.openaiimage?.credential?.token;if(e)return e;await this.$store.dispatch(`openaiimage/getService`);let t=await this.$store.dispatch(`openaiimage/getApplications`),n=ye([...this.$store.state.applications??[],...t??[]],this.$store.state.openaiimage?.application);return n&&await this.$store.dispatch(`openaiimage/setApplication`,n),e=this.$store.state.openaiimage?.credential?.token,e??``},async stopSpeechRecognition(){if(!(!this.speechController||this.speechState!==`listening`)){this.speechState=`stopping`;try{await this.speechController.stop()}catch{this.handleSpeechError(`unknown`),this.finishSpeechRecognition()}}},async cancelSpeechRecognition(){!this.speechController||this.speechState===`idle`||(this.speechState=`idle`,this.speechInterimText=``,this.applySpeechPrompt(),await this.speechController.abort())},applySpeechSnapshot(e){this.speechState!==`idle`&&(this.speechFinalText=e.finalText,this.speechInterimText=e.interimText,this.applySpeechPrompt())},applySpeechPrompt(){let e=`${this.speechFinalText}${this.speechInterimText}`,t=this.speechBasePrompt&&e?`
1
+ import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,L as a,M as o,N as s,S as c,T as l,at as u,ht as d,it as f,j as p,mt as m,ot as h,rt as g,st as _,tt as v,z as y}from"./vendor-chart-Dw-P17PN.js";import{t as b}from"./upload-BHlKa9Ox.js";import{h as x,v as S}from"./models-BWtS-s13.js";import{t as C}from"./checkbox-DXMDpaxv.js";import{t as w}from"./drawer-fIKO5R-t.js";import{n as T,r as E,t as D}from"./dropdown-BpdvxDue.js";import{t as O}from"./popover-IhXMoX-P.js";import{n as ee,t as te}from"./skeleton-Dj_a_iIP.js";import{t as ne}from"./arrow-right-DU9hmChJ.js";import{t as k}from"./arrow-up-CO5DClih.js";import{t as re}from"./brain-D6NjGmAq.js";import{t as A}from"./check-8okPvRJR.js";import{t as ie}from"./chevron-down-CE-v7C1Z.js";import{t as ae}from"./clipboard-list-BlrQhAiR.js";import{t as j}from"./code-D-ejRMRt.js";import{t as M}from"./ellipsis-DwHZbxHC.js";import{t as oe}from"./eye-CgU_4WhV.js";import{t as se}from"./file-text-BHxDInDT.js";import{t as N}from"./file-VWYkzRuc.js";import{t as ce}from"./folder-C0Vt7TDW.js";import{t as P}from"./gauge-38IC0I72.js";import{t as F}from"./history-DAREAhUe.js";import{t as I}from"./info-CX46K-2a.js";import{t as L}from"./laptop-CmGkKcLs.js";import{t as R}from"./link-S80Vo5YT.js";import{t as z}from"./loader-circle-CMan_y4T.js";import{t as le}from"./mic-Cy088pRc.js";import{t as ue}from"./monitor-B2Fsh0_H.js";import{t as B}from"./paperclip-CiFF6idQ.js";import{t as V}from"./pencil-2LG-UuFD.js";import{t as H}from"./plus-oRS-6XRp.js";import{t as U}from"./rotate-cw-BclxKwik.js";import{t as de}from"./search-MoJY2mLN.js";import{t as fe}from"./shield-2D4IamW1.js";import{t as pe}from"./square-N1_hTOAE.js";import{t as me}from"./terminal-DohjAQkV.js";import{t as he}from"./trash-2-UoD61laP.js";import{wa as ge}from"./constants-C4mNoJOb.js";import{O as _e}from"./i18n-BEtZpGSv.js";import{A as W,Ba as ve,Ha as G,Sn as ye,Tn as be,Ua as K,Wa as xe,Ya as q,ct as Se,fo as J,io as Y,oa as Ce,st as we}from"./index-Dn-8sNW2.js";import"./vendor-highlight-Dd94xpKT.js";import{t as Te}from"./VueMarkdown-BgudlQNQ.js";import{t as Ee}from"./CopyToClipboard-Db0qgR8j.js";import{t as De}from"./AskUserQuestionCard-zjS9mzsZ.js";import{s as Oe,t as ke}from"./codingBridgeNotify-DYB7QEzg.js";import{t as Ae}from"./CodeSnippet-C6tRl74T.js";var je=K(`bell-off`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742`,key:`178tsu`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05`,key:`1hqiys`}]]),Me=K(`bell`,[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]),Ne=K(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),Pe=y({name:`CodingBridgeNotificationToggle`,components:{LoadingIcon:z,NotificationIcon:Me,NotificationOffIcon:je,ElButton:Y},data(){return{enabled:!1,busy:!1}},computed:{supported(){return _e()||Oe()}},mounted(){this.enabled=!_e()&&ke()===`granted`},methods:{async onToggle(){this.busy=!0;try{if(this.enabled){await this.$store.dispatch(`codingBridge/disableNotifications`),this.enabled=!1,S.success(this.$t(`codingBridge.notify.disabled`));return}let e=await this.$store.dispatch(`codingBridge/enableNotifications`);e===`enabled`?(this.enabled=!0,S.success(this.$t(`codingBridge.notify.enabled`))):e===`denied`?S.warning(this.$t(`codingBridge.notify.denied`)):S.warning(this.$t(`codingBridge.notify.unsupported`))}catch{S.error(this.$t(`codingBridge.notify.failed`))}finally{this.busy=!1}}}});function Fe(e,t,n,r,i,a){let s=u(`loading-icon`),c=u(`notification-icon`),l=u(`notification-off-icon`),d=u(`el-button`);return e.supported?(v(),p(d,{key:0,circle:``,size:`small`,type:e.enabled?`primary`:`default`,title:e.enabled?e.$t(`codingBridge.notify.disable`):e.$t(`codingBridge.notify.enable`),disabled:e.busy,"aria-label":e.enabled?e.$t(`codingBridge.notify.disable`):e.$t(`codingBridge.notify.enable`),onClick:e.onToggle},{default:m(()=>[e.busy?(v(),p(s,{key:0,class:`adc-icon-spin`,size:`1em`,"aria-hidden":`true`,focusable:`false`})):e.enabled?(v(),p(c,{key:1,size:`1em`,"aria-hidden":`true`,focusable:`false`})):(v(),p(l,{key:2,size:`1em`,"aria-hidden":`true`,focusable:`false`}))]),_:1},8,[`type`,`title`,`disabled`,`aria-label`,`onClick`])):o(``,!0)}var Ie=y({name:`CodingBridgeNodeList`,components:{AddIcon:H,DeleteIcon:he,DesktopIcon:ue,DeveloperIcon:L,EditIcon:V,RedoIcon:U,ElButton:Y,NotificationToggle:W(Pe,[[`render`,Fe]])},emits:[`pair`],computed:{nodes(){return this.$store.state.codingBridge?.nodes??[]},currentNodeId(){return this.$store.state.codingBridge?.currentNodeId},connection(){return this.$store.state.codingBridge?.connection??`disconnected`},connectionLabel(){return this.$t(`codingBridge.connection.${this.connection}`)},connectionDotClass(){switch(this.connection){case`connected`:return`bg-[var(--el-color-success)]`;case`connecting`:return`bg-[var(--el-color-warning)]`;case`error`:return`bg-[var(--el-color-danger)]`;default:return`bg-[var(--app-text-subtle)]`}}},methods:{onSelect(e){this.$store.dispatch(`codingBridge/selectNode`,e)},onRefresh(){this.$store.dispatch(`codingBridge/getNodes`)},async onRename(e){let t;try{t=((await xe.prompt(this.$t(`codingBridge.nodeList.renamePrompt`),this.$t(`codingBridge.nodeList.rename`),{confirmButtonText:this.$t(`common.button.confirm`),cancelButtonText:this.$t(`common.button.cancel`),inputValue:e.name,inputValidator:e=>{let t=(e??``).trim();return t?[...t].length>64?this.$t(`codingBridge.nodeList.renameTooLong`,{max:64}):!0:this.$t(`codingBridge.nodeList.renameEmpty`)}})).value??``).trim()}catch{return}if(!(!t||t===e.name))try{await this.$store.dispatch(`codingBridge/renameNode`,{nodeId:e.node_id,name:t}),S.success(this.$t(`codingBridge.nodeList.renameSuccess`))}catch{S.error(this.$t(`codingBridge.nodeList.renameFailed`))}},async onDelete(e){try{await xe.confirm(this.$t(`codingBridge.nodeList.removeConfirm`,{name:e.name}),this.$t(`codingBridge.nodeList.remove`),{confirmButtonText:this.$t(`codingBridge.nodeList.remove`),cancelButtonText:this.$t(`common.button.cancel`),type:`warning`})}catch{return}try{await this.$store.dispatch(`codingBridge/deleteNode`,e.node_id),S.success(this.$t(`codingBridge.nodeList.removeSuccess`))}catch{S.error(this.$t(`codingBridge.nodeList.removeFailed`))}}}}),Le={class:`node-list flex flex-col h-full bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]`},Re={class:`flex items-center justify-between px-4 py-3 border-b border-[var(--app-border-subtle)]`},ze={class:`flex items-center gap-2 font-medium`},Be={class:`flex items-center gap-1`},Ve={class:`flex items-center gap-2 px-4 py-2 text-xs border-b border-[var(--app-border-subtle)]`},He={class:`text-[var(--app-text-subtle)]`},Ue={class:`flex-1 overflow-y-auto`},We={key:0,class:`p-6 text-center text-sm text-[var(--app-text-subtle)]`},Ge={class:`mb-3`},Ke={key:1,class:`list-none m-0 p-0`},qe=[`onClick`],Je={class:`flex-1 min-w-0`},Ye={class:`flex items-center gap-2`},Xe={class:`truncate font-medium`},Ze=[`title`],Qe={class:`text-xs text-[var(--app-text-subtle)] truncate`};function $e(o,c,d,f,p,h){let _=u(`developer-icon`),y=u(`notification-toggle`),b=u(`redo-icon`),x=u(`el-button`),S=u(`add-icon`),C=u(`desktop-icon`),w=u(`edit-icon`),T=u(`delete-icon`);return v(),s(`div`,Le,[e(`div`,Re,[e(`div`,ze,[a(_,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,null,i(o.$t(`codingBridge.nodeList.title`)),1)]),e(`div`,Be,[a(y),a(x,{circle:``,size:`small`,"aria-label":o.$t(`codingBridge.nodeList.refresh`),title:o.$t(`codingBridge.nodeList.refresh`),onClick:o.onRefresh},{default:m(()=>[a(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`,`onClick`]),a(x,{type:`primary`,circle:``,size:`small`,"aria-label":o.$t(`codingBridge.nodeList.pair`),title:o.$t(`codingBridge.nodeList.pair`),onClick:c[0]||=e=>o.$emit(`pair`)},{default:m(()=>[a(S,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`])])]),e(`div`,Ve,[e(`span`,{class:n([`inline-block w-2 h-2 rounded-full`,o.connectionDotClass])},null,2),e(`span`,He,i(o.connectionLabel),1)]),e(`div`,Ue,[o.nodes.length?(v(),s(`ul`,Ke,[(v(!0),s(l,null,g(o.nodes,r=>(v(),s(`li`,{key:r.node_id,class:n([`group flex items-center gap-3 px-4 py-3 cursor-pointer border-b border-[var(--app-border-subtle)] hover:bg-[var(--app-content-bg)]`,{"bg-[var(--app-content-bg)]":r.node_id===o.currentNodeId}]),onClick:e=>o.onSelect(r.node_id)},[a(C,{class:`text-[var(--app-text-subtle)]`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`div`,Je,[e(`div`,Ye,[e(`span`,Xe,i(r.name),1),e(`span`,{class:n([`inline-block w-2 h-2 rounded-full flex-none`,r.status===`online`?`bg-[var(--el-color-success)]`:`bg-[var(--app-text-subtle)]`]),title:r.status===`online`?o.$t(`codingBridge.status.online`):o.$t(`codingBridge.status.offline`)},null,10,Ze)]),e(`div`,Qe,i(r.status===`online`?o.$t(`codingBridge.status.online`):o.$t(`codingBridge.status.offline`)),1)]),a(x,{class:`node-action`,text:``,circle:``,size:`small`,"aria-label":o.$t(`codingBridge.nodeList.rename`),title:o.$t(`codingBridge.nodeList.rename`),onClick:t(e=>o.onRename(r),[`stop`])},{default:m(()=>[a(w,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`,`onClick`]),a(x,{class:`node-action`,text:``,circle:``,size:`small`,"aria-label":o.$t(`codingBridge.nodeList.remove`),title:o.$t(`codingBridge.nodeList.remove`),onClick:t(e=>o.onDelete(r),[`stop`])},{default:m(()=>[a(T,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`,`onClick`])],10,qe))),128))])):(v(),s(`div`,We,[e(`p`,Ge,i(o.$t(`codingBridge.nodeList.empty`)),1),a(x,{type:`primary`,round:``,size:`small`,onClick:c[1]||=e=>o.$emit(`pair`)},{default:m(()=>[a(S,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(o.$t(`codingBridge.nodeList.pairFirst`)),1)]),_:1})]))])])}var et=W(Ie,[[`render`,$e],[`__scopeId`,`data-v-37e3f542`]]),tt=e=>{let t=e?.questions;return Array.isArray(t)&&t.length>0&&t.every(e=>e&&typeof e.question==`string`&&Array.isArray(e.options))},nt=e=>e?(e.tool||``).toLowerCase()===`askuserquestion`?!0:tt(e.input):!1,rt=e=>({questions:e.input?.questions??[]}),it=100,X=4e4,at=12e3,ot=6e3,st=50,ct=200,Z=(e,t)=>{if(e.length<=t)return e;let n=((e.length-t)/1024).toFixed(1);return`${e.slice(0,t)}\n\n··· +${n} KB ···`},lt=y({name:`CodingBridgeTranscriptItem`,directives:{highlight:be},components:{CloseIcon:G,ConfirmIcon:A,EditIcon:V,FileIcon:N,InfoIcon:I,VueMarkdown:Te,CodeSnippet:Ae,CopyToClipboard:Ee},props:{event:{type:Object,required:!0},editable:{type:Boolean,default:!1}},emits:[`edit`],data(){return{renderedText:Z(this.event.text||``,X),streamTimer:0}},computed:{commandText(){let e=this.event.input;if(!e)return``;for(let t of[`command`,`cmd`,`script`]){let n=e[t];if(typeof n==`string`&&n.trim())return Z(n,ot)}return``},filePath(){let e=this.event.input;if(!e)return``;for(let t of[`file_path`,`filePath`,`path`,`notebook_path`,`filename`]){let n=e[t];if(typeof n==`string`&&n.trim())return n}return``},toolDescription(){let e=this.event.input?.description;return typeof e==`string`?e:``},toolIcon(){if(this.todoList.length)return ae;if(this.commandText)return me;let e=(this.event.tool??``).toLowerCase();return/read|cat|view/.test(e)?se:/write|edit|create|update|insert/.test(e)?V:/grep|glob|search|find|list/.test(e)?de:j},questionLines(){let e=(this.event.tool??``).toLowerCase(),t=this.event.input?.questions;return!(e===`askuserquestion`||Array.isArray(t))||!Array.isArray(t)?[]:t.filter(e=>e&&typeof e.question==`string`).map(e=>({header:typeof e.header==`string`?e.header:``,question:e.question}))},todoList(){let e=this.event.input?.todos;return!Array.isArray(e)||!(this.event.tool??``).toLowerCase().includes(`todo`)&&Object.keys(this.event.input??{}).filter(e=>e!==`todos`&&e!==`description`).length?[]:e.filter(e=>e&&typeof e.content==`string`).map(e=>({content:e.content,status:typeof e.status==`string`?e.status:`pending`,activeForm:typeof e.activeForm==`string`?e.activeForm:void 0}))},todoItems(){return this.todoList.slice(0,st).map(e=>{let t=e.status===`in_progress`&&e.activeForm?e.activeForm:e.content,n=t.length>ct?`${t.slice(0,ct)}…`:t;return e.status===`completed`?{text:n,status:`completed`,statusLabel:this.$t(`codingBridge.transcript.todoCompleted`),icon:A,iconClass:`text-[var(--el-color-success)]`,textClass:`text-[var(--app-text-subtle)] line-through`}:e.status===`in_progress`?{text:n,status:`in_progress`,statusLabel:this.$t(`codingBridge.transcript.todoInProgress`),icon:z,iconClass:`text-[var(--el-color-primary)]`,textClass:`text-[var(--app-text)] font-medium`}:{text:n,status:`pending`,statusLabel:this.$t(`codingBridge.transcript.todoPending`),icon:pe,iconClass:`text-[var(--app-text-subtle)] opacity-60`,textClass:`text-[var(--app-text-subtle)]`}})},todoProgressLabel(){let e=this.todoList.filter(e=>e.status===`completed`).length;return this.$t(`codingBridge.transcript.todoProgress`,{done:e,total:this.todoList.length})},todoProgressId(){return`cb-todo-progress-${this.event.id}`},todoOverflow(){return Math.max(0,this.todoList.length-st)},inputText(){let e=this.event.input;if(!e)return``;let t={};for(let[n,r]of Object.entries(e))n===`timeout`||n===`description`||(t[n]=r);if(Object.keys(t).length===0)return``;try{return Z(JSON.stringify(t,null,2),ot)}catch{return Z(String(e),ot)}},thinkingText(){return Z(this.event.text||``,X)},resultText(){let e=this.event.content;return typeof e==`string`&&e.length>0?e:`—`},resultDisplay(){return Z(this.resultText,at)},resultLabel(){let e=[];return this.event.is_error?e.push(this.$t(`codingBridge.transcript.turnFailed`)):e.push(this.$t(`codingBridge.transcript.turnDone`)),typeof this.event.cost_usd==`number`&&this.event.cost_usd>0&&e.push(`$${this.event.cost_usd.toFixed(4)}`),e.join(` · `)},hasAttachments(){return!!this.event.attachments?.length},noticeText(){let e=this.event.subtype,t=this.event.command;if(t){if(e===`slash_unavailable`)return this.$t(`codingBridge.notice.slashUnavailable`,{command:t});if(e===`slash_codex_unsupported`)return this.$t(`codingBridge.notice.slashCodexUnsupported`,{command:t})}return this.event.text||``}},watch:{"event.text"(){this.scheduleRender()},"event.streaming"(e){e||this.flushRender()}},beforeUnmount(){this.streamTimer&&window.clearTimeout(this.streamTimer)},methods:{scheduleRender(){if(!this.event.streaming){this.flushRender();return}this.streamTimer||=window.setTimeout(()=>{this.streamTimer=0,this.renderedText=Z(this.event.text||``,X)},it)},flushRender(){this.streamTimer&&=(window.clearTimeout(this.streamTimer),0),this.renderedText=Z(this.event.text||``,X)}}}),ut={key:0,class:`group flex items-end justify-end gap-1.5`},dt=[`title`,`aria-label`],ft={class:`max-w-[85%] rounded-lg px-3 py-2 bg-[var(--el-color-primary)] text-white whitespace-pre-wrap break-words`},pt=[`src`],mt=[`href`],ht=[`src`],gt={key:1,class:`flex h-9 w-9 items-center justify-center rounded bg-white/15`},_t={class:`min-w-0 truncate`},vt={key:2},yt={key:2,class:`whitespace-pre-wrap break-words italic text-[var(--app-text-subtle)] border-l-2 border-[var(--app-border-subtle)] pl-3`},bt={key:3,class:`overflow-hidden rounded-md bg-[var(--app-sidebar-bg)] border border-[var(--app-border-subtle)]`},xt={class:`flex items-center gap-2 px-2.5 py-1.5 font-medium text-[var(--app-text-subtle)]`},St={key:0,class:`min-w-0 truncate text-xs font-normal opacity-70`},Ct={key:0,class:`flex flex-col gap-1.5 px-2.5 pb-2`},wt={key:0,class:`font-medium text-[var(--app-text)]`},Tt={class:`whitespace-pre-wrap break-words text-[var(--app-text-subtle)]`},Et={key:1,class:`px-2.5 pb-2`},Dt=[`id`],Ot=[`aria-labelledby`],kt={class:`sr-only`},At={key:0,class:`mt-1 text-xs text-[var(--app-text-subtle)]`},jt={key:2,class:`px-2.5 pb-2`},Mt={key:3,class:`px-2.5 pb-2 font-mono text-xs break-all text-[var(--app-text-subtle)]`},Nt={key:4,class:`px-2.5 pb-2`},Pt={key:0,class:`absolute right-1.5 top-1.5 z-10 rounded bg-[var(--app-content-bg)] px-1 opacity-0 transition-opacity group-hover:opacity-100 focus-within:opacity-100`},Ft={key:5,class:`flex items-center gap-2 text-xs text-[var(--app-text-subtle)]`},It={key:6,class:`flex items-start gap-2 rounded-md bg-[var(--app-sidebar-bg)] border border-[var(--app-border-subtle)] text-[var(--app-text-subtle)] px-3 py-2 text-xs`},Lt={class:`whitespace-pre-wrap break-words`},Rt={key:7,class:`rounded-md bg-[var(--el-color-danger-light-9)] text-[var(--el-color-danger)] px-3 py-2 whitespace-pre-wrap break-words`};function zt(t,r,c,f,m,y){let b=u(`edit-icon`),x=u(`file-icon`),S=u(`vue-markdown`),C=u(`code-snippet`),w=u(`copy-to-clipboard`),T=u(`close-icon`),E=u(`confirm-icon`),D=u(`info-icon`),O=h(`highlight`);return v(),s(`div`,{class:n([`transcript-item text-sm leading-relaxed`,`kind-${t.event.kind}`])},[t.event.kind===`prompt`?(v(),s(`div`,ut,[t.editable?(v(),s(`button`,{key:0,type:`button`,class:`cb-edit-btn opacity-0 transition-opacity group-hover:opacity-100 focus-visible:opacity-100`,title:t.$t(`codingBridge.session.editPrompt`),"aria-label":t.$t(`codingBridge.session.editPrompt`),onClick:r[0]||=e=>t.$emit(`edit`,t.event)},[a(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,dt)):o(``,!0),e(`div`,ft,[t.event.images&&t.event.images.length?(v(),s(`div`,{key:0,class:n([`flex flex-wrap gap-1.5`,{"mb-1.5":t.event.text||t.hasAttachments}])},[(v(!0),s(l,null,g(t.event.images,(e,t)=>(v(),s(`img`,{key:t,src:e,class:`w-16 h-16 rounded object-cover`,alt:``},null,8,pt))),128))],2)):o(``,!0),t.hasAttachments?(v(),s(`div`,{key:1,class:n([`flex flex-wrap gap-1.5`,{"mb-1.5":t.event.text}])},[(v(!0),s(l,null,g(t.event.attachments,(t,n)=>(v(),s(`a`,{key:`${t.url}-${n}`,href:t.url,target:`_blank`,rel:`noopener noreferrer`,class:`flex max-w-[220px] items-center gap-2 rounded-md bg-white/15 px-2 py-1.5 text-xs text-white hover:bg-white/20`},[t.type===`image`?(v(),s(`img`,{key:0,src:t.url,class:`h-9 w-9 rounded object-cover`,alt:``},null,8,ht)):(v(),s(`span`,gt,[a(x,{size:`1em`,"aria-hidden":`true`,focusable:`false`})])),e(`span`,_t,i(t.name||t.url),1)],8,mt))),128))],2)):o(``,!0),t.event.text?(v(),s(`span`,vt,i(t.event.text),1)):o(``,!0)])])):t.event.kind===`text`?(v(),s(`div`,{key:1,class:n([`cb-stream-text`,{"is-streaming":t.event.streaming}])},[d(a(S,{source:t.renderedText,class:`markdown-body bg-transparent text-[var(--app-text)]`},null,8,[`source`]),[[O]])],2)):t.event.kind===`thinking`?(v(),s(`div`,yt,i(t.thinkingText),1)):t.event.kind===`tool_use`?(v(),s(`div`,bt,[e(`div`,xt,[(v(),p(_(t.toolIcon),{class:`text-[var(--el-color-primary)]`,size:`1em`,"aria-hidden":`true`,focusable:`false`})),e(`span`,null,i(t.event.tool),1),t.toolDescription?(v(),s(`span`,St,i(t.toolDescription),1)):o(``,!0)]),t.questionLines.length?(v(),s(`div`,Ct,[(v(!0),s(l,null,g(t.questionLines,(t,n)=>(v(),s(`div`,{key:n,class:`rounded border border-[var(--app-border-subtle)] bg-[var(--app-content-bg)] px-2.5 py-1.5 text-xs`},[t.header?(v(),s(`div`,wt,i(t.header),1)):o(``,!0),e(`div`,Tt,i(t.question),1)]))),128))])):t.todoItems.length?(v(),s(`div`,Et,[e(`div`,{id:t.todoProgressId,class:`mb-1.5 text-xs text-[var(--app-text-subtle)]`},i(t.todoProgressLabel),9,Dt),e(`ul`,{class:`flex flex-col gap-1`,"aria-labelledby":t.todoProgressId},[(v(!0),s(l,null,g(t.todoItems,(t,r)=>(v(),s(`li`,{key:r,class:`flex items-start gap-2 text-xs`},[(v(),p(_(t.icon),{class:n([`mt-0.5 flex-none`,t.iconClass]),size:`1em`,"aria-hidden":`true`,focusable:`false`},null,8,[`class`])),e(`span`,kt,i(t.statusLabel),1),e(`span`,{class:n([`min-w-0 break-words`,t.textClass])},i(t.text),3)]))),128))],8,Ot),t.todoOverflow?(v(),s(`div`,At,i(t.$t(`codingBridge.transcript.todoOverflow`,{count:t.todoOverflow})),1)):o(``,!0)])):t.commandText?(v(),s(`div`,jt,[a(C,{code:t.commandText,lang:`bash`,copyable:``},null,8,[`code`])])):t.filePath?(v(),s(`div`,Mt,i(t.filePath),1)):t.inputText?(v(),s(`div`,Nt,[a(C,{code:t.inputText,lang:`json`,copyable:``},null,8,[`code`])])):o(``,!0)])):t.event.kind===`tool_result`?(v(),s(`div`,{key:4,class:n([`group relative overflow-hidden rounded-md`,t.event.is_error?`bg-[var(--el-color-danger-light-9)]`:`bg-[var(--app-sidebar-bg)]`])},[t.event.content?(v(),s(`div`,Pt,[a(w,{content:t.resultText},null,8,[`content`])])):o(``,!0),e(`pre`,{class:n([`m-0 max-h-72 overflow-auto whitespace-pre-wrap break-words px-2.5 py-2 font-mono text-xs`,t.event.is_error?`text-[var(--el-color-danger)]`:`text-[var(--app-text-subtle)]`])},i(t.resultDisplay),3)],2)):t.event.kind===`result`?(v(),s(`div`,Ft,[t.event.is_error?(v(),p(T,{key:0,size:`1em`,"aria-hidden":`true`,focusable:`false`})):(v(),p(E,{key:1,size:`1em`,"aria-hidden":`true`,focusable:`false`})),e(`span`,null,i(t.resultLabel),1)])):t.event.kind===`notice`?(v(),s(`div`,It,[a(D,{class:`mt-0.5 flex-none text-[var(--el-color-primary)]`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,Lt,i(t.noticeText),1)])):t.event.kind===`error`?(v(),s(`div`,Rt,i(t.event.text),1)):o(``,!0)],2)}var Bt=W(lt,[[`render`,zt],[`__scopeId`,`data-v-f71fa078`]]),Vt=`Pondering.Noodling.Conjuring.Brewing.Cooking.Crafting.Churning.Simmering.Percolating.Ruminating.Musing.Marinating.Synthesizing.Computing.Hatching.Forging.Vibing.Working.Thinking.Cogitating.Mulling.Stewing.Tinkering.Wrangling.Spinning.Reticulating.Manifesting.Deliberating`.split(`.`),Ht=[`思考中`,`酝酿中`,`沉思中`,`推敲中`,`构思中`,`计算中`,`琢磨中`,`捣鼓中`,`炼制中`,`召唤中`,`编织中`,`烹饪中`,`咀嚼中`,`盘算中`,`发酵中`,`运转中`,`冥想中`,`鼓捣中`,`熬制中`,`神游中`,`演算中`,`雕琢中`,`头脑风暴中`,`反复斟酌中`],Ut=60,Wt=1500,Gt=28,Kt=y({name:`CodingBridgeThinkingIndicator`,components:{LoadingIcon:z},data(){return{display:``,elapsed:0,charIndex:0,phase:`typing`,currentWord:``,elapsedTimer:0,typeTimer:0}},computed:{words(){return this.$i18n.locale.startsWith(`zh`)?Ht:Vt}},mounted(){this.currentWord=this.pickWord(),this.elapsedTimer=window.setInterval(()=>{this.elapsed+=1},1e3),this.scheduleType(Ut)},beforeUnmount(){window.clearInterval(this.elapsedTimer),window.clearTimeout(this.typeTimer)},methods:{pickWord(){let e=this.words;if(e.length<=1)return e[0]??``;let t=this.currentWord;for(;t===this.currentWord;)t=e[Math.floor(Math.random()*e.length)];return t},scheduleType(e){this.typeTimer=window.setTimeout(this.advance,e)},advance(){let e=this.currentWord;this.phase===`typing`?(this.charIndex+=1,this.display=e.slice(0,this.charIndex),this.charIndex>=e.length?(this.phase=`holding`,this.scheduleType(Wt)):this.scheduleType(Ut)):this.phase===`holding`?(this.phase=`deleting`,this.scheduleType(Gt)):(--this.charIndex,this.display=e.slice(0,Math.max(0,this.charIndex)),this.charIndex<=0?(this.currentWord=this.pickWord(),this.phase=`typing`,this.scheduleType(Ut)):this.scheduleType(Gt))}}}),qt={class:`cb-thinking flex items-center gap-2 text-sm text-[var(--app-text-subtle)] py-1`},Jt={class:`cb-thinking__word`},Yt={class:`cb-thinking__elapsed tabular-nums opacity-60`};function Xt(t,n,o,c,l,d){let f=u(`loading-icon`);return v(),s(`div`,qt,[a(f,{class:`cb-thinking__spinner adc-icon-spin text-[var(--el-color-primary)]`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,Jt,[r(i(t.display),1),n[0]||=e(`span`,{class:`cb-thinking__caret`},`▋`,-1)]),e(`span`,Yt,`(`+i(t.elapsed)+`s)`,1)])}var Zt=W(Kt,[[`render`,Xt],[`__scopeId`,`data-v-ae116215`]]),Qt=y({name:`CodingBridgeComposerSettings`,components:{ElButton:Y,ElDialog:q},props:{dialog:{type:Boolean,default:!1},open:{type:Boolean,default:!1}},emits:[`update:open`]}),$t={key:0,class:`cb-settings-inline`},en={class:`cb-settings-rows`};function tn(t,n,o,c,l,d){let h=u(`el-button`),g=u(`el-dialog`);return t.dialog?(v(),p(g,{key:1,"model-value":t.open,title:t.$t(`codingBridge.session.settings`),width:`min(420px, 92vw)`,"align-center":``,"append-to-body":``,class:`cb-settings-dialog`,"onUpdate:modelValue":n[1]||=e=>t.$emit(`update:open`,e)},{footer:m(()=>[a(h,{type:`primary`,round:``,onClick:n[0]||=e=>t.$emit(`update:open`,!1)},{default:m(()=>[r(i(t.$t(`common.button.close`)),1)]),_:1})]),default:m(()=>[e(`div`,en,[f(t.$slots,`default`,{},void 0,!0)])]),_:3},8,[`model-value`,`title`])):(v(),s(`div`,$t,[f(t.$slots,`default`,{},void 0,!0)]))}var nn=W(Qt,[[`render`,tn],[`__scopeId`,`data-v-20aa7356`]]),rn=y({name:`CodingBridgeDirectoryDialog`,components:{ContinueIcon:ne,FileIcon:N,FolderIcon:ce,RedoIcon:U,UpIcon:k,ElDialog:q,ElButton:Y,ElInput:J},props:{visible:{type:Boolean,default:!1},initialPath:{type:String,default:``}},emits:[`update:visible`,`select`],data(){return{pathInput:``}},computed:{listing(){return this.$store.state.codingBridge?.directory},loading(){return this.$store.state.codingBridge?.directoryLoading===!0},directories(){return(this.listing?.entries??[]).filter(e=>e.type===`dir`)},files(){return(this.listing?.entries??[]).filter(e=>e.type===`file`)},isEmpty(){return!!this.listing&&!this.listing.error&&(this.listing.entries??[]).length===0}},watch:{"listing.path"(e){this.pathInput=e??``}},methods:{onOpen(){this.pathInput=this.initialPath||``,this.$store.dispatch(`codingBridge/browseDir`,this.initialPath||void 0)},goPath(){let e=this.pathInput.trim();e&&this.$store.dispatch(`codingBridge/browseDir`,e)},syncPathInput(){this.pathInput=this.listing?.path??``},onVisibleChange(e){this.$emit(`update:visible`,e),e||this.$store.dispatch(`codingBridge/clearDirectory`)},openDir(e){this.$store.dispatch(`codingBridge/browseDir`,e)},goParent(){this.listing?.parent&&this.$store.dispatch(`codingBridge/browseDir`,this.listing.parent)},refresh(){this.$store.dispatch(`codingBridge/browseDir`,this.listing?.path||this.initialPath||void 0)},chooseCurrent(){this.listing&&!this.listing.error&&(this.$emit(`select`,this.listing.path),this.onVisibleChange(!1))}}}),an={class:`flex flex-col gap-2`},on={class:`flex items-center gap-2 min-w-0`},sn={class:`h-72 overflow-y-auto border border-[var(--app-border-subtle)] rounded-md divide-y divide-[var(--app-border-subtle)]`},cn={key:0,class:`h-full flex items-center justify-center text-sm text-[var(--app-text-subtle)]`},ln={key:1,class:`h-full flex items-center justify-center text-sm text-[var(--el-color-danger)]`},un=[`onClick`],dn={class:`truncate`,dir:`ltr`},fn={class:`truncate`,dir:`ltr`},pn={key:0,class:`h-full flex items-center justify-center text-sm text-[var(--app-text-subtle)] py-8`},mn={key:0,class:`text-[11px] text-[var(--app-text-subtle)] px-1`},hn={class:`flex items-center justify-end gap-2`};function gn(t,d,f,h,_,y){let b=u(`up-icon`),x=u(`el-button`),S=u(`continue-icon`),C=u(`el-input`),w=u(`redo-icon`),T=u(`folder-icon`),E=u(`file-icon`),D=u(`el-dialog`);return v(),p(D,{"model-value":t.visible,title:t.$t(`codingBridge.directory.title`),width:`520px`,"append-to-body":``,"onUpdate:modelValue":t.onVisibleChange,onOpen:t.onOpen},{footer:m(()=>[e(`div`,hn,[a(x,{round:``,onClick:d[1]||=e=>t.onVisibleChange(!1)},{default:m(()=>[r(i(t.$t(`common.button.cancel`)),1)]),_:1}),a(x,{type:`primary`,round:``,disabled:!t.listing||!!t.listing.error,onClick:t.chooseCurrent},{default:m(()=>[r(i(t.$t(`codingBridge.directory.choose`)),1)]),_:1},8,[`disabled`,`onClick`])])]),default:m(()=>[e(`div`,an,[e(`div`,on,[a(x,{size:`small`,circle:``,disabled:!t.listing||!t.listing.parent||t.loading,title:t.$t(`codingBridge.directory.up`),"aria-label":t.$t(`codingBridge.directory.up`),onClick:t.goParent},{default:m(()=>[a(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`disabled`,`title`,`aria-label`,`onClick`]),a(C,{modelValue:t.pathInput,"onUpdate:modelValue":d[0]||=e=>t.pathInput=e,size:`small`,class:`flex-1 min-w-0`,dir:`ltr`,placeholder:t.$t(`codingBridge.directory.pathPlaceholder`),disabled:t.loading,onKeyup:c(t.goPath,[`enter`]),onBlur:t.syncPathInput},{append:m(()=>[a(x,{title:t.$t(`codingBridge.directory.go`),disabled:t.loading||!t.pathInput.trim(),"aria-label":t.$t(`codingBridge.directory.go`),onClick:t.goPath},{default:m(()=>[a(S,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`title`,`disabled`,`aria-label`,`onClick`])]),_:1},8,[`modelValue`,`placeholder`,`disabled`,`onKeyup`,`onBlur`]),a(x,{size:`small`,circle:``,disabled:t.loading,title:t.$t(`codingBridge.directory.refresh`),"aria-label":t.$t(`codingBridge.directory.refresh`),onClick:t.refresh},{default:m(()=>[a(w,{class:n({"adc-icon-spin":t.loading}),size:`1em`,"aria-hidden":`true`,focusable:`false`},null,8,[`class`])]),_:1},8,[`disabled`,`title`,`aria-label`,`onClick`])]),e(`div`,sn,[t.loading&&!t.listing?(v(),s(`div`,cn,i(t.$t(`codingBridge.directory.loading`)),1)):t.listing&&t.listing.error?(v(),s(`div`,ln,i(t.listing.error),1)):(v(),s(l,{key:2},[(v(!0),s(l,null,g(t.directories,n=>(v(),s(`button`,{key:n.path,type:`button`,class:`w-full flex items-center gap-2 px-3 py-2 text-left text-sm hover:bg-[var(--app-content-hover-bg)]`,onClick:e=>t.openDir(n.path)},[a(T,{class:`text-[var(--el-color-warning)]`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,dn,i(n.name),1)],8,un))),128)),(v(!0),s(l,null,g(t.files,t=>(v(),s(`div`,{key:t.path,class:`w-full flex items-center gap-2 px-3 py-2 text-sm text-[var(--app-text-subtle)]`},[a(E,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,fn,i(t.name),1)]))),128)),t.isEmpty?(v(),s(`div`,pn,i(t.$t(`codingBridge.directory.empty`)),1)):o(``,!0)],64))]),t.listing&&t.listing.truncated?(v(),s(`p`,mn,i(t.$t(`codingBridge.directory.truncated`)),1)):o(``,!0)])]),_:1},8,[`model-value`,`title`,`onUpdate:modelValue`,`onOpen`])}var _n=W(rn,[[`render`,gn]]),vn=`data:image/svg+xml,%3csvg%20fill='%23D97757'%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eClaude%3c/title%3e%3cpath%20d='m4.7144%2015.9555%204.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608%201.5179.1032%202.2767.1578%201.6514.0972%202.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973%209.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686%201.9064%201.4754%202.4893%201.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335%206.6997%200l.9957.1336.419.3642.6192%201.4147%201.0018%202.2282%201.5543%203.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853%201.8517-.5586%202.9021-.3643%201.9429h.2125l.2429-.2429.9835-1.3053%201.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759%201.1293-.34%201.1657-1.0625%201.3478-.8804%201.1414-1.2628%201.7-.7893%201.36.0729.1093.1882-.0183%202.8535-.607%201.5421-.2794%201.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607%201.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929%201.0686%202.0035%201.8092%202.5075%202.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496%202.3436%203.5214.1214%201.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38%2017.959l-1.1414-1.9428-.1397.079-.674%207.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328%201.9672-2.1796%202.9446-1.7243%201.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889%202.386-3.0357%201.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385%204.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429%201.9064-1.3114Z'/%3e%3c/svg%3e`,yn=`data:image/svg+xml,%3csvg%20fill='%23000000'%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eOpenAI%3c/title%3e%3cpath%20d='M22.282%209.821a5.985%205.985%200%200%200-.516-4.91%206.046%206.046%200%200%200-6.51-2.9A6.065%206.065%200%200%200%204.981%204.18a5.985%205.985%200%200%200-3.998%202.9%206.046%206.046%200%200%200%20.743%207.097%205.98%205.98%200%200%200%20.51%204.911%206.051%206.051%200%200%200%206.515%202.9A5.985%205.985%200%200%200%2013.26%2024a6.056%206.056%200%200%200%205.772-4.206%205.99%205.99%200%200%200%203.997-2.9%206.056%206.056%200%200%200-.747-7.073zM13.26%2022.43a4.476%204.476%200%200%201-2.876-1.04l.141-.081%204.779-2.758a.795.795%200%200%200%20.392-.681v-6.737l2.02%201.168a.071.071%200%200%201%20.038.052v5.583a4.504%204.504%200%200%201-4.494%204.494zM3.6%2018.304a4.47%204.47%200%200%201-.535-3.014l.142.085%204.783%202.759a.771.771%200%200%200%20.78%200l5.843-3.369v2.332a.08.08%200%200%201-.033.062L9.74%2019.95a4.5%204.5%200%200%201-6.14-1.646zM2.34%207.896a4.485%204.485%200%200%201%202.366-1.973V11.6a.766.766%200%200%200%20.388.676l5.815%203.355-2.02%201.168a.076.076%200%200%201-.071%200l-4.83-2.786A4.504%204.504%200%200%201%202.34%207.872zm16.597%203.855l-5.833-3.387L15.119%207.2a.076.076%200%200%201%20.071%200l4.83%202.791a4.494%204.494%200%200%201-.676%208.105v-5.678a.79.79%200%200%200-.407-.667zm2.01-3.023l-.141-.085-4.774-2.782a.776.776%200%200%200-.785%200L9.409%209.23V6.897a.066.066%200%200%201%20.028-.061l4.83-2.787a4.5%204.5%200%200%201%206.68%204.66zm-12.64%204.135l-2.02-1.164a.08.08%200%200%201-.038-.057V6.075a4.5%204.5%200%200%201%207.375-3.453l-.142.08L8.704%205.46a.795.795%200%200%200-.393.681zm1.097-2.365l2.602-1.5%202.607%201.5v2.999l-2.597%201.5-2.607-1.5z'/%3e%3c/svg%3e`,bn=`data:image/svg+xml,%3csvg%20fill='%23000'%20role='img'%20viewBox='0%200%2024%2024'%20xmlns='http://www.w3.org/2000/svg'%3e%3ctitle%3eGitHub%20Copilot%3c/title%3e%3cpath%20d='M23.922%2016.997C23.061%2018.492%2018.063%2022.02%2012%2022.02%205.937%2022.02.939%2018.492.078%2016.997A.641.641%200%200%201%200%2016.741v-2.869a.883.883%200%200%201%20.053-.22c.372-.935%201.347-2.292%202.605-2.656.167-.429.414-1.055.644-1.517a10.098%2010.098%200%200%201-.052-1.086c0-1.331.282-2.499%201.132-3.368.397-.406.89-.717%201.474-.952C7.255%202.937%209.248%201.98%2011.978%201.98c2.731%200%204.767.957%206.166%202.093.584.235%201.077.546%201.474.952.85.869%201.132%202.037%201.132%203.368%200%20.368-.014.733-.052%201.086.23.462.477%201.088.644%201.517%201.258.364%202.233%201.721%202.605%202.656a.841.841%200%200%201%20.053.22v2.869a.641.641%200%200%201-.078.256Zm-11.75-5.992h-.344a4.359%204.359%200%200%201-.355.508c-.77.947-1.918%201.492-3.508%201.492-1.725%200-2.989-.359-3.782-1.259a2.137%202.137%200%200%201-.085-.104L4%2011.746v6.585c1.435.779%204.514%202.179%208%202.179%203.486%200%206.565-1.4%208-2.179v-6.585l-.098-.104s-.033.045-.085.104c-.793.9-2.057%201.259-3.782%201.259-1.59%200-2.738-.545-3.508-1.492a4.359%204.359%200%200%201-.355-.508Zm2.328%203.25c.549%200%201%20.451%201%201v2c0%20.549-.451%201-1%201-.549%200-1-.451-1-1v-2c0-.549.451-1%201-1Zm-5%200c.549%200%201%20.451%201%201v2c0%20.549-.451%201-1%201-.549%200-1-.451-1-1v-2c0-.549.451-1%201-1Zm3.313-6.185c.136%201.057.403%201.913.878%202.497.442.544%201.134.938%202.344.938%201.573%200%202.292-.337%202.657-.751.384-.435.558-1.15.558-2.361%200-1.14-.243-1.847-.705-2.319-.477-.488-1.319-.862-2.824-1.025-1.487-.161-2.192.138-2.533.529-.269.307-.437.808-.438%201.578v.021c0%20.265.021.562.063.893Zm-1.626%200c.042-.331.063-.628.063-.894v-.02c-.001-.77-.169-1.271-.438-1.578-.341-.391-1.046-.69-2.533-.529-1.505.163-2.347.537-2.824%201.025-.462.472-.705%201.179-.705%202.319%200%201.211.175%201.926.558%202.361.365.414%201.084.751%202.657.751%201.21%200%201.902-.394%202.344-.938.475-.584.742-1.44.878-2.497Z'/%3e%3c/svg%3e`;function xn(e){let t=(e instanceof Error?`${e.name} ${e.message}`:String(e??``)).toLowerCase().replaceAll(`_`,`-`);return t.includes(`notallowed`)||t.includes(`not-allowed`)||t.includes(`permission`)?`permission-denied`:t.includes(`notfound`)||t.includes(`not-found`)||t.includes(`audio-capture`)||t.includes(`microphone`)?`microphone-unavailable`:t.includes(`network`)||t.includes(`fetch`)?`network`:t.includes(`abort`)||t.includes(`cancel`)?`aborted`:`unknown`}function Sn(){return[`audio/webm;codecs=opus`,`audio/webm`,`audio/mp4`,`audio/ogg`].find(e=>MediaRecorder.isTypeSupported?.(e))}function Cn(e){return e.includes(`mp4`)?`m4a`:e.includes(`ogg`)?`ogg`:e.includes(`wav`)?`wav`:`webm`}async function wn(e,t,n,r){let i=new FormData;i.append(`file`,new File([e],t,{type:e.type||`audio/webm`})),i.append(`model`,`gpt-transcribe`),i.append(`response_format`,`json`),n&&i.append(`language`,n);let a=await fetch(`${ge}/v1/audio/transcriptions`,{method:`POST`,headers:{Authorization:`Bearer ${Ce(r)}`},body:i});if(!a.ok)throw Error(`transcription request failed (${a.status})`);return(await a.json()).text?.trim()??``}var Tn=class{mediaDevices;createRecorder;transcribe;stream;recorder;callbacks;chunks=[];language=``;token=``;generation=0;aborted=!1;constructor(e=typeof navigator>`u`?void 0:navigator.mediaDevices,t=(e,t)=>new MediaRecorder(e,t),n=wn){this.mediaDevices=e,this.createRecorder=t,this.transcribe=n}async isSupported(){return!!this.mediaDevices?.getUserMedia&&typeof MediaRecorder<`u`}async start(e,t,n){await this.abort();let r=++this.generation;this.callbacks=n,this.language=e,this.token=t,this.chunks=[],this.aborted=!1;try{let e=await this.mediaDevices?.getUserMedia({audio:{channelCount:1,echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}});if(!e||r!==this.generation){e?.getTracks().forEach(e=>e.stop());return}this.stream=e;let t=Sn();this.recorder=this.createRecorder(e,t?{mimeType:t}:void 0),this.recorder.ondataavailable=e=>{r===this.generation&&e.data.size>0&&this.chunks.push(e.data)},this.recorder.start()}catch(e){let t=xn(e);throw t!==`aborted`&&n.onError(t),await this.abort(),e}}async stop(){let e=this.recorder,t=this.generation;!e||e.state===`inactive`||!this.callbacks||await new Promise(n=>{e.onstop=async()=>{if(this.releaseStream(),t!==this.generation||this.aborted||!this.callbacks)return n();let r=this.callbacks,i=e.mimeType||this.chunks[0]?.type||`audio/webm`,a=new Blob(this.chunks,{type:i});try{if(!a.size)r.onError(`no-speech`);else{let e=await this.transcribe(a,`coding-bridge-voice.${Cn(i)}`,this.language,this.token);if(t!==this.generation||this.aborted)return n();e?r.onResult({finalText:e,interimText:``}):r.onError(`no-speech`)}}catch(e){t===this.generation&&!this.aborted&&r.onError(xn(e))}finally{t===this.generation&&(this.aborted||r.onEnd(),this.reset()),n()}},e.stop()})}async abort(){this.aborted=!0,this.generation+=1;let e=this.recorder;e&&e.state!==`inactive`&&(e.ondataavailable=null,e.onstop=null,e.stop()),this.releaseStream(),this.reset()}async dispose(){await this.abort()}releaseStream(){this.stream?.getTracks().forEach(e=>e.stop()),this.stream=void 0}reset(){this.recorder=void 0,this.callbacks=void 0,this.chunks=[],this.language=``,this.token=``}};function En(){return new Tn}var Dn=50*1024*1024,Q=10,On=60,kn=60,An=80,jn={claude:{src:vn,invertOnDark:!1},codex:{src:yn,invertOnDark:!0},copilot:{src:bn,invertOnDark:!0}},Mn=y({name:`CodingBridgeSessionView`,components:{AddIcon:H,AiIcon:re,AttachmentIcon:B,CloseIcon:G,CodeIcon:j,ConfirmIcon:A,DeveloperIcon:L,EditIcon:V,ExpandDownIcon:ie,FileIcon:N,FolderOpenIcon:Ne,HistoryIcon:F,MicrophoneIcon:le,MoreIcon:M,PerformanceIcon:P,RedoIcon:U,SecurityIcon:fe,StopIcon:pe,UpIcon:k,ViewIcon:oe,ElInput:J,ElButton:Y,ElPopover:O,ElDropdown:D,ElDropdownMenu:E,ElDropdownItem:T,ElUpload:b,ElCheckbox:C,ElSkeleton:te,ElSkeletonItem:ee,TranscriptItem:Bt,ThinkingIndicator:Zt,ComposerSettings:nn,DirectoryDialog:_n,AskUserQuestionCard:De,CopyToClipboard:Ee},mixins:[Se,we],emits:[`history`,`devices`],data(){return{prompt:``,cwd:``,model:``,customModelDraft:``,permissionMode:`bypassPermissions`,provider:`claude`,effort:``,directoryVisible:!1,moreOpen:!1,mobileSettings:!1,settingsMql:void 0,slashMenuOpen:!1,slashActiveIndex:0,editingEventId:``,restoreCode:!1,attachmentFileList:[],uploadUrl:ve()+`/api/v1/files/`,maxAttachments:Q,visibleCount:On,pinnedToBottom:!0,scrollPending:!1,transcriptObserver:void 0,observedTranscript:void 0,speechController:void 0,speechSupported:!1,speechState:`idle`,speechBasePrompt:``,speechFinalText:``,speechInterimText:``}},computed:{headers(){return{Authorization:`Bearer ${this.$store.state.token.access}`}},currentNodeId(){return this.$store.state.codingBridge?.currentNodeId},lastComposer(){let e=this.currentNodeId;return(e?this.$store.state.codingBridge?.lastComposer?.[e]:void 0)??{}},currentNode(){return this.$store.state.codingBridge?.nodes?.find(e=>e.node_id===this.currentNodeId)},nodeOnline(){return this.currentNode?.status===`online`},currentSessionId(){return this.$store.state.codingBridge?.currentSessionId},currentSession(){let e=this.currentSessionId;return e?this.$store.state.codingBridge?.sessions?.[e]:void 0},events(){let e=this.currentSessionId;return e?this.$store.state.codingBridge?.events?.[e]??[]:[]},eventCount(){return this.events.length},visibleEvents(){let e=this.events;return e.length>this.visibleCount?e.slice(-this.visibleCount):e},hiddenEventCount(){return Math.max(0,this.events.length-this.visibleCount)},historyLoading(){return this.$store.state.codingBridge?.status?.getHistoryDetail===x.Request},pendingQuestion(){let e=this.currentSessionId;if(!e)return;let t=(this.$store.state.codingBridge?.permissions??[]).find(t=>t.session_id===e&&nt(t));return t?{request_id:t.request_id,payload:rt(t)}:void 0},isNewSession(){return!this.currentSessionId},canPickCwd(){return this.isNewSession||!this.currentSession?.started},readonly(){return this.currentSession?.readonly===!0},resumeHint(){return!!this.currentSession?.provider&&!this.currentSession?.started&&!this.readonly},replayLabel(){return!this.currentSession?.provider||this.currentSession?.started?``:this.currentSession.provider===`codex`?this.$t(`codingBridge.history.codexLabel`):this.currentSession.provider===`claude`?this.$t(`codingBridge.history.claudeLabel`):this.providerName(this.currentSession.provider)},running(){let e=this.currentSession?.status;return e===`running`||e===`starting`},thinking(){return this.running&&!this.pendingQuestion},connected(){return this.$store.state.codingBridge?.connection===`connected`},canRetry(){return this.currentSession?.status===`error`&&!this.readonly&&this.connected&&this.nodeOnline&&this.events.some(e=>e.kind===`prompt`)},attachments(){return(this.attachmentFileList||[]).map(e=>{let t=e.response?.file_url||(typeof e.url==`string`&&!e.url.startsWith(`blob:`)?e.url:``);if(!t)return;let n=e.raw,r=n?.type||e.mime_type||``;return{type:this.isImageAttachment(e)?`image`:`file`,url:t,name:e.name,mime_type:r,size:n?.size}}).filter(e=>!!e)},uploadingAttachments(){return(this.attachmentFileList||[]).some(e=>this.isAttachmentUploading(e))},speechActive(){return this.speechState!==`idle`},canSend(){return(!!this.prompt.trim()||this.attachments.length>0)&&!this.uploadingAttachments&&!this.speechActive&&this.connected&&this.nodeOnline},composerHint(){return this.speechState===`stopping`?this.$t(`codingBridge.session.voiceStopping`):this.speechState===`listening`?this.$t(`codingBridge.session.voiceListening`):this.uploadingAttachments?this.$t(`codingBridge.session.uploadingAttachment`):this.providerCaps.length&&!this.currentProviderAvailable?this.$t(`codingBridge.session.providerUnavailableHint`,{name:this.providerName(this.provider)}):this.resumeHint?this.$t(`codingBridge.history.resumeHint`):this.$t(`codingBridge.session.enterHint`)},nodeCapabilities(){let e=this.currentNodeId;return e?this.$store.state.codingBridge?.capabilities?.[e]:void 0},providerCaps(){return this.nodeCapabilities?.providers??[]},currentProviderCap(){return this.providerCaps.find(e=>e.name===this.provider)},canEdit(){return this.readonly?!1:!!this.providerCaps.find(e=>e.name===this.activeProviderName)?.supports_edit},canRestoreCode(){return!!this.providerCaps.find(e=>e.name===this.activeProviderName)?.supports_code_restore},editingActive(){return!!this.editingEventId},currentProviderAvailable(){return this.providerCaps.length?this.currentProviderCap?.available!==!1:!0},providerOptions(){return this.providerCaps.length?this.providerCaps.map(e=>({value:e.name,label:e.label,available:e.available!==!1})):[{label:this.$t(`codingBridge.session.providerClaude`),value:`claude`,available:!0},{label:this.$t(`codingBridge.session.providerCodex`),value:`codex`,available:!0},{label:`GitHub Copilot`,value:`copilot`,available:!0}]},modelOptions(){return this.currentProviderCap?.models??[]},allowCustomModel(){return this.currentProviderCap?.allow_custom_model??!0},effortOptions(){let e=this.currentProviderCap?.efforts;return(e&&e.length?e:[``]).map(e=>({value:e,label:this.effortLabel(e)}))},permissionModeOptions(){let e=this.currentProviderCap?.permission_modes;return(e&&e.length?e:[`default`,`acceptEdits`,`plan`,`bypassPermissions`]).map(e=>({value:e,label:this.permissionModeLabel(e)}))},sessionMeta(){let e=this.currentSession;if(!e)return``;let t=[];return e.provider&&t.push(this.providerName(e.provider)),e.cwd&&t.push(e.cwd),e.model&&t.push(e.model),t.join(` · `)},activeProviderName(){return this.currentSession?.provider||this.provider},slashCommands(){let e=this.activeProviderName;return this.providerCaps.find(t=>t.name===e)?.commands??[]},slashMatches(){let e=this.prompt.match(/^\/(\S*)$/);if(!e)return[];let t=e[1].toLowerCase();return this.slashCommands.filter(e=>[e.name,...e.aliases??[]].some(e=>e.toLowerCase().startsWith(t)))},slashMenuVisible(){return this.slashMenuOpen&&this.slashMatches.length>0},diagnostics(){let e=[];return this.currentNodeId&&e.push({label:this.$t(`codingBridge.session.nodeId`),value:this.currentNodeId}),this.currentSessionId&&e.push({label:this.$t(`codingBridge.session.sessionId`),value:this.currentSessionId}),this.currentSession?.trace_id&&e.push({label:this.$t(`codingBridge.session.traceId`),value:this.currentSession.trace_id}),e}},watch:{eventCount(){this.scrollToBottom()},pendingQuestion(){this.scrollToBottom()},thinking(){this.scrollToBottom()},currentSessionId(){this.cancelSpeechRecognition?.(),this.pinnedToBottom=!0,this.scrollToBottom(),this.visibleCount=On,this.editingEventId=``,this.restoreCode=!1,this.syncSessionSettings()},currentNodeId(){this.cancelSpeechRecognition?.(),this.requestCapabilities(),this.isNewSession&&this.restoreComposerPrefs()},nodeOnline(e){e||this.cancelSpeechRecognition?.()},providerCaps(){if(!this.isNewSession||!this.providerCaps.length)return;let e=this.providerCaps.find(e=>e.name===this.provider);if(!e||e.available===!1){let e=this.providerCaps.find(e=>e.available!==!1);e&&(this.provider=e.name)}},provider(){this.isNewSession&&(this.model=``,this.effort=``)},prompt(e){this.slashMenuOpen=/^\/\S*$/.test(e),this.slashActiveIndex>=this.slashMatches.length&&(this.slashActiveIndex=0)}},mounted(){this.requestCapabilities(),this.syncSessionSettings(),this.scrollToBottom(),this.observeTranscript(),this.watchSettingsBreakpoint(),this.initializeSpeechRecognition?.()},updated(){this.observeTranscript()},beforeUnmount(){this.transcriptObserver?.disconnect(),this.transcriptObserver=void 0,this.observedTranscript=void 0,this.settingsMql?.removeEventListener(`change`,this.onSettingsBreakpoint),this.settingsMql=void 0,this.speechController?.dispose(),this.speechController=void 0},methods:{async initializeSpeechRecognition(){let e=En();this.speechController=e,this.speechSupported=await e.isSupported()},async toggleSpeechRecognition(){if(this.speechState===`listening`){await this.stopSpeechRecognition();return}this.speechState===`idle`&&await this.startSpeechRecognition()},async startSpeechRecognition(){if(!this.speechController||!this.speechSupported)return;let e=await this.ensureSpeechCredential();if(!e){S.error(this.$t(`codingBridge.session.voiceError`));return}this.speechBasePrompt=this.prompt,this.speechFinalText=``,this.speechInterimText=``,this.speechState=`listening`;try{await this.speechController.start(this.$i18n.locale,e,{onResult:this.applySpeechSnapshot,onEnd:this.finishSpeechRecognition,onError:this.handleSpeechError})}catch{this.finishSpeechRecognition()}},async ensureSpeechCredential(){let e=this.$store.state.openaiimage?.credential?.token;if(e)return e;await this.$store.dispatch(`openaiimage/getService`);let t=await this.$store.dispatch(`openaiimage/getApplications`),n=ye([...this.$store.state.applications??[],...t??[]],this.$store.state.openaiimage?.application);return n&&await this.$store.dispatch(`openaiimage/setApplication`,n),e=this.$store.state.openaiimage?.credential?.token,e??``},async stopSpeechRecognition(){if(!(!this.speechController||this.speechState!==`listening`)){this.speechState=`stopping`;try{await this.speechController.stop()}catch{this.handleSpeechError(`unknown`),this.finishSpeechRecognition()}}},async cancelSpeechRecognition(){!this.speechController||this.speechState===`idle`||(this.speechState=`idle`,this.speechInterimText=``,this.applySpeechPrompt(),await this.speechController.abort())},applySpeechSnapshot(e){this.speechState!==`idle`&&(this.speechFinalText=e.finalText,this.speechInterimText=e.interimText,this.applySpeechPrompt())},applySpeechPrompt(){let e=`${this.speechFinalText}${this.speechInterimText}`,t=this.speechBasePrompt&&e?`
2
2
  `:``;this.prompt=`${this.speechBasePrompt}${t}${e}`},finishSpeechRecognition(){this.speechState!==`idle`&&(this.speechInterimText=``,this.applySpeechPrompt(),this.speechState=`idle`)},handleSpeechError(e){if(e===`aborted`)return;let t=this.$t({"permission-denied":`codingBridge.session.voicePermissionDenied`,"microphone-unavailable":`codingBridge.session.voiceMicrophoneUnavailable`,"no-speech":`codingBridge.session.voiceNoSpeech`,network:`codingBridge.session.voiceNetworkError`,unknown:`codingBridge.session.voiceError`}[e]);e===`no-speech`?S.warning(t):S.error(t)},watchSettingsBreakpoint(){typeof window>`u`||!window.matchMedia||(this.settingsMql=window.matchMedia(`(max-width: 767px)`),this.mobileSettings=this.settingsMql.matches,this.settingsMql.addEventListener(`change`,this.onSettingsBreakpoint))},onSettingsBreakpoint(e){this.mobileSettings=e.matches,e.matches||(this.moreOpen=!1)},requestCapabilities(){this.currentNodeId&&this.$store.dispatch(`codingBridge/getCapabilities`,this.currentNodeId)},effortLabel(e){let t={"":`codingBridge.session.effortDefault`,low:`codingBridge.session.effortLow`,medium:`codingBridge.session.effortMedium`,high:`codingBridge.session.effortHigh`,max:`codingBridge.session.effortMax`}[e];return t?this.$t(t):e},permissionModeLabel(e){let t={default:`codingBridge.session.permissionModeDefault`,acceptEdits:`codingBridge.session.permissionModeAcceptEdits`,plan:`codingBridge.session.permissionModePlan`,bypassPermissions:`codingBridge.session.permissionModeBypass`}[e];return t?this.$t(t):e},providerName(e){let t=this.providerCaps.find(t=>t.name===e);return t?t.label:{claude:this.$t(`codingBridge.session.providerClaude`),codex:this.$t(`codingBridge.session.providerCodex`),copilot:`GitHub Copilot`}[e]??e},providerIcon(e){return jn[e]??null},syncSessionSettings(){let e=this.currentSession;if(!e){this.restoreComposerPrefs();return}let t=this.lastComposer;e.provider&&(this.provider=e.provider),this.model=e.model??``,this.customModelDraft=``,this.cwd=e.cwd??t.cwd??``,this.effort=e.effort??t.effort??``,this.permissionMode=e.permission_mode??t.permissionMode??`bypassPermissions`},selectModel(e){this.model=e,this.customModelDraft=``,this.closeModelPopover()},applyCustomModel(){let e=this.customModelDraft.trim();e&&(this.model=e,this.customModelDraft=``,this.closeModelPopover())},closeModelPopover(){this.$refs.modelPopover?.hide?.()},onComposerEnter(e){let t=e;t.isComposing||t.keyCode===229||t.shiftKey||t.ctrlKey||t.metaKey||t.altKey||(t.preventDefault(),this.onSend())},onComposerKeydown(e){let t=e;if(this.slashMenuVisible&&!t.isComposing&&t.keyCode!==229){if(t.key===`ArrowDown`){t.preventDefault(),this.moveSlash(1);return}if(t.key===`ArrowUp`){t.preventDefault(),this.moveSlash(-1);return}if(t.key===`Escape`){t.preventDefault(),this.slashMenuOpen=!1;return}if(t.key===`Tab`||t.key===`Enter`&&!t.shiftKey){t.preventDefault(),this.applySlash(this.slashMatches[this.slashActiveIndex]);return}}t.key===`Enter`&&this.onComposerEnter(t)},moveSlash(e){let t=this.slashMatches.length;t&&(this.slashActiveIndex=(this.slashActiveIndex+e+t)%t,this.$nextTick(()=>{(this.$el?.querySelector?.(`.cb-slash-menu__item--active`))?.scrollIntoView({block:`nearest`})}))},applySlash(e){e&&(this.prompt=`/${e.name} `,this.slashMenuOpen=!1,this.slashActiveIndex=0)},onSend(){if(!this.canSend)return;this.cancelSpeechRecognition?.();let e=this.attachments;if(this.editingEventId){this.$store.dispatch(`codingBridge/editPrompt`,{eventId:this.editingEventId,prompt:this.prompt,model:this.model,permissionMode:this.permissionMode,effort:this.effort,attachments:e.length?e:void 0,restoreCode:this.restoreCode}),this.resetComposer();return}this.currentNodeId&&this.$store.commit(`codingBridge/setLastComposer`,{node_id:this.currentNodeId,prefs:{cwd:this.cwd,provider:this.provider,model:this.model,permissionMode:this.permissionMode,effort:this.effort}}),this.$store.dispatch(`codingBridge/sendPrompt`,{prompt:this.prompt,cwd:this.cwd,model:this.model,permissionMode:this.permissionMode,provider:this.provider,effort:this.effort,attachments:e.length?e:void 0}),this.resetComposer()},resetComposer(){this.cancelSpeechRecognition?.(),this.prompt=``,this.speechBasePrompt=``,this.speechFinalText=``,this.speechInterimText=``,this.slashMenuOpen=!1,this.slashActiveIndex=0,this.editingEventId=``,this.restoreCode=!1,this.clearAttachments()},cancelEdit(){this.resetComposer()},onAnswerQuestion(e){this.$store.dispatch(`codingBridge/answerQuestion`,{request_id:e.tool_use_id,output:e.output})},onSkipQuestion(e){this.$store.dispatch(`codingBridge/resolvePermission`,{request_id:e.tool_use_id,decision:`deny`})},beforeAttachmentUpload(e){return this.attachmentFileList.length>=Q?(S.warning(this.$t(`codingBridge.session.attachmentLimit`,{count:Q})),!1):e.size>Dn?(S.warning(this.$t(`codingBridge.session.attachmentTooLarge`)),!1):!0},onAttachmentChange(e){if(!e.url&&e.raw&&this.isImageAttachment(e))try{e.url=URL.createObjectURL(e.raw)}catch{}},onAttachmentSuccess(e,t){e?.file_url&&(this.revokeBlobUrl(t),t.url=e.file_url,t.response=e)},onAttachmentError(){S.error(this.$t(`codingBridge.session.attachmentUploadError`))},onAttachmentExceed(){S.warning(this.$t(`codingBridge.session.attachmentLimit`,{count:Q}))},onTriggerAttachmentUpload(){this.$nextTick(()=>{let e=this.$refs.uploader?.$el;(e?.querySelector(`input.el-upload__input`)||e?.querySelector(`input[type="file"]`))?.click()})},isAttachmentUploading(e){return e.status===`ready`||e.status===`uploading`},isImageAttachment(e){return(e.raw?.type||``).startsWith(`image/`)?!0:/\.(png|jpe?g|gif|webp|bmp|svg)$/i.test(e.name||e.url||``)},attachmentPreviewUrl(e){return this.isImageAttachment(e)&&(e.url||e.response?.file_url)||``},removeAttachment(e,t){this.revokeBlobUrl(t),this.attachmentFileList.splice(e,1)},clearAttachments(){for(let e of this.attachmentFileList)this.revokeBlobUrl(e);this.attachmentFileList=[]},revokeBlobUrl(e){if(e.url?.startsWith(`blob:`))try{URL.revokeObjectURL(e.url)}catch{}},onInterrupt(){this.$store.dispatch(`codingBridge/interruptSession`)},onRetry(){this.$store.dispatch(`codingBridge/retryLastPrompt`)},onEditPrompt(e){this.canEdit&&(this.cancelSpeechRecognition?.(),this.editingEventId=e.id,this.restoreCode=!1,this.prompt=e.text??``,this.slashMenuOpen=!1,this.slashActiveIndex=0,this.clearAttachments(),this.attachmentFileList=(e.attachments??[]).map((e,t)=>({name:e.name||e.url,url:e.url,status:`success`,percentage:100,uid:Date.now()+t,response:{file_url:e.url},mime_type:e.mime_type})),this.$nextTick(()=>{(this.$el?.querySelector?.(`.cb-composer__input textarea`))?.focus()}))},openDirectory(){this.directoryVisible=!0},onDirectorySelect(e){this.cwd=e},onNewSession(){this.$store.dispatch(`codingBridge/newSession`),this.restoreComposerPrefs(),this.resetComposer()},restoreComposerPrefs(){let e=this.lastComposer;this.cwd=e.cwd??``,this.provider=e.provider??`claude`,this.permissionMode=e.permissionMode??`bypassPermissions`,this.customModelDraft=``,this.$nextTick(()=>{this.model=e.model??``,this.effort=e.effort??``})},scrollToBottom(){if(!this.pinnedToBottom)return;let e=()=>{let e=this.$refs.transcript;e&&(e.scrollTop=e.scrollHeight)};this.$nextTick(()=>{e(),requestAnimationFrame(e)})},observeTranscript(){let e=this.$refs.transcript;e!==this.observedTranscript&&(this.transcriptObserver?.disconnect(),this.transcriptObserver=void 0,this.observedTranscript=e,!(!e||typeof MutationObserver>`u`)&&(this.transcriptObserver=new MutationObserver(()=>this.scheduleScrollToBottom()),this.transcriptObserver.observe(e,{childList:!0,subtree:!0,characterData:!0})))},scheduleScrollToBottom(){!this.pinnedToBottom||this.scrollPending||(this.scrollPending=!0,requestAnimationFrame(()=>{this.scrollPending=!1;let e=this.$refs.transcript;e&&this.pinnedToBottom&&(e.scrollTop=e.scrollHeight)}))},onTranscriptScroll(){let e=this.$refs.transcript;e&&(this.pinnedToBottom=e.scrollHeight-e.scrollTop-e.clientHeight<=An)},loadEarlier(){let e=this.$refs.transcript,t=e?.scrollHeight??0;this.pinnedToBottom=!1,this.visibleCount+=kn,this.$nextTick(()=>{e&&(e.scrollTop=e.scrollHeight-t+e.scrollTop)})}}}),Nn={class:`session-view flex flex-col h-full bg-[var(--app-content-bg)]`},Pn={key:0,class:`flex-1 flex flex-col items-center justify-center text-center p-8 text-[var(--app-text-subtle)]`},Fn={class:`text-sm`},In={class:`flex items-center justify-between gap-3 px-5 py-3 border-b border-[var(--app-border-subtle)]`},Ln={class:`flex items-center gap-2 min-w-0`},Rn=[`title`,`aria-label`],zn={class:`min-w-0`},Bn={class:`flex items-center gap-2 font-medium`},Vn={class:`truncate`},Hn={key:0,class:`text-xs text-[var(--app-text-subtle)] truncate`},Un={key:0,class:`text-[var(--el-color-primary)]`},Wn={class:`flex items-center gap-2 flex-none`},Gn={key:0,class:`px-5 py-2 text-xs bg-[var(--el-color-warning-light-9)] text-[var(--el-color-warning)] border-b border-[var(--app-border-subtle)]`},Kn={key:1,class:`flex flex-wrap items-center gap-x-4 gap-y-1 px-5 py-1.5 text-[11px] text-[var(--app-text-subtle)] border-b border-[var(--app-border-subtle)]`},qn={class:`opacity-70 flex-none`},Jn=[`title`],Yn={key:0,class:`cb-skeleton`},Xn={class:`flex flex-col gap-4`},Zn={class:`flex justify-end`},Qn={class:`flex flex-col gap-1.5`},$n={class:`flex justify-end`},er={class:`flex flex-col gap-1.5`},tr={key:1,class:`m-auto text-center text-sm text-[var(--app-text-subtle)]`},nr=[`title`],rr={key:4,class:`flex justify-center pt-1`},ir={key:2,class:`cb-question-dock flex-none px-5`},ar={class:`border-t border-[var(--app-border-subtle)] p-3`},or={key:0,class:`flex items-center gap-2 text-xs text-[var(--app-text-subtle)] px-1 py-2`},sr={key:0,class:`mb-2 flex flex-wrap items-center gap-x-3 gap-y-1.5 rounded-lg bg-[var(--el-color-primary-light-9)] px-3 py-2 text-xs text-[var(--app-text)]`},cr={class:`inline-flex items-center gap-1.5`},lr={class:`cb-composer rounded-2xl border border-[var(--app-border-subtle)] bg-[var(--app-content-bg)] px-3 py-2.5 transition-colors focus-within:border-[var(--el-color-primary-light-5)]`},ur={key:0,class:`flex flex-wrap gap-2 pb-2`},dr=[`src`,`alt`],fr={key:1,class:`flex h-8 w-8 items-center justify-center rounded bg-[var(--app-content-bg)]`},pr=[`title`],mr={key:2,class:`text-[10px] text-[var(--app-text-subtle)]`},hr=[`title`,`aria-label`,`onClick`],gr={key:1,class:`cb-slash-menu`},_r=[`onMousedown`,`onMouseenter`],vr={class:`cb-slash-menu__name`},yr={key:0,class:`cb-slash-menu__hint`},br={key:1,class:`cb-slash-menu__desc`},xr={ref:`attachmentUploadTrigger`,class:`block h-0 w-0`,"aria-hidden":`true`},Sr={class:`mt-1.5 flex items-center gap-1.5`},Cr=[`title`,`aria-label`],wr=[`disabled`,`title`,`aria-label`,`aria-pressed`],Tr={class:`flex min-w-0 flex-1 flex-wrap items-center gap-1.5`},Er={type:`button`,class:`cb-pill`},Dr=[`src`],Or={class:`truncate`},kr=[`src`],Ar={key:1,class:`ml-1 text-xs opacity-60`},jr={key:1,class:`cb-pill cb-pill--static`},Mr=[`src`],Nr={class:`truncate`},Pr=[`title`,`aria-label`],Fr={key:0,class:`cb-setting__label`},Ir={type:`button`,class:`cb-pill`},Lr={class:`truncate`},Rr={class:`cb-model-menu`},zr={class:`truncate`},Br=[`onClick`],Vr={class:`truncate`},Hr={key:0,class:`cb-model-custom`},Ur={key:0,class:`cb-setting__label`},Wr={type:`button`,class:`cb-pill`},Gr={class:`truncate`},Kr={key:0,class:`cb-setting__label`},qr={type:`button`,class:`cb-pill`},Jr={class:`truncate`},Yr={key:0,class:`cb-setting__label`},Xr={type:`button`,class:`cb-pill`},Zr={class:`truncate`},Qr=[`title`,`aria-label`],$r={key:2,class:`cb-pill cb-pill--static`},ei={class:`truncate`},ti={class:`text-[11px] text-[var(--app-text-subtle)] mt-1 px-1`};function ni(d,f,h,_,y,b){let x=u(`developer-icon`),S=u(`el-button`),C=u(`history-icon`),w=u(`add-icon`),T=u(`copy-to-clipboard`),E=u(`el-skeleton-item`),D=u(`el-skeleton`),O=u(`up-icon`),ee=u(`transcript-item`),te=u(`thinking-indicator`),ne=u(`redo-icon`),k=u(`ask-user-question-card`),re=u(`view-icon`),A=u(`edit-icon`),ie=u(`el-checkbox`),ae=u(`file-icon`),j=u(`close-icon`),M=u(`el-input`),oe=u(`el-upload`),se=u(`attachment-icon`),N=u(`stop-icon`),ce=u(`microphone-icon`),P=u(`code-icon`),F=u(`expand-down-icon`),I=u(`confirm-icon`),L=u(`el-dropdown-item`),R=u(`el-dropdown-menu`),z=u(`el-dropdown`),le=u(`more-icon`),ue=u(`ai-icon`),B=u(`el-popover`),V=u(`performance-icon`),H=u(`security-icon`),U=u(`folder-open-icon`),de=u(`composer-settings`),fe=u(`directory-dialog`);return v(),s(`div`,Nn,[d.currentNode?(v(),s(l,{key:1},[e(`div`,In,[e(`div`,Ln,[e(`button`,{type:`button`,class:`cb-devices-btn md:hidden`,title:d.$t(`codingBridge.nodeList.title`),"aria-label":d.$t(`codingBridge.nodeList.title`),onClick:f[1]||=e=>d.$emit(`devices`)},[a(x,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,Rn),e(`div`,zn,[e(`div`,Bn,[e(`span`,Vn,i(d.currentNode.name),1),e(`span`,{class:n([`inline-block w-2 h-2 rounded-full flex-none`,d.nodeOnline?`bg-[var(--el-color-success)]`:`bg-[var(--app-text-subtle)]`])},null,2)]),d.currentSession?(v(),s(`div`,Hn,[e(`span`,null,i(d.sessionMeta),1),d.replayLabel?(v(),s(`span`,Un,` · `+i(d.replayLabel),1)):o(``,!0)])):o(``,!0)])]),e(`div`,Wn,[a(S,{size:`small`,round:``,onClick:f[2]||=e=>d.$emit(`history`)},{default:m(()=>[a(C,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(d.$t(`codingBridge.history.button`)),1)]),_:1}),d.currentSessionId?(v(),p(S,{key:0,size:`small`,round:``,onClick:d.onNewSession},{default:m(()=>[a(w,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(d.$t(`codingBridge.session.newSession`)),1)]),_:1},8,[`onClick`])):o(``,!0)])]),d.nodeOnline?o(``,!0):(v(),s(`div`,Gn,i(d.$t(`codingBridge.session.deviceOffline`)),1)),d.diagnostics.length?(v(),s(`div`,Kn,[(v(!0),s(l,null,g(d.diagnostics,t=>(v(),s(`span`,{key:t.label,class:`inline-flex items-center gap-1 min-w-0`},[e(`span`,qn,i(t.label)+`:`,1),e(`span`,{class:`font-mono break-all`,title:t.value},i(t.value),9,Jn),a(T,{content:t.value,class:`inline-block flex-none`},null,8,[`content`])]))),128))])):o(``,!0),e(`div`,{ref:`transcript`,class:`flex-1 min-h-0 overflow-y-auto px-5 py-4 flex flex-col gap-3`,onScroll:f[4]||=(...e)=>d.onTranscriptScroll&&d.onTranscriptScroll(...e)},[d.historyLoading&&!d.events.length?(v(),s(`div`,Yn,[a(D,{animated:``},{template:m(()=>[e(`div`,Xn,[e(`div`,Zn,[a(E,{variant:`rect`,class:`cb-sk cb-sk--user`})]),e(`div`,Qn,[a(E,{variant:`text`,style:{width:`55%`}}),a(E,{variant:`text`,style:{width:`88%`}}),a(E,{variant:`text`,style:{width:`70%`}})]),a(E,{variant:`rect`,class:`cb-sk cb-sk--tool`}),e(`div`,$n,[a(E,{variant:`rect`,class:`cb-sk cb-sk--user-sm`})]),e(`div`,er,[a(E,{variant:`text`,style:{width:`80%`}}),a(E,{variant:`text`,style:{width:`45%`}})])])]),_:1})])):d.events.length?o(``,!0):(v(),s(`div`,tr,i(d.$t(`codingBridge.session.startHint`)),1)),d.hiddenEventCount>0?(v(),s(`button`,{key:2,type:`button`,class:`cb-load-earlier mx-auto mb-1 flex items-center gap-1.5 rounded-full border border-[var(--app-border-subtle)] bg-[var(--app-content-bg)] px-3 py-1 text-xs text-[var(--app-text-subtle)] hover:text-[var(--el-color-primary)]`,title:`+${d.hiddenEventCount}`,onClick:f[3]||=(...e)=>d.loadEarlier&&d.loadEarlier(...e)},[a(O,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(d.hiddenEventCount),1)],8,nr)):o(``,!0),(v(!0),s(l,null,g(d.visibleEvents,e=>(v(),p(ee,{key:e.id,event:e,editable:d.canEdit,onEdit:d.onEditPrompt},null,8,[`event`,`editable`,`onEdit`]))),128)),d.thinking?(v(),p(te,{key:3})):o(``,!0),d.canRetry?(v(),s(`div`,rr,[a(S,{size:`small`,round:``,onClick:d.onRetry},{default:m(()=>[a(ne,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(d.$t(`codingBridge.session.retry`)),1)]),_:1},8,[`onClick`])])):o(``,!0)],544),d.pendingQuestion?(v(),s(`div`,ir,[(v(),p(k,{key:d.pendingQuestion.request_id,"tool-use-id":d.pendingQuestion.request_id,payload:d.pendingQuestion.payload,onSubmit:d.onAnswerQuestion,onSkip:d.onSkipQuestion},null,8,[`tool-use-id`,`payload`,`onSubmit`,`onSkip`]))])):o(``,!0),e(`div`,ar,[d.readonly?(v(),s(`div`,or,[a(re,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,null,i(d.$t(`codingBridge.history.readonly`)),1),a(S,{class:`ml-auto`,size:`small`,round:``,onClick:d.onNewSession},{default:m(()=>[r(i(d.$t(`codingBridge.session.newSession`)),1)]),_:1},8,[`onClick`])])):(v(),s(l,{key:1},[d.editingActive?(v(),s(`div`,sr,[e(`span`,cr,[a(A,{class:`text-[var(--el-color-primary)]`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(d.$t(`codingBridge.session.editingBanner`)),1)]),d.canRestoreCode?(v(),p(ie,{key:0,modelValue:d.restoreCode,"onUpdate:modelValue":f[5]||=e=>d.restoreCode=e,size:`small`,class:`cb-restore-code`},{default:m(()=>[r(i(d.$t(`codingBridge.session.editRestoreCode`)),1)]),_:1},8,[`modelValue`])):o(``,!0),e(`button`,{type:`button`,class:`ml-auto cb-edit-cancel`,onClick:f[6]||=(...e)=>d.cancelEdit&&d.cancelEdit(...e)},i(d.$t(`codingBridge.session.editCancel`)),1)])):o(``,!0),e(`div`,lr,[d.attachmentFileList.length?(v(),s(`div`,ur,[(v(!0),s(l,null,g(d.attachmentFileList,(t,n)=>(v(),s(`div`,{key:t.uid||t.name||n,class:`group relative flex max-w-[220px] items-center gap-2 rounded-md border border-[var(--app-border-subtle)] bg-[var(--app-sidebar-bg)] px-2 py-1.5 text-xs`},[d.attachmentPreviewUrl(t)?(v(),s(`img`,{key:0,src:d.attachmentPreviewUrl(t),class:`h-8 w-8 rounded object-cover`,alt:d.$t(`codingBridge.session.attachmentImageAlt`)},null,8,dr)):(v(),s(`span`,fr,[a(ae,{size:`1em`,"aria-hidden":`true`,focusable:`false`})])),e(`span`,{class:`min-w-0 flex-1 truncate`,title:t.name},i(t.name),9,pr),d.isAttachmentUploading(t)?(v(),s(`span`,mr,i(Math.round(t.percentage||0))+`% `,1)):o(``,!0),e(`button`,{type:`button`,class:`flex h-5 w-5 items-center justify-center rounded-full text-[var(--app-text-subtle)] hover:bg-[var(--app-content-hover-bg)] hover:text-[var(--el-color-danger)]`,title:d.$t(`codingBridge.session.removeAttachment`),"aria-label":d.$t(`codingBridge.session.removeAttachment`),onClick:e=>d.removeAttachment(n,t)},[a(j,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,hr)]))),128))])):o(``,!0),d.slashMenuVisible?(v(),s(`ul`,gr,[(v(!0),s(l,null,g(d.slashMatches,(r,a)=>(v(),s(`li`,{key:r.name,class:n([`cb-slash-menu__item`,{"cb-slash-menu__item--active":a===d.slashActiveIndex}]),onMousedown:t(e=>d.applySlash(r),[`prevent`]),onMouseenter:e=>d.slashActiveIndex=a},[e(`span`,vr,`/`+i(r.name),1),r.argument_hint?(v(),s(`span`,yr,i(r.argument_hint),1)):o(``,!0),r.description?(v(),s(`span`,br,i(r.description),1)):o(``,!0)],42,_r))),128))])):o(``,!0),a(M,{modelValue:d.prompt,"onUpdate:modelValue":f[7]||=e=>d.prompt=e,type:`textarea`,autosize:{minRows:2,maxRows:12},resize:`none`,class:`cb-composer__input`,readonly:d.speechActive,placeholder:d.$t(`codingBridge.session.promptPlaceholder`),onKeydown:d.onComposerKeydown},null,8,[`modelValue`,`readonly`,`placeholder`,`onKeydown`]),a(oe,{ref:`uploader`,"file-list":d.attachmentFileList,"onUpdate:fileList":f[8]||=e=>d.attachmentFileList=e,class:`h-0 w-0 overflow-hidden opacity-0`,name:`file`,action:d.uploadUrl,headers:d.headers,multiple:!0,limit:d.maxAttachments,"show-file-list":!1,"before-upload":d.beforeAttachmentUpload,"on-change":d.onAttachmentChange,"on-success":d.onAttachmentSuccess,"on-error":d.onAttachmentError,"on-exceed":d.onAttachmentExceed},{default:m(()=>[e(`span`,xr,null,512)]),_:1},8,[`file-list`,`action`,`headers`,`limit`,`before-upload`,`on-change`,`on-success`,`on-error`,`on-exceed`]),e(`div`,Sr,[e(`button`,{type:`button`,class:`cb-icon-btn`,title:d.$t(`codingBridge.session.attachFile`),"aria-label":d.$t(`codingBridge.session.attachFile`),onClick:f[9]||=(...e)=>d.onTriggerAttachmentUpload&&d.onTriggerAttachmentUpload(...e)},[a(se,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,Cr),d.speechSupported?(v(),s(`button`,{key:0,type:`button`,class:n([`cb-icon-btn cb-voice-btn`,{"cb-voice-btn--active":d.speechActive}]),disabled:d.speechState===`stopping`,title:d.$t(d.speechActive?`codingBridge.session.voiceStop`:`codingBridge.session.voiceInput`),"aria-label":d.$t(d.speechActive?`codingBridge.session.voiceStop`:`codingBridge.session.voiceInput`),"aria-pressed":d.speechActive,onClick:f[10]||=(...e)=>d.toggleSpeechRecognition&&d.toggleSpeechRecognition(...e)},[d.speechActive?(v(),p(N,{key:0,size:`1em`,"aria-hidden":`true`,focusable:`false`})):(v(),p(ce,{key:1,size:`1em`,"aria-hidden":`true`,focusable:`false`}))],10,wr)):o(``,!0),e(`div`,Tr,[d.isNewSession?(v(),p(z,{key:0,trigger:`click`,onCommand:f[11]||=e=>d.provider=e},{dropdown:m(()=>[a(R,null,{default:m(()=>[(v(!0),s(l,null,g(d.providerOptions,e=>(v(),p(L,{key:e.value,command:e.value,disabled:!e.available},{default:m(()=>[a(I,{class:n([`mr-2`,e.value===d.provider?`opacity-100`:`opacity-0`]),size:`1em`,"aria-hidden":`true`,focusable:`false`},null,8,[`class`]),d.providerIcon(e.value)?(v(),s(`img`,{key:0,src:d.providerIcon(e.value).src,class:n([`cb-pill__brand mr-1.5`,{"cb-pill__brand--invert":d.providerIcon(e.value).invertOnDark}]),alt:``},null,10,kr)):o(``,!0),r(` `+i(e.label)+` `,1),e.available?o(``,!0):(v(),s(`span`,Ar,i(d.$t(`codingBridge.session.providerUnavailable`)),1))]),_:2},1032,[`command`,`disabled`]))),128))]),_:1})]),default:m(()=>[e(`button`,Er,[d.providerIcon(d.provider)?(v(),s(`img`,{key:0,src:d.providerIcon(d.provider).src,class:n([`cb-pill__brand`,{"cb-pill__brand--invert":d.providerIcon(d.provider).invertOnDark}]),alt:``},null,10,Dr)):(v(),p(P,{key:1,class:`cb-pill__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`})),e(`span`,Or,i(d.providerName(d.provider)),1),a(F,{class:`cb-pill__caret`,size:`1em`,"aria-hidden":`true`,focusable:`false`})])]),_:1})):(v(),s(`span`,jr,[d.providerIcon(d.currentSession?.provider||`claude`)?(v(),s(`img`,{key:0,src:d.providerIcon(d.currentSession?.provider||`claude`).src,class:n([`cb-pill__brand`,{"cb-pill__brand--invert":d.providerIcon(d.currentSession?.provider||`claude`).invertOnDark}]),alt:``},null,10,Mr)):(v(),p(P,{key:1,class:`cb-pill__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`})),e(`span`,Nr,i(d.providerName(d.currentSession?.provider||`claude`)),1)])),e(`button`,{type:`button`,class:`cb-icon-btn cb-more-btn`,title:d.$t(`codingBridge.session.settings`),"aria-label":d.$t(`codingBridge.session.settings`),onClick:f[12]||=e=>d.moreOpen=!0},[a(le,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,Pr),a(de,{open:d.moreOpen,"onUpdate:open":f[21]||=e=>d.moreOpen=e,dialog:d.mobileSettings},{default:m(()=>[e(`div`,{class:n([`cb-setting`,{"cb-setting--row":d.mobileSettings}])},[d.mobileSettings?(v(),s(`span`,Fr,i(d.$t(`chat.scheduledTasks.form.model`)),1)):o(``,!0),a(B,{ref:`modelPopover`,trigger:`click`,placement:`top-start`,width:260},{reference:m(()=>[e(`button`,Ir,[a(ue,{class:`cb-pill__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,Lr,i(d.model||d.$t(`codingBridge.session.modelDefault`)),1),a(F,{class:`cb-pill__caret`,size:`1em`,"aria-hidden":`true`,focusable:`false`})])]),default:m(()=>[e(`div`,Rr,[e(`button`,{type:`button`,class:`cb-model-option`,onClick:f[13]||=e=>d.selectModel(``)},[a(I,{class:n([`cb-model-option__check`,d.model?`opacity-0`:`opacity-100`]),size:`1em`,"aria-hidden":`true`,focusable:`false`},null,8,[`class`]),e(`span`,zr,i(d.$t(`codingBridge.session.modelDefault`)),1)]),(v(!0),s(l,null,g(d.modelOptions,t=>(v(),s(`button`,{key:t.value,type:`button`,class:`cb-model-option`,onClick:e=>d.selectModel(t.value)},[a(I,{class:n([`cb-model-option__check`,t.value===d.model?`opacity-100`:`opacity-0`]),size:`1em`,"aria-hidden":`true`,focusable:`false`},null,8,[`class`]),e(`span`,Vr,i(t.label),1)],8,Br))),128)),d.allowCustomModel?(v(),s(`div`,Hr,[a(M,{modelValue:d.customModelDraft,"onUpdate:modelValue":f[14]||=e=>d.customModelDraft=e,size:`small`,placeholder:d.$t(`codingBridge.session.modelPlaceholder`),onKeyup:c(d.applyCustomModel,[`enter`])},{append:m(()=>[a(S,{disabled:!d.customModelDraft.trim(),"aria-label":d.$t(`common.button.confirm`),title:d.$t(`common.button.confirm`),onClick:d.applyCustomModel},{default:m(()=>[a(I,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`disabled`,`aria-label`,`title`,`onClick`])]),_:1},8,[`modelValue`,`placeholder`,`onKeyup`])])):o(``,!0)])]),_:1},512)],2),d.effortOptions.length>1?(v(),s(`div`,{key:0,class:n([`cb-setting`,{"cb-setting--row":d.mobileSettings}])},[d.mobileSettings?(v(),s(`span`,Ur,i(d.$t(`codingBridge.session.effortLabel`)),1)):o(``,!0),a(z,{trigger:`click`,onCommand:f[15]||=e=>d.effort=e},{dropdown:m(()=>[a(R,null,{default:m(()=>[(v(!0),s(l,null,g(d.effortOptions,e=>(v(),p(L,{key:e.value,command:e.value},{default:m(()=>[a(I,{class:n([`mr-2`,e.value===d.effort?`opacity-100`:`opacity-0`]),size:`1em`,"aria-hidden":`true`,focusable:`false`},null,8,[`class`]),r(` `+i(e.label),1)]),_:2},1032,[`command`]))),128))]),_:1})]),default:m(()=>[e(`button`,Wr,[a(V,{class:`cb-pill__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,Gr,i(d.effortLabel(d.effort)),1),a(F,{class:`cb-pill__caret`,size:`1em`,"aria-hidden":`true`,focusable:`false`})])]),_:1})],2)):o(``,!0),e(`div`,{class:n([`cb-setting`,{"cb-setting--row":d.mobileSettings}])},[d.mobileSettings?(v(),s(`span`,Kr,i(d.$t(`codingBridge.session.permissionModeLabel`)),1)):o(``,!0),a(z,{trigger:`click`,onCommand:f[16]||=e=>d.permissionMode=e},{dropdown:m(()=>[a(R,null,{default:m(()=>[(v(!0),s(l,null,g(d.permissionModeOptions,e=>(v(),p(L,{key:e.value,command:e.value},{default:m(()=>[a(I,{class:n([`mr-2`,e.value===d.permissionMode?`opacity-100`:`opacity-0`]),size:`1em`,"aria-hidden":`true`,focusable:`false`},null,8,[`class`]),r(` `+i(e.label),1)]),_:2},1032,[`command`]))),128))]),_:1})]),default:m(()=>[e(`button`,qr,[a(H,{class:`cb-pill__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,Jr,i(d.permissionModeLabel(d.permissionMode)),1),a(F,{class:`cb-pill__caret`,size:`1em`,"aria-hidden":`true`,focusable:`false`})])]),_:1})],2),d.canPickCwd||d.currentSession?.cwd?(v(),s(`div`,{key:1,class:n([`cb-setting`,{"cb-setting--row":d.mobileSettings}])},[d.mobileSettings?(v(),s(`span`,Yr,i(d.$t(`common.settings.localToolsWorkingDirTitle`)),1)):o(``,!0),d.canPickCwd?(v(),p(B,{key:1,trigger:`click`,placement:`top-start`,width:320},{reference:m(()=>[e(`button`,Xr,[a(U,{class:`cb-pill__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,Zr,i(d.cwd||d.$t(`codingBridge.session.cwdDefault`)),1),a(F,{class:`cb-pill__caret`,size:`1em`,"aria-hidden":`true`,focusable:`false`})])]),default:m(()=>[a(M,{modelValue:d.cwd,"onUpdate:modelValue":f[20]||=e=>d.cwd=e,size:`small`,clearable:``,class:`cb-cwd-input`,placeholder:d.$t(`codingBridge.session.cwdPlaceholder`)},{suffix:m(()=>[e(`span`,{class:`cb-cwd-browse`,role:`button`,tabindex:`0`,title:d.$t(`codingBridge.directory.title`),"aria-label":d.$t(`codingBridge.directory.title`),onClick:f[17]||=(...e)=>d.openDirectory&&d.openDirectory(...e),onKeydown:[f[18]||=c(t((...e)=>d.openDirectory&&d.openDirectory(...e),[`prevent`]),[`enter`]),f[19]||=c(t((...e)=>d.openDirectory&&d.openDirectory(...e),[`prevent`]),[`space`])]},[a(U,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],40,Qr)]),_:1},8,[`modelValue`,`placeholder`])]),_:1})):(v(),s(`span`,$r,[a(U,{class:`cb-pill__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,ei,i(d.currentSession?.cwd),1)]))],2)):o(``,!0)]),_:1},8,[`open`,`dialog`])]),d.running?(v(),p(S,{key:1,circle:``,"aria-label":d.$t(`common.button.stop`),title:d.$t(`common.button.stop`),onClick:d.onInterrupt},{default:m(()=>[a(N,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`,`onClick`])):o(``,!0),a(S,{type:`primary`,round:``,disabled:!d.canSend,onClick:d.onSend},{default:m(()=>[r(i(d.editingActive?d.$t(`codingBridge.session.editSubmit`):d.$t(`codingBridge.session.send`)),1)]),_:1},8,[`disabled`,`onClick`])])]),e(`p`,ti,i(d.composerHint),1)],64))])],64)):(v(),s(`div`,Pn,[a(x,{class:`text-4xl mb-3`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`p`,Fn,i(d.$t(`codingBridge.session.noDevice`)),1),a(S,{class:`md:hidden mt-4`,round:``,onClick:f[0]||=e=>d.$emit(`devices`)},{default:m(()=>[a(x,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(d.$t(`codingBridge.nodeList.title`)),1)]),_:1})])),a(fe,{visible:d.directoryVisible,"onUpdate:visible":f[22]||=e=>d.directoryVisible=e,"initial-path":d.cwd,onSelect:d.onDirectorySelect},null,8,[`visible`,`initial-path`,`onSelect`])])}var ri=W(Mn,[[`render`,ni],[`__scopeId`,`data-v-adb11f90`]]),ii=y({name:`CodingBridgePairDialog`,components:{LinkIcon:R,ElDialog:q,ElInput:J,ElButton:Y},props:{visible:{type:Boolean,default:!1},initialCode:{type:String,default:``}},emits:[`update:visible`],data(){return{code:``}},computed:{claiming(){return this.$store.state.codingBridge?.status?.claimPair===x.Request}},watch:{visible(e){e&&this.initialCode&&(this.code=this.initialCode)},initialCode(e){e&&(this.code=e)}},methods:{async onClaim(){let e=this.code.trim();if(e)try{let t=await this.$store.dispatch(`codingBridge/claimPair`,e);S.success(this.$t(`codingBridge.pair.success`,{name:t})),this.code=``,this.$emit(`update:visible`,!1)}catch(e){let t=e?.response?.status;t===404?S.error(this.$t(`codingBridge.pair.invalidCode`)):t===409?S.error(this.$t(`codingBridge.pair.usedCode`)):S.error(this.$t(`codingBridge.pair.failed`))}}}}),ai={class:`content`},oi={class:`text-sm text-[var(--app-text-subtle)] mb-4`},si={class:`steps list-none m-0 p-0 mb-4`},ci={class:`flex gap-3 mb-3`},li={class:`flex-1 min-w-0`},ui={class:`text-sm mb-1`},di={class:`flex gap-3 mb-3`},fi={class:`flex-1 min-w-0`},pi={class:`text-sm mb-1`},mi={class:`flex gap-3`},hi={class:`flex-1 min-w-0`},gi={class:`text-sm`};function _i(t,n,o,s,l,d){let f=u(`el-input`),h=u(`link-icon`),g=u(`el-button`),_=u(`el-dialog`);return v(),p(_,{"model-value":t.visible,width:`520px`,title:t.$t(`codingBridge.pair.title`),center:``,"onUpdate:modelValue":n[1]||=e=>t.$emit(`update:visible`,e)},{default:m(()=>[e(`div`,ai,[e(`p`,oi,i(t.$t(`codingBridge.pair.intro`)),1),e(`ol`,si,[e(`li`,ci,[n[3]||=e(`span`,{class:`step-index`},`1`,-1),e(`div`,li,[e(`p`,ui,i(t.$t(`codingBridge.pair.step1`)),1),n[2]||=e(`code`,{class:`cmd`},`pip install coding-bridge`,-1)])]),e(`li`,di,[n[5]||=e(`span`,{class:`step-index`},`2`,-1),e(`div`,fi,[e(`p`,pi,i(t.$t(`codingBridge.pair.step2`)),1),n[4]||=e(`code`,{class:`cmd`},`coding-bridge up`,-1)])]),e(`li`,mi,[n[6]||=e(`span`,{class:`step-index`},`3`,-1),e(`div`,hi,[e(`p`,gi,i(t.$t(`codingBridge.pair.step3`)),1)])])]),a(f,{modelValue:t.code,"onUpdate:modelValue":n[0]||=e=>t.code=e,size:`large`,class:`mb-3`,placeholder:t.$t(`codingBridge.pair.codePlaceholder`),clearable:``,onKeyup:c(t.onClaim,[`enter`])},null,8,[`modelValue`,`placeholder`,`onKeyup`]),a(g,{type:`primary`,round:``,class:`w-full`,loading:t.claiming,disabled:!t.code.trim(),onClick:t.onClaim},{default:m(()=>[a(h,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`codingBridge.pair.claim`)),1)]),_:1},8,[`loading`,`disabled`,`onClick`])])]),_:1},8,[`model-value`,`title`])}var vi=W(ii,[[`render`,_i],[`__scopeId`,`data-v-54bd85f1`]]),yi=y({name:`CodingBridgePermissionDialog`,components:{CloseIcon:G,CodeIcon:j,ConfirmIcon:A,ElDialog:q,ElButton:Y},computed:{request(){return(this.$store.state.codingBridge?.permissions??[]).find(e=>!nt(e))},hasInput(){return!!this.request?.input&&Object.keys(this.request.input).length>0},inputText(){try{return JSON.stringify(this.request?.input,null,2)}catch{return String(this.request?.input??``)}}},methods:{onAllow(){this.request&&this.$store.dispatch(`codingBridge/resolvePermission`,{request_id:this.request.request_id,decision:`allow`})},onDeny(){this.request&&this.$store.dispatch(`codingBridge/resolvePermission`,{request_id:this.request.request_id,decision:`deny`})}}}),bi={key:0,class:`content`},xi={class:`text-sm text-[var(--app-text-subtle)] mb-3`},Si={class:`rounded-md border border-[var(--app-border-subtle)] p-3 mb-3`},Ci={class:`flex items-center gap-2 font-medium`},wi={key:0,class:`text-xs text-[var(--app-text-subtle)] mt-1`},Ti={key:1,class:`mt-2 text-xs overflow-x-auto whitespace-pre-wrap break-words text-[var(--app-text-subtle)] max-h-[200px]`},Ei={class:`flex justify-end gap-2`};function Di(t,n,c,l,d,f){let h=u(`code-icon`),g=u(`close-icon`),_=u(`el-button`),y=u(`confirm-icon`),b=u(`el-dialog`);return v(),p(b,{"model-value":!!t.request,width:`480px`,title:t.$t(`codingBridge.permission.title`),"close-on-click-modal":!1,"show-close":!1,center:``},{footer:m(()=>[e(`div`,Ei,[a(_,{round:``,onClick:t.onDeny},{default:m(()=>[a(g,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`codingBridge.permission.deny`)),1)]),_:1},8,[`onClick`]),a(_,{type:`primary`,round:``,onClick:t.onAllow},{default:m(()=>[a(y,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`codingBridge.permission.allow`)),1)]),_:1},8,[`onClick`])])]),default:m(()=>[t.request?(v(),s(`div`,bi,[e(`p`,xi,i(t.$t(`codingBridge.permission.subtitle`)),1),e(`div`,Si,[e(`div`,Ci,[a(h,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,null,i(t.request.display_name||t.request.title||t.request.tool),1)]),t.request.description?(v(),s(`p`,wi,i(t.request.description),1)):o(``,!0),t.hasInput?(v(),s(`pre`,Ti,i(t.inputText),1)):o(``,!0)])])):o(``,!0)]),_:1},8,[`model-value`,`title`])}var Oi=W(yi,[[`render`,Di]]),ki={claude:{src:vn,invertOnDark:!1},codex:{src:yn,invertOnDark:!0},copilot:{src:bn,invertOnDark:!0}},$=[`claude`,`codex`,`copilot`],Ai=y({name:`CodingBridgeHistoryDrawer`,components:{CodeIcon:j,RedoIcon:U,ElDrawer:w,ElButton:Y},props:{visible:{type:Boolean,default:!1}},emits:[`update:visible`],data(){return{selectedProviders:[]}},computed:{currentNodeId(){return this.$store.state.codingBridge?.currentNodeId},loading(){return this.$store.state.codingBridge?.status?.getHistory===x.Request},allSessions(){let e=this.currentNodeId;return[...e?this.$store.state.codingBridge?.history?.[e]??[]:[]].sort((e,t)=>(t.updated_at??0)-(e.updated_at??0))},sessions(){return this.selectedProviders.length?this.allSessions.filter(e=>this.selectedProviders.includes(e.provider)):this.allSessions},providerOptions(){let e=new Map;return this.allSessions.forEach(t=>{e.set(t.provider,(e.get(t.provider)??0)+1)}),[...e.entries()].sort(([e],[t])=>{let n=$.indexOf(e),r=$.indexOf(t);return n===r?e.localeCompare(t):(n<0?$.length:n)-(r<0?$.length:r)}).map(([e,t])=>({value:e,label:this.providerLabel(e),count:t,icon:this.providerIcon(e)}))}},watch:{visible(e){e&&this.currentNodeId&&this.$store.dispatch(`codingBridge/getHistory`,this.currentNodeId)},currentNodeId(){this.selectedProviders=[]}},methods:{isSelected(e){return this.selectedProviders.includes(e)},toggle(e){this.selectedProviders=this.isSelected(e)?this.selectedProviders.filter(t=>t!==e):[...this.selectedProviders,e]},clearFilter(){this.selectedProviders=[]},providerLabel(e){return{claude:`Claude Code`,codex:`Codex`,copilot:`GitHub Copilot`}[e]??e},providerIcon(e){return ki[e]??null},refresh(){this.currentNodeId&&this.$store.dispatch(`codingBridge/getHistory`,this.currentNodeId)},open(e){this.currentNodeId&&(e.unread&&this.$store.dispatch(`codingBridge/markHistoryRead`,{node_id:this.currentNodeId,provider:e.provider,session_id:e.session_id,updated_at:e.updated_at}),this.$store.dispatch(`codingBridge/reattachSession`,{node_id:this.currentNodeId,provider:e.provider,session_id:e.session_id}),this.$emit(`update:visible`,!1))},formatTime(e){try{return new Date(e).toLocaleString()}catch{return``}}}}),ji={class:`flex flex-col h-full`},Mi={class:`flex items-center justify-between mb-3`},Ni={class:`text-xs text-[var(--app-text-subtle)] m-0`},Pi={key:0,class:`flex flex-wrap items-center gap-1.5 mb-3`},Fi=[`aria-pressed`,`onClick`],Ii=[`src`],Li={class:`chip-count`},Ri={key:1,class:`m-auto text-sm text-[var(--app-text-subtle)]`},zi={key:2,class:`m-auto text-sm text-[var(--app-text-subtle)]`},Bi={key:3,class:`m-auto text-sm text-[var(--app-text-subtle)] text-center`},Vi={key:4,class:`m-auto text-sm text-[var(--app-text-subtle)] text-center`},Hi={class:`m-0`},Ui={key:5,class:`list-none m-0 p-0 flex-1 overflow-y-auto flex flex-col gap-2`},Wi=[`onClick`],Gi={class:`flex items-center gap-2 mb-1`},Ki=[`src`,`alt`],qi=[`title`],Ji=[`title`],Yi={class:`text-[11px] text-[var(--app-text-subtle)] truncate`},Xi={key:0},Zi={key:1},Qi={class:`text-[11px] text-[var(--app-text-subtle)] mt-0.5`},$i={key:0},ea={key:1};function ta(t,c,d,f,h,_){let y=u(`redo-icon`),b=u(`el-button`),x=u(`code-icon`),S=u(`el-drawer`);return v(),p(S,{"model-value":t.visible,direction:`rtl`,size:`380px`,title:t.$t(`codingBridge.history.title`),"onUpdate:modelValue":c[1]||=e=>t.$emit(`update:visible`,e)},{default:m(()=>[e(`div`,ji,[e(`div`,Mi,[e(`p`,Ni,i(t.$t(`codingBridge.history.intro`)),1),a(b,{size:`small`,round:``,loading:t.loading,onClick:t.refresh},{default:m(()=>[t.loading?o(``,!0):(v(),p(y,{key:0,class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`})),r(` `+i(t.$t(`codingBridge.history.refresh`)),1)]),_:1},8,[`loading`,`onClick`])]),t.providerOptions.length>1?(v(),s(`div`,Pi,[(v(!0),s(l,null,g(t.providerOptions,r=>(v(),s(`button`,{key:r.value,type:`button`,class:n([`chip`,{"chip--active":t.isSelected(r.value)}]),"aria-pressed":t.isSelected(r.value),onClick:e=>t.toggle(r.value)},[r.icon?(v(),s(`img`,{key:0,src:r.icon.src,class:n([`provider-icon`,{"provider-icon--invert":r.icon.invertOnDark}]),alt:``,"aria-hidden":`true`},null,10,Ii)):(v(),p(x,{key:1,class:`provider-icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`})),e(`span`,null,i(r.label),1),e(`span`,Li,i(r.count),1)],10,Fi))),128)),t.selectedProviders.length?(v(),s(`button`,{key:0,type:`button`,class:`chip-clear`,onClick:c[0]||=(...e)=>t.clearFilter&&t.clearFilter(...e)},i(t.$t(`codingBridge.history.filterAll`)),1)):o(``,!0)])):o(``,!0),t.currentNodeId?t.loading&&!t.allSessions.length?(v(),s(`div`,zi,i(t.$t(`codingBridge.history.loading`)),1)):t.allSessions.length?t.sessions.length?(v(),s(`ul`,Ui,[(v(!0),s(l,null,g(t.sessions,r=>(v(),s(`li`,{key:r.provider+`:`+r.session_id,class:`item rounded-lg p-3 cursor-pointer border border-[var(--app-border-subtle)]`,onClick:e=>t.open(r)},[e(`div`,Gi,[t.providerIcon(r.provider)?(v(),s(`img`,{key:0,src:t.providerIcon(r.provider).src,class:n([`provider-icon`,{"provider-icon--invert":t.providerIcon(r.provider).invertOnDark}]),alt:t.providerLabel(r.provider)},null,10,Ki)):(v(),p(x,{key:1,class:`provider-icon`,title:t.providerLabel(r.provider),size:`1em`,"aria-hidden":`true`,focusable:`false`},null,8,[`title`])),e(`span`,{class:n([`text-sm truncate flex-1`,r.unread?`font-bold`:`font-normal`]),title:r.unread?t.$t(`codingBridge.history.unread`):void 0},i(r.title),11,qi),r.running?(v(),s(`span`,{key:2,class:`running-dot`,title:t.$t(`codingBridge.history.running`)},null,8,Ji)):o(``,!0)]),e(`div`,Yi,[r.cwd?(v(),s(`span`,Xi,i(r.cwd),1)):o(``,!0),r.git_branch?(v(),s(`span`,Zi,` · `+i(r.git_branch),1)):o(``,!0)]),e(`div`,Qi,[r.updated_at?(v(),s(`span`,$i,i(t.formatTime(r.updated_at)),1)):o(``,!0),r.message_count?(v(),s(`span`,ea,` · `+i(t.$t(`codingBridge.history.messages`,{count:r.message_count})),1)):o(``,!0)])],8,Wi))),128))])):(v(),s(`div`,Vi,[e(`p`,Hi,i(t.$t(`codingBridge.history.filterEmpty`)),1),a(b,{class:`mt-2`,size:`small`,round:``,onClick:t.clearFilter},{default:m(()=>[r(i(t.$t(`codingBridge.history.filterAll`)),1)]),_:1},8,[`onClick`])])):(v(),s(`div`,Bi,i(t.$t(`codingBridge.history.empty`)),1)):(v(),s(`div`,Ri,i(t.$t(`codingBridge.session.noDevice`)),1))])]),_:1},8,[`model-value`,`title`])}var na=y({name:`CodingBridgeIndex`,components:{ElDrawer:w,NodeList:et,SessionView:ri,PairDialog:vi,PermissionDialog:Oi,HistoryDrawer:W(Ai,[[`render`,ta],[`__scopeId`,`data-v-abb16563`]])},data(){return{drawer:!1,pairVisible:!1,historyVisible:!1,initialCode:``}},mounted(){this.$store.dispatch(`codingBridge/connect`),this.$store.dispatch(`codingBridge/getNodes`);let e=this.$route.query.code;typeof e==`string`&&e&&(this.initialCode=e,this.pairVisible=!0),this.restoreFromUrl(),this.handleNotificationDeepLink(),this.cleanUrl()},beforeUnmount(){this.$store.dispatch(`codingBridge/disconnect`)},methods:{openPair(){this.initialCode=``,this.pairVisible=!0},openPairFromDrawer(){this.drawer=!1,this.openPair()},restoreFromUrl(){let e=this.$route.query,t=typeof e.session==`string`?e.session:``,n=typeof e.node==`string`?e.node:``;if(!t||!n)return;let r=e.provider===`codex`||e.provider===`copilot`?e.provider:`claude`;this.$store.commit(`codingBridge/setCurrentNode`,n),this.$store.commit(`codingBridge/setHistoryRef`,{node_id:n,provider:r,session_id:t}),this.$store.dispatch(`codingBridge/getHistory`,n),this.$store.dispatch(`codingBridge/requestSessions`,n)},cleanUrl(){let e=this.$route.query,t=[`session`,`node`,`provider`,`request`,`code`];if(!t.some(t=>t in e))return;let n={...e};t.forEach(e=>delete n[e]),this.$router.replace({query:n}).catch(()=>{})},handleNotificationDeepLink(){let e=this.$route.query.node;typeof e==`string`&&e&&(this.$route.query.session||this.$store.dispatch(`codingBridge/selectNode`,e),this.$store.dispatch(`codingBridge/requestPendingPermissions`,e))}}}),ra={class:`coding-bridge flex flex-row h-full relative`};function ia(e,t,n,r,i,o){let c=u(`node-list`),l=u(`session-view`),d=u(`el-drawer`),f=u(`pair-dialog`),p=u(`permission-dialog`),h=u(`history-drawer`);return v(),s(`div`,ra,[a(c,{class:`sidebar w-[300px] flex-none`,onPair:e.openPair},null,8,[`onPair`]),a(l,{class:`flex-1 min-w-0`,onHistory:t[0]||=t=>e.historyVisible=!0,onDevices:t[1]||=t=>e.drawer=!0}),a(d,{modelValue:e.drawer,"onUpdate:modelValue":t[2]||=t=>e.drawer=t,direction:`ltr`,"with-header":!1,size:`300px`,class:`drawer`},{default:m(()=>[a(c,{onPair:e.openPairFromDrawer},null,8,[`onPair`])]),_:1},8,[`modelValue`]),a(f,{visible:e.pairVisible,"onUpdate:visible":t[3]||=t=>e.pairVisible=t,"initial-code":e.initialCode},null,8,[`visible`,`initial-code`]),a(p),a(h,{visible:e.historyVisible,"onUpdate:visible":t[4]||=t=>e.historyVisible=t},null,8,[`visible`])])}var aa=W(na,[[`render`,ia],[`__scopeId`,`data-v-2879fe0f`]]);export{aa as default};