@claudiolabs/claudin 1.1.34 → 1.1.35
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/App-1.1.35-r3nj6jfs.mjs +1 -0
- package/dist/chunks/ApproveApiKey-1.1.35-8nvhxyw9.mjs +1 -0
- package/dist/chunks/AutoModeOptInDialog-1.1.35-1ywwnh39.mjs +1 -0
- package/dist/chunks/BypassPermissionsModeDialog-1.1.35-bvk75rww.mjs +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-1.1.35-1ct3fw8c.mjs +1 -0
- package/dist/chunks/ConsoleOAuthFlow-1.1.35-nt22bzb6.mjs +1 -0
- package/dist/chunks/DiffDialog-1.1.35-98xrgmtc.mjs +6 -0
- package/dist/chunks/Doctor-1.1.35-k34y3jy9.mjs +1 -0
- package/dist/chunks/ExplorerDialog-1.1.35-nan1wyke.mjs +6 -0
- package/dist/chunks/ITermBackend-1.1.35-kt3ng0j6.mjs +1 -0
- package/dist/chunks/InvalidConfigDialog-1.1.35-k7wnc3v8.mjs +1 -0
- package/dist/chunks/InvalidSettingsDialog-1.1.35-3dp4jb6e.mjs +1 -0
- package/dist/chunks/MigrationDialog-1.1.35-6pa67bzn.mjs +1 -0
- package/dist/chunks/Onboarding-1.1.35-4sje6bjv.mjs +1 -0
- package/dist/chunks/ProviderManager-1.1.35-99y8t1j9.mjs +1 -0
- package/dist/chunks/REPL-1.1.35-0vqh1ns0.mjs +1 -0
- package/dist/chunks/ResumeConversation-1.1.35-104fszyr.mjs +1 -0
- package/dist/chunks/TeleportProgress-1.1.35-xcz2dypc.mjs +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-1.1.35-nfckw5cx.mjs +1 -0
- package/dist/chunks/TeleportResumeWrapper-1.1.35-6528ybrk.mjs +1 -0
- package/dist/chunks/TmuxBackend-1.1.35-rqncjk99.mjs +9 -0
- package/dist/chunks/ToolSearchTool-1.1.35-0t2d7g7n.mjs +1 -0
- package/dist/chunks/TrustDialog-1.1.35-j9d3asbg.mjs +1 -0
- package/dist/chunks/activeProvider-1.1.35-fkjy6sz1.mjs +1 -0
- package/dist/chunks/add-dir-1.1.35-4gh89hh4.mjs +1 -0
- package/dist/chunks/agentTypes-1.1.35-nx5q66t5.mjs +1 -0
- package/dist/chunks/agents-1.1.35-0kyfdt7w.mjs +3 -0
- package/dist/chunks/agents-1.1.35-1vzstv4y.mjs +110 -0
- package/dist/chunks/api-1.1.35-ab0j2x7t.mjs +1 -0
- package/dist/chunks/asciicast-1.1.35-xgjp2wrs.mjs +1 -0
- package/dist/chunks/auth-1.1.35-2fpa9v9f.mjs +1 -0
- package/dist/chunks/auth-1.1.35-deksnwe8.mjs +1 -0
- package/dist/chunks/autoMode-1.1.35-8d2qr79q.mjs +52 -0
- package/dist/chunks/autoModeSetup-1.1.35-hg5dxv1t.mjs +44 -0
- package/dist/chunks/autoUpdater-1.1.35-5pzsrenf.mjs +1 -0
- package/dist/chunks/backgroundHousekeeping-1.1.35-2kythx4m.mjs +1 -0
- package/dist/chunks/branch-1.1.35-tmksh596.mjs +4 -0
- package/dist/chunks/bridge-1.1.35-0za41yjp.mjs +2 -0
- package/dist/chunks/bridgeConfig-1.1.35-qtvayvc3.mjs +1 -0
- package/dist/chunks/bridgeEnabled-1.1.35-3mhemdrx.mjs +1 -0
- package/dist/chunks/bridgeMain-1.1.35-7awverkv.mjs +88 -0
- package/dist/chunks/bridgePointer-1.1.35-5gpfg6h4.mjs +1 -0
- package/dist/chunks/btw-1.1.35-6hy8wabr.mjs +1 -0
- package/dist/chunks/buddy-1.1.35-8z3tb1ne.mjs +3 -0
- package/dist/chunks/cache-probe-1.1.35-adn6dpak.mjs +21 -0
- package/dist/chunks/cacheStats-1.1.35-z3268gay.mjs +4 -0
- package/dist/chunks/caches-1.1.35-1qqfgvsm.mjs +1 -0
- package/dist/chunks/cd-1.1.35-vqy7n0x0.mjs +3 -0
- package/dist/chunks/claudeDesktop-1.1.35-enw3hpss.mjs +1 -0
- package/dist/chunks/claudemd-1.1.35-wsav3shz.mjs +1 -0
- package/dist/chunks/clear-1.1.35-21ry6n0m.mjs +1 -0
- package/dist/chunks/clearTerminal-1.1.35-sg808cbp.mjs +1 -0
- package/dist/chunks/cli-1.1.35-02qx9a8j.mjs +2 -0
- package/dist/chunks/cli-1.1.35-0axe3ev5.mjs +2 -0
- package/dist/chunks/cli-1.1.35-0feday40.mjs +20 -0
- package/dist/chunks/cli-1.1.35-0p69hr1j.mjs +2 -0
- package/dist/chunks/cli-1.1.35-0qrw70p1.mjs +2 -0
- package/dist/chunks/cli-1.1.35-0tc3wmtp.mjs +5 -0
- package/dist/chunks/cli-1.1.35-0vpxr2rk.mjs +2 -0
- package/dist/chunks/cli-1.1.35-0zkzg6at.mjs +2 -0
- package/dist/chunks/cli-1.1.35-1618y169.mjs +2 -0
- package/dist/chunks/cli-1.1.35-18wszrez.mjs +15 -0
- package/dist/chunks/cli-1.1.35-1bzyzrvt.mjs +2 -0
- package/dist/chunks/cli-1.1.35-1ceb2tjb.mjs +2 -0
- package/dist/chunks/cli-1.1.35-1gae8a5m.mjs +2 -0
- package/dist/chunks/cli-1.1.35-1x2wb524.mjs +2 -0
- package/dist/chunks/cli-1.1.35-21w0bna1.mjs +2 -0
- package/dist/chunks/cli-1.1.35-22q1jqqq.mjs +2 -0
- package/dist/chunks/cli-1.1.35-2gxxpyvc.mjs +2 -0
- package/dist/chunks/cli-1.1.35-2sm1x5n8.mjs +2 -0
- package/dist/chunks/cli-1.1.35-2x0m7ewe.mjs +9 -0
- package/dist/chunks/cli-1.1.35-34h7nfzz.mjs +11 -0
- package/dist/chunks/cli-1.1.35-389ej7r1.mjs +2 -0
- package/dist/chunks/cli-1.1.35-38s8y5cf.mjs +2 -0
- package/dist/chunks/cli-1.1.35-3keqk8xr.mjs +2 -0
- package/dist/chunks/cli-1.1.35-3zrjqd93.mjs +2 -0
- package/dist/chunks/cli-1.1.35-41srzc8c.mjs +2 -0
- package/dist/chunks/cli-1.1.35-46bm9f8q.mjs +2 -0
- package/dist/chunks/cli-1.1.35-4d0cm3mc.mjs +2 -0
- package/dist/chunks/cli-1.1.35-4d9merys.mjs +2 -0
- package/dist/chunks/cli-1.1.35-4g77zek0.mjs +24 -0
- package/dist/chunks/cli-1.1.35-4kft2wxe.mjs +2 -0
- package/dist/chunks/cli-1.1.35-4njf7z42.mjs +2 -0
- package/dist/chunks/cli-1.1.35-4typvdqe.mjs +2 -0
- package/dist/chunks/cli-1.1.35-589b1qht.mjs +2 -0
- package/dist/chunks/cli-1.1.35-5b39mwe0.mjs +2 -0
- package/dist/chunks/cli-1.1.35-5j12hjjm.mjs +2 -0
- package/dist/chunks/cli-1.1.35-5v115fee.mjs +2 -0
- package/dist/chunks/cli-1.1.35-61gmwbbt.mjs +2 -0
- package/dist/chunks/cli-1.1.35-688xsqg8.mjs +2 -0
- package/dist/chunks/cli-1.1.35-6c4v5dpe.mjs +15 -0
- package/dist/chunks/cli-1.1.35-6nhv8vhv.mjs +2 -0
- package/dist/chunks/cli-1.1.35-6p10e278.mjs +2 -0
- package/dist/chunks/cli-1.1.35-7g4yw92j.mjs +2 -0
- package/dist/chunks/cli-1.1.35-7hfdc6xn.mjs +2 -0
- package/dist/chunks/cli-1.1.35-7mxbj45y.mjs +2 -0
- package/dist/chunks/cli-1.1.35-7mz6cnfb.mjs +6 -0
- package/dist/chunks/cli-1.1.35-7nsr0a6p.mjs +2 -0
- package/dist/chunks/cli-1.1.35-7p1685r1.mjs +2 -0
- package/dist/chunks/cli-1.1.35-7tt5b2wx.mjs +2 -0
- package/dist/chunks/cli-1.1.35-7y74em05.mjs +2 -0
- package/dist/chunks/cli-1.1.35-82ak1wpt.mjs +7 -0
- package/dist/chunks/cli-1.1.35-854kyr9a.mjs +3 -0
- package/dist/chunks/cli-1.1.35-85zb0hfp.mjs +2 -0
- package/dist/chunks/cli-1.1.35-873xb9w7.mjs +2 -0
- package/dist/chunks/cli-1.1.35-8b1qqrev.mjs +135 -0
- package/dist/chunks/cli-1.1.35-8d9f31xx.mjs +2 -0
- package/dist/chunks/cli-1.1.35-8qdvqjz3.mjs +2 -0
- package/dist/chunks/cli-1.1.35-8ttx7y70.mjs +2 -0
- package/dist/chunks/cli-1.1.35-959df5vk.mjs +2 -0
- package/dist/chunks/cli-1.1.35-9817kkw4.mjs +3 -0
- package/dist/chunks/cli-1.1.35-9dkpx812.mjs +2 -0
- package/dist/chunks/cli-1.1.35-9tnc0a3x.mjs +2 -0
- package/dist/chunks/cli-1.1.35-9z4kwrpr.mjs +6 -0
- package/dist/chunks/cli-1.1.35-a7ygtwdr.mjs +5 -0
- package/dist/chunks/cli-1.1.35-a8677mcz.mjs +2 -0
- package/dist/chunks/cli-1.1.35-a9y8qxsj.mjs +6 -0
- package/dist/chunks/cli-1.1.35-an20pj6q.mjs +2 -0
- package/dist/chunks/cli-1.1.35-arj7fm1n.mjs +2 -0
- package/dist/chunks/cli-1.1.35-b0n88pf7.mjs +2 -0
- package/dist/chunks/cli-1.1.35-bbq4frhw.mjs +2 -0
- package/dist/chunks/cli-1.1.35-bhmad6rp.mjs +3 -0
- package/dist/chunks/cli-1.1.35-bka68014.mjs +2 -0
- package/dist/chunks/cli-1.1.35-bq7wadxz.mjs +2 -0
- package/dist/chunks/cli-1.1.35-c05841mj.mjs +2 -0
- package/dist/chunks/cli-1.1.35-c3vqfrj0.mjs +45 -0
- package/dist/chunks/cli-1.1.35-c4thx500.mjs +26 -0
- package/dist/chunks/cli-1.1.35-cj42e7aq.mjs +24 -0
- package/dist/chunks/cli-1.1.35-cjdzbmst.mjs +2 -0
- package/dist/chunks/cli-1.1.35-cjsf2kh3.mjs +2 -0
- package/dist/chunks/cli-1.1.35-cm0anghq.mjs +2 -0
- package/dist/chunks/cli-1.1.35-cp6wwahj.mjs +4 -0
- package/dist/chunks/cli-1.1.35-d6kd2zv5.mjs +2 -0
- package/dist/chunks/cli-1.1.35-d7n85zf2.mjs +2 -0
- package/dist/chunks/cli-1.1.35-da72zgbs.mjs +50 -0
- package/dist/chunks/cli-1.1.35-dfcj4fkz.mjs +2 -0
- package/dist/chunks/cli-1.1.35-dk4f6kgr.mjs +2 -0
- package/dist/chunks/cli-1.1.35-dnacc640.mjs +252 -0
- package/dist/chunks/cli-1.1.35-dw3fv0g8.mjs +60 -0
- package/dist/chunks/cli-1.1.35-dwaz1jv4.mjs +2 -0
- package/dist/chunks/cli-1.1.35-e08b8j98.mjs +18 -0
- package/dist/chunks/cli-1.1.35-eqcgyqke.mjs +39 -0
- package/dist/chunks/cli-1.1.35-ewtk80cp.mjs +3 -0
- package/dist/chunks/cli-1.1.35-f6sa351s.mjs +5 -0
- package/dist/chunks/cli-1.1.35-f8jgxvev.mjs +2 -0
- package/dist/chunks/cli-1.1.35-fgkpe9g9.mjs +2 -0
- package/dist/chunks/cli-1.1.35-fjtf9x1v.mjs +2 -0
- package/dist/chunks/cli-1.1.35-fr8gap0y.mjs +2 -0
- package/dist/chunks/cli-1.1.35-ftvtbdm6.mjs +4 -0
- package/dist/chunks/cli-1.1.35-fwyc7v71.mjs +7 -0
- package/dist/chunks/cli-1.1.35-fz50q22a.mjs +2 -0
- package/dist/chunks/cli-1.1.35-g2vg6fw2.mjs +2 -0
- package/dist/chunks/cli-1.1.35-g7086zkj.mjs +2 -0
- package/dist/chunks/cli-1.1.35-g74y15na.mjs +2 -0
- package/dist/chunks/cli-1.1.35-gcjyc9x3.mjs +2 -0
- package/dist/chunks/cli-1.1.35-gr966v4t.mjs +2 -0
- package/dist/chunks/cli-1.1.35-h06ng57d.mjs +2 -0
- package/dist/chunks/cli-1.1.35-h262sgvd.mjs +4 -0
- package/dist/chunks/cli-1.1.35-h71ph12s.mjs +2 -0
- package/dist/chunks/cli-1.1.35-h7qpm4z8.mjs +3 -0
- package/dist/chunks/cli-1.1.35-hm1wpf1w.mjs +2 -0
- package/dist/chunks/cli-1.1.35-htvjtg4f.mjs +2 -0
- package/dist/chunks/cli-1.1.35-hwphkmp4.mjs +2 -0
- package/dist/chunks/cli-1.1.35-hy9jtbmb.mjs +5570 -0
- package/dist/chunks/cli-1.1.35-hyqzaskn.mjs +2 -0
- package/dist/chunks/cli-1.1.35-j1ypjsz5.mjs +2 -0
- package/dist/chunks/cli-1.1.35-j7xxkgf1.mjs +133 -0
- package/dist/chunks/cli-1.1.35-jajp8grw.mjs +2 -0
- package/dist/chunks/cli-1.1.35-jdqn8gkp.mjs +2 -0
- package/dist/chunks/cli-1.1.35-jfzp91gv.mjs +2 -0
- package/dist/chunks/cli-1.1.35-jn52m495.mjs +2 -0
- package/dist/chunks/cli-1.1.35-jq1wvnwe.mjs +17 -0
- package/dist/chunks/cli-1.1.35-jrexyjt9.mjs +2 -0
- package/dist/chunks/cli-1.1.35-jvhs6ypf.mjs +10 -0
- package/dist/chunks/cli-1.1.35-jx42cnmn.mjs +15 -0
- package/dist/chunks/cli-1.1.35-k6jh38a3.mjs +2 -0
- package/dist/chunks/cli-1.1.35-kbrngf5h.mjs +2 -0
- package/dist/chunks/cli-1.1.35-kcgcs2dj.mjs +2 -0
- package/dist/chunks/cli-1.1.35-kdw3m4z1.mjs +25 -0
- package/dist/chunks/cli-1.1.35-kh8s6rf2.mjs +4 -0
- package/dist/chunks/cli-1.1.35-kkhrpw6q.mjs +2 -0
- package/dist/chunks/cli-1.1.35-kp2hgrdb.mjs +24 -0
- package/dist/chunks/cli-1.1.35-ktb8z2s9.mjs +3 -0
- package/dist/chunks/cli-1.1.35-kvw88dmk.mjs +2 -0
- package/dist/chunks/cli-1.1.35-kz5tydkv.mjs +2 -0
- package/dist/chunks/cli-1.1.35-m20xytkt.mjs +2 -0
- package/dist/chunks/cli-1.1.35-m6efjk78.mjs +2 -0
- package/dist/chunks/cli-1.1.35-ma6czbht.mjs +2 -0
- package/dist/chunks/cli-1.1.35-ms3xdp4c.mjs +42 -0
- package/dist/chunks/cli-1.1.35-ms5g0jwj.mjs +2 -0
- package/dist/chunks/cli-1.1.35-nahyfraf.mjs +2 -0
- package/dist/chunks/cli-1.1.35-ne21zedp.mjs +2 -0
- package/dist/chunks/cli-1.1.35-ngg53c9c.mjs +2 -0
- package/dist/chunks/cli-1.1.35-pa3rjff6.mjs +2 -0
- package/dist/chunks/cli-1.1.35-pgcrgrc3.mjs +2 -0
- package/dist/chunks/cli-1.1.35-pms9wnd8.mjs +2 -0
- package/dist/chunks/cli-1.1.35-pr69kkhz.mjs +2 -0
- package/dist/chunks/cli-1.1.35-prf6sjs7.mjs +2 -0
- package/dist/chunks/cli-1.1.35-ps66nanc.mjs +2 -0
- package/dist/chunks/cli-1.1.35-pycaqt81.mjs +2 -0
- package/dist/chunks/cli-1.1.35-q1axe4bk.mjs +2 -0
- package/dist/chunks/cli-1.1.35-qb0eb8th.mjs +2 -0
- package/dist/chunks/cli-1.1.35-qbahm5cg.mjs +2 -0
- package/dist/chunks/cli-1.1.35-qgjs5ex0.mjs +7 -0
- package/dist/chunks/cli-1.1.35-qnfq8bw4.mjs +4 -0
- package/dist/chunks/cli-1.1.35-qvdpj1qb.mjs +2 -0
- package/dist/chunks/cli-1.1.35-qxj39xzd.mjs +8 -0
- package/dist/chunks/cli-1.1.35-qygaywxg.mjs +34 -0
- package/dist/chunks/cli-1.1.35-r4rm2297.mjs +4 -0
- package/dist/chunks/cli-1.1.35-r80cjbt8.mjs +2 -0
- package/dist/chunks/cli-1.1.35-rmfsk9nw.mjs +2 -0
- package/dist/chunks/cli-1.1.35-s05wj44h.mjs +3 -0
- package/dist/chunks/cli-1.1.35-s066wwsj.mjs +3 -0
- package/dist/chunks/cli-1.1.35-s367nd6g.mjs +2 -0
- package/dist/chunks/cli-1.1.35-s3d0nchc.mjs +2 -0
- package/dist/chunks/cli-1.1.35-s6n3pb03.mjs +2 -0
- package/dist/chunks/cli-1.1.35-s85hd24a.mjs +16 -0
- package/dist/chunks/cli-1.1.35-sg0tga4d.mjs +2 -0
- package/dist/chunks/cli-1.1.35-swxcv3xf.mjs +6 -0
- package/dist/chunks/cli-1.1.35-szkn08rr.mjs +2 -0
- package/dist/chunks/cli-1.1.35-t2vx6b45.mjs +17 -0
- package/dist/chunks/cli-1.1.35-t5kexs8c.mjs +6 -0
- package/dist/chunks/cli-1.1.35-t8c5b3qj.mjs +4 -0
- package/dist/chunks/cli-1.1.35-ta15z2yx.mjs +10 -0
- package/dist/chunks/cli-1.1.35-tsrq3cxy.mjs +2 -0
- package/dist/chunks/cli-1.1.35-tsx8c30n.mjs +2 -0
- package/dist/chunks/cli-1.1.35-ve889dy8.mjs +3 -0
- package/dist/chunks/cli-1.1.35-w1mzdb9s.mjs +2 -0
- package/dist/chunks/cli-1.1.35-w6kgq9n5.mjs +2 -0
- package/dist/chunks/cli-1.1.35-w73x0912.mjs +2 -0
- package/dist/chunks/cli-1.1.35-w9wzew2x.mjs +4 -0
- package/dist/chunks/cli-1.1.35-wmcp8vyj.mjs +2 -0
- package/dist/chunks/cli-1.1.35-wpa5rfnt.mjs +12 -0
- package/dist/chunks/cli-1.1.35-wtjyzsga.mjs +2 -0
- package/dist/chunks/cli-1.1.35-ww28b5vj.mjs +2 -0
- package/dist/chunks/cli-1.1.35-x5ft52g3.mjs +2 -0
- package/dist/chunks/cli-1.1.35-xbhjhs1c.mjs +3 -0
- package/dist/chunks/cli-1.1.35-xdzsf38z.mjs +2 -0
- package/dist/chunks/cli-1.1.35-xs5mj8ee.mjs +21 -0
- package/dist/chunks/cli-1.1.35-y6bdqv7z.mjs +2 -0
- package/dist/chunks/cli-1.1.35-y6xhcehv.mjs +25 -0
- package/dist/chunks/cli-1.1.35-yns1ngnz.mjs +2 -0
- package/dist/chunks/cli-1.1.35-yta9zrj6.mjs +2 -0
- package/dist/chunks/cli-1.1.35-zbz78cha.mjs +9 -0
- package/dist/chunks/cli-1.1.35-zf7zq3kb.mjs +63 -0
- package/dist/chunks/client-1.1.35-2j9sd0sg.mjs +1 -0
- package/dist/chunks/color-1.1.35-nf9dqw3m.mjs +1 -0
- package/dist/chunks/compact-1.1.35-h8mqxxs0.mjs +2 -0
- package/dist/chunks/config-1.1.35-7t0vfbst.mjs +1 -0
- package/dist/chunks/config-1.1.35-cfhvn2fq.mjs +1 -0
- package/dist/chunks/constants-1.1.35-kst22e3x.mjs +1 -0
- package/dist/chunks/context-1.1.35-2nc26t9y.mjs +1 -0
- package/dist/chunks/context-noninteractive-1.1.35-0ym77q3t.mjs +1 -0
- package/dist/chunks/conversation-1.1.35-0q4g6qt8.mjs +1 -0
- package/dist/chunks/copilotHeaders-1.1.35-7a5mc98p.mjs +1 -0
- package/dist/chunks/copy-1.1.35-n37rvhzj.mjs +9 -0
- package/dist/chunks/cost-1.1.35-hjmwjk6s.mjs +1 -0
- package/dist/chunks/createSession-1.1.35-v7c15fc8.mjs +1 -0
- package/dist/chunks/debug-1.1.35-2hf8mhst.mjs +1 -0
- package/dist/chunks/defaultActionDeps-1.1.35-15jcbncs.mjs +1480 -0
- package/dist/chunks/desktop-1.1.35-6w6gjpff.mjs +2 -0
- package/dist/chunks/detectRepository-1.1.35-eztj0q3f.mjs +1 -0
- package/dist/chunks/detection-1.1.35-rfkb2dxe.mjs +1 -0
- package/dist/chunks/diff-1.1.35-xb27tkcx.mjs +1 -0
- package/dist/chunks/doctor-1.1.35-ddg564v7.mjs +1 -0
- package/dist/chunks/doctorDiagnostic-1.1.35-1gfkz0p1.mjs +1 -0
- package/dist/chunks/earlyInput-1.1.35-5wsb4bkz.mjs +1 -0
- package/dist/chunks/effort-1.1.35-r53ttmc3.mjs +13 -0
- package/dist/chunks/engine-1.1.35-xthhbk9w.mjs +1 -0
- package/dist/chunks/envLessBridgeConfig-1.1.35-t6narn79.mjs +1 -0
- package/dist/chunks/envUtils-1.1.35-t6yq14ba.mjs +1 -0
- package/dist/chunks/errors-1.1.35-6m0kryy5.mjs +1 -0
- package/dist/chunks/exampleCommands-1.1.35-c7dhfj0z.mjs +1 -0
- package/dist/chunks/execFileNoThrow-1.1.35-39xh2ycx.mjs +1 -0
- package/dist/chunks/exit-1.1.35-zc8g5mnv.mjs +1 -0
- package/dist/chunks/explorer-1.1.35-784hbx9r.mjs +1 -0
- package/dist/chunks/export-1.1.35-5q6zdykx.mjs +2 -0
- package/dist/chunks/fast-1.1.35-fpsnnadp.mjs +1 -0
- package/dist/chunks/feedback-1.1.35-mdm8easg.mjs +16 -0
- package/dist/chunks/git-1.1.35-j2med41y.mjs +1 -0
- package/dist/chunks/githubModelsCredentials-1.1.35-4xzf0z5w.mjs +1 -0
- package/dist/chunks/goal-1.1.35-yp44rshy.mjs +4 -0
- package/dist/chunks/headless-1.1.35-rxvrbe58.mjs +2 -0
- package/dist/chunks/heapdump-1.1.35-xkthm0kj.mjs +6 -0
- package/dist/chunks/help-1.1.35-6ppc7eee.mjs +1 -0
- package/dist/chunks/hooks-1.1.35-0e80c1wz.mjs +79 -0
- package/dist/chunks/hooks-1.1.35-f791gbgk.mjs +1 -0
- package/dist/chunks/ide-1.1.35-pz8m36fj.mjs +3 -0
- package/dist/chunks/image-processor-napi-1.1.35-56y5k454.mjs +1 -0
- package/dist/chunks/import-1.1.35-fcn1y643.mjs +261 -0
- package/dist/chunks/inboundAttachments-1.1.35-n6b7ppqk.mjs +1 -0
- package/dist/chunks/index-1.1.35-434cwyrk.mjs +1 -0
- package/dist/chunks/index-1.1.35-4ngbsgjz.mjs +1 -0
- package/dist/chunks/index-1.1.35-7nsjazx1.mjs +1 -0
- package/dist/chunks/index-1.1.35-8rnbf6ea.mjs +1 -0
- package/dist/chunks/index-1.1.35-e5amgccf.mjs +1 -0
- package/dist/chunks/index-1.1.35-eejex06g.mjs +5 -0
- package/dist/chunks/index-1.1.35-epm25vr2.mjs +9 -0
- package/dist/chunks/index-1.1.35-jxpschvm.mjs +1 -0
- package/dist/chunks/index-1.1.35-mdgw0byv.mjs +9 -0
- package/dist/chunks/index-1.1.35-n36e4pzf.mjs +1 -0
- package/dist/chunks/index-1.1.35-nnrmrgn5.mjs +30 -0
- package/dist/chunks/index-1.1.35-p1fttaxb.mjs +1 -0
- package/dist/chunks/index-1.1.35-p3ttta20.mjs +1 -0
- package/dist/chunks/index-1.1.35-pjz1v5fa.mjs +1 -0
- package/dist/chunks/index-1.1.35-pqswr512.mjs +23 -0
- package/dist/chunks/index-1.1.35-q464ks4t.mjs +1 -0
- package/dist/chunks/index-1.1.35-r5cefbke.mjs +2 -0
- package/dist/chunks/index-1.1.35-rf0z1h76.mjs +1 -0
- package/dist/chunks/index-1.1.35-wg3dwx0w.mjs +2 -0
- package/dist/chunks/index-1.1.35-xcm76j0n.mjs +1 -0
- package/dist/chunks/index-1.1.35-y7q90201.mjs +1 -0
- package/dist/chunks/index-1.1.35-y9scvznb.mjs +1 -0
- package/dist/chunks/index-1.1.35-yy5qsdz8.mjs +1 -0
- package/dist/chunks/init-1.1.35-hawgzj6s.mjs +2 -0
- package/dist/chunks/initReplBridge-1.1.35-aee08exn.mjs +1 -0
- package/dist/chunks/ink-1.1.35-9vhjhx60.mjs +1 -0
- package/dist/chunks/insights-1.1.35-2782qak6.mjs +870 -0
- package/dist/chunks/install-1.1.35-nptjkfk3.mjs +1 -0
- package/dist/chunks/install-github-app-1.1.35-v4ahg5m0.mjs +149 -0
- package/dist/chunks/install-slack-app-1.1.35-rc6ch1k0.mjs +1 -0
- package/dist/chunks/interactiveHelpers-1.1.35-1755rb8a.mjs +1 -0
- package/dist/chunks/keybindings-1.1.35-9qz4bvrq.mjs +2 -0
- package/dist/chunks/latestVersionCache-1.1.35-ff7kd1x3.mjs +1 -0
- package/dist/chunks/loadAgentsDir-1.1.35-nwtm30nv.mjs +1 -0
- package/dist/chunks/loadPluginHooks-1.1.35-jxqkv874.mjs +1 -0
- package/dist/chunks/log-1.1.35-h5x69tbw.mjs +1 -0
- package/dist/chunks/main-1.1.35-1e6064ax.mjs +1 -0
- package/dist/chunks/managedEnv-1.1.35-s6143dpv.mjs +1 -0
- package/dist/chunks/mcp-1.1.35-0tswravz.mjs +1 -0
- package/dist/chunks/mcp-1.1.35-bdv2pgpj.mjs +17 -0
- package/dist/chunks/mcp-1.1.35-khngfse0.mjs +4 -0
- package/dist/chunks/mcpb-1.1.35-p4jn8q66.mjs +1 -0
- package/dist/chunks/memory-1.1.35-zvk9c80b.mjs +128 -0
- package/dist/chunks/model-1.1.35-j8hp9tcm.mjs +1 -0
- package/dist/chunks/model-1.1.35-mb41ksj1.mjs +2 -0
- package/dist/chunks/node-1.1.35-312s6waw.mjs +1 -0
- package/dist/chunks/node-1.1.35-zzk2fc7x.mjs +15 -0
- package/dist/chunks/oauth-1.1.35-2pwvpgey.mjs +1 -0
- package/dist/chunks/openaiShim-1.1.35-6gbm01ym.mjs +14 -0
- package/dist/chunks/output-style-1.1.35-gbk18883.mjs +1 -0
- package/dist/chunks/package-F6O7J2XI-1.1.35-0z3efknf.mjs +1 -0
- package/dist/chunks/permissions-1.1.35-c11nnhp0.mjs +3 -0
- package/dist/chunks/permissions-1.1.35-vqtbrznv.mjs +1 -0
- package/dist/chunks/plan-1.1.35-5nz3m4kh.mjs +1 -0
- package/dist/chunks/plist-1.1.35-4bd0g91w.mjs +1 -0
- package/dist/chunks/plugin-1.1.35-0tg6jzxg.mjs +29 -0
- package/dist/chunks/pluginStartupCheck-1.1.35-z1parxqs.mjs +1 -0
- package/dist/chunks/plugins-1.1.35-z14pz0dr.mjs +9 -0
- package/dist/chunks/preActionHook-1.1.35-9dyzn96j.mjs +2 -0
- package/dist/chunks/print-1.1.35-89rm2txf.mjs +57 -0
- package/dist/chunks/process-1.1.35-7x8d7kyn.mjs +1 -0
- package/dist/chunks/processBashCommand-1.1.35-hj8xz358.mjs +1 -0
- package/dist/chunks/processSlashCommand-1.1.35-egejjqfw.mjs +9 -0
- package/dist/chunks/prompt-1.1.35-aaz8q4j6.mjs +1 -0
- package/dist/chunks/prompt-1.1.35-f3fackax.mjs +1 -0
- package/dist/chunks/prompts-1.1.35-58wwfjfd.mjs +1 -0
- package/dist/chunks/provider-1.1.35-xwj158q8.mjs +2 -0
- package/dist/chunks/providerProfiles-1.1.35-6wzwgty6.mjs +1 -0
- package/dist/chunks/providerValidation-1.1.35-z9h8ampz.mjs +6 -0
- package/dist/chunks/registerSubcommands-1.1.35-7ewvmysm.mjs +26 -0
- package/dist/chunks/registry-1.1.35-y4zandg8.mjs +1 -0
- package/dist/chunks/release-notes-1.1.35-s31rkdxh.mjs +5 -0
- package/dist/chunks/reload-plugins-1.1.35-18xd3nwy.mjs +2 -0
- package/dist/chunks/remote-env-1.1.35-0v4tk5np.mjs +1 -0
- package/dist/chunks/remoteBridgeCore-1.1.35-ev420056.mjs +1 -0
- package/dist/chunks/rename-1.1.35-m8chhebj.mjs +1 -0
- package/dist/chunks/replLauncher-1.1.35-483j4br6.mjs +1 -0
- package/dist/chunks/resume-1.1.35-vaxxp18n.mjs +2 -0
- package/dist/chunks/rewind-1.1.35-scs8763b.mjs +1 -0
- package/dist/chunks/rootOptions-1.1.35-9j5y8k9x.mjs +1 -0
- package/dist/chunks/runWorkflowHeadless-1.1.35-zjy5t791.mjs +10 -0
- package/dist/chunks/sandbox-adapter-1.1.35-qrmypwca.mjs +1 -0
- package/dist/chunks/sandbox-toggle-1.1.35-c2k8p98n.mjs +1 -0
- package/dist/chunks/session-1.1.35-78ew080a.mjs +2 -0
- package/dist/chunks/sessionStorage-1.1.35-0tyr8wn3.mjs +1 -0
- package/dist/chunks/settings-1.1.35-808m5j14.mjs +1 -0
- package/dist/chunks/setup-1.1.35-ebpewe9s.mjs +12 -0
- package/dist/chunks/sinks-1.1.35-nj35kk9h.mjs +1 -0
- package/dist/chunks/skills-1.1.35-zczajd48.mjs +1 -0
- package/dist/chunks/startupProfiler-1.1.35-wa5psc2j.mjs +1 -0
- package/dist/chunks/startupUpdateCheck-1.1.35-0wac30ap.mjs +1 -0
- package/dist/chunks/state-1.1.35-gcp827qz.mjs +1 -0
- package/dist/chunks/stats-1.1.35-f1kndsge.mjs +1 -0
- package/dist/chunks/status-1.1.35-gwtdrkx2.mjs +1 -0
- package/dist/chunks/stickers-1.1.35-fa69zd3v.mjs +1 -0
- package/dist/chunks/subprocessEnv-1.1.35-8wsc86ft.mjs +1 -0
- package/dist/chunks/tasks-1.1.35-0wd1t6v2.mjs +1 -0
- package/dist/chunks/teamHelpers-1.1.35-13qqfhxa.mjs +1 -0
- package/dist/chunks/teammateModeSnapshot-1.1.35-wdbfsm1h.mjs +1 -0
- package/dist/chunks/teleport-1.1.35-tmhzqx90.mjs +1 -0
- package/dist/chunks/terminalSetup-1.1.35-6xq5nt25.mjs +1 -0
- package/dist/chunks/theme-1.1.35-4b6gd2dx.mjs +1 -0
- package/dist/chunks/thinkback-1.1.35-x88djqdz.mjs +1 -0
- package/dist/chunks/thinkback-play-1.1.35-g6n14rjh.mjs +1 -0
- package/dist/chunks/toolPool-1.1.35-0qd67zrc.mjs +1 -0
- package/dist/chunks/toolSearch-1.1.35-54dpcvf8.mjs +1 -0
- package/dist/chunks/tools-1.1.35-3hjsc7mm.mjs +1 -0
- package/dist/chunks/trustedDevice-1.1.35-szkdvqcz.mjs +1 -0
- package/dist/chunks/turndown.cjs-1.1.35-4azkv4s5.mjs +69 -0
- package/dist/chunks/types-1.1.35-ncfe8wzg.mjs +1 -0
- package/dist/chunks/ultrareviewCommand-1.1.35-d271ddpn.mjs +4 -0
- package/dist/chunks/update-1.1.35-5zabq625.mjs +72 -0
- package/dist/chunks/upload-1.1.35-gey82edy.mjs +7 -0
- package/dist/chunks/upstreamproxy-1.1.35-bbztgd01.mjs +14 -0
- package/dist/chunks/usage-1.1.35-sx2ahz77.mjs +1 -0
- package/dist/chunks/util-1.1.35-aph6a5hy.mjs +1 -0
- package/dist/chunks/utils-1.1.35-avpezj08.mjs +1 -0
- package/dist/chunks/vim-1.1.35-e0jh10q6.mjs +1 -0
- package/dist/chunks/watchLoop-1.1.35-baxd01b0.mjs +13 -0
- package/dist/chunks/wiki-1.1.35-cns1572n.mjs +132 -0
- package/dist/chunks/workflows-1.1.35-0r21887z.mjs +1 -0
- package/dist/chunks/worktree-1.1.35-0mj24by3.mjs +1 -0
- package/dist/chunks/worktreeModeEnabled-1.1.35-6ej7pdyw.mjs +1 -0
- package/dist/chunks/wrapper-1.1.35-fpcy8t3v.mjs +7 -0
- package/dist/cli.mjs +2 -2
- package/package.json +9 -9
- package/dist/chunks/App-1.1.34-5bkzspjw.mjs +0 -1
- package/dist/chunks/ApproveApiKey-1.1.34-v9m1h6yf.mjs +0 -1
- package/dist/chunks/AutoModeOptInDialog-1.1.34-s8q45b8r.mjs +0 -1
- package/dist/chunks/BypassPermissionsModeDialog-1.1.34-za20vma5.mjs +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-1.1.34-bfqcybrw.mjs +0 -1
- package/dist/chunks/ConsoleOAuthFlow-1.1.34-y3y8zaw0.mjs +0 -1
- package/dist/chunks/DiffDialog-1.1.34-2c48wrw2.mjs +0 -6
- package/dist/chunks/Doctor-1.1.34-5pfk2t4c.mjs +0 -1
- package/dist/chunks/ExplorerDialog-1.1.34-jhjx7d79.mjs +0 -6
- package/dist/chunks/ITermBackend-1.1.34-fdz2yay1.mjs +0 -1
- package/dist/chunks/InvalidConfigDialog-1.1.34-9kn20864.mjs +0 -1
- package/dist/chunks/InvalidSettingsDialog-1.1.34-rs0n3tbm.mjs +0 -1
- package/dist/chunks/MigrationDialog-1.1.34-mb74003t.mjs +0 -1
- package/dist/chunks/Onboarding-1.1.34-bfdfnz31.mjs +0 -1
- package/dist/chunks/ProviderManager-1.1.34-mxhsj5pz.mjs +0 -1
- package/dist/chunks/REPL-1.1.34-g9xtcxfm.mjs +0 -1
- package/dist/chunks/ResumeConversation-1.1.34-wjd1x7s6.mjs +0 -1
- package/dist/chunks/TeleportProgress-1.1.34-zpsemk3f.mjs +0 -1
- package/dist/chunks/TeleportRepoMismatchDialog-1.1.34-gse2x86w.mjs +0 -1
- package/dist/chunks/TeleportResumeWrapper-1.1.34-cp51s05w.mjs +0 -1
- package/dist/chunks/TmuxBackend-1.1.34-pcx5e2xc.mjs +0 -9
- package/dist/chunks/ToolSearchTool-1.1.34-s3tfzny5.mjs +0 -1
- package/dist/chunks/TrustDialog-1.1.34-g8hnps71.mjs +0 -1
- package/dist/chunks/activeProvider-1.1.34-a1bg24mk.mjs +0 -1
- package/dist/chunks/add-dir-1.1.34-fs7fa841.mjs +0 -1
- package/dist/chunks/agentTypes-1.1.34-ybf25dvm.mjs +0 -1
- package/dist/chunks/agents-1.1.34-6xhfrt25.mjs +0 -3
- package/dist/chunks/agents-1.1.34-wsjsbryq.mjs +0 -110
- package/dist/chunks/api-1.1.34-99hm00p0.mjs +0 -1
- package/dist/chunks/asciicast-1.1.34-qydk3ezz.mjs +0 -1
- package/dist/chunks/auth-1.1.34-32n80bwr.mjs +0 -1
- package/dist/chunks/auth-1.1.34-mhmakxvf.mjs +0 -1
- package/dist/chunks/autoMode-1.1.34-jyxbmbqd.mjs +0 -52
- package/dist/chunks/autoModeSetup-1.1.34-2b10v0j4.mjs +0 -44
- package/dist/chunks/autoUpdater-1.1.34-bd3mdsv9.mjs +0 -1
- package/dist/chunks/backgroundHousekeeping-1.1.34-v4c2njkh.mjs +0 -1
- package/dist/chunks/branch-1.1.34-949t9ara.mjs +0 -4
- package/dist/chunks/bridge-1.1.34-8jc0ek6w.mjs +0 -2
- package/dist/chunks/bridgeConfig-1.1.34-kgr2qvyz.mjs +0 -1
- package/dist/chunks/bridgeEnabled-1.1.34-ygna8r55.mjs +0 -1
- package/dist/chunks/bridgeMain-1.1.34-saff9rp6.mjs +0 -88
- package/dist/chunks/bridgePointer-1.1.34-5apzxa58.mjs +0 -1
- package/dist/chunks/btw-1.1.34-4246e84n.mjs +0 -1
- package/dist/chunks/buddy-1.1.34-kj9mygnh.mjs +0 -3
- package/dist/chunks/cache-probe-1.1.34-gyemr2df.mjs +0 -21
- package/dist/chunks/cacheStats-1.1.34-fqz6k1qv.mjs +0 -4
- package/dist/chunks/caches-1.1.34-ebn0bryh.mjs +0 -1
- package/dist/chunks/cd-1.1.34-6458ex95.mjs +0 -3
- package/dist/chunks/claudeDesktop-1.1.34-4jr3kmkg.mjs +0 -1
- package/dist/chunks/clear-1.1.34-da0gwb7n.mjs +0 -1
- package/dist/chunks/clearTerminal-1.1.34-410eb173.mjs +0 -1
- package/dist/chunks/cli-1.1.34-00hxx56p.mjs +0 -2
- package/dist/chunks/cli-1.1.34-0cmmxs6g.mjs +0 -9
- package/dist/chunks/cli-1.1.34-0f5qa0q0.mjs +0 -2
- package/dist/chunks/cli-1.1.34-0h4whfas.mjs +0 -6
- package/dist/chunks/cli-1.1.34-0kkae10p.mjs +0 -2
- package/dist/chunks/cli-1.1.34-0mjf3pve.mjs +0 -2
- package/dist/chunks/cli-1.1.34-0t1h2v5v.mjs +0 -2
- package/dist/chunks/cli-1.1.34-0zqthr52.mjs +0 -2
- package/dist/chunks/cli-1.1.34-1229x70a.mjs +0 -2
- package/dist/chunks/cli-1.1.34-166q8s04.mjs +0 -24
- package/dist/chunks/cli-1.1.34-1a3s3rqs.mjs +0 -3
- package/dist/chunks/cli-1.1.34-1ategs07.mjs +0 -2
- package/dist/chunks/cli-1.1.34-1m5v3ffj.mjs +0 -2
- package/dist/chunks/cli-1.1.34-1nxczs7m.mjs +0 -3
- package/dist/chunks/cli-1.1.34-1xg52b7q.mjs +0 -12
- package/dist/chunks/cli-1.1.34-20femz8z.mjs +0 -2
- package/dist/chunks/cli-1.1.34-20p72tmb.mjs +0 -20
- package/dist/chunks/cli-1.1.34-21nzcpj6.mjs +0 -5
- package/dist/chunks/cli-1.1.34-24h4yeqf.mjs +0 -2
- package/dist/chunks/cli-1.1.34-2tf44a9a.mjs +0 -2
- package/dist/chunks/cli-1.1.34-33s2xs9e.mjs +0 -2
- package/dist/chunks/cli-1.1.34-372a0qyj.mjs +0 -2
- package/dist/chunks/cli-1.1.34-37g65vk7.mjs +0 -2
- package/dist/chunks/cli-1.1.34-37mgsk8w.mjs +0 -2
- package/dist/chunks/cli-1.1.34-3pr2wgys.mjs +0 -2
- package/dist/chunks/cli-1.1.34-3qpxmhy6.mjs +0 -2
- package/dist/chunks/cli-1.1.34-3rcacat5.mjs +0 -3
- package/dist/chunks/cli-1.1.34-4v8eanby.mjs +0 -2
- package/dist/chunks/cli-1.1.34-4x915j9t.mjs +0 -2
- package/dist/chunks/cli-1.1.34-4y5bvnfe.mjs +0 -2
- package/dist/chunks/cli-1.1.34-4zj4kbw4.mjs +0 -2
- package/dist/chunks/cli-1.1.34-58ergrxf.mjs +0 -7
- package/dist/chunks/cli-1.1.34-59csbz1a.mjs +0 -60
- package/dist/chunks/cli-1.1.34-5ec767fj.mjs +0 -2
- package/dist/chunks/cli-1.1.34-5ffnhvmt.mjs +0 -3
- package/dist/chunks/cli-1.1.34-5jdjfha3.mjs +0 -2
- package/dist/chunks/cli-1.1.34-5jnn83ne.mjs +0 -2
- package/dist/chunks/cli-1.1.34-5mg7y1hs.mjs +0 -2
- package/dist/chunks/cli-1.1.34-5qzy93s7.mjs +0 -2
- package/dist/chunks/cli-1.1.34-5t01yf6x.mjs +0 -2
- package/dist/chunks/cli-1.1.34-5vktvncs.mjs +0 -2
- package/dist/chunks/cli-1.1.34-5z4epq5b.mjs +0 -4
- package/dist/chunks/cli-1.1.34-643n510j.mjs +0 -2
- package/dist/chunks/cli-1.1.34-6jkjn6pd.mjs +0 -2
- package/dist/chunks/cli-1.1.34-6ndxsqp1.mjs +0 -2
- package/dist/chunks/cli-1.1.34-70pxm3rb.mjs +0 -133
- package/dist/chunks/cli-1.1.34-79mxk0bc.mjs +0 -2
- package/dist/chunks/cli-1.1.34-7ad0dt89.mjs +0 -2
- package/dist/chunks/cli-1.1.34-7bcbswdn.mjs +0 -2
- package/dist/chunks/cli-1.1.34-7bxexffs.mjs +0 -6
- package/dist/chunks/cli-1.1.34-7n5bvchq.mjs +0 -2
- package/dist/chunks/cli-1.1.34-7npd3as5.mjs +0 -18
- package/dist/chunks/cli-1.1.34-7rd2xv38.mjs +0 -3
- package/dist/chunks/cli-1.1.34-80nhtgdq.mjs +0 -2
- package/dist/chunks/cli-1.1.34-83s0mm9a.mjs +0 -2
- package/dist/chunks/cli-1.1.34-84707tma.mjs +0 -5491
- package/dist/chunks/cli-1.1.34-859ap6f7.mjs +0 -2
- package/dist/chunks/cli-1.1.34-8r5c91mz.mjs +0 -2
- package/dist/chunks/cli-1.1.34-8s2k8jnr.mjs +0 -39
- package/dist/chunks/cli-1.1.34-8vfey6b5.mjs +0 -2
- package/dist/chunks/cli-1.1.34-92kps6jn.mjs +0 -63
- package/dist/chunks/cli-1.1.34-9jn997h8.mjs +0 -2
- package/dist/chunks/cli-1.1.34-9tctqya9.mjs +0 -6
- package/dist/chunks/cli-1.1.34-9tze8t1x.mjs +0 -2
- package/dist/chunks/cli-1.1.34-9z887t80.mjs +0 -2
- package/dist/chunks/cli-1.1.34-a6gj1b3g.mjs +0 -2
- package/dist/chunks/cli-1.1.34-a7et4z4n.mjs +0 -2
- package/dist/chunks/cli-1.1.34-ajqsr81p.mjs +0 -2
- package/dist/chunks/cli-1.1.34-ak4sm3t1.mjs +0 -2
- package/dist/chunks/cli-1.1.34-axnnzxpw.mjs +0 -2
- package/dist/chunks/cli-1.1.34-b9j8be5k.mjs +0 -2
- package/dist/chunks/cli-1.1.34-bt9brnrs.mjs +0 -2
- package/dist/chunks/cli-1.1.34-c3w48hst.mjs +0 -2
- package/dist/chunks/cli-1.1.34-cp457g25.mjs +0 -11
- package/dist/chunks/cli-1.1.34-cptp243m.mjs +0 -2
- package/dist/chunks/cli-1.1.34-cqxr7fsq.mjs +0 -2
- package/dist/chunks/cli-1.1.34-ctjatnq8.mjs +0 -2
- package/dist/chunks/cli-1.1.34-czhcyzgw.mjs +0 -2
- package/dist/chunks/cli-1.1.34-d0sgyvr1.mjs +0 -4
- package/dist/chunks/cli-1.1.34-d5enzbca.mjs +0 -2
- package/dist/chunks/cli-1.1.34-d8bccy48.mjs +0 -7
- package/dist/chunks/cli-1.1.34-dceap5rk.mjs +0 -4
- package/dist/chunks/cli-1.1.34-dj3hwt6m.mjs +0 -3
- package/dist/chunks/cli-1.1.34-dvx08sv2.mjs +0 -2
- package/dist/chunks/cli-1.1.34-e1vkhvbm.mjs +0 -2
- package/dist/chunks/cli-1.1.34-e4f2qw6n.mjs +0 -2
- package/dist/chunks/cli-1.1.34-e7fd8zh6.mjs +0 -2
- package/dist/chunks/cli-1.1.34-e9rxgan0.mjs +0 -2
- package/dist/chunks/cli-1.1.34-ehad4d4f.mjs +0 -2
- package/dist/chunks/cli-1.1.34-ev8ffgr9.mjs +0 -2
- package/dist/chunks/cli-1.1.34-ew7p2ct8.mjs +0 -2
- package/dist/chunks/cli-1.1.34-exsrnr6k.mjs +0 -2
- package/dist/chunks/cli-1.1.34-f806gv2e.mjs +0 -7
- package/dist/chunks/cli-1.1.34-faavcjnj.mjs +0 -2
- package/dist/chunks/cli-1.1.34-fd3cb4wv.mjs +0 -2
- package/dist/chunks/cli-1.1.34-ff6hyf5n.mjs +0 -2
- package/dist/chunks/cli-1.1.34-ffs3510y.mjs +0 -2
- package/dist/chunks/cli-1.1.34-fgbv1rw4.mjs +0 -17
- package/dist/chunks/cli-1.1.34-fgx6ej2m.mjs +0 -34
- package/dist/chunks/cli-1.1.34-fm4a40ta.mjs +0 -2
- package/dist/chunks/cli-1.1.34-fnds3msv.mjs +0 -6
- package/dist/chunks/cli-1.1.34-ftd1h34q.mjs +0 -2
- package/dist/chunks/cli-1.1.34-g0sqgp9m.mjs +0 -2
- package/dist/chunks/cli-1.1.34-g6kkzzxg.mjs +0 -2
- package/dist/chunks/cli-1.1.34-g7q1qz3e.mjs +0 -2
- package/dist/chunks/cli-1.1.34-g888fgsj.mjs +0 -4
- package/dist/chunks/cli-1.1.34-ge8xp99z.mjs +0 -2
- package/dist/chunks/cli-1.1.34-gmaedxb1.mjs +0 -26
- package/dist/chunks/cli-1.1.34-gsrndv90.mjs +0 -2
- package/dist/chunks/cli-1.1.34-h3ysfavt.mjs +0 -4
- package/dist/chunks/cli-1.1.34-h7927ctg.mjs +0 -2
- package/dist/chunks/cli-1.1.34-h7bcvee5.mjs +0 -2
- package/dist/chunks/cli-1.1.34-h9h6119y.mjs +0 -2
- package/dist/chunks/cli-1.1.34-hdva7ptv.mjs +0 -10
- package/dist/chunks/cli-1.1.34-he92bjvt.mjs +0 -2
- package/dist/chunks/cli-1.1.34-hpn89fzn.mjs +0 -2
- package/dist/chunks/cli-1.1.34-hpt8kch4.mjs +0 -2
- package/dist/chunks/cli-1.1.34-hrw37per.mjs +0 -8
- package/dist/chunks/cli-1.1.34-hsngtgbm.mjs +0 -24
- package/dist/chunks/cli-1.1.34-hyya784q.mjs +0 -2
- package/dist/chunks/cli-1.1.34-j8ab267c.mjs +0 -2
- package/dist/chunks/cli-1.1.34-jkdgk3ns.mjs +0 -2
- package/dist/chunks/cli-1.1.34-jrxh48kf.mjs +0 -4
- package/dist/chunks/cli-1.1.34-jsp1hy0k.mjs +0 -2
- package/dist/chunks/cli-1.1.34-k4zd38bd.mjs +0 -15
- package/dist/chunks/cli-1.1.34-k761g5m2.mjs +0 -2
- package/dist/chunks/cli-1.1.34-k8gmdsqr.mjs +0 -2
- package/dist/chunks/cli-1.1.34-mbeaqq0q.mjs +0 -6
- package/dist/chunks/cli-1.1.34-mhjjf878.mjs +0 -5
- package/dist/chunks/cli-1.1.34-n5t6xk0e.mjs +0 -2
- package/dist/chunks/cli-1.1.34-n5zh4wyg.mjs +0 -42
- package/dist/chunks/cli-1.1.34-ncz9dava.mjs +0 -2
- package/dist/chunks/cli-1.1.34-nr50vg8g.mjs +0 -25
- package/dist/chunks/cli-1.1.34-nxeb9r8s.mjs +0 -2
- package/dist/chunks/cli-1.1.34-p5v4dwpg.mjs +0 -4
- package/dist/chunks/cli-1.1.34-p7yjh2wb.mjs +0 -2
- package/dist/chunks/cli-1.1.34-p9rd6dtm.mjs +0 -2
- package/dist/chunks/cli-1.1.34-q5stzg7k.mjs +0 -2
- package/dist/chunks/cli-1.1.34-q83yydqv.mjs +0 -133
- package/dist/chunks/cli-1.1.34-q8chhxkt.mjs +0 -2
- package/dist/chunks/cli-1.1.34-qc15bhsg.mjs +0 -10
- package/dist/chunks/cli-1.1.34-qef4zhc3.mjs +0 -2
- package/dist/chunks/cli-1.1.34-qs805z7n.mjs +0 -9
- package/dist/chunks/cli-1.1.34-qwd6k5t4.mjs +0 -2
- package/dist/chunks/cli-1.1.34-r222exkd.mjs +0 -2
- package/dist/chunks/cli-1.1.34-r3kdjy4e.mjs +0 -2
- package/dist/chunks/cli-1.1.34-r5dphbcm.mjs +0 -2
- package/dist/chunks/cli-1.1.34-rb7wdjza.mjs +0 -45
- package/dist/chunks/cli-1.1.34-rkx3x9f6.mjs +0 -4
- package/dist/chunks/cli-1.1.34-rqkzp4n2.mjs +0 -2
- package/dist/chunks/cli-1.1.34-rs4xg86x.mjs +0 -2
- package/dist/chunks/cli-1.1.34-s4gsmtx9.mjs +0 -21
- package/dist/chunks/cli-1.1.34-s8c2c7g3.mjs +0 -3
- package/dist/chunks/cli-1.1.34-s9g6mekb.mjs +0 -2
- package/dist/chunks/cli-1.1.34-sfxba1xz.mjs +0 -3
- package/dist/chunks/cli-1.1.34-shm51n5s.mjs +0 -2
- package/dist/chunks/cli-1.1.34-sj1pcnn3.mjs +0 -2
- package/dist/chunks/cli-1.1.34-sq51za8b.mjs +0 -2
- package/dist/chunks/cli-1.1.34-sxpgdyxm.mjs +0 -2
- package/dist/chunks/cli-1.1.34-syx85e6f.mjs +0 -15
- package/dist/chunks/cli-1.1.34-t4rp44p7.mjs +0 -2
- package/dist/chunks/cli-1.1.34-tj5mvsam.mjs +0 -2
- package/dist/chunks/cli-1.1.34-tmwcg7q1.mjs +0 -2
- package/dist/chunks/cli-1.1.34-ty06ehzt.mjs +0 -3
- package/dist/chunks/cli-1.1.34-v2gbtt59.mjs +0 -50
- package/dist/chunks/cli-1.1.34-vdk5kjz7.mjs +0 -15
- package/dist/chunks/cli-1.1.34-vdwfqapw.mjs +0 -2
- package/dist/chunks/cli-1.1.34-vmnqkma9.mjs +0 -2
- package/dist/chunks/cli-1.1.34-vpwwhg8z.mjs +0 -2
- package/dist/chunks/cli-1.1.34-vrsb0pea.mjs +0 -2
- package/dist/chunks/cli-1.1.34-vz14r55x.mjs +0 -3
- package/dist/chunks/cli-1.1.34-w7vjt3vm.mjs +0 -2
- package/dist/chunks/cli-1.1.34-w9ek3z9c.mjs +0 -2
- package/dist/chunks/cli-1.1.34-webjc1s3.mjs +0 -2
- package/dist/chunks/cli-1.1.34-wfb66gsv.mjs +0 -2
- package/dist/chunks/cli-1.1.34-wh74w227.mjs +0 -2
- package/dist/chunks/cli-1.1.34-whbj9gb8.mjs +0 -24
- package/dist/chunks/cli-1.1.34-wqkce8kj.mjs +0 -2
- package/dist/chunks/cli-1.1.34-wwjkncsv.mjs +0 -203
- package/dist/chunks/cli-1.1.34-wwvcrp2d.mjs +0 -2
- package/dist/chunks/cli-1.1.34-xptd4xtb.mjs +0 -2
- package/dist/chunks/cli-1.1.34-xwg0x7p4.mjs +0 -5
- package/dist/chunks/cli-1.1.34-xx555z7d.mjs +0 -25
- package/dist/chunks/cli-1.1.34-yfasvar9.mjs +0 -2
- package/dist/chunks/cli-1.1.34-yk56k2na.mjs +0 -2
- package/dist/chunks/cli-1.1.34-yqryw36t.mjs +0 -2
- package/dist/chunks/cli-1.1.34-yqyrt954.mjs +0 -2
- package/dist/chunks/cli-1.1.34-yrk4mxjw.mjs +0 -16
- package/dist/chunks/cli-1.1.34-z14xw89f.mjs +0 -2
- package/dist/chunks/cli-1.1.34-z1htezxg.mjs +0 -2
- package/dist/chunks/cli-1.1.34-z1tmh10g.mjs +0 -2
- package/dist/chunks/cli-1.1.34-z84fkt5q.mjs +0 -2
- package/dist/chunks/cli-1.1.34-zpsaqq15.mjs +0 -17
- package/dist/chunks/client-1.1.34-4exntck8.mjs +0 -1
- package/dist/chunks/color-1.1.34-d4199wch.mjs +0 -1
- package/dist/chunks/compact-1.1.34-jwr60dt0.mjs +0 -2
- package/dist/chunks/config-1.1.34-acewhfv4.mjs +0 -1
- package/dist/chunks/config-1.1.34-tqzmnvs7.mjs +0 -1
- package/dist/chunks/constants-1.1.34-s2nkrx7g.mjs +0 -1
- package/dist/chunks/context-1.1.34-wc822wp5.mjs +0 -1
- package/dist/chunks/context-noninteractive-1.1.34-59xb33ys.mjs +0 -1
- package/dist/chunks/conversation-1.1.34-5k03q5nt.mjs +0 -1
- package/dist/chunks/copilotHeaders-1.1.34-dkmsvh40.mjs +0 -1
- package/dist/chunks/copy-1.1.34-efb24nm3.mjs +0 -9
- package/dist/chunks/cost-1.1.34-nqqv2xjh.mjs +0 -1
- package/dist/chunks/createSession-1.1.34-69d3ep6s.mjs +0 -1
- package/dist/chunks/debug-1.1.34-k568mcye.mjs +0 -1
- package/dist/chunks/defaultActionDeps-1.1.34-16tn959k.mjs +0 -1480
- package/dist/chunks/desktop-1.1.34-p9x626qf.mjs +0 -2
- package/dist/chunks/detectRepository-1.1.34-rqyapz8m.mjs +0 -1
- package/dist/chunks/detection-1.1.34-5xfznq79.mjs +0 -1
- package/dist/chunks/diff-1.1.34-5ggzgzf5.mjs +0 -1
- package/dist/chunks/doctor-1.1.34-j6mbdd5g.mjs +0 -1
- package/dist/chunks/doctorDiagnostic-1.1.34-spmjpktf.mjs +0 -1
- package/dist/chunks/earlyInput-1.1.34-a0ptf6h4.mjs +0 -1
- package/dist/chunks/effort-1.1.34-9k8mc8ca.mjs +0 -13
- package/dist/chunks/engine-1.1.34-y28mg4na.mjs +0 -1
- package/dist/chunks/envLessBridgeConfig-1.1.34-wm7tybv6.mjs +0 -1
- package/dist/chunks/envUtils-1.1.34-rmsh5nt5.mjs +0 -1
- package/dist/chunks/errors-1.1.34-61fzsrh4.mjs +0 -1
- package/dist/chunks/exampleCommands-1.1.34-8x8b7p9t.mjs +0 -1
- package/dist/chunks/execFileNoThrow-1.1.34-zemxr8xw.mjs +0 -1
- package/dist/chunks/exit-1.1.34-sw6zmmgn.mjs +0 -1
- package/dist/chunks/explorer-1.1.34-3apnqz0a.mjs +0 -1
- package/dist/chunks/export-1.1.34-1hyv5efm.mjs +0 -2
- package/dist/chunks/fast-1.1.34-3d72mbz1.mjs +0 -1
- package/dist/chunks/feedback-1.1.34-k74bh5v8.mjs +0 -16
- package/dist/chunks/git-1.1.34-p3qv0ed3.mjs +0 -1
- package/dist/chunks/githubModelsCredentials-1.1.34-hmjt89m3.mjs +0 -1
- package/dist/chunks/goal-1.1.34-m6dge19b.mjs +0 -4
- package/dist/chunks/headless-1.1.34-hpaadbg6.mjs +0 -2
- package/dist/chunks/heapdump-1.1.34-zc52x1pc.mjs +0 -6
- package/dist/chunks/help-1.1.34-0sgw7jbh.mjs +0 -1
- package/dist/chunks/hooks-1.1.34-8s6pawxx.mjs +0 -1
- package/dist/chunks/hooks-1.1.34-vnm6rywf.mjs +0 -79
- package/dist/chunks/ide-1.1.34-jbcf8ma9.mjs +0 -3
- package/dist/chunks/image-processor-napi-1.1.34-zrk7wvw2.mjs +0 -1
- package/dist/chunks/import-1.1.34-4j35p307.mjs +0 -261
- package/dist/chunks/inboundAttachments-1.1.34-pk5t3y0v.mjs +0 -1
- package/dist/chunks/index-1.1.34-086aty1n.mjs +0 -1
- package/dist/chunks/index-1.1.34-0q46c1bj.mjs +0 -1
- package/dist/chunks/index-1.1.34-2j48ar1m.mjs +0 -1
- package/dist/chunks/index-1.1.34-427npr7a.mjs +0 -1
- package/dist/chunks/index-1.1.34-50d0rg8h.mjs +0 -5
- package/dist/chunks/index-1.1.34-50j6q6gr.mjs +0 -1
- package/dist/chunks/index-1.1.34-ehvgt047.mjs +0 -1
- package/dist/chunks/index-1.1.34-faq1af2v.mjs +0 -1
- package/dist/chunks/index-1.1.34-fvrswew9.mjs +0 -2
- package/dist/chunks/index-1.1.34-mx39dxjj.mjs +0 -30
- package/dist/chunks/index-1.1.34-mxpb8hvr.mjs +0 -9
- package/dist/chunks/index-1.1.34-nye63dch.mjs +0 -1
- package/dist/chunks/index-1.1.34-qmmg0npy.mjs +0 -2
- package/dist/chunks/index-1.1.34-qxa3e3cv.mjs +0 -1
- package/dist/chunks/index-1.1.34-snehdv50.mjs +0 -1
- package/dist/chunks/index-1.1.34-t7jsxdbk.mjs +0 -1
- package/dist/chunks/index-1.1.34-wgm8z1dz.mjs +0 -1
- package/dist/chunks/index-1.1.34-wz64a3d4.mjs +0 -9
- package/dist/chunks/index-1.1.34-x83gwj6g.mjs +0 -23
- package/dist/chunks/index-1.1.34-xa114b8t.mjs +0 -1
- package/dist/chunks/index-1.1.34-y10pcdv1.mjs +0 -1
- package/dist/chunks/index-1.1.34-yqzmcm9y.mjs +0 -1
- package/dist/chunks/index-1.1.34-yxzywg42.mjs +0 -1
- package/dist/chunks/init-1.1.34-jdhgqsrc.mjs +0 -2
- package/dist/chunks/initReplBridge-1.1.34-b0awafmd.mjs +0 -1
- package/dist/chunks/ink-1.1.34-yb3z87en.mjs +0 -1
- package/dist/chunks/insights-1.1.34-a321wxgf.mjs +0 -870
- package/dist/chunks/install-1.1.34-064wyxwb.mjs +0 -1
- package/dist/chunks/install-github-app-1.1.34-smwffy57.mjs +0 -149
- package/dist/chunks/install-slack-app-1.1.34-a5bwj8gk.mjs +0 -1
- package/dist/chunks/interactiveHelpers-1.1.34-pq1b6btm.mjs +0 -1
- package/dist/chunks/keybindings-1.1.34-rq312f3j.mjs +0 -2
- package/dist/chunks/latestVersionCache-1.1.34-x006sta9.mjs +0 -1
- package/dist/chunks/loadAgentsDir-1.1.34-2w0hm9wz.mjs +0 -1
- package/dist/chunks/loadPluginHooks-1.1.34-t9s8mknk.mjs +0 -1
- package/dist/chunks/log-1.1.34-n41t6etn.mjs +0 -1
- package/dist/chunks/main-1.1.34-gh9n8dgw.mjs +0 -1
- package/dist/chunks/managedEnv-1.1.34-qntg5ykr.mjs +0 -1
- package/dist/chunks/mcp-1.1.34-5mtgev8d.mjs +0 -17
- package/dist/chunks/mcp-1.1.34-61dcjzjk.mjs +0 -4
- package/dist/chunks/mcp-1.1.34-9d1py1ez.mjs +0 -1
- package/dist/chunks/mcpb-1.1.34-x9mxeryp.mjs +0 -1
- package/dist/chunks/memory-1.1.34-sys90hns.mjs +0 -128
- package/dist/chunks/model-1.1.34-v1r14fy7.mjs +0 -1
- package/dist/chunks/model-1.1.34-vks7w05g.mjs +0 -2
- package/dist/chunks/node-1.1.34-5b5b2m9b.mjs +0 -1
- package/dist/chunks/node-1.1.34-sdqnj3qm.mjs +0 -15
- package/dist/chunks/oauth-1.1.34-bbmwrswg.mjs +0 -1
- package/dist/chunks/openaiShim-1.1.34-kj2a4r19.mjs +0 -14
- package/dist/chunks/output-style-1.1.34-a4dykckn.mjs +0 -1
- package/dist/chunks/package-F6O7J2XI-1.1.34-291qk0fk.mjs +0 -1
- package/dist/chunks/permissions-1.1.34-bqhsed60.mjs +0 -1
- package/dist/chunks/permissions-1.1.34-xkrhteme.mjs +0 -3
- package/dist/chunks/plan-1.1.34-j7qcpv9s.mjs +0 -1
- package/dist/chunks/plist-1.1.34-ykta36sg.mjs +0 -1
- package/dist/chunks/plugin-1.1.34-vszmzh0r.mjs +0 -29
- package/dist/chunks/pluginStartupCheck-1.1.34-5xap799m.mjs +0 -1
- package/dist/chunks/plugins-1.1.34-6ea553qa.mjs +0 -9
- package/dist/chunks/preActionHook-1.1.34-xy1pecch.mjs +0 -2
- package/dist/chunks/print-1.1.34-2gdkw86g.mjs +0 -57
- package/dist/chunks/process-1.1.34-fms89mxv.mjs +0 -1
- package/dist/chunks/processBashCommand-1.1.34-gcydk2hd.mjs +0 -1
- package/dist/chunks/processSlashCommand-1.1.34-a3q257ff.mjs +0 -9
- package/dist/chunks/prompt-1.1.34-ctfxsw9h.mjs +0 -1
- package/dist/chunks/prompt-1.1.34-wp8mvh7t.mjs +0 -1
- package/dist/chunks/prompts-1.1.34-bmq3swzy.mjs +0 -1
- package/dist/chunks/provider-1.1.34-00xnjkhs.mjs +0 -2
- package/dist/chunks/providerProfiles-1.1.34-psred1pr.mjs +0 -1
- package/dist/chunks/providerValidation-1.1.34-0vamj708.mjs +0 -6
- package/dist/chunks/registerSubcommands-1.1.34-pmqr2nmf.mjs +0 -26
- package/dist/chunks/registry-1.1.34-sapmjhjz.mjs +0 -1
- package/dist/chunks/release-notes-1.1.34-p6wg8evp.mjs +0 -5
- package/dist/chunks/reload-plugins-1.1.34-cd8e00jp.mjs +0 -2
- package/dist/chunks/remote-env-1.1.34-fpepp6cm.mjs +0 -1
- package/dist/chunks/remoteBridgeCore-1.1.34-mmxz0ypj.mjs +0 -1
- package/dist/chunks/rename-1.1.34-gwdavcb8.mjs +0 -1
- package/dist/chunks/replLauncher-1.1.34-5yvyazea.mjs +0 -1
- package/dist/chunks/resume-1.1.34-9abwrf3b.mjs +0 -2
- package/dist/chunks/rewind-1.1.34-qf51de9x.mjs +0 -1
- package/dist/chunks/rootOptions-1.1.34-dkd3s4x5.mjs +0 -1
- package/dist/chunks/runWorkflowHeadless-1.1.34-c0j2ym4w.mjs +0 -10
- package/dist/chunks/sandbox-adapter-1.1.34-ad556paa.mjs +0 -1
- package/dist/chunks/sandbox-toggle-1.1.34-1x2ddxv2.mjs +0 -1
- package/dist/chunks/session-1.1.34-h46ywygv.mjs +0 -2
- package/dist/chunks/sessionStorage-1.1.34-tc7rwcvm.mjs +0 -1
- package/dist/chunks/settings-1.1.34-bk3tb34s.mjs +0 -1
- package/dist/chunks/setup-1.1.34-3ddxnk01.mjs +0 -12
- package/dist/chunks/sinks-1.1.34-ww0tcz6j.mjs +0 -1
- package/dist/chunks/skills-1.1.34-3ybbxgjn.mjs +0 -1
- package/dist/chunks/startupProfiler-1.1.34-7z13z7v7.mjs +0 -1
- package/dist/chunks/startupUpdateCheck-1.1.34-45fyr9wz.mjs +0 -1
- package/dist/chunks/state-1.1.34-pymefs1m.mjs +0 -1
- package/dist/chunks/stats-1.1.34-4jw41qjm.mjs +0 -1
- package/dist/chunks/status-1.1.34-r120pa8k.mjs +0 -1
- package/dist/chunks/stickers-1.1.34-5zsfjhdn.mjs +0 -1
- package/dist/chunks/subprocessEnv-1.1.34-44r7jf62.mjs +0 -1
- package/dist/chunks/tasks-1.1.34-1mhjk4hs.mjs +0 -1
- package/dist/chunks/teamHelpers-1.1.34-jfmrh1r7.mjs +0 -1
- package/dist/chunks/teammateModeSnapshot-1.1.34-m47hpvj2.mjs +0 -1
- package/dist/chunks/teleport-1.1.34-g7gk9g3q.mjs +0 -1
- package/dist/chunks/terminalSetup-1.1.34-8e12gzad.mjs +0 -1
- package/dist/chunks/theme-1.1.34-bvmx3zyc.mjs +0 -1
- package/dist/chunks/thinkback-1.1.34-bz9h3qn7.mjs +0 -1
- package/dist/chunks/thinkback-play-1.1.34-azysb61e.mjs +0 -1
- package/dist/chunks/toolPool-1.1.34-tewk9s1e.mjs +0 -1
- package/dist/chunks/toolSearch-1.1.34-70r6c6d3.mjs +0 -1
- package/dist/chunks/tools-1.1.34-a7jpjvb5.mjs +0 -1
- package/dist/chunks/trustedDevice-1.1.34-jhn5330j.mjs +0 -1
- package/dist/chunks/turndown.cjs-1.1.34-8ve160tv.mjs +0 -69
- package/dist/chunks/types-1.1.34-0as4p0wf.mjs +0 -1
- package/dist/chunks/ultrareviewCommand-1.1.34-b7bpj27y.mjs +0 -4
- package/dist/chunks/update-1.1.34-wnetpcv6.mjs +0 -72
- package/dist/chunks/upload-1.1.34-3cdkjhmm.mjs +0 -7
- package/dist/chunks/upstreamproxy-1.1.34-x376823n.mjs +0 -14
- package/dist/chunks/usage-1.1.34-h5bv8trt.mjs +0 -1
- package/dist/chunks/util-1.1.34-7ctz504f.mjs +0 -1
- package/dist/chunks/utils-1.1.34-h9r9ybtj.mjs +0 -1
- package/dist/chunks/vim-1.1.34-4y4504z8.mjs +0 -1
- package/dist/chunks/watchLoop-1.1.34-tnjnpc05.mjs +0 -13
- package/dist/chunks/wiki-1.1.34-53n04tv3.mjs +0 -132
- package/dist/chunks/workflows-1.1.34-zefy425g.mjs +0 -1
- package/dist/chunks/worktree-1.1.34-gzm7041w.mjs +0 -1
- package/dist/chunks/worktreeModeEnabled-1.1.34-x9qxm01a.mjs +0 -1
- package/dist/chunks/wrapper-1.1.34-jmcmxyrm.mjs +0 -7
- /package/dist/chunks/{cli-1.1.34-1426jsf4.mjs → cli-1.1.35-hnqagxgk.mjs} +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import{we as HY,xe as kz}from"./cli-1.1.35-ta15z2yx.mjs";import{Rg as BY,Sg as Oz}from"./cli-1.1.35-jajp8grw.mjs";import{Bx as pY,Cx as mz,Fr as Xz,Fx as UJ,GL as lY,Gr as HK,Gx as XY,HS as eY,Hx as EJ,IO as Kz,Ix as VY,JO as VK,JP as nY,Jx as kJ,KP as _z,Kx as GY,Ox as uY,Px as hY,Rx as Lz,Sx as $Y,Tx as Iz,ZL as rY,aM as XJ,bM as VZ,cH as iY,cL as qY,cM as X0,dH as xz,eQ as dY,fQ as Sz,hL as Dz,iF as B0,iT as V0,jF as MY,pF as cY,qF as bz,qm as SY,rF as gY,rm as yz,sF as fz,wx as uJ,yx as UY}from"./cli-1.1.35-hy9jtbmb.mjs";import{EX as x0,IX as IY,LY as xY,NY as Tz,PX as bY,QX as Fz,QY as m,SY as N,lZ as _Y,sY as fY,xZ as U0}from"./cli-1.1.35-dw3fv0g8.mjs";import{$2 as X,a3 as y,b3 as LJ}from"./cli-1.1.35-b0n88pf7.mjs";import{c3 as f0}from"./cli-1.1.35-bq7wadxz.mjs";import{B5 as XK,_4 as zz}from"./cli-1.1.35-s85hd24a.mjs";import{D7 as c0,E7 as wz}from"./cli-1.1.35-a9y8qxsj.mjs";import{Eba as mY,Eha as LY,Sba as Az,nca as r0,pca as UK,wha as IJ,zha as n0}from"./cli-1.1.35-dnacc640.mjs";import{$ha as b0,Hha as p0,Iha as vz,Kha as G0,Vha as KY,Wha as g0}from"./cli-1.1.35-r4rm2297.mjs";import{Fka as vJ,Ika as KK,jka as Yz,nka as zK}from"./cli-1.1.35-a7ygtwdr.mjs";import{Jqa as yY,ema as TY,kma as H0}from"./cli-1.1.35-1ceb2tjb.mjs";import{Tra as zZ,Xra as KZ}from"./cli-1.1.35-c05841mj.mjs";function PY(Z){let J=QY.c(33),{log:K,onExit:Q,onSelect:q}=Z,[P,W]=I0.default.useState(null),j,T;if(J[0]!==K)j=()=>{if(W(null),VZ(K))X0(K).then(W)},T=[K],J[0]=K,J[1]=j,J[2]=T;else j=J[1],T=J[2];I0.default.useEffect(j,T);let u=VZ(K)&&P===null,V=P??K,k;if(J[3]!==V)k=XJ(V)||"",J[3]=V,J[4]=k;else k=J[4];let D=k,b;if(J[5]===Symbol.for("react.memo_cache_sentinel"))b=qY(),J[5]=b;else b=J[5];let C=b,ZJ;if(J[6]===Symbol.for("react.memo_cache_sentinel"))ZJ={context:"Confirmation"},J[6]=ZJ;else ZJ=J[6];uJ("confirm:no",Q,ZJ);let _;if(J[7]!==P||J[8]!==K||J[9]!==q)_=()=>{q(P??K)},J[7]=P,J[8]=K,J[9]=q,J[10]=_;else _=J[10];let h=_,v;if(J[11]===Symbol.for("react.memo_cache_sentinel"))v={context:"Confirmation"},J[11]=v;else v=J[11];if(uJ("confirm:yes",h,v),u){let I;if(J[12]===Symbol.for("react.memo_cache_sentinel"))I=X(BY,{message:"Loading session…"}),J[12]=I;else I=J[12];let qJ;if(J[13]===Symbol.for("react.memo_cache_sentinel"))qJ=y(m,{flexDirection:"column",padding:1,children:[I,X(N,{dimColor:!0,children:X(kJ,{children:X(EJ,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"cancel"})})})]}),J[13]=qJ;else qJ=J[13];return qJ}let R;if(J[14]===Symbol.for("react.memo_cache_sentinel"))R=[],J[14]=R;else R=J[14];let S,f;if(J[15]===Symbol.for("react.memo_cache_sentinel"))f=[],S=new Set,J[15]=S,J[16]=f;else S=J[15],f=J[16];let w;if(J[17]===Symbol.for("react.memo_cache_sentinel"))w=[],J[17]=w;else w=J[17];let VJ;if(J[18]!==D||J[19]!==V.messages)VJ=X(HY,{messages:V.messages,tools:C,commands:R,verbose:!0,toolJSX:null,toolUseConfirmQueue:f,inProgressToolUseIDs:S,isMessageSelectorVisible:!1,conversationId:D,screen:"transcript",streamingToolUses:w,showAllInTranscript:!0,isLoading:!1}),J[18]=D,J[19]=V.messages,J[20]=VJ;else VJ=J[20];let o;if(J[21]!==V.modified)o=KY(V.modified),J[21]=V.modified,J[22]=o;else o=J[22];let s=V.gitBranch?` · ${V.gitBranch}`:"",c;if(J[23]!==V.messageCount||J[24]!==o||J[25]!==s)c=y(N,{children:[o," ·"," ",V.messageCount," messages",s]}),J[23]=V.messageCount,J[24]=o,J[25]=s,J[26]=c;else c=J[26];let $;if(J[27]===Symbol.for("react.memo_cache_sentinel"))$=X(N,{dimColor:!0,children:y(kJ,{children:[X(UJ,{shortcut:"Enter",action:"resume"}),X(EJ,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"cancel"})]})}),J[27]=$;else $=J[27];let A;if(J[28]!==c)A=y(m,{flexShrink:0,flexDirection:"column",borderTopDimColor:!0,borderBottom:!1,borderLeft:!1,borderRight:!1,borderStyle:"single",paddingLeft:2,children:[c,$]}),J[28]=c,J[29]=A;else A=J[29];let bJ;if(J[30]!==VJ||J[31]!==A)bJ=y(m,{flexDirection:"column",children:[VJ,A]}),J[30]=VJ,J[31]=A,J[32]=bJ;else bJ=J[32];return bJ}var QY,I0;var DY=KZ(()=>{U0();UY();Dz();b0();V0();VY();GY();XY();Oz();kz();LJ();QY=zZ(x0(),1),I0=zZ(f0(),1)});function Cz(Z,J){if(Z===_0)return _0.length+GZ;let K=p0(Z),Q=J?Math.min(K,J-GZ-S0):K;return Math.max(0,Q)+GZ+S0}function Mz(Z,J){let K=J-GZ-S0;if(p0(Z)<=K)return Z;if(K<=1)return Z.charAt(0);return G0(Z,K)}function EY({tabs:Z,selectedIndex:J,availableWidth:K,showAllProjects:Q=!1}){let q=Q?"Resume (All Projects)":"Resume",P=q.length+1,W=Math.max(Nz,Ez),j=K-P-W-2,T=Math.max(0,Math.min(J,Z.length-1)),u=Math.max(20,Math.floor(j/2)),V=Z.map((v)=>Cz(v,u)),k=0,D=Z.length;if(V.reduce((v,R,S)=>v+R+(S<V.length-1?1:0),0)>j){let v=j-Wz,R=V[T]??0;k=T,D=T+1;while(k>0||D<Z.length){let S=k>0,f=D<Z.length;if(S){let w=(V[k-1]??0)+1;if(R+w<=v){k--,R+=w;continue}}if(f){let w=(V[D]??0)+1;if(R+w<=v){D++,R+=w;continue}}break}}let C=k,ZJ=Z.length-D,_=Z.slice(k,D),h=_.map((v,R)=>k+R);return y(m,{flexDirection:"row",gap:1,children:[X(N,{color:"suggestion",children:q}),C>0&&y(N,{dimColor:!0,children:[OY,C]}),_.map((v,R)=>{let f=h[R]===T,w=v===_0?v:`#${Mz(v,u-GZ)}`;return y(N,{backgroundColor:f?"suggestion":void 0,color:f?"inverseText":void 0,bold:f,children:[" ",w," "]},v)}),ZJ>0?y(N,{dimColor:!0,children:[kY,ZJ,vY]}):X(N,{dimColor:!0,children:WY})]})}var _0="All",GZ=2,S0=1,OY="← ",kY="→",vY=" (tab to cycle)",WY="(tab to cycle)",NY=2,Wz,Nz,Ez;var CY=KZ(()=>{vz();U0();b0();LJ();Wz=OY.length+NY+1,Nz=kY.length+NY+vY.length,Ez=WY.length});function RY(Z){let J=jY.c(48),{nodes:K,onSelect:Q,onCancel:q,onFocus:P,focusNodeId:W,visibleOptionCount:j,layout:T,isDisabled:u,hideIndexes:V,isNodeExpanded:k,onExpand:D,onCollapse:b,getParentPrefix:C,getChildPrefix:ZJ,onUpFromFirstItem:_}=Z,h=T===void 0?"expanded":T,v=u===void 0?!1:u,R=V===void 0?!1:V,S;if(J[0]===Symbol.for("react.memo_cache_sentinel"))S=new Set,J[0]=S;else S=J[0];let[f,w]=q0.default.useState(S),VJ=q0.default.useRef(!1),o=q0.default.useRef(null),s;if(J[1]!==f||J[2]!==k)s=(U)=>{if(k)return k(U);return f.has(U)},J[1]=f,J[2]=k,J[3]=s;else s=J[3];let c=s,$;if(J[4]!==c||J[5]!==K){let U=function(B,t,RJ){let wJ=!!B.children&&B.children.length>0,UZ=c(B.id);if($.push({node:B,depth:t,isExpanded:UZ,hasChildren:wJ,parentId:RJ}),wJ&&UZ&&B.children)for(let Q0 of B.children)U(Q0,t+1,B.id)};$=[];for(let B of K)U(B,0);J[4]=c,J[5]=K,J[6]=$}else $=J[6];let A=$,bJ=Rz,I=jz,qJ=C??bJ,g=ZJ??I,hJ;if(J[7]!==g||J[8]!==qJ)hJ=(U)=>{let B="";if(U.hasChildren)B=qJ(U.isExpanded);else if(U.depth>0)B=g(U.depth);return B+U.node.label},J[7]=g,J[8]=qJ,J[9]=hJ;else hJ=J[9];let i=hJ,$J;if(J[10]!==i||J[11]!==A)$J=A.map((U)=>({label:i(U),description:U.node.description,dimDescription:U.node.dimDescription??!0,value:U.node.id})),J[10]=i,J[11]=A,J[12]=$J;else $J=J[12];let l=$J,fJ;if(J[13]!==A)fJ=new Map,A.forEach((U)=>fJ.set(U.node.id,U.node)),J[13]=A,J[14]=fJ;else fJ=J[14];let r=fJ,CJ;if(J[15]!==A)CJ=(U)=>A.find((B)=>B.node.id===U),J[15]=A,J[16]=CJ;else CJ=J[16];let n=CJ,BJ;if(J[17]!==n||J[18]!==b||J[19]!==D)BJ=(U,B)=>{let t=n(U);if(!t||!t.hasChildren)return;if(B)if(D)D(U);else w((RJ)=>new Set(RJ).add(U));else if(b)b(U);else w((RJ)=>{let wJ=new Set(RJ);return wJ.delete(U),wJ})},J[17]=n,J[18]=b,J[19]=D,J[20]=BJ;else BJ=J[20];let WJ=BJ,cJ;if(J[21]!==n||J[22]!==W||J[23]!==v||J[24]!==r||J[25]!==P||J[26]!==WJ)cJ=(U)=>{if(!W||v)return;let B=n(W);if(!B)return;if(U.key==="right"&&B.hasChildren)U.preventDefault(),WJ(W,!0);else if(U.key==="left"){if(B.hasChildren&&B.isExpanded)U.preventDefault(),WJ(W,!1);else if(B.parentId!==void 0){if(U.preventDefault(),VJ.current=!0,WJ(B.parentId,!1),P){let t=r.get(B.parentId);if(t)P(t)}}}},J[21]=n,J[22]=W,J[23]=v,J[24]=r,J[25]=P,J[26]=WJ,J[27]=cJ;else cJ=J[27];let MJ=cJ,GJ;if(J[28]!==r||J[29]!==Q)GJ=(U)=>{let B=r.get(U);if(!B)return;Q(B)},J[28]=r,J[29]=Q,J[30]=GJ;else GJ=J[30];let gJ=GJ,HJ;if(J[31]!==r||J[32]!==P)HJ=(U)=>{if(VJ.current){VJ.current=!1;return}if(o.current===U)return;if(o.current=U,P){let B=r.get(U);if(B)P(B)}},J[31]=r,J[32]=P,J[33]=HJ;else HJ=J[33];let jJ=HJ,d;if(J[34]!==W||J[35]!==gJ||J[36]!==jJ||J[37]!==R||J[38]!==v||J[39]!==h||J[40]!==q||J[41]!==_||J[42]!==l||J[43]!==j)d=X(B0,{options:l,onChange:gJ,onFocus:jJ,onCancel:q,defaultFocusValue:W,visibleOptionCount:j,layout:h,isDisabled:v,hideIndexes:R,onUpFromFirstItem:_}),J[34]=W,J[35]=gJ,J[36]=jJ,J[37]=R,J[38]=v,J[39]=h,J[40]=q,J[41]=_,J[42]=l,J[43]=j,J[44]=d;else d=J[44];let xJ;if(J[45]!==MJ||J[46]!==d)xJ=X(m,{tabIndex:0,autoFocus:!0,onKeyDown:MJ,children:d}),J[45]=MJ,J[46]=d,J[47]=xJ;else xJ=J[47];return xJ}function jz(Z){return" ▸ "}function Rz(Z){return Z?"▼ ":"▶ "}var jY,q0;var wY=KZ(()=>{U0();MY();LJ();jY=zZ(x0(),1),q0=zZ(f0(),1)});function oY(Z,J){let K=Z.replace(/\s+/g," ").trim();return G0(K,J)}function GU(Z){return sY+Z*tY+2}function u0({before:Z,match:J,after:K},Q){return c0.dim(Z)+Q(J)+c0.dim(K)}function iz(Z,J,K){let Q=Z.toLowerCase().indexOf(J.toLowerCase());if(Q===-1)return null;let q=Q+J.length,P=Math.max(0,Q-K),W=Math.min(Z.length,q+K),j=Z.slice(P,Q),T=Z.slice(Q,q),u=Z.slice(q,W);return{before:(P>0?"…":"")+j.replace(/\s+/g," ").trimStart(),match:T.trim(),after:u.replace(/\s+/g," ").trimEnd()+(W<Z.length?"…":"")}}function h0(Z,J,K){let{isGroupHeader:Q=!1,isChild:q=!1,forkCount:P=0}=K||{},W=Q&&P>0?pz:q?uz:0,j=Q&&P>0?` (+${P} other ${P===1?"session":"sessions"})`:"",T=Z.isSidechain?" (sidechain)":"",u=J-W-T.length-j.length;return`${oY(IJ(Z),u)}${T}${j}`}function $0(Z,J){let{isChild:K=!1,showProjectPath:Q=!1}=J||{},q=K?" ":"",P=g0(Z),W=Q&&Z.projectPath?` · ${Z.projectPath}`:"";return q+P+W}function qU(Z){let J=aY.c(247),{logs:K,maxHeight:Q,forceWidth:q,onCancel:P,onSelect:W,onLogsChanged:j,onLoadMore:T,initialSearchQuery:u,showAllProjects:V,onToggleAllProjects:k,onAgenticSearch:D}=Z,b=Q===void 0?1/0:Q,C=V===void 0?!1:V,ZJ=SY(),_=uY(),h=hY(ZJ),v=q===void 0?h.columns:q,R=pY(P),S=fY(),f;if(J[0]===Symbol.for("react.memo_cache_sentinel"))f=rY(),J[0]=f;else f=J[0];let w=f,VJ=!1,[o]=IY(),s;if(J[1]!==o)s=xY(o),J[1]=o,J[2]=s;else s=J[2];let c=s,$;if(J[3]!==c.warning)$=(Y)=>bY(Y,c.warning),J[3]=c.warning,J[4]=$;else $=J[4];let A=$,bJ=!1,[I,qJ]=E.default.useState(null),[g,hJ]=E.default.useState(!1),[i,$J]=E.default.useState(!1),[l,fJ]=E.default.useState(!1),r;if(J[5]===Symbol.for("react.memo_cache_sentinel"))r=H0(),J[5]=r;else r=J[5];let CJ=r,[n,BJ]=E.default.useState(""),[WJ,cJ]=E.default.useState(0),MJ;if(J[6]===Symbol.for("react.memo_cache_sentinel"))MJ=new Set,J[6]=MJ;else MJ=J[6];let[GJ,gJ]=E.default.useState(MJ),[HJ,jJ]=E.default.useState(null),[d,xJ]=E.default.useState(1),[U,B]=E.default.useState("list"),[t,RJ]=E.default.useState(null),wJ=E.default.useRef(null),[UZ,Q0]=E.default.useState(0),qZ;if(J[7]===Symbol.for("react.memo_cache_sentinel"))qZ={status:"idle"},J[7]=qZ;else qZ=J[7];let[G,XZ]=E.default.useState(qZ),[e,BZ]=E.default.useState(!1),HZ=E.default.useRef(null),P0=U==="search"&&G.status!=="searching",QZ,PZ,DZ;if(J[8]===Symbol.for("react.memo_cache_sentinel"))QZ=()=>{B("list")},PZ=()=>{B("list")},DZ=["n"],J[8]=QZ,J[9]=PZ,J[10]=DZ;else QZ=J[8],PZ=J[9],DZ=J[10];let D0=u||"",OZ;if(J[11]!==D0||J[12]!==P0)OZ={isActive:P0,onExit:QZ,onExitUp:PZ,passthroughCtrlKeys:DZ,initialQuery:D0},J[11]=D0,J[12]=P0,J[13]=OZ;else OZ=J[13];let{query:F,setQuery:iJ,cursorOffset:O0}=cY(OZ),AJ=E.default.useDeferredValue(F),[YJ,d0]=E.default.useState(""),kZ,vZ;if(J[14]!==AJ)kZ=()=>{if(!AJ){d0("");return}let Y=setTimeout(d0,300,AJ);return()=>clearTimeout(Y)},vZ=[AJ],J[14]=AJ,J[15]=kZ,J[16]=vZ;else kZ=J[15],vZ=J[16];E.default.useEffect(kZ,vZ);let[FJ,a0]=E.default.useState(null),[k0,o0]=E.default.useState(!1),WZ,NZ;if(J[17]===Symbol.for("react.memo_cache_sentinel"))WZ=()=>{mY().then((Y)=>qJ(Y)),dY(CJ).then((Y)=>{fJ(Y.length>1)})},NZ=[CJ],J[17]=WZ,J[18]=NZ;else WZ=J[17],NZ=J[18];E.default.useEffect(WZ,NZ);let PK=new Map(K.map(sz)),Vz;Vz=null;let EZ;if(J[19]!==K)EZ=ZK(K),J[19]=K,J[20]=EZ;else EZ=J[20];let lJ=EZ,QJ=lJ.length>0,CZ;if(J[21]!==QJ||J[22]!==lJ)CZ=QJ?["All",...lJ]:[],J[21]=QJ,J[22]=lJ,J[23]=CZ;else CZ=J[23];let zJ=CZ,MZ=zJ.length>0&&UZ<zJ.length?UZ:0,s0=zJ[MZ],rJ=s0==="All"?void 0:s0,Gz=QJ?1:0,a=K;if(w){let Y;if(J[24]!==K)Y=K.filter(oz),J[24]=K,J[25]=Y;else Y=J[25];a=Y}if(rJ!==void 0){let Y;if(J[26]!==a||J[27]!==rJ){let z;if(J[29]!==rJ)z=(H)=>H.tag===rJ,J[29]=rJ,J[30]=z;else z=J[30];Y=a.filter(z),J[26]=a,J[27]=rJ,J[28]=Y}else Y=J[28];a=Y}if(g&&I){let Y;if(J[31]!==I||J[32]!==a){let z;if(J[34]!==I)z=(H)=>H.gitBranch===I,J[34]=I,J[35]=z;else z=J[35];Y=a.filter(z),J[31]=I,J[32]=a,J[33]=Y}else Y=J[33];a=Y}if(l&&!i){let Y;if(J[36]!==a){let z;if(J[38]===Symbol.for("react.memo_cache_sentinel"))z=(H)=>H.projectPath===CJ,J[38]=z;else z=J[38];Y=a.filter(z),J[36]=a,J[37]=Y}else Y=J[37];a=Y}let jZ=a,v0;J:{if(!F){v0=jZ;break J}let Y;if(J[39]!==jZ||J[40]!==F){let z=F.toLowerCase();Y=jZ.filter((H)=>{let M=IJ(H).toLowerCase(),p=(H.gitBranch||"").toLowerCase(),x=(H.tag||"").toLowerCase(),pJ=H.prNumber?`pr #${H.prNumber} ${H.prRepository||""}`.toLowerCase():"";return M.includes(z)||p.includes(z)||x.includes(z)||pJ.includes(z)}),J[39]=jZ,J[40]=F,J[41]=Y}else Y=J[41];v0=Y}let W0=v0,RZ,wZ;if(J[42]!==YJ||J[43]!==AJ)RZ=()=>{},wZ=[AJ,YJ,!1],J[42]=YJ,J[43]=AJ,J[44]=RZ,J[45]=wZ;else RZ=J[44],wZ=J[45];E.default.useEffect(RZ,wZ);let AZ,FZ;if(J[46]!==YJ)AZ=()=>{a0(null),o0(!1);return},FZ=[YJ,null,!1],J[46]=YJ,J[47]=AZ,J[48]=FZ;else AZ=J[47],FZ=J[48];E.default.useEffect(AZ,FZ);let JJ,_J;if(J[49]!==YJ||J[50]!==FJ||J[51]!==W0){if(_J=new Map,JJ=W0,FJ&&YJ&&FJ.query===YJ){for(let M of FJ.results)if(M.searchableText){let p=iz(M.searchableText,YJ,gz);if(p)_J.set(M.log,p)}let Y;if(J[54]!==JJ)Y=new Set(JJ.map(rz)),J[54]=JJ,J[55]=Y;else Y=J[55];let z=Y,H;if(J[56]!==FJ.results||J[57]!==JJ||J[58]!==z){let M;if(J[60]!==z)M=(x)=>!z.has(x.messages[0]?.uuid),J[60]=z,J[61]=M;else M=J[61];let p=FJ.results.map(lz).filter(M);H=[...JJ,...p],J[56]=FJ.results,J[57]=JJ,J[58]=z,J[59]=H}else H=J[59];JJ=H}J[49]=YJ,J[50]=FJ,J[51]=W0,J[52]=JJ,J[53]=_J}else JJ=J[52],_J=J[53];let TZ;if(J[62]!==JJ||J[63]!==_J)TZ={filteredLogs:JJ,snippets:_J},J[62]=JJ,J[63]=_J,J[64]=TZ;else TZ=J[64];let{filteredLogs:SJ,snippets:NJ}=TZ,N0;J:{if(G.status==="results"&&G.results.length>0){N0=G.results;break J}N0=SJ}let O=N0,PJ=Math.max(30,v-4),E0;J:{if(!w){let z;if(J[65]===Symbol.for("react.memo_cache_sentinel"))z=[],J[65]=z;else z=J[65];E0=z;break J}let Y;if(J[66]!==O||J[67]!==A||J[68]!==PJ||J[69]!==C||J[70]!==NJ){let z=JK(O);Y=Array.from(z.entries()).map((H)=>{let[M,p]=H,x=p[0],pJ=O.indexOf(x),TJ=NJ.get(x),yJ=TJ?u0(TJ,A):null;if(p.length===1){let mJ=$0(x,{showProjectPath:C});return{id:`log:${M}:0`,value:{log:x,indexInFiltered:pJ},label:h0(x,PJ),description:yJ?`${mJ}
|
|
2
|
+
${yJ}`:mJ,dimDescription:!0}}let z0=p.length-1,K0=p.slice(1).map((mJ,Qz)=>{let Pz=O.indexOf(mJ),ZY=NJ.get(mJ),YY=ZY?u0(ZY,A):null,zY=$0(mJ,{isChild:!0,showProjectPath:C});return{id:`log:${M}:${Qz+1}`,value:{log:mJ,indexInFiltered:Pz},label:h0(mJ,PJ,{isChild:!0}),description:YY?`${zY}
|
|
3
|
+
${YY}`:zY,dimDescription:!0}}),JY=$0(x,{showProjectPath:C});return{id:`group:${M}`,value:{log:x,indexInFiltered:pJ},label:h0(x,PJ,{isGroupHeader:!0,forkCount:z0}),description:yJ?`${JY}
|
|
4
|
+
${yJ}`:JY,dimDescription:!0,children:K0}}),J[66]=O,J[67]=A,J[68]=PJ,J[69]=C,J[70]=NJ,J[71]=Y}else Y=J[71];E0=Y}let DJ=E0,C0;J:{if(w){let z;if(J[72]===Symbol.for("react.memo_cache_sentinel"))z=[],J[72]=z;else z=J[72];C0=z;break J}let Y;if(J[73]!==O||J[74]!==A||J[75]!==PJ||J[76]!==C||J[77]!==NJ){let z;if(J[79]!==A||J[80]!==PJ||J[81]!==C||J[82]!==NJ)z=(H,M)=>{let x=IJ(H)+(H.isSidechain?" (sidechain)":""),pJ=oY(x,PJ),TJ=g0(H),yJ=C&&H.projectPath?` · ${H.projectPath}`:"",z0=NJ.get(H),K0=z0?u0(z0,A):null;return{label:pJ,description:K0?`${TJ}${yJ}
|
|
5
|
+
${K0}`:TJ+yJ,dimDescription:!0,value:M.toString()}},J[79]=A,J[80]=PJ,J[81]=C,J[82]=NJ,J[83]=z;else z=J[83];Y=O.map(z),J[73]=O,J[74]=A,J[75]=PJ,J[76]=C,J[77]=NJ,J[78]=Y}else Y=J[78];C0=Y}let M0=C0,L=HJ?.value.log??null,yZ;if(J[84]!==O||J[85]!==GJ||J[86]!==L)yZ=()=>{if(!w||!L)return"";let Y=XJ(L);if(!Y)return"";let z=O.filter((x)=>XJ(x)===Y);if(!(z.length>1))return"";let M=GJ.has(Y);if(z.indexOf(L)>0)return"← to collapse";return M?"← to collapse":"→ to expand"},J[84]=O,J[85]=GJ,J[86]=L,J[87]=yZ;else yZ=J[87];let mZ=yZ,LZ;if(J[88]!==L||J[89]!==j||J[90]!==n)LZ=async()=>{let Y=L?XJ(L):void 0;if(!L||!Y){B("list"),BJ("");return}if(n.trim()){if(await eY(Y,n.trim(),L.fullPath),w&&j)j()}B("list"),BJ("")},J[88]=L,J[89]=j,J[90]=n,J[91]=LZ;else LZ=J[91];let j0=LZ,IZ;if(J[92]===Symbol.for("react.memo_cache_sentinel"))IZ=()=>{B("list")},J[92]=IZ;else IZ=J[92];let qz=IZ,bZ;if(J[93]===Symbol.for("react.memo_cache_sentinel"))bZ=()=>{B("search")},J[93]=bZ;else bZ=J[93];let t0=bZ,fZ;if(J[94]!==K||J[95]!==D||J[96]!==F)fZ=async()=>{F.trim();return},J[94]=K,J[95]=D,J[96]=F,J[97]=fZ;else fZ=J[97];let R0=fZ,xZ;if(J[98]!==G.query||J[99]!==G.status||J[100]!==F)xZ=()=>{if(G.status!=="idle"&&G.status!=="searching"){if(G.status==="results"&&G.query!==F||G.status==="error")XZ({status:"idle"})}},J[98]=G.query,J[99]=G.status,J[100]=F,J[101]=xZ;else xZ=J[101];let _Z;if(J[102]!==G||J[103]!==F)_Z=[F,G],J[102]=G,J[103]=F,J[104]=_Z;else _Z=J[104];E.default.useEffect(xZ,_Z);let SZ,pZ;if(J[105]===Symbol.for("react.memo_cache_sentinel"))SZ=()=>()=>{HZ.current?.abort()},pZ=[],J[105]=SZ,J[106]=pZ;else SZ=J[105],pZ=J[106];E.default.useEffect(SZ,pZ);let e0=E.default.useRef(G.status),uZ;if(J[107]!==G.status||J[108]!==O[0]||J[109]!==O.length||J[110]!==DJ)uZ=()=>{let Y=e0.current;if(e0.current=G.status,Y==="searching"&&G.status==="results"){if(w&&DJ.length>0)jJ(DJ[0]);else if(!w&&O.length>0){let z=O[0];jJ({id:"0",value:{log:z,indexInFiltered:0},label:""})}}},J[107]=G.status,J[108]=O[0],J[109]=O.length,J[110]=DJ,J[111]=uZ;else uZ=J[111];let hZ;if(J[112]!==G.status||J[113]!==O||J[114]!==DJ)hZ=[G.status,w,DJ,O],J[112]=G.status,J[113]=O,J[114]=DJ,J[115]=hZ;else hZ=J[115];E.default.useEffect(uZ,hZ);let $Z;if(J[116]!==O)$Z=(Y)=>{let z=parseInt(Y,10),H=O[z];if(!H||wJ.current===z.toString())return;wJ.current=z.toString(),jJ({id:z.toString(),value:{log:H,indexInFiltered:z},label:""}),xJ(z+1)},J[116]=O,J[117]=$Z;else $Z=J[117];let w0=$Z,cZ;if(J[118]!==O)cZ=(Y)=>{jJ(Y);let z=O.findIndex((H)=>XJ(H)===XJ(Y.value.log));if(z>=0)xJ(z+1)},J[118]=O,J[119]=cZ;else cZ=J[119];let A0=cZ,gZ;if(J[120]===Symbol.for("react.memo_cache_sentinel"))gZ=()=>{HZ.current?.abort(),XZ({status:"idle"})},J[120]=gZ;else gZ=J[120];let F0=U!=="preview"&&G.status==="searching",iZ;if(J[121]!==F0)iZ={context:"Confirmation",isActive:F0},J[121]=F0,J[122]=iZ;else iZ=J[122];uJ("confirm:no",gZ,iZ);let lZ;if(J[123]===Symbol.for("react.memo_cache_sentinel"))lZ=()=>{B("list"),BJ("")},J[123]=lZ;else lZ=J[123];let T0=U==="rename"&&G.status!=="searching",rZ;if(J[124]!==T0)rZ={context:"Settings",isActive:T0},J[124]=T0,J[125]=rZ;else rZ=J[125];uJ("confirm:no",lZ,rZ);let nZ;if(J[126]!==P||J[127]!==iJ)nZ=()=>{iJ(""),BZ(!1),P?.()},J[126]=P,J[127]=iJ,J[128]=nZ;else nZ=J[128];let y0=U!=="preview"&&U!=="rename"&&U!=="search"&&e&&G.status!=="searching",dZ;if(J[129]!==y0)dZ={context:"Confirmation",isActive:y0},J[129]=y0,J[130]=dZ;else dZ=J[130];uJ("confirm:no",nZ,dZ);let aZ;if(J[131]!==G.status||J[132]!==g||J[133]!==L||J[134]!==R0||J[135]!==l||J[136]!==QJ||J[137]!==e||J[138]!==D||J[139]!==k||J[140]!==F||J[141]!==iJ||J[142]!==C||J[143]!==i||J[144]!==zJ||J[145]!==lJ||J[146]!==U)aZ=(Y,z)=>{if(U==="preview")return;if(G.status==="searching")return;if(U==="rename");else if(U==="search"){if(Y.toLowerCase()==="n"&&z.ctrl)qz();else if(z.return||z.downArrow)F.trim()}else{if(e){if(z.return){R0(),BZ(!1);return}else if(z.downArrow){BZ(!1);return}else if(z.upArrow){B("search"),BZ(!1);return}}if(QJ&&z.tab){let p=z.shift?-1:1;Q0((x)=>{let TJ=((x<zJ.length?x:0)+zJ.length+p)%zJ.length,yJ=zJ[TJ];return TJ});return}let H=!z.ctrl&&!z.meta,M=Y.toLowerCase();if(M==="a"&&z.ctrl&&k)k();else if(M==="b"&&z.ctrl)hJ(!g);else if(M==="w"&&z.ctrl&&l)$J(!i);else if(M==="/"&&H)B("search");else if(M==="r"&&z.ctrl&&L)B("rename"),BJ("");else if(M==="v"&&z.ctrl&&L)RJ(L),B("preview");else if(L&&H&&Y.length>0&&!/^\s+$/.test(Y))B("search"),iJ(Y)}},J[131]=G.status,J[132]=g,J[133]=L,J[134]=R0,J[135]=l,J[136]=QJ,J[137]=e,J[138]=D,J[139]=k,J[140]=F,J[141]=iJ,J[142]=C,J[143]=i,J[144]=zJ,J[145]=lJ,J[146]=U,J[147]=aZ;else aZ=J[147];let oZ;if(J[148]===Symbol.for("react.memo_cache_sentinel"))oZ={isActive:!0},J[148]=oZ;else oZ=J[148];_Y(aZ,oZ);let OJ;if(J[149]!==g||J[150]!==I||J[151]!==l||J[152]!==i){if(OJ=[],g&&I)OJ.push(I);if(l&&!i)OJ.push("current worktree");J[149]=g,J[150]=I,J[151]=l,J[152]=i,J[153]=OJ}else OJ=J[153];let Bz=OJ.length>0&&U!=="search",Hz=(_?sY:hz)+(Bz?1:0)+Gz,KJ=Math.max(1,Math.floor((b-Hz-2)/tY)),sZ,tZ;if(J[154]!==O.length||J[155]!==d||J[156]!==T||J[157]!==KJ)sZ=()=>{if(!T)return;let Y=KJ*2;if(d+Y>=O.length)T(KJ*3)},tZ=[d,KJ,O.length,T],J[154]=O.length,J[155]=d,J[156]=T,J[157]=KJ,J[158]=sZ,J[159]=tZ;else sZ=J[158],tZ=J[159];if(E.default.useEffect(sZ,tZ),K.length===0)return null;if(U==="preview"&&t&&w){let Y;if(J[160]===Symbol.for("react.memo_cache_sentinel"))Y=()=>{B("list"),RJ(null)},J[160]=Y;else Y=J[160];let z;if(J[161]!==W||J[162]!==t)z=X(PY,{log:t,onExit:Y,onSelect:W}),J[161]=W,J[162]=t,J[163]=z;else z=J[163];return z}let m0=b-1,eZ;if(J[164]===Symbol.for("react.memo_cache_sentinel"))eZ=_?null:X(m,{flexShrink:0,children:X($Y,{color:"suggestion"})}),J[164]=eZ;else eZ=J[164];let J0;if(J[165]===Symbol.for("react.memo_cache_sentinel"))J0=_?null:X(m,{flexShrink:0,children:X(N,{children:" "})}),J[165]=J0;else J0=J[165];let nJ;if(J[166]!==v||J[167]!==O.length||J[168]!==MZ||J[169]!==d||J[170]!==QJ||J[171]!==C||J[172]!==zJ||J[173]!==U||J[174]!==KJ)nJ=QJ?X(EY,{tabs:zJ,selectedIndex:MZ,availableWidth:v,showAllProjects:C}):X(m,{flexShrink:0,children:y(N,{bold:!0,color:"suggestion",children:["Resume Session",U==="list"&&O.length>KJ&&y(N,{dimColor:!0,children:[" ","(",d," of ",O.length,")"]})]})}),J[166]=v,J[167]=O.length,J[168]=MZ,J[169]=d,J[170]=QJ,J[171]=C,J[172]=zJ,J[173]=U,J[174]=KJ,J[175]=nJ;else nJ=J[175];let L0=U==="search",dJ;if(J[176]!==S||J[177]!==O0||J[178]!==F||J[179]!==L0)dJ=X(gY,{query:F,isFocused:L0,isTerminalFocused:S,cursorOffset:O0}),J[176]=S,J[177]=O0,J[178]=F,J[179]=L0,J[180]=dJ;else dJ=J[180];let aJ;if(J[181]!==OJ||J[182]!==U)aJ=OJ.length>0&&U!=="search"&&X(m,{flexShrink:0,paddingLeft:2,children:X(N,{dimColor:!0,children:X(kJ,{children:OJ})})}),J[181]=OJ,J[182]=U,J[183]=aJ;else aJ=J[183];let Z0;if(J[184]===Symbol.for("react.memo_cache_sentinel"))Z0=X(m,{flexShrink:0,children:X(N,{children:" "})}),J[184]=Z0;else Z0=J[184];let oJ;if(J[185]!==G.status)oJ=G.status==="searching"&&y(m,{paddingLeft:1,flexShrink:0,children:[X(iY,{}),X(N,{children:" Searching…"})]}),J[185]=G.status,J[186]=oJ;else oJ=J[186];let sJ;if(J[187]!==G.results||J[188]!==G.status)sJ=G.status==="results"&&G.results.length>0&&X(m,{paddingLeft:1,marginBottom:1,flexShrink:0,children:X(N,{dimColor:!0,italic:!0,children:"Claude found these results:"})}),J[187]=G.results,J[188]=G.status,J[189]=sJ;else sJ=J[189];let tJ;if(J[190]!==G.results||J[191]!==G.status||J[192]!==SJ)tJ=G.status==="results"&&G.results.length===0&&SJ.length===0&&X(m,{paddingLeft:1,marginBottom:1,flexShrink:0,children:X(N,{dimColor:!0,italic:!0,children:"No matching sessions found."})}),J[190]=G.results,J[191]=G.status,J[192]=SJ,J[193]=tJ;else tJ=J[193];let eJ;if(J[194]!==G.status||J[195]!==SJ)eJ=G.status==="error"&&SJ.length===0&&X(m,{paddingLeft:1,marginBottom:1,flexShrink:0,children:X(N,{dimColor:!0,italic:!0,children:"No matching sessions found."})}),J[194]=G.status,J[195]=SJ,J[196]=eJ;else eJ=J[196];let JZ;if(J[197]!==G.status||J[198]!==e||J[199]!==D||J[200]!==F)JZ=Boolean(F.trim())&&D&&!1,J[197]=G.status,J[198]=e,J[199]=D,J[200]=F,J[201]=JZ;else JZ=J[201];let ZZ;if(J[202]!==G.status||J[203]!==g||J[204]!==v||J[205]!==O||J[206]!==GJ||J[207]!==M0||J[208]!==L||J[209]!==HJ?.id||J[210]!==w0||J[211]!==j0||J[212]!==A0||J[213]!==e||J[214]!==P||J[215]!==W||J[216]!==WJ||J[217]!==n||J[218]!==DJ||J[219]!==U||J[220]!==KJ)ZZ=G.status==="searching"?null:U==="rename"&&L?y(m,{paddingLeft:2,flexDirection:"column",children:[X(N,{bold:!0,children:"Rename session:"}),X(m,{paddingTop:1,children:X(nY,{value:n,onChange:BJ,onSubmit:j0,placeholder:IJ(L,"Enter new session name"),columns:v,cursorOffset:WJ,onChangeCursorOffset:cJ,showCursor:!0})})]}):w?X(RY,{nodes:DJ,onSelect:(Y)=>{W(Y.value.log)},onFocus:A0,onCancel:P,focusNodeId:HJ?.id,visibleOptionCount:KJ,layout:"expanded",isDisabled:U==="search"||e,hideIndexes:!1,isNodeExpanded:(Y)=>{if(U==="search"||g)return!0;let z=typeof Y==="string"&&Y.startsWith("group:")?Y.substring(6):null;return z?GJ.has(z):!1},onExpand:(Y)=>{let z=typeof Y==="string"&&Y.startsWith("group:")?Y.substring(6):null;if(z)gJ((H)=>new Set(H).add(z))},onCollapse:(Y)=>{let z=typeof Y==="string"&&Y.startsWith("group:")?Y.substring(6):null;if(z)gJ((H)=>{let M=new Set(H);return M.delete(z),M})},onUpFromFirstItem:t0}):X(B0,{options:M0,onChange:(Y)=>{let z=parseInt(Y,10),H=O[z];if(H)W(H)},visibleOptionCount:KJ,onCancel:P,onFocus:w0,defaultFocusValue:HJ?.id.toString(),layout:"expanded",isDisabled:U==="search"||e,onUpFromFirstItem:t0}),J[202]=G.status,J[203]=g,J[204]=v,J[205]=O,J[206]=GJ,J[207]=M0,J[208]=L,J[209]=HJ?.id,J[210]=w0,J[211]=j0,J[212]=A0,J[213]=e,J[214]=P,J[215]=W,J[216]=WJ,J[217]=n,J[218]=DJ,J[219]=U,J[220]=KJ,J[221]=ZZ;else ZZ=J[221];let YZ;if(J[222]!==G.status||J[223]!==I||J[224]!==R.keyName||J[225]!==R.pending||J[226]!==mZ||J[227]!==l||J[228]!==e||J[229]!==k0||J[230]!==k||J[231]!==C||J[232]!==i||J[233]!==U)YZ=X(m,{paddingLeft:2,children:R.pending?y(N,{dimColor:!0,children:["Press ",R.keyName," again to exit"]}):U==="rename"?X(N,{dimColor:!0,children:y(kJ,{children:[X(UJ,{shortcut:"Enter",action:"save"}),X(EJ,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"cancel"})]})}):G.status==="searching"?X(N,{dimColor:!0,children:y(kJ,{children:[X(N,{children:"Searching with Claude…"}),X(EJ,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"cancel"})]})}):e?X(N,{dimColor:!0,children:y(kJ,{children:[X(UJ,{shortcut:"Enter",action:"search"}),X(UJ,{shortcut:"↓",action:"skip"}),X(EJ,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"cancel"})]})}):U==="search"?X(N,{dimColor:!0,children:y(kJ,{children:[X(N,{children:"Type to Search"}),X(UJ,{shortcut:"Enter",action:"select"}),X(EJ,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"clear"})]})}):X(N,{dimColor:!0,children:y(kJ,{children:[k&&X(UJ,{shortcut:"Ctrl+A",action:`show ${C?"current dir":"all projects"}`}),I&&X(UJ,{shortcut:"Ctrl+B",action:"toggle branch"}),l&&X(UJ,{shortcut:"Ctrl+W",action:`show ${i?"current worktree":"all worktrees"}`}),X(UJ,{shortcut:"Ctrl+V",action:"preview"}),X(UJ,{shortcut:"Ctrl+R",action:"rename"}),X(N,{children:"Type to search"}),X(EJ,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"cancel"}),mZ()&&X(N,{children:mZ()})]})})}),J[222]=G.status,J[223]=I,J[224]=R.keyName,J[225]=R.pending,J[226]=mZ,J[227]=l,J[228]=e,J[229]=k0,J[230]=k,J[231]=C,J[232]=i,J[233]=U,J[234]=YZ;else YZ=J[234];let Y0;if(J[235]!==m0||J[236]!==nJ||J[237]!==dJ||J[238]!==aJ||J[239]!==oJ||J[240]!==sJ||J[241]!==tJ||J[242]!==eJ||J[243]!==JZ||J[244]!==ZZ||J[245]!==YZ)Y0=y(m,{flexDirection:"column",height:m0,children:[eZ,J0,nJ,dJ,aJ,Z0,oJ,sJ,tJ,eJ,JZ,ZZ,YZ]}),J[235]=m0,J[236]=nJ,J[237]=dJ,J[238]=aJ,J[239]=oJ,J[240]=sJ,J[241]=tJ,J[242]=eJ,J[243]=JZ,J[244]=ZZ,J[245]=YZ,J[246]=Y0;else Y0=J[246];return Y0}function lz(Z){return Z.log}function rz(Z){return Z.messages[0]?.uuid}function nz(Z,J,K,Q){if(!Z)return;let q=Z.search(J);q.sort(az),K({results:q.map(dz),query:J}),Q(!1)}function dz(Z){return{log:Z.item.log,score:Z.score,searchableText:Z.item.searchableText}}function az(Z,J){let K=new Date(Z.item.log.modified).getTime(),q=new Date(J.item.log.modified).getTime()-K;if(Math.abs(q)>cz)return q;return(Z.score??1)-(J.score??1)}function oz(Z){let J=TY(),K=XJ(Z);if(J&&K===J)return!0;if(Z.customTitle)return!0;if(lY(Z.messages))return!0;if(Z.firstPrompt||Z.customTitle)return!0;return!1}function sz(Z){return[Z,ez(Z)]}function tz(Z){if(Z.type!=="user"&&Z.type!=="assistant")return"";let J="message"in Z?Z.message?.content:void 0;if(!J)return"";if(typeof J==="string")return J;if(Array.isArray(J))return J.map((K)=>{if(typeof K==="string")return K;if("text"in K&&typeof K.text==="string")return K.text;return""}).filter(Boolean).join(" ");return""}function ez(Z){let K=(Z.messages.length<=$z?Z.messages:[...Z.messages.slice(0,AY),...Z.messages.slice(-AY)]).map(tz).filter(Boolean).join(" "),q=`${[Z.customTitle,Z.summary,Z.firstPrompt,Z.gitBranch,Z.tag,Z.prNumber?`PR #${Z.prNumber}`:void 0,Z.prRepository].filter(Boolean).join(" ")} ${K}`.trim();return q.length>FY?q.slice(0,FY):q}function JK(Z){let J=new Map;for(let K of Z){let Q=XJ(K);if(Q){let q=J.get(Q);if(q)q.push(K);else J.set(Q,[K])}}return J.forEach((K)=>K.sort((Q,q)=>new Date(q.modified).getTime()-new Date(Q.modified).getTime())),J}function ZK(Z){let J=new Set;for(let K of Z)if(K.tag)J.add(K.tag);return Array.from(J).sort((K,Q)=>K.localeCompare(Q))}var aY,E,pz=2,uz=4,hz=8,sY=6,tY=3,$z=2000,AY=1000,FY=50000,cz=60000,gz=50;var YK=KZ(()=>{wz();yY();mz();bz();yz();Fz();U0();UY();b0();Sz();Az();LY();V0();Tz();VY();Lz();MY();GY();Iz();XY();fz();DY();xz();CY();_z();wY();LJ();aY=zZ(x0(),1),E=zZ(f0(),1)});function qK(Z){if(Z.type!=="user"&&Z.type!=="assistant")return"";let J="message"in Z?Z.message?.content:void 0;if(!J)return"";if(typeof J==="string")return J;if(Array.isArray(J))return J.map((K)=>{if(typeof K==="string")return K;if("text"in K&&typeof K.text==="string")return K.text;return""}).filter(Boolean).join(" ");return""}function Uz(Z){if(Z.length===0)return"";let K=(Z.length<=i0?Z:[...Z.slice(0,i0/2),...Z.slice(-i0/2)]).map(qK).filter(Boolean).join(" ").replace(/\s+/g," ").trim();return K.length>Jz?K.slice(0,Jz)+"…":K}function Zz(Z,J){if(IJ(Z).toLowerCase().includes(J))return!0;if(Z.customTitle?.toLowerCase().includes(J))return!0;if(Z.tag?.toLowerCase().includes(J))return!0;if(Z.gitBranch?.toLowerCase().includes(J))return!0;if(Z.summary?.toLowerCase().includes(J))return!0;if(Z.firstPrompt?.toLowerCase().includes(J))return!0;if(Z.messages&&Z.messages.length>0){if(Uz(Z.messages).toLowerCase().includes(J))return!0}return!1}async function NU(Z,J,K){if(!Z.trim()||J.length===0)return[];let Q=Z.toLowerCase(),q=J.filter((V)=>Zz(V,Q)),P;if(q.length>=l0)P=q.slice(0,l0);else{let V=J.filter((D)=>!Zz(D,Q)),k=l0-q.length;P=[...q,...V.slice(0,k)]}vJ(`Agentic search: ${P.length}/${J.length} logs, query="${Z}", matching: ${q.length}, with messages: ${r0(P,(V)=>V.messages?.length>0)}`);let W=P.map(async(V)=>{if(VZ(V))try{return await X0(V)}catch(k){return n0(k),V}return V}),j=await Promise.all(W);vJ(`Agentic search: loaded ${r0(j,(V)=>V.messages?.length>0)}/${P.length} logs with transcripts`);let u=`Sessions:
|
|
6
|
+
${j.map((V,k)=>{let D=[`${k}:`],b=IJ(V);if(D.push(b),V.customTitle&&V.customTitle!==b)D.push(`[custom title: ${V.customTitle}]`);if(V.tag)D.push(`[tag: ${V.tag}]`);if(V.gitBranch)D.push(`[branch: ${V.gitBranch}]`);if(V.summary)D.push(`- Summary: ${V.summary}`);if(V.firstPrompt&&V.firstPrompt!=="No prompt")D.push(`- First message: ${V.firstPrompt.slice(0,300)}`);if(V.messages&&V.messages.length>0){let C=Uz(V.messages);if(C)D.push(`- Transcript: ${C}`)}return D.join(" ")}).join(`
|
|
7
|
+
`)}
|
|
8
|
+
|
|
9
|
+
Search query: "${Z}"
|
|
10
|
+
|
|
11
|
+
Find the sessions that are most relevant to this query.`;vJ(`Agentic search prompt (first 500 chars): ${u.slice(0,500)}...`);try{let V=zz();vJ(`Agentic search using model: ${V}`);let D=(await Kz({model:V,system:GK,messages:[{role:"user",content:u}],signal:K,querySource:"session_search"})).content.find((h)=>h.type==="text");if(!D||D.type!=="text")return vJ("No text content in agentic search response"),[];vJ(`Agentic search response: ${D.text}`);let b=D.text.match(/\{[\s\S]*\}/);if(!b)return vJ("Could not find JSON in agentic search response"),[];let _=(Yz(b[0]).relevant_indices||[]).filter((h)=>h>=0&&h<j.length).map((h)=>j[h]);return vJ(`Agentic search found ${_.length} relevant sessions`),_}catch(V){return n0(V),vJ(`Agentic search error: ${V}`),[]}}var Jz=2000,i0=100,l0=100,GK=`Your goal is to find relevant sessions based on a user's search query.
|
|
12
|
+
|
|
13
|
+
You will be given a list of sessions with their metadata and a search query. Identify which sessions are most relevant to the query.
|
|
14
|
+
|
|
15
|
+
Each session may include:
|
|
16
|
+
- Title (display name or custom title)
|
|
17
|
+
- Tag (user-assigned category, shown as [tag: name] - users tag sessions with /tag command to categorize them)
|
|
18
|
+
- Branch (git branch name, shown as [branch: name])
|
|
19
|
+
- Summary (AI-generated summary)
|
|
20
|
+
- First message (beginning of the conversation)
|
|
21
|
+
- Transcript (excerpt of conversation content)
|
|
22
|
+
|
|
23
|
+
IMPORTANT: Tags are user-assigned labels that indicate the session's topic or category. If the query matches a tag exactly or partially, those sessions should be highly prioritized.
|
|
24
|
+
|
|
25
|
+
For each session, consider (in order of priority):
|
|
26
|
+
1. Exact tag matches (highest priority - user explicitly categorized this session)
|
|
27
|
+
2. Partial tag matches or tag-related terms
|
|
28
|
+
3. Title matches (custom titles or first message content)
|
|
29
|
+
4. Branch name matches
|
|
30
|
+
5. Summary and transcript content matches
|
|
31
|
+
6. Semantic similarity and related concepts
|
|
32
|
+
|
|
33
|
+
CRITICAL: Be VERY inclusive in your matching. Include sessions that:
|
|
34
|
+
- Contain the query term anywhere in any field
|
|
35
|
+
- Are semantically related to the query (e.g., "testing" matches sessions about "tests", "unit tests", "QA", etc.)
|
|
36
|
+
- Discuss topics that could be related to the query
|
|
37
|
+
- Have transcripts that mention the concept even in passing
|
|
38
|
+
|
|
39
|
+
When in doubt, INCLUDE the session. It's better to return too many results than too few. The user can easily scan through results, but missing relevant sessions is frustrating.
|
|
40
|
+
|
|
41
|
+
Return sessions ordered by relevance (most relevant first). If truly no sessions have ANY connection to the query, return an empty array - but this should be rare.
|
|
42
|
+
|
|
43
|
+
Respond with ONLY the JSON object, no markdown formatting:
|
|
44
|
+
{"relevant_indices": [2, 5, 0]}`;var BK=KZ(()=>{UK();KK();LY();XK();V0();VK();zK()});function RU(Z,J,K){let Q=H0();if(!J||!Z.projectPath||Z.projectPath===Q)return{isCrossProject:!1};let q=XJ(Z);return{isCrossProject:!0,isSameRepoWorktree:!1,command:`cd ${Xz([Z.projectPath])} && claude --resume ${q}`,projectPath:Z.projectPath}}var QK=KZ(()=>{yY();HK();V0()});
|
|
45
|
+
export{GU as de,qU as ee,YK as fe,NU as ge,BK as he,RU as ie,QK as je};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
class H extends Error{constructor(z,J,Q){super(Q);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=J,this.exitCode=z,this.nestedError=void 0}}class K extends H{constructor(z){super(1,"commander.invalidArgument",z);Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}}class S{constructor(z,J){this.flags=z,this.description=J||"",this.required=z.includes("<"),this.optional=z.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(z),this.mandatory=!1;let Q=w(z);if(this.short=Q.shortFlag,this.long=Q.longFlag,this.negate=!1,this.long)this.negate=this.long.startsWith("--no-");this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0,this.helpGroupHeading=void 0}default(z,J){return this.defaultValue=z,this.defaultValueDescription=J,this}preset(z){return this.presetArg=z,this}conflicts(z){return this.conflictsWith=this.conflictsWith.concat(z),this}implies(z){let J=z;if(typeof z==="string")J={[z]:!0};return this.implied=Object.assign(this.implied||{},J),this}env(z){return this.envVar=z,this}argParser(z){return this.parseArg=z,this}makeOptionMandatory(z=!0){return this.mandatory=!!z,this}hideHelp(z=!0){return this.hidden=!!z,this}_collectValue(z,J){if(J===this.defaultValue||!Array.isArray(J))return[z];return J.push(z),J}choices(z){return this.argChoices=z.slice(),this.parseArg=(J,Q)=>{if(!this.argChoices.includes(J))throw new K(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._collectValue(J,Q);return J},this}name(){if(this.long)return this.long.replace(/^--/,"");return this.short.replace(/^-/,"")}attributeName(){if(this.negate)return F(this.name().replace(/^no-/,""));return F(this.name())}helpGroup(z){return this.helpGroupHeading=z,this}is(z){return this.short===z||this.long===z}isBoolean(){return!this.required&&!this.optional&&!this.negate}}class V{constructor(z){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,z.forEach((J)=>{if(J.negate)this.negativeOptions.set(J.attributeName(),J);else this.positiveOptions.set(J.attributeName(),J)}),this.negativeOptions.forEach((J,Q)=>{if(this.positiveOptions.has(Q))this.dualOptions.add(Q)})}valueFromOption(z,J){let Q=J.attributeName();if(!this.dualOptions.has(Q))return!0;let X=this.negativeOptions.get(Q).presetArg,Y=X!==void 0?X:!1;return J.negate===(Y===z)}}function F(z){return z.split("-").reduce((J,Q)=>{return J+Q[0].toUpperCase()+Q.slice(1)})}function w(z){let J,Q,X=/^-[^-]$/,Y=/^--[^-]/,Z=z.split(/[ |,]+/).concat("guard");if(X.test(Z[0]))J=Z.shift();if(Y.test(Z[0]))Q=Z.shift();if(!J&&X.test(Z[0]))J=Z.shift();if(!J&&Y.test(Z[0]))J=Q,Q=Z.shift();if(Z[0].startsWith("-")){let $=Z[0],_=`option creation failed due to '${$}' in option flags '${z}'`;if(/^-[^-][^-]/.test($))throw Error(`${_}
|
|
2
|
+
- a short flag is a single dash and a single character
|
|
3
|
+
- either use a single dash and a single character (for a short flag)
|
|
4
|
+
- or use a double dash for a long option (and can have two, like '--ws, --workspace')`);if(X.test($))throw Error(`${_}
|
|
5
|
+
- too many short flags`);if(Y.test($))throw Error(`${_}
|
|
6
|
+
- too many long flags`);throw Error(`${_}
|
|
7
|
+
- unrecognised flag format`)}if(J===void 0&&Q===void 0)throw Error(`option creation failed due to no flags found in '${z}'.`);return{shortFlag:J,longFlag:Q}}import{EventEmitter as O}from"node:events";import N from"node:child_process";import U from"node:path";import I from"node:fs";import G from"node:process";import{stripVTControlCharacters as x}from"node:util";class W{constructor(z,J){switch(this.description=J||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,z[0]){case"<":this.required=!0,this._name=z.slice(1,-1);break;case"[":this.required=!1,this._name=z.slice(1,-1);break;default:this.required=!0,this._name=z;break}if(this._name.endsWith("..."))this.variadic=!0,this._name=this._name.slice(0,-3)}name(){return this._name}_collectValue(z,J){if(J===this.defaultValue||!Array.isArray(J))return[z];return J.push(z),J}default(z,J){return this.defaultValue=z,this.defaultValueDescription=J,this}argParser(z){return this.parseArg=z,this}choices(z){return this.argChoices=z.slice(),this.parseArg=(J,Q)=>{if(!this.argChoices.includes(J))throw new K(`Allowed choices are ${this.argChoices.join(", ")}.`);if(this.variadic)return this._collectValue(J,Q);return J},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}}function P(z){let J=z.name()+(z.variadic===!0?"...":"");return z.required?"<"+J+">":"["+J+"]"}import{stripVTControlCharacters as k}from"node:util";class j{constructor(){this.helpWidth=void 0,this.minWidthToWrap=40,this.sortSubcommands=!1,this.sortOptions=!1,this.showGlobalOptions=!1}prepareContext(z){this.helpWidth=this.helpWidth??z.helpWidth??80}visibleCommands(z){let J=z.commands.filter((X)=>!X._hidden),Q=z._getHelpCommand();if(Q&&!Q._hidden)J.push(Q);if(this.sortSubcommands)J.sort((X,Y)=>{return X.name().localeCompare(Y.name())});return J}compareOptions(z,J){let Q=(X)=>{return X.short?X.short.replace(/^-/,""):X.long.replace(/^--/,"")};return Q(z).localeCompare(Q(J))}visibleOptions(z){let J=z.options.filter((X)=>!X.hidden),Q=z._getHelpOption();if(Q&&!Q.hidden){let X=Q.short&&z._findOption(Q.short),Y=Q.long&&z._findOption(Q.long);if(!X&&!Y)J.push(Q);else if(Q.long&&!Y)J.push(z.createOption(Q.long,Q.description));else if(Q.short&&!X)J.push(z.createOption(Q.short,Q.description))}if(this.sortOptions)J.sort(this.compareOptions);return J}visibleGlobalOptions(z){if(!this.showGlobalOptions)return[];let J=[];for(let Q=z.parent;Q;Q=Q.parent){let X=Q.options.filter((Y)=>!Y.hidden);J.push(...X)}if(this.sortOptions)J.sort(this.compareOptions);return J}visibleArguments(z){if(z._argsDescription)z.registeredArguments.forEach((J)=>{J.description=J.description||z._argsDescription[J.name()]||""});if(z.registeredArguments.find((J)=>J.description))return z.registeredArguments;return[]}subcommandTerm(z){let J=z.registeredArguments.map((Q)=>P(Q)).join(" ");return z._name+(z._aliases[0]?"|"+z._aliases[0]:"")+(z.options.length?" [options]":"")+(J?" "+J:"")}optionTerm(z){return z.flags}argumentTerm(z){return z.name()}longestSubcommandTermLength(z,J){return J.visibleCommands(z).reduce((Q,X)=>{return Math.max(Q,this.displayWidth(J.styleSubcommandTerm(J.subcommandTerm(X))))},0)}longestOptionTermLength(z,J){return J.visibleOptions(z).reduce((Q,X)=>{return Math.max(Q,this.displayWidth(J.styleOptionTerm(J.optionTerm(X))))},0)}longestGlobalOptionTermLength(z,J){return J.visibleGlobalOptions(z).reduce((Q,X)=>{return Math.max(Q,this.displayWidth(J.styleOptionTerm(J.optionTerm(X))))},0)}longestArgumentTermLength(z,J){return J.visibleArguments(z).reduce((Q,X)=>{return Math.max(Q,this.displayWidth(J.styleArgumentTerm(J.argumentTerm(X))))},0)}commandUsage(z){let J=z._name;if(z._aliases[0])J=J+"|"+z._aliases[0];let Q="";for(let X=z.parent;X;X=X.parent)Q=X.name()+" "+Q;return Q+J+" "+z.usage()}commandDescription(z){return z.description()}subcommandDescription(z){return z.summary()||z.description()}optionDescription(z){let J=[];if(z.argChoices)J.push(`choices: ${z.argChoices.map((Q)=>JSON.stringify(Q)).join(", ")}`);if(z.defaultValue!==void 0){if(z.required||z.optional||z.isBoolean()&&typeof z.defaultValue==="boolean")J.push(`default: ${z.defaultValueDescription||JSON.stringify(z.defaultValue)}`)}if(z.presetArg!==void 0&&z.optional)J.push(`preset: ${JSON.stringify(z.presetArg)}`);if(z.envVar!==void 0)J.push(`env: ${z.envVar}`);if(J.length>0){let Q=`(${J.join(", ")})`;if(z.description)return`${z.description} ${Q}`;return Q}return z.description}argumentDescription(z){let J=[];if(z.argChoices)J.push(`choices: ${z.argChoices.map((Q)=>JSON.stringify(Q)).join(", ")}`);if(z.defaultValue!==void 0)J.push(`default: ${z.defaultValueDescription||JSON.stringify(z.defaultValue)}`);if(J.length>0){let Q=`(${J.join(", ")})`;if(z.description)return`${z.description} ${Q}`;return Q}return z.description}formatItemList(z,J,Q){if(J.length===0)return[];return[Q.styleTitle(z),...J,""]}groupItems(z,J,Q){let X=new Map;return z.forEach((Y)=>{let Z=Q(Y);if(!X.has(Z))X.set(Z,[])}),J.forEach((Y)=>{let Z=Q(Y);if(!X.has(Z))X.set(Z,[]);X.get(Z).push(Y)}),X}formatHelp(z,J){let Q=J.padWidth(z,J),X=J.helpWidth??80;function Y(R,B){return J.formatItem(R,Q,B,J)}let Z=[`${J.styleTitle("Usage:")} ${J.styleUsage(J.commandUsage(z))}`,""],$=J.commandDescription(z);if($.length>0)Z=Z.concat([J.boxWrap(J.styleCommandDescription($),X),""]);let _=J.visibleArguments(z).map((R)=>{return Y(J.styleArgumentTerm(J.argumentTerm(R)),J.styleArgumentDescription(J.argumentDescription(R)))});if(Z=Z.concat(this.formatItemList("Arguments:",_,J)),this.groupItems(z.options,J.visibleOptions(z),(R)=>R.helpGroupHeading??"Options:").forEach((R,B)=>{let L=R.map((M)=>{return Y(J.styleOptionTerm(J.optionTerm(M)),J.styleOptionDescription(J.optionDescription(M)))});Z=Z.concat(this.formatItemList(B,L,J))}),J.showGlobalOptions){let R=J.visibleGlobalOptions(z).map((B)=>{return Y(J.styleOptionTerm(J.optionTerm(B)),J.styleOptionDescription(J.optionDescription(B)))});Z=Z.concat(this.formatItemList("Global Options:",R,J))}return this.groupItems(z.commands,J.visibleCommands(z),(R)=>R.helpGroup()||"Commands:").forEach((R,B)=>{let L=R.map((M)=>{return Y(J.styleSubcommandTerm(J.subcommandTerm(M)),J.styleSubcommandDescription(J.subcommandDescription(M)))});Z=Z.concat(this.formatItemList(B,L,J))}),Z.join(`
|
|
8
|
+
`)}displayWidth(z){return k(z).length}styleTitle(z){return z}styleUsage(z){return z.split(" ").map((J)=>{if(J==="[options]")return this.styleOptionText(J);if(J==="[command]")return this.styleSubcommandText(J);if(J[0]==="["||J[0]==="<")return this.styleArgumentText(J);return this.styleCommandText(J)}).join(" ")}styleCommandDescription(z){return this.styleDescriptionText(z)}styleOptionDescription(z){return this.styleDescriptionText(z)}styleSubcommandDescription(z){return this.styleDescriptionText(z)}styleArgumentDescription(z){return this.styleDescriptionText(z)}styleDescriptionText(z){return z}styleOptionTerm(z){return this.styleOptionText(z)}styleSubcommandTerm(z){return z.split(" ").map((J)=>{if(J==="[options]")return this.styleOptionText(J);if(J[0]==="["||J[0]==="<")return this.styleArgumentText(J);return this.styleSubcommandText(J)}).join(" ")}styleArgumentTerm(z){return this.styleArgumentText(z)}styleOptionText(z){return z}styleArgumentText(z){return z}styleSubcommandText(z){return z}styleCommandText(z){return z}padWidth(z,J){return Math.max(J.longestOptionTermLength(z,J),J.longestGlobalOptionTermLength(z,J),J.longestSubcommandTermLength(z,J),J.longestArgumentTermLength(z,J))}preformatted(z){return/\n[^\S\r\n]/.test(z)}formatItem(z,J,Q,X){let Z=" ".repeat(2);if(!Q)return Z+z;let $=z.padEnd(J+z.length-X.displayWidth(z)),_=2,q=(this.helpWidth??80)-J-_-2,R;if(q<this.minWidthToWrap||X.preformatted(Q))R=Q;else R=X.boxWrap(Q,q).replace(/\n/g,`
|
|
9
|
+
`+" ".repeat(J+_));return Z+$+" ".repeat(_)+R.replace(/\n/g,`
|
|
10
|
+
${Z}`)}boxWrap(z,J){if(J<this.minWidthToWrap)return z;let Q=z.split(/\r\n|\n/),X=/[\s]*[^\s]+/g,Y=[];return Q.forEach((Z)=>{let $=Z.match(X);if($===null){Y.push("");return}let _=[$.shift()],T=this.displayWidth(_[0]);$.forEach((q)=>{let R=this.displayWidth(q);if(T+R<=J){_.push(q),T+=R;return}Y.push(_.join(""));let B=q.trimStart();_=[B],T=this.displayWidth(B)}),Y.push(_.join(""))}),Y.join(`
|
|
11
|
+
`)}}function C(z,J){if(Math.abs(z.length-J.length)>3)return Math.max(z.length,J.length);let Q=[];for(let X=0;X<=z.length;X++)Q[X]=[X];for(let X=0;X<=J.length;X++)Q[0][X]=X;for(let X=1;X<=J.length;X++)for(let Y=1;Y<=z.length;Y++){let Z;if(z[Y-1]===J[X-1])Z=0;else Z=1;if(Q[Y][X]=Math.min(Q[Y-1][X]+1,Q[Y][X-1]+1,Q[Y-1][X-1]+Z),Y>1&&X>1&&z[Y-1]===J[X-2]&&z[Y-2]===J[X-1])Q[Y][X]=Math.min(Q[Y][X],Q[Y-2][X-2]+1)}return Q[z.length][J.length]}function D(z,J){if(!J||J.length===0)return"";J=Array.from(new Set(J));let Q=z.startsWith("--");if(Q)z=z.slice(2),J=J.map(($)=>$.slice(2));let X=[],Y=3,Z=0.4;if(J.forEach(($)=>{if($.length<=1)return;let _=C(z,$),T=Math.max(z.length,$.length);if((T-_)/T>Z){if(_<Y)Y=_,X=[$];else if(_===Y)X.push($)}}),X.sort(($,_)=>$.localeCompare(_)),Q)X=X.map(($)=>`--${$}`);if(X.length>1)return`
|
|
12
|
+
(Did you mean one of ${X.join(", ")}?)`;if(X.length===1)return`
|
|
13
|
+
(Did you mean ${X[0]}?)`;return""}class E extends O{constructor(z){super();this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!1,this.registeredArguments=[],this._args=this.registeredArguments,this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=z||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._savedState=null,this._outputConfiguration={writeOut:(J)=>G.stdout.write(J),writeErr:(J)=>G.stderr.write(J),outputError:(J,Q)=>Q(J),getOutHelpWidth:()=>G.stdout.isTTY?G.stdout.columns:void 0,getErrHelpWidth:()=>G.stderr.isTTY?G.stderr.columns:void 0,getOutHasColors:()=>A()??(G.stdout.isTTY&&G.stdout.hasColors?.()),getErrHasColors:()=>A()??(G.stderr.isTTY&&G.stderr.hasColors?.()),stripColor:(J)=>x(J)},this._hidden=!1,this._helpOption=void 0,this._addImplicitHelpCommand=void 0,this._helpCommand=void 0,this._helpConfiguration={},this._helpGroupHeading=void 0,this._defaultCommandGroup=void 0,this._defaultOptionGroup=void 0}copyInheritedSettings(z){return this._outputConfiguration=z._outputConfiguration,this._helpOption=z._helpOption,this._helpCommand=z._helpCommand,this._helpConfiguration=z._helpConfiguration,this._exitCallback=z._exitCallback,this._storeOptionsAsProperties=z._storeOptionsAsProperties,this._combineFlagAndOptionalValue=z._combineFlagAndOptionalValue,this._allowExcessArguments=z._allowExcessArguments,this._enablePositionalOptions=z._enablePositionalOptions,this._showHelpAfterError=z._showHelpAfterError,this._showSuggestionAfterError=z._showSuggestionAfterError,this}_getCommandAndAncestors(){let z=[];for(let J=this;J;J=J.parent)z.push(J);return z}command(z,J,Q){let X=J,Y=Q;if(typeof X==="object"&&X!==null)Y=X,X=null;Y=Y||{};let[,Z,$]=z.match(/([^ ]+) *(.*)/),_=this.createCommand(Z);if(X)_.description(X),_._executableHandler=!0;if(Y.isDefault)this._defaultCommandName=_._name;if(_._hidden=!!(Y.noHelp||Y.hidden),_._executableFile=Y.executableFile||null,$)_.arguments($);if(this._registerCommand(_),_.parent=this,_.copyInheritedSettings(this),X)return this;return _}createCommand(z){return new E(z)}createHelp(){return Object.assign(new j,this.configureHelp())}configureHelp(z){if(z===void 0)return this._helpConfiguration;return this._helpConfiguration=z,this}configureOutput(z){if(z===void 0)return this._outputConfiguration;return this._outputConfiguration={...this._outputConfiguration,...z},this}showHelpAfterError(z=!0){if(typeof z!=="string")z=!!z;return this._showHelpAfterError=z,this}showSuggestionAfterError(z=!0){return this._showSuggestionAfterError=!!z,this}addCommand(z,J){if(!z._name)throw Error(`Command passed to .addCommand() must have a name
|
|
14
|
+
- specify the name in Command constructor or using .name()`);if(J=J||{},J.isDefault)this._defaultCommandName=z._name;if(J.noHelp||J.hidden)z._hidden=!0;return this._registerCommand(z),z.parent=this,z._checkForBrokenPassThrough(),this}createArgument(z,J){return new W(z,J)}argument(z,J,Q,X){let Y=this.createArgument(z,J);if(typeof Q==="function")Y.default(X).argParser(Q);else Y.default(Q);return this.addArgument(Y),this}arguments(z){return z.trim().split(/ +/).forEach((J)=>{this.argument(J)}),this}addArgument(z){let J=this.registeredArguments.slice(-1)[0];if(J?.variadic)throw Error(`only the last argument can be variadic '${J.name()}'`);if(z.required&&z.defaultValue!==void 0&&z.parseArg===void 0)throw Error(`a default value for a required argument is never used: '${z.name()}'`);return this.registeredArguments.push(z),this}helpCommand(z,J){if(typeof z==="boolean"){if(this._addImplicitHelpCommand=z,z&&this._defaultCommandGroup)this._initCommandGroup(this._getHelpCommand());return this}let Q=z??"help [command]",[,X,Y]=Q.match(/([^ ]+) *(.*)/),Z=J??"display help for command",$=this.createCommand(X);if($.helpOption(!1),Y)$.arguments(Y);if(Z)$.description(Z);if(this._addImplicitHelpCommand=!0,this._helpCommand=$,z||J)this._initCommandGroup($);return this}addHelpCommand(z,J){if(typeof z!=="object")return this.helpCommand(z,J),this;return this._addImplicitHelpCommand=!0,this._helpCommand=z,this._initCommandGroup(z),this}_getHelpCommand(){if(this._addImplicitHelpCommand??(this.commands.length&&!this._actionHandler&&!this._findCommand("help"))){if(this._helpCommand===void 0)this.helpCommand(void 0,void 0);return this._helpCommand}return null}hook(z,J){let Q=["preSubcommand","preAction","postAction"];if(!Q.includes(z))throw Error(`Unexpected value for event passed to hook : '${z}'.
|
|
15
|
+
Expecting one of '${Q.join("', '")}'`);if(this._lifeCycleHooks[z])this._lifeCycleHooks[z].push(J);else this._lifeCycleHooks[z]=[J];return this}exitOverride(z){if(z)this._exitCallback=z;else this._exitCallback=(J)=>{if(J.code!=="commander.executeSubCommandAsync")throw J};return this}_exit(z,J,Q){if(this._exitCallback)this._exitCallback(new H(z,J,Q));G.exit(z)}action(z){let J=(Q)=>{let X=this.registeredArguments.length,Y=Q.slice(0,X);if(this._storeOptionsAsProperties)Y[X]=this;else Y[X]=this.opts();return Y.push(this),z.apply(this,Y)};return this._actionHandler=J,this}createOption(z,J){return new S(z,J)}_callParseArg(z,J,Q,X){try{return z.parseArg(J,Q)}catch(Y){if(Y.code==="commander.invalidArgument"){let Z=`${X} ${Y.message}`;this.error(Z,{exitCode:Y.exitCode,code:Y.code})}throw Y}}_registerOption(z){let J=z.short&&this._findOption(z.short)||z.long&&this._findOption(z.long);if(J){let Q=z.long&&this._findOption(z.long)?z.long:z.short;throw Error(`Cannot add option '${z.flags}'${this._name&&` to command '${this._name}'`} due to conflicting flag '${Q}'
|
|
16
|
+
- already used by option '${J.flags}'`)}this._initOptionGroup(z),this.options.push(z)}_registerCommand(z){let J=(X)=>{return[X.name()].concat(X.aliases())},Q=J(z).find((X)=>this._findCommand(X));if(Q){let X=J(this._findCommand(Q)).join("|"),Y=J(z).join("|");throw Error(`cannot add command '${Y}' as already have command '${X}'`)}this._initCommandGroup(z),this.commands.push(z)}addOption(z){this._registerOption(z);let J=z.name(),Q=z.attributeName();if(z.defaultValue!==void 0)this.setOptionValueWithSource(Q,z.defaultValue,"default");let X=(Y,Z,$)=>{if(Y==null&&z.presetArg!==void 0)Y=z.presetArg;let _=this.getOptionValue(Q);if(Y!==null&&z.parseArg)Y=this._callParseArg(z,Y,_,Z);else if(Y!==null&&z.variadic)Y=z._collectValue(Y,_);if(Y==null)if(z.negate)Y=!1;else if(z.isBoolean()||z.optional)Y=!0;else Y="";this.setOptionValueWithSource(Q,Y,$)};if(this.on("option:"+J,(Y)=>{let Z=`error: option '${z.flags}' argument '${Y}' is invalid.`;X(Y,Z,"cli")}),z.envVar)this.on("optionEnv:"+J,(Y)=>{let Z=`error: option '${z.flags}' value '${Y}' from env '${z.envVar}' is invalid.`;X(Y,Z,"env")});return this}_optionEx(z,J,Q,X,Y){if(typeof J==="object"&&J instanceof S)throw Error("To add an Option object use addOption() instead of option() or requiredOption()");let Z=this.createOption(J,Q);if(Z.makeOptionMandatory(!!z.mandatory),typeof X==="function")Z.default(Y).argParser(X);else if(X instanceof RegExp){let $=X;X=(_,T)=>{let q=$.exec(_);return q?q[0]:T},Z.default(Y).argParser(X)}else Z.default(X);return this.addOption(Z)}option(z,J,Q,X){return this._optionEx({},z,J,Q,X)}requiredOption(z,J,Q,X){return this._optionEx({mandatory:!0},z,J,Q,X)}combineFlagAndOptionalValue(z=!0){return this._combineFlagAndOptionalValue=!!z,this}allowUnknownOption(z=!0){return this._allowUnknownOption=!!z,this}allowExcessArguments(z=!0){return this._allowExcessArguments=!!z,this}enablePositionalOptions(z=!0){return this._enablePositionalOptions=!!z,this}passThroughOptions(z=!0){return this._passThroughOptions=!!z,this._checkForBrokenPassThrough(),this}_checkForBrokenPassThrough(){if(this.parent&&this._passThroughOptions&&!this.parent._enablePositionalOptions)throw Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`)}storeOptionsAsProperties(z=!0){if(this.options.length)throw Error("call .storeOptionsAsProperties() before adding options");if(Object.keys(this._optionValues).length)throw Error("call .storeOptionsAsProperties() before setting option values");return this._storeOptionsAsProperties=!!z,this}getOptionValue(z){if(this._storeOptionsAsProperties)return this[z];return this._optionValues[z]}setOptionValue(z,J){return this.setOptionValueWithSource(z,J,void 0)}setOptionValueWithSource(z,J,Q){if(this._storeOptionsAsProperties)this[z]=J;else this._optionValues[z]=J;return this._optionValueSources[z]=Q,this}getOptionValueSource(z){return this._optionValueSources[z]}getOptionValueSourceWithGlobals(z){let J;return this._getCommandAndAncestors().forEach((Q)=>{if(Q.getOptionValueSource(z)!==void 0)J=Q.getOptionValueSource(z)}),J}_prepareUserArgs(z,J){if(z!==void 0&&!Array.isArray(z))throw Error("first parameter to parse must be array or undefined");if(J=J||{},z===void 0&&J.from===void 0){if(G.versions?.electron)J.from="electron";let X=G.execArgv??[];if(X.includes("-e")||X.includes("--eval")||X.includes("-p")||X.includes("--print"))J.from="eval"}if(z===void 0)z=G.argv;this.rawArgs=z.slice();let Q;switch(J.from){case void 0:case"node":this._scriptPath=z[1],Q=z.slice(2);break;case"electron":if(G.defaultApp)this._scriptPath=z[1],Q=z.slice(2);else Q=z.slice(1);break;case"user":Q=z.slice(0);break;case"eval":Q=z.slice(1);break;default:throw Error(`unexpected parse option { from: '${J.from}' }`)}if(!this._name&&this._scriptPath)this.nameFromFilename(this._scriptPath);return this._name=this._name||"program",Q}parse(z,J){this._prepareForParse();let Q=this._prepareUserArgs(z,J);return this._parseCommand([],Q),this}async parseAsync(z,J){this._prepareForParse();let Q=this._prepareUserArgs(z,J);return await this._parseCommand([],Q),this}_prepareForParse(){if(this._savedState===null)this.options.filter((z)=>z.negate&&z.defaultValue===void 0&&this.getOptionValue(z.attributeName())===void 0).forEach((z)=>{let J=z.long.replace(/^--no-/,"--");if(!this._findOption(J))this.setOptionValueWithSource(z.attributeName(),!0,"default")}),this.saveStateBeforeParse();else this.restoreStateBeforeParse()}saveStateBeforeParse(){this._savedState={_name:this._name,_optionValues:{...this._optionValues},_optionValueSources:{...this._optionValueSources}}}restoreStateBeforeParse(){if(this._storeOptionsAsProperties)throw Error(`Can not call parse again when storeOptionsAsProperties is true.
|
|
17
|
+
- either make a new Command for each call to parse, or stop storing options as properties`);this._name=this._savedState._name,this._scriptPath=null,this.rawArgs=[],this._optionValues={...this._savedState._optionValues},this._optionValueSources={...this._savedState._optionValueSources},this.args=[],this.processedArgs=[]}_checkForMissingExecutable(z,J,Q){if(I.existsSync(z))return;let X=J?`searched for local subcommand relative to directory '${J}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",Y=`'${z}' does not exist
|
|
18
|
+
- if '${Q}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead
|
|
19
|
+
- if the default executable name is not suitable, use the executableFile option to supply a custom name or path
|
|
20
|
+
- ${X}`;throw Error(Y)}_executeSubCommand(z,J){J=J.slice();let Q=[".js",".ts",".tsx",".mjs",".cjs"];function X(q,R){let B=U.resolve(q,R);if(I.existsSync(B))return B;if(Q.includes(U.extname(R)))return;let L=Q.find((M)=>I.existsSync(`${B}${M}`));if(L)return`${B}${L}`;return}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let Y=z._executableFile||`${this._name}-${z._name}`,Z=this._executableDir||"";if(this._scriptPath){let q;try{q=I.realpathSync(this._scriptPath)}catch{q=this._scriptPath}Z=U.resolve(U.dirname(q),Z)}if(Z){let q=X(Z,Y);if(!q&&!z._executableFile&&this._scriptPath){let R=U.basename(this._scriptPath,U.extname(this._scriptPath));if(R!==this._name)q=X(Z,`${R}-${z._name}`)}Y=q||Y}let $=Q.includes(U.extname(Y)),_;if(G.platform!=="win32")if($)J.unshift(Y),J=y(G.execArgv).concat(J),_=N.spawn(G.argv[0],J,{stdio:"inherit"});else _=N.spawn(Y,J,{stdio:"inherit"});else this._checkForMissingExecutable(Y,Z,z._name),J.unshift(Y),J=y(G.execArgv).concat(J),_=N.spawn(G.execPath,J,{stdio:"inherit"});if(!_.killed)["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((R)=>{G.on(R,()=>{if(_.killed===!1&&_.exitCode===null)_.kill(R)})});let T=this._exitCallback;_.on("close",(q)=>{if(q=q??1,!T)G.exit(q);else T(new H(q,"commander.executeSubCommandAsync","(close)"))}),_.on("error",(q)=>{if(q.code==="ENOENT")this._checkForMissingExecutable(Y,Z,z._name);else if(q.code==="EACCES")throw Error(`'${Y}' not executable`);if(!T)G.exit(1);else{let R=new H(1,"commander.executeSubCommandAsync","(error)");R.nestedError=q,T(R)}}),this.runningCommand=_}_dispatchSubcommand(z,J,Q){let X=this._findCommand(z);if(!X)this.help({error:!0});X._prepareForParse();let Y;return Y=this._chainOrCallSubCommandHook(Y,X,"preSubcommand"),Y=this._chainOrCall(Y,()=>{if(X._executableHandler)this._executeSubCommand(X,J.concat(Q));else return X._parseCommand(J,Q)}),Y}_dispatchHelpCommand(z){if(!z)this.help();let J=this._findCommand(z);if(J&&!J._executableHandler)J.help();return this._dispatchSubcommand(z,[],[this._getHelpOption()?.long??this._getHelpOption()?.short??"--help"])}_checkNumberOfArguments(){if(this.registeredArguments.forEach((z,J)=>{if(z.required&&this.args[J]==null)this.missingArgument(z.name())}),this.registeredArguments.length>0&&this.registeredArguments[this.registeredArguments.length-1].variadic)return;if(this.args.length>this.registeredArguments.length)this._excessArguments(this.args)}_processArguments(){let z=(Q,X,Y)=>{let Z=X;if(X!==null&&Q.parseArg){let $=`error: command-argument value '${X}' is invalid for argument '${Q.name()}'.`;Z=this._callParseArg(Q,X,Y,$)}return Z};this._checkNumberOfArguments();let J=[];this.registeredArguments.forEach((Q,X)=>{let Y=Q.defaultValue;if(Q.variadic){if(X<this.args.length){if(Y=this.args.slice(X),Q.parseArg)Y=Y.reduce((Z,$)=>{return z(Q,$,Z)},Q.defaultValue)}else if(Y===void 0)Y=[]}else if(X<this.args.length){if(Y=this.args[X],Q.parseArg)Y=z(Q,Y,Q.defaultValue)}J[X]=Y}),this.processedArgs=J}_chainOrCall(z,J){if(z?.then&&typeof z.then==="function")return z.then(()=>J());return J()}_chainOrCallHooks(z,J){let Q=z,X=[];if(this._getCommandAndAncestors().reverse().filter((Y)=>Y._lifeCycleHooks[J]!==void 0).forEach((Y)=>{Y._lifeCycleHooks[J].forEach((Z)=>{X.push({hookedCommand:Y,callback:Z})})}),J==="postAction")X.reverse();return X.forEach((Y)=>{Q=this._chainOrCall(Q,()=>{return Y.callback(Y.hookedCommand,this)})}),Q}_chainOrCallSubCommandHook(z,J,Q){let X=z;if(this._lifeCycleHooks[Q]!==void 0)this._lifeCycleHooks[Q].forEach((Y)=>{X=this._chainOrCall(X,()=>{return Y(this,J)})});return X}_parseCommand(z,J){let Q=this.parseOptions(J);if(this._parseOptionsEnv(),this._parseOptionsImplied(),z=z.concat(Q.operands),J=Q.unknown,this.args=z.concat(J),z&&this._findCommand(z[0]))return this._dispatchSubcommand(z[0],z.slice(1),J);if(this._getHelpCommand()&&z[0]===this._getHelpCommand().name())return this._dispatchHelpCommand(z[1]);if(this._defaultCommandName)return this._outputHelpIfRequested(J),this._dispatchSubcommand(this._defaultCommandName,z,J);if(this.commands.length&&this.args.length===0&&!this._actionHandler&&!this._defaultCommandName)this.help({error:!0});this._outputHelpIfRequested(Q.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let X=()=>{if(Q.unknown.length>0)this.unknownOption(Q.unknown[0])},Y=`command:${this.name()}`;if(this._actionHandler){X(),this._processArguments();let Z;if(Z=this._chainOrCallHooks(Z,"preAction"),Z=this._chainOrCall(Z,()=>this._actionHandler(this.processedArgs)),this.parent)Z=this._chainOrCall(Z,()=>{this.parent.emit(Y,z,J)});return Z=this._chainOrCallHooks(Z,"postAction"),Z}if(this.parent?.listenerCount(Y))X(),this._processArguments(),this.parent.emit(Y,z,J);else if(z.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",z,J);if(this.listenerCount("command:*"))this.emit("command:*",z,J);else if(this.commands.length)this.unknownCommand();else X(),this._processArguments()}else if(this.commands.length)X(),this.help({error:!0});else X(),this._processArguments()}_findCommand(z){if(!z)return;return this.commands.find((J)=>J._name===z||J._aliases.includes(z))}_findOption(z){return this.options.find((J)=>J.is(z))}_checkForMissingMandatoryOptions(){this._getCommandAndAncestors().forEach((z)=>{z.options.forEach((J)=>{if(J.mandatory&&z.getOptionValue(J.attributeName())===void 0)z.missingMandatoryOptionValue(J)})})}_checkForConflictingLocalOptions(){let z=this.options.filter((Q)=>{let X=Q.attributeName();if(this.getOptionValue(X)===void 0)return!1;return this.getOptionValueSource(X)!=="default"});z.filter((Q)=>Q.conflictsWith.length>0).forEach((Q)=>{let X=z.find((Y)=>Q.conflictsWith.includes(Y.attributeName()));if(X)this._conflictingOption(Q,X)})}_checkForConflictingOptions(){this._getCommandAndAncestors().forEach((z)=>{z._checkForConflictingLocalOptions()})}parseOptions(z){let J=[],Q=[],X=J;function Y(q){return q.length>1&&q[0]==="-"}let Z=(q)=>{if(!/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(q))return!1;return!this._getCommandAndAncestors().some((R)=>R.options.map((B)=>B.short).some((B)=>/^-\d$/.test(B)))},$=null,_=null,T=0;while(T<z.length||_){let q=_??z[T++];if(_=null,q==="--"){if(X===Q)X.push(q);X.push(...z.slice(T));break}if($&&(!Y(q)||Z(q))){this.emit(`option:${$.name()}`,q);continue}if($=null,Y(q)){let R=this._findOption(q);if(R){if(R.required){let B=z[T++];if(B===void 0)this.optionMissingArgument(R);this.emit(`option:${R.name()}`,B)}else if(R.optional){let B=null;if(T<z.length&&(!Y(z[T])||Z(z[T])))B=z[T++];this.emit(`option:${R.name()}`,B)}else this.emit(`option:${R.name()}`);$=R.variadic?R:null;continue}}if(q.length>2&&q[0]==="-"&&q[1]!=="-"){let R=this._findOption(`-${q[1]}`);if(R){if(R.required||R.optional&&this._combineFlagAndOptionalValue)this.emit(`option:${R.name()}`,q.slice(2));else this.emit(`option:${R.name()}`),_=`-${q.slice(2)}`;continue}}if(/^--[^=]+=/.test(q)){let R=q.indexOf("="),B=this._findOption(q.slice(0,R));if(B&&(B.required||B.optional)){this.emit(`option:${B.name()}`,q.slice(R+1));continue}}if(X===J&&Y(q)&&!(this.commands.length===0&&Z(q)))X=Q;if((this._enablePositionalOptions||this._passThroughOptions)&&J.length===0&&Q.length===0){if(this._findCommand(q)){J.push(q),Q.push(...z.slice(T));break}else if(this._getHelpCommand()&&q===this._getHelpCommand().name()){J.push(q,...z.slice(T));break}else if(this._defaultCommandName){Q.push(q,...z.slice(T));break}}if(this._passThroughOptions){X.push(q,...z.slice(T));break}X.push(q)}return{operands:J,unknown:Q}}opts(){if(this._storeOptionsAsProperties){let z={},J=this.options.length;for(let Q=0;Q<J;Q++){let X=this.options[Q].attributeName();z[X]=X===this._versionOptionName?this._version:this[X]}return z}return this._optionValues}optsWithGlobals(){return this._getCommandAndAncestors().reduce((z,J)=>Object.assign(z,J.opts()),{})}error(z,J){if(this._outputConfiguration.outputError(`${z}
|
|
21
|
+
`,this._outputConfiguration.writeErr),typeof this._showHelpAfterError==="string")this._outputConfiguration.writeErr(`${this._showHelpAfterError}
|
|
22
|
+
`);else if(this._showHelpAfterError)this._outputConfiguration.writeErr(`
|
|
23
|
+
`),this.outputHelp({error:!0});let Q=J||{},X=Q.exitCode||1,Y=Q.code||"commander.error";this._exit(X,Y,z)}_parseOptionsEnv(){this.options.forEach((z)=>{if(z.envVar&&z.envVar in G.env){let J=z.attributeName();if(this.getOptionValue(J)===void 0||["default","config","env"].includes(this.getOptionValueSource(J)))if(z.required||z.optional)this.emit(`optionEnv:${z.name()}`,G.env[z.envVar]);else this.emit(`optionEnv:${z.name()}`)}})}_parseOptionsImplied(){let z=new V(this.options),J=(Q)=>{return this.getOptionValue(Q)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(Q))};this.options.filter((Q)=>Q.implied!==void 0&&J(Q.attributeName())&&z.valueFromOption(this.getOptionValue(Q.attributeName()),Q)).forEach((Q)=>{Object.keys(Q.implied).filter((X)=>!J(X)).forEach((X)=>{this.setOptionValueWithSource(X,Q.implied[X],"implied")})})}missingArgument(z){let J=`error: missing required argument '${z}'`;this.error(J,{code:"commander.missingArgument"})}optionMissingArgument(z){let J=`error: option '${z.flags}' argument missing`;this.error(J,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(z){let J=`error: required option '${z.flags}' not specified`;this.error(J,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(z,J){let Q=(Z)=>{let $=Z.attributeName(),_=this.getOptionValue($),T=this.options.find((R)=>R.negate&&$===R.attributeName()),q=this.options.find((R)=>!R.negate&&$===R.attributeName());if(T&&(T.presetArg===void 0&&_===!1||T.presetArg!==void 0&&_===T.presetArg))return T;return q||Z},X=(Z)=>{let $=Q(Z),_=$.attributeName();if(this.getOptionValueSource(_)==="env")return`environment variable '${$.envVar}'`;return`option '${$.flags}'`},Y=`error: ${X(z)} cannot be used with ${X(J)}`;this.error(Y,{code:"commander.conflictingOption"})}unknownOption(z){if(this._allowUnknownOption)return;let J="";if(z.startsWith("--")&&this._showSuggestionAfterError){let X=[],Y=this;do{let Z=Y.createHelp().visibleOptions(Y).filter(($)=>$.long).map(($)=>$.long);X=X.concat(Z),Y=Y.parent}while(Y&&!Y._enablePositionalOptions);J=D(z,X)}let Q=`error: unknown option '${z}'${J}`;this.error(Q,{code:"commander.unknownOption"})}_excessArguments(z){if(this._allowExcessArguments)return;let J=this.registeredArguments.length,Q=J===1?"":"s",X=z.length,Y=this.parent?` for '${this.name()}'`:"",Z=z.join(", "),$=`error: too many arguments${Y}. Expected ${J} argument${Q} but got ${X}: ${Z}.`;this.error($,{code:"commander.excessArguments"})}unknownCommand(){let z=this.args[0],J="";if(this._showSuggestionAfterError){let X=[];this.createHelp().visibleCommands(this).forEach((Y)=>{if(X.push(Y.name()),Y.alias())X.push(Y.alias())}),J=D(z,X)}let Q=`error: unknown command '${z}'${J}`;this.error(Q,{code:"commander.unknownCommand"})}version(z,J,Q){if(z===void 0)return this._version;this._version=z,J=J||"-V, --version",Q=Q||"output the version number";let X=this.createOption(J,Q);return this._versionOptionName=X.attributeName(),this._registerOption(X),this.on("option:"+X.name(),()=>{this._outputConfiguration.writeOut(`${z}
|
|
24
|
+
`),this._exit(0,"commander.version",z)}),this}description(z,J){if(z===void 0&&J===void 0)return this._description;if(this._description=z,J)this._argsDescription=J;return this}summary(z){if(z===void 0)return this._summary;return this._summary=z,this}alias(z){if(z===void 0)return this._aliases[0];let J=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler)J=this.commands[this.commands.length-1];if(z===J._name)throw Error("Command alias can't be the same as its name");let Q=this.parent?._findCommand(z);if(Q){let X=[Q.name()].concat(Q.aliases()).join("|");throw Error(`cannot add alias '${z}' to command '${this.name()}' as already have command '${X}'`)}return J._aliases.push(z),this}aliases(z){if(z===void 0)return this._aliases;return z.forEach((J)=>this.alias(J)),this}usage(z){if(z===void 0){if(this._usage)return this._usage;let J=this.registeredArguments.map((Q)=>{return P(Q)});return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?J:[]).join(" ")}return this._usage=z,this}name(z){if(z===void 0)return this._name;return this._name=z,this}helpGroup(z){if(z===void 0)return this._helpGroupHeading??"";return this._helpGroupHeading=z,this}commandsGroup(z){if(z===void 0)return this._defaultCommandGroup??"";return this._defaultCommandGroup=z,this}optionsGroup(z){if(z===void 0)return this._defaultOptionGroup??"";return this._defaultOptionGroup=z,this}_initOptionGroup(z){if(this._defaultOptionGroup&&!z.helpGroupHeading)z.helpGroup(this._defaultOptionGroup)}_initCommandGroup(z){if(this._defaultCommandGroup&&!z.helpGroup())z.helpGroup(this._defaultCommandGroup)}nameFromFilename(z){return this._name=U.basename(z,U.extname(z)),this}executableDir(z){if(z===void 0)return this._executableDir;return this._executableDir=z,this}helpInformation(z){let J=this.createHelp(),Q=this._getOutputContext(z);J.prepareContext({error:Q.error,helpWidth:Q.helpWidth,outputHasColors:Q.hasColors});let X=J.formatHelp(this,J);if(Q.hasColors)return X;return this._outputConfiguration.stripColor(X)}_getOutputContext(z){z=z||{};let J=!!z.error,Q,X,Y;if(J)Q=($)=>this._outputConfiguration.writeErr($),X=this._outputConfiguration.getErrHasColors(),Y=this._outputConfiguration.getErrHelpWidth();else Q=($)=>this._outputConfiguration.writeOut($),X=this._outputConfiguration.getOutHasColors(),Y=this._outputConfiguration.getOutHelpWidth();return{error:J,write:($)=>{if(!X)$=this._outputConfiguration.stripColor($);return Q($)},hasColors:X,helpWidth:Y}}outputHelp(z){let J;if(typeof z==="function")J=z,z=void 0;let Q=this._getOutputContext(z),X={error:Q.error,write:Q.write,command:this};this._getCommandAndAncestors().reverse().forEach((Z)=>Z.emit("beforeAllHelp",X)),this.emit("beforeHelp",X);let Y=this.helpInformation({error:Q.error});if(J){if(Y=J(Y),typeof Y!=="string"&&!Buffer.isBuffer(Y))throw Error("outputHelp callback must return a string or a Buffer")}if(Q.write(Y),this._getHelpOption()?.long)this.emit(this._getHelpOption().long);this.emit("afterHelp",X),this._getCommandAndAncestors().forEach((Z)=>Z.emit("afterAllHelp",X))}helpOption(z,J){if(typeof z==="boolean"){if(z){if(this._helpOption===null)this._helpOption=void 0;if(this._defaultOptionGroup)this._initOptionGroup(this._getHelpOption())}else this._helpOption=null;return this}if(this._helpOption=this.createOption(z??"-h, --help",J??"display help for command"),z||J)this._initOptionGroup(this._helpOption);return this}_getHelpOption(){if(this._helpOption===void 0)this.helpOption(void 0,void 0);return this._helpOption}addHelpOption(z){return this._helpOption=z,this._initOptionGroup(z),this}help(z){this.outputHelp(z);let J=Number(G.exitCode??0);if(J===0&&z&&typeof z!=="function"&&z.error)J=1;this._exit(J,"commander.help","(outputHelp)")}addHelpText(z,J){let Q=["beforeAll","before","after","afterAll"];if(!Q.includes(z))throw Error(`Unexpected value for position to addHelpText.
|
|
25
|
+
Expecting one of '${Q.join("', '")}'`);let X=`${z}Help`;return this.on(X,(Y)=>{let Z;if(typeof J==="function")Z=J({error:Y.error,command:Y.command});else Z=J;if(Z)Y.write(`${Z}
|
|
26
|
+
`)}),this}_outputHelpIfRequested(z){let J=this._getHelpOption();if(J&&z.find((X)=>J.is(X)))this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)")}}function y(z){return z.map((J)=>{if(!J.startsWith("--inspect"))return J;let Q,X="127.0.0.1",Y="9229",Z;if((Z=J.match(/^(--inspect(-brk)?)$/))!==null)Q=Z[1];else if((Z=J.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null)if(Q=Z[1],/^\d+$/.test(Z[3]))Y=Z[3];else X=Z[3];else if((Z=J.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null)Q=Z[1],X=Z[3],Y=Z[4];if(Q&&Y!=="0")return`${Q}=${X}:${parseInt(Y)+1}`;return J})}function A(){if(G.env.NO_COLOR||G.env.FORCE_COLOR==="0"||G.env.FORCE_COLOR==="false")return!1;if(G.env.FORCE_COLOR||G.env.CLICOLOR_FORCE!==void 0)return!0;return}var qz=new E;export{K as p,S as q,E as r};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import{Jg as _Q,Lg as iQ}from"./cli-1.1.35-f6sa351s.mjs";import{Ci as WQ,Di as zX}from"./cli-1.1.35-y6xhcehv.mjs";import{AK as OQ,Bx as CQ,CK as VQ,Cx as qX,FK as IJ,GK as nJ,HK as rJ,IK as gQ,JP as SJ,KP as NQ,Ou as BQ,Sx as zJ,Tx as iJ,Yu as ZX,pK as JJ,qK as mJ,qm as bJ,rm as aJ,vo as ZQ,wo as uQ,wx as FQ,xK as YQ,yK as GQ,yx as $X,zK as KQ}from"./cli-1.1.35-hy9jtbmb.mjs";import{CX as LJ,DX as lJ,IX as BJ,LY as FJ,MY as CJ,NY as oJ,QY as N,SY as M,aZ as t,lZ as e,xZ as WJ}from"./cli-1.1.35-dw3fv0g8.mjs";import{$2 as q,a3 as _,b3 as s}from"./cli-1.1.35-b0n88pf7.mjs";import{c3 as AJ}from"./cli-1.1.35-bq7wadxz.mjs";import{D7 as i,E7 as dJ}from"./cli-1.1.35-a9y8qxsj.mjs";import{Eha as DJ,zha as x}from"./cli-1.1.35-dnacc640.mjs";import{$ha as kQ,Hha as f,Iha as pJ,Kha as n,Oha as uJ,Tha as vJ}from"./cli-1.1.35-r4rm2297.mjs";import{Qia as UQ,Sia as aQ}from"./cli-1.1.35-h06ng57d.mjs";import{Tra as OJ,Xra as qJ,Yra as oQ}from"./cli-1.1.35-c05841mj.mjs";import{writeFile as fQ}from"fs/promises";import{join as hQ}from"path";function PJ(J){if(J<1000)return`${J}ms`;let U=Math.round(J/1000);if(U<60)return`${U}s`;return`${Math.floor(U/60)}m ${U%60}s`}function sJ(J){if(J==="done")return"success";if(J==="stalled"||J==="failed")return"error";if(J==="cancelled")return"warning";return"permission"}function cQ(J){if(J==="running")return"▸";if(J==="failed"||J==="stalled")return"✗";if(J==="cancelled")return"⊘";return"✓"}function tJ(J){let U=0,K=0;for(let H of J.history)for(let A of HJ(H.agents))if(K+=1,!A.failed)U+=1;return{done:U,total:K}}function eJ(J){let U=J.history.map((K)=>{let H=HJ(K.agents);return{step:K.step,done:H.filter((A)=>!A.failed).length,total:H.length,agents:K.agents,decision:K.decision}});if(J.status==="running"&&!J.history.some((K)=>K.step===J.currentStep))U.push({step:J.currentStep,done:J.agentsDone??0,total:J.agentsInPhase??0,agents:null,decision:null});return U}function JQ(J,U){return`${CJ(J)}${U}\x1B[39m`}function jJ(J,U,K){return J+" ".repeat(Math.max(0,K-U))}function xQ(J,U,K){let H=J.failed?"✗ ":"✓ ",A=JQ(J.failed?K.error:K.success,H.trimEnd())+" ",W=PJ(J.ms),X=f(W),I=Math.max(4,U-f(H)-X-1),w=n(`${J.label} ${J.model||"inherit"} · ${vJ(J.tokens)} tok`,I),S=w.length<=J.label.length?i.bold(w):i.bold(w.slice(0,J.label.length))+i.dim(w.slice(J.label.length)),F=Math.max(1,U-f(H)-f(w)-X);return A+S+" ".repeat(F)+i.dim(W)}function pQ({run:J,phaseIndex:U}){let{columns:K,rows:H}=bJ(),A=eJ(J),W=Math.min(U,Math.max(0,A.length-1)),X=A[W],{done:I,total:w}=tJ(J),[S]=BJ(),F=FJ(S),g=Math.max(6,H-6),R=g-2,l=TJ-4,v=Math.max(20,K-4-TJ-1-4-4),k=X?` ${X.step} · ${X.agents?HJ(X.agents).length:X.total} agents `:" phase ",C=A.map((D,L)=>{let V=L===W,O=D.total>0&&D.done===D.total?"✓":D.agents===null?"▸":"✓",m=n(`${V?") ":" "}${O} ${D.step}${D.total>0?` ${D.done}/${D.total}`:""}`,l);return jJ(V?JQ(F.permission,m):m,f(m),l)});while(C.length<R)C.push(" ".repeat(l));let j=!X?[jJ(i.dim("starting…"),f("starting…"),v)]:X.agents===null?[jJ(i.dim(`running… ${X.done}/${X.total} done`),f(`running… ${X.done}/${X.total} done`),v)]:HJ(X.agents).map((D)=>xQ(D,v,F));while(j.length<R)j.push(" ".repeat(v));return _(N,{flexDirection:"column",marginTop:1,children:[_(N,{flexDirection:"row",justifyContent:"space-between",children:[_(N,{flexDirection:"column",flexShrink:1,minWidth:0,children:[q(M,{bold:!0,color:"permission",wrap:"truncate",children:J.workflow}),J.description?q(M,{dimColor:!0,wrap:"truncate",children:J.description}):null]}),_(M,{color:sJ(J.status),wrap:"truncate",children:[I,"/",w," agents · ",PJ(J.updatedAt-J.startedAt)," · ",J.status]})]}),_(N,{flexDirection:"row",marginTop:1,gap:1,children:[q(N,{flexDirection:"column",flexShrink:0,width:TJ,height:g,overflow:"hidden",borderStyle:"round",borderColor:"subtle",paddingX:1,borderText:{content:" Phases ",position:"top",align:"start"},children:q(t,{lines:C.slice(0,R),width:l})}),q(N,{flexDirection:"column",flexGrow:1,height:g,overflow:"hidden",borderStyle:"round",borderColor:"subtle",paddingX:1,borderText:{content:k,position:"top",align:"start"},children:q(t,{lines:j.slice(0,R),width:v})})]})]})}function QQ({liveRun:J,onStop:U,initialRunId:K,onViewChange:H}){let[A,W]=y.useState([]),[X,I]=y.useState(0),[w,S]=y.useState(0),[F,g]=y.useState(K?{mode:"detail",runId:K}:{mode:"list"}),[R,l]=y.useState(null),[v,k]=y.useState(!1),[C,j]=y.useState(new Set);y.useEffect(()=>{IJ().then(W).catch(($)=>x($))},[J?.runId,J?.updatedAt]);let D=(J?[J,...A.filter(($)=>$.runId!==J.runId)]:A).filter(($)=>!C.has($.runId)),L=D[Math.min(X,Math.max(0,D.length-1))],V=F.mode==="detail"?D.find(($)=>$.runId===F.runId):void 0;y.useEffect(()=>{H?.(F.mode==="detail")},[F.mode,H]);let O=y.useCallback(()=>{LJ.get(process.stdout)?.prepareFullRepaint()},[]),m=y.useRef(!1);y.useEffect(()=>{if(m.current||!K)return;let $=D.findIndex((Y)=>Y.runId===K);if($>=0)I($),m.current=!0},[K,D]);let T=F.mode==="detail"?V:L,h=y.useCallback(async()=>{if(!T)return;try{let $=hQ(JJ(),`run-${T.runId}.md`);await fQ($,rJ(T)),l($)}catch($){x($)}},[T]),c=y.useCallback(async()=>{if(!L)return;try{await nJ(L.runId),j(($)=>new Set($).add(L.runId)),I(($)=>Math.max(0,Math.min($,D.length-2))),W(await IJ())}catch($){x($)}},[L,D.length]);if(e(($,Y)=>{if(F.mode==="detail"){let P=V?eJ(V).length:0;if(Y.escape)O(),g({mode:"list"});else if(Y.upArrow)O(),S((B)=>Math.max(0,B-1));else if(Y.downArrow)O(),S((B)=>Math.min(Math.max(0,P-1),B+1));else if($==="s")h();else if($==="x"&&V&&J&&V.runId===J.runId)U();return}if(v){if(k(!1),$==="y")c();return}if(Y.upArrow)I((P)=>Math.max(0,P-1));else if(Y.downArrow)I((P)=>Math.min(D.length-1,P+1));else if(Y.return&&L)O(),S(0),g({mode:"detail",runId:L.runId});else if($==="s")h();else if($==="x"&&L&&J&&L.runId===J.runId)U();else if($==="d"&&L&&L.status!=="running")k(!0)},{isActive:!0}),F.mode==="detail"){if(!V)return q(N,{paddingX:2,paddingTop:1,children:q(M,{dimColor:!0,children:"Run not found."})});return _(N,{flexDirection:"column",paddingX:2,children:[q(pQ,{run:V,phaseIndex:w}),R&&_(M,{color:"success",children:["Saved → ",R]})]})}return _(N,{flexDirection:"column",paddingTop:1,children:[q(zJ,{color:"permission",padding:4}),D.length===0?q(N,{paddingX:2,marginTop:1,children:q(M,{dimColor:!0,children:"No workflow runs yet. Start one from the Library tab."})}):_(N,{flexDirection:"column",paddingX:2,marginTop:1,children:[D.map(($,Y)=>{let{total:P}=tJ($);return _(M,{inverse:Y===X,wrap:"truncate",children:[Y===X?"▸ ":" ",q(M,{color:sJ($.status),children:cQ($.status)})," ",$.workflow," ",P," agents · ",vJ($.totalTokens)," tok · ",PJ($.updatedAt-$.startedAt)]},$.runId)}),R&&q(N,{marginTop:1,children:_(M,{color:"success",children:["Saved → ",R]})}),v&&L&&q(N,{marginTop:1,children:_(M,{color:"warning",children:['Delete run "',L.workflow,'" (',PJ(L.updatedAt-L.startedAt),")? (y/n)"]})})]})]})}var y,HJ=(J)=>J.filter((U)=>U.label!=="main"),TJ=26;var XQ=qJ(()=>{dJ();WJ();lJ();pJ();kQ();DJ();oJ();uJ();aJ();iJ();gQ();mJ();s();y=OJ(AJ(),1)});function lQ(J){let U={name:J.name};if(J.agents.length>0)U.agents=J.agents;if(J.handbackTo?.length)U.handbackTo=J.handbackTo;return U}function $Q(J,U={}){let K={name:J.name,description:J.description};if(J.main)K.main=J.main;K.steps=J.steps.map(lQ);for(let[W,X]of Object.entries(U))if(!dQ.has(W))K[W]=X;let H=ZQ(K).trimEnd(),A=J.instructions.trim();return`---
|
|
2
|
+
${H}
|
|
3
|
+
---
|
|
4
|
+
${A?`${A}
|
|
5
|
+
`:""}`}function qQ(J,U,K){let H=J[U]?.name;return J.map((A,W)=>({...A,name:W===U?K:A.name,handbackTo:A.handbackTo?.map((X)=>X===H?K:X)}))}var dQ;var zQ=qJ(()=>{uQ();dQ=new Set(["name","description","main","steps"])});import{unlinkSync as nQ,writeFileSync as rQ}from"fs";import{readFile as sQ,writeFile as tQ}from"fs/promises";import{tmpdir as eQ}from"os";import{join as yJ}from"path";function UJ(J,U){return`${CJ(J)}${U}\x1B[39m`}function ZJ(J,U,K){return J+" ".repeat(Math.max(0,K-U))}function EJ(J,U,K){let H=J.slice(0,U);while(H.length<U)H.push(" ".repeat(K));return H}function MQ({sourceFile:J,onClose:U}){let{columns:K,rows:H}=bJ(),[A]=BJ(),W=FJ(A),[X,I]=E.useState(null),[w,S]=E.useState({}),[F,g]=E.useState(null),[R,l]=E.useState(!1),[v,k]=E.useState("phases"),[C,j]=E.useState(0),[D,L]=E.useState(0),[V,O]=E.useState(null),[m,T]=E.useState(null),[h,c]=E.useState(null),$=E.useCallback(()=>{LJ.get(process.stdout)?.prepareFullRepaint()},[]);E.useEffect(()=>{sQ(yJ(JJ(),J),"utf-8").then((Q)=>{let Z=YQ(Q,J.replace(/\.md$/,""));if(Z.def)I(Z.def),S(Z.rawFrontmatter);else g(Z.errors.join("; "))}).catch((Q)=>{x(Q),g("Failed to read workflow file.")})},[J]),E.useEffect(()=>{import("./agentTypes-1.1.35-nx5q66t5.mjs").then((Q)=>Q.getKnownAgentTypes(UQ())).then(c).catch((Q)=>x(Q))},[]);let Y=E.useMemo(()=>{if(!X)return[];let Q=GQ(X);if(h)Q.push(...KQ(X,h));return Q},[X,h]),P=E.useCallback((Q)=>{$(),I((Z)=>Z?Q(Z):Z),l(!0),T(null)},[$]),B=C-1,u=X&&B>=0?X.steps[B]:void 0,YJ=C===0?["description","main"]:["name","agents","handbackTo"],bQ=E.useCallback(async()=>{if(!X)return;try{let Q=yJ(JJ(),J);await tQ(Q,$Q(X,w)),l(!1),T(`Saved → ${Q}`)}catch(Q){x(Q),T("Failed to save.")}},[X,w,J]),EQ=E.useCallback(()=>{if(!X)return;let Q=yJ(eQ(),`claudin-wf-prompt-${Date.now()}.md`);try{rQ(Q,X.instructions?`${X.instructions}
|
|
6
|
+
`:"");let Z=_Q(Q);if(Z.error)T(Z.error);else if(Z.content===null)T("No external editor available — set $EDITOR or $VISUAL.");else{let z=Z.content.trim();if(z!==X.instructions)P((G)=>({...G,instructions:z}))}}catch(Z){x(Z),T("Failed to open editor.")}finally{try{nQ(Q)}catch{}}},[X,P]),SQ=E.useCallback(()=>{if(!X)return;let Q=YJ[D];if($(),C===0){if(Q==="description")O({kind:"input",target:"description",value:X.description,cursor:X.description.length});else{let Z=["(default)",...[...h??[]].sort()];O({kind:"picker",target:"main",options:Z,checked:new Set([X.main??"(default)"]),cursor:Math.max(0,Z.indexOf(X.main??"(default)")),multi:!1})}return}if(!u)return;if(Q==="name")O({kind:"input",target:"name",value:u.name,cursor:u.name.length});else if(Q==="agents"){let Z=[...new Set([...[...h??[]].sort(),...u.agents])];O({kind:"picker",target:"agents",options:Z,checked:new Set(u.agents),cursor:0,multi:!0})}else{let Z=X.steps.slice(0,B).map((z)=>z.name);if(Z.length===0){T("No earlier phases to hand back to.");return}O({kind:"picker",target:"handbackTo",options:Z,checked:new Set(u.handbackTo??[]),cursor:0,multi:!0})}},[X,YJ,D,C,u,B,h,$]),RQ=E.useCallback((Q,Z)=>{let z=Z.trim();if($(),O(null),!z)return;if(Q==="description")P((G)=>({...G,description:z}));else if(Q==="name"&&B>=0)P((G)=>({...G,steps:qQ(G.steps,B,z)}));else if(Q==="addStep"){let G=C===0?0:C;P((b)=>({...b,steps:[...b.steps.slice(0,G),{name:z,agents:[]},...b.steps.slice(G)]})),j(G+1),k("phases")}},[$,C,B,P]),TQ=E.useCallback((Q)=>{if($(),O(null),Q.target==="main"){let z=Q.options[Q.cursor];P((G)=>({...G,main:z==="(default)"?void 0:z}));return}let Z=Q.options.filter((z)=>Q.checked.has(z));if(Q.target==="agents"&&B>=0)P((z)=>({...z,steps:z.steps.map((G,b)=>b===B?{...G,agents:Z}:G)}));else if(Q.target==="handbackTo"&&B>=0)P((z)=>({...z,steps:z.steps.map((G,b)=>b===B?{...G,handbackTo:Z.length?Z:void 0}:G)}))},[$,B,P]),jQ=E.useCallback(()=>{if(B<0)return;P((Q)=>({...Q,steps:Q.steps.filter((Z,z)=>z!==B)})),j((Q)=>Math.max(0,Math.min(Q,(X?.steps.length??1)-1))),k("phases")},[X,B,P]),gJ=E.useCallback((Q)=>{if(!X||B<0)return;let Z=B+Q;if(Z<0||Z>=X.steps.length)return;P((z)=>{let G=[...z.steps],[b]=G.splice(B,1);return G.splice(Z,0,b),{...z,steps:G}}),j(Z+1)},[X,B,P]);if(e((Q,Z)=>{if(!X){if(Z.escape)U();return}if(V?.kind==="input")return;if(V?.kind==="confirmDelete"){if($(),O(null),Q==="y")jQ();return}if(V?.kind==="confirmDiscard"){if($(),O(null),Q==="y")U();return}if(V?.kind==="picker"){let z=(G)=>{$(),O((b)=>b?.kind==="picker"?G(b):b)};if(Z.upArrow)z((G)=>({...G,cursor:Math.max(0,G.cursor-1)}));else if(Z.downArrow)z((G)=>({...G,cursor:Math.min(G.options.length-1,G.cursor+1)}));else if(Q===" "&&V.multi)z((G)=>{let b=G.options[G.cursor];if(b===void 0)return G;let a=new Set(G.checked);if(a.has(b))a.delete(b);else a.add(b);return{...G,checked:a}});else if(Z.return)TQ(V);else if(Z.escape)$(),O(null);return}if(Q==="s"){bQ();return}if(Q==="p"){EQ();return}if(v==="fields"){if(Z.escape)$(),k("phases");else if(Z.upArrow)$(),L((z)=>Math.max(0,z-1));else if(Z.downArrow)$(),L((z)=>Math.min(YJ.length-1,z+1));else if(Z.return)SQ();return}if(Z.escape)if(R)$(),O({kind:"confirmDiscard"});else U();else if(Z.upArrow)$(),j((z)=>Math.max(0,z-1));else if(Z.downArrow)$(),j((z)=>Math.min(X.steps.length,z+1));else if(Z.return)$(),k("fields"),L(0);else if(Q==="a")$(),O({kind:"input",target:"addStep",value:"",cursor:0});else if(Q==="d"&&C>0)$(),O({kind:"confirmDelete"});else if(Q==="K")gJ(-1);else if(Q==="J")gJ(1)},{isActive:!0}),F)return _(N,{flexDirection:"column",paddingX:2,paddingTop:1,children:[_(M,{color:"error",children:["⚠ ",F]}),_(M,{dimColor:!0,children:["Esc to go back — fix the file by hand at .claudin/workflows/",J,"."]})]});if(!X)return q(N,{paddingX:2,paddingTop:1,children:q(M,{dimColor:!0,children:"Loading…"})});let $J=Math.max(6,H-6),r=wJ-4,o=Math.max(20,K-4-wJ-1-4-4),IQ=$J-2,GJ=(Q)=>Q?") ":" ",KJ=[];{let Q=n(`${GJ(C===0)}${X.name}`,r);KJ.push(ZJ(C===0?UJ(W.permission,Q):i.bold(Q),f(Q),r));let Z=` ${"─".repeat(Math.max(1,r-2))}`;KJ.push(ZJ(i.dim(Z),f(Z),r)),X.steps.forEach((z,G)=>{let b=C===G+1,a=n(`${GJ(b)}${z.name} ${z.agents.length}`,r);KJ.push(ZJ(b?UJ(W.permission,a):a,f(a),r))})}let fJ=V?.kind==="picker",VJ,NJ,vQ=" Prompt (p to edit) ",_J=[],mQ=kJ-2,hJ=Math.max(3,$J-kJ),cJ=hJ-2;if(fJ){let Q=V;VJ=Q.target==="main"?" main orchestrator ":` ${Q.target==="agents"?"agents":"hand back to"} · ${u?.name??X.name} `;let Z=$J-2,z=Math.max(0,Math.min(Q.cursor-Math.floor(Z/2),Q.options.length-Z));NJ=Q.options.slice(z,z+Z).map((G,b)=>{let XJ=z+b===Q.cursor,RJ=Q.multi?Q.checked.has(G)?"[x] ":"[ ] ":"",xJ=Q.target==="agents"&&h&&!h.has(G),MJ=n(`${GJ(XJ)}${RJ}${G}${xJ?" (unknown)":""}`,o),wQ=XJ?UJ(W.permission,MJ):xJ?UJ(W.error,MJ):MJ;return ZJ(wQ,f(MJ),o)})}else{VJ=C===0?` ${X.name} `:` phase: ${u?.name??""} `;let Q=(z)=>{if(z==="description")return X.description||"(empty)";if(z==="main")return X.main??"(default)";if(z==="name")return u?.name??"";if(z==="agents")return u?.agents.join(", ")||"(none)";return u?.handbackTo?.join(", ")??"—"};if(NJ=YJ.map((z,G)=>{let b=v==="fields"&&G===D,a=z==="handbackTo"?"handback":z,XJ=n(`${GJ(b)}${a}: ${Q(z)}`,o),RJ=b?UJ(W.permission,XJ):i.dim(XJ.slice(0,2+a.length+1))+XJ.slice(2+a.length+1);return ZJ(RJ,f(XJ),o)}),_J=(X.instructions?X.instructions.split(`
|
|
7
|
+
`):[]).slice(0,cJ).map((z)=>{let G=n(z,o);return ZJ(i.dim(G),f(G),o)}),_J.length===0)_J=[ZJ(i.dim("(empty — press p to write the prompt)"),f("(empty — press p to write the prompt)"),o)]}let QJ=V?.kind==="input"?V:null,yQ=QJ?.target==="addStep"?"New phase name:":QJ?.target==="name"?"Rename phase:":"Description:";return _(N,{flexDirection:"column",marginTop:1,children:[_(N,{flexDirection:"row",justifyContent:"space-between",children:[q(M,{bold:!0,color:"permission",wrap:"truncate",children:X.name}),q(M,{color:R?"warning":"success",wrap:"truncate",children:R?"● unsaved":"saved"})]}),_(N,{flexDirection:"row",marginTop:1,gap:1,children:[q(N,{flexDirection:"column",flexShrink:0,width:wJ,height:$J,overflow:"hidden",borderStyle:"round",borderColor:"subtle",paddingX:1,borderText:{content:" Phases ",position:"top",align:"start"},children:q(t,{lines:EJ(KJ,IQ,r),width:r})}),fJ?q(N,{flexDirection:"column",flexGrow:1,height:$J,overflow:"hidden",borderStyle:"round",borderColor:"subtle",paddingX:1,borderText:{content:VJ,position:"top",align:"start"},children:q(t,{lines:EJ(NJ,$J-2,o),width:o})}):_(N,{flexDirection:"column",flexGrow:1,children:[q(N,{flexDirection:"column",height:kJ,overflow:"hidden",borderStyle:"round",borderColor:"subtle",paddingX:1,borderText:{content:VJ,position:"top",align:"start"},children:q(t,{lines:EJ(NJ,mQ,o),width:o})}),q(N,{flexDirection:"column",height:hJ,overflow:"hidden",borderStyle:"round",borderColor:"subtle",paddingX:1,borderText:{content:vQ,position:"top",align:"start"},children:q(t,{lines:EJ(_J,cJ,o),width:o})})]})]}),QJ&&_(N,{flexDirection:"column",children:[q(M,{children:yQ}),q(N,{borderStyle:"round",borderDimColor:!0,paddingLeft:1,children:q(SJ,{value:QJ.value,onChange:(Q)=>O((Z)=>Z?.kind==="input"?{...Z,value:Q}:Z),onSubmit:()=>RQ(QJ.target,QJ.value),columns:80,cursorOffset:QJ.cursor,onChangeCursorOffset:(Q)=>O((Z)=>Z?.kind==="input"?{...Z,cursor:Q}:Z),showCursor:!0})}),q(M,{dimColor:!0,children:"Enter to confirm · empty + Enter to cancel"})]}),V?.kind==="confirmDelete"&&u&&_(M,{color:"warning",children:['Delete phase "',u.name,'"? (y/n)']}),V?.kind==="confirmDiscard"&&q(M,{color:"warning",children:"Discard unsaved changes? (y/n)"}),Y.length>0&&_(M,{color:"error",wrap:"truncate",children:["⚠ ",Y.join(" · ")]}),m&&q(M,{dimColor:!0,wrap:"truncate",children:m})]})}var E,wJ=26,kJ=7;var PQ=qJ(()=>{dJ();WJ();lJ();pJ();NQ();aJ();aQ();DJ();iQ();oJ();uJ();VQ();mJ();zQ();s();E=OJ(AJ(),1)});import{unlink as JX,writeFile as QX}from"fs/promises";import{join as HQ}from"path";function DQ({onRun:J,onInputActiveChange:U,onViewChange:K}){let[H,A]=p.useState([]),[W,X]=p.useState({}),[I,w]=p.useState(0),[S,F]=p.useState("list"),[g,R]=p.useState(""),[l,v]=p.useState(0),[k,C]=p.useState(null),[j,D]=p.useState(null),L=p.useCallback(()=>{OQ().then(({defs:Y,errorsByFile:P})=>{A(Y),X(P)}).catch((Y)=>x(Y))},[]);p.useEffect(L,[L]),p.useEffect(()=>{U(S!=="list")},[S,U]),p.useEffect(()=>{K?.(j!==null)},[j,K]);let V=H[Math.min(I,Math.max(0,H.length-1))],O=(Y)=>Y.sourceFile??`${Y.name}.md`,m=V?W[O(V)]:void 0,T=(Y)=>{R(""),v(0),C(null),F(Y)},h=()=>{if(V&&g.trim())J(V,g.trim());F("list")},c=async()=>{let Y=g.trim();if(!Y){F("list");return}try{let P=HQ(JJ(),`${Y}.md`);await QX(P,XX(Y)),L(),D(`${Y}.md`)}catch(P){x(P),C("Failed to create workflow.")}F("list")},$=async()=>{if(V)try{await JX(HQ(JJ(),O(V))),C(`Deleted ${V.name}.`),L()}catch(Y){x(Y),C("Failed to delete workflow.")}F("list")};if(e((Y,P)=>{if(j!==null)return;if(S==="confirmDelete"){if(Y==="y")$();else F("list");return}if(S!=="list")return;if(P.upArrow)w((B)=>Math.max(0,B-1));else if(P.downArrow)w((B)=>Math.min(H.length-1,B+1));else if(P.return&&V)T("task");else if(Y==="n")T("new");else if(Y==="d"&&V)F("confirmDelete");else if(Y==="e"&&V)C(null),D(O(V));else if(Y==="r")L()},{isActive:!0}),j!==null)return q(N,{paddingX:2,children:q(MQ,{sourceFile:j,onClose:()=>{D(null),L()}})});if(S==="task"||S==="new"){let Y=S==="task"?`Task for "${V?.name}":`:"New workflow name:";return _(N,{flexDirection:"column",paddingTop:1,paddingX:2,children:[q(zJ,{color:"permission"}),q(N,{marginTop:1,children:q(M,{children:Y})}),q(N,{borderStyle:"round",borderDimColor:!0,marginY:1,paddingLeft:1,children:q(SJ,{value:g,onChange:R,onSubmit:S==="task"?h:()=>void c(),columns:80,cursorOffset:l,onChangeCursorOffset:v,showCursor:!0})}),q(M,{dimColor:!0,children:"Enter to confirm · empty + Enter to cancel"})]})}return _(N,{flexDirection:"column",paddingTop:1,children:[q(zJ,{color:"permission"}),_(N,{flexDirection:"column",paddingX:2,marginTop:1,children:[H.length===0?q(M,{dimColor:!0,children:'No workflows. Press "n" to create one at .claudin/workflows/.'}):H.map((Y,P)=>{let B=Boolean(W[O(Y)]?.length);return _(M,{inverse:P===I,children:[P===I?"▸ ":" ",Y.name,B?" ⚠":""," ",_(M,{dimColor:!0,children:["· ",Y.steps.length," phases"]})]},Y.name)}),V&&_(N,{flexDirection:"column",marginTop:1,children:[q(M,{dimColor:!0,children:V.description}),V.steps.map((Y)=>_(M,{dimColor:!0,children:[" ",Y.name,": ",Y.agents.join(", ")||"(terminal)",Y.handbackTo?.length?` ↩ ${Y.handbackTo.join(",")}`:""]},Y.name)),m?.length?_(M,{color:"error",children:["⚠ ",m.join("; ")]}):null]}),S==="confirmDelete"&&V&&q(N,{marginTop:1,children:_(M,{color:"warning",children:['Delete "',V.name,'"? (y/n)']})}),k&&q(N,{marginTop:1,children:q(M,{dimColor:!0,children:k})})]})]})}var p,XX=(J)=>`---
|
|
8
|
+
name: ${J}
|
|
9
|
+
description: What this workflow does
|
|
10
|
+
steps:
|
|
11
|
+
- name: explore
|
|
12
|
+
agents: [explorer]
|
|
13
|
+
- name: synthesize
|
|
14
|
+
agents: [synthesizer]
|
|
15
|
+
handbackTo: [explore]
|
|
16
|
+
- name: done
|
|
17
|
+
---
|
|
18
|
+
Describe the goal and any house rules for this workflow.
|
|
19
|
+
`;var LQ=qJ(()=>{WJ();NQ();DJ();iJ();VQ();mJ();PQ();s();p=OJ(AJ(),1)});function AQ({hint:J,onExit:U,escActive:K=!0}){let H=CQ();return FQ("confirm:no",U,{context:"Settings",isActive:K}),q(N,{marginLeft:2,marginTop:1,children:q(M,{dimColor:!0,children:H.pending?`Press ${H.keyName} again to exit`:J})})}function NZ({context:J,onExit:U,initialTab:K,initialRunId:H}){let[A,W]=d.useState(K??"library"),[X,I]=d.useState(null),[w,S]=d.useState(!1),[F,g]=d.useState(!1),[R,l]=d.useState(!1),v=d.useRef(null),k=d.useRef(!0);d.useEffect(()=>{return k.current=!0,()=>{k.current=!1}},[]);let C=J.canUseTool??UX,j=d.useCallback((O,m)=>{v.current?.abort();let T=new AbortController;v.current=T,W("running");let h={...J,setAppState:()=>{},setAppStateForTasks:J.setAppStateForTasks??J.setAppState};WQ({def:O,task:m,toolUseContext:h,canUseTool:C,signal:T.signal,onProgress:(c)=>{if(k.current)I({...c})}}).then((c)=>{if(k.current)I({...c});let $=(c.artifact||"").slice(0,2000);BQ({value:`<task-notification>
|
|
20
|
+
<status>${c.status}</status>
|
|
21
|
+
<summary>Workflow "${O.name}" ${c.status} (run ${c.runId})</summary>
|
|
22
|
+
<result>${$}</result>
|
|
23
|
+
</task-notification>`,mode:"task-notification"})}).catch((c)=>x(c))},[J,C]),D=d.useCallback(()=>{v.current?.abort()},[]);e((O,m)=>{if(m.tab||m.leftArrow)W((T)=>T==="running"?"library":"running");else if(m.rightArrow)W("running")},{isActive:!w&&!F&&!R});let L=_(N,{flexDirection:"row",gap:1,children:[q(M,{bold:!0,color:"permission",children:"Workflows"}),_(M,{bold:A==="running",inverse:A==="running",children:[" ","Running"," "]}),_(M,{bold:A==="library",inverse:A==="library",children:[" ","Library"," "]})]}),V=()=>U("Workflows dialog dismissed",{display:"system"});if(A==="running")return _(N,{flexDirection:"column",children:[!F&&L,q(QQ,{liveRun:X,onStop:D,initialRunId:H,onViewChange:g}),q(AQ,{hint:F?"↑↓ select · esc back · s save":"Tab tabs · ↑↓ select · Enter view · s save · x stop · d delete · Esc close",escActive:!F,onExit:V})]});return _(N,{flexDirection:"column",children:[!R&&L,q(DQ,{onRun:j,onInputActiveChange:S,onViewChange:l}),q(AQ,{hint:R?"↑↓ nav · Enter edit · a add · d del · K/J move · p prompt · s save · Esc back":"Tab tabs · ↑↓ select · Enter run · n new · e edit · d delete · Esc close",escActive:!R,onExit:V})]})}var d,UX=async(J,U)=>({behavior:"allow",updatedInput:U});var YX=qJ(()=>{WJ();qX();$X();DJ();ZX();zX();XQ();LQ();s();d=OJ(AJ(),1)});
|
|
24
|
+
export{NZ as Zb,YX as _b};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Xra as B}from"./cli-1.1.35-c05841mj.mjs";function D(g,q){switch(q.type){case"set_local_jsx":{if(q.generation<g.generation)return g;return{state:{...q.payload,isLocalJSXCommand:!0},generation:g.generation+1,hasLocalJSXActive:!0}}case"clear_local_jsx":return{state:null,generation:g.generation+1,hasLocalJSXActive:!1};case"set_regular":{if(g.hasLocalJSXActive)return g;return{...g,state:q.payload}}case"set_null":{if(g.hasLocalJSXActive)return g;if(g.state===null)return g;return{...g,state:null}}}}var C;var F=B(()=>{C={state:null,generation:0,hasLocalJSXActive:!1}});function K(g){return z=g,()=>{if(z===g)z=null}}function L(g){let q=D(w,g);if(q===w)return;w=q,z?.(q.state)}function M(){return w.generation}var w,z=null;var G=B(()=>{F();w=C});
|
|
2
|
+
export{K as Ui,L as Vi,M as Wi,G as Xi};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{xc as j,yc as m}from"./cli-1.1.35-2gxxpyvc.mjs";import{Ec as k,Fc as O,Gc as P}from"./cli-1.1.35-21w0bna1.mjs";import{C6 as K,H6 as V,h7 as E,y6 as I}from"./cli-1.1.35-s85hd24a.mjs";import{Bga as h,Eha as b,L$ as N,N$ as J,Wba as U,dga as G,kga as F,qda as W,rda as $,xda as x,zha as H}from"./cli-1.1.35-dnacc640.mjs";import{cla as _,kla as L}from"./cli-1.1.35-w9wzew2x.mjs";import{Joa as R,Jqa as T}from"./cli-1.1.35-1ceb2tjb.mjs";import{Xra as y}from"./cli-1.1.35-c05841mj.mjs";function l(){X=!0}function f(){if(!X)return!1;return X=!1,!0}function s(q){return(B)=>({...B,...typeof q.permission_mode==="string"?{toolPermissionContext:{...B.toolPermissionContext,mode:$(q.permission_mode)}}:{}})}function S({newState:q,oldState:B}){let Y=f(),Z=B.toolPermissionContext.mode,Q=q.toolPermissionContext.mode;if(Z!==Q){let z=W(Z),D=W(Q);if(z!==D)k({permission_mode:D});O(Q)}if(q.mainLoopModel!==B.mainLoopModel&&q.mainLoopModel===null){if(R(null),!Y)U((z)=>({...z,activeModelForProject:void 0,activeModelForProjectProfileId:void 0}))}if(q.mainLoopModel!==B.mainLoopModel&&q.mainLoopModel!==null){if(R(q.mainLoopModel),!Y){let z=F()?.id;U((D)=>({...D,activeModelForProject:q.mainLoopModel??void 0,activeModelForProjectProfileId:z}))}}if(q.expandedView!==B.expandedView){let z=q.expandedView==="tasks",D=q.expandedView==="teammates";if(J().showExpandedTodos!==z||J().showSpinnerTree!==D)N((A)=>({...A,showExpandedTodos:z,showSpinnerTree:D}))}if(q.verbose!==B.verbose&&J().verbose!==q.verbose){let z=q.verbose;N((D)=>({...D,verbose:z}))}if(q.collapseSubagentProgress!==B.collapseSubagentProgress&&J().collapseSubagentProgress!==q.collapseSubagentProgress){let z=q.collapseSubagentProgress;N((D)=>({...D,collapseSubagentProgress:z}))}if(q.settings!==B.settings)try{if(I(),K(),V(),q.settings.env!==B.settings.env)j()}catch(z){H(_(z))}}var X=!1;var u=y(()=>{T();E();G();L();b();m();h();x();P()});
|
|
2
|
+
export{l as sc,s as tc,S as uc,u as vc};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{mc as O,nc as Q,qc as U,rc as $}from"./cli-1.1.35-pms9wnd8.mjs";import{iF as N,uF as _}from"./cli-1.1.35-hy9jtbmb.mjs";import{QY as G,SY as w,xZ as Z}from"./cli-1.1.35-dw3fv0g8.mjs";import{$2 as q,a3 as F,b3 as K}from"./cli-1.1.35-b0n88pf7.mjs";import{c3 as Y}from"./cli-1.1.35-bq7wadxz.mjs";import{Tra as W,Xra as X}from"./cli-1.1.35-c05841mj.mjs";function R({enabled:J,onDismiss:H}){let[z,A]=V.useState(()=>J?{kind:"prompt"}:{kind:"hidden"});if(!J||z.kind==="hidden")return null;if(z.kind==="running")return F(G,{flexDirection:"column",marginBottom:1,children:[q(w,{color:"warning",bold:!0,children:"Migrating ~/.claude/ to ~/.claudin/..."}),q(w,{dimColor:!0,children:"Copying API tokens and provider profiles."})]});if(z.kind==="success"||z.kind==="error"){let I=z.kind==="success"?"success":"warning",E=z.kind==="success"?"Migration complete":"Migration finished with warnings";return F(G,{flexDirection:"column",marginBottom:1,children:[q(w,{color:I,bold:!0,children:E}),q(w,{children:Q(z.report)}),q(w,{dimColor:!0,children:"Next: /import brings skills, MCP servers, agents and slash commands — from Claude Code, and from Codex, Gemini CLI, Qwen Code, opencode, Kimi CLI and Cursor."})]})}return F(G,{flexDirection:"column",marginBottom:1,children:[q(w,{color:"warning",bold:!0,children:"Found Claude Code config at ~/.claude/"}),q(w,{children:"Copy the Claude Code sign-in — API tokens and provider profiles — into ~/.claudin/?"}),q(N,{options:[{value:"migrate",label:"Copy my sign-in",description:"Tokens only. Run /import for skills, MCP, agents."},{value:"skip",label:"Skip — start fresh",description:"Don't ask again this profile."}],onChange:(I)=>{if(I==="skip"){U(),A({kind:"hidden"}),H?.("skipped");return}A({kind:"running"}),(async()=>{let E=await O();A({kind:E.errors.length===0?"success":"error",report:E}),H?.("migrated")})()},onCancel:()=>{A({kind:"hidden"}),H?.("skipped")},visibleOptionCount:2})]})}var V;var f=X(()=>{Z();$();_();K();V=W(Y(),1)});
|
|
2
|
+
export{R as kc,f as lc};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{Ed as Q,Fd as R,Gd as W,Hd as X,Id as Y,Jd as Z,Kd as k}from"./cli-1.1.35-kh8s6rf2.mjs";import{Sj as K,Uj as U}from"./cli-1.1.35-hy9jtbmb.mjs";import{Eha as N,S_ as y,T_ as M,zha as J}from"./cli-1.1.35-dnacc640.mjs";import{Kka as G,Oka as B}from"./cli-1.1.35-jdqn8gkp.mjs";import{dla as H,kla as $}from"./cli-1.1.35-w9wzew2x.mjs";M();$();U();N();B();k();function F(v,x,q){J(v);let z=q?`${x} plugin "${q}"`:x==="disable-all"?"disable all plugins":`${x} plugins`;console.error(`${y.cross} Failed to ${z}: ${H(v)}`),process.exit(1)}async function L(v,x="user"){try{console.log(`Installing plugin "${v}"...`);let q=await Q(v,x);if(!q.success)throw Error(q.message);console.log(`${y.tick} ${q.message}`),process.exit(0)}catch(q){F(q,"install",v)}}async function A(v,x="user",q=!1){try{let z=await R(v,x,!q);if(!z.success)throw Error(z.message);console.log(`${y.tick} ${z.message}`),process.exit(0)}catch(z){F(z,"uninstall",v)}}async function C(v,x){try{let q=await W(v,x);if(!q.success)throw Error(q.message);console.log(`${y.tick} ${q.message}`),process.exit(0)}catch(q){F(q,"enable",v)}}async function f(v,x){try{let q=await X(v,x);if(!q.success)throw Error(q.message);console.log(`${y.tick} ${q.message}`),process.exit(0)}catch(q){F(q,"disable",v)}}async function O(){try{let v=await Y();if(!v.success)throw Error(v.message);console.log(`${y.tick} ${v.message}`),process.exit(0)}catch(v){F(v,"disable-all")}}async function S(v,x){try{G(`Checking for updates for plugin "${v}" at ${x} scope…
|
|
2
|
+
`);let q=await Z(v,x);if(!q.success)throw Error(q.message);G(`${y.tick} ${q.message}
|
|
3
|
+
`),await K(0)}catch(q){F(q,"update",v)}}
|
|
4
|
+
export{L as h,A as i,C as j,f as k,O as l,S as m};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{dY as N,eY as U,fY as H,wY as I,xY as V,yY as p}from"./cli-1.1.35-dw3fv0g8.mjs";import{$2 as L,b3 as P}from"./cli-1.1.35-b0n88pf7.mjs";import{c3 as F}from"./cli-1.1.35-bq7wadxz.mjs";import{Coa as T,Jqa as A}from"./cli-1.1.35-1ceb2tjb.mjs";import{Tra as _,Xra as $}from"./cli-1.1.35-c05841mj.mjs";function v({children:W,ref:X,stickyScroll:Y,...E}){let w=C.useRef(null),[,Z]=C.useState(0),G=C.useRef(new Set),J=C.useRef(!1),O=()=>{for(let g of G.current)g()};function K(g){if(T(),N(g),O(),J.current)return;J.current=!0,queueMicrotask(()=>{J.current=!1,U(g)})}return C.useImperativeHandle(X,()=>({scrollTo(g){let q=w.current;if(!q)return;q.stickyScroll=!1,q.pendingScrollDelta=void 0,q.scrollAnchor=void 0,q.scrollTop=Math.max(0,Math.floor(g)),K(q)},scrollToElement(g,q=0){let z=w.current;if(!z)return;z.stickyScroll=!1,z.pendingScrollDelta=void 0,z.scrollAnchor={el:g,offset:q},K(z)},scrollBy(g){let q=w.current;if(!q)return;q.stickyScroll=!1,q.scrollAnchor=void 0,q.pendingScrollDelta=(q.pendingScrollDelta??0)+Math.floor(g),K(q)},scrollToBottom(){let g=w.current;if(!g)return;g.pendingScrollDelta=void 0,g.stickyScroll=!0,N(g),O(),Z((q)=>q+1)},getScrollTop(){return w.current?.scrollTop??0},getPendingDelta(){return w.current?.pendingScrollDelta??0},getScrollHeight(){return w.current?.scrollHeight??0},getFreshScrollHeight(){return w.current?.childNodes[0]?.yogaNode?.getComputedHeight()??w.current?.scrollHeight??0},getViewportHeight(){return w.current?.scrollViewportHeight??0},getViewportTop(){return w.current?.scrollViewportTop??0},isSticky(){let g=w.current;if(!g)return!1;return g.stickyScroll??Boolean(g.attributes.stickyScroll)},subscribe(g){return G.current.add(g),()=>G.current.delete(g)},setClampBounds(g,q){let z=w.current;if(!z)return;z.scrollClampMin=g,z.scrollClampMax=q}}),[]),L("ink-box",{ref:(g)=>{if(w.current=g,g)g.scrollTop??=0},style:{flexWrap:"nowrap",flexDirection:E.flexDirection??"row",flexGrow:E.flexGrow??0,flexShrink:E.flexShrink??1,...E,overflowX:"scroll",overflowY:"scroll"},...Y?{stickyScroll:!0}:{},children:L(V,{flexDirection:"column",flexGrow:1,flexShrink:0,width:"100%",children:W})})}var C,S;var D=$(()=>{A();H();I();p();P();C=_(F(),1);S=v});
|
|
2
|
+
export{S as $h,D as ai};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{EX as f,fZ as W,vZ as X,xZ as k}from"./cli-1.1.35-dw3fv0g8.mjs";import{$2 as J,_2 as V,b3 as K}from"./cli-1.1.35-b0n88pf7.mjs";import{c3 as P}from"./cli-1.1.35-bq7wadxz.mjs";import{Fha as U,Gha as O}from"./cli-1.1.35-r4rm2297.mjs";import{Tra as Q,Xra as L}from"./cli-1.1.35-c05841mj.mjs";import{PassThrough as C}from"stream";function E(q){let b=Z.c(5),{children:w}=q,{exit:z}=W(),B,H;if(b[0]!==z)B=()=>{let D=setTimeout(z,0);return()=>clearTimeout(D)},H=[z],b[0]=z,b[1]=B,b[2]=H;else B=b[1],H=b[2];y.useLayoutEffect(B,H);let G;if(b[3]!==w)G=J(V,{children:w}),b[3]=w,b[4]=G;else G=b[4];return G}function Y(q){let b=q.indexOf(M);if(b===-1)return q;let w=b+M.length,z=q.indexOf(F,w);if(z===-1)return q;return q.slice(w,z)}function g(q,b){return new Promise(async(w)=>{let z="",B=new C;if(b!==void 0)B.columns=b;B.on("data",(G)=>{z+=G.toString()});let H=await X(J(E,{children:q}),{stdout:B,patchConsole:!1});await Promise.race([H.waitUntilExit(),new Promise((G)=>setTimeout(G,3000))]),await w(Y(z))})}async function N(q,b){let w=await g(q,b);return U(w)}var Z,y,M="\x1B[?2026h",F="\x1B[?2026l";var j=L(()=>{O();k();K();Z=Q(f(),1),y=Q(P(),1)});
|
|
2
|
+
export{g as Sd,N as Td,j as Ud};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import{kc as Yz,lc as I1}from"./cli-1.1.35-cm0anghq.mjs";import{mc as pq,nc as lq,oc as E0,pc as Gz,rc as dq}from"./cli-1.1.35-pms9wnd8.mjs";import{sc as F0,vc as k1}from"./cli-1.1.35-cjsf2kh3.mjs";import{rh as Yq,sh as L1}from"./cli-1.1.35-9tnc0a3x.mjs";import{$r as M1,JF as H2,JP as y0,KF as iz,KP as z2,LF as y2,MF as b2,NF as L2,OF as az,Ux as eq,Vx as P1,_r as rq,cH as q2,dH as Cz,fH as U1,gH as B1,iF as g,jF as Tz,jP as Zz,lC as qz,lP as h1,nC as zz,oC as Qz,pC as $z,qC as Jz,rC as m1,tF as a0,uF as m0,wx as o,yx as zq}from"./cli-1.1.35-hy9jtbmb.mjs";import{QY as B,SY as G,xZ as Y0}from"./cli-1.1.35-dw3fv0g8.mjs";import{$Z as n2,TZ as c2,UZ as x2,VZ as p2,WZ as l2,XZ as Gq,YZ as N0,ZZ as _4,_Z as d2,a0 as R1,b0 as A4,d0 as t2,e0 as tq,g0 as s2,j0 as P2,k0 as q1,l0 as m2,m0 as h2,n0 as k2,o0 as I2,p0 as Z0,q0 as w4,r0 as z1,s0 as T4,u0 as g2,v0 as sq,x0 as j2}from"./cli-1.1.35-k6jh38a3.mjs";import{B0 as n4,C0 as i4,D0 as a4,E0 as o4,F0 as r4,G0 as Az,J0 as t4,N0 as s4,O0 as oq,P0 as e4}from"./cli-1.1.35-pycaqt81.mjs";import{R0 as x0,S0 as U2}from"./cli-1.1.35-ktb8z2s9.mjs";import{$2 as J,_2 as G0,a3 as y,b3 as d}from"./cli-1.1.35-b0n88pf7.mjs";import{c3 as H0}from"./cli-1.1.35-bq7wadxz.mjs";import{B5 as D1,j5 as r0,t3 as d4,v3 as Ez}from"./cli-1.1.35-s85hd24a.mjs";import{Bga as D0,Gga as y4,Hga as R2,Iga as W2,Jga as c0,Kga as b4,Lga as V2,Mga as H4,Nga as X2,Oga as K2,Pga as nz,Qga as I4,Rga as F2,S_ as L0,Sga as E4,T_ as O1,Uga as _2,Wga as aq,Xga as I0,ega as Lq,fga as w0,gga as wq,hga as b0,iga as a,kga as i,lga as o0,lha as Mq,nga as A0,oga as m4,pga as z0,qga as Q0,uga as $0,vga as h4,xga as k4}from"./cli-1.1.35-dnacc640.mjs";import{sla as s,yla as P0}from"./cli-1.1.35-g74y15na.mjs";import{Tra as K0,Ura as _1,Xra as v}from"./cli-1.1.35-c05841mj.mjs";function jz(q,z=V4,Q,$){let Z=$?.activate??!0,N=a().find((V)=>V.provider==="openai"&&V.extras?.githubToken!==void 0);if(N){if(!Q0(N.id,{provider:"openai",name:N.name,baseUrl:Q||N.baseUrl,model:N.model||z,apiKey:q,extras:{...N.extras,githubToken:q}}))return{mode:"failed"};if(Z)$0(N.id);return{mode:"updated"}}if(!z0({provider:"openai",name:"GitHub Copilot",baseUrl:Q||gz,model:z,apiKey:q,extras:{githubToken:q}},{makeActive:Z}))return{mode:"failed"};return{mode:"created"}}function Q2({onDone:q,onBack:z,onChangeAPIKey:Q,activateOnSave:$=!0}){let Z=t4()?.trim()?"already-authed":"menu",[N,X]=q0.useState(Z),[V,H]=q0.useState(null),[W,L]=q0.useState(""),[w,D]=q0.useState(0),[M,P]=q0.useState(null),F=q0.useCallback(async(c,E=V4,k,x)=>{let _0=s4(c,k,x?.enterpriseDomain);if(!_0.success){H(_0.warning??"Could not save token to secure storage."),X("error");return}if(jz(c,E,x?.baseUrl,{activate:$}).mode==="failed"){H("Could not save the GitHub Copilot provider profile."),X("error");return}d4(),Q?.(),q($?"GitHub Copilot onboard complete. Copilot token stored in secure storage and as the active /provider profile.":'GitHub Copilot sign-in complete. Copilot token stored in secure storage; the profile was saved without changing the active provider — activate it from "Set active provider".',{display:"user"})},[$,Q,q]),A=q0.useCallback(async(c)=>{X("device-busy"),H(null),P(null);try{let E=await i4({domain:c});P({user_code:E.user_code,verification_uri:E.verification_uri}),await o4(E.verification_uri);let k=await a4(E.device_code,{initialInterval:E.interval,timeoutSeconds:E.expires_in,domain:c}),x=await r4(k,{domain:c});await F(x.token,V4,k,{baseUrl:x.endpoints.api?.replace(/\/+$/,"")||void 0,enterpriseDomain:c})}catch(E){H(E instanceof Error?E.message:String(E)),X("error")}},[F]);if(N==="already-authed")return y(B,{flexDirection:"column",gap:1,children:[J(G,{bold:!0,children:"GitHub Copilot"}),J(G,{children:"You are already signed in to GitHub Copilot."}),J(G,{dimColor:!0,children:'Choose "Sign in again" to refresh your token, or go back to the provider menu.'}),J(g,{options:[{label:"Sign in again",value:"sign-in-again"},{label:"Sign in with GitHub Enterprise",value:"enterprise"},{label:z?"Back to /provider menu":"Cancel",value:"back"}],onChange:(E)=>{if(E==="sign-in-again"){A();return}if(E==="enterprise"){X("enterprise-domain");return}if(z){z();return}q("GitHub onboard cancelled",{display:"system"})}})]});if(N==="enterprise-domain")return y(B,{flexDirection:"column",gap:1,children:[J(G,{bold:!0,children:"GitHub Enterprise sign-in"}),J(G,{dimColor:!0,children:"Enter your GitHub Enterprise domain (e.g. github.acme.com). Leave empty for github.com."}),y(B,{flexDirection:"row",gap:1,children:[J(G,{children:">"}),J(y0,{value:W,onChange:L,onSubmit:()=>{let E=n4(W);if(!E){A();return}A(E)},onExit:()=>X(Z),focus:!0,showCursor:!0,placeholder:"github.acme.com",columns:80,cursorOffset:w,onChangeCursorOffset:D})]}),J(G,{dimColor:!0,children:"Press Enter to continue. Press Esc to go back."})]});if(N==="error"&&V)return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"error",children:V}),J(g,{options:[{label:z?"Back to /provider menu":"Back to menu",value:"back"},{label:"Exit",value:"exit"}],onChange:(E)=>{if(E==="back"){if(z){z();return}X("menu"),H(null);return}q("GitHub onboard cancelled",{display:"system"})}})]});if(N==="device-busy")return y(B,{flexDirection:"column",gap:1,children:[J(G,{children:"GitHub Copilot sign-in"}),M?y(G0,{children:[y(G,{children:["Enter code ",J(G,{bold:!0,children:M.user_code})," at"," ",M.verification_uri]}),J(G,{dimColor:!0,children:"A browser window may have opened. Waiting for authorization..."})]}):J(G,{dimColor:!0,children:"Requesting device code from GitHub..."}),J(q2,{})]});return y(B,{flexDirection:"column",gap:1,children:[J(G,{bold:!0,children:"GitHub Copilot setup"}),J(G,{dimColor:!0,children:"Stores your token in the OS credential store (macOS Keychain when available) and creates a /provider profile so Copilot is the active provider — no manual env exports required."}),J(g,{options:[{label:"Sign in with browser",value:"device"},{label:"Sign in with GitHub Enterprise",value:"enterprise"},{label:z?"Back to /provider menu":"Cancel",value:"cancel"}],onChange:(c)=>{if(c==="cancel"){if(z){z();return}q("GitHub onboard cancelled",{display:"system"});return}if(c==="enterprise"){X("enterprise-domain");return}A()}})]})}var q0,V4="github:copilot",gz="https://api.githubcopilot.com";var $2=v(()=>{Tz();Cz();z2();Y0();Az();e4();Ez();D0();d();q0=K0(H0(),1)});function Z2(q){return[q.name,q.family??"",...q.families??[],q.parameterSize??"",q.quantizationLevel??""].join(" ").toLowerCase()}function M0(q,z){return z.some((Q)=>q.includes(Q))}function vz(q){return!M0(Z2(q),J2)}function cz(q){return q.find(vz)??null}function X4(q){let Q=`${q.parameterSize??""} ${q.name}`.toLowerCase().match(/(\d+(?:\.\d+)?)\s*b\b/);if(Q?.[1])return Number(Q[1]);if(typeof q.sizeBytes==="number"&&q.sizeBytes>0)return Number((q.sizeBytes/1e9).toFixed(1));return null}function xz(q){return(q.quantizationLevel??q.name).toLowerCase()}function pz(q,z,Q){if(q===null)return Q.push("unknown size"),0;if(z==="latency"){if(q<=4)return Q.push("tiny model for low latency"),32;if(q<=8)return Q.push("small model for fast responses"),26;if(q<=14)return Q.push("mid-sized model with acceptable latency"),16;if(q<=24)return Q.push("larger model may be slower"),8;return Q.push("large model likely slower locally"),q<=40?0:-8}if(z==="coding"){if(q>=7&&q<=14)return Q.push("strong coding size tier"),24;if(q>14&&q<=34)return Q.push("large coding-capable size tier"),28;if(q>34)return Q.push("very large model with higher quality potential"),18;return Q.push("compact model may trade off coding depth"),12}if(q>=7&&q<=14)return Q.push("great balanced size tier"),26;if(q>=3&&q<7)return Q.push("compact balanced size tier"),18;if(q>14&&q<=24)return Q.push("high quality balanced size tier"),20;if(q>24)return Q.push("large model for quality-first usage"),10;return Q.push("very small model for general usage"),8}function lz(q,z,Q){let $=xz(q);if($.includes("q4"))return Q.push("efficient Q4 quantization"),z==="latency"?8:4;if($.includes("q5"))return Q.push("balanced Q5 quantization"),z==="latency"?6:5;if($.includes("q8"))return Q.push("higher quality Q8 quantization"),z==="latency"?2:5;return 0}function dz(q,z,Q){if(z.score!==q.score)return z.score-q.score;let $=X4(q)??Number.POSITIVE_INFINITY,Z=X4(z)??Number.POSITIVE_INFINITY;if(Q==="latency")return $-Z;if(Q==="coding")return Z-$;let N=14;return Math.abs($-N)-Math.abs(Z-N)}function K4(q,z){return q.map((Q)=>{let $=Z2(Q),Z=[],N=0;if(M0($,J2))N-=40,Z.push("not a chat-first model");if(M0($,Sz))N+=z==="coding"?24:z==="balanced"?10:4,Z.push("coding-oriented model family");if(M0($,uz))N+=z==="latency"?4:z==="coding"?6:8,Z.push("strong general-purpose model family");if(M0($,fz))N+=z==="latency"?2:6,Z.push("chat/instruct tuned");if($.includes("vision")||$.includes("vl"))N-=2,Z.push("vision model adds extra overhead");N+=pz(X4(Q),z,Z),N+=lz(Q,z,Z);let X=Z.slice(0,3).join(", ");return{...Q,score:N,reasons:Z,summary:X}}).sort((Q,$)=>dz(Q,$,z))}function G2(q,z){return cz(K4(q,z))}var Sz,uz,fz,J2;var Y2=v(()=>{Sz=["coder","codellama","codegemma","codestral","devstral","starcoder","deepseek-coder","qwen2.5-coder","qwen-coder"],uz=["llama","qwen","mistral","gemma","phi","deepseek"],fz=["instruct","chat","assistant"],J2=["embed","embedding","rerank","bge","whisper"]});function oz(q){let z=`http://localhost:${q.port}/auth/callback`,Q=new URL(`${y4}/oauth/authorize`);return Q.searchParams.append("response_type","code"),Q.searchParams.append("client_id",b4()),Q.searchParams.append("redirect_uri",z),Q.searchParams.append("scope",R2),Q.searchParams.append("code_challenge",q.codeChallenge),Q.searchParams.append("code_challenge_method","S256"),Q.searchParams.append("id_token_add_organizations","true"),Q.searchParams.append("codex_cli_simplified_flow","true"),Q.searchParams.append("state",q.state),Q.searchParams.append("originator",W2),Q.toString()}function rz(){return`<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<title>Codex Login Complete</title>
|
|
6
|
+
<style>
|
|
7
|
+
body { font-family: sans-serif; padding: 32px; line-height: 1.5; color: #111827; }
|
|
8
|
+
h1 { margin: 0 0 12px; font-size: 22px; }
|
|
9
|
+
p { margin: 0 0 10px; }
|
|
10
|
+
</style>
|
|
11
|
+
</head>
|
|
12
|
+
<body>
|
|
13
|
+
<h1>Codex login complete</h1>
|
|
14
|
+
<p>You can return to Claudin now.</p>
|
|
15
|
+
<p>Claudin will finish activating your new Codex OAuth login.</p>
|
|
16
|
+
</body>
|
|
17
|
+
</html>`}function tz(q){return`<!doctype html>
|
|
18
|
+
<html lang="en">
|
|
19
|
+
<head>
|
|
20
|
+
<meta charset="utf-8" />
|
|
21
|
+
<title>Codex Login Failed</title>
|
|
22
|
+
<style>
|
|
23
|
+
body { font-family: sans-serif; padding: 32px; line-height: 1.5; color: #111827; }
|
|
24
|
+
h1 { margin: 0 0 12px; font-size: 22px; color: #991b1b; }
|
|
25
|
+
p { margin: 0 0 10px; }
|
|
26
|
+
</style>
|
|
27
|
+
</head>
|
|
28
|
+
<body>
|
|
29
|
+
<h1>Codex login failed</h1>
|
|
30
|
+
<p>${X2(q)}</p>
|
|
31
|
+
<p>You can close this window and try again in Claudin.</p>
|
|
32
|
+
</body>
|
|
33
|
+
</html>`}function N2(){return`<!doctype html>
|
|
34
|
+
<html lang="en">
|
|
35
|
+
<head>
|
|
36
|
+
<meta charset="utf-8" />
|
|
37
|
+
<title>Codex Login Cancelled</title>
|
|
38
|
+
<style>
|
|
39
|
+
body { font-family: sans-serif; padding: 32px; line-height: 1.5; color: #111827; }
|
|
40
|
+
h1 { margin: 0 0 12px; font-size: 22px; }
|
|
41
|
+
p { margin: 0 0 10px; }
|
|
42
|
+
</style>
|
|
43
|
+
</head>
|
|
44
|
+
<body>
|
|
45
|
+
<h1>Codex login cancelled</h1>
|
|
46
|
+
<p>You can close this window and retry in Claudin.</p>
|
|
47
|
+
</body>
|
|
48
|
+
</html>`}async function sz(q){let z=`http://localhost:${q.port}/auth/callback`,Q=new URLSearchParams({grant_type:"authorization_code",code:q.authorizationCode,redirect_uri:z,client_id:b4(),code_verifier:q.codeVerifier}),$=await fetch(`${y4}/oauth/token`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:Q,signal:q.signal?AbortSignal.any([q.signal,AbortSignal.timeout(15000)]):AbortSignal.timeout(15000)});if(!$.ok){let W=await $.text().catch(()=>"");throw Error(W.trim()?`Codex OAuth token exchange failed (${$.status}): ${W.trim()}`:`Codex OAuth token exchange failed with status ${$.status}.`)}let Z=await $.json(),N=c0(Z.access_token),X=c0(Z.refresh_token);if(!N||!X)throw Error("Codex OAuth completed, but the token response was missing credentials.");let V=c0(Z.id_token);return{apiKey:V?await K2(V).catch(()=>{return}):void 0,accessToken:N,refreshToken:X,idToken:V,accountId:H4(V)??H4(N)}}class L4{authCodeListener=null;port=null;tokenExchangeAbortController=null;buildCancellationError(){return Error("Codex OAuth flow was cancelled.")}async startOAuthFlow(q){let z=y2(),Q=V2(),$=new H2("/auth/callback");this.authCodeListener=$,this.port=null;try{let Z=await $.start(Q);this.port=Z;let N=L2(),X=await b2(z),V=oz({port:Z,codeChallenge:X,state:N});try{let H=await $.waitForAuthorization(N,async()=>{await q(V)}),W=new AbortController;this.tokenExchangeAbortController=W;let L;try{L=await sz({authorizationCode:H,codeVerifier:z,port:Z,signal:W.signal})}finally{if(this.tokenExchangeAbortController===W)this.tokenExchangeAbortController=null}if(this.authCodeListener!==$)throw this.buildCancellationError();return $.handleSuccessRedirect([],(w)=>{w.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),w.end(rz())}),L}catch(H){let W=this.authCodeListener===$?H:this.buildCancellationError();if($.hasPendingResponse()){let L=W instanceof Error&&W.message==="Codex OAuth flow was cancelled.";$.handleErrorRedirect((w)=>{w.writeHead(L?200:400,{"Content-Type":"text/html; charset=utf-8"}),w.end(L?N2():tz(W instanceof Error?W.message:String(W)))})}throw W}finally{this.cleanup()}}catch(Z){let N=Z instanceof Error?Z.message:String(Z);if(N.includes("EADDRINUSE")||N.includes(String(Q)))throw Error(`Codex OAuth needs localhost:${Q} for its callback. Close any app already using that port and try again.`);throw Z}}cleanup(){let q=this.buildCancellationError();if(this.tokenExchangeAbortController?.abort(q),this.tokenExchangeAbortController=null,this.authCodeListener?.hasPendingResponse())this.authCodeListener.handleErrorRedirect((z)=>{z.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),z.end(N2())});this.authCodeListener?.cancelPendingAuthorization(q),this.authCodeListener=null,this.port=null}}var w2=v(()=>{iz();az();nz()});function ez(){return new L4}function B2(q){let{onAuthenticated:z}=q,Q=q.deps?.createOAuthService??ez,$=q.deps?.openBrowser??x0,Z=q.deps?.saveCodexCredentials??F2,N=q.deps?.isBareMode??s,[X,V]=p0.useState({state:"starting"});return p0.useEffect(()=>{if(N()){V({state:"error",message:"Codex OAuth is unavailable in --bare because secure storage is disabled."});return}let H=!1,W=Q();return W.startOAuthFlow(async(L)=>{if(H)return;V({state:"waiting",authUrl:L,browserOpened:null});let w=await $(L);if(H)return;V({state:"waiting",authUrl:L,browserOpened:w})}).then(async(L)=>{if(H)return;await z(L,(D)=>{let M=Z({apiKey:L.apiKey,accessToken:L.accessToken,refreshToken:L.refreshToken,idToken:L.idToken,accountId:L.accountId,profileId:D?.profileId});if(!M.success)throw Error(M.warning??"Codex OAuth succeeded, but credentials could not be saved securely.")})}).catch((L)=>{if(H)return;V({state:"error",message:L instanceof Error?L.message:String(L)})}),()=>{H=!0,W.cleanup()}},[Q,N,z,$,Z]),X}var p0;var O2=v(()=>{w2();U2();_2();P0();p0=K0(H0(),1)});function T2(){return{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":P2()}}function M2(q,z){let Q=Number(q);return Number.isFinite(Q)&&Q>0?Q*1000:z}function Z1(q,z){if(z?.aborted)return Promise.resolve();return new Promise((Q)=>{let $=setTimeout(()=>{z?.removeEventListener("abort",Z),Q()},q),Z=()=>{clearTimeout($),Q()};z?.addEventListener("abort",Z,{once:!0})})}async function G1(q){let z=q?.fetchImpl??fetch,Q=q?.signal?AbortSignal.any([q.signal,AbortSignal.timeout(15000)]):AbortSignal.timeout(15000),$=await z(h2,{method:"POST",headers:T2(),body:new URLSearchParams({client_id:w4(),scope:I2}).toString(),signal:Q});if(!$.ok){let H=await $.text().catch(()=>"");throw Error(`xAI device code request failed (${$.status})${H?`: ${H.trim()}`:""}`)}let Z=await $.json(),N=Z0(Z.device_code),X=Z0(Z.user_code),V=Z0(Z.verification_uri);if(!N||!X||!V)throw Error("xAI device code response is missing device_code / user_code / verification_uri.");return{device_code:N,user_code:X,verification_uri:V,verification_uri_complete:Z0(Z.verification_uri_complete),expires_in:typeof Z.expires_in==="number"&&Z.expires_in>0?Z.expires_in:A2/1000,interval:typeof Z.interval==="number"&&Z.interval>0?Z.interval:E2/1000}}async function Y1(q,z){let Q=z?.fetchImpl??fetch,$=z?.sleep??Z1,Z=z?.now??(()=>Date.now()),N=M2(q.expires_in,A2),X=Z()+N,V=Math.max(M2(q.interval,E2),Q1);while(Z()<X){if(z?.signal?.aborted)throw Error("xAI device authorization was cancelled.");let H=await Q(m2,{method:"POST",headers:T2(),body:new URLSearchParams({grant_type:k2,client_id:w4(),device_code:q.device_code}).toString(),signal:z?.signal});if(H.ok){let D=await H.json(),M=Z0(D.access_token),P=Z0(D.refresh_token);if(!M||!P)throw Error("xAI OAuth completed, but the token response was missing credentials.");let F=typeof D.expires_in==="number"&&Number.isFinite(D.expires_in)&&D.expires_in>0?D.expires_in:3600;return{accessToken:M,refreshToken:P,idToken:Z0(D.id_token),expiresAt:Z()+F*1000}}let W=await H.json().catch(()=>({})),L=Math.max(0,X-Z());if(W.error==="authorization_pending"){await $(Math.min(V+D2,L),z?.signal);continue}if(W.error==="slow_down"){V=Math.min(V+$1,J1),await $(Math.min(V+D2,L),z?.signal);continue}if(W.error==="access_denied"||W.error==="authorization_denied")throw Error("xAI device authorization was denied.");if(W.error==="expired_token")throw Error("xAI device code expired - please re-run login.");let w=W.error_description??W.error??"";throw Error(`xAI device token exchange failed (${H.status})${w?`: ${w}`:""}`)}throw Error("xAI device authorization timed out.")}class F4{abortController=null;async startDeviceFlow(q){let z=new AbortController;this.abortController=z;try{let Q=await G1({signal:z.signal});return await q(Q),await Y1(Q,{signal:z.signal})}finally{if(this.abortController===z)this.abortController=null}}cleanup(){this.abortController?.abort(Error("xAI device authorization was cancelled.")),this.abortController=null}}var E2=5000,Q1=1000,$1=5000,J1=60000,A2=300000,D2=3000;var C2=v(()=>{q1();z1()});function N1(){return new F4}function S2(q){let{onAuthenticated:z}=q,Q=q.deps?.createOAuthService??N1,$=q.deps?.saveXaiCredentials??g2,Z=q.deps?.isBareMode??s,[N,X]=l0.useState({state:"starting"});return l0.useEffect(()=>{if(Z()){X({state:"error",message:"xAI OAuth is unavailable in --bare because secure storage is disabled."});return}let V=!1,H=Q();return H.startDeviceFlow(async(W)=>{if(V)return;X({state:"waiting",userCode:W.user_code,verificationUri:W.verification_uri,verificationUriComplete:W.verification_uri_complete})}).then(async(W)=>{if(V)return;await z(W,(w)=>{let D=$({accessToken:W.accessToken,refreshToken:W.refreshToken,idToken:W.idToken,expiresAt:W.expiresAt,profileId:w?.profileId});if(!D.success)throw Error(D.warning??"xAI OAuth succeeded, but credentials could not be saved securely.")})}).catch((W)=>{if(V)return;X({state:"error",message:W instanceof Error?W.message:String(W)})}),()=>{V=!0,H.cleanup()}},[Q,Z,z,$]),N}var l0;var u2=v(()=>{C2();P0();j2();l0=K0(H0(),1)});async function o2(){return{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":l2,...await n2()}}function v2(q,z){let Q=Number(q);return Number.isFinite(Q)&&Q>0?Q*1000:z}function K1(q,z){if(z?.aborted)return Promise.resolve();return new Promise((Q)=>{let $=setTimeout(()=>{z?.removeEventListener("abort",Z),Q()},q),Z=()=>{clearTimeout($),Q()};z?.addEventListener("abort",Z,{once:!0})})}async function H1(q){let z=q?.fetchImpl??fetch,Q=q?.signal?AbortSignal.any([q.signal,AbortSignal.timeout(15000)]):AbortSignal.timeout(15000),$=await z(c2,{method:"POST",headers:await o2(),body:new URLSearchParams({client_id:_4()}).toString(),signal:Q});if(!$.ok){let H=await $.text().catch(()=>"");throw Error(`Kimi device code request failed (${$.status})${H?`: ${H.trim()}`:""}`)}let Z=await $.json(),N=N0(Z.device_code),X=N0(Z.user_code),V=N0(Z.verification_uri);if(!N||!X||!V)throw Error("Kimi device code response is missing device_code / user_code / verification_uri.");return{device_code:N,user_code:X,verification_uri:V,verification_uri_complete:N0(Z.verification_uri_complete),expires_in:typeof Z.expires_in==="number"&&Z.expires_in>0?Z.expires_in:a2/1000,interval:typeof Z.interval==="number"&&Z.interval>0?Z.interval:i2/1000}}async function y1(q,z){let Q=z?.fetchImpl??fetch,$=z?.sleep??K1,Z=z?.now??(()=>Date.now()),N=v2(q.expires_in,a2),X=Z()+N,V=Math.max(v2(q.interval,i2),W1);while(Z()<X){if(z?.signal?.aborted)throw Error("Kimi device authorization was cancelled.");let H=await Q(x2,{method:"POST",headers:await o2(),body:new URLSearchParams({grant_type:p2,client_id:_4(),device_code:q.device_code}).toString(),signal:z?.signal});if(H.ok){let D=await H.json(),M=N0(D.access_token),P=N0(D.refresh_token);if(!M||!P)throw Error("Kimi OAuth completed, but the token response was missing credentials.");let F=typeof D.expires_in==="number"&&Number.isFinite(D.expires_in)&&D.expires_in>0?D.expires_in:900;return{accessToken:M,refreshToken:P,expiresAt:Z()+F*1000}}let W=await H.json().catch(()=>({})),L=Math.max(0,X-Z());if(W.error==="authorization_pending"){await $(Math.min(V+f2,L),z?.signal);continue}if(W.error==="slow_down"){V=Math.min(V+V1,X1),await $(Math.min(V+f2,L),z?.signal);continue}if(W.error==="access_denied"||W.error==="authorization_denied")throw Error("Kimi device authorization was denied.");if(W.error==="expired_token")throw Error("Kimi device code expired - please re-run login.");let w=W.error_description??W.error??"";throw Error(`Kimi device token exchange failed (${H.status})${w?`: ${w}`:""}`)}throw Error("Kimi device authorization timed out.")}class U4{abortController=null;async startDeviceFlow(q){let z=new AbortController;this.abortController=z;try{let Q=await H1({signal:z.signal});return await q(Q),await y1(Q,{signal:z.signal})}finally{if(this.abortController===z)this.abortController=null}}cleanup(){this.abortController?.abort(Error("Kimi device authorization was cancelled.")),this.abortController=null}}var i2=5000,W1=1000,V1=5000,X1=60000,a2=1800000,f2=3000;var r2=v(()=>{R1();d2()});function b1(){return new U4}function e2(q){let{onAuthenticated:z}=q,Q=q.deps?.createOAuthService??b1,$=q.deps?.saveKimiCredentials??t2,Z=q.deps?.isBareMode??s,N=q.deps?.openBrowser??x0,[X,V]=R0.useState({state:"starting"}),H=R0.useRef(!1);return R0.useEffect(()=>{if(Z()){V({state:"error",message:"Kimi Code OAuth is unavailable in --bare because secure storage is disabled."});return}let W=!1,L=Q();return L.startDeviceFlow(async(w)=>{if(W)return;V({state:"waiting",userCode:w.user_code,verificationUri:w.verification_uri,verificationUriComplete:w.verification_uri_complete})}).then(async(w)=>{if(W)return;await z(w,(M)=>{let P=$({accessToken:w.accessToken,refreshToken:w.refreshToken,expiresAt:w.expiresAt,profileId:M?.profileId});if(!P.success)throw Error(P.warning??"Kimi Code OAuth succeeded, but credentials could not be saved securely.")})}).catch((w)=>{if(W)return;V({state:"error",message:w instanceof Error?w.message:String(w)})}),()=>{W=!0,L.cleanup()}},[Q,Z,z,$]),R0.useEffect(()=>{if(X.state!=="waiting")return;if(H.current)return;let W=X.verificationUriComplete??X.verificationUri;if(!W)return;H.current=!0,N(W).catch(()=>{})},[N,X]),X}var R0;var qq=v(()=>{r2();U2();P0();s2();R0=K0(H0(),1)});function Qq({onBack:q,onConfigured:z}){let Q=d0.useCallback(async(Z,N)=>{await z(Z,N)},[z]);o("confirm:no",q);let $=B2({onAuthenticated:Q});if($.state==="error")return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"error",bold:!0,children:"Codex OAuth failed"}),J(G,{children:$.message}),J(G,{dimColor:!0,children:"Press Enter or Esc to go back."}),J(g,{options:[{value:"back",label:"Back",description:"Return to provider presets"}],onChange:q,onCancel:q,visibleOptionCount:1})]});return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Codex OAuth"}),J(G,{children:"Sign in with your ChatGPT account in the browser. Claudin will store the resulting Codex credentials securely and switch this session to the new Codex login when setup completes."}),$.state==="starting"?J(G,{dimColor:!0,children:"Starting local callback and preparing your browser..."}):$.browserOpened===!1?y(G0,{children:[J(G,{color:"warning",children:"Browser did not open automatically. Visit this URL to continue:"}),J(G,{children:$.authUrl})]}):$.browserOpened===!0?y(G0,{children:[J(G,{dimColor:!0,children:"Browser opened. Finish the ChatGPT sign-in there and this setup will complete automatically."}),J(G,{children:$.authUrl})]}):J(G,{dimColor:!0,children:"Opening your browser..."}),J(G,{dimColor:!0,children:"Press Esc to cancel and go back."})]})}function $q({onBack:q,onConfigured:z}){let Q=d0.useCallback(async(Z,N)=>{await z(Z,N)},[z]);o("confirm:no",q);let $=S2({onAuthenticated:Q});if($.state==="error")return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"error",bold:!0,children:"xAI OAuth failed"}),J(G,{children:$.message}),J(G,{dimColor:!0,children:"Press Enter or Esc to go back."}),J(g,{options:[{value:"back",label:"Back",description:"Return to provider presets"}],onChange:q,onCancel:q,visibleOptionCount:1})]});return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"xAI / Grok OAuth"}),$.state==="starting"?J(G,{dimColor:!0,children:"Requesting a device code from xAI..."}):y(G0,{children:[y(G,{children:["Open this URL on any device:"," ",J(G,{bold:!0,children:$.verificationUri})]}),y(G,{children:["Enter code ",J(G,{bold:!0,children:$.userCode})]}),$.verificationUriComplete&&$.verificationUriComplete!==$.verificationUri?y(G,{dimColor:!0,children:["Or open this prefilled URL: ",$.verificationUriComplete]}):null,J(G,{dimColor:!0,children:"Waiting for you to authorize in the browser..."})]}),J(G,{dimColor:!0,children:"Press Esc to cancel and go back."})]})}function Jq({onBack:q,onConfigured:z}){let Q=d0.useCallback(async(Z,N)=>{await z(Z,N)},[z]);o("confirm:no",q);let $=e2({onAuthenticated:Q});if($.state==="error")return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"error",bold:!0,children:"Kimi Code OAuth failed"}),J(G,{children:$.message}),J(G,{dimColor:!0,children:"Press Enter or Esc to go back."}),J(g,{options:[{value:"back",label:"Back",description:"Return to Moonshot AI authentication choices"}],onChange:q,onCancel:q,visibleOptionCount:1})]});return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Moonshot AI · Kimi Code"}),$.state==="starting"?J(G,{dimColor:!0,children:"Requesting a device code from Kimi..."}):y(G0,{children:[y(G,{children:["Open this URL on any device:"," ",J(G,{bold:!0,children:$.verificationUri})]}),y(G,{children:["Enter code ",J(G,{bold:!0,children:$.userCode})]}),$.verificationUriComplete&&$.verificationUriComplete!==$.verificationUri?y(G,{dimColor:!0,children:["Or open this prefilled URL: ",$.verificationUriComplete]}):null,J(G,{dimColor:!0,children:"Waiting for you to authorize in the browser..."})]}),J(G,{dimColor:!0,children:"Press Esc to cancel and go back."})]})}var d0;var Zq=v(()=>{m0();Y0();zq();O2();u2();qq();d();d0=K0(H0(),1)});var r,n0="\x00__manual__",Nq,Rq="Codex OAuth",Wq="codexplan",Vq="xAI / Grok (OAuth)",Xq="grok-4",Kq="Moonshot AI",Hq,h0="https://api.kimi.com/coding/v1",yq,bq;var k0=v(()=>{L1();d2();r=[{key:"name",label:"Provider name",placeholder:"e.g. Ollama Home, OpenAI Work",helpText:"A short label shown in /provider and startup setup."},{key:"baseUrl",label:"Base URL",placeholder:"e.g. http://localhost:11434/v1",helpText:"API base URL used for this provider profile."},{key:"apiKey",label:"API key",placeholder:"Leave empty if your provider does not require one",helpText:"Optional. Press Enter with empty value to skip.",optional:!0},{key:"model",label:"Default model",placeholder:"e.g. llama3.1:8b or glm-4.7; glm-4.7-flash",helpText:'Model name(s) to use. Separate multiple with ";" or ","; first is default.'}],Nq=new Set(["anthropic","bedrock","vertex","foundry"]),Hq=Gq,yq=Yq("providerProfile",(q)=>q),bq={bedrock:[{key:"awsRegion",label:"AWS region",placeholder:"e.g. us-east-1",helpText:"Region of your Bedrock-enabled AWS account. Credentials are picked up from the AWS SDK chain."}],vertex:[{key:"gcpProject",label:"GCP project ID",placeholder:"e.g. my-project-123456",helpText:"Google Cloud project where Vertex AI is enabled. Credentials are picked up from ADC."},{key:"gcpRegion",label:"GCP region",placeholder:"e.g. us-central1",helpText:"Vertex AI region for the model."}],foundry:[{key:"azureResource",label:"Azure resource",placeholder:"e.g. my-foundry-resource",helpText:"Name of your Azure AI Foundry resource. Credentials are picked up from DefaultAzureCredential."}]}});function Fq(q){return{name:q.name,baseUrl:q.baseUrl,model:q.model,apiKey:q.apiKey??""}}function B4(q){let z=b0(q);return{name:z.name,baseUrl:z.baseUrl,model:z.model,apiKey:z.apiKey??""}}function _q(q){let z={};for(let Q of q.split(/\r?\n/)){let $=Q.trim();if(!$)continue;let Z=$.indexOf(":");if(Z<=0)continue;let N=$.slice(0,Z).trim(),X=$.slice(Z+1).trim();if(N&&X)z[N]=X}return z}function Uq(q){if(!q)return"";return Object.entries(q).map(([z,Q])=>`${z}: ${Q}`).join(`
|
|
49
|
+
`)}function Bq(q,z){let Q={},$=q.awsRegion?.trim();if($)Q.awsRegion=$;let Z=q.gcpProject?.trim();if(Z)Q.gcpProject=Z;let N=q.gcpRegion?.trim();if(N)Q.gcpRegion=N;let X=q.azureResource?.trim();if(X)Q.azureResource=X;let V=_q(z);if(Object.keys(V).length>0)Q.customHeaders=V;return Object.keys(Q).length>0?Q:void 0}function Oq(q,z){let Q=z?" (active)":"",$=q.apiKey?"key set":"no key",Z=q.provider==="anthropic"?"anthropic":"openai-compatible",N=Lq(q.model),X=N.length<=3?N.join(", "):`${N[0]}, ${N[1]} + ${N.length-2} more`;return`${Z} · ${q.baseUrl} · ${X} · ${$}${Q}`}var O4=v(()=>{wq();D0()});function F1(q){let z=q.toLowerCase();return w1.some((Q)=>z.includes(Q))}function D4(q){try{let z=new URL(q);if(z.username)z.username="redacted";if(z.password)z.password="redacted";for(let Q of z.searchParams.keys())if(F1(Q))z.searchParams.set(Q,"redacted");return z.toString()}catch{return q.replace(/\/\/[^/@\s]+(?::[^/@\s]*)?@/g,"//redacted@").replace(/([?&](?:token|access_token|refresh_token|api_key|apikey|key|password|passwd|pwd|auth|authorization|signature|sig|secret)=)[^&#]*/gi,"$1redacted")}}var w1;var Dq=v(()=>{w1=["api_key","apikey","key","token","access_token","refresh_token","signature","sig","secret","password","passwd","pwd","auth","authorization"]});function Pq(q,z){if(q.state==="unreachable")return`Could not reach Atomic Chat at ${D4(z)}. Start the Atomic Chat app first, or enter the endpoint manually.`;if(q.state==="no_models")return"Atomic Chat is running, but no models are loaded. Download and load a model inside the Atomic Chat app first, or enter details manually.";return""}function mq(q,z){if(q.state==="unreachable")return`Could not reach Ollama at ${D4(z)}. Start Ollama first, or enter the endpoint manually.`;if(q.state==="no_models")return"Ollama is running, but no installed models were found. Pull a chat model such as qwen2.5-coder:7b or llama3.1:8b first, or enter details manually.";if(q.state==="generation_failed"){let Q=q.probeModel??"the selected model",$=q.detail?` Details: ${q.detail}.`:"";return`Ollama is reachable and models are installed, but a generation probe failed for ${Q}.${$} Run "ollama run ${Q}" once and retry, or enter details manually.`}return""}function i0(q,z){if(!z)return;return q.find((Q)=>Q.id===z)}function M4(q,z){return Boolean(q&&z&&q.id===z)}function hq(q,z){if(z){let Q=q.find(($)=>$.id===z);if(Q)return Q}return q.find((Q)=>Q.provider==="openai"&&Q.baseUrl===h0&&!Q.apiKey)}function kq(q,z){if(z){let Q=q.find(($)=>$.id===z);if(Q)return Q}return q.find((Q)=>Q.provider==="openai"&&Q.baseUrl===I0&&!Q.apiKey)}function Iq(q,z){return q.find((Q)=>Q.provider==="anthropic"&&Q.baseUrl===z&&!Q.apiKey)}var P4=v(()=>{Mq();k0();Dq()});function Eq({setScreen:q}){return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Anthropic — choose authentication"}),J(G,{dimColor:!0,children:"Sign in with your Anthropic account in the browser, or paste an API key."}),J(g,{options:[{value:"oauth",label:"Sign in with web (OAuth)",description:"Open a browser, sign in to Claude, and store tokens in ~/.claudin/.credentials.json"},{value:"apiKey",label:"Use API key",description:"Paste an x-api-key value (sk-ant-…)"},{value:"back",label:"Back",description:"Choose a different provider"}],onChange:(z)=>{if(z==="oauth"){q("anthropic-oauth");return}if(z==="apiKey"){q("form");return}q("select-preset")},onCancel:()=>q("select-preset"),visibleOptionCount:3})]})}function Aq({setScreen:q,startCreateFromPreset:z}){return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Moonshot AI — choose authentication"}),J(G,{dimColor:!0,children:"Sign in with your Kimi Code subscription in the browser, or paste a Moonshot AI API key."}),J(g,{options:[{value:"oauth",label:"Sign in with web (OAuth)",description:"Open a browser, sign in to Kimi Code, and store tokens in ~/.claudin/.credentials.json"},{value:"apiKey",label:"Use API key",description:"Paste a Moonshot AI API key (sk-…)"},{value:"back",label:"Back",description:"Choose a different provider"}],onChange:(Q)=>{if(Q==="oauth"){q("kimi-oauth");return}if(Q==="apiKey"){z("moonshotai");return}q("select-preset")},onCancel:()=>q("select-preset"),visibleOptionCount:3})]})}function Tq({mode:q,onDone:z,activeProfileId:Q,setErrorMessage:$,setScreen:Z,setStatusMessage:N,refreshProfiles:X,returnToMenu:V}){let H=(B1(),_1(U1)).ConsoleOAuthFlow;return J(B,{flexDirection:"column",gap:1,children:J(H,{mode:"login",onDone:()=>{let W=b0("anthropic"),L={provider:"anthropic",name:W.name,baseUrl:W.baseUrl,model:W.model},w=Iq(a(),W.baseUrl),D=q==="first-run",M=w?Q0(w.id,L):z0(L,{makeActive:D});if(!M){$("OAuth completed, but the Anthropic profile could not be saved."),Z("select-preset");return}let P=D&&w&&Q!==M.id?$0(M.id):M;if(!P){$("OAuth completed, but the Anthropic profile could not be set as the startup provider."),Z("select-preset");return}let F=`Anthropic OAuth configured: ${P.name}`;if(X(),q==="first-run"){z({action:"saved",activeProfileId:P.id,message:F});return}N(F),$(void 0),V()}})})}var Cq=v(()=>{m0();Y0();D0();P4();d()});function gq({formStepIndex:q,draft:z,setDraft:Q,setCursorOffset:$,cursorOffset:Z,editingProfileId:N,draftProvider:X,errorMessage:V,handleFormSubmit:H}){let W=r[q]??r[0],L=W.key,w=z[L];return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:N?"Edit provider profile":"Create provider profile"}),J(G,{dimColor:!0,children:W.helpText}),y(G,{dimColor:!0,children:["Provider type:"," ",X==="anthropic"?"Anthropic native API":"OpenAI-compatible API"]}),y(G,{dimColor:!0,children:["Step ",q+1," of ",r.length,": ",W.label]}),y(B,{flexDirection:"row",gap:1,children:[J(G,{children:L0.pointer}),J(y0,{value:w,onChange:(D)=>Q((M)=>({...M,[L]:D})),onSubmit:H,focus:!0,showCursor:!0,placeholder:`${W.placeholder}${L0.ellipsis}`,mask:L==="apiKey"?"*":void 0,columns:80,cursorOffset:Z,onChangeCursorOffset:$})]}),V&&J(G,{color:"error",children:V}),J(G,{dimColor:!0,children:"Press Enter to continue. Press Esc to go back."})]})}function jq({pendingPreset:q,cloudExtrasStepIndex:z,draftExtras:Q,cloudExtrasCursor:$,errorMessage:Z,setDraftExtras:N,setCloudExtrasStepIndex:X,setCloudExtrasCursor:V,setErrorMessage:H,setScreen:W}){let L=q;if(L!=="bedrock"&&L!=="vertex"&&L!=="foundry")return null;let w=bq[L],D=w[z]??w[0],M=Q[D.key]??"";function P(F){let A=F.trim();if(A.length===0){H(`${D.label} is required.`);return}let W0={...Q,[D.key]:A};if(N(W0),H(void 0),z<w.length-1){X(z+1);return}X(0),W("form")}return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:`${L==="bedrock"?"AWS Bedrock":L==="vertex"?"Google Vertex AI":"Azure AI Foundry"} setup`}),J(G,{dimColor:!0,children:D.helpText}),y(G,{dimColor:!0,children:["Step ",z+1," of ",w.length,": ",D.label]}),y(B,{flexDirection:"row",gap:1,children:[J(G,{children:L0.pointer}),J(y0,{value:M,onChange:(F)=>N((A)=>({...A,[D.key]:F})),onSubmit:P,focus:!0,showCursor:!0,placeholder:`${D.placeholder}${L0.ellipsis}`,columns:80,cursorOffset:$,onChangeCursorOffset:V})]}),Z&&J(G,{color:"error",children:Z}),J(G,{dimColor:!0,children:"Press Enter to continue. Press Esc to go back."})]})}function Sq({draftCustomHeaders:q,draft:z,customHeadersCursor:Q,errorMessage:$,setDraftCustomHeaders:Z,setCustomHeadersCursor:N,persistDraft:X}){return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Custom headers (optional)"}),y(G,{dimColor:!0,children:["Add HTTP headers sent on every request. One header per line as"," ",J(G,{children:"Header: Value"}),". Leave empty to skip."]}),y(B,{flexDirection:"row",gap:1,children:[J(G,{children:L0.pointer}),J(y0,{value:q,onChange:Z,onSubmit:()=>X(z),focus:!0,showCursor:!0,placeholder:"X-Header: value",columns:80,multiline:!0,cursorOffset:Q,onChangeCursorOffset:N})]}),$&&J(G,{color:"error",children:$}),J(G,{dimColor:!0,children:"Press Enter on a blank line to save. Press Esc to go back."})]})}var uq=v(()=>{O1();Y0();z2();k0();d()});function fq({selection:q,draft:z,setDraft:Q,setScreen:$,setFormStepIndex:Z,setCursorOffset:N,persistDraft:X}){if(q.state==="loading"||q.state==="idle")return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Checking Atomic Chat"}),J(G,{dimColor:!0,children:"Looking for loaded Atomic Chat models..."})]});if(q.state==="unavailable")return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Atomic Chat setup"}),J(G,{dimColor:!0,children:q.message}),J(g,{options:[{value:"manual",label:"Enter manually",description:"Fill in the base URL and model yourself"},{value:"back",label:"Back",description:"Choose another provider preset"}],onChange:(V)=>{if(V==="manual"){Z(0),N(z.name.length),$("form");return}$("select-preset")},onCancel:()=>$("select-preset"),visibleOptionCount:2})]});return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Choose an Atomic Chat model"}),J(G,{dimColor:!0,children:"Pick one of the models loaded in Atomic Chat to save into a local provider profile."}),J(g,{options:q.options,defaultValue:q.defaultValue,defaultFocusValue:q.defaultValue,inlineDescriptions:!0,visibleOptionCount:Math.min(8,q.options.length),onChange:(V)=>{let H={...z,model:V};Q(H),X(H)},onCancel:()=>$("select-preset")})]})}function vq({selection:q,draft:z,setDraft:Q,setScreen:$,setFormStepIndex:Z,setCursorOffset:N,persistDraft:X}){if(q.state==="loading"||q.state==="idle")return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Checking Ollama"}),J(G,{dimColor:!0,children:"Looking for installed Ollama models..."})]});if(q.state==="unavailable")return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Ollama setup"}),J(G,{dimColor:!0,children:q.message}),J(g,{options:[{value:"manual",label:"Enter manually",description:"Fill in the base URL and model yourself"},{value:"back",label:"Back",description:"Choose another provider preset"}],onChange:(V)=>{if(V==="manual"){Z(0),N(z.name.length),$("form");return}$("select-preset")},onCancel:()=>$("select-preset"),visibleOptionCount:2})]});return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Choose an Ollama model"}),J(G,{dimColor:!0,children:"Pick one of the installed Ollama models to save into a local provider profile."}),J(g,{options:q.options,defaultValue:q.defaultValue,defaultFocusValue:q.defaultValue,inlineDescriptions:!0,visibleOptionCount:Math.min(8,q.options.length),onChange:(V)=>{let H={...z,model:V};Q(H),X(H)},onCancel:()=>$("select-preset")})]})}function cq({openAiModelSelection:q,draft:z,setDraft:Q,goToFormStep:$,goToManualModelStep:Z,finishAfterModelStep:N}){if(q.state==="loading"||q.state==="idle")return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Fetching models"}),J(G,{dimColor:!0,children:"Looking for models on your OpenAI-compatible provider…"}),J(G,{dimColor:!0,children:"Press Esc to enter the model manually."})]});if(q.state==="unavailable")return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Choose a model"}),J(G,{dimColor:!0,children:q.message}),J(g,{options:[{value:"manual",label:"Enter manually",description:"Type the model id yourself"},{value:"back",label:"Back",description:"Return to the API key step"}],onChange:(H)=>{if(H==="manual"){Z();return}$("apiKey")},onCancel:()=>$("apiKey"),visibleOptionCount:2})]});let X=[...q.options,{value:n0,label:"Enter a model id manually",description:"Type an id the provider did not list"}],V=q.defaultValue??n0;return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Choose a model"}),J(G,{dimColor:!0,children:"Models from your OpenAI-compatible provider."}),J(g,{options:X,defaultValue:V,defaultFocusValue:V,inlineDescriptions:!0,visibleOptionCount:Math.min(8,X.length),onChange:(H)=>{if(H===n0){Z();return}let W={...z,model:H};Q(W),N(W)},onCancel:()=>$("apiKey")}),J(G,{dimColor:!0,children:"Enter to select · Esc to go back"})]})}var xq=v(()=>{m0();Y0();k0();d()});function nq({mode:q,onDone:z,canImportLegacyClaude:Q,setScreen:$,setCanImportLegacyClaude:Z,setErrorMessage:N,setStatusMessage:X,closeWithCancelled:V,refreshProfiles:H,returnToMenu:W,startCreateFromPreset:L}){let w=!s(),D=[...Q?[{value:"import-legacy",label:"Reuse Claude Code sign-in",description:"Copy ~/.claude/ API tokens and provider profiles. /import brings the rest."}]:[],{value:"dashscope-intl",label:"Alibaba Coding Plan",description:"Alibaba DashScope International endpoint"},{value:"dashscope-cn",label:"Alibaba Coding Plan (China)",description:"Alibaba DashScope China endpoint"},{value:"anthropic",label:"Anthropic",description:"Native Claude API (x-api-key auth)"},{value:"atomic-chat",label:"Atomic Chat",description:"Local Model Provider"},{value:"azure-openai",label:"Azure OpenAI",description:"Azure OpenAI endpoint (model=deployment name)"},{value:"foundry",label:"Azure AI Foundry",description:"Anthropic models hosted on Azure AI Foundry (resource-scoped)"},{value:"bedrock",label:"AWS Bedrock",description:"Anthropic models on AWS Bedrock (region-scoped, AWS creds)"},{value:"bankr",label:"Bankr",description:"Bankr LLM Gateway (OpenAI-compatible)"},{value:"cloudflare-workers-ai",label:"Cloudflare Workers AI",description:"Cloudflare Workers AI (OpenAI-compatible); set your account ID in the base URL"},{value:"cloudflare-ai-gateway",label:"Cloudflare AI Gateway",description:"Cloudflare AI Gateway unified endpoint; set your account ID in the base URL"},...w?[{value:"codex-oauth",label:"Codex OAuth",description:"Sign in with ChatGPT in your browser and store Codex credentials securely"},{value:"xai-oauth",label:"xAI / Grok (OAuth)",description:"Sign in with xAI in your browser and store Grok credentials securely"}]:[],{value:"github-onboard",label:"GitHub Copilot",description:"Sign in with GitHub in your browser to use Copilot models"},{value:"deepseek",label:"DeepSeek",description:"DeepSeek OpenAI-compatible endpoint"},{value:"gemini",label:"Google Gemini",description:"Gemini OpenAI-compatible endpoint"},{value:"vertex",label:"Google Vertex AI",description:"Anthropic models on Vertex AI (project + region, ADC)"},{value:"groq",label:"Groq",description:"Groq OpenAI-compatible endpoint"},{value:"lmstudio",label:"LM Studio",description:"Local LM Studio endpoint"},{value:"minimax",label:"MiniMax",description:"MiniMax API endpoint"},{value:"mistral",label:"Mistral",description:"Mistral OpenAI-compatible endpoint"},{value:"moonshotai",label:"Moonshot AI",description:"API key or Kimi Code OAuth sign-in"},{value:"nvidia-nim",label:"NVIDIA NIM",description:"NVIDIA NIM endpoint"},{value:"opencode-go",label:"OpenCode GO",description:"OpenCode GO OpenAI-compatible endpoint"},{value:"opencode-zen",label:"OpenCode Zen",description:"OpenCode Zen OpenAI-compatible endpoint"},{value:"ollama",label:"Ollama",description:"Local or remote Ollama endpoint"},{value:"openai",label:"OpenAI",description:"OpenAI API with API key"},{value:"openrouter",label:"OpenRouter",description:"OpenRouter OpenAI-compatible endpoint"},{value:"together",label:"Together AI",description:"Together chat/completions endpoint"},{value:"zai",label:"Z.AI (GLM Coding Plan)",description:"Z.AI GLM Coding Plan (OpenAI-compatible)"},{value:"custom",label:"Custom",description:"Any OpenAI-compatible provider"},...q==="first-run"?[{value:"skip",label:"Skip for now",description:"Continue with current defaults"}]:[]];return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:q==="first-run"?"Set up provider":"Choose provider preset"}),J(G,{dimColor:!0,children:"Pick a preset, then confirm base URL, model, and API key."}),J(a0,{options:D,searchPlaceholder:"Search presets…",onChange:(M)=>{if(M==="skip"){V("Provider setup skipped");return}if(M==="codex-oauth"){$("codex-oauth");return}if(M==="xai-oauth"){$("xai-oauth");return}if(M==="moonshotai"){$("kimi-auth-choice");return}if(M==="github-onboard"){$("github-onboard");return}if(M==="import-legacy"){(async()=>{let P=await pq({force:!0});Z(E0()),H();let F=lq(P);if(P.errors.length>0){N(F);return}let A=i();if(q==="first-run"&&A){z({action:"saved",activeProfileId:A.id,activeProviderName:A.name,activeProviderModel:A.model,message:F});return}if(X(F),N(void 0),q==="manage")W()})();return}L(M)},onCancel:()=>{if(q==="first-run"){V("Provider setup skipped");return}W()},visibleOptionCount:Math.min(13,D.length)})]})}var iq=v(()=>{m0();Y0();P0();D0();dq();d()});function E3({mode:q,onDone:z}){let Q=Zz(),[$,Z]=O.useState([]),[N,X]=O.useState(),[V,H]=O.useState(),[W,L]=O.useState(!1),[w,D]=O.useState(),M=O.useRef(0),[P,F]=O.useState(q==="first-run"?"select-preset":"menu"),[A,W0]=O.useState(null),[c,E]=O.useState("openai"),[k,x]=O.useState(()=>B4("ollama")),[_0,T0]=O.useState({}),[C4,t0]=O.useState(""),[Nz,Rz]=O.useState(0),[Wz,Vz]=O.useState(0),[U0,g4]=O.useState(null),[s0,C0]=O.useState(0),[V0,J0]=O.useState(0),[Xz,e]=O.useState(0),[j4,u]=O.useState(),[e0,m]=O.useState(),[Kz,Hz]=O.useState(),[S4,g0]=O.useState(!1),[B0,O0]=O.useState(),[yz,j0]=O.useState({state:"idle"}),[bz,S0]=O.useState({state:"idle"}),[q4,z4]=O.useState({state:"idle"}),[Lz,wz]=O.useState(!0),[Fz,n]=O.useState(!1),Q4=O.useRef(!1),[_z,u4]=O.useState(()=>E0()),[f4,Uz]=O.useState(()=>Gz());O.useEffect(()=>{queueMicrotask(()=>{let Y=a(),R=i()?.id;Z(Y),X(R),H(o0()),D(m4()),L(A0()),wz(!1)})},[]);let $4=r[V0]??r[0],Bz=$4.key,J4=$.length>0,u0=J4,v4=O.useMemo(()=>[{value:"add",label:"Add provider",description:"Create a new provider profile"},{value:"activate",label:"Set active provider (Global)",description:w?`Currently: ${$.find((Y)=>Y.id===w)?.name??"unknown"}`:"Default profile for projects without an override",disabled:!u0},{value:"activate-project",label:"Set active provider (Project)",description:V?`Currently: ${$.find((Y)=>Y.id===V)?.name??"unknown"} (this project)`:"Override the global default for this project only",disabled:!u0},...W?[{value:"clear-project-override",label:"Clear project provider override",description:V?"Stop overriding for this project; fall back to global":"Project override points to a missing profile; clear it"}]:[],{value:"edit",label:"Edit provider",description:"Update URL, model, or key",disabled:!J4},{value:"delete",label:"Delete provider",description:"Remove a provider profile",disabled:!u0},...S4?[{value:"logout-codex-oauth",label:"Log out Codex OAuth",description:"Clear securely stored Codex OAuth credentials"}]:[],{value:"done",label:"Done",description:"Return to chat"}],[u0,J4,S4,w,V,$]),Z4=O.useCallback(()=>{if(s()){M.current+=1,g0(!1),O0(void 0);return}let Y=++M.current;(async()=>{let R=await I4();if(Y!==M.current)return;g0(Boolean(R?.apiKey||R?.accessToken||R?.refreshToken||R?.idToken)),O0(R?.profileId)})()},[]);O.useEffect(()=>{return Z4(),()=>{M.current+=1}},[Z4]),O.useEffect(()=>{if(P!=="select-ollama-model")return;let Y=!1;return j0({state:"loading"}),(async()=>{let R=await Jz({baseUrl:k.baseUrl});if(R.state!=="ready"){if(!Y)j0({state:"unavailable",message:mq(R,k.baseUrl)});return}let b=K4(R.models,"balanced"),K=G2(R.models,"balanced");if(!Y)j0({state:"ready",defaultValue:K?.name??b[0]?.name,options:b.map((U)=>({label:U.name,value:U.name,description:U.summary}))})})(),()=>{Y=!0}},[k.baseUrl,P]),O.useEffect(()=>{if(P!=="select-atomic-chat-model")return;let Y=!1;return S0({state:"loading"}),(async()=>{let R=await $z({baseUrl:k.baseUrl});if(R.state!=="ready"){if(!Y)S0({state:"unavailable",message:Pq(R,k.baseUrl)});return}if(!Y)S0({state:"ready",defaultValue:R.models[0],options:R.models.map((b)=>({label:b,value:b}))})})(),()=>{Y=!0}},[k.baseUrl,P]),O.useEffect(()=>{if(P!=="select-openai-model")return;let Y=!1;return z4({state:"loading"}),(async()=>{let R=await qz({baseUrl:k.baseUrl,apiKey:k.apiKey||void 0});if(Y)return;if(!R.ok){z4({state:"unavailable",message:zz(R)});return}let{options:b,defaultValue:K}=Qz(R.ids,k.model);z4({state:"ready",options:b,defaultValue:K})})(),()=>{Y=!0}},[k.baseUrl,k.apiKey,P]);function f(){if(Q4.current)return;Q4.current=!0,queueMicrotask(()=>{let Y=a();Z(Y),X(i()?.id),H(o0()),D(m4()),L(A0()),Z4(),Q4.current=!1})}function X0(){return null}function G4(Y){if(Y.activationWarning)return`${Y.prefix}. Saved for next startup. Warning: ${Y.warnings.join("; ")}.`;if(Y.warnings.length>0)return`${Y.prefix}. Claudin switched to it for this session with warnings: ${Y.warnings.join("; ")}.`;return`${Y.prefix}. Claudin switched to it for this session.`}async function Y4(Y){if(Y?.accessToken&&Y.accountId)return null;let R=await I4();if(!R)return"stored Codex OAuth credentials could not be loaded";if(!R.accountId)return"stored Codex OAuth credentials are missing a ChatGPT account id";return null}function c4(){rq()}async function Oz(Y){let R="provider";n(!0),u("Activating provider...");try{await new Promise((t)=>queueMicrotask(t));let b=A0(),K=$0(Y);if(!K){m("Could not change active provider."),n(!1),h();return}let U=b?i()??K:K,_=w0(U.model)||r0();if(!b)Q((t)=>({...t,mainLoopModel:_,mainLoopModelForSession:null}));R=K.name;let I=X0(),S=M4(K,B0),T=S?await Y4():null;f();let p=b&&U.id!==K.id?` (project override still active — this project keeps using ${U.name}; use "Clear project provider override" to apply the new default here)`:"",C=S?G4({prefix:`Active provider: ${K.name}${p}`,activationWarning:T,warnings:[T,I?`could not clear startup provider override (${I})`:null].filter((t)=>Boolean(t))}):I?`Active provider: ${K.name}${p}. Warning: could not clear startup provider override (${I}).`:`Active provider: ${K.name}${p}`;u(C),n(!1),z({action:"activated",activeProfileId:K.id,activeProviderName:K.name,activeProviderModel:_,message:`Provider switched to ${K.name} (${_})`}),h()}catch(b){f(),u(void 0),n(!1);let K=b instanceof Error?b.message:String(b);m(`Could not finish activating ${R}: ${K}`),h()}}async function Dz(){n(!0),u("Clearing project provider override...");try{await new Promise((R)=>queueMicrotask(R)),h4(null),f();let Y=i();if(Y){let R=w0(Y.model)||r0();F0(),Q((b)=>({...b,mainLoopModel:R,mainLoopModelForSession:null})),u(`Project override cleared. Using global default: ${Y.name}.`),n(!1),z({action:"activated",activeProfileId:Y.id,activeProviderName:Y.name,activeProviderModel:R,message:`Project override cleared — using ${Y.name} (${R})`}),h()}else u("Project provider override cleared. No global default set."),n(!1),z({action:"saved",message:"Project provider override cleared. No global default set."}),h()}catch(Y){f(),u(void 0),n(!1);let R=Y instanceof Error?Y.message:String(Y);m(`Could not clear project provider override: ${R}`),h()}}async function Mz(Y){let R="provider";n(!0),u("Setting provider for this project...");try{await new Promise((C)=>queueMicrotask(C));let b=o0(),K=h4(Y);if(!K){m("Could not set project provider override."),n(!1),h();return}let U=w0(K.model)||r0();if(b===K.id)F0();Q((C)=>({...C,mainLoopModel:U,mainLoopModelForSession:null})),R=K.name;let _=X0(),I=M4(K,B0),S=I?await Y4():null;f();let T=`Active provider for this project: ${K.name}. Other projects keep the global default.`,p=I?G4({prefix:T,activationWarning:S,warnings:[S,_?`could not clear startup provider override (${_})`:null].filter((C)=>Boolean(C))}):_?`${T} Warning: could not clear startup provider override (${_}).`:T;u(p),n(!1),z({action:"activated",activeProfileId:K.id,activeProviderName:K.name,activeProviderModel:U,message:`Provider switched to ${K.name} (${U}) for this project`}),h()}catch(b){f(),u(void 0),n(!1);let K=b instanceof Error?b.message:String(b);m(`Could not finish setting ${R} for this project: ${K}`),h()}}function h(){Hz("done"),F("menu")}function N4(Y){z({action:"cancelled",message:Y})}function x4(Y){let R=b0(Y),b={name:R.name,baseUrl:R.baseUrl,model:R.model,apiKey:R.apiKey??""};if(W0(null),E(R.provider??"openai"),x(b),T0({}),t0(""),g4(Y),J0(0),C0(0),e(b.name.length),m(void 0),Y==="ollama"){j0({state:"loading"}),F("select-ollama-model");return}if(Y==="atomic-chat"){S0({state:"loading"}),F("select-atomic-chat-model");return}if(Y==="anthropic"){F("anthropic-auth-choice");return}if(Y==="bedrock"||Y==="vertex"||Y==="foundry"){F("cloud-extras");return}F("form")}function Pz(Y){let R=$.find((K)=>K.id===Y);if(!R)return;let b=Fq(R);W0(Y),E(R.provider??"openai"),x(b),T0({awsRegion:R.extras?.awsRegion,gcpProject:R.extras?.gcpProject,gcpRegion:R.extras?.gcpRegion,azureResource:R.extras?.azureResource}),t0(Uq(R.extras?.customHeaders)),g4(null),J0(0),C0(0),e(b.name.length),m(void 0),F("form")}function f0(Y=k){let R=Bq(_0,C4),b={provider:c,name:Y.name,baseUrl:Y.baseUrl,model:Y.model,apiKey:Y.apiKey,extras:R},K=A?Q0(A,b):z0(b,{makeActive:q==="first-run"});if(!K){m("Could not save provider. Fill all required fields.");return}let U=i()?.id===K.id;if(U)F0(),Q((C)=>({...C,mainLoopModel:w0(K.model),mainLoopModelForSession:null}));let _=U?X0():null;f();let I=q==="first-run"&&!A&&A0()&&!U,S=I?i()?.name??"override target":null,T=q==="first-run"?`Added provider: ${K.name} (now active)`:`Added provider: ${K.name} (active provider unchanged)`,p=A?`Updated provider: ${K.name}`:I?`Added provider: ${K.name} (now global default — project keeps using ${S}; use "Clear project provider override" to apply here)`:T;if(u(_?`${p}. Warning: could not clear startup provider override (${_}).`:p),q==="first-run"){z({action:"saved",activeProfileId:K.id,message:`Provider configured: ${K.name}`});return}W0(null),J0(0),m(void 0),h()}function R4(Y){let R=r.findIndex((b)=>b.key===Y);J0(R<0?0:R),e(k[Y].length),m(void 0),F("form")}function p4(){if(!A&&U0&&k.model===B4(U0).model){let Y={...k,model:""};x(Y),R4("model"),e(0);return}R4("model")}function l4(Y){if(U0==="anthropic"||U0==="custom"){x(Y),F("custom-headers");return}f0(Y)}function mz(Y){let R=Y.trim();if(!$4.optional&&R.length===0){m(`${$4.label} is required.`);return}let b={...k,[Bz]:R};if(x(b),m(void 0),V0<r.length-1){let K=V0+1,U=r[K]?.key??"name";if(U==="model"&&!Nq.has(c)&&b.baseUrl.trim().length>0){F("select-openai-model");return}J0(K),e(b[U].length);return}l4(b)}function hz(){if(m(void 0),V0>0){let Y=V0-1,R=r[Y]?.key??"name";J0(Y),e(k[R].length);return}if(q==="first-run"){F("select-preset");return}h()}o("confirm:no",hz,{context:"Settings",isActive:P==="form"}),o("confirm:no",()=>p4(),{context:"Settings",isActive:P==="select-openai-model"&&(q4.state==="loading"||q4.state==="idle")});function kz(){if(m(void 0),s0>0){C0(s0-1);return}F("select-preset")}o("confirm:no",kz,{context:"Settings",isActive:P==="cloud-extras"}),o("confirm:no",()=>F("form"),{context:"Settings",isActive:P==="custom-headers"}),o("confirm:no",()=>F("select-preset"),{context:"Settings",isActive:P==="anthropic-auth-choice"||P==="anthropic-oauth"||P==="kimi-auth-choice"}),o("confirm:no",()=>F("kimi-auth-choice"),{context:"Settings",isActive:P==="kimi-oauth"});function Iz(){let Y=$.length>0,R=Y;return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Provider manager"}),J(G,{dimColor:!0,children:"Active profile controls base URL, model, and API key used by this session."}),j4&&J(G,{children:j4}),J(B,{flexDirection:"column",children:$.length===0?J(G,{dimColor:!0,children:"No provider profiles configured yet."}):$.map((b)=>y(G,{dimColor:!0,children:["- ",b.name,": ",Oq(b,b.id===N)]},b.id))}),J(g,{options:v4,onChange:(b)=>{switch(m(void 0),b){case"add":F("select-preset");break;case"activate":if(R)F("select-active");break;case"activate-project":if(R)F("select-active-project");break;case"clear-project-override":Dz();break;case"edit":if(Y)F("select-edit");break;case"delete":if(R)F("select-delete");break;case"logout-codex-oauth":{let K=E4();if(!K.success){m(K.warning??"Could not clear Codex OAuth credentials.");break}g0(!1),O0(void 0);let U=i0(a(),B0),_=null;if(U){let I=k4(U.id);if(!I.removed){m("Codex OAuth credentials were cleared, but the Codex profile could not be removed."),f();break}c4(),_=I.activeProfileId?X0():null}f(),u(_?`Codex OAuth logged out. Warning: could not clear startup provider override (${_}).`:"Codex OAuth logged out.");break}default:N4("Provider manager closed");break}},onCancel:()=>N4("Provider manager closed"),defaultFocusValue:Kz,visibleOptionCount:v4.length})]})}function v0(Y,R,b){let K=$.map((U)=>{let _=[];if(U.id===N)_.push("active");if(V&&U.id===V)_.push("this project");if(w&&U.id===w)_.push("global default");let I=_.length>0?` (${_.join(", ")})`:"";return{value:U.id,label:`${U.name}${I}`,description:`${U.provider==="anthropic"?"anthropic":"openai-compatible"} · ${U.baseUrl} · ${U.model}`}});if(K.length===0)return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:Y}),J(G,{dimColor:!0,children:R}),J(g,{options:[{value:"back",label:"Back",description:"Return to provider manager"}],onChange:()=>h(),onCancel:()=>h(),visibleOptionCount:1})]});return y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:Y}),J(a0,{options:K,favorites:yq,searchPlaceholder:"Search providers…",onChange:b,onCancel:()=>h(),visibleOptionCount:Math.min(10,Math.max(2,K.length))})]})}let j;switch(P){case"select-preset":j=J(nq,{mode:q,onDone:z,canImportLegacyClaude:_z,setScreen:F,setCanImportLegacyClaude:u4,setErrorMessage:m,setStatusMessage:u,closeWithCancelled:N4,refreshProfiles:f,returnToMenu:h,startCreateFromPreset:x4});break;case"select-ollama-model":j=J(vq,{selection:yz,draft:k,setDraft:x,setScreen:F,setFormStepIndex:J0,setCursorOffset:e,persistDraft:f0});break;case"select-openai-model":j=J(cq,{openAiModelSelection:q4,draft:k,setDraft:x,goToFormStep:R4,goToManualModelStep:p4,finishAfterModelStep:l4});break;case"select-atomic-chat-model":j=J(fq,{selection:bz,draft:k,setDraft:x,setScreen:F,setFormStepIndex:J0,setCursorOffset:e,persistDraft:f0});break;case"codex-oauth":j=J(Qq,{onBack:()=>F("select-preset"),onConfigured:async(Y,R)=>{let b={provider:"openai",name:Rq,baseUrl:aq,model:Wq,apiKey:""},K=i0(a(),B0),U=q==="first-run",_=K?Q0(K.id,b):z0(b,{makeActive:U});if(!_){m("Codex OAuth login finished, but the provider profile could not be saved."),h();return}let I=U&&K&&N!==_.id?$0(_.id):_;if(!I){m("Codex OAuth login finished, but the provider could not be set as the startup provider."),h();return}R({profileId:_.id}),g0(!0),O0(_.id),f();let S;if(!U)S=`Codex OAuth configured: ${_.name} (active provider unchanged — activate it from "Set active provider")`;else{let T=X0(),p=await Y4(Y),C=[p,T?`could not clear startup provider override (${T})`:null].filter((t)=>Boolean(t));S=G4({prefix:"Codex OAuth configured",activationWarning:p,warnings:C})}if(q==="first-run"){z({action:"saved",activeProfileId:I.id,message:S});return}u(S),m(void 0),h()}});break;case"xai-oauth":j=J($q,{onBack:()=>F("select-preset"),onConfigured:async(Y,R)=>{let b={provider:"openai",name:Vq,baseUrl:I0,model:Xq,apiKey:""},K=kq(a(),T4()?.profileId),U=q==="first-run",_=K?Q0(K.id,b):z0(b,{makeActive:U});if(!_){m("xAI OAuth login finished, but the provider profile could not be saved."),h();return}let I=U&&K&&N!==_.id?$0(_.id):_;if(!I){m("xAI OAuth login finished, but the provider could not be set as the startup provider."),h();return}try{R({profileId:_.id})}catch(T){m(T instanceof Error?T.message:String(T)),h();return}f();let S=U?"xAI / Grok configured. Claudin switched to it for this session.":`xAI / Grok configured: ${_.name} (active provider unchanged — activate it from "Set active provider")`;if(q==="first-run"){z({action:"saved",activeProfileId:I.id,message:S});return}u(S),m(void 0),h()}});break;case"kimi-auth-choice":j=J(Aq,{setScreen:F,startCreateFromPreset:x4});break;case"kimi-oauth":j=J(Jq,{onBack:()=>F("kimi-auth-choice"),onConfigured:async(Y,R)=>{let b={provider:"openai",name:Kq,baseUrl:h0,model:Hq,apiKey:""},K=hq(a(),A4()?.profileId),U=q==="first-run",_=K?Q0(K.id,b):z0(b,{makeActive:U});if(!_){m("Kimi Code OAuth login finished, but the provider profile could not be saved."),h();return}let I=U&&K&&N!==_.id?$0(_.id):_;if(!I){m("Kimi Code OAuth login finished, but the provider could not be set as the startup provider."),h();return}try{R({profileId:_.id})}catch(T){m(T instanceof Error?T.message:String(T)),h();return}f();let S=U?"Kimi Code configured. Claudin switched to it for this session.":`Kimi Code configured: ${_.name} (active provider unchanged — activate it from "Set active provider")`;if(q==="first-run"){z({action:"saved",activeProfileId:I.id,message:S});return}u(S),m(void 0),h()}});break;case"github-onboard":j=J(Q2,{activateOnSave:q==="first-run",onDone:(Y)=>{if(Y)u(Y),m(void 0);f(),h()},onBack:()=>F("select-preset"),onChangeAPIKey:f});break;case"anthropic-auth-choice":j=J(Eq,{setScreen:F});break;case"anthropic-oauth":j=J(Tq,{mode:q,onDone:z,activeProfileId:N,setErrorMessage:m,setScreen:F,setStatusMessage:u,refreshProfiles:f,returnToMenu:h});break;case"cloud-extras":j=J(jq,{pendingPreset:U0,cloudExtrasStepIndex:s0,draftExtras:_0,cloudExtrasCursor:Nz,errorMessage:e0,setDraftExtras:T0,setCloudExtrasStepIndex:C0,setCloudExtrasCursor:Rz,setErrorMessage:m,setScreen:F});break;case"custom-headers":j=J(Sq,{draftCustomHeaders:C4,draft:k,customHeadersCursor:Wz,errorMessage:e0,setDraftCustomHeaders:t0,setCustomHeadersCursor:Vz,persistDraft:f0});break;case"form":j=J(gq,{formStepIndex:V0,draft:k,setDraft:x,setCursorOffset:e,cursorOffset:Xz,editingProfileId:A,draftProvider:c,errorMessage:e0,handleFormSubmit:mz});break;case"select-active":j=v0("Set active provider (Global)","No providers available. Add one first.",(Y)=>{Oz(Y)});break;case"select-active-project":j=v0("Set active provider (Project)","No providers available. Add one first.",(Y)=>{Mz(Y)});break;case"select-edit":j=v0("Edit provider","No providers available. Add one first.",(Y)=>{Pz(Y)});break;case"select-delete":j=v0("Delete provider","No providers available. Add one first.",(Y)=>{let R=$.find((C)=>C.id===Y),b=R?.provider==="openai"&&R?.extras?.githubToken!==void 0,K=i0($,B0)?.id===Y,U=T4()?.profileId,_=R?.provider==="openai"&&R.baseUrl===I0&&!R.apiKey&&U===Y,I=A4()?.profileId,S=R?.provider==="openai"&&R.baseUrl===h0&&!R.apiKey&&I===Y,T=i()?.id===Y,p=k4(Y);if(!p.removed)m("Could not delete provider.");else{let C=[];if(K){let l=E4();if(!l.success)C.push(l.warning??"could not clear Codex OAuth credentials");else O0(void 0);c4()}if(b){let l=oq();if(!l.success)C.push(l.warning??"could not clear GitHub Copilot token")}if(_){let l=sq();if(!l.success)C.push(l.warning??"could not clear xAI OAuth credentials")}if(S){let l=tq();if(!l.success)C.push(l.warning??"could not clear Kimi Code OAuth credentials")}let t=p.activeProfileId?X0():null;if(t)C.push(`could not clear startup provider override (${t})`);if(f(),T){let l=i();if(l)F0(),Q((W4)=>({...W4,mainLoopModel:w0(l.model),mainLoopModelForSession:null}));else F0(),Q((W4)=>({...W4,mainLoopModel:null,mainLoopModelForSession:null}))}u(C.length>0?`Provider deleted. Warning: ${C.join("; ")}.`:"Provider deleted")}h()});break;case"menu":default:j=Iz();break}return y(eq,{color:"permission",children:[J(Yz,{enabled:f4,onDismiss:(Y)=>{u4(E0()),Uz(!1),f();let R=i();if(Y==="migrated"&&q==="first-run"&&R)z({action:"saved",activeProfileId:R.id,activeProviderName:R.name,activeProviderModel:R.model})}}),f4?null:Lz?y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Loading providers..."}),J(G,{dimColor:!0,children:"Reading provider profiles from disk."})]}):Fz?y(B,{flexDirection:"column",gap:1,children:[J(G,{color:"remember",bold:!0,children:"Activating provider..."}),J(G,{dimColor:!0,children:"Please wait while the provider is being configured."})]}):j]})}var O;var E1=v(()=>{$2();Mq();Y0();zq();h1();k1();_2();P0();wq();D1();M1();D0();e4();m1();Y2();m0();P1();I1();Zq();j2();s2();dq();k0();O4();P4();Cq();uq();xq();iq();O4();d();O=K0(H0(),1)});
|
|
50
|
+
export{_q as fc,D4 as gc,Dq as hc,E3 as ic,E1 as jc};
|