@qwen-code/qwen-code 0.19.4 → 0.19.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/qc-helper/docs/configuration/settings.md +22 -6
- package/bundled/qc-helper/docs/features/commands.md +41 -34
- package/bundled/qc-helper/docs/features/headless.md +19 -18
- package/bundled/qc-helper/docs/qwen-serve.md +34 -0
- package/bundled/qc-helper/docs/support/troubleshooting.md +5 -0
- package/chunks/{MaxSizedBox-ERTNFI22.js → MaxSizedBox-5JV77KRA.js} +11 -10
- package/chunks/{StandaloneSessionPicker-Y5NGRLRY.js → StandaloneSessionPicker-MGUGB6PH.js} +21 -20
- package/chunks/{acpAgent-UMN6OYTR.js → acpAgent-4F36XM3X.js} +75 -73
- package/chunks/{agent-56DZU4ZU.js → agent-IWBUZI6A.js} +8 -7
- package/chunks/{agent-headless-SR7N2IJG.js → agent-headless-JUTICAYO.js} +8 -7
- package/chunks/{anthropicContentGenerator-5OZFO6WQ.js → anthropicContentGenerator-WL3LJOUB.js} +99 -23
- package/chunks/{artifact-tool-JVZMHA4B.js → artifact-tool-W76WC2JX.js} +1 -1
- package/chunks/{askUserQuestion-CMJZ2F3D.js → askUserQuestion-J3P6TH3V.js} +1 -1
- package/chunks/{bridge-AUHNFOUS.js → bridge-DHZHQ4UV.js} +14 -12
- package/chunks/{ca-RYOETBUW.js → ca-HCMB2I54.js} +1 -0
- package/chunks/channel-worker-supervisor-EVPAYNZ5.js +665 -0
- package/chunks/{chunk-HRZB5CSC.js → chunk-2CAII5HD.js} +1 -1
- package/chunks/{chunk-FYKX6XOT.js → chunk-2YH27UNF.js} +1 -1
- package/chunks/chunk-2Z43HUXT.js +99 -0
- package/chunks/{chunk-ZXCVPMIK.js → chunk-4MCC4XHH.js} +167 -54
- package/chunks/{chunk-J3F7X3LW.js → chunk-5B2WNM6V.js} +1 -1
- package/chunks/{chunk-VKGG724L.js → chunk-6KPZJJ6U.js} +9 -8
- package/chunks/{chunk-BFG6OZN7.js → chunk-6QTCOQX7.js} +3470 -2654
- package/chunks/{chunk-QAFQLTXG.js → chunk-6QVQZAW6.js} +1 -1
- package/chunks/{chunk-HI55Z6PR.js → chunk-7DMQRPC7.js} +401 -58
- package/chunks/{chunk-MKHC4BYZ.js → chunk-BC4R5C5R.js} +20 -4
- package/chunks/chunk-BPFJQGY7.js +193 -0
- package/chunks/{chunk-FNLXLI4I.js → chunk-CBJE2PLG.js} +2 -2
- package/chunks/{chunk-HJDF3ZVU.js → chunk-CHY5C5T4.js} +6 -6
- package/chunks/{chunk-UT5JU5DJ.js → chunk-CSPSJU5R.js} +40 -13
- package/chunks/chunk-CXBG27SF.js +35 -0
- package/chunks/{chunk-UQFP2FEF.js → chunk-DG573EOO.js} +1 -1
- package/chunks/{chunk-UQYOMM6J.js → chunk-DM4E337C.js} +10 -10
- package/chunks/{chunk-CS5XYDBO.js → chunk-DRS2HTNT.js} +5 -5
- package/chunks/{chunk-MVZXZWGT.js → chunk-EJ7BN3EN.js} +125 -52
- package/chunks/{chunk-YBDZ63KI.js → chunk-EROWZQN7.js} +8 -4
- package/chunks/{chunk-CUGEBAKG.js → chunk-G4M7FPNY.js} +1 -1
- package/chunks/{chunk-ND25GXEU.js → chunk-HISPEX42.js} +11 -3
- package/chunks/{chunk-TTFNVEO5.js → chunk-IMAMNLY6.js} +3 -3
- package/chunks/{chunk-7VPC7D7O.js → chunk-J3ERRYYI.js} +2 -2
- package/chunks/{chunk-OAFUMTWW.js → chunk-JJ6B3ZD3.js} +2 -2
- package/chunks/{chunk-W2ZOAX7F.js → chunk-JKGCBO3O.js} +3 -3
- package/chunks/{chunk-BQNJBEUA.js → chunk-K4I4STSL.js} +16 -2
- package/chunks/{chunk-MEQWZGK5.js → chunk-L7OJ3ZO3.js} +1 -1
- package/chunks/{chunk-GICCHL2Q.js → chunk-LHMZCIKL.js} +1 -1
- package/chunks/{chunk-XCUFHOAD.js → chunk-M5ITDKSM.js} +1 -1
- package/chunks/{chunk-7KPI4LAI.js → chunk-MDBNFHIO.js} +3 -3
- package/chunks/{chunk-BNJLLAQ7.js → chunk-MNOXKSM2.js} +1 -1
- package/chunks/{chunk-4VZH35PN.js → chunk-MTNTVOJR.js} +2 -0
- package/chunks/{chunk-CG7SVARK.js → chunk-NDY7OENU.js} +2 -2
- package/chunks/{chunk-DQ74W65K.js → chunk-NNEJEBCF.js} +49 -22
- package/chunks/{chunk-L7VH7HQA.js → chunk-NSSVORTQ.js} +29 -4
- package/chunks/{chunk-6CIIP6OE.js → chunk-OQHLUA2Y.js} +3 -3
- package/chunks/{chunk-6TLY5W3B.js → chunk-QHYITL6P.js} +127 -23
- package/chunks/{chunk-73H73ASU.js → chunk-R3UWLLRQ.js} +1 -1
- package/chunks/{chunk-UANCYOOQ.js → chunk-R6RI2HIC.js} +1 -1
- package/chunks/{chunk-PIYV6COW.js → chunk-RNGAT2Y2.js} +1 -1
- package/chunks/{chunk-W6X4FGWX.js → chunk-RSBQS6M4.js} +1 -1
- package/chunks/{chunk-EDAGQADF.js → chunk-S6RLAIUR.js} +2 -0
- package/chunks/{chunk-C2IHHGBZ.js → chunk-SBMHB6N5.js} +12 -12
- package/chunks/chunk-SIUQ3YYX.js +78 -0
- package/chunks/{chunk-MNDTD5E5.js → chunk-SJVPSHXU.js} +4 -4
- package/chunks/chunk-TN6RT6EJ.js +86 -0
- package/chunks/{chunk-75X2VLSH.js → chunk-UJT42DB6.js} +26 -5
- package/chunks/{chunk-QMIND2AS.js → chunk-UY2TCIZS.js} +15 -1
- package/chunks/{chunk-6AQR7732.js → chunk-WALEWZ44.js} +1 -1
- package/chunks/{chunk-SFN4TEHY.js → chunk-WZ724G6K.js} +4 -4
- package/chunks/{chunk-2X2JUE47.js → chunk-XKZXGIRM.js} +2 -2
- package/chunks/{chunk-Q7VHIRDD.js → chunk-Y4UQT3PM.js} +1 -1
- package/chunks/{chunk-B7KGXIPZ.js → chunk-YCU7QV7Q.js} +11 -4
- package/chunks/{chunk-OJCECIJA.js → chunk-YHTNWGRR.js} +5 -4
- package/chunks/{chunk-ZJP5T7IA.js → chunk-Z7XNVNPM.js} +1 -1
- package/chunks/{chunk-KVPFPC4J.js → chunk-ZISMVA6U.js} +14 -14
- package/chunks/{computer-use-VWN5HH6A.js → computer-use-ON3JQUHW.js} +8 -7
- package/chunks/{contextCommand-DFFG5KDJ.js → contextCommand-OGCG7W6N.js} +10 -9
- package/chunks/{cron-create-CSSWJ67I.js → cron-create-6YTCOX6P.js} +1 -1
- package/chunks/{cron-delete-E56CFQ7A.js → cron-delete-E3NIFSUK.js} +1 -1
- package/chunks/{cron-list-BKSINY6Y.js → cron-list-Q64MNQNE.js} +1 -1
- package/chunks/{daemon-5T6IHWJV.js → daemon-EEB2RYOL.js} +23 -0
- package/chunks/{daemon-status-provider-V5UY7O7J.js → daemon-status-provider-P72STMLB.js} +17 -15
- package/chunks/{de-HB5NJXGB.js → de-PLLFDERI.js} +1 -0
- package/chunks/{dist-TAVAGZU6.js → dist-AP5V4WYU.js} +54 -14
- package/chunks/{dist-XBOVZ3R5.js → dist-IZP2VV4C.js} +156 -57
- package/chunks/{dist-B7SSDVWT.js → dist-SNXOUPYS.js} +201 -7
- package/chunks/{dist-2HDL5SHQ.js → dist-X4ZDE726.js} +43 -8
- package/chunks/{dist-BL3SL665.js → dist-Z57Q4YF5.js} +1 -1
- package/chunks/{earlyInputCapture-VVYU4FDO.js → earlyInputCapture-DAFHSGVW.js} +8 -7
- package/chunks/{edit-F35PTMBA.js → edit-3QFNCSZH.js} +13 -16
- package/chunks/{en-FZREZFPO.js → en-M4EBUBNU.js} +2 -0
- package/chunks/{enter-worktree-3DIW7EGJ.js → enter-worktree-62EQQMLD.js} +8 -7
- package/chunks/{enterPlanMode-QNXT77KP.js → enterPlanMode-VUQSE4EG.js} +10 -9
- package/chunks/{errors-M53YG76R.js → errors-PW75PZXE.js} +10 -9
- package/chunks/{exit-worktree-BSDWNWHZ.js → exit-worktree-VVNH7OVY.js} +8 -7
- package/chunks/{exitPlanMode-EL7AY327.js → exitPlanMode-RUYRCYZW.js} +106 -11
- package/chunks/{fast-path-DUCSMUFW.js → fast-path-TFRJRTTR.js} +5 -3
- package/chunks/{fr-XY3NQFCM.js → fr-MBMNQSQ6.js} +1 -0
- package/chunks/{gemini-F3IERB37.js → gemini-XW7ZDUVR.js} +50 -47
- package/chunks/{geminiContentGenerator-6OULAKFQ.js → geminiContentGenerator-MZDVHVZH.js} +39 -3
- package/chunks/{glob-ZMLFTD4T.js → glob-WAY2PUWA.js} +8 -7
- package/chunks/{grep-H5X66EI7.js → grep-W6CBKSYC.js} +8 -7
- package/chunks/{initializer-LEOT2OLH.js → initializer-HK2XE6P2.js} +12 -11
- package/chunks/{ja-J7YAG7SA.js → ja-HFV5QCHR.js} +1 -0
- package/chunks/{list-M3DKXML6.js → list-RVLIIKKL.js} +14 -13
- package/chunks/{loadedSettingsAdapter-OKMQFGGG.js → loadedSettingsAdapter-C63OUYZC.js} +12 -11
- package/chunks/{loop-wakeup-FPBAVVPR.js → loop-wakeup-G2EHBRGR.js} +2 -2
- package/chunks/{ls-UGWQXPTY.js → ls-IDHUVSAG.js} +1 -1
- package/chunks/{lsp-24WV7NXB.js → lsp-FSRYXGFT.js} +1 -1
- package/chunks/{monitor-ARL5P45R.js → monitor-FOG36ABM.js} +10 -9
- package/chunks/{nonInteractiveCli-NUVLF3YR.js → nonInteractiveCli-6BYQSJTB.js} +40 -39
- package/chunks/{notebook-edit-ANTZ2DDY.js → notebook-edit-GC6NXRCX.js} +13 -15
- package/chunks/{openaiContentGenerator-TFGMKGHN.js → openaiContentGenerator-EXR3ZL3Z.js} +4 -4
- package/chunks/{pidfile-AWTL4C63.js → pidfile-FNZM2DDH.js} +9 -8
- package/chunks/{pt-6RTAA6SS.js → pt-2THT3YHA.js} +1 -0
- package/chunks/{qwenContentGenerator-6QWAYTWS.js → qwenContentGenerator-A7B6J4U7.js} +9 -8
- package/chunks/{read-file-EJY73XQ3.js → read-file-6JL4ULMY.js} +3 -3
- package/chunks/{read-mcp-resource-NCBTPP7X.js → read-mcp-resource-PIJF24RO.js} +1 -1
- package/chunks/{ripGrep-HC4SA6CQ.js → ripGrep-DIUGLJE5.js} +8 -7
- package/chunks/{ru-AUBGJ2C4.js → ru-Z67YJHBG.js} +1 -0
- package/chunks/{run-qwen-serve-AGLZ642J.js → run-qwen-serve-CME3AKM4.js} +123 -30
- package/chunks/{scheduler-TURO7NGY.js → scheduler-L7F6GDDT.js} +8 -7
- package/chunks/{send-message-3S2NYS3O.js → send-message-33PYFMCT.js} +15 -1
- package/chunks/{serve-5DAMOIDW.js → serve-SRCBOJGP.js} +12 -11
- package/chunks/{server-4AGEK2HC.js → server-QSQ45QFR.js} +184 -170
- package/chunks/{session-7ZOQUC4Y.js → session-5DG6NXHZ.js} +41 -40
- package/chunks/{settings-DR4V6L5Y.js → settings-3EEQI4MN.js} +11 -10
- package/chunks/{shell-H5WFKUXH.js → shell-B7FNYF5S.js} +8 -7
- package/chunks/{skill-ANHU5ZCR.js → skill-AAOGHD5O.js} +3 -3
- package/chunks/{spawnChannel-VN5LJV7Z.js → spawnChannel-3CBN3ZLK.js} +11 -9
- package/chunks/{src-OVZLTVVM.js → src-T5A7P7FS.js} +20 -9
- package/chunks/{startInteractiveUI-OA22V32P.js → startInteractiveUI-2FGEQ6AS.js} +2648 -2500
- package/chunks/{syntheticOutput-SV7GBHZ5.js → syntheticOutput-YOSWIHDJ.js} +2 -2
- package/chunks/{task-create-W2H2UJCH.js → task-create-NHS2NGB3.js} +3 -2
- package/chunks/{task-list-THBOPV4G.js → task-list-5UIB564R.js} +1 -1
- package/chunks/{task-stop-33FVCNCJ.js → task-stop-HGXZ2VZ3.js} +1 -1
- package/chunks/{task-update-LVFQLXEI.js → task-update-IYYWUILG.js} +34 -2
- package/chunks/{team-create-OYL5CAQO.js → team-create-KDF6W6PV.js} +8 -7
- package/chunks/{team-delete-NTUQ25UY.js → team-delete-FEKJCU4P.js} +1 -1
- package/chunks/team-plan-approval-PSFKQX7M.js +202 -0
- package/chunks/{theme-manager-XCMPF2SI.js → theme-manager-5XOA2AO7.js} +8 -7
- package/chunks/{todoWrite-SEPO2RI3.js → todoWrite-TKMVZ2HT.js} +1 -1
- package/chunks/{tool-search-YXW55X6Z.js → tool-search-LFRILZXC.js} +8 -6
- package/chunks/{trustedFolders-TEPGM5YL.js → trustedFolders-7HQY6T6X.js} +9 -8
- package/chunks/{validateNonInterActiveAuth-OQIS7WUE.js → validateNonInterActiveAuth-UC27B7BA.js} +37 -36
- package/chunks/{web-fetch-OE7LHURA.js → web-fetch-J4PIW36Q.js} +2 -2
- package/chunks/{workflow-RTUWORAP.js → workflow-KUTESS6L.js} +11 -10
- package/chunks/{workspace-providers-status-DM2XANVB.js → workspace-providers-status-LJT5AQDS.js} +14 -13
- package/chunks/{workspace-service-VKBI2KZD.js → workspace-service-YOBYVDXH.js} +16 -15
- package/chunks/workspace-skills-status-ONEPXJV6.js +62 -0
- package/chunks/{write-file-WGALQ53L.js → write-file-FJYBZUHP.js} +13 -17
- package/chunks/{zh-V3B4TFWL.js → zh-SLZNSSZB.js} +2 -0
- package/chunks/{zh-TW-6GIKXEAN.js → zh-TW-P53C2SL5.js} +2 -0
- package/cli.js +6 -6
- package/locales/ca.js +2 -0
- package/locales/de.js +2 -0
- package/locales/en.js +3 -0
- package/locales/fr.js +2 -0
- package/locales/ja.js +2 -0
- package/locales/pt.js +2 -0
- package/locales/ru.js +2 -0
- package/locales/zh-TW.js +3 -0
- package/locales/zh.js +3 -0
- package/node_modules/@qwen-code/audio-capture/package.json +1 -1
- package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-arm64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-x64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/win32-x64/@qwen-code+audio-capture.node +0 -0
- package/package.json +6 -15
- package/web-shell/assets/{arc-Det5Ccum.js → arc-D_rAuMDd.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-DqNWVFpl.js → architectureDiagram-3BPJPVTR-DUCzbHVo.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-CYl7tYBi.js → blockDiagram-GPEHLZMM-BEEBt1LL.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-DaAEi0NQ.js → c4Diagram-AAUBKEIU-5ZJ_DeFL.js} +1 -1
- package/web-shell/assets/channel-B5ynH0q8.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-Df2CDEE2.js → chunk-2J33WTMH-Cfw7EiLn.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-DNBFcyL2.js → chunk-4BX2VUAB-FGuZNCZY.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-BKjF-0HI.js → chunk-55IACEB6-CaBwYPBF.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-DYwAwfIM.js → chunk-727SXJPM-BlR04OFz.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-C6FswLqy.js → chunk-AQP2D5EJ-D3_mYJH5.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-DRWAcZSY.js → chunk-FMBD7UC4-7D4q4SbB.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-AoL16mNR.js → chunk-ND2GUHAM-BjX_Iwmr.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-a8PtLMck.js → chunk-QZHKN3VN-C3Hz_ZQh.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-CK3ibywp.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CK3ibywp.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-C4Aeu5qf.js → cose-bilkent-S5V4N54A-Ax4UycaT.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-BOulamjo.js → dagre-BM42HDAG-C6hmPtGt.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-D1wt2ykO.js → diagram-2AECGRRQ-tXZnxjmw.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-BRseus-O.js → diagram-5GNKFQAL-99dwIzQG.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-XSMkNzpZ.js → diagram-KO2AKTUF-Bqhn0-2s.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-21KNLqoi.js → diagram-LMA3HP47-DzThVSvo.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-DnUI8F5G.js → diagram-OG6HWLK6-DPE8vjln.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-BVSOMuM2.js → erDiagram-TEJ5UH35-KzUKgQCV.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-fYtDPJsW.js → flowDiagram-I6XJVG4X-DBN-DXw5.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-CmRXosW_.js → ganttDiagram-6RSMTGT7-DuBsP9u8.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-DPrmySxO.js → gitGraphDiagram-PVQCEYII-BjWHMyKR.js} +1 -1
- package/web-shell/assets/index-9qfvU0_r.css +5 -0
- package/web-shell/assets/index-CWzDaQT5.js +717 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-x3VbEuCV.js → infoDiagram-5YYISTIA-BVux0vP6.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-SmitHRMC.js → ishikawaDiagram-YF4QCWOH-2qzw7f--.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-BxvA551S.js → journeyDiagram-JHISSGLW-Dnl65sxL.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-DNHC16jY.js → kanban-definition-UN3LZRKU-BElSQYtY.js} +1 -1
- package/web-shell/assets/{linear-CQ6irBL9.js → linear-BjoycSSY.js} +1 -1
- package/web-shell/assets/{mermaid.core-DtB6NO1e.js → mermaid.core-xe6bvMRz.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-QKMAgV2v.js → mindmap-definition-RKZ34NQL-D8DQgI4U.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-bvb6dGn6.js → pieDiagram-4H26LBE5-Dwh7Gp7c.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-DLgdlG4D.js → quadrantDiagram-W4KKPZXB-BXKNBln2.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-2M9YH4GF.js → requirementDiagram-4Y6WPE33-BzaC3cIA.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-DzwfclTH.js → sankeyDiagram-5OEKKPKP-DP2t7eZk.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-BvPmTuy2.js → sequenceDiagram-3UESZ5HK-XlFiWEYv.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-BjwUmrJF.js → stateDiagram-AJRCARHV-CupgUMJO.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-By3E4QwN.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-CXzS6qqz.js → timeline-definition-PNZ67QCA-DstuGywa.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-yRSolF5B.js → vennDiagram-CIIHVFJN-CnbNp6zu.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-ClLJjHPG.js → wardley-L42UT6IY-DnvoHq6R.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-VIa6t2p2.js → wardleyDiagram-YWT4CUSO-Cz0xHEWB.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-CtmrkezW.js → xychartDiagram-2RQKCTM6-p36gfo88.js} +1 -1
- package/web-shell/index.html +28 -3
- package/chunks/channel-worker-supervisor-A74FV522.js +0 -308
- package/chunks/chunk-S5EQPDTM.js +0 -91
- package/patches/chrome-devtools-mcp+1.4.0.patch +0 -31
- package/postinstall.js +0 -50
- package/web-shell/assets/channel-Bm0bFauD.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK--NgUfb55.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2--NgUfb55.js +0 -1
- package/web-shell/assets/index-BpKnmyFV.js +0 -717
- package/web-shell/assets/index-fLrtxpOG.css +0 -5
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-C4L8zXeL.js +0 -1
|
@@ -2328,6 +2328,26 @@ var DaemonClient = class {
|
|
|
2328
2328
|
}
|
|
2329
2329
|
);
|
|
2330
2330
|
}
|
|
2331
|
+
async detachSession(sessionId, clientId) {
|
|
2332
|
+
if (!clientId) return;
|
|
2333
|
+
return await this.fetchWithTimeout(
|
|
2334
|
+
`${this.baseUrl}/session/${encodeURIComponent(sessionId)}/detach`,
|
|
2335
|
+
{
|
|
2336
|
+
method: "POST",
|
|
2337
|
+
headers: this.headers({}, clientId)
|
|
2338
|
+
},
|
|
2339
|
+
async (res) => {
|
|
2340
|
+
if (res.status === 204 || res.status === 404) {
|
|
2341
|
+
try {
|
|
2342
|
+
await res.body?.cancel();
|
|
2343
|
+
} catch {
|
|
2344
|
+
}
|
|
2345
|
+
return;
|
|
2346
|
+
}
|
|
2347
|
+
throw await this.failOnError(res, "POST /session/:id/detach");
|
|
2348
|
+
}
|
|
2349
|
+
);
|
|
2350
|
+
}
|
|
2331
2351
|
async deleteSessionsData(sessionIds, clientId) {
|
|
2332
2352
|
return await this.fetchWithTimeout(
|
|
2333
2353
|
`${this.baseUrl}/sessions/delete`,
|
|
@@ -2948,6 +2968,9 @@ var DaemonSessionClient = class _DaemonSessionClient {
|
|
|
2948
2968
|
async close() {
|
|
2949
2969
|
return await this.client.closeSession(this.sessionId, this.clientId);
|
|
2950
2970
|
}
|
|
2971
|
+
async detach() {
|
|
2972
|
+
return await this.client.detachSession(this.sessionId, this.clientId);
|
|
2973
|
+
}
|
|
2951
2974
|
async updateMetadata(metadata) {
|
|
2952
2975
|
return await this.client.updateSessionMetadata(
|
|
2953
2976
|
this.sessionId,
|
|
@@ -2,53 +2,55 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
createDaemonStatusProvider
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-OQHLUA2Y.js";
|
|
6
|
+
import "./chunk-JKGCBO3O.js";
|
|
7
7
|
import "./chunk-KHDZHZMH.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-EWALXUAD.js";
|
|
11
|
-
import "./chunk-ALX6BUYW.js";
|
|
12
|
-
import "./chunk-YBDZ63KI.js";
|
|
8
|
+
import "./chunk-RSBQS6M4.js";
|
|
9
|
+
import "./chunk-ZISMVA6U.js";
|
|
13
10
|
import "./chunk-P7M4GA57.js";
|
|
14
11
|
import "./chunk-T22H4V4R.js";
|
|
12
|
+
import "./chunk-EWALXUAD.js";
|
|
15
13
|
import "./chunk-SEZC2725.js";
|
|
16
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-ALX6BUYW.js";
|
|
15
|
+
import "./chunk-EROWZQN7.js";
|
|
16
|
+
import "./chunk-LHMZCIKL.js";
|
|
17
|
+
import "./chunk-2Z43HUXT.js";
|
|
17
18
|
import "./chunk-UFC57OYT.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
+
import "./chunk-6QTCOQX7.js";
|
|
19
20
|
import "./chunk-5P5XGNYH.js";
|
|
20
21
|
import "./chunk-K5PGHDBN.js";
|
|
21
22
|
import "./chunk-SKAZWEV5.js";
|
|
22
23
|
import "./chunk-QOMAHFYI.js";
|
|
23
24
|
import "./chunk-G7OQ3RFJ.js";
|
|
24
25
|
import "./chunk-LKWAVAB5.js";
|
|
25
|
-
import "./chunk-
|
|
26
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-L7OJ3ZO3.js";
|
|
27
|
+
import "./chunk-R6RI2HIC.js";
|
|
27
28
|
import "./chunk-2MPVVENX.js";
|
|
28
29
|
import "./chunk-ZTQ26VBE.js";
|
|
29
30
|
import "./chunk-SJBIFVD2.js";
|
|
30
31
|
import "./chunk-MLZQVCF3.js";
|
|
31
|
-
import "./chunk-S5EQPDTM.js";
|
|
32
32
|
import "./chunk-LQ7TMOCE.js";
|
|
33
33
|
import "./chunk-E5A7LHNN.js";
|
|
34
|
+
import "./chunk-BPFJQGY7.js";
|
|
34
35
|
import "./chunk-GO6LNQXT.js";
|
|
35
36
|
import "./chunk-B236XPGF.js";
|
|
36
37
|
import "./chunk-YXK4GPYO.js";
|
|
37
38
|
import "./chunk-TOAUDIS7.js";
|
|
38
39
|
import "./chunk-NPQWQYU6.js";
|
|
39
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-CHY5C5T4.js";
|
|
40
41
|
import "./chunk-E6US47KI.js";
|
|
41
42
|
import "./chunk-UWCTAVOD.js";
|
|
42
43
|
import "./chunk-OFEVLU4C.js";
|
|
43
44
|
import "./chunk-OMX7CUOE.js";
|
|
44
45
|
import "./chunk-MOUXUCXQ.js";
|
|
45
46
|
import "./chunk-BZHLWC6T.js";
|
|
46
|
-
import "./chunk-
|
|
47
|
-
import "./chunk-
|
|
47
|
+
import "./chunk-DG573EOO.js";
|
|
48
|
+
import "./chunk-MTNTVOJR.js";
|
|
48
49
|
import "./chunk-TENOUWY2.js";
|
|
49
50
|
import "./chunk-GLPV75ES.js";
|
|
50
51
|
import "./chunk-22IFUCVR.js";
|
|
51
52
|
import "./chunk-T42ACHFI.js";
|
|
53
|
+
import "./chunk-SIUQ3YYX.js";
|
|
52
54
|
import "./chunk-YTFBURQD.js";
|
|
53
55
|
import "./chunk-YPCPZSZB.js";
|
|
54
56
|
import "./chunk-IRJWHZWU.js";
|
|
@@ -1391,6 +1391,7 @@ var de_default = {
|
|
|
1391
1391
|
"Hide tool output and thinking for a cleaner view (toggle with Ctrl+O).": "Tool-Ausgabe und Denkprozess ausblenden f\xFCr eine \xFCbersichtlichere Ansicht (mit Ctrl+O umschalten).",
|
|
1392
1392
|
"Press Ctrl+O to show full tool output": "Ctrl+O f\xFCr vollst\xE4ndige Tool-Ausgabe dr\xFCcken",
|
|
1393
1393
|
"Switch to plan mode or exit plan mode": "In den Plan-Modus wechseln oder den Plan-Modus verlassen",
|
|
1394
|
+
"Set how hard reasoning-capable models think ({{tiers}}); mapped and clamped per provider.": "Legt fest, wie intensiv schlussfolgerungsf\xE4hige Modelle denken ({{tiers}}); je nach Anbieter zugeordnet und begrenzt.",
|
|
1394
1395
|
"Exited plan mode. Previous approval mode restored.": "Plan-Modus verlassen. Vorheriger Genehmigungsmodus wiederhergestellt.",
|
|
1395
1396
|
"Enabled plan mode. The agent will analyze and plan without executing tools.": "Plan-Modus aktiviert. Der Agent analysiert und plant, ohne Werkzeuge auszuf\xFChren.",
|
|
1396
1397
|
'Already in plan mode. Use "/plan exit" to exit plan mode.': 'Bereits im Plan-Modus. Verwenden Sie "/plan exit", um den Plan-Modus zu verlassen.',
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
|
-
ChannelBase
|
|
5
|
-
|
|
4
|
+
ChannelBase,
|
|
5
|
+
isTerminalTaskLifecycleType
|
|
6
|
+
} from "./chunk-7DMQRPC7.js";
|
|
6
7
|
import "./chunk-UFC57OYT.js";
|
|
7
8
|
import "./chunk-K5PGHDBN.js";
|
|
8
9
|
import {
|
|
@@ -9852,21 +9853,59 @@ var TelegramChannel = class extends ChannelBase {
|
|
|
9852
9853
|
}
|
|
9853
9854
|
/** Per-chat typing interval — repeats every 4s since Telegram expires it after 5s. */
|
|
9854
9855
|
typingIntervals = /* @__PURE__ */ new Map();
|
|
9855
|
-
|
|
9856
|
-
|
|
9857
|
-
|
|
9858
|
-
|
|
9859
|
-
|
|
9860
|
-
}
|
|
9861
|
-
|
|
9862
|
-
|
|
9856
|
+
activeTypingSessions = /* @__PURE__ */ new Map();
|
|
9857
|
+
sendTyping(chatId) {
|
|
9858
|
+
try {
|
|
9859
|
+
void this.bot.api.sendChatAction(chatId, "typing").catch(() => {
|
|
9860
|
+
});
|
|
9861
|
+
} catch {
|
|
9862
|
+
}
|
|
9863
|
+
}
|
|
9864
|
+
startTyping(chatId, sessionId = chatId) {
|
|
9865
|
+
const sessions = this.activeTypingSessions.get(chatId) ?? /* @__PURE__ */ new Set();
|
|
9866
|
+
sessions.add(sessionId);
|
|
9867
|
+
this.activeTypingSessions.set(chatId, sessions);
|
|
9868
|
+
if (this.typingIntervals.has(chatId))
|
|
9869
|
+
return;
|
|
9870
|
+
this.sendTyping(chatId);
|
|
9871
|
+
this.typingIntervals.set(chatId, setInterval(() => this.sendTyping(chatId), 4e3));
|
|
9863
9872
|
}
|
|
9864
|
-
|
|
9873
|
+
stopTyping(chatId, sessionId = chatId) {
|
|
9874
|
+
const sessions = this.activeTypingSessions.get(chatId);
|
|
9875
|
+
if (sessions) {
|
|
9876
|
+
sessions.delete(sessionId);
|
|
9877
|
+
if (sessions.size > 0)
|
|
9878
|
+
return;
|
|
9879
|
+
this.activeTypingSessions.delete(chatId);
|
|
9880
|
+
}
|
|
9865
9881
|
const interval = this.typingIntervals.get(chatId);
|
|
9866
|
-
if (interval)
|
|
9867
|
-
|
|
9868
|
-
|
|
9882
|
+
if (!interval)
|
|
9883
|
+
return;
|
|
9884
|
+
clearInterval(interval);
|
|
9885
|
+
this.typingIntervals.delete(chatId);
|
|
9886
|
+
}
|
|
9887
|
+
onTaskLifecycle(event) {
|
|
9888
|
+
if (event.type === "started") {
|
|
9889
|
+
this.startTyping(event.chatId, event.sessionId);
|
|
9890
|
+
return;
|
|
9891
|
+
}
|
|
9892
|
+
if (isTerminalTaskLifecycleType(event.type)) {
|
|
9893
|
+
this.stopTyping(event.chatId, event.sessionId);
|
|
9894
|
+
}
|
|
9895
|
+
}
|
|
9896
|
+
onPromptStart(chatId, sessionId) {
|
|
9897
|
+
this.startTyping(chatId, sessionId);
|
|
9898
|
+
}
|
|
9899
|
+
onPromptEnd(chatId, sessionId) {
|
|
9900
|
+
this.stopTyping(chatId, sessionId);
|
|
9901
|
+
}
|
|
9902
|
+
onSessionDied(sessionId) {
|
|
9903
|
+
for (const [chatId, sessions] of this.activeTypingSessions) {
|
|
9904
|
+
if (sessions.has(sessionId)) {
|
|
9905
|
+
this.stopTyping(chatId, sessionId);
|
|
9906
|
+
}
|
|
9869
9907
|
}
|
|
9908
|
+
super.onSessionDied(sessionId);
|
|
9870
9909
|
}
|
|
9871
9910
|
async sendMessage(chatId, text) {
|
|
9872
9911
|
await this.sendTelegramMessage(chatId, text);
|
|
@@ -9891,6 +9930,7 @@ var TelegramChannel = class extends ChannelBase {
|
|
|
9891
9930
|
clearInterval(interval);
|
|
9892
9931
|
}
|
|
9893
9932
|
this.typingIntervals.clear();
|
|
9933
|
+
this.activeTypingSessions.clear();
|
|
9894
9934
|
this.bot.stop();
|
|
9895
9935
|
}
|
|
9896
9936
|
buildEnvelope(msg, text, entities) {
|
|
@@ -10,8 +10,9 @@ import {
|
|
|
10
10
|
} from "./chunk-3HX5LZ6R.js";
|
|
11
11
|
import "./chunk-7RYW5LQV.js";
|
|
12
12
|
import {
|
|
13
|
-
ChannelBase
|
|
14
|
-
|
|
13
|
+
ChannelBase,
|
|
14
|
+
isTerminalTaskLifecycleType
|
|
15
|
+
} from "./chunk-7DMQRPC7.js";
|
|
15
16
|
import "./chunk-UFC57OYT.js";
|
|
16
17
|
import "./chunk-K5PGHDBN.js";
|
|
17
18
|
import {
|
|
@@ -92566,7 +92567,11 @@ function splitByTables(text) {
|
|
|
92566
92567
|
__name(splitByTables, "splitByTables");
|
|
92567
92568
|
function buildCardContent(markdown, options) {
|
|
92568
92569
|
const elements = [];
|
|
92569
|
-
const
|
|
92570
|
+
const statusLabel = options?.statusLabel ?? (options?.isStreaming ? "\u751F\u6210\u4E2D..." : void 0);
|
|
92571
|
+
const contentMd = statusLabel ? `${markdown}
|
|
92572
|
+
|
|
92573
|
+
---
|
|
92574
|
+
*${statusLabel}*` : markdown;
|
|
92570
92575
|
const threshold = options?.collapsibleThreshold || 500;
|
|
92571
92576
|
if (options?.collapsible && !options?.isStreaming && markdown.length > threshold) {
|
|
92572
92577
|
const previewEnd = markdown.indexOf("\n", 200);
|
|
@@ -92588,9 +92593,13 @@ function buildCardContent(markdown, options) {
|
|
|
92588
92593
|
}
|
|
92589
92594
|
const preview = markdown.slice(0, splitAt);
|
|
92590
92595
|
const rest = markdown.slice(splitAt);
|
|
92596
|
+
const previewContent = statusLabel ? `${preview}
|
|
92597
|
+
|
|
92598
|
+
---
|
|
92599
|
+
*${statusLabel}*` : preview;
|
|
92591
92600
|
elements.push({
|
|
92592
92601
|
tag: "markdown",
|
|
92593
|
-
content:
|
|
92602
|
+
content: previewContent
|
|
92594
92603
|
});
|
|
92595
92604
|
elements.push({
|
|
92596
92605
|
tag: "collapsible_panel",
|
|
@@ -92765,6 +92774,28 @@ __name(downloadMedia, "downloadMedia");
|
|
|
92765
92774
|
// packages/channels/feishu/dist/FeishuAdapter.js
|
|
92766
92775
|
var DEDUP_TTL_MS = 5 * 60 * 1e3;
|
|
92767
92776
|
var CARD_UPDATE_INTERVAL_MS = 1500;
|
|
92777
|
+
var FEISHU_RUNNING_STATUS_LABEL = "\u8FD0\u884C\u4E2D...";
|
|
92778
|
+
var FEISHU_STOPPED_STATUS_LABEL = "\u5DF2\u505C\u6B62\u751F\u6210";
|
|
92779
|
+
var FEISHU_STOP_FAILED_STATUS_LABEL = "\u505C\u6B62\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5";
|
|
92780
|
+
var FEISHU_TRUNCATED_STATUS_LABEL = "\u5185\u5BB9\u8FC7\u957F\uFF0C\u5DF2\u622A\u65AD";
|
|
92781
|
+
var FEISHU_TERMINAL_STATUS_LABELS = {
|
|
92782
|
+
completed: "\u5DF2\u5B8C\u6210",
|
|
92783
|
+
cancelled: "\u5DF2\u53D6\u6D88",
|
|
92784
|
+
failed: "\u5DF2\u5931\u8D25\uFF0C\u8BF7\u91CD\u8BD5"
|
|
92785
|
+
};
|
|
92786
|
+
var FEISHU_STATUS_STRINGS = [
|
|
92787
|
+
"\u751F\u6210\u4E2D...",
|
|
92788
|
+
FEISHU_RUNNING_STATUS_LABEL,
|
|
92789
|
+
FEISHU_TERMINAL_STATUS_LABELS.completed,
|
|
92790
|
+
FEISHU_TERMINAL_STATUS_LABELS.cancelled,
|
|
92791
|
+
FEISHU_TERMINAL_STATUS_LABELS.failed,
|
|
92792
|
+
FEISHU_STOPPED_STATUS_LABEL,
|
|
92793
|
+
FEISHU_STOP_FAILED_STATUS_LABEL,
|
|
92794
|
+
FEISHU_TRUNCATED_STATUS_LABEL
|
|
92795
|
+
];
|
|
92796
|
+
var escapeRegExp = /* @__PURE__ */ __name((value) => value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), "escapeRegExp");
|
|
92797
|
+
var FEISHU_STATUS_LABELS = `(?:${FEISHU_STATUS_STRINGS.map(escapeRegExp).join("|")})`;
|
|
92798
|
+
var FEISHU_STATUS_BLOCK_RE = new RegExp(`(?:^|\\n)---\\n\\*${FEISHU_STATUS_LABELS}\\*(?=\\n|$)`, "g");
|
|
92768
92799
|
var BASE_URL2 = "https://open.feishu.cn/open-apis";
|
|
92769
92800
|
var FEISHU_ID_RE2 = /^[a-zA-Z0-9_.:-]+$/;
|
|
92770
92801
|
var FeishuChannel = class extends ChannelBase {
|
|
@@ -93119,7 +93150,7 @@ var FeishuChannel = class extends ChannelBase {
|
|
|
93119
93150
|
}
|
|
93120
93151
|
}
|
|
93121
93152
|
let text = lines.join("\n").trim();
|
|
93122
|
-
text = text.replace(
|
|
93153
|
+
text = text.replace(FEISHU_STATUS_BLOCK_RE, "");
|
|
93123
93154
|
text = text.replace(/^好的,<at[^>]*><\/at>\s*\n*/, "");
|
|
93124
93155
|
return text.trim() || void 0;
|
|
93125
93156
|
}
|
|
@@ -93239,6 +93270,7 @@ var FeishuChannel = class extends ChannelBase {
|
|
|
93239
93270
|
title: cardTitle,
|
|
93240
93271
|
showStopButton: true,
|
|
93241
93272
|
isStreaming: true,
|
|
93273
|
+
statusLabel: this.statusLabelFor(),
|
|
93242
93274
|
collapsible: this.collapsible,
|
|
93243
93275
|
collapsibleThreshold: this.collapsibleThreshold
|
|
93244
93276
|
});
|
|
@@ -93274,7 +93306,7 @@ var FeishuChannel = class extends ChannelBase {
|
|
|
93274
93306
|
return { messageId: "", success: false };
|
|
93275
93307
|
}
|
|
93276
93308
|
}
|
|
93277
|
-
async updateCard(messageId, text, finished = false, inboundMsgId) {
|
|
93309
|
+
async updateCard(messageId, text, finished = false, inboundMsgId, statusLabel) {
|
|
93278
93310
|
const token = await this.getTenantAccessToken();
|
|
93279
93311
|
if (!token)
|
|
93280
93312
|
return false;
|
|
@@ -93283,6 +93315,7 @@ var FeishuChannel = class extends ChannelBase {
|
|
|
93283
93315
|
title: cardTitle,
|
|
93284
93316
|
showStopButton: !finished,
|
|
93285
93317
|
isStreaming: !finished,
|
|
93318
|
+
statusLabel: statusLabel ?? (!finished ? this.statusLabelFor() : void 0),
|
|
93286
93319
|
collapsible: this.collapsible,
|
|
93287
93320
|
collapsibleThreshold: this.collapsibleThreshold
|
|
93288
93321
|
});
|
|
@@ -93399,10 +93432,7 @@ ${cs.accumulatedText}` : cs.accumulatedText;
|
|
|
93399
93432
|
}
|
|
93400
93433
|
if (result.success) {
|
|
93401
93434
|
const prefix = cs.atPrefix || this.msgToSenderName.get(inboundMsgId) || "";
|
|
93402
|
-
|
|
93403
|
-
|
|
93404
|
-
*\u5DF2\u505C\u6B62\u751F\u6210*` : "*\u5DF2\u505C\u6B62\u751F\u6210*";
|
|
93405
|
-
this.updateCard(result.messageId, stopText, true, inboundMsgId).catch(() => {
|
|
93435
|
+
this.updateCard(result.messageId, prefix, true, inboundMsgId, this.stopLabelFor(cs.terminalStatus, cs.userStopped ?? false)).catch(() => {
|
|
93406
93436
|
});
|
|
93407
93437
|
}
|
|
93408
93438
|
cs.creating = false;
|
|
@@ -93461,6 +93491,62 @@ ${cs.accumulatedText}` : cs.accumulatedText;
|
|
|
93461
93491
|
}, delay);
|
|
93462
93492
|
}
|
|
93463
93493
|
}
|
|
93494
|
+
isKnownInboundMessageId(messageId) {
|
|
93495
|
+
return this.msgToQuestion.has(messageId) || this.msgToSenderName.has(messageId) || this.msgToSenderId.has(messageId) || this.cardSessions.has(messageId) || this.stoppedMessages.has(messageId);
|
|
93496
|
+
}
|
|
93497
|
+
knownInboundMessageId(sessionId, messageId) {
|
|
93498
|
+
if (messageId && this.isKnownInboundMessageId(messageId)) {
|
|
93499
|
+
return messageId;
|
|
93500
|
+
}
|
|
93501
|
+
const mapped = this.sessionToInboundMsg.get(sessionId);
|
|
93502
|
+
return mapped && this.isKnownInboundMessageId(mapped) ? mapped : void 0;
|
|
93503
|
+
}
|
|
93504
|
+
statusLabelFor(terminalStatus) {
|
|
93505
|
+
return terminalStatus === void 0 ? FEISHU_RUNNING_STATUS_LABEL : FEISHU_TERMINAL_STATUS_LABELS[terminalStatus];
|
|
93506
|
+
}
|
|
93507
|
+
stopLabelFor(terminalStatus, userInitiated = false) {
|
|
93508
|
+
if (userInitiated || terminalStatus === void 0) {
|
|
93509
|
+
return FEISHU_STOPPED_STATUS_LABEL;
|
|
93510
|
+
}
|
|
93511
|
+
return this.statusLabelFor(terminalStatus);
|
|
93512
|
+
}
|
|
93513
|
+
async finalizeStoppedCardUpdate(inboundMsgId, cardState, chatId) {
|
|
93514
|
+
if (!cardState || !cardState.stopped && !this.stoppedMessages.has(inboundMsgId)) {
|
|
93515
|
+
return false;
|
|
93516
|
+
}
|
|
93517
|
+
if (cardState.created && cardState.messageId) {
|
|
93518
|
+
const prefix = cardState.atPrefix || this.msgToSenderName.get(inboundMsgId) || "";
|
|
93519
|
+
const stopLabel = `*${this.stopLabelFor(cardState.terminalStatus, this.stoppedMessages.has(inboundMsgId))}*`;
|
|
93520
|
+
const contentPart = cardState.accumulatedText.trim() ? cardState.accumulatedText + "\n\n---\n" + stopLabel : stopLabel;
|
|
93521
|
+
const finalText = prefix ? `${prefix}
|
|
93522
|
+
|
|
93523
|
+
${contentPart}` : contentPart;
|
|
93524
|
+
const updated = await this.updateCard(cardState.messageId, finalText, true, inboundMsgId);
|
|
93525
|
+
if (!updated) {
|
|
93526
|
+
await this.deleteCard(cardState.messageId);
|
|
93527
|
+
await this.sendMessage(chatId, finalText);
|
|
93528
|
+
}
|
|
93529
|
+
}
|
|
93530
|
+
this.cleanupCard(inboundMsgId);
|
|
93531
|
+
this.stoppedMessages.delete(inboundMsgId);
|
|
93532
|
+
return true;
|
|
93533
|
+
}
|
|
93534
|
+
onTaskLifecycle(event) {
|
|
93535
|
+
if (!isTerminalTaskLifecycleType(event.type)) {
|
|
93536
|
+
return;
|
|
93537
|
+
}
|
|
93538
|
+
const inboundMsgId = this.knownInboundMessageId(event.sessionId, event.messageId);
|
|
93539
|
+
if (!inboundMsgId)
|
|
93540
|
+
return;
|
|
93541
|
+
const cardState = this.cardSessions.get(inboundMsgId);
|
|
93542
|
+
if (!cardState)
|
|
93543
|
+
return;
|
|
93544
|
+
if (cardState.terminalStatus && cardState.terminalStatus !== event.type) {
|
|
93545
|
+
process.stderr.write(`[Feishu:${this.name}] conflicting terminal event ${event.type} after ${cardState.terminalStatus} for inbound=${inboundMsgId}
|
|
93546
|
+
`);
|
|
93547
|
+
}
|
|
93548
|
+
cardState.terminalStatus ??= event.type;
|
|
93549
|
+
}
|
|
93464
93550
|
async onResponseComplete(chatId, fullText, sessionId) {
|
|
93465
93551
|
const inboundMsgId = this.sessionToInboundMsg.get(sessionId);
|
|
93466
93552
|
if (!inboundMsgId) {
|
|
@@ -93481,14 +93567,19 @@ ${cs.accumulatedText}` : cs.accumulatedText;
|
|
|
93481
93567
|
let displayText = atSender ? `${atSender}
|
|
93482
93568
|
|
|
93483
93569
|
${fullText}` : fullText;
|
|
93570
|
+
const completedLabel = this.statusLabelFor("completed");
|
|
93571
|
+
const completedSuffix = `
|
|
93572
|
+
|
|
93573
|
+
---
|
|
93574
|
+
*${completedLabel}*`;
|
|
93484
93575
|
const MAX_FINAL_CARD_CHARS = 2e4;
|
|
93485
|
-
if (displayText.length > MAX_FINAL_CARD_CHARS) {
|
|
93576
|
+
if (displayText.length + completedSuffix.length > MAX_FINAL_CARD_CHARS) {
|
|
93486
93577
|
const prefix = atSender ? `${atSender}
|
|
93487
93578
|
|
|
93488
93579
|
` : "";
|
|
93489
93580
|
const suffix = "\n\n_(\u5185\u5BB9\u8FC7\u957F\uFF0C\u5DF2\u622A\u65AD\u65E9\u671F\u5185\u5BB9)_";
|
|
93490
93581
|
const fenceReserve = 4;
|
|
93491
|
-
const maxBody = MAX_FINAL_CARD_CHARS - prefix.length - suffix.length - fenceReserve;
|
|
93582
|
+
const maxBody = MAX_FINAL_CARD_CHARS - prefix.length - suffix.length - completedSuffix.length - fenceReserve;
|
|
93492
93583
|
displayText = prefix + fullText.slice(-maxBody) + suffix;
|
|
93493
93584
|
if (this.countFences(displayText) % 2 === 1) {
|
|
93494
93585
|
displayText = "```\n" + displayText;
|
|
@@ -93527,15 +93618,24 @@ ${fullText}` : fullText;
|
|
|
93527
93618
|
return;
|
|
93528
93619
|
}
|
|
93529
93620
|
if (cardState?.created) {
|
|
93530
|
-
const updated = await this.updateCard(cardState.messageId, displayText, true, inboundMsgId);
|
|
93621
|
+
const updated = await this.updateCard(cardState.messageId, displayText, true, inboundMsgId, completedLabel);
|
|
93622
|
+
if (await this.finalizeStoppedCardUpdate(inboundMsgId, cardState, chatId)) {
|
|
93623
|
+
return;
|
|
93624
|
+
}
|
|
93531
93625
|
if (!updated) {
|
|
93532
93626
|
const noTableText = this.stripTables(displayText, "(\u8868\u683C\u5185\u5BB9\u8BF7\u67E5\u770B\u539F\u6587)");
|
|
93533
|
-
const retried = await this.updateCard(cardState.messageId, noTableText, true, inboundMsgId);
|
|
93627
|
+
const retried = await this.updateCard(cardState.messageId, noTableText, true, inboundMsgId, completedLabel);
|
|
93628
|
+
if (await this.finalizeStoppedCardUpdate(inboundMsgId, cardState, chatId)) {
|
|
93629
|
+
return;
|
|
93630
|
+
}
|
|
93534
93631
|
if (!retried) {
|
|
93535
93632
|
let truncated = displayText.slice(0, 2e3);
|
|
93536
93633
|
if (this.countFences(truncated) % 2 === 1)
|
|
93537
93634
|
truncated += "\n```";
|
|
93538
|
-
const lastResort = await this.updateCard(cardState.messageId, truncated + "\n\n---\n*\u5185\u5BB9\u8FC7\u957F\uFF0C\u5DF2\u622A\u65AD*", true, inboundMsgId);
|
|
93635
|
+
const lastResort = await this.updateCard(cardState.messageId, truncated + "\n\n---\n*\u5185\u5BB9\u8FC7\u957F\uFF0C\u5DF2\u622A\u65AD*", true, inboundMsgId, completedLabel);
|
|
93636
|
+
if (await this.finalizeStoppedCardUpdate(inboundMsgId, cardState, chatId)) {
|
|
93637
|
+
return;
|
|
93638
|
+
}
|
|
93539
93639
|
if (!lastResort) {
|
|
93540
93640
|
await this.deleteCard(cardState.messageId);
|
|
93541
93641
|
this.cleanupCard(inboundMsgId);
|
|
@@ -93551,7 +93651,10 @@ ${fullText}` : fullText);
|
|
|
93551
93651
|
}
|
|
93552
93652
|
const result = await this.createStreamingCard(chatId, displayText, void 0, inboundMsgId);
|
|
93553
93653
|
if (result.success) {
|
|
93554
|
-
const finalized = await this.updateCard(result.messageId, displayText, true, inboundMsgId);
|
|
93654
|
+
const finalized = await this.updateCard(result.messageId, displayText, true, inboundMsgId, completedLabel);
|
|
93655
|
+
if (await this.finalizeStoppedCardUpdate(inboundMsgId, cardState, chatId)) {
|
|
93656
|
+
return;
|
|
93657
|
+
}
|
|
93555
93658
|
if (finalized) {
|
|
93556
93659
|
this.cleanupCard(inboundMsgId);
|
|
93557
93660
|
return;
|
|
@@ -93564,14 +93667,15 @@ ${fullText}` : fullText);
|
|
|
93564
93667
|
${fullText}` : fullText);
|
|
93565
93668
|
}
|
|
93566
93669
|
onPromptStart(chatId, sessionId, messageId) {
|
|
93567
|
-
|
|
93568
|
-
|
|
93569
|
-
this.
|
|
93670
|
+
const inboundMsgId = messageId && this.isKnownInboundMessageId(messageId) ? messageId : void 0;
|
|
93671
|
+
if (inboundMsgId) {
|
|
93672
|
+
this.sessionToInboundMsg.set(sessionId, inboundMsgId);
|
|
93673
|
+
this.addReaction(inboundMsgId, "OnIt").catch(() => {
|
|
93570
93674
|
});
|
|
93571
93675
|
if (this.config.blockStreaming === "on")
|
|
93572
93676
|
return;
|
|
93573
|
-
if (!this.cardSessions.has(
|
|
93574
|
-
const atSender = this.msgToSenderName.get(
|
|
93677
|
+
if (!this.cardSessions.has(inboundMsgId)) {
|
|
93678
|
+
const atSender = this.msgToSenderName.get(inboundMsgId) || "";
|
|
93575
93679
|
const placeholderText = atSender ? `${atSender}\uFF0C\u601D\u8003\u4E2D...` : "\u601D\u8003\u4E2D...";
|
|
93576
93680
|
const cardState = {
|
|
93577
93681
|
messageId: "",
|
|
@@ -93581,9 +93685,9 @@ ${fullText}` : fullText);
|
|
|
93581
93685
|
accumulatedText: "",
|
|
93582
93686
|
lastUpdateAt: Date.now()
|
|
93583
93687
|
};
|
|
93584
|
-
this.cardSessions.set(
|
|
93585
|
-
this.createStreamingCard(chatId, placeholderText, void 0,
|
|
93586
|
-
if (cardState.stopped || this.stoppedMessages.has(
|
|
93688
|
+
this.cardSessions.set(inboundMsgId, cardState);
|
|
93689
|
+
this.createStreamingCard(chatId, placeholderText, void 0, inboundMsgId).then((result) => {
|
|
93690
|
+
if (cardState.stopped || this.stoppedMessages.has(inboundMsgId)) {
|
|
93587
93691
|
if (cardState.abandoned) {
|
|
93588
93692
|
if (result.success) {
|
|
93589
93693
|
this.deleteCard(result.messageId).catch((err) => {
|
|
@@ -93595,15 +93699,12 @@ ${fullText}` : fullText);
|
|
|
93595
93699
|
return;
|
|
93596
93700
|
}
|
|
93597
93701
|
if (result.success) {
|
|
93598
|
-
const prefix = cardState.atPrefix || this.msgToSenderName.get(
|
|
93599
|
-
|
|
93600
|
-
|
|
93601
|
-
*\u5DF2\u505C\u6B62\u751F\u6210*` : "*\u5DF2\u505C\u6B62\u751F\u6210*";
|
|
93602
|
-
this.updateCard(result.messageId, stopText, true, messageId).catch(() => {
|
|
93702
|
+
const prefix = cardState.atPrefix || this.msgToSenderName.get(inboundMsgId) || "";
|
|
93703
|
+
this.updateCard(result.messageId, prefix, true, inboundMsgId, this.stopLabelFor(cardState.terminalStatus, cardState.userStopped ?? false)).catch(() => {
|
|
93603
93704
|
});
|
|
93604
93705
|
}
|
|
93605
93706
|
cardState.creating = false;
|
|
93606
|
-
this.cleanupCard(
|
|
93707
|
+
this.cleanupCard(inboundMsgId);
|
|
93607
93708
|
return;
|
|
93608
93709
|
}
|
|
93609
93710
|
if (result.success) {
|
|
@@ -93618,18 +93719,16 @@ ${fullText}` : fullText);
|
|
|
93618
93719
|
process.stderr.write(`[Feishu:${this.name}] Processing card error: ${err}
|
|
93619
93720
|
`);
|
|
93620
93721
|
cardState.creating = false;
|
|
93621
|
-
this.cleanupCard(
|
|
93722
|
+
this.cleanupCard(inboundMsgId);
|
|
93622
93723
|
});
|
|
93623
93724
|
}
|
|
93624
93725
|
}
|
|
93625
93726
|
}
|
|
93626
93727
|
async onPromptEnd(_chatId, sessionId, messageId) {
|
|
93627
|
-
|
|
93628
|
-
this.removeReaction(messageId, "OnIt").catch(() => {
|
|
93629
|
-
});
|
|
93630
|
-
}
|
|
93631
|
-
const inboundMsgId = messageId || this.sessionToInboundMsg.get(sessionId);
|
|
93728
|
+
const inboundMsgId = this.knownInboundMessageId(sessionId, messageId);
|
|
93632
93729
|
if (inboundMsgId) {
|
|
93730
|
+
this.removeReaction(inboundMsgId, "OnIt").catch(() => {
|
|
93731
|
+
});
|
|
93633
93732
|
const cs = this.cardSessions.get(inboundMsgId);
|
|
93634
93733
|
if (cs && !cs.stopped && !cs.completed) {
|
|
93635
93734
|
if (cs.creating) {
|
|
@@ -93637,13 +93736,12 @@ ${fullText}` : fullText);
|
|
|
93637
93736
|
} else if (cs.created) {
|
|
93638
93737
|
cs.stopped = true;
|
|
93639
93738
|
const atPrefix = this.msgToSenderName.get(inboundMsgId) || "";
|
|
93640
|
-
const
|
|
93641
|
-
const
|
|
93739
|
+
const terminalStatus = cs.terminalStatus ?? (cs.cancelling ? "cancelled" : "failed");
|
|
93740
|
+
const terminalLabel = this.stopLabelFor(terminalStatus, cs.userStopped ?? false);
|
|
93741
|
+
const text = cs.accumulatedText ? atPrefix ? `${atPrefix}
|
|
93642
93742
|
|
|
93643
|
-
${cs.accumulatedText}` : cs.accumulatedText
|
|
93644
|
-
|
|
93645
|
-
` : "") + errorLabel;
|
|
93646
|
-
await this.updateCard(cs.messageId, text, true, inboundMsgId).catch(() => {
|
|
93743
|
+
${cs.accumulatedText}` : cs.accumulatedText : atPrefix || "";
|
|
93744
|
+
await this.updateCard(cs.messageId, text, true, inboundMsgId, terminalLabel).catch(() => {
|
|
93647
93745
|
});
|
|
93648
93746
|
this.cleanupCard(inboundMsgId);
|
|
93649
93747
|
} else {
|
|
@@ -93656,9 +93754,10 @@ ${cs.accumulatedText}` : cs.accumulatedText;
|
|
|
93656
93754
|
});
|
|
93657
93755
|
} else {
|
|
93658
93756
|
const atPrefix = this.msgToSenderName.get(inboundMsgId) || "";
|
|
93757
|
+
const fallbackLabel = cs.terminalStatus ? this.statusLabelFor(cs.terminalStatus) : "\u51FA\u9519\u4E86\uFF0C\u8BF7\u91CD\u8BD5";
|
|
93659
93758
|
const errorText = atPrefix ? `${atPrefix}
|
|
93660
93759
|
|
|
93661
|
-
|
|
93760
|
+
*${fallbackLabel}*` : `*${fallbackLabel}*`;
|
|
93662
93761
|
this.sendMessage(_chatId, errorText).catch(() => {
|
|
93663
93762
|
});
|
|
93664
93763
|
process.stderr.write(`[Feishu:${this.name}] onPromptEnd: no card and no accumulated text for inbound=${inboundMsgId}, sent error fallback
|
|
@@ -93780,34 +93879,34 @@ ${cs.accumulatedText}` : cs.accumulatedText;
|
|
|
93780
93879
|
}
|
|
93781
93880
|
const inboundId = targetInboundMsgId;
|
|
93782
93881
|
const handleStop = /* @__PURE__ */ __name(async () => {
|
|
93783
|
-
|
|
93784
|
-
|
|
93785
|
-
|
|
93786
|
-
cancelSucceeded = false;
|
|
93787
|
-
process.stderr.write(`[Feishu:${this.name}] cancelSession failed for msg=${inboundId}: ${err instanceof Error ? err.message : err}
|
|
93788
|
-
`);
|
|
93789
|
-
});
|
|
93790
|
-
}
|
|
93882
|
+
const wasUserStop = !cardState.terminalStatus;
|
|
93883
|
+
cardState.userStopped = wasUserStop;
|
|
93884
|
+
const cancelSucceeded = sessionId ? await this.requestActivePromptCancellation(sessionId, "cancel_command") : true;
|
|
93791
93885
|
if (cancelSucceeded) {
|
|
93792
93886
|
cardState.stopped = true;
|
|
93793
93887
|
cardState.cancelling = false;
|
|
93794
93888
|
this.stoppedMessages.add(inboundId);
|
|
93795
93889
|
} else {
|
|
93796
93890
|
cardState.cancelling = false;
|
|
93891
|
+
cardState.userStopped = false;
|
|
93797
93892
|
}
|
|
93798
93893
|
if (cardState.finalizing)
|
|
93799
93894
|
return;
|
|
93800
93895
|
if (cardState.created && cardState.messageId) {
|
|
93801
93896
|
const prefix = cardState.atPrefix || this.msgToSenderName.get(inboundId) || "";
|
|
93802
|
-
const stopLabel = cancelSucceeded ?
|
|
93803
|
-
const contentPart = cardState.accumulatedText.trim() ? cardState.accumulatedText
|
|
93804
|
-
const finalText = prefix ? `${prefix}
|
|
93897
|
+
const stopLabel = cancelSucceeded ? this.stopLabelFor(cardState.terminalStatus, wasUserStop) : FEISHU_STOP_FAILED_STATUS_LABEL;
|
|
93898
|
+
const contentPart = cardState.accumulatedText.trim() ? cardState.accumulatedText : "";
|
|
93899
|
+
const finalText = prefix ? contentPart ? `${prefix}
|
|
93805
93900
|
|
|
93806
|
-
${contentPart}` : contentPart;
|
|
93807
|
-
const updated = await this.updateCard(cardState.messageId, finalText, cancelSucceeded, inboundId);
|
|
93901
|
+
${contentPart}` : prefix : contentPart;
|
|
93902
|
+
const updated = await this.updateCard(cardState.messageId, finalText, cancelSucceeded, inboundId, stopLabel);
|
|
93808
93903
|
if (!updated && cancelSucceeded && chatId) {
|
|
93809
93904
|
await this.deleteCard(cardState.messageId);
|
|
93810
|
-
await this.sendMessage(chatId, finalText
|
|
93905
|
+
await this.sendMessage(chatId, finalText ? `${finalText}
|
|
93906
|
+
|
|
93907
|
+
---
|
|
93908
|
+
*${stopLabel}*` : `---
|
|
93909
|
+
*${stopLabel}*`);
|
|
93811
93910
|
}
|
|
93812
93911
|
}
|
|
93813
93912
|
}, "handleStop");
|