@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
@@ -1,166 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2026 EclipseSource GmbH.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- var AISkillsConfigurationWidget_1;
18
- Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.AISkillsConfigurationWidget = void 0;
20
- const tslib_1 = require("tslib");
21
- const core_1 = require("@theia/core");
22
- const browser_1 = require("@theia/core/lib/browser");
23
- const inversify_1 = require("@theia/core/shared/inversify");
24
- const React = require("@theia/core/shared/react");
25
- const skill_service_1 = require("@theia/ai-core/lib/browser/skill-service");
26
- const prompt_service_1 = require("@theia/ai-core/lib/common/prompt-service");
27
- const ai_core_1 = require("@theia/ai-core");
28
- const ai_chat_1 = require("@theia/ai-chat");
29
- let AISkillsConfigurationWidget = class AISkillsConfigurationWidget extends browser_1.ReactWidget {
30
- constructor() {
31
- super(...arguments);
32
- this.skills = [];
33
- this.slashCommands = [];
34
- this.agents = [];
35
- this.openSkill = (skill) => {
36
- (0, browser_1.open)(this.openerService, core_1.URI.fromFilePath(skill.location));
37
- };
38
- }
39
- static { AISkillsConfigurationWidget_1 = this; }
40
- static { this.ID = 'ai-skills-configuration-widget'; }
41
- static { this.LABEL = core_1.nls.localizeByDefault('Skills'); }
42
- init() {
43
- this.id = AISkillsConfigurationWidget_1.ID;
44
- this.title.label = AISkillsConfigurationWidget_1.LABEL;
45
- this.title.closable = false;
46
- this.addClass('ai-configuration-widget');
47
- this.loadSkills();
48
- this.loadSlashCommands();
49
- this.loadAgents();
50
- this.update();
51
- this.toDispose.pushAll([
52
- this.skillService.onSkillsChanged(() => {
53
- this.loadSkills();
54
- this.update();
55
- }),
56
- this.promptService.onPromptsChange(() => {
57
- this.loadSlashCommands();
58
- this.update();
59
- }),
60
- this.agentService.onDidChangeAgents(() => {
61
- this.loadAgents();
62
- this.update();
63
- })
64
- ]);
65
- }
66
- loadSkills() {
67
- this.skills = this.skillService.getSkills().sort((a, b) => a.name.localeCompare(b.name));
68
- }
69
- loadSlashCommands() {
70
- this.slashCommands = this.promptService.getCommands().sort((a, b) => {
71
- const nameA = a.commandName ?? a.id;
72
- const nameB = b.commandName ?? b.id;
73
- return nameA.localeCompare(nameB);
74
- });
75
- }
76
- loadAgents() {
77
- this.agents = this.agentService.getAllAgents();
78
- }
79
- getAgentsForCommand(command) {
80
- if (!command.commandAgents || command.commandAgents.length === 0) {
81
- return [];
82
- }
83
- return this.agents.filter(agent => command.commandAgents.includes(agent.id));
84
- }
85
- render() {
86
- return (React.createElement("div", { className: "ai-skills-configuration-container" },
87
- this.renderSkillsSection(),
88
- this.renderSlashCommandsSection()));
89
- }
90
- renderSkillsSection() {
91
- return (React.createElement("div", { className: "ai-skills-section" },
92
- React.createElement("h3", { className: "section-header" }, core_1.nls.localizeByDefault('Skills')),
93
- this.skills.length === 0 ? (React.createElement("div", { className: "ai-empty-state-content" }, core_1.nls.localize('theia/ai/ide/skillsConfiguration/noSkills', 'No skills available'))) : (React.createElement("div", { className: "ai-configuration-table-container" },
94
- React.createElement("table", { className: "ai-configuration-table" },
95
- React.createElement("thead", null,
96
- React.createElement("tr", null,
97
- React.createElement("th", { className: "skill-name-column" }, core_1.nls.localizeByDefault('Name')),
98
- React.createElement("th", { className: "skill-description-column" }, core_1.nls.localizeByDefault('Description')),
99
- React.createElement("th", { className: "skill-location-column" }, core_1.nls.localizeByDefault('Location')),
100
- React.createElement("th", { className: "skill-open-column" }))),
101
- React.createElement("tbody", null, this.skills.map(skill => this.renderSkillRow(skill))))))));
102
- }
103
- renderSkillRow(skill) {
104
- return (React.createElement("tr", { key: skill.name },
105
- React.createElement("td", { className: "skill-name-column" },
106
- React.createElement("span", null, skill.name)),
107
- React.createElement("td", { className: "skill-description-column" },
108
- React.createElement("span", null, skill.description)),
109
- React.createElement("td", { className: "skill-location-column" },
110
- React.createElement("span", null, skill.location)),
111
- React.createElement("td", { className: "skill-open-column" },
112
- React.createElement("button", { className: "theia-button secondary", onClick: () => this.openSkill(skill), title: core_1.nls.localizeByDefault('Open') }, core_1.nls.localizeByDefault('Open')))));
113
- }
114
- renderSlashCommandsSection() {
115
- return (React.createElement("div", { className: "ai-slash-commands-section" },
116
- React.createElement("h3", { className: "section-header" }, core_1.nls.localize('theia/ai/ide/skillsConfiguration/slashCommandsSectionHeader', 'Slash Commands')),
117
- this.slashCommands.length === 0 ? (React.createElement("div", { className: "ai-empty-state-content" }, core_1.nls.localize('theia/ai/ide/skillsConfiguration/noSlashCommands', 'No slash commands available'))) : (React.createElement("div", { className: "ai-configuration-table-container" },
118
- React.createElement("table", { className: "ai-configuration-table" },
119
- React.createElement("thead", null,
120
- React.createElement("tr", null,
121
- React.createElement("th", { className: "slash-command-name-column" }, core_1.nls.localizeByDefault('Command')),
122
- React.createElement("th", { className: "slash-command-description-column" }, core_1.nls.localizeByDefault('Description')),
123
- React.createElement("th", { className: "slash-command-agents-column" }, core_1.nls.localizeByDefault('Agents')))),
124
- React.createElement("tbody", null, this.slashCommands.map(command => this.renderSlashCommandRow(command))))))));
125
- }
126
- renderSlashCommandRow(command) {
127
- const agents = this.getAgentsForCommand(command);
128
- const isGlobalCommand = !command.commandAgents || command.commandAgents.length === 0;
129
- return (React.createElement("tr", { key: command.id },
130
- React.createElement("td", { className: "slash-command-name-column" },
131
- React.createElement("span", { className: "slash-command-prefix" }, "/"),
132
- React.createElement("span", null, command.commandName ?? command.id)),
133
- React.createElement("td", { className: "slash-command-description-column" },
134
- React.createElement("span", null, command.commandDescription ?? '')),
135
- React.createElement("td", { className: "slash-command-agents-column" }, isGlobalCommand ? (React.createElement("span", { className: "slash-command-all-agents" }, core_1.nls.localize('theia/ai/ide/skillsConfiguration/slashCommand/allAgents', 'All agents'))) : (React.createElement("div", { className: "slash-command-agent-chips" }, agents.map(agent => (React.createElement("span", { key: agent.id, className: "agent-chip", title: agent.description },
136
- React.createElement("span", { className: ((0, ai_chat_1.isChatAgent)(agent) && agent.iconClass) ? agent.iconClass : (0, browser_1.codicon)('copilot') }),
137
- agent.name))))))));
138
- }
139
- };
140
- exports.AISkillsConfigurationWidget = AISkillsConfigurationWidget;
141
- tslib_1.__decorate([
142
- (0, inversify_1.inject)(skill_service_1.SkillService),
143
- tslib_1.__metadata("design:type", Object)
144
- ], AISkillsConfigurationWidget.prototype, "skillService", void 0);
145
- tslib_1.__decorate([
146
- (0, inversify_1.inject)(browser_1.OpenerService),
147
- tslib_1.__metadata("design:type", Object)
148
- ], AISkillsConfigurationWidget.prototype, "openerService", void 0);
149
- tslib_1.__decorate([
150
- (0, inversify_1.inject)(prompt_service_1.PromptService),
151
- tslib_1.__metadata("design:type", Object)
152
- ], AISkillsConfigurationWidget.prototype, "promptService", void 0);
153
- tslib_1.__decorate([
154
- (0, inversify_1.inject)(ai_core_1.AgentService),
155
- tslib_1.__metadata("design:type", Object)
156
- ], AISkillsConfigurationWidget.prototype, "agentService", void 0);
157
- tslib_1.__decorate([
158
- (0, inversify_1.postConstruct)(),
159
- tslib_1.__metadata("design:type", Function),
160
- tslib_1.__metadata("design:paramtypes", []),
161
- tslib_1.__metadata("design:returntype", void 0)
162
- ], AISkillsConfigurationWidget.prototype, "init", null);
163
- exports.AISkillsConfigurationWidget = AISkillsConfigurationWidget = AISkillsConfigurationWidget_1 = tslib_1.__decorate([
164
- (0, inversify_1.injectable)()
165
- ], AISkillsConfigurationWidget);
166
- //# sourceMappingURL=skills-configuration-widget.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"skills-configuration-widget.js","sourceRoot":"","sources":["../../../src/browser/ai-configuration/skills-configuration-widget.tsx"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;;AAEhF,sCAAuC;AACvC,qDAAoF;AACpF,4DAAiF;AACjF,kDAAkD;AAElD,4EAAwE;AACxE,6EAAyF;AACzF,4CAAqD;AACrD,4CAA6C;AAGtC,IAAM,2BAA2B,GAAjC,MAAM,2BAA4B,SAAQ,qBAAW;IAArD;;QAgBO,WAAM,GAAY,EAAE,CAAC;QACrB,kBAAa,GAAqB,EAAE,CAAC;QACrC,WAAM,GAAY,EAAE,CAAC;QAoDrB,cAAS,GAAG,CAAC,KAAY,EAAQ,EAAE;YACzC,IAAA,cAAI,EAAC,IAAI,CAAC,aAAa,EAAE,UAAG,CAAC,YAAY,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC/D,CAAC,CAAC;IAiIN,CAAC;;aAxMmB,OAAE,GAAG,gCAAgC,AAAnC,CAAoC;aACtC,UAAK,GAAG,UAAG,CAAC,iBAAiB,CAAC,QAAQ,CAAC,AAAlC,CAAmC;IAmB9C,IAAI;QACV,IAAI,CAAC,EAAE,GAAG,6BAA2B,CAAC,EAAE,CAAC;QACzC,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,6BAA2B,CAAC,KAAK,CAAC;QACrD,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC;QAC5B,IAAI,CAAC,QAAQ,CAAC,yBAAyB,CAAC,CAAC;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AAM,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE,SAAS,EAAC,YAAY,EAAC,KAAK,EAAE,KAAK,CAAC,WAAW;gBAChE,8BAAM,SAAS,EAAE,CAAC,IAAA,qBAAW,EAAC,KAAK,CAAC,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,IAAA,iBAAO,EAAC,SAAS,CAAC,GAAS;gBACvG,KAAK,CAAC,IAAI,CACR,CACV,CAAC,CACA,CACT,CACA,CACJ,CACR,CAAC;IACN,CAAC;;AAxMQ,kEAA2B;AAKjB;IADlB,IAAA,kBAAM,EAAC,4BAAY,CAAC;;iEACyB;AAG3B;IADlB,IAAA,kBAAM,EAAC,uBAAa,CAAC;;kEAC0B;AAG7B;IADlB,IAAA,kBAAM,EAAC,8BAAa,CAAC;;kEAC0B;AAG7B;IADlB,IAAA,kBAAM,EAAC,sBAAY,CAAC;;iEACyB;AAOpC;IADT,IAAA,yBAAa,GAAE;;;;uDAyBf;sCA7CQ,2BAA2B;IADvC,IAAA,sBAAU,GAAE;GACA,2BAA2B,CAyMvC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=skills-configuration-widget.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"skills-configuration-widget.spec.d.ts","sourceRoot":"","sources":["../../../src/browser/ai-configuration/skills-configuration-widget.spec.ts"],"names":[],"mappings":""}
@@ -1,191 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2026 EclipseSource GmbH.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- const jsdom_1 = require("@theia/core/lib/browser/test/jsdom");
19
- let disableJSDOM = (0, jsdom_1.enableJSDOM)();
20
- let disableReactActEnvironment = (0, jsdom_1.enableReactActEnvironment)();
21
- const frontend_application_config_provider_1 = require("@theia/core/lib/browser/frontend-application-config-provider");
22
- frontend_application_config_provider_1.FrontendApplicationConfigProvider.set({});
23
- const chai_1 = require("chai");
24
- const React = require("@theia/core/shared/react");
25
- const messaging_1 = require("@theia/core/shared/@lumino/messaging");
26
- const core_1 = require("@theia/core");
27
- const skills_configuration_widget_1 = require("./skills-configuration-widget");
28
- disableReactActEnvironment();
29
- disableJSDOM();
30
- describe('AISkillsConfigurationWidget', () => {
31
- let host;
32
- let widgets;
33
- before(() => {
34
- disableJSDOM = (0, jsdom_1.enableJSDOM)();
35
- disableReactActEnvironment = (0, jsdom_1.enableReactActEnvironment)();
36
- });
37
- after(() => {
38
- disableReactActEnvironment();
39
- disableJSDOM();
40
- });
41
- beforeEach(() => {
42
- host = document.createElement('div');
43
- document.body.appendChild(host);
44
- widgets = [];
45
- });
46
- afterEach(() => {
47
- React.act(() => {
48
- for (const widget of widgets) {
49
- widget.dispose();
50
- }
51
- });
52
- host.remove();
53
- });
54
- function renderWidget(widget) {
55
- React.act(() => {
56
- widget.update();
57
- messaging_1.MessageLoop.flush();
58
- });
59
- }
60
- function createMockSkillService(skills = []) {
61
- const onSkillsChangedEmitter = new core_1.Emitter();
62
- return {
63
- getSkills: () => skills,
64
- onSkillsChanged: onSkillsChangedEmitter.event
65
- };
66
- }
67
- function createMockPromptService(commands = []) {
68
- const onPromptsChangeEmitter = new core_1.Emitter();
69
- return {
70
- getCommands: () => commands,
71
- onPromptsChange: onPromptsChangeEmitter.event
72
- };
73
- }
74
- function createMockAgentService(agents = []) {
75
- const onDidChangeAgentsEmitter = new core_1.Emitter();
76
- return {
77
- getAllAgents: () => agents,
78
- onDidChangeAgents: onDidChangeAgentsEmitter.event
79
- };
80
- }
81
- function createWidget(skills = [], commands = [], agents = [], openerService) {
82
- const widget = new skills_configuration_widget_1.AISkillsConfigurationWidget();
83
- widget.skillService = createMockSkillService(skills);
84
- widget.promptService = createMockPromptService(commands);
85
- widget.agentService = createMockAgentService(agents);
86
- widget.openerService = (openerService ?? {});
87
- widget.init();
88
- host.appendChild(widget.node);
89
- widgets.push(widget);
90
- return widget;
91
- }
92
- // --- Skills section tests ---
93
- it('renders empty state when no skills are available', () => {
94
- const widget = createWidget();
95
- renderWidget(widget);
96
- const skillsSection = host.querySelector('.ai-skills-section');
97
- (0, chai_1.expect)(skillsSection).to.not.be.null;
98
- const emptyState = skillsSection.querySelector('.ai-empty-state-content');
99
- (0, chai_1.expect)(emptyState).to.not.be.null;
100
- });
101
- it('renders multiple skills with correct name/description/location', () => {
102
- const skills = [
103
- { name: 'Skill A', description: 'Desc A', location: '/path/a' },
104
- { name: 'Skill B', description: 'Desc B', location: '/path/b' }
105
- ];
106
- const widget = createWidget(skills);
107
- renderWidget(widget);
108
- const skillsSection = host.querySelector('.ai-skills-section');
109
- (0, chai_1.expect)(skillsSection).to.not.be.null;
110
- const rows = Array.from(skillsSection.querySelectorAll('tbody tr'));
111
- (0, chai_1.expect)(rows.length).to.equal(2);
112
- (0, chai_1.expect)(rows[0].querySelector('.skill-name-column')?.textContent).to.contain('Skill A');
113
- (0, chai_1.expect)(rows[0].querySelector('.skill-description-column')?.textContent).to.contain('Desc A');
114
- (0, chai_1.expect)(rows[0].querySelector('.skill-location-column')?.textContent).to.contain('/path/a');
115
- (0, chai_1.expect)(rows[1].querySelector('.skill-name-column')?.textContent).to.contain('Skill B');
116
- (0, chai_1.expect)(rows[1].querySelector('.skill-description-column')?.textContent).to.contain('Desc B');
117
- (0, chai_1.expect)(rows[1].querySelector('.skill-location-column')?.textContent).to.contain('/path/b');
118
- });
119
- it('clicking "Open" calls opener with URI.fromFilePath(skill.location)', async () => {
120
- const skills = [
121
- { name: 'Skill A', description: 'Desc A', location: '/path/a' }
122
- ];
123
- let openedUri;
124
- const opener = {
125
- id: 'test-opener',
126
- canHandle: async () => 1,
127
- open: async (uri) => { openedUri = uri; }
128
- };
129
- const openerService = {
130
- getOpener: async () => opener,
131
- getOpeners: async () => [opener]
132
- };
133
- const widget = createWidget(skills, [], [], openerService);
134
- renderWidget(widget);
135
- const button = host.querySelector('button[title="Open"]');
136
- (0, chai_1.expect)(button).to.not.be.null;
137
- button.click();
138
- await Promise.resolve();
139
- (0, chai_1.expect)(openedUri?.toString()).to.equal(core_1.URI.fromFilePath('/path/a').toString());
140
- });
141
- // --- Slash commands section tests ---
142
- it('renders slash commands section when commands are available', () => {
143
- const commands = [
144
- { id: 'cmd1', template: '', isCommand: true, commandName: 'test', commandDescription: 'Test command' },
145
- { id: 'cmd2', template: '', isCommand: true, commandName: 'help', commandDescription: 'Help command' }
146
- ];
147
- const widget = createWidget([], commands);
148
- renderWidget(widget);
149
- const slashCommandsSection = host.querySelector('.ai-slash-commands-section');
150
- (0, chai_1.expect)(slashCommandsSection).to.not.be.null;
151
- const rows = Array.from(slashCommandsSection.querySelectorAll('tbody tr'));
152
- (0, chai_1.expect)(rows.length).to.equal(2);
153
- // Commands are sorted alphabetically by name: 'help' comes before 'test'
154
- (0, chai_1.expect)(rows[0].querySelector('.slash-command-name-column')?.textContent).to.contain('/help');
155
- (0, chai_1.expect)(rows[0].querySelector('.slash-command-description-column')?.textContent).to.contain('Help command');
156
- (0, chai_1.expect)(rows[1].querySelector('.slash-command-name-column')?.textContent).to.contain('/test');
157
- (0, chai_1.expect)(rows[1].querySelector('.slash-command-description-column')?.textContent).to.contain('Test command');
158
- });
159
- it('renders empty state for slash commands when none are available', () => {
160
- const widget = createWidget();
161
- renderWidget(widget);
162
- const slashCommandsSection = host.querySelector('.ai-slash-commands-section');
163
- (0, chai_1.expect)(slashCommandsSection).to.not.be.null;
164
- const emptyState = slashCommandsSection.querySelector('.ai-empty-state-content');
165
- (0, chai_1.expect)(emptyState).to.not.be.null;
166
- });
167
- it('shows "All agents" when command has no specific agents', () => {
168
- const commands = [
169
- { id: 'cmd1', template: '', isCommand: true, commandName: 'global', commandDescription: 'Global command' }
170
- ];
171
- const widget = createWidget([], commands);
172
- renderWidget(widget);
173
- const allAgentsText = host.querySelector('.slash-command-all-agents');
174
- (0, chai_1.expect)(allAgentsText).to.not.be.null;
175
- });
176
- it('shows agent chips when command is restricted to specific agents', () => {
177
- const agents = [
178
- { id: 'agent1', name: 'Agent One', description: 'Test agent 1', variables: [], functions: [], prompts: [], agentSpecificVariables: [], languageModelRequirements: [] },
179
- { id: 'agent2', name: 'Agent Two', description: 'Test agent 2', variables: [], functions: [], prompts: [], agentSpecificVariables: [], languageModelRequirements: [] }
180
- ];
181
- const commands = [
182
- { id: 'cmd1', template: '', isCommand: true, commandName: 'specific', commandDescription: 'Agent-specific command', commandAgents: ['agent1'] }
183
- ];
184
- const widget = createWidget([], commands, agents);
185
- renderWidget(widget);
186
- const agentChips = host.querySelectorAll('.agent-chip');
187
- (0, chai_1.expect)(agentChips.length).to.equal(1);
188
- (0, chai_1.expect)(agentChips[0].textContent).to.contain('Agent One');
189
- });
190
- });
191
- //# sourceMappingURL=skills-configuration-widget.spec.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"skills-configuration-widget.spec.js","sourceRoot":"","sources":["../../../src/browser/ai-configuration/skills-configuration-widget.spec.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;AAEhF,8DAA4F;AAC5F,IAAI,YAAY,GAAG,IAAA,mBAAW,GAAE,CAAC;AAC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YAC/B,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,WAAW,EAAE,UAAU,EAAE,kBAAkB,EAAE,wBAAwB,EAAE,aAAa,EAAE,CAAC,QAAQ,CAAC,EAAE;SAClJ,CAAC;QAEF,MAAM,MAAM,GAAG,YAAY,CAAC,EAAE,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;QAClD,YAAY,CAAC,MAAM,CAAC,CAAC;QAErB,MAAM,UAAU,GAAG,IAAI,CAAC,gBAAgB,CAAC,aAAa,CAAC,CAAC;QACxD,IAAA,aAAM,EAAC,UAAU,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACtC,IAAA,aAAM,EAAC,UAAU,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAC9D,CAAC,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
@@ -1,9 +0,0 @@
1
- import { PromptService, PromptVariantSet } from '@theia/ai-core/lib/common';
2
- import * as React from '@theia/core/shared/react';
3
- export interface PromptVariantRendererProps {
4
- agentId: string;
5
- promptVariantSet: PromptVariantSet;
6
- promptService: PromptService;
7
- }
8
- export declare const PromptVariantRenderer: React.FC<PromptVariantRendererProps>;
9
- //# sourceMappingURL=template-settings-renderer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"template-settings-renderer.d.ts","sourceRoot":"","sources":["../../../src/browser/ai-configuration/template-settings-renderer.tsx"],"names":[],"mappings":"AAeA,OAAO,EAA8B,aAAa,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACxG,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAC;AAGlD,MAAM,WAAW,0BAA0B;IACvC,OAAO,EAAE,MAAM,CAAC;IAChB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,aAAa,EAAE,aAAa,CAAC;CAChC;AAED,eAAO,MAAM,qBAAqB,EAAE,KAAK,CAAC,EAAE,CAAC,0BAA0B,CAmGtE,CAAC"}
@@ -1,78 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PromptVariantRenderer = void 0;
4
- // *****************************************************************************
5
- // Copyright (C) 2024 EclipseSource GmbH.
6
- //
7
- // This program and the accompanying materials are made available under the
8
- // terms of the Eclipse Public License v. 2.0 which is available at
9
- // http://www.eclipse.org/legal/epl-2.0.
10
- //
11
- // This Source Code may also be made available under the following Secondary
12
- // Licenses when the conditions for such availability set forth in the Eclipse
13
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
14
- // with the GNU Classpath Exception which is available at
15
- // https://www.gnu.org/software/classpath/license.html.
16
- //
17
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
18
- // *****************************************************************************
19
- const common_1 = require("@theia/ai-core/lib/common");
20
- const React = require("@theia/core/shared/react");
21
- const nls_1 = require("@theia/core/lib/common/nls");
22
- const PromptVariantRenderer = ({ agentId, promptVariantSet, promptService, }) => {
23
- const variantIds = promptService.getVariantIds(promptVariantSet.id);
24
- const defaultVariantId = promptService.getDefaultVariantId(promptVariantSet.id);
25
- const [selectedVariant, setSelectedVariant] = React.useState(defaultVariantId);
26
- const isVariantCustomized = (variantId) => {
27
- const fragment = promptService.getRawPromptFragment(variantId);
28
- return fragment ? (0, common_1.isCustomizedPromptFragment)(fragment) : false;
29
- };
30
- React.useEffect(() => {
31
- const currentVariant = promptService.getSelectedVariantId(promptVariantSet.id);
32
- setSelectedVariant(currentVariant ?? defaultVariantId);
33
- const disposable = promptService.onSelectedVariantChange(notification => {
34
- if (notification.promptVariantSetId === promptVariantSet.id) {
35
- setSelectedVariant(notification.variantId ?? defaultVariantId);
36
- }
37
- });
38
- return () => {
39
- disposable.dispose();
40
- };
41
- }, [promptVariantSet.id, promptService, defaultVariantId]);
42
- const isInvalidVariant = !variantIds.includes(selectedVariant);
43
- const handleVariantChange = async (event) => {
44
- const newVariant = event.target.value;
45
- setSelectedVariant(newVariant);
46
- promptService.updateSelectedVariantId(agentId, promptVariantSet.id, newVariant);
47
- };
48
- const openTemplate = () => {
49
- promptService.editBuiltInCustomization(selectedVariant);
50
- };
51
- const resetTemplate = () => {
52
- promptService.resetToBuiltIn(selectedVariant);
53
- };
54
- return (React.createElement(React.Fragment, null,
55
- React.createElement("tr", null,
56
- React.createElement("td", { className: "template-name-cell" }, promptVariantSet.id),
57
- React.createElement("td", { className: "template-variant-cell" },
58
- (variantIds.length > 1 || isInvalidVariant) && (React.createElement("select", { id: `variant-selector-${promptVariantSet.id}`, className: `theia-select template-variant-selector ${isInvalidVariant ? 'error' : ''}`, value: isInvalidVariant ? 'invalid' : selectedVariant, onChange: handleVariantChange },
59
- isInvalidVariant && (React.createElement("option", { value: "invalid", disabled: true }, nls_1.nls.localize('theia/ai/core/templateSettings/unavailableVariant', 'Unavailable'))),
60
- variantIds.map(variantId => {
61
- const isEdited = isVariantCustomized(variantId);
62
- const editedPrefix = isEdited ? `[${nls_1.nls.localize('theia/ai/core/templateSettings/edited', 'edited')}] ` : '';
63
- const defaultSuffix = variantId === defaultVariantId ? ' ' + nls_1.nls.localizeByDefault('(default)') : '';
64
- return (React.createElement("option", { key: variantId, value: variantId },
65
- editedPrefix,
66
- variantId,
67
- defaultSuffix));
68
- }))),
69
- variantIds.length === 1 && !isInvalidVariant && (React.createElement("span", null, isVariantCustomized(selectedVariant)
70
- ? `[${nls_1.nls.localize('theia/ai/core/templateSettings/edited', 'edited')}] ${selectedVariant}`
71
- : selectedVariant))),
72
- React.createElement("td", { className: "template-actions-cell" },
73
- React.createElement("button", { className: "template-action-icon-button codicon codicon-edit", onClick: openTemplate, disabled: isInvalidVariant, title: nls_1.nls.localizeByDefault('Edit') }),
74
- isVariantCustomized(selectedVariant) &&
75
- (React.createElement("button", { className: "template-action-icon-button codicon codicon-discard", onClick: resetTemplate, disabled: isInvalidVariant || !isVariantCustomized(selectedVariant), title: nls_1.nls.localizeByDefault('Reset') }))))));
76
- };
77
- exports.PromptVariantRenderer = PromptVariantRenderer;
78
- //# sourceMappingURL=template-settings-renderer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"template-settings-renderer.js","sourceRoot":"","sources":["../../../src/browser/ai-configuration/template-settings-renderer.tsx"],"names":[],"mappings":";;;AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAChF,sDAAwG;AACxG,kDAAkD;AAClD,oDAAiD;AAQ1C,MAAM,qBAAqB,GAAyC,CAAC,EACxE,OAAO,EACP,gBAAgB,EAChB,aAAa,GAChB,EAAE,EAAE;IACD,MAAM,UAAU,GAAG,aAAa,CAAC,aAAa,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC;IACpE,MAAM,gBAAgB,GAAG,aAAa,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC;IAChF,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAS,gBAAiB,CAAC,CAAC;IAExF,MAAM,mBAAmB,GAAG,CAAC,SAAiB,EAAW,EAAE;QACvD,MAAM,QAAQ,GAAG,aAAa,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC;QAC/D,OAAO,QAAQ,CAAC,CAAC,CAAC,IAAA,mCAA0B,EAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;IACnE,CAAC,CAAC;IAEF,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACjB,MAAM,cAAc,GAAG,aAAa,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,EAAE,CAAC,CAAC;QAC/E,kBAAkB,C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,EACrB,QAAQ,EAAE,gBAAgB,EAC1B,KAAK,EAAE,SAAG,CAAC,iBAAiB,CAAC,MAAM,CAAC,GACtC;gBACD,mBAAmB,CAAC,eAAe,CAAC;oBACjC,CAAC,gCACG,SAAS,EAAC,qDAAqD,EAC/D,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,gBAAgB,IAAI,CAAC,mBAAmB,CAAC,eAAe,CAAC,EACnE,KAAK,EAAE,SAAG,CAAC,iBAAiB,CAAC,OAAO,CAAC,GACvC,CAAC,CACN,CACJ,CACN,CACN,CAAC;AACN,CAAC,CAAC;AAnGW,QAAA,qBAAqB,yBAmGhC"}
@@ -1,20 +0,0 @@
1
- import * as React from '@theia/core/shared/react';
2
- import { MessageService } from '@theia/core';
3
- import { TokenUsageFrontendService, ModelTokenUsageData } from '@theia/ai-core/lib/browser/token-usage-frontend-service';
4
- import { AITableConfigurationWidget, TableColumn } from './base/ai-table-configuration-widget';
5
- export declare class AITokenUsageConfigurationWidget extends AITableConfigurationWidget<ModelTokenUsageData> {
6
- static readonly ID = "ai-token-usage-configuration-container-widget";
7
- static readonly LABEL: string;
8
- protected readonly messageService: MessageService;
9
- protected readonly tokenUsageService: TokenUsageFrontendService;
10
- protected init(): void;
11
- protected loadItems(): Promise<void>;
12
- protected getItemId(item: ModelTokenUsageData): string;
13
- protected formatNumber(num: number): string;
14
- protected formatDate(date?: Date): string;
15
- protected hasCacheData(): boolean;
16
- protected getColumns(): TableColumn<ModelTokenUsageData>[];
17
- protected renderHeader(): React.ReactNode;
18
- protected renderFooter(): React.ReactNode;
19
- }
20
- //# sourceMappingURL=token-usage-configuration-widget.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"token-usage-configuration-widget.d.ts","sourceRoot":"","sources":["../../../src/browser/ai-configuration/token-usage-configuration-widget.tsx"],"names":[],"mappings":"AAiBA,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,cAAc,EAAO,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,yDAAyD,CAAC;AAEzH,OAAO,EAAE,0BAA0B,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAE/F,qBACa,+BAAgC,SAAQ,0BAA0B,CAAC,mBAAmB,CAAC;IAEhG,MAAM,CAAC,QAAQ,CAAC,EAAE,mDAAmD;IACrE,MAAM,CAAC,QAAQ,CAAC,KAAK,SAA4D;IAGjF,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IAGlD,SAAS,CAAC,QAAQ,CAAC,iBAAiB,EAAE,yBAAyB,CAAC;IAGhE,SAAS,CAAC,IAAI,IAAI,IAAI;cAgBN,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ1C,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM;IAItD,SAAS,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAI3C,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM;IAOzC,SAAS,CAAC,YAAY,IAAI,OAAO;IAOjC,SAAS,CAAC,UAAU,IAAI,WAAW,CAAC,mBAAmB,CAAC,EAAE;cAmFvC,YAAY,IAAI,KAAK,CAAC,SAAS;cAI/B,YAAY,IAAI,KAAK,CAAC,SAAS;CA4CrD"}