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

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 (373) hide show
  1. package/lib/browser/address-pr-review-command-contribution.d.ts +9 -0
  2. package/lib/browser/address-pr-review-command-contribution.d.ts.map +1 -0
  3. package/lib/browser/address-pr-review-command-contribution.js +176 -0
  4. package/lib/browser/address-pr-review-command-contribution.js.map +1 -0
  5. package/lib/browser/ai-configuration/agent-configuration-widget.d.ts +47 -0
  6. package/lib/browser/ai-configuration/agent-configuration-widget.d.ts.map +1 -0
  7. package/lib/browser/ai-configuration/agent-configuration-widget.js +385 -0
  8. package/lib/browser/ai-configuration/agent-configuration-widget.js.map +1 -0
  9. package/lib/browser/ai-configuration/ai-configuration-service.d.ts +18 -0
  10. package/lib/browser/ai-configuration/ai-configuration-service.d.ts.map +1 -0
  11. package/lib/browser/ai-configuration/ai-configuration-service.js +53 -0
  12. package/lib/browser/ai-configuration/ai-configuration-service.js.map +1 -0
  13. package/lib/browser/ai-configuration/ai-configuration-view-contribution.d.ts +14 -0
  14. package/lib/browser/ai-configuration/ai-configuration-view-contribution.d.ts.map +1 -0
  15. package/lib/browser/ai-configuration/ai-configuration-view-contribution.js +67 -0
  16. package/lib/browser/ai-configuration/ai-configuration-view-contribution.js.map +1 -0
  17. package/lib/browser/ai-configuration/ai-configuration-widget.d.ts +29 -0
  18. package/lib/browser/ai-configuration/ai-configuration-widget.d.ts.map +1 -0
  19. package/lib/browser/ai-configuration/ai-configuration-widget.js +118 -0
  20. package/lib/browser/ai-configuration/ai-configuration-widget.js.map +1 -0
  21. package/lib/browser/ai-configuration/base/ai-card-grid-configuration-widget.d.ts +32 -0
  22. package/lib/browser/ai-configuration/base/ai-card-grid-configuration-widget.d.ts.map +1 -0
  23. package/lib/browser/ai-configuration/base/ai-card-grid-configuration-widget.js +55 -0
  24. package/lib/browser/ai-configuration/base/ai-card-grid-configuration-widget.js.map +1 -0
  25. package/lib/browser/ai-configuration/base/ai-configuration-base-widget.d.ts +14 -0
  26. package/lib/browser/ai-configuration/base/ai-configuration-base-widget.d.ts.map +1 -0
  27. package/lib/browser/ai-configuration/base/ai-configuration-base-widget.js +35 -0
  28. package/lib/browser/ai-configuration/base/ai-configuration-base-widget.js.map +1 -0
  29. package/lib/browser/ai-configuration/base/ai-hierarchical-configuration-widget.d.ts +23 -0
  30. package/lib/browser/ai-configuration/base/ai-hierarchical-configuration-widget.d.ts.map +1 -0
  31. package/lib/browser/ai-configuration/base/ai-hierarchical-configuration-widget.js +60 -0
  32. package/lib/browser/ai-configuration/base/ai-hierarchical-configuration-widget.js.map +1 -0
  33. package/lib/browser/ai-configuration/base/ai-list-detail-configuration-widget.d.ts +56 -0
  34. package/lib/browser/ai-configuration/base/ai-list-detail-configuration-widget.d.ts.map +1 -0
  35. package/lib/browser/ai-configuration/base/ai-list-detail-configuration-widget.js +96 -0
  36. package/lib/browser/ai-configuration/base/ai-list-detail-configuration-widget.js.map +1 -0
  37. package/lib/browser/ai-configuration/base/ai-table-configuration-widget.d.ts +45 -0
  38. package/lib/browser/ai-configuration/base/ai-table-configuration-widget.d.ts.map +1 -0
  39. package/lib/browser/ai-configuration/base/ai-table-configuration-widget.js +66 -0
  40. package/lib/browser/ai-configuration/base/ai-table-configuration-widget.js.map +1 -0
  41. package/lib/browser/ai-configuration/components/configuration-section.d.ts +13 -0
  42. package/lib/browser/ai-configuration/components/configuration-section.d.ts.map +1 -0
  43. package/lib/browser/ai-configuration/components/configuration-section.js +28 -0
  44. package/lib/browser/ai-configuration/components/configuration-section.js.map +1 -0
  45. package/lib/browser/ai-configuration/components/empty-state.d.ts +11 -0
  46. package/lib/browser/ai-configuration/components/empty-state.d.ts.map +1 -0
  47. package/lib/browser/ai-configuration/components/empty-state.js +26 -0
  48. package/lib/browser/ai-configuration/components/empty-state.js.map +1 -0
  49. package/lib/browser/ai-configuration/components/expandable-section.d.ts +14 -0
  50. package/lib/browser/ai-configuration/components/expandable-section.d.ts.map +1 -0
  51. package/lib/browser/ai-configuration/components/expandable-section.js +31 -0
  52. package/lib/browser/ai-configuration/components/expandable-section.js.map +1 -0
  53. package/lib/browser/ai-configuration/language-model-renderer.d.ts +13 -0
  54. package/lib/browser/ai-configuration/language-model-renderer.d.ts.map +1 -0
  55. package/lib/browser/ai-configuration/language-model-renderer.js +105 -0
  56. package/lib/browser/ai-configuration/language-model-renderer.js.map +1 -0
  57. package/lib/browser/ai-configuration/mcp-configuration-widget.d.ts +42 -0
  58. package/lib/browser/ai-configuration/mcp-configuration-widget.d.ts.map +1 -0
  59. package/lib/browser/ai-configuration/mcp-configuration-widget.js +308 -0
  60. package/lib/browser/ai-configuration/mcp-configuration-widget.js.map +1 -0
  61. package/lib/browser/ai-configuration/model-aliases-configuration-widget.d.ts +27 -0
  62. package/lib/browser/ai-configuration/model-aliases-configuration-widget.d.ts.map +1 -0
  63. package/lib/browser/ai-configuration/model-aliases-configuration-widget.js +197 -0
  64. package/lib/browser/ai-configuration/model-aliases-configuration-widget.js.map +1 -0
  65. package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.d.ts +141 -0
  66. package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.d.ts.map +1 -0
  67. package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.js +508 -0
  68. package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.js.map +1 -0
  69. package/lib/browser/ai-configuration/template-settings-renderer.d.ts +10 -0
  70. package/lib/browser/ai-configuration/template-settings-renderer.d.ts.map +1 -0
  71. package/lib/browser/ai-configuration/template-settings-renderer.js +48 -0
  72. package/lib/browser/ai-configuration/template-settings-renderer.js.map +1 -0
  73. package/lib/browser/ai-configuration/token-usage-configuration-widget.d.ts +21 -0
  74. package/lib/browser/ai-configuration/token-usage-configuration-widget.d.ts.map +1 -0
  75. package/lib/browser/ai-configuration/token-usage-configuration-widget.js +170 -0
  76. package/lib/browser/ai-configuration/token-usage-configuration-widget.js.map +1 -0
  77. package/lib/browser/ai-configuration/tools-configuration-widget.d.ts +35 -0
  78. package/lib/browser/ai-configuration/tools-configuration-widget.d.ts.map +1 -0
  79. package/lib/browser/ai-configuration/tools-configuration-widget.js +158 -0
  80. package/lib/browser/ai-configuration/tools-configuration-widget.js.map +1 -0
  81. package/lib/browser/ai-configuration/variable-configuration-widget.d.ts +23 -0
  82. package/lib/browser/ai-configuration/variable-configuration-widget.d.ts.map +1 -0
  83. package/lib/browser/ai-configuration/variable-configuration-widget.js +132 -0
  84. package/lib/browser/ai-configuration/variable-configuration-widget.js.map +1 -0
  85. package/lib/browser/ai-ide-activation-service.d.ts +18 -0
  86. package/lib/browser/ai-ide-activation-service.d.ts.map +1 -0
  87. package/lib/browser/ai-ide-activation-service.js +71 -0
  88. package/lib/browser/ai-ide-activation-service.js.map +1 -0
  89. package/lib/browser/ai-terminal-functions.d.ts +13 -0
  90. package/lib/browser/ai-terminal-functions.d.ts.map +1 -0
  91. package/lib/browser/ai-terminal-functions.js +114 -0
  92. package/lib/browser/ai-terminal-functions.js.map +1 -0
  93. package/lib/browser/analyze-gh-ticket-command-contribution.d.ts +9 -0
  94. package/lib/browser/analyze-gh-ticket-command-contribution.d.ts.map +1 -0
  95. package/lib/browser/analyze-gh-ticket-command-contribution.js +172 -0
  96. package/lib/browser/analyze-gh-ticket-command-contribution.js.map +1 -0
  97. package/lib/browser/app-tester-chat-agent.d.ts +35 -0
  98. package/lib/browser/app-tester-chat-agent.d.ts.map +1 -0
  99. package/lib/browser/app-tester-chat-agent.js +142 -0
  100. package/lib/browser/app-tester-chat-agent.js.map +1 -0
  101. package/lib/browser/app-tester-chat-functions.d.ts +25 -0
  102. package/lib/browser/app-tester-chat-functions.d.ts.map +1 -0
  103. package/lib/browser/app-tester-chat-functions.js +170 -0
  104. package/lib/browser/app-tester-chat-functions.js.map +1 -0
  105. package/lib/browser/app-tester-prompt-template.d.ts +6 -0
  106. package/lib/browser/app-tester-prompt-template.d.ts.map +1 -0
  107. package/lib/browser/app-tester-prompt-template.js +83 -0
  108. package/lib/browser/app-tester-prompt-template.js.map +1 -0
  109. package/lib/browser/architect-agent.d.ts +15 -0
  110. package/lib/browser/architect-agent.d.ts.map +1 -0
  111. package/lib/browser/architect-agent.js +68 -0
  112. package/lib/browser/architect-agent.js.map +1 -0
  113. package/lib/browser/coder-agent.d.ts +15 -0
  114. package/lib/browser/coder-agent.d.ts.map +1 -0
  115. package/lib/browser/coder-agent.js +81 -0
  116. package/lib/browser/coder-agent.js.map +1 -0
  117. package/lib/browser/context-file-validation-service-impl.d.ts +13 -0
  118. package/lib/browser/context-file-validation-service-impl.d.ts.map +1 -0
  119. package/lib/browser/context-file-validation-service-impl.js +123 -0
  120. package/lib/browser/context-file-validation-service-impl.js.map +1 -0
  121. package/lib/browser/context-file-validation-service-impl.spec.d.ts +2 -0
  122. package/lib/browser/context-file-validation-service-impl.spec.d.ts.map +1 -0
  123. package/lib/browser/context-file-validation-service-impl.spec.js +340 -0
  124. package/lib/browser/context-file-validation-service-impl.spec.js.map +1 -0
  125. package/lib/browser/context-functions.d.ts +16 -0
  126. package/lib/browser/context-functions.d.ts.map +1 -0
  127. package/lib/browser/context-functions.js +166 -0
  128. package/lib/browser/context-functions.js.map +1 -0
  129. package/lib/browser/context-functions.spec.d.ts +2 -0
  130. package/lib/browser/context-functions.spec.d.ts.map +1 -0
  131. package/lib/browser/context-functions.spec.js +213 -0
  132. package/lib/browser/context-functions.spec.js.map +1 -0
  133. package/lib/browser/file-changeset-function.spec.d.ts +2 -0
  134. package/lib/browser/file-changeset-function.spec.d.ts.map +1 -0
  135. package/lib/browser/file-changeset-function.spec.js +45 -0
  136. package/lib/browser/file-changeset-function.spec.js.map +1 -0
  137. package/lib/browser/file-changeset-functions.d.ts +87 -0
  138. package/lib/browser/file-changeset-functions.d.ts.map +1 -0
  139. package/lib/browser/file-changeset-functions.js +645 -0
  140. package/lib/browser/file-changeset-functions.js.map +1 -0
  141. package/lib/browser/file-changeset-functions.spec.d.ts +2 -0
  142. package/lib/browser/file-changeset-functions.spec.d.ts.map +1 -0
  143. package/lib/browser/file-changeset-functions.spec.js +179 -0
  144. package/lib/browser/file-changeset-functions.spec.js.map +1 -0
  145. package/lib/browser/frontend-module.d.ts +5 -0
  146. package/lib/browser/frontend-module.d.ts.map +1 -0
  147. package/lib/browser/frontend-module.js +226 -0
  148. package/lib/browser/frontend-module.js.map +1 -0
  149. package/lib/browser/github-chat-agent.d.ts +48 -0
  150. package/lib/browser/github-chat-agent.d.ts.map +1 -0
  151. package/lib/browser/github-chat-agent.js +222 -0
  152. package/lib/browser/github-chat-agent.js.map +1 -0
  153. package/lib/browser/github-prompt-template.d.ts +6 -0
  154. package/lib/browser/github-prompt-template.d.ts.map +1 -0
  155. package/lib/browser/github-prompt-template.js +53 -0
  156. package/lib/browser/github-prompt-template.js.map +1 -0
  157. package/lib/browser/github-repo-variable-contribution.d.ts +15 -0
  158. package/lib/browser/github-repo-variable-contribution.d.ts.map +1 -0
  159. package/lib/browser/github-repo-variable-contribution.js +82 -0
  160. package/lib/browser/github-repo-variable-contribution.js.map +1 -0
  161. package/lib/browser/ide-chat-welcome-message-provider.d.ts +10 -0
  162. package/lib/browser/ide-chat-welcome-message-provider.d.ts.map +1 -0
  163. package/lib/browser/ide-chat-welcome-message-provider.js +102 -0
  164. package/lib/browser/ide-chat-welcome-message-provider.js.map +1 -0
  165. package/lib/browser/implement-gh-ticket-command-contribution.d.ts +9 -0
  166. package/lib/browser/implement-gh-ticket-command-contribution.d.ts.map +1 -0
  167. package/lib/browser/implement-gh-ticket-command-contribution.js +156 -0
  168. package/lib/browser/implement-gh-ticket-command-contribution.js.map +1 -0
  169. package/lib/browser/project-info-agent.d.ts +13 -0
  170. package/lib/browser/project-info-agent.d.ts.map +1 -0
  171. package/lib/browser/project-info-agent.js +45 -0
  172. package/lib/browser/project-info-agent.js.map +1 -0
  173. package/lib/browser/remember-command-contribution.d.ts +16 -0
  174. package/lib/browser/remember-command-contribution.d.ts.map +1 -0
  175. package/lib/browser/remember-command-contribution.js +101 -0
  176. package/lib/browser/remember-command-contribution.js.map +1 -0
  177. package/lib/browser/summarize-session-command-contribution.d.ts +19 -0
  178. package/lib/browser/summarize-session-command-contribution.d.ts.map +1 -0
  179. package/lib/browser/summarize-session-command-contribution.js +118 -0
  180. package/lib/browser/summarize-session-command-contribution.js.map +1 -0
  181. package/lib/browser/task-background-summary-variable.d.ts +9 -0
  182. package/lib/browser/task-background-summary-variable.d.ts.map +1 -0
  183. package/lib/browser/task-background-summary-variable.js +60 -0
  184. package/lib/browser/task-background-summary-variable.js.map +1 -0
  185. package/lib/browser/task-context-agent.d.ts +13 -0
  186. package/lib/browser/task-context-agent.d.ts.map +1 -0
  187. package/lib/browser/task-context-agent.js +45 -0
  188. package/lib/browser/task-context-agent.js.map +1 -0
  189. package/lib/browser/task-context-file-storage-service.d.ts +40 -0
  190. package/lib/browser/task-context-file-storage-service.d.ts.map +1 -0
  191. package/lib/browser/task-context-file-storage-service.js +232 -0
  192. package/lib/browser/task-context-file-storage-service.js.map +1 -0
  193. package/lib/browser/template-preference-contribution.d.ts +17 -0
  194. package/lib/browser/template-preference-contribution.d.ts.map +1 -0
  195. package/lib/browser/template-preference-contribution.js +94 -0
  196. package/lib/browser/template-preference-contribution.js.map +1 -0
  197. package/lib/browser/test/tool-provider-cancellation-test-util.spec.d.ts +2 -0
  198. package/lib/browser/test/tool-provider-cancellation-test-util.spec.d.ts.map +1 -0
  199. package/lib/browser/test/tool-provider-cancellation-test-util.spec.js +52 -0
  200. package/lib/browser/test/tool-provider-cancellation-test-util.spec.js.map +1 -0
  201. package/lib/browser/workspace-functions.d.ts +78 -0
  202. package/lib/browser/workspace-functions.d.ts.map +1 -0
  203. package/lib/browser/workspace-functions.js +697 -0
  204. package/lib/browser/workspace-functions.js.map +1 -0
  205. package/lib/browser/workspace-functions.spec.d.ts +2 -0
  206. package/lib/browser/workspace-functions.spec.d.ts.map +1 -0
  207. package/lib/browser/workspace-functions.spec.js +161 -0
  208. package/lib/browser/workspace-functions.spec.js.map +1 -0
  209. package/lib/browser/workspace-launch-provider.d.ts +24 -0
  210. package/lib/browser/workspace-launch-provider.d.ts.map +1 -0
  211. package/lib/browser/workspace-launch-provider.js +216 -0
  212. package/lib/browser/workspace-launch-provider.js.map +1 -0
  213. package/lib/browser/workspace-launch-provider.spec.d.ts +2 -0
  214. package/lib/browser/workspace-launch-provider.spec.d.ts.map +1 -0
  215. package/lib/browser/workspace-launch-provider.spec.js +245 -0
  216. package/lib/browser/workspace-launch-provider.spec.js.map +1 -0
  217. package/lib/browser/workspace-search-provider.d.ts +15 -0
  218. package/lib/browser/workspace-search-provider.d.ts.map +1 -0
  219. package/lib/browser/workspace-search-provider.js +204 -0
  220. package/lib/browser/workspace-search-provider.js.map +1 -0
  221. package/lib/browser/workspace-search-provider.spec.d.ts +2 -0
  222. package/lib/browser/workspace-search-provider.spec.d.ts.map +1 -0
  223. package/lib/browser/workspace-search-provider.spec.js +82 -0
  224. package/lib/browser/workspace-search-provider.spec.js.map +1 -0
  225. package/lib/browser/workspace-task-provider.d.ts +15 -0
  226. package/lib/browser/workspace-task-provider.d.ts.map +1 -0
  227. package/lib/browser/workspace-task-provider.js +138 -0
  228. package/lib/browser/workspace-task-provider.js.map +1 -0
  229. package/lib/browser/workspace-task-provider.spec.d.ts +2 -0
  230. package/lib/browser/workspace-task-provider.spec.d.ts.map +1 -0
  231. package/lib/browser/workspace-task-provider.spec.js +109 -0
  232. package/lib/browser/workspace-task-provider.spec.js.map +1 -0
  233. package/lib/common/ai-configuration-preferences.d.ts +8 -0
  234. package/lib/common/ai-configuration-preferences.d.ts.map +1 -0
  235. package/lib/common/ai-configuration-preferences.js +41 -0
  236. package/lib/common/ai-configuration-preferences.js.map +1 -0
  237. package/lib/common/ai-ide-preferences.d.ts +5 -0
  238. package/lib/common/ai-ide-preferences.d.ts.map +1 -0
  239. package/lib/common/ai-ide-preferences.js +53 -0
  240. package/lib/common/ai-ide-preferences.js.map +1 -0
  241. package/lib/common/ai-terminal-functions.d.ts +2 -0
  242. package/lib/common/ai-terminal-functions.d.ts.map +1 -0
  243. package/lib/common/ai-terminal-functions.js +20 -0
  244. package/lib/common/ai-terminal-functions.js.map +1 -0
  245. package/lib/common/app-tester-chat-functions.d.ts +5 -0
  246. package/lib/common/app-tester-chat-functions.d.ts.map +1 -0
  247. package/lib/common/app-tester-chat-functions.js +23 -0
  248. package/lib/common/app-tester-chat-functions.js.map +1 -0
  249. package/lib/common/architect-prompt-template.d.ts +3 -0
  250. package/lib/common/architect-prompt-template.d.ts.map +1 -0
  251. package/lib/common/architect-prompt-template.js +81 -0
  252. package/lib/common/architect-prompt-template.js.map +1 -0
  253. package/lib/common/browser-automation-protocol.d.ts +15 -0
  254. package/lib/common/browser-automation-protocol.d.ts.map +1 -0
  255. package/lib/common/browser-automation-protocol.js +22 -0
  256. package/lib/common/browser-automation-protocol.js.map +1 -0
  257. package/lib/common/coder-replace-prompt-template.d.ts +11 -0
  258. package/lib/common/coder-replace-prompt-template.d.ts.map +1 -0
  259. package/lib/common/coder-replace-prompt-template.js +296 -0
  260. package/lib/common/coder-replace-prompt-template.js.map +1 -0
  261. package/lib/common/command-chat-agents.d.ts +36 -0
  262. package/lib/common/command-chat-agents.d.ts.map +1 -0
  263. package/lib/common/command-chat-agents.js +122 -0
  264. package/lib/common/command-chat-agents.js.map +1 -0
  265. package/lib/common/command-prompt-template.d.ts +3 -0
  266. package/lib/common/command-prompt-template.d.ts.map +1 -0
  267. package/lib/common/command-prompt-template.js +226 -0
  268. package/lib/common/command-prompt-template.js.map +1 -0
  269. package/lib/common/context-files-variable.d.ts +9 -0
  270. package/lib/common/context-files-variable.d.ts.map +1 -0
  271. package/lib/common/context-files-variable.js +52 -0
  272. package/lib/common/context-files-variable.js.map +1 -0
  273. package/lib/common/context-functions.d.ts +4 -0
  274. package/lib/common/context-functions.d.ts.map +1 -0
  275. package/lib/common/context-functions.js +22 -0
  276. package/lib/common/context-functions.js.map +1 -0
  277. package/lib/common/context-variables.d.ts +3 -0
  278. package/lib/common/context-variables.d.ts.map +1 -0
  279. package/lib/common/context-variables.js +21 -0
  280. package/lib/common/context-variables.js.map +1 -0
  281. package/lib/common/file-changeset-function-ids.d.ts +19 -0
  282. package/lib/common/file-changeset-function-ids.d.ts.map +1 -0
  283. package/lib/common/file-changeset-function-ids.js +37 -0
  284. package/lib/common/file-changeset-function-ids.js.map +1 -0
  285. package/lib/common/github-repo-protocol.d.ts +15 -0
  286. package/lib/common/github-repo-protocol.d.ts.map +1 -0
  287. package/lib/common/github-repo-protocol.js +21 -0
  288. package/lib/common/github-repo-protocol.js.map +1 -0
  289. package/lib/common/orchestrator-chat-agent.d.ts +36 -0
  290. package/lib/common/orchestrator-chat-agent.d.ts.map +1 -0
  291. package/lib/common/orchestrator-chat-agent.js +167 -0
  292. package/lib/common/orchestrator-chat-agent.js.map +1 -0
  293. package/lib/common/orchestrator-prompt-template.d.ts +3 -0
  294. package/lib/common/orchestrator-prompt-template.d.ts.map +1 -0
  295. package/lib/common/orchestrator-prompt-template.js +55 -0
  296. package/lib/common/orchestrator-prompt-template.js.map +1 -0
  297. package/lib/common/project-info-prompt-template.d.ts +6 -0
  298. package/lib/common/project-info-prompt-template.d.ts.map +1 -0
  299. package/lib/common/project-info-prompt-template.js +145 -0
  300. package/lib/common/project-info-prompt-template.js.map +1 -0
  301. package/lib/common/summarize-session-commands.d.ts +4 -0
  302. package/lib/common/summarize-session-commands.d.ts.map +1 -0
  303. package/lib/common/summarize-session-commands.js +28 -0
  304. package/lib/common/summarize-session-commands.js.map +1 -0
  305. package/lib/common/task-context-prompt-template.d.ts +8 -0
  306. package/lib/common/task-context-prompt-template.d.ts.map +1 -0
  307. package/lib/common/task-context-prompt-template.js +217 -0
  308. package/lib/common/task-context-prompt-template.js.map +1 -0
  309. package/lib/common/universal-chat-agent.d.ts +17 -0
  310. package/lib/common/universal-chat-agent.d.ts.map +1 -0
  311. package/lib/common/universal-chat-agent.js +47 -0
  312. package/lib/common/universal-chat-agent.js.map +1 -0
  313. package/lib/common/universal-prompt-template.d.ts +4 -0
  314. package/lib/common/universal-prompt-template.d.ts.map +1 -0
  315. package/lib/common/universal-prompt-template.js +32 -0
  316. package/lib/common/universal-prompt-template.js.map +1 -0
  317. package/lib/common/workspace-functions.d.ts +12 -0
  318. package/lib/common/workspace-functions.d.ts.map +1 -0
  319. package/lib/common/workspace-functions.js +30 -0
  320. package/lib/common/workspace-functions.js.map +1 -0
  321. package/lib/common/workspace-preferences.d.ts +10 -0
  322. package/lib/common/workspace-preferences.d.ts.map +1 -0
  323. package/lib/common/workspace-preferences.js +89 -0
  324. package/lib/common/workspace-preferences.js.map +1 -0
  325. package/lib/common/workspace-search-provider-util.d.ts +17 -0
  326. package/lib/common/workspace-search-provider-util.d.ts.map +1 -0
  327. package/lib/common/workspace-search-provider-util.js +51 -0
  328. package/lib/common/workspace-search-provider-util.js.map +1 -0
  329. package/lib/node/app-tester-agent/browser-automation-impl.d.ts +18 -0
  330. package/lib/node/app-tester-agent/browser-automation-impl.d.ts.map +1 -0
  331. package/lib/node/app-tester-agent/browser-automation-impl.js +96 -0
  332. package/lib/node/app-tester-agent/browser-automation-impl.js.map +1 -0
  333. package/lib/node/backend-module.d.ts +4 -0
  334. package/lib/node/backend-module.d.ts.map +1 -0
  335. package/lib/node/backend-module.js +45 -0
  336. package/lib/node/backend-module.js.map +1 -0
  337. package/lib/node/github-repo-service-impl.d.ts +7 -0
  338. package/lib/node/github-repo-service-impl.d.ts.map +1 -0
  339. package/lib/node/github-repo-service-impl.js +86 -0
  340. package/lib/node/github-repo-service-impl.js.map +1 -0
  341. package/lib/package.spec.d.ts +1 -0
  342. package/lib/package.spec.d.ts.map +1 -0
  343. package/lib/package.spec.js +26 -0
  344. package/lib/package.spec.js.map +1 -0
  345. package/package.json +21 -21
  346. package/src/browser/address-pr-review-command-contribution.ts +180 -0
  347. package/src/browser/ai-configuration/agent-configuration-widget.tsx +256 -135
  348. package/src/browser/ai-configuration/base/ai-card-grid-configuration-widget.tsx +72 -0
  349. package/src/browser/ai-configuration/base/ai-configuration-base-widget.tsx +37 -0
  350. package/src/browser/ai-configuration/base/ai-hierarchical-configuration-widget.tsx +51 -0
  351. package/src/browser/ai-configuration/base/ai-list-detail-configuration-widget.tsx +140 -0
  352. package/src/browser/ai-configuration/base/ai-table-configuration-widget.tsx +107 -0
  353. package/src/browser/ai-configuration/components/configuration-section.tsx +37 -0
  354. package/src/browser/ai-configuration/components/empty-state.tsx +30 -0
  355. package/src/browser/ai-configuration/components/expandable-section.tsx +51 -0
  356. package/src/browser/ai-configuration/language-model-renderer.tsx +68 -63
  357. package/src/browser/ai-configuration/mcp-configuration-widget.tsx +80 -85
  358. package/src/browser/ai-configuration/model-aliases-configuration-widget.tsx +93 -107
  359. package/src/browser/ai-configuration/template-settings-renderer.tsx +25 -29
  360. package/src/browser/ai-configuration/token-usage-configuration-widget.tsx +130 -130
  361. package/src/browser/ai-configuration/tools-configuration-widget.tsx +68 -59
  362. package/src/browser/ai-configuration/variable-configuration-widget.tsx +95 -45
  363. package/src/browser/analyze-gh-ticket-command-contribution.ts +176 -0
  364. package/src/browser/frontend-module.ts +6 -0
  365. package/src/browser/implement-gh-ticket-command-contribution.ts +160 -0
  366. package/src/browser/style/ai-configuration-base.css +90 -0
  367. package/src/browser/style/ai-configuration-cards.css +60 -0
  368. package/src/browser/style/ai-configuration-hierarchical.css +61 -0
  369. package/src/browser/style/ai-configuration-list-detail.css +88 -0
  370. package/src/browser/style/ai-configuration-table.css +73 -0
  371. package/src/browser/style/index.css +458 -288
  372. package/src/browser/style/widgets/mcp-configuration.css +253 -0
  373. package/src/browser/style/widgets/model-aliases-configuration.css +74 -0
@@ -0,0 +1,156 @@
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.FixGitHubTicketCommandContribution = void 0;
19
+ const tslib_1 = require("tslib");
20
+ const inversify_1 = require("@theia/core/shared/inversify");
21
+ const common_1 = require("@theia/ai-core/lib/common");
22
+ const core_1 = require("@theia/core");
23
+ const agent_delegation_tool_1 = require("@theia/ai-chat/lib/browser/agent-delegation-tool");
24
+ const github_chat_agent_1 = require("./github-chat-agent");
25
+ let FixGitHubTicketCommandContribution = class FixGitHubTicketCommandContribution {
26
+ onStart() {
27
+ this.registerFixGitHubTicketCommand();
28
+ }
29
+ registerFixGitHubTicketCommand() {
30
+ const commandTemplate = this.buildCommandTemplate();
31
+ this.promptService.addBuiltInPromptFragment({
32
+ id: 'fix-gh-ticket',
33
+ template: commandTemplate,
34
+ isCommand: true,
35
+ commandName: 'fix-gh-ticket',
36
+ commandDescription: core_1.nls.localize('theia/ai-ide/fixGhTicketCommand/description', 'Analyze a GitHub ticket and implement the solution'),
37
+ commandArgumentHint: core_1.nls.localize('theia/ai-ide/fixGhTicketCommand/argumentHint', '<ticket-number>'),
38
+ commandAgents: ['Coder']
39
+ });
40
+ }
41
+ buildCommandTemplate() {
42
+ return `You have been asked to analyze a GitHub ticket and implement the solution.
43
+
44
+ ## Ticket Number
45
+ $ARGUMENTS
46
+
47
+ ## Task Overview
48
+ You need to retrieve details about the specified GitHub ticket, analyze whether it can be implemented, and if so, implement the solution.
49
+
50
+ ## Step 1: Retrieve Ticket Information
51
+ Use the ~{${agent_delegation_tool_1.AGENT_DELEGATION_FUNCTION_ID}} tool to delegate to the GitHub agent and retrieve comprehensive information about the ticket.
52
+
53
+ **Agent ID:** '${github_chat_agent_1.GitHubChatAgentId}'
54
+ **Prompt:** Ask the GitHub agent to retrieve ALL details about issue/ticket #$ARGUMENTS, specifically requesting:
55
+ - The complete issue title and description/body
56
+ - All comments on the issue (this is critical for understanding the full context)
57
+ - Labels and assignees
58
+ - Issue state (open/closed)
59
+ - Any referenced issues or pull requests mentioned in the description or comments
60
+ - If other issues are referenced, retrieve their details as well
61
+
62
+ Example delegation prompt:
63
+ \`\`\`
64
+ Please retrieve comprehensive information about issue #$ARGUMENTS. I need:
65
+ 1. The complete issue title, body/description, labels, state, and assignees
66
+ 2. ALL comments on this issue - every single comment is important for understanding the context
67
+ 3. Any issues or PRs that are referenced or linked in the description or comments
68
+ 4. For any referenced issues, please also retrieve their titles and descriptions
69
+
70
+ This is for implementing the issue, so completeness is crucial.
71
+ \`\`\`
72
+
73
+ ## Step 2: Analyze AI Solvability
74
+ After receiving the ticket information, analyze whether this ticket can be implemented by you. Consider:
75
+
76
+ ### Criteria for Implementable Tickets:
77
+ - **Clear requirements**: The ticket clearly describes what needs to be done
78
+ - **Defined scope**: The scope of changes is well-defined and bounded
79
+ - **Technical feasibility**: The task involves code changes that can be reasoned about
80
+ - **Sufficient context**: Enough information is provided to understand the problem and solution
81
+ - **Reproducible**: For bugs, there's enough information to understand and reproduce the issue
82
+
83
+ ### Criteria for Non-Implementable Tickets:
84
+ - **Ambiguous requirements**: The ticket is vague or open to multiple interpretations
85
+ - **Missing context**: Critical information is missing (e.g., environment details, reproduction steps)
86
+ - **External dependencies**: Requires access to external systems, credentials, or human interaction
87
+ - **Design decisions needed**: Requires architectural decisions that need human judgment
88
+ - **Insufficient information**: Cannot determine what success looks like
89
+
90
+ ## Step 3: Respond Based on Analysis
91
+
92
+ ### If the ticket CANNOT be implemented:
93
+ Provide a clear explanation:
94
+ 1. **Reason**: Explain specifically why this ticket cannot be implemented by AI
95
+ 2. **Missing Information**: List what information is missing or unclear
96
+ 3. **Questions for Clarification**: Ask specific questions that, if answered, might make the ticket implementable
97
+
98
+ Example response format:
99
+ \`\`\`
100
+ ## Analysis Result: Cannot Be Implemented
101
+
102
+ ### Reason
103
+ [Explain why]
104
+
105
+ ### Missing Information
106
+ - [Item 1]
107
+ - [Item 2]
108
+
109
+ ### Questions for Clarification
110
+ 1. [Question 1]
111
+ 2. [Question 2]
112
+
113
+ Please provide the missing information and I will proceed with the implementation.
114
+ \`\`\`
115
+
116
+ ### If the ticket CAN be implemented:
117
+ Proceed with the implementation:
118
+
119
+ 1. **Briefly summarize** what the ticket requests and your implementation approach
120
+ 2. **Explore the codebase** to understand the existing code structure and find relevant files
121
+ 3. **Implement the solution** by making the necessary code changes using your file modification tools
122
+ 4. **Explain your changes** as you make them
123
+ 5. **Consider edge cases** and handle them appropriately
124
+ 6. **Suggest testing steps** the user should perform to verify the implementation
125
+
126
+ Example response format:
127
+ \`\`\`
128
+ ## Analysis Result: Can Be Implemented
129
+
130
+ ### Summary
131
+ [Brief summary of the ticket and your approach]
132
+
133
+ ### Implementation
134
+ [Proceed to explore the codebase and implement the changes, explaining as you go]
135
+ \`\`\`
136
+
137
+ ## Important Guidelines for Implementation
138
+ - Always explore the codebase first to understand the existing patterns and conventions
139
+ - Follow the existing code style and patterns in the project
140
+ - Make incremental changes and explain each step
141
+ - If you encounter unexpected issues during implementation, explain them and ask for guidance
142
+ - After implementation, summarize what was changed and suggest how to test the changes
143
+
144
+ Remember: If at any point during implementation you realize you need more information or the task is more complex than initially assessed, stop and ask for clarification rather
145
+ than making assumptions.`;
146
+ }
147
+ };
148
+ exports.FixGitHubTicketCommandContribution = FixGitHubTicketCommandContribution;
149
+ tslib_1.__decorate([
150
+ (0, inversify_1.inject)(common_1.PromptService),
151
+ tslib_1.__metadata("design:type", Object)
152
+ ], FixGitHubTicketCommandContribution.prototype, "promptService", void 0);
153
+ exports.FixGitHubTicketCommandContribution = FixGitHubTicketCommandContribution = tslib_1.__decorate([
154
+ (0, inversify_1.injectable)()
155
+ ], FixGitHubTicketCommandContribution);
156
+ //# sourceMappingURL=implement-gh-ticket-command-contribution.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"implement-gh-ticket-command-contribution.js","sourceRoot":"","sources":["../../src/browser/implement-gh-ticket-command-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;;;;AAGhF,4DAAkE;AAClE,sDAA0D;AAC1D,sCAAkC;AAClC,4FAAgG;AAChG,2DAAwD;AAGjD,IAAM,kCAAkC,GAAxC,MAAM,kCAAkC;IAK3C,OAAO;QACH,IAAI,CAAC,8BAA8B,EAAE,CAAC;IAC1C,CAAC;IAES,8BAA8B;QACpC,MAAM,eAAe,GAAG,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAEpD,IAAI,CAAC,aAAa,CAAC,wBAAwB,CAAC;YACxC,EAAE,EAAE,eAAe;YACnB,QAAQ,EAAE,eAAe;YACzB,SAAS,EAAE,IAAI;YACf,WAAW,EAAE,eAAe;YAC5B,kBAAkB,EAAE,UAAG,CAAC,QAAQ,CAC5B,6CAA6C,EAC7C,oDAAoD,CACvD;YACD,mBAAmB,EAAE,UAAG,CAAC,QAAQ,CAC7B,8CAA8C,EAC9C,iBAAiB,CACpB;YACD,aAAa,EAAE,CAAC,OAAO,CAAC;SAC3B,CAAC,CAAC;IACP,CAAC;IAES,oBAAoB;QAC1B,OAAO;;;;;;;;;YASH,oDAA4B;;iBAEvB,qCAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBA4FT,CAAC;IACtB,CAAC;CACJ,CAAA;AAvIY,gFAAkC;AAGxB;IADlB,IAAA,kBAAM,EAAC,sBAAa,CAAC;;yEAC0B;6CAHvC,kCAAkC;IAD9C,IAAA,sBAAU,GAAE;GACA,kCAAkC,CAuI9C"}
@@ -0,0 +1,13 @@
1
+ import { AbstractStreamParsingChatAgent } from '@theia/ai-chat';
2
+ import { LanguageModelRequirement } from '@theia/ai-core';
3
+ export declare class ProjectInfoAgent extends AbstractStreamParsingChatAgent {
4
+ name: string;
5
+ id: string;
6
+ languageModelRequirements: LanguageModelRequirement[];
7
+ protected defaultLanguageModelPurpose: string;
8
+ description: string;
9
+ tags: string[];
10
+ prompts: import("@theia/ai-core").PromptVariantSet[];
11
+ protected systemPromptId: string | undefined;
12
+ }
13
+ //# sourceMappingURL=project-info-agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-info-agent.d.ts","sourceRoot":"","sources":["../../src/browser/project-info-agent.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,8BAA8B,EAAE,MAAM,gBAAgB,CAAC;AAChE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAK1D,qBACa,gBAAiB,SAAQ,8BAA8B;IAEhE,IAAI,SAAiB;IACrB,EAAE,SAAiB;IACnB,yBAAyB,EAAE,wBAAwB,EAAE,CAGlD;IACH,SAAS,CAAC,2BAA2B,EAAE,MAAM,CAAU;IAE9C,WAAW,SAEwJ;IAEnK,IAAI,EAAE,MAAM,EAAE,CAA2B;IAEzC,OAAO,8CAA4D;IAC5E,UAAmB,cAAc,EAAE,MAAM,GAAG,SAAS,CAAgC;CAExF"}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProjectInfoAgent = 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 ai_chat_1 = require("@theia/ai-chat");
21
+ const inversify_1 = require("@theia/core/shared/inversify");
22
+ const project_info_prompt_template_1 = require("../common/project-info-prompt-template");
23
+ const core_1 = require("@theia/core");
24
+ let ProjectInfoAgent = class ProjectInfoAgent extends ai_chat_1.AbstractStreamParsingChatAgent {
25
+ constructor() {
26
+ super(...arguments);
27
+ this.name = 'ProjectInfo';
28
+ this.id = 'ProjectInfo';
29
+ this.languageModelRequirements = [{
30
+ purpose: 'chat',
31
+ identifier: 'default/code',
32
+ }];
33
+ this.defaultLanguageModelPurpose = 'chat';
34
+ this.description = core_1.nls.localize('theia/ai/workspace/projectInfoAgent/description', 'An AI assistant for managing project information templates. This agent helps create, update, and review the .prompts/project-info.prompttemplate file which provides ' +
35
+ 'context about your project to other AI agents. It can analyze your workspace to suggest project information or update existing templates based on your requirements.');
36
+ this.tags = [...this.tags, 'Alpha'];
37
+ this.prompts = [project_info_prompt_template_1.projectInfoSystemVariants, project_info_prompt_template_1.projectInfoTemplateVariants];
38
+ this.systemPromptId = project_info_prompt_template_1.projectInfoSystemVariants.id;
39
+ }
40
+ };
41
+ exports.ProjectInfoAgent = ProjectInfoAgent;
42
+ exports.ProjectInfoAgent = ProjectInfoAgent = tslib_1.__decorate([
43
+ (0, inversify_1.injectable)()
44
+ ], ProjectInfoAgent);
45
+ //# sourceMappingURL=project-info-agent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-info-agent.js","sourceRoot":"","sources":["../../src/browser/project-info-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;AAChF,4CAAgE;AAEhE,4DAA0D;AAC1D,yFAAgH;AAChH,sCAAkC;AAG3B,IAAM,gBAAgB,GAAtB,MAAM,gBAAiB,SAAQ,wCAA8B;IAA7D;;QAEH,SAAI,GAAG,aAAa,CAAC;QACrB,OAAE,GAAG,aAAa,CAAC;QACnB,8BAAyB,GAA+B,CAAC;gBACrD,OAAO,EAAE,MAAM;gBACf,UAAU,EAAE,cAAc;aAC7B,CAAC,CAAC;QACO,gCAA2B,GAAW,MAAM,CAAC;QAE9C,gBAAW,GAAG,UAAG,CAAC,QAAQ,CAAC,iDAAiD,EACjF,uKAAuK;YACvK,sKAAsK,CAAC,CAAC;QAEnK,SAAI,GAAa,CAAC,GAAG,IAAI,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAEzC,YAAO,GAAG,CAAC,wDAAyB,EAAE,0DAA2B,CAAC,CAAC;QACzD,mBAAc,GAAuB,wDAAyB,CAAC,EAAE,CAAC;IAEzF,CAAC;CAAA,CAAA;AAnBY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,sBAAU,GAAE;GACA,gBAAgB,CAmB5B"}
@@ -0,0 +1,16 @@
1
+ import { FrontendApplicationContribution } from '@theia/core/lib/browser';
2
+ import { PromptService } from '@theia/ai-core/lib/common';
3
+ /**
4
+ * Contribution that registers the `/remember` slash command for AI chat agents.
5
+ *
6
+ * This command allows Architect and Coder agents to extract important topics
7
+ * from the current conversation and delegate to the ProjectInfo agent to update
8
+ * the persistent project context file.
9
+ */
10
+ export declare class RememberCommandContribution implements FrontendApplicationContribution {
11
+ protected readonly promptService: PromptService;
12
+ onStart(): void;
13
+ protected registerRememberCommand(): void;
14
+ protected buildCommandTemplate(): string;
15
+ }
16
+ //# sourceMappingURL=remember-command-contribution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remember-command-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/remember-command-contribution.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAE1E,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAI1D;;;;;;GAMG;AACH,qBACa,2BAA4B,YAAW,+BAA+B;IAG/E,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IAEhD,OAAO,IAAI,IAAI;IAIf,SAAS,CAAC,uBAAuB,IAAI,IAAI;IAoBzC,SAAS,CAAC,oBAAoB,IAAI,MAAM;CA6C3C"}
@@ -0,0 +1,101 @@
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.RememberCommandContribution = void 0;
19
+ const tslib_1 = require("tslib");
20
+ const inversify_1 = require("@theia/core/shared/inversify");
21
+ const common_1 = require("@theia/ai-core/lib/common");
22
+ const core_1 = require("@theia/core");
23
+ const agent_delegation_tool_1 = require("@theia/ai-chat/lib/browser/agent-delegation-tool");
24
+ /**
25
+ * Contribution that registers the `/remember` slash command for AI chat agents.
26
+ *
27
+ * This command allows Architect and Coder agents to extract important topics
28
+ * from the current conversation and delegate to the ProjectInfo agent to update
29
+ * the persistent project context file.
30
+ */
31
+ let RememberCommandContribution = class RememberCommandContribution {
32
+ onStart() {
33
+ this.registerRememberCommand();
34
+ }
35
+ registerRememberCommand() {
36
+ const commandTemplate = this.buildCommandTemplate();
37
+ this.promptService.addBuiltInPromptFragment({
38
+ id: 'remember-conversation-context',
39
+ template: commandTemplate,
40
+ isCommand: true,
41
+ commandName: 'remember',
42
+ commandDescription: core_1.nls.localize('theia/ai-ide/rememberCommand/description', 'Extract topics from conversation and update project info'),
43
+ commandArgumentHint: core_1.nls.localize('theia/ai-ide/rememberCommand/argumentHint', '[topic-hint]'),
44
+ commandAgents: ['Architect', 'Coder']
45
+ });
46
+ }
47
+ buildCommandTemplate() {
48
+ return `You have been asked to extract and remember important information from the current conversation.
49
+
50
+ ## Task Overview
51
+ Review the conversation history and identify specific information that should be added to the persistent project context.
52
+
53
+ ## Focus Area
54
+ $ARGUMENTS
55
+
56
+ ## What to Extract
57
+ **If a focus area is provided above**: ONLY extract information related to that specific focus area. Ignore all other topics.
58
+
59
+ **If no focus area is provided**: Look specifically for information where the user had to correct you or provide clarification:
60
+ - **User corrections**: When the user corrected your assumptions about the codebase, architecture, or processes
61
+ - **User-provided context**: Information the user explicitly provided that you couldn't discover yourself
62
+ - **Project-specific knowledge**: Details about the project that the user shared when you made incorrect assumptions
63
+
64
+ **Do NOT extract**:
65
+ - General information you discovered through code analysis
66
+ - Standard coding practices you identified yourself
67
+ - Information you found by exploring the codebase
68
+ - Common knowledge or widely-known patterns
69
+ - Details that are already well-documented in the code
70
+
71
+ ## Instructions
72
+ 1. **Analyze the conversation**: Review messages for the specific criteria above
73
+ 2. **Extract only relevant information**: For each qualifying item, prepare a clear description that captures:
74
+ - What the user corrected or clarified
75
+ - Why your initial understanding was incomplete
76
+ - The specific project context that was provided
77
+ 3. **Delegate to ProjectInfo agent**: Use the ~{${agent_delegation_tool_1.AGENT_DELEGATION_FUNCTION_ID}} tool to send the extracted information to the ProjectInfo agent:
78
+ - Agent ID: 'ProjectInfo'
79
+ - Prompt: Ask the ProjectInfo agent to review the extracted information and update the project information file
80
+
81
+ ## Example Delegation
82
+ \`\`\`
83
+ Please review and incorporate the following user corrections/clarifications into the project context:
84
+
85
+ [Your extracted corrections and user-provided context here]
86
+
87
+ Update /.prompts/project-info.prompttemplate by adding this information to the appropriate sections. Focus on information that prevents future misunderstandings.
88
+ \`\`\`
89
+
90
+ Remember: Only extract information that prevents future AI agents from making the same mistakes or assumptions you made that were corrected by the user.`;
91
+ }
92
+ };
93
+ exports.RememberCommandContribution = RememberCommandContribution;
94
+ tslib_1.__decorate([
95
+ (0, inversify_1.inject)(common_1.PromptService),
96
+ tslib_1.__metadata("design:type", Object)
97
+ ], RememberCommandContribution.prototype, "promptService", void 0);
98
+ exports.RememberCommandContribution = RememberCommandContribution = tslib_1.__decorate([
99
+ (0, inversify_1.injectable)()
100
+ ], RememberCommandContribution);
101
+ //# sourceMappingURL=remember-command-contribution.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"remember-command-contribution.js","sourceRoot":"","sources":["../../src/browser/remember-command-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;;;;AAGhF,4DAAkE;AAClE,sDAA0D;AAC1D,sCAAkC;AAClC,4FAAgG;AAEhG;;;;;;GAMG;AAEI,IAAM,2BAA2B,GAAjC,MAAM,2BAA2B;IAKpC,OAAO;QACH,IAAI,CAAC,uBAAuB,EAAE,CAAC;IACnC,CAAC;IAES,uBAAuB;QAC7B,MAAM,eAAe,GAAG,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAEpD,IAAI,CAAC,aAAa,CAAC,wBAAwB,CAAC;YACxC,EAAE,EAAE,+BAA+B;YACnC,QAAQ,EAAE,eAAe;YACzB,SAAS,EAAE,IAAI;YACf,WAAW,EAAE,UAAU;YACvB,kBAAkB,EAAE,UAAG,CAAC,QAAQ,CAC5B,0CAA0C,EAC1C,0DAA0D,CAC7D;YACD,mBAAmB,EAAE,UAAG,CAAC,QAAQ,CAC7B,2CAA2C,EAC3C,cAAc,CACjB;YACD,aAAa,EAAE,CAAC,WAAW,EAAE,OAAO,CAAC;SACxC,CAAC,CAAC;IACP,CAAC;IAES,oBAAoB;QAC1B,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sDA6BuC,oDAA4B;;;;;;;;;;;;;6JAa2E,CAAC;IAC1J,CAAC;CACJ,CAAA;AA1EY,kEAA2B;AAGjB;IADlB,IAAA,kBAAM,EAAC,sBAAa,CAAC;;kEAC0B;sCAHvC,2BAA2B;IADvC,IAAA,sBAAU,GAAE;GACA,2BAA2B,CA0EvC"}
@@ -0,0 +1,19 @@
1
+ import { ChatService } from '@theia/ai-chat/lib/common';
2
+ import { CommandContribution, CommandRegistry, CommandService } from '@theia/core';
3
+ import { TaskContextStorageService, TaskContextService } from '@theia/ai-chat/lib/browser/task-context-service';
4
+ import { CoderAgent } from './coder-agent';
5
+ import { FileService } from '@theia/filesystem/lib/browser/file-service';
6
+ import { WorkspaceService } from '@theia/workspace/lib/browser';
7
+ import { AICommandHandlerFactory } from '@theia/ai-core/lib/browser';
8
+ export declare class SummarizeSessionCommandContribution implements CommandContribution {
9
+ protected readonly chatService: ChatService;
10
+ protected readonly taskContextService: TaskContextService;
11
+ protected readonly commandService: CommandService;
12
+ protected readonly coderAgent: CoderAgent;
13
+ protected readonly taskContextStorageService: TaskContextStorageService;
14
+ protected readonly fileService: FileService;
15
+ protected readonly wsService: WorkspaceService;
16
+ protected readonly commandHandlerFactory: AICommandHandlerFactory;
17
+ registerCommands(registry: CommandRegistry): void;
18
+ }
19
+ //# sourceMappingURL=summarize-session-command-contribution.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"summarize-session-command-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/summarize-session-command-contribution.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAqB,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AACnF,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AAGhH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAK3C,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAC;AAErE,qBACa,mCAAoC,YAAW,mBAAmB;IAE3E,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAG5C,SAAS,CAAC,QAAQ,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAG1D,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IAGlD,SAAS,CAAC,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAG1C,SAAS,CAAC,QAAQ,CAAC,yBAAyB,EAAE,yBAAyB,CAAC;IAGxE,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAG5C,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,gBAAgB,CAAC;IAG/C,SAAS,CAAC,QAAQ,CAAC,qBAAqB,EAAE,uBAAuB,CAAC;IAElE,gBAAgB,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI;CAwDpD"}
@@ -0,0 +1,118 @@
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.SummarizeSessionCommandContribution = void 0;
19
+ const tslib_1 = require("tslib");
20
+ const common_1 = require("@theia/ai-chat/lib/common");
21
+ const core_1 = require("@theia/core");
22
+ const task_context_service_1 = require("@theia/ai-chat/lib/browser/task-context-service");
23
+ const inversify_1 = require("@theia/core/shared/inversify");
24
+ const summarize_session_commands_1 = require("../common/summarize-session-commands");
25
+ const coder_agent_1 = require("./coder-agent");
26
+ const task_context_variable_1 = require("@theia/ai-chat/lib/browser/task-context-variable");
27
+ const task_context_prompt_template_1 = require("../common/task-context-prompt-template");
28
+ const file_variable_contribution_1 = require("@theia/ai-core/lib/browser/file-variable-contribution");
29
+ const file_service_1 = require("@theia/filesystem/lib/browser/file-service");
30
+ const browser_1 = require("@theia/workspace/lib/browser");
31
+ const browser_2 = require("@theia/ai-core/lib/browser");
32
+ let SummarizeSessionCommandContribution = class SummarizeSessionCommandContribution {
33
+ registerCommands(registry) {
34
+ registry.registerCommand(summarize_session_commands_1.AI_UPDATE_TASK_CONTEXT_COMMAND, this.commandHandlerFactory({
35
+ execute: async () => {
36
+ const activeSession = this.chatService.getActiveSession();
37
+ if (!activeSession) {
38
+ return;
39
+ }
40
+ // Check if there is an existing summary for this session
41
+ if (!this.taskContextService.hasSummary(activeSession)) {
42
+ // If no summary exists, create one first
43
+ await this.taskContextService.summarize(activeSession, task_context_prompt_template_1.TASK_CONTEXT_CREATE_PROMPT_ID);
44
+ }
45
+ else {
46
+ // Update existing summary
47
+ await this.taskContextService.update(activeSession, task_context_prompt_template_1.TASK_CONTEXT_UPDATE_PROMPT_ID);
48
+ }
49
+ }
50
+ }));
51
+ registry.registerCommand(summarize_session_commands_1.AI_SUMMARIZE_SESSION_AS_TASK_FOR_CODER, this.commandHandlerFactory({
52
+ execute: async () => {
53
+ const activeSession = this.chatService.getActiveSession();
54
+ if (!activeSession) {
55
+ return;
56
+ }
57
+ const summaryId = await this.taskContextService.summarize(activeSession, task_context_prompt_template_1.TASK_CONTEXT_CREATE_PROMPT_ID);
58
+ // Open the summary in a new editor
59
+ await this.taskContextStorageService.open(summaryId);
60
+ // Add the summary file to the context of the active Architect session
61
+ const summary = this.taskContextService.getAll().find(s => s.id === summaryId);
62
+ if (summary === null || summary === void 0 ? void 0 : summary.uri) {
63
+ if (await this.fileService.exists(summary === null || summary === void 0 ? void 0 : summary.uri)) {
64
+ const wsRelativePath = await this.wsService.getWorkspaceRelativePath(summary === null || summary === void 0 ? void 0 : summary.uri);
65
+ // Create a file variable for the summary
66
+ const fileVariable = {
67
+ variable: file_variable_contribution_1.FILE_VARIABLE,
68
+ arg: wsRelativePath
69
+ };
70
+ // Add the file to the active session's context
71
+ activeSession.model.context.addVariables(fileVariable);
72
+ }
73
+ // Create a new session with the coder agent
74
+ const newSession = this.chatService.createSession(common_1.ChatAgentLocation.Panel, { focus: true }, this.coderAgent);
75
+ const summaryVariable = { variable: task_context_variable_1.TASK_CONTEXT_VARIABLE, arg: summaryId };
76
+ newSession.model.context.addVariables(summaryVariable);
77
+ }
78
+ }
79
+ }));
80
+ }
81
+ };
82
+ exports.SummarizeSessionCommandContribution = SummarizeSessionCommandContribution;
83
+ tslib_1.__decorate([
84
+ (0, inversify_1.inject)(common_1.ChatService),
85
+ tslib_1.__metadata("design:type", Object)
86
+ ], SummarizeSessionCommandContribution.prototype, "chatService", void 0);
87
+ tslib_1.__decorate([
88
+ (0, inversify_1.inject)(task_context_service_1.TaskContextService),
89
+ tslib_1.__metadata("design:type", task_context_service_1.TaskContextService)
90
+ ], SummarizeSessionCommandContribution.prototype, "taskContextService", void 0);
91
+ tslib_1.__decorate([
92
+ (0, inversify_1.inject)(core_1.CommandService),
93
+ tslib_1.__metadata("design:type", Object)
94
+ ], SummarizeSessionCommandContribution.prototype, "commandService", void 0);
95
+ tslib_1.__decorate([
96
+ (0, inversify_1.inject)(coder_agent_1.CoderAgent),
97
+ tslib_1.__metadata("design:type", coder_agent_1.CoderAgent)
98
+ ], SummarizeSessionCommandContribution.prototype, "coderAgent", void 0);
99
+ tslib_1.__decorate([
100
+ (0, inversify_1.inject)(task_context_service_1.TaskContextStorageService),
101
+ tslib_1.__metadata("design:type", Object)
102
+ ], SummarizeSessionCommandContribution.prototype, "taskContextStorageService", void 0);
103
+ tslib_1.__decorate([
104
+ (0, inversify_1.inject)(file_service_1.FileService),
105
+ tslib_1.__metadata("design:type", file_service_1.FileService)
106
+ ], SummarizeSessionCommandContribution.prototype, "fileService", void 0);
107
+ tslib_1.__decorate([
108
+ (0, inversify_1.inject)(browser_1.WorkspaceService),
109
+ tslib_1.__metadata("design:type", browser_1.WorkspaceService)
110
+ ], SummarizeSessionCommandContribution.prototype, "wsService", void 0);
111
+ tslib_1.__decorate([
112
+ (0, inversify_1.inject)(browser_2.AICommandHandlerFactory),
113
+ tslib_1.__metadata("design:type", Function)
114
+ ], SummarizeSessionCommandContribution.prototype, "commandHandlerFactory", void 0);
115
+ exports.SummarizeSessionCommandContribution = SummarizeSessionCommandContribution = tslib_1.__decorate([
116
+ (0, inversify_1.injectable)()
117
+ ], SummarizeSessionCommandContribution);
118
+ //# sourceMappingURL=summarize-session-command-contribution.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"summarize-session-command-contribution.js","sourceRoot":"","sources":["../../src/browser/summarize-session-command-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;;;;AAEhF,sDAA2E;AAC3E,sCAAmF;AACnF,0FAAgH;AAChH,4DAAkE;AAClE,qFAA8H;AAC9H,+CAA2C;AAC3C,4FAAyF;AACzF,yFAAsH;AACtH,sGAAsF;AAEtF,6EAAyE;AACzE,0DAAgE;AAChE,wDAAqE;AAG9D,IAAM,mCAAmC,GAAzC,MAAM,mCAAmC;IAyB5C,gBAAgB,CAAC,QAAyB;QACtC,QAAQ,CAAC,eAAe,CAAC,2DAA8B,EAAE,IAAI,CAAC,qBAAqB,CAAC;YAChF,OAAO,EAAE,KAAK,IAAI,EAAE;gBAChB,MAAM,aAAa,GAAG,IAAI,CAAC,WAAW,CAAC,gBAAgB,EAAE,CAAC;gBAE1D,IAAI,CAAC,aAAa,EAAE,CAAC;oBACjB,OAAO;gBACX,CAAC;gBAED,yDAAyD;gBACzD,IAAI,CAAC,IAAI,CAAC,kBAAkB,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;oBACrD,yCAAyC;oBACzC,MAAM,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,aAAa,EAAE,4DAA6B,CAAC,CAAC;gBAC1F,CAAC;qBAAM,CAAC;oBACJ,0BAA0B;oBAC1B,MAAM,IAAI,CAAC,kBAAkB,CAAC,MAAM,CAAC,aAAa,EAAE,4DAA6B,CAAC,CAAC;gBACvF,CAAC;YACL,CAAC;SACJ,CAAC,CAAC,CAAC;QAEJ,QAAQ,CAAC,eAAe,CAAC,mEAAsC,EAAE,IAAI,CAAC,qBAAqB,CAAC;YACxF,OAAO,EAAE,KAAK,IAAI,EAAE;gBAChB,MAAM,aAAa,GAAG,IAAI,CAAC,WAAW,CAAC,gBAAgB,EAAE,CAAC;gBAE1D,IAAI,CAAC,aAAa,EAAE,CAAC;oBACjB,OAAO;gBACX,CAAC;gBAED,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,kBAAkB,CAAC,SAAS,CAAC,aAAa,EAAE,4DAA6B,CAAC,CAAC;gBAExG,mCAAmC;gBACnC,MAAM,IAAI,CAAC,yBAAyB,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;gBAErD,sEAAsE;gBACtE,MAAM,OAAO,GAAG,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC;gBAC/E,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,GAAG,EAAE,CAAC;oBACf,IAAI,MAAM,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,GAAG,CAAC,EAAE,CAAC;wBAC9C,MAAM,cAAc,GAAG,MAAM,IAAI,CAAC,SAAS,CAAC,wBAAwB,CAAC,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,GAAG,CAAC,CAAC;wBACnF,yCAAyC;wBACzC,MAAM,YAAY,GAAgC;4BAC9C,QAAQ,EAAE,0CAAa;4BACvB,GAAG,EAAE,cAAc;yBACtB,CAAC;wBAEF,+CAA+C;wBAC/C,aAAa,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,YAAY,CAAC,CAAC;oBAC3D,CAAC;oBAED,4CAA4C;oBAC5C,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC,aAAa,CAAC,0BAAiB,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC;oBAC7G,MAAM,eAAe,GAAG,EAAE,QAAQ,EAAE,6CAAqB,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC;oBAC5E,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,CAAC,eAAe,CAAC,CAAC;gBAC3D,CAAC;YACL,CAAC;SACJ,CAAC,CAAC,CAAC;IACR,CAAC;CACJ,CAAA;AAjFY,kFAAmC;AAEzB;IADlB,IAAA,kBAAM,EAAC,oBAAW,CAAC;;wEACwB;AAGzB;IADlB,IAAA,kBAAM,EAAC,yCAAkB,CAAC;sCACY,yCAAkB;+EAAC;AAGvC;IADlB,IAAA,kBAAM,EAAC,qBAAc,CAAC;;2EAC2B;AAG/B;IADlB,IAAA,kBAAM,EAAC,wBAAU,CAAC;sCACY,wBAAU;uEAAC;AAGvB;IADlB,IAAA,kBAAM,EAAC,gDAAyB,CAAC;;sFACsC;AAGrD;IADlB,IAAA,kBAAM,EAAC,0BAAW,CAAC;sCACY,0BAAW;wEAAC;AAGzB;IADlB,IAAA,kBAAM,EAAC,0BAAgB,CAAC;sCACK,0BAAgB;sEAAC;AAG5B;IADlB,IAAA,kBAAM,EAAC,iCAAuB,CAAC;;kFACkC;8CAvBzD,mCAAmC;IAD/C,IAAA,sBAAU,GAAE;GACA,mCAAmC,CAiF/C"}
@@ -0,0 +1,9 @@
1
+ import { MaybePromise } from '@theia/core';
2
+ import { AIVariable, ResolvedAIVariable, AIVariableContribution, AIVariableService, AIVariableResolutionRequest, AIVariableContext, AIVariableResolverWithVariableDependencies, AIVariableArg } from '@theia/ai-core';
3
+ export declare const TASK_CONTEXT_SUMMARY_VARIABLE: AIVariable;
4
+ export declare class TaskContextSummaryVariableContribution implements AIVariableContribution, AIVariableResolverWithVariableDependencies {
5
+ registerVariables(service: AIVariableService): void;
6
+ canResolve(request: AIVariableResolutionRequest, context: AIVariableContext): MaybePromise<number>;
7
+ resolve(request: AIVariableResolutionRequest, context: AIVariableContext, resolveDependency?: (variable: AIVariableArg) => Promise<ResolvedAIVariable | undefined>): Promise<ResolvedAIVariable | undefined>;
8
+ }
9
+ //# sourceMappingURL=task-background-summary-variable.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-background-summary-variable.d.ts","sourceRoot":"","sources":["../../src/browser/task-background-summary-variable.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,YAAY,EAAO,MAAM,aAAa,CAAC;AAEhD,OAAO,EACH,UAAU,EACV,kBAAkB,EAClB,sBAAsB,EACtB,iBAAiB,EACjB,2BAA2B,EAC3B,iBAAiB,EACjB,0CAA0C,EAC1C,aAAa,EAChB,MAAM,gBAAgB,CAAC;AAKxB,eAAO,MAAM,6BAA6B,EAAE,UAI3C,CAAC;AAEF,qBAIa,sCAAuC,YAAW,sBAAsB,EAAE,0CAA0C;IAC7H,iBAAiB,CAAC,OAAO,EAAE,iBAAiB,GAAG,IAAI;IAInD,UAAU,CAAC,OAAO,EAAE,2BAA2B,EAAE,OAAO,EAAE,iBAAiB,GAAG,YAAY,CAAC,MAAM,CAAC;IAI5F,OAAO,CACT,OAAO,EAAE,2BAA2B,EACpC,OAAO,EAAE,iBAAiB,EAC1B,iBAAiB,CAAC,EAAE,CAAC,QAAQ,EAAE,aAAa,KAAK,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC,GACzF,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC;CAW7C"}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2025 EclipseSource GmbH and others.
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.TaskContextSummaryVariableContribution = exports.TASK_CONTEXT_SUMMARY_VARIABLE = 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
+ const ai_chat_1 = require("@theia/ai-chat");
23
+ const task_context_variable_1 = require("@theia/ai-chat/lib/browser/task-context-variable");
24
+ const context_variables_1 = require("../common/context-variables");
25
+ exports.TASK_CONTEXT_SUMMARY_VARIABLE = {
26
+ id: context_variables_1.TASK_CONTEXT_SUMMARY_VARIABLE_ID,
27
+ description: core_1.nls.localize('theia/ai/core/taskContextSummary/description', 'Resolves all task context items present in the session context.'),
28
+ name: context_variables_1.TASK_CONTEXT_SUMMARY_VARIABLE_ID,
29
+ };
30
+ let TaskContextSummaryVariableContribution = class TaskContextSummaryVariableContribution {
31
+ registerVariables(service) {
32
+ service.registerResolver(exports.TASK_CONTEXT_SUMMARY_VARIABLE, this);
33
+ }
34
+ canResolve(request, context) {
35
+ return request.variable.name === exports.TASK_CONTEXT_SUMMARY_VARIABLE.name ? 50 : 0;
36
+ }
37
+ async resolve(request, context, resolveDependency) {
38
+ if (!resolveDependency || !ai_chat_1.ChatSessionContext.is(context) || request.variable.name !== exports.TASK_CONTEXT_SUMMARY_VARIABLE.name) {
39
+ return undefined;
40
+ }
41
+ const allSummaryRequests = context.model.context.getVariables().filter(candidate => candidate.variable.id === task_context_variable_1.TASK_CONTEXT_VARIABLE.id);
42
+ if (!allSummaryRequests.length) {
43
+ return { ...request, value: '' };
44
+ }
45
+ const allSummaries = await Promise.all(allSummaryRequests.map(summaryRequest => resolveDependency(summaryRequest).then(resolved => resolved === null || resolved === void 0 ? void 0 : resolved.value)));
46
+ const value = `# Current Task Context\n\n${allSummaries.map((content, index) => `## Task ${index + 1}\n\n${content}`).join('\n\n')}`;
47
+ return {
48
+ ...request,
49
+ value
50
+ };
51
+ }
52
+ };
53
+ exports.TaskContextSummaryVariableContribution = TaskContextSummaryVariableContribution;
54
+ exports.TaskContextSummaryVariableContribution = TaskContextSummaryVariableContribution = tslib_1.__decorate([
55
+ (0, inversify_1.injectable)()
56
+ /**
57
+ * @class provides a summary of all TaskContextVariables in the context of a given session. Oriented towards use in prompts.
58
+ */
59
+ ], TaskContextSummaryVariableContribution);
60
+ //# sourceMappingURL=task-background-summary-variable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-background-summary-variable.js","sourceRoot":"","sources":["../../src/browser/task-background-summary-variable.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,oDAAoD;AACpD,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,sCAAgD;AAChD,4DAA0D;AAW1D,4CAAoD;AACpD,4FAAyF;AACzF,mEAA+E;AAElE,QAAA,6BAA6B,GAAe;IACrD,EAAE,EAAE,oDAAgC;IACpC,WAAW,EAAE,UAAG,CAAC,QAAQ,CAAC,8CAA8C,EAAE,iEAAiE,CAAC;IAC5I,IAAI,EAAE,oDAAgC;CACzC,CAAC;AAMK,IAAM,sCAAsC,GAA5C,MAAM,sCAAsC;IAC/C,iBAAiB,CAAC,OAA0B;QACxC,OAAO,CAAC,gBAAgB,CAAC,qCAA6B,EAAE,IAAI,CAAC,CAAC;IAClE,CAAC;IAED,UAAU,CAAC,OAAoC,EAAE,OAA0B;QACvE,OAAO,OAAO,CAAC,QAAQ,CAAC,IAAI,KAAK,qCAA6B,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;IACjF,CAAC;IAED,KAAK,CAAC,OAAO,CACT,OAAoC,EACpC,OAA0B,EAC1B,iBAAwF;QAExF,IAAI,CAAC,iBAAiB,IAAI,CAAC,4BAAkB,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,IAAI,KAAK,qCAA6B,CAAC,IAAI,EAAE,CAAC;YAAC,OAAO,SAAS,CAAC;QAAC,CAAC;QAChJ,MAAM,kBAAkB,GAAG,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,YAAY,EAAE,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,EAAE,KAAK,6CAAqB,CAAC,EAAE,CAAC,CAAC;QACxI,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE,CAAC;YAAC,OAAO,EAAE,GAAG,OAAO,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC;QAAC,CAAC;QACrE,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,CAAC,iBAAiB,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,KAAK,CAAC,CAAC,CAAC,CAAC;QACtJ,MAAM,KAAK,GAAG,6BAA6B,YAAY,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,KAAK,EAAE,EAAE,CAAC,WAAW,KAAK,GAAG,CAAC,OAAO,OAAO,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC;QACrI,OAAO;YACH,GAAG,OAAO;YACV,KAAK;SACR,CAAC;IACN,CAAC;CACJ,CAAA;AAxBY,wFAAsC;iDAAtC,sCAAsC;IAJlD,IAAA,sBAAU,GAAE;IACb;;OAEG;GACU,sCAAsC,CAwBlD"}
@@ -0,0 +1,13 @@
1
+ import { Agent, LanguageModelRequirement } from '@theia/ai-core';
2
+ export declare class TaskContextAgent implements Agent {
3
+ static ID: string;
4
+ id: string;
5
+ name: string;
6
+ description: string;
7
+ variables: never[];
8
+ prompts: import("@theia/ai-core").PromptVariantSet[];
9
+ languageModelRequirements: LanguageModelRequirement[];
10
+ agentSpecificVariables: never[];
11
+ functions: never[];
12
+ }
13
+ //# sourceMappingURL=task-context-agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"task-context-agent.d.ts","sourceRoot":"","sources":["../../src/browser/task-context-agent.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAKjE,qBACa,gBAAiB,YAAW,KAAK;IAC1C,MAAM,CAAC,EAAE,SAAiB;IAE1B,EAAE,SAAuB;IACzB,IAAI,SAAiB;IACrB,WAAW,SAEoK;IAE/K,SAAS,UAAM;IACf,OAAO,8CAAuF;IAC9F,yBAAyB,EAAE,wBAAwB,EAAE,CAGlD;IACH,sBAAsB,UAAM;IAC5B,SAAS,UAAM;CAClB"}