@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,100 @@
1
+ // *****************************************************************************
2
+ // Copyright (C) 2026 EclipseSource and others.
3
+ //
4
+ // This program and the accompanying materials are made available under the
5
+ // terms of the Eclipse Public License v. 2.0 which is available at
6
+ // http://www.eclipse.org/legal/epl-2.0.
7
+ //
8
+ // This Source Code may also be made available under the following Secondary
9
+ // Licenses when the conditions for such availability set forth in the Eclipse
10
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
11
+ // with the GNU Classpath Exception which is available at
12
+ // https://www.gnu.org/software/classpath/license.html.
13
+ //
14
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
+ // *****************************************************************************
16
+
17
+ import { enableJSDOM } from '@theia/core/lib/browser/test/jsdom';
18
+ let disableJSDOM = enableJSDOM();
19
+
20
+ import { FrontendApplicationConfigProvider } from '@theia/core/lib/browser/frontend-application-config-provider';
21
+ FrontendApplicationConfigProvider.set({});
22
+
23
+ import { expect } from 'chai';
24
+ import * as React from '@theia/core/shared/react';
25
+ import { flushSync } from '@theia/core/shared/react-dom';
26
+ import { createRoot } from '@theia/core/shared/react-dom/client';
27
+ import { ReasoningSupport } from '@theia/ai-core/lib/common';
28
+ import { AiSettingsRowService } from '@theia/ai-core-ui/lib/browser/ai-configuration/components/ai-settings-row-service';
29
+ import { ReasoningRow } from './language-model-renderer';
30
+
31
+ disableJSDOM();
32
+
33
+ describe('ReasoningRow', () => {
34
+
35
+ before(() => disableJSDOM = enableJSDOM());
36
+ after(() => disableJSDOM());
37
+
38
+ const support: ReasoningSupport = { supportedLevels: ['off', 'low', 'high'], defaultLevel: 'low' };
39
+
40
+ function render(props: Partial<React.ComponentProps<typeof ReasoningRow>>): { container: HTMLElement; dispose: () => void } {
41
+ const container = document.createElement('div');
42
+ document.body.appendChild(container);
43
+ const root = createRoot(container);
44
+ flushSync(() => root.render(React.createElement(ReasoningRow, {
45
+ support,
46
+ inheritedLevel: 'low',
47
+ onSelect: () => { },
48
+ onReset: () => { },
49
+ settingsRowService: { openResetMenu: () => { } } as unknown as AiSettingsRowService,
50
+ ...props
51
+ })));
52
+ return { container, dispose: () => { flushSync(() => root.unmount()); container.remove(); } };
53
+ }
54
+
55
+ it('marks the select with the effective level, which is what draws the shared lightbulb glyph', () => {
56
+ const stored = render({ savedLevel: 'high' });
57
+ try {
58
+ const select = stored.container.querySelector('.theia-ReasoningLevelSelector');
59
+ expect(select?.classList.contains('reasoning-level-high')).to.equal(true);
60
+ } finally {
61
+ stored.dispose();
62
+ }
63
+
64
+ // Nothing stored: the row shows the inherited level, so the glyph matches what the model will do.
65
+ const inherited = render({ savedLevel: undefined, inheritedLevel: 'off' });
66
+ try {
67
+ const select = inherited.container.querySelector('.theia-ReasoningLevelSelector');
68
+ expect(select?.classList.contains('reasoning-level-off')).to.equal(true);
69
+ } finally {
70
+ inherited.dispose();
71
+ }
72
+ });
73
+
74
+ it('offers a reset only once a level is stored for the agent', () => {
75
+ const stored = render({ savedLevel: 'high' });
76
+ try {
77
+ expect(Boolean(stored.container.querySelector('.ai-settings-row-gear'))).to.equal(true);
78
+ expect(Boolean(stored.container.querySelector('.ai-settings-row.modified'))).to.equal(true);
79
+ } finally {
80
+ stored.dispose();
81
+ }
82
+
83
+ const inherited = render({ savedLevel: undefined });
84
+ try {
85
+ expect(Boolean(inherited.container.querySelector('.ai-settings-row-gear'))).to.equal(false);
86
+ expect(Boolean(inherited.container.querySelector('.ai-settings-row.modified'))).to.equal(false);
87
+ } finally {
88
+ inherited.dispose();
89
+ }
90
+ });
91
+
92
+ it('names the inherited level while nothing is stored, so the effective value is not a guess', () => {
93
+ const inherited = render({ savedLevel: undefined, inheritedLevel: 'high' });
94
+ try {
95
+ expect(inherited.container.textContent).to.include('High');
96
+ } finally {
97
+ inherited.dispose();
98
+ }
99
+ });
100
+ });
@@ -14,10 +14,24 @@
14
14
  // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
15
15
  // *****************************************************************************
16
16
  import * as React from '@theia/core/shared/react';
17
- import { Agent, AISettingsService, FrontendLanguageModelRegistry, LanguageModel, LanguageModelRequirement } from '@theia/ai-core/lib/common';
17
+ import {
18
+ Agent,
19
+ AISettingsService,
20
+ FrontendLanguageModelRegistry,
21
+ LanguageModel,
22
+ LanguageModelRequirement,
23
+ PREFERENCE_NAME_REASONING,
24
+ ReasoningLevel,
25
+ ReasoningPreferenceEntry,
26
+ ReasoningSupport
27
+ } from '@theia/ai-core/lib/common';
28
+ import { mergeReasoningSettings } from '@theia/ai-core/lib/browser/frontend-language-model-service';
18
29
  import { LanguageModelAlias } from '@theia/ai-core/lib/common/language-model-alias';
19
30
  import { Mutable } from '@theia/core';
20
31
  import { nls } from '@theia/core/lib/common/nls';
32
+ import { SelectComponent, SelectOption } from '@theia/core/lib/browser/widgets/select-component';
33
+ import { AiConfigurationSettingRow } from '@theia/ai-core-ui/lib/browser/ai-configuration/components/ai-configuration-setting-row';
34
+ import { AiSettingsRowService } from '@theia/ai-core-ui/lib/browser/ai-configuration/components/ai-settings-row-service';
21
35
 
22
36
  export interface LanguageModelSettingsProps {
23
37
  agent: Agent;
@@ -25,37 +39,130 @@ export interface LanguageModelSettingsProps {
25
39
  aiSettingsService: AISettingsService;
26
40
  languageModelRegistry: FrontendLanguageModelRegistry;
27
41
  languageModelAliases: LanguageModelAlias[];
42
+ /** Backs each purpose row's gear menu (its "Reset Setting" drops that purpose's override). */
43
+ settingsRowService: AiSettingsRowService;
28
44
  }
29
45
 
30
- export const LanguageModelRenderer: React.FC<LanguageModelSettingsProps> = (
31
- { agent, languageModels, aiSettingsService, languageModelRegistry, languageModelAliases: aliases }) => {
46
+ /**
47
+ * The model/alias picker for a single requirement, backed by the shared {@link SelectComponent}.
48
+ * Extracted so its `onChange` can be a stable, purpose-bound callback (rather than an inline closure)
49
+ * per the React guideline.
50
+ */
51
+ const ModelSelect: React.FC<{
52
+ id: string;
53
+ purpose: string;
54
+ value: string | undefined;
55
+ options: SelectOption[];
56
+ onSelect: (purpose: string, identifier: string) => void;
57
+ }> = ({ id, purpose, value, options, onSelect }) => {
58
+ const handleChange = React.useCallback((option: SelectOption): void => {
59
+ onSelect(purpose, option.value ?? '');
60
+ }, [onSelect, purpose]);
61
+ return <SelectComponent
62
+ id={id}
63
+ className='ai-config-select ai-configuration-value-row-value'
64
+ options={options}
65
+ defaultValue={value}
66
+ onChange={handleChange}
67
+ />;
68
+ };
32
69
 
33
- const findLanguageModelRequirement = async (purpose: string): Promise<LanguageModelRequirement | undefined> => {
34
- const requirementSetting = await aiSettingsService.getAgentSettings(agent.id);
35
- return requirementSetting?.languageModelRequirements?.find(e => e.purpose === purpose);
36
- };
70
+ /** Same wording as the chat input's selector, so a level reads identically wherever it is set. */
71
+ const reasoningLevelLabel = (level: ReasoningLevel): string => {
72
+ switch (level) {
73
+ case 'off': return nls.localizeByDefault('Off');
74
+ case 'minimal': return nls.localizeByDefault('Minimal');
75
+ case 'low': return nls.localizeByDefault('Low');
76
+ case 'medium': return nls.localizeByDefault('Medium');
77
+ case 'high': return nls.localizeByDefault('High');
78
+ case 'auto': return nls.localizeByDefault('Auto');
79
+ }
80
+ };
81
+
82
+ /**
83
+ * The agent's persisted reasoning level, shown right below its models because that is the model
84
+ * capability it depends on. The chat input's selector writes this same per-agent setting, so without this
85
+ * row there is no way to see what it stored, change it outside a chat, or clear it again.
86
+ *
87
+ * Shown only while the resolved model declares reasoning support, matching the chat input, which hides its
88
+ * selector in that case. The select carries `theia-ReasoningLevelSelector` so it shows the same per-level
89
+ * lightbulb glyphs as the chat input.
90
+ *
91
+ * Exported for tests: the glyph class it builds is the contract with `ai-chat-ui`'s shared CSS.
92
+ */
93
+ export const ReasoningRow: React.FC<{
94
+ support: ReasoningSupport;
95
+ /** Level stored for this agent; `undefined` means the level is inherited. */
96
+ savedLevel?: ReasoningLevel;
97
+ /** Level that applies when nothing is stored: the matching preference default, else the model's. */
98
+ inheritedLevel: ReasoningLevel;
99
+ onSelect: (level: ReasoningLevel) => void;
100
+ onReset: () => void;
101
+ settingsRowService: AiSettingsRowService;
102
+ }> = ({ support, savedLevel, inheritedLevel, onSelect, onReset, settingsRowService }) => {
103
+ const options = React.useMemo<SelectOption[]>(
104
+ () => support.supportedLevels.map(level => ({ value: level, label: reasoningLevelLabel(level) })),
105
+ [support]
106
+ );
107
+ const handleChange = React.useCallback((option: SelectOption): void => {
108
+ if (option.value) {
109
+ onSelect(option.value as ReasoningLevel);
110
+ }
111
+ }, [onSelect]);
112
+ const effectiveLevel = savedLevel ?? inheritedLevel;
113
+ return <AiConfigurationSettingRow
114
+ title={nls.localizeByDefault('Reasoning')}
115
+ description={savedLevel
116
+ ? nls.localize('theia/ai/core/languageModelRenderer/reasoningStored',
117
+ 'Reasoning effort this agent asks the model for. Set here or by the chat input\'s selector, which writes the same setting.')
118
+ : nls.localize('theia/ai/core/languageModelRenderer/reasoningInherited',
119
+ 'Reasoning effort this agent asks the model for. Not set, so "{0}" applies, from the reasoning defaults preference or the model.',
120
+ reasoningLevelLabel(inheritedLevel))}
121
+ modified={savedLevel !== undefined}
122
+ below={<SelectComponent
123
+ className={`ai-config-select ai-configuration-value-row-value theia-ReasoningLevelSelector reasoning-level-${effectiveLevel}`}
124
+ options={options}
125
+ defaultValue={effectiveLevel}
126
+ onChange={handleChange}
127
+ />}
128
+ onOpenMenu={savedLevel !== undefined ? gear => settingsRowService.openResetMenu(gear, onReset) : undefined}
129
+ />;
130
+ };
131
+
132
+ export const LanguageModelRenderer: React.FC<LanguageModelSettingsProps> = (
133
+ { agent, languageModels, aiSettingsService, languageModelRegistry, languageModelAliases: aliases, settingsRowService }) => {
37
134
 
38
135
  const [lmRequirementMap, setLmRequirementMap] = React.useState<Record<string, LanguageModelRequirement>>({});
136
+ const [overriddenPurposes, setOverriddenPurposes] = React.useState<ReadonlySet<string>>(new Set());
39
137
  const [resolvedAliasModels, setResolvedAliasModels] = React.useState<Record<string, LanguageModel | undefined>>({});
138
+ /** Level stored for this agent, as the chat input's selector persists it; `undefined` means inherited. */
139
+ const [savedReasoningLevel, setSavedReasoningLevel] = React.useState<ReasoningLevel | undefined>(undefined);
40
140
 
41
- React.useEffect(() => {
42
- const computeLmRequirementMap = async () => {
43
- const map = await agent.languageModelRequirements.reduce(async (accPromise, curr) => {
44
- const acc = await accPromise;
45
- // take the agents requirements and override them with the user settings if present
46
- const lmRequirement = await findLanguageModelRequirement(curr.purpose) ?? curr;
47
- // if no llm is selected through the identifier, see what would be the default
48
- if (!lmRequirement.identifier) {
49
- const llm = await languageModelRegistry.selectLanguageModel({ agent: agent.id, ...lmRequirement });
50
- (lmRequirement as Mutable<LanguageModelRequirement>).identifier = llm?.id;
51
- }
52
- acc[curr.purpose] = lmRequirement;
53
- return acc;
54
- }, Promise.resolve({} as Record<string, LanguageModelRequirement>));
55
- setLmRequirementMap(map);
56
- };
57
- computeLmRequirementMap();
58
- }, []);
141
+ // Merge the agent's declared requirements with the user's per-purpose overrides, resolving a default model
142
+ // where none is selected, and track which purposes the user has explicitly overridden (for the reset action).
143
+ const loadRequirements = React.useCallback(async (): Promise<void> => {
144
+ const settings = await aiSettingsService.getAgentSettings(agent.id);
145
+ const userRequirements = settings?.languageModelRequirements ?? [];
146
+ const overrides = new Set<string>();
147
+ const map: Record<string, LanguageModelRequirement> = {};
148
+ for (const declared of agent.languageModelRequirements) {
149
+ const userRequirement = userRequirements.find(e => e.purpose === declared.purpose);
150
+ if (userRequirement) {
151
+ overrides.add(declared.purpose);
152
+ }
153
+ const lmRequirement = userRequirement ?? declared;
154
+ if (!lmRequirement.identifier) {
155
+ const llm = await languageModelRegistry.selectLanguageModel({ agent: agent.id, ...lmRequirement });
156
+ (lmRequirement as Mutable<LanguageModelRequirement>).identifier = llm?.id;
157
+ }
158
+ map[declared.purpose] = lmRequirement;
159
+ }
160
+ setLmRequirementMap(map);
161
+ setOverriddenPurposes(overrides);
162
+ setSavedReasoningLevel(settings?.reasoning?.level);
163
+ }, [agent, aiSettingsService, languageModelRegistry]);
164
+
165
+ React.useEffect(() => { loadRequirements(); }, [loadRequirements]);
59
166
 
60
167
  // Effect to resolve alias to model whenever requirements.identifier or aliases change
61
168
  React.useEffect(() => {
@@ -72,89 +179,126 @@ export const LanguageModelRenderer: React.FC<LanguageModelSettingsProps> = (
72
179
  resolveAliases();
73
180
  }, [lmRequirementMap, aliases]);
74
181
 
75
- const onSelectedModelChange = (purpose: string, event: React.ChangeEvent<HTMLSelectElement>): void => {
76
- const newLmRequirementMap = { ...lmRequirementMap, [purpose]: { purpose, identifier: event.target.value } };
182
+ /**
183
+ * The model behind the agent's requirements that declares reasoning support, and the id it is known by.
184
+ * Mirrors the chat input, which takes the first supporting model it resolves for the receiving agent.
185
+ */
186
+ const reasoningModel = React.useMemo<LanguageModel | undefined>(() => {
187
+ for (const requirement of Object.values(lmRequirementMap)) {
188
+ const identifier = requirement.identifier;
189
+ if (!identifier) {
190
+ continue;
191
+ }
192
+ const model = aliases.some(alias => alias.id === identifier)
193
+ ? resolvedAliasModels[identifier]
194
+ : languageModels?.find(candidate => candidate.id === identifier);
195
+ if (model?.reasoningSupport) {
196
+ return model;
197
+ }
198
+ }
199
+ return undefined;
200
+ }, [lmRequirementMap, resolvedAliasModels, aliases, languageModels]);
201
+
202
+ /** What applies while the agent stores no level: the matching reasoning default, else the model's own. */
203
+ const inheritedReasoningLevel = React.useMemo<ReasoningLevel>(() => {
204
+ const support = reasoningModel?.reasoningSupport;
205
+ if (!support) {
206
+ return 'off';
207
+ }
208
+ const entries = settingsRowService.inspect(PREFERENCE_NAME_REASONING, 'user').value as ReasoningPreferenceEntry[] | undefined;
209
+ const [providerId, modelId] = (reasoningModel?.id ?? '').split('/');
210
+ const fromPreference = entries?.length
211
+ ? mergeReasoningSettings(entries, modelId, providerId, agent.id)?.reasoning?.level
212
+ : undefined;
213
+ return fromPreference ?? support.defaultLevel ?? support.supportedLevels[0] ?? 'off';
214
+ }, [reasoningModel, settingsRowService, agent.id]);
215
+
216
+ const onReasoningChange = React.useCallback(async (level: ReasoningLevel): Promise<void> => {
217
+ await aiSettingsService.updateAgentSettings(agent.id, { reasoning: { level } });
218
+ setSavedReasoningLevel(level);
219
+ }, [aiSettingsService, agent.id]);
220
+
221
+ // Drop the stored level so the preference default (or the model's) applies again.
222
+ const onResetReasoning = React.useCallback(async (): Promise<void> => {
223
+ await aiSettingsService.updateAgentSettings(agent.id, { reasoning: undefined });
224
+ setSavedReasoningLevel(undefined);
225
+ }, [aiSettingsService, agent.id]);
226
+
227
+ const onSelectedModelChange = React.useCallback((purpose: string, identifier: string): void => {
228
+ const newLmRequirementMap = { ...lmRequirementMap, [purpose]: { purpose, identifier } };
77
229
  aiSettingsService.updateAgentSettings(agent.id, { languageModelRequirements: Object.values(newLmRequirementMap) });
78
230
  setLmRequirementMap(newLmRequirementMap);
79
- };
231
+ setOverriddenPurposes(previous => new Set(previous).add(purpose));
232
+ }, [lmRequirementMap, aiSettingsService, agent.id]);
233
+
234
+ // Reset a purpose: drop the user override so it falls back to the agent's declared requirement.
235
+ const onResetPurpose = React.useCallback(async (purpose: string): Promise<void> => {
236
+ const settings = await aiSettingsService.getAgentSettings(agent.id);
237
+ const remaining = (settings?.languageModelRequirements ?? []).filter(requirement => requirement.purpose !== purpose);
238
+ await aiSettingsService.updateAgentSettings(agent.id, { languageModelRequirements: remaining });
239
+ await loadRequirements();
240
+ }, [aiSettingsService, agent.id, loadRequirements]);
241
+
242
+ // The empty entry preserves the "no selection" choice; aliases are listed first, then language models.
243
+ const modelSelectOptions = React.useMemo<SelectOption[]>(() => {
244
+ const options: SelectOption[] = [{ value: '', label: '' }];
245
+ aliases?.slice().sort((a, b) => a.id.localeCompare(b.id)).forEach(alias => {
246
+ options.push({
247
+ value: alias.id,
248
+ label: nls.localize('theia/ai/core/languageModelRenderer/alias', '[alias] {0}', alias.id)
249
+ });
250
+ });
251
+ languageModels?.slice().sort((a, b) => (a.name ?? a.id).localeCompare(b.name ?? b.id)).forEach(model => {
252
+ const isNotReady = model.status.status !== 'ready';
253
+ options.push({
254
+ value: model.id,
255
+ label: `${model.name ?? model.id} ${isNotReady ? '✗' : '✓'}`,
256
+ description: isNotReady && model.status.message ? model.status.message : undefined
257
+ });
258
+ });
259
+ return options;
260
+ }, [aliases, languageModels]);
80
261
 
81
262
  return <div className='language-model-container'>
82
263
  {lmRequirementMap && Object.keys(lmRequirementMap).length > 0 ? (
83
264
  <div className="settings-section-subcategory-title ai-settings-section-subcategory-title">
84
- {nls.localize('theia/ai/core/agentConfiguration/llmRequirements', 'LLM Requirements')}
265
+ {nls.localizeByDefault('Language Models')}
85
266
  </div>
86
267
  ) : undefined}
87
- {Object.values(lmRequirementMap).map((requirement, index) => {
88
- const isAlias = requirement.identifier && aliases.some(a => a.id === requirement.identifier);
89
- const resolvedModel = isAlias ? resolvedAliasModels[requirement.identifier] : undefined;
90
- return (
91
- <div key={index} className="ai-llm-requirement-item">
92
- <div className="ai-configuration-value-row">
93
- <span className="ai-configuration-value-row-label">{nls.localize('theia/ai/core/languageModelRenderer/purpose', 'Purpose')}:</span>
94
- <span className="ai-configuration-value-row-value">{requirement.purpose}</span>
95
- </div>
96
- <div className="ai-configuration-value-row">
97
- <label
98
- className="ai-configuration-value-row-label"
99
- style={{ lineHeight: '1.4' }}
100
- htmlFor={`model-select-${agent.id}-${requirement.purpose}`}>
101
- {nls.localize('theia/ai/core/languageModelRenderer/languageModel', 'Language Model')}:
102
- </label>
103
- <select
104
- className="theia-select ai-configuration-value-row-value"
105
- id={`model-select-${agent.id}-${requirement.purpose}`}
106
- style={{ maxWidth: '400px' }}
107
- value={requirement.identifier}
108
- onChange={event => onSelectedModelChange(requirement.purpose, event)}
109
- >
110
- <option value=""></option>
111
- {/* Aliases first, then languange models */}
112
- {aliases?.sort((a, b) => a.id.localeCompare(b.id)).map(alias => (
113
- <option key={`alias/${alias.id}`} value={alias.id} className='ai-language-model-item-ready'>
114
- {nls.localize('theia/ai/core/languageModelRenderer/alias', '[alias] {0}', alias.id)}
115
- </option>
116
- ))}
117
- {languageModels?.sort((a, b) => (a.name ?? a.id).localeCompare(b.name ?? b.id)).map(model => {
118
- const isNotReady = model.status.status !== 'ready';
119
- return (
120
- <option
121
- key={model.id}
122
- value={model.id}
123
- className={isNotReady ? 'ai-language-model-item-not-ready' : 'ai-language-model-item-ready'}
124
- title={isNotReady && model.status.message ? model.status.message : undefined}
125
- >
126
- {model.name ?? model.id} {isNotReady ? '✗' : '✓'}
127
- </option>
128
- );
129
- })}
130
- </select>
131
- </div>
132
- {/* If alias is selected, show what it currently evaluates to */}
133
- {isAlias && (
134
- <div className="ai-configuration-value-row">
135
- <span className="ai-configuration-value-row-label">{nls.localize('theia/ai/core/modelAliasesConfiguration/evaluatesTo', 'Evaluates to')}:</span>
136
- {resolvedModel ? (
137
- <span className="ai-configuration-value-row-value">
138
- {resolvedModel.name ?? resolvedModel.id}
139
- {resolvedModel.status.status === 'ready' ? (
140
- <span className="ai-model-status-ready"
141
- title={nls.localize('theia/ai/core/modelAliasesConfiguration/modelReadyTooltip', 'Ready')}>✓</span>
142
- ) : (
143
- <span className="ai-model-status-not-ready" title={resolvedModel.status.message
144
- || nls.localize('theia/ai/core/modelAliasesConfiguration/modelNotReadyTooltip', 'Not ready')}>✗</span>
145
- )}
146
- </span>
147
- ) : (
148
- <span className="ai-configuration-value-row-value ai-alias-evaluates-to-unresolved">
149
- {nls.localize('theia/ai/core/modelAliasesConfiguration/noResolvedModel', 'No model ready for this alias.')}
150
- <span className="ai-model-status-not-ready"
151
- title={nls.localize('theia/ai/core/modelAliasesConfiguration/noModelReadyTooltip', 'No model ready')}>✗</span>
152
- </span>
153
- )}
154
- </div>
155
- )}
156
- </div>
157
- );
268
+ {Object.values(lmRequirementMap).map(requirement => {
269
+ const isAlias = !!requirement.identifier && aliases.some(a => a.id === requirement.identifier);
270
+ const resolvedModel = isAlias && requirement.identifier ? resolvedAliasModels[requirement.identifier] : undefined;
271
+ const isOverridden = overriddenPurposes.has(requirement.purpose);
272
+ return <AiConfigurationSettingRow
273
+ key={requirement.purpose}
274
+ title={nls.localize('theia/ai/core/languageModelRenderer/purposeTitle', 'Purpose: {0}', requirement.purpose)}
275
+ modified={isOverridden}
276
+ below={<>
277
+ <ModelSelect
278
+ id={`model-select-${agent.id}-${requirement.purpose}`}
279
+ purpose={requirement.purpose}
280
+ value={requirement.identifier}
281
+ options={modelSelectOptions}
282
+ onSelect={onSelectedModelChange}
283
+ />
284
+ {isAlias && <div className='ai-lm-evaluates-to'>
285
+ <span className='ai-lm-evaluates-to-label'>{nls.localize('theia/ai/core/modelAliasesConfiguration/evaluatesTo', 'Evaluates to')}:</span>
286
+ {resolvedModel
287
+ ? <span>{resolvedModel.name ?? resolvedModel.id} {resolvedModel.status.status === 'ready' ? '✓' : '✗'}</span>
288
+ : <span className='ai-alias-evaluates-to-unresolved'>
289
+ {nls.localize('theia/ai/core/modelAliasesConfiguration/noResolvedModel', 'No model ready for this alias.')}</span>}
290
+ </div>}
291
+ </>}
292
+ onOpenMenu={gear => settingsRowService.openResetMenu(gear, () => onResetPurpose(requirement.purpose))}
293
+ />;
158
294
  })}
295
+ {reasoningModel?.reasoningSupport && <ReasoningRow
296
+ support={reasoningModel.reasoningSupport}
297
+ savedLevel={savedReasoningLevel}
298
+ inheritedLevel={inheritedReasoningLevel}
299
+ onSelect={onReasoningChange}
300
+ onReset={onResetReasoning}
301
+ settingsRowService={settingsRowService}
302
+ />}
159
303
  </div>;
160
304
  };
@@ -20,8 +20,8 @@ import { AbstractStreamParsingChatAgent } from '@theia/ai-chat/lib/common/chat-a
20
20
  import { ErrorChatResponseContentImpl, MarkdownChatResponseContentImpl, MutableChatRequestModel, QuestionResponseContentImpl } from '@theia/ai-chat/lib/common/chat-model';
21
21
  import { LanguageModelRequirement } from '@theia/ai-core/lib/common';
22
22
  import { MCPFrontendService, MCPServerDescription } from '@theia/ai-mcp/lib/common/mcp-server-manager';
23
- import { nls } from '@theia/core';
24
- import { inject, injectable } from '@theia/core/shared/inversify';
23
+ import { ILogger, nls } from '@theia/core';
24
+ import { inject, injectable, named } from '@theia/core/shared/inversify';
25
25
  import { MCP_SERVERS_PREF } from '@theia/ai-mcp/lib/common/mcp-preferences';
26
26
  import { PreferenceScope, PreferenceService } from '@theia/core/lib/common';
27
27
  import { appTesterPlaywrightTemplate, appTesterDefaultTemplate, appTesterNextTemplate, REQUIRED_MCP_SERVERS, REQUIRED_MCP_SERVERS_NEXT } from './app-tester-prompt-template';
@@ -30,6 +30,9 @@ export const AppTesterChatAgentId = 'AppTester';
30
30
  @injectable()
31
31
  export class AppTesterChatAgent extends AbstractStreamParsingChatAgent {
32
32
 
33
+ @inject(ILogger) @named('ai-ide:AppTesterChatAgent')
34
+ protected override readonly logger: ILogger;
35
+
33
36
  @inject(MCPFrontendService)
34
37
  protected readonly mcpService: MCPFrontendService;
35
38
 
@@ -19,9 +19,9 @@ import {
19
19
  } from '@theia/ai-chat/lib/common';
20
20
  import { TaskContextStorageService } from '@theia/ai-chat/lib/browser/task-context-service';
21
21
  import { LanguageModelRequirement } from '@theia/ai-core';
22
- import { inject, injectable } from '@theia/core/shared/inversify';
22
+ import { inject, injectable, named } from '@theia/core/shared/inversify';
23
23
  import { architectSystemVariants, ARCHITECT_PLANNING_PROMPT_ID, ARCHITECT_SIMPLE_PROMPT_ID, ARCHITECT_PLANNING_NEXT_PROMPT_ID } from './architect-prompt-template';
24
- import { nls } from '@theia/core';
24
+ import { ILogger, nls } from '@theia/core';
25
25
  import { FrontendApplicationConfigProvider } from '@theia/core/lib/browser/frontend-application-config-provider';
26
26
  import { MarkdownStringImpl } from '@theia/core/lib/common/markdown-rendering';
27
27
  import { AI_EXECUTE_PLAN_WITH_CODER } from '../common/summarize-session-commands';
@@ -32,6 +32,9 @@ export { ArchitectAgentId };
32
32
 
33
33
  @injectable()
34
34
  export class ArchitectAgent extends AbstractModeAwareChatAgent {
35
+ @inject(ILogger) @named('ai-ide:ArchitectAgent')
36
+ protected override readonly logger: ILogger;
37
+
35
38
  @inject(ChatService) protected readonly chatService: ChatService;
36
39
  @inject(TaskContextStorageService) protected readonly taskContextStorageService: TaskContextStorageService;
37
40
 
@@ -19,6 +19,7 @@ import {
19
19
  GET_WORKSPACE_FILE_LIST_FUNCTION_ID, FILE_CONTENT_FUNCTION_ID, SEARCH_IN_WORKSPACE_FUNCTION_ID, FIND_FILES_BY_PATTERN_FUNCTION_ID
20
20
  } from '../common/workspace-functions';
21
21
  import { CONTEXT_FILES_VARIABLE_ID, TASK_CONTEXT_SUMMARY_VARIABLE_ID } from '../common/context-variables';
22
+ import { OPEN_EDITORS_HINT_FRAGMENT_ID } from '../common/open-editors-hint-fragment-id';
22
23
  import {
23
24
  CREATE_TASK_CONTEXT_FUNCTION_ID,
24
25
  GET_TASK_CONTEXT_FUNCTION_ID,
@@ -194,6 +195,8 @@ When a diagram clarifies an architectural concept or how something is implemente
194
195
 
195
196
  {{prompt:project-info}}
196
197
 
198
+ {{prompt:${OPEN_EDITORS_HINT_FRAGMENT_ID}}}
199
+
197
200
  {{${TASK_CONTEXT_SUMMARY_VARIABLE_ID}}}
198
201
  `
199
202
  },
@@ -231,6 +234,8 @@ Always look at the relevant files to understand your task using the function ~{$
231
234
  {{${CONTEXT_FILES_VARIABLE_ID}}}
232
235
 
233
236
  {{prompt:project-info}}
237
+
238
+ {{prompt:${OPEN_EDITORS_HINT_FRAGMENT_ID}}}
234
239
  `
235
240
  },
236
241
  {
@@ -464,6 +469,8 @@ When a diagram clarifies an architectural concept or how something is implemente
464
469
 
465
470
  {{prompt:project-info}}
466
471
 
472
+ {{prompt:${OPEN_EDITORS_HINT_FRAGMENT_ID}}}
473
+
467
474
  {{${TASK_CONTEXT_SUMMARY_VARIABLE_ID}}}
468
475
  `
469
476
  }]
@@ -187,15 +187,13 @@ export function ChatSessionItem(props: ChatSessionItemComponentProps): React.Rea
187
187
 
188
188
  const handleMouseLeave = React.useCallback(() => {
189
189
  hoverActiveRef.current = false;
190
- hoverService.cancelHover();
191
- }, [hoverService]);
190
+ }, []);
192
191
 
193
192
  const handleMouseOver = React.useCallback((e: React.MouseEvent) => {
194
193
  if ((e.target as Element).closest('.theia-chat-session-item-action')) {
195
194
  hoverActiveRef.current = false;
196
- hoverService.cancelHover();
197
195
  }
198
- }, [hoverService]);
196
+ }, []);
199
197
 
200
198
  const handleKeyDown = React.useCallback((e: React.KeyboardEvent) => {
201
199
  if (isActivationKey(e)) {
@@ -17,9 +17,9 @@
17
17
  import { ChatService, ChatSession, ChatSessionMetadata, ChatSessionStatus } from '@theia/ai-chat';
18
18
  import { PERSISTED_SESSION_LIMIT_PREF, SESSION_STORAGE_PREF } from '@theia/ai-chat/lib/common/ai-chat-preferences';
19
19
  import { ChatViewWidget } from '@theia/ai-chat-ui/lib/browser/chat-view-widget';
20
- import { DisposableCollection, Emitter, Event, PreferenceService } from '@theia/core';
20
+ import { DisposableCollection, Emitter, Event, ILogger, PreferenceService } from '@theia/core';
21
21
  import { ApplicationShell } from '@theia/core/lib/browser';
22
- import { inject, injectable, postConstruct } from '@theia/core/shared/inversify';
22
+ import { inject, injectable, named, postConstruct } from '@theia/core/shared/inversify';
23
23
  import { UnreadStateProvider } from './chat-session-item';
24
24
  import { SectionedSessions, SessionRow, parentIdOf } from './chat-session-list-components';
25
25
 
@@ -35,6 +35,9 @@ export class ChatSessionListService implements UnreadStateProvider {
35
35
  @inject(ApplicationShell)
36
36
  protected readonly shell: ApplicationShell;
37
37
 
38
+ @inject(ILogger) @named('ai-ide:ChatSessionListService')
39
+ protected readonly logger: ILogger;
40
+
38
41
  private readonly unreadSessions = new Map<string, {
39
42
  unread: boolean;
40
43
  requiresAction: boolean;
@@ -174,7 +177,7 @@ export class ChatSessionListService implements UnreadStateProvider {
174
177
  this._persistedSessions = Object.values(index)
175
178
  .toSorted((a, b) => b.saveDate - a.saveDate);
176
179
  } catch (error) {
177
- console.error('Failed to load persisted sessions:', error);
180
+ this.logger.error('Failed to load persisted sessions:', error);
178
181
  this._persistedSessions = [];
179
182
  } finally {
180
183
  this.onStateChangedEmitter.fire();
@@ -16,14 +16,17 @@
16
16
 
17
17
  import { AbstractStreamParsingChatAgent } from '@theia/ai-chat/lib/common/chat-agents';
18
18
  import { LanguageModelRequirement } from '@theia/ai-core/lib/common';
19
- import { nls } from '@theia/core';
20
- import { injectable } from '@theia/core/shared/inversify';
19
+ import { ILogger, nls } from '@theia/core';
20
+ import { inject, injectable, named } from '@theia/core/shared/inversify';
21
21
  import { codeReviewerSystemPrompt, CODE_REVIEWER_SYSTEM_PROMPT_ID } from './code-reviewer-prompt-template';
22
22
 
23
23
  export const CodeReviewerAgentId = 'code-reviewer';
24
24
 
25
25
  @injectable()
26
26
  export class CodeReviewerAgent extends AbstractStreamParsingChatAgent {
27
+ @inject(ILogger) @named('ai-ide:CodeReviewerAgent')
28
+ protected override readonly logger: ILogger;
29
+
27
30
  name = 'Code Reviewer';
28
31
  id = CodeReviewerAgentId;
29
32
  languageModelRequirements: LanguageModelRequirement[] = [{