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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (246) hide show
  1. package/README.md +1 -0
  2. package/data/prompttemplate.tmLanguage.json +3 -0
  3. package/package.json +9 -9
  4. package/src/browser/frontend-language-model-alias-registry.ts +11 -11
  5. package/src/common/agent-service.ts +6 -6
  6. package/src/common/prompt-service.ts +6 -2
  7. package/lib/browser/agent-completion-notification-service.d.ts +0 -69
  8. package/lib/browser/agent-completion-notification-service.d.ts.map +0 -1
  9. package/lib/browser/agent-completion-notification-service.js +0 -187
  10. package/lib/browser/agent-completion-notification-service.js.map +0 -1
  11. package/lib/browser/ai-activation-service.d.ts +0 -31
  12. package/lib/browser/ai-activation-service.d.ts.map +0 -1
  13. package/lib/browser/ai-activation-service.js +0 -56
  14. package/lib/browser/ai-activation-service.js.map +0 -1
  15. package/lib/browser/ai-command-handler-factory.d.ts +0 -4
  16. package/lib/browser/ai-command-handler-factory.d.ts.map +0 -1
  17. package/lib/browser/ai-command-handler-factory.js +0 -20
  18. package/lib/browser/ai-command-handler-factory.js.map +0 -1
  19. package/lib/browser/ai-core-command-contribution.d.ts +0 -8
  20. package/lib/browser/ai-core-command-contribution.d.ts.map +0 -1
  21. package/lib/browser/ai-core-command-contribution.js +0 -44
  22. package/lib/browser/ai-core-command-contribution.js.map +0 -1
  23. package/lib/browser/ai-core-frontend-application-contribution.d.ts +0 -10
  24. package/lib/browser/ai-core-frontend-application-contribution.d.ts.map +0 -1
  25. package/lib/browser/ai-core-frontend-application-contribution.js +0 -46
  26. package/lib/browser/ai-core-frontend-application-contribution.js.map +0 -1
  27. package/lib/browser/ai-core-frontend-module.d.ts +0 -4
  28. package/lib/browser/ai-core-frontend-module.d.ts.map +0 -1
  29. package/lib/browser/ai-core-frontend-module.js +0 -137
  30. package/lib/browser/ai-core-frontend-module.js.map +0 -1
  31. package/lib/browser/ai-settings-service.d.ts +0 -16
  32. package/lib/browser/ai-settings-service.d.ts.map +0 -1
  33. package/lib/browser/ai-settings-service.js +0 -78
  34. package/lib/browser/ai-settings-service.js.map +0 -1
  35. package/lib/browser/ai-variable-uri-label-provider.d.ts +0 -17
  36. package/lib/browser/ai-variable-uri-label-provider.d.ts.map +0 -1
  37. package/lib/browser/ai-variable-uri-label-provider.js +0 -85
  38. package/lib/browser/ai-variable-uri-label-provider.js.map +0 -1
  39. package/lib/browser/ai-view-contribution.d.ts +0 -14
  40. package/lib/browser/ai-view-contribution.d.ts.map +0 -1
  41. package/lib/browser/ai-view-contribution.js +0 -87
  42. package/lib/browser/ai-view-contribution.js.map +0 -1
  43. package/lib/browser/file-variable-contribution.d.ts +0 -23
  44. package/lib/browser/file-variable-contribution.d.ts.map +0 -1
  45. package/lib/browser/file-variable-contribution.js +0 -114
  46. package/lib/browser/file-variable-contribution.js.map +0 -1
  47. package/lib/browser/frontend-language-model-alias-registry.d.ts +0 -31
  48. package/lib/browser/frontend-language-model-alias-registry.d.ts.map +0 -1
  49. package/lib/browser/frontend-language-model-alias-registry.js +0 -170
  50. package/lib/browser/frontend-language-model-alias-registry.js.map +0 -1
  51. package/lib/browser/frontend-language-model-registry.d.ts +0 -49
  52. package/lib/browser/frontend-language-model-registry.d.ts.map +0 -1
  53. package/lib/browser/frontend-language-model-registry.js +0 -387
  54. package/lib/browser/frontend-language-model-registry.js.map +0 -1
  55. package/lib/browser/frontend-language-model-registry.spec.d.ts +0 -2
  56. package/lib/browser/frontend-language-model-registry.spec.d.ts.map +0 -1
  57. package/lib/browser/frontend-language-model-registry.spec.js +0 -248
  58. package/lib/browser/frontend-language-model-registry.spec.js.map +0 -1
  59. package/lib/browser/frontend-language-model-service.d.ts +0 -10
  60. package/lib/browser/frontend-language-model-service.d.ts.map +0 -1
  61. package/lib/browser/frontend-language-model-service.js +0 -66
  62. package/lib/browser/frontend-language-model-service.js.map +0 -1
  63. package/lib/browser/frontend-prompt-customization-service.d.ts +0 -271
  64. package/lib/browser/frontend-prompt-customization-service.d.ts.map +0 -1
  65. package/lib/browser/frontend-prompt-customization-service.js +0 -869
  66. package/lib/browser/frontend-prompt-customization-service.js.map +0 -1
  67. package/lib/browser/frontend-prompt-customization-service.spec.d.ts +0 -2
  68. package/lib/browser/frontend-prompt-customization-service.spec.d.ts.map +0 -1
  69. package/lib/browser/frontend-prompt-customization-service.spec.js +0 -127
  70. package/lib/browser/frontend-prompt-customization-service.spec.js.map +0 -1
  71. package/lib/browser/frontend-variable-service.d.ts +0 -61
  72. package/lib/browser/frontend-variable-service.d.ts.map +0 -1
  73. package/lib/browser/frontend-variable-service.js +0 -165
  74. package/lib/browser/frontend-variable-service.js.map +0 -1
  75. package/lib/browser/index.d.ts +0 -20
  76. package/lib/browser/index.d.ts.map +0 -1
  77. package/lib/browser/index.js +0 -38
  78. package/lib/browser/index.js.map +0 -1
  79. package/lib/browser/open-editors-variable-contribution.d.ts +0 -17
  80. package/lib/browser/open-editors-variable-contribution.d.ts.map +0 -1
  81. package/lib/browser/open-editors-variable-contribution.js +0 -84
  82. package/lib/browser/open-editors-variable-contribution.js.map +0 -1
  83. package/lib/browser/os-notification-service.d.ts +0 -96
  84. package/lib/browser/os-notification-service.d.ts.map +0 -1
  85. package/lib/browser/os-notification-service.js +0 -222
  86. package/lib/browser/os-notification-service.js.map +0 -1
  87. package/lib/browser/prompttemplate-contribution.d.ts +0 -29
  88. package/lib/browser/prompttemplate-contribution.d.ts.map +0 -1
  89. package/lib/browser/prompttemplate-contribution.js +0 -243
  90. package/lib/browser/prompttemplate-contribution.js.map +0 -1
  91. package/lib/browser/prompttemplate-parser.d.ts +0 -36
  92. package/lib/browser/prompttemplate-parser.d.ts.map +0 -1
  93. package/lib/browser/prompttemplate-parser.js +0 -94
  94. package/lib/browser/prompttemplate-parser.js.map +0 -1
  95. package/lib/browser/theia-variable-contribution.d.ts +0 -26
  96. package/lib/browser/theia-variable-contribution.d.ts.map +0 -1
  97. package/lib/browser/theia-variable-contribution.js +0 -146
  98. package/lib/browser/theia-variable-contribution.js.map +0 -1
  99. package/lib/browser/token-usage-frontend-service-impl.d.ts +0 -25
  100. package/lib/browser/token-usage-frontend-service-impl.d.ts.map +0 -1
  101. package/lib/browser/token-usage-frontend-service-impl.js +0 -138
  102. package/lib/browser/token-usage-frontend-service-impl.js.map +0 -1
  103. package/lib/browser/token-usage-frontend-service.d.ts +0 -33
  104. package/lib/browser/token-usage-frontend-service.d.ts.map +0 -1
  105. package/lib/browser/token-usage-frontend-service.js +0 -23
  106. package/lib/browser/token-usage-frontend-service.js.map +0 -1
  107. package/lib/browser/window-blink-service.d.ts +0 -41
  108. package/lib/browser/window-blink-service.d.ts.map +0 -1
  109. package/lib/browser/window-blink-service.js +0 -174
  110. package/lib/browser/window-blink-service.js.map +0 -1
  111. package/lib/common/agent-preferences.d.ts +0 -4
  112. package/lib/common/agent-preferences.d.ts.map +0 -1
  113. package/lib/common/agent-preferences.js +0 -84
  114. package/lib/common/agent-preferences.js.map +0 -1
  115. package/lib/common/agent-service.d.ts +0 -66
  116. package/lib/common/agent-service.d.ts.map +0 -1
  117. package/lib/common/agent-service.js +0 -104
  118. package/lib/common/agent-service.js.map +0 -1
  119. package/lib/common/agent.d.ts +0 -72
  120. package/lib/common/agent.d.ts.map +0 -1
  121. package/lib/common/agent.js +0 -20
  122. package/lib/common/agent.js.map +0 -1
  123. package/lib/common/agents-variable-contribution.d.ts +0 -19
  124. package/lib/common/agents-variable-contribution.d.ts.map +0 -1
  125. package/lib/common/agents-variable-contribution.js +0 -57
  126. package/lib/common/agents-variable-contribution.js.map +0 -1
  127. package/lib/common/ai-core-preferences.d.ts +0 -48
  128. package/lib/common/ai-core-preferences.d.ts.map +0 -1
  129. package/lib/common/ai-core-preferences.js +0 -204
  130. package/lib/common/ai-core-preferences.js.map +0 -1
  131. package/lib/common/ai-variable-resource.d.ts +0 -18
  132. package/lib/common/ai-variable-resource.d.ts.map +0 -1
  133. package/lib/common/ai-variable-resource.js +0 -103
  134. package/lib/common/ai-variable-resource.js.map +0 -1
  135. package/lib/common/configurable-in-memory-resources.d.ts +0 -47
  136. package/lib/common/configurable-in-memory-resources.d.ts.map +0 -1
  137. package/lib/common/configurable-in-memory-resources.js +0 -154
  138. package/lib/common/configurable-in-memory-resources.js.map +0 -1
  139. package/lib/common/index.d.ts +0 -22
  140. package/lib/common/index.d.ts.map +0 -1
  141. package/lib/common/index.js +0 -40
  142. package/lib/common/index.js.map +0 -1
  143. package/lib/common/language-model-alias.d.ts +0 -58
  144. package/lib/common/language-model-alias.d.ts.map +0 -1
  145. package/lib/common/language-model-alias.js +0 -20
  146. package/lib/common/language-model-alias.js.map +0 -1
  147. package/lib/common/language-model-delegate.d.ts +0 -25
  148. package/lib/common/language-model-delegate.d.ts.map +0 -1
  149. package/lib/common/language-model-delegate.js +0 -26
  150. package/lib/common/language-model-delegate.js.map +0 -1
  151. package/lib/common/language-model-interaction-model.d.ts +0 -74
  152. package/lib/common/language-model-interaction-model.d.ts.map +0 -1
  153. package/lib/common/language-model-interaction-model.js +0 -3
  154. package/lib/common/language-model-interaction-model.js.map +0 -1
  155. package/lib/common/language-model-service.d.ts +0 -38
  156. package/lib/common/language-model-service.d.ts.map +0 -1
  157. package/lib/common/language-model-service.js +0 -128
  158. package/lib/common/language-model-service.js.map +0 -1
  159. package/lib/common/language-model-util.d.ts +0 -17
  160. package/lib/common/language-model-util.d.ts.map +0 -1
  161. package/lib/common/language-model-util.js +0 -82
  162. package/lib/common/language-model-util.js.map +0 -1
  163. package/lib/common/language-model.d.ts +0 -285
  164. package/lib/common/language-model.d.ts.map +0 -1
  165. package/lib/common/language-model.js +0 -248
  166. package/lib/common/language-model.js.map +0 -1
  167. package/lib/common/language-model.spec.d.ts +0 -2
  168. package/lib/common/language-model.spec.d.ts.map +0 -1
  169. package/lib/common/language-model.spec.js +0 -62
  170. package/lib/common/language-model.spec.js.map +0 -1
  171. package/lib/common/notification-types.d.ts +0 -7
  172. package/lib/common/notification-types.d.ts.map +0 -1
  173. package/lib/common/notification-types.js +0 -29
  174. package/lib/common/notification-types.js.map +0 -1
  175. package/lib/common/prompt-service-util.d.ts +0 -8
  176. package/lib/common/prompt-service-util.d.ts.map +0 -1
  177. package/lib/common/prompt-service-util.js +0 -34
  178. package/lib/common/prompt-service-util.js.map +0 -1
  179. package/lib/common/prompt-service.d.ts +0 -466
  180. package/lib/common/prompt-service.d.ts.map +0 -1
  181. package/lib/common/prompt-service.js +0 -653
  182. package/lib/common/prompt-service.js.map +0 -1
  183. package/lib/common/prompt-service.spec.d.ts +0 -2
  184. package/lib/common/prompt-service.spec.d.ts.map +0 -1
  185. package/lib/common/prompt-service.spec.js +0 -431
  186. package/lib/common/prompt-service.spec.js.map +0 -1
  187. package/lib/common/prompt-text.d.ts +0 -8
  188. package/lib/common/prompt-text.d.ts.map +0 -1
  189. package/lib/common/prompt-text.js +0 -27
  190. package/lib/common/prompt-text.js.map +0 -1
  191. package/lib/common/prompt-variable-contribution.d.ts +0 -18
  192. package/lib/common/prompt-variable-contribution.d.ts.map +0 -1
  193. package/lib/common/prompt-variable-contribution.js +0 -207
  194. package/lib/common/prompt-variable-contribution.js.map +0 -1
  195. package/lib/common/prompt-variable-contribution.spec.d.ts +0 -2
  196. package/lib/common/prompt-variable-contribution.spec.d.ts.map +0 -1
  197. package/lib/common/prompt-variable-contribution.spec.js +0 -163
  198. package/lib/common/prompt-variable-contribution.spec.js.map +0 -1
  199. package/lib/common/protocol.d.ts +0 -25
  200. package/lib/common/protocol.d.ts.map +0 -1
  201. package/lib/common/protocol.js +0 -22
  202. package/lib/common/protocol.js.map +0 -1
  203. package/lib/common/settings-service.d.ts +0 -29
  204. package/lib/common/settings-service.d.ts.map +0 -1
  205. package/lib/common/settings-service.js +0 -5
  206. package/lib/common/settings-service.js.map +0 -1
  207. package/lib/common/today-variable-contribution.d.ts +0 -17
  208. package/lib/common/today-variable-contribution.d.ts.map +0 -1
  209. package/lib/common/today-variable-contribution.js +0 -68
  210. package/lib/common/today-variable-contribution.js.map +0 -1
  211. package/lib/common/token-usage-service.d.ts +0 -43
  212. package/lib/common/token-usage-service.d.ts.map +0 -1
  213. package/lib/common/token-usage-service.js +0 -20
  214. package/lib/common/token-usage-service.js.map +0 -1
  215. package/lib/common/tool-invocation-registry.d.ts +0 -66
  216. package/lib/common/tool-invocation-registry.d.ts.map +0 -1
  217. package/lib/common/tool-invocation-registry.js +0 -101
  218. package/lib/common/tool-invocation-registry.js.map +0 -1
  219. package/lib/common/variable-service.d.ts +0 -172
  220. package/lib/common/variable-service.d.ts.map +0 -1
  221. package/lib/common/variable-service.js +0 -287
  222. package/lib/common/variable-service.js.map +0 -1
  223. package/lib/common/variable-service.spec.d.ts +0 -2
  224. package/lib/common/variable-service.spec.d.ts.map +0 -1
  225. package/lib/common/variable-service.spec.js +0 -237
  226. package/lib/common/variable-service.spec.js.map +0 -1
  227. package/lib/node/ai-core-backend-module.d.ts +0 -4
  228. package/lib/node/ai-core-backend-module.d.ts.map +0 -1
  229. package/lib/node/ai-core-backend-module.js +0 -65
  230. package/lib/node/ai-core-backend-module.js.map +0 -1
  231. package/lib/node/backend-language-model-registry.d.ts +0 -13
  232. package/lib/node/backend-language-model-registry.d.ts.map +0 -1
  233. package/lib/node/backend-language-model-registry.js +0 -68
  234. package/lib/node/backend-language-model-registry.js.map +0 -1
  235. package/lib/node/language-model-frontend-delegate.d.ts +0 -18
  236. package/lib/node/language-model-frontend-delegate.d.ts.map +0 -1
  237. package/lib/node/language-model-frontend-delegate.js +0 -109
  238. package/lib/node/language-model-frontend-delegate.js.map +0 -1
  239. package/lib/node/token-usage-service-impl.d.ts +0 -23
  240. package/lib/node/token-usage-service-impl.d.ts.map +0 -1
  241. package/lib/node/token-usage-service-impl.js +0 -78
  242. package/lib/node/token-usage-service-impl.js.map +0 -1
  243. package/lib/node/tool-request-parameters.spec.d.ts +0 -2
  244. package/lib/node/tool-request-parameters.spec.d.ts.map +0 -1
  245. package/lib/node/tool-request-parameters.spec.js +0 -116
  246. package/lib/node/tool-request-parameters.spec.js.map +0 -1
@@ -1,10 +0,0 @@
1
- import { FrontendApplicationContribution } from '@theia/core/lib/browser';
2
- import { Agent } from '../common';
3
- import { ContributionProvider } from '@theia/core/lib/common/contribution-provider';
4
- export declare class AICoreFrontendApplicationContribution implements FrontendApplicationContribution {
5
- private readonly agentService;
6
- protected readonly agentsProvider: ContributionProvider<Agent>;
7
- onStart(): void;
8
- onStop(): void;
9
- }
10
- //# sourceMappingURL=ai-core-frontend-application-contribution.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-core-frontend-application-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/ai-core-frontend-application-contribution.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAE1E,OAAO,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAElC,OAAO,EAAE,oBAAoB,EAAE,MAAM,8CAA8C,CAAC;AAEpF,qBACa,qCAAsC,YAAW,+BAA+B;IAEzF,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAe;IAG5C,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,oBAAoB,CAAC,KAAK,CAAC,CAAC;IAE/D,OAAO,IAAI,IAAI;IAMf,MAAM,IAAI,IAAI;CAEjB"}
@@ -1,46 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2024 EclipseSource GmbH.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.AICoreFrontendApplicationContribution = void 0;
19
- const tslib_1 = require("tslib");
20
- const inversify_1 = require("@theia/core/shared/inversify");
21
- const common_1 = require("../common");
22
- const agent_service_1 = require("../common/agent-service");
23
- const contribution_provider_1 = require("@theia/core/lib/common/contribution-provider");
24
- let AICoreFrontendApplicationContribution = class AICoreFrontendApplicationContribution {
25
- onStart() {
26
- this.agentsProvider.getContributions().forEach(agent => {
27
- this.agentService.registerAgent(agent);
28
- });
29
- }
30
- onStop() {
31
- }
32
- };
33
- exports.AICoreFrontendApplicationContribution = AICoreFrontendApplicationContribution;
34
- tslib_1.__decorate([
35
- (0, inversify_1.inject)(agent_service_1.AgentService),
36
- tslib_1.__metadata("design:type", Object)
37
- ], AICoreFrontendApplicationContribution.prototype, "agentService", void 0);
38
- tslib_1.__decorate([
39
- (0, inversify_1.inject)(contribution_provider_1.ContributionProvider),
40
- (0, inversify_1.named)(common_1.Agent),
41
- tslib_1.__metadata("design:type", Object)
42
- ], AICoreFrontendApplicationContribution.prototype, "agentsProvider", void 0);
43
- exports.AICoreFrontendApplicationContribution = AICoreFrontendApplicationContribution = tslib_1.__decorate([
44
- (0, inversify_1.injectable)()
45
- ], AICoreFrontendApplicationContribution);
46
- //# sourceMappingURL=ai-core-frontend-application-contribution.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-core-frontend-application-contribution.js","sourceRoot":"","sources":["../../src/browser/ai-core-frontend-application-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,4DAAyE;AACzE,sCAAkC;AAClC,2DAAuD;AACvD,wFAAoF;AAG7E,IAAM,qCAAqC,GAA3C,MAAM,qCAAqC;IAO9C,OAAO;QACH,IAAI,CAAC,cAAc,CAAC,gBAAgB,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;YACnD,IAAI,CAAC,YAAY,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;IACP,CAAC;IAED,MAAM;IACN,CAAC;CACJ,CAAA;AAfY,sFAAqC;AAE7B;IADhB,IAAA,kBAAM,EAAC,4BAAY,CAAC;;2EACuB;AAGzB;IADlB,IAAA,kBAAM,EAAC,4CAAoB,CAAC;IAAE,IAAA,iBAAK,EAAC,cAAK,CAAC;;6EACoB;gDALtD,qCAAqC;IADjD,IAAA,sBAAU,GAAE;GACA,qCAAqC,CAejD"}
@@ -1,4 +0,0 @@
1
- import { ContainerModule } from '@theia/core/shared/inversify';
2
- declare const _default: ContainerModule;
3
- export default _default;
4
- //# sourceMappingURL=ai-core-frontend-module.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-core-frontend-module.d.ts","sourceRoot":"","sources":["../../src/browser/ai-core-frontend-module.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;;AA6D/D,wBAyGG"}
@@ -1,137 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2024 EclipseSource GmbH.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- const core_1 = require("@theia/core");
19
- const service_connection_provider_1 = require("@theia/core/lib/browser/messaging/service-connection-provider");
20
- const inversify_1 = require("@theia/core/shared/inversify");
21
- const frontend_language_model_alias_registry_1 = require("./frontend-language-model-alias-registry");
22
- const language_model_alias_1 = require("../common/language-model-alias");
23
- const common_1 = require("../common");
24
- const frontend_language_model_registry_1 = require("./frontend-language-model-registry");
25
- const browser_1 = require("@theia/core/lib/browser");
26
- const tab_bar_toolbar_1 = require("@theia/core/lib/browser/shell/tab-bar-toolbar");
27
- const textmate_1 = require("@theia/monaco/lib/browser/textmate");
28
- const ai_core_frontend_application_contribution_1 = require("./ai-core-frontend-application-contribution");
29
- const ai_core_preferences_1 = require("../common/ai-core-preferences");
30
- const ai_settings_service_1 = require("./ai-settings-service");
31
- const frontend_prompt_customization_service_1 = require("./frontend-prompt-customization-service");
32
- const frontend_variable_service_1 = require("./frontend-variable-service");
33
- const prompttemplate_contribution_1 = require("./prompttemplate-contribution");
34
- const file_variable_contribution_1 = require("./file-variable-contribution");
35
- const theia_variable_contribution_1 = require("./theia-variable-contribution");
36
- const today_variable_contribution_1 = require("../common/today-variable-contribution");
37
- const agents_variable_contribution_1 = require("../common/agents-variable-contribution");
38
- const open_editors_variable_contribution_1 = require("./open-editors-variable-contribution");
39
- const ai_activation_service_1 = require("./ai-activation-service");
40
- const agent_service_1 = require("../common/agent-service");
41
- const ai_command_handler_factory_1 = require("./ai-command-handler-factory");
42
- const settings_service_1 = require("../common/settings-service");
43
- const ai_core_command_contribution_1 = require("./ai-core-command-contribution");
44
- const prompt_variable_contribution_1 = require("../common/prompt-variable-contribution");
45
- const language_model_service_1 = require("../common/language-model-service");
46
- const frontend_language_model_service_1 = require("./frontend-language-model-service");
47
- const token_usage_frontend_service_1 = require("./token-usage-frontend-service");
48
- const token_usage_frontend_service_impl_1 = require("./token-usage-frontend-service-impl");
49
- const ai_variable_uri_label_provider_1 = require("./ai-variable-uri-label-provider");
50
- const agent_completion_notification_service_1 = require("./agent-completion-notification-service");
51
- const os_notification_service_1 = require("./os-notification-service");
52
- const window_blink_service_1 = require("./window-blink-service");
53
- exports.default = new inversify_1.ContainerModule(bind => {
54
- (0, core_1.bindContributionProvider)(bind, common_1.Agent);
55
- (0, core_1.bindContributionProvider)(bind, common_1.LanguageModelProvider);
56
- bind(frontend_language_model_registry_1.FrontendLanguageModelRegistryImpl).toSelf().inSingletonScope();
57
- bind(common_1.FrontendLanguageModelRegistry).toService(frontend_language_model_registry_1.FrontendLanguageModelRegistryImpl);
58
- bind(common_1.LanguageModelRegistry).toService(frontend_language_model_registry_1.FrontendLanguageModelRegistryImpl);
59
- bind(frontend_language_model_registry_1.LanguageModelDelegateClientImpl).toSelf().inSingletonScope();
60
- bind(common_1.LanguageModelDelegateClient).toService(frontend_language_model_registry_1.LanguageModelDelegateClientImpl);
61
- bind(common_1.LanguageModelRegistryClient).toService(common_1.LanguageModelDelegateClient);
62
- bind(common_1.LanguageModelRegistryFrontendDelegate).toDynamicValue(ctx => {
63
- const connection = ctx.container.get(service_connection_provider_1.RemoteConnectionProvider);
64
- const client = ctx.container.get(common_1.LanguageModelRegistryClient);
65
- return connection.createProxy(common_1.languageModelRegistryDelegatePath, client);
66
- });
67
- bind(common_1.LanguageModelFrontendDelegate)
68
- .toDynamicValue(ctx => {
69
- const connection = ctx.container.get(service_connection_provider_1.RemoteConnectionProvider);
70
- const client = ctx.container.get(common_1.LanguageModelDelegateClient);
71
- return connection.createProxy(common_1.languageModelDelegatePath, client);
72
- })
73
- .inSingletonScope();
74
- (0, ai_core_preferences_1.bindAICorePreferences)(bind);
75
- bind(frontend_prompt_customization_service_1.DefaultPromptFragmentCustomizationService).toSelf().inSingletonScope();
76
- bind(common_1.PromptFragmentCustomizationService).toService(frontend_prompt_customization_service_1.DefaultPromptFragmentCustomizationService);
77
- bind(common_1.PromptServiceImpl).toSelf().inSingletonScope();
78
- bind(common_1.PromptService).toService(common_1.PromptServiceImpl);
79
- bind(prompttemplate_contribution_1.PromptTemplateContribution).toSelf().inSingletonScope();
80
- bind(textmate_1.LanguageGrammarDefinitionContribution).toService(prompttemplate_contribution_1.PromptTemplateContribution);
81
- bind(core_1.CommandContribution).toService(prompttemplate_contribution_1.PromptTemplateContribution);
82
- bind(tab_bar_toolbar_1.TabBarToolbarContribution).toService(prompttemplate_contribution_1.PromptTemplateContribution);
83
- bind(ai_settings_service_1.AISettingsServiceImpl).toSelf().inSingletonScope();
84
- bind(settings_service_1.AISettingsService).toService(ai_settings_service_1.AISettingsServiceImpl);
85
- (0, core_1.bindContributionProvider)(bind, common_1.AIVariableContribution);
86
- bind(frontend_variable_service_1.DefaultFrontendVariableService).toSelf().inSingletonScope();
87
- bind(frontend_variable_service_1.FrontendVariableService).toService(frontend_variable_service_1.DefaultFrontendVariableService);
88
- bind(common_1.AIVariableService).toService(frontend_variable_service_1.FrontendVariableService);
89
- bind(browser_1.FrontendApplicationContribution).toService(frontend_variable_service_1.FrontendVariableService);
90
- bind(theia_variable_contribution_1.TheiaVariableContribution).toSelf().inSingletonScope();
91
- bind(common_1.AIVariableContribution).toService(theia_variable_contribution_1.TheiaVariableContribution);
92
- bind(common_1.AIVariableContribution).to(prompt_variable_contribution_1.PromptVariableContribution).inSingletonScope();
93
- bind(common_1.AIVariableContribution).to(today_variable_contribution_1.TodayVariableContribution).inSingletonScope();
94
- bind(common_1.AIVariableContribution).to(file_variable_contribution_1.FileVariableContribution).inSingletonScope();
95
- bind(common_1.AIVariableContribution).to(agents_variable_contribution_1.AgentsVariableContribution).inSingletonScope();
96
- bind(common_1.AIVariableContribution).to(open_editors_variable_contribution_1.OpenEditorsVariableContribution).inSingletonScope();
97
- bind(browser_1.FrontendApplicationContribution).to(ai_core_frontend_application_contribution_1.AICoreFrontendApplicationContribution).inSingletonScope();
98
- bind(common_1.ToolInvocationRegistry).to(common_1.ToolInvocationRegistryImpl).inSingletonScope();
99
- (0, core_1.bindContributionProvider)(bind, common_1.ToolProvider);
100
- bind(ai_activation_service_1.AIActivationServiceImpl).toSelf().inSingletonScope();
101
- bind(ai_activation_service_1.AIActivationService).toService(ai_activation_service_1.AIActivationServiceImpl);
102
- bind(browser_1.FrontendApplicationContribution).toService(ai_activation_service_1.AIActivationService);
103
- bind(agent_service_1.AgentServiceImpl).toSelf().inSingletonScope();
104
- bind(agent_service_1.AgentService).toService(agent_service_1.AgentServiceImpl);
105
- bind(ai_command_handler_factory_1.AICommandHandlerFactory).toFactory(context => (handler) => {
106
- const activationService = context.container.get(ai_activation_service_1.AIActivationService);
107
- return {
108
- execute: (...args) => handler.execute(...args),
109
- isEnabled: (...args) => { var _a, _b; return activationService.isActive && ((_b = (_a = handler.isEnabled) === null || _a === void 0 ? void 0 : _a.call(handler, ...args)) !== null && _b !== void 0 ? _b : true); },
110
- isVisible: (...args) => { var _a, _b; return activationService.isActive && ((_b = (_a = handler.isVisible) === null || _a === void 0 ? void 0 : _a.call(handler, ...args)) !== null && _b !== void 0 ? _b : true); },
111
- isToggled: handler.isToggled
112
- };
113
- });
114
- bind(ai_core_command_contribution_1.AiCoreCommandContribution).toSelf().inSingletonScope();
115
- bind(core_1.CommandContribution).toService(ai_core_command_contribution_1.AiCoreCommandContribution);
116
- bind(frontend_language_model_service_1.FrontendLanguageModelServiceImpl).toSelf().inSingletonScope();
117
- bind(language_model_service_1.LanguageModelService).toService(frontend_language_model_service_1.FrontendLanguageModelServiceImpl);
118
- bind(token_usage_frontend_service_1.TokenUsageFrontendService).to(token_usage_frontend_service_impl_1.TokenUsageFrontendServiceImpl).inSingletonScope();
119
- bind(common_1.TokenUsageServiceClient).to(token_usage_frontend_service_impl_1.TokenUsageServiceClientImpl).inSingletonScope();
120
- bind(frontend_language_model_alias_registry_1.DefaultLanguageModelAliasRegistry).toSelf().inSingletonScope();
121
- bind(language_model_alias_1.LanguageModelAliasRegistry).toService(frontend_language_model_alias_registry_1.DefaultLanguageModelAliasRegistry);
122
- bind(common_1.TokenUsageService).toDynamicValue(ctx => {
123
- const connection = ctx.container.get(service_connection_provider_1.RemoteConnectionProvider);
124
- const client = ctx.container.get(common_1.TokenUsageServiceClient);
125
- return connection.createProxy(common_1.TOKEN_USAGE_SERVICE_PATH, client);
126
- }).inSingletonScope();
127
- bind(common_1.AIVariableResourceResolver).toSelf().inSingletonScope();
128
- bind(core_1.ResourceResolver).toService(common_1.AIVariableResourceResolver);
129
- bind(ai_variable_uri_label_provider_1.AIVariableUriLabelProvider).toSelf().inSingletonScope();
130
- bind(browser_1.LabelProviderContribution).toService(ai_variable_uri_label_provider_1.AIVariableUriLabelProvider);
131
- bind(agent_completion_notification_service_1.AgentCompletionNotificationService).toSelf().inSingletonScope();
132
- bind(os_notification_service_1.OSNotificationService).toSelf().inSingletonScope();
133
- bind(window_blink_service_1.WindowBlinkService).toSelf().inSingletonScope();
134
- bind(common_1.ConfigurableInMemoryResources).toSelf().inSingletonScope();
135
- bind(core_1.ResourceResolver).toService(common_1.ConfigurableInMemoryResources);
136
- });
137
- //# sourceMappingURL=ai-core-frontend-module.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-core-frontend-module.js","sourceRoot":"","sources":["../../src/browser/ai-core-frontend-module.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,sCAA8G;AAC9G,+GAGuE;AACvE,4DAA+D;AAC/D,qGAA6F;AAC7F,yEAA4E;AAC5E,sCAwBmB;AACnB,yFAG4C;AAC5C,qDAAqG;AACrG,mFAA0F;AAC1F,iEAA2F;AAC3F,2GAAoG;AACpG,uEAAsE;AACtE,+DAA8D;AAC9D,mGAAoG;AACpG,2EAAsG;AACtG,+EAA2E;AAC3E,6EAAwE;AACxE,+EAA0E;AAC1E,uFAAkF;AAClF,yFAAoF;A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CAAC,gBAAgB,EAAE,CAAC;IAChE,IAAI,CAAC,uBAAgB,CAAC,CAAC,SAAS,CAAC,sCAA6B,CAAC,CAAC;AACpE,CAAC,CAAC,CAAC"}
@@ -1,16 +0,0 @@
1
- import { DisposableCollection, Emitter, Event, ILogger } from '@theia/core';
2
- import { PreferenceService } from '@theia/core/lib/common';
3
- import { AISettings, AISettingsService, AgentSettings } from '../common';
4
- export declare class AISettingsServiceImpl implements AISettingsService {
5
- protected readonly logger: ILogger;
6
- protected preferenceService: PreferenceService;
7
- static readonly PREFERENCE_NAME = "ai-features.agentSettings";
8
- protected toDispose: DisposableCollection;
9
- protected readonly onDidChangeEmitter: Emitter<void>;
10
- onDidChange: Event<void>;
11
- protected init(): void;
12
- updateAgentSettings(agent: string, agentSettings: Partial<AgentSettings>): Promise<void>;
13
- getAgentSettings(agent: string): Promise<AgentSettings | undefined>;
14
- getSettings(): Promise<AISettings>;
15
- }
16
- //# sourceMappingURL=ai-settings-service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-settings-service.d.ts","sourceRoot":"","sources":["../../src/browser/ai-settings-service.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE5E,OAAO,EAAmB,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE5E,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAEzE,qBACa,qBAAsB,YAAW,iBAAiB;IAG3D,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IAER,SAAS,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAC1E,MAAM,CAAC,QAAQ,CAAC,eAAe,+BAA+B;IAE9D,SAAS,CAAC,SAAS,uBAA8B;IAEjD,SAAS,CAAC,QAAQ,CAAC,kBAAkB,gBAAuB;IAC5D,WAAW,EAAE,KAAK,CAAC,IAAI,CAAC,CAAiC;IAGzD,SAAS,CAAC,IAAI,IAAI,IAAI;IAUhB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,OAAO,CAAC,aAAa,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAYxF,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,SAAS,CAAC;IAKnE,WAAW,IAAI,OAAO,CAAC,UAAU,CAAC;CAK3C"}
@@ -1,78 +0,0 @@
1
- "use strict";
2
- var AISettingsServiceImpl_1;
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.AISettingsServiceImpl = void 0;
5
- const tslib_1 = require("tslib");
6
- // *****************************************************************************
7
- // Copyright (C) 2024 EclipseSource GmbH.
8
- //
9
- // This program and the accompanying materials are made available under the
10
- // terms of the Eclipse Public License v. 2.0 which is available at
11
- // http://www.eclipse.org/legal/epl-2.0.
12
- //
13
- // This Source Code may also be made available under the following Secondary
14
- // Licenses when the conditions for such availability set forth in the Eclipse
15
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
16
- // with the GNU Classpath Exception which is available at
17
- // https://www.gnu.org/software/classpath/license.html.
18
- //
19
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
20
- // *****************************************************************************
21
- const core_1 = require("@theia/core");
22
- const inversify_1 = require("@theia/core/shared/inversify");
23
- const common_1 = require("@theia/core/lib/common");
24
- let AISettingsServiceImpl = AISettingsServiceImpl_1 = class AISettingsServiceImpl {
25
- constructor() {
26
- this.toDispose = new core_1.DisposableCollection();
27
- this.onDidChangeEmitter = new core_1.Emitter();
28
- this.onDidChange = this.onDidChangeEmitter.event;
29
- }
30
- init() {
31
- this.toDispose.push(this.preferenceService.onPreferenceChanged(event => {
32
- if (event.preferenceName === AISettingsServiceImpl_1.PREFERENCE_NAME) {
33
- this.onDidChangeEmitter.fire();
34
- }
35
- }));
36
- }
37
- async updateAgentSettings(agent, agentSettings) {
38
- const settings = await this.getSettings();
39
- const newAgentSettings = { ...settings[agent], ...agentSettings };
40
- settings[agent] = newAgentSettings;
41
- try {
42
- await this.preferenceService.set(AISettingsServiceImpl_1.PREFERENCE_NAME, settings, common_1.PreferenceScope.User);
43
- }
44
- catch (e) {
45
- this.onDidChangeEmitter.fire();
46
- this.logger.warn('Updating the preferences was unsuccessful: ' + e);
47
- }
48
- }
49
- async getAgentSettings(agent) {
50
- const settings = await this.getSettings();
51
- return settings[agent];
52
- }
53
- async getSettings() {
54
- await this.preferenceService.ready;
55
- const pref = this.preferenceService.inspect(AISettingsServiceImpl_1.PREFERENCE_NAME);
56
- return (pref === null || pref === void 0 ? void 0 : pref.value) ? pref.value : {};
57
- }
58
- };
59
- exports.AISettingsServiceImpl = AISettingsServiceImpl;
60
- AISettingsServiceImpl.PREFERENCE_NAME = 'ai-features.agentSettings';
61
- tslib_1.__decorate([
62
- (0, inversify_1.inject)(core_1.ILogger),
63
- tslib_1.__metadata("design:type", Object)
64
- ], AISettingsServiceImpl.prototype, "logger", void 0);
65
- tslib_1.__decorate([
66
- (0, inversify_1.inject)(common_1.PreferenceService),
67
- tslib_1.__metadata("design:type", Object)
68
- ], AISettingsServiceImpl.prototype, "preferenceService", void 0);
69
- tslib_1.__decorate([
70
- (0, inversify_1.postConstruct)(),
71
- tslib_1.__metadata("design:type", Function),
72
- tslib_1.__metadata("design:paramtypes", []),
73
- tslib_1.__metadata("design:returntype", void 0)
74
- ], AISettingsServiceImpl.prototype, "init", null);
75
- exports.AISettingsServiceImpl = AISettingsServiceImpl = AISettingsServiceImpl_1 = tslib_1.__decorate([
76
- (0, inversify_1.injectable)()
77
- ], AISettingsServiceImpl);
78
- //# sourceMappingURL=ai-settings-service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-settings-service.js","sourceRoot":"","sources":["../../src/browser/ai-settings-service.ts"],"names":[],"mappings":";;;;;AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2E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AAI,CAAC,6CAA6C,GAAG,CAAC,CAAC,CAAC;QACxE,CAAC;IACL,CAAC;IAED,KAAK,CAAC,gBAAgB,CAAC,KAAa;QAChC,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC;QAC1C,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC;IAC3B,CAAC;IAED,KAAK,CAAC,WAAW;QACb,MAAM,IAAI,CAAC,iBAAiB,CAAC,KAAK,CAAC;QACnC,MAAM,IAAI,GAAG,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAA0B,uBAAqB,CAAC,eAAe,CAAC,CAAC;QAC5G,OAAO,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,KAAK,EAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;IACzC,CAAC;;AA7CQ,sDAAqB;AAMd,qCAAe,GAAG,2BAA2B,AAA9B,CAA+B;AAH3C;IADlB,IAAA,kBAAM,EAAC,cAAO,CAAC;;qDACmB;AAEE;IAApC,IAAA,kBAAM,EAAC,0BAAiB,CAAC;;gEAAgD;AAShE;IADT,IAAA,yBAAa,GAAE;;;;iDASf;gCAtBQ,qBAAqB;IADjC,IAAA,sBAAU,GAAE;GACA,qBAAqB,CA8CjC"}
@@ -1,17 +0,0 @@
1
- import { URI } from '@theia/core';
2
- import { LabelProvider, LabelProviderContribution } from '@theia/core/lib/browser';
3
- import { AIVariableResourceResolver } from '../common/ai-variable-resource';
4
- import { AIVariableResolutionRequest, AIVariableService } from '../common/variable-service';
5
- export declare class AIVariableUriLabelProvider implements LabelProviderContribution {
6
- protected readonly labelProvider: LabelProvider;
7
- protected variableResourceResolver: AIVariableResourceResolver;
8
- protected readonly variableService: AIVariableService;
9
- protected isMine(element: object): element is URI;
10
- canHandle(element: object): number;
11
- getIcon(element: object): string | undefined;
12
- getName(element: object): string | undefined;
13
- getLongName(element: object): string | undefined;
14
- getDetails(element: object): string | undefined;
15
- protected getResolutionRequest(element: object): AIVariableResolutionRequest | undefined;
16
- }
17
- //# sourceMappingURL=ai-variable-uri-label-provider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-variable-uri-label-provider.d.ts","sourceRoot":"","sources":["../../src/browser/ai-variable-uri-label-provider.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AACnF,OAAO,EAA+B,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AACzG,OAAO,EAAE,2BAA2B,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAE5F,qBACa,0BAA2B,YAAW,yBAAyB;IAEjD,SAAS,CAAC,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;IACnC,SAAS,CAAC,wBAAwB,EAAE,0BAA0B,CAAC;IACxE,SAAS,CAAC,QAAQ,CAAC,eAAe,EAAE,iBAAiB,CAAC;IAEjF,SAAS,CAAC,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,IAAI,GAAG;IAIjD,SAAS,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAIlC,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAK5C,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAK5C,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAKhD,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAK/C,SAAS,CAAC,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,2BAA2B,GAAG,SAAS;CAQ3F"}
@@ -1,85 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2025 Eclipse 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.AIVariableUriLabelProvider = void 0;
19
- const tslib_1 = require("tslib");
20
- const inversify_1 = require("@theia/core/shared/inversify");
21
- const core_1 = require("@theia/core");
22
- const browser_1 = require("@theia/core/lib/browser");
23
- const ai_variable_resource_1 = require("../common/ai-variable-resource");
24
- const variable_service_1 = require("../common/variable-service");
25
- let AIVariableUriLabelProvider = class AIVariableUriLabelProvider {
26
- isMine(element) {
27
- return element instanceof core_1.URI && element.scheme === ai_variable_resource_1.AI_VARIABLE_RESOURCE_SCHEME;
28
- }
29
- canHandle(element) {
30
- return this.isMine(element) ? 150 : -1;
31
- }
32
- getIcon(element) {
33
- if (!this.isMine(element)) {
34
- return undefined;
35
- }
36
- return this.labelProvider.getIcon(this.getResolutionRequest(element));
37
- }
38
- getName(element) {
39
- if (!this.isMine(element)) {
40
- return undefined;
41
- }
42
- return this.labelProvider.getName(this.getResolutionRequest(element));
43
- }
44
- getLongName(element) {
45
- if (!this.isMine(element)) {
46
- return undefined;
47
- }
48
- return this.labelProvider.getLongName(this.getResolutionRequest(element));
49
- }
50
- getDetails(element) {
51
- if (!this.isMine(element)) {
52
- return undefined;
53
- }
54
- return this.labelProvider.getDetails(this.getResolutionRequest(element));
55
- }
56
- getResolutionRequest(element) {
57
- if (!this.isMine(element)) {
58
- return undefined;
59
- }
60
- const metadata = this.variableResourceResolver.fromUri(element);
61
- if (!metadata) {
62
- return undefined;
63
- }
64
- const { variableName, arg } = metadata;
65
- const variable = this.variableService.getVariable(variableName);
66
- return variable && { variable, arg };
67
- }
68
- };
69
- exports.AIVariableUriLabelProvider = AIVariableUriLabelProvider;
70
- tslib_1.__decorate([
71
- (0, inversify_1.inject)(browser_1.LabelProvider),
72
- tslib_1.__metadata("design:type", browser_1.LabelProvider)
73
- ], AIVariableUriLabelProvider.prototype, "labelProvider", void 0);
74
- tslib_1.__decorate([
75
- (0, inversify_1.inject)(ai_variable_resource_1.AIVariableResourceResolver),
76
- tslib_1.__metadata("design:type", ai_variable_resource_1.AIVariableResourceResolver)
77
- ], AIVariableUriLabelProvider.prototype, "variableResourceResolver", void 0);
78
- tslib_1.__decorate([
79
- (0, inversify_1.inject)(variable_service_1.AIVariableService),
80
- tslib_1.__metadata("design:type", Object)
81
- ], AIVariableUriLabelProvider.prototype, "variableService", void 0);
82
- exports.AIVariableUriLabelProvider = AIVariableUriLabelProvider = tslib_1.__decorate([
83
- (0, inversify_1.injectable)()
84
- ], AIVariableUriLabelProvider);
85
- //# sourceMappingURL=ai-variable-uri-label-provider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-variable-uri-label-provider.js","sourceRoot":"","sources":["../../src/browser/ai-variable-uri-label-provider.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,8CAA8C;AAC9C,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,4DAAkE;AAClE,sCAAkC;AAClC,qDAAmF;AACnF,yEAAyG;AACzG,iEAA4F;AAGrF,IAAM,0BAA0B,GAAhC,MAAM,0BAA0B;IAMzB,MAAM,CAAC,OAAe;QAC5B,OAAO,OAAO,YAAY,UAAG,IAAI,OAAO,CAAC,MAAM,KAAK,kDAA2B,CAAC;IACpF,CAAC;IAED,SAAS,CAAC,OAAe;QACrB,OAAO,IAAI,CAAC,MA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AC,OAAO,CAAC,CAAC;QAChE,IAAI,CAAC,QAAQ,EAAE,CAAC;YAAC,OAAO,SAAS,CAAC;QAAC,CAAC;QACpC,MAAM,EAAE,YAAY,EAAE,GAAG,EAAE,GAAG,QAAQ,CAAC;QACvC,MAAM,QAAQ,GAAG,IAAI,CAAC,eAAe,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC;QAChE,OAAO,QAAQ,IAAI,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC;IACzC,CAAC;CACJ,CAAA;AA1CY,gEAA0B;AAEO;IAAzC,IAAA,kBAAM,EAAC,uBAAa,CAAC;sCAAmC,uBAAa;iEAAC;AACzB;IAA7C,IAAA,kBAAM,EAAC,iDAA0B,CAAC;sCAAqC,iDAA0B;4EAAC;AACrD;IAA7C,IAAA,kBAAM,EAAC,oCAAiB,CAAC;;mEAAuD;qCAJxE,0BAA0B;IADtC,IAAA,sBAAU,GAAE;GACA,0BAA0B,CA0CtC"}
@@ -1,14 +0,0 @@
1
- import { CommandRegistry, MenuModelRegistry, PreferenceService } from '@theia/core';
2
- import { AbstractViewContribution, KeybindingRegistry, Widget } from '@theia/core/lib/browser';
3
- import { AIActivationService } from './ai-activation-service';
4
- import { AICommandHandlerFactory } from './ai-command-handler-factory';
5
- export declare class AIViewContribution<T extends Widget> extends AbstractViewContribution<T> {
6
- protected readonly preferenceService: PreferenceService;
7
- protected readonly activationService: AIActivationService;
8
- protected readonly commandHandlerFactory: AICommandHandlerFactory;
9
- protected init(): void;
10
- registerCommands(commands: CommandRegistry): void;
11
- registerMenus(menus: MenuModelRegistry): void;
12
- registerKeybindings(keybindings: KeybindingRegistry): void;
13
- }
14
- //# sourceMappingURL=ai-view-contribution.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-view-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/ai-view-contribution.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACpF,OAAO,EAAE,wBAAwB,EAAe,kBAAkB,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAE5G,OAAO,EAAE,mBAAmB,EAAyB,MAAM,yBAAyB,CAAC;AACrF,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAEvE,qBACa,kBAAkB,CAAC,CAAC,SAAS,MAAM,CAAE,SAAQ,wBAAwB,CAAC,CAAC,CAAC;IAGjF,SAAS,CAAC,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAGxD,SAAS,CAAC,QAAQ,CAAC,iBAAiB,EAAE,mBAAmB,CAAC;IAG1D,SAAS,CAAC,QAAQ,CAAC,qBAAqB,EAAE,uBAAuB,CAAC;IAGlE,SAAS,CAAC,IAAI,IAAI,IAAI;IAQb,gBAAgB,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI;IAejD,aAAa,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI;IAS7C,mBAAmB,CAAC,WAAW,EAAE,kBAAkB,GAAG,IAAI;CAStE"}
@@ -1,87 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AIViewContribution = void 0;
4
- const tslib_1 = require("tslib");
5
- // *****************************************************************************
6
- // Copyright (C) 2024 EclipseSource GmbH.
7
- //
8
- // This program and the accompanying materials are made available under the
9
- // terms of the Eclipse Public License v. 2.0 which is available at
10
- // http://www.eclipse.org/legal/epl-2.0.
11
- //
12
- // This Source Code may also be made available under the following Secondary
13
- // Licenses when the conditions for such availability set forth in the Eclipse
14
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
15
- // with the GNU Classpath Exception which is available at
16
- // https://www.gnu.org/software/classpath/license.html.
17
- //
18
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
19
- // *****************************************************************************
20
- const core_1 = require("@theia/core");
21
- const browser_1 = require("@theia/core/lib/browser");
22
- const inversify_1 = require("@theia/core/shared/inversify");
23
- const ai_activation_service_1 = require("./ai-activation-service");
24
- const ai_command_handler_factory_1 = require("./ai-command-handler-factory");
25
- let AIViewContribution = class AIViewContribution extends browser_1.AbstractViewContribution {
26
- init() {
27
- this.activationService.onDidChangeActiveStatus(active => {
28
- if (!active) {
29
- this.closeView();
30
- }
31
- });
32
- }
33
- registerCommands(commands) {
34
- var _a;
35
- if (this.toggleCommand) {
36
- commands.registerCommand(this.toggleCommand, this.commandHandlerFactory({
37
- execute: () => this.toggleView(),
38
- }));
39
- }
40
- (_a = this.quickView) === null || _a === void 0 ? void 0 : _a.registerItem({
41
- label: this.viewLabel,
42
- when: ai_activation_service_1.ENABLE_AI_CONTEXT_KEY,
43
- open: () => this.openView({ activate: true })
44
- });
45
- }
46
- registerMenus(menus) {
47
- if (this.toggleCommand) {
48
- menus.registerMenuAction(browser_1.CommonMenus.VIEW_VIEWS, {
49
- commandId: this.toggleCommand.id,
50
- when: ai_activation_service_1.ENABLE_AI_CONTEXT_KEY,
51
- label: this.viewLabel
52
- });
53
- }
54
- }
55
- registerKeybindings(keybindings) {
56
- if (this.toggleCommand && this.options.toggleKeybinding) {
57
- keybindings.registerKeybinding({
58
- command: this.toggleCommand.id,
59
- when: ai_activation_service_1.ENABLE_AI_CONTEXT_KEY,
60
- keybinding: this.options.toggleKeybinding
61
- });
62
- }
63
- }
64
- };
65
- exports.AIViewContribution = AIViewContribution;
66
- tslib_1.__decorate([
67
- (0, inversify_1.inject)(core_1.PreferenceService),
68
- tslib_1.__metadata("design:type", Object)
69
- ], AIViewContribution.prototype, "preferenceService", void 0);
70
- tslib_1.__decorate([
71
- (0, inversify_1.inject)(ai_activation_service_1.AIActivationService),
72
- tslib_1.__metadata("design:type", Object)
73
- ], AIViewContribution.prototype, "activationService", void 0);
74
- tslib_1.__decorate([
75
- (0, inversify_1.inject)(ai_command_handler_factory_1.AICommandHandlerFactory),
76
- tslib_1.__metadata("design:type", Function)
77
- ], AIViewContribution.prototype, "commandHandlerFactory", void 0);
78
- tslib_1.__decorate([
79
- (0, inversify_1.postConstruct)(),
80
- tslib_1.__metadata("design:type", Function),
81
- tslib_1.__metadata("design:paramtypes", []),
82
- tslib_1.__metadata("design:returntype", void 0)
83
- ], AIViewContribution.prototype, "init", null);
84
- exports.AIViewContribution = AIViewContribution = tslib_1.__decorate([
85
- (0, inversify_1.injectable)()
86
- ], AIViewContribution);
87
- //# sourceMappingURL=ai-view-contribution.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-view-contribution.js","sourceRoot":"","sources":["../../src/browser/ai-view-contribution.ts"],"names":[],"mappings":";;;;AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;AAChF,sCAAoF;AACpF,qDAA4G;AAC5G,4DAAiF;AACjF,mEAAqF;AACrF,6EAAuE;AAGhE,IAAM,kBAAkB,GAAxB,MAAM,kBAAqC,SAAQ,kCAA2B;IAYvE,IAAI;QACV,IAAI,CAAC,iBAAiB,CAAC,uBAAuB,CAAC,MAAM,CAAC,EAAE;YACpD,IAAI,CAAC,MAAM,EAAE,CAAC;gBACV,IAAI,CAAC,SAAS,EAAE,CAAC;YACrB,CAAC;QACL,CAAC,CAAC,CAAC;IACP,CAAC;IAEQ,gBAAgB,CAAC,QAAyB;;QAC/C,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;YAErB,QAAQ,CAAC,eAAe,CAAC,IAAI,CAAC,aAAa,EAAE,IAAI,CAAC,qBAAqB,CAAC;gBACpE,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,UAAU,EAAE;aACnC,CAAC,CAAC,CAAC;QACR,CAAC;QACD,MAAA,IAAI,CAAC,SAAS,0CAAE,YAAY,CAAC;YACzB,KAAK,EAAE,IAAI,CAAC,SAAS;YACrB,IAAI,EAAE,6CAAqB;YAC3B,IAAI,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;SAChD,CAAC,CAAC;IAEP,CAAC;IAEQ,aAAa,CAAC,KAAwB;QAC3C,IAAI,IAAI,CAAC,aAAa,EAAE,CAAC;YACrB,KAAK,CAAC,kBAAkB,CAAC,qBAAW,CAAC,UAAU,EAAE;gBAC7C,SAAS,EAAE,IAAI,CAAC,aAAa,CAAC,EAAE;gBAChC,IAAI,EAAE,6CAAqB;gBAC3B,KAAK,EAAE,IAAI,CAAC,SAAS;aACxB,CAAC,CAAC;QACP,CAAC;IACL,CAAC;IACQ,mBAAmB,CAAC,WAA+B;QACxD,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,OAAO,CAAC,gBAAgB,EAAE,CAAC;YACtD,WAAW,CAAC,kBAAkB,CAAC;gBAC3B,OAAO,EAAE,IAAI,CAAC,aAAa,CAAC,EAAE;gBAC9B,IAAI,EAAE,6CAAqB;gBAC3B,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,gBAAgB;aAC5C,CAAC,CAAC;QACP,CAAC;IACL,CAAC;CACJ,CAAA;AArDY,gDAAkB;AAGR;IADlB,IAAA,kBAAM,EAAC,wBAAiB,CAAC;;6DAC8B;AAGrC;IADlB,IAAA,kBAAM,EAAC,2CAAmB,CAAC;;6DAC8B;AAGvC;IADlB,IAAA,kBAAM,EAAC,oDAAuB,CAAC;;iEACkC;AAGxD;IADT,IAAA,yBAAa,GAAE;;;;8CAOf;6BAlBQ,kBAAkB;IAD9B,IAAA,sBAAU,GAAE;GACA,kBAAkB,CAqD9B"}
@@ -1,23 +0,0 @@
1
- import { URI } from '@theia/core';
2
- import { OpenerService } from '@theia/core/lib/browser';
3
- import { FileService } from '@theia/filesystem/lib/browser/file-service';
4
- import { WorkspaceService } from '@theia/workspace/lib/browser/workspace-service';
5
- import { AIVariable, AIVariableContext, AIVariableContribution, AIVariableOpener, AIVariableResolutionRequest, AIVariableResolver, ResolvedAIContextVariable } from '../common/variable-service';
6
- import { FrontendVariableService } from './frontend-variable-service';
7
- export declare namespace FileVariableArgs {
8
- const uri = "uri";
9
- }
10
- export declare const FILE_VARIABLE: AIVariable;
11
- export declare class FileVariableContribution implements AIVariableContribution, AIVariableResolver, AIVariableOpener {
12
- protected readonly fileService: FileService;
13
- protected readonly wsService: WorkspaceService;
14
- protected readonly openerService: OpenerService;
15
- registerVariables(service: FrontendVariableService): void;
16
- canResolve(request: AIVariableResolutionRequest, _: AIVariableContext): Promise<number>;
17
- resolve(request: AIVariableResolutionRequest, _: AIVariableContext): Promise<ResolvedAIContextVariable | undefined>;
18
- protected toUri(request: AIVariableResolutionRequest): Promise<URI | undefined>;
19
- canOpen(request: AIVariableResolutionRequest, context: AIVariableContext): Promise<number>;
20
- open(request: AIVariableResolutionRequest, context: AIVariableContext): Promise<void>;
21
- protected makeAbsolute(pathStr: string): Promise<URI | undefined>;
22
- }
23
- //# sourceMappingURL=file-variable-contribution.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"file-variable-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/file-variable-contribution.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAa,GAAG,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAsB,MAAM,yBAAyB,CAAC;AAE5E,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAClF,OAAO,EACH,UAAU,EACV,iBAAiB,EACjB,sBAAsB,EACtB,gBAAgB,EAChB,2BAA2B,EAC3B,kBAAkB,EAClB,yBAAyB,EAC5B,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,yBAAiB,gBAAgB,CAAC;IACvB,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