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
|
@@ -0,0 +1,222 @@
|
|
|
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
|
+
|
|
3
|
+
var _chunkEAOEAQGFcjs = require('./chunk-EAOEAQGF.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
var _chunkMNCWB5F7cjs = require('./chunk-MNCWB5F7.cjs');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
var _chunkGIZL57FEcjs = require('./chunk-GIZL57FE.cjs');
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
var _chunkLOXOD4IScjs = require('./chunk-LOXOD4IS.cjs');
|
|
14
|
+
|
|
15
|
+
// src/commands/feedback.ts
|
|
16
|
+
var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
|
|
17
|
+
var _os = require('os'); var _os2 = _interopRequireDefault(_os);
|
|
18
|
+
var _chalk = require('chalk'); var _chalk2 = _interopRequireDefault(_chalk);
|
|
19
|
+
var metadata = {
|
|
20
|
+
command: "/feedback",
|
|
21
|
+
description: _chunkLOXOD4IScjs.t.call(void 0, "commands.feedback.description"),
|
|
22
|
+
implemented: true
|
|
23
|
+
};
|
|
24
|
+
var API_BASE_URL = "https://api.autohand.ai";
|
|
25
|
+
var API_TIMEOUT = 1e4;
|
|
26
|
+
var COOLDOWN_MAX_SUBMISSIONS = 5;
|
|
27
|
+
var COOLDOWN_WINDOW_MS = 60 * 60 * 1e3;
|
|
28
|
+
var COOLDOWN_STATE_PATH = `${_chunkGIZL57FEcjs.AUTOHAND_PATHS.feedback}/cooldown.json`;
|
|
29
|
+
async function checkCooldown() {
|
|
30
|
+
try {
|
|
31
|
+
if (!await _fsextra2.default.pathExists(COOLDOWN_STATE_PATH)) {
|
|
32
|
+
return { allowed: true, remaining: COOLDOWN_MAX_SUBMISSIONS };
|
|
33
|
+
}
|
|
34
|
+
const state = await _fsextra2.default.readJson(COOLDOWN_STATE_PATH);
|
|
35
|
+
const now = Date.now();
|
|
36
|
+
const windowStart = now - COOLDOWN_WINDOW_MS;
|
|
37
|
+
const recentSubmissions = state.submissions.filter((ts) => ts > windowStart);
|
|
38
|
+
if (recentSubmissions.length >= COOLDOWN_MAX_SUBMISSIONS) {
|
|
39
|
+
const oldestRecent = Math.min(...recentSubmissions);
|
|
40
|
+
const waitMs = oldestRecent + COOLDOWN_WINDOW_MS - now;
|
|
41
|
+
const waitMinutes = Math.ceil(waitMs / 6e4);
|
|
42
|
+
return { allowed: false, remaining: 0, waitMinutes };
|
|
43
|
+
}
|
|
44
|
+
return { allowed: true, remaining: COOLDOWN_MAX_SUBMISSIONS - recentSubmissions.length };
|
|
45
|
+
} catch (e) {
|
|
46
|
+
return { allowed: true, remaining: COOLDOWN_MAX_SUBMISSIONS };
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
async function recordSubmission() {
|
|
50
|
+
try {
|
|
51
|
+
let state = { submissions: [] };
|
|
52
|
+
if (await _fsextra2.default.pathExists(COOLDOWN_STATE_PATH)) {
|
|
53
|
+
state = await _fsextra2.default.readJson(COOLDOWN_STATE_PATH);
|
|
54
|
+
}
|
|
55
|
+
const now = Date.now();
|
|
56
|
+
const windowStart = now - COOLDOWN_WINDOW_MS;
|
|
57
|
+
state.submissions = state.submissions.filter((ts) => ts > windowStart);
|
|
58
|
+
state.submissions.push(now);
|
|
59
|
+
await _fsextra2.default.ensureDir(_chunkGIZL57FEcjs.AUTOHAND_PATHS.feedback);
|
|
60
|
+
await _fsextra2.default.writeJson(COOLDOWN_STATE_PATH, state, { spaces: 2 });
|
|
61
|
+
} catch (e2) {
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
async function feedback(_ctx) {
|
|
65
|
+
const cooldown = await checkCooldown();
|
|
66
|
+
if (!cooldown.allowed) {
|
|
67
|
+
console.log(_chalk2.default.yellow(`Feedback limit reached (${COOLDOWN_MAX_SUBMISSIONS} per hour).`));
|
|
68
|
+
console.log(_chalk2.default.gray(`Please wait ${cooldown.waitMinutes} minute${cooldown.waitMinutes === 1 ? "" : "s"} before submitting again.`));
|
|
69
|
+
return null;
|
|
70
|
+
}
|
|
71
|
+
const ratingAnswer = await _chunkMNCWB5F7cjs.safePrompt.call(void 0, [
|
|
72
|
+
{
|
|
73
|
+
type: "select",
|
|
74
|
+
name: "rating",
|
|
75
|
+
message: "How would you rate your experience?",
|
|
76
|
+
choices: [
|
|
77
|
+
{ name: "5", message: "5 - Excellent" },
|
|
78
|
+
{ name: "4", message: "4 - Good" },
|
|
79
|
+
{ name: "3", message: "3 - Okay" },
|
|
80
|
+
{ name: "2", message: "2 - Poor" },
|
|
81
|
+
{ name: "1", message: "1 - Very Poor" },
|
|
82
|
+
{ name: "skip", message: "s - Skip rating" }
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
]);
|
|
86
|
+
if (!ratingAnswer) {
|
|
87
|
+
console.log(_chalk2.default.gray("Feedback discarded."));
|
|
88
|
+
return null;
|
|
89
|
+
}
|
|
90
|
+
const textAnswer = await _chunkMNCWB5F7cjs.safePrompt.call(void 0, [
|
|
91
|
+
{
|
|
92
|
+
type: "input",
|
|
93
|
+
name: "feedback",
|
|
94
|
+
message: "What worked? What broke? (optional)"
|
|
95
|
+
}
|
|
96
|
+
]);
|
|
97
|
+
if (!textAnswer) {
|
|
98
|
+
console.log(_chalk2.default.gray("Feedback discarded."));
|
|
99
|
+
return null;
|
|
100
|
+
}
|
|
101
|
+
const npsScore = ratingAnswer.rating === "skip" ? 0 : parseInt(ratingAnswer.rating, 10);
|
|
102
|
+
const freeformFeedback = _optionalChain([textAnswer, 'access', _ => _.feedback, 'optionalAccess', _2 => _2.trim, 'call', _3 => _3()]) || void 0;
|
|
103
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
104
|
+
const runtimeError = getLastRuntimeError();
|
|
105
|
+
const deviceId = await getDeviceId();
|
|
106
|
+
const payload = {
|
|
107
|
+
npsScore,
|
|
108
|
+
triggerType: "manual",
|
|
109
|
+
timestamp: now,
|
|
110
|
+
deviceId,
|
|
111
|
+
cliVersion: _chunkEAOEAQGFcjs.package_default.version,
|
|
112
|
+
platform: process.platform,
|
|
113
|
+
osVersion: _os2.default.release(),
|
|
114
|
+
nodeVersion: process.version,
|
|
115
|
+
freeformFeedback,
|
|
116
|
+
env: {
|
|
117
|
+
platform: `${process.platform}-${process.arch}`,
|
|
118
|
+
node: process.version,
|
|
119
|
+
bun: _optionalChain([process, 'access', _4 => _4.versions, 'optionalAccess', _5 => _5.bun]),
|
|
120
|
+
cwd: process.cwd(),
|
|
121
|
+
shell: process.env.SHELL
|
|
122
|
+
},
|
|
123
|
+
runtimeError: runtimeError ? formatError(runtimeError) : null
|
|
124
|
+
};
|
|
125
|
+
try {
|
|
126
|
+
const feedbackPath = _chunkGIZL57FEcjs.AUTOHAND_FILES.feedbackLog;
|
|
127
|
+
await _fsextra2.default.ensureFile(feedbackPath);
|
|
128
|
+
await _fsextra2.default.appendFile(feedbackPath, JSON.stringify(payload) + "\n", "utf8");
|
|
129
|
+
} catch (e3) {
|
|
130
|
+
}
|
|
131
|
+
try {
|
|
132
|
+
const response = await sendFeedbackToApi(payload);
|
|
133
|
+
if (response.success) {
|
|
134
|
+
console.log(_chalk2.default.green(_chunkLOXOD4IScjs.t.call(void 0, "commands.feedback.success")));
|
|
135
|
+
} else {
|
|
136
|
+
if (_optionalChain([response, 'access', _6 => _6.error, 'optionalAccess', _7 => _7.includes, 'call', _8 => _8("Rate limit")])) {
|
|
137
|
+
console.log(_chalk2.default.yellow("Feedback saved locally (rate limited, will retry later)."));
|
|
138
|
+
} else {
|
|
139
|
+
console.log(_chalk2.default.yellow(`Feedback saved locally. ${response.error ? `(${response.error})` : ""}`));
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
} catch (error) {
|
|
143
|
+
console.log(_chalk2.default.yellow(`Feedback saved locally (${error.message}).`));
|
|
144
|
+
}
|
|
145
|
+
await recordSubmission();
|
|
146
|
+
if (runtimeError) {
|
|
147
|
+
console.log(_chalk2.default.gray("Included recent runtime error in feedback."));
|
|
148
|
+
}
|
|
149
|
+
return null;
|
|
150
|
+
}
|
|
151
|
+
async function sendFeedbackToApi(payload) {
|
|
152
|
+
const controller = new AbortController();
|
|
153
|
+
const timeoutId = setTimeout(() => controller.abort(), API_TIMEOUT);
|
|
154
|
+
try {
|
|
155
|
+
const response = await fetch(`${API_BASE_URL}/v1/feedback`, {
|
|
156
|
+
method: "POST",
|
|
157
|
+
headers: {
|
|
158
|
+
"Content-Type": "application/json",
|
|
159
|
+
"X-CLI-Version": _chunkEAOEAQGFcjs.package_default.version,
|
|
160
|
+
"X-Device-ID": payload.deviceId
|
|
161
|
+
},
|
|
162
|
+
body: JSON.stringify(payload),
|
|
163
|
+
signal: controller.signal
|
|
164
|
+
});
|
|
165
|
+
clearTimeout(timeoutId);
|
|
166
|
+
if (!response.ok) {
|
|
167
|
+
const errorText = await response.text().catch(() => "Unknown error");
|
|
168
|
+
return { success: false, error: `API error: ${response.status} ${errorText}` };
|
|
169
|
+
}
|
|
170
|
+
const data = await response.json();
|
|
171
|
+
return data;
|
|
172
|
+
} catch (error) {
|
|
173
|
+
clearTimeout(timeoutId);
|
|
174
|
+
if (error.name === "AbortError") {
|
|
175
|
+
return { success: false, error: "Request timeout" };
|
|
176
|
+
}
|
|
177
|
+
return { success: false, error: error.message };
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
async function getDeviceId() {
|
|
181
|
+
const deviceIdPath = `${_chunkGIZL57FEcjs.AUTOHAND_PATHS.feedback}/.device-id`;
|
|
182
|
+
try {
|
|
183
|
+
if (await _fsextra2.default.pathExists(deviceIdPath)) {
|
|
184
|
+
return (await _fsextra2.default.readFile(deviceIdPath, "utf8")).trim();
|
|
185
|
+
}
|
|
186
|
+
} catch (e4) {
|
|
187
|
+
}
|
|
188
|
+
const deviceId = `anon_${Date.now().toString(36)}_${Math.random().toString(36).slice(2, 10)}`;
|
|
189
|
+
try {
|
|
190
|
+
await _fsextra2.default.ensureDir(_chunkGIZL57FEcjs.AUTOHAND_PATHS.feedback);
|
|
191
|
+
await _fsextra2.default.writeFile(deviceIdPath, deviceId);
|
|
192
|
+
} catch (e5) {
|
|
193
|
+
}
|
|
194
|
+
return deviceId;
|
|
195
|
+
}
|
|
196
|
+
function getLastRuntimeError() {
|
|
197
|
+
const globalAny = globalThis;
|
|
198
|
+
return _nullishCoalesce(globalAny.__autohandLastError, () => ( null));
|
|
199
|
+
}
|
|
200
|
+
function formatError(err) {
|
|
201
|
+
if (!err) return {};
|
|
202
|
+
if (err instanceof Error) {
|
|
203
|
+
return { message: err.message, stack: err.stack };
|
|
204
|
+
}
|
|
205
|
+
if (typeof err === "object" && err !== null) {
|
|
206
|
+
const errObj = err;
|
|
207
|
+
const message = "message" in errObj ? String(errObj.message) : void 0;
|
|
208
|
+
const stack = "stack" in errObj ? String(errObj.stack) : void 0;
|
|
209
|
+
return { message, stack };
|
|
210
|
+
}
|
|
211
|
+
return { message: String(err) };
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
|
|
216
|
+
|
|
217
|
+
exports.metadata = metadata; exports.feedback = feedback;
|
|
218
|
+
/**
|
|
219
|
+
* @license
|
|
220
|
+
* Copyright 2025 Autohand AI LLC
|
|
221
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
222
|
+
*/
|
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
// src/ui/theme/Theme.ts
|
|
2
|
+
var Theme = class {
|
|
3
|
+
constructor(name, colors, colorMode) {
|
|
4
|
+
this.ansiCache = /* @__PURE__ */ new Map();
|
|
5
|
+
this.name = name;
|
|
6
|
+
this.colors = colors;
|
|
7
|
+
this.colorMode = colorMode ?? detectColorMode();
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Apply foreground color to text.
|
|
11
|
+
*/
|
|
12
|
+
fg(token, text) {
|
|
13
|
+
if (this.colorMode === "none") return text;
|
|
14
|
+
const color = this.colors[token];
|
|
15
|
+
if (!color) return text;
|
|
16
|
+
const ansi = this.getAnsiCode(color, "fg");
|
|
17
|
+
return `${ansi}${text}\x1B[39m`;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Apply background color to text.
|
|
21
|
+
*/
|
|
22
|
+
bg(token, text) {
|
|
23
|
+
if (this.colorMode === "none") return text;
|
|
24
|
+
const color = this.colors[token];
|
|
25
|
+
if (!color) return text;
|
|
26
|
+
const ansi = this.getAnsiCode(color, "bg");
|
|
27
|
+
return `${ansi}${text}\x1B[49m`;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Apply both foreground and background colors.
|
|
31
|
+
*/
|
|
32
|
+
fgBg(fgToken, bgToken, text) {
|
|
33
|
+
if (this.colorMode === "none") return text;
|
|
34
|
+
const fgColor = this.colors[fgToken];
|
|
35
|
+
const bgColor = this.colors[bgToken];
|
|
36
|
+
const fgAnsi = fgColor ? this.getAnsiCode(fgColor, "fg") : "";
|
|
37
|
+
const bgAnsi = bgColor ? this.getAnsiCode(bgColor, "bg") : "";
|
|
38
|
+
return `${fgAnsi}${bgAnsi}${text}\x1B[0m`;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Apply bold style.
|
|
42
|
+
*/
|
|
43
|
+
bold(text) {
|
|
44
|
+
return `\x1B[1m${text}\x1B[22m`;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Apply italic style.
|
|
48
|
+
*/
|
|
49
|
+
italic(text) {
|
|
50
|
+
return `\x1B[3m${text}\x1B[23m`;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Apply underline style.
|
|
54
|
+
*/
|
|
55
|
+
underline(text) {
|
|
56
|
+
return `\x1B[4m${text}\x1B[24m`;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Apply dim style.
|
|
60
|
+
*/
|
|
61
|
+
dimStyle(text) {
|
|
62
|
+
return `\x1B[2m${text}\x1B[22m`;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Apply strikethrough style.
|
|
66
|
+
*/
|
|
67
|
+
strikethrough(text) {
|
|
68
|
+
return `\x1B[9m${text}\x1B[29m`;
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Reset all styles.
|
|
72
|
+
*/
|
|
73
|
+
reset(text) {
|
|
74
|
+
return `\x1B[0m${text}\x1B[0m`;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Get raw color value for a token.
|
|
78
|
+
*/
|
|
79
|
+
getColor(token) {
|
|
80
|
+
return this.colors[token] || "";
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Get current color mode.
|
|
84
|
+
*/
|
|
85
|
+
getColorMode() {
|
|
86
|
+
return this.colorMode;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Convert color value to ANSI escape code.
|
|
90
|
+
*/
|
|
91
|
+
getAnsiCode(color, type) {
|
|
92
|
+
const cacheKey = `${color}:${type}`;
|
|
93
|
+
const cached = this.ansiCache.get(cacheKey);
|
|
94
|
+
if (cached) return cached;
|
|
95
|
+
const code = this.colorToAnsi(color, type);
|
|
96
|
+
this.ansiCache.set(cacheKey, code);
|
|
97
|
+
return code;
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Convert a color value to ANSI code based on color mode.
|
|
101
|
+
*/
|
|
102
|
+
colorToAnsi(color, type) {
|
|
103
|
+
if (!color) return "";
|
|
104
|
+
if (color.startsWith("#")) {
|
|
105
|
+
return this.hexToAnsi(color, type);
|
|
106
|
+
}
|
|
107
|
+
const numValue = parseInt(color, 10);
|
|
108
|
+
if (!isNaN(numValue) && numValue >= 0 && numValue <= 255) {
|
|
109
|
+
return this.index256ToAnsi(numValue, type);
|
|
110
|
+
}
|
|
111
|
+
return "";
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* Convert hex color to ANSI code.
|
|
115
|
+
*/
|
|
116
|
+
hexToAnsi(hex, type) {
|
|
117
|
+
const rgb = hexToRgb(hex);
|
|
118
|
+
if (!rgb) return "";
|
|
119
|
+
const base = type === "fg" ? 38 : 48;
|
|
120
|
+
if (this.colorMode === "truecolor") {
|
|
121
|
+
return `\x1B[${base};2;${rgb.r};${rgb.g};${rgb.b}m`;
|
|
122
|
+
} else if (this.colorMode === "256") {
|
|
123
|
+
const index = rgbTo256(rgb.r, rgb.g, rgb.b);
|
|
124
|
+
return `\x1B[${base};5;${index}m`;
|
|
125
|
+
} else if (this.colorMode === "16") {
|
|
126
|
+
const index = rgbTo16(rgb.r, rgb.g, rgb.b);
|
|
127
|
+
const code = type === "fg" ? index < 8 ? 30 + index : 90 + index - 8 : index < 8 ? 40 + index : 100 + index - 8;
|
|
128
|
+
return `\x1B[${code}m`;
|
|
129
|
+
}
|
|
130
|
+
return "";
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Convert 256-color index to ANSI code.
|
|
134
|
+
*/
|
|
135
|
+
index256ToAnsi(index, type) {
|
|
136
|
+
const base = type === "fg" ? 38 : 48;
|
|
137
|
+
if (this.colorMode === "truecolor" || this.colorMode === "256") {
|
|
138
|
+
return `\x1B[${base};5;${index}m`;
|
|
139
|
+
} else if (this.colorMode === "16") {
|
|
140
|
+
const basicIndex = index < 16 ? index : index256To16(index);
|
|
141
|
+
const code = type === "fg" ? basicIndex < 8 ? 30 + basicIndex : 90 + basicIndex - 8 : basicIndex < 8 ? 40 + basicIndex : 100 + basicIndex - 8;
|
|
142
|
+
return `\x1B[${code}m`;
|
|
143
|
+
}
|
|
144
|
+
return "";
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
function detectColorMode() {
|
|
148
|
+
if (process.env.NO_COLOR !== void 0) {
|
|
149
|
+
return "none";
|
|
150
|
+
}
|
|
151
|
+
if (process.env.FORCE_COLOR !== void 0) {
|
|
152
|
+
const level = parseInt(process.env.FORCE_COLOR, 10);
|
|
153
|
+
if (level === 0) return "none";
|
|
154
|
+
if (level === 1) return "16";
|
|
155
|
+
if (level === 2) return "256";
|
|
156
|
+
if (level >= 3) return "truecolor";
|
|
157
|
+
}
|
|
158
|
+
const colorterm = process.env.COLORTERM;
|
|
159
|
+
if (colorterm === "truecolor" || colorterm === "24bit") {
|
|
160
|
+
return "truecolor";
|
|
161
|
+
}
|
|
162
|
+
const term = process.env.TERM || "";
|
|
163
|
+
if (term.includes("256color") || term.includes("256-color")) {
|
|
164
|
+
return "256";
|
|
165
|
+
}
|
|
166
|
+
if (term.includes("color") || term.includes("ansi") || term === "xterm") {
|
|
167
|
+
return "16";
|
|
168
|
+
}
|
|
169
|
+
if (process.stdout.isTTY) {
|
|
170
|
+
return "256";
|
|
171
|
+
}
|
|
172
|
+
return "none";
|
|
173
|
+
}
|
|
174
|
+
function hexToRgb(hex) {
|
|
175
|
+
const match = hex.match(/^#?([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})$/);
|
|
176
|
+
if (match) {
|
|
177
|
+
return {
|
|
178
|
+
r: parseInt(match[1], 16),
|
|
179
|
+
g: parseInt(match[2], 16),
|
|
180
|
+
b: parseInt(match[3], 16)
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
const shortMatch = hex.match(/^#?([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])$/);
|
|
184
|
+
if (shortMatch) {
|
|
185
|
+
return {
|
|
186
|
+
r: parseInt(shortMatch[1] + shortMatch[1], 16),
|
|
187
|
+
g: parseInt(shortMatch[2] + shortMatch[2], 16),
|
|
188
|
+
b: parseInt(shortMatch[3] + shortMatch[3], 16)
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
return null;
|
|
192
|
+
}
|
|
193
|
+
function rgbTo256(r, g, b) {
|
|
194
|
+
if (r === g && g === b) {
|
|
195
|
+
if (r < 8) return 16;
|
|
196
|
+
if (r > 248) return 231;
|
|
197
|
+
return Math.round((r - 8) / 10) + 232;
|
|
198
|
+
}
|
|
199
|
+
const ri = Math.round(r / 51);
|
|
200
|
+
const gi = Math.round(g / 51);
|
|
201
|
+
const bi = Math.round(b / 51);
|
|
202
|
+
return 16 + 36 * ri + 6 * gi + bi;
|
|
203
|
+
}
|
|
204
|
+
function rgbTo16(r, g, b) {
|
|
205
|
+
const bright = (r + g + b) / 3 > 128 ? 8 : 0;
|
|
206
|
+
const ri = r > 128 ? 1 : 0;
|
|
207
|
+
const gi = g > 128 ? 2 : 0;
|
|
208
|
+
const bi = b > 128 ? 4 : 0;
|
|
209
|
+
return bright + ri + gi + bi;
|
|
210
|
+
}
|
|
211
|
+
function index256To16(index) {
|
|
212
|
+
if (index < 16) return index;
|
|
213
|
+
if (index >= 232) {
|
|
214
|
+
const gray = (index - 232) * 10 + 8;
|
|
215
|
+
return gray > 128 ? 15 : 0;
|
|
216
|
+
}
|
|
217
|
+
const adjusted = index - 16;
|
|
218
|
+
const r = Math.floor(adjusted / 36) * 51;
|
|
219
|
+
const g = Math.floor(adjusted % 36 / 6) * 51;
|
|
220
|
+
const b = adjusted % 6 * 51;
|
|
221
|
+
return rgbTo16(r, g, b);
|
|
222
|
+
}
|
|
223
|
+
var globalTheme = null;
|
|
224
|
+
function getTheme() {
|
|
225
|
+
if (!globalTheme) {
|
|
226
|
+
throw new Error("Theme not initialized. Call initTheme() first.");
|
|
227
|
+
}
|
|
228
|
+
return globalTheme;
|
|
229
|
+
}
|
|
230
|
+
function setTheme(theme) {
|
|
231
|
+
globalTheme = theme;
|
|
232
|
+
}
|
|
233
|
+
function isThemeInitialized() {
|
|
234
|
+
return globalTheme !== null;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
export {
|
|
238
|
+
Theme,
|
|
239
|
+
detectColorMode,
|
|
240
|
+
hexToRgb,
|
|
241
|
+
getTheme,
|
|
242
|
+
setTheme,
|
|
243
|
+
isThemeInitialized
|
|
244
|
+
};
|
|
245
|
+
/**
|
|
246
|
+
* @license
|
|
247
|
+
* Copyright 2025 Autohand AI LLC
|
|
248
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
249
|
+
*/
|
|
@@ -1,13 +1,13 @@
|
|
|
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(); } }
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkGIZL57FEcjs = require('./chunk-GIZL57FE.cjs');
|
|
4
4
|
|
|
5
5
|
// src/permissions/localProjectPermissions.ts
|
|
6
6
|
var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
|
|
7
7
|
var _path = require('path'); var _path2 = _interopRequireDefault(_path);
|
|
8
8
|
var LOCAL_SETTINGS_FILE = "settings.local.json";
|
|
9
9
|
function getLocalSettingsPath(workspaceRoot) {
|
|
10
|
-
return _path2.default.join(workspaceRoot,
|
|
10
|
+
return _path2.default.join(workspaceRoot, _chunkGIZL57FEcjs.PROJECT_DIR_NAME, LOCAL_SETTINGS_FILE);
|
|
11
11
|
}
|
|
12
12
|
async function loadLocalProjectSettings(workspaceRoot) {
|
|
13
13
|
const settingsPath = getLocalSettingsPath(workspaceRoot);
|
|
@@ -1,6 +1,6 @@
|
|
|
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
|
-
var
|
|
3
|
+
var _chunkGIZL57FEcjs = require('./chunk-GIZL57FE.cjs');
|
|
4
4
|
|
|
5
5
|
// src/session/SessionManager.ts
|
|
6
6
|
var _fsextra = require('fs-extra'); var _fsextra2 = _interopRequireDefault(_fsextra);
|
|
@@ -10,7 +10,7 @@ var SessionManager = class {
|
|
|
10
10
|
constructor(baseDir) {
|
|
11
11
|
this.currentSession = null;
|
|
12
12
|
this.index = null;
|
|
13
|
-
this.sessionsDir = _nullishCoalesce(baseDir, () => (
|
|
13
|
+
this.sessionsDir = _nullishCoalesce(baseDir, () => ( _chunkGIZL57FEcjs.AUTOHAND_PATHS.sessions));
|
|
14
14
|
}
|
|
15
15
|
async initialize() {
|
|
16
16
|
await _fsextra2.default.ensureDir(this.sessionsDir);
|