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

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 (301) hide show
  1. package/lib/browser/ai-configuration/agent-configuration-widget.d.ts +41 -0
  2. package/lib/browser/ai-configuration/agent-configuration-widget.d.ts.map +1 -0
  3. package/lib/browser/ai-configuration/agent-configuration-widget.js +333 -0
  4. package/lib/browser/ai-configuration/agent-configuration-widget.js.map +1 -0
  5. package/lib/browser/ai-configuration/ai-configuration-service.d.ts +18 -0
  6. package/lib/browser/ai-configuration/ai-configuration-service.d.ts.map +1 -0
  7. package/lib/browser/ai-configuration/ai-configuration-service.js +53 -0
  8. package/lib/browser/ai-configuration/ai-configuration-service.js.map +1 -0
  9. package/lib/browser/ai-configuration/ai-configuration-view-contribution.d.ts +14 -0
  10. package/lib/browser/ai-configuration/ai-configuration-view-contribution.d.ts.map +1 -0
  11. package/lib/browser/ai-configuration/ai-configuration-view-contribution.js +67 -0
  12. package/lib/browser/ai-configuration/ai-configuration-view-contribution.js.map +1 -0
  13. package/lib/browser/ai-configuration/ai-configuration-widget.d.ts +29 -0
  14. package/lib/browser/ai-configuration/ai-configuration-widget.d.ts.map +1 -0
  15. package/lib/browser/ai-configuration/ai-configuration-widget.js +118 -0
  16. package/lib/browser/ai-configuration/ai-configuration-widget.js.map +1 -0
  17. package/lib/browser/ai-configuration/language-model-renderer.d.ts +13 -0
  18. package/lib/browser/ai-configuration/language-model-renderer.d.ts.map +1 -0
  19. package/lib/browser/ai-configuration/language-model-renderer.js +104 -0
  20. package/lib/browser/ai-configuration/language-model-renderer.js.map +1 -0
  21. package/lib/browser/ai-configuration/mcp-configuration-widget.d.ts +43 -0
  22. package/lib/browser/ai-configuration/mcp-configuration-widget.d.ts.map +1 -0
  23. package/lib/browser/ai-configuration/mcp-configuration-widget.js +302 -0
  24. package/lib/browser/ai-configuration/mcp-configuration-widget.js.map +1 -0
  25. package/lib/browser/ai-configuration/model-aliases-configuration-widget.d.ts +41 -0
  26. package/lib/browser/ai-configuration/model-aliases-configuration-widget.d.ts.map +1 -0
  27. package/lib/browser/ai-configuration/model-aliases-configuration-widget.js +226 -0
  28. package/lib/browser/ai-configuration/model-aliases-configuration-widget.js.map +1 -0
  29. package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.d.ts +141 -0
  30. package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.d.ts.map +1 -0
  31. package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.js +508 -0
  32. package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.js.map +1 -0
  33. package/lib/browser/ai-configuration/template-settings-renderer.d.ts +10 -0
  34. package/lib/browser/ai-configuration/template-settings-renderer.d.ts.map +1 -0
  35. package/lib/browser/ai-configuration/template-settings-renderer.js +48 -0
  36. package/lib/browser/ai-configuration/template-settings-renderer.js.map +1 -0
  37. package/lib/browser/ai-configuration/token-usage-configuration-widget.d.ts +22 -0
  38. package/lib/browser/ai-configuration/token-usage-configuration-widget.d.ts.map +1 -0
  39. package/lib/browser/ai-configuration/token-usage-configuration-widget.js +156 -0
  40. package/lib/browser/ai-configuration/token-usage-configuration-widget.js.map +1 -0
  41. package/lib/browser/ai-configuration/tools-configuration-widget.d.ts +30 -0
  42. package/lib/browser/ai-configuration/tools-configuration-widget.d.ts.map +1 -0
  43. package/lib/browser/ai-configuration/tools-configuration-widget.js +150 -0
  44. package/lib/browser/ai-configuration/tools-configuration-widget.js.map +1 -0
  45. package/lib/browser/ai-configuration/variable-configuration-widget.d.ts +19 -0
  46. package/lib/browser/ai-configuration/variable-configuration-widget.d.ts.map +1 -0
  47. package/lib/browser/ai-configuration/variable-configuration-widget.js +99 -0
  48. package/lib/browser/ai-configuration/variable-configuration-widget.js.map +1 -0
  49. package/lib/browser/ai-ide-activation-service.d.ts +18 -0
  50. package/lib/browser/ai-ide-activation-service.d.ts.map +1 -0
  51. package/lib/browser/ai-ide-activation-service.js +71 -0
  52. package/lib/browser/ai-ide-activation-service.js.map +1 -0
  53. package/lib/browser/ai-terminal-functions.d.ts +13 -0
  54. package/lib/browser/ai-terminal-functions.d.ts.map +1 -0
  55. package/lib/browser/ai-terminal-functions.js +114 -0
  56. package/lib/browser/ai-terminal-functions.js.map +1 -0
  57. package/lib/browser/app-tester-chat-agent.d.ts +35 -0
  58. package/lib/browser/app-tester-chat-agent.d.ts.map +1 -0
  59. package/lib/browser/app-tester-chat-agent.js +142 -0
  60. package/lib/browser/app-tester-chat-agent.js.map +1 -0
  61. package/lib/browser/app-tester-chat-functions.d.ts +25 -0
  62. package/lib/browser/app-tester-chat-functions.d.ts.map +1 -0
  63. package/lib/browser/app-tester-chat-functions.js +170 -0
  64. package/lib/browser/app-tester-chat-functions.js.map +1 -0
  65. package/lib/browser/app-tester-prompt-template.d.ts +6 -0
  66. package/lib/browser/app-tester-prompt-template.d.ts.map +1 -0
  67. package/lib/browser/app-tester-prompt-template.js +83 -0
  68. package/lib/browser/app-tester-prompt-template.js.map +1 -0
  69. package/lib/browser/architect-agent.d.ts +15 -0
  70. package/lib/browser/architect-agent.d.ts.map +1 -0
  71. package/lib/browser/architect-agent.js +68 -0
  72. package/lib/browser/architect-agent.js.map +1 -0
  73. package/lib/browser/coder-agent.d.ts +15 -0
  74. package/lib/browser/coder-agent.d.ts.map +1 -0
  75. package/lib/browser/coder-agent.js +81 -0
  76. package/lib/browser/coder-agent.js.map +1 -0
  77. package/lib/browser/context-file-validation-service-impl.d.ts +13 -0
  78. package/lib/browser/context-file-validation-service-impl.d.ts.map +1 -0
  79. package/lib/browser/context-file-validation-service-impl.js +123 -0
  80. package/lib/browser/context-file-validation-service-impl.js.map +1 -0
  81. package/lib/browser/context-file-validation-service-impl.spec.d.ts +2 -0
  82. package/lib/browser/context-file-validation-service-impl.spec.d.ts.map +1 -0
  83. package/lib/browser/context-file-validation-service-impl.spec.js +340 -0
  84. package/lib/browser/context-file-validation-service-impl.spec.js.map +1 -0
  85. package/lib/browser/context-functions.d.ts +16 -0
  86. package/lib/browser/context-functions.d.ts.map +1 -0
  87. package/lib/browser/context-functions.js +166 -0
  88. package/lib/browser/context-functions.js.map +1 -0
  89. package/lib/browser/context-functions.spec.d.ts +2 -0
  90. package/lib/browser/context-functions.spec.d.ts.map +1 -0
  91. package/lib/browser/context-functions.spec.js +213 -0
  92. package/lib/browser/context-functions.spec.js.map +1 -0
  93. package/lib/browser/file-changeset-function.spec.d.ts +2 -0
  94. package/lib/browser/file-changeset-function.spec.d.ts.map +1 -0
  95. package/lib/browser/file-changeset-function.spec.js +45 -0
  96. package/lib/browser/file-changeset-function.spec.js.map +1 -0
  97. package/lib/browser/file-changeset-functions.d.ts +87 -0
  98. package/lib/browser/file-changeset-functions.d.ts.map +1 -0
  99. package/lib/browser/file-changeset-functions.js +645 -0
  100. package/lib/browser/file-changeset-functions.js.map +1 -0
  101. package/lib/browser/file-changeset-functions.spec.d.ts +2 -0
  102. package/lib/browser/file-changeset-functions.spec.d.ts.map +1 -0
  103. package/lib/browser/file-changeset-functions.spec.js +179 -0
  104. package/lib/browser/file-changeset-functions.spec.js.map +1 -0
  105. package/lib/browser/frontend-module.d.ts +5 -0
  106. package/lib/browser/frontend-module.d.ts.map +1 -0
  107. package/lib/browser/frontend-module.js +220 -0
  108. package/lib/browser/frontend-module.js.map +1 -0
  109. package/lib/browser/github-chat-agent.d.ts +48 -0
  110. package/lib/browser/github-chat-agent.d.ts.map +1 -0
  111. package/lib/browser/github-chat-agent.js +222 -0
  112. package/lib/browser/github-chat-agent.js.map +1 -0
  113. package/lib/browser/github-prompt-template.d.ts +6 -0
  114. package/lib/browser/github-prompt-template.d.ts.map +1 -0
  115. package/lib/browser/github-prompt-template.js +53 -0
  116. package/lib/browser/github-prompt-template.js.map +1 -0
  117. package/lib/browser/github-repo-variable-contribution.d.ts +15 -0
  118. package/lib/browser/github-repo-variable-contribution.d.ts.map +1 -0
  119. package/lib/browser/github-repo-variable-contribution.js +82 -0
  120. package/lib/browser/github-repo-variable-contribution.js.map +1 -0
  121. package/lib/browser/ide-chat-welcome-message-provider.d.ts +10 -0
  122. package/lib/browser/ide-chat-welcome-message-provider.d.ts.map +1 -0
  123. package/lib/browser/ide-chat-welcome-message-provider.js +102 -0
  124. package/lib/browser/ide-chat-welcome-message-provider.js.map +1 -0
  125. package/lib/browser/project-info-agent.d.ts +13 -0
  126. package/lib/browser/project-info-agent.d.ts.map +1 -0
  127. package/lib/browser/project-info-agent.js +45 -0
  128. package/lib/browser/project-info-agent.js.map +1 -0
  129. package/lib/browser/remember-command-contribution.d.ts +16 -0
  130. package/lib/browser/remember-command-contribution.d.ts.map +1 -0
  131. package/lib/browser/remember-command-contribution.js +101 -0
  132. package/lib/browser/remember-command-contribution.js.map +1 -0
  133. package/lib/browser/summarize-session-command-contribution.d.ts +19 -0
  134. package/lib/browser/summarize-session-command-contribution.d.ts.map +1 -0
  135. package/lib/browser/summarize-session-command-contribution.js +118 -0
  136. package/lib/browser/summarize-session-command-contribution.js.map +1 -0
  137. package/lib/browser/task-background-summary-variable.d.ts +9 -0
  138. package/lib/browser/task-background-summary-variable.d.ts.map +1 -0
  139. package/lib/browser/task-background-summary-variable.js +60 -0
  140. package/lib/browser/task-background-summary-variable.js.map +1 -0
  141. package/lib/browser/task-context-agent.d.ts +13 -0
  142. package/lib/browser/task-context-agent.d.ts.map +1 -0
  143. package/lib/browser/task-context-agent.js +45 -0
  144. package/lib/browser/task-context-agent.js.map +1 -0
  145. package/lib/browser/task-context-file-storage-service.d.ts +40 -0
  146. package/lib/browser/task-context-file-storage-service.d.ts.map +1 -0
  147. package/lib/browser/task-context-file-storage-service.js +232 -0
  148. package/lib/browser/task-context-file-storage-service.js.map +1 -0
  149. package/lib/browser/template-preference-contribution.d.ts +17 -0
  150. package/lib/browser/template-preference-contribution.d.ts.map +1 -0
  151. package/lib/browser/template-preference-contribution.js +94 -0
  152. package/lib/browser/template-preference-contribution.js.map +1 -0
  153. package/lib/browser/test/tool-provider-cancellation-test-util.spec.d.ts +2 -0
  154. package/lib/browser/test/tool-provider-cancellation-test-util.spec.d.ts.map +1 -0
  155. package/lib/browser/test/tool-provider-cancellation-test-util.spec.js +52 -0
  156. package/lib/browser/test/tool-provider-cancellation-test-util.spec.js.map +1 -0
  157. package/lib/browser/workspace-functions.d.ts +78 -0
  158. package/lib/browser/workspace-functions.d.ts.map +1 -0
  159. package/lib/browser/workspace-functions.js +697 -0
  160. package/lib/browser/workspace-functions.js.map +1 -0
  161. package/lib/browser/workspace-functions.spec.d.ts +2 -0
  162. package/lib/browser/workspace-functions.spec.d.ts.map +1 -0
  163. package/lib/browser/workspace-functions.spec.js +161 -0
  164. package/lib/browser/workspace-functions.spec.js.map +1 -0
  165. package/lib/browser/workspace-launch-provider.d.ts +24 -0
  166. package/lib/browser/workspace-launch-provider.d.ts.map +1 -0
  167. package/lib/browser/workspace-launch-provider.js +216 -0
  168. package/lib/browser/workspace-launch-provider.js.map +1 -0
  169. package/lib/browser/workspace-launch-provider.spec.d.ts +2 -0
  170. package/lib/browser/workspace-launch-provider.spec.d.ts.map +1 -0
  171. package/lib/browser/workspace-launch-provider.spec.js +245 -0
  172. package/lib/browser/workspace-launch-provider.spec.js.map +1 -0
  173. package/lib/browser/workspace-search-provider.d.ts +15 -0
  174. package/lib/browser/workspace-search-provider.d.ts.map +1 -0
  175. package/lib/browser/workspace-search-provider.js +204 -0
  176. package/lib/browser/workspace-search-provider.js.map +1 -0
  177. package/lib/browser/workspace-search-provider.spec.d.ts +2 -0
  178. package/lib/browser/workspace-search-provider.spec.d.ts.map +1 -0
  179. package/lib/browser/workspace-search-provider.spec.js +82 -0
  180. package/lib/browser/workspace-search-provider.spec.js.map +1 -0
  181. package/lib/browser/workspace-task-provider.d.ts +15 -0
  182. package/lib/browser/workspace-task-provider.d.ts.map +1 -0
  183. package/lib/browser/workspace-task-provider.js +138 -0
  184. package/lib/browser/workspace-task-provider.js.map +1 -0
  185. package/lib/browser/workspace-task-provider.spec.d.ts +2 -0
  186. package/lib/browser/workspace-task-provider.spec.d.ts.map +1 -0
  187. package/lib/browser/workspace-task-provider.spec.js +109 -0
  188. package/lib/browser/workspace-task-provider.spec.js.map +1 -0
  189. package/lib/common/ai-configuration-preferences.d.ts +8 -0
  190. package/lib/common/ai-configuration-preferences.d.ts.map +1 -0
  191. package/lib/common/ai-configuration-preferences.js +41 -0
  192. package/lib/common/ai-configuration-preferences.js.map +1 -0
  193. package/lib/common/ai-ide-preferences.d.ts +5 -0
  194. package/lib/common/ai-ide-preferences.d.ts.map +1 -0
  195. package/lib/common/ai-ide-preferences.js +53 -0
  196. package/lib/common/ai-ide-preferences.js.map +1 -0
  197. package/lib/common/ai-terminal-functions.d.ts +2 -0
  198. package/lib/common/ai-terminal-functions.d.ts.map +1 -0
  199. package/lib/common/ai-terminal-functions.js +20 -0
  200. package/lib/common/ai-terminal-functions.js.map +1 -0
  201. package/lib/common/app-tester-chat-functions.d.ts +5 -0
  202. package/lib/common/app-tester-chat-functions.d.ts.map +1 -0
  203. package/lib/common/app-tester-chat-functions.js +23 -0
  204. package/lib/common/app-tester-chat-functions.js.map +1 -0
  205. package/lib/common/architect-prompt-template.d.ts +3 -0
  206. package/lib/common/architect-prompt-template.d.ts.map +1 -0
  207. package/lib/common/architect-prompt-template.js +81 -0
  208. package/lib/common/architect-prompt-template.js.map +1 -0
  209. package/lib/common/browser-automation-protocol.d.ts +15 -0
  210. package/lib/common/browser-automation-protocol.d.ts.map +1 -0
  211. package/lib/common/browser-automation-protocol.js +22 -0
  212. package/lib/common/browser-automation-protocol.js.map +1 -0
  213. package/lib/common/coder-replace-prompt-template.d.ts +11 -0
  214. package/lib/common/coder-replace-prompt-template.d.ts.map +1 -0
  215. package/lib/common/coder-replace-prompt-template.js +296 -0
  216. package/lib/common/coder-replace-prompt-template.js.map +1 -0
  217. package/lib/common/command-chat-agents.d.ts +36 -0
  218. package/lib/common/command-chat-agents.d.ts.map +1 -0
  219. package/lib/common/command-chat-agents.js +122 -0
  220. package/lib/common/command-chat-agents.js.map +1 -0
  221. package/lib/common/command-prompt-template.d.ts +3 -0
  222. package/lib/common/command-prompt-template.d.ts.map +1 -0
  223. package/lib/common/command-prompt-template.js +226 -0
  224. package/lib/common/command-prompt-template.js.map +1 -0
  225. package/lib/common/context-files-variable.d.ts +9 -0
  226. package/lib/common/context-files-variable.d.ts.map +1 -0
  227. package/lib/common/context-files-variable.js +52 -0
  228. package/lib/common/context-files-variable.js.map +1 -0
  229. package/lib/common/context-functions.d.ts +4 -0
  230. package/lib/common/context-functions.d.ts.map +1 -0
  231. package/lib/common/context-functions.js +22 -0
  232. package/lib/common/context-functions.js.map +1 -0
  233. package/lib/common/context-variables.d.ts +3 -0
  234. package/lib/common/context-variables.d.ts.map +1 -0
  235. package/lib/common/context-variables.js +21 -0
  236. package/lib/common/context-variables.js.map +1 -0
  237. package/lib/common/file-changeset-function-ids.d.ts +19 -0
  238. package/lib/common/file-changeset-function-ids.d.ts.map +1 -0
  239. package/lib/common/file-changeset-function-ids.js +37 -0
  240. package/lib/common/file-changeset-function-ids.js.map +1 -0
  241. package/lib/common/github-repo-protocol.d.ts +15 -0
  242. package/lib/common/github-repo-protocol.d.ts.map +1 -0
  243. package/lib/common/github-repo-protocol.js +21 -0
  244. package/lib/common/github-repo-protocol.js.map +1 -0
  245. package/lib/common/orchestrator-chat-agent.d.ts +36 -0
  246. package/lib/common/orchestrator-chat-agent.d.ts.map +1 -0
  247. package/lib/common/orchestrator-chat-agent.js +167 -0
  248. package/lib/common/orchestrator-chat-agent.js.map +1 -0
  249. package/lib/common/orchestrator-prompt-template.d.ts +3 -0
  250. package/lib/common/orchestrator-prompt-template.d.ts.map +1 -0
  251. package/lib/common/orchestrator-prompt-template.js +55 -0
  252. package/lib/common/orchestrator-prompt-template.js.map +1 -0
  253. package/lib/common/project-info-prompt-template.d.ts +6 -0
  254. package/lib/common/project-info-prompt-template.d.ts.map +1 -0
  255. package/lib/common/project-info-prompt-template.js +145 -0
  256. package/lib/common/project-info-prompt-template.js.map +1 -0
  257. package/lib/common/summarize-session-commands.d.ts +4 -0
  258. package/lib/common/summarize-session-commands.d.ts.map +1 -0
  259. package/lib/common/summarize-session-commands.js +28 -0
  260. package/lib/common/summarize-session-commands.js.map +1 -0
  261. package/lib/common/task-context-prompt-template.d.ts +8 -0
  262. package/lib/common/task-context-prompt-template.d.ts.map +1 -0
  263. package/lib/common/task-context-prompt-template.js +217 -0
  264. package/lib/common/task-context-prompt-template.js.map +1 -0
  265. package/lib/common/universal-chat-agent.d.ts +17 -0
  266. package/lib/common/universal-chat-agent.d.ts.map +1 -0
  267. package/lib/common/universal-chat-agent.js +47 -0
  268. package/lib/common/universal-chat-agent.js.map +1 -0
  269. package/lib/common/universal-prompt-template.d.ts +4 -0
  270. package/lib/common/universal-prompt-template.d.ts.map +1 -0
  271. package/lib/common/universal-prompt-template.js +32 -0
  272. package/lib/common/universal-prompt-template.js.map +1 -0
  273. package/lib/common/workspace-functions.d.ts +12 -0
  274. package/lib/common/workspace-functions.d.ts.map +1 -0
  275. package/lib/common/workspace-functions.js +30 -0
  276. package/lib/common/workspace-functions.js.map +1 -0
  277. package/lib/common/workspace-preferences.d.ts +10 -0
  278. package/lib/common/workspace-preferences.d.ts.map +1 -0
  279. package/lib/common/workspace-preferences.js +89 -0
  280. package/lib/common/workspace-preferences.js.map +1 -0
  281. package/lib/common/workspace-search-provider-util.d.ts +17 -0
  282. package/lib/common/workspace-search-provider-util.d.ts.map +1 -0
  283. package/lib/common/workspace-search-provider-util.js +51 -0
  284. package/lib/common/workspace-search-provider-util.js.map +1 -0
  285. package/lib/node/app-tester-agent/browser-automation-impl.d.ts +18 -0
  286. package/lib/node/app-tester-agent/browser-automation-impl.d.ts.map +1 -0
  287. package/lib/node/app-tester-agent/browser-automation-impl.js +96 -0
  288. package/lib/node/app-tester-agent/browser-automation-impl.js.map +1 -0
  289. package/lib/node/backend-module.d.ts +4 -0
  290. package/lib/node/backend-module.d.ts.map +1 -0
  291. package/lib/node/backend-module.js +45 -0
  292. package/lib/node/backend-module.js.map +1 -0
  293. package/lib/node/github-repo-service-impl.d.ts +7 -0
  294. package/lib/node/github-repo-service-impl.d.ts.map +1 -0
  295. package/lib/node/github-repo-service-impl.js +86 -0
  296. package/lib/node/github-repo-service-impl.js.map +1 -0
  297. package/lib/package.spec.d.ts +1 -0
  298. package/lib/package.spec.d.ts.map +1 -0
  299. package/lib/package.spec.js +26 -0
  300. package/lib/package.spec.js.map +1 -0
  301. package/package.json +21 -21
@@ -0,0 +1,167 @@
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.OrchestratorChatAgent = exports.OrchestratorChatAgentId = void 0;
19
+ const tslib_1 = require("tslib");
20
+ const ai_core_1 = require("@theia/ai-core");
21
+ const inversify_1 = require("@theia/core/shared/inversify");
22
+ const chat_agent_service_1 = require("@theia/ai-chat/lib/common/chat-agent-service");
23
+ const chat_agents_1 = require("@theia/ai-chat/lib/common/chat-agents");
24
+ const chat_model_1 = require("@theia/ai-chat/lib/common/chat-model");
25
+ const core_1 = require("@theia/core");
26
+ const orchestrator_prompt_template_1 = require("./orchestrator-prompt-template");
27
+ const ai_ide_preferences_1 = require("./ai-ide-preferences");
28
+ exports.OrchestratorChatAgentId = 'Orchestrator';
29
+ const OrchestratorRequestIdKey = 'orchestratorRequestIdKey';
30
+ let OrchestratorChatAgent = class OrchestratorChatAgent extends chat_agents_1.AbstractStreamParsingChatAgent {
31
+ constructor() {
32
+ super(...arguments);
33
+ this.id = exports.OrchestratorChatAgentId;
34
+ this.name = exports.OrchestratorChatAgentId;
35
+ this.languageModelRequirements = [{
36
+ purpose: 'agent-selection',
37
+ identifier: 'default/universal',
38
+ }];
39
+ this.defaultLanguageModelPurpose = 'agent-selection';
40
+ this.prompts = [orchestrator_prompt_template_1.orchestratorTemplate];
41
+ this.description = core_1.nls.localize('theia/ai/chat/orchestrator/description', 'This agent analyzes the user request against the description of all available chat agents and selects the best fitting agent to answer the request \
42
+ (by using AI).The user\'s request will be directly delegated to the selected agent without further confirmation.');
43
+ this.iconClass = 'codicon codicon-symbol-boolean';
44
+ this.agentSpecificVariables = [{
45
+ name: 'availableChatAgents',
46
+ description: core_1.nls.localize('theia/ai/chat/orchestrator/vars/availableChatAgents/description', 'The list of chat agents that the orchestrator can delegate to, excluding agents specified in the exclusion list preference.'),
47
+ usedInPrompt: true
48
+ }];
49
+ this.systemPromptId = orchestrator_prompt_template_1.orchestratorTemplate.id;
50
+ this.fallBackChatAgentId = 'Universal';
51
+ }
52
+ async getSystemMessageDescription(context) {
53
+ if (this.systemPromptId === undefined) {
54
+ return undefined;
55
+ }
56
+ const excludedAgents = this.preferenceService.get(ai_ide_preferences_1.PREFERENCE_NAME_ORCHESTRATOR_EXCLUSION_LIST, ['ClaudeCode', 'Codex']);
57
+ const availableAgents = this.getAvailableAgentsForDelegation(excludedAgents);
58
+ const availableChatAgentsValue = availableAgents.map(agent => prettyPrintAgentInMd(agent)).join('\n');
59
+ const resolvedPrompt = await this.promptService.getResolvedPromptFragment(this.systemPromptId, { availableChatAgents: availableChatAgentsValue }, context);
60
+ return resolvedPrompt ? chat_agents_1.SystemMessageDescription.fromResolvedPromptFragment(resolvedPrompt) : undefined;
61
+ }
62
+ getAvailableAgentsForDelegation(excludedAgents) {
63
+ return this.chatAgentService.getAgents()
64
+ .filter(agent => agent.id !== this.id && !excludedAgents.includes(agent.id))
65
+ .map(agent => ({
66
+ id: agent.id,
67
+ name: agent.name,
68
+ description: agent.description
69
+ }));
70
+ }
71
+ getExcludedAgentIds() {
72
+ return this.preferenceService.get(ai_ide_preferences_1.PREFERENCE_NAME_ORCHESTRATOR_EXCLUSION_LIST, ['ClaudeCode', 'Codex']);
73
+ }
74
+ async invoke(request) {
75
+ request.response.addProgressMessage({ content: core_1.nls.localize('theia/ai/ide/orchestrator/progressMessage', 'Determining the most appropriate agent'), status: 'inProgress' });
76
+ // We use a dedicated id for the orchestrator request
77
+ const orchestratorRequestId = (0, core_1.generateUuid)();
78
+ request.addData(OrchestratorRequestIdKey, orchestratorRequestId);
79
+ return super.invoke(request);
80
+ }
81
+ async sendLlmRequest(request, messages, toolRequests, languageModel) {
82
+ var _a;
83
+ const agentSettings = this.getLlmSettings();
84
+ const settings = { ...agentSettings, ...request.session.settings };
85
+ const tools = toolRequests.length > 0 ? toolRequests : undefined;
86
+ const subRequestId = (_a = request.getDataByKey(OrchestratorRequestIdKey)) !== null && _a !== void 0 ? _a : request.id;
87
+ request.removeData(OrchestratorRequestIdKey);
88
+ return this.languageModelService.sendRequest(languageModel, {
89
+ messages,
90
+ tools,
91
+ settings,
92
+ agentId: this.id,
93
+ sessionId: request.session.id,
94
+ requestId: request.id,
95
+ subRequestId: subRequestId,
96
+ cancellationToken: request.response.cancellationToken
97
+ });
98
+ }
99
+ async addContentsToResponse(response, request) {
100
+ var _a;
101
+ const responseText = await (0, ai_core_1.getTextOfResponse)(response);
102
+ let agentIds = [];
103
+ const excludedAgents = this.getExcludedAgentIds();
104
+ try {
105
+ const jsonResponse = await (0, ai_core_1.getJsonOfText)(responseText);
106
+ if (Array.isArray(jsonResponse)) {
107
+ agentIds = jsonResponse.filter((id) => id !== this.id && !excludedAgents.includes(id));
108
+ }
109
+ }
110
+ catch (error) {
111
+ // The llm sometimes does not return a parseable result
112
+ this.logger.error('Failed to parse JSON response', error);
113
+ }
114
+ if (agentIds.length < 1) {
115
+ this.logger.error('No agent was selected, delegating to fallback chat agent');
116
+ request.response.progressMessages.forEach(progressMessage => request.response.updateProgressMessage({ ...progressMessage, status: 'failed' }));
117
+ agentIds = [this.fallBackChatAgentId];
118
+ }
119
+ // check if selected (or fallback) agent exists and is not excluded
120
+ if (!this.chatAgentService.getAgent(agentIds[0]) || excludedAgents.includes(agentIds[0])) {
121
+ this.logger.error(`Chat agent ${agentIds[0]} not found or excluded. Falling back to first available agent.`);
122
+ const firstRegisteredAgent = (_a = this.chatAgentService.getAgents()
123
+ .filter(a => a.id !== this.id && !excludedAgents.includes(a.id))[0]) === null || _a === void 0 ? void 0 : _a.id;
124
+ if (firstRegisteredAgent) {
125
+ agentIds = [firstRegisteredAgent];
126
+ }
127
+ else {
128
+ throw new Error(core_1.nls.localize('theia/ai/ide/orchestrator/error/noAgents', 'No chat agent available to handle request. Please check your configuration whether any are enabled.'));
129
+ }
130
+ }
131
+ // TODO support delegating to more than one agent
132
+ const delegatedToAgent = agentIds[0];
133
+ request.response.response.addContent(new chat_model_1.InformationalChatResponseContentImpl(`*Orchestrator*: ${core_1.nls.localize('theia/ai/ide/orchestrator/response/delegatingToAgent', 'Delegating to \`@{0}\`', delegatedToAgent)}
134
+
135
+ ---
136
+
137
+ `));
138
+ request.response.overrideAgentId(delegatedToAgent);
139
+ request.response.progressMessages.forEach(progressMessage => request.response.updateProgressMessage({ ...progressMessage, status: 'completed' }));
140
+ const agent = this.chatAgentService.getAgent(delegatedToAgent);
141
+ if (!agent) {
142
+ throw new Error(`Chat agent ${delegatedToAgent} not found.`);
143
+ }
144
+ // Get the original request if available
145
+ const originalRequest = '__originalRequest' in request ? request.__originalRequest : request;
146
+ await agent.invoke(originalRequest);
147
+ }
148
+ };
149
+ exports.OrchestratorChatAgent = OrchestratorChatAgent;
150
+ tslib_1.__decorate([
151
+ (0, inversify_1.inject)(chat_agent_service_1.ChatAgentService),
152
+ tslib_1.__metadata("design:type", Object)
153
+ ], OrchestratorChatAgent.prototype, "chatAgentService", void 0);
154
+ tslib_1.__decorate([
155
+ (0, inversify_1.inject)(core_1.PreferenceService),
156
+ tslib_1.__metadata("design:type", Object)
157
+ ], OrchestratorChatAgent.prototype, "preferenceService", void 0);
158
+ exports.OrchestratorChatAgent = OrchestratorChatAgent = tslib_1.__decorate([
159
+ (0, inversify_1.injectable)()
160
+ ], OrchestratorChatAgent);
161
+ function prettyPrintAgentInMd(agent) {
162
+ return `- ${agent.id}
163
+ - *ID*: ${agent.id}
164
+ - *Name*: ${agent.name}
165
+ - *Description*: ${agent.description.replace(/\n/g, ' ')}`;
166
+ }
167
+ //# sourceMappingURL=orchestrator-chat-agent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orchestrator-chat-agent.js","sourceRoot":"","sources":["../../src/common/orchestrator-chat-agent.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,4CAA2K;AAC3K,4DAAkE;AAClE,qFAAgF;AAEhF,uEAAiH;AACjH,qEAAqH;AACrH,sCAAmE;AACnE,iFAAsE;AACtE,6DAAmF;AAEtE,QAAA,uBAAuB,GAAG,cAAc,CAAC;AACtD,MAAM,wBAAwB,GAAG,0BAA0B,CAAC;AAGrD,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,4CAA8B;IAAlE;;QACH,OAAE,GAAW,+BAAuB,CAAC;QACrC,SAAI,GAAG,+BAAuB,CAAC;QAC/B,8BAAyB,GAA+B,CAAC;gBACrD,OAAO,EAAE,iBAAiB;gBAC1B,UAAU,EAAE,mBAAmB;aAClC,CAAC,CAAC;QACO,gCAA2B,GAAW,iBAAiB,CAAC;QAEzD,YAAO,G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=orchestrator-prompt-template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orchestrator-prompt-template.d.ts","sourceRoot":"","sources":["../../src/common/orchestrator-prompt-template.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,eAAO,MAAM,oBAAoB,EAAE,gBAuClC,CAAC"}
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ /* eslint-disable @typescript-eslint/tslint/config */
3
+ // *****************************************************************************
4
+ // Copyright (C) 2025 EclipseSource GmbH and others.
5
+ //
6
+ // This file is licensed under the MIT License.
7
+ // See LICENSE-MIT.txt in the project root for license information.
8
+ // https://opensource.org/license/mit.
9
+ //
10
+ // SPDX-License-Identifier: MIT
11
+ // *****************************************************************************
12
+ Object.defineProperty(exports, "__esModule", { value: true });
13
+ exports.orchestratorTemplate = void 0;
14
+ exports.orchestratorTemplate = {
15
+ id: 'orchestrator-system',
16
+ defaultVariant: {
17
+ id: 'orchestrator-system-default',
18
+ template: `{{!-- This prompt is licensed under the MIT License (https://opensource.org/license/mit).
19
+ Made improvements or adaptations to this prompt template? We’d love for you to share it with the community! Contribute back here:
20
+ https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution --}}
21
+ # Instructions
22
+
23
+ Your task is to identify which Chat Agent(s) should best reply a given user's message.
24
+ You consider all messages of the conversation to ensure consistency and avoid agent switches without a clear context change.
25
+ You should select the best Chat Agent based on the name and description of the agents, matching them to the user message.
26
+
27
+ ## Constraints
28
+
29
+ Your response must be a JSON array containing the id(s) of the selected Chat Agent(s).
30
+
31
+ * Do not use ids that are not provided in the list below.
32
+ * Do not include any additional information, explanations, or questions for the user.
33
+ * If there is no suitable choice, pick \`Universal\`.
34
+ * If there are multiple good choices, return all of them.
35
+
36
+ Unless there is a more specific agent available, select \`Universal\`, especially for general programming-related questions.
37
+ You must only use the \`id\` attribute of the agent, never the name.
38
+
39
+ ### Example Results
40
+
41
+ \`\`\`json
42
+ ["Universal"]
43
+ \`\`\`
44
+
45
+ \`\`\`json
46
+ ["AnotherChatAgent", "Universal"]
47
+ \`\`\`
48
+
49
+ ## List of Currently Available Chat Agents
50
+
51
+ {{availableChatAgents}}
52
+ `
53
+ }
54
+ };
55
+ //# sourceMappingURL=orchestrator-prompt-template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orchestrator-prompt-template.js","sourceRoot":"","sources":["../../src/common/orchestrator-prompt-template.ts"],"names":[],"mappings":";AAAA,qDAAqD;AACrD,gFAAgF;AAChF,oDAAoD;AACpD,EAAE;AACF,+CAA+C;AAC/C,mEAAmE;AACnE,sCAAsC;AACtC,EAAE;AACF,+BAA+B;AAC/B,gFAAgF;;;AAInE,QAAA,oBAAoB,GAAqB;IAClD,EAAE,EAAE,qBAAqB;IACzB,cAAc,EAAE;QACZ,EAAE,EAAE,6BAA6B;QACjC,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCjB;KAAC;CACD,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { PromptVariantSet } from '@theia/ai-core/lib/common';
2
+ export declare const PROJECT_INFO_SYSTEM_PROMPT_TEMPLATE_ID = "project-info-system";
3
+ export declare const PROJECT_INFO_TEMPLATE_PROMPT_ID = "project-info-template";
4
+ export declare const projectInfoTemplateVariants: PromptVariantSet;
5
+ export declare const projectInfoSystemVariants: PromptVariantSet;
6
+ //# sourceMappingURL=project-info-prompt-template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-info-prompt-template.d.ts","sourceRoot":"","sources":["../../src/common/project-info-prompt-template.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAc7D,eAAO,MAAM,sCAAsC,wBAAwB,CAAC;AAC5E,eAAO,MAAM,+BAA+B,0BAA0B,CAAC;AAEvE,eAAO,MAAM,2BAA2B,kBAgCvC,CAAC;AAEF,eAAO,MAAM,yBAAyB,kBAqGrC,CAAC"}
@@ -0,0 +1,145 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.projectInfoSystemVariants = exports.projectInfoTemplateVariants = exports.PROJECT_INFO_TEMPLATE_PROMPT_ID = exports.PROJECT_INFO_SYSTEM_PROMPT_TEMPLATE_ID = void 0;
4
+ const workspace_functions_1 = require("./workspace-functions");
5
+ const context_variables_1 = require("./context-variables");
6
+ const context_functions_1 = require("./context-functions");
7
+ const file_changeset_function_ids_1 = require("./file-changeset-function-ids");
8
+ exports.PROJECT_INFO_SYSTEM_PROMPT_TEMPLATE_ID = 'project-info-system';
9
+ exports.PROJECT_INFO_TEMPLATE_PROMPT_ID = 'project-info-template';
10
+ exports.projectInfoTemplateVariants = {
11
+ id: exports.PROJECT_INFO_TEMPLATE_PROMPT_ID,
12
+ defaultVariant: {
13
+ id: 'project-info-template-default',
14
+ template: `## Project Info Template Structure
15
+
16
+ ### Architecture Overview
17
+ [Brief description of what the project does, Key architectural decisions, patterns, and structure.]
18
+
19
+ ### Key Technologies
20
+ [List of main technologies, frameworks, libraries]
21
+
22
+ ### Essential Development Patterns
23
+ Examples for key patterns (refer via relative file paths)
24
+
25
+ ### File Structure
26
+ [Important directories/packages and their contents]
27
+
28
+ ### Build & Development
29
+ [How to build and run the project.]
30
+
31
+ ### Testing
32
+ [What kind of tests exist, test organization and test patterns. Examples for different types of tests (as relative file paths)]
33
+
34
+ ### Coding Guidelines
35
+ [Coding standards, conventions, practices. Examples for key practices (as relative file paths), rules for imports, indentation]
36
+
37
+ ### Additional Notes
38
+ [Any other important information for agents to understand the project and write code for it. Important files with more information (as relative file paths)]
39
+ \`\`\`
40
+ `
41
+ }
42
+ };
43
+ exports.projectInfoSystemVariants = {
44
+ id: exports.PROJECT_INFO_SYSTEM_PROMPT_TEMPLATE_ID,
45
+ defaultVariant: {
46
+ id: 'project-info-system-default',
47
+ template: `{{!-- This prompt is licensed under the MIT License (https://opensource.org/license/mit).
48
+ Made improvements or adaptations to this prompt template? We'd love for you to share it with the community! Contribute back here:
49
+ https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution --}}
50
+ # Instructions
51
+
52
+ You are the ProjectInfo agent, an AI assistant specialized in managing project information files. Your role is to help users create, update,
53
+ and maintain the \`.prompts/project-info.prompttemplate\` file which provides contextual information about the project to other AI agents.
54
+
55
+ ## Project Info Guidelines
56
+ The project info is an artifact that will be handed over to agents to understand the current workspace, project and codebase.
57
+ Do not include obvious instructions, generic information, generic development practices or things that can be very easily discovered.
58
+ Focus on non-obvious and project-specific facts as well as specific guidelines and patterns.
59
+ Try to keep the project info minimal and avoid duplicates.
60
+
61
+ ## Your Capabilities
62
+
63
+ ### Initially Create Project Info
64
+ For initial project info creation, start by determining the user's preferred working mode:
65
+
66
+ **Step 1: Define mode of working**
67
+ Ask the user about the preferred working mode:
68
+
69
+ 1. "Auto-exploration - Agent explores and creates an initial suggestion",
70
+ 2. "Manual - User provides all necessary input with your guidance"
71
+
72
+ IMPORTANT: Remember the chosen mode and stick to it until the user requests otherwise!
73
+
74
+ - In automatic mode, create an initial version of the project info yourself by exploring the workspace
75
+ - In manual mode, guide the user section by section and ask for additional information.
76
+ Whenever you ask a question to the user, offer the option that you answer the question for them.
77
+
78
+ **Step 2: Final tasks**
79
+ After completing all sections or if you feel the user is done, offer the user to do an automatic refinement:
80
+ "Would you like me to review and finalize the project information?",
81
+ - In this final refinement, particularly focus on relevance and potential duplications and the "Project Info Guidelines"
82
+ - Then, ask for final user review. Tell the user to provide any generic feedback and offer to incorporate it for them.
83
+ - Finally remind them to accept the final version in the change set
84
+
85
+ ### Complete Project Info
86
+ - If a project info is incomplete, offer the user to complete it
87
+
88
+ ### Update Project Info
89
+ - Modify existing project info based on user requirements
90
+ - Do not use a specific workflow for this
91
+
92
+ ## Workspace Analysis Guidelines
93
+
94
+ **Auto-Discovery File Patterns**
95
+ When auto-discovering project information or exploring the workspace structure, ALWAYS prioritize examining these file patterns that commonly contain agent instructions
96
+ and project documentation:
97
+ - .github/copilot-instructions.md
98
+ - AGENT.md
99
+ - AGENTS.md
100
+ - CLAUDE.md
101
+ - .cursorrules
102
+ - .windsurfrules
103
+ - .clinerules
104
+ - .cursor
105
+ - rules/**
106
+ - .windsurf/rules/**
107
+ - .clinerules/**
108
+ - README.md
109
+ - .md files in the root level if they contain documentation
110
+
111
+ Use the **~{${workspace_functions_1.FIND_FILES_BY_PATTERN_FUNCTION_ID}}** function with these patterns to discover relevant configuration and documentation files.
112
+
113
+ ## Context Retrieval
114
+ Use the following functions to interact with the workspace files when needed:
115
+ - **~{${workspace_functions_1.GET_WORKSPACE_FILE_LIST_FUNCTION_ID}}**: List files and directories
116
+ - **~{${workspace_functions_1.FILE_CONTENT_FUNCTION_ID}}**: Get content of specific files
117
+ - **~{${workspace_functions_1.FIND_FILES_BY_PATTERN_FUNCTION_ID}}**: Find files by glob patterns like '**/*.json'
118
+ - **~{${workspace_functions_1.SEARCH_IN_WORKSPACE_FUNCTION_ID}}**: Search file contents
119
+
120
+ Navigate step-by-step and confirm paths. Use **~{${context_functions_1.UPDATE_CONTEXT_FILES_FUNCTION_ID}}** to remember important files for later reference.
121
+
122
+ ## File Modification - SUGGEST ONLY
123
+ Use these functions liberally to suggest file changes. All changes require user review and approval, so the user can reject them if needed.
124
+
125
+ - **~{${file_changeset_function_ids_1.SUGGEST_FILE_CONTENT_ID}}**: Propose complete file content (for creating new templates or complete rewrites)
126
+ - **~{${file_changeset_function_ids_1.SUGGEST_FILE_REPLACEMENTS_ID}}**: Propose targeted replacements of specific text sections
127
+ - **~{${file_changeset_function_ids_1.GET_PROPOSED_CHANGES_ID}}**: View current proposed changes before making additional ones
128
+ - **~{${file_changeset_function_ids_1.CLEAR_FILE_CHANGES_ID}}**: Clear all pending changes for a file to start fresh
129
+
130
+ {{prompt:${exports.PROJECT_INFO_TEMPLATE_PROMPT_ID}}}
131
+
132
+ ## Additional Context
133
+ {{${context_variables_1.CONTEXT_FILES_VARIABLE_ID}}}
134
+
135
+ ## Workflow Guidelines
136
+
137
+ When creating project info for the first time:
138
+ 1. **Always start by asking about the user's preferred mode** (auto-exploration or manual) and stick to it
139
+ 2. **After initial suggestions or provided content**: Always ask for refinement and additional information
140
+
141
+ Remember: Proactively help users maintain accurate project information for better AI assistance.
142
+ `
143
+ }
144
+ };
145
+ //# sourceMappingURL=project-info-prompt-template.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-info-prompt-template.js","sourceRoot":"","sources":["../../src/common/project-info-prompt-template.ts"],"names":[],"mappings":";;;AAWA,+DAG+B;AAC/B,2DAAgE;AAChE,2DAAuE;AACvE,+EAKuC;AAE1B,QAAA,sCAAsC,GAAG,qBAAqB,CAAC;AAC/D,QAAA,+BAA+B,GAAG,uBAAuB,CAAC;AAE1D,QAAA,2BAA2B,GAAqB;IACzD,EAAE,EAAE,uCAA+B;IACnC,cAAc,EAAE;QACZ,EAAE,EAAE,+BAA+B;QACnC,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;CA0BjB;KACI;CACJ,CAAC;AAEW,QAAA,yBAAyB,GAAqB;IACvD,EAAE,EAAE,8CAAsC;IAC1C,cAAc,EAAE;QACZ,EAAE,EAAE,6BAA6B;QACjC,QAAQ,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;cAgEJ,uDAAiC;;;;QAIvC,yDAAmC;QACnC,8CAAwB;QACxB,uDAAiC;QACjC,qDAA+B;;mDAEY,oDAAgC;;;;;QAK3E,qDAAuB;QACvB,0DAA4B;QAC5B,qDAAuB;QACvB,mDAAqB;;WAElB,uCAA+B;;;IAGtC,6CAAyB;;;;;;;;;CAS5B;KACI;CACJ,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { Command } from '@theia/core';
2
+ export declare const AI_SUMMARIZE_SESSION_AS_TASK_FOR_CODER: Command;
3
+ export declare const AI_UPDATE_TASK_CONTEXT_COMMAND: Command;
4
+ //# sourceMappingURL=summarize-session-commands.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"summarize-session-commands.d.ts","sourceRoot":"","sources":["../../src/common/summarize-session-commands.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAEtC,eAAO,MAAM,sCAAsC,SAGjD,CAAC;AAEH,eAAO,MAAM,8BAA8B,SAGzC,CAAC"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2025 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.AI_UPDATE_TASK_CONTEXT_COMMAND = exports.AI_SUMMARIZE_SESSION_AS_TASK_FOR_CODER = void 0;
19
+ const core_1 = require("@theia/core");
20
+ exports.AI_SUMMARIZE_SESSION_AS_TASK_FOR_CODER = core_1.Command.toLocalizedCommand({
21
+ id: 'ai-chat:summarize-session-as-task-for-coder',
22
+ label: 'Summarize Session as Task for Coder'
23
+ });
24
+ exports.AI_UPDATE_TASK_CONTEXT_COMMAND = core_1.Command.toLocalizedCommand({
25
+ id: 'ai.updateTaskContext',
26
+ label: 'Update Current Task Context'
27
+ });
28
+ //# sourceMappingURL=summarize-session-commands.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"summarize-session-commands.js","sourceRoot":"","sources":["../../src/common/summarize-session-commands.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,sCAAsC;AAEzB,QAAA,sCAAsC,GAAG,cAAO,CAAC,kBAAkB,CAAC;IAC7E,EAAE,EAAE,6CAA6C;IACjD,KAAK,EAAE,qCAAqC;CAC/C,CAAC,CAAC;AAEU,QAAA,8BAA8B,GAAG,cAAO,CAAC,kBAAkB,CAAC;IACrE,EAAE,EAAE,sBAAsB;IAC1B,KAAK,EAAE,6BAA6B;CACvC,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import { PromptVariantSet } from '@theia/ai-core/lib/common';
2
+ export declare const TASK_CONTEXT_CREATE_PROMPT_ID = "task-context-create";
3
+ export declare const TASK_CONTEXT_TEMPLATE_PROMPT_ID = "task-context-template";
4
+ export declare const TASK_CONTEXT_UPDATE_PROMPT_ID = "task-context-update";
5
+ export declare const taskContextSystemVariants: PromptVariantSet;
6
+ export declare const taskContextTemplateVariants: PromptVariantSet;
7
+ export declare const taskContextUpdateVariants: PromptVariantSet;
8
+ //# sourceMappingURL=task-context-prompt-template.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-context-prompt-template.d.ts","sourceRoot":"","sources":["../../src/common/task-context-prompt-template.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAG7D,eAAO,MAAM,6BAA6B,wBAAwB,CAAC;AACnE,eAAO,MAAM,+BAA+B,0BAA0B,CAAC;AACvE,eAAO,MAAM,6BAA6B,wBAAwB,CAAC;AAEnE,eAAO,MAAM,yBAAyB,kBA4BrC,CAAC;AAEF,eAAO,MAAM,2BAA2B,kBA8HvC,CAAC;AAEF,eAAO,MAAM,yBAAyB,kBAoDrC,CAAC"}