chainlesschain 0.162.95 → 0.162.97
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/bin/chainlesschain.js +8 -18
- package/package.json +1 -1
- package/src/assets/web-panel/assets/{AIOps-DLvvkb9x.js → AIOps-C1YvIYh5.js} +1 -1
- package/src/assets/web-panel/assets/{ActionButton-BxhQTwqd.js → ActionButton-jqcXEakj.js} +1 -1
- package/src/assets/web-panel/assets/{Analytics-C4oUXzhG.js → Analytics-C8Xwqd3_.js} +3 -3
- package/src/assets/web-panel/assets/{AppLayout-CjzKJdv3.js → AppLayout-Dx5ypTfA.js} +5 -5
- package/src/assets/web-panel/assets/{Audit-B-MrugUs.js → Audit-1GZ4Tv2f.js} +1 -1
- package/src/assets/web-panel/assets/{Backup-ecIfEpIZ.js → Backup-CexR2hyk.js} +1 -1
- package/src/assets/web-panel/assets/{BaseInput-BUcSfWnx.js → BaseInput-DwAruKdy.js} +1 -1
- package/src/assets/web-panel/assets/{Chat-DIc1n_Lk.js → Chat-W2FkU5BY.js} +6 -6
- package/src/assets/web-panel/assets/{ChatBubbleRenderer-BGzg7oVA.js → ChatBubbleRenderer-BCLnhLfu.js} +1 -1
- package/src/assets/web-panel/assets/{Checkbox-BQ3Ueff-.js → Checkbox-Dkh5JY5B.js} +1 -1
- package/src/assets/web-panel/assets/{Codegen-CvSGLnqE.js → Codegen-LfYOgsdA.js} +1 -1
- package/src/assets/web-panel/assets/{Col-Br9IXZcE.js → Col-DEgketAC.js} +1 -1
- package/src/assets/web-panel/assets/{Community-tPuLOf0r.js → Community-LeFQMaZm.js} +1 -1
- package/src/assets/web-panel/assets/{Compact-vMWH73BE.js → Compact-CrlKYvBc.js} +1 -1
- package/src/assets/web-panel/assets/{Compliance-Ct9z699x.js → Compliance-ca_4PGYF.js} +1 -1
- package/src/assets/web-panel/assets/{Cowork-Bxs1kL1y.js → Cowork-BcMWqh2a.js} +3 -3
- package/src/assets/web-panel/assets/{Cron-QEpr2k4U.js → Cron-pVVEA3dw.js} +2 -2
- package/src/assets/web-panel/assets/{Crosschain-u4xbUw6O.js → Crosschain-CiKSGTqp.js} +1 -1
- package/src/assets/web-panel/assets/{DID-DXTEvyrW.js → DID-B2bGzdOj.js} +2 -2
- package/src/assets/web-panel/assets/{Dashboard-C4pZgzkg.js → Dashboard-sQ6jcgCn.js} +2 -2
- package/src/assets/web-panel/assets/{Dropdown-LRuqREGe.js → Dropdown-rFx_8P04.js} +1 -1
- package/src/assets/web-panel/assets/{EmailListRenderer-D7XI1yBM.js → EmailListRenderer-smw2hh6f.js} +1 -1
- package/src/assets/web-panel/assets/{FamilyGuardDashboard-3y_SuAMQ.js → FamilyGuardDashboard-CZhg2_S2.js} +1 -1
- package/src/assets/web-panel/assets/{Federation-DbjbJJCW.js → Federation-DQE-368G.js} +1 -1
- package/src/assets/web-panel/assets/{FormItemContext-WPpMZcUw.js → FormItemContext-2XPb9izr.js} +1 -1
- package/src/assets/web-panel/assets/{GenericCardRenderer-nNT9Tn4E.js → GenericCardRenderer-DCGMz5E6.js} +1 -1
- package/src/assets/web-panel/assets/{Git-DqDaVzwV.js → Git-BFwrxK4Q.js} +2 -2
- package/src/assets/web-panel/assets/{Governance-BquBZpcg.js → Governance-ChxBRwG1.js} +1 -1
- package/src/assets/web-panel/assets/{Inference-RcPPYijs.js → Inference-C7kyknu_.js} +1 -1
- package/src/assets/web-panel/assets/{KnowledgeGraph-ByXfZV13.js → KnowledgeGraph-BsMd4XAt.js} +1 -1
- package/src/assets/web-panel/assets/{Logs-CHT3DUcq.js → Logs-Bs3yrpow.js} +2 -2
- package/src/assets/web-panel/assets/{Marketplace-Bi0HJ9pN.js → Marketplace-Cc29jdBv.js} +1 -1
- package/src/assets/web-panel/assets/{McpTools-QCBxPRRc.js → McpTools-zYpYsUsl.js} +4 -4
- package/src/assets/web-panel/assets/{Memory-D4RlxGXn.js → Memory-x9r4yKtS.js} +2 -2
- package/src/assets/web-panel/assets/{MobileBridge-CU_PV7e-.js → MobileBridge-CjUo8prx.js} +2 -2
- package/src/assets/web-panel/assets/{MobileProjects-c1CMFD8z.js → MobileProjects-Cmz4wVrF.js} +1 -1
- package/src/assets/web-panel/assets/{Mtc-BezDB1-s.js → Mtc-Y-SBnNxm.js} +5 -5
- package/src/assets/web-panel/assets/{MtcAudit-CgLpiHpE.js → MtcAudit-ogiKnrxj.js} +2 -2
- package/src/assets/web-panel/assets/{Multisig-vx6bz-bA.js → Multisig-C1hygkFR.js} +3 -3
- package/src/assets/web-panel/assets/{NLProgramming-CGOagg3-.js → NLProgramming-fWWYiTsY.js} +1 -1
- package/src/assets/web-panel/assets/{Notes-BcuDGYRS.js → Notes-CkCNF4gC.js} +3 -3
- package/src/assets/web-panel/assets/{NotificationSettings-ZAGCDUpc.js → NotificationSettings-DThB7WQG.js} +1 -1
- package/src/assets/web-panel/assets/{OrderTableRenderer-B5onE0eX.js → OrderTableRenderer-Dh64aMq6.js} +1 -1
- package/src/assets/web-panel/assets/{Organization-y_y20-5Y.js → Organization-BSY16zvP.js} +4 -4
- package/src/assets/web-panel/assets/{Overflow-BEICS31D.js → Overflow-C_TDh18K.js} +1 -1
- package/src/assets/web-panel/assets/{P2P-D_WRMzh4.js → P2P-CvxZk6og.js} +2 -2
- package/src/assets/web-panel/assets/PdhVaultBrowser-0JZ5JF4M.js +7 -0
- package/src/assets/web-panel/assets/{Permissions-3aqCc_4f.js → Permissions-DV8ubpjM.js} +4 -4
- package/src/assets/web-panel/assets/{PersonalDataHub-DT3R9g9Y.js → PersonalDataHub-g2Dgls8e.js} +2 -2
- package/src/assets/web-panel/assets/{Pipeline-MiMWIhw0.js → Pipeline-DGp8zQ0C.js} +1 -1
- package/src/assets/web-panel/assets/{Privacy-C3JsLuDa.js → Privacy-C0uHrjWR.js} +1 -1
- package/src/assets/web-panel/assets/{ProjectInit-EhHVi1ff.js → ProjectInit-2XGICaFt.js} +2 -2
- package/src/assets/web-panel/assets/{ProjectSettings-D_dNEA37.js → ProjectSettings-Cfy72e0Q.js} +2 -2
- package/src/assets/web-panel/assets/{Projects-CXydUXp8.js → Projects-Xsvk_kKT.js} +1 -1
- package/src/assets/web-panel/assets/{Providers-CPEhi2iZ.js → Providers-vuvDVg7U.js} +1 -1
- package/src/assets/web-panel/assets/{QuickAsk-BFQpMleX.js → QuickAsk-BUy7kPyQ.js} +1 -1
- package/src/assets/web-panel/assets/{Recommend-DzbovRC8.js → Recommend-DlzpC_JE.js} +1 -1
- package/src/assets/web-panel/assets/{Reputation-DoBeV3TD.js → Reputation-BiWFwPMh.js} +1 -1
- package/src/assets/web-panel/assets/{Row-DthhwX_B.js → Row-dmfZBK-k.js} +1 -1
- package/src/assets/web-panel/assets/{RssFeed-Dsf5U0lP.js → RssFeed-Cf6tlRKq.js} +2 -2
- package/src/assets/web-panel/assets/{Search-CJPB8kKl.js → Search-DhzXDRAJ.js} +1 -1
- package/src/assets/web-panel/assets/{Security-DI9MfpdD.js → Security-C-bTfgeJ.js} +3 -3
- package/src/assets/web-panel/assets/{Services-BdG0TFGf.js → Services-D3KNwBqu.js} +2 -2
- package/src/assets/web-panel/assets/{Skeleton-DSYazY_B.js → Skeleton-CHH8i1xY.js} +1 -1
- package/src/assets/web-panel/assets/{Skills-BD309VTT.js → Skills-DHiONX0z.js} +1 -1
- package/src/assets/web-panel/assets/{Sla-CaUlw4_6.js → Sla-DwWMb-Ui.js} +1 -1
- package/src/assets/web-panel/assets/{SpeechSettings-CZAPkR7H.js → SpeechSettings-DAq64iWB.js} +1 -1
- package/src/assets/web-panel/assets/{SyncSettings-CFRSowN3.js → SyncSettings-DJU-kHko.js} +2 -2
- package/src/assets/web-panel/assets/{Tasks-Di8EOluc.js → Tasks-RAIzA3u-.js} +1 -1
- package/src/assets/web-panel/assets/{Templates-B5FTziwi.js → Templates-By4cbadT.js} +1 -1
- package/src/assets/web-panel/assets/{Tenant-Dj3XYfBg.js → Tenant-kCAXsxWu.js} +1 -1
- package/src/assets/web-panel/assets/{Terminal-CznH_rJT.js → Terminal-D8pup_CO.js} +2 -2
- package/src/assets/web-panel/assets/{TimelineRenderer-DTHzaXPt.js → TimelineRenderer-Bk2c9TUI.js} +1 -1
- package/src/assets/web-panel/assets/{Tokens-Bo56nuML.js → Tokens-B0wTiZRa.js} +1 -1
- package/src/assets/web-panel/assets/{Trigger-pyVUVBwb.js → Trigger-Ca_9t0gk.js} +1 -1
- package/src/assets/web-panel/assets/{Trust-Cp7jMkKN.js → Trust-BnfNDDDm.js} +1 -1
- package/src/assets/web-panel/assets/{UkeySign-aPcZCdpz.js → UkeySign-fnlF2-Yr.js} +1 -1
- package/src/assets/web-panel/assets/{VideoEditing-DAv5j--w.js → VideoEditing-Cfshhzyw.js} +1 -1
- package/src/assets/web-panel/assets/{Wallet-DRhK7IDR.js → Wallet-BWMpDOLG.js} +4 -4
- package/src/assets/web-panel/assets/{WebAuthn-B2yQJuq8.js → WebAuthn-B6xeXZvw.js} +3 -3
- package/src/assets/web-panel/assets/{WorkflowEditor-D98DhR54.js → WorkflowEditor-Cb3-FPCE.js} +1 -1
- package/src/assets/web-panel/assets/{chat-BXrRNi8C.js → chat-CP_opuMK.js} +1 -1
- package/src/assets/web-panel/assets/{colors-jQ94T_qn.js → colors-RLzfjxRQ.js} +1 -1
- package/src/assets/web-panel/assets/{compact-item-KqUJLlF2.js → compact-item-BTRloNKV.js} +1 -1
- package/src/assets/web-panel/assets/{createContext-DxM3zuQW.js → createContext-gXgXTLlU.js} +1 -1
- package/src/assets/web-panel/assets/devWarning-CYlmApo_.js +1 -0
- package/src/assets/web-panel/assets/{hasIn-BGm946KV.js → hasIn-CrIpxkRC.js} +1 -1
- package/src/assets/web-panel/assets/{index-CbQvgx2e.js → index-AsI1SqnE.js} +1 -1
- package/src/assets/web-panel/assets/{index-C5NQai7O.js → index-B3L5vTSs.js} +1 -1
- package/src/assets/web-panel/assets/{index-Crw76vIF.js → index-B5sN_pwd.js} +1 -1
- package/src/assets/web-panel/assets/{index-1P0sXNhG.js → index-BEcRPNHv.js} +1 -1
- package/src/assets/web-panel/assets/{index-Ce-YoL4x.js → index-BVrcoJe2.js} +1 -1
- package/src/assets/web-panel/assets/{index-BaU_fSK7.js → index-BewxG36A.js} +1 -1
- package/src/assets/web-panel/assets/{index-BGjCjsf1.js → index-Bi87H9yk.js} +1 -1
- package/src/assets/web-panel/assets/{index-DZpVYD4j.js → index-Bl4OQ--4.js} +1 -1
- package/src/assets/web-panel/assets/{index-yavsyHif.js → index-BlE2lCS-.js} +1 -1
- package/src/assets/web-panel/assets/{index-B4b7KjRq.js → index-BlS91Ac0.js} +1 -1
- package/src/assets/web-panel/assets/{index-BbS0cBU9.js → index-Bm0cNeeQ.js} +1 -1
- package/src/assets/web-panel/assets/{index-LWTZAud0.js → index-Bo2Fl2j7.js} +1 -1
- package/src/assets/web-panel/assets/{index-DZMzj4ay.js → index-Bsz3X-aU.js} +1 -1
- package/src/assets/web-panel/assets/{index-DOYcemym.js → index-BurvDWMS.js} +1 -1
- package/src/assets/web-panel/assets/{index-T4UJiTi3.js → index-BzBLtthb.js} +1 -1
- package/src/assets/web-panel/assets/{index-C7Z2m28C.js → index-C0wmEN2j.js} +1 -1
- package/src/assets/web-panel/assets/{index-DSzb9VOG.js → index-C4bBR-Vd.js} +1 -1
- package/src/assets/web-panel/assets/{index-CfE3jxrT.js → index-COhACL0I.js} +1 -1
- package/src/assets/web-panel/assets/{index-FSYz5aww.js → index-CQ-cnhZM.js} +1 -1
- package/src/assets/web-panel/assets/{index-BXMZLfd8.js → index-CRr99L7q.js} +1 -1
- package/src/assets/web-panel/assets/{index-DWcd5zDG.js → index-CaTkUkJp.js} +3 -3
- package/src/assets/web-panel/assets/{index-D1VWL6Lc.js → index-CfOjPxso.js} +1 -1
- package/src/assets/web-panel/assets/index-Cf_SLgtj.js +1 -0
- package/src/assets/web-panel/assets/{index-mZNLT2SP.js → index-Ch_TYQNW.js} +1 -1
- package/src/assets/web-panel/assets/{index-B-2HpfWo.js → index-CisGGaF3.js} +1 -1
- package/src/assets/web-panel/assets/{index-CghRL1dh.js → index-DA-_2qTs.js} +1 -1
- package/src/assets/web-panel/assets/index-DYBIDVGn.js +1 -0
- package/src/assets/web-panel/assets/{index-Dgzw6eKr.js → index-DZxK7MW9.js} +1 -1
- package/src/assets/web-panel/assets/{index-CreXAr5Y.js → index-DiXnGU0A.js} +1 -1
- package/src/assets/web-panel/assets/{index-aOLXuHpG.js → index-DsiyfyBE.js} +1 -1
- package/src/assets/web-panel/assets/{index-DboUBf6R.js → index-G_OgtHiC.js} +1 -1
- package/src/assets/web-panel/assets/{index-BnEZfi5D.js → index-IjV-dnE8.js} +1 -1
- package/src/assets/web-panel/assets/{index-BAPk6ntc.js → index-Mltfj22U.js} +1 -1
- package/src/assets/web-panel/assets/{index-DTUs9t5F.js → index-U-kmEJdu.js} +1 -1
- package/src/assets/web-panel/assets/{index-BMp41Q1Y.js → index-cgf-OVry.js} +1 -1
- package/src/assets/web-panel/assets/{index-Cz_SFSix.js → index-ch8zcf-h.js} +1 -1
- package/src/assets/web-panel/assets/{index-DRzsaWQy.js → index-cqOT5RiJ.js} +1 -1
- package/src/assets/web-panel/assets/{index-C7sBLech.js → index-cywkZJ-I.js} +1 -1
- package/src/assets/web-panel/assets/{index-Dib0FsTT.js → index-sE_I7gVL.js} +1 -1
- package/src/assets/web-panel/assets/{initDefaultProps-BDoZJI7g.js → initDefaultProps-DMwnVZzH.js} +1 -1
- package/src/assets/web-panel/assets/{motion-sceLjgp-.js → motion-Dnpjpvo7.js} +1 -1
- package/src/assets/web-panel/assets/{move-CTWQpFa7.js → move-iuRh5U9Y.js} +1 -1
- package/src/assets/web-panel/assets/{omit-dr-NCrHZ.js → omit-Bl4WRV59.js} +1 -1
- package/src/assets/web-panel/assets/{pickAttrs-DK-GX_Z2.js → pickAttrs-B9KSXaep.js} +1 -1
- package/src/assets/web-panel/assets/{placementArrow-BIPf--18.js → placementArrow-TEGIow4r.js} +1 -1
- package/src/assets/web-panel/assets/{responsiveObserve-BzrWT5tV.js → responsiveObserve--BECM92v.js} +1 -1
- package/src/assets/web-panel/assets/{slide-D5XhxlET.js → slide-Ca8G7XbL.js} +1 -1
- package/src/assets/web-panel/assets/{statusUtils-6DI-k-9E.js → statusUtils-8QPG_T3D.js} +1 -1
- package/src/assets/web-panel/assets/{styleChecker-DMw-eyn9.js → styleChecker-p3FsA6mg.js} +1 -1
- package/src/assets/web-panel/assets/{useFlexGapSupport-D4oVdliM.js → useFlexGapSupport-Ct0yIzrp.js} +1 -1
- package/src/assets/web-panel/assets/{useFs-D3PPZnvy.js → useFs-3nlByl_3.js} +1 -1
- package/src/assets/web-panel/assets/{usePersonalDataHub-Gh5ba4KP.js → usePersonalDataHub-N3OsoSRM.js} +1 -1
- package/src/assets/web-panel/assets/{vnode-CVEM1u4x.js → vnode-Cfe3ywq3.js} +1 -1
- package/src/assets/web-panel/assets/{zoom-ClT_-9RZ.js → zoom-DVBuDS_3.js} +1 -1
- package/src/assets/web-panel/index.html +1 -1
- package/src/commands/activitypub.js +4 -3
- package/src/commands/agent.js +25 -0
- package/src/commands/agents.js +18 -4
- package/src/commands/ask.js +13 -0
- package/src/commands/command.js +12 -2
- package/src/commands/config.js +17 -1
- package/src/commands/cost.js +6 -1
- package/src/commands/dao.js +4 -3
- package/src/commands/dlp.js +2 -1
- package/src/commands/hub.js +138 -0
- package/src/commands/mtc.js +37 -1
- package/src/gateways/discord/discord-formatter.js +18 -1
- package/src/gateways/telegram/telegram-formatter.js +6 -3
- package/src/gateways/ws/ws-server.js +19 -1
- package/src/harness/plugin-manager.js +20 -0
- package/src/harness/worktree-isolator.js +17 -1
- package/src/index.js +2 -0
- package/src/lib/__tests__/model-deprecation.test.js +194 -0
- package/src/lib/a2a-protocol.js +24 -9
- package/src/lib/agent-core.js +4 -5
- package/src/lib/audit-mtc.js +40 -2
- package/src/lib/chat-core.js +146 -18
- package/src/lib/cli-anything-bridge.js +5 -0
- package/src/lib/cli-numeric.js +38 -0
- package/src/lib/config-manager.js +37 -6
- package/src/lib/cowork/ab-comparator-cli.js +6 -2
- package/src/lib/cowork-cron.js +45 -34
- package/src/lib/cowork-learning.js +31 -1
- package/src/lib/cowork-share.js +39 -3
- package/src/lib/cowork-template-marketplace.js +54 -2
- package/src/lib/cowork-workflow.js +33 -6
- package/src/lib/cross-chain-mtc.js +41 -12
- package/src/lib/crypto-manager.js +12 -2
- package/src/lib/dbevo.js +19 -8
- package/src/lib/downloader.js +24 -9
- package/src/lib/evomap-governance.js +4 -4
- package/src/lib/evomap-manager.js +54 -7
- package/src/lib/fatal-handler.js +48 -0
- package/src/lib/file-checkpoint.js +26 -0
- package/src/lib/git-integration.js +28 -0
- package/src/lib/goal-store.js +36 -10
- package/src/lib/hierarchical-memory.js +6 -0
- package/src/lib/llm-pricing.js +52 -2
- package/src/lib/mcp-oauth.js +37 -7
- package/src/lib/memory-manager.js +23 -2
- package/src/lib/model-deprecation.js +249 -0
- package/src/lib/pdh-feedback-ledger.js +131 -0
- package/src/lib/permanent-memory.js +30 -2
- package/src/lib/permission-rules.cjs +11 -3
- package/src/lib/personal-data-hub-aichat-wizard.js +33 -3
- package/src/lib/personal-data-hub-wiring.js +39 -16
- package/src/lib/project-instructions.js +10 -4
- package/src/lib/runnable-provider.js +62 -31
- package/src/lib/session-usage.js +34 -1
- package/src/lib/skill-loader.js +4 -1
- package/src/lib/skill-packs/generator.js +25 -2
- package/src/lib/stream-retry.js +56 -0
- package/src/lib/sync-credentials.js +53 -17
- package/src/lib/token-tracker.js +12 -2
- package/src/lib/with-file-lock.js +87 -0
- package/src/repl/agent-repl.js +47 -7
- package/src/repl/chat-repl.js +19 -0
- package/src/repl/session-cost.js +31 -3
- package/src/runtime/agent-core.js +478 -53
- package/src/runtime/coding-agent-contract-shared.cjs +58 -1
- package/src/runtime/coding-agent-policy.cjs +10 -0
- package/src/runtime/file-ref-expander.js +29 -1
- package/src/runtime/headless-runner.js +12 -1
- package/src/runtime/headless-stream.js +200 -9
- package/src/skills/video-editing/tools/commit.js +15 -1
- package/src/assets/web-panel/assets/PdhVaultBrowser-C8f5NbbI.js +0 -7
- package/src/assets/web-panel/assets/devWarning-Bo1r5_zX.js +0 -1
- package/src/assets/web-panel/assets/index-BCU6dVQ-.js +0 -1
- package/src/assets/web-panel/assets/index-N_oOFphx.js +0 -1
|
@@ -27,11 +27,22 @@ const CODING_AGENT_TOOL_CONTRACTS = Object.freeze([
|
|
|
27
27
|
title: "Read File",
|
|
28
28
|
kind: "filesystem",
|
|
29
29
|
tier: "mvp",
|
|
30
|
-
description:
|
|
30
|
+
description:
|
|
31
|
+
"Read a file's content. Jupyter notebooks (.ipynb) are rendered as a compact cell listing (index/id/type/source, outputs hidden) for use with notebook_edit — pass raw:true for the underlying JSON.",
|
|
31
32
|
inputSchema: {
|
|
32
33
|
type: "object",
|
|
33
34
|
properties: {
|
|
34
35
|
path: { type: "string", description: "File path to read" },
|
|
36
|
+
hashed: {
|
|
37
|
+
type: "boolean",
|
|
38
|
+
description:
|
|
39
|
+
"Prefix each line with a 6-char content hash for edit_file_hashed anchoring",
|
|
40
|
+
},
|
|
41
|
+
raw: {
|
|
42
|
+
type: "boolean",
|
|
43
|
+
description:
|
|
44
|
+
"For .ipynb: return the raw notebook JSON instead of the rendered cell listing",
|
|
45
|
+
},
|
|
35
46
|
},
|
|
36
47
|
required: ["path"],
|
|
37
48
|
},
|
|
@@ -69,6 +80,52 @@ const CODING_AGENT_TOOL_CONTRACTS = Object.freeze([
|
|
|
69
80
|
tags: ["tool:write_file", "contract:coding-agent", "tier:mvp"],
|
|
70
81
|
},
|
|
71
82
|
},
|
|
83
|
+
{
|
|
84
|
+
name: "notebook_edit",
|
|
85
|
+
title: "Edit Notebook",
|
|
86
|
+
kind: "filesystem",
|
|
87
|
+
tier: "mvp",
|
|
88
|
+
description:
|
|
89
|
+
"Edit a Jupyter notebook (.ipynb) cell. edit_mode 'replace' (default) overwrites a cell's source; 'insert' adds a new cell (after the target cell, or at the top when no target given); 'delete' removes a cell. Identify the target with cell_id (preferred) or 0-based cell_index. cell_type ('code'|'markdown') is required for 'insert'. Source is plain text with newlines preserved; replacing a code cell clears its previous outputs + execution_count.",
|
|
90
|
+
inputSchema: {
|
|
91
|
+
type: "object",
|
|
92
|
+
properties: {
|
|
93
|
+
path: { type: "string", description: "Path to the .ipynb notebook" },
|
|
94
|
+
new_source: {
|
|
95
|
+
type: "string",
|
|
96
|
+
description: "New cell source text (required for replace/insert)",
|
|
97
|
+
},
|
|
98
|
+
cell_id: {
|
|
99
|
+
type: "string",
|
|
100
|
+
description: "Target cell id (preferred over cell_index)",
|
|
101
|
+
},
|
|
102
|
+
cell_index: {
|
|
103
|
+
type: "number",
|
|
104
|
+
description: "0-based cell index (when cell_id is unknown)",
|
|
105
|
+
},
|
|
106
|
+
cell_type: {
|
|
107
|
+
type: "string",
|
|
108
|
+
enum: ["code", "markdown"],
|
|
109
|
+
description: "Cell type — required for edit_mode 'insert'",
|
|
110
|
+
},
|
|
111
|
+
edit_mode: {
|
|
112
|
+
type: "string",
|
|
113
|
+
enum: ["replace", "insert", "delete"],
|
|
114
|
+
description: "replace (default) | insert | delete",
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
required: ["path"],
|
|
118
|
+
},
|
|
119
|
+
...TOOL_POLICY_METADATA.notebook_edit,
|
|
120
|
+
permissions: {
|
|
121
|
+
level: "elevated",
|
|
122
|
+
scopes: ["filesystem:write"],
|
|
123
|
+
},
|
|
124
|
+
telemetry: {
|
|
125
|
+
category: "filesystem",
|
|
126
|
+
tags: ["tool:notebook_edit", "contract:coding-agent", "tier:mvp"],
|
|
127
|
+
},
|
|
128
|
+
},
|
|
72
129
|
{
|
|
73
130
|
name: "edit_file",
|
|
74
131
|
title: "Edit File",
|
|
@@ -94,6 +94,16 @@ const TOOL_POLICY_METADATA = Object.freeze({
|
|
|
94
94
|
approvalFlow: "plan",
|
|
95
95
|
isReadOnly: false,
|
|
96
96
|
},
|
|
97
|
+
notebook_edit: {
|
|
98
|
+
riskLevel: RISK_LEVELS.MEDIUM,
|
|
99
|
+
category: TOOL_CATEGORIES.WRITE,
|
|
100
|
+
availableInPlanMode: false,
|
|
101
|
+
planModeBehavior: "blocked",
|
|
102
|
+
requiresPlanApproval: true,
|
|
103
|
+
requiresConfirmation: false,
|
|
104
|
+
approvalFlow: "plan",
|
|
105
|
+
isReadOnly: false,
|
|
106
|
+
},
|
|
97
107
|
run_shell: {
|
|
98
108
|
riskLevel: RISK_LEVELS.HIGH,
|
|
99
109
|
category: TOOL_CATEGORIES.EXECUTE,
|
|
@@ -110,6 +110,28 @@ function looksBinary(buf) {
|
|
|
110
110
|
return false;
|
|
111
111
|
}
|
|
112
112
|
|
|
113
|
+
/**
|
|
114
|
+
* Read at most `limit` bytes from the start of a file. A plain `@file` only
|
|
115
|
+
* ever shows the first `maxBytes`, so reading the whole thing into memory first
|
|
116
|
+
* (readFileSync) would allocate the entire file — pointless for a 300 MB log and
|
|
117
|
+
* a hard failure for files > 2 GB. We read `limit` bytes so truncation can still
|
|
118
|
+
* be detected (caller passes maxBytes + 1). Falls back to readFileSync if the
|
|
119
|
+
* injected fs lacks the lower-level calls.
|
|
120
|
+
*/
|
|
121
|
+
function readBoundedFile(fs, abs, limit) {
|
|
122
|
+
if (typeof fs.openSync !== "function" || typeof fs.readSync !== "function") {
|
|
123
|
+
return fs.readFileSync(abs);
|
|
124
|
+
}
|
|
125
|
+
const fd = fs.openSync(abs, "r");
|
|
126
|
+
try {
|
|
127
|
+
const buf = Buffer.alloc(limit);
|
|
128
|
+
const n = fs.readSync(fd, buf, 0, limit, 0);
|
|
129
|
+
return buf.subarray(0, n);
|
|
130
|
+
} finally {
|
|
131
|
+
fs.closeSync(fd);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
113
135
|
/**
|
|
114
136
|
* Resolve a single raw token to an injectable ref descriptor, or null when it
|
|
115
137
|
* does not resolve to an existing path. Tries the literal path first, then a
|
|
@@ -159,9 +181,15 @@ function resolveRef(raw, { cwd, fs, path, maxBytes, maxDirEntries }) {
|
|
|
159
181
|
};
|
|
160
182
|
}
|
|
161
183
|
if (stat.isFile()) {
|
|
184
|
+
// PDFs (pdf-parse needs the bytes) and line ranges (must reach the end
|
|
185
|
+
// line) need the whole file; a plain inline only ever shows the first
|
|
186
|
+
// maxBytes, so cap the read there instead of slurping the entire file.
|
|
187
|
+
const needsWholeFile = isPdf(fsPath) || range != null;
|
|
162
188
|
let buf;
|
|
163
189
|
try {
|
|
164
|
-
buf =
|
|
190
|
+
buf = needsWholeFile
|
|
191
|
+
? fs.readFileSync(abs)
|
|
192
|
+
: readBoundedFile(fs, abs, maxBytes + 1);
|
|
165
193
|
} catch (err) {
|
|
166
194
|
return {
|
|
167
195
|
kind: "error",
|
|
@@ -607,6 +607,7 @@ export async function runAgentHeadless(options = {}, deps = {}) {
|
|
|
607
607
|
// registered (cc mcp add) + IDE bridge auto-discovery.
|
|
608
608
|
strict: options.strictMcpConfig === true,
|
|
609
609
|
ide: options.ide,
|
|
610
|
+
pdh: options.pdh,
|
|
610
611
|
cwd: options.cwd || process.cwd(),
|
|
611
612
|
// advertise the session id to spawned stdio MCP servers
|
|
612
613
|
sessionId,
|
|
@@ -760,7 +761,12 @@ export async function runAgentHeadless(options = {}, deps = {}) {
|
|
|
760
761
|
|
|
761
762
|
const startedAt = deps.now ? deps.now() : Date.now();
|
|
762
763
|
const toolCalls = [];
|
|
763
|
-
const usage = {
|
|
764
|
+
const usage = {
|
|
765
|
+
input_tokens: 0,
|
|
766
|
+
output_tokens: 0,
|
|
767
|
+
cache_read_input_tokens: 0,
|
|
768
|
+
cache_creation_input_tokens: 0,
|
|
769
|
+
};
|
|
764
770
|
let finalText = "";
|
|
765
771
|
let endReason = "complete";
|
|
766
772
|
let stopForCost = false;
|
|
@@ -837,6 +843,11 @@ export async function runAgentHeadless(options = {}, deps = {}) {
|
|
|
837
843
|
case "token-usage": {
|
|
838
844
|
usage.input_tokens += event.usage?.input_tokens || 0;
|
|
839
845
|
usage.output_tokens += event.usage?.output_tokens || 0;
|
|
846
|
+
// Carry prompt-cache tokens into accumulated usage (cost accuracy).
|
|
847
|
+
usage.cache_read_input_tokens +=
|
|
848
|
+
event.usage?.cache_read_input_tokens || 0;
|
|
849
|
+
usage.cache_creation_input_tokens +=
|
|
850
|
+
event.usage?.cache_creation_input_tokens || 0;
|
|
840
851
|
emitStream({ type: "token_usage", usage: event.usage });
|
|
841
852
|
if (costBudget) {
|
|
842
853
|
costBudget.add({
|
|
@@ -114,6 +114,34 @@ export function parseInputEvent(line) {
|
|
|
114
114
|
},
|
|
115
115
|
};
|
|
116
116
|
}
|
|
117
|
+
// PDH self-learning feedback (design module 101 §3.5.13). The personal-data
|
|
118
|
+
// chat's 纠正卡 sends {"type":"feedback","turn_id":…,"kind":"positive"|
|
|
119
|
+
// "negative"|"correction","comment":…} after a reply. A missing kind → skip.
|
|
120
|
+
if (obj && typeof obj === "object" && obj.type === "feedback") {
|
|
121
|
+
const kind = String(obj.kind || "").toLowerCase();
|
|
122
|
+
if (!kind) return null;
|
|
123
|
+
return {
|
|
124
|
+
feedback: {
|
|
125
|
+
turnId: obj.turn_id != null ? String(obj.turn_id) : null,
|
|
126
|
+
kind,
|
|
127
|
+
comment: typeof obj.comment === "string" ? obj.comment : null,
|
|
128
|
+
},
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
// PDH guided-collection resume (design module 101 §3.5.15). When a PDH tool
|
|
132
|
+
// returns assist_required (e.g. "log into the app first") the chat's 引导卡
|
|
133
|
+
// sends {"type":"resume","token":…,"action":"completed"|"skip"} once the user
|
|
134
|
+
// finishes or skips the in-app step. A missing action → skip.
|
|
135
|
+
if (obj && typeof obj === "object" && obj.type === "resume") {
|
|
136
|
+
const action = String(obj.action || "").toLowerCase();
|
|
137
|
+
if (!action) return null;
|
|
138
|
+
return {
|
|
139
|
+
resume: {
|
|
140
|
+
token: obj.token != null ? String(obj.token) : null,
|
|
141
|
+
action,
|
|
142
|
+
},
|
|
143
|
+
};
|
|
144
|
+
}
|
|
117
145
|
const msg = obj && typeof obj === "object" ? obj.message || obj : {};
|
|
118
146
|
let content = msg.content ?? obj.text ?? obj.prompt;
|
|
119
147
|
if (Array.isArray(content)) {
|
|
@@ -144,13 +172,46 @@ export function parseInputEvent(line) {
|
|
|
144
172
|
}
|
|
145
173
|
}
|
|
146
174
|
images = [...new Set(images)].slice(0, 8);
|
|
175
|
+
// §3.5.10 接线6: optional per-turn LLM override (PDH privacy-tier switch) —
|
|
176
|
+
// {"type":"user","text":…,"llm":{"provider","model","baseUrl"?,"apiKey"?}}.
|
|
177
|
+
// Switches THIS turn's model (e.g. cloud → your own PC Ollama) without
|
|
178
|
+
// restarting the session. Reuses the same per-turn loopOptions seam as vision.
|
|
179
|
+
const llm = sanitizeLlmHint(
|
|
180
|
+
obj && typeof obj === "object" ? obj.llm || msg.llm : null,
|
|
181
|
+
);
|
|
147
182
|
if (typeof content !== "string" || !content.trim()) {
|
|
148
183
|
// An image-only turn is valid — give the model something to act on.
|
|
149
|
-
if (images.length)
|
|
150
|
-
|
|
184
|
+
if (images.length) {
|
|
185
|
+
const r = { text: "Please look at the attached image(s).", images };
|
|
186
|
+
if (llm) r.llm = llm;
|
|
187
|
+
return r;
|
|
188
|
+
}
|
|
151
189
|
return null;
|
|
152
190
|
}
|
|
153
|
-
|
|
191
|
+
const result = images.length ? { text: content, images } : { text: content };
|
|
192
|
+
if (llm) result.llm = llm;
|
|
193
|
+
return result;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* §3.5.10 接线6: sanitize a per-turn LLM override hint. Requires at least a
|
|
198
|
+
* provider or model (string); baseUrl/apiKey optional. Returns null when absent
|
|
199
|
+
* or malformed (the turn then uses the session default).
|
|
200
|
+
*/
|
|
201
|
+
export function sanitizeLlmHint(raw) {
|
|
202
|
+
if (!raw || typeof raw !== "object") return null;
|
|
203
|
+
const str = (v) => (typeof v === "string" && v.trim() ? v.trim() : null);
|
|
204
|
+
const provider = str(raw.provider);
|
|
205
|
+
const model = str(raw.model);
|
|
206
|
+
if (!provider && !model) return null;
|
|
207
|
+
const hint = {};
|
|
208
|
+
if (provider) hint.provider = provider;
|
|
209
|
+
if (model) hint.model = model;
|
|
210
|
+
const baseUrl = str(raw.baseUrl);
|
|
211
|
+
if (baseUrl) hint.baseUrl = baseUrl;
|
|
212
|
+
const apiKey = str(raw.apiKey);
|
|
213
|
+
if (apiKey) hint.apiKey = apiKey;
|
|
214
|
+
return hint;
|
|
154
215
|
}
|
|
155
216
|
|
|
156
217
|
/**
|
|
@@ -185,7 +246,12 @@ export async function* readJsonLines(input) {
|
|
|
185
246
|
* Returns the turn outcome so the caller can grow history + the result line.
|
|
186
247
|
*/
|
|
187
248
|
async function runTurn(messages, loopOptions, { runLoop, emit, costBudget }) {
|
|
188
|
-
const usage = {
|
|
249
|
+
const usage = {
|
|
250
|
+
input_tokens: 0,
|
|
251
|
+
output_tokens: 0,
|
|
252
|
+
cache_read_input_tokens: 0,
|
|
253
|
+
cache_creation_input_tokens: 0,
|
|
254
|
+
};
|
|
189
255
|
const toolCalls = [];
|
|
190
256
|
let finalText = "";
|
|
191
257
|
let endReason = "complete";
|
|
@@ -213,6 +279,12 @@ async function runTurn(messages, loopOptions, { runLoop, emit, costBudget }) {
|
|
|
213
279
|
case "token-usage":
|
|
214
280
|
usage.input_tokens += event.usage?.input_tokens || 0;
|
|
215
281
|
usage.output_tokens += event.usage?.output_tokens || 0;
|
|
282
|
+
// Carry prompt-cache tokens into the turn's accumulated usage so the
|
|
283
|
+
// final `result` envelope (read by IDE panels) reflects caching too.
|
|
284
|
+
usage.cache_read_input_tokens +=
|
|
285
|
+
event.usage?.cache_read_input_tokens || 0;
|
|
286
|
+
usage.cache_creation_input_tokens +=
|
|
287
|
+
event.usage?.cache_creation_input_tokens || 0;
|
|
216
288
|
emit({ type: "token_usage", usage: event.usage });
|
|
217
289
|
if (costBudget) {
|
|
218
290
|
costBudget.add({
|
|
@@ -463,7 +535,12 @@ export async function runAgentHeadlessStream(options = {}, deps = {}) {
|
|
|
463
535
|
e.code = "USER_TIMEOUT"; // handler → user_timeout (model proceeds, not a failure)
|
|
464
536
|
p.reject(e);
|
|
465
537
|
};
|
|
466
|
-
const interactionAskUser = ({
|
|
538
|
+
const interactionAskUser = ({
|
|
539
|
+
question,
|
|
540
|
+
options: qOptions,
|
|
541
|
+
multiSelect,
|
|
542
|
+
timeoutMs,
|
|
543
|
+
} = {}) =>
|
|
467
544
|
new Promise((resolve, reject) => {
|
|
468
545
|
const id = `q-${++questionSeq}`;
|
|
469
546
|
const ms = Number(timeoutMs) > 0 ? Number(timeoutMs) : questionTimeoutMs;
|
|
@@ -499,6 +576,27 @@ export async function runAgentHeadlessStream(options = {}, deps = {}) {
|
|
|
499
576
|
);
|
|
500
577
|
const messages = [{ role: "system", content: systemContent }];
|
|
501
578
|
|
|
579
|
+
// §3.5.13 flywheel consumption (design module 101): in a PDH session, lead
|
|
580
|
+
// with the user's standing feedback preferences learned ACROSS sessions
|
|
581
|
+
// (corrections + net sentiment) so the agent honours past corrections from
|
|
582
|
+
// the very first turn — the read side of pdh-feedback-ledger.js. Gated to PDH
|
|
583
|
+
// context (the in-APK chat sets CHAINLESSCHAIN_PDH_PORT; `--pdh` forces,
|
|
584
|
+
// `--no-pdh` opts out) so IDE/coding sessions are never polluted. Best-effort.
|
|
585
|
+
try {
|
|
586
|
+
const { isInPdhTerminal } = await import("../lib/pdh-bridge.js");
|
|
587
|
+
const pdhContext =
|
|
588
|
+
options.pdh === true ||
|
|
589
|
+
(options.pdh !== false && isInPdhTerminal(process.env));
|
|
590
|
+
if (pdhContext) {
|
|
591
|
+
const { readFeedback, summarizeFeedback, feedbackSystemNote } =
|
|
592
|
+
await import("../lib/pdh-feedback-ledger.js");
|
|
593
|
+
const note = feedbackSystemNote(summarizeFeedback(readFeedback()));
|
|
594
|
+
if (note) messages.push({ role: "system", content: note });
|
|
595
|
+
}
|
|
596
|
+
} catch {
|
|
597
|
+
/* learned-preference injection must never break the chat */
|
|
598
|
+
}
|
|
599
|
+
|
|
502
600
|
// settings.json SessionStart hooks → inject session context once (observe-only).
|
|
503
601
|
if (settingsHooks) {
|
|
504
602
|
try {
|
|
@@ -588,6 +686,7 @@ export async function runAgentHeadlessStream(options = {}, deps = {}) {
|
|
|
588
686
|
// registered + IDE bridge) for a reproducible MCP surface.
|
|
589
687
|
strict: options.strictMcpConfig === true,
|
|
590
688
|
ide: options.ide,
|
|
689
|
+
pdh: options.pdh,
|
|
591
690
|
cwd: options.cwd || process.cwd(),
|
|
592
691
|
// advertise the session id to spawned stdio MCP servers
|
|
593
692
|
sessionId,
|
|
@@ -670,7 +769,9 @@ export async function runAgentHeadlessStream(options = {}, deps = {}) {
|
|
|
670
769
|
// ask_user_question round-trip (opt-in via CC_INTERACTIVE_QUESTIONS): give
|
|
671
770
|
// the tool handler an askUser that emits question_request + blocks on stdin.
|
|
672
771
|
// Absent → agent-core returns user_not_reachable (graceful proceed).
|
|
673
|
-
interaction: interactiveQuestions
|
|
772
|
+
interaction: interactiveQuestions
|
|
773
|
+
? { askUser: interactionAskUser }
|
|
774
|
+
: undefined,
|
|
674
775
|
prepareCall: goalPrepareCallFn,
|
|
675
776
|
// --mcp-config wiring (tool defs + dispatch map + live client).
|
|
676
777
|
mcpClient: mcp?.mcpClient || null,
|
|
@@ -767,8 +868,14 @@ export async function runAgentHeadlessStream(options = {}, deps = {}) {
|
|
|
767
868
|
if (parsed.answer) {
|
|
768
869
|
// Answers settle a BLOCKED ask_user_question — never queued. A null
|
|
769
870
|
// value (user cancelled the QuickPick) → user_timeout (model proceeds).
|
|
770
|
-
if (parsed.answer.value == null)
|
|
771
|
-
|
|
871
|
+
if (parsed.answer.value == null)
|
|
872
|
+
failQuestion(parsed.answer.id, "cancelled");
|
|
873
|
+
else
|
|
874
|
+
settleQuestion(
|
|
875
|
+
parsed.answer.id,
|
|
876
|
+
parsed.answer.value,
|
|
877
|
+
"user-answer",
|
|
878
|
+
);
|
|
772
879
|
continue;
|
|
773
880
|
}
|
|
774
881
|
queue.push(parsed);
|
|
@@ -896,6 +1003,58 @@ export async function runAgentHeadlessStream(options = {}, deps = {}) {
|
|
|
896
1003
|
}
|
|
897
1004
|
}
|
|
898
1005
|
|
|
1006
|
+
// PDH self-learning feedback (design module 101 §3.5.13). Always ack so the
|
|
1007
|
+
// chat app can confirm receipt. A `correction` re-drives a turn so the model
|
|
1008
|
+
// adapts within the session; `positive`/`negative` are recorded as a
|
|
1009
|
+
// lightweight preference note in history without forcing a fresh reply.
|
|
1010
|
+
if (parsed.feedback) {
|
|
1011
|
+
const { turnId, kind, comment } = parsed.feedback;
|
|
1012
|
+
emit({
|
|
1013
|
+
type: "feedback_ack",
|
|
1014
|
+
turn_id: turnId,
|
|
1015
|
+
kind,
|
|
1016
|
+
session_id: sessionId,
|
|
1017
|
+
});
|
|
1018
|
+
// §3.5.13: persist to the cross-session learning ledger so the next
|
|
1019
|
+
// session can honour the user's standing preferences ("越用越聪明"
|
|
1020
|
+
// flywheel). Best-effort — a learning ledger must never break the chat.
|
|
1021
|
+
try {
|
|
1022
|
+
const { appendFeedback } =
|
|
1023
|
+
await import("../lib/pdh-feedback-ledger.js");
|
|
1024
|
+
appendFeedback({ sessionId, turnId, kind, comment });
|
|
1025
|
+
} catch {
|
|
1026
|
+
/* persistence is best-effort */
|
|
1027
|
+
}
|
|
1028
|
+
if (kind === "correction") {
|
|
1029
|
+
parsed.text = comment
|
|
1030
|
+
? `用户对上一轮回复给出纠正:${comment}\n请据此调整并重新回复。`
|
|
1031
|
+
: "用户认为上一轮回复需要纠正,请反思后给出更准确的回复。";
|
|
1032
|
+
// fall through into the normal turn machinery with the correction prompt
|
|
1033
|
+
} else {
|
|
1034
|
+
const tag = kind === "positive" ? "认可" : "不满意";
|
|
1035
|
+
messages.push({
|
|
1036
|
+
role: "user",
|
|
1037
|
+
content: `(用户反馈:对上一轮回复表示${tag}。请在后续回复中延续/修正此偏好。)`,
|
|
1038
|
+
});
|
|
1039
|
+
continue;
|
|
1040
|
+
}
|
|
1041
|
+
}
|
|
1042
|
+
|
|
1043
|
+
// PDH guided-collection resume (design module 101 §3.5.15). A PDH tool
|
|
1044
|
+
// returned assist_required (e.g. "log into the app first"); the chat's 引导卡
|
|
1045
|
+
// sends a resume once the user finishes or skips the in-app step. Ack so the
|
|
1046
|
+
// app can dismiss the card, then re-drive the model to retry (completed) or
|
|
1047
|
+
// move on (skip).
|
|
1048
|
+
if (parsed.resume) {
|
|
1049
|
+
const { token, action } = parsed.resume;
|
|
1050
|
+
emit({ type: "resume_ack", token, action, session_id: sessionId });
|
|
1051
|
+
parsed.text =
|
|
1052
|
+
action === "skip"
|
|
1053
|
+
? "我跳过了刚才需要的引导操作,请不要重试该步骤,继续处理其它事项或做个小结。"
|
|
1054
|
+
: "我已完成刚才需要的引导操作,请重试刚才的采集/操作。";
|
|
1055
|
+
// fall through into the normal turn machinery with the continuation prompt
|
|
1056
|
+
}
|
|
1057
|
+
|
|
899
1058
|
// --replay-user-messages: echo each accepted user message back on the
|
|
900
1059
|
// output stream (Claude-Code parity) so a consumer can correlate replies to
|
|
901
1060
|
// inputs / log the transcript. Echoes the raw user text, before @file or
|
|
@@ -1015,6 +1174,18 @@ export async function runAgentHeadlessStream(options = {}, deps = {}) {
|
|
|
1015
1174
|
}
|
|
1016
1175
|
}
|
|
1017
1176
|
|
|
1177
|
+
// §3.5.10 接线6: explicit per-turn LLM override (PDH privacy-tier switch).
|
|
1178
|
+
// Applies to THIS turn only; the vision override (above) still wins on image
|
|
1179
|
+
// turns since an image needs a vision-capable model.
|
|
1180
|
+
const turnLlmOverride = parsed.llm || null;
|
|
1181
|
+
if (turnLlmOverride && !turnVisionLlm) {
|
|
1182
|
+
writeErr(
|
|
1183
|
+
` [llm] this turn → ${turnLlmOverride.provider || provider}/${
|
|
1184
|
+
turnLlmOverride.model || "(session model)"
|
|
1185
|
+
}\n`,
|
|
1186
|
+
);
|
|
1187
|
+
}
|
|
1188
|
+
|
|
1018
1189
|
messages.push({ role: "user", content: turnContent });
|
|
1019
1190
|
if (persist) {
|
|
1020
1191
|
try {
|
|
@@ -1039,8 +1210,28 @@ export async function runAgentHeadlessStream(options = {}, deps = {}) {
|
|
|
1039
1210
|
messages,
|
|
1040
1211
|
{
|
|
1041
1212
|
...loopOptionsBase,
|
|
1213
|
+
// §3.5.10 接线6: explicit per-turn LLM override (privacy-tier switch);
|
|
1214
|
+
// only the fields provided are overridden (e.g. provider+model+baseUrl
|
|
1215
|
+
// to route to your own PC Ollama for one turn).
|
|
1216
|
+
...(turnLlmOverride
|
|
1217
|
+
? {
|
|
1218
|
+
...(turnLlmOverride.provider
|
|
1219
|
+
? { provider: turnLlmOverride.provider }
|
|
1220
|
+
: {}),
|
|
1221
|
+
...(turnLlmOverride.model
|
|
1222
|
+
? { model: turnLlmOverride.model }
|
|
1223
|
+
: {}),
|
|
1224
|
+
...(turnLlmOverride.baseUrl
|
|
1225
|
+
? { baseUrl: turnLlmOverride.baseUrl }
|
|
1226
|
+
: {}),
|
|
1227
|
+
...(turnLlmOverride.apiKey
|
|
1228
|
+
? { apiKey: turnLlmOverride.apiKey }
|
|
1229
|
+
: {}),
|
|
1230
|
+
}
|
|
1231
|
+
: {}),
|
|
1042
1232
|
// Image turn → switch this turn's provider/model/baseUrl/apiKey to
|
|
1043
|
-
// the vision LLM (model only; same account/key/baseUrl).
|
|
1233
|
+
// the vision LLM (model only; same account/key/baseUrl). Wins over an
|
|
1234
|
+
// explicit llm override above (an image needs a vision model).
|
|
1044
1235
|
...(turnVisionLlm
|
|
1045
1236
|
? {
|
|
1046
1237
|
provider: turnVisionLlm.provider,
|
|
@@ -96,7 +96,21 @@ export async function execute({ section_idx, shot_idx, clips }, context) {
|
|
|
96
96
|
try {
|
|
97
97
|
const raw = await fs.readFile(context.shotPointPath, "utf-8");
|
|
98
98
|
existing = JSON.parse(raw);
|
|
99
|
-
|
|
99
|
+
if (!Array.isArray(existing)) {
|
|
100
|
+
throw new Error("shot-point log is not a JSON array");
|
|
101
|
+
}
|
|
102
|
+
} catch (err) {
|
|
103
|
+
// A missing file is the normal first-commit case — start fresh. Any other
|
|
104
|
+
// error (parse failure / wrong shape on an existing file, permission)
|
|
105
|
+
// means the log is present but unreadable; appending to a fresh [] would
|
|
106
|
+
// silently discard every previously committed clip, so surface it instead
|
|
107
|
+
// of clobbering.
|
|
108
|
+
if (err.code !== "ENOENT") {
|
|
109
|
+
throw new Error(
|
|
110
|
+
`Refusing to overwrite shot-point log ${context.shotPointPath}: ${err.message}`,
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
100
114
|
existing.push(entry);
|
|
101
115
|
await fs.writeFile(
|
|
102
116
|
context.shotPointPath,
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ChatBubbleRenderer-BGzg7oVA.js","./vendor-BvqAck49.js","./index-DWcd5zDG.js","./icons-DP3uiYxy.js","./index-Cq93VfoF.css","./ChatBubbleRenderer-gy5SDGw2.css","./OrderTableRenderer-B5onE0eX.js","./OrderTableRenderer-CfrDjSHT.css","./TimelineRenderer-DTHzaXPt.js","./TimelineRenderer-BlTAtkOc.css","./EmailListRenderer-D7XI1yBM.js","./EmailListRenderer-DTPZPx_S.css","./GenericCardRenderer-nNT9Tn4E.js","./GenericCardRenderer-o85VDYQS.css"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{E as ue,r as E,b as w,I as y,P as u,J as O,U as v,c,S as C,V as x,_ as M,F as B,Z as se,a0 as le,R,K as m,Q as b,W as A,o as J}from"./vendor-BvqAck49.js";import{u as U}from"./usePersonalDataHub-Gh5ba4KP.js";import{_ as F,e as L,d as P}from"./index-DWcd5zDG.js";import{a9 as q,af as z,M as Q,aH as G,u as H,aG as K,ap as W,ab as Y,e as de,d as fe,k as pe,ah as me,az as _e,R as ge}from"./icons-DP3uiYxy.js";const D=Object.freeze({q:"",category:null,adapter:null,subtype:null,since:null,until:null}),N=50,Z=300,X=ue("pdhBrowser",()=>{const r=E({...D}),t=E([]),n=E(null),e=E(!1),o=E(!1),l=E(null),a=E(null),s=E(!1),i=E({byCategory:{},byAdapter:{},bySubtype:{},total:0});let d=0,_=null;const j=w(()=>t.value.length>0),T=w(()=>n.value!=null);function h(S={}){const p={},f=r.value;return f.q&&f.q.trim()&&(p.q=f.q.trim()),f.category&&(p.category=f.category),f.adapter&&(p.adapter=f.adapter),f.subtype&&(p.subtype=f.subtype),Number.isFinite(f.since)&&(p.since=f.since),Number.isFinite(f.until)&&(p.until=f.until),{...p,...S}}async function g(){const S=++d;e.value=!0,l.value=null;const p=U();try{const[f,I]=await Promise.all([p.searchEvents(h({limit:N})),p.facetCounts({...r.value.q&&r.value.q.trim()?{q:r.value.q.trim()}:{},...Number.isFinite(r.value.since)?{since:r.value.since}:{},...Number.isFinite(r.value.until)?{until:r.value.until}:{}})]);if(S!==d)return;t.value=f.rows||[],n.value=f.nextCursor||null,a.value=f.mode||"like",s.value=!!f.shortQuery,i.value={byCategory:I.byCategory||{},byAdapter:I.byAdapter||{},bySubtype:I.bySubtype||{},total:I.total||0}}catch(f){if(S!==d)return;l.value=f&&f.message?f.message:String(f),t.value=[],n.value=null}finally{S===d&&(e.value=!1)}}async function k(){if(!n.value||o.value)return;o.value=!0,l.value=null;const S=U();try{const p=await S.searchEvents(h({cursor:n.value,limit:N}));t.value=t.value.concat(p.rows||[]),n.value=p.nextCursor||null,a.value=p.mode||a.value}catch(p){l.value=p&&p.message?p.message:String(p)}finally{o.value=!1}}function ae(S,p){if(!(S in D))throw new Error(`pdhBrowser.setFilter: unknown key "${S}"`);r.value={...r.value,[S]:p},_&&clearTimeout(_),_=setTimeout(()=>{_=null,g()},Z)}function ie(S){return r.value={...D,...S},_&&(clearTimeout(_),_=null),g()}function ce(){r.value={...D},t.value=[],n.value=null,l.value=null,i.value={byCategory:{},byAdapter:{},bySubtype:{},total:0}}return{filters:r,results:t,cursor:n,isLoading:e,isAppending:o,error:l,mode:a,shortQuery:s,facets:i,hasResults:j,canLoadMore:T,search:g,loadMore:k,setFilter:ae,setFilters:ie,reset:ce,PAGE_SIZE:N,SEARCH_DEBOUNCE_MS:Z}}),ye=Object.freeze(["chat","social","email","shopping","travel","system","ai-chat","other"]),ve=Object.freeze({chat:"社交聊天",social:"内容平台",email:"邮件",shopping:"支付订单",travel:"出行",system:"系统数据","ai-chat":"AI 对话",other:"其他"});function V(r){return ve[r]||r||"未知"}const be=Object.freeze([["wechat","chat"],["messaging-","chat"],["social-","social"],["email-","email"],["shopping-","shopping"],["alipay-","shopping"],["travel-","travel"],["system-data","system"],["browser-","system"],["vscode","system"],["win-recent","system"],["git-activity","system"],["shell-history","system"],["local-files","system"],["ai-chat-","ai-chat"]]);function $(r){if(typeof r!="string"||r.length===0)return"other";for(const[t,n]of be)if(t.endsWith("-")||t==="system-data"){if(r.startsWith(t))return n}else if(r===t)return n;return"other"}const he={__name:"CategorySidebar",props:{selected:{type:String,default:null},facets:{type:Object,default:()=>({byCategory:{},total:0})}},emits:["select"],setup(r,{expose:t}){t();const n=r,e=w(()=>n.facets.total||0),o={chat:Y,social:W,email:K,shopping:H,travel:G,system:Q,"ai-chat":z,other:q};function l(i){return o[i]||q}function a(i){return i?{backgroundColor:"#fff",color:"#1677ff"}:{backgroundColor:"#f0f0f0",color:"#666"}}const s={props:n,total:e,ICONS:o,iconFor:l,badgeStyle:a,computed:w,get AppstoreOutlined(){return q},get MessageOutlined(){return Y},get PlayCircleOutlined(){return W},get MailOutlined(){return K},get ShoppingOutlined(){return H},get CarOutlined(){return G},get MobileOutlined(){return Q},get RobotOutlined(){return z},get CATEGORIES(){return ye},get categoryLabel(){return V}};return Object.defineProperty(s,"__isScriptSetup",{enumerable:!1,value:!0}),s}},Se={class:"pdh-sidebar"},Oe=["onClick"],we={class:"label"};function Ce(r,t,n,e,o,l){const a=y("a-badge");return u(),O("div",Se,[t[2]||(t[2]=v("div",{class:"sidebar-title"},"数据类型",-1)),v("div",{class:M(["cat-item",{active:n.selected===null}]),onClick:t[0]||(t[0]=s=>r.$emit("select",null))},[c(e.AppstoreOutlined,{class:"icon"}),t[1]||(t[1]=v("span",{class:"label"},"全部",-1)),e.total>0?(u(),C(a,{key:0,count:e.total,"number-style":e.badgeStyle(n.selected===null),"overflow-count":9999},null,8,["count","number-style"])):x("v-if",!0)],2),(u(!0),O(B,null,se(e.CATEGORIES,s=>(u(),O("div",{key:s,class:M(["cat-item",{active:n.selected===s,dim:!n.facets.byCategory[s]}]),onClick:i=>r.$emit("select",s)},[(u(),C(le(e.iconFor(s)),{class:"icon"})),v("span",we,R(e.categoryLabel(s)),1),n.facets.byCategory[s]?(u(),C(a,{key:0,count:n.facets.byCategory[s],"number-style":e.badgeStyle(n.selected===s),"overflow-count":9999},null,8,["count","number-style"])):x("v-if",!0)],10,Oe))),128))])}const ke=F(he,[["render",Ce],["__scopeId","data-v-6b62a22e"],["__file","/tmp/cc-web-panel-xIdTjN/repo/packages/web-panel/src/components/pdh/CategorySidebar.vue"]]),xe={__name:"SearchFilterBar",props:{filters:{type:Object,required:!0},facets:{type:Object,default:()=>({byAdapter:{}})},isLoading:{type:Boolean,default:!1},mode:{type:String,default:null},shortQuery:{type:Boolean,default:!1}},emits:["set-filter","reset"],setup(r,{expose:t,emit:n}){t();const e=r,o=n,l=w(()=>e.filters.category?`在「${e.filters.category}」类目内搜索…`:"搜索关键词(如:支付宝、罗技、Kotlin)…"),a=w(()=>Object.entries(e.facets.byAdapter||{}).sort((g,k)=>k[1]-g[1]).map(([g,k])=>({value:g,label:`${g} (${k})`}))),s=w(()=>!e.filters.since&&!e.filters.until?null:[e.filters.since?new Date(e.filters.since):null,e.filters.until?new Date(e.filters.until):null]),i=w(()=>!!(e.filters.q||e.filters.adapter||e.filters.subtype||e.filters.since||e.filters.until));function d(h){o("set-filter","q",h||"")}function _(h){o("set-filter","q",h||"")}function j(h){if(!h||h.length===0){o("set-filter","since",null),o("set-filter","until",null);return}const[g,k]=h;o("set-filter","since",g?+g:null),o("set-filter","until",k?+k:null)}const T={props:e,emit:o,placeholderText:l,adapterOptions:a,dateRangeValue:s,hasActiveFilters:i,onQInput:d,onSearch:_,onDateChange:j,computed:w,get SearchOutlined(){return pe},get CloseCircleOutlined(){return fe},get InfoCircleOutlined(){return de}};return Object.defineProperty(T,"__isScriptSetup",{enumerable:!1,value:!0}),T}},Ee={class:"pdh-filter-bar"},Re={key:1,class:"hint"},je={key:2,class:"hint"};function Te(r,t,n,e,o,l){const a=y("a-input-search"),s=y("a-select"),i=y("a-range-picker"),d=y("a-button");return u(),O("div",Ee,[c(a,{value:n.filters.q,placeholder:e.placeholderText,"enter-button":"搜索","allow-clear":"",loading:n.isLoading,style:{flex:"1","max-width":"480px"},"onUpdate:value":e.onQInput,onSearch:e.onSearch},{prefix:m(()=>[c(e.SearchOutlined)]),_:1},8,["value","placeholder","loading"]),c(s,{value:n.filters.adapter,placeholder:"所有 adapter","allow-clear":"",options:e.adapterOptions,style:{width:"200px"},"onUpdate:value":t[0]||(t[0]=_=>r.$emit("set-filter","adapter",_||null))},null,8,["value","options"]),c(i,{value:e.dateRangeValue,placeholder:["开始日期","结束日期"],style:{width:"280px"},"onUpdate:value":e.onDateChange},null,8,["value"]),e.hasActiveFilters?(u(),C(d,{key:0,type:"link",danger:"",onClick:t[1]||(t[1]=_=>r.$emit("reset"))},{icon:m(()=>[c(e.CloseCircleOutlined)]),default:m(()=>[t[2]||(t[2]=b(" 清空筛选 ",-1))]),_:1})):x("v-if",!0),n.shortQuery?(u(),O("span",Re,[c(e.InfoCircleOutlined),t[3]||(t[3]=b(" 关键词需至少 3 字 (FTS5 trigram 限制) ",-1))])):n.mode==="like"?(u(),O("span",je,[c(e.InfoCircleOutlined),t[4]||(t[4]=b(" 当前为 LIKE 兜底模式 ",-1))])):x("v-if",!0)])}const Ae=F(xe,[["render",Te],["__scopeId","data-v-d7cce6e9"],["__file","/tmp/cc-web-panel-xIdTjN/repo/packages/web-panel/src/components/pdh/SearchFilterBar.vue"]]),Le={__name:"RendererDispatcher",props:{event:{type:Object,required:!0}},setup(r,{expose:t}){t();const n=A(()=>L(()=>import("./ChatBubbleRenderer-BGzg7oVA.js"),__vite__mapDeps([0,1,2,3,4,5]),import.meta.url)),e=A(()=>L(()=>import("./OrderTableRenderer-B5onE0eX.js"),__vite__mapDeps([6,1,2,3,4,7]),import.meta.url)),o=A(()=>L(()=>import("./TimelineRenderer-DTHzaXPt.js"),__vite__mapDeps([8,1,2,3,4,9]),import.meta.url)),l=A(()=>L(()=>import("./EmailListRenderer-D7XI1yBM.js"),__vite__mapDeps([10,1,2,3,4,11]),import.meta.url)),a=A(()=>L(()=>import("./GenericCardRenderer-nNT9Tn4E.js"),__vite__mapDeps([12,1,2,3,4,13]),import.meta.url));function s(d){const _=d&&d.source&&d.source.adapter;switch($(_)){case"chat":case"ai-chat":return n;case"shopping":return e;case"travel":return o;case"email":return l;default:return a}}const i={ChatBubbleRenderer:n,OrderTableRenderer:e,TimelineRenderer:o,EmailListRenderer:l,GenericCardRenderer:a,rendererFor:s,defineAsyncComponent:A,get getCategory(){return $}};return Object.defineProperty(i,"__isScriptSetup",{enumerable:!1,value:!0}),i}};function Fe(r,t,n,e,o,l){return u(),C(le(e.rendererFor(n.event)),{event:n.event},null,8,["event"])}const Ie=F(Le,[["render",Fe],["__file","/tmp/cc-web-panel-xIdTjN/repo/packages/web-panel/src/components/pdh/renderers/RendererDispatcher.vue"]]);function ee(r){return JSON.stringify(r,null,2)}function te(r){return r.map(t=>JSON.stringify(t)).join(`
|
|
3
|
-
`)+`
|
|
4
|
-
`}function ne(r){const n=["id","subtype","occurredAt","occurredAtIso","actor","place","adapter","summary","contentJson","extraJson"].join(","),e=r.map(o=>{const l=Number.isFinite(o.occurredAt)?o.occurredAt:null,a=l?new Date(l).toISOString():"",s=o.source&&o.source.adapter||"",i=o.content&&(o.content.text||o.content.title||o.content.subject)||"";return[o.id||"",o.subtype||"",l!=null?String(l):"",a,o.actor||"",o.place||"",s,i,o.content?JSON.stringify(o.content):"",o.extra?JSON.stringify(o.extra):""].map(De).join(",")});return[n,...e].join(`
|
|
5
|
-
`)+`
|
|
6
|
-
`}function De(r){const t=String(r??"");return t.includes(",")||t.includes('"')||t.includes(`
|
|
7
|
-
`)||t.includes("\r")?'"'+t.replace(/"/g,'""')+'"':t}function re(r,t,n="application/octet-stream"){if(typeof window>"u"||typeof document>"u")return t;const e=new Blob([r],{type:n}),o=URL.createObjectURL(e),l=document.createElement("a");return l.href=o,l.download=t,document.body.appendChild(l),l.click(),document.body.removeChild(l),setTimeout(()=>URL.revokeObjectURL(o),1e3),t}function oe(r,t=null){const n=new Date,e=n.getFullYear(),o=String(n.getMonth()+1).padStart(2,"0"),l=String(n.getDate()).padStart(2,"0"),a=r==="ndjson"?"ndjson":r,s=t?`-${t}`:"";return`pdh-events-${e}-${o}-${l}${s}.${a}`}const Pe={__name:"ExportDropdown",props:{events:{type:Array,required:!0},category:{type:String,default:null}},setup(r,{expose:t}){t();const n=r,e=w(()=>n.events.length>0),o={json:"application/json;charset=utf-8",ndjson:"application/x-ndjson;charset=utf-8",csv:"text/csv;charset=utf-8"};function l(i){switch(i){case"json":return ee(n.events);case"ndjson":return te(n.events);case"csv":return ne(n.events);default:throw new Error(`unknown format: ${i}`)}}function a({key:i}){try{const d=l(i),_=oe(i,n.category);re(d,_,o[i]),P.success(`已导出 ${n.events.length} 条到 ${_}`)}catch(d){P.error(`导出失败: ${d.message||d}`)}}const s={props:n,hasResults:e,MIME:o,serialize:l,onClick:a,computed:w,get DownloadOutlined(){return _e},get DownOutlined(){return me},get message(){return P},get eventsToJson(){return ee},get eventsToNdjson(){return te},get eventsToCsv(){return ne},get downloadAs(){return re},get suggestFilename(){return oe}};return Object.defineProperty(s,"__isScriptSetup",{enumerable:!1,value:!0}),s}};function qe(r,t,n,e,o,l){const a=y("a-button"),s=y("a-menu-item"),i=y("a-menu"),d=y("a-dropdown");return u(),C(d,{disabled:!e.hasResults},{overlay:m(()=>[c(i,{onClick:e.onClick},{default:m(()=>[c(s,{key:"json"},{default:m(()=>[...t[0]||(t[0]=[b("JSON (.json)",-1)])]),_:1}),c(s,{key:"ndjson"},{default:m(()=>[...t[1]||(t[1]=[b("NDJSON (.ndjson)",-1)])]),_:1}),c(s,{key:"csv"},{default:m(()=>[...t[2]||(t[2]=[b("CSV (.csv)",-1)])]),_:1})]),_:1})]),default:m(()=>[c(a,{disabled:!e.hasResults},{icon:m(()=>[c(e.DownloadOutlined)]),default:m(()=>[b(" 导出 ("+R(n.events.length)+") ",1),c(e.DownOutlined)]),_:1},8,["disabled"])]),_:1},8,["disabled"])}const Ne=F(Pe,[["render",qe],["__file","/tmp/cc-web-panel-xIdTjN/repo/packages/web-panel/src/components/pdh/ExportDropdown.vue"]]),Be={__name:"PdhVaultBrowser",setup(r,{expose:t}){t();const n=X(),e=w(()=>n.filters.q?`没有匹配 "${n.filters.q}" 的事件 — 试试更短的关键词或换个类目`:n.filters.category?`「${V(n.filters.category)}」类目下还没有数据 — 去采集页同步对应 adapter`:"Vault 里还没有数据 — 去「个人数据中台」页面同步任意 adapter");function o(s){n.filters.category=s,n.search()}function l(s,i){n.setFilter(s,i)}J(()=>{!n.hasResults&&!n.isLoading&&n.search()});const a={store:n,emptyHint:e,onCategorySelect:o,onSetFilter:l,onMounted:J,computed:w,get ReloadOutlined(){return ge},get usePdhBrowserStore(){return X},get categoryLabel(){return V},CategorySidebar:ke,SearchFilterBar:Ae,RendererDispatcher:Ie,ExportDropdown:Ne};return Object.defineProperty(a,"__isScriptSetup",{enumerable:!1,value:!0}),a}},Ve={class:"pdh-browser-page"},Me={class:"page-header"},Je={class:"main-pane"},Ue={class:"results-summary"},ze={key:0},Qe={key:0},Ge={key:1},He={class:"loaded-of"},Ke={class:"results-list"},We={key:2,class:"load-more"};function Ye(r,t,n,e,o,l){const a=y("a-tag"),s=y("a-button"),i=y("a-space"),d=y("a-col"),_=y("a-spin"),j=y("a-alert"),T=y("a-empty"),h=y("a-row");return u(),O("div",Ve,[v("div",Me,[t[6]||(t[6]=v("div",null,[v("h2",{class:"page-title"},"数据浏览器"),v("p",{class:"page-sub"}," Vault 里所有已采集的数据,按类目浏览 / 全文检索 / 时间窗口筛选。 完全离线,不外传。 ")],-1)),c(i,null,{default:m(()=>[e.store.mode==="fts5"?(u(),C(a,{key:0,color:"green"},{default:m(()=>[...t[3]||(t[3]=[b("FTS5 trigram",-1)])]),_:1})):e.store.mode==="like"?(u(),C(a,{key:1,color:"orange"},{default:m(()=>[...t[4]||(t[4]=[b("LIKE 兜底",-1)])]),_:1})):x("v-if",!0),c(e.ExportDropdown,{events:e.store.results,category:e.store.filters.category},null,8,["events","category"]),c(s,{onClick:t[0]||(t[0]=g=>e.store.search()),loading:e.store.isLoading},{icon:m(()=>[c(e.ReloadOutlined)]),default:m(()=>[t[5]||(t[5]=b(" 刷新 ",-1))]),_:1},8,["loading"])]),_:1})]),c(h,{gutter:16,class:"browser-layout"},{default:m(()=>[c(d,{xs:24,sm:24,md:6,lg:5,xl:4},{default:m(()=>[c(e.CategorySidebar,{selected:e.store.filters.category,facets:e.store.facets,onSelect:e.onCategorySelect},null,8,["selected","facets"])]),_:1}),c(d,{xs:24,sm:24,md:18,lg:19,xl:20},{default:m(()=>[v("div",Je,[c(e.SearchFilterBar,{filters:e.store.filters,facets:e.store.facets,"is-loading":e.store.isLoading,mode:e.store.mode,"short-query":e.store.shortQuery,onSetFilter:e.onSetFilter,onReset:t[1]||(t[1]=g=>{e.store.reset(),e.store.search()})},null,8,["filters","facets","is-loading","mode","short-query"]),v("div",Ue,[e.store.isLoading&&e.store.results.length===0?(u(),O("span",ze,[c(_,{size:"small"}),t[7]||(t[7]=b(" 载入中… ",-1))])):(u(),O(B,{key:1},[v("strong",null,R(e.store.facets.total),1),t[11]||(t[11]=b(" 条事件 ",-1)),e.store.filters.category?(u(),O("span",Qe,[t[8]||(t[8]=b(" / 当前类目 ",-1)),v("strong",null,R(e.categoryLabel(e.store.filters.category)),1),v("strong",null,R(e.store.facets.byCategory[e.store.filters.category]||0),1)])):x("v-if",!0),e.store.filters.q?(u(),O("span",Ge,[t[9]||(t[9]=b(' / 关键词 "',-1)),v("em",null,R(e.store.filters.q),1),t[10]||(t[10]=b('"',-1))])):x("v-if",!0),v("span",He," / 已显示 "+R(e.store.results.length),1)],64))]),e.store.error?(u(),C(j,{key:0,type:"error","show-icon":"",message:e.store.error,closable:"",style:{margin:"12px 0"}},null,8,["message"])):x("v-if",!0),!e.store.isLoading&&e.store.results.length===0&&!e.store.error?(u(),C(T,{key:1,description:e.emptyHint,style:{"margin-top":"40px"}},null,8,["description"])):x("v-if",!0),v("div",Ke,[(u(!0),O(B,null,se(e.store.results,(g,k)=>(u(),C(e.RendererDispatcher,{key:`r-${k}-${g.id}`,event:g},null,8,["event"]))),128))]),e.store.canLoadMore?(u(),O("div",We,[c(s,{loading:e.store.isAppending,onClick:t[2]||(t[2]=g=>e.store.loadMore()),block:""},{default:m(()=>[...t[12]||(t[12]=[b(" 加载下一页 (50 条) ",-1)])]),_:1},8,["loading"])])):x("v-if",!0)])]),_:1})]),_:1})])}const tt=F(Be,[["render",Ye],["__scopeId","data-v-0f7c02cd"],["__file","/tmp/cc-web-panel-xIdTjN/repo/packages/web-panel/src/views/PdhVaultBrowser.vue"]]);export{tt as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{O as r}from"./index-DWcd5zDG.js";const o=((n,a,e)=>{r(n,`[ant-design-vue: ${a}] ${e}`)});export{o as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as o}from"./Row-DthhwX_B.js";import{U as t}from"./index-DWcd5zDG.js";import"./vendor-BvqAck49.js";import"./responsiveObserve-BzrWT5tV.js";import"./useFlexGapSupport-D4oVdliM.js";import"./styleChecker-DMw-eyn9.js";import"./index-BXMZLfd8.js";import"./icons-DP3uiYxy.js";const l=t(o);export{l as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{C as o}from"./Col-Br9IXZcE.js";import{U as t}from"./index-DWcd5zDG.js";import"./vendor-BvqAck49.js";import"./index-BXMZLfd8.js";import"./icons-DP3uiYxy.js";const s=t(o);export{s as default};
|