@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,66 +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.ChangeSetDecoratorService = exports.ChangeSetDecorator = void 0;
19
- const tslib_1 = require("tslib");
20
- const core_1 = require("@theia/core");
21
- const inversify_1 = require("@theia/core/shared/inversify");
22
- const debounce = require("@theia/core/shared/lodash.debounce");
23
- /**
24
- * A decorator for a change set element.
25
- * It allows to add additional information to the element, such as icons.
26
- */
27
- exports.ChangeSetDecorator = Symbol('ChangeSetDecorator');
28
- let ChangeSetDecoratorService = class ChangeSetDecoratorService {
29
- constructor() {
30
- this.onDidChangeDecorationsEmitter = new core_1.Emitter();
31
- this.onDidChangeDecorations = this.onDidChangeDecorationsEmitter.event;
32
- this.fireDidChangeDecorations = debounce(() => {
33
- this.onDidChangeDecorationsEmitter.fire(undefined);
34
- }, 150);
35
- }
36
- initialize() {
37
- this.contributions.getContributions().map(decorator => decorator.onDidChangeDecorations(this.fireDidChangeDecorations));
38
- }
39
- getDecorations(element) {
40
- const decorators = this.contributions.getContributions();
41
- const decorations = [];
42
- for (const decorator of decorators) {
43
- const decoration = decorator.decorate(element);
44
- if (decoration) {
45
- decorations.push(decoration);
46
- }
47
- }
48
- decorations.sort((a, b) => { var _a, _b; return ((_a = b.priority) !== null && _a !== void 0 ? _a : 0) - ((_b = a.priority) !== null && _b !== void 0 ? _b : 0); });
49
- return decorations;
50
- }
51
- getAdditionalInfoSuffixIcon(element) {
52
- var _a;
53
- const decorations = this.getDecorations(element);
54
- return (_a = decorations.find(d => d.additionalInfoSuffixIcon)) === null || _a === void 0 ? void 0 : _a.additionalInfoSuffixIcon;
55
- }
56
- };
57
- exports.ChangeSetDecoratorService = ChangeSetDecoratorService;
58
- tslib_1.__decorate([
59
- (0, inversify_1.inject)(core_1.ContributionProvider),
60
- (0, inversify_1.named)(exports.ChangeSetDecorator),
61
- tslib_1.__metadata("design:type", Object)
62
- ], ChangeSetDecoratorService.prototype, "contributions", void 0);
63
- exports.ChangeSetDecoratorService = ChangeSetDecoratorService = tslib_1.__decorate([
64
- (0, inversify_1.injectable)()
65
- ], ChangeSetDecoratorService);
66
- //# sourceMappingURL=change-set-decorator-service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"change-set-decorator-service.js","sourceRoot":"","sources":["../../src/browser/change-set-decorator-service.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,sCAAwE;AAExE,4DAAyE;AACzE,+DAAg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,CAAC,OAAO,CAAC,CAAC;QACjD,OAAO,MAAA,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,wBAAwB,CAAC,0CAAE,wBAAwB,CAAC;IACvF,CAAC;CACJ,CAAA;AAnCY,8DAAyB;AAMf;IADlB,IAAA,kBAAM,EAAC,2BAAoB,CAAC;IAAE,IAAA,iBAAK,EAAC,0BAAkB,CAAC;;gEACmB;oCANlE,yBAAyB;IADrC,IAAA,sBAAU,GAAE;GACA,yBAAyB,CAmCrC"}
@@ -1,7 +0,0 @@
1
- import { ChangeSetElementDeserializerContribution, ChangeSetElementDeserializerRegistry } from '../common/change-set-element-deserializer';
2
- import { ChangeSetFileElementFactory } from './change-set-file-element';
3
- export declare class ChangeSetFileElementDeserializerContribution implements ChangeSetElementDeserializerContribution {
4
- protected readonly fileElementFactory: ChangeSetFileElementFactory;
5
- registerDeserializers(registry: ChangeSetElementDeserializerRegistry): void;
6
- }
7
- //# sourceMappingURL=change-set-file-element-deserializer.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"change-set-file-element-deserializer.d.ts","sourceRoot":"","sources":["../../src/browser/change-set-file-element-deserializer.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,wCAAwC,EAAE,oCAAoC,EAAmC,MAAM,2CAA2C,CAAC;AAE5K,OAAO,EAAwB,2BAA2B,EAAE,MAAM,2BAA2B,CAAC;AAE9F,qBACa,4CAA6C,YAAW,wCAAwC;IAGzG,SAAS,CAAC,QAAQ,CAAC,kBAAkB,EAAE,2BAA2B,CAAC;IAEnE,qBAAqB,CAAC,QAAQ,EAAE,oCAAoC,GAAG,IAAI;CAgC9E"}
@@ -1,61 +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.ChangeSetFileElementDeserializerContribution = 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 change_set_file_element_1 = require("./change-set-file-element");
23
- let ChangeSetFileElementDeserializerContribution = class ChangeSetFileElementDeserializerContribution {
24
- registerDeserializers(registry) {
25
- registry.register({
26
- kind: 'file',
27
- deserialize: async (serialized, context) => {
28
- const fileData = serialized.data;
29
- // Create ChangeSetElementArgs with all the necessary data
30
- const args = {
31
- uri: new core_1.URI(serialized.uri),
32
- chatSessionId: context.chatSessionId,
33
- requestId: context.requestId,
34
- name: serialized.name,
35
- icon: serialized.icon,
36
- additionalInfo: serialized.additionalInfo,
37
- state: serialized.state,
38
- type: serialized.type,
39
- data: serialized.data,
40
- targetState: fileData === null || fileData === void 0 ? void 0 : fileData.targetState,
41
- originalState: fileData === null || fileData === void 0 ? void 0 : fileData.originalState,
42
- replacements: fileData === null || fileData === void 0 ? void 0 : fileData.replacements
43
- };
44
- // Create the element using the factory
45
- const element = this.fileElementFactory(args);
46
- // Ensure it's initialized before returning
47
- await element.ensureInitialized();
48
- return element;
49
- }
50
- });
51
- }
52
- };
53
- exports.ChangeSetFileElementDeserializerContribution = ChangeSetFileElementDeserializerContribution;
54
- tslib_1.__decorate([
55
- (0, inversify_1.inject)(change_set_file_element_1.ChangeSetFileElementFactory),
56
- tslib_1.__metadata("design:type", Function)
57
- ], ChangeSetFileElementDeserializerContribution.prototype, "fileElementFactory", void 0);
58
- exports.ChangeSetFileElementDeserializerContribution = ChangeSetFileElementDeserializerContribution = tslib_1.__decorate([
59
- (0, inversify_1.injectable)()
60
- ], ChangeSetFileElementDeserializerContribution);
61
- //# sourceMappingURL=change-set-file-element-deserializer.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"change-set-file-element-deserializer.js","sourceRoot":"","sources":["../../src/browser/change-set-file-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,4DAAkE;AAClE,sCAAkC;AAIlC,uEAA8F;AAGvF,IAAM,4CAA4C,GAAlD,MAAM,4CAA4C;IAKrD,qBAAqB,CAAC,QAA8C;QAChE,QAAQ,CAAC,QAAQ,CAAC;YACd,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,KAAK,EAAE,UAAwC,EAAE,OAAwC,EAA6B,EAAE;gBACjI,MAAM,QAAQ,GAAG,UAAU,CAAC,IAAwD,CAAC;gBAErF,0DAA0D;gBAC1D,MAAM,IAAI,GAAyB;oBAC/B,GAAG,EAAE,IAAI,UAAG,CAAC,UAAU,CAAC,GAAG,CAAC;oBAC5B,aAAa,EAAE,OAAO,CAAC,aAAa;oBACpC,SAAS,EAAE,OAAO,CAAC,SAAS;oBAC5B,IAAI,EAAE,UAAU,CAAC,IAAI;oBACrB,IAAI,EAAE,UAAU,CAAC,IAAI;oBACrB,cAAc,EAAE,UAAU,CAAC,cAAc;oBACzC,KAAK,EAAE,UAAU,CAAC,KAAK;oBACvB,IAAI,EAAE,UAAU,CAAC,IAAI;oBACrB,IAAI,EAAE,UAAU,CAAC,IAAI;oBACrB,WAAW,EAAE,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,WAAW;oBAClC,aAAa,EAAE,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,aAAa;oBACtC,YAAY,EAAE,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,YAAY;iBACvC,CAAC;gBAEF,uCAAuC;gBACvC,MAAM,OAAO,GAAG,IAAI,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;gBAE9C,2CAA2C;gBAC3C,MAAM,OAAO,CAAC,iBAAiB,EAAE,CAAC;gBAElC,OAAO,OAAO,CAAC;YACnB,CAAC;SACJ,CAAC,CAAC;IACP,CAAC;CACJ,CAAA;AArCY,oGAA4C;AAGlC;IADlB,IAAA,kBAAM,EAAC,qDAA2B,CAAC;;wFAC+B;uDAH1D,4CAA4C;IADxD,IAAA,sBAAU,GAAE;GACA,4CAA4C,CAqCxD"}
@@ -1,122 +0,0 @@
1
- import { ConfigurableInMemoryResources, ConfigurableMutableReferenceResource } from '@theia/ai-core';
2
- import { DisposableCollection, Emitter, URI } from '@theia/core';
3
- import { Replacement } from '@theia/core/lib/common/content-replacer';
4
- import { EditorPreferences } from '@theia/editor/lib/common/editor-preferences';
5
- import { FileSystemPreferences } from '@theia/filesystem/lib/common';
6
- import { FileService } from '@theia/filesystem/lib/browser/file-service';
7
- import { MonacoTextModelService } from '@theia/monaco/lib/browser/monaco-text-model-service';
8
- import { MonacoEditorModel } from '@theia/monaco/lib/browser/monaco-editor-model';
9
- import { ChangeSetElement } from '../common';
10
- import { SerializableChangeSetElement } from '../common/chat-model-serialization';
11
- import { ChangeSetFileService } from './change-set-file-service';
12
- import { Deferred } from '@theia/core/lib/common/promise-util';
13
- import { MonacoCodeActionService } from '@theia/monaco/lib/browser';
14
- export declare const ChangeSetFileElementFactory: unique symbol;
15
- export type ChangeSetFileElementFactory = (elementProps: ChangeSetElementArgs) => ChangeSetFileElement;
16
- type ChangeSetElementState = ChangeSetElement['state'];
17
- export declare const ChangeSetElementArgs: unique symbol;
18
- export interface ChangeSetElementArgs extends Partial<ChangeSetElement> {
19
- /** The URI of the element, expected to be unique within the same change set. */
20
- uri: URI;
21
- /** The id of the chat session containing this change set element. */
22
- chatSessionId: string;
23
- /** The id of the request with which this change set element is associated. */
24
- requestId: string;
25
- /**
26
- * The state of the file after the changes have been applied.
27
- * If `undefined`, there is no change.
28
- */
29
- targetState?: string;
30
- /**
31
- * The state before the change has been applied. If it is specified, we don't care
32
- * about the state of the original file on disk but just use the specified `originalState`.
33
- * If it isn't specified, we'll derived and observe the state from the file system.
34
- */
35
- originalState?: string;
36
- /**
37
- * An array of replacements used to create the new content for the targetState.
38
- * This is only available if the agent was able to provide replacements and we were able to apply them.
39
- */
40
- replacements?: Replacement[];
41
- }
42
- export declare class ChangeSetFileElement implements ChangeSetElement {
43
- static toReadOnlyUri(baseUri: URI, sessionId: string): URI;
44
- protected readonly elementProps: ChangeSetElementArgs;
45
- protected readonly changeSetFileService: ChangeSetFileService;
46
- protected readonly fileService: FileService;
47
- protected readonly inMemoryResources: ConfigurableInMemoryResources;
48
- protected readonly monacoTextModelService: MonacoTextModelService;
49
- protected readonly editorPreferences: EditorPreferences;
50
- protected readonly fileSystemPreferences: FileSystemPreferences;
51
- protected readonly codeActionService: MonacoCodeActionService;
52
- protected readonly toDispose: DisposableCollection;
53
- protected _state: ChangeSetElementState;
54
- private _originalContent;
55
- protected _initialized: boolean;
56
- protected _initializationPromise: Promise<void> | undefined;
57
- protected _targetStateWithCodeActions: string | undefined;
58
- protected codeActionDeferred?: Deferred<string>;
59
- protected readonly onDidChangeEmitter: Emitter<void>;
60
- readonly onDidChange: import("@theia/core").Event<void>;
61
- protected _readOnlyResource?: ConfigurableMutableReferenceResource;
62
- protected _changeResource?: ConfigurableMutableReferenceResource;
63
- init(): void;
64
- protected initializeAsync(): Promise<void>;
65
- /**
66
- * Ensures that the element is fully initialized before proceeding.
67
- * This includes loading the original content from the file system.
68
- */
69
- ensureInitialized(): Promise<void>;
70
- /**
71
- * Returns true if the element has been fully initialized.
72
- */
73
- get isInitialized(): boolean;
74
- protected obtainOriginalContent(): Promise<void>;
75
- protected getInMemoryUri(uri: URI): ConfigurableMutableReferenceResource;
76
- protected listenForOriginalFileChanges(): void;
77
- get uri(): URI;
78
- protected get readOnlyResource(): ConfigurableMutableReferenceResource;
79
- get readOnlyUri(): URI;
80
- protected get changeResource(): ConfigurableMutableReferenceResource;
81
- get changedUri(): URI;
82
- get name(): string;
83
- get icon(): string | undefined;
84
- get additionalInfo(): string | undefined;
85
- get state(): ChangeSetElementState;
86
- protected set state(value: ChangeSetElementState);
87
- get replacements(): Replacement[] | undefined;
88
- get type(): 'add' | 'modify' | 'delete' | undefined;
89
- get data(): {
90
- [key: string]: unknown;
91
- } | undefined;
92
- get originalContent(): string | undefined;
93
- /**
94
- * Gets the original content of the file asynchronously.
95
- * Ensures initialization is complete before returning the content.
96
- */
97
- getOriginalContent(): Promise<string | undefined>;
98
- get targetState(): string;
99
- get originalTargetState(): string;
100
- open(): Promise<void>;
101
- openChange(): Promise<void>;
102
- apply(contents?: string): Promise<void>;
103
- writeChanges(contents?: string): Promise<void>;
104
- /**
105
- * Applies changes using Monaco utilities, including loading the model for the base file URI,
106
- * setting the value to the intended state, and running code actions on save.
107
- */
108
- protected applyChangesWithMonaco(contents?: string): Promise<void>;
109
- protected applyCodeActionsToTargetState(): Promise<string>;
110
- protected doApplyCodeActionsToTargetState(): Promise<string>;
111
- /**
112
- * Applies formatting preferences like format on save, trim trailing whitespace, and insert final newline.
113
- */
114
- protected applyFormatting(model: MonacoEditorModel, languageId: string, uriStr: string): Promise<void>;
115
- onShow(): void;
116
- revert(): Promise<void>;
117
- confirm(verb: 'Apply' | 'Revert'): Promise<boolean>;
118
- toSerializable(): SerializableChangeSetElement;
119
- dispose(): void;
120
- }
121
- export {};
122
- //# sourceMappingURL=change-set-file-element.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"change-set-file-element.d.ts","sourceRoot":"","sources":["../../src/browser/change-set-file-element.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,6BAA6B,EAAE,oC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