@theia/plugin-ext 1.50.1 → 1.52.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 (342) hide show
  1. package/lib/common/plugin-api-rpc-model.d.ts +13 -2
  2. package/lib/common/plugin-api-rpc-model.d.ts.map +1 -1
  3. package/lib/common/plugin-api-rpc.d.ts +38 -19
  4. package/lib/common/plugin-api-rpc.d.ts.map +1 -1
  5. package/lib/common/plugin-api-rpc.js +12 -1
  6. package/lib/common/plugin-api-rpc.js.map +1 -1
  7. package/lib/common/proxy-handler.d.ts.map +1 -1
  8. package/lib/common/proxy-handler.js +3 -1
  9. package/lib/common/proxy-handler.js.map +1 -1
  10. package/lib/common/test-types.d.ts +1 -0
  11. package/lib/common/test-types.d.ts.map +1 -1
  12. package/lib/common/test-types.js.map +1 -1
  13. package/lib/hosted/browser/hosted-plugin.d.ts.map +1 -1
  14. package/lib/hosted/browser/hosted-plugin.js +2 -0
  15. package/lib/hosted/browser/hosted-plugin.js.map +1 -1
  16. package/lib/hosted/browser/worker/worker-env-ext.d.ts +0 -3
  17. package/lib/hosted/browser/worker/worker-env-ext.d.ts.map +1 -1
  18. package/lib/hosted/browser/worker/worker-env-ext.js +2 -4
  19. package/lib/hosted/browser/worker/worker-env-ext.js.map +1 -1
  20. package/lib/hosted/browser/worker/worker-main.js +2 -2
  21. package/lib/hosted/browser/worker/worker-main.js.map +1 -1
  22. package/lib/hosted/node/scanners/scanner-theia.d.ts.map +1 -1
  23. package/lib/hosted/node/scanners/scanner-theia.js +1 -0
  24. package/lib/hosted/node/scanners/scanner-theia.js.map +1 -1
  25. package/lib/main/browser/authentication-main.d.ts +4 -2
  26. package/lib/main/browser/authentication-main.d.ts.map +1 -1
  27. package/lib/main/browser/command-registry-main.d.ts +4 -2
  28. package/lib/main/browser/command-registry-main.d.ts.map +1 -1
  29. package/lib/main/browser/custom-editors/custom-editors-main.d.ts +4 -2
  30. package/lib/main/browser/custom-editors/custom-editors-main.d.ts.map +1 -1
  31. package/lib/main/browser/debug/debug-main.d.ts +3 -0
  32. package/lib/main/browser/debug/debug-main.d.ts.map +1 -1
  33. package/lib/main/browser/debug/debug-main.js +20 -2
  34. package/lib/main/browser/debug/debug-main.js.map +1 -1
  35. package/lib/main/browser/debug/plugin-debug-service.d.ts +4 -2
  36. package/lib/main/browser/debug/plugin-debug-service.d.ts.map +1 -1
  37. package/lib/main/browser/debug/plugin-debug-session-factory.d.ts +7 -4
  38. package/lib/main/browser/debug/plugin-debug-session-factory.d.ts.map +1 -1
  39. package/lib/main/browser/debug/plugin-debug-session-factory.js +6 -5
  40. package/lib/main/browser/debug/plugin-debug-session-factory.js.map +1 -1
  41. package/lib/main/browser/documents-main.d.ts +2 -4
  42. package/lib/main/browser/documents-main.d.ts.map +1 -1
  43. package/lib/main/browser/documents-main.js +2 -18
  44. package/lib/main/browser/documents-main.js.map +1 -1
  45. package/lib/main/browser/editors-and-documents-main.d.ts +2 -1
  46. package/lib/main/browser/editors-and-documents-main.d.ts.map +1 -1
  47. package/lib/main/browser/editors-and-documents-main.js +12 -5
  48. package/lib/main/browser/editors-and-documents-main.js.map +1 -1
  49. package/lib/main/browser/languages-main.d.ts +4 -2
  50. package/lib/main/browser/languages-main.d.ts.map +1 -1
  51. package/lib/main/browser/main-context.d.ts.map +1 -1
  52. package/lib/main/browser/main-context.js +4 -6
  53. package/lib/main/browser/main-context.js.map +1 -1
  54. package/lib/main/browser/notebooks/notebooks-main.d.ts +4 -2
  55. package/lib/main/browser/notebooks/notebooks-main.d.ts.map +1 -1
  56. package/lib/main/browser/notebooks/renderers/cell-output-webview.d.ts +7 -0
  57. package/lib/main/browser/notebooks/renderers/cell-output-webview.d.ts.map +1 -1
  58. package/lib/main/browser/notebooks/renderers/cell-output-webview.js +30 -4
  59. package/lib/main/browser/notebooks/renderers/cell-output-webview.js.map +1 -1
  60. package/lib/main/browser/notebooks/renderers/output-webview-internal.d.ts.map +1 -1
  61. package/lib/main/browser/notebooks/renderers/output-webview-internal.js +15 -0
  62. package/lib/main/browser/notebooks/renderers/output-webview-internal.js.map +1 -1
  63. package/lib/main/browser/notebooks/renderers/webview-communication.d.ts +5 -1
  64. package/lib/main/browser/notebooks/renderers/webview-communication.d.ts.map +1 -1
  65. package/lib/main/browser/quick-open-main.d.ts +7 -3
  66. package/lib/main/browser/quick-open-main.d.ts.map +1 -1
  67. package/lib/main/browser/quick-open-main.js +21 -38
  68. package/lib/main/browser/quick-open-main.js.map +1 -1
  69. package/lib/main/browser/tabs/tabs-main.d.ts +5 -3
  70. package/lib/main/browser/tabs/tabs-main.d.ts.map +1 -1
  71. package/lib/main/browser/tabs/tabs-main.js +37 -13
  72. package/lib/main/browser/tabs/tabs-main.js.map +1 -1
  73. package/lib/main/browser/terminal-main.d.ts +9 -4
  74. package/lib/main/browser/terminal-main.d.ts.map +1 -1
  75. package/lib/main/browser/terminal-main.js +21 -2
  76. package/lib/main/browser/terminal-main.js.map +1 -1
  77. package/lib/main/browser/test-main.d.ts +3 -2
  78. package/lib/main/browser/test-main.d.ts.map +1 -1
  79. package/lib/main/browser/test-main.js +7 -3
  80. package/lib/main/browser/test-main.js.map +1 -1
  81. package/lib/main/browser/text-editor-model-service.d.ts +1 -0
  82. package/lib/main/browser/text-editor-model-service.d.ts.map +1 -1
  83. package/lib/main/browser/text-editor-model-service.js +8 -0
  84. package/lib/main/browser/text-editor-model-service.js.map +1 -1
  85. package/lib/main/browser/view/tree-view-decorator-service.d.ts +4 -2
  86. package/lib/main/browser/view/tree-view-decorator-service.d.ts.map +1 -1
  87. package/lib/main/browser/view/tree-view-widget.d.ts +4 -2
  88. package/lib/main/browser/view/tree-view-widget.d.ts.map +1 -1
  89. package/lib/main/browser/view/tree-views-main.d.ts +4 -3
  90. package/lib/main/browser/view/tree-views-main.d.ts.map +1 -1
  91. package/lib/main/browser/view/tree-views-main.js +0 -3
  92. package/lib/main/browser/view/tree-views-main.js.map +1 -1
  93. package/lib/main/browser/view/view-context-key-service.d.ts +0 -2
  94. package/lib/main/browser/view/view-context-key-service.d.ts.map +1 -1
  95. package/lib/main/browser/view/view-context-key-service.js +0 -4
  96. package/lib/main/browser/view/view-context-key-service.js.map +1 -1
  97. package/lib/main/browser/webview/webview.d.ts +4 -2
  98. package/lib/main/browser/webview/webview.d.ts.map +1 -1
  99. package/lib/main/browser/webview-views/webview-views-main.d.ts +4 -2
  100. package/lib/main/browser/webview-views/webview-views-main.d.ts.map +1 -1
  101. package/lib/main/browser/webviews-main.d.ts +4 -2
  102. package/lib/main/browser/webviews-main.d.ts.map +1 -1
  103. package/lib/main/browser/window-state-main.js +1 -1
  104. package/lib/main/browser/window-state-main.js.map +1 -1
  105. package/lib/main/browser/workspace-main.d.ts +4 -2
  106. package/lib/main/browser/workspace-main.d.ts.map +1 -1
  107. package/lib/plugin/authentication-ext.d.ts +4 -2
  108. package/lib/plugin/authentication-ext.d.ts.map +1 -1
  109. package/lib/plugin/clipboard-ext.d.ts +4 -2
  110. package/lib/plugin/clipboard-ext.d.ts.map +1 -1
  111. package/lib/plugin/command-registry.d.ts +4 -2
  112. package/lib/plugin/command-registry.d.ts.map +1 -1
  113. package/lib/plugin/comments.d.ts +4 -2
  114. package/lib/plugin/comments.d.ts.map +1 -1
  115. package/lib/plugin/custom-editors.d.ts +4 -2
  116. package/lib/plugin/custom-editors.d.ts.map +1 -1
  117. package/lib/plugin/debug/debug-ext.d.ts +12 -3
  118. package/lib/plugin/debug/debug-ext.d.ts.map +1 -1
  119. package/lib/plugin/debug/debug-ext.js +46 -3
  120. package/lib/plugin/debug/debug-ext.js.map +1 -1
  121. package/lib/plugin/debug/plugin-debug-adapter-creator.d.ts +4 -2
  122. package/lib/plugin/debug/plugin-debug-adapter-creator.d.ts.map +1 -1
  123. package/lib/plugin/debug/plugin-debug-adapter-session.d.ts +4 -2
  124. package/lib/plugin/debug/plugin-debug-adapter-session.d.ts.map +1 -1
  125. package/lib/plugin/debug/plugin-debug-adapter-tracker.d.ts +4 -2
  126. package/lib/plugin/debug/plugin-debug-adapter-tracker.d.ts.map +1 -1
  127. package/lib/plugin/decorations.d.ts +4 -2
  128. package/lib/plugin/decorations.d.ts.map +1 -1
  129. package/lib/plugin/dialogs.d.ts +4 -2
  130. package/lib/plugin/dialogs.d.ts.map +1 -1
  131. package/lib/plugin/document-data.d.ts +4 -2
  132. package/lib/plugin/document-data.d.ts.map +1 -1
  133. package/lib/plugin/documents.d.ts +4 -2
  134. package/lib/plugin/documents.d.ts.map +1 -1
  135. package/lib/plugin/env.d.ts +4 -2
  136. package/lib/plugin/env.d.ts.map +1 -1
  137. package/lib/plugin/file-system-event-service-ext-impl.d.ts +4 -2
  138. package/lib/plugin/file-system-event-service-ext-impl.d.ts.map +1 -1
  139. package/lib/plugin/file-system-ext-impl.d.ts +4 -2
  140. package/lib/plugin/file-system-ext-impl.d.ts.map +1 -1
  141. package/lib/plugin/label-service.d.ts +4 -2
  142. package/lib/plugin/label-service.d.ts.map +1 -1
  143. package/lib/plugin/languages/call-hierarchy.d.ts +4 -2
  144. package/lib/plugin/languages/call-hierarchy.d.ts.map +1 -1
  145. package/lib/plugin/languages/code-action.d.ts +4 -2
  146. package/lib/plugin/languages/code-action.d.ts.map +1 -1
  147. package/lib/plugin/languages/color.d.ts +4 -2
  148. package/lib/plugin/languages/color.d.ts.map +1 -1
  149. package/lib/plugin/languages/completion.d.ts +4 -2
  150. package/lib/plugin/languages/completion.d.ts.map +1 -1
  151. package/lib/plugin/languages/declaration.d.ts +4 -2
  152. package/lib/plugin/languages/declaration.d.ts.map +1 -1
  153. package/lib/plugin/languages/definition.d.ts +4 -2
  154. package/lib/plugin/languages/definition.d.ts.map +1 -1
  155. package/lib/plugin/languages/diagnostics.d.ts +4 -2
  156. package/lib/plugin/languages/diagnostics.d.ts.map +1 -1
  157. package/lib/plugin/languages/document-drop-edit.d.ts +4 -2
  158. package/lib/plugin/languages/document-drop-edit.d.ts.map +1 -1
  159. package/lib/plugin/languages/document-formatting.d.ts +4 -2
  160. package/lib/plugin/languages/document-formatting.d.ts.map +1 -1
  161. package/lib/plugin/languages/document-highlight.d.ts +4 -2
  162. package/lib/plugin/languages/document-highlight.d.ts.map +1 -1
  163. package/lib/plugin/languages/evaluatable-expression.d.ts +4 -2
  164. package/lib/plugin/languages/evaluatable-expression.d.ts.map +1 -1
  165. package/lib/plugin/languages/folding.d.ts +4 -2
  166. package/lib/plugin/languages/folding.d.ts.map +1 -1
  167. package/lib/plugin/languages/hover.d.ts +4 -2
  168. package/lib/plugin/languages/hover.d.ts.map +1 -1
  169. package/lib/plugin/languages/implementation.d.ts +4 -2
  170. package/lib/plugin/languages/implementation.d.ts.map +1 -1
  171. package/lib/plugin/languages/inlay-hints.d.ts +4 -2
  172. package/lib/plugin/languages/inlay-hints.d.ts.map +1 -1
  173. package/lib/plugin/languages/inline-completion.d.ts +4 -2
  174. package/lib/plugin/languages/inline-completion.d.ts.map +1 -1
  175. package/lib/plugin/languages/inline-values.d.ts +4 -2
  176. package/lib/plugin/languages/inline-values.d.ts.map +1 -1
  177. package/lib/plugin/languages/lens.d.ts +4 -2
  178. package/lib/plugin/languages/lens.d.ts.map +1 -1
  179. package/lib/plugin/languages/link-provider.d.ts +4 -2
  180. package/lib/plugin/languages/link-provider.d.ts.map +1 -1
  181. package/lib/plugin/languages/linked-editing-range.d.ts +4 -2
  182. package/lib/plugin/languages/linked-editing-range.d.ts.map +1 -1
  183. package/lib/plugin/languages/on-type-formatting.d.ts +4 -2
  184. package/lib/plugin/languages/on-type-formatting.d.ts.map +1 -1
  185. package/lib/plugin/languages/outline.d.ts +4 -2
  186. package/lib/plugin/languages/outline.d.ts.map +1 -1
  187. package/lib/plugin/languages/range-formatting.d.ts +4 -2
  188. package/lib/plugin/languages/range-formatting.d.ts.map +1 -1
  189. package/lib/plugin/languages/reference.d.ts +4 -2
  190. package/lib/plugin/languages/reference.d.ts.map +1 -1
  191. package/lib/plugin/languages/rename.d.ts +4 -2
  192. package/lib/plugin/languages/rename.d.ts.map +1 -1
  193. package/lib/plugin/languages/selection-range.d.ts +4 -2
  194. package/lib/plugin/languages/selection-range.d.ts.map +1 -1
  195. package/lib/plugin/languages/semantic-highlighting.d.ts +4 -2
  196. package/lib/plugin/languages/semantic-highlighting.d.ts.map +1 -1
  197. package/lib/plugin/languages/signature.d.ts +4 -2
  198. package/lib/plugin/languages/signature.d.ts.map +1 -1
  199. package/lib/plugin/languages/type-definition.d.ts +4 -2
  200. package/lib/plugin/languages/type-definition.d.ts.map +1 -1
  201. package/lib/plugin/languages/type-hierarchy.d.ts +4 -2
  202. package/lib/plugin/languages/type-hierarchy.d.ts.map +1 -1
  203. package/lib/plugin/languages/util.d.ts +4 -2
  204. package/lib/plugin/languages/util.d.ts.map +1 -1
  205. package/lib/plugin/languages/workspace-symbol.d.ts +4 -2
  206. package/lib/plugin/languages/workspace-symbol.d.ts.map +1 -1
  207. package/lib/plugin/languages-utils.d.ts +4 -2
  208. package/lib/plugin/languages-utils.d.ts.map +1 -1
  209. package/lib/plugin/languages.d.ts +4 -2
  210. package/lib/plugin/languages.d.ts.map +1 -1
  211. package/lib/plugin/markdown-string.d.ts +4 -2
  212. package/lib/plugin/markdown-string.d.ts.map +1 -1
  213. package/lib/plugin/message-registry.d.ts +4 -2
  214. package/lib/plugin/message-registry.d.ts.map +1 -1
  215. package/lib/plugin/node/debug/plugin-node-debug-adapter-creator.d.ts +4 -2
  216. package/lib/plugin/node/debug/plugin-node-debug-adapter-creator.d.ts.map +1 -1
  217. package/lib/plugin/notebook/notebook-document.d.ts +4 -2
  218. package/lib/plugin/notebook/notebook-document.d.ts.map +1 -1
  219. package/lib/plugin/notebook/notebook-documents.d.ts +4 -2
  220. package/lib/plugin/notebook/notebook-documents.d.ts.map +1 -1
  221. package/lib/plugin/notebook/notebook-editor.d.ts +4 -2
  222. package/lib/plugin/notebook/notebook-editor.d.ts.map +1 -1
  223. package/lib/plugin/notebook/notebook-editors.d.ts +4 -2
  224. package/lib/plugin/notebook/notebook-editors.d.ts.map +1 -1
  225. package/lib/plugin/notebook/notebook-kernels.d.ts +4 -2
  226. package/lib/plugin/notebook/notebook-kernels.d.ts.map +1 -1
  227. package/lib/plugin/notebook/notebook-renderers.d.ts +4 -2
  228. package/lib/plugin/notebook/notebook-renderers.d.ts.map +1 -1
  229. package/lib/plugin/notebook/notebooks.d.ts +4 -2
  230. package/lib/plugin/notebook/notebooks.d.ts.map +1 -1
  231. package/lib/plugin/notification.d.ts +4 -2
  232. package/lib/plugin/notification.d.ts.map +1 -1
  233. package/lib/plugin/output-channel/log-output-channel.d.ts +4 -2
  234. package/lib/plugin/output-channel/log-output-channel.d.ts.map +1 -1
  235. package/lib/plugin/output-channel/output-channel-item.d.ts +4 -2
  236. package/lib/plugin/output-channel/output-channel-item.d.ts.map +1 -1
  237. package/lib/plugin/output-channel-registry.d.ts +4 -2
  238. package/lib/plugin/output-channel-registry.d.ts.map +1 -1
  239. package/lib/plugin/plugin-context.d.ts +4 -2
  240. package/lib/plugin/plugin-context.d.ts.map +1 -1
  241. package/lib/plugin/plugin-context.js +57 -6
  242. package/lib/plugin/plugin-context.js.map +1 -1
  243. package/lib/plugin/plugin-icon-path.d.ts +2 -1
  244. package/lib/plugin/plugin-icon-path.d.ts.map +1 -1
  245. package/lib/plugin/plugin-icon-path.js +5 -1
  246. package/lib/plugin/plugin-icon-path.js.map +1 -1
  247. package/lib/plugin/plugin-manager.d.ts +7 -3
  248. package/lib/plugin/plugin-manager.d.ts.map +1 -1
  249. package/lib/plugin/plugin-manager.js +13 -1
  250. package/lib/plugin/plugin-manager.js.map +1 -1
  251. package/lib/plugin/plugin-storage.d.ts +4 -2
  252. package/lib/plugin/plugin-storage.d.ts.map +1 -1
  253. package/lib/plugin/preference-registry.d.ts +4 -2
  254. package/lib/plugin/preference-registry.d.ts.map +1 -1
  255. package/lib/plugin/quick-open.d.ts +7 -19
  256. package/lib/plugin/quick-open.d.ts.map +1 -1
  257. package/lib/plugin/quick-open.js +22 -39
  258. package/lib/plugin/quick-open.js.map +1 -1
  259. package/lib/plugin/scm.d.ts +4 -2
  260. package/lib/plugin/scm.d.ts.map +1 -1
  261. package/lib/plugin/secrets-ext.d.ts +4 -2
  262. package/lib/plugin/secrets-ext.d.ts.map +1 -1
  263. package/lib/plugin/status-bar/status-bar-item.d.ts +4 -2
  264. package/lib/plugin/status-bar/status-bar-item.d.ts.map +1 -1
  265. package/lib/plugin/status-bar-message-registry.d.ts +4 -2
  266. package/lib/plugin/status-bar-message-registry.d.ts.map +1 -1
  267. package/lib/plugin/tabs.d.ts +4 -2
  268. package/lib/plugin/tabs.d.ts.map +1 -1
  269. package/lib/plugin/tasks/task-provider.d.ts +4 -2
  270. package/lib/plugin/tasks/task-provider.d.ts.map +1 -1
  271. package/lib/plugin/tasks/tasks.d.ts +4 -2
  272. package/lib/plugin/tasks/tasks.d.ts.map +1 -1
  273. package/lib/plugin/terminal-ext.d.ts +13 -16
  274. package/lib/plugin/terminal-ext.d.ts.map +1 -1
  275. package/lib/plugin/terminal-ext.js +14 -21
  276. package/lib/plugin/terminal-ext.js.map +1 -1
  277. package/lib/plugin/test-item.d.ts +4 -2
  278. package/lib/plugin/test-item.d.ts.map +1 -1
  279. package/lib/plugin/tests.d.ts +11 -8
  280. package/lib/plugin/tests.d.ts.map +1 -1
  281. package/lib/plugin/tests.js +33 -28
  282. package/lib/plugin/tests.js.map +1 -1
  283. package/lib/plugin/text-editor.d.ts +4 -2
  284. package/lib/plugin/text-editor.d.ts.map +1 -1
  285. package/lib/plugin/text-editors.d.ts +4 -2
  286. package/lib/plugin/text-editors.d.ts.map +1 -1
  287. package/lib/plugin/timeline.d.ts +4 -2
  288. package/lib/plugin/timeline.d.ts.map +1 -1
  289. package/lib/plugin/tree/tree-views.d.ts +4 -2
  290. package/lib/plugin/tree/tree-views.d.ts.map +1 -1
  291. package/lib/plugin/tree/tree-views.js.map +1 -1
  292. package/lib/plugin/type-converters.d.ts +7 -6
  293. package/lib/plugin/type-converters.d.ts.map +1 -1
  294. package/lib/plugin/type-converters.js +9 -7
  295. package/lib/plugin/type-converters.js.map +1 -1
  296. package/lib/plugin/types-impl.d.ts +111 -3
  297. package/lib/plugin/types-impl.d.ts.map +1 -1
  298. package/lib/plugin/types-impl.js +134 -4
  299. package/lib/plugin/types-impl.js.map +1 -1
  300. package/lib/plugin/webview-views.d.ts +4 -2
  301. package/lib/plugin/webview-views.d.ts.map +1 -1
  302. package/lib/plugin/webviews.d.ts +4 -2
  303. package/lib/plugin/webviews.d.ts.map +1 -1
  304. package/lib/plugin/window-state.d.ts +4 -2
  305. package/lib/plugin/window-state.d.ts.map +1 -1
  306. package/lib/plugin/workspace.d.ts +4 -2
  307. package/lib/plugin/workspace.d.ts.map +1 -1
  308. package/package.json +29 -29
  309. package/src/common/plugin-api-rpc-model.ts +10 -0
  310. package/src/common/plugin-api-rpc.ts +32 -13
  311. package/src/common/proxy-handler.ts +3 -1
  312. package/src/common/test-types.ts +1 -0
  313. package/src/hosted/browser/hosted-plugin.ts +3 -1
  314. package/src/hosted/browser/worker/worker-env-ext.ts +2 -4
  315. package/src/hosted/browser/worker/worker-main.ts +2 -2
  316. package/src/hosted/node/scanners/scanner-theia.ts +1 -0
  317. package/src/main/browser/debug/debug-main.ts +26 -2
  318. package/src/main/browser/debug/plugin-debug-session-factory.ts +13 -3
  319. package/src/main/browser/documents-main.ts +3 -21
  320. package/src/main/browser/editors-and-documents-main.ts +13 -5
  321. package/src/main/browser/main-context.ts +5 -7
  322. package/src/main/browser/notebooks/renderers/cell-output-webview.tsx +33 -4
  323. package/src/main/browser/notebooks/renderers/output-webview-internal.ts +18 -0
  324. package/src/main/browser/notebooks/renderers/webview-communication.ts +12 -1
  325. package/src/main/browser/quick-open-main.ts +23 -45
  326. package/src/main/browser/tabs/tabs-main.ts +39 -15
  327. package/src/main/browser/terminal-main.ts +26 -6
  328. package/src/main/browser/test-main.ts +8 -3
  329. package/src/main/browser/text-editor-model-service.ts +9 -0
  330. package/src/main/browser/view/tree-views-main.ts +0 -4
  331. package/src/main/browser/view/view-context-key-service.ts +0 -6
  332. package/src/main/browser/window-state-main.ts +1 -1
  333. package/src/plugin/debug/debug-ext.ts +56 -6
  334. package/src/plugin/plugin-context.ts +78 -9
  335. package/src/plugin/plugin-icon-path.ts +5 -2
  336. package/src/plugin/plugin-manager.ts +17 -3
  337. package/src/plugin/quick-open.ts +9 -32
  338. package/src/plugin/terminal-ext.ts +27 -33
  339. package/src/plugin/tests.ts +39 -34
  340. package/src/plugin/tree/tree-views.ts +1 -1
  341. package/src/plugin/type-converters.ts +8 -8
  342. package/src/plugin/types-impl.ts +154 -1
@@ -135,21 +135,7 @@ export class TestControllerImpl implements theia.TestController {
135
135
  }
136
136
 
137
137
  createTestRun(request: theia.TestRunRequest, name?: string, persist: boolean = true): theia.TestRun {
138
- return this.testRunStarted(request, name || '', persist, true);
139
- }
140
-
141
- dispose() {
142
- this.proxy.$unregisterTestController(this.id);
143
- this.onDispose();
144
- }
145
-
146
- protected testRunStarted(request: theia.TestRunRequest, name: string, persist: boolean, isRunning: boolean): TestRun {
147
- const existing = this.activeRuns.get(request);
148
- if (existing) {
149
- return existing;
150
- }
151
-
152
- const run = new TestRun(this, this.proxy, name, persist, isRunning);
138
+ const run = new TestRun(this, this.proxy, name || '', persist, true, request.preserveFocus);
153
139
  const endListener = run.onWillFlush(() => {
154
140
  // make sure we notify the front end of test item changes before test run state is sent
155
141
  this.deltaBuilder.flush();
@@ -162,7 +148,12 @@ export class TestControllerImpl implements theia.TestController {
162
148
  return run;
163
149
  }
164
150
 
165
- runTestsForUI(profileId: string, name: string, includedTests: string[][], excludedTests: string[][]): void {
151
+ dispose() {
152
+ this.proxy.$unregisterTestController(this.id);
153
+ this.onDispose();
154
+ }
155
+
156
+ runTestsForUI(profileId: string, name: string, includedTests: string[][], excludedTests: string[][], preserveFocus: boolean): void {
166
157
  const profile = this.getProfile(profileId);
167
158
  if (!profile) {
168
159
  console.error(`No test run profile found for controller ${this.id} with id ${profileId} `);
@@ -197,11 +188,11 @@ export class TestControllerImpl implements theia.TestController {
197
188
  .filter(isDefined);
198
189
 
199
190
  const request = new TestRunRequest(
200
- includeTests, excludeTests, profile, false // don't support continuous run yet
191
+ includeTests, excludeTests, profile, false /* don't support continuous run yet */, preserveFocus
201
192
  );
202
193
 
203
- const run = this.testRunStarted(request, name, false, false);
204
- profile.runHandler(request, run.token);
194
+ // we do not cancel test runs via a cancellation token, but instead invoke "cancel" on the test runs
195
+ profile.runHandler(request, CancellationToken.None);
205
196
  }
206
197
 
207
198
  cancelRun(runId?: string): void {
@@ -235,7 +226,18 @@ function checkTestInstance(item?: theia.TestItem): TestItemImpl | undefined {
235
226
  return undefined;
236
227
  }
237
228
 
238
- class TestRun implements theia.TestRun {
229
+ export function checkTestRunInstance(item: theia.TestRun): TestRun;
230
+ export function checkTestRunInstance(item?: theia.TestRun): TestRun | undefined;
231
+ export function checkTestRunInstance(item?: theia.TestRun): TestRun | undefined {
232
+ if (item instanceof TestRun) {
233
+ return <TestRun>item;
234
+ } else if (item) {
235
+ throw new Error('Not a TestRun instance');
236
+ }
237
+ return undefined;
238
+ }
239
+
240
+ export class TestRun implements theia.TestRun {
239
241
  private onDidEndEmitter = new Emitter<void>();
240
242
  onDidEnd: Event<void> = this.onDidEndEmitter.event;
241
243
  private onWillFlushEmitter = new Emitter<void>();
@@ -251,21 +253,25 @@ class TestRun implements theia.TestRun {
251
253
  }, 200);
252
254
  private ended: boolean;
253
255
  private tokenSource: CancellationTokenSource;
254
- readonly token: CancellationToken;
255
256
 
256
257
  constructor(
257
- private readonly controller: TestControllerImpl,
258
+ readonly controller: TestControllerImpl,
258
259
  private readonly proxy: TestingMain,
259
260
  readonly name: string,
260
261
  readonly isPersisted: boolean,
261
- isRunning: boolean) {
262
+ isRunning: boolean,
263
+ preserveFocus: boolean) {
262
264
  this.id = generateUuid();
263
265
 
264
266
  this.tokenSource = new CancellationTokenSource();
265
- this.token = this.tokenSource.token;
266
267
 
267
- this.proxy.$notifyTestRunCreated(this.controller.id, { id: this.id, name: this.name, isRunning });
268
+ this.proxy.$notifyTestRunCreated(this.controller.id, { id: this.id, name: this.name, isRunning }, preserveFocus);
269
+ }
270
+
271
+ get token(): CancellationToken {
272
+ return this.tokenSource.token;
268
273
  }
274
+
269
275
  enqueued(test: theia.TestItem): void {
270
276
  this.updateTestState(test, { itemPath: checkTestInstance(test).path, state: TestExecutionState.Queued });
271
277
  }
@@ -444,7 +450,7 @@ export class TestingExtImpl implements TestingExt {
444
450
  }
445
451
 
446
452
  runTestsForUI(req: TestRunRequestDTO): void {
447
- this.withController(req.controllerId).runTestsForUI(req.profileId, req.name, req.includedTests, req.excludedTests);
453
+ this.withController(req.controllerId).runTestsForUI(req.profileId, req.name, req.includedTests, req.excludedTests, req.preserveFocus);
448
454
  }
449
455
 
450
456
  /**
@@ -469,13 +475,7 @@ export class TestRunProfile implements theia.TestRunProfile {
469
475
  isDefault = false,
470
476
  tag: theia.TestTag | undefined = undefined,
471
477
  ) {
472
- this.proxy = proxy;
473
- this.label = label;
474
- this.tag = tag;
475
- this.label = label;
476
- this.isDefault = isDefault;
477
-
478
- this.proxy.$notifyTestRunProfileCreated(controllerId, {
478
+ proxy.$notifyTestRunProfileCreated(controllerId, {
479
479
  id: profileId,
480
480
  kind: kind,
481
481
  tag: tag ? tag.toString() : '',
@@ -483,6 +483,11 @@ export class TestRunProfile implements theia.TestRunProfile {
483
483
  isDefault: isDefault,
484
484
  canConfigure: false,
485
485
  });
486
+ this.proxy = proxy;
487
+ this.label = label;
488
+ this.tag = tag;
489
+ this.label = label;
490
+ this.isDefault = isDefault;
486
491
  }
487
492
 
488
493
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -509,7 +514,7 @@ export class TestRunProfile implements theia.TestRunProfile {
509
514
  }
510
515
 
511
516
  doSetDefault(isDefault: boolean): boolean {
512
- if (this._isDefault !== isDefault) {
517
+ if (this._isDefault !== isDefault) {
513
518
  this._isDefault = isDefault;
514
519
  this.onDidChangeDefaultEmitter.fire(isDefault);
515
520
  return true;
@@ -446,7 +446,7 @@ class TreeViewExtImpl<T> implements Disposable {
446
446
  } else if (ThemeIcon.is(iconPath)) {
447
447
  themeIcon = iconPath;
448
448
  } else {
449
- iconUrl = PluginIconPath.toUrl(<PluginIconPath | undefined>iconPath, this.plugin);
449
+ iconUrl = PluginIconPath.toUrl(iconPath, this.plugin);
450
450
  }
451
451
 
452
452
  let checkboxInfo;
@@ -16,7 +16,7 @@
16
16
 
17
17
  import * as theia from '@theia/plugin';
18
18
  import * as lstypes from '@theia/core/shared/vscode-languageserver-protocol';
19
- import { InlineValueEvaluatableExpression, InlineValueText, InlineValueVariableLookup, QuickPickItemKind, URI } from './types-impl';
19
+ import { InlineValueEvaluatableExpression, InlineValueText, InlineValueVariableLookup, QuickPickItemKind, ThemeIcon, URI } from './types-impl';
20
20
  import * as rpc from '../common/plugin-api-rpc';
21
21
  import {
22
22
  DecorationOptions, EditorPosition, Plugin, Position, WorkspaceTextEditDto, WorkspaceFileEditDto, Selection, TaskDto, WorkspaceEditDto
@@ -35,7 +35,7 @@ import { CellRange, isTextStreamMime } from '@theia/notebook/lib/common';
35
35
  import { MarkdownString as MarkdownStringDTO } from '@theia/core/lib/common/markdown-rendering';
36
36
 
37
37
  import { TestItemDTO, TestMessageDTO } from '../common/test-types';
38
- import { ThemeIcon } from '@theia/monaco-editor-core/esm/vs/base/common/themables';
38
+ import { PluginIconPath } from './plugin-icon-path';
39
39
 
40
40
  const SIDE_GROUP = -2;
41
41
  const ACTIVE_GROUP = -1;
@@ -1226,7 +1226,7 @@ export function convertIconPath(iconPath: types.URI | { light: types.URI; dark:
1226
1226
  dark: iconPath.dark.toJSON(),
1227
1227
  light: iconPath.light?.toJSON()
1228
1228
  };
1229
- } else if (ThemeIcon.isThemeIcon(iconPath)) {
1229
+ } else if (ThemeIcon.is(iconPath)) {
1230
1230
  return {
1231
1231
  id: iconPath.id,
1232
1232
  color: iconPath.color ? { id: iconPath.color.id } : undefined
@@ -1236,19 +1236,19 @@ export function convertIconPath(iconPath: types.URI | { light: types.URI; dark:
1236
1236
  }
1237
1237
  }
1238
1238
 
1239
- export function convertQuickInputButton(button: theia.QuickInputButton, index: number): rpc.TransferQuickInputButton {
1239
+ export function convertQuickInputButton(plugin: Plugin, button: theia.QuickInputButton, index: number): rpc.TransferQuickInputButton {
1240
1240
  const iconPath = convertIconPath(button.iconPath);
1241
1241
  if (!iconPath) {
1242
1242
  throw new Error(`Could not convert icon path: '${button.iconPath}'`);
1243
1243
  }
1244
1244
  return {
1245
1245
  handle: index,
1246
- iconPath: iconPath,
1246
+ iconUrl: PluginIconPath.toUrl(iconPath, plugin) ?? ThemeIcon.get(iconPath),
1247
1247
  tooltip: button.tooltip
1248
1248
  };
1249
1249
  }
1250
1250
 
1251
- export function convertToTransferQuickPickItems(items: (theia.QuickPickItem | string)[]): rpc.TransferQuickPickItem[] {
1251
+ export function convertToTransferQuickPickItems(plugin: Plugin, items: (theia.QuickPickItem | string)[]): rpc.TransferQuickPickItem[] {
1252
1252
  return items.map((item, index) => {
1253
1253
  if (typeof item === 'string') {
1254
1254
  return { kind: 'item', label: item, handle: index };
@@ -1260,11 +1260,11 @@ export function convertToTransferQuickPickItems(items: (theia.QuickPickItem | st
1260
1260
  kind: 'item',
1261
1261
  label,
1262
1262
  description,
1263
- iconPath: convertIconPath(iconPath),
1263
+ iconUrl: PluginIconPath.toUrl(iconPath, plugin) ?? ThemeIcon.get(iconPath),
1264
1264
  detail,
1265
1265
  picked,
1266
1266
  alwaysShow,
1267
- buttons: buttons ? buttons.map(convertQuickInputButton) : undefined,
1267
+ buttons: buttons ? buttons.map((button, i) => convertQuickInputButton(plugin, button, i)) : undefined,
1268
1268
  handle: index,
1269
1269
  };
1270
1270
  }
@@ -744,6 +744,9 @@ export namespace ThemeIcon {
744
744
  export function is(item: unknown): item is ThemeIcon {
745
745
  return isObject(item) && 'id' in item;
746
746
  }
747
+ export function get(item: unknown): ThemeIcon | undefined {
748
+ return is(item) ? item : undefined;
749
+ }
747
750
  }
748
751
 
749
752
  export enum TextEditorRevealType {
@@ -3028,6 +3031,14 @@ export class FunctionBreakpoint extends Breakpoint {
3028
3031
  }
3029
3032
  }
3030
3033
 
3034
+ export class DebugThread implements theia.DebugThread {
3035
+ constructor(readonly session: theia.DebugSession, readonly threadId: number) { }
3036
+ }
3037
+
3038
+ export class DebugStackFrame implements theia.DebugStackFrame {
3039
+ constructor(readonly session: theia.DebugSession, readonly threadId: number, readonly frameId: number) { }
3040
+ }
3041
+
3031
3042
  @es5ClassCompat
3032
3043
  export class Color {
3033
3044
  readonly red: number;
@@ -3329,6 +3340,7 @@ export class TestRunRequest implements theia.TestRunRequest {
3329
3340
  public readonly exclude: theia.TestItem[] | undefined = undefined,
3330
3341
  public readonly profile: theia.TestRunProfile | undefined = undefined,
3331
3342
  public readonly continuous: boolean | undefined = undefined,
3343
+ public readonly preserveFocus: boolean = true
3332
3344
  ) { }
3333
3345
  }
3334
3346
 
@@ -3351,7 +3363,7 @@ export class TestMessage implements theia.TestMessage {
3351
3363
 
3352
3364
  @es5ClassCompat
3353
3365
  export class TestCoverageCount {
3354
- constructor( public covered: number, public total: number) { }
3366
+ constructor(public covered: number, public total: number) { }
3355
3367
  }
3356
3368
 
3357
3369
  @es5ClassCompat
@@ -3846,3 +3858,144 @@ export class TerminalQuickFixOpener {
3846
3858
  constructor(uri: theia.Uri) { }
3847
3859
  }
3848
3860
 
3861
+ // #region Chat
3862
+ export class ChatRequestTurn {
3863
+ readonly prompt: string;
3864
+ readonly participant: string;
3865
+ readonly command?: string;
3866
+ readonly references: theia.ChatPromptReference[];
3867
+ private constructor(prompt: string, command: string | undefined, references: theia.ChatPromptReference[], participant: string) {
3868
+ this.prompt = prompt;
3869
+ this.command = command;
3870
+ this.participant = participant;
3871
+ this.references = references;
3872
+ };
3873
+ }
3874
+
3875
+ export class ChatResponseTurn {
3876
+ readonly command?: string;
3877
+
3878
+ private constructor(readonly response: ReadonlyArray<theia.ChatResponseMarkdownPart | theia.ChatResponseFileTreePart | theia.ChatResponseAnchorPart
3879
+ | theia.ChatResponseCommandButtonPart>, readonly result: theia.ChatResult, readonly participant: string) { }
3880
+ }
3881
+
3882
+ export class ChatResponseAnchorPart {
3883
+ value: URI | Location;
3884
+ title?: string;
3885
+
3886
+ constructor(value: URI | Location, title?: string) { }
3887
+ }
3888
+
3889
+ export class ChatResponseProgressPart {
3890
+ value: string;
3891
+
3892
+ constructor(value: string) { }
3893
+ }
3894
+
3895
+ export class ChatResponseReferencePart {
3896
+ value: URI | Location;
3897
+ iconPath?: URI | ThemeIcon | { light: URI; dark: URI; };
3898
+
3899
+ constructor(value: URI | theia.Location, iconPath?: URI | ThemeIcon | {
3900
+ light: URI;
3901
+ dark: URI;
3902
+ }) { }
3903
+ }
3904
+ export class ChatResponseCommandButtonPart {
3905
+ value: theia.Command;
3906
+
3907
+ constructor(value: theia.Command) { }
3908
+ }
3909
+
3910
+ export class ChatResponseMarkdownPart {
3911
+ value: theia.MarkdownString;
3912
+
3913
+ constructor(value: string | theia.MarkdownString) {
3914
+ }
3915
+ }
3916
+
3917
+ export class ChatResponseFileTreePart {
3918
+ value: theia.ChatResponseFileTree[];
3919
+ baseUri: URI;
3920
+
3921
+ constructor(value: theia.ChatResponseFileTree[], baseUri: URI) { }
3922
+ }
3923
+
3924
+ export type ChatResponsePart = ChatResponseMarkdownPart | ChatResponseFileTreePart | ChatResponseAnchorPart
3925
+ | ChatResponseProgressPart | ChatResponseReferencePart | ChatResponseCommandButtonPart;
3926
+
3927
+ export enum ChatResultFeedbackKind {
3928
+ Unhelpful = 0,
3929
+ Helpful = 1,
3930
+ }
3931
+
3932
+ export enum LanguageModelChatMessageRole {
3933
+ User = 1,
3934
+ Assistant = 2
3935
+ }
3936
+
3937
+ export class LanguageModelChatMessage {
3938
+
3939
+ static User(content: string, name?: string): LanguageModelChatMessage {
3940
+ return new LanguageModelChatMessage(LanguageModelChatMessageRole.User, content, name);
3941
+ }
3942
+
3943
+ static Assistant(content: string, name?: string): LanguageModelChatMessage {
3944
+ return new LanguageModelChatMessage(LanguageModelChatMessageRole.Assistant, content, name);
3945
+ }
3946
+
3947
+ constructor(public role: LanguageModelChatMessageRole, public content: string, public name?: string) { }
3948
+ }
3949
+
3950
+ export class LanguageModelError extends Error {
3951
+
3952
+ static NoPermissions(message?: string): LanguageModelError {
3953
+ return new LanguageModelError(message, LanguageModelError.NoPermissions.name);
3954
+ }
3955
+
3956
+ static Blocked(message?: string): LanguageModelError {
3957
+ return new LanguageModelError(message, LanguageModelError.Blocked.name);
3958
+ }
3959
+
3960
+ static NotFound(message?: string): LanguageModelError {
3961
+ return new LanguageModelError(message, LanguageModelError.NotFound.name);
3962
+ }
3963
+
3964
+ readonly code: string;
3965
+
3966
+ constructor(message?: string, code?: string) {
3967
+ super(message);
3968
+ this.name = 'LanguageModelError';
3969
+ this.code = code ?? '';
3970
+ }
3971
+ }
3972
+ // #endregion
3973
+
3974
+ // #region Port Attributes
3975
+
3976
+ export enum PortAutoForwardAction {
3977
+ Notify = 1,
3978
+ OpenBrowser = 2,
3979
+ OpenPreview = 3,
3980
+ Silent = 4,
3981
+ Ignore = 5
3982
+ }
3983
+
3984
+ export class PortAttributes {
3985
+ constructor(public autoForwardAction: PortAutoForwardAction) {
3986
+ }
3987
+ }
3988
+
3989
+ // #endregion
3990
+
3991
+ // #region Debug Visualization
3992
+
3993
+ export class DebugVisualization {
3994
+ iconPath?: URI | { light: URI; dark: URI } | ThemeIcon;
3995
+ visualization?: theia.Command | { treeId: string };
3996
+
3997
+ constructor(public name: string) {
3998
+ }
3999
+ }
4000
+
4001
+ // #endregion