@claudiolabs/claudin 0.5.13 → 0.5.14
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/bin/claudin +26 -0
- package/dist/chunks/AgentTool-0.5.14-ka5wbadf.mjs +1 -0
- package/dist/chunks/App-0.5.14-x714qge6.mjs +1 -0
- package/dist/chunks/ApproveApiKey-0.5.14-6nm0jbxj.mjs +1 -0
- package/dist/chunks/AssistantSessionChooser-0.5.14-7hhwh7yd.mjs +1 -0
- package/dist/chunks/AutoModeOptInDialog-0.5.14-pb4xjhhm.mjs +1 -0
- package/dist/chunks/BypassPermissionsModeDialog-0.5.14-8a3gxq1p.mjs +1 -0
- package/dist/chunks/ClaudeMdExternalIncludesDialog-0.5.14-jsf36abf.mjs +1 -0
- package/dist/chunks/ConsoleOAuthFlow-0.5.14-gb4tkybg.mjs +1 -0
- package/dist/chunks/DiffDialog-0.5.14-mzjz3dmq.mjs +3 -0
- package/dist/chunks/Doctor-0.5.14-deqdqs2y.mjs +1 -0
- package/dist/chunks/Grove-0.5.14-zj5vsq17.mjs +1 -0
- package/dist/chunks/ITermBackend-0.5.14-vc2v0d30.mjs +1 -0
- package/dist/chunks/InvalidConfigDialog-0.5.14-99drb087.mjs +1 -0
- package/dist/chunks/InvalidSettingsDialog-0.5.14-cx07mwzh.mjs +1 -0
- package/dist/chunks/MigrationDialog-0.5.14-2n9dg022.mjs +1 -0
- package/dist/chunks/Onboarding-0.5.14-peymefv5.mjs +1 -0
- package/dist/chunks/ProviderManager-0.5.14-00vppy63.mjs +1 -0
- package/dist/chunks/REPL-0.5.14-bewb9pnz.mjs +1 -0
- package/dist/chunks/ResumeConversation-0.5.14-j7hzavxp.mjs +1 -0
- package/dist/chunks/SnapshotUpdateDialog-0.5.14-bz9qwn3m.mjs +1 -0
- package/dist/chunks/TeleportProgress-0.5.14-5k9g7jnn.mjs +1 -0
- package/dist/chunks/TeleportRepoMismatchDialog-0.5.14-v04nvw78.mjs +1 -0
- package/dist/chunks/TeleportResumeWrapper-0.5.14-91kfwccd.mjs +1 -0
- package/dist/chunks/TmuxBackend-0.5.14-egq2w642.mjs +9 -0
- package/dist/chunks/ToolSearchTool-0.5.14-nt5waewd.mjs +1 -0
- package/dist/chunks/TrustDialog-0.5.14-x3ns8q41.mjs +1 -0
- package/dist/chunks/activeProvider-0.5.14-zmyztc9d.mjs +1 -0
- package/dist/chunks/add-dir-0.5.14-m1bgsa5k.mjs +1 -0
- package/dist/chunks/agents-0.5.14-7493pd9j.mjs +3 -0
- package/dist/chunks/agents-0.5.14-g33swkvh.mjs +110 -0
- package/dist/chunks/api-0.5.14-n9d664hq.mjs +1 -0
- package/dist/chunks/asciicast-0.5.14-cdw29gxq.mjs +1 -0
- package/dist/chunks/assistant-0.5.14-5ttn63vc.mjs +1 -0
- package/dist/chunks/auth-0.5.14-cn5sbpmt.mjs +1 -0
- package/dist/chunks/auth-0.5.14-daysvmja.mjs +1 -0
- package/dist/chunks/autoMode-0.5.14-6w3n0461.mjs +48 -0
- package/dist/chunks/autoUpdater-0.5.14-w6ksev5d.mjs +1 -0
- package/dist/chunks/backgroundHousekeeping-0.5.14-v09b9v3d.mjs +1 -0
- package/dist/chunks/branch-0.5.14-mk8vbtcd.mjs +4 -0
- package/dist/chunks/bridgePointer-0.5.14-qm9kdp95.mjs +1 -0
- package/dist/chunks/btw-0.5.14-fnbs5xz3.mjs +1 -0
- package/dist/chunks/buddy-0.5.14-m0fpeg6d.mjs +3 -0
- package/dist/chunks/cacache-0.5.14-sxk12nzn.mjs +1 -0
- package/dist/chunks/cache-probe-0.5.14-wnnzjne3.mjs +21 -0
- package/dist/chunks/cacheStats-0.5.14-w0h102n4.mjs +4 -0
- package/dist/chunks/caches-0.5.14-37cvhfpr.mjs +1 -0
- package/dist/chunks/claudeDesktop-0.5.14-vsxz691t.mjs +1 -0
- package/dist/chunks/claudemd-0.5.14-tp1vgk3z.mjs +1 -0
- package/dist/chunks/clear-0.5.14-y27axrbf.mjs +1 -0
- package/dist/chunks/clearTerminal-0.5.14-5x5qjbpr.mjs +1 -0
- package/dist/chunks/cli-0.5.14-091bzaxj.mjs +2 -0
- package/dist/chunks/cli-0.5.14-0q3cgg09.mjs +2 -0
- package/dist/chunks/cli-0.5.14-0xpjxnvf.mjs +3 -0
- package/dist/chunks/cli-0.5.14-0yttjd5j.mjs +2 -0
- package/dist/chunks/cli-0.5.14-143vggzh.mjs +45 -0
- package/dist/chunks/cli-0.5.14-16ak6yfx.mjs +1 -0
- package/dist/chunks/cli-0.5.14-1d34ehpy.mjs +16 -0
- package/dist/chunks/cli-0.5.14-1dm5x2bp.mjs +2 -0
- package/dist/chunks/cli-0.5.14-1gr6bex0.mjs +2 -0
- package/dist/chunks/cli-0.5.14-1hazt8y4.mjs +50 -0
- package/dist/chunks/cli-0.5.14-1n5t7fhh.mjs +6 -0
- package/dist/chunks/cli-0.5.14-1ttqdawg.mjs +2 -0
- package/dist/chunks/cli-0.5.14-1ysbyz3f.mjs +21 -0
- package/dist/chunks/cli-0.5.14-20jyzpyr.mjs +2 -0
- package/dist/chunks/cli-0.5.14-20vxp61q.mjs +2 -0
- package/dist/chunks/cli-0.5.14-21qmk948.mjs +3 -0
- package/dist/chunks/cli-0.5.14-26qxsgry.mjs +2 -0
- package/dist/chunks/cli-0.5.14-2get61vb.mjs +15 -0
- package/dist/chunks/cli-0.5.14-2m40h4kp.mjs +5 -0
- package/dist/chunks/cli-0.5.14-2nfr4a2g.mjs +2 -0
- package/dist/chunks/cli-0.5.14-2pafgvs4.mjs +2 -0
- package/dist/chunks/cli-0.5.14-3f5mbe3a.mjs +2 -0
- package/dist/chunks/cli-0.5.14-3pq7th32.mjs +2 -0
- package/dist/chunks/cli-0.5.14-3rsvr6t8.mjs +2 -0
- package/dist/chunks/cli-0.5.14-41jtw8ac.mjs +2 -0
- package/dist/chunks/cli-0.5.14-4367p06d.mjs +9 -0
- package/dist/chunks/cli-0.5.14-45c9ydpj.mjs +2 -0
- package/dist/chunks/cli-0.5.14-493n054v.mjs +3 -0
- package/dist/chunks/cli-0.5.14-4d1vgx1q.mjs +2 -0
- package/dist/chunks/cli-0.5.14-4h0hxm6g.mjs +2 -0
- package/dist/chunks/cli-0.5.14-4khekra9.mjs +2 -0
- package/dist/chunks/cli-0.5.14-4swh9njd.mjs +2 -0
- package/dist/chunks/cli-0.5.14-5008zpga.mjs +2 -0
- package/dist/chunks/cli-0.5.14-50yq8sa4.mjs +2 -0
- package/dist/chunks/cli-0.5.14-5gkrj1ak.mjs +2 -0
- package/dist/chunks/cli-0.5.14-5tjkdtp9.mjs +2 -0
- package/dist/chunks/cli-0.5.14-60yczvwy.mjs +133 -0
- package/dist/chunks/cli-0.5.14-63x4db8w.mjs +133 -0
- package/dist/chunks/cli-0.5.14-64rpppf8.mjs +18 -0
- package/dist/chunks/cli-0.5.14-685647jf.mjs +7 -0
- package/dist/chunks/cli-0.5.14-6937x3w3.mjs +2 -0
- package/dist/chunks/cli-0.5.14-6eea9ezs.mjs +4 -0
- package/dist/chunks/cli-0.5.14-6fk534v0.mjs +17 -0
- package/dist/chunks/cli-0.5.14-6kksfjy8.mjs +2 -0
- package/dist/chunks/cli-0.5.14-6raawc34.mjs +6 -0
- package/dist/chunks/cli-0.5.14-6yty6gqs.mjs +20 -0
- package/dist/chunks/cli-0.5.14-73ackmw7.mjs +2 -0
- package/dist/chunks/cli-0.5.14-7m77sfxk.mjs +58 -0
- package/dist/chunks/cli-0.5.14-7pgk96hh.mjs +2 -0
- package/dist/chunks/cli-0.5.14-7rnbh7ne.mjs +2 -0
- package/dist/chunks/cli-0.5.14-8azez85y.mjs +2 -0
- package/dist/chunks/cli-0.5.14-8f89rfzv.mjs +2 -0
- package/dist/chunks/cli-0.5.14-8kb1432a.mjs +2 -0
- package/dist/chunks/cli-0.5.14-8qymm509.mjs +2 -0
- package/dist/chunks/cli-0.5.14-9d7p6385.mjs +2 -0
- package/dist/chunks/cli-0.5.14-9h71xtmr.mjs +2 -0
- package/dist/chunks/cli-0.5.14-9j1dsrh1.mjs +2 -0
- package/dist/chunks/cli-0.5.14-9wya0d3v.mjs +2 -0
- package/dist/chunks/cli-0.5.14-9xvhzhkm.mjs +3 -0
- package/dist/chunks/cli-0.5.14-ahpdwf0v.mjs +2 -0
- package/dist/chunks/cli-0.5.14-an5qgv3a.mjs +2 -0
- package/dist/chunks/cli-0.5.14-anv6260e.mjs +2 -0
- package/dist/chunks/cli-0.5.14-aqeeb0f5.mjs +2 -0
- package/dist/chunks/cli-0.5.14-avm7rqss.mjs +3 -0
- package/dist/chunks/cli-0.5.14-aw48m66c.mjs +2 -0
- package/dist/chunks/cli-0.5.14-axshc74p.mjs +2 -0
- package/dist/chunks/cli-0.5.14-b0d1cwrx.mjs +2 -0
- package/dist/chunks/cli-0.5.14-b2pmvy9z.mjs +2 -0
- package/dist/chunks/cli-0.5.14-b2y4c4qz.mjs +2 -0
- package/dist/chunks/cli-0.5.14-bfcf75rz.mjs +2 -0
- package/dist/chunks/cli-0.5.14-bwk8tz6z.mjs +2 -0
- package/dist/chunks/cli-0.5.14-c4t8gdgj.mjs +2 -0
- package/dist/chunks/cli-0.5.14-c5w3y4bc.mjs +2 -0
- package/dist/chunks/cli-0.5.14-c9j9jsmz.mjs +3 -0
- package/dist/chunks/cli-0.5.14-cegh4n4e.mjs +2 -0
- package/dist/chunks/cli-0.5.14-ckv99ms5.mjs +2 -0
- package/dist/chunks/cli-0.5.14-cw6v5vt0.mjs +18 -0
- package/dist/chunks/cli-0.5.14-d1dqcsvv.mjs +18 -0
- package/dist/chunks/cli-0.5.14-d26aykc0.mjs +2 -0
- package/dist/chunks/cli-0.5.14-d46mhdrz.mjs +2 -0
- package/dist/chunks/cli-0.5.14-d4frp6k6.mjs +2 -0
- package/dist/chunks/cli-0.5.14-d5t0sr9t.mjs +2 -0
- package/dist/chunks/cli-0.5.14-dmbyd0sa.mjs +2 -0
- package/dist/chunks/cli-0.5.14-dpcawxem.mjs +2 -0
- package/dist/chunks/cli-0.5.14-dpys58zb.mjs +12 -0
- package/dist/chunks/cli-0.5.14-dqhxbxb7.mjs +2 -0
- package/dist/chunks/cli-0.5.14-e0f671ax.mjs +2 -0
- package/dist/chunks/cli-0.5.14-e3gxn67m.mjs +4 -0
- package/dist/chunks/cli-0.5.14-e9wbczy7.mjs +2 -0
- package/dist/chunks/cli-0.5.14-easqaf33.mjs +2 -0
- package/dist/chunks/cli-0.5.14-ef8ctc2m.mjs +4 -0
- package/dist/chunks/cli-0.5.14-efp8wjg1.mjs +2 -0
- package/dist/chunks/cli-0.5.14-en3hbpe6.mjs +2 -0
- package/dist/chunks/cli-0.5.14-fbvy5zb9.mjs +2 -0
- package/dist/chunks/cli-0.5.14-g3h8xpqj.mjs +2 -0
- package/dist/chunks/cli-0.5.14-g91kxyj3.mjs +17 -0
- package/dist/chunks/cli-0.5.14-gdb0dvne.mjs +2 -0
- package/dist/chunks/cli-0.5.14-gjegk0er.mjs +2 -0
- package/dist/chunks/cli-0.5.14-gm5kmg2w.mjs +2 -0
- package/dist/chunks/cli-0.5.14-gscd2x4f.mjs +4 -0
- package/dist/chunks/cli-0.5.14-gxtw8dhr.mjs +15 -0
- package/dist/chunks/cli-0.5.14-h5pkzt2b.mjs +2 -0
- package/dist/chunks/cli-0.5.14-h61trenx.mjs +2 -0
- package/dist/chunks/cli-0.5.14-h72zd06s.mjs +2 -0
- package/dist/chunks/cli-0.5.14-hanfd2pz.mjs +2 -0
- package/dist/chunks/cli-0.5.14-jad7e0eg.mjs +2 -0
- package/dist/chunks/cli-0.5.14-jdvea9zv.mjs +10 -0
- package/dist/chunks/cli-0.5.14-jf3et57a.mjs +5316 -0
- package/dist/chunks/cli-0.5.14-jff31gdc.mjs +2 -0
- package/dist/chunks/cli-0.5.14-jm5cqnt7.mjs +2 -0
- package/dist/chunks/cli-0.5.14-jrcr7y5a.mjs +2 -0
- package/dist/chunks/cli-0.5.14-k4pqcfd4.mjs +2 -0
- package/dist/chunks/cli-0.5.14-k8g7xd1q.mjs +2 -0
- package/dist/chunks/cli-0.5.14-k9xvwt73.mjs +2 -0
- package/dist/chunks/cli-0.5.14-kbqdxnzh.mjs +2 -0
- package/dist/chunks/cli-0.5.14-kt358a3h.mjs +2 -0
- package/dist/chunks/cli-0.5.14-m7skqd4q.mjs +2 -0
- package/dist/chunks/cli-0.5.14-m9p42h1g.mjs +2 -0
- package/dist/chunks/cli-0.5.14-mdmz1bw1.mjs +2 -0
- package/dist/chunks/cli-0.5.14-mkr2nerd.mjs +2 -0
- package/dist/chunks/cli-0.5.14-mqepr6k4.mjs +2 -0
- package/dist/chunks/cli-0.5.14-mqp3fc5k.mjs +2 -0
- package/dist/chunks/cli-0.5.14-mt7egvs8.mjs +2 -0
- package/dist/chunks/cli-0.5.14-mys2py3s.mjs +2 -0
- package/dist/chunks/cli-0.5.14-n1wzvy0k.mjs +2 -0
- package/dist/chunks/cli-0.5.14-n5069ej6.mjs +2 -0
- package/dist/chunks/cli-0.5.14-nd1cyqtv.mjs +2 -0
- package/dist/chunks/cli-0.5.14-ndq9rhn7.mjs +193 -0
- package/dist/chunks/cli-0.5.14-nef9j9x3.mjs +67 -0
- package/dist/chunks/cli-0.5.14-nhz1s6yj.mjs +24 -0
- package/dist/chunks/cli-0.5.14-nkmxan04.mjs +2 -0
- package/dist/chunks/cli-0.5.14-np80e4h0.mjs +2 -0
- package/dist/chunks/cli-0.5.14-nx2k2fc6.mjs +2 -0
- package/dist/chunks/cli-0.5.14-p8gq7nq3.mjs +2 -0
- package/dist/chunks/cli-0.5.14-pd7b7t5h.mjs +3 -0
- package/dist/chunks/cli-0.5.14-pdz4gbap.mjs +2 -0
- package/dist/chunks/cli-0.5.14-pftvwkk8.mjs +4 -0
- package/dist/chunks/cli-0.5.14-pr6tse5d.mjs +2 -0
- package/dist/chunks/cli-0.5.14-pvx7sqsj.mjs +2 -0
- package/dist/chunks/cli-0.5.14-q8y3c8ja.mjs +3 -0
- package/dist/chunks/cli-0.5.14-qa02d35p.mjs +3 -0
- package/dist/chunks/cli-0.5.14-qb0wcr18.mjs +24 -0
- package/dist/chunks/cli-0.5.14-qc6a2vcb.mjs +2 -0
- package/dist/chunks/cli-0.5.14-qcmh02jt.mjs +4 -0
- package/dist/chunks/cli-0.5.14-qcrttwqb.mjs +2 -0
- package/dist/chunks/cli-0.5.14-qhgp0jp4.mjs +4 -0
- package/dist/chunks/cli-0.5.14-qwa1c8w2.mjs +34 -0
- package/dist/chunks/cli-0.5.14-r38faawy.mjs +2 -0
- package/dist/chunks/cli-0.5.14-r61p0n6x.mjs +2 -0
- package/dist/chunks/cli-0.5.14-r66bevxp.mjs +2 -0
- package/dist/chunks/cli-0.5.14-r8f2hssc.mjs +59 -0
- package/dist/chunks/cli-0.5.14-rfbqq3z1.mjs +2 -0
- package/dist/chunks/cli-0.5.14-rj1nh8jm.mjs +2 -0
- package/dist/chunks/cli-0.5.14-s5wgj31r.mjs +15 -0
- package/dist/chunks/cli-0.5.14-s6vd2h5w.mjs +2 -0
- package/dist/chunks/cli-0.5.14-sg9wjwba.mjs +5 -0
- package/dist/chunks/cli-0.5.14-svdmqpzs.mjs +12 -0
- package/dist/chunks/cli-0.5.14-sx666s0x.mjs +2 -0
- package/dist/chunks/cli-0.5.14-t32fswzp.mjs +2 -0
- package/dist/chunks/cli-0.5.14-t3d6ycsp.mjs +2 -0
- package/dist/chunks/cli-0.5.14-t72p44x7.mjs +2 -0
- package/dist/chunks/cli-0.5.14-tdaq69ga.mjs +4 -0
- package/dist/chunks/cli-0.5.14-tgeskqzs.mjs +2 -0
- package/dist/chunks/cli-0.5.14-tmc3jcgf.mjs +5 -0
- package/dist/chunks/cli-0.5.14-tqnsct7g.mjs +39 -0
- package/dist/chunks/cli-0.5.14-v6kjcfbm.mjs +2 -0
- package/dist/chunks/cli-0.5.14-vbnr7r6e.mjs +2 -0
- package/dist/chunks/cli-0.5.14-vf6t34v8.mjs +2 -0
- package/dist/chunks/cli-0.5.14-vhj1gfhf.mjs +2 -0
- package/dist/chunks/cli-0.5.14-vq78tz92.mjs +2 -0
- package/dist/chunks/cli-0.5.14-vqk0h33w.mjs +4 -0
- package/dist/chunks/cli-0.5.14-wbj99kyq.mjs +2 -0
- package/dist/chunks/cli-0.5.14-wnmt9qkk.mjs +2 -0
- package/dist/chunks/cli-0.5.14-wq0qfb4r.mjs +2 -0
- package/dist/chunks/cli-0.5.14-xad83fbb.mjs +2 -0
- package/dist/chunks/cli-0.5.14-xc847091.mjs +2 -0
- package/dist/chunks/cli-0.5.14-xeawxepw.mjs +2 -0
- package/dist/chunks/cli-0.5.14-xevr51kc.mjs +3 -0
- package/dist/chunks/cli-0.5.14-xjdw6amg.mjs +9 -0
- package/dist/chunks/cli-0.5.14-y22mbspw.mjs +3 -0
- package/dist/chunks/cli-0.5.14-y3kkm5vp.mjs +2 -0
- package/dist/chunks/cli-0.5.14-ya2ykcd6.mjs +2 -0
- package/dist/chunks/cli-0.5.14-yafpkp67.mjs +3 -0
- package/dist/chunks/cli-0.5.14-yfh9te0f.mjs +2 -0
- package/dist/chunks/cli-0.5.14-yms71vy8.mjs +4 -0
- package/dist/chunks/cli-0.5.14-ytt72j1r.mjs +2 -0
- package/dist/chunks/cli-0.5.14-z1wt52vd.mjs +2 -0
- package/dist/chunks/cli-0.5.14-z1zfnf2j.mjs +25 -0
- package/dist/chunks/cli-0.5.14-z2kvxbjn.mjs +8 -0
- package/dist/chunks/cli-0.5.14-z55jz0h2.mjs +12 -0
- package/dist/chunks/cli-0.5.14-ze38m3e0.mjs +42 -0
- package/dist/chunks/cli-0.5.14-zm1c93pa.mjs +6 -0
- package/dist/chunks/cli-0.5.14-zpggrnj1.mjs +2 -0
- package/dist/chunks/client-0.5.14-7m64ax0b.mjs +1 -0
- package/dist/chunks/color-0.5.14-gsm9gxpa.mjs +1 -0
- package/dist/chunks/compact-0.5.14-pqfy772p.mjs +3 -0
- package/dist/chunks/config-0.5.14-hdw0yb76.mjs +1 -0
- package/dist/chunks/config-0.5.14-k01b10a5.mjs +1 -0
- package/dist/chunks/constants-0.5.14-g7s59vvv.mjs +1 -0
- package/dist/chunks/context-0.5.14-0y16jvz3.mjs +1 -0
- package/dist/chunks/context-noninteractive-0.5.14-bsa0wjaf.mjs +1 -0
- package/dist/chunks/conversation-0.5.14-sm5xssg2.mjs +1 -0
- package/dist/chunks/copilotHeaders-0.5.14-s8z7mree.mjs +1 -0
- package/dist/chunks/copy-0.5.14-sxqyn9qc.mjs +9 -0
- package/dist/chunks/cost-0.5.14-p252pkws.mjs +1 -0
- package/dist/chunks/createSSHSession-0.5.14-kvm8kq1c.mjs +1 -0
- package/dist/chunks/createSession-0.5.14-h945q3v2.mjs +1 -0
- package/dist/chunks/debug-0.5.14-6s6x2x5y.mjs +1 -0
- package/dist/chunks/defaultActionDeps-0.5.14-pm2kkmmd.mjs +1169 -0
- package/dist/chunks/desktop-0.5.14-b0c0mf4t.mjs +1 -0
- package/dist/chunks/detectRepository-0.5.14-v7wq8791.mjs +1 -0
- package/dist/chunks/detection-0.5.14-y386aphh.mjs +1 -0
- package/dist/chunks/diff-0.5.14-hyggfx76.mjs +1 -0
- package/dist/chunks/doctor-0.5.14-q3fn5hpz.mjs +1 -0
- package/dist/chunks/doctorDiagnostic-0.5.14-tq9nej4a.mjs +1 -0
- package/dist/chunks/earlyInput-0.5.14-f9vhdypy.mjs +1 -0
- package/dist/chunks/effort-0.5.14-2smy583n.mjs +10 -0
- package/dist/chunks/envUtils-0.5.14-xbzyg758.mjs +1 -0
- package/dist/chunks/environmentSelection-0.5.14-emmy6rr3.mjs +1 -0
- package/dist/chunks/environments-0.5.14-ecp8qdny.mjs +1 -0
- package/dist/chunks/errors-0.5.14-8y2a0e4y.mjs +1 -0
- package/dist/chunks/exampleCommands-0.5.14-kngvnqsk.mjs +1 -0
- package/dist/chunks/exit-0.5.14-5kstn07d.mjs +1 -0
- package/dist/chunks/export-0.5.14-4xtsrx1s.mjs +2 -0
- package/dist/chunks/extra-usage-0.5.14-c359cbqm.mjs +1 -0
- package/dist/chunks/extra-usage-noninteractive-0.5.14-nd846d7b.mjs +1 -0
- package/dist/chunks/fast-0.5.14-ph4h5w66.mjs +1 -0
- package/dist/chunks/feedback-0.5.14-4s0gwfzz.mjs +14 -0
- package/dist/chunks/firstPartyEventLogger-0.5.14-c9xcj3z5.mjs +1 -0
- package/dist/chunks/git-0.5.14-5evnfaj9.mjs +1 -0
- package/dist/chunks/githubModelsCredentials-0.5.14-fkz7b722.mjs +1 -0
- package/dist/chunks/goal-0.5.14-ey3n29t8.mjs +4 -0
- package/dist/chunks/grove-0.5.14-dtm2qt3a.mjs +1 -0
- package/dist/chunks/growthbook-0.5.14-p52b1fpn.mjs +1 -0
- package/dist/chunks/headless-0.5.14-szhcws9m.mjs +2 -0
- package/dist/chunks/heapdump-0.5.14-eb1hjsjx.mjs +6 -0
- package/dist/chunks/help-0.5.14-mzc8t22x.mjs +1 -0
- package/dist/chunks/hookChains-0.5.14-g97q30xx.mjs +3 -0
- package/dist/chunks/hooks-0.5.14-88bm5h5k.mjs +1 -0
- package/dist/chunks/hooks-0.5.14-ys5d015m.mjs +79 -0
- package/dist/chunks/ide-0.5.14-2krrg1a9.mjs +3 -0
- package/dist/chunks/image-processor-napi-0.5.14-xkhg31fm.mjs +1 -0
- package/dist/chunks/index-0.5.14-0vbethc3.mjs +9 -0
- package/dist/chunks/index-0.5.14-0xy3pmj6.mjs +1 -0
- package/dist/chunks/index-0.5.14-2xwm9tzw.mjs +1 -0
- package/dist/chunks/index-0.5.14-4f2sts9v.mjs +1 -0
- package/dist/chunks/index-0.5.14-6abmnxq5.mjs +1 -0
- package/dist/chunks/index-0.5.14-7f15ecf5.mjs +1 -0
- package/dist/chunks/index-0.5.14-9xk2eb5e.mjs +2 -0
- package/dist/chunks/index-0.5.14-ac62kk33.mjs +1 -0
- package/dist/chunks/index-0.5.14-b22bcys9.mjs +1 -0
- package/dist/chunks/index-0.5.14-cpq99fc2.mjs +1 -0
- package/dist/chunks/index-0.5.14-f0fcdhmh.mjs +1 -0
- package/dist/chunks/index-0.5.14-h1dnxskr.mjs +9 -0
- package/dist/chunks/index-0.5.14-hnv3hqb4.mjs +2 -0
- package/dist/chunks/index-0.5.14-hx6n2t98.mjs +17 -0
- package/dist/chunks/index-0.5.14-j5gnx1h5.mjs +1 -0
- package/dist/chunks/index-0.5.14-jedeztfh.mjs +1 -0
- package/dist/chunks/index-0.5.14-n4ak9ayt.mjs +5 -0
- package/dist/chunks/index-0.5.14-pnvmm51v.mjs +1 -0
- package/dist/chunks/index-0.5.14-qt3rsghk.mjs +30 -0
- package/dist/chunks/index-0.5.14-w09z3j2p.mjs +1 -0
- package/dist/chunks/index-0.5.14-wegrd5ws.mjs +1 -0
- package/dist/chunks/index-0.5.14-y52vxjk8.mjs +1 -0
- package/dist/chunks/init-0.5.14-r84vn66h.mjs +1 -0
- package/dist/chunks/initReplBridge-0.5.14-93w4t2bk.mjs +1 -0
- package/dist/chunks/ink-0.5.14-dtjvx2bw.mjs +1 -0
- package/dist/chunks/insights-0.5.14-ee7wh6rp.mjs +870 -0
- package/dist/chunks/install-0.5.14-0pkv3rx9.mjs +1 -0
- package/dist/chunks/install-github-app-0.5.14-jwgnppse.mjs +149 -0
- package/dist/chunks/install-slack-app-0.5.14-xg6pdyqv.mjs +1 -0
- package/dist/chunks/instrumentation-0.5.14-40pdqy02.mjs +1 -0
- package/dist/chunks/interactiveHelpers-0.5.14-0vxxrbcv.mjs +1 -0
- package/dist/chunks/keybindings-0.5.14-yrj9hktn.mjs +2 -0
- package/dist/chunks/knowledge-0.5.14-wmfeb8sj.mjs +2 -0
- package/dist/chunks/latestVersionCache-0.5.14-btshynjc.mjs +1 -0
- package/dist/chunks/loadAgentsDir-0.5.14-bgwtbfkw.mjs +1 -0
- package/dist/chunks/loadPluginHooks-0.5.14-7arkwrx5.mjs +1 -0
- package/dist/chunks/loadPluginHooks-0.5.14-ft2aw53h.mjs +1 -0
- package/dist/chunks/log-0.5.14-zc88rz5g.mjs +1 -0
- package/dist/chunks/main-0.5.14-dtm7rx0y.mjs +1 -0
- package/dist/chunks/managedEnv-0.5.14-t0mfftrg.mjs +1 -0
- package/dist/chunks/mcp-0.5.14-afsrv7xy.mjs +4 -0
- package/dist/chunks/mcp-0.5.14-m5xjst8y.mjs +17 -0
- package/dist/chunks/mcp-0.5.14-qs8y9tyg.mjs +1 -0
- package/dist/chunks/mcpb-0.5.14-hqf00wdg.mjs +1 -0
- package/dist/chunks/memory-0.5.14-deqz5wf4.mjs +3 -0
- package/dist/chunks/mobile-0.5.14-nav99g5f.mjs +2 -0
- package/dist/chunks/model-0.5.14-4m2ak31n.mjs +1 -0
- package/dist/chunks/model-0.5.14-8908s4h1.mjs +2 -0
- package/dist/chunks/node-0.5.14-y28vz58a.mjs +12 -0
- package/dist/chunks/oauth-0.5.14-cqg2kcsy.mjs +1 -0
- package/dist/chunks/openaiShim-0.5.14-zqbrf5p3.mjs +14 -0
- package/dist/chunks/output-style-0.5.14-rhdxpb2v.mjs +1 -0
- package/dist/chunks/package-D6422PQU-0.5.14-rcttc4yp.mjs +1 -0
- package/dist/chunks/parseConnectUrl-0.5.14-wj5c5dp3.mjs +1 -0
- package/dist/chunks/parser-0.5.14-thy6xbb8.mjs +1 -0
- package/dist/chunks/passes-0.5.14-vta3tpqh.mjs +1 -0
- package/dist/chunks/permissions-0.5.14-668n4zqr.mjs +3 -0
- package/dist/chunks/plan-0.5.14-fd25354c.mjs +1 -0
- package/dist/chunks/plist-0.5.14-3dqnn8w2.mjs +1 -0
- package/dist/chunks/plugin-0.5.14-tzhch29w.mjs +29 -0
- package/dist/chunks/pluginStartupCheck-0.5.14-yp54tttb.mjs +1 -0
- package/dist/chunks/plugins-0.5.14-4n79y0tg.mjs +9 -0
- package/dist/chunks/preActionHook-0.5.14-7xyg62a5.mjs +2 -0
- package/dist/chunks/print-0.5.14-jkb0vbrw.mjs +57 -0
- package/dist/chunks/privacy-settings-0.5.14-5gz91bcv.mjs +1 -0
- package/dist/chunks/process-0.5.14-5ven8sh9.mjs +1 -0
- package/dist/chunks/processBashCommand-0.5.14-w72vmsa3.mjs +1 -0
- package/dist/chunks/processSlashCommand-0.5.14-1pq0axg8.mjs +9 -0
- package/dist/chunks/prompt-0.5.14-e3te1m4f.mjs +1 -0
- package/dist/chunks/prompt-0.5.14-prgmwqyn.mjs +1 -0
- package/dist/chunks/prompts-0.5.14-cdwagfnj.mjs +1 -0
- package/dist/chunks/protocolHandler-0.5.14-s73ezrw9.mjs +13 -0
- package/dist/chunks/provider-0.5.14-v7s7j76x.mjs +2 -0
- package/dist/chunks/providerProfiles-0.5.14-5n5txt96.mjs +1 -0
- package/dist/chunks/providerValidation-0.5.14-b6jb7n1p.mjs +6 -0
- package/dist/chunks/rate-limit-options-0.5.14-r9005cw2.mjs +1 -0
- package/dist/chunks/registerSubcommands-0.5.14-n1ax913t.mjs +34 -0
- package/dist/chunks/registry-0.5.14-fh1m7gth.mjs +1 -0
- package/dist/chunks/release-notes-0.5.14-n6nnpd4k.mjs +5 -0
- package/dist/chunks/reload-plugins-0.5.14-1askmda7.mjs +2 -0
- package/dist/chunks/remote-env-0.5.14-zp4b9t21.mjs +1 -0
- package/dist/chunks/remoteBridgeCore-0.5.14-vwrkzyqk.mjs +1 -0
- package/dist/chunks/remoteSession-0.5.14-95tfvwa6.mjs +1 -0
- package/dist/chunks/rename-0.5.14-nejym9bj.mjs +1 -0
- package/dist/chunks/replBridgeHandle-0.5.14-qqvggm22.mjs +1 -0
- package/dist/chunks/replLauncher-0.5.14-fefkewc5.mjs +1 -0
- package/dist/chunks/resume-0.5.14-4m6xat30.mjs +2 -0
- package/dist/chunks/rewind-0.5.14-r58b720w.mjs +1 -0
- package/dist/chunks/rootOptions-0.5.14-a5vv29e3.mjs +1 -0
- package/dist/chunks/sandbox-adapter-0.5.14-zb3t1137.mjs +1 -0
- package/dist/chunks/sandbox-toggle-0.5.14-xsv41nq3.mjs +1 -0
- package/dist/chunks/session-0.5.14-wyrxa25a.mjs +2 -0
- package/dist/chunks/sessionDiscovery-0.5.14-28vpj06b.mjs +1 -0
- package/dist/chunks/sessionFileAccessHooks-0.5.14-z2qpn0tn.mjs +1 -0
- package/dist/chunks/sessionStorage-0.5.14-kwv9d6vs.mjs +1 -0
- package/dist/chunks/settings-0.5.14-p0zs5fdt.mjs +1 -0
- package/dist/chunks/setup-0.5.14-qg611r9j.mjs +5 -0
- package/dist/chunks/sinks-0.5.14-kk1z8jn1.mjs +1 -0
- package/dist/chunks/skills-0.5.14-jks9y478.mjs +1 -0
- package/dist/chunks/startupProfiler-0.5.14-jaxmn568.mjs +1 -0
- package/dist/chunks/startupUpdateCheck-0.5.14-1yfdaz7t.mjs +1 -0
- package/dist/chunks/state-0.5.14-kf06ggyz.mjs +1 -0
- package/dist/chunks/stats-0.5.14-8f11qq7g.mjs +6 -0
- package/dist/chunks/status-0.5.14-yx768tmg.mjs +1 -0
- package/dist/chunks/stickers-0.5.14-8nb2bx0d.mjs +1 -0
- package/dist/chunks/subprocessEnv-0.5.14-hhz4z80t.mjs +1 -0
- package/dist/chunks/tasks-0.5.14-mgjvgj3q.mjs +1 -0
- package/dist/chunks/teamHelpers-0.5.14-zn6sdp9e.mjs +1 -0
- package/dist/chunks/teammateModeSnapshot-0.5.14-mr3qdh44.mjs +1 -0
- package/dist/chunks/teleport-0.5.14-jg3r903g.mjs +1 -0
- package/dist/chunks/terminalSetup-0.5.14-ys9stqfy.mjs +1 -0
- package/dist/chunks/theme-0.5.14-vwqjdywj.mjs +1 -0
- package/dist/chunks/thinkback-0.5.14-rnqvt431.mjs +1 -0
- package/dist/chunks/thinkback-play-0.5.14-gh24t0mc.mjs +1 -0
- package/dist/chunks/toolPool-0.5.14-6bzfbnf4.mjs +1 -0
- package/dist/chunks/toolSearch-0.5.14-6em6kvm8.mjs +1 -0
- package/dist/chunks/tools-0.5.14-3zfad976.mjs +1 -0
- package/dist/chunks/trustedDevice-0.5.14-csn78406.mjs +1 -0
- package/dist/chunks/turndown.cjs-0.5.14-fg9tbzhn.mjs +69 -0
- package/dist/chunks/ultrareviewCommand-0.5.14-d4hjcjxs.mjs +4 -0
- package/dist/chunks/update-0.5.14-c55smch2.mjs +86 -0
- package/dist/chunks/upgrade-0.5.14-hgzg25f4.mjs +1 -0
- package/dist/chunks/upstreamproxy-0.5.14-ss7ej555.mjs +14 -0
- package/dist/chunks/url-handler-napi-0.5.14-qbb087da.mjs +1 -0
- package/dist/chunks/usage-0.5.14-pghv9g49.mjs +1 -0
- package/dist/chunks/util-0.5.14-z79t0g8n.mjs +1 -0
- package/dist/chunks/utils-0.5.14-rc3e5m8r.mjs +1 -0
- package/dist/chunks/vim-0.5.14-hfvzh87q.mjs +1 -0
- package/dist/chunks/watcher-0.5.14-eh1f1h28.mjs +1 -0
- package/dist/chunks/wiki-0.5.14-kpp6v5tp.mjs +132 -0
- package/dist/chunks/worktree-0.5.14-czpr7pcg.mjs +1 -0
- package/dist/chunks/worktreeModeEnabled-0.5.14-07wp1qe2.mjs +1 -0
- package/dist/chunks/wrapper-0.5.14-9z68ky7a.mjs +7 -0
- package/dist/claudin-vscode.vsix +0 -0
- package/dist/cli.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunks/AgentTool-0.5.13-6dz2gvzt.mjs +0 -1
- package/dist/chunks/App-0.5.13-h8h37pzk.mjs +0 -1
- package/dist/chunks/ApproveApiKey-0.5.13-r1fte24k.mjs +0 -1
- package/dist/chunks/AssistantSessionChooser-0.5.13-8r9am3rj.mjs +0 -1
- package/dist/chunks/AutoModeOptInDialog-0.5.13-kmhmmjcg.mjs +0 -1
- package/dist/chunks/BypassPermissionsModeDialog-0.5.13-2bsqjr5d.mjs +0 -1
- package/dist/chunks/ClaudeMdExternalIncludesDialog-0.5.13-qcb3r450.mjs +0 -1
- package/dist/chunks/ConsoleOAuthFlow-0.5.13-pg65frv4.mjs +0 -1
- package/dist/chunks/DiffDialog-0.5.13-hwy08wq9.mjs +0 -3
- package/dist/chunks/Doctor-0.5.13-335trspw.mjs +0 -1
- package/dist/chunks/Grove-0.5.13-hg0k8g49.mjs +0 -1
- package/dist/chunks/ITermBackend-0.5.13-jj7kn9vx.mjs +0 -1
- package/dist/chunks/InvalidConfigDialog-0.5.13-9azv44xk.mjs +0 -1
- package/dist/chunks/InvalidSettingsDialog-0.5.13-byp7h5gk.mjs +0 -1
- package/dist/chunks/MigrationDialog-0.5.13-zxyqfrbq.mjs +0 -1
- package/dist/chunks/Onboarding-0.5.13-qa2yk18p.mjs +0 -1
- package/dist/chunks/ProviderManager-0.5.13-c1vawvvp.mjs +0 -1
- package/dist/chunks/REPL-0.5.13-4rss5cn8.mjs +0 -1
- package/dist/chunks/ResumeConversation-0.5.13-8yg9t110.mjs +0 -1
- package/dist/chunks/SnapshotUpdateDialog-0.5.13-egpytwfz.mjs +0 -1
- package/dist/chunks/TeleportProgress-0.5.13-mqff8prx.mjs +0 -1
- package/dist/chunks/TeleportRepoMismatchDialog-0.5.13-vvjjc0e0.mjs +0 -1
- package/dist/chunks/TeleportResumeWrapper-0.5.13-hr5qx564.mjs +0 -1
- package/dist/chunks/TmuxBackend-0.5.13-3rqrqy3v.mjs +0 -9
- package/dist/chunks/ToolSearchTool-0.5.13-pc0xw8bq.mjs +0 -1
- package/dist/chunks/TrustDialog-0.5.13-fc0205ss.mjs +0 -1
- package/dist/chunks/activeProvider-0.5.13-50732cyn.mjs +0 -1
- package/dist/chunks/add-dir-0.5.13-sq7m6erc.mjs +0 -1
- package/dist/chunks/agents-0.5.13-manb7tcq.mjs +0 -3
- package/dist/chunks/agents-0.5.13-xvmk9xvk.mjs +0 -110
- package/dist/chunks/api-0.5.13-q2anppzf.mjs +0 -1
- package/dist/chunks/asciicast-0.5.13-qdn1gh3y.mjs +0 -1
- package/dist/chunks/assistant-0.5.13-2hfvn0kh.mjs +0 -1
- package/dist/chunks/auth-0.5.13-05zhnpsy.mjs +0 -1
- package/dist/chunks/auth-0.5.13-jn53extx.mjs +0 -1
- package/dist/chunks/autoMode-0.5.13-ejwtdvs2.mjs +0 -48
- package/dist/chunks/autoUpdater-0.5.13-j6cngyr7.mjs +0 -1
- package/dist/chunks/backgroundHousekeeping-0.5.13-rrvzf922.mjs +0 -1
- package/dist/chunks/branch-0.5.13-qmyekghp.mjs +0 -4
- package/dist/chunks/bridgePointer-0.5.13-8r4x6rgv.mjs +0 -1
- package/dist/chunks/btw-0.5.13-0pa7vfhq.mjs +0 -1
- package/dist/chunks/buddy-0.5.13-k3ac5jxx.mjs +0 -3
- package/dist/chunks/cacache-0.5.13-ze1bqfm6.mjs +0 -1
- package/dist/chunks/cache-probe-0.5.13-yc3ra4vk.mjs +0 -21
- package/dist/chunks/cacheStats-0.5.13-e1eg5g4e.mjs +0 -4
- package/dist/chunks/caches-0.5.13-75dr0q42.mjs +0 -1
- package/dist/chunks/claudeDesktop-0.5.13-5nptd5hj.mjs +0 -1
- package/dist/chunks/claudemd-0.5.13-ce8fx7gc.mjs +0 -1
- package/dist/chunks/clear-0.5.13-k8q15yen.mjs +0 -1
- package/dist/chunks/clearTerminal-0.5.13-veyek376.mjs +0 -1
- package/dist/chunks/cli-0.5.13-03jqbfbp.mjs +0 -2
- package/dist/chunks/cli-0.5.13-055v20cs.mjs +0 -2
- package/dist/chunks/cli-0.5.13-061m60f2.mjs +0 -2
- package/dist/chunks/cli-0.5.13-0fhxw4ng.mjs +0 -3
- package/dist/chunks/cli-0.5.13-0zgpx8rh.mjs +0 -2
- package/dist/chunks/cli-0.5.13-15kmd08p.mjs +0 -2
- package/dist/chunks/cli-0.5.13-16khcs2m.mjs +0 -3
- package/dist/chunks/cli-0.5.13-1eedz5bc.mjs +0 -2
- package/dist/chunks/cli-0.5.13-1qt91z42.mjs +0 -2
- package/dist/chunks/cli-0.5.13-29nzbrwv.mjs +0 -45
- package/dist/chunks/cli-0.5.13-2m4fm0hh.mjs +0 -2
- package/dist/chunks/cli-0.5.13-2v1zpnvh.mjs +0 -2
- package/dist/chunks/cli-0.5.13-2vy5qjm5.mjs +0 -5276
- package/dist/chunks/cli-0.5.13-36s1k9x2.mjs +0 -2
- package/dist/chunks/cli-0.5.13-3e1p9n7x.mjs +0 -2
- package/dist/chunks/cli-0.5.13-3ys2sjjd.mjs +0 -2
- package/dist/chunks/cli-0.5.13-3zrq5ggt.mjs +0 -2
- package/dist/chunks/cli-0.5.13-426cpksk.mjs +0 -4
- package/dist/chunks/cli-0.5.13-4at49cv9.mjs +0 -2
- package/dist/chunks/cli-0.5.13-4s4vnhj8.mjs +0 -2
- package/dist/chunks/cli-0.5.13-4yqsxc90.mjs +0 -2
- package/dist/chunks/cli-0.5.13-50cwkg00.mjs +0 -2
- package/dist/chunks/cli-0.5.13-5n0sdsbk.mjs +0 -2
- package/dist/chunks/cli-0.5.13-5tva2fr1.mjs +0 -6
- package/dist/chunks/cli-0.5.13-5wc80m6b.mjs +0 -2
- package/dist/chunks/cli-0.5.13-5x7qbneh.mjs +0 -2
- package/dist/chunks/cli-0.5.13-62qasgve.mjs +0 -2
- package/dist/chunks/cli-0.5.13-667jxcab.mjs +0 -18
- package/dist/chunks/cli-0.5.13-69m6gq4m.mjs +0 -2
- package/dist/chunks/cli-0.5.13-6c2mgdby.mjs +0 -2
- package/dist/chunks/cli-0.5.13-6hvwtg4n.mjs +0 -2
- package/dist/chunks/cli-0.5.13-6qz4fn68.mjs +0 -2
- package/dist/chunks/cli-0.5.13-6yehabyw.mjs +0 -2
- package/dist/chunks/cli-0.5.13-70f6zf2z.mjs +0 -4
- package/dist/chunks/cli-0.5.13-73fyz4ct.mjs +0 -2
- package/dist/chunks/cli-0.5.13-73hy7ka5.mjs +0 -2
- package/dist/chunks/cli-0.5.13-77mqds6w.mjs +0 -2
- package/dist/chunks/cli-0.5.13-7b4c61sf.mjs +0 -2
- package/dist/chunks/cli-0.5.13-7fzk2679.mjs +0 -2
- package/dist/chunks/cli-0.5.13-7gkctjmj.mjs +0 -2
- package/dist/chunks/cli-0.5.13-7je48sax.mjs +0 -15
- package/dist/chunks/cli-0.5.13-898bb5x7.mjs +0 -2
- package/dist/chunks/cli-0.5.13-89h7zw2x.mjs +0 -2
- package/dist/chunks/cli-0.5.13-8wrj5aqm.mjs +0 -2
- package/dist/chunks/cli-0.5.13-8yj2mydb.mjs +0 -2
- package/dist/chunks/cli-0.5.13-9r26f53q.mjs +0 -8
- package/dist/chunks/cli-0.5.13-a86qe2vz.mjs +0 -2
- package/dist/chunks/cli-0.5.13-a8k2grq1.mjs +0 -3
- package/dist/chunks/cli-0.5.13-a9gqqmjh.mjs +0 -6
- package/dist/chunks/cli-0.5.13-acgafbm9.mjs +0 -2
- package/dist/chunks/cli-0.5.13-adphma77.mjs +0 -2
- package/dist/chunks/cli-0.5.13-atfk3e81.mjs +0 -2
- package/dist/chunks/cli-0.5.13-athb0q85.mjs +0 -2
- package/dist/chunks/cli-0.5.13-b2593ngv.mjs +0 -4
- package/dist/chunks/cli-0.5.13-b5tqhsx5.mjs +0 -2
- package/dist/chunks/cli-0.5.13-b6aefc28.mjs +0 -1
- package/dist/chunks/cli-0.5.13-bkv5hf1d.mjs +0 -2
- package/dist/chunks/cli-0.5.13-bv7ax1n3.mjs +0 -2
- package/dist/chunks/cli-0.5.13-cf35yzvq.mjs +0 -3
- package/dist/chunks/cli-0.5.13-chdvhgrk.mjs +0 -2
- package/dist/chunks/cli-0.5.13-chgxtj5w.mjs +0 -4
- package/dist/chunks/cli-0.5.13-cjd4zkx5.mjs +0 -2
- package/dist/chunks/cli-0.5.13-cm18xc7a.mjs +0 -4
- package/dist/chunks/cli-0.5.13-cnzars85.mjs +0 -5
- package/dist/chunks/cli-0.5.13-cs4r7txx.mjs +0 -2
- package/dist/chunks/cli-0.5.13-cvy5zs8w.mjs +0 -39
- package/dist/chunks/cli-0.5.13-cwy43qr2.mjs +0 -2
- package/dist/chunks/cli-0.5.13-d0pk4caa.mjs +0 -24
- package/dist/chunks/cli-0.5.13-d1xn4v80.mjs +0 -2
- package/dist/chunks/cli-0.5.13-d4g5sa6y.mjs +0 -2
- package/dist/chunks/cli-0.5.13-d6bw823x.mjs +0 -2
- package/dist/chunks/cli-0.5.13-dd5wmg26.mjs +0 -15
- package/dist/chunks/cli-0.5.13-ddpterr2.mjs +0 -2
- package/dist/chunks/cli-0.5.13-dxs15ka8.mjs +0 -24
- package/dist/chunks/cli-0.5.13-dzq8ey2j.mjs +0 -2
- package/dist/chunks/cli-0.5.13-efbkgz8j.mjs +0 -2
- package/dist/chunks/cli-0.5.13-ejy68mbm.mjs +0 -34
- package/dist/chunks/cli-0.5.13-epjykaww.mjs +0 -17
- package/dist/chunks/cli-0.5.13-evjnfa9k.mjs +0 -10
- package/dist/chunks/cli-0.5.13-f1akqq6k.mjs +0 -2
- package/dist/chunks/cli-0.5.13-f1e673b2.mjs +0 -2
- package/dist/chunks/cli-0.5.13-f6tattxs.mjs +0 -4
- package/dist/chunks/cli-0.5.13-fcrp5w0b.mjs +0 -3
- package/dist/chunks/cli-0.5.13-fdyfmbdw.mjs +0 -2
- package/dist/chunks/cli-0.5.13-fgckevv1.mjs +0 -2
- package/dist/chunks/cli-0.5.13-fjs5qecq.mjs +0 -2
- package/dist/chunks/cli-0.5.13-frerk7s6.mjs +0 -2
- package/dist/chunks/cli-0.5.13-g76ge0hv.mjs +0 -2
- package/dist/chunks/cli-0.5.13-ga5kmq1w.mjs +0 -2
- package/dist/chunks/cli-0.5.13-gb0363rs.mjs +0 -2
- package/dist/chunks/cli-0.5.13-gd8h6ejm.mjs +0 -15
- package/dist/chunks/cli-0.5.13-gpnjdq6k.mjs +0 -12
- package/dist/chunks/cli-0.5.13-gtn64dxk.mjs +0 -12
- package/dist/chunks/cli-0.5.13-gw433gw1.mjs +0 -9
- package/dist/chunks/cli-0.5.13-h04mqqtv.mjs +0 -17
- package/dist/chunks/cli-0.5.13-h1jy4w92.mjs +0 -2
- package/dist/chunks/cli-0.5.13-h9wt4xcx.mjs +0 -25
- package/dist/chunks/cli-0.5.13-hgrj8csf.mjs +0 -4
- package/dist/chunks/cli-0.5.13-hwcqeqbn.mjs +0 -2
- package/dist/chunks/cli-0.5.13-hxsc43y5.mjs +0 -2
- package/dist/chunks/cli-0.5.13-j2wbmw1t.mjs +0 -2
- package/dist/chunks/cli-0.5.13-j7mzv9r7.mjs +0 -2
- package/dist/chunks/cli-0.5.13-j97wk70q.mjs +0 -2
- package/dist/chunks/cli-0.5.13-jc4m6d2k.mjs +0 -3
- package/dist/chunks/cli-0.5.13-jqns71dy.mjs +0 -2
- package/dist/chunks/cli-0.5.13-k0a2tvhb.mjs +0 -2
- package/dist/chunks/cli-0.5.13-k18wsy2t.mjs +0 -2
- package/dist/chunks/cli-0.5.13-k8vf1rgk.mjs +0 -2
- package/dist/chunks/cli-0.5.13-khtf0a93.mjs +0 -9
- package/dist/chunks/cli-0.5.13-kry2fk76.mjs +0 -2
- package/dist/chunks/cli-0.5.13-kt5d0qv4.mjs +0 -2
- package/dist/chunks/cli-0.5.13-ktrr6zcr.mjs +0 -2
- package/dist/chunks/cli-0.5.13-kz59bkh7.mjs +0 -6
- package/dist/chunks/cli-0.5.13-mpqhbtwc.mjs +0 -2
- package/dist/chunks/cli-0.5.13-mrtzh5nm.mjs +0 -2
- package/dist/chunks/cli-0.5.13-mwrgy706.mjs +0 -2
- package/dist/chunks/cli-0.5.13-n30tm5c8.mjs +0 -2
- package/dist/chunks/cli-0.5.13-n3xnwgn1.mjs +0 -2
- package/dist/chunks/cli-0.5.13-nc37z94b.mjs +0 -2
- package/dist/chunks/cli-0.5.13-nkaxbfpd.mjs +0 -2
- package/dist/chunks/cli-0.5.13-nqkxsn2m.mjs +0 -133
- package/dist/chunks/cli-0.5.13-p4f4h0g7.mjs +0 -16
- package/dist/chunks/cli-0.5.13-p6q4xbrv.mjs +0 -2
- package/dist/chunks/cli-0.5.13-p70x9j1v.mjs +0 -193
- package/dist/chunks/cli-0.5.13-p7q9grjp.mjs +0 -2
- package/dist/chunks/cli-0.5.13-p9fwmgwy.mjs +0 -2
- package/dist/chunks/cli-0.5.13-q2mxeckt.mjs +0 -2
- package/dist/chunks/cli-0.5.13-qdtebkgs.mjs +0 -2
- package/dist/chunks/cli-0.5.13-qfxggvke.mjs +0 -18
- package/dist/chunks/cli-0.5.13-qkjyj942.mjs +0 -2
- package/dist/chunks/cli-0.5.13-qrn019we.mjs +0 -2
- package/dist/chunks/cli-0.5.13-qs5d8j4d.mjs +0 -2
- package/dist/chunks/cli-0.5.13-qv3v2ydv.mjs +0 -3
- package/dist/chunks/cli-0.5.13-r0m7bt05.mjs +0 -2
- package/dist/chunks/cli-0.5.13-r442vgxt.mjs +0 -2
- package/dist/chunks/cli-0.5.13-rd990xfy.mjs +0 -2
- package/dist/chunks/cli-0.5.13-rfsjgvne.mjs +0 -2
- package/dist/chunks/cli-0.5.13-rmc7f4b8.mjs +0 -2
- package/dist/chunks/cli-0.5.13-rppjxrmy.mjs +0 -2
- package/dist/chunks/cli-0.5.13-rqjp9raj.mjs +0 -58
- package/dist/chunks/cli-0.5.13-rrqv533k.mjs +0 -2
- package/dist/chunks/cli-0.5.13-s005ka5h.mjs +0 -2
- package/dist/chunks/cli-0.5.13-s1wx3grp.mjs +0 -2
- package/dist/chunks/cli-0.5.13-s58vke8w.mjs +0 -2
- package/dist/chunks/cli-0.5.13-s719y89z.mjs +0 -2
- package/dist/chunks/cli-0.5.13-sfjdg8y7.mjs +0 -4
- package/dist/chunks/cli-0.5.13-sww17qtj.mjs +0 -42
- package/dist/chunks/cli-0.5.13-t0zrxwck.mjs +0 -3
- package/dist/chunks/cli-0.5.13-t6q9ebdp.mjs +0 -2
- package/dist/chunks/cli-0.5.13-teedketa.mjs +0 -2
- package/dist/chunks/cli-0.5.13-tg8xt9zq.mjs +0 -3
- package/dist/chunks/cli-0.5.13-thgp6asf.mjs +0 -21
- package/dist/chunks/cli-0.5.13-tqs67xcg.mjs +0 -2
- package/dist/chunks/cli-0.5.13-tr9s34te.mjs +0 -59
- package/dist/chunks/cli-0.5.13-tvfs784w.mjs +0 -2
- package/dist/chunks/cli-0.5.13-tyh63jx3.mjs +0 -2
- package/dist/chunks/cli-0.5.13-ve50w85d.mjs +0 -2
- package/dist/chunks/cli-0.5.13-vee98ybt.mjs +0 -2
- package/dist/chunks/cli-0.5.13-vfkw26ed.mjs +0 -3
- package/dist/chunks/cli-0.5.13-vhjxq97s.mjs +0 -2
- package/dist/chunks/cli-0.5.13-vhvwgvqz.mjs +0 -2
- package/dist/chunks/cli-0.5.13-vqrqsmg4.mjs +0 -3
- package/dist/chunks/cli-0.5.13-vt1mnr9f.mjs +0 -2
- package/dist/chunks/cli-0.5.13-w20nxjkz.mjs +0 -5
- package/dist/chunks/cli-0.5.13-wbq0xatn.mjs +0 -2
- package/dist/chunks/cli-0.5.13-wfyf1thm.mjs +0 -2
- package/dist/chunks/cli-0.5.13-wyr6xtxm.mjs +0 -2
- package/dist/chunks/cli-0.5.13-x3f97qaq.mjs +0 -2
- package/dist/chunks/cli-0.5.13-x3t2vpfh.mjs +0 -2
- package/dist/chunks/cli-0.5.13-x8dtpekr.mjs +0 -2
- package/dist/chunks/cli-0.5.13-xgcr3a63.mjs +0 -2
- package/dist/chunks/cli-0.5.13-xnxmkmta.mjs +0 -5
- package/dist/chunks/cli-0.5.13-xvg417w8.mjs +0 -7
- package/dist/chunks/cli-0.5.13-xxa4mzdx.mjs +0 -2
- package/dist/chunks/cli-0.5.13-xxpqtp1x.mjs +0 -2
- package/dist/chunks/cli-0.5.13-xzeqt5b9.mjs +0 -2
- package/dist/chunks/cli-0.5.13-y3hmh09p.mjs +0 -2
- package/dist/chunks/cli-0.5.13-y9wywv5c.mjs +0 -2
- package/dist/chunks/cli-0.5.13-yc6wyazy.mjs +0 -67
- package/dist/chunks/cli-0.5.13-yf4tqq6c.mjs +0 -20
- package/dist/chunks/cli-0.5.13-yk8r9pqr.mjs +0 -2
- package/dist/chunks/cli-0.5.13-yskavx3s.mjs +0 -12
- package/dist/chunks/cli-0.5.13-ytqyx6qh.mjs +0 -2
- package/dist/chunks/cli-0.5.13-ywwd10c0.mjs +0 -4
- package/dist/chunks/cli-0.5.13-z0f17269.mjs +0 -2
- package/dist/chunks/cli-0.5.13-z1aye5ce.mjs +0 -2
- package/dist/chunks/cli-0.5.13-zk96c5kc.mjs +0 -3
- package/dist/chunks/cli-0.5.13-zkqc4zsj.mjs +0 -4
- package/dist/chunks/cli-0.5.13-zms1a287.mjs +0 -50
- package/dist/chunks/cli-0.5.13-znj1x5bb.mjs +0 -133
- package/dist/chunks/client-0.5.13-wkzv25nn.mjs +0 -1
- package/dist/chunks/color-0.5.13-yd46yzt2.mjs +0 -1
- package/dist/chunks/compact-0.5.13-3bw7kt91.mjs +0 -3
- package/dist/chunks/config-0.5.13-mwq6ejza.mjs +0 -1
- package/dist/chunks/config-0.5.13-t1bvsttc.mjs +0 -1
- package/dist/chunks/context-0.5.13-zffaf66t.mjs +0 -1
- package/dist/chunks/context-noninteractive-0.5.13-r7fhc6wz.mjs +0 -1
- package/dist/chunks/conversation-0.5.13-3vvb99cj.mjs +0 -1
- package/dist/chunks/copy-0.5.13-zh3ctvbe.mjs +0 -9
- package/dist/chunks/cost-0.5.13-kaah7wjm.mjs +0 -1
- package/dist/chunks/createSSHSession-0.5.13-gn1tyhwh.mjs +0 -1
- package/dist/chunks/createSession-0.5.13-q4atr39q.mjs +0 -1
- package/dist/chunks/debug-0.5.13-tsk3c3gg.mjs +0 -1
- package/dist/chunks/defaultActionDeps-0.5.13-eep8ghf6.mjs +0 -1177
- package/dist/chunks/desktop-0.5.13-wahg3gbx.mjs +0 -1
- package/dist/chunks/detectRepository-0.5.13-xek1s6f7.mjs +0 -1
- package/dist/chunks/detection-0.5.13-f8b6t5he.mjs +0 -1
- package/dist/chunks/diff-0.5.13-515a1hs6.mjs +0 -1
- package/dist/chunks/doctor-0.5.13-zafz1vsm.mjs +0 -1
- package/dist/chunks/doctorDiagnostic-0.5.13-fd90ctm0.mjs +0 -1
- package/dist/chunks/earlyInput-0.5.13-b58bf771.mjs +0 -1
- package/dist/chunks/effort-0.5.13-0yah2d2h.mjs +0 -10
- package/dist/chunks/envUtils-0.5.13-g4pw1v3n.mjs +0 -1
- package/dist/chunks/environmentSelection-0.5.13-9qw5cb9h.mjs +0 -1
- package/dist/chunks/environments-0.5.13-2a6akk4c.mjs +0 -1
- package/dist/chunks/errors-0.5.13-7p8kdhe8.mjs +0 -1
- package/dist/chunks/exampleCommands-0.5.13-fxpyc0yh.mjs +0 -1
- package/dist/chunks/exit-0.5.13-gs0h7d0d.mjs +0 -1
- package/dist/chunks/export-0.5.13-d2yz4k76.mjs +0 -2
- package/dist/chunks/extra-usage-0.5.13-571qzpk6.mjs +0 -1
- package/dist/chunks/extra-usage-noninteractive-0.5.13-ky55gxd6.mjs +0 -1
- package/dist/chunks/fast-0.5.13-2g61p9d0.mjs +0 -1
- package/dist/chunks/feedback-0.5.13-2mk1kd03.mjs +0 -14
- package/dist/chunks/firstPartyEventLogger-0.5.13-2t54ma0f.mjs +0 -1
- package/dist/chunks/git-0.5.13-rd7xcgr3.mjs +0 -1
- package/dist/chunks/githubModelsCredentials-0.5.13-skfy40r3.mjs +0 -1
- package/dist/chunks/grove-0.5.13-g8qwzetx.mjs +0 -1
- package/dist/chunks/growthbook-0.5.13-hnyag67m.mjs +0 -1
- package/dist/chunks/headless-0.5.13-05rns8kj.mjs +0 -2
- package/dist/chunks/heapdump-0.5.13-4eq6h79m.mjs +0 -6
- package/dist/chunks/help-0.5.13-8pfrra9q.mjs +0 -1
- package/dist/chunks/hookChains-0.5.13-vvmpgx47.mjs +0 -3
- package/dist/chunks/hooks-0.5.13-c2ksw8k4.mjs +0 -1
- package/dist/chunks/hooks-0.5.13-zer0dcqm.mjs +0 -79
- package/dist/chunks/ide-0.5.13-r40xcg67.mjs +0 -3
- package/dist/chunks/image-processor-napi-0.5.13-gf9xnpk4.mjs +0 -1
- package/dist/chunks/index-0.5.13-06mj6naw.mjs +0 -1
- package/dist/chunks/index-0.5.13-12hemzfc.mjs +0 -1
- package/dist/chunks/index-0.5.13-4559xg8z.mjs +0 -17
- package/dist/chunks/index-0.5.13-5gmbch0k.mjs +0 -9
- package/dist/chunks/index-0.5.13-5qstd1y9.mjs +0 -1
- package/dist/chunks/index-0.5.13-5zhr2qys.mjs +0 -1
- package/dist/chunks/index-0.5.13-7t4ww1cj.mjs +0 -1
- package/dist/chunks/index-0.5.13-9zz559q7.mjs +0 -1
- package/dist/chunks/index-0.5.13-ap2xd7mn.mjs +0 -1
- package/dist/chunks/index-0.5.13-c9pk5nd1.mjs +0 -2
- package/dist/chunks/index-0.5.13-d9sdxhsy.mjs +0 -1
- package/dist/chunks/index-0.5.13-ej6cywk8.mjs +0 -30
- package/dist/chunks/index-0.5.13-fbjdwyd8.mjs +0 -1
- package/dist/chunks/index-0.5.13-fertw6vb.mjs +0 -1
- package/dist/chunks/index-0.5.13-jwf634zt.mjs +0 -1
- package/dist/chunks/index-0.5.13-nny2e7sx.mjs +0 -5
- package/dist/chunks/index-0.5.13-np7s1rcw.mjs +0 -1
- package/dist/chunks/index-0.5.13-qkvpat3t.mjs +0 -9
- package/dist/chunks/index-0.5.13-qq60ettc.mjs +0 -1
- package/dist/chunks/index-0.5.13-rty9gaxf.mjs +0 -2
- package/dist/chunks/index-0.5.13-yqdcztr9.mjs +0 -1
- package/dist/chunks/index-0.5.13-zhze2z09.mjs +0 -1
- package/dist/chunks/init-0.5.13-yn5gjx3n.mjs +0 -1
- package/dist/chunks/initReplBridge-0.5.13-3q7t27y6.mjs +0 -1
- package/dist/chunks/ink-0.5.13-hp9a2nw1.mjs +0 -1
- package/dist/chunks/insights-0.5.13-k7b8vcre.mjs +0 -870
- package/dist/chunks/install-0.5.13-bfn6wvkn.mjs +0 -1
- package/dist/chunks/install-github-app-0.5.13-jgte5vf5.mjs +0 -149
- package/dist/chunks/install-slack-app-0.5.13-6jhm4499.mjs +0 -1
- package/dist/chunks/instrumentation-0.5.13-qe85v218.mjs +0 -1
- package/dist/chunks/interactiveHelpers-0.5.13-pzrtv38g.mjs +0 -1
- package/dist/chunks/keybindings-0.5.13-nekhy7ew.mjs +0 -2
- package/dist/chunks/knowledge-0.5.13-gzztvqej.mjs +0 -2
- package/dist/chunks/latestVersionCache-0.5.13-68b2ccpy.mjs +0 -1
- package/dist/chunks/loadAgentsDir-0.5.13-0dsj5wv6.mjs +0 -1
- package/dist/chunks/loadPluginHooks-0.5.13-0z0wcvtq.mjs +0 -1
- package/dist/chunks/loadPluginHooks-0.5.13-fzcfd312.mjs +0 -1
- package/dist/chunks/log-0.5.13-gdx6qzh8.mjs +0 -1
- package/dist/chunks/main-0.5.13-n87gjwzq.mjs +0 -1
- package/dist/chunks/managedEnv-0.5.13-53yr3zwe.mjs +0 -1
- package/dist/chunks/mcp-0.5.13-nmspb2zq.mjs +0 -4
- package/dist/chunks/mcp-0.5.13-rw2g8qaa.mjs +0 -17
- package/dist/chunks/mcp-0.5.13-th2ze7ya.mjs +0 -1
- package/dist/chunks/mcpb-0.5.13-m2r7m7gz.mjs +0 -1
- package/dist/chunks/memory-0.5.13-exfd915f.mjs +0 -3
- package/dist/chunks/mobile-0.5.13-chn8dbj3.mjs +0 -2
- package/dist/chunks/model-0.5.13-02rcx381.mjs +0 -1
- package/dist/chunks/model-0.5.13-nn224m13.mjs +0 -2
- package/dist/chunks/node-0.5.13-qaeqsj1w.mjs +0 -12
- package/dist/chunks/oauth-0.5.13-9kyat49f.mjs +0 -1
- package/dist/chunks/openaiShim-0.5.13-h22myqt0.mjs +0 -14
- package/dist/chunks/output-style-0.5.13-6fyp1e9p.mjs +0 -1
- package/dist/chunks/package-D6422PQU-0.5.13-qhrrn6zr.mjs +0 -1
- package/dist/chunks/parseConnectUrl-0.5.13-1qc35s39.mjs +0 -1
- package/dist/chunks/parser-0.5.13-pat6pqc3.mjs +0 -1
- package/dist/chunks/passes-0.5.13-e04rjkwz.mjs +0 -1
- package/dist/chunks/permissions-0.5.13-hayn4a0z.mjs +0 -3
- package/dist/chunks/plan-0.5.13-837bdxnq.mjs +0 -1
- package/dist/chunks/plist-0.5.13-wbmvsbtw.mjs +0 -1
- package/dist/chunks/plugin-0.5.13-wfbqn2r6.mjs +0 -29
- package/dist/chunks/pluginStartupCheck-0.5.13-6kztma6y.mjs +0 -1
- package/dist/chunks/plugins-0.5.13-661zwqh0.mjs +0 -9
- package/dist/chunks/preActionHook-0.5.13-jnvd55h3.mjs +0 -2
- package/dist/chunks/print-0.5.13-tp9qh9m9.mjs +0 -57
- package/dist/chunks/privacy-settings-0.5.13-kd3r9h57.mjs +0 -1
- package/dist/chunks/process-0.5.13-kkfgtfp6.mjs +0 -1
- package/dist/chunks/processBashCommand-0.5.13-9yggekvh.mjs +0 -1
- package/dist/chunks/processSlashCommand-0.5.13-q15qa3ee.mjs +0 -9
- package/dist/chunks/prompt-0.5.13-h2tvhh01.mjs +0 -1
- package/dist/chunks/prompt-0.5.13-x601wxwy.mjs +0 -1
- package/dist/chunks/prompts-0.5.13-76a9ns5g.mjs +0 -1
- package/dist/chunks/protocolHandler-0.5.13-kvfdrr12.mjs +0 -13
- package/dist/chunks/provider-0.5.13-tgwe2fwj.mjs +0 -2
- package/dist/chunks/providerProfiles-0.5.13-hyx6zffe.mjs +0 -1
- package/dist/chunks/providerValidation-0.5.13-8z62br8d.mjs +0 -6
- package/dist/chunks/rate-limit-options-0.5.13-wz5ew5he.mjs +0 -1
- package/dist/chunks/registerSubcommands-0.5.13-xgwprw2n.mjs +0 -34
- package/dist/chunks/registry-0.5.13-cx3vtv28.mjs +0 -1
- package/dist/chunks/release-notes-0.5.13-pcbc1edt.mjs +0 -5
- package/dist/chunks/reload-plugins-0.5.13-pvwtgp6y.mjs +0 -2
- package/dist/chunks/remote-env-0.5.13-mj63srey.mjs +0 -1
- package/dist/chunks/remoteBridgeCore-0.5.13-vmb8vyd9.mjs +0 -1
- package/dist/chunks/remoteSession-0.5.13-ext2r1fs.mjs +0 -1
- package/dist/chunks/rename-0.5.13-c388bb34.mjs +0 -1
- package/dist/chunks/replBridgeHandle-0.5.13-d9e8m6a4.mjs +0 -1
- package/dist/chunks/replLauncher-0.5.13-q4xjb3n7.mjs +0 -1
- package/dist/chunks/resume-0.5.13-zwms595g.mjs +0 -2
- package/dist/chunks/rewind-0.5.13-nf9en5kj.mjs +0 -1
- package/dist/chunks/rootOptions-0.5.13-ys6f60ez.mjs +0 -1
- package/dist/chunks/sandbox-adapter-0.5.13-0kn0krrs.mjs +0 -1
- package/dist/chunks/sandbox-toggle-0.5.13-mbhkfqtx.mjs +0 -1
- package/dist/chunks/session-0.5.13-ef059m1s.mjs +0 -2
- package/dist/chunks/sessionDiscovery-0.5.13-rqf5h984.mjs +0 -1
- package/dist/chunks/sessionFileAccessHooks-0.5.13-skb8p6b9.mjs +0 -1
- package/dist/chunks/sessionStorage-0.5.13-hfsdsdg8.mjs +0 -1
- package/dist/chunks/settings-0.5.13-dvj3rntg.mjs +0 -1
- package/dist/chunks/setup-0.5.13-0qy4tjwk.mjs +0 -5
- package/dist/chunks/sinks-0.5.13-r38g34n1.mjs +0 -1
- package/dist/chunks/skills-0.5.13-zd2n7d2t.mjs +0 -1
- package/dist/chunks/startupProfiler-0.5.13-rvngf74z.mjs +0 -1
- package/dist/chunks/startupUpdateCheck-0.5.13-kepbkbnb.mjs +0 -1
- package/dist/chunks/state-0.5.13-9j8t0pbx.mjs +0 -1
- package/dist/chunks/stats-0.5.13-6083a1n1.mjs +0 -6
- package/dist/chunks/status-0.5.13-043z2z1k.mjs +0 -1
- package/dist/chunks/stickers-0.5.13-haw56t8e.mjs +0 -1
- package/dist/chunks/subprocessEnv-0.5.13-6fym13ah.mjs +0 -1
- package/dist/chunks/tasks-0.5.13-prxqgrk6.mjs +0 -1
- package/dist/chunks/teamHelpers-0.5.13-ea9wnqk5.mjs +0 -1
- package/dist/chunks/teammateModeSnapshot-0.5.13-fzz13a9m.mjs +0 -1
- package/dist/chunks/teleport-0.5.13-cwvgxg78.mjs +0 -1
- package/dist/chunks/terminalSetup-0.5.13-cswcvej0.mjs +0 -1
- package/dist/chunks/theme-0.5.13-yq4dm16b.mjs +0 -1
- package/dist/chunks/thinkback-0.5.13-gf1n5td1.mjs +0 -1
- package/dist/chunks/thinkback-play-0.5.13-fjwrqzd7.mjs +0 -1
- package/dist/chunks/toolPool-0.5.13-kt2xjpf7.mjs +0 -1
- package/dist/chunks/toolSearch-0.5.13-p0zpbh8d.mjs +0 -1
- package/dist/chunks/tools-0.5.13-jd6408d0.mjs +0 -1
- package/dist/chunks/trustedDevice-0.5.13-8vncqgx8.mjs +0 -1
- package/dist/chunks/turndown.cjs-0.5.13-0pxd6ddw.mjs +0 -69
- package/dist/chunks/ultrareviewCommand-0.5.13-5w0fawcq.mjs +0 -4
- package/dist/chunks/update-0.5.13-r5daertf.mjs +0 -86
- package/dist/chunks/upgrade-0.5.13-02ypar0z.mjs +0 -1
- package/dist/chunks/upstreamproxy-0.5.13-qxsd8pz8.mjs +0 -14
- package/dist/chunks/url-handler-napi-0.5.13-fvyp50k0.mjs +0 -1
- package/dist/chunks/usage-0.5.13-qzx2m9s9.mjs +0 -1
- package/dist/chunks/util-0.5.13-f4gpmja3.mjs +0 -1
- package/dist/chunks/utils-0.5.13-3qpq89q5.mjs +0 -1
- package/dist/chunks/vim-0.5.13-mg62q0nt.mjs +0 -1
- package/dist/chunks/watcher-0.5.13-q568pd2n.mjs +0 -1
- package/dist/chunks/wiki-0.5.13-yzex4wbz.mjs +0 -132
- package/dist/chunks/worktree-0.5.13-7q98jvfb.mjs +0 -1
- package/dist/chunks/worktreeModeEnabled-0.5.13-rhsc6esa.mjs +0 -1
- package/dist/chunks/wrapper-0.5.13-7xwpyrgq.mjs +0 -7
- /package/dist/chunks/{cli-0.5.13-c4q1pthh.mjs → cli-0.5.14-0603yw8e.mjs} +0 -0
- /package/dist/chunks/{cli-0.5.13-07hv5jdz.mjs → cli-0.5.14-erhk4f70.mjs} +0 -0
- /package/dist/chunks/{cli-0.5.13-epw9z05w.mjs → cli-0.5.14-jayg77dr.mjs} +0 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import{Wb as Mc,Xb as aa}from"./cli-0.5.14-t32fswzp.mjs";import{$b as Nc,Yb as bn,Zb as Zt,_b as Rt,bc as ua}from"./cli-0.5.14-xc847091.mjs";import{cc as Ct,fc as ca}from"./cli-0.5.14-c5w3y4bc.mjs";import{HF as Gn,IF as du,KF as ta,LF as na,MD as ot,ND as Qn,Po as Sc,Qo as xu,Qw as $c,Rw as Lc,Sw as ju,WD as Y,XD as mu,YD as vu,co as ic,cu as Fc,do as Qu,eo as ec,eu as Du,fo as oc,go as mc,ho as dc,io as I,jo as rn,ko as Gu,lE as xn,lo as _c,mE as qu,nE as Dn,no as wc,oE as jn,oo as qc,pE as vn,qE as Su,qo as Oc}from"./cli-0.5.14-jf3et57a.mjs";import{lV as qn,mV as Sn,nV as Fn,oV as $n,pV as Ln,qV as ou,tV as Nn,xV as Mn,yV as Xc,zV as Vn}from"./cli-0.5.14-ytt72j1r.mjs";import{$V as ct,bW as pu,jW as kc,kW as Iu}from"./cli-0.5.14-ya2ykcd6.mjs";import{DY as _n,YX as g,_X as l}from"./cli-0.5.14-r8f2hssc.mjs";import{a0 as et,b0 as a,c0 as y,d0 as Nt}from"./cli-0.5.14-tgeskqzs.mjs";import{e0 as Vt}from"./cli-0.5.14-anv6260e.mjs";import{B0 as uc,C0 as Mu}from"./cli-0.5.14-avm7rqss.mjs";import{S0 as Xn,U0 as eu}from"./cli-0.5.14-1d34ehpy.mjs";import{$ba as tt,Aca as nc,Bca as Cn,Dca as cc,Fca as zc,Gca as sn,Qba as Rc,Rba as yt,Sba as Pu,Tba as Kt,Uba as v,Uca as Bu,Wba as T,Xba as Jt,Zba as ft,_ba as on,aca as Ot,eca as gt,fca as mn,gca as dn,i7 as dt,j7 as Eu,kca as kn,pca as cn,qca as En,rca as Pn,sca as Qt,tca as un,uca as Bn,vca as nn,wca as pn,xca as In,yca as _u,zca as yn}from"./cli-0.5.14-ndq9rhn7.mjs";import{Fha as hn,xha as nt}from"./cli-0.5.14-p8gq7nq3.mjs";import{Koa as Mt,Loa as Uu,Ooa as p}from"./cli-0.5.14-hanfd2pz.mjs";function Cu(t,n=Dt,u){let h=v().find((i)=>i.provider==="openai"&&i.extras?.githubToken!==void 0);if(h)return Ot(h.id,{provider:"openai",name:h.name,baseUrl:u||h.baseUrl,model:h.model||n,apiKey:t,extras:{...h.extras,githubToken:t}}),gt(h.id),{mode:"updated"};return tt({provider:"openai",name:"GitHub Copilot",baseUrl:u||yu,model:n,apiKey:t,extras:{githubToken:t}},{makeActive:!0}),{mode:"created"}}function Yn({onDone:t,onBack:n,onChangeAPIKey:u}){let h=Nn()?.trim()?"already-authed":"menu",[i,m]=E.useState(h),[A,w]=E.useState(null),[z,b]=E.useState(""),[R,q]=E.useState(0),[L,Z]=E.useState(null),V=E.useCallback(async(Q,_=Dt,x,S)=>{let W=Mn(Q,x,S?.enterpriseDomain);if(!W.success){w(W.warning??"Could not save token to secure storage."),m("error");return}Cu(Q,_,S?.baseUrl),Xn(),u?.(),t("GitHub Copilot onboard complete. Copilot token stored in secure storage and as the active /provider profile.",{display:"user"})},[u,t]),C=E.useCallback(async(Q)=>{m("device-busy"),w(null),Z(null);try{let _=await Sn({domain:Q});Z({user_code:_.user_code,verification_uri:_.verification_uri}),await $n(_.verification_uri);let x=await Fn(_.device_code,{initialInterval:_.interval,timeoutSeconds:_.expires_in,domain:Q}),S=await Ln(x,{domain:Q});await V(S.token,Dt,x,{baseUrl:S.endpoints.api?.replace(/\/+$/,"")||void 0,enterpriseDomain:Q})}catch(_){w(_ instanceof Error?_.message:String(_)),m("error")}},[V]);if(i==="already-authed")return y(g,{flexDirection:"column",gap:1,children:[a(l,{bold:!0,children:"GitHub Copilot"}),a(l,{children:"You are already signed in to GitHub Copilot."}),a(l,{dimColor:!0,children:'Choose "Sign in again" to refresh your token, or go back to the provider menu.'}),a(Y,{options:[{label:"Sign in again",value:"sign-in-again"},{label:"Sign in with GitHub Enterprise",value:"enterprise"},{label:n?"Back to /provider menu":"Cancel",value:"back"}],onChange:(_)=>{if(_==="sign-in-again"){C();return}if(_==="enterprise"){m("enterprise-domain");return}if(n){n();return}t("GitHub onboard cancelled",{display:"system"})}})]});if(i==="enterprise-domain")return y(g,{flexDirection:"column",gap:1,children:[a(l,{bold:!0,children:"GitHub Enterprise sign-in"}),a(l,{dimColor:!0,children:"Enter your GitHub Enterprise domain (e.g. github.acme.com). Leave empty for github.com."}),y(g,{flexDirection:"row",gap:1,children:[a(l,{children:">"}),a(ot,{value:z,onChange:b,onSubmit:()=>{let _=qn(z);if(!_){C();return}C(_)},onExit:()=>m(h),focus:!0,showCursor:!0,placeholder:"github.acme.com",columns:80,cursorOffset:R,onChangeCursorOffset:q})]}),a(l,{dimColor:!0,children:"Press Enter to continue. Press Esc to go back."})]});if(i==="error"&&A)return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"red",children:A}),a(Y,{options:[{label:n?"Back to /provider menu":"Back to menu",value:"back"},{label:"Exit",value:"exit"}],onChange:(_)=>{if(_==="back"){if(n){n();return}m("menu"),w(null);return}t("GitHub onboard cancelled",{display:"system"})}})]});if(i==="device-busy")return y(g,{flexDirection:"column",gap:1,children:[a(l,{children:"GitHub Copilot sign-in"}),L?y(et,{children:[y(l,{children:["Enter code ",a(l,{bold:!0,children:L.user_code})," at"," ",L.verification_uri]}),a(l,{dimColor:!0,children:"A browser window may have opened. Waiting for authorization..."})]}):a(l,{dimColor:!0,children:"Requesting device code from GitHub..."}),a(Gn,{})]});return y(g,{flexDirection:"column",gap:1,children:[a(l,{bold:!0,children:"GitHub Copilot setup"}),a(l,{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."}),a(Y,{options:[{label:"Sign in with browser",value:"device"},{label:"Sign in with GitHub Enterprise",value:"enterprise"},{label:n?"Back to /provider menu":"Cancel",value:"cancel"}],onChange:(Q)=>{if(Q==="cancel"){if(n){n();return}t("GitHub onboard cancelled",{display:"system"});return}if(Q==="enterprise"){m("enterprise-domain");return}C()}})]})}var E,Dt="github:copilot",yu="https://api.githubcopilot.com";var Jn=p(()=>{mu();du();Qn();_n();ou();Vn();eu();kn();Nt();E=Mt(Vt(),1)});function Kn(t){return[t.name,t.family??"",...t.families??[],t.parameterSize??"",t.quantizationLevel??""].join(" ").toLowerCase()}function At(t,n){return n.some((u)=>t.includes(u))}function Ou(t){return!At(Kn(t),Zn)}function gu(t){return t.find(Ou)??null}function jt(t){let u=`${t.parameterSize??""} ${t.name}`.toLowerCase().match(/(\d+(?:\.\d+)?)\s*b\b/);if(u?.[1])return Number(u[1]);if(typeof t.sizeBytes==="number"&&t.sizeBytes>0)return Number((t.sizeBytes/1e9).toFixed(1));return null}function Au(t){return(t.quantizationLevel??t.name).toLowerCase()}function fu(t,n,u){if(t===null)return u.push("unknown size"),0;if(n==="latency"){if(t<=4)return u.push("tiny model for low latency"),32;if(t<=8)return u.push("small model for fast responses"),26;if(t<=14)return u.push("mid-sized model with acceptable latency"),16;if(t<=24)return u.push("larger model may be slower"),8;return u.push("large model likely slower locally"),t<=40?0:-8}if(n==="coding"){if(t>=7&&t<=14)return u.push("strong coding size tier"),24;if(t>14&&t<=34)return u.push("large coding-capable size tier"),28;if(t>34)return u.push("very large model with higher quality potential"),18;return u.push("compact model may trade off coding depth"),12}if(t>=7&&t<=14)return u.push("great balanced size tier"),26;if(t>=3&&t<7)return u.push("compact balanced size tier"),18;if(t>14&&t<=24)return u.push("high quality balanced size tier"),20;if(t>24)return u.push("large model for quality-first usage"),10;return u.push("very small model for general usage"),8}function Ru(t,n,u){let h=Au(t);if(h.includes("q4"))return u.push("efficient Q4 quantization"),n==="latency"?8:4;if(h.includes("q5"))return u.push("balanced Q5 quantization"),n==="latency"?6:5;if(h.includes("q8"))return u.push("higher quality Q8 quantization"),n==="latency"?2:5;return 0}function zu(t,n,u){if(n.score!==t.score)return n.score-t.score;let h=jt(t)??Number.POSITIVE_INFINITY,i=jt(n)??Number.POSITIVE_INFINITY;if(u==="latency")return h-i;if(u==="coding")return i-h;let m=14;return Math.abs(h-m)-Math.abs(i-m)}function vt(t,n){return t.map((u)=>{let h=Kn(u),i=[],m=0;if(At(h,Zn))m-=40,i.push("not a chat-first model");if(At(h,su))m+=n==="coding"?24:n==="balanced"?10:4,i.push("coding-oriented model family");if(At(h,bu))m+=n==="latency"?4:n==="coding"?6:8,i.push("strong general-purpose model family");if(At(h,wu))m+=n==="latency"?2:6,i.push("chat/instruct tuned");if(h.includes("vision")||h.includes("vl"))m-=2,i.push("vision model adds extra overhead");m+=fu(jt(u),n,i),m+=Ru(u,n,i);let A=i.slice(0,3).join(", ");return{...u,score:m,reasons:i,summary:A}}).sort((u,h)=>zu(u,h,n))}function Hn(t,n){return gu(vt(t,n))}var su,bu,wu,Zn;var Tn=p(()=>{su=["coder","codellama","codegemma","codestral","devstral","starcoder","deepseek-coder","qwen2.5-coder","qwen-coder"],bu=["llama","qwen","mistral","gemma","phi","deepseek"],wu=["instruct","chat","assistant"],Zn=["embed","embedding","rerank","bge","whisper"]});function Xu(t){let n=t.toLowerCase();return ku.some((u)=>n.includes(u))}function tn(t){try{let n=new URL(t);if(n.username)n.username="redacted";if(n.password)n.password="redacted";for(let u of n.searchParams.keys())if(Xu(u))n.searchParams.set(u,"redacted");return n.toString()}catch{return t.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 ku;var Wn=p(()=>{ku=["api_key","apikey","key","token","access_token","refresh_token","signature","sig","secret","password","passwd","pwd","auth","authorization"]});function Fu(t){let n=`http://localhost:${t.port}/auth/callback`,u=new URL(`${cn}/oauth/authorize`);return u.searchParams.append("response_type","code"),u.searchParams.append("client_id",un()),u.searchParams.append("redirect_uri",n),u.searchParams.append("scope",En),u.searchParams.append("code_challenge",t.codeChallenge),u.searchParams.append("code_challenge_method","S256"),u.searchParams.append("id_token_add_organizations","true"),u.searchParams.append("codex_cli_simplified_flow","true"),u.searchParams.append("state",t.state),u.searchParams.append("originator",Pn),u.toString()}function $u(){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 Lu(t){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>${pn(t)}</p>
|
|
31
|
+
<p>You can close this window and try again in Claudin.</p>
|
|
32
|
+
</body>
|
|
33
|
+
</html>`}function Un(){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 Nu(t){let n=`http://localhost:${t.port}/auth/callback`,u=new URLSearchParams({grant_type:"authorization_code",code:t.authorizationCode,redirect_uri:n,client_id:un(),code_verifier:t.codeVerifier}),h=await fetch(`${cn}/oauth/token`,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:u,signal:t.signal?AbortSignal.any([t.signal,AbortSignal.timeout(15000)]):AbortSignal.timeout(15000)});if(!h.ok){let b=await h.text().catch(()=>"");throw Error(b.trim()?`Codex OAuth token exchange failed (${h.status}): ${b.trim()}`:`Codex OAuth token exchange failed with status ${h.status}.`)}let i=await h.json(),m=Qt(i.access_token),A=Qt(i.refresh_token);if(!m||!A)throw Error("Codex OAuth completed, but the token response was missing credentials.");let w=Qt(i.id_token);return{apiKey:w?await In(w).catch(()=>{return}):void 0,accessToken:m,refreshToken:A,idToken:w,accountId:nn(w)??nn(m)}}class an{authCodeListener=null;port=null;tokenExchangeAbortController=null;buildCancellationError(){return Error("Codex OAuth flow was cancelled.")}async startOAuthFlow(t){let n=Dn(),u=Bn(),h=new xn("/auth/callback");this.authCodeListener=h,this.port=null;try{let i=await h.start(u);this.port=i;let m=vn(),A=await jn(n),w=Fu({port:i,codeChallenge:A,state:m});try{let z=await h.waitForAuthorization(m,async()=>{await t(w)}),b=new AbortController;this.tokenExchangeAbortController=b;let R;try{R=await Nu({authorizationCode:z,codeVerifier:n,port:i,signal:b.signal})}finally{if(this.tokenExchangeAbortController===b)this.tokenExchangeAbortController=null}if(this.authCodeListener!==h)throw this.buildCancellationError();return h.handleSuccessRedirect([],(q)=>{q.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),q.end($u())}),R}catch(z){let b=this.authCodeListener===h?z:this.buildCancellationError();if(h.hasPendingResponse()){let R=b instanceof Error&&b.message==="Codex OAuth flow was cancelled.";h.handleErrorRedirect((q)=>{q.writeHead(R?200:400,{"Content-Type":"text/html; charset=utf-8"}),q.end(R?Un():Lu(b instanceof Error?b.message:String(b)))})}throw b}finally{this.cleanup()}}catch(i){let m=i instanceof Error?i.message:String(i);if(m.includes("EADDRINUSE")||m.includes(String(u)))throw Error(`Codex OAuth needs localhost:${u} for its callback. Close any app already using that port and try again.`);throw i}}cleanup(){let t=this.buildCancellationError();if(this.tokenExchangeAbortController?.abort(t),this.tokenExchangeAbortController=null,this.authCodeListener?.hasPendingResponse())this.authCodeListener.handleErrorRedirect((n)=>{n.writeHead(200,{"Content-Type":"text/html; charset=utf-8"}),n.end(Un())});this.authCodeListener?.cancelPendingAuthorization(t),this.authCodeListener=null,this.port=null}}var tc=p(()=>{qu();Su();_u()});function Vu(){return new an}function ac(t){let{onAuthenticated:n}=t,u=t.deps?.createOAuthService??Vu,h=t.deps?.openBrowser??uc,i=t.deps?.saveCodexCredentials??nc,m=t.deps?.isBareMode??nt,[A,w]=Gt.useState({state:"starting"});return Gt.useEffect(()=>{if(m()){w({state:"error",message:"Codex OAuth is unavailable in --bare because secure storage is disabled."});return}let z=!1,b=u();return b.startOAuthFlow(async(R)=>{if(z)return;w({state:"waiting",authUrl:R,browserOpened:null});let q=await h(R);if(z)return;w({state:"waiting",authUrl:R,browserOpened:q})}).then(async(R)=>{if(z)return;await n(R,(L)=>{let Z=i({apiKey:R.apiKey,accessToken:R.accessToken,refreshToken:R.refreshToken,idToken:R.idToken,accountId:R.accountId,profileId:L?.profileId});if(!Z.success)throw Error(Z.warning??"Codex OAuth succeeded, but credentials could not be saved securely.")})}).catch((R)=>{if(z)return;w({state:"error",message:R instanceof Error?R.message:String(R)})}),()=>{z=!0,b.cleanup()}},[u,m,n,h,i]),A}var Gt;var hc=p(()=>{tc();Mu();cc();hn();Gt=Mt(Vt(),1)});function sc(){return{"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json","User-Agent":ic()}}function lc(t,n){let u=Number(t);return Number.isFinite(u)&&u>0?u*1000:n}function Ku(t,n){if(n?.aborted)return Promise.resolve();return new Promise((u)=>{let h=setTimeout(()=>{n?.removeEventListener("abort",i),u()},t),i=()=>{clearTimeout(h),u()};n?.addEventListener("abort",i,{once:!0})})}async function Hu(t){let n=t?.fetchImpl??fetch,u=t?.signal?AbortSignal.any([t.signal,AbortSignal.timeout(15000)]):AbortSignal.timeout(15000),h=await n(oc,{method:"POST",headers:sc(),body:new URLSearchParams({client_id:rn(),scope:dc}).toString(),signal:u});if(!h.ok){let z=await h.text().catch(()=>"");throw Error(`xAI device code request failed (${h.status})${z?`: ${z.trim()}`:""}`)}let i=await h.json(),m=I(i.device_code),A=I(i.user_code),w=I(i.verification_uri);if(!m||!A||!w)throw Error("xAI device code response is missing device_code / user_code / verification_uri.");return{device_code:m,user_code:A,verification_uri:w,verification_uri_complete:I(i.verification_uri_complete),expires_in:typeof i.expires_in==="number"&&i.expires_in>0?i.expires_in:Cc/1000,interval:typeof i.interval==="number"&&i.interval>0?i.interval:yc/1000}}async function Tu(t,n){let u=n?.fetchImpl??fetch,h=n?.sleep??Ku,i=n?.now??(()=>Date.now()),m=lc(t.expires_in,Cc),A=i()+m,w=Math.max(lc(t.interval,yc),Yu);while(i()<A){if(n?.signal?.aborted)throw Error("xAI device authorization was cancelled.");let z=await u(ec,{method:"POST",headers:sc(),body:new URLSearchParams({grant_type:mc,client_id:rn(),device_code:t.device_code}).toString(),signal:n?.signal});if(z.ok){let L=await z.json(),Z=I(L.access_token),V=I(L.refresh_token);if(!Z||!V)throw Error("xAI OAuth completed, but the token response was missing credentials.");let C=typeof L.expires_in==="number"&&Number.isFinite(L.expires_in)&&L.expires_in>0?L.expires_in:3600;return{accessToken:Z,refreshToken:V,idToken:I(L.id_token),expiresAt:i()+C*1000}}let b=await z.json().catch(()=>({})),R=Math.max(0,A-i());if(b.error==="authorization_pending"){await h(Math.min(w+rc,R),n?.signal);continue}if(b.error==="slow_down"){w=Math.min(w+Ju,Zu),await h(Math.min(w+rc,R),n?.signal);continue}if(b.error==="access_denied"||b.error==="authorization_denied")throw Error("xAI device authorization was denied.");if(b.error==="expired_token")throw Error("xAI device code expired - please re-run login.");let q=b.error_description??b.error??"";throw Error(`xAI device token exchange failed (${z.status})${q?`: ${q}`:""}`)}throw Error("xAI device authorization timed out.")}class ln{abortController=null;async startDeviceFlow(t){let n=new AbortController;this.abortController=n;try{let u=await Hu({signal:n.signal});return await t(u),await Tu(u,{signal:n.signal})}finally{if(this.abortController===n)this.abortController=null}}cleanup(){this.abortController?.abort(Error("xAI device authorization was cancelled.")),this.abortController=null}}var yc=5000,Yu=1000,Ju=5000,Zu=60000,Cc=300000,rc=3000;var bc=p(()=>{Qu();Gu()});function Wu(){return new ln}function gc(t){let{onAuthenticated:n}=t,u=t.deps?.createOAuthService??Wu,h=t.deps?.saveXaiCredentials??wc,i=t.deps?.isBareMode??nt,[m,A]=Yt.useState({state:"starting"});return Yt.useEffect(()=>{if(i()){A({state:"error",message:"xAI OAuth is unavailable in --bare because secure storage is disabled."});return}let w=!1,z=u();return z.startDeviceFlow(async(b)=>{if(w)return;A({state:"waiting",userCode:b.user_code,verificationUri:b.verification_uri,verificationUriComplete:b.verification_uri_complete})}).then(async(b)=>{if(w)return;await n(b,(q)=>{let L=h({accessToken:b.accessToken,refreshToken:b.refreshToken,idToken:b.idToken,expiresAt:b.expiresAt,profileId:q?.profileId});if(!L.success)throw Error(L.warning??"xAI OAuth succeeded, but credentials could not be saved securely.")})}).catch((b)=>{if(w)return;A({state:"error",message:b instanceof Error?b.message:String(b)})}),()=>{w=!0,z.cleanup()}},[u,i,n,h]),m}var Yt;var Ac=p(()=>{bc();hn();Oc();Yt=Mt(Vt(),1)});function ea(t){return{name:t.name,baseUrl:t.baseUrl,model:t.model,apiKey:t.apiKey??""}}function oa(t){let n=Kt(t);return{name:n.name,baseUrl:n.baseUrl,model:n.model,apiKey:n.apiKey??""}}function ma(t){let n={};for(let u of t.split(/\r?\n/)){let h=u.trim();if(!h)continue;let i=h.indexOf(":");if(i<=0)continue;let m=h.slice(0,i).trim(),A=h.slice(i+1).trim();if(m&&A)n[m]=A}return n}function da(t){if(!t)return"";return Object.entries(t).map(([n,u])=>`${n}: ${u}`).join(`
|
|
49
|
+
`)}function ya(t,n){let u={},h=t.awsRegion?.trim();if(h)u.awsRegion=h;let i=t.gcpProject?.trim();if(i)u.gcpProject=i;let m=t.gcpRegion?.trim();if(m)u.gcpRegion=m;let A=t.azureResource?.trim();if(A)u.azureResource=A;let w=ma(n);if(Object.keys(w).length>0)u.customHeaders=w;return Object.keys(u).length>0?u:void 0}function sa(t,n){let u=n?" (active)":"",h=t.apiKey?"key set":"no key",i=t.provider==="anthropic"?"anthropic":"openai-compatible",m=Rc(t.model),A=m.length<=3?m.join(", "):`${m[0]}, ${m[1]} + ${m.length-2} more`;return`${i} · ${t.baseUrl} · ${A} · ${h}${u}`}function ba(t,n){if(t.state==="unreachable")return`Could not reach Atomic Chat at ${tn(n)}. Start the Atomic Chat app first, or enter the endpoint manually.`;if(t.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 wa(t,n){if(t.state==="unreachable")return`Could not reach Ollama at ${tn(n)}. Start Ollama first, or enter the endpoint manually.`;if(t.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(t.state==="generation_failed"){let u=t.probeModel??"the selected model",h=t.detail?` Details: ${t.detail}.`:"";return`Ollama is reachable and models are installed, but a generation probe failed for ${u}.${h} Run "ollama run ${u}" once and retry, or enter details manually.`}return""}function en(t,n){if(!n)return;return t.find((u)=>u.id===n)}function fc(t,n){return Boolean(t&&n&&t.id===n)}function Oa({onBack:t,onConfigured:n}){let u=s.useCallback(async(i,m)=>{await n(i,m)},[n]);ct("confirm:no",t,[t]);let h=ac({onAuthenticated:u});if(h.state==="error")return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"error",bold:!0,children:"Codex OAuth failed"}),a(l,{children:h.message}),a(l,{dimColor:!0,children:"Press Enter or Esc to go back."}),a(Y,{options:[{value:"back",label:"Back",description:"Return to provider presets"}],onChange:t,onCancel:t,visibleOptionCount:1})]});return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:"Codex OAuth"}),a(l,{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."}),h.state==="starting"?a(l,{dimColor:!0,children:"Starting local callback and preparing your browser..."}):h.browserOpened===!1?y(et,{children:[a(l,{color:"warning",children:"Browser did not open automatically. Visit this URL to continue:"}),a(l,{children:h.authUrl})]}):h.browserOpened===!0?y(et,{children:[a(l,{dimColor:!0,children:"Browser opened. Finish the ChatGPT sign-in there and this setup will complete automatically."}),a(l,{children:h.authUrl})]}):a(l,{dimColor:!0,children:"Opening your browser..."}),a(l,{dimColor:!0,children:"Press Esc to cancel and go back."})]})}function ga({onBack:t,onConfigured:n}){let u=s.useCallback(async(i,m)=>{await n(i,m)},[n]);ct("confirm:no",t,[t]);let h=gc({onAuthenticated:u});if(h.state==="error")return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"error",bold:!0,children:"xAI OAuth failed"}),a(l,{children:h.message}),a(l,{dimColor:!0,children:"Press Enter or Esc to go back."}),a(Y,{options:[{value:"back",label:"Back",description:"Return to provider presets"}],onChange:t,onCancel:t,visibleOptionCount:1})]});return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:"xAI / Grok OAuth"}),h.state==="starting"?a(l,{dimColor:!0,children:"Requesting a device code from xAI..."}):y(et,{children:[y(l,{children:["Open this URL on any device:"," ",a(l,{bold:!0,children:h.verificationUri})]}),y(l,{children:["Enter code ",a(l,{bold:!0,children:h.userCode})]}),h.verificationUriComplete&&h.verificationUriComplete!==h.verificationUri?y(l,{dimColor:!0,children:["Or open this prefilled URL: ",h.verificationUriComplete]}):null,a(l,{dimColor:!0,children:"Waiting for you to authorize in the browser..."})]}),a(l,{dimColor:!0,children:"Press Esc to cancel and go back."})]})}function gh({mode:t,onDone:n}){let u=Fc(),[h,i]=s.useState([]),[m,A]=s.useState(),[w,z]=s.useState(),[b,R]=s.useState(!1),[q,L]=s.useState(),Z=s.useRef(0),[V,C]=s.useState(t==="first-run"?"select-preset":"menu"),[ut,Q]=s.useState(null),[_,x]=s.useState("openai"),[S,W]=s.useState(()=>oa("ollama")),[Ht,zt]=s.useState({}),[wn,Tt]=s.useState(""),[Vc,Qc]=s.useState(0),[Gc,Yc]=s.useState(0),[Wt,On]=s.useState(null),[at,st]=s.useState(0),[ht,D]=s.useState(0),[Jc,j]=s.useState(0),[gn,N]=s.useState(),[rt,f]=s.useState(),[Zc,Kc]=s.useState(),[An,kt]=s.useState(!1),[bt,wt]=s.useState(),[P,Xt]=s.useState({state:"idle"}),[B,_t]=s.useState({state:"idle"}),[Hc,Tc]=s.useState(!0),[Wc,H]=s.useState(!1),Ut=s.useRef(!1),[Et,Pt]=s.useState(()=>Rt()),[fn,Uc]=s.useState(()=>Nc());s.useEffect(()=>{queueMicrotask(()=>{let c=v(),r=T()?.id;i(c),A(r),z(Jt()),L(on()),R(ft()),Tc(!1)})},[]);let lt=mt[ht]??mt[0],qt=lt.key,Ec=S[qt],Bt=h.length>0,St=Bt,Rn=s.useMemo(()=>[{value:"add",label:"Add provider",description:"Create a new provider profile"},...Et?[{value:"import-legacy",label:"Import from Claude Code",description:"Copy ~/.claude/ tokens, settings, skills, agents, plugins."}]:[],{value:"activate",label:"Set active provider (Global)",description:q?`Currently: ${h.find((c)=>c.id===q)?.name??"unknown"}`:"Default profile for projects without an override",disabled:!St},{value:"activate-project",label:"Set active provider (Project)",description:w?`Currently: ${h.find((c)=>c.id===w)?.name??"unknown"} (this project)`:"Override the global default for this project only",disabled:!St},...b?[{value:"clear-project-override",label:"Clear project provider override",description:w?"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:!Bt},{value:"delete",label:"Delete provider",description:"Remove a provider profile",disabled:!St},...An?[{value:"logout-codex-oauth",label:"Log out Codex OAuth",description:"Clear securely stored Codex OAuth credentials"}]:[],{value:"done",label:"Done",description:"Return to chat"}],[St,Bt,An,Et,q,w,h]),pt=s.useCallback(()=>{if(nt()){Z.current+=1,kt(!1),wt(void 0);return}let c=++Z.current;(async()=>{let r=await yn();if(c!==Z.current)return;kt(Boolean(r?.apiKey||r?.accessToken||r?.refreshToken||r?.idToken)),wt(r?.profileId)})()},[]);s.useEffect(()=>{return pt(),()=>{Z.current+=1}},[pt]),s.useEffect(()=>{if(V!=="select-ollama-model")return;let c=!1;return Xt({state:"loading"}),(async()=>{let r=await Lc({baseUrl:S.baseUrl});if(r.state!=="ready"){if(!c)Xt({state:"unavailable",message:wa(r,S.baseUrl)});return}let o=vt(r.models,"balanced"),e=Hn(r.models,"balanced");if(!c)Xt({state:"ready",defaultValue:e?.name??o[0]?.name,options:o.map((d)=>({label:d.name,value:d.name,description:d.summary}))})})(),()=>{c=!0}},[S.baseUrl,V]),s.useEffect(()=>{if(V!=="select-atomic-chat-model")return;let c=!1;return _t({state:"loading"}),(async()=>{let r=await $c({baseUrl:S.baseUrl});if(r.state!=="ready"){if(!c)_t({state:"unavailable",message:ba(r,S.baseUrl)});return}if(!c)_t({state:"ready",defaultValue:r.models[0],options:r.models.map((o)=>({label:o,value:o}))})})(),()=>{c=!0}},[S.baseUrl,V]);function M(){if(Ut.current)return;Ut.current=!0,queueMicrotask(()=>{let c=v();i(c),A(T()?.id),z(Jt()),L(on()),R(ft()),pt(),Ut.current=!1})}function it(){return null}function It(c){if(c.activationWarning)return`${c.prefix}. Saved for next startup. Warning: ${c.warnings.join("; ")}.`;if(c.warnings.length>0)return`${c.prefix}. Claudin switched to it for this session with warnings: ${c.warnings.join("; ")}.`;return`${c.prefix}. Claudin switched to it for this session.`}async function xt(c){if(c?.accessToken&&c.accountId)return null;let r=await yn();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 zn(){Sc()}async function Pc(c){let r="provider";H(!0),N("Activating provider...");try{await new Promise((U)=>queueMicrotask(U));let o=ft(),e=gt(c);if(!e){f("Could not change active provider."),H(!1),k();return}let d=o?T()??e:e,O=yt(d.model);if(!o)u((U)=>({...U,mainLoopModel:O,mainLoopModelForSession:null}));r=e.name;let X=it(),J=fc(e,bt),$=J?await xt():null;M();let K=o&&d.id!==e.id?` (project override still active — this project keeps using ${d.name}; use "Clear project provider override" to apply the new default here)`:"",F=J?It({prefix:`Active provider: ${e.name}${K}`,activationWarning:$,warnings:[$,X?`could not clear startup provider override (${X})`:null].filter((U)=>Boolean(U))}):X?`Active provider: ${e.name}${K}. Warning: could not clear startup provider override (${X}).`:`Active provider: ${e.name}${K}`;N(F),H(!1),n({action:"activated",activeProfileId:e.id,activeProviderName:e.name,activeProviderModel:O,message:`Provider switched to ${e.name} (${O})`}),k()}catch(o){M(),N(void 0),H(!1);let e=o instanceof Error?o.message:String(o);f(`Could not finish activating ${r}: ${e}`),k()}}async function Bc(){H(!0),N("Clearing project provider override...");try{await new Promise((r)=>queueMicrotask(r)),mn(null),M();let c=T();if(c){let r=yt(c.model);Ct(),u((o)=>({...o,mainLoopModel:r,mainLoopModelForSession:null})),N(`Project override cleared. Using global default: ${c.name}.`),H(!1),n({action:"activated",activeProfileId:c.id,activeProviderName:c.name,activeProviderModel:r,message:`Project override cleared — using ${c.name} (${r})`}),k()}else N("Project provider override cleared. No global default set."),H(!1),n({action:"saved",message:"Project provider override cleared. No global default set."}),k()}catch(c){M(),N(void 0),H(!1);let r=c instanceof Error?c.message:String(c);f(`Could not clear project provider override: ${r}`),k()}}async function pc(c){let r="provider";H(!0),N("Setting provider for this project...");try{await new Promise((F)=>queueMicrotask(F));let o=Jt(),e=mn(c);if(!e){f("Could not set project provider override."),H(!1),k();return}let d=yt(e.model);if(o===e.id)Ct();u((F)=>({...F,mainLoopModel:d,mainLoopModelForSession:null})),r=e.name;let O=it(),X=fc(e,bt),J=X?await xt():null;M();let $=`Active provider for this project: ${e.name}. Other projects keep the global default.`,K=X?It({prefix:$,activationWarning:J,warnings:[J,O?`could not clear startup provider override (${O})`:null].filter((F)=>Boolean(F))}):O?`${$} Warning: could not clear startup provider override (${O}).`:$;N(K),H(!1),n({action:"activated",activeProfileId:e.id,activeProviderName:e.name,activeProviderModel:d,message:`Provider switched to ${e.name} (${d}) for this project`}),k()}catch(o){M(),N(void 0),H(!1);let e=o instanceof Error?o.message:String(o);f(`Could not finish setting ${r} for this project: ${e}`),k()}}function k(){Kc("done"),C("menu")}function Ft(c){n({action:"cancelled",message:c})}function Ic(c){let r=Kt(c),o={name:r.name,baseUrl:r.baseUrl,model:r.model,apiKey:r.apiKey??""};if(Q(null),x(r.provider??"openai"),W(o),zt({}),Tt(""),On(c),D(0),st(0),j(o.name.length),f(void 0),c==="ollama"){Xt({state:"loading"}),C("select-ollama-model");return}if(c==="atomic-chat"){_t({state:"loading"}),C("select-atomic-chat-model");return}if(c==="anthropic"){C("anthropic-auth-choice");return}if(c==="bedrock"||c==="vertex"||c==="foundry"){C("cloud-extras");return}C("form")}function xc(c){let r=h.find((e)=>e.id===c);if(!r)return;let o=ea(r);Q(c),x(r.provider??"openai"),W(o),zt({awsRegion:r.extras?.awsRegion,gcpProject:r.extras?.gcpProject,gcpRegion:r.extras?.gcpRegion,azureResource:r.extras?.azureResource}),Tt(da(r.extras?.customHeaders)),On(null),D(0),st(0),j(o.name.length),f(void 0),C("form")}function $t(c=S){let r=ya(Ht,wn),o={provider:_,name:c.name,baseUrl:c.baseUrl,model:c.model,apiKey:c.apiKey,extras:r},e=ut?Ot(ut,o):tt(o,{makeActive:!0});if(!e){f("Could not save provider. Fill all required fields.");return}let d=T()?.id===e.id;if(d)Ct(),u((K)=>({...K,mainLoopModel:yt(e.model),mainLoopModelForSession:null}));let O=d?it():null;M();let X=!ut&&ft()&&!d,J=X?T()?.name??"override target":null,$=ut?`Updated provider: ${e.name}`:X?`Added provider: ${e.name} (now global default — project keeps using ${J}; use "Clear project provider override" to apply here)`:`Added provider: ${e.name} (now active)`;if(N(O?`${$}. Warning: could not clear startup provider override (${O}).`:$),t==="first-run"){n({action:"saved",activeProfileId:e.id,message:`Provider configured: ${e.name}`});return}Q(null),D(0),f(void 0),k()}function Dc(){if(B.state==="loading"||B.state==="idle")return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:"Checking Atomic Chat"}),a(l,{dimColor:!0,children:"Looking for loaded Atomic Chat models..."})]});if(B.state==="unavailable")return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:"Atomic Chat setup"}),a(l,{dimColor:!0,children:B.message}),a(Y,{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:(c)=>{if(c==="manual"){D(0),j(S.name.length),C("form");return}C("select-preset")},onCancel:()=>C("select-preset"),visibleOptionCount:2})]});return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:"Choose an Atomic Chat model"}),a(l,{dimColor:!0,children:"Pick one of the models loaded in Atomic Chat to save into a local provider profile."}),a(Y,{options:B.options,defaultValue:B.defaultValue,defaultFocusValue:B.defaultValue,inlineDescriptions:!0,visibleOptionCount:Math.min(8,B.options.length),onChange:(c)=>{let r={...S,model:c};W(r),$t(r)},onCancel:()=>C("select-preset")})]})}function jc(){if(P.state==="loading"||P.state==="idle")return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:"Checking Ollama"}),a(l,{dimColor:!0,children:"Looking for installed Ollama models..."})]});if(P.state==="unavailable")return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:"Ollama setup"}),a(l,{dimColor:!0,children:P.message}),a(Y,{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:(c)=>{if(c==="manual"){D(0),j(S.name.length),C("form");return}C("select-preset")},onCancel:()=>C("select-preset"),visibleOptionCount:2})]});return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:"Choose an Ollama model"}),a(l,{dimColor:!0,children:"Pick one of the installed Ollama models to save into a local provider profile."}),a(Y,{options:P.options,defaultValue:P.defaultValue,defaultFocusValue:P.defaultValue,inlineDescriptions:!0,visibleOptionCount:Math.min(8,P.options.length),onChange:(c)=>{let r={...S,model:c};W(r),$t(r)},onCancel:()=>C("select-preset")})]})}function vc(c){let r=c.trim();if(!lt.optional&&r.length===0){f(`${lt.label} is required.`);return}let o={...S,[qt]:r};if(W(o),f(void 0),ht<mt.length-1){let e=ht+1,d=mt[e]?.key??"name";D(e),j(o[d].length);return}if((Wt==="anthropic"||Wt==="custom")&&V==="form"){W(o),C("custom-headers");return}$t(o)}function tu(){if(f(void 0),ht>0){let c=ht-1,r=mt[c]?.key??"name";D(c),j(S[r].length);return}if(t==="first-run"){C("select-preset");return}k()}ct("confirm:no",tu,{context:"Settings",isActive:V==="form"});function nu(){if(f(void 0),at>0){st(at-1);return}C("select-preset")}ct("confirm:no",nu,{context:"Settings",isActive:V==="cloud-extras"}),ct("confirm:no",()=>C("form"),{context:"Settings",isActive:V==="custom-headers"}),ct("confirm:no",()=>C("select-preset"),{context:"Settings",isActive:V==="anthropic-auth-choice"||V==="anthropic-oauth"});function cu(){let c=!nt(),r=[...Et?[{value:"import-legacy",label:"Import from Claude Code",description:"Reuse ~/.claude/ tokens, settings, theme, MCP, skills, agents, plugins."}]:[],{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)"},...c?[{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 - API",description:"Moonshot AI - API endpoint"},{value:"kimi-code",label:"Moonshot AI - Kimi Code",description:"Moonshot AI - Kimi Code Subscription endpoint"},{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:"custom",label:"Custom",description:"Any OpenAI-compatible provider"},...t==="first-run"?[{value:"skip",label:"Skip for now",description:"Continue with current defaults"}]:[]];return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:t==="first-run"?"Set up provider":"Choose provider preset"}),a(l,{dimColor:!0,children:"Pick a preset, then confirm base URL, model, and API key."}),a(Y,{options:r,onChange:(o)=>{if(o==="skip"){Ft("Provider setup skipped");return}if(o==="codex-oauth"){C("codex-oauth");return}if(o==="xai-oauth"){C("xai-oauth");return}if(o==="github-onboard"){C("github-onboard");return}if(o==="import-legacy"){(async()=>{let e=await bn({force:!0});Pt(Rt()),M();let d=Zt(e);if(e.errors.length>0){f(d);return}let O=T();if(t==="first-run"&&O){n({action:"saved",activeProfileId:O.id,activeProviderName:O.name,activeProviderModel:O.model,message:d});return}if(N(d),f(void 0),t==="manage")k()})();return}Ic(o)},onCancel:()=>{if(t==="first-run"){Ft("Provider setup skipped");return}k()},visibleOptionCount:Math.min(13,r.length)})]})}function uu(){return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:"Anthropic — choose authentication"}),a(l,{dimColor:!0,children:"Sign in with your Anthropic account in the browser, or paste an API key."}),a(Y,{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:(c)=>{if(c==="oauth"){C("anthropic-oauth");return}if(c==="apiKey"){C("form");return}C("select-preset")},onCancel:()=>C("select-preset"),visibleOptionCount:3})]})}function au(){let c=(na(),Uu(ta)).ConsoleOAuthFlow;return a(g,{flexDirection:"column",gap:1,children:a(c,{mode:"login",onDone:()=>{let r=Kt("anthropic"),o={provider:"anthropic",name:r.name,baseUrl:r.baseUrl,model:r.model},e=tt(o,{makeActive:!0});if(!e){f("OAuth completed, but the Anthropic profile could not be saved."),C("select-preset");return}let d=`Anthropic OAuth configured: ${e.name}`;if(M(),t==="first-run"){n({action:"saved",activeProfileId:e.id,message:d});return}N(d),f(void 0),k()}})})}function hu(){let c=Wt;if(c!=="bedrock"&&c!=="vertex"&&c!=="foundry")return null;let r=Ca[c],o=r[at]??r[0],e=Ht[o.key]??"";function d(O){let X=O.trim();if(X.length===0){f(`${o.label} is required.`);return}let J={...Ht,[o.key]:X};if(zt(J),f(void 0),at<r.length-1){st(at+1);return}st(0),C("form")}return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:`${c==="bedrock"?"AWS Bedrock":c==="vertex"?"Google Vertex AI":"Azure AI Foundry"} setup`}),a(l,{dimColor:!0,children:o.helpText}),y(l,{dimColor:!0,children:["Step ",at+1," of ",r.length,": ",o.label]}),y(g,{flexDirection:"row",gap:1,children:[a(l,{children:dt.pointer}),a(ot,{value:e,onChange:(O)=>zt((X)=>({...X,[o.key]:O})),onSubmit:d,focus:!0,showCursor:!0,placeholder:`${o.placeholder}${dt.ellipsis}`,columns:80,cursorOffset:Vc,onChangeCursorOffset:Qc})]}),rt&&a(l,{color:"error",children:rt}),a(l,{dimColor:!0,children:"Press Enter to continue. Press Esc to go back."})]})}function ru(){return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:"Custom headers (optional)"}),y(l,{dimColor:!0,children:["Add HTTP headers sent on every request. One header per line as"," ",a(l,{children:"Header: Value"}),". Leave empty to skip."]}),y(g,{flexDirection:"row",gap:1,children:[a(l,{children:dt.pointer}),a(ot,{value:wn,onChange:Tt,onSubmit:()=>$t(S),focus:!0,showCursor:!0,placeholder:"X-Header: value",columns:80,multiline:!0,cursorOffset:Gc,onChangeCursorOffset:Yc})]}),rt&&a(l,{color:"error",children:rt}),a(l,{dimColor:!0,children:"Press Enter on a blank line to save. Press Esc to go back."})]})}function lu(){return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:ut?"Edit provider profile":"Create provider profile"}),a(l,{dimColor:!0,children:lt.helpText}),y(l,{dimColor:!0,children:["Provider type:"," ",_==="anthropic"?"Anthropic native API":"OpenAI-compatible API"]}),y(l,{dimColor:!0,children:["Step ",ht+1," of ",mt.length,": ",lt.label]}),y(g,{flexDirection:"row",gap:1,children:[a(l,{children:dt.pointer}),a(ot,{value:Ec,onChange:(c)=>W((r)=>({...r,[qt]:c})),onSubmit:vc,focus:!0,showCursor:!0,placeholder:`${lt.placeholder}${dt.ellipsis}`,mask:qt==="apiKey"?"*":void 0,columns:80,cursorOffset:Jc,onChangeCursorOffset:j})]}),rt&&a(l,{color:"error",children:rt}),a(l,{dimColor:!0,children:"Press Enter to continue. Press Esc to go back."})]})}function iu(){let c=h.length>0,r=c;return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:"Provider manager"}),a(l,{dimColor:!0,children:"Active profile controls base URL, model, and API key used by this session."}),gn&&a(l,{children:gn}),a(g,{flexDirection:"column",children:h.length===0?a(l,{dimColor:!0,children:"No provider profiles configured yet."}):h.map((o)=>y(l,{dimColor:!0,children:["- ",o.name,": ",sa(o,o.id===m)]},o.id))}),a(Y,{options:Rn,onChange:(o)=>{switch(f(void 0),o){case"add":C("select-preset");break;case"import-legacy":{(async()=>{let e=await bn({force:!0});if(Pt(Rt()),M(),e.errors.length>0)f(Zt(e));else N(Zt(e))})();break}case"activate":if(r)C("select-active");break;case"activate-project":if(r)C("select-active-project");break;case"clear-project-override":Bc();break;case"edit":if(c)C("select-edit");break;case"delete":if(r)C("select-delete");break;case"logout-codex-oauth":{let e=Cn();if(!e.success){f(e.warning??"Could not clear Codex OAuth credentials.");break}kt(!1),wt(void 0);let d=en(v(),bt),O=null;if(d){let X=dn(d.id);if(!X.removed){f("Codex OAuth credentials were cleared, but the Codex profile could not be removed."),M();break}zn(),O=X.activeProfileId?it():null}M(),N(O?`Codex OAuth logged out. Warning: could not clear startup provider override (${O}).`:"Codex OAuth logged out.");break}default:Ft("Provider manager closed");break}},onCancel:()=>Ft("Provider manager closed"),defaultFocusValue:Zc,visibleOptionCount:Rn.length})]})}function Lt(c,r,o){let e=h.map((d)=>{let O=[];if(d.id===m)O.push("active");if(w&&d.id===w)O.push("this project");if(q&&d.id===q)O.push("global default");let X=O.length>0?` (${O.join(", ")})`:"";return{value:d.id,label:`${d.name}${X}`,description:`${d.provider==="anthropic"?"anthropic":"openai-compatible"} · ${d.baseUrl} · ${d.model}`}});if(e.length===0)return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:c}),a(l,{dimColor:!0,children:r}),a(Y,{options:[{value:"back",label:"Back",description:"Return to provider manager"}],onChange:()=>k(),onCancel:()=>k(),visibleOptionCount:1})]});return y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:c}),a(Y,{options:e,onChange:o,onCancel:()=>k(),visibleOptionCount:Math.min(10,Math.max(2,e.length))})]})}let G;switch(V){case"select-preset":G=cu();break;case"select-ollama-model":G=jc();break;case"select-atomic-chat-model":G=Dc();break;case"codex-oauth":G=a(Oa,{onBack:()=>C("select-preset"),onConfigured:async(c,r)=>{let o={provider:"openai",name:ha,baseUrl:zc,model:ra,apiKey:""},e=en(v(),bt),d=e?Ot(e.id,o):tt(o,{makeActive:!0});if(!d){f("Codex OAuth login finished, but the provider profile could not be saved."),k();return}let O=e&&m!==d.id?gt(d.id):d;if(!O){f("Codex OAuth login finished, but the provider could not be set as the startup provider."),k();return}r({profileId:d.id});let X=it(),J=await xt(c);kt(!0),wt(d.id),M();let $=[J,X?`could not clear startup provider override (${X})`:null].filter((F)=>Boolean(F)),K=It({prefix:"Codex OAuth configured",activationWarning:J,warnings:$});if(t==="first-run"){n({action:"saved",activeProfileId:O.id,message:K});return}N(K),f(void 0),k()}});break;case"xai-oauth":G=a(ga,{onBack:()=>C("select-preset"),onConfigured:async(c,r)=>{let e=tt({provider:"openai",name:la,baseUrl:sn,model:ia,apiKey:""},{makeActive:!0});if(!e){f("xAI OAuth login finished, but the provider profile could not be saved."),k();return}try{r({profileId:e.id})}catch(O){f(O instanceof Error?O.message:String(O)),k();return}M();let d="xAI / Grok configured. Claudin switched to it for this session.";if(t==="first-run"){n({action:"saved",activeProfileId:e.id,message:d});return}N(d),f(void 0),k()}});break;case"github-onboard":G=a(Yn,{onDone:(c)=>{if(c)N(c),f(void 0);M(),k()},onBack:()=>C("select-preset"),onChangeAPIKey:M});break;case"anthropic-auth-choice":G=uu();break;case"anthropic-oauth":G=au();break;case"cloud-extras":G=hu();break;case"custom-headers":G=ru();break;case"form":G=lu();break;case"select-active":G=Lt("Set active provider (Global)","No providers available. Add one first.",(c)=>{Pc(c)});break;case"select-active-project":G=Lt("Set active provider (Project)","No providers available. Add one first.",(c)=>{pc(c)});break;case"select-edit":G=Lt("Edit provider","No providers available. Add one first.",(c)=>{xc(c)});break;case"select-delete":G=Lt("Delete provider","No providers available. Add one first.",(c)=>{let r=h.find(($)=>$.id===c),o=r?.provider==="openai"&&r?.extras?.githubToken!==void 0,e=en(h,bt)?.id===c,d=_c()?.profileId,O=r?.provider==="openai"&&r.baseUrl===sn&&!r.apiKey&&d===c,X=T()?.id===c,J=dn(c);if(!J.removed)f("Could not delete provider.");else{let $=[];if(e){let F=Cn();if(!F.success)$.push(F.warning??"could not clear Codex OAuth credentials");else wt(void 0);zn()}if(o){let F=Xc();if(!F.success)$.push(F.warning??"could not clear GitHub Copilot token")}if(O){let F=qc();if(!F.success)$.push(F.warning??"could not clear xAI OAuth credentials")}let K=J.activeProfileId?it():null;if(K)$.push(`could not clear startup provider override (${K})`);if(M(),X){let F=T();if(F)Ct(),u((U)=>({...U,mainLoopModel:yt(F.model),mainLoopModelForSession:null}));else Ct(),u((U)=>({...U,mainLoopModel:null,mainLoopModelForSession:null}))}N($.length>0?`Provider deleted. Warning: ${$.join("; ")}.`:"Provider deleted")}k()});break;case"menu":default:G=iu();break}return y(kc,{color:"permission",children:[a(Mc,{enabled:fn,onDismiss:(c)=>{Pt(Rt()),Uc(!1),M();let r=T();if(c==="migrated"&&t==="first-run"&&r)n({action:"saved",activeProfileId:r.id,activeProviderName:r.name,activeProviderModel:r.model})}}),fn?null:Hc?y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:"Loading providers..."}),a(l,{dimColor:!0,children:"Reading provider profiles from disk."})]}):Wc?y(g,{flexDirection:"column",gap:1,children:[a(l,{color:"remember",bold:!0,children:"Activating provider..."}),a(l,{dimColor:!0,children:"Please wait while the provider is being configured."})]}):G]})}var s,mt,ha="Codex OAuth",ra="codexplan",la="xAI / Grok (OAuth)",ia="grok-4",Ca;var Aa=p(()=>{Eu();Jn();Bu();_n();pu();Du();ca();cc();hn();Pu();xu();kn();Vn();ju();Tn();Wn();vu();Iu();aa();Qn();hc();Ac();Oc();ua();Nt();s=Mt(Vt(),1),mt=[{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:"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.'},{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}];Ca={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."}]}});
|
|
50
|
+
export{tn as Rb,Wn as Sb,ma as Tb,gh as Ub,Aa as Vb};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{Ooa as j}from"./cli-0.5.14-hanfd2pz.mjs";function c(){let q=new Map;for(let[V,z]of Object.entries(J)){for(let[D,H]of Object.entries(z))J[D]={open:`\x1B[${H[0]}m`,close:`\x1B[${H[1]}m`},z[D]=J[D],q.set(H[0],H[1]);Object.defineProperty(J,V,{value:z,enumerable:!1})}return Object.defineProperty(J,"codes",{value:q,enumerable:!1}),J.color.close="\x1B[39m",J.bgColor.close="\x1B[49m",J.color.ansi=M(),J.color.ansi256=Y(),J.color.ansi16m=k(),J.bgColor.ansi=M(10),J.bgColor.ansi256=Y(10),J.bgColor.ansi16m=k(10),Object.defineProperties(J,{rgbToAnsi256:{value(V,z,D){if(V===z&&z===D){if(V<8)return 16;if(V>248)return 231;return Math.round((V-8)/247*24)+232}return 16+36*Math.round(V/255*5)+6*Math.round(z/255*5)+Math.round(D/255*5)},enumerable:!1},hexToRgb:{value(V){let z=/[a-f\d]{6}|[a-f\d]{3}/i.exec(V.toString(16));if(!z)return[0,0,0];let[D]=z;if(D.length===3)D=[...D].map((Q)=>Q+Q).join("");let H=Number.parseInt(D,16);return[H>>16&255,H>>8&255,H&255]},enumerable:!1},hexToAnsi256:{value:(V)=>J.rgbToAnsi256(...J.hexToRgb(V)),enumerable:!1},ansi256ToAnsi:{value(V){if(V<8)return 30+V;if(V<16)return 90+(V-8);let z,D,H;if(V>=232)z=((V-232)*10+8)/255,D=z,H=z;else{V-=16;let N=V%36;z=Math.floor(V/36)/5,D=Math.floor(N/6)/5,H=N%6/5}let Q=Math.max(z,D,H)*2;if(Q===0)return 30;let U=30+(Math.round(H)<<2|Math.round(D)<<1|Math.round(z));if(Q===2)U+=60;return U},enumerable:!1},rgbToAnsi:{value:(V,z,D)=>J.ansi256ToAnsi(J.rgbToAnsi256(V,z,D)),enumerable:!1},hexToAnsi:{value:(V)=>J.ansi256ToAnsi(J.hexToAnsi256(V)),enumerable:!1}}),J}var M=(q=0)=>(V)=>`\x1B[${V+q}m`,Y=(q=0)=>(V)=>`\x1B[${38+q};5;${V}m`,k=(q=0)=>(V,z,D)=>`\x1B[${38+q};2;${V};${z};${D}m`,J,V1,u,m,q1,p,X;var R=j(()=>{J={modifier:{reset:[0,0],bold:[1,22],dim:[2,22],italic:[3,23],underline:[4,24],overline:[53,55],inverse:[7,27],hidden:[8,28],strikethrough:[9,29]},color:{black:[30,39],red:[31,39],green:[32,39],yellow:[33,39],blue:[34,39],magenta:[35,39],cyan:[36,39],white:[37,39],blackBright:[90,39],gray:[90,39],grey:[90,39],redBright:[91,39],greenBright:[92,39],yellowBright:[93,39],blueBright:[94,39],magentaBright:[95,39],cyanBright:[96,39],whiteBright:[97,39]},bgColor:{bgBlack:[40,49],bgRed:[41,49],bgGreen:[42,49],bgYellow:[43,49],bgBlue:[44,49],bgMagenta:[45,49],bgCyan:[46,49],bgWhite:[47,49],bgBlackBright:[100,49],bgGray:[100,49],bgGrey:[100,49],bgRedBright:[101,49],bgGreenBright:[102,49],bgYellowBright:[103,49],bgBlueBright:[104,49],bgMagentaBright:[105,49],bgCyanBright:[106,49],bgWhiteBright:[107,49]}},V1=Object.keys(J.modifier),u=Object.keys(J.color),m=Object.keys(J.bgColor),q1=[...u,...m];p=c(),X=p});import I from"node:process";import d from"node:os";import E from"node:tty";function W(q,V=globalThis.Deno?globalThis.Deno.args:I.argv){let z=q.startsWith("-")?"":q.length===1?"-":"--",D=V.indexOf(z+q),H=V.indexOf("--");return D!==-1&&(H===-1||D<H)}function y(){if("FORCE_COLOR"in K){if(K.FORCE_COLOR==="true")return 1;if(K.FORCE_COLOR==="false")return 0;return K.FORCE_COLOR.length===0?1:Math.min(Number.parseInt(K.FORCE_COLOR,10),3)}}function g(q){if(q===0)return!1;return{level:q,hasBasic:!0,has256:q>=2,has16m:q>=3}}function i(q,{streamIsTTY:V,sniffFlags:z=!0}={}){let D=y();if(D!==void 0)B=D;let H=z?B:D;if(H===0)return 0;if(z){if(W("color=16m")||W("color=full")||W("color=truecolor"))return 3;if(W("color=256"))return 2}if("TF_BUILD"in K&&"AGENT_NAME"in K)return 1;if(q&&!V&&H===void 0)return 0;let Q=H||0;if(K.TERM==="dumb")return Q;if(I.platform==="win32"){let U=d.release().split(".");if(Number(U[0])>=10&&Number(U[2])>=10586)return Number(U[2])>=14931?3:2;return 1}if("CI"in K){if(["GITHUB_ACTIONS","GITEA_ACTIONS","CIRCLECI"].some((U)=>(U in K)))return 3;if(["TRAVIS","APPVEYOR","GITLAB_CI","BUILDKITE","DRONE"].some((U)=>(U in K))||K.CI_NAME==="codeship")return 1;return Q}if("TEAMCITY_VERSION"in K)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(K.TEAMCITY_VERSION)?1:0;if(K.COLORTERM==="truecolor")return 3;if(K.TERM==="xterm-kitty")return 3;if(K.TERM==="xterm-ghostty")return 3;if(K.TERM==="wezterm")return 3;if("TERM_PROGRAM"in K){let U=Number.parseInt((K.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(K.TERM_PROGRAM){case"iTerm.app":return U>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(K.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(K.TERM))return 1;if("COLORTERM"in K)return 1;return Q}function T(q,V={}){let z=i(q,{streamIsTTY:q&&q.isTTY,...V});return g(z)}var K,B,a,A;var C=j(()=>{({env:K}=I);if(W("no-color")||W("no-colors")||W("color=false")||W("color=never"))B=0;else if(W("color")||W("colors")||W("color=true")||W("color=always"))B=1;a={stdout:T({isTTY:E.isatty(1)}),stderr:T({isTTY:E.isatty(2)})},A=a});function F(q,V,z){let D=q.indexOf(V);if(D===-1)return q;let H=V.length,Q=0,U="";do U+=q.slice(Q,D)+V+z,Q=D+H,D=q.indexOf(V,Q);while(D!==-1);return U+=q.slice(Q),U}function _(q,V,z,D){let H=0,Q="";do{let U=q[D-1]==="\r";Q+=q.slice(H,U?D-1:D)+V+(U?`\r
|
|
2
|
+
`:`
|
|
3
|
+
`)+z,H=D+1,D=q.indexOf(`
|
|
4
|
+
`,H)}while(D!==-1);return Q+=q.slice(H),Q}var b=()=>{};class o{constructor(q){return v(q)}}function G(q){return v(q)}var S,h,L,Z,O,f,$,n=(q,V={})=>{if(V.level&&!(Number.isInteger(V.level)&&V.level>=0&&V.level<=3))throw Error("The `level` option should be an integer from 0 to 3");let z=S?S.level:0;q.level=V.level===void 0?z:V.level},v=(q)=>{let V=(...z)=>z.join(" ");return n(V,q),Object.setPrototypeOf(V,G.prototype),V},P=(q,V,z,...D)=>{if(q==="rgb"){if(V==="ansi16m")return X[z].ansi16m(...D);if(V==="ansi256")return X[z].ansi256(X.rgbToAnsi256(...D));return X[z].ansi(X.rgbToAnsi(...D))}if(q==="hex")return P("rgb",V,z,...X.hexToRgb(...D));return X[z][q](...D)},t,r,x=(q,V,z)=>{let D,H;if(z===void 0)D=q,H=V;else D=z.openAll+q,H=V+z.closeAll;return{open:q,close:V,openAll:D,closeAll:H,parent:z}},w=(q,V,z)=>{let D=(...H)=>l(D,H.length===1?""+H[0]:H.join(" "));return Object.setPrototypeOf(D,r),D[L]=q,D[Z]=V,D[O]=z,D},l=(q,V)=>{if(q.level<=0||!V)return q[O]?"":V;let z=q[Z];if(z===void 0)return V;let{openAll:D,closeAll:H}=z;if(V.includes("\x1B"))while(z!==void 0)V=F(V,z.close,z.open),z=z.parent;let Q=V.indexOf(`
|
|
5
|
+
`);if(Q!==-1)V=_(V,H,D,Q);return D+V+H},s,Z1,O1;var e=j(()=>{R();C();b();({stdout:S,stderr:h}=A),L=Symbol("GENERATOR"),Z=Symbol("STYLER"),O=Symbol("IS_EMPTY"),f=["ansi","ansi","ansi256","ansi16m"],$=Object.create(null);Object.setPrototypeOf(G.prototype,Function.prototype);for(let[q,V]of Object.entries(X))$[q]={get(){let z=w(this,x(V.open,V.close,this[Z]),this[O]);return Object.defineProperty(this,q,{value:z}),z}};$.visible={get(){let q=w(this,this[Z],!0);return Object.defineProperty(this,"visible",{value:q}),q}};t=["rgb","hex","ansi256"];for(let q of t){$[q]={get(){let{level:z}=this;return function(...D){let H=x(P(q,f[z],"color",...D),X.color.close,this[Z]);return w(this,H,this[O])}}};let V="bg"+q[0].toUpperCase()+q.slice(1);$[V]={get(){let{level:z}=this;return function(...D){let H=x(P(q,f[z],"bgColor",...D),X.bgColor.close,this[Z]);return w(this,H,this[O])}}}}r=Object.defineProperties(()=>{},{...$,level:{enumerable:!0,get(){return this[L].level},set(q){this[L].level=q}}});Object.defineProperties(G.prototype,$);s=G(),Z1=G({level:h?h.level:0}),O1=s});
|
|
6
|
+
export{o as d5,O1 as e5,e as f5};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{PS as k,QS as f,eT as u}from"./cli-0.5.14-h61trenx.mjs";import{YT as C,iU as d}from"./cli-0.5.14-1gr6bex0.mjs";import{x0 as A,z0 as F}from"./cli-0.5.14-5008zpga.mjs";import{V0 as q,_0 as i}from"./cli-0.5.14-1d34ehpy.mjs";import{O4 as W,R4 as _,Y4 as j,Z4 as w,c5 as I}from"./cli-0.5.14-4367p06d.mjs";import{kda as V,sda as U}from"./cli-0.5.14-ndq9rhn7.mjs";import{Mfa as M,Nfa as v}from"./cli-0.5.14-xad83fbb.mjs";import{Qga as J,Tga as x,tga as X,uga as R,yga as p}from"./cli-0.5.14-6raawc34.mjs";import{iha as P,pha as T}from"./cli-0.5.14-ef8ctc2m.mjs";import{Poa as O}from"./cli-0.5.14-hanfd2pz.mjs";x();U();F();v();x();T();U();_();I();p();import{randomUUID as E}from"crypto";var h=2000,y=5,S=30000,Y=3,c=new Set([4003]);function D(B){if(typeof B!=="object"||B===null||!("type"in B))return!1;return typeof B.type==="string"}class L{sessionId;orgUuid;getAccessToken;callbacks;ws=null;state="closed";reconnectAttempts=0;sessionNotFoundRetries=0;pingInterval=null;reconnectTimer=null;constructor(B,z,Q,H){this.sessionId=B;this.orgUuid=z;this.getAccessToken=Q;this.callbacks=H}async connect(){if(this.state==="connecting"){J("[SessionsWebSocket] Already connecting");return}this.state="connecting";let z=`${M().BASE_API_URL.replace("https://","wss://")}/v1/sessions/ws/${this.sessionId}/subscribe?organization_uuid=${this.orgUuid}`;J(`[SessionsWebSocket] Connecting to ${z}`);let H={Authorization:`Bearer ${this.getAccessToken()}`,"anthropic-version":"2023-06-01"};if(typeof Bun<"u"){let $=new globalThis.WebSocket(z,{headers:H,proxy:w(z),tls:W()||void 0});this.ws=$,$.addEventListener("open",()=>{J("[SessionsWebSocket] Connection opened, authenticated via headers"),this.state="connected",this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.startPingInterval(),this.callbacks.onConnected?.()}),$.addEventListener("message",(Z)=>{let K=typeof Z.data==="string"?Z.data:String(Z.data);this.handleMessage(K)}),$.addEventListener("error",()=>{let Z=Error("[SessionsWebSocket] WebSocket error");V(Z),this.callbacks.onError?.(Z)}),$.addEventListener("close",(Z)=>{J(`[SessionsWebSocket] Closed: code=${Z.code} reason=${Z.reason}`),this.handleClose(Z.code)}),$.addEventListener("pong",()=>{J("[SessionsWebSocket] Pong received")})}else{let{default:$}=await import("./wrapper-0.5.14-9z68ky7a.mjs"),Z=new $(z,{headers:H,agent:j(z),...W()});this.ws=Z,Z.on("open",()=>{J("[SessionsWebSocket] Connection opened, authenticated via headers"),this.state="connected",this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.startPingInterval(),this.callbacks.onConnected?.()}),Z.on("message",(K)=>{this.handleMessage(K.toString())}),Z.on("error",(K)=>{V(Error(`[SessionsWebSocket] Error: ${K.message}`)),this.callbacks.onError?.(K)}),Z.on("close",(K,G)=>{J(`[SessionsWebSocket] Closed: code=${K} reason=${G.toString()}`),this.handleClose(K)}),Z.on("pong",()=>{J("[SessionsWebSocket] Pong received")})}}handleMessage(B){try{let z=R(B);if(D(z))this.callbacks.onMessage(z);else J(`[SessionsWebSocket] Ignoring message type: ${typeof z==="object"&&z!==null&&"type"in z?String(z.type):"unknown"}`)}catch(z){V(Error(`[SessionsWebSocket] Failed to parse message: ${P(z)}`))}}handleClose(B){if(this.stopPingInterval(),this.state==="closed")return;this.ws=null;let z=this.state;if(this.state="closed",c.has(B)){J(`[SessionsWebSocket] Permanent close code ${B}, not reconnecting`),this.callbacks.onClose?.();return}if(B===4001){if(this.sessionNotFoundRetries++,this.sessionNotFoundRetries>Y){J(`[SessionsWebSocket] 4001 retry budget exhausted (${Y}), not reconnecting`),this.callbacks.onClose?.();return}this.scheduleReconnect(h*this.sessionNotFoundRetries,`4001 attempt ${this.sessionNotFoundRetries}/${Y}`);return}if(z==="connected"&&this.reconnectAttempts<y)this.reconnectAttempts++,this.scheduleReconnect(h,`attempt ${this.reconnectAttempts}/${y}`);else J("[SessionsWebSocket] Not reconnecting"),this.callbacks.onClose?.()}scheduleReconnect(B,z){this.callbacks.onReconnecting?.(),J(`[SessionsWebSocket] Scheduling reconnect (${z}) in ${B}ms`),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},B)}startPingInterval(){this.stopPingInterval(),this.pingInterval=setInterval(()=>{if(this.ws&&this.state==="connected")try{this.ws.ping?.()}catch{}},S)}stopPingInterval(){if(this.pingInterval)clearInterval(this.pingInterval),this.pingInterval=null}sendControlResponse(B){if(!this.ws||this.state!=="connected"){V(Error("[SessionsWebSocket] Cannot send: not connected"));return}J("[SessionsWebSocket] Sending control response"),this.ws.send(X(B))}sendControlRequest(B){if(!this.ws||this.state!=="connected"){V(Error("[SessionsWebSocket] Cannot send: not connected"));return}let z={type:"control_request",request_id:E(),request:B};J(`[SessionsWebSocket] Sending control request: ${B.subtype}`),this.ws.send(X(z))}isConnected(){return this.state==="connected"}close(){if(J("[SessionsWebSocket] Closing connection"),this.state="closed",this.stopPingInterval(),this.reconnectTimer)clearTimeout(this.reconnectTimer),this.reconnectTimer=null;if(this.ws)this.ws.close(),this.ws=null}reconnect(){J("[SessionsWebSocket] Force reconnecting"),this.reconnectAttempts=0,this.sessionNotFoundRetries=0,this.close(),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},500)}}function N(B){return B.type!=="control_request"&&B.type!=="control_response"&&B.type!=="control_cancel_request"}class b{config;callbacks;websocket=null;pendingPermissionRequests=new Map;constructor(B,z){this.config=B;this.callbacks=z}connect(){J(`[RemoteSessionManager] Connecting to session ${this.config.sessionId}`);let B={onMessage:(z)=>this.handleMessage(z),onConnected:()=>{J("[RemoteSessionManager] Connected"),this.callbacks.onConnected?.()},onClose:()=>{J("[RemoteSessionManager] Disconnected"),this.callbacks.onDisconnected?.()},onReconnecting:()=>{J("[RemoteSessionManager] Reconnecting"),this.callbacks.onReconnecting?.()},onError:(z)=>{V(z),this.callbacks.onError?.(z)}};this.websocket=new L(this.config.sessionId,this.config.orgUuid,this.config.getAccessToken,B),this.websocket.connect()}handleMessage(B){if(B.type==="control_request"){this.handleControlRequest(B);return}if(B.type==="control_cancel_request"){let{request_id:z}=B,Q=this.pendingPermissionRequests.get(z);J(`[RemoteSessionManager] Permission request cancelled: ${z}`),this.pendingPermissionRequests.delete(z),this.callbacks.onPermissionCancelled?.(z,Q?.tool_use_id);return}if(B.type==="control_response"){J("[RemoteSessionManager] Received control response");return}if(N(B))this.callbacks.onMessage(B)}handleControlRequest(B){let{request_id:z,request:Q}=B;if(Q.subtype==="can_use_tool")J(`[RemoteSessionManager] Permission request for tool: ${Q.tool_name}`),this.pendingPermissionRequests.set(z,Q),this.callbacks.onPermissionRequest(Q,z);else{J(`[RemoteSessionManager] Unsupported control request subtype: ${Q.subtype}`);let H={type:"control_response",response:{subtype:"error",request_id:z,error:`Unsupported control request subtype: ${Q.subtype}`}};this.websocket?.sendControlResponse(H)}}async sendMessage(B,z){J(`[RemoteSessionManager] Sending message to session ${this.config.sessionId}`);let Q=await A(this.config.sessionId,B,z);if(!Q)V(Error(`[RemoteSessionManager] Failed to send message to session ${this.config.sessionId}`));return Q}respondToPermissionRequest(B,z){if(!this.pendingPermissionRequests.get(B)){V(Error(`[RemoteSessionManager] No pending permission request with ID: ${B}`));return}this.pendingPermissionRequests.delete(B);let H={type:"control_response",response:{subtype:"success",request_id:B,response:{behavior:z.behavior,...z.behavior==="allow"?{updatedInput:z.updatedInput}:{message:z.message}}}};J(`[RemoteSessionManager] Sending permission response: ${z.behavior}`),this.websocket?.sendControlResponse(H)}isConnected(){return this.websocket?.isConnected()??!1}cancelSession(){J("[RemoteSessionManager] Sending interrupt signal"),this.websocket?.sendControlRequest({subtype:"interrupt"})}getSessionId(){return this.config.sessionId}disconnect(){J("[RemoteSessionManager] Disconnecting"),this.websocket?.close(),this.websocket=null,this.pendingPermissionRequests.clear()}reconnect(){J("[RemoteSessionManager] Reconnecting WebSocket"),this.websocket?.reconnect()}}function $z(B,z,Q,H=!1,$=!1){return{sessionId:B,getAccessToken:z,orgUuid:Q,hasInitialPrompt:H,viewerOnly:$}}x();U();d();u();function Xz(){let B=C();if(!B?.teamName||!B?.agentName){J("[Reconnection] computeInitialTeamContext: No teammate context set (not a teammate)");return}let{teamName:z,agentId:Q,agentName:H}=B,$=f(z);if(!$){V(Error(`[computeInitialTeamContext] Could not read team file for ${z}`));return}let Z=k(z),K=!Q;return J(`[Reconnection] Computed initial team context for ${K?"leader":`teammate ${H}`} in team ${z}`),{teamName:z,teamFilePath:Z,leadAgentId:$.leadAgentId,selfAgentId:Q,selfAgentName:H,isLeader:K,teammates:{}}}function Wz(B,z,Q){let H=f(z);if(!H){V(Error(`[initializeTeammateContextFromSession] Could not read team file for ${z} (agent: ${Q})`));return}let $=H.members.find((G)=>G.name===Q);if(!$)J(`[Reconnection] Member ${Q} not found in team ${z} - may have been removed`);let Z=$?.agentId,K=k(z);B((G)=>({...G,teamContext:{teamName:z,teamFilePath:K,leadAgentId:H.leadAgentId,selfAgentId:Z,selfAgentName:Q,isLeader:!1,teammates:{}}})),J(`[Reconnection] Initialized agent context from session for ${Q} in team ${z}`)}i();var m={"claude-3-opus":{modelName:"Claude 3 Opus",retirementDates:{firstParty:"January 5, 2026",bedrock:"January 15, 2026",vertex:"January 5, 2026",foundry:"January 5, 2026"}},"claude-3-7-sonnet":{modelName:"Claude 3.7 Sonnet",retirementDates:{firstParty:"February 19, 2026",bedrock:"April 28, 2026",vertex:"May 11, 2026",foundry:"February 19, 2026"}},"claude-3-5-haiku":{modelName:"Claude 3.5 Haiku",retirementDates:{firstParty:"February 19, 2026",bedrock:null,vertex:null,foundry:null}}};function l(B){let z=B.toLowerCase(),Q=q();for(let[H,$]of Object.entries(m)){let Z=$.retirementDates[Q];if(!z.includes(H)||!Z)continue;return{isDeprecated:!0,modelName:$.modelName,retirementDate:Z}}return{isDeprecated:!1}}function Lz(B){if(!B)return null;let z=l(B);if(!z.isDeprecated)return null;return`⚠ ${z.modelName} will be retired on ${z.retirementDate}. Consider switching to a newer model.`}
|
|
2
|
+
export{b as Ma,$z as Na,Xz as Oa,Wz as Pa,Lz as Qa};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import{BN as X,Ki as L,bC as V,cC as $,hO as F,tp as O,up as Z}from"./cli-0.5.14-jf3et57a.mjs";import{Ooa as Y}from"./cli-0.5.14-hanfd2pz.mjs";function W(G){let D=[],H=G.matchAll(v);for(let z of H)if(z.index!==void 0)D.push({word:z[0],start:z.index,end:z.index+z[0].length});return D}async function b({question:G,cacheSafeParams:D}){let H=`<system-reminder>This is a side question from the user. You must answer this question directly in a single response.
|
|
2
|
+
|
|
3
|
+
IMPORTANT CONTEXT:
|
|
4
|
+
- You are a separate, lightweight agent spawned to answer this one question
|
|
5
|
+
- The main agent is NOT interrupted - it continues working independently in the background
|
|
6
|
+
- You share the conversation context but are a completely separate instance
|
|
7
|
+
- Do NOT reference being interrupted or what you were "previously doing" - that framing is incorrect
|
|
8
|
+
|
|
9
|
+
CRITICAL CONSTRAINTS:
|
|
10
|
+
- You have NO tools available - you cannot read files, run commands, search, or take any actions
|
|
11
|
+
- This is a one-off response - there will be no follow-up turns
|
|
12
|
+
- You can ONLY provide information based on what you already know from the conversation context
|
|
13
|
+
- NEVER say things like "Let me try...", "I'll now...", "Let me check...", or promise to take any action
|
|
14
|
+
- If you don't know the answer, say so - do not offer to look it up or investigate
|
|
15
|
+
|
|
16
|
+
Simply answer the question with the information you have.</system-reminder>
|
|
17
|
+
|
|
18
|
+
${G}`,z=await V({promptMessages:[X({content:H})],cacheSafeParams:D,canUseTool:async()=>({behavior:"deny",message:"Side questions cannot use tools",decisionReason:{type:"other",reason:"side_question"}}),querySource:"side_question",forkLabel:"side_question",maxTurns:1,skipCacheWrite:!0});return{response:y(z.messages),usage:z.totalUsage}}function y(G){let D=G.flatMap((z)=>z.type==="assistant"?z.message.content:[]);if(D.length>0){let z=L(D,`
|
|
19
|
+
|
|
20
|
+
`).trim();if(z)return z;let J=D.find((K)=>K.type==="tool_use");if(J)return`(The model tried to call ${"name"in J?J.name:"a tool"} instead of answering directly. Try rephrasing or ask in the main conversation.)`}let H=G.find((z)=>z.type==="system"&&("subtype"in z)&&z.subtype==="api_error");if(H)return`(API error: ${O(H.error)})`;return null}var v;var C=Y(()=>{Z();$();F();v=/^\/btw\b/gi});
|
|
21
|
+
export{W as Fg,b as Gg,C as Hg};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{Dc as K,Ec as Y}from"./cli-0.5.14-mt7egvs8.mjs";import{OJ as J,Uj as G,Vj as B,WJ as X,Yn as H,Zj as U,Zn as W,_j as V}from"./cli-0.5.14-jf3et57a.mjs";import{Loa as q,Ooa as v}from"./cli-0.5.14-hanfd2pz.mjs";function P(h){return x.some((g)=>h.endsWith(g))}function C(h){return h.filter((g)=>G.has(g.name)||P(g.name))}function A(h,g,E){let[Q,Z]=K(H([...h,...g],"name"),J),k=($,j)=>$.name.localeCompare(j.name),w=[...Z.sort(k),...Q.sort(k)];if(z){if(z.isCoordinatorMode())return C(w)}return w}var x,z;var D=v(()=>{Y();W();B();X();x=["subscribe_pr_activity","unsubscribe_pr_activity"];z=(V(),q(U))});
|
|
2
|
+
export{P as zc,C as Ac,A as Bc,D as Cc};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{$I as h,Fn as L,GI as R,Gn as D,Hn as O,KI as b,Kn as _,Ln as S,NI as w,TI as M,VI as P,_I as m,dJ as c}from"./cli-0.5.14-jf3et57a.mjs";import{Faa as E,e$ as x,kda as N,m$ as T,qaa as B,saa as A,sda as j,vaa as C}from"./cli-0.5.14-ndq9rhn7.mjs";import{$ea as v,_ea as U}from"./cli-0.5.14-rj1nh8jm.mjs";import{Qga as G,Tga as F}from"./cli-0.5.14-6raawc34.mjs";import{Ooa as y}from"./cli-0.5.14-hanfd2pz.mjs";import{join as I}from"path";async function qq(){let q=C(),z=[],W=L();for(let[K,Q]of Object.entries(W))if(K.includes("@")&&Q)z.push(K);if(q.enabledPlugins)for(let[K,Q]of Object.entries(q.enabledPlugins)){if(!K.includes("@"))continue;let J=z.indexOf(K);if(Q){if(J===-1)z.push(K)}else if(J!==-1)z.splice(J,1)}return z}function zq(){let q=new Map,z=L();for(let[K,Q]of Object.entries(z)){if(!K.includes("@"))continue;if(Q===!0)q.set(K,"flag");else if(Q===!1)q.delete(K)}let W=[{scope:"managed",source:"policySettings"},{scope:"user",source:"userSettings"},{scope:"project",source:"projectSettings"},{scope:"local",source:"localSettings"},{scope:"flag",source:"flagSettings"}];for(let{scope:K,source:Q}of W){let J=B(Q);if(!J?.enabledPlugins)continue;for(let[V,Y]of Object.entries(J.enabledPlugins)){if(!V.includes("@"))continue;if(V in z&&z[V]!==Y)G(`Plugin ${V} from --add-dir (${z[V]}) overridden by ${Q} (${Y})`);if(Y===!0)q.set(V,K);else if(Y===!1)q.delete(V)}}return G(`Found ${q.size} enabled plugins with scopes: ${Array.from(q.entries()).map(([K,Q])=>`${K}(${Q})`).join(", ")}`),q}function Jq(q){return q!=="flag"}function Kq(q){return O[q]}async function p(){M().catch((W)=>{N(W)});let q=w(),z=Object.keys(q.plugins);return G(`Found ${z.length} installed plugins`),z}async function Qq(q){try{let z=await p(),W=q.filter((J)=>!z.includes(J));return(await Promise.all(W.map(async(J)=>{try{let V=await R(J);return{pluginId:J,found:V!==null&&V!==void 0}}catch(V){return G(`Failed to check plugin ${J} in marketplace: ${V}`),{pluginId:J,found:!1}}}))).filter(({found:J})=>J).map(({pluginId:J})=>J)}catch(z){return N(z),[]}}async function Vq(q,z,W="user"){let K=W!=="user"?U():void 0,Q=_(W),J=B(Q),V={...J?.enabledPlugins},Y=[],k=[];for(let H=0;H<q.length;H++){let X=q[H];if(!X)continue;if(z)z(X,H+1,q.length);try{let Z=await R(X);if(!Z){k.push({name:X,error:"Plugin not found in any marketplace"});continue}let{entry:$,marketplaceInstallLocation:f}=Z;if(!x($.source))await m(X,$,W,K);else h({pluginId:X,installPath:I(f,$.source),version:$.version},W,K);V[X]=!0,Y.push(X)}catch(Z){let $=Z instanceof Error?Z.message:String(Z);k.push({name:X,error:$}),N(Z)}}return A(Q,{...J,enabledPlugins:V}),{installed:Y,failed:k}}var a=y(()=>{v();F();j();E();D();P();b();S();c();T()});
|
|
2
|
+
export{qq as td,zq as ud,Jq as vd,Kq as wd,p as xd,Qq as yd,Vq as zd,a as Ad};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{Yf as FY,Zf as AQ}from"./cli-0.5.14-xeawxepw.mjs";import{dg as LQ}from"./cli-0.5.14-k4pqcfd4.mjs";import{eg as Lq,gg as Pq,hg as GX}from"./cli-0.5.14-t3d6ycsp.mjs";import{lg as IJ,mg as kQ,ng as zY,og as MQ}from"./cli-0.5.14-9j1dsrh1.mjs";import{pg as DY,qg as PQ}from"./cli-0.5.14-26qxsgry.mjs";import{rg as NY,sg as UQ,tg as RY,ug as BQ}from"./cli-0.5.14-73ackmw7.mjs";import{vg as Eq,wg as l0,yg as OY,zg as HY}from"./cli-0.5.14-nd1cyqtv.mjs";import{Hh as Nq,Ih as QX}from"./cli-0.5.14-3f5mbe3a.mjs";import{$n as zQ,BQ as MY,Bx as Rq,Cx as XX,Dm as qY,JP as LZ,KH as BJ,LH as RQ,LQ as AY,MD as TZ,MQ as UY,ND as YQ,OE as QZ,Om as DQ,Or as Fq,PE as XZ,PH as YJ,Pr as n0,QE as GZ,QH as BZ,QQ as fQ,RE as VZ,RH as IZ,Rr as qX,SE as WZ,SH as EZ,TE as KZ,UE as OZ,VE as HZ,WD as T0,WE as DZ,XD as eq,XE as zZ,YD as PZ,YE as xq,_n as QY,aK as R0,bK as TJ,bu as K0,cu as XY,du as GY,eu as qZ,km as J0,lm as HQ,mG as KY,mm as C,nG as NQ,nm as f0,om as p,pm as XJ,sm as S0,tm as FJ,uQ as tq,zm as UJ}from"./cli-0.5.14-jf3et57a.mjs";import{aS as VY,bS as WY,fS as FQ}from"./cli-0.5.14-4d1vgx1q.mjs";import{MU as Uq,NU as KX}from"./cli-0.5.14-3pq7th32.mjs";import{$V as l,NV as V0,OV as v0,aW as YY,bW as w0,dW as C0,eW as Bq,gW as zJ,jW as Iq,kW as OX}from"./cli-0.5.14-ya2ykcd6.mjs";import{$W as JY,CX as ZY,DY as H0,FW as U0,OW as e0,PW as eZ,YX as U,_X as V,dX as OQ}from"./cli-0.5.14-r8f2hssc.mjs";import{a0 as n,b0 as Q,c0 as H,d0 as g}from"./cli-0.5.14-tgeskqzs.mjs";import{e0 as s}from"./cli-0.5.14-anv6260e.mjs";import{m0 as rY,n0 as iQ}from"./cli-0.5.14-r61p0n6x.mjs";import{$1 as oZ,C1 as h0,D1 as WQ,K4 as YX,N2 as zq,R2 as sZ,V0 as Dq,V1 as m0,W1 as MJ,Y1 as lZ,Z1 as AJ,Z2 as qJ,_0 as ZX,b3 as tZ,e2 as aZ,n2 as KQ,v4 as vJ}from"./cli-0.5.14-1d34ehpy.mjs";import{e5 as D0,f5 as QQ}from"./cli-0.5.14-1n5t7fhh.mjs";import{Bba as uZ,C_ as mZ,Cca as CY,Dca as CQ,Faa as VQ,Fba as dZ,Fca as SY,G_ as vZ,Gba as iZ,H_ as pZ,I_ as cZ,J_ as xZ,Lca as TY,Nca as wY,O_ as GQ,Pba as rZ,Qca as hY,Uca as SQ,Xca as B0,_ca as nZ,i7 as O0,j7 as DJ,kda as N0,qaa as PJ,saa as x,sba as w,sda as QJ,vaa as kJ,vba as T,zca as fY}from"./cli-0.5.14-ndq9rhn7.mjs";import{Hda as mJ,Ida as g0,Oda as VJ,Pda as SJ}from"./cli-0.5.14-yms71vy8.mjs";import{Lea as jZ,Xea as XQ}from"./cli-0.5.14-pvx7sqsj.mjs";import{$ea as YZ,_ea as t0}from"./cli-0.5.14-rj1nh8jm.mjs";import{Ofa as f,Qfa as qQ}from"./cli-0.5.14-easqaf33.mjs";import{Qga as c0,Tga as EY,tga as Hq,yga as JX}from"./cli-0.5.14-6raawc34.mjs";import{Cha as LJ,Fha as $Z,vha as gZ,xha as IY}from"./cli-0.5.14-p8gq7nq3.mjs";import{Aja as Qq,Bja as Xq,Cja as Gq,Wja as Vq,Xja as Wq,dna as ZZ,hka as Kq,hla as RJ,ila as _Z,jja as JZ,ska as Oq}from"./cli-0.5.14-gm5kmg2w.mjs";import{Koa as $,Ooa as c}from"./cli-0.5.14-hanfd2pz.mjs";function uq(){let Z=JZ(),q=LZ(Z)??Q(V,{dimColor:!0,children:"/rename to add a name"});return[{label:"Version",value:"0.5.14"},{label:"Session name",value:q},{label:"Session ID",value:Z},{label:"cwd",value:t0()},...HZ(),...DZ()]}function dq({mainLoopModel:Z,mcp:J,theme:q,context:X}){return[{label:"Model",value:zZ(Z)},...XZ(J.clients,X.options.ideInstallationStatus,q),...GZ(J.clients,q),...QZ(),...WZ()]}async function FZ(){return[...await KZ(),...await OZ(),...await VZ()]}function iq(Z){let J=JJ.c(8),{value:q}=Z;if(Array.isArray(q)){let X;if(J[0]!==q){let D;if(J[2]!==q.length)D=(F,L)=>H(V,{children:[F,L<q.length-1?",":""]},L),J[2]=q.length,J[3]=D;else D=J[3];X=q.map(D),J[0]=q,J[1]=X}else X=J[1];let W;if(J[4]!==X)W=Q(U,{flexWrap:"wrap",columnGap:1,flexShrink:99,children:X}),J[4]=X,J[5]=W;else W=J[5];return W}if(typeof q==="string"){let X;if(J[6]!==q)X=Q(V,{children:q}),J[6]=q,J[7]=X;else X=J[7];return X}return q}function NZ(Z){let J=JJ.c(20),{context:q,diagnosticsPromise:X}=Z,W=K0(oq),D=K0(lq),[F]=e0(),L;if(J[0]===Symbol.for("react.memo_cache_sentinel"))L=uq(),J[0]=L;else L=J[0];let k;if(J[1]!==q||J[2]!==W||J[3]!==D||J[4]!==F)k=dq({mainLoopModel:W,mcp:D,theme:F,context:q}),J[1]=q,J[2]=W,J[3]=D,J[4]=F,J[5]=k;else k=J[5];let P;if(J[6]!==k)P=[L,k],J[6]=k,J[7]=P;else P=J[7];let K=P,N=C0()?1:void 0,z;if(J[8]!==K)z=K.map(rq),J[8]=K,J[9]=z;else z=J[9];let O;if(J[10]!==X)O=Q(ZJ.Suspense,{fallback:null,children:Q(aq,{promise:X})}),J[10]=X,J[11]=O;else O=J[11];let R;if(J[12]!==N||J[13]!==z||J[14]!==O)R=H(U,{flexDirection:"column",gap:1,flexGrow:N,children:[z,O]}),J[12]=N,J[13]=z,J[14]=O,J[15]=R;else R=J[15];let A;if(J[16]===Symbol.for("react.memo_cache_sentinel"))A=Q(V,{dimColor:!0,children:Q(C,{action:"confirm:no",context:"Settings",fallback:"Esc",description:"cancel"})}),J[16]=A;else A=J[16];let B;if(J[17]!==N||J[18]!==R)B=H(U,{flexDirection:"column",flexGrow:N,children:[R,A]}),J[17]=N,J[18]=R,J[19]=B;else B=J[19];return B}function rq(Z,J){return Z.length>0&&Q(U,{flexDirection:"column",children:Z.map(nq)},J)}function nq(Z,J){let{label:q,value:X}=Z;return H(U,{flexDirection:"row",gap:1,flexShrink:0,children:[q!==void 0&&H(V,{bold:!0,children:[q,":"]}),Q(iq,{value:X})]},J)}function lq(Z){return Z.mcp}function oq(Z){return Z.mainLoopModel}function aq(Z){let J=JJ.c(5),{promise:q}=Z,X=ZJ.use(q);if(X.length===0)return null;let W;if(J[0]===Symbol.for("react.memo_cache_sentinel"))W=Q(V,{bold:!0,children:"System Diagnostics"}),J[0]=W;else W=J[0];let D;if(J[1]!==X)D=X.map(sq),J[1]=X,J[2]=D;else D=J[2];let F;if(J[3]!==D)F=H(U,{flexDirection:"column",paddingBottom:1,children:[W,D]}),J[3]=D,J[4]=F;else F=J[4];return F}function sq(Z,J){return H(U,{flexDirection:"row",gap:1,paddingX:1,children:[Q(V,{color:"error",children:O0.warning}),typeof Z==="string"?Q(V,{wrap:"wrap",children:Z}):Z]},J)}var JJ,ZJ;var RZ=c(()=>{DJ();ZZ();zJ();H0();qZ();YZ();tq();xq();f0();g();JJ=$(U0(),1),ZJ=$(s(),1)});function MZ(Z){let J=kZ.c(17),{currentVersion:q,onChoice:X}=Z,W;if(J[0]!==X)W=function(B){X(B)},J[0]=X,J[1]=W;else W=J[1];let D=W,F;if(J[2]!==X)F=function(){X("cancel")},J[2]=X,J[3]=F;else F=J[3];let L=F,k;if(J[4]!==q)k=H(V,{children:["The stable channel may have an older version than what you're currently running (",q,")."]}),J[4]=q,J[5]=k;else k=J[5];let P;if(J[6]===Symbol.for("react.memo_cache_sentinel"))P=Q(V,{dimColor:!0,children:"How would you like to handle this?"}),J[6]=P;else P=J[6];let K;if(J[7]===Symbol.for("react.memo_cache_sentinel"))K={label:"Allow possible downgrade to stable version",value:"downgrade"},J[7]=K;else K=J[7];let N=`Stay on current version (${q}) until stable catches up`,z;if(J[8]!==N)z=[K,{label:N,value:"stay"}],J[8]=N,J[9]=z;else z=J[9];let O;if(J[10]!==D||J[11]!==z)O=Q(T0,{options:z,onChange:D}),J[10]=D,J[11]=z,J[12]=O;else O=J[12];let R;if(J[13]!==L||J[14]!==k||J[15]!==O)R=H(S0,{title:"Switch to Stable Channel",onCancel:L,color:"permission",hideBorder:!0,hideInputGuide:!0,children:[k,P,O]}),J[13]=L,J[14]=k,J[15]=O,J[16]=R;else R=J[16];return R}var kZ;var AZ=c(()=>{H0();PZ();FJ();g();kZ=$(U0(),1)});function UZ(Z){return Object.entries(Z).map(([J,q])=>({label:q?.name??JQ,value:J,description:q?.description??ZQ}))}function CZ(Z){let J=fZ.c(16),{initialStyle:q,onComplete:X,onCancel:W,isStandaloneCommand:D}=Z,F;if(J[0]===Symbol.for("react.memo_cache_sentinel"))F=[],J[0]=F;else F=J[0];let[L,k]=j0.useState(F),[P,K]=j0.useState(!0),N,z;if(J[1]===Symbol.for("react.memo_cache_sentinel"))N=()=>{IZ(t0()).then((d)=>{let t=UZ(d);k(t),K(!1)}).catch(()=>{let d=UZ(BZ);k(d),K(!1)})},z=[],J[1]=N,J[2]=z;else N=J[1],z=J[2];j0.useEffect(N,z);let O;if(J[3]!==X)O=(d)=>{X(d)},J[3]=X,J[4]=O;else O=J[4];let R=O,A=!D,B=!D,I;if(J[5]===Symbol.for("react.memo_cache_sentinel"))I=Q(U,{marginTop:1,children:Q(V,{dimColor:!0,children:"This changes how Claude Code communicates with you"})}),J[5]=I;else I=J[5];let h;if(J[6]!==R||J[7]!==q||J[8]!==P||J[9]!==L)h=H(U,{flexDirection:"column",gap:1,children:[I,P?Q(V,{dimColor:!0,children:"Loading output styles…"}):Q(T0,{options:L,onChange:R,visibleOptionCount:10,defaultValue:q})]}),J[6]=R,J[7]=q,J[8]=P,J[9]=L,J[10]=h;else h=J[10];let S;if(J[11]!==W||J[12]!==A||J[13]!==B||J[14]!==h)S=Q(S0,{title:"Preferred output style",onCancel:W,hideInputGuide:A,hideBorder:B,children:h}),J[11]=W,J[12]=A,J[13]=B,J[14]=h,J[15]=S;else S=J[15];return S}var fZ,j0,JQ="Default",ZQ="Claude completes coding tasks efficiently and provides concise responses";var SZ=c(()=>{EZ();H0();YZ();eq();FJ();g();fZ=$(U0(),1),j0=$(s(),1)});function hZ(Z){let J=wZ.c(13),{initialLanguage:q,onComplete:X,onCancel:W}=Z,[D,F]=NJ.useState(q),[L,k]=NJ.useState((q??"").length),P;if(J[0]===Symbol.for("react.memo_cache_sentinel"))P={context:"Settings"},J[0]=P;else P=J[0];l("confirm:no",W,P);let K;if(J[1]!==D||J[2]!==X)K=function(){let S=D?.trim();X(S||void 0)},J[1]=D,J[2]=X,J[3]=K;else K=J[3];let N=K,z;if(J[4]===Symbol.for("react.memo_cache_sentinel"))z=Q(V,{children:"Enter your preferred response and voice language:"}),J[4]=z;else z=J[4];let O;if(J[5]===Symbol.for("react.memo_cache_sentinel"))O=Q(V,{children:O0.pointer}),J[5]=O;else O=J[5];let R=D??"",A;if(J[6]!==L||J[7]!==N||J[8]!==R)A=H(U,{flexDirection:"row",gap:1,children:[O,Q(TZ,{value:R,onChange:F,onSubmit:N,focus:!0,showCursor:!0,placeholder:`e.g., Japanese, 日本語, Español${O0.ellipsis}`,columns:60,cursorOffset:L,onChangeCursorOffset:k})]}),J[6]=L,J[7]=N,J[8]=R,J[9]=A;else A=J[9];let B;if(J[10]===Symbol.for("react.memo_cache_sentinel"))B=Q(V,{dimColor:!0,children:"Leave empty for default (English)"}),J[10]=B;else B=J[10];let I;if(J[11]!==A)I=H(U,{flexDirection:"column",gap:1,children:[z,A,B]}),J[11]=A,J[12]=I;else I=J[12];return I}var wZ,NJ;var bZ=c(()=>{DJ();H0();w0();YQ();g();wZ=$(U0(),1),NJ=$(s(),1)});function PY({onClose:Z,context:J,setTabsHidden:q,onIsSearchModeChange:X,contentHeight:W}){let{headerFocused:D,focusHeader:F}=OY(),L=C0(),[,k]=e0(),P=eZ(),[K,N]=_.useState(T()),z=v.useRef(T()),[O,R]=_.useState(kJ()),A=v.useRef(kJ()),[B,I]=_.useState(O?.outputStyle||YJ),h=v.useRef(B),[S,d]=_.useState(O?.language),t=v.useRef(S),[j,F0]=_.useState(0),[i,Y0]=_.useState(0),[r,q0]=_.useState(!0),$0=ZY(),{rows:I0}=V0(),Cq=W??Math.min(Math.floor(I0*0.8),30),Q0=Math.max(5,Cq-10),E0=K0((Y)=>Y.mainLoopModel),Sq=K0((Y)=>Y.verbose),xJ=K0((Y)=>Y.thinkingEnabled),uJ=K0((Y)=>m0()?Y.fastMode:!1),Tq=K0((Y)=>Y.promptSuggestionEnabled),FX=!1,X0=XY(),[dJ,M0]=_.useState({}),wq=v.useRef(xJ),[iJ]=_.useState(()=>PJ("localSettings")),[rJ]=_.useState(()=>PJ("userSettings")),nJ=v.useRef(P),hq=GY(),[lJ]=_.useState(()=>{let Y=hq.getState();return{mainLoopModel:Y.mainLoopModel,mainLoopModelForSession:Y.mainLoopModelForSession,verbose:Y.verbose,thinkingEnabled:Y.thinkingEnabled,fastMode:Y.fastMode,promptSuggestionEnabled:Y.promptSuggestionEnabled,isBriefOnly:Y.isBriefOnly,replBridgeEnabled:Y.replBridgeEnabled,replBridgeOutboundOnly:Y.replBridgeOutboundOnly,settings:Y.settings}}),[KJ]=_.useState(()=>RJ()),e=v.useRef(!1),[bq,o0]=_.useState(!1),[m,y]=_.useState(null),{query:A0,setQuery:a0,cursorOffset:yq}=RY({isActive:r&&m===null&&!D,onExit:()=>q0(!1),onExitUp:F,passthroughCtrlKeys:["c","d"]}),oJ=r&&!D;v.useEffect(()=>{X?.(oJ)},[oJ,X]);let _q=qY(J.options.mcpClients),gq=!gZ(process.env.CLAUDE_CODE_DISABLE_FILE_CHECKPOINTING),aJ=v.use(MY(!0)),$q=UY(aJ),W0=iZ();function sJ(Y){f("tengu_config_model_changed",{from_model:E0,to_model:Y}),X0((M)=>({...M,mainLoopModel:Y,mainLoopModelForSession:null})),M0((M)=>{let E=qJ(Y)+(zY(Y,!1,sZ())?" · Billed as extra usage":"");if("model"in M){let{model:b,...o}=M;return{...o,model:E}}return{...M,model:E}})}function jq(Y){w((G)=>({...G,verbose:Y})),N({...T(),verbose:Y}),X0((G)=>({...G,verbose:Y})),M0((G)=>{if("verbose"in G){let{verbose:M,...E}=G;return E}return{...G,verbose:Y}})}let OJ=[{id:"autoCompactEnabled",label:"Auto-compact",value:K.autoCompactEnabled,type:"boolean",onChange(Y){w((G)=>({...G,autoCompactEnabled:Y})),N({...T(),autoCompactEnabled:Y}),f("tengu_auto_compact_setting_changed",{enabled:Y})}},{id:"thinkingHistoryRedactionEnabled",label:"Thinking history redaction",value:K.thinkingHistoryRedactionEnabled,type:"boolean",onChange(Y){w((G)=>({...G,thinkingHistoryRedactionEnabled:Y})),N({...T(),thinkingHistoryRedactionEnabled:Y}),f("claudin_thinking_history_redaction_setting_changed",{enabled:Y})}},{id:"narrationHistoryRedactionEnabled",label:"Narration history redaction",value:K.narrationHistoryRedactionEnabled,type:"boolean",onChange(Y){w((G)=>({...G,narrationHistoryRedactionEnabled:Y})),N({...T(),narrationHistoryRedactionEnabled:Y}),f("claudin_narration_history_redaction_setting_changed",{enabled:Y})}},{id:"showCacheStats",label:"Cache stats display",value:K.showCacheStats,options:["off","compact","full"],type:"enum",onChange(Y){let G=Y==="off"||Y==="compact"||Y==="full"?Y:"compact";w((M)=>({...M,showCacheStats:G})),N({...T(),showCacheStats:G}),f("tengu_show_cache_stats_setting_changed",{mode:G})}},{id:"toolResultSummarizerEnabled",label:"Tool result summarizer",value:K.toolResultSummarizerEnabled,type:"boolean",onChange(Y){w((G)=>({...G,toolResultSummarizerEnabled:Y})),N({...T(),toolResultSummarizerEnabled:Y}),f("claudin_tool_result_summarizer_setting_changed",{enabled:Y})}},{id:"bashOutputFilterEnabled",label:"Bash output filter",value:K.bashOutputFilterEnabled!==!1,type:"boolean",onChange(Y){w((G)=>({...G,bashOutputFilterEnabled:Y})),N({...T(),bashOutputFilterEnabled:Y}),f("claudin_bash_output_filter_setting_changed",{enabled:Y})}},{id:"autoBackgroundAgentsEnabled",label:"Auto-background agents",value:K.autoBackgroundAgentsEnabled!==!1,type:"boolean",onChange(Y){w((G)=>({...G,autoBackgroundAgentsEnabled:Y})),N({...T(),autoBackgroundAgentsEnabled:Y}),f("claudin_auto_background_agents_setting_changed",{enabled:Y})}},{id:"inlineImagesMode",label:"Inline terminal images",value:K.inlineImagesMode??"auto",options:["auto","enable","disable"],type:"enum",onChange(Y){let G=Y==="auto"||Y==="enable"||Y==="disable"?Y:"auto";w((M)=>({...M,inlineImagesMode:G})),N({...T(),inlineImagesMode:G}),f("claudin_inline_images_setting_changed",{mode:G})}},{id:"spinnerTipsEnabled",label:"Show tips",value:O?.spinnerTipsEnabled??!0,type:"boolean",onChange(Y){x("localSettings",{spinnerTipsEnabled:Y}),R((G)=>({...G,spinnerTipsEnabled:Y})),f("tengu_tips_setting_changed",{enabled:Y})}},{id:"prefersReducedMotion",label:"Reduce motion",value:O?.prefersReducedMotion??!1,type:"boolean",onChange(Y){x("localSettings",{prefersReducedMotion:Y}),R((G)=>({...G,prefersReducedMotion:Y})),X0((G)=>({...G,settings:{...G.settings,prefersReducedMotion:Y}})),f("tengu_reduce_motion_setting_changed",{enabled:Y})}},{id:"thinkingEnabled",label:"Thinking mode",value:xJ??!0,type:"boolean",onChange(Y){X0((G)=>({...G,thinkingEnabled:Y})),x("userSettings",{alwaysThinkingEnabled:Y?void 0:!1}),f("tengu_thinking_toggled",{enabled:Y})}},...m0()&&MJ()?[{id:"fastMode",label:`Fast mode (${lZ} only)`,value:!!uJ,type:"boolean",onChange(Y){if(aZ(),x("userSettings",{fastMode:Y?!0:void 0}),Y)X0((G)=>({...G,mainLoopModel:AJ(),mainLoopModelForSession:null,fastMode:!0})),M0((G)=>({...G,model:AJ(),"Fast mode":"ON"}));else X0((G)=>({...G,fastMode:!1})),M0((G)=>({...G,"Fast mode":"OFF"}))}}]:[],{id:"promptSuggestionEnabled",label:"Prompt suggestions",value:Tq,type:"boolean",onChange(Y){X0((G)=>({...G,promptSuggestionEnabled:Y})),x("userSettings",{promptSuggestionEnabled:Y?void 0:!1})}},...gq?[{id:"fileCheckpointingEnabled",label:"Rewind code (checkpoints)",value:K.fileCheckpointingEnabled,type:"boolean",onChange(Y){w((G)=>({...G,fileCheckpointingEnabled:Y})),N({...T(),fileCheckpointingEnabled:Y}),f("tengu_file_history_snapshots_setting_changed",{enabled:Y})}}]:[],{id:"verbose",label:"Verbose output",value:Sq,type:"boolean",onChange:jq},{id:"terminalProgressBarEnabled",label:"Terminal progress bar",value:K.terminalProgressBarEnabled,type:"boolean",onChange(Y){w((G)=>({...G,terminalProgressBarEnabled:Y})),N({...T(),terminalProgressBarEnabled:Y}),f("tengu_terminal_progress_bar_setting_changed",{enabled:Y})}},...jZ("tengu_terminal_sidebar",!1)?[{id:"showStatusInTerminalTab",label:"Show status in terminal tab",value:K.showStatusInTerminalTab??!1,type:"boolean",onChange(Y){w((G)=>({...G,showStatusInTerminalTab:Y})),N({...T(),showStatusInTerminalTab:Y}),f("tengu_terminal_tab_status_setting_changed",{enabled:Y})}}]:[],{id:"showTurnDuration",label:"Show turn duration",value:K.showTurnDuration,type:"boolean",onChange(Y){w((G)=>({...G,showTurnDuration:Y})),N({...T(),showTurnDuration:Y}),f("tengu_show_turn_duration_setting_changed",{enabled:Y})}},{id:"defaultPermissionMode",label:"Default permission mode",value:O?.permissions?.defaultMode||"default",options:(()=>{let Y=["default","plan"],G=mZ,M=["bypassPermissions"];return[...Y,...G.filter((E)=>!Y.includes(E)&&!M.includes(E))]})(),type:"enum",onChange(Y){let G=cZ(Y),M=vZ(G)?pZ(G):G,E=x("userSettings",{permissions:{...O?.permissions,defaultMode:M}});if(E.error){N0(E.error);return}R((b)=>({...b,permissions:{...b?.permissions,defaultMode:M}})),M0((b)=>({...b,defaultPermissionMode:Y})),f("tengu_config_changed",{setting:"defaultPermissionMode",value:Y})}},{id:"useAutoModeDuringPlan",label:"Use auto mode during plan",value:O?.useAutoModeDuringPlan??!0,type:"boolean",onChange(Y){x("userSettings",{useAutoModeDuringPlan:Y}),R((G)=>({...G,useAutoModeDuringPlan:Y})),X0((G)=>{let M=BJ(G.toolPermissionContext);if(M===G.toolPermissionContext)return G;return{...G,toolPermissionContext:M}}),M0((G)=>({...G,"Use auto mode during plan":Y}))}},{id:"respectGitignore",label:"Respect .gitignore in file picker",value:K.respectGitignore,type:"boolean",onChange(Y){w((G)=>({...G,respectGitignore:Y})),N({...T(),respectGitignore:Y}),f("tengu_respect_gitignore_setting_changed",{enabled:Y})}},{id:"copyFullResponse",label:"Always copy full response (skip /copy picker)",value:K.copyFullResponse,type:"boolean",onChange(Y){w((G)=>({...G,copyFullResponse:Y})),N({...T(),copyFullResponse:Y}),f("tengu_config_changed",{setting:"copyFullResponse",value:String(Y)})}},...JY()?[{id:"copyOnSelect",label:"Copy on select",value:K.copyOnSelect??!0,type:"boolean",onChange(Y){w((G)=>({...G,copyOnSelect:Y})),N({...T(),copyOnSelect:Y}),f("tengu_config_changed",{setting:"copyOnSelect",value:String(Y)})}}]:[],{id:"flickerFreeMode",label:"Flicker-free mode",value:K.flickerFreeMode??!1,type:"boolean",onChange(Y){w((G)=>({...G,flickerFreeMode:Y})),N({...T(),flickerFreeMode:Y}),f("tengu_config_changed",{setting:"flickerFreeMode",value:String(Y)})}},W0?{id:"autoUpdatesChannel",label:"Auto-update channel",value:"disabled",type:"managedEnum",onChange(){}}:{id:"autoUpdatesChannel",label:"Auto-update channel",value:O?.autoUpdatesChannel??"latest",type:"managedEnum",onChange(){}},{id:"theme",label:"Theme",value:P,type:"managedEnum",onChange:k},{id:"notifChannel",label:"Notifications",value:K.preferredNotifChannel,options:["auto","iterm2","terminal_bell","iterm2_with_bell","kitty","ghostty","os_native","notifications_disabled"],type:"enum",onChange(Y){w((G)=>({...G,preferredNotifChannel:Y})),N({...T(),preferredNotifChannel:Y})}},{id:"outputStyle",label:"Output style",value:B,type:"managedEnum",onChange:()=>{}},{id:"language",label:"Language",value:S??"Default (English)",type:"managedEnum",onChange:()=>{}},{id:"editorMode",label:"Editor mode",value:K.editorMode==="emacs"?"normal":K.editorMode||"normal",options:["normal","vim"],type:"enum",onChange(Y){w((G)=>({...G,editorMode:Y})),N({...T(),editorMode:Y}),f("tengu_editor_mode_changed",{mode:Y,source:"config_panel"})}},{id:"prStatusFooterEnabled",label:"Show PR status footer",value:K.prStatusFooterEnabled??!0,type:"boolean",onChange(Y){w((G)=>{if(G.prStatusFooterEnabled===Y)return G;return{...G,prStatusFooterEnabled:Y}}),N({...T(),prStatusFooterEnabled:Y}),f("tengu_pr_status_footer_setting_changed",{enabled:Y})}},{id:"model",label:"Model",value:E0===null?"Default (recommended)":E0,type:"managedEnum",onChange:sJ},..._q?[{id:"diffTool",label:"Diff tool",value:K.diffTool??"auto",options:["terminal","auto"],type:"enum",onChange(Y){w((G)=>({...G,diffTool:Y})),N({...T(),diffTool:Y}),f("tengu_diff_tool_changed",{tool:Y,source:"config_panel"})}}]:[],...!UJ()?[{id:"autoConnectIde",label:"Auto-connect to IDE (external terminal)",value:K.autoConnectIde??!1,type:"boolean",onChange(Y){w((G)=>({...G,autoConnectIde:Y})),N({...T(),autoConnectIde:Y}),f("tengu_auto_connect_ide_changed",{enabled:Y,source:"config_panel"})}}]:[],...UJ()?[{id:"autoInstallIdeExtension",label:"Auto-install IDE extension",value:K.autoInstallIdeExtension??!0,type:"boolean",onChange(Y){w((G)=>({...G,autoInstallIdeExtension:Y})),N({...T(),autoInstallIdeExtension:Y}),f("tengu_auto_install_ide_extension_changed",{enabled:Y,source:"config_panel"})}}]:[],...QY()?(()=>{let Y=VY();return[{id:"teammateMode",label:Y?`Teammate mode [overridden: ${Y}]`:"Teammate mode",value:K.teammateMode??"auto",options:["auto","tmux","in-process"],type:"enum",onChange(M){if(M!=="auto"&&M!=="tmux"&&M!=="in-process")return;WY(M),w((E)=>({...E,teammateMode:M})),N({...T(),teammateMode:M}),f("tengu_teammate_mode_changed",{mode:M})}},{id:"teammateDefaultModel",label:"Default teammate model",value:yZ(K.teammateDefaultModel),type:"managedEnum",onChange(){}}]})():[],...$q?[{id:"showExternalIncludesDialog",label:"External CLAUDE.md includes",value:(()=>{if(uZ().hasClaudeMdExternalIncludesApproved)return"true";else return"false"})(),type:"managedEnum",onChange(){}}]:[],...(()=>{let Y=B0(),G=Y?.transport==="anthropic"?Y.apiKey?.trim():void 0;if(!G||LJ())return[];return[{id:"apiKey",label:H(V,{children:["Use custom API key:"," ",Q(V,{bold:!0,children:h0(G)})]}),searchText:"Use custom API key",value:Boolean(K.customApiKeyResponses?.approved?.includes(h0(G))),type:"boolean",onChange(M){w((E)=>{let b={...E};if(!b.customApiKeyResponses)b.customApiKeyResponses={approved:[],rejected:[]};if(!b.customApiKeyResponses.approved)b.customApiKeyResponses={...b.customApiKeyResponses,approved:[]};if(!b.customApiKeyResponses.rejected)b.customApiKeyResponses={...b.customApiKeyResponses,rejected:[]};{let o=h0(G);if(M)b.customApiKeyResponses={...b.customApiKeyResponses,approved:[...(b.customApiKeyResponses.approved??[]).filter((a)=>a!==o),o],rejected:(b.customApiKeyResponses.rejected??[]).filter((a)=>a!==o)};else b.customApiKeyResponses={...b.customApiKeyResponses,approved:(b.customApiKeyResponses.approved??[]).filter((a)=>a!==o),rejected:[...(b.customApiKeyResponses.rejected??[]).filter((a)=>a!==o),o]}}return b}),N(T())}}]})()],G0=v.useMemo(()=>{if(!A0)return OJ;let Y=A0.toLowerCase();return OJ.filter((G)=>{if(G.id.toLowerCase().includes(Y))return!0;return("searchText"in G?G.searchText:G.label).toLowerCase().includes(Y)})},[OJ,A0]);v.useEffect(()=>{if(j>=G0.length){let Y=Math.max(0,G0.length-1);F0(Y),Y0(Math.max(0,Y-Q0+1));return}Y0((Y)=>{if(j<Y)return j;if(j>=Y+Q0)return j-Q0+1;return Y})},[G0.length,j,Q0]);let mq=_.useCallback((Y)=>{Y0((G)=>{if(Y<G)return Y;if(Y>=G+Q0)return Y-Q0+1;return G})},[Q0]),vq=_.useCallback(()=>{if(m!==null)return;let Y=Object.entries(dJ).map(([a,eJ])=>{return f("tengu_config_changed",{key:a,value:eJ}),`Set ${a} to ${D0.bold(eJ)}`}),G=B0(),M=G?.transport==="anthropic"?G.apiKey?.trim():void 0,E=LJ()?void 0:M,b=Boolean(E&&z.current.customApiKeyResponses?.approved?.includes(h0(E))),o=Boolean(E&&K.customApiKeyResponses?.approved?.includes(h0(E)));if(b!==o)Y.push(`${o?"Enabled":"Disabled"} custom API key`),f("tengu_config_changed",{key:"env.ANTHROPIC_API_KEY",value:o});if(K.theme!==z.current.theme)Y.push(`Set theme to ${D0.bold(K.theme)}`);if(K.preferredNotifChannel!==z.current.preferredNotifChannel)Y.push(`Set notifications to ${D0.bold(K.preferredNotifChannel)}`);if(B!==h.current)Y.push(`Set output style to ${D0.bold(B)}`);if(S!==t.current)Y.push(`Set response language to ${D0.bold(S??"Default (English)")}`);if(K.editorMode!==z.current.editorMode)Y.push(`Set editor mode to ${D0.bold(K.editorMode||"emacs")}`);if(K.diffTool!==z.current.diffTool)Y.push(`Set diff tool to ${D0.bold(K.diffTool)}`);if(K.autoConnectIde!==z.current.autoConnectIde)Y.push(`${K.autoConnectIde?"Enabled":"Disabled"} auto-connect to IDE`);if(K.autoInstallIdeExtension!==z.current.autoInstallIdeExtension)Y.push(`${K.autoInstallIdeExtension?"Enabled":"Disabled"} auto-install IDE extension`);if(K.autoCompactEnabled!==z.current.autoCompactEnabled)Y.push(`${K.autoCompactEnabled?"Enabled":"Disabled"} auto-compact`);if(K.thinkingHistoryRedactionEnabled!==z.current.thinkingHistoryRedactionEnabled)Y.push(`${K.thinkingHistoryRedactionEnabled?"Enabled":"Disabled"} thinking history redaction`);if(K.narrationHistoryRedactionEnabled!==z.current.narrationHistoryRedactionEnabled)Y.push(`${K.narrationHistoryRedactionEnabled?"Enabled":"Disabled"} narration history redaction`);if(K.toolResultSummarizerEnabled!==z.current.toolResultSummarizerEnabled)Y.push(`${K.toolResultSummarizerEnabled?"Enabled":"Disabled"} tool result summarizer`);if(K.autoBackgroundAgentsEnabled!==z.current.autoBackgroundAgentsEnabled)Y.push(`${K.autoBackgroundAgentsEnabled!==!1?"Enabled":"Disabled"} auto-background agents`);if(K.bashOutputFilterEnabled!==z.current.bashOutputFilterEnabled)Y.push(`${K.bashOutputFilterEnabled!==!1?"Enabled":"Disabled"} bash output filter`);if(K.respectGitignore!==z.current.respectGitignore)Y.push(`${K.respectGitignore?"Enabled":"Disabled"} respect .gitignore in file picker`);if(K.copyFullResponse!==z.current.copyFullResponse)Y.push(`${K.copyFullResponse?"Enabled":"Disabled"} always copy full response`);if(K.copyOnSelect!==z.current.copyOnSelect)Y.push(`${K.copyOnSelect?"Enabled":"Disabled"} copy on select`);if(K.terminalProgressBarEnabled!==z.current.terminalProgressBarEnabled)Y.push(`${K.terminalProgressBarEnabled?"Enabled":"Disabled"} terminal progress bar`);if(K.showStatusInTerminalTab!==z.current.showStatusInTerminalTab)Y.push(`${K.showStatusInTerminalTab?"Enabled":"Disabled"} terminal tab status`);if(K.showTurnDuration!==z.current.showTurnDuration)Y.push(`${K.showTurnDuration?"Enabled":"Disabled"} turn duration`);if(K.remoteControlAtStartup!==z.current.remoteControlAtStartup){let a=K.remoteControlAtStartup===void 0?"Reset Remote Control to default":`${K.remoteControlAtStartup?"Enabled":"Disabled"} Remote Control for all sessions`;Y.push(a)}if(O?.autoUpdatesChannel!==A.current?.autoUpdatesChannel)Y.push(`Set auto-update channel to ${D0.bold(O?.autoUpdatesChannel??"latest")}`);if(Y.length>0)Z(Y.join(`
|
|
2
|
+
`));else Z("Config dialog dismissed",{display:"system"})},[m,dJ,K,E0,B,S,O?.autoUpdatesChannel,m0()?O?.fastMode:void 0,Z]),tJ=_.useCallback(()=>{if(P!==nJ.current)k(nJ.current);w(()=>z.current);let Y=iJ;x("localSettings",{spinnerTipsEnabled:Y?.spinnerTipsEnabled,prefersReducedMotion:Y?.prefersReducedMotion,defaultView:Y?.defaultView,outputStyle:Y?.outputStyle});let G=rJ;x("userSettings",{alwaysThinkingEnabled:G?.alwaysThinkingEnabled,fastMode:G?.fastMode,promptSuggestionEnabled:G?.promptSuggestionEnabled,autoUpdatesChannel:G?.autoUpdatesChannel,minimumVersion:G?.minimumVersion,language:G?.language,...{useAutoModeDuringPlan:G?.useAutoModeDuringPlan},syntaxHighlightingDisabled:G?.syntaxHighlightingDisabled,permissions:G?.permissions===void 0?void 0:{...G.permissions,defaultMode:G.permissions.defaultMode}});let M=lJ;if(X0((E)=>({...E,mainLoopModel:M.mainLoopModel,mainLoopModelForSession:M.mainLoopModelForSession,verbose:M.verbose,thinkingEnabled:M.thinkingEnabled,fastMode:M.fastMode,promptSuggestionEnabled:M.promptSuggestionEnabled,isBriefOnly:M.isBriefOnly,replBridgeEnabled:M.replBridgeEnabled,replBridgeOutboundOnly:M.replBridgeOutboundOnly,settings:M.settings,toolPermissionContext:BJ(E.toolPermissionContext)})),RJ()!==KJ)_Z(KJ)},[P,k,iJ,rJ,lJ,KJ,X0]),pq=_.useCallback(()=>{if(m!==null)return;if(e.current)tJ();Z("Config dialog dismissed",{display:"system"})},[m,tJ,Z]);l("confirm:no",pq,{context:"Settings",isActive:m===null&&!r&&!D}),l("settings:close",vq,{context:"Settings",isActive:m===null&&!r&&!D});let HJ=_.useCallback(()=>{let Y=G0[j];if(!Y||!Y.onChange)return;if(Y.type==="boolean"){if(e.current=!0,Y.onChange(!Y.value),Y.id==="thinkingEnabled"){if(!Y.value===wq.current)o0(!1);else if(J.messages.some((E)=>E.type==="assistant"))o0(!0)}return}if(Y.id==="theme"||Y.id==="model"||Y.id==="teammateDefaultModel"||Y.id==="showExternalIncludesDialog"||Y.id==="outputStyle"||Y.id==="language")switch(Y.id){case"theme":y("Theme"),q(!0);return;case"model":y("Model"),q(!0);return;case"teammateDefaultModel":y("TeammateModel"),q(!0);return;case"showExternalIncludesDialog":y("ExternalIncludes"),q(!0);return;case"outputStyle":y("OutputStyle"),q(!0);return;case"language":y("Language"),q(!0);return}if(Y.id==="autoUpdatesChannel"){if(W0){y("EnableAutoUpdates"),q(!0);return}if((O?.autoUpdatesChannel??"latest")==="latest")y("ChannelDowngrade"),q(!0);else e.current=!0,x("userSettings",{autoUpdatesChannel:"latest",minimumVersion:void 0}),R((M)=>({...M,autoUpdatesChannel:"latest",minimumVersion:void 0})),f("tengu_autoupdate_channel_changed",{channel:"latest"});return}if(Y.type==="enum"){e.current=!0;let M=(Y.options.indexOf(Y.value)+1)%Y.options.length;Y.onChange(Y.options[M]);return}},[W0,G0,j,O?.autoUpdatesChannel,q]),s0=(Y)=>{o0(!1);let G=Math.max(0,Math.min(G0.length-1,j+Y));F0(G),mq(G)};YY({"select:previous":()=>{if(j===0)o0(!1),q0(!0),Y0(0);else s0(-1)},"select:next":()=>s0(1),"scroll:lineUp":()=>s0(-1),"scroll:lineDown":()=>s0(1),"select:accept":HJ,"settings:search":()=>{q0(!0),a0("")}},{context:"Settings",isActive:m===null&&!r&&!D});let cq=_.useCallback((Y)=>{if(m!==null)return;if(D)return;if(r){if(Y.key==="escape"){if(Y.preventDefault(),A0.length>0)a0("");else q0(!1);return}if(Y.key==="return"||Y.key==="down"||Y.key==="wheeldown")Y.preventDefault(),q0(!1),F0(0),Y0(0);return}if(Y.key==="left"||Y.key==="right"||Y.key==="tab"){Y.preventDefault(),HJ();return}if(Y.ctrl||Y.meta)return;if(Y.key==="j"||Y.key==="k"||Y.key==="/")return;if(Y.key.length===1&&Y.key!==" ")Y.preventDefault(),q0(!0),a0(Y.key)},[m,D,r,A0,a0,HJ]);return Q(U,{flexDirection:"column",width:"100%",tabIndex:0,autoFocus:!0,onKeyDown:cq,children:m==="Theme"?H(n,{children:[Q(DY,{onThemeSelect:(Y)=>{e.current=!0,k(Y),y(null),q(!1)},onCancel:()=>{y(null),q(!1)},hideEscToCancel:!0,skipExitHandling:!0}),Q(U,{children:Q(V,{dimColor:!0,italic:!0,children:H(p,{children:[Q(J0,{shortcut:"Enter",action:"select"}),Q(C,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"cancel"})]})})})]}):m==="Model"?H(n,{children:[Q(IJ,{initial:E0,onSelect:(Y,G)=>{e.current=!0,sJ(Y),y(null),q(!1)},onCancel:()=>{y(null),q(!1)},showFastModeNotice:m0()?uJ&&oZ(E0)&&MJ():!1}),Q(V,{dimColor:!0,children:H(p,{children:[Q(J0,{shortcut:"Enter",action:"confirm"}),Q(C,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"cancel"})]})})]}):m==="TeammateModel"?H(n,{children:[Q(IJ,{initial:K.teammateDefaultModel??null,skipSettingsWrite:!0,headerText:"Default model for newly spawned teammates. The leader can override via the tool call's model parameter.",onSelect:(Y,G)=>{if(y(null),q(!1),K.teammateDefaultModel===void 0&&Y===null)return;e.current=!0,w((M)=>M.teammateDefaultModel===Y?M:{...M,teammateDefaultModel:Y}),N({...T(),teammateDefaultModel:Y}),M0((M)=>({...M,teammateDefaultModel:yZ(Y)})),f("tengu_teammate_default_model_changed",{model:Y})},onCancel:()=>{y(null),q(!1)}}),Q(V,{dimColor:!0,children:H(p,{children:[Q(J0,{shortcut:"Enter",action:"confirm"}),Q(C,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"cancel"})]})})]}):m==="ExternalIncludes"?H(n,{children:[Q(FY,{onDone:()=>{y(null),q(!1)},externalIncludes:AY(aJ)}),Q(V,{dimColor:!0,children:H(p,{children:[Q(J0,{shortcut:"Enter",action:"confirm"}),Q(C,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"disable external includes"})]})})]}):m==="OutputStyle"?H(n,{children:[Q(CZ,{initialStyle:B,onComplete:(Y)=>{e.current=!0,I(Y??YJ),y(null),q(!1),x("localSettings",{outputStyle:Y}),f("tengu_output_style_changed",{style:Y??YJ,source:"config_panel",settings_source:"localSettings"})},onCancel:()=>{y(null),q(!1)}}),Q(V,{dimColor:!0,children:H(p,{children:[Q(J0,{shortcut:"Enter",action:"confirm"}),Q(C,{action:"confirm:no",context:"Confirmation",fallback:"Esc",description:"cancel"})]})})]}):m==="Language"?H(n,{children:[Q(hZ,{initialLanguage:S,onComplete:(Y)=>{e.current=!0,d(Y),y(null),q(!1),x("userSettings",{language:Y}),f("tengu_language_changed",{language:Y??"default",source:"config_panel"})},onCancel:()=>{y(null),q(!1)}}),Q(V,{dimColor:!0,children:H(p,{children:[Q(J0,{shortcut:"Enter",action:"confirm"}),Q(C,{action:"confirm:no",context:"Settings",fallback:"Esc",description:"cancel"})]})})]}):m==="EnableAutoUpdates"?Q(S0,{title:"Enable Auto-Updates",onCancel:()=>{y(null),q(!1)},hideBorder:!0,hideInputGuide:!0,children:W0?.type!=="config"?H(n,{children:[Q(V,{children:W0?.type==="env"?"Auto-updates are controlled by an environment variable and cannot be changed here.":"Auto-updates are disabled in development builds."}),W0?.type==="env"&&H(V,{dimColor:!0,children:["Unset ",W0.envVar," to re-enable auto-updates."]})]}):Q(T0,{options:[{label:"Enable with latest channel",value:"latest"},{label:"Enable with stable channel",value:"stable"}],onChange:(Y)=>{e.current=!0,y(null),q(!1),w((G)=>({...G,autoUpdates:!0})),N({...T(),autoUpdates:!0}),x("userSettings",{autoUpdatesChannel:Y,minimumVersion:void 0}),R((G)=>({...G,autoUpdatesChannel:Y,minimumVersion:void 0})),f("tengu_autoupdate_enabled",{channel:Y})}})}):m==="ChannelDowngrade"?Q(MZ,{currentVersion:"99.0.0",onChoice:(Y)=>{if(y(null),q(!1),Y==="cancel")return;e.current=!0;let G={autoUpdatesChannel:"stable"};if(Y==="stay")G.minimumVersion="99.0.0";x("userSettings",G),R((M)=>({...M,...G})),f("tengu_autoupdate_channel_changed",{channel:"stable",minimum_version_set:Y==="stay"})}}):H(U,{flexDirection:"column",gap:1,marginY:L?void 0:1,children:[Q(NY,{query:A0,isFocused:r&&!D,isTerminalFocused:$0,cursorOffset:yq,placeholder:"Search settings…"}),Q(U,{flexDirection:"column",children:G0.length===0?H(V,{dimColor:!0,italic:!0,children:['No settings match "',A0,'"']}):H(n,{children:[i>0&&H(V,{dimColor:!0,children:[O0.arrowUp," ",i," more above"]}),G0.slice(i,i+Q0).map((Y,G)=>{let E=i+G===j&&!D&&!r;return Q(v.Fragment,{children:H(U,{children:[Q(U,{width:44,children:H(V,{color:E?"suggestion":void 0,children:[E?O0.pointer:" "," ",Y.label]})}),Q(U,{children:Y.type==="boolean"?H(n,{children:[Q(V,{color:E?"suggestion":void 0,children:Y.value.toString()}),bq&&Y.id==="thinkingEnabled"&&H(V,{color:"warning",children:[" ","Changing thinking mode mid-conversation will increase latency and may reduce quality."]})]}):Y.id==="theme"?Q(V,{color:E?"suggestion":void 0,children:IQ[Y.value.toString()]??Y.value.toString()}):Y.id==="notifChannel"?Q(V,{color:E?"suggestion":void 0,children:Q(EQ,{value:Y.value.toString()})}):Y.id==="defaultPermissionMode"?Q(V,{color:E?"suggestion":void 0,children:xZ(Y.value)}):Y.id==="autoUpdatesChannel"&&W0?H(U,{flexDirection:"column",children:[Q(V,{color:E?"suggestion":void 0,children:"disabled"}),H(V,{dimColor:!0,children:["(",dZ(W0),")"]})]}):Q(V,{color:E?"suggestion":void 0,children:Y.value.toString()})},E?"selected":"unselected")]})},Y.id)}),i+Q0<G0.length&&H(V,{dimColor:!0,children:[O0.arrowDown," ",G0.length-i-Q0," ","more below"]})]})}),D?Q(V,{dimColor:!0,children:H(p,{children:[Q(J0,{shortcut:"←/→ tab",action:"switch"}),Q(J0,{shortcut:"↓",action:"return"}),Q(C,{action:"confirm:no",context:"Settings",fallback:"Esc",description:"close"})]})}):r?Q(V,{dimColor:!0,children:H(p,{children:[Q(V,{children:"Type to filter"}),Q(J0,{shortcut:"Enter/↓",action:"select"}),Q(J0,{shortcut:"↑",action:"tabs"}),Q(C,{action:"confirm:no",context:"Settings",fallback:"Esc",description:"clear"})]})}):Q(V,{dimColor:!0,children:H(p,{children:[Q(C,{action:"select:accept",context:"Settings",fallback:"Space",description:"change"}),Q(C,{action:"settings:close",context:"Settings",fallback:"Enter",description:"save"}),Q(C,{action:"settings:search",context:"Settings",fallback:"/",description:"search"}),Q(C,{action:"confirm:no",context:"Settings",fallback:"Esc",description:"cancel"})]})})]})})}function yZ(Z){if(Z===void 0)return qJ(KY());if(Z===null)return"Default (leader's model)";return qJ(Z)}function EQ(Z){let J=LY.c(4),{value:q}=Z;switch(q){case"auto":return"Auto";case"iterm2":{let X;if(J[0]===Symbol.for("react.memo_cache_sentinel"))X=H(V,{children:["iTerm2 ",Q(V,{dimColor:!0,children:"(OSC 9)"})]}),J[0]=X;else X=J[0];return X}case"terminal_bell":{let X;if(J[1]===Symbol.for("react.memo_cache_sentinel"))X=H(V,{children:["Terminal Bell ",Q(V,{dimColor:!0,children:"(\\a)"})]}),J[1]=X;else X=J[1];return X}case"kitty":{let X;if(J[2]===Symbol.for("react.memo_cache_sentinel"))X=H(V,{children:["Kitty ",Q(V,{dimColor:!0,children:"(OSC 99)"})]}),J[2]=X;else X=J[2];return X}case"ghostty":{let X;if(J[3]===Symbol.for("react.memo_cache_sentinel"))X=H(V,{children:["Ghostty ",Q(V,{dimColor:!0,children:"(OSC 777)"})]}),J[3]=X;else X=J[3];return X}case"iterm2_with_bell":return"iTerm2 w/ Bell";case"notifications_disabled":return"Disabled";default:return q}}var LY,v,_,IQ;var kY=c(()=>{H0();w0();DJ();rZ();WQ();nZ();rZ();QQ();GQ();RQ();QJ();qQ();LQ();PQ();qZ();kQ();tZ();MQ();AQ();AZ();FJ();PZ();SZ();bZ();fQ();HQ();f0();XJ();HY();zJ();UQ();DQ();VQ();ZZ();EZ();$Z();XQ();zQ();FQ();NQ();BQ();v0();KQ();OQ();g();LY=$(U0(),1),v=$(s(),1),_=$(s(),1);IQ={auto:"Auto (match terminal)",dark:"Dark mode",light:"Light mode","dark-daltonized":"Dark mode (colorblind-friendly)","light-daltonized":"Light mode (colorblind-friendly)","dark-ansi":"Dark mode (ANSI colors only)","light-ansi":"Light mode (ANSI colors only)"}});function x0(Z){return typeof Z==="object"&&Z!==null}function Z0(Z){return typeof Z==="string"&&Z.trim()?Z.trim():void 0}function b0(Z){return typeof Z==="number"&&Number.isFinite(Z)?Z:void 0}function EJ(Z){return typeof Z==="boolean"?Z:void 0}function fJ(Z){let J=b0(Z);if(J===void 0)return;return new Date(J*1000).toISOString()}function GJ(Z){if(!x0(Z))return;let J=b0(Z.used_percent)??b0(Z.usedPercent);if(J===void 0)return;let q=b0(Z.window_minutes)??b0(Z.windowDurationMins)??(()=>{let W=b0(Z.limit_window_seconds);return W===void 0?void 0:Math.round(W/60)})(),X=fJ(Z.resets_at)??fJ(Z.resetsAt)??fJ(Z.reset_at);return{usedPercent:J,windowMinutes:q,resetsAt:X}}function bY(Z){if(!x0(Z))return;let J=EJ(Z.has_credits)??EJ(Z.hasCredits)??!1,q=EJ(Z.unlimited)??!1,X=Z0(Z.balance);if(!J&&!q&&!X)return;return{hasCredits:J,unlimited:q,balance:X}}function p0(Z,J){if(!x0(Z))return;let q=Z0(Z.limit_name)??Z0(Z.limitName)??Z0(Z.limit_id)??Z0(Z.limitId)??J,X=GJ(Z.primary)??GJ(Z.primary_window),W=GJ(Z.secondary)??GJ(Z.secondary_window),D=bY(Z.credits);if(!X&&!W&&!D)return;return{limitName:q,primary:X,secondary:W,credits:D}}function CJ(Z,J="codex"){if(Array.isArray(Z))return Z.map((q,X)=>p0(q,X===0?J:`${J}-${X+1}`)).filter((q)=>q!==void 0);if(!x0(Z))return[];return Object.entries(Z).map(([q,X])=>p0(X,q)).filter((q)=>q!==void 0)}function TQ(Z){let J=Z0(Z.plan_type)??Z0(Z.planType),q=[],X=bY(Z.credits),W=p0(Z.rate_limit,"codex");if(W)W.credits??=X,q.push(W);else if(X)q.push({limitName:"codex",credits:X});let D=p0(Z.code_review_rate_limit,"code review");if(D)q.push(D);return q.push(...CJ(Z.additional_rate_limits??Z.additionalRateLimits,"additional")),{planType:J,snapshots:q}}function wQ(Z){if(Array.isArray(Z))return{snapshots:CJ(Z)};if(!x0(Z))return{snapshots:[]};if("rate_limit"in Z||"code_review_rate_limit"in Z||"additional_rate_limits"in Z||"credits"in Z)return TQ(Z);let J=Z.rate_limits??Z.rateLimits??Z.rate_limits_by_limit_id??Z.rateLimitsByLimitId;if(J!==void 0)return{planType:Z0(Z.plan_type)??Z0(Z.planType),snapshots:CJ(J)};let q=p0(Z,"codex");return{planType:Z0(Z.plan_type)??Z0(Z.planType),snapshots:q?[q]:[]}}function y0(Z){if(!Z)return Z;return Z[0].toUpperCase()+Z.slice(1)}function BY(Z,J){if(Z===void 0||Z<=0)return J;if(Z===10080)return"weekly";if(Z%1440===0)return`${Z/1440}d`;if(Z%60===0)return`${Z/60}h`;return`${Z}m`}function hQ(Z){let J=Z?.trim();if(!J)return;let q=Number.parseInt(J,10);if(Number.isFinite(q)&&`${q}`===J&&q>0)return`${q}`;let X=Number.parseFloat(J);if(Number.isFinite(X)&&X>0)return`${Math.round(X)}`;return}function bQ(Z){if(!Z?.hasCredits)return;if(Z.unlimited)return{kind:"text",label:"Credits",value:"Unlimited"};let J=hQ(Z.balance);if(!J)return;return{kind:"text",label:"Credits",value:`${J} credits`}}function yY(Z){let J=[];for(let q of Z){let X=q.limitName.trim()||"codex",W=bQ(q.credits);if(!(q.primary!==void 0||q.secondary!==void 0||W!==void 0))continue;let F=X.toLowerCase()!=="codex",L=Number(q.primary!==void 0)+Number(q.secondary!==void 0),k=F&&L===1;if(F&&!k)J.push({kind:"text",label:`${y0(X)} limit`,value:""});if(q.primary){let P=y0(BY(q.primary.windowMinutes,"5h"));J.push({kind:"window",label:k?`${y0(X)} ${P} limit`:`${P} limit`,usedPercent:q.primary.usedPercent,resetsAt:q.primary.resetsAt})}if(q.secondary){let P=y0(BY(q.secondary.windowMinutes,"weekly"));J.push({kind:"window",label:k?`${y0(X)} ${P} limit`:`${P} limit`,usedPercent:q.secondary.usedPercent,resetsAt:q.secondary.resetsAt})}if(W)J.push(W)}return J}function _Y(Z){if(!Z)return;return Z.split(/[_\s-]+/).filter(Boolean).map((J)=>y0(J.toLowerCase())).join(" ")}function yQ(Z=SY){return new URL("/backend-api/wham/usage",Z).toString()}async function gY(){let Z=await CY().catch(async(W)=>{return c0(`[codex] access token refresh failed before usage fetch: ${W instanceof Error?W.message:String(W)}`,{level:"warn"}),{refreshed:!1,credentials:await fY()}}),J=wY();if(!TY(J.baseUrl))throw Error("Codex usage is only available with the official ChatGPT Codex backend.");let q=hY({storedCredentials:Z.credentials});if(!q.apiKey){let W=IY()?"":", choose Codex OAuth in /provider",D=q.authPath?`${W} or place a Codex auth.json at ${q.authPath}`:W;throw Error(`Codex auth is required. Set CODEX_API_KEY${D}.`)}if(!q.accountId)throw Error("Codex auth is missing chatgpt_account_id. Re-login with Codex OAuth, the Codex CLI, or set CHATGPT_ACCOUNT_ID/CODEX_ACCOUNT_ID.");let X=await fetch(yQ(J.baseUrl),{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${q.apiKey}`,"chatgpt-account-id":q.accountId,originator:"claudin"},signal:AbortSignal.timeout(5000)});if(!X.ok){let W=await X.text().catch(()=>"unknown error");throw Error(`Codex usage error ${X.status}: ${W}`)}return wQ(await X.json())}var $Y=c(()=>{CQ();EY();$Z();SQ()});function _Q({label:Z,usedPercent:J,resetsAt:q,maxWidth:X}){let W=Math.max(0,Math.min(100,J)),D=`${Math.floor(W)}% used`,F=q?`Resets ${VJ(q,!0,!0)}`:void 0;if(X>=62)return H(U,{flexDirection:"column",children:[Q(V,{bold:!0,children:Z}),H(U,{flexDirection:"row",gap:1,children:[Q(R0,{ratio:W/100,width:50,fillColor:"rate_limit_fill",emptyColor:"rate_limit_empty"}),Q(V,{children:D})]}),F?Q(V,{dimColor:!0,children:F}):null]});return H(U,{flexDirection:"column",children:[H(V,{children:[Q(V,{bold:!0,children:Z}),F?H(n,{children:[Q(V,{children:" "}),H(V,{dimColor:!0,children:["· ",F]})]}):null]}),Q(R0,{ratio:W/100,width:X,fillColor:"rate_limit_fill",emptyColor:"rate_limit_empty"}),Q(V,{children:D})]})}function gQ({label:Z,value:J}){if(!J)return Q(V,{bold:!0,children:Z});return H(V,{children:[Q(V,{bold:!0,children:Z}),H(V,{dimColor:!0,children:[" · ",J]})]})}function mY(){let[Z,J]=_0.useState(null),[q,X]=_0.useState(null),[W,D]=_0.useState(!0),{columns:F}=V0(),L=F-2,k=Math.min(L,80),P=jY.useCallback(async()=>{D(!0),X(null);try{J(await gY())}catch(z){N0(z),X(z instanceof Error?z.message:"Failed to load Codex usage")}finally{D(!1)}},[]);if(_0.useEffect(()=>{P()},[P]),l("settings:retry",()=>{P()},{context:"Settings",isActive:!!q&&!W}),q)return H(U,{flexDirection:"column",gap:1,children:[H(V,{color:"error",children:["Error: ",q]}),Q(V,{dimColor:!0,children:H(p,{children:[Q(C,{action:"settings:retry",context:"Settings",fallback:"r",description:"retry"}),Q(C,{action:"confirm:no",context:"Settings",fallback:"Esc",description:"cancel"})]})})]});if(!Z)return H(U,{flexDirection:"column",gap:1,children:[Q(V,{dimColor:!0,children:"Loading Codex usage data…"}),Q(V,{dimColor:!0,children:Q(C,{action:"confirm:no",context:"Settings",fallback:"Esc",description:"cancel"})})]});let K=yY(Z.snapshots),N=_Y(Z.planType);return H(U,{flexDirection:"column",gap:1,width:"100%",children:[N?H(V,{dimColor:!0,children:["Plan: ",N]}):null,K.length===0?Q(V,{dimColor:!0,children:"Codex usage data is not available for this account."}):null,K.map((z,O)=>z.kind==="window"?Q(_Q,{label:z.label,usedPercent:z.usedPercent,resetsAt:z.resetsAt,maxWidth:k},`${z.label}-${O}`):Q(gQ,{label:z.label,value:z.value},`${z.label}-${O}`)),Q(V,{dimColor:!0,children:Q(C,{action:"confirm:no",context:"Settings",fallback:"Esc",description:"cancel"})})]})}var jY,_0;var vY=c(()=>{v0();H0();w0();$Y();SJ();QJ();f0();XJ();TJ();g();jY=$(s(),1),_0=$(s(),1)});var u0="https://api.minimax.io/v1",d0="Usage details are not available for this MiniMax account. This plan or MiniMax endpoint may not expose quota status.";var wJ=()=>{};function L0(Z){return typeof Z==="object"&&Z!==null}function u(Z){return typeof Z==="string"&&Z.trim()?Z.trim():void 0}function bJ(Z){if(typeof Z==="number"&&Number.isFinite(Z))return Z;if(typeof Z==="string"&&Z.trim()){let J=Number.parseFloat(Z);if(Number.isFinite(J))return J}return}function WJ(Z){return Math.max(0,Math.min(100,Math.round(Z)))}function $Q(Z){if(typeof Z==="string"){let X=Date.parse(Z);return Number.isNaN(X)?Z:new Date(X).toISOString()}let J=bJ(Z);if(J===void 0)return;let q=J>1000000000000?J:J*1000;return new Date(q).toISOString()}function jQ(Z,J){let q=bJ(Z);if(/remains?_time/i.test(J)&&q!==void 0){let X=q>604800?q:q*1000;return new Date(Date.now()+X).toISOString()}return $Q(Z)}function i0(Z,J){for(let q of J){let X=bJ(Z[q]);if(X!==void 0)return X}return}function mQ(Z,J){for(let q of J)if(Z[q]!==void 0)return jQ(Z[q],q);return}function r0(Z,J){return J.some((q)=>Z[q]!==void 0)}function xY(Z){return Z?Z[0].toUpperCase()+Z.slice(1):Z}function vQ(Z){if(!Z)return"MiniMax";let J=Z.trim();if(!J)return"MiniMax";if(/[A-Z]/.test(J))return J;return J.split(/[_\s-]+/).filter(Boolean).map((q)=>xY(q.toLowerCase())).join(" ")}function pQ(Z){if(!Z)return;return Z.split(/[_\s-]+/).filter(Boolean).map((J)=>xY(J.toLowerCase())).join(" ")}function uY(Z,J){let q=i0(Z,J.percentKeys),X=i0(Z,J.remainingPercentKeys),W=i0(Z,J.totalKeys),D=i0(Z,J.remainingKeys),F=i0(Z,J.usedKeys),L=W!==void 0&&F!==void 0?W-F:D,k;if(W!==void 0&&W>0&&F!==void 0)k=WJ(F/W*100);else if(W!==void 0&&W>0&&D!==void 0)k=WJ((W-D)/W*100);else if(q!==void 0)k=WJ(q);else if(X!==void 0)k=WJ(100-X);if(k===void 0)return;return{label:J.label,usedPercent:k,remaining:L,total:W,resetsAt:mQ(Z,J.resetKeys)}}function cQ(Z){let J=u(Z.label)??u(Z.name)??u(Z.window_name)??u(Z.windowName)??"Limit";return uY(Z,{label:J,percentKeys:["used_percent","usedPercent","utilization","usage_percentage","usagePercentage"],remainingPercentKeys:["usage_percent","usagePercent","remaining_percent","remainingPercent","percent_remaining","percentRemaining"],totalKeys:["total","quota","limit","max","entitlement"],remainingKeys:["remaining","remain","remains","left"],usedKeys:["used","usage","consumed"],resetKeys:["resets_at","reset_at","resetsAt","resetAt"]})}function uQ(Z){if(r0(Z,xQ))return!0;return dY.some((J)=>r0(Z,J.totalKeys)||r0(Z,J.remainingKeys)||r0(Z,J.usedKeys)||r0(Z,J.percentKeys))}function hJ(Z,J){if(!L0(Z))return;let q=dY.map((W)=>uY(Z,W)).filter((W)=>W!==void 0);if(q.length===0){let W=cQ(Z);if(W)q.push(W)}if(q.length===0)return;return{limitName:u(Z.limit_name)??u(Z.limitName)??u(Z.model_name)??u(Z.modelName)??u(Z.name)??J,windows:q}}function pY(Z,J="MiniMax"){if(Array.isArray(Z))return Z.map((q,X)=>hJ(q,X===0?J:`${J}-${X+1}`)).filter((q)=>q!==void 0);if(!L0(Z))return[];if(uQ(Z)){let q=hJ(Z,J);return q?[q]:[]}return Object.entries(Z).map(([q,X])=>hJ(X,q)).filter((q)=>q!==void 0)}function cY(Z=d0,J){return{availability:"unknown",planType:J,snapshots:[],message:Z}}function yJ(Z){if(!L0(Z))return cY();let J=pQ(u(Z.plan_type)??u(Z.planType)??u(Z.subscription_type)??u(Z.subscriptionType)??u(Z.plan_name)??u(Z.planName)),X=[Z.data,Z.result,Z.model_remains,Z.modelRemains,Z.remains,Z.usage,Z.quotas,Z.models,L0(Z.data)?Z.data.model_remains:void 0,L0(Z.data)?Z.data.modelRemains:void 0,L0(Z.data)?Z.data.models:void 0,L0(Z.data)?Z.data.quotas:void 0,L0(Z.data)?Z.data.remains:void 0].flatMap((D)=>pY(D)).filter((D,F,L)=>{let k=`${D.limitName}:${D.windows.map((P)=>P.label).join("|")}`;return L.findIndex((P)=>`${P.limitName}:${P.windows.map((K)=>K.label).join("|")}`===k)===F});if(X.length>0)return{availability:"available",planType:J,snapshots:X};let W=pY(Z);if(W.length>0)return{availability:"available",planType:J,snapshots:W};return cY(void 0,J)}function dQ(Z){if(Z.remaining===void 0||Z.total===void 0||Z.total<=0)return;return`${Z.remaining}/${Z.total} remaining`}function _J(Z){let J=[];for(let q of Z){let X=vQ(q.limitName),W=X.toLowerCase()!=="minimax",D=W&&q.windows.length===1;if(W&&!D)J.push({kind:"text",label:`${X} quota`,value:""});for(let F of q.windows)J.push({kind:"window",label:D?`${X} ${F.label}`:F.label,usedPercent:F.usedPercent,resetsAt:F.resetsAt,extraSubtext:dQ(F)})}return J}var dY,xQ;var gJ=c(()=>{wJ();dY=[{label:"5h limit",percentKeys:["interval_used_percent","intervalUsedPercent"],remainingPercentKeys:["usage_percent","usagePercent","interval_remaining_percent","intervalRemainingPercent"],totalKeys:["current_interval_total_count","currentIntervalTotalCount","max_interval_usage_count","maxIntervalUsageCount","interval_quota","intervalQuota","interval_limit","intervalLimit"],remainingKeys:["current_interval_remaining_count","currentIntervalRemainingCount","current_interval_remains_count","currentIntervalRemainsCount","interval_remaining","intervalRemaining","remaining_interval_usage_count","remainingIntervalUsageCount"],usedKeys:["current_interval_usage_count","currentIntervalUsageCount","interval_used","intervalUsed","current_interval_used_count","currentIntervalUsedCount","used_interval_usage_count","usedIntervalUsageCount"],resetKeys:["end_time","endTime","interval_resets_at","intervalResetsAt","interval_reset_at","intervalResetAt","remains_time","remainsTime"]},{label:"Weekly limit",percentKeys:["weekly_used_percent","weeklyUsedPercent"],remainingPercentKeys:["weekly_remaining_percent","weeklyRemainingPercent"],totalKeys:["max_weekly_usage_count","maxWeeklyUsageCount","weekly_quota","weeklyQuota","weekly_limit","weeklyLimit"],remainingKeys:["weekly_remaining","weeklyRemaining","remaining_weekly_usage_count","remainingWeeklyUsageCount"],usedKeys:["current_weekly_usage_count","currentWeeklyUsageCount","weekly_used","weeklyUsed","used_weekly_usage_count","usedWeeklyUsageCount"],resetKeys:["weekly_resets_at","weeklyResetsAt","weekly_reset_at","weeklyResetAt"]},{label:"Daily limit",percentKeys:["daily_used_percent","dailyUsedPercent"],remainingPercentKeys:["daily_remaining_percent","dailyRemainingPercent"],totalKeys:["max_daily_usage_count","maxDailyUsageCount","daily_quota","dailyQuota","daily_limit","dailyLimit"],remainingKeys:["daily_remaining","dailyRemaining","remaining_daily_usage_count","remainingDailyUsageCount"],usedKeys:["current_daily_usage_count","currentDailyUsageCount","daily_used","dailyUsed","used_daily_usage_count","usedDailyUsageCount"],resetKeys:["daily_resets_at","dailyResetsAt","daily_reset_at","dailyResetAt"]}],xQ=["used_percent","usedPercent","utilization","usage_percentage","usagePercentage","total","quota","limit","max","entitlement","remaining","remain","remains","left","usage_percent","usagePercent","current_interval_total_count","current_interval_usage_count","current_interval_remaining_count","current_interval_remains_count","max_interval_usage_count","current_weekly_usage_count","max_weekly_usage_count","current_daily_usage_count","max_daily_usage_count"]});function rQ(Z){return Z.replace(/\/+$/,"")}function nY(Z=B0()?.baseUrl??u0){let J=Z.trim();return J?rQ(J):u0}function nQ(Z){let J=Z??B0()?.baseUrl;if(!J?.trim())return{baseUrl:u0,usedDefault:!0};return{baseUrl:nY(J),usedDefault:!1}}function iY(Z){return{availability:"unknown",snapshots:[],message:Z}}function lY(Z){let{baseUrl:J,usedDefault:q}=nQ(Z);try{let X=new URL(`${J}/`);return[new URL("token_plan/remains",X).toString(),new URL("api/openplatform/coding_plan/remains",X).toString()]}catch{if(q){let X=new URL(`${u0}/`);return[new URL("token_plan/remains",X).toString(),new URL("api/openplatform/coding_plan/remains",X).toString()]}throw Error(`MiniMax usage base URL is invalid: ${J}`)}}async function $J(){let Z=B0()?.apiKey;if(!Z)throw Error("MiniMax auth is required. Run /provider and configure a MiniMax profile.");let J=lY(),q=[],X=null;for(let W of J){let D;try{D=await fetch(W,{method:"GET",headers:{Accept:"application/json",Authorization:`Bearer ${Z}`,"Content-Type":"application/json","User-Agent":rY()},signal:AbortSignal.timeout(5000)})}catch(L){c0(`[minimax] usage request failed for ${W}: ${L instanceof Error?L.message:String(L)}`,{level:"warn"}),X=L instanceof Error?L:Error(String(L));continue}if(!D.ok){let L=await D.text().catch(()=>"");if([400,401,403,404].includes(D.status)){q.push({status:D.status,body:L});continue}X=Error(`MiniMax usage error ${D.status}: ${L||"unknown error"}`);continue}let F=yJ(await D.json());if(F.availability==="available")return F}if(q.length>0){let W=q[q.length-1];return c0(`[minimax] usage endpoint returned non-fatal status ${W.status}: ${W.body}`,{level:"warn"}),iY(d0)}if(X)throw X;return iY(d0)}var oY=c(()=>{nZ();EY();iQ();wJ();gJ()});var aY=c(()=>{gJ();oY()});function aQ(Z){let J=Math.max(1,Math.ceil(Z/60000)),q=Math.floor(J/1440),X=Math.floor(J%1440/60),W=J%60;if(q>0)return X>0?`${q}d ${X}h`:`${q}d`;if(X>0)return W>0?`${X}h ${W}m`:`${X}h`;return`${W}m`}function sQ(Z,J){if(!Z)return;let q=Date.parse(Z);if(!Number.isFinite(q))return;let X=q-J;if(X<=0)return"Resetting now";return`Resets in ${aQ(X)}`}function tQ({label:Z,usedPercent:J,resetsAt:q,extraSubtext:X,maxWidth:W,nowMs:D}){let F=Math.max(0,Math.min(100,J)),L=`${Math.floor(F)}% used`,k=sQ(q,D),P=[L,X].filter((K)=>Boolean(K));return H(U,{flexDirection:"column",children:[H(V,{children:[Q(V,{bold:!0,children:Z}),k?H(V,{dimColor:!0,children:[" · ",k]}):null]}),H(U,{flexDirection:"row",gap:1,children:[Q(R0,{ratio:F/100,width:Math.min(oQ,Math.max(1,W)),fillColor:"rate_limit_fill",emptyColor:"rate_limit_empty"}),P.length>0?Q(V,{dimColor:!0,children:P.join(" · ")}):null]})]})}function eQ({label:Z,value:J}){if(!J)return Q(V,{bold:!0,children:Z});return H(V,{children:[Q(V,{bold:!0,children:Z}),H(V,{dimColor:!0,children:[" · ",J]})]})}function tY(){let[Z,J]=P0.useState(null),[q,X]=P0.useState(null),[W,D]=P0.useState(!0),[F,L]=P0.useState(()=>Date.now()),{columns:k}=V0(),P=k-2,K=Math.min(P,80),N=sY.useCallback(async()=>{D(!0),X(null);try{J(await $J())}catch(O){N0(O),X(O instanceof Error?O.message:"Failed to load MiniMax usage")}finally{D(!1)}},[]);if(P0.useEffect(()=>{N()},[N]),P0.useEffect(()=>{let O=setInterval(()=>{L(Date.now())},lQ);return()=>clearInterval(O)},[]),l("settings:retry",()=>{N()},{context:"Settings",isActive:!!q&&!W}),q)return H(U,{flexDirection:"column",gap:1,children:[H(V,{color:"error",children:["Error: ",q]}),Q(V,{dimColor:!0,children:H(p,{children:[Q(C,{action:"settings:retry",context:"Settings",fallback:"r",description:"retry"}),Q(C,{action:"confirm:no",context:"Settings",fallback:"Esc",description:"cancel"})]})})]});if(!Z)return H(U,{flexDirection:"column",gap:1,children:[Q(V,{dimColor:!0,children:"Loading MiniMax usage data…"}),Q(V,{dimColor:!0,children:Q(C,{action:"confirm:no",context:"Settings",fallback:"Esc",description:"cancel"})})]});let z=Z.availability==="available"?_J(Z.snapshots):[];return H(U,{flexDirection:"column",gap:1,width:"100%",children:[Z.planType?H(V,{dimColor:!0,children:["Plan: ",Z.planType]}):null,Z.availability==="unknown"?Q(V,{dimColor:!0,children:Z.message}):z.length===0?Q(V,{dimColor:!0,children:"No MiniMax usage windows were returned for this account."}):null,z.map((O,R)=>O.kind==="window"?Q(tQ,{label:O.label,usedPercent:O.usedPercent,resetsAt:O.resetsAt,extraSubtext:O.extraSubtext,maxWidth:K,nowMs:F},`${O.label}-${R}`):Q(eQ,{label:O.label,value:O.value},`${O.label}-${R}`)),Q(V,{dimColor:!0,children:Q(C,{action:"confirm:no",context:"Settings",fallback:"Esc",description:"cancel"})})]})}var sY,P0,lQ=30000,oQ=18;var eY=c(()=>{v0();H0();w0();aY();QJ();f0();XJ();TJ();g();sY=$(s(),1),P0=$(s(),1)});function Jq({providerLabel:Z}){return H(U,{flexDirection:"column",gap:1,children:[H(V,{dimColor:!0,children:["Usage details are not currently available for ",Z,"."]}),Q(V,{dimColor:!0,children:Q(C,{action:"confirm:no",context:"Settings",fallback:"Esc",description:"cancel"})})]})}var Zq=c(()=>{H0();f0();g()});function Mq(Z){let J=pJ.c(34),{title:q,limit:X,maxWidth:W,showTimeInReset:D,extraSubtext:F}=Z,L=D===void 0?!0:D,{utilization:k,resets_at:P}=X;if(k===null)return null;let K=`${Math.floor(k)}% used`,N;if(P){let z;if(J[0]!==P||J[1]!==L)z=VJ(P,!0,L),J[0]=P,J[1]=L,J[2]=z;else z=J[2];N=`Resets ${z}`}if(F)if(N)N=`${F} · ${N}`;else N=F;if(W>=62){let z;if(J[3]!==q)z=Q(V,{bold:!0,children:q}),J[3]=q,J[4]=z;else z=J[4];let O=k/100,R;if(J[5]!==O)R=Q(R0,{ratio:O,width:50,fillColor:"rate_limit_fill",emptyColor:"rate_limit_empty"}),J[5]=O,J[6]=R;else R=J[6];let A;if(J[7]!==K)A=Q(V,{children:K}),J[7]=K,J[8]=A;else A=J[8];let B;if(J[9]!==R||J[10]!==A)B=H(U,{flexDirection:"row",gap:1,children:[R,A]}),J[9]=R,J[10]=A,J[11]=B;else B=J[11];let I;if(J[12]!==N)I=N&&Q(V,{dimColor:!0,children:N}),J[12]=N,J[13]=I;else I=J[13];let h;if(J[14]!==z||J[15]!==B||J[16]!==I)h=H(U,{flexDirection:"column",children:[z,B,I]}),J[14]=z,J[15]=B,J[16]=I,J[17]=h;else h=J[17];return h}else{let z;if(J[18]!==q)z=Q(V,{bold:!0,children:q}),J[18]=q,J[19]=z;else z=J[19];let O;if(J[20]!==N)O=N&&H(n,{children:[Q(V,{children:" "}),H(V,{dimColor:!0,children:["· ",N]})]}),J[20]=N,J[21]=O;else O=J[21];let R;if(J[22]!==z||J[23]!==O)R=H(V,{children:[z,O]}),J[22]=z,J[23]=O,J[24]=R;else R=J[24];let A=k/100,B;if(J[25]!==W||J[26]!==A)B=Q(R0,{ratio:A,width:W,fillColor:"rate_limit_fill",emptyColor:"rate_limit_empty"}),J[25]=W,J[26]=A,J[27]=B;else B=J[27];let I;if(J[28]!==K)I=Q(V,{children:K}),J[28]=K,J[29]=I;else I=J[29];let h;if(J[30]!==R||J[31]!==B||J[32]!==I)h=H(U,{flexDirection:"column",children:[R,B,I]}),J[30]=R,J[31]=B,J[32]=I,J[33]=h;else h=J[33];return h}}function VX(){let[Z,J]=z0.useState(null),[q,X]=z0.useState(null),[W,D]=z0.useState(!0),{columns:F}=V0(),L=F-2,k=Math.min(L,80),P=kq.useCallback(async()=>{D(!0),X(null);try{let O=await Nq();J(O)}catch(O){N0(O);let R=O,A=R.response?.data,B=R.response?.status,I;if(A?.error?.type==="rate_limit_error")I=A.error.message||"Rate limited. Please try again later.";else if(A?.error?.message)I=A.error.message;else if(B)I=`HTTP ${B} — ${Hq(R.response?.data??{})}`;else I=O?.message||"Failed to load usage data";X(I)}finally{D(!1)}},[]);if(z0.useEffect(()=>{P()},[P]),l("settings:retry",()=>{P()},{context:"Settings",isActive:!!q&&!W}),q)return H(U,{flexDirection:"column",gap:1,children:[H(V,{color:"error",children:["Could not load Anthropic rate-limit data: ",q]}),Q(V,{dimColor:!0,children:"(cost/usage totals above are unaffected)"}),Q(V,{dimColor:!0,children:H(p,{children:[Q(C,{action:"settings:retry",context:"Settings",fallback:"r",description:"retry"}),Q(C,{action:"confirm:no",context:"Settings",fallback:"Esc",description:"cancel"})]})})]});if(!Z)return H(U,{flexDirection:"column",gap:1,children:[Q(V,{dimColor:!0,children:"Loading usage data…"}),Q(V,{dimColor:!0,children:Q(C,{action:"confirm:no",context:"Settings",fallback:"Esc",description:"cancel"})})]});let K=vJ(),N=K==="max"||K==="team"||K===null,z=[{title:"Current session",limit:Z.five_hour},{title:"Current week (all models)",limit:Z.seven_day},...N?[{title:"Current week (Sonnet only)",limit:Z.seven_day_sonnet}]:[]];return H(U,{flexDirection:"column",gap:1,width:"100%",children:[z.some(({limit:O})=>O)||Q(V,{dimColor:!0,children:"/usage is only available for subscription plans."}),z.map(({title:O,limit:R})=>R&&Q(Mq,{title:O,limit:R,maxWidth:k},O)),Z.extra_usage&&Q(WX,{extraUsage:Z.extra_usage,maxWidth:k}),Lq()&&Q(Pq,{maxWidth:k}),Q(V,{dimColor:!0,children:Q(C,{action:"confirm:no",context:"Settings",fallback:"Esc",description:"cancel"})})]})}function Yq(Z){let{title:J,totalCost:q,apiDuration:X,wallDuration:W,linesAdded:D,linesRemoved:F,modelUsage:L,unknownCost:k}=Z,P=Object.entries(L);if(q===0&&P.length===0&&D===0&&F===0)return null;let K={};for(let[z,O]of P){let R=zq(z);if(!K[R])K[R]={inputTokens:0,outputTokens:0,cacheReadInputTokens:0,cacheCreationInputTokens:0,webSearchRequests:0,costUSD:0};let A=K[R];A.inputTokens+=O.inputTokens,A.outputTokens+=O.outputTokens,A.cacheReadInputTokens+=O.cacheReadInputTokens,A.cacheCreationInputTokens+=O.cacheCreationInputTokens,A.webSearchRequests+=O.webSearchRequests,A.costUSD+=O.costUSD}let N=Object.entries(K);return H(U,{flexDirection:"column",children:[Q(V,{bold:!0,children:J}),H(V,{children:[Q(V,{children:"Total cost: "}),Q(V,{children:n0(q)}),k&&Q(V,{dimColor:!0,children:" (costs may be inaccurate due to usage of unknown models)"})]}),H(V,{children:["Total duration (API): ",mJ(X)]}),H(V,{children:["Total duration (wall): ",mJ(W)]}),H(V,{children:["Total code changes: ",D," ",D===1?"line":"lines"," added, ",F," ",F===1?"line":"lines"," removed"]}),N.length>0&&Q(V,{children:"Usage by model:"}),N.map(([z,O])=>{let R=`${g0(O.inputTokens)} input, ${g0(O.outputTokens)} output`;if(O.cacheReadInputTokens>0)R+=`, ${g0(O.cacheReadInputTokens)} cache read`;if(O.cacheCreationInputTokens>0)R+=`, ${g0(O.cacheCreationInputTokens)} cache write`;if(O.webSearchRequests>0)R+=`, ${g0(O.webSearchRequests)} web search`;return R+=` (${n0(O.costUSD)})`,H(V,{children:[`${z}:`.padStart(21)," ",R]},z)})]})}function qq(Z={}){let J=Z.view??"global",[,q]=z0.useReducer((F)=>F+1,0);z0.useEffect(()=>{let F=setInterval(()=>q(),1000);return()=>clearInterval(F)},[]);let X=Kq();if(J==="session"){let F=Qq(),L=Oq(),k=Vq(),P=Wq();return Q(Yq,{title:"Current session",totalCost:F,apiDuration:Xq(),wallDuration:Gq(),linesAdded:k,linesRemoved:P,modelUsage:L,unknownCost:X})}let W=Fq();if(!(W.totalCost!==0||Object.keys(W.modelUsage).length>0||W.totalLinesAdded!==0||W.totalLinesRemoved!==0))return null;return H(U,{flexDirection:"column",gap:1,children:[Q(Yq,{title:"Project total (all sessions)",totalCost:W.totalCost,apiDuration:W.totalAPIDuration,wallDuration:W.totalDuration,linesAdded:W.totalLinesAdded,linesRemoved:W.totalLinesRemoved,modelUsage:W.modelUsage,unknownCost:X}),Q(V,{dimColor:!0,children:"Aggregated across all sessions in this project — includes the current session live."})]})}function cJ(Z={}){if((Z.view??"global")==="session")return Q(U,{flexDirection:"column",gap:1,width:"100%",children:Q(qq,{view:"session"})});let q=Dq(),X;if(q==="codex")X=Q(mY,{});else if(q==="minimax")X=Q(tY,{});else if(q!=="firstParty"){let W={openai:"this OpenAI-compatible provider",gemini:"Google Gemini",github:"GitHub Copilot",mistral:"Mistral","nvidia-nim":"NVIDIA NIM",bedrock:"AWS Bedrock",vertex:"Google Vertex AI",foundry:"Microsoft Foundry"}[q]??"this provider";X=Q(Jq,{providerLabel:W})}else X=Q(VX,{});return H(U,{flexDirection:"column",gap:1,width:"100%",children:[Q(qq,{view:"global"}),X]})}function WX(Z){let J=pJ.c(20),{extraUsage:q,maxWidth:X}=Z,W=vJ();if(!(W==="pro"||W==="max"))return!1;if(!q.is_enabled){if(Rq.isEnabled()){let S;if(J[0]===Symbol.for("react.memo_cache_sentinel"))S=H(U,{flexDirection:"column",children:[Q(V,{bold:!0,children:jJ}),Q(V,{dimColor:!0,children:"Extra usage not enabled · /extra-usage to enable"})]}),J[0]=S;else S=J[0];return S}return null}if(q.monthly_limit===null){let S;if(J[1]===Symbol.for("react.memo_cache_sentinel"))S=H(U,{flexDirection:"column",children:[Q(V,{bold:!0,children:jJ}),Q(V,{dimColor:!0,children:"Unlimited"})]}),J[1]=S;else S=J[1];return S}if(typeof q.used_credits!=="number"||typeof q.utilization!=="number")return null;let F=q.used_credits/100,L;if(J[2]!==F)L=n0(F,2),J[2]=F,J[3]=L;else L=J[3];let k=L,P=q.monthly_limit/100,K;if(J[4]!==P)K=n0(P,2),J[4]=P,J[5]=K;else K=J[5];let N=K,z,O,R,A;if(J[6]!==q.utilization){let S=new Date,d=new Date(S.getFullYear(),S.getMonth()+1,1);z=Mq,A=jJ,O=q.utilization,R=d.toISOString(),J[6]=q.utilization,J[7]=z,J[8]=O,J[9]=R,J[10]=A}else z=J[7],O=J[8],R=J[9],A=J[10];let B;if(J[11]!==O||J[12]!==R)B={utilization:O,resets_at:R},J[11]=O,J[12]=R,J[13]=B;else B=J[13];let I=`${k} / ${N} spent`,h;if(J[14]!==z||J[15]!==X||J[16]!==A||J[17]!==B||J[18]!==I)h=Q(z,{title:A,limit:B,showTimeInReset:!1,extraSubtext:I,maxWidth:X}),J[14]=z,J[15]=X,J[16]=A,J[17]=B,J[18]=I,J[19]=h;else h=J[19];return h}var pJ,kq,z0,jJ="Extra usage";var Aq=c(()=>{XX();qX();tZ();SJ();YX();v0();H0();w0();QX();SJ();QJ();ZX();JX();f0();XJ();TJ();GX();vY();eY();Zq();g();pJ=$(U0(),1),kq=$(s(),1),z0=$(s(),1)});function GW(Z){let J=fq.c(25),{onClose:q,context:X,defaultTab:W}=Z,[D,F]=k0.useState(W),[L,k]=k0.useState(!1),[P,K]=k0.useState(!1),[N,z]=k0.useState(!1),O=C0(),{rows:R}=Bq(V0()),A=O?R+1:Math.max(15,Math.min(Math.floor(R*0.8),30)),[B]=k0.useState(HX);Uq();let I;if(J[0]!==q||J[1]!==L)I=()=>{if(L)return;q("Status dialog dismissed",{display:"system"})},J[0]=q,J[1]=L,J[2]=I;else I=J[2];let h=I,S=!L&&!(D==="Config"&&P)&&!(D==="Gates"&&N),d;if(J[3]!==S)d={context:"Settings",isActive:S},J[3]=S,J[4]=d;else d=J[4];l("confirm:no",h,d);let t;if(J[5]!==X||J[6]!==B)t=Q(l0,{title:"Status",children:Q(NZ,{context:X,diagnosticsPromise:B})},"status"),J[5]=X,J[6]=B,J[7]=t;else t=J[7];let j;if(J[8]!==A||J[9]!==X||J[10]!==q)j=Q(l0,{title:"Config",children:Q(k0.Suspense,{fallback:null,children:Q(PY,{context:X,onClose:q,setTabsHidden:k,onIsSearchModeChange:K,contentHeight:A})})},"config"),J[8]=A,J[9]=X,J[10]=q,J[11]=j;else j=J[11];let F0;if(J[12]===Symbol.for("react.memo_cache_sentinel"))F0=[Q(l0,{title:"Usage",children:Q(cJ,{view:"global"})},"usage"),Q(l0,{title:"Session",children:Q(cJ,{view:"session"})},"session")],J[12]=F0;else F0=J[12];let i;if(J[13]!==A)i=[],J[13]=A,J[14]=i;else i=J[14];let Y0;if(J[15]!==t||J[16]!==j||J[17]!==i)Y0=[t,j,...F0,...i],J[15]=t,J[16]=j,J[17]=i,J[18]=Y0;else Y0=J[18];let r=Y0,q0=W!=="Config"&&W!=="Gates",$0=L||O?void 0:A,I0;if(J[19]!==D||J[20]!==$0||J[21]!==q0||J[22]!==r||J[23]!==L)I0=Q(Iq,{color:"permission",children:Q(Eq,{color:"permission",selectedTab:D,onTabChange:F,hidden:L,initialHeaderFocused:q0,contentHeight:$0,children:r})}),J[19]=D,J[20]=$0,J[21]=q0,J[22]=r,J[23]=L,J[24]=I0;else I0=J[24];return I0}function HX(){return FZ().catch(DX)}function DX(){return[]}var fq,k0;var zX=c(()=>{w0();KX();v0();zJ();OX();HY();RZ();kY();Aq();g();fq=$(U0(),1),k0=$(s(),1)});
|
|
3
|
+
export{GW as Wf,zX as Xf};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{OO as a,QO as Uq,WD as h,YD as Fq,bu as u,cu as g,eu as Wq,hu as c,im as S,iu as T,jm as Zq,ju as _q,km as V,ku as r,lm as $q,lu as Vq,om as p,pm as zq}from"./cli-0.5.14-jf3et57a.mjs";import{MU as d,NU as Yq}from"./cli-0.5.14-3pq7th32.mjs";import{$V as m,NV as w,OV as Nq,ZV as j,_V as Qq,bW as Xq}from"./cli-0.5.14-ya2ykcd6.mjs";import{DY as Lq,OW as v,PW as H,QW as y,YX as J,_X as N}from"./cli-0.5.14-r8f2hssc.mjs";import{a0 as _,b0 as q,c0 as G,d0 as B}from"./cli-0.5.14-tgeskqzs.mjs";import{e0 as Jq}from"./cli-0.5.14-anv6260e.mjs";import{Faa as Gq,saa as b}from"./cli-0.5.14-ndq9rhn7.mjs";import{Koa as e,Ooa as qq}from"./cli-0.5.14-hanfd2pz.mjs";function mq({onThemeSelect:F,showIntroText:I=!1,helpText:X="",showHelpTextBelow:O=!1,hideEscToCancel:x=!1,skipExitHandling:$=!1,onCancel:A}){let[U]=v(),k=H(),{columns:l}=w(),Y=Q.useMemo(()=>c(),[]),Z=Y===null?T(U):null,{setPreviewTheme:K,savePreview:M,cancelPreview:R}=y(),z=u((L)=>L.settings.syntaxHighlightingDisabled??!1),E=g();j("ThemePicker",!0);let W=S("theme:toggleSyntaxHighlighting","ThemePicker","ctrl+t"),i=Q.useCallback(()=>{if(Y===null){let L=!z;b("userSettings",{syntaxHighlightingDisabled:L}),E((P)=>({...P,settings:{...P.settings,syntaxHighlightingDisabled:L}}))}},[Y,z,E]);m("theme:toggleSyntaxHighlighting",i,{context:"ThemePicker"});let f=d($?()=>{}:void 0),D=Q.useMemo(()=>[...[],{label:"Dark mode",value:"dark"},{label:"Light mode",value:"light"},{label:"Dark mode (colorblind-friendly)",value:"dark-daltonized"},{label:"Light mode (colorblind-friendly)",value:"light-daltonized"},{label:"Dark mode (ANSI colors only)",value:"dark-ansi"},{label:"Light mode (ANSI colors only)",value:"light-ansi"}],[]),o=Q.useCallback((L)=>{K(L)},[K]),n=Q.useCallback((L)=>{M(),F(L)},[M,F]),s=Q.useCallback(()=>{if(R(),$)A?.();else a(0)},[R,A,$]),t=Y==="env"?`Syntax highlighting disabled (via CLAUDE_CODE_SYNTAX_HIGHLIGHT=${process.env.CLAUDE_CODE_SYNTAX_HIGHLIGHT})`:z?`Syntax highlighting disabled (${W} to enable)`:Z?`Syntax theme: ${Z.theme}${Z.source?` (from ${Z.source})`:""} (${W} to disable)`:`Syntax highlighting enabled (${W} to disable)`,C=G(J,{flexDirection:"column",gap:1,children:[G(J,{flexDirection:"column",gap:1,children:[I?q(N,{children:"Let's get started."}):q(N,{bold:!0,color:"permission",children:"Theme"}),G(J,{flexDirection:"column",children:[q(N,{bold:!0,children:"Choose the text style that looks best with your terminal"}),X&&!O?q(N,{dimColor:!0,children:X}):null]}),q(h,{options:D,onFocus:o,onChange:n,onCancel:s,visibleOptionCount:D.length,defaultValue:k,defaultFocusValue:k})]}),G(J,{flexDirection:"column",width:"100%",children:[q(J,{flexDirection:"column",borderTop:!0,borderBottom:!0,borderLeft:!1,borderRight:!1,borderStyle:"dashed",borderColor:"subtle",children:q(Iq,{patch:Oq,dim:!1,filePath:"demo.js",firstLine:null,width:l})},U),G(N,{dimColor:!0,children:[" ",t]})]})]});if(!I)return G(_,{children:[q(J,{flexDirection:"column",children:C}),O&&X?q(J,{marginLeft:3,children:q(N,{dimColor:!0,children:X})}):null,!x?q(J,{marginTop:1,children:q(N,{dimColor:!0,italic:!0,children:f.pending?G(_,{children:["Press ",f.keyName," again to exit"]}):G(p,{children:[q(V,{shortcut:"Enter",action:"select"}),q(V,{shortcut:"Esc",action:"cancel"})]})})}):null]});return C}var Q,Iq,Oq;var Aq=qq(()=>{Yq();Nq();Lq();Qq();Xq();Zq();Wq();Uq();Gq();Fq();zq();$q();_q();Vq();B();Q=e(Jq(),1),Iq=r,Oq={oldStart:1,newStart:1,oldLines:3,newLines:3,lines:[" function greet() {",'- console.log("Hello, World!");','+ console.log("Hello, Claude!");'," }"]}});
|
|
2
|
+
export{mq as pg,Aq as qg};
|