@acedatacloud/nexior 3.330.14 → 3.330.16
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.
- package/dist/assets/{ApiCodeButton-BRX3Gfod.js → ApiCodeButton-DGSP7Ahw.js} +1 -1
- package/dist/assets/{Artifacts-Dg8HCWOR.js → Artifacts-CCQi-J0V.js} +1 -1
- package/dist/assets/{AskUserQuestionCard-C_zHV1hv.js → AskUserQuestionCard-CXfCSGQH.js} +1 -1
- package/dist/assets/{AudioPreview-CBKA4LPo.js → AudioPreview-BSZ6q1Re.js} +1 -1
- package/dist/assets/{Auth-wzNCtkMU.js → Auth-OUlF2FEi.js} +1 -1
- package/dist/assets/{Bare-Sory1FWf.js → Bare-CRrbqqvN.js} +1 -1
- package/dist/assets/{BotPlaceholder-B-rcGNEa.js → BotPlaceholder-dvhs1bQC.js} +1 -1
- package/dist/assets/{BottomFooter-DaTxY1OT.js → BottomFooter-CQ5nEYsP.js} +1 -1
- package/dist/assets/{Callback-d2_DBZ0u.js → Callback-DH1Y2oEV.js} +1 -1
- package/dist/assets/{CodeSnippet-DwEpmrUP.js → CodeSnippet-C9gya5LN.js} +1 -1
- package/dist/assets/{Console-CAZisROs.js → Console-B2CTGBkn.js} +1 -1
- package/dist/assets/{Consumption-BKTh8N_A.js → Consumption-DRd8XlSO.js} +1 -1
- package/dist/assets/{Conversation-CNOGTzmB.js → Conversation-C6AfJWGs.js} +1 -1
- package/dist/assets/{Conversation-CG2EZ13s.js → Conversation-CJIs7gFe.js} +1 -1
- package/dist/assets/{CopyToClipboard-Cj7FVPfb.js → CopyToClipboard-CMRvafZB.js} +1 -1
- package/dist/assets/{Detail-8wAaLhaZ.js → Detail-DVjhvMQb.js} +2 -2
- package/dist/assets/{Extra-COGAAOhw.js → Extra-CIDqzau_.js} +1 -1
- package/dist/assets/{FilePreview-O2bAYsPu.js → FilePreview-BoqdQ-sh.js} +1 -1
- package/dist/assets/{Hailuo-Ca6Xce0k.js → Hailuo-FU8Biyn9.js} +1 -1
- package/dist/assets/{History-C9QSnPWo.js → History-BEhLCyLr.js} +1 -1
- package/dist/assets/{ImagePreview-B7vOAsZY.js → ImagePreview-CK8FEzsq.js} +1 -1
- package/dist/assets/{ImageWrapper-DFycnjkT.js → ImageWrapper-Dl-ND9vN.js} +1 -1
- package/dist/assets/{Index-Dm4TwRX9.js → Index-9Em-z8F6.js} +1 -1
- package/dist/assets/Index-B0nCyCfC.css +1 -0
- package/dist/assets/{Index-CHLeiRhJ.js → Index-B9bXzB5B.js} +1 -1
- package/dist/assets/{Index-C3kZ-kX3.js → Index-BCUw0bia.js} +1 -1
- package/dist/assets/{Index-Clt5JXZj.js → Index-BJdNiwvV.js} +1 -1
- package/dist/assets/{Index-DUgVvo4x.js → Index-BT1KOZoD.js} +1 -1
- package/dist/assets/{Index-CXDlG56H.js → Index-BTMQTrmL.js} +1 -1
- package/dist/assets/{Index-CbNu3J03.js → Index-BWXbNuSZ.js} +1 -1
- package/dist/assets/{Index-DyV_RNLv.js → Index-BWqHniUn.js} +1 -1
- package/dist/assets/{Index-Cv52o4vY2.js → Index-BcRCVnGK2.js} +1 -1
- package/dist/assets/{Index-CPbw4sYh2.js → Index-BpMGX50C2.js} +1 -1
- package/dist/assets/{Index-BFR57z1n.js → Index-BvSGFjJW.js} +1 -1
- package/dist/assets/{Index-BkeSjjU02.js → Index-C1SoQot32.js} +1 -1
- package/dist/assets/{Index-5VwzY50E.js → Index-C94lfx8C.js} +1 -1
- package/dist/assets/{Index-CNPqBvg3.js → Index-CG3_7xlo.js} +1 -1
- package/dist/assets/{Index-CmlqnqIV.js → Index-COF9SsSp.js} +1 -1
- package/dist/assets/{Index-CDs-CsDk.js → Index-CZAAh5Gp.js} +1 -1
- package/dist/assets/{Index-BHFs2Z6T.js → Index-CqbGxu7b.js} +1 -1
- package/dist/assets/{Index-EWC_-4Z22.js → Index-CsLxqCDP2.js} +1 -1
- package/dist/assets/{Index-Cp6AdK4E2.js → Index-D8-YPlea2.js} +1 -1
- package/dist/assets/{Index-FsXEm4wk.js → Index-DS9DvWKp.js} +1 -1
- package/dist/assets/Index-DaFhLRXk.js +1 -0
- package/dist/assets/{Index-JwOIYChW.js → Index-DdAJi_FC.js} +1 -1
- package/dist/assets/{Index-B5d8AZ8i.js → Index-DyqoeIpV.js} +1 -1
- package/dist/assets/{Index-C_jc6Iu3.js → Index-O1WRNEa_.js} +1 -1
- package/dist/assets/{Index-BChlRTbt.js → Index-bNrxbg6F.js} +1 -1
- package/dist/assets/{Index-DOZVlKpB2.js → Index-hMPB5fh_2.js} +1 -1
- package/dist/assets/{Index-CGqFhx9a.js → Index-m_YUrr7G.js} +1 -1
- package/dist/assets/{Index-CvPnMoR3.js → Index-uo2jLufH.js} +1 -1
- package/dist/assets/{Index-TZe2eSbY2.js → Index-vmt5TvJe2.js} +1 -1
- package/dist/assets/{Index-DE9uL7r3.js → Index-xWsyJ617.js} +1 -1
- package/dist/assets/{Invitees-DSf5M8Ul.js → Invitees-Dj8_HgvU.js} +1 -1
- package/dist/assets/{List-Z3mFYgAE.js → List-B0yYOQF3.js} +1 -1
- package/dist/assets/{List-BqWBMWeq.js → List-Bc7lOsvz.js} +1 -1
- package/dist/assets/{List-DItlVuXc.js → List-Dc3u9_nF.js} +1 -1
- package/dist/assets/{LocalTools-Cp4rJCZn.js → LocalTools-CZgw2hDU.js} +1 -1
- package/dist/assets/{LocalTools-BKgg9dT7.js → LocalTools-Cb_xAl5E.js} +1 -1
- package/dist/assets/{Main-DqhgsZ7O.js → Main-CDDQ8y-U.js} +1 -1
- package/dist/assets/{Message-ZKLGAc3Y.js → Message-sb5Soag3.js} +1 -1
- package/dist/assets/{Model-jcfTzM8Z.js → Model-DsaqN9nI.js} +1 -1
- package/dist/assets/{Navigator-CHwSxtAx.js → Navigator-tIKgiVK2.js} +3 -3
- package/dist/assets/NotFound-DsRKQ4jD.js +1 -0
- package/dist/assets/{Pay-Dh1K0S37.js → Pay-TrEd2MjF.js} +1 -1
- package/dist/assets/{Player-zwBqEOZB.js → Player-BXImnRV7.js} +1 -1
- package/dist/assets/{Poivelle-H6EE7LV7.js → Poivelle-B81t7re-.js} +1 -1
- package/dist/assets/{PromptTextarea-BZzVEzp0.js → PromptTextarea-slaeK0Wc.js} +1 -1
- package/dist/assets/{RealtimeCall-D7WizzWb.js → RealtimeCall-B30hdTUz.js} +1 -1
- package/dist/assets/{ScheduledTasks-BGKJBQxy.js → ScheduledTasks-C228LZCp.js} +1 -1
- package/dist/assets/{Status-Bb7rb-wU.js → Status-P0K-K3sa.js} +1 -1
- package/dist/assets/{Subscribe-WkNiyT8W.js → Subscribe-CJIC3yAj.js} +1 -1
- package/dist/assets/{TabSwitcher-CBn1lXby.js → TabSwitcher-Dqk0M6ce.js} +1 -1
- package/dist/assets/Tts-BqnaHILF.js +1 -0
- package/dist/assets/{Tts-BSvobljf.css → Tts-kj8c15qm.css} +1 -1
- package/dist/assets/{VideoPlayer-DjTOVu3k.js → VideoPlayer-B8aq6dKu.js} +1 -1
- package/dist/assets/{alert-C7QGfkoV.js → alert-BiY3OD0p.js} +1 -1
- package/dist/assets/arrow-down-CB-fuXIe.js +1 -0
- package/dist/assets/{arrow-down-wide-narrow-CqOUB2_T.js → arrow-down-wide-narrow-rc0DbaXo.js} +1 -1
- package/dist/assets/arrow-left-B5kQWUvN.js +1 -0
- package/dist/assets/arrow-right-FS1nN7uI.js +1 -0
- package/dist/assets/arrow-up-Bncedf94.js +1 -0
- package/dist/assets/{avatar-C7EXtG5k.js → avatar-B7Sg_BXu.js} +1 -1
- package/dist/assets/{basic-p5oE4uhU.js → basic-CjP7vRV7.js} +1 -1
- package/dist/assets/{box-LFSExYvo.js → box-BQ7-g5pH.js} +1 -1
- package/dist/assets/{boxes-CHyiVUAq.js → boxes-D0jlaEYy.js} +1 -1
- package/dist/assets/{brain-pzTUYtJ8.js → brain-SPs9CzlV.js} +1 -1
- package/dist/assets/{chart-no-axes-combined-CLv4sANq.js → chart-no-axes-combined-Cr00rIti.js} +1 -1
- package/dist/assets/{chat-D0_9U7oh.js → chat-B-h1NSzT.js} +1 -1
- package/dist/assets/check-CtBkgelb.js +1 -0
- package/dist/assets/chevron-down-CUOysLkQ.js +1 -0
- package/dist/assets/chevron-right-BmqV9saW.js +1 -0
- package/dist/assets/circle-check-Cv27UPw3.js +1 -0
- package/dist/assets/clock-BkUz3x1Q.js +1 -0
- package/dist/assets/{codingBridge-Dp_X5q3d.js → codingBridge-nf6Uscbm.js} +1 -1
- package/dist/assets/{codingBridgeNotify-DBhuGIqr.js → codingBridgeNotify-jdc9sha6.js} +2 -2
- package/dist/assets/{coins-D1xk529H.js → coins-CndR9V6r.js} +1 -1
- package/dist/assets/{collapse-8je9FCkC.js → collapse-CTgn6Ihn.js} +1 -1
- package/dist/assets/{constants-5yqYfrOy.js → constants-BnLsIjUW.js} +1 -1
- package/dist/assets/{copy-B-d8nGol.js → copy-Dxj0t_Ws.js} +1 -1
- package/dist/assets/{createTaskActions-bYsaNIz_.js → createTaskActions-qZJXmEQl.js} +1 -1
- package/dist/assets/{digitalhuman-BLvo3tXb.js → digitalhuman-Dwo6EMGw.js} +1 -1
- package/dist/assets/{dollar-sign-CCjaGNQ7.js → dollar-sign-Bq_dqxff.js} +1 -1
- package/dist/assets/{download-Berp-ITP.js → download-BN3yYMcY.js} +1 -1
- package/dist/assets/{drawer-DQSt977w.js → drawer-ia4Su9NX.js} +1 -1
- package/dist/assets/{dropdown-BDR5bw-1.js → dropdown-CMgFoiX_.js} +1 -1
- package/dist/assets/{dropdown-Da4offPT.js → dropdown-CSAnEtNs.js} +1 -1
- package/dist/assets/{ellipsis-CLVCjlQA.js → ellipsis-B5o1nrUH.js} +1 -1
- package/dist/assets/{esm-DjMekOZ5.js → esm-C8_mz22l.js} +3 -3
- package/dist/assets/{esm-BoN1arx4.js → esm-CIwweLbX.js} +1 -1
- package/dist/assets/esm-Csspc1Kf.js +1 -0
- package/dist/assets/{esm-BtF4-lDN.js → esm-DlIxvule.js} +1 -1
- package/dist/assets/{esm-BtPBEy8H.js → esm-eMwMIM0P.js} +2 -2
- package/dist/assets/{esm-BWxB8TLE.js → esm-fE5Np9Rd.js} +2 -2
- package/dist/assets/{esm-DW6-YP0g.js → esm-jpVFtTj3.js} +1 -1
- package/dist/assets/{external-link-ByQJeyt3.js → external-link-MjGZt5Hc.js} +1 -1
- package/dist/assets/{eye-DpQ_9qin.js → eye-SSWNou9D.js} +1 -1
- package/dist/assets/{file-output-D7UzrNWR.js → file-output-BOGs_BUc.js} +1 -1
- package/dist/assets/{file-text-lyJ8JxO4.js → file-text-BW4TsEub.js} +1 -1
- package/dist/assets/{fish-DZ5M6i97.js → fish-Cr7s4bxM.js} +1 -1
- package/dist/assets/{flux-Cipgz5Uj.js → flux-DMS_eg6a.js} +1 -1
- package/dist/assets/{folder-C_hhPFr7.js → folder-BH1Ywi1a.js} +1 -1
- package/dist/assets/gauge-Cc_BhTTN.js +1 -0
- package/dist/assets/{globe-IpaUcj9o.js → globe-BdVzn8qp.js} +1 -1
- package/dist/assets/{grokvideo-BU0Bu8gf.js → grokvideo-Bi65gP6s.js} +1 -1
- package/dist/assets/{hailuo-DUQFFmFI.js → hailuo-Da2Gy7fR.js} +1 -1
- package/dist/assets/{headphones-dAvodzhU.js → headphones-B0R5qMlo.js} +1 -1
- package/dist/assets/{history-CYP4LrDC.js → history-DQT16yI0.js} +1 -1
- package/dist/assets/house-CkHqy124.js +1 -0
- package/dist/assets/{i18n-Cb4SL4EL.js → i18n-QtILy3Ue.js} +1 -1
- package/dist/assets/{image-qtS7gaz4.js → image-BGXwtQYd.js} +1 -1
- package/dist/assets/{index-BPHelsDS.js → index-BtNM5W1k.js} +4 -4
- package/dist/assets/{index.browser.esm-BXO5HiFa.js → index.browser.esm-BqbYMh3H.js} +1 -1
- package/dist/assets/{index.es-BklvouYq.js → index.es-CzuQCMKg.js} +1 -1
- package/dist/assets/{info-D4gCndir.js → info-CXWcObeg.js} +1 -1
- package/dist/assets/{input-number-Bqbei97H.js → input-number-g06X3iNk.js} +1 -1
- package/dist/assets/{key-round-nfaMN4o9.js → key-round-BddZHlC3.js} +1 -1
- package/dist/assets/{kling-D2dekPC8.js → kling-8pg4r7wg.js} +1 -1
- package/dist/assets/{languages-DHvmahUC.js → languages-Bsa3sg-k.js} +1 -1
- package/dist/assets/{laptop-cWViA9qk.js → laptop-CEbmOX4O.js} +1 -1
- package/dist/assets/{lightbulb-BzNkEwYt.js → lightbulb-BMPw9KgR.js} +1 -1
- package/dist/assets/{link-CIDEkfDd.js → link-TfquuvKc.js} +1 -1
- package/dist/assets/loader-circle-BiHunPwf.js +1 -0
- package/dist/assets/{luma-B2qqoz0z.js → luma-QXkucEy9.js} +1 -1
- package/dist/assets/{maestro-CoO_WFwk.js → maestro-BGe8OQt1.js} +1 -1
- package/dist/assets/{maestro-BCs2InSC.js → maestro-Cgf6Eb9a.js} +1 -1
- package/dist/assets/{mail-GhvuSQ4A.js → mail-BkZbD9ea.js} +1 -1
- package/dist/assets/{message-circle-DWQZXj8w.js → message-circle-JHwOHaqK.js} +1 -1
- package/dist/assets/{mic-DjCn4kIJ.js → mic-Jj6UjtSQ.js} +1 -1
- package/dist/assets/{midjourney-DRQ9og0r.js → midjourney-BwEBsGPB.js} +1 -1
- package/dist/assets/{mobileLocalExec-B7aVS3ia.js → mobileLocalExec-B-HYX9Pr.js} +2 -2
- package/dist/assets/{mouse-pointer-2-BSv8c2Pl.js → mouse-pointer-2-DGJ3ydu-.js} +1 -1
- package/dist/assets/music-2-g9-CZVl2.js +1 -0
- package/dist/assets/{nanobanana-BAh9dXbe.js → nanobanana-BF2Jf99H.js} +1 -1
- package/dist/assets/{omni-BiXElOGW.js → omni-DS1i2fuy.js} +1 -1
- package/dist/assets/{openaiimage-Bx4ESRQu.js → openaiimage-DdAKj6Z2.js} +1 -1
- package/dist/assets/{pagination-B0flMI-E.js → pagination-B_zJatJQ.js} +1 -1
- package/dist/assets/{pagination-BfLv02mU.js → pagination-C6rVvcPs.js} +1 -1
- package/dist/assets/{palette-BS-JZ0sM.js → palette-DuMApK7s.js} +1 -1
- package/dist/assets/{paperclip-0xbX1ArP.js → paperclip-siQb3iCT.js} +1 -1
- package/dist/assets/{pause-C8RgiBg-.js → pause-Uyj7qw_l.js} +1 -1
- package/dist/assets/{pencil-CLDREILD.js → pencil-CurbnOzl.js} +1 -1
- package/dist/assets/{pika-BMgyEXf0.js → pika-R8PlSot3.js} +1 -1
- package/dist/assets/{pixverse-DfuGwZaL.js → pixverse-CsuvrPFM.js} +1 -1
- package/dist/assets/play-CmMPlLIm.js +1 -0
- package/dist/assets/plus-Dpr8tTBL.js +1 -0
- package/dist/assets/{poivelle-BDQjle-B.js → poivelle-18-xu9Hv.js} +1 -1
- package/dist/assets/{poivelle-BDl71Lw7.js → poivelle-88kaFWFT.js} +1 -1
- package/dist/assets/{poivelle-BHawyBWB.js → poivelle-B7lTsJM3.js} +1 -1
- package/dist/assets/{poivelle-3nkGbPvK.js → poivelle-B96MkzMY.js} +1 -1
- package/dist/assets/{poivelle-DYBKAQeV.js → poivelle-Bah369AQ.js} +1 -1
- package/dist/assets/poivelle-CACRMMFB.js +1 -0
- package/dist/assets/poivelle-CHej6s9b.js +1 -0
- package/dist/assets/poivelle-CSErS1w5.js +1 -0
- package/dist/assets/poivelle-Cb-SSQCO.js +1 -0
- package/dist/assets/poivelle-CgnE3wlG.js +1 -0
- package/dist/assets/poivelle-D10OuNv8.js +1 -0
- package/dist/assets/poivelle-DFUpzmxF.js +1 -0
- package/dist/assets/poivelle-DXhJutmc.js +1 -0
- package/dist/assets/poivelle-DhUS1cZp.js +1 -0
- package/dist/assets/poivelle-Dlri-kAq.js +1 -0
- package/dist/assets/poivelle-DuijnTSP.js +1 -0
- package/dist/assets/poivelle-VtNBMOmD.js +1 -0
- package/dist/assets/poivelle-k1r8qnzs.js +1 -0
- package/dist/assets/poivelle-mee9hZ1A.js +1 -0
- package/dist/assets/{popover-BPpqLv8J.js → popover-CIhBv737.js} +1 -1
- package/dist/assets/{producer-BQ5xYIZZ.js → producer-549zKcDs.js} +1 -1
- package/dist/assets/{qrart-Cgru36b_.js → qrart-D1r1Sl2M.js} +1 -1
- package/dist/assets/{realtime-Ckep7tog.js → realtime-DvN8MBYe.js} +1 -1
- package/dist/assets/{refresh-cw-CNTWZQ-v.js → refresh-cw-ugTK1BC5.js} +1 -1
- package/dist/assets/rotate-ccw-ClQxvlRB.js +1 -0
- package/dist/assets/rotate-cw-COjaKq2D.js +1 -0
- package/dist/assets/{row-CxOqr85Q.js → row-Dx_iV9xr.js} +1 -1
- package/dist/assets/search-DkB3Qh3s.js +1 -0
- package/dist/assets/{seedance-DkDNrirD.js → seedance-DxObGaFn.js} +1 -1
- package/dist/assets/{seedream-CvSw6jtT.js → seedream-Bnw5dxoU.js} +1 -1
- package/dist/assets/{select-EgBrOa7Z.js → select-na7s3bgQ.js} +1 -1
- package/dist/assets/{serp-IPDf4aMl.js → serp-BxpLEGIy.js} +1 -1
- package/dist/assets/{shield-RVq4rWht.js → shield-CiGU20-4.js} +1 -1
- package/dist/assets/{shuffle-CYmH38M0.js → shuffle-CPCMs7ef.js} +1 -1
- package/dist/assets/{slider-BEylZDew.js → slider-BzQ35Y6N.js} +1 -1
- package/dist/assets/{sliders-horizontal-DdmfNDHc.js → sliders-horizontal-DIi7Ojxb.js} +1 -1
- package/dist/assets/{solana-wallets-CTqQ5oUF.js → solana-wallets-FpxMFZId.js} +2 -2
- package/dist/assets/{solana-wallets-vue-1KxN0oeR.js → solana-wallets-vue-BiGaqbvu.js} +1 -1
- package/dist/assets/{sora-DFGuJpN3.js → sora-BUkrHk81.js} +1 -1
- package/dist/assets/{sparkles-j--dkYUz.js → sparkles-j8ZezNam.js} +1 -1
- package/dist/assets/square-Bx6DV4M_.js +1 -0
- package/dist/assets/{suno-Cuk_kSzB.js → suno-C2I0GK72.js} +1 -1
- package/dist/assets/{switch-Cp1bBFDs.js → switch-CAwqW-xW.js} +1 -1
- package/dist/assets/{table-B6gi-vYU.js → table-DGa4FsY2.js} +1 -1
- package/dist/assets/{tabs-BdO_8E5N.js → tabs-C206DNmb.js} +1 -1
- package/dist/assets/{tag-Cab-OdGi.js → tag-BB8eqZ-n.js} +1 -1
- package/dist/assets/{taskDrawerMixin-NeIzaGlu.js → taskDrawerMixin-C6xS_bci.js} +1 -1
- package/dist/assets/terminal-BrlcLpm1.js +1 -0
- package/dist/assets/{time-picker-bDzu5Ew7.js → time-picker-BFtDI-NK.js} +1 -1
- package/dist/assets/{tooltip-v-6ZQ1Xq.js → tooltip-PudHVhJv.js} +1 -1
- package/dist/assets/{trash-2-C0UQy4ZN.js → trash-2-Cz9KBrOE.js} +1 -1
- package/dist/assets/{triangle-alert-Dcpk84rX.js → triangle-alert-Dm3AU2Pk.js} +1 -1
- package/dist/assets/{upload-BeFlKgnR.js → upload-BDgHWid0.js} +1 -1
- package/dist/assets/{upload-BVqyy8Ib.js → upload-C-DZTzCm.js} +1 -1
- package/dist/assets/user-CVGGdNbS.js +1 -0
- package/dist/assets/{veo-59HY2WuX.js → veo-iy2_A-nG.js} +1 -1
- package/dist/assets/{video-ca4LyZ0Z.js → video-BiedsplO.js} +1 -1
- package/dist/assets/{volume-2-rv6rgSUC.js → volume-2-C1Z8oCxa.js} +1 -1
- package/dist/assets/{wallet-f_iiBVLW.js → wallet-3AK1cycc.js} +1 -1
- package/dist/assets/{wan-vdBOUFkE.js → wan-7o3MGuRh.js} +1 -1
- package/dist/assets/{wand-sparkles-Cnpvlamu.js → wand-sparkles-PR0DrnUh.js} +1 -1
- package/dist/assets/{web-BoSIcnLh.js → web-C1_k7v7P.js} +1 -1
- package/dist/assets/{web-BpHH1Itc.js → web-CoOUBSbh.js} +1 -1
- package/dist/assets/{web-BHl1_K3x.js → web-CponquS9.js} +1 -1
- package/dist/assets/{web-DG4oBBB0.js → web-D1KimMnN.js} +1 -1
- package/dist/assets/{web-BtrW9kXj.js → web-ecg_f19V.js} +1 -1
- package/dist/assets/{webextrator-BgqNrh0e.js → webextrator-DfW88e4x.js} +1 -1
- package/dist/assets/{zap-BxH138DE.js → zap-DzPWJlz0.js} +1 -1
- package/dist/index.html +3 -3
- package/package.json +1 -1
- package/dist/assets/Index-C0nVxMEi.css +0 -1
- package/dist/assets/Index-DtfXsPc5.js +0 -1
- package/dist/assets/NotFound-ZDNNDQDS.js +0 -1
- package/dist/assets/Tts-CdHcRIMq.js +0 -1
- package/dist/assets/arrow-down-NIVuEJSW.js +0 -1
- package/dist/assets/arrow-left-B5URN9LH.js +0 -1
- package/dist/assets/arrow-right-B9Fx_vz-.js +0 -1
- package/dist/assets/arrow-up-D5QRF3KA.js +0 -1
- package/dist/assets/check-B9FHm9ko.js +0 -1
- package/dist/assets/chevron-down-BkFtswGE.js +0 -1
- package/dist/assets/chevron-right-Cn8XF8-Y.js +0 -1
- package/dist/assets/circle-check-seVnB56A.js +0 -1
- package/dist/assets/clock-CvrjVzd4.js +0 -1
- package/dist/assets/esm-BhJQRUz3.js +0 -1
- package/dist/assets/gauge-B2_PS-bx.js +0 -1
- package/dist/assets/loader-circle-7kqtS9f8.js +0 -1
- package/dist/assets/music-2-C66q5qzF.js +0 -1
- package/dist/assets/play-SpomQcyQ.js +0 -1
- package/dist/assets/plus-DhNSP4xr.js +0 -1
- package/dist/assets/poivelle-BKNIo3KW.js +0 -1
- package/dist/assets/poivelle-BhmorJKu.js +0 -1
- package/dist/assets/poivelle-BtVTjxx6.js +0 -1
- package/dist/assets/poivelle-Bx0dh9by.js +0 -1
- package/dist/assets/poivelle-CB0hllHC.js +0 -1
- package/dist/assets/poivelle-CM6SlTIJ.js +0 -1
- package/dist/assets/poivelle-CSoaOAqi.js +0 -1
- package/dist/assets/poivelle-CThzSms4.js +0 -1
- package/dist/assets/poivelle-Cmwe3NjT.js +0 -1
- package/dist/assets/poivelle-CsmbOA_P.js +0 -1
- package/dist/assets/poivelle-Ctiextn_.js +0 -1
- package/dist/assets/poivelle-D3yO0lZe.js +0 -1
- package/dist/assets/poivelle-LElOo-0T.js +0 -1
- package/dist/assets/poivelle-a3jCqCKL.js +0 -1
- package/dist/assets/rotate-ccw-B3rWYCft.js +0 -1
- package/dist/assets/rotate-cw-ZuO2gRZM.js +0 -1
- package/dist/assets/search-QN31zscc.js +0 -1
- package/dist/assets/square-BbAAepbi.js +0 -1
- package/dist/assets/terminal-LIuocqRp.js +0 -1
- package/dist/assets/user-BWJQdGH5.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,S as c,T as l,at as u,ht as d,j as f,mt as p,ot as m,rt as h,st as ee,tt as g,z as _}from"./vendor-chart-Dw-P17PN.js";import{t as v}from"./upload-BeFlKgnR.js";import{t as y}from"./checkbox-CeoqKfX8.js";import{t as b}from"./drawer-DQSt977w.js";import{n as x,r as S,t as C}from"./dropdown-Da4offPT.js";import{t as w}from"./popover-BPpqLv8J.js";import{n as T,t as E}from"./skeleton-B3LIGUiE.js";import{t as D}from"./arrow-right-B9Fx_vz-.js";import{t as O}from"./arrow-up-D5QRF3KA.js";import{t as te}from"./brain-pzTUYtJ8.js";import{t as k}from"./check-B9FHm9ko.js";import{t as ne}from"./chevron-down-BkFtswGE.js";import{n as A,t as re}from"./CodeSnippet-DwEpmrUP.js";import{t as ie}from"./eye-DpQ_9qin.js";import{t as ae}from"./file-text-lyJ8JxO4.js";import{n as j,t as M}from"./shield-RVq4rWht.js";import{t as oe}from"./folder-C_hhPFr7.js";import{t as se}from"./gauge-B2_PS-bx.js";import{t as N}from"./history-CYP4LrDC.js";import{t as P}from"./info-D4gCndir.js";import{t as F}from"./laptop-cWViA9qk.js";import{t as I}from"./link-CIDEkfDd.js";import{t as L}from"./loader-circle-7kqtS9f8.js";import{i as R,n as ce,t as z}from"./AskUserQuestionCard-C_zHV1hv.js";import{t as le}from"./paperclip-0xbX1ArP.js";import{t as B}from"./pencil-CLDREILD.js";import{t as V}from"./plus-DhNSP4xr.js";import{t as H}from"./rotate-cw-ZuO2gRZM.js";import{t as ue}from"./search-QN31zscc.js";import{t as de}from"./square-BbAAepbi.js";import{t as fe}from"./terminal-LIuocqRp.js";import{t as pe}from"./trash-2-C0UQy4ZN.js";import{Ci as U,E as W,Mi as G,Ut as me,Vi as K,_i as he,ai as ge,fi as _e,gi as q,hi as J,ni as Y,qt as ve,vi as X}from"./index-BPHelsDS.js";import"./vendor-highlight-BtIeKitL.js";import{t as ye}from"./CopyToClipboard-Cj7FVPfb.js";import{s as be,t as xe}from"./codingBridgeNotify-DBhuGIqr.js";var Se=q(`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`}]]),Ce=q(`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`}]]),we=q(`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`}]]),Te=_({name:`CodingBridgeNotificationToggle`,components:{LoadingIcon:L,NotificationIcon:Ce,NotificationOffIcon:Se,ElButton:G},data(){return{enabled:!1,busy:!1}},computed:{supported(){return _e()||be()}},mounted(){this.enabled=!_e()&&xe()===`granted`},methods:{async onToggle(){this.busy=!0;try{if(this.enabled){await this.$store.dispatch(`codingBridge/disableNotifications`),this.enabled=!1,X.success(this.$t(`codingBridge.notify.disabled`));return}let e=await this.$store.dispatch(`codingBridge/enableNotifications`);e===`enabled`?(this.enabled=!0,X.success(this.$t(`codingBridge.notify.enabled`))):e===`denied`?X.warning(this.$t(`codingBridge.notify.denied`)):X.warning(this.$t(`codingBridge.notify.unsupported`))}catch{X.error(this.$t(`codingBridge.notify.failed`))}finally{this.busy=!1}}}});function Ee(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?(g(),f(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:p(()=>[e.busy?(g(),f(s,{key:0,class:`adc-icon-spin`,size:`1em`,"aria-hidden":`true`,focusable:`false`})):e.enabled?(g(),f(c,{key:1,size:`1em`,"aria-hidden":`true`,focusable:`false`})):(g(),f(l,{key:2,size:`1em`,"aria-hidden":`true`,focusable:`false`}))]),_:1},8,[`type`,`title`,`disabled`,`aria-label`,`onClick`])):o(``,!0)}var De=_({name:`CodingBridgeNodeList`,components:{AddIcon:V,DeleteIcon:pe,DesktopIcon:R,DeveloperIcon:F,RedoIcon:H,ElButton:G,NotificationToggle:W(Te,[[`render`,Ee]])},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 onDelete(e){try{await he.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),X.success(this.$t(`codingBridge.nodeList.removeSuccess`))}catch{X.error(this.$t(`codingBridge.nodeList.removeFailed`))}}}}),Oe={class:`node-list flex flex-col h-full bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]`},ke={class:`flex items-center justify-between px-4 py-3 border-b border-[var(--app-border-subtle)]`},Ae={class:`flex items-center gap-2 font-medium`},je={class:`flex items-center gap-1`},Me={class:`flex items-center gap-2 px-4 py-2 text-xs border-b border-[var(--app-border-subtle)]`},Ne={class:`text-[var(--app-text-subtle)]`},Pe={class:`flex-1 overflow-y-auto`},Fe={key:0,class:`p-6 text-center text-sm text-[var(--app-text-subtle)]`},Ie={class:`mb-3`},Le={key:1,class:`list-none m-0 p-0`},Re=[`onClick`],ze={class:`flex-1 min-w-0`},Be={class:`flex items-center gap-2`},Ve={class:`truncate font-medium`},He=[`title`],Ue={class:`text-xs text-[var(--app-text-subtle)] truncate`};function We(o,c,d,f,m,ee){let _=u(`developer-icon`),v=u(`notification-toggle`),y=u(`redo-icon`),b=u(`el-button`),x=u(`add-icon`),S=u(`desktop-icon`),C=u(`delete-icon`);return g(),s(`div`,Oe,[e(`div`,ke,[e(`div`,Ae,[a(_,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,null,i(o.$t(`codingBridge.nodeList.title`)),1)]),e(`div`,je,[a(v),a(b,{circle:``,size:`small`,"aria-label":o.$t(`codingBridge.nodeList.refresh`),title:o.$t(`codingBridge.nodeList.refresh`),onClick:o.onRefresh},{default:p(()=>[a(y,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`,`onClick`]),a(b,{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:p(()=>[a(x,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`])])]),e(`div`,Me,[e(`span`,{class:n([`inline-block w-2 h-2 rounded-full`,o.connectionDotClass])},null,2),e(`span`,Ne,i(o.connectionLabel),1)]),e(`div`,Pe,[o.nodes.length?(g(),s(`ul`,Le,[(g(!0),s(l,null,h(o.nodes,r=>(g(),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(S,{class:`text-[var(--app-text-subtle)]`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`div`,ze,[e(`div`,Be,[e(`span`,Ve,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,He)]),e(`div`,Ue,i(r.status===`online`?o.$t(`codingBridge.status.online`):o.$t(`codingBridge.status.offline`)),1)]),a(b,{class:`opacity-0 group-hover:opacity-100`,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:p(()=>[a(C,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`,`onClick`])],10,Re))),128))])):(g(),s(`div`,Fe,[e(`p`,Ie,i(o.$t(`codingBridge.nodeList.empty`)),1),a(b,{type:`primary`,round:``,size:`small`,onClick:c[1]||=e=>o.$emit(`pair`)},{default:p(()=>[a(x,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(o.$t(`codingBridge.nodeList.pairFirst`)),1)]),_:1})]))])])}var Ge=W(De,[[`render`,We]]),Ke=e=>{let t=e?.questions;return Array.isArray(t)&&t.length>0&&t.every(e=>e&&typeof e.question==`string`&&Array.isArray(e.options))},qe=e=>e?(e.tool||``).toLowerCase()===`askuserquestion`?!0:Ke(e.input):!1,Je=e=>({questions:e.input?.questions??[]}),Ye=100,Z=4e4,Xe=12e3,Ze=6e3,Q=(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 ···`},Qe=_({name:`CodingBridgeTranscriptItem`,directives:{highlight:ve},components:{CloseIcon:J,ConfirmIcon:k,EditIcon:B,FileIcon:j,InfoIcon:P,VueMarkdown:ce,CodeSnippet:re,CopyToClipboard:ye},props:{event:{type:Object,required:!0},editable:{type:Boolean,default:!1}},emits:[`edit`],data(){return{renderedText:Q(this.event.text||``,Z),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 Q(n,Ze)}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.commandText)return fe;let e=(this.event.tool??``).toLowerCase();return/read|cat|view/.test(e)?ae:/write|edit|create|update|insert/.test(e)?B:/grep|glob|search|find|list/.test(e)?ue:A},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}))},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 Q(JSON.stringify(t,null,2),Ze)}catch{return Q(String(e),Ze)}},thinkingText(){return Q(this.event.text||``,Z)},resultText(){let e=this.event.content;return typeof e==`string`&&e.length>0?e:`—`},resultDisplay(){return Q(this.resultText,Xe)},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=Q(this.event.text||``,Z)},Ye)},flushRender(){this.streamTimer&&=(window.clearTimeout(this.streamTimer),0),this.renderedText=Q(this.event.text||``,Z)}}}),$e={key:0,class:`group flex items-end justify-end gap-1.5`},et=[`title`,`aria-label`],tt={class:`max-w-[85%] rounded-lg px-3 py-2 bg-[var(--el-color-primary)] text-white whitespace-pre-wrap break-words`},nt=[`src`],rt=[`href`],it=[`src`],at={key:1,class:`flex h-9 w-9 items-center justify-center rounded bg-white/15`},ot={class:`min-w-0 truncate`},st={key:2},ct={key:2,class:`whitespace-pre-wrap break-words italic text-[var(--app-text-subtle)] border-l-2 border-[var(--app-border-subtle)] pl-3`},lt={key:3,class:`overflow-hidden rounded-md bg-[var(--app-sidebar-bg)] border border-[var(--app-border-subtle)]`},ut={class:`flex items-center gap-2 px-2.5 py-1.5 font-medium text-[var(--app-text-subtle)]`},dt={key:0,class:`min-w-0 truncate text-xs font-normal opacity-70`},ft={key:0,class:`flex flex-col gap-1.5 px-2.5 pb-2`},pt={key:0,class:`font-medium text-[var(--app-text)]`},mt={class:`whitespace-pre-wrap break-words text-[var(--app-text-subtle)]`},ht={key:1,class:`px-2.5 pb-2`},gt={key:2,class:`px-2.5 pb-2 font-mono text-xs break-all text-[var(--app-text-subtle)]`},_t={key:3,class:`px-2.5 pb-2`},vt={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`},yt={key:5,class:`flex items-center gap-2 text-xs text-[var(--app-text-subtle)]`},bt={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`},xt={class:`whitespace-pre-wrap break-words`},St={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 Ct(t,r,c,p,_,v){let y=u(`edit-icon`),b=u(`file-icon`),x=u(`vue-markdown`),S=u(`code-snippet`),C=u(`copy-to-clipboard`),w=u(`close-icon`),T=u(`confirm-icon`),E=u(`info-icon`),D=m(`highlight`);return g(),s(`div`,{class:n([`transcript-item text-sm leading-relaxed`,`kind-${t.event.kind}`])},[t.event.kind===`prompt`?(g(),s(`div`,$e,[t.editable?(g(),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(y,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,et)):o(``,!0),e(`div`,tt,[t.event.images&&t.event.images.length?(g(),s(`div`,{key:0,class:n([`flex flex-wrap gap-1.5`,{"mb-1.5":t.event.text||t.hasAttachments}])},[(g(!0),s(l,null,h(t.event.images,(e,t)=>(g(),s(`img`,{key:t,src:e,class:`w-16 h-16 rounded object-cover`,alt:``},null,8,nt))),128))],2)):o(``,!0),t.hasAttachments?(g(),s(`div`,{key:1,class:n([`flex flex-wrap gap-1.5`,{"mb-1.5":t.event.text}])},[(g(!0),s(l,null,h(t.event.attachments,(t,n)=>(g(),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`?(g(),s(`img`,{key:0,src:t.url,class:`h-9 w-9 rounded object-cover`,alt:``},null,8,it)):(g(),s(`span`,at,[a(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`})])),e(`span`,ot,i(t.name||t.url),1)],8,rt))),128))],2)):o(``,!0),t.event.text?(g(),s(`span`,st,i(t.event.text),1)):o(``,!0)])])):t.event.kind===`text`?(g(),s(`div`,{key:1,class:n([`cb-stream-text`,{"is-streaming":t.event.streaming}])},[d(a(x,{source:t.renderedText,class:`markdown-body bg-transparent text-[var(--app-text)]`},null,8,[`source`]),[[D]])],2)):t.event.kind===`thinking`?(g(),s(`div`,ct,i(t.thinkingText),1)):t.event.kind===`tool_use`?(g(),s(`div`,lt,[e(`div`,ut,[(g(),f(ee(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?(g(),s(`span`,dt,i(t.toolDescription),1)):o(``,!0)]),t.questionLines.length?(g(),s(`div`,ft,[(g(!0),s(l,null,h(t.questionLines,(t,n)=>(g(),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?(g(),s(`div`,pt,i(t.header),1)):o(``,!0),e(`div`,mt,i(t.question),1)]))),128))])):t.commandText?(g(),s(`div`,ht,[a(S,{code:t.commandText,lang:`bash`,copyable:``},null,8,[`code`])])):t.filePath?(g(),s(`div`,gt,i(t.filePath),1)):t.inputText?(g(),s(`div`,_t,[a(S,{code:t.inputText,lang:`json`,copyable:``},null,8,[`code`])])):o(``,!0)])):t.event.kind===`tool_result`?(g(),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?(g(),s(`div`,vt,[a(C,{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`?(g(),s(`div`,yt,[t.event.is_error?(g(),f(w,{key:0,size:`1em`,"aria-hidden":`true`,focusable:`false`})):(g(),f(T,{key:1,size:`1em`,"aria-hidden":`true`,focusable:`false`})),e(`span`,null,i(t.resultLabel),1)])):t.event.kind===`notice`?(g(),s(`div`,bt,[a(E,{class:`mt-0.5 flex-none text-[var(--el-color-primary)]`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,xt,i(t.noticeText),1)])):t.event.kind===`error`?(g(),s(`div`,St,i(t.event.text),1)):o(``,!0)],2)}var wt=W(Qe,[[`render`,Ct],[`__scopeId`,`data-v-2028b19a`]]),Tt=`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(`.`),Et=[`思考中`,`酝酿中`,`沉思中`,`推敲中`,`构思中`,`计算中`,`琢磨中`,`捣鼓中`,`炼制中`,`召唤中`,`编织中`,`烹饪中`,`咀嚼中`,`盘算中`,`发酵中`,`运转中`,`冥想中`,`鼓捣中`,`熬制中`,`神游中`,`演算中`,`雕琢中`,`头脑风暴中`,`反复斟酌中`],Dt=60,Ot=1500,kt=28,At=_({name:`CodingBridgeThinkingIndicator`,components:{LoadingIcon:L},data(){return{display:``,elapsed:0,charIndex:0,phase:`typing`,currentWord:``,elapsedTimer:0,typeTimer:0}},computed:{words(){return this.$i18n.locale.startsWith(`zh`)?Et:Tt}},mounted(){this.currentWord=this.pickWord(),this.elapsedTimer=window.setInterval(()=>{this.elapsed+=1},1e3),this.scheduleType(Dt)},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(Ot)):this.scheduleType(Dt)):this.phase===`holding`?(this.phase=`deleting`,this.scheduleType(kt)):(--this.charIndex,this.display=e.slice(0,Math.max(0,this.charIndex)),this.charIndex<=0?(this.currentWord=this.pickWord(),this.phase=`typing`,this.scheduleType(Dt)):this.scheduleType(kt))}}}),jt={class:`cb-thinking flex items-center gap-2 text-sm text-[var(--app-text-subtle)] py-1`},Mt={class:`cb-thinking__word`},Nt={class:`cb-thinking__elapsed tabular-nums opacity-60`};function Pt(t,n,o,c,l,d){let f=u(`loading-icon`);return g(),s(`div`,jt,[a(f,{class:`cb-thinking__spinner adc-icon-spin text-[var(--el-color-primary)]`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,Mt,[r(i(t.display),1),n[0]||=e(`span`,{class:`cb-thinking__caret`},`▋`,-1)]),e(`span`,Nt,`(`+i(t.elapsed)+`s)`,1)])}var Ft=W(At,[[`render`,Pt],[`__scopeId`,`data-v-ae116215`]]),It=_({name:`CodingBridgeDirectoryDialog`,components:{ContinueIcon:D,FileIcon:j,FolderIcon:oe,RedoIcon:H,UpIcon:O,ElDialog:U,ElButton:G,ElInput:K},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))}}}),Lt={class:`flex flex-col gap-2`},Rt={class:`flex items-center gap-2 min-w-0`},zt={class:`h-72 overflow-y-auto border border-[var(--app-border-subtle)] rounded-md divide-y divide-[var(--app-border-subtle)]`},Bt={key:0,class:`h-full flex items-center justify-center text-sm text-[var(--app-text-subtle)]`},Vt={key:1,class:`h-full flex items-center justify-center text-sm text-[var(--el-color-danger)]`},Ht=[`onClick`],Ut={class:`truncate`,dir:`ltr`},Wt={class:`truncate`,dir:`ltr`},Gt={key:0,class:`h-full flex items-center justify-center text-sm text-[var(--app-text-subtle)] py-8`},Kt={key:0,class:`text-[11px] text-[var(--app-text-subtle)] px-1`},qt={class:`flex items-center justify-end gap-2`};function Jt(t,d,m,ee,_,v){let y=u(`up-icon`),b=u(`el-button`),x=u(`continue-icon`),S=u(`el-input`),C=u(`redo-icon`),w=u(`folder-icon`),T=u(`file-icon`),E=u(`el-dialog`);return g(),f(E,{"model-value":t.visible,title:t.$t(`codingBridge.directory.title`),width:`520px`,"append-to-body":``,"onUpdate:modelValue":t.onVisibleChange,onOpen:t.onOpen},{footer:p(()=>[e(`div`,qt,[a(b,{round:``,onClick:d[1]||=e=>t.onVisibleChange(!1)},{default:p(()=>[r(i(t.$t(`common.button.cancel`)),1)]),_:1}),a(b,{type:`primary`,round:``,disabled:!t.listing||!!t.listing.error,onClick:t.chooseCurrent},{default:p(()=>[r(i(t.$t(`codingBridge.directory.choose`)),1)]),_:1},8,[`disabled`,`onClick`])])]),default:p(()=>[e(`div`,Lt,[e(`div`,Rt,[a(b,{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:p(()=>[a(y,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`disabled`,`title`,`aria-label`,`onClick`]),a(S,{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:p(()=>[a(b,{title:t.$t(`codingBridge.directory.go`),disabled:t.loading||!t.pathInput.trim(),"aria-label":t.$t(`codingBridge.directory.go`),onClick:t.goPath},{default:p(()=>[a(x,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`title`,`disabled`,`aria-label`,`onClick`])]),_:1},8,[`modelValue`,`placeholder`,`disabled`,`onKeyup`,`onBlur`]),a(b,{size:`small`,circle:``,disabled:t.loading,title:t.$t(`codingBridge.directory.refresh`),"aria-label":t.$t(`codingBridge.directory.refresh`),onClick:t.refresh},{default:p(()=>[a(C,{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`,zt,[t.loading&&!t.listing?(g(),s(`div`,Bt,i(t.$t(`codingBridge.directory.loading`)),1)):t.listing&&t.listing.error?(g(),s(`div`,Vt,i(t.listing.error),1)):(g(),s(l,{key:2},[(g(!0),s(l,null,h(t.directories,n=>(g(),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(w,{class:`text-[var(--el-color-warning)]`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,Ut,i(n.name),1)],8,Ht))),128)),(g(!0),s(l,null,h(t.files,t=>(g(),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(T,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,Wt,i(t.name),1)]))),128)),t.isEmpty?(g(),s(`div`,Gt,i(t.$t(`codingBridge.directory.empty`)),1)):o(``,!0)],64))]),t.listing&&t.listing.truncated?(g(),s(`p`,Kt,i(t.$t(`codingBridge.directory.truncated`)),1)):o(``,!0)])]),_:1},8,[`model-value`,`title`,`onUpdate:modelValue`,`onOpen`])}var Yt=W(It,[[`render`,Jt]]),Xt=`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`,Zt=`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`,Qt=`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`,$t=50*1024*1024,$=10,en=60,tn=60,nn={claude:{src:Xt,invertOnDark:!1},codex:{src:Zt,invertOnDark:!0},copilot:{src:Qt,invertOnDark:!0}},rn=_({name:`CodingBridgeSessionView`,components:{AddIcon:V,AiIcon:te,AttachmentIcon:le,CloseIcon:J,CodeIcon:A,ConfirmIcon:k,DeveloperIcon:F,EditIcon:B,ExpandDownIcon:ne,FileIcon:j,FolderOpenIcon:we,HistoryIcon:N,PerformanceIcon:se,RedoIcon:H,SecurityIcon:M,StopIcon:de,UpIcon:O,ViewIcon:ie,ElInput:K,ElButton:G,ElPopover:w,ElDropdown:C,ElDropdownMenu:S,ElDropdownItem:x,ElUpload:v,ElCheckbox:y,ElSkeleton:E,ElSkeletonItem:T,TranscriptItem:wt,ThinkingIndicator:Ft,DirectoryDialog:Yt,AskUserQuestionCard:z,CopyToClipboard:ye},mixins:[me],emits:[`history`,`devices`],data(){return{prompt:``,cwd:``,model:``,customModelDraft:``,permissionMode:`bypassPermissions`,provider:`claude`,effort:``,directoryVisible:!1,slashMenuOpen:!1,slashActiveIndex:0,editingEventId:``,restoreCode:!1,attachmentFileList:[],uploadUrl:ge()+`/api/v1/files/`,maxAttachments:$,visibleCount:en}},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]??[]:[]},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===Y.Request},pendingQuestion(){let e=this.currentSessionId;if(!e)return;let t=(this.$store.state.codingBridge?.permissions??[]).find(t=>t.session_id===e&&qe(t));return t?{request_id:t.request_id,payload:Je(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))},canSend(){return(!!this.prompt.trim()||this.attachments.length>0)&&!this.uploadingAttachments&&this.connected&&this.nodeOnline},composerHint(){return 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:{events(){this.scrollToBottom()},pendingQuestion(){this.scrollToBottom()},thinking(){this.scrollToBottom()},currentSessionId(){this.scrollToBottom(),this.visibleCount=en,this.editingEventId=``,this.restoreCode=!1,this.syncSessionSettings()},currentNodeId(){this.requestCapabilities(),this.isNewSession&&this.restoreComposerPrefs()},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()},methods:{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 nn[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;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.prompt=``,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>=$?(X.warning(this.$t(`codingBridge.session.attachmentLimit`,{count:$})),!1):e.size>$t?(X.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(){X.error(this.$t(`codingBridge.session.attachmentUploadError`))},onAttachmentExceed(){X.warning(this.$t(`codingBridge.session.attachmentLimit`,{count:$}))},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.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(){this.$nextTick(()=>{let e=this.$refs.transcript;e&&(e.scrollTop=e.scrollHeight)})},loadEarlier(){let e=this.$refs.transcript,t=e?.scrollHeight??0;this.visibleCount+=tn,this.$nextTick(()=>{e&&(e.scrollTop=e.scrollHeight-t+e.scrollTop)})}}}),an={class:`session-view flex flex-col h-full bg-[var(--app-content-bg)]`},on={key:0,class:`flex-1 flex flex-col items-center justify-center text-center p-8 text-[var(--app-text-subtle)]`},sn={class:`text-sm`},cn={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`},un=[`title`,`aria-label`],dn={class:`min-w-0`},fn={class:`flex items-center gap-2 font-medium`},pn={class:`truncate`},mn={key:0,class:`text-xs text-[var(--app-text-subtle)] truncate`},hn={key:0,class:`text-[var(--el-color-primary)]`},gn={class:`flex items-center gap-2 flex-none`},_n={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)]`},vn={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)]`},yn={class:`opacity-70 flex-none`},bn=[`title`],xn={ref:`transcript`,class:`flex-1 min-h-0 overflow-y-auto px-5 py-4 flex flex-col gap-3`},Sn={key:0,class:`cb-skeleton`},Cn={class:`flex flex-col gap-4`},wn={class:`flex justify-end`},Tn={class:`flex flex-col gap-1.5`},En={class:`flex justify-end`},Dn={class:`flex flex-col gap-1.5`},On={key:1,class:`m-auto text-center text-sm text-[var(--app-text-subtle)]`},kn=[`title`],An={key:4,class:`flex justify-center pt-1`},jn={key:2,class:`cb-question-dock flex-none px-5`},Mn={class:`border-t border-[var(--app-border-subtle)] p-3`},Nn={key:0,class:`flex items-center gap-2 text-xs text-[var(--app-text-subtle)] px-1 py-2`},Pn={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)]`},Fn={class:`inline-flex items-center gap-1.5`},In={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)]`},Ln={key:0,class:`flex flex-wrap gap-2 pb-2`},Rn=[`src`,`alt`],zn={key:1,class:`flex h-8 w-8 items-center justify-center rounded bg-[var(--app-content-bg)]`},Bn=[`title`],Vn={key:2,class:`text-[10px] text-[var(--app-text-subtle)]`},Hn=[`title`,`aria-label`,`onClick`],Un={key:1,class:`cb-slash-menu`},Wn=[`onMousedown`,`onMouseenter`],Gn={class:`cb-slash-menu__name`},Kn={key:0,class:`cb-slash-menu__hint`},qn={key:1,class:`cb-slash-menu__desc`},Jn={ref:`attachmentUploadTrigger`,class:`block h-0 w-0`,"aria-hidden":`true`},Yn={class:`mt-1.5 flex items-center gap-1.5`},Xn=[`title`,`aria-label`],Zn={class:`flex min-w-0 flex-1 flex-wrap items-center gap-1.5`},Qn={type:`button`,class:`cb-pill`},$n=[`src`],er={class:`truncate`},tr=[`src`],nr={key:1,class:`ml-1 text-xs opacity-60`},rr={key:1,class:`cb-pill cb-pill--static`},ir=[`src`],ar={class:`truncate`},or={type:`button`,class:`cb-pill`},sr={class:`truncate`},cr={class:`cb-model-menu`},lr={class:`truncate`},ur=[`onClick`],dr={class:`truncate`},fr={key:0,class:`cb-model-custom`},pr={type:`button`,class:`cb-pill`},mr={class:`truncate`},hr={type:`button`,class:`cb-pill`},gr={class:`truncate`},_r={type:`button`,class:`cb-pill`},vr={class:`truncate`},yr=[`title`,`aria-label`],br={key:4,class:`cb-pill cb-pill--static`},xr={class:`truncate`},Sr={class:`text-[11px] text-[var(--app-text-subtle)] mt-1 px-1`};function Cr(d,m,ee,_,v,y){let b=u(`developer-icon`),x=u(`el-button`),S=u(`history-icon`),C=u(`add-icon`),w=u(`copy-to-clipboard`),T=u(`el-skeleton-item`),E=u(`el-skeleton`),D=u(`up-icon`),O=u(`transcript-item`),te=u(`thinking-indicator`),k=u(`redo-icon`),ne=u(`ask-user-question-card`),A=u(`view-icon`),re=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(`code-icon`),P=u(`expand-down-icon`),F=u(`confirm-icon`),I=u(`el-dropdown-item`),L=u(`el-dropdown-menu`),R=u(`el-dropdown`),ce=u(`ai-icon`),z=u(`el-popover`),le=u(`performance-icon`),B=u(`security-icon`),V=u(`folder-open-icon`),H=u(`stop-icon`),ue=u(`directory-dialog`);return g(),s(`div`,an,[d.currentNode?(g(),s(l,{key:1},[e(`div`,cn,[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:m[1]||=e=>d.$emit(`devices`)},[a(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,un),e(`div`,dn,[e(`div`,fn,[e(`span`,pn,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?(g(),s(`div`,mn,[e(`span`,null,i(d.sessionMeta),1),d.replayLabel?(g(),s(`span`,hn,` · `+i(d.replayLabel),1)):o(``,!0)])):o(``,!0)])]),e(`div`,gn,[a(x,{size:`small`,round:``,onClick:m[2]||=e=>d.$emit(`history`)},{default:p(()=>[a(S,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(d.$t(`codingBridge.history.button`)),1)]),_:1}),d.currentSessionId?(g(),f(x,{key:0,size:`small`,round:``,onClick:d.onNewSession},{default:p(()=>[a(C,{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):(g(),s(`div`,_n,i(d.$t(`codingBridge.session.deviceOffline`)),1)),d.diagnostics.length?(g(),s(`div`,vn,[(g(!0),s(l,null,h(d.diagnostics,t=>(g(),s(`span`,{key:t.label,class:`inline-flex items-center gap-1 min-w-0`},[e(`span`,yn,i(t.label)+`:`,1),e(`span`,{class:`font-mono break-all`,title:t.value},i(t.value),9,bn),a(w,{content:t.value,class:`inline-block flex-none`},null,8,[`content`])]))),128))])):o(``,!0),e(`div`,xn,[d.historyLoading&&!d.events.length?(g(),s(`div`,Sn,[a(E,{animated:``},{template:p(()=>[e(`div`,Cn,[e(`div`,wn,[a(T,{variant:`rect`,class:`cb-sk cb-sk--user`})]),e(`div`,Tn,[a(T,{variant:`text`,style:{width:`55%`}}),a(T,{variant:`text`,style:{width:`88%`}}),a(T,{variant:`text`,style:{width:`70%`}})]),a(T,{variant:`rect`,class:`cb-sk cb-sk--tool`}),e(`div`,En,[a(T,{variant:`rect`,class:`cb-sk cb-sk--user-sm`})]),e(`div`,Dn,[a(T,{variant:`text`,style:{width:`80%`}}),a(T,{variant:`text`,style:{width:`45%`}})])])]),_:1})])):d.events.length?o(``,!0):(g(),s(`div`,On,i(d.$t(`codingBridge.session.startHint`)),1)),d.hiddenEventCount>0?(g(),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:m[3]||=(...e)=>d.loadEarlier&&d.loadEarlier(...e)},[a(D,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(d.hiddenEventCount),1)],8,kn)):o(``,!0),(g(!0),s(l,null,h(d.visibleEvents,e=>(g(),f(O,{key:e.id,event:e,editable:d.canEdit,onEdit:d.onEditPrompt},null,8,[`event`,`editable`,`onEdit`]))),128)),d.thinking?(g(),f(te,{key:3})):o(``,!0),d.canRetry?(g(),s(`div`,An,[a(x,{size:`small`,round:``,onClick:d.onRetry},{default:p(()=>[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(d.$t(`codingBridge.session.retry`)),1)]),_:1},8,[`onClick`])])):o(``,!0)],512),d.pendingQuestion?(g(),s(`div`,jn,[(g(),f(ne,{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`,Mn,[d.readonly?(g(),s(`div`,Nn,[a(A,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,null,i(d.$t(`codingBridge.history.readonly`)),1),a(x,{class:`ml-auto`,size:`small`,round:``,onClick:d.onNewSession},{default:p(()=>[r(i(d.$t(`codingBridge.session.newSession`)),1)]),_:1},8,[`onClick`])])):(g(),s(l,{key:1},[d.editingActive?(g(),s(`div`,Pn,[e(`span`,Fn,[a(re,{class:`text-[var(--el-color-primary)]`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(d.$t(`codingBridge.session.editingBanner`)),1)]),d.canRestoreCode?(g(),f(ie,{key:0,modelValue:d.restoreCode,"onUpdate:modelValue":m[4]||=e=>d.restoreCode=e,size:`small`,class:`cb-restore-code`},{default:p(()=>[r(i(d.$t(`codingBridge.session.editRestoreCode`)),1)]),_:1},8,[`modelValue`])):o(``,!0),e(`button`,{type:`button`,class:`ml-auto cb-edit-cancel`,onClick:m[5]||=(...e)=>d.cancelEdit&&d.cancelEdit(...e)},i(d.$t(`codingBridge.session.editCancel`)),1)])):o(``,!0),e(`div`,In,[d.attachmentFileList.length?(g(),s(`div`,Ln,[(g(!0),s(l,null,h(d.attachmentFileList,(t,n)=>(g(),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)?(g(),s(`img`,{key:0,src:d.attachmentPreviewUrl(t),class:`h-8 w-8 rounded object-cover`,alt:d.$t(`codingBridge.session.attachmentImageAlt`)},null,8,Rn)):(g(),s(`span`,zn,[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,Bn),d.isAttachmentUploading(t)?(g(),s(`span`,Vn,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,Hn)]))),128))])):o(``,!0),d.slashMenuVisible?(g(),s(`ul`,Un,[(g(!0),s(l,null,h(d.slashMatches,(r,a)=>(g(),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`,Gn,`/`+i(r.name),1),r.argument_hint?(g(),s(`span`,Kn,i(r.argument_hint),1)):o(``,!0),r.description?(g(),s(`span`,qn,i(r.description),1)):o(``,!0)],42,Wn))),128))])):o(``,!0),a(M,{modelValue:d.prompt,"onUpdate:modelValue":m[6]||=e=>d.prompt=e,type:`textarea`,autosize:{minRows:2,maxRows:12},resize:`none`,class:`cb-composer__input`,placeholder:d.$t(`codingBridge.session.promptPlaceholder`),onKeydown:d.onComposerKeydown},null,8,[`modelValue`,`placeholder`,`onKeydown`]),a(oe,{ref:`uploader`,"file-list":d.attachmentFileList,"onUpdate:fileList":m[7]||=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:p(()=>[e(`span`,Jn,null,512)]),_:1},8,[`file-list`,`action`,`headers`,`limit`,`before-upload`,`on-change`,`on-success`,`on-error`,`on-exceed`]),e(`div`,Yn,[e(`button`,{type:`button`,class:`cb-icon-btn`,title:d.$t(`codingBridge.session.attachFile`),"aria-label":d.$t(`codingBridge.session.attachFile`),onClick:m[8]||=(...e)=>d.onTriggerAttachmentUpload&&d.onTriggerAttachmentUpload(...e)},[a(se,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,Xn),e(`div`,Zn,[d.isNewSession?(g(),f(R,{key:0,trigger:`click`,onCommand:m[9]||=e=>d.provider=e},{dropdown:p(()=>[a(L,null,{default:p(()=>[(g(!0),s(l,null,h(d.providerOptions,e=>(g(),f(I,{key:e.value,command:e.value,disabled:!e.available},{default:p(()=>[a(F,{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)?(g(),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,tr)):o(``,!0),r(` `+i(e.label)+` `,1),e.available?o(``,!0):(g(),s(`span`,nr,i(d.$t(`codingBridge.session.providerUnavailable`)),1))]),_:2},1032,[`command`,`disabled`]))),128))]),_:1})]),default:p(()=>[e(`button`,Qn,[d.providerIcon(d.provider)?(g(),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,$n)):(g(),f(N,{key:1,class:`cb-pill__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`})),e(`span`,er,i(d.providerName(d.provider)),1),a(P,{class:`cb-pill__caret`,size:`1em`,"aria-hidden":`true`,focusable:`false`})])]),_:1})):(g(),s(`span`,rr,[d.providerIcon(d.currentSession?.provider||`claude`)?(g(),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,ir)):(g(),f(N,{key:1,class:`cb-pill__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`})),e(`span`,ar,i(d.providerName(d.currentSession?.provider||`claude`)),1)])),a(z,{ref:`modelPopover`,trigger:`click`,placement:`top-start`,width:260},{reference:p(()=>[e(`button`,or,[a(ce,{class:`cb-pill__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,sr,i(d.model||d.$t(`codingBridge.session.modelDefault`)),1),a(P,{class:`cb-pill__caret`,size:`1em`,"aria-hidden":`true`,focusable:`false`})])]),default:p(()=>[e(`div`,cr,[e(`button`,{type:`button`,class:`cb-model-option`,onClick:m[10]||=e=>d.selectModel(``)},[a(F,{class:n([`cb-model-option__check`,d.model?`opacity-0`:`opacity-100`]),size:`1em`,"aria-hidden":`true`,focusable:`false`},null,8,[`class`]),e(`span`,lr,i(d.$t(`codingBridge.session.modelDefault`)),1)]),(g(!0),s(l,null,h(d.modelOptions,t=>(g(),s(`button`,{key:t.value,type:`button`,class:`cb-model-option`,onClick:e=>d.selectModel(t.value)},[a(F,{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`,dr,i(t.label),1)],8,ur))),128)),d.allowCustomModel?(g(),s(`div`,fr,[a(M,{modelValue:d.customModelDraft,"onUpdate:modelValue":m[11]||=e=>d.customModelDraft=e,size:`small`,placeholder:d.$t(`codingBridge.session.modelPlaceholder`),onKeyup:c(d.applyCustomModel,[`enter`])},{append:p(()=>[a(x,{disabled:!d.customModelDraft.trim(),"aria-label":d.$t(`common.button.confirm`),title:d.$t(`common.button.confirm`),onClick:d.applyCustomModel},{default:p(()=>[a(F,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`disabled`,`aria-label`,`title`,`onClick`])]),_:1},8,[`modelValue`,`placeholder`,`onKeyup`])])):o(``,!0)])]),_:1},512),d.effortOptions.length>1?(g(),f(R,{key:2,trigger:`click`,onCommand:m[12]||=e=>d.effort=e},{dropdown:p(()=>[a(L,null,{default:p(()=>[(g(!0),s(l,null,h(d.effortOptions,e=>(g(),f(I,{key:e.value,command:e.value},{default:p(()=>[a(F,{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:p(()=>[e(`button`,pr,[a(le,{class:`cb-pill__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,mr,i(d.effortLabel(d.effort)),1),a(P,{class:`cb-pill__caret`,size:`1em`,"aria-hidden":`true`,focusable:`false`})])]),_:1})):o(``,!0),a(R,{trigger:`click`,onCommand:m[13]||=e=>d.permissionMode=e},{dropdown:p(()=>[a(L,null,{default:p(()=>[(g(!0),s(l,null,h(d.permissionModeOptions,e=>(g(),f(I,{key:e.value,command:e.value},{default:p(()=>[a(F,{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:p(()=>[e(`button`,hr,[a(B,{class:`cb-pill__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,gr,i(d.permissionModeLabel(d.permissionMode)),1),a(P,{class:`cb-pill__caret`,size:`1em`,"aria-hidden":`true`,focusable:`false`})])]),_:1}),d.canPickCwd?(g(),f(z,{key:3,trigger:`click`,placement:`top-start`,width:320},{reference:p(()=>[e(`button`,_r,[a(V,{class:`cb-pill__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,vr,i(d.cwd||d.$t(`codingBridge.session.cwdDefault`)),1),a(P,{class:`cb-pill__caret`,size:`1em`,"aria-hidden":`true`,focusable:`false`})])]),default:p(()=>[a(M,{modelValue:d.cwd,"onUpdate:modelValue":m[17]||=e=>d.cwd=e,size:`small`,clearable:``,class:`cb-cwd-input`,placeholder:d.$t(`codingBridge.session.cwdPlaceholder`)},{suffix:p(()=>[e(`span`,{class:`cb-cwd-browse`,role:`button`,tabindex:`0`,title:d.$t(`codingBridge.directory.title`),"aria-label":d.$t(`codingBridge.directory.title`),onClick:m[14]||=(...e)=>d.openDirectory&&d.openDirectory(...e),onKeydown:[m[15]||=c(t((...e)=>d.openDirectory&&d.openDirectory(...e),[`prevent`]),[`enter`]),m[16]||=c(t((...e)=>d.openDirectory&&d.openDirectory(...e),[`prevent`]),[`space`])]},[a(V,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],40,yr)]),_:1},8,[`modelValue`,`placeholder`])]),_:1})):d.currentSession?.cwd?(g(),s(`span`,br,[a(V,{class:`cb-pill__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,xr,i(d.currentSession?.cwd),1)])):o(``,!0)]),d.running?(g(),f(x,{key:0,circle:``,"aria-label":d.$t(`common.button.stop`),title:d.$t(`common.button.stop`),onClick:d.onInterrupt},{default:p(()=>[a(H,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`,`onClick`])):o(``,!0),a(x,{type:`primary`,round:``,disabled:!d.canSend,onClick:d.onSend},{default:p(()=>[r(i(d.editingActive?d.$t(`codingBridge.session.editSubmit`):d.$t(`codingBridge.session.send`)),1)]),_:1},8,[`disabled`,`onClick`])])]),e(`p`,Sr,i(d.composerHint),1)],64))])],64)):(g(),s(`div`,on,[a(b,{class:`text-4xl mb-3`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`p`,sn,i(d.$t(`codingBridge.session.noDevice`)),1),a(x,{class:`md:hidden mt-4`,round:``,onClick:m[0]||=e=>d.$emit(`devices`)},{default:p(()=>[a(b,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(d.$t(`codingBridge.nodeList.title`)),1)]),_:1})])),a(ue,{visible:d.directoryVisible,"onUpdate:visible":m[18]||=e=>d.directoryVisible=e,"initial-path":d.cwd,onSelect:d.onDirectorySelect},null,8,[`visible`,`initial-path`,`onSelect`])])}var wr=W(rn,[[`render`,Cr],[`__scopeId`,`data-v-05e55dc1`]]),Tr=_({name:`CodingBridgePairDialog`,components:{LinkIcon:I,ElDialog:U,ElInput:K,ElButton:G},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===Y.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);X.success(this.$t(`codingBridge.pair.success`,{name:t})),this.code=``,this.$emit(`update:visible`,!1)}catch(e){let t=e?.response?.status;t===404?X.error(this.$t(`codingBridge.pair.invalidCode`)):t===409?X.error(this.$t(`codingBridge.pair.usedCode`)):X.error(this.$t(`codingBridge.pair.failed`))}}}}),Er={class:`content`},Dr={class:`text-sm text-[var(--app-text-subtle)] mb-4`},Or={class:`steps list-none m-0 p-0 mb-4`},kr={class:`flex gap-3 mb-3`},Ar={class:`flex-1 min-w-0`},jr={class:`text-sm mb-1`},Mr={class:`flex gap-3 mb-3`},Nr={class:`flex-1 min-w-0`},Pr={class:`text-sm mb-1`},Fr={class:`flex gap-3`},Ir={class:`flex-1 min-w-0`},Lr={class:`text-sm`};function Rr(t,n,o,s,l,d){let m=u(`el-input`),h=u(`link-icon`),ee=u(`el-button`),_=u(`el-dialog`);return g(),f(_,{"model-value":t.visible,width:`520px`,title:t.$t(`codingBridge.pair.title`),center:``,"onUpdate:modelValue":n[1]||=e=>t.$emit(`update:visible`,e)},{default:p(()=>[e(`div`,Er,[e(`p`,Dr,i(t.$t(`codingBridge.pair.intro`)),1),e(`ol`,Or,[e(`li`,kr,[n[3]||=e(`span`,{class:`step-index`},`1`,-1),e(`div`,Ar,[e(`p`,jr,i(t.$t(`codingBridge.pair.step1`)),1),n[2]||=e(`code`,{class:`cmd`},`pip install coding-bridge`,-1)])]),e(`li`,Mr,[n[5]||=e(`span`,{class:`step-index`},`2`,-1),e(`div`,Nr,[e(`p`,Pr,i(t.$t(`codingBridge.pair.step2`)),1),n[4]||=e(`code`,{class:`cmd`},`coding-bridge up`,-1)])]),e(`li`,Fr,[n[6]||=e(`span`,{class:`step-index`},`3`,-1),e(`div`,Ir,[e(`p`,Lr,i(t.$t(`codingBridge.pair.step3`)),1)])])]),a(m,{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(ee,{type:`primary`,round:``,class:`w-full`,loading:t.claiming,disabled:!t.code.trim(),onClick:t.onClaim},{default:p(()=>[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 zr=W(Tr,[[`render`,Rr],[`__scopeId`,`data-v-54bd85f1`]]),Br=_({name:`CodingBridgePermissionDialog`,components:{CloseIcon:J,CodeIcon:A,ConfirmIcon:k,ElDialog:U,ElButton:G},computed:{request(){return(this.$store.state.codingBridge?.permissions??[]).find(e=>!qe(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`})}}}),Vr={key:0,class:`content`},Hr={class:`text-sm text-[var(--app-text-subtle)] mb-3`},Ur={class:`rounded-md border border-[var(--app-border-subtle)] p-3 mb-3`},Wr={class:`flex items-center gap-2 font-medium`},Gr={key:0,class:`text-xs text-[var(--app-text-subtle)] mt-1`},Kr={key:1,class:`mt-2 text-xs overflow-x-auto whitespace-pre-wrap break-words text-[var(--app-text-subtle)] max-h-[200px]`},qr={class:`flex justify-end gap-2`};function Jr(t,n,c,l,d,m){let h=u(`code-icon`),ee=u(`close-icon`),_=u(`el-button`),v=u(`confirm-icon`),y=u(`el-dialog`);return g(),f(y,{"model-value":!!t.request,width:`480px`,title:t.$t(`codingBridge.permission.title`),"close-on-click-modal":!1,"show-close":!1,center:``},{footer:p(()=>[e(`div`,qr,[a(_,{round:``,onClick:t.onDeny},{default:p(()=>[a(ee,{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:p(()=>[a(v,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`codingBridge.permission.allow`)),1)]),_:1},8,[`onClick`])])]),default:p(()=>[t.request?(g(),s(`div`,Vr,[e(`p`,Hr,i(t.$t(`codingBridge.permission.subtitle`)),1),e(`div`,Ur,[e(`div`,Wr,[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?(g(),s(`p`,Gr,i(t.request.description),1)):o(``,!0),t.hasInput?(g(),s(`pre`,Kr,i(t.inputText),1)):o(``,!0)])])):o(``,!0)]),_:1},8,[`model-value`,`title`])}var Yr=W(Br,[[`render`,Jr]]),Xr={claude:{src:Xt,invertOnDark:!1},codex:{src:Zt,invertOnDark:!0},copilot:{src:Qt,invertOnDark:!0}},Zr=_({name:`CodingBridgeHistoryDrawer`,components:{CodeIcon:A,RedoIcon:H,ElDrawer:b,ElButton:G},props:{visible:{type:Boolean,default:!1}},emits:[`update:visible`],computed:{currentNodeId(){return this.$store.state.codingBridge?.currentNodeId},loading(){return this.$store.state.codingBridge?.status?.getHistory===Y.Request},sessions(){let e=this.currentNodeId;return[...e?this.$store.state.codingBridge?.history?.[e]??[]:[]].sort((e,t)=>(t.updated_at??0)-(e.updated_at??0))}},watch:{visible(e){e&&this.currentNodeId&&this.$store.dispatch(`codingBridge/getHistory`,this.currentNodeId)}},methods:{providerLabel(e){return{claude:`Claude Code`,codex:`Codex`,copilot:`GitHub Copilot`}[e]??e},providerIcon(e){return Xr[e]??null},refresh(){this.currentNodeId&&this.$store.dispatch(`codingBridge/getHistory`,this.currentNodeId)},open(e){this.currentNodeId&&(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``}}}}),Qr={class:`flex flex-col h-full`},$r={class:`flex items-center justify-between mb-3`},ei={class:`text-xs text-[var(--app-text-subtle)] m-0`},ti={key:0,class:`m-auto text-sm text-[var(--app-text-subtle)]`},ni={key:1,class:`m-auto text-sm text-[var(--app-text-subtle)]`},ri={key:2,class:`m-auto text-sm text-[var(--app-text-subtle)] text-center`},ii={key:3,class:`list-none m-0 p-0 flex-1 overflow-y-auto flex flex-col gap-2`},ai=[`onClick`],oi={class:`flex items-center gap-2 mb-1`},si=[`src`,`alt`],ci={class:`text-sm font-medium truncate flex-1`},li=[`title`],ui={class:`text-[11px] text-[var(--app-text-subtle)] truncate`},di={key:0},fi={key:1},pi={class:`text-[11px] text-[var(--app-text-subtle)] mt-0.5`},mi={key:0},hi={key:1};function gi(t,c,d,m,ee,_){let v=u(`redo-icon`),y=u(`el-button`),b=u(`code-icon`),x=u(`el-drawer`);return g(),f(x,{"model-value":t.visible,direction:`rtl`,size:`380px`,title:t.$t(`codingBridge.history.title`),"onUpdate:modelValue":c[0]||=e=>t.$emit(`update:visible`,e)},{default:p(()=>[e(`div`,Qr,[e(`div`,$r,[e(`p`,ei,i(t.$t(`codingBridge.history.intro`)),1),a(y,{size:`small`,round:``,loading:t.loading,onClick:t.refresh},{default:p(()=>[t.loading?o(``,!0):(g(),f(v,{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.currentNodeId?t.loading&&!t.sessions.length?(g(),s(`div`,ni,i(t.$t(`codingBridge.history.loading`)),1)):t.sessions.length?(g(),s(`ul`,ii,[(g(!0),s(l,null,h(t.sessions,r=>(g(),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`,oi,[t.providerIcon(r.provider)?(g(),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,si)):(g(),f(b,{key:1,class:`provider-icon`,title:t.providerLabel(r.provider),size:`1em`,"aria-hidden":`true`,focusable:`false`},null,8,[`title`])),e(`span`,ci,i(r.title),1),r.running?(g(),s(`span`,{key:2,class:`running-dot`,title:t.$t(`codingBridge.history.running`)},null,8,li)):o(``,!0)]),e(`div`,ui,[r.cwd?(g(),s(`span`,di,i(r.cwd),1)):o(``,!0),r.git_branch?(g(),s(`span`,fi,` · `+i(r.git_branch),1)):o(``,!0)]),e(`div`,pi,[r.updated_at?(g(),s(`span`,mi,i(t.formatTime(r.updated_at)),1)):o(``,!0),r.message_count?(g(),s(`span`,hi,` · `+i(t.$t(`codingBridge.history.messages`,{count:r.message_count})),1)):o(``,!0)])],8,ai))),128))])):(g(),s(`div`,ri,i(t.$t(`codingBridge.history.empty`)),1)):(g(),s(`div`,ti,i(t.$t(`codingBridge.session.noDevice`)),1))])]),_:1},8,[`model-value`,`title`])}var _i=_({name:`CodingBridgeIndex`,components:{ElDrawer:b,NodeList:Ge,SessionView:wr,PairDialog:zr,PermissionDialog:Yr,HistoryDrawer:W(Zr,[[`render`,gi],[`__scopeId`,`data-v-af006e93`]])},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))}}}),vi={class:`coding-bridge flex flex-row h-full relative`};function yi(e,t,n,r,i,o){let c=u(`node-list`),l=u(`session-view`),d=u(`el-drawer`),f=u(`pair-dialog`),m=u(`permission-dialog`),h=u(`history-drawer`);return g(),s(`div`,vi,[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:p(()=>[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(m),a(h,{visible:e.historyVisible,"onUpdate:visible":t[4]||=t=>e.historyVisible=t},null,8,[`visible`])])}var bi=W(_i,[[`render`,yi],[`__scopeId`,`data-v-2879fe0f`]]);export{bi 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,S as c,T as l,at as u,ht as d,j as f,mt as p,ot as m,rt as h,st as ee,tt as g,z as _}from"./vendor-chart-Dw-P17PN.js";import{t as v}from"./upload-BDgHWid0.js";import{t as y}from"./checkbox-CeoqKfX8.js";import{t as b}from"./drawer-ia4Su9NX.js";import{n as x,r as S,t as C}from"./dropdown-CSAnEtNs.js";import{t as w}from"./popover-CIhBv737.js";import{n as T,t as E}from"./skeleton-B3LIGUiE.js";import{t as D}from"./arrow-right-FS1nN7uI.js";import{t as O}from"./arrow-up-Bncedf94.js";import{t as te}from"./brain-SPs9CzlV.js";import{t as k}from"./check-CtBkgelb.js";import{t as ne}from"./chevron-down-CUOysLkQ.js";import{n as A,t as re}from"./CodeSnippet-C9gya5LN.js";import{t as ie}from"./eye-SSWNou9D.js";import{t as ae}from"./file-text-BW4TsEub.js";import{n as j,t as M}from"./shield-CiGU20-4.js";import{t as oe}from"./folder-BH1Ywi1a.js";import{t as se}from"./gauge-Cc_BhTTN.js";import{t as N}from"./history-DQT16yI0.js";import{t as P}from"./info-CXWcObeg.js";import{t as F}from"./laptop-CEbmOX4O.js";import{t as I}from"./link-TfquuvKc.js";import{t as L}from"./loader-circle-BiHunPwf.js";import{i as R,n as ce,t as z}from"./AskUserQuestionCard-CXfCSGQH.js";import{t as le}from"./paperclip-siQb3iCT.js";import{t as B}from"./pencil-CurbnOzl.js";import{t as V}from"./plus-Dpr8tTBL.js";import{t as H}from"./rotate-cw-COjaKq2D.js";import{t as ue}from"./search-DkB3Qh3s.js";import{t as de}from"./square-Bx6DV4M_.js";import{t as fe}from"./terminal-BrlcLpm1.js";import{t as pe}from"./trash-2-Cz9KBrOE.js";import{Ci as U,E as W,Mi as G,Ut as me,Vi as K,_i as he,ai as ge,fi as _e,gi as q,hi as J,ni as Y,qt as ve,vi as X}from"./index-BtNM5W1k.js";import"./vendor-highlight-BtIeKitL.js";import{t as ye}from"./CopyToClipboard-CMRvafZB.js";import{s as be,t as xe}from"./codingBridgeNotify-jdc9sha6.js";var Se=q(`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`}]]),Ce=q(`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`}]]),we=q(`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`}]]),Te=_({name:`CodingBridgeNotificationToggle`,components:{LoadingIcon:L,NotificationIcon:Ce,NotificationOffIcon:Se,ElButton:G},data(){return{enabled:!1,busy:!1}},computed:{supported(){return _e()||be()}},mounted(){this.enabled=!_e()&&xe()===`granted`},methods:{async onToggle(){this.busy=!0;try{if(this.enabled){await this.$store.dispatch(`codingBridge/disableNotifications`),this.enabled=!1,X.success(this.$t(`codingBridge.notify.disabled`));return}let e=await this.$store.dispatch(`codingBridge/enableNotifications`);e===`enabled`?(this.enabled=!0,X.success(this.$t(`codingBridge.notify.enabled`))):e===`denied`?X.warning(this.$t(`codingBridge.notify.denied`)):X.warning(this.$t(`codingBridge.notify.unsupported`))}catch{X.error(this.$t(`codingBridge.notify.failed`))}finally{this.busy=!1}}}});function Ee(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?(g(),f(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:p(()=>[e.busy?(g(),f(s,{key:0,class:`adc-icon-spin`,size:`1em`,"aria-hidden":`true`,focusable:`false`})):e.enabled?(g(),f(c,{key:1,size:`1em`,"aria-hidden":`true`,focusable:`false`})):(g(),f(l,{key:2,size:`1em`,"aria-hidden":`true`,focusable:`false`}))]),_:1},8,[`type`,`title`,`disabled`,`aria-label`,`onClick`])):o(``,!0)}var De=_({name:`CodingBridgeNodeList`,components:{AddIcon:V,DeleteIcon:pe,DesktopIcon:R,DeveloperIcon:F,RedoIcon:H,ElButton:G,NotificationToggle:W(Te,[[`render`,Ee]])},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 onDelete(e){try{await he.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),X.success(this.$t(`codingBridge.nodeList.removeSuccess`))}catch{X.error(this.$t(`codingBridge.nodeList.removeFailed`))}}}}),Oe={class:`node-list flex flex-col h-full bg-[var(--app-sidebar-bg)] border-r border-[var(--app-border-subtle)]`},ke={class:`flex items-center justify-between px-4 py-3 border-b border-[var(--app-border-subtle)]`},Ae={class:`flex items-center gap-2 font-medium`},je={class:`flex items-center gap-1`},Me={class:`flex items-center gap-2 px-4 py-2 text-xs border-b border-[var(--app-border-subtle)]`},Ne={class:`text-[var(--app-text-subtle)]`},Pe={class:`flex-1 overflow-y-auto`},Fe={key:0,class:`p-6 text-center text-sm text-[var(--app-text-subtle)]`},Ie={class:`mb-3`},Le={key:1,class:`list-none m-0 p-0`},Re=[`onClick`],ze={class:`flex-1 min-w-0`},Be={class:`flex items-center gap-2`},Ve={class:`truncate font-medium`},He=[`title`],Ue={class:`text-xs text-[var(--app-text-subtle)] truncate`};function We(o,c,d,f,m,ee){let _=u(`developer-icon`),v=u(`notification-toggle`),y=u(`redo-icon`),b=u(`el-button`),x=u(`add-icon`),S=u(`desktop-icon`),C=u(`delete-icon`);return g(),s(`div`,Oe,[e(`div`,ke,[e(`div`,Ae,[a(_,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,null,i(o.$t(`codingBridge.nodeList.title`)),1)]),e(`div`,je,[a(v),a(b,{circle:``,size:`small`,"aria-label":o.$t(`codingBridge.nodeList.refresh`),title:o.$t(`codingBridge.nodeList.refresh`),onClick:o.onRefresh},{default:p(()=>[a(y,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`,`onClick`]),a(b,{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:p(()=>[a(x,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`])])]),e(`div`,Me,[e(`span`,{class:n([`inline-block w-2 h-2 rounded-full`,o.connectionDotClass])},null,2),e(`span`,Ne,i(o.connectionLabel),1)]),e(`div`,Pe,[o.nodes.length?(g(),s(`ul`,Le,[(g(!0),s(l,null,h(o.nodes,r=>(g(),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(S,{class:`text-[var(--app-text-subtle)]`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`div`,ze,[e(`div`,Be,[e(`span`,Ve,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,He)]),e(`div`,Ue,i(r.status===`online`?o.$t(`codingBridge.status.online`):o.$t(`codingBridge.status.offline`)),1)]),a(b,{class:`opacity-0 group-hover:opacity-100`,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:p(()=>[a(C,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`,`onClick`])],10,Re))),128))])):(g(),s(`div`,Fe,[e(`p`,Ie,i(o.$t(`codingBridge.nodeList.empty`)),1),a(b,{type:`primary`,round:``,size:`small`,onClick:c[1]||=e=>o.$emit(`pair`)},{default:p(()=>[a(x,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(o.$t(`codingBridge.nodeList.pairFirst`)),1)]),_:1})]))])])}var Ge=W(De,[[`render`,We]]),Ke=e=>{let t=e?.questions;return Array.isArray(t)&&t.length>0&&t.every(e=>e&&typeof e.question==`string`&&Array.isArray(e.options))},qe=e=>e?(e.tool||``).toLowerCase()===`askuserquestion`?!0:Ke(e.input):!1,Je=e=>({questions:e.input?.questions??[]}),Ye=100,Z=4e4,Xe=12e3,Ze=6e3,Q=(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 ···`},Qe=_({name:`CodingBridgeTranscriptItem`,directives:{highlight:ve},components:{CloseIcon:J,ConfirmIcon:k,EditIcon:B,FileIcon:j,InfoIcon:P,VueMarkdown:ce,CodeSnippet:re,CopyToClipboard:ye},props:{event:{type:Object,required:!0},editable:{type:Boolean,default:!1}},emits:[`edit`],data(){return{renderedText:Q(this.event.text||``,Z),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 Q(n,Ze)}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.commandText)return fe;let e=(this.event.tool??``).toLowerCase();return/read|cat|view/.test(e)?ae:/write|edit|create|update|insert/.test(e)?B:/grep|glob|search|find|list/.test(e)?ue:A},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}))},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 Q(JSON.stringify(t,null,2),Ze)}catch{return Q(String(e),Ze)}},thinkingText(){return Q(this.event.text||``,Z)},resultText(){let e=this.event.content;return typeof e==`string`&&e.length>0?e:`—`},resultDisplay(){return Q(this.resultText,Xe)},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=Q(this.event.text||``,Z)},Ye)},flushRender(){this.streamTimer&&=(window.clearTimeout(this.streamTimer),0),this.renderedText=Q(this.event.text||``,Z)}}}),$e={key:0,class:`group flex items-end justify-end gap-1.5`},et=[`title`,`aria-label`],tt={class:`max-w-[85%] rounded-lg px-3 py-2 bg-[var(--el-color-primary)] text-white whitespace-pre-wrap break-words`},nt=[`src`],rt=[`href`],it=[`src`],at={key:1,class:`flex h-9 w-9 items-center justify-center rounded bg-white/15`},ot={class:`min-w-0 truncate`},st={key:2},ct={key:2,class:`whitespace-pre-wrap break-words italic text-[var(--app-text-subtle)] border-l-2 border-[var(--app-border-subtle)] pl-3`},lt={key:3,class:`overflow-hidden rounded-md bg-[var(--app-sidebar-bg)] border border-[var(--app-border-subtle)]`},ut={class:`flex items-center gap-2 px-2.5 py-1.5 font-medium text-[var(--app-text-subtle)]`},dt={key:0,class:`min-w-0 truncate text-xs font-normal opacity-70`},ft={key:0,class:`flex flex-col gap-1.5 px-2.5 pb-2`},pt={key:0,class:`font-medium text-[var(--app-text)]`},mt={class:`whitespace-pre-wrap break-words text-[var(--app-text-subtle)]`},ht={key:1,class:`px-2.5 pb-2`},gt={key:2,class:`px-2.5 pb-2 font-mono text-xs break-all text-[var(--app-text-subtle)]`},_t={key:3,class:`px-2.5 pb-2`},vt={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`},yt={key:5,class:`flex items-center gap-2 text-xs text-[var(--app-text-subtle)]`},bt={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`},xt={class:`whitespace-pre-wrap break-words`},St={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 Ct(t,r,c,p,_,v){let y=u(`edit-icon`),b=u(`file-icon`),x=u(`vue-markdown`),S=u(`code-snippet`),C=u(`copy-to-clipboard`),w=u(`close-icon`),T=u(`confirm-icon`),E=u(`info-icon`),D=m(`highlight`);return g(),s(`div`,{class:n([`transcript-item text-sm leading-relaxed`,`kind-${t.event.kind}`])},[t.event.kind===`prompt`?(g(),s(`div`,$e,[t.editable?(g(),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(y,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,et)):o(``,!0),e(`div`,tt,[t.event.images&&t.event.images.length?(g(),s(`div`,{key:0,class:n([`flex flex-wrap gap-1.5`,{"mb-1.5":t.event.text||t.hasAttachments}])},[(g(!0),s(l,null,h(t.event.images,(e,t)=>(g(),s(`img`,{key:t,src:e,class:`w-16 h-16 rounded object-cover`,alt:``},null,8,nt))),128))],2)):o(``,!0),t.hasAttachments?(g(),s(`div`,{key:1,class:n([`flex flex-wrap gap-1.5`,{"mb-1.5":t.event.text}])},[(g(!0),s(l,null,h(t.event.attachments,(t,n)=>(g(),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`?(g(),s(`img`,{key:0,src:t.url,class:`h-9 w-9 rounded object-cover`,alt:``},null,8,it)):(g(),s(`span`,at,[a(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`})])),e(`span`,ot,i(t.name||t.url),1)],8,rt))),128))],2)):o(``,!0),t.event.text?(g(),s(`span`,st,i(t.event.text),1)):o(``,!0)])])):t.event.kind===`text`?(g(),s(`div`,{key:1,class:n([`cb-stream-text`,{"is-streaming":t.event.streaming}])},[d(a(x,{source:t.renderedText,class:`markdown-body bg-transparent text-[var(--app-text)]`},null,8,[`source`]),[[D]])],2)):t.event.kind===`thinking`?(g(),s(`div`,ct,i(t.thinkingText),1)):t.event.kind===`tool_use`?(g(),s(`div`,lt,[e(`div`,ut,[(g(),f(ee(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?(g(),s(`span`,dt,i(t.toolDescription),1)):o(``,!0)]),t.questionLines.length?(g(),s(`div`,ft,[(g(!0),s(l,null,h(t.questionLines,(t,n)=>(g(),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?(g(),s(`div`,pt,i(t.header),1)):o(``,!0),e(`div`,mt,i(t.question),1)]))),128))])):t.commandText?(g(),s(`div`,ht,[a(S,{code:t.commandText,lang:`bash`,copyable:``},null,8,[`code`])])):t.filePath?(g(),s(`div`,gt,i(t.filePath),1)):t.inputText?(g(),s(`div`,_t,[a(S,{code:t.inputText,lang:`json`,copyable:``},null,8,[`code`])])):o(``,!0)])):t.event.kind===`tool_result`?(g(),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?(g(),s(`div`,vt,[a(C,{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`?(g(),s(`div`,yt,[t.event.is_error?(g(),f(w,{key:0,size:`1em`,"aria-hidden":`true`,focusable:`false`})):(g(),f(T,{key:1,size:`1em`,"aria-hidden":`true`,focusable:`false`})),e(`span`,null,i(t.resultLabel),1)])):t.event.kind===`notice`?(g(),s(`div`,bt,[a(E,{class:`mt-0.5 flex-none text-[var(--el-color-primary)]`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,xt,i(t.noticeText),1)])):t.event.kind===`error`?(g(),s(`div`,St,i(t.event.text),1)):o(``,!0)],2)}var wt=W(Qe,[[`render`,Ct],[`__scopeId`,`data-v-2028b19a`]]),Tt=`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(`.`),Et=[`思考中`,`酝酿中`,`沉思中`,`推敲中`,`构思中`,`计算中`,`琢磨中`,`捣鼓中`,`炼制中`,`召唤中`,`编织中`,`烹饪中`,`咀嚼中`,`盘算中`,`发酵中`,`运转中`,`冥想中`,`鼓捣中`,`熬制中`,`神游中`,`演算中`,`雕琢中`,`头脑风暴中`,`反复斟酌中`],Dt=60,Ot=1500,kt=28,At=_({name:`CodingBridgeThinkingIndicator`,components:{LoadingIcon:L},data(){return{display:``,elapsed:0,charIndex:0,phase:`typing`,currentWord:``,elapsedTimer:0,typeTimer:0}},computed:{words(){return this.$i18n.locale.startsWith(`zh`)?Et:Tt}},mounted(){this.currentWord=this.pickWord(),this.elapsedTimer=window.setInterval(()=>{this.elapsed+=1},1e3),this.scheduleType(Dt)},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(Ot)):this.scheduleType(Dt)):this.phase===`holding`?(this.phase=`deleting`,this.scheduleType(kt)):(--this.charIndex,this.display=e.slice(0,Math.max(0,this.charIndex)),this.charIndex<=0?(this.currentWord=this.pickWord(),this.phase=`typing`,this.scheduleType(Dt)):this.scheduleType(kt))}}}),jt={class:`cb-thinking flex items-center gap-2 text-sm text-[var(--app-text-subtle)] py-1`},Mt={class:`cb-thinking__word`},Nt={class:`cb-thinking__elapsed tabular-nums opacity-60`};function Pt(t,n,o,c,l,d){let f=u(`loading-icon`);return g(),s(`div`,jt,[a(f,{class:`cb-thinking__spinner adc-icon-spin text-[var(--el-color-primary)]`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,Mt,[r(i(t.display),1),n[0]||=e(`span`,{class:`cb-thinking__caret`},`▋`,-1)]),e(`span`,Nt,`(`+i(t.elapsed)+`s)`,1)])}var Ft=W(At,[[`render`,Pt],[`__scopeId`,`data-v-ae116215`]]),It=_({name:`CodingBridgeDirectoryDialog`,components:{ContinueIcon:D,FileIcon:j,FolderIcon:oe,RedoIcon:H,UpIcon:O,ElDialog:U,ElButton:G,ElInput:K},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))}}}),Lt={class:`flex flex-col gap-2`},Rt={class:`flex items-center gap-2 min-w-0`},zt={class:`h-72 overflow-y-auto border border-[var(--app-border-subtle)] rounded-md divide-y divide-[var(--app-border-subtle)]`},Bt={key:0,class:`h-full flex items-center justify-center text-sm text-[var(--app-text-subtle)]`},Vt={key:1,class:`h-full flex items-center justify-center text-sm text-[var(--el-color-danger)]`},Ht=[`onClick`],Ut={class:`truncate`,dir:`ltr`},Wt={class:`truncate`,dir:`ltr`},Gt={key:0,class:`h-full flex items-center justify-center text-sm text-[var(--app-text-subtle)] py-8`},Kt={key:0,class:`text-[11px] text-[var(--app-text-subtle)] px-1`},qt={class:`flex items-center justify-end gap-2`};function Jt(t,d,m,ee,_,v){let y=u(`up-icon`),b=u(`el-button`),x=u(`continue-icon`),S=u(`el-input`),C=u(`redo-icon`),w=u(`folder-icon`),T=u(`file-icon`),E=u(`el-dialog`);return g(),f(E,{"model-value":t.visible,title:t.$t(`codingBridge.directory.title`),width:`520px`,"append-to-body":``,"onUpdate:modelValue":t.onVisibleChange,onOpen:t.onOpen},{footer:p(()=>[e(`div`,qt,[a(b,{round:``,onClick:d[1]||=e=>t.onVisibleChange(!1)},{default:p(()=>[r(i(t.$t(`common.button.cancel`)),1)]),_:1}),a(b,{type:`primary`,round:``,disabled:!t.listing||!!t.listing.error,onClick:t.chooseCurrent},{default:p(()=>[r(i(t.$t(`codingBridge.directory.choose`)),1)]),_:1},8,[`disabled`,`onClick`])])]),default:p(()=>[e(`div`,Lt,[e(`div`,Rt,[a(b,{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:p(()=>[a(y,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`disabled`,`title`,`aria-label`,`onClick`]),a(S,{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:p(()=>[a(b,{title:t.$t(`codingBridge.directory.go`),disabled:t.loading||!t.pathInput.trim(),"aria-label":t.$t(`codingBridge.directory.go`),onClick:t.goPath},{default:p(()=>[a(x,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`title`,`disabled`,`aria-label`,`onClick`])]),_:1},8,[`modelValue`,`placeholder`,`disabled`,`onKeyup`,`onBlur`]),a(b,{size:`small`,circle:``,disabled:t.loading,title:t.$t(`codingBridge.directory.refresh`),"aria-label":t.$t(`codingBridge.directory.refresh`),onClick:t.refresh},{default:p(()=>[a(C,{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`,zt,[t.loading&&!t.listing?(g(),s(`div`,Bt,i(t.$t(`codingBridge.directory.loading`)),1)):t.listing&&t.listing.error?(g(),s(`div`,Vt,i(t.listing.error),1)):(g(),s(l,{key:2},[(g(!0),s(l,null,h(t.directories,n=>(g(),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(w,{class:`text-[var(--el-color-warning)]`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,Ut,i(n.name),1)],8,Ht))),128)),(g(!0),s(l,null,h(t.files,t=>(g(),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(T,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,Wt,i(t.name),1)]))),128)),t.isEmpty?(g(),s(`div`,Gt,i(t.$t(`codingBridge.directory.empty`)),1)):o(``,!0)],64))]),t.listing&&t.listing.truncated?(g(),s(`p`,Kt,i(t.$t(`codingBridge.directory.truncated`)),1)):o(``,!0)])]),_:1},8,[`model-value`,`title`,`onUpdate:modelValue`,`onOpen`])}var Yt=W(It,[[`render`,Jt]]),Xt=`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`,Zt=`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`,Qt=`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`,$t=50*1024*1024,$=10,en=60,tn=60,nn={claude:{src:Xt,invertOnDark:!1},codex:{src:Zt,invertOnDark:!0},copilot:{src:Qt,invertOnDark:!0}},rn=_({name:`CodingBridgeSessionView`,components:{AddIcon:V,AiIcon:te,AttachmentIcon:le,CloseIcon:J,CodeIcon:A,ConfirmIcon:k,DeveloperIcon:F,EditIcon:B,ExpandDownIcon:ne,FileIcon:j,FolderOpenIcon:we,HistoryIcon:N,PerformanceIcon:se,RedoIcon:H,SecurityIcon:M,StopIcon:de,UpIcon:O,ViewIcon:ie,ElInput:K,ElButton:G,ElPopover:w,ElDropdown:C,ElDropdownMenu:S,ElDropdownItem:x,ElUpload:v,ElCheckbox:y,ElSkeleton:E,ElSkeletonItem:T,TranscriptItem:wt,ThinkingIndicator:Ft,DirectoryDialog:Yt,AskUserQuestionCard:z,CopyToClipboard:ye},mixins:[me],emits:[`history`,`devices`],data(){return{prompt:``,cwd:``,model:``,customModelDraft:``,permissionMode:`bypassPermissions`,provider:`claude`,effort:``,directoryVisible:!1,slashMenuOpen:!1,slashActiveIndex:0,editingEventId:``,restoreCode:!1,attachmentFileList:[],uploadUrl:ge()+`/api/v1/files/`,maxAttachments:$,visibleCount:en}},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]??[]:[]},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===Y.Request},pendingQuestion(){let e=this.currentSessionId;if(!e)return;let t=(this.$store.state.codingBridge?.permissions??[]).find(t=>t.session_id===e&&qe(t));return t?{request_id:t.request_id,payload:Je(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))},canSend(){return(!!this.prompt.trim()||this.attachments.length>0)&&!this.uploadingAttachments&&this.connected&&this.nodeOnline},composerHint(){return 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:{events(){this.scrollToBottom()},pendingQuestion(){this.scrollToBottom()},thinking(){this.scrollToBottom()},currentSessionId(){this.scrollToBottom(),this.visibleCount=en,this.editingEventId=``,this.restoreCode=!1,this.syncSessionSettings()},currentNodeId(){this.requestCapabilities(),this.isNewSession&&this.restoreComposerPrefs()},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()},methods:{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 nn[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;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.prompt=``,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>=$?(X.warning(this.$t(`codingBridge.session.attachmentLimit`,{count:$})),!1):e.size>$t?(X.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(){X.error(this.$t(`codingBridge.session.attachmentUploadError`))},onAttachmentExceed(){X.warning(this.$t(`codingBridge.session.attachmentLimit`,{count:$}))},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.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(){this.$nextTick(()=>{let e=this.$refs.transcript;e&&(e.scrollTop=e.scrollHeight)})},loadEarlier(){let e=this.$refs.transcript,t=e?.scrollHeight??0;this.visibleCount+=tn,this.$nextTick(()=>{e&&(e.scrollTop=e.scrollHeight-t+e.scrollTop)})}}}),an={class:`session-view flex flex-col h-full bg-[var(--app-content-bg)]`},on={key:0,class:`flex-1 flex flex-col items-center justify-center text-center p-8 text-[var(--app-text-subtle)]`},sn={class:`text-sm`},cn={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`},un=[`title`,`aria-label`],dn={class:`min-w-0`},fn={class:`flex items-center gap-2 font-medium`},pn={class:`truncate`},mn={key:0,class:`text-xs text-[var(--app-text-subtle)] truncate`},hn={key:0,class:`text-[var(--el-color-primary)]`},gn={class:`flex items-center gap-2 flex-none`},_n={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)]`},vn={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)]`},yn={class:`opacity-70 flex-none`},bn=[`title`],xn={ref:`transcript`,class:`flex-1 min-h-0 overflow-y-auto px-5 py-4 flex flex-col gap-3`},Sn={key:0,class:`cb-skeleton`},Cn={class:`flex flex-col gap-4`},wn={class:`flex justify-end`},Tn={class:`flex flex-col gap-1.5`},En={class:`flex justify-end`},Dn={class:`flex flex-col gap-1.5`},On={key:1,class:`m-auto text-center text-sm text-[var(--app-text-subtle)]`},kn=[`title`],An={key:4,class:`flex justify-center pt-1`},jn={key:2,class:`cb-question-dock flex-none px-5`},Mn={class:`border-t border-[var(--app-border-subtle)] p-3`},Nn={key:0,class:`flex items-center gap-2 text-xs text-[var(--app-text-subtle)] px-1 py-2`},Pn={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)]`},Fn={class:`inline-flex items-center gap-1.5`},In={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)]`},Ln={key:0,class:`flex flex-wrap gap-2 pb-2`},Rn=[`src`,`alt`],zn={key:1,class:`flex h-8 w-8 items-center justify-center rounded bg-[var(--app-content-bg)]`},Bn=[`title`],Vn={key:2,class:`text-[10px] text-[var(--app-text-subtle)]`},Hn=[`title`,`aria-label`,`onClick`],Un={key:1,class:`cb-slash-menu`},Wn=[`onMousedown`,`onMouseenter`],Gn={class:`cb-slash-menu__name`},Kn={key:0,class:`cb-slash-menu__hint`},qn={key:1,class:`cb-slash-menu__desc`},Jn={ref:`attachmentUploadTrigger`,class:`block h-0 w-0`,"aria-hidden":`true`},Yn={class:`mt-1.5 flex items-center gap-1.5`},Xn=[`title`,`aria-label`],Zn={class:`flex min-w-0 flex-1 flex-wrap items-center gap-1.5`},Qn={type:`button`,class:`cb-pill`},$n=[`src`],er={class:`truncate`},tr=[`src`],nr={key:1,class:`ml-1 text-xs opacity-60`},rr={key:1,class:`cb-pill cb-pill--static`},ir=[`src`],ar={class:`truncate`},or={type:`button`,class:`cb-pill`},sr={class:`truncate`},cr={class:`cb-model-menu`},lr={class:`truncate`},ur=[`onClick`],dr={class:`truncate`},fr={key:0,class:`cb-model-custom`},pr={type:`button`,class:`cb-pill`},mr={class:`truncate`},hr={type:`button`,class:`cb-pill`},gr={class:`truncate`},_r={type:`button`,class:`cb-pill`},vr={class:`truncate`},yr=[`title`,`aria-label`],br={key:4,class:`cb-pill cb-pill--static`},xr={class:`truncate`},Sr={class:`text-[11px] text-[var(--app-text-subtle)] mt-1 px-1`};function Cr(d,m,ee,_,v,y){let b=u(`developer-icon`),x=u(`el-button`),S=u(`history-icon`),C=u(`add-icon`),w=u(`copy-to-clipboard`),T=u(`el-skeleton-item`),E=u(`el-skeleton`),D=u(`up-icon`),O=u(`transcript-item`),te=u(`thinking-indicator`),k=u(`redo-icon`),ne=u(`ask-user-question-card`),A=u(`view-icon`),re=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(`code-icon`),P=u(`expand-down-icon`),F=u(`confirm-icon`),I=u(`el-dropdown-item`),L=u(`el-dropdown-menu`),R=u(`el-dropdown`),ce=u(`ai-icon`),z=u(`el-popover`),le=u(`performance-icon`),B=u(`security-icon`),V=u(`folder-open-icon`),H=u(`stop-icon`),ue=u(`directory-dialog`);return g(),s(`div`,an,[d.currentNode?(g(),s(l,{key:1},[e(`div`,cn,[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:m[1]||=e=>d.$emit(`devices`)},[a(b,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,un),e(`div`,dn,[e(`div`,fn,[e(`span`,pn,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?(g(),s(`div`,mn,[e(`span`,null,i(d.sessionMeta),1),d.replayLabel?(g(),s(`span`,hn,` · `+i(d.replayLabel),1)):o(``,!0)])):o(``,!0)])]),e(`div`,gn,[a(x,{size:`small`,round:``,onClick:m[2]||=e=>d.$emit(`history`)},{default:p(()=>[a(S,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(d.$t(`codingBridge.history.button`)),1)]),_:1}),d.currentSessionId?(g(),f(x,{key:0,size:`small`,round:``,onClick:d.onNewSession},{default:p(()=>[a(C,{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):(g(),s(`div`,_n,i(d.$t(`codingBridge.session.deviceOffline`)),1)),d.diagnostics.length?(g(),s(`div`,vn,[(g(!0),s(l,null,h(d.diagnostics,t=>(g(),s(`span`,{key:t.label,class:`inline-flex items-center gap-1 min-w-0`},[e(`span`,yn,i(t.label)+`:`,1),e(`span`,{class:`font-mono break-all`,title:t.value},i(t.value),9,bn),a(w,{content:t.value,class:`inline-block flex-none`},null,8,[`content`])]))),128))])):o(``,!0),e(`div`,xn,[d.historyLoading&&!d.events.length?(g(),s(`div`,Sn,[a(E,{animated:``},{template:p(()=>[e(`div`,Cn,[e(`div`,wn,[a(T,{variant:`rect`,class:`cb-sk cb-sk--user`})]),e(`div`,Tn,[a(T,{variant:`text`,style:{width:`55%`}}),a(T,{variant:`text`,style:{width:`88%`}}),a(T,{variant:`text`,style:{width:`70%`}})]),a(T,{variant:`rect`,class:`cb-sk cb-sk--tool`}),e(`div`,En,[a(T,{variant:`rect`,class:`cb-sk cb-sk--user-sm`})]),e(`div`,Dn,[a(T,{variant:`text`,style:{width:`80%`}}),a(T,{variant:`text`,style:{width:`45%`}})])])]),_:1})])):d.events.length?o(``,!0):(g(),s(`div`,On,i(d.$t(`codingBridge.session.startHint`)),1)),d.hiddenEventCount>0?(g(),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:m[3]||=(...e)=>d.loadEarlier&&d.loadEarlier(...e)},[a(D,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(d.hiddenEventCount),1)],8,kn)):o(``,!0),(g(!0),s(l,null,h(d.visibleEvents,e=>(g(),f(O,{key:e.id,event:e,editable:d.canEdit,onEdit:d.onEditPrompt},null,8,[`event`,`editable`,`onEdit`]))),128)),d.thinking?(g(),f(te,{key:3})):o(``,!0),d.canRetry?(g(),s(`div`,An,[a(x,{size:`small`,round:``,onClick:d.onRetry},{default:p(()=>[a(k,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(d.$t(`codingBridge.session.retry`)),1)]),_:1},8,[`onClick`])])):o(``,!0)],512),d.pendingQuestion?(g(),s(`div`,jn,[(g(),f(ne,{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`,Mn,[d.readonly?(g(),s(`div`,Nn,[a(A,{size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,null,i(d.$t(`codingBridge.history.readonly`)),1),a(x,{class:`ml-auto`,size:`small`,round:``,onClick:d.onNewSession},{default:p(()=>[r(i(d.$t(`codingBridge.session.newSession`)),1)]),_:1},8,[`onClick`])])):(g(),s(l,{key:1},[d.editingActive?(g(),s(`div`,Pn,[e(`span`,Fn,[a(re,{class:`text-[var(--el-color-primary)]`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(d.$t(`codingBridge.session.editingBanner`)),1)]),d.canRestoreCode?(g(),f(ie,{key:0,modelValue:d.restoreCode,"onUpdate:modelValue":m[4]||=e=>d.restoreCode=e,size:`small`,class:`cb-restore-code`},{default:p(()=>[r(i(d.$t(`codingBridge.session.editRestoreCode`)),1)]),_:1},8,[`modelValue`])):o(``,!0),e(`button`,{type:`button`,class:`ml-auto cb-edit-cancel`,onClick:m[5]||=(...e)=>d.cancelEdit&&d.cancelEdit(...e)},i(d.$t(`codingBridge.session.editCancel`)),1)])):o(``,!0),e(`div`,In,[d.attachmentFileList.length?(g(),s(`div`,Ln,[(g(!0),s(l,null,h(d.attachmentFileList,(t,n)=>(g(),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)?(g(),s(`img`,{key:0,src:d.attachmentPreviewUrl(t),class:`h-8 w-8 rounded object-cover`,alt:d.$t(`codingBridge.session.attachmentImageAlt`)},null,8,Rn)):(g(),s(`span`,zn,[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,Bn),d.isAttachmentUploading(t)?(g(),s(`span`,Vn,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,Hn)]))),128))])):o(``,!0),d.slashMenuVisible?(g(),s(`ul`,Un,[(g(!0),s(l,null,h(d.slashMatches,(r,a)=>(g(),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`,Gn,`/`+i(r.name),1),r.argument_hint?(g(),s(`span`,Kn,i(r.argument_hint),1)):o(``,!0),r.description?(g(),s(`span`,qn,i(r.description),1)):o(``,!0)],42,Wn))),128))])):o(``,!0),a(M,{modelValue:d.prompt,"onUpdate:modelValue":m[6]||=e=>d.prompt=e,type:`textarea`,autosize:{minRows:2,maxRows:12},resize:`none`,class:`cb-composer__input`,placeholder:d.$t(`codingBridge.session.promptPlaceholder`),onKeydown:d.onComposerKeydown},null,8,[`modelValue`,`placeholder`,`onKeydown`]),a(oe,{ref:`uploader`,"file-list":d.attachmentFileList,"onUpdate:fileList":m[7]||=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:p(()=>[e(`span`,Jn,null,512)]),_:1},8,[`file-list`,`action`,`headers`,`limit`,`before-upload`,`on-change`,`on-success`,`on-error`,`on-exceed`]),e(`div`,Yn,[e(`button`,{type:`button`,class:`cb-icon-btn`,title:d.$t(`codingBridge.session.attachFile`),"aria-label":d.$t(`codingBridge.session.attachFile`),onClick:m[8]||=(...e)=>d.onTriggerAttachmentUpload&&d.onTriggerAttachmentUpload(...e)},[a(se,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],8,Xn),e(`div`,Zn,[d.isNewSession?(g(),f(R,{key:0,trigger:`click`,onCommand:m[9]||=e=>d.provider=e},{dropdown:p(()=>[a(L,null,{default:p(()=>[(g(!0),s(l,null,h(d.providerOptions,e=>(g(),f(I,{key:e.value,command:e.value,disabled:!e.available},{default:p(()=>[a(F,{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)?(g(),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,tr)):o(``,!0),r(` `+i(e.label)+` `,1),e.available?o(``,!0):(g(),s(`span`,nr,i(d.$t(`codingBridge.session.providerUnavailable`)),1))]),_:2},1032,[`command`,`disabled`]))),128))]),_:1})]),default:p(()=>[e(`button`,Qn,[d.providerIcon(d.provider)?(g(),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,$n)):(g(),f(N,{key:1,class:`cb-pill__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`})),e(`span`,er,i(d.providerName(d.provider)),1),a(P,{class:`cb-pill__caret`,size:`1em`,"aria-hidden":`true`,focusable:`false`})])]),_:1})):(g(),s(`span`,rr,[d.providerIcon(d.currentSession?.provider||`claude`)?(g(),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,ir)):(g(),f(N,{key:1,class:`cb-pill__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`})),e(`span`,ar,i(d.providerName(d.currentSession?.provider||`claude`)),1)])),a(z,{ref:`modelPopover`,trigger:`click`,placement:`top-start`,width:260},{reference:p(()=>[e(`button`,or,[a(ce,{class:`cb-pill__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,sr,i(d.model||d.$t(`codingBridge.session.modelDefault`)),1),a(P,{class:`cb-pill__caret`,size:`1em`,"aria-hidden":`true`,focusable:`false`})])]),default:p(()=>[e(`div`,cr,[e(`button`,{type:`button`,class:`cb-model-option`,onClick:m[10]||=e=>d.selectModel(``)},[a(F,{class:n([`cb-model-option__check`,d.model?`opacity-0`:`opacity-100`]),size:`1em`,"aria-hidden":`true`,focusable:`false`},null,8,[`class`]),e(`span`,lr,i(d.$t(`codingBridge.session.modelDefault`)),1)]),(g(!0),s(l,null,h(d.modelOptions,t=>(g(),s(`button`,{key:t.value,type:`button`,class:`cb-model-option`,onClick:e=>d.selectModel(t.value)},[a(F,{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`,dr,i(t.label),1)],8,ur))),128)),d.allowCustomModel?(g(),s(`div`,fr,[a(M,{modelValue:d.customModelDraft,"onUpdate:modelValue":m[11]||=e=>d.customModelDraft=e,size:`small`,placeholder:d.$t(`codingBridge.session.modelPlaceholder`),onKeyup:c(d.applyCustomModel,[`enter`])},{append:p(()=>[a(x,{disabled:!d.customModelDraft.trim(),"aria-label":d.$t(`common.button.confirm`),title:d.$t(`common.button.confirm`),onClick:d.applyCustomModel},{default:p(()=>[a(F,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`disabled`,`aria-label`,`title`,`onClick`])]),_:1},8,[`modelValue`,`placeholder`,`onKeyup`])])):o(``,!0)])]),_:1},512),d.effortOptions.length>1?(g(),f(R,{key:2,trigger:`click`,onCommand:m[12]||=e=>d.effort=e},{dropdown:p(()=>[a(L,null,{default:p(()=>[(g(!0),s(l,null,h(d.effortOptions,e=>(g(),f(I,{key:e.value,command:e.value},{default:p(()=>[a(F,{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:p(()=>[e(`button`,pr,[a(le,{class:`cb-pill__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,mr,i(d.effortLabel(d.effort)),1),a(P,{class:`cb-pill__caret`,size:`1em`,"aria-hidden":`true`,focusable:`false`})])]),_:1})):o(``,!0),a(R,{trigger:`click`,onCommand:m[13]||=e=>d.permissionMode=e},{dropdown:p(()=>[a(L,null,{default:p(()=>[(g(!0),s(l,null,h(d.permissionModeOptions,e=>(g(),f(I,{key:e.value,command:e.value},{default:p(()=>[a(F,{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:p(()=>[e(`button`,hr,[a(B,{class:`cb-pill__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,gr,i(d.permissionModeLabel(d.permissionMode)),1),a(P,{class:`cb-pill__caret`,size:`1em`,"aria-hidden":`true`,focusable:`false`})])]),_:1}),d.canPickCwd?(g(),f(z,{key:3,trigger:`click`,placement:`top-start`,width:320},{reference:p(()=>[e(`button`,_r,[a(V,{class:`cb-pill__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,vr,i(d.cwd||d.$t(`codingBridge.session.cwdDefault`)),1),a(P,{class:`cb-pill__caret`,size:`1em`,"aria-hidden":`true`,focusable:`false`})])]),default:p(()=>[a(M,{modelValue:d.cwd,"onUpdate:modelValue":m[17]||=e=>d.cwd=e,size:`small`,clearable:``,class:`cb-cwd-input`,placeholder:d.$t(`codingBridge.session.cwdPlaceholder`)},{suffix:p(()=>[e(`span`,{class:`cb-cwd-browse`,role:`button`,tabindex:`0`,title:d.$t(`codingBridge.directory.title`),"aria-label":d.$t(`codingBridge.directory.title`),onClick:m[14]||=(...e)=>d.openDirectory&&d.openDirectory(...e),onKeydown:[m[15]||=c(t((...e)=>d.openDirectory&&d.openDirectory(...e),[`prevent`]),[`enter`]),m[16]||=c(t((...e)=>d.openDirectory&&d.openDirectory(...e),[`prevent`]),[`space`])]},[a(V,{size:`1em`,"aria-hidden":`true`,focusable:`false`})],40,yr)]),_:1},8,[`modelValue`,`placeholder`])]),_:1})):d.currentSession?.cwd?(g(),s(`span`,br,[a(V,{class:`cb-pill__icon`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`span`,xr,i(d.currentSession?.cwd),1)])):o(``,!0)]),d.running?(g(),f(x,{key:0,circle:``,"aria-label":d.$t(`common.button.stop`),title:d.$t(`common.button.stop`),onClick:d.onInterrupt},{default:p(()=>[a(H,{size:`1em`,"aria-hidden":`true`,focusable:`false`})]),_:1},8,[`aria-label`,`title`,`onClick`])):o(``,!0),a(x,{type:`primary`,round:``,disabled:!d.canSend,onClick:d.onSend},{default:p(()=>[r(i(d.editingActive?d.$t(`codingBridge.session.editSubmit`):d.$t(`codingBridge.session.send`)),1)]),_:1},8,[`disabled`,`onClick`])])]),e(`p`,Sr,i(d.composerHint),1)],64))])],64)):(g(),s(`div`,on,[a(b,{class:`text-4xl mb-3`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),e(`p`,sn,i(d.$t(`codingBridge.session.noDevice`)),1),a(x,{class:`md:hidden mt-4`,round:``,onClick:m[0]||=e=>d.$emit(`devices`)},{default:p(()=>[a(b,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(d.$t(`codingBridge.nodeList.title`)),1)]),_:1})])),a(ue,{visible:d.directoryVisible,"onUpdate:visible":m[18]||=e=>d.directoryVisible=e,"initial-path":d.cwd,onSelect:d.onDirectorySelect},null,8,[`visible`,`initial-path`,`onSelect`])])}var wr=W(rn,[[`render`,Cr],[`__scopeId`,`data-v-05e55dc1`]]),Tr=_({name:`CodingBridgePairDialog`,components:{LinkIcon:I,ElDialog:U,ElInput:K,ElButton:G},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===Y.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);X.success(this.$t(`codingBridge.pair.success`,{name:t})),this.code=``,this.$emit(`update:visible`,!1)}catch(e){let t=e?.response?.status;t===404?X.error(this.$t(`codingBridge.pair.invalidCode`)):t===409?X.error(this.$t(`codingBridge.pair.usedCode`)):X.error(this.$t(`codingBridge.pair.failed`))}}}}),Er={class:`content`},Dr={class:`text-sm text-[var(--app-text-subtle)] mb-4`},Or={class:`steps list-none m-0 p-0 mb-4`},kr={class:`flex gap-3 mb-3`},Ar={class:`flex-1 min-w-0`},jr={class:`text-sm mb-1`},Mr={class:`flex gap-3 mb-3`},Nr={class:`flex-1 min-w-0`},Pr={class:`text-sm mb-1`},Fr={class:`flex gap-3`},Ir={class:`flex-1 min-w-0`},Lr={class:`text-sm`};function Rr(t,n,o,s,l,d){let m=u(`el-input`),h=u(`link-icon`),ee=u(`el-button`),_=u(`el-dialog`);return g(),f(_,{"model-value":t.visible,width:`520px`,title:t.$t(`codingBridge.pair.title`),center:``,"onUpdate:modelValue":n[1]||=e=>t.$emit(`update:visible`,e)},{default:p(()=>[e(`div`,Er,[e(`p`,Dr,i(t.$t(`codingBridge.pair.intro`)),1),e(`ol`,Or,[e(`li`,kr,[n[3]||=e(`span`,{class:`step-index`},`1`,-1),e(`div`,Ar,[e(`p`,jr,i(t.$t(`codingBridge.pair.step1`)),1),n[2]||=e(`code`,{class:`cmd`},`pip install coding-bridge`,-1)])]),e(`li`,Mr,[n[5]||=e(`span`,{class:`step-index`},`2`,-1),e(`div`,Nr,[e(`p`,Pr,i(t.$t(`codingBridge.pair.step2`)),1),n[4]||=e(`code`,{class:`cmd`},`coding-bridge up`,-1)])]),e(`li`,Fr,[n[6]||=e(`span`,{class:`step-index`},`3`,-1),e(`div`,Ir,[e(`p`,Lr,i(t.$t(`codingBridge.pair.step3`)),1)])])]),a(m,{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(ee,{type:`primary`,round:``,class:`w-full`,loading:t.claiming,disabled:!t.code.trim(),onClick:t.onClaim},{default:p(()=>[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 zr=W(Tr,[[`render`,Rr],[`__scopeId`,`data-v-54bd85f1`]]),Br=_({name:`CodingBridgePermissionDialog`,components:{CloseIcon:J,CodeIcon:A,ConfirmIcon:k,ElDialog:U,ElButton:G},computed:{request(){return(this.$store.state.codingBridge?.permissions??[]).find(e=>!qe(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`})}}}),Vr={key:0,class:`content`},Hr={class:`text-sm text-[var(--app-text-subtle)] mb-3`},Ur={class:`rounded-md border border-[var(--app-border-subtle)] p-3 mb-3`},Wr={class:`flex items-center gap-2 font-medium`},Gr={key:0,class:`text-xs text-[var(--app-text-subtle)] mt-1`},Kr={key:1,class:`mt-2 text-xs overflow-x-auto whitespace-pre-wrap break-words text-[var(--app-text-subtle)] max-h-[200px]`},qr={class:`flex justify-end gap-2`};function Jr(t,n,c,l,d,m){let h=u(`code-icon`),ee=u(`close-icon`),_=u(`el-button`),v=u(`confirm-icon`),y=u(`el-dialog`);return g(),f(y,{"model-value":!!t.request,width:`480px`,title:t.$t(`codingBridge.permission.title`),"close-on-click-modal":!1,"show-close":!1,center:``},{footer:p(()=>[e(`div`,qr,[a(_,{round:``,onClick:t.onDeny},{default:p(()=>[a(ee,{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:p(()=>[a(v,{class:`mr-1`,size:`1em`,"aria-hidden":`true`,focusable:`false`}),r(` `+i(t.$t(`codingBridge.permission.allow`)),1)]),_:1},8,[`onClick`])])]),default:p(()=>[t.request?(g(),s(`div`,Vr,[e(`p`,Hr,i(t.$t(`codingBridge.permission.subtitle`)),1),e(`div`,Ur,[e(`div`,Wr,[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?(g(),s(`p`,Gr,i(t.request.description),1)):o(``,!0),t.hasInput?(g(),s(`pre`,Kr,i(t.inputText),1)):o(``,!0)])])):o(``,!0)]),_:1},8,[`model-value`,`title`])}var Yr=W(Br,[[`render`,Jr]]),Xr={claude:{src:Xt,invertOnDark:!1},codex:{src:Zt,invertOnDark:!0},copilot:{src:Qt,invertOnDark:!0}},Zr=_({name:`CodingBridgeHistoryDrawer`,components:{CodeIcon:A,RedoIcon:H,ElDrawer:b,ElButton:G},props:{visible:{type:Boolean,default:!1}},emits:[`update:visible`],computed:{currentNodeId(){return this.$store.state.codingBridge?.currentNodeId},loading(){return this.$store.state.codingBridge?.status?.getHistory===Y.Request},sessions(){let e=this.currentNodeId;return[...e?this.$store.state.codingBridge?.history?.[e]??[]:[]].sort((e,t)=>(t.updated_at??0)-(e.updated_at??0))}},watch:{visible(e){e&&this.currentNodeId&&this.$store.dispatch(`codingBridge/getHistory`,this.currentNodeId)}},methods:{providerLabel(e){return{claude:`Claude Code`,codex:`Codex`,copilot:`GitHub Copilot`}[e]??e},providerIcon(e){return Xr[e]??null},refresh(){this.currentNodeId&&this.$store.dispatch(`codingBridge/getHistory`,this.currentNodeId)},open(e){this.currentNodeId&&(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``}}}}),Qr={class:`flex flex-col h-full`},$r={class:`flex items-center justify-between mb-3`},ei={class:`text-xs text-[var(--app-text-subtle)] m-0`},ti={key:0,class:`m-auto text-sm text-[var(--app-text-subtle)]`},ni={key:1,class:`m-auto text-sm text-[var(--app-text-subtle)]`},ri={key:2,class:`m-auto text-sm text-[var(--app-text-subtle)] text-center`},ii={key:3,class:`list-none m-0 p-0 flex-1 overflow-y-auto flex flex-col gap-2`},ai=[`onClick`],oi={class:`flex items-center gap-2 mb-1`},si=[`src`,`alt`],ci={class:`text-sm font-medium truncate flex-1`},li=[`title`],ui={class:`text-[11px] text-[var(--app-text-subtle)] truncate`},di={key:0},fi={key:1},pi={class:`text-[11px] text-[var(--app-text-subtle)] mt-0.5`},mi={key:0},hi={key:1};function gi(t,c,d,m,ee,_){let v=u(`redo-icon`),y=u(`el-button`),b=u(`code-icon`),x=u(`el-drawer`);return g(),f(x,{"model-value":t.visible,direction:`rtl`,size:`380px`,title:t.$t(`codingBridge.history.title`),"onUpdate:modelValue":c[0]||=e=>t.$emit(`update:visible`,e)},{default:p(()=>[e(`div`,Qr,[e(`div`,$r,[e(`p`,ei,i(t.$t(`codingBridge.history.intro`)),1),a(y,{size:`small`,round:``,loading:t.loading,onClick:t.refresh},{default:p(()=>[t.loading?o(``,!0):(g(),f(v,{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.currentNodeId?t.loading&&!t.sessions.length?(g(),s(`div`,ni,i(t.$t(`codingBridge.history.loading`)),1)):t.sessions.length?(g(),s(`ul`,ii,[(g(!0),s(l,null,h(t.sessions,r=>(g(),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`,oi,[t.providerIcon(r.provider)?(g(),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,si)):(g(),f(b,{key:1,class:`provider-icon`,title:t.providerLabel(r.provider),size:`1em`,"aria-hidden":`true`,focusable:`false`},null,8,[`title`])),e(`span`,ci,i(r.title),1),r.running?(g(),s(`span`,{key:2,class:`running-dot`,title:t.$t(`codingBridge.history.running`)},null,8,li)):o(``,!0)]),e(`div`,ui,[r.cwd?(g(),s(`span`,di,i(r.cwd),1)):o(``,!0),r.git_branch?(g(),s(`span`,fi,` · `+i(r.git_branch),1)):o(``,!0)]),e(`div`,pi,[r.updated_at?(g(),s(`span`,mi,i(t.formatTime(r.updated_at)),1)):o(``,!0),r.message_count?(g(),s(`span`,hi,` · `+i(t.$t(`codingBridge.history.messages`,{count:r.message_count})),1)):o(``,!0)])],8,ai))),128))])):(g(),s(`div`,ri,i(t.$t(`codingBridge.history.empty`)),1)):(g(),s(`div`,ti,i(t.$t(`codingBridge.session.noDevice`)),1))])]),_:1},8,[`model-value`,`title`])}var _i=_({name:`CodingBridgeIndex`,components:{ElDrawer:b,NodeList:Ge,SessionView:wr,PairDialog:zr,PermissionDialog:Yr,HistoryDrawer:W(Zr,[[`render`,gi],[`__scopeId`,`data-v-af006e93`]])},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))}}}),vi={class:`coding-bridge flex flex-row h-full relative`};function yi(e,t,n,r,i,o){let c=u(`node-list`),l=u(`session-view`),d=u(`el-drawer`),f=u(`pair-dialog`),m=u(`permission-dialog`),h=u(`history-drawer`);return g(),s(`div`,vi,[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:p(()=>[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(m),a(h,{visible:e.historyVisible,"onUpdate:visible":t[4]||=t=>e.historyVisible=t},null,8,[`visible`])])}var bi=W(_i,[[`render`,yi],[`__scopeId`,`data-v-2879fe0f`]]);export{bi as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./rolldown-runtime--c01j_DQ.js";import{A as e,C as t,Gt as n,I as r,Jt as i,K as a,L as o,M as s,Mt as c,N as l,Q as u,S as d,St as f,T as p,Vt as m,Wt as h,b as g,ft as _,ht as v,it as y,j as b,k as x,mt as S,qt as C,rt as w,st as T,tt as E,wt as D,z as O}from"./vendor-chart-Dw-P17PN.js";import{a as k,c as A,t as ee}from"./install-Cn-SLM3u.js";import{i as j,n as M,r as te,s as ne}from"./runtime-BTM7t9of.js";import{a as re,c as N,dt as P,ht as F,i as I,it as L,n as ie,r as ae,yt as oe}from"./use-deprecated-r4dlLNqm.js";import{r as se,t as R}from"./select-na7s3bgQ.js";import{t as z}from"./use-aria-9DurtVZO.js";import{n as B,t as ce}from"./form-BNJ9LdPs.js";import{r as le,t as ue}from"./event-BGnHezxC.js";import{t as de}from"./input-number-g06X3iNk.js";import{t as fe}from"./arrow-left-B5kQWUvN.js";import{t as pe}from"./arrow-right-FS1nN7uI.js";import{t as me}from"./arrow-up-Bncedf94.js";import{t as he}from"./box-BQ7-g5pH.js";import{t as V}from"./check-CtBkgelb.js";import{t as ge}from"./chevron-down-CUOysLkQ.js";import{t as _e}from"./chevron-right-BmqV9saW.js";import{t as ve}from"./copy-Dxj0t_Ws.js";import{t as ye}from"./download-BN3yYMcY.js";import{t as H}from"./file-text-BW4TsEub.js";import{t as U}from"./history-DQT16yI0.js";import{t as W}from"./house-CkHqy124.js";import{t as be}from"./image-BGXwtQYd.js";import{t as xe}from"./loader-circle-BiHunPwf.js";import{t as G}from"./mouse-pointer-2-DGJ3ydu-.js";import{t as K}from"./music-2-g9-CZVl2.js";import{t as Se}from"./play-CmMPlLIm.js";import{t as Ce}from"./plus-Dpr8tTBL.js";import{t as we}from"./search-DkB3Qh3s.js";import{t as Te}from"./sparkles-j8ZezNam.js";import{t as Ee}from"./trash-2-Cz9KBrOE.js";import{t as De}from"./triangle-alert-Dm3AU2Pk.js";import{t as Oe}from"./upload-C-DZTzCm.js";import{t as ke}from"./video-BiedsplO.js";import{i as q}from"./i18n-QtILy3Ue.js";import{Ci as Ae,E as J,Mi as Y,Vi as X,_i as je,gi as Z,ni as Me,ri as Ne,vi as Pe}from"./index-BtNM5W1k.js";import{t as Fe}from"./VideoPlayer-B8aq6dKu.js";var Ie={label:`label`,value:`value`,disabled:`disabled`},Le=M({direction:{type:te(String),default:`horizontal`},options:{type:te(Array),default:()=>[]},modelValue:{type:[String,Number,Boolean],default:void 0},props:{type:te(Object),default:()=>Ie},block:Boolean,size:L,disabled:Boolean,validateEvent:{type:Boolean,default:!0},id:String,name:String,...z([`ariaLabel`])}),Re={[le]:e=>h(e)||ne(e)||j(e),[ue]:e=>h(e)||ne(e)||j(e)},ze=ee(k(O({...O({name:`ElSegmented`}),props:Le,emits:Re,setup(t,{emit:a}){let o=t,u=A(`segmented`),d=N(),h=ae(),g=ie(),{formItem:v}=I(),{inputId:b,isLabeledByFormItem:S}=re(o,{formItemContext:v}),T=D(null),O=F(),k=f({isInit:!1,width:0,height:0,translateX:0,translateY:0,focusVisible:!1}),ee=e=>{let t=M(e);a(le,t),a(ue,t)},j=x(()=>({...Ie,...o.props})),M=e=>m(e)?e[j.value.value]:e,te=e=>m(e)?e[j.value.label]:e,ne=e=>!!(g.value||m(e)&&e[j.value.disabled]),L=e=>o.modelValue===M(e),se=e=>o.options.find(t=>M(t)===e),R=e=>[u.e(`item`),u.is(`selected`,L(e)),u.is(`disabled`,ne(e))],z=()=>{if(!T.value)return;let e=T.value.querySelector(`.is-selected`),t=T.value.querySelector(`.is-selected input`);if(!e||!t){k.width=0,k.height=0,k.translateX=0,k.translateY=0,k.focusVisible=!1;return}let n=e.getBoundingClientRect();k.isInit=!0,o.direction===`vertical`?(k.height=n.height,k.translateY=e.offsetTop):(k.width=n.width,k.translateX=e.offsetLeft);try{k.focusVisible=t.matches(`:focus-visible`)}catch{}},B=x(()=>[u.b(),u.m(h.value),u.is(`block`,o.block)]),ce=x(()=>({width:o.direction===`vertical`?`100%`:`${k.width}px`,height:o.direction===`vertical`?`${k.height}px`:`100%`,transform:o.direction===`vertical`?`translateY(${k.translateY}px)`:`translateX(${k.translateX}px)`,display:k.isInit?`block`:`none`})),de=x(()=>[u.e(`item-selected`),u.is(`disabled`,ne(se(o.modelValue))),u.is(`focus-visible`,k.focusVisible)]),fe=x(()=>o.name||d.value);return oe(T,z),_(O,z),_(()=>o.modelValue,()=>{var e;z(),o.validateEvent&&((e=v?.validate)==null||e.call(v,`change`).catch(e=>P(e)))},{flush:`post`}),(t,a)=>t.options.length?(E(),l(`div`,{key:0,id:c(b),ref_key:`segmentedRef`,ref:T,class:n(c(B)),role:`radiogroup`,"aria-label":c(S)?void 0:t.ariaLabel||`segmented`,"aria-labelledby":c(S)?c(v).labelId:void 0},[e(`div`,{class:n([c(u).e(`group`),c(u).m(o.direction)])},[e(`div`,{style:C(c(ce)),class:n(c(de))},null,6),(E(!0),l(p,null,w(t.options,(a,o)=>(E(),l(`label`,{key:o,class:n(R(a))},[e(`input`,{class:n(c(u).e(`item-input`)),type:`radio`,name:c(fe),disabled:ne(a),checked:L(a),onChange:e=>ee(a)},null,42,[`name`,`disabled`,`checked`,`onChange`]),e(`div`,{class:n(c(u).e(`item-label`))},[y(t.$slots,`default`,{item:a},()=>[r(i(te(a)),1)])],2)],2))),128))],2)],10,[`id`,`aria-label`,`aria-labelledby`])):s(`v-if`,!0)}}),[[`__file`,`segmented.vue`]])),Be=Z(`audio-lines`,[[`path`,{d:`M2 10v3`,key:`1fnikh`}],[`path`,{d:`M6 6v11`,key:`11sgs0`}],[`path`,{d:`M10 3v18`,key:`yhl04a`}],[`path`,{d:`M14 8v7`,key:`3a1oy3`}],[`path`,{d:`M18 5v13`,key:`123xd1`}],[`path`,{d:`M22 10v3`,key:`154ddg`}]]),Ve=Z(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),He=Z(`building-2`,[[`path`,{d:`M10 12h4`,key:`a56b0p`}],[`path`,{d:`M10 8h4`,key:`1sr2af`}],[`path`,{d:`M14 21v-3a2 2 0 0 0-4 0v3`,key:`1rgiei`}],[`path`,{d:`M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2`,key:`secmi2`}],[`path`,{d:`M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16`,key:`16ra0t`}]]),Q=Z(`clapperboard`,[[`path`,{d:`m12.296 3.464 3.02 3.956`,key:`qash78`}],[`path`,{d:`M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3z`,key:`1h7j8b`}],[`path`,{d:`M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`4lm6w1`}],[`path`,{d:`m6.18 5.276 3.1 3.899`,key:`zjj9t3`}]]),Ue=Z(`film`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M7 3v18`,key:`bbkbws`}],[`path`,{d:`M3 7.5h4`,key:`zfgn84`}],[`path`,{d:`M3 12h18`,key:`1i2n21`}],[`path`,{d:`M3 16.5h4`,key:`1230mu`}],[`path`,{d:`M17 3v18`,key:`in4fa5`}],[`path`,{d:`M17 7.5h4`,key:`myr1c1`}],[`path`,{d:`M17 16.5h4`,key:`go4c1d`}]]),We=Z(`git-commit-horizontal`,[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`,key:`1dyftd`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`,key:`oup4p8`}]]),Ge=Z(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),Ke=Z(`list-checks`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]),qe=Z(`lock-keyhole`,[[`circle`,{cx:`12`,cy:`16`,r:`1`,key:`1au0dj`}],[`rect`,{x:`3`,y:`10`,width:`18`,height:`12`,rx:`2`,key:`6s8ecr`}],[`path`,{d:`M7 10V7a5 5 0 0 1 10 0v3`,key:`1pqi11`}]]),Je=Z(`rows-3`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M21 9H3`,key:`1338ky`}],[`path`,{d:`M21 15H3`,key:`9uk58r`}]]),Ye=Z(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),Xe={class:`discovery-home`},Ze={class:`discovery-header`},Qe={class:`brand`},$e={class:`project-links`},et=[`title`,`aria-label`,`onClick`],$={key:0,class:`discovery-state`,role:`status`},tt={class:`creator`,"aria-labelledby":`poivelle-create-title`},nt={class:`creator-kicker`},rt={id:`poivelle-create-title`},it=[`aria-label`],at=[`disabled`,`onClick`],ot=[`placeholder`,`disabled`],st={class:`composer-footer`},ct=[`disabled`,`title`],lt={class:`prompt-starters`},ut=[`disabled`,`onClick`],dt={class:`works`,"aria-labelledby":`poivelle-works-title`},ft={class:`works-heading`},pt={id:`poivelle-works-title`},mt={class:`search`},ht=[`placeholder`,`aria-label`],gt={class:`category-tabs`},_t=[`onClick`],vt={class:`work-grid`},yt={class:`cover`},bt=[`src`,`alt`,`onError`],xt={key:2,class:`film-badge`},St=[`aria-label`,`onClick`],Ct={class:`duration-badge`},wt={class:`work-copy`},Tt={class:`work-meta`},Et={class:`work-actions`},Dt=[`onClick`],Ot=[`disabled`,`onClick`],kt={key:0,class:`film-dialog-heading`},At={id:`poivelle-film-dialog-title`},jt=J(O({__name:`DiscoveryHome`,emits:[`open-studio`],setup(a,{emit:d}){let f=d,m=Ne(),h=x(()=>m.state.poivelle),_=x(()=>h.value?.projects??[]),y=x(()=>h.value?.discoveryWorks??[]),C=D(``),O=D(``),k=D(!1),A=D(),ee=D(new Set),j=D(`official:pulsecam`),M=D(`all`),te=[{workId:`official:pulsecam`,label:`poivelle.discovery.commercial`,icon:Q},{workId:`official:moonlit-signal`,label:`poivelle.discovery.musicVideo`,icon:K},{workId:`official:northstar-origin`,label:`poivelle.discovery.documentary`,icon:He}],ne=[`poivelle.discovery.starterProduct`,`poivelle.discovery.starterMusic`,`poivelle.discovery.starterDocumentary`],re=[{value:`all`,label:`poivelle.discovery.all`},{value:`commercial`,label:`poivelle.discovery.commercial`},{value:`music_video`,label:`poivelle.discovery.musicVideo`},{value:`narrative`,label:`poivelle.discovery.narrative`},{value:`documentary`,label:`poivelle.discovery.documentary`},{value:`community`,label:`poivelle.discovery.community`}],N=x(()=>{let e=O.value.trim().toLowerCase();return y.value.filter(t=>(M.value===`all`||t.category===M.value)&&(!e||`${t.title} ${t.description} ${t.creator_name} ${(t.tags??[]).join(` `)}`.toLowerCase().includes(e)))}),P=x(()=>h.value?.status?.bootstrap===Me.Request),F=x(()=>h.value?.error),I=x({get:()=>!!A.value,set:e=>{e||(A.value=void 0)}}),L=x(()=>{let e=y.value.find(e=>e.id===j.value);return e&&e.copyable!==!1?e:y.value.find(e=>e.copyable!==!1)}),ie=()=>m.dispatch(`poivelle/bootstrap`,{loadProject:!1}),ae=e=>{ee.value=new Set([...ee.value,e])},oe=e=>e.video_url?.startsWith(`https://`)?e.video_url:void 0,se=e=>{if(e&&typeof e==`object`&&`response`in e){let t=e.response?.data?.detail;if(typeof t==`string`)return t;if(typeof t?.message==`string`)return t.message}return e instanceof Error?e.message:q(`poivelle.error.generic`)},R=e=>{let t=Math.floor(e/60),n=e%60;return t?`${t}:${n.toString().padStart(2,`0`)}`:`0:${n.toString().padStart(2,`0`)}`},z=async e=>{await m.dispatch(`poivelle/loadProject`,e),f(`open-studio`)},B=async(e,t)=>{if(!k.value){k.value=!0;try{await m.dispatch(`poivelle/copyDiscoveryWork`,{work_id:e.id,prompt:t,title:t.slice(0,80)}),f(`open-studio`)}catch(e){Pe.error(se(e))}finally{k.value=!1}}},ce=async()=>{let e=L.value;e&&C.value.trim()&&await B(e,C.value.trim())},le=async e=>{await B(e,C.value.trim()||`${q(`poivelle.discovery.copyPrefix`)} ${e.title}`)};return u(ie),(a,u)=>(E(),l(`main`,Xe,[e(`header`,Ze,[e(`div`,Qe,[o(c(Q),{size:19,"aria-hidden":`true`}),u[3]||=r(` POIVELLE`,-1)]),e(`div`,$e,[(E(!0),l(p,null,w(_.value.slice(0,3),e=>(E(),l(`button`,{key:e.id,type:`button`,title:e.title,"aria-label":e.title,onClick:t=>z(e.id)},[r(i(e.title)+` `,1),o(c(_e),{size:13,"aria-hidden":`true`})],8,et))),128))])]),P.value||F.value?(E(),l(`div`,$,[P.value?(E(),b(c(xe),{key:0,size:16,class:`spinning`,"aria-hidden":`true`})):s(``,!0),e(`span`,null,i(P.value?a.$t(`poivelle.status.loading`):F.value),1),F.value?(E(),l(`button`,{key:1,type:`button`,onClick:ie},i(a.$t(`poivelle.action.retry`)),1)):s(``,!0)])):s(``,!0),e(`section`,tt,[e(`p`,nt,i(a.$t(`poivelle.discovery.kicker`)),1),e(`h1`,rt,i(a.$t(`poivelle.discovery.title`)),1),e(`div`,{class:`mode-switch`,"aria-label":a.$t(`poivelle.discovery.skills`)},[(E(),l(p,null,w(te,t=>e(`button`,{key:t.workId,type:`button`,class:n({active:j.value===t.workId}),disabled:P.value,onClick:e=>j.value=t.workId},[(E(),b(T(t.icon),{size:15,"aria-hidden":`true`})),r(` `+i(a.$t(t.label)),1)],10,at)),64))],8,it),e(`form`,{class:`composer`,onSubmit:t(ce,[`prevent`])},[v(e(`textarea`,{"onUpdate:modelValue":u[0]||=e=>C.value=e,placeholder:a.$t(`poivelle.discovery.placeholder`),disabled:P.value,maxlength:`500`,rows:`4`},null,8,ot),[[g,C.value]]),e(`div`,st,[e(`span`,null,i(C.value.length)+`/500`,1),e(`button`,{type:`submit`,disabled:!C.value.trim()||!L.value||P.value||k.value,title:a.$t(`poivelle.discovery.create`)},[k.value?(E(),b(c(xe),{key:0,size:18,class:`spinning`,"aria-hidden":`true`})):(E(),b(c(me),{key:1,size:18,"aria-hidden":`true`}))],8,ct)])],32),e(`div`,lt,[(E(),l(p,null,w(ne,t=>e(`button`,{key:t,type:`button`,disabled:P.value,onClick:e=>C.value=a.$t(t)},i(a.$t(t)),9,ut)),64))])]),e(`section`,dt,[e(`div`,ft,[e(`div`,null,[e(`span`,null,i(a.$t(`poivelle.discovery.galleryKicker`)),1),e(`h2`,pt,i(a.$t(`poivelle.discovery.gallery`)),1)]),e(`label`,mt,[o(c(we),{size:16,"aria-hidden":`true`}),v(e(`input`,{"onUpdate:modelValue":u[1]||=e=>O.value=e,placeholder:a.$t(`poivelle.discovery.search`),"aria-label":a.$t(`poivelle.discovery.search`)},null,8,ht),[[g,O.value]])])]),e(`div`,gt,[(E(),l(p,null,w(re,t=>e(`button`,{key:t.value,type:`button`,class:n({active:M.value===t.value}),onClick:e=>M.value=t.value},i(a.$t(t.label)),11,_t)),64))]),e(`div`,vt,[(E(!0),l(p,null,w(N.value,t=>(E(),l(`article`,{key:t.id,class:`work-card`},[e(`div`,yt,[t.cover_url&&!ee.value.has(t.id)?(E(),l(`img`,{key:0,src:t.cover_url,alt:t.title,onError:e=>ae(t.id)},null,40,bt)):(E(),b(c(Ue),{key:1,size:32,"aria-hidden":`true`})),oe(t)?(E(),l(`span`,xt,i(a.$t(`poivelle.discovery.finishedFilm`)),1)):s(``,!0),oe(t)?(E(),l(`button`,{key:3,type:`button`,class:`cover-play`,"aria-label":`${a.$t(`poivelle.discovery.playFilm`)}: ${t.title}`,onClick:e=>A.value=t},[o(c(Se),{size:18,fill:`currentColor`,"aria-hidden":`true`}),r(` `+i(a.$t(`poivelle.discovery.playFilm`)),1)],8,St)):s(``,!0),e(`span`,Ct,i(t.duration_seconds?R(t.duration_seconds):a.$t(`poivelle.discovery.community`)),1)]),e(`div`,wt,[e(`div`,Tt,[e(`span`,null,i(t.creator_name),1),e(`strong`,null,i(t.title),1),e(`p`,null,i(t.description),1)]),e(`div`,Et,[oe(t)?(E(),l(`button`,{key:0,type:`button`,class:`play-button`,onClick:e=>A.value=t},[o(c(Se),{size:14,fill:`currentColor`,"aria-hidden":`true`}),r(` `+i(a.$t(`poivelle.discovery.play`)),1)],8,Dt)):s(``,!0),t.copyable===!1?s(``,!0):(E(),l(`button`,{key:1,type:`button`,class:`copy-button`,disabled:P.value||k.value,onClick:e=>le(t)},[o(c(ve),{size:14,"aria-hidden":`true`}),r(` `+i(a.$t(`poivelle.discovery.copy`)),1)],8,Ot))])])]))),128))])]),o(c(Ae),{modelValue:I.value,"onUpdate:modelValue":u[2]||=e=>I.value=e,class:`film-preview-dialog`,"aria-labelledby":`poivelle-film-dialog-title`,width:`min(920px, calc(100vw - 32px))`,"align-center":``,"append-to-body":``,"destroy-on-close":``},{header:S(()=>[A.value?(E(),l(`div`,kt,[e(`span`,null,i(a.$t(`poivelle.discovery.finishedFilm`)),1),e(`strong`,At,i(A.value.title),1),e(`small`,null,[r(i(A.value.creator_name)+` `,1),A.value.duration_seconds?(E(),l(p,{key:0},[r(` · `+i(R(A.value.duration_seconds)),1)],64)):s(``,!0)])])):s(``,!0)]),default:S(()=>[A.value&&oe(A.value)?(E(),b(Fe,{key:`${A.value.id}-${A.value.video_url}`,src:oe(A.value)},null,8,[`src`])):s(``,!0)]),_:1},8,[`modelValue`])]))}}),[[`__scopeId`,`data-v-91feafb0`]]),Mt={class:`studio-header`},Nt={class:`identity`},Pt=[`title`],Ft={class:`wordmark`},It={key:0,class:`version`},Lt={class:`actions`},Rt={class:`sync-state`},zt=[`title`],Bt=[`disabled`],Vt=J(O({__name:`StudioHeader`,props:{projectTitle:{},graphVersion:{},canRun:{type:Boolean},canEdit:{type:Boolean},primaryLabel:{}},emits:[`open-projects`,`home`,`commit`,`run`],setup(t){return(n,a)=>(E(),l(`header`,Mt,[e(`div`,Nt,[e(`button`,{class:`home-button`,type:`button`,title:n.$t(`poivelle.discovery.back`),onClick:a[0]||=e=>n.$emit(`home`)},[o(c(fe),{size:16,"aria-hidden":`true`})],8,Pt),e(`span`,Ft,[o(c(Q),{size:15,"aria-hidden":`true`}),a[4]||=r(` POIVELLE`,-1)]),e(`button`,{class:`project-button`,type:`button`,onClick:a[1]||=e=>n.$emit(`open-projects`)},[e(`span`,null,i(t.projectTitle||n.$t(`poivelle.project.noProject`)),1),o(c(ge),{size:14,"aria-hidden":`true`})]),t.graphVersion===void 0?s(``,!0):(E(),l(`span`,It,`Graph v`+i(t.graphVersion),1))]),e(`div`,Lt,[e(`span`,Rt,[a[5]||=e(`span`,{class:`sync-dot`},null,-1),r(` `+i(n.$t(`poivelle.status.synced`)),1)]),t.canEdit?(E(),l(`button`,{key:0,class:`icon-button`,type:`button`,title:n.$t(`poivelle.action.commit`),onClick:a[2]||=e=>n.$emit(`commit`)},[o(c(We),{size:17,"aria-hidden":`true`})],8,zt)):s(``,!0),e(`button`,{class:`primary-button`,type:`button`,disabled:!t.canRun,onClick:a[3]||=e=>n.$emit(`run`)},[o(c(Se),{size:15,fill:`currentColor`,"aria-hidden":`true`}),r(` `+i(t.primaryLabel||n.$t(`poivelle.action.runSkill`)),1)],8,Bt)])]))}}),[[`__scopeId`,`data-v-86d45f69`]]),Ht={class:`production-rail`},Ut={class:`rail-section`},Wt={class:`section-heading`},Gt=[`title`],Kt={class:`project-list`},qt=[`onClick`],Jt={key:0,class:`empty-copy`},Yt={class:`rail-section assets-section`},Xt={class:`section-heading`},Zt=[`title`],Qt={class:`asset-filters`},$t=[`onClick`],en={class:`asset-list`},tn={key:0,class:`empty-copy`},nn={class:`rail-section compact-section`},rn={class:`section-heading static`},an={class:`revision-list`},on={key:0,class:`empty-copy`},sn=J(O({__name:`ProductionRail`,props:{projects:{},currentProjectId:{},assets:{},revisions:{},canEdit:{type:Boolean}},emits:[`select-project`,`create-project`,`import-asset`],setup(t){let r=t,a=[`all`,`character`,`location`,`image`,`video`,`voice`],u=D(`all`),d=x(()=>u.value===`all`?r.assets:r.assets.filter(e=>e.kind===u.value)),f=e=>e===`video`?ke:e===`voice`||e===`music`||e===`sfx`?Be:e===`script`||e===`brand`?H:be;return(r,m)=>(E(),l(`aside`,Ht,[e(`div`,Ut,[e(`div`,Wt,[e(`span`,null,i(r.$t(`poivelle.section.projects`)),1),t.canEdit?(E(),l(`button`,{key:0,type:`button`,title:r.$t(`poivelle.project.create`),onClick:m[0]||=e=>r.$emit(`create-project`)},[o(c(Ce),{size:15,"aria-hidden":`true`})],8,Gt)):s(``,!0)]),e(`div`,Kt,[(E(!0),l(p,null,w(t.projects,a=>(E(),l(`button`,{key:a.id,type:`button`,class:n([`project-row`,{active:a.id===t.currentProjectId}]),onClick:e=>r.$emit(`select-project`,a.id)},[o(c(Q),{size:15,"aria-hidden":`true`}),e(`span`,null,i(a.title),1),e(`small`,null,`v`+i(a.graph_version),1)],10,qt))),128)),t.projects.length?s(``,!0):(E(),l(`p`,Jt,i(r.$t(`poivelle.project.empty`)),1))])]),e(`div`,Yt,[e(`div`,Xt,[e(`span`,null,i(r.$t(`poivelle.section.assets`)),1),t.canEdit?(E(),l(`button`,{key:0,type:`button`,title:r.$t(`poivelle.asset.import`),onClick:m[1]||=e=>r.$emit(`import-asset`)},[o(c(Oe),{size:15,"aria-hidden":`true`})],8,Zt)):s(``,!0)]),e(`div`,Qt,[(E(),l(p,null,w(a,t=>e(`button`,{key:t,type:`button`,class:n({active:u.value===t}),onClick:e=>u.value=t},i(t===`all`?r.$t(`poivelle.asset.all`):t),11,$t)),64))]),e(`div`,en,[(E(!0),l(p,null,w(d.value,t=>(E(),l(`button`,{key:t.id,type:`button`,class:`asset-row`},[(E(),b(T(f(t.kind)),{size:15,"aria-hidden":`true`})),e(`span`,null,[e(`strong`,null,i(t.title),1),e(`small`,null,i(t.kind)+` · `+i(t.scope),1)])]))),128)),d.value.length?s(``,!0):(E(),l(`p`,tn,i(r.$t(`poivelle.asset.empty`)),1))])]),e(`div`,nn,[e(`div`,rn,[e(`span`,null,i(r.$t(`poivelle.section.revisions`)),1),o(c(U),{size:14,"aria-hidden":`true`})]),e(`div`,an,[(E(!0),l(p,null,w(t.revisions.slice(0,4),t=>(E(),l(`div`,{key:t.id,class:`revision-row`},[e(`span`,null,`R`+i(t.revision_number),1),e(`small`,null,`Graph v`+i(t.graph_version),1)]))),128)),t.revisions.length?s(``,!0):(E(),l(`p`,on,i(r.$t(`poivelle.revision.empty`)),1))])])]))}}),[[`__scopeId`,`data-v-71c6054d`]]),cn=[`aria-label`],ln=[`onClick`],un=J(O({__name:`ProjectionTabs`,props:{modelValue:{},canEdit:{type:Boolean}},emits:[`update:modelValue`,`create-node`],setup(t){let a=[{value:`overview`,label:`poivelle.projection.overview`,icon:W},{value:`canvas`,label:`poivelle.projection.advanced`,icon:Ge},{value:`storyboard`,label:`poivelle.projection.storyboard`,icon:Q},{value:`timeline`,label:`poivelle.projection.timeline`,icon:Je},{value:`review`,label:`poivelle.projection.review`,icon:Ke}];return(u,d)=>(E(),l(`nav`,{class:`projection-tabs`,"aria-label":u.$t(`poivelle.projection.label`)},[(E(),l(p,null,w(a,a=>e(`button`,{key:a.value,type:`button`,class:n({active:t.modelValue===a.value}),onClick:e=>u.$emit(`update:modelValue`,a.value)},[(E(),b(T(a.icon),{size:14,"aria-hidden":`true`})),r(` `+i(u.$t(a.label)),1)],10,ln)),64)),d[1]||=e(`span`,{class:`spacer`},null,-1),t.canEdit?(E(),l(`button`,{key:0,class:`add-node`,type:`button`,onClick:d[0]||=e=>u.$emit(`create-node`)},[o(c(Ce),{size:14,"aria-hidden":`true`}),r(` `+i(u.$t(`poivelle.node.create`)),1)])):s(``,!0)],8,cn))}}),[[`__scopeId`,`data-v-393d2d3e`]]),dn={class:`connections`,"aria-hidden":`true`},fn=[`x1`,`y1`,`x2`,`y2`],pn=[`onClick`],mn={class:`node-type`},hn={class:`node-summary`},gn={key:0,class:`lock-mark`},_n={key:0,class:`empty-canvas`},vn=J(O({__name:`GraphCanvas`,props:{graph:{},selectedNodeId:{},canEdit:{type:Boolean}},emits:[`select-node`,`create-node`],setup(a){let u=a,d=x(()=>new Map(u.graph.layouts.map(e=>[e.node_id,e]))),f=e=>{let t=u.graph.nodes.findIndex(t=>t.id===e);return{x:52+t%3*250,y:54+Math.floor(t/3)*170,width:208,height:116}},m=e=>d.value.get(e)??f(e),h=e=>{let t=m(e);return{x:t.x+t.width/2,y:t.y+t.height/2}},g=e=>{let t=m(e);return{left:`${t.x}px`,top:`${t.y}px`,width:`${t.width}px`,minHeight:`${t.height}px`}},_=x(()=>u.graph.edges.filter(e=>u.graph.nodes.some(t=>t.id===e.source.node_id)&&u.graph.nodes.some(t=>t.id===e.target.node_id))),v=e=>{let t=e.payload.text??e.payload.prompt??e.payload.description;return typeof t==`string`&&t?t:`Version ${e.version}`};return(u,d)=>(E(),l(`div`,{class:`graph-canvas`,onClick:d[1]||=t(e=>u.$emit(`select-node`,void 0),[`self`])},[(E(),l(`svg`,dn,[(E(!0),l(p,null,w(_.value,e=>(E(),l(`line`,{key:e.id,x1:h(e.source.node_id).x,y1:h(e.source.node_id).y,x2:h(e.target.node_id).x,y2:h(e.target.node_id).y},null,8,fn))),128))])),(E(!0),l(p,null,w(a.graph.nodes,f=>(E(),l(`button`,{key:f.id,type:`button`,class:n([`graph-node`,`type-${f.node_type}`,{selected:f.id===a.selectedNodeId}]),style:C(g(f.id)),onClick:t(e=>u.$emit(`select-node`,f.id),[`stop`])},[e(`span`,mn,i(f.node_type),1),e(`strong`,null,i(f.title),1),e(`span`,hn,i(v(f)),1),f.locked_paths.length?(E(),l(`span`,gn,[o(c(qe),{size:11}),d[2]||=r(` locked`,-1)])):s(``,!0)],14,pn))),128)),a.graph.nodes.length?s(``,!0):(E(),l(`div`,_n,[o(c(Ge),{size:28,"stroke-width":`1.5`,"aria-hidden":`true`}),e(`h2`,null,i(u.$t(`poivelle.graph.emptyTitle`)),1),e(`p`,null,i(u.$t(`poivelle.graph.emptyBody`)),1),a.canEdit?(E(),l(`button`,{key:0,type:`button`,onClick:d[0]||=e=>u.$emit(`create-node`)},[o(c(Ce),{size:15,"aria-hidden":`true`}),r(` `+i(u.$t(`poivelle.node.create`)),1)])):s(``,!0)]))]))}}),[[`__scopeId`,`data-v-cd67c1fc`]]),yn={class:`media-lane`},bn={key:0,class:`candidate-strip`},xn=[`src`],Sn=[`src`],Cn=[`onClick`],wn={key:1},Tn=[`onClick`],En={key:1,class:`unavailable-takes`},Dn={key:2,class:`empty-candidates`},On=J(O({__name:`StoryboardMediaLane`,props:{title:{},kind:{},nodeIds:{},artifacts:{},takes:{},selections:{},canEdit:{type:Boolean},canSelect:{type:Boolean}},emits:[`select-node`,`select-take`],setup(t){let r=t,a=x(()=>{let e=new Set(r.nodeIds),t=new Map(r.artifacts.map(e=>[e.id,e])),n=r.takes.filter(t=>e.has(t.target_node_id)&&t.state===`ready`).flatMap(e=>[...new Set(e.artifact_ids)].map(e=>t.get(e)).filter(e=>!!e).map(t=>({key:`${e.id}:${t.id}`,take:e,artifact:t,selected:r.selections.some(t=>t.target_node_id===e.target_node_id&&t.take_id===e.id)}))),i=new Set(n.map(e=>e.artifact.id)),a=r.artifacts.filter(t=>e.has(t.node_id??``)&&t.kind===r.kind&&!i.has(t.id)).map(e=>({key:e.id,take:void 0,artifact:e,selected:!1}));return[...n,...a]}),o=x(()=>r.takes.filter(e=>r.nodeIds.includes(e.target_node_id)&&e.state!==`ready`)),c=D([]),u=e=>{c.value=c.value.includes(e)?c.value.filter(t=>t!==e):[...c.value.slice(-1),e]};return(r,d)=>(E(),l(`section`,yn,[e(`header`,null,[e(`span`,null,i(t.title),1),t.nodeIds[0]?(E(),l(`button`,{key:0,type:`button`,onClick:d[0]||=e=>r.$emit(`select-node`,t.nodeIds[0])},i(r.$t(`poivelle.storyboard.openNode`)),1)):s(``,!0)]),a.value.length?(E(),l(`div`,bn,[(E(!0),l(p,null,w(a.value,a=>(E(),l(`article`,{key:a.key,class:n([`candidate`,{selected:a.selected,comparing:c.value.includes(a.key)}])},[t.kind===`image`?(E(),l(`img`,{key:0,src:a.artifact.storage_url,alt:``},null,8,xn)):(E(),l(`video`,{key:1,src:a.artifact.storage_url,controls:``,preload:`metadata`},null,8,Sn)),e(`div`,null,[e(`span`,null,i(a.take?`TAKE`:`ARTIFACT`),1),e(`strong`,null,i(a.artifact.id.slice(-8)),1),t.canEdit&&t.canSelect&&a.take&&!a.selected?(E(),l(`button`,{key:0,type:`button`,onClick:e=>r.$emit(`select-take`,{target_node_id:a.take.target_node_id,take_id:a.take.id})},i(r.$t(`poivelle.storyboard.selectTake`)),9,Cn)):a.selected?(E(),l(`em`,wn,i(r.$t(`poivelle.storyboard.selected`)),1)):s(``,!0),e(`button`,{type:`button`,class:`compare-toggle`,onClick:e=>u(a.key)},i(c.value.includes(a.key)?r.$t(`poivelle.storyboard.comparing`):r.$t(`poivelle.storyboard.compare`)),9,Tn)])],2))),128))])):s(``,!0),o.value.length?(E(),l(`div`,En,[(E(!0),l(p,null,w(o.value,e=>(E(),l(`span`,{key:e.id},i(e.state===`failed`?r.$t(`poivelle.storyboard.failedTake`):r.$t(`poivelle.storyboard.restrictedTake`)),1))),128))])):s(``,!0),!a.value.length&&!o.value.length?(E(),l(`div`,Dn,i(r.$t(`poivelle.storyboard.noCandidates`)),1)):s(``,!0)]))}}),[[`__scopeId`,`data-v-4e385f6a`]]),kn={class:`storyboard-view`},An={key:0,class:`storyboard-heading`},jn={class:`section-label`},Mn=[`onClick`],Nn={class:`shot-number`},Pn={class:`shot-production`},Fn={class:`shot-metadata`},In={class:`prompt-columns`},Ln={class:`candidate-columns`},Rn=[`onClick`],zn={key:0,class:`empty-view`},Bn=J(O({__name:`StoryboardView`,props:{graph:{},storyboard:{},artifacts:{},takes:{},selections:{},selectedNodeId:{},canEdit:{type:Boolean},canSelect:{type:Boolean}},emits:[`select-node`,`select-take`],setup(t){let r=t,a=x(()=>r.storyboard?.sections.reduce((e,t)=>e+t.shots.length,0)??0),u=x(()=>r.graph.nodes.filter(e=>[`storyboard`,`scene`,`shot`,`image`,`video`].includes(e.node_type)));return(r,d)=>(E(),l(`div`,kn,[t.storyboard?(E(),l(`header`,An,[e(`div`,null,[e(`span`,null,i(t.storyboard.schema_ref),1),e(`h2`,null,i(t.storyboard.title),1)]),e(`dl`,null,[e(`div`,null,[e(`dt`,null,i(r.$t(`poivelle.storyboard.product`)),1),e(`dd`,null,i(t.storyboard.product_name),1)]),e(`div`,null,[e(`dt`,null,i(r.$t(`poivelle.storyboard.duration`)),1),e(`dd`,null,i(t.storyboard.target_duration_seconds)+`s`,1)]),e(`div`,null,[e(`dt`,null,i(r.$t(`poivelle.storyboard.shots`)),1),e(`dd`,null,i(a.value),1)])])])):s(``,!0),t.storyboard?(E(!0),l(p,{key:1},w(t.storyboard.sections,a=>(E(),l(`section`,{key:a.id,class:`story-section`},[e(`div`,jn,[e(`span`,null,i(String(a.order).padStart(2,`0`)),1),e(`h3`,null,i(a.title),1)]),(E(!0),l(p,null,w(a.shots,a=>(E(),l(`article`,{key:a.row.id,class:n([`shot-row`,{selected:a.shot_node_id===t.selectedNodeId}])},[e(`button`,{class:`shot-brief`,type:`button`,onClick:e=>r.$emit(`select-node`,a.shot_node_id)},[e(`span`,Nn,`SHOT `+i(String(a.row.shot_number).padStart(2,`0`)),1),e(`strong`,null,i(a.row.plot_description),1),e(`span`,null,i(a.row.duration_seconds)+`s · `+i(a.row.shot_size),1)],8,Mn),e(`div`,Pn,[e(`dl`,Fn,[e(`div`,null,[e(`dt`,null,i(r.$t(`poivelle.storyboard.action`)),1),e(`dd`,null,i(a.row.character_action||`—`),1)]),e(`div`,null,[e(`dt`,null,i(r.$t(`poivelle.storyboard.emotion`)),1),e(`dd`,null,i(a.row.emotion||`—`),1)]),e(`div`,null,[e(`dt`,null,i(r.$t(`poivelle.storyboard.lighting`)),1),e(`dd`,null,i(a.row.lighting_and_atmosphere),1)]),e(`div`,null,[e(`dt`,null,i(r.$t(`poivelle.storyboard.audio`)),1),e(`dd`,null,i(a.row.audio_effects),1)])]),e(`div`,In,[e(`div`,null,[e(`span`,null,i(r.$t(`poivelle.storyboard.imagePrompt`)),1),e(`p`,null,i(a.row.image_generation_prompt),1)]),e(`div`,null,[e(`span`,null,i(r.$t(`poivelle.storyboard.motionPrompt`)),1),e(`p`,null,i(a.row.video_motion_prompt),1)])])]),e(`div`,Ln,[o(On,{title:r.$t(`poivelle.storyboard.frames`),kind:`image`,"node-ids":a.image_node_ids,artifacts:t.artifacts,takes:t.takes,selections:t.selections,"can-edit":t.canEdit,"can-select":t.canSelect,onSelectNode:d[0]||=e=>r.$emit(`select-node`,e),onSelectTake:d[1]||=e=>r.$emit(`select-take`,e)},null,8,[`title`,`node-ids`,`artifacts`,`takes`,`selections`,`can-edit`,`can-select`]),o(On,{title:r.$t(`poivelle.storyboard.motion`),kind:`video`,"node-ids":a.video_node_ids,artifacts:t.artifacts,takes:t.takes,selections:t.selections,"can-edit":t.canEdit,"can-select":t.canSelect,onSelectNode:d[2]||=e=>r.$emit(`select-node`,e),onSelectTake:d[3]||=e=>r.$emit(`select-take`,e)},null,8,[`title`,`node-ids`,`artifacts`,`takes`,`selections`,`can-edit`,`can-select`])])],2))),128))]))),128)):(E(),l(p,{key:2},[(E(!0),l(p,null,w(u.value,(a,s)=>(E(),l(`button`,{key:a.id,type:`button`,class:n([`legacy-card`,{selected:a.id===t.selectedNodeId}]),onClick:e=>r.$emit(`select-node`,a.id)},[e(`span`,null,i(String(s+1).padStart(2,`0`)),1),o(c(Q),{size:26,"stroke-width":`1.25`,"aria-hidden":`true`}),e(`strong`,null,i(a.title),1)],10,Rn))),128)),u.value.length?s(``,!0):(E(),l(`div`,zn,[o(c(Q),{size:30,"stroke-width":`1.4`}),e(`h2`,null,i(r.$t(`poivelle.storyboard.emptyTitle`)),1),e(`p`,null,i(r.$t(`poivelle.storyboard.emptyBody`)),1)]))],64))]))}}),[[`__scopeId`,`data-v-ce90da94`]]),Vn={class:`timeline-view`},Hn={key:0,class:`master-output`,"aria-labelledby":`poivelle-master-title`},Un={class:`master-heading`},Wn={class:`master-kicker`},Gn={id:`poivelle-master-title`},Kn=[`href`],qn=[`src`,`aria-label`],Jn={key:0,class:`master-status`,role:`status`},Yn={key:1,class:`master-status is-error`,role:`alert`},Xn={class:`master-metadata`},Zn={class:`timeline-ruler`},Qn={key:1,class:`tracks`},$n={class:`track-label`},er={class:`track-lane`},tr=[`title`],nr=[`aria-label`],rr={key:0,class:`clip-actions`},ir=[`disabled`,`onClick`],ar=[`disabled`,`onClick`],or={key:2,class:`empty-timeline`},sr=120/5e3,cr=J(O({__name:`TimelineView`,props:{timeline:{},graph:{},artifacts:{},canEdit:{type:Boolean}},emits:[`move-clip`],setup(t){let n=t,a=x(()=>{let e=new Set(n.graph.nodes.filter(e=>e.node_type===`composition`).map(e=>e.id));return[...n.artifacts??[]].filter(t=>t.kind===`video`&&t.state===`committed`&&t.restriction_watermark===0&&!!t.node_id&&e.has(t.node_id)&&t.metadata?.operation===`compose.timeline@1`).sort((e,t)=>t.created_at.localeCompare(e.created_at))[0]}),u=D(!0),d=D(!1);_(()=>a.value?.id,()=>{u.value=!0,d.value=!1});let f=()=>{u.value=!0,d.value=!1},m=()=>{u.value=!1,d.value=!0},h=e=>{let t=a.value?.metadata?.[e];return typeof t==`number`&&Number.isFinite(t)?t:void 0},g=x(()=>{let e=h(`duration_ms`);return e===void 0?`—`:`${(e/1e3).toFixed(1)}s`}),v=x(()=>{let e=h(`width`),t=h(`height`);return e&&t?`${e} × ${t}`:`—`}),y=x(()=>{let e=h(`width`),t=h(`height`);return e&&t?{aspectRatio:`${e} / ${t}`}:void 0}),b=e=>n.timeline?.clips.filter(t=>t.track_id===e)??[],S=e=>e.artifact_id.slice(-6),T=e=>({left:`${e.timeline_start_ms*sr}px`,width:`${Math.max(48,(e.source_out_ms-e.source_in_ms)/(e.speed??1)*sr)}px`});return(n,_)=>(E(),l(`div`,Vn,[a.value?(E(),l(`section`,Hn,[e(`div`,Un,[e(`div`,null,[e(`span`,Wn,i(n.$t(`poivelle.timeline.deliverable`)),1),e(`h2`,Gn,i(n.$t(`poivelle.timeline.masterTitle`)),1)]),e(`a`,{class:`master-download`,href:a.value.storage_url,target:`_blank`,rel:`noopener noreferrer`,download:``},[o(c(ye),{size:15,"aria-hidden":`true`}),r(` `+i(n.$t(`poivelle.timeline.download`)),1)],8,Kn)]),e(`div`,{class:`master-media`,style:C(y.value)},[e(`video`,{class:`master-player`,src:a.value.storage_url,"aria-label":n.$t(`poivelle.timeline.playerLabel`),controls:``,playsinline:``,preload:`metadata`,onLoadstart:f,onLoadedmetadata:_[0]||=e=>u.value=!1,onCanplay:_[1]||=e=>u.value=!1,onError:m},null,40,qn),u.value&&!d.value?(E(),l(`div`,Jn,[o(c(xe),{size:24,class:`is-spinning`,"aria-hidden":`true`}),e(`span`,null,i(n.$t(`poivelle.timeline.loading`)),1)])):s(``,!0),d.value?(E(),l(`div`,Yn,[o(c(De),{size:24,"aria-hidden":`true`}),e(`span`,null,i(n.$t(`poivelle.timeline.loadError`)),1)])):s(``,!0)],4),e(`dl`,Xn,[e(`div`,null,[e(`dt`,null,i(n.$t(`poivelle.timeline.duration`)),1),e(`dd`,null,i(g.value),1)]),e(`div`,null,[e(`dt`,null,i(n.$t(`poivelle.timeline.frame`)),1),e(`dd`,null,i(v.value),1)]),e(`div`,null,[e(`dt`,null,i(n.$t(`poivelle.timeline.videoClips`)),1),e(`dd`,null,i(h(`video_clips`)??`—`),1)]),e(`div`,null,[e(`dt`,null,i(n.$t(`poivelle.timeline.audioClips`)),1),e(`dd`,null,i(h(`audio_clips`)??`—`),1)])])])):s(``,!0),e(`div`,Zn,[(E(),l(p,null,w(10,t=>e(`span`,{key:t},i((t-1)*5)+`s`,1)),64))]),t.timeline?.tracks.length?(E(),l(`div`,Qn,[(E(!0),l(p,null,w(t.timeline.tracks,r=>(E(),l(`div`,{key:r.id,class:`track-row`},[e(`div`,$n,i(r.title||r.kind||r.id),1),e(`div`,er,[(E(!0),l(p,null,w(b(r.id),(a,o)=>(E(),l(`div`,{key:a.id,class:`timeline-clip`,style:C(T(a)),title:a.artifact_id},[e(`button`,{type:`button`,"aria-label":a.artifact_id},i(S(a)),9,nr),t.canEdit&&r.kind===`video`?(E(),l(`span`,rr,[e(`button`,{type:`button`,disabled:o===0,onClick:e=>n.$emit(`move-clip`,{trackId:r.id,clipId:a.id,direction:-1})},` ‹ `,8,ir),e(`button`,{type:`button`,disabled:o===b(r.id).length-1,onClick:e=>n.$emit(`move-clip`,{trackId:r.id,clipId:a.id,direction:1})},` › `,8,ar)])):s(``,!0)],12,tr))),128))])]))),128))])):(E(),l(`div`,or,[o(c(Ue),{size:30,"stroke-width":`1.4`}),e(`h2`,null,i(n.$t(`poivelle.timeline.emptyTitle`)),1),e(`p`,null,i(n.$t(`poivelle.timeline.emptyBody`)),1)]))]))}}),[[`__scopeId`,`data-v-37eb37c8`]]),lr={class:`review-view`},ur={class:`review-summary`},dr={class:`eyebrow`},fr={class:`summary-metrics`},pr={class:`review-columns`},mr={key:0,class:`item-actions`},hr=[`onClick`],gr={key:0,class:`empty-copy`},_r=[`onClick`],vr=[`onClick`],yr={key:0,class:`empty-copy`},br={key:1,class:`run-detail`},xr={key:0},Sr=[`onClick`],Cr={key:2,class:`forensic-failures`,role:`alert`},wr=J(O({__name:`ReviewView`,props:{graph:{},proposals:{},revisions:{},runs:{},activeRun:{},evaluations:{},forensicValidations:{},costs:{},canEdit:{type:Boolean}},emits:[`reject-proposal`,`cancel-run`,`open-run`,`retry-step`],setup(a){let o=a,c=x(()=>o.proposals.filter(e=>e.state===`awaiting_approval`)),u=e=>![`release_pending`,`succeeded`,`failed`,`cancelled`].includes(e.state),d=x(()=>o.evaluations.filter(e=>e.verdict===`pass`).length),f=x(()=>o.forensicValidations[0]),m=x(()=>f.value?.result.checks.filter(e=>e.verdict===`fail`)??[]),h=e=>[...o.activeRun?.attempts??[]].filter(t=>t.step_run_id===e).sort((e,t)=>t.created_at.localeCompare(e.created_at))[0],g=e=>(e/1e6).toFixed(2);return(o,_)=>(E(),l(`div`,lr,[e(`section`,ur,[e(`div`,null,[e(`span`,dr,i(o.$t(`poivelle.review.heading`)),1),e(`h2`,null,i(a.revisions.length?`Revision ${a.revisions[0].revision_number}`:o.$t(`poivelle.review.noRevision`)),1)]),e(`div`,fr,[e(`span`,null,[e(`strong`,null,i(a.graph.nodes.length),1),r(i(o.$t(`poivelle.review.nodes`)),1)]),e(`span`,null,[e(`strong`,null,i(a.proposals.length),1),r(i(o.$t(`poivelle.review.proposals`)),1)]),e(`span`,null,[e(`strong`,null,i(a.runs.length),1),r(i(o.$t(`poivelle.review.runs`)),1)]),e(`span`,null,[e(`strong`,null,i(g(a.costs?.totals_microcredits.final??0)),1),r(i(o.$t(`poivelle.review.finalCost`)),1)]),e(`span`,null,[e(`strong`,null,i(d.value)+`/`+i(a.evaluations.length),1),r(i(o.$t(`poivelle.review.qualityChecks`)),1)]),e(`span`,null,[e(`strong`,{class:n(f.value?.result.verdict===`fail`?`metric-fail`:``)},i(f.value?.result.verdict??`—`),3),r(i(o.$t(`poivelle.review.forensics`)),1)])])]),e(`section`,pr,[e(`div`,null,[e(`h3`,null,i(o.$t(`poivelle.review.pendingProposals`)),1),(E(!0),l(p,null,w(c.value,t=>(E(),l(`article`,{key:t.id,class:`review-item`},[e(`span`,{class:n([`risk`,`risk-${t.risk_class}`])},i(t.risk_class),3),e(`strong`,null,i(t.intent),1),e(`p`,null,i(t.rationale),1),a.canEdit?(E(),l(`div`,mr,[e(`span`,null,i(o.$t(`poivelle.review.approvalTokenRequired`)),1),e(`button`,{type:`button`,onClick:e=>o.$emit(`reject-proposal`,t.id)},i(o.$t(`poivelle.review.reject`)),9,hr)])):s(``,!0)]))),128)),c.value.length?s(``,!0):(E(),l(`p`,gr,i(o.$t(`poivelle.review.noProposals`)),1))]),e(`div`,null,[e(`h3`,null,i(o.$t(`poivelle.review.execution`)),1),(E(!0),l(p,null,w(a.runs,r=>(E(),l(`article`,{key:r.id,class:n([`run-item`,{active:a.activeRun?.run.id===r.id}]),onClick:e=>o.$emit(`open-run`,r.id)},[e(`span`,{class:n([`run-state`,`state-${r.state}`])},null,2),e(`div`,null,[e(`strong`,null,i(r.state),1),e(`small`,null,i(r.id),1)]),a.canEdit&&u(r)?(E(),l(`button`,{key:0,type:`button`,class:`cancel-run`,onClick:t(e=>o.$emit(`cancel-run`,r.id),[`stop`])},i(o.$t(`poivelle.run.cancel`)),9,vr)):s(``,!0)],10,_r))),128)),a.runs.length?s(``,!0):(E(),l(`p`,yr,i(o.$t(`poivelle.review.noRuns`)),1)),a.activeRun?(E(),l(`section`,br,[e(`header`,null,[e(`strong`,null,i(o.$t(`poivelle.review.runDetail`)),1),e(`span`,null,i(a.activeRun.attempts.length)+` `+i(o.$t(`poivelle.review.attempts`)),1)]),(E(!0),l(p,null,w(a.activeRun.steps,r=>(E(),l(`article`,{key:r.id,class:`step-item`},[e(`span`,{class:n([`run-state`,`state-${r.state}`])},null,2),e(`div`,null,[e(`strong`,null,i(r.operation),1),e(`small`,null,i(r.state)+` · `+i(r.node_id),1),h(r.id)?.error?(E(),l(`p`,xr,i(h(r.id)?.error?.code??`provider_error`)+`: `+i(h(r.id)?.error?.message??o.$t(`poivelle.error.generic`)),1)):s(``,!0)]),a.canEdit&&[`failed`,`manual_recovery`].includes(r.state)?(E(),l(`button`,{key:0,type:`button`,class:`retry-step`,onClick:t(e=>o.$emit(`retry-step`,r),[`stop`])},i(o.$t(`poivelle.review.retryStep`)),9,Sr)):s(``,!0)]))),128))])):s(``,!0),m.value.length?(E(),l(`section`,Cr,[e(`strong`,null,i(o.$t(`poivelle.review.forensics`)),1),(E(!0),l(p,null,w(m.value,e=>(E(),l(`p`,{key:e.code},i(e.code)+` · `+i(String(e.actual??`—`))+` / `+i(String(e.expected??`—`)),1))),128))])):s(``,!0)])])]))}}),[[`__scopeId`,`data-v-e66361d5`]]),Tr={class:`inspector-panel`},Er={class:`inspector-heading`},Dr={class:`field`},Or={class:`field`},kr=[`value`],Ar={class:`field grow`},jr={class:`node-meta`},Mr={key:1,class:`empty-inspector`},Nr=J(O({__name:`InspectorPanel`,props:{node:{}},emits:[`update`,`delete`],setup(t,{emit:n}){let a=t,s=n,u=D(``),f=D(``);_(()=>a.node,e=>{u.value=e?.title??``;let t=e?.payload.prompt??e?.payload.text??``;f.value=typeof t==`string`?t:``},{immediate:!0});let m=x(()=>a.node?a.node.node_type===`video`?ke:a.node.node_type===`audio`?Be:[`shot`,`scene`,`storyboard`].includes(a.node.node_type)?Q:[`image`,`character`,`location`].includes(a.node.node_type)?be:a.node.node_type===`script`||a.node.node_type===`text`?H:he:G),h=()=>{let e=u.value.trim();a.node&&e&&e!==a.node.title&&s(`update`,{path:`/title`,value:e})},y=()=>{if(!a.node)return;let e=a.node.payload.prompt===void 0?`text`:`prompt`;f.value!==a.node.payload[e]&&s(`update`,{path:`/payload/${e}`,value:f.value})};return(n,a)=>(E(),l(`aside`,Tr,[e(`div`,Er,[e(`div`,null,[e(`span`,null,i(n.$t(`poivelle.section.inspector`)),1),e(`strong`,null,i(t.node?.title||n.$t(`poivelle.inspector.noSelection`)),1)]),(E(),b(T(m.value),{size:18,"aria-hidden":`true`}))]),t.node?(E(),l(p,{key:0},[e(`label`,Dr,[e(`span`,null,i(n.$t(`poivelle.field.title`)),1),v(e(`input`,{"onUpdate:modelValue":a[0]||=e=>u.value=e,type:`text`,onBlur:h,onKeydown:d(h,[`enter`])},null,544),[[g,u.value]])]),e(`label`,Or,[e(`span`,null,i(n.$t(`poivelle.field.type`)),1),e(`input`,{value:t.node.node_type,type:`text`,disabled:``},null,8,kr)]),e(`label`,Ar,[e(`span`,null,i(n.$t(`poivelle.field.prompt`)),1),v(e(`textarea`,{"onUpdate:modelValue":a[1]||=e=>f.value=e,rows:`8`,onBlur:y},null,544),[[g,f.value]])]),e(`div`,jr,[a[3]||=e(`span`,null,`NODE`,-1),e(`code`,null,i(t.node.id),1),a[4]||=e(`span`,null,`VERSION`,-1),e(`code`,null,i(t.node.version),1)]),e(`button`,{class:`danger-button`,type:`button`,onClick:a[2]||=e=>n.$emit(`delete`)},[o(c(Ee),{size:14,"aria-hidden":`true`}),r(` `+i(n.$t(`poivelle.node.delete`)),1)])],64)):(E(),l(`div`,Mr,[o(c(G),{size:24,"stroke-width":`1.4`}),e(`p`,null,i(n.$t(`poivelle.inspector.empty`)),1)]))]))}}),[[`__scopeId`,`data-v-7a6ae318`]]),Pr={class:`agent-dock`},Fr={class:`agent-identity`},Ir={class:`proposal-strip`},Lr=[`onClick`],Rr={key:0},zr=[`disabled`],Br=J(O({__name:`AgentDock`,props:{proposals:{},selectedNodeId:{},skill:{},canEdit:{type:Boolean}},emits:[`run`,`open-proposal`],setup(t){let a=t,u=x(()=>a.proposals.filter(e=>e.state===`awaiting_approval`));return(a,d)=>(E(),l(`section`,Pr,[e(`div`,Fr,[o(c(Ve),{size:16,"aria-hidden":`true`}),e(`div`,null,[e(`strong`,null,i(a.$t(`poivelle.agent.title`)),1),e(`span`,null,i(t.skill),1)])]),e(`div`,Ir,[(E(!0),l(p,null,w(u.value,t=>(E(),l(`button`,{key:t.id,type:`button`,onClick:e=>a.$emit(`open-proposal`,t.id)},[e(`span`,{class:n([`risk-dot`,`risk-${t.risk_class}`])},null,2),e(`strong`,null,i(t.intent),1),e(`small`,null,i(t.state),1)],8,Lr))),128)),u.value.length?s(``,!0):(E(),l(`p`,Rr,i(a.$t(`poivelle.agent.noProposals`)),1))]),t.canEdit?(E(),l(`button`,{key:0,class:`agent-button`,type:`button`,disabled:!t.selectedNodeId,onClick:d[0]||=e=>a.$emit(`run`)},[o(c(Te),{size:15,"aria-hidden":`true`}),r(` `+i(a.$t(`poivelle.agent.plan`)),1)],8,zr)):s(``,!0)]))}}),[[`__scopeId`,`data-v-81fac9f8`]]),Vr={class:`project-guide`,"aria-labelledby":`project-guide-title`},Hr={class:`guide-copy`},Ur={id:`project-guide-title`},Wr={class:`guide-body`},Gr={class:`project-facts`},Kr={class:`guide-actions`},qr=[`disabled`],Jr={class:`cost-note`},Yr={class:`production-steps`},Xr={class:`done`},Zr=[`value`,`max`],Qr=[`value`,`max`],$r=J(O({__name:`ProjectGuide`,props:{projectTitle:{},graph:{},storyboard:{},artifacts:{},takes:{},selections:{},canEdit:{type:Boolean},busy:{type:Boolean}},emits:[`generate-node`,`open-storyboard`],setup(t){let a=t,u=x(()=>a.storyboard?a.storyboard.sections.flatMap(e=>e.shots.flatMap(e=>e.image_node_ids)):a.graph.nodes.filter(e=>e.node_type===`image`).map(e=>e.id)),d=x(()=>a.storyboard?a.storyboard.sections.flatMap(e=>e.shots.flatMap(e=>e.video_node_ids)):a.graph.nodes.filter(e=>e.node_type===`video`).map(e=>e.id)),f=x(()=>new Set([...a.artifacts.filter(e=>e.state===`committed`).flatMap(e=>e.node_id??[]),...a.takes.filter(e=>e.state===`ready`).map(e=>e.target_node_id)])),p=x(()=>u.value.filter(e=>f.value.has(e)).length),m=x(()=>d.value.filter(e=>f.value.has(e)).length),h=x(()=>new Set(a.selections.map(e=>e.target_node_id))),g=x(()=>u.value.filter(e=>h.value.has(e)).length),_=x(()=>d.value.filter(e=>h.value.has(e)).length),v=x(()=>p.value===u.value.length&&g.value<u.value.length||m.value===d.value.length&&_.value<d.value.length),y=x(()=>a.graph.nodes.some(e=>e.node_type===`output`)),S=x(()=>{let e=new Set(a.graph.nodes.filter(e=>e.node_type===`output`).map(e=>e.id));return a.artifacts.some(t=>t.state===`committed`&&!!t.node_id&&e.has(t.node_id))}),C=x(()=>{let e=u.value.find(e=>!f.value.has(e));if(e)return a.graph.nodes.find(t=>t.id===e);if(g.value<u.value.length)return;let t=d.value.find(e=>!f.value.has(e));if(t)return a.graph.nodes.find(e=>e.id===t);if(!(_.value<d.value.length))return a.graph.nodes.find(e=>e.node_type===`audio`&&!f.value.has(e.id))}),w=x(()=>(a.storyboard?.sections.reduce((e,t)=>e+t.shots.length,0)??a.graph.nodes.filter(e=>e.node_type===`shot`).length)||d.value.length),T=x(()=>{let e=a.graph.nodes.find(e=>e.node_type===`script`),t=Number(e?.payload?.target_duration_seconds);return a.storyboard?.target_duration_seconds??(Number.isFinite(t)?t:40)}),D=x(()=>{let e=a.graph.nodes.find(e=>e.node_type===`script`);return String(e?.payload?.aspect_ratio??`16:9`)}),O=x(()=>C.value?.node_type===`image`?q(`poivelle.guide.generateFrame`,{current:p.value+1,total:u.value.length}):C.value?.node_type===`video`?q(`poivelle.guide.generateMotion`,{current:m.value+1,total:d.value.length}):q(`poivelle.guide.generateScore`));return(a,f)=>(E(),l(`section`,Vr,[e(`div`,Hr,[e(`p`,null,i(a.$t(`poivelle.guide.kicker`)),1),e(`h1`,Ur,i(a.$t(`poivelle.guide.title`,{title:t.projectTitle})),1),e(`p`,Wr,i(a.$t(`poivelle.guide.body`)),1),e(`dl`,Gr,[e(`div`,null,[e(`dt`,null,i(a.$t(`poivelle.guide.duration`)),1),e(`dd`,null,i(T.value)+`s`,1)]),e(`div`,null,[e(`dt`,null,i(a.$t(`poivelle.guide.shots`)),1),e(`dd`,null,i(w.value),1)]),e(`div`,null,[e(`dt`,null,i(a.$t(`poivelle.guide.format`)),1),e(`dd`,null,i(D.value),1)])]),e(`div`,Kr,[C.value?(E(),l(`button`,{key:0,type:`button`,class:`primary-action`,disabled:!t.canEdit||t.busy,onClick:f[0]||=e=>a.$emit(`generate-node`,C.value.id)},[t.busy?(E(),b(c(xe),{key:0,size:17,class:`spinning`,"aria-hidden":`true`})):(E(),b(c(Te),{key:1,size:17,"aria-hidden":`true`})),r(` `+i(O.value),1)],8,qr)):(E(),l(`button`,{key:1,type:`button`,class:`primary-action`,onClick:f[1]||=e=>a.$emit(`open-storyboard`)},[o(c(Q),{size:17,"aria-hidden":`true`}),r(` `+i(v.value?a.$t(`poivelle.guide.chooseResults`):a.$t(`poivelle.guide.reviewResults`)),1)])),e(`button`,{type:`button`,class:`secondary-action`,onClick:f[2]||=e=>a.$emit(`open-storyboard`)},[r(i(a.$t(`poivelle.guide.reviewPlan`))+` `,1),o(c(pe),{size:15,"aria-hidden":`true`})])]),e(`p`,Jr,[o(c(Ye),{size:14,"aria-hidden":`true`}),r(` `+i(a.$t(`poivelle.guide.costNote`)),1)])]),e(`ol`,Yr,[e(`li`,Xr,[e(`span`,null,[o(c(V),{size:15,"aria-hidden":`true`})]),e(`div`,null,[e(`strong`,null,i(a.$t(`poivelle.guide.stepPlan`)),1),e(`p`,null,i(a.$t(`poivelle.guide.stepPlanBody`,{shots:w.value})),1)]),e(`small`,null,i(a.$t(`poivelle.guide.ready`)),1)]),e(`li`,{class:n({current:g.value<u.value.length,done:u.value.length>0&&g.value===u.value.length})},[f[3]||=e(`span`,null,`2`,-1),e(`div`,null,[e(`strong`,null,i(a.$t(`poivelle.guide.stepFrames`)),1),e(`p`,null,i(a.$t(`poivelle.guide.stepFramesBody`)),1),e(`progress`,{value:p.value,max:Math.max(u.value.length,1)},null,8,Zr)]),e(`small`,null,i(p.value)+` `+i(a.$t(`poivelle.guide.generated`))+` · `+i(g.value)+` `+i(a.$t(`poivelle.guide.selected`)),1)],2),e(`li`,{class:n({current:g.value===u.value.length&&_.value<d.value.length,done:d.value.length>0&&_.value===d.value.length})},[f[4]||=e(`span`,null,`3`,-1),e(`div`,null,[e(`strong`,null,i(a.$t(`poivelle.guide.stepMotion`)),1),e(`p`,null,i(a.$t(`poivelle.guide.stepMotionBody`)),1),e(`progress`,{value:m.value,max:Math.max(d.value.length,1)},null,8,Qr)]),e(`small`,null,i(m.value)+` `+i(a.$t(`poivelle.guide.generated`))+` · `+i(_.value)+` `+i(a.$t(`poivelle.guide.selected`)),1)],2),y.value?(E(),l(`li`,{key:0,class:n({current:_.value===d.value.length&&!S.value,done:S.value})},[f[5]||=e(`span`,null,`4`,-1),e(`div`,null,[e(`strong`,null,i(a.$t(`poivelle.guide.stepMaster`)),1),e(`p`,null,i(a.$t(`poivelle.guide.stepMasterBody`)),1)]),e(`small`,null,i(S.value?a.$t(`poivelle.guide.ready`):a.$t(`poivelle.guide.waiting`)),1)],2)):s(``,!0)])]))}}),[[`__scopeId`,`data-v-86112731`]]),ei={class:`poivelle-studio`},ti={key:0,class:`error-banner`},ni={key:1,class:`loading-state`},ri={key:2,class:`studio-body`},ii={class:`projection-workspace`},ai={class:`projection-content`},oi={key:3,class:`onboarding`},si={key:0,class:`dry-run-summary`},ci={class:`dry-run-note`},li=J(O({__name:`StudioWorkspace`,emits:[`back-home`],setup(n){let d=Ne(),m=x(()=>d.state.poivelle),h=x(()=>m.value?.workspaces??[]),g=x(()=>m.value?.projects??[]),_=x(()=>m.value?.graph),v=x(()=>m.value?.assets??[]),y=x(()=>m.value?.artifacts??[]),C=x(()=>m.value?.takes??[]),T=x(()=>m.value?.selections??[]),O=x(()=>m.value?.storyboard),k=x(()=>m.value?.revisions??[]),A=x(()=>m.value?.proposals??[]),ee=x(()=>m.value?.runs??[]),j=x(()=>m.value?.activeRun),M=x(()=>m.value?.evaluations??[]),te=x(()=>m.value?.forensicValidations??[]),ne=x(()=>m.value?.costs),re=x(()=>m.value?.timeline),N=x(()=>m.value?.projection??`overview`),P=x(()=>m.value?.selectedNodeId),F=x(()=>_.value?.nodes.find(e=>e.id===P.value)),I=x(()=>g.value.find(e=>e.id===m.value?.currentProjectId)),L=x(()=>[`owner`,`producer`,`director`,`editor`].includes(m.value?.currentMembership?.role??``)),ie=x(()=>m.value?.dryRun),ae=x(()=>m.value?.error),oe=x(()=>[m.value?.status?.bootstrap,m.value?.status?.graph].includes(Me.Request)),z=x(()=>new Set([...y.value.filter(e=>e.state===`committed`).flatMap(e=>e.node_id??[]),...C.value.filter(e=>e.state===`ready`).map(e=>e.target_node_id)])),le=x(()=>new Set(T.value.map(e=>e.target_node_id))),ue=x(()=>O.value?O.value.sections.flatMap(e=>e.shots.flatMap(e=>e.image_node_ids)):_.value?.nodes.filter(e=>e.node_type===`image`).map(e=>e.id)??[]),fe=x(()=>O.value?O.value.sections.flatMap(e=>e.shots.flatMap(e=>e.video_node_ids)):_.value?.nodes.filter(e=>e.node_type===`video`).map(e=>e.id)??[]),pe=x(()=>ue.value.length>0&&ue.value.every(e=>z.value.has(e))&&ue.value.some(e=>!le.value.has(e))||fe.value.length>0&&fe.value.every(e=>z.value.has(e))&&fe.value.some(e=>!le.value.has(e))),me=x(()=>{let e=ue.value.find(e=>!z.value.has(e));if(e)return _.value?.nodes.find(t=>t.id===e);if(ue.value.some(e=>!le.value.has(e)))return;let t=fe.value.find(e=>!z.value.has(e));if(t)return _.value?.nodes.find(e=>e.id===t);if(fe.value.some(e=>!le.value.has(e)))return;let n=_.value?.nodes.find(e=>e.node_type===`audio`&&!z.value.has(e.id));if(n)return n}),he=x(()=>me.value?.node_type===`image`?q(`poivelle.guide.generateNextFrame`):me.value?.node_type===`video`?q(`poivelle.guide.generateNextMotion`):me.value?.node_type===`audio`?q(`poivelle.guide.generateScore`):q(`poivelle.guide.continue`)),V=D(!1),ge=D(!1),_e=D(!1),ve=D(!1),ye=D(!1),H=D(!1),U=f({name:``,monthly_limit_microcredits:void 0}),W=f({workspace_id:``,title:``,workflow:`blank`,skill:`film.drama.short@1.0.0`,product_name:``,product_category:`professional action imaging device`,brand_tone:`precise, fearless, cinematic, premium`,aspect_ratio:`16:9`}),be=[{label:q(`poivelle.project.blankWorkflow`),value:`blank`},{label:q(`poivelle.project.commercialTVC`),value:`commercial_tvc`}],G=f({node_type:`scene`,title:``,prompt:``}),K=f({title:``,kind:`image`,source_url:``,content_hash:``}),Se=[`script`,`character`,`location`,`prop`,`storyboard`,`scene`,`shot`,`image`,`video`,`audio`,`subtitle`,`composition`,`output`,`note`],we=[`character`,`location`,`prop`,`image`,`video`,`voice`,`music`,`sfx`,`brand`],Te=()=>d.dispatch(`poivelle/bootstrap`),Ee=e=>d.dispatch(`poivelle/loadProject`,e),Oe=e=>d.dispatch(`poivelle/selectNode`,e),ke=e=>d.dispatch(`poivelle/setProjection`,e),J=()=>{W.workspace_id=m.value?.currentWorkspaceId??h.value[0]?.id??``,_e.value=!0},Z=async()=>{U.name.trim()&&await $(async()=>{await d.dispatch(`poivelle/createWorkspace`,{...U,name:U.name.trim()}),ge.value=!1,J()})},Fe=async()=>{!W.workspace_id||!W.title.trim()||await $(async()=>{W.workflow===`commercial_tvc`?(await d.dispatch(`poivelle/createCommercialTVCProject`,{workspace_id:W.workspace_id,title:W.title.trim(),product_name:W.product_name.trim()||W.title.trim(),product_category:W.product_category.trim(),brand_tone:W.brand_tone.trim(),aspect_ratio:W.aspect_ratio,managed_execution:!1}),ke(`storyboard`)):await d.dispatch(`poivelle/createProject`,{workspace_id:W.workspace_id,title:W.title.trim(),skill:W.skill,domain:`film.drama.short`}),_e.value=!1,W.title=``})},Ie=async()=>{G.title.trim()&&await $(async()=>{await d.dispatch(`poivelle/createNode`,{node_type:G.node_type,title:G.title.trim(),payload:{prompt:G.prompt}}),ve.value=!1,G.title=``,G.prompt=``})},Le=async()=>{!m.value?.currentWorkspaceId||!K.title||!K.source_url||!K.content_hash||await $(async()=>{await d.dispatch(`poivelle/importAsset`,{...K,project_id:m.value.currentProjectId}),ye.value=!1})},Re=e=>d.dispatch(`poivelle/updateSelectedNode`,e),Be=async()=>{await je.confirm(q(`poivelle.node.deleteConfirm`),``,{type:`warning`}),await d.dispatch(`poivelle/deleteSelectedNode`)},Ve=async()=>{await d.dispatch(`poivelle/commitRevision`,`Studio checkpoint`),Pe.success(q(`poivelle.revision.committed`))},He=async()=>{F.value&&await $(async()=>{await d.dispatch(`poivelle/dryRun`,F.value?.node_type===`composition`?`compose`:`generate`),H.value=!0})},We=async e=>{await Oe(e),await a(),await He()},Ge=async()=>{if(N.value===`overview`){me.value?await We(me.value.id):pe.value&&ke(`storyboard`);return}F.value&&await He()},Ke=async()=>{await $(async()=>{let e=await d.dispatch(`poivelle/confirmDryRun`);H.value=!1,e&&Pe.success(q(`poivelle.run.queued`))})},qe=e=>{ke(`review`),Pe.info(`${q(`poivelle.agent.proposal`)} ${e.slice(-8)}`)},Je=async e=>{await je.confirm(q(`poivelle.review.rejectConfirm`),``,{type:`warning`}),await $(()=>d.dispatch(`poivelle/rejectProposal`,e))},Ye=async e=>{await je.confirm(q(`poivelle.run.cancelConfirm`),``,{type:`warning`}),await $(()=>d.dispatch(`poivelle/cancelRun`,e))},Xe=e=>$(()=>d.dispatch(`poivelle/loadRun`,e)),Ze=async e=>{await $(async()=>{await d.dispatch(`poivelle/retryStep`,e),H.value=!0})},Qe=async e=>{if(!re.value)return;let t=re.value.clips.map(e=>({...e})),n=t.filter(t=>t.track_id===e.trackId).sort((e,t)=>e.timeline_start_ms-t.timeline_start_ms),r=n.findIndex(t=>t.id===e.clipId),i=r+e.direction;if(r<0||i<0||i>=n.length)return;[n[r],n[i]]=[n[i],n[r]];let a=0;n.forEach(e=>{let t=typeof e.speed==`number`&&Number.isFinite(e.speed)&&e.speed>0?e.speed:1;e.timeline_start_ms=a,a+=(e.source_out_ms-e.source_in_ms)/t}),await $(()=>d.dispatch(`poivelle/saveTimeline`,{...re.value,clips:t}))},$e=async e=>{await $(async()=>{await d.dispatch(`poivelle/selectTake`,e),Pe.success(q(`poivelle.storyboard.selectionSaved`))})},et=e=>`${(e/1e6).toFixed(2)} credits`,$=async e=>{V.value=!0;try{await e()}catch(e){Pe.error(e?.response?.data?.detail?.message??e?.response?.data?.detail??e?.message??q(`poivelle.error.generic`))}finally{V.value=!1}};return u(Te),(n,a)=>(E(),l(`main`,ei,[o(Vt,{"project-title":I.value?.title,"graph-version":_.value?.graph_version,"can-run":L.value&&(N.value===`overview`?!!me.value||pe.value:!!F.value),"can-edit":L.value,"primary-label":N.value===`overview`?pe.value?n.$t(`poivelle.guide.chooseResults`):he.value:void 0,onOpenProjects:a[0]||=e=>_e.value=!0,onHome:a[1]||=e=>n.$emit(`back-home`),onCommit:Ve,onRun:Ge},null,8,[`project-title`,`graph-version`,`can-run`,`can-edit`,`primary-label`]),ae.value?(E(),l(`div`,ti,[o(c(De),{size:15,"aria-hidden":`true`}),e(`span`,null,i(ae.value),1),e(`button`,{type:`button`,onClick:Te},i(n.$t(`poivelle.action.retry`)),1)])):s(``,!0),oe.value&&!_.value?(E(),l(`div`,ni,[o(c(xe),{size:25,class:`is-spinning`,"aria-hidden":`true`}),e(`span`,null,i(n.$t(`poivelle.status.loading`)),1)])):I.value&&_.value?(E(),l(`div`,ri,[N.value===`overview`?s(``,!0):(E(),b(sn,{key:0,projects:g.value,"current-project-id":I.value.id,assets:v.value,revisions:k.value,"can-edit":L.value,onSelectProject:Ee,onCreateProject:J,onImportAsset:a[2]||=e=>ye.value=!0},null,8,[`projects`,`current-project-id`,`assets`,`revisions`,`can-edit`])),e(`section`,ii,[o(un,{"model-value":N.value,"can-edit":L.value,"onUpdate:modelValue":ke,onCreateNode:a[3]||=e=>ve.value=!0},null,8,[`model-value`,`can-edit`]),e(`div`,ai,[N.value===`overview`?(E(),b($r,{key:0,"project-title":I.value.title,graph:_.value,storyboard:O.value,artifacts:y.value,takes:C.value,selections:T.value,"can-edit":L.value,busy:V.value,onGenerateNode:We,onOpenStoryboard:a[4]||=e=>ke(`storyboard`)},null,8,[`project-title`,`graph`,`storyboard`,`artifacts`,`takes`,`selections`,`can-edit`,`busy`])):N.value===`canvas`?(E(),b(vn,{key:1,graph:_.value,"selected-node-id":P.value,"can-edit":L.value,onSelectNode:Oe,onCreateNode:a[5]||=e=>ve.value=!0},null,8,[`graph`,`selected-node-id`,`can-edit`])):N.value===`storyboard`?(E(),b(Bn,{key:2,graph:_.value,storyboard:O.value,artifacts:y.value,takes:C.value,selections:T.value,"selected-node-id":P.value,"can-edit":L.value,"can-select":L.value&&k.value.length>0,onSelectNode:Oe,onSelectTake:$e},null,8,[`graph`,`storyboard`,`artifacts`,`takes`,`selections`,`selected-node-id`,`can-edit`,`can-select`])):N.value===`timeline`?(E(),b(cr,{key:3,timeline:re.value,graph:_.value,artifacts:y.value,"can-edit":L.value,onMoveClip:Qe},null,8,[`timeline`,`graph`,`artifacts`,`can-edit`])):(E(),b(wr,{key:4,graph:_.value,proposals:A.value,revisions:k.value,runs:ee.value,"active-run":j.value,evaluations:M.value,"forensic-validations":te.value,costs:ne.value,"can-edit":L.value,onRejectProposal:Je,onCancelRun:Ye,onOpenRun:Xe,onRetryStep:Ze},null,8,[`graph`,`proposals`,`revisions`,`runs`,`active-run`,`evaluations`,`forensic-validations`,`costs`,`can-edit`]))]),N.value===`overview`?s(``,!0):(E(),b(Br,{key:0,proposals:A.value,"selected-node-id":P.value,skill:I.value.active_skill,"can-edit":L.value,onRun:He,onOpenProposal:qe},null,8,[`proposals`,`selected-node-id`,`skill`,`can-edit`]))]),L.value&&N.value===`canvas`?(E(),b(Nr,{key:1,node:F.value,onUpdate:Re,onDelete:Be},null,8,[`node`])):s(``,!0)])):(E(),l(`section`,oi,[a[38]||=e(`div`,{class:`onboarding-number`},`01 / STUDIO`,-1),o(c(Ue),{size:34,"stroke-width":`1.25`,"aria-hidden":`true`}),e(`h1`,null,i(n.$t(`poivelle.onboarding.title`)),1),e(`p`,null,i(n.$t(`poivelle.onboarding.body`)),1),h.value.length?L.value?(E(),l(`button`,{key:1,type:`button`,onClick:J},[o(c(Q),{size:15,"aria-hidden":`true`}),r(` `+i(n.$t(`poivelle.project.create`)),1)])):s(``,!0):(E(),l(`button`,{key:0,type:`button`,onClick:a[6]||=e=>ge.value=!0},[o(c(Ce),{size:15,"aria-hidden":`true`}),r(` `+i(n.$t(`poivelle.workspace.create`)),1)]))])),o(c(Ae),{modelValue:ge.value,"onUpdate:modelValue":a[11]||=e=>ge.value=e,title:n.$t(`poivelle.workspace.create`),width:`420px`},{footer:S(()=>[o(c(Y),{onClick:a[10]||=e=>ge.value=!1},{default:S(()=>[r(i(n.$t(`common.button.cancel`)),1)]),_:1}),o(c(Y),{type:`primary`,loading:V.value,onClick:Z},{default:S(()=>[r(i(n.$t(`common.button.confirm`)),1)]),_:1},8,[`loading`])]),default:S(()=>[o(c(ce),{"label-position":`top`,onSubmit:a[9]||=t(()=>{},[`prevent`])},{default:S(()=>[o(c(B),{label:n.$t(`poivelle.workspace.name`)},{default:S(()=>[o(c(X),{modelValue:U.name,"onUpdate:modelValue":a[7]||=e=>U.name=e,maxlength:`120`,autofocus:``},null,8,[`modelValue`])]),_:1},8,[`label`]),o(c(B),{label:n.$t(`poivelle.workspace.budget`)},{default:S(()=>[o(c(de),{modelValue:U.monthly_limit_microcredits,"onUpdate:modelValue":a[8]||=e=>U.monthly_limit_microcredits=e,min:0,step:1e6},null,8,[`modelValue`])]),_:1},8,[`label`])]),_:1})]),_:1},8,[`modelValue`,`title`]),o(c(Ae),{modelValue:_e.value,"onUpdate:modelValue":a[22]||=e=>_e.value=e,title:n.$t(`poivelle.project.create`),width:`460px`},{footer:S(()=>[o(c(Y),{onClick:a[21]||=e=>_e.value=!1},{default:S(()=>[r(i(n.$t(`common.button.cancel`)),1)]),_:1}),o(c(Y),{type:`primary`,loading:V.value,onClick:Fe},{default:S(()=>[r(i(n.$t(`common.button.confirm`)),1)]),_:1},8,[`loading`])]),default:S(()=>[o(c(ce),{"label-position":`top`,onSubmit:a[20]||=t(()=>{},[`prevent`])},{default:S(()=>[o(c(B),{label:n.$t(`poivelle.project.workspace`)},{default:S(()=>[o(c(se),{modelValue:W.workspace_id,"onUpdate:modelValue":a[12]||=e=>W.workspace_id=e,style:{width:`100%`}},{default:S(()=>[(E(!0),l(p,null,w(h.value,e=>(E(),b(c(R),{key:e.id,label:e.name,value:e.id},null,8,[`label`,`value`]))),128))]),_:1},8,[`modelValue`])]),_:1},8,[`label`]),o(c(B),{label:n.$t(`poivelle.project.title`)},{default:S(()=>[o(c(X),{modelValue:W.title,"onUpdate:modelValue":a[13]||=e=>W.title=e,maxlength:`200`},null,8,[`modelValue`])]),_:1},8,[`label`]),o(c(B),{label:n.$t(`poivelle.project.workflow`)},{default:S(()=>[o(c(ze),{modelValue:W.workflow,"onUpdate:modelValue":a[14]||=e=>W.workflow=e,options:be,block:``},null,8,[`modelValue`])]),_:1},8,[`label`]),W.workflow===`commercial_tvc`?(E(),l(p,{key:0},[o(c(B),{label:n.$t(`poivelle.project.productName`)},{default:S(()=>[o(c(X),{modelValue:W.product_name,"onUpdate:modelValue":a[15]||=e=>W.product_name=e,maxlength:`120`},null,8,[`modelValue`])]),_:1},8,[`label`]),o(c(B),{label:n.$t(`poivelle.project.productCategory`)},{default:S(()=>[o(c(X),{modelValue:W.product_category,"onUpdate:modelValue":a[16]||=e=>W.product_category=e,maxlength:`180`},null,8,[`modelValue`])]),_:1},8,[`label`]),o(c(B),{label:n.$t(`poivelle.project.brandTone`)},{default:S(()=>[o(c(X),{modelValue:W.brand_tone,"onUpdate:modelValue":a[17]||=e=>W.brand_tone=e,type:`textarea`,rows:2,maxlength:`240`},null,8,[`modelValue`])]),_:1},8,[`label`]),o(c(B),{label:n.$t(`poivelle.project.aspectRatio`)},{default:S(()=>[o(c(ze),{modelValue:W.aspect_ratio,"onUpdate:modelValue":a[18]||=e=>W.aspect_ratio=e,options:[`16:9`,`9:16`,`1:1`]},null,8,[`modelValue`])]),_:1},8,[`label`])],64)):s(``,!0),o(c(B),{label:n.$t(`poivelle.project.skill`)},{default:S(()=>[W.workflow===`blank`?(E(),b(c(se),{key:0,modelValue:W.skill,"onUpdate:modelValue":a[19]||=e=>W.skill=e,style:{width:`100%`}},{default:S(()=>[o(c(R),{label:`Short drama · professional`,value:`film.drama.short@1.0.0`}),o(c(R),{label:`Commercial film · professional`,value:`film.commercial@1.0.0`}),o(c(R),{label:`Music video · professional`,value:`film.music-video@1.0.0`})]),_:1},8,[`modelValue`])):s(``,!0)]),_:1},8,[`label`])]),_:1})]),_:1},8,[`modelValue`,`title`]),o(c(Ae),{modelValue:ve.value,"onUpdate:modelValue":a[28]||=e=>ve.value=e,title:n.$t(`poivelle.node.create`),width:`460px`},{footer:S(()=>[o(c(Y),{onClick:a[27]||=e=>ve.value=!1},{default:S(()=>[r(i(n.$t(`common.button.cancel`)),1)]),_:1}),o(c(Y),{type:`primary`,loading:V.value,onClick:Ie},{default:S(()=>[r(i(n.$t(`common.button.confirm`)),1)]),_:1},8,[`loading`])]),default:S(()=>[o(c(ce),{"label-position":`top`,onSubmit:a[26]||=t(()=>{},[`prevent`])},{default:S(()=>[o(c(B),{label:n.$t(`poivelle.field.type`)},{default:S(()=>[o(c(se),{modelValue:G.node_type,"onUpdate:modelValue":a[23]||=e=>G.node_type=e,style:{width:`100%`}},{default:S(()=>[(E(),l(p,null,w(Se,e=>o(c(R),{key:e,label:e,value:e},null,8,[`label`,`value`])),64))]),_:1},8,[`modelValue`])]),_:1},8,[`label`]),o(c(B),{label:n.$t(`poivelle.field.title`)},{default:S(()=>[o(c(X),{modelValue:G.title,"onUpdate:modelValue":a[24]||=e=>G.title=e,maxlength:`240`},null,8,[`modelValue`])]),_:1},8,[`label`]),o(c(B),{label:n.$t(`poivelle.field.prompt`)},{default:S(()=>[o(c(X),{modelValue:G.prompt,"onUpdate:modelValue":a[25]||=e=>G.prompt=e,type:`textarea`,rows:5},null,8,[`modelValue`])]),_:1},8,[`label`])]),_:1})]),_:1},8,[`modelValue`,`title`]),o(c(Ae),{modelValue:ye.value,"onUpdate:modelValue":a[35]||=e=>ye.value=e,title:n.$t(`poivelle.asset.import`),width:`500px`},{footer:S(()=>[o(c(Y),{onClick:a[34]||=e=>ye.value=!1},{default:S(()=>[r(i(n.$t(`common.button.cancel`)),1)]),_:1}),o(c(Y),{type:`primary`,loading:V.value,onClick:Le},{default:S(()=>[r(i(n.$t(`common.button.confirm`)),1)]),_:1},8,[`loading`])]),default:S(()=>[o(c(ce),{"label-position":`top`,onSubmit:a[33]||=t(()=>{},[`prevent`])},{default:S(()=>[o(c(B),{label:n.$t(`poivelle.asset.title`)},{default:S(()=>[o(c(X),{modelValue:K.title,"onUpdate:modelValue":a[29]||=e=>K.title=e,maxlength:`240`},null,8,[`modelValue`])]),_:1},8,[`label`]),o(c(B),{label:n.$t(`poivelle.field.type`)},{default:S(()=>[o(c(se),{modelValue:K.kind,"onUpdate:modelValue":a[30]||=e=>K.kind=e,style:{width:`100%`}},{default:S(()=>[(E(),l(p,null,w(we,e=>o(c(R),{key:e,label:e,value:e},null,8,[`label`,`value`])),64))]),_:1},8,[`modelValue`])]),_:1},8,[`label`]),o(c(B),{label:n.$t(`poivelle.asset.url`)},{default:S(()=>[o(c(X),{modelValue:K.source_url,"onUpdate:modelValue":a[31]||=e=>K.source_url=e},null,8,[`modelValue`])]),_:1},8,[`label`]),o(c(B),{label:n.$t(`poivelle.asset.hash`)},{default:S(()=>[o(c(X),{modelValue:K.content_hash,"onUpdate:modelValue":a[32]||=e=>K.content_hash=e,placeholder:`sha256:...`},null,8,[`modelValue`])]),_:1},8,[`label`])]),_:1})]),_:1},8,[`modelValue`,`title`]),o(c(Ae),{modelValue:H.value,"onUpdate:modelValue":a[37]||=e=>H.value=e,title:n.$t(`poivelle.run.confirmTitle`),width:`520px`},{footer:S(()=>[o(c(Y),{onClick:a[36]||=e=>H.value=!1},{default:S(()=>[r(i(n.$t(`common.button.cancel`)),1)]),_:1}),o(c(Y),{type:`primary`,loading:V.value,onClick:Ke},{default:S(()=>[r(i(n.$t(`poivelle.run.confirm`)),1)]),_:1},8,[`loading`])]),default:S(()=>[ie.value?(E(),l(`div`,si,[e(`div`,null,[e(`span`,null,i(n.$t(`poivelle.run.targets`)),1),e(`strong`,null,i(ie.value.dependency_closure.length),1)]),e(`div`,null,[e(`span`,null,i(n.$t(`poivelle.run.maximum`)),1),e(`strong`,null,i(et(ie.value.max_cost_microcredits)),1)]),e(`div`,null,[e(`span`,null,i(n.$t(`poivelle.run.approval`)),1),e(`strong`,null,i(ie.value.required_approval),1)])])):s(``,!0),e(`p`,ci,i(n.$t(`poivelle.run.confirmBody`)),1)]),_:1},8,[`modelValue`,`title`])]))}}),[[`__scopeId`,`data-v-1b367de3`]]),ui=O({__name:`Index`,setup(e){let t=D(`discovery`);return(e,n)=>t.value===`discovery`?(E(),b(jt,{key:0,onOpenStudio:n[0]||=e=>t.value=`studio`})):(E(),b(li,{key:1,onBackHome:n[1]||=e=>t.value=`discovery`}))}});export{ui as default};
|