specrails-desktop 2.26.2 → 2.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/dist/assets/{ActivityFeedPage-bDe4VitF.js → ActivityFeedPage-DcMmDAP3.js} +1 -1
- package/client/dist/assets/AgentBrowserCapture-CZ3oc1UL.js +1 -0
- package/client/dist/assets/AgentIntegrationsModal-DkqooCFn.js +1 -0
- package/client/dist/assets/{AgentModeCodePane-Ci39DcOo.js → AgentModeCodePane-CM77ljte.js} +2 -2
- package/client/dist/assets/AgentModeJobsPane-DbZzogbi.js +1 -0
- package/client/dist/assets/AgentsPage-BZIml7eL.js +86 -0
- package/client/dist/assets/{AnalyticsPage-Da21wWWw.js → AnalyticsPage-B4qflNxi.js} +1 -1
- package/client/dist/assets/{BarChart-BiLTq3uC.js → BarChart-Ckstq9fl.js} +1 -1
- package/client/dist/assets/CodePage-DFZXLbI1.js +2 -0
- package/client/dist/assets/{DesktopAnalyticsPage-COkzgMmd.js → DesktopAnalyticsPage-DbgMa8OO.js} +1 -1
- package/client/dist/assets/DocsDialog-BQc9Kwev.js +11 -0
- package/client/dist/assets/DocsPage-OsV44ECy.js +11 -0
- package/client/dist/assets/{ExportDropdown-DDhJH-Jr.js → ExportDropdown-a43XHO3Y.js} +1 -1
- package/client/dist/assets/IntegrationsPage-C3E8hZhB.js +1 -0
- package/client/dist/assets/InteractiveJobComposer-zj8SrOAl.js +19 -0
- package/client/dist/assets/JobDetailModal-Cm6ZeVoh.js +1 -0
- package/client/dist/assets/JobDetailPage-DN67LsdX.js +1 -0
- package/client/dist/assets/JobsPage-DF9wKGbw.js +1 -0
- package/client/dist/assets/{LoopBuilderPage-DsLLrtHa.js → LoopBuilderPage-RJ6GGjli.js} +2 -2
- package/client/dist/assets/{LoopPreviewModal-C-fDEgnu.js → LoopPreviewModal-B2wmifF6.js} +1 -1
- package/client/dist/assets/LoopsPage-DdlvH-dJ.js +1 -0
- package/client/dist/assets/PluginsPage-9DI0a6jI.js +2 -0
- package/client/dist/assets/ProjectSettingsDialog-dgy5hqPd.js +1 -0
- package/client/dist/assets/{TemplatePreviewModal-DcHFbLA8.js → TemplatePreviewModal-CERf1IYB.js} +1 -1
- package/client/dist/assets/agent-BRJCESkc2.js +1 -0
- package/client/dist/assets/agent-BuYz6fJd.js +1 -0
- package/client/dist/assets/agent-CxnRzL6Z.js +1 -0
- package/client/dist/assets/agent-D4JAuEGN2.js +1 -0
- package/client/dist/assets/agent-DNQlI8EN.js +1 -0
- package/client/dist/assets/agent-DyzUH89R.js +1 -0
- package/client/dist/assets/agent-MaTxBlg5.js +1 -0
- package/client/dist/assets/agent-ostmMYNz2.js +1 -0
- package/client/dist/assets/{brain-BBNUUrUI.js → brain-BPbhM1Jx.js} +1 -1
- package/client/dist/assets/dashboard-5C2FOZQX.js +1 -0
- package/client/dist/assets/{dashboard-C6w0rICe.js → dashboard-B6iQ-IL_.js} +1 -1
- package/client/dist/assets/dashboard-BFfnCtq52.js +1 -0
- package/client/dist/assets/dashboard-BIC8KtRf2.js +1 -0
- package/client/dist/assets/dashboard-CEgg9NAr.js +1 -0
- package/client/dist/assets/dashboard-CiOyDh9L.js +1 -0
- package/client/dist/assets/dashboard-D6x5OnNj2.js +1 -0
- package/client/dist/assets/dashboard-DBuLfWo9.js +1 -0
- package/client/dist/assets/{dist-js-BxjTIvdT.js → dist-js-Byjcju1W.js} +1 -1
- package/client/dist/assets/{dist-js-DdP_Gl3p.js → dist-js-Dh-9lbLD.js} +1 -1
- package/client/dist/assets/index-89SuhD4Y.js +158 -0
- package/client/dist/assets/index-DOGzWJhO.css +2 -0
- package/client/dist/assets/integrations-By80EBkf.js +1 -0
- package/client/dist/assets/integrations-CAjq5tdW2.js +1 -0
- package/client/dist/assets/integrations-CG2dp3Kd.js +1 -0
- package/client/dist/assets/integrations-CP_aiV_8.js +1 -0
- package/client/dist/assets/integrations-CUNe3t9l2.js +1 -0
- package/client/dist/assets/integrations-CWjh5VRk.js +1 -0
- package/client/dist/assets/integrations-JOHSCvB3.js +1 -0
- package/client/dist/assets/integrations-RJfzXkPx2.js +1 -0
- package/client/dist/assets/{lib-BviHZ_gK.js → lib-yKyTNJ1c.js} +1 -1
- package/client/dist/assets/nav-B2_ToNqS.js +1 -0
- package/client/dist/assets/nav-BAMkVEId.js +1 -0
- package/client/dist/assets/nav-BTg8s-cD.js +1 -0
- package/client/dist/assets/nav-BY_4EWRv.js +1 -0
- package/client/dist/assets/nav-CVXtv0wX2.js +1 -0
- package/client/dist/assets/nav-D0Erv9ZJ2.js +1 -0
- package/client/dist/assets/nav-DUuw9VIU2.js +1 -0
- package/client/dist/assets/nav-S4HM94vW.js +1 -0
- package/client/dist/assets/settings-BYCMtxOz.js +1 -0
- package/client/dist/assets/{settings-BHdPchJP.js → settings-B_v3zgJf.js} +1 -1
- package/client/dist/assets/{settings-BeCczBFS2.js → settings-BemR_e3F.js} +1 -1
- package/client/dist/assets/{settings-D54_cgl12.js → settings-Bp24JHlv2.js} +1 -1
- package/client/dist/assets/{settings-C_nY14Yz.js → settings-BvIwQ3A1.js} +1 -1
- package/client/dist/assets/{settings-BlLi719f.js → settings-Bx2ObkTR2.js} +1 -1
- package/client/dist/assets/{settings-CaZ26a0S.js → settings-C_T0-j9d.js} +1 -1
- package/client/dist/assets/{settings-cn0tbve62.js → settings-DhaFKpcw2.js} +1 -1
- package/client/dist/assets/{upload-CRuuzzvp.js → upload-Qh1NE3xi.js} +1 -1
- package/client/dist/assets/{value-CIr5hDMt.js → value-BMPeyInx.js} +1 -1
- package/client/dist/index.html +29 -29
- package/package.json +1 -1
- package/server/dist/agent-chat-router.js +2 -0
- package/server/dist/agent-operator-prompt.js +17 -1
- package/server/dist/db.js +51 -2
- package/server/dist/dev-ports.js +35 -0
- package/server/dist/global-plugins-router.js +62 -0
- package/server/dist/headroom-manager.js +971 -0
- package/server/dist/headroom-routing.js +53 -0
- package/server/dist/index.js +9 -6
- package/server/dist/mcp/guide.js +3 -0
- package/server/dist/mcp/tools/catalog.js +2 -0
- package/server/dist/mcp/tools/env.js +72 -0
- package/server/dist/mcp/tools/jobs.js +110 -2
- package/server/dist/path-resolver.js +84 -18
- package/server/dist/project-env.js +30 -0
- package/server/dist/project-registry.js +4 -2
- package/server/dist/project-router-jobs.js +126 -0
- package/server/dist/project-router-settings.js +10 -1
- package/server/dist/queue-manager.js +9 -1
- package/server/dist/rail-isolated-launch.js +5 -4
- package/server/dist/rail-pr-decision.js +27 -17
- package/server/dist/rail-pr-store.js +36 -0
- package/server/dist/rails-router.js +7 -1
- package/server/dist/setup-manager.js +32 -29
- package/server/dist/setup-prerequisites.js +3 -1
- package/server/dist/transient-children.js +266 -9
- package/server/dist/util/cli-prompt.js +3 -0
- package/server/dist/workspace-resolution.js +3 -3
- package/server/dist/worktree-env-discovery.js +172 -0
- package/client/dist/assets/AgentBrowserCapture-DQyeEm2V.js +0 -1
- package/client/dist/assets/AgentModeJobsPane-C-g1WNVG.js +0 -1
- package/client/dist/assets/AgentsPage-BWgglK7V.js +0 -86
- package/client/dist/assets/CodePage-BUcAp7SC.js +0 -2
- package/client/dist/assets/DocsDialog-PZHMN18B.js +0 -11
- package/client/dist/assets/DocsPage-D3fChfkj.js +0 -11
- package/client/dist/assets/IntegrationsPage-F87uxxVH.js +0 -3
- package/client/dist/assets/InteractiveJobComposer-DqDCiCa0.js +0 -19
- package/client/dist/assets/JobDetailModal-BWJR60fi.js +0 -1
- package/client/dist/assets/JobDetailPage-CjWE_jyd.js +0 -1
- package/client/dist/assets/JobsPage-LmnXkyCa.js +0 -1
- package/client/dist/assets/LoopsPage-DDNO9h9T.js +0 -1
- package/client/dist/assets/ProjectSettingsDialog-CX854C8e.js +0 -1
- package/client/dist/assets/agent-BI6vr-To.js +0 -1
- package/client/dist/assets/agent-BUGXI3Ok2.js +0 -1
- package/client/dist/assets/agent-Bph_-xt7.js +0 -1
- package/client/dist/assets/agent-Bvy2Csyd.js +0 -1
- package/client/dist/assets/agent-Bwkyg2oX2.js +0 -1
- package/client/dist/assets/agent-CLCyDaZh.js +0 -1
- package/client/dist/assets/agent-Cqs14QMr2.js +0 -1
- package/client/dist/assets/agent-DJ0EBUuP.js +0 -1
- package/client/dist/assets/dashboard-BjjS1OrL.js +0 -1
- package/client/dist/assets/dashboard-Bk6oSk1H2.js +0 -1
- package/client/dist/assets/dashboard-BrH-GdOg2.js +0 -1
- package/client/dist/assets/dashboard-BurhUI8_.js +0 -1
- package/client/dist/assets/dashboard-CAUnfDQL2.js +0 -1
- package/client/dist/assets/dashboard-C_ljpeYO.js +0 -1
- package/client/dist/assets/dashboard-D6OqDdj6.js +0 -1
- package/client/dist/assets/index-C695aPdV.css +0 -2
- package/client/dist/assets/index-Dw1N2-ci.js +0 -156
- package/client/dist/assets/integrations-4KZnYECp.js +0 -1
- package/client/dist/assets/integrations-7W266oqF2.js +0 -1
- package/client/dist/assets/integrations-BNuauK3o.js +0 -1
- package/client/dist/assets/integrations-CHy8tnpV.js +0 -1
- package/client/dist/assets/integrations-Cl_wD5AI.js +0 -1
- package/client/dist/assets/integrations-CuWnMR5L.js +0 -1
- package/client/dist/assets/integrations-Cy8nZ_dv2.js +0 -1
- package/client/dist/assets/integrations-zMqY4VU12.js +0 -1
- package/client/dist/assets/nav-40HzpIFb.js +0 -1
- package/client/dist/assets/nav-8yPhBn00.js +0 -1
- package/client/dist/assets/nav-B6PkGfTk2.js +0 -1
- package/client/dist/assets/nav-BHqMLrS72.js +0 -1
- package/client/dist/assets/nav-CGy4yx3C.js +0 -1
- package/client/dist/assets/nav-CXEDcRdv2.js +0 -1
- package/client/dist/assets/nav-CzKzuwH8.js +0 -1
- package/client/dist/assets/nav-EI_OhEAo.js +0 -1
- package/client/dist/assets/settings-D9bDDe2O.js +0 -1
- /package/client/dist/assets/{activity-BZNfOdiS.js → activity-BZZlEG3a.js} +0 -0
- /package/client/dist/assets/{activity--iN4Ad2R2.js → activity-BbWiDfn-2.js} +0 -0
- /package/client/dist/assets/{activity-CIOLxGvh.js → activity-D3Ic-HTS.js} +0 -0
- /package/client/dist/assets/{activity-DtxrAUMo2.js → activity-DFbvNqhE2.js} +0 -0
- /package/client/dist/assets/{activity-D8vQJrpW.js → activity-Dbl71S-E.js} +0 -0
- /package/client/dist/assets/{activity-BuVo5sPB.js → activity-DtzRy92x.js} +0 -0
- /package/client/dist/assets/{activity-6hM_ZSg9.js → activity-DvECTYGt.js} +0 -0
- /package/client/dist/assets/{activity-D2r2h3SE2.js → activity-FleOlK0l2.js} +0 -0
- /package/client/dist/assets/{addspec-D-JLDsUV.js → addspec-BKrH2Ucz.js} +0 -0
- /package/client/dist/assets/{addspec-DfhDbg5c.js → addspec-B_LQMHW3.js} +0 -0
- /package/client/dist/assets/{addspec-bsNDdqRm2.js → addspec-Bw_YQwo62.js} +0 -0
- /package/client/dist/assets/{addspec-BMtLZLW62.js → addspec-CFxGvmJR2.js} +0 -0
- /package/client/dist/assets/{addspec-mgPOt5q02.js → addspec-CR8MB5Fr2.js} +0 -0
- /package/client/dist/assets/{addspec-CP0HRuxY.js → addspec-DaA-CbTt.js} +0 -0
- /package/client/dist/assets/{addspec-DxW6oPsk.js → addspec-DrXqP8ip.js} +0 -0
- /package/client/dist/assets/{addspec-CRuvWn8d.js → addspec-NBbcTbLc.js} +0 -0
- /package/client/dist/assets/{agents-BpoUaoW92.js → agents-B9pFSJQI2.js} +0 -0
- /package/client/dist/assets/{agents-78bTZGZh.js → agents-BHgn--3j.js} +0 -0
- /package/client/dist/assets/{agents-BUdEi3-N.js → agents-B_qGaB0F.js} +0 -0
- /package/client/dist/assets/{agents-Cev2oFfX.js → agents-CGDn_3kB.js} +0 -0
- /package/client/dist/assets/{agents-bvyRLczL.js → agents-CP8_ezYG.js} +0 -0
- /package/client/dist/assets/{agents-BLhWCmDS2.js → agents-CV-_xBvX2.js} +0 -0
- /package/client/dist/assets/{agents-CWo-KyAB.js → agents-HFCqQH0Z.js} +0 -0
- /package/client/dist/assets/{agents-DDtCJ5M02.js → agents-VsyFhGOS2.js} +0 -0
- /package/client/dist/assets/{agentstudio-BMQxc_bz.js → agentstudio-BEp7Sb46.js} +0 -0
- /package/client/dist/assets/{agentstudio-Dtq3dGYk.js → agentstudio-BOjG6tgJ.js} +0 -0
- /package/client/dist/assets/{agentstudio-C_Jq8Tl4.js → agentstudio-Br3WD7Xs.js} +0 -0
- /package/client/dist/assets/{agentstudio-sI27TpBu2.js → agentstudio-CuTt3ZGe2.js} +0 -0
- /package/client/dist/assets/{agentstudio-CWgXG5W52.js → agentstudio-D2A5peWV2.js} +0 -0
- /package/client/dist/assets/{agentstudio-CZm2rOzt.js → agentstudio-Dxe_94PK.js} +0 -0
- /package/client/dist/assets/{agentstudio-COZriimI2.js → agentstudio-RfZavULt2.js} +0 -0
- /package/client/dist/assets/{agentstudio-jKMTdT70.js → agentstudio-RsxnZtUA.js} +0 -0
- /package/client/dist/assets/{aiedit-igmw-ZoZ2.js → aiedit-26p5A_HY2.js} +0 -0
- /package/client/dist/assets/{aiedit-6CHdb_iv2.js → aiedit-CV520D4W2.js} +0 -0
- /package/client/dist/assets/{aiedit-pc5JDUq1.js → aiedit-CcugGPbS.js} +0 -0
- /package/client/dist/assets/{aiedit-eMN4eQPF.js → aiedit-D0Syl-mC.js} +0 -0
- /package/client/dist/assets/{aiedit-hknZlly82.js → aiedit-DnBzjlVz2.js} +0 -0
- /package/client/dist/assets/{aiedit-B03pD_Na.js → aiedit-DrIjSojo.js} +0 -0
- /package/client/dist/assets/{aiedit-DYtnZU9H.js → aiedit-DrfHQnlz.js} +0 -0
- /package/client/dist/assets/{aiedit-BtRqRxML.js → aiedit-a-Z-g5iC.js} +0 -0
- /package/client/dist/assets/{analytics-C5dpiS0o.js → analytics-4-eskbtX.js} +0 -0
- /package/client/dist/assets/{analytics-CR1TJqUi2.js → analytics-4HvXb0Vn2.js} +0 -0
- /package/client/dist/assets/{analytics-rmHuJv0V.js → analytics-Bd9rHGjV.js} +0 -0
- /package/client/dist/assets/{analytics-BWMUZ2Pq2.js → analytics-Bpe41fnX2.js} +0 -0
- /package/client/dist/assets/{analytics-Bj-SmKHa.js → analytics-CpSTNfui.js} +0 -0
- /package/client/dist/assets/{analytics-Ce-sPORu.js → analytics-CxDYcBl9.js} +0 -0
- /package/client/dist/assets/{analytics-CCprAqk3.js → analytics-DEe5BMz8.js} +0 -0
- /package/client/dist/assets/{analytics-DfNdXR0y2.js → analytics-DcOITHla2.js} +0 -0
- /package/client/dist/assets/{attachments-BjyMmrwE.js → attachments-CA2f3qL3.js} +0 -0
- /package/client/dist/assets/{attachments-DCZOL1RU.js → attachments-CHDbhKeH.js} +0 -0
- /package/client/dist/assets/{attachments-rNn1ekRy2.js → attachments-CKAY5aYG2.js} +0 -0
- /package/client/dist/assets/{attachments-BgBNSqQd.js → attachments-CgOQ9K-6.js} +0 -0
- /package/client/dist/assets/{attachments-DPCmkFZu2.js → attachments-D2jwJXQ42.js} +0 -0
- /package/client/dist/assets/{attachments-C9GTTJsx2.js → attachments-DlEQu56g2.js} +0 -0
- /package/client/dist/assets/{attachments-Ci6_42Kh.js → attachments-DvxQbBTC.js} +0 -0
- /package/client/dist/assets/{attachments-DL-bPy9E.js → attachments-jVdKzAXn.js} +0 -0
- /package/client/dist/assets/{auth-Cvsb7-Ek.js → auth-DpZq5p1e.js} +0 -0
- /package/client/dist/assets/{browser-Cvg-QHvd2.js → browser-BQFDxrRq.js} +0 -0
- /package/client/dist/assets/{browser-rWKj-RR_2.js → browser-BbJ_q_OT2.js} +0 -0
- /package/client/dist/assets/{browser-Cc0iDqUi.js → browser-C4VJ5CW12.js} +0 -0
- /package/client/dist/assets/{browser-BPkhILSJ.js → browser-Cl-FwPXs.js} +0 -0
- /package/client/dist/assets/{browser-CdS6O1Qb.js → browser-DM8G151q.js} +0 -0
- /package/client/dist/assets/{browser-FRv8P02E.js → browser-Do2jf8_N.js} +0 -0
- /package/client/dist/assets/{browser-BqLqJVVT.js → browser-JsiohNmW.js} +0 -0
- /package/client/dist/assets/{browser-BijVYG0Y2.js → browser-kA31eYhu2.js} +0 -0
- /package/client/dist/assets/{chat-VMflhzxn.js → chat-0dg5hOo_.js} +0 -0
- /package/client/dist/assets/{chat-DdwZjT8K2.js → chat-BMWD_Rx12.js} +0 -0
- /package/client/dist/assets/{chat-Bom6bqK3.js → chat-BalviUAD.js} +0 -0
- /package/client/dist/assets/{chat-DsbwJhus.js → chat-CJddjN3D2.js} +0 -0
- /package/client/dist/assets/{chat-Dnwg-NpQ.js → chat-D5xEtsf3.js} +0 -0
- /package/client/dist/assets/{chat-vylxqR0P2.js → chat-Ds8GvCnv.js} +0 -0
- /package/client/dist/assets/{chat-BgL3zv6x2.js → chat-SaG-ng1x2.js} +0 -0
- /package/client/dist/assets/{chat-Bh3NdgJs.js → chat-n43nZGvn.js} +0 -0
- /package/client/dist/assets/{code-thSEptMx.js → code-B62fClk-.js} +0 -0
- /package/client/dist/assets/{code-DzC1rMk12.js → code-Bit_z2Xd2.js} +0 -0
- /package/client/dist/assets/{code-BRcDlze52.js → code-BotxM43N2.js} +0 -0
- /package/client/dist/assets/{code-UPVvmAKM2.js → code-C9U6M5-e2.js} +0 -0
- /package/client/dist/assets/{code-BdMy3Ffq.js → code-CIPmDEd0.js} +0 -0
- /package/client/dist/assets/{code-DgeHz9CB.js → code-DUe1Bouz.js} +0 -0
- /package/client/dist/assets/{code-CwnBPPyA.js → code-F_KjccGf.js} +0 -0
- /package/client/dist/assets/{code-CeQ0FZpC.js → code-HDK4P6Rx.js} +0 -0
- /package/client/dist/assets/{commands-DkU0qliq.js → commands-BFQZc9AG.js} +0 -0
- /package/client/dist/assets/{commands-u-4eEHCN.js → commands-BMkC5-ki.js} +0 -0
- /package/client/dist/assets/{commands-CSDs9q_2.js → commands-BllkJauO.js} +0 -0
- /package/client/dist/assets/{commands-xHDDGfcP2.js → commands-CWX9WmDX2.js} +0 -0
- /package/client/dist/assets/{commands-C4Y3C-PF2.js → commands-CzFSoIiq2.js} +0 -0
- /package/client/dist/assets/{commands-CckaBWdV.js → commands-DCJ-R9E4.js} +0 -0
- /package/client/dist/assets/{commands-JWMfGDmr.js → commands-KBbhsnw8.js} +0 -0
- /package/client/dist/assets/{commands-RHOchN4n2.js → commands-cKTaLwwV2.js} +0 -0
- /package/client/dist/assets/{common-DmqBPwZG.js → common-BfQD173j.js} +0 -0
- /package/client/dist/assets/{common-DhWTkocg.js → common-CF8iGXrG.js} +0 -0
- /package/client/dist/assets/{common-Bwafujnc2.js → common-Cfmwcrl52.js} +0 -0
- /package/client/dist/assets/{common-C-vU-j-I.js → common-D2cimsul.js} +0 -0
- /package/client/dist/assets/{common-C5HKSbbz.js → common-DH7fjyL1.js} +0 -0
- /package/client/dist/assets/{common-CYaT2yHp.js → common-DXrmj6WD.js} +0 -0
- /package/client/dist/assets/{common-BM3LFLCE2.js → common-DZbXlmq72.js} +0 -0
- /package/client/dist/assets/{common-DiPTT7V_2.js → common-DtXmzX2o2.js} +0 -0
- /package/client/dist/assets/{explore-UvW1jEMa.js → explore-BEpIs343.js} +0 -0
- /package/client/dist/assets/{explore-CNBzrEPS.js → explore-BO_OinBD.js} +0 -0
- /package/client/dist/assets/{explore-C0k8HrkN.js → explore-Bhy7WWXv.js} +0 -0
- /package/client/dist/assets/{explore-B7fblXBb2.js → explore-CAc8Qzu32.js} +0 -0
- /package/client/dist/assets/{explore-D_mWBYCS2.js → explore-DCZL9gRN2.js} +0 -0
- /package/client/dist/assets/{explore-Dahc1lOx.js → explore-DW_YTkQh.js} +0 -0
- /package/client/dist/assets/{explore-BHtEpoNN2.js → explore-ELbrSZyQ2.js} +0 -0
- /package/client/dist/assets/{explore-BKVV5JSu.js → explore-_XyU5e7R.js} +0 -0
- /package/client/dist/assets/{format-command-CuWuRvka.js → format-command-Db1viey1.js} +0 -0
- /package/client/dist/assets/{jira-uNH1gETL2.js → jira-B5wszJ1-2.js} +0 -0
- /package/client/dist/assets/{jira-BHAKtc4B.js → jira-C5UjxHE4.js} +0 -0
- /package/client/dist/assets/{jira-D5efgwp_.js → jira-CQ7mrZde.js} +0 -0
- /package/client/dist/assets/{jira-bDs7Im2C.js → jira-DIRkZk9U.js} +0 -0
- /package/client/dist/assets/{jira-CPpgA-5z2.js → jira-DTYu3hJi2.js} +0 -0
- /package/client/dist/assets/{jira-B3613-gj.js → jira-DeIjwCK3.js} +0 -0
- /package/client/dist/assets/{jira-DS7ownDy.js → jira-DtZpokjJ.js} +0 -0
- /package/client/dist/assets/{jira-Be369RIR2.js → jira-ZdKb-50F2.js} +0 -0
- /package/client/dist/assets/{jobs-CE8qeIYj.js → jobs-BFIdeDTw.js} +0 -0
- /package/client/dist/assets/{jobs-BgQzB0Sx2.js → jobs-BJ-Gcao22.js} +0 -0
- /package/client/dist/assets/{jobs-1GV2-4zd2.js → jobs-DAGiPVIS2.js} +0 -0
- /package/client/dist/assets/{jobs-26F9gGcE.js → jobs-DAU8C_tZ.js} +0 -0
- /package/client/dist/assets/{jobs-BqWui9_f.js → jobs-Da0GaaSc.js} +0 -0
- /package/client/dist/assets/{jobs-D5sZzgLs.js → jobs-DrYmsKy5.js} +0 -0
- /package/client/dist/assets/{jobs-Wh7dn28q2.js → jobs-P3unxtxo2.js} +0 -0
- /package/client/dist/assets/{jobs-DzeuASRf.js → jobs-p360zdf1.js} +0 -0
- /package/client/dist/assets/{loops-CvOWsi5r.js → loops-Bi4ywYGn.js} +0 -0
- /package/client/dist/assets/{loops-BvqQ-bHR2.js → loops-BjK8lmoZ2.js} +0 -0
- /package/client/dist/assets/{loops-Brnx4Fji.js → loops-CO6q75W8.js} +0 -0
- /package/client/dist/assets/{loops-K5_HXfJa.js → loops-D3wdUkZV.js} +0 -0
- /package/client/dist/assets/{loops-D6D3XHjj.js → loops-DDs4KPu_.js} +0 -0
- /package/client/dist/assets/{loops-LIgO_-eM.js → loops-DKzYFcq6.js} +0 -0
- /package/client/dist/assets/{loops-DJNhp17p2.js → loops-Du-bNVpc2.js} +0 -0
- /package/client/dist/assets/{loops-vhJdbcz92.js → loops-DvGbSfxw2.js} +0 -0
- /package/client/dist/assets/{mcp-XJNRfxVp2.js → mcp-BG-OCJca2.js} +0 -0
- /package/client/dist/assets/{mcp-DtbxuH3V2.js → mcp-CbJ04oFS2.js} +0 -0
- /package/client/dist/assets/{mcp-sRmWE8WJ.js → mcp-CrWdq5db.js} +0 -0
- /package/client/dist/assets/{mcp-H-gnQUdN.js → mcp-Dd844F5_.js} +0 -0
- /package/client/dist/assets/{mcp-Dcl-XxkR.js → mcp-DfmzoT5t.js} +0 -0
- /package/client/dist/assets/{mcp-CjVKXAhD2.js → mcp-DyULurYS2.js} +0 -0
- /package/client/dist/assets/{mcp-CIH0pH1K.js → mcp-HwBbQDk0.js} +0 -0
- /package/client/dist/assets/{mcp-N1nzp8oL.js → mcp-zSJ2TsJj.js} +0 -0
- /package/client/dist/assets/{setup-BuQNKztt2.js → setup-1vN48B-m2.js} +0 -0
- /package/client/dist/assets/{setup-BwMovM9z2.js → setup-BmJ0Kx16.js} +0 -0
- /package/client/dist/assets/{setup-RiUHzq7E.js → setup-D2CmgAro.js} +0 -0
- /package/client/dist/assets/{setup-BXpw07r-.js → setup-DQWsu2TR.js} +0 -0
- /package/client/dist/assets/{setup-D84y3wx-.js → setup-JeBwoXoM.js} +0 -0
- /package/client/dist/assets/{setup-DU0ULX8q2.js → setup-T_ApeQDV2.js} +0 -0
- /package/client/dist/assets/{setup-BiduSX9d.js → setup-mXnzww4f.js} +0 -0
- /package/client/dist/assets/{setup-7J8TjG4O.js → setup-q0wRHUp1.js} +0 -0
- /package/client/dist/assets/{specs-CWtKcVDC.js → specs-BGRKhM8t.js} +0 -0
- /package/client/dist/assets/{specs-CBDvEYKv.js → specs-C6J2zrLM.js} +0 -0
- /package/client/dist/assets/{specs-D2clrt2c2.js → specs-CT8exGOy2.js} +0 -0
- /package/client/dist/assets/{specs-C9Sd7BhH2.js → specs-Ce5y2iFc2.js} +0 -0
- /package/client/dist/assets/{specs-CIPr9reA2.js → specs-DZDoZsDq.js} +0 -0
- /package/client/dist/assets/{specs-PozUNhqb.js → specs-DbtIzV8a.js} +0 -0
- /package/client/dist/assets/{specs-DTplt2XM.js → specs-GkiL-snY.js} +0 -0
- /package/client/dist/assets/{specs-CmEZY57v.js → specs-PGIOzMtc.js} +0 -0
- /package/client/dist/assets/{terminal-xGbCZJHg.js → terminal-BNSg2lR7.js} +0 -0
- /package/client/dist/assets/{terminal-De2Brd23.js → terminal-BTpE7iki.js} +0 -0
- /package/client/dist/assets/{terminal-DFPNRLKp.js → terminal-CFt56A5f.js} +0 -0
- /package/client/dist/assets/{terminal-BRm03iFA2.js → terminal-Cvabyzm42.js} +0 -0
- /package/client/dist/assets/{terminal-DxQWCqSD2.js → terminal-D0z12_sJ2.js} +0 -0
- /package/client/dist/assets/{terminal-Z7KsDM_n.js → terminal-DDk_bTw0.js} +0 -0
- /package/client/dist/assets/{terminal-cqfd3EDV.js → terminal-DEyt0prF.js} +0 -0
- /package/client/dist/assets/{terminal-WSAvHXoU.js → terminal-a6Uq8B0p.js} +0 -0
- /package/client/dist/assets/{tickets-CkfbISuK.js → tickets-BHv3ewvq.js} +0 -0
- /package/client/dist/assets/{tickets-C3b8cHhd2.js → tickets-BIxU86j12.js} +0 -0
- /package/client/dist/assets/{tickets-SuX_HkK4.js → tickets-C2BhwzwR.js} +0 -0
- /package/client/dist/assets/{tickets-DTHo9c3C.js → tickets-D1IeX2EW.js} +0 -0
- /package/client/dist/assets/{tickets-BoXom7l8.js → tickets-DZut8Ryt.js} +0 -0
- /package/client/dist/assets/{tickets-CWYFvx1W2.js → tickets-LfK6LzKl2.js} +0 -0
- /package/client/dist/assets/{tickets-CFXnJsYF.js → tickets-dQfsc7Ph.js} +0 -0
- /package/client/dist/assets/{tickets-B7zT4IRf.js → tickets-sVun0I6v.js} +0 -0
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./chunk-BNv3lrIs.js";import{A as t,Cn as n,Gt as r,Hn as i,Kn as a,Pt as o,Rn as s,Un as c,Vn as l,an as u,j as d,ln as f,rt as p}from"./index-Dw1N2-ci.js";import{t as m}from"./lib-BviHZ_gK.js";import{t as h}from"./atom-one-dark-BMDPFwRZ.js";var g=e(a(),1),_=n();function v({categories:e,activeCategory:t,activeSlug:n}){let{t:i}=s(`integrations`);return(0,_.jsxs)(`nav`,{className:`w-56 flex-shrink-0 border-r border-border overflow-y-auto py-4 px-3 space-y-4`,children:[(0,_.jsxs)(l,{to:`/docs`,className:p(`flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left text-xs transition-colors`,!t&&!n?`bg-accent-primary/15 font-medium text-foreground`:`text-muted-foreground hover:bg-muted/40 hover:text-foreground`),children:[(0,_.jsx)(f,{className:`w-3.5 h-3.5 shrink-0`}),(0,_.jsx)(`span`,{className:`truncate`,children:i(`docs.title`)})]}),e.map(e=>(0,_.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,_.jsxs)(`div`,{className:`px-2.5 mb-1 flex items-center justify-between`,children:[(0,_.jsx)(`span`,{className:`text-xs font-semibold text-muted-foreground uppercase tracking-wider`,children:e.name}),e.docs.length>0&&(0,_.jsx)(`span`,{className:`text-[9px] font-medium text-muted-foreground/60 bg-muted/40 rounded px-1 py-0.5 leading-none`,children:e.docs.length})]}),e.docs.length===0?(0,_.jsx)(`p`,{className:`px-2.5 text-xs text-muted-foreground italic`,children:i(`docs.sidebarEmpty`)}):(0,_.jsx)(`ul`,{className:`space-y-0.5`,children:e.docs.map(i=>{let a=t===e.slug&&n===i.slug;return(0,_.jsx)(`li`,{children:(0,_.jsxs)(l,{to:`/docs/${e.slug}/${i.slug}`,title:i.title,className:p(`flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left text-xs transition-colors`,a?`bg-accent-primary/15 font-medium text-foreground`:`text-muted-foreground hover:bg-muted/40 hover:text-foreground`),children:[(0,_.jsx)(r,{className:`w-3.5 h-3.5 shrink-0`}),(0,_.jsx)(`span`,{className:`truncate`,children:i.title})]})},i.slug)})})]},e.slug))]})}function y({categories:e}){let{t}=s(`integrations`),n=e.reduce((e,t)=>e+t.docs.length,0),i=e.filter(e=>e.docs.length>0).length;return(0,_.jsxs)(`div`,{className:`max-w-2xl mx-auto py-8 px-6 space-y-5`,children:[(0,_.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,_.jsxs)(`h1`,{className:`flex items-center gap-2 text-lg font-semibold`,children:[(0,_.jsx)(f,{className:`w-4 h-4`}),t(`docs.title`)]}),(0,_.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:n===0?t(`docs.indexEmpty`):t(`docs.summary`,{documents:t(`docs.documentCount`,{count:n}),categories:t(`docs.categoryCount`,{count:i})})})]}),e.map(e=>(0,_.jsxs)(`div`,{className:`space-y-2`,children:[(0,_.jsx)(`h2`,{className:`text-xs font-semibold text-muted-foreground uppercase tracking-wider`,children:e.name}),e.docs.length===0?(0,_.jsx)(`p`,{className:`text-xs text-muted-foreground italic pl-2`,children:t(`docs.categoryEmpty`)}):(0,_.jsx)(`ul`,{className:`space-y-2`,children:e.docs.map(t=>(0,_.jsx)(`li`,{children:(0,_.jsxs)(l,{to:`/docs/${e.slug}/${t.slug}`,className:`flex items-center gap-3 p-2.5 rounded-md border border-border transition-colors hover:bg-muted/40 group`,children:[(0,_.jsx)(r,{className:`w-3.5 h-3.5 text-muted-foreground flex-shrink-0`}),(0,_.jsx)(`span`,{className:`text-xs font-medium text-foreground truncate`,children:t.title}),(0,_.jsx)(u,{className:`w-3 h-3 text-muted-foreground ml-auto md:opacity-0 md:group-hover:opacity-100 transition-opacity`})]})},t.slug))})]},e.slug))]})}var b=(0,g.memo)(function({content:e,currentCategory:n,onNavigateDoc:r}){return(0,_.jsx)(d,{remarkPlugins:[t],rehypePlugins:[m],components:{a({href:e,children:t,...i}){return(0,_.jsx)(`a`,{href:e,onClick:t=>{if(!e)return;if(/^[a-z][a-z0-9+.-]*:/i.test(e)){t.preventDefault(),window.open(e,`_blank`,`noopener,noreferrer`);return}if(e.startsWith(`#`))return;t.preventDefault();let i=h(e,n);i&&r(i.category,i.slug)},...i,children:t})}},children:e})});function x({category:e,slug:t,lang:n,scrollContainerRef:r}){let{t:a}=s(`integrations`),[c,l]=(0,g.useState)(null),[u,d]=(0,g.useState)(null),f=(0,g.useRef)(0),p=i();return(0,g.useEffect)(()=>{let i=++f.current;d(null),fetch(`/api/docs/${e}/${t}?lang=${encodeURIComponent(n)}`).then(async e=>{if(e.status===404){p(`/docs`,{replace:!0});return}if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()}).then(e=>{i===f.current&&e&&(l(e),r.current&&(r.current.scrollTop=0))}).catch(e=>{i===f.current&&d(e instanceof Error?e.message:a(`docs.loadError`))})},[e,t,n,p,r]),!c&&!u?(0,_.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,_.jsx)(o,{className:`w-4 h-4 animate-spin text-muted-foreground`})}):u&&!c?(0,_.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,_.jsx)(`p`,{className:`text-sm text-destructive`,children:u})}):c?(0,_.jsx)(`article`,{className:`max-w-2xl mx-auto py-8 px-6`,children:(0,_.jsx)(`div`,{className:`prose prose-sm max-w-none
|
|
2
|
-
prose-headings:text-foreground prose-headings:font-bold
|
|
3
|
-
prose-p:text-foreground/90
|
|
4
|
-
prose-a:text-accent-primary prose-a:no-underline hover:prose-a:underline
|
|
5
|
-
prose-strong:text-foreground
|
|
6
|
-
prose-code:text-accent-info prose-code:bg-card prose-code:px-1 prose-code:py-0.5 prose-code:rounded prose-code:text-xs
|
|
7
|
-
prose-pre:bg-card prose-pre:border prose-pre:border-border prose-pre:rounded-md prose-pre:p-0 prose-pre:overflow-x-auto
|
|
8
|
-
prose-blockquote:border-l-accent-primary prose-blockquote:text-muted-foreground
|
|
9
|
-
prose-hr:border-border
|
|
10
|
-
prose-th:text-foreground prose-td:text-foreground/90
|
|
11
|
-
prose-li:text-foreground/90`,children:(0,_.jsx)(b,{content:c.content,currentCategory:c.category,onNavigateDoc:(e,t)=>p(`/docs/${e}/${t}`)})})}):null}function S(){let{category:e,slug:t}=c(),{i18n:n}=s(`integrations`),r=n.language||`en`,[i,a]=(0,g.useState)(null),[l,u]=(0,g.useState)(!0),d=(0,g.useRef)(null);(0,g.useEffect)(()=>{fetch(`/api/docs?lang=${encodeURIComponent(r)}`).then(e=>e.json()).then(e=>a(e)).catch(()=>a({categories:[]})).finally(()=>u(!1))},[r]);let f=!!(e&&t);return(0,_.jsxs)(`div`,{className:`flex h-full overflow-hidden`,children:[l?(0,_.jsx)(`div`,{className:`w-56 flex-shrink-0 border-r border-border flex items-center justify-center`,children:(0,_.jsx)(o,{className:`w-3.5 h-3.5 animate-spin text-muted-foreground`})}):(0,_.jsx)(v,{categories:i?.categories??[],activeCategory:e,activeSlug:t}),(0,_.jsx)(`main`,{ref:d,className:`flex-1 overflow-y-auto`,children:f&&e&&t?(0,_.jsx)(x,{category:e,slug:t,lang:r,scrollContainerRef:d}):i&&(0,_.jsx)(y,{categories:i.categories})})]})}export{S as default};
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./chunk-BNv3lrIs.js";import{Bn as t,Cn as n,Et as r,G as i,K as a,Kn as o,Ln as s,Pt as c,Q as l,Rn as u,Sn as d,U as f,W as p,X as m,Xt as h,Y as g,Z as _,_n as v,c as y,ct as b,lt as x,nn as S,nt as C,tn as w,vn as T,wn as E,wt as D,yn as O}from"./index-Dw1N2-ci.js";var k=e(o(),1),A=n(),j=[`todo`,`in_progress`,`on_review`,`done`,`cancelled`],M={todo:`todo`,in_progress:`inProgress`,on_review:`onReview`,done:`done`,cancelled:`cancelled`};function N({state:e,onChanged:t}){let{t:n}=u(`jira`),r=e.connection,[i,a]=(0,k.useState)(r.enabled),[o,c]=(0,k.useState)(!1),[l,d]=(0,k.useState)(!1),[p,m]=(0,k.useState)([]),[h,g]=(0,k.useState)([]),[_,v]=(0,k.useState)(r.discardStatus??``),[y,b]=(0,k.useState)(r.statusMap??{}),x=e.outbox??{pending:0,inflight:0,done:0,dead:0},S=(0,k.useCallback)(async()=>{try{let{ops:e}=await f.listOutbox(`dead`);m(e)}catch{m([])}},[]);(0,k.useEffect)(()=>{S()},[S]),(0,k.useEffect)(()=>{let e=!1;return f.listStatuses().then(({statuses:t})=>{e||g(t)}).catch(()=>{e||g([])}),()=>{e=!0}},[]);async function w(e){let r=_;v(e);try{await f.patchConnection({discardStatus:e||null}),t()}catch(e){v(r),s.error(F(e,n))}}async function T(e,r){let i=y,a={...y,[e]:r||void 0};b(a);let o=Object.fromEntries(Object.entries(a).filter(([,e])=>e));try{await f.patchConnection({statusMap:Object.keys(o).length?o:null}),t()}catch(e){b(i),s.error(F(e,n))}}async function E(){let e=!i;a(e),d(!0);try{await f.setEnabled(e)}catch(t){a(!e),s.error(F(t,n))}finally{d(!1)}}async function D(){c(!0);try{let e=await f.syncNow();s.success(n(`status.syncedToast`,{count:e.upserted}))}catch(e){s.error(F(e,n))}finally{c(!1)}}async function O(){if(window.confirm(n(`status.disconnectConfirm`))){d(!0);try{await f.disconnect(),s.success(n(`status.disconnectedToast`)),t()}catch(e){s.error(F(e,n))}finally{d(!1)}}}async function N(e){try{await f.retryOutbox(e),await S()}catch(e){s.error(F(e,n))}}let I=x.pending+x.inflight;return(0,A.jsxs)(`div`,{className:`space-y-4`,"data-testid":`jira-connected`,children:[(0,A.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`p`,{className:`text-sm font-medium text-foreground`,children:n(`status.connected`,{key:r.jiraProjectKey})}),(0,A.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[r.baseUrl,` · `,r.deployment===`cloud`?n(`review.cloud`):n(`review.dc`)]})]}),(0,A.jsx)(`a`,{href:`${r.baseUrl}/browse/${r.jiraProjectKey}`,target:`_blank`,rel:`noreferrer`,className:`text-xs text-accent-primary hover:underline`,children:n(`badge.openInJira`)})]}),(0,A.jsxs)(`div`,{className:`flex items-center justify-between rounded-md border border-border p-3`,children:[(0,A.jsxs)(`div`,{children:[(0,A.jsx)(`p`,{className:`text-sm font-medium`,children:n(`status.enabledLabel`)}),(0,A.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n(i?`status.enabledHelp`:`status.pausedHelp`)})]}),(0,A.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":i,"aria-label":n(`status.enabledLabel`),disabled:l,onClick:E,className:`relative inline-flex h-5 w-9 shrink-0 items-center rounded-full transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 ${i?`bg-accent-success`:`bg-input`}`,children:(0,A.jsx)(`span`,{className:`inline-block h-3.5 w-3.5 rounded-full bg-background shadow-sm transition-transform ${i?`translate-x-4`:`translate-x-0.5`}`})})]}),(0,A.jsxs)(`div`,{className:`rounded-md border border-border p-3`,"data-testid":`jira-status-map`,children:[(0,A.jsx)(`p`,{className:`text-sm font-medium`,children:n(`wizard.step3Title`)}),(0,A.jsx)(`p`,{className:`mt-0.5 mb-2 text-xs text-muted-foreground`,children:n(`mapping.intro`)}),(0,A.jsx)(`div`,{className:`space-y-2`,children:j.map(e=>(0,A.jsxs)(`label`,{className:`flex items-center justify-between gap-3`,children:[(0,A.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:n(`mapping.${M[e]}`)}),(0,A.jsxs)(`select`,{value:y[e]??``,onChange:t=>void T(e,t.target.value),className:`w-44 rounded-md border border-border bg-background px-2 py-1.5 text-sm`,"data-testid":`jira-statusmap-${e}`,children:[(0,A.jsx)(`option`,{value:``,children:n(`mapping.auto`)}),h.map(e=>(0,A.jsx)(`option`,{value:e.name,children:e.name},e.id)),y[e]&&!h.some(t=>t.name===y[e])&&(0,A.jsx)(`option`,{value:y[e],children:y[e]})]})]},e))})]}),(0,A.jsxs)(`div`,{className:`rounded-md border border-border p-3`,children:[(0,A.jsx)(`p`,{className:`text-sm font-medium`,children:n(`discard.configLabel`)}),(0,A.jsx)(`p`,{className:`mt-0.5 mb-2 text-xs text-muted-foreground`,children:n(`discard.configHelp`)}),(0,A.jsxs)(`select`,{value:_,onChange:e=>void w(e.target.value),className:`w-full rounded-md border border-border bg-background px-2 py-1.5 text-sm`,"data-testid":`jira-discard-status-select`,children:[(0,A.jsx)(`option`,{value:``,children:n(`discard.configNone`)}),h.map(e=>(0,A.jsx)(`option`,{value:e.name,children:e.name},e.id)),_&&!h.some(e=>e.name===_)&&(0,A.jsx)(`option`,{value:_,children:_})]})]}),(0,A.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,A.jsx)(C,{variant:`outline`,size:`sm`,onClick:D,disabled:o,children:n(o?`status.syncing`:`status.syncNow`)}),(0,A.jsx)(C,{variant:`ghost`,size:`sm`,onClick:O,disabled:l,className:`text-destructive`,children:n(`status.disconnect`)})]}),(0,A.jsxs)(`div`,{className:`rounded-md border border-border p-3`,"data-testid":`jira-outbox`,children:[(0,A.jsx)(`p`,{className:`text-sm font-medium`,children:n(`outbox.title`)}),x.dead>0?(0,A.jsx)(`p`,{className:`mt-1 text-xs text-accent-warning`,children:n(`outbox.dead`,{count:x.dead})}):I>0?(0,A.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:n(`outbox.pending`,{count:I})}):(0,A.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:n(`outbox.allSynced`)}),p.length>0&&(0,A.jsxs)(`div`,{className:`mt-2 space-y-2`,children:[(0,A.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n(`outbox.deadHelp`)}),p.map(e=>(0,A.jsxs)(`div`,{className:`flex items-center justify-between gap-2 rounded border border-border/60 px-2 py-1`,children:[(0,A.jsxs)(`span`,{className:`truncate text-xs`,children:[P(e,n),` · `,e.deadReason??e.lastError??``]}),(0,A.jsx)(C,{variant:`outline`,size:`sm`,onClick:()=>N(e.id),children:n(`outbox.retry`)})]},e.id))]})]})]})}function P(e,t){return e.opType===`transition`?t(`outbox.opTransition`):e.opType===`comment`?t(`outbox.opComment`):t(`outbox.opCreate`)}function F(e,t){return e instanceof Error?e.message:t(`errors.generic`)}function I({activeProjectId:e}){let{t}=u(`integrations`),[n,o]=(0,k.useState)(null),[s,c]=(0,k.useState)(!0),[l,d]=(0,k.useState)(!1),[h,_]=(0,k.useState)(!1),v=(0,k.useCallback)(async()=>{try{o(await f.getConnection())}catch{o({connected:!1})}finally{c(!1)}},[]);if((0,k.useEffect)(()=>{!p||!e||(c(!0),v())},[e,v]),!p)return null;let b=!!(n?.connected&&n.connection);return(0,A.jsxs)(`div`,{className:`rounded-lg border border-border bg-card p-4 flex flex-col gap-3 h-full`,"data-testid":`jira-integration-card`,children:[(0,A.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,A.jsx)(`div`,{className:`grid place-items-center w-9 h-9 rounded-md bg-accent-info/15 text-accent-info shrink-0`,children:(0,A.jsx)(r,{className:`w-4 h-4`})}),(0,A.jsxs)(`div`,{className:`flex-1 min-w-0`,children:[(0,A.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,A.jsx)(`h3`,{className:`text-sm font-semibold`,children:t(`jiraCard.title`)}),b&&(0,A.jsxs)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded bg-accent-success/20 text-accent-success flex items-center gap-1`,"data-testid":`jira-connected-badge`,children:[(0,A.jsx)(S,{className:`w-3 h-3`}),` `,t(`jiraCard.connected`)]})]}),(0,A.jsx)(`p`,{className:`text-[10px] text-muted-foreground mt-0.5`,children:t(`jiraCard.category`)})]})]}),(0,A.jsx)(`p`,{className:`text-xs text-muted-foreground leading-relaxed`,children:b&&n?.connection?t(`jiraCard.connectedDescription`,{key:n.connection.jiraProjectKey}):t(`jiraCard.description`)}),(0,A.jsxs)(`ul`,{className:`text-xs space-y-1 list-disc pl-4 text-foreground/80`,children:[(0,A.jsx)(`li`,{children:t(`jiraCard.bullet1`)}),(0,A.jsx)(`li`,{children:t(`jiraCard.bullet2`)}),(0,A.jsx)(`li`,{children:t(`jiraCard.bullet3`)})]}),(0,A.jsx)(`div`,{className:`text-[10px] text-muted-foreground`,children:t(`jiraCard.requires`)}),(0,A.jsx)(`div`,{className:`mt-auto pt-2 flex items-center justify-end gap-2`,children:s?(0,A.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:`…`}):b?(0,A.jsx)(`button`,{type:`button`,onClick:()=>_(!0),"data-testid":`jira-manage-btn`,className:`text-xs px-3 py-1.5 rounded-md border border-border hover:bg-muted/30 inline-flex items-center gap-1.5`,children:t(`jiraCard.manage`)}):(0,A.jsxs)(`button`,{type:`button`,onClick:()=>d(!0),"data-testid":`jira-connect-btn`,className:`text-xs px-3 py-1.5 rounded-md bg-accent-primary text-white hover:opacity-90 inline-flex items-center gap-1.5`,children:[(0,A.jsx)(r,{className:`w-3.5 h-3.5`}),t(`jiraCard.connect`)]})}),(0,A.jsx)(i,{open:l,onOpenChange:d,children:(0,A.jsxs)(a,{className:`max-w-lg`,children:[(0,A.jsx)(g,{children:(0,A.jsx)(m,{children:t(`jiraCard.modalTitle`)})}),(0,A.jsx)(y,{onConnected:()=>{d(!1),v()},onSkip:()=>d(!1)})]})}),(0,A.jsx)(i,{open:h,onOpenChange:_,children:(0,A.jsxs)(a,{className:`max-w-lg`,children:[(0,A.jsx)(g,{children:(0,A.jsx)(m,{children:t(`jiraCard.manageTitle`)})}),n?.connected&&n.connection&&(0,A.jsx)(N,{state:n,onChanged:()=>{v().then(()=>_(!1))}})]})})]})}function L(){let{t:e}=u(`integrations`),{activeProjectId:t,projects:n}=T(),r=n.find(e=>e.id===t),i=r?v(r).includes(`claude`):!0,{registerHandler:a,unregisterHandler:o}=d(),s=(0,k.useRef)(t);(0,k.useEffect)(()=>{s.current=t},[t]);let[c,l]=(0,k.useState)(null),[f,m]=(0,k.useState)(null),{data:h,isLoading:g,isFirstLoad:_,refresh:y}=O({namespace:`plugins`,projectId:t,initialValue:[],fetcher:(0,k.useCallback)(async()=>{let e=await fetch(`${E()}/plugins`);if(!e.ok)throw Error(`HTTP ${e.status}`);return(await e.json()).plugins??[]},[])});(0,k.useEffect)(()=>(a(`integrations-page`,e=>{let t=e;t.type&&(t.projectId&&t.projectId!==s.current||t.type.startsWith(`plugin.`)&&y())}),()=>o(`integrations-page`)),[a,o,y]),(0,k.useEffect)(()=>{l(!g&&!h?`Failed to load plugins`:null)},[g,h]);let x=(0,k.useMemo)(()=>(h??[]).filter(e=>e.status!==`orphan`),[h]),S=(0,k.useMemo)(()=>(h??[]).filter(e=>e.status===`orphan`),[h]);return t?(0,A.jsxs)(`div`,{className:`flex flex-col h-full`,children:[(0,A.jsxs)(`div`,{className:`flex-shrink-0 border-b border-border px-6 pt-4 pb-3 flex items-center gap-2`,children:[(0,A.jsx)(D,{className:`w-4 h-4 text-accent-primary`}),(0,A.jsxs)(`div`,{className:`flex-1`,children:[(0,A.jsx)(`h1`,{className:`text-lg font-semibold`,children:e(`page.title`)}),(0,A.jsx)(`p`,{className:`text-xs text-muted-foreground mt-0.5`,children:e(`page.subtitle`)})]})]}),(0,A.jsx)(`div`,{className:`flex-1 overflow-auto p-6`,children:_&&g?(0,A.jsx)(q,{}):c&&i?(0,A.jsx)(J,{onRetry:y}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsxs)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4`,children:[(0,A.jsx)(I,{activeProjectId:t}),i&&x.map(e=>(0,A.jsx)(R,{plugin:e,isInstalling:f===e.name,onInstall:()=>m(e.name),onCloseInstall:()=>{m(null),y()}},e.name))]}),i&&S.length>0&&(0,A.jsxs)(`div`,{className:`mt-10`,children:[(0,A.jsxs)(`h2`,{className:`text-sm font-semibold text-muted-foreground mb-3 flex items-center gap-2`,children:[(0,A.jsx)(b,{className:`w-3.5 h-3.5`}),` `,e(`page.deprecated`)]}),(0,A.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4`,children:S.map(e=>(0,A.jsx)(U,{plugin:e,onRemoved:y},e.name))})]}),!p&&(!i||x.length===0)&&(0,A.jsx)(Y,{})]})})]}):(0,A.jsx)(`div`,{className:`flex flex-col items-center justify-center h-full text-muted-foreground text-sm`,children:e(`page.selectProject`)})}function R({plugin:e,isInstalling:n,onInstall:r,onCloseInstall:i}){let{t:a}=u(`integrations`),[o,s]=(0,k.useState)(!1);return(0,A.jsxs)(`div`,{className:`rounded-lg border border-border bg-card p-4 flex flex-col gap-3 h-full`,children:[(0,A.jsx)(`div`,{className:`flex items-start gap-2`,children:(0,A.jsxs)(`div`,{className:`flex-1`,children:[(0,A.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,A.jsx)(`h3`,{className:`text-sm font-semibold`,children:e.name}),(0,A.jsxs)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded bg-muted text-muted-foreground`,children:[`v`,e.version]}),e.status===`installed`&&(0,A.jsxs)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded bg-accent-success/20 text-accent-success flex items-center gap-1`,children:[(0,A.jsx)(S,{className:`w-3 h-3`}),` `,a(`card.statusActive`)]}),e.status===`deactivated`&&(0,A.jsxs)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded bg-muted text-muted-foreground flex items-center gap-1`,children:[(0,A.jsx)(w,{className:`w-3 h-3`}),` `,a(`card.statusDeactivated`)]}),e.status===`degraded`&&(0,A.jsxs)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded bg-accent-warning/20 text-accent-warning flex items-center gap-1`,children:[(0,A.jsx)(b,{className:`w-3 h-3`}),` `,a(`card.statusDegraded`)]}),e.updateAvailable&&(0,A.jsxs)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded bg-accent-info/20 text-accent-info flex items-center gap-1`,children:[(0,A.jsx)(h,{className:`w-3 h-3`}),` `,a(`card.updateAvailable`)]})]}),e.category&&(0,A.jsx)(`p`,{className:`text-[10px] text-muted-foreground mt-0.5`,children:e.category})]})}),(0,A.jsx)(`p`,{className:`text-xs text-muted-foreground leading-relaxed`,children:e.description}),e.whatItDoes.length>0&&(0,A.jsx)(`ul`,{className:`text-xs space-y-1 list-disc pl-4 text-foreground/80`,children:e.whatItDoes.map((e,t)=>(0,A.jsx)(`li`,{children:e},t))}),e.requirements.length>0&&(0,A.jsx)(`div`,{className:`text-[10px] text-muted-foreground`,children:a(`card.requires`,{list:e.requirements.map(e=>`${e.name}${e.minVersion?` ≥ ${e.minVersion}`:``}`).join(`, `)})}),e.healthReason&&e.status===`degraded`&&(0,A.jsx)(`div`,{className:`text-[11px] text-accent-warning`,children:e.healthReason}),e.status===`deactivated`&&(0,A.jsx)(`div`,{className:`text-[11px] text-muted-foreground leading-relaxed`,children:(0,A.jsx)(t,{t:a,i18nKey:`card.deactivatedHint`,components:{strong:(0,A.jsx)(`strong`,{})}})}),e.marketplaceConflicts&&e.marketplaceConflicts.length>0&&(0,A.jsx)(H,{pluginName:e.name,conflicts:e.marketplaceConflicts}),e.marketplaceCachedButDisabled&&e.marketplaceCachedButDisabled.length>0&&(0,A.jsx)(B,{keys:e.marketplaceCachedButDisabled}),e.updateAvailable&&(0,A.jsx)(V,{pluginName:e.name}),(0,A.jsx)(`div`,{className:`mt-auto pt-2 flex items-center justify-end gap-2`,children:e.status===`not-installed`?(0,A.jsx)(`button`,{type:`button`,onClick:r,className:`text-xs px-3 py-1.5 rounded-md bg-accent-primary text-white hover:opacity-90`,children:a(`card.install`)}):(0,A.jsxs)(A.Fragment,{children:[(0,A.jsx)(z,{pluginName:e.name,active:e.status===`installed`}),(0,A.jsxs)(`button`,{type:`button`,onClick:()=>s(!0),className:`text-xs px-3 py-1.5 rounded-md border border-border hover:bg-destructive/10 hover:text-destructive flex items-center gap-1.5`,children:[(0,A.jsx)(x,{className:`w-3 h-3`}),` `,a(`card.uninstall`)]})]})}),n&&(0,A.jsx)(W,{pluginName:e.name,onClose:i}),o&&(0,A.jsx)(G,{pluginName:e.name,onClose:()=>s(!1),onUninstalled:()=>{s(!1)}})]})}function z({pluginName:e,active:t}){let{t:n}=u(`integrations`),[r,i]=(0,k.useState)(!1),[a,o]=(0,k.useState)(null);return(0,A.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,A.jsx)(`button`,{type:`button`,disabled:r,onClick:async()=>{i(!0),o(null);try{let n=`${E()}/plugins/${e}/${t?`deactivate`:`activate`}`,r=await fetch(n,{method:`POST`});if(!r.ok)throw Error((await r.json()).error??`HTTP ${r.status}`)}catch(e){o(e.message)}finally{i(!1)}},role:`switch`,"aria-checked":t,className:`relative inline-flex items-center h-5 w-9 rounded-full transition-colors disabled:opacity-50 ${t?`bg-accent-success`:`bg-muted`}`,title:n(t?`toggle.titleActive`:`toggle.titleDeactivated`),children:(0,A.jsx)(`span`,{className:`inline-block h-4 w-4 rounded-full bg-white shadow transition-transform ${t?`translate-x-4`:`translate-x-0.5`}`})}),(0,A.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:n(t?`card.statusActive`:`common:states.off`)}),a&&(0,A.jsx)(`span`,{className:`text-[10px] text-destructive`,children:a})]})}function B({keys:e}){let{t:n}=u(`integrations`);return(0,A.jsxs)(`div`,{className:`text-[11px] rounded-md border border-yellow-500/30 aurora-light:border-accent-warning/30 bg-yellow-500/5 aurora-light:bg-accent-warning/10 p-2 leading-relaxed space-y-1`,children:[(0,A.jsxs)(`div`,{className:`flex items-start gap-1.5`,children:[(0,A.jsx)(b,{className:`w-3 h-3 text-yellow-500 aurora-light:text-accent-warning mt-0.5 flex-shrink-0`}),(0,A.jsx)(`span`,{children:(0,A.jsx)(t,{t:n,i18nKey:`cachedNotice.body`,components:{strong:(0,A.jsx)(`strong`,{}),code:(0,A.jsx)(`code`,{className:`bg-muted px-1 rounded`})}})})]}),(0,A.jsx)(`div`,{className:`pl-5 space-y-0.5`,children:e.map(e=>(0,A.jsxs)(`pre`,{className:`text-[10px] bg-muted/40 rounded px-1.5 py-0.5 inline-block font-mono`,children:[`/plugin uninstall `,e]},e))}),(0,A.jsx)(`div`,{className:`pl-5 text-[10px] text-muted-foreground`,children:n(`cachedNotice.runInstruction`)})]})}function V({pluginName:e}){let{t:n}=u(`integrations`),[r,i]=(0,k.useState)(!1),[a,o]=(0,k.useState)(null);return(0,A.jsxs)(`div`,{className:`text-[11px] rounded-md border border-accent-info/30 bg-accent-info/5 p-2 leading-relaxed space-y-1.5`,children:[(0,A.jsxs)(`div`,{className:`flex items-start gap-1.5`,children:[(0,A.jsx)(h,{className:`w-3 h-3 text-accent-info mt-0.5 flex-shrink-0`}),(0,A.jsx)(`span`,{children:(0,A.jsx)(t,{t:n,i18nKey:`update.body`,components:{code:(0,A.jsx)(`code`,{className:`bg-muted px-1 rounded`})}})})]}),(0,A.jsxs)(`button`,{type:`button`,disabled:r,onClick:async()=>{i(!0),o(null);try{let t=await fetch(`${E()}/plugins/${e}/update`,{method:`POST`});if(!t.ok)throw Error((await t.json()).error??`HTTP ${t.status}`)}catch(e){o(e.message)}finally{i(!1)}},className:`text-[10px] px-2 py-0.5 rounded border border-accent-info/40 hover:bg-accent-info/10 disabled:opacity-50 flex items-center gap-1`,children:[r&&(0,A.jsx)(c,{className:`w-2.5 h-2.5 animate-spin`}),(0,A.jsx)(t,{t:n,i18nKey:`update.button`,components:{code:(0,A.jsx)(`code`,{})}})]}),a&&(0,A.jsx)(`div`,{className:`text-destructive text-[10px]`,children:a})]})}function H({pluginName:e,conflicts:n}){let{t:r}=u(`integrations`),[i,a]=(0,k.useState)(null),[o,s]=(0,k.useState)(null),l=async e=>{a(e),s(null);try{let t=await fetch(`${E()}/plugins/_marketplace/disable`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({key:e})});if(!t.ok)throw Error((await t.json()).error??`HTTP ${t.status}`)}catch(e){s(e.message)}finally{a(null)}};return(0,A.jsxs)(`div`,{className:`text-[11px] rounded-md border border-yellow-500/30 aurora-light:border-accent-warning/30 bg-yellow-500/5 aurora-light:bg-accent-warning/10 p-2 leading-relaxed space-y-1.5`,children:[(0,A.jsxs)(`div`,{className:`flex items-start gap-1.5`,children:[(0,A.jsx)(b,{className:`w-3 h-3 text-yellow-500 aurora-light:text-accent-warning mt-0.5 flex-shrink-0`}),(0,A.jsx)(`span`,{children:(0,A.jsx)(t,{t:r,i18nKey:`conflict.body`,values:{name:e},components:{strong:(0,A.jsx)(`strong`,{})}})})]}),(0,A.jsx)(`div`,{className:`flex flex-wrap gap-1.5 pt-1`,children:n.map(e=>(0,A.jsxs)(`button`,{type:`button`,disabled:i===e,onClick:()=>l(e),className:`text-[10px] px-2 py-0.5 rounded border border-yellow-500/40 aurora-light:border-accent-warning/40 hover:bg-yellow-500/10 aurora-light:hover:bg-accent-warning/10 disabled:opacity-50 flex items-center gap-1`,children:[i===e&&(0,A.jsx)(c,{className:`w-2.5 h-2.5 animate-spin`}),(0,A.jsx)(t,{t:r,i18nKey:`conflict.disableButton`,values:{key:e},components:{code:(0,A.jsx)(`code`,{})}})]},e))}),o&&(0,A.jsx)(`div`,{className:`text-destructive`,children:o})]})}function U({plugin:e,onRemoved:t}){let{t:n}=u(`integrations`),[r,i]=(0,k.useState)(!1);return(0,A.jsxs)(`div`,{className:`rounded-lg border border-yellow-500/30 aurora-light:border-accent-warning/30 bg-yellow-500/5 aurora-light:bg-accent-warning/10 p-4 flex flex-col gap-3`,children:[(0,A.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,A.jsx)(`h3`,{className:`text-sm font-semibold`,children:e.name}),(0,A.jsx)(`span`,{className:`text-[10px] px-1.5 py-0.5 rounded bg-yellow-500/20 aurora-light:bg-accent-warning/15 text-yellow-500 aurora-light:text-accent-warning`,children:n(`orphan.badge`)})]}),(0,A.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e.description}),(0,A.jsx)(`div`,{className:`flex items-center justify-end`,children:(0,A.jsxs)(`button`,{type:`button`,disabled:r,onClick:async()=>{i(!0);try{await fetch(`${E()}/plugins/${e.name}`,{method:`DELETE`}),t()}finally{i(!1)}},className:`text-xs px-3 py-1.5 rounded-md border border-border hover:bg-destructive/10 hover:text-destructive flex items-center gap-1.5`,children:[(0,A.jsx)(x,{className:`w-3 h-3`}),` `,n(`orphan.removeButton`)]})})]})}function W({pluginName:e,onClose:t}){let{t:n}=u(`integrations`),[r,i]=(0,k.useState)(null),[a,o]=(0,k.useState)(null),[s,l]=(0,k.useState)(!1),[f,p]=(0,k.useState)(null),[m,g]=(0,k.useState)([]),[_,v]=(0,k.useState)(null),[y,x]=(0,k.useState)([]),{registerHandler:C,unregisterHandler:T}=d(),D=(0,k.useCallback)(()=>{i(null),o(null),fetch(`${E()}/plugins/${e}/preview-install`).then(e=>e.ok?e.json():Promise.reject(Error(`HTTP ${e.status}`))).then(e=>i(e)).catch(e=>o(e.message))},[e]);(0,k.useEffect)(()=>{D()},[D]),(0,k.useEffect)(()=>(C(`install-${e}`,t=>{let n=t;if(n.type===`plugin.install_progress`&&n.name===e&&n.line&&g(e=>[...e,n.line]),n.type===`plugin.prereq_install_progress`&&n.line&&x(e=>[...e,n.line]),n.type===`plugin.prereq_installed`){v(null);let e=n.reason;e&&x(t=>[...t,`► ${e}`]),n.ok&&D()}}),()=>T(`install-${e}`)),[e,C,T,D]);let O=async e=>{v(e),x([n(`installDialog.installingPrereq`,{name:e})]);try{await fetch(`${E()}/plugins/_prerequisites/${e}/install`,{method:`POST`})}catch(e){x(t=>[...t,n(`installDialog.prereqStartFailed`,{message:e.message})]),v(null)}},j=(r?.requirements??[]).every(e=>e.installed&&e.executable&&e.meetsMinimum);return(0,A.jsxs)(K,{onClose:t,title:n(`installDialog.title`,{name:e}),children:[a&&(0,A.jsx)(`div`,{className:`text-xs text-destructive`,children:a}),!r&&!a&&(0,A.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,A.jsx)(c,{className:`w-3 h-3 animate-spin`}),` `,n(`installDialog.computingChanges`)]}),r&&(0,A.jsxs)(A.Fragment,{children:[r.platformNote&&(0,A.jsxs)(`div`,{className:`flex items-start gap-2 p-2.5 rounded-md border border-yellow-500/30 aurora-light:border-accent-warning/30 bg-yellow-500/5 aurora-light:bg-accent-warning/10 text-[11px] leading-relaxed`,children:[(0,A.jsx)(b,{className:`w-3.5 h-3.5 text-yellow-500 aurora-light:text-accent-warning mt-0.5 flex-shrink-0`}),(0,A.jsx)(`span`,{children:r.platformNote})]}),(0,A.jsxs)(`section`,{children:[(0,A.jsx)(`h4`,{className:`text-xs font-semibold mb-1.5`,children:n(`installDialog.filesHeading`)}),(0,A.jsx)(`ul`,{className:`text-xs space-y-0.5 font-mono`,children:r.files.map((e,t)=>(0,A.jsxs)(`li`,{className:e.op===`create`?`text-accent-success`:`text-accent-info`,children:[e.op===`create`?`+ `:`~ `,e.path,e.summary&&(0,A.jsxs)(`span`,{className:`text-muted-foreground`,children:[` `,e.summary]})]},t))})]}),r.requirements.length>0&&(0,A.jsxs)(`section`,{children:[(0,A.jsx)(`h4`,{className:`text-xs font-semibold mb-1.5`,children:n(`installDialog.prerequisites`)}),(0,A.jsx)(`ul`,{className:`text-xs space-y-1`,children:r.requirements.map(e=>{let t=e.installed&&e.executable&&e.meetsMinimum,r=e.name===`uv`;return(0,A.jsxs)(`li`,{className:`flex items-center gap-2`,children:[t?(0,A.jsx)(S,{className:`w-3 h-3 text-accent-success`}):(0,A.jsx)(w,{className:`w-3 h-3 text-accent-warning`}),(0,A.jsxs)(`span`,{children:[e.name,e.minVersion?` ≥ ${e.minVersion}`:``]}),e.version&&(0,A.jsxs)(`span`,{className:`text-muted-foreground`,children:[`(`,e.version,`)`]}),!t&&r&&(0,A.jsxs)(`button`,{type:`button`,disabled:_===e.name,onClick:()=>O(e.name),className:`ml-auto text-[10px] px-2 py-0.5 rounded border border-border hover:bg-muted disabled:opacity-50 flex items-center gap-1`,children:[_===e.name&&(0,A.jsx)(c,{className:`w-2.5 h-2.5 animate-spin`}),n(`installDialog.autoInstall`)]})]},e.name)})}),y.length>0&&(0,A.jsx)(`pre`,{className:`mt-2 text-[11px] bg-muted/40 rounded p-2 max-h-24 overflow-auto font-mono`,children:y.join(`
|
|
2
|
-
`)})]}),m.length>0&&(0,A.jsxs)(`section`,{children:[(0,A.jsx)(`h4`,{className:`text-xs font-semibold mb-1.5`,children:n(`installDialog.progress`)}),(0,A.jsx)(`pre`,{className:`text-[11px] bg-muted/40 rounded p-2 max-h-32 overflow-auto font-mono`,children:m.join(`
|
|
3
|
-
`)})]}),f&&(0,A.jsx)(`div`,{className:`text-xs text-destructive`,children:f})]}),(0,A.jsxs)(`div`,{className:`flex justify-end gap-2 pt-2`,children:[(0,A.jsx)(`button`,{type:`button`,onClick:t,className:`text-xs px-3 py-1.5 rounded-md border border-border`,children:n(`common:actions.cancel`)}),(0,A.jsxs)(`button`,{type:`button`,disabled:!r||!j||s,onClick:async()=>{l(!0),p(null);try{let n=await fetch(`${E()}/plugins/${e}/install`,{method:`POST`});if(!n.ok)throw Error((await n.json()).error??`HTTP ${n.status}`);setTimeout(t,1500)}catch(e){p(e.message)}finally{l(!1)}},className:`text-xs px-3 py-1.5 rounded-md bg-accent-primary text-white disabled:opacity-50 flex items-center gap-1.5`,children:[s?(0,A.jsx)(c,{className:`w-3 h-3 animate-spin`}):(0,A.jsx)(h,{className:`w-3 h-3`}),n(`card.install`)]})]})]})}function G({pluginName:e,onClose:n,onUninstalled:r}){let{t:i}=u(`integrations`),[a,o]=(0,k.useState)(!1),[s,l]=(0,k.useState)(null);return(0,A.jsxs)(K,{onClose:n,title:i(`uninstallDialog.title`,{name:e}),children:[(0,A.jsx)(`p`,{className:`text-xs`,children:(0,A.jsx)(t,{t:i,i18nKey:`uninstallDialog.body`,components:{code:(0,A.jsx)(`code`,{})}})}),s&&(0,A.jsx)(`div`,{className:`text-xs text-destructive`,children:s}),(0,A.jsxs)(`div`,{className:`flex justify-end gap-2 pt-2`,children:[(0,A.jsx)(`button`,{type:`button`,onClick:n,className:`text-xs px-3 py-1.5 rounded-md border border-border`,children:i(`common:actions.cancel`)}),(0,A.jsxs)(`button`,{type:`button`,disabled:a,onClick:async()=>{o(!0);try{let t=await fetch(`${E()}/plugins/${e}`,{method:`DELETE`});if(!t.ok)throw Error((await t.json()).error??`HTTP ${t.status}`);r()}catch(e){l(e.message)}finally{o(!1)}},className:`text-xs px-3 py-1.5 rounded-md bg-destructive text-white disabled:opacity-50 flex items-center gap-1.5`,children:[a&&(0,A.jsx)(c,{className:`w-3 h-3 animate-spin`}),i(`card.uninstall`)]})]})]})}function K({title:e,onClose:t,children:n}){let{panelRef:r,panelStyle:i,headerHandleProps:a,resizeHandles:o,isFloating:s,guardBackdrop:c}=l();return(0,A.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/40`,role:`dialog`,tabIndex:-1,onClick:c(t),children:[(0,A.jsxs)(`div`,{ref:r,className:`bg-card border border-border rounded-lg shadow-xl w-full max-w-md p-5 flex flex-col gap-3`,onClick:e=>e.stopPropagation(),style:i,children:[(0,A.jsx)(`h3`,{className:`text-sm font-semibold ${s?`cursor-grab active:cursor-grabbing`:``}`,...a,children:e}),n]}),(0,A.jsx)(_,{handles:o})]})}function q(){return(0,A.jsx)(`div`,{className:`grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4`,children:Array.from({length:3},(e,t)=>(0,A.jsx)(`div`,{className:`rounded-lg border border-border bg-card p-4 h-40 animate-pulse`},t))})}function J({onRetry:e}){let{t}=u(`integrations`);return(0,A.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-12 gap-3 text-sm text-muted-foreground`,children:[(0,A.jsx)(b,{className:`w-5 h-5 text-destructive`}),(0,A.jsx)(`p`,{children:t(`page.loadError`)}),(0,A.jsx)(`button`,{type:`button`,onClick:e,className:`text-xs px-3 py-1.5 rounded-md border border-border`,children:t(`common:actions.retry`)})]})}function Y(){let{t:e}=u(`integrations`);return(0,A.jsxs)(`div`,{className:`flex flex-col items-center justify-center py-12 gap-2 text-sm text-muted-foreground`,children:[(0,A.jsx)(D,{className:`w-6 h-6`}),(0,A.jsx)(`p`,{children:e(`page.empty`)})]})}export{L as default};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./chunk-BNv3lrIs.js";import{a as t}from"./auth-Cvsb7-Ek.js";import{t as n}from"./brain-BBNUUrUI.js";import{A as r,B as i,C as a,Cn as o,Dt as s,H as c,It as l,Kn as u,Ln as d,Pt as f,Rn as p,Sn as m,St as h,Vt as g,Wt as _,Zt as v,_t as y,a as b,an as x,at as S,bt as C,en as w,fn as T,ft as E,gn as D,h as O,i as k,j as A,nn as j,nt as M,o as N,on as ee,r as te,rt as P,sn as F,tn as ne,ut as I,vn as L,vt as R,wn as z,xn as B,z as V}from"./index-Dw1N2-ci.js";import{t as re}from"./lib-BviHZ_gK.js";var ie=D(`chevrons-down-up`,[[`path`,{d:`m7 20 5-5 5 5`,key:`13a0gw`}],[`path`,{d:`m7 4 5 5 5-5`,key:`1kwcof`}]]),ae=D(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),oe=D(`hourglass`,[[`path`,{d:`M5 22h14`,key:`ehvnwv`}],[`path`,{d:`M5 2h14`,key:`pdyrp9`}],[`path`,{d:`M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22`,key:`1d314k`}],[`path`,{d:`M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2`,key:`1vvvr6`}]]);function H(e){return e.command.startsWith(`loop:`)?`loop-run`:e.interactive?`interactive`:`job`}var se=15e3;function ce(e){if(typeof AbortSignal<`u`&&typeof AbortSignal.timeout==`function`)return AbortSignal.timeout(e)}async function le(e){let{projectId:n,jobId:r,timeoutMs:i=se}=e,a=n?`${t}/api/projects/${n}`:z(),o;try{o=await fetch(`${a}/jobs/${r}`,{method:`DELETE`,signal:ce(i)})}catch(e){let t=e;return{ok:!1,error:t?.name===`TimeoutError`||t?.name===`AbortError`?`Request timed out after ${Math.round(i/1e3)}s`:t?.message||String(e),httpStatus:null}}if(o.ok){let e=`canceled`;try{let t=await o.json();t&&typeof t.status==`string`&&(e=t.status)}catch{}return{ok:!0,status:e}}let s=typeof o.status==`number`?o.status:null,c=s==null?``:` (HTTP ${s})`,l=``;try{typeof o.text==`function`?l=await o.text():typeof o.json==`function`&&(l=JSON.stringify(await o.json()))}catch{}let u=l.slice(0,200).trim();try{let e=JSON.parse(l);e&&typeof e.error==`string`&&e.error&&(u=e.error)}catch{}let d=typeof o.statusText==`string`?o.statusText:``;return{ok:!1,error:u?`${u}${c}`:`HTTP ${s??`?`}${d?` ${d}`:``}`,httpStatus:s}}var U=o();function ue({phases:e,phaseDefinitions:t}){return t.length===0?null:(0,U.jsx)(`div`,{className:`flex items-center`,children:t.map((n,r)=>{let a=e[n.key]??`idle`,o=r<t.length-1?e[t[r+1].key]??`idle`:null;return(0,U.jsxs)(`div`,{className:`flex items-center`,children:[(0,U.jsxs)(V,{children:[(0,U.jsx)(c,{asChild:!0,children:(0,U.jsxs)(`div`,{className:`flex flex-col items-center gap-1.5 cursor-default px-4`,children:[(0,U.jsx)(de,{state:a}),(0,U.jsx)(`span`,{className:P(`text-xs font-medium transition-colors`,a===`running`?`text-blue-400 aurora-light:text-accent-info`:a===`done`?`text-emerald-400 aurora-light:text-accent-success`:a===`error`?`text-red-400 aurora-light:text-destructive`:`text-muted-foreground/40`),children:n.label})]})}),(0,U.jsxs)(i,{side:`bottom`,className:`max-w-[200px]`,children:[(0,U.jsx)(`p`,{className:`font-medium`,children:n.label}),(0,U.jsx)(`p`,{className:`text-muted-foreground mt-0.5`,children:n.description})]})]}),o!==null&&(0,U.jsx)(`div`,{className:P(`h-px w-12 -mt-5 shrink-0 transition-all duration-300`,o===`done`||a===`done`?`bg-emerald-500/30 aurora-light:bg-accent-success/40`:o===`running`?`bg-blue-400/40 aurora-light:bg-accent-info/40`:`bg-border/30`)})]},n.key)})})}function de({state:e}){return(0,U.jsxs)(`div`,{className:P(`flex items-center justify-center w-10 h-10 rounded-full transition-all duration-300`,e===`running`?`bg-blue-500/10 aurora-light:bg-accent-info/10 ring-1 ring-blue-400/30 aurora-light:ring-accent-info/30 animate-pulse`:e===`done`?`bg-emerald-500/10 aurora-light:bg-accent-success/10`:e===`error`?`bg-red-500/10 aurora-light:bg-destructive/10`:`bg-muted/20`),children:[e===`running`&&(0,U.jsx)(f,{className:`w-6 h-6 text-blue-400 aurora-light:text-accent-info animate-spin`}),e===`done`&&(0,U.jsx)(j,{className:`w-6 h-6 text-emerald-400 aurora-light:text-accent-success`}),e===`error`&&(0,U.jsx)(ne,{className:`w-6 h-6 text-red-400 aurora-light:text-destructive`}),e===`idle`&&(0,U.jsx)(w,{className:`w-6 h-6 text-muted-foreground/20`})]})}var W=e(u(),1);function fe(e){let t=e.trimStart();return!!(/^#{1,6}\s/.test(t)||/^[-*+]\s/.test(t)||/^\d+\.\s/.test(t)||/^\|.+\|/.test(t)||t.startsWith("```")||t.startsWith(`> `)||/\*\*[^*]+\*\*/.test(e)||/`[^`]+`/.test(e)||/\[.+\]\(.+\)/.test(e)||/^(-{3,}|_{3,}|\*{3,})$/.test(t)||/^- \[[ x]\]\s/.test(t))}var G=new Set;function K({ticketId:e,onOpen:t,children:n}){let{t:r}=p(`agent`),i=r(`refs.openTicket`,{id:e});return(0,U.jsx)(`button`,{type:`button`,"data-testid":`log-ticket-ref`,onClick:n=>{n.stopPropagation(),t(e)},title:i,"aria-label":i,className:`inline cursor-pointer p-0 align-baseline text-accent-primary/90 underline decoration-accent-primary/50 decoration-dotted underline-offset-2 transition-colors hover:text-accent-primary hover:decoration-solid`,children:n})}function pe(e){if(!e.includes(`#`))return null;let t=b(e,G);return t.some(e=>e.kind===`ticket`)?t:null}function me(e,t){let n=pe(e);return n?n.map((e,n)=>e.kind===`ticket`?(0,U.jsx)(K,{ticketId:e.ticketId,onOpen:t,children:e.label},n):(0,U.jsx)(W.Fragment,{children:e.kind===`text`?e.text:e.label},n)):e}var he=new Set([`code`,`inlineCode`,`link`,`linkReference`,`image`,`imageReference`,`definition`,`html`]);function ge(e){return e.kind===`ticket`?{type:`link`,url:te({kind:`ticket`,ticketId:e.ticketId}),children:[{type:`text`,value:e.label}]}:{type:`text`,value:e.kind===`text`?e.text:e.label}}function _e(e){let t=e.children;if(t)for(let e=t.length-1;e>=0;e--){let n=t[e];if(!he.has(n.type))if(n.type===`text`&&typeof n.value==`string`){let r=b(n.value,G);r.some(e=>e.kind===`ticket`)&&t.splice(e,1,...r.map(ge))}else _e(n)}}function ve(){return e=>_e(e)}function ye(e){let{activeProjectId:t}=L(),{openRef:n}=N(),r=e??t??void 0;return(0,W.useMemo)(()=>r?e=>{n(r,{kind:`ticket`,ticketId:e})}:void 0,[r,n])}function be(e,t){let n=`${e.id??t}`,r=e.timestamp;if(e.event_type===`log`)try{let t=JSON.parse(e.payload).line??``;return t.trim()?t.startsWith(`▸`)||t.match(/^(architect|developer|reviewer|ship|analyst)\s*:/i)?{id:n,content:t,type:`phase`,timestamp:r}:e.source===`stderr`?{id:n,content:t,type:`stderr`,timestamp:r}:fe(t)?{id:n,content:t,type:`assistant`,timestamp:r}:{id:n,content:t,type:`plain`,timestamp:r}:null}catch{return null}if(e.event_type!==`log`&&e.event_type!==`result`)return null;if(e.event_type===`result`)try{let t=JSON.parse(e.payload),i=[];return t.duration_ms&&i.push(`${(t.duration_ms/1e3).toFixed(1)}s`),t.total_cost_usd&&i.push(`$${t.total_cost_usd.toFixed(4)}`),t.num_turns&&i.push(B.t(`jobs:logViewer.turns`,{count:t.num_turns})),{id:n,content:`▸ ${B.t(`jobs:logViewer.completed`)}${i.length?` — ${i.join(` · `)}`:``}`,type:`result`,timestamp:r}}catch{return null}return null}function xe(e){let t=`none`,n=[];for(let r of e){let e=r.type;if(e!==`plain`&&e!==`log`){t=`none`,n.push(r);continue}let i=r.content;i.startsWith(`--- `)?(t=`saw_minus`,n.push({...r,type:`diff-meta`})):t===`saw_minus`&&i.startsWith(`+++ `)?(t=`active`,n.push({...r,type:`diff-meta`})):t===`active`&&i.startsWith(`@@ `)?n.push({...r,type:`diff-hunk`}):t===`active`&&i.startsWith(`+`)&&!i.startsWith(`+++`)?n.push({...r,type:`diff-add`}):t===`active`&&i.startsWith(`-`)&&!i.startsWith(`---`)?n.push({...r,type:`diff-remove`}):(t===`active`&&(i.startsWith(` `)||i===``)||(t=`none`),n.push(r))}return n}function Se(e){let t=[];for(let n of e){let e=t.length>0?t[t.length-1]:null;n.type===`assistant`&&e?.type===`assistant`?e.content+=`
|
|
2
|
-
`+n.content:t.push({...n})}return t}function Ce(e){let t=[{key:`__preamble__`,header:null,lines:[]}];for(let n of e)n.type===`phase`?t.push({key:n.id,header:n,lines:[]}):t[t.length-1].lines.push(n);return t.filter(e=>e.header!==null||e.lines.length>0)}function we({events:e,isLoading:t,projectId:n}){let{t:r,i18n:i}=p(`jobs`),[a,o]=(0,W.useState)(``),[s,c]=(0,W.useState)(!0),[l,u]=(0,W.useState)(new Set),f=(0,W.useRef)(null),m=(0,W.useRef)(null),h=ye(n),{processedLines:g,groups:_,totalLines:y}=(0,W.useMemo)(()=>{let t=xe(Se(e.map((e,t)=>be(e,t)).filter(e=>e!==null)));return{processedLines:t,groups:Ce(t),totalLines:t.length}},[e,i.language]),b=(0,W.useMemo)(()=>{if(!a)return y;let e=a.toLowerCase();return g.filter(t=>t.content.toLowerCase().includes(e)).length},[a,g,y]),x=(0,W.useCallback)(()=>{let e=m.current;e&&(e.scrollTop=e.scrollHeight)},[]);(0,W.useEffect)(()=>{s&&x()},[e.length,s,x]);function S(){let e=m.current;e&&c(e.scrollHeight-e.scrollTop-e.clientHeight<50)}function C(e){u(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}return t?(0,U.jsx)(`div`,{className:`flex-1 flex items-center justify-center`,children:(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:r(`logViewer.loading`)})}):y===0?(0,U.jsx)(`div`,{className:`flex-1 flex items-center justify-center`,children:(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:r(`logViewer.empty`)})}):(0,U.jsxs)(`div`,{className:`flex flex-col h-full`,children:[(0,U.jsxs)(`div`,{className:`px-4 py-2 border-b border-border flex items-center gap-2`,children:[(0,U.jsxs)(`div`,{className:`relative flex-1 max-w-xs`,children:[(0,U.jsx)(R,{className:`absolute left-2.5 top-1/2 -translate-y-1/2 w-3 h-3 text-muted-foreground`}),(0,U.jsx)(O,{placeholder:r(`logViewer.filterPlaceholder`),value:a,onChange:e=>o(e.target.value),className:`pl-7 h-7`})]}),(0,U.jsx)(M,{variant:`ghost`,size:`sm`,className:`h-7 px-2 text-muted-foreground/50 hover:text-foreground`,onClick:()=>{let e=g.map(e=>e.content).join(`
|
|
3
|
-
`);navigator.clipboard.writeText(e).then(()=>{d.success(r(`logViewer.copySuccess`))}).catch(()=>{d.error(r(`logViewer.copyFailed`))})},children:(0,U.jsx)(v,{className:`w-3.5 h-3.5`})}),(0,U.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:r(`logViewer.lineCount`,{filtered:b,total:y})})]}),(0,U.jsxs)(`div`,{ref:m,className:`flex-1 overflow-y-auto p-2 text-xs relative`,onScroll:S,children:[_.map(e=>(0,U.jsx)(Te,{group:e,filter:a,collapsed:l.has(e.key),onToggle:()=>C(e.key),onOpenTicket:h},e.key)),(0,U.jsx)(`div`,{ref:f})]}),!s&&(0,U.jsxs)(M,{size:`sm`,variant:`secondary`,onClick:()=>{c(!0),x()},className:`absolute bottom-16 right-6 h-7 gap-1 shadow-lg`,children:[(0,U.jsx)(ee,{className:`w-3 h-3`}),r(`logViewer.jumpToBottom`)]})]})}var Te=(0,W.memo)(function({group:e,filter:t,collapsed:n,onToggle:r,onOpenTicket:i}){let{t:a}=p(`jobs`),o=t?e.lines.filter(e=>e.content.toLowerCase().includes(t.toLowerCase())):e.lines;if(e.header===null)return o.length===0?null:(0,U.jsx)(`div`,{children:o.map((e,t)=>(0,U.jsx)(q,{line:e,even:t%2==0,onOpenTicket:i},e.id))});let s=e.header.content;return(0,U.jsxs)(`div`,{className:`mt-3 rounded-md overflow-hidden border border-border/20`,children:[(0,U.jsxs)(`button`,{type:`button`,onClick:r,className:P(`flex items-center gap-2 w-full text-left px-3 py-2`,`bg-primary/5 border-b border-primary/20`,`hover:bg-primary/10 transition-colors duration-150 cursor-pointer`),children:[(0,U.jsx)(x,{className:P(`w-3 h-3 text-primary/60 shrink-0 transition-transform duration-150`,!n&&`rotate-90`)}),(0,U.jsx)(`span`,{className:`flex-1 text-[12px] font-semibold text-foreground leading-none`,children:s}),e.header.timestamp&&(0,U.jsx)(`span`,{className:`text-[10px] text-muted-foreground/40 font-mono tabular-nums shrink-0`,children:new Date(e.header.timestamp).toLocaleTimeString(`en`,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1})}),(0,U.jsx)(`span`,{className:`text-[10px] text-muted-foreground/40 shrink-0`,children:a(`logViewer.phaseLines`,{count:e.lines.length})})]}),!n&&(0,U.jsx)(`div`,{className:`bg-muted/5`,children:o.length===0?(0,U.jsx)(`p`,{className:`px-4 py-2 text-[10px] text-muted-foreground/40 italic`,children:a(t?`logViewer.noMatchingLines`:`logViewer.noOutput`)}):o.map((e,t)=>(0,U.jsx)(q,{line:e,even:t%2==0,onOpenTicket:i},e.id))})]})}),Ee=[re],De=[r],Oe=[r,ve],q=(0,W.memo)(function({line:e,even:t,onOpenTicket:n}){let r=e.type===`assistant`,i=e.type===`diff-add`,a=e.type===`diff-remove`,o=e.type===`diff-meta`,s=e.type===`diff-hunk`,c=i||a||o||s,l=n!=null&&(e.type===`plain`||e.type===`log`),u=(0,W.useMemo)(()=>l&&n?me(e.content,n):e.content,[l,n,e.content]),d=r&&n?Oe:De,f=(0,W.useMemo)(()=>n?{a:({href:e,children:t})=>{let r=k(e);return r?.kind===`ticket`?(0,U.jsx)(K,{ticketId:r.ticketId,onOpen:n,children:t}):(0,U.jsx)(`a`,{href:e,children:t})}}:void 0,[n]);return(0,U.jsxs)(`div`,{className:P(`flex items-start gap-2 group px-2 py-0.5 rounded-sm`,!c&&(t?`bg-muted/20`:`bg-transparent`),e.type===`result`&&`bg-emerald-500/5 aurora-light:bg-accent-success/10 border-l-2 border-emerald-500/40 aurora-light:border-accent-success/40 mt-2 py-2`,i&&`bg-emerald-500/8 aurora-light:bg-accent-success/10 border-l-2 border-emerald-500/50 aurora-light:border-accent-success/50`,a&&`bg-red-500/8 aurora-light:bg-destructive/10 border-l-2 border-red-500/50 aurora-light:border-destructive/50`,o&&`bg-accent-primary/5 border-l-2 border-accent-primary/30`,s&&`bg-accent-info/5 border-l-2 border-accent-info/30`),children:[e.timestamp&&(0,U.jsx)(`span`,{className:`text-[10px] text-muted-foreground/40 shrink-0 mt-0.5 w-[52px] font-mono tabular-nums`,children:new Date(e.timestamp).toLocaleTimeString(`en`,{hour:`2-digit`,minute:`2-digit`,second:`2-digit`,hour12:!1})}),r?(0,U.jsx)(`div`,{className:`flex-1 min-w-0 prose prose-invert prose-xs max-w-none
|
|
4
|
-
prose-p:my-1 prose-p:leading-relaxed
|
|
5
|
-
prose-headings:mt-2 prose-headings:mb-1 prose-headings:text-sm prose-headings:font-semibold
|
|
6
|
-
prose-ul:my-1 prose-ol:my-1 prose-li:my-0
|
|
7
|
-
prose-code:text-cyan-300 prose-code:text-[11px] prose-code:bg-muted/40 prose-code:px-1 prose-code:py-0.5 prose-code:rounded
|
|
8
|
-
prose-pre:my-1 prose-pre:bg-muted/30 prose-pre:rounded-md prose-pre:p-2 prose-pre:text-[11px]
|
|
9
|
-
prose-strong:text-foreground prose-em:text-foreground/70
|
|
10
|
-
prose-a:text-blue-400 prose-a:no-underline hover:prose-a:underline
|
|
11
|
-
prose-table:my-2 prose-table:text-[11px]
|
|
12
|
-
prose-thead:border-border prose-thead:bg-muted/30
|
|
13
|
-
prose-th:px-3 prose-th:py-1.5 prose-th:text-left prose-th:font-semibold prose-th:text-foreground/90
|
|
14
|
-
prose-td:px-3 prose-td:py-1.5 prose-td:border-border
|
|
15
|
-
prose-tr:border-border
|
|
16
|
-
text-foreground/80`,children:(0,U.jsx)(A,{remarkPlugins:d,rehypePlugins:Ee,components:f,children:e.content})}):(0,U.jsx)(`span`,{className:P(`flex-1 break-all leading-relaxed whitespace-pre-wrap font-mono`,e.type===`tool-use`&&`text-cyan-400/80 aurora-light:text-accent-info text-[11px]`,e.type===`stderr`&&`text-orange-400 aurora-light:text-accent-warning`,e.type===`result`&&`text-emerald-400 aurora-light:text-accent-success font-medium`,e.type===`log`&&`text-foreground/60`,e.type===`plain`&&`text-foreground/70`,e.type===`tool-result`&&`text-muted-foreground/50`,i&&`text-emerald-400 aurora-light:text-accent-success`,a&&`text-red-400 aurora-light:text-destructive`,o&&`text-accent-primary/80`,s&&`text-accent-info/80`),children:u})]})});function J(e){try{let t=JSON.parse(e);if(t&&typeof t==`object`&&!Array.isArray(t))return t}catch{}return null}var ke=/^\s*━+\s*Step\s+\d+\s*·/,Ae=/\s*\(iteration\s+\d+\)\s*$/i;function Y(e){return e.replace(/^[\s\uFE0F\p{Extended_Pictographic}]+/u,``).trim()||e.trim()}function X(e){let t=Y(e.title);return e.iteration==null?t:t.replace(Ae,``)}function je(e){return e.meta.nodeId??`${e.meta.kind}::${Y(e.meta.title).replace(Ae,``)}`}function Me(e){let t=null,n=0,r=[[]],i=[];for(let o=0;o<e.length;o++){let s=e[o];if(s.event_type===`loop_graph`){let e=J(s.payload);e&&e.graph&&typeof e.graph==`object`&&!Array.isArray(e.graph)&&(t={graph:e.graph,loopId:typeof e.loopId==`string`?e.loopId:void 0,loopName:typeof e.loopName==`string`?e.loopName:void 0,provider:typeof e.provider==`string`?e.provider:void 0,model:typeof e.model==`string`?e.model:void 0,iterationLimit:typeof e.iterationLimit==`number`?e.iterationLimit:void 0});continue}if(s.event_type===`loop_step`){let e=J(s.payload);if(!e||typeof e.index!=`number`)continue;let t=typeof e.iteration==`number`?e.iteration:null;t!=null&&t>n&&(n=t),i.push({meta:{index:e.index,kind:typeof e.kind==`string`?e.kind:`ai-step`,title:typeof e.title==`string`?e.title:``,nodeId:typeof e.nodeId==`string`?e.nodeId:null,iteration:t,template:typeof e.template==`string`&&e.template?e.template:void 0,command:typeof e.command==`string`&&e.command?e.command:void 0},end:null,lastActivity:null}),r.push([]);continue}if(s.event_type===`loop_step_end`){let e=J(s.payload);if(!e||typeof e.index!=`number`)continue;for(let t=i.length-1;t>=0;t--)if(i[t].meta.index===e.index){i[t].end={index:e.index,nodeId:typeof e.nodeId==`string`?e.nodeId:null,status:e.status===`failed`?`failed`:`ok`,exitCode:typeof e.exitCode==`number`?e.exitCode:null,durationMs:typeof e.durationMs==`number`?e.durationMs:null,decision:e.decision===`continue`||e.decision===`stop`?e.decision:void 0};break}continue}let c=i.length>0,l=be(s,o);if(l&&!(c&&ke.test(l.content))&&r[r.length-1].push(l),c){let e=a(s);e.step&&e.actionKey&&(i[i.length-1].lastActivity={actionKey:e.actionKey,actionArg:e.actionArg})}}let o=e=>xe(Se(e)),s=o(r[0]),c=i.map((e,t)=>({key:`step-${t}-${e.meta.index}`,meta:e.meta,lines:o(r[t+1]),end:e.end,lastActivity:e.lastActivity})),l=s.length+c.reduce((e,t)=>e+t.lines.length,0);return{graphMeta:t,setup:s,segments:c,maxIteration:n,totalLines:l}}function Ne(e,t){return e.end?e.end.status:t.isLast?t.jobSettled?`interrupted`:`running`:`unknown`}function Pe(e){return e===`continue`?0:e===`stop`?2:1}function Fe(e){let t=new Map(e.nodes.map(e=>[e.id,e])),n=new Set,r=[],i=a=>{if(n.has(a))return;let o=t.get(a);if(!o)return;n.add(a),r.push(o);let s=e.edges.filter(e=>e.source===a).slice().sort((e,t)=>Pe(e.branch)-Pe(t.branch));for(let e of s)i(e.target)},a=e.nodes.find(e=>e.type===`start`);a&&i(a.id);for(let t of e.nodes)i(t.id);return r}function Z(e){let t=e.data?.label;return typeof t==`string`&&t.trim()?t.trim():null}function Ie(e,t){let n=e.segments.length-1,r=new Map,i=new Map;e.segments.forEach((e,t)=>{let n=je(e);r.set(n,{seg:e,idx:t}),e.meta.kind===`decider`&&e.end?.decision&&i.set(n,e.end.decision)});let a=e=>{let r=Ne(e.seg,{isLast:e.idx===n,jobSettled:t.jobSettled});return r===`unknown`?`ok`:r};if(e.graphMeta)return Fe(e.graphMeta.graph).map(e=>{if(e.type===`start`)return{key:e.id,kind:`start`,label:Z(e),state:`ok`,latestSegmentKey:null};if(e.type===`end`)return{key:e.id,kind:`end`,label:Z(e),state:t.jobSettled?t.jobFailed?`failed`:`ok`:`pending`,latestSegmentKey:null};let n=r.get(e.id);return n?{key:e.id,kind:e.type,label:Z(e)??X(n.seg.meta),state:a(n),decision:e.type===`decider`?i.get(e.id):void 0,latestSegmentKey:n.seg.key}:{key:e.id,kind:e.type,label:Z(e),state:`pending`,latestSegmentKey:null}});let o=[],s=new Map;return e.segments.forEach((e,t)=>{let n=je(e),r={seg:e,idx:t},c=s.get(n),l=e.meta.kind===`decider`?i.get(n):void 0;if(c!=null){let t=o[c];t.state=a(r),t.decision=l,t.latestSegmentKey=e.key}else s.set(n,o.length),o.push({key:n,kind:e.meta.kind,label:X(e.meta)||null,state:a(r),decision:l,latestSegmentKey:e.key})}),o}function Le(e){if(!Number.isFinite(e)||e<0)return`—`;if(e<1e3)return`${Math.round(e)}ms`;let t=e/1e3;if(t<60)return`${t.toFixed(1)}s`;let n=Math.floor(t/60),r=Math.round(t%60);return n<60?`${n}m ${r}s`:`${Math.floor(n/60)}h ${n%60}m`}var Re={start:s,"ai-step":n,shell:I,decider:g,condition:g,end:_},ze=E,Be={start:`text-accent-success`,"ai-step":`text-accent-primary`,shell:`text-accent-warning`,decider:`text-accent-highlight`,condition:`text-accent-info`,end:`text-accent-secondary`},Ve={start:`border-accent-success/60`,"ai-step":`border-accent-primary/60`,shell:`border-accent-warning/60`,decider:`border-accent-highlight/60`,condition:`border-accent-info/60`,end:`border-accent-secondary/60`};function He(e){return Re[e]??ze}function Ue({chips:e,iteration:t,onChipClick:n,variant:r}){let{t:i}=p(`jobs`);return e.length===0&&!t?null:(0,U.jsxs)(`div`,{"data-testid":`loop-overview-strip`,role:`list`,"aria-label":i(`loopExplorer.stepMapAria`),className:P(`flex items-center gap-1 overflow-x-auto border-b border-border/30 bg-surface/20`,r===`glass`?`px-3 py-1.5`:`px-4 py-2`),children:[e.map((e,t)=>{let r=He(e.kind),a=Be[e.kind]??`text-foreground`,o=Ve[e.kind]??`border-border/40`,s=e.label??i(`loops:builder.nodes.${e.kind}`,{defaultValue:e.kind}),c=e.latestSegmentKey!=null;return(0,U.jsxs)(W.Fragment,{children:[t>0&&(0,U.jsx)(x,{className:`w-3 h-3 text-muted-foreground/30 shrink-0`}),(0,U.jsxs)(`button`,{type:`button`,role:`listitem`,"data-testid":`loop-node-chip`,"data-state":e.state,"data-kind":e.kind,"data-decision":e.decision,"aria-label":`${s} — ${e.state}`,disabled:!c,onClick:()=>e.latestSegmentKey&&n(e.latestSegmentKey),className:P(`relative flex items-center gap-1.5 shrink-0 rounded-full border bg-surface/40 px-2.5 py-1 text-[11px] transition-colors`,o,e.state===`pending`&&`opacity-45 border-border/40`,e.state===`interrupted`&&`border-dashed border-accent-warning/50`,c?`cursor-pointer hover:bg-surface/70`:`cursor-default`),children:[e.state===`running`&&(0,U.jsx)(`span`,{"aria-hidden":!0,className:`absolute -inset-px rounded-full ring-2 ring-accent-primary/50 motion-safe:animate-pulse pointer-events-none`}),(0,U.jsx)(r,{className:P(`w-3 h-3 shrink-0`,a)}),(0,U.jsx)(`span`,{className:P(`max-w-[120px] truncate font-medium text-foreground/90`,e.state===`running`&&`title-shimmer`),children:s}),e.state===`ok`&&(0,U.jsx)(F,{className:`w-3 h-3 text-accent-success shrink-0`}),e.state===`failed`&&(0,U.jsx)(S,{className:`w-3 h-3 text-destructive shrink-0`}),e.decision===`continue`&&(0,U.jsx)(C,{className:`w-3 h-3 text-accent-highlight shrink-0`}),e.decision===`stop`&&(0,U.jsx)(T,{className:`w-3 h-3 text-accent-success shrink-0`})]})]},e.key)}),t&&(0,U.jsxs)(`span`,{"data-testid":`loop-iteration-chip`,className:`ml-auto flex items-center gap-1.5 shrink-0 rounded-full border border-accent-highlight/40 bg-accent-highlight/10 px-2.5 py-1 text-[10px] font-medium text-accent-highlight tabular-nums`,children:[(0,U.jsx)(h,{className:`w-3 h-3`}),t.limit==null?i(`loopExplorer.iterationBadge`,{count:t.current}):i(`loopExplorer.iteration`,{current:t.current,limit:t.limit})]})]})}var We=(0,W.memo)(Ue);function Ge({className:e}){return(0,U.jsxs)(`span`,{className:P(`relative flex h-2 w-2 shrink-0`,e),children:[(0,U.jsx)(`span`,{className:`motion-safe:animate-ping absolute inline-flex h-full w-full rounded-full bg-accent-primary opacity-60`}),(0,U.jsx)(`span`,{className:`relative inline-flex rounded-full h-2 w-2 bg-accent-primary`})]})}function Ke(e,t){if(!t)return e;let n=t.toLowerCase();return e.filter(e=>e.content.toLowerCase().includes(n))}function qe(e,t,n,r){return e.length===0?(0,U.jsx)(`p`,{className:`px-4 py-2 text-[10px] text-muted-foreground/40 italic`,children:n(t?`logViewer.noMatchingLines`:`logViewer.noOutput`)}):e.map((e,t)=>(0,U.jsx)(q,{line:e,even:t%2==0,onOpenTicket:r},e.id))}function Je({label:e,value:t,copyLabel:n}){let[r,i]=(0,W.useState)(!1),a=async()=>{try{await navigator.clipboard.writeText(t),i(!0),window.setTimeout(()=>i(!1),1500)}catch{}};return(0,U.jsxs)(`div`,{className:`min-w-0`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,U.jsx)(`span`,{className:`text-[9px] font-semibold uppercase tracking-wider text-muted-foreground/50`,children:e}),(0,U.jsx)(`button`,{type:`button`,onClick:()=>void a(),"aria-label":`${n} — ${e}`,title:n,className:`p-0.5 text-muted-foreground/40 hover:text-foreground transition-colors cursor-pointer`,children:r?(0,U.jsx)(F,{className:`w-2.5 h-2.5 text-accent-success`}):(0,U.jsx)(v,{className:`w-2.5 h-2.5`})})]}),(0,U.jsx)(`pre`,{className:`mt-0.5 text-[10px] font-mono leading-relaxed text-foreground/75 whitespace-pre-wrap break-words`,children:t})]})}function Ye({segment:e,status:t,collapsed:n,filter:r,onToggle:i,onCopy:a,setRef:o,onOpenTicket:s}){let{t:c}=p(`jobs`),{meta:u,lines:d,end:f,lastActivity:m}=e,h=He(u.kind),g=Be[u.kind]??`text-foreground`,_=Ke(d,r),y=t===`running`,b=!!(u.template||u.command),[C,w]=(0,W.useState)(!1);return(0,U.jsxs)(`div`,{ref:t=>o(e.key,t),"data-testid":`loop-step-section`,"data-status":t,"data-step-index":u.index,className:P(`mt-3 rounded-md overflow-hidden border animate-in fade-in duration-200`,t===`running`&&`border-accent-primary/40`,t===`failed`&&`border-destructive/30`,t===`interrupted`&&`border-dashed border-accent-warning/40`,(t===`ok`||t===`unknown`)&&`border-border/20`),children:[(0,U.jsxs)(`div`,{className:P(`flex items-stretch bg-primary/5 border-b`,t===`failed`?`border-destructive/20`:`border-primary/20`),children:[(0,U.jsxs)(`button`,{type:`button`,onClick:()=>i(e.key),className:`flex items-center gap-2 flex-1 min-w-0 text-left px-3 py-2 hover:bg-primary/10 transition-colors duration-150 cursor-pointer`,children:[(0,U.jsx)(x,{className:P(`w-3 h-3 text-primary/60 shrink-0 transition-transform duration-150`,!n&&`rotate-90`)}),(0,U.jsx)(`span`,{className:`text-[10px] font-mono tabular-nums text-muted-foreground/60 shrink-0 w-5 text-right`,children:u.index}),(0,U.jsx)(h,{className:P(`w-3.5 h-3.5 shrink-0`,g)}),(0,U.jsx)(`span`,{className:`text-[12px] font-semibold text-foreground leading-none truncate`,children:X(u)}),u.iteration!=null&&u.iteration>=1&&(0,U.jsx)(`span`,{className:`shrink-0 rounded-full bg-muted/60 px-1.5 py-0.5 text-[9px] font-medium text-muted-foreground tabular-nums`,children:c(`loopExplorer.iterationBadge`,{count:u.iteration})}),y&&(0,U.jsxs)(`span`,{className:`flex items-center gap-1.5 min-w-0 shrink-0 max-w-[40%]`,children:[(0,U.jsx)(Ge,{}),m&&(0,U.jsx)(`span`,{className:`title-shimmer text-[10px] truncate`,children:c(`statusPanel.activity.${m.actionKey}`,{arg:m.actionArg??``})})]}),t===`ok`&&(0,U.jsx)(F,{className:`w-3.5 h-3.5 text-accent-success shrink-0`}),t===`failed`&&(0,U.jsx)(S,{className:`w-3.5 h-3.5 text-destructive shrink-0`}),t===`interrupted`&&(0,U.jsx)(`span`,{className:`shrink-0 rounded border border-dashed border-accent-warning/50 px-1.5 py-0.5 text-[9px] font-medium uppercase tracking-wide text-accent-warning`,children:c(`loopExplorer.interrupted`)}),(0,U.jsx)(`span`,{className:`flex-1`}),f?.durationMs!=null&&(0,U.jsx)(`span`,{className:`text-[10px] text-muted-foreground/50 font-mono tabular-nums shrink-0`,children:Le(f.durationMs)}),t===`failed`&&f?.exitCode!=null&&f.exitCode!==0&&(0,U.jsx)(`span`,{className:`text-[10px] text-destructive/70 font-mono shrink-0`,children:c(`activeJob.exitCode`,{code:f.exitCode})}),(0,U.jsx)(`span`,{className:`text-[10px] text-muted-foreground/40 shrink-0`,children:c(`logViewer.phaseLines`,{count:d.length})})]}),b&&(0,U.jsx)(`button`,{type:`button`,onClick:()=>w(e=>!e),"aria-label":c(`loopExplorer.stepDetail`),"aria-expanded":C,title:c(`loopExplorer.stepDetail`),className:P(`px-2 flex items-center transition-colors cursor-pointer`,C?`text-foreground bg-primary/10`:`text-muted-foreground/40 hover:text-foreground hover:bg-primary/10`),children:(0,U.jsx)(l,{className:`w-3 h-3`})}),(0,U.jsx)(`button`,{type:`button`,onClick:()=>a(e.key),"aria-label":c(`loopExplorer.copyStep`),title:c(`loopExplorer.copyStep`),className:`px-2.5 flex items-center text-muted-foreground/40 hover:text-foreground hover:bg-primary/10 transition-colors cursor-pointer`,children:(0,U.jsx)(v,{className:`w-3 h-3`})})]}),C&&b&&(0,U.jsxs)(`div`,{"data-testid":`loop-step-detail`,className:P(`px-4 py-2.5 space-y-2.5 bg-muted/10 border-b animate-in fade-in duration-150`,t===`failed`?`border-destructive/20`:`border-primary/10`),children:[u.template&&(0,U.jsx)(Je,{label:c(`loopExplorer.stepDetailTemplate`),value:u.template,copyLabel:c(`loopExplorer.copyCommand`)}),u.command&&(0,U.jsx)(Je,{label:c(`loopExplorer.stepDetailCommand`),value:u.command,copyLabel:c(`loopExplorer.copyCommand`)})]}),!n&&(0,U.jsx)(`div`,{className:`bg-muted/5`,children:qe(_,r,c,s)})]})}var Xe=(0,W.memo)(Ye,(e,t)=>e.segment.key===t.segment.key&&e.segment.lines.length===t.segment.lines.length&&e.segment.lines[e.segment.lines.length-1]?.content===t.segment.lines[t.segment.lines.length-1]?.content&&e.segment.meta.template===t.segment.meta.template&&e.segment.meta.command===t.segment.meta.command&&e.segment.end?.status===t.segment.end?.status&&e.segment.end?.durationMs===t.segment.end?.durationMs&&e.segment.end?.decision===t.segment.end?.decision&&e.segment.end?.exitCode===t.segment.end?.exitCode&&e.segment.lastActivity?.actionKey===t.segment.lastActivity?.actionKey&&e.segment.lastActivity?.actionArg===t.segment.lastActivity?.actionArg&&e.status===t.status&&e.collapsed===t.collapsed&&e.filter===t.filter&&e.onOpenTicket===t.onOpenTicket),Q=`__setup__`;function Ze({lines:e,collapsed:t,filter:n,onToggle:r,setRef:i,onOpenTicket:a}){let{t:o}=p(`jobs`),c=Ke(e,n);return(0,U.jsxs)(`div`,{ref:e=>i(Q,e),"data-testid":`loop-setup-section`,className:`rounded-md overflow-hidden border border-border/20`,children:[(0,U.jsxs)(`button`,{type:`button`,onClick:()=>r(Q),className:`flex items-center gap-2 w-full text-left px-3 py-2 bg-muted/10 border-b border-border/20 hover:bg-muted/20 transition-colors duration-150 cursor-pointer`,children:[(0,U.jsx)(x,{className:P(`w-3 h-3 text-muted-foreground/60 shrink-0 transition-transform duration-150`,!t&&`rotate-90`)}),(0,U.jsx)(s,{className:`w-3.5 h-3.5 text-accent-success/70 shrink-0`}),(0,U.jsx)(`span`,{className:`text-[11px] font-semibold text-muted-foreground leading-none uppercase tracking-wide`,children:o(`loopExplorer.setup`)}),(0,U.jsx)(`span`,{className:`flex-1`}),(0,U.jsx)(`span`,{className:`text-[10px] text-muted-foreground/40 shrink-0`,children:o(`logViewer.phaseLines`,{count:e.length})})]}),!t&&(0,U.jsx)(`div`,{className:`bg-muted/5`,children:qe(c,n,o,a)})]})}var Qe=(0,W.memo)(Ze,(e,t)=>e.lines.length===t.lines.length&&e.lines[e.lines.length-1]?.content===t.lines[t.lines.length-1]?.content&&e.collapsed===t.collapsed&&e.filter===t.filter&&e.onOpenTicket===t.onOpenTicket);function $(){return(0,U.jsxs)(`span`,{className:`relative flex h-1.5 w-1.5 shrink-0`,children:[(0,U.jsx)(`span`,{className:`motion-safe:animate-ping absolute inline-flex h-full w-full rounded-full bg-accent-primary opacity-60`}),(0,U.jsx)(`span`,{className:`relative inline-flex rounded-full h-1.5 w-1.5 bg-accent-primary`})]})}function $e({events:e,jobStatus:t,isLoading:n,variant:r=`page`,projectId:i}){let{t:a,i18n:o}=p(`jobs`),[s,c]=(0,W.useState)(``),[l,u]=(0,W.useState)(`follow`),[f,m]=(0,W.useState)(new Set),h=(0,W.useRef)(null),g=(0,W.useRef)(new Map),_=ye(i),y=(0,W.useMemo)(()=>Me(e),[e,o.language]),b=t!=null&&t!==`running`&&t!==`queued`,x=t===`running`,S=(0,W.useMemo)(()=>y.segments.map((e,t)=>Ne(e,{isLast:t===y.segments.length-1,jobSettled:b})),[y,b]),C=(0,W.useMemo)(()=>{let e=y.segments.map(e=>e.key);return y.setup.length>0&&e.push(Q),e},[y]),w=y.segments.length>0?y.segments[y.segments.length-1].key:Q,T=(0,W.useMemo)(()=>s?new Set(C):l===`follow`?new Set([w]):f,[s,l,w,f,C]),E=(0,W.useRef)(T);E.current=T;let D=(0,W.useRef)(y);D.current=y;let k=(0,W.useCallback)(e=>{let t=new Set(E.current);e?.(t),m(t),u(`manual`)},[]),A=(0,W.useCallback)(e=>{k(t=>{t.has(e)?t.delete(e):t.add(e)})},[k]),j=(0,W.useCallback)(e=>{k(t=>t.add(e)),requestAnimationFrame(()=>{g.current.get(e)?.scrollIntoView?.({behavior:`smooth`,block:`start`})})},[k]),N=(0,W.useCallback)(()=>{let e=h.current;e&&(e.scrollTop=e.scrollHeight)},[]),ee=(0,W.useCallback)(()=>{u(`follow`),requestAnimationFrame(N)},[N]),te=(0,W.useCallback)(()=>{m(new Set(C)),u(`manual`)},[C]),F=(0,W.useCallback)(()=>{m(new Set),u(`manual`)},[]);(0,W.useEffect)(()=>{l===`follow`&&!s&&N()},[y.totalLines,y.segments.length,l,s,N]);let ne=(0,W.useCallback)(()=>{let e=h.current;!e||l!==`follow`||e.scrollHeight-e.scrollTop-e.clientHeight>80&&k()},[l,k]),I=(0,W.useCallback)((e,t)=>{t?g.current.set(e,t):g.current.delete(e)},[]),L=(0,W.useCallback)(e=>{let t=D.current.segments.find(t=>t.key===e),n=e===`__setup__`?D.current.setup.map(e=>e.content).join(`
|
|
17
|
-
`):(t?.lines??[]).map(e=>e.content).join(`
|
|
18
|
-
`);navigator.clipboard.writeText(n).then(()=>d.success(a(`loopExplorer.copied`))).catch(()=>d.error(a(`logViewer.copyFailed`)))},[a]),z=(0,W.useCallback)(()=>{let e=D.current,t=e.setup.map(e=>e.content);for(let n of e.segments){t.push(`── Step ${n.meta.index} · ${Y(n.meta.title)} ──`);for(let e of n.lines)t.push(e.content)}navigator.clipboard.writeText(t.join(`
|
|
19
|
-
`)).then(()=>d.success(a(`logViewer.copySuccess`))).catch(()=>d.error(a(`logViewer.copyFailed`)))},[a]),B=(0,W.useMemo)(()=>Ie(y,{jobSettled:b,jobFailed:t===`failed`}),[y,b,t]),V=y.graphMeta?.iterationLimit??y.graphMeta?.graph.config.maxIterations??null,re=y.maxIteration>0?{current:y.maxIteration,limit:V}:null,oe=(0,W.useMemo)(()=>{if(!s)return y.totalLines;let e=s.toLowerCase(),t=y.setup.filter(t=>t.content.toLowerCase().includes(e)).length;for(let n of y.segments)t+=n.lines.filter(t=>t.content.toLowerCase().includes(e)).length;return t},[s,y]),H=y.segments[y.segments.length-1],se=x&&(y.segments.length===0||H?.end!=null);return n?(0,U.jsx)(`div`,{className:`flex-1 flex items-center justify-center h-full`,children:(0,U.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:a(`logViewer.loading`)})}):y.totalLines===0&&y.segments.length===0?(0,U.jsx)(`div`,{"data-testid":`loop-step-explorer`,className:`flex-1 flex items-center justify-center h-full`,children:(0,U.jsxs)(`p`,{className:`text-xs text-muted-foreground flex items-center gap-2`,children:[x&&(0,U.jsx)($,{}),a(x?`loopExplorer.waiting`:`logViewer.empty`)]})}):(0,U.jsxs)(`div`,{"data-testid":`loop-step-explorer`,className:`relative flex flex-col h-full`,children:[(0,U.jsxs)(`div`,{className:P(`border-b border-border flex items-center gap-2`,r===`glass`?`px-3 py-1.5`:`px-4 py-2`),children:[(0,U.jsxs)(`div`,{className:`relative flex-1 max-w-xs`,children:[(0,U.jsx)(R,{className:`absolute left-2.5 top-1/2 -translate-y-1/2 w-3 h-3 text-muted-foreground`}),(0,U.jsx)(O,{placeholder:a(`logViewer.filterPlaceholder`),value:s,onChange:e=>c(e.target.value),className:`pl-7 h-7`})]}),(0,U.jsx)(M,{variant:`ghost`,size:`sm`,className:`h-7 px-2 text-muted-foreground/50 hover:text-foreground`,onClick:te,"aria-label":a(`loopExplorer.expandAll`),title:a(`loopExplorer.expandAll`),children:(0,U.jsx)(ae,{className:`w-3.5 h-3.5`})}),(0,U.jsx)(M,{variant:`ghost`,size:`sm`,className:`h-7 px-2 text-muted-foreground/50 hover:text-foreground`,onClick:F,"aria-label":a(`loopExplorer.collapseAll`),title:a(`loopExplorer.collapseAll`),children:(0,U.jsx)(ie,{className:`w-3.5 h-3.5`})}),l===`follow`&&x&&(0,U.jsxs)(`span`,{className:`flex items-center gap-1.5 text-[10px] text-accent-primary shrink-0`,children:[(0,U.jsx)($,{}),a(`loopExplorer.follow`)]}),(0,U.jsx)(`span`,{className:`flex-1`}),(0,U.jsx)(M,{variant:`ghost`,size:`sm`,className:`h-7 px-2 text-muted-foreground/50 hover:text-foreground`,onClick:z,"aria-label":a(`logViewer.copySuccess`),children:(0,U.jsx)(v,{className:`w-3.5 h-3.5`})}),(0,U.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:a(`logViewer.lineCount`,{filtered:oe,total:y.totalLines})})]}),(0,U.jsx)(We,{chips:B,iteration:re,onChipClick:j,variant:r}),(0,U.jsxs)(`div`,{ref:h,onScroll:ne,className:`flex-1 overflow-y-auto p-2 text-xs`,children:[y.setup.length>0&&(0,U.jsx)(Qe,{lines:y.setup,collapsed:!T.has(`__setup__`),filter:s,onToggle:A,setRef:I,onOpenTicket:_}),y.segments.map((e,t)=>(0,U.jsx)(Xe,{segment:e,status:S[t],collapsed:!T.has(e.key),filter:s,onToggle:A,onCopy:L,setRef:I,onOpenTicket:_},e.key)),se&&(0,U.jsxs)(`div`,{"data-testid":`loop-waiting-row`,className:`mt-3 flex items-center gap-2 px-3 py-2 text-[11px] text-muted-foreground/70 italic`,children:[(0,U.jsx)($,{}),a(`loopExplorer.waiting`)]})]}),l===`manual`&&x&&!s&&(0,U.jsxs)(`button`,{type:`button`,"data-testid":`resume-follow-pill`,onClick:ee,className:`absolute bottom-4 left-1/2 -translate-x-1/2 z-10 flex items-center gap-1.5 rounded-full glass-card border border-accent-primary/30 px-3 py-1.5 text-[11px] font-medium text-foreground shadow-lg hover:border-accent-primary/60 transition-colors cursor-pointer animate-in fade-in slide-in-from-bottom-2 duration-200`,children:[(0,U.jsx)($,{}),a(`loopExplorer.resumeFollow`)]})]})}function et(e,t){switch(t.type){case`turn-user`:return{...e,streaming:!0,accepting:!0,queued:t.queued?e.queued+1:e.queued};case`turn-done`:{let n=Math.max(0,e.queued-1);return{...e,totals:t.totals,queued:n,streaming:e.queued>0}}case`finalized`:return{...e,streaming:!1,finalizing:!1,accepting:!1,queued:0,totals:t.totals??e.totals};case`accepting`:return t.accepting?{...e,accepting:!0}:{...e,accepting:!1,streaming:!1,queued:0};case`finalize-request`:return{...e,finalizing:!0};case`finalize-reject`:return{...e,finalizing:!1};case`blocked`:return{...e,accepting:!1,streaming:!1};default:return e}}function tt(){try{return m()}catch{return null}}function nt({jobId:e,projectId:n,settleMode:r,initialAcceptingTurns:a,kind:o=`job`,variant:s=`page`,onFinalized:l}){let{t:u}=p(`jobs`),m=r??`finalize`,h=()=>n?`${t}/api/projects/${n}`:z(),[g,_]=(0,W.useReducer)(et,{streaming:!1,queued:0,totals:null,accepting:a??!0,finalizing:!1}),[v,b]=(0,W.useState)(``),[x,S]=(0,W.useState)(!1),C=(0,W.useRef)(null);(0,W.useEffect)(()=>{a!==void 0&&_({type:`accepting`,accepting:a})},[a]);let w=(0,W.useRef)(l);w.current=l;let T=tt(),E=(0,W.useId)();(0,W.useEffect)(()=>{if(!T)return;let t=`interactive-composer-${e}-${E}`;return T.registerHandler(t,t=>{let n=t;n.jobId===e&&(n.type===`job.turn_user`?_({type:`turn-user`,queued:!!n.queued}):n.type===`job.turn_done`?_({type:`turn-done`,totals:n.totals}):n.type===`job.finalized`?(_({type:`finalized`,totals:n.totals??null}),w.current?.()):n.type===`job.interactive`&&_({type:`accepting`,accepting:!!n.acceptingTurns}))}),()=>T.unregisterHandler(t)},[T,e,E]);let D=o===`loop-step`&&!g.accepting;async function O(){let t=v.trim();if(!(!t||x||D)){S(!0);try{let n=await fetch(`${h()}/jobs/${e}/messages`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({text:t})});if(n.ok)b(``),requestAnimationFrame(()=>C.current?.focus());else if(n.status===409&&o===`loop-step`)_({type:`blocked`});else{let e=await n.json().catch(()=>({}));d.error(u(`detail.toast.sendFailed`),{description:e.error})}}catch{d.error(u(`detail.toast.networkError`))}finally{S(!1)}}}async function k(){if(!g.finalizing){_({type:`finalize-request`});try{let t=await fetch(`${h()}/jobs/${e}/finalize`,{method:`POST`});if(t.ok)d.success(u(m===`finalize`?`detail.toast.finalizeScheduled`:o===`loop-step`?`detail.toast.wrapUpStepScheduled`:`detail.toast.wrapUpScheduled`));else if(t.status===409&&o===`loop-step`)_({type:`blocked`}),_({type:`finalize-reject`});else{let e=await t.json().catch(()=>({}));d.error(u(`detail.toast.finalizeFailed`),{description:e.error}),_({type:`finalize-reject`})}}catch{d.error(u(`detail.toast.networkError`)),_({type:`finalize-reject`})}}}let A=x||D||!v.trim(),N=u(`detail.interactive.working`);return(0,U.jsxs)(`div`,{"data-testid":`interactive-job-composer`,className:P(`shrink-0 border-t px-3 py-2 space-y-1.5`,`motion-safe:animate-in motion-safe:fade-in motion-safe:slide-in-from-bottom-2 motion-safe:duration-300`,s===`glass`?`border-border/30 bg-surface/30`:`border-border/40 bg-surface/40`),children:[(0,U.jsxs)(`div`,{className:`flex items-center justify-between gap-3 text-[11px] text-muted-foreground`,children:[(0,U.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[D?(0,U.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,U.jsx)(oe,{className:`h-3 w-3 motion-safe:animate-pulse`}),u(`detail.interactive.waitingForStepShort`)]}):g.streaming?(0,U.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,U.jsx)(f,{className:`h-3 w-3 animate-spin text-accent-primary`}),(0,U.jsxs)(`span`,{className:`relative`,children:[N,(0,U.jsx)(`span`,{"aria-hidden":!0,className:`title-shimmer pointer-events-none absolute inset-0`,children:N})]})]}):(0,U.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,U.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-accent-success motion-safe:animate-pulse`}),u(`detail.interactive.ready`)]}),g.queued>0&&(0,U.jsx)(`span`,{className:`rounded-full border border-accent-info/30 bg-accent-info/10 px-1.5 py-px text-[10px] tabular-nums text-accent-info motion-safe:animate-in motion-safe:fade-in`,children:u(`detail.interactive.queued`,{count:g.queued})})]}),(0,U.jsxs)(`span`,{className:`flex shrink-0 items-center gap-3`,children:[g.totals&&(0,U.jsx)(`span`,{className:`tabular-nums`,children:u(`detail.interactive.liveTotals`,{turns:g.totals.num_turns,cost:g.totals.total_cost_usd.toFixed(4)})}),m===`finalize`?(0,U.jsxs)(V,{children:[(0,U.jsx)(c,{asChild:!0,children:(0,U.jsxs)(M,{variant:`outline`,size:`sm`,onClick:()=>void k(),disabled:g.finalizing,className:`h-7 border-accent-success/40 text-accent-success hover:bg-accent-success/10`,children:[(0,U.jsx)(j,{className:`mr-1.5 h-3.5 w-3.5`}),g.finalizing?u(`detail.finalizing`):u(`detail.finalizeJob`)]})}),(0,U.jsx)(i,{children:u(`detail.finalizeJobTooltip`)})]}):(0,U.jsxs)(V,{children:[(0,U.jsx)(c,{asChild:!0,children:(0,U.jsx)(`button`,{type:`button`,onClick:()=>void k(),disabled:g.finalizing||D,className:P(`text-[11px] underline-offset-2 transition-colors`,D?`cursor-not-allowed text-muted-foreground/40`:`text-muted-foreground hover:text-accent-success hover:underline`),children:g.finalizing?u(`detail.interactive.wrappingUp`):u(o===`loop-step`?`detail.interactive.wrapUpStep`:`detail.interactive.wrapUp`)})}),(0,U.jsx)(i,{children:u(o===`loop-step`?`detail.interactive.wrapUpStepTooltip`:`detail.interactive.wrapUpTooltip`)})]})]})]}),m===`auto`&&(0,U.jsx)(`p`,{className:`text-[11px] leading-snug text-muted-foreground/60`,children:u(D?`detail.interactive.waitingForStep`:`detail.interactive.autoHint`)}),(0,U.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,U.jsx)(`textarea`,{ref:C,value:v,onChange:e=>b(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(!e.shiftKey||e.metaKey||e.ctrlKey)&&(e.preventDefault(),O())},rows:2,placeholder:u(D?`detail.interactive.waitingForStepShort`:`detail.interactive.placeholder`),"aria-label":u(`detail.interactive.placeholder`),disabled:D,className:P(`flex-1 resize-none rounded-md border border-border/50 bg-background px-2.5 py-1.5 text-sm transition-opacity focus:outline-none focus:ring-2 focus:ring-ring`,D&&`opacity-60`)}),(0,U.jsxs)(V,{children:[(0,U.jsx)(c,{asChild:!0,children:(0,U.jsx)(`span`,{className:`shrink-0`,children:(0,U.jsxs)(M,{size:`sm`,onClick:()=>void O(),disabled:A,className:`h-9`,children:[(0,U.jsx)(y,{className:`mr-1.5 h-3.5 w-3.5`}),u(`detail.interactive.send`)]})})}),A&&!x&&(0,U.jsx)(i,{children:u(D?`detail.interactive.sendDisabledWaiting`:`detail.interactive.sendDisabledEmpty`)})]})]})]})}export{le as a,ue as i,$e as n,H as o,we as r,nt as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./chunk-BNv3lrIs.js";import{a as t,n}from"./auth-Cvsb7-Ek.js";import{a as r,i,n as a,o,r as s,t as c}from"./InteractiveJobComposer-DqDCiCa0.js";import{B as l,Cn as u,Gn as d,H as ee,I as f,Kn as p,Ln as m,Pt as h,Q as g,Rn as _,V as v,Z as y,at as b,b as x,bn as S,nt as C,tt as w,wn as T,z as te}from"./index-Dw1N2-ci.js";var ne=e(d(),1),E=e(p(),1),D=[1e3,2e3,4e3,8e3,16e3];function O(e,t){let[r,i]=(0,E.useState)(`connecting`),a=(0,E.useRef)(null),o=(0,E.useRef)(0),s=(0,E.useRef)(null),c=(0,E.useRef)(t);c.current=t;let l=(0,E.useCallback)(()=>{let t=n(),r=t?new WebSocket(e,[`specrails-desktop`,t]):new WebSocket(e);a.current=r,i(`connecting`),r.onopen=()=>{o.current=0,i(`connected`)},r.onmessage=e=>{try{let t=JSON.parse(e.data);c.current(t)}catch{}},r.onclose=()=>{a.current=null;let e=o.current;if(e>=D.length){i(`disconnected`);return}let t=D[e];o.current+=1,s.current=setTimeout(l,t)}},[e]);return(0,E.useEffect)(()=>(l(),()=>{s.current&&clearTimeout(s.current);let e=a.current;e&&(e.onopen=null,e.onmessage=null,e.onclose=null,e.onerror=null,e.close()),a.current=null}),[l]),{connectionStatus:r}}var k=u();function re(e,t){let n=new Date(t).getTime()-new Date(e).getTime();if(n<0)return`—`;let r=Math.round(n/1e3);if(r<60)return`${r}s`;let i=Math.floor(r/60),a=r%60;return i<60?`${i}m ${a}s`:`${Math.floor(i/60)}h ${i%60}m`}var A={running:{variant:`running`,labelKey:`statusLabel.running`,tooltipKey:`statusTooltip.running`},completed:{variant:`success`,labelKey:`statusLabel.completed`,tooltipKey:`statusTooltip.completed`},failed:{variant:`failed`,labelKey:`statusLabel.failed`,tooltipKey:`statusTooltip.failed`},canceled:{variant:`canceled`,labelKey:`statusLabel.canceled`,tooltipKey:`statusTooltip.canceled`},queued:{variant:`queued`,labelKey:`statusLabel.queued`,tooltipKey:`statusTooltip.queued`},zombie_terminated:{variant:`failed`,labelKey:`statusLabel.zombie`,tooltipKey:`statusTooltip.zombie`}};function j({jobId:e,onClose:n,projectId:u}){let{t:d}=_(`jobs`),p=(0,E.useCallback)(()=>u?`${t}/api/projects/${u}`:T(),[u]),[D,j]=(0,E.useState)(null),[M,N]=(0,E.useState)([]),[P,F]=(0,E.useState)([]),[I,L]=(0,E.useState)({}),[R,z]=(0,E.useState)(!0),[B,V]=(0,E.useState)(!1),[H,U]=(0,E.useState)(!1),[W,G]=(0,E.useState)(!1);(0,E.useEffect)(()=>{async function t(){try{let t=await fetch(`${p()}/jobs/${e}`);if(t.status===404){V(!0);return}if(!t.ok)throw Error(`Failed to fetch job`);let n=await t.json();if(j(n.job),N(n.events),n.phaseDefinitions){F(n.phaseDefinitions);let e={};for(let t of n.phaseDefinitions)e[t.key]=`idle`;L(e)}}catch{V(!0)}finally{z(!1)}}t()},[e,p]);let K=(0,E.useCallback)(()=>{fetch(`${p()}/jobs/${e}`).then(e=>e.ok?e.json():null).then(e=>{e?.job&&j(e.job)}).catch(()=>{})},[e,p]),q=(0,E.useRef)([]),J=(0,E.useRef)(null),Y=(0,E.useCallback)(()=>{J.current=null;let e=q.current;e.length!==0&&(q.current=[],N(t=>{let n=[...t,...e];return n.length>1e4?n.slice(n.length-8e3):n}))},[]);(0,E.useEffect)(()=>()=>{J.current&&cancelAnimationFrame(J.current)},[]),O(f,(0,E.useCallback)(t=>{let n=t;if(n.type===`event`&&n.jobId===e){let t={id:Date.now(),job_id:e,seq:0,event_type:n.event_type,source:n.source,payload:n.payload,timestamp:n.timestamp};q.current.push(t),J.current||=requestAnimationFrame(Y)}else if(n.type===`log`&&n.processId===e){let t={id:Date.now(),job_id:e,seq:0,event_type:`log`,source:n.source,payload:JSON.stringify({line:n.line}),timestamp:n.timestamp};q.current.push(t),J.current||=requestAnimationFrame(Y)}else if(n.type===`job.finalized`&&n.jobId===e)K();else if(n.type===`phase`){let e=n.phase,t=n.state;L(n=>({...n,[e]:t}))}else if(n.type===`queue`){let t=n.jobs?.find(t=>t.id===e);t&&D&&j(e=>e&&{...e,status:t.status})}},[e,D,Y,K])),(0,E.useEffect)(()=>{function e(e){if(e.key===`Escape`){if(H){U(!1);return}n()}}return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[n,H]);let X=D?o(D):`job`,Z=X===`loop-run`;async function ie(){G(!0);try{let t=await r({projectId:u??null,jobId:e,kind:X});t.ok?(m.success(d(Z?`modal.toast.stopSignalSent`:`modal.toast.cancelSignalSent`),{description:d(Z?`modal.toast.stopSignalSentDescription`:`modal.toast.cancelSignalSentDescription`)}),K()):m.error(d(`modal.toast.cancelFailed`),{description:t.error})}finally{G(!1)}}let Q=D?A[D.status]??A.queued:A.queued,$=D?.status===`running`,{panelRef:ae,panelStyle:oe,headerHandleProps:se,resizeHandles:ce,isFloating:le,guardBackdrop:ue}=g();return(0,ne.createPortal)((0,k.jsx)(v,{delayDuration:400,children:(0,k.jsxs)(`div`,{className:`fixed inset-0 z-[65] flex items-stretch justify-center`,children:[(0,k.jsx)(`div`,{className:`absolute inset-0 bg-black/50 backdrop-blur-sm`,onClick:ue(n)}),(0,k.jsxs)(`div`,{ref:ae,className:`relative w-full m-3 rounded-xl glass-card border border-border/30 flex flex-col animate-in fade-in zoom-in-95 duration-200 overflow-hidden`,style:oe,children:[(0,k.jsxs)(`div`,{...se,className:`flex items-center justify-between px-4 py-3 border-b border-border/30${le?` cursor-grab active:cursor-grabbing`:``}`,children:[(0,k.jsxs)(`div`,{className:`flex items-center gap-3 min-w-0`,children:[D&&(0,k.jsxs)(k.Fragment,{children:[(0,k.jsxs)(te,{children:[(0,k.jsx)(ee,{asChild:!0,children:(0,k.jsx)(`div`,{children:(0,k.jsx)(w,{variant:Q.variant,children:d(Q.labelKey)})})}),(0,k.jsx)(l,{children:d(Q.tooltipKey)})]}),(0,k.jsx)(`code`,{className:`text-xs font-mono text-foreground/80 truncate`,children:D.command}),(0,k.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:x(new Date(D.started_at),{addSuffix:!0,locale:S()})}),D.total_cost_usd!=null&&D.total_cost_usd>0&&(0,k.jsxs)(`span`,{className:`text-[10px] text-muted-foreground`,children:[`$`,D.total_cost_usd.toFixed(4)]}),D.finished_at&&(0,k.jsx)(`span`,{className:`text-[10px] text-muted-foreground`,children:re(D.started_at,D.finished_at)})]}),R&&(0,k.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:d(`common:states.loading`)})]}),(0,k.jsxs)(`div`,{className:`flex items-center gap-1 shrink-0`,children:[P.length>0&&(0,k.jsx)(`div`,{className:`mr-3`,children:(0,k.jsx)(i,{phases:I,phaseDefinitions:P})}),$&&(0,k.jsxs)(C,{variant:`ghost`,size:`sm`,onClick:()=>U(!0),disabled:W,className:`h-7 text-destructive hover:text-destructive hover:bg-destructive/10`,children:[W&&(0,k.jsx)(h,{className:`w-3.5 h-3.5 mr-1.5 animate-spin`,"aria-hidden":!0}),d(Z?`dashboard:railControls.stop`:X===`interactive`?`common:actions.discard`:`common:actions.cancel`)]}),(0,k.jsx)(`button`,{onClick:n,className:`h-7 w-7 flex items-center justify-center rounded-md text-muted-foreground hover:text-foreground hover:bg-surface/50 transition-colors cursor-pointer`,children:(0,k.jsx)(b,{className:`w-4 h-4`})})]})]}),(0,k.jsx)(`div`,{className:`flex-1 overflow-hidden relative`,children:B?(0,k.jsx)(`div`,{className:`flex items-center justify-center h-full`,children:(0,k.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:d(`modal.notFound`)})}):D?.command.startsWith(`loop:`)?(0,k.jsx)(a,{events:M,jobStatus:D.status,isLoading:R,variant:`glass`,projectId:u}):(0,k.jsx)(s,{events:M,isLoading:R,projectId:u})}),!!D?.interactive&&D.status===`running`&&(0,k.jsx)(c,{jobId:e,projectId:u,settleMode:D.interactiveSettleMode,initialAcceptingTurns:D.interactiveAcceptingTurns,kind:D.command.startsWith(`loop:`)?`loop-step`:`job`,variant:`glass`,onFinalized:K})]}),(0,k.jsx)(y,{handles:ce}),H&&(0,k.jsxs)(`div`,{"data-testid":`job-cancel-confirm`,className:`absolute inset-0 z-10 flex items-center justify-center p-4`,children:[(0,k.jsx)(`div`,{className:`absolute inset-0 bg-black/60 backdrop-blur-sm`,onClick:()=>U(!1)}),(0,k.jsxs)(`div`,{className:`relative w-full max-w-sm rounded-xl glass-card border border-border/30 p-5 shadow-xl animate-in fade-in zoom-in-95 duration-150`,children:[(0,k.jsx)(`h3`,{className:`text-base font-semibold text-foreground`,children:d(Z?`modal.stopRunConfirmTitle`:`modal.cancelConfirmTitle`)}),(0,k.jsx)(`p`,{className:`mt-1.5 text-sm text-muted-foreground`,children:d(Z?`modal.stopRunConfirmDescription`:`modal.cancelConfirmDescription`)}),(0,k.jsxs)(`div`,{className:`mt-4 flex justify-end gap-2`,children:[(0,k.jsx)(C,{variant:`ghost`,size:`sm`,onClick:()=>U(!1),children:d(`modal.keepRunning`)}),(0,k.jsx)(C,{variant:`destructive`,size:`sm`,onClick:()=>{U(!1),ie()},children:d(Z?`modal.stopRun`:X===`interactive`?`common:actions.discard`:`modal.cancelJob`)})]})]})]})]})}),document.body)}export{j as JobDetailModal};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./chunk-BNv3lrIs.js";import{a as t,i as n,n as r,r as i,t as a}from"./InteractiveJobComposer-DqDCiCa0.js";import{B as o,C as s,Cn as c,H as l,Hn as u,Kn as d,Ln as f,Lt as p,Pt as m,Qt as h,Rn as g,S as _,Sn as v,Un as y,Vn as b,Xt as x,an as S,b as ee,bn as C,in as w,nn as T,nt as E,on as D,rt as O,tn as k,tt as te,vn as ne,wn as A,xt as j,y as M,z as N}from"./index-Dw1N2-ci.js";import{t as P}from"./format-command-CuWuRvka.js";var F=e(d(),1),I=c();function L(e,t){let n=(typeof t==`number`?t:new Date(t).getTime())-new Date(e).getTime();if(!Number.isFinite(n)||n<0)return`—`;let r=Math.round(n/1e3);if(r<60)return`${r}s`;let i=Math.floor(r/60),a=r%60;return i<60?`${i}m ${a}s`:`${Math.floor(i/60)}h ${i%60}m`}function R(e){let t=new Set;for(let n of e)if(n.event_type===`log`)try{let e=(JSON.parse(n.payload).line??``).match(/(?:Writing|Editing|Created?|Updated?)\s+(?:file:\s*)?([\w./\-]+\.\w+)/i);e&&t.add(e[1])}catch{}return Array.from(t).slice(0,20)}var z={steps:0,actionKey:``,actionArg:``,lastSeenIdx:0};function B(e,t){if(t.type===`reset`)return z;if(t.type===`consume`){let{events:n}=t,r=e.lastSeenIdx>n.length?n.length:e.lastSeenIdx;if(n.length<=r)return r===e.lastSeenIdx?e:{...e,lastSeenIdx:r};let{steps:i,actionKey:a,actionArg:o}=e;for(let e=r;e<n.length;e++){let t=s(n[e]);t.step&&(i+=t.stepCount??1),t.actionKey&&(a=t.actionKey,o=t.actionArg??``)}return{steps:i,actionKey:a,actionArg:o,lastSeenIdx:n.length}}return e}function V({job:e,events:t,defaultOpen:n=!0,pipelineTotals:r,phases:i,phaseDefinitions:a}){let{t:o}=g(`jobs`),[s,c]=(0,F.useState)(n),l=(0,F.useMemo)(()=>R(t),[t]),u=e.status===`running`,d=e.status===`completed`,[f,p]=(0,F.useState)(()=>Date.now());(0,F.useEffect)(()=>{if(!u)return;let e=window.setInterval(()=>p(Date.now()),1e3);return()=>window.clearInterval(e)},[u]);let[h,v]=(0,F.useReducer)(B,z),y=(0,F.useRef)(e.id);(0,F.useEffect)(()=>{y.current!==e.id&&(y.current=e.id,v({type:`reset`})),v({type:`consume`,events:t})},[e.id,t]);let[b,x]=(0,F.useState)(!0);(0,F.useEffect)(()=>{if(!u)return;x(!0);let e=window.setTimeout(()=>x(!1),8e3);return()=>window.clearTimeout(e)},[u,e.id]);let S=e.finished_at?L(e.started_at,e.finished_at):u?L(e.started_at,f):`—`,ee=!!e.total_cost_usd_estimated,C=e.total_cost_usd==null?null:`${ee?`~`:``}$${e.total_cost_usd.toFixed(4)}`,w=e.num_turns==null?null:String(e.num_turns),E=e.tokens_in==null?null:(e.tokens_in??0)+(e.tokens_out??0)+(e.tokens_cache_read??0)+(e.tokens_cache_create??0),te=E==null?null:`${(E/1e3).toFixed(1)}k`,ne=(0,F.useMemo)(()=>!i||!a?null:a.find(e=>i[e.key]===`running`)?.label??null,[i,a]),A=u&&h.steps===0?`connecting`:h.actionKey||`thinking`,j=_.has(A)&&h.actionArg!==``,M=_.has(A)&&!j?`working`:A,N=j?o(`statusPanel.activity.${M}`,{arg:h.actionArg}):o(`statusPanel.activity.${M}`),P=ne??(u&&h.steps===0?o(`statusPanel.activity.starting`):null),V=h.steps>0?o(`statusPanel.steps`,{count:h.steps}):null,G=o(u?`statusPanel.inProgress`:d?`statusPanel.completed`:`statusPanel.failed`),re=u?`border-accent-info/20 bg-accent-info/5`:d?`border-emerald-500/20 aurora-light:border-accent-success/30 bg-emerald-500/5 aurora-light:bg-accent-success/5`:`border-red-500/20 aurora-light:border-destructive/30 bg-red-500/5 aurora-light:bg-destructive/5`,K=u?m:d?T:k,q=u?`w-4 h-4 text-accent-info shrink-0 animate-spin`:d?`w-4 h-4 text-emerald-400 aurora-light:text-accent-success shrink-0`:`w-4 h-4 text-red-400 aurora-light:text-destructive shrink-0`;return(0,I.jsxs)(`div`,{className:O(`mx-4 my-2 rounded-xl border transition-colors duration-500`,re),children:[(0,I.jsxs)(`button`,{type:`button`,onClick:()=>c(!s),className:`w-full flex items-center gap-3 px-4 py-3`,children:[(0,I.jsx)(K,{className:q,"aria-hidden":`true`}),(0,I.jsx)(`span`,{className:`text-sm font-semibold flex-1 text-left`,children:G}),(0,I.jsxs)(`div`,{className:`flex items-center gap-3 text-[11px] text-muted-foreground`,children:[(0,I.jsx)(`span`,{className:`tabular-nums`,children:S}),u?V&&(0,I.jsx)(`span`,{className:`tabular-nums`,children:V}):(0,I.jsxs)(I.Fragment,{children:[C&&(0,I.jsx)(`span`,{className:`tabular-nums text-yellow-400 aurora-light:text-accent-warning`,children:C}),l.length>0&&(0,I.jsx)(`span`,{children:o(`statusPanel.filesCount`,{count:l.length})})]})]}),(0,I.jsx)(D,{className:O(`w-4 h-4 text-muted-foreground/40 transition-transform duration-150 shrink-0`,s&&`rotate-180`)})]}),s&&(0,I.jsx)(`div`,{className:`px-4 pb-4 space-y-3 border-t border-border/20`,children:u?(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`p`,{className:`pt-3 text-[10px] text-muted-foreground/50 uppercase tracking-wider`,children:o(`statusPanel.zoneInProgress`)}),(0,I.jsxs)(`div`,{className:`flex flex-col sm:flex-row gap-3 sm:items-stretch`,children:[(0,I.jsxs)(`div`,{className:`bg-muted/20 rounded-lg px-3 py-2 sm:w-44 shrink-0`,children:[(0,I.jsxs)(`p`,{className:`flex items-center gap-1.5 text-[10px] text-muted-foreground/50 uppercase tracking-wider`,children:[o(`statusPanel.duration`),(0,I.jsx)(`span`,{className:`inline-block w-1.5 h-1.5 rounded-full bg-accent-info animate-pulse`,title:o(`statusPanel.liveTooltip`),"aria-label":o(`statusPanel.liveTooltip`)})]}),(0,I.jsx)(`p`,{className:`text-sm font-semibold tabular-nums mt-0.5 text-accent-info`,children:S})]}),(0,I.jsxs)(`div`,{className:`flex-1 flex items-center gap-2 bg-muted/10 rounded-lg px-3 py-2 min-w-0`,children:[(0,I.jsx)(m,{className:`w-3.5 h-3.5 text-accent-info shrink-0 animate-spin`,"aria-hidden":`true`}),P&&(0,I.jsx)(`span`,{className:`text-[11px] font-medium px-1.5 py-0.5 rounded bg-accent-info/15 text-accent-info shrink-0`,children:P}),(0,I.jsx)(`span`,{className:`text-xs text-muted-foreground truncate flex-1 min-w-0`,children:N}),V&&(0,I.jsxs)(`span`,{className:`text-[11px] text-muted-foreground/60 tabular-nums shrink-0`,children:[`· `,V]})]})]}),b&&(0,I.jsx)(`p`,{className:`text-[11px] text-muted-foreground/40 leading-snug`,children:o(`statusPanel.explainer`)}),(0,I.jsx)(`p`,{className:`pt-1 text-[10px] text-muted-foreground/50 uppercase tracking-wider border-t border-accent-info/10 mt-1`,children:o(`statusPanel.zoneFinalPending`)}),(0,I.jsxs)(`div`,{className:`grid grid-cols-3 gap-2`,children:[(0,I.jsx)(W,{label:o(`statusPanel.cost`),caption:o(`statusPanel.pendingCaption`),tooltip:o(`statusPanel.costTooltip`)}),(0,I.jsx)(W,{label:o(`statusPanel.turns`),caption:o(`statusPanel.pendingCaption`),tooltip:o(`statusPanel.pendingTooltip`)}),(0,I.jsx)(W,{label:o(`statusPanel.tokens`),caption:o(`statusPanel.pendingCaption`),tooltip:o(`statusPanel.pendingTooltip`)})]})]}):(0,I.jsxs)(I.Fragment,{children:[(0,I.jsx)(`p`,{className:`pt-3 text-[10px] text-muted-foreground/50 uppercase tracking-wider`,children:o(`statusPanel.zoneFinal`)}),(0,I.jsxs)(`div`,{className:`grid grid-cols-2 sm:grid-cols-4 gap-2`,children:[(0,I.jsx)(H,{label:o(`statusPanel.duration`),value:S}),(0,I.jsx)(U,{label:o(`statusPanel.cost`),value:C,valueClass:`text-yellow-400 aurora-light:text-accent-warning`,naCaption:o(`statusPanel.notAvailable`)}),(0,I.jsx)(U,{label:o(`statusPanel.turns`),value:w,naCaption:o(`statusPanel.notAvailable`)}),(0,I.jsx)(U,{label:o(`statusPanel.tokens`),value:te,naCaption:o(`statusPanel.notAvailable`)})]}),r&&(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`p`,{className:`text-[10px] text-muted-foreground/50 uppercase tracking-wider mb-1.5`,children:o(`statusPanel.pipelineTotal`,{count:r.jobCount})}),(0,I.jsxs)(`div`,{className:`grid grid-cols-2 gap-2`,children:[(0,I.jsx)(H,{label:o(`statusPanel.totalCost`),value:`${r.costEstimated?`~`:``}${r.hasNullCost?`≥`:``}$${r.totalCostUsd.toFixed(4)}`,valueClass:`text-yellow-400 aurora-light:text-accent-warning`}),(0,I.jsx)(H,{label:o(`statusPanel.totalTokens`),value:`${((r.totalTokensIn+r.totalTokensOut+r.totalTokensCacheRead+r.totalTokensCacheCreate)/1e3).toFixed(1)}k`})]}),r.hasNullCost&&(0,I.jsx)(`p`,{"data-testid":`pipeline-partial-hint`,className:`text-[10px] text-muted-foreground/70 mt-1.5`,title:o(`statusPanel.pipelinePartialTooltip`),children:o(`statusPanel.pipelinePartial`,{count:r.nullCostCount??0})})]}),l.length>0&&(0,I.jsxs)(`div`,{children:[(0,I.jsx)(`p`,{className:`text-[10px] text-muted-foreground/50 uppercase tracking-wider mb-1.5`,children:o(`statusPanel.filesModified`)}),(0,I.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:l.map(e=>(0,I.jsx)(`code`,{className:`text-[10px] font-mono bg-muted/30 px-2 py-0.5 rounded text-cyan-400/80 aurora-light:text-accent-info`,children:e},e))})]})]})})]})}function H({label:e,value:t,valueClass:n}){return(0,I.jsxs)(`div`,{className:`bg-muted/20 rounded-lg px-3 py-2`,children:[(0,I.jsx)(`p`,{className:`text-[10px] text-muted-foreground/50 uppercase tracking-wider`,children:e}),(0,I.jsx)(`p`,{className:O(`text-sm font-semibold tabular-nums mt-0.5`,n),children:t})]})}function U({label:e,value:t,valueClass:n,naCaption:r}){return(0,I.jsxs)(`div`,{className:`bg-muted/20 rounded-lg px-3 py-2`,children:[(0,I.jsx)(`p`,{className:`text-[10px] text-muted-foreground/50 uppercase tracking-wider`,children:e}),(0,I.jsx)(`p`,{className:O(`text-sm font-semibold tabular-nums mt-0.5`,t==null?`text-muted-foreground`:n),children:t??`—`}),t==null&&(0,I.jsx)(`p`,{className:`text-[10px] text-muted-foreground/30 mt-0.5`,children:r})]})}function W({label:e,caption:t,tooltip:n}){return(0,I.jsxs)(`div`,{className:`bg-muted/20 rounded-lg px-3 py-2 ring-1 ring-accent-info/10`,title:n,children:[(0,I.jsxs)(`p`,{className:`flex items-center gap-1 text-[10px] text-muted-foreground/50 uppercase tracking-wider`,children:[e,(0,I.jsx)(h,{className:`w-2.5 h-2.5 text-muted-foreground/30`,"aria-hidden":`true`})]}),(0,I.jsx)(`p`,{className:`text-sm font-semibold tabular-nums mt-0.5 text-muted-foreground/40`,children:`—`}),(0,I.jsx)(`p`,{className:`text-[10px] text-muted-foreground/30 mt-0.5`,children:t})]})}var G=4;function re({tickets:e,onTicketClick:t}){let{t:n}=g(`jobs`),[r,i]=(0,F.useState)(!1);if(e.length===0)return null;let a=e.length>=G&&!r?e.slice(0,1):e,o=e.length-a.length;return(0,I.jsxs)(`div`,{className:`rounded-xl border border-border/40 bg-card/40 px-4 py-3 space-y-1.5`,children:[a.map(e=>(0,I.jsx)(K,{ticket:e,onClick:()=>t(e.id)},e.id)),o>0&&(0,I.jsxs)(`button`,{type:`button`,onClick:()=>i(!0),className:`flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors`,children:[n(`ticketHeader.showMore`,{count:o}),(0,I.jsx)(D,{className:`w-3 h-3`})]}),r&&e.length>=G&&(0,I.jsxs)(`button`,{type:`button`,onClick:()=>i(!1),className:`flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors`,children:[n(`ticketHeader.showLess`),(0,I.jsx)(w,{className:`w-3 h-3`})]})]})}function K({ticket:e,onClick:t}){let{t:n}=g(`jobs`),r=e.title==null,i=`inline-flex items-center px-1.5 py-0.5 rounded-md text-[11px] font-mono tabular-nums shrink-0`;return r?(0,I.jsx)(`div`,{className:`flex items-center gap-2 min-w-0`,children:(0,I.jsx)(`span`,{className:O(i,`text-muted-foreground bg-muted/20 select-none`),title:n(`ticketHeader.deletedTooltip`),children:n(`ticketHeader.deletedTicket`,{id:e.id})})}):(0,I.jsxs)(`button`,{type:`button`,onClick:t,className:`flex items-center gap-2 min-w-0 w-full text-left group`,title:e.title??void 0,children:[(0,I.jsxs)(`span`,{className:O(i,`text-accent-primary bg-accent-primary/10 group-hover:bg-accent-primary/20 transition-colors`),children:[`#`,e.id]}),(0,I.jsx)(`span`,{className:`text-lg font-semibold text-foreground truncate group-hover:text-accent-primary transition-colors`,children:e.title})]})}var q={running:{variant:`running`,labelKey:`statusLabel.running`,tooltipKey:`statusTooltip.running`},completed:{variant:`success`,labelKey:`statusLabel.completed`,tooltipKey:`statusTooltip.completed`},failed:{variant:`failed`,labelKey:`statusLabel.failed`,tooltipKey:`statusTooltip.failed`},canceled:{variant:`canceled`,labelKey:`statusLabel.canceled`,tooltipKey:`statusTooltip.canceled`},queued:{variant:`queued`,labelKey:`statusLabel.queued`,tooltipKey:`statusTooltip.queued`}};function J(){let{t:e}=g(`jobs`),{id:s}=y(),{activeProjectId:c,projects:d}=ne(),m=d.find(e=>e.id===c)?.provider,h=u(),{openTicketDetail:_}=M(),[w,T]=(0,F.useState)(null),[D,k]=(0,F.useState)([]),[L,R]=(0,F.useState)([]),[z,B]=(0,F.useState)({}),[H,U]=(0,F.useState)([]),[W,G]=(0,F.useState)(!0),[K,J]=(0,F.useState)(!1);(0,F.useEffect)(()=>{if(!s)return;let e=new AbortController;T(null),k([]),R([]),B({}),G(!0),J(!1);async function t(){try{let t=await fetch(`${A()}/jobs/${s}`,{signal:e.signal});if(t.status===404){J(!0);return}if(!t.ok)throw Error(`Failed to fetch job`);let n=await t.json();T(n.job),k(n.events)}catch(e){if(e.name===`AbortError`)return;J(!0)}finally{e.signal.aborted||G(!1)}}return t(),()=>e.abort()},[s,c]),(0,F.useEffect)(()=>{if(!w?.pipeline_id){U([]);return}let e=w.pipeline_id;fetch(`${A()}/pipelines/${e}`).then(e=>e.ok?e.json():null).then(e=>{e?.jobs&&U(e.jobs)}).catch(()=>{})},[w?.pipeline_id,w?.status]);let Y=(0,F.useRef)(c);Y.current=c;let ie=(0,F.useRef)(null);ie.current=w?.status??null;let X=(0,F.useRef)([]),Z=(0,F.useRef)(null),ae=(0,F.useCallback)(()=>{Z.current=null;let e=X.current;e.length!==0&&(X.current=[],k(t=>{let n=[...t,...e];return n.length>1e4?n.slice(n.length-8e3):n}))},[]),Q=(0,F.useCallback)(e=>{let t=X.current;t.push(e),t.length>1e4&&(X.current=t.slice(-8e3)),Z.current||=requestAnimationFrame(ae)},[ae]);(0,F.useEffect)(()=>()=>{Z.current&&cancelAnimationFrame(Z.current)},[]);let oe=(0,F.useCallback)(e=>{let t=e;if(!(Y.current&&t.projectId&&t.projectId!==Y.current)){if(t.type===`init`){let e=t.phaseDefinitions??[];R(e);let n={};for(let r of e)n[r.key]=t.phases?.[r.key]??`idle`;B(n)}else if(t.type===`event`&&t.jobId===s)Q({id:Date.now(),job_id:s??``,seq:t.seq??0,event_type:t.event_type,source:t.source,payload:t.payload,timestamp:t.timestamp});else if(t.type===`log`&&t.processId===s)Q({id:Date.now(),job_id:s??``,seq:0,event_type:`log`,source:t.source,payload:JSON.stringify({line:t.line}),timestamp:t.timestamp});else if(t.type===`job.finalized`&&t.jobId===s)fetch(`${A()}/jobs/${s}`).then(e=>e.json()).then(e=>T(e.job)).catch(()=>{});else if(t.type===`phase`){let e=t.phase,n=t.state;B(t=>({...t,[e]:n}))}else if(t.type===`queue`){let e=t.jobs?.find(e=>e.id===s);if(e){let t=e.status,n=ie.current;T(e=>e&&{...e,status:t}),(t===`completed`||t===`failed`||t===`canceled`||t===`running`&&n!==`running`)&&fetch(`${A()}/jobs/${s}`).then(e=>e.json()).then(e=>T(e.job)).catch(()=>{})}}}},[s,Q]),{registerHandler:se,unregisterHandler:ce}=v();(0,F.useEffect)(()=>(se(`job-detail-${s}`,oe),()=>ce(`job-detail-${s}`)),[s,oe,se,ce]),(0,F.useEffect)(()=>{if(!s||!w||w.status!==`running`||w.hasTelemetry)return;let e=setInterval(()=>{fetch(`${A()}/jobs/${s}`).then(e=>e.ok?e.json():null).then(e=>{e?.job?.hasTelemetry&&T(e=>e&&{...e,hasTelemetry:!0})}).catch(()=>{})},8e3);return()=>clearInterval(e)},[s,w?.status,w?.hasTelemetry]);async function le(){if(!s)return;let n=await t({projectId:null,jobId:s});n.ok?n.status===`deleted`?(f.success(e(`detail.toast.jobDeleted`)),h(`/jobs`)):f.success(e(`detail.toast.cancelSignalSent`),{description:e(`detail.toast.cancelSignalSentDescription`)}):n.httpStatus===null?f.error(e(`detail.toast.networkError`)):f.error(e(`detail.toast.failed`),{description:n.error})}async function ue(){if(w)try{let t=await fetch(`${A()}/jobs/${w.id}/diagnostic`);if(!t.ok){let n=await t.json().catch(()=>({}));throw Error(n.error??e(`detail.toast.exportFailedHttp`,{status:t.status}))}let n=await t.blob(),r=URL.createObjectURL(n),i=new Date().toISOString().slice(0,10),a=document.createElement(`a`);a.href=r,a.download=`specrails-diagnostic-${w.id}-${i}.zip`,document.body.appendChild(a),a.click(),a.remove(),URL.revokeObjectURL(r)}catch(t){f.error(e(`detail.toast.exportFailed`),{description:t.message})}}async function de(){if(w)try{let t=await fetch(`${A()}/spawn`,{method:`POST`,headers:{"Content-Type":`application/json`},body:JSON.stringify({command:w.command})}),n=await t.json();if(!t.ok)throw Error(n.error??e(`detail.toast.spawnFailed`));f.success(e(`detail.toast.jobRequeued`)),h(`/jobs/${n.jobId}`)}catch(e){f.error(e.message)}}if(W)return(0,I.jsx)(`div`,{className:`max-w-5xl mx-auto px-4 py-6`,children:(0,I.jsxs)(`div`,{className:`space-y-3`,children:[(0,I.jsx)(`div`,{className:`h-4 w-48 bg-muted/30 rounded animate-pulse`}),(0,I.jsx)(`div`,{className:`h-20 bg-muted/30 rounded-lg animate-pulse`}),(0,I.jsx)(`div`,{className:`h-64 bg-muted/30 rounded-lg animate-pulse`})]})});if(K||!w)return(0,I.jsxs)(`div`,{className:`max-w-5xl mx-auto px-4 py-6 flex flex-col items-center gap-3 mt-12`,children:[(0,I.jsx)(`p`,{className:`text-lg font-semibold`,children:e(`detail.notFound`)}),(0,I.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e(`detail.notFoundDescription`,{id:s})}),(0,I.jsx)(E,{asChild:!0,variant:`outline`,size:`sm`,children:(0,I.jsxs)(b,{to:`/`,children:[(0,I.jsx)(p,{className:`w-3.5 h-3.5 mr-1.5`}),e(`detail.backToDashboard`)]})})]});let $=q[w.status]??q.queued,fe=w.status===`running`,pe=w.status===`completed`||w.status===`failed`,me=!!w.interactive,he=me&&fe,ge=(w.tickets?.length??0)>0,_e=w.command.startsWith(`loop:`),ve=H.length>1?{totalCostUsd:H.reduce((e,t)=>e+(t.total_cost_usd??0),0),hasNullCost:H.some(e=>e.total_cost_usd==null),costEstimated:H.some(e=>!!e.total_cost_usd_estimated),nullCostCount:H.filter(e=>e.total_cost_usd==null).length,totalTokensIn:H.reduce((e,t)=>e+(t.tokens_in??0),0),totalTokensOut:H.reduce((e,t)=>e+(t.tokens_out??0),0),totalTokensCacheRead:H.reduce((e,t)=>e+(t.tokens_cache_read??0),0),totalTokensCacheCreate:H.reduce((e,t)=>e+(t.tokens_cache_create??0),0),jobCount:H.length}:null;return(0,I.jsxs)(`div`,{"data-job-detail-surface":!0,className:`flex flex-col h-full max-w-5xl mx-auto w-full`,children:[(0,I.jsxs)(`div`,{className:`px-4 py-4 border-b border-border space-y-3`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-1 text-xs text-muted-foreground`,children:[(0,I.jsxs)(b,{to:`/`,className:`hover:text-foreground transition-colors flex items-center gap-1`,children:[(0,I.jsx)(p,{className:`w-3 h-3`}),e(`detail.breadcrumbDashboard`)]}),(0,I.jsx)(S,{className:`w-3 h-3`}),(0,I.jsx)(`span`,{className:`text-foreground font-mono`,children:e(`detail.breadcrumbJob`,{id:s?.slice(0,8)})})]}),ge&&(0,I.jsx)(re,{tickets:w.tickets??[],onTicketClick:_}),(0,I.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,I.jsxs)(`div`,{className:`space-y-1 min-w-0`,children:[(0,I.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,I.jsxs)(N,{children:[(0,I.jsx)(l,{asChild:!0,children:(0,I.jsx)(`div`,{children:(0,I.jsx)(te,{variant:$.variant,children:e($.labelKey)})})}),(0,I.jsx)(o,{children:e($.tooltipKey)})]}),(0,I.jsx)(`code`,{className:O(`font-mono text-foreground/90 truncate`,ge?`text-xs text-muted-foreground`:`text-sm`),children:P(w.command,m)})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-3 text-xs text-muted-foreground flex-wrap`,children:[(0,I.jsx)(`span`,{children:w.started_at?e(`detail.startedAgo`,{timeAgo:ee(new Date(w.started_at),{addSuffix:!0,locale:C()})}):e(`detail.queuedWaiting`)}),w.model&&(0,I.jsx)(`span`,{className:`text-muted-foreground/40`,children:w.model})]})]}),(0,I.jsxs)(`div`,{className:`flex items-center gap-2 shrink-0`,children:[w.hasTelemetry&&(0,I.jsxs)(N,{children:[(0,I.jsx)(l,{asChild:!0,children:(0,I.jsxs)(E,{variant:`outline`,size:`sm`,className:`h-7`,onClick:ue,"aria-label":e(`detail.exportDiagnosticAria`),children:[(0,I.jsx)(x,{className:`w-3.5 h-3.5 mr-1.5`}),e(`detail.exportDiagnostic`)]})}),(0,I.jsx)(o,{children:e(`detail.exportDiagnosticTooltip`)})]}),pe&&(0,I.jsxs)(N,{children:[(0,I.jsx)(l,{asChild:!0,children:(0,I.jsxs)(E,{variant:`outline`,size:`sm`,onClick:de,className:`h-7`,children:[(0,I.jsx)(j,{className:`w-3.5 h-3.5 mr-1.5`}),e(`detail.reExecute`)]})}),(0,I.jsx)(o,{children:e(`detail.reExecuteTooltip`)})]}),fe&&(0,I.jsxs)(N,{children:[(0,I.jsx)(l,{asChild:!0,children:(0,I.jsx)(E,{variant:`outline`,size:`sm`,onClick:le,className:`h-7 border-destructive/30 text-destructive hover:bg-destructive/10`,children:e(me?`detail.cancelInteractive`:`detail.cancelJob`)})}),(0,I.jsx)(o,{children:e(`detail.cancelJobTooltip`)})]})]})]}),(0,I.jsx)(n,{phases:z,phaseDefinitions:L})]}),(w.status===`running`||w.status===`completed`||w.status===`failed`)&&(0,I.jsx)(V,{job:w,events:D,defaultOpen:w.status===`completed`||w.status===`running`,pipelineTotals:ve??void 0,phases:z,phaseDefinitions:L}),(0,I.jsx)(`div`,{className:`flex-1 overflow-hidden relative`,children:_e?(0,I.jsx)(r,{events:D,jobStatus:w.status,variant:`page`}):(0,I.jsx)(i,{events:D})}),he&&(0,I.jsx)(a,{jobId:w.id,settleMode:w.interactiveSettleMode,initialAcceptingTurns:w.interactiveAcceptingTurns,kind:w.command.startsWith(`loop:`)?`loop-step`:`job`,variant:`page`})]})}export{J as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./chunk-BNv3lrIs.js";import{$t as t,A as n,B as r,Cn as i,Ft as a,G as o,H as s,Hn as c,J as l,K as u,Kn as d,Ln as f,Q as p,Rn as m,X as h,Y as g,Z as _,at as v,b as y,bn as b,gn as x,j as ee,lt as te,nn as ne,nt as S,q as re,t as C,tn as w,tt as T,vn as E,wn as D,yn as O,z as k}from"./index-Dw1N2-ci.js";import{t as ie}from"./format-command-CuWuRvka.js";import{t as A}from"./ExportDropdown-DDhJH-Jr.js";var ae=x(`git-compare-arrows`,[[`circle`,{cx:`5`,cy:`6`,r:`3`,key:`1qnov2`}],[`path`,{d:`M12 6h5a2 2 0 0 1 2 2v7`,key:`1yj91y`}],[`path`,{d:`m15 9-3-3 3-3`,key:`1lwv8l`}],[`circle`,{cx:`19`,cy:`18`,r:`3`,key:`1qljk2`}],[`path`,{d:`M12 18H7a2 2 0 0 1-2-2V9`,key:`16sdep`}],[`path`,{d:`m9 15 3 3-3 3`,key:`1m3kbl`}]]),j=e(d(),1),M=i();function N(e){if(e==null)return`—`;let t=Math.round(e/1e3);return t<60?`${t}s`:`${Math.floor(t/60)}m ${t%60}s`}function P(e){return e==null?`—`:e===0?`$0`:e<.01?`$${e.toFixed(4)}`:`$${e.toFixed(3)}`}function F(e){return e==null?`—`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function I({label:e,a:t,b:n,highlight:r}){return(0,M.jsxs)(`div`,{className:`grid grid-cols-3 gap-2 py-2 border-b border-border/20 last:border-0 text-xs`,children:[(0,M.jsx)(`span`,{className:`text-muted-foreground`,children:e}),(0,M.jsx)(`span`,{className:`font-mono text-right ${r===`a`?`text-emerald-400 aurora-light:text-accent-success font-semibold`:``}`,children:t}),(0,M.jsx)(`span`,{className:`font-mono text-right ${r===`b`?`text-emerald-400 aurora-light:text-accent-success font-semibold`:``}`,children:n})]})}function L(e,t,n=!0){return e==null||t==null||e===t?null:n?e<t?`a`:`b`:e>t?`a`:`b`}function oe({jobIds:e,onClose:t}){let{t:n}=m(`jobs`),[r,i]=(0,j.useState)(null),[a,o]=(0,j.useState)(!0),[s,c]=(0,j.useState)(null),{panelRef:l,panelStyle:u,headerHandleProps:d,resizeHandles:f,isFloating:h,guardBackdrop:g}=p();(0,j.useEffect)(()=>{let t=new AbortController;return fetch(`${D()}/jobs/compare?jobIds=${e.join(`,`)}`,{signal:t.signal}).then(e=>{if(!e.ok)throw Error(`HTTP ${e.status}`);return e.json()}).then(e=>{i(e),o(!1)}).catch(e=>{e.name!==`AbortError`&&(c(e.message),o(!1))}),()=>t.abort()},[e]);function y(e,t){return(0,M.jsxs)(`div`,{className:`text-center space-y-1`,children:[(0,M.jsx)(`p`,{className:`text-[10px] text-muted-foreground font-medium uppercase tracking-wider`,children:n(`comparison.jobN`,{n:t+1})}),(0,M.jsx)(`code`,{className:`text-[10px] text-foreground/70 block truncate max-w-[160px] mx-auto`,children:e.command}),(0,M.jsxs)(`div`,{className:`flex items-center justify-center gap-1 text-[10px]`,children:[e.status===`completed`?(0,M.jsx)(ne,{className:`w-3 h-3 text-emerald-400 aurora-light:text-accent-success`}):(0,M.jsx)(w,{className:`w-3 h-3 text-rose-400 aurora-light:text-destructive`}),(0,M.jsx)(`span`,{className:`capitalize text-muted-foreground`,children:n(`statusLabel.${e.status}`,{defaultValue:e.status})})]}),(0,M.jsx)(`p`,{className:`text-[10px] text-muted-foreground font-mono`,children:e.id.slice(0,8)})]})}return(0,M.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm`,onClick:g(t),children:[(0,M.jsxs)(`div`,{ref:l,className:`w-full max-w-lg rounded-xl border border-border/30 bg-popover p-5 shadow-xl space-y-4 mx-4`,onClick:e=>e.stopPropagation(),style:u,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between ${h?`cursor-grab active:cursor-grabbing`:``}`,...d,children:[(0,M.jsx)(`h2`,{className:`text-sm font-semibold`,children:n(`comparison.title`)}),(0,M.jsx)(`button`,{type:`button`,onClick:t,className:`text-muted-foreground hover:text-foreground transition-colors`,children:(0,M.jsx)(v,{className:`w-4 h-4`})})]}),a&&(0,M.jsx)(`div`,{className:`space-y-2`,children:[0,1,2,3].map(e=>(0,M.jsx)(`div`,{className:`h-8 bg-muted/20 rounded animate-pulse`},e))}),s&&(0,M.jsx)(`p`,{className:`text-xs text-red-400 aurora-light:text-destructive`,children:n(`comparison.loadFailed`,{error:s})}),r&&(()=>{let[e,t]=r.jobs,i=L(e.durationMs,t.durationMs,!0),a=L(e.totalCostUsd,t.totalCostUsd,!0),o=L(e.tokensOut==null?null:e.tokensOut,t.tokensOut==null?null:t.tokensOut,!0);return(0,M.jsxs)(`div`,{children:[(0,M.jsxs)(`div`,{className:`grid grid-cols-3 gap-2 pb-3 border-b border-border/30 mb-1`,children:[(0,M.jsx)(`div`,{}),y(e,0),y(t,1)]}),(0,M.jsx)(I,{label:n(`comparison.duration`),a:N(e.durationMs),b:N(t.durationMs),highlight:i}),(0,M.jsx)(I,{label:n(`comparison.cost`),a:P(e.totalCostUsd),b:P(t.totalCostUsd),highlight:a}),(0,M.jsx)(I,{label:n(`comparison.tokensOut`),a:F(e.tokensOut),b:F(t.tokensOut),highlight:o}),(0,M.jsx)(I,{label:n(`comparison.tokensIn`),a:F(e.tokensIn),b:F(t.tokensIn),highlight:null}),(0,M.jsx)(I,{label:n(`comparison.cacheRead`),a:F(e.tokensCacheRead),b:F(t.tokensCacheRead),highlight:null}),(0,M.jsx)(I,{label:n(`comparison.model`),a:e.model??`—`,b:t.model??`—`,highlight:null}),(0,M.jsx)(I,{label:n(`comparison.phasesDone`),a:e.phasesCompleted.length>0?e.phasesCompleted.join(`, `):`—`,b:t.phasesCompleted.length>0?t.phasesCompleted.join(`, `):`—`,highlight:null})]})})(),r&&(0,M.jsx)(`p`,{className:`text-[10px] text-muted-foreground/60 text-center`,children:n(`comparison.betterValueHint`)})]}),(0,M.jsx)(_,{handles:f})]})}var se={running:{variant:`running`,labelKey:`statusLabel.running`,tooltipKey:`statusTooltip.running`},completed:{variant:`success`,labelKey:`statusLabel.done`,tooltipKey:`statusTooltip.completed`},failed:{variant:`failed`,labelKey:`statusLabel.failed`,tooltipKey:`statusTooltip.failed`},canceled:{variant:`canceled`,labelKey:`statusLabel.canceled`,tooltipKey:`statusTooltip.canceled`},queued:{variant:`queued`,labelKey:`statusLabel.queued`,tooltipKey:`statusTooltip.queuedToRun`},zombie_terminated:{variant:`failed`,labelKey:`statusLabel.zombie`,tooltipKey:`statusTooltip.zombie`},skipped:{variant:`warning`,labelKey:`statusLabel.skipped`,tooltipKey:`statusTooltip.skipped`}},ce=[`running`,`completed`,`failed`,`canceled`,`zombie_terminated`,`queued`,`skipped`],R={critical:{className:`bg-red-500/15 aurora-light:bg-destructive/10 text-red-400 aurora-light:text-destructive border-red-500/30 aurora-light:border-destructive/30`,labelKey:`recent.priority.critical`},high:{className:`bg-orange-500/15 aurora-light:bg-accent-warning/10 text-orange-400 aurora-light:text-accent-warning border-orange-500/30 aurora-light:border-accent-warning/30`,labelKey:`recent.priority.high`},normal:{className:``,labelKey:`recent.priority.normal`},low:{className:`bg-gray-500/15 aurora-light:bg-muted text-gray-400 aurora-light:text-muted-foreground border-gray-500/30 aurora-light:border-border`,labelKey:`recent.priority.low`}};function le(e){return e==null||e===0?null:e<.01?`$${e.toFixed(4)}`:`$${e.toFixed(3)}`}function ue(e,t){if(!t)return null;let n=new Date(t).getTime()-new Date(e).getTime();if(n<0)return null;let r=Math.round(n/1e3);if(r<60)return`${r}s`;let i=Math.floor(r/60),a=r%60;return i<60?`${i}m ${a}s`:`${Math.floor(i/60)}h ${i%60}m`}function de(e){return e==null||e===0?null:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function fe(e){try{return y(new Date(e),{addSuffix:!0,locale:b()})}catch{return e}}function z(e){let[t,n,r]=e.split(`-`).map(Number);return new Date(t,n-1,r).getTime()}function B(e){let[t,n,r]=e.split(`-`).map(Number);return new Date(t,n-1,r+1).getTime()-1}function V(e,t,n){if(!t&&!n)return!0;let r=new Date(e).getTime();return Number.isNaN(r)?!0:!(t&&r<z(t)||n&&r>B(n))}var H=10;function U({jobs:e,isLoading:n,onJobsCleared:i,onProposalClick:d,onProposalDelete:v}){let{t:y}=m(`jobs`),b=c(),{activeProjectId:x,projects:ee}=E(),ne=ee.find(e=>e.id===x)?.provider,[C,w]=(0,j.useState)(null),[O,A]=(0,j.useState)(``),[N,P]=(0,j.useState)(``),[F,I]=(0,j.useState)(!1),[L,U]=(0,j.useState)(``),[W,pe]=(0,j.useState)(``),[me,he]=(0,j.useState)(!1),[G,K]=(0,j.useState)(null),[q,ge]=(0,j.useState)(H),[J,_e]=(0,j.useState)(!1),[Y,X]=(0,j.useState)([]),[ve,Z]=(0,j.useState)(null),{panelRef:ye,panelStyle:be,headerHandleProps:xe,resizeHandles:Se,isFloating:Ce,guardBackdrop:we}=p();(0,j.useEffect)(()=>{ge(H)},[e.length]);function Te(){_e(e=>!e),X([])}function Ee(e){X(t=>{if(t.includes(e))return t.filter(t=>t!==e);if(t.length>=2)return t;let n=[...t,e];return n.length===2&&Z(n),n})}let Q=e.filter(e=>C&&e.status!==C?!1:V(e.started_at,O,N)),De=e.filter(e=>V(e.started_at,L,W)).length;async function $(e){he(!0);try{let t={};e===`range`&&(L&&(t.from=new Date(z(L)).toISOString()),W&&(t.to=new Date(B(W)).toISOString()));let n=await fetch(`${D()}/jobs`,{method:`DELETE`,headers:{"Content-Type":`application/json`},body:JSON.stringify(t)});if(n.ok){let e=await n.json();f.success(y(`recent.toast.cleared`,{count:e.deleted})),I(!1),U(``),pe(``),i?.()}else f.error(y(`recent.toast.clearFailed`))}catch{f.error(y(`recent.toast.networkError`))}finally{he(!1)}}return n?(0,M.jsx)(`div`,{className:`rounded-lg border border-border/40 bg-card/50 p-4 space-y-1`,children:[0,1,2].map(e=>(0,M.jsx)(`div`,{className:`h-9 bg-muted/30 rounded-md animate-pulse`},e))}):e.length===0?(0,M.jsxs)(`div`,{className:`rounded-lg border border-dashed border-border/40 bg-card/50 p-8 text-center space-y-2`,children:[(0,M.jsx)(t,{className:`w-8 h-8 text-muted-foreground/30 mx-auto`}),(0,M.jsx)(`p`,{className:`text-sm font-medium text-muted-foreground`,children:y(`recent.emptyTitle`)}),(0,M.jsx)(`p`,{className:`text-xs text-muted-foreground/60`,children:y(`recent.emptyDescription`)})]}):(0,M.jsxs)(`div`,{className:`rounded-lg border border-border/40 bg-card/50 p-4 space-y-2`,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,M.jsxs)(`div`,{className:`flex items-center gap-1`,children:[(0,M.jsx)(`button`,{type:`button`,onClick:()=>w(null),className:`px-2 py-0.5 rounded text-[10px] font-medium transition-colors ${C===null?`bg-accent text-foreground`:`text-muted-foreground hover:text-foreground hover:bg-accent/50`}`,children:y(`recent.filterAll`,{count:e.length})}),ce.map(t=>{let n=e.filter(e=>e.status===t).length;return n===0?null:(0,M.jsx)(`button`,{type:`button`,onClick:()=>w(C===t?null:t),className:`px-2 py-0.5 rounded text-[10px] font-medium capitalize transition-colors ${C===t?`bg-accent text-foreground`:`text-muted-foreground hover:text-foreground hover:bg-accent/50`}`,children:y(`recent.filterStatus`,{status:y(`statusName.${t}`),count:n})},t)})]}),(0,M.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,M.jsx)(`input`,{type:`date`,value:O,onChange:e=>A(e.target.value),className:`h-6 rounded border border-border bg-input px-1.5 text-[10px] text-foreground`,title:y(`recent.fromDate`)}),(0,M.jsx)(`input`,{type:`date`,value:N,onChange:e=>P(e.target.value),className:`h-6 rounded border border-border bg-input px-1.5 text-[10px] text-foreground`,title:y(`recent.toDate`)}),(O||N)&&(0,M.jsx)(`button`,{type:`button`,onClick:()=>{A(``),P(``)},className:`text-[10px] text-muted-foreground hover:text-foreground transition-colors`,children:y(`recent.clear`)}),(0,M.jsxs)(k,{children:[(0,M.jsx)(s,{asChild:!0,children:(0,M.jsx)(S,{variant:`ghost`,size:`sm`,className:`h-6 w-6 p-0 transition-colors ${J?`text-foreground bg-accent`:`text-muted-foreground hover:text-foreground`}`,onClick:Te,children:(0,M.jsx)(ae,{className:`w-3.5 h-3.5`})})}),(0,M.jsx)(r,{children:y(J?`recent.exitCompareMode`:`recent.compareTwoJobs`)})]}),(0,M.jsxs)(k,{children:[(0,M.jsx)(s,{asChild:!0,children:(0,M.jsx)(S,{variant:`ghost`,size:`sm`,className:`h-6 w-6 p-0 text-muted-foreground hover:text-destructive`,onClick:()=>I(!0),children:(0,M.jsx)(te,{className:`w-3.5 h-3.5`})})}),(0,M.jsx)(r,{children:y(`recent.clearJobs`)})]})]})]}),J&&(0,M.jsxs)(`div`,{className:`flex items-center justify-between rounded-md bg-accent/40 px-3 py-1.5 text-[10px] text-muted-foreground`,children:[(0,M.jsxs)(`span`,{children:[Y.length===0&&y(`recent.selectTwoToCompare`),Y.length===1&&y(`recent.selectOneMore`),Y.length===2&&y(`recent.readyToCompare`)]}),Y.length===2&&(0,M.jsx)(`button`,{type:`button`,className:`text-[10px] font-medium text-foreground hover:underline`,onClick:()=>Z(Y),children:y(`recent.compareAction`)})]}),(0,M.jsxs)(`div`,{className:`flex items-center gap-3 px-3 py-1 text-[10px] font-medium text-muted-foreground uppercase tracking-wider`,children:[(0,M.jsx)(`span`,{className:`w-14`,children:y(`recent.colStatus`)}),(0,M.jsx)(`span`,{className:`flex-1 min-w-0`,children:y(`recent.colCommand`)}),(0,M.jsxs)(`div`,{className:`flex items-center gap-3 shrink-0`,children:[(0,M.jsx)(`span`,{className:`w-14 text-right`,children:y(`recent.colDuration`)}),(0,M.jsx)(`span`,{className:`w-12 text-right`,children:y(`recent.colTokens`)}),(0,M.jsx)(`span`,{className:`w-12 text-right`,children:y(`recent.colCost`)}),(0,M.jsx)(`span`,{className:`w-20 text-right`,children:y(`recent.colStarted`)})]})]}),(0,M.jsx)(`div`,{className:`space-y-0.5`,children:Q.slice(0,q).map(e=>{let t=se[e.status]??se.queued,n=le(e.total_cost_usd),i=ue(e.started_at,e.finished_at),o=de((e.tokens_in??0)+(e.tokens_out??0)+(e.tokens_cache_read??0)+(e.tokens_cache_create??0)||null),c=e.id.startsWith(`proposal:`),l=c?e.id.replace(`proposal:`,``):null,u=Y.includes(e.id),f=J&&!c&&Y.length===2&&!u;return(0,M.jsxs)(`div`,{role:`button`,tabIndex:0,className:`flex items-center gap-3 px-3 py-2 rounded-md transition-colors cursor-pointer group ${u?`bg-accent/70 ring-1 ring-border`:f?`opacity-40 cursor-not-allowed`:`hover:bg-accent/50`}`,onClick:()=>{if(J&&!c){Ee(e.id);return}c&&l?d?.(l):b(`/jobs/${e.id}`)},children:[(0,M.jsxs)(k,{children:[(0,M.jsx)(s,{asChild:!0,children:(0,M.jsx)(`div`,{children:(0,M.jsx)(T,{variant:t.variant,children:y(t.labelKey)})})}),(0,M.jsx)(r,{children:y(t.tooltipKey)})]}),e.priority&&e.priority!==`normal`&&(0,M.jsx)(`span`,{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[9px] font-medium border ${R[e.priority].className}`,children:y(R[e.priority].labelKey)}),e.profile_name&&(0,M.jsxs)(k,{children:[(0,M.jsx)(s,{asChild:!0,children:(0,M.jsx)(`span`,{className:`inline-flex items-center rounded px-1.5 py-0.5 text-[9px] font-medium border border-accent-primary/40 bg-accent-primary/10 text-accent-primary/90`,children:e.profile_name})}),(0,M.jsx)(r,{children:y(`recent.profileTooltip`,{name:e.profile_name})})]}),(0,M.jsxs)(`div`,{className:`flex items-center gap-1 flex-1 min-w-0`,children:[e.pipeline_id&&(0,M.jsxs)(k,{children:[(0,M.jsx)(s,{asChild:!0,children:(0,M.jsx)(a,{className:`w-3 h-3 text-accent-primary/60 shrink-0`})}),(0,M.jsxs)(r,{children:[y(`recent.pipelinePart`),e.depends_on_job_id&&` ${y(`recent.pipelineDependsOn`)}`,e.skip_reason&&` — ${e.skip_reason}`]})]}),(0,M.jsx)(`code`,{className:`text-xs text-foreground/80 truncate`,children:ie(e.command,ne)})]}),(0,M.jsxs)(`div`,{className:`flex items-center gap-3 text-[10px] text-muted-foreground shrink-0`,children:[(0,M.jsx)(`span`,{className:`w-14 text-right`,children:i??`—`}),(0,M.jsx)(`span`,{className:`w-12 text-right`,children:o?`${o}`:`—`}),(0,M.jsx)(`span`,{className:`w-12 text-right`,children:n??`—`}),(0,M.jsx)(`span`,{className:`w-20 text-right`,children:fe(e.started_at)}),c&&l&&(0,M.jsx)(`button`,{type:`button`,className:`w-4 h-4 md:opacity-0 md:group-hover:opacity-100 text-muted-foreground hover:text-destructive transition-all`,onClick:e=>{e.stopPropagation(),K(l)},title:y(`recent.deleteProposal`),children:(0,M.jsx)(te,{className:`w-3 h-3`})})]})]},e.id)})}),Q.length>q&&(0,M.jsx)(`div`,{className:`pt-1 text-center`,children:(0,M.jsx)(`button`,{type:`button`,onClick:()=>ge(e=>e+H),className:`text-[10px] text-muted-foreground hover:text-foreground transition-colors px-3 py-1 rounded hover:bg-accent/50`,children:y(`recent.loadMore`,{count:Q.length-q})})}),F&&(0,M.jsxs)(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm`,onClick:we(()=>I(!1)),children:[(0,M.jsxs)(`div`,{ref:ye,className:`w-80 rounded-xl border border-border/30 bg-popover p-4 shadow-lg space-y-4`,onClick:e=>e.stopPropagation(),style:be,children:[(0,M.jsxs)(`div`,{...xe,className:Ce?`cursor-grab active:cursor-grabbing`:void 0,children:[(0,M.jsx)(`h3`,{className:`text-sm font-semibold`,children:y(`recent.clearModal.title`)}),(0,M.jsx)(`p`,{className:`text-xs text-muted-foreground mt-0.5`,children:y(`recent.clearModal.jobsInHistory`,{count:e.length})})]}),(0,M.jsx)(S,{variant:`destructive`,size:`sm`,className:`w-full`,disabled:me,onClick:()=>$(`all`),children:y(`recent.clearModal.clearAll`,{count:e.length})}),(0,M.jsxs)(`div`,{className:`space-y-2`,children:[(0,M.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:y(`recent.clearModal.orByRange`)}),(0,M.jsxs)(`div`,{className:`flex gap-2`,children:[(0,M.jsx)(`input`,{type:`date`,value:L,onChange:e=>U(e.target.value),className:`flex-1 h-7 rounded-md border border-border bg-input px-2 text-xs text-foreground`,placeholder:y(`recent.clearModal.fromPlaceholder`)}),(0,M.jsx)(`input`,{type:`date`,value:W,onChange:e=>pe(e.target.value),className:`flex-1 h-7 rounded-md border border-border bg-input px-2 text-xs text-foreground`,placeholder:y(`recent.clearModal.toPlaceholder`)})]}),(0,M.jsx)(S,{variant:`outline`,size:`sm`,className:`w-full`,disabled:me||!L&&!W,onClick:()=>$(`range`),children:L||W?y(`recent.clearModal.clearInRange`,{count:De}):y(`recent.clearModal.clearRange`)})]}),(0,M.jsx)(S,{variant:`ghost`,size:`sm`,className:`w-full`,onClick:()=>I(!1),children:y(`common:actions.cancel`)})]}),(0,M.jsx)(_,{handles:Se})]}),(0,M.jsx)(o,{open:G!==null,onOpenChange:e=>!e&&K(null),children:(0,M.jsxs)(u,{className:`max-w-sm`,children:[(0,M.jsxs)(g,{children:[(0,M.jsx)(h,{children:y(`recent.deleteProposalConfirm.title`)}),(0,M.jsx)(re,{children:y(`recent.deleteProposalConfirm.description`)})]}),(0,M.jsxs)(l,{children:[(0,M.jsx)(S,{variant:`ghost`,size:`sm`,onClick:()=>K(null),children:y(`common:actions.cancel`)}),(0,M.jsx)(S,{variant:`destructive`,size:`sm`,onClick:()=>{G&&v?.(G),K(null)},children:y(`common:actions.delete`)})]})]})}),ve&&(0,M.jsx)(oe,{jobIds:ve,onClose:()=>{Z(null),X([]),_e(!1)}})]})}function W(){let{t:e}=m(`jobs`),{activeProjectId:t}=E(),{recentJobs:r}=C(t),{data:i,isFirstLoad:a,refresh:s}=O({namespace:`jobs`,projectId:t,initialValue:r,fetcher:async()=>{let e=await fetch(`${D()}/jobs?limit=10`);return e.ok?(await e.json()).jobs:[]},pollInterval:1e4}),{data:c}=O({namespace:`proposals`,projectId:t,initialValue:[],fetcher:async()=>{let e=await fetch(`${D()}/propose?limit=10`);return e.ok?(await e.json()).proposals:[]},pollInterval:1e4}),d={input:`queued`,exploring:`running`,review:`running`,refining:`running`,creating_issue:`running`,created:`completed`,cancelled:`canceled`},p=c.map(e=>({id:`proposal:${e.id}`,command:`/specrails:propose-feature ${e.idea.length>60?e.idea.slice(0,57)+`...`:e.idea}`,started_at:e.created_at,status:d[e.status]??`queued`})),_=[...i,...p].sort((e,t)=>new Date(t.started_at).getTime()-new Date(e.started_at).getTime()),[v,y]=(0,j.useState)(null),b=(0,j.useCallback)(async e=>{try{let t=await fetch(`${D()}/propose/${e}`);if(!t.ok)return;y((await t.json()).proposal)}catch{}},[]),x=(0,j.useCallback)(async t=>{try{(await fetch(`${D()}/propose/${t}`,{method:`DELETE`})).ok&&(f.success(e(`page.proposalDeleted`)),s())}catch{}},[s,e]);return(0,M.jsxs)(`div`,{className:`max-w-4xl mx-auto px-4 py-6`,children:[(0,M.jsxs)(`div`,{className:`flex items-center justify-between mb-4`,children:[(0,M.jsx)(`h1`,{className:`text-sm font-semibold`,children:e(`page.title`)}),(0,M.jsx)(A,{baseUrl:`${D()}/jobs/export`,label:e(`page.exportJobs`)})]}),(0,M.jsx)(U,{jobs:_,isLoading:a,onJobsCleared:s,onProposalClick:b,onProposalDelete:x}),(0,M.jsx)(o,{open:v!==null,onOpenChange:e=>!e&&y(null),children:(0,M.jsx)(u,{className:`max-w-3xl glass-card`,children:v&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(g,{children:(0,M.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,M.jsx)(h,{className:`flex-1 min-w-0`,children:e(`page.proposal.title`)}),(0,M.jsx)(T,{variant:v.status===`created`?`success`:v.status===`cancelled`?`destructive`:`secondary`,children:v.status})]})}),(0,M.jsx)(`div`,{className:`text-xs text-muted-foreground bg-muted/20 rounded px-2 py-1 italic`,children:v.idea}),v.result_markdown?(0,M.jsx)(`div`,{className:`max-h-[400px] overflow-y-auto rounded-lg px-3 py-2 text-xs bg-muted/40`,children:(0,M.jsx)(`div`,{className:`prose prose-invert prose-xs max-w-none prose-p:my-1 prose-headings:mt-2 prose-headings:mb-1 prose-headings:text-sm prose-headings:font-semibold prose-ul:my-1 prose-ol:my-1 prose-li:my-0 prose-code:text-cyan-300 prose-code:text-[10px] prose-code:bg-muted/40 prose-code:px-1 prose-code:py-0.5 prose-code:rounded text-foreground/80`,children:(0,M.jsx)(ee,{remarkPlugins:[n],children:v.result_markdown})})}):(0,M.jsx)(`p`,{className:`text-xs text-muted-foreground py-4 text-center`,children:e(`page.proposal.noContent`)}),v.issue_url&&(0,M.jsxs)(`div`,{className:`text-xs`,children:[e(`page.proposal.githubIssue`),` `,(0,M.jsx)(`a`,{href:v.issue_url,target:`_blank`,rel:`noopener noreferrer`,className:`text-accent-primary hover:underline`,children:v.issue_url})]}),(0,M.jsxs)(l,{children:[(0,M.jsx)(S,{variant:`destructive`,size:`sm`,onClick:()=>{x(v.id),y(null)},children:e(`common:actions.delete`)}),(0,M.jsx)(S,{variant:`ghost`,size:`sm`,onClick:()=>y(null),children:e(`common:actions.close`)})]})]})})})]})}export{W as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./chunk-BNv3lrIs.js";import{t}from"./upload-CRuuzzvp.js";import{Cn as n,D as r,Dt as i,E as a,G as o,Hn as s,J as c,Jt as l,K as u,Kn as d,Ln as f,O as p,R as m,Rn as h,T as g,Tt as _,X as ee,Xt as v,Y as y,Zt as b,_n as te,gn as x,kt as S,lt as C,mt as w,nt as T,ot as E,q as D,rt as O,vn as ne,w as k}from"./index-Dw1N2-ci.js";import{n as re}from"./TemplatePreviewModal-DcHFbLA8.js";var ie=x(`file-down`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M12 18v-6`,key:`17g6i2`}],[`path`,{d:`m9 15 3 3 3-3`,key:`1npd3o`}]]),ae=x(`file-up`,[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M12 12v6`,key:`3ahymv`}],[`path`,{d:`m15 15-3-3-3 3`,key:`15xj92`}]]),A=e(d(),1);function oe(e){return{specrailsLoops:1,loops:e.map(e=>({name:e.name,description:e.description,graph:e.graph}))}}function j(e){let t=e;return!!t&&typeof t.name==`string`&&!!t.graph&&typeof t.graph==`object`}function se(e){let t;try{t=JSON.parse(e)}catch{throw Error(`invalid-json`)}let n=(Array.isArray(t)?t:Array.isArray(t?.loops)?t.loops:j(t)?[t]:[]).filter(j);if(n.length===0)throw Error(`no-loops`);return n.map(e=>({name:e.name,description:e.description??null,graph:e.graph}))}function ce(e){return e.length===1?`${e[0].name.trim().toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)||`loop`}.loop.json`:`specrails-loops-${e.length}.json`}var M=[`API`,`Automation`,`CI`,`Database`,`Debugging`,`DevOps`,`Docs`,`Git`,`Maintenance`,`Performance`,`Planning`,`Quality`,`Review`,`Security`,`Testing`];function le(e,t){let n=t.query.trim().toLowerCase(),r=t.categories;return e.filter(e=>r.length>0&&!(e.category&&r.includes(e.category))?!1:n?`${e.name} ${e.description} ${e.tags.join(` `)} ${e.category??``} ${e.searchTerms??``}`.toLowerCase().includes(n):!0)}function ue(e){let t=new Map;for(let n of e)n.category&&t.set(n.category,(t.get(n.category)??0)+1);let n=[];for(let e of M){let r=t.get(e);r&&(n.push({category:e,count:r}),t.delete(e))}for(let e of[...t.keys()].sort())n.push({category:e,count:t.get(e)});return n}var N=n();function de({loop:e,projects:t,onClose:n,onExecute:r}){let{t:a}=h(`loops`),s=e!==null,[l,d]=(0,A.useState)(``),[f,p]=(0,A.useState)(``),[_,v]=(0,A.useState)(``),[b,te]=(0,A.useState)(`medium`),x=t.find(e=>e.id===(l||t[0]?.id)),S=(0,A.useMemo)(()=>x?.providers??(x?.provider?[x.provider]:[]),[x]),C=f||S[0]||``,w=(0,A.useMemo)(()=>g(C),[C]),E=_||k(C),O=C?m(C):!1;return(0,N.jsx)(o,{open:s,onOpenChange:e=>{e||n()},children:(0,N.jsx)(u,{movableResizable:!0,className:`max-w-sm`,children:e&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsxs)(y,{children:[(0,N.jsx)(ee,{children:a(`run.title`,{name:e.name})}),(0,N.jsx)(D,{children:a(`run.subtitle`)})]}),(0,N.jsx)(`label`,{className:`block text-[11px] font-medium text-muted-foreground`,children:a(`run.project`)}),t.length===0?(0,N.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:a(`run.noProjects`)}):(0,N.jsx)(`select`,{"aria-label":a(`run.project`),"data-testid":`run-project-select`,value:l||t[0]?.id,onChange:e=>{d(e.target.value),p(``),v(``)},className:`w-full text-xs rounded border border-border bg-transparent px-2 py-1 text-foreground focus:outline-none focus:ring-1 focus:ring-accent-primary/40`,children:t.map(e=>(0,N.jsx)(`option`,{value:e.id,children:e.name},e.id))}),S.length>1&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`label`,{className:`block text-[11px] font-medium text-muted-foreground`,children:a(`run.provider`)}),(0,N.jsx)(`select`,{"aria-label":a(`run.provider`),value:C,onChange:e=>{p(e.target.value),v(``)},className:`w-full text-xs rounded border border-border bg-transparent px-2 py-1 text-foreground focus:outline-none focus:ring-1 focus:ring-accent-primary/40`,children:S.map(e=>(0,N.jsx)(`option`,{value:e,children:e},e))})]}),w.length>0&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`label`,{className:`block text-[11px] font-medium text-muted-foreground`,children:a(`run.model`)}),(0,N.jsx)(`select`,{"aria-label":a(`run.model`),"data-testid":`run-model-select`,value:E,onChange:e=>v(e.target.value),className:`w-full text-xs rounded border border-border bg-transparent px-2 py-1 text-foreground focus:outline-none focus:ring-1 focus:ring-accent-primary/40`,children:w.map(e=>(0,N.jsx)(`option`,{value:e.value,children:e.label},e.value))})]}),O&&(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(`label`,{className:`block text-[11px] font-medium text-muted-foreground`,children:a(`run.effort`)}),(0,N.jsxs)(`select`,{"aria-label":a(`run.effort`),value:b,onChange:e=>te(e.target.value),className:`w-full text-xs rounded border border-border bg-transparent px-2 py-1 text-foreground focus:outline-none focus:ring-1 focus:ring-accent-primary/40`,children:[(0,N.jsx)(`option`,{value:`low`,children:`low`}),(0,N.jsx)(`option`,{value:`medium`,children:`medium`}),(0,N.jsx)(`option`,{value:`high`,children:`high`})]})]}),(0,N.jsxs)(c,{children:[(0,N.jsx)(T,{variant:`ghost`,onClick:n,children:a(`common:actions.cancel`)}),(0,N.jsxs)(T,{onClick:()=>{let e=l||t[0]?.id;e&&r({projectId:e,provider:S.length>1?C:void 0,model:w.length>0?E:void 0,effort:O?b:void 0})},disabled:t.length===0,children:[(0,N.jsx)(i,{className:`w-3.5 h-3.5 mr-1.5`}),a(`run.execute`)]})]})]})})})}var P={draft:`bg-accent-secondary/15 text-accent-secondary ring-accent-secondary/40`,published:`bg-accent-success/15 text-accent-success ring-accent-success/40`};function F({status:e}){let{t}=h(`loops`);return(0,N.jsx)(`span`,{className:O(`inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium ring-1 ring-inset`,P[e]),children:t(`status.${e}`)})}function I(){let{t:e}=h(`loops`),t=s(),n=(0,A.useCallback)(e=>e.replace(/:/g,`_`),[]),i=(0,A.useCallback)((t,r)=>e(`catalog.${n(t)}.name`,{defaultValue:r}),[e,n]),d=(0,A.useCallback)((t,r)=>e(`catalog.${n(t)}.description`,{defaultValue:r}),[e,n]),[m,g]=(0,A.useState)([]),[x,S]=(0,A.useState)([]),[k,j]=(0,A.useState)([]),[M,P]=(0,A.useState)(!0),[F,I]=(0,A.useState)(null),[z,B]=(0,A.useState)(null),[V,H]=(0,A.useState)(`use`),[U,W]=(0,A.useState)(null),[G,fe]=(0,A.useState)(new Set),K=`specrails-desktop:loop-template-filter`,pe=(()=>{try{let e=localStorage.getItem(K),t=e?JSON.parse(e):null;return{query:typeof t?.query==`string`?t.query:``,categories:Array.isArray(t?.categories)?t.categories:[]}}catch{return{query:``,categories:[]}}})(),[q,me]=(0,A.useState)(pe.query),[J,he]=(0,A.useState)(pe.categories);(0,A.useEffect)(()=>{try{localStorage.setItem(K,JSON.stringify({query:q,categories:J}))}catch{}},[q,J]);let ge=(0,A.useCallback)(e=>{he(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[]),_e=(0,A.useCallback)(()=>{me(``),he([])},[]),ve=(0,A.useRef)(null),{projects:ye,setActiveProjectId:be}=ne(),xe=(0,A.useCallback)(e=>{fe(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),Y=(0,A.useCallback)(e=>{if(e.length===0)return;let t=new Blob([JSON.stringify(oe(e),null,2)],{type:`application/json`}),n=URL.createObjectURL(t),r=document.createElement(`a`);r.href=n,r.download=ce(e),r.click(),URL.revokeObjectURL(n)},[]),X=(0,A.useCallback)(async()=>{try{let[e,t]=await Promise.all([p.list(),p.templates()]);g(e),S(t)}catch{f.error(e(`errors.load`))}finally{P(!1)}try{j(await p.factoryLoops())}catch{j([])}},[e]);(0,A.useEffect)(()=>{X()},[X]);let Se=(0,A.useCallback)(async t=>{try{let n=se(await t.text()),{imported:r,skipped:i}=await p.importLoops(n);await X(),r.length&&f.success(e(`import.done`,{count:r.length})),i.length&&f.warning(e(`import.skipped`,{count:i.length,names:i.join(`, `)})),!r.length&&!i.length&&f.warning(e(`import.invalid`))}catch(t){let n=t instanceof Error?t.message:``;f.error(e(n===`invalid-json`||n===`no-loops`?`import.invalid`:`errors.save`))}},[X,e]),Z=(0,A.useCallback)(e=>t(`/loops/${e}/edit`),[t]),Ce=(0,A.useCallback)(async()=>{try{Z((await p.create({name:e(`newLoopName`)})).id)}catch{f.error(e(`errors.save`))}},[e,Z]),we=(0,A.useCallback)(async t=>{try{Z((await p.fromTemplate(t)).id)}catch{f.error(e(`errors.save`))}},[e,Z]),Te=(0,A.useCallback)(async t=>{try{Z((await p.forkFactory(t)).id)}catch{f.error(e(`errors.save`))}},[e,Z]),Ee=(0,A.useCallback)(async({projectId:n,provider:r,model:i,effort:a})=>{let o=U;if(o){W(null);try{let{loopRunId:s}=await p.runStandalone(n,o.id,{aiEngine:r,model:i,reasoning_effort:a});be(n),t(`/jobs/${s}`),f.success(e(`run.launched`,{name:o.name}))}catch{f.error(e(`errors.save`))}}},[U,t,be,e]),De=(0,A.useCallback)(e=>{H(`fork`),B({id:e.id,name:i(e.id,e.name),description:d(e.id,e.description),tags:e.claudeOnly?[`claude-only`]:[],graph:e.graph})},[i,d]),Oe=(0,A.useCallback)(async t=>{try{await p.publish(t),await X()}catch(t){t instanceof r?f.error(e(`errors.publishInvalid`)):f.error(e(`errors.save`))}},[e,X]),ke=(0,A.useCallback)(async t=>{try{await p.unpublish(t),await X()}catch{f.error(e(`errors.save`))}},[e,X]),Ae=(0,A.useCallback)(async t=>{try{await p.duplicate(t),await X()}catch{f.error(e(`errors.save`))}},[e,X]),je=(0,A.useCallback)(e=>I(e),[]),Me=(0,A.useCallback)(async()=>{let t=F;if(t){I(null);try{await p.remove(t),await X()}catch{f.error(e(`errors.save`))}}},[F,e,X]),Q=m.filter(e=>e.status===`draft`),$=m.filter(e=>e.status===`published`),Ne=ue(x),Pe=le(x.map(t=>({...t,searchTerms:`${i(t.id,t.name)} ${d(t.id,t.description)} ${t.category?e(`categories.${t.category}`,{defaultValue:t.category}):``}`})),{query:q,categories:J}),Fe=q.trim()!==``||J.length>0;return(0,N.jsxs)(`div`,{className:`h-full overflow-y-auto`,children:[(0,N.jsxs)(`div`,{className:`max-w-5xl mx-auto px-6 py-6`,children:[(0,N.jsxs)(`div`,{className:`flex items-start justify-between mb-6`,children:[(0,N.jsxs)(`div`,{className:`flex items-center gap-2.5`,children:[(0,N.jsx)(E,{className:`w-5 h-5 text-accent-primary`}),(0,N.jsxs)(`div`,{children:[(0,N.jsx)(`h1`,{className:`text-lg font-semibold text-foreground`,children:e(`title`)}),(0,N.jsx)(`p`,{className:`text-xs text-muted-foreground mt-0.5`,children:e(`subtitle`)})]})]}),(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[G.size>0&&(0,N.jsxs)(`button`,{type:`button`,onClick:()=>Y(m.filter(e=>G.has(e.id))),className:`inline-flex items-center gap-1.5 h-8 px-3 rounded-md text-xs font-medium border border-border text-foreground hover:bg-muted`,children:[(0,N.jsx)(ie,{className:`w-3.5 h-3.5`}),e(`actions.export`),` (`,G.size,`)`]}),(0,N.jsxs)(`button`,{type:`button`,onClick:()=>ve.current?.click(),className:`inline-flex items-center gap-1.5 h-8 px-3 rounded-md text-xs font-medium border border-border text-foreground hover:bg-muted`,children:[(0,N.jsx)(ae,{className:`w-3.5 h-3.5`}),e(`actions.import`)]}),(0,N.jsx)(`input`,{ref:ve,type:`file`,accept:`application/json,.json`,className:`hidden`,onChange:e=>{let t=e.target.files?.[0];t&&Se(t),e.target.value=``}}),(0,N.jsxs)(`button`,{type:`button`,onClick:Ce,className:`inline-flex items-center gap-1.5 h-8 px-3 rounded-md text-xs font-medium bg-accent-primary text-white hover:bg-accent-primary/90`,children:[(0,N.jsx)(_,{className:`w-3.5 h-3.5`}),e(`newLoop`)]})]})]}),M?(0,N.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`…`}):(0,N.jsxs)(`div`,{className:`space-y-8`,children:[Q.length===0&&$.length===0&&(0,N.jsxs)(`div`,{className:`rounded-lg border border-dashed border-border p-8 text-center`,children:[(0,N.jsx)(`p`,{className:`text-sm font-medium text-foreground`,children:e(`empty.title`)}),(0,N.jsx)(`p`,{className:`text-xs text-muted-foreground mt-1`,children:e(`empty.body`)})]}),$.length>0&&(0,N.jsx)(L,{title:e(`sections.published`),children:$.map(e=>(0,N.jsx)(R,{loop:e,selected:G.has(e.id),onToggleSelect:()=>xe(e.id),onEdit:()=>Z(e.id),onUnpublish:()=>ke(e.id),onDuplicate:()=>Ae(e.id),onExport:()=>Y([e]),onDelete:()=>je(e.id),onRun:a(e.graph)?void 0:()=>W(e)},e.id))}),Q.length>0&&(0,N.jsx)(L,{title:e(`sections.drafts`),children:Q.map(e=>(0,N.jsx)(R,{loop:e,selected:G.has(e.id),onToggleSelect:()=>xe(e.id),onEdit:()=>Z(e.id),onPublish:()=>Oe(e.id),onDuplicate:()=>Ae(e.id),onExport:()=>Y([e]),onDelete:()=>je(e.id)},e.id))}),k.length>0&&(0,N.jsx)(L,{title:e(`sections.builtIn`),children:k.map(t=>(0,N.jsxs)(`div`,{className:`rounded-lg border border-border bg-card p-3 flex flex-col gap-2`,"data-testid":`factory-loop-card`,children:[(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(E,{className:`w-3.5 h-3.5 text-accent-primary`}),(0,N.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:i(t.id,t.name)}),(0,N.jsx)(`span`,{className:`ml-auto px-1.5 py-0.5 rounded text-[10px] bg-muted text-muted-foreground`,children:e(`builtInBadge`)})]}),(0,N.jsx)(`p`,{className:`text-xs text-muted-foreground flex-1`,children:d(t.id,t.description)}),(0,N.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,N.jsxs)(`button`,{type:`button`,onClick:()=>De(t),className:`inline-flex items-center gap-1.5 h-7 px-2.5 rounded-md text-xs border border-border hover:bg-muted text-foreground`,children:[(0,N.jsx)(l,{className:`w-3 h-3`}),e(`actions.preview`)]}),(0,N.jsxs)(`button`,{type:`button`,onClick:()=>void Te(t.id),className:`inline-flex items-center gap-1.5 h-7 px-2.5 rounded-md text-xs border border-border hover:bg-muted text-foreground`,children:[(0,N.jsx)(b,{className:`w-3 h-3`}),e(`actions.fork`)]})]})]},t.id))}),x.length>0&&(0,N.jsxs)(`section`,{children:[(0,N.jsxs)(`div`,{className:`flex items-center justify-between gap-3 mb-2 flex-wrap`,children:[(0,N.jsx)(`h2`,{className:`text-xs font-semibold uppercase tracking-wide text-muted-foreground`,children:e(`sections.templates`)}),(0,N.jsx)(`input`,{type:`search`,value:q,onChange:e=>me(e.target.value),placeholder:e(`gallery.search`),"aria-label":e(`gallery.search`),"data-testid":`template-search`,className:`h-7 w-48 max-w-full rounded-md border border-border bg-surface/40 px-2.5 text-xs text-foreground placeholder:text-muted-foreground/70 focus:outline-none focus:ring-1 focus:ring-accent-primary`})]}),(0,N.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1.5 mb-3`,"data-testid":`category-chips`,children:[Ne.map(({category:t,count:n})=>{let r=J.includes(t);return(0,N.jsxs)(`button`,{type:`button`,"aria-pressed":r,onClick:()=>ge(t),className:O(`inline-flex items-center gap-1 h-6 px-2 rounded-full text-[11px] border transition-colors`,r?`border-accent-primary bg-accent-primary/15 text-accent-primary`:`border-border bg-surface/40 text-muted-foreground hover:text-foreground hover:bg-muted`),children:[e(`categories.${t}`,{defaultValue:t}),(0,N.jsx)(`span`,{className:`opacity-60 tabular-nums`,children:n})]},t)}),Fe&&(0,N.jsx)(`button`,{type:`button`,onClick:_e,className:`inline-flex items-center h-6 px-2 rounded-full text-[11px] text-accent-primary hover:underline`,children:e(`gallery.clearFilter`)})]}),Pe.length===0?(0,N.jsxs)(`div`,{className:`rounded-lg border border-dashed border-border p-6 text-center`,"data-testid":`template-empty`,children:[(0,N.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:e(`gallery.noResults`)}),(0,N.jsx)(`button`,{type:`button`,onClick:_e,className:`mt-2 text-xs text-accent-primary hover:underline`,children:e(`gallery.clearFilter`)})]}):(0,N.jsx)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3`,children:Pe.map(t=>(0,N.jsxs)(`div`,{className:`rounded-lg border border-border bg-card p-3 flex flex-col gap-2`,"data-testid":`template-card`,children:[(0,N.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,N.jsx)(w,{className:`w-3.5 h-3.5 text-accent-highlight flex-shrink-0`}),(0,N.jsx)(`span`,{className:`text-sm font-medium text-foreground truncate`,children:i(t.id,t.name)}),t.category&&(0,N.jsx)(`span`,{className:`ml-auto px-1.5 py-0.5 rounded text-[10px] bg-accent-info/15 text-accent-info flex-shrink-0`,children:e(`categories.${t.category}`,{defaultValue:t.category})})]}),(0,N.jsx)(`p`,{className:`text-xs text-muted-foreground flex-1`,children:d(t.id,t.description)}),(0,N.jsxs)(`div`,{className:`flex flex-wrap items-center gap-1`,children:[a(t.graph)?(0,N.jsx)(`span`,{title:e(`gallery.needsSpecHint`),className:`px-1.5 py-0.5 rounded text-[10px] bg-accent-secondary/15 text-accent-secondary`,children:e(`gallery.needsSpec`)}):(0,N.jsx)(`span`,{title:e(`gallery.standaloneHint`),className:`px-1.5 py-0.5 rounded text-[10px] bg-accent-success/15 text-accent-success`,children:e(`gallery.standalone`)}),t.tags.map(e=>(0,N.jsx)(`span`,{className:`px-1.5 py-0.5 rounded text-[10px] bg-muted text-muted-foreground`,children:e},e))]}),(0,N.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,N.jsxs)(`button`,{type:`button`,onClick:()=>{H(`use`),B({...t,name:i(t.id,t.name),description:d(t.id,t.description)})},className:`inline-flex items-center gap-1.5 h-7 px-2.5 rounded-md text-xs border border-border hover:bg-muted text-foreground`,children:[(0,N.jsx)(l,{className:`w-3 h-3`}),e(`actions.preview`)]}),(0,N.jsxs)(`button`,{type:`button`,onClick:()=>we(t.id),className:`inline-flex items-center gap-1.5 h-7 px-2.5 rounded-md text-xs border border-border hover:bg-muted text-foreground`,children:[(0,N.jsx)(v,{className:`w-3 h-3`}),e(`actions.use`)]})]})]},t.id))})]})]})]}),(0,N.jsx)(o,{open:F!==null,onOpenChange:e=>{e||I(null)},children:(0,N.jsxs)(u,{className:`max-w-sm`,children:[(0,N.jsxs)(y,{children:[(0,N.jsxs)(ee,{className:`flex items-center gap-2`,children:[(0,N.jsx)(C,{className:`w-4 h-4 text-destructive`}),m.find(e=>e.id===F)?.name??e(`actions.delete`)]}),(0,N.jsx)(D,{children:e(`confirmDelete`)})]}),(0,N.jsxs)(c,{children:[(0,N.jsx)(T,{variant:`ghost`,onClick:()=>I(null),children:e(`common:actions.cancel`)}),(0,N.jsx)(T,{variant:`destructive`,onClick:()=>void Me(),children:e(`common:actions.delete`)})]})]})}),(0,N.jsx)(re,{template:z,mode:V,onClose:()=>B(null),onUse:e=>{B(null),V===`fork`?Te(e):we(e)}}),(0,N.jsx)(de,{loop:U?{id:U.id,name:U.name}:null,projects:ye.map(e=>({id:e.id,name:e.name,providers:te(e)})),onClose:()=>W(null),onExecute:Ee})]})}function L({title:e,children:t}){return(0,N.jsxs)(`section`,{children:[(0,N.jsx)(`h2`,{className:`text-xs font-semibold uppercase tracking-wide text-muted-foreground mb-2`,children:e}),(0,N.jsx)(`div`,{className:`grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3`,children:t})]})}function R({loop:e,selected:n,onToggleSelect:r,onEdit:a,onPublish:o,onUnpublish:s,onDuplicate:c,onExport:l,onDelete:u,onRun:d}){let{t:f}=h(`loops`),p=e.graph?.nodes?.length??0;return(0,N.jsxs)(`div`,{className:`rounded-lg border border-border bg-card p-3 flex flex-col gap-2`,"data-testid":`loop-card`,children:[(0,N.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,N.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,N.jsx)(`input`,{type:`checkbox`,checked:n,onChange:r,"aria-label":f(`actions.select`,{name:e.name}),className:`accent-accent-primary flex-shrink-0`}),(0,N.jsx)(`span`,{className:`text-sm font-medium text-foreground truncate`,children:e.name})]}),(0,N.jsx)(F,{status:e.status})]}),(0,N.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:f(`card.nodes`,{count:p})}),(0,N.jsxs)(`div`,{className:`flex items-center gap-1 flex-wrap`,children:[d&&(0,N.jsx)(z,{icon:i,label:f(`actions.run`),onClick:d}),(0,N.jsx)(z,{icon:S,label:f(`actions.edit`),onClick:a}),o&&(0,N.jsx)(z,{icon:t,label:f(`actions.publish`),onClick:o}),s&&(0,N.jsx)(z,{icon:v,label:f(`actions.unpublish`),onClick:s}),(0,N.jsx)(z,{icon:b,label:f(`actions.duplicate`),onClick:c}),(0,N.jsx)(z,{icon:ie,label:f(`actions.export`),onClick:l}),(0,N.jsx)(z,{icon:C,label:f(`actions.delete`),onClick:u,danger:!0})]})]})}function z({icon:e,label:t,onClick:n,danger:r}){return(0,N.jsx)(`button`,{type:`button`,onClick:n,title:t,"aria-label":t,className:O(`inline-flex items-center justify-center w-7 h-7 rounded-md transition-colors`,r?`text-muted-foreground hover:text-destructive hover:bg-destructive/10`:`text-muted-foreground hover:text-foreground hover:bg-muted`),children:(0,N.jsx)(e,{className:`w-3.5 h-3.5`})})}export{I as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./chunk-BNv3lrIs.js";import{Cn as t,G as n,K as r,Kn as i,Rn as a,X as o,Y as s,d as c,f as l,gt as u,hn as d,ht as f,m as p,p as m,pt as h,q as g,rt as _,st as v,vn as y}from"./index-Dw1N2-ci.js";var b=e(i(),1),x=t(),S=[{id:`general`,icon:f,labelKey:`projectDialog.nav.general`},{id:`budget`,icon:v,labelKey:`projectDialog.nav.budget`},{id:`telemetry`,icon:d,labelKey:`projectDialog.nav.telemetry`},{id:`terminal`,icon:h,labelKey:`projectDialog.nav.terminal`}];function C({open:e,onClose:t}){let{t:i}=a(`settings`),{activeProjectId:d,projects:f}=y(),h=f.find(e=>e.id===d),[v,C]=(0,b.useState)(`general`),w=e=>_(`space-y-5`,v===e?``:`hidden`);return(0,x.jsx)(n,{open:e,onOpenChange:e=>{e||t()},children:(0,x.jsxs)(r,{movableResizable:!0,className:`flex max-w-5xl w-[92vw] h-[82vh] flex-col overflow-hidden`,children:[(0,x.jsxs)(s,{children:[(0,x.jsxs)(o,{className:`flex items-center gap-2`,children:[(0,x.jsx)(u,{className:`w-4 h-4`}),h?i(`projectDialog.title`,{name:h.name}):i(`page.title`)]}),(0,x.jsx)(g,{children:i(`projectDialog.description`)})]}),(0,x.jsxs)(`div`,{className:`flex min-h-0 flex-1 gap-5 py-2`,children:[(0,x.jsx)(`nav`,{className:`w-40 shrink-0 space-y-0.5 overflow-y-auto border-r border-border pr-2`,children:S.map(e=>{let t=e.icon;return(0,x.jsxs)(`button`,{type:`button`,onClick:()=>C(e.id),className:_(`flex w-full items-center gap-2 rounded-lg px-2.5 py-1.5 text-left text-xs transition-colors`,v===e.id?`bg-accent-primary/15 font-medium text-foreground`:`text-muted-foreground hover:bg-muted/40 hover:text-foreground`),children:[(0,x.jsx)(t,{className:`w-3.5 h-3.5 shrink-0`}),(0,x.jsx)(`span`,{className:`truncate`,children:i(e.labelKey)})]},e.id)})}),(0,x.jsxs)(`div`,{className:`min-w-0 flex-1 overflow-y-auto pr-1`,children:[(0,x.jsx)(`div`,{className:w(`general`),children:(0,x.jsx)(l,{})}),(0,x.jsx)(`div`,{className:w(`budget`),children:(0,x.jsx)(c,{})}),(0,x.jsx)(`div`,{className:w(`telemetry`),children:(0,x.jsx)(m,{})}),(0,x.jsx)(`div`,{className:w(`terminal`),children:(0,x.jsx)(p,{mode:`project`})})]})]})]})})}export{C as ProjectSettingsDialog};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=`Missionszentrale`,t=`Specrails per Chat bedienen`,n=`Missionszentrale`,r=`Bitte den Agenten um alles…`,i=`Senden`,a=`Stopp`,o=`Kopieren`,s=`Maximieren`,c=`Wiederherstellen`,l=`Minimieren`,u=`Schließen`,d=`Neue Mission`,f=`Wie lautet die Mission?`,p=`Wähle ein Projekt und frag dann. Das Board aktualisiert sich live, während der Agent arbeitet.`,m=`Denkt nach…`,h=`Verbinden…`,g=`App wird abgefragt…`,_={compact:`Kompakt`,comfortable:`Komfortabel`,max:`Maximieren`},v={label:`Modell`},y={hint:`Verlauf durchsuchen — tippen zum Bearbeiten, ↑↓ zum Navigieren`},b={queued:`In Warteschlange`,send:`In Warteschlange senden`,sendHint:`Der Agent arbeitet noch — diese Nachricht wird eingereiht und danach ausgeführt`,placeholder:`Mehr hinzufügen, während der Agent arbeitet — wird eingereiht…`},x={editing:`Bearbeite eingereihte Nachricht {{n}} von {{m}}`,hint:`↑↓ zum Navigieren · Enter speichert · Esc bricht ab`,save:`Eingereihte Nachricht speichern`,cancel:`Bearbeitung abbrechen`,dispatched:`Diese eingereihte Nachricht wurde bereits gesendet — dein Text bleibt als Entwurf erhalten`,saveFailed:`Eingereihte Nachricht konnte nicht gespeichert werden`},S={branch:`Branch`,detached:`(detached)`,dirty:`Nicht committete Änderungen`,switched:`Zu {{branch}} gewechselt`,switchFailed:`Branch-Wechsel fehlgeschlagen`,lockedWhileWorking:`Branch gesperrt, während der Agent arbeitet`,searchPlaceholder:`Branches durchsuchen…`,noMatches:`Keine passenden Branches`,worktrees:`Worktrees`,worktreePathCopied:`Worktree-Pfad kopiert`,copyWorktreePath:`Worktree-Pfad kopieren`},C={label:`Anbieter`,claude:`Claude`,codex:`Codex`,gemini:`Gemini`},w={cycleHint:`⇧⇥ zum Wechseln`,observe:{name:`Beobachten`,desc:`Nur lesen — nichts ändert sich`},edit:{name:`Bearbeiten`,desc:`Erstellen und bearbeiten (umkehrbar)`},operate:{name:`Ausführen`,desc:`KI starten — kostet Geld`},autonomous:{name:`Autonom`,desc:`Löschen und beenden — unumkehrbar`},lockedTitle:`Höhere Stufe erforderlich`,lockedBody:`Diese Aktion erfordert die Stufe „{{level}}“. Du bist auf „{{current}}“.`,raiseHint:`⇧⇥ um die Stufe zu erhöhen, oder frag anders.`},T={title:`Aktion bestätigen`,costAction:`{{action}} · ~{{cost}} · {{tier}}`,approve:`Genehmigen`,cancel:`Abbrechen`,dontAskAgain:`In dieser Sitzung nicht mehr fragen`,approved:`Genehmigt`,cancelled:`Abgebrochen`},E={home:`Start`,searchPlaceholder:`Mit Specrails sprechen…`,recents:`Zuletzt verwendet`,allProjects:`Alle Projekte`,searchAll:`In allen Projekten suchen`,addProject:`Projekt hinzufügen…`,homeHint:`Kein Projekt ausgewählt — über alle Projekte hinweg.`,askCreateOrSearch:`Es ist kein Projekt ausgewählt. Möchtest du ein neues Projekt erstellen oder über alle Projekte hinweg suchen?`},D={remove:`{{label}} entfernen`,addContextAction:`Kontext oder Aktion hinzufügen`,filtering:`Filtere "{{query}}"`,keyboard:`↑↓ Enter Esc`,noMatches:`Keine Treffer`,noMatchesFor:`Keine Treffer für "{{query}}"`,mode:{reference:{title:`Referenz`,hint:`@ Projekte, Specs, Missionen`},trace:{title:`Trace`,hint:`# Jobs, Läufe, IDs`},action:{title:`Aktion`,hint:`/ Befehle für diesen Kontext`}},plus:{reference:`Referenz`,referenceHint:`Projekte, Specs, Missionen`,trace:`Trace`,traceHint:`Jobs, Läufe, IDs`,action:`Aktion`,actionHint:`Erstellen, starten, prüfen`,fileAttachment:`Dateianhang`,fileAttachmentHint:`Docs, Bilder, Logs hinzufügen`,browserCapture:`Browser-Aufnahme`,browserCaptureHint:`Im Workspace-Browser verfügbar`}},O={label:`Mission wechseln`,untitled:`Neue Mission`,new:`Neue Mission`,searchPlaceholder:`Missionen durchsuchen…`,noMatches:`Keine Mission gefunden`,working:`Agent arbeitet`,queuedBadge:`{{n}} in Warteschlange`,delete:`Mission "{{title}}" löschen`,deleteConfirm:`Löschen?`,deleteLiveConfirm:`Der Agent arbeitet — trotzdem löschen?`,confirmDelete:`Löschen bestätigen`,cancelDelete:`Mission behalten`,deleteFailed:`Mission konnte nicht gelöscht werden`},k={title:`Kein KI-Anbieter installiert`,body:`Der Agent benötigt Claude, Codex oder Gemini auf deinem Rechner. Installiere einen und öffne den Agenten erneut, um zu chatten.`,placeholder:`Installiere einen KI-Anbieter, um den Agenten zu nutzen…`},A={title:`Specrails MCP ist aus`,body:`Der Agent braucht den eingebetteten MCP-Server, um die App zu bedienen.`,enable:`Specrails MCP aktivieren`,enabling:`Wird aktiviert…`,enabled:`MCP aktiviert`},j={live:`live`,queued:`in Warteschlange`,running:`läuft`,done:`fertig`,failed:`fehlgeschlagen`},M={generic:`Etwas ist schiefgelaufen. Versuch es erneut.`,busy:`Der Agent ist beschäftigt. Versuch es gleich noch einmal.`},N={kindAgent:`Agenten-Mission`},P=`Neue Mission`,F=`Zur Missionszentrale wechseln`,I=`Zum Board wechseln`,L=`Suchen`,R=`Start`,z=`Lieblingsmissionen`,B=`Ohne Titel`,V={title:`Im Workspace`,terminal:`Terminal`,files:`Dateien`,browser:`Browser`,requiresProject:`Wähle ein Projekt, um dieses Tool zu nutzen`,resizeCode:`Code-Bereich anpassen`,closeFiles:`Code schließen`,browserConfirm:`Zum Agenten hinzufügen`,browserCaptured:`Aufnahme hinzugefügt`,uploadFailed:`Upload fehlgeschlagen`,requiresConversation:`Starte eine Mission, um dieses Werkzeug zu nutzen`,jobs:`Jobs`,closeJobs:`Jobs schließen`,resizeJobs:`Jobs-Bereich anpassen`,noJobs:`Noch keine Jobs — bitte den Agenten, einen zu starten`},H=`Datei anhängen`,U=`„{{title}}“ löschen`,W=`Löschen von „{{title}}“ bestätigen`,G=`„{{title}}“ zu Favoriten hinzufügen`,K=`„{{title}}“ aus Favoriten entfernen`,q=`bestätigen?`,J=`Dieser Anbieter kann noch keine Bilder lesen — hänge stattdessen Textdateien an`,Y={label:`Aufwand`,minimal:`Minimal`,low:`Niedrig`,medium:`Mittel`,high:`Hoch`,xhigh:`Sehr hoch`},X={rail:`Rail {{index}}`,specCount_one:`{{count}} Spec`,specCount_other:`{{count}} Specs`,base:`Basis-Branch`,openPr:`PR öffnen`,existingPr:`Bestehender PR`,title:{building:`Implementierung in einem isolierten Worktree…`,buildingExistingPr:`Änderungen werden auf einen bestehenden PR angewendet…`,on_review:`Implementierung bereit zur Prüfung`,pr_draft:`Entwurfs-PR erstellt`,pr_draft_degraded:`PR-Auslieferung unvollständig`,pr_ready:`PR bereit zum Merge`,pr_failed:`PR-Erstellung fehlgeschlagen`,merged:`PR gemergt`,discarded:`Verworfen`},buildingHint:`Nach Abschluss wirst du gefragt, ob der PR erstellt werden soll.`,buildingExistingPrHint:`Specrails arbeitet auf dem Branch des bestehenden PRs und pusht die Review-Änderungen zurück in denselben PR.`,createPr:`PR erstellen`,publish:`Veröffentlichen`,checkout:`Checkout`,checkoutTooltip:`Den Hauptordner des Projekts auf {{branch}} auschecken`,checkoutSuccess:`{{branch}} ausgecheckt`,checkoutFailed:`PR-Branch konnte nicht ausgecheckt werden`,retry:`Erneut versuchen`,retryPr:`PR erneut versuchen`,checkMerge:`Merge prüfen`,discard:`Verwerfen`,confirmDiscard:`Verwerfen bestätigen?`,mergedNote:`Gemergt — Specs nach Fertig verschoben`,discardedNote:`Verworfen — Specs zurück ins Backlog`,degraded:{pushed:`Der Branch wurde gepusht, aber die PR konnte nicht erstellt werden — erneut versuchen, um abzuschließen.`,localOnly:`Die Änderungen wurden lokal zusammengeführt, aber nicht gepusht — erneut versuchen, um die PR zu veröffentlichen.`},alreadyResolved:`Bereits anderweitig erledigt`,actionFailed:`Aktion fehlgeschlagen`,notMergedYet:`Noch nicht gemergt`,viewLog:`Ausführungsprotokoll für {{ref}} anzeigen`,runElapsedAria:`{{elapsed}} vergangen`,runCostAria:`{{cost}} ausgegeben`,pinned:{label:`Angeheftet`,marker:`Implementierungskarte — oben angeheftet`,collapse:`Angeheftete Karte minimieren`,expand:`Angeheftete Karte ausklappen`,expandCard:`Diese Karte ausklappen`,collapseCard:`Diese Karte minimieren`,collapsed_one:`Implementierungskarte`,collapsed_other:`{{count}} Implementierungskarten`,state:{building:`Läuft`,on_review:`Review`,pr_draft:`Entwurfs-PR`,pr_ready:`Veröffentlicht`,pr_failed:`Fehlgeschlagen`,merged:`Gemerged`,discarded:`Verworfen`}},mergeLocal:`Lokal integrieren`,mergeLocalTooltip:`Führt die gelieferten Branches lokal in {{base}} zusammen (ohne GitHub)`,mergeLocalBlockedDirty:`Integration nicht möglich: dein Arbeitsverzeichnis auf {{base}} hat uncommittete Änderungen. Committe oder stashe sie und versuche es erneut.`,mergeLocalBlockedBranch:`Integration nicht möglich: dein Checkout steht auf {{current}}, nicht auf {{base}}. Wechsle zu {{base}} und versuche es erneut.`,mergedLocally:`Lokal in {{base}} integriert`},Z={heading:`Spec-Entwurf`,drafting:`Entwurf wird aktualisiert…`,acceptanceCriteria:`Akzeptanzkriterien`,untitled:`Spec ohne Titel`,expand:`Vollständige Beschreibung anzeigen`,collapse:`Beschreibung einklappen`},Q={openTicket:`Spec #{{id}} öffnen`,openPullRequest:`PR #{{id}} öffnen`,openJob:`Job {{id}} öffnen`,openLoop:`Loop {{id}} öffnen`,ticketNotFound:`Spec #{{id}} nicht gefunden — möglicherweise gelöscht`,pullRequestUrlMissing:`PR #{{id}} wurde ohne URL erwähnt`,pullRequestNotFound:`PR #{{id}} wurde in diesem Projekt nicht gefunden`,jobNotFound:`Job nicht gefunden — möglicherweise gelöscht`,loopNotFound:`Loop nicht gefunden — er wurde möglicherweise gelöscht`,lookupFailed:`Referenz konnte nicht geprüft werden — bitte erneut versuchen`},$={untitled:`Unbenannte Mission`,menu:`Missionsmenü`,rename:`Umbenennen`,renamePlaceholder:`Name der Mission`,renameHint:`Zum Umbenennen doppelklicken`,renameFailed:`Umbenennen fehlgeschlagen`,addFavorite:`Zu Favoriten hinzufügen`,removeFavorite:`Aus Favoriten entfernen`,copyName:`Missionsname kopieren`,copyId:`Missions-ID kopieren`,copyProject:`Projektname kopieren`,copyProjectPath:`Projektpfad kopieren`,copyFailed:`Kopieren fehlgeschlagen`,delete:`Mission löschen`,deleteConfirm:`Diese Mission löschen? Kann nicht rückgängig gemacht werden.`,deleteFailed:`Mission konnte nicht gelöscht werden`},ee=`Was sollen wir als Nächstes bauen?`,te={title:e,subtitle:t,trigger:n,composerPlaceholder:r,send:i,stop:a,copy:o,maximize:s,restore:c,minimize:l,close:u,newConversation:d,emptyTitle:f,emptyHint:p,thinking:m,connecting:h,consultingCode:g,size:_,model:v,history:y,queue:b,queueEdit:x,git:S,provider:C,tier:w,approval:T,project:E,palette:D,mission:O,noProvider:k,degraded:A,toolCard:j,error:M,chip:N,newAgent:P,switchToAgent:F,switchToKanban:I,search:L,home:R,favoriteMissions:z,untitled:B,workspace:V,attachFile:H,deleteConversation:U,confirmDeleteConversation:W,addFavoriteConversation:G,removeFavoriteConversation:K,confirmShort:q,imagesUnsupported:J,effort:Y,prCard:X,specDraft:Z,refs:Q,header:$,emptyTitleCodeRain:ee};export{G as addFavoriteConversation,T as approval,H as attachFile,N as chip,u as close,r as composerPlaceholder,W as confirmDeleteConversation,q as confirmShort,h as connecting,g as consultingCode,o as copy,te as default,A as degraded,U as deleteConversation,Y as effort,p as emptyHint,f as emptyTitle,ee as emptyTitleCodeRain,M as error,z as favoriteMissions,S as git,$ as header,y as history,R as home,J as imagesUnsupported,s as maximize,l as minimize,O as mission,v as model,P as newAgent,d as newConversation,k as noProvider,D as palette,X as prCard,E as project,C as provider,b as queue,x as queueEdit,Q as refs,K as removeFavoriteConversation,c as restore,L as search,i as send,_ as size,Z as specDraft,a as stop,t as subtitle,F as switchToAgent,I as switchToKanban,m as thinking,w as tier,e as title,j as toolCard,n as trigger,B as untitled,V as workspace};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=`Control de misiones`,t=`Maneja Specrails conversando`,n=`Control de misiones`,r=`Pídele al agente lo que necesites…`,i=`Enviar`,a=`Detener`,o=`Copiar`,s=`Maximizar`,c=`Restaurar`,l=`Minimizar`,u=`Cerrar`,d=`Nueva misión`,f=`¿Cuál es la misión?`,p=`Elige un proyecto y luego pregunta. El tablero se actualiza en vivo mientras el agente trabaja.`,m=`Pensando…`,h=`Conectando…`,g=`Consultando la app…`,_={compact:`Compacto`,comfortable:`Cómodo`,max:`Maximizar`},v={label:`Modelo`},y={hint:`Explorando historial de prompts — escribe para editar, ↑↓ para navegar`},b={queued:`En cola`,send:`Enviar a la cola`,sendHint:`El agente sigue trabajando — este mensaje se pondrá en cola y se ejecutará después`,placeholder:`Añade más mientras el agente trabaja — se pondrá en cola…`},x={editing:`Editando mensaje en cola {{n}} de {{m}}`,hint:`↑↓ para navegar · Enter guarda · Esc cancela`,save:`Guardar mensaje en cola`,cancel:`Cancelar edición`,dispatched:`Ese mensaje en cola ya se envió — tu texto se conserva como borrador`,saveFailed:`No se pudo guardar el mensaje en cola`},S={branch:`Rama`,detached:`(detached)`,dirty:`Cambios sin commitear`,switched:`Cambiado a {{branch}}`,switchFailed:`No se pudo cambiar de rama`,lockedWhileWorking:`Rama bloqueada mientras el agente trabaja`,searchPlaceholder:`Buscar ramas…`,noMatches:`Ninguna rama coincide`,worktrees:`Worktrees`,worktreePathCopied:`Ruta del worktree copiada`,copyWorktreePath:`Copiar ruta del worktree`},C={label:`Proveedor`,claude:`Claude`,codex:`Codex`,gemini:`Gemini`},w={cycleHint:`⇧⇥ para cambiar`,observe:{name:`Observa`,desc:`Solo lectura — nada cambia`},edit:{name:`Edita`,desc:`Crear y editar (reversible)`},operate:{name:`Opera`,desc:`Lanzar IA — tiene coste`},autonomous:{name:`Autónomo`,desc:`Borrar y detener — irreversible`},lockedTitle:`Necesita un nivel superior`,lockedBody:`Esa acción necesita el nivel «{{level}}». Estás en «{{current}}».`,raiseHint:`⇧⇥ para subir el nivel, o pídelo de otra forma.`},T={title:`Confirmar acción`,costAction:`{{action}} · ~{{cost}} · {{tier}}`,approve:`Aprobar`,cancel:`Cancelar`,dontAskAgain:`No volver a preguntar en esta sesión`,approved:`Aprobado`,cancelled:`Cancelado`},E={home:`Inicio`,searchPlaceholder:`Habla con Specrails…`,recents:`Recientes`,allProjects:`Todos los proyectos`,searchAll:`Buscar en todos los proyectos`,addProject:`Añadir proyecto…`,homeHint:`Ningún proyecto seleccionado — operando en todos los proyectos.`,askCreateOrSearch:`No hay ningún proyecto seleccionado. ¿Quieres crear un proyecto nuevo o buscar en todos los proyectos?`},D={remove:`Quitar {{label}}`,addContextAction:`Añadir contexto o acción`,filtering:`Filtrando "{{query}}"`,keyboard:`↑↓ Enter Esc`,noMatches:`Sin resultados`,noMatchesFor:`Sin resultados para "{{query}}"`,mode:{reference:{title:`Referencia`,hint:`@ proyectos, especificaciones, misiones`},trace:{title:`Traza`,hint:`# jobs, ejecuciones, IDs`},action:{title:`Acción`,hint:`/ comandos para este contexto`}},plus:{reference:`Referencia`,referenceHint:`Proyectos, especificaciones, misiones`,trace:`Traza`,traceHint:`Jobs, ejecuciones, IDs`,action:`Acción`,actionHint:`Crear, lanzar, inspeccionar`,fileAttachment:`Archivo adjunto`,fileAttachmentHint:`Añadir docs, imágenes, logs`,browserCapture:`Captura del navegador`,browserCaptureHint:`Disponible desde el navegador del workspace`}},O={label:`Cambiar de misión`,untitled:`Nueva misión`,new:`Nueva misión`,searchPlaceholder:`Buscar misiones…`,noMatches:`Ninguna misión coincide`,working:`El agente está trabajando`,queuedBadge:`{{n}} en cola`,delete:`Eliminar misión "{{title}}"`,deleteConfirm:`¿Eliminar?`,deleteLiveConfirm:`El agente está trabajando — ¿eliminar igualmente?`,confirmDelete:`Confirmar eliminación`,cancelDelete:`Conservar misión`,deleteFailed:`No se pudo eliminar la misión`},k={title:`No hay ningún proveedor de IA instalado`,body:`El agente necesita Claude, Codex o Gemini en tu máquina. Instala uno y vuelve a abrir el agente para empezar a chatear.`,placeholder:`Instala un proveedor de IA para usar el agente…`},A={title:`El MCP de Specrails está apagado`,body:`El agente necesita el servidor MCP integrado para manejar la app.`,enable:`Activar el MCP de Specrails`,enabling:`Activando…`,enabled:`MCP activado`},j={live:`en vivo`,queued:`en cola`,running:`en curso`,done:`hecho`,failed:`fallido`},M={generic:`Algo salió mal. Inténtalo de nuevo.`,busy:`El agente está ocupado. Inténtalo de nuevo en un momento.`},N={kindAgent:`Misión del agente`},P=`Nueva misión`,F=`Cambiar a Control de misiones`,I=`Cambiar al tablero`,L=`Buscar`,R=`Inicio`,z=`Misiones favoritas`,B=`Sin título`,V={title:`En el workspace`,terminal:`Terminal`,files:`Archivos`,browser:`Navegador`,requiresProject:`Selecciona un proyecto para usar esta herramienta`,resizeCode:`Redimensionar panel de código`,closeFiles:`Cerrar código`,browserConfirm:`Añadir al agente`,browserCaptured:`Captura añadida`,uploadFailed:`Error al subir`,requiresConversation:`Inicia una misión para usar esta herramienta`,jobs:`Jobs`,closeJobs:`Cerrar jobs`,resizeJobs:`Redimensionar panel de jobs`,noJobs:`Aún no hay jobs — pide al agente que lance uno`},H=`Adjuntar archivo`,U=`Borrar «{{title}}»`,W=`Confirmar borrado de «{{title}}»`,G=`Añadir «{{title}}» a favoritas`,K=`Quitar «{{title}}» de favoritas`,q=`¿confirmar?`,J=`Este proveedor aún no lee imágenes — adjunta archivos de texto`,Y={label:`Esfuerzo`,minimal:`Mínimo`,low:`Bajo`,medium:`Medio`,high:`Alto`,xhigh:`Extra alto`},X={rail:`Rail {{index}}`,specCount_one:`{{count}} spec`,specCount_other:`{{count}} specs`,base:`Rama base`,openPr:`Abrir PR`,existingPr:`PR existente`,title:{building:`Implementando en un worktree aislado…`,buildingExistingPr:`Aplicando cambios sobre una PR existente…`,on_review:`Implementación lista para revisar`,pr_draft:`PR en borrador creada`,pr_draft_degraded:`Entrega de la PR incompleta`,pr_ready:`PR lista para el merge`,pr_failed:`No se pudo crear la PR`,merged:`Merge de la PR completado`,discarded:`Descartada`},buildingHint:`Cuando termine, se te preguntará si crear la PR.`,buildingExistingPrHint:`Specrails está trabajando sobre la rama de la PR existente y subirá los cambios de revisión a esa misma PR.`,createPr:`Crear PR`,publish:`Publicar`,checkout:`Checkout`,checkoutTooltip:`Cambia la carpeta principal del proyecto a {{branch}}`,checkoutSuccess:`Checkout en {{branch}}`,checkoutFailed:`No se pudo hacer checkout de la rama de la PR`,retry:`Reintentar`,retryPr:`Reintentar PR`,checkMerge:`Comprobar merge`,discard:`Descartar`,confirmDiscard:`¿Confirmar descarte?`,mergedNote:`Merge completado — las specs han pasado a Hecho`,discardedNote:`Descartada — las specs han vuelto al backlog`,degraded:{pushed:`La rama se subió pero no se pudo crear la PR — reintenta para terminar.`,localOnly:`Los cambios se ensamblaron en local pero no se subieron — reintenta para publicar la PR.`},alreadyResolved:`Ya resuelta en otro sitio`,actionFailed:`La acción falló`,notMergedYet:`Aún sin merge`,viewLog:`Ver el registro de ejecución de {{ref}}`,runElapsedAria:`{{elapsed}} transcurridos`,runCostAria:`{{cost}} gastados`,pinned:{label:`Fijada`,marker:`Tarjeta de implementación — fijada arriba`,collapse:`Minimizar tarjeta fijada`,expand:`Expandir tarjeta fijada`,expandCard:`Expandir esta tarjeta`,collapseCard:`Minimizar esta tarjeta`,collapsed_one:`Tarjeta de implementación`,collapsed_other:`{{count}} tarjetas de implementación`,state:{building:`En curso`,on_review:`Revisión`,pr_draft:`PR borrador`,pr_ready:`Publicada`,pr_failed:`Fallida`,merged:`Fusionada`,discarded:`Descartada`}},mergeLocal:`Integrar en local`,mergeLocalTooltip:`Fusiona las ramas entregadas en {{base}} en tu checkout local (sin necesidad de GitHub)`,mergeLocalBlockedDirty:`No se puede integrar: tu árbol de trabajo en {{base}} tiene cambios sin commitear. Haz commit o stash y reintenta.`,mergeLocalBlockedBranch:`No se puede integrar: tu checkout está en {{current}}, no en {{base}}. Cambia a {{base}} y reintenta.`,mergedLocally:`Integrado en {{base}} en local`},Z={heading:`Borrador de spec`,drafting:`Actualizando borrador…`,acceptanceCriteria:`Criterios de aceptación`,untitled:`Spec sin título`,expand:`Ver descripción completa`,collapse:`Contraer descripción`},Q={openTicket:`Abrir spec #{{id}}`,openPullRequest:`Abrir PR #{{id}}`,openJob:`Abrir job {{id}}`,openLoop:`Abrir loop {{id}}`,ticketNotFound:`Spec #{{id}} no encontrada — puede haber sido eliminada`,pullRequestUrlMissing:`La PR #{{id}} se mencionó sin URL`,pullRequestNotFound:`No se pudo encontrar la PR #{{id}} en este proyecto`,jobNotFound:`Job no encontrado — puede haber sido eliminado`,loopNotFound:`Loop no encontrado — puede haber sido eliminado`,lookupFailed:`No se pudo verificar la referencia — inténtalo de nuevo`},$={untitled:`Misión sin título`,menu:`Menú de la misión`,rename:`Renombrar`,renamePlaceholder:`Nombre de la misión`,renameHint:`Doble clic para renombrar`,renameFailed:`No se pudo renombrar`,addFavorite:`Añadir a favoritas`,removeFavorite:`Quitar de favoritas`,copyName:`Copiar nombre de la misión`,copyId:`Copiar ID de la misión`,copyProject:`Copiar nombre del proyecto`,copyProjectPath:`Copiar ruta del proyecto`,copyFailed:`No se pudo copiar`,delete:`Borrar misión`,deleteConfirm:`¿Borrar esta misión? No se puede deshacer.`,deleteFailed:`No se pudo borrar la misión`},ee=`¿Qué construimos ahora?`,te={title:e,subtitle:t,trigger:n,composerPlaceholder:r,send:i,stop:a,copy:o,maximize:s,restore:c,minimize:l,close:u,newConversation:d,emptyTitle:f,emptyHint:p,thinking:m,connecting:h,consultingCode:g,size:_,model:v,history:y,queue:b,queueEdit:x,git:S,provider:C,tier:w,approval:T,project:E,palette:D,mission:O,noProvider:k,degraded:A,toolCard:j,error:M,chip:N,newAgent:P,switchToAgent:F,switchToKanban:I,search:L,home:R,favoriteMissions:z,untitled:B,workspace:V,attachFile:H,deleteConversation:U,confirmDeleteConversation:W,addFavoriteConversation:G,removeFavoriteConversation:K,confirmShort:q,imagesUnsupported:J,effort:Y,prCard:X,specDraft:Z,refs:Q,header:$,emptyTitleCodeRain:ee};export{G as addFavoriteConversation,T as approval,H as attachFile,N as chip,u as close,r as composerPlaceholder,W as confirmDeleteConversation,q as confirmShort,h as connecting,g as consultingCode,o as copy,te as default,A as degraded,U as deleteConversation,Y as effort,p as emptyHint,f as emptyTitle,ee as emptyTitleCodeRain,M as error,z as favoriteMissions,S as git,$ as header,y as history,R as home,J as imagesUnsupported,s as maximize,l as minimize,O as mission,v as model,P as newAgent,d as newConversation,k as noProvider,D as palette,X as prCard,E as project,C as provider,b as queue,x as queueEdit,Q as refs,K as removeFavoriteConversation,c as restore,L as search,i as send,_ as size,Z as specDraft,a as stop,t as subtitle,F as switchToAgent,I as switchToKanban,m as thinking,w as tier,e as title,j as toolCard,n as trigger,B as untitled,V as workspace};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=`Controle de missões`,t=`Opere o Specrails conversando`,n=`Controle de missões`,r=`Peça ao agente o que quiser…`,i=`Enviar`,a=`Parar`,o=`Copiar`,s=`Maximizar`,c=`Restaurar`,l=`Minimizar`,u=`Fechar`,d=`Nova missão`,f=`Qual é a missão?`,p=`Escolha um projeto e depois pergunte. O quadro é atualizado ao vivo enquanto o agente trabalha.`,m=`Pensando…`,h=`Conectando…`,g=`Consultando o app…`,_={compact:`Compacto`,comfortable:`Confortável`,max:`Maximizar`},v={label:`Modelo`},y={hint:`Explorando histórico — escreva para editar, ↑↓ para navegar`},b={queued:`Na fila`,send:`Enviar para a fila`,sendHint:`O agente ainda está trabalhando — esta mensagem entrará na fila e será executada em seguida`,placeholder:`Adicione mais enquanto o agente trabalha — entrará na fila…`},x={editing:`Editando mensagem na fila {{n}} de {{m}}`,hint:`↑↓ para navegar · Enter salva · Esc cancela`,save:`Salvar mensagem na fila`,cancel:`Cancelar edição`,dispatched:`Essa mensagem na fila já foi enviada — seu texto foi mantido como rascunho`,saveFailed:`Não foi possível salvar a mensagem na fila`},S={branch:`Branch`,detached:`(detached)`,dirty:`Alterações sem commit`,switched:`Mudou para {{branch}}`,switchFailed:`Não foi possível trocar de branch`,lockedWhileWorking:`Branch bloqueada enquanto o agente trabalha`,searchPlaceholder:`Buscar branches…`,noMatches:`Nenhuma branch corresponde`,worktrees:`Worktrees`,worktreePathCopied:`Caminho do worktree copiado`,copyWorktreePath:`Copiar caminho do worktree`},C={label:`Provedor`,claude:`Claude`,codex:`Codex`,gemini:`Gemini`},w={cycleHint:`⇧⇥ para mudar`,observe:{name:`Observa`,desc:`Somente leitura — nada muda`},edit:{name:`Edita`,desc:`Criar e editar (reversível)`},operate:{name:`Opera`,desc:`Lançar IA — tem custo`},autonomous:{name:`Autônomo`,desc:`Excluir e encerrar — irreversível`},lockedTitle:`Precisa de um nível superior`,lockedBody:`Essa ação precisa do nível "{{level}}". Você está no "{{current}}".`,raiseHint:`⇧⇥ para aumentar o nível, ou peça de outra forma.`},T={title:`Confirmar ação`,costAction:`{{action}} · ~{{cost}} · {{tier}}`,approve:`Aprovar`,cancel:`Cancelar`,dontAskAgain:`Não perguntar de novo nesta sessão`,approved:`Aprovado`,cancelled:`Cancelado`},E={home:`Início`,searchPlaceholder:`Fale com o Specrails…`,recents:`Recentes`,allProjects:`Todos os projetos`,searchAll:`Buscar em todos os projetos`,addProject:`Adicionar projeto…`,homeHint:`Nenhum projeto selecionado — operando em todos os projetos.`,askCreateOrSearch:`Nenhum projeto está selecionado. Você quer criar um novo projeto ou buscar em todos os projetos?`},D={remove:`Remover {{label}}`,addContextAction:`Adicionar contexto ou ação`,filtering:`Filtrando "{{query}}"`,keyboard:`↑↓ Enter Esc`,noMatches:`Sem resultados`,noMatchesFor:`Sem resultados para "{{query}}"`,mode:{reference:{title:`Referência`,hint:`@ projetos, specs, missões`},trace:{title:`Traço`,hint:`# jobs, execuções, IDs`},action:{title:`Ação`,hint:`/ comandos para este contexto`}},plus:{reference:`Referência`,referenceHint:`Projetos, specs, missões`,trace:`Traço`,traceHint:`Jobs, execuções, IDs`,action:`Ação`,actionHint:`Criar, lançar, inspecionar`,fileAttachment:`Anexo de arquivo`,fileAttachmentHint:`Adicionar docs, imagens, logs`,browserCapture:`Captura do navegador`,browserCaptureHint:`Disponível no navegador do workspace`}},O={label:`Trocar de missão`,untitled:`Nova missão`,new:`Nova missão`,searchPlaceholder:`Pesquisar missões…`,noMatches:`Nenhuma missão corresponde`,working:`O agente está trabalhando`,queuedBadge:`{{n}} na fila`,delete:`Excluir missão "{{title}}"`,deleteConfirm:`Excluir?`,deleteLiveConfirm:`O agente está trabalhando — excluir mesmo assim?`,confirmDelete:`Confirmar exclusão`,cancelDelete:`Manter missão`,deleteFailed:`Não foi possível excluir a missão`},k={title:`Nenhum provedor de IA instalado`,body:`O agente precisa de Claude, Codex ou Gemini na sua máquina. Instale um e reabra o agente para começar a conversar.`,placeholder:`Instale um provedor de IA para usar o agente…`},A={title:`O MCP do Specrails está desligado`,body:`O agente precisa do servidor MCP integrado para operar o app.`,enable:`Ativar o MCP do Specrails`,enabling:`Ativando…`,enabled:`MCP ativado`},j={live:`ao vivo`,queued:`na fila`,running:`em execução`,done:`concluído`,failed:`falhou`},M={generic:`Algo deu errado. Tente novamente.`,busy:`O agente está ocupado. Tente novamente em um instante.`},N={kindAgent:`Missão do agente`},P=`Nova missão`,F=`Mudar para o Controle de missões`,I=`Mudar para o quadro`,L=`Buscar`,R=`Início`,z=`Missões favoritas`,B=`Sem título`,V={title:`No workspace`,terminal:`Terminal`,files:`Arquivos`,browser:`Navegador`,requiresProject:`Selecione um projeto para usar esta ferramenta`,resizeCode:`Redimensionar painel de código`,closeFiles:`Fechar código`,browserConfirm:`Adicionar ao agente`,browserCaptured:`Captura adicionada`,uploadFailed:`Falha no upload`,requiresConversation:`Inicie uma missão para usar esta ferramenta`,jobs:`Jobs`,closeJobs:`Fechar jobs`,resizeJobs:`Redimensionar painel de jobs`,noJobs:`Ainda não há jobs — peça ao agente para lançar um`},H=`Anexar arquivo`,U=`Excluir "{{title}}"`,W=`Confirmar exclusão de "{{title}}"`,G=`Adicionar "{{title}}" aos favoritos`,K=`Remover "{{title}}" dos favoritos`,q=`confirmar?`,J=`Este provedor ainda não lê imagens — anexe arquivos de texto`,Y={label:`Esforço`,minimal:`Mínimo`,low:`Baixo`,medium:`Médio`,high:`Alto`,xhigh:`Extra alto`},X={rail:`Rail {{index}}`,specCount_one:`{{count}} spec`,specCount_other:`{{count}} specs`,base:`Ramo base`,openPr:`Abrir PR`,existingPr:`PR existente`,title:{building:`A implementar num worktree isolado…`,buildingExistingPr:`A aplicar alterações numa PR existente…`,on_review:`Implementação pronta para revisão`,pr_draft:`PR em rascunho criada`,pr_draft_degraded:`Entrega da PR incompleta`,pr_ready:`PR pronta para merge`,pr_failed:`Falha ao criar a PR`,merged:`Merge da PR concluído`,discarded:`Descartada`},buildingHint:`Quando terminar, ser-lhe-á perguntado se quer criar a PR.`,buildingExistingPrHint:`O Specrails está a trabalhar no ramo da PR existente e irá enviar as alterações de revisão para essa mesma PR.`,createPr:`Criar PR`,publish:`Publicar`,checkout:`Checkout`,checkoutTooltip:`Fazer checkout de {{branch}} na pasta principal do projeto`,checkoutSuccess:`Checkout feito em {{branch}}`,checkoutFailed:`Não foi possível fazer checkout do ramo da PR`,retry:`Tentar novamente`,retryPr:`Tentar PR novamente`,checkMerge:`Verificar merge`,discard:`Descartar`,confirmDiscard:`Confirmar descarte?`,mergedNote:`Merge concluído — specs movidas para Concluído`,discardedNote:`Descartada — specs devolvidas ao backlog`,degraded:{pushed:`O ramo foi enviado mas não foi possível criar a PR — tente novamente para concluir.`,localOnly:`As alterações foram montadas localmente mas não enviadas — tente novamente para publicar a PR.`},alreadyResolved:`Já resolvida noutro lugar`,actionFailed:`A ação falhou`,notMergedYet:`Ainda sem merge`,viewLog:`Ver o registro de execução de {{ref}}`,runElapsedAria:`{{elapsed}} decorridos`,runCostAria:`{{cost}} gastos`,pinned:{label:`Fixada`,marker:`Cartão de implementação — fixado acima`,collapse:`Minimizar cartão fixado`,expand:`Expandir cartão fixado`,expandCard:`Expandir este cartão`,collapseCard:`Minimizar este cartão`,collapsed_one:`Cartão de implementação`,collapsed_other:`{{count}} cartões de implementação`,state:{building:`Em curso`,on_review:`Revisão`,pr_draft:`PR rascunho`,pr_ready:`Publicada`,pr_failed:`Falhou`,merged:`Integrada`,discarded:`Descartada`}},mergeLocal:`Integrar localmente`,mergeLocalTooltip:`Faz merge dos branches entregues em {{base}} no seu checkout local (sem GitHub)`,mergeLocalBlockedDirty:`Não é possível integrar: sua árvore de trabalho em {{base}} tem mudanças sem commit. Faça commit ou stash e tente de novo.`,mergeLocalBlockedBranch:`Não é possível integrar: seu checkout está em {{current}}, não em {{base}}. Mude para {{base}} e tente de novo.`,mergedLocally:`Integrado em {{base}} localmente`},Z={heading:`Rascunho da spec`,drafting:`Atualizando rascunho…`,acceptanceCriteria:`Critérios de aceitação`,untitled:`Spec sem título`,expand:`Ver descrição completa`,collapse:`Recolher descrição`},Q={openTicket:`Abrir spec #{{id}}`,openPullRequest:`Abrir PR #{{id}}`,openJob:`Abrir job {{id}}`,openLoop:`Abrir loop {{id}}`,ticketNotFound:`Spec #{{id}} não encontrada — pode ter sido excluída`,pullRequestUrlMissing:`A PR #{{id}} foi mencionada sem URL`,pullRequestNotFound:`A PR #{{id}} não foi encontrada neste projeto`,jobNotFound:`Job não encontrado — pode ter sido excluído`,loopNotFound:`Loop não encontrado — pode ter sido excluído`,lookupFailed:`Não foi possível verificar a referência — tente novamente`},$={untitled:`Missão sem título`,menu:`Menu da missão`,rename:`Renomear`,renamePlaceholder:`Nome da missão`,renameHint:`Duplo clique para renomear`,renameFailed:`Não foi possível renomear`,addFavorite:`Adicionar aos favoritos`,removeFavorite:`Remover dos favoritos`,copyName:`Copiar nome da missão`,copyId:`Copiar ID da missão`,copyProject:`Copiar nome do projeto`,copyProjectPath:`Copiar caminho do projeto`,copyFailed:`Não foi possível copiar`,delete:`Excluir missão`,deleteConfirm:`Excluir esta missão? Não pode ser desfeito.`,deleteFailed:`Não foi possível excluir a missão`},ee=`O que devemos construir agora?`,te={title:e,subtitle:t,trigger:n,composerPlaceholder:r,send:i,stop:a,copy:o,maximize:s,restore:c,minimize:l,close:u,newConversation:d,emptyTitle:f,emptyHint:p,thinking:m,connecting:h,consultingCode:g,size:_,model:v,history:y,queue:b,queueEdit:x,git:S,provider:C,tier:w,approval:T,project:E,palette:D,mission:O,noProvider:k,degraded:A,toolCard:j,error:M,chip:N,newAgent:P,switchToAgent:F,switchToKanban:I,search:L,home:R,favoriteMissions:z,untitled:B,workspace:V,attachFile:H,deleteConversation:U,confirmDeleteConversation:W,addFavoriteConversation:G,removeFavoriteConversation:K,confirmShort:q,imagesUnsupported:J,effort:Y,prCard:X,specDraft:Z,refs:Q,header:$,emptyTitleCodeRain:ee};export{G as addFavoriteConversation,T as approval,H as attachFile,N as chip,u as close,r as composerPlaceholder,W as confirmDeleteConversation,q as confirmShort,h as connecting,g as consultingCode,o as copy,te as default,A as degraded,U as deleteConversation,Y as effort,p as emptyHint,f as emptyTitle,ee as emptyTitleCodeRain,M as error,z as favoriteMissions,S as git,$ as header,y as history,R as home,J as imagesUnsupported,s as maximize,l as minimize,O as mission,v as model,P as newAgent,d as newConversation,k as noProvider,D as palette,X as prCard,E as project,C as provider,b as queue,x as queueEdit,Q as refs,K as removeFavoriteConversation,c as restore,L as search,i as send,_ as size,Z as specDraft,a as stop,t as subtitle,F as switchToAgent,I as switchToKanban,m as thinking,w as tier,e as title,j as toolCard,n as trigger,B as untitled,V as workspace};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=`Controllo missioni`,t=`Gestisci Specrails chattando`,n=`Controllo missioni`,r=`Chiedi all'agente qualsiasi cosa…`,i=`Invia`,a=`Ferma`,o=`Copia`,s=`Massimizza`,c=`Ripristina`,l=`Riduci a icona`,u=`Chiudi`,d=`Nuova missione`,f=`Qual è la missione?`,p=`Scegli un progetto, poi chiedi. La board si aggiorna in tempo reale mentre l'agente lavora.`,m=`Sto pensando…`,h=`Connessione…`,g=`Consulto l'app…`,_={compact:`Compatto`,comfortable:`Comodo`,max:`Ingrandisci`},v={label:`Modello`},y={hint:`Cronologia prompt — scrivi per modificare, ↑↓ per navigare`},b={queued:`In coda`,send:`Invia in coda`,sendHint:`L'agente sta ancora lavorando — questo messaggio verrà messo in coda ed eseguito dopo`,placeholder:`Aggiungi altro mentre l'agente lavora — verrà messo in coda…`},x={editing:`Modifica del messaggio in coda {{n}} di {{m}}`,hint:`↑↓ per navigare · Invio salva · Esc annulla`,save:`Salva messaggio in coda`,cancel:`Annulla modifica`,dispatched:`Quel messaggio in coda è già stato inviato — il tuo testo è conservato come bozza`,saveFailed:`Impossibile salvare il messaggio in coda`},S={branch:`Branch`,detached:`(detached)`,dirty:`Modifiche non committate`,switched:`Passato a {{branch}}`,switchFailed:`Impossibile cambiare branch`,lockedWhileWorking:`Branch bloccato mentre l'agente lavora`,searchPlaceholder:`Cerca branch…`,noMatches:`Nessun branch corrisponde`,worktrees:`Worktree`,worktreePathCopied:`Percorso del worktree copiato`,copyWorktreePath:`Copia percorso del worktree`},C={label:`Provider`,claude:`Claude`,codex:`Codex`,gemini:`Gemini`},w={cycleHint:`⇧⇥ per cambiare`,observe:{name:`Osserva`,desc:`Solo lettura — niente cambia`},edit:{name:`Modifica`,desc:`Crea e modifica (reversibile)`},operate:{name:`Opera`,desc:`Avvia l'IA — ha un costo`},autonomous:{name:`Autonomo`,desc:`Elimina e arresta — irreversibile`},lockedTitle:`Serve un livello superiore`,lockedBody:`Quell'azione richiede il livello «{{level}}». Sei su «{{current}}».`,raiseHint:`⇧⇥ per alzare il livello, o chiedi in un altro modo.`},T={title:`Conferma azione`,costAction:`{{action}} · ~{{cost}} · {{tier}}`,approve:`Approva`,cancel:`Annulla`,dontAskAgain:`Non chiedere più in questa sessione`,approved:`Approvato`,cancelled:`Annullato`},E={home:`Home`,searchPlaceholder:`Parla con Specrails…`,recents:`Recenti`,allProjects:`Tutti i progetti`,searchAll:`Cerca in tutti i progetti`,addProject:`Aggiungi progetto…`,homeHint:`Nessun progetto selezionato — operando su tutti i progetti.`,askCreateOrSearch:`Nessun progetto è selezionato. Vuoi creare un nuovo progetto o cercare in tutti i progetti?`},D={remove:`Rimuovi {{label}}`,addContextAction:`Aggiungi contesto o azione`,filtering:`Filtro "{{query}}"`,keyboard:`↑↓ Enter Esc`,noMatches:`Nessun risultato`,noMatchesFor:`Nessun risultato per "{{query}}"`,mode:{reference:{title:`Riferimento`,hint:`@ progetti, spec, missioni`},trace:{title:`Traccia`,hint:`# job, esecuzioni, ID`},action:{title:`Azione`,hint:`/ comandi per questo contesto`}},plus:{reference:`Riferimento`,referenceHint:`Progetti, spec, missioni`,trace:`Traccia`,traceHint:`Job, esecuzioni, ID`,action:`Azione`,actionHint:`Crea, avvia, ispeziona`,fileAttachment:`File allegato`,fileAttachmentHint:`Aggiungi doc, immagini, log`,browserCapture:`Cattura browser`,browserCaptureHint:`Disponibile dal browser del workspace`}},O={label:`Cambia missione`,untitled:`Nuova missione`,new:`Nuova missione`,searchPlaceholder:`Cerca missioni…`,noMatches:`Nessuna missione corrisponde`,working:`L'agente sta lavorando`,queuedBadge:`{{n}} in coda`,delete:`Elimina missione "{{title}}"`,deleteConfirm:`Eliminare?`,deleteLiveConfirm:`L'agente sta lavorando — eliminare comunque?`,confirmDelete:`Conferma eliminazione`,cancelDelete:`Mantieni missione`,deleteFailed:`Impossibile eliminare la missione`},k={title:`Nessun provider IA installato`,body:`L'agente richiede Claude, Codex o Gemini sul tuo computer. Installane uno e riapri l'agente per iniziare a chattare.`,placeholder:`Installa un provider IA per usare l'agente…`},A={title:`L'MCP di Specrails è spento`,body:`L'agente ha bisogno del server MCP integrato per gestire l'app.`,enable:`Attiva l'MCP di Specrails`,enabling:`Attivazione…`,enabled:`MCP attivato`},j={live:`in diretta`,queued:`in coda`,running:`in corso`,done:`completato`,failed:`fallito`},M={generic:`Qualcosa è andato storto. Riprova.`,busy:`L'agente è occupato. Riprova tra un momento.`},N={kindAgent:`Missione dell'agente`},P=`Nuova missione`,F=`Passa al Controllo missioni`,I=`Passa alla board`,L=`Cerca`,R=`Home`,z=`Missioni preferite`,B=`Senza titolo`,V={title:`Nel workspace`,terminal:`Terminale`,files:`File`,browser:`Browser`,requiresProject:`Seleziona un progetto per usare questo strumento`,resizeCode:`Ridimensiona pannello codice`,closeFiles:`Chiudi codice`,browserConfirm:`Aggiungi all'agente`,browserCaptured:`Cattura aggiunta`,uploadFailed:`Caricamento non riuscito`,requiresConversation:`Avvia una missione per usare questo strumento`,jobs:`Jobs`,closeJobs:`Chiudi jobs`,resizeJobs:`Ridimensiona pannello jobs`,noJobs:`Ancora nessun job — chiedi all'agente di lanciarne uno`},H=`Allega file`,U=`Elimina «{{title}}»`,W=`Conferma eliminazione di «{{title}}»`,G=`Aggiungi «{{title}}» ai preferiti`,K=`Rimuovi «{{title}}» dai preferiti`,q=`confermare?`,J=`Questo provider non legge ancora le immagini — allega file di testo`,Y={label:`Sforzo`,minimal:`Minimo`,low:`Basso`,medium:`Medio`,high:`Alto`,xhigh:`Extra alto`},X={rail:`Rail {{index}}`,specCount_one:`{{count}} spec`,specCount_other:`{{count}} spec`,base:`Ramo base`,openPr:`Apri PR`,existingPr:`PR esistente`,title:{building:`Implementazione in un worktree isolato…`,buildingExistingPr:`Applicazione delle modifiche su una PR esistente…`,on_review:`Implementazione pronta per la revisione`,pr_draft:`PR in bozza creata`,pr_draft_degraded:`Consegna della PR incompleta`,pr_ready:`PR pronta per il merge`,pr_failed:`Creazione della PR non riuscita`,merged:`Merge della PR effettuato`,discarded:`Scartata`},buildingHint:`Al termine ti verrà chiesto se creare la PR.`,buildingExistingPrHint:`Specrails sta lavorando sul branch della PR esistente e invierà le modifiche di review a quella stessa PR.`,createPr:`Crea PR`,publish:`Pubblica`,checkout:`Checkout`,checkoutTooltip:`Esegui il checkout di {{branch}} nella cartella principale del progetto`,checkoutSuccess:`Checkout eseguito su {{branch}}`,checkoutFailed:`Impossibile eseguire il checkout del branch della PR`,retry:`Riprova`,retryPr:`Riprova PR`,checkMerge:`Verifica merge`,discard:`Scarta`,confirmDiscard:`Confermare lo scarto?`,mergedNote:`Merge effettuato — le spec sono passate a Completato`,discardedNote:`Scartata — le spec sono tornate nel backlog`,degraded:{pushed:`Il ramo è stato inviato ma non è stato possibile creare la PR — riprova per completare.`,localOnly:`Le modifiche sono state assemblate in locale ma non inviate — riprova per pubblicare la PR.`},alreadyResolved:`Già risolta altrove`,actionFailed:`Azione non riuscita`,notMergedYet:`Ancora nessun merge`,viewLog:`Vedi il log di esecuzione di {{ref}}`,runElapsedAria:`{{elapsed}} trascorsi`,runCostAria:`{{cost}} spesi`,pinned:{label:`Fissata`,marker:`Scheda di implementazione — fissata sopra`,collapse:`Riduci la scheda fissata`,expand:`Espandi la scheda fissata`,expandCard:`Espandi questa scheda`,collapseCard:`Riduci questa scheda`,collapsed_one:`Scheda di implementazione`,collapsed_other:`{{count}} schede di implementazione`,state:{building:`In corso`,on_review:`Revisione`,pr_draft:`PR bozza`,pr_ready:`Pubblicata`,pr_failed:`Fallita`,merged:`Unita`,discarded:`Scartata`}},mergeLocal:`Integra in locale`,mergeLocalTooltip:`Unisce i branch consegnati in {{base}} nel tuo checkout locale (senza GitHub)`,mergeLocalBlockedDirty:`Impossibile integrare: il tuo albero di lavoro su {{base}} ha modifiche non committate. Fai commit o stash e riprova.`,mergeLocalBlockedBranch:`Impossibile integrare: il tuo checkout è su {{current}}, non su {{base}}. Passa a {{base}} e riprova.`,mergedLocally:`Integrato in {{base}} in locale`},Z={heading:`Bozza della spec`,drafting:`Aggiornamento della bozza…`,acceptanceCriteria:`Criteri di accettazione`,untitled:`Spec senza titolo`,expand:`Mostra descrizione completa`,collapse:`Comprimi descrizione`},Q={openTicket:`Apri la spec #{{id}}`,openPullRequest:`Apri PR #{{id}}`,openJob:`Apri il job {{id}}`,openLoop:`Apri loop {{id}}`,ticketNotFound:`Spec #{{id}} non trovata — potrebbe essere stata eliminata`,pullRequestUrlMissing:`La PR #{{id}} è stata citata senza URL`,pullRequestNotFound:`La PR #{{id}} non è stata trovata in questo progetto`,jobNotFound:`Job non trovato — potrebbe essere stato eliminato`,loopNotFound:`Loop non trovato — potrebbe essere stato eliminato`,lookupFailed:`Impossibile verificare il riferimento — riprova`},$={untitled:`Missione senza titolo`,menu:`Menu della missione`,rename:`Rinomina`,renamePlaceholder:`Nome della missione`,renameHint:`Doppio clic per rinominare`,renameFailed:`Impossibile rinominare`,addFavorite:`Aggiungi ai preferiti`,removeFavorite:`Rimuovi dai preferiti`,copyName:`Copia nome missione`,copyId:`Copia ID missione`,copyProject:`Copia nome progetto`,copyProjectPath:`Copia percorso progetto`,copyFailed:`Impossibile copiare`,delete:`Elimina missione`,deleteConfirm:`Eliminare questa missione? Non è reversibile.`,deleteFailed:`Impossibile eliminare la missione`},ee=`Cosa costruiamo adesso?`,te={title:e,subtitle:t,trigger:n,composerPlaceholder:r,send:i,stop:a,copy:o,maximize:s,restore:c,minimize:l,close:u,newConversation:d,emptyTitle:f,emptyHint:p,thinking:m,connecting:h,consultingCode:g,size:_,model:v,history:y,queue:b,queueEdit:x,git:S,provider:C,tier:w,approval:T,project:E,palette:D,mission:O,noProvider:k,degraded:A,toolCard:j,error:M,chip:N,newAgent:P,switchToAgent:F,switchToKanban:I,search:L,home:R,favoriteMissions:z,untitled:B,workspace:V,attachFile:H,deleteConversation:U,confirmDeleteConversation:W,addFavoriteConversation:G,removeFavoriteConversation:K,confirmShort:q,imagesUnsupported:J,effort:Y,prCard:X,specDraft:Z,refs:Q,header:$,emptyTitleCodeRain:ee};export{G as addFavoriteConversation,T as approval,H as attachFile,N as chip,u as close,r as composerPlaceholder,W as confirmDeleteConversation,q as confirmShort,h as connecting,g as consultingCode,o as copy,te as default,A as degraded,U as deleteConversation,Y as effort,p as emptyHint,f as emptyTitle,ee as emptyTitleCodeRain,M as error,z as favoriteMissions,S as git,$ as header,y as history,R as home,J as imagesUnsupported,s as maximize,l as minimize,O as mission,v as model,P as newAgent,d as newConversation,k as noProvider,D as palette,X as prCard,E as project,C as provider,b as queue,x as queueEdit,Q as refs,K as removeFavoriteConversation,c as restore,L as search,i as send,_ as size,Z as specDraft,a as stop,t as subtitle,F as switchToAgent,I as switchToKanban,m as thinking,w as tier,e as title,j as toolCard,n as trigger,B as untitled,V as workspace};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=`任务中心`,t=`通过对话操作 Specrails`,n=`任务中心`,r=`让智能体做任何事…`,i=`发送`,a=`停止`,o=`复制`,s=`最大化`,c=`还原`,l=`最小化`,u=`关闭`,d=`新任务`,f=`这次的任务是什么?`,p=`先选择一个项目,然后提问。智能体工作时看板会实时更新。`,m=`思考中…`,h=`连接中…`,g=`正在查询应用…`,_={compact:`紧凑`,comfortable:`舒适`,max:`最大化`},v={label:`模型`},y={hint:`浏览提示历史 — 输入以编辑,↑↓ 导航`},b={queued:`排队中`,send:`发送到队列`,sendHint:`智能体仍在工作——此消息将排队并在之后执行`,placeholder:`智能体工作时可继续输入——消息将排队…`},x={editing:`正在编辑排队消息 {{n}}/{{m}}`,hint:`↑↓ 导航 · 回车保存 · Esc 取消`,save:`保存排队消息`,cancel:`取消编辑`,dispatched:`该排队消息已发送——你的文本已保留为草稿`,saveFailed:`无法保存排队消息`},S={branch:`分支`,detached:`(分离头指针)`,dirty:`有未提交的更改`,switched:`已切换到 {{branch}}`,switchFailed:`无法切换分支`,lockedWhileWorking:`智能体工作时分支已锁定`,searchPlaceholder:`搜索分支…`,noMatches:`没有匹配的分支`,worktrees:`工作树`,worktreePathCopied:`已复制工作树路径`,copyWorktreePath:`复制工作树路径`},C={label:`提供方`,claude:`Claude`,codex:`Codex`,gemini:`Gemini`},w={cycleHint:`⇧⇥ 切换`,observe:{name:`观察`,desc:`只读 — 不做任何更改`},edit:{name:`编辑`,desc:`创建和编辑(可撤销)`},operate:{name:`操作`,desc:`启动 AI — 会产生费用`},autonomous:{name:`自主`,desc:`删除和终止 — 不可逆`},lockedTitle:`需要更高的级别`,lockedBody:`该操作需要「{{level}}」级别。你当前处于「{{current}}」。`,raiseHint:`⇧⇥ 提升级别,或换一种方式询问。`},T={title:`确认操作`,costAction:`{{action}} · ~{{cost}} · {{tier}}`,approve:`批准`,cancel:`取消`,dontAskAgain:`本次会话不再询问`,approved:`已批准`,cancelled:`已取消`},E={home:`主页`,searchPlaceholder:`与 Specrails 对话…`,recents:`最近`,allProjects:`所有项目`,searchAll:`在所有项目中搜索`,addProject:`添加项目…`,homeHint:`未选择项目 — 正在跨所有项目操作。`,askCreateOrSearch:`未选择任何项目。你想创建一个新项目,还是在所有项目中搜索?`},D={remove:`移除 {{label}}`,addContextAction:`添加上下文或操作`,filtering:`筛选 "{{query}}"`,keyboard:`↑↓ Enter Esc`,noMatches:`无匹配结果`,noMatchesFor:`没有 "{{query}}" 的匹配结果`,mode:{reference:{title:`引用`,hint:`@ 项目、规格、任务`},trace:{title:`追踪`,hint:`# 作业、运行、ID`},action:{title:`操作`,hint:`/ 此上下文的命令`}},plus:{reference:`引用`,referenceHint:`项目、规格、任务`,trace:`追踪`,traceHint:`作业、运行、ID`,action:`操作`,actionHint:`创建、启动、检查`,fileAttachment:`文件附件`,fileAttachmentHint:`添加文档、图片、日志`,browserCapture:`浏览器捕获`,browserCaptureHint:`可从工作区浏览器使用`}},O={label:`切换任务`,untitled:`新任务`,new:`新任务`,searchPlaceholder:`搜索任务…`,noMatches:`没有匹配的任务`,working:`代理正在工作`,queuedBadge:`{{n}} 条排队`,delete:`删除任务 "{{title}}"`,deleteConfirm:`删除?`,deleteLiveConfirm:`代理正在工作 — 仍要删除?`,confirmDelete:`确认删除`,cancelDelete:`保留任务`,deleteFailed:`无法删除任务`},k={title:`未安装 AI 提供方`,body:`智能体需要在你的机器上安装 Claude、Codex 或 Gemini。安装其中之一后重新打开智能体即可开始对话。`,placeholder:`请安装 AI 提供方以使用智能体…`},A={title:`Specrails MCP 已关闭`,body:`智能体需要内置的 MCP 服务器来操作应用。`,enable:`启用 Specrails MCP`,enabling:`正在启用…`,enabled:`MCP 已启用`},j={live:`实时`,queued:`排队中`,running:`运行中`,done:`已完成`,failed:`失败`},M={generic:`出了点问题。请重试。`,busy:`智能体正忙。请稍后重试。`},N={kindAgent:`智能体任务`},P=`新任务`,F=`切换到任务中心`,I=`切换到看板`,L=`搜索`,R=`主页`,z=`收藏任务`,B=`未命名`,V={title:`工作区`,terminal:`终端`,files:`文件`,browser:`浏览器`,requiresProject:`请选择一个项目以使用此工具`,resizeCode:`调整代码面板`,closeFiles:`关闭代码`,browserConfirm:`添加到智能体`,browserCaptured:`已添加捕获`,uploadFailed:`上传失败`,requiresConversation:`启动任务后才能使用此工具`,jobs:`作业`,closeJobs:`关闭作业`,resizeJobs:`调整作业面板大小`,noJobs:`还没有作业——让智能体启动一个吧`},H=`附加文件`,U=`删除「{{title}}」`,W=`确认删除「{{title}}」`,G=`将「{{title}}」添加到收藏`,K=`从收藏中移除「{{title}}」`,q=`确认?`,J=`该提供商暂不支持读取图片 — 请附加文本文件`,Y={label:`推理强度`,minimal:`最小`,low:`低`,medium:`中`,high:`高`,xhigh:`极高`},X={rail:`Rail {{index}}`,specCount_one:`{{count}} 个 Spec`,specCount_other:`{{count}} 个 Spec`,base:`基础分支`,openPr:`打开 PR`,existingPr:`现有 PR`,title:{building:`正在隔离的 worktree 中实现…`,buildingExistingPr:`正在向现有 PR 应用更改…`,on_review:`实现已完成,待评审`,pr_draft:`已创建草稿 PR`,pr_draft_degraded:`PR 交付未完成`,pr_ready:`PR 已就绪,可合并`,pr_failed:`PR 创建失败`,merged:`PR 已合并`,discarded:`已丢弃`},buildingHint:`完成后会询问你是否创建 PR。`,buildingExistingPrHint:`Specrails 正在现有 PR 的分支上工作,并会把 review 更改推送回同一个 PR。`,createPr:`创建 PR`,publish:`发布`,checkout:`Checkout`,checkoutTooltip:`在项目主目录检出 {{branch}}`,checkoutSuccess:`已检出 {{branch}}`,checkoutFailed:`无法检出 PR 分支`,retry:`重试`,retryPr:`重试 PR`,checkMerge:`检查合并`,discard:`丢弃`,confirmDiscard:`确认丢弃?`,mergedNote:`已合并 — Spec 已移至完成`,discardedNote:`已丢弃 — Spec 已退回待办`,degraded:{pushed:`分支已推送,但无法创建 PR — 请重试以完成。`,localOnly:`更改已在本地组装但未推送 — 请重试以发布 PR。`},alreadyResolved:`已在其他地方处理`,actionFailed:`操作失败`,notMergedYet:`尚未合并`,viewLog:`查看 {{ref}} 的运行日志`,runElapsedAria:`已运行 {{elapsed}}`,runCostAria:`已花费 {{cost}}`,pinned:{label:`已固定`,marker:`实现卡片 — 已固定在上方`,collapse:`最小化固定卡片`,expand:`展开固定卡片`,expandCard:`展开此卡片`,collapseCard:`最小化此卡片`,collapsed_one:`实现卡片`,collapsed_other:`{{count}} 张实现卡片`,state:{building:`构建中`,on_review:`待审阅`,pr_draft:`草稿 PR`,pr_ready:`已发布`,pr_failed:`失败`,merged:`已合并`,discarded:`已丢弃`}},mergeLocal:`本地集成`,mergeLocalTooltip:`将交付的分支合并到本地检出的 {{base}}(无需 GitHub)`,mergeLocalBlockedDirty:`无法集成:{{base}} 上的工作树有未提交的更改。请提交或暂存后重试。`,mergeLocalBlockedBranch:`无法集成:当前检出在 {{current}},而不是 {{base}}。请切换到 {{base}} 后重试。`,mergedLocally:`已在本地集成到 {{base}}`},Z={heading:`规格草稿`,drafting:`正在更新草稿…`,acceptanceCriteria:`验收标准`,untitled:`未命名规格`,expand:`显示完整描述`,collapse:`收起描述`},Q={openTicket:`打开 Spec #{{id}}`,openPullRequest:`打开 PR #{{id}}`,openJob:`打开任务 {{id}}`,openLoop:`打开循环 {{id}}`,ticketNotFound:`未找到 Spec #{{id}} — 可能已被删除`,pullRequestUrlMissing:`PR #{{id}} 被引用但没有 URL`,pullRequestNotFound:`在此项目中找不到 PR #{{id}}`,jobNotFound:`未找到任务 — 可能已被删除`,loopNotFound:`未找到循环 — 可能已被删除`,lookupFailed:`无法验证该引用 — 请重试`},$={untitled:`未命名任务`,menu:`任务菜单`,rename:`重命名`,renamePlaceholder:`任务名称`,renameHint:`双击重命名`,renameFailed:`无法重命名`,addFavorite:`添加到收藏`,removeFavorite:`从收藏中移除`,copyName:`复制任务名称`,copyId:`复制任务 ID`,copyProject:`复制项目名称`,copyProjectPath:`复制项目路径`,copyFailed:`无法复制`,delete:`删除任务`,deleteConfirm:`删除此任务?此操作无法撤销。`,deleteFailed:`无法删除任务`},ee=`接下来要构建什么?`,te={title:e,subtitle:t,trigger:n,composerPlaceholder:r,send:i,stop:a,copy:o,maximize:s,restore:c,minimize:l,close:u,newConversation:d,emptyTitle:f,emptyHint:p,thinking:m,connecting:h,consultingCode:g,size:_,model:v,history:y,queue:b,queueEdit:x,git:S,provider:C,tier:w,approval:T,project:E,palette:D,mission:O,noProvider:k,degraded:A,toolCard:j,error:M,chip:N,newAgent:P,switchToAgent:F,switchToKanban:I,search:L,home:R,favoriteMissions:z,untitled:B,workspace:V,attachFile:H,deleteConversation:U,confirmDeleteConversation:W,addFavoriteConversation:G,removeFavoriteConversation:K,confirmShort:q,imagesUnsupported:J,effort:Y,prCard:X,specDraft:Z,refs:Q,header:$,emptyTitleCodeRain:ee};export{G as addFavoriteConversation,T as approval,H as attachFile,N as chip,u as close,r as composerPlaceholder,W as confirmDeleteConversation,q as confirmShort,h as connecting,g as consultingCode,o as copy,te as default,A as degraded,U as deleteConversation,Y as effort,p as emptyHint,f as emptyTitle,ee as emptyTitleCodeRain,M as error,z as favoriteMissions,S as git,$ as header,y as history,R as home,J as imagesUnsupported,s as maximize,l as minimize,O as mission,v as model,P as newAgent,d as newConversation,k as noProvider,D as palette,X as prCard,E as project,C as provider,b as queue,x as queueEdit,Q as refs,K as removeFavoriteConversation,c as restore,L as search,i as send,_ as size,Z as specDraft,a as stop,t as subtitle,F as switchToAgent,I as switchToKanban,m as thinking,w as tier,e as title,j as toolCard,n as trigger,B as untitled,V as workspace};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as ee}from"./chunk-BNv3lrIs.js";var te=ee({addFavoriteConversation:()=>W,approval:()=>T,attachFile:()=>V,chip:()=>M,close:()=>u,composerPlaceholder:()=>r,confirmDeleteConversation:()=>U,confirmShort:()=>K,connecting:()=>h,consultingCode:()=>g,copy:()=>o,default:()=>re,degraded:()=>k,deleteConversation:()=>H,effort:()=>J,emptyHint:()=>p,emptyTitle:()=>f,emptyTitleCodeRain:()=>$,error:()=>j,favoriteMissions:()=>R,git:()=>S,header:()=>Q,history:()=>y,home:()=>L,imagesUnsupported:()=>q,maximize:()=>s,minimize:()=>l,mission:()=>D,model:()=>v,newAgent:()=>N,newConversation:()=>d,noProvider:()=>O,palette:()=>ne,prCard:()=>Y,project:()=>E,provider:()=>C,queue:()=>b,queueEdit:()=>x,refs:()=>Z,removeFavoriteConversation:()=>G,restore:()=>c,search:()=>I,send:()=>i,size:()=>_,specDraft:()=>X,stop:()=>a,subtitle:()=>t,switchToAgent:()=>P,switchToKanban:()=>F,thinking:()=>m,tier:()=>w,title:()=>e,toolCard:()=>A,trigger:()=>n,untitled:()=>z,workspace:()=>B}),e=`Mission Control`,t=`Operate Specrails by chatting`,n=`Mission Control`,r=`Ask the agent to do anything…`,i=`Send`,a=`Stop`,o=`Copy`,s=`Maximize`,c=`Restore`,l=`Minimize`,u=`Close`,d=`New mission`,f=`What's the mission?`,p=`Pick a project, then ask. The board updates live as the agent works.`,m=`Thinking…`,h=`Connecting…`,g=`Consulting the app…`,_={compact:`Compact`,comfortable:`Comfortable`,max:`Maximize`},v={label:`Model`},y={hint:`Browsing prompt history — type to edit, ↑↓ to navigate`},b={queued:`Queued`,send:`Send to queue`,sendHint:`The agent is still working — this message will queue and run next`,placeholder:`Add more while the agent works — it will queue…`},x={editing:`Editing queued message {{n}} of {{m}}`,hint:`↑↓ to navigate · Enter saves · Esc cancels`,save:`Save queued message`,cancel:`Cancel editing`,dispatched:`That queued message was already sent — your text is kept as a draft`,saveFailed:`Couldn't save the queued message`},S={branch:`Branch`,detached:`(detached)`,dirty:`Uncommitted changes`,switched:`Switched to {{branch}}`,switchFailed:`Couldn't switch branch`,lockedWhileWorking:`Branch locked while the agent works`,searchPlaceholder:`Search branches…`,noMatches:`No branches match`,worktrees:`Worktrees`,worktreePathCopied:`Worktree path copied`,copyWorktreePath:`Copy worktree path`},C={label:`Provider`,claude:`Claude`,codex:`Codex`,gemini:`Gemini`},w={cycleHint:`⇧⇥ to change`,observe:{name:`Observe`,desc:`Read only — nothing changes`},edit:{name:`Edit`,desc:`Create and edit (reversible)`},operate:{name:`Operate`,desc:`Launch AI — costs money`},autonomous:{name:`Autonomous`,desc:`Delete and kill — irreversible`},lockedTitle:`Needs a higher level`,lockedBody:`That action needs the "{{level}}" level. You're on "{{current}}".`,raiseHint:`⇧⇥ to raise the level, or ask another way.`},T={title:`Confirm action`,costAction:`{{action}} · ~{{cost}} · {{tier}}`,approve:`Approve`,cancel:`Cancel`,dontAskAgain:`Don't ask again this session`,approved:`Approved`,cancelled:`Cancelled`},E={home:`Home`,searchPlaceholder:`Talk to Specrails…`,recents:`Recents`,allProjects:`All projects`,searchAll:`Search across all projects`,addProject:`Add project…`,homeHint:`No project selected — operating across all projects.`,askCreateOrSearch:`No project is selected. Do you want to create a new project, or search across all projects?`},ne={remove:`Remove {{label}}`,addContextAction:`Add context or action`,filtering:`Filtering "{{query}}"`,keyboard:`↑↓ Enter Esc`,noMatches:`No matches`,noMatchesFor:`No matches for "{{query}}"`,mode:{reference:{title:`Reference`,hint:`@ projects, specs, missions`},trace:{title:`Trace`,hint:`# jobs, runs, IDs`},action:{title:`Action`,hint:`/ commands for this context`}},plus:{reference:`Reference`,referenceHint:`Projects, specs, missions`,trace:`Trace`,traceHint:`Jobs, runs, IDs`,action:`Action`,actionHint:`Create, launch, inspect`,fileAttachment:`File attachment`,fileAttachmentHint:`Add docs, images, logs`,browserCapture:`Browser capture`,browserCaptureHint:`Available from workspace browser`}},D={label:`Switch mission`,untitled:`New mission`,new:`New mission`,searchPlaceholder:`Search missions…`,noMatches:`No missions match`,working:`Agent working`,queuedBadge:`{{n}} queued`,delete:`Delete mission "{{title}}"`,deleteConfirm:`Delete?`,deleteLiveConfirm:`Agent is working — delete anyway?`,confirmDelete:`Confirm delete`,cancelDelete:`Keep mission`,deleteFailed:`Couldn't delete the mission`},O={title:`No AI provider installed`,body:`The agent needs Claude, Codex or Gemini on your machine. Install one, then reopen the agent to start chatting.`,placeholder:`Install an AI provider to use the agent…`},k={title:`Specrails MCP is off`,body:`The agent needs the embedded MCP server to operate the app.`,enable:`Enable Specrails MCP`,enabling:`Enabling…`,enabled:`MCP enabled`},A={live:`live`,queued:`queued`,running:`running`,done:`done`,failed:`failed`},j={generic:`Something went wrong. Try again.`,busy:`The agent is busy. Try again in a moment.`},M={kindAgent:`Agent mission`},N=`New Mission`,P=`Switch to Mission Control`,F=`Switch to Board`,I=`Search`,L=`Home`,R=`Favorite missions`,z=`Untitled`,B={title:`On workspace`,terminal:`Terminal`,files:`Files`,browser:`Browser`,requiresProject:`Select a project to use this tool`,resizeCode:`Resize code pane`,closeFiles:`Close code`,browserConfirm:`Add to agent`,browserCaptured:`Capture added`,uploadFailed:`Upload failed`,requiresConversation:`Start a mission to use this tool`,jobs:`Jobs`,closeJobs:`Close jobs`,resizeJobs:`Resize jobs pane`,noJobs:`No jobs yet — ask the agent to launch one`},V=`Attach file`,H=`Delete "{{title}}"`,U=`Confirm delete "{{title}}"`,W=`Add "{{title}}" to favorites`,G=`Remove "{{title}}" from favorites`,K=`confirm?`,q=`This provider can't read images yet — attach text files instead`,J={label:`Effort`,minimal:`Minimal`,low:`Low`,medium:`Medium`,high:`High`,xhigh:`Extra high`},Y={rail:`Rail {{index}}`,specCount_one:`{{count}} spec`,specCount_other:`{{count}} specs`,base:`Base branch`,openPr:`Open PR`,existingPr:`Existing PR`,title:{building:`Implementing in an isolated worktree…`,buildingExistingPr:`Applying changes to an existing PR…`,on_review:`Implementation ready for review`,pr_draft:`Draft PR created`,pr_draft_degraded:`PR delivery incomplete`,pr_ready:`PR ready for merge`,pr_failed:`PR creation failed`,merged:`PR merged`,discarded:`Discarded`},buildingHint:`You'll be asked to create the PR when it settles.`,buildingExistingPrHint:`Specrails is working on the existing PR branch and will push the review changes back to that PR.`,createPr:`Create PR`,publish:`Publish`,checkout:`Checkout`,checkoutTooltip:`Check out {{branch}} in the main project folder`,checkoutSuccess:`Checked out {{branch}}`,checkoutFailed:`Could not check out the PR branch`,retry:`Retry`,retryPr:`Retry PR`,checkMerge:`Check merge`,discard:`Discard`,confirmDiscard:`Confirm discard?`,mergedNote:`Merged — specs moved to Done`,discardedNote:`Discarded — specs returned to the backlog`,degraded:{pushed:`The branch was pushed but the PR could not be created — retry to finish.`,localOnly:`The changes were assembled locally but not pushed — retry to publish the PR.`},alreadyResolved:`Already resolved elsewhere`,actionFailed:`Action failed`,notMergedYet:`Not merged yet`,viewLog:`View run log for {{ref}}`,runElapsedAria:`{{elapsed}} elapsed`,runCostAria:`{{cost}} spent`,pinned:{label:`Pinned`,marker:`Implementation card — pinned above`,collapse:`Minimize pinned card`,expand:`Expand pinned card`,expandCard:`Expand this card`,collapseCard:`Minimize this card`,collapsed_one:`Implementation card`,collapsed_other:`{{count}} implementation cards`,state:{building:`Building`,on_review:`Review`,pr_draft:`Draft PR`,pr_ready:`Published`,pr_failed:`Failed`,merged:`Merged`,discarded:`Discarded`}},mergeLocal:`Integrate locally`,mergeLocalTooltip:`Merge the delivered branches into {{base}} in your local checkout (no GitHub needed)`,mergeLocalBlockedDirty:`Cannot integrate: your working tree on {{base}} has uncommitted changes. Commit or stash them, then retry.`,mergeLocalBlockedBranch:`Cannot integrate: your checkout is on {{current}}, not {{base}}. Check out {{base}}, then retry.`,mergedLocally:`Integrated into {{base}} locally`},X={heading:`Spec draft`,drafting:`Updating draft…`,acceptanceCriteria:`Acceptance criteria`,untitled:`Untitled spec`,expand:`Show full description`,collapse:`Collapse description`},Z={openTicket:`Open spec #{{id}}`,openPullRequest:`Open PR #{{id}}`,openJob:`Open job {{id}}`,openLoop:`Open loop {{id}}`,ticketNotFound:`Spec #{{id}} not found — it may have been deleted`,pullRequestUrlMissing:`PR #{{id}} was referenced without a URL`,pullRequestNotFound:`PR #{{id}} could not be found in this project`,jobNotFound:`Job not found — it may have been deleted`,loopNotFound:`Loop not found — it may have been deleted`,lookupFailed:`Couldn't verify the reference — try again`},Q={untitled:`Untitled mission`,menu:`Mission menu`,rename:`Rename`,renamePlaceholder:`Mission name`,renameHint:`Double-click to rename`,renameFailed:`Could not rename`,addFavorite:`Add to favorites`,removeFavorite:`Remove from favorites`,copyName:`Copy mission name`,copyId:`Copy mission ID`,copyProject:`Copy project name`,copyProjectPath:`Copy project path`,copyFailed:`Couldn't copy`,delete:`Delete mission`,deleteConfirm:`Delete this mission? This cannot be undone.`,deleteFailed:`Could not delete the mission`},$=`What should we build next?`,re={title:e,subtitle:t,trigger:n,composerPlaceholder:r,send:i,stop:a,copy:o,maximize:s,restore:c,minimize:l,close:u,newConversation:d,emptyTitle:f,emptyHint:p,thinking:m,connecting:h,consultingCode:g,size:_,model:v,history:y,queue:b,queueEdit:x,git:S,provider:C,tier:w,approval:T,project:E,palette:ne,mission:D,noProvider:O,degraded:k,toolCard:A,error:j,chip:M,newAgent:N,switchToAgent:P,switchToKanban:F,search:I,home:L,favoriteMissions:R,untitled:z,workspace:B,attachFile:V,deleteConversation:H,confirmDeleteConversation:U,addFavoriteConversation:W,removeFavoriteConversation:G,confirmShort:K,imagesUnsupported:q,effort:J,prCard:Y,specDraft:X,refs:Z,header:Q,emptyTitleCodeRain:$};export{te as t};
|