pi-agent-ide 0.6.0 → 0.6.2

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.
Files changed (448) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/README.md +146 -68
  3. package/assets/social-preview.png +0 -0
  4. package/assets/summary/debugging.png +0 -0
  5. package/assets/summary/editing.png +0 -0
  6. package/assets/summary/read.png +0 -0
  7. package/assets/summary/search-and-replace.png +0 -0
  8. package/assets/summary/search.png +0 -0
  9. package/assets/summary/settings.png +0 -0
  10. package/assets/summary/terminal.png +0 -0
  11. package/assets/summary/thumbs/debugging.png +0 -0
  12. package/assets/summary/thumbs/editing.png +0 -0
  13. package/assets/summary/thumbs/read.png +0 -0
  14. package/assets/summary/thumbs/search-and-replace.png +0 -0
  15. package/assets/summary/thumbs/search.png +0 -0
  16. package/assets/summary/thumbs/settings.png +0 -0
  17. package/assets/summary/thumbs/terminal.png +0 -0
  18. package/assets/summary/thumbs/user_terminal.png +0 -0
  19. package/assets/summary/user_terminal.png +0 -0
  20. package/dist/chunk-3E2NTWCN.js +2 -0
  21. package/dist/chunk-7WCZOO5I.js +1 -0
  22. package/dist/chunk-CEX3VOJ7.js +2 -0
  23. package/dist/chunk-FA6BKC5Y.js +1 -0
  24. package/dist/{chunk-2527OQ4Y.js → chunk-HMLH43ZS.js} +1 -1
  25. package/dist/chunk-LVWMWWWF.js +28 -0
  26. package/dist/chunk-MPT3R4BL.js +0 -0
  27. package/dist/chunk-PZFOOHY2.js +15 -0
  28. package/dist/{chunk-HKMBQLEK.js → chunk-QDLTO5PH.js} +1 -1
  29. package/dist/{chunk-Z3VC3S2T.js → chunk-QIK2E64R.js} +1 -1
  30. package/dist/{chunk-OYWIZII6.js → chunk-S6QRG3TQ.js} +1 -1
  31. package/dist/chunk-T7CZIACQ.js +27 -0
  32. package/dist/chunk-T7I2VX3J.js +1 -0
  33. package/dist/chunk-VCTK4JSN.js +3 -0
  34. package/dist/chunk-VXD6FZP5.js +5 -0
  35. package/dist/chunk-W7CASEO3.js +1 -0
  36. package/dist/chunk-YT42LKFV.js +16 -0
  37. package/dist/entry-1.js +1 -1
  38. package/dist/entry-10.js +1 -1
  39. package/dist/entry-11.js +1 -1
  40. package/dist/entry-12.js +1 -1
  41. package/dist/entry-13.js +1 -1
  42. package/dist/entry-14.js +1 -1
  43. package/dist/entry-15.js +1 -1
  44. package/dist/entry-16.js +1 -1
  45. package/dist/entry-17.js +1 -0
  46. package/dist/entry-19.js +1 -1
  47. package/dist/entry-2.js +1 -1
  48. package/dist/entry-20.js +1 -1
  49. package/dist/entry-21.js +1 -1
  50. package/dist/entry-22.js +1 -1
  51. package/dist/entry-23.js +1 -2
  52. package/dist/entry-24.js +1 -1
  53. package/dist/entry-25.js +2 -1
  54. package/dist/entry-26.js +1 -1
  55. package/dist/entry-27.js +2 -1
  56. package/dist/entry-28.js +1 -12
  57. package/dist/entry-29.js +1 -1
  58. package/dist/entry-30.js +1 -1
  59. package/dist/entry-31.js +13 -1
  60. package/dist/entry-32.js +1 -1
  61. package/dist/entry-33.js +1 -4
  62. package/dist/entry-34.js +1 -9
  63. package/dist/entry-35.js +1 -1
  64. package/dist/entry-36.js +4 -1
  65. package/dist/entry-37.js +9 -1
  66. package/dist/entry-38.js +1 -1
  67. package/dist/entry-39.js +1 -1
  68. package/dist/entry-40.js +1 -1
  69. package/dist/entry-41.js +1 -1
  70. package/dist/entry-42.js +1 -18
  71. package/dist/entry-43.js +1 -1
  72. package/dist/entry-44.js +1 -1
  73. package/dist/entry-45.js +17 -1
  74. package/dist/entry-46.js +1 -1
  75. package/dist/entry-47.js +1 -7
  76. package/dist/entry-48.js +1 -11
  77. package/dist/entry-49.js +1 -1
  78. package/dist/entry-50.js +6 -1
  79. package/dist/entry-51.js +10 -1
  80. package/dist/entry-52.js +1 -1
  81. package/dist/entry-53.js +1 -1
  82. package/dist/entry-54.js +1 -1
  83. package/dist/entry-55.js +1 -1
  84. package/dist/entry-56.js +1 -1
  85. package/dist/entry-57.js +1 -0
  86. package/dist/entry-58.js +1 -1
  87. package/dist/entry-59.js +1 -0
  88. package/dist/entry-60.js +1 -1
  89. package/dist/entry-61.js +1 -1
  90. package/dist/entry-62.js +0 -1
  91. package/dist/entry-63.js +1 -1
  92. package/dist/entry-64.js +0 -1
  93. package/dist/entry-65.js +1 -1
  94. package/dist/entry-66.js +1 -0
  95. package/dist/entry-67.js +1 -1
  96. package/dist/entry-68.js +1 -0
  97. package/dist/entry-69.js +1 -1
  98. package/dist/entry-70.js +1 -1
  99. package/dist/entry-71.js +0 -1
  100. package/dist/entry-72.js +1 -259
  101. package/dist/entry-73.js +0 -30
  102. package/dist/entry-74.js +1 -2
  103. package/dist/entry-75.js +1 -1
  104. package/dist/entry-76.js +1 -1
  105. package/dist/entry-77.js +315 -3
  106. package/dist/entry-78.js +30 -3
  107. package/dist/entry-79.js +2 -1
  108. package/dist/entry-80.js +1 -1
  109. package/dist/entry-81.js +1 -1
  110. package/dist/entry-82.js +3 -0
  111. package/dist/entry-83.js +3 -0
  112. package/dist/entry-84.js +1 -0
  113. package/dist/entry-85.js +1 -0
  114. package/dist/entry-86.js +1 -0
  115. package/dist/entry-9.js +1 -1
  116. package/dist/pi-agent-ide.js +3 -3
  117. package/docs/agent-guides/apply.md +333 -0
  118. package/docs/agent-guides/debugger.md +5 -0
  119. package/docs/agent-guides/diagnostics.md +5 -0
  120. package/docs/agent-guides/editing.md +44 -0
  121. package/docs/agent-guides/git-changes.md +5 -0
  122. package/docs/agent-guides/json-reading.md +41 -0
  123. package/docs/agent-guides/read-resources.md +44 -0
  124. package/docs/agent-guides/search-code.md +29 -0
  125. package/docs/agent-guides/terminal.md +7 -0
  126. package/docs/agent-guides/vision.md +5 -0
  127. package/docs/configuration.md +6 -14
  128. package/docs/research/apply-read-latency.md +219 -0
  129. package/node_modules/pi-agent-doctor/package.json +6 -6
  130. package/node_modules/pi-agent-doctor/runtime/entry-23.js +1 -0
  131. package/node_modules/pi-agent-documentation/package.json +15 -0
  132. package/node_modules/pi-agent-documentation/runtime/entry-24.js +1 -0
  133. package/node_modules/pi-agent-documentation/src/index.ts +69 -0
  134. package/node_modules/pi-agent-filesystem/index.ts +0 -4
  135. package/node_modules/pi-agent-filesystem/package.json +7 -7
  136. package/node_modules/pi-agent-filesystem-image/package.json +4 -4
  137. package/node_modules/pi-agent-filesystem-jq/index.ts +134 -0
  138. package/node_modules/pi-agent-filesystem-jq/package.json +23 -0
  139. package/node_modules/pi-agent-filesystem-jq/runtime/entry-27.js +2 -0
  140. package/node_modules/pi-agent-filesystem-jq/src/jq.ts +107 -0
  141. package/node_modules/pi-agent-filesystem-pdf/package.json +4 -4
  142. package/node_modules/pi-agent-filesystem-text/package.json +4 -4
  143. package/node_modules/pi-agent-filesystem-text/runtime/entry-29.js +2 -0
  144. package/node_modules/pi-agent-ide-ast/package.json +12 -11
  145. package/node_modules/pi-agent-ide-ast/runtime/entry-30.js +1 -0
  146. package/node_modules/pi-agent-ide-ast/src/search-presentation.ts +117 -0
  147. package/node_modules/pi-agent-ide-ast/src/search-resolver.ts +20 -2
  148. package/node_modules/pi-agent-ide-changes/index.ts +8 -0
  149. package/node_modules/pi-agent-ide-changes/package.json +9 -8
  150. package/node_modules/pi-agent-ide-changes/runtime/entry-32.js +1 -0
  151. package/node_modules/pi-agent-ide-formatter/package.json +4 -4
  152. package/node_modules/pi-agent-ide-formatter/src/formatter.ts +1 -1
  153. package/node_modules/pi-agent-ide-languages/package.json +3 -3
  154. package/node_modules/pi-agent-ide-languages/runtime/entry-35.js +2 -0
  155. package/node_modules/pi-agent-ide-lint/index.ts +1 -1
  156. package/node_modules/pi-agent-ide-lint/package.json +8 -8
  157. package/node_modules/pi-agent-ide-lint/runtime/entry-36.js +2 -0
  158. package/node_modules/pi-agent-ide-lint/src/command-linter.ts +17 -1
  159. package/node_modules/pi-agent-ide-lsp/index.ts +0 -3
  160. package/node_modules/pi-agent-ide-lsp/package.json +10 -10
  161. package/node_modules/pi-agent-ide-lsp/runtime/entry-37.js +2 -0
  162. package/node_modules/pi-agent-image/package.json +3 -3
  163. package/node_modules/pi-agent-invariant/package.json +2 -2
  164. package/node_modules/pi-agent-pdf/package.json +3 -3
  165. package/node_modules/pi-agent-read/package.json +12 -11
  166. package/node_modules/pi-agent-read/runtime/entry-42.js +0 -1
  167. package/node_modules/pi-agent-read/runtime/entry-45.js +2 -0
  168. package/node_modules/pi-agent-read/src/api/read-parameters.ts +2 -2
  169. package/node_modules/pi-agent-read/src/core/extension.ts +16 -2
  170. package/node_modules/pi-agent-read/src/core/read-core.ts +4 -5
  171. package/node_modules/pi-agent-read/src/core/tools/read/read-renderer.ts +62 -8
  172. package/node_modules/pi-agent-read/src/core/tools/tool-read.ts +19 -12
  173. package/node_modules/pi-agent-resource/package.json +2 -2
  174. package/node_modules/pi-agent-search/package.json +8 -7
  175. package/node_modules/pi-agent-search/runtime/entry-47.js +0 -1
  176. package/node_modules/pi-agent-search/runtime/entry-48.js +1 -0
  177. package/node_modules/pi-agent-search/runtime/entry-50.js +2 -0
  178. package/node_modules/pi-agent-search/src/core/extension.ts +29 -10
  179. package/node_modules/pi-agent-search-text/package.json +17 -9
  180. package/node_modules/pi-agent-search-text/runtime/entry-53.js +1 -0
  181. package/node_modules/pi-agent-search-text/src/persisted-result.ts +9 -7
  182. package/node_modules/pi-agent-search-text/src/search-renderer.ts +10 -4
  183. package/node_modules/pi-agent-search-text/src/search-result.ts +8 -1
  184. package/node_modules/pi-agent-text/package.json +3 -3
  185. package/node_modules/pi-agent-text/runtime/entry-55.js +1 -0
  186. package/node_modules/pi-agent-text-anchor-constant/package.json +4 -4
  187. package/node_modules/pi-agent-text-anchor-constant/runtime/entry-56.js +2 -0
  188. package/node_modules/pi-agent-text-anchor-exact/package.json +5 -5
  189. package/node_modules/pi-agent-text-anchor-exact/runtime/entry-58.js +2 -0
  190. package/node_modules/pi-agent-text-anchor-line-hash/package.json +7 -7
  191. package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-60.js +2 -0
  192. package/node_modules/pi-agent-text-editor/index.ts +15 -0
  193. package/node_modules/pi-agent-text-editor/package.json +26 -25
  194. package/node_modules/pi-agent-text-editor/runtime/entry-72.js +0 -1
  195. package/node_modules/pi-agent-text-editor/runtime/entry-73.js +1 -0
  196. package/node_modules/pi-agent-text-editor/runtime/entry-74.js +1 -0
  197. package/node_modules/pi-agent-text-editor/src/core/apply/execution.ts +24 -18
  198. package/node_modules/pi-agent-text-editor/src/core/apply/output.ts +4 -2
  199. package/node_modules/pi-agent-text-editor/src/core/apply/prompt.ts +5 -44
  200. package/node_modules/pi-agent-text-editor/src/core/apply/renderer.ts +13 -5
  201. package/node_modules/pi-agent-text-editor/src/core/apply/runtime.ts +124 -26
  202. package/node_modules/pi-agent-text-editor/src/core/apply/tool.ts +2 -6
  203. package/node_modules/pi-agent-text-editor/src/core/apply/transaction.ts +186 -1
  204. package/node_modules/pi-agent-text-editor/src/core/builtin-edit-filter.ts +1 -1
  205. package/node_modules/pi-agent-text-editor/src/core/diff-tool.ts +2 -2
  206. package/node_modules/pi-agent-text-editor/src/core/extension.ts +0 -11
  207. package/node_modules/pi-agent-text-editor/src/core/text-editor-config.ts +1 -1
  208. package/node_modules/pi-agent-text-editor/src/core/text-mutation.ts +0 -2
  209. package/node_modules/pi-agent-text-editor-renderer/index.ts +17 -4
  210. package/node_modules/pi-agent-text-editor-renderer/package.json +6 -6
  211. package/node_modules/pi-agent-text-editor-renderer/src/mutation-panel.ts +23 -11
  212. package/node_modules/pi-agent-text-editor-renderer/src/renderer.ts +21 -16
  213. package/node_modules/pi-agent-text-editor-stale-anchor/package.json +5 -5
  214. package/node_modules/pi-agent-tool-call-interception/package.json +3 -3
  215. package/node_modules/pi-agent-tool-call-interception/runtime/entry-80.js +1 -0
  216. package/node_modules/pi-agent-tool-ui/package.json +2 -2
  217. package/node_modules/pi-agent-tool-ui/runtime/entry-81.js +1 -0
  218. package/node_modules/pi-agent-web/package.json +7 -7
  219. package/node_modules/pi-agent-web/runtime/entry-82.js +2 -0
  220. package/node_modules/pi-agent-web-html/package.json +3 -3
  221. package/node_modules/pi-agent-web-html/runtime/entry-83.js +2 -0
  222. package/node_modules/pi-agent-web-image/package.json +4 -4
  223. package/node_modules/pi-agent-web-image/runtime/entry-84.js +2 -0
  224. package/node_modules/pi-agent-web-pdf/package.json +4 -4
  225. package/node_modules/pi-agent-web-pdf/runtime/entry-85.js +2 -0
  226. package/node_modules/pi-agent-web-text/package.json +4 -4
  227. package/node_modules/pi-agent-web-text/runtime/entry-86.js +2 -0
  228. package/package.json +108 -44
  229. package/src/api/documentation.ts +2 -0
  230. package/src/api/plugin-protocol.ts +10 -4
  231. package/src/composite/builtin-extensions.ts +7 -0
  232. package/src/composite/extensions-config.ts +6 -0
  233. package/src/composite/module-labels.ts +5 -0
  234. package/src/composite/module-settings-store.ts +3 -0
  235. package/src/composite/module-settings.ts +39 -5
  236. package/src/composite/preferences.ts +37 -0
  237. package/src/composite/presentation.ts +14 -0
  238. package/src/composite/presets.ts +57 -0
  239. package/src/documentation/extension.ts +295 -0
  240. package/src/documentation/registry.ts +98 -0
  241. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/index.ts +0 -4
  242. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/package.json +7 -7
  243. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/package.json +4 -4
  244. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/index.ts +134 -0
  245. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/package.json +23 -0
  246. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/runtime/entry-27.js +2 -0
  247. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-jq/src/jq.ts +107 -0
  248. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/package.json +4 -4
  249. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/runtime/entry-28.js +2 -0
  250. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/package.json +4 -4
  251. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-text/runtime/entry-29.js +2 -0
  252. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/runtime/entry-25.js +2 -0
  253. package/src/extensions/pi-agent-read/extensions/pi-agent-web/package.json +7 -7
  254. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/package.json +3 -3
  255. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/runtime/entry-83.js +2 -0
  256. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/package.json +4 -4
  257. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/runtime/entry-84.js +2 -0
  258. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/package.json +4 -4
  259. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/runtime/entry-85.js +2 -0
  260. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/package.json +4 -4
  261. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/runtime/entry-86.js +2 -0
  262. package/src/extensions/pi-agent-read/extensions/pi-agent-web/runtime/entry-82.js +2 -0
  263. package/src/extensions/pi-agent-read/package.json +12 -11
  264. package/src/extensions/pi-agent-read/runtime/entry-42.js +0 -1
  265. package/src/extensions/pi-agent-read/runtime/entry-43.js +1 -0
  266. package/src/extensions/pi-agent-read/runtime/entry-45.js +2 -0
  267. package/src/extensions/pi-agent-read/src/api/read-parameters.ts +2 -2
  268. package/src/extensions/pi-agent-read/src/core/extension.ts +16 -2
  269. package/src/extensions/pi-agent-read/src/core/read-core.ts +4 -5
  270. package/src/extensions/pi-agent-read/src/core/tools/read/read-renderer.ts +62 -8
  271. package/src/extensions/pi-agent-read/src/core/tools/tool-read.ts +19 -12
  272. package/src/extensions/pi-agent-search/package.json +8 -7
  273. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/package.json +17 -9
  274. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-53.js +1 -0
  275. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/persisted-result.ts +9 -7
  276. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-renderer.ts +10 -4
  277. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/src/search-result.ts +8 -1
  278. package/src/extensions/pi-agent-search/runtime/entry-47.js +0 -1
  279. package/src/extensions/pi-agent-search/runtime/entry-48.js +1 -0
  280. package/src/extensions/pi-agent-search/runtime/entry-49.js +1 -0
  281. package/src/extensions/pi-agent-search/runtime/entry-50.js +2 -0
  282. package/src/extensions/pi-agent-search/src/core/extension.ts +29 -10
  283. package/src/extensions/pi-agent-text-editor/index.ts +15 -0
  284. package/src/extensions/pi-agent-text-editor/package.json +26 -25
  285. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/package.json +4 -4
  286. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-constant/runtime/entry-56.js +2 -0
  287. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/package.json +5 -5
  288. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-57.js +1 -0
  289. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-58.js +2 -0
  290. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/package.json +7 -7
  291. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-59.js +1 -0
  292. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-60.js +2 -0
  293. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/index.ts +17 -4
  294. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/package.json +6 -6
  295. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/runtime/entry-78.js +2 -0
  296. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/mutation-panel.ts +23 -11
  297. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/renderer.ts +21 -16
  298. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/package.json +5 -5
  299. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/runtime/entry-79.js +2 -0
  300. package/src/extensions/pi-agent-text-editor/runtime/entry-72.js +0 -1
  301. package/src/extensions/pi-agent-text-editor/runtime/entry-73.js +1 -0
  302. package/src/extensions/pi-agent-text-editor/runtime/entry-74.js +1 -0
  303. package/src/extensions/pi-agent-text-editor/runtime/entry-75.js +1 -0
  304. package/src/extensions/pi-agent-text-editor/runtime/entry-76.js +1 -0
  305. package/src/extensions/pi-agent-text-editor/runtime/entry-77.js +2 -0
  306. package/src/extensions/pi-agent-text-editor/src/core/apply/execution.ts +24 -18
  307. package/src/extensions/pi-agent-text-editor/src/core/apply/output.ts +4 -2
  308. package/src/extensions/pi-agent-text-editor/src/core/apply/prompt.ts +5 -44
  309. package/src/extensions/pi-agent-text-editor/src/core/apply/renderer.ts +13 -5
  310. package/src/extensions/pi-agent-text-editor/src/core/apply/runtime.ts +124 -26
  311. package/src/extensions/pi-agent-text-editor/src/core/apply/tool.ts +2 -6
  312. package/src/extensions/pi-agent-text-editor/src/core/apply/transaction.ts +186 -1
  313. package/src/extensions/pi-agent-text-editor/src/core/builtin-edit-filter.ts +1 -1
  314. package/src/extensions/pi-agent-text-editor/src/core/diff-tool.ts +2 -2
  315. package/src/extensions/pi-agent-text-editor/src/core/extension.ts +0 -11
  316. package/src/extensions/pi-agent-text-editor/src/core/text-editor-config.ts +1 -1
  317. package/src/extensions/pi-agent-text-editor/src/core/text-mutation.ts +0 -2
  318. package/src/pi-agent-ide.ts +7 -10
  319. package/src/plugins/pi-agent-ide-ast/package.json +12 -11
  320. package/src/plugins/pi-agent-ide-ast/runtime/entry-30.js +1 -0
  321. package/src/plugins/pi-agent-ide-ast/src/search-presentation.ts +117 -0
  322. package/src/plugins/pi-agent-ide-ast/src/search-resolver.ts +20 -2
  323. package/src/plugins/pi-agent-ide-changes/index.ts +8 -0
  324. package/src/plugins/pi-agent-ide-changes/package.json +9 -8
  325. package/src/plugins/pi-agent-ide-changes/runtime/entry-32.js +1 -0
  326. package/src/plugins/pi-agent-ide-debugger/index.ts +44 -14
  327. package/src/plugins/pi-agent-ide-debugger/src/renderer.ts +10 -1
  328. package/src/plugins/pi-agent-ide-debugger/src/session-manager.ts +39 -0
  329. package/src/plugins/pi-agent-ide-debugger/src/ui.ts +42 -5
  330. package/src/plugins/pi-agent-ide-diagnostics/src/extension.ts +9 -4
  331. package/src/plugins/pi-agent-ide-formatter/package.json +4 -4
  332. package/src/plugins/pi-agent-ide-formatter/src/formatter.ts +1 -1
  333. package/src/plugins/pi-agent-ide-languages/package.json +3 -3
  334. package/src/plugins/pi-agent-ide-languages/runtime/entry-35.js +2 -0
  335. package/src/plugins/pi-agent-ide-lint/index.ts +1 -1
  336. package/src/plugins/pi-agent-ide-lint/package.json +8 -8
  337. package/src/plugins/pi-agent-ide-lint/runtime/entry-36.js +2 -0
  338. package/src/plugins/pi-agent-ide-lint/src/command-linter.ts +17 -1
  339. package/src/plugins/pi-agent-ide-lsp/index.ts +0 -3
  340. package/src/plugins/pi-agent-ide-lsp/package.json +10 -10
  341. package/src/plugins/pi-agent-ide-lsp/runtime/entry-37.js +2 -0
  342. package/src/plugins/pi-agent-ide-terminal/index.ts +27 -2
  343. package/src/plugins/pi-agent-ide-terminal/src/renderer.ts +27 -2
  344. package/src/plugins/pi-agent-ide-terminal/src/resources.ts +88 -12
  345. package/src/plugins/pi-agent-ide-terminal/src/screen-image.ts +6 -2
  346. package/src/plugins/pi-agent-ide-terminal/src/search.ts +0 -3
  347. package/src/plugins/pi-agent-ide-terminal/src/tools.ts +7 -4
  348. package/src/plugins/pi-agent-ide-vision/index.ts +10 -7
  349. package/src/plugins/pi-agent-ide-vision/src/vision.ts +17 -3
  350. package/assets/gallery/apply-editing.png +0 -0
  351. package/assets/gallery/debugging.png +0 -0
  352. package/assets/gallery/read-web.png +0 -0
  353. package/assets/gallery/search-replace.png +0 -0
  354. package/assets/gallery/terminal.png +0 -0
  355. package/assets/gallery/tool-editing.png +0 -0
  356. package/dist/chunk-22CLOM2D.js +0 -1
  357. package/dist/chunk-3XJ3KDPZ.js +0 -16
  358. package/dist/chunk-526E364R.js +0 -3
  359. package/dist/chunk-DDKHZZDO.js +0 -5
  360. package/dist/chunk-EJ5OACQM.js +0 -1
  361. package/dist/chunk-HSM6R7IB.js +0 -27
  362. package/dist/chunk-PCZH7GOX.js +0 -26
  363. package/dist/chunk-SQ7ZTGOP.js +0 -2
  364. package/dist/entry-18.js +0 -1
  365. package/node_modules/pi-agent-doctor/runtime/entry-18.js +0 -1
  366. package/node_modules/pi-agent-filesystem/runtime/entry-23.js +0 -2
  367. package/node_modules/pi-agent-filesystem-image/runtime/entry-24.js +0 -2
  368. package/node_modules/pi-agent-ide-ast/runtime/entry-27.js +0 -1
  369. package/node_modules/pi-agent-ide-changes/runtime/entry-29.js +0 -1
  370. package/node_modules/pi-agent-ide-changes/runtime/entry-30.js +0 -2
  371. package/node_modules/pi-agent-ide-languages/runtime/entry-32.js +0 -2
  372. package/node_modules/pi-agent-image/runtime/entry-35.js +0 -1
  373. package/node_modules/pi-agent-invariant/runtime/entry-36.js +0 -1
  374. package/node_modules/pi-agent-pdf/runtime/entry-37.js +0 -1
  375. package/node_modules/pi-agent-search/runtime/entry-45.js +0 -1
  376. package/node_modules/pi-agent-search-text/runtime/entry-48.js +0 -2
  377. package/node_modules/pi-agent-text/runtime/entry-50.js +0 -1
  378. package/node_modules/pi-agent-text-anchor-exact/runtime/entry-53.js +0 -2
  379. package/node_modules/pi-agent-text-anchor-line-hash/runtime/entry-55.js +0 -2
  380. package/node_modules/pi-agent-text-editor/runtime/entry-56.js +0 -1
  381. package/node_modules/pi-agent-text-editor/runtime/entry-58.js +0 -1
  382. package/node_modules/pi-agent-text-editor/runtime/entry-60.js +0 -1
  383. package/node_modules/pi-agent-text-editor-renderer/runtime/entry-73.js +0 -2
  384. package/node_modules/pi-agent-text-editor-renderer/src/config.ts +0 -73
  385. package/node_modules/pi-agent-text-editor-stale-anchor/runtime/entry-74.js +0 -2
  386. package/node_modules/pi-agent-web-pdf/runtime/entry-80.js +0 -2
  387. package/node_modules/pi-agent-web-text/runtime/entry-81.js +0 -2
  388. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-image/runtime/entry-24.js +0 -2
  389. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/pi-agent-filesystem-pdf/runtime/entry-25.js +0 -2
  390. package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/runtime/entry-23.js +0 -2
  391. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-html/runtime/entry-78.js +0 -2
  392. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-image/runtime/entry-79.js +0 -2
  393. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-pdf/runtime/entry-80.js +0 -2
  394. package/src/extensions/pi-agent-read/extensions/pi-agent-web/plugins/pi-agent-web-text/runtime/entry-81.js +0 -2
  395. package/src/extensions/pi-agent-read/extensions/pi-agent-web/runtime/entry-77.js +0 -2
  396. package/src/extensions/pi-agent-read/runtime/entry-38.js +0 -1
  397. package/src/extensions/pi-agent-read/runtime/entry-39.js +0 -1
  398. package/src/extensions/pi-agent-read/runtime/entry-40.js +0 -1
  399. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-48.js +0 -2
  400. package/src/extensions/pi-agent-search/plugins/pi-agent-search-text/runtime/entry-49.js +0 -1
  401. package/src/extensions/pi-agent-search/runtime/entry-45.js +0 -1
  402. package/src/extensions/pi-agent-search/runtime/entry-46.js +0 -1
  403. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-exact/runtime/entry-53.js +0 -2
  404. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash/runtime/entry-55.js +0 -2
  405. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/runtime/entry-73.js +0 -2
  406. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-renderer/src/config.ts +0 -73
  407. package/src/extensions/pi-agent-text-editor/plugins/pi-agent-text-editor-stale-anchor/runtime/entry-74.js +0 -2
  408. package/src/extensions/pi-agent-text-editor/runtime/entry-56.js +0 -1
  409. package/src/extensions/pi-agent-text-editor/runtime/entry-57.js +0 -1
  410. package/src/extensions/pi-agent-text-editor/runtime/entry-58.js +0 -1
  411. package/src/extensions/pi-agent-text-editor/runtime/entry-59.js +0 -1
  412. package/src/extensions/pi-agent-text-editor/runtime/entry-60.js +0 -1
  413. package/src/plugins/pi-agent-ide-ast/runtime/entry-27.js +0 -1
  414. package/src/plugins/pi-agent-ide-ast/runtime/entry-28.js +0 -2
  415. package/src/plugins/pi-agent-ide-changes/runtime/entry-29.js +0 -1
  416. package/src/plugins/pi-agent-ide-changes/runtime/entry-30.js +0 -2
  417. package/src/plugins/pi-agent-ide-languages/runtime/entry-32.js +0 -2
  418. /package/node_modules/{pi-agent-filesystem-pdf → pi-agent-filesystem}/runtime/entry-25.js +0 -0
  419. /package/node_modules/{pi-agent-filesystem-text → pi-agent-filesystem-image}/runtime/entry-26.js +0 -0
  420. /package/node_modules/{pi-agent-ide-ast → pi-agent-filesystem-pdf}/runtime/entry-28.js +0 -0
  421. /package/node_modules/{pi-agent-ide-formatter → pi-agent-ide-ast}/runtime/entry-31.js +0 -0
  422. /package/node_modules/{pi-agent-ide-lint → pi-agent-ide-changes}/runtime/entry-33.js +0 -0
  423. /package/node_modules/{pi-agent-ide-lsp → pi-agent-ide-formatter}/runtime/entry-34.js +0 -0
  424. /package/node_modules/{pi-agent-read → pi-agent-image}/runtime/entry-38.js +0 -0
  425. /package/node_modules/{pi-agent-read → pi-agent-invariant}/runtime/entry-39.js +0 -0
  426. /package/node_modules/{pi-agent-read → pi-agent-pdf}/runtime/entry-40.js +0 -0
  427. /package/node_modules/{pi-agent-resource → pi-agent-read}/runtime/entry-43.js +0 -0
  428. /package/node_modules/{pi-agent-search → pi-agent-read}/runtime/entry-44.js +0 -0
  429. /package/node_modules/{pi-agent-search → pi-agent-resource}/runtime/entry-46.js +0 -0
  430. /package/node_modules/{pi-agent-search-text → pi-agent-search}/runtime/entry-49.js +0 -0
  431. /package/node_modules/{pi-agent-text-anchor-constant → pi-agent-search-text}/runtime/entry-51.js +0 -0
  432. /package/node_modules/{pi-agent-text-anchor-exact → pi-agent-search-text}/runtime/entry-52.js +0 -0
  433. /package/node_modules/{pi-agent-text-anchor-line-hash → pi-agent-search-text}/runtime/entry-54.js +0 -0
  434. /package/node_modules/{pi-agent-text-editor → pi-agent-text-anchor-exact}/runtime/entry-57.js +0 -0
  435. /package/node_modules/{pi-agent-text-editor → pi-agent-text-anchor-line-hash}/runtime/entry-59.js +0 -0
  436. /package/node_modules/{pi-agent-tool-call-interception → pi-agent-text-editor}/runtime/entry-75.js +0 -0
  437. /package/node_modules/{pi-agent-tool-ui → pi-agent-text-editor}/runtime/entry-76.js +0 -0
  438. /package/node_modules/{pi-agent-web → pi-agent-text-editor}/runtime/entry-77.js +0 -0
  439. /package/node_modules/{pi-agent-web-html → pi-agent-text-editor-renderer}/runtime/entry-78.js +0 -0
  440. /package/node_modules/{pi-agent-web-image → pi-agent-text-editor-stale-anchor}/runtime/entry-79.js +0 -0
  441. /package/src/extensions/pi-agent-read/extensions/pi-agent-filesystem/plugins/{pi-agent-filesystem-text → pi-agent-filesystem-image}/runtime/entry-26.js +0 -0
  442. /package/src/extensions/{pi-agent-search → pi-agent-read}/runtime/entry-44.js +0 -0
  443. /package/src/extensions/{pi-agent-text-editor/plugins/pi-agent-text-anchor-constant → pi-agent-search/plugins/pi-agent-search-text}/runtime/entry-51.js +0 -0
  444. /package/src/extensions/{pi-agent-text-editor/plugins/pi-agent-text-anchor-exact → pi-agent-search/plugins/pi-agent-search-text}/runtime/entry-52.js +0 -0
  445. /package/src/extensions/{pi-agent-text-editor/plugins/pi-agent-text-anchor-line-hash → pi-agent-search/plugins/pi-agent-search-text}/runtime/entry-54.js +0 -0
  446. /package/src/plugins/{pi-agent-ide-formatter → pi-agent-ide-ast}/runtime/entry-31.js +0 -0
  447. /package/src/plugins/{pi-agent-ide-lint → pi-agent-ide-changes}/runtime/entry-33.js +0 -0
  448. /package/src/plugins/{pi-agent-ide-lsp → pi-agent-ide-formatter}/runtime/entry-34.js +0 -0
@@ -0,0 +1,2 @@
1
+ export * from "../../../../../../dist/entry-58.js";
2
+ export { default } from "../../../../../../dist/entry-58.js";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-agent-text-anchor-line-hash",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "type": "module",
5
5
  "imports": {
6
6
  "#src/*": "./src/*"
@@ -8,18 +8,18 @@
8
8
  "exports": {
9
9
  "./api/anchor": {
10
10
  "types": "./src/anchor.ts",
11
- "default": "./runtime/entry-54.js"
11
+ "default": "./runtime/entry-59.js"
12
12
  }
13
13
  },
14
14
  "dependencies": {
15
- "pi-agent-invariant": "0.6.0",
16
- "pi-agent-read": "0.6.0",
17
- "pi-agent-text": "0.6.0",
18
- "pi-agent-text-editor": "0.6.0"
15
+ "pi-agent-invariant": "0.6.2",
16
+ "pi-agent-read": "0.6.2",
17
+ "pi-agent-text": "0.6.2",
18
+ "pi-agent-text-editor": "0.6.2"
19
19
  },
20
20
  "pi": {
21
21
  "extensions": [
22
- "./runtime/entry-55.js"
22
+ "./runtime/entry-60.js"
23
23
  ]
24
24
  },
25
25
  "peerDependencies": {
@@ -0,0 +1 @@
1
+ export * from "../../../../../../dist/entry-59.js";
@@ -0,0 +1,2 @@
1
+ export * from "../../../../../../dist/entry-60.js";
2
+ export { default } from "../../../../../../dist/entry-60.js";
@@ -22,7 +22,15 @@ import type { FileMutationBatchResult } from "pi-agent-text-editor/api/mutation-
22
22
 
23
23
  import type { ExtensionAPI } from "@earendil-works/pi-coding-agent";
24
24
 
25
- export default async function registerTextEditorRenderer(pi: ExtensionAPI): Promise<void> {
25
+ function parsePresentation(value: string | undefined): "full" | "compact" | "disabled" {
26
+ return value === "full" || value === "disabled" ? value : "compact";
27
+ }
28
+ export default async function registerTextEditorRenderer(
29
+ pi: ExtensionAPI,
30
+ context?: { readonly preferences: Readonly<Record<string, string>> },
31
+ ): Promise<void> {
32
+ const applyPresentation = parsePresentation(context?.preferences["ui.applyPreview"]);
33
+ const diffPresentation = parsePresentation(context?.preferences["ui.diffs"]);
26
34
  const animationPressure = createMutationAnimationPressure(pi);
27
35
  const plugin = {
28
36
  protocol: TEXT_EDITOR_PROTOCOL,
@@ -46,7 +54,9 @@ export default async function registerTextEditorRenderer(pi: ExtensionAPI): Prom
46
54
  );
47
55
  const panel = new MutationPanel(theme);
48
56
  panel.setBackground("toolSuccessBg");
49
- panel.setExpanded(options.expanded);
57
+ const mode = options.expanded ? "full" : diffPresentation;
58
+ panel.setExpanded(mode === "full");
59
+ panel.setDiffsVisible(mode !== "disabled");
50
60
  panel.setResourceLabelsVisible(true);
51
61
  panel.setResultResources(resolveMutationResultResources(details, undefined));
52
62
  return panel;
@@ -95,11 +105,13 @@ export default async function registerTextEditorRenderer(pi: ExtensionAPI): Prom
95
105
  ? `${display(call.before)} → ${display(call.after)}`
96
106
  : `${source}${call.target ? ` → ${display(call.target)}` : ""}`;
97
107
  return `${theme.fg("toolTitle", theme.bold(call.name))} ${theme.fg("accent", identity)}${suffix}`;
98
- }),
108
+ }, applyPresentation),
99
109
  renderResult: createApplyResultRenderer((details, theme, expanded, cwd) => {
100
110
  const panel = new MutationPanel(theme);
101
111
  panel.setBackground("toolSuccessBg");
102
- panel.setExpanded(expanded);
112
+ const mode = expanded ? "full" : diffPresentation;
113
+ panel.setExpanded(mode === "full");
114
+ panel.setDiffsVisible(mode !== "disabled");
103
115
  panel.setResourceLabelsVisible(true);
104
116
  panel.setResultResources(
105
117
  resolveMutationResultResources(details, undefined).map((resource) => ({
@@ -118,6 +130,7 @@ export default async function registerTextEditorRenderer(pi: ExtensionAPI): Prom
118
130
  api,
119
131
  animationPressure,
120
132
  () => pi.getFlag("pi-agent-ide-no-animations") !== true,
133
+ diffPresentation,
121
134
  );
122
135
  pi.on("tool_result", (event) => {
123
136
  if (
@@ -1,20 +1,20 @@
1
1
  {
2
2
  "name": "pi-agent-text-editor-renderer",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "type": "module",
5
5
  "imports": {
6
6
  "#src/*": "./src/*"
7
7
  },
8
8
  "dependencies": {
9
9
  "diff": "^9.0.0",
10
- "pi-agent-invariant": "0.6.0",
11
- "pi-agent-text-editor": "0.6.0",
12
- "pi-agent-tool-call-interception": "0.6.0",
13
- "pi-agent-tool-ui": "0.6.0"
10
+ "pi-agent-invariant": "0.6.2",
11
+ "pi-agent-text-editor": "0.6.2",
12
+ "pi-agent-tool-call-interception": "0.6.2",
13
+ "pi-agent-tool-ui": "0.6.2"
14
14
  },
15
15
  "pi": {
16
16
  "extensions": [
17
- "./runtime/entry-73.js"
17
+ "./runtime/entry-78.js"
18
18
  ]
19
19
  },
20
20
  "peerDependencies": {
@@ -0,0 +1,2 @@
1
+ export * from "../../../../../../dist/entry-78.js";
2
+ export { default } from "../../../../../../dist/entry-78.js";
@@ -28,11 +28,13 @@ export class MutationPanel implements Component {
28
28
  private headerExpanded = false;
29
29
  private background: ToolBackground = "toolPendingBg";
30
30
  private expanded = false;
31
+ private diffsVisible = true;
31
32
  private resourceLabelsVisible = false;
32
33
  private cache:
33
34
  | {
34
35
  width: number;
35
36
  expanded: boolean;
37
+ diffsVisible: boolean;
36
38
  header: string;
37
39
  headerDetails: readonly ToolCallHeaderDetail[];
38
40
  headerExpanded: boolean;
@@ -78,6 +80,12 @@ export class MutationPanel implements Component {
78
80
  this.invalidate();
79
81
  }
80
82
 
83
+ public setDiffsVisible(visible: boolean): void {
84
+ if (this.diffsVisible === visible) return;
85
+ this.diffsVisible = visible;
86
+ this.invalidate();
87
+ }
88
+
81
89
  /** Shows each resource path inside its diff panel. */
82
90
  public setResourceLabelsVisible(visible: boolean): void {
83
91
  if (this.resourceLabelsVisible === visible) {
@@ -173,6 +181,7 @@ export class MutationPanel implements Component {
173
181
  if (
174
182
  this.cache?.width === contentWidth &&
175
183
  this.cache.expanded === this.expanded &&
184
+ this.cache.diffsVisible === this.diffsVisible &&
176
185
  this.cache.header === this.header &&
177
186
  this.cache.headerDetails === this.headerDetails &&
178
187
  this.cache.headerExpanded === this.headerExpanded &&
@@ -181,17 +190,19 @@ export class MutationPanel implements Component {
181
190
  return this.renderShell(this.cache.lines, width);
182
191
  }
183
192
 
184
- const panels = renderPanels(this.diffPanels, (resource) =>
185
- renderDiffPanel(
186
- resource,
187
- contentWidth,
188
- this.theme,
189
- this.expanded,
190
- this.background === "toolPendingBg",
191
- this.renderedRows,
192
- this.resourceLabelsVisible,
193
- ),
194
- );
193
+ const panels = this.diffsVisible
194
+ ? renderPanels(this.diffPanels, (resource) =>
195
+ renderDiffPanel(
196
+ resource,
197
+ contentWidth,
198
+ this.theme,
199
+ this.expanded,
200
+ this.background === "toolPendingBg",
201
+ this.renderedRows,
202
+ this.resourceLabelsVisible,
203
+ ),
204
+ )
205
+ : [];
195
206
  const ellipsis = `${this.theme.getBgAnsi(this.background)}...`;
196
207
  const summary =
197
208
  this.header.length === 0 ? [] : [truncateToWidth(this.header, contentWidth, ellipsis)];
@@ -208,6 +219,7 @@ export class MutationPanel implements Component {
208
219
  this.cache = {
209
220
  width: contentWidth,
210
221
  expanded: this.expanded,
222
+ diffsVisible: this.diffsVisible,
211
223
  header: this.header,
212
224
  headerDetails: this.headerDetails,
213
225
  headerExpanded: this.headerExpanded,
@@ -7,7 +7,7 @@ import {
7
7
  } from "pi-agent-tool-call-interception";
8
8
  import { singleLine, type ToolCallHeaderDetail } from "pi-agent-tool-ui";
9
9
  import { NEXT_TOOL_CALL_DRAIN_MS, type MutationAnimationPressure } from "./animation-pressure.js";
10
- import { loadRendererConfig } from "./config.js";
10
+
11
11
  import { freezeMutationViewports, type FrozenMutationViewports } from "./frozen-viewport.js";
12
12
  import { MutationPanel } from "./mutation-panel.js";
13
13
  import {
@@ -21,12 +21,15 @@ import { TYPING_FRAME_INTERVAL_MS, TypingInterpolation } from "./typing-interpol
21
21
 
22
22
  import type { MutationRenderResource } from "./render-resource.js";
23
23
  import type { Theme } from "@earendil-works/pi-coding-agent";
24
+
24
25
  import type { TextMutationPreviewResource } from "pi-agent-text-editor/api/mutation-preview";
25
26
  import type { FileMutationBatchResult } from "pi-agent-text-editor/api/mutation-result";
26
27
  import type { AnyTextMutationToolRegistration } from "pi-agent-text-editor/api/mutation-tool";
27
28
  import type { TextEditorPluginApi } from "pi-agent-text-editor/api/plugin-protocol";
28
29
  import type { TextEditorToolRendererRegistration } from "pi-agent-text-editor/api/tool-renderer";
29
30
 
31
+ type ToolPresentation = "full" | "compact" | "disabled";
32
+
30
33
  type MutationRenderOutcome =
31
34
  | { readonly kind: "completed"; readonly resources: readonly MutationRenderResource[] }
32
35
  | { readonly kind: "failed"; readonly reason: string };
@@ -68,6 +71,7 @@ interface RenderState {
68
71
  theme?: Theme;
69
72
  cwd?: string;
70
73
  expanded?: boolean;
74
+ presentation?: ToolPresentation;
71
75
  invalidate?: () => void;
72
76
  latestGenerated?: string;
73
77
  typing?: TypingInterpolation;
@@ -89,9 +93,12 @@ export function registerMutationRenderers(
89
93
  api: TextEditorPluginApi,
90
94
  animationPressure?: MutationAnimationPressure,
91
95
  animationsEnabled: () => boolean = () => true,
96
+ presentation: ToolPresentation = "compact",
92
97
  ): void {
93
98
  api.onMutationTool((registration) => {
94
- api.addToolRenderer(createRenderer(api, registration, animationPressure, animationsEnabled));
99
+ api.addToolRenderer(
100
+ createRenderer(api, registration, animationPressure, animationsEnabled, presentation),
101
+ );
95
102
  });
96
103
  }
97
104
 
@@ -100,6 +107,7 @@ function createRenderer(
100
107
  registration: AnyTextMutationToolRegistration,
101
108
  animationPressure: MutationAnimationPressure | undefined,
102
109
  animationsEnabled: () => boolean,
110
+ presentation: ToolPresentation,
103
111
  ): TextEditorToolRendererRegistration {
104
112
  const tool = registration.name;
105
113
 
@@ -118,7 +126,10 @@ function createRenderer(
118
126
  state.invalidate = context.invalidate;
119
127
  // renderCall runs on every frame, so reapply the project's viewport policy each time.
120
128
  state.cwd = context.cwd;
121
- component.setExpanded(context.expanded || preferFullDiff(context.cwd));
129
+ const mode = context.expanded ? "full" : presentation;
130
+ state.presentation = presentation;
131
+ component.setExpanded(mode === "full");
132
+ component.setDiffsVisible(mode !== "disabled");
122
133
  state.expanded = context.expanded;
123
134
 
124
135
  component.setResourceLabelsVisible(
@@ -208,6 +219,10 @@ function createRenderer(
208
219
  state.invalidate = context.invalidate;
209
220
 
210
221
  state.expanded = options.expanded;
222
+ state.presentation = presentation;
223
+ const mode = options.expanded ? "full" : presentation;
224
+ state.panel?.setExpanded(mode === "full");
225
+ state.panel?.setDiffsVisible(mode !== "disabled");
211
226
 
212
227
  state.panel?.setBackground(context.isError ? "toolErrorBg" : "toolSuccessBg");
213
228
  cancelPreviewWorker(state);
@@ -301,18 +316,6 @@ function createRenderer(
301
316
  };
302
317
  }
303
318
 
304
- const diffViewCache = new Map<string, boolean>();
305
-
306
- /** Returns whether diffs should render fully by default for the given project. */
307
- function preferFullDiff(cwd: string): boolean {
308
- let preferFull = diffViewCache.get(cwd);
309
- if (preferFull === undefined) {
310
- preferFull = loadRendererConfig(cwd).diffView === "full";
311
- diffViewCache.set(cwd, preferFull);
312
- }
313
- return preferFull;
314
- }
315
-
316
319
  function panel(previous: unknown, theme: Theme, ownsShell: boolean): MutationPanel {
317
320
  const component =
318
321
  previous instanceof MutationPanel ? previous : new MutationPanel(theme, ownsShell);
@@ -626,7 +629,9 @@ function applyResultResources(
626
629
  expanded,
627
630
  );
628
631
  state.panel?.setResultResources(stableResources);
629
- state.panel?.setExpanded(expanded || preferFullDiff(state.cwd ?? process.cwd()));
632
+ const mode = expanded ? "full" : (state.presentation ?? "compact");
633
+ state.panel?.setExpanded(mode === "full");
634
+ state.panel?.setDiffsVisible(mode !== "disabled");
630
635
  clearTypingRuntime(state);
631
636
  }
632
637
 
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "pi-agent-text-editor-stale-anchor",
3
- "version": "0.6.0",
3
+ "version": "0.6.2",
4
4
  "type": "module",
5
5
  "dependencies": {
6
- "pi-agent-invariant": "0.6.0",
7
- "pi-agent-read": "0.6.0",
8
- "pi-agent-text-editor": "0.6.0"
6
+ "pi-agent-invariant": "0.6.2",
7
+ "pi-agent-read": "0.6.2",
8
+ "pi-agent-text-editor": "0.6.2"
9
9
  },
10
10
  "pi": {
11
11
  "extensions": [
12
- "./runtime/entry-74.js"
12
+ "./runtime/entry-79.js"
13
13
  ]
14
14
  },
15
15
  "peerDependencies": {
@@ -0,0 +1,2 @@
1
+ export * from "../../../../../../dist/entry-79.js";
2
+ export { default } from "../../../../../../dist/entry-79.js";
@@ -1,2 +1 @@
1
1
  export * from "../../../../dist/entry-72.js";
2
- export { default } from "../../../../dist/entry-72.js";
@@ -0,0 +1 @@
1
+ export * from "../../../../dist/entry-73.js";
@@ -0,0 +1 @@
1
+ export * from "../../../../dist/entry-74.js";
@@ -0,0 +1 @@
1
+ export * from "../../../../dist/entry-75.js";
@@ -0,0 +1 @@
1
+ export * from "../../../../dist/entry-76.js";
@@ -0,0 +1,2 @@
1
+ export * from "../../../../dist/entry-77.js";
2
+ export { default } from "../../../../dist/entry-77.js";
@@ -152,25 +152,31 @@ export function createApplyExecution(
152
152
  }
153
153
  const requestedSnapshots =
154
154
  (arguments_ as { snapshots?: readonly EditorSnapshot[] }).snapshots ?? [];
155
+ const changedSources = new Set([
156
+ ...value.files.map((file) => file.source),
157
+ ...value.completed,
158
+ ]);
155
159
  const refreshed = await Promise.all(
156
- requestedSnapshots.map(async (snapshot) => {
157
- const outcome = await services.read.read(
158
- { path: snapshot.source },
159
- { cwd: context.cwd, signal },
160
- "script",
161
- );
162
- const script = outcome.script;
163
- return !outcome.isError &&
164
- script?.kind === "text" &&
165
- typeof script.content === "string"
166
- ? {
167
- id: snapshot.id,
168
- source: outcome.details.source ?? script.source,
169
- content: script.content,
170
- lines: script.lines,
171
- }
172
- : { id: snapshot.id, unavailable: true };
173
- }),
160
+ requestedSnapshots
161
+ .filter((snapshot) => changedSources.has(snapshot.source))
162
+ .map(async (snapshot) => {
163
+ const outcome = await services.read.read(
164
+ { path: snapshot.source },
165
+ { cwd: context.cwd, signal },
166
+ "script",
167
+ );
168
+ const script = outcome.script;
169
+ return !outcome.isError &&
170
+ script?.kind === "text" &&
171
+ typeof script.content === "string"
172
+ ? {
173
+ id: snapshot.id,
174
+ source: outcome.details.source ?? script.source,
175
+ content: script.content,
176
+ lines: script.lines,
177
+ }
178
+ : { id: snapshot.id, unavailable: true };
179
+ }),
174
180
  );
175
181
  const response = { ...value, snapshots: refreshed };
176
182
  results.record(id, "mutation", response);
@@ -18,6 +18,7 @@ export interface ApplyOutput {
18
18
  readonly content: Content;
19
19
  readonly level: "full" | "compact" | "summary";
20
20
  readonly temporarySource?: string;
21
+ readonly mutations?: ReturnType<typeof finalApplyMutations>;
21
22
  }
22
23
 
23
24
  /** Presents net file effects once, preserving native images and one combined text budget. */
@@ -75,7 +76,7 @@ export async function renderApplyOutput(
75
76
  if (error !== undefined) content.push(text(formatError(error)));
76
77
  if (content.length === 0) content.push(text("No operations or explicit results."));
77
78
  const full = textContent(content);
78
- if (!truncateHead(full).truncated) return { content, level: "full" };
79
+ if (!truncateHead(full).truncated) return { content, level: "full", mutations: finalMutations };
79
80
  const temporarySource = await read.saveTemporary(full);
80
81
  const footer = `\n\nFull Apply output: ${temporarySource}. Read this reference with offset/limit for more.`;
81
82
  if (read.reduceOutput !== undefined && !context.signal?.aborted) {
@@ -102,7 +103,7 @@ export async function renderApplyOutput(
102
103
  compact.push(...content.slice(suffixStart));
103
104
  compact.push(text(footer.trimStart()));
104
105
  if (!truncateHead(textContent(compact)).truncated)
105
- return { content: compact, level: "compact", temporarySource };
106
+ return { content: compact, level: "compact", temporarySource, mutations: finalMutations };
106
107
  }
107
108
  const summary = [
108
109
  `Apply output reduced: ${selected.automatic.length} automatic results, ${selected.explicit.length} explicit results, ${selected.files.length} final files.`,
@@ -120,6 +121,7 @@ export async function renderApplyOutput(
120
121
  content: [text(bounded + footer), ...content.filter((block) => block.type === "image")],
121
122
  level: "summary",
122
123
  temporarySource,
124
+ mutations: finalMutations,
123
125
  };
124
126
  }
125
127
 
@@ -1,52 +1,13 @@
1
1
  const editorGuide = `
2
- Read-only helpers (same arguments as standalone tools):
3
- read({path, offset?, limit?, views?})
4
- search({query, path?, include?, exclude?, caseSensitive?, wholeWord?, limit?})
5
- diff({before, after})
6
- result(value)
2
+ Read-only helpers use the standalone-tool arguments: read({...}), search({...}), and diff({before, after}). Their results are recorded automatically.
7
3
 
8
- Transactional editor:
9
- const file = open(path | {path, views?})
10
- file.source; file.content; file.lines
11
- file.find(text) // immutable SelectionSet with every exact match, including zero
12
- file.select(searchMatch) // one-range SelectionSet
13
- file.between(start, end, {inside?: boolean}) // every sequential non-overlapping pair
14
- file.line(first, last?) // one-range SelectionSet
15
- file.replace(textOrSet, replacement)
16
- file.remove(textOrSet)
17
- file.insertBefore(textOrSet, text)
18
- file.insertAfter(textOrSet, text)
19
- copy(sourceSet, destinationSet)
20
- move(sourceSet, destinationSet)
21
- createFile(path, content)
22
- deleteFile(path)
23
- copyFile(path, target, {overwrite?: boolean})
24
- moveFile(path, target, {overwrite?: boolean})
25
- flush()
4
+ Transactional helpers:
5
+ open(path | {path, views?}); file.find(text); file.select(searchMatch); file.between(start, end, {inside?, lines?}); file.line(first, last?); file.start(); file.end(); file.before(selection); file.after(selection); file.slice(selection, start?, end?); file.union(...selections); file.within(candidates, scopes); file.linesOf(selection); file.replace(selection, text); file.remove(selection); file.insertBefore(selection, text); file.insertAfter(selection, text); file.flush(); file.delete(); replace(selection, text); remove(selection); insertBefore(selection, text); insertAfter(selection, text); copy(source, destination); move(source, destination); createFile(path, content); deleteFile(path); copyFile(path, target, {overwrite?}); moveFile(path, target, {overwrite?}); flush().
26
6
 
27
- open() returns an immutable snapshot. Selection helpers return immutable snapshot-bound SelectionSets. find() returns zero or more ranges; an empty result is not an error. Mutation methods accept a direct string or SelectionSet and stage one operation for every selected range. A direct string uses every configured in-document resolver in standalone order: structured anchors first, then exact text fallback. Resolver rejection does not fall through to literal text. Position-only anchors select their natural whole line. An empty set stages a non-applying warning; exact-query provenance can include fuzzy recovery candidates and fresh line anchors. Recovery never applies a guessed edit.
28
-
29
- All selections in one transaction refer to the current opened snapshots, so earlier staged edits never shift later selections. After each checkpoint, opened file handles refresh to actual post-outcome contents and lines; SelectionSets created before that checkpoint become stale. copy() and move() concatenate source ranges in document order and replicate that payload at every destination range. move() stages destination effects before source removals. Whole-file copyFile() and moveFile() remain separate.
30
-
31
- Pending operations commit once when the JavaScript completes normally. If the script throws, pending operations do not commit. Use flush() as an optional mid-script checkpoint. Operations run in staging order: the first valid overlapping operation wins, and later conflicts fail without undoing independent work. Check every per-operation outcome and retry only failed or blocked work. When a checkpoint changes a file, it creates one session-scoped APPLY# receipt. Explicit flush() returns it; automatic finalization reports it in the tool result. Pass the receipt to undo({ transaction: "APPLY#..." }) before any successfully changed path changes to restore all successful effects. After flush(), reuse the same opened handles and create fresh SelectionSets. Every checkpoint clears all staged operations, including failed operations and warnings. With no pending mutations, completion creates no transaction or receipt.
32
-
33
- Before each operation the host verifies snapshots, resource types, ranges, overlaps, source existence, and destination conflicts. A failed operation changes nothing when rollback completes. If rollback is incomplete, its effect is unknown and later dependent operations are blocked. Do not describe an unknown effect as success.
34
-
35
- Use find() for all exact occurrences, between() for sequential delimited ranges, select() for search results, and line() only when line identity is part of the task. Use direct strings when a configured anchor or unique exact-text fallback should select one target within the opened snapshot. Generate replacement text with ordinary JavaScript.
36
-
37
- Example:
38
- const config = open("src/config.ts");
39
- const test = open("tests/config.test.ts");
40
- config.replace("legacyMode", "stableMode");
41
- test.replace(test.find("legacyMode"), "stableMode");
42
- // Normal completion commits both staged edits.
43
-
44
- Read accepts file paths, URLs, temp/search/debug/shell/diagnostics/symbol/graph resources, and supported views. Search accepts literal, regex:, files:, ast:, and symbols: queries. File changes and read-only calls are shown automatically. Use result(value) only to expose additional calculated data; do not call it merely to display committed changes.
45
-
46
- Do not retry by guessing argument names. Inspect structured error codes such as EMPTY_SELECTION, STALE_SNAPSHOT, INVALID_TRANSACTION, and TRANSACTION_FAILED.
7
+ Selections are immutable and snapshot-bound. Use slice to select occurrences by position, union to combine non-overlapping sets, within to keep candidates contained by scopes, and linesOf to expand matches to whole lines. between accepts strings or SelectionSets as either boundary; {lines:true} expands through both containing lines. Prefer it for blocks identified by content; use line(first,last) only for exact verified line bounds. Use start/end or before/after as zero-width destinations when copy or move should insert instead of replace. Normal completion commits staged operations once; a thrown script commits none. flush() commits every staged operation; file.flush() commits only independent operations for that file while cross-file transfers stay pending. Successful checkpoints can return an APPLY# receipt. Failed operations report structured errors and do not silently guess a recovery.
47
8
  `;
48
9
 
49
- /** Agent-facing guide for the guarded Apply editor. */
10
+ /** Compact callable contract for the guarded Apply editor. */
50
11
  export function applyHelperGuide(): string {
51
12
  return editorGuide;
52
13
  }
@@ -12,6 +12,7 @@ import { preserveEnclosingBackground } from "pi-agent-tool-ui";
12
12
  import type { ApplyResults } from "./results.js";
13
13
  import type { ApplyOutput } from "./output.js";
14
14
 
15
+ type ToolPresentation = "full" | "compact" | "disabled";
15
16
  /** Deliberate user presentation, separate from model-facing operation receipts. */
16
17
  export interface ApplyDisplay {
17
18
  readonly blocks: readonly { readonly text: string; readonly read?: ReadToolResult }[];
@@ -62,7 +63,7 @@ export function createApplyDisplay(
62
63
  ],
63
64
  };
64
65
  }
65
- const mutations = finalApplyMutations(results);
66
+ const mutations = output.mutations ?? finalApplyMutations(results);
66
67
  return {
67
68
  ...(mutations.length > 0 ? { mutations: { results: mutations } } : {}),
68
69
  comparisons,
@@ -154,7 +155,7 @@ export function createApplyDisplay(
154
155
  type RenderState = {
155
156
  applyResultReady?: boolean;
156
157
  displaySource?: string;
157
- codeView?: boolean;
158
+
158
159
  projectSource?: (source: string) => string;
159
160
  };
160
161
 
@@ -210,8 +211,11 @@ export function applyFrameRows(
210
211
  /** Compose compact written calls with a pure configured tool header renderer. */
211
212
  export function createApplyCallRenderer(
212
213
  renderWritten?: (call: ApplyCallPreview, theme: Theme) => string,
214
+ presentation: ToolPresentation = "compact",
213
215
  ): NonNullable<ToolDefinition["renderCall"]> {
214
216
  return (args, theme, context) => {
217
+ if (!context.expanded && presentation === "disabled")
218
+ return new Text(theme.fg("toolTitle", "apply"), 0, 0);
215
219
  const state = context.state as RenderState;
216
220
  const projectSource = (state.projectSource ??= createApplySourceProjection(
217
221
  renderWritten ? (call) => renderWritten(call, theme) : undefined,
@@ -228,14 +232,16 @@ export function createApplyCallRenderer(
228
232
  invalidate() {},
229
233
  render(width) {
230
234
  return applyFrameRows(
231
- state.codeView || context.expanded
235
+ context.expanded || presentation === "full"
232
236
  ? (state.displaySource ?? source)
233
- : compactApplyPreview(projectSource(state.displaySource ?? source)),
237
+ : presentation === "disabled"
238
+ ? ""
239
+ : compactApplyPreview(projectSource(state.displaySource ?? source)),
234
240
  theme,
235
241
  width,
236
242
  "call",
237
243
  !state.applyResultReady,
238
- state.codeView || context.expanded || !renderWritten ? "javascript" : undefined,
244
+ context.expanded || presentation === "full" || !renderWritten ? "javascript" : undefined,
239
245
  );
240
246
  },
241
247
  };
@@ -328,6 +334,8 @@ export function createApplyResultRenderer(
328
334
  const rows = mutationPanel.render(Math.max(1, width - 4));
329
335
  if (body.length > 0 && rows.length > 0) body.push("");
330
336
  body.push(...rows);
337
+ if (rows.length === 0)
338
+ body.push(...(mutations?.results ?? []).map((file) => file.path ?? "Changed file"));
331
339
  } else if (mutations !== undefined)
332
340
  body.push(...(mutations.results ?? []).map((file) => file.path ?? "Changed file"));
333
341
  if (