autohand-cli 0.7.14 → 0.8.2
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/README.md +97 -2
- package/assets/icon.png +0 -0
- package/dist/AgentRegistry-7LDL5HJH.js +10 -0
- package/dist/AgentRegistry-NQCLWABO.cjs +10 -0
- package/dist/{AutomodeManager-NGRAO2MH.js → AutomodeManager-MWLKGPZK.js} +2 -0
- package/dist/{AutomodeManager-ZKQMBM4T.cjs → AutomodeManager-NYIZNODK.cjs} +3 -1
- package/dist/CommunitySkillsCache-6QPRMTJO.js +8 -0
- package/dist/CommunitySkillsCache-GTQMOCCO.cjs +8 -0
- package/dist/{GitHubRegistryFetcher-US2JJID4.js → GitHubRegistryFetcher-6JQ5JEDZ.js} +1 -0
- package/dist/{GitHubRegistryFetcher-K744NNAJ.cjs → GitHubRegistryFetcher-S7QFUEKV.cjs} +1 -0
- package/dist/HookManager-Q2KYMCP4.cjs +7 -0
- package/dist/HookManager-TTP4Y6DC.js +7 -0
- package/dist/ImportWizard-35YBJ4AM.cjs +466 -0
- package/dist/ImportWizard-XH7CINCH.js +466 -0
- package/dist/LearnAdvisor-A4Q5PPBI.js +9 -0
- package/dist/LearnAdvisor-GASQD7HT.cjs +9 -0
- package/dist/McpClientManager-7RM6YT35.js +8 -0
- package/dist/McpClientManager-RKD7C6OY.cjs +8 -0
- package/dist/MemoryManager-GUNLRP5S.js +8 -0
- package/dist/MemoryManager-TNSGKDKX.cjs +8 -0
- package/dist/{PermissionManager-U5OMGR3L.js → PermissionManager-ATUV34LQ.js} +4 -3
- package/dist/PermissionManager-KMN53FJP.cjs +11 -0
- package/dist/ProjectProfiler-UMJJSOCE.js +194 -0
- package/dist/ProjectProfiler-ZDWR2ODG.cjs +194 -0
- package/dist/ProviderFactory-MR5B23QJ.js +9 -0
- package/dist/ProviderFactory-VFGCJJX6.cjs +9 -0
- package/dist/SessionManager-FEUAU3ZJ.cjs +10 -0
- package/dist/SessionManager-IKWAK2PI.js +10 -0
- package/dist/SkillsRegistry-KPQFTRIT.cjs +9 -0
- package/dist/SkillsRegistry-XJSKPDF2.js +9 -0
- package/dist/SubAgent-NYH6GWQ3.js +11 -0
- package/dist/SubAgent-PZKBDUBA.cjs +11 -0
- package/dist/{SyncApiClient-AYXYSOJM.js → SyncApiClient-LVIO4C2S.js} +1 -0
- package/dist/{SyncApiClient-ID3KXEMA.cjs → SyncApiClient-ZNYMT36M.cjs} +1 -0
- package/dist/about-HHTF2YFL.js +12 -0
- package/dist/about-JGRVNNQC.cjs +12 -0
- package/dist/actionExecutor-U6IBN2TU.cjs +19 -0
- package/dist/actionExecutor-XT5FW3W6.js +19 -0
- package/dist/add-dir-247K3XRY.js +10 -0
- package/dist/add-dir-GS4DXKKH.cjs +10 -0
- package/dist/agents/builtin/code-cleaner.md +14 -0
- package/dist/agents/builtin/docs-writer.md +14 -0
- package/dist/agents/builtin/researcher.md +14 -0
- package/dist/agents/builtin/reviewer.md +15 -0
- package/dist/agents/builtin/tester.md +15 -0
- package/dist/agents/builtin/todo-resolver.md +15 -0
- package/dist/agents-R6ZEFTVR.cjs +12 -0
- package/dist/agents-WJPQWQF2.js +12 -0
- package/dist/agents-new-HKVEIBDJ.js +14 -0
- package/dist/agents-new-X6GTHIO6.cjs +14 -0
- package/dist/assets/icon.png +0 -0
- package/dist/autoSkill-6TGBTEQD.js +20 -0
- package/dist/autoSkill-H4T6VVDA.cjs +20 -0
- package/dist/automode-BC6NVECO.js +10 -0
- package/dist/automode-WN2RSOGW.cjs +10 -0
- package/dist/{cc-UTTLESTY.js → cc-7LEIJ3KF.js} +1 -0
- package/dist/{cc-2W6M7J45.cjs → cc-Q5MM4AWC.cjs} +1 -0
- package/dist/{chunk-N4ZSG6JJ.cjs → chunk-22D2CNTP.cjs} +2 -2
- package/dist/chunk-245KJE5Y.cjs +55 -0
- package/dist/chunk-24QIWILL.js +51 -0
- package/dist/{chunk-MYNHJHDZ.js → chunk-2AA5MFES.js} +1 -1
- package/dist/{chunk-TSY7JHIV.cjs → chunk-33A755XB.cjs} +2 -2
- package/dist/chunk-33RSHBDH.js +131 -0
- package/dist/{chunk-QRGPAUST.js → chunk-34M3HWLR.js} +2 -2
- package/dist/{chunk-U7CZFKPL.cjs → chunk-3K2ESU53.cjs} +2 -2
- package/dist/{chunk-SIGWDEPS.cjs → chunk-3L53OA4E.cjs} +10 -10
- package/dist/chunk-3OEDGIFW.js +42 -0
- package/dist/chunk-3OTU3RS3.cjs +1607 -0
- package/dist/{chunk-MNSTWHK3.cjs → chunk-3PCTTUNW.cjs} +11 -11
- package/dist/{chunk-P5VDZ6PV.js → chunk-3PDTTAKJ.js} +1 -1
- package/dist/chunk-47CKWKEX.cjs +59 -0
- package/dist/{chunk-Z4J4W6YQ.cjs → chunk-4JNNTOGF.cjs} +2 -48
- package/dist/{chunk-GVZPIQWB.js → chunk-4PKF7WPD.js} +11 -5
- package/dist/{chunk-3S4DEIJP.cjs → chunk-5IXII4HX.cjs} +2 -2
- package/dist/{chunk-CRQKDBLD.js → chunk-5P2NXKP3.js} +98 -64
- package/dist/{chunk-DSKVMFRM.cjs → chunk-643VRA5S.cjs} +12 -4
- package/dist/{chunk-VVBBEYTH.cjs → chunk-6HYLHBQG.cjs} +10 -10
- package/dist/{chunk-L5ZFPWHY.js → chunk-6OYHF6MF.js} +12 -4
- package/dist/{chunk-BPTBKO7D.js → chunk-6RF7UKUS.js} +224 -37
- package/dist/{chunk-YHGTBPEC.js → chunk-6ZCULLCA.js} +1 -1
- package/dist/{chunk-VHBUKGRG.js → chunk-72FKPBT5.js} +4 -4
- package/dist/{chunk-2U5HFVRO.cjs → chunk-7BTSG4ME.cjs} +5165 -2194
- package/dist/chunk-7UOUW76C.js +603 -0
- package/dist/{chunk-FEVHH525.cjs → chunk-A4IJHHV7.cjs} +11 -5
- package/dist/{chunk-B6EBHCK2.cjs → chunk-AEJH23FO.cjs} +6 -6
- package/dist/{chunk-WLTVF77A.js → chunk-ALYU6VTM.js} +1 -1
- package/dist/{chunk-NMWEDN4Z.js → chunk-APIXPPMT.js} +5165 -2194
- package/dist/chunk-AS6RTLN7.cjs +203 -0
- package/dist/{chunk-BHV7CBNT.js → chunk-AYS2ASM7.js} +1 -1
- package/dist/{chunk-GRSVQ5YZ.js → chunk-AYSFIUFW.js} +44 -12
- package/dist/{chunk-NUHYCFHW.cjs → chunk-BVKXEQVG.cjs} +54 -65
- package/dist/chunk-BWN2CLLM.cjs +298 -0
- package/dist/{chunk-4HA7IHLJ.cjs → chunk-C5IJIM2V.cjs} +38 -16
- package/dist/{chunk-SRLY7K6J.js → chunk-CAMZTXV6.js} +2 -2
- package/dist/chunk-CDBPBM2K.cjs +29 -0
- package/dist/chunk-CNBKZEX5.cjs +109 -0
- package/dist/{chunk-WQUQ5JMM.js → chunk-CWMZKFTT.js} +4 -4
- package/dist/{chunk-CKN2BLHK.cjs → chunk-CZXGCVTR.cjs} +2 -2
- package/dist/{chunk-SZP4ULM5.cjs → chunk-DJDE4DTT.cjs} +17 -17
- package/dist/chunk-DN573ME7.cjs +1675 -0
- package/dist/chunk-DRE2RXBZ.js +4498 -0
- package/dist/chunk-DSPQEHDT.js +29 -0
- package/dist/{chunk-SFNT5DYE.cjs → chunk-DVUHHH3B.cjs} +4 -4
- package/dist/chunk-DVZOENQ7.cjs +58 -0
- package/dist/{chunk-PWLLLJHU.js → chunk-EGFT4PGW.js} +3 -1
- package/dist/chunk-EGMZDTSL.js +55 -0
- package/dist/chunk-EZMINVLU.js +123 -0
- package/dist/chunk-FHK7UDOJ.cjs +42 -0
- package/dist/{chunk-KWRUQRXR.js → chunk-FKSDEWDH.js} +44 -10
- package/dist/chunk-FMB3TSWP.cjs +218 -0
- package/dist/chunk-FW774QXH.js +1838 -0
- package/dist/{chunk-MY3TZER2.js → chunk-G27PQQFD.js} +1 -1
- package/dist/{chunk-Y2ZSH3YF.cjs → chunk-G3V4SFET.cjs} +57 -23
- package/dist/chunk-G4CAKI3V.js +58 -0
- package/dist/{chunk-FB6JWNJS.js → chunk-GBHDROGL.js} +54 -65
- package/dist/{chunk-DEAEO7RI.js → chunk-GJH7XMSK.js} +15 -1
- package/dist/chunk-GLBAF54O.js +218 -0
- package/dist/{chunk-S47TCZDL.js → chunk-H5SWOLG6.js} +7 -7
- package/dist/chunk-HBXAA3XB.js +83 -0
- package/dist/{chunk-63BXZQZW.js → chunk-HIVRCQS2.js} +26 -4
- package/dist/{chunk-WOGJXDBU.cjs → chunk-HLHTG5ZU.cjs} +18 -4
- package/dist/{chunk-FK2DVRPJ.js → chunk-HLQV64Y5.js} +170 -4
- package/dist/chunk-HOAHWIQ5.cjs +260 -0
- package/dist/{chunk-D2XFTCRP.js → chunk-HQ7YZKXE.js} +1 -1
- package/dist/{chunk-L42HTMMR.cjs → chunk-HTLINWX6.cjs} +2 -2
- package/dist/{chunk-PKOAXQKW.cjs → chunk-HVKOZ2VP.cjs} +11 -11
- package/dist/chunk-HXGBSJL5.cjs +27 -0
- package/dist/chunk-I5IW3T2Y.js +310 -0
- package/dist/chunk-IETRBBMP.cjs +603 -0
- package/dist/{chunk-MTALRU7R.cjs → chunk-IFFXSTOM.cjs} +3 -3
- package/dist/{chunk-V7YTCNMN.cjs → chunk-IKGWDOGU.cjs} +174 -8
- package/dist/chunk-IQ5RXU6O.js +1675 -0
- package/dist/{chunk-ZBIBLOZL.js → chunk-IVM5F2AE.js} +500 -317
- package/dist/chunk-J4Q7XR3G.js +260 -0
- package/dist/{chunk-XL77XYI2.cjs → chunk-J6QET7EF.cjs} +27 -7
- package/dist/{chunk-TQB222ZB.js → chunk-JCLYQ2JC.js} +2 -2
- package/dist/chunk-JSBRDJBE.js +30 -0
- package/dist/{chunk-XPOHYKR3.js → chunk-JX3DFKBI.js} +2 -2
- package/dist/chunk-JYTDYJVW.js +27 -0
- package/dist/{chunk-6SHHB2VD.js → chunk-KPELYZ6L.js} +2 -2
- package/dist/{chunk-ZLOTP56B.cjs → chunk-KWXVKLQ5.cjs} +5 -5
- package/dist/chunk-L3WAH3EM.cjs +131 -0
- package/dist/{chunk-ZXIQCYYV.cjs → chunk-LA7H35XM.cjs} +9 -9
- package/dist/chunk-LENHP55G.cjs +1838 -0
- package/dist/chunk-LJFUXC56.cjs +123 -0
- package/dist/{chunk-R5OO7MEB.cjs → chunk-LNMYK2F5.cjs} +22 -22
- package/dist/chunk-LQGVEP3E.js +109 -0
- package/dist/{chunk-KXAAEROY.js → chunk-LWUJFGOZ.js} +2 -2
- package/dist/chunk-MAKMSQMQ.cjs +504 -0
- package/dist/{chunk-BG4OQUKP.js → chunk-MBBY4ZIK.js} +1 -1
- package/dist/chunk-MSED7RH2.cjs +267 -0
- package/dist/{chunk-NMGF2KUN.js → chunk-MYISNQH4.js} +1 -1
- package/dist/chunk-N23UAW4I.js +59 -0
- package/dist/chunk-N254NRHT.cjs +30 -0
- package/dist/{chunk-TOTDRAWG.js → chunk-NDMIPTV4.js} +1 -1
- package/dist/{chunk-AIH6GUGB.cjs → chunk-NNPAM4HC.cjs} +5 -5
- package/dist/{chunk-HSPWX4Z2.cjs → chunk-O4IF4NJT.cjs} +231 -44
- package/dist/{chunk-DZHR34H6.cjs → chunk-OGV4WJ5L.cjs} +8 -8
- package/dist/chunk-OHUZKDGX.js +348 -0
- package/dist/{chunk-BRXIEKJ3.cjs → chunk-OLSBBZW6.cjs} +5 -5
- package/dist/{chunk-MILZEEUV.js → chunk-OOKY3HPZ.js} +9 -3
- package/dist/chunk-P47WPOXN.js +298 -0
- package/dist/{chunk-ULMPJUJW.cjs → chunk-PRRCJFU3.cjs} +23 -23
- package/dist/{chunk-SMHY3Q7B.cjs → chunk-Q7XSCYND.cjs} +54 -22
- package/dist/chunk-QCLYBIMM.cjs +51 -0
- package/dist/chunk-QMAKTSZB.cjs +48 -0
- package/dist/{chunk-DTFR3WD6.js → chunk-QNGEW5TC.js} +1 -1
- package/dist/chunk-QOXPOR5D.js +267 -0
- package/dist/chunk-R33VKSH5.cjs +348 -0
- package/dist/{chunk-RJP3SZ7Q.cjs → chunk-RD5XAJR2.cjs} +492 -309
- package/dist/chunk-RGR6ME5J.cjs +844 -0
- package/dist/{chunk-EOGKE5GD.cjs → chunk-RKJTGGMU.cjs} +221 -126
- package/dist/{chunk-GD4AFYJ3.js → chunk-RO6WYEWH.js} +24 -4
- package/dist/chunk-S52YW5ZQ.js +844 -0
- package/dist/{chunk-6DWXHBAY.js → chunk-SAHBLB3E.js} +222 -127
- package/dist/{chunk-JHOQABEF.js → chunk-SCXX4LW5.js} +5 -5
- package/dist/{chunk-GIZL57FE.cjs → chunk-SEKD5FH3.cjs} +3 -1
- package/dist/{chunk-JWPI6O5Z.js → chunk-SKV2F3NM.js} +31 -4
- package/dist/{chunk-FHUNAB2K.cjs → chunk-SKYG33B2.cjs} +33 -6
- package/dist/{chunk-BISFR6ZL.js → chunk-SLQAYV3W.js} +1 -1
- package/dist/{chunk-RFNCTE4V.cjs → chunk-SYVYLZZF.cjs} +2 -2
- package/dist/{chunk-3XJD56Z4.js → chunk-T73IDKDF.js} +10 -3
- package/dist/chunk-TBEGGJNC.cjs +310 -0
- package/dist/{chunk-RRZS5A53.js → chunk-TNZRZQ7Q.js} +1 -1
- package/dist/{chunk-CH4SPVFD.cjs → chunk-TXSDBGKX.cjs} +10 -3
- package/dist/chunk-U3WDY42C.cjs +42 -0
- package/dist/{chunk-425MT6Y5.cjs → chunk-U46VYPLR.cjs} +9 -9
- package/dist/{chunk-OLG7LZBD.js → chunk-VG34MG2U.js} +1 -1
- package/dist/{chunk-XDVG3NM4.js → chunk-W3X6PAC7.js} +2 -48
- package/dist/{chunk-LYMTYC67.js → chunk-WHE2SWHU.js} +2 -2
- package/dist/chunk-WM5PAOTQ.cjs +4498 -0
- package/dist/chunk-WNUVPKBW.js +42 -0
- package/dist/{chunk-EV53SLSB.cjs → chunk-WPVWQSL7.cjs} +4 -4
- package/dist/chunk-WQ3VJXZB.js +118 -0
- package/dist/{chunk-HMRDNRTH.js → chunk-X2MSVKDV.js} +2 -2
- package/dist/chunk-X3WS5LDG.js +504 -0
- package/dist/{chunk-43XS26AQ.cjs → chunk-X5VSP65C.cjs} +4 -4
- package/dist/{chunk-DSCQPWUB.cjs → chunk-X5YJ34FZ.cjs} +15 -15
- package/dist/chunk-XAV24VYN.js +48 -0
- package/dist/chunk-XDLH4EDL.cjs +118 -0
- package/dist/{chunk-X765A7J5.js → chunk-XRZEUWKF.js} +1 -1
- package/dist/{chunk-ZKZRFH37.cjs → chunk-XTB6VJVQ.cjs} +6 -6
- package/dist/{chunk-H3GBSPK5.js → chunk-XX2ZO7DS.js} +14 -6
- package/dist/{chunk-RUZB43HU.cjs → chunk-Y72HH2TF.cjs} +22 -14
- package/dist/chunk-YFXTE422.cjs +92 -0
- package/dist/{chunk-OSUWEUZE.js → chunk-YGN4CQIP.js} +1 -1
- package/dist/{chunk-KC5FPUOF.cjs → chunk-YRLYSQEQ.cjs} +2 -2
- package/dist/{chunk-3KBBARKO.js → chunk-YZXUDM5X.js} +85 -28
- package/dist/chunk-Z36XBUMX.cjs +83 -0
- package/dist/chunk-ZK6HOR62.js +92 -0
- package/dist/{chunk-PDKNHU5G.cjs → chunk-ZQE72E6W.cjs} +22 -16
- package/dist/chunk-ZVY2XD6T.js +1607 -0
- package/dist/{chunk-XBUMKEFN.cjs → chunk-ZYQMLKOK.cjs} +91 -34
- package/dist/clear-UO4MNWZW.cjs +12 -0
- package/dist/clear-ZJ5NYP6E.js +12 -0
- package/dist/communityInstaller-6KCFN7YZ.js +19 -0
- package/dist/communityInstaller-PVSOFDZD.cjs +19 -0
- package/dist/completion-MMF2PN2H.js +14 -0
- package/dist/completion-UI5WKHXI.cjs +14 -0
- package/dist/config-E7RINK4R.cjs +18 -0
- package/dist/config-ZN66VXPS.js +18 -0
- package/dist/constants-6CPCJ3DY.cjs +21 -0
- package/dist/{constants-V6J54N3X.js → constants-UFM5B232.js} +2 -1
- package/dist/{defaultHooks-WLMRQUXG.cjs → defaultHooks-RCXPHF4M.cjs} +3 -1
- package/dist/{defaultHooks-R56VYG7I.js → defaultHooks-RDRMER3Z.js} +2 -0
- package/dist/export-N4XIVDSL.cjs +12 -0
- package/dist/export-W22L4D5C.js +12 -0
- package/dist/extractSessionMemories-SDW2MVBQ.cjs +7 -0
- package/dist/extractSessionMemories-V7K42ZHW.js +7 -0
- package/dist/feedback-DR6ADSNE.cjs +15 -0
- package/dist/feedback-FEEAP4QW.js +15 -0
- package/dist/filesystem-3SGCW2BF.js +10 -0
- package/dist/filesystem-MCFXJQ6R.cjs +10 -0
- package/dist/formatters-6K7QVWQL.cjs +10 -0
- package/dist/formatters-DQHO5I36.js +10 -0
- package/dist/{help-LKKQU2TN.js → help-2BLR7L43.js} +3 -2
- package/dist/help-AQHGTS7P.cjs +12 -0
- package/dist/{history-AV4XBFRK.js → history-5FZ3M2AK.js} +3 -2
- package/dist/history-NIUDRMKA.cjs +14 -0
- package/dist/hooks-2EY4IPKV.js +13 -0
- package/dist/hooks-LJVORRIG.cjs +13 -0
- package/dist/i18n-ARDG2SMC.cjs +33 -0
- package/dist/{i18n-BSAPXM56.js → i18n-K7QOWIBH.js} +2 -1
- package/dist/ide-GFW6IJHD.js +12 -0
- package/dist/ide-N2ZNSSB3.cjs +12 -0
- package/dist/import-DFVN3KNZ.js +10 -0
- package/dist/import-QEME3E4T.cjs +170 -0
- package/dist/import-UXM3VK7B.js +170 -0
- package/dist/import-ZS6DPGU5.cjs +10 -0
- package/dist/index.cjs +11233 -11804
- package/dist/index.js +12594 -13165
- package/dist/init-PY75HA3S.cjs +10 -0
- package/dist/init-QNMWLAVY.js +10 -0
- package/dist/language-5UE4G2BT.cjs +18 -0
- package/dist/language-UXMHEZUJ.js +18 -0
- package/dist/learn-HJ3FLNZC.cjs +20 -0
- package/dist/learn-MVYS3RU5.js +20 -0
- package/dist/{lint-44UQJ673.cjs → lint-D5UOJWIK.cjs} +1 -0
- package/dist/{lint-TA2ZHVLM.js → lint-NJPZWVN2.js} +1 -0
- package/dist/{localProjectPermissions-WQYMGI42.js → localProjectPermissions-N77HA3XK.js} +3 -2
- package/dist/localProjectPermissions-UFSMNTBJ.cjs +18 -0
- package/dist/login-DSE7H63A.js +20 -0
- package/dist/login-V3MEWPKN.cjs +20 -0
- package/dist/logout-BMVCLKKW.js +18 -0
- package/dist/logout-XEG7FHOZ.cjs +18 -0
- package/dist/mcp-PYUR4PHO.js +18 -0
- package/dist/mcp-SG6JFLGC.cjs +18 -0
- package/dist/{mcp-install-2KVKRAMQ.cjs → mcp-install-G27HSS3Z.cjs} +26 -14
- package/dist/{mcp-install-77UXRN6R.js → mcp-install-VESN42PI.js} +21 -9
- package/dist/memory-4ZMMEZ2Z.js +10 -0
- package/dist/memory-QSGMVVGH.cjs +10 -0
- package/dist/message-JUBOK2VU.js +9 -0
- package/dist/message-ZJ5AYAMT.cjs +9 -0
- package/dist/model-NANLBZ4Z.cjs +10 -0
- package/dist/model-ZXNV4AF7.js +10 -0
- package/dist/new-5QJY5JP2.js +12 -0
- package/dist/new-PMMG55UX.cjs +12 -0
- package/dist/{patch-BAAQIYSW.js → patch-5F6VBIT3.js} +2 -0
- package/dist/{patch-J32X2QQP.cjs → patch-MOD7QC3D.cjs} +3 -1
- package/dist/permissions-LECTCJ4H.cjs +13 -0
- package/dist/permissions-VP5VGIBL.js +13 -0
- package/dist/{plan-JFGNRL2S.js → plan-G5CEKJI4.js} +1 -0
- package/dist/{plan-B3CW5DXJ.cjs → plan-QKOHE3LH.cjs} +1 -0
- package/dist/quit-BKOOPHU5.cjs +10 -0
- package/dist/quit-FVFNYACP.js +10 -0
- package/dist/registry-KWZGYJC2.js +2108 -0
- package/dist/registry-YN4FQPOO.cjs +2108 -0
- package/dist/resume-EXFQSQPH.js +13 -0
- package/dist/resume-PP2IQM5S.cjs +13 -0
- package/dist/search-C56FBN67.cjs +17 -0
- package/dist/search-XGZDYBF4.js +17 -0
- package/dist/{session-T3TAZ5ZU.cjs → session-BSU2L5UI.cjs} +1 -0
- package/dist/{session-H5QWKE5E.js → session-SZMRN5KG.js} +1 -0
- package/dist/sessions-54KI3F2Q.js +10 -0
- package/dist/sessions-DDTSPNVW.cjs +10 -0
- package/dist/settings-BDO37TTO.cjs +30 -0
- package/dist/settings-FHRDFPLK.js +30 -0
- package/dist/share-IERCTBGN.cjs +14 -0
- package/dist/share-TGROUE6R.js +14 -0
- package/dist/skills-6OL4OSGA.js +76 -0
- package/dist/skills-FYY6F2WV.cjs +76 -0
- package/dist/skills-OM4IGBAA.cjs +26 -0
- package/dist/skills-S3GRN323.js +26 -0
- package/dist/{skills-install-MQINL3EC.js → skills-install-6CSWC24P.js} +97 -26
- package/dist/{skills-install-IKJZN4G2.cjs → skills-install-O3LZ2ETC.cjs} +106 -35
- package/dist/skills-new-ALD2PTHN.js +15 -0
- package/dist/skills-new-PWLKK7GW.cjs +15 -0
- package/dist/slashCommands-L4ZD33LJ.js +75 -0
- package/dist/slashCommands-YY2VUUDF.cjs +75 -0
- package/dist/status-3PC5XWSS.cjs +11 -0
- package/dist/status-KCLVOYPD.js +11 -0
- package/dist/sync-6SDWG5RK.js +18 -0
- package/dist/sync-7JMZVEQD.cjs +40 -0
- package/dist/{sync-EXYX7HXW.js → sync-KWX67OUN.js} +3 -2
- package/dist/sync-WHURZL3U.cjs +18 -0
- package/dist/tasks-5FPBIFLC.js +9 -0
- package/dist/tasks-TXGKGNH6.cjs +9 -0
- package/dist/team-5YXP3JGR.js +9 -0
- package/dist/team-IIWEZKNR.cjs +9 -0
- package/dist/teammate-2KMKJXAM.cjs +139 -0
- package/dist/teammate-L6EZQ3I2.js +139 -0
- package/dist/theme-BE5A4FPN.cjs +18 -0
- package/dist/theme-YMFCQP7J.js +18 -0
- package/dist/ui/questionModal.cjs +7 -25
- package/dist/ui/questionModal.js +6 -24
- package/dist/undo-KZHUUZTD.cjs +10 -0
- package/dist/undo-NEIEHQVX.js +10 -0
- package/dist/update-TVAJMMBC.js +82 -0
- package/dist/update-Z6BIIQDC.cjs +82 -0
- package/package.json +10 -3
- package/dist/CommunitySkillsCache-ILWHWE5P.js +0 -7
- package/dist/CommunitySkillsCache-KHC6RUJW.cjs +0 -7
- package/dist/HookManager-X47HCM5G.cjs +0 -6
- package/dist/HookManager-ZXKHCD7U.js +0 -6
- package/dist/MemoryManager-6ZT7IDO5.cjs +0 -7
- package/dist/MemoryManager-AJGS5AKB.js +0 -7
- package/dist/PermissionManager-HG6W2DGU.cjs +0 -10
- package/dist/SessionManager-BJ2G6VV4.cjs +0 -9
- package/dist/SessionManager-ENPGYK5J.js +0 -9
- package/dist/SkillsRegistry-6ZFOCT25.cjs +0 -8
- package/dist/SkillsRegistry-C2SHOZ5D.js +0 -8
- package/dist/about-3BJTNSLK.js +0 -11
- package/dist/about-EABQNJGV.cjs +0 -11
- package/dist/add-dir-7FD4DMDA.cjs +0 -9
- package/dist/add-dir-LOYJ4YB5.js +0 -9
- package/dist/agents-2Y6ASV7C.js +0 -10
- package/dist/agents-UOSPKLQL.cjs +0 -10
- package/dist/agents-new-23NSGAM5.js +0 -13
- package/dist/agents-new-WI2EL7IJ.cjs +0 -13
- package/dist/automode-LGWTY3UX.js +0 -9
- package/dist/automode-WLBQ7MN7.cjs +0 -9
- package/dist/chunk-5UBW2BGC.js +0 -33
- package/dist/chunk-I6DBWNLN.cjs +0 -169
- package/dist/chunk-IZBCMJHJ.cjs +0 -33
- package/dist/completion-7WGMHKOR.cjs +0 -13
- package/dist/completion-KH33NSGP.js +0 -13
- package/dist/constants-RBQTR32A.cjs +0 -20
- package/dist/export-3QN3IH7A.js +0 -11
- package/dist/export-BI54X3MP.cjs +0 -11
- package/dist/feedback-CI4OIPOS.cjs +0 -14
- package/dist/feedback-GFPL5STE.js +0 -14
- package/dist/formatters-N5IJKYZY.cjs +0 -8
- package/dist/formatters-UG6VZJJ5.js +0 -8
- package/dist/help-CWMUGD3V.cjs +0 -11
- package/dist/history-73VBEMSI.cjs +0 -13
- package/dist/hooks-62UDQBGH.cjs +0 -12
- package/dist/hooks-XORDJD5X.js +0 -12
- package/dist/i18n-X2IU2EZD.cjs +0 -32
- package/dist/ide-RPKZALQV.js +0 -11
- package/dist/ide-YMNXJB6A.cjs +0 -11
- package/dist/init-J5HR4R7U.js +0 -9
- package/dist/init-JCC7RVMC.cjs +0 -9
- package/dist/language-AZISJCEZ.js +0 -16
- package/dist/language-F65RA6FZ.cjs +0 -16
- package/dist/localProjectPermissions-2EATUDZM.cjs +0 -17
- package/dist/login-5HLPMECE.js +0 -18
- package/dist/login-ISWYYBXP.cjs +0 -18
- package/dist/logout-3EKZM5J3.cjs +0 -16
- package/dist/logout-GE7TSZ24.js +0 -16
- package/dist/mcp-EW64QRFA.cjs +0 -15
- package/dist/mcp-VHS7AMF2.js +0 -15
- package/dist/memory-2I473RU3.js +0 -9
- package/dist/memory-JZ6NPSP3.cjs +0 -9
- package/dist/model-GXZLARPT.js +0 -9
- package/dist/model-Y274DBDO.cjs +0 -9
- package/dist/new-BG5VIGZ7.cjs +0 -9
- package/dist/new-YXFDQOA7.js +0 -9
- package/dist/permissions-QILEAGBP.cjs +0 -12
- package/dist/permissions-WVEOVMWO.js +0 -12
- package/dist/quit-NC32OEJG.cjs +0 -9
- package/dist/quit-WRRIGU33.js +0 -9
- package/dist/resume-GJIKIDPR.cjs +0 -12
- package/dist/resume-RMJNCAOK.js +0 -12
- package/dist/search-UIWIXB73.js +0 -14
- package/dist/search-WQNXDA2E.cjs +0 -14
- package/dist/sessions-HPFX2GDD.js +0 -9
- package/dist/sessions-SAQU6MFA.cjs +0 -9
- package/dist/share-2WH5ZVOO.cjs +0 -13
- package/dist/share-PSSWWVV5.js +0 -13
- package/dist/skills-LJZA6PVJ.js +0 -13
- package/dist/skills-YTYGART7.cjs +0 -13
- package/dist/skills-new-3WCU3CWB.js +0 -14
- package/dist/skills-new-O5LFVFZU.cjs +0 -14
- package/dist/slashCommands-7IRDOXOQ.cjs +0 -55
- package/dist/slashCommands-C6CAQA25.js +0 -55
- package/dist/status-4EDV2LSY.cjs +0 -10
- package/dist/status-NU7TJDCE.js +0 -10
- package/dist/sync-3GFSEIAZ.js +0 -16
- package/dist/sync-6M3WRKMH.cjs +0 -39
- package/dist/sync-CQNQDNTJ.cjs +0 -16
- package/dist/theme-EMJGULMI.cjs +0 -16
- package/dist/theme-FGDSXNU3.js +0 -16
- package/dist/undo-CTXQYE7C.cjs +0 -9
- package/dist/undo-HX2ZMECP.js +0 -9
|
@@ -1,71 +1,10 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var _chunkPGRH5Q77cjs = require('./chunk-PGRH5Q77.cjs');
|
|
6
|
-
|
|
7
5
|
|
|
8
|
-
var _chunkGIZL57FEcjs = require('./chunk-GIZL57FE.cjs');
|
|
9
|
-
|
|
10
|
-
// src/ui/theme/loader.ts
|
|
11
|
-
var _fs = require('fs');
|
|
12
|
-
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
13
|
-
var _os = require('os');
|
|
14
6
|
|
|
15
|
-
|
|
16
|
-
var COLOR_TOKENS = [
|
|
17
|
-
// Core UI
|
|
18
|
-
"accent",
|
|
19
|
-
"border",
|
|
20
|
-
"borderAccent",
|
|
21
|
-
"borderMuted",
|
|
22
|
-
"success",
|
|
23
|
-
"error",
|
|
24
|
-
"warning",
|
|
25
|
-
"muted",
|
|
26
|
-
"dim",
|
|
27
|
-
"text",
|
|
28
|
-
// Backgrounds & Content
|
|
29
|
-
"userMessageBg",
|
|
30
|
-
"userMessageText",
|
|
31
|
-
"toolPendingBg",
|
|
32
|
-
"toolSuccessBg",
|
|
33
|
-
"toolErrorBg",
|
|
34
|
-
"toolTitle",
|
|
35
|
-
"toolOutput",
|
|
36
|
-
// Diff Colors
|
|
37
|
-
"diffAdded",
|
|
38
|
-
"diffRemoved",
|
|
39
|
-
"diffContext",
|
|
40
|
-
// Syntax Highlighting
|
|
41
|
-
"syntaxComment",
|
|
42
|
-
"syntaxKeyword",
|
|
43
|
-
"syntaxFunction",
|
|
44
|
-
"syntaxVariable",
|
|
45
|
-
"syntaxString",
|
|
46
|
-
"syntaxNumber",
|
|
47
|
-
"syntaxType",
|
|
48
|
-
"syntaxOperator",
|
|
49
|
-
"syntaxPunctuation",
|
|
50
|
-
// Markdown
|
|
51
|
-
"mdHeading",
|
|
52
|
-
"mdLink",
|
|
53
|
-
"mdLinkUrl",
|
|
54
|
-
"mdCode",
|
|
55
|
-
"mdCodeBlock",
|
|
56
|
-
"mdCodeBlockBorder",
|
|
57
|
-
"mdQuote",
|
|
58
|
-
"mdQuoteBorder",
|
|
59
|
-
"mdHr",
|
|
60
|
-
"mdListBullet"
|
|
61
|
-
];
|
|
62
|
-
function isHexColor(value) {
|
|
63
|
-
if (typeof value !== "string") return false;
|
|
64
|
-
return /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(value);
|
|
65
|
-
}
|
|
66
|
-
function is256ColorIndex(value) {
|
|
67
|
-
return typeof value === "number" && value >= 0 && value <= 255 && Number.isInteger(value);
|
|
68
|
-
}
|
|
7
|
+
var _chunkPGRH5Q77cjs = require('./chunk-PGRH5Q77.cjs');
|
|
69
8
|
|
|
70
9
|
// src/ui/theme/themes.ts
|
|
71
10
|
var darkTheme = {
|
|
@@ -102,7 +41,7 @@ var darkTheme = {
|
|
|
102
41
|
borderMuted: "gray800",
|
|
103
42
|
success: "green",
|
|
104
43
|
error: "red",
|
|
105
|
-
warning: "
|
|
44
|
+
warning: "orange",
|
|
106
45
|
muted: "gray500",
|
|
107
46
|
dim: "gray200",
|
|
108
47
|
text: "gray200",
|
|
@@ -371,6 +310,92 @@ var tuiTheme = {
|
|
|
371
310
|
mdListBullet: "pauaTeal"
|
|
372
311
|
}
|
|
373
312
|
};
|
|
313
|
+
var githubDarkTheme = {
|
|
314
|
+
name: "github-dark",
|
|
315
|
+
vars: {
|
|
316
|
+
// GitHub Dark ANSI palette (colors 0–15)
|
|
317
|
+
gray: "#6e7681",
|
|
318
|
+
// ANSI 0/8 - muted gray
|
|
319
|
+
red: "#f97583",
|
|
320
|
+
// ANSI 1 - coral red
|
|
321
|
+
green: "#3fb950",
|
|
322
|
+
// ANSI 2 - green
|
|
323
|
+
yellow: "#d29922",
|
|
324
|
+
// ANSI 3 - orange/yellow
|
|
325
|
+
blue: "#79c0ff",
|
|
326
|
+
// ANSI 4 - blue
|
|
327
|
+
purple: "#d2a8ff",
|
|
328
|
+
// ANSI 5 - purple
|
|
329
|
+
cyan: "#56d4dd",
|
|
330
|
+
// ANSI 6 - cyan
|
|
331
|
+
lightGray: "#8b949e",
|
|
332
|
+
// ANSI 7 - light gray
|
|
333
|
+
brightRed: "#ffa198",
|
|
334
|
+
// ANSI 9 - light pink
|
|
335
|
+
brightGreen: "#56d364",
|
|
336
|
+
// ANSI 10 - light green
|
|
337
|
+
brightYellow: "#e3b341",
|
|
338
|
+
// ANSI 11 - light orange
|
|
339
|
+
brightBlue: "#a5d6ff",
|
|
340
|
+
// ANSI 12 - light blue
|
|
341
|
+
brightCyan: "#76e4f7",
|
|
342
|
+
// ANSI 14 - light cyan
|
|
343
|
+
white: "#ffffff",
|
|
344
|
+
// ANSI 15 - white
|
|
345
|
+
// GitHub Dark semantic backgrounds
|
|
346
|
+
bg: "#0d1117",
|
|
347
|
+
bgSurface: "#161b22",
|
|
348
|
+
bgOverlay: "#1c2128",
|
|
349
|
+
borderDefault: "#30363d",
|
|
350
|
+
fgDefault: "#e6edf3"
|
|
351
|
+
},
|
|
352
|
+
colors: {
|
|
353
|
+
// Core UI
|
|
354
|
+
accent: "blue",
|
|
355
|
+
border: "borderDefault",
|
|
356
|
+
borderAccent: "blue",
|
|
357
|
+
borderMuted: "#21262d",
|
|
358
|
+
success: "green",
|
|
359
|
+
error: "red",
|
|
360
|
+
warning: "yellow",
|
|
361
|
+
muted: "lightGray",
|
|
362
|
+
dim: "fgDefault",
|
|
363
|
+
text: "fgDefault",
|
|
364
|
+
// Backgrounds & Content
|
|
365
|
+
userMessageBg: "bgSurface",
|
|
366
|
+
userMessageText: "fgDefault",
|
|
367
|
+
toolPendingBg: "bgOverlay",
|
|
368
|
+
toolSuccessBg: "#0f2d16",
|
|
369
|
+
toolErrorBg: "#3d1418",
|
|
370
|
+
toolTitle: "blue",
|
|
371
|
+
toolOutput: "lightGray",
|
|
372
|
+
// Diff Colors
|
|
373
|
+
diffAdded: "green",
|
|
374
|
+
diffRemoved: "red",
|
|
375
|
+
diffContext: "lightGray",
|
|
376
|
+
// Syntax Highlighting
|
|
377
|
+
syntaxComment: "gray",
|
|
378
|
+
syntaxKeyword: "red",
|
|
379
|
+
syntaxFunction: "purple",
|
|
380
|
+
syntaxVariable: "brightBlue",
|
|
381
|
+
syntaxString: "brightBlue",
|
|
382
|
+
syntaxNumber: "blue",
|
|
383
|
+
syntaxType: "brightRed",
|
|
384
|
+
syntaxOperator: "red",
|
|
385
|
+
syntaxPunctuation: "lightGray",
|
|
386
|
+
// Markdown
|
|
387
|
+
mdHeading: "blue",
|
|
388
|
+
mdLink: "blue",
|
|
389
|
+
mdLinkUrl: "lightGray",
|
|
390
|
+
mdCode: "brightCyan",
|
|
391
|
+
mdCodeBlock: "fgDefault",
|
|
392
|
+
mdCodeBlockBorder: "borderDefault",
|
|
393
|
+
mdQuote: "lightGray",
|
|
394
|
+
mdQuoteBorder: "borderDefault",
|
|
395
|
+
mdHr: "borderDefault",
|
|
396
|
+
mdListBullet: "blue"
|
|
397
|
+
}
|
|
398
|
+
};
|
|
374
399
|
var lightTheme = {
|
|
375
400
|
name: "light",
|
|
376
401
|
vars: {
|
|
@@ -449,12 +474,335 @@ var builtInThemes = {
|
|
|
449
474
|
light: lightTheme,
|
|
450
475
|
dracula: draculaTheme,
|
|
451
476
|
sandy: sandyTheme,
|
|
452
|
-
tui: tuiTheme
|
|
477
|
+
tui: tuiTheme,
|
|
478
|
+
"github-dark": githubDarkTheme
|
|
453
479
|
};
|
|
454
480
|
function getDefaultThemeName() {
|
|
455
481
|
return "dark";
|
|
456
482
|
}
|
|
457
483
|
|
|
484
|
+
// src/ui/theme/loader.ts
|
|
485
|
+
var _fs = require('fs');
|
|
486
|
+
var _path = require('path');
|
|
487
|
+
var _os = require('os');
|
|
488
|
+
|
|
489
|
+
// src/ui/theme/types.ts
|
|
490
|
+
var COLOR_TOKENS = [
|
|
491
|
+
// Core UI
|
|
492
|
+
"accent",
|
|
493
|
+
"border",
|
|
494
|
+
"borderAccent",
|
|
495
|
+
"borderMuted",
|
|
496
|
+
"success",
|
|
497
|
+
"error",
|
|
498
|
+
"warning",
|
|
499
|
+
"muted",
|
|
500
|
+
"dim",
|
|
501
|
+
"text",
|
|
502
|
+
// Backgrounds & Content
|
|
503
|
+
"userMessageBg",
|
|
504
|
+
"userMessageText",
|
|
505
|
+
"toolPendingBg",
|
|
506
|
+
"toolSuccessBg",
|
|
507
|
+
"toolErrorBg",
|
|
508
|
+
"toolTitle",
|
|
509
|
+
"toolOutput",
|
|
510
|
+
// Diff Colors
|
|
511
|
+
"diffAdded",
|
|
512
|
+
"diffRemoved",
|
|
513
|
+
"diffContext",
|
|
514
|
+
// Syntax Highlighting
|
|
515
|
+
"syntaxComment",
|
|
516
|
+
"syntaxKeyword",
|
|
517
|
+
"syntaxFunction",
|
|
518
|
+
"syntaxVariable",
|
|
519
|
+
"syntaxString",
|
|
520
|
+
"syntaxNumber",
|
|
521
|
+
"syntaxType",
|
|
522
|
+
"syntaxOperator",
|
|
523
|
+
"syntaxPunctuation",
|
|
524
|
+
// Markdown
|
|
525
|
+
"mdHeading",
|
|
526
|
+
"mdLink",
|
|
527
|
+
"mdLinkUrl",
|
|
528
|
+
"mdCode",
|
|
529
|
+
"mdCodeBlock",
|
|
530
|
+
"mdCodeBlockBorder",
|
|
531
|
+
"mdQuote",
|
|
532
|
+
"mdQuoteBorder",
|
|
533
|
+
"mdHr",
|
|
534
|
+
"mdListBullet"
|
|
535
|
+
];
|
|
536
|
+
function isHexColor(value) {
|
|
537
|
+
if (typeof value !== "string") return false;
|
|
538
|
+
return /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(value);
|
|
539
|
+
}
|
|
540
|
+
function is256ColorIndex(value) {
|
|
541
|
+
return typeof value === "number" && value >= 0 && value <= 255 && Number.isInteger(value);
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
// src/ui/theme/ghosttyLoader.ts
|
|
545
|
+
|
|
546
|
+
var _child_process = require('child_process');
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
function getGhosttyThemeDirs() {
|
|
550
|
+
const dirs = [];
|
|
551
|
+
if (_os.platform.call(void 0, ) === "darwin") {
|
|
552
|
+
dirs.push("/Applications/Ghostty.app/Contents/Resources/ghostty/themes");
|
|
553
|
+
}
|
|
554
|
+
const xdgDataDirs = _nullishCoalesce(_optionalChain([process, 'access', _ => _.env, 'access', _2 => _2.XDG_DATA_DIRS, 'optionalAccess', _3 => _3.split, 'call', _4 => _4(":")]), () => ( ["/usr/share", "/usr/local/share"]));
|
|
555
|
+
for (const dir of xdgDataDirs) {
|
|
556
|
+
dirs.push(_path.join.call(void 0, dir, "ghostty", "themes"));
|
|
557
|
+
}
|
|
558
|
+
const configHome = _nullishCoalesce(process.env.XDG_CONFIG_HOME, () => ( _path.join.call(void 0, _nullishCoalesce(process.env.HOME, () => ( "")), ".config")));
|
|
559
|
+
dirs.push(_path.join.call(void 0, configHome, "ghostty", "themes"));
|
|
560
|
+
return dirs;
|
|
561
|
+
}
|
|
562
|
+
function findGhosttyThemesDir() {
|
|
563
|
+
for (const dir of getGhosttyThemeDirs()) {
|
|
564
|
+
if (_fs.existsSync.call(void 0, dir)) {
|
|
565
|
+
return dir;
|
|
566
|
+
}
|
|
567
|
+
}
|
|
568
|
+
return null;
|
|
569
|
+
}
|
|
570
|
+
function parseGhosttyTheme(content) {
|
|
571
|
+
const palette = /* @__PURE__ */ new Map();
|
|
572
|
+
let background = "#1a1a1a";
|
|
573
|
+
let foreground = "#e0e0e0";
|
|
574
|
+
let cursorColor;
|
|
575
|
+
let cursorText;
|
|
576
|
+
let selectionBackground;
|
|
577
|
+
let selectionForeground;
|
|
578
|
+
for (const line of content.split("\n")) {
|
|
579
|
+
const trimmed = line.trim();
|
|
580
|
+
if (!trimmed || trimmed.startsWith("#")) continue;
|
|
581
|
+
const eqIdx = trimmed.indexOf("=");
|
|
582
|
+
if (eqIdx === -1) continue;
|
|
583
|
+
const key = trimmed.slice(0, eqIdx).trim();
|
|
584
|
+
const value = trimmed.slice(eqIdx + 1).trim();
|
|
585
|
+
if (key === "palette") {
|
|
586
|
+
const paletteEq = value.indexOf("=");
|
|
587
|
+
if (paletteEq !== -1) {
|
|
588
|
+
const idx = parseInt(value.slice(0, paletteEq), 10);
|
|
589
|
+
const color = value.slice(paletteEq + 1).trim();
|
|
590
|
+
if (!isNaN(idx) && idx >= 0 && idx <= 15 && /^#[0-9a-fA-F]{6}$/.test(color)) {
|
|
591
|
+
palette.set(idx, color);
|
|
592
|
+
}
|
|
593
|
+
}
|
|
594
|
+
} else if (key === "background") {
|
|
595
|
+
if (/^#[0-9a-fA-F]{6}$/.test(value)) background = value;
|
|
596
|
+
} else if (key === "foreground") {
|
|
597
|
+
if (/^#[0-9a-fA-F]{6}$/.test(value)) foreground = value;
|
|
598
|
+
} else if (key === "cursor-color") {
|
|
599
|
+
if (/^#[0-9a-fA-F]{6}$/.test(value)) cursorColor = value;
|
|
600
|
+
} else if (key === "cursor-text") {
|
|
601
|
+
if (/^#[0-9a-fA-F]{6}$/.test(value)) cursorText = value;
|
|
602
|
+
} else if (key === "selection-background") {
|
|
603
|
+
if (/^#[0-9a-fA-F]{6}$/.test(value)) selectionBackground = value;
|
|
604
|
+
} else if (key === "selection-foreground") {
|
|
605
|
+
if (/^#[0-9a-fA-F]{6}$/.test(value)) selectionForeground = value;
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
return { palette, background, foreground, cursorColor, cursorText, selectionBackground, selectionForeground };
|
|
609
|
+
}
|
|
610
|
+
function adjustBrightness(hex, factor) {
|
|
611
|
+
const r = parseInt(hex.slice(1, 3), 16);
|
|
612
|
+
const g = parseInt(hex.slice(3, 5), 16);
|
|
613
|
+
const b = parseInt(hex.slice(5, 7), 16);
|
|
614
|
+
const clamp = (n) => Math.max(0, Math.min(255, Math.round(n)));
|
|
615
|
+
return `#${clamp(r * factor).toString(16).padStart(2, "0")}${clamp(g * factor).toString(16).padStart(2, "0")}${clamp(b * factor).toString(16).padStart(2, "0")}`;
|
|
616
|
+
}
|
|
617
|
+
function mixColors(hex1, hex2, ratio) {
|
|
618
|
+
const r1 = parseInt(hex1.slice(1, 3), 16);
|
|
619
|
+
const g1 = parseInt(hex1.slice(3, 5), 16);
|
|
620
|
+
const b1 = parseInt(hex1.slice(5, 7), 16);
|
|
621
|
+
const r2 = parseInt(hex2.slice(1, 3), 16);
|
|
622
|
+
const g2 = parseInt(hex2.slice(3, 5), 16);
|
|
623
|
+
const b2 = parseInt(hex2.slice(5, 7), 16);
|
|
624
|
+
const clamp = (n) => Math.max(0, Math.min(255, Math.round(n)));
|
|
625
|
+
const r = clamp(r1 + (r2 - r1) * ratio);
|
|
626
|
+
const g = clamp(g1 + (g2 - g1) * ratio);
|
|
627
|
+
const b = clamp(b1 + (b2 - b1) * ratio);
|
|
628
|
+
return `#${r.toString(16).padStart(2, "0")}${g.toString(16).padStart(2, "0")}${b.toString(16).padStart(2, "0")}`;
|
|
629
|
+
}
|
|
630
|
+
function getLuminance(hex) {
|
|
631
|
+
const r = parseInt(hex.slice(1, 3), 16) / 255;
|
|
632
|
+
const g = parseInt(hex.slice(3, 5), 16) / 255;
|
|
633
|
+
const b = parseInt(hex.slice(5, 7), 16) / 255;
|
|
634
|
+
return 0.2126 * r + 0.7152 * g + 0.0722 * b;
|
|
635
|
+
}
|
|
636
|
+
function ghosttyPaletteToTheme(name, gp) {
|
|
637
|
+
const p = (idx, fallback) => _nullishCoalesce(gp.palette.get(idx), () => ( fallback));
|
|
638
|
+
const bg = gp.background;
|
|
639
|
+
const fg = gp.foreground;
|
|
640
|
+
const isDark = getLuminance(bg) < 0.5;
|
|
641
|
+
const bgSurface = isDark ? adjustBrightness(bg, 1.3) : adjustBrightness(bg, 0.95);
|
|
642
|
+
const bgOverlay = isDark ? adjustBrightness(bg, 1.5) : adjustBrightness(bg, 0.9);
|
|
643
|
+
const borderColor = isDark ? adjustBrightness(bg, 2) : adjustBrightness(bg, 0.8);
|
|
644
|
+
const borderMuted = isDark ? adjustBrightness(bg, 1.6) : adjustBrightness(bg, 0.88);
|
|
645
|
+
const green = p(2, "#4caf50");
|
|
646
|
+
const red = p(1, "#f44336");
|
|
647
|
+
const toolSuccessBg = mixColors(bg, green, 0.15);
|
|
648
|
+
const toolErrorBg = mixColors(bg, red, 0.15);
|
|
649
|
+
return {
|
|
650
|
+
name,
|
|
651
|
+
vars: {
|
|
652
|
+
// ANSI palette
|
|
653
|
+
black: p(0, "#000000"),
|
|
654
|
+
red: p(1, "#cc0000"),
|
|
655
|
+
green: p(2, "#4caf50"),
|
|
656
|
+
yellow: p(3, "#cdcd00"),
|
|
657
|
+
blue: p(4, "#0000cd"),
|
|
658
|
+
magenta: p(5, "#cd00cd"),
|
|
659
|
+
cyan: p(6, "#00cdcd"),
|
|
660
|
+
white: p(7, "#e5e5e5"),
|
|
661
|
+
brightBlack: p(8, "#666666"),
|
|
662
|
+
brightRed: p(9, "#ff0000"),
|
|
663
|
+
brightGreen: p(10, "#00ff00"),
|
|
664
|
+
brightYellow: p(11, "#ffff00"),
|
|
665
|
+
brightBlue: p(12, "#0000ff"),
|
|
666
|
+
brightMagenta: p(13, "#ff00ff"),
|
|
667
|
+
brightCyan: p(14, "#00ffff"),
|
|
668
|
+
brightWhite: p(15, "#ffffff"),
|
|
669
|
+
// Derived
|
|
670
|
+
bg,
|
|
671
|
+
fg,
|
|
672
|
+
bgSurface,
|
|
673
|
+
bgOverlay,
|
|
674
|
+
borderColor,
|
|
675
|
+
borderMuted,
|
|
676
|
+
toolSuccessBg,
|
|
677
|
+
toolErrorBg
|
|
678
|
+
},
|
|
679
|
+
colors: {
|
|
680
|
+
// Core UI
|
|
681
|
+
accent: "blue",
|
|
682
|
+
border: "borderColor",
|
|
683
|
+
borderAccent: "blue",
|
|
684
|
+
borderMuted: "borderMuted",
|
|
685
|
+
success: "green",
|
|
686
|
+
error: "red",
|
|
687
|
+
warning: "yellow",
|
|
688
|
+
muted: "brightBlack",
|
|
689
|
+
dim: "fg",
|
|
690
|
+
text: "fg",
|
|
691
|
+
// Backgrounds & Content
|
|
692
|
+
userMessageBg: "bgSurface",
|
|
693
|
+
userMessageText: "fg",
|
|
694
|
+
toolPendingBg: "bgOverlay",
|
|
695
|
+
toolSuccessBg: "toolSuccessBg",
|
|
696
|
+
toolErrorBg: "toolErrorBg",
|
|
697
|
+
toolTitle: "blue",
|
|
698
|
+
toolOutput: "white",
|
|
699
|
+
// Diff Colors
|
|
700
|
+
diffAdded: "green",
|
|
701
|
+
diffRemoved: "red",
|
|
702
|
+
diffContext: "brightBlack",
|
|
703
|
+
// Syntax Highlighting
|
|
704
|
+
syntaxComment: "brightBlack",
|
|
705
|
+
syntaxKeyword: "magenta",
|
|
706
|
+
syntaxFunction: "blue",
|
|
707
|
+
syntaxVariable: "cyan",
|
|
708
|
+
syntaxString: "green",
|
|
709
|
+
syntaxNumber: "yellow",
|
|
710
|
+
syntaxType: "brightCyan",
|
|
711
|
+
syntaxOperator: "red",
|
|
712
|
+
syntaxPunctuation: "white",
|
|
713
|
+
// Markdown
|
|
714
|
+
mdHeading: "blue",
|
|
715
|
+
mdLink: "cyan",
|
|
716
|
+
mdLinkUrl: "brightBlack",
|
|
717
|
+
mdCode: "yellow",
|
|
718
|
+
mdCodeBlock: "fg",
|
|
719
|
+
mdCodeBlockBorder: "borderColor",
|
|
720
|
+
mdQuote: "white",
|
|
721
|
+
mdQuoteBorder: "brightBlack",
|
|
722
|
+
mdHr: "borderColor",
|
|
723
|
+
mdListBullet: "cyan"
|
|
724
|
+
}
|
|
725
|
+
};
|
|
726
|
+
}
|
|
727
|
+
function loadGhosttyTheme(themeName) {
|
|
728
|
+
const dir = findGhosttyThemesDir();
|
|
729
|
+
if (!dir) return null;
|
|
730
|
+
const filePath = _path.join.call(void 0, dir, themeName);
|
|
731
|
+
if (!_fs.existsSync.call(void 0, filePath)) return null;
|
|
732
|
+
try {
|
|
733
|
+
const content = _fs.readFileSync.call(void 0, filePath, "utf-8");
|
|
734
|
+
const palette = parseGhosttyTheme(content);
|
|
735
|
+
return ghosttyPaletteToTheme(themeName, palette);
|
|
736
|
+
} catch (e) {
|
|
737
|
+
return null;
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
function isInsideGhostty() {
|
|
741
|
+
return process.env.TERM_PROGRAM === "ghostty";
|
|
742
|
+
}
|
|
743
|
+
function detectSystemAppearance() {
|
|
744
|
+
if (_os.platform.call(void 0, ) === "darwin") {
|
|
745
|
+
try {
|
|
746
|
+
const result = _child_process.execSync.call(void 0, "defaults read -g AppleInterfaceStyle 2>/dev/null", {
|
|
747
|
+
encoding: "utf-8",
|
|
748
|
+
timeout: 500,
|
|
749
|
+
stdio: ["pipe", "pipe", "pipe"]
|
|
750
|
+
});
|
|
751
|
+
return result.trim().toLowerCase() === "dark" ? "dark" : "light";
|
|
752
|
+
} catch (e2) {
|
|
753
|
+
return "light";
|
|
754
|
+
}
|
|
755
|
+
}
|
|
756
|
+
const gtkTheme = _nullishCoalesce(process.env.GTK_THEME, () => ( ""));
|
|
757
|
+
if (gtkTheme.toLowerCase().includes("dark")) return "dark";
|
|
758
|
+
return "dark";
|
|
759
|
+
}
|
|
760
|
+
function readGhosttyConfigTheme() {
|
|
761
|
+
const configDir = process.env.XDG_CONFIG_HOME ? _path.join.call(void 0, process.env.XDG_CONFIG_HOME, "ghostty") : _path.join.call(void 0, _os.homedir.call(void 0, ), ".config", "ghostty");
|
|
762
|
+
const configPath = _path.join.call(void 0, configDir, "config");
|
|
763
|
+
if (!_fs.existsSync.call(void 0, configPath)) return null;
|
|
764
|
+
try {
|
|
765
|
+
const content = _fs.readFileSync.call(void 0, configPath, "utf-8");
|
|
766
|
+
let themeLine;
|
|
767
|
+
for (const line of content.split("\n")) {
|
|
768
|
+
const trimmed = line.trim();
|
|
769
|
+
if (trimmed.startsWith("#") || !trimmed.startsWith("theme")) continue;
|
|
770
|
+
const eq = trimmed.indexOf("=");
|
|
771
|
+
if (eq === -1) continue;
|
|
772
|
+
const key = trimmed.slice(0, eq).trim();
|
|
773
|
+
if (key === "theme") {
|
|
774
|
+
themeLine = trimmed.slice(eq + 1).trim();
|
|
775
|
+
}
|
|
776
|
+
}
|
|
777
|
+
if (!themeLine) return null;
|
|
778
|
+
if (themeLine.includes(",") && (themeLine.includes("dark:") || themeLine.includes("light:"))) {
|
|
779
|
+
const parts = themeLine.split(",").map((p) => p.trim());
|
|
780
|
+
let dark;
|
|
781
|
+
let light;
|
|
782
|
+
for (const part of parts) {
|
|
783
|
+
if (part.startsWith("dark:")) dark = part.slice("dark:".length).trim();
|
|
784
|
+
if (part.startsWith("light:")) light = part.slice("light:".length).trim();
|
|
785
|
+
}
|
|
786
|
+
return { dark, light };
|
|
787
|
+
}
|
|
788
|
+
return { single: themeLine };
|
|
789
|
+
} catch (e3) {
|
|
790
|
+
return null;
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
function detectGhosttyTheme() {
|
|
794
|
+
if (!isInsideGhostty()) return null;
|
|
795
|
+
const config = readGhosttyConfigTheme();
|
|
796
|
+
if (!config) return null;
|
|
797
|
+
if (config.single) {
|
|
798
|
+
return config.single;
|
|
799
|
+
}
|
|
800
|
+
const appearance = detectSystemAppearance();
|
|
801
|
+
if (appearance === "dark" && config.dark) return config.dark;
|
|
802
|
+
if (appearance === "light" && config.light) return config.light;
|
|
803
|
+
return _nullishCoalesce(_nullishCoalesce(config.dark, () => ( config.light)), () => ( null));
|
|
804
|
+
}
|
|
805
|
+
|
|
458
806
|
// src/ui/theme/loader.ts
|
|
459
807
|
var CUSTOM_THEMES_DIR = _path.join.call(void 0, _os.homedir.call(void 0, ), ".autohand", "themes");
|
|
460
808
|
var ThemeLoadError = class extends Error {
|
|
@@ -491,6 +839,10 @@ function getThemeDefinition(themeName) {
|
|
|
491
839
|
if (_fs.existsSync.call(void 0, customThemePath)) {
|
|
492
840
|
return loadCustomTheme(customThemePath, themeName);
|
|
493
841
|
}
|
|
842
|
+
const ghosttyTheme = loadGhosttyTheme(themeName);
|
|
843
|
+
if (ghosttyTheme) {
|
|
844
|
+
return ghosttyTheme;
|
|
845
|
+
}
|
|
494
846
|
throw new ThemeLoadError(`Theme "${themeName}" not found`, themeName);
|
|
495
847
|
}
|
|
496
848
|
function loadCustomTheme(filePath, themeName) {
|
|
@@ -583,25 +935,59 @@ function resolveColorValue(value, vars, themeName, visited) {
|
|
|
583
935
|
}
|
|
584
936
|
throw new ThemeLoadError(`Invalid color value: ${value}`, themeName);
|
|
585
937
|
}
|
|
938
|
+
var CURATED_GHOSTTY_THEMES = [
|
|
939
|
+
"Atom One Dark",
|
|
940
|
+
"Ayu Mirage",
|
|
941
|
+
"Catppuccin Frappe",
|
|
942
|
+
"Catppuccin Latte",
|
|
943
|
+
"Catppuccin Macchiato",
|
|
944
|
+
"Catppuccin Mocha",
|
|
945
|
+
"Everforest Dark Hard",
|
|
946
|
+
"Gruvbox Dark",
|
|
947
|
+
"Gruvbox Light",
|
|
948
|
+
"Kanagawa Wave",
|
|
949
|
+
"Monokai Pro",
|
|
950
|
+
"Nord",
|
|
951
|
+
"One Half Dark",
|
|
952
|
+
"Rose Pine",
|
|
953
|
+
"Rose Pine Dawn",
|
|
954
|
+
"Rose Pine Moon",
|
|
955
|
+
"Solarized Osaka Night",
|
|
956
|
+
"TokyoNight",
|
|
957
|
+
"TokyoNight Storm"
|
|
958
|
+
];
|
|
586
959
|
function listAvailableThemes() {
|
|
587
|
-
const
|
|
960
|
+
const builtIn = Object.keys(builtInThemes).sort();
|
|
961
|
+
const ghostty = [];
|
|
962
|
+
for (const name of CURATED_GHOSTTY_THEMES) {
|
|
963
|
+
if (loadGhosttyTheme(name)) {
|
|
964
|
+
ghostty.push(name);
|
|
965
|
+
}
|
|
966
|
+
}
|
|
967
|
+
ghostty.sort();
|
|
968
|
+
const custom = [];
|
|
588
969
|
if (_fs.existsSync.call(void 0, CUSTOM_THEMES_DIR)) {
|
|
589
970
|
try {
|
|
590
971
|
const files = _fs.readdirSync.call(void 0, CUSTOM_THEMES_DIR);
|
|
591
972
|
for (const file of files) {
|
|
592
973
|
if (file.endsWith(".json")) {
|
|
593
|
-
|
|
974
|
+
const name = file.slice(0, -5);
|
|
975
|
+
if (!builtIn.includes(name)) {
|
|
976
|
+
custom.push(name);
|
|
977
|
+
}
|
|
594
978
|
}
|
|
595
979
|
}
|
|
596
|
-
} catch (
|
|
980
|
+
} catch (e4) {
|
|
597
981
|
}
|
|
598
982
|
}
|
|
599
|
-
|
|
983
|
+
custom.sort();
|
|
984
|
+
return [...builtIn, ...ghostty, ...custom];
|
|
600
985
|
}
|
|
601
986
|
function themeExists(themeName) {
|
|
602
987
|
if (themeName in builtInThemes) return true;
|
|
603
988
|
const customPath = _path.join.call(void 0, CUSTOM_THEMES_DIR, `${themeName}.json`);
|
|
604
|
-
|
|
989
|
+
if (_fs.existsSync.call(void 0, customPath)) return true;
|
|
990
|
+
return loadGhosttyTheme(themeName) !== null;
|
|
605
991
|
}
|
|
606
992
|
function detectTerminalBackground() {
|
|
607
993
|
const colorFgBg = process.env.COLORFGBG;
|
|
@@ -614,12 +1000,22 @@ function detectTerminalBackground() {
|
|
|
614
1000
|
}
|
|
615
1001
|
}
|
|
616
1002
|
}
|
|
617
|
-
if (_optionalChain([process, 'access',
|
|
1003
|
+
if (_optionalChain([process, 'access', _5 => _5.env, 'access', _6 => _6.TERMINAL_EMULATOR, 'optionalAccess', _7 => _7.includes, 'call', _8 => _8("JetBrains")])) {
|
|
618
1004
|
return "light";
|
|
619
1005
|
}
|
|
620
1006
|
return "dark";
|
|
621
1007
|
}
|
|
622
1008
|
function autoInitTheme(themeName) {
|
|
1009
|
+
if (themeName && themeName !== getDefaultThemeName()) {
|
|
1010
|
+
return initTheme(themeName);
|
|
1011
|
+
}
|
|
1012
|
+
const ghosttyThemeName = detectGhosttyTheme();
|
|
1013
|
+
if (ghosttyThemeName) {
|
|
1014
|
+
try {
|
|
1015
|
+
return initTheme(ghosttyThemeName);
|
|
1016
|
+
} catch (e5) {
|
|
1017
|
+
}
|
|
1018
|
+
}
|
|
623
1019
|
if (themeName) {
|
|
624
1020
|
return initTheme(themeName);
|
|
625
1021
|
}
|
|
@@ -645,245 +1041,31 @@ var defaultContextValue = {
|
|
|
645
1041
|
}
|
|
646
1042
|
};
|
|
647
1043
|
var ThemeContext = _react.createContext.call(void 0, defaultContextValue);
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
var DEFAULT_CONFIG_PATH = _chunkGIZL57FEcjs.AUTOHAND_FILES.configJson;
|
|
654
|
-
var YAML_CONFIG_PATH = _chunkGIZL57FEcjs.AUTOHAND_FILES.configYaml;
|
|
655
|
-
var YML_CONFIG_PATH = _chunkGIZL57FEcjs.AUTOHAND_FILES.configYml;
|
|
656
|
-
var DEFAULT_BASE_URL = "https://openrouter.ai/api/v1";
|
|
657
|
-
var DEFAULT_OLLAMA_URL = "http://localhost:11434";
|
|
658
|
-
var DEFAULT_LLAMACPP_URL = "http://localhost:8080";
|
|
659
|
-
var DEFAULT_OPENAI_URL = "https://api.openai.com/v1";
|
|
660
|
-
var DEFAULT_MLX_URL = "http://localhost:8080";
|
|
661
|
-
var DEFAULT_LLMGATEWAY_URL = "https://api.llmgateway.io/v1";
|
|
662
|
-
async function detectConfigPath(customPath) {
|
|
663
|
-
if (customPath) {
|
|
664
|
-
return _path2.default.resolve(customPath);
|
|
665
|
-
}
|
|
666
|
-
const envPath = process.env.AUTOHAND_CONFIG;
|
|
667
|
-
if (envPath) {
|
|
668
|
-
return _path2.default.resolve(envPath);
|
|
669
|
-
}
|
|
670
|
-
if (await _fsextra2.default.pathExists(YAML_CONFIG_PATH)) {
|
|
671
|
-
return YAML_CONFIG_PATH;
|
|
672
|
-
}
|
|
673
|
-
if (await _fsextra2.default.pathExists(YML_CONFIG_PATH)) {
|
|
674
|
-
return YML_CONFIG_PATH;
|
|
675
|
-
}
|
|
676
|
-
return DEFAULT_CONFIG_PATH;
|
|
677
|
-
}
|
|
678
|
-
function isYamlFile(filePath) {
|
|
679
|
-
const ext = _path2.default.extname(filePath).toLowerCase();
|
|
680
|
-
return ext === ".yaml" || ext === ".yml";
|
|
681
|
-
}
|
|
682
|
-
async function parseConfigFile(configPath) {
|
|
683
|
-
const content = await _fsextra2.default.readFile(configPath, "utf8");
|
|
684
|
-
if (isYamlFile(configPath)) {
|
|
685
|
-
return _yaml2.default.parse(content);
|
|
686
|
-
}
|
|
687
|
-
return JSON.parse(content);
|
|
688
|
-
}
|
|
689
|
-
async function loadConfig(customPath) {
|
|
690
|
-
const configPath = await detectConfigPath(customPath);
|
|
691
|
-
await _fsextra2.default.ensureDir(_path2.default.dirname(configPath));
|
|
692
|
-
let isNewConfig = false;
|
|
693
|
-
if (!await _fsextra2.default.pathExists(configPath)) {
|
|
694
|
-
const defaultConfig = {
|
|
695
|
-
provider: "openrouter",
|
|
696
|
-
openrouter: {
|
|
697
|
-
apiKey: "",
|
|
698
|
-
baseUrl: "https://openrouter.ai/api/v1",
|
|
699
|
-
model: "anthropic/claude-sonnet-4-20250514"
|
|
700
|
-
},
|
|
701
|
-
workspace: {
|
|
702
|
-
defaultRoot: process.cwd(),
|
|
703
|
-
allowDangerousOps: false
|
|
704
|
-
},
|
|
705
|
-
ui: {
|
|
706
|
-
theme: "dark",
|
|
707
|
-
autoConfirm: false
|
|
708
|
-
},
|
|
709
|
-
telemetry: {
|
|
710
|
-
enabled: false
|
|
711
|
-
}
|
|
712
|
-
};
|
|
713
|
-
await _fsextra2.default.writeJson(configPath, defaultConfig, { spaces: 2 });
|
|
714
|
-
isNewConfig = true;
|
|
715
|
-
}
|
|
716
|
-
let parsed;
|
|
717
|
-
try {
|
|
718
|
-
parsed = await parseConfigFile(configPath);
|
|
719
|
-
} catch (error) {
|
|
720
|
-
throw new Error(`Failed to parse config at ${configPath}: ${error.message}`);
|
|
721
|
-
}
|
|
722
|
-
const normalized = normalizeConfig(parsed);
|
|
723
|
-
const withEnv = mergeEnvVariables(normalized);
|
|
724
|
-
validateConfig(withEnv, configPath);
|
|
725
|
-
const themeName = _optionalChain([withEnv, 'access', _5 => _5.ui, 'optionalAccess', _6 => _6.theme]) || "dark";
|
|
726
|
-
autoInitTheme(themeName);
|
|
727
|
-
return { ...withEnv, configPath, isNewConfig };
|
|
728
|
-
}
|
|
729
|
-
function mergeEnvVariables(config) {
|
|
730
|
-
return {
|
|
731
|
-
...config,
|
|
732
|
-
api: {
|
|
733
|
-
baseUrl: process.env.AUTOHAND_API_URL || _optionalChain([config, 'access', _7 => _7.api, 'optionalAccess', _8 => _8.baseUrl]) || "https://api.autohand.ai",
|
|
734
|
-
companySecret: process.env.AUTOHAND_SECRET || _optionalChain([config, 'access', _9 => _9.api, 'optionalAccess', _10 => _10.companySecret]) || ""
|
|
1044
|
+
var ThemeProvider = ({ theme: providedTheme, themeName, children }) => {
|
|
1045
|
+
const theme = _react.useMemo.call(void 0, () => {
|
|
1046
|
+
if (providedTheme) return providedTheme;
|
|
1047
|
+
if (_chunkPGRH5Q77cjs.isThemeInitialized.call(void 0, )) {
|
|
1048
|
+
return _chunkPGRH5Q77cjs.getTheme.call(void 0, );
|
|
735
1049
|
}
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
function normalizeConfig(config) {
|
|
739
|
-
if (isModernConfig(config)) {
|
|
740
|
-
const provider = _nullishCoalesce(config.provider, () => ( "openrouter"));
|
|
741
|
-
return { provider, ...config };
|
|
742
|
-
}
|
|
743
|
-
if (isLegacyConfig(config)) {
|
|
744
|
-
return {
|
|
745
|
-
provider: "openrouter",
|
|
746
|
-
openrouter: {
|
|
747
|
-
apiKey: _nullishCoalesce(config.api_key, () => ( "replace-me")),
|
|
748
|
-
baseUrl: _nullishCoalesce(config.base_url, () => ( DEFAULT_BASE_URL)),
|
|
749
|
-
model: _nullishCoalesce(config.model, () => ( "anthropic/claude-3.5-sonnet"))
|
|
750
|
-
},
|
|
751
|
-
workspace: {
|
|
752
|
-
defaultRoot: process.cwd(),
|
|
753
|
-
allowDangerousOps: false
|
|
754
|
-
},
|
|
755
|
-
ui: {
|
|
756
|
-
autoConfirm: _nullishCoalesce(config.dry_run, () => ( false)),
|
|
757
|
-
theme: "dark"
|
|
758
|
-
}
|
|
759
|
-
};
|
|
760
|
-
}
|
|
761
|
-
return config;
|
|
762
|
-
}
|
|
763
|
-
function isModernConfig(config) {
|
|
764
|
-
return typeof config.openrouter === "object" || typeof config.ollama === "object" || typeof config.llamacpp === "object" || typeof config.openai === "object" || typeof config.mlx === "object";
|
|
765
|
-
}
|
|
766
|
-
function isLegacyConfig(config) {
|
|
767
|
-
return typeof config.api_key === "string";
|
|
768
|
-
}
|
|
769
|
-
function validateConfig(config, configPath) {
|
|
770
|
-
if (config.workspace) {
|
|
771
|
-
if (config.workspace.defaultRoot && typeof config.workspace.defaultRoot !== "string") {
|
|
772
|
-
throw new Error(`workspace.defaultRoot must be a string in ${configPath}`);
|
|
773
|
-
}
|
|
774
|
-
if (config.workspace.allowDangerousOps !== void 0 && typeof config.workspace.allowDangerousOps !== "boolean") {
|
|
775
|
-
throw new Error(`workspace.allowDangerousOps must be boolean in ${configPath}`);
|
|
776
|
-
}
|
|
777
|
-
}
|
|
778
|
-
if (config.ui) {
|
|
779
|
-
if (config.ui.theme && typeof config.ui.theme !== "string") {
|
|
780
|
-
throw new Error(`ui.theme must be a string in ${configPath}`);
|
|
781
|
-
}
|
|
782
|
-
if (config.ui.theme && !themeExists(config.ui.theme)) {
|
|
783
|
-
throw new Error(`ui.theme '${config.ui.theme}' not found. Use 'dark', 'light', or a custom theme in ~/.autohand/themes/`);
|
|
784
|
-
}
|
|
785
|
-
if (config.ui.autoConfirm !== void 0 && typeof config.ui.autoConfirm !== "boolean") {
|
|
786
|
-
throw new Error(`ui.autoConfirm must be boolean in ${configPath}`);
|
|
787
|
-
}
|
|
788
|
-
}
|
|
789
|
-
if (config.mcp) {
|
|
790
|
-
if (config.mcp.enabled !== void 0 && typeof config.mcp.enabled !== "boolean") {
|
|
791
|
-
throw new Error(`mcp.enabled must be boolean in ${configPath}`);
|
|
1050
|
+
if (themeName) {
|
|
1051
|
+
return initTheme(themeName);
|
|
792
1052
|
}
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
}
|
|
810
|
-
}
|
|
811
|
-
}
|
|
812
|
-
}
|
|
813
|
-
if (config.externalAgents) {
|
|
814
|
-
if (config.externalAgents.enabled !== void 0 && typeof config.externalAgents.enabled !== "boolean") {
|
|
815
|
-
throw new Error(`externalAgents.enabled must be boolean in ${configPath}`);
|
|
816
|
-
}
|
|
817
|
-
if (config.externalAgents.paths !== void 0) {
|
|
818
|
-
if (!Array.isArray(config.externalAgents.paths)) {
|
|
819
|
-
throw new Error(`externalAgents.paths must be an array in ${configPath}`);
|
|
820
|
-
}
|
|
821
|
-
for (const p of config.externalAgents.paths) {
|
|
822
|
-
if (typeof p !== "string") {
|
|
823
|
-
throw new Error(`externalAgents.paths must contain only strings in ${configPath}`);
|
|
824
|
-
}
|
|
825
|
-
}
|
|
826
|
-
}
|
|
827
|
-
}
|
|
828
|
-
}
|
|
829
|
-
function resolveWorkspaceRoot(config, requestedPath) {
|
|
830
|
-
const candidate = _nullishCoalesce(_nullishCoalesce(requestedPath, () => ( process.cwd())), () => ( _optionalChain([config, 'access', _11 => _11.workspace, 'optionalAccess', _12 => _12.defaultRoot])));
|
|
831
|
-
return _path2.default.resolve(candidate);
|
|
832
|
-
}
|
|
833
|
-
function getProviderConfig(config, provider) {
|
|
834
|
-
const chosen = _nullishCoalesce(_nullishCoalesce(provider, () => ( config.provider)), () => ( "openrouter"));
|
|
835
|
-
const configByProvider = {
|
|
836
|
-
openrouter: config.openrouter,
|
|
837
|
-
ollama: config.ollama,
|
|
838
|
-
llamacpp: config.llamacpp,
|
|
839
|
-
openai: config.openai,
|
|
840
|
-
mlx: config.mlx,
|
|
841
|
-
llmgateway: config.llmgateway
|
|
842
|
-
};
|
|
843
|
-
const entry = configByProvider[chosen];
|
|
844
|
-
if (!entry) {
|
|
845
|
-
return null;
|
|
846
|
-
}
|
|
847
|
-
if (chosen === "openrouter" || chosen === "llmgateway") {
|
|
848
|
-
const { apiKey, model } = entry;
|
|
849
|
-
if (!apiKey || apiKey === "replace-me" || !model) {
|
|
850
|
-
return null;
|
|
851
|
-
}
|
|
852
|
-
} else {
|
|
853
|
-
if (!entry.model) {
|
|
854
|
-
return null;
|
|
855
|
-
}
|
|
856
|
-
}
|
|
857
|
-
return {
|
|
858
|
-
...entry,
|
|
859
|
-
baseUrl: _nullishCoalesce(entry.baseUrl, () => ( defaultBaseUrlFor(chosen, entry.port)))
|
|
860
|
-
};
|
|
861
|
-
}
|
|
862
|
-
function defaultBaseUrlFor(provider, port) {
|
|
863
|
-
if (provider === "openrouter") return DEFAULT_BASE_URL;
|
|
864
|
-
if (provider === "llmgateway") return DEFAULT_LLMGATEWAY_URL;
|
|
865
|
-
const p = port ? port.toString() : void 0;
|
|
866
|
-
switch (provider) {
|
|
867
|
-
case "ollama":
|
|
868
|
-
return p ? `http://localhost:${p}` : DEFAULT_OLLAMA_URL;
|
|
869
|
-
case "llamacpp":
|
|
870
|
-
return p ? `http://localhost:${p}` : DEFAULT_LLAMACPP_URL;
|
|
871
|
-
case "openai":
|
|
872
|
-
return DEFAULT_OPENAI_URL;
|
|
873
|
-
case "mlx":
|
|
874
|
-
return p ? `http://localhost:${p}` : DEFAULT_MLX_URL;
|
|
875
|
-
default:
|
|
876
|
-
return void 0;
|
|
877
|
-
}
|
|
878
|
-
}
|
|
879
|
-
async function saveConfig(config) {
|
|
880
|
-
const { configPath, ...data } = config;
|
|
881
|
-
if (isYamlFile(configPath)) {
|
|
882
|
-
const yamlContent = _yaml2.default.stringify(data, { indent: 2 });
|
|
883
|
-
await _fsextra2.default.writeFile(configPath, yamlContent, "utf8");
|
|
884
|
-
} else {
|
|
885
|
-
await _fsextra2.default.writeJson(configPath, data, { spaces: 2 });
|
|
886
|
-
}
|
|
1053
|
+
return initTheme();
|
|
1054
|
+
}, [providedTheme, themeName]);
|
|
1055
|
+
const value = _react.useMemo.call(void 0,
|
|
1056
|
+
() => ({
|
|
1057
|
+
theme,
|
|
1058
|
+
colors: theme.colors,
|
|
1059
|
+
name: theme.name,
|
|
1060
|
+
getColor: (token) => theme.getColor(token)
|
|
1061
|
+
}),
|
|
1062
|
+
[theme]
|
|
1063
|
+
);
|
|
1064
|
+
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ThemeContext.Provider, { value, children });
|
|
1065
|
+
};
|
|
1066
|
+
function useTheme() {
|
|
1067
|
+
const context = _react.useContext.call(void 0, ThemeContext);
|
|
1068
|
+
return context;
|
|
887
1069
|
}
|
|
888
1070
|
|
|
889
1071
|
|
|
@@ -894,7 +1076,8 @@ async function saveConfig(config) {
|
|
|
894
1076
|
|
|
895
1077
|
|
|
896
1078
|
|
|
897
|
-
|
|
1079
|
+
|
|
1080
|
+
exports.builtInThemes = builtInThemes; exports.CUSTOM_THEMES_DIR = CUSTOM_THEMES_DIR; exports.initTheme = initTheme; exports.listAvailableThemes = listAvailableThemes; exports.themeExists = themeExists; exports.autoInitTheme = autoInitTheme; exports.ThemeProvider = ThemeProvider; exports.useTheme = useTheme;
|
|
898
1081
|
/**
|
|
899
1082
|
* @license
|
|
900
1083
|
* Copyright 2025 Autohand AI LLC
|