@theia/ai-chat 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 (250) hide show
  1. package/README.md +1 -0
  2. package/package.json +9 -9
  3. package/{lib/common/context-variables.js → src/browser/context-file-validation-service.ts} +19 -7
  4. package/lib/browser/agent-delegation-tool.d.ts +0 -25
  5. package/lib/browser/agent-delegation-tool.d.ts.map +0 -1
  6. package/lib/browser/agent-delegation-tool.js +0 -196
  7. package/lib/browser/agent-delegation-tool.js.map +0 -1
  8. package/lib/browser/ai-chat-frontend-contribution.d.ts +0 -11
  9. package/lib/browser/ai-chat-frontend-contribution.d.ts.map +0 -1
  10. package/lib/browser/ai-chat-frontend-contribution.js +0 -56
  11. package/lib/browser/ai-chat-frontend-contribution.js.map +0 -1
  12. package/lib/browser/ai-chat-frontend-module.d.ts +0 -4
  13. package/lib/browser/ai-chat-frontend-module.d.ts.map +0 -1
  14. package/lib/browser/ai-chat-frontend-module.js +0 -143
  15. package/lib/browser/ai-chat-frontend-module.js.map +0 -1
  16. package/lib/browser/change-set-decorator-service.d.ts +0 -24
  17. package/lib/browser/change-set-decorator-service.d.ts.map +0 -1
  18. package/lib/browser/change-set-decorator-service.js +0 -66
  19. package/lib/browser/change-set-decorator-service.js.map +0 -1
  20. package/lib/browser/change-set-file-element-deserializer.d.ts +0 -7
  21. package/lib/browser/change-set-file-element-deserializer.d.ts.map +0 -1
  22. package/lib/browser/change-set-file-element-deserializer.js +0 -61
  23. package/lib/browser/change-set-file-element-deserializer.js.map +0 -1
  24. package/lib/browser/change-set-file-element.d.ts +0 -122
  25. package/lib/browser/change-set-file-element.d.ts.map +0 -1
  26. package/lib/browser/change-set-file-element.js +0 -435
  27. package/lib/browser/change-set-file-element.js.map +0 -1
  28. package/lib/browser/change-set-file-resource.d.ts +0 -4
  29. package/lib/browser/change-set-file-resource.d.ts.map +0 -1
  30. package/lib/browser/change-set-file-resource.js +0 -24
  31. package/lib/browser/change-set-file-resource.js.map +0 -1
  32. package/lib/browser/change-set-file-service.d.ts +0 -32
  33. package/lib/browser/change-set-file-service.d.ts.map +0 -1
  34. package/lib/browser/change-set-file-service.js +0 -161
  35. package/lib/browser/change-set-file-service.js.map +0 -1
  36. package/lib/browser/change-set-variable.d.ts +0 -11
  37. package/lib/browser/change-set-variable.d.ts.map +0 -1
  38. package/lib/browser/change-set-variable.js +0 -64
  39. package/lib/browser/change-set-variable.js.map +0 -1
  40. package/lib/browser/chat-session-store-impl.d.ts +0 -36
  41. package/lib/browser/chat-session-store-impl.d.ts.map +0 -1
  42. package/lib/browser/chat-session-store-impl.js +0 -287
  43. package/lib/browser/chat-session-store-impl.js.map +0 -1
  44. package/lib/browser/chat-tool-preference-bindings.d.ts +0 -34
  45. package/lib/browser/chat-tool-preference-bindings.d.ts.map +0 -1
  46. package/lib/browser/chat-tool-preference-bindings.js +0 -122
  47. package/lib/browser/chat-tool-preference-bindings.js.map +0 -1
  48. package/lib/browser/chat-tool-request-service.d.ts +0 -21
  49. package/lib/browser/chat-tool-request-service.d.ts.map +0 -1
  50. package/lib/browser/chat-tool-request-service.js +0 -90
  51. package/lib/browser/chat-tool-request-service.js.map +0 -1
  52. package/lib/browser/context-file-variable-label-provider.d.ts +0 -14
  53. package/lib/browser/context-file-variable-label-provider.d.ts.map +0 -1
  54. package/lib/browser/context-file-variable-label-provider.js +0 -63
  55. package/lib/browser/context-file-variable-label-provider.js.map +0 -1
  56. package/lib/browser/context-variable-label-provider.d.ts +0 -9
  57. package/lib/browser/context-variable-label-provider.d.ts.map +0 -1
  58. package/lib/browser/context-variable-label-provider.js +0 -55
  59. package/lib/browser/context-variable-label-provider.js.map +0 -1
  60. package/lib/browser/custom-agent-factory.d.ts +0 -4
  61. package/lib/browser/custom-agent-factory.d.ts.map +0 -1
  62. package/lib/browser/custom-agent-factory.js +0 -20
  63. package/lib/browser/custom-agent-factory.js.map +0 -1
  64. package/lib/browser/custom-agent-frontend-application-contribution.d.ts +0 -13
  65. package/lib/browser/custom-agent-frontend-application-contribution.d.ts.map +0 -1
  66. package/lib/browser/custom-agent-frontend-application-contribution.js +0 -83
  67. package/lib/browser/custom-agent-frontend-application-contribution.js.map +0 -1
  68. package/lib/browser/delegation-response-content.d.ts +0 -20
  69. package/lib/browser/delegation-response-content.d.ts.map +0 -1
  70. package/lib/browser/delegation-response-content.js +0 -47
  71. package/lib/browser/delegation-response-content.js.map +0 -1
  72. package/lib/browser/file-chat-variable-contribution.d.ts +0 -32
  73. package/lib/browser/file-chat-variable-contribution.d.ts.map +0 -1
  74. package/lib/browser/file-chat-variable-contribution.js +0 -241
  75. package/lib/browser/file-chat-variable-contribution.js.map +0 -1
  76. package/lib/browser/frontend-chat-service.d.ts +0 -15
  77. package/lib/browser/frontend-chat-service.d.ts.map +0 -1
  78. package/lib/browser/frontend-chat-service.js +0 -72
  79. package/lib/browser/frontend-chat-service.js.map +0 -1
  80. package/lib/browser/image-context-variable-contribution.d.ts +0 -27
  81. package/lib/browser/image-context-variable-contribution.d.ts.map +0 -1
  82. package/lib/browser/image-context-variable-contribution.js +0 -149
  83. package/lib/browser/image-context-variable-contribution.js.map +0 -1
  84. package/lib/browser/task-context-service.d.ts +0 -46
  85. package/lib/browser/task-context-service.d.ts.map +0 -1
  86. package/lib/browser/task-context-service.js +0 -256
  87. package/lib/browser/task-context-service.js.map +0 -1
  88. package/lib/browser/task-context-storage-service.d.ts +0 -19
  89. package/lib/browser/task-context-storage-service.d.ts.map +0 -1
  90. package/lib/browser/task-context-storage-service.js +0 -80
  91. package/lib/browser/task-context-storage-service.js.map +0 -1
  92. package/lib/browser/task-context-variable-contribution.d.ts +0 -20
  93. package/lib/browser/task-context-variable-contribution.d.ts.map +0 -1
  94. package/lib/browser/task-context-variable-contribution.js +0 -101
  95. package/lib/browser/task-context-variable-contribution.js.map +0 -1
  96. package/lib/browser/task-context-variable-label-provider.d.ts +0 -21
  97. package/lib/browser/task-context-variable-label-provider.d.ts.map +0 -1
  98. package/lib/browser/task-context-variable-label-provider.js +0 -83
  99. package/lib/browser/task-context-variable-label-provider.js.map +0 -1
  100. package/lib/browser/task-context-variable.d.ts +0 -3
  101. package/lib/browser/task-context-variable.d.ts.map +0 -1
  102. package/lib/browser/task-context-variable.js +0 -33
  103. package/lib/browser/task-context-variable.js.map +0 -1
  104. package/lib/common/ai-chat-preferences.d.ts +0 -5
  105. package/lib/common/ai-chat-preferences.d.ts.map +0 -1
  106. package/lib/common/ai-chat-preferences.js +0 -40
  107. package/lib/common/ai-chat-preferences.js.map +0 -1
  108. package/lib/common/change-set-element-deserializer.d.ts +0 -30
  109. package/lib/common/change-set-element-deserializer.d.ts.map +0 -1
  110. package/lib/common/change-set-element-deserializer.js +0 -81
  111. package/lib/common/change-set-element-deserializer.js.map +0 -1
  112. package/lib/common/change-set.d.ts +0 -85
  113. package/lib/common/change-set.d.ts.map +0 -1
  114. package/lib/common/change-set.js +0 -133
  115. package/lib/common/change-set.js.map +0 -1
  116. package/lib/common/chat-agent-service.d.ts +0 -46
  117. package/lib/common/chat-agent-service.d.ts.map +0 -1
  118. package/lib/common/chat-agent-service.js +0 -79
  119. package/lib/common/chat-agent-service.js.map +0 -1
  120. package/lib/common/chat-agents-variable-contribution.d.ts +0 -17
  121. package/lib/common/chat-agents-variable-contribution.d.ts.map +0 -1
  122. package/lib/common/chat-agents-variable-contribution.js +0 -67
  123. package/lib/common/chat-agents-variable-contribution.js.map +0 -1
  124. package/lib/common/chat-agents.d.ts +0 -138
  125. package/lib/common/chat-agents.d.ts.map +0 -1
  126. package/lib/common/chat-agents.js +0 -428
  127. package/lib/common/chat-agents.js.map +0 -1
  128. package/lib/common/chat-auto-save.spec.d.ts +0 -2
  129. package/lib/common/chat-auto-save.spec.d.ts.map +0 -1
  130. package/lib/common/chat-auto-save.spec.js +0 -304
  131. package/lib/common/chat-auto-save.spec.js.map +0 -1
  132. package/lib/common/chat-content-deserializer.d.ts +0 -161
  133. package/lib/common/chat-content-deserializer.d.ts.map +0 -1
  134. package/lib/common/chat-content-deserializer.js +0 -166
  135. package/lib/common/chat-content-deserializer.js.map +0 -1
  136. package/lib/common/chat-content-deserializer.spec.d.ts +0 -2
  137. package/lib/common/chat-content-deserializer.spec.d.ts.map +0 -1
  138. package/lib/common/chat-content-deserializer.spec.js +0 -307
  139. package/lib/common/chat-content-deserializer.spec.js.map +0 -1
  140. package/lib/common/chat-model-serialization.d.ts +0 -110
  141. package/lib/common/chat-model-serialization.d.ts.map +0 -1
  142. package/lib/common/chat-model-serialization.js +0 -20
  143. package/lib/common/chat-model-serialization.js.map +0 -1
  144. package/lib/common/chat-model-serialization.spec.d.ts +0 -2
  145. package/lib/common/chat-model-serialization.spec.d.ts.map +0 -1
  146. package/lib/common/chat-model-serialization.spec.js +0 -278
  147. package/lib/common/chat-model-serialization.spec.js.map +0 -1
  148. package/lib/common/chat-model-util.d.ts +0 -7
  149. package/lib/common/chat-model-util.d.ts.map +0 -1
  150. package/lib/common/chat-model-util.js +0 -50
  151. package/lib/common/chat-model-util.js.map +0 -1
  152. package/lib/common/chat-model.d.ts +0 -923
  153. package/lib/common/chat-model.d.ts.map +0 -1
  154. package/lib/common/chat-model.js +0 -1791
  155. package/lib/common/chat-model.js.map +0 -1
  156. package/lib/common/chat-request-parser.d.ts +0 -38
  157. package/lib/common/chat-request-parser.d.ts.map +0 -1
  158. package/lib/common/chat-request-parser.js +0 -230
  159. package/lib/common/chat-request-parser.js.map +0 -1
  160. package/lib/common/chat-request-parser.spec.d.ts +0 -2
  161. package/lib/common/chat-request-parser.spec.d.ts.map +0 -1
  162. package/lib/common/chat-request-parser.spec.js +0 -235
  163. package/lib/common/chat-request-parser.spec.js.map +0 -1
  164. package/lib/common/chat-service-deletion.spec.d.ts +0 -2
  165. package/lib/common/chat-service-deletion.spec.d.ts.map +0 -1
  166. package/lib/common/chat-service-deletion.spec.js +0 -221
  167. package/lib/common/chat-service-deletion.spec.js.map +0 -1
  168. package/lib/common/chat-service.d.ts +0 -153
  169. package/lib/common/chat-service.d.ts.map +0 -1
  170. package/lib/common/chat-service.js +0 -474
  171. package/lib/common/chat-service.js.map +0 -1
  172. package/lib/common/chat-session-naming-prompt-template.d.ts +0 -3
  173. package/lib/common/chat-session-naming-prompt-template.d.ts.map +0 -1
  174. package/lib/common/chat-session-naming-prompt-template.js +0 -31
  175. package/lib/common/chat-session-naming-prompt-template.js.map +0 -1
  176. package/lib/common/chat-session-naming-service.d.ts +0 -26
  177. package/lib/common/chat-session-naming-service.d.ts.map +0 -1
  178. package/lib/common/chat-session-naming-service.js +0 -119
  179. package/lib/common/chat-session-naming-service.js.map +0 -1
  180. package/lib/common/chat-session-store.d.ts +0 -43
  181. package/lib/common/chat-session-store.d.ts.map +0 -1
  182. package/lib/common/chat-session-store.js +0 -20
  183. package/lib/common/chat-session-store.js.map +0 -1
  184. package/lib/common/chat-session-summary-agent-prompt.d.ts +0 -8
  185. package/lib/common/chat-session-summary-agent-prompt.d.ts.map +0 -1
  186. package/lib/common/chat-session-summary-agent-prompt.js +0 -33
  187. package/lib/common/chat-session-summary-agent-prompt.js.map +0 -1
  188. package/lib/common/chat-session-summary-agent.d.ts +0 -16
  189. package/lib/common/chat-session-summary-agent.d.ts.map +0 -1
  190. package/lib/common/chat-session-summary-agent.js +0 -48
  191. package/lib/common/chat-session-summary-agent.js.map +0 -1
  192. package/lib/common/chat-string-utils.d.ts +0 -3
  193. package/lib/common/chat-string-utils.d.ts.map +0 -1
  194. package/lib/common/chat-string-utils.js +0 -27
  195. package/lib/common/chat-string-utils.js.map +0 -1
  196. package/lib/common/chat-tool-preferences.d.ts +0 -23
  197. package/lib/common/chat-tool-preferences.d.ts.map +0 -1
  198. package/lib/common/chat-tool-preferences.js +0 -68
  199. package/lib/common/chat-tool-preferences.js.map +0 -1
  200. package/lib/common/chat-tool-request-service.d.ts +0 -18
  201. package/lib/common/chat-tool-request-service.d.ts.map +0 -1
  202. package/lib/common/chat-tool-request-service.js +0 -52
  203. package/lib/common/chat-tool-request-service.js.map +0 -1
  204. package/lib/common/context-details-variable.d.ts +0 -9
  205. package/lib/common/context-details-variable.d.ts.map +0 -1
  206. package/lib/common/context-details-variable.js +0 -57
  207. package/lib/common/context-details-variable.js.map +0 -1
  208. package/lib/common/context-summary-variable.d.ts +0 -9
  209. package/lib/common/context-summary-variable.d.ts.map +0 -1
  210. package/lib/common/context-summary-variable.js +0 -57
  211. package/lib/common/context-summary-variable.js.map +0 -1
  212. package/lib/common/context-variables.d.ts +0 -4
  213. package/lib/common/context-variables.d.ts.map +0 -1
  214. package/lib/common/context-variables.js.map +0 -1
  215. package/lib/common/custom-chat-agent.d.ts +0 -10
  216. package/lib/common/custom-chat-agent.d.ts.map +0 -1
  217. package/lib/common/custom-chat-agent.js +0 -40
  218. package/lib/common/custom-chat-agent.js.map +0 -1
  219. package/lib/common/image-context-variable.d.ts +0 -29
  220. package/lib/common/image-context-variable.d.ts.map +0 -1
  221. package/lib/common/image-context-variable.js +0 -114
  222. package/lib/common/image-context-variable.js.map +0 -1
  223. package/lib/common/index.d.ts +0 -13
  224. package/lib/common/index.d.ts.map +0 -1
  225. package/lib/common/index.js +0 -31
  226. package/lib/common/index.js.map +0 -1
  227. package/lib/common/parse-contents-with-incomplete-parts.spec.d.ts +0 -2
  228. package/lib/common/parse-contents-with-incomplete-parts.spec.d.ts.map +0 -1
  229. package/lib/common/parse-contents-with-incomplete-parts.spec.js +0 -103
  230. package/lib/common/parse-contents-with-incomplete-parts.spec.js.map +0 -1
  231. package/lib/common/parse-contents.d.ts +0 -12
  232. package/lib/common/parse-contents.d.ts.map +0 -1
  233. package/lib/common/parse-contents.js +0 -107
  234. package/lib/common/parse-contents.js.map +0 -1
  235. package/lib/common/parse-contents.spec.d.ts +0 -10
  236. package/lib/common/parse-contents.spec.d.ts.map +0 -1
  237. package/lib/common/parse-contents.spec.js +0 -146
  238. package/lib/common/parse-contents.spec.js.map +0 -1
  239. package/lib/common/parsed-chat-request.d.ts +0 -66
  240. package/lib/common/parsed-chat-request.d.ts.map +0 -1
  241. package/lib/common/parsed-chat-request.js +0 -83
  242. package/lib/common/parsed-chat-request.js.map +0 -1
  243. package/lib/common/response-content-matcher.d.ts +0 -69
  244. package/lib/common/response-content-matcher.d.ts.map +0 -1
  245. package/lib/common/response-content-matcher.js +0 -97
  246. package/lib/common/response-content-matcher.js.map +0 -1
  247. package/lib/node/ai-chat-backend-module.d.ts +0 -4
  248. package/lib/node/ai-chat-backend-module.d.ts.map +0 -1
  249. package/lib/node/ai-chat-backend-module.js +0 -26
  250. package/lib/node/ai-chat-backend-module.js.map +0 -1
@@ -1,83 +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.TaskContextVariableLabelProvider = void 0;
19
- const tslib_1 = require("tslib");
20
- const ai_core_1 = require("@theia/ai-core");
21
- const core_1 = require("@theia/core");
22
- const inversify_1 = require("@theia/core/shared/inversify");
23
- const browser_1 = require("@theia/core/lib/browser");
24
- const task_context_variable_contribution_1 = require("./task-context-variable-contribution");
25
- const common_1 = require("../common");
26
- const task_context_service_1 = require("./task-context-service");
27
- const task_context_variable_1 = require("./task-context-variable");
28
- let TaskContextVariableLabelProvider = class TaskContextVariableLabelProvider {
29
- isMine(element) {
30
- return ai_core_1.AIVariableResolutionRequest.is(element) && element.variable.id === task_context_variable_1.TASK_CONTEXT_VARIABLE.id && !!element.arg;
31
- }
32
- canHandle(element) {
33
- return this.isMine(element) ? 10 : -1;
34
- }
35
- getIcon(element) {
36
- if (!this.isMine(element)) {
37
- return undefined;
38
- }
39
- return (0, browser_1.codicon)('clippy');
40
- }
41
- getName(element) {
42
- var _a, _b, _c;
43
- if (!this.isMine(element)) {
44
- return undefined;
45
- }
46
- const session = this.chatService.getSession(element.arg);
47
- return (_c = (_b = (_a = session === null || session === void 0 ? void 0 : session.title) !== null && _a !== void 0 ? _a : this.taskContextService.getLabel(element.arg)) !== null && _b !== void 0 ? _b : session === null || session === void 0 ? void 0 : session.id) !== null && _c !== void 0 ? _c : element.arg;
48
- }
49
- getLongName(element) {
50
- const short = this.getName(element);
51
- const details = this.getDetails(element);
52
- return `'${short}' (${details})`;
53
- }
54
- getDetails(element) {
55
- if (!this.isMine(element)) {
56
- return undefined;
57
- }
58
- return `id: ${element.arg}`;
59
- }
60
- getUri(element) {
61
- if (!ai_core_1.AIVariableResolutionRequest.is(element)) {
62
- return undefined;
63
- }
64
- return new core_1.URI(element.arg);
65
- }
66
- };
67
- exports.TaskContextVariableLabelProvider = TaskContextVariableLabelProvider;
68
- tslib_1.__decorate([
69
- (0, inversify_1.inject)(common_1.ChatService),
70
- tslib_1.__metadata("design:type", Object)
71
- ], TaskContextVariableLabelProvider.prototype, "chatService", void 0);
72
- tslib_1.__decorate([
73
- (0, inversify_1.inject)(task_context_variable_contribution_1.TaskContextVariableContribution),
74
- tslib_1.__metadata("design:type", task_context_variable_contribution_1.TaskContextVariableContribution)
75
- ], TaskContextVariableLabelProvider.prototype, "chatVariableContribution", void 0);
76
- tslib_1.__decorate([
77
- (0, inversify_1.inject)(task_context_service_1.TaskContextService),
78
- tslib_1.__metadata("design:type", task_context_service_1.TaskContextService)
79
- ], TaskContextVariableLabelProvider.prototype, "taskContextService", void 0);
80
- exports.TaskContextVariableLabelProvider = TaskContextVariableLabelProvider = tslib_1.__decorate([
81
- (0, inversify_1.injectable)()
82
- ], TaskContextVariableLabelProvider);
83
- //# sourceMappingURL=task-context-variable-label-provider.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"task-context-variable-label-provider.js","sourceRoot":"","sources":["../../src/browser/task-context-variable-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,4CAA6D;AAC7D,sCAAkC;AAClC,4DAAkE;AAClE,qDAA6E;AAC7E,6FAAuF;AACvF,sCAAwC;AACxC,iEAA4D;AAC5D,mEAAgE;AAGzD,IAAM,gCAAgC,GAAtC,MAAM,gCAAgC;IAI/B,MAAM,CAAC,OAAe;QAC5B,OAAO,qCAA2B,CAAC,EAAE,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,QAAQ,CAAC,EAAE,KAAK,6CAAqB,CAAC,EAAE,IAAI,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;IACxH,CAAC;IAED,SAAS,CAAC,OAAe;QACrB,OAAO,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1C,CAAC;IAED,OAAO,CAAC,OAAe;QACnB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;YAAC,OAAO,SAAS,CAAC;QAAC,CAAC;QAChD,OAAO,IAAA,iBAAO,EAAC,QAAQ,CAAC,CAAC;IAC7B,CAAC;IAED,OAAO,CAAC,OAAe;;QACnB,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,EAAE,CAAC;YAAC,OAAO,SAAS,CAAC;QAAC,CAAC;QAChD,MAAM,OAAO,GAAG,IAAI,CAAC,WAA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declare const TASK_CONTEXT_VARIABLE: AIVariable;
3
- //# sourceMappingURL=task-context-variable.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"task-context-variable.d.ts","sourceRoot":"","sources":["../../src/browser/task-context-variable.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAI5C,eAAO,MAAM,qBAAqB,EAAE,UAYnC,CAAC"}
@@ -1,33 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2025 EclipseSource GmbH and others.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.TASK_CONTEXT_VARIABLE = void 0;
19
- const core_1 = require("@theia/core");
20
- const browser_1 = require("@theia/core/lib/browser");
21
- exports.TASK_CONTEXT_VARIABLE = {
22
- id: 'taskContext',
23
- description: core_1.nls.localize('theia/chat/taskContextVariable/description', 'Provides context information for a task, e.g. the plan for completing a task or a summary of a previous sessions'),
24
- name: 'taskContext',
25
- label: core_1.nls.localize('theia/chat/taskContextVariable/label', 'Task Context'),
26
- iconClasses: (0, browser_1.codiconArray)('clippy'),
27
- isContextVariable: true,
28
- args: [{
29
- name: 'context-id',
30
- description: core_1.nls.localize('theia/chat/taskContextVariable/args/contextId/description', 'The ID of the task context to retrieve, or a chat session to summarize.')
31
- }]
32
- };
33
- //# sourceMappingURL=task-context-variable.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"task-context-variable.js","sourceRoot":"","sources":["../../src/browser/task-context-variable.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,oDAAoD;AACpD,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAGhF,sCAAkC;AAClC,qDAAuD;AAE1C,QAAA,qBAAqB,GAAe;IAC7C,EAAE,EAAE,aAAa;IACjB,WAAW,EAAE,UAAG,CAAC,QAAQ,CAAC,4CAA4C,EAClE,kHAAkH,CAAC;IACvH,IAAI,EAAE,aAAa;IACnB,KAAK,EAAE,UAAG,CAAC,QAAQ,CAAC,sCAAsC,EAAE,cAAc,CAAC;IAC3E,WAAW,EAAE,IAAA,sBAAY,EAAC,QAAQ,CAAC;IACnC,iBAAiB,EAAE,IAAI;IACvB,IAAI,EAAE,CAAC;YACH,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,UAAG,CAAC,QAAQ,CAAC,2DAA2D,EAAE,yEAAyE,CAAC;SACpK,CAAC;CACL,CAAC"}
@@ -1,5 +0,0 @@
1
- import { PreferenceSchema } from '@theia/core';
2
- export declare const DEFAULT_CHAT_AGENT_PREF = "ai-features.chat.defaultChatAgent";
3
- export declare const PIN_CHAT_AGENT_PREF = "ai-features.chat.pinChatAgent";
4
- export declare const aiChatPreferences: PreferenceSchema;
5
- //# sourceMappingURL=ai-chat-preferences.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-chat-preferences.d.ts","sourceRoot":"","sources":["../../src/common/ai-chat-preferences.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAO,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEpD,eAAO,MAAM,uBAAuB,sCAAsC,CAAC;AAC3E,eAAO,MAAM,mBAAmB,kCAAkC,CAAC;AAEnE,eAAO,MAAM,iBAAiB,EAAE,gBAkB/B,CAAC"}
@@ -1,40 +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.aiChatPreferences = exports.PIN_CHAT_AGENT_PREF = exports.DEFAULT_CHAT_AGENT_PREF = void 0;
19
- const ai_core_preferences_1 = require("@theia/ai-core/lib/common/ai-core-preferences");
20
- const core_1 = require("@theia/core");
21
- exports.DEFAULT_CHAT_AGENT_PREF = 'ai-features.chat.defaultChatAgent';
22
- exports.PIN_CHAT_AGENT_PREF = 'ai-features.chat.pinChatAgent';
23
- exports.aiChatPreferences = {
24
- properties: {
25
- [exports.DEFAULT_CHAT_AGENT_PREF]: {
26
- type: 'string',
27
- description: core_1.nls.localize('theia/ai/chat/defaultAgent/description', 'Optional: <agent-name> of the Chat Agent that shall be invoked, if no agent is explicitly mentioned with @<agent-name> in the user query. \
28
- If no Default Agent is configured, Theia´s defaults will be applied.'),
29
- title: ai_core_preferences_1.AI_CORE_PREFERENCES_TITLE,
30
- },
31
- [exports.PIN_CHAT_AGENT_PREF]: {
32
- type: 'boolean',
33
- description: core_1.nls.localize('theia/ai/chat/pinChatAgent/description', 'Enable agent pinning to automatically keep a mentioned chat agent active across prompts, reducing the need for repeated mentions.\
34
- You can manually unpin or switch agents anytime.'),
35
- default: true,
36
- title: ai_core_preferences_1.AI_CORE_PREFERENCES_TITLE,
37
- }
38
- }
39
- };
40
- //# sourceMappingURL=ai-chat-preferences.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-chat-preferences.js","sourceRoot":"","sources":["../../src/common/ai-chat-preferences.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,uFAA0F;AAC1F,sCAAoD;AAEvC,QAAA,uBAAuB,GAAG,mCAAmC,CAAC;AAC9D,QAAA,mBAAmB,GAAG,+BAA+B,CAAC;AAEtD,QAAA,iBAAiB,GAAqB;IAC/C,UAAU,EAAE;QACR,CAAC,+BAAuB,CAAC,EAAE;YACvB,IAAI,EAAE,QAAQ;YACd,WAAW,EAAE,UAAG,CAAC,QAAQ,CAAC,wCAAwC,EAC9D;qEACqD,CAAC;YAC1D,KAAK,EAAE,+CAAyB;SACnC;QACD,CAAC,2BAAmB,CAAC,EAAE;YACnB,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,UAAG,CAAC,QAAQ,CAAC,wCAAwC,EAC9D;iDACiC,CAAC;YACtC,OAAO,EAAE,IAAI;YACb,KAAK,EAAE,+CAAyB;SACnC;KACJ;CACJ,CAAC"}
@@ -1,30 +0,0 @@
1
- import { ContributionProvider, MaybePromise } from '@theia/core';
2
- import { ChangeSetElement } from './change-set';
3
- import { SerializableChangeSetElement } from './chat-model-serialization';
4
- export declare const ChangeSetElementDeserializer: unique symbol;
5
- export interface ChangeSetElementDeserializer<T = unknown> {
6
- readonly kind: string;
7
- deserialize(serialized: SerializableChangeSetElement, context: ChangeSetDeserializationContext): ChangeSetElement | Promise<ChangeSetElement>;
8
- }
9
- export interface ChangeSetDeserializationContext {
10
- chatSessionId: string;
11
- requestId: string;
12
- }
13
- export interface ChangeSetElementDeserializerContribution {
14
- registerDeserializers(registry: ChangeSetElementDeserializerRegistry): void;
15
- }
16
- export declare const ChangeSetElementDeserializerContribution: unique symbol;
17
- export interface ChangeSetElementDeserializerRegistry {
18
- register(deserializer: ChangeSetElementDeserializer): void;
19
- deserialize(serialized: SerializableChangeSetElement, context: ChangeSetDeserializationContext): MaybePromise<ChangeSetElement>;
20
- }
21
- export declare const ChangeSetElementDeserializerRegistry: unique symbol;
22
- export declare class ChangeSetElementDeserializerRegistryImpl implements ChangeSetElementDeserializerRegistry {
23
- protected deserializers: Map<string, ChangeSetElementDeserializer<unknown>>;
24
- protected readonly changeSetElementDeserializerContributions: ContributionProvider<ChangeSetElementDeserializerContribution>;
25
- init(): void;
26
- register(deserializer: ChangeSetElementDeserializer): void;
27
- deserialize(serialized: SerializableChangeSetElement, context: ChangeSetDeserializationContext): MaybePromise<ChangeSetElement>;
28
- private createFallbackElement;
29
- }
30
- //# sourceMappingURL=change-set-element-deserializer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"change-set-element-deserializer.d.ts","sourceRoot":"","sources":["../../src/common/change-set-element-deserializer.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,oBAAoB,EAAE,YAAY,EAAO,MAAM,aAAa,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAE1E,eAAO,MAAM,4BAA4B,eAAyC,CAAC;AAEnF,MAAM,WAAW,4BAA4B,CAAC,CAAC,GAAG,OAAO;IACrD,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,UAAU,EAAE,4BAA4B,EAAE,OAAO,EAAE,+BAA+B,GAAG,gBAAgB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAC;CACjJ;AAED,MAAM,WAAW,+BAA+B;IAC5C,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,wCAAwC;IACrD,qBAAqB,CAAC,QAAQ,EAAE,oCAAoC,GAAG,IAAI,CAAC;CAC/E;AACD,eAAO,MAAM,wCAAwC,eAAqD,CAAC;AAC3G,MAAM,WAAW,oCAAoC;IACjD,QAAQ,CAAC,YAAY,EAAE,4BAA4B,GAAG,IAAI,CAAC;IAC3D,WAAW,CAAC,UAAU,EAAE,4BAA4B,EAAE,OAAO,EAAE,+BAA+B,GAAG,YAAY,CAAC,gBAAgB,CAAC,CAAC;CACnI;AACD,eAAO,MAAM,oCAAoC,eAAiD,CAAC;AAEnG,qBACa,wCAAyC,YAAW,oCAAoC;IACjG,SAAS,CAAC,aAAa,qDAAmD;IAG1E,SAAS,CAAC,QAAQ,CAAC,yCAAyC,EAAE,oBAAoB,CAAC,wCAAwC,CAAC,CAAC;IAE5G,IAAI,IAAI,IAAI;IAM7B,QAAQ,CAAC,YAAY,EAAE,4BAA4B,GAAG,IAAI;IAI1D,WAAW,CAAC,UAAU,EAAE,4BAA4B,EAAE,OAAO,EAAE,+BAA+B,GAAG,YAAY,CAAC,gBAAgB,CAAC;IAQ/H,OAAO,CAAC,qBAAqB;CAqBhC"}
@@ -1,81 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2025 EclipseSource GmbH.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.ChangeSetElementDeserializerRegistryImpl = exports.ChangeSetElementDeserializerRegistry = exports.ChangeSetElementDeserializerContribution = exports.ChangeSetElementDeserializer = 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
- exports.ChangeSetElementDeserializer = Symbol('ChangeSetElementDeserializer');
23
- exports.ChangeSetElementDeserializerContribution = Symbol('ChangeSetElementDeserializerContribution');
24
- exports.ChangeSetElementDeserializerRegistry = Symbol('ChangeSetElementDeserializerRegistry');
25
- let ChangeSetElementDeserializerRegistryImpl = class ChangeSetElementDeserializerRegistryImpl {
26
- constructor() {
27
- this.deserializers = new Map();
28
- }
29
- init() {
30
- for (const contribution of this.changeSetElementDeserializerContributions.getContributions()) {
31
- contribution.registerDeserializers(this);
32
- }
33
- }
34
- register(deserializer) {
35
- this.deserializers.set(deserializer.kind, deserializer);
36
- }
37
- deserialize(serialized, context) {
38
- const deserializer = this.deserializers.get(serialized.kind || 'generic');
39
- if (!deserializer) {
40
- return this.createFallbackElement(serialized);
41
- }
42
- return deserializer.deserialize(serialized, context);
43
- }
44
- createFallbackElement(serialized) {
45
- return {
46
- uri: new core_1.URI(serialized.uri),
47
- name: serialized.name,
48
- icon: serialized.icon,
49
- additionalInfo: serialized.additionalInfo,
50
- state: serialized.state,
51
- type: serialized.type,
52
- data: serialized.data,
53
- toSerializable: () => ({
54
- kind: serialized.kind || 'generic',
55
- uri: serialized.uri,
56
- name: serialized.name,
57
- icon: serialized.icon,
58
- additionalInfo: serialized.additionalInfo,
59
- state: serialized.state,
60
- type: serialized.type,
61
- data: serialized.data
62
- })
63
- };
64
- }
65
- };
66
- exports.ChangeSetElementDeserializerRegistryImpl = ChangeSetElementDeserializerRegistryImpl;
67
- tslib_1.__decorate([
68
- (0, inversify_1.inject)(core_1.ContributionProvider),
69
- (0, inversify_1.named)(exports.ChangeSetElementDeserializerContribution),
70
- tslib_1.__metadata("design:type", Object)
71
- ], ChangeSetElementDeserializerRegistryImpl.prototype, "changeSetElementDeserializerContributions", void 0);
72
- tslib_1.__decorate([
73
- (0, inversify_1.postConstruct)(),
74
- tslib_1.__metadata("design:type", Function),
75
- tslib_1.__metadata("design:paramtypes", []),
76
- tslib_1.__metadata("design:returntype", void 0)
77
- ], ChangeSetElementDeserializerRegistryImpl.prototype, "init", null);
78
- exports.ChangeSetElementDeserializerRegistryImpl = ChangeSetElementDeserializerRegistryImpl = tslib_1.__decorate([
79
- (0, inversify_1.injectable)()
80
- ], ChangeSetElementDeserializerRegistryImpl);
81
- //# sourceMappingURL=change-set-element-deserializer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"change-set-element-deserializer.js","sourceRoot":"","sources":["../../src/common/change-set-element-deserializer.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,4DAAwF;AACxF,sCAAsE;AAIzD,QAAA,4BAA4B,GAAG,MAAM,CAAC,8BAA8B,CAAC,CAAC;AAetE,QAAA,wCAAwC,GAAG,MAAM,CAAC,0CAA0C,CAAC,CAAC;AAK9F,QAAA,oCAAoC,GAAG,MAAM,CAAC,sCAAsC,CAAC,CAAC;AAG5F,IAAM,wCAAwC,GAA9C,MAAM,wCAAwC;IAA9C;QACO,kBAAa,GAAG,IAAI,GAAG,EAAwC,CAAC;IA4C9E,CAAC;IAvCoB,IAAI;QACjB,KAAK,MAAM,YAAY,IAAI,IAAI,CAAC,yCAAyC,CAAC,gBAAgB,EAAE,EAAE,CAAC;YAC3F,YAAY,CAAC,qBAAqB,CAAC,IAAI,CAAC,CAAC;QAC7C,CAAC;IACL,CAAC;IAED,QAAQ,CAAC,YAA0C;QAC/C,IAAI,CAAC,aAAa,CAAC,GAAG,CAAC,YAAY,CAA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;;oEAIf;mDAVQ,wCAAwC;IADpD,IAAA,sBAAU,GAAE;GACA,wCAAwC,CA6CpD"}
@@ -1,85 +0,0 @@
1
- import { Disposable, Emitter, Event, URI } from '@theia/core';
2
- import { SerializableChangeSetElement } from './chat-model-serialization';
3
- export interface ChangeSetElement {
4
- readonly uri: URI;
5
- onDidChange?: Event<void>;
6
- readonly name?: string;
7
- readonly icon?: string;
8
- readonly additionalInfo?: string;
9
- readonly state?: 'pending' | 'applied' | 'stale';
10
- readonly type?: 'add' | 'modify' | 'delete';
11
- readonly data?: {
12
- [key: string]: unknown;
13
- };
14
- /** Called when an element is shown in the UI */
15
- onShow?(): void;
16
- /** Called when an element is hidden in the UI */
17
- onHide?(): void;
18
- open?(): Promise<void>;
19
- openChange?(): Promise<void>;
20
- apply?(): Promise<void>;
21
- revert?(): Promise<void>;
22
- dispose?(): void;
23
- /**
24
- * Serializes this element to a format suitable for persistence.
25
- * Each element type is responsible for serializing its own data.
26
- * Optional - elements without this method will be excluded from serialization.
27
- */
28
- toSerializable?(): SerializableChangeSetElement;
29
- }
30
- export interface ChatUpdateChangeSetEvent {
31
- kind: 'updateChangeSet';
32
- elements?: ChangeSetElement[];
33
- title?: string;
34
- }
35
- export interface ChangeSetChangeEvent {
36
- title?: string;
37
- added?: URI[];
38
- removed?: URI[];
39
- modified?: URI[];
40
- /** Fired when only the state of a given element changes, not its contents */
41
- state?: URI[];
42
- }
43
- export interface ChangeSet extends Disposable {
44
- onDidChange: Event<ChatUpdateChangeSetEvent>;
45
- readonly title: string;
46
- setTitle(title: string): void;
47
- getElements(): ChangeSetElement[];
48
- /**
49
- * Find an element by URI.
50
- * @param uri The URI to look for.
51
- * @returns The element with the given URI, or undefined if not found.
52
- */
53
- getElementByURI(uri: URI): ChangeSetElement | undefined;
54
- /** @returns true if addition produces a change; false otherwise. */
55
- addElements(...elements: ChangeSetElement[]): boolean;
56
- setElements(...elements: ChangeSetElement[]): void;
57
- /** @returns true if deletion produces a change; false otherwise. */
58
- removeElements(...uris: URI[]): boolean;
59
- dispose(): void;
60
- }
61
- export declare class ChangeSetImpl implements ChangeSet {
62
- /** @param changeSets ordered from tip to root. */
63
- static combine(changeSets: Iterable<ChangeSetImpl>): Map<string, ChangeSetElement | undefined>;
64
- protected readonly _onDidChangeEmitter: Emitter<ChatUpdateChangeSetEvent>;
65
- onDidChange: Event<ChatUpdateChangeSetEvent>;
66
- protected readonly _onDidChangeContentsEmitter: Emitter<ChangeSetChangeEvent>;
67
- onDidChangeContents: Event<ChangeSetChangeEvent>;
68
- protected hasBeenSet: boolean;
69
- protected _elements: Map<string, ChangeSetElement | undefined>;
70
- protected _title: string;
71
- get title(): string;
72
- constructor(elements?: ChangeSetElement[]);
73
- getElements(): ChangeSetElement[];
74
- /** Will replace any element that is already present, using URI as identity criterion. */
75
- addElements(...elements: ChangeSetElement[]): boolean;
76
- setTitle(title: string): void;
77
- protected doAdd(element: ChangeSetElement): boolean;
78
- setElements(...elements: ChangeSetElement[]): void;
79
- removeElements(...uris: URI[]): boolean;
80
- getElementByURI(uri: URI): ChangeSetElement | undefined;
81
- protected doDelete(uri: URI): boolean;
82
- protected notifyChange(change: ChangeSetChangeEvent): void;
83
- dispose(): void;
84
- }
85
- //# sourceMappingURL=change-set.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"change-set.d.ts","sourceRoot":"","sources":["../../src/common/change-set.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAc,UAAU,EAAE,OAAO,EAAE,KAAK,EAAO,GAAG,EAAE,MAAM,aAAa,CAAC;AAC/E,OAAO,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAE1E,MAAM,WAAW,gBAAgB;IAC7B,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAC;IAElB,WAAW,CAAC,EAAE,KAAK,CAAC,IAAI,CAAC,CAAA;IACzB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,CAAC,EAAE,MAA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OAAO;IASnD,WAAW,CAAC,GAAG,QAAQ,EAAE,gBAAgB,EAAE,GAAG,IAAI;IAuBlD,cAAc,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,GAAG,OAAO;IAWvC,eAAe,CAAC,GAAG,EAAE,GAAG,GAAG,gBAAgB,GAAG,SAAS;IAIvD,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO;IAUrC,SAAS,CAAC,YAAY,CAAC,MAAM,EAAE,oBAAoB,GAAG,IAAI;IAK1D,OAAO,IAAI,IAAI;CAIlB"}
@@ -1,133 +0,0 @@
1
- "use strict";
2
- // *****************************************************************************
3
- // Copyright (C) 2025 EclipseSource GmbH and others.
4
- //
5
- // This program and the accompanying materials are made available under the
6
- // terms of the Eclipse Public License v. 2.0 which is available at
7
- // http://www.eclipse.org/legal/epl-2.0.
8
- //
9
- // This Source Code may also be made available under the following Secondary
10
- // Licenses when the conditions for such availability set forth in the Eclipse
11
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
12
- // with the GNU Classpath Exception which is available at
13
- // https://www.gnu.org/software/classpath/license.html.
14
- //
15
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
16
- // *****************************************************************************
17
- Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.ChangeSetImpl = void 0;
19
- const core_1 = require("@theia/core");
20
- class ChangeSetImpl {
21
- /** @param changeSets ordered from tip to root. */
22
- static combine(changeSets) {
23
- const result = new Map();
24
- for (const next of changeSets) {
25
- next._elements.forEach((value, key) => !result.has(key) && result.set(key, value));
26
- // Break at the first element whose values were set, not just changed through addition and deletion.
27
- if (next.hasBeenSet) {
28
- break;
29
- }
30
- }
31
- return result;
32
- }
33
- get title() {
34
- return this._title;
35
- }
36
- constructor(elements = []) {
37
- this._onDidChangeEmitter = new core_1.Emitter();
38
- this.onDidChange = this._onDidChangeEmitter.event;
39
- this._onDidChangeContentsEmitter = new core_1.Emitter();
40
- this.onDidChangeContents = this._onDidChangeContentsEmitter.event;
41
- this.hasBeenSet = false;
42
- this._elements = new Map();
43
- this._title = core_1.nls.localize('theia/ai/chat/changeSetDefaultTitle', 'Suggested Changes');
44
- this.addElements(...elements);
45
- }
46
- getElements() {
47
- return core_1.ArrayUtils.coalesce(Array.from(this._elements.values()));
48
- }
49
- /** Will replace any element that is already present, using URI as identity criterion. */
50
- addElements(...elements) {
51
- const added = [];
52
- const modified = [];
53
- elements.forEach(element => {
54
- if (this.doAdd(element)) {
55
- modified.push(element.uri);
56
- }
57
- else {
58
- added.push(element.uri);
59
- }
60
- });
61
- this.notifyChange({ added, modified });
62
- return !!(added.length || modified.length);
63
- }
64
- setTitle(title) {
65
- this._title = title;
66
- this.notifyChange({ title });
67
- }
68
- doAdd(element) {
69
- var _a, _b;
70
- const id = element.uri.toString();
71
- const existing = this._elements.get(id);
72
- (_a = existing === null || existing === void 0 ? void 0 : existing.dispose) === null || _a === void 0 ? void 0 : _a.call(existing);
73
- this._elements.set(id, element);
74
- (_b = element.onDidChange) === null || _b === void 0 ? void 0 : _b.call(element, () => this.notifyChange({ state: [element.uri] }));
75
- return !!existing;
76
- }
77
- setElements(...elements) {
78
- this.hasBeenSet = true;
79
- const added = [];
80
- const modified = [];
81
- const removed = [];
82
- const toHandle = new Set(this._elements.keys());
83
- for (const element of elements) {
84
- toHandle.delete(element.uri.toString());
85
- if (this.doAdd(element)) {
86
- added.push(element.uri);
87
- }
88
- else {
89
- modified.push(element.uri);
90
- }
91
- }
92
- for (const toDelete of toHandle) {
93
- const uri = new core_1.URI(toDelete);
94
- if (this.doDelete(uri)) {
95
- removed.push(uri);
96
- }
97
- }
98
- this.notifyChange({ added, modified, removed });
99
- }
100
- removeElements(...uris) {
101
- const removed = [];
102
- for (const uri of uris) {
103
- if (this.doDelete(uri)) {
104
- removed.push(uri);
105
- }
106
- }
107
- this.notifyChange({ removed });
108
- return !!removed.length;
109
- }
110
- getElementByURI(uri) {
111
- return this._elements.get(uri.toString());
112
- }
113
- doDelete(uri) {
114
- var _a;
115
- const id = uri.toString();
116
- const delendum = this._elements.get(id);
117
- if (delendum) {
118
- (_a = delendum.dispose) === null || _a === void 0 ? void 0 : _a.call(delendum);
119
- }
120
- this._elements.set(id, undefined);
121
- return !!delendum;
122
- }
123
- notifyChange(change) {
124
- this._onDidChangeContentsEmitter.fire(change);
125
- this._onDidChangeEmitter.fire({ kind: 'updateChangeSet', elements: this.getElements(), title: this.title });
126
- }
127
- dispose() {
128
- this._onDidChangeEmitter.dispose();
129
- this._elements.forEach(element => { var _a; return (_a = element === null || element === void 0 ? void 0 : element.dispose) === null || _a === void 0 ? void 0 : _a.call(element); });
130
- }
131
- }
132
- exports.ChangeSetImpl = ChangeSetImpl;
133
- //# sourceMappingURL=change-set.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"change-set.js","sourceRoot":"","sources":["../../src/common/change-set.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,oDAAoD;AACpD,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;AAEhF,sCAA+E;AAmE/E,MAAa,aAAa;IACtB,kDAAkD;IAClD,MAAM,CAAC,OAAO,CAAC,UAAmC;QAC9C,MAAM,MAAM,GAAG,IAAI,GAAG,EAAwC,CAAC;QAC/D,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE,CAAC;YAC5B,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;YACnF,oGAAoG;YACpG,IAAI,IAAI,CAAC,UAAU,EAAE,CAAC;gBAClB,MAAM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,CAAC,SAAS,CAAC,GAAG,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;QAClC,OAAO,CAAC,CAAC,QAAQ,CAAC;IACtB,CAAC;IAES,YAAY,CAAC,MAA4B;QAC/C,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QAC9C,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,iBAAiB,EAAE,QAAQ,EAAE,IAAI,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;IAChH,CAAC;IAED,OAAO;QACH,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,CAAC;QACnC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,WAAC,OAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,uDAAI,CAAA,EAAA,CAAC,CAAC;IAC5D,CAAC;CACJ;AAzHD,sCAyHC"}
@@ -1,46 +0,0 @@
1
- import { ContributionProvider, ILogger } from '@theia/core';
2
- import { ChatAgent } from './chat-agents';
3
- import { AgentService } from '@theia/ai-core';
4
- export declare const ChatAgentService: unique symbol;
5
- export declare const ChatAgentServiceFactory: unique symbol;
6
- /**
7
- * The ChatAgentService provides access to the available chat agents.
8
- */
9
- export interface ChatAgentService {
10
- /**
11
- * Returns all available agents.
12
- */
13
- getAgents(): ChatAgent[];
14
- /**
15
- * Returns the specified agent, if available
16
- */
17
- getAgent(id: string): ChatAgent | undefined;
18
- /**
19
- * Returns all agents, including disabled ones.
20
- */
21
- getAllAgents(): ChatAgent[];
22
- /**
23
- * Allows to register a chat agent programmatically.
24
- * @param agent the agent to register
25
- */
26
- registerChatAgent(agent: ChatAgent): void;
27
- /**
28
- * Allows to unregister a chat agent programmatically.
29
- * @param agentId the agent id to unregister
30
- */
31
- unregisterChatAgent(agentId: string): void;
32
- }
33
- export declare class ChatAgentServiceImpl implements ChatAgentService {
34
- protected readonly agentContributions: ContributionProvider<ChatAgent>;
35
- protected logger: ILogger;
36
- protected agentService: AgentService;
37
- protected _agents: ChatAgent[];
38
- protected get agents(): ChatAgent[];
39
- registerChatAgent(agent: ChatAgent): void;
40
- unregisterChatAgent(agentId: string): void;
41
- getAgent(id: string): ChatAgent | undefined;
42
- getAgents(): ChatAgent[];
43
- getAllAgents(): ChatAgent[];
44
- private _agentIsEnabled;
45
- }
46
- //# sourceMappingURL=chat-agent-service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chat-agent-service.d.ts","sourceRoot":"","sources":["../../src/common/chat-agent-service.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAE5D,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,eAAO,MAAM,gBAAgB,eAA6B,CAAC;AAC3D,eAAO,MAAM,uBAAuB,eAAoC,CAAC;AACzE;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B;;OAEG;IACH,SAAS,IAAI,SAAS,EAAE,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;IAC5C;;OAEG;IACH,YAAY,IAAI,SAAS,EAAE,CAAC;IAE5B;;;OAGG;IACH,iBAAiB,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;IAE1C;;;OAGG;IACH,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9C;AACD,qBACa,oBAAqB,YAAW,gBAAgB;IAGzD,SAAS,CAAC,QAAQ,CAAC,kBAAkB,EAAE,oBAAoB,CAAC,SAAS,CAAC,CAAC;IAGvE,SAAS,CAAC,MAAM,EAAE,OAAO,CAAC;IAG1B,SAAS,CAAC,YAAY,EAAE,YAAY,CAAC;IAErC,SAA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