@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,21 @@
1
+ /// <reference types="react" />
2
+ import * as React from '@theia/core/shared/react';
3
+ import { MessageService } from '@theia/core';
4
+ import { TokenUsageFrontendService, ModelTokenUsageData } from '@theia/ai-core/lib/browser/token-usage-frontend-service';
5
+ import { AITableConfigurationWidget, TableColumn } from './base/ai-table-configuration-widget';
6
+ export declare class AITokenUsageConfigurationWidget extends AITableConfigurationWidget<ModelTokenUsageData> {
7
+ static readonly ID = "ai-token-usage-configuration-container-widget";
8
+ static readonly LABEL: string;
9
+ protected readonly messageService: MessageService;
10
+ protected readonly tokenUsageService: TokenUsageFrontendService;
11
+ protected init(): void;
12
+ protected loadItems(): Promise<void>;
13
+ protected getItemId(item: ModelTokenUsageData): string;
14
+ protected formatNumber(num: number): string;
15
+ protected formatDate(date?: Date): string;
16
+ protected hasCacheData(): boolean;
17
+ protected getColumns(): TableColumn<ModelTokenUsageData>[];
18
+ protected renderHeader(): React.ReactNode;
19
+ protected renderFooter(): React.ReactNode;
20
+ }
21
+ //# sourceMappingURL=token-usage-configuration-widget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token-usage-configuration-widget.d.ts","sourceRoot":"","sources":["../../../src/browser/ai-configuration/token-usage-configuration-widget.tsx"],"names":[],"mappings":";AAiBA,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,cAAc,EAAO,MAAM,aAAa,CAAC;AAClD,OAAO,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,yDAAyD,CAAC;AAEzH,OAAO,EAAE,0BAA0B,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAE/F,qBACa,+BAAgC,SAAQ,0BAA0B,CAAC,mBAAmB,CAAC;IAEhG,MAAM,CAAC,QAAQ,CAAC,EAAE,mDAAmD;IACrE,MAAM,CAAC,QAAQ,CAAC,KAAK,SAA4D;IAGjF,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IAGlD,SAAS,CAAC,QAAQ,CAAC,iBAAiB,EAAE,yBAAyB,CAAC;IAGhE,SAAS,CAAC,IAAI,IAAI,IAAI;cAgBN,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ1C,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM;IAItD,SAAS,CAAC,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAI3C,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,IAAI,GAAG,MAAM;IAOzC,SAAS,CAAC,YAAY,IAAI,OAAO;IAOjC,SAAS,CAAC,UAAU,IAAI,WAAW,CAAC,mBAAmB,CAAC,EAAE;cAmFvC,YAAY,IAAI,KAAK,CAAC,SAAS;cAI/B,YAAY,IAAI,KAAK,CAAC,SAAS;CA4CrD"}
@@ -0,0 +1,170 @@
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
+ var AITokenUsageConfigurationWidget_1;
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.AITokenUsageConfigurationWidget = void 0;
20
+ const tslib_1 = require("tslib");
21
+ const inversify_1 = require("@theia/core/shared/inversify");
22
+ const React = require("@theia/core/shared/react");
23
+ const core_1 = require("@theia/core");
24
+ const token_usage_frontend_service_1 = require("@theia/ai-core/lib/browser/token-usage-frontend-service");
25
+ const date_fns_1 = require("date-fns");
26
+ const ai_table_configuration_widget_1 = require("./base/ai-table-configuration-widget");
27
+ let AITokenUsageConfigurationWidget = AITokenUsageConfigurationWidget_1 = class AITokenUsageConfigurationWidget extends ai_table_configuration_widget_1.AITableConfigurationWidget {
28
+ init() {
29
+ this.id = AITokenUsageConfigurationWidget_1.ID;
30
+ this.title.label = AITokenUsageConfigurationWidget_1.LABEL;
31
+ this.title.closable = false;
32
+ this.addClass('ai-configuration-widget');
33
+ this.loadItems().then(() => this.update());
34
+ this.toDispose.push(this.tokenUsageService.onTokenUsageUpdated(data => {
35
+ this.items = data;
36
+ this.update();
37
+ }));
38
+ }
39
+ async loadItems() {
40
+ try {
41
+ this.items = await this.tokenUsageService.getTokenUsageData();
42
+ }
43
+ catch (error) {
44
+ this.messageService.error(core_1.nls.localize('theia/ai/tokenUsage/failedToGetTokenUsageData', 'Failed to fetch token usage data: {0}', error));
45
+ }
46
+ }
47
+ getItemId(item) {
48
+ return item.modelId;
49
+ }
50
+ formatNumber(num) {
51
+ return num.toLocaleString();
52
+ }
53
+ formatDate(date) {
54
+ if (!date) {
55
+ return core_1.nls.localize('theia/ai/tokenUsage/never', 'Never');
56
+ }
57
+ return (0, date_fns_1.formatDistanceToNow)(date, { addSuffix: true });
58
+ }
59
+ hasCacheData() {
60
+ return this.items.some(model => model.cachedInputTokens !== undefined ||
61
+ model.readCachedInputTokens !== undefined);
62
+ }
63
+ getColumns() {
64
+ const showCacheColumns = this.hasCacheData();
65
+ const columns = [
66
+ {
67
+ id: 'model',
68
+ label: core_1.nls.localize('theia/ai/tokenUsage/model', 'Model'),
69
+ className: 'token-usage-model-column',
70
+ renderCell: item => React.createElement("span", null, item.modelId)
71
+ },
72
+ {
73
+ id: 'input-tokens',
74
+ label: core_1.nls.localize('theia/ai/tokenUsage/inputTokens', 'Input Tokens'),
75
+ className: 'token-usage-column',
76
+ renderCell: item => React.createElement("span", null, this.formatNumber(item.inputTokens))
77
+ }
78
+ ];
79
+ if (showCacheColumns) {
80
+ columns.push({
81
+ id: 'cached-input-tokens',
82
+ label: core_1.nls.localize('theia/ai/tokenUsage/cachedInputTokens', 'Input Tokens Written to Cache'),
83
+ className: 'token-usage-column',
84
+ renderCell: item => (React.createElement("span", { title: core_1.nls.localize('theia/ai/tokenUsage/cachedInputTokensTooltip', "Tracked additionally to 'Input Tokens'. Usually more expensive than non-cached tokens.") }, item.cachedInputTokens !== undefined ? this.formatNumber(item.cachedInputTokens) : '-'))
85
+ }, {
86
+ id: 'read-cached-input-tokens',
87
+ label: core_1.nls.localize('theia/ai/tokenUsage/readCachedInputTokens', 'Input Tokens Read From Cache'),
88
+ className: 'token-usage-column',
89
+ renderCell: item => (React.createElement("span", { title: core_1.nls.localize('theia/ai/tokenUsage/readCachedInputTokensTooltip', "Tracked additionally to 'Input Token'. Usually much less expensive than not cached. Usually does not count to rate limits.") }, item.readCachedInputTokens !== undefined ? this.formatNumber(item.readCachedInputTokens) : '-'))
90
+ });
91
+ }
92
+ columns.push({
93
+ id: 'output-tokens',
94
+ label: core_1.nls.localize('theia/ai/tokenUsage/outputTokens', 'Output Tokens'),
95
+ className: 'token-usage-column',
96
+ renderCell: item => React.createElement("span", null, this.formatNumber(item.outputTokens))
97
+ }, {
98
+ id: 'total-tokens',
99
+ label: core_1.nls.localize('theia/ai/tokenUsage/totalTokens', 'Total Tokens'),
100
+ className: 'token-usage-column',
101
+ renderCell: item => {
102
+ var _a;
103
+ const totalTokens = item.inputTokens + item.outputTokens + ((_a = item.cachedInputTokens) !== null && _a !== void 0 ? _a : 0);
104
+ return (React.createElement("span", { title: core_1.nls.localize('theia/ai/tokenUsage/totalTokensTooltip', "'Input Tokens' + 'Output Tokens'") }, this.formatNumber(totalTokens)));
105
+ }
106
+ }, {
107
+ id: 'last-used',
108
+ label: core_1.nls.localize('theia/ai/tokenUsage/lastUsed', 'Last Used'),
109
+ className: 'token-usage-column',
110
+ renderCell: item => {
111
+ const lastUsedDate = item.lastUsed ? new Date(item.lastUsed) : undefined;
112
+ const exactDateString = lastUsedDate ? lastUsedDate.toLocaleString() : '';
113
+ return React.createElement("span", { title: exactDateString }, this.formatDate(lastUsedDate));
114
+ }
115
+ });
116
+ return columns;
117
+ }
118
+ renderHeader() {
119
+ return undefined;
120
+ }
121
+ renderFooter() {
122
+ if (this.items.length === 0) {
123
+ return (React.createElement("div", { className: "ai-empty-state-content" },
124
+ React.createElement("p", null, core_1.nls.localize('theia/ai/tokenUsage/noData', 'No token usage data available yet.'))));
125
+ }
126
+ const showCacheColumns = this.hasCacheData();
127
+ const totalInputTokens = this.items.reduce((sum, model) => sum + model.inputTokens, 0);
128
+ const totalOutputTokens = this.items.reduce((sum, model) => sum + model.outputTokens, 0);
129
+ const totalCachedInputTokens = this.items.reduce((sum, model) => sum + (model.cachedInputTokens || 0), 0);
130
+ const totalReadCachedInputTokens = this.items.reduce((sum, model) => sum + (model.readCachedInputTokens || 0), 0);
131
+ const totalTokens = totalInputTokens + totalCachedInputTokens + totalOutputTokens;
132
+ return (React.createElement("div", { className: "ai-configuration-footer-total" },
133
+ React.createElement("table", { className: "ai-configuration-table" },
134
+ React.createElement("tfoot", null,
135
+ React.createElement("tr", { className: "ai-configuration-footer-total-row" },
136
+ React.createElement("td", { className: "token-usage-model-column" }, core_1.nls.localize('theia/ai/tokenUsage/total', 'Total')),
137
+ React.createElement("td", { className: "token-usage-column" }, this.formatNumber(totalInputTokens)),
138
+ showCacheColumns && (React.createElement(React.Fragment, null,
139
+ React.createElement("td", { className: "token-usage-column" }, this.formatNumber(totalCachedInputTokens)),
140
+ React.createElement("td", { className: "token-usage-column" }, this.formatNumber(totalReadCachedInputTokens)))),
141
+ React.createElement("td", { className: "token-usage-column" }, this.formatNumber(totalOutputTokens)),
142
+ React.createElement("td", { className: "token-usage-column" }, this.formatNumber(totalTokens)),
143
+ React.createElement("td", { className: "token-usage-column" })))),
144
+ React.createElement("div", { className: "ai-configuration-info-box" },
145
+ React.createElement("p", { className: "ai-configuration-info-text" },
146
+ React.createElement("i", { className: "codicon codicon-info ai-configuration-info-icon" }),
147
+ core_1.nls.localize('theia/ai/tokenUsage/note', 'Token usage is tracked since the start of the application and is not persisted.')))));
148
+ }
149
+ };
150
+ exports.AITokenUsageConfigurationWidget = AITokenUsageConfigurationWidget;
151
+ AITokenUsageConfigurationWidget.ID = 'ai-token-usage-configuration-container-widget';
152
+ AITokenUsageConfigurationWidget.LABEL = core_1.nls.localize('theia/ai/tokenUsage/label', 'Token Usage');
153
+ tslib_1.__decorate([
154
+ (0, inversify_1.inject)(core_1.MessageService),
155
+ tslib_1.__metadata("design:type", core_1.MessageService)
156
+ ], AITokenUsageConfigurationWidget.prototype, "messageService", void 0);
157
+ tslib_1.__decorate([
158
+ (0, inversify_1.inject)(token_usage_frontend_service_1.TokenUsageFrontendService),
159
+ tslib_1.__metadata("design:type", Object)
160
+ ], AITokenUsageConfigurationWidget.prototype, "tokenUsageService", void 0);
161
+ tslib_1.__decorate([
162
+ (0, inversify_1.postConstruct)(),
163
+ tslib_1.__metadata("design:type", Function),
164
+ tslib_1.__metadata("design:paramtypes", []),
165
+ tslib_1.__metadata("design:returntype", void 0)
166
+ ], AITokenUsageConfigurationWidget.prototype, "init", null);
167
+ exports.AITokenUsageConfigurationWidget = AITokenUsageConfigurationWidget = AITokenUsageConfigurationWidget_1 = tslib_1.__decorate([
168
+ (0, inversify_1.injectable)()
169
+ ], AITokenUsageConfigurationWidget);
170
+ //# sourceMappingURL=token-usage-configuration-widget.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"token-usage-configuration-widget.js","sourceRoot":"","sources":["../../../src/browser/ai-configuration/token-usage-configuration-widget.tsx"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;;AAEhF,4DAAiF;AACjF,kDAAkD;AAClD,sCAAkD;AAClD,0GAAyH;AACzH,uCAA+C;AAC/C,wFAA+F;AAGxF,IAAM,+BAA+B,uCAArC,MAAM,+BAAgC,SAAQ,0DAA+C;IAYtF,IAAI;QACV,IAAI,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5H,CACF,CACJ,CACT,CAAC;IACN,CAAC;;AA5LQ,0EAA+B;AAExB,kCAAE,GAAG,+CAA+C,AAAlD,CAAmD;AACrD,qCAAK,GAAG,UAAG,CAAC,QAAQ,CAAC,2BAA2B,EAAE,aAAa,CAAC,AAA3D,CAA4D;AAG9D;IADlB,IAAA,kBAAM,EAAC,qBAAc,CAAC;sCACY,qBAAc;uEAAC;AAG/B;IADlB,IAAA,kBAAM,EAAC,wDAAyB,CAAC;;0EAC8B;AAGtD;IADT,IAAA,yBAAa,GAAE;;;;2DAef;0CA1BQ,+BAA+B;IAD3C,IAAA,sBAAU,GAAE;GACA,+BAA+B,CA6L3C"}
@@ -0,0 +1,35 @@
1
+ /// <reference types="react" />
2
+ import * as React from '@theia/core/shared/react';
3
+ import { ToolInvocationRegistry } from '@theia/ai-core';
4
+ import { PreferenceService } from '@theia/core';
5
+ import { ToolConfirmationManager } from '@theia/ai-chat/lib/browser/chat-tool-preference-bindings';
6
+ import { ToolConfirmationMode } from '@theia/ai-chat/lib/common/chat-tool-preferences';
7
+ import { AITableConfigurationWidget, TableColumn } from './base/ai-table-configuration-widget';
8
+ interface ToolItem {
9
+ name: string;
10
+ }
11
+ export declare class AIToolsConfigurationWidget extends AITableConfigurationWidget<ToolItem> {
12
+ static readonly ID = "ai-tools-configuration-widget";
13
+ static readonly LABEL: string;
14
+ protected readonly confirmationManager: ToolConfirmationManager;
15
+ protected readonly preferenceService: PreferenceService;
16
+ protected readonly toolInvocationRegistry: ToolInvocationRegistry;
17
+ protected toolConfirmationModes: Record<string, ToolConfirmationMode>;
18
+ protected defaultState: ToolConfirmationMode;
19
+ protected init(): void;
20
+ protected loadData(): Promise<void>;
21
+ protected loadItems(): Promise<void>;
22
+ protected getItemId(item: ToolItem): string;
23
+ protected loadDefaultConfirmation(): Promise<ToolConfirmationMode>;
24
+ protected loadToolConfigurationModes(): Promise<Record<string, ToolConfirmationMode>>;
25
+ protected updateToolConfirmationMode(tool: string, state: ToolConfirmationMode): Promise<void>;
26
+ protected updateDefaultConfirmation(state: ToolConfirmationMode): Promise<void>;
27
+ protected handleToolConfirmationModeChange: (toolName: string, event: React.ChangeEvent<HTMLSelectElement>) => Promise<void>;
28
+ protected handleDefaultStateChange: (event: React.ChangeEvent<HTMLSelectElement>) => Promise<void>;
29
+ protected resetAllToolsToDefault(): Promise<void>;
30
+ protected renderHeader(): React.ReactNode;
31
+ protected getColumns(): TableColumn<ToolItem>[];
32
+ protected getRowClassName(item: ToolItem): string;
33
+ }
34
+ export {};
35
+ //# sourceMappingURL=tools-configuration-widget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools-configuration-widget.d.ts","sourceRoot":"","sources":["../../../src/browser/ai-configuration/tools-configuration-widget.tsx"],"names":[],"mappings":";AAkBA,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAC;AACxD,OAAO,EAAO,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,0DAA0D,CAAC;AACnG,OAAO,EAAE,oBAAoB,EAAE,MAAM,iDAAiD,CAAC;AACvF,OAAO,EAAE,0BAA0B,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAQ/F,UAAU,QAAQ;IACd,IAAI,EAAE,MAAM,CAAC;CAChB;AAED,qBACa,0BAA2B,SAAQ,0BAA0B,CAAC,QAAQ,CAAC;IAChF,MAAM,CAAC,QAAQ,CAAC,EAAE,mCAAmC;IACrD,MAAM,CAAC,QAAQ,CAAC,KAAK,SAAkE;IAGvF,SAAS,CAAC,QAAQ,CAAC,mBAAmB,EAAE,uBAAuB,CAAC;IAGhE,SAAS,CAAC,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAGxD,SAAS,CAAC,QAAQ,CAAC,sBAAsB,EAAE,sBAAsB,CAAC;IAElE,SAAS,CAAC,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAM;IAC3E,SAAS,CAAC,YAAY,EAAE,oBAAoB,CAAC;IAG7C,SAAS,CAAC,IAAI,IAAI,IAAI;cAsBN,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;cAMzB,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAK1C,SAAS,CAAC,SAAS,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM;cAG3B,uBAAuB,IAAI,OAAO,CAAC,oBAAoB,CAAC;cAGxD,0BAA0B,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,CAAC;cAG3E,0BAA0B,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC;cAGpF,yBAAyB,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,IAAI,CAAC;IAIrF,SAAS,CAAC,gCAAgC,aAAoB,MAAM,SAAS,MAAM,WAAW,CAAC,iBAAiB,CAAC,mBAG/G;IACF,SAAS,CAAC,wBAAwB,UAAiB,MAAM,WAAW,CAAC,iBAAiB,CAAC,mBAGrF;cAEc,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC;cAcpC,YAAY,IAAI,KAAK,CAAC,SAAS;IA2BlD,SAAS,CAAC,UAAU,IAAI,WAAW,CAAC,QAAQ,CAAC,EAAE;cAgC5B,eAAe,CAAC,IAAI,EAAE,QAAQ,GAAG,MAAM;CAK7D"}
@@ -0,0 +1,158 @@
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
+ var AIToolsConfigurationWidget_1;
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.AIToolsConfigurationWidget = void 0;
20
+ const tslib_1 = require("tslib");
21
+ const browser_1 = require("@theia/core/lib/browser");
22
+ const inversify_1 = require("@theia/core/shared/inversify");
23
+ const React = require("@theia/core/shared/react");
24
+ const ai_core_1 = require("@theia/ai-core");
25
+ const core_1 = require("@theia/core");
26
+ const chat_tool_preference_bindings_1 = require("@theia/ai-chat/lib/browser/chat-tool-preference-bindings");
27
+ const chat_tool_preferences_1 = require("@theia/ai-chat/lib/common/chat-tool-preferences");
28
+ const ai_table_configuration_widget_1 = require("./base/ai-table-configuration-widget");
29
+ const TOOL_OPTIONS = [
30
+ { value: chat_tool_preferences_1.ToolConfirmationMode.DISABLED, label: core_1.nls.localizeByDefault('Disabled'), icon: 'close' },
31
+ { value: chat_tool_preferences_1.ToolConfirmationMode.CONFIRM, label: core_1.nls.localize('theia/ai/ide/toolsConfiguration/toolOptions/confirm/label', 'Confirm'), icon: 'question' },
32
+ { value: chat_tool_preferences_1.ToolConfirmationMode.ALWAYS_ALLOW, label: core_1.nls.localize('theia/ai/ide/toolsConfiguration/toolOptions/alwaysAllow/label', 'Always Allow'), icon: 'thumbsup' },
33
+ ];
34
+ let AIToolsConfigurationWidget = AIToolsConfigurationWidget_1 = class AIToolsConfigurationWidget extends ai_table_configuration_widget_1.AITableConfigurationWidget {
35
+ constructor() {
36
+ super(...arguments);
37
+ this.toolConfirmationModes = {};
38
+ this.handleToolConfirmationModeChange = async (toolName, event) => {
39
+ const newState = event.target.value;
40
+ await this.updateToolConfirmationMode(toolName, newState);
41
+ };
42
+ this.handleDefaultStateChange = async (event) => {
43
+ const newState = event.target.value;
44
+ await this.updateDefaultConfirmation(newState);
45
+ };
46
+ }
47
+ init() {
48
+ this.id = AIToolsConfigurationWidget_1.ID;
49
+ this.title.label = AIToolsConfigurationWidget_1.LABEL;
50
+ this.title.closable = false;
51
+ this.addClass('ai-configuration-widget');
52
+ this.loadData().then(() => this.update());
53
+ this.toDispose.pushAll([
54
+ this.preferenceService.onPreferenceChanged(async (e) => {
55
+ if (e.preferenceName === 'ai-features.chat.toolConfirmation') {
56
+ this.defaultState = await this.loadDefaultConfirmation();
57
+ this.toolConfirmationModes = await this.loadToolConfigurationModes();
58
+ this.update();
59
+ }
60
+ }),
61
+ this.toolInvocationRegistry.onDidChange(async () => {
62
+ await this.loadItems();
63
+ this.update();
64
+ })
65
+ ]);
66
+ }
67
+ async loadData() {
68
+ await this.loadItems();
69
+ this.defaultState = await this.loadDefaultConfirmation();
70
+ this.toolConfirmationModes = await this.loadToolConfigurationModes();
71
+ }
72
+ async loadItems() {
73
+ const toolNames = this.toolInvocationRegistry.getAllFunctions().map(func => func.name);
74
+ this.items = toolNames.map(name => ({ name }));
75
+ }
76
+ getItemId(item) {
77
+ return item.name;
78
+ }
79
+ async loadDefaultConfirmation() {
80
+ return this.confirmationManager.getConfirmationMode('*', 'doesNotMatter');
81
+ }
82
+ async loadToolConfigurationModes() {
83
+ return this.confirmationManager.getAllConfirmationSettings();
84
+ }
85
+ async updateToolConfirmationMode(tool, state) {
86
+ await this.confirmationManager.setConfirmationMode(tool, state);
87
+ }
88
+ async updateDefaultConfirmation(state) {
89
+ await this.confirmationManager.setConfirmationMode('*', state);
90
+ }
91
+ async resetAllToolsToDefault() {
92
+ const dialog = new browser_1.ConfirmDialog({
93
+ title: core_1.nls.localize('theia/ai/ide/toolsConfiguration/resetAllConfirmDialog/title', 'Reset All Tool Confirmation Modes'),
94
+ msg: core_1.nls.localize('theia/ai/ide/toolsConfiguration/resetAllConfirmDialog/msg', 'Are you sure you want to reset all tool confirmation modes to the default? This will remove all custom settings.'),
95
+ ok: core_1.nls.localize('theia/ai/ide/toolsConfiguration/resetAll', 'Reset All'),
96
+ cancel: core_1.nls.localizeByDefault('Cancel')
97
+ });
98
+ const shouldReset = await dialog.open();
99
+ if (shouldReset) {
100
+ this.confirmationManager.resetAllConfirmationModeSettings();
101
+ }
102
+ }
103
+ renderHeader() {
104
+ return (React.createElement("div", { className: "ai-tools-configuration-header" },
105
+ React.createElement("div", { style: { fontWeight: 500 } }, core_1.nls.localize('theia/ai/ide/toolsConfiguration/default/label', 'Default Tool Confirmation Mode:')),
106
+ React.createElement("select", { className: "theia-select", value: this.defaultState, onChange: this.handleDefaultStateChange }, TOOL_OPTIONS.map(opt => (React.createElement("option", { key: opt.value, value: opt.value }, opt.label)))),
107
+ React.createElement("button", { className: 'theia-button secondary ai-tools-reset-button', style: { marginLeft: 'auto' }, title: core_1.nls.localize('theia/ai/ide/toolsConfiguration/resetAllTooltip', 'Reset all tools to default'), onClick: () => this.resetAllToolsToDefault() }, core_1.nls.localize('theia/ai/ide/toolsConfiguration/resetAll', 'Reset All'))));
108
+ }
109
+ getColumns() {
110
+ return [
111
+ {
112
+ id: 'tool-name',
113
+ label: core_1.nls.localize('theia/ai/ide/toolsConfiguration/tools/label', 'Tool'),
114
+ className: 'tool-name-column',
115
+ renderCell: (item) => React.createElement("span", null, item.name)
116
+ },
117
+ {
118
+ id: 'confirmation-mode',
119
+ label: core_1.nls.localize('theia/ai/ide/toolsConfiguration/confirmationMode/label', 'Confirmation Mode'),
120
+ className: 'confirmation-mode-column',
121
+ renderCell: (item) => {
122
+ const state = this.toolConfirmationModes[item.name] || this.defaultState;
123
+ return (React.createElement("select", { className: "theia-select", value: state, onChange: e => this.handleToolConfirmationModeChange(item.name, e) }, TOOL_OPTIONS.map(opt => (React.createElement("option", { key: opt.value, value: opt.value }, opt.label)))));
124
+ }
125
+ }
126
+ ];
127
+ }
128
+ getRowClassName(item) {
129
+ const state = this.toolConfirmationModes[item.name] || this.defaultState;
130
+ const isDefault = state === this.defaultState;
131
+ return isDefault ? 'default-mode' : 'custom-mode';
132
+ }
133
+ };
134
+ exports.AIToolsConfigurationWidget = AIToolsConfigurationWidget;
135
+ AIToolsConfigurationWidget.ID = 'ai-tools-configuration-widget';
136
+ AIToolsConfigurationWidget.LABEL = core_1.nls.localize('theia/ai/ide/toolsConfiguration/label', 'Tools');
137
+ tslib_1.__decorate([
138
+ (0, inversify_1.inject)(chat_tool_preference_bindings_1.ToolConfirmationManager),
139
+ tslib_1.__metadata("design:type", chat_tool_preference_bindings_1.ToolConfirmationManager)
140
+ ], AIToolsConfigurationWidget.prototype, "confirmationManager", void 0);
141
+ tslib_1.__decorate([
142
+ (0, inversify_1.inject)(core_1.PreferenceService),
143
+ tslib_1.__metadata("design:type", Object)
144
+ ], AIToolsConfigurationWidget.prototype, "preferenceService", void 0);
145
+ tslib_1.__decorate([
146
+ (0, inversify_1.inject)(ai_core_1.ToolInvocationRegistry),
147
+ tslib_1.__metadata("design:type", Object)
148
+ ], AIToolsConfigurationWidget.prototype, "toolInvocationRegistry", void 0);
149
+ tslib_1.__decorate([
150
+ (0, inversify_1.postConstruct)(),
151
+ tslib_1.__metadata("design:type", Function),
152
+ tslib_1.__metadata("design:paramtypes", []),
153
+ tslib_1.__metadata("design:returntype", void 0)
154
+ ], AIToolsConfigurationWidget.prototype, "init", null);
155
+ exports.AIToolsConfigurationWidget = AIToolsConfigurationWidget = AIToolsConfigurationWidget_1 = tslib_1.__decorate([
156
+ (0, inversify_1.injectable)()
157
+ ], AIToolsConfigurationWidget);
158
+ //# sourceMappingURL=tools-configuration-widget.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools-configuration-widget.js","sourceRoot":"","sources":["../../../src/browser/ai-configuration/tools-configuration-widget.tsx"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACv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AIVariableService } from '@theia/ai-core/lib/common';
3
+ import * as React from '@theia/core/shared/react';
4
+ import { AIConfigurationSelectionService } from './ai-configuration-service';
5
+ import { AIListDetailConfigurationWidget } from './base/ai-list-detail-configuration-widget';
6
+ export declare class AIVariableConfigurationWidget extends AIListDetailConfigurationWidget<AIVariable> {
7
+ static readonly ID = "ai-variable-configuration-container-widget";
8
+ static readonly LABEL: string;
9
+ protected readonly variableService: AIVariableService;
10
+ protected readonly agentService: AgentService;
11
+ protected readonly aiConfigurationSelectionService: AIConfigurationSelectionService;
12
+ protected init(): void;
13
+ protected loadItems(): Promise<void>;
14
+ protected getItemId(variable: AIVariable): string;
15
+ protected getItemLabel(variable: AIVariable): string;
16
+ protected getEmptySelectionMessage(): string;
17
+ protected renderItemDetail(variable: AIVariable): React.ReactNode;
18
+ protected renderArgs(variable: AIVariable): React.ReactNode | undefined;
19
+ protected renderReferencedVariables(variable: AIVariable): React.ReactNode | undefined;
20
+ protected showAgentConfiguration(agent: Agent): void;
21
+ protected getAgentsForVariable(variable: AIVariable): Agent[];
22
+ }
23
+ //# sourceMappingURL=variable-configuration-widget.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variable-configuration-widget.d.ts","sourceRoot":"","sources":["../../../src/browser/ai-configuration/variable-configuration-widget.tsx"],"names":[],"mappings":";AAgBA,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAG/F,OAAO,KAAK,KAAK,MAAM,0BAA0B,CAAC;AAElD,OAAO,EAAE,+BAA+B,EAAE,MAAM,4BAA4B,CAAC;AAE7E,OAAO,EAAE,+BAA+B,EAAE,MAAM,4CAA4C,CAAC;AAE7F,qBACa,6BAA8B,SAAQ,+BAA+B,CAAC,UAAU,CAAC;IAE1F,MAAM,CAAC,QAAQ,CAAC,EAAE,gDAAgD;IAClE,MAAM,CAAC,QAAQ,CAAC,KAAK,SAAsC;IAG3D,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,iBAAiB,CAAC;IAGtD,SAAS,CAAC,QAAQ,CAAC,YAAY,EAAE,YAAY,CAAC;IAG9C,SAAS,CAAC,QAAQ,CAAC,+BAA+B,EAAE,+BAA+B,CAAC;IAGpF,SAAS,CAAC,IAAI,IAAI,IAAI;cAaN,SAAS,IAAI,OAAO,CAAC,IAAI,CAAC;IAO1C,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,UAAU,GAAG,MAAM;IAIjD,SAAS,CAAC,YAAY,CAAC,QAAQ,EAAE,UAAU,GAAG,MAAM;cAIjC,wBAAwB,IAAI,MAAM;IAIrD,SAAS,CAAC,gBAAgB,CAAC,QAAQ,EAAE,UAAU,GAAG,KAAK,CAAC,SAAS;IAwBjE,SAAS,CAAC,UAAU,CAAC,QAAQ,EAAE,UAAU,GAAG,KAAK,CAAC,SAAS,GAAG,SAAS;IA8BvE,SAAS,CAAC,yBAAyB,CAAC,QAAQ,EAAE,UAAU,GAAG,KAAK,CAAC,SAAS,GAAG,SAAS;IAuBtF,SAAS,CAAC,sBAAsB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI;IAKpD,SAAS,CAAC,oBAAoB,CAAC,QAAQ,EAAE,UAAU,GAAG,KAAK,EAAE;CAGhE"}
@@ -0,0 +1,132 @@
1
+ "use strict";
2
+ // *****************************************************************************
3
+ // Copyright (C) 2024 EclipseSource GmbH.
4
+ //
5
+ // This program and the accompanying materials are made available under the
6
+ // terms of the Eclipse Public License v. 2.0 which is available at
7
+ // http://www.eclipse.org/legal/epl-2.0.
8
+ //
9
+ // This Source Code may also be made available under the following Secondary
10
+ // Licenses when the conditions for such availability set forth in the Eclipse
11
+ // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
+ // with the GNU Classpath Exception which is available at
13
+ // https://www.gnu.org/software/classpath/license.html.
14
+ //
15
+ // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
+ // *****************************************************************************
17
+ var AIVariableConfigurationWidget_1;
18
+ Object.defineProperty(exports, "__esModule", { value: true });
19
+ exports.AIVariableConfigurationWidget = void 0;
20
+ const tslib_1 = require("tslib");
21
+ const common_1 = require("@theia/ai-core/lib/common");
22
+ const browser_1 = require("@theia/core/lib/browser");
23
+ const inversify_1 = require("@theia/core/shared/inversify");
24
+ const React = require("@theia/core/shared/react");
25
+ const agent_configuration_widget_1 = require("./agent-configuration-widget");
26
+ const ai_configuration_service_1 = require("./ai-configuration-service");
27
+ const core_1 = require("@theia/core");
28
+ const ai_list_detail_configuration_widget_1 = require("./base/ai-list-detail-configuration-widget");
29
+ let AIVariableConfigurationWidget = AIVariableConfigurationWidget_1 = class AIVariableConfigurationWidget extends ai_list_detail_configuration_widget_1.AIListDetailConfigurationWidget {
30
+ init() {
31
+ this.id = AIVariableConfigurationWidget_1.ID;
32
+ this.title.label = AIVariableConfigurationWidget_1.LABEL;
33
+ this.title.closable = false;
34
+ this.addClass('ai-configuration-widget');
35
+ this.loadItems().then(() => this.update());
36
+ this.toDispose.push(this.variableService.onDidChangeVariables(async () => {
37
+ await this.loadItems();
38
+ this.update();
39
+ }));
40
+ }
41
+ async loadItems() {
42
+ this.items = this.variableService.getVariables();
43
+ if (this.items.length > 0 && !this.selectedItem) {
44
+ this.selectedItem = this.items[0];
45
+ }
46
+ }
47
+ getItemId(variable) {
48
+ return variable.id;
49
+ }
50
+ getItemLabel(variable) {
51
+ return variable.name;
52
+ }
53
+ getEmptySelectionMessage() {
54
+ return core_1.nls.localize('theia/ai/ide/variableConfiguration/selectVariable', 'Please select a Variable.');
55
+ }
56
+ renderItemDetail(variable) {
57
+ return (React.createElement("div", null,
58
+ React.createElement("div", { className: "settings-section-title settings-section-category-title" },
59
+ variable.name,
60
+ React.createElement("pre", { className: 'ai-id-label' },
61
+ "Id: ",
62
+ variable.id)),
63
+ variable.description && (React.createElement("div", { style: {
64
+ marginBottom: 'calc(var(--theia-ui-padding) * 2)',
65
+ color: 'var(--theia-descriptionForeground)',
66
+ lineHeight: '1.5'
67
+ } }, variable.description)),
68
+ this.renderArgs(variable),
69
+ this.renderReferencedVariables(variable)));
70
+ }
71
+ renderArgs(variable) {
72
+ if (variable.args === undefined || variable.args.length === 0) {
73
+ return undefined;
74
+ }
75
+ return (React.createElement(React.Fragment, null,
76
+ React.createElement("div", { className: "settings-section-subcategory-title" }, core_1.nls.localize('theia/ai/ide/variableConfiguration/variableArgs', 'Arguments')),
77
+ React.createElement("div", { style: {
78
+ display: 'grid',
79
+ gridTemplateColumns: 'auto 1fr',
80
+ gap: 'calc(var(--theia-ui-padding) / 2) var(--theia-ui-padding)',
81
+ alignItems: 'start',
82
+ marginBottom: 'calc(var(--theia-ui-padding) * 2)'
83
+ } }, variable.args.map(arg => (React.createElement(React.Fragment, { key: arg.name },
84
+ React.createElement("span", { style: { fontWeight: 500 } },
85
+ arg.name,
86
+ ":"),
87
+ React.createElement("span", { style: { color: 'var(--theia-descriptionForeground)' } }, arg.description)))))));
88
+ }
89
+ renderReferencedVariables(variable) {
90
+ const agents = this.getAgentsForVariable(variable);
91
+ if (agents.length === 0) {
92
+ return undefined;
93
+ }
94
+ return (React.createElement(React.Fragment, null,
95
+ React.createElement("div", { className: "settings-section-subcategory-title" }, core_1.nls.localize('theia/ai/ide/variableConfiguration/usedByAgents', 'Used by Agents')),
96
+ React.createElement("ul", { className: "variable-agent-list" }, agents.map(agent => (React.createElement("li", { key: agent.id, className: "variable-agent-item", onClick: () => this.showAgentConfiguration(agent) },
97
+ React.createElement("span", null, agent.name),
98
+ React.createElement("i", { className: (0, browser_1.codicon)('chevron-right') })))))));
99
+ }
100
+ showAgentConfiguration(agent) {
101
+ this.aiConfigurationSelectionService.setActiveAgent(agent);
102
+ this.aiConfigurationSelectionService.selectConfigurationTab(agent_configuration_widget_1.AIAgentConfigurationWidget.ID);
103
+ }
104
+ getAgentsForVariable(variable) {
105
+ return this.agentService.getAgents().filter(a => { var _a; return (_a = a.variables) === null || _a === void 0 ? void 0 : _a.includes(variable.id); });
106
+ }
107
+ };
108
+ exports.AIVariableConfigurationWidget = AIVariableConfigurationWidget;
109
+ AIVariableConfigurationWidget.ID = 'ai-variable-configuration-container-widget';
110
+ AIVariableConfigurationWidget.LABEL = core_1.nls.localizeByDefault('Variables');
111
+ tslib_1.__decorate([
112
+ (0, inversify_1.inject)(common_1.AIVariableService),
113
+ tslib_1.__metadata("design:type", Object)
114
+ ], AIVariableConfigurationWidget.prototype, "variableService", void 0);
115
+ tslib_1.__decorate([
116
+ (0, inversify_1.inject)(common_1.AgentService),
117
+ tslib_1.__metadata("design:type", Object)
118
+ ], AIVariableConfigurationWidget.prototype, "agentService", void 0);
119
+ tslib_1.__decorate([
120
+ (0, inversify_1.inject)(ai_configuration_service_1.AIConfigurationSelectionService),
121
+ tslib_1.__metadata("design:type", ai_configuration_service_1.AIConfigurationSelectionService)
122
+ ], AIVariableConfigurationWidget.prototype, "aiConfigurationSelectionService", void 0);
123
+ tslib_1.__decorate([
124
+ (0, inversify_1.postConstruct)(),
125
+ tslib_1.__metadata("design:type", Function),
126
+ tslib_1.__metadata("design:paramtypes", []),
127
+ tslib_1.__metadata("design:returntype", void 0)
128
+ ], AIVariableConfigurationWidget.prototype, "init", null);
129
+ exports.AIVariableConfigurationWidget = AIVariableConfigurationWidget = AIVariableConfigurationWidget_1 = tslib_1.__decorate([
130
+ (0, inversify_1.injectable)()
131
+ ], AIVariableConfigurationWidget);
132
+ //# sourceMappingURL=variable-configuration-widget.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"variable-configuration-widget.js","sourceRoot":"","sources":["../../../src/browser/ai-configuration/variable-configuration-widget.tsx"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gF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AE,GAAG,4CAA4C,AAA/C,CAAgD;AAClD,mCAAK,GAAG,UAAG,CAAC,iBAAiB,CAAC,WAAW,CAAC,AAArC,CAAsC;AAGxC;IADlB,IAAA,kBAAM,EAAC,0BAAiB,CAAC;;sEAC4B;AAGnC;IADlB,IAAA,kBAAM,EAAC,qBAAY,CAAC;;mEACyB;AAG3B;IADlB,IAAA,kBAAM,EAAC,0DAA+B,CAAC;sCACY,0DAA+B;sFAAC;AAG1E;IADT,IAAA,yBAAa,GAAE;;;;yDAYf;wCA1BQ,6BAA6B;IADzC,IAAA,sBAAU,GAAE;GACA,6BAA6B,CAoIzC"}
@@ -0,0 +1,18 @@
1
+ import { FrontendApplicationContribution } from '@theia/core/lib/browser';
2
+ import { Emitter, MaybePromise, Event, PreferenceService } from '@theia/core';
3
+ import { ContextKeyService, ContextKey } from '@theia/core/lib/browser/context-key-service';
4
+ import { AIActivationService } from '@theia/ai-core/lib/browser/ai-activation-service';
5
+ /**
6
+ * Implements AI Activation Service based on preferences.
7
+ */
8
+ export declare class AIIdeActivationServiceImpl implements AIActivationService, FrontendApplicationContribution {
9
+ protected readonly contextKeyService: ContextKeyService;
10
+ protected preferenceService: PreferenceService;
11
+ protected isAiEnabledKey: ContextKey<boolean>;
12
+ protected onDidChangeAIEnabled: Emitter<boolean>;
13
+ get onDidChangeActiveStatus(): Event<boolean>;
14
+ get isActive(): boolean;
15
+ protected updateEnableValue(value: boolean): void;
16
+ initialize(): MaybePromise<void>;
17
+ }
18
+ //# sourceMappingURL=ai-ide-activation-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-ide-activation-service.d.ts","sourceRoot":"","sources":["../../src/browser/ai-ide-activation-service.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,KAAK,EAAE,iBAAiB,EAAG,MAAM,aAAa,CAAC;AAC/E,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,6CAA6C,CAAC;AAC5F,OAAO,EAAE,mBAAmB,EAAyB,MAAM,kDAAkD,CAAC;AAG9G;;GAEG;AACH,qBACa,0BAA2B,YAAW,mBAAmB,EAAE,+BAA+B;IAEnG,SAAS,CAAC,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAGxD,SAAS,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAE/C,SAAS,CAAC,cAAc,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;IAE9C,SAAS,CAAC,oBAAoB,mBAA0B;IACxD,IAAI,uBAAuB,IAAI,KAAK,CAAC,OAAO,CAAC,CAE5C;IAED,IAAI,QAAQ,IAAI,OAAO,CAEtB;IAED,SAAS,CAAC,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,IAAI;IAOjD,UAAU,IAAI,YAAY,CAAC,IAAI,CAAC;CAanC"}