@theia/plugin-ext 1.65.0-next.6 → 1.65.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.
Files changed (365) hide show
  1. package/lib/common/plugin-api-rpc-model.d.ts +3 -0
  2. package/lib/common/plugin-api-rpc-model.d.ts.map +1 -1
  3. package/lib/common/plugin-api-rpc.d.ts +3 -0
  4. package/lib/common/plugin-api-rpc.d.ts.map +1 -1
  5. package/lib/common/plugin-protocol.d.ts +5 -5
  6. package/lib/common/plugin-protocol.d.ts.map +1 -1
  7. package/lib/common/plugin-protocol.js.map +1 -1
  8. package/lib/common/uri-components.d.ts +1 -0
  9. package/lib/common/uri-components.d.ts.map +1 -1
  10. package/lib/common/uri-components.js +2 -0
  11. package/lib/common/uri-components.js.map +1 -1
  12. package/lib/hosted/browser/hosted-plugin.d.ts +1 -1
  13. package/lib/hosted/browser/hosted-plugin.d.ts.map +1 -1
  14. package/lib/hosted/browser/hosted-plugin.js +1 -1
  15. package/lib/hosted/browser/hosted-plugin.js.map +1 -1
  16. package/lib/hosted/node/scanners/scanner-theia.d.ts +41 -0
  17. package/lib/hosted/node/scanners/scanner-theia.d.ts.map +1 -1
  18. package/lib/hosted/node/scanners/scanner-theia.js +38 -5
  19. package/lib/hosted/node/scanners/scanner-theia.js.map +1 -1
  20. package/lib/main/browser/authentication-main.d.ts +3 -0
  21. package/lib/main/browser/authentication-main.d.ts.map +1 -1
  22. package/lib/main/browser/command-registry-main.d.ts +3 -0
  23. package/lib/main/browser/command-registry-main.d.ts.map +1 -1
  24. package/lib/main/browser/comments/comment-thread-widget.d.ts +3 -0
  25. package/lib/main/browser/comments/comment-thread-widget.d.ts.map +1 -1
  26. package/lib/main/browser/comments/comments-main.d.ts +3 -0
  27. package/lib/main/browser/comments/comments-main.d.ts.map +1 -1
  28. package/lib/main/browser/custom-editors/custom-editor-opener.d.ts +2 -1
  29. package/lib/main/browser/custom-editors/custom-editor-opener.d.ts.map +1 -1
  30. package/lib/main/browser/custom-editors/custom-editor-opener.js.map +1 -1
  31. package/lib/main/browser/custom-editors/custom-editors-main.d.ts +4 -1
  32. package/lib/main/browser/custom-editors/custom-editors-main.d.ts.map +1 -1
  33. package/lib/main/browser/custom-editors/custom-editors-main.js +2 -2
  34. package/lib/main/browser/custom-editors/custom-editors-main.js.map +1 -1
  35. package/lib/main/browser/custom-editors/plugin-custom-editor-registry.d.ts +2 -1
  36. package/lib/main/browser/custom-editors/plugin-custom-editor-registry.d.ts.map +1 -1
  37. package/lib/main/browser/custom-editors/plugin-custom-editor-registry.js +1 -1
  38. package/lib/main/browser/custom-editors/plugin-custom-editor-registry.js.map +1 -1
  39. package/lib/main/browser/debug/debug-main.js +1 -1
  40. package/lib/main/browser/debug/debug-main.js.map +1 -1
  41. package/lib/main/browser/debug/plugin-debug-service.d.ts +3 -0
  42. package/lib/main/browser/debug/plugin-debug-service.d.ts.map +1 -1
  43. package/lib/main/browser/debug/plugin-debug-session-factory.d.ts +1 -1
  44. package/lib/main/browser/debug/plugin-debug-session-factory.d.ts.map +1 -1
  45. package/lib/main/browser/dialogs-main.js +2 -2
  46. package/lib/main/browser/dialogs-main.js.map +1 -1
  47. package/lib/main/browser/languages-main.d.ts +4 -1
  48. package/lib/main/browser/languages-main.d.ts.map +1 -1
  49. package/lib/main/browser/languages-main.js +3 -3
  50. package/lib/main/browser/languages-main.js.map +1 -1
  51. package/lib/main/browser/menus/menus-contribution-handler.d.ts.map +1 -1
  52. package/lib/main/browser/menus/menus-contribution-handler.js +4 -4
  53. package/lib/main/browser/menus/menus-contribution-handler.js.map +1 -1
  54. package/lib/main/browser/menus/plugin-menu-command-adapter.d.ts +3 -1
  55. package/lib/main/browser/menus/plugin-menu-command-adapter.d.ts.map +1 -1
  56. package/lib/main/browser/menus/plugin-menu-command-adapter.js +20 -2
  57. package/lib/main/browser/menus/plugin-menu-command-adapter.js.map +1 -1
  58. package/lib/main/browser/menus/vscode-theia-menu-mappings.d.ts.map +1 -1
  59. package/lib/main/browser/menus/vscode-theia-menu-mappings.js +1 -0
  60. package/lib/main/browser/menus/vscode-theia-menu-mappings.js.map +1 -1
  61. package/lib/main/browser/notebooks/notebooks-main.d.ts +3 -0
  62. package/lib/main/browser/notebooks/notebooks-main.d.ts.map +1 -1
  63. package/lib/main/browser/notebooks/renderers/output-webview-internal.d.ts.map +1 -1
  64. package/lib/main/browser/notebooks/renderers/output-webview-internal.js +7 -0
  65. package/lib/main/browser/notebooks/renderers/output-webview-internal.js.map +1 -1
  66. package/lib/main/browser/plugin-contribution-handler.d.ts +2 -3
  67. package/lib/main/browser/plugin-contribution-handler.d.ts.map +1 -1
  68. package/lib/main/browser/plugin-contribution-handler.js +11 -28
  69. package/lib/main/browser/plugin-contribution-handler.js.map +1 -1
  70. package/lib/main/browser/plugin-ext-argument-processor.d.ts +12 -0
  71. package/lib/main/browser/plugin-ext-argument-processor.d.ts.map +1 -0
  72. package/lib/main/browser/plugin-ext-argument-processor.js +41 -0
  73. package/lib/main/browser/plugin-ext-argument-processor.js.map +1 -0
  74. package/lib/main/browser/plugin-ext-frontend-module.d.ts.map +1 -1
  75. package/lib/main/browser/plugin-ext-frontend-module.js +7 -1
  76. package/lib/main/browser/plugin-ext-frontend-module.js.map +1 -1
  77. package/lib/main/browser/preference-registry-main.d.ts +1 -1
  78. package/lib/main/browser/preference-registry-main.d.ts.map +1 -1
  79. package/lib/main/browser/preference-registry-main.js +10 -8
  80. package/lib/main/browser/preference-registry-main.js.map +1 -1
  81. package/lib/main/browser/quick-open-main.d.ts +3 -0
  82. package/lib/main/browser/quick-open-main.d.ts.map +1 -1
  83. package/lib/main/browser/status-bar-message-registry-main.d.ts.map +1 -1
  84. package/lib/main/browser/status-bar-message-registry-main.js +2 -1
  85. package/lib/main/browser/status-bar-message-registry-main.js.map +1 -1
  86. package/lib/main/browser/terminal-main.d.ts +3 -0
  87. package/lib/main/browser/terminal-main.d.ts.map +1 -1
  88. package/lib/main/browser/terminal-main.js +3 -1
  89. package/lib/main/browser/terminal-main.js.map +1 -1
  90. package/lib/main/browser/view/plugin-view-registry.d.ts.map +1 -1
  91. package/lib/main/browser/view/plugin-view-registry.js +3 -0
  92. package/lib/main/browser/view/plugin-view-registry.js.map +1 -1
  93. package/lib/main/browser/view/tree-view-decorator-service.d.ts +3 -0
  94. package/lib/main/browser/view/tree-view-decorator-service.d.ts.map +1 -1
  95. package/lib/main/browser/view/tree-view-widget.d.ts +3 -0
  96. package/lib/main/browser/view/tree-view-widget.d.ts.map +1 -1
  97. package/lib/main/browser/view/tree-views-main.d.ts +3 -0
  98. package/lib/main/browser/view/tree-views-main.d.ts.map +1 -1
  99. package/lib/main/browser/view/tree-views-main.js +1 -1
  100. package/lib/main/browser/view/tree-views-main.js.map +1 -1
  101. package/lib/main/browser/webview/webview-frontend-preference-contribution.d.ts +5 -0
  102. package/lib/main/browser/webview/webview-frontend-preference-contribution.d.ts.map +1 -0
  103. package/lib/main/browser/webview/webview-frontend-preference-contribution.js +40 -0
  104. package/lib/main/browser/webview/webview-frontend-preference-contribution.js.map +1 -0
  105. package/lib/main/browser/webview/webview-theme-data-provider.d.ts +1 -1
  106. package/lib/main/browser/webview/webview-theme-data-provider.d.ts.map +1 -1
  107. package/lib/main/browser/webview/webview-theme-data-provider.js +1 -1
  108. package/lib/main/browser/webview/webview-theme-data-provider.js.map +1 -1
  109. package/lib/main/browser/webview/webview.d.ts +4 -1
  110. package/lib/main/browser/webview/webview.d.ts.map +1 -1
  111. package/lib/main/browser/webview/webview.js +3 -2
  112. package/lib/main/browser/webview/webview.js.map +1 -1
  113. package/lib/main/browser/webview-views/webview-views-main.d.ts +3 -0
  114. package/lib/main/browser/webview-views/webview-views-main.d.ts.map +1 -1
  115. package/lib/main/browser/webviews-main.d.ts +3 -0
  116. package/lib/main/browser/webviews-main.d.ts.map +1 -1
  117. package/lib/main/browser/workspace-main.d.ts +3 -0
  118. package/lib/main/browser/workspace-main.d.ts.map +1 -1
  119. package/lib/main/browser/workspace-main.js +3 -3
  120. package/lib/main/browser/workspace-main.js.map +1 -1
  121. package/lib/main/{browser/webview → common}/webview-preferences.d.ts +1 -1
  122. package/lib/main/common/webview-preferences.d.ts.map +1 -0
  123. package/lib/main/{browser/webview → common}/webview-preferences.js +1 -12
  124. package/lib/main/common/webview-preferences.js.map +1 -0
  125. package/lib/main/node/plugin-ext-backend-module.d.ts.map +1 -1
  126. package/lib/main/node/plugin-ext-backend-module.js +2 -0
  127. package/lib/main/node/plugin-ext-backend-module.js.map +1 -1
  128. package/lib/plugin/authentication-ext.d.ts +3 -0
  129. package/lib/plugin/authentication-ext.d.ts.map +1 -1
  130. package/lib/plugin/clipboard-ext.d.ts +3 -0
  131. package/lib/plugin/clipboard-ext.d.ts.map +1 -1
  132. package/lib/plugin/command-registry.d.ts +3 -0
  133. package/lib/plugin/command-registry.d.ts.map +1 -1
  134. package/lib/plugin/comments.d.ts +3 -0
  135. package/lib/plugin/comments.d.ts.map +1 -1
  136. package/lib/plugin/custom-editors.d.ts +3 -0
  137. package/lib/plugin/custom-editors.d.ts.map +1 -1
  138. package/lib/plugin/debug/debug-ext.d.ts +3 -0
  139. package/lib/plugin/debug/debug-ext.d.ts.map +1 -1
  140. package/lib/plugin/debug/plugin-debug-adapter-creator.d.ts +3 -0
  141. package/lib/plugin/debug/plugin-debug-adapter-creator.d.ts.map +1 -1
  142. package/lib/plugin/debug/plugin-debug-adapter-session.d.ts +3 -0
  143. package/lib/plugin/debug/plugin-debug-adapter-session.d.ts.map +1 -1
  144. package/lib/plugin/debug/plugin-debug-adapter-tracker.d.ts +3 -0
  145. package/lib/plugin/debug/plugin-debug-adapter-tracker.d.ts.map +1 -1
  146. package/lib/plugin/decorations.d.ts +3 -0
  147. package/lib/plugin/decorations.d.ts.map +1 -1
  148. package/lib/plugin/dialogs.d.ts +3 -0
  149. package/lib/plugin/dialogs.d.ts.map +1 -1
  150. package/lib/plugin/document-data.d.ts +3 -0
  151. package/lib/plugin/document-data.d.ts.map +1 -1
  152. package/lib/plugin/documents.d.ts +3 -0
  153. package/lib/plugin/documents.d.ts.map +1 -1
  154. package/lib/plugin/env.d.ts +3 -0
  155. package/lib/plugin/env.d.ts.map +1 -1
  156. package/lib/plugin/file-system-event-service-ext-impl.d.ts +3 -0
  157. package/lib/plugin/file-system-event-service-ext-impl.d.ts.map +1 -1
  158. package/lib/plugin/file-system-ext-impl.d.ts +3 -0
  159. package/lib/plugin/file-system-ext-impl.d.ts.map +1 -1
  160. package/lib/plugin/label-service.d.ts +3 -0
  161. package/lib/plugin/label-service.d.ts.map +1 -1
  162. package/lib/plugin/languages/call-hierarchy.d.ts +3 -0
  163. package/lib/plugin/languages/call-hierarchy.d.ts.map +1 -1
  164. package/lib/plugin/languages/code-action.d.ts +3 -0
  165. package/lib/plugin/languages/code-action.d.ts.map +1 -1
  166. package/lib/plugin/languages/color.d.ts +3 -0
  167. package/lib/plugin/languages/color.d.ts.map +1 -1
  168. package/lib/plugin/languages/completion.d.ts +3 -0
  169. package/lib/plugin/languages/completion.d.ts.map +1 -1
  170. package/lib/plugin/languages/declaration.d.ts +3 -0
  171. package/lib/plugin/languages/declaration.d.ts.map +1 -1
  172. package/lib/plugin/languages/definition.d.ts +3 -0
  173. package/lib/plugin/languages/definition.d.ts.map +1 -1
  174. package/lib/plugin/languages/diagnostics.d.ts +3 -0
  175. package/lib/plugin/languages/diagnostics.d.ts.map +1 -1
  176. package/lib/plugin/languages/document-drop-edit.d.ts +3 -0
  177. package/lib/plugin/languages/document-drop-edit.d.ts.map +1 -1
  178. package/lib/plugin/languages/document-formatting.d.ts +3 -0
  179. package/lib/plugin/languages/document-formatting.d.ts.map +1 -1
  180. package/lib/plugin/languages/document-highlight.d.ts +3 -0
  181. package/lib/plugin/languages/document-highlight.d.ts.map +1 -1
  182. package/lib/plugin/languages/evaluatable-expression.d.ts +3 -0
  183. package/lib/plugin/languages/evaluatable-expression.d.ts.map +1 -1
  184. package/lib/plugin/languages/folding.d.ts +3 -0
  185. package/lib/plugin/languages/folding.d.ts.map +1 -1
  186. package/lib/plugin/languages/hover.d.ts +3 -0
  187. package/lib/plugin/languages/hover.d.ts.map +1 -1
  188. package/lib/plugin/languages/implementation.d.ts +3 -0
  189. package/lib/plugin/languages/implementation.d.ts.map +1 -1
  190. package/lib/plugin/languages/inlay-hints.d.ts +3 -0
  191. package/lib/plugin/languages/inlay-hints.d.ts.map +1 -1
  192. package/lib/plugin/languages/inline-completion.d.ts +3 -0
  193. package/lib/plugin/languages/inline-completion.d.ts.map +1 -1
  194. package/lib/plugin/languages/inline-values.d.ts +3 -0
  195. package/lib/plugin/languages/inline-values.d.ts.map +1 -1
  196. package/lib/plugin/languages/lens.d.ts +3 -0
  197. package/lib/plugin/languages/lens.d.ts.map +1 -1
  198. package/lib/plugin/languages/link-provider.d.ts +3 -0
  199. package/lib/plugin/languages/link-provider.d.ts.map +1 -1
  200. package/lib/plugin/languages/linked-editing-range.d.ts +3 -0
  201. package/lib/plugin/languages/linked-editing-range.d.ts.map +1 -1
  202. package/lib/plugin/languages/on-type-formatting.d.ts +3 -0
  203. package/lib/plugin/languages/on-type-formatting.d.ts.map +1 -1
  204. package/lib/plugin/languages/outline.d.ts +3 -0
  205. package/lib/plugin/languages/outline.d.ts.map +1 -1
  206. package/lib/plugin/languages/range-formatting.d.ts +3 -0
  207. package/lib/plugin/languages/range-formatting.d.ts.map +1 -1
  208. package/lib/plugin/languages/reference.d.ts +3 -0
  209. package/lib/plugin/languages/reference.d.ts.map +1 -1
  210. package/lib/plugin/languages/rename.d.ts +3 -0
  211. package/lib/plugin/languages/rename.d.ts.map +1 -1
  212. package/lib/plugin/languages/selection-range.d.ts +3 -0
  213. package/lib/plugin/languages/selection-range.d.ts.map +1 -1
  214. package/lib/plugin/languages/semantic-highlighting.d.ts +3 -0
  215. package/lib/plugin/languages/semantic-highlighting.d.ts.map +1 -1
  216. package/lib/plugin/languages/signature.d.ts +3 -0
  217. package/lib/plugin/languages/signature.d.ts.map +1 -1
  218. package/lib/plugin/languages/type-definition.d.ts +3 -0
  219. package/lib/plugin/languages/type-definition.d.ts.map +1 -1
  220. package/lib/plugin/languages/type-hierarchy.d.ts +3 -0
  221. package/lib/plugin/languages/type-hierarchy.d.ts.map +1 -1
  222. package/lib/plugin/languages/util.d.ts +3 -0
  223. package/lib/plugin/languages/util.d.ts.map +1 -1
  224. package/lib/plugin/languages/workspace-symbol.d.ts +3 -0
  225. package/lib/plugin/languages/workspace-symbol.d.ts.map +1 -1
  226. package/lib/plugin/languages-utils.d.ts +3 -0
  227. package/lib/plugin/languages-utils.d.ts.map +1 -1
  228. package/lib/plugin/languages.d.ts +3 -0
  229. package/lib/plugin/languages.d.ts.map +1 -1
  230. package/lib/plugin/lm-ext.d.ts +3 -0
  231. package/lib/plugin/lm-ext.d.ts.map +1 -1
  232. package/lib/plugin/markdown-string.d.ts +3 -0
  233. package/lib/plugin/markdown-string.d.ts.map +1 -1
  234. package/lib/plugin/message-registry.d.ts +3 -0
  235. package/lib/plugin/message-registry.d.ts.map +1 -1
  236. package/lib/plugin/node/debug/plugin-node-debug-adapter-creator.d.ts +3 -0
  237. package/lib/plugin/node/debug/plugin-node-debug-adapter-creator.d.ts.map +1 -1
  238. package/lib/plugin/notebook/notebook-document.d.ts +3 -0
  239. package/lib/plugin/notebook/notebook-document.d.ts.map +1 -1
  240. package/lib/plugin/notebook/notebook-documents.d.ts +3 -0
  241. package/lib/plugin/notebook/notebook-documents.d.ts.map +1 -1
  242. package/lib/plugin/notebook/notebook-editor.d.ts +3 -0
  243. package/lib/plugin/notebook/notebook-editor.d.ts.map +1 -1
  244. package/lib/plugin/notebook/notebook-editors.d.ts +3 -0
  245. package/lib/plugin/notebook/notebook-editors.d.ts.map +1 -1
  246. package/lib/plugin/notebook/notebook-kernels.d.ts +3 -0
  247. package/lib/plugin/notebook/notebook-kernels.d.ts.map +1 -1
  248. package/lib/plugin/notebook/notebook-renderers.d.ts +3 -0
  249. package/lib/plugin/notebook/notebook-renderers.d.ts.map +1 -1
  250. package/lib/plugin/notebook/notebooks.d.ts +3 -0
  251. package/lib/plugin/notebook/notebooks.d.ts.map +1 -1
  252. package/lib/plugin/notification.d.ts +3 -0
  253. package/lib/plugin/notification.d.ts.map +1 -1
  254. package/lib/plugin/output-channel/log-output-channel.d.ts +3 -0
  255. package/lib/plugin/output-channel/log-output-channel.d.ts.map +1 -1
  256. package/lib/plugin/output-channel/output-channel-item.d.ts +3 -0
  257. package/lib/plugin/output-channel/output-channel-item.d.ts.map +1 -1
  258. package/lib/plugin/output-channel-registry.d.ts +3 -0
  259. package/lib/plugin/output-channel-registry.d.ts.map +1 -1
  260. package/lib/plugin/plugin-context.d.ts +3 -0
  261. package/lib/plugin/plugin-context.d.ts.map +1 -1
  262. package/lib/plugin/plugin-context.js +11 -2
  263. package/lib/plugin/plugin-context.js.map +1 -1
  264. package/lib/plugin/plugin-manager.d.ts +3 -0
  265. package/lib/plugin/plugin-manager.d.ts.map +1 -1
  266. package/lib/plugin/plugin-storage.d.ts +3 -0
  267. package/lib/plugin/plugin-storage.d.ts.map +1 -1
  268. package/lib/plugin/preference-registry.d.ts +3 -0
  269. package/lib/plugin/preference-registry.d.ts.map +1 -1
  270. package/lib/plugin/quick-open.d.ts +3 -0
  271. package/lib/plugin/quick-open.d.ts.map +1 -1
  272. package/lib/plugin/scm.d.ts +3 -0
  273. package/lib/plugin/scm.d.ts.map +1 -1
  274. package/lib/plugin/scm.js +6 -1
  275. package/lib/plugin/scm.js.map +1 -1
  276. package/lib/plugin/secrets-ext.d.ts +3 -0
  277. package/lib/plugin/secrets-ext.d.ts.map +1 -1
  278. package/lib/plugin/status-bar/status-bar-item.d.ts +6 -1
  279. package/lib/plugin/status-bar/status-bar-item.d.ts.map +1 -1
  280. package/lib/plugin/status-bar/status-bar-item.js +46 -1
  281. package/lib/plugin/status-bar/status-bar-item.js.map +1 -1
  282. package/lib/plugin/status-bar-message-registry.d.ts +6 -1
  283. package/lib/plugin/status-bar-message-registry.d.ts.map +1 -1
  284. package/lib/plugin/status-bar-message-registry.js +3 -2
  285. package/lib/plugin/status-bar-message-registry.js.map +1 -1
  286. package/lib/plugin/tabs.d.ts +3 -0
  287. package/lib/plugin/tabs.d.ts.map +1 -1
  288. package/lib/plugin/tasks/task-provider.d.ts +3 -0
  289. package/lib/plugin/tasks/task-provider.d.ts.map +1 -1
  290. package/lib/plugin/tasks/tasks.d.ts +3 -0
  291. package/lib/plugin/tasks/tasks.d.ts.map +1 -1
  292. package/lib/plugin/terminal-ext.d.ts +3 -0
  293. package/lib/plugin/terminal-ext.d.ts.map +1 -1
  294. package/lib/plugin/test-item.d.ts +3 -0
  295. package/lib/plugin/test-item.d.ts.map +1 -1
  296. package/lib/plugin/tests.d.ts +3 -0
  297. package/lib/plugin/tests.d.ts.map +1 -1
  298. package/lib/plugin/text-editor.d.ts +6 -0
  299. package/lib/plugin/text-editor.d.ts.map +1 -1
  300. package/lib/plugin/text-editor.js +7 -0
  301. package/lib/plugin/text-editor.js.map +1 -1
  302. package/lib/plugin/text-editors.d.ts +6 -0
  303. package/lib/plugin/text-editors.d.ts.map +1 -1
  304. package/lib/plugin/text-editors.js +63 -0
  305. package/lib/plugin/text-editors.js.map +1 -1
  306. package/lib/plugin/timeline.d.ts +3 -0
  307. package/lib/plugin/timeline.d.ts.map +1 -1
  308. package/lib/plugin/tree/tree-views.d.ts +3 -0
  309. package/lib/plugin/tree/tree-views.d.ts.map +1 -1
  310. package/lib/plugin/type-converters.d.ts +3 -0
  311. package/lib/plugin/type-converters.d.ts.map +1 -1
  312. package/lib/plugin/types-impl.d.ts +106 -5
  313. package/lib/plugin/types-impl.d.ts.map +1 -1
  314. package/lib/plugin/types-impl.js +23 -3
  315. package/lib/plugin/types-impl.js.map +1 -1
  316. package/lib/plugin/uri-ext.d.ts +3 -0
  317. package/lib/plugin/uri-ext.d.ts.map +1 -1
  318. package/lib/plugin/webview-views.d.ts +3 -0
  319. package/lib/plugin/webview-views.d.ts.map +1 -1
  320. package/lib/plugin/webviews.d.ts +3 -0
  321. package/lib/plugin/webviews.d.ts.map +1 -1
  322. package/lib/plugin/window-state.d.ts +3 -0
  323. package/lib/plugin/window-state.d.ts.map +1 -1
  324. package/lib/plugin/workspace.d.ts +3 -0
  325. package/lib/plugin/workspace.d.ts.map +1 -1
  326. package/package.json +30 -30
  327. package/src/common/plugin-protocol.ts +5 -5
  328. package/src/common/uri-components.ts +3 -0
  329. package/src/hosted/browser/hosted-plugin.ts +1 -1
  330. package/src/hosted/node/scanners/scanner-theia.ts +87 -5
  331. package/src/main/browser/custom-editors/custom-editor-opener.tsx +2 -2
  332. package/src/main/browser/custom-editors/custom-editors-main.ts +1 -1
  333. package/src/main/browser/custom-editors/plugin-custom-editor-registry.ts +2 -2
  334. package/src/main/browser/debug/debug-main.ts +1 -1
  335. package/src/main/browser/debug/plugin-debug-session-factory.ts +1 -1
  336. package/src/main/browser/dialogs-main.ts +1 -1
  337. package/src/main/browser/languages-main.ts +1 -1
  338. package/src/main/browser/menus/menus-contribution-handler.ts +5 -5
  339. package/src/main/browser/menus/plugin-menu-command-adapter.ts +23 -4
  340. package/src/main/browser/menus/vscode-theia-menu-mappings.ts +2 -1
  341. package/src/main/browser/notebooks/renderers/output-webview-internal.ts +8 -0
  342. package/src/main/browser/plugin-contribution-handler.ts +14 -30
  343. package/src/main/browser/plugin-ext-argument-processor.ts +39 -0
  344. package/src/main/browser/plugin-ext-frontend-module.ts +9 -2
  345. package/src/main/browser/preference-registry-main.ts +9 -7
  346. package/src/main/browser/status-bar-message-registry-main.ts +2 -1
  347. package/src/main/browser/terminal-main.ts +2 -1
  348. package/src/main/browser/view/plugin-view-registry.ts +3 -0
  349. package/src/main/browser/view/tree-views-main.ts +1 -1
  350. package/src/main/browser/webview/pre/main.js +13 -10
  351. package/src/main/browser/webview/webview-frontend-preference-contribution.ts +37 -0
  352. package/src/main/browser/webview/webview-theme-data-provider.ts +1 -1
  353. package/src/main/browser/webview/webview.ts +3 -2
  354. package/src/main/browser/workspace-main.ts +2 -2
  355. package/src/main/{browser/webview → common}/webview-preferences.ts +3 -16
  356. package/src/main/node/plugin-ext-backend-module.ts +2 -0
  357. package/src/plugin/plugin-context.ts +14 -3
  358. package/src/plugin/scm.ts +12 -1
  359. package/src/plugin/status-bar/status-bar-item.ts +54 -0
  360. package/src/plugin/status-bar-message-registry.ts +3 -2
  361. package/src/plugin/text-editor.ts +11 -0
  362. package/src/plugin/text-editors.ts +70 -1
  363. package/src/plugin/types-impl.ts +122 -4
  364. package/lib/main/browser/webview/webview-preferences.d.ts.map +0 -1
  365. package/lib/main/browser/webview/webview-preferences.js.map +0 -1
@@ -26,7 +26,7 @@ import {
26
26
  noopWidgetStatusBarContribution,
27
27
  WidgetStatusBarContribution
28
28
  } from '@theia/core/lib/browser';
29
- import { MaybePromise, CommandContribution, ResourceResolver, bindContributionProvider, URI, generateUuid } from '@theia/core/lib/common';
29
+ import { MaybePromise, CommandContribution, ResourceResolver, bindContributionProvider, URI, generateUuid, PreferenceContribution } from '@theia/core/lib/common';
30
30
  import { WebSocketConnectionProvider } from '@theia/core/lib/browser/messaging';
31
31
  import { HostedPluginSupport } from '../../hosted/browser/hosted-plugin';
32
32
  import { HostedPluginWatcher } from '../../hosted/browser/hosted-plugin-watcher';
@@ -60,7 +60,6 @@ import { OutputChannelRegistryMainImpl } from './output-channel-registry-main';
60
60
  import { WebviewWidget } from './webview/webview';
61
61
  import { WebviewEnvironment } from './webview/webview-environment';
62
62
  import { WebviewThemeDataProvider } from './webview/webview-theme-data-provider';
63
- import { bindWebviewPreferences } from './webview/webview-preferences';
64
63
  import { WebviewResourceCache } from './webview/webview-resource-cache';
65
64
  import { PluginIconThemeService, PluginIconThemeFactory, PluginIconThemeDefinition, PluginIconTheme } from './plugin-icon-theme-service';
66
65
  import { PluginTreeViewNodeLabelProvider } from './view/plugin-tree-view-node-label-provider';
@@ -90,6 +89,9 @@ import { CellOutputWebviewImpl, createCellOutputWebviewContainer } from './noteb
90
89
  import { ArgumentProcessorContribution } from './command-registry-main';
91
90
  import { WebviewSecondaryWindowSupport } from './webview/webview-secondary-window-support';
92
91
  import { CustomEditorUndoRedoHandler } from './custom-editors/custom-editor-undo-redo-handler';
92
+ import { bindWebviewPreferences } from '../common/webview-preferences';
93
+ import { WebviewFrontendPreferenceContribution } from './webview/webview-frontend-preference-contribution';
94
+ import { PluginExtToolbarItemArgumentProcessor } from './plugin-ext-argument-processor';
93
95
 
94
96
  export default new ContainerModule((bind, unbind, isBound, rebind) => {
95
97
 
@@ -180,6 +182,8 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
180
182
  })).inSingletonScope();
181
183
 
182
184
  bindWebviewPreferences(bind);
185
+ bind(WebviewFrontendPreferenceContribution).toSelf().inSingletonScope();
186
+ bind(PreferenceContribution).toService(WebviewFrontendPreferenceContribution);
183
187
  bind(WebviewEnvironment).toSelf().inSingletonScope();
184
188
  bind(WebviewThemeDataProvider).toSelf().inSingletonScope();
185
189
  bind(WebviewResourceCache).toSelf().inSingletonScope();
@@ -287,4 +291,7 @@ export default new ContainerModule((bind, unbind, isBound, rebind) => {
287
291
  );
288
292
  bindContributionProvider(bind, ArgumentProcessorContribution);
289
293
 
294
+ bind(PluginExtToolbarItemArgumentProcessor).toSelf().inSingletonScope();
295
+ bind(ArgumentProcessorContribution).toService(PluginExtToolbarItemArgumentProcessor);
296
+
290
297
  });
@@ -19,7 +19,7 @@ import {
19
19
  PreferenceServiceImpl,
20
20
  PreferenceScope,
21
21
  PreferenceProviderProvider
22
- } from '@theia/core/lib/browser/preferences';
22
+ } from '@theia/core/lib/common/preferences';
23
23
  import { interfaces } from '@theia/core/shared/inversify';
24
24
  import {
25
25
  MAIN_RPC_CONTEXT,
@@ -40,13 +40,15 @@ export function getPreferences(preferenceProviderProvider: PreferenceProviderPro
40
40
  return PreferenceScope.getScopes().reduce((result: { [key: number]: any }, scope: PreferenceScope) => {
41
41
  result[scope] = {};
42
42
  const provider = preferenceProviderProvider(scope);
43
- if (scope === PreferenceScope.Folder) {
44
- for (const f of folders) {
45
- const folderPrefs = provider.getPreferences(f);
46
- result[scope][f] = folderPrefs;
43
+ if (provider) {
44
+ if (scope === PreferenceScope.Folder) {
45
+ for (const f of folders) {
46
+ const folderPrefs = provider.getPreferences(f);
47
+ result[scope][f] = folderPrefs;
48
+ }
49
+ } else {
50
+ result[scope] = provider.getPreferences();
47
51
  }
48
- } else {
49
- result[scope] = provider.getPreferences();
50
52
  }
51
53
  return result;
52
54
  }, {} as PreferenceData);
@@ -70,11 +70,12 @@ export class StatusBarMessageRegistryMainImpl implements StatusBarMessageRegistr
70
70
  args
71
71
  };
72
72
 
73
+ const isNewEntry = !this.entries.has(id);
73
74
  this.entries.set(id, entry);
74
75
  await this.delegate.setElement(id, entry);
75
76
  if (this.toDispose.disposed) {
76
77
  this.$dispose(id);
77
- } else {
78
+ } else if (isNewEntry) {
78
79
  this.toDispose.push(Disposable.create(() => this.$dispose(id)));
79
80
  }
80
81
  }
@@ -171,7 +171,8 @@ export class TerminalServiceMainImpl implements TerminalServiceMain, TerminalLin
171
171
  hideFromUser: options.hideFromUser,
172
172
  location: this.getTerminalLocation(options, parentId),
173
173
  isPseudoTerminal,
174
- isTransient: options.isTransient
174
+ isTransient: options.isTransient,
175
+ shellIntegrationNonce: options.shellIntegrationNonce ?? undefined
175
176
  });
176
177
  if (options.message) {
177
178
  terminal.writeLine(options.message);
@@ -426,6 +426,9 @@ export class PluginViewRegistry implements FrontendApplicationContribution {
426
426
  toDispose.push(this.commands.registerCommand({ id: `${view.id}.focus` }, {
427
427
  execute: async () => { await this.openView(view.id, { activate: true }); }
428
428
  }));
429
+ toDispose.push(this.commands.registerCommand({ id: `${view.id}.open` }, {
430
+ execute: async () => { await this.openView(view.id, { activate: true }); }
431
+ }));
429
432
  return toDispose;
430
433
  }
431
434
 
@@ -90,7 +90,7 @@ export class TreeViewsMainImpl implements TreeViewsMain, Disposable {
90
90
  this.toDispose.push(Disposable.create(() => widget.model.proxy = undefined));
91
91
  this.handleTreeEvents(widget.id, widget);
92
92
  }
93
- await widget.model.refresh();
93
+ widget.model.refresh();
94
94
  return widget;
95
95
  }));
96
96
  this.toDispose.push(Disposable.create(() => this.$unregisterTreeDataProvider(treeViewId)));
@@ -250,9 +250,11 @@ delete window.frameElement;
250
250
  }
251
251
 
252
252
  let baseElement = event.view.document.getElementsByTagName('base')[0];
253
- /** @type {any} */
254
- let node = event.target;
255
- while (node) {
253
+
254
+ // Use composedPath to get the event path through shadow DOM
255
+ const path = event.composedPath ? event.composedPath() : [event.target];
256
+
257
+ for (const node of path) {
256
258
  if (node.tagName && node.tagName.toLowerCase() === 'a' && node.href) {
257
259
  if (node.getAttribute('href') === '#') {
258
260
  event.view.scrollTo(0, 0);
@@ -267,7 +269,6 @@ delete window.frameElement;
267
269
  event.preventDefault();
268
270
  break;
269
271
  }
270
- node = node.parentNode;
271
272
  }
272
273
  };
273
274
 
@@ -282,13 +283,14 @@ delete window.frameElement;
282
283
  }
283
284
 
284
285
  if (event.button === 1) {
285
- let node = /** @type {any} */ (event.target);
286
- while (node) {
286
+ // Use composedPath to get the event path through shadow DOM
287
+ const path = event.composedPath ? event.composedPath() : [event.target];
288
+
289
+ for (const node of path) {
287
290
  if (node.tagName && node.tagName.toLowerCase() === 'a' && node.href) {
288
291
  event.preventDefault();
289
292
  break;
290
293
  }
291
- node = node.parentNode;
292
294
  }
293
295
  }
294
296
  };
@@ -354,16 +356,17 @@ delete window.frameElement;
354
356
  host.postMessage('did-context-menu', {
355
357
  clientX: e.clientX,
356
358
  clientY: e.clientY,
357
- context: findVscodeContext(e.target)
359
+ context: findVscodeContext(e.composedPath(), 0)
358
360
  });
359
361
  };
360
362
 
361
- function findVscodeContext(node) {
363
+ function findVscodeContext(nodes, index) {
364
+ const node = nodes[index];
362
365
  if (node) {
363
366
  if (node.dataset?.vscodeContext) {
364
367
  return JSON.parse(node.dataset.vscodeContext);
365
368
  }
366
- return findVscodeContext(node.parentElement);
369
+ return findVscodeContext(nodes, ++index);
367
370
  }
368
371
  return {};
369
372
  }
@@ -0,0 +1,37 @@
1
+ // *****************************************************************************
2
+ // Copyright (C) 2025 STMicroelectronics and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ import { nls, PreferenceContribution, PreferenceSchema, PreferenceSchemaService, PreferenceScope } from '@theia/core';
16
+ import { FrontendApplicationConfigProvider } from '@theia/core/lib/browser/frontend-application-config-provider';
17
+
18
+ const schema: PreferenceSchema = {
19
+ properties: {
20
+ 'webview.warnIfUnsecure': {
21
+ scope: PreferenceScope.Default,
22
+ type: 'boolean',
23
+ description: nls.localize('theia/plugin-ext/webviewWarnIfUnsecure', 'Warns users that webviews are currently deployed insecurely.'),
24
+ default: true,
25
+
26
+ }
27
+ }
28
+ };
29
+
30
+ export class WebviewFrontendPreferenceContribution implements PreferenceContribution {
31
+ async initSchema(service: PreferenceSchemaService): Promise<void> {
32
+ const frontendConfig = FrontendApplicationConfigProvider.get();
33
+ if (frontendConfig.securityWarnings) {
34
+ service.addSchema(schema);
35
+ }
36
+ }
37
+ };
@@ -21,7 +21,7 @@
21
21
 
22
22
  import { inject, postConstruct, injectable } from '@theia/core/shared/inversify';
23
23
  import { Emitter } from '@theia/core/lib/common/event';
24
- import { EditorPreferences, EditorConfiguration } from '@theia/editor/lib/browser/editor-preferences';
24
+ import { EditorPreferences, EditorConfiguration } from '@theia/editor/lib/common/editor-preferences';
25
25
  import { ThemeService } from '@theia/core/lib/browser/theming';
26
26
  import { Theme } from '@theia/core/lib/common/theme';
27
27
  import { ColorRegistry } from '@theia/core/lib/browser/color-registry';
@@ -41,7 +41,6 @@ import { PluginSharedStyle } from '../plugin-shared-style';
41
41
  import { WebviewThemeDataProvider } from './webview-theme-data-provider';
42
42
  import { ExternalUriService } from '@theia/core/lib/browser/external-uri-service';
43
43
  import { OutputChannelManager } from '@theia/output/lib/browser/output-channel';
44
- import { WebviewPreferences } from './webview-preferences';
45
44
  import { WebviewResourceCache } from './webview-resource-cache';
46
45
  import { Endpoint } from '@theia/core/lib/browser/endpoint';
47
46
  import { isFirefox } from '@theia/core/lib/browser/browser';
@@ -54,6 +53,7 @@ import { MenuPath } from '@theia/core';
54
53
  import { ContextMenuRenderer } from '@theia/core/lib/browser';
55
54
  import { ContextKeyService } from '@theia/core/lib/browser/context-key-service';
56
55
  import { PluginViewWidget } from '../view/plugin-view-widget';
56
+ import { WebviewPreferences } from '../../common/webview-preferences';
57
57
 
58
58
  // Style from core
59
59
  const TRANSPARENT_OVERLAY_STYLE = 'theia-transparent-overlay';
@@ -108,7 +108,8 @@ export class WebviewWidget extends BaseWidget implements StatefulWidget, Extract
108
108
  Schemes.http,
109
109
  Schemes.https,
110
110
  Schemes.mailto,
111
- Schemes.vscode
111
+ Schemes.vscode,
112
+ Schemes.vscodeNotebookCell
112
113
  ]);
113
114
 
114
115
  static FACTORY_ID = 'plugin-webview';
@@ -31,14 +31,14 @@ import { Resource } from '@theia/core/lib/common/resource';
31
31
  import { Disposable, DisposableCollection } from '@theia/core/lib/common/disposable';
32
32
  import { Emitter, Event, ResourceResolver, CancellationToken, isUndefined } from '@theia/core';
33
33
  import { PluginServer } from '../../common/plugin-protocol';
34
- import { FileSystemPreferences } from '@theia/filesystem/lib/browser';
34
+ import { FileSystemPreferences } from '@theia/filesystem/lib/common';
35
35
  import { SearchInWorkspaceService } from '@theia/search-in-workspace/lib/browser/search-in-workspace-service';
36
36
  import { FileStat } from '@theia/filesystem/lib/common/files';
37
37
  import { MonacoQuickInputService } from '@theia/monaco/lib/browser/monaco-quick-input-service';
38
38
  import { RequestService } from '@theia/core/shared/@theia/request';
39
39
  import { UTF16be, UTF16le, UTF8, UTF8_with_bom } from '@theia/core/lib/common/encodings';
40
40
  import { EncodingRegistry } from '@theia/core/lib/browser/encoding-registry';
41
- import { PreferenceService } from '@theia/core/lib/browser/preferences/preference-service';
41
+ import { PreferenceService } from '@theia/core/lib/common/preferences/preference-service';
42
42
 
43
43
  export class WorkspaceMainImpl implements WorkspaceMain, Disposable {
44
44
 
@@ -15,20 +15,16 @@
15
15
  // *****************************************************************************
16
16
 
17
17
  import { interfaces } from '@theia/core/shared/inversify';
18
- import { FrontendApplicationConfigProvider } from '@theia/core/lib/browser/frontend-application-config-provider';
19
18
  import {
20
19
  createPreferenceProxy,
20
+ PreferenceContribution,
21
21
  PreferenceProxy,
22
+ PreferenceSchema,
22
23
  PreferenceService,
23
- PreferenceContribution,
24
- PreferenceSchema
25
- } from '@theia/core/lib/browser/preferences';
24
+ } from '@theia/core/lib/common/preferences';
26
25
  import { nls } from '@theia/core/lib/common/nls';
27
26
 
28
- const frontendConfig = FrontendApplicationConfigProvider.get();
29
-
30
27
  export const WebviewConfigSchema: PreferenceSchema = {
31
- type: 'object',
32
28
  properties: {
33
29
  'webview.trace': {
34
30
  type: 'string',
@@ -39,15 +35,6 @@ export const WebviewConfigSchema: PreferenceSchema = {
39
35
  }
40
36
  };
41
37
 
42
- if (frontendConfig.securityWarnings) {
43
- WebviewConfigSchema.properties['webview.warnIfUnsecure'] = {
44
- scope: 'application',
45
- type: 'boolean',
46
- description: nls.localize('theia/plugin-ext/webviewWarnIfUnsecure', 'Warns users that webviews are currently deployed unsecurely.'),
47
- default: true,
48
- };
49
- }
50
-
51
38
  export interface WebviewConfiguration {
52
39
  'webview.trace': 'off' | 'on' | 'verbose'
53
40
  'webview.warnIfUnsecure'?: boolean
@@ -46,6 +46,7 @@ import { PluginRemoteCliContribution } from './plugin-remote-cli-contribution';
46
46
  import { RemoteCliContribution } from '@theia/core/lib/node/remote/remote-cli-contribution';
47
47
  import { PluginRemoteCopyContribution } from './plugin-remote-copy-contribution';
48
48
  import { RemoteCopyContribution } from '@theia/core/lib/node/remote/remote-copy-contribution';
49
+ import { bindWebviewPreferences } from '../common/webview-preferences';
49
50
 
50
51
  export function bindMainBackend(bind: interfaces.Bind, unbind: interfaces.Unbind, isBound: interfaces.IsBound, rebind: interfaces.Rebind): void {
51
52
  bind(PluginApiContribution).toSelf().inSingletonScope();
@@ -102,5 +103,6 @@ export function bindMainBackend(bind: interfaces.Bind, unbind: interfaces.Unbind
102
103
  bind(BackendApplicationContribution).toService(WebviewBackendSecurityWarnings);
103
104
 
104
105
  rebind(LocalizationServerImpl).to(PluginLocalizationServer).inSingletonScope();
106
+ bindWebviewPreferences(bind);
105
107
 
106
108
  }
@@ -240,7 +240,9 @@ import {
240
240
  TerminalCompletionItemKind,
241
241
  TerminalCompletionList,
242
242
  McpHttpServerDefinition,
243
- McpStdioServerDefinition
243
+ McpStdioServerDefinition,
244
+ InteractiveWindowInput,
245
+ TextEditorChangeKind
244
246
  } from './types-impl';
245
247
  import { AuthenticationExtImpl } from './authentication-ext';
246
248
  import { SymbolKind } from '../common/plugin-api-rpc-model';
@@ -333,7 +335,7 @@ export function createAPIFactory(
333
335
  const notebookRenderers = rpc.set(MAIN_RPC_CONTEXT.NOTEBOOK_RENDERERS_EXT, new NotebookRenderersExtImpl(rpc, notebooksExt));
334
336
  const notebookKernels = rpc.set(MAIN_RPC_CONTEXT.NOTEBOOK_KERNELS_EXT, new NotebookKernelsExtImpl(rpc, notebooksExt, commandRegistry, webviewExt, workspaceExt));
335
337
  const notebookDocuments = rpc.set(MAIN_RPC_CONTEXT.NOTEBOOK_DOCUMENTS_EXT, new NotebookDocumentsExtImpl(notebooksExt));
336
- const statusBarMessageRegistryExt = new StatusBarMessageRegistryExt(rpc);
338
+ const statusBarMessageRegistryExt = new StatusBarMessageRegistryExt(rpc, commandRegistry);
337
339
  const terminalExt = rpc.set(MAIN_RPC_CONTEXT.TERMINAL_EXT, new TerminalServiceExtImpl(rpc));
338
340
  const outputChannelRegistryExt = rpc.set(MAIN_RPC_CONTEXT.OUTPUT_CHANNEL_REGISTRY_EXT, new OutputChannelRegistryExtImpl(rpc));
339
341
  const treeViewsExt = rpc.set(MAIN_RPC_CONTEXT.TREE_VIEWS_EXT, new TreeViewsExtImpl(rpc, commandRegistry));
@@ -477,6 +479,9 @@ export function createAPIFactory(
477
479
  onDidChangeTextEditorSelection(listener, thisArg?, disposables?) {
478
480
  return editors.onDidChangeTextEditorSelection(listener, thisArg, disposables);
479
481
  },
482
+ onDidChangeTextEditorDiffInformation(listener, thisArg?, disposables?) {
483
+ return editors.onDidChangeTextEditorDiffInformation(listener, thisArg, disposables);
484
+ },
480
485
  onDidChangeTextEditorOptions(listener, thisArg?, disposables?) {
481
486
  return editors.onDidChangeTextEditorOptions(listener, thisArg, disposables);
482
487
  },
@@ -1381,6 +1386,10 @@ export function createAPIFactory(
1381
1386
  tools: [],
1382
1387
  registerMcpServerDefinitionProvider(id: string, provider: any): theia.Disposable {
1383
1388
  return lmExt.registerMcpServerDefinitionProvider(id, provider);
1389
+ },
1390
+ /** @stubbed */
1391
+ registerLanguageModelChatProvider(vendor: string, provider: theia.LanguageModelChatProvider): theia.Disposable {
1392
+ return Disposable.NULL;
1384
1393
  }
1385
1394
  };
1386
1395
 
@@ -1614,7 +1623,9 @@ export function createAPIFactory(
1614
1623
  TerminalCompletionItemKind,
1615
1624
  TerminalCompletionList,
1616
1625
  McpHttpServerDefinition,
1617
- McpStdioServerDefinition
1626
+ McpStdioServerDefinition,
1627
+ TabInputInteractiveWindow: InteractiveWindowInput,
1628
+ TextEditorChangeKind
1618
1629
  };
1619
1630
  };
1620
1631
  }
package/src/plugin/scm.ts CHANGED
@@ -641,6 +641,11 @@ class SourceControlImpl implements theia.SourceControl {
641
641
  private readonly onDidChangeSelectionEmitter = new Emitter<boolean>();
642
642
  readonly onDidChangeSelection = this.onDidChangeSelectionEmitter.event;
643
643
 
644
+ private readonly onDidDisposeEmitter = new Emitter<void>();
645
+ readonly onDidDispose = this.onDidDisposeEmitter.event;
646
+
647
+ readonly onDidDisposeParent: Event<void>;
648
+
644
649
  private handle: number = SourceControlImpl.handlePool++;
645
650
 
646
651
  constructor(
@@ -649,10 +654,13 @@ class SourceControlImpl implements theia.SourceControl {
649
654
  private commands: CommandRegistryImpl,
650
655
  private _id: string,
651
656
  private _label: string,
652
- private _rootUri?: theia.Uri
657
+ private _rootUri?: theia.Uri,
658
+ _iconPath?: theia.IconPath,
659
+ _parent?: SourceControlImpl
653
660
  ) {
654
661
  this.inputBox = new ScmInputBoxImpl(plugin, this.proxy, this.handle);
655
662
  this.proxy.$registerSourceControl(this.handle, _id, _label, _rootUri);
663
+ this.onDidDisposeParent = _parent ? _parent.onDidDispose : Event.None;
656
664
  }
657
665
 
658
666
  private createdResourceGroups = new Map<ScmResourceGroupImpl, Disposable>();
@@ -736,6 +744,9 @@ class SourceControlImpl implements theia.SourceControl {
736
744
 
737
745
  this.groups.forEach(group => group.dispose());
738
746
  this.proxy.$unregisterSourceControl(this.handle);
747
+
748
+ this.onDidDisposeEmitter.fire();
749
+ this.onDidDisposeEmitter.dispose();
739
750
  }
740
751
  }
741
752
 
@@ -17,6 +17,9 @@ import * as theia from '@theia/plugin';
17
17
  import { ThemeColor, StatusBarAlignment } from '../types-impl';
18
18
  import { StatusBarMessageRegistryMain } from '../../common/plugin-api-rpc';
19
19
  import { UUID } from '@theia/core/shared/@lumino/coreutils';
20
+ import { CommandRegistryImpl } from '../command-registry';
21
+ import { MarkdownString } from '../markdown-string';
22
+ import { DisposableCollection } from '@theia/core/lib/common/disposable';
20
23
 
21
24
  export class StatusBarItemImpl implements theia.StatusBarItem {
22
25
 
@@ -45,6 +48,7 @@ export class StatusBarItemImpl implements theia.StatusBarItem {
45
48
  _proxy: StatusBarMessageRegistryMain;
46
49
 
47
50
  constructor(_proxy: StatusBarMessageRegistryMain,
51
+ private readonly commandRegistry: CommandRegistryImpl,
48
52
  alignment: StatusBarAlignment = StatusBarAlignment.Left,
49
53
  priority: number = 0,
50
54
  id = StatusBarItemImpl.nextId()) {
@@ -105,6 +109,56 @@ export class StatusBarItemImpl implements theia.StatusBarItem {
105
109
  }
106
110
 
107
111
  public set tooltip(tooltip: string | theia.MarkdownString | undefined) {
112
+ if (tooltip && MarkdownString.isMarkdownString(tooltip)) {
113
+ const markdownTooltip = tooltip;
114
+ const content = markdownTooltip.value;
115
+ // Find all command links in the markdown content
116
+ const regex = /\[([^\]]+)\]\(command:([^?\s\)]+)(?:\?([^\s\)]+))?([^\)]*)\)/g;
117
+ let match;
118
+ let updatedContent = content;
119
+
120
+ while ((match = regex.exec(content)) !== null) {
121
+ const linkText = match[1];
122
+ const commandId = match[2];
123
+ const argsEncoded = match[3]; // This captures the encoded arguments
124
+ const tooltipPart = match[4] || ''; // This captures any tooltip or additional content after the command and args
125
+
126
+ let args: unknown[] = [];
127
+ if (argsEncoded) {
128
+ try {
129
+ const decoded = decodeURIComponent(argsEncoded);
130
+ args = JSON.parse(decoded);
131
+ } catch (e) {
132
+ console.error('Failed to parse command arguments:', e);
133
+ }
134
+ }
135
+
136
+ const safeCommand = this.commandRegistry.converter.toSafeCommand(
137
+ {
138
+ command: commandId,
139
+ title: linkText,
140
+ arguments: Array.isArray(args) ? args : [args]
141
+ },
142
+ new DisposableCollection()
143
+ );
144
+
145
+ if (safeCommand?.id) {
146
+ let newArgsPart = '';
147
+ if (safeCommand.arguments && safeCommand.arguments.length > 0) {
148
+ newArgsPart = `?${encodeURIComponent(JSON.stringify(safeCommand.arguments))}`;
149
+ }
150
+
151
+ const argsPart = argsEncoded ? `?${argsEncoded}` : '';
152
+ const originalLink = `[${linkText}](command:${commandId}${argsPart}${tooltipPart})`;
153
+ const safeLink = `[${linkText}](command:${safeCommand.id}${newArgsPart}${tooltipPart})`;
154
+ updatedContent = updatedContent.replace(originalLink, safeLink);
155
+ }
156
+ }
157
+
158
+ if (updatedContent !== content) {
159
+ markdownTooltip.value = updatedContent;
160
+ }
161
+ }
108
162
  this._tooltip = tooltip;
109
163
  this.update();
110
164
  }
@@ -20,6 +20,7 @@ import {
20
20
  } from '../common/plugin-api-rpc';
21
21
  import { RPCProtocol } from '../common/rpc-protocol';
22
22
  import { StatusBarItemImpl } from './status-bar/status-bar-item';
23
+ import { CommandRegistryImpl } from './command-registry';
23
24
 
24
25
  /*---------------------------------------------------------------------------------------------
25
26
  * Copyright (c) Microsoft Corporation. All rights reserved.
@@ -32,7 +33,7 @@ export class StatusBarMessageRegistryExt {
32
33
 
33
34
  protected readonly statusMessage: StatusBarMessage;
34
35
 
35
- constructor(rpc: RPCProtocol) {
36
+ constructor(rpc: RPCProtocol, readonly commandRegistry: CommandRegistryImpl) {
36
37
  this.proxy = rpc.getProxy(Ext.STATUS_BAR_MESSAGE_REGISTRY_MAIN);
37
38
  this.statusMessage = new StatusBarMessage(this);
38
39
  }
@@ -58,7 +59,7 @@ export class StatusBarMessageRegistryExt {
58
59
  }
59
60
 
60
61
  createStatusBarItem(alignment?: StatusBarAlignment, priority?: number, id?: string): StatusBarItem {
61
- return new StatusBarItemImpl(this.proxy, alignment, priority, id);
62
+ return new StatusBarItemImpl(this.proxy, this.commandRegistry, alignment, priority, id);
62
63
  }
63
64
 
64
65
  }
@@ -27,6 +27,8 @@ export class TextEditorExt implements theia.TextEditor {
27
27
  private _viewColumn: theia.ViewColumn | undefined;
28
28
  private _document: DocumentDataExt;
29
29
  private _options: TextEditorOptionsExt;
30
+ private _diffInformation: theia.TextEditorDiffInformation[] | undefined;
31
+
30
32
  private disposed = false;
31
33
  constructor(
32
34
  private readonly proxy: TextEditorsMain,
@@ -278,6 +280,15 @@ export class TextEditorExt implements theia.TextEditor {
278
280
  getDiffInformation(): Promise<theia.LineChange[]> {
279
281
  return this.proxy.$getDiffInformation(this.id);
280
282
  }
283
+
284
+ _acceptDiffInformation(diffInformation: theia.TextEditorDiffInformation[] | undefined): void {
285
+ // ok(!this._disposed);
286
+ this._diffInformation = diffInformation;
287
+ }
288
+
289
+ get diffInformation(): theia.TextEditorDiffInformation[] | undefined {
290
+ return this._diffInformation;
291
+ }
281
292
  }
282
293
 
283
294
  export class TextEditorOptionsExt implements theia.TextEditorOptions {
@@ -21,7 +21,7 @@ import { Emitter, Event } from '@theia/core/lib/common/event';
21
21
  import { EditorsAndDocumentsExtImpl } from './editors-and-documents';
22
22
  import { TextEditorExt } from './text-editor';
23
23
  import * as Converters from './type-converters';
24
- import { TextEditorSelectionChangeKind, URI } from './types-impl';
24
+ import { TextEditorChangeKind, TextEditorSelectionChangeKind, URI } from './types-impl';
25
25
  import { IdGenerator } from '../common/id-generator';
26
26
 
27
27
  export class TextEditorsExtImpl implements TextEditorsExt {
@@ -29,6 +29,7 @@ export class TextEditorsExtImpl implements TextEditorsExt {
29
29
  private readonly _onDidChangeTextEditorOptions = new Emitter<theia.TextEditorOptionsChangeEvent>();
30
30
  private readonly _onDidChangeTextEditorVisibleRanges = new Emitter<theia.TextEditorVisibleRangesChangeEvent>();
31
31
  private readonly _onDidChangeTextEditorViewColumn = new Emitter<theia.TextEditorViewColumnChangeEvent>();
32
+ private readonly _onDidChangeTextEditorDiffInformation = new Emitter<theia.TextEditorDiffInformationChangeEvent>();
32
33
  private readonly _onDidChangeActiveTextEditor = new Emitter<theia.TextEditor | undefined>();
33
34
  private readonly _onDidChangeVisibleTextEditors = new Emitter<theia.TextEditor[]>();
34
35
 
@@ -36,6 +37,7 @@ export class TextEditorsExtImpl implements TextEditorsExt {
36
37
  readonly onDidChangeTextEditorOptions = this._onDidChangeTextEditorOptions.event;
37
38
  readonly onDidChangeTextEditorVisibleRanges = this._onDidChangeTextEditorVisibleRanges.event;
38
39
  readonly onDidChangeTextEditorViewColumn = this._onDidChangeTextEditorViewColumn.event;
40
+ readonly onDidChangeTextEditorDiffInformation = this._onDidChangeTextEditorDiffInformation.event;
39
41
  readonly onDidChangeActiveTextEditor = this._onDidChangeActiveTextEditor.event;
40
42
  readonly onDidChangeVisibleTextEditors = this._onDidChangeVisibleTextEditors.event;
41
43
 
@@ -118,6 +120,73 @@ export class TextEditorsExtImpl implements TextEditorsExt {
118
120
  return activeEditor.getDiffInformation();
119
121
  }
120
122
 
123
+ $acceptEditorDiffInformation(id: string, diffInformation: theia.TextEditorDiffInformation[] | undefined): void {
124
+ const textEditor = this.editorsAndDocuments.getEditor(id);
125
+ if (!textEditor) {
126
+ throw new Error('unknown text editor');
127
+ }
128
+
129
+ if (!diffInformation) {
130
+ textEditor._acceptDiffInformation(undefined);
131
+ this._onDidChangeTextEditorDiffInformation.fire({
132
+ textEditor: textEditor,
133
+ diffInformation: undefined
134
+ });
135
+ return;
136
+ }
137
+
138
+ const that = this;
139
+ const result = diffInformation.map(diff => {
140
+ const original = URI.revive(diff.original);
141
+ const modified = URI.revive(diff.modified);
142
+
143
+ const changes = diff.changes.map(change => {
144
+ const originalStartLineNumber = change.original.startLineNumber;
145
+ const originalEndLineNumberExclusive = change.original.endLineNumberExclusive;
146
+ const modifiedStartLineNumber = change.modified.startLineNumber;
147
+ const modifiedEndLineNumberExclusive = change.modified.endLineNumberExclusive;
148
+
149
+ let kind: TextEditorChangeKind;
150
+ if (change.original.startLineNumber === originalEndLineNumberExclusive) {
151
+ kind = TextEditorChangeKind.Addition;
152
+ } else if (modifiedStartLineNumber === modifiedEndLineNumberExclusive) {
153
+ kind = TextEditorChangeKind.Deletion;
154
+ } else {
155
+ kind = TextEditorChangeKind.Modification;
156
+ }
157
+
158
+ return {
159
+ original: {
160
+ startLineNumber: originalStartLineNumber,
161
+ endLineNumberExclusive: originalEndLineNumberExclusive
162
+ },
163
+ modified: {
164
+ startLineNumber: modifiedStartLineNumber,
165
+ endLineNumberExclusive: modifiedEndLineNumberExclusive
166
+ },
167
+ kind
168
+ } satisfies theia.TextEditorChange;
169
+ });
170
+
171
+ return Object.freeze({
172
+ documentVersion: diff.documentVersion,
173
+ original,
174
+ modified,
175
+ changes,
176
+ get isStale(): boolean {
177
+ const document = that.editorsAndDocuments.getDocument(modified.toString());
178
+ return document?.document.version !== diff.documentVersion;
179
+ }
180
+ });
181
+ });
182
+
183
+ textEditor._acceptDiffInformation(result);
184
+ this._onDidChangeTextEditorDiffInformation.fire({
185
+ textEditor: textEditor,
186
+ diffInformation: result
187
+ });
188
+ }
189
+
121
190
  getVisibleTextEditors(): theia.TextEditor[] {
122
191
  return this.editorsAndDocuments.allEditors();
123
192
  }