specrails-desktop 2.26.2 → 2.27.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-BlkNVXCv.js} +1 -1
- package/client/dist/assets/AgentBrowserCapture-76Ri2QR1.js +1 -0
- package/client/dist/assets/AgentIntegrationsModal-D9hVgaBR.js +1 -0
- package/client/dist/assets/{AgentModeCodePane-Ci39DcOo.js → AgentModeCodePane-BUR_QxqR.js} +2 -2
- package/client/dist/assets/AgentModeJobsPane-CnRXelns.js +1 -0
- package/client/dist/assets/AgentsPage-DEt9vpzh.js +86 -0
- package/client/dist/assets/{AnalyticsPage-Da21wWWw.js → AnalyticsPage-C_eT3I3i.js} +1 -1
- package/client/dist/assets/{BarChart-BiLTq3uC.js → BarChart-DuzYxiJ6.js} +1 -1
- package/client/dist/assets/CodePage-72-FLBNw.js +2 -0
- package/client/dist/assets/{DesktopAnalyticsPage-COkzgMmd.js → DesktopAnalyticsPage-BSeBkF2n.js} +1 -1
- package/client/dist/assets/{DocsDialog-PZHMN18B.js → DocsDialog-CGzqDyN3.js} +2 -2
- package/client/dist/assets/DocsPage-BB3VGFM9.js +11 -0
- package/client/dist/assets/{ExportDropdown-DDhJH-Jr.js → ExportDropdown-IehskH-7.js} +1 -1
- package/client/dist/assets/IntegrationsPage-X8bLyuDk.js +3 -0
- package/client/dist/assets/InteractiveJobComposer-D1HUALME.js +19 -0
- package/client/dist/assets/JobDetailModal-CMg6aKSO.js +1 -0
- package/client/dist/assets/JobDetailPage-Bg01rzeu.js +1 -0
- package/client/dist/assets/JobsPage-Cwkm9yYc.js +1 -0
- package/client/dist/assets/{LoopBuilderPage-DsLLrtHa.js → LoopBuilderPage-4uPNN8Xn.js} +2 -2
- package/client/dist/assets/{LoopPreviewModal-C-fDEgnu.js → LoopPreviewModal-BNUQ9iL8.js} +1 -1
- package/client/dist/assets/LoopsPage-DLXESZxq.js +1 -0
- package/client/dist/assets/ProjectSettingsDialog-DP6hAug-.js +1 -0
- package/client/dist/assets/{TemplatePreviewModal-DcHFbLA8.js → TemplatePreviewModal-C6mndL8D.js} +1 -1
- package/client/dist/assets/{agent-Bwkyg2oX2.js → agent-B0Rg_eLw2.js} +1 -1
- package/client/dist/assets/{agent-DJ0EBUuP.js → agent-B8f79myL.js} +1 -1
- package/client/dist/assets/{agent-Bph_-xt7.js → agent-BCH7a3z-.js} +1 -1
- package/client/dist/assets/{agent-BI6vr-To.js → agent-BELAd4RF.js} +1 -1
- package/client/dist/assets/{agent-Cqs14QMr2.js → agent-BrCnHlvX2.js} +1 -1
- package/client/dist/assets/{agent-BUGXI3Ok2.js → agent-CrcIj6WE2.js} +1 -1
- package/client/dist/assets/{agent-CLCyDaZh.js → agent-CtwLUmjl.js} +1 -1
- package/client/dist/assets/{agent-Bvy2Csyd.js → agent-xG4qLg4R.js} +1 -1
- package/client/dist/assets/{brain-BBNUUrUI.js → brain-Dia32foa.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-BawQCyrV.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/{dist-js-DdP_Gl3p.js → dist-js-DN7Pxudf.js} +1 -1
- package/client/dist/assets/{dist-js-BxjTIvdT.js → dist-js-D_4k5prK.js} +1 -1
- package/client/dist/assets/index-BbVOi-dY.js +158 -0
- package/client/dist/assets/{index-C695aPdV.css → index-o3Q2Lii5.css} +1 -1
- package/client/dist/assets/{lib-BviHZ_gK.js → lib-BxSZPd0W.js} +1 -1
- package/client/dist/assets/settings-BFv6UbKV.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-4u055Eea.js} +1 -1
- package/client/dist/assets/{value-CIr5hDMt.js → value-C3Qe3VXm.js} +1 -1
- package/client/dist/index.html +5 -5
- package/package.json +1 -1
- package/server/dist/agent-operator-prompt.js +10 -1
- package/server/dist/db.js +51 -2
- package/server/dist/dev-ports.js +35 -0
- package/server/dist/index.js +2 -6
- 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 +66 -1
- package/server/dist/path-resolver.js +74 -15
- package/server/dist/project-env.js +30 -0
- package/server/dist/project-registry.js +4 -2
- package/server/dist/project-router-jobs.js +76 -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/transient-children.js +126 -8
- 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/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/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-Dw1N2-ci.js +0 -156
- 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-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-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-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-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-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-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-DL-bPy9E.js → attachments-jVdKzAXn.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-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-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-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-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-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/{format-command-CuWuRvka.js → format-command-Db1viey1.js} +0 -0
- /package/client/dist/assets/{integrations-BNuauK3o.js → integrations-BQNkrfr7.js} +0 -0
- /package/client/dist/assets/{integrations-Cl_wD5AI.js → integrations-BdN2f6bP.js} +0 -0
- /package/client/dist/assets/{integrations-CHy8tnpV.js → integrations-BrIUJmVf.js} +0 -0
- /package/client/dist/assets/{integrations-Cy8nZ_dv2.js → integrations-Cyp7cSYv2.js} +0 -0
- /package/client/dist/assets/{integrations-4KZnYECp.js → integrations-DDR3OHdq.js} +0 -0
- /package/client/dist/assets/{integrations-7W266oqF2.js → integrations-DVxi8b0j2.js} +0 -0
- /package/client/dist/assets/{integrations-zMqY4VU12.js → integrations-RuNEX3La2.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-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-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-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-N1nzp8oL.js → mcp-zSJ2TsJj.js} +0 -0
- /package/client/dist/assets/{nav-EI_OhEAo.js → nav-BFCUtHUQ2.js} +0 -0
- /package/client/dist/assets/{nav-CGy4yx3C.js → nav-BouzorQ5.js} +0 -0
- /package/client/dist/assets/{nav-40HzpIFb.js → nav-Bpr-K0tD.js} +0 -0
- /package/client/dist/assets/{nav-B6PkGfTk2.js → nav-CpFrRDXd2.js} +0 -0
- /package/client/dist/assets/{nav-CXEDcRdv2.js → nav-Dkv4Vlr_2.js} +0 -0
- /package/client/dist/assets/{nav-8yPhBn00.js → nav-GG6azCbh.js} +0 -0
- /package/client/dist/assets/{nav-BHqMLrS72.js → nav-prHkMqcr.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-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/{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-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-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,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={railAdded:`レール {{n}} を追加しました`,railRemoved:`{{rail}} を削除しました`,railLimitReached:`レールの上限に達しました(最大 {{max}})`,railDeleteFailed:`レールを削除できません — スペックを保持しているか、実行中か、PR の判断待ちです`,launchTicketsInFlight:`このレールのスペックは既にアクティブな実行で処理中です`,launchAllSummary_one:`{{count}} 件のレールを並列で起動しました`,launchAllSummary_other:`{{count}} 件のレールを並列で起動しました`,launchAllNoneEligible:`起動できるレールがありません — まず空きレールにスペックを割り当ててください`,launchAllFailed:`起動できたレールはありません`,railCompleted:`レール {{n}} が完了しました`,railFailed:`レール {{n}} が失敗しました — スペックは Specs に戻されました`,railEnded:`レール {{n}}: {{status}} — スペックは Specs に戻されました`,alreadyOnRail:`すでに {{rail}} にあります`,movedToRail:`{{rail}} に移動しました`,railRunningStopFirst:`{{rail}} は実行中です — 削除する前に停止してください`,removedFromRail:`{{rail}} から削除しました`,queuedOnRail:`{{rail}} のキューに追加しました`,queuedOnRailDescription:`レールは現在実行中です`,railStopped:`{{rail}} を停止しました`,stopFailed:`レールの停止に失敗しました`,syncTicketsFailed:`レールのチケット同期に失敗しました`,launchFailed:`レールの起動に失敗しました`,launchNetworkError:`レール起動中にネットワークエラーが発生しました`,railLaunched:`{{rail}} を起動しました`,launchDescription_one:`{{mode}} · スペック {{count}} 件`,launchDescription_other:`{{mode}} · スペック {{count}} 件`,railWorktreeNeedsReview:`Rail {{n}}:マージ後、spec #{{ticket}} は要確認です`,railWorktreesNoGit:`worktree 分離は利用できません:このプロジェクトは git リポジトリではありません — 共有モードで実行します。`,railWorktreesNoCommits:`worktree 分離は利用できません:リポジトリにまだコミットがありません — 初回コミットを作成してから再実行してください。`,railWorktreesError:`ワークツリー分離に失敗しました — この実行は PR レビューフローなし(実装カードなし)で続行されます。下のエラー詳細を確認してください。`,onReviewCannotMoveToRail:`このスペックは PR レビュー待ちです — まず PR の決定を処理してください`,onReviewNotLaunchable:`このレールのスペックが PR レビュー待ちです — 起動する前に PR の決定を処理してください`},t={readyForReview:`レビュー準備完了`,draftPr:`ドラフト PR`,branchPushed:`ブランチはプッシュ済み — PR は未作成`,branchPushedHint:`ブランチはプッシュされましたが、PR を作成できませんでした(GitHub CLI が利用できません)。再試行して作成してください。`,iteratingPr:`PR 更新中`,prReady:`PR 準備完了`,prFailed:`PR 失敗`,prFailedDetail:`PR 失敗: {{detail}}`,createDegraded:`PR を公開できませんでした — {{detail}}。解決後に再試行してください。`,createPr:`PR を作成`,createPrTooltip:`→ {{base}}`,publish:`公開`,publishTooltip:`ドラフト PR をチームのレビューに公開します`,checkout:`Checkout`,checkoutTooltip:`プロジェクトのメインフォルダで {{branch}} をチェックアウト`,checkoutSuccess:`{{branch}} をチェックアウトしました`,checkoutFailed:`PR ブランチをチェックアウトできませんでした`,discard:`破棄`,discardTooltip:`ブランチを削除し、チケットを Specs に戻します`,retryPr:`PR を再試行`,retry:`再試行`,checkMerge:`マージを確認`,checkMergeTooltip:`PR がマージ済みかどうかを GitHub に確認します`,prLinkFallback:`PR`,openPrTitle:`GitHub で PR を開く`,notMergedYet:`まだマージされていません`,alreadyResolved:`すでに他の場所で解決済み`,ghFailed:`GitHub CLI が失敗しました:{{detail}}`,actionFailed:`PR の決定を適用できませんでした`,mergedToast:`PR がマージされました — チケットは完了に移動しました`,discardedToast:`PR を破棄しました — チケットは Specs に戻されました`,decisionPending:`このレールには未処理の PR 決定があります — 再起動する前に作成・公開・破棄のいずれかを行ってください`,discardConfirmTitle:`この成果物を破棄しますか?`,discardConfirmBody:`この起動のブランチと worktree は削除され、チケットは Specs に戻ります。この操作は元に戻せません。`,mergeLocal:`ローカルに統合`,mergeLocalTooltip:`配信されたブランチをローカルチェックアウトの {{base}} にマージします(GitHub 不要)`,mergeLocalConfirmTitle:`ローカルに統合しますか?`,mergeLocalConfirmBody:`配信されたブランチがローカルチェックアウトの {{base}} にマージされます。チェックアウトは {{base}} でワークツリーがクリーンである必要があります。`,mergeLocalBlockedDirty:`統合できません:{{base}} のワークツリーに未コミットの変更があります。コミットまたはスタッシュして再試行してください。`,mergeLocalBlockedBranch:`統合できません:チェックアウトは {{current}} で、{{base}} ではありません。{{base}} に切り替えて再試行してください。`,mergeLocalFailed:`ローカルマージに失敗しました:{{detail}}`,mergedLocally:`ローカルで {{base}} に統合しました`},n={title:`レール`,runningCount_one:`{{count}} 件実行中`,runningCount_other:`{{count}} 件実行中`,launchAll:`すべて起動`,launchAllTitle:`準備完了のレールをすべて並列で起動します — 各実行は専用の git worktree に隔離されます`},r={skipRunning_one:`{{count}} 件は既に実行中`,skipRunning_other:`{{count}} 件は既に実行中`,skipEmpty_one:`{{count}} 件はスペックなし`,skipEmpty_other:`{{count}} 件はスペックなし`,skipPendingDecision_one:`{{count}} 件は PR の判断待ち`,skipPendingDecision_other:`{{count}} 件は PR の判断待ち`,skipOnReview_one:`{{count}} 件はレビュー中のスペックあり`,skipOnReview_other:`{{count}} 件はレビュー中のスペックあり`,skipInFlight_one:`{{count}} 件をスキップ(スペックは処理中)`,skipInFlight_other:`{{count}} 件をスキップ(スペックは処理中)`,failedCount_one:`{{count}} 件が失敗`,failedCount_other:`{{count}} 件が失敗`},i={title:`すべてのレールを起動`,railsCount_one:`レール {{count}} 件`,railsCount_other:`レール {{count}} 件`,specsCount_one:`スペック {{count}} 件`,specsCount_other:`スペック {{count}} 件`,isolationTitle:`並列かつ隔離。`,isolationBody:`各レールは専用の git worktree で実行され、同時起動が衝突することはありません。`,pipelinesTitle_one:`{{count}} 本の AI パイプライン。`,pipelinesTitle_other:`{{count}} 本の AI パイプライン。`,pipelinesBody:`レールごとに 1 回起動し、それぞれ設定済みのモード・エンジン・プロファイルを使います。`,costTitle:`コストは倍増します。`,costBody:`各レールが独自の AI 実行を生成します — 支出はレール数に比例します。`,launch_one:`レール {{count}} 件を起動`,launch_other:`レール {{count}} 件を起動`},a={viewJobLog:`ジョブログを表示`,log:`ログ`,implement:`実装`,batch:`バッチ`,freestyle:`Freestyle`,freestyleTitle:`Freestyle — Claude がパイプラインなしでスペックを自律的に実装します`,loop:`Loop`,loopTitle:`Loop — 公開済みの自動化ループをレールのスペックに対して実行します`,pickLoop:`ループを選択…`,effortTitle:`推論の労力`,stop:`停止`,play:`実行`,failedRetry:`ジョブが失敗しました — クリックして再試行`,addSpecsFirst:`先にこのレールにスペックを追加してください`,builtInLoops:`組み込み`,customLoops:`カスタムループ`,worktreesMerged:`{{count}} 件マージ済み`,worktreesNeedsReview:`{{count}} 件要確認`,execSteps:`{{count}} ステップ`,execLines:`{{count}} 行`,openspec:`OpenSpec`},o={moveToSpecs:`Specs に移動`,deleteRail:`{{label}} を削除`,dropHere:`ここにドロップ`,dropOnThisRail:`このレールにドロップ`,dragSpecsHere:`ここにスペックをドラッグ`},s={title:`Freestyle モードで起動`,context_one:`{{rail}} · スペック {{count}} 件`,context_other:`{{rail}} · スペック {{count}} 件`,noPipelineTitle:`OpenSpec パイプラインなし。`,noPipelineBody:`アーキテクト → 開発者 → レビュアーの構造化フローは完全にスキップされます。`,autonomyTitle:`Claude ネイティブの自律性。`,autonomyBody:`Claude はネイティブエージェントと動的ワークフローを使って自律的に作業します。`,costTitle:`コストは変動します。`,costBody:`支出は Claude の判断に依存し、想定より高くなることがあります。`,continue:`続行`},c={fetchFailed:`レールの取得に失敗しました: {{status}}`},l={toasts:e,railPr:t,railsBoard:n,launchAll:r,launchAllDialog:i,railControls:a,railRow:o,freestyleDialog:s,useRails:c};export{l as default,s as freestyleDialog,r as launchAll,i as launchAllDialog,a as railControls,t as railPr,o as railRow,n as railsBoard,e as toasts,c as useRails};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e={railAdded:`Rail {{n}} aggiunto`,railRemoved:`{{rail}} rimosso`,railLimitReached:`Limite di rail raggiunto ({{max}} max)`,railDeleteFailed:`Impossibile rimuovere il rail — contiene spec, è in esecuzione o ha una decisione PR in sospeso`,launchTicketsInFlight:`Una spec di questo rail è già in lavorazione da un'esecuzione attiva`,launchAllSummary_one:`{{count}} rail lanciato in parallelo`,launchAllSummary_other:`{{count}} rail lanciati in parallelo`,launchAllNoneEligible:`Nessun rail pronto al lancio — assegna prima le spec a un rail libero`,launchAllFailed:`Nessun rail è stato lanciato`,railCompleted:`Rail {{n}} completato`,railFailed:`Rail {{n}} non riuscito — le spec sono tornate in Specs`,railEnded:`Rail {{n}} {{status}} — le spec sono tornate in Specs`,alreadyOnRail:`Già su {{rail}}`,movedToRail:`Spostata su {{rail}}`,railRunningStopFirst:`{{rail}} è in esecuzione — fermalo prima di rimuoverlo`,removedFromRail:`Rimossa da {{rail}}`,queuedOnRail:`In coda su {{rail}}`,queuedOnRailDescription:`Il rail è attualmente in esecuzione`,railStopped:`{{rail}} fermato`,stopFailed:`Impossibile fermare il rail`,syncTicketsFailed:`Impossibile sincronizzare i ticket del rail`,launchFailed:`Impossibile avviare il rail`,launchNetworkError:`Errore di rete durante l'avvio del rail`,railLaunched:`{{rail}} avviato`,launchDescription_one:`{{mode}} con {{count}} spec`,launchDescription_other:`{{mode}} con {{count}} spec`,railWorktreeNeedsReview:`Rail {{n}}: la spec #{{ticket}} richiede revisione dopo il merge`,railWorktreesNoGit:`Isolamento con worktree non disponibile: il progetto non è un repository git — esecuzione in modalità condivisa.`,railWorktreesNoCommits:`Isolamento con worktree non disponibile: il repository non ha ancora commit — crea un commit iniziale e rilancia.`,railWorktreesError:`L'isolamento tramite worktree è fallito — questa esecuzione continua SENZA il flusso di revisione PR (nessuna scheda di implementazione). Vedi il dettaglio dell'errore sotto.`,onReviewCannotMoveToRail:`Questa spec è in attesa della revisione della PR — risolvi prima la decisione sulla PR`,onReviewNotLaunchable:`Una spec di questo rail è in attesa della revisione della PR — risolvi la decisione sulla PR prima di lanciare`},t={readyForReview:`Pronto per la revisione`,draftPr:`PR in bozza`,branchPushed:`Ramo inviato — PR in sospeso`,branchPushedHint:`Il ramo è stato inviato ma non è stato possibile creare la PR (GitHub CLI non disponibile). Riprova per crearla.`,iteratingPr:`Aggiornamento PR`,prReady:`PR pronta`,prFailed:`PR non riuscita`,prFailedDetail:`PR non riuscita: {{detail}}`,createDegraded:`Impossibile pubblicare la PR — {{detail}}. Riprova una volta risolto.`,createPr:`Crea PR`,createPrTooltip:`→ {{base}}`,publish:`Pubblica`,publishTooltip:`Apre la PR in bozza per la revisione del team`,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`,discard:`Scarta`,discardTooltip:`Elimina i rami e riporta i ticket in Specs`,retryPr:`Riprova PR`,retry:`Riprova`,checkMerge:`Verifica merge`,checkMergeTooltip:`Chiede a GitHub se è stato fatto il merge della PR`,prLinkFallback:`PR`,openPrTitle:`Apri la PR su GitHub`,notMergedYet:`Ancora nessun merge`,alreadyResolved:`Già risolta altrove`,ghFailed:`GitHub CLI non riuscita: {{detail}}`,actionFailed:`Impossibile applicare la decisione sulla PR`,mergedToast:`Merge della PR effettuato — i ticket sono passati a Completato`,discardedToast:`PR scartata — i ticket sono tornati in Specs`,decisionPending:`Questo rail ha una decisione sulla PR in sospeso — creala, pubblicala o scartala prima di rilanciare`,discardConfirmTitle:`Scartare questa consegna?`,discardConfirmBody:`I rami e i worktree del lancio verranno eliminati e i loro ticket torneranno in Specs. L'operazione non può essere annullata.`,mergeLocal:`Integra in locale`,mergeLocalTooltip:`Unisce i branch consegnati in {{base}} nel tuo checkout locale (senza GitHub)`,mergeLocalConfirmTitle:`Integrare in locale?`,mergeLocalConfirmBody:`I branch consegnati verranno uniti in {{base}} nel tuo checkout locale. Il checkout deve essere su {{base}} con albero di lavoro pulito.`,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.`,mergeLocalFailed:`Merge locale fallito: {{detail}}`,mergedLocally:`Integrato in {{base}} in locale`},n={title:`Rails`,runningCount_one:`{{count}} in esecuzione`,runningCount_other:`{{count}} in esecuzione`,launchAll:`Lancia tutti`,launchAllTitle:`Lancia in parallelo tutti i rail pronti — ogni esecuzione è isolata nel proprio worktree git`},r={skipRunning_one:`{{count}} già in esecuzione`,skipRunning_other:`{{count}} già in esecuzione`,skipEmpty_one:`{{count}} senza spec`,skipEmpty_other:`{{count}} senza spec`,skipPendingDecision_one:`{{count}} in attesa di una decisione PR`,skipPendingDecision_other:`{{count}} in attesa di una decisione PR`,skipOnReview_one:`{{count}} con spec in revisione`,skipOnReview_other:`{{count}} con spec in revisione`,skipInFlight_one:`{{count}} saltato (spec già in corso)`,skipInFlight_other:`{{count}} saltati (spec già in corso)`,failedCount_one:`{{count}} non riuscito`,failedCount_other:`{{count}} non riusciti`},i={title:`Lancia tutti i rail`,railsCount_one:`{{count}} rail`,railsCount_other:`{{count}} rail`,specsCount_one:`{{count}} spec`,specsCount_other:`{{count}} spec`,isolationTitle:`Parallelo e isolato.`,isolationBody:`Ogni rail gira nel proprio worktree git — i lanci simultanei non collidono mai.`,pipelinesTitle_one:`{{count}} pipeline IA.`,pipelinesTitle_other:`{{count}} pipeline IA.`,pipelinesBody:`Un lancio per rail, ciascuno con la propria modalità, engine e profilo configurati.`,costTitle:`Costo moltiplicato.`,costBody:`Ogni rail genera la propria esecuzione IA — la spesa cresce con il numero di rail.`,launch_one:`Lancia {{count}} rail`,launch_other:`Lancia {{count}} rail`},a={viewJobLog:`Visualizza log del job`,log:`Log`,implement:`Implementa`,batch:`Batch`,freestyle:`Freestyle`,freestyleTitle:`Freestyle — Claude implementa la spec in autonomia, senza pipeline`,loop:`Loop`,loopTitle:`Loop — esegui un loop di automazione pubblicato sulle spec del rail`,pickLoop:`Scegli un loop…`,effortTitle:`Sforzo di ragionamento`,stop:`Stop`,play:`Avvia`,failedRetry:`Job non riuscito — clicca per riprovare`,addSpecsFirst:`Aggiungi prima delle spec a questo rail`,builtInLoops:`Integrati`,customLoops:`Loop personalizzati`,worktreesMerged:`{{count}} uniti`,worktreesNeedsReview:`{{count}} da rivedere`,execSteps:`{{count}} passi`,execLines:`{{count}} righe`,openspec:`OpenSpec`},o={moveToSpecs:`Sposta in Specs`,deleteRail:`Elimina {{label}}`,dropHere:`Rilascia qui`,dropOnThisRail:`Rilascia su questo rail`,dragSpecsHere:`Trascina qui le spec`},s={title:`Avvia in modalità Freestyle`,context_one:`{{rail}} · {{count}} spec`,context_other:`{{rail}} · {{count}} spec`,noPipelineTitle:`Nessuna pipeline OpenSpec.`,noPipelineBody:`Il flusso strutturato architect → developer → reviewer viene saltato del tutto.`,autonomyTitle:`Autonomia nativa di Claude.`,autonomyBody:`Claude lavora in autonomia usando agenti nativi e workflow dinamici.`,costTitle:`Costo variabile.`,costBody:`La spesa dipende da cosa Claude decide di fare — può essere più alta del previsto.`,continue:`Continua`},c={fetchFailed:`Impossibile recuperare i rail: {{status}}`},l={toasts:e,railPr:t,railsBoard:n,launchAll:r,launchAllDialog:i,railControls:a,railRow:o,freestyleDialog:s,useRails:c};export{l as default,s as freestyleDialog,r as launchAll,i as launchAllDialog,a as railControls,t as railPr,o as railRow,n as railsBoard,e as toasts,c as useRails};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e={railAdded:`已添加 Rail {{n}}`,railRemoved:`已移除 {{rail}}`,railLimitReached:`已达到 Rail 上限(最多 {{max}} 个)`,railDeleteFailed:`无法移除该 Rail — 它包含 Spec、正在运行或有待处理的 PR 决定`,launchTicketsInFlight:`该 Rail 上的某个 Spec 已在被一个活动运行处理`,launchAllSummary_one:`已并行启动 {{count}} 个 Rail`,launchAllSummary_other:`已并行启动 {{count}} 个 Rail`,launchAllNoneEligible:`没有可启动的 Rail — 请先将 Spec 分配到空闲的 Rail`,launchAllFailed:`没有任何 Rail 能够启动`,railCompleted:`Rail {{n}} 已完成`,railFailed:`Rail {{n}} 失败 — Spec 已退回 Specs`,railEnded:`Rail {{n}} {{status}} — Spec 已退回 Specs`,alreadyOnRail:`已在 {{rail}} 上`,movedToRail:`已移至 {{rail}}`,railRunningStopFirst:`{{rail}} 正在运行 — 请先停止再移除`,removedFromRail:`已从 {{rail}} 移除`,queuedOnRail:`已在 {{rail}} 排队`,queuedOnRailDescription:`Rail 正在运行`,railStopped:`{{rail}} 已停止`,stopFailed:`停止 Rail 失败`,syncTicketsFailed:`同步 Rail 工单失败`,launchFailed:`启动 Rail 失败`,launchNetworkError:`启动 Rail 时网络错误`,railLaunched:`{{rail}} 已启动`,launchDescription_one:`{{mode}},共 {{count}} 个 Spec`,launchDescription_other:`{{mode}},共 {{count}} 个 Spec`,railWorktreeNeedsReview:`Rail {{n}}:合并后 spec #{{ticket}} 需要复查`,railWorktreesNoGit:`worktree 隔离不可用:该项目不是 git 仓库 — 以共享模式运行。`,railWorktreesNoCommits:`worktree 隔离不可用:仓库还没有任何提交 — 先做一次初始提交再重新启动。`,railWorktreesError:`Worktree 隔离失败 — 此次运行将在没有 PR 审查流程的情况下继续(无实施卡片)。请查看下方错误详情。`,onReviewCannotMoveToRail:`该 Spec 正在等待 PR 评审 — 请先处理 PR 决定`,onReviewNotLaunchable:`该 Rail 上有 Spec 正在等待 PR 评审 — 请先处理 PR 决定再启动`},t={readyForReview:`评审就绪`,draftPr:`草稿 PR`,branchPushed:`分支已推送 — PR 待创建`,branchPushedHint:`分支已推送,但无法创建 PR(GitHub CLI 不可用)。请重试以创建。`,iteratingPr:`正在更新 PR`,prReady:`PR 已就绪`,prFailed:`PR 失败`,prFailedDetail:`PR 失败:{{detail}}`,createDegraded:`无法发布 PR — {{detail}}。解决后请重试。`,createPr:`创建 PR`,createPrTooltip:`→ {{base}}`,publish:`发布`,publishTooltip:`将草稿 PR 开放给团队评审`,checkout:`Checkout`,checkoutTooltip:`在项目主目录检出 {{branch}}`,checkoutSuccess:`已检出 {{branch}}`,checkoutFailed:`无法检出 PR 分支`,discard:`丢弃`,discardTooltip:`删除相关分支并将工单退回 Specs`,retryPr:`重试 PR`,retry:`重试`,checkMerge:`检查合并`,checkMergeTooltip:`向 GitHub 查询该 PR 是否已合并`,prLinkFallback:`PR`,openPrTitle:`在 GitHub 上打开该 PR`,notMergedYet:`尚未合并`,alreadyResolved:`已在其他地方处理`,ghFailed:`GitHub CLI 失败:{{detail}}`,actionFailed:`无法应用 PR 决定`,mergedToast:`PR 已合并 — 工单已移至完成`,discardedToast:`PR 已丢弃 — 工单已退回 Specs`,decisionPending:`该 Rail 有待处理的 PR 决定 — 请先创建、发布或丢弃,再重新启动`,discardConfirmTitle:`丢弃本次交付?`,discardConfirmBody:`将删除本次启动的分支和 worktree,其工单会退回 Specs。此操作无法撤销。`,mergeLocal:`本地集成`,mergeLocalTooltip:`将交付的分支合并到本地检出的 {{base}}(无需 GitHub)`,mergeLocalConfirmTitle:`本地集成?`,mergeLocalConfirmBody:`交付的分支将合并到本地检出的 {{base}}。你的检出必须位于 {{base}} 且工作树干净。`,mergeLocalBlockedDirty:`无法集成:{{base}} 上的工作树有未提交的更改。请提交或暂存后重试。`,mergeLocalBlockedBranch:`无法集成:当前检出在 {{current}},而不是 {{base}}。请切换到 {{base}} 后重试。`,mergeLocalFailed:`本地合并失败:{{detail}}`,mergedLocally:`已在本地集成到 {{base}}`},n={title:`Rails`,runningCount_one:`{{count}} 个运行中`,runningCount_other:`{{count}} 个运行中`,launchAll:`全部启动`,launchAllTitle:`并行启动所有就绪的 Rail — 每次运行都隔离在自己的 git worktree 中`},r={skipRunning_one:`{{count}} 个已在运行`,skipRunning_other:`{{count}} 个已在运行`,skipEmpty_one:`{{count}} 个没有 Spec`,skipEmpty_other:`{{count}} 个没有 Spec`,skipPendingDecision_one:`{{count}} 个等待 PR 决定`,skipPendingDecision_other:`{{count}} 个等待 PR 决定`,skipOnReview_one:`{{count}} 个包含审查中的 Spec`,skipOnReview_other:`{{count}} 个包含审查中的 Spec`,skipInFlight_one:`{{count}} 个已跳过(Spec 已在进行中)`,skipInFlight_other:`{{count}} 个已跳过(Spec 已在进行中)`,failedCount_one:`{{count}} 个失败`,failedCount_other:`{{count}} 个失败`},i={title:`启动所有 Rail`,railsCount_one:`{{count}} 个 Rail`,railsCount_other:`{{count}} 个 Rail`,specsCount_one:`{{count}} 个 Spec`,specsCount_other:`{{count}} 个 Spec`,isolationTitle:`并行且隔离。`,isolationBody:`每个 Rail 都在自己的 git worktree 中运行 — 同时启动永不冲突。`,pipelinesTitle_one:`{{count}} 条 AI 流水线。`,pipelinesTitle_other:`{{count}} 条 AI 流水线。`,pipelinesBody:`每个 Rail 启动一次,各自使用配置好的模式、引擎和 Profile。`,costTitle:`成本成倍增加。`,costBody:`每个 Rail 都会产生自己的 AI 运行 — 花费随 Rail 数量增长。`,launch_one:`启动 {{count}} 个 Rail`,launch_other:`启动 {{count}} 个 Rail`},a={viewJobLog:`查看任务日志`,log:`日志`,implement:`实现`,batch:`批量`,freestyle:`Freestyle`,freestyleTitle:`Freestyle — Claude 自主实现该 Spec,不走流水线`,loop:`Loop`,loopTitle:`Loop — 针对该轨道的 Spec 运行已发布的自动化循环`,pickLoop:`选择一个循环…`,effortTitle:`推理强度`,stop:`停止`,play:`运行`,failedRetry:`任务失败 — 点击重试`,addSpecsFirst:`请先向此 Rail 添加 Spec`,builtInLoops:`内置`,customLoops:`自定义循环`,worktreesMerged:`已合并 {{count}}`,worktreesNeedsReview:`{{count}} 需复查`,execSteps:`{{count}} 步`,execLines:`{{count}} 行`,openspec:`OpenSpec`},o={moveToSpecs:`移至 Specs`,deleteRail:`删除 {{label}}`,dropHere:`拖放到此处`,dropOnThisRail:`拖放到此 Rail`,dragSpecsHere:`将 Spec 拖到此处`},s={title:`以 Freestyle 模式启动`,context_one:`{{rail}} · {{count}} 个 Spec`,context_other:`{{rail}} · {{count}} 个 Spec`,noPipelineTitle:`无 OpenSpec 流水线。`,noPipelineBody:`完全跳过架构师 → 开发者 → 审查者的结构化流程。`,autonomyTitle:`Claude 原生自主模式。`,autonomyBody:`Claude 使用原生 Agent 和动态工作流自主工作。`,costTitle:`成本不固定。`,costBody:`花费取决于 Claude 的决策 — 可能高于预期。`,continue:`继续`},c={fetchFailed:`获取 Rails 失败:{{status}}`},l={toasts:e,railPr:t,railsBoard:n,launchAll:r,launchAllDialog:i,railControls:a,railRow:o,freestyleDialog:s,useRails:c};export{l as default,s as freestyleDialog,r as launchAll,i as launchAllDialog,a as railControls,t as railPr,o as railRow,n as railsBoard,e as toasts,c as useRails};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./chunk-BNv3lrIs.js";var t=e({default:()=>d,freestyleDialog:()=>l,launchAll:()=>a,launchAllDialog:()=>o,railControls:()=>s,railPr:()=>r,railRow:()=>c,railsBoard:()=>i,toasts:()=>n,useRails:()=>u}),n={railAdded:`Rail {{n}} added`,railRemoved:`{{rail}} removed`,railLimitReached:`Rail limit reached ({{max}} max)`,railDeleteFailed:`Couldn't remove the rail — it holds specs, is running, or has a pending PR decision`,launchTicketsInFlight:`A spec on this rail is already being worked by an active run`,launchAllSummary_one:`{{count}} rail launched in parallel`,launchAllSummary_other:`{{count}} rails launched in parallel`,launchAllNoneEligible:`No rails ready to launch — assign specs to an idle rail first`,launchAllFailed:`No rails could be launched`,railCompleted:`Rail {{n}} completed`,railFailed:`Rail {{n}} failed — specs returned to Specs`,railEnded:`Rail {{n}} {{status}} — specs returned to Specs`,alreadyOnRail:`Already on {{rail}}`,movedToRail:`Moved to {{rail}}`,railRunningStopFirst:`{{rail}} is running — stop it before removing`,removedFromRail:`Removed from {{rail}}`,queuedOnRail:`Queued on {{rail}}`,queuedOnRailDescription:`Rail is currently running`,railStopped:`{{rail}} stopped`,stopFailed:`Failed to stop rail`,syncTicketsFailed:`Failed to sync rail tickets`,launchFailed:`Failed to launch rail`,launchNetworkError:`Network error launching rail`,railLaunched:`{{rail}} launched`,launchDescription_one:`{{mode}} with {{count}} spec`,launchDescription_other:`{{mode}} with {{count}} specs`,railWorktreeNeedsReview:`Rail {{n}}: spec #{{ticket}} needs review after merge`,railWorktreesNoGit:`Worktree isolation unavailable: this project isn't a git repository — running in shared mode.`,railWorktreesNoCommits:`Worktree isolation unavailable: the repository has no commits yet — make an initial commit, then relaunch.`,railWorktreesError:`Worktree isolation failed — this run continues WITHOUT the PR review flow (no implementation card). See the error detail below.`,onReviewCannotMoveToRail:`This spec is awaiting PR review — resolve the PR decision first`,onReviewNotLaunchable:`A spec on this rail is awaiting PR review — resolve the PR decision before launching`},r={readyForReview:`Ready for review`,draftPr:`Draft PR`,branchPushed:`Branch pushed — PR pending`,branchPushedHint:`The branch was pushed but the PR couldn't be created (GitHub CLI unavailable). Retry to create it.`,iteratingPr:`Updating PR`,prReady:`PR ready`,prFailed:`PR failed`,prFailedDetail:`PR failed: {{detail}}`,createDegraded:`Couldn't publish the PR — {{detail}}. Retry when resolved.`,createPr:`Create PR`,createPrTooltip:`→ {{base}}`,publish:`Publish`,publishTooltip:`Open this draft PR for team review`,checkout:`Checkout`,checkoutTooltip:`Check out {{branch}} in the main project folder`,checkoutSuccess:`Checked out {{branch}}`,checkoutFailed:`Could not check out the PR branch`,discard:`Discard`,discardTooltip:`Drop the branches and return the tickets to Specs`,retryPr:`Retry PR`,retry:`Retry`,checkMerge:`Check merge`,checkMergeTooltip:`Ask GitHub whether the PR has been merged`,prLinkFallback:`PR`,openPrTitle:`Open the PR on GitHub`,notMergedYet:`Not merged yet`,alreadyResolved:`Already resolved elsewhere`,ghFailed:`GitHub CLI failed: {{detail}}`,actionFailed:`Couldn't apply the PR decision`,mergedToast:`PR merged — tickets moved to Done`,discardedToast:`PR discarded — tickets returned to Specs`,decisionPending:`This rail has a pending PR decision — create, publish or discard it before relaunching`,discardConfirmTitle:`Discard this delivery?`,discardConfirmBody:`The launch's branches and worktrees will be dropped and its tickets will return to Specs. This cannot be undone.`,mergeLocal:`Integrate locally`,mergeLocalTooltip:`Merge the delivered branches into {{base}} in your local checkout (no GitHub needed)`,mergeLocalConfirmTitle:`Integrate locally?`,mergeLocalConfirmBody:`The delivered branches will be merged into {{base}} in your local checkout. Your checkout must be on {{base}} with a clean working tree.`,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.`,mergeLocalFailed:`Local merge failed: {{detail}}`,mergedLocally:`Integrated into {{base}} locally`},i={title:`Rails`,runningCount_one:`{{count}} running`,runningCount_other:`{{count}} running`,launchAll:`Launch all`,launchAllTitle:`Launch every ready rail in parallel — each run is isolated in its own git worktree`},a={skipRunning_one:`{{count}} already running`,skipRunning_other:`{{count}} already running`,skipEmpty_one:`{{count}} without specs`,skipEmpty_other:`{{count}} without specs`,skipPendingDecision_one:`{{count}} awaiting a PR decision`,skipPendingDecision_other:`{{count}} awaiting a PR decision`,skipOnReview_one:`{{count}} with specs on review`,skipOnReview_other:`{{count}} with specs on review`,skipInFlight_one:`{{count}} skipped (spec already in flight)`,skipInFlight_other:`{{count}} skipped (specs already in flight)`,failedCount_one:`{{count}} failed`,failedCount_other:`{{count}} failed`},o={title:`Launch all rails`,railsCount_one:`{{count}} rail`,railsCount_other:`{{count}} rails`,specsCount_one:`{{count}} spec`,specsCount_other:`{{count}} specs`,isolationTitle:`Parallel & isolated.`,isolationBody:`Each rail runs in its own git worktree — concurrent launches never collide.`,pipelinesTitle_one:`{{count}} AI pipeline.`,pipelinesTitle_other:`{{count}} AI pipelines.`,pipelinesBody:`One launch per rail, each with its configured mode, engine and profile.`,costTitle:`Multiplied cost.`,costBody:`Every rail spawns its own AI run — spend scales with the number of rails.`,launch_one:`Launch {{count}} rail`,launch_other:`Launch {{count}} rails`},s={viewJobLog:`View job log`,log:`Log`,implement:`Implement`,batch:`Batch`,freestyle:`Freestyle`,freestyleTitle:`Freestyle — Claude implements the spec autonomously, no pipeline`,loop:`Loop`,loopTitle:`Loop — run a published automation loop against the rail's specs`,pickLoop:`Pick a loop…`,effortTitle:`Reasoning effort`,stop:`Stop`,play:`Play`,failedRetry:`Job failed — click to retry`,addSpecsFirst:`Add specs to this rail first`,builtInLoops:`Built-in`,customLoops:`Custom loops`,worktreesMerged:`{{count}} merged`,worktreesNeedsReview:`{{count}} need review`,execSteps:`{{count}} steps`,execLines:`{{count}} lines`,openspec:`OpenSpec`},c={moveToSpecs:`Move to Specs`,deleteRail:`Delete {{label}}`,dropHere:`Drop here`,dropOnThisRail:`Drop on this rail`,dragSpecsHere:`Drag specs here`},l={title:`Launch in Freestyle mode`,context_one:`{{rail}} · {{count}} spec`,context_other:`{{rail}} · {{count}} specs`,noPipelineTitle:`No OpenSpec pipeline.`,noPipelineBody:`The structured architect → developer → reviewer flow is skipped entirely.`,autonomyTitle:`Native Claude autonomy.`,autonomyBody:`Claude works on its own using native agents and dynamic workflows.`,costTitle:`Variable cost.`,costBody:`Spend depends on what Claude decides to do — it can be higher than expected.`,continue:`Continue`},u={fetchFailed:`Failed to fetch rails: {{status}}`},d={toasts:n,railPr:r,railsBoard:i,launchAll:a,launchAllDialog:o,railControls:s,railRow:c,freestyleDialog:l,useRails:u};export{t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e={railAdded:`Rail {{n}} añadido`,railRemoved:`{{rail}} eliminado`,railLimitReached:`Límite de rails alcanzado ({{max}} máx.)`,railDeleteFailed:`No se pudo eliminar el rail — tiene specs, está en ejecución o tiene una decisión de PR pendiente`,launchTicketsInFlight:`Una spec de este rail ya está siendo trabajada por una ejecución activa`,launchAllSummary_one:`{{count}} rail lanzado en paralelo`,launchAllSummary_other:`{{count}} rails lanzados en paralelo`,launchAllNoneEligible:`No hay rails listos para lanzar — asigna specs a un rail libre primero`,launchAllFailed:`No se pudo lanzar ningún rail`,railCompleted:`Rail {{n}} completado`,railFailed:`Rail {{n}} fallido — las specs han vuelto a Specs`,railEnded:`Rail {{n}} {{status}} — las specs han vuelto a Specs`,alreadyOnRail:`Ya está en {{rail}}`,movedToRail:`Movida a {{rail}}`,railRunningStopFirst:`{{rail}} está en ejecución — detenlo antes de eliminarlo`,removedFromRail:`Quitada de {{rail}}`,queuedOnRail:`En cola en {{rail}}`,queuedOnRailDescription:`El rail está en ejecución`,railStopped:`{{rail}} detenido`,stopFailed:`No se pudo detener el rail`,syncTicketsFailed:`No se pudieron sincronizar los tickets del rail`,launchFailed:`No se pudo lanzar el rail`,launchNetworkError:`Error de red al lanzar el rail`,railLaunched:`{{rail}} lanzado`,launchDescription_one:`{{mode}} con {{count}} spec`,launchDescription_other:`{{mode}} con {{count}} specs`,railWorktreeNeedsReview:`Rail {{n}}: la spec #{{ticket}} necesita revisión tras el merge`,railWorktreesNoGit:`Aislamiento por worktrees no disponible: el proyecto no es un repositorio git — ejecutando en modo compartido.`,railWorktreesNoCommits:`Aislamiento por worktrees no disponible: el repositorio aún no tiene commits — haz un commit inicial y relanza.`,railWorktreesError:`La aislación por worktrees falló — este run continúa SIN el flujo de revisión por PR (sin tarjeta de implementación). Mira el detalle del error abajo.`,onReviewCannotMoveToRail:`Esta spec está pendiente de revisión de PR — resuelve primero la decisión de la PR`,onReviewNotLaunchable:`Una spec de este rail está pendiente de revisión de PR — resuelve la decisión de la PR antes de lanzar`},t={readyForReview:`Listo para revisión`,draftPr:`PR en borrador`,branchPushed:`Rama subida — PR pendiente`,branchPushedHint:`La rama se subió pero no se pudo crear la PR (GitHub CLI no disponible). Reintenta para crearla.`,iteratingPr:`Actualizando PR`,prReady:`PR lista`,prFailed:`PR fallida`,prFailedDetail:`PR fallida: {{detail}}`,createDegraded:`No se pudo publicar la PR — {{detail}}. Reintenta cuando esté resuelto.`,createPr:`Crear PR`,createPrTooltip:`→ {{base}}`,publish:`Publicar`,publishTooltip:`Abre la PR en borrador para la revisión del equipo`,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`,discard:`Descartar`,discardTooltip:`Elimina las ramas y devuelve los tickets a Specs`,retryPr:`Reintentar PR`,retry:`Reintentar`,checkMerge:`Comprobar merge`,checkMergeTooltip:`Consulta a GitHub si ya se ha hecho merge de la PR`,prLinkFallback:`PR`,openPrTitle:`Abrir la PR en GitHub`,notMergedYet:`Aún sin merge`,alreadyResolved:`Ya resuelta en otro sitio`,ghFailed:`GitHub CLI falló: {{detail}}`,actionFailed:`No se pudo aplicar la decisión de la PR`,mergedToast:`Merge de la PR completado — los tickets han pasado a Hecho`,discardedToast:`PR descartada — los tickets han vuelto a Specs`,decisionPending:`Este rail tiene una decisión de PR pendiente — créala, publícala o descártala antes de relanzar`,discardConfirmTitle:`¿Descartar esta entrega?`,discardConfirmBody:`Se eliminarán las ramas y worktrees del lanzamiento y sus tickets volverán a Specs. Esta acción no se puede deshacer.`,mergeLocal:`Integrar en local`,mergeLocalTooltip:`Fusiona las ramas entregadas en {{base}} en tu checkout local (sin necesidad de GitHub)`,mergeLocalConfirmTitle:`¿Integrar en local?`,mergeLocalConfirmBody:`Las ramas entregadas se fusionarán en {{base}} en tu checkout local. Tu checkout debe estar en {{base}} con el árbol de trabajo limpio.`,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.`,mergeLocalFailed:`La fusión local falló: {{detail}}`,mergedLocally:`Integrado en {{base}} en local`},n={title:`Rails`,runningCount_one:`{{count}} en ejecución`,runningCount_other:`{{count}} en ejecución`,launchAll:`Lanzar todos`,launchAllTitle:`Lanza en paralelo todos los rails listos — cada ejecución se aísla en su propio worktree de git`},r={skipRunning_one:`{{count}} ya en ejecución`,skipRunning_other:`{{count}} ya en ejecución`,skipEmpty_one:`{{count}} sin specs`,skipEmpty_other:`{{count}} sin specs`,skipPendingDecision_one:`{{count}} con decisión de PR pendiente`,skipPendingDecision_other:`{{count}} con decisión de PR pendiente`,skipOnReview_one:`{{count}} con specs en revisión`,skipOnReview_other:`{{count}} con specs en revisión`,skipInFlight_one:`{{count}} omitido (spec ya en curso)`,skipInFlight_other:`{{count}} omitidos (specs ya en curso)`,failedCount_one:`{{count}} fallido`,failedCount_other:`{{count}} fallidos`},i={title:`Lanzar todos los rails`,railsCount_one:`{{count}} rail`,railsCount_other:`{{count}} rails`,specsCount_one:`{{count}} spec`,specsCount_other:`{{count}} specs`,isolationTitle:`Paralelo y aislado.`,isolationBody:`Cada rail se ejecuta en su propio worktree de git — los lanzamientos simultáneos nunca colisionan.`,pipelinesTitle_one:`{{count}} pipeline de IA.`,pipelinesTitle_other:`{{count}} pipelines de IA.`,pipelinesBody:`Un lanzamiento por rail, cada uno con su modo, motor y perfil configurados.`,costTitle:`Coste multiplicado.`,costBody:`Cada rail genera su propia ejecución de IA — el gasto escala con el número de rails.`,launch_one:`Lanzar {{count}} rail`,launch_other:`Lanzar {{count}} rails`},a={viewJobLog:`Ver log del job`,log:`Log`,implement:`Implement`,batch:`Batch`,freestyle:`Freestyle`,freestyleTitle:`Freestyle — Claude implementa la spec de forma autónoma, sin pipeline`,loop:`Loop`,loopTitle:`Loop — ejecuta un bucle de automatización publicado sobre las specs del rail`,pickLoop:`Elige un bucle…`,effortTitle:`Esfuerzo de razonamiento`,stop:`Detener`,play:`Iniciar`,failedRetry:`El job ha fallado — haz clic para reintentar`,addSpecsFirst:`Añade primero specs a este rail`,builtInLoops:`Integrados`,customLoops:`Loops personalizados`,worktreesMerged:`{{count}} fusionados`,worktreesNeedsReview:`{{count}} a revisar`,execSteps:`{{count}} pasos`,execLines:`{{count}} líneas`,openspec:`OpenSpec`},o={moveToSpecs:`Mover a Specs`,deleteRail:`Eliminar {{label}}`,dropHere:`Suelta aquí`,dropOnThisRail:`Suelta en este rail`,dragSpecsHere:`Arrastra specs aquí`},s={title:`Lanzar en modo Freestyle`,context_one:`{{rail}} · {{count}} spec`,context_other:`{{rail}} · {{count}} specs`,noPipelineTitle:`Sin pipeline de OpenSpec.`,noPipelineBody:`El flujo estructurado architect → developer → reviewer se omite por completo.`,autonomyTitle:`Autonomía nativa de Claude.`,autonomyBody:`Claude trabaja por su cuenta con agentes nativos y flujos dinámicos.`,costTitle:`Coste variable.`,costBody:`El gasto depende de lo que Claude decida hacer — puede ser mayor de lo esperado.`,continue:`Continuar`},c={fetchFailed:`No se pudieron obtener los rails: {{status}}`},l={toasts:e,railPr:t,railsBoard:n,launchAll:r,launchAllDialog:i,railControls:a,railRow:o,freestyleDialog:s,useRails:c};export{l as default,s as freestyleDialog,r as launchAll,i as launchAllDialog,a as railControls,t as railPr,o as railRow,n as railsBoard,e as toasts,c as useRails};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e={railAdded:`Rail {{n}} hinzugefügt`,railRemoved:`{{rail}} entfernt`,railLimitReached:`Rail-Limit erreicht (max. {{max}})`,railDeleteFailed:`Rail konnte nicht entfernt werden – es enthält Specs, läuft gerade oder hat eine ausstehende PR-Entscheidung`,launchTicketsInFlight:`Eine Spec dieses Rails wird bereits von einem aktiven Lauf bearbeitet`,launchAllSummary_one:`{{count}} Rail parallel gestartet`,launchAllSummary_other:`{{count}} Rails parallel gestartet`,launchAllNoneEligible:`Keine Rails startbereit – weise zuerst Specs einem freien Rail zu`,launchAllFailed:`Es konnte kein Rail gestartet werden`,railCompleted:`Rail {{n}} abgeschlossen`,railFailed:`Rail {{n}} fehlgeschlagen – Specs zurück in Specs`,railEnded:`Rail {{n}} {{status}} – Specs zurück in Specs`,alreadyOnRail:`Bereits auf {{rail}}`,movedToRail:`Auf {{rail}} verschoben`,railRunningStopFirst:`{{rail}} läuft – vor dem Entfernen stoppen`,removedFromRail:`Von {{rail}} entfernt`,queuedOnRail:`Auf {{rail}} eingereiht`,queuedOnRailDescription:`Rail läuft gerade`,railStopped:`{{rail}} gestoppt`,stopFailed:`Rail konnte nicht gestoppt werden`,syncTicketsFailed:`Rail-Tickets konnten nicht synchronisiert werden`,launchFailed:`Rail konnte nicht gestartet werden`,launchNetworkError:`Netzwerkfehler beim Starten des Rails`,railLaunched:`{{rail}} gestartet`,launchDescription_one:`{{mode}} mit {{count}} Spec`,launchDescription_other:`{{mode}} mit {{count}} Specs`,railWorktreeNeedsReview:`Rail {{n}}: Spec #{{ticket}} muss nach dem Merge geprüft werden`,railWorktreesNoGit:`Worktree-Isolation nicht verfügbar: Dieses Projekt ist kein Git-Repository — Ausführung im gemeinsamen Modus.`,railWorktreesNoCommits:`Worktree-Isolation nicht verfügbar: Das Repository hat noch keine Commits — erstelle einen ersten Commit und starte neu.`,railWorktreesError:`Worktree-Isolation fehlgeschlagen — dieser Lauf läuft OHNE den PR-Review-Flow weiter (keine Implementierungskarte). Siehe Fehlerdetail unten.`,onReviewCannotMoveToRail:`Diese Spec wartet auf die PR-Prüfung — löse zuerst die PR-Entscheidung`,onReviewNotLaunchable:`Eine Spec auf diesem Rail wartet auf die PR-Prüfung — löse die PR-Entscheidung vor dem Start`},t={readyForReview:`Bereit zur Prüfung`,draftPr:`Entwurfs-PR`,branchPushed:`Branch gepusht — PR ausstehend`,branchPushedHint:`Der Branch wurde gepusht, aber die PR konnte nicht erstellt werden (GitHub CLI nicht verfügbar). Erneut versuchen, um sie zu erstellen.`,iteratingPr:`PR wird aktualisiert`,prReady:`PR bereit`,prFailed:`PR fehlgeschlagen`,prFailedDetail:`PR fehlgeschlagen: {{detail}}`,createDegraded:`PR konnte nicht veröffentlicht werden — {{detail}}. Nach Behebung erneut versuchen.`,createPr:`PR erstellen`,createPrTooltip:`→ {{base}}`,publish:`Veröffentlichen`,publishTooltip:`Öffnet den Entwurfs-PR für das Review des Teams`,checkout:`Checkout`,checkoutTooltip:`Den Hauptordner des Projekts auf {{branch}} auschecken`,checkoutSuccess:`{{branch}} ausgecheckt`,checkoutFailed:`PR-Branch konnte nicht ausgecheckt werden`,discard:`Verwerfen`,discardTooltip:`Verwirft die Branches und schickt die Tickets zurück zu Specs`,retryPr:`PR erneut versuchen`,retry:`Erneut versuchen`,checkMerge:`Merge prüfen`,checkMergeTooltip:`Bei GitHub nachfragen, ob die PR gemergt wurde`,prLinkFallback:`PR`,openPrTitle:`PR auf GitHub öffnen`,notMergedYet:`Noch nicht gemergt`,alreadyResolved:`Bereits anderweitig erledigt`,ghFailed:`GitHub CLI fehlgeschlagen: {{detail}}`,actionFailed:`PR-Entscheidung konnte nicht angewendet werden`,mergedToast:`PR gemergt — Tickets nach Fertig verschoben`,discardedToast:`PR verworfen — Tickets zurück in Specs`,decisionPending:`Dieser Rail hat eine ausstehende PR-Entscheidung — erstelle, veröffentliche oder verwirf sie, bevor du neu startest`,discardConfirmTitle:`Diese Lieferung verwerfen?`,discardConfirmBody:`Die Branches und Worktrees des Launches werden verworfen und die Tickets kehren zurück zu Specs. Das kann nicht rückgängig gemacht werden.`,mergeLocal:`Lokal integrieren`,mergeLocalTooltip:`Führt die gelieferten Branches lokal in {{base}} zusammen (ohne GitHub)`,mergeLocalConfirmTitle:`Lokal integrieren?`,mergeLocalConfirmBody:`Die gelieferten Branches werden lokal in {{base}} zusammengeführt. Dein Checkout muss auf {{base}} stehen und sauber sein.`,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.`,mergeLocalFailed:`Lokaler Merge fehlgeschlagen: {{detail}}`,mergedLocally:`Lokal in {{base}} integriert`},n={title:`Rails`,runningCount_one:`{{count}} läuft`,runningCount_other:`{{count}} laufen`,launchAll:`Alle starten`,launchAllTitle:`Startet alle startbereiten Rails parallel – jeder Lauf ist in seinem eigenen Git-Worktree isoliert`},r={skipRunning_one:`{{count}} läuft bereits`,skipRunning_other:`{{count}} laufen bereits`,skipEmpty_one:`{{count}} ohne Specs`,skipEmpty_other:`{{count}} ohne Specs`,skipPendingDecision_one:`{{count}} wartet auf eine PR-Entscheidung`,skipPendingDecision_other:`{{count}} warten auf eine PR-Entscheidung`,skipOnReview_one:`{{count}} mit Specs im Review`,skipOnReview_other:`{{count}} mit Specs im Review`,skipInFlight_one:`{{count}} übersprungen (Spec bereits in Arbeit)`,skipInFlight_other:`{{count}} übersprungen (Specs bereits in Arbeit)`,failedCount_one:`{{count}} fehlgeschlagen`,failedCount_other:`{{count}} fehlgeschlagen`},i={title:`Alle Rails starten`,railsCount_one:`{{count}} Rail`,railsCount_other:`{{count}} Rails`,specsCount_one:`{{count}} Spec`,specsCount_other:`{{count}} Specs`,isolationTitle:`Parallel und isoliert.`,isolationBody:`Jedes Rail läuft in seinem eigenen Git-Worktree – gleichzeitige Starts kollidieren nie.`,pipelinesTitle_one:`{{count}} KI-Pipeline.`,pipelinesTitle_other:`{{count}} KI-Pipelines.`,pipelinesBody:`Ein Start pro Rail, jeweils mit dem konfigurierten Modus, Engine und Profil.`,costTitle:`Vervielfachte Kosten.`,costBody:`Jedes Rail erzeugt seinen eigenen KI-Lauf – die Ausgaben skalieren mit der Anzahl der Rails.`,launch_one:`{{count}} Rail starten`,launch_other:`{{count}} Rails starten`},a={viewJobLog:`Job-Log anzeigen`,log:`Log`,implement:`Implement`,batch:`Batch`,freestyle:`Freestyle`,freestyleTitle:`Freestyle – Claude implementiert die Spec autonom, ohne Pipeline`,loop:`Loop`,loopTitle:`Loop – eine veröffentlichte Automatisierungsschleife gegen die Specs des Rails ausführen`,pickLoop:`Schleife auswählen…`,effortTitle:`Denkaufwand`,stop:`Stopp`,play:`Start`,failedRetry:`Job fehlgeschlagen – zum Wiederholen klicken`,addSpecsFirst:`Füge zuerst Specs zu diesem Rail hinzu`,builtInLoops:`Integriert`,customLoops:`Eigene Loops`,worktreesMerged:`{{count}} zusammengeführt`,worktreesNeedsReview:`{{count}} zu prüfen`,execSteps:`{{count}} Schritte`,execLines:`{{count}} Zeilen`,openspec:`OpenSpec`},o={moveToSpecs:`Nach Specs verschieben`,deleteRail:`{{label}} löschen`,dropHere:`Hier ablegen`,dropOnThisRail:`Auf diesem Rail ablegen`,dragSpecsHere:`Specs hierher ziehen`},s={title:`Im Freestyle-Modus starten`,context_one:`{{rail}} · {{count}} Spec`,context_other:`{{rail}} · {{count}} Specs`,noPipelineTitle:`Keine OpenSpec-Pipeline.`,noPipelineBody:`Der strukturierte Flow Architect → Developer → Reviewer wird komplett übersprungen.`,autonomyTitle:`Native Claude-Autonomie.`,autonomyBody:`Claude arbeitet eigenständig mit nativen Agenten und dynamischen Workflows.`,costTitle:`Variable Kosten.`,costBody:`Die Ausgaben hängen davon ab, was Claude entscheidet – sie können höher ausfallen als erwartet.`,continue:`Weiter`},c={fetchFailed:`Rails konnten nicht geladen werden: {{status}}`},l={toasts:e,railPr:t,railsBoard:n,launchAll:r,launchAllDialog:i,railControls:a,railRow:o,freestyleDialog:s,useRails:c};export{l as default,s as freestyleDialog,r as launchAll,i as launchAllDialog,a as railControls,t as railPr,o as railRow,n as railsBoard,e as toasts,c as useRails};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e={railAdded:`Rail {{n}} adicionado`,railRemoved:`{{rail}} removido`,railLimitReached:`Limite de rails atingido ({{max}} máx.)`,railDeleteFailed:`Não foi possível remover o rail — ele contém specs, está em execução ou tem uma decisão de PR pendente`,launchTicketsInFlight:`Uma spec deste rail já está sendo trabalhada por uma execução ativa`,launchAllSummary_one:`{{count}} rail lançado em paralelo`,launchAllSummary_other:`{{count}} rails lançados em paralelo`,launchAllNoneEligible:`Nenhum rail pronto para lançar — atribua specs a um rail livre primeiro`,launchAllFailed:`Nenhum rail pôde ser lançado`,railCompleted:`Rail {{n}} concluído`,railFailed:`Rail {{n}} falhou — specs devolvidas a Specs`,railEnded:`Rail {{n}} {{status}} — specs devolvidas a Specs`,alreadyOnRail:`Já está em {{rail}}`,movedToRail:`Movido para {{rail}}`,railRunningStopFirst:`{{rail}} está em execução — pare-o antes de remover`,removedFromRail:`Removido de {{rail}}`,queuedOnRail:`Em fila em {{rail}}`,queuedOnRailDescription:`O rail está atualmente em execução`,railStopped:`{{rail}} parado`,stopFailed:`Falha ao parar o rail`,syncTicketsFailed:`Falha ao sincronizar os tickets do rail`,launchFailed:`Falha ao lançar o rail`,launchNetworkError:`Erro de rede ao lançar o rail`,railLaunched:`{{rail}} lançado`,launchDescription_one:`{{mode}} com {{count}} spec`,launchDescription_other:`{{mode}} com {{count}} specs`,railWorktreeNeedsReview:`Rail {{n}}: a spec #{{ticket}} precisa de revisão após o merge`,railWorktreesNoGit:`Isolamento por worktree indisponível: este projeto não é um repositório git — executando em modo compartilhado.`,railWorktreesNoCommits:`Isolamento por worktree indisponível: o repositório ainda não tem commits — faça um commit inicial e relance.`,railWorktreesError:`O isolamento por worktrees falhou — esta execução continua SEM o fluxo de revisão por PR (sem cartão de implementação). Veja o detalhe do erro abaixo.`,onReviewCannotMoveToRail:`Esta spec aguarda revisão da PR — resolva primeiro a decisão da PR`,onReviewNotLaunchable:`Uma spec deste rail aguarda revisão da PR — resolva a decisão da PR antes de lançar`},t={readyForReview:`Pronto para revisão`,draftPr:`PR em rascunho`,branchPushed:`Ramo enviado — PR pendente`,branchPushedHint:`O ramo foi enviado mas não foi possível criar a PR (GitHub CLI indisponível). Tente novamente para a criar.`,iteratingPr:`A atualizar PR`,prReady:`PR pronta`,prFailed:`PR falhou`,prFailedDetail:`PR falhou: {{detail}}`,createDegraded:`Não foi possível publicar a PR — {{detail}}. Tente novamente quando estiver resolvido.`,createPr:`Criar PR`,createPrTooltip:`→ {{base}}`,publish:`Publicar`,publishTooltip:`Abre a PR em rascunho para a revisão da equipa`,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`,discard:`Descartar`,discardTooltip:`Elimina os ramos e devolve os tickets a Specs`,retryPr:`Tentar PR novamente`,retry:`Tentar novamente`,checkMerge:`Verificar merge`,checkMergeTooltip:`Pergunta ao GitHub se já foi feito merge da PR`,prLinkFallback:`PR`,openPrTitle:`Abrir a PR no GitHub`,notMergedYet:`Ainda sem merge`,alreadyResolved:`Já resolvida noutro lugar`,ghFailed:`GitHub CLI falhou: {{detail}}`,actionFailed:`Não foi possível aplicar a decisão da PR`,mergedToast:`Merge da PR concluído — tickets movidos para Concluído`,discardedToast:`PR descartada — tickets devolvidos a Specs`,decisionPending:`Este rail tem uma decisão de PR pendente — crie, publique ou descarte-a antes de relançar`,discardConfirmTitle:`Descartar esta entrega?`,discardConfirmBody:`Os ramos e worktrees do lançamento serão eliminados e os seus tickets voltarão a Specs. Esta ação não pode ser anulada.`,mergeLocal:`Integrar localmente`,mergeLocalTooltip:`Faz merge dos branches entregues em {{base}} no seu checkout local (sem GitHub)`,mergeLocalConfirmTitle:`Integrar localmente?`,mergeLocalConfirmBody:`Os branches entregues serão mesclados em {{base}} no seu checkout local. Seu checkout deve estar em {{base}} com a árvore de trabalho limpa.`,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.`,mergeLocalFailed:`O merge local falhou: {{detail}}`,mergedLocally:`Integrado em {{base}} localmente`},n={title:`Rails`,runningCount_one:`{{count}} em execução`,runningCount_other:`{{count}} em execução`,launchAll:`Lançar todos`,launchAllTitle:`Lança em paralelo todos os rails prontos — cada execução é isolada em seu próprio worktree do git`},r={skipRunning_one:`{{count}} já em execução`,skipRunning_other:`{{count}} já em execução`,skipEmpty_one:`{{count}} sem specs`,skipEmpty_other:`{{count}} sem specs`,skipPendingDecision_one:`{{count}} aguardando uma decisão de PR`,skipPendingDecision_other:`{{count}} aguardando uma decisão de PR`,skipOnReview_one:`{{count}} com specs em revisão`,skipOnReview_other:`{{count}} com specs em revisão`,skipInFlight_one:`{{count}} ignorado (spec já em andamento)`,skipInFlight_other:`{{count}} ignorados (specs já em andamento)`,failedCount_one:`{{count}} falhou`,failedCount_other:`{{count}} falharam`},i={title:`Lançar todos os rails`,railsCount_one:`{{count}} rail`,railsCount_other:`{{count}} rails`,specsCount_one:`{{count}} spec`,specsCount_other:`{{count}} specs`,isolationTitle:`Paralelo e isolado.`,isolationBody:`Cada rail roda em seu próprio worktree do git — lançamentos simultâneos nunca colidem.`,pipelinesTitle_one:`{{count}} pipeline de IA.`,pipelinesTitle_other:`{{count}} pipelines de IA.`,pipelinesBody:`Um lançamento por rail, cada um com seu modo, motor e perfil configurados.`,costTitle:`Custo multiplicado.`,costBody:`Cada rail gera sua própria execução de IA — o gasto escala com o número de rails.`,launch_one:`Lançar {{count}} rail`,launch_other:`Lançar {{count}} rails`},a={viewJobLog:`Ver log do job`,log:`Log`,implement:`Implementar`,batch:`Batch`,freestyle:`Freestyle`,freestyleTitle:`Freestyle — o Claude implementa a spec de forma autónoma, sem pipeline`,loop:`Loop`,loopTitle:`Loop — execute um loop de automação publicado nas specs do rail`,pickLoop:`Escolha um loop…`,effortTitle:`Esforço de raciocínio`,stop:`Parar`,play:`Iniciar`,failedRetry:`O job falhou — clique para repetir`,addSpecsFirst:`Adicione primeiro specs a este rail`,builtInLoops:`Integrados`,customLoops:`Loops personalizados`,worktreesMerged:`{{count}} mesclados`,worktreesNeedsReview:`{{count}} para revisar`,execSteps:`{{count}} passos`,execLines:`{{count}} linhas`,openspec:`OpenSpec`},o={moveToSpecs:`Mover para Specs`,deleteRail:`Eliminar {{label}}`,dropHere:`Largar aqui`,dropOnThisRail:`Largar neste rail`,dragSpecsHere:`Arraste specs para aqui`},s={title:`Lançar em modo Freestyle`,context_one:`{{rail}} · {{count}} spec`,context_other:`{{rail}} · {{count}} specs`,noPipelineTitle:`Sem pipeline OpenSpec.`,noPipelineBody:`O fluxo estruturado architect → developer → reviewer é totalmente ignorado.`,autonomyTitle:`Autonomia nativa do Claude.`,autonomyBody:`O Claude trabalha por conta própria com agentes nativos e workflows dinâmicos.`,costTitle:`Custo variável.`,costBody:`O gasto depende do que o Claude decidir fazer — pode ser superior ao esperado.`,continue:`Continuar`},c={fetchFailed:`Falha ao obter os rails: {{status}}`},l={toasts:e,railPr:t,railsBoard:n,launchAll:r,launchAllDialog:i,railControls:a,railRow:o,freestyleDialog:s,useRails:c};export{l as default,s as freestyleDialog,r as launchAll,i as launchAllDialog,a as railControls,t as railPr,o as railRow,n as railsBoard,e as toasts,c as useRails};
|