@moberg_hr/work-tree 2.0.9 → 2.0.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/dist/{answer-QQAEJ5N3.js → answer-6UVHVEGQ.js} +13 -12
- package/dist/{answer-QQAEJ5N3.js.map → answer-6UVHVEGQ.js.map} +1 -1
- package/dist/{attach-XG3Y7QA7.js → attach-6Q6HGPCM.js} +15 -14
- package/dist/{attach-XG3Y7QA7.js.map → attach-6Q6HGPCM.js.map} +1 -1
- package/dist/bin.js +5 -5
- package/dist/{block-WW4BWDN7.js → block-46DPS75I.js} +13 -12
- package/dist/{block-WW4BWDN7.js.map → block-46DPS75I.js.map} +1 -1
- package/dist/{broadcast-LEOMDVSA.js → broadcast-OGOEQX4Z.js} +10 -9
- package/dist/{broadcast-LEOMDVSA.js.map → broadcast-OGOEQX4Z.js.map} +1 -1
- package/dist/{catchup-UBHGEMED.js → catchup-TTAC3GMX.js} +16 -15
- package/dist/{catchup-UBHGEMED.js.map → catchup-TTAC3GMX.js.map} +1 -1
- package/dist/{chunk-WTR5BUGS.js → chunk-26IZBYVL.js} +2 -2
- package/dist/{chunk-NS3HSXF7.js → chunk-3B3UMUE6.js} +2 -2
- package/dist/{chunk-LXM7QFBK.js → chunk-3XY76XBD.js} +24 -11
- package/dist/{chunk-LXM7QFBK.js.map → chunk-3XY76XBD.js.map} +1 -1
- package/dist/{chunk-UNLBHYA5.js → chunk-427RB7E4.js} +6 -6
- package/dist/{chunk-UPR2F7QP.js → chunk-4PP27RI7.js} +9 -9
- package/dist/{chunk-HLXEMPEI.js → chunk-6O6765M7.js} +4 -4
- package/dist/{chunk-JJRPLNLN.js → chunk-7HGABVGR.js} +2 -2
- package/dist/{chunk-G6IJ76DW.js → chunk-ACXPSQJR.js} +3 -3
- package/dist/{chunk-3R4HBEIG.js → chunk-AFV5S6UV.js} +10 -10
- package/dist/{chunk-45XJ4JGE.js → chunk-AVRDRZ4D.js} +12 -12
- package/dist/{chunk-I5CDLVJY.js → chunk-D4FUDMMX.js} +9 -9
- package/dist/{chunk-5XMXZIJS.js → chunk-E35NZVPX.js} +2 -2
- package/dist/chunk-E5EPN3JI.js +656 -0
- package/dist/chunk-E5EPN3JI.js.map +1 -0
- package/dist/{chunk-IC5PFQCV.js → chunk-HBXDIRM4.js} +4 -4
- package/dist/{chunk-BIL3S6XH.js → chunk-HDO3PXCU.js} +5 -5
- package/dist/{chunk-RM6XOZMU.js → chunk-IKYZ5CJZ.js} +2 -2
- package/dist/{chunk-OP5ZIVXO.js → chunk-IVSMEG5M.js} +50 -49
- package/dist/chunk-IVSMEG5M.js.map +1 -0
- package/dist/{chunk-NEZNZM7K.js → chunk-JQXUIKU5.js} +2 -2
- package/dist/{chunk-H5LKMR45.js → chunk-JTHILJFB.js} +2 -2
- package/dist/{chunk-WB2BP2G5.js → chunk-LPJEV4R2.js} +4 -103
- package/dist/chunk-LPJEV4R2.js.map +1 -0
- package/dist/{chunk-SIHAOB4F.js → chunk-MIIJ2HQS.js} +7 -7
- package/dist/chunk-MMPR5QIV.js +9 -0
- package/dist/{chunk-B6V6SV2F.js.map → chunk-MMPR5QIV.js.map} +1 -1
- package/dist/{chunk-QKGZ65TC.js → chunk-MVU7JAKG.js} +3 -3
- package/dist/chunk-NEJVK5CF.js +26 -0
- package/dist/chunk-NEJVK5CF.js.map +1 -0
- package/dist/{chunk-2IE6UUUD.js → chunk-OOCMPS5L.js} +2 -2
- package/dist/{chunk-G5PN5NIS.js → chunk-OQAQMCHF.js} +15 -33
- package/dist/chunk-OQAQMCHF.js.map +1 -0
- package/dist/{chunk-ICVR5M6W.js → chunk-OW46TR4G.js} +5 -5
- package/dist/{chunk-P2U6R35K.js → chunk-PUYXTZ32.js} +7 -7
- package/dist/{chunk-WVZ56EJC.js → chunk-QX4LFFNS.js} +9 -3
- package/dist/{chunk-WVZ56EJC.js.map → chunk-QX4LFFNS.js.map} +1 -1
- package/dist/{chunk-7HEB6SQS.js → chunk-QXUHOISF.js} +146 -3
- package/dist/chunk-QXUHOISF.js.map +1 -0
- package/dist/chunk-R6HAD575.js +797 -0
- package/dist/chunk-R6HAD575.js.map +1 -0
- package/dist/{chunk-6AULWNAN.js → chunk-R7B46WXN.js} +4 -4
- package/dist/{chunk-JYWCNLZN.js → chunk-RG63ACAK.js} +4 -4
- package/dist/{chunk-7NAXFBFI.js → chunk-RKEY4573.js} +2 -2
- package/dist/{chunk-PDF3BZZH.js → chunk-RLR66XLG.js} +3 -3
- package/dist/{chunk-QP6LFMMK.js → chunk-RMICESXA.js} +15 -15
- package/dist/{chunk-TOQZODGI.js → chunk-RQE5UOIW.js} +3 -3
- package/dist/{chunk-WF57CF7A.js → chunk-RT4QZRTC.js} +7 -4
- package/dist/chunk-RT4QZRTC.js.map +1 -0
- package/dist/{chunk-WUWED3LV.js → chunk-SH7NSDRW.js} +2 -2
- package/dist/{chunk-BLLLVWEB.js → chunk-SRIYY5HL.js} +3 -3
- package/dist/{chunk-DW4JPVXB.js → chunk-TMNIOM4Y.js} +2 -2
- package/dist/{chunk-KLK6O54M.js → chunk-UAAH334K.js} +10 -10
- package/dist/{chunk-ULQQ6SXT.js → chunk-WG3BMHKU.js} +4 -4
- package/dist/{chunk-GJDXEHII.js → chunk-WH3SPT3N.js} +2 -2
- package/dist/{chunk-73J2ZJA6.js → chunk-YAZ3GAZY.js} +5 -5
- package/dist/{chunk-H2NVIZ3M.js → chunk-YJVZ5H3I.js} +2 -2
- package/dist/chunk-YXQIGBL6.js +106 -0
- package/dist/chunk-YXQIGBL6.js.map +1 -0
- package/dist/{chunk-7IZW6GLY.js → chunk-YZLNJQAV.js} +3 -3
- package/dist/{chunk-SDE3BZ6P.js → chunk-ZFPV46FA.js} +14 -14
- package/dist/{chunk-N4EYQKSM.js → chunk-ZWD64IDK.js} +2 -2
- package/dist/{cleanup-AEZKR7Q3.js → cleanup-OO3DCPGC.js} +24 -23
- package/dist/{cleanup-AEZKR7Q3.js.map → cleanup-OO3DCPGC.js.map} +1 -1
- package/dist/cli-RYEDO3OH.js +18 -0
- package/dist/{command-hook-installer-SGEJTZ2Y.js → command-hook-installer-7JB3AC2S.js} +4 -4
- package/dist/{config-RF2S4YBA.js → config-SSWYCX4C.js} +10 -9
- package/dist/{config-RF2S4YBA.js.map → config-SSWYCX4C.js.map} +1 -1
- package/dist/{diff-2PPFXZD6.js → diff-76H3Y34M.js} +15 -14
- package/dist/{diff-2PPFXZD6.js.map → diff-76H3Y34M.js.map} +1 -1
- package/dist/{digest-5CRGAAK5.js → digest-WCZD6N7M.js} +12 -11
- package/dist/{digest-5CRGAAK5.js.map → digest-WCZD6N7M.js.map} +1 -1
- package/dist/{fork-W5ZF62UP.js → fork-WTNAUILU.js} +24 -23
- package/dist/{fork-W5ZF62UP.js.map → fork-WTNAUILU.js.map} +1 -1
- package/dist/{hook-U37AFPKY.js → hook-GQQZQ6DK.js} +18 -14
- package/dist/hook-GQQZQ6DK.js.map +1 -0
- package/dist/{hydrate-MAFHTY2W.js → hydrate-Q4FWUQRC.js} +9 -8
- package/dist/{hydrate-MAFHTY2W.js.map → hydrate-Q4FWUQRC.js.map} +1 -1
- package/dist/{init-CJDDD4AS.js → init-AT3BQLXM.js} +12 -11
- package/dist/{init-CJDDD4AS.js.map → init-AT3BQLXM.js.map} +1 -1
- package/dist/{install-skills-2ZAHI73P.js → install-skills-Z76FLXOU.js} +4 -4
- package/dist/install-skills-bin.js +3 -3
- package/dist/{list-KEF73NLQ.js → list-YTK2GLND.js} +5 -5
- package/dist/{move-6J35JMFB.js → move-CE5NIZKL.js} +17 -16
- package/dist/{move-6J35JMFB.js.map → move-CE5NIZKL.js.map} +1 -1
- package/dist/{note-TNC633NG.js → note-2JHWK6CV.js} +13 -12
- package/dist/{note-TNC633NG.js.map → note-2JHWK6CV.js.map} +1 -1
- package/dist/{overlaps-NZL5XFC4.js → overlaps-GXSEH2LG.js} +11 -10
- package/dist/{overlaps-NZL5XFC4.js.map → overlaps-GXSEH2LG.js.map} +1 -1
- package/dist/{pin-E53PGMGD.js → pin-UOW5VW42.js} +13 -12
- package/dist/{pin-E53PGMGD.js.map → pin-UOW5VW42.js.map} +1 -1
- package/dist/{pr-CBLU6UJ2.js → pr-74X5MOPX.js} +13 -12
- package/dist/{pr-CBLU6UJ2.js.map → pr-74X5MOPX.js.map} +1 -1
- package/dist/{prune-FKNNOITA.js → prune-L3VXZUIE.js} +23 -22
- package/dist/{prune-FKNNOITA.js.map → prune-L3VXZUIE.js.map} +1 -1
- package/dist/{pty-host-36Y4XSPP.js → pty-host-5Z3GYXTW.js} +12 -11
- package/dist/{pty-host-36Y4XSPP.js.map → pty-host-5Z3GYXTW.js.map} +1 -1
- package/dist/{read-ESOOJSBO.js → read-G7CVQRH6.js} +11 -10
- package/dist/{read-ESOOJSBO.js.map → read-G7CVQRH6.js.map} +1 -1
- package/dist/{recent-3WYFF36X.js → recent-2LM44HN2.js} +9 -8
- package/dist/{recent-3WYFF36X.js.map → recent-2LM44HN2.js.map} +1 -1
- package/dist/{remove-2CQ4MRSI.js → remove-NVQ2JNMA.js} +24 -23
- package/dist/{remove-2CQ4MRSI.js.map → remove-NVQ2JNMA.js.map} +1 -1
- package/dist/{report-KM4OZCZB.js → report-335HKCCY.js} +4 -4
- package/dist/{resume-NDE6NKKT.js → resume-VA34T7ZR.js} +9 -8
- package/dist/{resume-NDE6NKKT.js.map → resume-VA34T7ZR.js.map} +1 -1
- package/dist/{run-UW4BJCSC.js → run-E2WZPHHK.js} +8 -7
- package/dist/{run-UW4BJCSC.js.map → run-E2WZPHHK.js.map} +1 -1
- package/dist/{screen-5BLTXIKS.js → screen-XSBZHJNW.js} +13 -12
- package/dist/{screen-5BLTXIKS.js.map → screen-XSBZHJNW.js.map} +1 -1
- package/dist/{search-MK6R5VR6.js → search-FJUZPI3P.js} +8 -7
- package/dist/{search-MK6R5VR6.js.map → search-FJUZPI3P.js.map} +1 -1
- package/dist/{section-B4BWRY7K.js → section-BWZW3E2I.js} +13 -12
- package/dist/{section-B4BWRY7K.js.map → section-BWZW3E2I.js.map} +1 -1
- package/dist/{send-OT3OXHHW.js → send-4E7CD6PL.js} +15 -14
- package/dist/{send-OT3OXHHW.js.map → send-4E7CD6PL.js.map} +1 -1
- package/dist/{sessions-6BBMLMPQ.js → sessions-4LFKWTBZ.js} +19 -18
- package/dist/{sessions-6BBMLMPQ.js.map → sessions-4LFKWTBZ.js.map} +1 -1
- package/dist/{snooze-A2BVEYWD.js → snooze-SSSA656T.js} +12 -11
- package/dist/{snooze-A2BVEYWD.js.map → snooze-SSSA656T.js.map} +1 -1
- package/dist/{start-LEYVJWZG.js → start-5LODG4WG.js} +13 -12
- package/dist/{start-LEYVJWZG.js.map → start-5LODG4WG.js.map} +1 -1
- package/dist/{state-FGYNNSDP.js → state-S776FFV5.js} +9 -7
- package/dist/state-S776FFV5.js.map +1 -0
- package/dist/{status-AO653RKW.js → status-U5HKQ7MY.js} +9 -8
- package/dist/{status-AO653RKW.js.map → status-U5HKQ7MY.js.map} +1 -1
- package/dist/{stop-QYIRUR5Y.js → stop-OFQFHRXD.js} +13 -12
- package/dist/{stop-QYIRUR5Y.js.map → stop-OFQFHRXD.js.map} +1 -1
- package/dist/{sync-FE3AEVOP.js → sync-FDXM5EFD.js} +23 -22
- package/dist/{sync-FE3AEVOP.js.map → sync-FDXM5EFD.js.map} +1 -1
- package/dist/{time-4V56YERF.js → time-IIAXBSE7.js} +18 -14
- package/dist/{time-4V56YERF.js.map → time-IIAXBSE7.js.map} +1 -1
- package/dist/time-actions-K5VITQK5.js +15 -0
- package/dist/time-actions-K5VITQK5.js.map +1 -0
- package/dist/timesheet-SS6AA5BC.js +147 -0
- package/dist/timesheet-SS6AA5BC.js.map +1 -0
- package/dist/{todo-Y2BZ65MS.js → todo-2GKRUO4D.js} +6 -6
- package/dist/{tree-PA7BK7F6.js → tree-7S4DUZRZ.js} +20 -19
- package/dist/{tree-PA7BK7F6.js.map → tree-7S4DUZRZ.js.map} +1 -1
- package/dist/{update-EISQJXEI.js → update-7ZE4CG7T.js} +13 -12
- package/dist/{update-EISQJXEI.js.map → update-7ZE4CG7T.js.map} +1 -1
- package/dist/{wait-FW7RARBV.js → wait-TGQLNTE7.js} +13 -12
- package/dist/{wait-FW7RARBV.js.map → wait-TGQLNTE7.js.map} +1 -1
- package/dist/wd-bin.js +7 -7
- package/dist/web/assets/{PtyView-Eh_9_oeq.js → PtyView-VxE2hVXZ.js} +2 -2
- package/dist/web/assets/{PtyView-Eh_9_oeq.js.map → PtyView-VxE2hVXZ.js.map} +1 -1
- package/dist/web/assets/index-DC9qRg0H.css +1 -0
- package/dist/web/assets/index-Dt2LS35B.js +118 -0
- package/dist/web/assets/index-Dt2LS35B.js.map +1 -0
- package/dist/web/index.html +2 -2
- package/dist/{web-EORTIDIA.js → web-W6BZVICE.js} +526 -190
- package/dist/web-W6BZVICE.js.map +1 -0
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
- package/dist/chunk-7HEB6SQS.js.map +0 -1
- package/dist/chunk-B6V6SV2F.js +0 -9
- package/dist/chunk-G5PN5NIS.js.map +0 -1
- package/dist/chunk-OP5ZIVXO.js.map +0 -1
- package/dist/chunk-WB2BP2G5.js.map +0 -1
- package/dist/chunk-WF57CF7A.js.map +0 -1
- package/dist/cli-73A5TR5V.js +0 -18
- package/dist/hook-U37AFPKY.js.map +0 -1
- package/dist/state-FGYNNSDP.js.map +0 -1
- package/dist/web/assets/index-9lt7iidI.css +0 -1
- package/dist/web/assets/index-NvjFIXGV.js +0 -118
- package/dist/web/assets/index-NvjFIXGV.js.map +0 -1
- package/dist/web-EORTIDIA.js.map +0 -1
- /package/dist/{chunk-WTR5BUGS.js.map → chunk-26IZBYVL.js.map} +0 -0
- /package/dist/{chunk-NS3HSXF7.js.map → chunk-3B3UMUE6.js.map} +0 -0
- /package/dist/{chunk-UNLBHYA5.js.map → chunk-427RB7E4.js.map} +0 -0
- /package/dist/{chunk-UPR2F7QP.js.map → chunk-4PP27RI7.js.map} +0 -0
- /package/dist/{chunk-HLXEMPEI.js.map → chunk-6O6765M7.js.map} +0 -0
- /package/dist/{chunk-JJRPLNLN.js.map → chunk-7HGABVGR.js.map} +0 -0
- /package/dist/{chunk-G6IJ76DW.js.map → chunk-ACXPSQJR.js.map} +0 -0
- /package/dist/{chunk-3R4HBEIG.js.map → chunk-AFV5S6UV.js.map} +0 -0
- /package/dist/{chunk-45XJ4JGE.js.map → chunk-AVRDRZ4D.js.map} +0 -0
- /package/dist/{chunk-I5CDLVJY.js.map → chunk-D4FUDMMX.js.map} +0 -0
- /package/dist/{chunk-5XMXZIJS.js.map → chunk-E35NZVPX.js.map} +0 -0
- /package/dist/{chunk-IC5PFQCV.js.map → chunk-HBXDIRM4.js.map} +0 -0
- /package/dist/{chunk-BIL3S6XH.js.map → chunk-HDO3PXCU.js.map} +0 -0
- /package/dist/{chunk-RM6XOZMU.js.map → chunk-IKYZ5CJZ.js.map} +0 -0
- /package/dist/{chunk-NEZNZM7K.js.map → chunk-JQXUIKU5.js.map} +0 -0
- /package/dist/{chunk-H5LKMR45.js.map → chunk-JTHILJFB.js.map} +0 -0
- /package/dist/{chunk-SIHAOB4F.js.map → chunk-MIIJ2HQS.js.map} +0 -0
- /package/dist/{chunk-QKGZ65TC.js.map → chunk-MVU7JAKG.js.map} +0 -0
- /package/dist/{chunk-2IE6UUUD.js.map → chunk-OOCMPS5L.js.map} +0 -0
- /package/dist/{chunk-ICVR5M6W.js.map → chunk-OW46TR4G.js.map} +0 -0
- /package/dist/{chunk-P2U6R35K.js.map → chunk-PUYXTZ32.js.map} +0 -0
- /package/dist/{chunk-6AULWNAN.js.map → chunk-R7B46WXN.js.map} +0 -0
- /package/dist/{chunk-JYWCNLZN.js.map → chunk-RG63ACAK.js.map} +0 -0
- /package/dist/{chunk-7NAXFBFI.js.map → chunk-RKEY4573.js.map} +0 -0
- /package/dist/{chunk-PDF3BZZH.js.map → chunk-RLR66XLG.js.map} +0 -0
- /package/dist/{chunk-QP6LFMMK.js.map → chunk-RMICESXA.js.map} +0 -0
- /package/dist/{chunk-TOQZODGI.js.map → chunk-RQE5UOIW.js.map} +0 -0
- /package/dist/{chunk-WUWED3LV.js.map → chunk-SH7NSDRW.js.map} +0 -0
- /package/dist/{chunk-BLLLVWEB.js.map → chunk-SRIYY5HL.js.map} +0 -0
- /package/dist/{chunk-DW4JPVXB.js.map → chunk-TMNIOM4Y.js.map} +0 -0
- /package/dist/{chunk-KLK6O54M.js.map → chunk-UAAH334K.js.map} +0 -0
- /package/dist/{chunk-ULQQ6SXT.js.map → chunk-WG3BMHKU.js.map} +0 -0
- /package/dist/{chunk-GJDXEHII.js.map → chunk-WH3SPT3N.js.map} +0 -0
- /package/dist/{chunk-73J2ZJA6.js.map → chunk-YAZ3GAZY.js.map} +0 -0
- /package/dist/{chunk-H2NVIZ3M.js.map → chunk-YJVZ5H3I.js.map} +0 -0
- /package/dist/{chunk-7IZW6GLY.js.map → chunk-YZLNJQAV.js.map} +0 -0
- /package/dist/{chunk-SDE3BZ6P.js.map → chunk-ZFPV46FA.js.map} +0 -0
- /package/dist/{chunk-N4EYQKSM.js.map → chunk-ZWD64IDK.js.map} +0 -0
- /package/dist/{cli-73A5TR5V.js.map → cli-RYEDO3OH.js.map} +0 -0
- /package/dist/{command-hook-installer-SGEJTZ2Y.js.map → command-hook-installer-7JB3AC2S.js.map} +0 -0
- /package/dist/{install-skills-2ZAHI73P.js.map → install-skills-Z76FLXOU.js.map} +0 -0
- /package/dist/{list-KEF73NLQ.js.map → list-YTK2GLND.js.map} +0 -0
- /package/dist/{report-KM4OZCZB.js.map → report-335HKCCY.js.map} +0 -0
- /package/dist/{todo-Y2BZ65MS.js.map → todo-2GKRUO4D.js.map} +0 -0
|
@@ -4,25 +4,26 @@ import {
|
|
|
4
4
|
appendNote,
|
|
5
5
|
readNote,
|
|
6
6
|
saveNote
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-JQXUIKU5.js";
|
|
8
8
|
import {
|
|
9
9
|
sessionFromArgs,
|
|
10
10
|
sessionPositionals
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-WG3BMHKU.js";
|
|
12
12
|
import "./chunk-6AQRYLOB.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-RG63ACAK.js";
|
|
14
14
|
import "./chunk-ZSHWP2VS.js";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-7HGABVGR.js";
|
|
16
16
|
import "./chunk-HUXS3VAI.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-OQAQMCHF.js";
|
|
18
|
+
import "./chunk-RQE5UOIW.js";
|
|
19
|
+
import "./chunk-RCYI7SRA.js";
|
|
20
|
+
import "./chunk-NEJVK5CF.js";
|
|
18
21
|
import {
|
|
19
22
|
sessionIdFor
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-N4EYQKSM.js";
|
|
25
|
-
import "./chunk-7HEB6SQS.js";
|
|
23
|
+
} from "./chunk-RT4QZRTC.js";
|
|
24
|
+
import "./chunk-TMNIOM4Y.js";
|
|
25
|
+
import "./chunk-ZWD64IDK.js";
|
|
26
|
+
import "./chunk-QXUHOISF.js";
|
|
26
27
|
|
|
27
28
|
// src/commands/note.ts
|
|
28
29
|
import fs from "fs";
|
|
@@ -75,4 +76,4 @@ var noteCommand = {
|
|
|
75
76
|
export {
|
|
76
77
|
noteCommand
|
|
77
78
|
};
|
|
78
|
-
//# sourceMappingURL=note-
|
|
79
|
+
//# sourceMappingURL=note-2JHWK6CV.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/note.ts"],"sourcesContent":["import fs from 'node:fs';\nimport chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { appendNote, readNote, saveNote, MAX_NOTE_CHARS } from '../core/rail/session-notes.js';\nimport { sessionIdFor } from '../core/sessions/session-id.js';\nimport { sessionFromArgs, sessionPositionals } from './shared/session-arg.js';\n\n/** `work note` — your notes on a session (session-notes.ts), the dashboard's 📝 Notes: print, set, add a line, clear. */\nexport const noteCommand: CommandModule = {\n command: 'note [target] [branch]',\n describe: 'Your notes on a session: print them, --set, --append a line, or --clear (default: the session for this folder)',\n builder: (yargs) =>\n sessionPositionals(yargs)\n .option('set', { type: 'string', describe: 'Replace the notes with this text' })\n .option('set-file', { type: 'string', describe: 'Replace the notes with this file' })\n .option('append', { alias: 'a', type: 'string', describe: 'Add a line at the end' })\n .option('clear', { type: 'boolean', describe: 'Remove them' })\n .conflicts('set', ['append', 'clear', 'set-file'])\n .conflicts('append', ['clear', 'set-file'])\n .conflicts('clear', 'set-file'),\n handler: (argv) => {\n const s = sessionFromArgs(argv);\n if (!s) return;\n const id = sessionIdFor(s);\n const name = `${s.target} · ${s.branch}`;\n let text: string | undefined = typeof argv.set === 'string' ? argv.set : undefined;\n if (typeof argv['set-file'] === 'string') {\n try {\n text = fs.readFileSync(argv['set-file'], 'utf8');\n } catch (err) {\n console.error(chalk.red(`Can't read ${argv['set-file']}: ${(err as Error).message}`));\n process.exitCode = 1;\n return;\n }\n }\n if (text !== undefined && text.length > MAX_NOTE_CHARS) {\n console.error(chalk.red(`At most ${MAX_NOTE_CHARS} characters.`));\n process.exitCode = 1;\n return;\n }\n if (argv.clear) {\n saveNote(id, '');\n console.log(chalk.green(`Cleared the notes on ${name}.`));\n } else if (text !== undefined) {\n saveNote(id, text);\n console.log(chalk.green(`Saved the notes on ${name}.`));\n } else if (typeof argv.append === 'string') {\n if ((readNote(id)?.text.length ?? 0) + argv.append.length + 1 > MAX_NOTE_CHARS) {\n console.error(chalk.red(`At most ${MAX_NOTE_CHARS} characters in all: that would make it longer.`));\n process.exitCode = 1;\n return;\n }\n appendNote(id, argv.append);\n console.log(chalk.green(`Added to the notes on ${name}.`));\n } else {\n const note = readNote(id);\n if (note) console.log(note.text);\n else console.error(chalk.gray(`No notes on ${name} (work note --append \"…\" adds one).`));\n }\n },\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/note.ts"],"sourcesContent":["import fs from 'node:fs';\nimport chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { appendNote, readNote, saveNote, MAX_NOTE_CHARS } from '../core/rail/session-notes.js';\nimport { sessionIdFor } from '../core/sessions/session-id.js';\nimport { sessionFromArgs, sessionPositionals } from './shared/session-arg.js';\n\n/** `work note` — your notes on a session (session-notes.ts), the dashboard's 📝 Notes: print, set, add a line, clear. */\nexport const noteCommand: CommandModule = {\n command: 'note [target] [branch]',\n describe: 'Your notes on a session: print them, --set, --append a line, or --clear (default: the session for this folder)',\n builder: (yargs) =>\n sessionPositionals(yargs)\n .option('set', { type: 'string', describe: 'Replace the notes with this text' })\n .option('set-file', { type: 'string', describe: 'Replace the notes with this file' })\n .option('append', { alias: 'a', type: 'string', describe: 'Add a line at the end' })\n .option('clear', { type: 'boolean', describe: 'Remove them' })\n .conflicts('set', ['append', 'clear', 'set-file'])\n .conflicts('append', ['clear', 'set-file'])\n .conflicts('clear', 'set-file'),\n handler: (argv) => {\n const s = sessionFromArgs(argv);\n if (!s) return;\n const id = sessionIdFor(s);\n const name = `${s.target} · ${s.branch}`;\n let text: string | undefined = typeof argv.set === 'string' ? argv.set : undefined;\n if (typeof argv['set-file'] === 'string') {\n try {\n text = fs.readFileSync(argv['set-file'], 'utf8');\n } catch (err) {\n console.error(chalk.red(`Can't read ${argv['set-file']}: ${(err as Error).message}`));\n process.exitCode = 1;\n return;\n }\n }\n if (text !== undefined && text.length > MAX_NOTE_CHARS) {\n console.error(chalk.red(`At most ${MAX_NOTE_CHARS} characters.`));\n process.exitCode = 1;\n return;\n }\n if (argv.clear) {\n saveNote(id, '');\n console.log(chalk.green(`Cleared the notes on ${name}.`));\n } else if (text !== undefined) {\n saveNote(id, text);\n console.log(chalk.green(`Saved the notes on ${name}.`));\n } else if (typeof argv.append === 'string') {\n if ((readNote(id)?.text.length ?? 0) + argv.append.length + 1 > MAX_NOTE_CHARS) {\n console.error(chalk.red(`At most ${MAX_NOTE_CHARS} characters in all: that would make it longer.`));\n process.exitCode = 1;\n return;\n }\n appendNote(id, argv.append);\n console.log(chalk.green(`Added to the notes on ${name}.`));\n } else {\n const note = readNote(id);\n if (note) console.log(note.text);\n else console.error(chalk.gray(`No notes on ${name} (work note --append \"…\" adds one).`));\n }\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,QAAQ;AACf,OAAO,WAAW;AAOX,IAAM,cAA6B;AAAA,EACxC,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS,CAAC,UACR,mBAAmB,KAAK,EACrB,OAAO,OAAO,EAAE,MAAM,UAAU,UAAU,mCAAmC,CAAC,EAC9E,OAAO,YAAY,EAAE,MAAM,UAAU,UAAU,mCAAmC,CAAC,EACnF,OAAO,UAAU,EAAE,OAAO,KAAK,MAAM,UAAU,UAAU,wBAAwB,CAAC,EAClF,OAAO,SAAS,EAAE,MAAM,WAAW,UAAU,cAAc,CAAC,EAC5D,UAAU,OAAO,CAAC,UAAU,SAAS,UAAU,CAAC,EAChD,UAAU,UAAU,CAAC,SAAS,UAAU,CAAC,EACzC,UAAU,SAAS,UAAU;AAAA,EAClC,SAAS,CAAC,SAAS;AACjB,UAAM,IAAI,gBAAgB,IAAI;AAC9B,QAAI,CAAC,EAAG;AACR,UAAM,KAAK,aAAa,CAAC;AACzB,UAAM,OAAO,GAAG,EAAE,MAAM,SAAM,EAAE,MAAM;AACtC,QAAI,OAA2B,OAAO,KAAK,QAAQ,WAAW,KAAK,MAAM;AACzE,QAAI,OAAO,KAAK,UAAU,MAAM,UAAU;AACxC,UAAI;AACF,eAAO,GAAG,aAAa,KAAK,UAAU,GAAG,MAAM;AAAA,MACjD,SAAS,KAAK;AACZ,gBAAQ,MAAM,MAAM,IAAI,cAAc,KAAK,UAAU,CAAC,KAAM,IAAc,OAAO,EAAE,CAAC;AACpF,gBAAQ,WAAW;AACnB;AAAA,MACF;AAAA,IACF;AACA,QAAI,SAAS,UAAa,KAAK,SAAS,gBAAgB;AACtD,cAAQ,MAAM,MAAM,IAAI,WAAW,cAAc,cAAc,CAAC;AAChE,cAAQ,WAAW;AACnB;AAAA,IACF;AACA,QAAI,KAAK,OAAO;AACd,eAAS,IAAI,EAAE;AACf,cAAQ,IAAI,MAAM,MAAM,wBAAwB,IAAI,GAAG,CAAC;AAAA,IAC1D,WAAW,SAAS,QAAW;AAC7B,eAAS,IAAI,IAAI;AACjB,cAAQ,IAAI,MAAM,MAAM,sBAAsB,IAAI,GAAG,CAAC;AAAA,IACxD,WAAW,OAAO,KAAK,WAAW,UAAU;AAC1C,WAAK,SAAS,EAAE,GAAG,KAAK,UAAU,KAAK,KAAK,OAAO,SAAS,IAAI,gBAAgB;AAC9E,gBAAQ,MAAM,MAAM,IAAI,WAAW,cAAc,gDAAgD,CAAC;AAClG,gBAAQ,WAAW;AACnB;AAAA,MACF;AACA,iBAAW,IAAI,KAAK,MAAM;AAC1B,cAAQ,IAAI,MAAM,MAAM,yBAAyB,IAAI,GAAG,CAAC;AAAA,IAC3D,OAAO;AACL,YAAM,OAAO,SAAS,EAAE;AACxB,UAAI,KAAM,SAAQ,IAAI,KAAK,IAAI;AAAA,UAC1B,SAAQ,MAAM,MAAM,KAAK,eAAe,IAAI,0CAAqC,CAAC;AAAA,IACzF;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
scanChanges
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-MVU7JAKG.js";
|
|
5
|
+
import "./chunk-YJVZ5H3I.js";
|
|
6
6
|
import "./chunk-AKMPF72Y.js";
|
|
7
7
|
import "./chunk-4KZBZA5D.js";
|
|
8
8
|
import {
|
|
9
9
|
loadHistory
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-OQAQMCHF.js";
|
|
11
|
+
import "./chunk-RQE5UOIW.js";
|
|
12
|
+
import "./chunk-RCYI7SRA.js";
|
|
13
|
+
import "./chunk-NEJVK5CF.js";
|
|
11
14
|
import {
|
|
12
15
|
sessionIdFor
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-N4EYQKSM.js";
|
|
18
|
-
import "./chunk-7HEB6SQS.js";
|
|
16
|
+
} from "./chunk-RT4QZRTC.js";
|
|
17
|
+
import "./chunk-TMNIOM4Y.js";
|
|
18
|
+
import "./chunk-ZWD64IDK.js";
|
|
19
|
+
import "./chunk-QXUHOISF.js";
|
|
19
20
|
|
|
20
21
|
// src/commands/overlaps.ts
|
|
21
22
|
import chalk from "chalk";
|
|
@@ -53,4 +54,4 @@ var overlapsCommand = {
|
|
|
53
54
|
export {
|
|
54
55
|
overlapsCommand
|
|
55
56
|
};
|
|
56
|
-
//# sourceMappingURL=overlaps-
|
|
57
|
+
//# sourceMappingURL=overlaps-GXSEH2LG.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/overlaps.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { loadHistory } from '../core/sessions/history.js';\nimport { sessionIdFor } from '../core/sessions/session-id.js';\nimport { scanChanges } from '../core/diff/overlap-scan.js';\n\nexport const overlapsCommand: CommandModule = {\n command: 'overlaps',\n describe: 'Live sessions that change the same files of a repo (they will conflict on merge); --json',\n builder: (yargs) => yargs.option('json', { type: 'boolean', default: false, describe: 'As JSON: session id → overlaps' }),\n handler: async (argv) => {\n const history = loadHistory();\n const { overlaps } = await scanChanges(history);\n if (argv.json) {\n process.stdout.write(JSON.stringify(Object.fromEntries(overlaps), null, 2) + '\\n');\n return;\n }\n if (overlaps.size === 0) {\n console.log(chalk.green('No two live sessions change the same file.'));\n return;\n }\n // Each pair once.\n const seen = new Set<string>();\n for (const s of history) {\n const id = sessionIdFor(s);\n for (const o of overlaps.get(id) ?? []) {\n const pair = [id, o.sessionId].sort().join('|');\n if (seen.has(pair)) continue;\n seen.add(pair);\n console.log(\n chalk.yellow(`⚠ ${s.target} · ${s.branch} ↔ ${o.target} · ${o.branch} (${o.count} file${o.count === 1 ? '' : 's'})`),\n );\n for (const f of o.files) console.log(chalk.gray(` ${f.repo}/${f.path}`));\n if (o.count > o.files.length) console.log(chalk.gray(` …and ${o.count - o.files.length} more`));\n }\n }\n },\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/overlaps.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { loadHistory } from '../core/sessions/history.js';\nimport { sessionIdFor } from '../core/sessions/session-id.js';\nimport { scanChanges } from '../core/diff/overlap-scan.js';\n\nexport const overlapsCommand: CommandModule = {\n command: 'overlaps',\n describe: 'Live sessions that change the same files of a repo (they will conflict on merge); --json',\n builder: (yargs) => yargs.option('json', { type: 'boolean', default: false, describe: 'As JSON: session id → overlaps' }),\n handler: async (argv) => {\n const history = loadHistory();\n const { overlaps } = await scanChanges(history);\n if (argv.json) {\n process.stdout.write(JSON.stringify(Object.fromEntries(overlaps), null, 2) + '\\n');\n return;\n }\n if (overlaps.size === 0) {\n console.log(chalk.green('No two live sessions change the same file.'));\n return;\n }\n // Each pair once.\n const seen = new Set<string>();\n for (const s of history) {\n const id = sessionIdFor(s);\n for (const o of overlaps.get(id) ?? []) {\n const pair = [id, o.sessionId].sort().join('|');\n if (seen.has(pair)) continue;\n seen.add(pair);\n console.log(\n chalk.yellow(`⚠ ${s.target} · ${s.branch} ↔ ${o.target} · ${o.branch} (${o.count} file${o.count === 1 ? '' : 's'})`),\n );\n for (const f of o.files) console.log(chalk.gray(` ${f.repo}/${f.path}`));\n if (o.count > o.files.length) console.log(chalk.gray(` …and ${o.count - o.files.length} more`));\n }\n }\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,WAAW;AAMX,IAAM,kBAAiC;AAAA,EAC5C,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS,CAAC,UAAU,MAAM,OAAO,QAAQ,EAAE,MAAM,WAAW,SAAS,OAAO,UAAU,sCAAiC,CAAC;AAAA,EACxH,SAAS,OAAO,SAAS;AACvB,UAAM,UAAU,YAAY;AAC5B,UAAM,EAAE,SAAS,IAAI,MAAM,YAAY,OAAO;AAC9C,QAAI,KAAK,MAAM;AACb,cAAQ,OAAO,MAAM,KAAK,UAAU,OAAO,YAAY,QAAQ,GAAG,MAAM,CAAC,IAAI,IAAI;AACjF;AAAA,IACF;AACA,QAAI,SAAS,SAAS,GAAG;AACvB,cAAQ,IAAI,MAAM,MAAM,4CAA4C,CAAC;AACrE;AAAA,IACF;AAEA,UAAM,OAAO,oBAAI,IAAY;AAC7B,eAAW,KAAK,SAAS;AACvB,YAAM,KAAK,aAAa,CAAC;AACzB,iBAAW,KAAK,SAAS,IAAI,EAAE,KAAK,CAAC,GAAG;AACtC,cAAM,OAAO,CAAC,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,KAAK,GAAG;AAC9C,YAAI,KAAK,IAAI,IAAI,EAAG;AACpB,aAAK,IAAI,IAAI;AACb,gBAAQ;AAAA,UACN,MAAM,OAAO,UAAK,EAAE,MAAM,SAAM,EAAE,MAAM,aAAQ,EAAE,MAAM,SAAM,EAAE,MAAM,MAAM,EAAE,KAAK,QAAQ,EAAE,UAAU,IAAI,KAAK,GAAG,GAAG;AAAA,QACxH;AACA,mBAAW,KAAK,EAAE,MAAO,SAAQ,IAAI,MAAM,KAAK,OAAO,EAAE,IAAI,IAAI,EAAE,IAAI,EAAE,CAAC;AAC1E,YAAI,EAAE,QAAQ,EAAE,MAAM,OAAQ,SAAQ,IAAI,MAAM,KAAK,iBAAY,EAAE,QAAQ,EAAE,MAAM,MAAM,OAAO,CAAC;AAAA,MACnG;AAAA,IACF;AAAA,EACF;AACF;","names":[]}
|
|
@@ -1,25 +1,26 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
placeSession
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-IKYZ5CJZ.js";
|
|
5
5
|
import {
|
|
6
6
|
sessionFromArgs,
|
|
7
7
|
sessionPositionals
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-WG3BMHKU.js";
|
|
9
9
|
import "./chunk-6AQRYLOB.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-RG63ACAK.js";
|
|
11
11
|
import "./chunk-ZSHWP2VS.js";
|
|
12
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-7HGABVGR.js";
|
|
13
13
|
import "./chunk-HUXS3VAI.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-OQAQMCHF.js";
|
|
15
|
+
import "./chunk-RQE5UOIW.js";
|
|
16
|
+
import "./chunk-RCYI7SRA.js";
|
|
17
|
+
import "./chunk-NEJVK5CF.js";
|
|
15
18
|
import {
|
|
16
19
|
sessionIdFor
|
|
17
|
-
} from "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-N4EYQKSM.js";
|
|
22
|
-
import "./chunk-7HEB6SQS.js";
|
|
20
|
+
} from "./chunk-RT4QZRTC.js";
|
|
21
|
+
import "./chunk-TMNIOM4Y.js";
|
|
22
|
+
import "./chunk-ZWD64IDK.js";
|
|
23
|
+
import "./chunk-QXUHOISF.js";
|
|
23
24
|
|
|
24
25
|
// src/commands/pin.ts
|
|
25
26
|
import chalk from "chalk";
|
|
@@ -42,4 +43,4 @@ var pinCommand = {
|
|
|
42
43
|
export {
|
|
43
44
|
pinCommand
|
|
44
45
|
};
|
|
45
|
-
//# sourceMappingURL=pin-
|
|
46
|
+
//# sourceMappingURL=pin-UOW5VW42.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/pin.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { placeSession } from '../core/rail/rail-store.js';\nimport { sessionIdFor } from '../core/sessions/session-id.js';\nimport { sessionFromArgs, sessionPositionals } from './shared/session-arg.js';\n\n/** `work pin` — pin a session to the top of the dashboard's rail (rail-layout.ts), or `--off`. */\nexport const pinCommand: CommandModule = {\n command: 'pin [target] [branch]',\n describe: \"Pin a session to the top of the dashboard's rail (default: the session for this folder)\",\n builder: (yargs) => sessionPositionals(yargs).option('off', { type: 'boolean', describe: 'Unpin it' }),\n handler: (argv) => {\n const s = sessionFromArgs(argv);\n if (!s) return;\n const r = placeSession(sessionIdFor(s), { pinned: !argv.off });\n if (!r.ok) {\n console.error(chalk.red(r.error));\n process.exitCode = 1;\n return;\n }\n console.log(chalk.green(`${argv.off ? 'Unpinned' : 'Pinned'} ${s.target} · ${s.branch}.`));\n },\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/pin.ts"],"sourcesContent":["import chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { placeSession } from '../core/rail/rail-store.js';\nimport { sessionIdFor } from '../core/sessions/session-id.js';\nimport { sessionFromArgs, sessionPositionals } from './shared/session-arg.js';\n\n/** `work pin` — pin a session to the top of the dashboard's rail (rail-layout.ts), or `--off`. */\nexport const pinCommand: CommandModule = {\n command: 'pin [target] [branch]',\n describe: \"Pin a session to the top of the dashboard's rail (default: the session for this folder)\",\n builder: (yargs) => sessionPositionals(yargs).option('off', { type: 'boolean', describe: 'Unpin it' }),\n handler: (argv) => {\n const s = sessionFromArgs(argv);\n if (!s) return;\n const r = placeSession(sessionIdFor(s), { pinned: !argv.off });\n if (!r.ok) {\n console.error(chalk.red(r.error));\n process.exitCode = 1;\n return;\n }\n console.log(chalk.green(`${argv.off ? 'Unpinned' : 'Pinned'} ${s.target} · ${s.branch}.`));\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,WAAW;AAOX,IAAM,aAA4B;AAAA,EACvC,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS,CAAC,UAAU,mBAAmB,KAAK,EAAE,OAAO,OAAO,EAAE,MAAM,WAAW,UAAU,WAAW,CAAC;AAAA,EACrG,SAAS,CAAC,SAAS;AACjB,UAAM,IAAI,gBAAgB,IAAI;AAC9B,QAAI,CAAC,EAAG;AACR,UAAM,IAAI,aAAa,aAAa,CAAC,GAAG,EAAE,QAAQ,CAAC,KAAK,IAAI,CAAC;AAC7D,QAAI,CAAC,EAAE,IAAI;AACT,cAAQ,MAAM,MAAM,IAAI,EAAE,KAAK,CAAC;AAChC,cAAQ,WAAW;AACnB;AAAA,IACF;AACA,YAAQ,IAAI,MAAM,MAAM,GAAG,KAAK,MAAM,aAAa,QAAQ,IAAI,EAAE,MAAM,SAAM,EAAE,MAAM,GAAG,CAAC;AAAA,EAC3F;AACF;","names":[]}
|
|
@@ -3,28 +3,29 @@ import {
|
|
|
3
3
|
listReplies,
|
|
4
4
|
postDrafts,
|
|
5
5
|
saveDraft
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-26IZBYVL.js";
|
|
7
7
|
import {
|
|
8
8
|
readWebUrl
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-QX4LFFNS.js";
|
|
10
10
|
import {
|
|
11
11
|
findSessionForCwd
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-RG63ACAK.js";
|
|
13
13
|
import "./chunk-ZSHWP2VS.js";
|
|
14
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-7HGABVGR.js";
|
|
15
15
|
import "./chunk-HUXS3VAI.js";
|
|
16
16
|
import {
|
|
17
17
|
defaultRunner
|
|
18
18
|
} from "./chunk-4KZBZA5D.js";
|
|
19
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-OQAQMCHF.js";
|
|
20
|
+
import "./chunk-RQE5UOIW.js";
|
|
21
|
+
import "./chunk-RCYI7SRA.js";
|
|
22
|
+
import "./chunk-NEJVK5CF.js";
|
|
20
23
|
import {
|
|
21
24
|
sessionIdFor
|
|
22
|
-
} from "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-N4EYQKSM.js";
|
|
27
|
-
import "./chunk-7HEB6SQS.js";
|
|
25
|
+
} from "./chunk-RT4QZRTC.js";
|
|
26
|
+
import "./chunk-TMNIOM4Y.js";
|
|
27
|
+
import "./chunk-ZWD64IDK.js";
|
|
28
|
+
import "./chunk-QXUHOISF.js";
|
|
28
29
|
|
|
29
30
|
// src/commands/pr.ts
|
|
30
31
|
import fs from "fs";
|
|
@@ -119,4 +120,4 @@ var prCommand = {
|
|
|
119
120
|
export {
|
|
120
121
|
prCommand
|
|
121
122
|
};
|
|
122
|
-
//# sourceMappingURL=pr-
|
|
123
|
+
//# sourceMappingURL=pr-74X5MOPX.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/pr.ts"],"sourcesContent":["import fs from 'node:fs';\nimport chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { findSessionForCwd } from '../core/comments/pending-delivery.js';\nimport { sessionIdFor } from '../core/sessions/session-id.js';\nimport { listReplies, postDrafts, saveDraft } from '../core/pr/pr-replies.js';\nimport { defaultRunner } from '../core/pr/ship.js';\nimport { readWebUrl } from '../core/platform/web-discovery.js';\n\n/** Tell a running work web a draft changed, so the session header shows it. Best effort. */\nasync function nudgeWeb(sessionId: string): Promise<void> {\n const base = readWebUrl();\n if (!base) return;\n await fetch(`${base}api/replies-changed`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ sessionId }),\n signal: AbortSignal.timeout(3000),\n }).catch(() => {});\n}\n\nfunction sessionHere() {\n const s = findSessionForCwd(process.cwd());\n if (!s) {\n console.error(chalk.red('Not inside a work session (run this from the worktree).'));\n process.exit(1);\n }\n return s;\n}\n\n/**\n * `work pr reply <thread> \"<text>\"` — for the session's Claude: draft the\n * answer to a review thread it was handed (the PR feedback note names each\n * thread). The dashboard shows the draft to you, editable.\n * `work pr post <thread…> [--all] [--no-resolve]` — posts the drafts as they\n * stand and resolves each thread (`--no-resolve`: left open for a person's\n * answer), which Claude runs only after you said yes to them.\n * `work pr replies [--json]` lists the threads and drafts.\n */\nexport const prCommand: CommandModule = {\n command: 'pr <action>',\n describe: 'Review threads handed to this session: draft replies, and post them once the user says yes',\n builder: (y) =>\n y\n .command(\n 'reply <thread> [text..]',\n \"Draft the reply to a review thread (shown in the dashboard; posted only on the user's yes)\",\n (b) =>\n b\n .positional('thread', { type: 'string', demandOption: true, describe: 'The thread id from the feedback note (PRRT_…)' })\n .positional('text', { type: 'string', array: true, describe: 'The reply' })\n .option('body-file', { type: 'string', describe: 'Read the reply from this file instead' }),\n async (argv) => {\n const s = sessionHere();\n const text = argv['body-file']\n ? fs.readFileSync(String(argv['body-file']), 'utf8')\n : ((argv.text as string[] | undefined) ?? []).join(' ');\n const id = sessionIdFor(s);\n const r = saveDraft(id, String(argv.thread), text);\n if (!r.ok) {\n console.error(chalk.red(r.error));\n process.exit(1);\n }\n await nudgeWeb(id);\n console.log(\n `Draft saved for ${r.reply.reviewer}'s thread on PR #${r.reply.prNumber}. Show it to the user; post it (work pr post ${r.reply.threadId}) only once they say yes.`,\n );\n },\n )\n .command(\n 'post [threads..]',\n 'Post drafted replies from your GitHub account — for Claude, only once the user has said yes to them',\n (b) =>\n b\n .positional('threads', { type: 'string', array: true, describe: 'Thread ids (PRRT_…) whose drafts to post' })\n .option('all', { type: 'boolean', default: false, describe: 'Every draft of this session' })\n .option('resolve', {\n type: 'boolean',\n default: true,\n describe: 'Resolve each thread once answered (--no-resolve: leave it open, for a question a person should answer)',\n }),\n async (argv) => {\n const s = sessionHere();\n const id = sessionIdFor(s);\n const asked = (argv.threads as string[] | undefined) ?? [];\n const drafts = listReplies(id).filter((r) => r.status === 'draft' && (argv.all || asked.includes(r.threadId)));\n const unknown = argv.all ? [] : asked.filter((t) => !drafts.some((r) => r.threadId === t));\n for (const t of unknown)\n console.error(chalk.red(`${t}: no draft to post for this session (draft it with \\`work pr reply\\` first)`));\n if (drafts.length === 0) {\n if (!unknown.length) console.error(chalk.red('Nothing to post: name the threads, or --all.'));\n process.exit(1);\n }\n const r = await postDrafts(s, drafts, argv.resolve !== false, defaultRunner);\n await nudgeWeb(id);\n for (const p of r.posted)\n console.log(`Posted to @${p.reviewer}'s thread on PR #${p.prNumber}${p.resolved ? ' (resolved)' : ''}: ${p.url}`);\n for (const f of r.failed) console.error(chalk.red(`${f.threadId}: ${f.error}`));\n if (r.failed.length || unknown.length) process.exit(1);\n },\n )\n .command(\n 'replies',\n 'List the review threads handed to this session and their drafts',\n (b) => b.option('json', { type: 'boolean', default: false }),\n (argv) => {\n const list = listReplies(sessionIdFor(sessionHere()));\n if (argv.json) {\n process.stdout.write(JSON.stringify(list, null, 2) + '\\n');\n return;\n }\n if (list.length === 0) console.log(chalk.gray('No review threads handed to this session.'));\n for (const r of list) {\n console.log(`${r.threadId} PR #${r.prNumber} ${r.where ?? ''} @${r.reviewer} ${chalk.gray(r.status)}`);\n if (r.draft) console.log(chalk.gray(` ${r.draft.replace(/\\s+/g, ' ').slice(0, 160)}`));\n }\n },\n )\n .demandCommand(1),\n handler: () => {},\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/pr.ts"],"sourcesContent":["import fs from 'node:fs';\nimport chalk from 'chalk';\nimport type { CommandModule } from 'yargs';\nimport { findSessionForCwd } from '../core/comments/pending-delivery.js';\nimport { sessionIdFor } from '../core/sessions/session-id.js';\nimport { listReplies, postDrafts, saveDraft } from '../core/pr/pr-replies.js';\nimport { defaultRunner } from '../core/pr/ship.js';\nimport { readWebUrl } from '../core/platform/web-discovery.js';\n\n/** Tell a running work web a draft changed, so the session header shows it. Best effort. */\nasync function nudgeWeb(sessionId: string): Promise<void> {\n const base = readWebUrl();\n if (!base) return;\n await fetch(`${base}api/replies-changed`, {\n method: 'POST',\n headers: { 'Content-Type': 'application/json' },\n body: JSON.stringify({ sessionId }),\n signal: AbortSignal.timeout(3000),\n }).catch(() => {});\n}\n\nfunction sessionHere() {\n const s = findSessionForCwd(process.cwd());\n if (!s) {\n console.error(chalk.red('Not inside a work session (run this from the worktree).'));\n process.exit(1);\n }\n return s;\n}\n\n/**\n * `work pr reply <thread> \"<text>\"` — for the session's Claude: draft the\n * answer to a review thread it was handed (the PR feedback note names each\n * thread). The dashboard shows the draft to you, editable.\n * `work pr post <thread…> [--all] [--no-resolve]` — posts the drafts as they\n * stand and resolves each thread (`--no-resolve`: left open for a person's\n * answer), which Claude runs only after you said yes to them.\n * `work pr replies [--json]` lists the threads and drafts.\n */\nexport const prCommand: CommandModule = {\n command: 'pr <action>',\n describe: 'Review threads handed to this session: draft replies, and post them once the user says yes',\n builder: (y) =>\n y\n .command(\n 'reply <thread> [text..]',\n \"Draft the reply to a review thread (shown in the dashboard; posted only on the user's yes)\",\n (b) =>\n b\n .positional('thread', { type: 'string', demandOption: true, describe: 'The thread id from the feedback note (PRRT_…)' })\n .positional('text', { type: 'string', array: true, describe: 'The reply' })\n .option('body-file', { type: 'string', describe: 'Read the reply from this file instead' }),\n async (argv) => {\n const s = sessionHere();\n const text = argv['body-file']\n ? fs.readFileSync(String(argv['body-file']), 'utf8')\n : ((argv.text as string[] | undefined) ?? []).join(' ');\n const id = sessionIdFor(s);\n const r = saveDraft(id, String(argv.thread), text);\n if (!r.ok) {\n console.error(chalk.red(r.error));\n process.exit(1);\n }\n await nudgeWeb(id);\n console.log(\n `Draft saved for ${r.reply.reviewer}'s thread on PR #${r.reply.prNumber}. Show it to the user; post it (work pr post ${r.reply.threadId}) only once they say yes.`,\n );\n },\n )\n .command(\n 'post [threads..]',\n 'Post drafted replies from your GitHub account — for Claude, only once the user has said yes to them',\n (b) =>\n b\n .positional('threads', { type: 'string', array: true, describe: 'Thread ids (PRRT_…) whose drafts to post' })\n .option('all', { type: 'boolean', default: false, describe: 'Every draft of this session' })\n .option('resolve', {\n type: 'boolean',\n default: true,\n describe: 'Resolve each thread once answered (--no-resolve: leave it open, for a question a person should answer)',\n }),\n async (argv) => {\n const s = sessionHere();\n const id = sessionIdFor(s);\n const asked = (argv.threads as string[] | undefined) ?? [];\n const drafts = listReplies(id).filter((r) => r.status === 'draft' && (argv.all || asked.includes(r.threadId)));\n const unknown = argv.all ? [] : asked.filter((t) => !drafts.some((r) => r.threadId === t));\n for (const t of unknown)\n console.error(chalk.red(`${t}: no draft to post for this session (draft it with \\`work pr reply\\` first)`));\n if (drafts.length === 0) {\n if (!unknown.length) console.error(chalk.red('Nothing to post: name the threads, or --all.'));\n process.exit(1);\n }\n const r = await postDrafts(s, drafts, argv.resolve !== false, defaultRunner);\n await nudgeWeb(id);\n for (const p of r.posted)\n console.log(`Posted to @${p.reviewer}'s thread on PR #${p.prNumber}${p.resolved ? ' (resolved)' : ''}: ${p.url}`);\n for (const f of r.failed) console.error(chalk.red(`${f.threadId}: ${f.error}`));\n if (r.failed.length || unknown.length) process.exit(1);\n },\n )\n .command(\n 'replies',\n 'List the review threads handed to this session and their drafts',\n (b) => b.option('json', { type: 'boolean', default: false }),\n (argv) => {\n const list = listReplies(sessionIdFor(sessionHere()));\n if (argv.json) {\n process.stdout.write(JSON.stringify(list, null, 2) + '\\n');\n return;\n }\n if (list.length === 0) console.log(chalk.gray('No review threads handed to this session.'));\n for (const r of list) {\n console.log(`${r.threadId} PR #${r.prNumber} ${r.where ?? ''} @${r.reviewer} ${chalk.gray(r.status)}`);\n if (r.draft) console.log(chalk.gray(` ${r.draft.replace(/\\s+/g, ' ').slice(0, 160)}`));\n }\n },\n )\n .demandCommand(1),\n handler: () => {},\n};\n"],"mappings":"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","names":["r"]}
|
|
@@ -5,39 +5,40 @@ import {
|
|
|
5
5
|
} from "./chunk-ABQYKTG4.js";
|
|
6
6
|
import {
|
|
7
7
|
defaultCleanupDeps
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-AFV5S6UV.js";
|
|
9
|
+
import "./chunk-RMICESXA.js";
|
|
10
|
+
import "./chunk-26IZBYVL.js";
|
|
11
11
|
import {
|
|
12
12
|
applyCleanup,
|
|
13
13
|
scanCleanup
|
|
14
14
|
} from "./chunk-AKMPF72Y.js";
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-KLK6O54M.js";
|
|
17
|
-
import "./chunk-BLLLVWEB.js";
|
|
15
|
+
import "./chunk-ZFPV46FA.js";
|
|
18
16
|
import "./chunk-L6RUHCKB.js";
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-UAAH334K.js";
|
|
18
|
+
import "./chunk-SRIYY5HL.js";
|
|
19
|
+
import "./chunk-ACXPSQJR.js";
|
|
20
|
+
import "./chunk-427RB7E4.js";
|
|
21
|
+
import "./chunk-R7B46WXN.js";
|
|
22
|
+
import "./chunk-6O6765M7.js";
|
|
23
|
+
import "./chunk-JTHILJFB.js";
|
|
24
|
+
import "./chunk-3XY76XBD.js";
|
|
25
|
+
import "./chunk-RG63ACAK.js";
|
|
26
26
|
import "./chunk-ZSHWP2VS.js";
|
|
27
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-7HGABVGR.js";
|
|
28
28
|
import "./chunk-HUXS3VAI.js";
|
|
29
|
-
import "./chunk-7NAXFBFI.js";
|
|
30
29
|
import "./chunk-5PAPD6VT.js";
|
|
31
30
|
import "./chunk-4KZBZA5D.js";
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
31
|
+
import "./chunk-RKEY4573.js";
|
|
32
|
+
import "./chunk-OQAQMCHF.js";
|
|
33
|
+
import "./chunk-RQE5UOIW.js";
|
|
35
34
|
import "./chunk-RCYI7SRA.js";
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-
|
|
35
|
+
import "./chunk-NEJVK5CF.js";
|
|
36
|
+
import "./chunk-RT4QZRTC.js";
|
|
37
|
+
import "./chunk-TMNIOM4Y.js";
|
|
38
|
+
import "./chunk-ZWD64IDK.js";
|
|
38
39
|
import {
|
|
39
40
|
ensureConfig
|
|
40
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-QXUHOISF.js";
|
|
41
42
|
|
|
42
43
|
// src/commands/prune.ts
|
|
43
44
|
import chalk from "chalk";
|
|
@@ -90,4 +91,4 @@ var pruneCommand = {
|
|
|
90
91
|
export {
|
|
91
92
|
pruneCommand
|
|
92
93
|
};
|
|
93
|
-
//# sourceMappingURL=prune-
|
|
94
|
+
//# sourceMappingURL=prune-L3VXZUIE.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/commands/prune.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { checkbox } from '@inquirer/prompts';\nimport type { CommandModule } from 'yargs';\nimport { ensureConfig } from '../core/platform/config.js';\nimport { applyCleanup, scanCleanup } from '../core/cleanup/cleanup.js';\nimport { defaultCleanupDeps } from '../core/cleanup/cleanup-deps.js';\nimport type { CleanupCandidate } from '../core/api-types.js';\nimport { printCleanupResults, removable } from './shared/cleanup-print.js';\n\nexport const pruneCommand: CommandModule = {\n command: 'prune',\n describe: 'Remove worktrees that are merged (or never committed to), picking from a list',\n builder: (yargs) =>\n yargs.option('force', {\n describe: 'Skip the picker and remove every one that is safe to remove',\n type: 'boolean',\n default: false,\n }),\n handler: async (argv) => {\n const force = argv.force as boolean;\n ensureConfig();\n const deps = defaultCleanupDeps();\n console.log(chalk.gray('Fetching and checking worktrees…\\n'));\n const scan = await scanCleanup(deps);\n for (const f of scan.fetchFailed) console.log(chalk.yellow(` Could not fetch ${f.alias}; its worktrees were not checked: ${f.error}`));\n // Interactive prune is human-confirmed (you see the list and pick), so\n // squash-merged branches are offered too.\n const candidates = removable(scan.candidates, { includeSquash: true });\n if (candidates.length === 0) {\n console.log(chalk.green('Nothing to prune: no worktree is merged, clean and unused for a day.'));\n return;\n }\n const label = (c: CleanupCandidate) => `${c.target}: ${c.branch}${c.isGroup ? ' [group]' : ''} — ${c.reason}`;\n let selected: CleanupCandidate[];\n if (force) {\n selected = candidates;\n console.log(chalk.cyan(`Removing ${selected.length} worktree(s):`));\n for (const c of selected) console.log(` ${label(c)}`);\n } else {\n selected = await checkbox({\n message: 'Select worktrees to remove (the branches are kept)',\n choices: candidates.map((c) => ({ name: label(c), value: c, checked: true })),\n pageSize: Math.min(candidates.length, 25),\n });\n if (selected.length === 0) {\n console.log(chalk.yellow('Nothing selected.'));\n return;\n }\n }\n console.log('');\n const results = await applyCleanup(\n deps,\n selected.map((c) => ({ sessionId: c.sessionId, action: c.verdict === 'gone' ? 'forget' : 'delete' })),\n );\n printCleanupResults(selected, results);\n },\n};\n"],"mappings":"
|
|
1
|
+
{"version":3,"sources":["../src/commands/prune.ts"],"sourcesContent":["import chalk from 'chalk';\nimport { checkbox } from '@inquirer/prompts';\nimport type { CommandModule } from 'yargs';\nimport { ensureConfig } from '../core/platform/config.js';\nimport { applyCleanup, scanCleanup } from '../core/cleanup/cleanup.js';\nimport { defaultCleanupDeps } from '../core/cleanup/cleanup-deps.js';\nimport type { CleanupCandidate } from '../core/api-types.js';\nimport { printCleanupResults, removable } from './shared/cleanup-print.js';\n\nexport const pruneCommand: CommandModule = {\n command: 'prune',\n describe: 'Remove worktrees that are merged (or never committed to), picking from a list',\n builder: (yargs) =>\n yargs.option('force', {\n describe: 'Skip the picker and remove every one that is safe to remove',\n type: 'boolean',\n default: false,\n }),\n handler: async (argv) => {\n const force = argv.force as boolean;\n ensureConfig();\n const deps = defaultCleanupDeps();\n console.log(chalk.gray('Fetching and checking worktrees…\\n'));\n const scan = await scanCleanup(deps);\n for (const f of scan.fetchFailed) console.log(chalk.yellow(` Could not fetch ${f.alias}; its worktrees were not checked: ${f.error}`));\n // Interactive prune is human-confirmed (you see the list and pick), so\n // squash-merged branches are offered too.\n const candidates = removable(scan.candidates, { includeSquash: true });\n if (candidates.length === 0) {\n console.log(chalk.green('Nothing to prune: no worktree is merged, clean and unused for a day.'));\n return;\n }\n const label = (c: CleanupCandidate) => `${c.target}: ${c.branch}${c.isGroup ? ' [group]' : ''} — ${c.reason}`;\n let selected: CleanupCandidate[];\n if (force) {\n selected = candidates;\n console.log(chalk.cyan(`Removing ${selected.length} worktree(s):`));\n for (const c of selected) console.log(` ${label(c)}`);\n } else {\n selected = await checkbox({\n message: 'Select worktrees to remove (the branches are kept)',\n choices: candidates.map((c) => ({ name: label(c), value: c, checked: true })),\n pageSize: Math.min(candidates.length, 25),\n });\n if (selected.length === 0) {\n console.log(chalk.yellow('Nothing selected.'));\n return;\n }\n }\n console.log('');\n const results = await applyCleanup(\n deps,\n selected.map((c) => ({ sessionId: c.sessionId, action: c.verdict === 'gone' ? 'forget' : 'delete' })),\n );\n printCleanupResults(selected, results);\n },\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,WAAW;AAClB,SAAS,gBAAgB;AAQlB,IAAM,eAA8B;AAAA,EACzC,SAAS;AAAA,EACT,UAAU;AAAA,EACV,SAAS,CAAC,UACR,MAAM,OAAO,SAAS;AAAA,IACpB,UAAU;AAAA,IACV,MAAM;AAAA,IACN,SAAS;AAAA,EACX,CAAC;AAAA,EACH,SAAS,OAAO,SAAS;AACvB,UAAM,QAAQ,KAAK;AACnB,iBAAa;AACb,UAAM,OAAO,mBAAmB;AAChC,YAAQ,IAAI,MAAM,KAAK,yCAAoC,CAAC;AAC5D,UAAM,OAAO,MAAM,YAAY,IAAI;AACnC,eAAW,KAAK,KAAK,YAAa,SAAQ,IAAI,MAAM,OAAO,qBAAqB,EAAE,KAAK,qCAAqC,EAAE,KAAK,EAAE,CAAC;AAGtI,UAAM,aAAa,UAAU,KAAK,YAAY,EAAE,eAAe,KAAK,CAAC;AACrE,QAAI,WAAW,WAAW,GAAG;AAC3B,cAAQ,IAAI,MAAM,MAAM,sEAAsE,CAAC;AAC/F;AAAA,IACF;AACA,UAAM,QAAQ,CAAC,MAAwB,GAAG,EAAE,MAAM,KAAK,EAAE,MAAM,GAAG,EAAE,UAAU,aAAa,EAAE,WAAM,EAAE,MAAM;AAC3G,QAAI;AACJ,QAAI,OAAO;AACT,iBAAW;AACX,cAAQ,IAAI,MAAM,KAAK,YAAY,SAAS,MAAM,eAAe,CAAC;AAClE,iBAAW,KAAK,SAAU,SAAQ,IAAI,KAAK,MAAM,CAAC,CAAC,EAAE;AAAA,IACvD,OAAO;AACL,iBAAW,MAAM,SAAS;AAAA,QACxB,SAAS;AAAA,QACT,SAAS,WAAW,IAAI,CAAC,OAAO,EAAE,MAAM,MAAM,CAAC,GAAG,OAAO,GAAG,SAAS,KAAK,EAAE;AAAA,QAC5E,UAAU,KAAK,IAAI,WAAW,QAAQ,EAAE;AAAA,MAC1C,CAAC;AACD,UAAI,SAAS,WAAW,GAAG;AACzB,gBAAQ,IAAI,MAAM,OAAO,mBAAmB,CAAC;AAC7C;AAAA,MACF;AAAA,IACF;AACA,YAAQ,IAAI,EAAE;AACd,UAAM,UAAU,MAAM;AAAA,MACpB;AAAA,MACA,SAAS,IAAI,CAAC,OAAO,EAAE,WAAW,EAAE,WAAW,QAAQ,EAAE,YAAY,SAAS,WAAW,SAAS,EAAE;AAAA,IACtG;AACA,wBAAoB,UAAU,OAAO;AAAA,EACvC;AACF;","names":[]}
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
adoptLegacyRestoreList,
|
|
7
7
|
dbPtySessions
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-SRIYY5HL.js";
|
|
9
9
|
import {
|
|
10
10
|
PROTOCOL_VERSION,
|
|
11
11
|
PtyHostBusyError,
|
|
@@ -19,35 +19,36 @@ import {
|
|
|
19
19
|
keepEnv,
|
|
20
20
|
probeHostDetailed,
|
|
21
21
|
readHostInfo
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-ACXPSQJR.js";
|
|
23
23
|
import {
|
|
24
24
|
bestEffort,
|
|
25
25
|
loadHistory,
|
|
26
26
|
logSwallowed,
|
|
27
27
|
swallow
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import {
|
|
30
|
-
sessionIdFor
|
|
31
|
-
} from "./chunk-WF57CF7A.js";
|
|
28
|
+
} from "./chunk-OQAQMCHF.js";
|
|
32
29
|
import {
|
|
33
30
|
agentById,
|
|
34
31
|
buildAiLaunchArgs,
|
|
35
32
|
killTree
|
|
36
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-RQE5UOIW.js";
|
|
37
34
|
import "./chunk-RCYI7SRA.js";
|
|
35
|
+
import "./chunk-NEJVK5CF.js";
|
|
36
|
+
import {
|
|
37
|
+
sessionIdFor
|
|
38
|
+
} from "./chunk-RT4QZRTC.js";
|
|
38
39
|
import {
|
|
39
40
|
report
|
|
40
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-TMNIOM4Y.js";
|
|
41
42
|
import {
|
|
42
43
|
debug
|
|
43
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-ZWD64IDK.js";
|
|
44
45
|
import {
|
|
45
46
|
atomicWriteFile,
|
|
46
47
|
ensureFile,
|
|
47
48
|
loadConfig,
|
|
48
49
|
withFileLock,
|
|
49
50
|
withFileLockSync
|
|
50
|
-
} from "./chunk-
|
|
51
|
+
} from "./chunk-QXUHOISF.js";
|
|
51
52
|
|
|
52
53
|
// src/commands/pty-host.ts
|
|
53
54
|
import fs4 from "fs";
|
|
@@ -879,4 +880,4 @@ export {
|
|
|
879
880
|
ptyHostCommand,
|
|
880
881
|
stopHost
|
|
881
882
|
};
|
|
882
|
-
//# sourceMappingURL=pty-host-
|
|
883
|
+
//# sourceMappingURL=pty-host-5Z3GYXTW.js.map
|