@theia/ai-ide 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 (309) hide show
  1. package/README.md +1 -0
  2. package/package.json +21 -21
  3. package/src/browser/ai-configuration/agent-configuration-widget.tsx +3 -3
  4. package/src/browser/file-changeset-functions.spec.ts +13 -13
  5. package/src/browser/file-changeset-functions.ts +9 -9
  6. package/src/browser/frontend-module.ts +7 -4
  7. package/src/browser/ide-chat-welcome-message-provider.tsx +64 -70
  8. package/src/browser/remember-command-contribution.ts +105 -0
  9. package/src/common/ai-ide-preferences.ts +1 -1
  10. package/src/common/coder-replace-prompt-template.ts +8 -9
  11. package/src/common/command-prompt-template.ts +5 -5
  12. package/src/common/file-changeset-function-ids.ts +15 -1
  13. package/src/common/orchestrator-chat-agent.ts +2 -2
  14. package/lib/browser/ai-configuration/agent-configuration-widget.d.ts +0 -41
  15. package/lib/browser/ai-configuration/agent-configuration-widget.d.ts.map +0 -1
  16. package/lib/browser/ai-configuration/agent-configuration-widget.js +0 -333
  17. package/lib/browser/ai-configuration/agent-configuration-widget.js.map +0 -1
  18. package/lib/browser/ai-configuration/ai-configuration-service.d.ts +0 -18
  19. package/lib/browser/ai-configuration/ai-configuration-service.d.ts.map +0 -1
  20. package/lib/browser/ai-configuration/ai-configuration-service.js +0 -53
  21. package/lib/browser/ai-configuration/ai-configuration-service.js.map +0 -1
  22. package/lib/browser/ai-configuration/ai-configuration-view-contribution.d.ts +0 -14
  23. package/lib/browser/ai-configuration/ai-configuration-view-contribution.d.ts.map +0 -1
  24. package/lib/browser/ai-configuration/ai-configuration-view-contribution.js +0 -67
  25. package/lib/browser/ai-configuration/ai-configuration-view-contribution.js.map +0 -1
  26. package/lib/browser/ai-configuration/ai-configuration-widget.d.ts +0 -29
  27. package/lib/browser/ai-configuration/ai-configuration-widget.d.ts.map +0 -1
  28. package/lib/browser/ai-configuration/ai-configuration-widget.js +0 -118
  29. package/lib/browser/ai-configuration/ai-configuration-widget.js.map +0 -1
  30. package/lib/browser/ai-configuration/language-model-renderer.d.ts +0 -13
  31. package/lib/browser/ai-configuration/language-model-renderer.d.ts.map +0 -1
  32. package/lib/browser/ai-configuration/language-model-renderer.js +0 -104
  33. package/lib/browser/ai-configuration/language-model-renderer.js.map +0 -1
  34. package/lib/browser/ai-configuration/mcp-configuration-widget.d.ts +0 -43
  35. package/lib/browser/ai-configuration/mcp-configuration-widget.d.ts.map +0 -1
  36. package/lib/browser/ai-configuration/mcp-configuration-widget.js +0 -302
  37. package/lib/browser/ai-configuration/mcp-configuration-widget.js.map +0 -1
  38. package/lib/browser/ai-configuration/model-aliases-configuration-widget.d.ts +0 -41
  39. package/lib/browser/ai-configuration/model-aliases-configuration-widget.d.ts.map +0 -1
  40. package/lib/browser/ai-configuration/model-aliases-configuration-widget.js +0 -226
  41. package/lib/browser/ai-configuration/model-aliases-configuration-widget.js.map +0 -1
  42. package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.d.ts +0 -141
  43. package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.d.ts.map +0 -1
  44. package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.js +0 -508
  45. package/lib/browser/ai-configuration/prompt-fragments-configuration-widget.js.map +0 -1
  46. package/lib/browser/ai-configuration/template-settings-renderer.d.ts +0 -10
  47. package/lib/browser/ai-configuration/template-settings-renderer.d.ts.map +0 -1
  48. package/lib/browser/ai-configuration/template-settings-renderer.js +0 -48
  49. package/lib/browser/ai-configuration/template-settings-renderer.js.map +0 -1
  50. package/lib/browser/ai-configuration/token-usage-configuration-widget.d.ts +0 -22
  51. package/lib/browser/ai-configuration/token-usage-configuration-widget.d.ts.map +0 -1
  52. package/lib/browser/ai-configuration/token-usage-configuration-widget.js +0 -156
  53. package/lib/browser/ai-configuration/token-usage-configuration-widget.js.map +0 -1
  54. package/lib/browser/ai-configuration/tools-configuration-widget.d.ts +0 -30
  55. package/lib/browser/ai-configuration/tools-configuration-widget.d.ts.map +0 -1
  56. package/lib/browser/ai-configuration/tools-configuration-widget.js +0 -150
  57. package/lib/browser/ai-configuration/tools-configuration-widget.js.map +0 -1
  58. package/lib/browser/ai-configuration/variable-configuration-widget.d.ts +0 -19
  59. package/lib/browser/ai-configuration/variable-configuration-widget.d.ts.map +0 -1
  60. package/lib/browser/ai-configuration/variable-configuration-widget.js +0 -99
  61. package/lib/browser/ai-configuration/variable-configuration-widget.js.map +0 -1
  62. package/lib/browser/ai-ide-activation-service.d.ts +0 -18
  63. package/lib/browser/ai-ide-activation-service.d.ts.map +0 -1
  64. package/lib/browser/ai-ide-activation-service.js +0 -71
  65. package/lib/browser/ai-ide-activation-service.js.map +0 -1
  66. package/lib/browser/ai-terminal-functions.d.ts +0 -13
  67. package/lib/browser/ai-terminal-functions.d.ts.map +0 -1
  68. package/lib/browser/ai-terminal-functions.js +0 -114
  69. package/lib/browser/ai-terminal-functions.js.map +0 -1
  70. package/lib/browser/app-tester-chat-agent.d.ts +0 -35
  71. package/lib/browser/app-tester-chat-agent.d.ts.map +0 -1
  72. package/lib/browser/app-tester-chat-agent.js +0 -142
  73. package/lib/browser/app-tester-chat-agent.js.map +0 -1
  74. package/lib/browser/app-tester-chat-functions.d.ts +0 -25
  75. package/lib/browser/app-tester-chat-functions.d.ts.map +0 -1
  76. package/lib/browser/app-tester-chat-functions.js +0 -170
  77. package/lib/browser/app-tester-chat-functions.js.map +0 -1
  78. package/lib/browser/app-tester-prompt-template.d.ts +0 -6
  79. package/lib/browser/app-tester-prompt-template.d.ts.map +0 -1
  80. package/lib/browser/app-tester-prompt-template.js +0 -83
  81. package/lib/browser/app-tester-prompt-template.js.map +0 -1
  82. package/lib/browser/architect-agent.d.ts +0 -15
  83. package/lib/browser/architect-agent.d.ts.map +0 -1
  84. package/lib/browser/architect-agent.js +0 -68
  85. package/lib/browser/architect-agent.js.map +0 -1
  86. package/lib/browser/coder-agent.d.ts +0 -15
  87. package/lib/browser/coder-agent.d.ts.map +0 -1
  88. package/lib/browser/coder-agent.js +0 -81
  89. package/lib/browser/coder-agent.js.map +0 -1
  90. package/lib/browser/context-file-validation-service-impl.d.ts +0 -13
  91. package/lib/browser/context-file-validation-service-impl.d.ts.map +0 -1
  92. package/lib/browser/context-file-validation-service-impl.js +0 -123
  93. package/lib/browser/context-file-validation-service-impl.js.map +0 -1
  94. package/lib/browser/context-file-validation-service-impl.spec.d.ts +0 -2
  95. package/lib/browser/context-file-validation-service-impl.spec.d.ts.map +0 -1
  96. package/lib/browser/context-file-validation-service-impl.spec.js +0 -340
  97. package/lib/browser/context-file-validation-service-impl.spec.js.map +0 -1
  98. package/lib/browser/context-functions.d.ts +0 -16
  99. package/lib/browser/context-functions.d.ts.map +0 -1
  100. package/lib/browser/context-functions.js +0 -166
  101. package/lib/browser/context-functions.js.map +0 -1
  102. package/lib/browser/context-functions.spec.d.ts +0 -2
  103. package/lib/browser/context-functions.spec.d.ts.map +0 -1
  104. package/lib/browser/context-functions.spec.js +0 -213
  105. package/lib/browser/context-functions.spec.js.map +0 -1
  106. package/lib/browser/file-changeset-function.spec.d.ts +0 -2
  107. package/lib/browser/file-changeset-function.spec.d.ts.map +0 -1
  108. package/lib/browser/file-changeset-function.spec.js +0 -45
  109. package/lib/browser/file-changeset-function.spec.js.map +0 -1
  110. package/lib/browser/file-changeset-functions.d.ts +0 -87
  111. package/lib/browser/file-changeset-functions.d.ts.map +0 -1
  112. package/lib/browser/file-changeset-functions.js +0 -645
  113. package/lib/browser/file-changeset-functions.js.map +0 -1
  114. package/lib/browser/file-changeset-functions.spec.d.ts +0 -2
  115. package/lib/browser/file-changeset-functions.spec.d.ts.map +0 -1
  116. package/lib/browser/file-changeset-functions.spec.js +0 -179
  117. package/lib/browser/file-changeset-functions.spec.js.map +0 -1
  118. package/lib/browser/frontend-module.d.ts +0 -5
  119. package/lib/browser/frontend-module.d.ts.map +0 -1
  120. package/lib/browser/frontend-module.js +0 -218
  121. package/lib/browser/frontend-module.js.map +0 -1
  122. package/lib/browser/github-chat-agent.d.ts +0 -48
  123. package/lib/browser/github-chat-agent.d.ts.map +0 -1
  124. package/lib/browser/github-chat-agent.js +0 -222
  125. package/lib/browser/github-chat-agent.js.map +0 -1
  126. package/lib/browser/github-prompt-template.d.ts +0 -6
  127. package/lib/browser/github-prompt-template.d.ts.map +0 -1
  128. package/lib/browser/github-prompt-template.js +0 -53
  129. package/lib/browser/github-prompt-template.js.map +0 -1
  130. package/lib/browser/github-repo-variable-contribution.d.ts +0 -15
  131. package/lib/browser/github-repo-variable-contribution.d.ts.map +0 -1
  132. package/lib/browser/github-repo-variable-contribution.js +0 -82
  133. package/lib/browser/github-repo-variable-contribution.js.map +0 -1
  134. package/lib/browser/ide-chat-welcome-message-provider.d.ts +0 -11
  135. package/lib/browser/ide-chat-welcome-message-provider.d.ts.map +0 -1
  136. package/lib/browser/ide-chat-welcome-message-provider.js +0 -142
  137. package/lib/browser/ide-chat-welcome-message-provider.js.map +0 -1
  138. package/lib/browser/project-info-agent.d.ts +0 -13
  139. package/lib/browser/project-info-agent.d.ts.map +0 -1
  140. package/lib/browser/project-info-agent.js +0 -45
  141. package/lib/browser/project-info-agent.js.map +0 -1
  142. package/lib/browser/summarize-session-command-contribution.d.ts +0 -19
  143. package/lib/browser/summarize-session-command-contribution.d.ts.map +0 -1
  144. package/lib/browser/summarize-session-command-contribution.js +0 -118
  145. package/lib/browser/summarize-session-command-contribution.js.map +0 -1
  146. package/lib/browser/task-background-summary-variable.d.ts +0 -9
  147. package/lib/browser/task-background-summary-variable.d.ts.map +0 -1
  148. package/lib/browser/task-background-summary-variable.js +0 -60
  149. package/lib/browser/task-background-summary-variable.js.map +0 -1
  150. package/lib/browser/task-context-agent.d.ts +0 -13
  151. package/lib/browser/task-context-agent.d.ts.map +0 -1
  152. package/lib/browser/task-context-agent.js +0 -45
  153. package/lib/browser/task-context-agent.js.map +0 -1
  154. package/lib/browser/task-context-file-storage-service.d.ts +0 -40
  155. package/lib/browser/task-context-file-storage-service.d.ts.map +0 -1
  156. package/lib/browser/task-context-file-storage-service.js +0 -232
  157. package/lib/browser/task-context-file-storage-service.js.map +0 -1
  158. package/lib/browser/template-preference-contribution.d.ts +0 -17
  159. package/lib/browser/template-preference-contribution.d.ts.map +0 -1
  160. package/lib/browser/template-preference-contribution.js +0 -94
  161. package/lib/browser/template-preference-contribution.js.map +0 -1
  162. package/lib/browser/test/tool-provider-cancellation-test-util.spec.d.ts +0 -2
  163. package/lib/browser/test/tool-provider-cancellation-test-util.spec.d.ts.map +0 -1
  164. package/lib/browser/test/tool-provider-cancellation-test-util.spec.js +0 -52
  165. package/lib/browser/test/tool-provider-cancellation-test-util.spec.js.map +0 -1
  166. package/lib/browser/workspace-functions.d.ts +0 -78
  167. package/lib/browser/workspace-functions.d.ts.map +0 -1
  168. package/lib/browser/workspace-functions.js +0 -697
  169. package/lib/browser/workspace-functions.js.map +0 -1
  170. package/lib/browser/workspace-functions.spec.d.ts +0 -2
  171. package/lib/browser/workspace-functions.spec.d.ts.map +0 -1
  172. package/lib/browser/workspace-functions.spec.js +0 -161
  173. package/lib/browser/workspace-functions.spec.js.map +0 -1
  174. package/lib/browser/workspace-launch-provider.d.ts +0 -24
  175. package/lib/browser/workspace-launch-provider.d.ts.map +0 -1
  176. package/lib/browser/workspace-launch-provider.js +0 -216
  177. package/lib/browser/workspace-launch-provider.js.map +0 -1
  178. package/lib/browser/workspace-launch-provider.spec.d.ts +0 -2
  179. package/lib/browser/workspace-launch-provider.spec.d.ts.map +0 -1
  180. package/lib/browser/workspace-launch-provider.spec.js +0 -245
  181. package/lib/browser/workspace-launch-provider.spec.js.map +0 -1
  182. package/lib/browser/workspace-search-provider.d.ts +0 -15
  183. package/lib/browser/workspace-search-provider.d.ts.map +0 -1
  184. package/lib/browser/workspace-search-provider.js +0 -204
  185. package/lib/browser/workspace-search-provider.js.map +0 -1
  186. package/lib/browser/workspace-search-provider.spec.d.ts +0 -2
  187. package/lib/browser/workspace-search-provider.spec.d.ts.map +0 -1
  188. package/lib/browser/workspace-search-provider.spec.js +0 -82
  189. package/lib/browser/workspace-search-provider.spec.js.map +0 -1
  190. package/lib/browser/workspace-task-provider.d.ts +0 -15
  191. package/lib/browser/workspace-task-provider.d.ts.map +0 -1
  192. package/lib/browser/workspace-task-provider.js +0 -138
  193. package/lib/browser/workspace-task-provider.js.map +0 -1
  194. package/lib/browser/workspace-task-provider.spec.d.ts +0 -2
  195. package/lib/browser/workspace-task-provider.spec.d.ts.map +0 -1
  196. package/lib/browser/workspace-task-provider.spec.js +0 -109
  197. package/lib/browser/workspace-task-provider.spec.js.map +0 -1
  198. package/lib/common/ai-configuration-preferences.d.ts +0 -8
  199. package/lib/common/ai-configuration-preferences.d.ts.map +0 -1
  200. package/lib/common/ai-configuration-preferences.js +0 -41
  201. package/lib/common/ai-configuration-preferences.js.map +0 -1
  202. package/lib/common/ai-ide-preferences.d.ts +0 -5
  203. package/lib/common/ai-ide-preferences.d.ts.map +0 -1
  204. package/lib/common/ai-ide-preferences.js +0 -53
  205. package/lib/common/ai-ide-preferences.js.map +0 -1
  206. package/lib/common/ai-terminal-functions.d.ts +0 -2
  207. package/lib/common/ai-terminal-functions.d.ts.map +0 -1
  208. package/lib/common/ai-terminal-functions.js +0 -20
  209. package/lib/common/ai-terminal-functions.js.map +0 -1
  210. package/lib/common/app-tester-chat-functions.d.ts +0 -5
  211. package/lib/common/app-tester-chat-functions.d.ts.map +0 -1
  212. package/lib/common/app-tester-chat-functions.js +0 -23
  213. package/lib/common/app-tester-chat-functions.js.map +0 -1
  214. package/lib/common/architect-prompt-template.d.ts +0 -3
  215. package/lib/common/architect-prompt-template.d.ts.map +0 -1
  216. package/lib/common/architect-prompt-template.js +0 -81
  217. package/lib/common/architect-prompt-template.js.map +0 -1
  218. package/lib/common/browser-automation-protocol.d.ts +0 -15
  219. package/lib/common/browser-automation-protocol.d.ts.map +0 -1
  220. package/lib/common/browser-automation-protocol.js +0 -22
  221. package/lib/common/browser-automation-protocol.js.map +0 -1
  222. package/lib/common/coder-replace-prompt-template.d.ts +0 -11
  223. package/lib/common/coder-replace-prompt-template.d.ts.map +0 -1
  224. package/lib/common/coder-replace-prompt-template.js +0 -295
  225. package/lib/common/coder-replace-prompt-template.js.map +0 -1
  226. package/lib/common/command-chat-agents.d.ts +0 -36
  227. package/lib/common/command-chat-agents.d.ts.map +0 -1
  228. package/lib/common/command-chat-agents.js +0 -122
  229. package/lib/common/command-chat-agents.js.map +0 -1
  230. package/lib/common/command-prompt-template.d.ts +0 -3
  231. package/lib/common/command-prompt-template.d.ts.map +0 -1
  232. package/lib/common/command-prompt-template.js +0 -226
  233. package/lib/common/command-prompt-template.js.map +0 -1
  234. package/lib/common/context-files-variable.d.ts +0 -9
  235. package/lib/common/context-files-variable.d.ts.map +0 -1
  236. package/lib/common/context-files-variable.js +0 -52
  237. package/lib/common/context-files-variable.js.map +0 -1
  238. package/lib/common/context-functions.d.ts +0 -4
  239. package/lib/common/context-functions.d.ts.map +0 -1
  240. package/lib/common/context-functions.js +0 -22
  241. package/lib/common/context-functions.js.map +0 -1
  242. package/lib/common/context-variables.d.ts +0 -3
  243. package/lib/common/context-variables.d.ts.map +0 -1
  244. package/lib/common/context-variables.js +0 -21
  245. package/lib/common/context-variables.js.map +0 -1
  246. package/lib/common/file-changeset-function-ids.d.ts +0 -8
  247. package/lib/common/file-changeset-function-ids.d.ts.map +0 -1
  248. package/lib/common/file-changeset-function-ids.js +0 -26
  249. package/lib/common/file-changeset-function-ids.js.map +0 -1
  250. package/lib/common/github-repo-protocol.d.ts +0 -15
  251. package/lib/common/github-repo-protocol.d.ts.map +0 -1
  252. package/lib/common/github-repo-protocol.js +0 -21
  253. package/lib/common/github-repo-protocol.js.map +0 -1
  254. package/lib/common/orchestrator-chat-agent.d.ts +0 -36
  255. package/lib/common/orchestrator-chat-agent.d.ts.map +0 -1
  256. package/lib/common/orchestrator-chat-agent.js +0 -167
  257. package/lib/common/orchestrator-chat-agent.js.map +0 -1
  258. package/lib/common/orchestrator-prompt-template.d.ts +0 -3
  259. package/lib/common/orchestrator-prompt-template.d.ts.map +0 -1
  260. package/lib/common/orchestrator-prompt-template.js +0 -55
  261. package/lib/common/orchestrator-prompt-template.js.map +0 -1
  262. package/lib/common/project-info-prompt-template.d.ts +0 -6
  263. package/lib/common/project-info-prompt-template.d.ts.map +0 -1
  264. package/lib/common/project-info-prompt-template.js +0 -145
  265. package/lib/common/project-info-prompt-template.js.map +0 -1
  266. package/lib/common/summarize-session-commands.d.ts +0 -4
  267. package/lib/common/summarize-session-commands.d.ts.map +0 -1
  268. package/lib/common/summarize-session-commands.js +0 -28
  269. package/lib/common/summarize-session-commands.js.map +0 -1
  270. package/lib/common/task-context-prompt-template.d.ts +0 -8
  271. package/lib/common/task-context-prompt-template.d.ts.map +0 -1
  272. package/lib/common/task-context-prompt-template.js +0 -217
  273. package/lib/common/task-context-prompt-template.js.map +0 -1
  274. package/lib/common/universal-chat-agent.d.ts +0 -17
  275. package/lib/common/universal-chat-agent.d.ts.map +0 -1
  276. package/lib/common/universal-chat-agent.js +0 -47
  277. package/lib/common/universal-chat-agent.js.map +0 -1
  278. package/lib/common/universal-prompt-template.d.ts +0 -4
  279. package/lib/common/universal-prompt-template.d.ts.map +0 -1
  280. package/lib/common/universal-prompt-template.js +0 -32
  281. package/lib/common/universal-prompt-template.js.map +0 -1
  282. package/lib/common/workspace-functions.d.ts +0 -12
  283. package/lib/common/workspace-functions.d.ts.map +0 -1
  284. package/lib/common/workspace-functions.js +0 -30
  285. package/lib/common/workspace-functions.js.map +0 -1
  286. package/lib/common/workspace-preferences.d.ts +0 -10
  287. package/lib/common/workspace-preferences.d.ts.map +0 -1
  288. package/lib/common/workspace-preferences.js +0 -89
  289. package/lib/common/workspace-preferences.js.map +0 -1
  290. package/lib/common/workspace-search-provider-util.d.ts +0 -17
  291. package/lib/common/workspace-search-provider-util.d.ts.map +0 -1
  292. package/lib/common/workspace-search-provider-util.js +0 -51
  293. package/lib/common/workspace-search-provider-util.js.map +0 -1
  294. package/lib/node/app-tester-agent/browser-automation-impl.d.ts +0 -18
  295. package/lib/node/app-tester-agent/browser-automation-impl.d.ts.map +0 -1
  296. package/lib/node/app-tester-agent/browser-automation-impl.js +0 -96
  297. package/lib/node/app-tester-agent/browser-automation-impl.js.map +0 -1
  298. package/lib/node/backend-module.d.ts +0 -4
  299. package/lib/node/backend-module.d.ts.map +0 -1
  300. package/lib/node/backend-module.js +0 -45
  301. package/lib/node/backend-module.js.map +0 -1
  302. package/lib/node/github-repo-service-impl.d.ts +0 -7
  303. package/lib/node/github-repo-service-impl.d.ts.map +0 -1
  304. package/lib/node/github-repo-service-impl.js +0 -86
  305. package/lib/node/github-repo-service-impl.js.map +0 -1
  306. package/lib/package.spec.d.ts +0 -1
  307. package/lib/package.spec.d.ts.map +0 -1
  308. package/lib/package.spec.js +0 -26
  309. package/lib/package.spec.js.map +0 -1
@@ -1,83 +0,0 @@
1
- "use strict";
2
- /* eslint-disable @typescript-eslint/tslint/config */
3
- // *****************************************************************************
4
- // Copyright (C) 2025 EclipseSource GmbH and others.
5
- //
6
- // This file is licensed under the MIT License.
7
- // See LICENSE-MIT.txt in the project root for license information.
8
- // https://opensource.org/license/mit.
9
- //
10
- // SPDX-License-Identifier: MIT
11
- // *****************************************************************************
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.appTesterTemplateVariant = exports.appTesterTemplate = exports.REQUIRED_MCP_SERVERS = void 0;
14
- const ai_chat_1 = require("@theia/ai-chat");
15
- const app_tester_chat_functions_1 = require("../common/app-tester-chat-functions");
16
- const workspace_functions_1 = require("../common/workspace-functions");
17
- exports.REQUIRED_MCP_SERVERS = [
18
- {
19
- name: 'playwright',
20
- command: 'npx',
21
- args: ['-y', '@playwright/mcp@latest',
22
- '--cdp-endpoint',
23
- 'http://localhost:9222/'],
24
- autostart: false,
25
- env: {},
26
- },
27
- {
28
- name: 'playwright-visual',
29
- command: 'npx',
30
- args: ['-y', '@playwright/mcp@latest', '--vision',
31
- '--cdp-endpoint',
32
- 'http://localhost:9222/'],
33
- autostart: false,
34
- env: {},
35
- }
36
- ];
37
- exports.appTesterTemplate = {
38
- id: 'app-tester-system-default',
39
- template: `{{!-- This prompt is licensed under the MIT License (https://opensource.org/license/mit).
40
- Made improvements or adaptations to this prompt template? We'd love for you to share it with the community! Contribute back here:
41
- https://github.com/eclipse-theia/theia/discussions/new?category=prompt-template-contribution --}}
42
-
43
- You are AppTester, an AI assistant integrated into Theia IDE specifically designed to help developers test running applications using Playwright.
44
- Your role is to inspect the application for user-specified test scenarios through the Playwright MCP server.
45
-
46
- ## Your Workflow
47
- 1. Help the user build and launch their application
48
- 2. Use Playwright browser automation to validate test scenarios
49
- 3. Report results and provide actionable feedback
50
- 4. Help fix issues when needed
51
-
52
- ## Available Playwright Testing Tools
53
- You have access to these powerful automation tools:
54
- ${exports.REQUIRED_MCP_SERVERS.map(server => `{{prompt:mcp_${server.name}_tools}}`)}
55
-
56
- - **~{${app_tester_chat_functions_1.LAUNCH_BROWSER_FUNCTION_ID}}**: Launch the browser. This is required before performing any browser interactions. Always launch a new browser when starting a test session.
57
- - **~{${app_tester_chat_functions_1.IS_BROWSER_RUNNING_FUNCTION_ID}}**: Check if the browser is running. If a tool fails by saying that the connection failed, you can verify the connection by using this tool.
58
- - **~{${app_tester_chat_functions_1.CLOSE_BROWSER_FUNCTION_ID}}**: Close the browser.
59
- - **~{${app_tester_chat_functions_1.QUERY_DOM_FUNCTION_ID}}**: Query the DOM for specific elements and their properties. Only use when explicitly requested by the user.
60
- - **~{${workspace_functions_1.LIST_LAUNCH_CONFIGURATIONS_FUNCTION_ID}}**: To get a list of all available launch configurations. If there are no launch configurations, ask the user to manually start\
61
- the App or configure one.
62
- - **~{${workspace_functions_1.RUN_LAUNCH_CONFIGURATION_FUNCTION_ID}}**: Use this to launch the App under test (in case it is not already running)
63
- - **~{${workspace_functions_1.STOP_LAUNCH_CONFIGURATION_FUNCTION_ID}}**: To stop Apps once the testing is done
64
-
65
- Prefer snapshots for investigating the page.
66
-
67
- ## Workflow Approach
68
- 1. **Understand Requirements**: Ask the user to clearly define what needs to be tested
69
- 2. **Launch Browser**: Start a fresh browser instance for testing
70
- 3. **Navigate and Test**: Execute the test scenario methodically
71
- 4. **Document Results**: Provide detailed results with screenshots when helpful
72
- 5. **Clean Up**: Always close the browser when testing is complete
73
-
74
- ## Current Context
75
- Some files and other pieces of data may have been added by the user to the context of the chat. If any have, the details can be found below.
76
- {{${ai_chat_1.CHAT_CONTEXT_DETAILS_VARIABLE_ID}}}
77
- `
78
- };
79
- exports.appTesterTemplateVariant = {
80
- id: 'app-tester-system-empty',
81
- template: '',
82
- };
83
- //# sourceMappingURL=app-tester-prompt-template.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"app-tester-prompt-template.js","sourceRoot":"","sources":["../../src/browser/app-tester-prompt-template.ts"],"names":[],"mappings":";AAAA,qDAAqD;AACrD,gFAAgF;AAChF,oDAAoD;AACpD,EAAE;AACF,+CAA+C;AAC/C,mEAAmE;AACnE,sCAAsC;AACtC,EAAE;AACF,+BAA+B;AAC/B,gFAAgF;;;AAGhF,4CAAkE;AAClE,mFAAmK;AAEnK,uEAAoK;AAEvJ,QAAA,oBAAoB,GAA2B;IACxD;QACI,IAAI,EAAE,YAAY;QAClB,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,CAAC,IAAI,EAAE,wBAAwB;YACjC,gBAAgB;YAChB,wBAAwB,CAAC;QAC7B,SAAS,EAAE,KAAK;QAChB,GAAG,EAAE,EAAE;KACV;IACD;QACI,IAAI,EAAE,mBAAmB;QACzB,OAAO,EAAE,KAAK;QACd,IAAI,EAAE,CAAC,IAAI,EAAE,wBAAwB,EAAE,UAAU;YAC7C,gBAAgB;YAChB,wBAAwB,CAAC;QAC7B,SAAS,EAAE,KAAK;QAChB,GAAG,EAAE,EAAE;KACV;CACJ,CAAC;AAEW,QAAA,iBAAiB,GAAuB;IACjD,EAAE,EAAE,2BAA2B;IAC/B,QAAQ,EAAE;;;;;;;;;;;;;;;EAeZ,4BAAoB,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,gBAAgB,MAAM,CAAC,IAAI,UAAU,CAAC;;QAEnE,sDAA0B;QAC1B,0DAA8B;QAC9B,qDAAyB;QACzB,iDAAqB;QACrB,4DAAsC;;QAEtC,0DAAoC;QACpC,2DAAqC;;;;;;;;;;;;;IAazC,0CAAgC;CACnC;CACA,CAAC;AAEW,QAAA,wBAAwB,GAAuB;IACxD,EAAE,EAAE,yBAAyB;IAC7B,QAAQ,EAAE,EAAE;CACf,CAAC"}
@@ -1,15 +0,0 @@
1
- import { AbstractStreamParsingChatAgent, ChatRequestModel, ChatService, ChatSession, MutableChatRequestModel } from '@theia/ai-chat/lib/common';
2
- import { LanguageModelRequirement } from '@theia/ai-core';
3
- export declare class ArchitectAgent extends AbstractStreamParsingChatAgent {
4
- protected readonly chatService: ChatService;
5
- name: string;
6
- id: string;
7
- languageModelRequirements: LanguageModelRequirement[];
8
- protected defaultLanguageModelPurpose: string;
9
- description: string;
10
- prompts: import("@theia/ai-core").PromptVariantSet[];
11
- protected systemPromptId: string | undefined;
12
- invoke(request: MutableChatRequestModel): Promise<void>;
13
- suggest(context: ChatSession | ChatRequestModel): Promise<void>;
14
- }
15
- //# sourceMappingURL=architect-agent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"architect-agent.d.ts","sourceRoot":"","sources":["../../src/browser/architect-agent.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,8BAA8B,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAAoB,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAClK,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAO1D,qBACa,cAAe,SAAQ,8BAA8B;IACzC,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAEjE,IAAI,SAAe;IACnB,EAAE,SAAe;IACjB,yBAAyB,EAAE,wBAAwB,EAAE,CAGlD;IACH,SAAS,CAAC,2BAA2B,EAAE,MAAM,CAAU;IAE9C,WAAW,SAG8G;IACzH,OAAO,8CAA6B;IAC7C,UAAmB,cAAc,EAAE,MAAM,GAAG,SAAS,CAA8B;IAEpE,MAAM,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC;IAKhE,OAAO,CAAC,OAAO,EAAE,WAAW,GAAG,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;CAaxE"}
@@ -1,68 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ArchitectAgent = 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 common_1 = require("@theia/ai-chat/lib/common");
21
- const inversify_1 = require("@theia/core/shared/inversify");
22
- const architect_prompt_template_1 = require("../common/architect-prompt-template");
23
- const core_1 = require("@theia/core");
24
- const markdown_rendering_1 = require("@theia/core/lib/common/markdown-rendering");
25
- const summarize_session_commands_1 = require("../common/summarize-session-commands");
26
- let ArchitectAgent = class ArchitectAgent extends common_1.AbstractStreamParsingChatAgent {
27
- constructor() {
28
- super(...arguments);
29
- this.name = 'Architect';
30
- this.id = 'Architect';
31
- this.languageModelRequirements = [{
32
- purpose: 'chat',
33
- identifier: 'default/code',
34
- }];
35
- this.defaultLanguageModelPurpose = 'chat';
36
- this.description = core_1.nls.localize('theia/ai/workspace/workspaceAgent/description', 'An AI assistant integrated into Theia IDE, designed to assist software developers. This agent can access the users workspace, it can get a list of all available files \
37
- and folders and retrieve their content. It cannot modify files. It can therefore answer questions about the current project, project files and source code in the \
38
- workspace, such as how to build the project, where to put source code, where to find specific code or configurations, etc.');
39
- this.prompts = [architect_prompt_template_1.architectSystemVariants];
40
- this.systemPromptId = architect_prompt_template_1.architectSystemVariants.id;
41
- }
42
- async invoke(request) {
43
- await super.invoke(request);
44
- this.suggest(request);
45
- }
46
- async suggest(context) {
47
- const model = common_1.ChatRequestModel.is(context) ? context.session : context.model;
48
- const session = this.chatService.getSessions().find(candidate => candidate.model.id === model.id);
49
- if (!(model instanceof common_1.MutableChatModel) || !session) {
50
- return;
51
- }
52
- if (!model.isEmpty()) {
53
- model.setSuggestions([
54
- new markdown_rendering_1.MarkdownStringImpl(`[${core_1.nls.localize('theia/ai/ide/architectAgent/suggestion/summarizeSessionAsTaskForCoder', 'Summarize this session as a task for Coder')}](command:${summarize_session_commands_1.AI_SUMMARIZE_SESSION_AS_TASK_FOR_CODER.id}).`),
55
- new markdown_rendering_1.MarkdownStringImpl(`[${core_1.nls.localize('theia/ai/ide/architectAgent/suggestion/updateTaskContext', 'Update current task context')}](command:${summarize_session_commands_1.AI_UPDATE_TASK_CONTEXT_COMMAND.id}).`)
56
- ]);
57
- }
58
- }
59
- };
60
- exports.ArchitectAgent = ArchitectAgent;
61
- tslib_1.__decorate([
62
- (0, inversify_1.inject)(common_1.ChatService),
63
- tslib_1.__metadata("design:type", Object)
64
- ], ArchitectAgent.prototype, "chatService", void 0);
65
- exports.ArchitectAgent = ArchitectAgent = tslib_1.__decorate([
66
- (0, inversify_1.injectable)()
67
- ], ArchitectAgent);
68
- //# sourceMappingURL=architect-agent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"architect-agent.js","sourceRoot":"","sources":["../../src/browser/architect-agent.ts"],"names":[],"mappings":";;;;AAAA,gFAAgF;AAChF,yCAAyC;AAC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,KAAK,YAAY,yBAAgB,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YAAC,OAAO;QAAC,CAAC;QACjE,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;YACnB,KAAK,CAAC,cAAc,CAAC;gBACjB,IAAI,uCAAkB,CAAC,IAAI,UAAG,CAAC,QAAQ,CAAC,uEAAuE,EAC3G,4CAA4C,CAAC,aAAa,mEAAsC,CAAC,EAAE,IAAI,CAAC;gBAC5G,IAAI,uCAAkB,CAAC,IAAI,UAAG,CAAC,QAAQ,CAAC,0DAA0D,EAC9F,6BAA6B,CAAC,aAAa,2DAA8B,CAAC,EAAE,IAAI,CAAC;aACxF,CAAC,CAAC;QACP,CAAC;IACL,CAAC;CACJ,CAAA;AApCY,wCAAc;AACiB;IAAvC,IAAA,kBAAM,EAAC,oBAAW,CAAC;;mDAA6C;yBADxD,cAAc;IAD1B,IAAA,sBAAU,GAAE;GACA,cAAc,CAoC1B"}
@@ -1,15 +0,0 @@
1
- import { AbstractStreamParsingChatAgent, ChatRequestModel, ChatService, ChatSession, MutableChatRequestModel } from '@theia/ai-chat/lib/common';
2
- import { LanguageModelRequirement, PromptVariantSet } from '@theia/ai-core';
3
- export declare class CoderAgent extends AbstractStreamParsingChatAgent {
4
- protected readonly chatService: ChatService;
5
- id: string;
6
- name: string;
7
- languageModelRequirements: LanguageModelRequirement[];
8
- protected defaultLanguageModelPurpose: string;
9
- description: string;
10
- prompts: PromptVariantSet[];
11
- protected systemPromptId: string | undefined;
12
- invoke(request: MutableChatRequestModel): Promise<void>;
13
- suggest(context: ChatSession | ChatRequestModel): Promise<void>;
14
- }
15
- //# sourceMappingURL=coder-agent.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"coder-agent.d.ts","sourceRoot":"","sources":["../../src/browser/coder-agent.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,8BAA8B,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAAoB,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAIlK,OAAO,EAAE,wBAAwB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAK5E,qBACa,UAAW,SAAQ,8BAA8B;IACrC,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IACjE,EAAE,EAAE,MAAM,CAAW;IACrB,IAAI,SAAW;IACf,yBAAyB,EAAE,wBAAwB,EAAE,CAGlD;IACH,SAAS,CAAC,2BAA2B,EAAE,MAAM,CAAU;IAE9C,WAAW,SAGgB;IAC3B,OAAO,EAAE,gBAAgB,EAAE,CAIjC;IACH,UAAmB,cAAc,EAAE,MAAM,GAAG,SAAS,CAA0B;IAChE,MAAM,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC;IAIhE,OAAO,CAAC,OAAO,EAAE,WAAW,GAAG,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;CAsBxE"}
@@ -1,81 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.CoderAgent = void 0;
4
- const tslib_1 = require("tslib");
5
- // *****************************************************************************
6
- // Copyright (C) 2025 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 common_1 = require("@theia/ai-chat/lib/common");
21
- const inversify_1 = require("@theia/core/shared/inversify");
22
- const coder_replace_prompt_template_1 = require("../common/coder-replace-prompt-template");
23
- const core_1 = require("@theia/core");
24
- const markdown_rendering_1 = require("@theia/core/lib/common/markdown-rendering");
25
- const chat_view_commands_1 = require("@theia/ai-chat-ui/lib/browser/chat-view-commands");
26
- let CoderAgent = class CoderAgent extends common_1.AbstractStreamParsingChatAgent {
27
- constructor() {
28
- super(...arguments);
29
- this.id = 'Coder';
30
- this.name = 'Coder';
31
- this.languageModelRequirements = [{
32
- purpose: 'chat',
33
- identifier: 'default/code',
34
- }];
35
- this.defaultLanguageModelPurpose = 'chat';
36
- this.description = core_1.nls.localize('theia/ai/workspace/coderAgent/description', 'An AI assistant integrated into Theia IDE, designed to assist software developers. This agent can access the users workspace, it can get a list of all available files \
37
- and folders and retrieve their content. Furthermore, it can suggest modifications of files to the user. It can therefore assist the user with coding tasks or other \
38
- tasks involving file changes.');
39
- this.prompts = [{
40
- id: coder_replace_prompt_template_1.CODER_SYSTEM_PROMPT_ID,
41
- defaultVariant: (0, coder_replace_prompt_template_1.getCoderPromptTemplateEdit)(),
42
- variants: [(0, coder_replace_prompt_template_1.getCoderPromptTemplateSimpleEdit)(), (0, coder_replace_prompt_template_1.getCoderAgentModePromptTemplate)(), (0, coder_replace_prompt_template_1.getCoderPromptTemplateEditNext)()]
43
- }];
44
- this.systemPromptId = coder_replace_prompt_template_1.CODER_SYSTEM_PROMPT_ID;
45
- }
46
- async invoke(request) {
47
- await super.invoke(request);
48
- this.suggest(request);
49
- }
50
- async suggest(context) {
51
- const contextIsRequest = common_1.ChatRequestModel.is(context);
52
- const model = contextIsRequest ? context.session : context.model;
53
- const session = contextIsRequest ? this.chatService.getSessions().find(candidate => candidate.model.id === model.id) : context;
54
- if (!(model instanceof common_1.MutableChatModel) || !session) {
55
- return;
56
- }
57
- if (model.isEmpty()) {
58
- model.setSuggestions([
59
- {
60
- kind: 'callback',
61
- callback: () => this.chatService.sendRequest(session.id, {
62
- text: `@Coder ${core_1.nls.localize('theia/ai/ide/coderAgent/suggestion/fixProblems/prompt', 'please look at {1} and fix any problems.', '#_f')}`
63
- }),
64
- content: core_1.nls.localize('theia/ai/ide/coderAgent/suggestion/fixProblems/content', '[Fix problems]({0}) in the current file.', '_callback')
65
- },
66
- ]);
67
- }
68
- else {
69
- model.setSuggestions([new markdown_rendering_1.MarkdownStringImpl(core_1.nls.localize('theia/ai/ide/coderAgent/suggestion/startNewChat', 'Keep chats short and focused. [Start a new chat]({0}) for a new task or [start a new chat with a summary of this one]({1}).', `command:${chat_view_commands_1.AI_CHAT_NEW_CHAT_WINDOW_COMMAND.id}`, `command:${chat_view_commands_1.ChatCommands.AI_CHAT_NEW_WITH_TASK_CONTEXT.id}`))]);
70
- }
71
- }
72
- };
73
- exports.CoderAgent = CoderAgent;
74
- tslib_1.__decorate([
75
- (0, inversify_1.inject)(common_1.ChatService),
76
- tslib_1.__metadata("design:type", Object)
77
- ], CoderAgent.prototype, "chatService", void 0);
78
- exports.CoderAgent = CoderAgent = tslib_1.__decorate([
79
- (0, inversify_1.injectable)()
80
- ], CoderAgent);
81
- //# sourceMappingURL=coder-agent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"coder-agent.js","sourceRoot":"","sources":["../../src/browser/coder-agent.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,sDAAkK;AAClK,4DAAkE;AAClE,2FACmD;AAEnD,sCAAkC;AAClC,kFAA+E;AAC/E,yFAAiH;AAG1G,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,uCAA8B;IAAvD;;QAEH,OAAE,GAAW,OAAO,CAAC;QACrB,SAAI,GAAG,OAAO,CAAC;QACf,8BAAyB,GAA+B,CAAC;gBACrD,OAAO,EAAE,MAAM;gBACf,UAAU,EAAE,cAAc;aAC7B,CAAC,CAAC;QACO,gCAA2B,GAAW,MA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WAAW,CAAC,OAAO,CAAC,EAAE,EAAE;wBACrD,IAAI,EAAE,UAAU,UAAG,CAAC,QAAQ,CAAC,uDAAuD,EAAE,0CAA0C,EAAE,KAAK,CAAC,EAAE;qBAC7I,CAAC;oBACF,OAAO,EAAE,UAAG,CAAC,QAAQ,CAAC,wDAAwD,EAAE,0CAA0C,EAAE,WAAW,CAAC;iBAC3I;aACJ,CAAC,CAAC;QACP,CAAC;aAAM,CAAC;YACJ,KAAK,CAAC,cAAc,CAAC,CAAC,IAAI,uCAAkB,CAAC,UAAG,CAAC,QAAQ,CAAC,iDAAiD,EACvG,6HAA6H,EAC7H,WAAW,oDAA+B,CAAC,EAAE,EAAE,EAAE,WAAW,iCAAY,CAAC,6BAA6B,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QACxH,CAAC;IACL,CAAC;CAEJ,CAAA;AA9CY,gCAAU;AACqB;IAAvC,IAAA,kBAAM,EAAC,oBAAW,CAAC;;+CAA6C;qBADxD,UAAU;IADtB,IAAA,sBAAU,GAAE;GACA,UAAU,CA8CtB"}
@@ -1,13 +0,0 @@
1
- import { URI } from '@theia/core';
2
- import { FileService } from '@theia/filesystem/lib/browser/file-service';
3
- import { WorkspaceService } from '@theia/workspace/lib/browser/workspace-service';
4
- import { ContextFileValidationService, FileValidationResult } from '@theia/ai-chat/lib/browser/context-file-validation-service';
5
- import { WorkspaceFunctionScope } from './workspace-functions';
6
- export declare class ContextFileValidationServiceImpl implements ContextFileValidationService {
7
- protected readonly fileService: FileService;
8
- protected readonly workspaceScope: WorkspaceFunctionScope;
9
- protected readonly workspaceService: WorkspaceService;
10
- validateFile(pathOrUri: string | URI): Promise<FileValidationResult>;
11
- protected findInSecondaryWorkspaceRoots(pathOrUri: string | URI): Promise<URI | undefined>;
12
- }
13
- //# sourceMappingURL=context-file-validation-service-impl.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context-file-validation-service-impl.d.ts","sourceRoot":"","sources":["../../src/browser/context-file-validation-service-impl.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,gDAAgD,CAAC;AAClF,OAAO,EAAE,4BAA4B,EAAE,oBAAoB,EAAuB,MAAM,4DAA4D,CAAC;AACrJ,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,qBACa,gCAAiC,YAAW,4BAA4B;IAGjF,SAAS,CAAC,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAG5C,SAAS,CAAC,QAAQ,CAAC,cAAc,EAAE,sBAAsB,CAAC;IAG1D,SAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,gBAAgB,CAAC;IAEhD,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC,oBAAoB,CAAC;cAmD1D,6BAA6B,CAAC,SAAS,EAAE,MAAM,GAAG,GAAG,GAAG,OAAO,CAAC,GAAG,GAAG,SAAS,CAAC;CAiCnG"}
@@ -1,123 +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.ContextFileValidationServiceImpl = void 0;
19
- const tslib_1 = require("tslib");
20
- const inversify_1 = require("@theia/core/shared/inversify");
21
- const core_1 = require("@theia/core");
22
- const file_service_1 = require("@theia/filesystem/lib/browser/file-service");
23
- const workspace_service_1 = require("@theia/workspace/lib/browser/workspace-service");
24
- const context_file_validation_service_1 = require("@theia/ai-chat/lib/browser/context-file-validation-service");
25
- const workspace_functions_1 = require("./workspace-functions");
26
- let ContextFileValidationServiceImpl = class ContextFileValidationServiceImpl {
27
- async validateFile(pathOrUri) {
28
- try {
29
- const resolvedUri = await this.workspaceScope.resolveToUri(pathOrUri);
30
- if (!resolvedUri) {
31
- return {
32
- state: context_file_validation_service_1.FileValidationState.INVALID_NOT_FOUND,
33
- message: 'File does not exist'
34
- };
35
- }
36
- const exists = await this.fileService.exists(resolvedUri);
37
- if (!exists) {
38
- const secondaryRootUri = await this.findInSecondaryWorkspaceRoots(pathOrUri);
39
- if (secondaryRootUri) {
40
- return {
41
- state: context_file_validation_service_1.FileValidationState.INVALID_SECONDARY,
42
- message: 'File is in a secondary workspace root. AI agents can only access files in the first workspace root.'
43
- };
44
- }
45
- return {
46
- state: context_file_validation_service_1.FileValidationState.INVALID_NOT_FOUND,
47
- message: 'File does not exist'
48
- };
49
- }
50
- if (this.workspaceScope.isInPrimaryWorkspace(resolvedUri)) {
51
- return {
52
- state: context_file_validation_service_1.FileValidationState.VALID
53
- };
54
- }
55
- if (this.workspaceScope.isInWorkspace(resolvedUri)) {
56
- return {
57
- state: context_file_validation_service_1.FileValidationState.INVALID_SECONDARY,
58
- message: 'File is in a secondary workspace root. AI agents can only access files in the first workspace root.'
59
- };
60
- }
61
- return {
62
- state: context_file_validation_service_1.FileValidationState.INVALID_NOT_FOUND,
63
- message: 'File does not exist in the workspace'
64
- };
65
- }
66
- catch (error) {
67
- return {
68
- state: context_file_validation_service_1.FileValidationState.INVALID_NOT_FOUND,
69
- message: 'File does not exist'
70
- };
71
- }
72
- }
73
- async findInSecondaryWorkspaceRoots(pathOrUri) {
74
- const roots = this.workspaceService.tryGetRoots();
75
- if (roots.length <= 1) {
76
- return undefined;
77
- }
78
- for (let i = 1; i < roots.length; i++) {
79
- const root = roots[i];
80
- let candidateUri;
81
- if (pathOrUri instanceof core_1.URI) {
82
- candidateUri = pathOrUri;
83
- }
84
- else if (pathOrUri.includes('://')) {
85
- try {
86
- candidateUri = new core_1.URI(pathOrUri);
87
- }
88
- catch {
89
- continue;
90
- }
91
- }
92
- else {
93
- candidateUri = root.resource.resolve(pathOrUri);
94
- }
95
- try {
96
- if (await this.fileService.exists(candidateUri)) {
97
- return candidateUri;
98
- }
99
- }
100
- catch {
101
- continue;
102
- }
103
- }
104
- return undefined;
105
- }
106
- };
107
- exports.ContextFileValidationServiceImpl = ContextFileValidationServiceImpl;
108
- tslib_1.__decorate([
109
- (0, inversify_1.inject)(file_service_1.FileService),
110
- tslib_1.__metadata("design:type", file_service_1.FileService)
111
- ], ContextFileValidationServiceImpl.prototype, "fileService", void 0);
112
- tslib_1.__decorate([
113
- (0, inversify_1.inject)(workspace_functions_1.WorkspaceFunctionScope),
114
- tslib_1.__metadata("design:type", workspace_functions_1.WorkspaceFunctionScope)
115
- ], ContextFileValidationServiceImpl.prototype, "workspaceScope", void 0);
116
- tslib_1.__decorate([
117
- (0, inversify_1.inject)(workspace_service_1.WorkspaceService),
118
- tslib_1.__metadata("design:type", workspace_service_1.WorkspaceService)
119
- ], ContextFileValidationServiceImpl.prototype, "workspaceService", void 0);
120
- exports.ContextFileValidationServiceImpl = ContextFileValidationServiceImpl = tslib_1.__decorate([
121
- (0, inversify_1.injectable)()
122
- ], ContextFileValidationServiceImpl);
123
- //# sourceMappingURL=context-file-validation-service-impl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context-file-validation-service-impl.js","sourceRoot":"","sources":["../../src/browser/context-file-validation-service-impl.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,yCAAyC;AACzC,EAAE;AACF,2EAA2E;AAC3E,mEAAmE;AACnE,wCAAwC;AACxC,EAAE;AACF,4EAA4E;AAC5E,8EAA8E;AAC9E,6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YACb,CAAC;QACL,CAAC;QAED,OAAO,SAAS,CAAC;IACrB,CAAC;CACJ,CAAA;AA/FY,4EAAgC;AAGtB;IADlB,IAAA,kBAAM,EAAC,0BAAW,CAAC;sCACY,0BAAW;qEAAC;AAGzB;IADlB,IAAA,kBAAM,EAAC,4CAAsB,CAAC;sCACI,4CAAsB;wEAAC;AAGvC;IADlB,IAAA,kBAAM,EAAC,oCAAgB,CAAC;sCACY,oCAAgB;0EAAC;2CAT7C,gCAAgC;IAD5C,IAAA,sBAAU,GAAE;GACA,gCAAgC,CA+F5C"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=context-file-validation-service-impl.spec.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context-file-validation-service-impl.spec.d.ts","sourceRoot":"","sources":["../../src/browser/context-file-validation-service-impl.spec.ts"],"names":[],"mappings":""}