@theia/ai-ide 1.77.0-next.95 → 1.77.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 (559) hide show
  1. package/lib/browser/address-pr-review-command-contribution.js +15 -19
  2. package/lib/browser/address-pr-review-command-contribution.js.map +1 -1
  3. package/lib/browser/agent-mode-confirmation-service.js +20 -24
  4. package/lib/browser/agent-mode-confirmation-service.js.map +1 -1
  5. package/lib/browser/agents-md-agent.js +15 -19
  6. package/lib/browser/agents-md-agent.js.map +1 -1
  7. package/lib/browser/ai-allow-all-mode-chat-banner.js +32 -39
  8. package/lib/browser/ai-allow-all-mode-chat-banner.js.map +1 -1
  9. package/lib/browser/ai-allow-all-mode-chat-banner.spec.js +49 -51
  10. package/lib/browser/ai-allow-all-mode-chat-banner.spec.js.map +1 -1
  11. package/lib/browser/ai-aware-scm-commit-widget.d.ts +1 -1
  12. package/lib/browser/ai-aware-scm-commit-widget.d.ts.map +1 -1
  13. package/lib/browser/ai-aware-scm-commit-widget.js +36 -47
  14. package/lib/browser/ai-aware-scm-commit-widget.js.map +1 -1
  15. package/lib/browser/ai-configuration/agent-icon.js +5 -9
  16. package/lib/browser/ai-configuration/agent-icon.js.map +1 -1
  17. package/lib/browser/ai-configuration/ai-configuration-breadcrumbs-contribution.js +28 -37
  18. package/lib/browser/ai-configuration/ai-configuration-breadcrumbs-contribution.js.map +1 -1
  19. package/lib/browser/ai-configuration/ai-configuration-detail-widget.js +29 -39
  20. package/lib/browser/ai-configuration/ai-configuration-detail-widget.js.map +1 -1
  21. package/lib/browser/ai-configuration/ai-configuration-detail-widget.spec.js +22 -24
  22. package/lib/browser/ai-configuration/ai-configuration-detail-widget.spec.js.map +1 -1
  23. package/lib/browser/ai-configuration/ai-configuration-label-provider-contribution.js +12 -15
  24. package/lib/browser/ai-configuration/ai-configuration-label-provider-contribution.js.map +1 -1
  25. package/lib/browser/ai-configuration/ai-configuration-open-preference-renderer.js +20 -24
  26. package/lib/browser/ai-configuration/ai-configuration-open-preference-renderer.js.map +1 -1
  27. package/lib/browser/ai-configuration/ai-configuration-preference-ownership.spec.js +37 -39
  28. package/lib/browser/ai-configuration/ai-configuration-preference-ownership.spec.js.map +1 -1
  29. package/lib/browser/ai-configuration/ai-configuration-resource.js +3 -7
  30. package/lib/browser/ai-configuration/ai-configuration-resource.js.map +1 -1
  31. package/lib/browser/ai-configuration/ai-configuration-search-widget.js +20 -26
  32. package/lib/browser/ai-configuration/ai-configuration-search-widget.js.map +1 -1
  33. package/lib/browser/ai-configuration/ai-configuration-search.js +2 -5
  34. package/lib/browser/ai-configuration/ai-configuration-search.js.map +1 -1
  35. package/lib/browser/ai-configuration/ai-configuration-search.spec.js +15 -17
  36. package/lib/browser/ai-configuration/ai-configuration-search.spec.js.map +1 -1
  37. package/lib/browser/ai-configuration/ai-configuration-service.js +9 -12
  38. package/lib/browser/ai-configuration/ai-configuration-service.js.map +1 -1
  39. package/lib/browser/ai-configuration/ai-configuration-tree-model.js +7 -10
  40. package/lib/browser/ai-configuration/ai-configuration-tree-model.js.map +1 -1
  41. package/lib/browser/ai-configuration/ai-configuration-tree-nodes.js +14 -17
  42. package/lib/browser/ai-configuration/ai-configuration-tree-nodes.js.map +1 -1
  43. package/lib/browser/ai-configuration/ai-configuration-tree-nodes.spec.js +47 -49
  44. package/lib/browser/ai-configuration/ai-configuration-tree-nodes.spec.js.map +1 -1
  45. package/lib/browser/ai-configuration/ai-configuration-tree-widget.d.ts +1 -1
  46. package/lib/browser/ai-configuration/ai-configuration-tree-widget.d.ts.map +1 -1
  47. package/lib/browser/ai-configuration/ai-configuration-tree-widget.js +68 -79
  48. package/lib/browser/ai-configuration/ai-configuration-tree-widget.js.map +1 -1
  49. package/lib/browser/ai-configuration/ai-configuration-view-contribution.d.ts +2 -2
  50. package/lib/browser/ai-configuration/ai-configuration-view-contribution.d.ts.map +1 -1
  51. package/lib/browser/ai-configuration/ai-configuration-view-contribution.js +47 -54
  52. package/lib/browser/ai-configuration/ai-configuration-view-contribution.js.map +1 -1
  53. package/lib/browser/ai-configuration/ai-configuration-widget.d.ts +4 -4
  54. package/lib/browser/ai-configuration/ai-configuration-widget.d.ts.map +1 -1
  55. package/lib/browser/ai-configuration/ai-configuration-widget.js +45 -57
  56. package/lib/browser/ai-configuration/ai-configuration-widget.js.map +1 -1
  57. package/lib/browser/ai-configuration/categories/agent-capabilities-settings.d.ts +3 -0
  58. package/lib/browser/ai-configuration/categories/agent-capabilities-settings.d.ts.map +1 -1
  59. package/lib/browser/ai-configuration/categories/agent-capabilities-settings.js +34 -40
  60. package/lib/browser/ai-configuration/categories/agent-capabilities-settings.js.map +1 -1
  61. package/lib/browser/ai-configuration/categories/agent-capabilities-settings.spec.js +135 -140
  62. package/lib/browser/ai-configuration/categories/agent-capabilities-settings.spec.js.map +1 -1
  63. package/lib/browser/ai-configuration/categories/agent-chips.js +8 -13
  64. package/lib/browser/ai-configuration/categories/agent-chips.js.map +1 -1
  65. package/lib/browser/ai-configuration/categories/agent-detail-model.js +7 -10
  66. package/lib/browser/ai-configuration/categories/agent-detail-model.js.map +1 -1
  67. package/lib/browser/ai-configuration/categories/agent-detail-model.spec.js +13 -15
  68. package/lib/browser/ai-configuration/categories/agent-detail-model.spec.js.map +1 -1
  69. package/lib/browser/ai-configuration/categories/agent-detail-view.d.ts +1 -1
  70. package/lib/browser/ai-configuration/categories/agent-detail-view.d.ts.map +1 -1
  71. package/lib/browser/ai-configuration/categories/agent-detail-view.js +29 -34
  72. package/lib/browser/ai-configuration/categories/agent-detail-view.js.map +1 -1
  73. package/lib/browser/ai-configuration/categories/agents-configuration-category.d.ts +1 -1
  74. package/lib/browser/ai-configuration/categories/agents-configuration-category.d.ts.map +1 -1
  75. package/lib/browser/ai-configuration/categories/agents-configuration-category.js +106 -128
  76. package/lib/browser/ai-configuration/categories/agents-configuration-category.js.map +1 -1
  77. package/lib/browser/ai-configuration/categories/agents-configuration-category.spec.js +32 -34
  78. package/lib/browser/ai-configuration/categories/agents-configuration-category.spec.js.map +1 -1
  79. package/lib/browser/ai-configuration/categories/general-configuration-category.js +91 -101
  80. package/lib/browser/ai-configuration/categories/general-configuration-category.js.map +1 -1
  81. package/lib/browser/ai-configuration/categories/general-configuration-category.spec.js +38 -40
  82. package/lib/browser/ai-configuration/categories/general-configuration-category.spec.js.map +1 -1
  83. package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.js +53 -63
  84. package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.js.map +1 -1
  85. package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.spec.js +25 -27
  86. package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.spec.js.map +1 -1
  87. package/lib/browser/ai-configuration/categories/models-configuration-category.js +45 -56
  88. package/lib/browser/ai-configuration/categories/models-configuration-category.js.map +1 -1
  89. package/lib/browser/ai-configuration/categories/models-configuration-category.spec.js +31 -33
  90. package/lib/browser/ai-configuration/categories/models-configuration-category.spec.js.map +1 -1
  91. package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.js +68 -76
  92. package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.js.map +1 -1
  93. package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.spec.js +55 -57
  94. package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.spec.js.map +1 -1
  95. package/lib/browser/ai-configuration/categories/prompts-and-skills-configuration-category.js +85 -100
  96. package/lib/browser/ai-configuration/categories/prompts-and-skills-configuration-category.js.map +1 -1
  97. package/lib/browser/ai-configuration/categories/prompts-and-skills-configuration-category.spec.js +39 -41
  98. package/lib/browser/ai-configuration/categories/prompts-and-skills-configuration-category.spec.js.map +1 -1
  99. package/lib/browser/ai-configuration/categories/provider-model-discovery-section.js +44 -49
  100. package/lib/browser/ai-configuration/categories/provider-model-discovery-section.js.map +1 -1
  101. package/lib/browser/ai-configuration/categories/provider-model-discovery-section.spec.js +71 -74
  102. package/lib/browser/ai-configuration/categories/provider-model-discovery-section.spec.js.map +1 -1
  103. package/lib/browser/ai-configuration/categories/token-usage-configuration-category.js +34 -42
  104. package/lib/browser/ai-configuration/categories/token-usage-configuration-category.js.map +1 -1
  105. package/lib/browser/ai-configuration/categories/token-usage-configuration-category.spec.js +16 -18
  106. package/lib/browser/ai-configuration/categories/token-usage-configuration-category.spec.js.map +1 -1
  107. package/lib/browser/ai-configuration/categories/tools-configuration-category.js +101 -112
  108. package/lib/browser/ai-configuration/categories/tools-configuration-category.js.map +1 -1
  109. package/lib/browser/ai-configuration/categories/tools-configuration-category.spec.js +46 -48
  110. package/lib/browser/ai-configuration/categories/tools-configuration-category.spec.js.map +1 -1
  111. package/lib/browser/ai-configuration/categories/variables-configuration-category.js +54 -63
  112. package/lib/browser/ai-configuration/categories/variables-configuration-category.js.map +1 -1
  113. package/lib/browser/ai-configuration/categories/variables-configuration-category.spec.js +27 -29
  114. package/lib/browser/ai-configuration/categories/variables-configuration-category.spec.js.map +1 -1
  115. package/lib/browser/ai-configuration/components/agent-notification-settings.js +12 -16
  116. package/lib/browser/ai-configuration/components/agent-notification-settings.js.map +1 -1
  117. package/lib/browser/ai-configuration/language-model-renderer.js +25 -31
  118. package/lib/browser/ai-configuration/language-model-renderer.js.map +1 -1
  119. package/lib/browser/ai-configuration/language-model-renderer.spec.js +29 -32
  120. package/lib/browser/ai-configuration/language-model-renderer.spec.js.map +1 -1
  121. package/lib/browser/ai-first-perspective-contribution.js +18 -21
  122. package/lib/browser/ai-first-perspective-contribution.js.map +1 -1
  123. package/lib/browser/ai-getting-started-commands.js +3 -6
  124. package/lib/browser/ai-getting-started-commands.js.map +1 -1
  125. package/lib/browser/ai-getting-started-contribution.js +24 -30
  126. package/lib/browser/ai-getting-started-contribution.js.map +1 -1
  127. package/lib/browser/ai-getting-started-walkthrough.js +54 -58
  128. package/lib/browser/ai-getting-started-walkthrough.js.map +1 -1
  129. package/lib/browser/ai-getting-started-walkthrough.spec.js +32 -34
  130. package/lib/browser/ai-getting-started-walkthrough.spec.js.map +1 -1
  131. package/lib/browser/ai-ide-activation-service.js +25 -34
  132. package/lib/browser/ai-ide-activation-service.js.map +1 -1
  133. package/lib/browser/ai-sessions-view-contribution.d.ts +1 -1
  134. package/lib/browser/ai-sessions-view-contribution.d.ts.map +1 -1
  135. package/lib/browser/ai-sessions-view-contribution.js +28 -33
  136. package/lib/browser/ai-sessions-view-contribution.js.map +1 -1
  137. package/lib/browser/ai-sessions-widget.d.ts +3 -3
  138. package/lib/browser/ai-sessions-widget.d.ts.map +1 -1
  139. package/lib/browser/ai-sessions-widget.js +42 -55
  140. package/lib/browser/ai-sessions-widget.js.map +1 -1
  141. package/lib/browser/ai-terminal-functions.js +18 -24
  142. package/lib/browser/ai-terminal-functions.js.map +1 -1
  143. package/lib/browser/ai-walkthrough-context-keys.js +35 -45
  144. package/lib/browser/ai-walkthrough-context-keys.js.map +1 -1
  145. package/lib/browser/ai-walkthrough-context-keys.spec.js +34 -36
  146. package/lib/browser/ai-walkthrough-context-keys.spec.js.map +1 -1
  147. package/lib/browser/ai-workspace-restriction-contribution.js +11 -15
  148. package/lib/browser/ai-workspace-restriction-contribution.js.map +1 -1
  149. package/lib/browser/analyze-gh-ticket-command-contribution.js +19 -23
  150. package/lib/browser/analyze-gh-ticket-command-contribution.js.map +1 -1
  151. package/lib/browser/app-tester-chat-agent.js +45 -51
  152. package/lib/browser/app-tester-chat-agent.js.map +1 -1
  153. package/lib/browser/app-tester-chat-functions.d.ts +1 -1
  154. package/lib/browser/app-tester-chat-functions.d.ts.map +1 -1
  155. package/lib/browser/app-tester-chat-functions.js +29 -34
  156. package/lib/browser/app-tester-chat-functions.js.map +1 -1
  157. package/lib/browser/app-tester-prompt-template.js +42 -45
  158. package/lib/browser/app-tester-prompt-template.js.map +1 -1
  159. package/lib/browser/apptester-capability-contribution.js +13 -17
  160. package/lib/browser/apptester-capability-contribution.js.map +1 -1
  161. package/lib/browser/architect-agent.d.ts +2 -2
  162. package/lib/browser/architect-agent.d.ts.map +1 -1
  163. package/lib/browser/architect-agent.js +38 -44
  164. package/lib/browser/architect-agent.js.map +1 -1
  165. package/lib/browser/architect-prompt-template.js +84 -87
  166. package/lib/browser/architect-prompt-template.js.map +1 -1
  167. package/lib/browser/chat-session-item-action-contribution.js +15 -18
  168. package/lib/browser/chat-session-item-action-contribution.js.map +1 -1
  169. package/lib/browser/chat-session-item.d.ts +1 -1
  170. package/lib/browser/chat-session-item.d.ts.map +1 -1
  171. package/lib/browser/chat-session-item.js +25 -29
  172. package/lib/browser/chat-session-item.js.map +1 -1
  173. package/lib/browser/chat-session-list-components.js +9 -14
  174. package/lib/browser/chat-session-list-components.js.map +1 -1
  175. package/lib/browser/chat-session-list-service.d.ts +2 -2
  176. package/lib/browser/chat-session-list-service.d.ts.map +1 -1
  177. package/lib/browser/chat-session-list-service.js +33 -43
  178. package/lib/browser/chat-session-list-service.js.map +1 -1
  179. package/lib/browser/chat-session-list-service.spec.js +56 -58
  180. package/lib/browser/chat-session-list-service.spec.js.map +1 -1
  181. package/lib/browser/chat-session-tooltip.js +31 -35
  182. package/lib/browser/chat-session-tooltip.js.map +1 -1
  183. package/lib/browser/chat-sessions-welcome-message-provider.d.ts +3 -3
  184. package/lib/browser/chat-sessions-welcome-message-provider.d.ts.map +1 -1
  185. package/lib/browser/chat-sessions-welcome-message-provider.js +54 -70
  186. package/lib/browser/chat-sessions-welcome-message-provider.js.map +1 -1
  187. package/lib/browser/code-review-capability-contribution.js +13 -17
  188. package/lib/browser/code-review-capability-contribution.js.map +1 -1
  189. package/lib/browser/code-reviewer-agent.js +17 -21
  190. package/lib/browser/code-reviewer-agent.js.map +1 -1
  191. package/lib/browser/code-reviewer-prompt-template.js +5 -8
  192. package/lib/browser/code-reviewer-prompt-template.js.map +1 -1
  193. package/lib/browser/coder-agent.d.ts +2 -2
  194. package/lib/browser/coder-agent.d.ts.map +1 -1
  195. package/lib/browser/coder-agent.js +44 -50
  196. package/lib/browser/coder-agent.js.map +1 -1
  197. package/lib/browser/commit-message-agent.js +26 -32
  198. package/lib/browser/commit-message-agent.js.map +1 -1
  199. package/lib/browser/commit-message-agent.spec.js +25 -28
  200. package/lib/browser/commit-message-agent.spec.js.map +1 -1
  201. package/lib/browser/commit-message-command-contribution.d.ts +1 -1
  202. package/lib/browser/commit-message-command-contribution.d.ts.map +1 -1
  203. package/lib/browser/commit-message-command-contribution.js +21 -28
  204. package/lib/browser/commit-message-command-contribution.js.map +1 -1
  205. package/lib/browser/commit-message-commands.js +4 -7
  206. package/lib/browser/commit-message-commands.js.map +1 -1
  207. package/lib/browser/commit-message-prompt-template.js +9 -12
  208. package/lib/browser/commit-message-prompt-template.js.map +1 -1
  209. package/lib/browser/commit-message-runner.d.ts +2 -2
  210. package/lib/browser/commit-message-runner.d.ts.map +1 -1
  211. package/lib/browser/commit-message-runner.js +33 -41
  212. package/lib/browser/commit-message-runner.js.map +1 -1
  213. package/lib/browser/commit-message-runner.spec.js +65 -68
  214. package/lib/browser/commit-message-runner.spec.js.map +1 -1
  215. package/lib/browser/context-file-validation-service-impl.d.ts +1 -1
  216. package/lib/browser/context-file-validation-service-impl.d.ts.map +1 -1
  217. package/lib/browser/context-file-validation-service-impl.js +20 -26
  218. package/lib/browser/context-file-validation-service-impl.js.map +1 -1
  219. package/lib/browser/context-file-validation-service-impl.spec.js +77 -79
  220. package/lib/browser/context-file-validation-service-impl.spec.js.map +1 -1
  221. package/lib/browser/context-functions.js +27 -31
  222. package/lib/browser/context-functions.js.map +1 -1
  223. package/lib/browser/context-functions.spec.js +64 -66
  224. package/lib/browser/context-functions.spec.js.map +1 -1
  225. package/lib/browser/create-skill-agent.d.ts +1 -1
  226. package/lib/browser/create-skill-agent.d.ts.map +1 -1
  227. package/lib/browser/create-skill-agent.js +19 -23
  228. package/lib/browser/create-skill-agent.js.map +1 -1
  229. package/lib/browser/default-chat-agent-recommendation-service.js +16 -19
  230. package/lib/browser/default-chat-agent-recommendation-service.js.map +1 -1
  231. package/lib/browser/explore-agent.d.ts +1 -1
  232. package/lib/browser/explore-agent.d.ts.map +1 -1
  233. package/lib/browser/explore-agent.js +18 -22
  234. package/lib/browser/explore-agent.js.map +1 -1
  235. package/lib/browser/explore-prompt-template.js +5 -8
  236. package/lib/browser/explore-prompt-template.js.map +1 -1
  237. package/lib/browser/file-changeset-function.spec.js +12 -14
  238. package/lib/browser/file-changeset-function.spec.js.map +1 -1
  239. package/lib/browser/file-changeset-functions.d.ts +1 -1
  240. package/lib/browser/file-changeset-functions.d.ts.map +1 -1
  241. package/lib/browser/file-changeset-functions.js +134 -164
  242. package/lib/browser/file-changeset-functions.js.map +1 -1
  243. package/lib/browser/file-changeset-functions.spec.js +136 -138
  244. package/lib/browser/file-changeset-functions.spec.js.map +1 -1
  245. package/lib/browser/frontend-module.js +293 -295
  246. package/lib/browser/frontend-module.js.map +1 -1
  247. package/lib/browser/git-changes-tool.js +22 -26
  248. package/lib/browser/git-changes-tool.js.map +1 -1
  249. package/lib/browser/git-changes-tool.spec.js +52 -55
  250. package/lib/browser/git-changes-tool.spec.js.map +1 -1
  251. package/lib/browser/github-capability-contribution.js +14 -18
  252. package/lib/browser/github-capability-contribution.js.map +1 -1
  253. package/lib/browser/github-chat-agent.js +58 -67
  254. package/lib/browser/github-chat-agent.js.map +1 -1
  255. package/lib/browser/github-prompt-template.js +6 -9
  256. package/lib/browser/github-prompt-template.js.map +1 -1
  257. package/lib/browser/github-repo-variable-contribution.d.ts +1 -1
  258. package/lib/browser/github-repo-variable-contribution.d.ts.map +1 -1
  259. package/lib/browser/github-repo-variable-contribution.js +23 -30
  260. package/lib/browser/github-repo-variable-contribution.js.map +1 -1
  261. package/lib/browser/ide-chat-welcome-message-provider.js +59 -71
  262. package/lib/browser/ide-chat-welcome-message-provider.js.map +1 -1
  263. package/lib/browser/implement-gh-ticket-command-contribution.js +15 -19
  264. package/lib/browser/implement-gh-ticket-command-contribution.js.map +1 -1
  265. package/lib/browser/memory-capability-contribution.d.ts.map +1 -1
  266. package/lib/browser/memory-capability-contribution.js +21 -25
  267. package/lib/browser/memory-capability-contribution.js.map +1 -1
  268. package/lib/browser/memory-capability-contribution.spec.js +30 -32
  269. package/lib/browser/memory-capability-contribution.spec.js.map +1 -1
  270. package/lib/browser/memory-directory-variable-contribution.d.ts +1 -1
  271. package/lib/browser/memory-directory-variable-contribution.d.ts.map +1 -1
  272. package/lib/browser/memory-directory-variable-contribution.js +19 -24
  273. package/lib/browser/memory-directory-variable-contribution.js.map +1 -1
  274. package/lib/browser/memory-directory-variable-contribution.spec.js +28 -30
  275. package/lib/browser/memory-directory-variable-contribution.spec.js.map +1 -1
  276. package/lib/browser/mode-aware-chat-agent.js +9 -12
  277. package/lib/browser/mode-aware-chat-agent.js.map +1 -1
  278. package/lib/browser/multi-root-paths.spec.js +86 -88
  279. package/lib/browser/multi-root-paths.spec.js.map +1 -1
  280. package/lib/browser/open-editors-hint-contribution.d.ts.map +1 -1
  281. package/lib/browser/open-editors-hint-contribution.js +11 -14
  282. package/lib/browser/open-editors-hint-contribution.js.map +1 -1
  283. package/lib/browser/remember-command-contribution.js +17 -21
  284. package/lib/browser/remember-command-contribution.js.map +1 -1
  285. package/lib/browser/review/pr-review-agent.js +17 -21
  286. package/lib/browser/review/pr-review-agent.js.map +1 -1
  287. package/lib/browser/review/pr-review-capability-contribution.js +41 -45
  288. package/lib/browser/review/pr-review-capability-contribution.js.map +1 -1
  289. package/lib/browser/review/pr-review-prompt-template.js +48 -51
  290. package/lib/browser/review/pr-review-prompt-template.js.map +1 -1
  291. package/lib/browser/shell-execution-capability-contribution.js +17 -21
  292. package/lib/browser/shell-execution-capability-contribution.js.map +1 -1
  293. package/lib/browser/skill-file-functions.js +27 -33
  294. package/lib/browser/skill-file-functions.js.map +1 -1
  295. package/lib/browser/skill-file-functions.spec.js +19 -21
  296. package/lib/browser/skill-file-functions.spec.js.map +1 -1
  297. package/lib/browser/summarize-session-command-contribution.d.ts +1 -1
  298. package/lib/browser/summarize-session-command-contribution.d.ts.map +1 -1
  299. package/lib/browser/summarize-session-command-contribution.js +38 -50
  300. package/lib/browser/summarize-session-command-contribution.js.map +1 -1
  301. package/lib/browser/task-background-summary-variable.js +17 -20
  302. package/lib/browser/task-background-summary-variable.js.map +1 -1
  303. package/lib/browser/task-context-file-storage-service.js +39 -51
  304. package/lib/browser/task-context-file-storage-service.js.map +1 -1
  305. package/lib/browser/task-context-file-storage-service.spec.js +41 -43
  306. package/lib/browser/task-context-file-storage-service.spec.js.map +1 -1
  307. package/lib/browser/task-context-functions.js +44 -52
  308. package/lib/browser/task-context-functions.js.map +1 -1
  309. package/lib/browser/template-preference-contribution.js +30 -37
  310. package/lib/browser/template-preference-contribution.js.map +1 -1
  311. package/lib/browser/test/tool-provider-cancellation-test-util.spec.js +8 -10
  312. package/lib/browser/test/tool-provider-cancellation-test-util.spec.js.map +1 -1
  313. package/lib/browser/todo-tool-renderer.d.ts +1 -1
  314. package/lib/browser/todo-tool-renderer.d.ts.map +1 -1
  315. package/lib/browser/todo-tool-renderer.js +42 -51
  316. package/lib/browser/todo-tool-renderer.js.map +1 -1
  317. package/lib/browser/todo-tool.js +8 -11
  318. package/lib/browser/todo-tool.js.map +1 -1
  319. package/lib/browser/todo-tool.spec.js +14 -16
  320. package/lib/browser/todo-tool.spec.js.map +1 -1
  321. package/lib/browser/user-interaction-tool-renderer.d.ts +1 -1
  322. package/lib/browser/user-interaction-tool-renderer.d.ts.map +1 -1
  323. package/lib/browser/user-interaction-tool-renderer.js +81 -95
  324. package/lib/browser/user-interaction-tool-renderer.js.map +1 -1
  325. package/lib/browser/user-interaction-tool.d.ts +2 -2
  326. package/lib/browser/user-interaction-tool.d.ts.map +1 -1
  327. package/lib/browser/user-interaction-tool.js +56 -65
  328. package/lib/browser/user-interaction-tool.js.map +1 -1
  329. package/lib/browser/user-interaction-tool.spec.js +118 -121
  330. package/lib/browser/user-interaction-tool.spec.js.map +1 -1
  331. package/lib/browser/workspace-functions.d.ts +1 -1
  332. package/lib/browser/workspace-functions.d.ts.map +1 -1
  333. package/lib/browser/workspace-functions.js +126 -155
  334. package/lib/browser/workspace-functions.js.map +1 -1
  335. package/lib/browser/workspace-functions.spec.js +607 -600
  336. package/lib/browser/workspace-functions.spec.js.map +1 -1
  337. package/lib/browser/workspace-launch-provider.d.ts +1 -1
  338. package/lib/browser/workspace-launch-provider.d.ts.map +1 -1
  339. package/lib/browser/workspace-launch-provider.js +46 -57
  340. package/lib/browser/workspace-launch-provider.js.map +1 -1
  341. package/lib/browser/workspace-launch-provider.spec.js +119 -122
  342. package/lib/browser/workspace-launch-provider.spec.js.map +1 -1
  343. package/lib/browser/workspace-search-provider.d.ts +1 -1
  344. package/lib/browser/workspace-search-provider.d.ts.map +1 -1
  345. package/lib/browser/workspace-search-provider.js +25 -32
  346. package/lib/browser/workspace-search-provider.js.map +1 -1
  347. package/lib/browser/workspace-search-provider.spec.js +35 -38
  348. package/lib/browser/workspace-search-provider.spec.js.map +1 -1
  349. package/lib/browser/workspace-task-provider.d.ts +1 -1
  350. package/lib/browser/workspace-task-provider.d.ts.map +1 -1
  351. package/lib/browser/workspace-task-provider.js +42 -51
  352. package/lib/browser/workspace-task-provider.js.map +1 -1
  353. package/lib/browser/workspace-task-provider.spec.js +102 -105
  354. package/lib/browser/workspace-task-provider.spec.js.map +1 -1
  355. package/lib/common/agent-ids.js +2 -5
  356. package/lib/common/agent-ids.js.map +1 -1
  357. package/lib/common/agents-md-prompt-template.js +38 -41
  358. package/lib/common/agents-md-prompt-template.js.map +1 -1
  359. package/lib/common/ai-configuration-preferences.js +5 -8
  360. package/lib/common/ai-configuration-preferences.js.map +1 -1
  361. package/lib/common/ai-ide-preferences.js +16 -19
  362. package/lib/common/ai-ide-preferences.js.map +1 -1
  363. package/lib/common/ai-terminal-functions.js +1 -4
  364. package/lib/common/ai-terminal-functions.js.map +1 -1
  365. package/lib/common/app-tester-chat-functions.js +4 -7
  366. package/lib/common/app-tester-chat-functions.js.map +1 -1
  367. package/lib/common/browser-automation-protocol.js +3 -6
  368. package/lib/common/browser-automation-protocol.js.map +1 -1
  369. package/lib/common/coder-replace-prompt-template.js +102 -108
  370. package/lib/common/coder-replace-prompt-template.js.map +1 -1
  371. package/lib/common/command-chat-agents.js +34 -40
  372. package/lib/common/command-chat-agents.js.map +1 -1
  373. package/lib/common/command-prompt-template.js +1 -4
  374. package/lib/common/command-prompt-template.js.map +1 -1
  375. package/lib/common/context-files-variable.js +17 -20
  376. package/lib/common/context-files-variable.js.map +1 -1
  377. package/lib/common/context-functions.js +3 -6
  378. package/lib/common/context-functions.js.map +1 -1
  379. package/lib/common/context-variables.js +2 -5
  380. package/lib/common/context-variables.js.map +1 -1
  381. package/lib/common/create-skill-prompt-template.js +22 -25
  382. package/lib/common/create-skill-prompt-template.js.map +1 -1
  383. package/lib/common/file-changeset-function-ids.js +8 -11
  384. package/lib/common/file-changeset-function-ids.js.map +1 -1
  385. package/lib/common/github-repo-protocol.js +2 -5
  386. package/lib/common/github-repo-protocol.js.map +1 -1
  387. package/lib/common/open-editors-hint-fragment-id.js +1 -4
  388. package/lib/common/open-editors-hint-fragment-id.js.map +1 -1
  389. package/lib/common/orchestrator-chat-agent.js +36 -42
  390. package/lib/common/orchestrator-chat-agent.js.map +1 -1
  391. package/lib/common/orchestrator-prompt-template.js +1 -4
  392. package/lib/common/orchestrator-prompt-template.js.map +1 -1
  393. package/lib/common/summarize-session-commands.js +2 -5
  394. package/lib/common/summarize-session-commands.js.map +1 -1
  395. package/lib/common/task-context-function-ids.js +5 -8
  396. package/lib/common/task-context-function-ids.js.map +1 -1
  397. package/lib/common/todo-tool.js +2 -6
  398. package/lib/common/todo-tool.js.map +1 -1
  399. package/lib/common/universal-chat-agent.js +17 -21
  400. package/lib/common/universal-chat-agent.js.map +1 -1
  401. package/lib/common/universal-prompt-template.js +6 -9
  402. package/lib/common/universal-prompt-template.js.map +1 -1
  403. package/lib/common/user-interaction-tool.js +11 -21
  404. package/lib/common/user-interaction-tool.js.map +1 -1
  405. package/lib/common/user-interaction-tool.spec.js +52 -54
  406. package/lib/common/user-interaction-tool.spec.js.map +1 -1
  407. package/lib/common/workspace-functions.js +13 -16
  408. package/lib/common/workspace-functions.js.map +1 -1
  409. package/lib/common/workspace-preferences.js +41 -44
  410. package/lib/common/workspace-preferences.js.map +1 -1
  411. package/lib/common/workspace-search-provider-util.js +3 -6
  412. package/lib/common/workspace-search-provider-util.js.map +1 -1
  413. package/lib/common/workspace-search-provider-util.spec.js +13 -15
  414. package/lib/common/workspace-search-provider-util.spec.js.map +1 -1
  415. package/lib/node/app-tester-agent/browser-automation-impl.d.ts +1 -1
  416. package/lib/node/app-tester-agent/browser-automation-impl.d.ts.map +1 -1
  417. package/lib/node/app-tester-agent/browser-automation-impl.js +7 -10
  418. package/lib/node/app-tester-agent/browser-automation-impl.js.map +1 -1
  419. package/lib/node/backend-module.js +21 -23
  420. package/lib/node/backend-module.js.map +1 -1
  421. package/lib/node/github-repo-service-impl.d.ts +1 -1
  422. package/lib/node/github-repo-service-impl.d.ts.map +1 -1
  423. package/lib/node/github-repo-service-impl.js +11 -15
  424. package/lib/node/github-repo-service-impl.js.map +1 -1
  425. package/lib/package.spec.d.ts +1 -0
  426. package/lib/package.spec.js +1 -1
  427. package/lib/package.spec.js.map +1 -1
  428. package/package.json +33 -25
  429. package/src/browser/address-pr-review-command-contribution.ts +1 -1
  430. package/src/browser/agent-mode-confirmation-service.ts +1 -1
  431. package/src/browser/agents-md-agent.ts +1 -1
  432. package/src/browser/ai-allow-all-mode-chat-banner.spec.ts +1 -1
  433. package/src/browser/ai-aware-scm-commit-widget.tsx +3 -3
  434. package/src/browser/ai-configuration/ai-configuration-breadcrumbs-contribution.ts +2 -2
  435. package/src/browser/ai-configuration/ai-configuration-detail-widget.spec.ts +1 -1
  436. package/src/browser/ai-configuration/ai-configuration-label-provider-contribution.ts +1 -1
  437. package/src/browser/ai-configuration/ai-configuration-open-preference-renderer.ts +1 -1
  438. package/src/browser/ai-configuration/ai-configuration-preference-ownership.spec.ts +6 -6
  439. package/src/browser/ai-configuration/ai-configuration-search.spec.ts +1 -1
  440. package/src/browser/ai-configuration/ai-configuration-tree-nodes.spec.ts +1 -1
  441. package/src/browser/ai-configuration/ai-configuration-tree-widget.tsx +3 -3
  442. package/src/browser/ai-configuration/ai-configuration-view-contribution.ts +2 -2
  443. package/src/browser/ai-configuration/ai-configuration-widget.tsx +5 -5
  444. package/src/browser/ai-configuration/categories/agent-capabilities-settings.spec.ts +9 -9
  445. package/src/browser/ai-configuration/categories/agent-capabilities-settings.tsx +5 -2
  446. package/src/browser/ai-configuration/categories/agent-chips.tsx +1 -1
  447. package/src/browser/ai-configuration/categories/agent-detail-model.spec.ts +1 -1
  448. package/src/browser/ai-configuration/categories/agent-detail-view.tsx +6 -6
  449. package/src/browser/ai-configuration/categories/agents-configuration-category.spec.ts +1 -1
  450. package/src/browser/ai-configuration/categories/agents-configuration-category.tsx +5 -5
  451. package/src/browser/ai-configuration/categories/general-configuration-category.spec.ts +2 -2
  452. package/src/browser/ai-configuration/categories/general-configuration-category.tsx +1 -1
  453. package/src/browser/ai-configuration/categories/model-aliases-configuration-category.spec.ts +1 -1
  454. package/src/browser/ai-configuration/categories/model-aliases-configuration-category.tsx +1 -1
  455. package/src/browser/ai-configuration/categories/models-configuration-category.spec.ts +1 -1
  456. package/src/browser/ai-configuration/categories/models-configuration-category.tsx +1 -1
  457. package/src/browser/ai-configuration/categories/prompt-snippets-configuration-category.spec.ts +1 -1
  458. package/src/browser/ai-configuration/categories/prompt-snippets-configuration-category.tsx +1 -1
  459. package/src/browser/ai-configuration/categories/prompts-and-skills-configuration-category.spec.ts +1 -1
  460. package/src/browser/ai-configuration/categories/prompts-and-skills-configuration-category.tsx +1 -1
  461. package/src/browser/ai-configuration/categories/provider-model-discovery-section.spec.tsx +1 -1
  462. package/src/browser/ai-configuration/categories/provider-model-discovery-section.tsx +1 -1
  463. package/src/browser/ai-configuration/categories/token-usage-configuration-category.spec.ts +1 -1
  464. package/src/browser/ai-configuration/categories/token-usage-configuration-category.tsx +1 -1
  465. package/src/browser/ai-configuration/categories/tools-configuration-category.spec.ts +1 -1
  466. package/src/browser/ai-configuration/categories/variables-configuration-category.spec.ts +1 -1
  467. package/src/browser/ai-configuration/categories/variables-configuration-category.tsx +1 -1
  468. package/src/browser/ai-configuration/language-model-renderer.spec.ts +1 -1
  469. package/src/browser/ai-first-perspective-contribution.ts +1 -1
  470. package/src/browser/ai-getting-started-contribution.ts +2 -2
  471. package/src/browser/ai-getting-started-walkthrough.spec.ts +2 -2
  472. package/src/browser/ai-getting-started-walkthrough.ts +3 -3
  473. package/src/browser/ai-ide-activation-service.ts +1 -1
  474. package/src/browser/ai-sessions-view-contribution.ts +1 -1
  475. package/src/browser/ai-sessions-widget.tsx +4 -4
  476. package/src/browser/ai-terminal-functions.ts +1 -1
  477. package/src/browser/ai-walkthrough-context-keys.spec.ts +1 -1
  478. package/src/browser/analyze-gh-ticket-command-contribution.ts +3 -3
  479. package/src/browser/app-tester-chat-agent.ts +2 -2
  480. package/src/browser/app-tester-chat-functions.ts +2 -2
  481. package/src/browser/app-tester-prompt-template.ts +2 -2
  482. package/src/browser/apptester-capability-contribution.ts +1 -1
  483. package/src/browser/architect-agent.ts +4 -4
  484. package/src/browser/architect-prompt-template.ts +6 -6
  485. package/src/browser/chat-session-item.tsx +2 -2
  486. package/src/browser/chat-session-list-service.spec.ts +2 -2
  487. package/src/browser/chat-session-list-service.ts +2 -2
  488. package/src/browser/chat-sessions-welcome-message-provider.tsx +5 -5
  489. package/src/browser/code-review-capability-contribution.ts +1 -1
  490. package/src/browser/code-reviewer-agent.ts +1 -1
  491. package/src/browser/coder-agent.ts +3 -3
  492. package/src/browser/commit-message-agent.spec.ts +2 -2
  493. package/src/browser/commit-message-agent.ts +1 -1
  494. package/src/browser/commit-message-command-contribution.ts +3 -3
  495. package/src/browser/commit-message-runner.spec.ts +3 -3
  496. package/src/browser/commit-message-runner.ts +2 -2
  497. package/src/browser/context-file-validation-service-impl.spec.ts +2 -2
  498. package/src/browser/context-file-validation-service-impl.ts +1 -1
  499. package/src/browser/context-functions.spec.ts +1 -1
  500. package/src/browser/context-functions.ts +1 -1
  501. package/src/browser/create-skill-agent.ts +2 -2
  502. package/src/browser/default-chat-agent-recommendation-service.ts +2 -2
  503. package/src/browser/explore-agent.ts +2 -2
  504. package/src/browser/file-changeset-function.spec.ts +1 -1
  505. package/src/browser/file-changeset-functions.spec.ts +3 -3
  506. package/src/browser/file-changeset-functions.ts +3 -3
  507. package/src/browser/frontend-module.ts +89 -89
  508. package/src/browser/git-changes-tool.spec.ts +1 -1
  509. package/src/browser/github-capability-contribution.ts +1 -1
  510. package/src/browser/github-chat-agent.ts +3 -3
  511. package/src/browser/github-repo-variable-contribution.ts +1 -1
  512. package/src/browser/ide-chat-welcome-message-provider.tsx +3 -3
  513. package/src/browser/implement-gh-ticket-command-contribution.ts +1 -1
  514. package/src/browser/memory-capability-contribution.spec.ts +4 -4
  515. package/src/browser/memory-capability-contribution.ts +5 -3
  516. package/src/browser/memory-directory-variable-contribution.spec.ts +1 -1
  517. package/src/browser/memory-directory-variable-contribution.ts +1 -1
  518. package/src/browser/multi-root-paths.spec.ts +2 -2
  519. package/src/browser/open-editors-hint-contribution.ts +2 -1
  520. package/src/browser/remember-command-contribution.ts +2 -2
  521. package/src/browser/review/pr-review-agent.ts +1 -1
  522. package/src/browser/review/pr-review-capability-contribution.ts +6 -6
  523. package/src/browser/review/pr-review-prompt-template.ts +4 -4
  524. package/src/browser/shell-execution-capability-contribution.ts +1 -1
  525. package/src/browser/skill-file-functions.spec.ts +1 -1
  526. package/src/browser/skill-file-functions.ts +1 -1
  527. package/src/browser/summarize-session-command-contribution.ts +2 -2
  528. package/src/browser/task-background-summary-variable.ts +1 -1
  529. package/src/browser/task-context-file-storage-service.spec.ts +1 -1
  530. package/src/browser/task-context-file-storage-service.ts +1 -1
  531. package/src/browser/task-context-functions.ts +1 -1
  532. package/src/browser/template-preference-contribution.ts +1 -1
  533. package/src/browser/todo-tool-renderer.tsx +1 -1
  534. package/src/browser/todo-tool.spec.ts +1 -1
  535. package/src/browser/todo-tool.ts +1 -1
  536. package/src/browser/user-interaction-tool-renderer.tsx +3 -3
  537. package/src/browser/user-interaction-tool.spec.ts +3 -3
  538. package/src/browser/user-interaction-tool.ts +2 -2
  539. package/src/browser/workspace-functions.spec.ts +16 -7
  540. package/src/browser/workspace-functions.ts +7 -6
  541. package/src/browser/workspace-launch-provider.spec.ts +2 -2
  542. package/src/browser/workspace-launch-provider.ts +2 -2
  543. package/src/browser/workspace-search-provider.spec.ts +2 -2
  544. package/src/browser/workspace-search-provider.ts +4 -4
  545. package/src/browser/workspace-task-provider.spec.ts +2 -2
  546. package/src/browser/workspace-task-provider.ts +2 -2
  547. package/src/common/agents-md-prompt-template.ts +4 -4
  548. package/src/common/coder-replace-prompt-template.ts +8 -8
  549. package/src/common/command-chat-agents.ts +1 -1
  550. package/src/common/context-files-variable.ts +1 -1
  551. package/src/common/create-skill-prompt-template.ts +4 -4
  552. package/src/common/orchestrator-chat-agent.ts +2 -2
  553. package/src/common/universal-chat-agent.ts +1 -1
  554. package/src/common/universal-prompt-template.ts +1 -1
  555. package/src/common/user-interaction-tool.spec.ts +1 -1
  556. package/src/common/workspace-search-provider-util.spec.ts +1 -1
  557. package/src/node/app-tester-agent/browser-automation-impl.ts +1 -1
  558. package/src/node/backend-module.ts +7 -7
  559. package/src/node/github-repo-service-impl.ts +1 -1
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  /* eslint-disable max-len */
3
2
  // *****************************************************************************
4
3
  // Copyright (C) 2026 EclipseSource GmbH.
@@ -15,44 +14,42 @@
15
14
  //
16
15
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
17
16
  // *****************************************************************************
18
- Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.PRReviewCapabilityContribution = void 0;
20
- const tslib_1 = require("tslib");
21
- const ai_core_1 = require("@theia/ai-core");
22
- const core_1 = require("@theia/core");
23
- const inversify_1 = require("@theia/core/shared/inversify");
24
- const shell_execution_server_1 = require("@theia/ai-terminal/lib/common/shell-execution-server");
25
- const workspace_functions_1 = require("../../common/workspace-functions");
26
- const user_interaction_tool_1 = require("../../common/user-interaction-tool");
27
- const github_chat_agent_1 = require("../github-chat-agent");
28
- const explore_agent_1 = require("../explore-agent");
29
- const pr_review_prompt_template_1 = require("./pr-review-prompt-template");
17
+ import { __decorate } from "tslib";
18
+ import { AGENT_DELEGATION_FUNCTION_ID, PromptService } from '@theia/ai-core';
19
+ import { nls } from '@theia/core';
20
+ import { inject, injectable } from '@theia/core/shared/inversify';
21
+ import { SHELL_EXECUTION_FUNCTION_ID } from '@theia/ai-terminal/lib/common/shell-execution-server';
22
+ import { LIST_TASKS_FUNCTION_ID, RUN_TASK_FUNCTION_ID } from '../../common/workspace-functions.js';
23
+ import { USER_INTERACTION_FUNCTION_ID } from '../../common/user-interaction-tool.js';
24
+ import { GitHubChatAgentId } from '../github-chat-agent.js';
25
+ import { ExploreAgentId } from '../explore-agent.js';
26
+ import { PR_REVIEW_CODEBASE_EXPLORATION_CAPABILITY_ID, PR_REVIEW_GITHUB_INFORMATION_CAPABILITY_ID, PR_REVIEW_LOCAL_CHECKOUT_CAPABILITY_ID, PR_REVIEW_LOCAL_VALIDATION_CAPABILITY_ID, PR_REVIEW_PENDING_GITHUB_REVIEW_CAPABILITY_ID } from './pr-review-prompt-template.js';
30
27
  let PRReviewCapabilityContribution = class PRReviewCapabilityContribution {
31
28
  onStart() {
32
29
  this.promptService.addBuiltInPromptFragment({
33
- id: pr_review_prompt_template_1.PR_REVIEW_GITHUB_INFORMATION_CAPABILITY_ID,
30
+ id: PR_REVIEW_GITHUB_INFORMATION_CAPABILITY_ID,
34
31
  template: this.buildGitHubInformationTemplate()
35
32
  });
36
33
  this.promptService.addBuiltInPromptFragment({
37
- id: pr_review_prompt_template_1.PR_REVIEW_LOCAL_CHECKOUT_CAPABILITY_ID,
34
+ id: PR_REVIEW_LOCAL_CHECKOUT_CAPABILITY_ID,
38
35
  template: this.buildLocalCheckoutTemplate()
39
36
  });
40
37
  this.promptService.addBuiltInPromptFragment({
41
- id: pr_review_prompt_template_1.PR_REVIEW_LOCAL_VALIDATION_CAPABILITY_ID,
38
+ id: PR_REVIEW_LOCAL_VALIDATION_CAPABILITY_ID,
42
39
  template: this.buildLocalValidationTemplate()
43
40
  });
44
41
  this.promptService.addBuiltInPromptFragment({
45
- id: pr_review_prompt_template_1.PR_REVIEW_CODEBASE_EXPLORATION_CAPABILITY_ID,
42
+ id: PR_REVIEW_CODEBASE_EXPLORATION_CAPABILITY_ID,
46
43
  template: this.buildCodebaseExplorationTemplate()
47
44
  });
48
45
  this.promptService.addBuiltInPromptFragment({
49
- id: pr_review_prompt_template_1.PR_REVIEW_PENDING_GITHUB_REVIEW_CAPABILITY_ID,
46
+ id: PR_REVIEW_PENDING_GITHUB_REVIEW_CAPABILITY_ID,
50
47
  template: this.buildPendingGitHubReviewTemplate()
51
48
  });
52
49
  }
53
50
  buildGitHubInformationTemplate() {
54
- const name = core_1.nls.localize('theia/ai/ide/prReview/capability/githubInfo/name', 'GH PR Info');
55
- const description = core_1.nls.localize('theia/ai/ide/prReview/capability/githubInfo/description', 'Delegates to the GitHub agent to retrieve pull request metadata, diffs, comments, checks, and linked issues.');
51
+ const name = nls.localize('theia/ai/ide/prReview/capability/githubInfo/name', 'GH PR Info');
52
+ const description = nls.localize('theia/ai/ide/prReview/capability/githubInfo/description', 'Delegates to the GitHub agent to retrieve pull request metadata, diffs, comments, checks, and linked issues.');
56
53
  return `---
57
54
  name: ${name}
58
55
  description: ${description}
@@ -61,7 +58,7 @@ description: ${description}
61
58
 
62
59
  **GH PR Info is ENABLED.** Use it to retrieve complete pull request information through delegation to the GitHub agent.
63
60
 
64
- Use ~{${ai_core_1.AGENT_DELEGATION_FUNCTION_ID}} with agent ID '${github_chat_agent_1.GitHubChatAgentId}' for every GitHub read.
61
+ Use ~{${AGENT_DELEGATION_FUNCTION_ID}} with agent ID '${GitHubChatAgentId}' for every GitHub read.
65
62
 
66
63
  Ask the GitHub agent to retrieve:
67
64
  - PR title, description, author, source branch, target branch, head SHA, state, and URL
@@ -82,8 +79,8 @@ Completeness is critical. Every review comment and every changed file must be in
82
79
  \`\`\``;
83
80
  }
84
81
  buildLocalCheckoutTemplate() {
85
- const name = core_1.nls.localizeByDefault('Checkout');
86
- const description = core_1.nls.localize('theia/ai/ide/prReview/capability/localCheckout/description', 'Checks out the pull request locally and protects existing worktree changes.');
82
+ const name = nls.localizeByDefault('Checkout');
83
+ const description = nls.localize('theia/ai/ide/prReview/capability/localCheckout/description', 'Checks out the pull request locally and protects existing worktree changes.');
87
84
  return `---
88
85
  name: ${name}
89
86
  description: ${description}
@@ -94,12 +91,12 @@ description: ${description}
94
91
 
95
92
  ### Available tools
96
93
 
97
- - ~{${shell_execution_server_1.SHELL_EXECUTION_FUNCTION_ID}} - run git and fallback shell commands for checkout, cleanup, merge-base lookup, and target-branch line lookup.
94
+ - ~{${SHELL_EXECUTION_FUNCTION_ID}} - run git and fallback shell commands for checkout, cleanup, merge-base lookup, and target-branch line lookup.
98
95
  - Use this shell access only for current-branch PR number inference, checkout, cleanup, merge-base lookup, and target-branch line lookup.
99
96
 
100
97
  ### Checkout workflow
101
98
 
102
- Before modifying the working tree, inform the user via ~{${user_interaction_tool_1.USER_INTERACTION_FUNCTION_ID}} (single-step, options "Proceed" and "Abort") that you need to switch branches and may stash uncommitted changes.
99
+ Before modifying the working tree, inform the user via ~{${USER_INTERACTION_FUNCTION_ID}} (single-step, options "Proceed" and "Abort") that you need to switch branches and may stash uncommitted changes.
103
100
 
104
101
  Create the review plan only after this checkout workflow is complete. This avoids creating a plan, stashing it, and popping it again just to switch branches.
105
102
 
@@ -117,8 +114,8 @@ Store these values for the review plan and cleanup:
117
114
  - Merge base SHA`;
118
115
  }
119
116
  buildLocalValidationTemplate() {
120
- const name = core_1.nls.localize('theia/ai/ide/prReview/capability/localValidation/name', 'Build');
121
- const description = core_1.nls.localize('theia/ai/ide/prReview/capability/localValidation/description', 'Runs local install, build, lint, test, or comparable validation tasks for the pull request.');
117
+ const name = nls.localizeByDefault('Build');
118
+ const description = nls.localize('theia/ai/ide/prReview/capability/localValidation/description', 'Runs local install, build, lint, test, or comparable validation tasks for the pull request.');
122
119
  return `---
123
120
  name: ${name}
124
121
  description: ${description}
@@ -129,15 +126,15 @@ description: ${description}
129
126
 
130
127
  ### Available tools
131
128
 
132
- - ~{${shell_execution_server_1.SHELL_EXECUTION_FUNCTION_ID}} - run fallback shell commands when no suitable task exists
133
- - ~{${workspace_functions_1.LIST_TASKS_FUNCTION_ID}} - list available workspace tasks
134
- - ~{${workspace_functions_1.RUN_TASK_FUNCTION_ID}} - run install, build, lint, or test tasks when available
129
+ - ~{${SHELL_EXECUTION_FUNCTION_ID}} - run fallback shell commands when no suitable task exists
130
+ - ~{${LIST_TASKS_FUNCTION_ID}} - list available workspace tasks
131
+ - ~{${RUN_TASK_FUNCTION_ID}} - run install, build, lint, or test tasks when available
135
132
 
136
133
  ### Build and validation workflow
137
134
 
138
- 1. Use ~{${workspace_functions_1.LIST_TASKS_FUNCTION_ID}} to check whether install/build/test/lint tasks exist.
139
- 2. Prefer ~{${workspace_functions_1.RUN_TASK_FUNCTION_ID}} for task-backed validation.
140
- 3. Use ~{${shell_execution_server_1.SHELL_EXECUTION_FUNCTION_ID}} only when no suitable task exists or task execution fails in a way that requires a fallback command.
135
+ 1. Use ~{${LIST_TASKS_FUNCTION_ID}} to check whether install/build/test/lint tasks exist.
136
+ 2. Prefer ~{${RUN_TASK_FUNCTION_ID}} for task-backed validation.
137
+ 3. Use ~{${SHELL_EXECUTION_FUNCTION_ID}} only when no suitable task exists or task execution fails in a way that requires a fallback command.
141
138
  4. If dependencies are missing, identify the correct install task or command before building.
142
139
  5. Build the project or run the closest available validation for the changed area.
143
140
  6. If validation fails, record the failure as a critical finding and continue the review.
@@ -146,8 +143,8 @@ Store this value for the review plan:
146
143
  - Build/validation status`;
147
144
  }
148
145
  buildCodebaseExplorationTemplate() {
149
- const name = core_1.nls.localize('theia/ai/ide/prReview/capability/codebaseExploration/name', 'Delegated Exploration');
150
- const description = core_1.nls.localize('theia/ai/ide/prReview/capability/codebaseExploration/description', 'Delegates focused architecture, usage, convention, and tests exploration to the Explore agent. When disabled, the PR reviewer explores with its own tools.');
146
+ const name = nls.localize('theia/ai/ide/prReview/capability/codebaseExploration/name', 'Delegated Exploration');
147
+ const description = nls.localize('theia/ai/ide/prReview/capability/codebaseExploration/description', 'Delegates focused architecture, usage, convention, and tests exploration to the Explore agent. When disabled, the PR reviewer explores with its own tools.');
151
148
  return `---
152
149
  name: ${name}
153
150
  description: ${description}
@@ -156,7 +153,7 @@ description: ${description}
156
153
 
157
154
  **Delegated Exploration is ENABLED.** Delegate broad exploration to the Explore agent before performing the detailed review yourself. If this capability is disabled, perform the exploration yourself with your file, diagnostics, and workspace search tools.
158
155
 
159
- Use ~{${ai_core_1.AGENT_DELEGATION_FUNCTION_ID}} with agent ID '${explore_agent_1.ExploreAgentId}' to investigate:
156
+ Use ~{${AGENT_DELEGATION_FUNCTION_ID}} with agent ID '${ExploreAgentId}' to investigate:
160
157
  - The architecture relevant to the changed files
161
158
  - Related files that might be affected by the changes
162
159
  - Existing patterns and conventions in the modified areas
@@ -179,8 +176,8 @@ Example delegation prompts:
179
176
  \`\`\``;
180
177
  }
181
178
  buildPendingGitHubReviewTemplate() {
182
- const name = core_1.nls.localize('theia/ai/ide/prReview/capability/pendingGitHubReview/name', 'Pending GH Review');
183
- const description = core_1.nls.localize('theia/ai/ide/prReview/capability/pendingGitHubReview/description', 'Delegates to the GitHub agent to create or update a pending pull request review with prepared inline comments after explicit user confirmation.');
179
+ const name = nls.localize('theia/ai/ide/prReview/capability/pendingGitHubReview/name', 'Pending GH Review');
180
+ const description = nls.localize('theia/ai/ide/prReview/capability/pendingGitHubReview/description', 'Delegates to the GitHub agent to create or update a pending pull request review with prepared inline comments after explicit user confirmation.');
184
181
  return `---
185
182
  name: ${name}
186
183
  description: ${description}
@@ -189,7 +186,7 @@ description: ${description}
189
186
 
190
187
  **Pending GH Review is ENABLED.** Use it to create or update a pending GitHub review through delegation to the GitHub agent, only after the prepared comments are stored in the review plan and the user explicitly chooses to create the pending review.
191
188
 
192
- Use ~{${ai_core_1.AGENT_DELEGATION_FUNCTION_ID}} with agent ID '${github_chat_agent_1.GitHubChatAgentId}' for every GitHub write.
189
+ Use ~{${AGENT_DELEGATION_FUNCTION_ID}} with agent ID '${GitHubChatAgentId}' for every GitHub write.
193
190
 
194
191
  When the user chooses to create the pending review:
195
192
  1. Read the "Prepared GitHub Review Comments" section from the review plan.
@@ -202,12 +199,11 @@ When the user chooses to create the pending review:
202
199
  Tell the user that the pending review is only visible to them until they submit it in the GitHub UI, and that they can edit the comments there before submission.`;
203
200
  }
204
201
  };
205
- exports.PRReviewCapabilityContribution = PRReviewCapabilityContribution;
206
- tslib_1.__decorate([
207
- (0, inversify_1.inject)(ai_core_1.PromptService),
208
- tslib_1.__metadata("design:type", Object)
202
+ __decorate([
203
+ inject(PromptService)
209
204
  ], PRReviewCapabilityContribution.prototype, "promptService", void 0);
210
- exports.PRReviewCapabilityContribution = PRReviewCapabilityContribution = tslib_1.__decorate([
211
- (0, inversify_1.injectable)()
205
+ PRReviewCapabilityContribution = __decorate([
206
+ injectable()
212
207
  ], PRReviewCapabilityContribution);
208
+ export { PRReviewCapabilityContribution };
213
209
  //# sourceMappingURL=pr-review-capability-contribution.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pr-review-capability-contribution.js","sourceRoot":"","sources":["../../../src/browser/review/pr-review-capability-contribution.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;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wEAA8B;AAGpB;IADlB,IAAA,kBAAM,EAAC,uBAAa,CAAC;;qEAC0B;yCAHvC,8BAA8B;IAD1C,IAAA,sBAAU,GAAE;GACA,8BAA8B,CAiM1C"}
1
+ {"version":3,"file":"pr-review-capability-contribution.js","sourceRoot":"","sources":["../../../src/browser/review/pr-review-capability-contribution.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;AAEhF,OAAO,EAAE,4BAA4B,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE7E,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,2BAA2B,EAAE,MAAM,sDAAsD,CAAC;AACnG,OAAO,EACH,sBAAsB,EACtB,oBAAoB,EACvB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EACH,4CAA4C,EAC5C,0CAA0C,EAC1C,sCAAsC,EACtC,wCAAwC,EACxC,6CAA6C,EAChD,MAAM,gCAAgC,CAAC;AAGjC,IAAM,8BAA8B,GAApC,MAAM,8BAA8B;IAKvC,OAAO;QACH,IAAI,CAAC,aAAa,CAAC,wBAAwB,CAAC;YACxC,EAAE,EAAE,0CAA0C;YAC9C,QAAQ,EAAE,IAAI,CAAC,8BAA8B,EAAE;SAClD,CAAC,CAAC;QACH,IAAI,CAAC,aAAa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AC,QAAQ,CAAC,8DAA8D,EAC3F,6FAA6F,CAAC,CAAC;QAEnG,OAAO;QACP,IAAI;eACG,WAAW;;;;;;;;MAQpB,2BAA2B;MAC3B,sBAAsB;MACtB,oBAAoB;;;;WAIf,sBAAsB;cACnB,oBAAoB;WACvB,2BAA2B;;;;;;0BAMZ,CAAC;IACvB,CAAC;IAES,gCAAgC;QACtC,MAAM,IAAI,GAAG,GAAG,CAAC,QAAQ,CAAC,2DAA2D,EAAE,uBAAuB,CAAC,CAAC;QAChH,MAAM,WAAW,GAAG,GAAG,CAAC,QAAQ,CAAC,kEAAkE,EAC/F,4JAA4J,CAAC,CAAC;QAElK,OAAO;QACP,IAAI;eACG,WAAW;;;;;;QAMlB,4BAA4B,oBAAoB,cAAc;;;;;;;;;;;;;;;;;;;;OAoB/D,CAAC;IACJ,CAAC;IAES,gCAAgC;QACtC,MAAM,IAAI,GAAG,GAAG,CAAC,QAAQ,CAAC,2DAA2D,EAAE,mBAAmB,CAAC,CAAC;QAC5G,MAAM,WAAW,GAAG,GAAG,CAAC,QAAQ,CAAC,kEAAkE,EAC/F,iJAAiJ,CAAC,CAAC;QAEvJ,OAAO;QACP,IAAI;eACG,WAAW;;;;;;QAMlB,4BAA4B,oBAAoB,iBAAiB;;;;;;;;;;kKAUyF,CAAC;IAC/J,CAAC;CACJ,CAAA;AA9LsB;IADlB,MAAM,CAAC,aAAa,CAAC;qEAC0B;AAHvC,8BAA8B;IAD1C,UAAU,EAAE;GACA,8BAA8B,CAiM1C"}
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  /* eslint-disable max-len */
3
2
  // *****************************************************************************
4
3
  // Copyright (C) 2026 EclipseSource GmbH.
@@ -15,21 +14,19 @@
15
14
  //
16
15
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
17
16
  // *****************************************************************************
18
- Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.prReviewSystemPrompt = exports.PR_REVIEW_PENDING_GITHUB_REVIEW_CAPABILITY_ID = exports.PR_REVIEW_CODEBASE_EXPLORATION_CAPABILITY_ID = exports.PR_REVIEW_LOCAL_VALIDATION_CAPABILITY_ID = exports.PR_REVIEW_LOCAL_CHECKOUT_CAPABILITY_ID = exports.PR_REVIEW_GITHUB_INFORMATION_CAPABILITY_ID = exports.PR_REVIEW_SYSTEM_PROMPT_ID = void 0;
20
- const common_1 = require("@theia/ai-core/lib/common");
21
- const context_variables_1 = require("../../common/context-variables");
22
- const workspace_functions_1 = require("../../common/workspace-functions");
23
- const task_context_function_ids_1 = require("../../common/task-context-function-ids");
24
- const user_interaction_tool_1 = require("../../common/user-interaction-tool");
25
- exports.PR_REVIEW_SYSTEM_PROMPT_ID = 'pr-review-system';
26
- exports.PR_REVIEW_GITHUB_INFORMATION_CAPABILITY_ID = 'pr-review-github-information';
27
- exports.PR_REVIEW_LOCAL_CHECKOUT_CAPABILITY_ID = 'pr-review-local-checkout';
28
- exports.PR_REVIEW_LOCAL_VALIDATION_CAPABILITY_ID = 'pr-review-local-validation';
29
- exports.PR_REVIEW_CODEBASE_EXPLORATION_CAPABILITY_ID = 'pr-review-codebase-exploration';
30
- exports.PR_REVIEW_PENDING_GITHUB_REVIEW_CAPABILITY_ID = 'pr-review-pending-github-review';
31
- exports.prReviewSystemPrompt = {
32
- id: exports.PR_REVIEW_SYSTEM_PROMPT_ID,
17
+ import { AGENTS_MD_FILE_NAME, AGENTS_MD_PROMPT_FRAGMENT_ID } from '@theia/ai-core/lib/common';
18
+ import { CONTEXT_FILES_VARIABLE_ID, TASK_CONTEXT_SUMMARY_VARIABLE_ID } from '../../common/context-variables.js';
19
+ import { FILE_CONTENT_FUNCTION_ID, GET_FILE_DIAGNOSTICS_ID, SEARCH_IN_WORKSPACE_FUNCTION_ID } from '../../common/workspace-functions.js';
20
+ import { CREATE_TASK_CONTEXT_FUNCTION_ID, GET_TASK_CONTEXT_FUNCTION_ID, EDIT_TASK_CONTEXT_FUNCTION_ID, LIST_TASK_CONTEXTS_FUNCTION_ID, REWRITE_TASK_CONTEXT_FUNCTION_ID } from '../../common/task-context-function-ids.js';
21
+ import { USER_INTERACTION_FUNCTION_ID } from '../../common/user-interaction-tool.js';
22
+ export const PR_REVIEW_SYSTEM_PROMPT_ID = 'pr-review-system';
23
+ export const PR_REVIEW_GITHUB_INFORMATION_CAPABILITY_ID = 'pr-review-github-information';
24
+ export const PR_REVIEW_LOCAL_CHECKOUT_CAPABILITY_ID = 'pr-review-local-checkout';
25
+ export const PR_REVIEW_LOCAL_VALIDATION_CAPABILITY_ID = 'pr-review-local-validation';
26
+ export const PR_REVIEW_CODEBASE_EXPLORATION_CAPABILITY_ID = 'pr-review-codebase-exploration';
27
+ export const PR_REVIEW_PENDING_GITHUB_REVIEW_CAPABILITY_ID = 'pr-review-pending-github-review';
28
+ export const prReviewSystemPrompt = {
29
+ id: PR_REVIEW_SYSTEM_PROMPT_ID,
33
30
  template: `{{!-- This prompt is licensed under the MIT License (https://opensource.org/license/mit).
34
31
  Made improvements or adaptations to this prompt template? We'd love for you to share it with the community! Contribute back here:
35
32
  https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution --}}
@@ -44,32 +41,32 @@ Your job is twofold: **orient** the reviewer and **surface issues**. Orientation
44
41
 
45
42
  The sections below are configurable capabilities. A capability is enabled only when its section appears in this prompt. If a capability section is absent, treat that capability as disabled, skip the corresponding workflow phase, and record the limitation in the review plan. Some tools, such as shell execution and agent delegation, can appear in more than one capability; use them only for the work described by the enabled capability section.
46
43
 
47
- {{capability:${exports.PR_REVIEW_GITHUB_INFORMATION_CAPABILITY_ID} default on}}
44
+ {{capability:${PR_REVIEW_GITHUB_INFORMATION_CAPABILITY_ID} default on}}
48
45
 
49
- {{capability:${exports.PR_REVIEW_LOCAL_CHECKOUT_CAPABILITY_ID} default on}}
46
+ {{capability:${PR_REVIEW_LOCAL_CHECKOUT_CAPABILITY_ID} default on}}
50
47
 
51
- {{capability:${exports.PR_REVIEW_LOCAL_VALIDATION_CAPABILITY_ID} default on}}
48
+ {{capability:${PR_REVIEW_LOCAL_VALIDATION_CAPABILITY_ID} default on}}
52
49
 
53
- {{capability:${exports.PR_REVIEW_CODEBASE_EXPLORATION_CAPABILITY_ID} default on}}
50
+ {{capability:${PR_REVIEW_CODEBASE_EXPLORATION_CAPABILITY_ID} default on}}
54
51
 
55
- {{capability:${exports.PR_REVIEW_PENDING_GITHUB_REVIEW_CAPABILITY_ID} default on}}
52
+ {{capability:${PR_REVIEW_PENDING_GITHUB_REVIEW_CAPABILITY_ID} default on}}
56
53
 
57
54
  # Always Available Tools
58
55
 
59
56
  ## Code Review
60
- - ~{${workspace_functions_1.FILE_CONTENT_FUNCTION_ID}} - read file contents during detailed review
61
- - ~{${workspace_functions_1.GET_FILE_DIAGNOSTICS_ID}} - check lint/type errors for reviewed files
62
- - ~{${workspace_functions_1.SEARCH_IN_WORKSPACE_FUNCTION_ID}} - search for narrowly scoped usages during detailed review
57
+ - ~{${FILE_CONTENT_FUNCTION_ID}} - read file contents during detailed review
58
+ - ~{${GET_FILE_DIAGNOSTICS_ID}} - check lint/type errors for reviewed files
59
+ - ~{${SEARCH_IN_WORKSPACE_FUNCTION_ID}} - search for narrowly scoped usages during detailed review
63
60
 
64
61
  ## Task Context Management
65
- - ~{${task_context_function_ids_1.CREATE_TASK_CONTEXT_FUNCTION_ID}} — create the review plan
66
- - ~{${task_context_function_ids_1.GET_TASK_CONTEXT_FUNCTION_ID}} — read the review plan
67
- - ~{${task_context_function_ids_1.EDIT_TASK_CONTEXT_FUNCTION_ID}} — update the review plan (targeted replacement of specific sections)
68
- - ~{${task_context_function_ids_1.LIST_TASK_CONTEXTS_FUNCTION_ID}} — list all review plans for the current session
69
- - ~{${task_context_function_ids_1.REWRITE_TASK_CONTEXT_FUNCTION_ID}} — rewrite the review plan entirely (use as fallback when edits fail)
62
+ - ~{${CREATE_TASK_CONTEXT_FUNCTION_ID}} — create the review plan
63
+ - ~{${GET_TASK_CONTEXT_FUNCTION_ID}} — read the review plan
64
+ - ~{${EDIT_TASK_CONTEXT_FUNCTION_ID}} — update the review plan (targeted replacement of specific sections)
65
+ - ~{${LIST_TASK_CONTEXTS_FUNCTION_ID}} — list all review plans for the current session
66
+ - ~{${REWRITE_TASK_CONTEXT_FUNCTION_ID}} — rewrite the review plan entirely (use as fallback when edits fail)
70
67
 
71
68
  ## User Interaction
72
- - ~{${user_interaction_tool_1.USER_INTERACTION_FUNCTION_ID}} — present findings to the user. See the tool description for behavior and return shape; this prompt only describes the PR-review specifics on top of it.
69
+ - ~{${USER_INTERACTION_FUNCTION_ID}} — present findings to the user. See the tool description for behavior and return shape; this prompt only describes the PR-review specifics on top of it.
73
70
 
74
71
  # Critical Rules
75
72
 
@@ -105,7 +102,7 @@ Never batch all updates to the end. The user should see the plan evolve in real-
105
102
 
106
103
  ## Review Comment Style
107
104
 
108
- These rules apply to **inline comment text written into the GitHub review** (Phase 8 and Phase 9). They do **not** apply to the user walkthrough messages — there you may use emojis (🔴 / 🟡 / 🔵 / 💡) for criticality and substantiate claims with the link/diff mechanic of ~{${user_interaction_tool_1.USER_INTERACTION_FUNCTION_ID}}.
105
+ These rules apply to **inline comment text written into the GitHub review** (Phase 8 and Phase 9). They do **not** apply to the user walkthrough messages — there you may use emojis (🔴 / 🟡 / 🔵 / 💡) for criticality and substantiate claims with the link/diff mechanic of ~{${USER_INTERACTION_FUNCTION_ID}}.
109
106
 
110
107
  - Write like a human maintainer, not an AI. Short, direct, slightly informal.
111
108
  - **Never** use em dashes. Use commas, periods, or parentheses instead.
@@ -209,19 +206,19 @@ If Build is disabled, update "Build Status" with "Skipped because Build is disab
209
206
 
210
207
  Use the "Local Code Source" field before exploring local code:
211
208
  - If it is a checked-out PR branch or the current workspace and Delegated Exploration is enabled, follow that capability and delegate focused exploration.
212
- - If it is a checked-out PR branch or the current workspace and Delegated Exploration is disabled, perform the same focused exploration yourself with ~{${workspace_functions_1.FILE_CONTENT_FUNCTION_ID}}, ~{${workspace_functions_1.GET_FILE_DIAGNOSTICS_ID}}, and ~{${workspace_functions_1.SEARCH_IN_WORKSPACE_FUNCTION_ID}}. Investigate architecture, related consumers, conventions, and tests for the changed areas. Disabling delegation does **not** mean skipping exploration.
209
+ - If it is a checked-out PR branch or the current workspace and Delegated Exploration is disabled, perform the same focused exploration yourself with ~{${FILE_CONTENT_FUNCTION_ID}}, ~{${GET_FILE_DIAGNOSTICS_ID}}, and ~{${SEARCH_IN_WORKSPACE_FUNCTION_ID}}. Investigate architecture, related consumers, conventions, and tests for the changed areas. Disabling delegation does **not** mean skipping exploration.
213
210
  - If there is no local source, continue with GitHub PR information or user-provided diffs when they are sufficient, and record that local exploration was skipped. Ask the user only if the available remote/user-provided information is insufficient for review or if they requested local exploration specifically.
214
211
 
215
- After receiving delegated exploration findings or completing self exploration, use ~{${task_context_function_ids_1.EDIT_TASK_CONTEXT_FUNCTION_ID}} to fill in the "Exploration Findings" section. If local exploration was skipped, record the reason and the review limitation there.
212
+ After receiving delegated exploration findings or completing self exploration, use ~{${EDIT_TASK_CONTEXT_FUNCTION_ID}} to fill in the "Exploration Findings" section. If local exploration was skipped, record the reason and the review limitation there.
216
213
 
217
214
  ## Phase 6: Perform Code Review & Prepare Walkthrough
218
215
 
219
216
  Now you perform the detailed review yourself.
220
217
 
221
218
  If the Local Code Source is a checked-out PR branch or the current workspace, for each changed file:
222
- 1. Read the file with ~{${workspace_functions_1.FILE_CONTENT_FUNCTION_ID}}
223
- 2. Check diagnostics with ~{${workspace_functions_1.GET_FILE_DIAGNOSTICS_ID}}
224
- 3. Search for related usages with ~{${workspace_functions_1.SEARCH_IN_WORKSPACE_FUNCTION_ID}} as needed
219
+ 1. Read the file with ~{${FILE_CONTENT_FUNCTION_ID}}
220
+ 2. Check diagnostics with ~{${GET_FILE_DIAGNOSTICS_ID}}
221
+ 3. Search for related usages with ~{${SEARCH_IN_WORKSPACE_FUNCTION_ID}} as needed
225
222
 
226
223
  If there is no local source, review from GitHub PR information, user-provided diffs, and existing context. You may inspect local target-branch files only as background context, and only if you label that limitation in the review plan. If the changed files or diffs are missing, ask the user for the missing information before continuing.
227
224
 
@@ -236,7 +233,7 @@ Review with both goals in mind.
236
233
  **Second, surface issues (this drives the Findings):**
237
234
  - **Correctness:** Does the code do what it claims?
238
235
  - **Style consistency:** Does it follow existing patterns from the exploration findings (Phase 5)?
239
- - **Project guidelines:** Does it adhere to the rules in the project's \`${common_1.AGENTS_MD_FILE_NAME}\`, if the Project Context section lists one (e.g., coding conventions, preferred APIs, DI patterns)?
236
+ - **Project guidelines:** Does it adhere to the rules in the project's \`${AGENTS_MD_FILE_NAME}\`, if the Project Context section lists one (e.g., coding conventions, preferred APIs, DI patterns)?
240
237
  - **Potential bugs:** Race conditions, edge cases, error handling
241
238
  - **Missing tests:** Are behavior changes covered by tests?
242
239
  - **Security:** Any vulnerabilities introduced?
@@ -245,7 +242,7 @@ Cross-reference your findings with the exploration results from Phase 5 when ava
245
242
 
246
243
  ### Update the review plan with walkthrough content
247
244
 
248
- Use ~{${task_context_function_ids_1.EDIT_TASK_CONTEXT_FUNCTION_ID}} to write the complete walkthrough into the review plan:
245
+ Use ~{${EDIT_TASK_CONTEXT_FUNCTION_ID}} to write the complete walkthrough into the review plan:
249
246
 
250
247
  **Overview section:** Brief the reviewer. Cover the PR's purpose, the approach it took, its scope (number of areas and findings), and **where to focus** — the few changes that most deserve attention. Short paragraphs are allowed here; this is the one place where you explain rather than just point.
251
248
 
@@ -316,19 +313,19 @@ For renamed or moved files, use the old path on the left and the new path on the
316
313
  \`\`\`
317
314
  This also works for files that were both renamed and modified — the diff will show content changes alongside the path change.
318
315
 
319
- Build the **complete** list of walkthrough steps in advance and pass them in a **single** ~{${user_interaction_tool_1.USER_INTERACTION_FUNCTION_ID}} call. The tool description covers the request shape, the Next/Finish button, comments, and the return JSON.
316
+ Build the **complete** list of walkthrough steps in advance and pass them in a **single** ~{${USER_INTERACTION_FUNCTION_ID}} call. The tool description covers the request shape, the Next/Finish button, comments, and the return JSON.
320
317
 
321
318
  Do not set \`autoOpen: true\` on walkthrough links unless the user explicitly asks for files to open automatically. Links should be available for manual inspection without opening a large number of editors by default.
322
319
 
323
320
  ### Step 7a: Build the wizard
324
321
 
325
- 1. Read the review plan with ~{${task_context_function_ids_1.GET_TASK_CONTEXT_FUNCTION_ID}}.
322
+ 1. Read the review plan with ~{${GET_TASK_CONTEXT_FUNCTION_ID}}.
326
323
  2. Build the step list in plan order:
327
324
  - Prepend one "Overview" step.
328
325
  - For each area, emit **one step per finding** the area contains.
329
326
  - Additionally, emit a **highlight step** (informational, no vote) **only for noteworthy areas** — changes that genuinely warrant the reviewer's attention, such as core logic, high-risk code, or non-obvious design decisions. Do **not** emit a highlight step for routine or mechanical areas (trivial renames, import updates, formatting, mechanical refactors). Those stay visible in the plan's Highlights & Findings section but do not get their own walkthrough step.
330
327
  - A noteworthy area with findings gets both its highlight step (first) and its finding steps. A routine area with no findings produces no walkthrough step at all; it is considered covered by the Overview.
331
- 3. Call ~{${user_interaction_tool_1.USER_INTERACTION_FUNCTION_ID}} **once** with all steps in the \`interactions\` array.
328
+ 3. Call ~{${USER_INTERACTION_FUNCTION_ID}} **once** with all steps in the \`interactions\` array.
332
329
 
333
330
  **Message format rules** (apply to every step's \`message\`):
334
331
  - Keep finding-step messages **terse**: just enough context to vote. Overview and highlight steps may be slightly longer (a few short sentences) since their job is to orient, but never a wall of prose.
@@ -363,7 +360,7 @@ Step shape rules:
363
360
  ### Step 7b: Process the result
364
361
 
365
362
  After the wizard returns:
366
- 1. Use ~{${task_context_function_ids_1.EDIT_TASK_CONTEXT_FUNCTION_ID}} to update the review plan. Each step result maps to a finding (per-finding steps), an area (highlight steps), or the overview. Match by step \`title\` and update its status:
363
+ 1. Use ~{${EDIT_TASK_CONTEXT_FUNCTION_ID}} to update the review plan. Each step result maps to a finding (per-finding steps), an area (highlight steps), or the overview. Match by step \`title\` and update its status:
367
364
  - \`value === "confirm"\` → ✅ Confirmed (per-finding step)
368
365
  - \`value === "reject"\` → ❌ Rejected (per-finding step)
369
366
  - \`value === undefined\` and the step had no options → ✅ Reviewed (overview or area highlight). For a highlight step on an area that also has findings, leave the findings' own statuses intact and only record any comments as area notes.
@@ -402,7 +399,7 @@ If there are no confirmed findings, update the section to "No GitHub review comm
402
399
 
403
400
  ### Step 8a: Ask How To Proceed
404
401
 
405
- Once the prepared comments are stored in the review plan, call ~{${user_interaction_tool_1.USER_INTERACTION_FUNCTION_ID}} with a **single-step** wizard:
402
+ Once the prepared comments are stored in the review plan, call ~{${USER_INTERACTION_FUNCTION_ID}} with a **single-step** wizard:
406
403
  - \`title\`: "Prepared Review Comments"
407
404
  - \`message\`: Markdown summary of prepared comments. Explain that a GitHub review created by this workflow is **pending**, visible only to the user, and can be edited in the GitHub UI before the user submits it.
408
405
  - If pending GitHub review is enabled and all comments to publish are marked "Ready", use \`options\`: \`[{"text": "Guide me through the prepared comments first", "buttonLabel": "Review comments", "value": "guide"}, {"text": "Create the pending review on GitHub now", "buttonLabel": "Create pending review", "value": "submit"}, {"text": "Keep the review plan only", "buttonLabel": "Keep plan only", "value": "cancel"}]\`
@@ -415,7 +412,7 @@ Once the prepared comments are stored in the review plan, call ~{${user_interact
415
412
 
416
413
  ### Step 8b: Guide Through Final Comments
417
414
 
418
- Use ~{${user_interaction_tool_1.USER_INTERACTION_FUNCTION_ID}} with one step per prepared review comment:
415
+ Use ~{${USER_INTERACTION_FUNCTION_ID}} with one step per prepared review comment:
419
416
  - \`title\`: "[Area] — [Finding headline]"
420
417
  - \`message\`: The exact comment text plus exact location.
421
418
  - \`options\`: \`[{"text": "Keep this comment in the pending review", "buttonLabel": "Keep comment", "value": "keep"}, {"text": "Drop this comment from the pending review", "buttonLabel": "Drop comment", "value": "drop"}]\`
@@ -437,7 +434,7 @@ After successful creation, update the prepared comment statuses to "Added to pen
437
434
 
438
435
  ## Phase 10: Cleanup
439
436
 
440
- If Checkout was enabled and recorded an original branch, ask the user whether to restore their original working tree state before switching branches. Use ~{${user_interaction_tool_1.USER_INTERACTION_FUNCTION_ID}} with a **single-step** wizard:
437
+ If Checkout was enabled and recorded an original branch, ask the user whether to restore their original working tree state before switching branches. Use ~{${USER_INTERACTION_FUNCTION_ID}} with a **single-step** wizard:
441
438
  - \`title\`: "Restore Workspace"
442
439
  - \`message\`: Explain that the PR review is complete and that restoring will switch back to the original branch. Mention that staying on the PR branch keeps the workspace available for inspection.
443
440
  - \`options\`: \`[{"text": "Restore the original branch and any stashed user changes now", "buttonLabel": "Restore workspace", "value": "restore"}, {"text": "Stay on the PR branch so I can keep inspecting it", "buttonLabel": "Stay on PR branch", "value": "stay"}]\`
@@ -458,7 +455,7 @@ If any cleanup step fails, inform the user with the exact commands they can run
458
455
 
459
456
  # User Interaction Rules
460
457
 
461
- Use ~{${user_interaction_tool_1.USER_INTERACTION_FUNCTION_ID}} whenever you need the user to make a choice or walk through pre-determined items. Beyond what the tool description already covers, follow these PR-review specifics:
458
+ Use ~{${USER_INTERACTION_FUNCTION_ID}} whenever you need the user to make a choice or walk through pre-determined items. Beyond what the tool description already covers, follow these PR-review specifics:
462
459
  - Always provide a meaningful **title** and a detailed markdown **message** for every step.
463
460
  - Add **links** for any file or diff the step references. Do not auto-open links unless the user explicitly opted into that behavior.
464
461
  - Batch all known steps into a single \`interactions\` array to avoid per-step round trips.
@@ -469,10 +466,10 @@ Use ~{${user_interaction_tool_1.USER_INTERACTION_FUNCTION_ID}} whenever you need
469
466
  When encountering failures, handle them gracefully instead of stopping:
470
467
 
471
468
  - **GitHub agent delegation fails** (e.g., authentication error, missing configuration, rate limit): Inform the user that the GitHub integration is unavailable with the specific error. Suggest they check their GitHub agent configuration and authentication. Do NOT retry indefinitely — after 2 failed attempts, present the error and ask the user how to proceed.
472
- - **Explore agent delegation fails**: Fall back to using ~{${workspace_functions_1.FILE_CONTENT_FUNCTION_ID}} and ~{${workspace_functions_1.SEARCH_IN_WORKSPACE_FUNCTION_ID}} directly for lightweight exploration. Note in the review plan that exploration was limited.
469
+ - **Explore agent delegation fails**: Fall back to using ~{${FILE_CONTENT_FUNCTION_ID}} and ~{${SEARCH_IN_WORKSPACE_FUNCTION_ID}} directly for lightweight exploration. Note in the review plan that exploration was limited.
473
470
  - **\`gh\` CLI not available during Checkout**: Fall back to raw git commands. If git operations also fail, inform the user and ask them to check out the PR branch manually, then continue after checkout is complete.
474
471
  - **Build fails**: Record the failure as a critical finding in the review plan. Continue with the review — the code is still reviewable even if it does not build. Note which findings may be related to the build failure.
475
- - **Task context edit fails repeatedly**: Use ~{${task_context_function_ids_1.REWRITE_TASK_CONTEXT_FUNCTION_ID}} as a fallback to replace the entire review plan content.
472
+ - **Task context edit fails repeatedly**: Use ~{${REWRITE_TASK_CONTEXT_FUNCTION_ID}} as a fallback to replace the entire review plan content.
476
473
  - **Shell command fails**: Read the error output carefully. If it is a transient issue (e.g., network timeout), retry once. If it is a permanent issue (e.g., command not found), fall back to an alternative approach or inform the user.
477
474
 
478
475
  # Diagrams
@@ -481,11 +478,11 @@ Where a Mermaid diagram is genuinely useful, use one, for example to explain arc
481
478
 
482
479
  # Context
483
480
 
484
- {{${context_variables_1.CONTEXT_FILES_VARIABLE_ID}}}
481
+ {{${CONTEXT_FILES_VARIABLE_ID}}}
485
482
 
486
- {{prompt:${common_1.AGENTS_MD_PROMPT_FRAGMENT_ID}}}
483
+ {{prompt:${AGENTS_MD_PROMPT_FRAGMENT_ID}}}
487
484
 
488
- {{${context_variables_1.TASK_CONTEXT_SUMMARY_VARIABLE_ID}}}
485
+ {{${TASK_CONTEXT_SUMMARY_VARIABLE_ID}}}
489
486
  `
490
487
  };
491
488
  //# sourceMappingURL=pr-review-prompt-template.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pr-review-prompt-template.js","sourceRoot":"","sources":["../../../src/browser/review/pr-review-prompt-template.ts"],"names":[],"mappings":";AAAA,4BAA4B;AAC5B,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;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4B;;;;;;iCAMzF,wDAA4B;;;;;;YAMjD,oDAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAmC7B,yDAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mEAuC2B,oDAA4B;;;;;;;;;;;;;QAavF,oDAA4B;;;;;;;;;;;;;;;;;;;;;;8JAsB0H,oDAA4B;;;;;;;;;;;;;;;;;;;;;QAqBlL,oDAA4B;;;;;;;;;;;6DAWyB,8CAAwB,WAAW,qDAA+B;;;kDAG7E,4DAAgC;;;;;;;;;IAS9E,6CAAyB;;WAElB,qCAA4B;;IAEnC,oDAAgC;CACnC;CACA,CAAC"}
1
+ {"version":3,"file":"pr-review-prompt-template.js","sourceRoot":"","sources":["../../../src/browser/review/pr-review-prompt-template.ts"],"names":[],"mappings":"AAAA,4BAA4B;AAC5B,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAEhF,OAAO,EAAE,mBAAmB,EAAE,4BAA4B,EAAsB,MAAM,2BAA2B,CAAC;AAClH,OAAO,EAAE,yBAAyB,EAAE,gCAAgC,EAAE,MAAM,mCAAmC,CAAC;AAChH,OAAO,EACH,wBAAwB,EACxB,uBAAuB,EACvB,+BAA+B,EAClC,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EACH,+BAA+B,EAC/B,4BAA4B,EAC5B,6BAA6B,EAC7B,8BAA8B,EAC9B,gCAAgC,EACnC,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AAErF,MAAM,CAAC,MAAM,0BAA0B,GAAG,kBAAkB,CAAC;AAC7D,MAAM,CAAC,MAAM,0CAA0C,GAAG,8BAA8B,CAAC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8JAsB0H,4BAA4B;;;;;;;;;;;;;;;;;;;;;QAqBlL,4BAA4B;;;;;;;;;;;6DAWyB,wBAAwB,WAAW,+BAA+B;;;kDAG7E,gCAAgC;;;;;;;;;IAS9E,yBAAyB;;WAElB,4BAA4B;;IAEnC,gCAAgC;CACnC;CACA,CAAC"}
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  // *****************************************************************************
3
2
  // Copyright (C) 2025 EclipseSource GmbH.
4
3
  //
@@ -14,14 +13,12 @@
14
13
  //
15
14
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
15
  // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.ShellExecutionCapabilityContribution = void 0;
19
- const tslib_1 = require("tslib");
20
- const inversify_1 = require("@theia/core/shared/inversify");
21
- const common_1 = require("@theia/ai-core/lib/common");
22
- const shell_execution_server_1 = require("@theia/ai-terminal/lib/common/shell-execution-server");
23
- const workspace_functions_1 = require("../common/workspace-functions");
24
- const core_1 = require("@theia/core");
16
+ import { __decorate } from "tslib";
17
+ import { inject, injectable } from '@theia/core/shared/inversify';
18
+ import { PromptService } from '@theia/ai-core/lib/common';
19
+ import { SHELL_EXECUTION_FUNCTION_ID } from '@theia/ai-terminal/lib/common/shell-execution-server';
20
+ import { LIST_TASKS_FUNCTION_ID, RUN_TASK_FUNCTION_ID } from '../common/workspace-functions.js';
21
+ import { nls } from '@theia/core';
25
22
  let ShellExecutionCapabilityContribution = class ShellExecutionCapabilityContribution {
26
23
  onStart() {
27
24
  this.promptService.addBuiltInPromptFragment({
@@ -30,8 +27,8 @@ let ShellExecutionCapabilityContribution = class ShellExecutionCapabilityContrib
30
27
  });
31
28
  }
32
29
  buildTemplate() {
33
- const label = core_1.nls.localize('theia/ai/ide/shellExecutionCapability/name', 'Shell Execution');
34
- const description = core_1.nls.localize('theia/ai/ide/shellExecutionCapability/description', 'Allows the agent to run arbitrary shell commands on the host system. The agent can then delegate to execute scripts \
30
+ const label = nls.localize('theia/ai/ide/shellExecutionCapability/name', 'Shell Execution');
31
+ const description = nls.localize('theia/ai/ide/shellExecutionCapability/description', 'Allows the agent to run arbitrary shell commands on the host system. The agent can then delegate to execute scripts \
35
32
  that are not available as tasks, query system information, and perform operations for which no dedicated tool exists.');
36
33
  return `---
37
34
  name: ${label}
@@ -39,17 +36,17 @@ description: ${description}
39
36
  ---
40
37
  ## Shell Execution
41
38
 
42
- You have access to the ~{${shell_execution_server_1.SHELL_EXECUTION_FUNCTION_ID}} tool, which lets you run arbitrary shell commands on the host system and capture their output.
39
+ You have access to the ~{${SHELL_EXECUTION_FUNCTION_ID}} tool, which lets you run arbitrary shell commands on the host system and capture their output.
43
40
 
44
41
  ### When to use shell execution
45
42
 
46
- Use ~{${shell_execution_server_1.SHELL_EXECUTION_FUNCTION_ID}} **only when no better-suited tool exists** for the task:
43
+ Use ~{${SHELL_EXECUTION_FUNCTION_ID}} **only when no better-suited tool exists** for the task:
47
44
 
48
45
  - **Prefer tasks over shell execution** for compiling, building, linting, testing, or any operation that has a corresponding workspace task. \
49
- Always check available tasks with ~{${workspace_functions_1.LIST_TASKS_FUNCTION_ID}} first and run them with ~{${workspace_functions_1.RUN_TASK_FUNCTION_ID}} instead of invoking the build tool directly.
46
+ Always check available tasks with ~{${LIST_TASKS_FUNCTION_ID}} first and run them with ~{${RUN_TASK_FUNCTION_ID}} instead of invoking the build tool directly.
50
47
  - **Prefer dedicated tools** for file reading, searching, or editing — use the file and search tools provided rather than \`cat\`, \`grep\`, or \`sed\` for workspace files.
51
48
 
52
- Appropriate use cases for ~{${shell_execution_server_1.SHELL_EXECUTION_FUNCTION_ID}}:
49
+ Appropriate use cases for ~{${SHELL_EXECUTION_FUNCTION_ID}}:
53
50
  - Running a command for which no workspace task exists (e.g., a one-off script, \`git\` operations, installing a dependency)
54
51
  - Efficient bulk operations that are impractical with the file editing tools (e.g., \`sed\`/\`awk\` for mass search-and-replace across many files)
55
52
  - Querying system or environment information (e.g., checking installed tool versions, environment variables)
@@ -62,12 +59,11 @@ Appropriate use cases for ~{${shell_execution_server_1.SHELL_EXECUTION_FUNCTION_
62
59
  - Output is truncated for large results; use filters (\`grep\`, \`head\`, \`tail\`) to keep output focused.`;
63
60
  }
64
61
  };
65
- exports.ShellExecutionCapabilityContribution = ShellExecutionCapabilityContribution;
66
- tslib_1.__decorate([
67
- (0, inversify_1.inject)(common_1.PromptService),
68
- tslib_1.__metadata("design:type", Object)
62
+ __decorate([
63
+ inject(PromptService)
69
64
  ], ShellExecutionCapabilityContribution.prototype, "promptService", void 0);
70
- exports.ShellExecutionCapabilityContribution = ShellExecutionCapabilityContribution = tslib_1.__decorate([
71
- (0, inversify_1.injectable)()
65
+ ShellExecutionCapabilityContribution = __decorate([
66
+ injectable()
72
67
  ], ShellExecutionCapabilityContribution);
68
+ export { ShellExecutionCapabilityContribution };
73
69
  //# sourceMappingURL=shell-execution-capability-contribution.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"shell-execution-capability-contribution.js","sourceRoot":"","sources":["../../src/browser/shell-execution-capability-contribution.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAGhF,4DAAkE;AAClE,sDAA0D;AAC1D,iGAAmG;AACnG,uEAA6F;AAC7F,sCAAkC;AAG3B,IAAM,oCAAoC,GAA1C,MAAM,oCAAoC;IAK7C,OAAO;QACH,IAAI,CAAC,aAAa,CAAC,wBAAwB,CAAC;YACxC,EAAE,EAAE,iBAAiB;YACrB,QAAQ,EAAE,IAAI,CAAC,aAAa,EAAE;SACjC,CAAC,CAAC;IACP,CAAC;IAES,aAAa;QACnB,MAAM,KAAK,GAAG,UAAG,CAAC,QAAQ,CAAC,4CAA4C,EAAE,iBAAiB,CAAC,CAAC;QAC5F,MAAM,WAAW,GAAG,UAAG,CAAC,QAAQ,CAAC,mDAAmD,EAChF;kIACsH,CAAC,CAAC;QAE5H,OAAO;QACP,KAAK;eACE,WAAW;;;;2BAIC,oDAA2B;;;;QAI9C,oDAA2B;;;sCAGG,4CAAsB,+BAA+B,0CAAoB;;;8BAGjF,oDAA2B;;;;;;;;;;4GAUmD,CAAC;IACzG,CAAC;CACJ,CAAA;AA9CY,oFAAoC;AAG1B;IADlB,IAAA,kBAAM,EAAC,sBAAa,CAAC;;2EAC0B;+CAHvC,oCAAoC;IADhD,IAAA,sBAAU,GAAE;GACA,oCAAoC,CA8ChD"}
1
+ {"version":3,"file":"shell-execution-capability-contribution.js","sourceRoot":"","sources":["../../src/browser/shell-execution-capability-contribution.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;AAGhF,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,sDAAsD,CAAC;AACnG,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAChG,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAG3B,IAAM,oCAAoC,GAA1C,MAAM,oCAAoC;IAK7C,OAAO;QACH,IAAI,CAAC,aAAa,CAAC,wBAAwB,CAAC;YACxC,EAAE,EAAE,iBAAiB;YACrB,QAAQ,EAAE,IAAI,CAAC,aAAa,EAAE;SACjC,CAAC,CAAC;IACP,CAAC;IAES,aAAa;QACnB,MAAM,KAAK,GAAG,GAAG,CAAC,QAAQ,CAAC,4CAA4C,EAAE,iBAAiB,CAAC,CAAC;QAC5F,MAAM,WAAW,GAAG,GAAG,CAAC,QAAQ,CAAC,mDAAmD,EAChF;kIACsH,CAAC,CAAC;QAE5H,OAAO;QACP,KAAK;eACE,WAAW;;;;2BAIC,2BAA2B;;;;QAI9C,2BAA2B;;;sCAGG,sBAAsB,+BAA+B,oBAAoB;;;8BAGjF,2BAA2B;;;;;;;;;;4GAUmD,CAAC;IACzG,CAAC;CACJ,CAAA;AA3CsB;IADlB,MAAM,CAAC,aAAa,CAAC;2EAC0B;AAHvC,oCAAoC;IADhD,UAAU,EAAE;GACA,oCAAoC,CA8ChD"}