@theia/ai-ide 1.67.0-next.3 → 1.67.0-next.56

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 (306) hide show
  1. package/README.md +1 -0
  2. package/package.json +21 -21
  3. package/src/browser/ai-configuration/agent-configuration-widget.tsx +3 -3
  4. package/src/browser/context-file-validation-service-impl.spec.ts +405 -0
  5. package/src/browser/context-file-validation-service-impl.ts +120 -0
  6. package/src/browser/context-functions.spec.ts +155 -1
  7. package/src/browser/context-functions.ts +40 -6
  8. package/src/browser/file-changeset-functions.spec.ts +13 -13
  9. package/src/browser/file-changeset-functions.ts +9 -9
  10. package/src/browser/frontend-module.ts +12 -4
  11. package/src/browser/ide-chat-welcome-message-provider.tsx +64 -70
  12. package/src/browser/remember-command-contribution.ts +105 -0
  13. package/src/browser/workspace-functions.ts +68 -1
  14. package/src/common/ai-ide-preferences.ts +1 -1
  15. package/src/common/coder-replace-prompt-template.ts +8 -9
  16. package/src/common/command-prompt-template.ts +5 -5
  17. package/src/common/file-changeset-function-ids.ts +15 -1
  18. package/src/common/orchestrator-chat-agent.ts +2 -2
  19. package/lib/browser/ai-configuration/agent-configuration-widget.d.ts +0 -41
  20. package/lib/browser/ai-configuration/agent-configuration-widget.d.ts.map +0 -1
  21. package/lib/browser/ai-configuration/agent-configuration-widget.js +0 -333
  22. package/lib/browser/ai-configuration/agent-configuration-widget.js.map +0 -1
  23. package/lib/browser/ai-configuration/ai-configuration-service.d.ts +0 -18
  24. package/lib/browser/ai-configuration/ai-configuration-service.d.ts.map +0 -1
  25. package/lib/browser/ai-configuration/ai-configuration-service.js +0 -53
  26. package/lib/browser/ai-configuration/ai-configuration-service.js.map +0 -1
  27. package/lib/browser/ai-configuration/ai-configuration-view-contribution.d.ts +0 -14
  28. package/lib/browser/ai-configuration/ai-configuration-view-contribution.d.ts.map +0 -1
  29. package/lib/browser/ai-configuration/ai-configuration-view-contribution.js +0 -67
  30. package/lib/browser/ai-configuration/ai-configuration-view-contribution.js.map +0 -1
  31. package/lib/browser/ai-configuration/ai-configuration-widget.d.ts +0 -29
  32. package/lib/browser/ai-configuration/ai-configuration-widget.d.ts.map +0 -1
  33. package/lib/browser/ai-configuration/ai-configuration-widget.js +0 -118
  34. package/lib/browser/ai-configuration/ai-configuration-widget.js.map +0 -1
  35. package/lib/browser/ai-configuration/language-model-renderer.d.ts +0 -13
  36. package/lib/browser/ai-configuration/language-model-renderer.d.ts.map +0 -1
  37. package/lib/browser/ai-configuration/language-model-renderer.js +0 -104
  38. package/lib/browser/ai-configuration/language-model-renderer.js.map +0 -1
  39. package/lib/browser/ai-configuration/mcp-configuration-widget.d.ts +0 -43
  40. package/lib/browser/ai-configuration/mcp-configuration-widget.d.ts.map +0 -1
  41. package/lib/browser/ai-configuration/mcp-configuration-widget.js +0 -302
  42. package/lib/browser/ai-configuration/mcp-configuration-widget.js.map +0 -1
  43. package/lib/browser/ai-configuration/model-aliases-configuration-widget.d.ts +0 -41
  44. package/lib/browser/ai-configuration/model-aliases-configuration-widget.d.ts.map +0 -1
  45. package/lib/browser/ai-configuration/model-aliases-configuration-widget.js +0 -226
  46. package/lib/browser/ai-configuration/model-aliases-configuration-widget.js.map +0 -1
  47. package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.d.ts +0 -141
  48. package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.d.ts.map +0 -1
  49. package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.js +0 -508
  50. package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.js.map +0 -1
  51. package/lib/browser/ai-configuration/template-settings-renderer.d.ts +0 -10
  52. package/lib/browser/ai-configuration/template-settings-renderer.d.ts.map +0 -1
  53. package/lib/browser/ai-configuration/template-settings-renderer.js +0 -48
  54. package/lib/browser/ai-configuration/template-settings-renderer.js.map +0 -1
  55. package/lib/browser/ai-configuration/token-usage-configuration-widget.d.ts +0 -22
  56. package/lib/browser/ai-configuration/token-usage-configuration-widget.d.ts.map +0 -1
  57. package/lib/browser/ai-configuration/token-usage-configuration-widget.js +0 -156
  58. package/lib/browser/ai-configuration/token-usage-configuration-widget.js.map +0 -1
  59. package/lib/browser/ai-configuration/tools-configuration-widget.d.ts +0 -30
  60. package/lib/browser/ai-configuration/tools-configuration-widget.d.ts.map +0 -1
  61. package/lib/browser/ai-configuration/tools-configuration-widget.js +0 -150
  62. package/lib/browser/ai-configuration/tools-configuration-widget.js.map +0 -1
  63. package/lib/browser/ai-configuration/variable-configuration-widget.d.ts +0 -19
  64. package/lib/browser/ai-configuration/variable-configuration-widget.d.ts.map +0 -1
  65. package/lib/browser/ai-configuration/variable-configuration-widget.js +0 -99
  66. package/lib/browser/ai-configuration/variable-configuration-widget.js.map +0 -1
  67. package/lib/browser/ai-ide-activation-service.d.ts +0 -18
  68. package/lib/browser/ai-ide-activation-service.d.ts.map +0 -1
  69. package/lib/browser/ai-ide-activation-service.js +0 -71
  70. package/lib/browser/ai-ide-activation-service.js.map +0 -1
  71. package/lib/browser/ai-terminal-functions.d.ts +0 -13
  72. package/lib/browser/ai-terminal-functions.d.ts.map +0 -1
  73. package/lib/browser/ai-terminal-functions.js +0 -114
  74. package/lib/browser/ai-terminal-functions.js.map +0 -1
  75. package/lib/browser/app-tester-chat-agent.d.ts +0 -35
  76. package/lib/browser/app-tester-chat-agent.d.ts.map +0 -1
  77. package/lib/browser/app-tester-chat-agent.js +0 -142
  78. package/lib/browser/app-tester-chat-agent.js.map +0 -1
  79. package/lib/browser/app-tester-chat-functions.d.ts +0 -25
  80. package/lib/browser/app-tester-chat-functions.d.ts.map +0 -1
  81. package/lib/browser/app-tester-chat-functions.js +0 -170
  82. package/lib/browser/app-tester-chat-functions.js.map +0 -1
  83. package/lib/browser/app-tester-prompt-template.d.ts +0 -6
  84. package/lib/browser/app-tester-prompt-template.d.ts.map +0 -1
  85. package/lib/browser/app-tester-prompt-template.js +0 -83
  86. package/lib/browser/app-tester-prompt-template.js.map +0 -1
  87. package/lib/browser/architect-agent.d.ts +0 -15
  88. package/lib/browser/architect-agent.d.ts.map +0 -1
  89. package/lib/browser/architect-agent.js +0 -68
  90. package/lib/browser/architect-agent.js.map +0 -1
  91. package/lib/browser/coder-agent.d.ts +0 -15
  92. package/lib/browser/coder-agent.d.ts.map +0 -1
  93. package/lib/browser/coder-agent.js +0 -81
  94. package/lib/browser/coder-agent.js.map +0 -1
  95. package/lib/browser/context-functions.d.ts +0 -14
  96. package/lib/browser/context-functions.d.ts.map +0 -1
  97. package/lib/browser/context-functions.js +0 -130
  98. package/lib/browser/context-functions.js.map +0 -1
  99. package/lib/browser/context-functions.spec.d.ts +0 -2
  100. package/lib/browser/context-functions.spec.d.ts.map +0 -1
  101. package/lib/browser/context-functions.spec.js +0 -93
  102. package/lib/browser/context-functions.spec.js.map +0 -1
  103. package/lib/browser/file-changeset-function.spec.d.ts +0 -2
  104. package/lib/browser/file-changeset-function.spec.d.ts.map +0 -1
  105. package/lib/browser/file-changeset-function.spec.js +0 -45
  106. package/lib/browser/file-changeset-function.spec.js.map +0 -1
  107. package/lib/browser/file-changeset-functions.d.ts +0 -87
  108. package/lib/browser/file-changeset-functions.d.ts.map +0 -1
  109. package/lib/browser/file-changeset-functions.js +0 -645
  110. package/lib/browser/file-changeset-functions.js.map +0 -1
  111. package/lib/browser/file-changeset-functions.spec.d.ts +0 -2
  112. package/lib/browser/file-changeset-functions.spec.d.ts.map +0 -1
  113. package/lib/browser/file-changeset-functions.spec.js +0 -179
  114. package/lib/browser/file-changeset-functions.spec.js.map +0 -1
  115. package/lib/browser/frontend-module.d.ts +0 -5
  116. package/lib/browser/frontend-module.d.ts.map +0 -1
  117. package/lib/browser/frontend-module.js +0 -214
  118. package/lib/browser/frontend-module.js.map +0 -1
  119. package/lib/browser/github-chat-agent.d.ts +0 -48
  120. package/lib/browser/github-chat-agent.d.ts.map +0 -1
  121. package/lib/browser/github-chat-agent.js +0 -222
  122. package/lib/browser/github-chat-agent.js.map +0 -1
  123. package/lib/browser/github-prompt-template.d.ts +0 -6
  124. package/lib/browser/github-prompt-template.d.ts.map +0 -1
  125. package/lib/browser/github-prompt-template.js +0 -53
  126. package/lib/browser/github-prompt-template.js.map +0 -1
  127. package/lib/browser/github-repo-variable-contribution.d.ts +0 -15
  128. package/lib/browser/github-repo-variable-contribution.d.ts.map +0 -1
  129. package/lib/browser/github-repo-variable-contribution.js +0 -82
  130. package/lib/browser/github-repo-variable-contribution.js.map +0 -1
  131. package/lib/browser/ide-chat-welcome-message-provider.d.ts +0 -11
  132. package/lib/browser/ide-chat-welcome-message-provider.d.ts.map +0 -1
  133. package/lib/browser/ide-chat-welcome-message-provider.js +0 -142
  134. package/lib/browser/ide-chat-welcome-message-provider.js.map +0 -1
  135. package/lib/browser/project-info-agent.d.ts +0 -13
  136. package/lib/browser/project-info-agent.d.ts.map +0 -1
  137. package/lib/browser/project-info-agent.js +0 -45
  138. package/lib/browser/project-info-agent.js.map +0 -1
  139. package/lib/browser/summarize-session-command-contribution.d.ts +0 -19
  140. package/lib/browser/summarize-session-command-contribution.d.ts.map +0 -1
  141. package/lib/browser/summarize-session-command-contribution.js +0 -118
  142. package/lib/browser/summarize-session-command-contribution.js.map +0 -1
  143. package/lib/browser/task-background-summary-variable.d.ts +0 -9
  144. package/lib/browser/task-background-summary-variable.d.ts.map +0 -1
  145. package/lib/browser/task-background-summary-variable.js +0 -60
  146. package/lib/browser/task-background-summary-variable.js.map +0 -1
  147. package/lib/browser/task-context-agent.d.ts +0 -13
  148. package/lib/browser/task-context-agent.d.ts.map +0 -1
  149. package/lib/browser/task-context-agent.js +0 -45
  150. package/lib/browser/task-context-agent.js.map +0 -1
  151. package/lib/browser/task-context-file-storage-service.d.ts +0 -40
  152. package/lib/browser/task-context-file-storage-service.d.ts.map +0 -1
  153. package/lib/browser/task-context-file-storage-service.js +0 -232
  154. package/lib/browser/task-context-file-storage-service.js.map +0 -1
  155. package/lib/browser/template-preference-contribution.d.ts +0 -17
  156. package/lib/browser/template-preference-contribution.d.ts.map +0 -1
  157. package/lib/browser/template-preference-contribution.js +0 -94
  158. package/lib/browser/template-preference-contribution.js.map +0 -1
  159. package/lib/browser/test/tool-provider-cancellation-test-util.spec.d.ts +0 -2
  160. package/lib/browser/test/tool-provider-cancellation-test-util.spec.d.ts.map +0 -1
  161. package/lib/browser/test/tool-provider-cancellation-test-util.spec.js +0 -52
  162. package/lib/browser/test/tool-provider-cancellation-test-util.spec.js.map +0 -1
  163. package/lib/browser/workspace-functions.d.ts +0 -75
  164. package/lib/browser/workspace-functions.d.ts.map +0 -1
  165. package/lib/browser/workspace-functions.js +0 -641
  166. package/lib/browser/workspace-functions.js.map +0 -1
  167. package/lib/browser/workspace-functions.spec.d.ts +0 -2
  168. package/lib/browser/workspace-functions.spec.d.ts.map +0 -1
  169. package/lib/browser/workspace-functions.spec.js +0 -161
  170. package/lib/browser/workspace-functions.spec.js.map +0 -1
  171. package/lib/browser/workspace-launch-provider.d.ts +0 -24
  172. package/lib/browser/workspace-launch-provider.d.ts.map +0 -1
  173. package/lib/browser/workspace-launch-provider.js +0 -216
  174. package/lib/browser/workspace-launch-provider.js.map +0 -1
  175. package/lib/browser/workspace-launch-provider.spec.d.ts +0 -2
  176. package/lib/browser/workspace-launch-provider.spec.d.ts.map +0 -1
  177. package/lib/browser/workspace-launch-provider.spec.js +0 -245
  178. package/lib/browser/workspace-launch-provider.spec.js.map +0 -1
  179. package/lib/browser/workspace-search-provider.d.ts +0 -15
  180. package/lib/browser/workspace-search-provider.d.ts.map +0 -1
  181. package/lib/browser/workspace-search-provider.js +0 -204
  182. package/lib/browser/workspace-search-provider.js.map +0 -1
  183. package/lib/browser/workspace-search-provider.spec.d.ts +0 -2
  184. package/lib/browser/workspace-search-provider.spec.d.ts.map +0 -1
  185. package/lib/browser/workspace-search-provider.spec.js +0 -82
  186. package/lib/browser/workspace-search-provider.spec.js.map +0 -1
  187. package/lib/browser/workspace-task-provider.d.ts +0 -15
  188. package/lib/browser/workspace-task-provider.d.ts.map +0 -1
  189. package/lib/browser/workspace-task-provider.js +0 -138
  190. package/lib/browser/workspace-task-provider.js.map +0 -1
  191. package/lib/browser/workspace-task-provider.spec.d.ts +0 -2
  192. package/lib/browser/workspace-task-provider.spec.d.ts.map +0 -1
  193. package/lib/browser/workspace-task-provider.spec.js +0 -109
  194. package/lib/browser/workspace-task-provider.spec.js.map +0 -1
  195. package/lib/common/ai-configuration-preferences.d.ts +0 -8
  196. package/lib/common/ai-configuration-preferences.d.ts.map +0 -1
  197. package/lib/common/ai-configuration-preferences.js +0 -41
  198. package/lib/common/ai-configuration-preferences.js.map +0 -1
  199. package/lib/common/ai-ide-preferences.d.ts +0 -5
  200. package/lib/common/ai-ide-preferences.d.ts.map +0 -1
  201. package/lib/common/ai-ide-preferences.js +0 -53
  202. package/lib/common/ai-ide-preferences.js.map +0 -1
  203. package/lib/common/ai-terminal-functions.d.ts +0 -2
  204. package/lib/common/ai-terminal-functions.d.ts.map +0 -1
  205. package/lib/common/ai-terminal-functions.js +0 -20
  206. package/lib/common/ai-terminal-functions.js.map +0 -1
  207. package/lib/common/app-tester-chat-functions.d.ts +0 -5
  208. package/lib/common/app-tester-chat-functions.d.ts.map +0 -1
  209. package/lib/common/app-tester-chat-functions.js +0 -23
  210. package/lib/common/app-tester-chat-functions.js.map +0 -1
  211. package/lib/common/architect-prompt-template.d.ts +0 -3
  212. package/lib/common/architect-prompt-template.d.ts.map +0 -1
  213. package/lib/common/architect-prompt-template.js +0 -81
  214. package/lib/common/architect-prompt-template.js.map +0 -1
  215. package/lib/common/browser-automation-protocol.d.ts +0 -15
  216. package/lib/common/browser-automation-protocol.d.ts.map +0 -1
  217. package/lib/common/browser-automation-protocol.js +0 -22
  218. package/lib/common/browser-automation-protocol.js.map +0 -1
  219. package/lib/common/coder-replace-prompt-template.d.ts +0 -11
  220. package/lib/common/coder-replace-prompt-template.d.ts.map +0 -1
  221. package/lib/common/coder-replace-prompt-template.js +0 -295
  222. package/lib/common/coder-replace-prompt-template.js.map +0 -1
  223. package/lib/common/command-chat-agents.d.ts +0 -36
  224. package/lib/common/command-chat-agents.d.ts.map +0 -1
  225. package/lib/common/command-chat-agents.js +0 -122
  226. package/lib/common/command-chat-agents.js.map +0 -1
  227. package/lib/common/command-prompt-template.d.ts +0 -3
  228. package/lib/common/command-prompt-template.d.ts.map +0 -1
  229. package/lib/common/command-prompt-template.js +0 -226
  230. package/lib/common/command-prompt-template.js.map +0 -1
  231. package/lib/common/context-files-variable.d.ts +0 -9
  232. package/lib/common/context-files-variable.d.ts.map +0 -1
  233. package/lib/common/context-files-variable.js +0 -52
  234. package/lib/common/context-files-variable.js.map +0 -1
  235. package/lib/common/context-functions.d.ts +0 -4
  236. package/lib/common/context-functions.d.ts.map +0 -1
  237. package/lib/common/context-functions.js +0 -22
  238. package/lib/common/context-functions.js.map +0 -1
  239. package/lib/common/context-variables.d.ts +0 -3
  240. package/lib/common/context-variables.d.ts.map +0 -1
  241. package/lib/common/context-variables.js +0 -21
  242. package/lib/common/context-variables.js.map +0 -1
  243. package/lib/common/file-changeset-function-ids.d.ts +0 -8
  244. package/lib/common/file-changeset-function-ids.d.ts.map +0 -1
  245. package/lib/common/file-changeset-function-ids.js +0 -26
  246. package/lib/common/file-changeset-function-ids.js.map +0 -1
  247. package/lib/common/github-repo-protocol.d.ts +0 -15
  248. package/lib/common/github-repo-protocol.d.ts.map +0 -1
  249. package/lib/common/github-repo-protocol.js +0 -21
  250. package/lib/common/github-repo-protocol.js.map +0 -1
  251. package/lib/common/orchestrator-chat-agent.d.ts +0 -36
  252. package/lib/common/orchestrator-chat-agent.d.ts.map +0 -1
  253. package/lib/common/orchestrator-chat-agent.js +0 -167
  254. package/lib/common/orchestrator-chat-agent.js.map +0 -1
  255. package/lib/common/orchestrator-prompt-template.d.ts +0 -3
  256. package/lib/common/orchestrator-prompt-template.d.ts.map +0 -1
  257. package/lib/common/orchestrator-prompt-template.js +0 -55
  258. package/lib/common/orchestrator-prompt-template.js.map +0 -1
  259. package/lib/common/project-info-prompt-template.d.ts +0 -6
  260. package/lib/common/project-info-prompt-template.d.ts.map +0 -1
  261. package/lib/common/project-info-prompt-template.js +0 -145
  262. package/lib/common/project-info-prompt-template.js.map +0 -1
  263. package/lib/common/summarize-session-commands.d.ts +0 -4
  264. package/lib/common/summarize-session-commands.d.ts.map +0 -1
  265. package/lib/common/summarize-session-commands.js +0 -28
  266. package/lib/common/summarize-session-commands.js.map +0 -1
  267. package/lib/common/task-context-prompt-template.d.ts +0 -8
  268. package/lib/common/task-context-prompt-template.d.ts.map +0 -1
  269. package/lib/common/task-context-prompt-template.js +0 -217
  270. package/lib/common/task-context-prompt-template.js.map +0 -1
  271. package/lib/common/universal-chat-agent.d.ts +0 -17
  272. package/lib/common/universal-chat-agent.d.ts.map +0 -1
  273. package/lib/common/universal-chat-agent.js +0 -47
  274. package/lib/common/universal-chat-agent.js.map +0 -1
  275. package/lib/common/universal-prompt-template.d.ts +0 -4
  276. package/lib/common/universal-prompt-template.d.ts.map +0 -1
  277. package/lib/common/universal-prompt-template.js +0 -32
  278. package/lib/common/universal-prompt-template.js.map +0 -1
  279. package/lib/common/workspace-functions.d.ts +0 -12
  280. package/lib/common/workspace-functions.d.ts.map +0 -1
  281. package/lib/common/workspace-functions.js +0 -30
  282. package/lib/common/workspace-functions.js.map +0 -1
  283. package/lib/common/workspace-preferences.d.ts +0 -10
  284. package/lib/common/workspace-preferences.d.ts.map +0 -1
  285. package/lib/common/workspace-preferences.js +0 -89
  286. package/lib/common/workspace-preferences.js.map +0 -1
  287. package/lib/common/workspace-search-provider-util.d.ts +0 -17
  288. package/lib/common/workspace-search-provider-util.d.ts.map +0 -1
  289. package/lib/common/workspace-search-provider-util.js +0 -51
  290. package/lib/common/workspace-search-provider-util.js.map +0 -1
  291. package/lib/node/app-tester-agent/browser-automation-impl.d.ts +0 -18
  292. package/lib/node/app-tester-agent/browser-automation-impl.d.ts.map +0 -1
  293. package/lib/node/app-tester-agent/browser-automation-impl.js +0 -96
  294. package/lib/node/app-tester-agent/browser-automation-impl.js.map +0 -1
  295. package/lib/node/backend-module.d.ts +0 -4
  296. package/lib/node/backend-module.d.ts.map +0 -1
  297. package/lib/node/backend-module.js +0 -45
  298. package/lib/node/backend-module.js.map +0 -1
  299. package/lib/node/github-repo-service-impl.d.ts +0 -7
  300. package/lib/node/github-repo-service-impl.d.ts.map +0 -1
  301. package/lib/node/github-repo-service-impl.js +0 -86
  302. package/lib/node/github-repo-service-impl.js.map +0 -1
  303. package/lib/package.spec.d.ts +0 -1
  304. package/lib/package.spec.d.ts.map +0 -1
  305. package/lib/package.spec.js +0 -26
  306. package/lib/package.spec.js.map +0 -1
@@ -1,333 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2024 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 AIAgentConfigurationWidget_1;
18
- Object.defineProperty(exports, "__esModule", { value: true });
19
- exports.AIAgentConfigurationWidget = void 0;
20
- const tslib_1 = require("tslib");
21
- const common_1 = require("@theia/ai-core/lib/common");
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 ai_configuration_service_1 = require("./ai-configuration-service");
26
- const language_model_renderer_1 = require("./language-model-renderer");
27
- const language_model_alias_1 = require("@theia/ai-core/lib/common/language-model-alias");
28
- const variable_configuration_widget_1 = require("./variable-configuration-widget");
29
- const core_1 = require("@theia/core");
30
- const template_settings_renderer_1 = require("./template-settings-renderer");
31
- ;
32
- let AIAgentConfigurationWidget = AIAgentConfigurationWidget_1 = class AIAgentConfigurationWidget extends browser_1.ReactWidget {
33
- constructor() {
34
- super(...arguments);
35
- this.languageModelAliases = [];
36
- this.isLoadingDetails = false;
37
- this.toggleAgentEnabled = () => {
38
- const agent = this.aiConfigurationSelectionService.getActiveAgent();
39
- if (!agent) {
40
- return false;
41
- }
42
- const enabled = this.agentService.isEnabled(agent.id);
43
- if (enabled) {
44
- this.agentService.disableAgent(agent.id);
45
- }
46
- else {
47
- this.agentService.enableAgent(agent.id);
48
- }
49
- this.update();
50
- };
51
- }
52
- init() {
53
- this.id = AIAgentConfigurationWidget_1.ID;
54
- this.title.label = AIAgentConfigurationWidget_1.LABEL;
55
- this.title.closable = false;
56
- this.languageModelRegistry.getLanguageModels().then(models => {
57
- this.languageModels = models !== null && models !== void 0 ? models : [];
58
- this.update();
59
- });
60
- this.languageModelAliasRegistry.ready.then(() => {
61
- this.languageModelAliases = this.languageModelAliasRegistry.getAliases();
62
- this.toDispose.push(this.languageModelAliasRegistry.onDidChange(() => {
63
- this.languageModelAliases = this.languageModelAliasRegistry.getAliases();
64
- this.update();
65
- }));
66
- });
67
- this.toDispose.push(this.languageModelRegistry.onChange(({ models }) => {
68
- this.languageModelAliases = this.languageModelAliasRegistry.getAliases();
69
- this.languageModels = models;
70
- this.update();
71
- }));
72
- this.toDispose.push(this.promptService.onPromptsChange(() => this.updateParsedPromptParts()));
73
- // Only call updateParsedPromptParts() as it already calls this.update() internally
74
- this.toDispose.push(this.promptFragmentCustomizationService.onDidChangePromptFragmentCustomization(() => {
75
- this.updateParsedPromptParts();
76
- }));
77
- // Only call updateParsedPromptParts() as it already calls this.update() internally
78
- this.toDispose.push(this.aiSettingsService.onDidChange(() => {
79
- this.updateParsedPromptParts();
80
- }));
81
- // Only call updateParsedPromptParts() as it already calls this.update() internally
82
- this.toDispose.push(this.aiConfigurationSelectionService.onDidAgentChange(() => {
83
- this.updateParsedPromptParts();
84
- }));
85
- this.agentService.onDidChangeAgents(() => this.update());
86
- this.updateParsedPromptParts();
87
- }
88
- async updateParsedPromptParts() {
89
- this.isLoadingDetails = true;
90
- const agent = this.aiConfigurationSelectionService.getActiveAgent();
91
- if (agent) {
92
- this.parsedPromptParts = await this.parsePromptFragmentsForVariableAndFunction(agent);
93
- }
94
- else {
95
- this.parsedPromptParts = undefined;
96
- }
97
- this.isLoadingDetails = false;
98
- this.update();
99
- }
100
- render() {
101
- return React.createElement("div", { className: 'ai-agent-configuration-main' },
102
- React.createElement("div", { className: 'configuration-agents-list theia-Tree theia-TreeContainer', style: { width: '25%' } },
103
- React.createElement("ul", null, this.agentService.getAllAgents().map(agent => {
104
- var _a;
105
- const isActive = ((_a = this.aiConfigurationSelectionService.getActiveAgent()) === null || _a === void 0 ? void 0 : _a.id) === agent.id;
106
- const className = `theia-TreeNode theia-CompositeTreeNode theia-ExpandableTreeNode${isActive ? ' theia-mod-selected' : ''}`;
107
- return React.createElement("li", { key: agent.id, className: className, onClick: () => this.setActiveAgent(agent) }, this.renderAgentName(agent));
108
- })),
109
- React.createElement("div", { className: 'configuration-agents-add' },
110
- React.createElement("button", { style: { marginLeft: 0 }, className: 'theia-button main', onClick: () => this.addCustomAgent() }, core_1.nls.localize('theia/ai/core/agentConfiguration/addCustomAgent', 'Add Custom Agent')))),
111
- React.createElement("div", { className: 'configuration-agent-panel preferences-editor-widget' }, this.renderAgentDetails()));
112
- }
113
- renderAgentName(agent) {
114
- var _a;
115
- const tagsSuffix = ((_a = agent.tags) === null || _a === void 0 ? void 0 : _a.length) ? React.createElement("span", null, agent.tags.map(tag => React.createElement("span", { key: tag, className: 'agent-tag' }, tag))) : '';
116
- return React.createElement("span", null,
117
- agent.name,
118
- " ",
119
- tagsSuffix);
120
- }
121
- renderAgentDetails() {
122
- if (this.isLoadingDetails) {
123
- return React.createElement("div", null, core_1.nls.localize('theia/ai/core/agentConfiguration/loading', 'Loading...'));
124
- }
125
- const agent = this.aiConfigurationSelectionService.getActiveAgent();
126
- if (!agent) {
127
- return React.createElement("div", null, core_1.nls.localize('theia/ai/core/agentConfiguration/selectAgentMessage', 'Please select an Agent first!'));
128
- }
129
- const enabled = this.agentService.isEnabled(agent.id);
130
- if (!this.parsedPromptParts) {
131
- this.updateParsedPromptParts();
132
- return React.createElement("div", null, core_1.nls.localize('theia/ai/core/agentConfiguration/loading', 'Loading...'));
133
- }
134
- const globalVariables = Array.from(new Set([...this.parsedPromptParts.globalVariables, ...agent.variables]));
135
- const functions = Array.from(new Set([...this.parsedPromptParts.functions, ...agent.functions]));
136
- return React.createElement("div", { key: agent.id, style: { display: 'flex', flexDirection: 'column', alignItems: 'flex-start' } },
137
- React.createElement("div", { className: 'settings-section-title settings-section-category-title', style: { paddingLeft: 0, paddingBottom: 10 } },
138
- this.renderAgentName(agent),
139
- React.createElement("pre", { style: { fontSize: 'small', margin: 0 } },
140
- "Id: ",
141
- agent.id)),
142
- React.createElement("div", { style: { paddingBottom: 10 } }, agent.description),
143
- React.createElement("div", { style: { paddingBottom: 10 } },
144
- React.createElement("label", null,
145
- React.createElement("input", { type: "checkbox", checked: enabled, onChange: this.toggleAgentEnabled }),
146
- core_1.nls.localize('theia/ai/core/agentConfiguration/enableAgent', 'Enable Agent'))),
147
- React.createElement("div", { className: "settings-section-subcategory-title ai-settings-section-subcategory-title" }, core_1.nls.localize('theia/ai/core/agentConfiguration/promptTemplates', 'Prompt Templates')),
148
- React.createElement("div", { className: "ai-templates" }, (() => {
149
- const prompts = agent.prompts;
150
- return prompts.length > 0 ? (prompts.map(prompt => (React.createElement("div", { key: agent.id + '.' + prompt.id },
151
- React.createElement(template_settings_renderer_1.PromptVariantRenderer, { key: agent.id + '.' + prompt.id, agentId: agent.id, promptVariantSet: prompt, promptService: this.promptService }))))) : (React.createElement("div", null, core_1.nls.localize('theia/ai/core/agentConfiguration/noDefaultTemplate', 'No default template available')));
152
- })()),
153
- React.createElement("div", { className: 'ai-lm-requirements' },
154
- React.createElement(language_model_renderer_1.LanguageModelRenderer, { agent: agent, languageModels: this.languageModels, aiSettingsService: this.aiSettingsService, languageModelRegistry: this.languageModelRegistry, languageModelAliases: this.languageModelAliases })),
155
- React.createElement("div", null,
156
- React.createElement("span", null, "Used Global Variables:"),
157
- React.createElement("ul", { className: 'variable-references' },
158
- React.createElement(AgentGlobalVariables, { variables: globalVariables, showVariableConfigurationTab: this.showVariableConfigurationTab.bind(this) }))),
159
- React.createElement("div", null,
160
- React.createElement("span", null, "Used agent-specific Variables:"),
161
- React.createElement("ul", { className: 'variable-references' },
162
- React.createElement(AgentSpecificVariables, { promptVariables: this.parsedPromptParts.agentSpecificVariables, agent: agent }))),
163
- React.createElement("div", null,
164
- React.createElement("span", null, "Used Functions:"),
165
- React.createElement("ul", { className: 'function-references' },
166
- React.createElement(AgentFunctions, { functions: functions }))));
167
- }
168
- async parsePromptFragmentsForVariableAndFunction(agent) {
169
- var _a, _b, _c, _d;
170
- const result = { functions: [], globalVariables: [], agentSpecificVariables: [] };
171
- const agentSettings = await this.aiSettingsService.getAgentSettings(agent.id);
172
- const selectedVariants = (_a = agentSettings === null || agentSettings === void 0 ? void 0 : agentSettings.selectedVariants) !== null && _a !== void 0 ? _a : {};
173
- for (const mainTemplate of agent.prompts) {
174
- const promptId = (_c = (_b = selectedVariants[mainTemplate.id]) !== null && _b !== void 0 ? _b : mainTemplate.defaultVariant.id) !== null && _c !== void 0 ? _c : mainTemplate.id;
175
- const promptToAnalyze = (_d = this.promptService.getRawPromptFragment(promptId)) === null || _d === void 0 ? void 0 : _d.template;
176
- if (!promptToAnalyze) {
177
- continue;
178
- }
179
- this.extractVariablesAndFunctions(promptToAnalyze, result, agent);
180
- }
181
- return result;
182
- }
183
- extractVariablesAndFunctions(promptContent, result, agent) {
184
- const variableMatches = (0, common_1.matchVariablesRegEx)(promptContent);
185
- variableMatches.forEach(match => {
186
- const variableId = match[1];
187
- // skip comments
188
- if (variableId.startsWith('!--')) {
189
- return;
190
- }
191
- // Extract base variable ID without arguments
192
- const baseVariableId = variableId.split(':')[0];
193
- if (this.variableService.hasVariable(baseVariableId) &&
194
- agent.agentSpecificVariables.find(v => v.name === baseVariableId) === undefined) {
195
- result.globalVariables.push(variableId);
196
- }
197
- else {
198
- result.agentSpecificVariables.push(variableId);
199
- }
200
- });
201
- const functionMatches = [...promptContent.matchAll(common_1.PROMPT_FUNCTION_REGEX)];
202
- functionMatches.forEach(match => {
203
- const functionId = match[1];
204
- result.functions.push(functionId);
205
- });
206
- }
207
- showVariableConfigurationTab() {
208
- this.aiConfigurationSelectionService.selectConfigurationTab(variable_configuration_widget_1.AIVariableConfigurationWidget.ID);
209
- }
210
- async addCustomAgent() {
211
- const locations = await this.promptFragmentCustomizationService.getCustomAgentsLocations();
212
- // If only one location is available, use the direct approach
213
- if (locations.length === 1) {
214
- this.promptFragmentCustomizationService.openCustomAgentYaml(locations[0].uri);
215
- return;
216
- }
217
- // Multiple locations - show quick picker
218
- const quickPick = this.quickInputService.createQuickPick();
219
- quickPick.title = core_1.nls.localize('theia/ai/ide/agentConfiguration/customAgentLocationQuickPick/title', 'Select Location for Custom Agents File');
220
- quickPick.placeholder = core_1.nls.localize('theia/ai/ide/agentConfiguration/customAgentLocationQuickPick/placeholder', 'Choose where to create or open a custom agents file');
221
- quickPick.items = locations.map(location => ({
222
- label: location.uri.path.toString(),
223
- description: location.exists
224
- ? core_1.nls.localize('theia/ai/ide/agentConfiguration/customAgentLocationQuickPick/openExistingFile', 'Open existing file')
225
- : core_1.nls.localize('theia/ai/ide/agentConfiguration/customAgentLocationQuickPick/createNewFile', 'Create new file'),
226
- location
227
- }));
228
- quickPick.onDidAccept(async () => {
229
- const selectedItem = quickPick.selectedItems[0];
230
- if (selectedItem && selectedItem.location) {
231
- quickPick.dispose();
232
- this.promptFragmentCustomizationService.openCustomAgentYaml(selectedItem.location.uri);
233
- }
234
- });
235
- quickPick.show();
236
- }
237
- setActiveAgent(agent) {
238
- this.aiConfigurationSelectionService.setActiveAgent(agent);
239
- this.updateParsedPromptParts();
240
- }
241
- };
242
- exports.AIAgentConfigurationWidget = AIAgentConfigurationWidget;
243
- AIAgentConfigurationWidget.ID = 'ai-agent-configuration-container-widget';
244
- AIAgentConfigurationWidget.LABEL = core_1.nls.localize('theia/ai/core/agentConfiguration/label', 'Agents');
245
- tslib_1.__decorate([
246
- (0, inversify_1.inject)(common_1.AgentService),
247
- tslib_1.__metadata("design:type", Object)
248
- ], AIAgentConfigurationWidget.prototype, "agentService", void 0);
249
- tslib_1.__decorate([
250
- (0, inversify_1.inject)(common_1.LanguageModelRegistry),
251
- tslib_1.__metadata("design:type", Object)
252
- ], AIAgentConfigurationWidget.prototype, "languageModelRegistry", void 0);
253
- tslib_1.__decorate([
254
- (0, inversify_1.inject)(common_1.PromptFragmentCustomizationService),
255
- tslib_1.__metadata("design:type", Object)
256
- ], AIAgentConfigurationWidget.prototype, "promptFragmentCustomizationService", void 0);
257
- tslib_1.__decorate([
258
- (0, inversify_1.inject)(language_model_alias_1.LanguageModelAliasRegistry),
259
- tslib_1.__metadata("design:type", Object)
260
- ], AIAgentConfigurationWidget.prototype, "languageModelAliasRegistry", void 0);
261
- tslib_1.__decorate([
262
- (0, inversify_1.inject)(common_1.AISettingsService),
263
- tslib_1.__metadata("design:type", Object)
264
- ], AIAgentConfigurationWidget.prototype, "aiSettingsService", void 0);
265
- tslib_1.__decorate([
266
- (0, inversify_1.inject)(ai_configuration_service_1.AIConfigurationSelectionService),
267
- tslib_1.__metadata("design:type", ai_configuration_service_1.AIConfigurationSelectionService)
268
- ], AIAgentConfigurationWidget.prototype, "aiConfigurationSelectionService", void 0);
269
- tslib_1.__decorate([
270
- (0, inversify_1.inject)(common_1.AIVariableService),
271
- tslib_1.__metadata("design:type", Object)
272
- ], AIAgentConfigurationWidget.prototype, "variableService", void 0);
273
- tslib_1.__decorate([
274
- (0, inversify_1.inject)(common_1.PromptService),
275
- tslib_1.__metadata("design:type", Object)
276
- ], AIAgentConfigurationWidget.prototype, "promptService", void 0);
277
- tslib_1.__decorate([
278
- (0, inversify_1.inject)(browser_1.QuickInputService),
279
- tslib_1.__metadata("design:type", Object)
280
- ], AIAgentConfigurationWidget.prototype, "quickInputService", void 0);
281
- tslib_1.__decorate([
282
- (0, inversify_1.postConstruct)(),
283
- tslib_1.__metadata("design:type", Function),
284
- tslib_1.__metadata("design:paramtypes", []),
285
- tslib_1.__metadata("design:returntype", void 0)
286
- ], AIAgentConfigurationWidget.prototype, "init", null);
287
- exports.AIAgentConfigurationWidget = AIAgentConfigurationWidget = AIAgentConfigurationWidget_1 = tslib_1.__decorate([
288
- (0, inversify_1.injectable)()
289
- ], AIAgentConfigurationWidget);
290
- const AgentGlobalVariables = ({ variables: globalVariables, showVariableConfigurationTab }) => {
291
- if (globalVariables.length === 0) {
292
- return React.createElement(React.Fragment, null, core_1.nls.localizeByDefault('None'));
293
- }
294
- return React.createElement(React.Fragment, null, globalVariables.map(variableId => React.createElement("li", { key: variableId, className: 'theia-TreeNode theia-CompositeTreeNode theia-ExpandableTreeNode theia-mod-selected' },
295
- React.createElement("div", { key: variableId, onClick: () => { showVariableConfigurationTab(); }, className: 'variable-reference' },
296
- React.createElement("span", null, variableId),
297
- React.createElement("i", { className: (0, browser_1.codicon)('chevron-right') })))));
298
- };
299
- const AgentFunctions = ({ functions }) => {
300
- if (functions.length === 0) {
301
- return React.createElement(React.Fragment, null, core_1.nls.localizeByDefault('None'));
302
- }
303
- return React.createElement(React.Fragment, null, functions.map(functionId => React.createElement("li", { key: functionId, className: 'variable-reference' },
304
- React.createElement("span", null, functionId))));
305
- };
306
- const AgentSpecificVariables = ({ promptVariables, agent }) => {
307
- const agentDefinedVariablesName = agent.agentSpecificVariables.map(v => v.name);
308
- const variables = Array.from(new Set([...promptVariables, ...agentDefinedVariablesName]));
309
- if (variables.length === 0) {
310
- return React.createElement(React.Fragment, null, core_1.nls.localizeByDefault('None'));
311
- }
312
- return React.createElement(React.Fragment, null, variables.map(variableId => React.createElement(AgentSpecificVariable, { key: variableId, variableId: variableId, agent: agent, promptVariables: promptVariables })));
313
- };
314
- const AgentSpecificVariable = ({ variableId, agent, promptVariables }) => {
315
- const agentDefinedVariable = agent.agentSpecificVariables.find(v => v.name === variableId);
316
- const undeclared = agentDefinedVariable === undefined;
317
- const notUsed = !promptVariables.includes(variableId) && (agentDefinedVariable === null || agentDefinedVariable === void 0 ? void 0 : agentDefinedVariable.usedInPrompt) === true;
318
- return React.createElement("li", { key: variableId },
319
- React.createElement("div", null,
320
- React.createElement("span", null, core_1.nls.localize('theia/ai/core/agentConfiguration/name', 'Name:')),
321
- " ",
322
- React.createElement("span", null, variableId)),
323
- undeclared ? React.createElement("div", null,
324
- React.createElement("span", null, core_1.nls.localize('theia/ai/core/agentConfiguration/undeclared', 'Undeclared'))) :
325
- (React.createElement(React.Fragment, null,
326
- React.createElement("div", null,
327
- React.createElement("span", null, core_1.nls.localize('theia/ai/core/agentConfiguration/description', 'Description:')),
328
- " ",
329
- React.createElement("span", null, agentDefinedVariable.description)),
330
- notUsed && React.createElement("div", null, core_1.nls.localize('theia/ai/core/agentConfiguration/notUsedInPrompt', 'Not used in prompt')))),
331
- React.createElement("hr", null));
332
- };
333
- //# sourceMappingURL=agent-configuration-widget.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent-configuration-widget.js","sourceRoot":"","sources":["../../../src/browser/ai-configuration/agent-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,sDAYmC;AACnC,qDAAkF;AAElF,4DAAiF;AACjF,kDAAkD;AAClD,yEAA6E;AAC7E,uEAAkE;AAClE,yFAAgH;AAChH,mFAAgF;AAChF,sCAAkC;AACl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,eAAe,GAAI,CAC3C,CACF,CAAC;AACR,CAAC,CAAC;AAMF,MAAM,qBAAqB,GAAG,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,eAAe,EAA8B,EAAE,EAAE;IACjG,MAAM,oBAAoB,GAAG,KAAK,CAAC,sBAAsB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,UAAU,CAAC,CAAC;IAC3F,MAAM,UAAU,GAAG,oBAAoB,KAAK,SAAS,CAAC;IACtD,MAAM,OAAO,GAAG,CAAC,eAAe,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAA,oBAAoB,aAApB,oBAAoB,uBAApB,oBAAoB,CAAE,YAAY,MAAK,IAAI,CAAC;IACrG,OAAO,4BAAI,GAAG,EAAE,UAAU;QACtB;YAAK,kCAAO,UAAG,CAAC,QAAQ,CAAC,uCAAuC,EAAE,OAAO,CAAC,CAAQ;;YAAC,kCAAO,UAAU,CAAQ,CAAM;QACjH,UAAU,CAAC,CAAC,CAAC;YAAK,kCAAO,UAAG,CAAC,QAAQ,CAAC,6CAA6C,EAAE,YAAY,CAAC,CAAQ,CAAM,CAAC,CAAC;YAC/G,CAAC;gBACG;oBAAK,kCAAO,UAAG,CAAC,QAAQ,CAAC,8CAA8C,EAAE,cAAc,CAAC,CAAQ;;oBAAC,kCAAO,oBAAoB,CAAC,WAAW,CAAQ,CAAM;gBACrJ,OAAO,IAAI,iCAAM,UAAG,CAAC,QAAQ,CAAC,kDAAkD,EAAE,oBAAoB,CAAC,CAAO,CAChH,CAAC;QACR,+BAAM,CACL,CAAC;AACV,CAAC,CAAC"}
@@ -1,18 +0,0 @@
1
- import { Agent } from '@theia/ai-core/lib/common';
2
- import { Emitter } from '@theia/core';
3
- export declare class AIConfigurationSelectionService {
4
- protected activeAgent?: Agent;
5
- protected selectedAliasId?: string;
6
- protected readonly onDidSelectConfigurationEmitter: Emitter<string>;
7
- onDidSelectConfiguration: import("@theia/core").Event<string>;
8
- protected readonly onDidAgentChangeEmitter: Emitter<Agent | undefined>;
9
- onDidAgentChange: import("@theia/core").Event<Agent | undefined>;
10
- protected readonly onDidAliasChangeEmitter: Emitter<string | undefined>;
11
- onDidAliasChange: import("@theia/core").Event<string | undefined>;
12
- getActiveAgent(): Agent | undefined;
13
- setActiveAgent(agent?: Agent): void;
14
- getSelectedAliasId(): string | undefined;
15
- setSelectedAliasId(aliasId?: string): void;
16
- selectConfigurationTab(widgetId: string): void;
17
- }
18
- //# sourceMappingURL=ai-configuration-service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-configuration-service.d.ts","sourceRoot":"","sources":["../../../src/browser/ai-configuration/ai-configuration-service.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,KAAK,EAAE,MAAM,2BAA2B,CAAC;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAGtC,qBACa,+BAA+B;IACxC,SAAS,CAAC,WAAW,CAAC,EAAE,KAAK,CAAC;IAC9B,SAAS,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAEnC,SAAS,CAAC,QAAQ,CAAC,+BAA+B,kBAAyB;IAC3E,wBAAwB,sCAA8C;IAEtE,SAAS,CAAC,QAAQ,CAAC,uBAAuB,6BAAoC;IAC9E,gBAAgB,iDAAsC;IAEtD,SAAS,CAAC,QAAQ,CAAC,uBAAuB,8BAAqC;IAC/E,gBAAgB,kDAAsC;IAE/C,cAAc,IAAI,KAAK,GAAG,SAAS;IAInC,cAAc,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,IAAI;IAKnC,kBAAkB,IAAI,MAAM,GAAG,SAAS;IAIxC,kBAAkB,CAAC,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI;IAK1C,sBAAsB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI;CAGxD"}
@@ -1,53 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2024 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
- exports.AIConfigurationSelectionService = void 0;
19
- const tslib_1 = require("tslib");
20
- const core_1 = require("@theia/core");
21
- const inversify_1 = require("@theia/core/shared/inversify");
22
- let AIConfigurationSelectionService = class AIConfigurationSelectionService {
23
- constructor() {
24
- this.onDidSelectConfigurationEmitter = new core_1.Emitter();
25
- this.onDidSelectConfiguration = this.onDidSelectConfigurationEmitter.event;
26
- this.onDidAgentChangeEmitter = new core_1.Emitter();
27
- this.onDidAgentChange = this.onDidAgentChangeEmitter.event;
28
- this.onDidAliasChangeEmitter = new core_1.Emitter();
29
- this.onDidAliasChange = this.onDidAliasChangeEmitter.event;
30
- }
31
- getActiveAgent() {
32
- return this.activeAgent;
33
- }
34
- setActiveAgent(agent) {
35
- this.activeAgent = agent;
36
- this.onDidAgentChangeEmitter.fire(agent);
37
- }
38
- getSelectedAliasId() {
39
- return this.selectedAliasId;
40
- }
41
- setSelectedAliasId(aliasId) {
42
- this.selectedAliasId = aliasId;
43
- this.onDidAliasChangeEmitter.fire(aliasId);
44
- }
45
- selectConfigurationTab(widgetId) {
46
- this.onDidSelectConfigurationEmitter.fire(widgetId);
47
- }
48
- };
49
- exports.AIConfigurationSelectionService = AIConfigurationSelectionService;
50
- exports.AIConfigurationSelectionService = AIConfigurationSelectionService = tslib_1.__decorate([
51
- (0, inversify_1.injectable)()
52
- ], AIConfigurationSelectionService);
53
- //# sourceMappingURL=ai-configuration-service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-configuration-service.js","sourceRoot":"","sources":["../../../src/browser/ai-configuration/ai-configuration-service.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAGhF,sCAAsC;AACtC,4DAA0D;AAGnD,IAAM,+BAA+B,GAArC,MAAM,+BAA+B;IAArC;QAIgB,oCAA+B,GAAG,IAAI,cAAO,EAAU,CAAC;QAC3E,6BAAwB,GAAG,IAAI,CAAC,+BAA+B,CAAC,KAAK,CAAC;QAEnD,4BAAuB,GAAG,IAAI,cAAO,EAAqB,CAAC;QAC9E,qBAAgB,GAAG,IAAI,CAAC,uBAAuB,CAAC,KAAK,CAAC;QAEnC,4BAAuB,GAAG,IAAI,cAAO,EAAsB,CAAC;QAC/E,qBAAgB,GAAG,IAAI,CAAC,uBAAuB,CAAC,KAAK,CAAC;IAuB1D,CAAC;IArBU,cAAc;QACjB,OAAO,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAEM,cAAc,CAAC,KAAa;QAC/B,IAAI,CAAC,WAAW,GAAG,KAAK,CAAC;QACzB,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC7C,CAAC;IAEM,kBAAkB;QACrB,OAAO,IAAI,CAAC,eAAe,CAAC;IAChC,CAAC;IAEM,kBAAkB,CAAC,OAAgB;QACtC,IAAI,CAAC,eAAe,GAAG,OAAO,CAAC;QAC/B,IAAI,CAAC,uBAAuB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC/C,CAAC;IAEM,sBAAsB,CAAC,QAAgB;QAC1C,IAAI,CAAC,+BAA+B,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACxD,CAAC;CACJ,CAAA;AAlCY,0EAA+B;0CAA/B,+BAA+B;IAD3C,IAAA,sBAAU,GAAE;GACA,+BAA+B,CAkC3C"}
@@ -1,14 +0,0 @@
1
- import { Command, CommandRegistry } from '@theia/core';
2
- import { TabBarToolbarContribution, TabBarToolbarRegistry } from '@theia/core/lib/browser/shell/tab-bar-toolbar';
3
- import { AIViewContribution } from '@theia/ai-core/lib/browser';
4
- import { FrontendApplication } from '@theia/core/lib/browser';
5
- import { AIConfigurationContainerWidget } from './ai-configuration-widget';
6
- export declare const AI_CONFIGURATION_TOGGLE_COMMAND_ID = "aiConfiguration:toggle";
7
- export declare const OPEN_AI_CONFIG_VIEW: Command;
8
- export declare class AIAgentConfigurationViewContribution extends AIViewContribution<AIConfigurationContainerWidget> implements TabBarToolbarContribution {
9
- constructor();
10
- initializeLayout(_app: FrontendApplication): Promise<void>;
11
- registerCommands(commands: CommandRegistry): void;
12
- registerToolbarItems(registry: TabBarToolbarRegistry): void;
13
- }
14
- //# sourceMappingURL=ai-configuration-view-contribution.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-configuration-view-contribution.d.ts","sourceRoot":"","sources":["../../../src/browser/ai-configuration/ai-configuration-view-contribution.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,OAAO,EAAE,eAAe,EAAO,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,yBAAyB,EAAE,qBAAqB,EAAE,MAAM,+CAA+C,CAAC;AACjH,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAEhE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAE,8BAA8B,EAAE,MAAM,2BAA2B,CAAC;AAE3E,eAAO,MAAM,kCAAkC,2BAA2B,CAAC;AAC3E,eAAO,MAAM,mBAAmB,SAG9B,CAAC;AAEH,qBACa,oCAAqC,SAAQ,kBAAkB,CAAC,8BAA8B,CAAE,YAAW,yBAAyB;;IAcvI,gBAAgB,CAAC,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAIvD,gBAAgB,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI;IAO1D,oBAAoB,CAAC,QAAQ,EAAE,qBAAqB,GAAG,IAAI;CAU9D"}
@@ -1,67 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AIAgentConfigurationViewContribution = exports.OPEN_AI_CONFIG_VIEW = exports.AI_CONFIGURATION_TOGGLE_COMMAND_ID = void 0;
4
- const tslib_1 = require("tslib");
5
- // *****************************************************************************
6
- // Copyright (C) 2024 EclipseSource GmbH.
7
- //
8
- // This program and the accompanying materials are made available under the
9
- // terms of the Eclipse Public License v. 2.0 which is available at
10
- // http://www.eclipse.org/legal/epl-2.0.
11
- //
12
- // This Source Code may also be made available under the following Secondary
13
- // Licenses when the conditions for such availability set forth in the Eclipse
14
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
15
- // with the GNU Classpath Exception which is available at
16
- // https://www.gnu.org/software/classpath/license.html.
17
- //
18
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
19
- // *****************************************************************************
20
- const core_1 = require("@theia/core");
21
- const browser_1 = require("@theia/ai-core/lib/browser");
22
- const chat_view_widget_1 = require("@theia/ai-chat-ui/lib/browser/chat-view-widget");
23
- const inversify_1 = require("@theia/core/shared/inversify");
24
- const ai_configuration_widget_1 = require("./ai-configuration-widget");
25
- exports.AI_CONFIGURATION_TOGGLE_COMMAND_ID = 'aiConfiguration:toggle';
26
- exports.OPEN_AI_CONFIG_VIEW = core_1.Command.toLocalizedCommand({
27
- id: 'aiConfiguration:open',
28
- label: 'Open AI Configuration view',
29
- });
30
- let AIAgentConfigurationViewContribution = class AIAgentConfigurationViewContribution extends browser_1.AIViewContribution {
31
- constructor() {
32
- super({
33
- widgetId: ai_configuration_widget_1.AIConfigurationContainerWidget.ID,
34
- widgetName: ai_configuration_widget_1.AIConfigurationContainerWidget.LABEL,
35
- defaultWidgetOptions: {
36
- area: 'main',
37
- rank: 100
38
- },
39
- toggleCommandId: exports.AI_CONFIGURATION_TOGGLE_COMMAND_ID
40
- });
41
- }
42
- async initializeLayout(_app) {
43
- await this.openView();
44
- }
45
- registerCommands(commands) {
46
- super.registerCommands(commands);
47
- commands.registerCommand(exports.OPEN_AI_CONFIG_VIEW, {
48
- execute: () => this.openView({ activate: true }),
49
- });
50
- }
51
- registerToolbarItems(registry) {
52
- registry.registerItem({
53
- id: 'chat-view.' + exports.OPEN_AI_CONFIG_VIEW.id,
54
- command: exports.OPEN_AI_CONFIG_VIEW.id,
55
- tooltip: core_1.nls.localize('theia/ai-ide/open-agent-settings-tooltip', 'Open Agent settings...'),
56
- group: 'ai-settings',
57
- priority: 2,
58
- isVisible: widget => this.activationService.isActive && widget instanceof chat_view_widget_1.ChatViewWidget
59
- });
60
- }
61
- };
62
- exports.AIAgentConfigurationViewContribution = AIAgentConfigurationViewContribution;
63
- exports.AIAgentConfigurationViewContribution = AIAgentConfigurationViewContribution = tslib_1.__decorate([
64
- (0, inversify_1.injectable)(),
65
- tslib_1.__metadata("design:paramtypes", [])
66
- ], AIAgentConfigurationViewContribution);
67
- //# sourceMappingURL=ai-configuration-view-contribution.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-configuration-view-contribution.js","sourceRoot":"","sources":["../../../src/browser/ai-configuration/ai-configuration-view-contribution.ts"],"names":[],"mappings":";;;;AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAChF,sCAA4D;AAE5D,wDAAgE;AAChE,qFAAgF;AAEhF,4DAA0D;AAC1D,uEAA2E;AA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AAoC;+CAApC,oCAAoC;IADhD,IAAA,sBAAU,GAAE;;GACA,oCAAoC,CAmChD"}
@@ -1,29 +0,0 @@
1
- import { BaseWidget, DockPanel, WidgetManager } from '@theia/core/lib/browser';
2
- import { TheiaDockPanel } from '@theia/core/lib/browser/shell/theia-dock-panel';
3
- import { AIAgentConfigurationWidget } from './agent-configuration-widget';
4
- import { AIVariableConfigurationWidget } from './variable-configuration-widget';
5
- import { AIToolsConfigurationWidget } from './tools-configuration-widget';
6
- import { AIConfigurationSelectionService } from './ai-configuration-service';
7
- import { AIMCPConfigurationWidget } from './mcp-configuration-widget';
8
- import { AITokenUsageConfigurationWidget } from './token-usage-configuration-widget';
9
- import { AIPromptFragmentsConfigurationWidget } from './prompt-fragments-configuration-widget';
10
- import { ModelAliasesConfigurationWidget } from './model-aliases-configuration-widget';
11
- export declare class AIConfigurationContainerWidget extends BaseWidget {
12
- static readonly ID = "ai-configuration";
13
- static readonly LABEL: string;
14
- protected dockpanel: DockPanel;
15
- protected readonly dockPanelFactory: TheiaDockPanel.Factory;
16
- protected readonly widgetManager: WidgetManager;
17
- protected readonly aiConfigurationSelectionService: AIConfigurationSelectionService;
18
- protected agentsWidget: AIAgentConfigurationWidget;
19
- protected variablesWidget: AIVariableConfigurationWidget;
20
- protected mcpWidget: AIMCPConfigurationWidget;
21
- protected tokenUsageWidget: AITokenUsageConfigurationWidget;
22
- protected promptFragmentsWidget: AIPromptFragmentsConfigurationWidget;
23
- protected toolsWidget: AIToolsConfigurationWidget;
24
- protected modelAliasesWidget: ModelAliasesConfigurationWidget;
25
- protected init(): void;
26
- protected initUI(): Promise<void>;
27
- protected initListeners(): void;
28
- }
29
- //# sourceMappingURL=ai-configuration-widget.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-configuration-widget.d.ts","sourceRoot":"","sources":["../../../src/browser/ai-configuration/ai-configuration-widget.tsx"],"names":[],"mappings":"AAgBA,OAAO,EAAE,UAAU,EAAsB,SAAS,EAAE,aA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