@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 @theia/file-header */
3
2
  // *****************************************************************************
4
3
  // Copyright (C) 2025 EclipseSource GmbH and others.
@@ -9,25 +8,20 @@
9
8
  //
10
9
  // SPDX-License-Identifier: MIT
11
10
  // *****************************************************************************
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.CODER_AGENT_MODE_NEXT_TEMPLATE_ID = exports.CODER_AGENT_MODE_TEMPLATE_ID = exports.CODER_EDIT_TEMPLATE_ID = exports.CODER_SYSTEM_PROMPT_ID = void 0;
14
- exports.getCoderAgentModePromptTemplate = getCoderAgentModePromptTemplate;
15
- exports.getCoderAgentModeNextPromptTemplate = getCoderAgentModeNextPromptTemplate;
16
- exports.getCoderPromptTemplateEdit = getCoderPromptTemplateEdit;
17
- const common_1 = require("@theia/ai-core/lib/common");
18
- const ai_chat_1 = require("@theia/ai-chat");
19
- const workspace_functions_1 = require("./workspace-functions");
20
- const todo_tool_1 = require("./todo-tool");
21
- const context_variables_1 = require("./context-variables");
22
- const context_functions_1 = require("./context-functions");
23
- const file_changeset_function_ids_1 = require("./file-changeset-function-ids");
24
- const task_context_function_ids_1 = require("./task-context-function-ids");
25
- const agent_ids_1 = require("./agent-ids");
26
- const open_editors_hint_fragment_id_1 = require("./open-editors-hint-fragment-id");
27
- exports.CODER_SYSTEM_PROMPT_ID = 'coder-system';
28
- exports.CODER_EDIT_TEMPLATE_ID = 'coder-system-edit';
29
- exports.CODER_AGENT_MODE_TEMPLATE_ID = 'coder-system-agent-mode';
30
- exports.CODER_AGENT_MODE_NEXT_TEMPLATE_ID = 'coder-system-agent-mode-next';
11
+ import { AGENT_DELEGATION_FUNCTION_ID, AGENTS_MD_PROMPT_FRAGMENT_ID } from '@theia/ai-core/lib/common';
12
+ import { CHANGE_SET_SUMMARY_VARIABLE_ID } from '@theia/ai-chat';
13
+ import { GET_WORKSPACE_FILE_LIST_FUNCTION_ID, FILE_CONTENT_FUNCTION_ID, GET_FILE_DIAGNOSTICS_ID, SEARCH_IN_WORKSPACE_FUNCTION_ID, FIND_FILES_BY_PATTERN_FUNCTION_ID, LIST_TASKS_FUNCTION_ID, RUN_TASK_FUNCTION_ID, LIST_LAUNCH_CONFIGURATIONS_FUNCTION_ID, RUN_LAUNCH_CONFIGURATION_FUNCTION_ID, STOP_LAUNCH_CONFIGURATION_FUNCTION_ID } from './workspace-functions.js';
14
+ import { TODO_WRITE_FUNCTION_ID } from './todo-tool.js';
15
+ import { CONTEXT_FILES_VARIABLE_ID, TASK_CONTEXT_SUMMARY_VARIABLE_ID } from './context-variables.js';
16
+ import { UPDATE_CONTEXT_FILES_FUNCTION_ID } from './context-functions.js';
17
+ import { SUGGEST_FILE_CONTENT_ID, WRITE_FILE_CONTENT_ID, SUGGEST_FILE_REPLACEMENTS_ID, WRITE_FILE_REPLACEMENTS_ID, CLEAR_FILE_CHANGES_ID, GET_PROPOSED_CHANGES_ID } from './file-changeset-function-ids.js';
18
+ import { GET_TASK_CONTEXT_FUNCTION_ID } from './task-context-function-ids.js';
19
+ import { ArchitectAgentId, ExploreAgentId } from './agent-ids.js';
20
+ import { OPEN_EDITORS_HINT_FRAGMENT_ID } from './open-editors-hint-fragment-id.js';
21
+ export const CODER_SYSTEM_PROMPT_ID = 'coder-system';
22
+ export const CODER_EDIT_TEMPLATE_ID = 'coder-system-edit';
23
+ export const CODER_AGENT_MODE_TEMPLATE_ID = 'coder-system-agent-mode';
24
+ export const CODER_AGENT_MODE_NEXT_TEMPLATE_ID = 'coder-system-agent-mode-next';
31
25
  function getCoderAgentModePromptTemplateContent() {
32
26
  return `{{!-- This prompt is licensed under the MIT License (https://opensource.org/license/mit).
33
27
  Made improvements or adaptations to this prompt template? We'd love for you to share it with the community! Contribute back here:
@@ -94,63 +88,63 @@ If you notice insecure code while working, fix it immediately.
94
88
  - File content or structure
95
89
  - Import paths or module names
96
90
  - Function signatures or API shapes
97
- - File paths (use ~{${workspace_functions_1.FIND_FILES_BY_PATTERN_FUNCTION_ID}} if uncertain)
91
+ - File paths (use ~{${FIND_FILES_BY_PATTERN_FUNCTION_ID}} if uncertain)
98
92
 
99
93
  ## Workspace Exploration
100
- - ~{${workspace_functions_1.GET_WORKSPACE_FILE_LIST_FUNCTION_ID}} — list contents of a specific directory
101
- - ~{${workspace_functions_1.FILE_CONTENT_FUNCTION_ID}} — retrieve the content of a file
102
- - ~{${workspace_functions_1.FIND_FILES_BY_PATTERN_FUNCTION_ID}} — find files matching glob patterns (e.g., \`**/*.ts\`)
103
- - ~{${workspace_functions_1.SEARCH_IN_WORKSPACE_FUNCTION_ID}} — locate references or patterns in the codebase
104
- - ~{${context_functions_1.UPDATE_CONTEXT_FILES_FUNCTION_ID}} — bookmark important files for repeated reference
94
+ - ~{${GET_WORKSPACE_FILE_LIST_FUNCTION_ID}} — list contents of a specific directory
95
+ - ~{${FILE_CONTENT_FUNCTION_ID}} — retrieve the content of a file
96
+ - ~{${FIND_FILES_BY_PATTERN_FUNCTION_ID}} — find files matching glob patterns (e.g., \`**/*.ts\`)
97
+ - ~{${SEARCH_IN_WORKSPACE_FUNCTION_ID}} — locate references or patterns in the codebase
98
+ - ~{${UPDATE_CONTEXT_FILES_FUNCTION_ID}} — bookmark important files for repeated reference
105
99
 
106
100
  ### Search Strategy
107
101
  Choose the right tool for the job:
108
- - **Known exact path** → use ~{${workspace_functions_1.FILE_CONTENT_FUNCTION_ID}} directly
109
- - **Known file pattern** (e.g., all \`*.ts\` files) → use ~{${workspace_functions_1.FIND_FILES_BY_PATTERN_FUNCTION_ID}}
110
- - **Looking for code/text content** → use ~{${workspace_functions_1.SEARCH_IN_WORKSPACE_FUNCTION_ID}}
111
- - **Exploring directory structure** → use ~{${workspace_functions_1.GET_WORKSPACE_FILE_LIST_FUNCTION_ID}}
102
+ - **Known exact path** → use ~{${FILE_CONTENT_FUNCTION_ID}} directly
103
+ - **Known file pattern** (e.g., all \`*.ts\` files) → use ~{${FIND_FILES_BY_PATTERN_FUNCTION_ID}}
104
+ - **Looking for code/text content** → use ~{${SEARCH_IN_WORKSPACE_FUNCTION_ID}}
105
+ - **Exploring directory structure** → use ~{${GET_WORKSPACE_FILE_LIST_FUNCTION_ID}}
112
106
  - **Never search for files whose paths you already know**
113
107
 
114
108
  ## Code Editing
115
109
 
116
110
  ### Critical Rule: Read Before Edit
117
- **Always retrieve file content using ~{${workspace_functions_1.FILE_CONTENT_FUNCTION_ID}} BEFORE making any edits.** Never modify files you haven't read in this session.
111
+ **Always retrieve file content using ~{${FILE_CONTENT_FUNCTION_ID}} BEFORE making any edits.** Never modify files you haven't read in this session.
118
112
 
119
113
  ### Editing Functions
120
- - ~{${file_changeset_function_ids_1.WRITE_FILE_REPLACEMENTS_ID}} — immediately apply targeted code changes (no user review)
121
- - ~{${file_changeset_function_ids_1.WRITE_FILE_CONTENT_ID}} — immediately overwrite a file with new content (no user review)
114
+ - ~{${WRITE_FILE_REPLACEMENTS_ID}} — immediately apply targeted code changes (no user review)
115
+ - ~{${WRITE_FILE_CONTENT_ID}} — immediately overwrite a file with new content (no user review)
122
116
 
123
117
  ### Editing Guidelines
124
- - For incremental changes, use multiple ~{${file_changeset_function_ids_1.WRITE_FILE_REPLACEMENTS_ID}} calls
125
- - If ~{${file_changeset_function_ids_1.WRITE_FILE_REPLACEMENTS_ID}} fails, the likely cause is non-unique \`oldContent\`. Re-read the file and include more surrounding context, \
126
- or switch to ~{${file_changeset_function_ids_1.WRITE_FILE_CONTENT_ID}}
118
+ - For incremental changes, use multiple ~{${WRITE_FILE_REPLACEMENTS_ID}} calls
119
+ - If ~{${WRITE_FILE_REPLACEMENTS_ID}} fails, the likely cause is non-unique \`oldContent\`. Re-read the file and include more surrounding context, \
120
+ or switch to ~{${WRITE_FILE_CONTENT_ID}}
127
121
  - **Do NOT add comments explaining what you changed or why**
128
122
 
129
123
  ## Validation
130
- - ~{${workspace_functions_1.GET_FILE_DIAGNOSTICS_ID}} — detect syntax, lint, or type errors
124
+ - ~{${GET_FILE_DIAGNOSTICS_ID}} — detect syntax, lint, or type errors
131
125
 
132
126
  ## Testing & Tasks
133
- - ~{${workspace_functions_1.LIST_TASKS_FUNCTION_ID}} — discover available test, lint, and build tasks
134
- - ~{${workspace_functions_1.RUN_TASK_FUNCTION_ID}} — execute linting, building, or test suites
127
+ - ~{${LIST_TASKS_FUNCTION_ID}} — discover available test, lint, and build tasks
128
+ - ~{${RUN_TASK_FUNCTION_ID}} — execute linting, building, or test suites
135
129
 
136
130
  ## Test Authoring
137
131
  If no relevant tests exist for your changes:
138
- - Find existing test patterns using ~{${workspace_functions_1.FIND_FILES_BY_PATTERN_FUNCTION_ID}} with \`**/*.spec.ts\` or \`**/*.test.ts\`
139
- - Create new test files using ~{${file_changeset_function_ids_1.WRITE_FILE_REPLACEMENTS_ID}} or ~{${file_changeset_function_ids_1.WRITE_FILE_CONTENT_ID}}
132
+ - Find existing test patterns using ~{${FIND_FILES_BY_PATTERN_FUNCTION_ID}} with \`**/*.spec.ts\` or \`**/*.test.ts\`
133
+ - Create new test files using ~{${WRITE_FILE_REPLACEMENTS_ID}} or ~{${WRITE_FILE_CONTENT_ID}}
140
134
  - Follow patterns from existing tests in the codebase
141
135
  - Ensure new tests validate the new behavior and prevent regressions
142
136
 
143
137
  ## Running Applications
144
138
  Running tasks will not return until a task is done. To launch an application so that the user \
145
139
  or an agent can test it or interact with it continuously, use launch configurations instead.
146
- - ~{${workspace_functions_1.LIST_LAUNCH_CONFIGURATIONS_FUNCTION_ID}} — list all available launch configs and their state (running or not)
147
- - ~{${workspace_functions_1.RUN_LAUNCH_CONFIGURATION_FUNCTION_ID}} — start a launch configuration (returns immediately, app runs in background)
148
- - ~{${workspace_functions_1.STOP_LAUNCH_CONFIGURATION_FUNCTION_ID}} — stop a running launch configuration
140
+ - ~{${LIST_LAUNCH_CONFIGURATIONS_FUNCTION_ID}} — list all available launch configs and their state (running or not)
141
+ - ~{${RUN_LAUNCH_CONFIGURATION_FUNCTION_ID}} — start a launch configuration (returns immediately, app runs in background)
142
+ - ~{${STOP_LAUNCH_CONFIGURATION_FUNCTION_ID}} — stop a running launch configuration
149
143
 
150
144
  Launch configurations are defined in \`.vscode/launch.json\`. If none exist or you need to inspect/modify them, read or create this file.
151
145
 
152
146
  ## Progress Tracking
153
- - ~{${todo_tool_1.TODO_WRITE_FUNCTION_ID}} — track task progress with a todo list visible to the user
147
+ - ~{${TODO_WRITE_FUNCTION_ID}} — track task progress with a todo list visible to the user
154
148
 
155
149
  Use the todo tool for complex multi-step tasks to:
156
150
  - Plan your approach before starting
@@ -170,14 +164,14 @@ Analyze the user input. Retrieve relevant files to understand the context and cl
170
164
 
171
165
  ## 2. Investigate
172
166
  Use directory listing, file retrieval, and search to gather all needed context.
173
- Bookmark files you'll reference multiple times with ~{${context_functions_1.UPDATE_CONTEXT_FILES_FUNCTION_ID}} — this is more efficient than re-reading repeatedly.
167
+ Bookmark files you'll reference multiple times with ~{${UPDATE_CONTEXT_FILES_FUNCTION_ID}} — this is more efficient than re-reading repeatedly.
174
168
 
175
169
  ## 3. Plan and Implement
176
170
  Develop a step-by-step strategy. Implement changes via tool calls.
177
171
  When referencing code locations, use the format \`file_path:line_number\` (e.g., \`src/utils.ts:42\`).
178
172
 
179
173
  ## 4. Validate
180
- First discover available tasks with ~{${workspace_functions_1.LIST_TASKS_FUNCTION_ID}}, then run them with ~{${workspace_functions_1.RUN_TASK_FUNCTION_ID}}:
174
+ First discover available tasks with ~{${LIST_TASKS_FUNCTION_ID}}, then run them with ~{${RUN_TASK_FUNCTION_ID}}:
181
175
  - If issues are found, fix ALL errors before re-running (not one at a time)
182
176
  - Continue until validation passes
183
177
 
@@ -206,8 +200,8 @@ When encountering failures:
206
200
 
207
201
  **Common failure patterns:**
208
202
  - **Replacement "not found"**: Re-read the file first (content may have changed), then adjust \`oldContent\` to include more context
209
- - **File not found**: Verify the path exists using ~{${workspace_functions_1.FIND_FILES_BY_PATTERN_FUNCTION_ID}}
210
- - **Task not found**: Use ~{${workspace_functions_1.LIST_TASKS_FUNCTION_ID}} to discover available task names
203
+ - **File not found**: Verify the path exists using ~{${FIND_FILES_BY_PATTERN_FUNCTION_ID}}
204
+ - **Task not found**: Use ~{${LIST_TASKS_FUNCTION_ID}} to discover available task names
211
205
 
212
206
  # When to Seek Clarification
213
207
 
@@ -234,17 +228,17 @@ Do NOT ask for confirmation on:
234
228
 
235
229
  ## Provided Files
236
230
  The following files have been provided for additional context. Some may be referred to by the user (e.g., "this file" or "the attachment"). \
237
- Always retrieve relevant files using ~{${workspace_functions_1.FILE_CONTENT_FUNCTION_ID}} to understand your task.
238
- {{${context_variables_1.CONTEXT_FILES_VARIABLE_ID}}}
231
+ Always retrieve relevant files using ~{${FILE_CONTENT_FUNCTION_ID}} to understand your task.
232
+ {{${CONTEXT_FILES_VARIABLE_ID}}}
239
233
 
240
234
  ## Previously Changed Files
241
235
  {{changeSetSummary}}
242
236
 
243
- {{prompt:${common_1.AGENTS_MD_PROMPT_FRAGMENT_ID}}}
237
+ {{prompt:${AGENTS_MD_PROMPT_FRAGMENT_ID}}}
244
238
 
245
- {{prompt:${open_editors_hint_fragment_id_1.OPEN_EDITORS_HINT_FRAGMENT_ID}}}
239
+ {{prompt:${OPEN_EDITORS_HINT_FRAGMENT_ID}}}
246
240
 
247
- {{${context_variables_1.TASK_CONTEXT_SUMMARY_VARIABLE_ID}}}
241
+ {{${TASK_CONTEXT_SUMMARY_VARIABLE_ID}}}
248
242
 
249
243
  # Final Instruction
250
244
 
@@ -309,16 +303,16 @@ cut only if the user explicitly says so.
309
303
 
310
304
  ## Agent Delegation
311
305
 
312
- Delegate to a sub-agent with ~{${common_1.AGENT_DELEGATION_FUNCTION_ID}}. Two sub-agents are available:
306
+ Delegate to a sub-agent with ~{${AGENT_DELEGATION_FUNCTION_ID}}. Two sub-agents are available:
313
307
 
314
- - **Architect** (\`agentId: "${agent_ids_1.ArchitectAgentId}"\`) — explores AND produces a structured implementation plan.
308
+ - **Architect** (\`agentId: "${ArchitectAgentId}"\`) — explores AND produces a structured implementation plan.
315
309
  Use when "what should I change?" is itself an open question.
316
- - **Explore** (\`agentId: "${agent_ids_1.ExploreAgentId}"\`) — gathers and consolidates facts only.
310
+ - **Explore** (\`agentId: "${ExploreAgentId}"\`) — gathers and consolidates facts only.
317
311
  Use when the design is clear but you need to map call sites, data flow, or patterns across files.
318
312
 
319
313
  **They have no access to your conversation history** — include the user's goal, your specific question, and any relevant files in every delegation prompt.
320
314
 
321
- When Architect returns a \`taskContextId\`, call ~{${task_context_function_ids_1.GET_TASK_CONTEXT_FUNCTION_ID}} to read the plan and use it as your roadmap.
315
+ When Architect returns a \`taskContextId\`, call ~{${GET_TASK_CONTEXT_FUNCTION_ID}} to read the plan and use it as your roadmap.
322
316
  Re-read it before resuming after a pause — the user may have edited it. Treat Explore reports as facts to act on, not as plans.
323
317
 
324
318
  ### Choose Where to Look
@@ -344,18 +338,18 @@ Vague prompts produce slow reports.
344
338
 
345
339
  ## Workspace Exploration
346
340
 
347
- ~{${workspace_functions_1.GET_WORKSPACE_FILE_LIST_FUNCTION_ID}}, ~{${workspace_functions_1.FILE_CONTENT_FUNCTION_ID}}, ~{${workspace_functions_1.FIND_FILES_BY_PATTERN_FUNCTION_ID}},
348
- ~{${workspace_functions_1.SEARCH_IN_WORKSPACE_FUNCTION_ID}}, ~{${context_functions_1.UPDATE_CONTEXT_FILES_FUNCTION_ID}}.
341
+ ~{${GET_WORKSPACE_FILE_LIST_FUNCTION_ID}}, ~{${FILE_CONTENT_FUNCTION_ID}}, ~{${FIND_FILES_BY_PATTERN_FUNCTION_ID}},
342
+ ~{${SEARCH_IN_WORKSPACE_FUNCTION_ID}}, ~{${UPDATE_CONTEXT_FILES_FUNCTION_ID}}.
349
343
 
350
344
  Each tool's own description covers when to prefer it over the others — trust it. Don't search for paths you already know.
351
345
 
352
346
  ## Code Editing
353
347
 
354
- ~{${file_changeset_function_ids_1.WRITE_FILE_REPLACEMENTS_ID}} (preferred, targeted), ~{${file_changeset_function_ids_1.WRITE_FILE_CONTENT_ID}} (full overwrite — for new files or after replacements fail).
348
+ ~{${WRITE_FILE_REPLACEMENTS_ID}} (preferred, targeted), ~{${WRITE_FILE_CONTENT_ID}} (full overwrite — for new files or after replacements fail).
355
349
 
356
350
  ### Critical Rule: Read Before Edit
357
351
 
358
- **Always read a file with ~{${workspace_functions_1.FILE_CONTENT_FUNCTION_ID}} before editing it.** Do NOT add comments explaining what or why you changed.
352
+ **Always read a file with ~{${FILE_CONTENT_FUNCTION_ID}} before editing it.** Do NOT add comments explaining what or why you changed.
359
353
 
360
354
  Order changes to keep the build valid at each step: add new code before callers use it; update consumers before removing the old API;
361
355
  add imports before using new symbols.
@@ -366,23 +360,23 @@ When changing a function signature, exported type, constant, or import path, fin
366
360
 
367
361
  ## Validation & Testing
368
362
 
369
- ~{${workspace_functions_1.GET_FILE_DIAGNOSTICS_ID}} (fast, single file) during implementation; ~{${workspace_functions_1.LIST_TASKS_FUNCTION_ID}} / ~{${workspace_functions_1.RUN_TASK_FUNCTION_ID}} for build, lint,
363
+ ~{${GET_FILE_DIAGNOSTICS_ID}} (fast, single file) during implementation; ~{${LIST_TASKS_FUNCTION_ID}} / ~{${RUN_TASK_FUNCTION_ID}} for build, lint,
370
364
  and test tasks. If no tests exist for your changes, follow existing patterns from \`**/*.spec.ts\` / \`**/*.test.ts\`. New tests must validate the new behavior.
371
365
 
372
366
  ## Running Applications
373
367
 
374
- For continuously running apps (UI/E2E): use ~{${workspace_functions_1.LIST_LAUNCH_CONFIGURATIONS_FUNCTION_ID}}, ~{${workspace_functions_1.RUN_LAUNCH_CONFIGURATION_FUNCTION_ID}},
375
- ~{${workspace_functions_1.STOP_LAUNCH_CONFIGURATION_FUNCTION_ID}} (defined in \`.vscode/launch.json\`). \
376
- ~{${workspace_functions_1.RUN_TASK_FUNCTION_ID}} blocks until done and is unsuitable for long-running processes.
368
+ For continuously running apps (UI/E2E): use ~{${LIST_LAUNCH_CONFIGURATIONS_FUNCTION_ID}}, ~{${RUN_LAUNCH_CONFIGURATION_FUNCTION_ID}},
369
+ ~{${STOP_LAUNCH_CONFIGURATION_FUNCTION_ID}} (defined in \`.vscode/launch.json\`). \
370
+ ~{${RUN_TASK_FUNCTION_ID}} blocks until done and is unsuitable for long-running processes.
377
371
 
378
372
  ## Progress Tracking
379
373
 
380
- ~{${todo_tool_1.TODO_WRITE_FUNCTION_ID}} — see the tool's own description for when and how to use it.
374
+ ~{${TODO_WRITE_FUNCTION_ID}} — see the tool's own description for when and how to use it.
381
375
 
382
376
  ## Task Context
383
- - ~{${task_context_function_ids_1.GET_TASK_CONTEXT_FUNCTION_ID}} — read the task contexts (implementation plans) for this session, whether created earlier or attached by the user
377
+ - ~{${GET_TASK_CONTEXT_FUNCTION_ID}} — read the task contexts (implementation plans) for this session, whether created earlier or attached by the user
384
378
 
385
- **Before creating your own plan or todo list, call ~{${task_context_function_ids_1.GET_TASK_CONTEXT_FUNCTION_ID}} to check whether a task context already exists.**
379
+ **Before creating your own plan or todo list, call ~{${GET_TASK_CONTEXT_FUNCTION_ID}} to check whether a task context already exists.**
386
380
  If one matches the current task, trust it and implement it directly — do not re-explore from scratch.
387
381
  Deviate only if you find genuine issues (outdated assumptions, conflicts, unclear steps): explain before proceeding and summarize deviations at the end.
388
382
  If multiple task contexts are returned, identify the relevant ones by title and pass an explicit id to re-read a specific plan.
@@ -395,7 +389,7 @@ The user may edit a plan at any time — re-read it before resuming work and bef
395
389
  # Workflow
396
390
 
397
391
  ## Understand
398
- Analyze the user input and check for an existing task context with ~{${task_context_function_ids_1.GET_TASK_CONTEXT_FUNCTION_ID}} before planning or broad exploration.
392
+ Analyze the user input and check for an existing task context with ~{${GET_TASK_CONTEXT_FUNCTION_ID}} before planning or broad exploration.
399
393
  Decide Direct tools / Explore / Architect now (see Agent Delegation) — don't skip this on non-trivial tasks.
400
394
  If a task context matching the current task exists, trust it: skip broad exploration and proceed directly to implementation.
401
395
  Deviate only if you find genuine issues — explain before proceeding.
@@ -410,13 +404,13 @@ Tailor to task type:
410
404
  - **Feature** — find similar features as patterns, identify integration points, scan for existing utilities or dependencies that already do part of the work
411
405
  - **Refactor** — map all usages, understand dependency graph
412
406
 
413
- Bookmark frequently-referenced files with ~{${context_functions_1.UPDATE_CONTEXT_FILES_FUNCTION_ID}}.
407
+ Bookmark frequently-referenced files with ~{${UPDATE_CONTEXT_FILES_FUNCTION_ID}}.
414
408
 
415
409
  ## Plan and Implement
416
410
 
417
411
  Reference code as \`file_path:line_number\` (e.g., \`src/utils.ts:42\`). For 3+ files or steps, create a todo list now.
418
412
 
419
- If a task context is present, use ~{${workspace_functions_1.FILE_CONTENT_FUNCTION_ID}} only for files it names. Evaluate each step critically —
413
+ If a task context is present, use ~{${FILE_CONTENT_FUNCTION_ID}} only for files it names. Evaluate each step critically —
420
414
  if it introduces unnecessary complexity or has a simpler alternative, deviate and explain why. The plan is a starting point, not a mandate.
421
415
 
422
416
  ## Validate
@@ -444,7 +438,7 @@ Confirm: works as intended, tests pass, code quality OK, no security issues.
444
438
 
445
439
  ## Follow-Up Requests
446
440
 
447
- Re-read files before editing — they may have changed. If reverting, restore via ~{${file_changeset_function_ids_1.WRITE_FILE_CONTENT_ID}}. Re-run full validation.
441
+ Re-read files before editing — they may have changed. If reverting, restore via ~{${WRITE_FILE_CONTENT_ID}}. Re-run full validation.
448
442
  Treat each follow-up as a mini-task.
449
443
 
450
444
  # Output Format
@@ -471,15 +465,15 @@ Stop and reconsider when:
471
465
  - You're adding increasingly complex workarounds
472
466
  - The same test has failed 3+ times with different fixes
473
467
 
474
- When stuck, record in ~{${todo_tool_1.TODO_WRITE_FUNCTION_ID}}: what you tried, why it failed, what you'll try differently. Re-read the requirements.
468
+ When stuck, record in ~{${TODO_WRITE_FUNCTION_ID}}: what you tried, why it failed, what you'll try differently. Re-read the requirements.
475
469
  Consider a fundamentally different approach. If still blocked, ask the user.
476
470
 
477
- When abandoning a failed approach, restore the file to its original state via ~{${file_changeset_function_ids_1.WRITE_FILE_CONTENT_ID}} (using content you read earlier) —
471
+ When abandoning a failed approach, restore the file to its original state via ~{${WRITE_FILE_CONTENT_ID}} (using content you read earlier) —
478
472
  don't build on top of failed changes.
479
473
 
480
474
  ## Common Tool Failures
481
475
 
482
- - File not found → verify with ~{${workspace_functions_1.FIND_FILES_BY_PATTERN_FUNCTION_ID}}
476
+ - File not found → verify with ~{${FIND_FILES_BY_PATTERN_FUNCTION_ID}}
483
477
 
484
478
  # Seeking Clarification
485
479
 
@@ -516,17 +510,17 @@ and what you're doing next — and put them in the same message as the next tool
516
510
 
517
511
  ## Provided Files
518
512
  The following files have been provided for additional context. Some may be referred to by the user (e.g., "this file" or "the attachment").
519
- Always retrieve relevant files using ~{${workspace_functions_1.FILE_CONTENT_FUNCTION_ID}} to understand your task.
520
- {{${context_variables_1.CONTEXT_FILES_VARIABLE_ID}}}
513
+ Always retrieve relevant files using ~{${FILE_CONTENT_FUNCTION_ID}} to understand your task.
514
+ {{${CONTEXT_FILES_VARIABLE_ID}}}
521
515
 
522
516
  ## Previously Changed Files
523
- {{${ai_chat_1.CHANGE_SET_SUMMARY_VARIABLE_ID}}}
517
+ {{${CHANGE_SET_SUMMARY_VARIABLE_ID}}}
524
518
 
525
- {{prompt:${common_1.AGENTS_MD_PROMPT_FRAGMENT_ID}}}
519
+ {{prompt:${AGENTS_MD_PROMPT_FRAGMENT_ID}}}
526
520
 
527
- {{prompt:${open_editors_hint_fragment_id_1.OPEN_EDITORS_HINT_FRAGMENT_ID}}}
521
+ {{prompt:${OPEN_EDITORS_HINT_FRAGMENT_ID}}}
528
522
 
529
- {{${context_variables_1.TASK_CONTEXT_SUMMARY_VARIABLE_ID}}}
523
+ {{${TASK_CONTEXT_SUMMARY_VARIABLE_ID}}}
530
524
 
531
525
  # Final Instruction
532
526
 
@@ -543,18 +537,18 @@ End a turn early only when nothing can move without the user (see Seeking Clarif
543
537
  protected from you — then say what is blocking. This never overrides confirming risky or destructive actions before taking them.
544
538
  `;
545
539
  }
546
- function getCoderAgentModePromptTemplate() {
540
+ export function getCoderAgentModePromptTemplate() {
547
541
  return {
548
- id: exports.CODER_AGENT_MODE_TEMPLATE_ID,
542
+ id: CODER_AGENT_MODE_TEMPLATE_ID,
549
543
  template: getCoderAgentModePromptTemplateContent(),
550
- ...({ variantOf: exports.CODER_EDIT_TEMPLATE_ID }),
544
+ ...({ variantOf: CODER_EDIT_TEMPLATE_ID }),
551
545
  };
552
546
  }
553
- function getCoderAgentModeNextPromptTemplate() {
547
+ export function getCoderAgentModeNextPromptTemplate() {
554
548
  return {
555
- id: exports.CODER_AGENT_MODE_NEXT_TEMPLATE_ID,
549
+ id: CODER_AGENT_MODE_NEXT_TEMPLATE_ID,
556
550
  template: getCoderAgentModeNextPromptTemplateContent(),
557
- ...({ variantOf: exports.CODER_EDIT_TEMPLATE_ID }),
551
+ ...({ variantOf: CODER_EDIT_TEMPLATE_ID }),
558
552
  };
559
553
  }
560
554
  function getCoderEditPromptTemplate() {
@@ -566,15 +560,15 @@ which will be reviewed and accepted by the user.
566
560
 
567
561
  ## Context Retrieval
568
562
  Use the following functions to interact with the workspace files if you require context:
569
- - **~{${workspace_functions_1.GET_WORKSPACE_FILE_LIST_FUNCTION_ID}}**
570
- - **~{${workspace_functions_1.FILE_CONTENT_FUNCTION_ID}}**
571
- - **~{${workspace_functions_1.FIND_FILES_BY_PATTERN_FUNCTION_ID}}** (find files by glob patterns like '**/*.ts')
572
- - **~{${workspace_functions_1.SEARCH_IN_WORKSPACE_FUNCTION_ID}}**
563
+ - **~{${GET_WORKSPACE_FILE_LIST_FUNCTION_ID}}**
564
+ - **~{${FILE_CONTENT_FUNCTION_ID}}**
565
+ - **~{${FIND_FILES_BY_PATTERN_FUNCTION_ID}}** (find files by glob patterns like '**/*.ts')
566
+ - **~{${SEARCH_IN_WORKSPACE_FUNCTION_ID}}**
573
567
 
574
568
  If you cannot find good search terms, navigate the directory structure.
575
569
  **Confirm Paths**: Always verify paths by listing directories or files as you navigate. Avoid assumptions based on user input alone.
576
570
  **Navigate Step-by-Step**: Move into subdirectories only as needed, confirming each directory level.
577
- Remember file locations that are relevant for completing your tasks using **~{${context_functions_1.UPDATE_CONTEXT_FILES_FUNCTION_ID}}**
571
+ Remember file locations that are relevant for completing your tasks using **~{${UPDATE_CONTEXT_FILES_FUNCTION_ID}}**
578
572
  Only add files that are really relevant to look at later.
579
573
 
580
574
  ## Propose Code Changes
@@ -583,12 +577,12 @@ changes for.
583
577
  This also applies for newly created files!
584
578
 
585
579
  - **Always Retrieve Current Content**: Use getFileContent to get the original content of the target file.
586
- - **View Pending Changes**: Use ~{${file_changeset_function_ids_1.GET_PROPOSED_CHANGES_ID}} to see the current proposed state of a file, including all pending changes.
580
+ - **View Pending Changes**: Use ~{${GET_PROPOSED_CHANGES_ID}} to see the current proposed state of a file, including all pending changes.
587
581
  - **Change Content**: Use one of these methods to propose changes:
588
- - ~{${file_changeset_function_ids_1.SUGGEST_FILE_REPLACEMENTS_ID}}: For targeted replacements of specific text sections. Multiple calls will merge changes unless you set the reset parameter to true.
589
- - ~{${file_changeset_function_ids_1.SUGGEST_FILE_CONTENT_ID}}: For complete file rewrites when you need to replace the entire content.
590
- - If ~{${file_changeset_function_ids_1.SUGGEST_FILE_REPLACEMENTS_ID}} continuously fails use ~{${file_changeset_function_ids_1.SUGGEST_FILE_CONTENT_ID}}.
591
- - ~{${file_changeset_function_ids_1.CLEAR_FILE_CHANGES_ID}}: To clear all pending changes for a file and start fresh.
582
+ - ~{${SUGGEST_FILE_REPLACEMENTS_ID}}: For targeted replacements of specific text sections. Multiple calls will merge changes unless you set the reset parameter to true.
583
+ - ~{${SUGGEST_FILE_CONTENT_ID}}: For complete file rewrites when you need to replace the entire content.
584
+ - If ~{${SUGGEST_FILE_REPLACEMENTS_ID}} continuously fails use ~{${SUGGEST_FILE_CONTENT_ID}}.
585
+ - ~{${CLEAR_FILE_CHANGES_ID}}: To clear all pending changes for a file and start fresh.
592
586
 
593
587
  The changes will be presented as an applicable diff to the user in any case. The user can then accept or reject each change individually. Before you run tasks that depend on the \
594
588
  changes beeing applied, you must wait for the user to review and accept the changes!
@@ -597,13 +591,13 @@ changes beeing applied, you must wait for the user to review and accept the chan
597
591
 
598
592
  ## Tasks
599
593
 
600
- The user might want you to execute some task. You can find tasks using ~{${workspace_functions_1.LIST_TASKS_FUNCTION_ID}} and execute them using ~{${workspace_functions_1.RUN_TASK_FUNCTION_ID}}.
594
+ The user might want you to execute some task. You can find tasks using ~{${LIST_TASKS_FUNCTION_ID}} and execute them using ~{${RUN_TASK_FUNCTION_ID}}.
601
595
  Be aware that tasks operate on the workspace. If the user has not accepted any changes before, they will operate on the original states of files without your proposed changes.
602
596
  Never execute a task without confirming with the user whether this is wanted!
603
597
 
604
598
  ## File Validation
605
599
 
606
- Use the following function to retrieve a list of problems in a file if the user requests fixes in a given file: **~{${workspace_functions_1.GET_FILE_DIAGNOSTICS_ID}}**
600
+ Use the following function to retrieve a list of problems in a file if the user requests fixes in a given file: **~{${GET_FILE_DIAGNOSTICS_ID}}**
607
601
  Be aware this function operates on the workspace. If the user has not accepted any changes before, they will operate on the original states of files without your proposed changes.
608
602
 
609
603
  ## Diagrams
@@ -614,18 +608,18 @@ It is rendered directly in the chat. Keep diagrams small and focused. The chat h
614
608
  ## Additional Context
615
609
 
616
610
  The following files have been provided for additional context. Some of them may also be referred to by the user (e.g. "this file" or "the attachment"). \
617
- Always look at the relevant files to understand your task using the function ~{${workspace_functions_1.FILE_CONTENT_FUNCTION_ID}}
618
- {{${context_variables_1.CONTEXT_FILES_VARIABLE_ID}}}
611
+ Always look at the relevant files to understand your task using the function ~{${FILE_CONTENT_FUNCTION_ID}}
612
+ {{${CONTEXT_FILES_VARIABLE_ID}}}
619
613
 
620
614
  ## Previously Proposed Changes
621
615
  You have previously proposed changes for the following files. Some suggestions may have been accepted by the user, while others may still be pending.
622
- {{${ai_chat_1.CHANGE_SET_SUMMARY_VARIABLE_ID}}}
616
+ {{${CHANGE_SET_SUMMARY_VARIABLE_ID}}}
623
617
 
624
- {{prompt:${common_1.AGENTS_MD_PROMPT_FRAGMENT_ID}}}
618
+ {{prompt:${AGENTS_MD_PROMPT_FRAGMENT_ID}}}
625
619
 
626
- {{prompt:${open_editors_hint_fragment_id_1.OPEN_EDITORS_HINT_FRAGMENT_ID}}}
620
+ {{prompt:${OPEN_EDITORS_HINT_FRAGMENT_ID}}}
627
621
 
628
- {{${context_variables_1.TASK_CONTEXT_SUMMARY_VARIABLE_ID}}}
622
+ {{${TASK_CONTEXT_SUMMARY_VARIABLE_ID}}}
629
623
 
630
624
  ## Final Instruction
631
625
  - Your task is to propose changes to be reviewed by the user. Always do so using the functions described above.
@@ -634,9 +628,9 @@ You have previously proposed changes for the following files. Some suggestions m
634
628
  - Focus on the task that the user described
635
629
  `;
636
630
  }
637
- function getCoderPromptTemplateEdit() {
631
+ export function getCoderPromptTemplateEdit() {
638
632
  return {
639
- id: exports.CODER_EDIT_TEMPLATE_ID,
633
+ id: CODER_EDIT_TEMPLATE_ID,
640
634
  template: getCoderEditPromptTemplate()
641
635
  };
642
636
  }
@@ -1 +1 @@
1
- {"version":3,"file":"coder-replace-prompt-template.js","sourceRoot":"","sources":["../../src/common/coder-replace-prompt-template.ts"],"names":[],"mappings":"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"}
1
+ {"version":3,"file":"coder-replace-prompt-template.js","sourceRoot":"","sources":["../../src/common/coder-replace-prompt-template.ts"],"names":[],"mappings":"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"}
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  // *****************************************************************************
3
2
  // Copyright (C) 2024 EclipseSource GmbH.
4
3
  //
@@ -14,15 +13,13 @@
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.CommandChatAgent = void 0;
19
- const tslib_1 = require("tslib");
20
- const inversify_1 = require("@theia/core/shared/inversify");
21
- const chat_agents_1 = require("@theia/ai-chat/lib/common/chat-agents");
22
- const chat_model_1 = require("@theia/ai-chat/lib/common/chat-model");
23
- const core_1 = require("@theia/core");
24
- const command_prompt_template_1 = require("./command-prompt-template");
25
- let CommandChatAgent = class CommandChatAgent extends chat_agents_1.AbstractTextToModelParsingChatAgent {
16
+ import { __decorate } from "tslib";
17
+ import { inject, injectable, named } from '@theia/core/shared/inversify';
18
+ import { AbstractTextToModelParsingChatAgent, SystemMessageDescription } from '@theia/ai-chat/lib/common/chat-agents';
19
+ import { CommandChatResponseContentImpl, HorizontalLayoutChatResponseContentImpl, MarkdownChatResponseContentImpl, } from '@theia/ai-chat/lib/common/chat-model';
20
+ import { CommandRegistry, MessageService, generateUuid, nls, ILogger } from '@theia/core';
21
+ import { commandTemplate } from './command-prompt-template.js';
22
+ let CommandChatAgent = class CommandChatAgent extends AbstractTextToModelParsingChatAgent {
26
23
  constructor() {
27
24
  super(...arguments);
28
25
  this.id = 'Command';
@@ -33,12 +30,12 @@ let CommandChatAgent = class CommandChatAgent extends chat_agents_1.AbstractText
33
30
  }];
34
31
  this.iconClass = 'codicon codicon-server-process';
35
32
  this.defaultLanguageModelPurpose = 'command';
36
- this.description = core_1.nls.localize('theia/ai/ide/commandAgent/description', 'This agent is aware of all commands that the user can execute. ' +
33
+ this.description = nls.localize('theia/ai/ide/commandAgent/description', 'This agent is aware of all commands that the user can execute. ' +
37
34
  'Based on the user request, it can find the right command and then let the user execute it.');
38
- this.prompts = [command_prompt_template_1.commandTemplate];
35
+ this.prompts = [commandTemplate];
39
36
  this.agentSpecificVariables = [{
40
37
  name: 'command-ids',
41
- description: core_1.nls.localize('theia/ai/ide/commandAgent/vars/commandIds/description', 'The list of available commands.'),
38
+ description: nls.localize('theia/ai/ide/commandAgent/vars/commandIds/description', 'The list of available commands.'),
42
39
  usedInPrompt: true
43
40
  }];
44
41
  }
@@ -47,14 +44,14 @@ let CommandChatAgent = class CommandChatAgent extends chat_agents_1.AbstractText
47
44
  for (const command of this.commandRegistry.getAllCommands()) {
48
45
  knownCommands.push(`${command.id}: ${command.label}`);
49
46
  }
50
- const variantInfo = this.promptService.getPromptVariantInfo(command_prompt_template_1.commandTemplate.id);
51
- const systemPrompt = await this.promptService.getResolvedPromptFragment(command_prompt_template_1.commandTemplate.id, {
47
+ const variantInfo = this.promptService.getPromptVariantInfo(commandTemplate.id);
48
+ const systemPrompt = await this.promptService.getResolvedPromptFragment(commandTemplate.id, {
52
49
  'command-ids': knownCommands.join('\n')
53
50
  }, context);
54
51
  if (systemPrompt === undefined) {
55
52
  throw new Error('Couldn\'t get prompt ');
56
53
  }
57
- return chat_agents_1.SystemMessageDescription.fromResolvedPromptFragment(systemPrompt, variantInfo?.variantId, variantInfo?.isCustomized);
54
+ return SystemMessageDescription.fromResolvedPromptFragment(systemPrompt, variantInfo?.variantId, variantInfo?.isCustomized);
58
55
  }
59
56
  /**
60
57
  * @param text the text received from the language model
@@ -81,48 +78,45 @@ let CommandChatAgent = class CommandChatAgent extends chat_agents_1.AbstractText
81
78
  parsedCommand.arguments.length > 0
82
79
  ? parsedCommand.arguments
83
80
  : undefined;
84
- return new chat_model_1.HorizontalLayoutChatResponseContentImpl([
85
- new chat_model_1.MarkdownChatResponseContentImpl(core_1.nls.localize('theia/ai/ide/commandAgent/response/theiaCommand', 'I found this command that might help you:')),
86
- new chat_model_1.CommandChatResponseContentImpl(theiaCommand, undefined, args),
81
+ return new HorizontalLayoutChatResponseContentImpl([
82
+ new MarkdownChatResponseContentImpl(nls.localize('theia/ai/ide/commandAgent/response/theiaCommand', 'I found this command that might help you:')),
83
+ new CommandChatResponseContentImpl(theiaCommand, undefined, args),
87
84
  ]);
88
85
  }
89
86
  else if (parsedCommand.type === 'custom-handler') {
90
- const id = `ai-command-${(0, core_1.generateUuid)()}`;
87
+ const id = `ai-command-${generateUuid()}`;
91
88
  const commandArgs = parsedCommand.arguments !== undefined && parsedCommand.arguments.length > 0 ? parsedCommand.arguments : [];
92
89
  const args = [id, ...commandArgs];
93
90
  const customCallback = {
94
- label: core_1.nls.localize('theia/ai/ide/commandAgent/commandCallback/label', 'AI command'),
91
+ label: nls.localize('theia/ai/ide/commandAgent/commandCallback/label', 'AI command'),
95
92
  callback: () => this.commandCallback(...args),
96
93
  };
97
- return new chat_model_1.HorizontalLayoutChatResponseContentImpl([
98
- new chat_model_1.MarkdownChatResponseContentImpl(core_1.nls.localize('theia/ai/ide/commandAgent/response/customHandler', 'Try executing this:')),
99
- new chat_model_1.CommandChatResponseContentImpl(undefined, customCallback, args),
94
+ return new HorizontalLayoutChatResponseContentImpl([
95
+ new MarkdownChatResponseContentImpl(nls.localize('theia/ai/ide/commandAgent/response/customHandler', 'Try executing this:')),
96
+ new CommandChatResponseContentImpl(undefined, customCallback, args),
100
97
  ]);
101
98
  }
102
99
  else {
103
- return new chat_model_1.MarkdownChatResponseContentImpl(parsedCommand.message ?? core_1.nls.localize('theia/ai/ide/commandAgent/response/noCommand', 'Sorry, I can\'t find such a command'));
100
+ return new MarkdownChatResponseContentImpl(parsedCommand.message ?? nls.localize('theia/ai/ide/commandAgent/response/noCommand', 'Sorry, I can\'t find such a command'));
104
101
  }
105
102
  }
106
103
  async commandCallback(...commandArgs) {
107
- this.messageService.info(core_1.nls.localize('theia/ai/ide/commandAgent/commandCallback/message', 'Executing callback with args {0}. The first arg is the command id registered for the dynamically registered command. ' +
108
- 'The other args are the actual args for the handler.', commandArgs.join(', ')), core_1.nls.localize('theia/ai/ide/commandAgent/commandCallback/confirmAction', 'Got it'));
104
+ this.messageService.info(nls.localize('theia/ai/ide/commandAgent/commandCallback/message', 'Executing callback with args {0}. The first arg is the command id registered for the dynamically registered command. ' +
105
+ 'The other args are the actual args for the handler.', commandArgs.join(', ')), nls.localize('theia/ai/ide/commandAgent/commandCallback/confirmAction', 'Got it'));
109
106
  }
110
107
  };
111
- exports.CommandChatAgent = CommandChatAgent;
112
- tslib_1.__decorate([
113
- (0, inversify_1.inject)(core_1.CommandRegistry),
114
- tslib_1.__metadata("design:type", core_1.CommandRegistry)
108
+ __decorate([
109
+ inject(CommandRegistry)
115
110
  ], CommandChatAgent.prototype, "commandRegistry", void 0);
116
- tslib_1.__decorate([
117
- (0, inversify_1.inject)(core_1.MessageService),
118
- tslib_1.__metadata("design:type", core_1.MessageService)
111
+ __decorate([
112
+ inject(MessageService)
119
113
  ], CommandChatAgent.prototype, "messageService", void 0);
120
- tslib_1.__decorate([
121
- (0, inversify_1.inject)(core_1.ILogger),
122
- (0, inversify_1.named)('ai-ide:CommandChatAgent'),
123
- tslib_1.__metadata("design:type", Object)
114
+ __decorate([
115
+ inject(ILogger),
116
+ named('ai-ide:CommandChatAgent')
124
117
  ], CommandChatAgent.prototype, "logger", void 0);
125
- exports.CommandChatAgent = CommandChatAgent = tslib_1.__decorate([
126
- (0, inversify_1.injectable)()
118
+ CommandChatAgent = __decorate([
119
+ injectable()
127
120
  ], CommandChatAgent);
121
+ export { CommandChatAgent };
128
122
  //# sourceMappingURL=command-chat-agents.js.map