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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (246) hide show
  1. package/README.md +1 -0
  2. package/data/prompttemplate.tmLanguage.json +3 -0
  3. package/package.json +9 -9
  4. package/src/browser/frontend-language-model-alias-registry.ts +11 -11
  5. package/src/common/agent-service.ts +6 -6
  6. package/src/common/prompt-service.ts +6 -2
  7. package/lib/browser/agent-completion-notification-service.d.ts +0 -69
  8. package/lib/browser/agent-completion-notification-service.d.ts.map +0 -1
  9. package/lib/browser/agent-completion-notification-service.js +0 -187
  10. package/lib/browser/agent-completion-notification-service.js.map +0 -1
  11. package/lib/browser/ai-activation-service.d.ts +0 -31
  12. package/lib/browser/ai-activation-service.d.ts.map +0 -1
  13. package/lib/browser/ai-activation-service.js +0 -56
  14. package/lib/browser/ai-activation-service.js.map +0 -1
  15. package/lib/browser/ai-command-handler-factory.d.ts +0 -4
  16. package/lib/browser/ai-command-handler-factory.d.ts.map +0 -1
  17. package/lib/browser/ai-command-handler-factory.js +0 -20
  18. package/lib/browser/ai-command-handler-factory.js.map +0 -1
  19. package/lib/browser/ai-core-command-contribution.d.ts +0 -8
  20. package/lib/browser/ai-core-command-contribution.d.ts.map +0 -1
  21. package/lib/browser/ai-core-command-contribution.js +0 -44
  22. package/lib/browser/ai-core-command-contribution.js.map +0 -1
  23. package/lib/browser/ai-core-frontend-application-contribution.d.ts +0 -10
  24. package/lib/browser/ai-core-frontend-application-contribution.d.ts.map +0 -1
  25. package/lib/browser/ai-core-frontend-application-contribution.js +0 -46
  26. package/lib/browser/ai-core-frontend-application-contribution.js.map +0 -1
  27. package/lib/browser/ai-core-frontend-module.d.ts +0 -4
  28. package/lib/browser/ai-core-frontend-module.d.ts.map +0 -1
  29. package/lib/browser/ai-core-frontend-module.js +0 -137
  30. package/lib/browser/ai-core-frontend-module.js.map +0 -1
  31. package/lib/browser/ai-settings-service.d.ts +0 -16
  32. package/lib/browser/ai-settings-service.d.ts.map +0 -1
  33. package/lib/browser/ai-settings-service.js +0 -78
  34. package/lib/browser/ai-settings-service.js.map +0 -1
  35. package/lib/browser/ai-variable-uri-label-provider.d.ts +0 -17
  36. package/lib/browser/ai-variable-uri-label-provider.d.ts.map +0 -1
  37. package/lib/browser/ai-variable-uri-label-provider.js +0 -85
  38. package/lib/browser/ai-variable-uri-label-provider.js.map +0 -1
  39. package/lib/browser/ai-view-contribution.d.ts +0 -14
  40. package/lib/browser/ai-view-contribution.d.ts.map +0 -1
  41. package/lib/browser/ai-view-contribution.js +0 -87
  42. package/lib/browser/ai-view-contribution.js.map +0 -1
  43. package/lib/browser/file-variable-contribution.d.ts +0 -23
  44. package/lib/browser/file-variable-contribution.d.ts.map +0 -1
  45. package/lib/browser/file-variable-contribution.js +0 -114
  46. package/lib/browser/file-variable-contribution.js.map +0 -1
  47. package/lib/browser/frontend-language-model-alias-registry.d.ts +0 -31
  48. package/lib/browser/frontend-language-model-alias-registry.d.ts.map +0 -1
  49. package/lib/browser/frontend-language-model-alias-registry.js +0 -170
  50. package/lib/browser/frontend-language-model-alias-registry.js.map +0 -1
  51. package/lib/browser/frontend-language-model-registry.d.ts +0 -49
  52. package/lib/browser/frontend-language-model-registry.d.ts.map +0 -1
  53. package/lib/browser/frontend-language-model-registry.js +0 -387
  54. package/lib/browser/frontend-language-model-registry.js.map +0 -1
  55. package/lib/browser/frontend-language-model-registry.spec.d.ts +0 -2
  56. package/lib/browser/frontend-language-model-registry.spec.d.ts.map +0 -1
  57. package/lib/browser/frontend-language-model-registry.spec.js +0 -248
  58. package/lib/browser/frontend-language-model-registry.spec.js.map +0 -1
  59. package/lib/browser/frontend-language-model-service.d.ts +0 -10
  60. package/lib/browser/frontend-language-model-service.d.ts.map +0 -1
  61. package/lib/browser/frontend-language-model-service.js +0 -66
  62. package/lib/browser/frontend-language-model-service.js.map +0 -1
  63. package/lib/browser/frontend-prompt-customization-service.d.ts +0 -271
  64. package/lib/browser/frontend-prompt-customization-service.d.ts.map +0 -1
  65. package/lib/browser/frontend-prompt-customization-service.js +0 -869
  66. package/lib/browser/frontend-prompt-customization-service.js.map +0 -1
  67. package/lib/browser/frontend-prompt-customization-service.spec.d.ts +0 -2
  68. package/lib/browser/frontend-prompt-customization-service.spec.d.ts.map +0 -1
  69. package/lib/browser/frontend-prompt-customization-service.spec.js +0 -127
  70. package/lib/browser/frontend-prompt-customization-service.spec.js.map +0 -1
  71. package/lib/browser/frontend-variable-service.d.ts +0 -61
  72. package/lib/browser/frontend-variable-service.d.ts.map +0 -1
  73. package/lib/browser/frontend-variable-service.js +0 -165
  74. package/lib/browser/frontend-variable-service.js.map +0 -1
  75. package/lib/browser/index.d.ts +0 -20
  76. package/lib/browser/index.d.ts.map +0 -1
  77. package/lib/browser/index.js +0 -38
  78. package/lib/browser/index.js.map +0 -1
  79. package/lib/browser/open-editors-variable-contribution.d.ts +0 -17
  80. package/lib/browser/open-editors-variable-contribution.d.ts.map +0 -1
  81. package/lib/browser/open-editors-variable-contribution.js +0 -84
  82. package/lib/browser/open-editors-variable-contribution.js.map +0 -1
  83. package/lib/browser/os-notification-service.d.ts +0 -96
  84. package/lib/browser/os-notification-service.d.ts.map +0 -1
  85. package/lib/browser/os-notification-service.js +0 -222
  86. package/lib/browser/os-notification-service.js.map +0 -1
  87. package/lib/browser/prompttemplate-contribution.d.ts +0 -29
  88. package/lib/browser/prompttemplate-contribution.d.ts.map +0 -1
  89. package/lib/browser/prompttemplate-contribution.js +0 -243
  90. package/lib/browser/prompttemplate-contribution.js.map +0 -1
  91. package/lib/browser/prompttemplate-parser.d.ts +0 -36
  92. package/lib/browser/prompttemplate-parser.d.ts.map +0 -1
  93. package/lib/browser/prompttemplate-parser.js +0 -94
  94. package/lib/browser/prompttemplate-parser.js.map +0 -1
  95. package/lib/browser/theia-variable-contribution.d.ts +0 -26
  96. package/lib/browser/theia-variable-contribution.d.ts.map +0 -1
  97. package/lib/browser/theia-variable-contribution.js +0 -146
  98. package/lib/browser/theia-variable-contribution.js.map +0 -1
  99. package/lib/browser/token-usage-frontend-service-impl.d.ts +0 -25
  100. package/lib/browser/token-usage-frontend-service-impl.d.ts.map +0 -1
  101. package/lib/browser/token-usage-frontend-service-impl.js +0 -138
  102. package/lib/browser/token-usage-frontend-service-impl.js.map +0 -1
  103. package/lib/browser/token-usage-frontend-service.d.ts +0 -33
  104. package/lib/browser/token-usage-frontend-service.d.ts.map +0 -1
  105. package/lib/browser/token-usage-frontend-service.js +0 -23
  106. package/lib/browser/token-usage-frontend-service.js.map +0 -1
  107. package/lib/browser/window-blink-service.d.ts +0 -41
  108. package/lib/browser/window-blink-service.d.ts.map +0 -1
  109. package/lib/browser/window-blink-service.js +0 -174
  110. package/lib/browser/window-blink-service.js.map +0 -1
  111. package/lib/common/agent-preferences.d.ts +0 -4
  112. package/lib/common/agent-preferences.d.ts.map +0 -1
  113. package/lib/common/agent-preferences.js +0 -84
  114. package/lib/common/agent-preferences.js.map +0 -1
  115. package/lib/common/agent-service.d.ts +0 -66
  116. package/lib/common/agent-service.d.ts.map +0 -1
  117. package/lib/common/agent-service.js +0 -104
  118. package/lib/common/agent-service.js.map +0 -1
  119. package/lib/common/agent.d.ts +0 -72
  120. package/lib/common/agent.d.ts.map +0 -1
  121. package/lib/common/agent.js +0 -20
  122. package/lib/common/agent.js.map +0 -1
  123. package/lib/common/agents-variable-contribution.d.ts +0 -19
  124. package/lib/common/agents-variable-contribution.d.ts.map +0 -1
  125. package/lib/common/agents-variable-contribution.js +0 -57
  126. package/lib/common/agents-variable-contribution.js.map +0 -1
  127. package/lib/common/ai-core-preferences.d.ts +0 -48
  128. package/lib/common/ai-core-preferences.d.ts.map +0 -1
  129. package/lib/common/ai-core-preferences.js +0 -204
  130. package/lib/common/ai-core-preferences.js.map +0 -1
  131. package/lib/common/ai-variable-resource.d.ts +0 -18
  132. package/lib/common/ai-variable-resource.d.ts.map +0 -1
  133. package/lib/common/ai-variable-resource.js +0 -103
  134. package/lib/common/ai-variable-resource.js.map +0 -1
  135. package/lib/common/configurable-in-memory-resources.d.ts +0 -47
  136. package/lib/common/configurable-in-memory-resources.d.ts.map +0 -1
  137. package/lib/common/configurable-in-memory-resources.js +0 -154
  138. package/lib/common/configurable-in-memory-resources.js.map +0 -1
  139. package/lib/common/index.d.ts +0 -22
  140. package/lib/common/index.d.ts.map +0 -1
  141. package/lib/common/index.js +0 -40
  142. package/lib/common/index.js.map +0 -1
  143. package/lib/common/language-model-alias.d.ts +0 -58
  144. package/lib/common/language-model-alias.d.ts.map +0 -1
  145. package/lib/common/language-model-alias.js +0 -20
  146. package/lib/common/language-model-alias.js.map +0 -1
  147. package/lib/common/language-model-delegate.d.ts +0 -25
  148. package/lib/common/language-model-delegate.d.ts.map +0 -1
  149. package/lib/common/language-model-delegate.js +0 -26
  150. package/lib/common/language-model-delegate.js.map +0 -1
  151. package/lib/common/language-model-interaction-model.d.ts +0 -74
  152. package/lib/common/language-model-interaction-model.d.ts.map +0 -1
  153. package/lib/common/language-model-interaction-model.js +0 -3
  154. package/lib/common/language-model-interaction-model.js.map +0 -1
  155. package/lib/common/language-model-service.d.ts +0 -38
  156. package/lib/common/language-model-service.d.ts.map +0 -1
  157. package/lib/common/language-model-service.js +0 -128
  158. package/lib/common/language-model-service.js.map +0 -1
  159. package/lib/common/language-model-util.d.ts +0 -17
  160. package/lib/common/language-model-util.d.ts.map +0 -1
  161. package/lib/common/language-model-util.js +0 -82
  162. package/lib/common/language-model-util.js.map +0 -1
  163. package/lib/common/language-model.d.ts +0 -285
  164. package/lib/common/language-model.d.ts.map +0 -1
  165. package/lib/common/language-model.js +0 -248
  166. package/lib/common/language-model.js.map +0 -1
  167. package/lib/common/language-model.spec.d.ts +0 -2
  168. package/lib/common/language-model.spec.d.ts.map +0 -1
  169. package/lib/common/language-model.spec.js +0 -62
  170. package/lib/common/language-model.spec.js.map +0 -1
  171. package/lib/common/notification-types.d.ts +0 -7
  172. package/lib/common/notification-types.d.ts.map +0 -1
  173. package/lib/common/notification-types.js +0 -29
  174. package/lib/common/notification-types.js.map +0 -1
  175. package/lib/common/prompt-service-util.d.ts +0 -8
  176. package/lib/common/prompt-service-util.d.ts.map +0 -1
  177. package/lib/common/prompt-service-util.js +0 -34
  178. package/lib/common/prompt-service-util.js.map +0 -1
  179. package/lib/common/prompt-service.d.ts +0 -466
  180. package/lib/common/prompt-service.d.ts.map +0 -1
  181. package/lib/common/prompt-service.js +0 -653
  182. package/lib/common/prompt-service.js.map +0 -1
  183. package/lib/common/prompt-service.spec.d.ts +0 -2
  184. package/lib/common/prompt-service.spec.d.ts.map +0 -1
  185. package/lib/common/prompt-service.spec.js +0 -431
  186. package/lib/common/prompt-service.spec.js.map +0 -1
  187. package/lib/common/prompt-text.d.ts +0 -8
  188. package/lib/common/prompt-text.d.ts.map +0 -1
  189. package/lib/common/prompt-text.js +0 -27
  190. package/lib/common/prompt-text.js.map +0 -1
  191. package/lib/common/prompt-variable-contribution.d.ts +0 -18
  192. package/lib/common/prompt-variable-contribution.d.ts.map +0 -1
  193. package/lib/common/prompt-variable-contribution.js +0 -207
  194. package/lib/common/prompt-variable-contribution.js.map +0 -1
  195. package/lib/common/prompt-variable-contribution.spec.d.ts +0 -2
  196. package/lib/common/prompt-variable-contribution.spec.d.ts.map +0 -1
  197. package/lib/common/prompt-variable-contribution.spec.js +0 -163
  198. package/lib/common/prompt-variable-contribution.spec.js.map +0 -1
  199. package/lib/common/protocol.d.ts +0 -25
  200. package/lib/common/protocol.d.ts.map +0 -1
  201. package/lib/common/protocol.js +0 -22
  202. package/lib/common/protocol.js.map +0 -1
  203. package/lib/common/settings-service.d.ts +0 -29
  204. package/lib/common/settings-service.d.ts.map +0 -1
  205. package/lib/common/settings-service.js +0 -5
  206. package/lib/common/settings-service.js.map +0 -1
  207. package/lib/common/today-variable-contribution.d.ts +0 -17
  208. package/lib/common/today-variable-contribution.d.ts.map +0 -1
  209. package/lib/common/today-variable-contribution.js +0 -68
  210. package/lib/common/today-variable-contribution.js.map +0 -1
  211. package/lib/common/token-usage-service.d.ts +0 -43
  212. package/lib/common/token-usage-service.d.ts.map +0 -1
  213. package/lib/common/token-usage-service.js +0 -20
  214. package/lib/common/token-usage-service.js.map +0 -1
  215. package/lib/common/tool-invocation-registry.d.ts +0 -66
  216. package/lib/common/tool-invocation-registry.d.ts.map +0 -1
  217. package/lib/common/tool-invocation-registry.js +0 -101
  218. package/lib/common/tool-invocation-registry.js.map +0 -1
  219. package/lib/common/variable-service.d.ts +0 -172
  220. package/lib/common/variable-service.d.ts.map +0 -1
  221. package/lib/common/variable-service.js +0 -287
  222. package/lib/common/variable-service.js.map +0 -1
  223. package/lib/common/variable-service.spec.d.ts +0 -2
  224. package/lib/common/variable-service.spec.d.ts.map +0 -1
  225. package/lib/common/variable-service.spec.js +0 -237
  226. package/lib/common/variable-service.spec.js.map +0 -1
  227. package/lib/node/ai-core-backend-module.d.ts +0 -4
  228. package/lib/node/ai-core-backend-module.d.ts.map +0 -1
  229. package/lib/node/ai-core-backend-module.js +0 -65
  230. package/lib/node/ai-core-backend-module.js.map +0 -1
  231. package/lib/node/backend-language-model-registry.d.ts +0 -13
  232. package/lib/node/backend-language-model-registry.d.ts.map +0 -1
  233. package/lib/node/backend-language-model-registry.js +0 -68
  234. package/lib/node/backend-language-model-registry.js.map +0 -1
  235. package/lib/node/language-model-frontend-delegate.d.ts +0 -18
  236. package/lib/node/language-model-frontend-delegate.d.ts.map +0 -1
  237. package/lib/node/language-model-frontend-delegate.js +0 -109
  238. package/lib/node/language-model-frontend-delegate.js.map +0 -1
  239. package/lib/node/token-usage-service-impl.d.ts +0 -23
  240. package/lib/node/token-usage-service-impl.d.ts.map +0 -1
  241. package/lib/node/token-usage-service-impl.js +0 -78
  242. package/lib/node/token-usage-service-impl.js.map +0 -1
  243. package/lib/node/tool-request-parameters.spec.d.ts +0 -2
  244. package/lib/node/tool-request-parameters.spec.d.ts.map +0 -1
  245. package/lib/node/tool-request-parameters.spec.js +0 -116
  246. package/lib/node/tool-request-parameters.spec.js.map +0 -1
package/README.md CHANGED
@@ -20,6 +20,7 @@ Either include `@theia/ai-core-ui` or bind the included preferences schemas in y
20
20
 
21
21
  ## Additional Information
22
22
 
23
+ - [API documentation for `@theia/ai-core`](https://eclipse-theia.github.io/theia/docs/next/modules/_theia_ai-core.html)
23
24
  - [Theia - GitHub](https://github.com/eclipse-theia/theia)
24
25
  - [Theia - Website](https://theia-ide.org/)
25
26
 
@@ -97,6 +97,9 @@
97
97
  "match": "[a-zA-Z_][a-zA-Z0-9_\\-]*"
98
98
  }
99
99
  ]
100
+ },
101
+ {
102
+ "include": "text.html.markdown"
100
103
  }
101
104
  ],
102
105
  "repository": {},
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@theia/ai-core",
3
- "version": "1.67.0-next.13+c409d5d18",
3
+ "version": "1.67.0-next.56+d8f18cc386c",
4
4
  "description": "Theia - AI Core",
5
5
  "dependencies": {
6
- "@theia/core": "1.67.0-next.13+c409d5d18",
7
- "@theia/editor": "1.67.0-next.13+c409d5d18",
8
- "@theia/filesystem": "1.67.0-next.13+c409d5d18",
9
- "@theia/monaco": "1.67.0-next.13+c409d5d18",
6
+ "@theia/core": "1.67.0-next.56+d8f18cc386c",
7
+ "@theia/editor": "1.67.0-next.56+d8f18cc386c",
8
+ "@theia/filesystem": "1.67.0-next.56+d8f18cc386c",
9
+ "@theia/monaco": "1.67.0-next.56+d8f18cc386c",
10
10
  "@theia/monaco-editor-core": "1.96.302",
11
- "@theia/output": "1.67.0-next.13+c409d5d18",
12
- "@theia/variable-resolver": "1.67.0-next.13+c409d5d18",
13
- "@theia/workspace": "1.67.0-next.13+c409d5d18",
11
+ "@theia/output": "1.67.0-next.56+d8f18cc386c",
12
+ "@theia/variable-resolver": "1.67.0-next.56+d8f18cc386c",
13
+ "@theia/workspace": "1.67.0-next.56+d8f18cc386c",
14
14
  "@types/js-yaml": "^4.0.9",
15
15
  "fast-deep-equal": "^3.1.3",
16
16
  "js-yaml": "^4.1.0",
@@ -57,5 +57,5 @@
57
57
  "nyc": {
58
58
  "extends": "../../configs/nyc.json"
59
59
  },
60
- "gitHead": "c409d5d18d8c4f5a722f87b37ea9d6fd5af47ea8"
60
+ "gitHead": "d8f18cc386c45a736cd193d42eab02c8f64c6b10"
61
61
  }
@@ -28,18 +28,18 @@ export class DefaultLanguageModelAliasRegistry implements LanguageModelAliasRegi
28
28
  {
29
29
  id: 'default/code',
30
30
  defaultModelIds: [
31
- 'anthropic/claude-3-7-sonnet-latest',
32
- 'openai/gpt-4.1',
33
- 'google/gemini-2.5-pro-exp-03-25'
31
+ 'anthropic/claude-sonnet-4-5',
32
+ 'openai/gpt-5.1',
33
+ 'google/gemini-3-pro-preview'
34
34
  ],
35
35
  description: nls.localize('theia/ai/core/defaultModelAliases/code/description', 'Optimized for code understanding and generation tasks.')
36
36
  },
37
37
  {
38
38
  id: 'default/universal',
39
39
  defaultModelIds: [
40
- 'openai/gpt-4o',
41
- 'anthropic/claude-3-7-sonnet-latest',
42
- 'google/gemini-2.5-pro-exp-03-25'
40
+ 'openai/gpt-5.1',
41
+ 'anthropic/claude-sonnet-4-5',
42
+ 'google/gemini-3-pro-preview'
43
43
  ],
44
44
  description: nls.localize('theia/ai/core/defaultModelAliases/universal/description', 'Well-balanced for both code and general language use.')
45
45
  },
@@ -47,17 +47,17 @@ export class DefaultLanguageModelAliasRegistry implements LanguageModelAliasRegi
47
47
  id: 'default/code-completion',
48
48
  defaultModelIds: [
49
49
  'openai/gpt-4.1',
50
- 'anthropic/claude-3-7-sonnet-latest',
51
- 'google/gemini-2.5-pro-exp-03-25'
50
+ 'anthropic/claude-sonnet-4-5',
51
+ 'google/gemini-3-pro-preview'
52
52
  ],
53
53
  description: nls.localize('theia/ai/core/defaultModelAliases/code-completion/description', 'Best suited for code autocompletion scenarios.')
54
54
  },
55
55
  {
56
56
  id: 'default/summarize',
57
57
  defaultModelIds: [
58
- 'openai/gpt-4.1',
59
- 'anthropic/claude-3-7-sonnet-latest',
60
- 'google/gemini-2.5-pro-exp-03-25'
58
+ 'openai/gpt-5.1',
59
+ 'anthropic/claude-sonnet-4-5',
60
+ 'google/gemini-3-pro-preview'
61
61
  ],
62
62
  description: nls.localize('theia/ai/core/defaultModelAliases/summarize/description', 'Models prioritized for summarization and condensation of content.')
63
63
  }
@@ -37,12 +37,12 @@ export interface AgentService {
37
37
  * Enable the agent with the specified id.
38
38
  * @param agentId the agent id.
39
39
  */
40
- enableAgent(agentId: string): void;
40
+ enableAgent(agentId: string): Promise<void>;
41
41
  /**
42
42
  * disable the agent with the specified id.
43
43
  * @param agentId the agent id.
44
44
  */
45
- disableAgent(agentId: string): void;
45
+ disableAgent(agentId: string): Promise<void>;
46
46
  /**
47
47
  * query whether this agent is currently enabled or disabled.
48
48
  * @param agentId the agent id.
@@ -131,14 +131,14 @@ export class AgentServiceImpl implements AgentService {
131
131
  return this._agents;
132
132
  }
133
133
 
134
- enableAgent(agentId: string): void {
134
+ async enableAgent(agentId: string): Promise<void> {
135
135
  this.disabledAgents.delete(agentId);
136
- this.aiSettingsService?.updateAgentSettings(agentId, { enable: true });
136
+ await this.aiSettingsService?.updateAgentSettings(agentId, { enable: true });
137
137
  }
138
138
 
139
- disableAgent(agentId: string): void {
139
+ async disableAgent(agentId: string): Promise<void> {
140
140
  this.disabledAgents.add(agentId);
141
- this.aiSettingsService?.updateAgentSettings(agentId, { enable: false });
141
+ await this.aiSettingsService?.updateAgentSettings(agentId, { enable: false });
142
142
  }
143
143
 
144
144
  isEnabled(agentId: string): boolean {
@@ -565,6 +565,10 @@ export class PromptServiceImpl implements PromptService {
565
565
  return this._builtInFragments.find(fragment => fragment.id === fragmentId);
566
566
  }
567
567
 
568
+ protected findBuiltInFragmentByName(fragmentName: string): BasePromptFragment | undefined {
569
+ return this._builtInFragments.find(fragment => fragment.commandName === fragmentName);
570
+ }
571
+
568
572
  getRawPromptFragment(fragmentId: string): PromptFragment | undefined {
569
573
  if (this.customizationService?.isPromptFragmentCustomized(fragmentId)) {
570
574
  const customizedFragment = this.customizationService.getActivePromptFragmentCustomization(fragmentId);
@@ -576,7 +580,7 @@ export class PromptServiceImpl implements PromptService {
576
580
  }
577
581
 
578
582
  getBuiltInRawPrompt(fragmentId: string): PromptFragment | undefined {
579
- return this.findBuiltInFragmentById(fragmentId);
583
+ return this.findBuiltInFragmentById(fragmentId) ?? this.findBuiltInFragmentByName(fragmentId);
580
584
  }
581
585
 
582
586
  getPromptFragment(fragmentId: string): PromptFragment | undefined {
@@ -941,7 +945,7 @@ export class PromptServiceImpl implements PromptService {
941
945
  if (promptFragment.isCommand && promptFragment.commandName) {
942
946
  const commandName = promptFragment.commandName;
943
947
  const duplicates = this._builtInFragments.filter(
944
- f => f.isCommand && f.commandName === commandName && f.id !== promptFragment.id
948
+ f => f.isCommand && f.commandName === commandName
945
949
  );
946
950
  if (duplicates.length > 0) {
947
951
  this.logger.warn(
@@ -1,69 +0,0 @@
1
- import { MessageService } from '@theia/core/lib/common/message-service';
2
- import { ApplicationShell } from '@theia/core/lib/browser/shell/application-shell';
3
- import { AgentService } from '../common/agent-service';
4
- import { AISettingsService } from '../common/settings-service';
5
- import { OSNotificationService } from './os-notification-service';
6
- import { WindowBlinkService } from './window-blink-service';
7
- import { NotificationType } from '../common/notification-types';
8
- import { PreferenceService } from '@theia/core';
9
- export declare class AgentCompletionNotificationService {
10
- protected readonly preferenceService: PreferenceService;
11
- protected readonly agentService: AgentService;
12
- protected readonly settingsService: AISettingsService;
13
- protected readonly osNotificationService: OSNotificationService;
14
- protected readonly messageService: MessageService;
15
- protected readonly windowBlinkService: WindowBlinkService;
16
- protected readonly shell: ApplicationShell;
17
- /**
18
- * Show a completion notification for the specified agent if enabled in preferences.
19
- *
20
- * @param agentId The unique identifier of the agent
21
- * @param taskDescription Optional description of the completed task
22
- */
23
- showCompletionNotification(agentId: string, taskDescription?: string): Promise<void>;
24
- /**
25
- * Resolve the display name for an agent by its ID.
26
- *
27
- * @param agentId The unique identifier of the agent
28
- * @returns The agent's display name or the agent ID if not found
29
- */
30
- protected resolveAgentName(agentId: string): string;
31
- /**
32
- * Get the preferred notification type for a specific agent.
33
- * If no agent-specific preference is set, returns the global default notification type.
34
- */
35
- protected getNotificationTypeForAgent(agentId: string): Promise<NotificationType>;
36
- /**
37
- * Execute the specified notification type.
38
- */
39
- private executeNotificationType;
40
- /**
41
- * Show OS notification directly.
42
- */
43
- protected showOSNotification(agentName: string, taskDescription?: string): Promise<void>;
44
- /**
45
- * Show MessageService notification.
46
- */
47
- protected showMessageServiceNotification(agentName: string, taskDescription?: string): Promise<void>;
48
- /**
49
- * Show window blink notification.
50
- */
51
- protected showBlinkNotification(agentName: string): Promise<void>;
52
- /**
53
- * Check if OS notifications are supported and enabled.
54
- */
55
- isOSNotificationSupported(): boolean;
56
- /**
57
- * Get the current OS notification permission status.
58
- */
59
- getOSNotificationPermission(): NotificationPermission;
60
- /**
61
- * Request OS notification permission from the user.
62
- */
63
- requestOSNotificationPermission(): Promise<NotificationPermission>;
64
- /**
65
- * Check if any chat widget currently has focus.
66
- */
67
- protected isChatWidgetFocused(): boolean;
68
- }
69
- //# sourceMappingURL=agent-completion-notification-service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent-completion-notification-service.d.ts","sourceRoot":"","sources":["../../src/browser/agent-completion-notification-service.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,iDAAiD,CAAC;AAKnF,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC5D,OAAO,EACH,gBAAgB,EAKnB,MAAM,8BAA8B,CAA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AAC,sBAAsB,CAAC;IAIxE;;OAEG;IACH,SAAS,CAAC,mBAAmB,IAAI,OAAO;CAO3C"}
@@ -1,187 +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.AgentCompletionNotificationService = void 0;
19
- const tslib_1 = require("tslib");
20
- const inversify_1 = require("@theia/core/shared/inversify");
21
- const message_service_1 = require("@theia/core/lib/common/message-service");
22
- const application_shell_1 = require("@theia/core/lib/browser/shell/application-shell");
23
- const nls_1 = require("@theia/core/lib/common/nls");
24
- const ai_core_preferences_1 = require("../common/ai-core-preferences");
25
- const agent_service_1 = require("../common/agent-service");
26
- const settings_service_1 = require("../common/settings-service");
27
- const os_notification_service_1 = require("./os-notification-service");
28
- const window_blink_service_1 = require("./window-blink-service");
29
- const notification_types_1 = require("../common/notification-types");
30
- const core_1 = require("@theia/core");
31
- let AgentCompletionNotificationService = class AgentCompletionNotificationService {
32
- /**
33
- * Show a completion notification for the specified agent if enabled in preferences.
34
- *
35
- * @param agentId The unique identifier of the agent
36
- * @param taskDescription Optional description of the completed task
37
- */
38
- async showCompletionNotification(agentId, taskDescription) {
39
- const notificationType = await this.getNotificationTypeForAgent(agentId);
40
- if (notificationType === notification_types_1.NOTIFICATION_TYPE_OFF || this.isChatWidgetFocused()) {
41
- return;
42
- }
43
- try {
44
- const agentName = this.resolveAgentName(agentId);
45
- await this.executeNotificationType(agentName, taskDescription, notificationType);
46
- }
47
- catch (error) {
48
- console.error('Failed to show agent completion notification:', error);
49
- }
50
- }
51
- /**
52
- * Resolve the display name for an agent by its ID.
53
- *
54
- * @param agentId The unique identifier of the agent
55
- * @returns The agent's display name or the agent ID if not found
56
- */
57
- resolveAgentName(agentId) {
58
- try {
59
- const agents = this.agentService.getAllAgents();
60
- const agent = agents.find(a => a.id === agentId);
61
- return (agent === null || agent === void 0 ? void 0 : agent.name) || agentId;
62
- }
63
- catch (error) {
64
- console.warn(`Failed to resolve agent name for ID '${agentId}':`, error);
65
- return agentId;
66
- }
67
- }
68
- /**
69
- * Get the preferred notification type for a specific agent.
70
- * If no agent-specific preference is set, returns the global default notification type.
71
- */
72
- async getNotificationTypeForAgent(agentId) {
73
- const agentSettings = await this.settingsService.getAgentSettings(agentId);
74
- const agentNotificationType = agentSettings === null || agentSettings === void 0 ? void 0 : agentSettings.completionNotification;
75
- // If agent has no specific setting, use the global default
76
- if (!agentNotificationType) {
77
- return this.preferenceService.get(ai_core_preferences_1.PREFERENCE_NAME_DEFAULT_NOTIFICATION_TYPE, notification_types_1.NOTIFICATION_TYPE_OFF);
78
- }
79
- return agentNotificationType;
80
- }
81
- /**
82
- * Execute the specified notification type.
83
- */
84
- async executeNotificationType(agentName, taskDescription, type) {
85
- switch (type) {
86
- case notification_types_1.NOTIFICATION_TYPE_OS_NOTIFICATION:
87
- await this.showOSNotification(agentName, taskDescription);
88
- break;
89
- case notification_types_1.NOTIFICATION_TYPE_MESSAGE:
90
- await this.showMessageServiceNotification(agentName, taskDescription);
91
- break;
92
- case notification_types_1.NOTIFICATION_TYPE_BLINK:
93
- await this.showBlinkNotification(agentName);
94
- break;
95
- default:
96
- throw new Error(`Unknown notification type: ${type}`);
97
- }
98
- }
99
- /**
100
- * Show OS notification directly.
101
- */
102
- async showOSNotification(agentName, taskDescription) {
103
- const result = await this.osNotificationService.showAgentCompletionNotification(agentName, taskDescription);
104
- if (!result.success) {
105
- throw new Error(`OS notification failed: ${result.error}`);
106
- }
107
- }
108
- /**
109
- * Show MessageService notification.
110
- */
111
- async showMessageServiceNotification(agentName, taskDescription) {
112
- const message = taskDescription
113
- ? nls_1.nls.localize('theia/ai-core/agentCompletionWithTask', 'Agent "{0}" has completed the task: {1}', agentName, taskDescription)
114
- : nls_1.nls.localize('theia/ai-core/agentCompletionMessage', 'Agent "{0}" has completed its task.', agentName);
115
- this.messageService.info(message);
116
- }
117
- /**
118
- * Show window blink notification.
119
- */
120
- async showBlinkNotification(agentName) {
121
- const result = await this.windowBlinkService.blinkWindow(agentName);
122
- if (!result.success) {
123
- throw new Error(`Window blink notification failed: ${result.error}`);
124
- }
125
- }
126
- /**
127
- * Check if OS notifications are supported and enabled.
128
- */
129
- isOSNotificationSupported() {
130
- return this.osNotificationService.isNotificationSupported();
131
- }
132
- /**
133
- * Get the current OS notification permission status.
134
- */
135
- getOSNotificationPermission() {
136
- return this.osNotificationService.getPermissionStatus();
137
- }
138
- /**
139
- * Request OS notification permission from the user.
140
- */
141
- async requestOSNotificationPermission() {
142
- return this.osNotificationService.requestPermission();
143
- }
144
- /**
145
- * Check if any chat widget currently has focus.
146
- */
147
- isChatWidgetFocused() {
148
- const activeWidget = this.shell.activeWidget;
149
- if (!activeWidget) {
150
- return false;
151
- }
152
- return activeWidget.id === 'chat-view-widget';
153
- }
154
- };
155
- exports.AgentCompletionNotificationService = AgentCompletionNotificationService;
156
- tslib_1.__decorate([
157
- (0, inversify_1.inject)(core_1.PreferenceService),
158
- tslib_1.__metadata("design:type", Object)
159
- ], AgentCompletionNotificationService.prototype, "preferenceService", void 0);
160
- tslib_1.__decorate([
161
- (0, inversify_1.inject)(agent_service_1.AgentService),
162
- tslib_1.__metadata("design:type", Object)
163
- ], AgentCompletionNotificationService.prototype, "agentService", void 0);
164
- tslib_1.__decorate([
165
- (0, inversify_1.inject)(settings_service_1.AISettingsService),
166
- tslib_1.__metadata("design:type", Object)
167
- ], AgentCompletionNotificationService.prototype, "settingsService", void 0);
168
- tslib_1.__decorate([
169
- (0, inversify_1.inject)(os_notification_service_1.OSNotificationService),
170
- tslib_1.__metadata("design:type", os_notification_service_1.OSNotificationService)
171
- ], AgentCompletionNotificationService.prototype, "osNotificationService", void 0);
172
- tslib_1.__decorate([
173
- (0, inversify_1.inject)(message_service_1.MessageService),
174
- tslib_1.__metadata("design:type", message_service_1.MessageService)
175
- ], AgentCompletionNotificationService.prototype, "messageService", void 0);
176
- tslib_1.__decorate([
177
- (0, inversify_1.inject)(window_blink_service_1.WindowBlinkService),
178
- tslib_1.__metadata("design:type", window_blink_service_1.WindowBlinkService)
179
- ], AgentCompletionNotificationService.prototype, "windowBlinkService", void 0);
180
- tslib_1.__decorate([
181
- (0, inversify_1.inject)(application_shell_1.ApplicationShell),
182
- tslib_1.__metadata("design:type", application_shell_1.ApplicationShell)
183
- ], AgentCompletionNotificationService.prototype, "shell", void 0);
184
- exports.AgentCompletionNotificationService = AgentCompletionNotificationService = tslib_1.__decorate([
185
- (0, inversify_1.injectable)()
186
- ], AgentCompletionNotificationService);
187
- //# sourceMappingURL=agent-completion-notification-service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"agent-completion-notification-service.js","sourceRoot":"","sources":["../../src/browser/agent-completion-notification-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,4DAAkE;AAClE,4EAAwE;AACxE,uFAAmF;AACnF,oDAAiD;AACjD,uEAEuC;AACvC,2DAAuD;AACvD,iEAA+D;AAC/D,uEAAkE;AAClE,iEAA4D;AAC5D,qEAMsC;AACtC,sCAAgD;AAGzC,IAAM,kCAAkC,GAAxC,MAAM,kCAA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,gCAAc;0EAAC;AAG/B;IADlB,IAAA,kBAAM,EAAC,yCAAkB,CAAC;sCACY,yCAAkB;8EAAC;AAGvC;IADlB,IAAA,kBAAM,EAAC,oCAAgB,CAAC;sCACC,oCAAgB;iEAAC;6CApBlC,kCAAkC;IAD9C,IAAA,sBAAU,GAAE;GACA,kCAAkC,CA4M9C"}
@@ -1,31 +0,0 @@
1
- import { FrontendApplicationContribution } from '@theia/core/lib/browser';
2
- export declare const AIActivationService: unique symbol;
3
- /**
4
- * AIActivationService is used to manage the activation state of AI features in Theia.
5
- */
6
- export interface AIActivationService {
7
- isActive: boolean;
8
- onDidChangeActiveStatus: Event<boolean>;
9
- }
10
- import { Emitter, Event } from '@theia/core';
11
- import { ContextKeyService } from '@theia/core/lib/browser/context-key-service';
12
- /**
13
- * Context key for the AI features. It is set to `true` if the feature is enabled.
14
- */
15
- export declare const ENABLE_AI_CONTEXT_KEY = "ai-features.AiEnable.enableAI";
16
- /**
17
- * Default implementation of AIActivationService marks the feature active by default.
18
- *
19
- * Adopters may override this implementation to provide custom activation logic.
20
- *
21
- * Note that '@theia/ai-ide' also overrides this service to provide activation based on preferences,
22
- * disabling the feature by default.
23
- */
24
- export declare class AIActivationServiceImpl implements AIActivationService, FrontendApplicationContribution {
25
- protected readonly contextKeyService: ContextKeyService;
26
- isActive: boolean;
27
- protected onDidChangeAIEnabled: Emitter<boolean>;
28
- get onDidChangeActiveStatus(): Event<boolean>;
29
- initialize(): void;
30
- }
31
- //# sourceMappingURL=ai-activation-service.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-activation-service.d.ts","sourceRoot":"","sources":["../../src/browser/ai-activation-service.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAE1E,eAAO,MAAM,mBAAmB,eAAgC,CAAC;AACjE;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,QAAQ,EAAE,OAAO,CAAC;IAClB,uBAAuB,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;CAC3C;AACD,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAC;AAEhF;;GAEG;AACH,eAAO,MAAM,qBAAqB,kCAAkC,CAAC;AAErE;;;;;;;GAOG;AACH,qBACa,uBAAwB,YAAW,mBAAmB,EAAE,+BAA+B;IAGhG,SAAS,CAAC,QAAQ,CAAC,iBAAiB,EAAE,iBAAiB,CAAC;IAExD,QAAQ,EAAE,OAAO,CAAQ;IAEzB,SAAS,CAAC,oBAAoB,mBAA0B;IACxD,IAAI,uBAAuB,IAAI,KAAK,CAAC,OAAO,CAAC,CAE5C;IAED,UAAU,IAAI,IAAI;CAGrB"}
@@ -1,56 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AIActivationServiceImpl = exports.ENABLE_AI_CONTEXT_KEY = exports.AIActivationService = void 0;
4
- const tslib_1 = require("tslib");
5
- // *****************************************************************************
6
- // Copyright (C) 2024 EclipseSource GmbH.
7
- //
8
- // This program and the accompanying materials are made available under the
9
- // terms of the Eclipse Public License v. 2.0 which is available at
10
- // http://www.eclipse.org/legal/epl-2.0.
11
- //
12
- // This Source Code may also be made available under the following Secondary
13
- // Licenses when the conditions for such availability set forth in the Eclipse
14
- // Public License v. 2.0 are satisfied: GNU General Public License, version 2
15
- // with the GNU Classpath Exception which is available at
16
- // https://www.gnu.org/software/classpath/license.html.
17
- //
18
- // SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
19
- // *****************************************************************************
20
- const inversify_1 = require("@theia/core/shared/inversify");
21
- exports.AIActivationService = Symbol('AIActivationService');
22
- const core_1 = require("@theia/core");
23
- const context_key_service_1 = require("@theia/core/lib/browser/context-key-service");
24
- /**
25
- * Context key for the AI features. It is set to `true` if the feature is enabled.
26
- */
27
- exports.ENABLE_AI_CONTEXT_KEY = 'ai-features.AiEnable.enableAI';
28
- /**
29
- * Default implementation of AIActivationService marks the feature active by default.
30
- *
31
- * Adopters may override this implementation to provide custom activation logic.
32
- *
33
- * Note that '@theia/ai-ide' also overrides this service to provide activation based on preferences,
34
- * disabling the feature by default.
35
- */
36
- let AIActivationServiceImpl = class AIActivationServiceImpl {
37
- constructor() {
38
- this.isActive = true;
39
- this.onDidChangeAIEnabled = new core_1.Emitter();
40
- }
41
- get onDidChangeActiveStatus() {
42
- return this.onDidChangeAIEnabled.event;
43
- }
44
- initialize() {
45
- this.contextKeyService.createKey(exports.ENABLE_AI_CONTEXT_KEY, true);
46
- }
47
- };
48
- exports.AIActivationServiceImpl = AIActivationServiceImpl;
49
- tslib_1.__decorate([
50
- (0, inversify_1.inject)(context_key_service_1.ContextKeyService),
51
- tslib_1.__metadata("design:type", Object)
52
- ], AIActivationServiceImpl.prototype, "contextKeyService", void 0);
53
- exports.AIActivationServiceImpl = AIActivationServiceImpl = tslib_1.__decorate([
54
- (0, inversify_1.injectable)()
55
- ], AIActivationServiceImpl);
56
- //# sourceMappingURL=ai-activation-service.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-activation-service.js","sourceRoot":"","sources":["../../src/browser/ai-activation-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;AAChF,4DAAkE;AAGrD,QAAA,mBAAmB,GAAG,MAAM,CAAC,qBAAqB,CAAC,CAAC;AAQjE,sCAA6C;AAC7C,qFAAgF;AAEhF;;GAEG;AACU,QAAA,qBAAqB,GAAG,+BAA+B,CAAC;AAErE;;;;;;;GAOG;AAEI,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAA7B;QAKH,aAAQ,GAAY,IAAI,CAAC;QAEf,yBAAoB,GAAG,IAAI,cAAO,EAAW,CAAC;IAQ5D,CAAC;IAPG,IAAI,uBAAuB;QACvB,OAAO,IAAI,CAAC,oBAAoB,CAAC,KAAK,CAAC;IAC3C,CAAC;IAED,UAAU;QACN,IAAI,CAAC,iBAAiB,CAAC,SAAS,CAAC,6BAAqB,EAAE,IAAI,CAAC,CAAC;IAClE,CAAC;CACJ,CAAA;AAfY,0DAAuB;AAGb;IADlB,IAAA,kBAAM,EAAC,uCAAiB,CAAC;;kEAC8B;kCAH/C,uBAAuB;IADnC,IAAA,sBAAU,GAAE;GACA,uBAAuB,CAenC"}
@@ -1,4 +0,0 @@
1
- import { CommandHandler } from '@theia/core';
2
- export type AICommandHandlerFactory = (handler: CommandHandler) => CommandHandler;
3
- export declare const AICommandHandlerFactory: unique symbol;
4
- //# sourceMappingURL=ai-command-handler-factory.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-command-handler-factory.d.ts","sourceRoot":"","sources":["../../src/browser/ai-command-handler-factory.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,MAAM,uBAAuB,GAAG,CAAC,OAAO,EAAE,cAAc,KAAK,cAAc,CAAC;AAClF,eAAO,MAAM,uBAAuB,eAAoC,CAAC"}
@@ -1,20 +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.AICommandHandlerFactory = void 0;
19
- exports.AICommandHandlerFactory = Symbol('AICommandHandlerFactory');
20
- //# sourceMappingURL=ai-command-handler-factory.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-command-handler-factory.js","sourceRoot":"","sources":["../../src/browser/ai-command-handler-factory.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;;;AAKnE,QAAA,uBAAuB,GAAG,MAAM,CAAC,yBAAyB,CAAC,CAAC"}
@@ -1,8 +0,0 @@
1
- import { Command, CommandContribution, CommandRegistry } from '@theia/core';
2
- import { AICommandHandlerFactory } from './ai-command-handler-factory';
3
- export declare const AI_SHOW_SETTINGS_COMMAND: Command;
4
- export declare class AiCoreCommandContribution implements CommandContribution {
5
- protected readonly handlerFactory: AICommandHandlerFactory;
6
- registerCommands(commands: CommandRegistry): void;
7
- }
8
- //# sourceMappingURL=ai-core-command-contribution.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-core-command-contribution.d.ts","sourceRoot":"","sources":["../../src/browser/ai-core-command-contribution.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AAGvE,eAAO,MAAM,wBAAwB,EAAE,OAIrC,CAAC;AAEH,qBACa,yBAA0B,YAAW,mBAAmB;IAChC,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,uBAAuB,CAAC;IAE5F,gBAAgB,CAAC,QAAQ,EAAE,eAAe,GAAG,IAAI;CAKpD"}
@@ -1,44 +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.AiCoreCommandContribution = exports.AI_SHOW_SETTINGS_COMMAND = void 0;
19
- const tslib_1 = require("tslib");
20
- const core_1 = require("@theia/core");
21
- const browser_1 = require("@theia/core/lib/browser");
22
- const ai_command_handler_factory_1 = require("./ai-command-handler-factory");
23
- const inversify_1 = require("@theia/core/shared/inversify");
24
- exports.AI_SHOW_SETTINGS_COMMAND = core_1.Command.toLocalizedCommand({
25
- id: 'ai-chat-ui.show-settings',
26
- label: 'Show AI Settings',
27
- iconClass: (0, browser_1.codicon)('settings-gear'),
28
- });
29
- let AiCoreCommandContribution = class AiCoreCommandContribution {
30
- registerCommands(commands) {
31
- commands.registerCommand(exports.AI_SHOW_SETTINGS_COMMAND, this.handlerFactory({
32
- execute: () => commands.executeCommand(browser_1.CommonCommands.OPEN_PREFERENCES.id, 'ai-features'),
33
- }));
34
- }
35
- };
36
- exports.AiCoreCommandContribution = AiCoreCommandContribution;
37
- tslib_1.__decorate([
38
- (0, inversify_1.inject)(ai_command_handler_factory_1.AICommandHandlerFactory),
39
- tslib_1.__metadata("design:type", Function)
40
- ], AiCoreCommandContribution.prototype, "handlerFactory", void 0);
41
- exports.AiCoreCommandContribution = AiCoreCommandContribution = tslib_1.__decorate([
42
- (0, inversify_1.injectable)()
43
- ], AiCoreCommandContribution);
44
- //# sourceMappingURL=ai-core-command-contribution.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-core-command-contribution.js","sourceRoot":"","sources":["../../src/browser/ai-core-command-contribution.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6EAA6E;AAC7E,yDAAyD;AACzD,uDAAuD;AACvD,EAAE;AACF,gFAAgF;AAChF,gFAAgF;;;;AAEhF,sCAA4E;AAC5E,qDAAkE;AAClE,6EAAuE;AACvE,4DAAkE;AAErD,QAAA,wBAAwB,GAAY,cAAO,CAAC,kBAAkB,CAAC;IACxE,EAAE,EAAE,0BAA0B;IAC9B,KAAK,EAAE,kBAAkB;IACzB,SAAS,EAAE,IAAA,iBAAO,EAAC,eAAe,CAAC;CACtC,CAAC,CAAC;AAGI,IAAM,yBAAyB,GAA/B,MAAM,yBAAyB;IAGlC,gBAAgB,CAAC,QAAyB;QACtC,QAAQ,CAAC,eAAe,CAAC,gCAAwB,EAAE,IAAI,CAAC,cAAc,CAAC;YACnE,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC,wBAAc,CAAC,gBAAgB,CAAC,EAAE,EAAE,aAAa,CAAC;SAC5F,CAAC,CAAC,CAAC;IACR,CAAC;CACJ,CAAA;AARY,8DAAyB;AACkB;IAAnD,IAAA,kBAAM,EAAC,oDAAuB,CAAC;;iEAA4D;oCADnF,yBAAyB;IADrC,IAAA,sBAAU,GAAE;GACA,yBAAyB,CAQrC"}