@comate/zulu 0.0.9 → 0.0.12

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 (286) hide show
  1. package/README.md +98 -0
  2. package/comate-engine/bin/comate.js +10 -0
  3. package/comate-engine/fallbackServer.js +1 -0
  4. package/comate-engine/node_modules/@comate/plugin-engine/dist/index.d.ts +188 -0
  5. package/comate-engine/node_modules/@comate/plugin-engine/dist/index.js +36 -0
  6. package/comate-engine/node_modules/@comate/plugin-engine/package.json +49 -0
  7. package/comate-engine/node_modules/@comate/plugin-host/bin.js +44 -0
  8. package/comate-engine/node_modules/@comate/plugin-host/dist/index.js +1 -0
  9. package/comate-engine/node_modules/@comate/plugin-host/dist/main.d.ts +14 -0
  10. package/comate-engine/node_modules/@comate/plugin-host/dist/main.js +9 -0
  11. package/comate-engine/node_modules/@comate/plugin-host/dist/user-Btg63hPI.js +36 -0
  12. package/comate-engine/node_modules/@comate/plugin-host/package.json +47 -0
  13. package/comate-engine/node_modules/@comate/plugin-shared-internals/dist/index.d.ts +2849 -0
  14. package/comate-engine/node_modules/@comate/plugin-shared-internals/dist/index.js +36 -0
  15. package/comate-engine/node_modules/@comate/plugin-shared-internals/package.json +72 -0
  16. package/comate-engine/node_modules/@comate/preview-proxy/bin/preview.js +13 -0
  17. package/comate-engine/node_modules/@comate/preview-proxy/dist/index.js +350 -0
  18. package/comate-engine/node_modules/@comate/preview-proxy/package.json +83 -0
  19. package/comate-engine/node_modules/@comate/preview-proxy/static/comate-preview-injector.css +1 -0
  20. package/comate-engine/node_modules/@comate/preview-proxy/static/comate-preview-injector.js +2 -0
  21. package/comate-engine/node_modules/@comate/preview-proxy/static/comate-preview-injector.js.LICENSE.txt +58 -0
  22. package/comate-engine/node_modules/compare-versions/LICENSE +21 -0
  23. package/comate-engine/node_modules/compare-versions/README.md +133 -0
  24. package/comate-engine/node_modules/compare-versions/lib/esm/compare.d.ts +19 -0
  25. package/comate-engine/node_modules/compare-versions/lib/esm/compare.js +44 -0
  26. package/comate-engine/node_modules/compare-versions/lib/esm/compare.js.map +1 -0
  27. package/comate-engine/node_modules/compare-versions/lib/esm/compareVersions.d.ts +8 -0
  28. package/comate-engine/node_modules/compare-versions/lib/esm/compareVersions.js +29 -0
  29. package/comate-engine/node_modules/compare-versions/lib/esm/compareVersions.js.map +1 -0
  30. package/comate-engine/node_modules/compare-versions/lib/esm/index.d.ts +5 -0
  31. package/comate-engine/node_modules/compare-versions/lib/esm/index.js +5 -0
  32. package/comate-engine/node_modules/compare-versions/lib/esm/index.js.map +1 -0
  33. package/comate-engine/node_modules/compare-versions/lib/esm/satisfies.d.ts +14 -0
  34. package/comate-engine/node_modules/compare-versions/lib/esm/satisfies.js +66 -0
  35. package/comate-engine/node_modules/compare-versions/lib/esm/satisfies.js.map +1 -0
  36. package/comate-engine/node_modules/compare-versions/lib/esm/utils.d.ts +7 -0
  37. package/comate-engine/node_modules/compare-versions/lib/esm/utils.js +37 -0
  38. package/comate-engine/node_modules/compare-versions/lib/esm/utils.js.map +1 -0
  39. package/comate-engine/node_modules/compare-versions/lib/esm/validate.d.ts +28 -0
  40. package/comate-engine/node_modules/compare-versions/lib/esm/validate.js +31 -0
  41. package/comate-engine/node_modules/compare-versions/lib/esm/validate.js.map +1 -0
  42. package/comate-engine/node_modules/compare-versions/lib/umd/index.js +216 -0
  43. package/comate-engine/node_modules/compare-versions/lib/umd/index.js.map +1 -0
  44. package/comate-engine/node_modules/compare-versions/package.json +45 -0
  45. package/comate-engine/node_modules/compare-versions/src/compare.ts +54 -0
  46. package/comate-engine/node_modules/compare-versions/src/compareVersions.ts +31 -0
  47. package/comate-engine/node_modules/compare-versions/src/index.ts +5 -0
  48. package/comate-engine/node_modules/compare-versions/src/satisfies.ts +69 -0
  49. package/comate-engine/node_modules/compare-versions/src/utils.ts +50 -0
  50. package/comate-engine/node_modules/compare-versions/src/validate.ts +36 -0
  51. package/comate-engine/node_modules/pkce-challenge/LICENSE +21 -0
  52. package/comate-engine/node_modules/pkce-challenge/README.md +55 -0
  53. package/comate-engine/node_modules/pkce-challenge/dist/index.browser.d.ts +19 -0
  54. package/comate-engine/node_modules/pkce-challenge/dist/index.browser.js +72 -0
  55. package/comate-engine/node_modules/pkce-challenge/dist/index.node.cjs +80 -0
  56. package/comate-engine/node_modules/pkce-challenge/dist/index.node.d.cts +19 -0
  57. package/comate-engine/node_modules/pkce-challenge/dist/index.node.d.ts +19 -0
  58. package/comate-engine/node_modules/pkce-challenge/dist/index.node.js +75 -0
  59. package/comate-engine/node_modules/pkce-challenge/package.json +58 -0
  60. package/comate-engine/node_modules/web-streams-polyfill/LICENSE +22 -0
  61. package/comate-engine/node_modules/web-streams-polyfill/README.md +119 -0
  62. package/comate-engine/node_modules/web-streams-polyfill/dist/polyfill.es5.js +8 -0
  63. package/comate-engine/node_modules/web-streams-polyfill/dist/polyfill.js +8 -0
  64. package/comate-engine/node_modules/web-streams-polyfill/dist/ponyfill.es5.js +8 -0
  65. package/comate-engine/node_modules/web-streams-polyfill/dist/ponyfill.es5.mjs +8 -0
  66. package/comate-engine/node_modules/web-streams-polyfill/dist/ponyfill.js +8 -0
  67. package/comate-engine/node_modules/web-streams-polyfill/dist/ponyfill.mjs +8 -0
  68. package/comate-engine/node_modules/web-streams-polyfill/package.json +98 -0
  69. package/comate-engine/node_modules/web-streams-polyfill/types/polyfill.d.ts +28 -0
  70. package/comate-engine/node_modules/web-streams-polyfill/types/ponyfill.d.ts +809 -0
  71. package/comate-engine/node_modules/web-streams-polyfill/types/tsdoc-metadata.json +11 -0
  72. package/comate-engine/package.json +94 -0
  73. package/comate-engine/plugins/aiscan/assets/icon.svg +12 -0
  74. package/comate-engine/plugins/aiscan/dist/index.js +53861 -0
  75. package/comate-engine/plugins/aiscan/package.json +67 -0
  76. package/comate-engine/plugins/appdev/assets/icon.png +0 -0
  77. package/comate-engine/plugins/appdev/dist/help.md +12 -0
  78. package/comate-engine/plugins/appdev/dist/index.d.ts +2 -0
  79. package/comate-engine/plugins/appdev/dist/index.js +194 -0
  80. package/comate-engine/plugins/appdev/dist/providers/err.d.ts +8 -0
  81. package/comate-engine/plugins/appdev/dist/providers/err.js +37 -0
  82. package/comate-engine/plugins/appdev/dist/providers/fallback.d.ts +5 -0
  83. package/comate-engine/plugins/appdev/dist/providers/fallback.js +28 -0
  84. package/comate-engine/plugins/appdev/dist/providers/help.d.ts +8 -0
  85. package/comate-engine/plugins/appdev/dist/providers/help.js +19 -0
  86. package/comate-engine/plugins/appdev/dist/providers/medusa.d.ts +8 -0
  87. package/comate-engine/plugins/appdev/dist/providers/medusa.js +39 -0
  88. package/comate-engine/plugins/appdev/dist/providers/qa.d.ts +8 -0
  89. package/comate-engine/plugins/appdev/dist/providers/qa.js +33 -0
  90. package/comate-engine/plugins/appdev/package.json +67 -0
  91. package/comate-engine/plugins/bfc/assets/bfc-icon.png +0 -0
  92. package/comate-engine/plugins/bfc/dist/config/config.d.ts +4 -0
  93. package/comate-engine/plugins/bfc/dist/config/config.js +4 -0
  94. package/comate-engine/plugins/bfc/dist/help.md +11 -0
  95. package/comate-engine/plugins/bfc/dist/index.d.ts +2 -0
  96. package/comate-engine/plugins/bfc/dist/index.js +452 -0
  97. package/comate-engine/plugins/bfc/dist/providers/bfcInstructMode.d.ts +8 -0
  98. package/comate-engine/plugins/bfc/dist/providers/bfcInstructMode.js +77 -0
  99. package/comate-engine/plugins/bfc/dist/providers/genAbnormalCode.d.ts +8 -0
  100. package/comate-engine/plugins/bfc/dist/providers/genAbnormalCode.js +71 -0
  101. package/comate-engine/plugins/bfc/dist/providers/genBfcCode.d.ts +8 -0
  102. package/comate-engine/plugins/bfc/dist/providers/genBfcCode.js +74 -0
  103. package/comate-engine/plugins/bfc/dist/providers/getBatchCases.d.ts +10 -0
  104. package/comate-engine/plugins/bfc/dist/providers/getBatchCases.js +71 -0
  105. package/comate-engine/plugins/bfc/dist/providers/help.d.ts +8 -0
  106. package/comate-engine/plugins/bfc/dist/providers/help.js +19 -0
  107. package/comate-engine/plugins/bfc/dist/service/generateService.d.ts +14 -0
  108. package/comate-engine/plugins/bfc/dist/service/generateService.js +27 -0
  109. package/comate-engine/plugins/bfc/package.json +85 -0
  110. package/comate-engine/plugins/bpm/assets/bpm.png +0 -0
  111. package/comate-engine/plugins/bpm/dist/index.js +313 -0
  112. package/comate-engine/plugins/bpm/package.json +65 -0
  113. package/comate-engine/plugins/casebuilder/assets/icon.svg +1 -0
  114. package/comate-engine/plugins/casebuilder/dist/help.md +33 -0
  115. package/comate-engine/plugins/casebuilder/dist/index.js +837 -0
  116. package/comate-engine/plugins/casebuilder/package.json +80 -0
  117. package/comate-engine/plugins/centrino/assets/icon.png +0 -0
  118. package/comate-engine/plugins/centrino/dist/help.md +30 -0
  119. package/comate-engine/plugins/centrino/dist/index.js +1046 -0
  120. package/comate-engine/plugins/centrino/package.json +68 -0
  121. package/comate-engine/plugins/cnap/assets/cnap.png +0 -0
  122. package/comate-engine/plugins/cnap/dist/help.md +11 -0
  123. package/comate-engine/plugins/cnap/dist/index.js +171 -0
  124. package/comate-engine/plugins/cnap/package.json +65 -0
  125. package/comate-engine/plugins/demo-feature/assets/icon.svg +1 -0
  126. package/comate-engine/plugins/demo-feature/dist/help.md +1 -0
  127. package/comate-engine/plugins/demo-feature/dist/index.d.ts +2 -0
  128. package/comate-engine/plugins/demo-feature/dist/index.js +36008 -0
  129. package/comate-engine/plugins/demo-feature/dist/providers/codeQuery.d.ts +12 -0
  130. package/comate-engine/plugins/demo-feature/dist/providers/codeQuery.js +23 -0
  131. package/comate-engine/plugins/demo-feature/dist/providers/codeSearch.d.ts +8 -0
  132. package/comate-engine/plugins/demo-feature/dist/providers/codeSearch.js +26 -0
  133. package/comate-engine/plugins/demo-feature/dist/providers/config.d.ts +13 -0
  134. package/comate-engine/plugins/demo-feature/dist/providers/config.js +25 -0
  135. package/comate-engine/plugins/demo-feature/dist/providers/context.d.ts +10 -0
  136. package/comate-engine/plugins/demo-feature/dist/providers/context.js +49 -0
  137. package/comate-engine/plugins/demo-feature/dist/providers/debugAgent.d.ts +8 -0
  138. package/comate-engine/plugins/demo-feature/dist/providers/debugAgent.js +65 -0
  139. package/comate-engine/plugins/demo-feature/dist/providers/explainCode.d.ts +9 -0
  140. package/comate-engine/plugins/demo-feature/dist/providers/explainCode.js +24 -0
  141. package/comate-engine/plugins/demo-feature/dist/providers/fallback.d.ts +5 -0
  142. package/comate-engine/plugins/demo-feature/dist/providers/fallback.js +23 -0
  143. package/comate-engine/plugins/demo-feature/dist/providers/file.d.ts +13 -0
  144. package/comate-engine/plugins/demo-feature/dist/providers/file.js +36 -0
  145. package/comate-engine/plugins/demo-feature/dist/providers/help.d.ts +8 -0
  146. package/comate-engine/plugins/demo-feature/dist/providers/help.js +19 -0
  147. package/comate-engine/plugins/demo-feature/dist/providers/information.d.ts +13 -0
  148. package/comate-engine/plugins/demo-feature/dist/providers/information.js +23 -0
  149. package/comate-engine/plugins/demo-feature/dist/providers/knowledge.d.ts +15 -0
  150. package/comate-engine/plugins/demo-feature/dist/providers/knowledge.js +71 -0
  151. package/comate-engine/plugins/demo-feature/dist/providers/log.d.ts +12 -0
  152. package/comate-engine/plugins/demo-feature/dist/providers/log.js +21 -0
  153. package/comate-engine/plugins/demo-feature/dist/providers/onlyCode.d.ts +8 -0
  154. package/comate-engine/plugins/demo-feature/dist/providers/onlyCode.js +23 -0
  155. package/comate-engine/plugins/demo-feature/dist/providers/pluginConfig.d.ts +8 -0
  156. package/comate-engine/plugins/demo-feature/dist/providers/pluginConfig.js +47 -0
  157. package/comate-engine/plugins/demo-feature/dist/providers/prompt.d.ts +7 -0
  158. package/comate-engine/plugins/demo-feature/dist/providers/prompt.js +7 -0
  159. package/comate-engine/plugins/demo-feature/dist/providers/ragProvider.d.ts +8 -0
  160. package/comate-engine/plugins/demo-feature/dist/providers/ragProvider.js +17 -0
  161. package/comate-engine/plugins/demo-feature/dist/providers/render.d.ts +8 -0
  162. package/comate-engine/plugins/demo-feature/dist/providers/render.js +75 -0
  163. package/comate-engine/plugins/demo-feature/dist/providers/renderJsx.d.ts +10 -0
  164. package/comate-engine/plugins/demo-feature/dist/providers/renderJsx.js +173 -0
  165. package/comate-engine/plugins/demo-feature/dist/providers/section.d.ts +8 -0
  166. package/comate-engine/plugins/demo-feature/dist/providers/section.js +136 -0
  167. package/comate-engine/plugins/demo-feature/dist/providers/selectedKnowledge.d.ts +12 -0
  168. package/comate-engine/plugins/demo-feature/dist/providers/selectedKnowledge.js +17 -0
  169. package/comate-engine/plugins/demo-feature/dist/providers/streaming.d.ts +8 -0
  170. package/comate-engine/plugins/demo-feature/dist/providers/streaming.js +29 -0
  171. package/comate-engine/plugins/demo-feature/dist/providers/userDetail.d.ts +8 -0
  172. package/comate-engine/plugins/demo-feature/dist/providers/userDetail.js +28 -0
  173. package/comate-engine/plugins/demo-feature/package.json +214 -0
  174. package/comate-engine/plugins/demo-timer/assets/icon.svg +2 -0
  175. package/comate-engine/plugins/demo-timer/dist/index.js +463 -0
  176. package/comate-engine/plugins/demo-timer/package.json +73 -0
  177. package/comate-engine/plugins/dev-tools/assets/icon.png +0 -0
  178. package/comate-engine/plugins/dev-tools/dist/help.md +18 -0
  179. package/comate-engine/plugins/dev-tools/dist/index.js +166160 -0
  180. package/comate-engine/plugins/dev-tools/package.json +95 -0
  181. package/comate-engine/plugins/devaux/assets/icon.svg +1 -0
  182. package/comate-engine/plugins/devaux/dist/help.md +41 -0
  183. package/comate-engine/plugins/devaux/dist/index.js +73829 -0
  184. package/comate-engine/plugins/devaux/dist/static/tree-sitter-cpp.wasm +0 -0
  185. package/comate-engine/plugins/devaux/dist/static/tree-sitter-go.wasm +0 -0
  186. package/comate-engine/plugins/devaux/dist/static/tree-sitter.wasm +0 -0
  187. package/comate-engine/plugins/devaux/dist/tree-sitter.wasm +0 -0
  188. package/comate-engine/plugins/devaux/package.json +83 -0
  189. package/comate-engine/plugins/f2c/assets/icon.svg +11 -0
  190. package/comate-engine/plugins/f2c/dist/help.md +13 -0
  191. package/comate-engine/plugins/f2c/dist/index.js +64551 -0
  192. package/comate-engine/plugins/f2c/package.json +56 -0
  193. package/comate-engine/plugins/fcnap/assets/icon.png +0 -0
  194. package/comate-engine/plugins/fcnap/dist/help.md +9 -0
  195. package/comate-engine/plugins/fcnap/dist/index.js +105 -0
  196. package/comate-engine/plugins/fcnap/package.json +50 -0
  197. package/comate-engine/plugins/front-end-skills/assets/icon.svg +1 -0
  198. package/comate-engine/plugins/front-end-skills/dist/help.md +17 -0
  199. package/comate-engine/plugins/front-end-skills/dist/index.js +8172 -0
  200. package/comate-engine/plugins/front-end-skills/package.json +79 -0
  201. package/comate-engine/plugins/gdp/assets/icon.png +0 -0
  202. package/comate-engine/plugins/gdp/dist/help.md +11 -0
  203. package/comate-engine/plugins/gdp/dist/index.js +53065 -0
  204. package/comate-engine/plugins/gdp/package.json +79 -0
  205. package/comate-engine/plugins/git/assets/git.svg +1 -0
  206. package/comate-engine/plugins/git/assets/icon.svg +1 -0
  207. package/comate-engine/plugins/git/dist/help.md +7 -0
  208. package/comate-engine/plugins/git/dist/index.js +32675 -0
  209. package/comate-engine/plugins/git/package.json +91 -0
  210. package/comate-engine/plugins/harmonyos/assets/harmonyos.png +0 -0
  211. package/comate-engine/plugins/harmonyos/dist/index.js +78 -0
  212. package/comate-engine/plugins/harmonyos/package.json +37 -0
  213. package/comate-engine/plugins/iapi/assets/icon.png +0 -0
  214. package/comate-engine/plugins/iapi/dist/help.md +13 -0
  215. package/comate-engine/plugins/iapi/dist/index.js +458 -0
  216. package/comate-engine/plugins/iapi/dist/static/lang/tree-sitter-go.wasm +0 -0
  217. package/comate-engine/plugins/iapi/dist/static/lang/tree-sitter-java.wasm +0 -0
  218. package/comate-engine/plugins/iapi/dist/static/tree-sitter-go.wasm +0 -0
  219. package/comate-engine/plugins/iapi/dist/static/tree-sitter-java.wasm +0 -0
  220. package/comate-engine/plugins/iapi/dist/tree-sitter.wasm +0 -0
  221. package/comate-engine/plugins/iapi/package.json +102 -0
  222. package/comate-engine/plugins/icafe/assets/icafe.svg +1 -0
  223. package/comate-engine/plugins/icafe/dist/help.md +5 -0
  224. package/comate-engine/plugins/icafe/dist/index.js +885 -0
  225. package/comate-engine/plugins/icafe/package.json +74 -0
  226. package/comate-engine/plugins/ievalue/assets/iEValue.svg +10 -0
  227. package/comate-engine/plugins/ievalue/dist/index.js +2920 -0
  228. package/comate-engine/plugins/ievalue/package.json +88 -0
  229. package/comate-engine/plugins/ipipe/assets/iPipePlugin.png +0 -0
  230. package/comate-engine/plugins/ipipe/dist/help.md +15 -0
  231. package/comate-engine/plugins/ipipe/dist/index.js +7264 -0
  232. package/comate-engine/plugins/ipipe/package.json +62 -0
  233. package/comate-engine/plugins/jarvis/assets/icon.svg +1 -0
  234. package/comate-engine/plugins/jarvis/dist/help.md +17 -0
  235. package/comate-engine/plugins/jarvis/dist/index.js +140416 -0
  236. package/comate-engine/plugins/jarvis/package.json +93 -0
  237. package/comate-engine/plugins/mapsearch/assets/mapsearchicon.png +0 -0
  238. package/comate-engine/plugins/mapsearch/dist/help.md +4 -0
  239. package/comate-engine/plugins/mapsearch/dist/index.js +145 -0
  240. package/comate-engine/plugins/mapsearch/package.json +53 -0
  241. package/comate-engine/plugins/paddle/assets/icon.png +0 -0
  242. package/comate-engine/plugins/paddle/assets/paconvert-3.0.1-py3-none-any.whl +0 -0
  243. package/comate-engine/plugins/paddle/dist/help.md +31 -0
  244. package/comate-engine/plugins/paddle/dist/index.js +1011 -0
  245. package/comate-engine/plugins/paddle/package.json +129 -0
  246. package/comate-engine/plugins/robot/assets/Robot.png +0 -0
  247. package/comate-engine/plugins/robot/dist/index.js +288 -0
  248. package/comate-engine/plugins/robot/package.json +67 -0
  249. package/comate-engine/plugins/security/assets/comate.png +0 -0
  250. package/comate-engine/plugins/security/dist/index.js +18393 -0
  251. package/comate-engine/plugins/security/package.json +82 -0
  252. package/comate-engine/plugins/smartapp/assets/icon.png +0 -0
  253. package/comate-engine/plugins/smartapp/dist/help.md +4 -0
  254. package/comate-engine/plugins/smartapp/dist/index.js +113 -0
  255. package/comate-engine/plugins/smartapp/package.json +54 -0
  256. package/comate-engine/plugins/springer/assets/icon.png +0 -0
  257. package/comate-engine/plugins/springer/dist/help.md +4 -0
  258. package/comate-engine/plugins/springer/dist/index.js +94525 -0
  259. package/comate-engine/plugins/springer/package.json +71 -0
  260. package/comate-engine/plugins/testmate/assets/icon.svg +1 -0
  261. package/comate-engine/plugins/testmate/dist/help.md +62 -0
  262. package/comate-engine/plugins/testmate/dist/index.js +21483 -0
  263. package/comate-engine/plugins/testmate/package.json +85 -0
  264. package/comate-engine/plugins/tor/assets/TorPlugin.png +0 -0
  265. package/comate-engine/plugins/tor/dist/help.md +22 -0
  266. package/comate-engine/plugins/tor/dist/index.js +807 -0
  267. package/comate-engine/plugins/tor/package.json +99 -0
  268. package/comate-engine/plugins/weiyun/assets/icon.png +0 -0
  269. package/comate-engine/plugins/weiyun/dist/help.md +11 -0
  270. package/comate-engine/plugins/weiyun/dist/index.js +100491 -0
  271. package/comate-engine/plugins/weiyun/package.json +55 -0
  272. package/comate-engine/plugins/wenku/assets/icon.svg +1 -0
  273. package/comate-engine/plugins/wenku/dist/index.js +249 -0
  274. package/comate-engine/plugins/wenku/package.json +55 -0
  275. package/comate-engine/plugins/workcard/assets/favicon.png +0 -0
  276. package/comate-engine/plugins/workcard/dist/help.md +30 -0
  277. package/comate-engine/plugins/workcard/dist/index.js +490 -0
  278. package/comate-engine/plugins/workcard/package.json +95 -0
  279. package/comate-engine/plugins/xiaomi-aiot/assets/icon.png +0 -0
  280. package/comate-engine/plugins/xiaomi-aiot/dist/help.md +6 -0
  281. package/comate-engine/plugins/xiaomi-aiot/dist/index.js +37466 -0
  282. package/comate-engine/plugins/xiaomi-aiot/package.json +63 -0
  283. package/comate-engine/server.d.ts +3 -0
  284. package/comate-engine/server.js +474 -0
  285. package/dist/bundle/index.js +29 -58174
  286. package/package.json +2 -1
@@ -0,0 +1,2849 @@
1
+ /// <reference types="node" />
2
+ import { JSONSchema7Definition } from 'json-schema';
3
+ import { WorkspaceFolder } from 'vscode-languageserver-types';
4
+ import * as axios from 'axios';
5
+ import { CreateAxiosDefaults } from 'axios';
6
+ export { axios as Axios };
7
+ import fse__default from 'fs-extra';
8
+ import * as fse from 'fs-extra';
9
+ export { fse as TypeFSE };
10
+ import { IncomingMessage } from 'http';
11
+ import * as vscode from 'vscode';
12
+
13
+ declare const ACTION_INFORMATION_QUERY = "INFORMATION_QUERY";
14
+ interface Information {
15
+ uuid: string;
16
+ type: ContextType | string;
17
+ name?: string;
18
+ content?: string;
19
+ contentStart?: Position$2;
20
+ contentEnd?: Position$2;
21
+ path?: string;
22
+ }
23
+ declare enum ContextType {
24
+ /** 当前文件 */
25
+ CURRENT_FILE = "CURRENT_FILE",
26
+ /** 文件 */
27
+ FILE = "FILE",
28
+ /** 目录 */
29
+ FOLDER = "FOLDER",
30
+ /** 代码库 */
31
+ REPO = "REPO",
32
+ /** 系统知识集 */
33
+ SYSTEM = "SYSTEM",
34
+ /** 普通知识集 */
35
+ NORMAL = "NORMAL",
36
+ /** 网页 */
37
+ URL = "URL",
38
+ /** Web,网络搜索 */
39
+ WEB = "WEB",
40
+ /** 单个 API 链接 */
41
+ API = "API",
42
+ /** API 的项目 */
43
+ API_PROJECT = "API_PROJECT",
44
+ /** 用户划选的代码,理论上不会放到 context 里 */
45
+ CODE = "CODE",
46
+ /** 历史存在,先保留该类型 */
47
+ TEMP = "TEMP",
48
+ /** 终端,暂时只有autoDebug在用 */
49
+ TERMINAL = "TERMINAL"
50
+ }
51
+ interface Position$2 {
52
+ line: number;
53
+ column: number;
54
+ }
55
+ declare enum InformationQueryType {
56
+ Text = "TEXT",
57
+ Code = "CODE",
58
+ File = "FILE"
59
+ }
60
+ interface InformationPayload {
61
+ pluginName: string;
62
+ informationList: Information[];
63
+ query: string;
64
+ type: InformationQueryType;
65
+ options?: KnowledgeOptions;
66
+ }
67
+ interface IdeSideInformationPayload {
68
+ pluginName: string;
69
+ result: string[];
70
+ }
71
+ interface IdeSideInformationResponse {
72
+ action: typeof ACTION_INFORMATION_QUERY;
73
+ payload: IdeSideInformationPayload;
74
+ }
75
+
76
+ /**
77
+ * 表示一个用户的信息
78
+ */
79
+ interface UserDetail {
80
+ /** 用户名,如邮箱前缀 */
81
+ readonly name: string;
82
+ /** 用户显示的名称,如中文姓名 */
83
+ readonly displayName: string;
84
+ /** 用户的完整电子邮件地址 */
85
+ readonly email: string;
86
+ /** 用户license,saas才有 */
87
+ readonly license?: string;
88
+ }
89
+ interface SystemInfoParsed {
90
+ userId: string;
91
+ userDetail: UserDetail;
92
+ cwd: string;
93
+ repoId?: string;
94
+ }
95
+ interface Range$1 {
96
+ /** 起始位置,包含 */
97
+ start: number;
98
+ /** 结束位置,不包含 */
99
+ end: number;
100
+ }
101
+
102
+ declare const ACTION_CHAT_QUERY = "CHAT_QUERY";
103
+ interface ChatQueryParsed {
104
+ messageId: string;
105
+ pluginName: string;
106
+ capability?: string | undefined;
107
+ query: string;
108
+ data?: any;
109
+ informationList: Information[];
110
+ enableSmartApply?: boolean;
111
+ modelKey?: string;
112
+ }
113
+ interface ChatQueryPayload {
114
+ pluginName: string;
115
+ input: ChatQueryParsed;
116
+ context: ActivationContext;
117
+ systemInfo: SystemInfoParsed;
118
+ isRegenerated?: boolean;
119
+ sessionUuid?: string;
120
+ }
121
+ declare const ACTION_CHAT_TASK_PROGRESS = "CHAT_TASK_PROGRESS";
122
+
123
+ declare const ACTION_LOG = "LOG";
124
+ type UserLogLevel = 'verbose' | 'info' | 'warn' | 'error';
125
+ type LogLevel = UserLogLevel | 'system';
126
+ interface LogPayload {
127
+ level: LogLevel;
128
+ source: string;
129
+ action: string;
130
+ detail: Record<string, any>;
131
+ }
132
+
133
+ declare enum TaskStatus {
134
+ INIT = "INIT",
135
+ PROCESSING = "PROCESSING",
136
+ SUCCEED = "SUCCEED",
137
+ FAIL = "FAIL"
138
+ }
139
+ interface SubTask {
140
+ /** 任务描述 */
141
+ desc: string;
142
+ status: TaskStatus;
143
+ /** 任务详情 */
144
+ detail?: string[];
145
+ /** type 决定当前思考过程的 tag 的显示 */
146
+ taskType: 'SEARCH' | 'PLAN' | 'REASONING' | 'THOUGHT' | 'CODE_GENERATE' | 'ANSWER' | 'ANALYZE';
147
+ }
148
+ interface Task extends SubTask {
149
+ /** 二级子任务 */
150
+ subTasks?: SubTask[];
151
+ }
152
+ interface BaseDynamicSection {
153
+ label: string;
154
+ done: boolean;
155
+ collapsible: boolean;
156
+ }
157
+ interface DynamicActionItems extends BaseDynamicSection {
158
+ type: 'actionItems';
159
+ tasks: Task[];
160
+ relevantFiles?: string[];
161
+ }
162
+ interface CodeChunk$1 {
163
+ filePath: string;
164
+ code: string;
165
+ language: string;
166
+ startLine: number;
167
+ endLine: number;
168
+ }
169
+ interface KnowledgeChunk$1 {
170
+ id: string;
171
+ content: string;
172
+ url: string;
173
+ title: string;
174
+ }
175
+ interface WebChunk {
176
+ id: number;
177
+ title: string;
178
+ url: string;
179
+ }
180
+ interface DynamicCodeChunks extends BaseDynamicSection {
181
+ type: 'codeChunks';
182
+ codeChunks?: CodeChunk$1[];
183
+ knowledgeChunks?: KnowledgeChunk$1[];
184
+ webChunks?: WebChunk[];
185
+ }
186
+ interface DynamicRelativeFiles extends BaseDynamicSection {
187
+ type: 'relativeFiles';
188
+ files: string[];
189
+ }
190
+ interface Step {
191
+ id: number;
192
+ desc: string;
193
+ status: TaskStatus;
194
+ tasks: Task[];
195
+ }
196
+ interface DynamicCodeGenSteps extends BaseDynamicSection {
197
+ type: 'codeGenSteps';
198
+ steps: Step[];
199
+ }
200
+ interface DynamicReminder extends BaseDynamicSection {
201
+ type: 'reminder';
202
+ reminder: string;
203
+ }
204
+ interface Notification {
205
+ notificationType: 'info' | 'fail' | 'success';
206
+ title: string;
207
+ path?: string;
208
+ }
209
+ interface DynamicNotification extends BaseDynamicSection {
210
+ type: 'notification';
211
+ notifications: Notification[];
212
+ }
213
+ type DynamicSection = DynamicActionItems | DynamicCodeChunks | DynamicCodeGenSteps | DynamicRelativeFiles | DynamicReminder | DynamicNotification;
214
+
215
+ interface WorkspaceEditEntryMetadata {
216
+ /** A flag which indicates that user confirmation is needed. */
217
+ needsConfirmation: boolean;
218
+ /** A human-readable string which is rendered prominent. */
219
+ label: string;
220
+ /** A human-readable string which is rendered less prominent on the same line. */
221
+ description?: string;
222
+ }
223
+ interface Position$1 {
224
+ line: number;
225
+ character: number;
226
+ }
227
+ interface AcceptByReplace {
228
+ type: 'replace';
229
+ path: string;
230
+ range: {
231
+ start: Position$1;
232
+ end: Position$1;
233
+ };
234
+ newText: string;
235
+ oldText?: string;
236
+ metadata?: WorkspaceEditEntryMetadata;
237
+ }
238
+ interface AcceptByInsert {
239
+ type: 'insert';
240
+ path: string;
241
+ position: Position$1;
242
+ newText: string;
243
+ metadata?: WorkspaceEditEntryMetadata;
244
+ }
245
+ type AcceptByType = AcceptByReplace | AcceptByInsert;
246
+ type Accept = AcceptByType[];
247
+ declare const ACTION_BATCH_ACCEPT = "ACCEPT_DIR";
248
+ interface BatchAcceptPayload {
249
+ /** 批量采纳文件列表 */
250
+ paths: string[];
251
+ }
252
+ interface BatchAcceptPluginPayload {
253
+ pluginName: string;
254
+ capabilityName?: string;
255
+ batchAcceptPayload: BatchAcceptPayload;
256
+ }
257
+
258
+ type ActionType = 'regenerate' | 'enhancedGenerate' | 'batchAccept';
259
+ type Actions = Partial<Record<string, (content?: any, language?: string, extra?: any) => void>>;
260
+ interface ActionDataTypes {
261
+ regenerate: any;
262
+ enhancedGenerate: any;
263
+ batchAccept: Accept;
264
+ }
265
+ interface ActionConfig<T> {
266
+ /** action 文本 */
267
+ name: string;
268
+ /** action 图标 */
269
+ icon?: string;
270
+ /** action 类型 用于颜色渲染 */
271
+ type?: 'primary' | 'normal';
272
+ /** action 描述,hover时展示 */
273
+ description?: string;
274
+ /** 二级描述信息,hover时展示 */
275
+ subDescription?: string;
276
+ /** 成功反馈信息 */
277
+ successLabel?: string;
278
+ /** action对应数据 */
279
+ data?: T extends ActionType ? ActionDataTypes[T] : never;
280
+ /** 位置 */
281
+ position?: 'foot-left' | 'foot-left-before' | 'foot-left-after';
282
+ }
283
+ /** action的其他信息配置集合 */
284
+ type ActionConfigs = Partial<Record<string, ActionConfig<ActionType>>>;
285
+ interface ActionSet {
286
+ actions: Actions;
287
+ actionConfigs: ActionConfigs;
288
+ activeActionKeys?: string[];
289
+ }
290
+
291
+ type ChunkContent = string | string[] | DrawElement | DrawElement[];
292
+ /**
293
+ * 更新用户看到的消息内容
294
+ */
295
+ interface DrawChunk {
296
+ /** 指定更新用户的回复信息 */
297
+ command: 'draw';
298
+ /** 重绘后的内容 */
299
+ content: ChunkContent;
300
+ }
301
+ /**
302
+ * 更新用户看到的动态section
303
+ */
304
+ interface SectionChunk {
305
+ /** 指定更新用户的section */
306
+ command: 'section';
307
+ /** 重绘后的section */
308
+ sections: {
309
+ dynamicSections: DynamicSection[];
310
+ dynamicFooterSections: DynamicSection[];
311
+ };
312
+ /** 重绘后的content */
313
+ content: string;
314
+ /** 重绘后的action及配置 */
315
+ /** NOTE: 仅用于更新整个消息的action,不包括代码块内的action */
316
+ actionSet?: ActionSet;
317
+ }
318
+ /**
319
+ * 告知用户执行失败
320
+ */
321
+ interface FailChunk {
322
+ /** 指定告知用户任务失败 */
323
+ command: 'fail';
324
+ /** 失败的提示信息 */
325
+ content: ChunkContent;
326
+ }
327
+ /**
328
+ * 任务处理过程的反馈片段
329
+ */
330
+ type TaskProgressChunk = DrawChunk | FailChunk | SectionChunk | ChunkContent;
331
+ interface TaskProgressPayload {
332
+ messageId?: number;
333
+ taskId: string;
334
+ chunk: TaskProgressChunk;
335
+ capabilityName?: string;
336
+ enableSmartApply?: boolean;
337
+ }
338
+
339
+ type PrimitiveChildren = string | number | Array<string | number>;
340
+ type ElementChildren = DrawElement | string | number | Array<DrawElement | string | number>;
341
+ type CodeBlockActions = 'replaceToFile' | 'insertToFile' | 'copy' | 'accept' | 'diff' | 'showFileInsertDiff' | 'showFileReplaceDiff' | 'newFile' | 'insertIntoTerminal' | 'viewFile' | 'smartApply' | 'newFile';
342
+ interface FileLink {
343
+ type: 'file-link';
344
+ /** 指向项目中的具体文件,不能以`/`或`..`开始 */
345
+ to: string;
346
+ /** 指定跳转到的行号,行号以1起始 */
347
+ line?: number;
348
+ /** 可选的显示内容,不提供则使用`to`属性 */
349
+ children?: PrimitiveChildren;
350
+ /** 是否展示文件图标 */
351
+ showIcon?: boolean;
352
+ }
353
+ interface Markdown {
354
+ type: 'markdown';
355
+ /** 具体的Markdown内容 */
356
+ children: PrimitiveChildren;
357
+ }
358
+ /** 指代时替换选中代码(或插入到光标位置) */
359
+ interface ReplaceSelectionAcceptMethod {
360
+ method: 'replaceSelection';
361
+ /** 按当前选中还是按触发时选中 */
362
+ cursorMode: 'current' | 'trigger';
363
+ }
364
+ /** 采纳时替换编辑器中的指定代码 */
365
+ interface ReplaceContentAcceptMethod {
366
+ method: 'replaceContent';
367
+ /** 找到替换的代码 */
368
+ from: string;
369
+ /** 替换为该代码 */
370
+ to: string;
371
+ }
372
+ /** 采纳到终端,可选直接执行 */
373
+ interface ToTerminalAcceptMethod {
374
+ method: 'toTerminal';
375
+ /** 是否直接执行 */
376
+ run?: boolean;
377
+ }
378
+ /** 采纳时复制到剪贴板 */
379
+ interface CopyAcceptMethod {
380
+ method: 'copy';
381
+ /** 定制复制的内容,不设置则使用代码块的内容 */
382
+ content?: string;
383
+ }
384
+ type AcceptMethod = ReplaceSelectionAcceptMethod | ReplaceContentAcceptMethod | ToTerminalAcceptMethod | CopyAcceptMethod;
385
+ interface SimpleCodeBlock {
386
+ type: 'code-block';
387
+ language?: string;
388
+ hidden?: boolean;
389
+ acceptMethods?: AcceptMethod[];
390
+ /** 代码块是否已经闭合 */
391
+ closed: boolean;
392
+ /** 默认展示几行,剩下的处于收起状态 */
393
+ visibleLines?: number;
394
+ /** 是否是只读代码块(不包含action但可以进行代码块跳转) */
395
+ readonly?: boolean;
396
+ readonlyFileData?: {
397
+ filePath: string;
398
+ startLine: number;
399
+ endLine: number;
400
+ };
401
+ actions?: CodeBlockActions[];
402
+ replaceToFileData?: {
403
+ filePath: string;
404
+ from: string;
405
+ to: string;
406
+ replaceAll?: boolean;
407
+ };
408
+ insertToFileData?: {
409
+ filePath: string;
410
+ position: {
411
+ line: number;
412
+ character: number;
413
+ };
414
+ newText: string;
415
+ metadata?: {
416
+ needsConfirmation: boolean;
417
+ };
418
+ };
419
+ smartApplyData?: {
420
+ filePath: string;
421
+ };
422
+ children: PrimitiveChildren;
423
+ }
424
+ interface Suggestion {
425
+ type: 'suggestion';
426
+ acceptMethods: AcceptMethod[];
427
+ title?: string;
428
+ content: string;
429
+ children: ElementChildren;
430
+ }
431
+ interface CopyFile {
432
+ /** 文件或目录的绝对路径 */
433
+ fromPath: string;
434
+ /** 目标位置 */
435
+ toPath: string;
436
+ }
437
+ interface AcceptWithDependentFiles {
438
+ method: 'acceptWithDependentFiles';
439
+ /** 主文件的内容以及路径 */
440
+ entry: {
441
+ filePath: string;
442
+ content: string;
443
+ };
444
+ /** 被引用的文件会以 cp 的方式复制到目标目录,如果目标位置已存在时不会覆盖 */
445
+ dependencies: CopyFile[];
446
+ }
447
+ type Action = 'copy' | 'insertIntoTerminal' | 'detail' | 'execute' | 'acceptDir' | 'acceptDependentFiles' | 'acceptWithDependentFiles' | 'insertToFile' | 'openZulu' | 'viewHtml' | 'batchAccept' | 'replaceToFile' | 'showFileReplaceDiff' | 'newFile';
448
+ interface CommandButton {
449
+ type: 'command-button';
450
+ variant?: 'primary' | 'default' | 'text';
451
+ commandName: string;
452
+ data: any;
453
+ replyText?: string;
454
+ action?: Action;
455
+ propagation?: boolean;
456
+ tooltipText?: string;
457
+ actionData?: any;
458
+ children: string;
459
+ }
460
+ interface ButtonGroup {
461
+ type: 'button-group';
462
+ children: CommandButton | CommandButton[];
463
+ }
464
+ interface AlertTag {
465
+ type: 'alert-tag';
466
+ level: 'normal' | 'low' | 'medium' | 'high' | 'critical';
467
+ children: PrimitiveChildren;
468
+ }
469
+ interface Loading {
470
+ type: 'loading';
471
+ children: string;
472
+ }
473
+ interface Flex {
474
+ type: 'flex';
475
+ children: ElementChildren;
476
+ /** 是否居中,为true时,默认带上align-items: center */
477
+ centered?: boolean;
478
+ /** 是否修改 flex-direction 为 column */
479
+ vertical?: boolean;
480
+ /** 是否垂直布局并且居中, 如果 true,默认开启 justify-content: center */
481
+ verticalCentered?: boolean;
482
+ /** 是否设置为 inline-flex */
483
+ inline?: boolean;
484
+ /** 是否要保留换行 */
485
+ keepWrap?: boolean;
486
+ /** 是否水平居中,如果 true,默认开启 justify-content: center */
487
+ horizontalCentered?: boolean;
488
+ /** 是否垂直方向左边对齐,如果 true,默认开启 align-items: flex-start */
489
+ verticalStartAlign?: boolean;
490
+ /** 是否两端对齐,如果 true,默认开启 justify-content: space-between */
491
+ betweenCentered?: boolean;
492
+ /** 是否尾端对齐,如果 true,默认开启 justify-content: flex-end */
493
+ flexEndCentered?: boolean;
494
+ /** 是否均摊分布对齐,如果 true,默认开启 justify-content: space-around */
495
+ aroundCentered?: boolean;
496
+ /** 尺寸参考 renderJsx */
497
+ gap?: 'sm' | 's' | 'm' | 'l' | 'xl';
498
+ }
499
+ interface Card {
500
+ type: 'card';
501
+ color: 'blue' | 'red' | 'yellow' | 'orange' | 'gray' | 'green';
502
+ children: ElementChildren;
503
+ }
504
+ interface CollapsePanel {
505
+ type: 'collapse-panel';
506
+ collapsible: boolean;
507
+ title: string;
508
+ loading?: boolean;
509
+ loadingText?: string;
510
+ extra?: ElementChildren;
511
+ onChange?: (collapsible: boolean) => void;
512
+ children: ElementChildren;
513
+ }
514
+ type NativeElementType = 'p' | 'span' | 'ul' | 'ol' | 'em' | 'strong' | 'code' | 'blockquote' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'li' | 'br' | 'hr' | 'img' | 'a' | 'table' | 'thead' | 'tbody' | 'tr' | 'th' | 'td' | 'div';
515
+ interface NativeElement {
516
+ [key: string]: any;
517
+ type: NativeElementType;
518
+ }
519
+ type DrawElement = NativeElement | SimpleCodeBlock | FileLink | Markdown | Suggestion | CommandButton | ButtonGroup | AlertTag | Loading | Flex | Card | CollapsePanel;
520
+ declare const allowedNativeElement: Record<string, string[]>;
521
+ declare function isNativeElement(element: DrawElement): element is NativeElement;
522
+ declare function isInteractiveContent(content: ChunkContent | null | undefined): boolean;
523
+ declare function isWrappedChunk(chunk: TaskProgressChunk): chunk is DrawChunk | FailChunk;
524
+ declare function isSectionChunk(chunk: TaskProgressChunk): chunk is SectionChunk;
525
+ declare function extractChunkContent(chunk: TaskProgressChunk): ChunkContent | null;
526
+
527
+ declare const ACTION_SESSION_START = "SESSION_START";
528
+ declare const ACTION_SESSION_FINISH = "SESSION_FINISH";
529
+ interface ChannelImplement {
530
+ on(type: 'message', listener: NodeJS.MessageListener): void;
531
+ send(message: any, callback?: (error: Error | null) => void): void;
532
+ }
533
+ interface Execution {
534
+ executionId: number;
535
+ segmentOrder: number;
536
+ done: boolean;
537
+ }
538
+ type Listener<P> = (payload: P, execution?: Execution) => Promise<void>;
539
+ type SessionAssociation = Session | string;
540
+ interface SessionOptions {
541
+ /** 是否将生命周期与父`Session`对象链接,默认为`true`,关闭时关闭当前`Session`对象不会同步给父对象关闭 */
542
+ lifeCycleConnected?: boolean;
543
+ }
544
+ interface SessionInit {
545
+ association: SessionAssociation;
546
+ options?: SessionOptions | undefined;
547
+ }
548
+ declare class Session<M extends Record<string, any> = Record<string, any>> {
549
+ readonly sessionId: string;
550
+ protected readonly parent: Session | null;
551
+ private readonly lifeCycleConnected;
552
+ private readonly listeners;
553
+ private readonly channel;
554
+ private readonly timeoutTimer;
555
+ private readonly executions;
556
+ private readonly streams;
557
+ private readonly incrementer;
558
+ constructor(init: SessionInit, channel: ChannelImplement);
559
+ handleMessage<A extends keyof M>(action: A, payload: M[A], execution?: Execution): Promise<void>;
560
+ start(data: any): void;
561
+ finish(): void;
562
+ log(level: LogLevel, source: string, action: string, detail?: Record<string, any>): void;
563
+ send(data: any, execution?: Execution): Promise<any>;
564
+ sendStreaming<T>(data: any, execution?: Execution): AsyncIterable<T>;
565
+ protected setListener<A extends keyof M>(action: A, listener: Listener<M[A]>): void;
566
+ protected forwardMessageToParent<A extends keyof M>(action: A): void;
567
+ protected initializeListeners(): void;
568
+ }
569
+
570
+ interface ChannelImplementMaybe {
571
+ on: ChannelImplement['on'];
572
+ send?: ChannelImplement['send'];
573
+ }
574
+ declare abstract class Channel<S extends Session> {
575
+ protected readonly implement: ChannelImplement;
576
+ protected readonly sessions: Map<string, S>;
577
+ private readonly tasks;
578
+ constructor(implement: ChannelImplementMaybe);
579
+ start(): void;
580
+ startSession(association: Session | string, data: any, options?: SessionOptions): Promise<void>;
581
+ send(sessionId: string, message: any, execution?: Execution): Promise<any> | undefined;
582
+ log(source: string, action: string, detail?: Record<string, any>): void;
583
+ protected abstract createSession(init: SessionInit): S;
584
+ }
585
+
586
+ declare const ACTION_REQUEST_PERMISSION = "REQUEST_PERMISSION";
587
+ declare enum PermissionType {
588
+ WorkspaceFileSystem = "WorkspaceFileSystem",
589
+ FullDiskFileSystem = "FullDiskFileSystem",
590
+ CodeSecurity = "CodeSecurity",
591
+ UserDetail = "UserDetail"
592
+ }
593
+ interface RequestPermissionPayload {
594
+ pluginName: string;
595
+ type: PermissionType;
596
+ }
597
+ interface IdeSidePermissionPayload {
598
+ pluginName: string;
599
+ type: PermissionType;
600
+ granted: boolean;
601
+ }
602
+ interface IdeSidePermissionResponse {
603
+ action: typeof ACTION_REQUEST_PERMISSION;
604
+ payload: IdeSidePermissionPayload;
605
+ }
606
+
607
+ declare const ACTION_ASK_LLM = "ASK_LLM";
608
+ declare const ACTION_ASK_LLM_STREAMING = "ASK_LLM_STREAMING";
609
+ declare enum LlmType {
610
+ Text = 0,
611
+ Code = 1,
612
+ Function = 2,
613
+ ExplainCode = 3,
614
+ DocCommentForCode = 4,
615
+ CommentForCode = 5
616
+ }
617
+ interface FunctionCall {
618
+ name: string;
619
+ arguments: string;
620
+ thoughts?: string;
621
+ }
622
+ interface LlmResponseTypes {
623
+ [LlmType.Text]: string;
624
+ [LlmType.Code]: string;
625
+ [LlmType.Function]: FunctionCall | null;
626
+ [LlmType.ExplainCode]: string;
627
+ [LlmType.DocCommentForCode]: string;
628
+ [LlmType.CommentForCode]: string;
629
+ }
630
+ interface PayloadBase {
631
+ promptTemplate: string;
632
+ args?: Record<string, unknown>;
633
+ pluginName: string;
634
+ }
635
+ interface CodePayload {
636
+ code: string;
637
+ filePath: string;
638
+ pluginName: string;
639
+ }
640
+ declare enum TextModel {
641
+ Default = "default-model",
642
+ ErnieBot = "ernie-bot",
643
+ ErnieBot128 = "ernie-bot-3-128",
644
+ ErnieBot4 = "ernie-bot-4",
645
+ ErnieBot4Turbo = "ernie-bot-4-turbo",
646
+ ErnieBot4Turbo128 = "ernie-bot-4-turbo-128"
647
+ }
648
+ interface ModelOptions {
649
+ openMaxOutput?: boolean;
650
+ temperature?: number;
651
+ topP?: number;
652
+ penaltyScore?: number;
653
+ /**
654
+ * 是否通过插件启用
655
+ * @example byPlugin true // 表示以插件维度缓存多轮对话,false 表示以skill维度,默认skill维度
656
+ * @example onlyQuery // 传一个字符串,例如直接把query传进来,防止query合并knownledge后太长
657
+ */
658
+ enableMultiturnDialogue?: boolean | {
659
+ byPlugin?: boolean;
660
+ onlyQuery?: string;
661
+ };
662
+ }
663
+ declare enum FunctionModel {
664
+ Default = "default-model",
665
+ ErnieBot = "ernie-bot",
666
+ ErnieBot4 = "ernie-bot-4"
667
+ }
668
+ interface LlmPayloadTypes {
669
+ [LlmType.Text]: PayloadBase & {
670
+ model?: TextModel;
671
+ modelOptions?: ModelOptions;
672
+ };
673
+ [LlmType.Code]: PayloadBase & {
674
+ model?: TextModel;
675
+ modelOptions?: ModelOptions;
676
+ };
677
+ [LlmType.Function]: PayloadBase & {
678
+ functions: FunctionDefinition[];
679
+ model?: FunctionModel;
680
+ };
681
+ [LlmType.ExplainCode]: CodePayload;
682
+ [LlmType.DocCommentForCode]: CodePayload;
683
+ [LlmType.CommentForCode]: CodePayload;
684
+ }
685
+ interface IdeSideLlmPayload {
686
+ pluginName: string;
687
+ type: LlmType;
688
+ result: LlmResponseTypes[LlmType];
689
+ }
690
+ interface IdeSideLlmResponse {
691
+ action: typeof ACTION_ASK_LLM;
692
+ payload: IdeSideLlmPayload;
693
+ }
694
+ interface IdeSideLlmStreamingResponse {
695
+ action: typeof ACTION_ASK_LLM_STREAMING;
696
+ payload: IdeSideLlmPayload;
697
+ }
698
+ type GenerateLlmPayload<T extends LlmType> = T extends LlmType ? {
699
+ type: T;
700
+ } & LlmPayloadTypes[T] : never;
701
+ type LlmPayload = GenerateLlmPayload<LlmType>;
702
+
703
+ declare const ACTION_GET_PLUGIN_CONFIG = "GET_PLUGIN_CONFIG";
704
+ declare const ACTION_UPDATE_ENGINE_CONFIG = "UPDATE_ENGINE_CONFIG";
705
+ declare const ACTION_PLUS_MODULE_LIST_FETCH = "PLUS_MODULE_LIST_FETCH";
706
+ interface GetPluginConfigPayload {
707
+ pluginName: string;
708
+ key: string;
709
+ }
710
+ interface IdeSideConfigPayload {
711
+ pluginName: string;
712
+ key: string;
713
+ value: any;
714
+ }
715
+ interface IdeSideConfigResponse {
716
+ action: typeof ACTION_GET_PLUGIN_CONFIG;
717
+ payload: IdeSideConfigPayload;
718
+ }
719
+ interface PlusConfigPayload {
720
+ pluginName: string;
721
+ systemInfo: SystemInfoParsed;
722
+ type: 'modelList';
723
+ }
724
+ interface Model {
725
+ modelId: string;
726
+ modelName: string;
727
+ displayName: string;
728
+ isDefault: boolean;
729
+ }
730
+ declare const ACTION_PLUS_MODULE_LIST_RESULT = "PLUS_MODULE_LIST_RESULT";
731
+ interface PlusModuleListResultPayload {
732
+ chunk: Model[];
733
+ capabilityName?: string;
734
+ }
735
+
736
+ /** IDE 发起的获取 DIAGNOSTIC */
737
+ declare const ACTION_COMATE_PLUS_DIAGNOSTIC_SCAN = "COMATE_PLUS_DIAGNOSTIC_SCAN";
738
+ /** 诊断扫描任务进展上报 */
739
+ declare const ACTION_DIAGNOSTIC_SCAN_TASK_PROGRESS = "DIAGNOSTIC_SCAN_TASK_PROGRESS";
740
+ /** 向plugin发起诊断扫描 */
741
+ declare const ACTION_DIAGNOSTIC_SCAN = "DIAGNOSTIC_SCAN";
742
+ /** 获取诊断扫描问题数量 */
743
+ declare const ACTION_DIAGNOSTIC_SCAN_TASK_COUNT = "DIAGNOSTIC_SCAN_TASK_COUNT";
744
+ interface DiagnosticScanPayload {
745
+ pluginName: string;
746
+ capabilityName: string;
747
+ systemInfo: SystemInfoParsed;
748
+ }
749
+ interface DiagnosticScanInvokePayload {
750
+ pluginName: string;
751
+ capabilityName: string;
752
+ diagnosticScanId: string;
753
+ scanType: DiagnosticScanTypes;
754
+ systemInfo: SystemInfoParsed;
755
+ changedFiles?: DiagnosticScanChangedFiles;
756
+ context?: ActivationContext;
757
+ }
758
+ interface DiagnosticScanChangedFiles {
759
+ added: string[];
760
+ deleted: string[];
761
+ modified: string[];
762
+ }
763
+ type DiagnosticScanTypes = 'init' | 'change' | 'open' | 'count';
764
+ /** 诊断信息,触发侧边栏后对话的依据,data针对插件变化 */
765
+ interface RepairData {
766
+ /** 负责处理的插件 */
767
+ pluginName?: string;
768
+ /** 负责处理的能力 */
769
+ capability?: string;
770
+ /** 触发来源 */
771
+ source?: string;
772
+ query: string;
773
+ data: any;
774
+ }
775
+ interface Range {
776
+ startLine: number;
777
+ startCharacter: number;
778
+ endLine: number;
779
+ endCharacter: number;
780
+ }
781
+ interface DiagnosticCacheValue {
782
+ hash?: string;
783
+ diagnostics: DiagnosticInfo[];
784
+ }
785
+ interface DiagnosticInfo {
786
+ /** 错误的位置,Range {startLine: number, startCharacter: number, endLine: number, endCharacter: number} */
787
+ range: Range;
788
+ /** 诊断信息的具体内容,描述,可以写多一点,for vscode */
789
+ textMessage: string;
790
+ /** html版,诊断信息的具体内容,描述,可以写多一点,for jetbrains */
791
+ htmlMessage?: string;
792
+ /** vscode:vscode.DiagnosticSeverity.Error、vscode.DiagnosticSeverity.Warning */
793
+ /** IDEA支持:ERROR、WARNING */
794
+ severity: 'ERROR' | 'WARNING';
795
+ /** 用于触发侧边栏对话 */
796
+ repairData: RepairData;
797
+ /** 错误的源码,必须,否则无法定位错误 */
798
+ sourceCode: string;
799
+ /** 上下文,辅助定位错误位置 */
800
+ contextCode: string[];
801
+ /**
802
+ * A code or identifier for this diagnostic.
803
+ * Should be used for later processing, e.g. when providing {@link CodeActionContext code actions}.
804
+ */
805
+ /** 可选的诊断代码,包含规则标识符和相关文档链接。for vscode */
806
+ code?: {
807
+ value: string | number;
808
+ target: string;
809
+ };
810
+ /** source: 诊断信息的来源(通常是插件的名称)。for vscode */
811
+ source?: string;
812
+ }
813
+ interface DiagnosticScanTaskProgressChunk {
814
+ filename: string;
815
+ hash?: string;
816
+ diagnostics: DiagnosticInfo[];
817
+ }
818
+ interface DiagnosticScanTaskProgressPayload {
819
+ chunk: DiagnosticScanTaskProgressChunk;
820
+ capabilityName?: string;
821
+ }
822
+ interface DiagnosticScanCountPayload {
823
+ chunk: number;
824
+ capabilityName?: string;
825
+ }
826
+
827
+ /** IDE侧发起的完整的扫描任务 */
828
+ declare const ACTION_SCAN_QUERY = "SCAN_QUERY";
829
+ declare const ACTION_WILL_SCAN = "WILL_SCAN";
830
+ declare const ACTION_SCAN_TASK = "SCAN_TASK";
831
+ declare const ACTION_RELEASE_SCAN_TASK = "RELEASE_SCAN_TASK";
832
+ declare const ACTION_SCAN_TASK_PROGRESS = "SCAN_TASK_PROGRESS";
833
+ /** 获取是否存在存量扫描结果 */
834
+ declare const ACTION_SCAN_CACHE_COUNT = "SCAN_CACHE_COUNT";
835
+ /** 初始化拉起SA扫描server */
836
+ declare const ACTION_COMATE_PLUS_SA_SCAN_INIT = "COMATE_PLUS_SA_SCAN_INIT";
837
+ /** IDE发起扫描任务获取SA扫描结果 */
838
+ declare const ACTION_COMATE_PLUS_SA_SCAN_DIAGNOSTIC = "COMATE_PLUS_SA_SCAN_DIAGNOSTIC";
839
+ /** SA扫描结果 */
840
+ declare const ACTION_SA_SCAN_DIAGNOSTIC = "SA_SCAN_DIAGNOSTIC";
841
+ /** 获取三方插件返回的SA扫描结果 */
842
+ declare const ACTION_SA_SCAN_DIAGNOSTIC_RESULT = "SA_SCAN_DIAGNOSTIC_RESULT";
843
+ interface ScanQueryPayload {
844
+ scanId: string;
845
+ context: ActivationContext;
846
+ systemInfo: SystemInfoParsed;
847
+ }
848
+ interface WillScanPayload extends ScanQueryPayload {
849
+ pluginName: string;
850
+ capabilityName: string;
851
+ }
852
+ interface ReleaseScanTaskPayload {
853
+ scanId: string;
854
+ pluginName: string;
855
+ capabilityName: string;
856
+ }
857
+ interface ScanTaskPayload {
858
+ scanId: string;
859
+ pluginName: string;
860
+ capabilityName: string;
861
+ description: string;
862
+ ranges: Range$1[];
863
+ }
864
+ /** 表达参与扫描任务的目标 */
865
+ interface ScanHandleGoal {
866
+ /** 说明本次处理的目标 */
867
+ description: string;
868
+ /** 是否独占处理,如果独占并被选中,则其它插件能力都不会处理本次扫描 */
869
+ exclusive?: boolean;
870
+ /** 计划处理和修改的代码块 */
871
+ ranges: Range$1[];
872
+ }
873
+ /** 扫描意愿结果 */
874
+ interface ReportWillScanPayload {
875
+ scanId: string;
876
+ pluginName: string;
877
+ capabilityName: string;
878
+ goal: ScanHandleGoal | false;
879
+ }
880
+ interface SAScanDiagnosticResult {
881
+ absolutePath: string;
882
+ diagnostics: DiagnosticInfo[];
883
+ }
884
+ interface SADiagnosticScanResultPayload {
885
+ chunk: SAScanDiagnosticResult | boolean;
886
+ capabilityName?: string;
887
+ }
888
+ type ScanTypes = 'init' | 'getResult' | 'destroy';
889
+ interface SADiagnosticScanInvokePayload {
890
+ pluginName: string;
891
+ capabilityName: string;
892
+ systemInfo: SystemInfoParsed;
893
+ scanType: ScanTypes;
894
+ absolutePath?: string;
895
+ context?: ActivationContext;
896
+ }
897
+
898
+ declare const ACTION_START_BACKGROUND_SERVICE = "ACTION_START_BACKGROUND_SERVICE";
899
+ interface StartBackgroundServicePayload {
900
+ pluginName: string;
901
+ systemInfo: SystemInfoParsed;
902
+ }
903
+
904
+ declare const ACTION_QUERY_SELECTOR = "QUERY_SELECTOR";
905
+ interface QuerySelectorPayload {
906
+ context: ActivationContext;
907
+ systemInfo: SystemInfoParsed;
908
+ }
909
+
910
+ declare const ACTION_CUSTOM_COMMAND = "ACTION_CUSTOM_COMMAND";
911
+ interface CustomCommandPayload {
912
+ pluginName: string;
913
+ taskId: string;
914
+ commandName: string;
915
+ data: any;
916
+ replyText: string;
917
+ }
918
+ type CustomCommandInvokePayload = CustomCommandPayload & {
919
+ messageId: number;
920
+ commandContext: ActivationContext;
921
+ };
922
+
923
+ interface UserMessage {
924
+ id: string;
925
+ role: 'user';
926
+ content: string;
927
+ code?: string;
928
+ payload: Record<string, any>;
929
+ }
930
+ declare enum AgentMessageStatus {
931
+ Failed = "failed",
932
+ Success = "success",
933
+ InProgress = "inProgress",
934
+ Cancelled = "cancelled"
935
+ }
936
+ declare enum WorkflowStatus {
937
+ UNREADY = "unready",
938
+ READY = "ready",
939
+ RUNNING = "running",
940
+ SUCCESS = "success",
941
+ FAILED = "failed",
942
+ CANCELLED = "cancelled"
943
+ }
944
+ interface AgentTextElement {
945
+ id: string;
946
+ type: 'TEXT';
947
+ status: AgentMessageStatus;
948
+ content: string;
949
+ composer: {
950
+ markdown: string;
951
+ tasks: AgentComposerTask[];
952
+ };
953
+ isErrorMessage?: boolean;
954
+ }
955
+ interface AgentComposerTask {
956
+ filePath: string;
957
+ absolutePath: string;
958
+ status: string;
959
+ accepted: 0 | 1 | 2;
960
+ action: string;
961
+ basename: string;
962
+ addLineCount: number;
963
+ removeLineCount: number;
964
+ }
965
+ type AgentToolCallType = 'search_files' | 'read_image' | 'list_files' | 'keyword_search' | 'preview_page' | 'ask_followup_question' | 'attempt_completion' | 'run_command' | 'read_file' | 'list_code_definition_names' | 'write_file' | 'delete_file' | 'patch_file' | 'run_debug_command' | 'mcp_tool' | 'f2c_tool' | 'extract_content_blocks' | 'unknown';
966
+ type EmptyObject = Record<string, never>;
967
+ interface ToolCallMessageSpec {
968
+ 'search_files': {
969
+ displayParams: {
970
+ path: string;
971
+ regex?: string;
972
+ };
973
+ displayResult: {
974
+ searchFiles: DisplayFileInfo[];
975
+ };
976
+ };
977
+ 'read_image': {
978
+ displayParams: {
979
+ path: string;
980
+ id: string;
981
+ };
982
+ displayResult: {
983
+ lineCount?: number;
984
+ readFile?: DisplayFileInfo;
985
+ };
986
+ };
987
+ 'list_files': {
988
+ displayParams: {
989
+ path: string;
990
+ };
991
+ displayResult: {
992
+ fileCount: number;
993
+ };
994
+ };
995
+ 'keyword_search': {
996
+ displayParams: {
997
+ path: string;
998
+ regex?: string;
999
+ };
1000
+ displayResult: {
1001
+ searchFiles: DisplayFileInfo[];
1002
+ };
1003
+ };
1004
+ 'preview_page': {
1005
+ displayParams: {
1006
+ url?: string;
1007
+ previewLoading?: boolean;
1008
+ };
1009
+ displayResult: EmptyObject;
1010
+ };
1011
+ 'ask_followup_question': {
1012
+ displayParams: {
1013
+ followupQuestion?: string;
1014
+ };
1015
+ displayResult: EmptyObject;
1016
+ };
1017
+ 'attempt_completion': {
1018
+ displayParams: {
1019
+ path: string;
1020
+ command?: string;
1021
+ summary?: string;
1022
+ displaySkipButton?: boolean;
1023
+ };
1024
+ displayResult: {
1025
+ commandResult?: {
1026
+ status: WorkflowStatus;
1027
+ };
1028
+ };
1029
+ };
1030
+ 'run_command': {
1031
+ displayParams: {
1032
+ path: string;
1033
+ command?: string;
1034
+ displaySkipButton: boolean;
1035
+ };
1036
+ displayResult: {
1037
+ commandResult?: {
1038
+ status: WorkflowStatus;
1039
+ };
1040
+ };
1041
+ };
1042
+ 'read_file': {
1043
+ displayParams: {
1044
+ path: string;
1045
+ };
1046
+ displayResult: {
1047
+ lineCount: number;
1048
+ readFile?: DisplayFileInfo;
1049
+ };
1050
+ };
1051
+ 'list_code_definition_names': {
1052
+ displayParams: {
1053
+ path?: string;
1054
+ };
1055
+ displayResult: EmptyObject;
1056
+ };
1057
+ 'write_file': {
1058
+ displayParams: {
1059
+ path: string;
1060
+ content?: string;
1061
+ };
1062
+ displayResult: EmptyObject;
1063
+ };
1064
+ 'delete_file': {
1065
+ displayParams: {
1066
+ path: string;
1067
+ };
1068
+ displayResult: EmptyObject;
1069
+ };
1070
+ 'patch_file': {
1071
+ displayParams: {
1072
+ path: string;
1073
+ };
1074
+ displayResult: EmptyObject;
1075
+ };
1076
+ 'run_debug_command': {
1077
+ displayParams: {
1078
+ path: string;
1079
+ command?: string;
1080
+ displaySkipButton: boolean;
1081
+ };
1082
+ displayResult: {
1083
+ commandResult?: {
1084
+ status: WorkflowStatus;
1085
+ };
1086
+ };
1087
+ };
1088
+ 'mcp_tool': {
1089
+ displayParams: {
1090
+ serverName?: string;
1091
+ toolName?: string;
1092
+ args?: string;
1093
+ };
1094
+ displayResult: {
1095
+ mcpResult?: {
1096
+ content?: any;
1097
+ errorMsg?: string;
1098
+ };
1099
+ };
1100
+ };
1101
+ 'f2c_tool': {
1102
+ displayParams: {
1103
+ content?: string;
1104
+ url?: string;
1105
+ toolName?: string;
1106
+ };
1107
+ displayResult: EmptyObject;
1108
+ };
1109
+ 'extract_content_blocks': {
1110
+ displayParams: EmptyObject;
1111
+ displayResult: {
1112
+ fileBlocks: DisplayFileInfo[];
1113
+ };
1114
+ };
1115
+ 'unknown': {
1116
+ displayParams: EmptyObject;
1117
+ displayResult: EmptyObject;
1118
+ };
1119
+ }
1120
+ interface DisplayFileInfo {
1121
+ path: string;
1122
+ startLine: number;
1123
+ endLine: number;
1124
+ }
1125
+ type ToolCallMessageDisplayResult<T extends AgentToolCallType = AgentToolCallType> = ToolCallMessageSpec[T]['displayResult'];
1126
+ type ToolCallMessageDisplayParams<T extends AgentToolCallType = AgentToolCallType> = ToolCallMessageSpec[T]['displayParams'];
1127
+ interface AgentToolCallElement<T extends AgentToolCallType = AgentToolCallType> {
1128
+ id: string;
1129
+ type: 'TOOL_CALL';
1130
+ status: AgentMessageStatus;
1131
+ composer: {
1132
+ markdown: string;
1133
+ tasks: AgentComposerTask[];
1134
+ };
1135
+ toolName: T;
1136
+ workflowStatus: WorkflowStatus;
1137
+ displayParams?: ToolCallMessageDisplayParams<T>;
1138
+ displayResult?: ToolCallMessageDisplayResult<T>;
1139
+ }
1140
+ interface AgentReasonElement {
1141
+ type: 'REASON';
1142
+ id: number;
1143
+ text: string;
1144
+ startTime: number;
1145
+ lastModifiedTime: number;
1146
+ status: AgentMessageStatus;
1147
+ }
1148
+ interface AssistantMessage {
1149
+ id: string;
1150
+ role: 'assistant';
1151
+ userMessageId?: string;
1152
+ content: any;
1153
+ elements: Array<AgentTextElement | AgentToolCallElement<'unknown'>>;
1154
+ }
1155
+ type Message = UserMessage | AssistantMessage;
1156
+ declare enum AgentConversationType {
1157
+ /** 安全智能体 */
1158
+ SecuBotConversation = "SecuBotConversation",
1159
+ /** Debug智能体 */
1160
+ DebugBotConversation = "DebugBotConversation",
1161
+ /** 单测智能体 */
1162
+ TestBotConversation = "TestBotConversation",
1163
+ /** 端到端智能体 */
1164
+ E2EBotConversation = "E2EBotConversation",
1165
+ /** F2C智能体 */
1166
+ F2cBotConversation = "F2cBotConversation"
1167
+ }
1168
+ declare const AgentConversationTypeNames: Record<AgentConversationType, string>;
1169
+ declare enum AgentConversationStatus {
1170
+ /** 创建但未发生内容变化 */
1171
+ Ready = "Ready",
1172
+ /** 进行中 */
1173
+ Running = "Running",
1174
+ /** 失败 */
1175
+ Failed = "Failed",
1176
+ /** 完成 */
1177
+ Completed = "Completed",
1178
+ /** 停止生成 */
1179
+ Cancelled = "Cancelled"
1180
+ }
1181
+ interface AgentConversationInfo {
1182
+ id: string;
1183
+ status: AgentConversationStatus;
1184
+ type: AgentConversationType;
1185
+ lastQuery?: string;
1186
+ }
1187
+ type AgentPayloadMessageType = 'message-operation' | 'stop-generating' | 'add-conversation' | 'rebuild-conversation' | 'add-message' | 'refresh-messages';
1188
+ interface AgentPayload<T = any> {
1189
+ payload: T;
1190
+ conversationId: string;
1191
+ conversationType?: AgentConversationType;
1192
+ messageType: AgentPayloadMessageType;
1193
+ }
1194
+ declare const ACTION_DEBUG_TASK_PROCESS = "ACTION_DEBUG_TASK_PROCESS";
1195
+ interface DebugAgentPayload {
1196
+ query: string;
1197
+ code?: string;
1198
+ triggerType?: string;
1199
+ platform?: string;
1200
+ ideVersion?: string;
1201
+ command?: {
1202
+ commandLine: string;
1203
+ pwd: string;
1204
+ };
1205
+ customPrompt?: string;
1206
+ cwd?: string;
1207
+ contexts?: Record<string, any>;
1208
+ needsValidation?: boolean;
1209
+ }
1210
+ interface DebugAgentCodeContextItem {
1211
+ type: 'errorCode' | 'relatedCode';
1212
+ filePath: string;
1213
+ startLineNum: number;
1214
+ endLineNum: number;
1215
+ }
1216
+ interface BlockItem {
1217
+ type: 'text' | 'code';
1218
+ content: string;
1219
+ replaceToFileData?: {
1220
+ filePath: string;
1221
+ from: string;
1222
+ to: string;
1223
+ };
1224
+ }
1225
+ interface DebugAgentResponse {
1226
+ errorReason?: string;
1227
+ contexts?: DebugAgentCodeContextItem[];
1228
+ content?: string;
1229
+ blocks?: BlockItem[];
1230
+ }
1231
+ interface DebugAgentPluginPayload {
1232
+ pluginName: string;
1233
+ capabilityName?: string;
1234
+ debugAgentPayload: DebugAgentPayload;
1235
+ }
1236
+ declare const ACTION_ASK_RAG = "ACTION_ASK_RAG";
1237
+ interface RAGPayload {
1238
+ pluginName: string;
1239
+ capabilityName?: string;
1240
+ prompt: string;
1241
+ }
1242
+ interface RollbackMessageFileInfo {
1243
+ relativePath: string;
1244
+ absolutePath: string;
1245
+ action: 'willCreate' | 'willDelete' | 'willChange';
1246
+ selected?: boolean;
1247
+ conflict?: boolean;
1248
+ }
1249
+
1250
+ declare const ACTION_GENERATE_MESSAGE = "ACTION_GENERATE_MESSAGE";
1251
+ declare const ACTION_GENERATE_MESSAGE_REPORT = "ACTION_GENERATE_MESSAGE_REPORT";
1252
+ declare const ACTION_BRANCH_CHANGE = "ACTION_BRANCH_CHANGE";
1253
+ interface GenerateMessageResponse {
1254
+ message: string;
1255
+ status: 'success' | 'error';
1256
+ errorMessage?: string;
1257
+ }
1258
+
1259
+ declare const ACTION_SECUBOT = "ACTION_SECUBOT";
1260
+ declare const ACTION_SECUBOT_TASK_PROGRESS = "ACTION_SECUBOT_TASK_PROGRESS";
1261
+ declare const SECUBOT_DEFAULT_QUERY = "\u4E3A\u6211\u7684\u4EE3\u7801\u5E93\u626B\u63CF\u53EF\u80FD\u7684\u5B89\u5168\u6F0F\u6D1E";
1262
+ interface SecubotQueryPayload {
1263
+ pluginName: string;
1264
+ capabilityName: string;
1265
+ systemInfo: SystemInfoParsed;
1266
+ input?: SecubotAgentParsed;
1267
+ context?: secubotAgentContext;
1268
+ }
1269
+ interface secubotAgentContext {
1270
+ query?: string;
1271
+ selectedCode?: string;
1272
+ activeFileContent?: string;
1273
+ activeFileLineContent?: string;
1274
+ activeFilePath?: string;
1275
+ activeFileName?: string;
1276
+ activeFileLanguage?: string;
1277
+ data?: any;
1278
+ }
1279
+ interface SecubotAgentParsed {
1280
+ messageId: string;
1281
+ pluginName: string;
1282
+ capability?: string | undefined;
1283
+ query: string;
1284
+ data?: any;
1285
+ informationList: Information[];
1286
+ }
1287
+ interface SecubotFileFlaw {
1288
+ description: string;
1289
+ type: string;
1290
+ fixStatus: 'none' | 'repairing' | 'verifying' | 'success' | 'fail';
1291
+ fileName: string;
1292
+ filePath: string;
1293
+ content?: string;
1294
+ children: SecubotFlaw[];
1295
+ action?: string;
1296
+ status?: string;
1297
+ accepted?: number;
1298
+ hasContent?: boolean;
1299
+ cancellationToken?: boolean;
1300
+ }
1301
+ interface SecubotFlaw {
1302
+ title: string;
1303
+ start: number;
1304
+ end: number;
1305
+ flawType: 'C' | 'H' | 'M' | 'L' | 'none';
1306
+ fixStatus: 'none' | 'true' | 'false';
1307
+ details: SecubotFlawDetail;
1308
+ }
1309
+ interface SecubotFlawDetail {
1310
+ title: string;
1311
+ id?: string;
1312
+ flawType?: 'C' | 'H' | 'M' | 'L' | 'none';
1313
+ importPath?: string;
1314
+ description?: string;
1315
+ advice?: string;
1316
+ references?: SecubotLink[];
1317
+ }
1318
+ interface SecubotLink {
1319
+ url: string;
1320
+ title: string;
1321
+ }
1322
+ interface SecubotFixData {
1323
+ data: any;
1324
+ query: string;
1325
+ action: 'fix-common' | 'fix-hardcode';
1326
+ }
1327
+
1328
+ declare const ACTION_CODE_SEARCH = "CODE_SEARCH";
1329
+ interface CodeSearchPayload {
1330
+ /** 检索query */
1331
+ queries: string[];
1332
+ /** 检索范围 */
1333
+ path?: string[];
1334
+ /** 是否需要关键字搜索 */
1335
+ needKeywordSearch?: boolean;
1336
+ /** 是否需要重建索引后再进行检索(重建索引会有一定耗时) */
1337
+ needRecreateIndex?: boolean;
1338
+ /** 重建索引最大等待耗时,单位为秒 */
1339
+ maxDuration?: number;
1340
+ }
1341
+ interface CodeSearchPluginPayload {
1342
+ pluginName: string;
1343
+ capabilityName?: string;
1344
+ codeSearchPayload: CodeSearchPayload;
1345
+ }
1346
+ interface Position {
1347
+ line: number;
1348
+ column: number;
1349
+ }
1350
+ type CodeChunkType = 'embedding' | 'keyword';
1351
+ interface CodeChunk {
1352
+ repo: string;
1353
+ type: CodeChunkType;
1354
+ path: string;
1355
+ content: string;
1356
+ commentContent?: string;
1357
+ contentStart: Position;
1358
+ contentEnd: Position;
1359
+ distance?: number;
1360
+ symbolName?: string;
1361
+ symbolType?: string;
1362
+ }
1363
+
1364
+ interface BugDetail {
1365
+ rule_name: string;
1366
+ line_number: number;
1367
+ description: string;
1368
+ type: string;
1369
+ bug_es_id: string;
1370
+ }
1371
+ interface CodestyleBugs {
1372
+ [filePath: string]: BugDetail[];
1373
+ }
1374
+ interface SubIscanResult {
1375
+ bugs: CodestyleBugs;
1376
+ high: number;
1377
+ middle: number;
1378
+ low: number;
1379
+ report: string;
1380
+ bug_num: number;
1381
+ message: string;
1382
+ file_num: number;
1383
+ status: number;
1384
+ }
1385
+ interface IScanResult {
1386
+ status: string;
1387
+ bugbye: SubIscanResult | null;
1388
+ security: SubIscanResult | null;
1389
+ codestyle: SubIscanResult | null;
1390
+ searchIscanErrorMsg: string;
1391
+ }
1392
+ declare const ACTION_START_ISCAN_AND_GET_SEC_RESULT = "START_ISCAN_AND_GET_SEC_RESULT";
1393
+ declare const ACTION_START_ISCAN_BY_SAVE = "START_ISCAN_BY_SAVE";
1394
+ declare const ACTION_START_ISCAN = "START_ISCAN";
1395
+ declare const ACTION_ISCAN_RESULT = "ISCAN_RESULT";
1396
+ declare const ACTION_ISCAN_JOB_BUILD_ID = "ISCAN_JOB_BUILD_ID";
1397
+ declare const ACTION_SCAN_NOTIFICATION = "SCAN_NOTIFICATION";
1398
+ type IcScanTypes = 'init' | 'getResult';
1399
+ interface IScanInvokePayload {
1400
+ pluginName: string;
1401
+ capabilityName: string;
1402
+ scanType: IcScanTypes;
1403
+ systemInfo: SystemInfoParsed;
1404
+ jobBuildId?: string;
1405
+ context?: ActivationContext;
1406
+ }
1407
+ interface IScanResultPayload {
1408
+ chunk: IScanResult;
1409
+ capabilityName?: string;
1410
+ }
1411
+ interface IScanBuildResult {
1412
+ jobBuildId: string;
1413
+ errorMsg: string;
1414
+ status: 'SUCCESS' | 'ERROR';
1415
+ }
1416
+ interface IScanJobBuildPayload {
1417
+ chunk: IScanBuildResult;
1418
+ capabilityName?: string;
1419
+ }
1420
+
1421
+ declare const MCP_SETTINGS_FILE_PATH = ".comate/mcp.json";
1422
+ interface MCPTextContent {
1423
+ type: 'text';
1424
+ text: string;
1425
+ }
1426
+ interface MCPImageContent {
1427
+ type: 'image';
1428
+ data: string;
1429
+ mimeType: string;
1430
+ }
1431
+ interface MCPAudioContent {
1432
+ type: 'audio';
1433
+ data: string;
1434
+ mimeType: string;
1435
+ }
1436
+ interface MCPResourceContent {
1437
+ type: 'resource';
1438
+ resource: {
1439
+ uri: string;
1440
+ mimeType?: string;
1441
+ text?: string;
1442
+ blob?: string;
1443
+ };
1444
+ }
1445
+ interface MCPServerForWebview {
1446
+ name: string;
1447
+ disabled?: boolean;
1448
+ status: 'connected' | 'connecting' | 'disconnected';
1449
+ error?: string;
1450
+ tools?: MCPToolForWebview[];
1451
+ logPath: string;
1452
+ }
1453
+ interface MCPToolForWebview {
1454
+ name: string;
1455
+ description?: string;
1456
+ inputSchema?: object;
1457
+ autoApprove?: boolean;
1458
+ }
1459
+ interface MCPServerConfigForWebview {
1460
+ command?: string;
1461
+ args?: string[];
1462
+ env?: Record<string, string>;
1463
+ cwd?: string;
1464
+ url?: string;
1465
+ disabled?: boolean;
1466
+ }
1467
+
1468
+ type PluginCapabilityType = 'Prompt' | 'Skill' | 'Fallback' | 'Background' | 'Config';
1469
+ interface VisibilitySelector {
1470
+ /** 当前激活文件的语言 */
1471
+ language?: string[];
1472
+ /** 当前激活文件的路径,使用Glob语法 */
1473
+ activeFilePath?: string[];
1474
+ /** 当前激活文件的内容包含关键字 */
1475
+ activeFileContent?: string[];
1476
+ /** 当前用户选中内容包含关键字 */
1477
+ selectedContent?: string[];
1478
+ /** 工作台包含指定文件,使用Glob语法 */
1479
+ workspaceFile?: string[];
1480
+ }
1481
+ interface ConfigObjectBase {
1482
+ title: string;
1483
+ description?: string;
1484
+ }
1485
+ interface ConfigStringObject {
1486
+ type: 'string';
1487
+ enum?: string[];
1488
+ default?: string;
1489
+ }
1490
+ interface ConfigNumberObject {
1491
+ type: 'number' | 'integer';
1492
+ default?: number;
1493
+ }
1494
+ interface ConfigBooleanObject {
1495
+ type: 'boolean';
1496
+ default?: boolean;
1497
+ }
1498
+ type ConfigPrimitiveObject = ConfigStringObject | ConfigNumberObject | ConfigBooleanObject;
1499
+ interface ConfigArrayObject {
1500
+ type: 'array';
1501
+ items: Omit<ConfigPrimitiveObject, 'default'>;
1502
+ }
1503
+ type ConfigSchemaObject = ConfigObjectBase & (ConfigPrimitiveObject | ConfigArrayObject);
1504
+ interface ProviderCapabilityInfo {
1505
+ owner: PluginDescription;
1506
+ type: PluginCapabilityType;
1507
+ name: string;
1508
+ displayName?: string;
1509
+ placeholder?: string;
1510
+ defaultUserMessage?: string;
1511
+ displayTag?: string;
1512
+ enableSmartApply?: boolean;
1513
+ visibilitySelector?: VisibilitySelector;
1514
+ querySelector?: VisibilitySelector;
1515
+ queryScore?: number;
1516
+ }
1517
+ interface PluginConfigSection {
1518
+ title: string;
1519
+ properties: Record<string, ConfigSchemaObject>;
1520
+ required?: string[];
1521
+ }
1522
+ interface PluginConfig {
1523
+ sections: PluginConfigSection[];
1524
+ }
1525
+ interface CapabilityDescription {
1526
+ name: string;
1527
+ type: PluginCapabilityType;
1528
+ displayName: string;
1529
+ description: string;
1530
+ placeholder?: string;
1531
+ defaultUserMessage?: string;
1532
+ displayTag?: string;
1533
+ enableSmartApply?: boolean;
1534
+ visibilitySelector?: VisibilitySelector;
1535
+ querySelector?: VisibilitySelector;
1536
+ }
1537
+ interface PluginDescription {
1538
+ name: string;
1539
+ version: string;
1540
+ icon: string;
1541
+ entry: string;
1542
+ displayName: string;
1543
+ description: string;
1544
+ enableModelSelect?: boolean;
1545
+ keywords: string[];
1546
+ capabilities: CapabilityDescription[];
1547
+ configSchema: PluginConfig;
1548
+ }
1549
+ interface ActivationContext {
1550
+ query: string;
1551
+ data?: any;
1552
+ selectedCode: string;
1553
+ activeFileContent: string;
1554
+ activeFileLineContent: string;
1555
+ activeFilePath: string;
1556
+ activeFileName: string;
1557
+ activeFileLanguage: string;
1558
+ selectedRange?: [{
1559
+ line: number;
1560
+ character: number;
1561
+ }, {
1562
+ line: number;
1563
+ character: number;
1564
+ }] | [];
1565
+ }
1566
+ interface FunctionParameterDefinition {
1567
+ type: 'object';
1568
+ properties: Record<string, JSONSchema7Definition>;
1569
+ required?: string[] | undefined;
1570
+ }
1571
+ interface FunctionDefinition {
1572
+ name: string;
1573
+ description: string;
1574
+ parameters: FunctionParameterDefinition;
1575
+ }
1576
+
1577
+ declare function readPluginDescription(directory: string): Promise<PluginDescription>;
1578
+
1579
+ interface PluignConfigSetSchema {
1580
+ id: string;
1581
+ enabled: boolean;
1582
+ sections: Array<Record<string, any>>;
1583
+ }
1584
+ interface PluginConfigSetValue {
1585
+ enabled: boolean;
1586
+ values: Record<string, any>;
1587
+ }
1588
+ interface PluginConfigSet {
1589
+ pluginId: string;
1590
+ logo: string;
1591
+ pluginName: string;
1592
+ displayName: string;
1593
+ description: string;
1594
+ tags: string[];
1595
+ capability: string;
1596
+ version: string;
1597
+ createTime: string;
1598
+ updateTime: string;
1599
+ creator: string[];
1600
+ admin: string[];
1601
+ configSchema: PluignConfigSetSchema;
1602
+ configValues: PluginConfigSetValue;
1603
+ official: boolean;
1604
+ }
1605
+ interface PluginMeta {
1606
+ independentProcess: boolean;
1607
+ enableBackgroundService: boolean;
1608
+ defaultPermissions: Array<'FileSystem' | 'User'>;
1609
+ behaveAsBuiltIn: boolean;
1610
+ onlyBusinesses: boolean;
1611
+ enableDiagnostic: boolean;
1612
+ diagnosticCapabilityName: string;
1613
+ }
1614
+ declare function mergePluginConfig(objectA?: Record<string, any>, objectB?: Record<string, any>, depth?: number): Record<string, any>;
1615
+ declare function getCurrentUserPluginConfigSet(userName: string): Promise<PluginConfigSet[]>;
1616
+ declare function localPluginConfig(workspaceFolders?: WorkspaceFolder[] | readonly WorkspaceFolder[] | null): Promise<Record<string, any>>;
1617
+ declare function pluginConfigDetail(pluginName: string, configSet: PluginConfigSet[], localPluginConfig: Record<string, any>): Promise<Record<string, any>>;
1618
+
1619
+ declare enum PLATFORM {
1620
+ SAAS = "saas",
1621
+ INTERNAL = "internal",
1622
+ POC = "poc"
1623
+ }
1624
+ declare enum ENVIRONMENT {
1625
+ PRODUCTION = "production",
1626
+ DEVELOPMENT = "development",
1627
+ TEST = "test"
1628
+ }
1629
+ declare enum WEBVIEW_CONSUMER {
1630
+ VSCODE = "vscode",
1631
+ JETBRAINS = "jetbrains"
1632
+ }
1633
+ interface $features {
1634
+ PLATFORM: PLATFORM;
1635
+ WEBVIEW_CONSUMER: WEBVIEW_CONSUMER;
1636
+ ENVIRONMENT: ENVIRONMENT;
1637
+ }
1638
+
1639
+ declare const SAAS_API_HOST = "https://comate.baidu.com";
1640
+ declare const INTERNAL_API_HOST = "https://comate.baidu-int.com";
1641
+ declare const SAAS_TEST_API_HOST = "https://comate-cop.now.baidu.com";
1642
+ declare const INTERNAL_TEST_API_HOST = "https://comate-test.now.baidu.com";
1643
+ declare function setPlatform(newPlatform: PLATFORM): void;
1644
+ declare function setPlatformAndEnvironment(newPlatform: PLATFORM, newEnvironment: ENVIRONMENT): void;
1645
+ declare function setApiHost(newHttpHost: string): void;
1646
+ declare const getApiHost: () => string;
1647
+ declare const setLanguage: (language: 'en' | 'zh' | 'zh-cn' | undefined) => void;
1648
+ declare const axiosInstance: axios.AxiosInstance;
1649
+ declare const createAxiosInstance: (config?: CreateAxiosDefaults) => axios.AxiosInstance;
1650
+ declare const createAxiosCancelTokenSource: () => axios.CancelTokenSource;
1651
+ declare const CanceledError: typeof axios.CanceledError;
1652
+
1653
+ declare function readFileOrNull(filename: string): Promise<string>;
1654
+ declare function getOsAppDataPath(): string;
1655
+ /**
1656
+ * 确定文件夹是否存在,不存在则创建
1657
+ * @param path 检查的文件夹路径
1658
+ * @returns boolean
1659
+ */
1660
+ declare function ensureDirectoryExist(path: string): Promise<boolean>;
1661
+ declare const emptyDir: typeof fse__default.emptyDir;
1662
+ declare const remove: typeof fse__default.remove;
1663
+ declare const readJson: typeof fse__default.readJSON;
1664
+ declare const writeJSON: typeof fse__default.writeJSON;
1665
+
1666
+ interface Deferred {
1667
+ promise: Promise<void>;
1668
+ resolve: () => void;
1669
+ reject: (error: any) => void;
1670
+ }
1671
+ declare function createDeferred(): Deferred;
1672
+
1673
+ interface LogUploaderEvent {
1674
+ category: string;
1675
+ label?: string;
1676
+ content?: any;
1677
+ action?: string;
1678
+ source?: string;
1679
+ }
1680
+ interface LogInitParams {
1681
+ platform: string;
1682
+ ideVersion: string;
1683
+ version: string;
1684
+ license: string;
1685
+ username: string;
1686
+ }
1687
+ type LogType = 'event' | 'error';
1688
+ declare class LogUploaderProvider {
1689
+ private readonly initParams;
1690
+ constructor(initParams: LogInitParams);
1691
+ logError(category: string, content: string): Promise<void>;
1692
+ logUserAction(event: LogUploaderEvent, type?: LogType): Promise<void>;
1693
+ }
1694
+
1695
+ declare class SSEProcessor<T> {
1696
+ private readonly body;
1697
+ private readonly parse;
1698
+ private readonly cancellationToken?;
1699
+ error: boolean;
1700
+ errorMsg: string;
1701
+ constructor(body: IncomingMessage, parse?: (chunk: string) => T, cancellationToken?: vscode.CancellationToken | undefined);
1702
+ processSSE(): AsyncGenerator<T, void, void>;
1703
+ maybeCancel(): boolean;
1704
+ cancel(): void;
1705
+ }
1706
+
1707
+ interface KnowledgeChunk {
1708
+ id: number;
1709
+ workspaceType: string;
1710
+ workspaceUUID: string;
1711
+ knowledgeType: string;
1712
+ knowledgeUUID: string;
1713
+ knowledgeName: string;
1714
+ content: string;
1715
+ source: string;
1716
+ status: string;
1717
+ keys: any[];
1718
+ score?: number | null;
1719
+ hits?: number | null;
1720
+ creator?: string | null;
1721
+ }
1722
+ interface KnowledgeQueryWorkspace {
1723
+ type: string;
1724
+ uuid: string;
1725
+ }
1726
+ interface User {
1727
+ name: string;
1728
+ chineseName: string;
1729
+ email: string;
1730
+ }
1731
+ interface KnowledgeSet {
1732
+ name: string;
1733
+ type: 'NORMAL' | 'SYSTEM' | 'FILE' | 'TEMP';
1734
+ /** 知识集的类型,文本还是代码 */
1735
+ fileContentType: 'TEXT' | 'LOCAL_CODE';
1736
+ uuid: string;
1737
+ origin: string;
1738
+ description: string;
1739
+ status: string;
1740
+ permission: string;
1741
+ iCodeCount: number;
1742
+ localCount: number;
1743
+ kuCount: number;
1744
+ creator: User;
1745
+ createAt: string;
1746
+ updater: User;
1747
+ updateAt: string;
1748
+ }
1749
+ interface KnowledgeSetBase {
1750
+ id: string;
1751
+ uuid?: string;
1752
+ type: string;
1753
+ }
1754
+ interface KnowledgeOptions {
1755
+ knowledgeSets?: KnowledgeQueryWorkspace[];
1756
+ mergeUserKnowledge?: boolean;
1757
+ additionalQueries?: string[];
1758
+ queryRewrite?: boolean;
1759
+ withSource?: boolean;
1760
+ topK?: number;
1761
+ score?: number;
1762
+ checkPermission?: boolean;
1763
+ }
1764
+ declare function getKnowledgeQueryResult(userName: string, query: string, retrievalType: InformationQueryType, localWorkspaces: KnowledgeQueryWorkspace[], options?: KnowledgeOptions, knowledgeUUIDs?: string[], baseURL?: string): Promise<{
1765
+ chunks: KnowledgeChunk[];
1766
+ }>;
1767
+ declare function getCurrentUserKnowledgeSet(userName: string, baseURL?: string, cloudUserName?: string, query?: string): Promise<KnowledgeSet[]>;
1768
+ declare function knowledgeServiceHealthy(baseURL?: string): Promise<void>;
1769
+
1770
+ interface ChatSession {
1771
+ /** chat的来源,包括普通对话、各个智能体,用户区分唯一id,向前兼容默认为chat */
1772
+ source: 'Chat' | AgentConversationType;
1773
+ /** 从头到尾的一次对话 */
1774
+ sessionUuid: string;
1775
+ /** 一次对话的第一条消息的内容 */
1776
+ title: string;
1777
+ /** 创建时间 */
1778
+ ctime: number;
1779
+ /** 最后一次修改时间 */
1780
+ utime: number;
1781
+ /** 会话当次的工作区目录 */
1782
+ workspaceDirectory: string;
1783
+ }
1784
+ interface ChatSessionDetail extends ChatSession {
1785
+ messages: any[];
1786
+ }
1787
+
1788
+ declare function formatPrompt(promptTemplate: string, args?: Record<string, unknown>): string;
1789
+ declare const PROMPTTEMPLATE_ROOT_PATH: ".comate/prompt";
1790
+ declare const getPromptTemplateRootPath: (workspacePath: string) => string;
1791
+ declare const getPromptTemplatePath: (workspacePath: string, fileName: string) => string;
1792
+ declare const getPromptTemplateUuidFromPath: (filePath: string, workspacePath: string) => string;
1793
+
1794
+ interface LanguageConfiguration {
1795
+ extensions?: string[];
1796
+ names?: string[];
1797
+ patterns?: string[];
1798
+ firstLine?: string;
1799
+ }
1800
+ declare class LanguageDetector {
1801
+ static readonly default: LanguageDetector;
1802
+ private readonly entries;
1803
+ registerLanguage(id: string, configuration: LanguageConfiguration): void;
1804
+ detect(name: string, content: string): string | null;
1805
+ }
1806
+
1807
+ declare class VisibilitySelectorMatcher {
1808
+ private readonly selector;
1809
+ private readonly languageDetector;
1810
+ private readonly globWeights;
1811
+ constructor(selector: VisibilitySelector, languageDetector: LanguageDetector);
1812
+ /**
1813
+ * 根据当前工作目录和激活上下文进行匹配
1814
+ *
1815
+ * @param cwd 当前工作目录
1816
+ * @param context 激活上下文
1817
+ * @returns 返回匹配得分,为`0`表示不匹配(隐藏插件),`-1`表示没有任何规则(不隐藏),正数则数字越大匹配度越高
1818
+ */
1819
+ match(cwd: string, context: ActivationContext): Promise<number>;
1820
+ private matchLanguage;
1821
+ private matchActiveFilePath;
1822
+ private matchActiveFileContent;
1823
+ private matchSelectedContent;
1824
+ private matchWorkspaceFile;
1825
+ }
1826
+
1827
+ interface CapabilityIdentity {
1828
+ pluginName: string;
1829
+ capabilityName: string;
1830
+ }
1831
+ declare function isCapabilityMatch(x: CapabilityIdentity, y: CapabilityIdentity): boolean;
1832
+ /**
1833
+ * 判断插件是否可以处理聊天请求
1834
+ *
1835
+ * @param capabilityType 插件能力类型
1836
+ * @returns 如果插件能力类型为可以处理对话请求返回`true`
1837
+ */
1838
+ declare function canHandleChatQuery(capabilityType: PluginCapabilityType): boolean;
1839
+ /**
1840
+ * 判断插件能力是否可以展示给用户
1841
+ * @param capabilityType 插件能力类型
1842
+ * @returns 如果插件能力类型为可以展示返回`true`
1843
+ */
1844
+ declare function canShowToUser(capabilityType: PluginCapabilityType): boolean;
1845
+ /**
1846
+ * 判断插件是否能够进行querySelector
1847
+ *
1848
+ * @param capabilityType 插件能力类型
1849
+ * @returns 如果插件能力可以querySelector返回`true`
1850
+ */
1851
+ declare function canHandleQuerySelector(capabilityType: PluginCapabilityType): boolean;
1852
+ declare function patchEnvPath(): void;
1853
+
1854
+ declare const ACTION_COMATE_PLUS_CHAT_QUERY = "COMATE_PLUS_CHAT_QUERY";
1855
+ declare const ACTION_COMATE_PLUS_CHAT_CANCEL = "COMATE_PLUS_CHAT_CANCEL";
1856
+ declare const ACTION_COMATE_PLUS_CUSTOM_COMMAND = "COMATE_PLUS_CUSTOM_COMMAND";
1857
+ declare const ACTION_COMATE_PLUS_AGENT_COMMAND = "COMATE_PLUS_AGENT_COMMAND";
1858
+ declare const ACTION_COMATE_PLUS_WEBVIEW_INIT_DATA = "COMATE_PLUS_WEBVIEW_INIT_DATA";
1859
+ declare const ACTION_COMATE_PLUS_DRAW_CHAT_UPDATE = "COMATE_PLUS_DRAW_CHAT_UPDATE";
1860
+ declare const ACTION_COMATE_PLUS_DRAW_CHAT_APPEND = "COMATE_PLUS_DRAW_CHAT_APPEND";
1861
+ declare const ACTION_COMATE_PLUS_DRAW_CHAT_FINISH = "COMATE_PLUS_DRAW_CHAT_FINISH";
1862
+ declare const ACTION_COMATE_PLUS_DRAW_CHAT_FAIL = "COMATE_PLUS_DRAW_CHAT_FAIL";
1863
+ declare const ACTION_COMATE_PLUS_REQUEST_PERMISSION = "REQUEST_PERMISSION";
1864
+ declare const ACTION_COMATE_PLUS_QUERY_SELECTOR = "COMATE_PLUS_QUERY_SELECTOR";
1865
+ declare const ACTION_USER_DETAIL = "USER_DETAIL";
1866
+ declare const ACTION_COMATE_PLUS_INITIALIZED = "COMATE_PLUS_INITIALIZED";
1867
+ declare const ACTION_ENGINE_PROCESS_START_SUCCESS = "ENGINE_PROCESS_START_SUCCESS";
1868
+ declare const ACTION_USER_DETAIL_ERROR = "USER_DETAIL_ERROR";
1869
+ declare const ACTION_COMATE_PLUS_AGENT_NOTIFICATION = "COMATE_PLUS_AGENT_NOTIFICATION";
1870
+ declare const ACTION_COMATE_LSP_WORKSPACE_FOLDERS = "COMATE_LSP_WORKSPACE_FOLDERS";
1871
+ declare const ACTION_COMATE_LSP_REMOTE_CONSOLE = "COMATE_LSP_REMOTE_CONSOLE";
1872
+ declare const ACTION_COMATE_PLUS_SECTION_CHAT_UPDATE = "COMATE_PLUS_SECTION_CHAT_UPDATE";
1873
+ declare const ACTION_COMATE_PLUS_RECREATE_INDEX = "COMATE_PLUS_RECREATE_INDEX";
1874
+ declare const ACTION_COMATE_PLUS_CODE_SEARCH = "COMATE_PLUS_CODE_SEARCH";
1875
+ declare const ACTION_COMATE_PLUS_BATCH_ACCEPT = "COMATE_PLUS_ACCEPT_DIR";
1876
+ declare const ACTION_COMATE_SMART_APPLY = "ACTION_COMATE_SMART_APPLY";
1877
+ declare const ACTION_CHAT_SESSION_LIST = "kernel/chatSession/list";
1878
+ declare const ACTION_CHAT_SESSION_SAVE = "kernel/chatSession/save";
1879
+ declare const ACTION_CHAT_SESSION_DELETE = "kernel/chatSession/delete";
1880
+ declare const ACTION_CHAT_SESSION_FIND = "kernel/chatSession/find";
1881
+ /** 获取全部智能体任务 */
1882
+ declare const ACTION_COMATE_GET_AGENT_TASKS = "COMATE_GET_AGENT_TASKS";
1883
+ /** 新增智能体任务 */
1884
+ declare const ACTION_COMATE_ADD_AGENT_TASK = "COMATE_ADD_AGENT_TASK";
1885
+ /** 设置某个智能体任务到前台 */
1886
+ declare const ACTION_COMATE_SET_FOREGROUND_TASK = "COMATE_SET_FOREGROUND_TASK";
1887
+ /** 更新前台智能体消息 */
1888
+ declare const ACTION_COMATE_UPDATE_AGENT_TASK_MESSAGES = "COMATE_UPDATE_AGENT_TASK_MESSAGES";
1889
+ declare const ACTION_MOCK_VIRTUAL_EDITOR_EVENT = "ACTION_MOCK_VIRTUAL_EDITOR_EVENT";
1890
+ declare const ACTION_COMPOSER = "ACTION_COMPOSER";
1891
+ /** Debug 智能体自定义事件 */
1892
+ declare const AGENT_DEBUG_CUSTOM_ACTION = "COMATE_AGENT_DEBUG_CUSTOM_ACTION";
1893
+ /** 增加缓存 */
1894
+ declare const ACTION_COMATE_ADD_CACHE = "COMATE_ADD_CACHE";
1895
+ /** 获取缓存数据 */
1896
+ declare const ACTION_COMATE_GET_CACHE = "COMATE_GET_CACHE";
1897
+ declare const ACTION_PROMPTTEMPLATE_LIST = "kernel/promptTemplate/list";
1898
+ declare const ACTION_PROMPTTEMPLATE_CREATE = "kernel/promptTemplate/create";
1899
+ declare const ACTION_PROMPTTEMPLATE_UPDATE = "kernel/promptTemplate/update";
1900
+ declare const ACTION_PROMPTTEMPLATE_DELETE = "kernel/promptTemplate/delete";
1901
+ declare const ACTION_ENGINE_SERVICE_INITIALIZED = "ENGINE_SERVICE_INITIALIZED";
1902
+ /** 规则面板触发的操作的事件 */
1903
+ declare const RULE_PANEL_ACTION_EVENT = "RULE_PANEL_ACTION_EVENT";
1904
+ /** 更新规则面板界面的事件 */
1905
+ declare const UPDATE_RULE_PANEL_EVENT = "UPDATE_RULE_PANEL_EVENT";
1906
+
1907
+ declare const replacePathTextInMarkdown: (content: string, paths: string[]) => Promise<string>;
1908
+
1909
+ /**
1910
+ * vpcConfig字段不为空且status=true时,表明license所在企业为vpc环境部署,此时需要将endpoint字段设置为插件端访问的endpoint
1911
+ * status=true时,若intranetDomain字段不为空,那么在涉及autowork相关功能使用时需要进行内网环境校验,
1912
+ * 该字段内容为一个域名,具体校验方式为解析该域名,若解析得到的ip属于intranetSubnets列表中的任一个子网,
1913
+ * 则说明用户处于内网环境,用户可继续进行操作,否则说明不在内网环境,此时展示报错信息intranetErrorMsg
1914
+ */
1915
+ interface LicenseFullDetail {
1916
+ key: string;
1917
+ typeId: number;
1918
+ typeCode: 'ENTERPRISE' | 'TRIAL_ENTERPRISE' | 'EDUCATIONAL' | 'INDIVIDUAL' | 'TRIAL_INDIVIDUAL' | 'INTERNATIONAL' | 'CUSTOMIZED_ENTERPRISE' | 'PRO_ENTERPRISE';
1919
+ type: string;
1920
+ customized: boolean;
1921
+ customizedUrl: string;
1922
+ vpcConfig: {
1923
+ status: boolean;
1924
+ endpoint: string;
1925
+ intranetDomain: string;
1926
+ intranetSubnets: string[];
1927
+ intranetErrorMsg: string;
1928
+ };
1929
+ features: {
1930
+ enableUploadKnowledgeFromIDE: boolean;
1931
+ customFeedbackURL: string;
1932
+ };
1933
+ commonConfig: {
1934
+ diffTrackerRateSeconds: number;
1935
+ effectiveInputLines: number;
1936
+ uploadFilesBranchChangeMonitoringInterval: number;
1937
+ };
1938
+ }
1939
+ declare function getUserLicenseType(license: string): Promise<LicenseFullDetail>;
1940
+
1941
+ interface NotificationMessage {
1942
+ type: 'error' | 'info' | 'warning';
1943
+ reason: string;
1944
+ }
1945
+
1946
+ interface Option {
1947
+ eol: string;
1948
+ /** 设置为`true`时,只要diff行遍历结束,就立刻返回内容,不生成全部的代码 */
1949
+ returnContentWhenDiffLineLoopFinish?: boolean;
1950
+ /** 设置为`true`时,匹配行时忽略缩进 */
1951
+ skipIndentWhenMatchDiffLine?: boolean;
1952
+ throwErrorWhenLineCanNotMathced?: boolean;
1953
+ }
1954
+ /**
1955
+ * 将 diff 应用到原始内容上, 生成新的内容,具体可看测试用例
1956
+ * @param originalContent 原始内容
1957
+ * @param diffWithoutLineSeq diff 内容,但是没有行序号,起止的标识 `@@ ... @@`
1958
+ */
1959
+ declare function applyDiff(originalContent: string, diffWithoutLineSeq: string, opts: Option): string;
1960
+
1961
+ /**
1962
+ * 找到代码块在原内容中的起始行号
1963
+ * @param codeChunk 代码块
1964
+ * @param originalContent 原代码块
1965
+ * @returns
1966
+ */
1967
+ declare const findCodeChunkStartLineIndex: (codeChunk: string, originalContent: string) => number;
1968
+ declare const fixUdiffLineMarker: (diff: string, originalContent: string) => string;
1969
+
1970
+ interface ParsedPatch {
1971
+ search: string[];
1972
+ replace: string[];
1973
+ }
1974
+ declare class PatchFileDelimiterError extends Error {
1975
+ message: string;
1976
+ }
1977
+ interface Opts {
1978
+ /** 是否流式,流式过程中只会做简单的搜索替换,结束或会做更详细的相似度匹配 */
1979
+ stream?: boolean;
1980
+ }
1981
+ declare class SearchReplacePatchError extends Error {
1982
+ readonly patchIndex: number;
1983
+ readonly patches: ParsedPatch[];
1984
+ readonly content: string;
1985
+ constructor(patchIndex: number, patches: ParsedPatch[], content: string);
1986
+ get result(): {
1987
+ similiarBlock: string;
1988
+ failedPatchIndex: number;
1989
+ patches: ParsedPatch[];
1990
+ };
1991
+ }
1992
+ /**
1993
+ * 1. 去除检索时,模型多生成行首换行
1994
+ * 2. 增加模型生成时,行不完整的匹配
1995
+ * 3. 增加通过匹配首尾行收窄范围的匹配
1996
+ * 4. 增加相似度 n+4 行的相似度匹配
1997
+ * 5. 以上策略均为匹配时,返回修改失败,并提供最相似代码上下2行代码,进行二次修改
1998
+ */
1999
+ declare const applySearchReplaceChunk: (originalContent: string, searchReplaceChunk: string, opts?: Opts) => {
2000
+ error: any;
2001
+ patchedContent: any;
2002
+ patches: ParsedPatch[];
2003
+ };
2004
+
2005
+ declare const DEFAULT_WORKSPACE_CONFIG_FOLDER = ".comate";
2006
+ declare const DEFAULT_RULE_CONFIG_FOLDER = "rules";
2007
+ declare const DEFAULT_WORKSPACE_RULE_FILE = "default.mdr";
2008
+ interface RuleMetadata {
2009
+ description?: string;
2010
+ globs?: string;
2011
+ alwaysApply?: boolean;
2012
+ }
2013
+ interface RuleItem {
2014
+ name: string;
2015
+ /** 相对路径 */
2016
+ path: string;
2017
+ metadata: RuleMetadata;
2018
+ firstLine: string;
2019
+ }
2020
+ interface RulePanelActionParamsMap {
2021
+ getRuleList: Record<string, never>;
2022
+ createRule: {
2023
+ name: string;
2024
+ metadata?: RuleMetadata;
2025
+ };
2026
+ deleteRule: {
2027
+ path: string;
2028
+ };
2029
+ updateRule: {
2030
+ path: string;
2031
+ name: string;
2032
+ metadata: RuleMetadata;
2033
+ };
2034
+ openRuleFile: {
2035
+ path: string;
2036
+ };
2037
+ isRuleNameExist: {
2038
+ name: string;
2039
+ };
2040
+ checkFilePatternMatch: {
2041
+ globs: string;
2042
+ };
2043
+ }
2044
+ type RulePanelAction = keyof RulePanelActionParamsMap;
2045
+ declare function extractMentionFilesFromRuleConfig(content: string): {
2046
+ files: string[];
2047
+ matches: RegExpMatchArray[];
2048
+ };
2049
+
2050
+ interface DocumentPosition {
2051
+ line: number;
2052
+ column: number;
2053
+ }
2054
+ interface ChunkSelection {
2055
+ start: DocumentPosition;
2056
+ end: DocumentPosition;
2057
+ }
2058
+ interface VirtualDocument {
2059
+ existed: boolean;
2060
+ content: string;
2061
+ absolutePath: string;
2062
+ scheme?: 'file' | 'diff';
2063
+ isDirty?: boolean;
2064
+ isPreview?: boolean;
2065
+ selections?: ChunkSelection[];
2066
+ }
2067
+ interface ReplaceVirtualDiffDocumentParams {
2068
+ absolutePath: string;
2069
+ content: string;
2070
+ stream: boolean;
2071
+ scrollToLine?: number;
2072
+ elementId?: string;
2073
+ source: string;
2074
+ conversationId?: string;
2075
+ }
2076
+ interface DebugCommandResult {
2077
+ status: 'success' | 'error' | 'fail' | 'timeout' | 'unknown' | 'killed';
2078
+ matchError?: string;
2079
+ }
2080
+ declare enum VirtualDocumentAction {
2081
+ EDIT = "edit",
2082
+ PREVIEW = "preview"
2083
+ }
2084
+ declare class VirtualEditor {
2085
+ private readonly config;
2086
+ static event: string;
2087
+ protected readonly promiseMap: Map<string, (res: any) => void>;
2088
+ /** 这个 resolver 可以多次调用,是否结束并删除由 resolver 决定,返回 true 表示结束,返回 false 表示继续监听 */
2089
+ protected readonly customResolverMap: Map<string, (res: any) => boolean>;
2090
+ constructor(config: {
2091
+ send: (event: string, args: any, opts?: {
2092
+ skipWriteLog?: boolean;
2093
+ }) => Promise<any>;
2094
+ logger: {
2095
+ verbose: (...args: any) => void;
2096
+ };
2097
+ });
2098
+ resolve({ uuid, ...res }: {
2099
+ uuid: string;
2100
+ }): void;
2101
+ /**
2102
+ * 打开一个指定绝对路径的文档,如果文档存在,右侧文件区域第一列会打开Tab并激活
2103
+ */
2104
+ openDocument(params: {
2105
+ absolutePath: string;
2106
+ selection?: ChunkSelection;
2107
+ }): Promise<void>;
2108
+ /**
2109
+ * 关闭一个指定绝对路径的文档Tab
2110
+ */
2111
+ closeDocument(params: {
2112
+ absolutePath: string;
2113
+ }): Promise<void>;
2114
+ /**
2115
+ * 删除一个指定绝对路径的文档
2116
+ */
2117
+ deleteDocument(params: {
2118
+ absolutePath: string;
2119
+ }): Promise<void>;
2120
+ /**
2121
+ * 刷新文件树(只用于JetBrains)
2122
+ */
2123
+ refreshProjectTree(): Promise<void>;
2124
+ /**
2125
+ * 获取右侧光标所在的文档Tab, 返回绝对路径、内容、scheme,如果未打开任何文档,existed为false
2126
+ */
2127
+ getActiveDocument(): Promise<VirtualDocument>;
2128
+ /**
2129
+ * 获取指定绝对路径的文档, 返回绝对路径、内容、如果文档不存在,existed为false
2130
+ */
2131
+ getDocument(params: {
2132
+ absolutePath: string;
2133
+ }): Promise<VirtualDocument>;
2134
+ /**
2135
+ * 在编辑区打开一个Diff视图,并填充左右的内容,左侧diff文件的来源路径为absolutePath, 左侧基准文件不可编辑
2136
+ */
2137
+ openVirtualDiffDocument(params: {
2138
+ absolutePath: string;
2139
+ content: string;
2140
+ modified: string;
2141
+ elementId?: string;
2142
+ conversationId?: string;
2143
+ source: string;
2144
+ action: VirtualDocumentAction;
2145
+ /** 是否展示采纳的按钮 */
2146
+ acceptable?: boolean;
2147
+ stream?: boolean;
2148
+ }): Promise<void>;
2149
+ /**
2150
+ * 以文件绝对路径为索引,关闭一个Diff视图
2151
+ */
2152
+ closeVirtualDiffDocument(params: {
2153
+ absolutePath: string;
2154
+ }): Promise<void>;
2155
+ /**
2156
+ * 以全文替换的方式,更新diff视图右侧的文件内容,如果Diff不存在,则无效果
2157
+ */
2158
+ replaceVirtualDiffModifiedDocument(params: ReplaceVirtualDiffDocumentParams): Promise<void>;
2159
+ /**
2160
+ * 获取以绝对路径为索引的diff视图右侧最新的内容,如果不存在,则existed为false
2161
+ */
2162
+ getVirtualDiffDocument(params: {
2163
+ absolutePath: string;
2164
+ }): Promise<VirtualDocument>;
2165
+ /**
2166
+ * 以全文替换的形式,覆盖指定绝对路径的文件并保存
2167
+ */
2168
+ saveDocumentWithReplaceContent(params: {
2169
+ absolutePath: string;
2170
+ content: string;
2171
+ source?: string;
2172
+ }): Promise<any>;
2173
+ /**
2174
+ * 以全文替换的形式,覆盖指定绝对路径的文件并保存并打开文件
2175
+ */
2176
+ saveDocumentWithReplaceContentAndOpen(params: {
2177
+ absolutePath: string;
2178
+ content: string;
2179
+ source?: string;
2180
+ }): Promise<any>;
2181
+ executeTerminalShell(params: {
2182
+ cmd: string;
2183
+ cwd?: string;
2184
+ duration?: number;
2185
+ run?: boolean;
2186
+ enableStreamOutput?: boolean;
2187
+ }, onUpdate?: (result: {
2188
+ output: string;
2189
+ }) => void): Promise<{
2190
+ completed: boolean;
2191
+ output: string;
2192
+ isEnd?: boolean;
2193
+ failed?: boolean;
2194
+ }>;
2195
+ /**
2196
+ * 执行 Debug 智能体的特殊命令,并对结果进行 Debug 分析(解析的逻辑没挪到 kernel 只能现在 IDE 处理了)
2197
+ * vscode 里边是执行一个特殊的 terminal 命令(pty是自定义的)
2198
+ * jetbrains 是执行的 IDE 调试指令
2199
+ */
2200
+ executeDebugCommand(params: {
2201
+ cmd: string;
2202
+ cwd: string;
2203
+ duration?: number;
2204
+ }): Promise<DebugCommandResult>;
2205
+ /**
2206
+ * 获取当前激活的终端,最新一条输出, 任何其余情况,都将output设置为空返回
2207
+ */
2208
+ getLatestOutputFromActiveTerminal(): Promise<{
2209
+ output: string;
2210
+ }>;
2211
+ openUrlInEditorWebview(params: {
2212
+ url: string;
2213
+ title: string;
2214
+ image?: boolean;
2215
+ }): Promise<void>;
2216
+ endConversationEditSession(params: {
2217
+ conversationId: string;
2218
+ }): Promise<void>;
2219
+ startConversationEditSession(params: {
2220
+ conversationId: string;
2221
+ source: AgentConversationType;
2222
+ }): Promise<void>;
2223
+ getDocumentDiagnostics(params: {
2224
+ absolutePath: string;
2225
+ elementId?: string;
2226
+ conversationId?: string;
2227
+ }): Promise<{
2228
+ originalDiagnostics?: any[];
2229
+ modifiedDiagnostics?: any[];
2230
+ fileDiagnostics?: any[];
2231
+ }>;
2232
+ private sendToIDE;
2233
+ private withReceivePromise;
2234
+ private withReceiveEndPromise;
2235
+ }
2236
+ type VirtualEditMethod = Exclude<keyof VirtualEditor, 'resolve'>;
2237
+ type VirtualEditorMethodCall = {
2238
+ [K in keyof VirtualEditor as VirtualEditor[K] extends Function ? K : never]: {
2239
+ action: K;
2240
+ payload: Parameters<VirtualEditor[K]>[0] & {
2241
+ uuid: string;
2242
+ };
2243
+ response: ReturnType<VirtualEditor[K]>;
2244
+ };
2245
+ }[VirtualEditMethod];
2246
+
2247
+ declare const SUPPORTED_SUFFIX_CONFIG: Record<string, string[]>;
2248
+ declare const SUFFIX_LANG_MAP: Record<any, string>;
2249
+
2250
+ declare const ACTION_V8_SNAP_SHOT = "ACTION_V8_SNAP_SHOT";
2251
+
2252
+ /**
2253
+ * 解析shell命令字符串,提取其中的命令名称
2254
+ *
2255
+ * 该函数会解析给定的shell命令字符串,识别其中的命令名称
2256
+ * 比如: 'cd /path/to/dir && ls -l' 会返回 ['cd', 'ls']
2257
+ *
2258
+ * @param command - 要解析的shell命令字符串
2259
+ * @returns 包含命令名称的字符串数组,按命令在原始字符串中的出现顺序排列
2260
+ */
2261
+ declare function parseShellCommandName(command: string): string[];
2262
+
2263
+ var bundle_l10n_zhCn = {
2264
+ "version.update.title": "发现新版本,是否安装?",
2265
+ "version.update.install": "安装最新版本",
2266
+ "version.update.ignore": "不再提醒",
2267
+ "statusBar.not.support.text": "暂不支持该语言",
2268
+ "statusBar.enable.text": "启用",
2269
+ "statusBar.title": "文心快码",
2270
+ "statusBar.nosuggestions": "文心快码: 无建议",
2271
+ "statusBar.ide.loading": "内联建议生成中",
2272
+ "statusBar.ide.complete": "已生成内联建议",
2273
+ "statusBar.ide.nosuggestions": "无内联建议",
2274
+ "statusBar.ide.pause": "暂停补全({0} 后自动开启)",
2275
+ "statusBar.ide.close": "补全已关闭",
2276
+ "completion.panel.accept.text": "采纳此推荐",
2277
+ "completion.panel.accept.tooltip": "将此次推荐结果应用到代码中",
2278
+ "completion.panel.codelens.disabled.text": "Baidu Comate 补全生成面板需要启用 Code Lens 功能,请在设置中启用此功能后重试~",
2279
+ "completion.panel.title": "补全生成面板",
2280
+ "completion.panel.empty.text": "暂无结果",
2281
+ "completion.panel.hidden.text": "重复项隐藏",
2282
+ "completion.panel.synthesizing.text": "生成补全",
2283
+ "completion.decoration.basic": "💡 Tab 采纳, Esc 取消",
2284
+ "completion.decoration.widget.text": "💡 Tab 采纳 Comate 推荐, Enter 采纳 IDE 推荐",
2285
+ "completion.decoration.acceptLine.text": "💡 {0} + ↓ 逐行采纳",
2286
+ "command.openLicenseConfigEvent.placeholder": "填写已有的 License",
2287
+ "nl2code.empty.text": "抱歉,我无法回答这个问题,您可以试着向我提问其他编程问题",
2288
+ "nl2code.no.selection.text": "请先选中一段代码,再试一次",
2289
+ "optimize.codelens.title": "调优建议",
2290
+ "optimize.codeActions.title": "使用 Comate 调优",
2291
+ "optimize.codelens.tooltip": "Comate 优化该函数",
2292
+ "optimize.error": "未能优化函数",
2293
+ "optimize.code.prompt": "请优化下面的代码:",
2294
+ "optimize.no.selection.text": "请框选要优化的代码",
2295
+ "optimize.function.prompt": "请优化下面的函数:",
2296
+ "chatTrial.codelens.title": "打开侧边栏",
2297
+ "chatTips.selectedCode.title": "{0} + I 基于选中代码进行对话",
2298
+ "chatTips.blankRow.title": "{0} 打开对话,{1} 快速编辑",
2299
+ "decorations.generating.title": "Comate 正在生成中",
2300
+ "decorations.lineComent.trigger.title": "{0} + P 触发注释生成代码",
2301
+ "comment.prompt": "请为下面的函数增加行间注释:",
2302
+ "comment.codelens.title": "行间注释",
2303
+ "comment.codelens.tooltip": "Comate 为该函数增加行间注释",
2304
+ "comment.inlinechat.title": "/行间注释",
2305
+ "comment.generate.error": "未能生成行间注释",
2306
+ "docstring.prompt": "为下面的函数生成注释:",
2307
+ "docstring.codelens.title": "函数注释",
2308
+ "docstring.codelens.tooltip": "Comate 生成该函数注释",
2309
+ "docstring.inlinechat.title": "/函数注释",
2310
+ "docstring.generate.error": "未能生成注释",
2311
+ "split.prompt": "请拆分下面的函数:",
2312
+ "split.codelens.title": "函数拆分",
2313
+ "split.codelens.tooltip": "Comate 拆分该函数",
2314
+ "split.generate.error": "未能拆分函数",
2315
+ "explain.codelens.title": "代码解释",
2316
+ "explain.codeActions.title": "使用 Comate 解释",
2317
+ "explain.codelens.tooltip": "Comate 生成该函数的解释",
2318
+ "explain.generate.error": "未能生成代码解释",
2319
+ "explain.no.selection.text": "请框选要解释的代码",
2320
+ "codeReview.no.selection.text": "仅支持针对代码文件、代码#diff,代码块进行规范性审查,请选择指定内容",
2321
+ "codeReview.query.text": "请帮我审查这段代码,并提出改进建议。",
2322
+ "codeReview.notIn.whiteList": "仅支持评审'.java', '.py', '.js', '.jsx', '.ts', '.tsx', '.vue', '.go', '.c', '.h', '.cpp', '.hpp', '.cc', '.cxx', '.hxx', '.hh'结尾的文件",
2323
+ "explain.prompt": "解释下面的{0}:",
2324
+ "unitTest.codelens.title": "生成单测",
2325
+ "unitTest.codelens.tooltip": "Comate 生成该函数的单测",
2326
+ "unitTest.generate.error": "未能生成单测",
2327
+ "unitTest.accept.error": "Comate 采纳单元测试用例失败:",
2328
+ "unitTest.prompt": "请为下面的{0}生成单测{1}:",
2329
+ "inlinechat.placeholder.generate": "提交",
2330
+ "inlinechat.placeholder.selected": "输入自然语言修改代码或选择推荐项(Enter键提交,Esc键取消)",
2331
+ "inlinechat.placeholder.unselected": "输入自然语言生成代码或选择推荐项(Enter键提交,Esc键取消)",
2332
+ "inlinechat.title": "{0} Comate 正在生成代码 {1}",
2333
+ "inlinechat.accept": "采纳 {0}",
2334
+ "inlinechat.reject": "放弃 {0}",
2335
+ "inlinechat.placeholder.error": "请先采纳或放弃上一次代码",
2336
+ "inlinechat.codelens.title": "修改代码",
2337
+ "inlinechat.codeActions.title": "使用 Comate 编辑",
2338
+ "inlineLog.prompt": "请为下面的函数添加日志输出:",
2339
+ "inlineLog.codelens.title": "添加日志",
2340
+ "inlineLog.codelens.tooltip": "Comate 为该函数添加日志输出",
2341
+ "inlineLog.generate.error": "未能添加日志输出",
2342
+ "diff.title": "查看变更",
2343
+ "diff.accept": "采纳 {0}",
2344
+ "diff.reject": "放弃 {0}",
2345
+ "diff.dualScreenDiff.open": "查看变更 {0}",
2346
+ "chat.webview.title": "Comate 对话",
2347
+ "chat.no.insertPosition.text": "请先选中插入位置",
2348
+ "accept.path.error": "请输入正确的文件路径",
2349
+ "quickFix.action.text": "Comate 错误修复",
2350
+ "quickFix.prompt": "请根据以下的提示信息修复代码{0}:",
2351
+ "quickFix.generate.error": "未能修复代码",
2352
+ "quickFix.prompt.suffix": ",请告诉我修复后的代码,不要行间解释",
2353
+ "regexHover.tooltip": "查看正则解释",
2354
+ "regexHover.prompt": "请解释这个正则表达式的含义:",
2355
+ "embeddings.maximum.files.message": "无法创建向量索引:当前工作区已超过{0}个文件上限",
2356
+ "embeddings.progress.message": "更新索引中",
2357
+ "embeddings.progress.tooltip.message": "Comate正在为当前代码库更新索引,完成后可增强生成质量",
2358
+ "openPlatform.title.text": "Comate 开放平台",
2359
+ "openPlatform.webview.title": "Comate 插件配置中心",
2360
+ "messageGenerate.generate.error": "生成失败:{0}",
2361
+ "messageGenerate.noDiff.error": "未检测到变更内容",
2362
+ "messageGenerate.getDiff.error": "获取变更内容失败:{0}",
2363
+ "messageGenerate.emptyContent.error": "未能生成commit message",
2364
+ "autoWork.auth.modal.title": "代码授权",
2365
+ "autoWork.indexing.message": "向量索引创建中, 请耐心等待",
2366
+ "autoWork.connection.interrupt.message": "连接已中断,请重试",
2367
+ "autoWork.indexing.reminder.text": "Comate 正在理解你的代码库,索引创建进度 {0}%;索引创建完成后点击重新生成,可获得更符合业务场景的答案。",
2368
+ "autoWork.error": "AutoWork 生成失败",
2369
+ "autoWork.task.thought": "分析您的目标",
2370
+ "autoWork.task.answer": "构建您的答案",
2371
+ "autoWork.autoDebug": "Comate分析与修复",
2372
+ "autoWork.autoDebug.prompt": "请帮我分析终端的报错日志,并提供解决方案。只解决第一个报错",
2373
+ "autoWork.autoDebug.thought": "分析您的报错信息",
2374
+ "autoWork.autoDebug.search": "检索报错相关信息",
2375
+ "autoWork.autoDebug.answer": "生成修复方案",
2376
+ "comatePlus.permission.workspace.text": "工作区文件读写",
2377
+ "comatePlus.permission.disk.text": "全盘文件读写",
2378
+ "comatePlus.permission.user.text": "获取用户详细信息",
2379
+ "comatePlus.auth.message": "是否授权插件 {0} 【{1}】的权限",
2380
+ "comatePlus.userInfo.error": "获取用户信息失败,请检查 Comate 配置中的用户名是否正确",
2381
+ "comatePlus.clear.permission": "已清除所有插件权限",
2382
+ "comatePlus.split.error": "已选择的函数足够精简,不符合拆分条件,请重新选择",
2383
+ "comatePlus.noSelection": "请在编辑区选择代码",
2384
+ "comatePlus.not.function.text": "已选择的代码中不包含函数声明,请重新选择",
2385
+ "common.generate.error": "生成失败:{0}",
2386
+ "common.unknown.error": "未知错误",
2387
+ "common.request.error": "请求失败:{0}",
2388
+ "common.code": "代码",
2389
+ "common.function": "函数",
2390
+ "common.authorize": "授权",
2391
+ "common.using": "使用",
2392
+ "common.without": "不使用",
2393
+ "common.comma": ",",
2394
+ "common.semicolon": ";",
2395
+ "common.framework": "框架",
2396
+ "common.related": "关联",
2397
+ "common.prompt": "提示",
2398
+ "common.thinking": "思考过程",
2399
+ "common.searchResult": "搜索结果",
2400
+ "common.deny": "拒绝",
2401
+ "common.navigateToSetting": "前往配置",
2402
+ "common.customize.error": "混合云用户请到插件配置-服务配置中检查调试",
2403
+ "common.private.error": "私有域用户请到插件配置-服务配置中检查调试",
2404
+ "log.level.placeholder": "请选择日志等级",
2405
+ "do.not.show.again": "不再提示",
2406
+ "login.message": "Hi Mate,我是你的智能编码助手文心快码({0})。快来登录,和我一起享受编程的乐趣吧!",
2407
+ "login.action.text": "登录",
2408
+ "login.action.withLicense.text": "配置License",
2409
+ "login.device.error": "获取设备 ID 失败,无法绑定设备",
2410
+ "login.loggingIn.text": "正在登录文心快码 ( Baidu Comate )...",
2411
+ "login.autoLogin": "已使用来自{0}的凭据自动登录文心快码 ( Baidu Comate )",
2412
+ "login.success": "文心快码 ( Baidu Comate )登录成功!",
2413
+ "login.ide.success": "文心快码 AI IDE: 登录成功!",
2414
+ "login.failed": "登录失败:{0}",
2415
+ "login.token.error": "获取 Token 失败",
2416
+ "login.key.error": "'获取 key 失败",
2417
+ "login.install.internal": "去下载内部版本",
2418
+ "login.internalUser.message": "检测到您是百度内部用户,建议使用内部版本Comate(需要卸载当前插件并下载内部版本)",
2419
+ "login.agreement.message": "尊敬的文心快码 ( Baidu Comate )用户,为了提供更好的服务,我们将于2024年4月17日更新[用户服务协议](https://comate.baidu.com/zh/userAgreement)。请您关注并查看更新条款。感谢您的支持!",
2420
+ "renew.action.text": "前往续费",
2421
+ "command.quick.pick.placeholder": "请选择快捷指令",
2422
+ "onboarding.import.title": "从 {0} 导入中",
2423
+ "onboarding.importResult.title": "{0} 配置导入完成:",
2424
+ "onboarding.importResult.settings.failed": "设置、快捷键等导入失败",
2425
+ "onboarding.importResult.settings.succeed": "设置、快捷键等导入成功",
2426
+ "onboarding.importResult.extensions.failed": "插件导入异常",
2427
+ "onboarding.importResult.extensions.succeed": "插件导入成功",
2428
+ "onboarding.importResult.failedExtensions": "未能导入以下插件 {0}",
2429
+ "onboarding.importResult.unsupportedExtensions": "不支持导入以下插件 {0}",
2430
+ "review.codelens.title": "代码审查",
2431
+ "review.codelens.tooltip": "Comate 审查该函数",
2432
+ "review.error": "代码审查失败",
2433
+ "review.loading": "正在审查代码...",
2434
+ "kernel.zulu.error": "当前服务响应异常,建议稍后重试。",
2435
+ "promotion.zuluBenefitGranted": "已送您价值 30 元的 Zulu 权益,[点击查看](https://comate.baidu.com/zh/user)权益详情。"
2436
+ };
2437
+
2438
+ declare namespace _________vscode_l10n_bundle_l10n_zh_cn_json {
2439
+ export { bundle_l10n_zhCn as default };
2440
+ }
2441
+
2442
+ var bundle_l10n = {
2443
+ "version.update.title": "New version is available. Would you like to install?",
2444
+ "version.update.install": "Install Latest Version",
2445
+ "version.update.ignore": "Don't Show Again",
2446
+ "statusBar.not.support.text": "Unsupported language",
2447
+ "statusBar.enable.text": "Enable",
2448
+ "statusBar.title": "Baidu Comate",
2449
+ "statusBar.nosuggestions": "Baidu Comate: No Suggestion",
2450
+ "statusBar.ide.loading": "Suggestion Generating",
2451
+ "statusBar.ide.complete": "Suggestion Generated",
2452
+ "statusBar.ide.nosuggestions": "No Suggestion",
2453
+ "statusBar.ide.pause": "Pause completion (automatically resumes after 10:40)",
2454
+ "statusBar.ide.close": "Completion is closed",
2455
+ "completion.panel.accept.text": "Accept Solution",
2456
+ "completion.panel.accept.tooltip": "Replace code with this solution",
2457
+ "completion.panel.codelens.disabled.text": "Please enable CodeLens in settings to use the Baidu Comate Completion panel.",
2458
+ "completion.panel.title": "Completion panel",
2459
+ "completion.panel.empty.text": "No synthesized solutions found.",
2460
+ "completion.panel.hidden.text": "Duplicates hidden",
2461
+ "completion.panel.synthesizing.text": "Synthesizing solutions",
2462
+ "completion.decoration.basic": "💡 Tab to accept, Esc to hidden",
2463
+ "completion.decoration.widget.text": "💡 Tab to accept Comate inline suggestion, Enter to accept IDE suggestion",
2464
+ "completion.decoration.acceptLine.text": "💡 {0} + ↓ to accept line",
2465
+ "command.openLicenseConfigEvent.placeholder": "Fill in the existing License",
2466
+ "nl2code.empty.text": "Sorry, I can't answer this question. Feel free to ask me other programming-related questions.",
2467
+ "nl2code.no.selection.text": "Code selection required. Please try again after selecting code",
2468
+ "optimize.codelens.title": "Optimize",
2469
+ "optimize.codeActions.title": "Ask Comate to optimize",
2470
+ "optimize.codelens.tooltip": "Comate optimize this function",
2471
+ "optimize.error": "Failed to optimize",
2472
+ "optimize.code.prompt": "Please optimize the following code:",
2473
+ "optimize.no.selection.text": "Please select the code to be optimized",
2474
+ "optimize.function.prompt": "Please optimize the following function:",
2475
+ "chatTrial.codelens.title": "Chat",
2476
+ "chatTips.selectedCode.title": "Press {0} + I to trigger inline chat",
2477
+ "chatTips.blankRow.title": "{0} Open Chat, {1} Quick Edit",
2478
+ "decorations.generating.title": "Comate is generating...",
2479
+ "decorations.lineComent.trigger.title": "{0} + P to trigger code generation based on this comment",
2480
+ "comment.prompt": "Please add inline comments to the following function:",
2481
+ "comment.codelens.title": "Add Comments",
2482
+ "comment.codelens.tooltip": "Comate add inline comments to this function",
2483
+ "comment.inlinechat.title": "/Add Comments",
2484
+ "comment.generate.error": "Failed to add inline comments.",
2485
+ "docstring.prompt": "Please add docstring to the following function:",
2486
+ "docstring.codelens.title": "Add Docstring",
2487
+ "docstring.codelens.tooltip": "Comate add docstring to this function",
2488
+ "docstring.inlinechat.title": "/Add Docstring",
2489
+ "docstring.generate.error": "Failed to add docstring.",
2490
+ "split.prompt": "Please split the following function:",
2491
+ "split.codelens.title": "Split",
2492
+ "split.codelens.tooltip": "Comate split this function",
2493
+ "split.generate.error": "Failed to split function",
2494
+ "explain.codelens.title": "Explain",
2495
+ "explain.codeActions.title": "Ask Comate to explain",
2496
+ "explain.codelens.tooltip": "Comate explain this function",
2497
+ "explain.generate.error": "Failed to generate explanation.",
2498
+ "explain.no.selection.text": "Please select the code to be explained.",
2499
+ "codeReview.no.selection.text": "Only supports normative review of code files, code #diff, and code blocks. Please select the specified content.",
2500
+ "codeReview.query.text": "Please help me review this code and suggest improvements.",
2501
+ "codeReview.notIn.whiteList": "Only supports reviewing files ending with '.java', '.py', '.js', '.jsx', '.ts', '.tsx', '.vue', '.go', '.c', '.h', '.cpp', '.hpp', '.cc', '.cxx', '.hxx', '.hh'",
2502
+ "explain.prompt": "Please explain the following {0}:",
2503
+ "unitTest.codelens.title": "Generate UT",
2504
+ "unitTest.codelens.tooltip": "Comate generate unit test for this function",
2505
+ "unitTest.generate.error": "Failed to generate unit test.",
2506
+ "unitTest.accept.error": "Failed to accept unit test:",
2507
+ "unitTest.prompt": "Please generate unit test for the following {0}{1}:",
2508
+ "inlinechat.placeholder.generate": "Code Generation from Natural Language",
2509
+ "inlinechat.placeholder.selected": "Enter Natural Language to Modify Code or Select Recommended Items (Enter to Submit, Esc to Cancel)",
2510
+ "inlinechat.placeholder.unselected": "Enter Natural Language to Generate Code or Select Recommended Items (Enter to Submit, Esc to Cancel)",
2511
+ "inlinechat.title": "{0} Comate is generating code",
2512
+ "inlinechat.accept": "Accept {0}",
2513
+ "inlinechat.reject": "Reject {0}",
2514
+ "inlinechat.placeholder.error": "Please accept or reject the previous changes",
2515
+ "inlinechat.codelens.title": "Inline Chat",
2516
+ "inlinechat.codeActions.title": "Inline Chat",
2517
+ "inlineLog.prompt": "Please add log statements for the following function:",
2518
+ "inlineLog.codelens.title": "Add Logs",
2519
+ "inlineLog.codelens.tooltip": "Comate add log statements for this function",
2520
+ "inlineLog.generate.error": "Failed to add log statements",
2521
+ "diff.title": "View Changes",
2522
+ "diff.accept": "Accept {0}",
2523
+ "diff.reject": "Reject {0}",
2524
+ "diff.dualScreenDiff.open": "Open Diff {0}",
2525
+ "chat.webview.title": "Comate Chat",
2526
+ "chat.no.insertPosition.text": "Please specify the insertion position first.",
2527
+ "accept.path.error": "Please enter the correct file path.",
2528
+ "quickFix.action.text": "Ask comate to fix",
2529
+ "quickFix.prompt": "Fix these problems according to the diagnostic information{0}:",
2530
+ "quickFix.generate.error": "Failed to problems",
2531
+ "quickFix.prompt.suffix": ", just provide the fixed code without inline comment",
2532
+ "regexHover.tooltip": "Explain this regular expression",
2533
+ "regexHover.prompt": "Please explain this regular expression: ",
2534
+ "embeddings.maximum.files.message": "Indexing failed: The number of files in the workspace has exceeded the maximum limit of {0}.",
2535
+ "embeddings.progress.message": "Update Embeddings",
2536
+ "embeddings.progress.tooltip.message": "Comate is updating embeddings, which will enhance the quality of the generation",
2537
+ "openPlatform.title.text": "Comate Open Platform",
2538
+ "openPlatform.webview.title": "Comate Docs Management",
2539
+ "messageGenerate.generate.error": "Failed to generate: {0}",
2540
+ "messageGenerate.noDiff.error": "Failed to retrieve any content changes.",
2541
+ "messageGenerate.getDiff.error": "Failed to retrieve diff content: {0}",
2542
+ "messageGenerate.emptyContent.error": "Failed to generate commit message.",
2543
+ "autoWork.auth.modal.title": "Authorization Confirmation",
2544
+ "autoWork.indexing.message": "Indexing in progress. Please wait.",
2545
+ "autoWork.connection.interrupt.message": "Connection interrupted. Please try again.",
2546
+ "autoWork.indexing.reminder.text": "Comate is analyzing your codebase, progress {0}%. For more context-specific solutions, wait for indexing to complete before regenerating.",
2547
+ "autoWork.error": "AutoWork generation failed",
2548
+ "autoWork.task.thought": "Analyze the goal",
2549
+ "autoWork.task.answer": "Frame the answer",
2550
+ "autoWork.autoDebug": "Analyze and fix this with Comate",
2551
+ "autoWork.autoDebug.prompt": "Please analyze the terminal's error logs and provide a solution. Only resolve the first error",
2552
+ "autoWork.autoDebug.thought": "Analyze your terminal output",
2553
+ "autoWork.autoDebug.search": "Retrieve information related to the output",
2554
+ "autoWork.autoDebug.answer": "Generate solution",
2555
+ "comatePlus.permission.workspace.text": "read and write workspace files",
2556
+ "comatePlus.permission.disk.text": "read and write disk files",
2557
+ "comatePlus.permission.user.text": "get user information",
2558
+ "comatePlus.auth.message": "Grant permission for the plugin {0} to {1}?",
2559
+ "comatePlus.userInfo.error": "Failed to fetch user information. Please verify that the username in the configuration is correct.",
2560
+ "comatePlus.clear.permission": "All plugin permissions have been successfully revoked.",
2561
+ "comatePlus.split.error": "The selected function is already compact, no need for further splitting. You can select another function.",
2562
+ "comatePlus.noSelection": "Please select code in the editor",
2563
+ "comatePlus.not.function.text": "The selected code is not a function. Please make a new selection.",
2564
+ "common.generate.error": "Failed to generate: {0}",
2565
+ "common.unknown.error": "unknown error",
2566
+ "common.request.error": "Failed to request: {0}",
2567
+ "common.code": "code",
2568
+ "common.function": "function",
2569
+ "common.authorize": "Authorize",
2570
+ "common.using": "using",
2571
+ "common.without": "without",
2572
+ "common.comma": ", ",
2573
+ "common.semicolon": "; ",
2574
+ "common.framework": "framework",
2575
+ "common.related": "Related",
2576
+ "common.prompt": "Prompt",
2577
+ "common.thinking": "Thinking",
2578
+ "common.searchResult": "Search Result",
2579
+ "common.deny": "拒绝",
2580
+ "common.navigateToSetting": "Go to Setting",
2581
+ "common.customize.error": "Hybrid Cloud users, please go to Plugin Configuration - Service Configuration to check and debug.",
2582
+ "common.private.error": "Private Service users, please go to Plugin Configuration - Service Configuration to check and debug.",
2583
+ "log.level.placeholder": "Set log level",
2584
+ "do.not.show.again": "Don't show again",
2585
+ "login.message": "Hi there! I'm {0}, your AI coding assistant. Ready to log in and dive into the joy of coding together?",
2586
+ "login.action.text": "Login",
2587
+ "login.action.withLicense.text": "Login with license",
2588
+ "login.device.error": "Device fingerprint retrieval failed. Unable to proceed with login.",
2589
+ "login.loggingIn.text": "Baidu Comate is logging in...",
2590
+ "login.autoLogin": "Login successful using credential from {0}",
2591
+ "login.success": "Baidu Comate login successful!",
2592
+ "login.ide.success": "Baidu Comate AI IDE: login successful!",
2593
+ "login.failed": "Failed to login: {0}",
2594
+ "login.token.error": "Failed to get token",
2595
+ "login.key.error": "Failed to get key",
2596
+ "login.install.internal": "Install Internal Version",
2597
+ "login.internalUser.message": "Welcome! Switch to Baidu's internal version for an enhanced experience? (Uninstall the current extension and download the internal version).",
2598
+ "login.agreement.message": "Dear Baidu Comate User, to enhance our service, we will update the user service agreement on April 17, 2024. Please [click here](https://comate.baidu.com/en/userAgreement) for the updates. Thank you for your support!",
2599
+ "renew.action.text": "Renew Now",
2600
+ "command.quick.pick.placeholder": "Select command to execute",
2601
+ "onboarding.import.title": "Importing from {0}",
2602
+ "onboarding.importResult.title": "Imported from {0}: ",
2603
+ "onboarding.importResult.settings.failed": "error importing settings, keybindings, or snippets",
2604
+ "onboarding.importResult.settings.succeed": "settings, keybindings, and snippets are all set",
2605
+ "onboarding.importResult.extensions.failed": "error importing extensions",
2606
+ "onboarding.importResult.extensions.succeed": "extensions are all set",
2607
+ "onboarding.importResult.failedExtensions": "failed to import {0}",
2608
+ "onboarding.importResult.unsupportedExtensions": "ignored unsupported extensions {0}",
2609
+ "review.codelens.title": "Code Review",
2610
+ "review.codelens.tooltip": "Comate review this function",
2611
+ "review.error": "Failed to review code",
2612
+ "review.loading": "Reviewing code...",
2613
+ "kernel.zulu.error": "The current service response is abnormal. It is recommended to try again later.",
2614
+ "promotion.zuluBenefitGranted": "¥30 Zulu credit has been added to your account. [Click here](https://comate.baidu.com/en/user) to view details."
2615
+ };
2616
+
2617
+ declare namespace _________vscode_l10n_bundle_l10n_json {
2618
+ export { bundle_l10n as default };
2619
+ }
2620
+
2621
+ type EnKeyType = typeof _________vscode_l10n_bundle_l10n_json;
2622
+ type ZhKeyType = typeof _________vscode_l10n_bundle_l10n_zh_cn_json;
2623
+ type TranslationKey = keyof EnKeyType & keyof ZhKeyType;
2624
+ declare enum GlobalText {
2625
+ VERSION_UPDATE_TITLE = "version.update.title",
2626
+ VERSION_UPDATE_INSTALL = "version.update.install",
2627
+ VERSION_UPDATE_IGNORE = "version.update.ignore",
2628
+ COMMON_GENERATE_ERROR = "common.generate.error",
2629
+ COMMON_UNKNOWN_ERROR = "common.unknown.error",
2630
+ COMMON_REQUEST_ERROR = "common.request.error",
2631
+ COMMON_CODE = "common.code",
2632
+ COMMON_FUNCTION = "common.function",
2633
+ COMMON_USING = "common.using",
2634
+ COMMON_WITHOUT = "common.without",
2635
+ COMMON_COMMA = "common.comma",
2636
+ COMMON_FRAMEWORK = "common.framework",
2637
+ COMMON_RELATED = "common.related",
2638
+ COMMON_PROMPT = "common.prompt",
2639
+ COMMON_THINKING = "common.thinking",
2640
+ COMMON_SEARCH_RESULT = "common.searchResult",
2641
+ COMMON_AUTHORIZE = "common.authorize",
2642
+ COMMON_DENY = "common.deny",
2643
+ COMMON_NAVIGATE_TO_SETTING = "common.navigateToSetting",
2644
+ COMMON_CUSTOMIZE_ERROR = "common.customize.error",
2645
+ COMMON_PRIVATE_ERROR = "common.private.error",
2646
+ LOG_LEVEL_PLACEHOLDER = "log.level.placeholder",
2647
+ DO_NOT_SHOW_AGAIN = "do.not.show.again"
2648
+ }
2649
+ declare enum StatusBarText {
2650
+ NOT_SUPPORT = "statusBar.not.support.text",
2651
+ ENABLE = "statusBar.enable.text",
2652
+ NO_SUGGESTIONS = "statusBar.nosuggestions",
2653
+ TITLE = "statusBar.title"
2654
+ }
2655
+ declare enum CompletionText {
2656
+ PANEL_ACCEPT = "completion.panel.accept.text",
2657
+ PANEL_ACCEPT_TOOLTIP = "completion.panel.accept.tooltip",
2658
+ PANEL_CODELENS_DISABLED = "completion.panel.codelens.disabled.text",
2659
+ PANEL_TITLE = "completion.panel.title",
2660
+ PANEL_EMPTY = "completion.panel.empty.text",
2661
+ PANEL_HIDDEN = "completion.panel.hidden.text",
2662
+ PANEL_SYNTHESIZING = "completion.panel.synthesizing.text",
2663
+ DECORATION_BASIC = "completion.decoration.basic",
2664
+ DECORATION_WITH_WIDGET = "completion.decoration.widget.text",
2665
+ DECORATION_ACCEPT_LINE = "completion.decoration.acceptLine.text"
2666
+ }
2667
+ declare enum Nl2codeProviderText {
2668
+ EMPTY_TEXT = "nl2code.empty.text",
2669
+ NO_SELECTION = "nl2code.no.selection.text"
2670
+ }
2671
+ declare enum OptimizeProviderText {
2672
+ CODELENS_TITLE = "optimize.codelens.title",
2673
+ CODELENS_TOOLTIP = "optimize.codelens.tooltip",
2674
+ OPTIMIZE_ERROR = "optimize.error",
2675
+ OPTIMIZE_CODE_PROMPT = "optimize.code.prompt",
2676
+ NO_SELECTION = "optimize.no.selection.text",
2677
+ OPTIMIZE_FUNCTION_PROMPT = "optimize.function.prompt"
2678
+ }
2679
+ declare enum CodeSelectionActionsProviderText {
2680
+ EXPLAIN_SELECTED_CODE = "explain.codeActions.title",
2681
+ OPTIMIZE_SELECTED_CODE = "optimize.codeActions.title",
2682
+ INLINECHAT_SELECTED_CODE = "inlinechat.codeActions.title"
2683
+ }
2684
+ declare enum ChatTrialProviderText {
2685
+ CODELENS_TITLE = "chatTrial.codelens.title"
2686
+ }
2687
+ declare enum InlineChatTrialProviderText {
2688
+ CODELENS_TITLE = "inlinechat.codelens.title"
2689
+ }
2690
+ declare enum ChatTipsProviderText {
2691
+ CHAT_TIPS_TITLE = "chatTips.selectedCode.title",
2692
+ CHAT_TIPS_CODE_BLANK_ROW_TITLE = "chatTips.blankRow.title"
2693
+ }
2694
+ declare enum DecorationsText {
2695
+ GENERATING_TITLE = "decorations.generating.title",
2696
+ LINE_COMMENT_CODE_TRIGGER_TITLE = "decorations.lineComent.trigger.title"
2697
+ }
2698
+ declare enum CommentProviderText {
2699
+ PROMPT = "comment.prompt",
2700
+ CODELENS_TITLE = "comment.codelens.title",
2701
+ CODELENS_TOOLTIP = "comment.codelens.tooltip",
2702
+ INLINECHAT_TITLE = "comment.inlinechat.title",
2703
+ GENERATE_ERROR = "comment.generate.error"
2704
+ }
2705
+ declare enum DocstringProviderText {
2706
+ PROMPT = "docstring.prompt",
2707
+ CODELENS_TITLE = "docstring.codelens.title",
2708
+ CODELENS_TOOLTIP = "docstring.codelens.tooltip",
2709
+ INLINECHAT_TITLE = "docstring.inlinechat.title",
2710
+ GENERATE_ERROR = "docstring.generate.error"
2711
+ }
2712
+ declare enum SplitProviderText {
2713
+ PROMPT = "split.prompt",
2714
+ CODELENS_TITLE = "split.codelens.title",
2715
+ CODELENS_TOOLTIP = "split.codelens.tooltip",
2716
+ GENERATE_ERROR = "split.generate.error"
2717
+ }
2718
+ declare enum ExplainProviderText {
2719
+ CODELENS_TITLE = "explain.codelens.title",
2720
+ CODELENS_TOOLTIP = "explain.codelens.tooltip",
2721
+ GENERATE_ERROR = "explain.generate.error",
2722
+ NO_SELECTION = "explain.no.selection.text",
2723
+ PROMPT = "explain.prompt"
2724
+ }
2725
+ declare enum UnitTestProviderText {
2726
+ CODELENS_TITLE = "unitTest.codelens.title",
2727
+ CODELENS_TOOLTIP = "unitTest.codelens.tooltip",
2728
+ GENERATE_ERROR = "unitTest.generate.error",
2729
+ ACCEPT_ERROR = "unitTest.accept.error",
2730
+ PROMPT = "unitTest.prompt"
2731
+ }
2732
+ declare enum InlineLogProviderText {
2733
+ PROMPT = "inlineLog.prompt",
2734
+ CODELENS_TITLE = "inlineLog.codelens.title",
2735
+ CODELENS_TOOLTIP = "inlineLog.codelens.tooltip",
2736
+ GENERATE_ERROR = "inlineLog.generate.error"
2737
+ }
2738
+ declare enum DiffProviderText {
2739
+ TITLE = "diff.title",
2740
+ ACCEPT = "diff.accept",
2741
+ REJECT = "diff.reject",
2742
+ OPEN_DUAL_SCREEN_DIFF = "diff.dualScreenDiff.open"
2743
+ }
2744
+ declare enum ChatProviderText {
2745
+ WEBVIEW_TITLE = "chat.webview.title",
2746
+ NO_INSERT_POSITION = "chat.no.insertPosition.text"
2747
+ }
2748
+ declare enum AcceptProviderText {
2749
+ PATH_ERROR = "accept.path.error"
2750
+ }
2751
+ declare enum QuickFixText {
2752
+ ACTION = "quickFix.action.text",
2753
+ PROMPT = "quickFix.prompt",
2754
+ PROMPT_SUFFIX = "quickFix.prompt.suffix",
2755
+ GENERATE_ERROR = "quickFix.generate.error",
2756
+ FIX_MAX_LEN = "quickFix.fix.maxLen.text"
2757
+ }
2758
+ declare enum ExtensionText {
2759
+ LOGIN_MESSAGE = "login.message",
2760
+ LOGIN_ACTION_TEXT = "login.action.text",
2761
+ LOGIN_ACTION_WITH_LICENSE = "login.action.withLicense.text",
2762
+ LOGIN_DEVICE_ERROR = "login.device.error",
2763
+ LOGIN_LOGGING_IN = "login.loggingIn.text",
2764
+ LOGIN_SUCCESS = "login.success",
2765
+ LOGIN_IDE_SUCCESS = "login.ide.success",
2766
+ LOGIN_FAILED = "login.failed",
2767
+ LOGIN_TOKEN_ERROR = "login.token.error",
2768
+ LOGIN_KEY_ERROR = "login.key.error",
2769
+ LOGIN_INTERNAL_USER = "login.internalUser.message",
2770
+ LOGIN_INSTALL_INTERNAL = "login.install.internal",
2771
+ LOGIN_AGREEMENT = "login.agreement.message",
2772
+ RENEW_ACTION = "renew.action.text",
2773
+ QUICK_PICK_PLACEHOLDER = "command.quick.pick.placeholder"
2774
+ }
2775
+ declare enum RegexHoverText {
2776
+ TOOLTIP = "regexHover.tooltip",
2777
+ PROMPT = "regexHover.prompt"
2778
+ }
2779
+ declare enum EmbeddingsServiceText {
2780
+ MAXIMUM_FILES = "embeddings.maximum.files.message",
2781
+ PROGRESS = "embeddings.progress.message",
2782
+ PROGRESS_TOOLTIP = "embeddings.progress.tooltip.message"
2783
+ }
2784
+ declare enum OpenPlatformText {
2785
+ TITLE = "openPlatform.title.text",
2786
+ WEBVIEW_TITLE = "openPlatform.webview.title"
2787
+ }
2788
+ declare enum AutoWorkText {
2789
+ MODAL_AUTH_TITLE = "autoWork.auth.modal.title",
2790
+ INDEXING_MESSAGE = "autoWork.indexing.message",
2791
+ CONNECTION_INTERRUPT = "autoWork.connection.interrupt.message",
2792
+ INDEXING_REMINDER = "autoWork.indexing.reminder.text",
2793
+ ERROR = "autoWork.error",
2794
+ TASK_THOUGHT = "autoWork.task.thought",
2795
+ TASK_ANSWER = "autoWork.task.answer",
2796
+ AUTO_DEBUG = "autoWork.autoDebug",
2797
+ AUTO_DEBUG_PROMPT = "autoWork.autoDebug.prompt",
2798
+ AUTO_DEBUG_STAGE_THOUGHT = "autoWork.autoDebug.thought",
2799
+ AUTO_DEBUG_STAGE_SEARCH = "autoWork.autoDebug.search",
2800
+ AUTO_DEBUG_STAGE_ANSWER = "autoWork.autoDebug.answer"
2801
+ }
2802
+ declare enum ComatePlusText {
2803
+ PERMISSION_WORKSPACE = "comatePlus.permission.workspace.text",
2804
+ PERMISSION_DISK = "comatePlus.permission.disk.text",
2805
+ PERMISSION_USER = "comatePlus.permission.user.text",
2806
+ AUTH_MESSAGE = "comatePlus.auth.message",
2807
+ USER_INFO_ERROR = "comatePlus.userInfo.error",
2808
+ CLEAR_PERMISSION = "comatePlus.clear.permission",
2809
+ SPLIT_ERROR = "comatePlus.split.error",
2810
+ NO_SELECTION = "comatePlus.noSelection",
2811
+ NOT_A_FUNCTION = "comatePlus.not.function.text"
2812
+ }
2813
+ declare enum InlineChatText {
2814
+ INLINECHAT_GENERATE = "inlinechat.placeholder.generate",
2815
+ INLINECHAT_SELECTED = "inlinechat.placeholder.selected",
2816
+ INLINECHAT_UNSELECTED = "inlinechat.placeholder.unselected",
2817
+ INLINECHAT_TITLE = "inlinechat.title",
2818
+ INLINCHAT_ERROR = "inlinechat.placeholder.error"
2819
+ }
2820
+ declare enum MessageGenerateText {
2821
+ GENERATE_ERROR = "messageGenerate.generate.error",
2822
+ NO_DIFF_ERROR = "messageGenerate.noDiff.error",
2823
+ GET_DIFF_ERROR = "messageGenerate.getDiff.error",
2824
+ EMPTY_CONTENT_ERROR = "messageGenerate.emptyContent.error"
2825
+ }
2826
+ declare enum ZuluText {
2827
+ GENERATE_ERROR = "kernel.zulu.error"
2828
+ }
2829
+
2830
+ declare const LSP_ERROR_CODE: {
2831
+ ServerError: number;
2832
+ ParseError: number;
2833
+ InvalidRequest: number;
2834
+ MethodNotFound: number;
2835
+ InvalidParams: number;
2836
+ InternalError: number;
2837
+ /**
2838
+ * The client has canceled a request and a server has detected
2839
+ * the cancel.
2840
+ */
2841
+ RequestCancelled: number;
2842
+ DeviceFlowFailed: number;
2843
+ ContextNotInitialized: number;
2844
+ AbortedByServer: number;
2845
+ CancelledByServer: number;
2846
+ GetGitRepoIdError: number;
2847
+ };
2848
+
2849
+ export { type $features, ACTION_ASK_LLM, ACTION_ASK_LLM_STREAMING, ACTION_ASK_RAG, ACTION_BATCH_ACCEPT, ACTION_BRANCH_CHANGE, ACTION_CHAT_QUERY, ACTION_CHAT_SESSION_DELETE, ACTION_CHAT_SESSION_FIND, ACTION_CHAT_SESSION_LIST, ACTION_CHAT_SESSION_SAVE, ACTION_CHAT_TASK_PROGRESS, ACTION_CODE_SEARCH, ACTION_COMATE_ADD_AGENT_TASK, ACTION_COMATE_ADD_CACHE, ACTION_COMATE_GET_AGENT_TASKS, ACTION_COMATE_GET_CACHE, ACTION_COMATE_LSP_REMOTE_CONSOLE, ACTION_COMATE_LSP_WORKSPACE_FOLDERS, ACTION_COMATE_PLUS_AGENT_COMMAND, ACTION_COMATE_PLUS_AGENT_NOTIFICATION, ACTION_COMATE_PLUS_BATCH_ACCEPT, ACTION_COMATE_PLUS_CHAT_CANCEL, ACTION_COMATE_PLUS_CHAT_QUERY, ACTION_COMATE_PLUS_CODE_SEARCH, ACTION_COMATE_PLUS_CUSTOM_COMMAND, ACTION_COMATE_PLUS_DIAGNOSTIC_SCAN, ACTION_COMATE_PLUS_DRAW_CHAT_APPEND, ACTION_COMATE_PLUS_DRAW_CHAT_FAIL, ACTION_COMATE_PLUS_DRAW_CHAT_FINISH, ACTION_COMATE_PLUS_DRAW_CHAT_UPDATE, ACTION_COMATE_PLUS_INITIALIZED, ACTION_COMATE_PLUS_QUERY_SELECTOR, ACTION_COMATE_PLUS_RECREATE_INDEX, ACTION_COMATE_PLUS_REQUEST_PERMISSION, ACTION_COMATE_PLUS_SA_SCAN_DIAGNOSTIC, ACTION_COMATE_PLUS_SA_SCAN_INIT, ACTION_COMATE_PLUS_SECTION_CHAT_UPDATE, ACTION_COMATE_PLUS_WEBVIEW_INIT_DATA, ACTION_COMATE_SET_FOREGROUND_TASK, ACTION_COMATE_SMART_APPLY, ACTION_COMATE_UPDATE_AGENT_TASK_MESSAGES, ACTION_COMPOSER, ACTION_CUSTOM_COMMAND, ACTION_DEBUG_TASK_PROCESS, ACTION_DIAGNOSTIC_SCAN, ACTION_DIAGNOSTIC_SCAN_TASK_COUNT, ACTION_DIAGNOSTIC_SCAN_TASK_PROGRESS, ACTION_ENGINE_PROCESS_START_SUCCESS, ACTION_ENGINE_SERVICE_INITIALIZED, ACTION_GENERATE_MESSAGE, ACTION_GENERATE_MESSAGE_REPORT, ACTION_GET_PLUGIN_CONFIG, ACTION_INFORMATION_QUERY, ACTION_ISCAN_JOB_BUILD_ID, ACTION_ISCAN_RESULT, ACTION_LOG, ACTION_MOCK_VIRTUAL_EDITOR_EVENT, ACTION_PLUS_MODULE_LIST_FETCH, ACTION_PLUS_MODULE_LIST_RESULT, ACTION_PROMPTTEMPLATE_CREATE, ACTION_PROMPTTEMPLATE_DELETE, ACTION_PROMPTTEMPLATE_LIST, ACTION_PROMPTTEMPLATE_UPDATE, ACTION_QUERY_SELECTOR, ACTION_RELEASE_SCAN_TASK, ACTION_REQUEST_PERMISSION, ACTION_SA_SCAN_DIAGNOSTIC, ACTION_SA_SCAN_DIAGNOSTIC_RESULT, ACTION_SCAN_CACHE_COUNT, ACTION_SCAN_NOTIFICATION, ACTION_SCAN_QUERY, ACTION_SCAN_TASK, ACTION_SCAN_TASK_PROGRESS, ACTION_SECUBOT, ACTION_SECUBOT_TASK_PROGRESS, ACTION_SESSION_FINISH, ACTION_SESSION_START, ACTION_START_BACKGROUND_SERVICE, ACTION_START_ISCAN, ACTION_START_ISCAN_AND_GET_SEC_RESULT, ACTION_START_ISCAN_BY_SAVE, ACTION_UPDATE_ENGINE_CONFIG, ACTION_USER_DETAIL, ACTION_USER_DETAIL_ERROR, ACTION_V8_SNAP_SHOT, ACTION_WILL_SCAN, AGENT_DEBUG_CUSTOM_ACTION, type Accept, type AcceptMethod, AcceptProviderText, type AcceptWithDependentFiles, type ActionConfig, type ActionConfigs, type ActionSet, type ActionType, type Actions, type ActivationContext, type AssistantMessage as AgentAssistantMessage, type AgentComposerTask, type AgentConversationInfo, AgentConversationStatus, AgentConversationType, AgentConversationTypeNames, type Message as AgentMessage, AgentMessageStatus, type AgentPayload, type AgentReasonElement, type AgentTextElement, type AgentToolCallElement, type AgentToolCallType, type UserMessage as AgentUserMessage, type AlertTag, AutoWorkText, type BatchAcceptPayload, type BatchAcceptPluginPayload, type BlockItem, type ButtonGroup, CanceledError, type CapabilityDescription, type Card, Channel, type ChannelImplement, type ChannelImplementMaybe, ChatProviderText, type ChatQueryParsed, type ChatQueryPayload, type ChatSession, type ChatSessionDetail, ChatTipsProviderText, ChatTrialProviderText, type ChunkContent, type ChunkSelection, type CodeChunk, type CodeChunkType, type CodeSearchPayload, type CodeSearchPluginPayload, CodeSelectionActionsProviderText, type CollapsePanel, ComatePlusText, type CommandButton, CommentProviderText, CompletionText, type ConfigSchemaObject, type CopyAcceptMethod, type CopyFile, type CustomCommandInvokePayload, type CustomCommandPayload, DEFAULT_RULE_CONFIG_FOLDER, DEFAULT_WORKSPACE_CONFIG_FOLDER, DEFAULT_WORKSPACE_RULE_FILE, type DebugAgentCodeContextItem, type DebugAgentPayload, type DebugAgentPluginPayload, type DebugAgentResponse, DecorationsText, type Deferred, type DiagnosticCacheValue, type DiagnosticInfo, type DiagnosticScanChangedFiles, type DiagnosticScanCountPayload, type DiagnosticScanInvokePayload, type DiagnosticScanPayload, type DiagnosticScanTaskProgressChunk, type DiagnosticScanTaskProgressPayload, type DiagnosticScanTypes, DiffProviderText, DocstringProviderText, type DocumentPosition, type DrawChunk, type DrawElement, type DynamicActionItems, type DynamicCodeChunks, type DynamicCodeGenSteps, type DynamicNotification, type DynamicRelativeFiles, type DynamicReminder, type DynamicSection, ENVIRONMENT, EmbeddingsServiceText, type Execution, ExplainProviderText, ExtensionText, type FailChunk, type FileLink, type Flex, type FunctionCall, type FunctionDefinition, FunctionModel, type FunctionParameterDefinition, type GenerateMessageResponse, type GetPluginConfigPayload, GlobalText, INTERNAL_API_HOST, INTERNAL_TEST_API_HOST, type IScanBuildResult, type IScanInvokePayload, type IScanJobBuildPayload, type IScanResult, type IScanResultPayload, type IdeSideConfigPayload, type IdeSideConfigResponse, type IdeSideInformationPayload, type IdeSideInformationResponse, type IdeSideLlmPayload, type IdeSideLlmResponse, type IdeSideLlmStreamingResponse, type IdeSidePermissionPayload, type IdeSidePermissionResponse, type Information, type InformationPayload, InformationQueryType, InlineChatText, InlineChatTrialProviderText, InlineLogProviderText, type KnowledgeChunk, type KnowledgeOptions, type KnowledgeQueryWorkspace, type KnowledgeSet, type KnowledgeSetBase, LSP_ERROR_CODE, LanguageDetector, type LicenseFullDetail, type LlmPayload, type LlmPayloadTypes, type LlmResponseTypes, LlmType, type Loading, type LogLevel, type LogPayload, LogUploaderProvider, type MCPAudioContent, type MCPImageContent, type MCPResourceContent, type MCPServerConfigForWebview, type MCPServerForWebview, type MCPTextContent, MCP_SETTINGS_FILE_PATH, type Markdown, MessageGenerateText, type Model, type ModelOptions, Nl2codeProviderText, type NotificationMessage, OpenPlatformText, OptimizeProviderText, PLATFORM, PROMPTTEMPLATE_ROOT_PATH, PatchFileDelimiterError, PermissionType, type PluginCapabilityType, type PluginConfig, type PluginConfigSection, type PluginConfigSet, type PluginDescription, type PluginMeta, type PlusConfigPayload, type PlusModuleListResultPayload, type ProviderCapabilityInfo, type QuerySelectorPayload, QuickFixText, type RAGPayload, RULE_PANEL_ACTION_EVENT, type Range$1 as Range, RegexHoverText, type ReleaseScanTaskPayload, type RepairData, type ReplaceContentAcceptMethod, type ReplaceSelectionAcceptMethod, type ReportWillScanPayload, type RequestPermissionPayload, type RollbackMessageFileInfo, type RuleItem, type RuleMetadata, type RulePanelAction, type RulePanelActionParamsMap, SAAS_API_HOST, SAAS_TEST_API_HOST, type SADiagnosticScanInvokePayload, type SADiagnosticScanResultPayload, type SAScanDiagnosticResult, SECUBOT_DEFAULT_QUERY, SSEProcessor, SUFFIX_LANG_MAP, SUPPORTED_SUFFIX_CONFIG, type ScanHandleGoal, type ScanQueryPayload, type ScanTaskPayload, SearchReplacePatchError, type SectionChunk, type SecubotAgentParsed, type SecubotFileFlaw, type SecubotFixData, type SecubotFlaw, type SecubotFlawDetail, type SecubotLink, type SecubotQueryPayload, Session, type SessionAssociation, type SessionInit, type SessionOptions, type SimpleCodeBlock, SplitProviderText, type StartBackgroundServicePayload, StatusBarText, type Suggestion, type SystemInfoParsed, type TaskProgressChunk, type TaskProgressPayload, TaskStatus, TextModel, type ToTerminalAcceptMethod, type ToolCallMessageDisplayParams, type ToolCallMessageDisplayResult, type TranslationKey, UPDATE_RULE_PANEL_EVENT, UnitTestProviderText, type UserDetail, type UserLogLevel, type VirtualDocument, VirtualDocumentAction, type VirtualEditMethod, VirtualEditor, type VirtualEditorMethodCall, type VisibilitySelector, VisibilitySelectorMatcher, WEBVIEW_CONSUMER, type WillScanPayload, WorkflowStatus, ZuluText, allowedNativeElement, applyDiff, applySearchReplaceChunk, axiosInstance, canHandleChatQuery, canHandleQuerySelector, canShowToUser, createAxiosCancelTokenSource, createAxiosInstance, createDeferred, emptyDir, ensureDirectoryExist, extractChunkContent, extractMentionFilesFromRuleConfig, findCodeChunkStartLineIndex, fixUdiffLineMarker, formatPrompt, getApiHost, getCurrentUserKnowledgeSet, getCurrentUserPluginConfigSet, getKnowledgeQueryResult, getOsAppDataPath, getPromptTemplatePath, getPromptTemplateRootPath, getPromptTemplateUuidFromPath, getUserLicenseType, isCapabilityMatch, isInteractiveContent, isNativeElement, isSectionChunk, isWrappedChunk, knowledgeServiceHealthy, localPluginConfig, mergePluginConfig, parseShellCommandName, patchEnvPath, pluginConfigDetail, readFileOrNull, readJson, readPluginDescription, remove, replacePathTextInMarkdown, setApiHost, setLanguage, setPlatform, setPlatformAndEnvironment, writeJSON };