pi-agent-ide 0.2.1 → 0.3.0
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/CHANGELOG.md +56 -0
- package/README.md +12 -8
- package/dist/{chunk-XNXQYPVT.js → chunk-4LUW26BX.js} +1 -1
- package/dist/chunk-5MSNYFDE.js +1 -0
- package/dist/chunk-5VSE5X5R.js +2 -0
- package/dist/chunk-6EYWFBNG.js +0 -0
- package/dist/{chunk-ORAPGW7W.js → chunk-72EEL2DW.js} +1 -1
- package/dist/{chunk-T2RPMEM2.js → chunk-7UGNGK7Y.js} +1 -1
- package/dist/{chunk-STUZZM5B.js → chunk-AADJ2KIB.js} +1 -1
- package/dist/{chunk-SMSIT3CE.js → chunk-B5KB2I7J.js} +1 -1
- package/dist/chunk-BHSO2MDK.js +6 -0
- package/dist/chunk-BMOJTJJJ.js +3 -0
- package/dist/{chunk-EEH4WYI7.js → chunk-CEKXBS55.js} +1 -1
- package/dist/chunk-CW53ZTU3.js +2 -0
- package/dist/chunk-EWNWKDMP.js +4 -0
- package/dist/{chunk-VSP2QQPQ.js → chunk-GIRAEVUJ.js} +1 -1
- package/dist/{chunk-MTTKFJV6.js → chunk-GUTQ3PWL.js} +1 -1
- package/dist/chunk-HGPUI7F3.js +1 -0
- package/dist/{chunk-OBWZ5RYN.js → chunk-HKMBQLEK.js} +1 -1
- package/dist/chunk-ITSNK5YG.js +7 -0
- package/dist/chunk-KAB3AYA2.js +1 -0
- package/dist/{chunk-266RH77Z.js → chunk-LRYE2WCN.js} +1 -1
- package/dist/chunk-M5L42DWE.js +7 -0
- package/dist/chunk-M5MJP7Z2.js +1 -0
- package/dist/chunk-NMFQGKPE.js +2 -0
- package/dist/chunk-NTYXZ3EL.js +3 -0
- package/dist/{chunk-PETQCA7G.js → chunk-QDST6VIU.js} +1 -1
- package/dist/chunk-QIJMV2P2.js +2 -0
- package/dist/chunk-RHV5STR3.js +3 -0
- package/dist/chunk-ROXXK6TW.js +0 -0
- package/dist/chunk-S3ZPXWX7.js +2 -0
- package/dist/chunk-SSHZEWWV.js +1 -0
- package/dist/chunk-TPIHQYK2.js +14 -0
- package/dist/chunk-VZJIZXSH.js +14 -0
- package/dist/chunk-YHADTHQM.js +1 -0
- package/dist/{chunk-KZBAJFCV.js → chunk-Z3VC3S2T.js} +1 -1
- package/dist/{chunk-SJYDLHEF.js → chunk-ZM4L5AGN.js} +1 -1
- package/dist/{chunk-E2RESHYR.js → chunk-ZTYWHL2F.js} +1 -1
- package/dist/entry-0.js +1 -1
- package/dist/entry-1.js +1 -1
- package/dist/entry-10.js +1 -1
- package/dist/entry-11.js +1 -1
- package/dist/entry-12.js +1 -1
- package/dist/entry-13.js +1 -1
- package/dist/entry-14.js +1 -1
- package/dist/entry-2.js +1 -1
- package/dist/entry-21.js +2 -1
- package/dist/entry-22.js +1 -1
- package/dist/entry-23.js +1 -1
- package/dist/entry-24.js +1 -1
- package/dist/entry-25.js +1 -1
- package/dist/entry-26.js +12 -1
- package/dist/entry-28.js +1 -1
- package/dist/entry-29.js +1 -1
- package/dist/entry-30.js +1 -1
- package/dist/entry-31.js +4 -1
- package/dist/entry-32.js +9 -1
- package/dist/entry-33.js +1 -1
- package/dist/entry-35.js +1 -1
- package/dist/entry-36.js +1 -1
- package/dist/entry-37.js +1 -1
- package/dist/entry-38.js +1 -1
- package/dist/entry-39.js +1 -1
- package/dist/entry-4.js +1 -1
- package/dist/entry-40.js +18 -1
- package/dist/entry-41.js +1 -1
- package/dist/entry-42.js +1 -1
- package/dist/entry-43.js +1 -1
- package/dist/entry-44.js +1 -1
- package/dist/entry-45.js +7 -1
- package/dist/entry-46.js +11 -1
- package/dist/entry-47.js +1 -1
- package/dist/entry-48.js +1 -1
- package/dist/entry-49.js +1 -1
- package/dist/entry-50.js +1 -1
- package/dist/entry-51.js +1 -1
- package/dist/entry-52.js +1 -1
- package/dist/entry-53.js +1 -1
- package/dist/entry-54.js +1 -0
- package/dist/entry-55.js +0 -1
- package/dist/entry-56.js +1 -0
- package/dist/entry-57.js +0 -1
- package/dist/entry-58.js +1 -1
- package/dist/entry-59.js +1 -1
- package/dist/entry-60.js +1 -1
- package/dist/entry-61.js +1 -1
- package/dist/entry-62.js +1 -1
- package/dist/entry-63.js +1 -0
- package/dist/entry-64.js +0 -1
- package/dist/entry-65.js +1 -0
- package/dist/entry-66.js +0 -1
- package/dist/entry-67.js +1 -1
- package/dist/entry-68.js +1 -1
- package/dist/entry-69.js +1 -1
- package/dist/entry-70.js +123 -1
- package/dist/entry-71.js +30 -1
- package/dist/entry-72.js +2 -1
- package/dist/entry-73.js +1 -1
- package/dist/entry-74.js +1 -1
- package/dist/entry-75.js +1 -1
- package/dist/entry-76.js +3 -1
- package/dist/entry-77.js +1 -1
- package/dist/entry-78.js +1 -1
- package/dist/entry-79.js +1 -1
- package/dist/pi-agent-ide.js +3 -13
- package/docs/configuration.md +57 -11
- package/docs/extensions.md +4 -2
- package/docs/tools.md +7 -1
- package/node_modules/pi-agent-doctor/package.json +1 -1
- package/node_modules/pi-agent-filesystem/index.ts +2 -2
- package/node_modules/pi-agent-filesystem/package.json +6 -6
- package/node_modules/pi-agent-filesystem-image/package.json +3 -3
- package/node_modules/pi-agent-filesystem-pdf/package.json +3 -3
- package/node_modules/pi-agent-filesystem-text/package.json +3 -3
- package/node_modules/pi-agent-ide-ast/package.json +9 -9
- package/node_modules/pi-agent-ide-ast/src/ast/outline.ts +89 -19
- package/node_modules/pi-agent-ide-ast/src/extension.ts +11 -15
- package/node_modules/pi-agent-ide-ast/src/overflow-handler.ts +83 -0
- package/node_modules/pi-agent-ide-ast/src/scope-handler.ts +8 -1
- package/node_modules/pi-agent-ide-ast/src/scope-resolver.ts +1 -1
- package/node_modules/pi-agent-ide-ast/src/search-resolver.ts +83 -5
- package/node_modules/pi-agent-ide-changes/index.ts +22 -10
- package/node_modules/pi-agent-ide-changes/package.json +6 -6
- package/node_modules/pi-agent-ide-changes/src/last-text-transaction-store.ts +10 -0
- package/node_modules/pi-agent-ide-changes/src/tool-index-change.ts +5 -9
- package/node_modules/pi-agent-ide-changes/src/tool-text-undo.ts +1 -5
- package/node_modules/pi-agent-ide-formatter/package.json +3 -3
- package/node_modules/pi-agent-ide-formatter/src/formatter.ts +36 -13
- package/node_modules/pi-agent-ide-formatter/src/registry.ts +9 -1
- package/node_modules/pi-agent-ide-languages/package.json +2 -2
- package/node_modules/pi-agent-ide-lint/index.ts +49 -17
- package/node_modules/pi-agent-ide-lint/package.json +7 -7
- package/node_modules/pi-agent-ide-lint/src/registry.ts +9 -1
- package/node_modules/pi-agent-ide-lsp/index.ts +127 -20
- package/node_modules/pi-agent-ide-lsp/package.json +9 -8
- package/node_modules/pi-agent-ide-lsp/src/declaration-targets.ts +61 -0
- package/node_modules/pi-agent-ide-lsp/src/diagnostic-source.ts +25 -7
- package/node_modules/pi-agent-ide-lsp/src/lsp/client.ts +12 -1
- package/node_modules/pi-agent-ide-lsp/src/lsp/code-views.ts +40 -0
- package/node_modules/pi-agent-ide-lsp/src/lsp/manager.ts +21 -32
- package/node_modules/pi-agent-ide-lsp/src/lsp/registry.ts +15 -2
- package/node_modules/pi-agent-ide-lsp/src/lsp/rename.ts +1 -1
- package/node_modules/pi-agent-ide-lsp/src/lsp/symbol-search.ts +32 -5
- package/node_modules/pi-agent-ide-lsp/src/rename-plan.ts +138 -0
- package/node_modules/pi-agent-ide-lsp/src/search-resolver.ts +9 -2
- package/node_modules/pi-agent-image/package.json +2 -2
- package/node_modules/pi-agent-image/src/image-converter.ts +1 -1
- package/node_modules/pi-agent-invariant/package.json +1 -1
- package/node_modules/pi-agent-pdf/package.json +2 -2
- package/node_modules/pi-agent-pdf/src/pdf-converter.ts +1 -1
- package/node_modules/pi-agent-read/package.json +6 -6
- package/node_modules/pi-agent-read/src/api/plugin-protocol.ts +1 -1
- package/node_modules/pi-agent-read/src/api/read-parameters.ts +29 -0
- package/node_modules/pi-agent-read/src/api/rendering.ts +3 -0
- package/node_modules/pi-agent-read/src/api/tools/read.ts +73 -1
- package/node_modules/pi-agent-read/src/core/read-core.ts +32 -28
- package/node_modules/pi-agent-read/src/core/tools/read/native-resource-renderer.ts +74 -0
- package/node_modules/pi-agent-read/src/core/tools/read/output-truncation.ts +1 -1
- package/node_modules/pi-agent-read/src/core/tools/read/raw-read.ts +113 -0
- package/node_modules/pi-agent-read/src/core/tools/read/read-renderer.ts +87 -19
- package/node_modules/pi-agent-read/src/core/tools/read/read-result.ts +15 -0
- package/node_modules/pi-agent-read/src/core/tools/read/temp-resource-store.ts +35 -126
- package/node_modules/pi-agent-read/src/core/tools/tool-read.ts +87 -53
- package/node_modules/pi-agent-resource/package.json +1 -1
- package/node_modules/pi-agent-resource/src/content-conversion/content-description.ts +1 -8
- package/node_modules/pi-agent-resource/src/resolver.ts +2 -0
- package/node_modules/pi-agent-search/package.json +3 -3
- package/node_modules/pi-agent-search/src/api/plugin-protocol.ts +1 -1
- package/node_modules/pi-agent-search/src/api/search-parameters.ts +25 -0
- package/node_modules/pi-agent-search/src/api/search.ts +55 -1
- package/node_modules/pi-agent-search/src/core/extension.ts +8 -27
- package/node_modules/pi-agent-search/src/core/search-core.ts +38 -3
- package/node_modules/pi-agent-search-text/index.ts +82 -33
- package/node_modules/pi-agent-search-text/package.json +6 -6
- package/node_modules/pi-agent-search-text/src/file-search.ts +9 -1
- package/node_modules/pi-agent-search-text/src/resolvers.ts +1 -1
- package/node_modules/pi-agent-search-text/src/search-recipe.ts +2 -0
- package/node_modules/pi-agent-search-text/src/search-session.ts +112 -24
- package/node_modules/pi-agent-text/package.json +2 -2
- package/node_modules/pi-agent-text/src/text-converter.ts +1 -1
- package/node_modules/pi-agent-text/src/text-document.ts +5 -0
- package/node_modules/pi-agent-text/src/text-target.ts +4 -0
- package/node_modules/pi-agent-text-anchor-constant/package.json +3 -3
- package/node_modules/pi-agent-text-anchor-exact/package.json +3 -3
- package/node_modules/pi-agent-text-anchor-line-hash/index.ts +2 -6
- package/node_modules/pi-agent-text-anchor-line-hash/package.json +5 -5
- package/node_modules/pi-agent-text-anchor-line-hash/src/read-handler.ts +1 -0
- package/node_modules/pi-agent-text-editor/index.ts +1 -3
- package/node_modules/pi-agent-text-editor/package.json +34 -24
- package/node_modules/pi-agent-text-editor/runtime/entry-69.js +0 -1
- package/node_modules/pi-agent-text-editor/src/api/apply-renderer.ts +3 -0
- package/node_modules/pi-agent-text-editor/src/api/edit-completion.ts +2 -0
- package/node_modules/pi-agent-text-editor/src/api/edit-pipeline.ts +15 -0
- package/node_modules/pi-agent-text-editor/src/api/last-resolved-resource.ts +5 -0
- package/node_modules/pi-agent-text-editor/src/api/mutation-result.ts +3 -0
- package/node_modules/pi-agent-text-editor/src/api/plugin-protocol.ts +15 -1
- package/node_modules/pi-agent-text-editor/src/api/post-edit.ts +74 -1
- package/node_modules/pi-agent-text-editor/src/core/apply/execution.ts +237 -0
- package/node_modules/pi-agent-text-editor/src/core/apply/final-mutations.ts +50 -0
- package/node_modules/pi-agent-text-editor/src/core/apply/format-source.ts +11 -0
- package/node_modules/pi-agent-text-editor/src/core/apply/mixed-source.ts +208 -0
- package/node_modules/pi-agent-text-editor/src/core/apply/mutation-outcome.ts +39 -0
- package/node_modules/pi-agent-text-editor/src/core/apply/output.ts +216 -0
- package/node_modules/pi-agent-text-editor/src/core/apply/prompt.ts +45 -0
- package/node_modules/pi-agent-text-editor/src/core/apply/queue.ts +25 -0
- package/node_modules/pi-agent-text-editor/src/core/apply/renderer.ts +324 -0
- package/node_modules/pi-agent-text-editor/src/core/apply/results.ts +133 -0
- package/node_modules/pi-agent-text-editor/src/core/apply/runtime.ts +112 -0
- package/node_modules/pi-agent-text-editor/src/core/apply/tool.ts +132 -0
- package/node_modules/pi-agent-text-editor/src/core/builtin-edit-filter.ts +4 -12
- package/node_modules/pi-agent-text-editor/src/core/diff-tool.ts +205 -0
- package/node_modules/pi-agent-text-editor/src/core/extension.ts +13 -9
- package/node_modules/pi-agent-text-editor/src/core/file-operation-tools.ts +76 -0
- package/node_modules/pi-agent-text-editor/src/core/file-operations.ts +153 -0
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/diff.ts +5 -2
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/file-mutation-agent-result.ts +28 -2
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/file-mutation-result.ts +43 -0
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/final-state-fragment.ts +2 -0
- package/node_modules/pi-agent-text-editor/src/core/mutation-result/grouped-replacements.ts +81 -0
- package/node_modules/pi-agent-text-editor/src/core/post-edit-scope.ts +73 -0
- package/node_modules/pi-agent-text-editor/src/core/text-anchor-registry.ts +5 -2
- package/node_modules/pi-agent-text-editor/src/core/text-change-engine.ts +10 -2
- package/node_modules/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +40 -0
- package/node_modules/pi-agent-text-editor/src/core/text-editor-core.ts +178 -58
- package/node_modules/pi-agent-text-editor/src/core/text-mutation.ts +313 -21
- package/node_modules/pi-agent-text-editor/src/tools/text-selection.ts +45 -43
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-copy.ts +18 -8
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-delete.ts +7 -4
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-insert.ts +13 -5
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-move.ts +18 -8
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-replace.ts +9 -5
- package/node_modules/pi-agent-text-editor/src/tools/tool-text-write.ts +2 -1
- package/node_modules/pi-agent-text-editor-renderer/index.ts +93 -2
- package/node_modules/pi-agent-text-editor-renderer/package.json +6 -6
- package/node_modules/pi-agent-text-editor-renderer/src/diff-model.ts +7 -0
- package/node_modules/pi-agent-text-editor-renderer/src/diff-renderer.ts +1 -1
- package/node_modules/pi-agent-text-editor-renderer/src/diff-viewport.ts +11 -2
- package/node_modules/pi-agent-text-editor-renderer/src/frozen-viewport.ts +140 -52
- package/node_modules/pi-agent-text-editor-renderer/src/mutation-panel.ts +69 -4
- package/node_modules/pi-agent-text-editor-renderer/src/mutation-result.ts +53 -1
- package/node_modules/pi-agent-text-editor-renderer/src/persisted-result.ts +8 -2
- package/node_modules/pi-agent-text-editor-renderer/src/render-resource.ts +10 -0
- package/node_modules/pi-agent-text-editor-renderer/src/renderer.ts +24 -13
- package/node_modules/pi-agent-text-editor-renderer/src/status-summary.ts +33 -0
- package/node_modules/pi-agent-text-editor-stale-anchor/package.json +5 -5
- package/node_modules/pi-agent-tool-call-interception/package.json +3 -3
- package/node_modules/pi-agent-tool-call-interception/runtime/entry-73.js +1 -0
- package/node_modules/pi-agent-tool-call-interception/src/index.ts +3 -0
- package/node_modules/pi-agent-tool-ui/package.json +2 -2
- package/node_modules/pi-agent-web/index.ts +1 -6
- package/node_modules/pi-agent-web/package.json +7 -7
- package/node_modules/pi-agent-web/runtime/entry-75.js +2 -0
- package/node_modules/pi-agent-web/src/browser-loader.ts +1 -0
- package/node_modules/pi-agent-web-html/package.json +3 -3
- package/node_modules/pi-agent-web-html/src/html-converter.ts +1 -1
- package/node_modules/pi-agent-web-image/package.json +4 -4
- package/node_modules/pi-agent-web-pdf/package.json +4 -4
- package/node_modules/pi-agent-web-text/package.json +4 -4
- package/package.json +38 -38
- package/src/api/plugin-protocol.ts +12 -2
- package/src/api/text-editor.ts +7 -0
- package/src/api/tool-config.ts +77 -2
- package/src/code-view/diagnostic-view.ts +22 -3
- package/src/composite/builtin-extensions.ts +138 -67
- package/src/composite/extensions-config.ts +59 -0
- package/src/composite/feature-flags.ts +32 -0
- package/src/composite/module-labels.ts +55 -0
- package/src/composite/module-settings-store.ts +44 -0
- package/src/composite/module-settings.ts +132 -0
- package/src/composite/selection.ts +4 -4
- package/src/composite/settings-panel.ts +71 -0
- package/src/core/diagnostic-delivery.ts +29 -0
- package/src/core/diagnostic-entry.ts +142 -0
- package/src/core/diagnostic-store.ts +96 -23
- package/src/core/extension.ts +45 -22
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/index.ts +2 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/package.json +6 -6
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/package.json +3 -3
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/package.json +3 -3
- package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/package.json +3 -3
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/index.ts +1 -6
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/package.json +7 -7
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/package.json +3 -3
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/runtime/entry-76.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/src/html-converter.ts +1 -1
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/package.json +4 -4
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/runtime/entry-75.js +2 -0
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/src/browser-loader.ts +1 -0
- package/src/extensions/pi-agent-read/package.json +6 -6
- package/src/extensions/pi-agent-read/src/api/plugin-protocol.ts +1 -1
- package/src/extensions/pi-agent-read/src/api/read-parameters.ts +29 -0
- package/src/extensions/pi-agent-read/src/api/rendering.ts +3 -0
- package/src/extensions/pi-agent-read/src/api/tools/read.ts +73 -1
- package/src/extensions/pi-agent-read/src/core/read-core.ts +32 -28
- package/src/extensions/pi-agent-read/src/core/tools/read/native-resource-renderer.ts +74 -0
- package/src/extensions/pi-agent-read/src/core/tools/read/output-truncation.ts +1 -1
- package/src/extensions/pi-agent-read/src/core/tools/read/raw-read.ts +113 -0
- package/src/extensions/pi-agent-read/src/core/tools/read/read-renderer.ts +87 -19
- package/src/extensions/pi-agent-read/src/core/tools/read/read-result.ts +15 -0
- package/src/extensions/pi-agent-read/src/core/tools/read/temp-resource-store.ts +35 -126
- package/src/extensions/pi-agent-read/src/core/tools/tool-read.ts +87 -53
- package/src/extensions/pi-agent-search/package.json +3 -3
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/index.ts +82 -33
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/package.json +6 -6
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/file-search.ts +9 -1
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/resolvers.ts +1 -1
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-recipe.ts +2 -0
- package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-session.ts +112 -24
- package/src/extensions/pi-agent-search/src/api/plugin-protocol.ts +1 -1
- package/src/extensions/pi-agent-search/src/api/search-parameters.ts +25 -0
- package/src/extensions/pi-agent-search/src/api/search.ts +55 -1
- package/src/extensions/pi-agent-search/src/core/extension.ts +8 -27
- package/src/extensions/pi-agent-search/src/core/search-core.ts +38 -3
- package/src/extensions/pi-agent-text-editor/index.ts +1 -3
- package/src/extensions/pi-agent-text-editor/package.json +34 -24
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/package.json +3 -3
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/package.json +3 -3
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/index.ts +2 -6
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/package.json +5 -5
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/src/read-handler.ts +1 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/index.ts +93 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/package.json +6 -6
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/diff-model.ts +7 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/diff-renderer.ts +1 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/diff-viewport.ts +11 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/frozen-viewport.ts +140 -52
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/mutation-panel.ts +69 -4
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/mutation-result.ts +53 -1
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/persisted-result.ts +8 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/render-resource.ts +10 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/renderer.ts +24 -13
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/status-summary.ts +33 -0
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/package.json +5 -5
- package/src/extensions/pi-agent-text-editor/runtime/entry-69.js +0 -1
- package/src/extensions/pi-agent-text-editor/runtime/entry-70.js +2 -0
- package/src/extensions/pi-agent-text-editor/src/api/apply-renderer.ts +3 -0
- package/src/extensions/pi-agent-text-editor/src/api/edit-completion.ts +2 -0
- package/src/extensions/pi-agent-text-editor/src/api/edit-pipeline.ts +15 -0
- package/src/extensions/pi-agent-text-editor/src/api/last-resolved-resource.ts +5 -0
- package/src/extensions/pi-agent-text-editor/src/api/mutation-result.ts +3 -0
- package/src/extensions/pi-agent-text-editor/src/api/plugin-protocol.ts +15 -1
- package/src/extensions/pi-agent-text-editor/src/api/post-edit.ts +74 -1
- package/src/extensions/pi-agent-text-editor/src/core/apply/execution.ts +237 -0
- package/src/extensions/pi-agent-text-editor/src/core/apply/final-mutations.ts +50 -0
- package/src/extensions/pi-agent-text-editor/src/core/apply/format-source.ts +11 -0
- package/src/extensions/pi-agent-text-editor/src/core/apply/mixed-source.ts +208 -0
- package/src/extensions/pi-agent-text-editor/src/core/apply/mutation-outcome.ts +39 -0
- package/src/extensions/pi-agent-text-editor/src/core/apply/output.ts +216 -0
- package/src/extensions/pi-agent-text-editor/src/core/apply/prompt.ts +45 -0
- package/src/extensions/pi-agent-text-editor/src/core/apply/queue.ts +25 -0
- package/src/extensions/pi-agent-text-editor/src/core/apply/renderer.ts +324 -0
- package/src/extensions/pi-agent-text-editor/src/core/apply/results.ts +133 -0
- package/src/extensions/pi-agent-text-editor/src/core/apply/runtime.ts +112 -0
- package/src/extensions/pi-agent-text-editor/src/core/apply/tool.ts +132 -0
- package/src/extensions/pi-agent-text-editor/src/core/builtin-edit-filter.ts +4 -12
- package/src/extensions/pi-agent-text-editor/src/core/diff-tool.ts +205 -0
- package/src/extensions/pi-agent-text-editor/src/core/extension.ts +13 -9
- package/src/extensions/pi-agent-text-editor/src/core/file-operation-tools.ts +76 -0
- package/src/extensions/pi-agent-text-editor/src/core/file-operations.ts +153 -0
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/diff.ts +5 -2
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/file-mutation-agent-result.ts +28 -2
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/file-mutation-result.ts +43 -0
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/final-state-fragment.ts +2 -0
- package/src/extensions/pi-agent-text-editor/src/core/mutation-result/grouped-replacements.ts +81 -0
- package/src/extensions/pi-agent-text-editor/src/core/post-edit-scope.ts +73 -0
- package/src/extensions/pi-agent-text-editor/src/core/text-anchor-registry.ts +5 -2
- package/src/extensions/pi-agent-text-editor/src/core/text-change-engine.ts +10 -2
- package/src/extensions/pi-agent-text-editor/src/core/text-edit-batch-registrar.ts +40 -0
- package/src/extensions/pi-agent-text-editor/src/core/text-editor-core.ts +178 -58
- package/src/extensions/pi-agent-text-editor/src/core/text-mutation.ts +313 -21
- package/src/extensions/pi-agent-text-editor/src/tools/text-selection.ts +45 -43
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-copy.ts +18 -8
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-delete.ts +7 -4
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-insert.ts +13 -5
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-move.ts +18 -8
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-replace.ts +9 -5
- package/src/extensions/pi-agent-text-editor/src/tools/tool-text-write.ts +2 -1
- package/src/pi-agent-ide.ts +45 -0
- package/src/plugins/pi-agent-ide-ast/package.json +9 -9
- package/src/plugins/pi-agent-ide-ast/src/ast/outline.ts +89 -19
- package/src/plugins/pi-agent-ide-ast/src/extension.ts +11 -15
- package/src/plugins/pi-agent-ide-ast/src/overflow-handler.ts +83 -0
- package/src/plugins/pi-agent-ide-ast/src/scope-handler.ts +8 -1
- package/src/plugins/pi-agent-ide-ast/src/scope-resolver.ts +1 -1
- package/src/plugins/pi-agent-ide-ast/src/search-resolver.ts +83 -5
- package/src/plugins/pi-agent-ide-changes/index.ts +22 -10
- package/src/plugins/pi-agent-ide-changes/package.json +6 -6
- package/src/plugins/pi-agent-ide-changes/src/last-text-transaction-store.ts +10 -0
- package/src/plugins/pi-agent-ide-changes/src/tool-index-change.ts +5 -9
- package/src/plugins/pi-agent-ide-changes/src/tool-text-undo.ts +1 -5
- package/src/plugins/pi-agent-ide-diagnostics/src/extension.ts +62 -26
- package/src/plugins/pi-agent-ide-formatter/package.json +3 -3
- package/src/plugins/pi-agent-ide-formatter/src/formatter.ts +36 -13
- package/src/plugins/pi-agent-ide-formatter/src/registry.ts +9 -1
- package/src/plugins/pi-agent-ide-languages/package.json +2 -2
- package/src/plugins/pi-agent-ide-lint/index.ts +49 -17
- package/src/plugins/pi-agent-ide-lint/package.json +7 -7
- package/src/plugins/pi-agent-ide-lint/src/registry.ts +9 -1
- package/src/plugins/pi-agent-ide-lsp/index.ts +127 -20
- package/src/plugins/pi-agent-ide-lsp/package.json +9 -8
- package/src/plugins/pi-agent-ide-lsp/src/declaration-targets.ts +61 -0
- package/src/plugins/pi-agent-ide-lsp/src/diagnostic-source.ts +25 -7
- package/src/plugins/pi-agent-ide-lsp/src/lsp/client.ts +12 -1
- package/src/plugins/pi-agent-ide-lsp/src/lsp/code-views.ts +40 -0
- package/src/plugins/pi-agent-ide-lsp/src/lsp/manager.ts +21 -32
- package/src/plugins/pi-agent-ide-lsp/src/lsp/registry.ts +15 -2
- package/src/plugins/pi-agent-ide-lsp/src/lsp/rename.ts +1 -1
- package/src/plugins/pi-agent-ide-lsp/src/lsp/symbol-search.ts +32 -5
- package/src/plugins/pi-agent-ide-lsp/src/rename-plan.ts +138 -0
- package/src/plugins/pi-agent-ide-lsp/src/search-resolver.ts +9 -2
- package/src/post-edit/gate.ts +57 -15
- package/src/toolchain/types.ts +2 -0
- package/dist/chunk-2SKAED2I.js +0 -2
- package/dist/chunk-2XYXV5HS.js +0 -4
- package/dist/chunk-2ZMYT6ZC.js +0 -1
- package/dist/chunk-34ZQTTU2.js +0 -2
- package/dist/chunk-4SQQKEVD.js +0 -16
- package/dist/chunk-5BWUVAR4.js +0 -1
- package/dist/chunk-6DN7NO7L.js +0 -1
- package/dist/chunk-6SMFVLTY.js +0 -1
- package/dist/chunk-6XQQBKPE.js +0 -58
- package/dist/chunk-BYWAG6X3.js +0 -6
- package/dist/chunk-EW2KVKCN.js +0 -2
- package/dist/chunk-F6SESI3P.js +0 -4
- package/dist/chunk-GTK5AREE.js +0 -2
- package/dist/chunk-HOBTFFQR.js +0 -1
- package/dist/chunk-IMVCVPMP.js +0 -3
- package/dist/chunk-IOCABSRL.js +0 -1
- package/dist/chunk-JASLOB2X.js +0 -1
- package/dist/chunk-KH5KPBCR.js +0 -10
- package/dist/chunk-KNMWCDDK.js +0 -7
- package/dist/chunk-KYVOMBO5.js +0 -1
- package/dist/chunk-L4FA6OD4.js +0 -1
- package/dist/chunk-LFV6G5Z3.js +0 -1
- package/dist/chunk-LGN7EJYR.js +0 -13
- package/dist/chunk-MB6VVVAF.js +0 -2
- package/dist/chunk-MTQSGWZJ.js +0 -1
- package/dist/chunk-NI2NK4JU.js +0 -1
- package/dist/chunk-NXHPO7ER.js +0 -6
- package/dist/chunk-OFHVDY4Q.js +0 -2
- package/dist/chunk-OIL6BB2S.js +0 -33
- package/dist/chunk-ONWUJXUR.js +0 -1
- package/dist/chunk-PODWLGNO.js +0 -6
- package/dist/chunk-QZANC2IG.js +0 -1
- package/dist/chunk-SSZB66C3.js +0 -3
- package/dist/chunk-TG6H6EOI.js +0 -1
- package/dist/chunk-UTTW55S2.js +0 -1
- package/dist/chunk-VEJGSURY.js +0 -8
- package/dist/chunk-W3XYKJ5H.js +0 -1
- package/dist/chunk-XGUAL3CA.js +0 -1
- package/dist/chunk-YPHXLAQF.js +0 -1
- package/dist/chunk-ZIHEF6K3.js +0 -3
- package/dist/entry-80.js +0 -1
- package/node_modules/pi-agent-read/src/core/tools/read/views.ts +0 -29
- package/node_modules/pi-agent-text-editor/src/core/tool-description.ts +0 -14
- package/node_modules/pi-agent-text-editor-argument-order/index.ts +0 -26
- package/node_modules/pi-agent-text-editor-argument-order/package.json +0 -16
- package/node_modules/pi-agent-text-editor-argument-order/src/argument-order-guard.ts +0 -100
- package/node_modules/pi-agent-text-editor-overwrite/index.ts +0 -365
- package/node_modules/pi-agent-text-editor-overwrite/package.json +0 -17
- package/node_modules/pi-agent-text-editor-stale-anchor/runtime/entry-73.js +0 -2
- package/node_modules/pi-agent-tool-ui/runtime/entry-75.js +0 -1
- package/node_modules/pi-agent-web-text/runtime/entry-80.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/runtime/entry-80.js +0 -2
- package/src/extensions/pi-agent-read/extensions/pi-agent-web/runtime/entry-76.js +0 -2
- package/src/extensions/pi-agent-read/src/core/tools/read/views.ts +0 -29
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-argument-order/index.ts +0 -26
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-argument-order/package.json +0 -16
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-argument-order/runtime/entry-70.js +0 -2
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-argument-order/src/argument-order-guard.ts +0 -100
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-overwrite/index.ts +0 -365
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-overwrite/package.json +0 -17
- package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/runtime/entry-73.js +0 -2
- package/src/extensions/pi-agent-text-editor/src/core/tool-description.ts +0 -14
- /package/dist/{chunk-3H2EU7VQ.js → chunk-4U2GUKNJ.js} +0 -0
- /package/node_modules/{pi-agent-text-editor-argument-order → pi-agent-text-editor}/runtime/entry-70.js +0 -0
- /package/node_modules/{pi-agent-text-editor-overwrite → pi-agent-text-editor-renderer}/runtime/entry-71.js +0 -0
- /package/node_modules/{pi-agent-text-editor-renderer → pi-agent-text-editor-stale-anchor}/runtime/entry-72.js +0 -0
- /package/node_modules/{pi-agent-tool-call-interception → pi-agent-tool-ui}/runtime/entry-74.js +0 -0
- /package/node_modules/{pi-agent-web → pi-agent-web-html}/runtime/entry-76.js +0 -0
- /package/node_modules/{pi-agent-web-html → pi-agent-web-image}/runtime/entry-77.js +0 -0
- /package/node_modules/{pi-agent-web-image → pi-agent-web-pdf}/runtime/entry-78.js +0 -0
- /package/node_modules/{pi-agent-web-pdf → pi-agent-web-text}/runtime/entry-79.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-html → pi-agent-web-image}/runtime/entry-77.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-image → pi-agent-web-pdf}/runtime/entry-78.js +0 -0
- /package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/{pi-agent-web-pdf → pi-agent-web-text}/runtime/entry-79.js +0 -0
- /package/src/extensions/pi-agent-text-editor/plugins/{pi-agent-text-editor-overwrite → pi-agent-text-editor-renderer}/runtime/entry-71.js +0 -0
- /package/src/extensions/pi-agent-text-editor/plugins/{pi-agent-text-editor-renderer → pi-agent-text-editor-stale-anchor}/runtime/entry-72.js +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { requiredValue } from "pi-agent-invariant";
|
|
2
|
+
import { createDiffModel, DIFF_CONTEXT_LINES, type DiffModel, type DiffRow } from "./diff-model.js";
|
|
2
3
|
|
|
3
4
|
import type { MutationRenderResource } from "./render-resource.js";
|
|
4
5
|
import type {
|
|
@@ -9,9 +10,9 @@ import type {
|
|
|
9
10
|
interface FrozenLineWindow {
|
|
10
11
|
readonly beforeStart: number;
|
|
11
12
|
readonly beforeEnd: number;
|
|
12
|
-
|
|
13
|
-
readonly
|
|
14
|
-
readonly
|
|
13
|
+
|
|
14
|
+
readonly seedStart: number;
|
|
15
|
+
readonly seedEnd: number;
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
interface FrozenResourceViewport {
|
|
@@ -48,7 +49,7 @@ export function freezeMutationViewports(
|
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
export function projectFinalResources(
|
|
51
|
-
resources: readonly
|
|
52
|
+
resources: readonly MutationRenderResource[],
|
|
52
53
|
frozen: FrozenMutationViewports | undefined,
|
|
53
54
|
): readonly MutationRenderResource[] {
|
|
54
55
|
return resources.map((resource) => {
|
|
@@ -63,7 +64,14 @@ export function projectFinalResources(
|
|
|
63
64
|
|
|
64
65
|
return {
|
|
65
66
|
...resource,
|
|
66
|
-
model: createFrozenModel(
|
|
67
|
+
model: createFrozenModel(
|
|
68
|
+
resource.beforeContent,
|
|
69
|
+
resource.afterContent,
|
|
70
|
+
viewport,
|
|
71
|
+
resource.diffPeerRanges,
|
|
72
|
+
|
|
73
|
+
resource.finalLineOwnership,
|
|
74
|
+
),
|
|
67
75
|
};
|
|
68
76
|
});
|
|
69
77
|
}
|
|
@@ -74,7 +82,6 @@ function freezeWindows(
|
|
|
74
82
|
): FrozenLineWindow[] {
|
|
75
83
|
const windows: FrozenLineWindow[] = [];
|
|
76
84
|
let group: DiffRow[] = [];
|
|
77
|
-
let omittedBefore: number | undefined;
|
|
78
85
|
|
|
79
86
|
const flush = (): void => {
|
|
80
87
|
if (group.length === 0) {
|
|
@@ -84,28 +91,34 @@ function freezeWindows(
|
|
|
84
91
|
const beforeLines = group.flatMap((row) =>
|
|
85
92
|
row.beforeLine === undefined ? [] : [row.beforeLine],
|
|
86
93
|
);
|
|
87
|
-
const afterLines = group.flatMap((row) => (row.afterLine === undefined ? [] : [row.afterLine]));
|
|
88
94
|
const beforeAnchor = lineAtRange(resource.beforeContent, resource.beforeRanges?.at(-1));
|
|
89
|
-
const afterAnchor = lineAtRange(resource.afterContent, resource.ranges.at(-1));
|
|
90
95
|
const beforeStart = beforeLines.length === 0 ? beforeAnchor - 1 : Math.min(...beforeLines) - 1;
|
|
91
|
-
const afterStart = afterLines.length === 0 ? afterAnchor - 1 : Math.min(...afterLines) - 1;
|
|
92
96
|
const beforeEnd = beforeLines.length === 0 ? beforeStart : Math.max(...beforeLines);
|
|
93
|
-
const
|
|
97
|
+
const changedBefore = group.flatMap((row) =>
|
|
98
|
+
row.changed && row.beforeLine !== undefined ? [row.beforeLine] : [],
|
|
99
|
+
);
|
|
100
|
+
const firstChanged = group.findIndex((row) => row.changed);
|
|
101
|
+
const precedingLine = group
|
|
102
|
+
.slice(0, firstChanged)
|
|
103
|
+
.findLast((row) => row.beforeLine !== undefined)?.beforeLine;
|
|
104
|
+
const followingLine = group
|
|
105
|
+
.slice(firstChanged + 1)
|
|
106
|
+
.find((row) => row.beforeLine !== undefined)?.beforeLine;
|
|
107
|
+
const insertionAnchor =
|
|
108
|
+
precedingLine ?? (followingLine === undefined ? beforeAnchor - 1 : followingLine - 1);
|
|
94
109
|
windows.push({
|
|
95
110
|
beforeStart,
|
|
96
111
|
beforeEnd,
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
112
|
+
|
|
113
|
+
seedStart: changedBefore.length === 0 ? insertionAnchor : Math.min(...changedBefore) - 1,
|
|
114
|
+
seedEnd: changedBefore.length === 0 ? insertionAnchor : Math.max(...changedBefore),
|
|
100
115
|
});
|
|
101
116
|
group = [];
|
|
102
|
-
omittedBefore = undefined;
|
|
103
117
|
};
|
|
104
118
|
|
|
105
119
|
for (const row of model.rows) {
|
|
106
120
|
if (row.kind === "omitted") {
|
|
107
121
|
flush();
|
|
108
|
-
omittedBefore = row.omitted;
|
|
109
122
|
} else {
|
|
110
123
|
group.push(row);
|
|
111
124
|
}
|
|
@@ -119,57 +132,132 @@ function createFrozenModel(
|
|
|
119
132
|
beforeContent: string,
|
|
120
133
|
afterContent: string,
|
|
121
134
|
viewport: FrozenResourceViewport,
|
|
135
|
+
|
|
136
|
+
peerRanges: MutationRenderResource["diffPeerRanges"] = [],
|
|
137
|
+
|
|
138
|
+
finalLineOwnership?: MutationRenderResource["finalLineOwnership"],
|
|
122
139
|
): DiffModel {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
const
|
|
140
|
+
// Align the complete documents before selecting local rows. Slicing at old
|
|
141
|
+
// after-line bounds would turn shifted context into fictitious changes.
|
|
142
|
+
const full = createDiffModel(beforeContent, afterContent, [], { project: false });
|
|
143
|
+
|
|
144
|
+
if (full.rows.length === 0 && beforeContent !== afterContent) {
|
|
145
|
+
return { ...full, omittedChanges: { outside: 0, ambiguous: 0, unavailable: true } };
|
|
146
|
+
}
|
|
147
|
+
const selected = new Set<number>();
|
|
148
|
+
let outside = 0;
|
|
149
|
+
let ambiguous = 0;
|
|
150
|
+
let beforeLine = 0;
|
|
126
151
|
|
|
127
|
-
for (
|
|
128
|
-
|
|
129
|
-
|
|
152
|
+
for (let index = 0; index < full.rows.length;) {
|
|
153
|
+
const row = requiredValue(full.rows[index]);
|
|
154
|
+
if (!row.changed) {
|
|
155
|
+
beforeLine = row.beforeLine ?? beforeLine;
|
|
156
|
+
index++;
|
|
157
|
+
continue;
|
|
130
158
|
}
|
|
131
159
|
|
|
132
|
-
const
|
|
133
|
-
const
|
|
134
|
-
const
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
160
|
+
const start = index;
|
|
161
|
+
const anchor = beforeLine;
|
|
162
|
+
const originalLines: number[] = [];
|
|
163
|
+
while (index < full.rows.length && requiredValue(full.rows[index]).changed) {
|
|
164
|
+
const line = requiredValue(full.rows[index]).beforeLine;
|
|
165
|
+
if (line !== undefined) {
|
|
166
|
+
originalLines.push(line);
|
|
167
|
+
beforeLine = line;
|
|
168
|
+
}
|
|
169
|
+
index++;
|
|
170
|
+
}
|
|
171
|
+
const first = originalLines.length === 0 ? anchor : Math.min(...originalLines) - 1;
|
|
172
|
+
const last = originalLines.length === 0 ? anchor : Math.max(...originalLines);
|
|
173
|
+
const touching = viewport.windows.filter((window) =>
|
|
174
|
+
overlaps(first, last, window.seedStart, window.seedEnd),
|
|
146
175
|
);
|
|
147
|
-
|
|
176
|
+
const peerTouches = peerRanges.some((range) => {
|
|
177
|
+
const start = lineAtRange(beforeContent, range) - 1;
|
|
178
|
+
const end = lineAtRange(beforeContent, {
|
|
179
|
+
from: Math.max(range.from, range.to - 1),
|
|
180
|
+
to: range.to,
|
|
181
|
+
});
|
|
182
|
+
return overlaps(first, last, start, range.from === range.to ? start : end);
|
|
183
|
+
});
|
|
184
|
+
if (peerTouches) {
|
|
185
|
+
if (touching.length > 0) {
|
|
186
|
+
// A shared hunk has no reliable owner for newly inserted rows. Keep
|
|
187
|
+
// original-line matches that belong only to this call, not its peers.
|
|
188
|
+
for (let local = start; local < index; local++) {
|
|
189
|
+
const line = requiredValue(full.rows[local]).beforeLine;
|
|
190
|
+
|
|
191
|
+
const afterLine = requiredValue(full.rows[local]).afterLine;
|
|
192
|
+
if (line === undefined && afterLine !== undefined && finalLineOwnership !== undefined) {
|
|
193
|
+
const own = finalLineOwnership.own.includes(afterLine);
|
|
194
|
+
const peer = finalLineOwnership.peers.includes(afterLine);
|
|
195
|
+
if (own && !peer) selected.add(local);
|
|
196
|
+
else if (own || !peer) ambiguous++;
|
|
197
|
+
continue;
|
|
198
|
+
}
|
|
199
|
+
const own =
|
|
200
|
+
line !== undefined &&
|
|
201
|
+
touching.some((window) => overlaps(line - 1, line, window.seedStart, window.seedEnd));
|
|
202
|
+
const peer =
|
|
203
|
+
line !== undefined &&
|
|
204
|
+
peerRanges.some((range) => {
|
|
205
|
+
const first = lineAtRange(beforeContent, range) - 1;
|
|
206
|
+
const last = lineAtRange(beforeContent, {
|
|
207
|
+
from: Math.max(range.from, range.to - 1),
|
|
208
|
+
to: range.to,
|
|
209
|
+
});
|
|
210
|
+
return overlaps(line - 1, line, first, last);
|
|
211
|
+
});
|
|
212
|
+
if (own && !peer) selected.add(local);
|
|
213
|
+
else if (!peer || own) ambiguous++;
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
continue;
|
|
217
|
+
}
|
|
218
|
+
if (touching.length === 0) {
|
|
219
|
+
outside += index - start;
|
|
220
|
+
continue;
|
|
221
|
+
}
|
|
222
|
+
if (!touching.some((window) => first >= window.beforeStart && last <= window.beforeEnd)) {
|
|
223
|
+
ambiguous += index - start;
|
|
224
|
+
continue;
|
|
225
|
+
}
|
|
226
|
+
for (let local = start; local < index; local++) selected.add(local);
|
|
148
227
|
}
|
|
149
228
|
|
|
150
|
-
const
|
|
229
|
+
for (const index of [...selected]) {
|
|
230
|
+
for (
|
|
231
|
+
let local = Math.max(0, index - DIFF_CONTEXT_LINES);
|
|
232
|
+
local < Math.min(full.rows.length, index + DIFF_CONTEXT_LINES + 1);
|
|
233
|
+
local++
|
|
234
|
+
) {
|
|
235
|
+
if (!requiredValue(full.rows[local]).changed) selected.add(local);
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
const rows: DiffRow[] = [];
|
|
239
|
+
let previous = -1;
|
|
240
|
+
for (const index of [...selected].sort((a, b) => a - b)) {
|
|
241
|
+
if (previous !== -1 && index > previous + 1) {
|
|
242
|
+
rows.push({ kind: "omitted", text: "", changed: false, omitted: index - previous - 1 });
|
|
243
|
+
}
|
|
244
|
+
rows.push(requiredValue(full.rows[index]));
|
|
245
|
+
previous = index;
|
|
246
|
+
}
|
|
151
247
|
return {
|
|
152
248
|
rows,
|
|
153
249
|
added: rows.filter(({ kind }) => kind === "added").length,
|
|
154
250
|
modified: rows.filter(({ kind }) => kind === "modified").length,
|
|
155
251
|
removed: rows.filter(({ kind }) => kind === "removed").length,
|
|
156
|
-
focusRow,
|
|
252
|
+
focusRow: focusRowAt(rows, viewport.focusAfterLine),
|
|
253
|
+
...(outside + ambiguous > 0 && { omittedChanges: { outside, ambiguous } }),
|
|
157
254
|
};
|
|
158
255
|
}
|
|
159
256
|
|
|
160
|
-
function
|
|
161
|
-
if (
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
const normalized = content.replaceAll("\r\n", "\n");
|
|
166
|
-
const lines = normalized.split("\n");
|
|
167
|
-
|
|
168
|
-
if (normalized.endsWith("\n")) {
|
|
169
|
-
lines.pop();
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
return lines;
|
|
257
|
+
function overlaps(first: number, last: number, start: number, end: number): boolean {
|
|
258
|
+
if (first === last) return first >= start && first <= end;
|
|
259
|
+
if (start === end) return start >= first && start <= last;
|
|
260
|
+
return first < end && last > start;
|
|
173
261
|
}
|
|
174
262
|
|
|
175
263
|
function lineAtRange(content: string, range: TextMutationPreviewRange | undefined): number {
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import { getLanguageFromPath, highlightCode, type Theme } from "@earendil-works/pi-coding-agent";
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Box,
|
|
4
|
+
type Component,
|
|
5
|
+
truncateToWidth,
|
|
6
|
+
visibleWidth,
|
|
7
|
+
wrapTextWithAnsi,
|
|
8
|
+
} from "@earendil-works/pi-tui";
|
|
3
9
|
import {
|
|
4
10
|
preserveEnclosingBackground,
|
|
5
11
|
renderToolCallDetails,
|
|
@@ -10,6 +16,7 @@ import { createDiffModel, type DiffModel, type DiffRow } from "./diff-model.js";
|
|
|
10
16
|
import { type DiffPanelResource, renderDiffPanel } from "./diff-renderer.js";
|
|
11
17
|
|
|
12
18
|
import type { MutationRenderResource } from "./render-resource.js";
|
|
19
|
+
import { summarizeStatuses } from "./status-summary.js";
|
|
13
20
|
|
|
14
21
|
type ToolBackground = "toolPendingBg" | "toolSuccessBg" | "toolErrorBg";
|
|
15
22
|
|
|
@@ -191,9 +198,12 @@ export class MutationPanel implements Component {
|
|
|
191
198
|
const details = this.headerExpanded
|
|
192
199
|
? renderToolCallDetails(this.headerDetails, this.theme, contentWidth)
|
|
193
200
|
: [];
|
|
194
|
-
const tail =
|
|
195
|
-
const lines = [...summary, ...details, ...panels, ...
|
|
196
|
-
|
|
201
|
+
const tail = renderTail(this.resources, this.theme, contentWidth);
|
|
202
|
+
const lines = [...summary, ...details, ...panels, ...tail].map((line) =>
|
|
203
|
+
preserveEnclosingBackground(
|
|
204
|
+
truncateToWidth(line, contentWidth),
|
|
205
|
+
this.theme.getBgAnsi(this.background),
|
|
206
|
+
),
|
|
197
207
|
);
|
|
198
208
|
this.cache = {
|
|
199
209
|
width: contentWidth,
|
|
@@ -221,6 +231,61 @@ export class MutationPanel implements Component {
|
|
|
221
231
|
}
|
|
222
232
|
}
|
|
223
233
|
|
|
234
|
+
function renderTail(
|
|
235
|
+
resources: readonly MutationRenderResource[],
|
|
236
|
+
theme: Theme,
|
|
237
|
+
width: number,
|
|
238
|
+
): string[] {
|
|
239
|
+
const counts = renderCounts(resources, theme);
|
|
240
|
+
const grouped = summarizeStatuses(
|
|
241
|
+
resources.map((resource) => ({
|
|
242
|
+
path: resource.path,
|
|
243
|
+
diffStatuses: [
|
|
244
|
+
...(resource.diffStatuses ?? []),
|
|
245
|
+
...(resource.model?.omittedChanges === undefined
|
|
246
|
+
? []
|
|
247
|
+
: [
|
|
248
|
+
{
|
|
249
|
+
text: resource.model.omittedChanges.unavailable
|
|
250
|
+
? "Local diff unavailable: alignment limit reached"
|
|
251
|
+
: [
|
|
252
|
+
...(resource.model.omittedChanges.outside > 0
|
|
253
|
+
? [
|
|
254
|
+
`${resource.model.omittedChanges.outside} changed rows outside this area`,
|
|
255
|
+
]
|
|
256
|
+
: []),
|
|
257
|
+
...(resource.model.omittedChanges.ambiguous > 0
|
|
258
|
+
? [`${resource.model.omittedChanges.ambiguous} changed rows unassigned`]
|
|
259
|
+
: []),
|
|
260
|
+
].join("; "),
|
|
261
|
+
tone: "warning" as const,
|
|
262
|
+
},
|
|
263
|
+
]),
|
|
264
|
+
],
|
|
265
|
+
})),
|
|
266
|
+
);
|
|
267
|
+
const statuses = grouped.statuses.map(({ status, paths }) => {
|
|
268
|
+
const label = resources.length > 1 ? `${paths.join(", ")}: ${status.text}` : status.text;
|
|
269
|
+
return theme.fg(status.tone ?? "muted", label.replace(/[\u0000-\u001f\u007f-\u009f]/g, " "));
|
|
270
|
+
});
|
|
271
|
+
if (grouped.formatted.length > 0) {
|
|
272
|
+
const by =
|
|
273
|
+
grouped.formatters.length === 1
|
|
274
|
+
? grouped.formatters[0]
|
|
275
|
+
: `${grouped.formatters.length} formatters`;
|
|
276
|
+
const label =
|
|
277
|
+
resources.length === 1
|
|
278
|
+
? `Formatted (${by})`
|
|
279
|
+
: `Formatted ${grouped.formatted.length} files by ${by}`;
|
|
280
|
+
statuses.unshift(theme.fg("success", label.replace(/[\u0000-\u001f\u007f-\u009f]/g, " ")));
|
|
281
|
+
}
|
|
282
|
+
const text = [counts, ...statuses]
|
|
283
|
+
.filter((item) => item !== undefined)
|
|
284
|
+
.join(theme.fg("dim", " · "));
|
|
285
|
+
if (text.length === 0) return [];
|
|
286
|
+
return visibleWidth(text) <= width ? [text] : wrapTextWithAnsi(text, Math.max(1, width));
|
|
287
|
+
}
|
|
288
|
+
|
|
224
289
|
function renderCounts(
|
|
225
290
|
resources: readonly MutationRenderResource[],
|
|
226
291
|
theme: Theme,
|
|
@@ -27,9 +27,10 @@ export function resolveMutationResultResources(
|
|
|
27
27
|
): readonly MutationRenderResource[] {
|
|
28
28
|
const stored = details?.mutationRender;
|
|
29
29
|
if (stored !== undefined) {
|
|
30
|
-
return stored.map(({ path, model }) => ({
|
|
30
|
+
return stored.map(({ path, model, diffStatuses }) => ({
|
|
31
31
|
path,
|
|
32
32
|
model,
|
|
33
|
+
...(diffStatuses === undefined ? {} : { diffStatuses }),
|
|
33
34
|
ranges: [],
|
|
34
35
|
beforeContent: "",
|
|
35
36
|
afterContent: "",
|
|
@@ -62,6 +63,12 @@ function finalResource(result: FileMutationResult): readonly MutationRenderResou
|
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
const replayed = changes === undefined ? undefined : replayChanges(before ?? "", changes);
|
|
66
|
+
const finalLineOwnership = unchangedBatchOwnership(
|
|
67
|
+
before ?? "",
|
|
68
|
+
afterContent,
|
|
69
|
+
changes,
|
|
70
|
+
result.data.diffPeerRanges,
|
|
71
|
+
);
|
|
65
72
|
const typingIdentity =
|
|
66
73
|
replayed === afterContent
|
|
67
74
|
? {
|
|
@@ -76,12 +83,57 @@ function finalResource(result: FileMutationResult): readonly MutationRenderResou
|
|
|
76
83
|
ranges: [],
|
|
77
84
|
beforeContent: before ?? "",
|
|
78
85
|
...(typingIdentity === undefined ? {} : { typingIdentity }),
|
|
86
|
+
|
|
87
|
+
...(finalLineOwnership === undefined ? {} : { finalLineOwnership }),
|
|
88
|
+
|
|
89
|
+
...(result.data.diffPeerRanges === undefined
|
|
90
|
+
? {}
|
|
91
|
+
: { diffPeerRanges: result.data.diffPeerRanges }),
|
|
92
|
+
...(result.data.diffStatuses === undefined
|
|
93
|
+
? {}
|
|
94
|
+
: { diffStatuses: result.data.diffStatuses }),
|
|
95
|
+
|
|
79
96
|
afterContent,
|
|
80
97
|
},
|
|
81
98
|
];
|
|
82
99
|
});
|
|
83
100
|
}
|
|
84
101
|
|
|
102
|
+
function unchangedBatchOwnership(
|
|
103
|
+
before: string,
|
|
104
|
+
after: string,
|
|
105
|
+
own: readonly PersistedTextChange[] | undefined,
|
|
106
|
+
peers: FileMutationResult["data"]["diffPeerRanges"],
|
|
107
|
+
): MutationRenderResource["finalLineOwnership"] {
|
|
108
|
+
if (own === undefined || peers === undefined) return undefined;
|
|
109
|
+
const edits = [
|
|
110
|
+
...own.map(({ fromA: from, toA: to, insertedText: insert }) => ({
|
|
111
|
+
from,
|
|
112
|
+
to,
|
|
113
|
+
insert,
|
|
114
|
+
own: true,
|
|
115
|
+
})),
|
|
116
|
+
...peers.map((peer) => ({ ...peer, own: false })),
|
|
117
|
+
].sort((a, b) => a.from - b.from);
|
|
118
|
+
const ownership = { own: new Set<number>(), peers: new Set<number>() };
|
|
119
|
+
let content = "";
|
|
120
|
+
let offset = 0;
|
|
121
|
+
for (const edit of edits) {
|
|
122
|
+
if (edit.from < offset || edit.to < edit.from || edit.to > before.length) return undefined;
|
|
123
|
+
content += before.slice(offset, edit.from);
|
|
124
|
+
const firstLine = content.split("\n").length;
|
|
125
|
+
content += edit.insert;
|
|
126
|
+
if (edit.insert.length > 0) {
|
|
127
|
+
const lastLine = content.slice(0, -1).split("\n").length;
|
|
128
|
+
for (let line = firstLine; line <= lastLine; line++)
|
|
129
|
+
ownership[edit.own ? "own" : "peers"].add(line);
|
|
130
|
+
}
|
|
131
|
+
offset = edit.to;
|
|
132
|
+
}
|
|
133
|
+
if (content + before.slice(offset) !== after) return undefined;
|
|
134
|
+
return { own: [...ownership.own], peers: [...ownership.peers] };
|
|
135
|
+
}
|
|
136
|
+
|
|
85
137
|
function persistedViewports(
|
|
86
138
|
results: readonly FileMutationResult[],
|
|
87
139
|
): FrozenMutationViewports | undefined {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
FileMutationResult,
|
|
3
3
|
type FileMutationBatchResult,
|
|
4
|
+
type MutationDiffStatus,
|
|
4
5
|
} from "pi-agent-text-editor/api/mutation-result";
|
|
5
6
|
import { resolveMutationResultResources } from "./mutation-result.js";
|
|
6
7
|
import type { DiffModel } from "./diff-model.js";
|
|
@@ -9,6 +10,7 @@ import type { DiffModel } from "./diff-model.js";
|
|
|
9
10
|
export interface PersistedMutationResource {
|
|
10
11
|
readonly path: string;
|
|
11
12
|
readonly model: DiffModel;
|
|
13
|
+
readonly diffStatuses?: readonly MutationDiffStatus[];
|
|
12
14
|
}
|
|
13
15
|
|
|
14
16
|
/** Completed history owns diff fragments, not the engine's document snapshots. */
|
|
@@ -35,13 +37,17 @@ export function compactMutationDetails(details: FileMutationBatchResult): Persis
|
|
|
35
37
|
inputEdits: _input,
|
|
36
38
|
beforeReadText: _read,
|
|
37
39
|
rawChanges: _changes,
|
|
40
|
+
|
|
41
|
+
diffPeerRanges: _peerRanges,
|
|
38
42
|
diffs: _diffs,
|
|
39
43
|
...data
|
|
40
44
|
} = result.data;
|
|
41
45
|
return new FileMutationResult(data);
|
|
42
46
|
}),
|
|
43
|
-
mutationRender: resources.flatMap(({ path, model }) =>
|
|
44
|
-
model === undefined
|
|
47
|
+
mutationRender: resources.flatMap(({ path, model, diffStatuses }) =>
|
|
48
|
+
model === undefined
|
|
49
|
+
? []
|
|
50
|
+
: [{ path, model, ...(diffStatuses === undefined ? {} : { diffStatuses }) }],
|
|
45
51
|
),
|
|
46
52
|
};
|
|
47
53
|
}
|
|
@@ -1,8 +1,18 @@
|
|
|
1
|
+
import type { MutationDiffStatus } from "pi-agent-text-editor/api/mutation-result";
|
|
1
2
|
import type { DiffModel } from "./diff-model.js";
|
|
2
3
|
import type { TextMutationPreviewResource } from "pi-agent-text-editor/api/mutation-preview";
|
|
3
4
|
|
|
4
5
|
export interface MutationRenderResource extends TextMutationPreviewResource {
|
|
5
6
|
readonly model?: DiffModel;
|
|
7
|
+
readonly diffStatuses?: readonly MutationDiffStatus[];
|
|
8
|
+
|
|
9
|
+
/** Original spans owned by sibling batch calls, excluded from this local diff. */
|
|
10
|
+
readonly diffPeerRanges?: readonly { readonly from: number; readonly to: number }[];
|
|
11
|
+
/** Exact final line ownership when postprocessing left the requested batch text unchanged. */
|
|
12
|
+
readonly finalLineOwnership?: {
|
|
13
|
+
readonly own: readonly number[];
|
|
14
|
+
readonly peers: readonly number[];
|
|
15
|
+
};
|
|
6
16
|
readonly cursorOffset?: number;
|
|
7
17
|
/** Original mutation spans retained when final rendering uses an unscoped semantic diff. */
|
|
8
18
|
readonly typingIdentity?: {
|
|
@@ -88,16 +88,18 @@ interface RenderState {
|
|
|
88
88
|
export function registerMutationRenderers(
|
|
89
89
|
api: TextEditorPluginApi,
|
|
90
90
|
animationPressure?: MutationAnimationPressure,
|
|
91
|
+
animationsEnabled: () => boolean = () => true,
|
|
91
92
|
): void {
|
|
92
93
|
api.onMutationTool((registration) => {
|
|
93
|
-
api.addToolRenderer(createRenderer(api, registration, animationPressure));
|
|
94
|
+
api.addToolRenderer(createRenderer(api, registration, animationPressure, animationsEnabled));
|
|
94
95
|
});
|
|
95
96
|
}
|
|
96
97
|
|
|
97
98
|
function createRenderer(
|
|
98
99
|
api: TextEditorPluginApi,
|
|
99
100
|
registration: AnyTextMutationToolRegistration,
|
|
100
|
-
animationPressure
|
|
101
|
+
animationPressure: MutationAnimationPressure | undefined,
|
|
102
|
+
animationsEnabled: () => boolean,
|
|
101
103
|
): TextEditorToolRendererRegistration {
|
|
102
104
|
const tool = registration.name;
|
|
103
105
|
|
|
@@ -161,7 +163,7 @@ function createRenderer(
|
|
|
161
163
|
const isArgumentsComplete = context.argsComplete;
|
|
162
164
|
const key = `${isArgumentsComplete ? "complete" : "typing"}:${JSON.stringify(input)}`;
|
|
163
165
|
|
|
164
|
-
if (generated !== undefined) {
|
|
166
|
+
if (generated !== undefined && animationsEnabled()) {
|
|
165
167
|
const typing = (state.typing ??= new TypingInterpolation());
|
|
166
168
|
|
|
167
169
|
state.releaseAnimationPressure ??= animationPressure?.track(context.toolCallId, () => {
|
|
@@ -700,6 +702,14 @@ function mutationCallDetails(
|
|
|
700
702
|
});
|
|
701
703
|
}
|
|
702
704
|
|
|
705
|
+
/** Render a written call header without preparing previews or reading files. */
|
|
706
|
+
export function renderWrittenMutationHeader(
|
|
707
|
+
registration: AnyTextMutationToolRegistration,
|
|
708
|
+
input: Readonly<Record<string, unknown>>,
|
|
709
|
+
theme: Theme,
|
|
710
|
+
): string {
|
|
711
|
+
return renderHeader(registration, input, undefined, theme, undefined, false);
|
|
712
|
+
}
|
|
703
713
|
function renderHeader(
|
|
704
714
|
registration: AnyTextMutationToolRegistration,
|
|
705
715
|
input: Readonly<Record<string, unknown>>,
|
|
@@ -768,18 +778,19 @@ function renderAnchorRange(
|
|
|
768
778
|
if (field === undefined) {
|
|
769
779
|
return undefined;
|
|
770
780
|
}
|
|
771
|
-
const state = anchorRenderPatch?.[field];
|
|
772
|
-
if (state?.kind === "resolved") {
|
|
773
|
-
return singleLine(expanded ? state.full : state.compact);
|
|
774
|
-
}
|
|
775
|
-
if (state?.kind === "failed") {
|
|
776
|
-
return "selected range";
|
|
777
|
-
}
|
|
778
781
|
const raw = stringValue(input[field]);
|
|
779
|
-
if (raw
|
|
780
|
-
|
|
782
|
+
if (raw !== undefined) {
|
|
783
|
+
const displayed = singleLine(raw);
|
|
784
|
+
const structured =
|
|
785
|
+
/^(?:\d+#[0-9A-F]+|CHANGE#[0-9A-F]+|SEARCH#|scope-(?:begin|end)-|begin$|end$)/.test(raw);
|
|
786
|
+
return expanded || structured || displayed.length <= 100
|
|
787
|
+
? displayed
|
|
788
|
+
: `${displayed.slice(0, 60)}…${displayed.slice(-30)} (${raw.length} chars)`;
|
|
781
789
|
}
|
|
782
|
-
|
|
790
|
+
const state = anchorRenderPatch?.[field];
|
|
791
|
+
return state?.kind === "resolved"
|
|
792
|
+
? singleLine(expanded ? state.full : state.compact)
|
|
793
|
+
: undefined;
|
|
783
794
|
};
|
|
784
795
|
return range(renderField(fields.at(0)), renderField(fields.at(1)), theme);
|
|
785
796
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { MutationDiffStatus } from "pi-agent-text-editor/api/mutation-result";
|
|
2
|
+
|
|
3
|
+
/** Aggregate successful formatting by unique file and tool; leave failures identifiable. */
|
|
4
|
+
export function summarizeStatuses(
|
|
5
|
+
resources: readonly {
|
|
6
|
+
readonly path: string;
|
|
7
|
+
readonly diffStatuses?: readonly MutationDiffStatus[];
|
|
8
|
+
}[],
|
|
9
|
+
) {
|
|
10
|
+
const formatted = new Set<string>();
|
|
11
|
+
const formatters = new Set<string>();
|
|
12
|
+
const remaining = new Map<string, { status: MutationDiffStatus; paths: Set<string> }>();
|
|
13
|
+
for (const resource of resources)
|
|
14
|
+
for (const status of resource.diffStatuses ?? []) {
|
|
15
|
+
if (status.formatter !== undefined && status.tone === "success") {
|
|
16
|
+
formatted.add(resource.path);
|
|
17
|
+
formatters.add(status.formatter);
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
const key = JSON.stringify([status.text, status.tone]);
|
|
21
|
+
let group = remaining.get(key);
|
|
22
|
+
if (!group) {
|
|
23
|
+
group = { status, paths: new Set() };
|
|
24
|
+
remaining.set(key, group);
|
|
25
|
+
}
|
|
26
|
+
group.paths.add(resource.path);
|
|
27
|
+
}
|
|
28
|
+
return {
|
|
29
|
+
formatted: [...formatted],
|
|
30
|
+
formatters: [...formatters],
|
|
31
|
+
statuses: [...remaining.values()].map(({ status, paths }) => ({ status, paths: [...paths] })),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-text-editor-stale-anchor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
|
-
"pi-agent-invariant": "0.
|
|
7
|
-
"pi-agent-read": "0.
|
|
8
|
-
"pi-agent-text-editor": "0.
|
|
6
|
+
"pi-agent-invariant": "0.3.0",
|
|
7
|
+
"pi-agent-read": "0.3.0",
|
|
8
|
+
"pi-agent-text-editor": "0.3.0"
|
|
9
9
|
},
|
|
10
10
|
"pi": {
|
|
11
11
|
"extensions": [
|
|
12
|
-
"./runtime/entry-
|
|
12
|
+
"./runtime/entry-72.js"
|
|
13
13
|
]
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-agent-tool-call-interception",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"types": "./src/index.ts",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
8
8
|
"types": "./src/index.ts",
|
|
9
|
-
"default": "./runtime/entry-
|
|
9
|
+
"default": "./runtime/entry-73.js"
|
|
10
10
|
}
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"pi-agent-tool-ui": "0.
|
|
13
|
+
"pi-agent-tool-ui": "0.3.0"
|
|
14
14
|
},
|
|
15
15
|
"peerDependencies": {
|
|
16
16
|
"@earendil-works/pi-coding-agent": "*",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../../../dist/entry-73.js";
|
|
@@ -333,6 +333,9 @@ export function withToolCallInterceptionRendering<TParameters extends TSchema, T
|
|
|
333
333
|
|
|
334
334
|
return {
|
|
335
335
|
...definition,
|
|
336
|
+
get description() {
|
|
337
|
+
return definition.description;
|
|
338
|
+
},
|
|
336
339
|
get promptGuidelines() {
|
|
337
340
|
return definition.promptGuidelines;
|
|
338
341
|
},
|