autohand-cli 0.7.8 → 0.7.10
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 +19 -0
- package/dist/{AutomodeManager-YVCJXOMQ.js → AutomodeManager-NGRAO2MH.js} +35 -8
- package/dist/{AutomodeManager-HV6M7EAX.cjs → AutomodeManager-ZKQMBM4T.cjs} +35 -8
- package/dist/{CommunitySkillsCache-Q22FUAR5.js → CommunitySkillsCache-ILWHWE5P.js} +2 -2
- package/dist/CommunitySkillsCache-KHC6RUJW.cjs +7 -0
- package/dist/MemoryManager-6ZT7IDO5.cjs +7 -0
- package/dist/MemoryManager-AJGS5AKB.js +7 -0
- package/dist/PermissionManager-HG6W2DGU.cjs +10 -0
- package/dist/{PermissionManager-HATZKTRC.js → PermissionManager-U5OMGR3L.js} +3 -3
- package/dist/SessionManager-BJ2G6VV4.cjs +9 -0
- package/dist/{SessionManager-S5R6O3NU.js → SessionManager-ENPGYK5J.js} +2 -2
- package/dist/SkillsRegistry-6ZFOCT25.cjs +8 -0
- package/dist/{SkillsRegistry-R5WDM6T3.js → SkillsRegistry-C2SHOZ5D.js} +2 -2
- package/dist/{SyncApiClient-FAOMIZAP.js → SyncApiClient-AYXYSOJM.js} +1 -1
- package/dist/SyncApiClient-ID3KXEMA.cjs +10 -0
- package/dist/about-RGUM5QQ4.cjs +11 -0
- package/dist/about-VDR3SIHS.js +11 -0
- package/dist/add-dir-3BMVJ5H3.cjs +9 -0
- package/dist/{add-dir-PNU7AGKO.js → add-dir-RP2BL3JW.js} +2 -1
- package/dist/agents-JQ2PHCQB.js +10 -0
- package/dist/agents-RGSZ2BM3.cjs +10 -0
- package/dist/agents-new-LSJN2L2T.cjs +13 -0
- package/dist/agents-new-MZUEVKSK.js +13 -0
- package/dist/automode-DP3BMYJB.cjs +9 -0
- package/dist/{automode-QCRJSBRT.js → automode-XOF3U3OB.js} +2 -1
- package/dist/cc-2W6M7J45.cjs +8 -0
- package/dist/cc-UTTLESTY.js +8 -0
- package/dist/{chunk-B4ZPNXZE.cjs → chunk-34OGUMRO.cjs} +9 -5
- package/dist/chunk-3652ROFD.js +589 -0
- package/dist/{chunk-KNLBEUAV.cjs → chunk-3DQSBW4B.cjs} +10 -6
- package/dist/{chunk-XFPITUFJ.cjs → chunk-3S4DEIJP.cjs} +50 -8
- package/dist/{chunk-5MDDOGTD.cjs → chunk-3UNX56GC.cjs} +30 -37
- package/dist/chunk-46WX5IO2.cjs +499 -0
- package/dist/{chunk-OC5YDNFC.js → chunk-4ULBAYME.js} +42 -57
- package/dist/{chunk-VEDIYPWY.cjs → chunk-5BQ57AZC.cjs} +9 -9
- package/dist/{chunk-B5N5UAMO.cjs → chunk-5FZM7KLB.cjs} +13 -10
- package/dist/{chunk-JBKP2CLA.cjs → chunk-5NZA4UB4.cjs} +47 -47
- package/dist/{chunk-VPAN5H7Q.js → chunk-5Q3W4DEU.js} +43 -36
- package/dist/{chunk-VMMGT42E.cjs → chunk-65GTO4QM.cjs} +7 -3
- package/dist/{chunk-CXZEPTRI.js → chunk-6P3K4YUW.js} +6 -2
- package/dist/{chunk-MDWULS57.js → chunk-6UJMCWRY.js} +56 -33
- package/dist/chunk-73XIKTZL.js +124 -0
- package/dist/{chunk-23JQSCTO.js → chunk-7QNW24ZT.js} +8 -4
- package/dist/{chunk-XT4OSHSB.cjs → chunk-AEYOIPHD.cjs} +6 -2
- package/dist/chunk-ANUQFV43.cjs +589 -0
- package/dist/chunk-ATR3RORT.js +499 -0
- package/dist/{chunk-A6QBABQ7.js → chunk-B72CC4O6.js} +2 -2
- package/dist/{chunk-TAZJSKFD.js → chunk-BBIKQW66.js} +9 -5
- package/dist/{chunk-FFA4LDAO.cjs → chunk-BDIZGBDA.cjs} +8 -3
- package/dist/{chunk-3YEDXG6S.js → chunk-BG4OQUKP.js} +1 -1
- package/dist/{chunk-WIUGUR5T.js → chunk-BODVOW7B.js} +67 -16
- package/dist/{chunk-A552JHUJ.cjs → chunk-BZ73ZQTE.cjs} +34 -25
- package/dist/{chunk-YDOR2OCA.cjs → chunk-C22G4UE4.cjs} +27 -19
- package/dist/{chunk-GFJ6AETU.cjs → chunk-C2E3GJEE.cjs} +12 -9
- package/dist/{chunk-UL7YPRCU.js → chunk-C5SVIQG3.js} +10 -5
- package/dist/{chunk-6KMAJTU3.js → chunk-CUBYCLNL.js} +3 -2
- package/dist/{chunk-52MLYK5P.js → chunk-D2XFTCRP.js} +1 -1
- package/dist/{chunk-OBV3UUIL.js → chunk-DEAEO7RI.js} +1 -1
- package/dist/chunk-DMPVI3YK.cjs +400 -0
- package/dist/{chunk-C26EN22G.cjs → chunk-DUDDZRCS.cjs} +9 -5
- package/dist/{chunk-4RWTUT2Z.js → chunk-E7YL3AHT.js} +32 -23
- package/dist/{chunk-54GVL2SE.cjs → chunk-EAOEAQGF.cjs} +3 -2
- package/dist/{chunk-PU534KPO.cjs → chunk-EV53SLSB.cjs} +4 -4
- package/dist/{chunk-EDGV5BNH.js → chunk-F3EIOVSQ.js} +26 -33
- package/dist/{chunk-SFGJQPGC.cjs → chunk-FPHU2ES6.cjs} +56 -33
- package/dist/{chunk-G77ZY4QG.js → chunk-GD4AFYJ3.js} +1 -1
- package/dist/{chunk-PMMSDR44.cjs → chunk-GIZL57FE.cjs} +5 -1
- package/dist/{chunk-I4HVBWYF.js → chunk-GLAE5K5W.js} +7 -2
- package/dist/{chunk-4AMTDSQ3.cjs → chunk-HDSEJMWI.cjs} +6 -3
- package/dist/chunk-HLFZPN65.js +94 -0
- package/dist/{chunk-ZWS3KSMK.js → chunk-HQQ4NKER.js} +5 -2
- package/dist/{chunk-WBDPILKI.cjs → chunk-HVOBMOZ2.cjs} +6 -2
- package/dist/{chunk-MJFBVQHB.js → chunk-IPI3JXKP.js} +10 -7
- package/dist/chunk-IXFOH4OC.cjs +222 -0
- package/dist/chunk-JS7IPR7P.js +249 -0
- package/dist/{chunk-7TOHYAUF.cjs → chunk-KC5FPUOF.cjs} +2 -2
- package/dist/{chunk-7VW3A7DO.cjs → chunk-L42HTMMR.cjs} +2 -2
- package/dist/chunk-LGGZQTLM.cjs +209 -0
- package/dist/chunk-LOXOD4IS.cjs +8630 -0
- package/dist/chunk-MNCWB5F7.cjs +63 -0
- package/dist/{chunk-AVL4DKQO.js → chunk-MYNHJHDZ.js} +1 -1
- package/dist/{chunk-GDTZQSJ6.cjs → chunk-N4ZSG6JJ.cjs} +2 -2
- package/dist/chunk-NCC6ETZS.js +362 -0
- package/dist/chunk-NF7RIHJK.js +45 -0
- package/dist/{chunk-SYJLMBLP.cjs → chunk-NGBN2NGH.cjs} +77 -26
- package/dist/{chunk-SLISYSP4.cjs → chunk-NRORJRD4.cjs} +4 -4
- package/dist/{chunk-OTS4YFSZ.cjs → chunk-OKABWSWA.cjs} +7 -3
- package/dist/{chunk-KH7BCZJN.js → chunk-OLG7LZBD.js} +1 -1
- package/dist/{chunk-KZ7VMQTC.js → chunk-OMEH2EVE.js} +5 -1
- package/dist/{chunk-U5WIP4HS.js → chunk-P5VDZ6PV.js} +47 -5
- package/dist/{chunk-V5MTBGM4.cjs → chunk-PA2H2263.cjs} +6 -2
- package/dist/chunk-PGRH5Q77.cjs +249 -0
- package/dist/{chunk-DPJ3IIBB.js → chunk-PM62ZYXA.js} +18 -10
- package/dist/chunk-PNSRJT46.js +380 -0
- package/dist/{chunk-C3IFF3EH.cjs → chunk-PSED4Z4X.cjs} +43 -58
- package/dist/{chunk-EKY5PKQI.js → chunk-PWLLLJHU.js} +5 -1
- package/dist/{chunk-DOTAX65F.js → chunk-PYLR4J2D.js} +8 -4
- package/dist/{chunk-YWKZF2SA.js → chunk-QC6IUDDJ.js} +46 -46
- package/dist/{chunk-4M2GX7RH.cjs → chunk-QM7HZCQW.cjs} +11 -6
- package/dist/chunk-QRQ5EX7I.cjs +380 -0
- package/dist/{chunk-YDH2BMEN.js → chunk-QU64XI5X.js} +9 -6
- package/dist/{chunk-3L76MLO5.cjs → chunk-R7SDL3DJ.cjs} +27 -31
- package/dist/{chunk-WQSWU2QA.cjs → chunk-RJP3SZ7Q.cjs} +46 -255
- package/dist/{chunk-BAFJQUWR.js → chunk-RJXNNIFW.js} +18 -22
- package/dist/{chunk-YAGD43KA.cjs → chunk-S5G7OEN2.cjs} +47 -40
- package/dist/{chunk-2JPUEN44.cjs → chunk-SA4JOV4F.cjs} +61 -86
- package/dist/chunk-SAG6IY5Z.cjs +94 -0
- package/dist/chunk-TSV4LVHK.js +35 -0
- package/dist/{chunk-JHFH3N4U.cjs → chunk-TSY7JHIV.cjs} +2 -2
- package/dist/chunk-U23U52ZN.cjs +124 -0
- package/dist/chunk-UET7BDX2.js +8630 -0
- package/dist/chunk-ULQ6MDSJ.cjs +362 -0
- package/dist/{chunk-WH3D42BQ.js → chunk-UM4QEO36.js} +59 -84
- package/dist/chunk-VXCMGBXY.cjs +35 -0
- package/dist/chunk-WD5ZF6HE.js +63 -0
- package/dist/chunk-WH5RW7DV.cjs +85 -0
- package/dist/{chunk-GSOEIEOU.js → chunk-WJ276BIP.js} +5 -1
- package/dist/{chunk-P2Z6GDEN.js → chunk-WLTVF77A.js} +1 -1
- package/dist/{chunk-53BR4MUW.cjs → chunk-WOGJXDBU.cjs} +3 -3
- package/dist/{chunk-QJ53OSGF.js → chunk-WRJLBHWB.js} +6 -2
- package/dist/chunk-WYLFLZ42.js +222 -0
- package/dist/{chunk-B7EUETGY.cjs → chunk-XL77XYI2.cjs} +4 -4
- package/dist/{chunk-NI3BQXKU.js → chunk-XLI7SHCH.js} +2 -2
- package/dist/chunk-Y27LG4BQ.cjs +45 -0
- package/dist/chunk-Y6OWFIUF.js +209 -0
- package/dist/chunk-YKSSNFDZ.js +400 -0
- package/dist/{chunk-VRI7EXV6.js → chunk-YMDLUTF2.js} +5 -1
- package/dist/chunk-YVY27BJT.js +85 -0
- package/dist/{chunk-GWIAMKKF.js → chunk-ZBIBLOZL.js} +40 -249
- package/dist/completion-HVSWU5GR.cjs +13 -0
- package/dist/completion-WJ2MVNDH.js +13 -0
- package/dist/constants-RBQTR32A.cjs +20 -0
- package/dist/{constants-ZLG6M5SI.js → constants-V6J54N3X.js} +1 -1
- package/dist/export-NN7F5ANA.js +11 -0
- package/dist/export-UPS3AK2P.cjs +11 -0
- package/dist/feedback-ARI7CLVQ.js +14 -0
- package/dist/feedback-OZTPYHKJ.cjs +14 -0
- package/dist/help-4674IV4D.cjs +58 -0
- package/dist/help-ENG5KV2M.js +58 -0
- package/dist/history-2KUM6GN4.cjs +13 -0
- package/dist/history-RZFT34Q7.js +13 -0
- package/dist/hooks-7QSUBHBM.cjs +12 -0
- package/dist/hooks-S4MD4QSR.js +12 -0
- package/dist/i18n-6NKENUIV.js +32 -0
- package/dist/i18n-MXQXQOVE.cjs +32 -0
- package/dist/ide-5STDV43A.cjs +11 -0
- package/dist/ide-W2NYXOWQ.js +11 -0
- package/dist/index.cjs +18002 -13864
- package/dist/index.js +18252 -14114
- package/dist/init-FG5KEJCZ.cjs +9 -0
- package/dist/init-TV4MJDYK.js +9 -0
- package/dist/language-52Q7CSAY.cjs +16 -0
- package/dist/language-FXFDGOBF.js +16 -0
- package/dist/localProjectPermissions-2EATUDZM.cjs +17 -0
- package/dist/{localProjectPermissions-YFFAKLUZ.js → localProjectPermissions-WQYMGI42.js} +2 -2
- package/dist/login-AN42IOBK.js +18 -0
- package/dist/login-I65V4TGU.cjs +18 -0
- package/dist/logout-KK5UWGNG.js +16 -0
- package/dist/logout-VYYNWBHZ.cjs +16 -0
- package/dist/mcp-4SKTDECJ.js +15 -0
- package/dist/mcp-AGWPTMAX.cjs +15 -0
- package/dist/mcp-install-3NN2HAYR.cjs +473 -0
- package/dist/mcp-install-KTV52DQK.js +473 -0
- package/dist/memory-LG4K6XV6.cjs +9 -0
- package/dist/{memory-4GSP7NKV.js → memory-LRDK2SYC.js} +2 -1
- package/dist/model-P5D7ATE7.cjs +9 -0
- package/dist/{model-HKEFSH5E.js → model-WBFJIGUN.js} +2 -1
- package/dist/{new-EEZC4XXV.js → new-5A7RQEKI.js} +2 -1
- package/dist/new-EAATWI2G.cjs +9 -0
- package/dist/permissions-5URK6C44.js +12 -0
- package/dist/permissions-CJUDVG63.cjs +12 -0
- package/dist/plan-B3CW5DXJ.cjs +10 -0
- package/dist/plan-JFGNRL2S.js +10 -0
- package/dist/quit-A33JHDG7.cjs +9 -0
- package/dist/quit-IYBLN3DB.js +9 -0
- package/dist/resume-OPSJTCH7.cjs +12 -0
- package/dist/resume-TOWEEN5D.js +12 -0
- package/dist/search-GOLIE5BA.js +14 -0
- package/dist/search-H42HGUK5.cjs +14 -0
- package/dist/{sessions-4KXIT76T.js → sessions-B5NENDKY.js} +2 -1
- package/dist/sessions-YHAVEMWY.cjs +9 -0
- package/dist/share-2JD2AKKX.cjs +13 -0
- package/dist/share-MYGDOTQE.js +13 -0
- package/dist/{skills-3YEEODHK.js → skills-ICEQ2TNC.js} +2 -1
- package/dist/skills-LFVNZOMF.cjs +13 -0
- package/dist/{skills-install-KAXAQSN6.js → skills-install-6RN7FVCP.js} +9 -7
- package/dist/{skills-install-FTGOHOZ4.cjs → skills-install-LU6GA2WF.cjs} +14 -12
- package/dist/skills-new-5BM5PDFX.cjs +14 -0
- package/dist/skills-new-KWBWOX74.js +14 -0
- package/dist/status-M3XHJELG.cjs +10 -0
- package/dist/status-ZQDUYMKQ.js +10 -0
- package/dist/sync-6M3WRKMH.cjs +39 -0
- package/dist/sync-73D2MP65.cjs +16 -0
- package/dist/{sync-H4UHHLKU.js → sync-EXYX7HXW.js} +3 -3
- package/dist/sync-LL6M67CN.js +16 -0
- package/dist/theme-IFEI2IBJ.cjs +16 -0
- package/dist/theme-U3SKEULY.js +16 -0
- package/dist/ui/questionModal.cjs +28 -0
- package/dist/ui/questionModal.d.cts +11 -0
- package/dist/ui/questionModal.d.ts +11 -0
- package/dist/ui/questionModal.js +28 -0
- package/dist/undo-4DS67OAW.cjs +9 -0
- package/dist/undo-YMALVAPN.js +9 -0
- package/package.json +3 -2
- package/dist/CommunitySkillsCache-2BITCEAA.cjs +0 -7
- package/dist/MemoryManager-2ATHG7BH.js +0 -7
- package/dist/MemoryManager-AENCGCEW.cjs +0 -7
- package/dist/PermissionManager-6HZGTK2N.cjs +0 -10
- package/dist/SessionManager-AG4WT3DP.cjs +0 -9
- package/dist/SkillsRegistry-ZXU6YDRP.cjs +0 -8
- package/dist/SyncApiClient-UOA4VLLD.cjs +0 -10
- package/dist/add-dir-OMK3Y4DM.cjs +0 -8
- package/dist/agents-ICAC3KD3.js +0 -9
- package/dist/agents-YONWPKFS.cjs +0 -9
- package/dist/agents-new-NV557UVG.cjs +0 -10
- package/dist/agents-new-QHM3CO4B.js +0 -10
- package/dist/automode-BRHUHGXU.cjs +0 -8
- package/dist/chunk-3HPUOQJN.cjs +0 -23
- package/dist/chunk-5DN5KNXU.js +0 -81
- package/dist/chunk-7BYSXAKS.js +0 -23
- package/dist/chunk-ARVFUZOB.js +0 -736
- package/dist/chunk-BEIG7V7Q.cjs +0 -51
- package/dist/chunk-GWXXFQ3F.cjs +0 -81
- package/dist/chunk-XFQS2VGT.cjs +0 -736
- package/dist/chunk-Z3Q2AFDS.js +0 -51
- package/dist/completion-WVFWX7XQ.cjs +0 -10
- package/dist/completion-Y42FKDT3.js +0 -10
- package/dist/constants-G2PLP5HH.cjs +0 -20
- package/dist/export-BKBJ7PB2.cjs +0 -8
- package/dist/export-WJ5P6E5Z.js +0 -8
- package/dist/feedback-HZBCTSFG.js +0 -10
- package/dist/feedback-JBQ3UPGZ.cjs +0 -10
- package/dist/help-PKC6QCNG.js +0 -10
- package/dist/help-UEELQRHP.cjs +0 -10
- package/dist/hooks-G4VLYMLX.cjs +0 -9
- package/dist/hooks-LN4A6NQL.js +0 -9
- package/dist/init-DML7AOII.js +0 -8
- package/dist/init-SLLSDDJN.cjs +0 -8
- package/dist/language-KODBDE5R.js +0 -12
- package/dist/language-SJT475NW.cjs +0 -12
- package/dist/localProjectPermissions-AYQYGTOE.cjs +0 -17
- package/dist/login-TC2KROQI.js +0 -14
- package/dist/login-TYMR2ZD3.cjs +0 -14
- package/dist/logout-2ECV365P.js +0 -12
- package/dist/logout-CO3CPYZJ.cjs +0 -12
- package/dist/memory-CFNC7RJH.cjs +0 -8
- package/dist/model-TKVEJ5BC.cjs +0 -8
- package/dist/new-EB2MBQXA.cjs +0 -8
- package/dist/permissions-5MTH22EF.js +0 -9
- package/dist/permissions-IP5SITPI.cjs +0 -9
- package/dist/quit-2RYFGIJP.cjs +0 -8
- package/dist/quit-RSYIERO5.js +0 -8
- package/dist/resume-EPOEF3WV.cjs +0 -9
- package/dist/resume-LOYD5MMP.js +0 -9
- package/dist/sessions-7RTCPVNE.cjs +0 -8
- package/dist/share-APR5S2CS.cjs +0 -10
- package/dist/share-VLJFDZKR.js +0 -10
- package/dist/skills-CRM55MKM.cjs +0 -12
- package/dist/skills-new-JF4FKNUT.cjs +0 -11
- package/dist/skills-new-JYX2GBKM.js +0 -11
- package/dist/status-DAEFE7ZC.cjs +0 -9
- package/dist/status-PBFFUC4Q.js +0 -9
- package/dist/sync-3B7SNBYC.js +0 -14
- package/dist/sync-4RARBQIH.cjs +0 -39
- package/dist/sync-YZ6YZ42H.cjs +0 -14
- package/dist/theme-3XV5BWUB.js +0 -12
- package/dist/theme-Z2WS5XWZ.cjs +0 -12
- package/dist/undo-2WR2ZIEC.cjs +0 -8
- package/dist/undo-7QJBXARS.js +0 -8
|
@@ -3,64 +3,71 @@
|
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
|
|
6
|
+
var _chunkRJP3SZ7Qcjs = require('./chunk-RJP3SZ7Q.cjs');
|
|
6
7
|
|
|
7
8
|
|
|
8
|
-
|
|
9
|
+
|
|
10
|
+
var _chunkPGRH5Q77cjs = require('./chunk-PGRH5Q77.cjs');
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
var _chunkQRQ5EX7Icjs = require('./chunk-QRQ5EX7I.cjs');
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
var _chunkLOXOD4IScjs = require('./chunk-LOXOD4IS.cjs');
|
|
9
17
|
|
|
10
18
|
// src/commands/theme.ts
|
|
11
19
|
var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk);
|
|
12
|
-
var _enquirer = require('enquirer'); var _enquirer2 = _interopRequireDefault(_enquirer);
|
|
13
20
|
async function theme(ctx) {
|
|
14
|
-
const
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
console.log(_chalk2.default.gray(
|
|
21
|
+
const themes = _chunkRJP3SZ7Qcjs.listAvailableThemes.call(void 0, );
|
|
22
|
+
const currentTheme = _chunkPGRH5Q77cjs.isThemeInitialized.call(void 0, ) ? _chunkPGRH5Q77cjs.getTheme.call(void 0, ).name : _optionalChain([ctx, 'access', _ => _.config, 'access', _2 => _2.ui, 'optionalAccess', _3 => _3.theme]) || "dark";
|
|
23
|
+
console.log(_chalk2.default.cyan(`
|
|
24
|
+
\u{1F3A8} ${_chunkLOXOD4IScjs.t.call(void 0, "commands.theme.title")}
|
|
25
|
+
`));
|
|
26
|
+
console.log(_chalk2.default.gray(_chunkLOXOD4IScjs.t.call(void 0, "commands.theme.currentTheme", { theme: _chalk2.default.white(currentTheme) })));
|
|
27
|
+
console.log(_chalk2.default.gray(`Custom themes location: ${_chunkRJP3SZ7Qcjs.CUSTOM_THEMES_DIR}
|
|
20
28
|
`));
|
|
21
|
-
const
|
|
22
|
-
name,
|
|
23
|
-
|
|
24
|
-
|
|
29
|
+
const options = themes.map((name) => ({
|
|
30
|
+
label: name === currentTheme ? `${name} (current)` : name,
|
|
31
|
+
value: name,
|
|
32
|
+
description: name === "dark" ? "Default dark theme" : name === "light" ? "Light theme" : "Custom theme"
|
|
25
33
|
}));
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
});
|
|
33
|
-
const selected = await prompt.run();
|
|
34
|
-
if (selected === currentTheme) {
|
|
35
|
-
console.log(_chalk2.default.gray("\nNo change made."));
|
|
36
|
-
return null;
|
|
37
|
-
}
|
|
38
|
-
_chunkWQSWU2QAcjs.initTheme.call(void 0, selected);
|
|
39
|
-
ctx.config.ui = { ...ctx.config.ui, theme: selected };
|
|
40
|
-
await _chunkWQSWU2QAcjs.saveConfig.call(void 0, ctx.config);
|
|
41
|
-
console.log(_chalk2.default.green(`
|
|
42
|
-
\u2713 Theme changed to '${selected}'`));
|
|
43
|
-
const newTheme = _chunkWQSWU2QAcjs.getTheme.call(void 0, );
|
|
44
|
-
console.log("\nTheme preview:");
|
|
45
|
-
console.log(` ${newTheme.fg("accent", "\u25CF accent")} ${newTheme.fg("success", "\u25CF success")} ${newTheme.fg("error", "\u25CF error")} ${newTheme.fg("warning", "\u25CF warning")}`);
|
|
46
|
-
console.log(` ${newTheme.fg("muted", "\u25CF muted")} ${newTheme.fg("dim", "\u25CF dim")} ${newTheme.fg("text", "\u25CF text")}`);
|
|
47
|
-
console.log();
|
|
48
|
-
return null;
|
|
49
|
-
} catch (e) {
|
|
34
|
+
const result = await _chunkQRQ5EX7Icjs.showModal.call(void 0, {
|
|
35
|
+
title: _chunkLOXOD4IScjs.t.call(void 0, "commands.theme.selectPrompt"),
|
|
36
|
+
options,
|
|
37
|
+
initialIndex: themes.indexOf(currentTheme)
|
|
38
|
+
});
|
|
39
|
+
if (!result) {
|
|
50
40
|
console.log(_chalk2.default.gray("\nTheme selection cancelled."));
|
|
51
41
|
return null;
|
|
52
42
|
}
|
|
43
|
+
const selected = result.value;
|
|
44
|
+
if (selected === currentTheme) {
|
|
45
|
+
console.log(_chalk2.default.gray(`
|
|
46
|
+
${_chunkLOXOD4IScjs.t.call(void 0, "commands.theme.noChange")}`));
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
49
|
+
_chunkRJP3SZ7Qcjs.initTheme.call(void 0, selected);
|
|
50
|
+
ctx.config.ui = { ...ctx.config.ui, theme: selected };
|
|
51
|
+
await _chunkRJP3SZ7Qcjs.saveConfig.call(void 0, ctx.config);
|
|
52
|
+
console.log(_chalk2.default.green(`
|
|
53
|
+
\u2713 ${_chunkLOXOD4IScjs.t.call(void 0, "commands.theme.changed", { theme: selected })}`));
|
|
54
|
+
const newTheme = _chunkPGRH5Q77cjs.getTheme.call(void 0, );
|
|
55
|
+
console.log("\nTheme preview:");
|
|
56
|
+
console.log(` ${newTheme.fg("accent", "\u25CF accent")} ${newTheme.fg("success", "\u25CF success")} ${newTheme.fg("error", "\u25CF error")} ${newTheme.fg("warning", "\u25CF warning")}`);
|
|
57
|
+
console.log(` ${newTheme.fg("muted", "\u25CF muted")} ${newTheme.fg("dim", "\u25CF dim")} ${newTheme.fg("text", "\u25CF text")}`);
|
|
58
|
+
console.log();
|
|
59
|
+
return null;
|
|
53
60
|
}
|
|
54
61
|
async function themeInfo() {
|
|
55
|
-
if (!
|
|
62
|
+
if (!_chunkPGRH5Q77cjs.isThemeInitialized.call(void 0, )) {
|
|
56
63
|
console.log(_chalk2.default.yellow("Theme not initialized."));
|
|
57
64
|
return null;
|
|
58
65
|
}
|
|
59
|
-
const currentTheme =
|
|
66
|
+
const currentTheme = _chunkPGRH5Q77cjs.getTheme.call(void 0, );
|
|
60
67
|
console.log(_chalk2.default.cyan("\n\u{1F3A8} Current Theme Info\n"));
|
|
61
68
|
console.log(_chalk2.default.gray(`Name: ${_chalk2.default.white(currentTheme.name)}`));
|
|
62
69
|
console.log(_chalk2.default.gray(`Color mode: ${_chalk2.default.white(currentTheme.getColorMode())}`));
|
|
63
|
-
console.log(_chalk2.default.gray(`Custom themes dir: ${
|
|
70
|
+
console.log(_chalk2.default.gray(`Custom themes dir: ${_chunkRJP3SZ7Qcjs.CUSTOM_THEMES_DIR}`));
|
|
64
71
|
console.log();
|
|
65
72
|
console.log("Color preview:");
|
|
66
73
|
console.log(` ${currentTheme.fg("accent", "\u25CF accent")} ${currentTheme.fg("success", "\u25CF success")} ${currentTheme.fg("error", "\u25CF error")} ${currentTheme.fg("warning", "\u25CF warning")}`);
|
|
@@ -77,7 +84,7 @@ async function themeInfo() {
|
|
|
77
84
|
}
|
|
78
85
|
var metadata = {
|
|
79
86
|
command: "/theme",
|
|
80
|
-
description:
|
|
87
|
+
description: _chunkLOXOD4IScjs.t.call(void 0, "commands.theme.description"),
|
|
81
88
|
implemented: true
|
|
82
89
|
};
|
|
83
90
|
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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
|
-
var
|
|
4
|
+
var _chunkRJP3SZ7Qcjs = require('./chunk-RJP3SZ7Q.cjs');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunkLOXOD4IScjs = require('./chunk-LOXOD4IS.cjs');
|
|
5
8
|
|
|
6
9
|
// src/commands/sync.ts
|
|
7
10
|
var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk);
|
|
8
11
|
var _readline = require('readline'); var _readline2 = _interopRequireDefault(_readline);
|
|
9
12
|
var metadata = {
|
|
10
13
|
command: "/sync",
|
|
11
|
-
description:
|
|
14
|
+
description: _chunkLOXOD4IScjs.t.call(void 0, "commands.sync.description"),
|
|
12
15
|
implemented: true
|
|
13
16
|
};
|
|
14
17
|
var globalSyncService = null;
|
|
@@ -19,7 +22,7 @@ function getSyncService() {
|
|
|
19
22
|
return globalSyncService;
|
|
20
23
|
}
|
|
21
24
|
async function sync(ctx) {
|
|
22
|
-
const config = await
|
|
25
|
+
const config = await _chunkRJP3SZ7Qcjs.loadConfig.call(void 0, );
|
|
23
26
|
const isLoggedIn = Boolean(_optionalChain([config, 'access', _ => _.auth, 'optionalAccess', _2 => _2.token]) && _optionalChain([config, 'access', _3 => _3.auth, 'optionalAccess', _4 => _4.user]));
|
|
24
27
|
if (!isLoggedIn) {
|
|
25
28
|
console.log(_chalk2.default.yellow("\nSettings sync requires authentication."));
|
|
@@ -62,7 +65,6 @@ function renderSyncUI(data, ctx) {
|
|
|
62
65
|
return new Promise((resolve) => {
|
|
63
66
|
const tabs = ["Status", "Settings", "Activity"];
|
|
64
67
|
let currentTab = 0;
|
|
65
|
-
let needsRefresh = false;
|
|
66
68
|
const input = process.stdin;
|
|
67
69
|
const isTTY = input.isTTY;
|
|
68
70
|
const wasRaw = input.isRaw;
|
|
@@ -85,94 +87,67 @@ function renderSyncUI(data, ctx) {
|
|
|
85
87
|
renderTabContent(tabs[currentTab], data);
|
|
86
88
|
console.log(_chalk2.default.gray("\nEsc to exit | Tab to cycle | s: sync now | e: toggle enabled"));
|
|
87
89
|
};
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
if (first === "\x1B") {
|
|
95
|
-
if (buffer.length === 1) return false;
|
|
96
|
-
if (buffer[1] === "[") {
|
|
97
|
-
if (buffer.length < 3) return false;
|
|
98
|
-
const seq = buffer.slice(0, 3);
|
|
99
|
-
buffer = buffer.slice(3);
|
|
100
|
-
await handleSequence(seq);
|
|
101
|
-
return true;
|
|
102
|
-
}
|
|
103
|
-
buffer = buffer.slice(1);
|
|
104
|
-
await handleSequence("\x1B");
|
|
105
|
-
return true;
|
|
106
|
-
}
|
|
107
|
-
buffer = buffer.slice(1);
|
|
108
|
-
await handleSequence(first);
|
|
109
|
-
return true;
|
|
110
|
-
};
|
|
111
|
-
while (await processNext()) {
|
|
90
|
+
const handler = async (_str, key) => {
|
|
91
|
+
const char = (_str || "").toLowerCase();
|
|
92
|
+
if (key.name === "escape" || key.name === "c" && key.ctrl) {
|
|
93
|
+
cleanup();
|
|
94
|
+
resolve();
|
|
95
|
+
return;
|
|
112
96
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
currentTab = (currentTab - 1 + tabs.length) % tabs.length;
|
|
132
|
-
render();
|
|
133
|
-
return;
|
|
134
|
-
case "s":
|
|
135
|
-
case "S":
|
|
136
|
-
if (data.syncService) {
|
|
137
|
-
console.log(_chalk2.default.cyan("\nSyncing..."));
|
|
138
|
-
try {
|
|
139
|
-
const result = await data.syncService.sync();
|
|
140
|
-
if (result.success) {
|
|
141
|
-
console.log(_chalk2.default.green(`Sync complete! Uploaded: ${result.uploaded}, Downloaded: ${result.downloaded}`));
|
|
142
|
-
} else {
|
|
143
|
-
console.log(_chalk2.default.red(`Sync failed: ${result.error}`));
|
|
144
|
-
}
|
|
145
|
-
const config = await _chunkWQSWU2QAcjs.loadConfig.call(void 0, );
|
|
146
|
-
Object.assign(data, await gatherSyncData(ctx, config));
|
|
147
|
-
} catch (err) {
|
|
148
|
-
console.log(_chalk2.default.red(`Sync error: ${err}`));
|
|
149
|
-
}
|
|
150
|
-
await sleep(1500);
|
|
151
|
-
render();
|
|
152
|
-
}
|
|
153
|
-
return;
|
|
154
|
-
case "e":
|
|
155
|
-
case "E":
|
|
97
|
+
if (key.name === "tab" && key.shift) {
|
|
98
|
+
currentTab = (currentTab - 1 + tabs.length) % tabs.length;
|
|
99
|
+
render();
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
if (key.name === "tab" || key.name === "right") {
|
|
103
|
+
currentTab = (currentTab + 1) % tabs.length;
|
|
104
|
+
render();
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
if (key.name === "left") {
|
|
108
|
+
currentTab = (currentTab - 1 + tabs.length) % tabs.length;
|
|
109
|
+
render();
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
if (char === "s") {
|
|
113
|
+
if (data.syncService) {
|
|
114
|
+
console.log(_chalk2.default.cyan("\nSyncing..."));
|
|
156
115
|
try {
|
|
157
|
-
const
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
await
|
|
165
|
-
render();
|
|
116
|
+
const result = await data.syncService.sync();
|
|
117
|
+
if (result.success) {
|
|
118
|
+
console.log(_chalk2.default.green(`Sync complete! Uploaded: ${result.uploaded}, Downloaded: ${result.downloaded}`));
|
|
119
|
+
} else {
|
|
120
|
+
console.log(_chalk2.default.red(`Sync failed: ${result.error}`));
|
|
121
|
+
}
|
|
122
|
+
const config = await _chunkRJP3SZ7Qcjs.loadConfig.call(void 0, );
|
|
123
|
+
Object.assign(data, await gatherSyncData(ctx, config));
|
|
166
124
|
} catch (err) {
|
|
167
|
-
console.log(_chalk2.default.red(`
|
|
125
|
+
console.log(_chalk2.default.red(`Sync error: ${err}`));
|
|
168
126
|
}
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
127
|
+
await sleep(1500);
|
|
128
|
+
render();
|
|
129
|
+
}
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
if (char === "e") {
|
|
133
|
+
try {
|
|
134
|
+
const config = await _chunkRJP3SZ7Qcjs.loadConfig.call(void 0, );
|
|
135
|
+
const newEnabled = _optionalChain([config, 'access', _16 => _16.sync, 'optionalAccess', _17 => _17.enabled]) === false;
|
|
136
|
+
config.sync = { ...config.sync, enabled: newEnabled };
|
|
137
|
+
await _chunkRJP3SZ7Qcjs.saveConfig.call(void 0, config);
|
|
138
|
+
data.enabled = newEnabled;
|
|
139
|
+
console.log(_chalk2.default.cyan(`
|
|
140
|
+
${newEnabled ? _chunkLOXOD4IScjs.t.call(void 0, "commands.sync.enabled") : _chunkLOXOD4IScjs.t.call(void 0, "commands.sync.disabled")}`));
|
|
141
|
+
await sleep(1e3);
|
|
142
|
+
render();
|
|
143
|
+
} catch (err) {
|
|
144
|
+
console.log(_chalk2.default.red(`Error toggling sync: ${err}`));
|
|
145
|
+
}
|
|
146
|
+
return;
|
|
172
147
|
}
|
|
173
148
|
};
|
|
174
149
|
const cleanup = () => {
|
|
175
|
-
input.off("
|
|
150
|
+
input.off("keypress", handler);
|
|
176
151
|
if (isTTY && !wasRaw && typeof input.setRawMode === "function") {
|
|
177
152
|
input.setRawMode(false);
|
|
178
153
|
}
|
|
@@ -181,7 +156,7 @@ Sync ${newEnabled ? "enabled" : "disabled"}`));
|
|
|
181
156
|
}
|
|
182
157
|
process.stdout.write("\x1B[2J\x1B[H");
|
|
183
158
|
};
|
|
184
|
-
input.on("
|
|
159
|
+
input.on("keypress", handler);
|
|
185
160
|
render();
|
|
186
161
|
});
|
|
187
162
|
}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
2
|
+
|
|
3
|
+
var _chunkEAOEAQGFcjs = require('./chunk-EAOEAQGF.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
var _chunkPGRH5Q77cjs = require('./chunk-PGRH5Q77.cjs');
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _chunkLOXOD4IScjs = require('./chunk-LOXOD4IS.cjs');
|
|
11
|
+
|
|
12
|
+
// src/commands/about.ts
|
|
13
|
+
var _child_process = require('child_process');
|
|
14
|
+
var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk);
|
|
15
|
+
var _terminallink = require('terminal-link'); var _terminallink2 = _interopRequireDefault(_terminallink);
|
|
16
|
+
function getGitCommit() {
|
|
17
|
+
if (true) {
|
|
18
|
+
return "ec6118d";
|
|
19
|
+
}
|
|
20
|
+
try {
|
|
21
|
+
return _child_process.execSync.call(void 0, "git rev-parse --short HEAD", { encoding: "utf8", stdio: ["pipe", "pipe", "ignore"] }).trim();
|
|
22
|
+
} catch (e) {
|
|
23
|
+
return "unknown";
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function getVersionString() {
|
|
27
|
+
const commit = getGitCommit();
|
|
28
|
+
return commit !== "unknown" ? `${_chunkEAOEAQGFcjs.package_default.version} (${commit})` : _chunkEAOEAQGFcjs.package_default.version;
|
|
29
|
+
}
|
|
30
|
+
var ASCII_FRIEND = [
|
|
31
|
+
"\u2880\u2874\u281B\u281B\u283B\u28F7\u2844\u2800\u28E0\u2876\u281F\u281B\u283B\u28F6\u2844\u2880\u28F4\u287E\u281B\u281B\u28BF\u28E6\u2800\u2880\u28F4\u281E\u281B\u281B\u2836\u2840",
|
|
32
|
+
"\u284E\u2800\u28B0\u28F6\u2846\u2808\u28FF\u28F4\u28FF\u2801\u28F4\u28F6\u2844\u2818\u28FF\u28FE\u284F\u2880\u28F6\u28E6\u2800\u28BB\u2847\u28FF\u2803\u28A0\u28F6\u2846\u2800\u28B9",
|
|
33
|
+
"\u28A7\u2800\u2818\u281B\u2803\u28A0\u287F\u2819\u28FF\u2840\u2819\u281B\u2803\u28F0\u287F\u28BB\u28E7\u2808\u281B\u281B\u2880\u28FE\u2807\u28BB\u28C6\u2808\u281B\u280B\u2800\u287C",
|
|
34
|
+
"\u2808\u283B\u28B6\u28F6\u287E\u281F\u2801\u2800\u2818\u283F\u28B6\u28F6\u287E\u281F\u2801\u2800\u2819\u2837\u28F6\u28F6\u283F\u280B\u2800\u2808\u283B\u2837\u28F6\u2876\u281A\u2801",
|
|
35
|
+
"\u2880\u28F4\u283F\u283F\u2837\u28E6\u2840\u2800\u28E0\u28F6\u283F\u283B\u28B7\u28E6\u2840\u2800\u28E0\u287E\u281F\u283F\u28F6\u28C4\u2800\u2880\u28F4\u287E\u283F\u283F\u28F6\u28C4",
|
|
36
|
+
"\u287E\u2803\u28A0\u28E4\u2844\u2818\u28FF\u28E0\u28FF\u2801\u28E0\u28E4\u2844\u2839\u28F7\u28FC\u284F\u2880\u28E4\u28E4\u2808\u28BF\u2846\u28FE\u280F\u2880\u28E4\u28C4\u2808\u28BF",
|
|
37
|
+
"\u28A7\u2840\u2838\u283F\u2807\u2880\u28FF\u283A\u28FF\u2840\u283B\u283F\u2803\u28B0\u28FF\u28BF\u28C7\u2808\u283F\u283F\u2800\u28FC\u2847\u28BF\u28C7\u2818\u283F\u2807\u2800\u28F8",
|
|
38
|
+
"\u2808\u28BF\u28E6\u28E4\u28F4\u287F\u2803\u2800\u2819\u28B7\u28E6\u28E4\u28F6\u287F\u2801\u2808\u283B\u28F7\u28E4\u28E4\u287E\u281B\u2800\u2808\u28BF\u28E6\u28E4\u28E4\u2834\u2801"
|
|
39
|
+
].join("\n");
|
|
40
|
+
async function about() {
|
|
41
|
+
let accent;
|
|
42
|
+
let muted;
|
|
43
|
+
let text;
|
|
44
|
+
if (_chunkPGRH5Q77cjs.isThemeInitialized.call(void 0, )) {
|
|
45
|
+
const theme = _chunkPGRH5Q77cjs.getTheme.call(void 0, );
|
|
46
|
+
accent = (text2) => _chalk2.default.hex(theme.colors.accent)(text2);
|
|
47
|
+
muted = (text2) => _chalk2.default.hex(theme.colors.muted)(text2);
|
|
48
|
+
text = (str) => _chalk2.default.hex(theme.colors.text)(str);
|
|
49
|
+
} else {
|
|
50
|
+
accent = (text2) => _chalk2.default.cyan(text2);
|
|
51
|
+
muted = (text2) => _chalk2.default.gray(text2);
|
|
52
|
+
text = (text2) => _chalk2.default.white(text2);
|
|
53
|
+
}
|
|
54
|
+
console.log(_chalk2.default.gray(ASCII_FRIEND));
|
|
55
|
+
console.log();
|
|
56
|
+
console.log(accent(`${_chunkLOXOD4IScjs.t.call(void 0, "commands.about.title")} v${getVersionString()}`));
|
|
57
|
+
console.log(muted(_chunkLOXOD4IScjs.t.call(void 0, "commands.about.subtitle")));
|
|
58
|
+
console.log();
|
|
59
|
+
const websiteUrl = "https://autohand.ai";
|
|
60
|
+
const githubUrl = "https://github.com/autohandai/";
|
|
61
|
+
const docsUrl = "https://docs.autohand.ai";
|
|
62
|
+
const websiteLink = _terminallink2.default.call(void 0, _chalk2.default.cyan.underline("autohand.ai"), websiteUrl);
|
|
63
|
+
const githubLink = _terminallink2.default.call(void 0, _chalk2.default.cyan.underline("github.com/autohandai/"), githubUrl);
|
|
64
|
+
const docsLink = _terminallink2.default.call(void 0, _chalk2.default.cyan.underline("docs.autohand.ai"), docsUrl);
|
|
65
|
+
console.log(`${text("\u{1F310}")} ${text(_chunkLOXOD4IScjs.t.call(void 0, "commands.about.website") + ":")} ${websiteLink}`);
|
|
66
|
+
console.log(`${text("\u{1F4E6}")} ${text(_chunkLOXOD4IScjs.t.call(void 0, "commands.about.github") + ":")} ${githubLink}`);
|
|
67
|
+
console.log(`${text("\u{1F4DA}")} ${text(_chunkLOXOD4IScjs.t.call(void 0, "commands.about.docs") + ":")} ${docsLink}`);
|
|
68
|
+
console.log();
|
|
69
|
+
console.log(text(`\u{1F4A1} ${_chunkLOXOD4IScjs.t.call(void 0, "commands.about.contribute")}`));
|
|
70
|
+
console.log(text(` \u2022 ${_chunkLOXOD4IScjs.t.call(void 0, "commands.about.feedback")}: ${accent("/feedback")}`));
|
|
71
|
+
console.log(text(` \u2022 ${_chunkLOXOD4IScjs.t.call(void 0, "commands.about.submitPR")}: ${accent("gh pr create")}`));
|
|
72
|
+
const issuesUrl = "https://github.com/autohandai/code-cli/issues";
|
|
73
|
+
const issuesLink = _terminallink2.default.call(void 0, _chalk2.default.cyan.underline("github.com/autohandai/code-cli/issues"), issuesUrl);
|
|
74
|
+
console.log(text(` \u2022 ${_chunkLOXOD4IScjs.t.call(void 0, "commands.about.reportIssues")}: ${issuesLink}`));
|
|
75
|
+
console.log();
|
|
76
|
+
console.log(muted(_chunkLOXOD4IScjs.t.call(void 0, "commands.about.pressKey")));
|
|
77
|
+
console.log();
|
|
78
|
+
return null;
|
|
79
|
+
}
|
|
80
|
+
var metadata = {
|
|
81
|
+
command: "/about",
|
|
82
|
+
description: "show information about Autohand",
|
|
83
|
+
implemented: true
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
exports.about = about; exports.metadata = metadata;
|
|
90
|
+
/**
|
|
91
|
+
* @license
|
|
92
|
+
* Copyright 2025 Autohand AI LLC
|
|
93
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
94
|
+
*/
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// src/commands/cc.ts
|
|
2
|
+
import chalk from "chalk";
|
|
3
|
+
async function cc(ctx) {
|
|
4
|
+
if (!ctx.toggleContextCompaction || !ctx.isContextCompactionEnabled) {
|
|
5
|
+
console.log(chalk.yellow("Context compaction is not available in this mode."));
|
|
6
|
+
return null;
|
|
7
|
+
}
|
|
8
|
+
ctx.toggleContextCompaction();
|
|
9
|
+
const enabled = ctx.isContextCompactionEnabled();
|
|
10
|
+
const status = enabled ? "enabled" : "disabled";
|
|
11
|
+
const color = enabled ? chalk.green : chalk.yellow;
|
|
12
|
+
console.log(color(`Context compaction ${status}`));
|
|
13
|
+
if (!enabled) {
|
|
14
|
+
console.log(chalk.gray(' Note: Without compaction, you may see "context too long" errors.'));
|
|
15
|
+
console.log(chalk.gray(" Use /cc again to re-enable auto-compaction."));
|
|
16
|
+
} else {
|
|
17
|
+
console.log(chalk.gray(" Auto-compacting context at 70%/80%/90% thresholds."));
|
|
18
|
+
}
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
var metadata = {
|
|
22
|
+
command: "/cc",
|
|
23
|
+
description: "toggle context compaction on/off",
|
|
24
|
+
implemented: true
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export {
|
|
28
|
+
cc,
|
|
29
|
+
metadata
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* @license
|
|
33
|
+
* Copyright 2025 Autohand AI LLC
|
|
34
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
35
|
+
*/
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkGIZL57FEcjs = require('./chunk-GIZL57FE.cjs');
|
|
4
4
|
|
|
5
5
|
// src/auth/AuthClient.ts
|
|
6
6
|
var DEFAULT_TIMEOUT = 1e4;
|
|
7
7
|
var AuthClient = class {
|
|
8
8
|
constructor(config = {}) {
|
|
9
|
-
this.baseUrl = config.baseUrl ||
|
|
9
|
+
this.baseUrl = config.baseUrl || _chunkGIZL57FEcjs.AUTH_CONFIG.apiBaseUrl;
|
|
10
10
|
this.timeout = config.timeout || DEFAULT_TIMEOUT;
|
|
11
11
|
}
|
|
12
12
|
/**
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 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
|
+
|
|
3
|
+
var _chunkLOXOD4IScjs = require('./chunk-LOXOD4IS.cjs');
|
|
4
|
+
|
|
5
|
+
// src/commands/history.ts
|
|
6
|
+
var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk);
|
|
7
|
+
var metadata = {
|
|
8
|
+
command: "/history",
|
|
9
|
+
description: _chunkLOXOD4IScjs.t.call(void 0, "commands.history.title"),
|
|
10
|
+
implemented: true
|
|
11
|
+
};
|
|
12
|
+
function formatHistoryEntry(entry) {
|
|
13
|
+
const date = new Date(entry.createdAt);
|
|
14
|
+
const dateStr = date.toLocaleDateString("en-US", {
|
|
15
|
+
month: "short",
|
|
16
|
+
day: "numeric"
|
|
17
|
+
});
|
|
18
|
+
const timeStr = date.toLocaleTimeString("en-US", {
|
|
19
|
+
hour: "numeric",
|
|
20
|
+
minute: "2-digit",
|
|
21
|
+
hour12: true
|
|
22
|
+
});
|
|
23
|
+
const id = entry.sessionId.length > 20 ? entry.sessionId.slice(0, 20) + "..." : entry.sessionId;
|
|
24
|
+
const modelShort = entry.model.includes("/") ? entry.model.split("/").pop() : entry.model;
|
|
25
|
+
const modelDisplay = modelShort.length > 25 ? modelShort.slice(0, 25) + "..." : modelShort;
|
|
26
|
+
const badge = entry.status === "active" ? _chalk2.default.green(" [active]") : "";
|
|
27
|
+
return [
|
|
28
|
+
_chalk2.default.cyan(id.padEnd(24)),
|
|
29
|
+
`${dateStr} ${timeStr}`.padEnd(22),
|
|
30
|
+
entry.projectName.padEnd(18),
|
|
31
|
+
modelDisplay.padEnd(28),
|
|
32
|
+
`${entry.messageCount} msgs`,
|
|
33
|
+
badge
|
|
34
|
+
].join("");
|
|
35
|
+
}
|
|
36
|
+
function paginateHistory(entries, page, pageSize = 15) {
|
|
37
|
+
const totalItems = entries.length;
|
|
38
|
+
const totalPages = Math.ceil(totalItems / pageSize) || 0;
|
|
39
|
+
if (page < 1 || page > totalPages) {
|
|
40
|
+
return {
|
|
41
|
+
items: [],
|
|
42
|
+
currentPage: page,
|
|
43
|
+
totalPages,
|
|
44
|
+
totalItems
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
const startIndex = (page - 1) * pageSize;
|
|
48
|
+
const items = entries.slice(startIndex, startIndex + pageSize);
|
|
49
|
+
return {
|
|
50
|
+
items,
|
|
51
|
+
currentPage: page,
|
|
52
|
+
totalPages,
|
|
53
|
+
totalItems
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function toHistoryEntry(session) {
|
|
57
|
+
return {
|
|
58
|
+
sessionId: session.sessionId,
|
|
59
|
+
createdAt: session.createdAt,
|
|
60
|
+
lastActiveAt: session.lastActiveAt,
|
|
61
|
+
projectName: session.projectName,
|
|
62
|
+
model: session.model,
|
|
63
|
+
messageCount: session.messageCount,
|
|
64
|
+
status: session.status
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
async function history(ctx) {
|
|
68
|
+
const pageArg = _optionalChain([ctx, 'access', _ => _.args, 'optionalAccess', _2 => _2[0]]);
|
|
69
|
+
const page = pageArg ? parseInt(pageArg, 10) || 1 : 1;
|
|
70
|
+
const pageSize = 15;
|
|
71
|
+
try {
|
|
72
|
+
const allSessions = await ctx.sessionManager.listSessions();
|
|
73
|
+
if (allSessions.length === 0) {
|
|
74
|
+
console.log(_chalk2.default.gray(`
|
|
75
|
+
${_chunkLOXOD4IScjs.t.call(void 0, "commands.history.empty")}
|
|
76
|
+
`));
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
const entries = allSessions.map(toHistoryEntry);
|
|
80
|
+
const paginated = paginateHistory(entries, page, pageSize);
|
|
81
|
+
console.log(_chalk2.default.cyan(`
|
|
82
|
+
${_chunkLOXOD4IScjs.t.call(void 0, "commands.history.title")}
|
|
83
|
+
`));
|
|
84
|
+
console.log(
|
|
85
|
+
_chalk2.default.bold(
|
|
86
|
+
" ID".padEnd(25) + "Date".padEnd(22) + "Project".padEnd(18) + "Model".padEnd(28) + "Messages"
|
|
87
|
+
)
|
|
88
|
+
);
|
|
89
|
+
console.log(_chalk2.default.gray("\u2500".repeat(100)));
|
|
90
|
+
for (const entry of paginated.items) {
|
|
91
|
+
console.log(` ${formatHistoryEntry(entry)}`);
|
|
92
|
+
}
|
|
93
|
+
console.log(_chalk2.default.gray("\u2500".repeat(100)));
|
|
94
|
+
if (paginated.totalPages > 0) {
|
|
95
|
+
console.log(
|
|
96
|
+
_chalk2.default.gray(
|
|
97
|
+
`
|
|
98
|
+
${_chunkLOXOD4IScjs.t.call(void 0, "commands.history.showing", { page: paginated.currentPage, total: paginated.totalPages, count: paginated.totalItems })}`
|
|
99
|
+
)
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
if (paginated.totalPages > 1 && paginated.currentPage < paginated.totalPages) {
|
|
103
|
+
console.log(_chalk2.default.gray(`Use /history ${paginated.currentPage + 1} for next page`));
|
|
104
|
+
}
|
|
105
|
+
console.log(_chalk2.default.gray(`${_chunkLOXOD4IScjs.t.call(void 0, "commands.history.resumeHint")}
|
|
106
|
+
`));
|
|
107
|
+
return null;
|
|
108
|
+
} catch (error) {
|
|
109
|
+
console.error(_chalk2.default.red(`Failed to list history: ${error.message}`));
|
|
110
|
+
return null;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
exports.metadata = metadata; exports.formatHistoryEntry = formatHistoryEntry; exports.paginateHistory = paginateHistory; exports.history = history;
|
|
120
|
+
/**
|
|
121
|
+
* @license
|
|
122
|
+
* Copyright 2025 Autohand AI LLC
|
|
123
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
124
|
+
*/
|