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

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 (241) hide show
  1. package/lib/browser/agent-completion-notification-service.d.ts +69 -0
  2. package/lib/browser/agent-completion-notification-service.d.ts.map +1 -0
  3. package/lib/browser/agent-completion-notification-service.js +187 -0
  4. package/lib/browser/agent-completion-notification-service.js.map +1 -0
  5. package/lib/browser/ai-activation-service.d.ts +31 -0
  6. package/lib/browser/ai-activation-service.d.ts.map +1 -0
  7. package/lib/browser/ai-activation-service.js +56 -0
  8. package/lib/browser/ai-activation-service.js.map +1 -0
  9. package/lib/browser/ai-command-handler-factory.d.ts +4 -0
  10. package/lib/browser/ai-command-handler-factory.d.ts.map +1 -0
  11. package/lib/browser/ai-command-handler-factory.js +20 -0
  12. package/lib/browser/ai-command-handler-factory.js.map +1 -0
  13. package/lib/browser/ai-core-command-contribution.d.ts +8 -0
  14. package/lib/browser/ai-core-command-contribution.d.ts.map +1 -0
  15. package/lib/browser/ai-core-command-contribution.js +44 -0
  16. package/lib/browser/ai-core-command-contribution.js.map +1 -0
  17. package/lib/browser/ai-core-frontend-application-contribution.d.ts +10 -0
  18. package/lib/browser/ai-core-frontend-application-contribution.d.ts.map +1 -0
  19. package/lib/browser/ai-core-frontend-application-contribution.js +46 -0
  20. package/lib/browser/ai-core-frontend-application-contribution.js.map +1 -0
  21. package/lib/browser/ai-core-frontend-module.d.ts +4 -0
  22. package/lib/browser/ai-core-frontend-module.d.ts.map +1 -0
  23. package/lib/browser/ai-core-frontend-module.js +137 -0
  24. package/lib/browser/ai-core-frontend-module.js.map +1 -0
  25. package/lib/browser/ai-settings-service.d.ts +16 -0
  26. package/lib/browser/ai-settings-service.d.ts.map +1 -0
  27. package/lib/browser/ai-settings-service.js +78 -0
  28. package/lib/browser/ai-settings-service.js.map +1 -0
  29. package/lib/browser/ai-variable-uri-label-provider.d.ts +17 -0
  30. package/lib/browser/ai-variable-uri-label-provider.d.ts.map +1 -0
  31. package/lib/browser/ai-variable-uri-label-provider.js +85 -0
  32. package/lib/browser/ai-variable-uri-label-provider.js.map +1 -0
  33. package/lib/browser/ai-view-contribution.d.ts +14 -0
  34. package/lib/browser/ai-view-contribution.d.ts.map +1 -0
  35. package/lib/browser/ai-view-contribution.js +87 -0
  36. package/lib/browser/ai-view-contribution.js.map +1 -0
  37. package/lib/browser/file-variable-contribution.d.ts +23 -0
  38. package/lib/browser/file-variable-contribution.d.ts.map +1 -0
  39. package/lib/browser/file-variable-contribution.js +114 -0
  40. package/lib/browser/file-variable-contribution.js.map +1 -0
  41. package/lib/browser/frontend-language-model-alias-registry.d.ts +31 -0
  42. package/lib/browser/frontend-language-model-alias-registry.d.ts.map +1 -0
  43. package/lib/browser/frontend-language-model-alias-registry.js +170 -0
  44. package/lib/browser/frontend-language-model-alias-registry.js.map +1 -0
  45. package/lib/browser/frontend-language-model-registry.d.ts +49 -0
  46. package/lib/browser/frontend-language-model-registry.d.ts.map +1 -0
  47. package/lib/browser/frontend-language-model-registry.js +387 -0
  48. package/lib/browser/frontend-language-model-registry.js.map +1 -0
  49. package/lib/browser/frontend-language-model-registry.spec.d.ts +2 -0
  50. package/lib/browser/frontend-language-model-registry.spec.d.ts.map +1 -0
  51. package/lib/browser/frontend-language-model-registry.spec.js +248 -0
  52. package/lib/browser/frontend-language-model-registry.spec.js.map +1 -0
  53. package/lib/browser/frontend-language-model-service.d.ts +10 -0
  54. package/lib/browser/frontend-language-model-service.d.ts.map +1 -0
  55. package/lib/browser/frontend-language-model-service.js +66 -0
  56. package/lib/browser/frontend-language-model-service.js.map +1 -0
  57. package/lib/browser/frontend-prompt-customization-service.d.ts +271 -0
  58. package/lib/browser/frontend-prompt-customization-service.d.ts.map +1 -0
  59. package/lib/browser/frontend-prompt-customization-service.js +869 -0
  60. package/lib/browser/frontend-prompt-customization-service.js.map +1 -0
  61. package/lib/browser/frontend-prompt-customization-service.spec.d.ts +2 -0
  62. package/lib/browser/frontend-prompt-customization-service.spec.d.ts.map +1 -0
  63. package/lib/browser/frontend-prompt-customization-service.spec.js +127 -0
  64. package/lib/browser/frontend-prompt-customization-service.spec.js.map +1 -0
  65. package/lib/browser/frontend-variable-service.d.ts +61 -0
  66. package/lib/browser/frontend-variable-service.d.ts.map +1 -0
  67. package/lib/browser/frontend-variable-service.js +165 -0
  68. package/lib/browser/frontend-variable-service.js.map +1 -0
  69. package/lib/browser/index.d.ts +20 -0
  70. package/lib/browser/index.d.ts.map +1 -0
  71. package/lib/browser/index.js +38 -0
  72. package/lib/browser/index.js.map +1 -0
  73. package/lib/browser/open-editors-variable-contribution.d.ts +17 -0
  74. package/lib/browser/open-editors-variable-contribution.d.ts.map +1 -0
  75. package/lib/browser/open-editors-variable-contribution.js +84 -0
  76. package/lib/browser/open-editors-variable-contribution.js.map +1 -0
  77. package/lib/browser/os-notification-service.d.ts +96 -0
  78. package/lib/browser/os-notification-service.d.ts.map +1 -0
  79. package/lib/browser/os-notification-service.js +222 -0
  80. package/lib/browser/os-notification-service.js.map +1 -0
  81. package/lib/browser/prompttemplate-contribution.d.ts +29 -0
  82. package/lib/browser/prompttemplate-contribution.d.ts.map +1 -0
  83. package/lib/browser/prompttemplate-contribution.js +243 -0
  84. package/lib/browser/prompttemplate-contribution.js.map +1 -0
  85. package/lib/browser/prompttemplate-parser.d.ts +36 -0
  86. package/lib/browser/prompttemplate-parser.d.ts.map +1 -0
  87. package/lib/browser/prompttemplate-parser.js +94 -0
  88. package/lib/browser/prompttemplate-parser.js.map +1 -0
  89. package/lib/browser/theia-variable-contribution.d.ts +26 -0
  90. package/lib/browser/theia-variable-contribution.d.ts.map +1 -0
  91. package/lib/browser/theia-variable-contribution.js +146 -0
  92. package/lib/browser/theia-variable-contribution.js.map +1 -0
  93. package/lib/browser/token-usage-frontend-service-impl.d.ts +25 -0
  94. package/lib/browser/token-usage-frontend-service-impl.d.ts.map +1 -0
  95. package/lib/browser/token-usage-frontend-service-impl.js +138 -0
  96. package/lib/browser/token-usage-frontend-service-impl.js.map +1 -0
  97. package/lib/browser/token-usage-frontend-service.d.ts +33 -0
  98. package/lib/browser/token-usage-frontend-service.d.ts.map +1 -0
  99. package/lib/browser/token-usage-frontend-service.js +23 -0
  100. package/lib/browser/token-usage-frontend-service.js.map +1 -0
  101. package/lib/browser/window-blink-service.d.ts +41 -0
  102. package/lib/browser/window-blink-service.d.ts.map +1 -0
  103. package/lib/browser/window-blink-service.js +174 -0
  104. package/lib/browser/window-blink-service.js.map +1 -0
  105. package/lib/common/agent-preferences.d.ts +4 -0
  106. package/lib/common/agent-preferences.d.ts.map +1 -0
  107. package/lib/common/agent-preferences.js +84 -0
  108. package/lib/common/agent-preferences.js.map +1 -0
  109. package/lib/common/agent-service.d.ts +66 -0
  110. package/lib/common/agent-service.d.ts.map +1 -0
  111. package/lib/common/agent-service.js +104 -0
  112. package/lib/common/agent-service.js.map +1 -0
  113. package/lib/common/agent.d.ts +72 -0
  114. package/lib/common/agent.d.ts.map +1 -0
  115. package/lib/common/agent.js +20 -0
  116. package/lib/common/agent.js.map +1 -0
  117. package/lib/common/agents-variable-contribution.d.ts +19 -0
  118. package/lib/common/agents-variable-contribution.d.ts.map +1 -0
  119. package/lib/common/agents-variable-contribution.js +57 -0
  120. package/lib/common/agents-variable-contribution.js.map +1 -0
  121. package/lib/common/ai-core-preferences.d.ts +48 -0
  122. package/lib/common/ai-core-preferences.d.ts.map +1 -0
  123. package/lib/common/ai-core-preferences.js +204 -0
  124. package/lib/common/ai-core-preferences.js.map +1 -0
  125. package/lib/common/ai-variable-resource.d.ts +18 -0
  126. package/lib/common/ai-variable-resource.d.ts.map +1 -0
  127. package/lib/common/ai-variable-resource.js +103 -0
  128. package/lib/common/ai-variable-resource.js.map +1 -0
  129. package/lib/common/configurable-in-memory-resources.d.ts +47 -0
  130. package/lib/common/configurable-in-memory-resources.d.ts.map +1 -0
  131. package/lib/common/configurable-in-memory-resources.js +154 -0
  132. package/lib/common/configurable-in-memory-resources.js.map +1 -0
  133. package/lib/common/index.d.ts +22 -0
  134. package/lib/common/index.d.ts.map +1 -0
  135. package/lib/common/index.js +40 -0
  136. package/lib/common/index.js.map +1 -0
  137. package/lib/common/language-model-alias.d.ts +58 -0
  138. package/lib/common/language-model-alias.d.ts.map +1 -0
  139. package/lib/common/language-model-alias.js +20 -0
  140. package/lib/common/language-model-alias.js.map +1 -0
  141. package/lib/common/language-model-delegate.d.ts +25 -0
  142. package/lib/common/language-model-delegate.d.ts.map +1 -0
  143. package/lib/common/language-model-delegate.js +26 -0
  144. package/lib/common/language-model-delegate.js.map +1 -0
  145. package/lib/common/language-model-interaction-model.d.ts +74 -0
  146. package/lib/common/language-model-interaction-model.d.ts.map +1 -0
  147. package/lib/common/language-model-interaction-model.js +3 -0
  148. package/lib/common/language-model-interaction-model.js.map +1 -0
  149. package/lib/common/language-model-service.d.ts +38 -0
  150. package/lib/common/language-model-service.d.ts.map +1 -0
  151. package/lib/common/language-model-service.js +128 -0
  152. package/lib/common/language-model-service.js.map +1 -0
  153. package/lib/common/language-model-util.d.ts +17 -0
  154. package/lib/common/language-model-util.d.ts.map +1 -0
  155. package/lib/common/language-model-util.js +82 -0
  156. package/lib/common/language-model-util.js.map +1 -0
  157. package/lib/common/language-model.d.ts +285 -0
  158. package/lib/common/language-model.d.ts.map +1 -0
  159. package/lib/common/language-model.js +248 -0
  160. package/lib/common/language-model.js.map +1 -0
  161. package/lib/common/language-model.spec.d.ts +2 -0
  162. package/lib/common/language-model.spec.d.ts.map +1 -0
  163. package/lib/common/language-model.spec.js +62 -0
  164. package/lib/common/language-model.spec.js.map +1 -0
  165. package/lib/common/notification-types.d.ts +7 -0
  166. package/lib/common/notification-types.d.ts.map +1 -0
  167. package/lib/common/notification-types.js +29 -0
  168. package/lib/common/notification-types.js.map +1 -0
  169. package/lib/common/prompt-service-util.d.ts +8 -0
  170. package/lib/common/prompt-service-util.d.ts.map +1 -0
  171. package/lib/common/prompt-service-util.js +34 -0
  172. package/lib/common/prompt-service-util.js.map +1 -0
  173. package/lib/common/prompt-service.d.ts +467 -0
  174. package/lib/common/prompt-service.d.ts.map +1 -0
  175. package/lib/common/prompt-service.js +657 -0
  176. package/lib/common/prompt-service.js.map +1 -0
  177. package/lib/common/prompt-service.spec.d.ts +2 -0
  178. package/lib/common/prompt-service.spec.d.ts.map +1 -0
  179. package/lib/common/prompt-service.spec.js +431 -0
  180. package/lib/common/prompt-service.spec.js.map +1 -0
  181. package/lib/common/prompt-text.d.ts +8 -0
  182. package/lib/common/prompt-text.d.ts.map +1 -0
  183. package/lib/common/prompt-text.js +27 -0
  184. package/lib/common/prompt-text.js.map +1 -0
  185. package/lib/common/prompt-variable-contribution.d.ts +18 -0
  186. package/lib/common/prompt-variable-contribution.d.ts.map +1 -0
  187. package/lib/common/prompt-variable-contribution.js +207 -0
  188. package/lib/common/prompt-variable-contribution.js.map +1 -0
  189. package/lib/common/prompt-variable-contribution.spec.d.ts +2 -0
  190. package/lib/common/prompt-variable-contribution.spec.d.ts.map +1 -0
  191. package/lib/common/prompt-variable-contribution.spec.js +163 -0
  192. package/lib/common/prompt-variable-contribution.spec.js.map +1 -0
  193. package/lib/common/protocol.d.ts +25 -0
  194. package/lib/common/protocol.d.ts.map +1 -0
  195. package/lib/common/protocol.js +22 -0
  196. package/lib/common/protocol.js.map +1 -0
  197. package/lib/common/settings-service.d.ts +29 -0
  198. package/lib/common/settings-service.d.ts.map +1 -0
  199. package/lib/common/settings-service.js +5 -0
  200. package/lib/common/settings-service.js.map +1 -0
  201. package/lib/common/today-variable-contribution.d.ts +17 -0
  202. package/lib/common/today-variable-contribution.d.ts.map +1 -0
  203. package/lib/common/today-variable-contribution.js +68 -0
  204. package/lib/common/today-variable-contribution.js.map +1 -0
  205. package/lib/common/token-usage-service.d.ts +43 -0
  206. package/lib/common/token-usage-service.d.ts.map +1 -0
  207. package/lib/common/token-usage-service.js +20 -0
  208. package/lib/common/token-usage-service.js.map +1 -0
  209. package/lib/common/tool-invocation-registry.d.ts +66 -0
  210. package/lib/common/tool-invocation-registry.d.ts.map +1 -0
  211. package/lib/common/tool-invocation-registry.js +101 -0
  212. package/lib/common/tool-invocation-registry.js.map +1 -0
  213. package/lib/common/variable-service.d.ts +172 -0
  214. package/lib/common/variable-service.d.ts.map +1 -0
  215. package/lib/common/variable-service.js +287 -0
  216. package/lib/common/variable-service.js.map +1 -0
  217. package/lib/common/variable-service.spec.d.ts +2 -0
  218. package/lib/common/variable-service.spec.d.ts.map +1 -0
  219. package/lib/common/variable-service.spec.js +237 -0
  220. package/lib/common/variable-service.spec.js.map +1 -0
  221. package/lib/node/ai-core-backend-module.d.ts +4 -0
  222. package/lib/node/ai-core-backend-module.d.ts.map +1 -0
  223. package/lib/node/ai-core-backend-module.js +65 -0
  224. package/lib/node/ai-core-backend-module.js.map +1 -0
  225. package/lib/node/backend-language-model-registry.d.ts +13 -0
  226. package/lib/node/backend-language-model-registry.d.ts.map +1 -0
  227. package/lib/node/backend-language-model-registry.js +68 -0
  228. package/lib/node/backend-language-model-registry.js.map +1 -0
  229. package/lib/node/language-model-frontend-delegate.d.ts +18 -0
  230. package/lib/node/language-model-frontend-delegate.d.ts.map +1 -0
  231. package/lib/node/language-model-frontend-delegate.js +109 -0
  232. package/lib/node/language-model-frontend-delegate.js.map +1 -0
  233. package/lib/node/token-usage-service-impl.d.ts +23 -0
  234. package/lib/node/token-usage-service-impl.d.ts.map +1 -0
  235. package/lib/node/token-usage-service-impl.js +78 -0
  236. package/lib/node/token-usage-service-impl.js.map +1 -0
  237. package/lib/node/tool-request-parameters.spec.d.ts +2 -0
  238. package/lib/node/tool-request-parameters.spec.d.ts.map +1 -0
  239. package/lib/node/tool-request-parameters.spec.js +116 -0
  240. package/lib/node/tool-request-parameters.spec.js.map +1 -0
  241. package/package.json +9 -9
@@ -0,0 +1,657 @@
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.PromptServiceImpl = exports.PromptService = exports.PromptFragmentCustomizationService = exports.CustomAgentDescription = exports.isCustomizedPromptFragment = exports.isBasePromptFragment = 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 variable_service_1 = require("./variable-service");
23
+ const tool_invocation_registry_1 = require("./tool-invocation-registry");
24
+ const language_model_util_1 = require("./language-model-util");
25
+ const prompt_service_util_1 = require("./prompt-service-util");
26
+ const settings_service_1 = require("./settings-service");
27
+ /**
28
+ * Type guard to check if a PromptFragment is a built-in fragment (not customized)
29
+ * @param fragment The fragment to check
30
+ * @returns True if the fragment is a basic BasePromptFragment (not customized)
31
+ */
32
+ function isBasePromptFragment(fragment) {
33
+ return !('customizationId' in fragment && 'priority' in fragment);
34
+ }
35
+ exports.isBasePromptFragment = isBasePromptFragment;
36
+ /**
37
+ * Type guard to check if a PromptFragment is a CustomizedPromptFragment
38
+ * @param fragment The fragment to check
39
+ * @returns True if the fragment is a CustomizedPromptFragment
40
+ */
41
+ function isCustomizedPromptFragment(fragment) {
42
+ return 'customizationId' in fragment && 'priority' in fragment;
43
+ }
44
+ exports.isCustomizedPromptFragment = isCustomizedPromptFragment;
45
+ var CustomAgentDescription;
46
+ (function (CustomAgentDescription) {
47
+ /**
48
+ * Type guard to check if an object is a CustomAgentDescription
49
+ */
50
+ function is(entry) {
51
+ // eslint-disable-next-line no-null/no-null
52
+ return typeof entry === 'object' && entry !== null
53
+ && 'id' in entry && typeof entry.id === 'string'
54
+ && 'name' in entry && typeof entry.name === 'string'
55
+ && 'description' in entry && typeof entry.description === 'string'
56
+ && 'prompt' in entry && typeof entry.prompt === 'string'
57
+ && 'defaultLLM' in entry && typeof entry.defaultLLM === 'string';
58
+ }
59
+ CustomAgentDescription.is = is;
60
+ /**
61
+ * Compares two CustomAgentDescription objects for equality
62
+ */
63
+ function equals(a, b) {
64
+ return a.id === b.id && a.name === b.name && a.description === b.description && a.prompt === b.prompt && a.defaultLLM === b.defaultLLM;
65
+ }
66
+ CustomAgentDescription.equals = equals;
67
+ })(CustomAgentDescription || (exports.CustomAgentDescription = CustomAgentDescription = {}));
68
+ /**
69
+ * Service responsible for customizing prompt fragments
70
+ */
71
+ exports.PromptFragmentCustomizationService = Symbol('PromptFragmentCustomizationService');
72
+ /**
73
+ * Service for managing and resolving prompt fragments
74
+ */
75
+ exports.PromptService = Symbol('PromptService');
76
+ let PromptServiceImpl = class PromptServiceImpl {
77
+ constructor() {
78
+ // Map to store selected variant for each prompt variant set (key: promptVariantSetId, value: variantId)
79
+ this._selectedVariantsMap = new Map();
80
+ // Collection of built-in prompt fragments
81
+ this._builtInFragments = [];
82
+ // Map to store prompt variants sets (key: promptVariantSetId, value: array of variantIds)
83
+ this._promptVariantSetsMap = new Map();
84
+ // Map to store default variant for each prompt variant set (key: promptVariantSetId, value: variantId)
85
+ this._defaultVariantsMap = new Map();
86
+ // Event emitter for prompt changes
87
+ this._onPromptsChangeEmitter = new core_1.Emitter();
88
+ this.onPromptsChange = this._onPromptsChangeEmitter.event;
89
+ // Event emitter for selected variant changes
90
+ this._onSelectedVariantChangeEmitter = new core_1.Emitter();
91
+ this.onSelectedVariantChange = this._onSelectedVariantChangeEmitter.event;
92
+ this.toDispose = new core_1.DisposableCollection();
93
+ }
94
+ fireOnPromptsChangeDebounced() {
95
+ if (this.promptChangeDebounceTimer) {
96
+ clearTimeout(this.promptChangeDebounceTimer);
97
+ }
98
+ this.promptChangeDebounceTimer = setTimeout(() => {
99
+ this._onPromptsChangeEmitter.fire();
100
+ }, 300);
101
+ }
102
+ init() {
103
+ if (this.customizationService) {
104
+ this.toDispose.pushAll([
105
+ this.customizationService.onDidChangePromptFragmentCustomization(() => {
106
+ this.fireOnPromptsChangeDebounced();
107
+ }),
108
+ this.customizationService.onDidChangeCustomAgents(() => {
109
+ this.fireOnPromptsChangeDebounced();
110
+ })
111
+ ]);
112
+ }
113
+ if (this.settingsService) {
114
+ this.recalculateSelectedVariantsMap();
115
+ this.toDispose.push(this.settingsService.onDidChange(async () => {
116
+ await this.recalculateSelectedVariantsMap();
117
+ }));
118
+ }
119
+ }
120
+ /**
121
+ * Recalculates the selected variants map for all variant sets and fires the onSelectedVariantChangeEmitter
122
+ * if the selectedVariants field has changed.
123
+ */
124
+ async recalculateSelectedVariantsMap() {
125
+ if (!this.settingsService) {
126
+ return;
127
+ }
128
+ const agentSettingsMap = await this.settingsService.getSettings();
129
+ const newSelectedVariants = new Map();
130
+ for (const agentSettings of Object.values(agentSettingsMap)) {
131
+ if (agentSettings.selectedVariants) {
132
+ for (const [variantSetId, variantId] of Object.entries(agentSettings.selectedVariants)) {
133
+ if (!newSelectedVariants.has(variantSetId)) {
134
+ newSelectedVariants.set(variantSetId, variantId);
135
+ }
136
+ }
137
+ }
138
+ }
139
+ // Compare with the old map and fire events for changes and removed variant sets
140
+ for (const [variantSetId, newVariantId] of newSelectedVariants.entries()) {
141
+ const oldVariantId = this._selectedVariantsMap.get(variantSetId);
142
+ if (oldVariantId !== newVariantId) {
143
+ this._onSelectedVariantChangeEmitter.fire({ promptVariantSetId: variantSetId, variantId: newVariantId });
144
+ }
145
+ }
146
+ for (const oldVariantSetId of this._selectedVariantsMap.keys()) {
147
+ if (!newSelectedVariants.has(oldVariantSetId)) {
148
+ this._onSelectedVariantChangeEmitter.fire({ promptVariantSetId: oldVariantSetId, variantId: undefined });
149
+ }
150
+ }
151
+ this._selectedVariantsMap = newSelectedVariants;
152
+ // Also fire a full prompts change, because other fields (like effectiveVariantId) might have changed
153
+ this.fireOnPromptsChangeDebounced();
154
+ }
155
+ // ===== Fragment Retrieval Methods =====
156
+ /**
157
+ * Finds a built-in fragment by its ID
158
+ * @param fragmentId The ID of the fragment to find
159
+ * @returns The built-in fragment or undefined if not found
160
+ */
161
+ findBuiltInFragmentById(fragmentId) {
162
+ return this._builtInFragments.find(fragment => fragment.id === fragmentId);
163
+ }
164
+ findBuiltInFragmentByName(fragmentName) {
165
+ return this._builtInFragments.find(fragment => fragment.commandName === fragmentName);
166
+ }
167
+ getRawPromptFragment(fragmentId) {
168
+ var _a;
169
+ if ((_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.isPromptFragmentCustomized(fragmentId)) {
170
+ const customizedFragment = this.customizationService.getActivePromptFragmentCustomization(fragmentId);
171
+ if (customizedFragment !== undefined) {
172
+ return customizedFragment;
173
+ }
174
+ }
175
+ return this.getBuiltInRawPrompt(fragmentId);
176
+ }
177
+ getBuiltInRawPrompt(fragmentId) {
178
+ var _a;
179
+ return (_a = this.findBuiltInFragmentById(fragmentId)) !== null && _a !== void 0 ? _a : this.findBuiltInFragmentByName(fragmentId);
180
+ }
181
+ getPromptFragment(fragmentId) {
182
+ const rawFragment = this.getRawPromptFragment(fragmentId);
183
+ if (!rawFragment) {
184
+ return undefined;
185
+ }
186
+ return {
187
+ ...rawFragment,
188
+ template: this.stripComments(rawFragment.template)
189
+ };
190
+ }
191
+ getPromptFragmentByCommandName(commandName) {
192
+ // First check customized fragments
193
+ if (this.customizationService) {
194
+ const customizedIds = this.customizationService.getCustomizedPromptFragmentIds();
195
+ for (const fragmentId of customizedIds) {
196
+ const fragment = this.customizationService.getActivePromptFragmentCustomization(fragmentId);
197
+ if ((fragment === null || fragment === void 0 ? void 0 : fragment.isCommand) && fragment.commandName === commandName) {
198
+ return fragment;
199
+ }
200
+ }
201
+ }
202
+ // Then check built-in fragments
203
+ return this._builtInFragments.find(fragment => fragment.isCommand && fragment.commandName === commandName);
204
+ }
205
+ /**
206
+ * Strips comments from a template string
207
+ * @param templateText The template text to process
208
+ * @returns Template text with comments removed
209
+ */
210
+ stripComments(templateText) {
211
+ const commentRegex = /^\s*{{!--[\s\S]*?--}}\s*\n?/;
212
+ return commentRegex.test(templateText) ? templateText.replace(commentRegex, '').trimStart() : templateText;
213
+ }
214
+ getSelectedVariantId(variantSetId) {
215
+ return this._selectedVariantsMap.get(variantSetId);
216
+ }
217
+ getEffectiveVariantId(variantSetId) {
218
+ const selectedVariantId = this.getSelectedVariantId(variantSetId);
219
+ // Check if the selected variant actually exists
220
+ if (selectedVariantId) {
221
+ const variantIds = this.getVariantIds(variantSetId);
222
+ if (!variantIds.includes(selectedVariantId)) {
223
+ this.logger.warn(`Selected variant '${selectedVariantId}' for prompt set '${variantSetId}' does not exist. Falling back to default variant.`);
224
+ }
225
+ else {
226
+ return selectedVariantId;
227
+ }
228
+ }
229
+ // Fall back to default variant
230
+ const defaultVariantId = this.getDefaultVariantId(variantSetId);
231
+ if (defaultVariantId) {
232
+ const variantIds = this.getVariantIds(variantSetId);
233
+ if (!variantIds.includes(defaultVariantId)) {
234
+ this.logger.error(`Default variant '${defaultVariantId}' for prompt set '${variantSetId}' does not exist.`);
235
+ return undefined;
236
+ }
237
+ return defaultVariantId;
238
+ }
239
+ // No valid selected or default variant
240
+ if (this.getVariantIds(variantSetId).length > 0) {
241
+ this.logger.error(`No valid selected or default variant found for prompt set '${variantSetId}'.`);
242
+ }
243
+ return undefined;
244
+ }
245
+ resolvePotentialSystemPrompt(promptFragmentId) {
246
+ if (this._promptVariantSetsMap.has(promptFragmentId)) {
247
+ // This is a systemPrompt find the effective variant
248
+ const effectiveVariantId = this.getEffectiveVariantId(promptFragmentId);
249
+ if (effectiveVariantId === undefined) {
250
+ return undefined;
251
+ }
252
+ return this.getPromptFragment(effectiveVariantId);
253
+ }
254
+ return this.getPromptFragment(promptFragmentId);
255
+ }
256
+ // ===== Fragment Resolution Methods =====
257
+ async getResolvedPromptFragment(systemOrFragmentId, args, context) {
258
+ const promptFragment = this.resolvePotentialSystemPrompt(systemOrFragmentId);
259
+ if (promptFragment === undefined) {
260
+ return undefined;
261
+ }
262
+ // First resolve variables and arguments
263
+ let resolvedTemplate = promptFragment.template;
264
+ const variableAndArgResolutions = await this.resolveVariablesAndArgs(promptFragment.template, args, context);
265
+ variableAndArgResolutions.replacements.forEach(replacement => resolvedTemplate = resolvedTemplate.replace(replacement.placeholder, replacement.value));
266
+ // Then resolve function references with already resolved variables and arguments
267
+ // This allows to resolve function references contained in resolved variables (e.g. prompt fragments)
268
+ const functionMatches = (0, prompt_service_util_1.matchFunctionsRegEx)(resolvedTemplate);
269
+ const functionMap = new Map();
270
+ const functionReplacements = functionMatches.map(match => {
271
+ var _a;
272
+ const completeText = match[0];
273
+ const functionId = match[1];
274
+ const toolRequest = (_a = this.toolInvocationRegistry) === null || _a === void 0 ? void 0 : _a.getFunction(functionId);
275
+ if (toolRequest) {
276
+ functionMap.set(toolRequest.id, toolRequest);
277
+ }
278
+ return {
279
+ placeholder: completeText,
280
+ value: toolRequest ? (0, language_model_util_1.toolRequestToPromptText)(toolRequest) : completeText
281
+ };
282
+ });
283
+ functionReplacements.forEach(replacement => resolvedTemplate = resolvedTemplate.replace(replacement.placeholder, replacement.value));
284
+ return {
285
+ id: systemOrFragmentId,
286
+ text: resolvedTemplate,
287
+ functionDescriptions: functionMap.size > 0 ? functionMap : undefined,
288
+ variables: variableAndArgResolutions.resolvedVariables
289
+ };
290
+ }
291
+ async getResolvedPromptFragmentWithoutFunctions(systemOrFragmentId, args, context, resolveVariable) {
292
+ const promptFragment = this.resolvePotentialSystemPrompt(systemOrFragmentId);
293
+ if (promptFragment === undefined) {
294
+ return undefined;
295
+ }
296
+ const resolutions = await this.resolveVariablesAndArgs(promptFragment.template, args, context, resolveVariable);
297
+ let resolvedTemplate = promptFragment.template;
298
+ resolutions.replacements.forEach(replacement => resolvedTemplate = resolvedTemplate.replace(replacement.placeholder, replacement.value));
299
+ return {
300
+ id: systemOrFragmentId,
301
+ text: resolvedTemplate,
302
+ variables: resolutions.resolvedVariables
303
+ };
304
+ }
305
+ /**
306
+ * Calculates all variable and argument replacements for an unresolved template.
307
+ *
308
+ * @param templateText the unresolved template text
309
+ * @param args the object with placeholders, mapping the placeholder key to the value
310
+ * @param context the {@link AIVariableContext} to use during variable resolution
311
+ * @param resolveVariable the variable resolving method. Fall back to using the {@link AIVariableService} if not given.
312
+ * @returns Object containing replacements and resolved variables
313
+ */
314
+ async resolveVariablesAndArgs(templateText, args, context, resolveVariable) {
315
+ var _a, _b, _c;
316
+ const variableMatches = (0, prompt_service_util_1.matchVariablesRegEx)(templateText);
317
+ const variableCache = (0, variable_service_1.createAIResolveVariableCache)();
318
+ const replacementsList = [];
319
+ const resolvedVariablesSet = new Set();
320
+ for (const match of variableMatches) {
321
+ const placeholderText = match[0];
322
+ const variableAndArg = match[1];
323
+ let variableName = variableAndArg;
324
+ let argument;
325
+ const parts = variableAndArg.split(':', 2);
326
+ if (parts.length > 1) {
327
+ variableName = parts[0];
328
+ argument = parts[1];
329
+ }
330
+ let replacementValue;
331
+ if (args && args[variableAndArg] !== undefined) {
332
+ replacementValue = String(args[variableAndArg]);
333
+ }
334
+ else {
335
+ const variableToResolve = { variable: variableName, arg: argument };
336
+ const resolvedVariable = resolveVariable
337
+ ? await resolveVariable(variableToResolve)
338
+ : await ((_a = this.variableService) === null || _a === void 0 ? void 0 : _a.resolveVariable(variableToResolve, context !== null && context !== void 0 ? context : {}, variableCache));
339
+ // Track resolved variable and its dependencies in all resolved variables
340
+ if (resolvedVariable) {
341
+ resolvedVariablesSet.add(resolvedVariable);
342
+ (_b = resolvedVariable.allResolvedDependencies) === null || _b === void 0 ? void 0 : _b.forEach(v => resolvedVariablesSet.add(v));
343
+ }
344
+ replacementValue = String((_c = resolvedVariable === null || resolvedVariable === void 0 ? void 0 : resolvedVariable.value) !== null && _c !== void 0 ? _c : placeholderText);
345
+ }
346
+ replacementsList.push({ placeholder: placeholderText, value: replacementValue });
347
+ }
348
+ return {
349
+ replacements: replacementsList,
350
+ resolvedVariables: Array.from(resolvedVariablesSet)
351
+ };
352
+ }
353
+ // ===== Fragment Collection Management Methods =====
354
+ getAllPromptFragments() {
355
+ const fragmentsMap = new Map();
356
+ if (this.customizationService) {
357
+ const customizationIds = this.customizationService.getCustomizedPromptFragmentIds();
358
+ customizationIds.forEach(fragmentId => {
359
+ const customizations = this.customizationService.getAllCustomizations(fragmentId);
360
+ if (customizations.length > 0) {
361
+ fragmentsMap.set(fragmentId, customizations);
362
+ }
363
+ });
364
+ }
365
+ // Add all built-in fragments
366
+ for (const fragment of this._builtInFragments) {
367
+ if (fragmentsMap.has(fragment.id)) {
368
+ fragmentsMap.get(fragment.id).push(fragment);
369
+ }
370
+ else {
371
+ fragmentsMap.set(fragment.id, [fragment]);
372
+ }
373
+ }
374
+ return fragmentsMap;
375
+ }
376
+ getActivePromptFragments() {
377
+ var _a;
378
+ const activeFragments = [...this._builtInFragments];
379
+ if (this.customizationService) {
380
+ // Fetch all customized fragment IDs once
381
+ const customizedIds = this.customizationService.getCustomizedPromptFragmentIds();
382
+ // For each customized ID, get the active customization
383
+ for (const fragmentId of customizedIds) {
384
+ const customFragment = (_a = this.customizationService) === null || _a === void 0 ? void 0 : _a.getActivePromptFragmentCustomization(fragmentId);
385
+ if (customFragment) {
386
+ // Find and replace existing entry with the same ID instead of just adding
387
+ const existingIndex = activeFragments.findIndex(fragment => fragment.id === fragmentId);
388
+ if (existingIndex !== -1) {
389
+ // Replace existing fragment
390
+ activeFragments[existingIndex] = customFragment;
391
+ }
392
+ else {
393
+ // Add new fragment if no existing one found
394
+ activeFragments.push(customFragment);
395
+ }
396
+ }
397
+ }
398
+ }
399
+ return activeFragments;
400
+ }
401
+ removePromptFragment(fragmentId) {
402
+ const index = this._builtInFragments.findIndex(fragment => fragment.id === fragmentId);
403
+ if (index !== -1) {
404
+ this._builtInFragments.splice(index, 1);
405
+ }
406
+ // Remove any variant references
407
+ for (const [promptVariantSetId, variants] of this._promptVariantSetsMap.entries()) {
408
+ if (variants.includes(fragmentId)) {
409
+ this.removeFragmentVariant(promptVariantSetId, fragmentId);
410
+ }
411
+ }
412
+ // Clean up default variants map if needed
413
+ if (this._defaultVariantsMap.has(fragmentId)) {
414
+ this._defaultVariantsMap.delete(fragmentId);
415
+ }
416
+ // Look for this fragmentId as a variant in default variants and remove if found
417
+ for (const [promptVariantSetId, defaultVariantId] of this._defaultVariantsMap.entries()) {
418
+ if (defaultVariantId === fragmentId) {
419
+ this._defaultVariantsMap.delete(promptVariantSetId);
420
+ }
421
+ }
422
+ this.fireOnPromptsChangeDebounced();
423
+ }
424
+ getVariantIds(variantSetId) {
425
+ const builtInVariants = this._promptVariantSetsMap.get(variantSetId) || [];
426
+ // Check for custom variants from customization service
427
+ if (this.customizationService) {
428
+ const allCustomizedIds = this.customizationService.getCustomizedPromptFragmentIds();
429
+ // Find customizations that start with the variant set ID
430
+ // These are considered variants of this variant set
431
+ // Only include IDs that are not the variant set ID itself, start with the variant set ID,
432
+ // and are not customizations of existing variants in this set
433
+ const customVariants = allCustomizedIds.filter(id => id !== variantSetId &&
434
+ id.startsWith(variantSetId) &&
435
+ !builtInVariants.includes(id));
436
+ if (customVariants.length > 0) {
437
+ // Combine built-in variants with custom variants, without modifying the internal state
438
+ return [...builtInVariants, ...customVariants];
439
+ }
440
+ }
441
+ return builtInVariants;
442
+ }
443
+ getDefaultVariantId(promptVariantSetId) {
444
+ return this._defaultVariantsMap.get(promptVariantSetId);
445
+ }
446
+ getPromptVariantSets() {
447
+ const result = new Map(this._promptVariantSetsMap);
448
+ // Check for custom variants from customization service
449
+ if (this.customizationService) {
450
+ const allCustomizedIds = this.customizationService.getCustomizedPromptFragmentIds();
451
+ // Add custom variants to existing variant sets
452
+ for (const [variantSetId, variants] of result.entries()) {
453
+ // Filter out customized fragments that are just customizations of existing variants
454
+ // so we don't treat them as separate variants themselves
455
+ // Only include IDs that are not the variant set ID itself, start with the variant set ID,
456
+ // and are not customizations of existing variants in this set
457
+ const customVariants = allCustomizedIds.filter(id => id !== variantSetId &&
458
+ id.startsWith(variantSetId) &&
459
+ !variants.includes(id));
460
+ if (customVariants.length > 0) {
461
+ // Create a new array without modifying the original
462
+ result.set(variantSetId, [...variants, ...customVariants]);
463
+ }
464
+ }
465
+ }
466
+ return result;
467
+ }
468
+ addBuiltInPromptFragment(promptFragment, promptVariantSetId, isDefault = false) {
469
+ const existingIndex = this._builtInFragments.findIndex(fragment => fragment.id === promptFragment.id);
470
+ if (existingIndex !== -1) {
471
+ // Replace existing fragment with the same ID
472
+ this._builtInFragments[existingIndex] = promptFragment;
473
+ }
474
+ else {
475
+ // Add new fragment
476
+ this._builtInFragments.push(promptFragment);
477
+ }
478
+ // Validate command name uniqueness if this is a command
479
+ if (promptFragment.isCommand && promptFragment.commandName) {
480
+ const commandName = promptFragment.commandName;
481
+ const duplicates = this._builtInFragments.filter(f => f.isCommand && f.commandName === commandName);
482
+ if (duplicates.length > 0) {
483
+ this.logger.warn(`Command name '${commandName}' is used by multiple fragments: ${promptFragment.id} and ${duplicates.map(d => d.id).join(', ')}`);
484
+ }
485
+ }
486
+ // If this is a variant of a prompt variant set, record it in the variants map
487
+ if (promptVariantSetId) {
488
+ this.addFragmentVariant(promptVariantSetId, promptFragment.id, isDefault);
489
+ }
490
+ this.fireOnPromptsChangeDebounced();
491
+ }
492
+ // ===== Variant Management Methods =====
493
+ /**
494
+ * Adds a variant ID to the fragment variants map
495
+ * @param promptVariantSetId The prompt variant set id
496
+ * @param variantId The variant ID to add
497
+ * @param isDefault Whether this variant should be the default for the prompt variant set (defaults to false)
498
+ */
499
+ addFragmentVariant(promptVariantSetId, variantId, isDefault = false) {
500
+ if (!this._promptVariantSetsMap.has(promptVariantSetId)) {
501
+ this._promptVariantSetsMap.set(promptVariantSetId, []);
502
+ }
503
+ const variants = this._promptVariantSetsMap.get(promptVariantSetId);
504
+ if (!variants.includes(variantId)) {
505
+ variants.push(variantId);
506
+ }
507
+ if (isDefault) {
508
+ this._defaultVariantsMap.set(promptVariantSetId, variantId);
509
+ }
510
+ }
511
+ /**
512
+ * Removes a variant ID from the fragment variants map
513
+ * @param promptVariantSetId The prompt variant set id
514
+ * @param variantId The variant ID to remove
515
+ */
516
+ removeFragmentVariant(promptVariantSetId, variantId) {
517
+ if (!this._promptVariantSetsMap.has(promptVariantSetId)) {
518
+ return;
519
+ }
520
+ const variants = this._promptVariantSetsMap.get(promptVariantSetId);
521
+ const index = variants.indexOf(variantId);
522
+ if (index !== -1) {
523
+ variants.splice(index, 1);
524
+ // Remove the key if no variants left
525
+ if (variants.length === 0) {
526
+ this._promptVariantSetsMap.delete(promptVariantSetId);
527
+ }
528
+ }
529
+ }
530
+ async updateSelectedVariantId(agentId, promptVariantSetId, newVariant) {
531
+ if (!this.settingsService) {
532
+ return;
533
+ }
534
+ const defaultVariantId = this.getDefaultVariantId(promptVariantSetId);
535
+ const agentSettings = await this.settingsService.getAgentSettings(agentId);
536
+ const selectedVariants = (agentSettings === null || agentSettings === void 0 ? void 0 : agentSettings.selectedVariants) || {};
537
+ const updatedVariants = { ...selectedVariants };
538
+ if (newVariant === defaultVariantId) {
539
+ delete updatedVariants[promptVariantSetId];
540
+ }
541
+ else {
542
+ updatedVariants[promptVariantSetId] = newVariant;
543
+ }
544
+ await this.settingsService.updateAgentSettings(agentId, {
545
+ selectedVariants: updatedVariants,
546
+ });
547
+ // Emit the selected variant change event
548
+ this._onSelectedVariantChangeEmitter.fire({ promptVariantSetId, variantId: newVariant });
549
+ }
550
+ // ===== Customization Service Delegation Methods =====
551
+ async createCustomization(fragmentId) {
552
+ if (this.customizationService) {
553
+ await this.customizationService.createPromptFragmentCustomization(fragmentId);
554
+ }
555
+ }
556
+ async createBuiltInCustomization(fragmentId) {
557
+ if (this.customizationService) {
558
+ const builtInTemplate = this.findBuiltInFragmentById(fragmentId);
559
+ await this.customizationService.createBuiltInPromptFragmentCustomization(fragmentId, builtInTemplate === null || builtInTemplate === void 0 ? void 0 : builtInTemplate.template);
560
+ }
561
+ }
562
+ async editCustomization(fragmentId, customizationId) {
563
+ if (this.customizationService) {
564
+ await this.customizationService.editPromptFragmentCustomization(fragmentId, customizationId);
565
+ }
566
+ }
567
+ async removeCustomization(fragmentId, customizationId) {
568
+ if (this.customizationService) {
569
+ await this.customizationService.removePromptFragmentCustomization(fragmentId, customizationId);
570
+ }
571
+ }
572
+ async resetAllToBuiltIn() {
573
+ if (this.customizationService) {
574
+ for (const fragment of this._builtInFragments) {
575
+ await this.customizationService.removeAllPromptFragmentCustomizations(fragment.id);
576
+ }
577
+ }
578
+ }
579
+ async resetToBuiltIn(fragmentId) {
580
+ const builtIn = this._builtInFragments.find(b => b.id === fragmentId);
581
+ // Only reset this if it has a built-in, otherwise a delete would be the correct operation
582
+ if (this.customizationService && builtIn) {
583
+ await this.customizationService.removeAllPromptFragmentCustomizations(fragmentId);
584
+ }
585
+ }
586
+ async resetToCustomization(fragmentId, customizationId) {
587
+ if (this.customizationService) {
588
+ await this.customizationService.resetToCustomization(fragmentId, customizationId);
589
+ }
590
+ }
591
+ async getCustomizationDescription(fragmentId, customizationId) {
592
+ if (!this.customizationService) {
593
+ return undefined;
594
+ }
595
+ return await this.customizationService.getPromptFragmentCustomizationDescription(fragmentId, customizationId);
596
+ }
597
+ async getCustomizationType(fragmentId, customizationId) {
598
+ if (!this.customizationService) {
599
+ return undefined;
600
+ }
601
+ return await this.customizationService.getPromptFragmentCustomizationType(fragmentId, customizationId);
602
+ }
603
+ getTemplateIDFromResource(resourceId) {
604
+ if (this.customizationService) {
605
+ return this.customizationService.getPromptFragmentIDFromResource(resourceId);
606
+ }
607
+ return undefined;
608
+ }
609
+ async editBuiltInCustomization(fragmentId) {
610
+ if (this.customizationService) {
611
+ const builtInTemplate = this.findBuiltInFragmentById(fragmentId);
612
+ await this.customizationService.editBuiltInPromptFragmentCustomization(fragmentId, builtInTemplate === null || builtInTemplate === void 0 ? void 0 : builtInTemplate.template);
613
+ }
614
+ }
615
+ getCommands(agentId) {
616
+ const allCommands = this.getActivePromptFragments().filter(fragment => fragment.isCommand === true);
617
+ if (!agentId) {
618
+ return allCommands;
619
+ }
620
+ return allCommands.filter(fragment => !fragment.commandAgents || fragment.commandAgents.includes(agentId));
621
+ }
622
+ };
623
+ exports.PromptServiceImpl = PromptServiceImpl;
624
+ tslib_1.__decorate([
625
+ (0, inversify_1.inject)(core_1.ILogger),
626
+ tslib_1.__metadata("design:type", Object)
627
+ ], PromptServiceImpl.prototype, "logger", void 0);
628
+ tslib_1.__decorate([
629
+ (0, inversify_1.inject)(settings_service_1.AISettingsService),
630
+ (0, inversify_1.optional)(),
631
+ tslib_1.__metadata("design:type", Object)
632
+ ], PromptServiceImpl.prototype, "settingsService", void 0);
633
+ tslib_1.__decorate([
634
+ (0, inversify_1.inject)(exports.PromptFragmentCustomizationService),
635
+ (0, inversify_1.optional)(),
636
+ tslib_1.__metadata("design:type", Object)
637
+ ], PromptServiceImpl.prototype, "customizationService", void 0);
638
+ tslib_1.__decorate([
639
+ (0, inversify_1.inject)(variable_service_1.AIVariableService),
640
+ (0, inversify_1.optional)(),
641
+ tslib_1.__metadata("design:type", Object)
642
+ ], PromptServiceImpl.prototype, "variableService", void 0);
643
+ tslib_1.__decorate([
644
+ (0, inversify_1.inject)(tool_invocation_registry_1.ToolInvocationRegistry),
645
+ (0, inversify_1.optional)(),
646
+ tslib_1.__metadata("design:type", Object)
647
+ ], PromptServiceImpl.prototype, "toolInvocationRegistry", void 0);
648
+ tslib_1.__decorate([
649
+ (0, inversify_1.postConstruct)(),
650
+ tslib_1.__metadata("design:type", Function),
651
+ tslib_1.__metadata("design:paramtypes", []),
652
+ tslib_1.__metadata("design:returntype", void 0)
653
+ ], PromptServiceImpl.prototype, "init", null);
654
+ exports.PromptServiceImpl = PromptServiceImpl = tslib_1.__decorate([
655
+ (0, inversify_1.injectable)()
656
+ ], PromptServiceImpl);
657
+ //# sourceMappingURL=prompt-service.js.map