@theia/ai-ide 1.75.0-next.8 → 1.75.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 (509) hide show
  1. package/lib/browser/ai-allow-all-mode-chat-banner.js +2 -20
  2. package/lib/browser/ai-allow-all-mode-chat-banner.js.map +1 -1
  3. package/lib/browser/ai-configuration/agent-icon.d.ts +16 -0
  4. package/lib/browser/ai-configuration/agent-icon.d.ts.map +1 -0
  5. package/lib/browser/ai-configuration/agent-icon.js +38 -0
  6. package/lib/browser/ai-configuration/agent-icon.js.map +1 -0
  7. package/lib/browser/ai-configuration/ai-configuration-breadcrumbs-contribution.d.ts +36 -0
  8. package/lib/browser/ai-configuration/ai-configuration-breadcrumbs-contribution.d.ts.map +1 -0
  9. package/lib/browser/ai-configuration/ai-configuration-breadcrumbs-contribution.js +163 -0
  10. package/lib/browser/ai-configuration/ai-configuration-breadcrumbs-contribution.js.map +1 -0
  11. package/lib/browser/ai-configuration/ai-configuration-detail-widget.d.ts +50 -0
  12. package/lib/browser/ai-configuration/ai-configuration-detail-widget.d.ts.map +1 -0
  13. package/lib/browser/ai-configuration/ai-configuration-detail-widget.js +208 -0
  14. package/lib/browser/ai-configuration/ai-configuration-detail-widget.js.map +1 -0
  15. package/lib/browser/ai-configuration/ai-configuration-detail-widget.spec.d.ts +2 -0
  16. package/lib/browser/ai-configuration/ai-configuration-detail-widget.spec.d.ts.map +1 -0
  17. package/lib/browser/ai-configuration/ai-configuration-detail-widget.spec.js +139 -0
  18. package/lib/browser/ai-configuration/ai-configuration-detail-widget.spec.js.map +1 -0
  19. package/lib/browser/ai-configuration/ai-configuration-label-provider-contribution.d.ts +13 -0
  20. package/lib/browser/ai-configuration/ai-configuration-label-provider-contribution.d.ts.map +1 -0
  21. package/lib/browser/ai-configuration/ai-configuration-label-provider-contribution.js +48 -0
  22. package/lib/browser/ai-configuration/ai-configuration-label-provider-contribution.js.map +1 -0
  23. package/lib/browser/ai-configuration/ai-configuration-open-preference-renderer.d.ts +22 -0
  24. package/lib/browser/ai-configuration/ai-configuration-open-preference-renderer.d.ts.map +1 -0
  25. package/lib/browser/ai-configuration/ai-configuration-open-preference-renderer.js +72 -0
  26. package/lib/browser/ai-configuration/ai-configuration-open-preference-renderer.js.map +1 -0
  27. package/lib/browser/ai-configuration/ai-configuration-preference-ownership.spec.d.ts +2 -0
  28. package/lib/browser/ai-configuration/ai-configuration-preference-ownership.spec.d.ts.map +1 -0
  29. package/lib/browser/ai-configuration/ai-configuration-preference-ownership.spec.js +126 -0
  30. package/lib/browser/ai-configuration/ai-configuration-preference-ownership.spec.js.map +1 -0
  31. package/lib/browser/ai-configuration/ai-configuration-resource.d.ts +10 -0
  32. package/lib/browser/ai-configuration/ai-configuration-resource.d.ts.map +1 -0
  33. package/lib/browser/ai-configuration/{components/configuration-section.js → ai-configuration-resource.js} +11 -11
  34. package/lib/browser/ai-configuration/ai-configuration-resource.js.map +1 -0
  35. package/lib/browser/ai-configuration/ai-configuration-search-widget.d.ts +29 -0
  36. package/lib/browser/ai-configuration/ai-configuration-search-widget.d.ts.map +1 -0
  37. package/lib/browser/ai-configuration/ai-configuration-search-widget.js +106 -0
  38. package/lib/browser/ai-configuration/ai-configuration-search-widget.js.map +1 -0
  39. package/lib/browser/ai-configuration/ai-configuration-search.d.ts +18 -0
  40. package/lib/browser/ai-configuration/ai-configuration-search.d.ts.map +1 -0
  41. package/lib/browser/ai-configuration/ai-configuration-search.js +45 -0
  42. package/lib/browser/ai-configuration/ai-configuration-search.js.map +1 -0
  43. package/lib/browser/ai-configuration/ai-configuration-search.spec.d.ts +2 -0
  44. package/lib/browser/ai-configuration/ai-configuration-search.spec.d.ts.map +1 -0
  45. package/lib/browser/ai-configuration/ai-configuration-search.spec.js +79 -0
  46. package/lib/browser/ai-configuration/ai-configuration-search.spec.js.map +1 -0
  47. package/lib/browser/ai-configuration/ai-configuration-tree-model.d.ts +8 -0
  48. package/lib/browser/ai-configuration/ai-configuration-tree-model.d.ts.map +1 -0
  49. package/lib/browser/ai-configuration/{base/ai-configuration-base-widget.js → ai-configuration-tree-model.js} +11 -14
  50. package/lib/browser/ai-configuration/ai-configuration-tree-model.js.map +1 -0
  51. package/lib/browser/ai-configuration/ai-configuration-tree-nodes.d.ts +57 -0
  52. package/lib/browser/ai-configuration/ai-configuration-tree-nodes.d.ts.map +1 -0
  53. package/lib/browser/ai-configuration/ai-configuration-tree-nodes.js +134 -0
  54. package/lib/browser/ai-configuration/ai-configuration-tree-nodes.js.map +1 -0
  55. package/lib/browser/ai-configuration/ai-configuration-tree-nodes.spec.d.ts +2 -0
  56. package/lib/browser/ai-configuration/ai-configuration-tree-nodes.spec.d.ts.map +1 -0
  57. package/lib/browser/ai-configuration/ai-configuration-tree-nodes.spec.js +134 -0
  58. package/lib/browser/ai-configuration/ai-configuration-tree-nodes.spec.js.map +1 -0
  59. package/lib/browser/ai-configuration/ai-configuration-tree-widget.d.ts +96 -0
  60. package/lib/browser/ai-configuration/ai-configuration-tree-widget.d.ts.map +1 -0
  61. package/lib/browser/ai-configuration/ai-configuration-tree-widget.js +407 -0
  62. package/lib/browser/ai-configuration/ai-configuration-tree-widget.js.map +1 -0
  63. package/lib/browser/ai-configuration/ai-configuration-view-contribution.d.ts +38 -4
  64. package/lib/browser/ai-configuration/ai-configuration-view-contribution.d.ts.map +1 -1
  65. package/lib/browser/ai-configuration/ai-configuration-view-contribution.js +151 -19
  66. package/lib/browser/ai-configuration/ai-configuration-view-contribution.js.map +1 -1
  67. package/lib/browser/ai-configuration/ai-configuration-widget.d.ts +21 -23
  68. package/lib/browser/ai-configuration/ai-configuration-widget.d.ts.map +1 -1
  69. package/lib/browser/ai-configuration/ai-configuration-widget.js +102 -70
  70. package/lib/browser/ai-configuration/ai-configuration-widget.js.map +1 -1
  71. package/lib/browser/ai-configuration/categories/agent-capabilities-settings.d.ts +56 -0
  72. package/lib/browser/ai-configuration/categories/agent-capabilities-settings.d.ts.map +1 -0
  73. package/lib/browser/ai-configuration/categories/agent-capabilities-settings.js +195 -0
  74. package/lib/browser/ai-configuration/categories/agent-capabilities-settings.js.map +1 -0
  75. package/lib/browser/ai-configuration/categories/agent-capabilities-settings.spec.d.ts +2 -0
  76. package/lib/browser/ai-configuration/categories/agent-capabilities-settings.spec.d.ts.map +1 -0
  77. package/lib/browser/ai-configuration/categories/agent-capabilities-settings.spec.js +140 -0
  78. package/lib/browser/ai-configuration/categories/agent-capabilities-settings.spec.js.map +1 -0
  79. package/lib/browser/ai-configuration/categories/agent-chips.d.ts +15 -0
  80. package/lib/browser/ai-configuration/categories/agent-chips.d.ts.map +1 -0
  81. package/lib/browser/ai-configuration/categories/agent-chips.js +19 -0
  82. package/lib/browser/ai-configuration/categories/agent-chips.js.map +1 -0
  83. package/lib/browser/ai-configuration/categories/agent-detail-model.d.ts +37 -0
  84. package/lib/browser/ai-configuration/categories/agent-detail-model.d.ts.map +1 -0
  85. package/lib/browser/ai-configuration/categories/agent-detail-model.js +99 -0
  86. package/lib/browser/ai-configuration/categories/agent-detail-model.js.map +1 -0
  87. package/lib/browser/ai-configuration/categories/agent-detail-view.d.ts +28 -0
  88. package/lib/browser/ai-configuration/categories/agent-detail-view.d.ts.map +1 -0
  89. package/lib/browser/ai-configuration/categories/agent-detail-view.js +135 -0
  90. package/lib/browser/ai-configuration/categories/agent-detail-view.js.map +1 -0
  91. package/lib/browser/ai-configuration/categories/agents-configuration-category.d.ts +78 -0
  92. package/lib/browser/ai-configuration/categories/agents-configuration-category.d.ts.map +1 -0
  93. package/lib/browser/ai-configuration/categories/agents-configuration-category.js +352 -0
  94. package/lib/browser/ai-configuration/categories/agents-configuration-category.js.map +1 -0
  95. package/lib/browser/ai-configuration/categories/agents-configuration-category.spec.d.ts +2 -0
  96. package/lib/browser/ai-configuration/categories/agents-configuration-category.spec.d.ts.map +1 -0
  97. package/lib/browser/ai-configuration/categories/agents-configuration-category.spec.js +99 -0
  98. package/lib/browser/ai-configuration/categories/agents-configuration-category.spec.js.map +1 -0
  99. package/lib/browser/ai-configuration/categories/general-configuration-category.d.ts +93 -0
  100. package/lib/browser/ai-configuration/categories/general-configuration-category.d.ts.map +1 -0
  101. package/lib/browser/ai-configuration/categories/general-configuration-category.js +313 -0
  102. package/lib/browser/ai-configuration/categories/general-configuration-category.js.map +1 -0
  103. package/lib/browser/ai-configuration/categories/general-configuration-category.spec.d.ts +2 -0
  104. package/lib/browser/ai-configuration/categories/general-configuration-category.spec.d.ts.map +1 -0
  105. package/lib/browser/ai-configuration/categories/general-configuration-category.spec.js +213 -0
  106. package/lib/browser/ai-configuration/categories/general-configuration-category.spec.js.map +1 -0
  107. package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.d.ts +53 -0
  108. package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.d.ts.map +1 -0
  109. package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.js +241 -0
  110. package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.js.map +1 -0
  111. package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.spec.d.ts +2 -0
  112. package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.spec.d.ts.map +1 -0
  113. package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.spec.js +75 -0
  114. package/lib/browser/ai-configuration/categories/model-aliases-configuration-category.spec.js.map +1 -0
  115. package/lib/browser/ai-configuration/categories/models-configuration-category.d.ts +72 -0
  116. package/lib/browser/ai-configuration/categories/models-configuration-category.d.ts.map +1 -0
  117. package/lib/browser/ai-configuration/categories/models-configuration-category.js +227 -0
  118. package/lib/browser/ai-configuration/categories/models-configuration-category.js.map +1 -0
  119. package/lib/browser/ai-configuration/categories/models-configuration-category.spec.d.ts +2 -0
  120. package/lib/browser/ai-configuration/categories/models-configuration-category.spec.d.ts.map +1 -0
  121. package/lib/browser/ai-configuration/categories/models-configuration-category.spec.js +145 -0
  122. package/lib/browser/ai-configuration/categories/models-configuration-category.spec.js.map +1 -0
  123. package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.d.ts +114 -0
  124. package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.d.ts.map +1 -0
  125. package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.js +341 -0
  126. package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.js.map +1 -0
  127. package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.spec.d.ts +2 -0
  128. package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.spec.d.ts.map +1 -0
  129. package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.spec.js +199 -0
  130. package/lib/browser/ai-configuration/categories/prompt-snippets-configuration-category.spec.js.map +1 -0
  131. package/lib/browser/ai-configuration/categories/prompts-and-skills-configuration-category.d.ts +84 -0
  132. package/lib/browser/ai-configuration/categories/prompts-and-skills-configuration-category.d.ts.map +1 -0
  133. package/lib/browser/ai-configuration/categories/prompts-and-skills-configuration-category.js +341 -0
  134. package/lib/browser/ai-configuration/categories/prompts-and-skills-configuration-category.js.map +1 -0
  135. package/lib/browser/ai-configuration/categories/prompts-and-skills-configuration-category.spec.d.ts +2 -0
  136. package/lib/browser/ai-configuration/categories/prompts-and-skills-configuration-category.spec.d.ts.map +1 -0
  137. package/lib/browser/ai-configuration/categories/prompts-and-skills-configuration-category.spec.js +184 -0
  138. package/lib/browser/ai-configuration/categories/prompts-and-skills-configuration-category.spec.js.map +1 -0
  139. package/lib/browser/ai-configuration/categories/token-usage-configuration-category.d.ts +38 -0
  140. package/lib/browser/ai-configuration/categories/token-usage-configuration-category.d.ts.map +1 -0
  141. package/lib/browser/ai-configuration/categories/token-usage-configuration-category.js +130 -0
  142. package/lib/browser/ai-configuration/categories/token-usage-configuration-category.js.map +1 -0
  143. package/lib/browser/ai-configuration/categories/token-usage-configuration-category.spec.d.ts +2 -0
  144. package/lib/browser/ai-configuration/categories/token-usage-configuration-category.spec.d.ts.map +1 -0
  145. package/lib/browser/ai-configuration/categories/token-usage-configuration-category.spec.js +51 -0
  146. package/lib/browser/ai-configuration/categories/token-usage-configuration-category.spec.js.map +1 -0
  147. package/lib/browser/ai-configuration/categories/tools-configuration-category.d.ts +60 -0
  148. package/lib/browser/ai-configuration/categories/tools-configuration-category.d.ts.map +1 -0
  149. package/lib/browser/ai-configuration/categories/tools-configuration-category.js +302 -0
  150. package/lib/browser/ai-configuration/categories/tools-configuration-category.js.map +1 -0
  151. package/lib/browser/ai-configuration/categories/tools-configuration-category.spec.d.ts +2 -0
  152. package/lib/browser/ai-configuration/categories/tools-configuration-category.spec.d.ts.map +1 -0
  153. package/lib/browser/ai-configuration/categories/tools-configuration-category.spec.js +111 -0
  154. package/lib/browser/ai-configuration/categories/tools-configuration-category.spec.js.map +1 -0
  155. package/lib/browser/ai-configuration/categories/variables-configuration-category.d.ts +72 -0
  156. package/lib/browser/ai-configuration/categories/variables-configuration-category.d.ts.map +1 -0
  157. package/lib/browser/ai-configuration/categories/variables-configuration-category.js +245 -0
  158. package/lib/browser/ai-configuration/categories/variables-configuration-category.js.map +1 -0
  159. package/lib/browser/ai-configuration/categories/variables-configuration-category.spec.d.ts +2 -0
  160. package/lib/browser/ai-configuration/categories/variables-configuration-category.spec.d.ts.map +1 -0
  161. package/lib/browser/ai-configuration/categories/variables-configuration-category.spec.js +131 -0
  162. package/lib/browser/ai-configuration/categories/variables-configuration-category.spec.js.map +1 -0
  163. package/lib/browser/ai-configuration/components/agent-notification-settings.d.ts +6 -2
  164. package/lib/browser/ai-configuration/components/agent-notification-settings.d.ts.map +1 -1
  165. package/lib/browser/ai-configuration/components/agent-notification-settings.js +15 -21
  166. package/lib/browser/ai-configuration/components/agent-notification-settings.js.map +1 -1
  167. package/lib/browser/ai-configuration/language-model-renderer.d.ts +25 -1
  168. package/lib/browser/ai-configuration/language-model-renderer.d.ts.map +1 -1
  169. package/lib/browser/ai-configuration/language-model-renderer.js +159 -63
  170. package/lib/browser/ai-configuration/language-model-renderer.js.map +1 -1
  171. package/lib/browser/ai-configuration/language-model-renderer.spec.d.ts +2 -0
  172. package/lib/browser/ai-configuration/language-model-renderer.spec.d.ts.map +1 -0
  173. package/lib/browser/ai-configuration/language-model-renderer.spec.js +93 -0
  174. package/lib/browser/ai-configuration/language-model-renderer.spec.js.map +1 -0
  175. package/lib/browser/ai-sessions-widget.js +12 -16
  176. package/lib/browser/ai-sessions-widget.js.map +1 -1
  177. package/lib/browser/app-tester-chat-agent.d.ts +2 -0
  178. package/lib/browser/app-tester-chat-agent.d.ts.map +1 -1
  179. package/lib/browser/app-tester-chat-agent.js +5 -0
  180. package/lib/browser/app-tester-chat-agent.js.map +1 -1
  181. package/lib/browser/architect-agent.d.ts +2 -0
  182. package/lib/browser/architect-agent.d.ts.map +1 -1
  183. package/lib/browser/architect-agent.js +5 -0
  184. package/lib/browser/architect-agent.js.map +1 -1
  185. package/lib/browser/architect-prompt-template.d.ts.map +1 -1
  186. package/lib/browser/architect-prompt-template.js +7 -0
  187. package/lib/browser/architect-prompt-template.js.map +1 -1
  188. package/lib/browser/chat-session-item.d.ts.map +1 -1
  189. package/lib/browser/chat-session-item.js +17 -30
  190. package/lib/browser/chat-session-item.js.map +1 -1
  191. package/lib/browser/chat-session-list-components.js +7 -30
  192. package/lib/browser/chat-session-list-components.js.map +1 -1
  193. package/lib/browser/chat-session-list-service.d.ts +2 -1
  194. package/lib/browser/chat-session-list-service.d.ts.map +1 -1
  195. package/lib/browser/chat-session-list-service.js +6 -1
  196. package/lib/browser/chat-session-list-service.js.map +1 -1
  197. package/lib/browser/chat-sessions-welcome-message-provider.js +3 -21
  198. package/lib/browser/chat-sessions-welcome-message-provider.js.map +1 -1
  199. package/lib/browser/code-reviewer-agent.d.ts +2 -0
  200. package/lib/browser/code-reviewer-agent.d.ts.map +1 -1
  201. package/lib/browser/code-reviewer-agent.js +5 -0
  202. package/lib/browser/code-reviewer-agent.js.map +1 -1
  203. package/lib/browser/coder-agent.d.ts +2 -0
  204. package/lib/browser/coder-agent.d.ts.map +1 -1
  205. package/lib/browser/coder-agent.js +6 -1
  206. package/lib/browser/coder-agent.js.map +1 -1
  207. package/lib/browser/context-file-validation-service-impl.spec.js +2 -0
  208. package/lib/browser/context-file-validation-service-impl.spec.js.map +1 -1
  209. package/lib/browser/create-skill-agent.d.ts +2 -0
  210. package/lib/browser/create-skill-agent.d.ts.map +1 -1
  211. package/lib/browser/create-skill-agent.js +5 -0
  212. package/lib/browser/create-skill-agent.js.map +1 -1
  213. package/lib/browser/explore-agent.d.ts +2 -0
  214. package/lib/browser/explore-agent.d.ts.map +1 -1
  215. package/lib/browser/explore-agent.js +5 -0
  216. package/lib/browser/explore-agent.js.map +1 -1
  217. package/lib/browser/file-changeset-functions.d.ts +7 -1
  218. package/lib/browser/file-changeset-functions.d.ts.map +1 -1
  219. package/lib/browser/file-changeset-functions.js +62 -20
  220. package/lib/browser/file-changeset-functions.js.map +1 -1
  221. package/lib/browser/file-changeset-functions.spec.js +130 -1
  222. package/lib/browser/file-changeset-functions.spec.js.map +1 -1
  223. package/lib/browser/frontend-module.d.ts.map +1 -1
  224. package/lib/browser/frontend-module.js +65 -59
  225. package/lib/browser/frontend-module.js.map +1 -1
  226. package/lib/browser/github-chat-agent.d.ts +2 -1
  227. package/lib/browser/github-chat-agent.d.ts.map +1 -1
  228. package/lib/browser/github-chat-agent.js +5 -0
  229. package/lib/browser/github-chat-agent.js.map +1 -1
  230. package/lib/browser/github-repo-variable-contribution.d.ts +2 -1
  231. package/lib/browser/github-repo-variable-contribution.d.ts.map +1 -1
  232. package/lib/browser/github-repo-variable-contribution.js +6 -1
  233. package/lib/browser/github-repo-variable-contribution.js.map +1 -1
  234. package/lib/browser/ide-chat-welcome-message-provider.d.ts.map +1 -1
  235. package/lib/browser/ide-chat-welcome-message-provider.js +31 -118
  236. package/lib/browser/ide-chat-welcome-message-provider.js.map +1 -1
  237. package/lib/browser/memory-capability-contribution.d.ts +8 -0
  238. package/lib/browser/memory-capability-contribution.d.ts.map +1 -0
  239. package/lib/browser/memory-capability-contribution.js +88 -0
  240. package/lib/browser/memory-capability-contribution.js.map +1 -0
  241. package/lib/browser/memory-capability-contribution.spec.d.ts +2 -0
  242. package/lib/browser/memory-capability-contribution.spec.d.ts.map +1 -0
  243. package/lib/browser/memory-capability-contribution.spec.js +74 -0
  244. package/lib/browser/memory-capability-contribution.spec.js.map +1 -0
  245. package/lib/browser/memory-directory-variable-contribution.d.ts +41 -0
  246. package/lib/browser/memory-directory-variable-contribution.d.ts.map +1 -0
  247. package/lib/browser/memory-directory-variable-contribution.js +107 -0
  248. package/lib/browser/memory-directory-variable-contribution.js.map +1 -0
  249. package/lib/browser/memory-directory-variable-contribution.spec.d.ts +2 -0
  250. package/lib/browser/memory-directory-variable-contribution.spec.d.ts.map +1 -0
  251. package/lib/browser/memory-directory-variable-contribution.spec.js +98 -0
  252. package/lib/browser/memory-directory-variable-contribution.spec.js.map +1 -0
  253. package/lib/browser/open-editors-hint-contribution.d.ts +7 -0
  254. package/lib/browser/open-editors-hint-contribution.d.ts.map +1 -0
  255. package/lib/browser/open-editors-hint-contribution.js +43 -0
  256. package/lib/browser/open-editors-hint-contribution.js.map +1 -0
  257. package/lib/browser/project-info-agent.d.ts +2 -0
  258. package/lib/browser/project-info-agent.d.ts.map +1 -1
  259. package/lib/browser/project-info-agent.js +5 -0
  260. package/lib/browser/project-info-agent.js.map +1 -1
  261. package/lib/browser/review/pr-review-agent.d.ts +2 -0
  262. package/lib/browser/review/pr-review-agent.d.ts.map +1 -1
  263. package/lib/browser/review/pr-review-agent.js +5 -0
  264. package/lib/browser/review/pr-review-agent.js.map +1 -1
  265. package/lib/browser/summarize-session-command-contribution.d.ts +2 -1
  266. package/lib/browser/summarize-session-command-contribution.d.ts.map +1 -1
  267. package/lib/browser/summarize-session-command-contribution.js +6 -1
  268. package/lib/browser/summarize-session-command-contribution.js.map +1 -1
  269. package/lib/browser/task-context-file-storage-service.d.ts.map +1 -1
  270. package/lib/browser/task-context-file-storage-service.js +1 -0
  271. package/lib/browser/task-context-file-storage-service.js.map +1 -1
  272. package/lib/browser/todo-tool-renderer.js +11 -19
  273. package/lib/browser/todo-tool-renderer.js.map +1 -1
  274. package/lib/browser/user-interaction-tool-renderer.js +39 -83
  275. package/lib/browser/user-interaction-tool-renderer.js.map +1 -1
  276. package/lib/browser/user-interaction-tool.d.ts +2 -0
  277. package/lib/browser/user-interaction-tool.d.ts.map +1 -1
  278. package/lib/browser/user-interaction-tool.js +7 -1
  279. package/lib/browser/user-interaction-tool.js.map +1 -1
  280. package/lib/browser/user-interaction-tool.spec.js +4 -2
  281. package/lib/browser/user-interaction-tool.spec.js.map +1 -1
  282. package/lib/browser/workspace-functions.d.ts +45 -7
  283. package/lib/browser/workspace-functions.d.ts.map +1 -1
  284. package/lib/browser/workspace-functions.js +108 -70
  285. package/lib/browser/workspace-functions.js.map +1 -1
  286. package/lib/browser/workspace-functions.spec.js +139 -9
  287. package/lib/browser/workspace-functions.spec.js.map +1 -1
  288. package/lib/browser/workspace-launch-provider.spec.js +3 -0
  289. package/lib/browser/workspace-launch-provider.spec.js.map +1 -1
  290. package/lib/browser/workspace-search-provider.d.ts.map +1 -1
  291. package/lib/browser/workspace-search-provider.js +4 -7
  292. package/lib/browser/workspace-search-provider.js.map +1 -1
  293. package/lib/browser/workspace-search-provider.spec.js +1 -2
  294. package/lib/browser/workspace-search-provider.spec.js.map +1 -1
  295. package/lib/browser/workspace-task-provider.spec.js +4 -0
  296. package/lib/browser/workspace-task-provider.spec.js.map +1 -1
  297. package/lib/common/coder-replace-prompt-template.d.ts +0 -2
  298. package/lib/common/coder-replace-prompt-template.d.ts.map +1 -1
  299. package/lib/common/coder-replace-prompt-template.js +10 -11
  300. package/lib/common/coder-replace-prompt-template.js.map +1 -1
  301. package/lib/common/command-chat-agents.d.ts +2 -1
  302. package/lib/common/command-chat-agents.d.ts.map +1 -1
  303. package/lib/common/command-chat-agents.js +6 -1
  304. package/lib/common/command-chat-agents.js.map +1 -1
  305. package/lib/common/open-editors-hint-fragment-id.d.ts +2 -0
  306. package/lib/common/open-editors-hint-fragment-id.d.ts.map +1 -0
  307. package/lib/{browser/ai-configuration/components/empty-state.js → common/open-editors-hint-fragment-id.js} +5 -11
  308. package/lib/common/open-editors-hint-fragment-id.js.map +1 -0
  309. package/lib/common/orchestrator-chat-agent.d.ts +2 -1
  310. package/lib/common/orchestrator-chat-agent.d.ts.map +1 -1
  311. package/lib/common/orchestrator-chat-agent.js +5 -0
  312. package/lib/common/orchestrator-chat-agent.js.map +1 -1
  313. package/lib/common/universal-chat-agent.d.ts +2 -0
  314. package/lib/common/universal-chat-agent.d.ts.map +1 -1
  315. package/lib/common/universal-chat-agent.js +5 -0
  316. package/lib/common/universal-chat-agent.js.map +1 -1
  317. package/lib/common/universal-prompt-template.d.ts.map +1 -1
  318. package/lib/common/universal-prompt-template.js +3 -0
  319. package/lib/common/universal-prompt-template.js.map +1 -1
  320. package/lib/common/workspace-preferences.js +2 -2
  321. package/lib/common/workspace-preferences.js.map +1 -1
  322. package/lib/common/workspace-search-provider-util.d.ts +2 -1
  323. package/lib/common/workspace-search-provider-util.d.ts.map +1 -1
  324. package/lib/common/workspace-search-provider-util.js +3 -2
  325. package/lib/common/workspace-search-provider-util.js.map +1 -1
  326. package/lib/common/workspace-search-provider-util.spec.d.ts +2 -0
  327. package/lib/common/workspace-search-provider-util.spec.d.ts.map +1 -0
  328. package/lib/common/workspace-search-provider-util.spec.js +55 -0
  329. package/lib/common/workspace-search-provider-util.spec.js.map +1 -0
  330. package/lib/node/github-repo-service-impl.d.ts +2 -0
  331. package/lib/node/github-repo-service-impl.d.ts.map +1 -1
  332. package/lib/node/github-repo-service-impl.js +7 -1
  333. package/lib/node/github-repo-service-impl.js.map +1 -1
  334. package/package.json +26 -25
  335. package/src/browser/ai-configuration/agent-icon.ts +37 -0
  336. package/src/browser/ai-configuration/ai-configuration-breadcrumbs-contribution.ts +164 -0
  337. package/src/browser/ai-configuration/ai-configuration-detail-widget.spec.ts +165 -0
  338. package/src/browser/ai-configuration/ai-configuration-detail-widget.tsx +237 -0
  339. package/src/browser/ai-configuration/ai-configuration-label-provider-contribution.ts +47 -0
  340. package/src/browser/ai-configuration/ai-configuration-open-preference-renderer.ts +64 -0
  341. package/src/browser/ai-configuration/ai-configuration-preference-ownership.spec.ts +135 -0
  342. package/src/browser/ai-configuration/{components/configuration-section.tsx → ai-configuration-resource.ts} +9 -19
  343. package/src/browser/ai-configuration/ai-configuration-search-widget.tsx +135 -0
  344. package/src/browser/ai-configuration/ai-configuration-search.spec.ts +91 -0
  345. package/src/browser/ai-configuration/ai-configuration-search.ts +43 -0
  346. package/src/browser/ai-configuration/{components/empty-state.tsx → ai-configuration-tree-model.ts} +7 -11
  347. package/src/browser/ai-configuration/ai-configuration-tree-nodes.spec.ts +150 -0
  348. package/src/browser/ai-configuration/ai-configuration-tree-nodes.ts +167 -0
  349. package/src/browser/ai-configuration/ai-configuration-tree-widget.tsx +457 -0
  350. package/src/browser/ai-configuration/ai-configuration-view-contribution.ts +156 -18
  351. package/src/browser/ai-configuration/ai-configuration-widget.tsx +107 -75
  352. package/src/browser/ai-configuration/categories/agent-capabilities-settings.spec.ts +161 -0
  353. package/src/browser/ai-configuration/categories/agent-capabilities-settings.tsx +340 -0
  354. package/src/browser/ai-configuration/categories/agent-chips.tsx +51 -0
  355. package/src/browser/ai-configuration/categories/agent-detail-model.ts +152 -0
  356. package/src/browser/ai-configuration/categories/agent-detail-view.tsx +329 -0
  357. package/src/browser/ai-configuration/categories/agents-configuration-category.spec.ts +119 -0
  358. package/src/browser/ai-configuration/categories/agents-configuration-category.tsx +431 -0
  359. package/src/browser/ai-configuration/categories/general-configuration-category.spec.ts +225 -0
  360. package/src/browser/ai-configuration/categories/general-configuration-category.tsx +465 -0
  361. package/src/browser/ai-configuration/categories/model-aliases-configuration-category.spec.ts +87 -0
  362. package/src/browser/ai-configuration/categories/model-aliases-configuration-category.tsx +286 -0
  363. package/src/browser/ai-configuration/categories/models-configuration-category.spec.ts +167 -0
  364. package/src/browser/ai-configuration/categories/models-configuration-category.tsx +264 -0
  365. package/src/browser/ai-configuration/categories/prompt-snippets-configuration-category.spec.ts +250 -0
  366. package/src/browser/ai-configuration/categories/prompt-snippets-configuration-category.tsx +438 -0
  367. package/src/browser/ai-configuration/categories/prompts-and-skills-configuration-category.spec.ts +226 -0
  368. package/src/browser/ai-configuration/categories/prompts-and-skills-configuration-category.tsx +419 -0
  369. package/src/browser/ai-configuration/categories/token-usage-configuration-category.spec.ts +57 -0
  370. package/src/browser/ai-configuration/categories/token-usage-configuration-category.tsx +185 -0
  371. package/src/browser/ai-configuration/categories/tools-configuration-category.spec.ts +130 -0
  372. package/src/browser/ai-configuration/categories/tools-configuration-category.tsx +421 -0
  373. package/src/browser/ai-configuration/categories/variables-configuration-category.spec.ts +154 -0
  374. package/src/browser/ai-configuration/categories/variables-configuration-category.tsx +322 -0
  375. package/src/browser/ai-configuration/components/agent-notification-settings.tsx +38 -33
  376. package/src/browser/ai-configuration/language-model-renderer.spec.ts +100 -0
  377. package/src/browser/ai-configuration/language-model-renderer.tsx +244 -100
  378. package/src/browser/app-tester-chat-agent.ts +5 -2
  379. package/src/browser/architect-agent.ts +5 -2
  380. package/src/browser/architect-prompt-template.ts +7 -0
  381. package/src/browser/chat-session-item.tsx +2 -4
  382. package/src/browser/chat-session-list-service.ts +6 -3
  383. package/src/browser/code-reviewer-agent.ts +5 -2
  384. package/src/browser/coder-agent.ts +7 -5
  385. package/src/browser/context-file-validation-service-impl.spec.ts +3 -2
  386. package/src/browser/create-skill-agent.ts +5 -2
  387. package/src/browser/explore-agent.ts +5 -2
  388. package/src/browser/file-changeset-functions.spec.ts +158 -5
  389. package/src/browser/file-changeset-functions.ts +61 -23
  390. package/src/browser/frontend-module.ts +76 -63
  391. package/src/browser/github-chat-agent.ts +5 -2
  392. package/src/browser/github-repo-variable-contribution.ts +6 -3
  393. package/src/browser/ide-chat-welcome-message-provider.tsx +11 -11
  394. package/src/browser/memory-capability-contribution.spec.ts +85 -0
  395. package/src/browser/memory-capability-contribution.ts +86 -0
  396. package/src/browser/memory-directory-variable-contribution.spec.ts +113 -0
  397. package/src/browser/memory-directory-variable-contribution.ts +113 -0
  398. package/src/browser/open-editors-hint-contribution.ts +38 -0
  399. package/src/browser/project-info-agent.ts +5 -2
  400. package/src/browser/review/pr-review-agent.ts +5 -2
  401. package/src/browser/style/ai-configuration-base.css +0 -6
  402. package/src/browser/style/ai-configuration-shell.css +416 -0
  403. package/src/browser/style/ai-configuration-table.css +2 -15
  404. package/src/browser/style/index.css +220 -276
  405. package/src/browser/summarize-session-command-contribution.ts +6 -3
  406. package/src/browser/task-context-file-storage-service.ts +5 -2
  407. package/src/browser/user-interaction-tool.spec.ts +5 -2
  408. package/src/browser/user-interaction-tool.ts +6 -2
  409. package/src/browser/workspace-functions.spec.ts +163 -10
  410. package/src/browser/workspace-functions.ts +121 -72
  411. package/src/browser/workspace-launch-provider.spec.ts +4 -1
  412. package/src/browser/workspace-search-provider.spec.ts +1 -2
  413. package/src/browser/workspace-search-provider.ts +4 -7
  414. package/src/browser/workspace-task-provider.spec.ts +5 -1
  415. package/src/common/coder-replace-prompt-template.ts +9 -9
  416. package/src/common/command-chat-agents.ts +6 -2
  417. package/src/{browser/ai-configuration/base/ai-configuration-base-widget.tsx → common/open-editors-hint-fragment-id.ts} +2 -22
  418. package/src/common/orchestrator-chat-agent.ts +5 -2
  419. package/src/common/universal-chat-agent.ts +5 -2
  420. package/src/common/universal-prompt-template.ts +3 -0
  421. package/src/common/workspace-preferences.ts +2 -2
  422. package/src/common/workspace-search-provider-util.spec.ts +61 -0
  423. package/src/common/workspace-search-provider-util.ts +3 -2
  424. package/src/node/github-repo-service-impl.ts +6 -2
  425. package/lib/browser/ai-configuration/agent-configuration-widget.d.ts +0 -72
  426. package/lib/browser/ai-configuration/agent-configuration-widget.d.ts.map +0 -1
  427. package/lib/browser/ai-configuration/agent-configuration-widget.js +0 -620
  428. package/lib/browser/ai-configuration/agent-configuration-widget.js.map +0 -1
  429. package/lib/browser/ai-configuration/agent-configuration-widget.spec.d.ts +0 -2
  430. package/lib/browser/ai-configuration/agent-configuration-widget.spec.d.ts.map +0 -1
  431. package/lib/browser/ai-configuration/agent-configuration-widget.spec.js +0 -56
  432. package/lib/browser/ai-configuration/agent-configuration-widget.spec.js.map +0 -1
  433. package/lib/browser/ai-configuration/base/ai-card-grid-configuration-widget.d.ts +0 -31
  434. package/lib/browser/ai-configuration/base/ai-card-grid-configuration-widget.d.ts.map +0 -1
  435. package/lib/browser/ai-configuration/base/ai-card-grid-configuration-widget.js +0 -55
  436. package/lib/browser/ai-configuration/base/ai-card-grid-configuration-widget.js.map +0 -1
  437. package/lib/browser/ai-configuration/base/ai-configuration-base-widget.d.ts +0 -13
  438. package/lib/browser/ai-configuration/base/ai-configuration-base-widget.d.ts.map +0 -1
  439. package/lib/browser/ai-configuration/base/ai-configuration-base-widget.js.map +0 -1
  440. package/lib/browser/ai-configuration/base/ai-hierarchical-configuration-widget.d.ts +0 -23
  441. package/lib/browser/ai-configuration/base/ai-hierarchical-configuration-widget.d.ts.map +0 -1
  442. package/lib/browser/ai-configuration/base/ai-hierarchical-configuration-widget.js +0 -60
  443. package/lib/browser/ai-configuration/base/ai-hierarchical-configuration-widget.js.map +0 -1
  444. package/lib/browser/ai-configuration/base/ai-list-detail-configuration-widget.d.ts +0 -55
  445. package/lib/browser/ai-configuration/base/ai-list-detail-configuration-widget.d.ts.map +0 -1
  446. package/lib/browser/ai-configuration/base/ai-list-detail-configuration-widget.js +0 -96
  447. package/lib/browser/ai-configuration/base/ai-list-detail-configuration-widget.js.map +0 -1
  448. package/lib/browser/ai-configuration/base/ai-table-configuration-widget.d.ts +0 -44
  449. package/lib/browser/ai-configuration/base/ai-table-configuration-widget.d.ts.map +0 -1
  450. package/lib/browser/ai-configuration/base/ai-table-configuration-widget.js +0 -66
  451. package/lib/browser/ai-configuration/base/ai-table-configuration-widget.js.map +0 -1
  452. package/lib/browser/ai-configuration/components/configuration-section.d.ts +0 -12
  453. package/lib/browser/ai-configuration/components/configuration-section.d.ts.map +0 -1
  454. package/lib/browser/ai-configuration/components/configuration-section.js.map +0 -1
  455. package/lib/browser/ai-configuration/components/empty-state.d.ts +0 -10
  456. package/lib/browser/ai-configuration/components/empty-state.d.ts.map +0 -1
  457. package/lib/browser/ai-configuration/components/empty-state.js.map +0 -1
  458. package/lib/browser/ai-configuration/components/expandable-section.d.ts +0 -13
  459. package/lib/browser/ai-configuration/components/expandable-section.d.ts.map +0 -1
  460. package/lib/browser/ai-configuration/components/expandable-section.js +0 -31
  461. package/lib/browser/ai-configuration/components/expandable-section.js.map +0 -1
  462. package/lib/browser/ai-configuration/model-aliases-configuration-widget.d.ts +0 -26
  463. package/lib/browser/ai-configuration/model-aliases-configuration-widget.d.ts.map +0 -1
  464. package/lib/browser/ai-configuration/model-aliases-configuration-widget.js +0 -198
  465. package/lib/browser/ai-configuration/model-aliases-configuration-widget.js.map +0 -1
  466. package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.d.ts +0 -140
  467. package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.d.ts.map +0 -1
  468. package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.js +0 -508
  469. package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.js.map +0 -1
  470. package/lib/browser/ai-configuration/skills-configuration-widget.d.ts +0 -29
  471. package/lib/browser/ai-configuration/skills-configuration-widget.d.ts.map +0 -1
  472. package/lib/browser/ai-configuration/skills-configuration-widget.js +0 -166
  473. package/lib/browser/ai-configuration/skills-configuration-widget.js.map +0 -1
  474. package/lib/browser/ai-configuration/skills-configuration-widget.spec.d.ts +0 -2
  475. package/lib/browser/ai-configuration/skills-configuration-widget.spec.d.ts.map +0 -1
  476. package/lib/browser/ai-configuration/skills-configuration-widget.spec.js +0 -191
  477. package/lib/browser/ai-configuration/skills-configuration-widget.spec.js.map +0 -1
  478. package/lib/browser/ai-configuration/template-settings-renderer.d.ts +0 -9
  479. package/lib/browser/ai-configuration/template-settings-renderer.d.ts.map +0 -1
  480. package/lib/browser/ai-configuration/template-settings-renderer.js +0 -78
  481. package/lib/browser/ai-configuration/template-settings-renderer.js.map +0 -1
  482. package/lib/browser/ai-configuration/token-usage-configuration-widget.d.ts +0 -20
  483. package/lib/browser/ai-configuration/token-usage-configuration-widget.d.ts.map +0 -1
  484. package/lib/browser/ai-configuration/token-usage-configuration-widget.js +0 -170
  485. package/lib/browser/ai-configuration/token-usage-configuration-widget.js.map +0 -1
  486. package/lib/browser/ai-configuration/tools-configuration-widget.d.ts +0 -52
  487. package/lib/browser/ai-configuration/tools-configuration-widget.d.ts.map +0 -1
  488. package/lib/browser/ai-configuration/tools-configuration-widget.js +0 -357
  489. package/lib/browser/ai-configuration/tools-configuration-widget.js.map +0 -1
  490. package/lib/browser/ai-configuration/variable-configuration-widget.d.ts +0 -22
  491. package/lib/browser/ai-configuration/variable-configuration-widget.d.ts.map +0 -1
  492. package/lib/browser/ai-configuration/variable-configuration-widget.js +0 -133
  493. package/lib/browser/ai-configuration/variable-configuration-widget.js.map +0 -1
  494. package/src/browser/ai-configuration/agent-configuration-widget.spec.ts +0 -71
  495. package/src/browser/ai-configuration/agent-configuration-widget.tsx +0 -928
  496. package/src/browser/ai-configuration/base/ai-card-grid-configuration-widget.tsx +0 -72
  497. package/src/browser/ai-configuration/base/ai-hierarchical-configuration-widget.tsx +0 -51
  498. package/src/browser/ai-configuration/base/ai-list-detail-configuration-widget.tsx +0 -140
  499. package/src/browser/ai-configuration/base/ai-table-configuration-widget.tsx +0 -107
  500. package/src/browser/ai-configuration/components/expandable-section.tsx +0 -51
  501. package/src/browser/ai-configuration/model-aliases-configuration-widget.tsx +0 -270
  502. package/src/browser/ai-configuration/prompt-fragments-configuration-widget.tsx +0 -736
  503. package/src/browser/ai-configuration/skills-configuration-widget.spec.ts +0 -248
  504. package/src/browser/ai-configuration/skills-configuration-widget.tsx +0 -229
  505. package/src/browser/ai-configuration/template-settings-renderer.tsx +0 -125
  506. package/src/browser/ai-configuration/token-usage-configuration-widget.tsx +0 -214
  507. package/src/browser/ai-configuration/tools-configuration-widget.tsx +0 -544
  508. package/src/browser/ai-configuration/variable-configuration-widget.tsx +0 -159
  509. package/src/browser/style/ai-configuration-cards.css +0 -60
@@ -0,0 +1,135 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AgentDetailView = void 0;
4
+ const jsx_runtime_1 = require("@theia/core/shared/react/jsx-runtime");
5
+ // *****************************************************************************
6
+ // Copyright (C) 2026 EclipseSource and others.
7
+ //
8
+ // This program and the accompanying materials are made available under the
9
+ // terms of the Eclipse Public License v. 2.0 which is available at
10
+ // http://www.eclipse.org/legal/epl-2.0.
11
+ //
12
+ // This Source Code may also be made available under the following Secondary
13
+ // Licenses when the conditions for such availability set forth in the Eclipse
14
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
15
+ // with the GNU Classpath Exception which is available at
16
+ // https://www.gnu.org/software/classpath/license.html.
17
+ //
18
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
19
+ // *****************************************************************************
20
+ const common_1 = require("@theia/ai-core/lib/common");
21
+ const common_2 = require("@theia/ai-chat/lib/common");
22
+ const core_1 = require("@theia/core");
23
+ const browser_1 = require("@theia/core/lib/browser");
24
+ const ai_configuration_view_contribution_1 = require("../ai-configuration-view-contribution");
25
+ const React = require("@theia/core/shared/react");
26
+ const ai_configuration_primitives_1 = require("@theia/ai-core-ui/lib/browser/ai-configuration/components/ai-configuration-primitives");
27
+ const ai_configuration_item_row_1 = require("@theia/ai-core-ui/lib/browser/ai-configuration/components/ai-configuration-item-row");
28
+ const ai_configuration_controls_1 = require("@theia/ai-core-ui/lib/browser/ai-configuration/components/ai-configuration-controls");
29
+ const variant_set_card_1 = require("@theia/ai-core-ui/lib/browser/ai-configuration/components/variant-set-card");
30
+ const language_model_renderer_1 = require("../language-model-renderer");
31
+ const agent_notification_settings_1 = require("../components/agent-notification-settings");
32
+ const agent_icon_1 = require("../agent-icon");
33
+ const agent_detail_model_1 = require("./agent-detail-model");
34
+ const agent_capabilities_settings_1 = require("./agent-capabilities-settings");
35
+ /**
36
+ * The Agents item-detail page: enable/show-in-chat toggles, description, prompt
37
+ * templates, LLM requirements, used variables/functions, capabilities and
38
+ * notification settings. Owns its async state (parsed prompt parts + agent
39
+ * settings), reloading whenever {@link AgentDetailViewProps.revision} changes.
40
+ */
41
+ const AgentDetailView = ({ agent, services, languageModels, languageModelAliases, revision, onOpenPromptSnippet, onOpenTool }) => {
42
+ const { agentService, aiSettingsService, variableService, promptService, languageModelRegistry, toolInvocationRegistry, commandService, settingsRowService } = services;
43
+ const [state, setState] = React.useState(undefined);
44
+ React.useEffect(() => {
45
+ let disposed = false;
46
+ (0, agent_detail_model_1.loadAgentDetail)(agent, services).then(loaded => {
47
+ if (!disposed) {
48
+ setState(loaded);
49
+ }
50
+ });
51
+ return () => { disposed = true; };
52
+ }, [agent, revision, aiSettingsService, promptService, variableService]);
53
+ const enabled = agentService.isEnabled(agent.id);
54
+ const toggleEnabled = React.useCallback(() => {
55
+ if (enabled) {
56
+ agentService.disableAgent(agent.id);
57
+ }
58
+ else {
59
+ agentService.enableAgent(agent.id);
60
+ }
61
+ }, [agent, agentService, enabled]);
62
+ const toggleShowInChat = React.useCallback(() => {
63
+ if (!enabled || !state) {
64
+ return;
65
+ }
66
+ aiSettingsService.updateAgentSettings(agent.id, { showInChat: !state.showInChat });
67
+ }, [agent, aiSettingsService, enabled, state]);
68
+ const handleNotificationTypeChange = React.useCallback(async (agentId, notificationType) => {
69
+ await aiSettingsService.updateAgentSettings(agentId, { completionNotification: notificationType });
70
+ }, [aiSettingsService]);
71
+ const openNotificationSettings = React.useCallback(() => {
72
+ commandService.executeCommand(ai_configuration_view_contribution_1.OPEN_AI_CONFIG_VIEW.id, common_1.PREFERENCE_NAME_DEFAULT_NOTIFICATION_TYPE);
73
+ }, [commandService]);
74
+ const header = (0, jsx_runtime_1.jsx)(ai_configuration_primitives_1.AiConfigurationItemDetailHeader, { title: agent.name, iconClass: (0, agent_icon_1.getAgentIconClass)(agent), subtitle: core_1.nls.localizeByDefault('Id: {0}', agent.id), actions: (0, jsx_runtime_1.jsx)(AgentDetailToggles, { enabled: enabled, showInChat: state?.showInChat ?? true, showInChatVisible: (0, common_2.isChatAgent)(agent), onToggleEnabled: toggleEnabled, onToggleShowInChat: toggleShowInChat }) });
75
+ if (!state) {
76
+ return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [header, (0, jsx_runtime_1.jsx)("div", { className: 'ai-agent-detail-loading', children: core_1.nls.localizeByDefault('Loading...') })] });
77
+ }
78
+ const globalVariables = Array.from(new Set([...state.parsed.globalVariables, ...agent.variables]));
79
+ const functions = Array.from(new Set([...state.parsed.functions, ...agent.functions]));
80
+ // Rows for the "Used by this agent" lists, rendered with the shared list so global variables,
81
+ // agent-specific variables and functions all look the same (replacing three custom renderers). Each
82
+ // shows a description when it has one and the lists are sorted alphabetically by label.
83
+ const byLabel = (rows) => [...rows].sort((a, b) => a.label.localeCompare(b.label));
84
+ const allVariables = variableService.getVariables();
85
+ const globalVariableRows = byLabel(globalVariables.map(id => {
86
+ const variable = allVariables.find(candidate => candidate.id === id);
87
+ return { id, label: variable?.name ?? id, description: variable?.description || undefined };
88
+ }));
89
+ const functionRows = byLabel(functions.map(id => ({ id, label: id, description: toolInvocationRegistry.getFunction(id)?.description || undefined })));
90
+ const agentSpecificNames = Array.from(new Set([...state.parsed.agentSpecificVariables, ...agent.agentSpecificVariables.map(v => v.name)]));
91
+ const agentSpecificRows = byLabel(agentSpecificNames.map(name => {
92
+ const declared = agent.agentSpecificVariables.find(v => v.name === name);
93
+ const undeclared = declared === undefined;
94
+ const notUsed = !state.parsed.agentSpecificVariables.includes(name) && declared?.usedInPrompt === true;
95
+ const status = undeclared
96
+ ? {
97
+ kind: 'warn', label: core_1.nls.localize('theia/ai/core/agentConfiguration/undeclared', 'Undeclared'),
98
+ tooltip: core_1.nls.localize('theia/ai/core/agentConfiguration/undeclaredTooltip', 'This variable is used in the prompt but has no description declared by the agent.')
99
+ }
100
+ : notUsed
101
+ ? {
102
+ kind: 'warn', label: core_1.nls.localize('theia/ai/core/agentConfiguration/notUsedInPrompt', 'Not used in prompt'),
103
+ tooltip: core_1.nls.localize('theia/ai/core/agentConfiguration/notUsedInPromptTooltip', 'This variable is declared by the agent but not referenced in the current prompt template.')
104
+ }
105
+ : undefined;
106
+ return { id: name, label: name, description: undeclared ? undefined : declared?.description || undefined, status };
107
+ }));
108
+ // Map each variant id to the display name used by the chat mode switcher (the agent's ChatMode names).
109
+ const variantLabels = {};
110
+ if ((0, common_2.isChatAgent)(agent) && agent.modes) {
111
+ for (const mode of agent.modes) {
112
+ variantLabels[mode.id] = mode.name;
113
+ }
114
+ }
115
+ return (0, jsx_runtime_1.jsxs)("div", { className: 'ai-agent-detail', children: [header, agent.description && (0, jsx_runtime_1.jsx)("div", { className: 'ai-agent-description', children: agent.description }), agent.prompts.length > 0 && (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: 'settings-section-subcategory-title ai-settings-section-subcategory-title', children: core_1.nls.localizeByDefault('Prompts') }), (0, jsx_runtime_1.jsx)("div", { className: 'ai-configuration-item-list', children: agent.prompts.map(prompt => (0, jsx_runtime_1.jsx)(variant_set_card_1.VariantSetCard, { agentId: agent.id, promptVariantSetId: prompt.id, promptService: promptService, settingsRowService: settingsRowService, variantLabels: variantLabels }, agent.id + '.' + prompt.id)) })] }), (0, jsx_runtime_1.jsx)("div", { className: 'ai-lm-requirements', children: (0, jsx_runtime_1.jsx)(language_model_renderer_1.LanguageModelRenderer, { agent: agent, languageModels: languageModels, aiSettingsService: aiSettingsService, languageModelRegistry: languageModelRegistry, languageModelAliases: languageModelAliases, settingsRowService: settingsRowService }) }), (0, common_2.isChatAgent)(agent) && (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("div", { className: 'settings-section-subcategory-title ai-settings-section-subcategory-title', children: core_1.nls.localize('theia/ai/core/agentConfiguration/notificationSettings', 'Notification Settings') }), (0, jsx_runtime_1.jsx)(agent_notification_settings_1.AgentNotificationSettings, { agentId: agent.id, currentNotificationType: state.completionNotification, onNotificationTypeChange: handleNotificationTypeChange, onOpenNotificationSettings: openNotificationSettings, settingsRowService: settingsRowService })] }), state.parsed.capabilities.length > 0 && (0, jsx_runtime_1.jsx)(agent_capabilities_settings_1.AgentCapabilitiesSettings, { capabilities: state.parsed.capabilities, agentId: agent.id, savedOverrides: state.capabilityOverrides, aiSettingsService: aiSettingsService, settingsRowService: settingsRowService, onOpenPromptSnippet: onOpenPromptSnippet }), common_1.GenericCapabilitySelections.hasSelections(state.genericCapabilitySelections) && (0, jsx_runtime_1.jsx)(agent_capabilities_settings_1.AgentGenericCapabilitiesSettings, { agentId: agent.id, savedSelections: state.genericCapabilitySelections, aiSettingsService: aiSettingsService, settingsRowService: settingsRowService, onOpenPromptSnippet: onOpenPromptSnippet }), state.serverTools && state.serverTools.length > 0 && state.serverToolVendor && (0, jsx_runtime_1.jsx)(agent_capabilities_settings_1.AgentServerToolsSettings, { agentId: agent.id, tools: state.serverTools, vendor: state.serverToolVendor, savedSelections: state.serverToolSelections, aiSettingsService: aiSettingsService, settingsRowService: settingsRowService }), globalVariableRows.length > 0 && (0, jsx_runtime_1.jsx)(CollapsibleSubsection, { title: core_1.nls.localize('theia/ai/core/agentConfiguration/usedGlobalVariables', 'Used Global Variables'), count: globalVariableRows.length, children: (0, jsx_runtime_1.jsx)("div", { className: 'ai-configuration-item-list', children: globalVariableRows.map(row => (0, jsx_runtime_1.jsx)(ai_configuration_item_row_1.AiConfigurationItemRow, { label: row.label, description: row.description }, row.id)) }) }), agentSpecificRows.length > 0 && (0, jsx_runtime_1.jsx)(CollapsibleSubsection, { title: core_1.nls.localize('theia/ai/core/agentConfiguration/usedAgentSpecificVariables', 'Used Agent-Specific Variables'), count: agentSpecificRows.length, children: (0, jsx_runtime_1.jsx)("div", { className: 'ai-configuration-item-list', children: agentSpecificRows.map(row => (0, jsx_runtime_1.jsx)(ai_configuration_item_row_1.AiConfigurationItemRow, { label: row.label, description: row.description, status: row.status }, row.id)) }) }), functionRows.length > 0 && (0, jsx_runtime_1.jsx)(CollapsibleSubsection, { title: core_1.nls.localize('theia/ai/core/agentConfiguration/usedTools', 'Used Tools'), count: functionRows.length, children: (0, jsx_runtime_1.jsx)("div", { className: 'ai-configuration-item-list', children: functionRows.map(row => (0, jsx_runtime_1.jsx)(ai_configuration_item_row_1.AiConfigurationItemRow, { label: row.label, description: row.description, onActivateLabel: () => onOpenTool(row.id), labelTooltip: core_1.nls.localize('theia/ai/ide/agentConfiguration/showToolSettings', 'Show tool') }, row.id)) }) })] }, agent.id);
116
+ };
117
+ exports.AgentDetailView = AgentDetailView;
118
+ /**
119
+ * A read-only detail subsection whose body collapses under a subcategory-styled header (chevron + item
120
+ * count). Collapsed by default to keep the agent page compact; the header matches the non-collapsible
121
+ * subcategory titles above it. Used for the "Used …" reference lists (variables, functions).
122
+ */
123
+ const CollapsibleSubsection = ({ title, count, children }) => {
124
+ const [open, setOpen] = React.useState(false);
125
+ const toggle = React.useCallback(() => setOpen(previous => !previous), []);
126
+ const onKeyDown = React.useCallback((event) => {
127
+ if (event.key === 'Enter' || event.key === ' ') {
128
+ event.preventDefault();
129
+ toggle();
130
+ }
131
+ }, [toggle]);
132
+ return (0, jsx_runtime_1.jsxs)("div", { className: 'ai-collapsible-subsection', children: [(0, jsx_runtime_1.jsxs)("div", { className: 'settings-section-subcategory-title ai-settings-section-subcategory-title ai-collapsible-subsection-header', role: 'button', tabIndex: 0, "aria-expanded": open, onClick: toggle, onKeyDown: onKeyDown, children: [(0, jsx_runtime_1.jsx)("span", { "aria-hidden": 'true', className: `ai-collapsible-subsection-chevron ${(0, browser_1.codicon)(open ? 'chevron-down' : 'chevron-right')}` }), (0, jsx_runtime_1.jsx)("span", { children: title }), (0, jsx_runtime_1.jsx)("span", { className: 'ai-collapsible-subsection-count', children: count })] }), open && children] });
133
+ };
134
+ const AgentDetailToggles = ({ enabled, showInChat, showInChatVisible, onToggleEnabled, onToggleShowInChat }) => ((0, jsx_runtime_1.jsxs)("div", { className: 'agent-toggles', children: [(0, jsx_runtime_1.jsxs)("div", { className: 'agent-enable-toggle', title: core_1.nls.localize('theia/ai/core/agentConfiguration/enableAgent', 'Enable Agent'), children: [(0, jsx_runtime_1.jsx)("span", { className: 'toggle-label', children: core_1.nls.localize('theia/ai/core/agentConfiguration/enableAgent', 'Enable Agent') }), (0, jsx_runtime_1.jsx)(ai_configuration_controls_1.AiToggleSwitch, { checked: enabled, ariaLabel: core_1.nls.localize('theia/ai/core/agentConfiguration/enableAgent', 'Enable Agent'), onChange: onToggleEnabled })] }), showInChatVisible && (0, jsx_runtime_1.jsxs)("div", { className: `agent-enable-toggle${enabled ? '' : ' disabled'}`, title: core_1.nls.localize('theia/ai/core/agentConfiguration/showInChat', 'Show in Chat'), children: [(0, jsx_runtime_1.jsx)("span", { className: 'toggle-label', children: core_1.nls.localize('theia/ai/core/agentConfiguration/showInChat', 'Show in Chat') }), (0, jsx_runtime_1.jsx)(ai_configuration_controls_1.AiToggleSwitch, { checked: showInChat, disabled: !enabled, ariaLabel: core_1.nls.localize('theia/ai/core/agentConfiguration/showInChat', 'Show in Chat'), onChange: onToggleShowInChat })] })] }));
135
+ //# sourceMappingURL=agent-detail-view.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-detail-view.js","sourceRoot":"","sources":["../../../../src/browser/ai-configuration/categories/agent-detail-view.tsx"],"names":[],"mappings":";;;;AAAA,gFAAgF;AAChF,+CAA+C;AAC/C,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AACh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C,6CAA6C,EAAE,cAAc,CAAC,GAAQ,EACnH,uBAAC,0CAAc,IACX,OAAO,EAAE,UAAU,EACnB,QAAQ,EAAE,CAAC,OAAO,EAClB,SAAS,EAAE,UAAG,CAAC,QAAQ,CAAC,6CAA6C,EAAE,cAAc,CAAC,EACtF,QAAQ,EAAE,kBAAkB,GAC9B,IACA,IACJ,CACT,CAAC"}
@@ -0,0 +1,78 @@
1
+ import { AgentService, AISettingsService, AIVariableService, CustomAgentsLocation, FrontendLanguageModelRegistry, LanguageModel, PromptFragmentCustomizationService, PromptService, ToolInvocationRegistry } from '@theia/ai-core/lib/common';
2
+ import { LanguageModelAlias, LanguageModelAliasRegistry } from '@theia/ai-core/lib/common/language-model-alias';
3
+ import { CommandService, DisposableCollection, Emitter, Event, ILogger, MessageService, URI } from '@theia/core';
4
+ import { QuickInputService } from '@theia/core/lib/browser';
5
+ import { SelectOption } from '@theia/core/lib/browser/widgets/select-component';
6
+ import * as React from '@theia/core/shared/react';
7
+ import { AiConfigurationCategory, AiConfigurationRenderContext, AiConfigurationSearchItem, AiConfigurationSearchProvider, AiConfigurationTreeItem } from '@theia/ai-core-ui/lib/browser/ai-configuration/ai-configuration-category';
8
+ import { CollectionCategoryRenderer, AiConfigurationAddDescriptor } from '@theia/ai-core-ui/lib/browser/ai-configuration/renderers/collection-category-renderer';
9
+ import { AiSettingsRowService } from '@theia/ai-core-ui/lib/browser/ai-configuration/components/ai-settings-row-service';
10
+ import { AgentDetailServices } from './agent-detail-model';
11
+ /** A candidate location for creating a new custom agent: its scope directory and `agents/` folder. */
12
+ interface CustomAgentScopeOption {
13
+ scopeDir: URI;
14
+ agentsDir: URI;
15
+ }
16
+ /**
17
+ * The Agents category: a `collection` contributed onto the shared primitives.
18
+ * Owns the agent-related service logic (previously in `AIAgentConfigurationWidget`)
19
+ * and delegates the per-item detail to {@link AgentDetailView}.
20
+ */
21
+ export declare class AgentsConfigurationCategory extends CollectionCategoryRenderer implements AiConfigurationCategory, AiConfigurationSearchProvider {
22
+ readonly id = "agents";
23
+ readonly label: string;
24
+ readonly description: string;
25
+ readonly iconClass: string;
26
+ readonly order = 400;
27
+ readonly kind: "collection";
28
+ protected readonly agentService: AgentService;
29
+ protected readonly languageModelRegistry: FrontendLanguageModelRegistry;
30
+ protected readonly promptFragmentCustomizationService: PromptFragmentCustomizationService;
31
+ protected readonly languageModelAliasRegistry: LanguageModelAliasRegistry;
32
+ protected readonly aiSettingsService: AISettingsService;
33
+ protected readonly variableService: AIVariableService;
34
+ protected readonly promptService: PromptService;
35
+ protected readonly quickInputService: QuickInputService;
36
+ protected readonly messageService: MessageService;
37
+ protected readonly settingsRowService: AiSettingsRowService;
38
+ protected readonly toolInvocationRegistry: ToolInvocationRegistry;
39
+ protected readonly commandService: CommandService;
40
+ protected readonly logger: ILogger;
41
+ protected readonly onDidChangeEmitter: Emitter<void>;
42
+ readonly onDidChange: Event<void>;
43
+ protected readonly toDispose: DisposableCollection;
44
+ /** Category-wide caches consumed by the item detail; refreshed on the corresponding service events. */
45
+ protected languageModels: LanguageModel[] | undefined;
46
+ protected languageModelAliases: LanguageModelAlias[];
47
+ /** Bumped on every upstream change so the item-detail view re-runs its async load. */
48
+ protected revision: number;
49
+ get renderer(): this;
50
+ protected get overviewListTitle(): string;
51
+ getOwnedPreferenceIds(): string[];
52
+ get search(): AiConfigurationSearchProvider;
53
+ protected init(): void;
54
+ protected fireChange(): void;
55
+ dispose(): void;
56
+ protected get categoryId(): string;
57
+ getTreeChildren(): AiConfigurationTreeItem[];
58
+ protected renderCategorySettings(ctx: AiConfigurationRenderContext): React.ReactNode;
59
+ protected getChatAgentOptions(): SelectOption[];
60
+ protected getNotificationTypeOptions(): SelectOption[];
61
+ getAddAction(ctx: AiConfigurationRenderContext): AiConfigurationAddDescriptor;
62
+ protected getEmptyMessage(): string;
63
+ protected renderItemHeader(): React.ReactNode;
64
+ protected renderItemSections(item: AiConfigurationTreeItem, ctx: AiConfigurationRenderContext): React.ReactNode;
65
+ protected get detailServices(): AgentDetailServices;
66
+ getSearchItems(): AiConfigurationSearchItem[];
67
+ /**
68
+ * Selects the candidate creation locations from the reported agent locations. Only `agents/`
69
+ * directories are considered (legacy `customAgents.yml` entries exist for discovery only). A
70
+ * scope is offered when it already contains an `agents/` folder; the preferred scope (the first
71
+ * one, i.e. `.agents`) is always kept so a fresh workspace defaults to `.agents` without
72
+ * surfacing empty fallback folders such as `.prompts`.
73
+ */
74
+ protected selectAgentScopeOptions(locations: CustomAgentsLocation[]): CustomAgentScopeOption[];
75
+ protected addCustomAgent(): Promise<void>;
76
+ }
77
+ export {};
78
+ //# sourceMappingURL=agents-configuration-category.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agents-configuration-category.d.ts","sourceRoot":"","sources":["../../../../src/browser/ai-configuration/categories/agents-configuration-category.tsx"],"names":[],"mappings":"AAgBA,OAAO,EACH,YAAY,EACZ,iBAAiB,EACjB,iBAAiB,EACjB,oBAAoB,EACpB,6BAA6B,EAC7B,aAAa,EAKb,kCAAkC,EAClC,aAAa,EACb,sBAAsB,EACzB,MAAM,2BAA2B,CAAC;AAEnC,OAAO,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,gDAAgD,CAAC;AAGhH,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,cAAc,EAAO,GAAG,EAAE,MAAM,aAAa,CAAC;AACtH,OAAO,EAAW,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,YAAY,EAAE,MAAM,kDAAkD,CAAC;AAEhF,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAC;AAClD,OAAO,EACH,uBAAuB,EAGvB,4BAA4B,EAE5B,yBAAyB,EACzB,6BAA6B,EAC7B,uBAAuB,EAC1B,MAAM,0EAA0E,CAAC;AAClF,OAAO,EAAE,0BAA0B,EAAE,4BAA4B,EAAE,MAAM,uFAAuF,CAAC;AAGjK,OAAO,EAAE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sB,EAAE;cAO9E,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC;CA8DlD"}
@@ -0,0 +1,352 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.AgentsConfigurationCategory = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const jsx_runtime_1 = require("@theia/core/shared/react/jsx-runtime");
6
+ // *****************************************************************************
7
+ // Copyright (C) 2026 EclipseSource and others.
8
+ //
9
+ // This program and the accompanying materials are made available under the
10
+ // terms of the Eclipse Public License v. 2.0 which is available at
11
+ // http://www.eclipse.org/legal/epl-2.0.
12
+ //
13
+ // This Source Code may also be made available under the following Secondary
14
+ // Licenses when the conditions for such availability set forth in the Eclipse
15
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
16
+ // with the GNU Classpath Exception which is available at
17
+ // https://www.gnu.org/software/classpath/license.html.
18
+ //
19
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
20
+ // *****************************************************************************
21
+ const common_1 = require("@theia/ai-core/lib/common");
22
+ const agent_preferences_1 = require("@theia/ai-core/lib/common/agent-preferences");
23
+ const language_model_alias_1 = require("@theia/ai-core/lib/common/language-model-alias");
24
+ const ai_chat_preferences_1 = require("@theia/ai-chat/lib/common/ai-chat-preferences");
25
+ const common_2 = require("@theia/ai-chat/lib/common");
26
+ const core_1 = require("@theia/core");
27
+ const browser_1 = require("@theia/core/lib/browser");
28
+ const inversify_1 = require("@theia/core/shared/inversify");
29
+ const ai_configuration_category_1 = require("@theia/ai-core-ui/lib/browser/ai-configuration/ai-configuration-category");
30
+ const collection_category_renderer_1 = require("@theia/ai-core-ui/lib/browser/ai-configuration/renderers/collection-category-renderer");
31
+ const ai_configuration_primitives_1 = require("@theia/ai-core-ui/lib/browser/ai-configuration/components/ai-configuration-primitives");
32
+ const ai_settings_row_1 = require("@theia/ai-core-ui/lib/browser/ai-configuration/components/ai-settings-row");
33
+ const ai_settings_row_service_1 = require("@theia/ai-core-ui/lib/browser/ai-configuration/components/ai-settings-row-service");
34
+ const ai_ide_preferences_1 = require("../../../common/ai-ide-preferences");
35
+ const agent_detail_view_1 = require("./agent-detail-view");
36
+ const prompt_snippets_configuration_category_1 = require("./prompt-snippets-configuration-category");
37
+ const agent_icon_1 = require("../agent-icon");
38
+ /**
39
+ * The Agents category: a `collection` contributed onto the shared primitives.
40
+ * Owns the agent-related service logic (previously in `AIAgentConfigurationWidget`)
41
+ * and delegates the per-item detail to {@link AgentDetailView}.
42
+ */
43
+ let AgentsConfigurationCategory = class AgentsConfigurationCategory extends collection_category_renderer_1.CollectionCategoryRenderer {
44
+ constructor() {
45
+ super(...arguments);
46
+ this.id = ai_configuration_category_1.AiConfigurationCategoryId.AGENTS;
47
+ this.label = core_1.nls.localizeByDefault('Agents');
48
+ this.description = core_1.nls.localize('theia/ai/ide/agentsConfiguration/description', 'The AI agents available in the IDE. Open an agent to configure its prompts, model and capabilities.');
49
+ this.iconClass = (0, browser_1.codicon)('copilot');
50
+ this.order = ai_configuration_category_1.AiConfigurationCategoryOrder.AGENTS;
51
+ this.kind = 'collection';
52
+ this.onDidChangeEmitter = new core_1.Emitter();
53
+ this.onDidChange = this.onDidChangeEmitter.event;
54
+ this.toDispose = new core_1.DisposableCollection(this.onDidChangeEmitter);
55
+ this.languageModelAliases = [];
56
+ /** Bumped on every upstream change so the item-detail view re-runs its async load. */
57
+ this.revision = 0;
58
+ }
59
+ get renderer() {
60
+ return this;
61
+ }
62
+ get overviewListTitle() {
63
+ return core_1.nls.localizeByDefault('Agents');
64
+ }
65
+ getOwnedPreferenceIds() {
66
+ return [
67
+ ai_chat_preferences_1.DEFAULT_CHAT_AGENT_PREF,
68
+ common_1.PREFERENCE_NAME_DEFAULT_NOTIFICATION_TYPE,
69
+ ai_ide_preferences_1.PREFERENCE_NAME_ORCHESTRATOR_EXCLUSION_LIST,
70
+ ai_ide_preferences_1.PREFERENCE_NAME_AGENT_MODE_ENABLED,
71
+ // Per-agent settings storage; edited through the agent detail pages, not as a raw row.
72
+ agent_preferences_1.AGENT_SETTINGS_PREF
73
+ ];
74
+ }
75
+ get search() {
76
+ return this;
77
+ }
78
+ init() {
79
+ this.languageModelRegistry.getLanguageModels().then(models => {
80
+ this.languageModels = models ?? [];
81
+ this.fireChange();
82
+ });
83
+ this.languageModelAliasRegistry.ready.then(() => {
84
+ this.languageModelAliases = this.languageModelAliasRegistry.getAliases();
85
+ this.toDispose.push(this.languageModelAliasRegistry.onDidChange(() => {
86
+ this.languageModelAliases = this.languageModelAliasRegistry.getAliases();
87
+ this.fireChange();
88
+ }));
89
+ this.fireChange();
90
+ });
91
+ this.toDispose.pushAll([
92
+ this.languageModelRegistry.onChange(({ models }) => {
93
+ this.languageModels = models;
94
+ this.fireChange();
95
+ }),
96
+ this.agentService.onDidChangeAgents(() => this.fireChange()),
97
+ this.promptService.onPromptsChange(() => this.fireChange()),
98
+ this.promptFragmentCustomizationService.onDidChangePromptFragmentCustomization(() => this.fireChange()),
99
+ this.aiSettingsService.onDidChange(() => this.fireChange())
100
+ ]);
101
+ }
102
+ fireChange() {
103
+ this.revision++;
104
+ this.onDidChangeEmitter.fire();
105
+ }
106
+ dispose() {
107
+ this.toDispose.dispose();
108
+ }
109
+ get categoryId() {
110
+ return this.id;
111
+ }
112
+ getTreeChildren() {
113
+ return this.agentService.getAllAgents().map(agent => {
114
+ const enabled = this.agentService.isEnabled(agent.id);
115
+ return {
116
+ id: agent.id,
117
+ label: agent.name,
118
+ iconClass: (0, agent_icon_1.getAgentIconClass)(agent),
119
+ description: agent.description,
120
+ status: {
121
+ kind: enabled ? 'on' : 'off',
122
+ label: enabled ? core_1.nls.localizeByDefault('Enabled') : core_1.nls.localizeByDefault('Disabled')
123
+ }
124
+ };
125
+ });
126
+ }
127
+ renderCategorySettings(ctx) {
128
+ return (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(ai_configuration_primitives_1.AiConfigurationSection, { title: core_1.nls.localize('theia/ai/ide/agentConfiguration/behavior', 'Behavior'), children: [(0, jsx_runtime_1.jsx)(ai_settings_row_1.AiSettingsRow, { service: this.settingsRowService, preferenceId: ai_ide_preferences_1.PREFERENCE_NAME_AGENT_MODE_ENABLED, label: core_1.nls.localize('theia/ai/ide/agentConfiguration/agentMode', 'Agent mode for Coder'), scope: ctx.scope, control: { type: 'boolean' }, onDidChange: ctx.update }), (0, jsx_runtime_1.jsx)(ai_settings_row_1.AiSettingsRow, { service: this.settingsRowService, preferenceId: ai_ide_preferences_1.PREFERENCE_NAME_ORCHESTRATOR_EXCLUSION_LIST, label: core_1.nls.localize('theia/ai/ide/agentConfiguration/orchestratorExclude', 'Agents hidden from the orchestrator'), scope: ctx.scope, control: { type: 'array', placeholder: core_1.nls.localize('theia/ai/ide/agentConfiguration/orchestratorExcludePlaceholder', 'Add agent ID...') }, onDidChange: ctx.update })] }), (0, jsx_runtime_1.jsxs)(ai_configuration_primitives_1.AiConfigurationSection, { title: core_1.nls.localize('theia/ai/ide/agentConfiguration/defaults', 'Defaults'), children: [(0, jsx_runtime_1.jsx)(ai_settings_row_1.AiSettingsRow, { service: this.settingsRowService, preferenceId: ai_chat_preferences_1.DEFAULT_CHAT_AGENT_PREF, label: core_1.nls.localize('theia/ai/ide/agentConfiguration/defaultChatAgent', 'Default Chat Agent'), scope: ctx.scope, control: { type: 'select', options: this.getChatAgentOptions() }, onDidChange: ctx.update }), (0, jsx_runtime_1.jsx)(ai_settings_row_1.AiSettingsRow, { service: this.settingsRowService, preferenceId: common_1.PREFERENCE_NAME_DEFAULT_NOTIFICATION_TYPE, scope: ctx.scope, control: { type: 'select', options: this.getNotificationTypeOptions() }, onDidChange: ctx.update })] })] });
129
+ }
130
+ getChatAgentOptions() {
131
+ // Leading empty entry so the (optional) preference can show and select its unset state, where Theia's
132
+ // built-in defaults apply. Without it the select would fall back to showing the first agent when unset.
133
+ const none = {
134
+ value: '',
135
+ label: core_1.nls.localize('theia/ai/ide/agentConfiguration/defaultChatAgentNone', 'Built-in default'),
136
+ description: core_1.nls.localize('theia/ai/ide/agentConfiguration/defaultChatAgentNoneDescription', 'No explicit default; Theia picks the default Chat Agent.')
137
+ };
138
+ return [none, ...this.agentService.getAllAgents()
139
+ .filter(agent => (0, common_2.isChatAgent)(agent))
140
+ .map(agent => ({ value: agent.id, label: agent.name }))];
141
+ }
142
+ getNotificationTypeOptions() {
143
+ return common_1.NOTIFICATION_TYPES.map(type => ({ value: type, label: common_1.NOTIFICATION_TYPE_LABELS[type] }));
144
+ }
145
+ getAddAction(ctx) {
146
+ return {
147
+ label: core_1.nls.localize('theia/ai/core/agentConfiguration/addCustomAgent', 'Add Custom Agent'),
148
+ iconClass: (0, browser_1.codicon)('add'),
149
+ run: () => this.addCustomAgent()
150
+ };
151
+ }
152
+ getEmptyMessage() {
153
+ return core_1.nls.localize('theia/ai/ide/agentConfiguration/noAgents', 'No agents are available.');
154
+ }
155
+ renderItemHeader() {
156
+ // The detail view renders its own header (with the enable / show-in-chat toggles).
157
+ return undefined;
158
+ }
159
+ renderItemSections(item, ctx) {
160
+ const agent = this.agentService.getAllAgents().find(candidate => candidate.id === item.id);
161
+ if (!agent) {
162
+ return undefined;
163
+ }
164
+ return (0, jsx_runtime_1.jsx)(agent_detail_view_1.AgentDetailView, { agent: agent, services: this.detailServices, languageModels: this.languageModels, languageModelAliases: this.languageModelAliases, revision: this.revision, onOpenPromptSnippet: fragmentId => ctx.navigate(prompt_snippets_configuration_category_1.PromptSnippetsConfiguration.selectionFor(fragmentId)), onOpenTool: toolName => ctx.navigate(ai_configuration_category_1.AiConfigurationTools.selectionFor(toolName)) });
165
+ }
166
+ get detailServices() {
167
+ return {
168
+ agentService: this.agentService,
169
+ aiSettingsService: this.aiSettingsService,
170
+ variableService: this.variableService,
171
+ promptService: this.promptService,
172
+ languageModelRegistry: this.languageModelRegistry,
173
+ toolInvocationRegistry: this.toolInvocationRegistry,
174
+ commandService: this.commandService,
175
+ settingsRowService: this.settingsRowService,
176
+ logger: this.logger
177
+ };
178
+ }
179
+ getSearchItems() {
180
+ const settingLabel = core_1.nls.localizeByDefault('Setting');
181
+ const items = [{
182
+ label: core_1.nls.localize('theia/ai/ide/agentConfiguration/agentMode', 'Agent mode for Coder'),
183
+ typeLabel: settingLabel,
184
+ categoryId: this.id,
185
+ target: { categoryId: this.id },
186
+ keywords: ai_ide_preferences_1.PREFERENCE_NAME_AGENT_MODE_ENABLED
187
+ }, {
188
+ label: core_1.nls.localize('theia/ai/ide/agentConfiguration/orchestratorExclude', 'Agents hidden from the orchestrator'),
189
+ typeLabel: settingLabel,
190
+ categoryId: this.id,
191
+ target: { categoryId: this.id, highlight: { rowId: ai_ide_preferences_1.PREFERENCE_NAME_ORCHESTRATOR_EXCLUSION_LIST } },
192
+ keywords: ai_ide_preferences_1.PREFERENCE_NAME_ORCHESTRATOR_EXCLUSION_LIST
193
+ }, {
194
+ label: core_1.nls.localize('theia/ai/ide/agentConfiguration/defaultChatAgent', 'Default Chat Agent'),
195
+ typeLabel: settingLabel,
196
+ categoryId: this.id,
197
+ target: { categoryId: this.id, highlight: { rowId: ai_chat_preferences_1.DEFAULT_CHAT_AGENT_PREF } },
198
+ keywords: ai_chat_preferences_1.DEFAULT_CHAT_AGENT_PREF
199
+ }, {
200
+ label: core_1.nls.localize('theia/ai/core/defaultNotification/title', 'Default Notification Type'),
201
+ typeLabel: settingLabel,
202
+ categoryId: this.id,
203
+ target: { categoryId: this.id, highlight: { rowId: common_1.PREFERENCE_NAME_DEFAULT_NOTIFICATION_TYPE } },
204
+ keywords: common_1.PREFERENCE_NAME_DEFAULT_NOTIFICATION_TYPE
205
+ }];
206
+ const agentTypeLabel = core_1.nls.localizeByDefault('Agent');
207
+ for (const agent of this.agentService.getAllAgents()) {
208
+ items.push({
209
+ label: agent.name,
210
+ typeLabel: agentTypeLabel,
211
+ categoryId: this.id,
212
+ target: { categoryId: this.id, itemId: agent.id },
213
+ keywords: `${agent.id} ${agent.description ?? ''}`
214
+ });
215
+ }
216
+ return items;
217
+ }
218
+ /**
219
+ * Selects the candidate creation locations from the reported agent locations. Only `agents/`
220
+ * directories are considered (legacy `customAgents.yml` entries exist for discovery only). A
221
+ * scope is offered when it already contains an `agents/` folder; the preferred scope (the first
222
+ * one, i.e. `.agents`) is always kept so a fresh workspace defaults to `.agents` without
223
+ * surfacing empty fallback folders such as `.prompts`.
224
+ */
225
+ selectAgentScopeOptions(locations) {
226
+ return locations
227
+ .filter(location => location.kind === 'agents-dir')
228
+ .filter((location, index) => index === 0 || location.exists)
229
+ .map(location => ({ scopeDir: location.uri.parent, agentsDir: location.uri }));
230
+ }
231
+ async addCustomAgent() {
232
+ const allLocations = await this.promptFragmentCustomizationService.getCustomAgentsLocations();
233
+ const scopeOptions = this.selectAgentScopeOptions(allLocations);
234
+ if (scopeOptions.length === 0) {
235
+ this.messageService.warn(core_1.nls.localize('theia/ai/ide/agentConfiguration/newAgent/noLocation', 'Cannot create a custom agent: no prompt-templates location is configured. Set a global or workspace prompt-templates folder and try again.'));
236
+ return;
237
+ }
238
+ let chosen = scopeOptions[0];
239
+ if (scopeOptions.length > 1) {
240
+ chosen = await new Promise((resolve, reject) => {
241
+ const quickPick = this.quickInputService.createQuickPick();
242
+ quickPick.title = core_1.nls.localize('theia/ai/ide/agentConfiguration/customAgentLocationQuickPick/title', 'Select location for the new custom agent');
243
+ quickPick.placeholder = core_1.nls.localize('theia/ai/ide/agentConfiguration/customAgentLocationQuickPick/placeholder', 'Choose where to create the agents/<id>/agent.md file');
244
+ quickPick.items = scopeOptions.map(opt => ({
245
+ label: opt.scopeDir.path.toString(),
246
+ description: opt.agentsDir.path.toString(),
247
+ option: opt
248
+ }));
249
+ quickPick.onDidAccept(() => {
250
+ const selected = quickPick.selectedItems[0];
251
+ quickPick.dispose();
252
+ if (selected?.option) {
253
+ resolve(selected.option);
254
+ }
255
+ else {
256
+ reject(new Error('No location selected'));
257
+ }
258
+ });
259
+ quickPick.onDidHide(() => reject(new Error('Selection cancelled')));
260
+ quickPick.show();
261
+ }).catch(() => undefined) ?? scopeOptions[0];
262
+ }
263
+ const id = await this.quickInputService.input({
264
+ title: core_1.nls.localize('theia/ai/ide/agentConfiguration/newAgent/idTitle', 'New custom agent'),
265
+ prompt: core_1.nls.localize('theia/ai/ide/agentConfiguration/newAgent/idPrompt', 'Agent id (used as folder name under agents/)'),
266
+ placeHolder: 'my-agent',
267
+ validateInput: async (value) => /^[A-Za-z0-9._-]+$/.test(value)
268
+ ? undefined
269
+ : core_1.nls.localize('theia/ai/ide/agentConfiguration/newAgent/idInvalid', 'Use letters, digits, dash, underscore, or dot only.')
270
+ });
271
+ if (!id) {
272
+ return;
273
+ }
274
+ try {
275
+ await this.promptFragmentCustomizationService.createCustomAgentFile(chosen.scopeDir, {
276
+ id,
277
+ name: id,
278
+ description: core_1.nls.localize('theia/ai/ide/agentConfiguration/newAgent/defaultDescription', 'Custom agent. Edit this description in agent.md.'),
279
+ prompt: core_1.nls.localize('theia/ai/ide/agentConfiguration/newAgent/defaultPrompt', 'You are a helpful agent. Adjust this prompt to fit your needs.'),
280
+ defaultLLM: 'default/universal',
281
+ showInChat: true
282
+ });
283
+ }
284
+ catch (error) {
285
+ this.messageService.error(core_1.nls.localize('theia/ai/ide/agentConfiguration/newAgent/createFailed', 'Could not create the custom agent "{0}": {1}', id, error instanceof Error ? error.message : String(error)));
286
+ }
287
+ }
288
+ };
289
+ exports.AgentsConfigurationCategory = AgentsConfigurationCategory;
290
+ tslib_1.__decorate([
291
+ (0, inversify_1.inject)(common_1.AgentService),
292
+ tslib_1.__metadata("design:type", Object)
293
+ ], AgentsConfigurationCategory.prototype, "agentService", void 0);
294
+ tslib_1.__decorate([
295
+ (0, inversify_1.inject)(common_1.LanguageModelRegistry),
296
+ tslib_1.__metadata("design:type", Object)
297
+ ], AgentsConfigurationCategory.prototype, "languageModelRegistry", void 0);
298
+ tslib_1.__decorate([
299
+ (0, inversify_1.inject)(common_1.PromptFragmentCustomizationService),
300
+ tslib_1.__metadata("design:type", Object)
301
+ ], AgentsConfigurationCategory.prototype, "promptFragmentCustomizationService", void 0);
302
+ tslib_1.__decorate([
303
+ (0, inversify_1.inject)(language_model_alias_1.LanguageModelAliasRegistry),
304
+ tslib_1.__metadata("design:type", Object)
305
+ ], AgentsConfigurationCategory.prototype, "languageModelAliasRegistry", void 0);
306
+ tslib_1.__decorate([
307
+ (0, inversify_1.inject)(common_1.AISettingsService),
308
+ tslib_1.__metadata("design:type", Object)
309
+ ], AgentsConfigurationCategory.prototype, "aiSettingsService", void 0);
310
+ tslib_1.__decorate([
311
+ (0, inversify_1.inject)(common_1.AIVariableService),
312
+ tslib_1.__metadata("design:type", Object)
313
+ ], AgentsConfigurationCategory.prototype, "variableService", void 0);
314
+ tslib_1.__decorate([
315
+ (0, inversify_1.inject)(common_1.PromptService),
316
+ tslib_1.__metadata("design:type", Object)
317
+ ], AgentsConfigurationCategory.prototype, "promptService", void 0);
318
+ tslib_1.__decorate([
319
+ (0, inversify_1.inject)(browser_1.QuickInputService),
320
+ tslib_1.__metadata("design:type", Object)
321
+ ], AgentsConfigurationCategory.prototype, "quickInputService", void 0);
322
+ tslib_1.__decorate([
323
+ (0, inversify_1.inject)(core_1.MessageService),
324
+ tslib_1.__metadata("design:type", core_1.MessageService)
325
+ ], AgentsConfigurationCategory.prototype, "messageService", void 0);
326
+ tslib_1.__decorate([
327
+ (0, inversify_1.inject)(ai_settings_row_service_1.AiSettingsRowService),
328
+ tslib_1.__metadata("design:type", ai_settings_row_service_1.AiSettingsRowService)
329
+ ], AgentsConfigurationCategory.prototype, "settingsRowService", void 0);
330
+ tslib_1.__decorate([
331
+ (0, inversify_1.inject)(common_1.ToolInvocationRegistry),
332
+ tslib_1.__metadata("design:type", Object)
333
+ ], AgentsConfigurationCategory.prototype, "toolInvocationRegistry", void 0);
334
+ tslib_1.__decorate([
335
+ (0, inversify_1.inject)(core_1.CommandService),
336
+ tslib_1.__metadata("design:type", Object)
337
+ ], AgentsConfigurationCategory.prototype, "commandService", void 0);
338
+ tslib_1.__decorate([
339
+ (0, inversify_1.inject)(core_1.ILogger),
340
+ (0, inversify_1.named)('ai-ide:AgentsConfigurationCategory'),
341
+ tslib_1.__metadata("design:type", Object)
342
+ ], AgentsConfigurationCategory.prototype, "logger", void 0);
343
+ tslib_1.__decorate([
344
+ (0, inversify_1.postConstruct)(),
345
+ tslib_1.__metadata("design:type", Function),
346
+ tslib_1.__metadata("design:paramtypes", []),
347
+ tslib_1.__metadata("design:returntype", void 0)
348
+ ], AgentsConfigurationCategory.prototype, "init", null);
349
+ exports.AgentsConfigurationCategory = AgentsConfigurationCategory = tslib_1.__decorate([
350
+ (0, inversify_1.injectable)()
351
+ ], AgentsConfigurationCategory);
352
+ //# sourceMappingURL=agents-configuration-category.js.map