@qwen-code/qwen-code 0.24.5-preview.0 → 0.24.5
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/bundled/browser-use/SKILL.md +11 -10
- package/bundled/browser-use/runtime/index.js +70 -31
- package/bundled/browser-use/runtime/native-host.js +1 -0
- package/bundled/browser-use/runtime/scripts/native-host-setup.js +1 -0
- package/bundled/computer-use/SKILL.md +182 -224
- package/bundled/qc-helper/docs/configuration/model-providers.md +13 -2
- package/bundled/qc-helper/docs/conversations-recovery.md +10 -0
- package/bundled/qc-helper/docs/features/browser-use.md +22 -12
- package/bundled/qc-helper/docs/features/channels/dingtalk.md +2 -2
- package/bundled/qc-helper/docs/features/channels/dws.md +7 -7
- package/bundled/qc-helper/docs/features/channels/feishu.md +1 -1
- package/bundled/qc-helper/docs/features/channels/github.md +13 -9
- package/bundled/qc-helper/docs/features/channels/gitlab.md +12 -5
- package/bundled/qc-helper/docs/features/channels/overview.md +121 -46
- package/bundled/qc-helper/docs/features/channels/plugins.md +12 -12
- package/bundled/qc-helper/docs/features/channels/qqbot.md +5 -5
- package/bundled/qc-helper/docs/features/channels/telegram.md +5 -5
- package/bundled/qc-helper/docs/features/channels/wecom.md +5 -4
- package/bundled/qc-helper/docs/features/channels/weixin.md +3 -3
- package/bundled/qc-helper/docs/features/code-review.md +4 -0
- package/bundled/qc-helper/docs/features/computer-use.md +1 -1
- package/bundled/qc-helper/docs/quickstart.md +14 -14
- package/bundled/qc-helper/docs/qwen-serve.md +10 -4
- package/bundled/review/SKILL.md +44 -9
- package/bundled/review/references/persistence.md +3 -4
- package/chunks/{MaxSizedBox-3RXPTLCS.js → MaxSizedBox-4MLWQHF3.js} +33 -31
- package/chunks/{StandaloneSessionPicker-74775YBZ.js → StandaloneSessionPicker-PDNU6KJJ.js} +50 -48
- package/chunks/{acp-subagent-executor-OQXOMTFK.js → acp-subagent-executor-JB2J6N73.js} +35 -33
- package/chunks/{acpAgent-MD56LD7L.js → acpAgent-CAPZFZCW.js} +123 -97
- package/chunks/{agent-75EZNG2Q.js → agent-MTWGIPWC.js} +18 -16
- package/chunks/{agent-headless-TQ6MWUDT.js → agent-headless-Z27XJSXK.js} +18 -16
- package/chunks/{anthropicContentGenerator-DCDXTX3R.js → anthropicContentGenerator-VAFZRJWG.js} +3 -3
- package/chunks/{askUserQuestion-2NU6CXK2.js → askUserQuestion-V4OFZD5D.js} +1 -1
- package/chunks/{bridge-KGJYQUWD.js → bridge-BUCSJHCE.js} +35 -33
- package/chunks/{channel-management-service-YN4A3BJ6.js → channel-management-service-Q2B7WUPL.js} +27 -10
- package/chunks/{channel-settings-store-773UOD6B.js → channel-settings-store-U25CVEL6.js} +42 -40
- package/chunks/{channel-worker-group-AKPVHRUO.js → channel-worker-group-QNX4OIMZ.js} +5 -5
- package/chunks/{channel-worker-manager-TDAQSKWX.js → channel-worker-manager-IJCPV4WY.js} +24 -5
- package/chunks/{channel-worker-supervisor-PUMSN4J2.js → channel-worker-supervisor-ENJ2AE2N.js} +4 -4
- package/chunks/{chunk-OU4ZCLGJ.js → chunk-242INZ6Y.js} +1 -1
- package/chunks/{chunk-JOFZBTVL.js → chunk-245NB3M4.js} +1 -1
- package/chunks/{chunk-LISITUEH.js → chunk-26KGIWIW.js} +1 -1
- package/chunks/{chunk-WPHZEGFC.js → chunk-2RQEWY2P.js} +1 -1
- package/chunks/{chunk-DCTJ3GVF.js → chunk-2SCE6YR2.js} +3 -3
- package/chunks/{chunk-STKUN7BR.js → chunk-2XNGG7R3.js} +1 -1
- package/chunks/{chunk-OQE7AA2W.js → chunk-36ZMEEBW.js} +16 -12
- package/chunks/{chunk-Y53WH7VD.js → chunk-44K6Q5AW.js} +3 -3
- package/chunks/{chunk-N4VKU36J.js → chunk-465XOJLQ.js} +1 -1
- package/chunks/{chunk-HD4IXPPC.js → chunk-4A4XNQEZ.js} +3 -3
- package/chunks/{chunk-RXB6Y33E.js → chunk-4VULJ3LV.js} +1 -1
- package/chunks/{chunk-EBRC4GX2.js → chunk-4XXUGJJS.js} +1 -1
- package/chunks/{chunk-MVC4XLNM.js → chunk-53IRNMPU.js} +118 -5
- package/chunks/{chunk-VGLXXHTF.js → chunk-5BLOZPTW.js} +1 -1
- package/chunks/{chunk-3SK2A75W.js → chunk-5OJQLD3P.js} +3 -3
- package/chunks/{chunk-WVNCMGAO.js → chunk-6FURC4LI.js} +1 -1
- package/chunks/{chunk-WVTM33Q3.js → chunk-6KXQIDK2.js} +4 -4
- package/chunks/{chunk-ZKDUQHU4.js → chunk-7MNHZUTA.js} +35 -18
- package/chunks/{chunk-JEIPBSGX.js → chunk-7P5WZQXF.js} +7 -7
- package/chunks/{chunk-GGUOO2XC.js → chunk-7RCAMBLN.js} +1 -1
- package/chunks/{chunk-FBLGI2SO.js → chunk-AAOMFXVZ.js} +7 -7
- package/chunks/{chunk-JM76TMGV.js → chunk-ACLD6C3R.js} +8798 -7901
- package/chunks/{chunk-4FCWKBOC.js → chunk-ALTMZEBU.js} +6 -6
- package/chunks/{chunk-ZHQSWNO6.js → chunk-AN62TPO6.js} +1 -1
- package/chunks/{chunk-U5DPG7JW.js → chunk-AYTI24XN.js} +1 -1
- package/chunks/{chunk-B53FO7JN.js → chunk-AZN2GSLM.js} +2 -2
- package/chunks/{chunk-6KQQPPFF.js → chunk-B3J4BSPL.js} +1 -1
- package/chunks/{chunk-SLSH5TFD.js → chunk-BMCDSO77.js} +4 -4
- package/chunks/{chunk-DBYUN4U3.js → chunk-BUDUHXX3.js} +1 -1
- package/chunks/{chunk-TS4Y2MHO.js → chunk-CGREZDGO.js} +1 -1
- package/chunks/chunk-CLNDQINM.js +523 -0
- package/chunks/{chunk-LNUQA3OE.js → chunk-CVRZNFXO.js} +1 -1
- package/chunks/{chunk-3DBI3LLL.js → chunk-CWLTXYKP.js} +4 -4
- package/chunks/{chunk-B3XMX4SN.js → chunk-DACCX4JI.js} +4 -4
- package/chunks/{chunk-YWZOEHBT.js → chunk-DE2WI7RU.js} +192 -62
- package/chunks/{chunk-3TQVPDCN.js → chunk-DU53RB7A.js} +2 -2
- package/chunks/{chunk-2KZURPTB.js → chunk-DZCTQ2MF.js} +6 -1
- package/chunks/{chunk-35SABQFH.js → chunk-DZUNDX4M.js} +1 -1
- package/chunks/{chunk-4INF7OYV.js → chunk-ELY2U74S.js} +2 -2
- package/chunks/chunk-EMGHODF7.js +56 -0
- package/chunks/{chunk-5FZKG4JB.js → chunk-EMOTEATH.js} +1 -1
- package/chunks/{chunk-LW7WW3Z5.js → chunk-ERGQUKZ2.js} +1 -1
- package/chunks/{chunk-TNWJJEDT.js → chunk-ES6EQNGR.js} +6 -6
- package/chunks/{chunk-E3TLOFX7.js → chunk-EUHSEMO4.js} +62 -7
- package/chunks/{chunk-N25B6FZN.js → chunk-EYCDA5MN.js} +2 -0
- package/chunks/{chunk-GPTEZLRR.js → chunk-F4ERRMCO.js} +25 -23
- package/chunks/{chunk-SXFZ5P7F.js → chunk-FE7D3WKV.js} +1 -1
- package/chunks/{chunk-XEXNBTYX.js → chunk-FH45BQGZ.js} +3 -3
- package/chunks/{chunk-CAORZAZD.js → chunk-FLBUHGL4.js} +10 -10
- package/chunks/{chunk-X2R47SFR.js → chunk-FLVPNMCS.js} +1 -1
- package/chunks/{chunk-5SZSV2CK.js → chunk-FVIJFKEQ.js} +3 -3
- package/chunks/{chunk-KFLDZ3HB.js → chunk-G6XRNTXF.js} +1 -1
- package/chunks/{chunk-2JHQ2J3Y.js → chunk-G72UHXC3.js} +5 -5
- package/chunks/{chunk-4A255ZI6.js → chunk-GAHZJLQG.js} +2 -2
- package/chunks/{chunk-7IVZOKKW.js → chunk-GKJGKTWJ.js} +3 -3
- package/chunks/{chunk-KY4HZXLV.js → chunk-GLPNIOEV.js} +33 -2
- package/chunks/{chunk-6PRSQUPJ.js → chunk-GQZZGEMS.js} +1 -1
- package/chunks/{chunk-G2AE7GYZ.js → chunk-GRUASRWC.js} +1 -1
- package/chunks/{chunk-HH7R6RLK.js → chunk-GTQ35GRO.js} +1 -1
- package/chunks/{chunk-LWRJLRZS.js → chunk-GYLDOFLU.js} +3 -3
- package/chunks/{chunk-MZRJ2JJS.js → chunk-HDSI3RDN.js} +136 -9
- package/chunks/{chunk-RO5K7QUL.js → chunk-HHMJ5ONX.js} +45 -31
- package/chunks/{chunk-E4HNTYHK.js → chunk-HVVQYSBA.js} +32 -9
- package/chunks/{chunk-H2GVLBFU.js → chunk-I36GIR6K.js} +64 -2
- package/chunks/{chunk-VTFLRL55.js → chunk-IBRV4T3I.js} +2 -2
- package/chunks/{chunk-4VSTV4C2.js → chunk-IH22ZGZI.js} +53 -2
- package/chunks/{chunk-AOW7WIWE.js → chunk-IQH7Q5OP.js} +4 -4
- package/chunks/{chunk-OB444SG3.js → chunk-IYKGSUTA.js} +1 -1
- package/chunks/{chunk-HS5OZTQF.js → chunk-J2FLXQJM.js} +1 -1
- package/chunks/{chunk-BBCH7PBA.js → chunk-KACKEW2M.js} +2 -2
- package/chunks/{chunk-JE3J5HFM.js → chunk-KAOHUUM7.js} +62 -251
- package/chunks/{chunk-JCMDVGPR.js → chunk-KGLPVCX7.js} +2 -2
- package/chunks/{chunk-QKXZOHHQ.js → chunk-LDURD6EP.js} +15 -62
- package/chunks/{chunk-O4IH5UEC.js → chunk-LLIYDIGU.js} +20 -20
- package/chunks/{chunk-3XHMOJCP.js → chunk-MBC3PULP.js} +1 -1
- package/chunks/{chunk-SRZA7OU4.js → chunk-MMCGLNPP.js} +6 -6
- package/chunks/{chunk-3NG2ZQAJ.js → chunk-NZC74TT2.js} +1 -1
- package/chunks/{chunk-47C3HPMW.js → chunk-O5YL6KSX.js} +47 -18
- package/chunks/{chunk-EIHZ4FFM.js → chunk-O6PPYFQN.js} +3 -3
- package/chunks/{chunk-XCU752HT.js → chunk-OICDXWXP.js} +13 -19
- package/chunks/{chunk-VJCKLKZX.js → chunk-OOU7XOZF.js} +3 -3
- package/chunks/{chunk-OM5NSL25.js → chunk-P4P7CH7H.js} +38 -38
- package/chunks/{chunk-CIS4SY3R.js → chunk-PPBZHGEQ.js} +3 -3
- package/chunks/{chunk-PB7JBAHF.js → chunk-PVBIEIVZ.js} +0 -1
- package/chunks/{chunk-GG3MO6NO.js → chunk-PWGMHXIV.js} +2 -2
- package/chunks/{chunk-6N2PJAZG.js → chunk-PX2ZOOGQ.js} +1 -1
- package/chunks/{chunk-NNN2PKPV.js → chunk-PYYPSK6Q.js} +36 -495
- package/chunks/{chunk-TKOQGFRE.js → chunk-PZOWKCPJ.js} +1 -1
- package/chunks/{chunk-PJ546DX4.js → chunk-Q36IJ74U.js} +17 -11
- package/chunks/chunk-Q4FJVWI4.js +78 -0
- package/chunks/{chunk-PA4HU5IQ.js → chunk-QATPE3SN.js} +13 -7
- package/chunks/{chunk-MBUUQJPV.js → chunk-QGKAYDES.js} +5 -5
- package/chunks/{chunk-TFBQ5CKI.js → chunk-QNEBHC2E.js} +1 -1
- package/chunks/{chunk-6NA357SF.js → chunk-QTNSMJKU.js} +1 -1
- package/chunks/{chunk-TDLEDOJN.js → chunk-QU7VULWX.js} +5 -4
- package/chunks/{chunk-LOTGIM6V.js → chunk-R3IFSY55.js} +20 -20
- package/chunks/{chunk-ZX6EZ7EH.js → chunk-RBE3WRSN.js} +3 -3
- package/chunks/{chunk-YSZ2XZTG.js → chunk-RBKZ6SK4.js} +5 -5
- package/chunks/{chunk-FLRFAPDA.js → chunk-RCL6OXZC.js} +5 -5
- package/chunks/{chunk-H4W6TJFJ.js → chunk-RONRTFAQ.js} +1 -1
- package/chunks/{chunk-ZEGLZ3MN.js → chunk-SCYKHWRM.js} +5 -5
- package/chunks/{chunk-STUJ7IMZ.js → chunk-SI7XKACY.js} +56 -56
- package/chunks/{chunk-RL2HSTEB.js → chunk-SYZPPX3O.js} +1492 -1140
- package/chunks/{chunk-VUYJRNG5.js → chunk-T7TJPVTY.js} +3 -3
- package/chunks/{chunk-4V5YKOBI.js → chunk-TF7UC7F6.js} +3 -3
- package/chunks/{chunk-NXZD3VNX.js → chunk-TL7DSR47.js} +1 -1
- package/chunks/{chunk-BVFBDXI2.js → chunk-TPFV5YZK.js} +1 -1
- package/chunks/{chunk-YIHOHHJL.js → chunk-TZHXHWEW.js} +1 -1
- package/chunks/{chunk-3X5BDEXS.js → chunk-U6RMVE5X.js} +8 -8
- package/chunks/{chunk-HRVFPNGT.js → chunk-VFNKO4FK.js} +4 -4
- package/chunks/{chunk-VPALWDQL.js → chunk-VUIH3BQL.js} +31 -12
- package/chunks/{chunk-WVNML4HH.js → chunk-VW33WARJ.js} +1 -1
- package/chunks/{chunk-MICQVBPI.js → chunk-WCLHOKAZ.js} +1 -1
- package/chunks/{chunk-KMQ2ZH3Q.js → chunk-WVWCRZ6M.js} +2 -2
- package/chunks/{chunk-5NFAKADR.js → chunk-WZCVB2ER.js} +1 -36
- package/chunks/{chunk-JNQEW7B2.js → chunk-X3A72KX5.js} +6 -6
- package/chunks/{chunk-3JSIWFNA.js → chunk-XHHUGXYW.js} +527 -135
- package/chunks/{chunk-VIA4STCR.js → chunk-YCCBLTSL.js} +3 -3
- package/chunks/{chunk-Q5IEY2TN.js → chunk-Z3I5B4DH.js} +1 -1
- package/chunks/{chunk-O346IB64.js → chunk-ZAJNI63I.js} +1 -1
- package/chunks/{chunk-QR4U27UW.js → chunk-ZJFCDRVP.js} +4 -4
- package/chunks/{codex-subagent-executor-437LQYGM.js → codex-subagent-executor-IKWULWIZ.js} +35 -33
- package/chunks/{config-utils-CVLI36KM.js → config-utils-3IOTAFBG.js} +38 -34
- package/chunks/{contextCommand-2KSW7H5F.js → contextCommand-ZKG2JFCR.js} +33 -31
- package/chunks/{core-runtime-4IB27E7J.js → core-runtime-5CAK5DSM.js} +32 -30
- package/chunks/{create-sub-session-A73TQDAN.js → create-sub-session-DG4CVOQC.js} +33 -31
- package/chunks/{daemon-Y6AOK7LF.js → daemon-D4OAVQKB.js} +1 -1
- package/chunks/{daemon-git-worktree-guard-BTKVV3DZ.js → daemon-git-worktree-guard-S3SFT3H7.js} +32 -30
- package/chunks/{daemon-status-provider-ETDIOWMS.js → daemon-status-provider-GG64ZJR3.js} +40 -38
- package/chunks/{daemon-trust-policy-U5SPHJLP.js → daemon-trust-policy-XNWYLQ32.js} +38 -36
- package/chunks/{daemon-trust-policy-monitor-QKRCO5WI.js → daemon-trust-policy-monitor-DR5CRWMM.js} +38 -36
- package/chunks/{deferred-core-runtime-FRELZPIE.js → deferred-core-runtime-V4Q674KN.js} +32 -30
- package/chunks/{dist-54LGNLWW.js → dist-3M75XY4G.js} +1 -1
- package/chunks/{dist-YZBMQPNS.js → dist-6U5NQYA7.js} +5 -5
- package/chunks/{dist-FVMLRUVM.js → dist-AS2RPYOB.js} +1 -1
- package/chunks/{dist-HANHY2MK.js → dist-GFT4GU72.js} +2 -2
- package/chunks/{dist-Y5GP7SWL.js → dist-J7JK3GPY.js} +10 -9
- package/chunks/{dist-O723VE2K.js → dist-JTPRKF5H.js} +30 -27
- package/chunks/{dist-MGZKUISU.js → dist-MOO5VOC5.js} +7 -20
- package/chunks/{dist-IZ66D5A3.js → dist-NJ2L5QKL.js} +1 -1
- package/chunks/{dist-EI2XAB4W.js → dist-YC6LDCKH.js} +22 -28
- package/chunks/{edit-TQ3CABYP.js → edit-FPIWTN3L.js} +20 -18
- package/chunks/{enter-worktree-J46XVFRS.js → enter-worktree-55OWD4LT.js} +4 -3
- package/chunks/{enterPlanMode-JHOWELZO.js → enterPlanMode-GDZVXYB2.js} +18 -16
- package/chunks/{environment-LUM7XX27.js → environment-Q2BVTUQO.js} +36 -32
- package/chunks/{errors-SH32ID5I.js → errors-MZTLVUEM.js} +34 -32
- package/chunks/{execution-sandbox-settings-HIYVUBII.js → execution-sandbox-settings-3WJ67GX3.js} +3 -1
- package/chunks/{execution-tool-IIEL25CL.js → execution-tool-DZ4XSEFZ.js} +21 -19
- package/chunks/{execution-worker-NKKEZ4XF.js → execution-worker-L3TM3F5D.js} +24 -22
- package/chunks/{exit-worktree-BC4SDZCC.js → exit-worktree-MI6N4OUP.js} +4 -3
- package/chunks/{exitPlanMode-PUICCCQ5.js → exitPlanMode-VIGOD2KP.js} +18 -16
- package/chunks/{fast-path-QH3QTZZA.js → fast-path-JCKEFUUL.js} +4 -4
- package/chunks/{fast-path-settings-TQAYWLXR.js → fast-path-settings-VIYSH3SD.js} +2 -2
- package/chunks/{glob-OEB4WH3Z.js → glob-UOKQZHKL.js} +18 -16
- package/chunks/{goal-tools-KWGKFUSK.js → goal-tools-G4RIX4ER.js} +18 -16
- package/chunks/{handleAutoUpdate-KEA7JSUD.js → handleAutoUpdate-UZZEGL3N.js} +34 -32
- package/chunks/{i18n-AC3MUXKZ.js → i18n-IL33FVND.js} +32 -30
- package/chunks/{initializer-WBD32BEX.js → initializer-BCXBRM6Y.js} +38 -36
- package/chunks/{installationInfo-JRGFTKWY.js → installationInfo-V7OKUOJV.js} +32 -30
- package/chunks/{list-S7KW7NBX.js → list-LQHG6SXA.js} +41 -39
- package/chunks/{llm-E32WLISX.js → llm-JWCANCDC.js} +85 -74
- package/chunks/{llm-content-generator-OMKJHC5P.js → llm-content-generator-OXMMHUVK.js} +3 -3
- package/chunks/{loadedSettingsAdapter-5OSU3J46.js → loadedSettingsAdapter-EKXSRWMY.js} +38 -36
- package/chunks/{local-execution-environment-IQHCTUJ5.js → local-execution-environment-XIQLRMLF.js} +24 -22
- package/chunks/{loggingContentGenerator-JIYG3LJS.js → loggingContentGenerator-6KHNZDTZ.js} +20 -18
- package/chunks/{managed-npm-update-RKAT7AMQ.js → managed-npm-update-MBUH5TIX.js} +32 -30
- package/chunks/managed-runtime-attestation-worker-G23AEEMF.js +367 -0
- package/chunks/{mcp-SV72BZKG.js → mcp-AYVCEEN7.js} +38 -36
- package/chunks/{model-call-collection-PKDMVCZN.js → model-call-collection-OKUGOY4B.js} +1 -1
- package/chunks/{model-configuration-A52XMQW7.js → model-configuration-Q3MNGG3B.js} +38 -36
- package/chunks/{modelConfigUtils-7O4P3SLE.js → modelConfigUtils-WC5XDR34.js} +33 -31
- package/chunks/{monitor-ZXRV2DJB.js → monitor-7JUZXYZN.js} +18 -16
- package/chunks/{nonInteractiveCli-UPSGIYRC.js → nonInteractiveCli-B3GCZ6NJ.js} +74 -73
- package/chunks/{nonInteractiveToolExecutor-TDKVR43J.js → nonInteractiveToolExecutor-IUHO7PXG.js} +19 -17
- package/chunks/{notebook-edit-FBVHAHYM.js → notebook-edit-IYDACZDW.js} +19 -17
- package/chunks/{omni-3NREMV2Q.js → omni-DLBHISHC.js} +10 -7
- package/chunks/{openaiContentGenerator-EWPBZFIT.js → openaiContentGenerator-W5GN6H6Z.js} +12 -10
- package/chunks/{openaiResponsesContentGenerator-3CI3PINB.js → openaiResponsesContentGenerator-BXXRYJQQ.js} +5 -5
- package/chunks/{pidfile-BBUANGZX.js → pidfile-QIBF53CW.js} +32 -30
- package/chunks/{processUtils-6OHQLG7W.js → processUtils-2LU22KCR.js} +2 -2
- package/chunks/{prompt-terminal-ledger-ZBFYXJ4L.js → prompt-terminal-ledger-LXFVLR6C.js} +33 -31
- package/chunks/{qwenContentGenerator-62F5IKXJ.js → qwenContentGenerator-LYMLXBWI.js} +21 -19
- package/chunks/{reactive-degrade-URJMXJ7N.js → reactive-degrade-HPYBJHYA.js} +6 -6
- package/chunks/{read-file-IM4Q5TKI.js → read-file-SXS2MKDY.js} +6 -3
- package/chunks/{record-artifact-K4XSMW4X.js → record-artifact-XP3X7RE5.js} +3 -2
- package/chunks/{record-source-XZCI3IGU.js → record-source-2VBLKVIE.js} +2 -2
- package/chunks/{report-findings-MCGXBQFX.js → report-findings-D2QUYUOG.js} +4 -3
- package/chunks/{request-shutdown-TT62PREA.js → request-shutdown-R5SA5GE3.js} +1 -1
- package/chunks/{resumeHistoryUtils-O3NQMDVR.js → resumeHistoryUtils-UPGZGP5V.js} +35 -33
- package/chunks/{ripGrep-BG2FEVIV.js → ripGrep-X33VVIN5.js} +8 -5
- package/chunks/{run-qwen-serve-GMLWJITM.js → run-qwen-serve-CUB2NZ6P.js} +278 -79
- package/chunks/{runtime-SSGPOXRZ.js → runtime-2DAVBADX.js} +43 -41
- package/chunks/{sandboxConfig-ALYLLNWY.js → sandboxConfig-ESBH3F27.js} +34 -32
- package/chunks/{scheduled-tasks-QJTC5XQ7.js → scheduled-tasks-TGWYXZWW.js} +38 -36
- package/chunks/{scheduler-PEXTY7IG.js → scheduler-XGLZCXPN.js} +34 -32
- package/chunks/{send-message-3UM7XRTB.js → send-message-FBU6WDID.js} +1 -1
- package/chunks/{serve-OVAUTKXK.js → serve-7RX4AIID.js} +38 -36
- package/chunks/{server-3MMYOOJW.js → server-MJETIFJS.js} +1789 -375
- package/chunks/{session-PZBIKBQJ.js → session-7AVYU3TC.js} +75 -74
- package/chunks/{session-attachments-root-ESP5CNBV.js → session-attachments-root-RONFQ3D3.js} +32 -30
- package/chunks/{session-pr-refresh-B3N7PKUP.js → session-pr-refresh-ZPT6TAD4.js} +37 -35
- package/chunks/{settings-KSQ2DGPY.js → settings-FPMUAVWD.js} +37 -35
- package/chunks/{shell-3V26EVNC.js → shell-THD5EYOK.js} +18 -16
- package/chunks/{skill-XP7F3LBV.js → skill-2D6KXDC5.js} +52 -13
- package/chunks/{skill-settings-PDESL7S3.js → skill-settings-XW7X244B.js} +38 -36
- package/chunks/{spawnChannel-NVO7CCBW.js → spawnChannel-DBSAAUUT.js} +34 -32
- package/chunks/{standalone-update-FDWS2EGF.js → standalone-update-TFAWA676.js} +33 -31
- package/chunks/{start-opentui-ui-WIFFY5UD.js → start-opentui-ui-VYMAXPBH.js} +87 -86
- package/chunks/{startInteractiveUI-YBLIRIHD.js → startInteractiveUI-Z54XKH35.js} +1037 -966
- package/chunks/{task-create-PEI7AJLE.js → task-create-PVF66J3R.js} +2 -2
- package/chunks/{task-update-MQZRWBGK.js → task-update-RSIITTOK.js} +2 -2
- package/chunks/{team-create-Z5JUEMB7.js → team-create-TPCELNBJ.js} +18 -16
- package/chunks/{team-plan-approval-ZLLHMEQN.js → team-plan-approval-RUURGHQL.js} +18 -16
- package/chunks/{terminal-image-renderer-QFO2JTTT.js → terminal-image-renderer-SLJVUD4Z.js} +32 -30
- package/chunks/{theme-manager-N7ILUTRY.js → theme-manager-VBOIN2KT.js} +32 -30
- package/chunks/{tool-call-PLSQ34VE.js → tool-call-DUHP6UXC.js} +2 -2
- package/chunks/{tool-result-media-OAHUKGRK.js → tool-result-media-WU6QAREN.js} +10 -7
- package/chunks/{tool-search-534QKE2X.js → tool-search-ET4NH2LK.js} +7 -4
- package/chunks/{total-session-admission-EZJQKTPF.js → total-session-admission-UWMJWTWP.js} +35 -33
- package/chunks/{trustedFolders-4ZEV6RXD.js → trustedFolders-3WNZBUH7.js} +33 -31
- package/chunks/{update-relaunch-GB3SGRDP.js → update-relaunch-SHS3BD6V.js} +5 -5
- package/chunks/{updateCheck-DVAGAEQ4.js → updateCheck-MDF2FCRN.js} +32 -30
- package/chunks/{upload-config-DMZVTDH7.js → upload-config-LVVUIKA2.js} +4 -4
- package/chunks/{useAutoAcceptIndicator-PTQBS42B.js → useAutoAcceptIndicator-26OOM7OM.js} +41 -39
- package/chunks/{validateNonInterActiveAuth-DU3WXVSU.js → validateNonInterActiveAuth-TBCZCQIN.js} +72 -71
- package/chunks/{version-PNMZGKCV.js → version-MICV7I4Y.js} +1 -1
- package/chunks/{web-fetch-LMCOAHW6.js → web-fetch-3O2DFRE5.js} +13 -9
- package/chunks/{web-search-N7RR74LA.js → web-search-5FS3NB3D.js} +4 -4
- package/chunks/{web-shell-static-GI6FVIMI.js → web-shell-static-E3O6NW7Y.js} +4 -3
- package/chunks/{workflow-ZZPHI7FK.js → workflow-FRJO5ZUI.js} +19 -17
- package/chunks/{workspace-providers-status-TU73CNRF.js → workspace-providers-status-I5MO7Z2T.js} +43 -41
- package/chunks/{workspace-registration-store-743FRSOU.js → workspace-registration-store-CBHKV34L.js} +1 -1
- package/chunks/{workspace-registry-S7QTXFWM.js → workspace-registry-2UKNZO5M.js} +35 -33
- package/chunks/{workspace-runtime-coordinator-GWNDUIGO.js → workspace-runtime-coordinator-TKCI5WJW.js} +36 -34
- package/chunks/{workspace-service-CERZFJ3B.js → workspace-service-M3ZKR6WL.js} +40 -38
- package/chunks/{workspace-skills-status-5M3EIAUY.js → workspace-skills-status-OC3EYL7U.js} +41 -39
- package/chunks/{workspace-trust-reconciler-Q3LUKMQB.js → workspace-trust-reconciler-YQZSUOH4.js} +41 -39
- package/chunks/{write-file-CT54LXQL.js → write-file-BATJLBJX.js} +21 -19
- package/chunks/{zoom-image-EU3PGSZM.js → zoom-image-5I7DDLQE.js} +10 -6
- package/cli-entry.js +13 -0
- package/cli.js +24 -12
- package/execution-worker.js +1 -1
- package/export-transcript-document.css +1 -1
- package/export-transcript-document.js +104 -104
- package/package.json +3 -3
- package/web-shell/assets/{abnfDiagram-VCTEODGH-DDYEvG-M.js → abnfDiagram-VCTEODGH-DQHroFS1.js} +1 -1
- package/web-shell/assets/{arc-DQncKWFX.js → arc-BrOc_HVh.js} +1 -1
- package/web-shell/assets/{architectureDiagram-5GKGNRK7-C0-8u9zj.js → architectureDiagram-5GKGNRK7-DXce8IH6.js} +1 -1
- package/web-shell/assets/{blockDiagram-NRAW4CY4-Cpt59Ge5.js → blockDiagram-NRAW4CY4-96A3Q3-l.js} +1 -1
- package/web-shell/assets/{c4Diagram-UCG6FXSJ-BvESWh83.js → c4Diagram-UCG6FXSJ-CQBg2PSg.js} +1 -1
- package/web-shell/assets/channel-CBP6pwSs.js +1 -0
- package/web-shell/assets/{chunk-2Q5K7J3B-wKulGIU6.js → chunk-2Q5K7J3B-i_jhVz-t.js} +1 -1
- package/web-shell/assets/{chunk-5VM5RSS4-BX6kRoq7.js → chunk-5VM5RSS4-Cx3gMrWT.js} +1 -1
- package/web-shell/assets/{chunk-F27PBJKO-wA4IqTt-.js → chunk-F27PBJKO-B9WwW7C0.js} +1 -1
- package/web-shell/assets/{chunk-G27WJ6UU-B7hzevlb.js → chunk-G27WJ6UU-B8t0FNPI.js} +1 -1
- package/web-shell/assets/{chunk-JWPE2WC7-BdBg9pJg.js → chunk-JWPE2WC7-Dg0__6CF.js} +1 -1
- package/web-shell/assets/{chunk-LCL6LL3I-DghmF6LJ.js → chunk-LCL6LL3I-DUwE5g3m.js} +1 -1
- package/web-shell/assets/{chunk-POPQ4Y6H-BbReTOod.js → chunk-POPQ4Y6H-BirYW5iS.js} +1 -1
- package/web-shell/assets/{chunk-SVP7TREG-C1t0_19D.js → chunk-SVP7TREG-_ONJKtFF.js} +1 -1
- package/web-shell/assets/{chunk-XXDRQBXY-DQBby5mI.js → chunk-XXDRQBXY-DGi0chgj.js} +1 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-_4_fFrN3.js +1 -0
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-_4_fFrN3.js +1 -0
- package/web-shell/assets/{cose-bilkent-JH36ORCC-CNrSyg7B.js → cose-bilkent-JH36ORCC-BSSFxREn.js} +1 -1
- package/web-shell/assets/{cynefin-OW5HDTMX-DoxgDRN-.js → cynefin-OW5HDTMX-h-oYVCez.js} +1 -1
- package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-BmUwbS8Q.js → cynefinDiagram-5FMLGOSQ-CXj6T7Pm.js} +1 -1
- package/web-shell/assets/{dagre-3AP2YEHR-BJrOVIjc.js → dagre-3AP2YEHR-Ch9GIhJm.js} +1 -1
- package/web-shell/assets/{diagram-S7CK7UJ4-TDX4KU9V.js → diagram-S7CK7UJ4-Cq3W541T.js} +1 -1
- package/web-shell/assets/{diagram-UQ7AKVKN-D3VUQkGl.js → diagram-UQ7AKVKN-Bm1R5-sN.js} +1 -1
- package/web-shell/assets/{diagram-VSXAHHWV-CqCpgViy.js → diagram-VSXAHHWV-BW2qG6Vh.js} +1 -1
- package/web-shell/assets/{diagram-VX7I27RA-CthqfwCs.js → diagram-VX7I27RA-DN96PhRe.js} +1 -1
- package/web-shell/assets/{diagram-Z3DM3KII-BRY3Ahvu.js → diagram-Z3DM3KII-A8MnwaJr.js} +1 -1
- package/web-shell/assets/{ebnfDiagram-PWID7BFC-tJvTnIwp.js → ebnfDiagram-PWID7BFC-CZTpUypI.js} +1 -1
- package/web-shell/assets/{erDiagram-SSCWMZ5O-DT4b7w5B.js → erDiagram-SSCWMZ5O-CbxCRFru.js} +1 -1
- package/web-shell/assets/{flowDiagram-A5DVABFB-C5oirWSf.js → flowDiagram-A5DVABFB-Bt1PM2Dy.js} +1 -1
- package/web-shell/assets/{ganttDiagram-EL5Y4UJY-ZD3kNlO4.js → ganttDiagram-EL5Y4UJY-CTgim3LX.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-Bp1sg_wH.js → gitGraphDiagram-WWUBYQGX-h4jX7S4l.js} +1 -1
- package/web-shell/assets/{index-DSIzVof7.js → index-BDxWHGNm.js} +1 -1
- package/web-shell/assets/index-Bd3iA5Er.js +2407 -0
- package/web-shell/assets/index-DuwfO01z.css +36 -0
- package/web-shell/assets/{infoDiagram-RXCK75RN-Btumz_CZ.js → infoDiagram-RXCK75RN-DsIsFmZ4.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-5VMMS53U-Dx8_uvso.js → ishikawaDiagram-5VMMS53U-BgF2V3rC.js} +1 -1
- package/web-shell/assets/{journeyDiagram-EYS64GPL-DS5spUhj.js → journeyDiagram-EYS64GPL-CJ2ibWhB.js} +1 -1
- package/web-shell/assets/{kanban-definition-3QL26DDD-DttC9d4D.js → kanban-definition-3QL26DDD-oqNfpjND.js} +1 -1
- package/web-shell/assets/{layout-BDOJQJbX.js → layout-DKF2f-UC.js} +1 -1
- package/web-shell/assets/{linear-BsUVMxld.js → linear-CadmYA8J.js} +1 -1
- package/web-shell/assets/{mermaid.core-De4-EW4Z.js → mermaid.core-BSD13L-h.js} +6 -6
- package/web-shell/assets/{mindmap-definition-FBJOCRG2-BsYY98Wv.js → mindmap-definition-FBJOCRG2-Cg3jlHzV.js} +1 -1
- package/web-shell/assets/{pegDiagram-XKGWAZYB-DXnnQrVY.js → pegDiagram-XKGWAZYB-BGzqlBWk.js} +1 -1
- package/web-shell/assets/{pieDiagram-E7YTZNPT-DGLAGUYR.js → pieDiagram-E7YTZNPT-BVDdPYnC.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-AXDQQJYC-Y8DcMTa5.js → quadrantDiagram-AXDQQJYC-D7maRW6r.js} +1 -1
- package/web-shell/assets/{railroadDiagram-O6MQD6OU-ZgauslUZ.js → railroadDiagram-O6MQD6OU-C7J0Nnqc.js} +1 -1
- package/web-shell/assets/{requirementDiagram-EFPCY7ZU-Kxtu4twe.js → requirementDiagram-EFPCY7ZU-CDEpUB7S.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-P5KCCOFB-BKsLF9EA.js → sankeyDiagram-P5KCCOFB-DoA0BWeR.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-D8sCv1NK.js → sequenceDiagram-WJ2MYXX4-DlqRjDLl.js} +1 -1
- package/web-shell/assets/{sizeCapture-X5ZJPWSS-BX8sokZX.js → sizeCapture-X5ZJPWSS-3l2EJ1DB.js} +1 -1
- package/web-shell/assets/{stateDiagram-HBIQ2CUA-DFMl58kv.js → stateDiagram-HBIQ2CUA-Bdq0N6Lr.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-DtdYpKZp.js +1 -0
- package/web-shell/assets/{swimlanes-XN3QIQJK-BnMwURLN.js → swimlanes-XN3QIQJK-B4ArxdLV.js} +1 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-B_iL0Dc4.js +8 -0
- package/web-shell/assets/{timeline-definition-24CTP7MA-C8y77DDz.js → timeline-definition-24CTP7MA-B_Ug6D_k.js} +1 -1
- package/web-shell/assets/{vennDiagram-4TSXK5OY-DOWQgX9u.js → vennDiagram-4TSXK5OY-BR9tvaDT.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-VM6X3IG4-BM0AVIzE.js → wardleyDiagram-VM6X3IG4-BdGIt6qE.js} +1 -1
- package/web-shell/assets/{xychartDiagram-S5SC5T6Z-B18-YghG.js → xychartDiagram-S5SC5T6Z-NxS8XkXN.js} +1 -1
- package/web-shell/index.html +2 -2
- package/web-shell/sw.js +1 -1
- package/bundled/computer-use/references/macos.md +0 -208
- package/bundled/computer-use/references/windows-linux.md +0 -247
- package/web-shell/assets/channel-B88Zt8_x.js +0 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-Dp-7ruHm.js +0 -1
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-Dp-7ruHm.js +0 -1
- package/web-shell/assets/index-CpxLhWqx.js +0 -2337
- package/web-shell/assets/index-mr0Sw0G-.css +0 -36
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-B3HSbbo2.js +0 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-FnO0SUMi.js +0 -8
|
@@ -69,19 +69,23 @@ import {
|
|
|
69
69
|
recursivelyHydrateStrings,
|
|
70
70
|
repairOrphanedToolUseTurns,
|
|
71
71
|
runForkedAgent,
|
|
72
|
+
runGit,
|
|
73
|
+
runGitCapture,
|
|
72
74
|
runWithForkedChatModel,
|
|
73
75
|
runWithTimeout,
|
|
74
76
|
sigtermPids,
|
|
77
|
+
streamGitRecords,
|
|
75
78
|
stripToolResultImages,
|
|
76
79
|
toolResultBoundaryArtifact,
|
|
77
80
|
toolResultPartDiagnosticValues
|
|
78
|
-
} from "./chunk-
|
|
81
|
+
} from "./chunk-SYZPPX3O.js";
|
|
79
82
|
import {
|
|
80
83
|
shellResultText
|
|
81
84
|
} from "./chunk-4M7RD5QQ.js";
|
|
82
85
|
import {
|
|
83
86
|
hasVerifiableInode,
|
|
84
|
-
openNoFollow
|
|
87
|
+
openNoFollow,
|
|
88
|
+
openSyncNoFollow
|
|
85
89
|
} from "./chunk-HEOH7JZY.js";
|
|
86
90
|
import {
|
|
87
91
|
projectUserTranscriptForDisplay
|
|
@@ -95,7 +99,7 @@ import {
|
|
|
95
99
|
import {
|
|
96
100
|
getProjectSkillsRoot,
|
|
97
101
|
parse
|
|
98
|
-
} from "./chunk-
|
|
102
|
+
} from "./chunk-QNEBHC2E.js";
|
|
99
103
|
import {
|
|
100
104
|
glob,
|
|
101
105
|
globSync
|
|
@@ -121,22 +125,21 @@ import {
|
|
|
121
125
|
} from "./chunk-VNTJJ4WQ.js";
|
|
122
126
|
import {
|
|
123
127
|
require_picomatch
|
|
124
|
-
} from "./chunk-
|
|
128
|
+
} from "./chunk-O5YL6KSX.js";
|
|
125
129
|
import {
|
|
126
130
|
BUILT_IN_OUTPUT_STYLES,
|
|
127
131
|
getBuiltInOutputStyle
|
|
128
|
-
} from "./chunk-
|
|
132
|
+
} from "./chunk-KAOHUUM7.js";
|
|
129
133
|
import {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
} from "./chunk-GC3J5W2O.js";
|
|
134
|
+
NO_EXEC_CONFIG
|
|
135
|
+
} from "./chunk-P6OZD6V2.js";
|
|
133
136
|
import {
|
|
134
137
|
fetchWithPolicy
|
|
135
138
|
} from "./chunk-Z27N2QYZ.js";
|
|
136
139
|
import {
|
|
137
140
|
getModelsForProviderProtocol,
|
|
138
141
|
tryResolveModelProtocol
|
|
139
|
-
} from "./chunk-
|
|
142
|
+
} from "./chunk-242INZ6Y.js";
|
|
140
143
|
import {
|
|
141
144
|
COMBINED_PASS_TOLERANCE_FACTOR,
|
|
142
145
|
TOOL_OUTPUT_TRUNCATED_PREFIX,
|
|
@@ -144,7 +147,7 @@ import {
|
|
|
144
147
|
addMCPStatusChangeListener,
|
|
145
148
|
removeMCPStatusChangeListener,
|
|
146
149
|
updateMCPServerStatus
|
|
147
|
-
} from "./chunk-
|
|
150
|
+
} from "./chunk-HDSI3RDN.js";
|
|
148
151
|
import {
|
|
149
152
|
E_TIMEOUT,
|
|
150
153
|
Mutex,
|
|
@@ -159,7 +162,7 @@ import {
|
|
|
159
162
|
isCacheableReadResult,
|
|
160
163
|
isWithinRoot,
|
|
161
164
|
processSingleFileContent
|
|
162
|
-
} from "./chunk-
|
|
165
|
+
} from "./chunk-PYYPSK6Q.js";
|
|
163
166
|
import {
|
|
164
167
|
getAutoMemoryRoot,
|
|
165
168
|
getUserAutoMemoryRoot
|
|
@@ -170,6 +173,10 @@ import {
|
|
|
170
173
|
import {
|
|
171
174
|
getInvocationContext
|
|
172
175
|
} from "./chunk-5ETULJLP.js";
|
|
176
|
+
import {
|
|
177
|
+
DEFAULT_IMAGE_TOKEN_ESTIMATE,
|
|
178
|
+
estimatePartChars
|
|
179
|
+
} from "./chunk-GC3J5W2O.js";
|
|
173
180
|
import {
|
|
174
181
|
getFolderStructure,
|
|
175
182
|
getStartupContextLength,
|
|
@@ -1685,7 +1692,7 @@ var McpTransportPool = class {
|
|
|
1685
1692
|
spawnWait.then(() => {
|
|
1686
1693
|
if (inflightTimer) clearTimeout(inflightTimer);
|
|
1687
1694
|
}),
|
|
1688
|
-
new Promise((
|
|
1695
|
+
new Promise((resolve9) => {
|
|
1689
1696
|
inflightTimer = setTimeout(
|
|
1690
1697
|
() => {
|
|
1691
1698
|
const stuckIds = [...this.spawnInFlight.keys()];
|
|
@@ -1694,7 +1701,7 @@ var McpTransportPool = class {
|
|
|
1694
1701
|
", "
|
|
1695
1702
|
)}. Proceeding with drain.`
|
|
1696
1703
|
);
|
|
1697
|
-
|
|
1704
|
+
resolve9();
|
|
1698
1705
|
},
|
|
1699
1706
|
Math.max(0, deadline - Date.now())
|
|
1700
1707
|
);
|
|
@@ -1720,8 +1727,8 @@ var McpTransportPool = class {
|
|
|
1720
1727
|
Promise.all(shutdownPromises).then(() => {
|
|
1721
1728
|
if (drainTimer) clearTimeout(drainTimer);
|
|
1722
1729
|
}),
|
|
1723
|
-
new Promise((
|
|
1724
|
-
drainTimer = setTimeout(() =>
|
|
1730
|
+
new Promise((resolve9) => {
|
|
1731
|
+
drainTimer = setTimeout(() => resolve9(), remaining);
|
|
1725
1732
|
drainTimer.unref?.();
|
|
1726
1733
|
})
|
|
1727
1734
|
]);
|
|
@@ -3089,11 +3096,11 @@ async function bindAt(requestedPath, options, automaticPath) {
|
|
|
3089
3096
|
server.on("error", (error) => {
|
|
3090
3097
|
debugLogger6.error(`peer inbox server error: ${describe(error)}`);
|
|
3091
3098
|
});
|
|
3092
|
-
const listenAt = /* @__PURE__ */ __name((target) => new Promise((
|
|
3099
|
+
const listenAt = /* @__PURE__ */ __name((target) => new Promise((resolve9, reject) => {
|
|
3093
3100
|
server.once("error", reject);
|
|
3094
3101
|
server.listen(target, () => {
|
|
3095
3102
|
server.removeListener("error", reject);
|
|
3096
|
-
|
|
3103
|
+
resolve9();
|
|
3097
3104
|
});
|
|
3098
3105
|
}), "listenAt");
|
|
3099
3106
|
try {
|
|
@@ -3153,7 +3160,7 @@ async function bindAt(requestedPath, options, automaticPath) {
|
|
|
3153
3160
|
closed = true;
|
|
3154
3161
|
for (const socket of connections) socket.destroy();
|
|
3155
3162
|
connections.clear();
|
|
3156
|
-
await new Promise((
|
|
3163
|
+
await new Promise((resolve9) => server.close(() => resolve9()));
|
|
3157
3164
|
try {
|
|
3158
3165
|
await fs.unlink(socketPath);
|
|
3159
3166
|
} catch {
|
|
@@ -4761,9 +4768,9 @@ function encodeInsightProgressMessage(stage, progress, detail) {
|
|
|
4761
4768
|
return JSON.stringify(payload);
|
|
4762
4769
|
}
|
|
4763
4770
|
__name(encodeInsightProgressMessage, "encodeInsightProgressMessage");
|
|
4764
|
-
function encodeInsightReadyMessage(
|
|
4771
|
+
function encodeInsightReadyMessage(path22) {
|
|
4765
4772
|
const payload = {
|
|
4766
|
-
insight_ready: { path:
|
|
4773
|
+
insight_ready: { path: path22 }
|
|
4767
4774
|
};
|
|
4768
4775
|
return JSON.stringify(payload);
|
|
4769
4776
|
}
|
|
@@ -5295,9 +5302,9 @@ var Logger = class {
|
|
|
5295
5302
|
);
|
|
5296
5303
|
return;
|
|
5297
5304
|
}
|
|
5298
|
-
const
|
|
5305
|
+
const path22 = this._checkpointPath(tag);
|
|
5299
5306
|
try {
|
|
5300
|
-
await atomicWriteFile(
|
|
5307
|
+
await atomicWriteFile(path22, JSON.stringify(conversation, null, 2), {
|
|
5301
5308
|
encoding: "utf-8"
|
|
5302
5309
|
});
|
|
5303
5310
|
} catch (error) {
|
|
@@ -5311,13 +5318,13 @@ var Logger = class {
|
|
|
5311
5318
|
);
|
|
5312
5319
|
return [];
|
|
5313
5320
|
}
|
|
5314
|
-
const
|
|
5321
|
+
const path22 = await this._getCheckpointPath(tag);
|
|
5315
5322
|
try {
|
|
5316
|
-
const fileContent = await fs3.readFile(
|
|
5323
|
+
const fileContent = await fs3.readFile(path22, "utf-8");
|
|
5317
5324
|
const parsedContent = JSON.parse(fileContent);
|
|
5318
5325
|
if (!Array.isArray(parsedContent)) {
|
|
5319
5326
|
this.debugLogger.warn(
|
|
5320
|
-
`Checkpoint file at ${
|
|
5327
|
+
`Checkpoint file at ${path22} is not a valid JSON array. Returning empty checkpoint.`
|
|
5321
5328
|
);
|
|
5322
5329
|
return [];
|
|
5323
5330
|
}
|
|
@@ -5328,7 +5335,7 @@ var Logger = class {
|
|
|
5328
5335
|
return [];
|
|
5329
5336
|
}
|
|
5330
5337
|
this.debugLogger.error(
|
|
5331
|
-
`Failed to read or parse checkpoint file ${
|
|
5338
|
+
`Failed to read or parse checkpoint file ${path22}:`,
|
|
5332
5339
|
error
|
|
5333
5340
|
);
|
|
5334
5341
|
return [];
|
|
@@ -5802,7 +5809,7 @@ var ClientMcpRegistrar = class {
|
|
|
5802
5809
|
}
|
|
5803
5810
|
return Promise.resolve(ack);
|
|
5804
5811
|
}
|
|
5805
|
-
return new Promise((
|
|
5812
|
+
return new Promise((resolve9, reject) => {
|
|
5806
5813
|
const timer = setTimeout(() => {
|
|
5807
5814
|
this.pending.delete(id);
|
|
5808
5815
|
reject(
|
|
@@ -5812,7 +5819,7 @@ var ClientMcpRegistrar = class {
|
|
|
5812
5819
|
);
|
|
5813
5820
|
}, this.messageTimeoutMs);
|
|
5814
5821
|
timer.unref?.();
|
|
5815
|
-
this.pending.set(id, { resolve:
|
|
5822
|
+
this.pending.set(id, { resolve: resolve9, reject, timer, server: serverName });
|
|
5816
5823
|
let sendResult;
|
|
5817
5824
|
try {
|
|
5818
5825
|
sendResult = this.sendFrame({
|
|
@@ -6536,8 +6543,8 @@ var DropReceiptCoalescer = class {
|
|
|
6536
6543
|
if (batch.pending > 0) waiting.push(batch);
|
|
6537
6544
|
}
|
|
6538
6545
|
let overdue = false;
|
|
6539
|
-
const deadline = new Promise((
|
|
6540
|
-
const timer = setTimeout(
|
|
6546
|
+
const deadline = new Promise((resolve9) => {
|
|
6547
|
+
const timer = setTimeout(resolve9, boundMs);
|
|
6541
6548
|
timer.unref?.();
|
|
6542
6549
|
});
|
|
6543
6550
|
void deadline.then(() => {
|
|
@@ -7609,8 +7616,8 @@ async function serializeMutation(directory, task) {
|
|
|
7609
7616
|
const previous = pendingMutations.get(directory) ?? Promise.resolve();
|
|
7610
7617
|
let resolveCurrent = /* @__PURE__ */ __name(() => {
|
|
7611
7618
|
}, "resolveCurrent");
|
|
7612
|
-
const current = new Promise((
|
|
7613
|
-
resolveCurrent =
|
|
7619
|
+
const current = new Promise((resolve9) => {
|
|
7620
|
+
resolveCurrent = resolve9;
|
|
7614
7621
|
});
|
|
7615
7622
|
const queued = previous.then(
|
|
7616
7623
|
() => current,
|
|
@@ -8998,12 +9005,12 @@ var JsonRpcConnection = class {
|
|
|
8998
9005
|
method,
|
|
8999
9006
|
params
|
|
9000
9007
|
};
|
|
9001
|
-
const requestPromise = new Promise((
|
|
9008
|
+
const requestPromise = new Promise((resolve9, reject) => {
|
|
9002
9009
|
const timer = setTimeout(() => {
|
|
9003
9010
|
this.pendingRequests.delete(id);
|
|
9004
9011
|
reject(new Error(`LSP request timeout: ${method}`));
|
|
9005
9012
|
}, DEFAULT_LSP_REQUEST_TIMEOUT_MS);
|
|
9006
|
-
this.pendingRequests.set(id, { resolve:
|
|
9013
|
+
this.pendingRequests.set(id, { resolve: resolve9, reject, timer });
|
|
9007
9014
|
});
|
|
9008
9015
|
this.writeMessage(payload);
|
|
9009
9016
|
return requestPromise;
|
|
@@ -9131,7 +9138,7 @@ var LspConnectionFactory = class _LspConnectionFactory {
|
|
|
9131
9138
|
* 创建基于 stdio 的 LSP 连接
|
|
9132
9139
|
*/
|
|
9133
9140
|
static async createStdioConnection(command, args, options, timeoutMs = 1e4) {
|
|
9134
|
-
return new Promise((
|
|
9141
|
+
return new Promise((resolve9, reject) => {
|
|
9135
9142
|
const spawnOptions = {
|
|
9136
9143
|
stdio: "pipe",
|
|
9137
9144
|
...options
|
|
@@ -9190,7 +9197,7 @@ var LspConnectionFactory = class _LspConnectionFactory {
|
|
|
9190
9197
|
recordProcessExit(code, signal);
|
|
9191
9198
|
connection.end();
|
|
9192
9199
|
});
|
|
9193
|
-
|
|
9200
|
+
resolve9({
|
|
9194
9201
|
connection,
|
|
9195
9202
|
process: processInstance,
|
|
9196
9203
|
processDiagnostics
|
|
@@ -9211,7 +9218,7 @@ var LspConnectionFactory = class _LspConnectionFactory {
|
|
|
9211
9218
|
* 创建基于 socket 的 LSP 连接(支持 TCP 或 unix socket)
|
|
9212
9219
|
*/
|
|
9213
9220
|
static async createSocketConnection(options, timeoutMs = 1e4) {
|
|
9214
|
-
return new Promise((
|
|
9221
|
+
return new Promise((resolve9, reject) => {
|
|
9215
9222
|
let socketOptions;
|
|
9216
9223
|
if (options.path) {
|
|
9217
9224
|
socketOptions = { path: options.path };
|
|
@@ -9245,7 +9252,7 @@ var LspConnectionFactory = class _LspConnectionFactory {
|
|
|
9245
9252
|
connection.listen(socket);
|
|
9246
9253
|
socket.once("close", () => connection.end());
|
|
9247
9254
|
socket.once("error", () => connection.end());
|
|
9248
|
-
|
|
9255
|
+
resolve9({
|
|
9249
9256
|
connection,
|
|
9250
9257
|
socket
|
|
9251
9258
|
});
|
|
@@ -10176,7 +10183,7 @@ var LspServerManager = class {
|
|
|
10176
10183
|
return;
|
|
10177
10184
|
}
|
|
10178
10185
|
await new Promise(
|
|
10179
|
-
(
|
|
10186
|
+
(resolve9) => setTimeout(resolve9, DEFAULT_LSP_WARMUP_DELAY_MS)
|
|
10180
10187
|
);
|
|
10181
10188
|
if (handle.connection === connection) handle.warmedUp = true;
|
|
10182
10189
|
} catch (error) {
|
|
@@ -10395,8 +10402,8 @@ var LspServerManager = class {
|
|
|
10395
10402
|
try {
|
|
10396
10403
|
await Promise.race([
|
|
10397
10404
|
shutdownPromise,
|
|
10398
|
-
new Promise((
|
|
10399
|
-
timerId = setTimeout(
|
|
10405
|
+
new Promise((resolve9) => {
|
|
10406
|
+
timerId = setTimeout(resolve9, timeout);
|
|
10400
10407
|
if (typeof timerId === "object" && timerId !== null && "unref" in timerId) {
|
|
10401
10408
|
timerId.unref();
|
|
10402
10409
|
}
|
|
@@ -10599,11 +10606,11 @@ var LspServerManager = class {
|
|
|
10599
10606
|
}
|
|
10600
10607
|
async delayWithAbort(delayMs, signal) {
|
|
10601
10608
|
if (!signal) {
|
|
10602
|
-
await new Promise((
|
|
10609
|
+
await new Promise((resolve9) => setTimeout(resolve9, delayMs));
|
|
10603
10610
|
return;
|
|
10604
10611
|
}
|
|
10605
10612
|
this.throwIfStartupAborted(signal);
|
|
10606
|
-
await new Promise((
|
|
10613
|
+
await new Promise((resolve9, reject) => {
|
|
10607
10614
|
const onAbort = /* @__PURE__ */ __name(() => {
|
|
10608
10615
|
clearTimeout(timerId);
|
|
10609
10616
|
signal.removeEventListener("abort", onAbort);
|
|
@@ -10611,7 +10618,7 @@ var LspServerManager = class {
|
|
|
10611
10618
|
}, "onAbort");
|
|
10612
10619
|
const timerId = setTimeout(() => {
|
|
10613
10620
|
signal.removeEventListener("abort", onAbort);
|
|
10614
|
-
|
|
10621
|
+
resolve9();
|
|
10615
10622
|
}, delayMs);
|
|
10616
10623
|
signal.addEventListener("abort", onAbort, { once: true });
|
|
10617
10624
|
});
|
|
@@ -10780,7 +10787,7 @@ var LspServerManager = class {
|
|
|
10780
10787
|
*/
|
|
10781
10788
|
async waitForSocketProcessSpawn(process3, signal) {
|
|
10782
10789
|
this.throwIfStartupAborted(signal);
|
|
10783
|
-
await new Promise((
|
|
10790
|
+
await new Promise((resolve9, reject) => {
|
|
10784
10791
|
let settled = false;
|
|
10785
10792
|
const cleanup = /* @__PURE__ */ __name(() => {
|
|
10786
10793
|
process3.off("spawn", onSpawn);
|
|
@@ -10795,7 +10802,7 @@ var LspServerManager = class {
|
|
|
10795
10802
|
cleanup();
|
|
10796
10803
|
complete();
|
|
10797
10804
|
}, "settle");
|
|
10798
|
-
const onSpawn = /* @__PURE__ */ __name(() => settle(
|
|
10805
|
+
const onSpawn = /* @__PURE__ */ __name(() => settle(resolve9), "onSpawn");
|
|
10799
10806
|
const onError = /* @__PURE__ */ __name((error) => settle(
|
|
10800
10807
|
() => reject(new Error(`Failed to spawn LSP server: ${error.message}`))
|
|
10801
10808
|
), "onError");
|
|
@@ -10912,7 +10919,7 @@ var LspServerManager = class {
|
|
|
10912
10919
|
* @returns true if the command can be spawned, false if not found
|
|
10913
10920
|
*/
|
|
10914
10921
|
async commandExists(command, env2, cwd) {
|
|
10915
|
-
return new Promise((
|
|
10922
|
+
return new Promise((resolve9) => {
|
|
10916
10923
|
let settled = false;
|
|
10917
10924
|
const settle = /* @__PURE__ */ __name((value) => {
|
|
10918
10925
|
if (settled) {
|
|
@@ -10920,7 +10927,7 @@ var LspServerManager = class {
|
|
|
10920
10927
|
}
|
|
10921
10928
|
settled = true;
|
|
10922
10929
|
clearTimeout(timerId);
|
|
10923
|
-
|
|
10930
|
+
resolve9(value);
|
|
10924
10931
|
}, "settle");
|
|
10925
10932
|
const child = spawn2(command, ["--version"], {
|
|
10926
10933
|
stdio: ["ignore", "ignore", "ignore"],
|
|
@@ -11918,11 +11925,11 @@ var NativeLspService = class {
|
|
|
11918
11925
|
}
|
|
11919
11926
|
async delay(ms, signal) {
|
|
11920
11927
|
if (!signal) {
|
|
11921
|
-
await new Promise((
|
|
11928
|
+
await new Promise((resolve9) => setTimeout(resolve9, ms));
|
|
11922
11929
|
return;
|
|
11923
11930
|
}
|
|
11924
11931
|
this.throwIfReinitializeAborted(signal);
|
|
11925
|
-
await new Promise((
|
|
11932
|
+
await new Promise((resolve9, reject) => {
|
|
11926
11933
|
const onAbort = /* @__PURE__ */ __name(() => {
|
|
11927
11934
|
clearTimeout(timer);
|
|
11928
11935
|
signal.removeEventListener("abort", onAbort);
|
|
@@ -11930,7 +11937,7 @@ var NativeLspService = class {
|
|
|
11930
11937
|
}, "onAbort");
|
|
11931
11938
|
const timer = setTimeout(() => {
|
|
11932
11939
|
signal.removeEventListener("abort", onAbort);
|
|
11933
|
-
|
|
11940
|
+
resolve9();
|
|
11934
11941
|
}, ms);
|
|
11935
11942
|
signal.addEventListener("abort", onAbort, { once: true });
|
|
11936
11943
|
});
|
|
@@ -14122,30 +14129,30 @@ import { createRequire } from "module";
|
|
|
14122
14129
|
import { basename as basename5, dirname as dirname7, normalize, relative as relative2, resolve as resolve6, sep as sep5 } from "path";
|
|
14123
14130
|
import * as nativeFs from "fs";
|
|
14124
14131
|
var __require2 = /* @__PURE__ */ createRequire(import.meta.url);
|
|
14125
|
-
function cleanPath(
|
|
14126
|
-
let normalized2 = normalize(
|
|
14132
|
+
function cleanPath(path22) {
|
|
14133
|
+
let normalized2 = normalize(path22);
|
|
14127
14134
|
if (normalized2.length > 1 && normalized2[normalized2.length - 1] === sep5) normalized2 = normalized2.substring(0, normalized2.length - 1);
|
|
14128
14135
|
return normalized2;
|
|
14129
14136
|
}
|
|
14130
14137
|
__name(cleanPath, "cleanPath");
|
|
14131
14138
|
var SLASHES_REGEX = /[\\/]/g;
|
|
14132
|
-
function convertSlashes(
|
|
14133
|
-
return
|
|
14139
|
+
function convertSlashes(path22, separator) {
|
|
14140
|
+
return path22.replace(SLASHES_REGEX, separator);
|
|
14134
14141
|
}
|
|
14135
14142
|
__name(convertSlashes, "convertSlashes");
|
|
14136
14143
|
var WINDOWS_ROOT_DIR_REGEX = /^[a-z]:[\\/]$/i;
|
|
14137
|
-
function isRootDirectory(
|
|
14138
|
-
return
|
|
14144
|
+
function isRootDirectory(path22) {
|
|
14145
|
+
return path22 === "/" || WINDOWS_ROOT_DIR_REGEX.test(path22);
|
|
14139
14146
|
}
|
|
14140
14147
|
__name(isRootDirectory, "isRootDirectory");
|
|
14141
|
-
function normalizePath(
|
|
14148
|
+
function normalizePath(path22, options) {
|
|
14142
14149
|
const { resolvePaths, normalizePath: normalizePath$1, pathSeparator } = options;
|
|
14143
|
-
const pathNeedsCleaning = process.platform === "win32" &&
|
|
14144
|
-
if (resolvePaths)
|
|
14145
|
-
if (normalizePath$1 || pathNeedsCleaning)
|
|
14146
|
-
if (
|
|
14147
|
-
const needsSeperator =
|
|
14148
|
-
return convertSlashes(needsSeperator ?
|
|
14150
|
+
const pathNeedsCleaning = process.platform === "win32" && path22.includes("/") || path22.startsWith(".");
|
|
14151
|
+
if (resolvePaths) path22 = resolve6(path22);
|
|
14152
|
+
if (normalizePath$1 || pathNeedsCleaning) path22 = cleanPath(path22);
|
|
14153
|
+
if (path22 === ".") return "";
|
|
14154
|
+
const needsSeperator = path22[path22.length - 1] !== pathSeparator;
|
|
14155
|
+
return convertSlashes(needsSeperator ? path22 + pathSeparator : path22, pathSeparator);
|
|
14149
14156
|
}
|
|
14150
14157
|
__name(normalizePath, "normalizePath");
|
|
14151
14158
|
function joinPathWithBasePath(filename, directoryPath) {
|
|
@@ -14190,8 +14197,8 @@ var pushDirectory = /* @__PURE__ */ __name((directoryPath, paths) => {
|
|
|
14190
14197
|
paths.push(directoryPath || ".");
|
|
14191
14198
|
}, "pushDirectory");
|
|
14192
14199
|
var pushDirectoryFilter = /* @__PURE__ */ __name((directoryPath, paths, filters) => {
|
|
14193
|
-
const
|
|
14194
|
-
if (filters.every((filter2) => filter2(
|
|
14200
|
+
const path22 = directoryPath || ".";
|
|
14201
|
+
if (filters.every((filter2) => filter2(path22, true))) paths.push(path22);
|
|
14195
14202
|
}, "pushDirectoryFilter");
|
|
14196
14203
|
var empty$2 = /* @__PURE__ */ __name(() => {
|
|
14197
14204
|
}, "empty$2");
|
|
@@ -14247,26 +14254,26 @@ function build$3(options) {
|
|
|
14247
14254
|
return options.group ? groupFiles : empty;
|
|
14248
14255
|
}
|
|
14249
14256
|
__name(build$3, "build$3");
|
|
14250
|
-
var resolveSymlinksAsync = /* @__PURE__ */ __name(function(
|
|
14251
|
-
const { queue, fs:
|
|
14257
|
+
var resolveSymlinksAsync = /* @__PURE__ */ __name(function(path22, state, callback$1) {
|
|
14258
|
+
const { queue, fs: fs18, options: { suppressErrors } } = state;
|
|
14252
14259
|
queue.enqueue();
|
|
14253
|
-
|
|
14260
|
+
fs18.realpath(path22, (error, resolvedPath) => {
|
|
14254
14261
|
if (error) return queue.dequeue(suppressErrors ? null : error, state);
|
|
14255
|
-
|
|
14262
|
+
fs18.stat(resolvedPath, (error$1, stat5) => {
|
|
14256
14263
|
if (error$1) return queue.dequeue(suppressErrors ? null : error$1, state);
|
|
14257
|
-
if (stat5.isDirectory() && isRecursive(
|
|
14264
|
+
if (stat5.isDirectory() && isRecursive(path22, resolvedPath, state)) return queue.dequeue(null, state);
|
|
14258
14265
|
callback$1(stat5, resolvedPath);
|
|
14259
14266
|
queue.dequeue(null, state);
|
|
14260
14267
|
});
|
|
14261
14268
|
});
|
|
14262
14269
|
}, "resolveSymlinksAsync");
|
|
14263
|
-
var resolveSymlinks = /* @__PURE__ */ __name(function(
|
|
14264
|
-
const { queue, fs:
|
|
14270
|
+
var resolveSymlinks = /* @__PURE__ */ __name(function(path22, state, callback$1) {
|
|
14271
|
+
const { queue, fs: fs18, options: { suppressErrors } } = state;
|
|
14265
14272
|
queue.enqueue();
|
|
14266
14273
|
try {
|
|
14267
|
-
const resolvedPath =
|
|
14268
|
-
const stat5 =
|
|
14269
|
-
if (stat5.isDirectory() && isRecursive(
|
|
14274
|
+
const resolvedPath = fs18.realpathSync(path22);
|
|
14275
|
+
const stat5 = fs18.statSync(resolvedPath);
|
|
14276
|
+
if (stat5.isDirectory() && isRecursive(path22, resolvedPath, state)) return;
|
|
14270
14277
|
callback$1(stat5, resolvedPath);
|
|
14271
14278
|
} catch (e) {
|
|
14272
14279
|
if (!suppressErrors) throw e;
|
|
@@ -14277,9 +14284,9 @@ function build$2(options, isSynchronous) {
|
|
|
14277
14284
|
return isSynchronous ? resolveSymlinks : resolveSymlinksAsync;
|
|
14278
14285
|
}
|
|
14279
14286
|
__name(build$2, "build$2");
|
|
14280
|
-
function isRecursive(
|
|
14287
|
+
function isRecursive(path22, resolved, state) {
|
|
14281
14288
|
if (state.options.useRealPaths) return isRecursiveUsingRealPaths(resolved, state);
|
|
14282
|
-
let parent = dirname7(
|
|
14289
|
+
let parent = dirname7(path22);
|
|
14283
14290
|
let depth = 1;
|
|
14284
14291
|
while (parent !== state.root && depth < 2) {
|
|
14285
14292
|
const resolvedPath = state.symlinks.get(parent);
|
|
@@ -14287,7 +14294,7 @@ function isRecursive(path21, resolved, state) {
|
|
|
14287
14294
|
if (isSameRoot) depth++;
|
|
14288
14295
|
else parent = dirname7(parent);
|
|
14289
14296
|
}
|
|
14290
|
-
state.symlinks.set(
|
|
14297
|
+
state.symlinks.set(path22, resolved);
|
|
14291
14298
|
return depth > 1;
|
|
14292
14299
|
}
|
|
14293
14300
|
__name(isRecursive, "isRecursive");
|
|
@@ -14340,22 +14347,22 @@ var readdirOpts = { withFileTypes: true };
|
|
|
14340
14347
|
var walkAsync = /* @__PURE__ */ __name((state, crawlPath, directoryPath, currentDepth, callback$1) => {
|
|
14341
14348
|
state.queue.enqueue();
|
|
14342
14349
|
if (currentDepth < 0) return state.queue.dequeue(null, state);
|
|
14343
|
-
const { fs:
|
|
14350
|
+
const { fs: fs18 } = state;
|
|
14344
14351
|
state.visited.push(crawlPath);
|
|
14345
14352
|
state.counts.directories++;
|
|
14346
|
-
|
|
14353
|
+
fs18.readdir(crawlPath || ".", readdirOpts, (error, entries = []) => {
|
|
14347
14354
|
callback$1(entries, directoryPath, currentDepth);
|
|
14348
14355
|
state.queue.dequeue(state.options.suppressErrors ? null : error, state);
|
|
14349
14356
|
});
|
|
14350
14357
|
}, "walkAsync");
|
|
14351
14358
|
var walkSync = /* @__PURE__ */ __name((state, crawlPath, directoryPath, currentDepth, callback$1) => {
|
|
14352
|
-
const { fs:
|
|
14359
|
+
const { fs: fs18 } = state;
|
|
14353
14360
|
if (currentDepth < 0) return;
|
|
14354
14361
|
state.visited.push(crawlPath);
|
|
14355
14362
|
state.counts.directories++;
|
|
14356
14363
|
let entries = [];
|
|
14357
14364
|
try {
|
|
14358
|
-
entries =
|
|
14365
|
+
entries = fs18.readdirSync(crawlPath || ".", readdirOpts);
|
|
14359
14366
|
} catch (e) {
|
|
14360
14367
|
if (!state.options.suppressErrors) throw e;
|
|
14361
14368
|
}
|
|
@@ -14476,19 +14483,19 @@ var Walker = class {
|
|
|
14476
14483
|
const filename = this.joinPath(entry.name, directoryPath);
|
|
14477
14484
|
this.pushFile(filename, files, this.state.counts, filters);
|
|
14478
14485
|
} else if (entry.isDirectory()) {
|
|
14479
|
-
let
|
|
14480
|
-
if (exclude && exclude(entry.name,
|
|
14481
|
-
this.pushDirectory(
|
|
14482
|
-
this.walkDirectory(this.state,
|
|
14486
|
+
let path22 = joinDirectoryPath(entry.name, directoryPath, this.state.options.pathSeparator);
|
|
14487
|
+
if (exclude && exclude(entry.name, path22)) continue;
|
|
14488
|
+
this.pushDirectory(path22, paths, filters);
|
|
14489
|
+
this.walkDirectory(this.state, path22, path22, depth - 1, this.walk);
|
|
14483
14490
|
} else if (this.resolveSymlink && entry.isSymbolicLink()) {
|
|
14484
|
-
let
|
|
14485
|
-
this.resolveSymlink(
|
|
14491
|
+
let path22 = joinPathWithBasePath(entry.name, directoryPath);
|
|
14492
|
+
this.resolveSymlink(path22, this.state, (stat5, resolvedPath) => {
|
|
14486
14493
|
if (stat5.isDirectory()) {
|
|
14487
14494
|
resolvedPath = normalizePath(resolvedPath, this.state.options);
|
|
14488
|
-
if (exclude && exclude(entry.name, useRealPaths ? resolvedPath :
|
|
14489
|
-
this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath :
|
|
14495
|
+
if (exclude && exclude(entry.name, useRealPaths ? resolvedPath : path22 + pathSeparator)) return;
|
|
14496
|
+
this.walkDirectory(this.state, resolvedPath, useRealPaths ? resolvedPath : path22 + pathSeparator, depth - 1, this.walk);
|
|
14490
14497
|
} else {
|
|
14491
|
-
resolvedPath = useRealPaths ? resolvedPath :
|
|
14498
|
+
resolvedPath = useRealPaths ? resolvedPath : path22;
|
|
14492
14499
|
const filename = basename5(resolvedPath);
|
|
14493
14500
|
const directoryPath$1 = normalizePath(dirname7(resolvedPath), this.state.options);
|
|
14494
14501
|
resolvedPath = this.joinPath(filename, directoryPath$1);
|
|
@@ -14663,7 +14670,7 @@ var Builder = class {
|
|
|
14663
14670
|
isMatch = globFn(patterns, ...options);
|
|
14664
14671
|
this.globCache[patterns.join("\0")] = isMatch;
|
|
14665
14672
|
}
|
|
14666
|
-
this.options.filters.push((
|
|
14673
|
+
this.options.filters.push((path22) => isMatch(path22));
|
|
14667
14674
|
return this;
|
|
14668
14675
|
}
|
|
14669
14676
|
};
|
|
@@ -15032,7 +15039,7 @@ function computeLinesFingerprint(lines) {
|
|
|
15032
15039
|
__name(computeLinesFingerprint, "computeLinesFingerprint");
|
|
15033
15040
|
function runCommand(command, args, cwd, timeoutMs = 2e4, options) {
|
|
15034
15041
|
const collectLines = options?.collectLines !== false;
|
|
15035
|
-
return new Promise((
|
|
15042
|
+
return new Promise((resolve9) => {
|
|
15036
15043
|
const lines = [];
|
|
15037
15044
|
let settled = false;
|
|
15038
15045
|
let timedOut = false;
|
|
@@ -15044,7 +15051,7 @@ function runCommand(command, args, cwd, timeoutMs = 2e4, options) {
|
|
|
15044
15051
|
return;
|
|
15045
15052
|
}
|
|
15046
15053
|
settled = true;
|
|
15047
|
-
|
|
15054
|
+
resolve9({ success, lines: resultLines });
|
|
15048
15055
|
}, "finalize");
|
|
15049
15056
|
let stderrBuf = "";
|
|
15050
15057
|
let child;
|
|
@@ -15334,7 +15341,7 @@ __name(isUnderIgnoredDirectory, "isUnderIgnoredDirectory");
|
|
|
15334
15341
|
var YIELD_INTERVAL = 1e3;
|
|
15335
15342
|
async function maybeYield(index) {
|
|
15336
15343
|
if (index > 0 && index % YIELD_INTERVAL === 0) {
|
|
15337
|
-
await new Promise((
|
|
15344
|
+
await new Promise((resolve9) => setImmediate(resolve9));
|
|
15338
15345
|
}
|
|
15339
15346
|
}
|
|
15340
15347
|
__name(maybeYield, "maybeYield");
|
|
@@ -16768,7 +16775,7 @@ function basicMatch(query) {
|
|
|
16768
16775
|
__name(basicMatch, "basicMatch");
|
|
16769
16776
|
var isNode = typeof __require !== "undefined" && typeof window === "undefined";
|
|
16770
16777
|
function asyncMatcher(token, len, iter2, onFinish) {
|
|
16771
|
-
return new Promise((
|
|
16778
|
+
return new Promise((resolve9, reject) => {
|
|
16772
16779
|
const INCREMENT = 1e3;
|
|
16773
16780
|
let i = 0, end = Math.min(INCREMENT, len);
|
|
16774
16781
|
const step = /* @__PURE__ */ __name(() => {
|
|
@@ -16781,7 +16788,7 @@ function asyncMatcher(token, len, iter2, onFinish) {
|
|
|
16781
16788
|
end = Math.min(end + INCREMENT, len);
|
|
16782
16789
|
isNode ? setImmediate(step) : setTimeout(step);
|
|
16783
16790
|
} else {
|
|
16784
|
-
|
|
16791
|
+
resolve9(onFinish());
|
|
16785
16792
|
}
|
|
16786
16793
|
}, "step");
|
|
16787
16794
|
step();
|
|
@@ -17053,12 +17060,12 @@ var workerTransport = {
|
|
|
17053
17060
|
}
|
|
17054
17061
|
await readyPromise;
|
|
17055
17062
|
const reqId = nextReqId++;
|
|
17056
|
-
return new Promise((
|
|
17063
|
+
return new Promise((resolve9, reject) => {
|
|
17057
17064
|
if (readyState === "disposed" || readyState === "failed") {
|
|
17058
17065
|
reject(new Error(`fzf worker not available (${readyState})`));
|
|
17059
17066
|
return;
|
|
17060
17067
|
}
|
|
17061
|
-
pending.set(reqId, { resolve:
|
|
17068
|
+
pending.set(reqId, { resolve: resolve9, reject });
|
|
17062
17069
|
try {
|
|
17063
17070
|
worker.postMessage({ type: "find", reqId, pattern, limit });
|
|
17064
17071
|
} catch (err) {
|
|
@@ -17153,7 +17160,7 @@ async function filter(allPaths, pattern, signal) {
|
|
|
17153
17160
|
const results = [];
|
|
17154
17161
|
for (const [i, p] of allPaths.entries()) {
|
|
17155
17162
|
if (i % 1e3 === 0) {
|
|
17156
|
-
await new Promise((
|
|
17163
|
+
await new Promise((resolve9) => setImmediate(resolve9));
|
|
17157
17164
|
if (signal?.aborted) {
|
|
17158
17165
|
throw new AbortError();
|
|
17159
17166
|
}
|
|
@@ -17232,7 +17239,7 @@ var RecursiveFileSearch = class {
|
|
|
17232
17239
|
const results = [];
|
|
17233
17240
|
for (const [i, candidate] of filteredCandidates.entries()) {
|
|
17234
17241
|
if (i % 1e3 === 0) {
|
|
17235
|
-
await new Promise((
|
|
17242
|
+
await new Promise((resolve9) => setImmediate(resolve9));
|
|
17236
17243
|
if (options.signal?.aborted) {
|
|
17237
17244
|
throw new AbortError();
|
|
17238
17245
|
}
|
|
@@ -17318,6 +17325,380 @@ var FileSearchFactory = class {
|
|
|
17318
17325
|
}
|
|
17319
17326
|
};
|
|
17320
17327
|
|
|
17328
|
+
// packages/core/src/utils/git-worktrees.ts
|
|
17329
|
+
init_esbuild_shims();
|
|
17330
|
+
import * as fs14 from "node:fs";
|
|
17331
|
+
import * as fsPromises from "node:fs/promises";
|
|
17332
|
+
import * as path18 from "node:path";
|
|
17333
|
+
function weightier(a, b) {
|
|
17334
|
+
if (a === "present" || b === "present") return "present";
|
|
17335
|
+
if (a === "unknown" || b === "unknown") return "unknown";
|
|
17336
|
+
return "absent";
|
|
17337
|
+
}
|
|
17338
|
+
__name(weightier, "weightier");
|
|
17339
|
+
var NO_FOLLOW = fs14.constants.O_NOFOLLOW;
|
|
17340
|
+
var POINTER_OPEN_FLAGS = fs14.constants.O_RDONLY | (NO_FOLLOW ?? 0) | (fs14.constants.O_NONBLOCK ?? 0);
|
|
17341
|
+
function openPointer(file) {
|
|
17342
|
+
return NO_FOLLOW === void 0 ? openNoFollow(file) : fsPromises.open(file, POINTER_OPEN_FLAGS);
|
|
17343
|
+
}
|
|
17344
|
+
__name(openPointer, "openPointer");
|
|
17345
|
+
function openPointerSync(file) {
|
|
17346
|
+
return NO_FOLLOW === void 0 ? openSyncNoFollow(file) : fs14.openSync(file, POINTER_OPEN_FLAGS);
|
|
17347
|
+
}
|
|
17348
|
+
__name(openPointerSync, "openPointerSync");
|
|
17349
|
+
var GITDIR_POINTER_MAX_BYTES = 8192;
|
|
17350
|
+
function realpathOrSelf(target) {
|
|
17351
|
+
try {
|
|
17352
|
+
return fs14.realpathSync(target);
|
|
17353
|
+
} catch {
|
|
17354
|
+
return path18.resolve(target);
|
|
17355
|
+
}
|
|
17356
|
+
}
|
|
17357
|
+
__name(realpathOrSelf, "realpathOrSelf");
|
|
17358
|
+
function realpathOnDiskOrSelf(target) {
|
|
17359
|
+
try {
|
|
17360
|
+
return fs14.realpathSync.native(target);
|
|
17361
|
+
} catch {
|
|
17362
|
+
return realpathOrSelf(target);
|
|
17363
|
+
}
|
|
17364
|
+
}
|
|
17365
|
+
__name(realpathOnDiskOrSelf, "realpathOnDiskOrSelf");
|
|
17366
|
+
async function readGitdirPointer(adminEntryDir) {
|
|
17367
|
+
const read2 = await readGitdirPointerAnswer(adminEntryDir);
|
|
17368
|
+
return typeof read2 === "object" ? read2.at : null;
|
|
17369
|
+
}
|
|
17370
|
+
__name(readGitdirPointer, "readGitdirPointer");
|
|
17371
|
+
async function readGitdirPointerAnswer(adminEntryDir) {
|
|
17372
|
+
let handle;
|
|
17373
|
+
try {
|
|
17374
|
+
handle = await openPointer(path18.join(adminEntryDir, "gitdir"));
|
|
17375
|
+
const stat5 = await handle.stat();
|
|
17376
|
+
if (!stat5.isFile() || stat5.size > GITDIR_POINTER_MAX_BYTES) {
|
|
17377
|
+
return "unreadable";
|
|
17378
|
+
}
|
|
17379
|
+
const buffer = Buffer.alloc(stat5.size);
|
|
17380
|
+
const { bytesRead } = await handle.read(buffer, 0, buffer.length, 0);
|
|
17381
|
+
const raw = buffer.toString("utf8", 0, bytesRead).replace(/\s+$/, "");
|
|
17382
|
+
if (!raw) return "missing";
|
|
17383
|
+
return {
|
|
17384
|
+
at: realpathOrSelf(
|
|
17385
|
+
path18.dirname(path18.resolve(realpathOrSelf(adminEntryDir), raw))
|
|
17386
|
+
)
|
|
17387
|
+
};
|
|
17388
|
+
} catch (err) {
|
|
17389
|
+
return saysNothingIsThere(err) ? "missing" : "unreadable";
|
|
17390
|
+
} finally {
|
|
17391
|
+
await handle?.close().catch(() => {
|
|
17392
|
+
});
|
|
17393
|
+
}
|
|
17394
|
+
}
|
|
17395
|
+
__name(readGitdirPointerAnswer, "readGitdirPointerAnswer");
|
|
17396
|
+
function attribute(line, key) {
|
|
17397
|
+
if (line === key) return "";
|
|
17398
|
+
return line.startsWith(`${key} `) ? line.slice(key.length + 1) : void 0;
|
|
17399
|
+
}
|
|
17400
|
+
__name(attribute, "attribute");
|
|
17401
|
+
function parseGitWorktreeList(raw) {
|
|
17402
|
+
const entries = [];
|
|
17403
|
+
let current = null;
|
|
17404
|
+
for (const line of raw.split("\0")) {
|
|
17405
|
+
if (line === "") {
|
|
17406
|
+
if (current) entries.push(current);
|
|
17407
|
+
current = null;
|
|
17408
|
+
continue;
|
|
17409
|
+
}
|
|
17410
|
+
const worktreePath = attribute(line, "worktree");
|
|
17411
|
+
if (worktreePath !== void 0) {
|
|
17412
|
+
current = {
|
|
17413
|
+
path: worktreePath,
|
|
17414
|
+
head: "",
|
|
17415
|
+
branch: null,
|
|
17416
|
+
detached: false,
|
|
17417
|
+
bare: false,
|
|
17418
|
+
isMain: entries.length === 0
|
|
17419
|
+
};
|
|
17420
|
+
continue;
|
|
17421
|
+
}
|
|
17422
|
+
if (!current) continue;
|
|
17423
|
+
const head = attribute(line, "HEAD");
|
|
17424
|
+
const branch = attribute(line, "branch");
|
|
17425
|
+
const locked = attribute(line, "locked");
|
|
17426
|
+
const prunable = attribute(line, "prunable");
|
|
17427
|
+
if (head !== void 0) current.head = head;
|
|
17428
|
+
else if (branch !== void 0)
|
|
17429
|
+
current.branch = branch.replace(/^refs\/heads\//, "");
|
|
17430
|
+
else if (line === "detached") current.detached = true;
|
|
17431
|
+
else if (line === "bare") current.bare = true;
|
|
17432
|
+
else if (locked !== void 0) current.locked = locked;
|
|
17433
|
+
else if (prunable !== void 0) current.prunable = prunable;
|
|
17434
|
+
}
|
|
17435
|
+
if (current) entries.push(current);
|
|
17436
|
+
return entries;
|
|
17437
|
+
}
|
|
17438
|
+
__name(parseGitWorktreeList, "parseGitWorktreeList");
|
|
17439
|
+
async function listGitWorktrees(cwd, env2) {
|
|
17440
|
+
const raw = await runGit(
|
|
17441
|
+
cwd,
|
|
17442
|
+
[...NO_EXEC_CONFIG, "worktree", "list", "--porcelain", "-z"],
|
|
17443
|
+
env2
|
|
17444
|
+
);
|
|
17445
|
+
return parseGitWorktreeList(raw);
|
|
17446
|
+
}
|
|
17447
|
+
__name(listGitWorktrees, "listGitWorktrees");
|
|
17448
|
+
async function removeGitWorktree(cwd, worktreePath, options = {}, env2) {
|
|
17449
|
+
await runGit(
|
|
17450
|
+
cwd,
|
|
17451
|
+
[
|
|
17452
|
+
...NO_EXEC_CONFIG,
|
|
17453
|
+
"worktree",
|
|
17454
|
+
"remove",
|
|
17455
|
+
...options.force ? ["--force", "--force"] : [],
|
|
17456
|
+
"--",
|
|
17457
|
+
worktreePath
|
|
17458
|
+
],
|
|
17459
|
+
env2
|
|
17460
|
+
);
|
|
17461
|
+
}
|
|
17462
|
+
__name(removeGitWorktree, "removeGitWorktree");
|
|
17463
|
+
async function commitIsReachable(cwd, commit, env2) {
|
|
17464
|
+
const out = await runGit(
|
|
17465
|
+
cwd,
|
|
17466
|
+
[
|
|
17467
|
+
...NO_EXEC_CONFIG,
|
|
17468
|
+
"for-each-ref",
|
|
17469
|
+
"--count=1",
|
|
17470
|
+
"--contains",
|
|
17471
|
+
commit,
|
|
17472
|
+
"refs/heads",
|
|
17473
|
+
"refs/remotes",
|
|
17474
|
+
"refs/tags"
|
|
17475
|
+
],
|
|
17476
|
+
env2
|
|
17477
|
+
);
|
|
17478
|
+
return out.trim().length > 0;
|
|
17479
|
+
}
|
|
17480
|
+
__name(commitIsReachable, "commitIsReachable");
|
|
17481
|
+
async function worktreeHoldsSubmodules(worktreePath, env2) {
|
|
17482
|
+
let answer = "absent";
|
|
17483
|
+
await streamGitRecords(
|
|
17484
|
+
worktreePath,
|
|
17485
|
+
[...NO_EXEC_CONFIG, "ls-files", "--stage", "-z"],
|
|
17486
|
+
(record) => {
|
|
17487
|
+
if (!record.subarray(0, GITLINK_MODE.length).equals(GITLINK_MODE)) {
|
|
17488
|
+
return false;
|
|
17489
|
+
}
|
|
17490
|
+
const tab = record.indexOf(9);
|
|
17491
|
+
if (tab === -1) return false;
|
|
17492
|
+
const bytes = record.subarray(tab + 1);
|
|
17493
|
+
const name = bytes.toString("utf8");
|
|
17494
|
+
answer = Buffer.from(name, "utf8").equals(bytes) ? weightier(
|
|
17495
|
+
answer,
|
|
17496
|
+
pathHoldsRepository(path18.resolve(worktreePath, name))
|
|
17497
|
+
) : weightier(answer, "unknown");
|
|
17498
|
+
return answer === "present";
|
|
17499
|
+
},
|
|
17500
|
+
env2
|
|
17501
|
+
);
|
|
17502
|
+
return answer;
|
|
17503
|
+
}
|
|
17504
|
+
__name(worktreeHoldsSubmodules, "worktreeHoldsSubmodules");
|
|
17505
|
+
var GITLINK_MODE = Buffer.from("160000 ");
|
|
17506
|
+
async function dryRunGitWorktreePrune(cwd, env2) {
|
|
17507
|
+
const { stdout, stderr } = await runGitCapture(
|
|
17508
|
+
cwd,
|
|
17509
|
+
[...NO_EXEC_CONFIG, "worktree", "prune", "-n", "-v"],
|
|
17510
|
+
env2
|
|
17511
|
+
);
|
|
17512
|
+
const report2 = `${stdout}
|
|
17513
|
+
${stderr}`;
|
|
17514
|
+
const named = report2.split("\n").map((line) => /^Removing worktrees\/(.+): /.exec(line.trim())?.[1]).filter((id) => id !== void 0);
|
|
17515
|
+
const announcements = report2.split("Removing worktrees/").length - 1;
|
|
17516
|
+
while (named.length < announcements) named.push(null);
|
|
17517
|
+
if (named.length === 0) return [];
|
|
17518
|
+
const commonDir = (await runGit(cwd, [...NO_EXEC_CONFIG, "rev-parse", "--git-common-dir"], env2)).trim();
|
|
17519
|
+
const admin = path18.resolve(cwd, commonDir, "worktrees");
|
|
17520
|
+
const entries = [];
|
|
17521
|
+
for (const id of named) {
|
|
17522
|
+
if (id === null) {
|
|
17523
|
+
entries.push({ id: null, worktreePath: null });
|
|
17524
|
+
continue;
|
|
17525
|
+
}
|
|
17526
|
+
const entryPath = path18.join(admin, id);
|
|
17527
|
+
if (isSymlink(entryPath)) {
|
|
17528
|
+
entries.push({ id, worktreePath: null });
|
|
17529
|
+
continue;
|
|
17530
|
+
}
|
|
17531
|
+
let dir;
|
|
17532
|
+
try {
|
|
17533
|
+
dir = fs14.statSync(entryPath);
|
|
17534
|
+
} catch {
|
|
17535
|
+
entries.push({ id, worktreePath: null });
|
|
17536
|
+
continue;
|
|
17537
|
+
}
|
|
17538
|
+
if (!dir.isDirectory()) continue;
|
|
17539
|
+
try {
|
|
17540
|
+
if (fs14.readdirSync(path18.join(admin, id)).length === 0) continue;
|
|
17541
|
+
} catch {
|
|
17542
|
+
}
|
|
17543
|
+
entries.push({
|
|
17544
|
+
id,
|
|
17545
|
+
worktreePath: await readGitdirPointer(path18.join(admin, id))
|
|
17546
|
+
});
|
|
17547
|
+
}
|
|
17548
|
+
return entries;
|
|
17549
|
+
}
|
|
17550
|
+
__name(dryRunGitWorktreePrune, "dryRunGitWorktreePrune");
|
|
17551
|
+
function saysNothingIsThere(err) {
|
|
17552
|
+
const code = err?.code;
|
|
17553
|
+
return code === "ENOENT" || code === "ENOTDIR";
|
|
17554
|
+
}
|
|
17555
|
+
__name(saysNothingIsThere, "saysNothingIsThere");
|
|
17556
|
+
function isSymlink(target) {
|
|
17557
|
+
try {
|
|
17558
|
+
return fs14.lstatSync(target).isSymbolicLink();
|
|
17559
|
+
} catch {
|
|
17560
|
+
return false;
|
|
17561
|
+
}
|
|
17562
|
+
}
|
|
17563
|
+
__name(isSymlink, "isSymlink");
|
|
17564
|
+
function lookAt(target) {
|
|
17565
|
+
try {
|
|
17566
|
+
return fs14.statSync(target);
|
|
17567
|
+
} catch (err) {
|
|
17568
|
+
return saysNothingIsThere(err) ? "absent" : "unknown";
|
|
17569
|
+
}
|
|
17570
|
+
}
|
|
17571
|
+
__name(lookAt, "lookAt");
|
|
17572
|
+
function adminEntryHoldsModules(adminEntryDir) {
|
|
17573
|
+
const modules = path18.join(adminEntryDir, "modules");
|
|
17574
|
+
const entry = lookAt(modules);
|
|
17575
|
+
if (typeof entry === "string") return entry;
|
|
17576
|
+
if (!entry.isDirectory()) return "absent";
|
|
17577
|
+
try {
|
|
17578
|
+
return fs14.readdirSync(modules).length > 0 ? "present" : "absent";
|
|
17579
|
+
} catch {
|
|
17580
|
+
return "unknown";
|
|
17581
|
+
}
|
|
17582
|
+
}
|
|
17583
|
+
__name(adminEntryHoldsModules, "adminEntryHoldsModules");
|
|
17584
|
+
function pathHoldsRepository(at) {
|
|
17585
|
+
const dot = lookAt(path18.join(at, ".git"));
|
|
17586
|
+
if (typeof dot === "string") return dot;
|
|
17587
|
+
if (dot.isDirectory()) {
|
|
17588
|
+
const head = lookAt(path18.join(at, ".git", "HEAD"));
|
|
17589
|
+
return typeof head === "string" ? head : "present";
|
|
17590
|
+
}
|
|
17591
|
+
return gitfileAnswer(at);
|
|
17592
|
+
}
|
|
17593
|
+
__name(pathHoldsRepository, "pathHoldsRepository");
|
|
17594
|
+
async function worktreeAdminHoldsModules(cwd, worktreePath, env2) {
|
|
17595
|
+
const commonDir = (await runGit(cwd, [...NO_EXEC_CONFIG, "rev-parse", "--git-common-dir"], env2)).trim();
|
|
17596
|
+
const admin = realpathOrSelf(path18.resolve(cwd, commonDir, "worktrees"));
|
|
17597
|
+
const wanted = realpathOrSelf(worktreePath);
|
|
17598
|
+
let ids;
|
|
17599
|
+
try {
|
|
17600
|
+
ids = fs14.readdirSync(admin);
|
|
17601
|
+
} catch (err) {
|
|
17602
|
+
return saysNothingIsThere(err) ? "absent" : "unknown";
|
|
17603
|
+
}
|
|
17604
|
+
let answer = "absent";
|
|
17605
|
+
const found = [];
|
|
17606
|
+
let doubt = false;
|
|
17607
|
+
for (const id of ids) {
|
|
17608
|
+
const back = await readGitdirPointerAnswer(path18.join(admin, id));
|
|
17609
|
+
if (back === "missing") continue;
|
|
17610
|
+
if (back === "unreadable") {
|
|
17611
|
+
if (adminEntryHoldsModules(path18.join(admin, id)) !== "absent") {
|
|
17612
|
+
doubt = true;
|
|
17613
|
+
}
|
|
17614
|
+
continue;
|
|
17615
|
+
}
|
|
17616
|
+
if (back.at !== wanted) continue;
|
|
17617
|
+
found.push(realpathOrSelf(path18.join(admin, id)));
|
|
17618
|
+
answer = weightier(answer, adminEntryHoldsModules(path18.join(admin, id)));
|
|
17619
|
+
if (answer === "present") return answer;
|
|
17620
|
+
}
|
|
17621
|
+
if (!doubt) return answer;
|
|
17622
|
+
const own = gitfileTarget(worktreePath);
|
|
17623
|
+
return own !== null && found.includes(own) ? answer : weightier(answer, "unknown");
|
|
17624
|
+
}
|
|
17625
|
+
__name(worktreeAdminHoldsModules, "worktreeAdminHoldsModules");
|
|
17626
|
+
function gitfileTarget(worktreePath) {
|
|
17627
|
+
let fd;
|
|
17628
|
+
try {
|
|
17629
|
+
fd = openPointerSync(path18.join(worktreePath, ".git"));
|
|
17630
|
+
const stat5 = fs14.fstatSync(fd);
|
|
17631
|
+
if (!stat5.isFile() || stat5.size > GITDIR_POINTER_MAX_BYTES) return null;
|
|
17632
|
+
const buffer = Buffer.alloc(stat5.size);
|
|
17633
|
+
const read2 = fs14.readSync(fd, buffer, 0, buffer.length, 0);
|
|
17634
|
+
const raw = buffer.toString("utf8", 0, read2).replace(/\s+$/, "");
|
|
17635
|
+
if (!raw.startsWith("gitdir: ")) return null;
|
|
17636
|
+
return realpathOrSelf(
|
|
17637
|
+
path18.resolve(realpathOrSelf(worktreePath), raw.slice("gitdir: ".length))
|
|
17638
|
+
);
|
|
17639
|
+
} catch {
|
|
17640
|
+
return null;
|
|
17641
|
+
} finally {
|
|
17642
|
+
if (fd !== void 0) {
|
|
17643
|
+
try {
|
|
17644
|
+
fs14.closeSync(fd);
|
|
17645
|
+
} catch {
|
|
17646
|
+
}
|
|
17647
|
+
}
|
|
17648
|
+
}
|
|
17649
|
+
}
|
|
17650
|
+
__name(gitfileTarget, "gitfileTarget");
|
|
17651
|
+
function gitfileAnswer(at) {
|
|
17652
|
+
let fd;
|
|
17653
|
+
try {
|
|
17654
|
+
fd = openPointerSync(path18.join(at, ".git"));
|
|
17655
|
+
const stat5 = fs14.fstatSync(fd);
|
|
17656
|
+
if (!stat5.isFile()) return "absent";
|
|
17657
|
+
if (stat5.size > GITDIR_POINTER_MAX_BYTES) return "unknown";
|
|
17658
|
+
const buffer = Buffer.alloc(stat5.size);
|
|
17659
|
+
const read2 = fs14.readSync(fd, buffer, 0, buffer.length, 0);
|
|
17660
|
+
return buffer.toString("utf8", 0, read2).startsWith("gitdir: ") ? "present" : "absent";
|
|
17661
|
+
} catch (err) {
|
|
17662
|
+
return saysNothingIsThere(err) ? "absent" : "unknown";
|
|
17663
|
+
} finally {
|
|
17664
|
+
if (fd !== void 0) {
|
|
17665
|
+
try {
|
|
17666
|
+
fs14.closeSync(fd);
|
|
17667
|
+
} catch {
|
|
17668
|
+
}
|
|
17669
|
+
}
|
|
17670
|
+
}
|
|
17671
|
+
}
|
|
17672
|
+
__name(gitfileAnswer, "gitfileAnswer");
|
|
17673
|
+
async function lockGitWorktree(cwd, worktreePath, reason, env2) {
|
|
17674
|
+
await runGit(
|
|
17675
|
+
cwd,
|
|
17676
|
+
[
|
|
17677
|
+
...NO_EXEC_CONFIG,
|
|
17678
|
+
"worktree",
|
|
17679
|
+
"lock",
|
|
17680
|
+
"--reason",
|
|
17681
|
+
reason,
|
|
17682
|
+
"--",
|
|
17683
|
+
worktreePath
|
|
17684
|
+
],
|
|
17685
|
+
env2
|
|
17686
|
+
);
|
|
17687
|
+
}
|
|
17688
|
+
__name(lockGitWorktree, "lockGitWorktree");
|
|
17689
|
+
async function unlockGitWorktree(cwd, worktreePath, env2) {
|
|
17690
|
+
await runGit(
|
|
17691
|
+
cwd,
|
|
17692
|
+
[...NO_EXEC_CONFIG, "worktree", "unlock", "--", worktreePath],
|
|
17693
|
+
env2
|
|
17694
|
+
);
|
|
17695
|
+
}
|
|
17696
|
+
__name(unlockGitWorktree, "unlockGitWorktree");
|
|
17697
|
+
async function pruneGitWorktrees(cwd, env2) {
|
|
17698
|
+
await runGit(cwd, [...NO_EXEC_CONFIG, "worktree", "prune"], env2);
|
|
17699
|
+
}
|
|
17700
|
+
__name(pruneGitWorktrees, "pruneGitWorktrees");
|
|
17701
|
+
|
|
17321
17702
|
// packages/core/src/tools/tool-result-retention.ts
|
|
17322
17703
|
init_esbuild_shims();
|
|
17323
17704
|
var OVERSIZED_TOOL_RESULT_THRESHOLD_CHARS = 3e4;
|
|
@@ -17357,13 +17738,13 @@ __name(analyzeToolResultRetention, "analyzeToolResultRetention");
|
|
|
17357
17738
|
|
|
17358
17739
|
// packages/core/src/utils/pathReader.ts
|
|
17359
17740
|
init_esbuild_shims();
|
|
17360
|
-
import { promises as
|
|
17361
|
-
import
|
|
17741
|
+
import { promises as fs15 } from "node:fs";
|
|
17742
|
+
import path19 from "node:path";
|
|
17362
17743
|
async function readPathFromWorkspace(pathStr, config) {
|
|
17363
17744
|
const workspace = config.getWorkspaceContext();
|
|
17364
17745
|
const fileService = config.getFileService();
|
|
17365
17746
|
let absolutePath = null;
|
|
17366
|
-
if (
|
|
17747
|
+
if (path19.isAbsolute(pathStr)) {
|
|
17367
17748
|
if (!workspace.isPathWithinWorkspace(pathStr)) {
|
|
17368
17749
|
throw new Error(
|
|
17369
17750
|
`Absolute path is outside of the allowed workspace: ${pathStr}`
|
|
@@ -17373,9 +17754,9 @@ async function readPathFromWorkspace(pathStr, config) {
|
|
|
17373
17754
|
} else {
|
|
17374
17755
|
const searchDirs = workspace.getDirectories();
|
|
17375
17756
|
for (const dir of searchDirs) {
|
|
17376
|
-
const potentialPath =
|
|
17757
|
+
const potentialPath = path19.resolve(dir, pathStr);
|
|
17377
17758
|
try {
|
|
17378
|
-
await
|
|
17759
|
+
await fs15.access(potentialPath);
|
|
17379
17760
|
absolutePath = potentialPath;
|
|
17380
17761
|
break;
|
|
17381
17762
|
} catch {
|
|
@@ -17385,7 +17766,7 @@ async function readPathFromWorkspace(pathStr, config) {
|
|
|
17385
17766
|
if (!absolutePath) {
|
|
17386
17767
|
throw new Error(`Path not found in workspace: ${pathStr}`);
|
|
17387
17768
|
}
|
|
17388
|
-
const stats = await
|
|
17769
|
+
const stats = await fs15.stat(absolutePath);
|
|
17389
17770
|
if (stats.isDirectory()) {
|
|
17390
17771
|
const allParts = [];
|
|
17391
17772
|
allParts.push({
|
|
@@ -17401,7 +17782,7 @@ async function readPathFromWorkspace(pathStr, config) {
|
|
|
17401
17782
|
absolute: true
|
|
17402
17783
|
});
|
|
17403
17784
|
const relativeFiles = files.map(
|
|
17404
|
-
(p) =>
|
|
17785
|
+
(p) => path19.relative(config.getTargetDir(), p)
|
|
17405
17786
|
);
|
|
17406
17787
|
const filteringOptions = config.getFileFilteringOptions();
|
|
17407
17788
|
const filteredFiles = fileService.filterFiles(relativeFiles, {
|
|
@@ -17409,10 +17790,10 @@ async function readPathFromWorkspace(pathStr, config) {
|
|
|
17409
17790
|
respectQwenIgnore: filteringOptions.respectQwenIgnore
|
|
17410
17791
|
});
|
|
17411
17792
|
const finalFiles = filteredFiles.map(
|
|
17412
|
-
(p) =>
|
|
17793
|
+
(p) => path19.resolve(config.getTargetDir(), p)
|
|
17413
17794
|
);
|
|
17414
17795
|
for (const filePath of finalFiles) {
|
|
17415
|
-
const relativePathForDisplay =
|
|
17796
|
+
const relativePathForDisplay = path19.relative(absolutePath, filePath);
|
|
17416
17797
|
allParts.push({ text: `--- ${relativePathForDisplay} ---
|
|
17417
17798
|
` });
|
|
17418
17799
|
const result = await processSingleFileContent(filePath, config, {
|
|
@@ -17428,7 +17809,7 @@ async function readPathFromWorkspace(pathStr, config) {
|
|
|
17428
17809
|
allParts.push({ text: `--- End of content for directory: ${pathStr} ---` });
|
|
17429
17810
|
return allParts;
|
|
17430
17811
|
} else {
|
|
17431
|
-
const relativePath =
|
|
17812
|
+
const relativePath = path19.relative(config.getTargetDir(), absolutePath);
|
|
17432
17813
|
const singleFileFilteringOptions = config.getFileFilteringOptions();
|
|
17433
17814
|
const filtered = fileService.filterFiles([relativePath], {
|
|
17434
17815
|
respectGitIgnore: singleFileFilteringOptions.respectGitIgnore,
|
|
@@ -17447,16 +17828,16 @@ __name(readPathFromWorkspace, "readPathFromWorkspace");
|
|
|
17447
17828
|
|
|
17448
17829
|
// packages/core/src/utils/projectSummary.ts
|
|
17449
17830
|
init_esbuild_shims();
|
|
17450
|
-
import * as
|
|
17451
|
-
import * as
|
|
17831
|
+
import * as fs16 from "fs/promises";
|
|
17832
|
+
import * as path20 from "path";
|
|
17452
17833
|
var PROJECT_SUMMARY_FILENAME = "PROJECT_SUMMARY.md";
|
|
17453
17834
|
var WELCOME_BACK_STATE_FILENAME = "welcome-back-state.json";
|
|
17454
17835
|
function getProjectSummaryPath() {
|
|
17455
|
-
return
|
|
17836
|
+
return path20.join(process.cwd(), ".qwen", PROJECT_SUMMARY_FILENAME);
|
|
17456
17837
|
}
|
|
17457
17838
|
__name(getProjectSummaryPath, "getProjectSummaryPath");
|
|
17458
17839
|
function getWelcomeBackStatePath() {
|
|
17459
|
-
return
|
|
17840
|
+
return path20.join(process.cwd(), ".qwen", WELCOME_BACK_STATE_FILENAME);
|
|
17460
17841
|
}
|
|
17461
17842
|
__name(getWelcomeBackStatePath, "getWelcomeBackStatePath");
|
|
17462
17843
|
function buildSummaryFingerprint(stat5) {
|
|
@@ -17465,7 +17846,7 @@ function buildSummaryFingerprint(stat5) {
|
|
|
17465
17846
|
__name(buildSummaryFingerprint, "buildSummaryFingerprint");
|
|
17466
17847
|
async function getWelcomeBackState() {
|
|
17467
17848
|
try {
|
|
17468
|
-
const raw = await
|
|
17849
|
+
const raw = await fs16.readFile(getWelcomeBackStatePath(), "utf-8");
|
|
17469
17850
|
const parsed = JSON.parse(raw);
|
|
17470
17851
|
if (parsed.version !== 1 || parsed.lastChoice !== "restart" || typeof parsed.summaryFingerprint !== "string") {
|
|
17471
17852
|
return null;
|
|
@@ -17481,7 +17862,7 @@ async function getWelcomeBackState() {
|
|
|
17481
17862
|
__name(getWelcomeBackState, "getWelcomeBackState");
|
|
17482
17863
|
async function saveWelcomeBackRestartChoice(summaryFingerprint) {
|
|
17483
17864
|
const statePath = getWelcomeBackStatePath();
|
|
17484
|
-
await
|
|
17865
|
+
await fs16.mkdir(path20.dirname(statePath), { recursive: true });
|
|
17485
17866
|
const state = {
|
|
17486
17867
|
version: 1,
|
|
17487
17868
|
lastChoice: "restart",
|
|
@@ -17494,7 +17875,7 @@ async function saveWelcomeBackRestartChoice(summaryFingerprint) {
|
|
|
17494
17875
|
__name(saveWelcomeBackRestartChoice, "saveWelcomeBackRestartChoice");
|
|
17495
17876
|
async function clearWelcomeBackState() {
|
|
17496
17877
|
try {
|
|
17497
|
-
await
|
|
17878
|
+
await fs16.rm(getWelcomeBackStatePath(), { force: true });
|
|
17498
17879
|
} catch {
|
|
17499
17880
|
}
|
|
17500
17881
|
}
|
|
@@ -17502,15 +17883,15 @@ __name(clearWelcomeBackState, "clearWelcomeBackState");
|
|
|
17502
17883
|
async function getProjectSummaryInfo() {
|
|
17503
17884
|
const summaryPath = getProjectSummaryPath();
|
|
17504
17885
|
try {
|
|
17505
|
-
await
|
|
17886
|
+
await fs16.access(summaryPath);
|
|
17506
17887
|
} catch {
|
|
17507
17888
|
return {
|
|
17508
17889
|
hasHistory: false
|
|
17509
17890
|
};
|
|
17510
17891
|
}
|
|
17511
17892
|
try {
|
|
17512
|
-
const summaryStat = await
|
|
17513
|
-
const content = await
|
|
17893
|
+
const summaryStat = await fs16.stat(summaryPath);
|
|
17894
|
+
const content = await fs16.readFile(summaryPath, "utf-8");
|
|
17514
17895
|
const summaryFingerprint = buildSummaryFingerprint(summaryStat);
|
|
17515
17896
|
const timestampMatch = content.match(/\*\*Update time\*\*: (.+)/);
|
|
17516
17897
|
const timestamp = timestampMatch ? timestampMatch[1] : (/* @__PURE__ */ new Date()).toISOString();
|
|
@@ -17578,9 +17959,9 @@ __name(getProjectSummaryInfo, "getProjectSummaryInfo");
|
|
|
17578
17959
|
|
|
17579
17960
|
// packages/core/src/tools/readManyFiles.ts
|
|
17580
17961
|
init_esbuild_shims();
|
|
17581
|
-
import * as
|
|
17962
|
+
import * as fs17 from "node:fs";
|
|
17582
17963
|
import * as os4 from "node:os";
|
|
17583
|
-
import * as
|
|
17964
|
+
import * as path21 from "node:path";
|
|
17584
17965
|
var DEFAULT_OUTPUT_HEADER = "\n--- Content from referenced files ---";
|
|
17585
17966
|
var DEFAULT_OUTPUT_TERMINATOR = "\n--- End of content ---";
|
|
17586
17967
|
var SNAPSHOT_MAX_SIZE_BYTES = 100 * 1024 * 1024;
|
|
@@ -17600,7 +17981,7 @@ async function readManyFiles(config, options) {
|
|
|
17600
17981
|
for (const rawPattern of inputPatterns) {
|
|
17601
17982
|
signal?.throwIfAborted();
|
|
17602
17983
|
const normalizedPattern = rawPattern.replace(/\\/g, "/");
|
|
17603
|
-
const fullPath =
|
|
17984
|
+
const fullPath = path21.resolve(projectRoot, normalizedPattern);
|
|
17604
17985
|
const displayPath = displayPaths?.get(fullPath) ?? fullPath;
|
|
17605
17986
|
const validatedIdentity = validatedPathIdentities?.get(fullPath);
|
|
17606
17987
|
if (validatedPathIdentities && !validatedIdentity) continue;
|
|
@@ -17619,7 +18000,7 @@ async function readManyFiles(config, options) {
|
|
|
17619
18000
|
if (validatedIdentity && !await matchesValidatedPathIdentity(fullPath, validatedIdentity)) {
|
|
17620
18001
|
continue;
|
|
17621
18002
|
}
|
|
17622
|
-
const stats =
|
|
18003
|
+
const stats = fs17.existsSync(fullPath) ? fs17.statSync(fullPath) : null;
|
|
17623
18004
|
if (stats?.isDirectory()) {
|
|
17624
18005
|
const { contentParts: dirParts, info } = await readDirectory(
|
|
17625
18006
|
config,
|
|
@@ -17739,9 +18120,9 @@ async function readValidatedTextFileContent(config, filePath, expected, preserve
|
|
|
17739
18120
|
__name(readValidatedTextFileContent, "readValidatedTextFileContent");
|
|
17740
18121
|
async function matchesValidatedPathIdentity(filePath, expected) {
|
|
17741
18122
|
try {
|
|
17742
|
-
const canonicalPath = await
|
|
18123
|
+
const canonicalPath = await fs17.promises.realpath(filePath);
|
|
17743
18124
|
if (canonicalPath !== filePath) return false;
|
|
17744
|
-
const stats = await
|
|
18125
|
+
const stats = await fs17.promises.stat(canonicalPath);
|
|
17745
18126
|
return statsMatchValidatedIdentity(stats, expected);
|
|
17746
18127
|
} catch {
|
|
17747
18128
|
return false;
|
|
@@ -17770,13 +18151,13 @@ async function snapshotValidatedFile(filePath, expected, signal) {
|
|
|
17770
18151
|
if (stats.size > SNAPSHOT_MAX_SIZE_BYTES) {
|
|
17771
18152
|
return void 0;
|
|
17772
18153
|
}
|
|
17773
|
-
snapshotDir = await
|
|
17774
|
-
|
|
18154
|
+
snapshotDir = await fs17.promises.mkdtemp(
|
|
18155
|
+
path21.join(os4.tmpdir(), "qwen-validated-read-")
|
|
17775
18156
|
);
|
|
17776
|
-
const snapshotPath =
|
|
17777
|
-
const target = await
|
|
18157
|
+
const snapshotPath = path21.join(snapshotDir, path21.basename(filePath));
|
|
18158
|
+
const target = await fs17.promises.open(
|
|
17778
18159
|
snapshotPath,
|
|
17779
|
-
|
|
18160
|
+
fs17.constants.O_WRONLY | fs17.constants.O_CREAT | fs17.constants.O_EXCL,
|
|
17780
18161
|
384
|
|
17781
18162
|
);
|
|
17782
18163
|
try {
|
|
@@ -17817,7 +18198,7 @@ async function snapshotValidatedFile(filePath, expected, signal) {
|
|
|
17817
18198
|
result = {
|
|
17818
18199
|
filePath: snapshotPath,
|
|
17819
18200
|
stats,
|
|
17820
|
-
cleanup: /* @__PURE__ */ __name(() =>
|
|
18201
|
+
cleanup: /* @__PURE__ */ __name(() => fs17.promises.rm(snapshotDir, { recursive: true, force: true }), "cleanup")
|
|
17821
18202
|
};
|
|
17822
18203
|
return result;
|
|
17823
18204
|
} finally {
|
|
@@ -17829,7 +18210,7 @@ async function snapshotValidatedFile(filePath, expected, signal) {
|
|
|
17829
18210
|
return void 0;
|
|
17830
18211
|
} finally {
|
|
17831
18212
|
if (snapshotDir && !result) {
|
|
17832
|
-
await
|
|
18213
|
+
await fs17.promises.rm(snapshotDir, { recursive: true, force: true });
|
|
17833
18214
|
}
|
|
17834
18215
|
}
|
|
17835
18216
|
}
|
|
@@ -18052,6 +18433,17 @@ export {
|
|
|
18052
18433
|
Fzf,
|
|
18053
18434
|
AsyncFzf,
|
|
18054
18435
|
FileSearchFactory,
|
|
18436
|
+
realpathOrSelf,
|
|
18437
|
+
realpathOnDiskOrSelf,
|
|
18438
|
+
listGitWorktrees,
|
|
18439
|
+
removeGitWorktree,
|
|
18440
|
+
commitIsReachable,
|
|
18441
|
+
worktreeHoldsSubmodules,
|
|
18442
|
+
dryRunGitWorktreePrune,
|
|
18443
|
+
worktreeAdminHoldsModules,
|
|
18444
|
+
lockGitWorktree,
|
|
18445
|
+
unlockGitWorktree,
|
|
18446
|
+
pruneGitWorktrees,
|
|
18055
18447
|
analyzeToolResultRetention,
|
|
18056
18448
|
readPathFromWorkspace,
|
|
18057
18449
|
getWelcomeBackState,
|