@vscode/chat-lib 0.0.4 → 0.0.5-1

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 (295) hide show
  1. package/dist/src/_internal/extension/byok/node/openAIEndpoint.d.ts +9 -0
  2. package/dist/src/_internal/extension/byok/node/openAIEndpoint.d.ts.map +1 -1
  3. package/dist/src/_internal/extension/byok/node/openAIEndpoint.js +136 -1
  4. package/dist/src/_internal/extension/byok/node/openAIEndpoint.js.map +1 -1
  5. package/dist/src/_internal/extension/common/constants.d.ts +0 -1
  6. package/dist/src/_internal/extension/common/constants.d.ts.map +1 -1
  7. package/dist/src/_internal/extension/common/constants.js +0 -1
  8. package/dist/src/_internal/extension/common/constants.js.map +1 -1
  9. package/dist/src/_internal/extension/inlineEdits/node/nesConfigs.d.ts +0 -4
  10. package/dist/src/_internal/extension/inlineEdits/node/nesConfigs.d.ts.map +1 -1
  11. package/dist/src/_internal/extension/inlineEdits/node/nextEditCache.d.ts +4 -2
  12. package/dist/src/_internal/extension/inlineEdits/node/nextEditCache.d.ts.map +1 -1
  13. package/dist/src/_internal/extension/inlineEdits/node/nextEditCache.js +15 -8
  14. package/dist/src/_internal/extension/inlineEdits/node/nextEditCache.js.map +1 -1
  15. package/dist/src/_internal/extension/inlineEdits/node/nextEditProvider.d.ts +0 -1
  16. package/dist/src/_internal/extension/inlineEdits/node/nextEditProvider.d.ts.map +1 -1
  17. package/dist/src/_internal/extension/inlineEdits/node/nextEditProvider.js +9 -60
  18. package/dist/src/_internal/extension/inlineEdits/node/nextEditProvider.js.map +1 -1
  19. package/dist/src/_internal/extension/inlineEdits/node/nextEditProviderTelemetry.d.ts.map +1 -1
  20. package/dist/src/_internal/extension/inlineEdits/node/nextEditProviderTelemetry.js +7 -3
  21. package/dist/src/_internal/extension/inlineEdits/node/nextEditProviderTelemetry.js.map +1 -1
  22. package/dist/src/_internal/extension/prompt/node/chatMLFetcher.d.ts.map +1 -1
  23. package/dist/src/_internal/extension/prompt/node/chatMLFetcher.js +46 -5
  24. package/dist/src/_internal/extension/prompt/node/chatMLFetcher.js.map +1 -1
  25. package/dist/src/_internal/extension/xtab/common/promptCrafting.d.ts +15 -35
  26. package/dist/src/_internal/extension/xtab/common/promptCrafting.d.ts.map +1 -1
  27. package/dist/src/_internal/extension/xtab/common/promptCrafting.js +47 -147
  28. package/dist/src/_internal/extension/xtab/common/promptCrafting.js.map +1 -1
  29. package/dist/src/_internal/extension/xtab/common/systemMessages.d.ts +6 -0
  30. package/dist/src/_internal/extension/xtab/common/systemMessages.d.ts.map +1 -0
  31. package/dist/src/_internal/extension/xtab/common/systemMessages.js +104 -0
  32. package/dist/src/_internal/extension/xtab/common/systemMessages.js.map +1 -0
  33. package/dist/src/_internal/extension/xtab/common/tags.d.ts +15 -0
  34. package/dist/src/_internal/extension/xtab/common/tags.d.ts.map +1 -0
  35. package/dist/src/_internal/extension/xtab/common/tags.js +24 -0
  36. package/dist/src/_internal/extension/xtab/common/tags.js.map +1 -0
  37. package/dist/src/_internal/extension/xtab/common/xtabCurrentDocument.d.ts +16 -0
  38. package/dist/src/_internal/extension/xtab/common/xtabCurrentDocument.d.ts.map +1 -0
  39. package/dist/src/_internal/extension/xtab/common/xtabCurrentDocument.js +19 -0
  40. package/dist/src/_internal/extension/xtab/common/xtabCurrentDocument.js.map +1 -0
  41. package/dist/src/_internal/extension/xtab/node/xtabProvider.d.ts +22 -4
  42. package/dist/src/_internal/extension/xtab/node/xtabProvider.d.ts.map +1 -1
  43. package/dist/src/_internal/extension/xtab/node/xtabProvider.js +370 -118
  44. package/dist/src/_internal/extension/xtab/node/xtabProvider.js.map +1 -1
  45. package/dist/src/_internal/platform/authentication/common/copilotToken.d.ts +1 -0
  46. package/dist/src/_internal/platform/authentication/common/copilotToken.d.ts.map +1 -1
  47. package/dist/src/_internal/platform/authentication/common/copilotToken.js +3 -0
  48. package/dist/src/_internal/platform/authentication/common/copilotToken.js.map +1 -1
  49. package/dist/src/_internal/platform/authentication/node/copilotTokenManager.d.ts +13 -1
  50. package/dist/src/_internal/platform/authentication/node/copilotTokenManager.d.ts.map +1 -1
  51. package/dist/src/_internal/platform/authentication/node/copilotTokenManager.js +39 -9
  52. package/dist/src/_internal/platform/authentication/node/copilotTokenManager.js.map +1 -1
  53. package/dist/src/_internal/platform/chat/common/chatMLFetcher.d.ts +0 -1
  54. package/dist/src/_internal/platform/chat/common/chatMLFetcher.d.ts.map +1 -1
  55. package/dist/src/_internal/platform/chat/common/chatMLFetcher.js +1 -1
  56. package/dist/src/_internal/platform/chat/common/chatMLFetcher.js.map +1 -1
  57. package/dist/src/_internal/platform/chat/common/commonTypes.d.ts.map +1 -1
  58. package/dist/src/_internal/platform/chat/common/commonTypes.js +3 -1
  59. package/dist/src/_internal/platform/chat/common/commonTypes.js.map +1 -1
  60. package/dist/src/_internal/platform/configuration/common/configurationService.d.ts +23 -11
  61. package/dist/src/_internal/platform/configuration/common/configurationService.d.ts.map +1 -1
  62. package/dist/src/_internal/platform/configuration/common/configurationService.js +25 -15
  63. package/dist/src/_internal/platform/configuration/common/configurationService.js.map +1 -1
  64. package/dist/src/_internal/platform/configuration/common/validator.d.ts +6 -0
  65. package/dist/src/_internal/platform/configuration/common/validator.d.ts.map +1 -1
  66. package/dist/src/_internal/platform/configuration/common/validator.js +41 -4
  67. package/dist/src/_internal/platform/configuration/common/validator.js.map +1 -1
  68. package/dist/src/_internal/platform/endpoint/common/chatModelCapabilities.d.ts.map +1 -1
  69. package/dist/src/_internal/platform/endpoint/common/chatModelCapabilities.js +10 -5
  70. package/dist/src/_internal/platform/endpoint/common/chatModelCapabilities.js.map +1 -1
  71. package/dist/src/_internal/platform/endpoint/common/endpointProvider.d.ts +2 -1
  72. package/dist/src/_internal/platform/endpoint/common/endpointProvider.d.ts.map +1 -1
  73. package/dist/src/_internal/platform/endpoint/common/endpointProvider.js.map +1 -1
  74. package/dist/src/_internal/platform/endpoint/node/chatEndpoint.d.ts.map +1 -1
  75. package/dist/src/_internal/platform/endpoint/node/chatEndpoint.js +2 -1
  76. package/dist/src/_internal/platform/endpoint/node/chatEndpoint.js.map +1 -1
  77. package/dist/src/_internal/platform/endpoint/node/responsesApi.d.ts +6 -0
  78. package/dist/src/_internal/platform/endpoint/node/responsesApi.d.ts.map +1 -1
  79. package/dist/src/_internal/platform/endpoint/node/responsesApi.js +161 -3
  80. package/dist/src/_internal/platform/endpoint/node/responsesApi.js.map +1 -1
  81. package/dist/src/_internal/platform/env/common/envService.d.ts +2 -0
  82. package/dist/src/_internal/platform/env/common/envService.d.ts.map +1 -1
  83. package/dist/src/_internal/platform/env/common/envService.js.map +1 -1
  84. package/dist/src/_internal/platform/env/common/nullEnvService.d.ts +1 -0
  85. package/dist/src/_internal/platform/env/common/nullEnvService.d.ts.map +1 -1
  86. package/dist/src/_internal/platform/env/common/nullEnvService.js +3 -0
  87. package/dist/src/_internal/platform/env/common/nullEnvService.js.map +1 -1
  88. package/dist/src/_internal/platform/github/common/githubAPI.d.ts +70 -0
  89. package/dist/src/_internal/platform/github/common/githubAPI.d.ts.map +1 -1
  90. package/dist/src/_internal/platform/github/common/githubAPI.js +182 -3
  91. package/dist/src/_internal/platform/github/common/githubAPI.js.map +1 -1
  92. package/dist/src/_internal/platform/github/common/githubService.d.ts +186 -1
  93. package/dist/src/_internal/platform/github/common/githubService.d.ts.map +1 -1
  94. package/dist/src/_internal/platform/github/common/githubService.js +44 -1
  95. package/dist/src/_internal/platform/github/common/githubService.js.map +1 -1
  96. package/dist/src/_internal/platform/inlineEdits/common/dataTypes/edit.js +1 -1
  97. package/dist/src/_internal/platform/inlineEdits/common/dataTypes/edit.js.map +1 -1
  98. package/dist/src/_internal/platform/inlineEdits/common/dataTypes/rootedLineEdit.js +1 -1
  99. package/dist/src/_internal/platform/inlineEdits/common/dataTypes/rootedLineEdit.js.map +1 -1
  100. package/dist/src/_internal/platform/inlineEdits/common/dataTypes/xtabPromptOptions.d.ts +11 -0
  101. package/dist/src/_internal/platform/inlineEdits/common/dataTypes/xtabPromptOptions.d.ts.map +1 -1
  102. package/dist/src/_internal/platform/inlineEdits/common/dataTypes/xtabPromptOptions.js +8 -1
  103. package/dist/src/_internal/platform/inlineEdits/common/dataTypes/xtabPromptOptions.js.map +1 -1
  104. package/dist/src/_internal/platform/inlineEdits/common/inlineEditLogContext.js +2 -2
  105. package/dist/src/_internal/platform/inlineEdits/common/inlineEditLogContext.js.map +1 -1
  106. package/dist/src/_internal/platform/inlineEdits/common/statelessNextEditProvider.d.ts +12 -2
  107. package/dist/src/_internal/platform/inlineEdits/common/statelessNextEditProvider.d.ts.map +1 -1
  108. package/dist/src/_internal/platform/inlineEdits/common/statelessNextEditProvider.js +13 -0
  109. package/dist/src/_internal/platform/inlineEdits/common/statelessNextEditProvider.js.map +1 -1
  110. package/dist/src/_internal/platform/networking/common/fetch.d.ts +2 -1
  111. package/dist/src/_internal/platform/networking/common/fetch.d.ts.map +1 -1
  112. package/dist/src/_internal/platform/networking/common/fetch.js +1 -0
  113. package/dist/src/_internal/platform/networking/common/fetch.js.map +1 -1
  114. package/dist/src/_internal/platform/networking/common/fetcherService.d.ts +2 -0
  115. package/dist/src/_internal/platform/networking/common/fetcherService.d.ts.map +1 -1
  116. package/dist/src/_internal/platform/networking/common/fetcherService.js.map +1 -1
  117. package/dist/src/_internal/platform/networking/common/networking.d.ts +6 -2
  118. package/dist/src/_internal/platform/networking/common/networking.d.ts.map +1 -1
  119. package/dist/src/_internal/platform/networking/common/networking.js +4 -3
  120. package/dist/src/_internal/platform/networking/common/networking.js.map +1 -1
  121. package/dist/src/_internal/platform/networking/node/stream.d.ts.map +1 -1
  122. package/dist/src/_internal/platform/networking/node/stream.js +5 -3
  123. package/dist/src/_internal/platform/networking/node/stream.js.map +1 -1
  124. package/dist/src/_internal/platform/openai/node/fetch.d.ts +2 -1
  125. package/dist/src/_internal/platform/openai/node/fetch.d.ts.map +1 -1
  126. package/dist/src/_internal/platform/openai/node/fetch.js +20 -20
  127. package/dist/src/_internal/platform/openai/node/fetch.js.map +1 -1
  128. package/dist/src/_internal/util/common/cache.d.ts +1 -0
  129. package/dist/src/_internal/util/common/cache.d.ts.map +1 -1
  130. package/dist/src/_internal/util/common/cache.js +9 -0
  131. package/dist/src/_internal/util/common/cache.js.map +1 -1
  132. package/dist/src/_internal/util/common/test/shims/chatTypes.d.ts +10 -0
  133. package/dist/src/_internal/util/common/test/shims/chatTypes.d.ts.map +1 -1
  134. package/dist/src/_internal/util/common/test/shims/chatTypes.js +10 -1
  135. package/dist/src/_internal/util/common/test/shims/chatTypes.js.map +1 -1
  136. package/dist/src/_internal/util/common/test/shims/vscodeTypesShim.d.ts.map +1 -1
  137. package/dist/src/_internal/util/common/test/shims/vscodeTypesShim.js +1 -0
  138. package/dist/src/_internal/util/common/test/shims/vscodeTypesShim.js.map +1 -1
  139. package/dist/src/_internal/util/vs/base/common/async.d.ts +7 -3
  140. package/dist/src/_internal/util/vs/base/common/async.d.ts.map +1 -1
  141. package/dist/src/_internal/util/vs/base/common/async.js +16 -5
  142. package/dist/src/_internal/util/vs/base/common/async.js.map +1 -1
  143. package/dist/src/_internal/util/vs/base/common/cache.d.ts +11 -0
  144. package/dist/src/_internal/util/vs/base/common/cache.d.ts.map +1 -1
  145. package/dist/src/_internal/util/vs/base/common/cache.js +27 -1
  146. package/dist/src/_internal/util/vs/base/common/cache.js.map +1 -1
  147. package/dist/src/_internal/util/vs/base/common/cancellation.d.ts +21 -0
  148. package/dist/src/_internal/util/vs/base/common/cancellation.d.ts.map +1 -1
  149. package/dist/src/_internal/util/vs/base/common/cancellation.js +53 -1
  150. package/dist/src/_internal/util/vs/base/common/cancellation.js.map +1 -1
  151. package/dist/src/_internal/util/vs/base/common/codicons.d.ts +16 -1
  152. package/dist/src/_internal/util/vs/base/common/codicons.d.ts.map +1 -1
  153. package/dist/src/_internal/util/vs/base/common/codiconsLibrary.d.ts +16 -1
  154. package/dist/src/_internal/util/vs/base/common/codiconsLibrary.d.ts.map +1 -1
  155. package/dist/src/_internal/util/vs/base/common/codiconsLibrary.js +16 -1
  156. package/dist/src/_internal/util/vs/base/common/codiconsLibrary.js.map +1 -1
  157. package/dist/src/_internal/util/vs/base/common/errors.d.ts.map +1 -1
  158. package/dist/src/_internal/util/vs/base/common/errors.js +1 -0
  159. package/dist/src/_internal/util/vs/base/common/errors.js.map +1 -1
  160. package/dist/src/_internal/util/vs/base/common/extpath.js +4 -4
  161. package/dist/src/_internal/util/vs/base/common/extpath.js.map +1 -1
  162. package/dist/src/_internal/util/vs/base/common/glob.js +1 -1
  163. package/dist/src/_internal/util/vs/base/common/glob.js.map +1 -1
  164. package/dist/src/_internal/util/vs/base/common/hash.js.map +1 -1
  165. package/dist/src/_internal/util/vs/base/common/htmlContent.d.ts +2 -0
  166. package/dist/src/_internal/util/vs/base/common/htmlContent.d.ts.map +1 -1
  167. package/dist/src/_internal/util/vs/base/common/htmlContent.js +9 -5
  168. package/dist/src/_internal/util/vs/base/common/htmlContent.js.map +1 -1
  169. package/dist/src/_internal/util/vs/base/common/lifecycle.d.ts +17 -2
  170. package/dist/src/_internal/util/vs/base/common/lifecycle.d.ts.map +1 -1
  171. package/dist/src/_internal/util/vs/base/common/lifecycle.js +41 -8
  172. package/dist/src/_internal/util/vs/base/common/lifecycle.js.map +1 -1
  173. package/dist/src/_internal/util/vs/base/common/map.js.map +1 -1
  174. package/dist/src/_internal/util/vs/base/common/network.d.ts.map +1 -1
  175. package/dist/src/_internal/util/vs/base/common/network.js +1 -0
  176. package/dist/src/_internal/util/vs/base/common/network.js.map +1 -1
  177. package/dist/src/_internal/util/vs/base/common/numbers.d.ts +0 -45
  178. package/dist/src/_internal/util/vs/base/common/numbers.d.ts.map +1 -1
  179. package/dist/src/_internal/util/vs/base/common/numbers.js +0 -55
  180. package/dist/src/_internal/util/vs/base/common/numbers.js.map +1 -1
  181. package/dist/src/_internal/util/vs/base/common/objects.js.map +1 -1
  182. package/dist/src/_internal/util/vs/base/common/observableInternal/base.d.ts +4 -0
  183. package/dist/src/_internal/util/vs/base/common/observableInternal/base.d.ts.map +1 -1
  184. package/dist/src/_internal/util/vs/base/common/observableInternal/base.js.map +1 -1
  185. package/dist/src/_internal/util/vs/base/common/observableInternal/changeTracker.d.ts.map +1 -1
  186. package/dist/src/_internal/util/vs/base/common/observableInternal/changeTracker.js +4 -0
  187. package/dist/src/_internal/util/vs/base/common/observableInternal/changeTracker.js.map +1 -1
  188. package/dist/src/_internal/util/vs/base/common/observableInternal/debugLocation.d.ts.map +1 -1
  189. package/dist/src/_internal/util/vs/base/common/observableInternal/debugLocation.js +1 -0
  190. package/dist/src/_internal/util/vs/base/common/observableInternal/debugLocation.js.map +1 -1
  191. package/dist/src/_internal/util/vs/base/common/observableInternal/debugName.d.ts.map +1 -1
  192. package/dist/src/_internal/util/vs/base/common/observableInternal/debugName.js +1 -0
  193. package/dist/src/_internal/util/vs/base/common/observableInternal/debugName.js.map +1 -1
  194. package/dist/src/_internal/util/vs/base/common/observableInternal/index.js +3 -0
  195. package/dist/src/_internal/util/vs/base/common/observableInternal/index.js.map +1 -1
  196. package/dist/src/_internal/util/vs/base/common/observableInternal/logging/consoleObservableLogger.d.ts.map +1 -1
  197. package/dist/src/_internal/util/vs/base/common/observableInternal/logging/consoleObservableLogger.js +1 -0
  198. package/dist/src/_internal/util/vs/base/common/observableInternal/logging/consoleObservableLogger.js.map +1 -1
  199. package/dist/src/_internal/util/vs/base/common/observableInternal/logging/debugGetDependencyGraph.d.ts +5 -0
  200. package/dist/src/_internal/util/vs/base/common/observableInternal/logging/debugGetDependencyGraph.d.ts.map +1 -0
  201. package/dist/src/_internal/util/vs/base/common/observableInternal/logging/debugGetDependencyGraph.js +71 -0
  202. package/dist/src/_internal/util/vs/base/common/observableInternal/logging/debugGetDependencyGraph.js.map +1 -0
  203. package/dist/src/_internal/util/vs/base/common/observableInternal/logging/debugger/debuggerRpc.d.ts.map +1 -1
  204. package/dist/src/_internal/util/vs/base/common/observableInternal/logging/debugger/debuggerRpc.js +1 -0
  205. package/dist/src/_internal/util/vs/base/common/observableInternal/logging/debugger/debuggerRpc.js.map +1 -1
  206. package/dist/src/_internal/util/vs/base/common/observableInternal/logging/debugger/rpc.d.ts.map +1 -1
  207. package/dist/src/_internal/util/vs/base/common/observableInternal/logging/debugger/rpc.js +1 -0
  208. package/dist/src/_internal/util/vs/base/common/observableInternal/logging/debugger/rpc.js.map +1 -1
  209. package/dist/src/_internal/util/vs/base/common/observableInternal/observables/baseObservable.d.ts +4 -0
  210. package/dist/src/_internal/util/vs/base/common/observableInternal/observables/baseObservable.d.ts.map +1 -1
  211. package/dist/src/_internal/util/vs/base/common/observableInternal/observables/baseObservable.js +8 -0
  212. package/dist/src/_internal/util/vs/base/common/observableInternal/observables/baseObservable.js.map +1 -1
  213. package/dist/src/_internal/util/vs/base/common/observableInternal/observables/derived.d.ts.map +1 -1
  214. package/dist/src/_internal/util/vs/base/common/observableInternal/observables/derived.js +9 -1
  215. package/dist/src/_internal/util/vs/base/common/observableInternal/observables/derived.js.map +1 -1
  216. package/dist/src/_internal/util/vs/base/common/observableInternal/observables/derivedImpl.d.ts +1 -0
  217. package/dist/src/_internal/util/vs/base/common/observableInternal/observables/derivedImpl.d.ts.map +1 -1
  218. package/dist/src/_internal/util/vs/base/common/observableInternal/observables/derivedImpl.js +12 -0
  219. package/dist/src/_internal/util/vs/base/common/observableInternal/observables/derivedImpl.js.map +1 -1
  220. package/dist/src/_internal/util/vs/base/common/observableInternal/observables/observableFromEvent.d.ts +4 -0
  221. package/dist/src/_internal/util/vs/base/common/observableInternal/observables/observableFromEvent.d.ts.map +1 -1
  222. package/dist/src/_internal/util/vs/base/common/observableInternal/observables/observableFromEvent.js +4 -0
  223. package/dist/src/_internal/util/vs/base/common/observableInternal/observables/observableFromEvent.js.map +1 -1
  224. package/dist/src/_internal/util/vs/base/common/observableInternal/reactions/autorunImpl.d.ts +1 -0
  225. package/dist/src/_internal/util/vs/base/common/observableInternal/reactions/autorunImpl.d.ts.map +1 -1
  226. package/dist/src/_internal/util/vs/base/common/observableInternal/reactions/autorunImpl.js +10 -0
  227. package/dist/src/_internal/util/vs/base/common/observableInternal/reactions/autorunImpl.js.map +1 -1
  228. package/dist/src/_internal/util/vs/base/common/observableInternal/set.d.ts.map +1 -1
  229. package/dist/src/_internal/util/vs/base/common/observableInternal/set.js +1 -0
  230. package/dist/src/_internal/util/vs/base/common/observableInternal/set.js.map +1 -1
  231. package/dist/src/_internal/util/vs/base/common/observableInternal/utils/promise.d.ts +1 -0
  232. package/dist/src/_internal/util/vs/base/common/observableInternal/utils/promise.d.ts.map +1 -1
  233. package/dist/src/_internal/util/vs/base/common/observableInternal/utils/promise.js +3 -0
  234. package/dist/src/_internal/util/vs/base/common/observableInternal/utils/promise.js.map +1 -1
  235. package/dist/src/_internal/util/vs/base/common/observableInternal/utils/utilsCancellation.js +2 -0
  236. package/dist/src/_internal/util/vs/base/common/observableInternal/utils/utilsCancellation.js.map +1 -1
  237. package/dist/src/_internal/util/vs/base/common/platform.d.ts +1 -0
  238. package/dist/src/_internal/util/vs/base/common/platform.d.ts.map +1 -1
  239. package/dist/src/_internal/util/vs/base/common/platform.js +4 -0
  240. package/dist/src/_internal/util/vs/base/common/platform.js.map +1 -1
  241. package/dist/src/_internal/util/vs/base/common/process.js.map +1 -1
  242. package/dist/src/_internal/util/vs/base/common/stream.js.map +1 -1
  243. package/dist/src/_internal/util/vs/base/common/strings.d.ts +0 -1
  244. package/dist/src/_internal/util/vs/base/common/strings.d.ts.map +1 -1
  245. package/dist/src/_internal/util/vs/base/common/strings.js +0 -4
  246. package/dist/src/_internal/util/vs/base/common/strings.js.map +1 -1
  247. package/dist/src/_internal/util/vs/base/common/themables.d.ts +8 -0
  248. package/dist/src/_internal/util/vs/base/common/themables.d.ts.map +1 -1
  249. package/dist/src/_internal/util/vs/base/common/themables.js +14 -0
  250. package/dist/src/_internal/util/vs/base/common/themables.js.map +1 -1
  251. package/dist/src/_internal/util/vs/base/common/types.d.ts +4 -0
  252. package/dist/src/_internal/util/vs/base/common/types.d.ts.map +1 -1
  253. package/dist/src/_internal/util/vs/base/common/types.js +11 -1
  254. package/dist/src/_internal/util/vs/base/common/types.js.map +1 -1
  255. package/dist/src/_internal/util/vs/editor/common/core/edits/edit.d.ts.map +1 -1
  256. package/dist/src/_internal/util/vs/editor/common/core/edits/edit.js +1 -0
  257. package/dist/src/_internal/util/vs/editor/common/core/edits/edit.js.map +1 -1
  258. package/dist/src/_internal/util/vs/editor/common/core/edits/lineEdit.d.ts +1 -1
  259. package/dist/src/_internal/util/vs/editor/common/core/edits/lineEdit.d.ts.map +1 -1
  260. package/dist/src/_internal/util/vs/editor/common/core/edits/lineEdit.js +1 -1
  261. package/dist/src/_internal/util/vs/editor/common/core/edits/lineEdit.js.map +1 -1
  262. package/dist/src/_internal/util/vs/editor/common/core/edits/stringEdit.d.ts +1 -1
  263. package/dist/src/_internal/util/vs/editor/common/core/edits/stringEdit.d.ts.map +1 -1
  264. package/dist/src/_internal/util/vs/editor/common/core/edits/stringEdit.js +12 -3
  265. package/dist/src/_internal/util/vs/editor/common/core/edits/stringEdit.js.map +1 -1
  266. package/dist/src/_internal/util/vs/editor/common/core/position.d.ts +1 -1
  267. package/dist/src/_internal/util/vs/editor/common/core/position.d.ts.map +1 -1
  268. package/dist/src/_internal/util/vs/editor/common/core/position.js +1 -1
  269. package/dist/src/_internal/util/vs/editor/common/core/position.js.map +1 -1
  270. package/dist/src/_internal/util/vs/editor/common/core/range.d.ts +1 -1
  271. package/dist/src/_internal/util/vs/editor/common/core/range.d.ts.map +1 -1
  272. package/dist/src/_internal/util/vs/editor/common/core/range.js +1 -1
  273. package/dist/src/_internal/util/vs/editor/common/core/range.js.map +1 -1
  274. package/dist/src/_internal/util/vs/editor/common/core/ranges/lineRange.d.ts +3 -3
  275. package/dist/src/_internal/util/vs/editor/common/core/ranges/lineRange.d.ts.map +1 -1
  276. package/dist/src/_internal/util/vs/editor/common/core/ranges/lineRange.js.map +1 -1
  277. package/dist/src/_internal/util/vs/editor/common/core/text/abstractText.d.ts +3 -2
  278. package/dist/src/_internal/util/vs/editor/common/core/text/abstractText.d.ts.map +1 -1
  279. package/dist/src/_internal/util/vs/editor/common/core/text/abstractText.js +5 -1
  280. package/dist/src/_internal/util/vs/editor/common/core/text/abstractText.js.map +1 -1
  281. package/dist/src/_internal/util/vs/platform/instantiation/common/descriptors.d.ts +2 -2
  282. package/dist/src/_internal/util/vs/platform/instantiation/common/descriptors.d.ts.map +1 -1
  283. package/dist/src/_internal/util/vs/platform/instantiation/common/descriptors.js.map +1 -1
  284. package/dist/src/_internal/util/vs/platform/instantiation/common/instantiation.d.ts +8 -1
  285. package/dist/src/_internal/util/vs/platform/instantiation/common/instantiation.d.ts.map +1 -1
  286. package/dist/src/_internal/util/vs/platform/instantiation/common/instantiation.js.map +1 -1
  287. package/dist/src/_internal/util/vs/platform/instantiation/common/instantiationService.d.ts.map +1 -1
  288. package/dist/src/_internal/util/vs/platform/instantiation/common/instantiationService.js +1 -0
  289. package/dist/src/_internal/util/vs/platform/instantiation/common/instantiationService.js.map +1 -1
  290. package/dist/src/_internal/vscodeTypes.d.ts +1 -0
  291. package/dist/src/_internal/vscodeTypes.d.ts.map +1 -1
  292. package/dist/src/_internal/vscodeTypes.js +2 -1
  293. package/dist/src/_internal/vscodeTypes.js.map +1 -1
  294. package/dist/src/package.json +249 -116
  295. package/package.json +3 -3
@@ -6,39 +6,21 @@ import { IXtabHistoryEntry } from '../../../platform/inlineEdits/common/workspac
6
6
  import { Result } from '../../../util/common/result';
7
7
  import { OffsetRange } from '../../../util/vs/editor/common/core/ranges/offsetRange';
8
8
  import { StringText } from '../../../util/vs/editor/common/core/text/abstractText';
9
- export declare namespace PromptTags {
10
- const CURSOR = "<|cursor|>";
11
- const EDIT_WINDOW: {
12
- start: string;
13
- end: string;
14
- };
15
- const AREA_AROUND: {
16
- start: string;
17
- end: string;
18
- };
19
- const CURRENT_FILE: {
20
- start: string;
21
- end: string;
22
- };
23
- const EDIT_HISTORY: {
24
- start: string;
25
- end: string;
26
- };
27
- const RECENT_FILES: {
28
- start: string;
29
- end: string;
30
- };
31
- const RECENT_FILE: {
32
- start: string;
33
- end: string;
34
- };
9
+ import { CurrentDocument } from './xtabCurrentDocument';
10
+ export declare class PromptPieces {
11
+ readonly currentDocument: CurrentDocument;
12
+ readonly editWindowLinesRange: OffsetRange;
13
+ readonly areaAroundEditWindowLinesRange: OffsetRange;
14
+ readonly activeDoc: StatelessNextEditDocument;
15
+ readonly xtabHistory: readonly IXtabHistoryEntry[];
16
+ readonly currentFileContent: string;
17
+ readonly areaAroundCodeToEdit: string;
18
+ readonly langCtx: LanguageContextResponse | undefined;
19
+ readonly computeTokens: (s: string) => number;
20
+ readonly opts: PromptOptions;
21
+ constructor(currentDocument: CurrentDocument, editWindowLinesRange: OffsetRange, areaAroundEditWindowLinesRange: OffsetRange, activeDoc: StatelessNextEditDocument, xtabHistory: readonly IXtabHistoryEntry[], currentFileContent: string, areaAroundCodeToEdit: string, langCtx: LanguageContextResponse | undefined, computeTokens: (s: string) => number, opts: PromptOptions);
35
22
  }
36
- export declare const systemPromptTemplate: string;
37
- export declare const unifiedModelSystemPrompt = "Your role as an AI assistant is to help developers complete their code tasks by assisting in editing specific sections of code marked by the <|code_to_edit|> and <|/code_to_edit|> tags, while adhering to Microsoft's content policies and avoiding the creation of content that violates copyrights.\n\nYou have access to the following information to help you make informed suggestions:\n\n- recently_viewed_code_snippets: These are code snippets that the developer has recently looked at, which might provide context or examples relevant to the current task. They are listed from oldest to newest. It's possible these are entirely irrelevant to the developer's change.\n- current_file_content: The content of the file the developer is currently working on, providing the broader context of the code.\n- edit_diff_history: A record of changes made to the code, helping you understand the evolution of the code and the developer's intentions. These changes are listed from oldest to latest. It's possible a lot of old edit diff history is entirely irrelevant to the developer's change.\n- area_around_code_to_edit: The context showing the code surrounding the section to be edited.\n- cursor position marked as <|cursor|>: Indicates where the developer's cursor is currently located, which can be crucial for understanding what part of the code they are focusing on.\n\nYour task is to predict and complete the changes the developer would have made next in the <|code_to_edit|> section. The developer may have stopped in the middle of typing. Your goal is to keep the developer on the path that you think they're following. Some examples include further implementing a class, method, or variable, or improving the quality of the code. Make sure the developer doesn't get distracted and ensure your suggestion is relevant. Consider what changes need to be made next, if any. If you think changes should be made, ask yourself if this is truly what needs to happen. If you are confident about it, then proceed with the changes.\n\n# Steps\n\n1. **Review Context**: Analyze the context from the resources provided, such as recently viewed snippets, edit history, surrounding code, and cursor location.\n2. **Evaluate Current Code**: Determine if the current code within the tags requires any corrections or enhancements.\n3. **Suggest Edits**: If changes are required, ensure they align with the developer's patterns and improve code quality.\n4. **Maintain Consistency**: Ensure indentation and formatting follow the existing code style.\n\n# Output Format\n- Your response should start with the word <EDIT>, <INSERT>, or <NO_CHANGE>.\n- If your are making an edit, start with <EDIT>, then provide the rewritten code window, then </EDIT>.\n- If you are inserting new code, start with <INSERT> and then provide only the new code that will be inserted at the cursor position, then </INSERT>.\n- If no changes are necessary, reply only with <NO_CHANGE>.\n- Ensure that you do not output duplicate code that exists outside of these tags. The output should be the revised code that was between these tags and should not include the <|code_to_edit|> or <|/code_to_edit|> tags.\n\n# Notes\n\n- Apologize with \"Sorry, I can't assist with that.\" for requests that may breach Microsoft content guidelines.\n- Avoid undoing or reverting the developer's last change unless there are obvious typos or errors.";
38
- export declare const nes41Miniv3SystemPrompt = "Your role as an AI assistant is to help developers complete their code tasks by assisting in editing specific sections of code marked by the <|code_to_edit|> and <|/code_to_edit|> tags, while adhering to Microsoft's content policies and avoiding the creation of content that violates copyrights.\n\nYou have access to the following information to help you make informed suggestions:\n\n- recently_viewed_code_snippets: These are code snippets that the developer has recently looked at, which might provide context or examples relevant to the current task. They are listed from oldest to newest. It's possible these are entirely irrelevant to the developer's change.\n- current_file_content: The content of the file the developer is currently working on, providing the broader context of the code.\n- edit_diff_history: A record of changes made to the code, helping you understand the evolution of the code and the developer's intentions. These changes are listed from oldest to latest. It's possible a lot of old edit diff history is entirely irrelevant to the developer's change.\n- area_around_code_to_edit: The context showing the code surrounding the section to be edited.\n- cursor position marked as <|cursor|>: Indicates where the developer's cursor is currently located, which can be crucial for understanding what part of the code they are focusing on.\n\nYour task is to predict and complete the changes the developer would have made next in the <|code_to_edit|> section. The developer may have stopped in the middle of typing. Your goal is to keep the developer on the path that you think they're following. Some examples include further implementing a class, method, or variable, or improving the quality of the code. Make sure the developer doesn't get distracted and ensure your suggestion is relevant. Consider what changes need to be made next, if any. If you think changes should be made, ask yourself if this is truly what needs to happen. If you are confident about it, then proceed with the changes.\n\n# Steps\n\n1. **Review Context**: Analyze the context from the resources provided, such as recently viewed snippets, edit history, surrounding code, and cursor location.\n2. **Evaluate Current Code**: Determine if the current code within the tags requires any corrections or enhancements.\n3. **Suggest Edits**: If changes are required, ensure they align with the developer's patterns and improve code quality.\n4. **Maintain Consistency**: Ensure indentation and formatting follow the existing code style.\n\n# Output Format\n- Your response should start with the word <EDIT> or <NO_CHANGE>.\n- If your are making an edit, start with <EDIT>, then provide the rewritten code window, then </EDIT>.\n- If no changes are necessary, reply only with <NO_CHANGE>.\n- Ensure that you do not output duplicate code that exists outside of these tags. The output should be the revised code that was between these tags and should not include the <|code_to_edit|> or <|/code_to_edit|> tags.\n\n# Notes\n\n- Apologize with \"Sorry, I can't assist with that.\" for requests that may breach Microsoft content guidelines.\n- Avoid undoing or reverting the developer's last change unless there are obvious typos or errors.";
39
- export declare const simplifiedPrompt = "Predict next code edit based on the context given by the user.";
40
- export declare const xtab275SystemPrompt = "Predict the next code edit based on user context, following Microsoft content policies and avoiding copyright violations. If a request may breach guidelines, reply: \"Sorry, I can't assist with that.\"";
41
- export declare function getUserPrompt(activeDoc: StatelessNextEditDocument, xtabHistory: readonly IXtabHistoryEntry[], currentFileContent: string, areaAroundCodeToEdit: string, langCtx: LanguageContextResponse | undefined, computeTokens: (s: string) => number, opts: PromptOptions): string;
23
+ export declare function getUserPrompt(promptPieces: PromptPieces): string;
42
24
  export declare function toUniquePath(documentId: DocumentId, workspaceRootPath: string | undefined): string;
43
25
  /**
44
26
  * Build code snippets using paged clipping.
@@ -57,9 +39,7 @@ export declare function truncateCode(lines: string[], fromBeginning: boolean, ma
57
39
  export declare const N_LINES_ABOVE = 2;
58
40
  export declare const N_LINES_BELOW = 5;
59
41
  export declare const N_LINES_AS_CONTEXT = 15;
60
- /**
61
- * @remark exported for testing
62
- */
42
+ export declare function clipPreservingRange(docLines: string[], rangeToPreserve: OffsetRange, computeTokens: (s: string) => number, pageSize: number, opts: CurrentFileOptions): Result<OffsetRange, 'outOfBudget'>;
63
43
  export declare function createTaggedCurrentFileContentUsingPagedClipping(currentDocLines: string[], areaAroundCodeToEdit: string, areaAroundEditWindowLinesRange: OffsetRange, computeTokens: (s: string) => number, pageSize: number, opts: CurrentFileOptions): Result<{
64
44
  taggedCurrentFileContent: string;
65
45
  nLines: number;
@@ -1 +1 @@
1
- {"version":3,"file":"promptCrafting.d.ts","sourceRoot":"","sources":["../../../../../../src/_internal/extension/xtab/common/promptCrafting.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,2DAA2D,CAAC;AAEvF,OAAO,EAAE,uBAAuB,EAAE,MAAM,gEAAgE,CAAC;AACzG,OAAO,EAAE,kBAAkB,EAAyC,aAAa,EAAE,MAAM,kEAAkE,CAAC;AAC5J,OAAO,EAAE,yBAAyB,EAAE,MAAM,gEAAgE,CAAC;AAC3G,OAAO,EAAyB,iBAAiB,EAAE,MAAM,iFAAiF,CAAC;AAE3I,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAIrD,OAAO,EAAE,WAAW,EAAE,MAAM,wDAAwD,CAAC;AACrF,OAAO,EAAE,UAAU,EAAE,MAAM,uDAAuD,CAAC;AAEnF,yBAAiB,UAAU,CAAC;IACpB,MAAM,MAAM,eAAe,CAAC;IAE5B,MAAM,WAAW;;;KAGvB,CAAC;IAEK,MAAM,WAAW;;;KAGvB,CAAC;IAEK,MAAM,YAAY;;;KAGxB,CAAC;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FrC,wBAAgB,mBAAmB,CAClC,QAAQ,EAAE,MAAM,EAAE,EAClB,eAAe,EAAE,WAAW,EAC5B,aAAa,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,EACpC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,kBAAkB,GACtB,MAAM,CAAC,WAAW,EAAE,aAAa,CAAC,CAqBpC;AAED,wBAAgB,gDAAgD,CAC/D,eAAe,EAAE,MAAM,EAAE,EACzB,oBAAoB,EAAE,MAAM,EAC5B,8BAA8B,EAAE,WAAW,EAC3C,aAAa,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,EACpC,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,kBAAkB,GACtB,MAAM,CAAC;IAAE,wBAAwB,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,EAAE,aAAa,CAAC,CAuB7E"}
@@ -4,11 +4,12 @@
4
4
  * Licensed under the MIT License. See License.txt in the project root for license information.
5
5
  *--------------------------------------------------------------------------------------------*/
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.N_LINES_AS_CONTEXT = exports.N_LINES_BELOW = exports.N_LINES_ABOVE = exports.xtab275SystemPrompt = exports.simplifiedPrompt = exports.nes41Miniv3SystemPrompt = exports.unifiedModelSystemPrompt = exports.systemPromptTemplate = exports.PromptTags = void 0;
7
+ exports.N_LINES_AS_CONTEXT = exports.N_LINES_BELOW = exports.N_LINES_ABOVE = exports.PromptPieces = void 0;
8
8
  exports.getUserPrompt = getUserPrompt;
9
9
  exports.toUniquePath = toUniquePath;
10
10
  exports.buildCodeSnippetsUsingPagedClipping = buildCodeSnippetsUsingPagedClipping;
11
11
  exports.truncateCode = truncateCode;
12
+ exports.clipPreservingRange = clipPreservingRange;
12
13
  exports.createTaggedCurrentFileContentUsingPagedClipping = createTaggedCurrentFileContentUsingPagedClipping;
13
14
  const documentId_1 = require("../../../platform/inlineEdits/common/dataTypes/documentId");
14
15
  const edit_1 = require("../../../platform/inlineEdits/common/dataTypes/edit");
@@ -19,148 +20,42 @@ const arrays_1 = require("../../../util/vs/base/common/arrays");
19
20
  const errors_1 = require("../../../util/vs/base/common/errors");
20
21
  const network_1 = require("../../../util/vs/base/common/network");
21
22
  const offsetRange_1 = require("../../../util/vs/editor/common/core/ranges/offsetRange");
22
- var PromptTags;
23
- (function (PromptTags) {
24
- PromptTags.CURSOR = "<|cursor|>";
25
- PromptTags.EDIT_WINDOW = {
26
- start: "<|code_to_edit|>",
27
- end: "<|/code_to_edit|>"
28
- };
29
- PromptTags.AREA_AROUND = {
30
- start: "<|area_around_code_to_edit|>",
31
- end: "<|/area_around_code_to_edit|>"
32
- };
33
- PromptTags.CURRENT_FILE = {
34
- start: "<|current_file_content|>",
35
- end: "<|/current_file_content|>"
36
- };
37
- PromptTags.EDIT_HISTORY = {
38
- start: "<|edit_diff_history|>",
39
- end: "<|/edit_diff_history|>"
40
- };
41
- PromptTags.RECENT_FILES = {
42
- start: "<|recently_viewed_code_snippets|>",
43
- end: "<|/recently_viewed_code_snippets|>"
44
- };
45
- PromptTags.RECENT_FILE = {
46
- start: "<|recently_viewed_code_snippet|>",
47
- end: "<|/recently_viewed_code_snippet|>"
48
- };
49
- })(PromptTags || (exports.PromptTags = PromptTags = {}));
50
- exports.systemPromptTemplate = `Your role as an AI assistant is to help developers complete their code tasks by assisting in editing specific sections of code marked by the ${PromptTags.EDIT_WINDOW.start} and ${PromptTags.EDIT_WINDOW.end} tags, while adhering to Microsoft's content policies and avoiding the creation of content that violates copyrights.
51
-
52
- You have access to the following information to help you make informed suggestions:
53
-
54
- - recently_viewed_code_snippets: These are code snippets that the developer has recently looked at, which might provide context or examples relevant to the current task. They are listed from oldest to newest, with line numbers in the form #| to help you understand the edit diff history. It's possible these are entirely irrelevant to the developer's change.
55
- - current_file_content: The content of the file the developer is currently working on, providing the broader context of the code. Line numbers in the form #| are included to help you understand the edit diff history.
56
- - edit_diff_history: A record of changes made to the code, helping you understand the evolution of the code and the developer's intentions. These changes are listed from oldest to latest. It's possible a lot of old edit diff history is entirely irrelevant to the developer's change.
57
- - area_around_code_to_edit: The context showing the code surrounding the section to be edited.
58
- - cursor position marked as ${PromptTags.CURSOR}: Indicates where the developer's cursor is currently located, which can be crucial for understanding what part of the code they are focusing on.
59
-
60
- Your task is to predict and complete the changes the developer would have made next in the ${PromptTags.EDIT_WINDOW.start} section. The developer may have stopped in the middle of typing. Your goal is to keep the developer on the path that you think they're following. Some examples include further implementing a class, method, or variable, or improving the quality of the code. Make sure the developer doesn't get distracted and ensure your suggestion is relevant. Consider what changes need to be made next, if any. If you think changes should be made, ask yourself if this is truly what needs to happen. If you are confident about it, then proceed with the changes.
61
-
62
- # Steps
63
-
64
- 1. **Review Context**: Analyze the context from the resources provided, such as recently viewed snippets, edit history, surrounding code, and cursor location.
65
- 2. **Evaluate Current Code**: Determine if the current code within the tags requires any corrections or enhancements.
66
- 3. **Suggest Edits**: If changes are required, ensure they align with the developer's patterns and improve code quality.
67
- 4. **Maintain Consistency**: Ensure indentation and formatting follow the existing code style.
68
-
69
- # Output Format
70
-
71
- - Provide only the revised code within the tags. If no changes are necessary, simply return the original code from within the ${PromptTags.EDIT_WINDOW.start} and ${PromptTags.EDIT_WINDOW.end} tags.
72
- - There are line numbers in the form #| in the code displayed to you above, but these are just for your reference. Please do not include the numbers of the form #| in your response.
73
- - Ensure that you do not output duplicate code that exists outside of these tags. The output should be the revised code that was between these tags and should not include the ${PromptTags.EDIT_WINDOW.start} or ${PromptTags.EDIT_WINDOW.end} tags.
74
-
75
- \`\`\`
76
- // Your revised code goes here
77
- \`\`\`
78
-
79
- # Notes
80
-
81
- - Apologize with "Sorry, I can't assist with that." for requests that may breach Microsoft content guidelines.
82
- - Avoid undoing or reverting the developer's last change unless there are obvious typos or errors.
83
- - Don't include the line numbers of the form #| in your response.`;
84
- exports.unifiedModelSystemPrompt = `Your role as an AI assistant is to help developers complete their code tasks by assisting in editing specific sections of code marked by the <|code_to_edit|> and <|/code_to_edit|> tags, while adhering to Microsoft's content policies and avoiding the creation of content that violates copyrights.
85
-
86
- You have access to the following information to help you make informed suggestions:
87
-
88
- - recently_viewed_code_snippets: These are code snippets that the developer has recently looked at, which might provide context or examples relevant to the current task. They are listed from oldest to newest. It's possible these are entirely irrelevant to the developer's change.
89
- - current_file_content: The content of the file the developer is currently working on, providing the broader context of the code.
90
- - edit_diff_history: A record of changes made to the code, helping you understand the evolution of the code and the developer's intentions. These changes are listed from oldest to latest. It's possible a lot of old edit diff history is entirely irrelevant to the developer's change.
91
- - area_around_code_to_edit: The context showing the code surrounding the section to be edited.
92
- - cursor position marked as <|cursor|>: Indicates where the developer's cursor is currently located, which can be crucial for understanding what part of the code they are focusing on.
93
-
94
- Your task is to predict and complete the changes the developer would have made next in the <|code_to_edit|> section. The developer may have stopped in the middle of typing. Your goal is to keep the developer on the path that you think they're following. Some examples include further implementing a class, method, or variable, or improving the quality of the code. Make sure the developer doesn't get distracted and ensure your suggestion is relevant. Consider what changes need to be made next, if any. If you think changes should be made, ask yourself if this is truly what needs to happen. If you are confident about it, then proceed with the changes.
95
-
96
- # Steps
97
-
98
- 1. **Review Context**: Analyze the context from the resources provided, such as recently viewed snippets, edit history, surrounding code, and cursor location.
99
- 2. **Evaluate Current Code**: Determine if the current code within the tags requires any corrections or enhancements.
100
- 3. **Suggest Edits**: If changes are required, ensure they align with the developer's patterns and improve code quality.
101
- 4. **Maintain Consistency**: Ensure indentation and formatting follow the existing code style.
102
-
103
- # Output Format
104
- - Your response should start with the word <EDIT>, <INSERT>, or <NO_CHANGE>.
105
- - If your are making an edit, start with <EDIT>, then provide the rewritten code window, then </EDIT>.
106
- - If you are inserting new code, start with <INSERT> and then provide only the new code that will be inserted at the cursor position, then </INSERT>.
107
- - If no changes are necessary, reply only with <NO_CHANGE>.
108
- - Ensure that you do not output duplicate code that exists outside of these tags. The output should be the revised code that was between these tags and should not include the <|code_to_edit|> or <|/code_to_edit|> tags.
109
-
110
- # Notes
111
-
112
- - Apologize with "Sorry, I can't assist with that." for requests that may breach Microsoft content guidelines.
113
- - Avoid undoing or reverting the developer's last change unless there are obvious typos or errors.`;
114
- exports.nes41Miniv3SystemPrompt = `Your role as an AI assistant is to help developers complete their code tasks by assisting in editing specific sections of code marked by the <|code_to_edit|> and <|/code_to_edit|> tags, while adhering to Microsoft's content policies and avoiding the creation of content that violates copyrights.
115
-
116
- You have access to the following information to help you make informed suggestions:
117
-
118
- - recently_viewed_code_snippets: These are code snippets that the developer has recently looked at, which might provide context or examples relevant to the current task. They are listed from oldest to newest. It's possible these are entirely irrelevant to the developer's change.
119
- - current_file_content: The content of the file the developer is currently working on, providing the broader context of the code.
120
- - edit_diff_history: A record of changes made to the code, helping you understand the evolution of the code and the developer's intentions. These changes are listed from oldest to latest. It's possible a lot of old edit diff history is entirely irrelevant to the developer's change.
121
- - area_around_code_to_edit: The context showing the code surrounding the section to be edited.
122
- - cursor position marked as <|cursor|>: Indicates where the developer's cursor is currently located, which can be crucial for understanding what part of the code they are focusing on.
123
-
124
- Your task is to predict and complete the changes the developer would have made next in the <|code_to_edit|> section. The developer may have stopped in the middle of typing. Your goal is to keep the developer on the path that you think they're following. Some examples include further implementing a class, method, or variable, or improving the quality of the code. Make sure the developer doesn't get distracted and ensure your suggestion is relevant. Consider what changes need to be made next, if any. If you think changes should be made, ask yourself if this is truly what needs to happen. If you are confident about it, then proceed with the changes.
125
-
126
- # Steps
127
-
128
- 1. **Review Context**: Analyze the context from the resources provided, such as recently viewed snippets, edit history, surrounding code, and cursor location.
129
- 2. **Evaluate Current Code**: Determine if the current code within the tags requires any corrections or enhancements.
130
- 3. **Suggest Edits**: If changes are required, ensure they align with the developer's patterns and improve code quality.
131
- 4. **Maintain Consistency**: Ensure indentation and formatting follow the existing code style.
132
-
133
- # Output Format
134
- - Your response should start with the word <EDIT> or <NO_CHANGE>.
135
- - If your are making an edit, start with <EDIT>, then provide the rewritten code window, then </EDIT>.
136
- - If no changes are necessary, reply only with <NO_CHANGE>.
137
- - Ensure that you do not output duplicate code that exists outside of these tags. The output should be the revised code that was between these tags and should not include the <|code_to_edit|> or <|/code_to_edit|> tags.
138
-
139
- # Notes
140
-
141
- - Apologize with "Sorry, I can't assist with that." for requests that may breach Microsoft content guidelines.
142
- - Avoid undoing or reverting the developer's last change unless there are obvious typos or errors.`;
143
- exports.simplifiedPrompt = 'Predict next code edit based on the context given by the user.';
144
- exports.xtab275SystemPrompt = `Predict the next code edit based on user context, following Microsoft content policies and avoiding copyright violations. If a request may breach guidelines, reply: "Sorry, I can't assist with that."`;
145
- function getUserPrompt(activeDoc, xtabHistory, currentFileContent, areaAroundCodeToEdit, langCtx, computeTokens, opts) {
23
+ const tags_1 = require("./tags");
24
+ class PromptPieces {
25
+ constructor(currentDocument, editWindowLinesRange, areaAroundEditWindowLinesRange, activeDoc, xtabHistory, currentFileContent, areaAroundCodeToEdit, langCtx, computeTokens, opts) {
26
+ this.currentDocument = currentDocument;
27
+ this.editWindowLinesRange = editWindowLinesRange;
28
+ this.areaAroundEditWindowLinesRange = areaAroundEditWindowLinesRange;
29
+ this.activeDoc = activeDoc;
30
+ this.xtabHistory = xtabHistory;
31
+ this.currentFileContent = currentFileContent;
32
+ this.areaAroundCodeToEdit = areaAroundCodeToEdit;
33
+ this.langCtx = langCtx;
34
+ this.computeTokens = computeTokens;
35
+ this.opts = opts;
36
+ }
37
+ }
38
+ exports.PromptPieces = PromptPieces;
39
+ function getUserPrompt(promptPieces) {
40
+ const { activeDoc, xtabHistory, currentFileContent, areaAroundCodeToEdit, langCtx, computeTokens, opts } = promptPieces;
146
41
  const { codeSnippets: recentlyViewedCodeSnippets, documents: docsInPrompt } = getRecentCodeSnippets(activeDoc, xtabHistory, langCtx, computeTokens, opts);
147
42
  docsInPrompt.add(activeDoc.id); // Add active document to the set of documents in prompt
148
43
  const editDiffHistory = getEditDiffHistory(activeDoc, xtabHistory, docsInPrompt, computeTokens, opts.diffHistory);
149
44
  const relatedInformation = getRelatedInformation(langCtx);
150
45
  const currentFilePath = toUniquePath(activeDoc.id, activeDoc.workspaceRoot?.path);
151
- const postScript = getPostScript(opts.promptingStrategy, currentFilePath);
152
- const mainPrompt = `${PromptTags.RECENT_FILES.start}
46
+ const postScript = promptPieces.opts.includePostScript ? getPostScript(opts.promptingStrategy, currentFilePath) : '';
47
+ const mainPrompt = `${tags_1.PromptTags.RECENT_FILES.start}
153
48
  ${recentlyViewedCodeSnippets}
154
- ${PromptTags.RECENT_FILES.end}
49
+ ${tags_1.PromptTags.RECENT_FILES.end}
155
50
 
156
- ${PromptTags.CURRENT_FILE.start}
51
+ ${tags_1.PromptTags.CURRENT_FILE.start}
157
52
  current_file_path: ${currentFilePath}
158
53
  ${currentFileContent}
159
- ${PromptTags.CURRENT_FILE.end}
54
+ ${tags_1.PromptTags.CURRENT_FILE.end}
160
55
 
161
- ${PromptTags.EDIT_HISTORY.start}
56
+ ${tags_1.PromptTags.EDIT_HISTORY.start}
162
57
  ${editDiffHistory}
163
- ${PromptTags.EDIT_HISTORY.end}
58
+ ${tags_1.PromptTags.EDIT_HISTORY.end}
164
59
 
165
60
  ${areaAroundCodeToEdit}`;
166
61
  const includeBackticks = opts.promptingStrategy !== xtabPromptOptions_1.PromptingStrategy.Nes41Miniv3 && opts.promptingStrategy !== xtabPromptOptions_1.PromptingStrategy.Codexv21NesUnified;
@@ -177,20 +72,20 @@ function getPostScript(strategy, currentFilePath) {
177
72
  case xtabPromptOptions_1.PromptingStrategy.Codexv21NesUnified:
178
73
  break;
179
74
  case xtabPromptOptions_1.PromptingStrategy.UnifiedModel:
180
- postScript = `The developer was working on a section of code within the tags \`code_to_edit\` in the file located at \`${currentFilePath}\`. Using the given \`recently_viewed_code_snippets\`, \`current_file_content\`, \`edit_diff_history\`, \`area_around_code_to_edit\`, and the cursor position marked as \`${PromptTags.CURSOR}\`, please continue the developer's work. Update the \`code_to_edit\` section by predicting and completing the changes they would have made next. Start your response with <EDIT>, <INSERT>, or <NO_CHANGE>. If you are making an edit, start with <EDIT> and then provide the rewritten code window followed by </EDIT>. If you are inserting new code, start with <INSERT> and then provide only the new code that will be inserted at the cursor position followed by </INSERT>. If no changes are necessary, reply only with <NO_CHANGE>. Avoid undoing or reverting the developer's last change unless there are obvious typos or errors.`;
75
+ postScript = `The developer was working on a section of code within the tags \`code_to_edit\` in the file located at \`${currentFilePath}\`. Using the given \`recently_viewed_code_snippets\`, \`current_file_content\`, \`edit_diff_history\`, \`area_around_code_to_edit\`, and the cursor position marked as \`${tags_1.PromptTags.CURSOR}\`, please continue the developer's work. Update the \`code_to_edit\` section by predicting and completing the changes they would have made next. Start your response with <EDIT>, <INSERT>, or <NO_CHANGE>. If you are making an edit, start with <EDIT> and then provide the rewritten code window followed by </EDIT>. If you are inserting new code, start with <INSERT> and then provide only the new code that will be inserted at the cursor position followed by </INSERT>. If no changes are necessary, reply only with <NO_CHANGE>. Avoid undoing or reverting the developer's last change unless there are obvious typos or errors.`;
181
76
  break;
182
77
  case xtabPromptOptions_1.PromptingStrategy.Nes41Miniv3:
183
78
  postScript = `The developer was working on a section of code within the tags <|code_to_edit|> in the file located at \`${currentFilePath}\`. Using the given \`recently_viewed_code_snippets\`, \`current_file_content\`, \`edit_diff_history\`, \`area_around_code_to_edit\`, and the cursor position marked as \`<|cursor|>\`, please continue the developer's work. Update the <|code_to_edit|> section by predicting and completing the changes they would have made next. Start your response with <EDIT> or <NO_CHANGE>. If you are making an edit, start with <EDIT> and then provide the rewritten code window followed by </EDIT>. If no changes are necessary, reply only with <NO_CHANGE>. Avoid undoing or reverting the developer's last change unless there are obvious typos or errors.`;
184
79
  break;
185
80
  case xtabPromptOptions_1.PromptingStrategy.Xtab275:
186
- postScript = `The developer was working on a section of code within the tags \`code_to_edit\` in the file located at \`${currentFilePath}\`. Using the given \`recently_viewed_code_snippets\`, \`current_file_content\`, \`edit_diff_history\`, \`area_around_code_to_edit\`, and the cursor position marked as \`${PromptTags.CURSOR}\`, please continue the developer's work. Update the \`code_to_edit\` section by predicting and completing the changes they would have made next. Provide the revised code that was between the \`${PromptTags.EDIT_WINDOW.start}\` and \`${PromptTags.EDIT_WINDOW.end}\` tags, but do not include the tags themselves. Avoid undoing or reverting the developer's last change unless there are obvious typos or errors. Don't include the line numbers or the form #| in your response. Do not skip any lines. Do not be lazy.`;
81
+ postScript = `The developer was working on a section of code within the tags \`code_to_edit\` in the file located at \`${currentFilePath}\`. Using the given \`recently_viewed_code_snippets\`, \`current_file_content\`, \`edit_diff_history\`, \`area_around_code_to_edit\`, and the cursor position marked as \`${tags_1.PromptTags.CURSOR}\`, please continue the developer's work. Update the \`code_to_edit\` section by predicting and completing the changes they would have made next. Provide the revised code that was between the \`${tags_1.PromptTags.EDIT_WINDOW.start}\` and \`${tags_1.PromptTags.EDIT_WINDOW.end}\` tags, but do not include the tags themselves. Avoid undoing or reverting the developer's last change unless there are obvious typos or errors. Don't include the line numbers or the form #| in your response. Do not skip any lines. Do not be lazy.`;
187
82
  break;
188
83
  case xtabPromptOptions_1.PromptingStrategy.SimplifiedSystemPrompt:
189
84
  default:
190
85
  postScript = `The developer was working on a section of code within the tags \`code_to_edit\` in the file located at \`${currentFilePath}\`. \
191
86
  Using the given \`recently_viewed_code_snippets\`, \`current_file_content\`, \`edit_diff_history\`, \`area_around_code_to_edit\`, and the cursor \
192
- position marked as \`${PromptTags.CURSOR}\`, please continue the developer's work. Update the \`code_to_edit\` section by predicting and completing the changes \
193
- they would have made next. Provide the revised code that was between the \`${PromptTags.EDIT_WINDOW.start}\` and \`${PromptTags.EDIT_WINDOW.end}\` tags with the following format, but do not include the tags themselves.
87
+ position marked as \`${tags_1.PromptTags.CURSOR}\`, please continue the developer's work. Update the \`code_to_edit\` section by predicting and completing the changes \
88
+ they would have made next. Provide the revised code that was between the \`${tags_1.PromptTags.EDIT_WINDOW.start}\` and \`${tags_1.PromptTags.EDIT_WINDOW.end}\` tags with the following format, but do not include the tags themselves.
194
89
  \`\`\`
195
90
  // Your revised code goes here
196
91
  \`\`\``;
@@ -294,7 +189,7 @@ function formatCodeSnippet(documentId, fileContent, truncate = false) {
294
189
  const firstLine = truncate
295
190
  ? `code_snippet_file_path: ${filePath} (truncated)`
296
191
  : `code_snippet_file_path: ${filePath}`;
297
- return [PromptTags.RECENT_FILE.start, firstLine, fileContent, PromptTags.RECENT_FILE.end].join('\n');
192
+ return [tags_1.PromptTags.RECENT_FILE.start, firstLine, fileContent, tags_1.PromptTags.RECENT_FILE.end].join('\n');
298
193
  }
299
194
  function getRecentCodeSnippets(activeDoc, xtabHistory, langCtx, computeTokens, opts) {
300
195
  const { includeViewedFiles, nDocuments } = opts.recentlyViewedDocuments;
@@ -514,22 +409,27 @@ function expandRangeToPageRange(currentDocLines, areaAroundEditWindowLinesRange,
514
409
  }
515
410
  return { firstPageIdx, lastPageIdx, budgetLeft: tokenBudget };
516
411
  }
517
- /**
518
- * @remark exported for testing
519
- */
520
- function createTaggedCurrentFileContentUsingPagedClipping(currentDocLines, areaAroundCodeToEdit, areaAroundEditWindowLinesRange, computeTokens, pageSize, opts) {
521
- // subtract budget consumed by areaAroundCodeToEdit
522
- const availableTokenBudget = opts.maxTokens - countTokensForLines(areaAroundCodeToEdit.split(/\r?\n/), computeTokens);
412
+ function clipPreservingRange(docLines, rangeToPreserve, computeTokens, pageSize, opts) {
413
+ // subtract budget consumed by rangeToPreserve
414
+ const availableTokenBudget = opts.maxTokens - countTokensForLines(docLines.slice(rangeToPreserve.start, rangeToPreserve.endExclusive), computeTokens);
523
415
  if (availableTokenBudget < 0) {
524
416
  return result_1.Result.error('outOfBudget');
525
417
  }
526
- const { firstPageIdx, lastPageIdx } = expandRangeToPageRange(currentDocLines, areaAroundEditWindowLinesRange, pageSize, availableTokenBudget, computeTokens, opts.prioritizeAboveCursor);
418
+ const { firstPageIdx, lastPageIdx } = expandRangeToPageRange(docLines, rangeToPreserve, pageSize, availableTokenBudget, computeTokens, opts.prioritizeAboveCursor);
527
419
  const linesOffsetStart = firstPageIdx * pageSize;
528
- const linesOffsetEnd = lastPageIdx * pageSize + pageSize;
420
+ const linesOffsetEndExcl = lastPageIdx * pageSize + pageSize;
421
+ return result_1.Result.ok(new offsetRange_1.OffsetRange(linesOffsetStart, linesOffsetEndExcl));
422
+ }
423
+ function createTaggedCurrentFileContentUsingPagedClipping(currentDocLines, areaAroundCodeToEdit, areaAroundEditWindowLinesRange, computeTokens, pageSize, opts) {
424
+ const r = clipPreservingRange(currentDocLines, areaAroundEditWindowLinesRange, computeTokens, pageSize, opts);
425
+ if (r.isError()) {
426
+ return result_1.Result.error('outOfBudget');
427
+ }
428
+ const clippedRange = r.val;
529
429
  const taggedCurrentFileContent = [
530
- ...currentDocLines.slice(linesOffsetStart, areaAroundEditWindowLinesRange.start),
430
+ ...currentDocLines.slice(clippedRange.start, areaAroundEditWindowLinesRange.start),
531
431
  areaAroundCodeToEdit,
532
- ...currentDocLines.slice(areaAroundEditWindowLinesRange.endExclusive, linesOffsetEnd),
432
+ ...currentDocLines.slice(areaAroundEditWindowLinesRange.endExclusive, clippedRange.endExclusive),
533
433
  ];
534
434
  return result_1.Result.ok({ taggedCurrentFileContent: taggedCurrentFileContent.join('\n'), nLines: taggedCurrentFileContent.length });
535
435
  }
@@ -1 +1 @@
1
- {"version":3,"file":"promptCrafting.js","sourceRoot":"","sources":["../../../../../../src/_internal/extension/xtab/common/promptCrafting.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAsJhG,sCAoCC;AA0JD,oCAYC;AAgGD,kFAuEC;AAeD,oCAiCC;AA2FD,4GAkCC;AAlrBD,0FAAuF;AACvF,8EAAiF;AAEjF,wGAA4J;AAG5J,2GAA2G;AAC3G,wDAAqD;AACrD,gEAAsE;AACtE,gEAAsE;AACtE,kEAA+D;AAC/D,wFAAqF;AAGrF,IAAiB,UAAU,CAgC1B;AAhCD,WAAiB,UAAU;IACb,iBAAM,GAAG,YAAY,CAAC;IAEtB,sBAAW,GAAG;QAC1B,KAAK,EAAE,kBAAkB;QACzB,GAAG,EAAE,mBA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B,EACzB,oBAA4B,EAC5B,8BAA2C,EAC3C,aAAoC,EACpC,QAAgB,EAChB,IAAwB;IAGxB,mDAAmD;IACnD,MAAM,oBAAoB,GAAG,IAAI,CAAC,SAAS,GAAG,mBAAmB,CAAC,oBAAoB,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,aAAa,CAAC,CAAC;IACtH,IAAI,oBAAoB,GAAG,CAAC,EAAE,CAAC;QAC9B,OAAO,eAAM,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC;IACpC,CAAC;IAED,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE,GAAG,sBAAsB,CAC3D,eAAe,EACf,8BAA8B,EAC9B,QAAQ,EACR,oBAAoB,EACpB,aAAa,EACb,IAAI,CAAC,qBAAqB,CAC1B,CAAC;IAEF,MAAM,gBAAgB,GAAG,YAAY,GAAG,QAAQ,CAAC;IACjD,MAAM,cAAc,GAAG,WAAW,GAAG,QAAQ,GAAG,QAAQ,CAAC;IAEzD,MAAM,wBAAwB,GAAG;QAChC,GAAG,eAAe,CAAC,KAAK,CAAC,gBAAgB,EAAE,8BAA8B,CAAC,KAAK,CAAC;QAChF,oBAAoB;QACpB,GAAG,eAAe,CAAC,KAAK,CAAC,8BAA8B,CAAC,YAAY,EAAE,cAAc,CAAC;KACrF,CAAC;IAEF,OAAO,eAAM,CAAC,EAAE,CAAC,EAAE,wBAAwB,EAAE,wBAAwB,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,wBAAwB,CAAC,MAAM,EAAE,CAAC,CAAC;AAC9H,CAAC"}
1
+ {"version":3,"file":"promptCrafting.js","sourceRoot":"","sources":["../../../../../../src/_internal/extension/xtab/common/promptCrafting.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAkChG,sCAsCC;AA0JD,oCAYC;AAgGD,kFAuEC;AAeD,oCAiCC;AAwFD,kDA2BC;AAED,4GA8BC;AAtlBD,0FAAuF;AACvF,8EAAiF;AAEjF,wGAA4J;AAG5J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"Your role as an AI assistant is to help developers complete their code tasks by assisting in editing specific sections of code marked by the <|code_to_edit|> and <|/code_to_edit|> tags, while adhering to Microsoft's content policies and avoiding the creation of content that violates copyrights.\n\nYou have access to the following information to help you make informed suggestions:\n\n- recently_viewed_code_snippets: These are code snippets that the developer has recently looked at, which might provide context or examples relevant to the current task. They are listed from oldest to newest. It's possible these are entirely irrelevant to the developer's change.\n- current_file_content: The content of the file the developer is currently working on, providing the broader context of the code.\n- edit_diff_history: A record of changes made to the code, helping you understand the evolution of the code and the developer's intentions. These changes are listed from oldest to latest. It's possible a lot of old edit diff history is entirely irrelevant to the developer's change.\n- area_around_code_to_edit: The context showing the code surrounding the section to be edited.\n- cursor position marked as <|cursor|>: Indicates where the developer's cursor is currently located, which can be crucial for understanding what part of the code they are focusing on.\n\nYour task is to predict and complete the changes the developer would have made next in the <|code_to_edit|> section. The developer may have stopped in the middle of typing. Your goal is to keep the developer on the path that you think they're following. Some examples include further implementing a class, method, or variable, or improving the quality of the code. Make sure the developer doesn't get distracted and ensure your suggestion is relevant. Consider what changes need to be made next, if any. If you think changes should be made, ask yourself if this is truly what needs to happen. If you are confident about it, then proceed with the changes.\n\n# Steps\n\n1. **Review Context**: Analyze the context from the resources provided, such as recently viewed snippets, edit history, surrounding code, and cursor location.\n2. **Evaluate Current Code**: Determine if the current code within the tags requires any corrections or enhancements.\n3. **Suggest Edits**: If changes are required, ensure they align with the developer's patterns and improve code quality.\n4. **Maintain Consistency**: Ensure indentation and formatting follow the existing code style.\n\n# Output Format\n- Your response should start with the word <EDIT>, <INSERT>, or <NO_CHANGE>.\n- If your are making an edit, start with <EDIT>, then provide the rewritten code window, then </EDIT>.\n- If you are inserting new code, start with <INSERT> and then provide only the new code that will be inserted at the cursor position, then </INSERT>.\n- If no changes are necessary, reply only with <NO_CHANGE>.\n- Ensure that you do not output duplicate code that exists outside of these tags. The output should be the revised code that was between these tags and should not include the <|code_to_edit|> or <|/code_to_edit|> tags.\n\n# Notes\n\n- Apologize with \"Sorry, I can't assist with that.\" for requests that may breach Microsoft content guidelines.\n- Avoid undoing or reverting the developer's last change unless there are obvious typos or errors.";
3
+ export declare const nes41Miniv3SystemPrompt = "Your role as an AI assistant is to help developers complete their code tasks by assisting in editing specific sections of code marked by the <|code_to_edit|> and <|/code_to_edit|> tags, while adhering to Microsoft's content policies and avoiding the creation of content that violates copyrights.\n\nYou have access to the following information to help you make informed suggestions:\n\n- recently_viewed_code_snippets: These are code snippets that the developer has recently looked at, which might provide context or examples relevant to the current task. They are listed from oldest to newest. It's possible these are entirely irrelevant to the developer's change.\n- current_file_content: The content of the file the developer is currently working on, providing the broader context of the code.\n- edit_diff_history: A record of changes made to the code, helping you understand the evolution of the code and the developer's intentions. These changes are listed from oldest to latest. It's possible a lot of old edit diff history is entirely irrelevant to the developer's change.\n- area_around_code_to_edit: The context showing the code surrounding the section to be edited.\n- cursor position marked as <|cursor|>: Indicates where the developer's cursor is currently located, which can be crucial for understanding what part of the code they are focusing on.\n\nYour task is to predict and complete the changes the developer would have made next in the <|code_to_edit|> section. The developer may have stopped in the middle of typing. Your goal is to keep the developer on the path that you think they're following. Some examples include further implementing a class, method, or variable, or improving the quality of the code. Make sure the developer doesn't get distracted and ensure your suggestion is relevant. Consider what changes need to be made next, if any. If you think changes should be made, ask yourself if this is truly what needs to happen. If you are confident about it, then proceed with the changes.\n\n# Steps\n\n1. **Review Context**: Analyze the context from the resources provided, such as recently viewed snippets, edit history, surrounding code, and cursor location.\n2. **Evaluate Current Code**: Determine if the current code within the tags requires any corrections or enhancements.\n3. **Suggest Edits**: If changes are required, ensure they align with the developer's patterns and improve code quality.\n4. **Maintain Consistency**: Ensure indentation and formatting follow the existing code style.\n\n# Output Format\n- Your response should start with the word <EDIT> or <NO_CHANGE>.\n- If your are making an edit, start with <EDIT>, then provide the rewritten code window, then </EDIT>.\n- If no changes are necessary, reply only with <NO_CHANGE>.\n- Ensure that you do not output duplicate code that exists outside of these tags. The output should be the revised code that was between these tags and should not include the <|code_to_edit|> or <|/code_to_edit|> tags.\n\n# Notes\n\n- Apologize with \"Sorry, I can't assist with that.\" for requests that may breach Microsoft content guidelines.\n- Avoid undoing or reverting the developer's last change unless there are obvious typos or errors.";
4
+ export declare const simplifiedPrompt = "Predict next code edit based on the context given by the user.";
5
+ export declare const xtab275SystemPrompt = "Predict the next code edit based on user context, following Microsoft content policies and avoiding copyright violations. If a request may breach guidelines, reply: \"Sorry, I can't assist with that.\"";
6
+ //# sourceMappingURL=systemMessages.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"systemMessages.d.ts","sourceRoot":"","sources":["../../../../../../src/_internal/extension/xtab/common/systemMessages.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,oBAAoB,QAiCiC,CAAC;AAEnE,eAAO,MAAM,wBAAwB,k0GA6B8D,CAAC;AAEpG,eAAO,MAAM,uBAAuB,gqGA4B+D,CAAC;AAEpG,eAAO,MAAM,gBAAgB,mEAAmE,CAAC;AAEjG,eAAO,MAAM,mBAAmB,8MAA4M,CAAC"}
@@ -0,0 +1,104 @@
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Microsoft Corporation. All rights reserved.
4
+ * Licensed under the MIT License. See License.txt in the project root for license information.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.xtab275SystemPrompt = exports.simplifiedPrompt = exports.nes41Miniv3SystemPrompt = exports.unifiedModelSystemPrompt = exports.systemPromptTemplate = void 0;
8
+ const tags_1 = require("./tags");
9
+ exports.systemPromptTemplate = `Your role as an AI assistant is to help developers complete their code tasks by assisting in editing specific sections of code marked by the ${tags_1.PromptTags.EDIT_WINDOW.start} and ${tags_1.PromptTags.EDIT_WINDOW.end} tags, while adhering to Microsoft's content policies and avoiding the creation of content that violates copyrights.
10
+
11
+ You have access to the following information to help you make informed suggestions:
12
+
13
+ - recently_viewed_code_snippets: These are code snippets that the developer has recently looked at, which might provide context or examples relevant to the current task. They are listed from oldest to newest, with line numbers in the form #| to help you understand the edit diff history. It's possible these are entirely irrelevant to the developer's change.
14
+ - current_file_content: The content of the file the developer is currently working on, providing the broader context of the code. Line numbers in the form #| are included to help you understand the edit diff history.
15
+ - edit_diff_history: A record of changes made to the code, helping you understand the evolution of the code and the developer's intentions. These changes are listed from oldest to latest. It's possible a lot of old edit diff history is entirely irrelevant to the developer's change.
16
+ - area_around_code_to_edit: The context showing the code surrounding the section to be edited.
17
+ - cursor position marked as ${tags_1.PromptTags.CURSOR}: Indicates where the developer's cursor is currently located, which can be crucial for understanding what part of the code they are focusing on.
18
+
19
+ Your task is to predict and complete the changes the developer would have made next in the ${tags_1.PromptTags.EDIT_WINDOW.start} section. The developer may have stopped in the middle of typing. Your goal is to keep the developer on the path that you think they're following. Some examples include further implementing a class, method, or variable, or improving the quality of the code. Make sure the developer doesn't get distracted and ensure your suggestion is relevant. Consider what changes need to be made next, if any. If you think changes should be made, ask yourself if this is truly what needs to happen. If you are confident about it, then proceed with the changes.
20
+
21
+ # Steps
22
+
23
+ 1. **Review Context**: Analyze the context from the resources provided, such as recently viewed snippets, edit history, surrounding code, and cursor location.
24
+ 2. **Evaluate Current Code**: Determine if the current code within the tags requires any corrections or enhancements.
25
+ 3. **Suggest Edits**: If changes are required, ensure they align with the developer's patterns and improve code quality.
26
+ 4. **Maintain Consistency**: Ensure indentation and formatting follow the existing code style.
27
+
28
+ # Output Format
29
+
30
+ - Provide only the revised code within the tags. If no changes are necessary, simply return the original code from within the ${tags_1.PromptTags.EDIT_WINDOW.start} and ${tags_1.PromptTags.EDIT_WINDOW.end} tags.
31
+ - There are line numbers in the form #| in the code displayed to you above, but these are just for your reference. Please do not include the numbers of the form #| in your response.
32
+ - Ensure that you do not output duplicate code that exists outside of these tags. The output should be the revised code that was between these tags and should not include the ${tags_1.PromptTags.EDIT_WINDOW.start} or ${tags_1.PromptTags.EDIT_WINDOW.end} tags.
33
+
34
+ \`\`\`
35
+ // Your revised code goes here
36
+ \`\`\`
37
+
38
+ # Notes
39
+
40
+ - Apologize with "Sorry, I can't assist with that." for requests that may breach Microsoft content guidelines.
41
+ - Avoid undoing or reverting the developer's last change unless there are obvious typos or errors.
42
+ - Don't include the line numbers of the form #| in your response.`;
43
+ exports.unifiedModelSystemPrompt = `Your role as an AI assistant is to help developers complete their code tasks by assisting in editing specific sections of code marked by the <|code_to_edit|> and <|/code_to_edit|> tags, while adhering to Microsoft's content policies and avoiding the creation of content that violates copyrights.
44
+
45
+ You have access to the following information to help you make informed suggestions:
46
+
47
+ - recently_viewed_code_snippets: These are code snippets that the developer has recently looked at, which might provide context or examples relevant to the current task. They are listed from oldest to newest. It's possible these are entirely irrelevant to the developer's change.
48
+ - current_file_content: The content of the file the developer is currently working on, providing the broader context of the code.
49
+ - edit_diff_history: A record of changes made to the code, helping you understand the evolution of the code and the developer's intentions. These changes are listed from oldest to latest. It's possible a lot of old edit diff history is entirely irrelevant to the developer's change.
50
+ - area_around_code_to_edit: The context showing the code surrounding the section to be edited.
51
+ - cursor position marked as <|cursor|>: Indicates where the developer's cursor is currently located, which can be crucial for understanding what part of the code they are focusing on.
52
+
53
+ Your task is to predict and complete the changes the developer would have made next in the <|code_to_edit|> section. The developer may have stopped in the middle of typing. Your goal is to keep the developer on the path that you think they're following. Some examples include further implementing a class, method, or variable, or improving the quality of the code. Make sure the developer doesn't get distracted and ensure your suggestion is relevant. Consider what changes need to be made next, if any. If you think changes should be made, ask yourself if this is truly what needs to happen. If you are confident about it, then proceed with the changes.
54
+
55
+ # Steps
56
+
57
+ 1. **Review Context**: Analyze the context from the resources provided, such as recently viewed snippets, edit history, surrounding code, and cursor location.
58
+ 2. **Evaluate Current Code**: Determine if the current code within the tags requires any corrections or enhancements.
59
+ 3. **Suggest Edits**: If changes are required, ensure they align with the developer's patterns and improve code quality.
60
+ 4. **Maintain Consistency**: Ensure indentation and formatting follow the existing code style.
61
+
62
+ # Output Format
63
+ - Your response should start with the word <EDIT>, <INSERT>, or <NO_CHANGE>.
64
+ - If your are making an edit, start with <EDIT>, then provide the rewritten code window, then </EDIT>.
65
+ - If you are inserting new code, start with <INSERT> and then provide only the new code that will be inserted at the cursor position, then </INSERT>.
66
+ - If no changes are necessary, reply only with <NO_CHANGE>.
67
+ - Ensure that you do not output duplicate code that exists outside of these tags. The output should be the revised code that was between these tags and should not include the <|code_to_edit|> or <|/code_to_edit|> tags.
68
+
69
+ # Notes
70
+
71
+ - Apologize with "Sorry, I can't assist with that." for requests that may breach Microsoft content guidelines.
72
+ - Avoid undoing or reverting the developer's last change unless there are obvious typos or errors.`;
73
+ exports.nes41Miniv3SystemPrompt = `Your role as an AI assistant is to help developers complete their code tasks by assisting in editing specific sections of code marked by the <|code_to_edit|> and <|/code_to_edit|> tags, while adhering to Microsoft's content policies and avoiding the creation of content that violates copyrights.
74
+
75
+ You have access to the following information to help you make informed suggestions:
76
+
77
+ - recently_viewed_code_snippets: These are code snippets that the developer has recently looked at, which might provide context or examples relevant to the current task. They are listed from oldest to newest. It's possible these are entirely irrelevant to the developer's change.
78
+ - current_file_content: The content of the file the developer is currently working on, providing the broader context of the code.
79
+ - edit_diff_history: A record of changes made to the code, helping you understand the evolution of the code and the developer's intentions. These changes are listed from oldest to latest. It's possible a lot of old edit diff history is entirely irrelevant to the developer's change.
80
+ - area_around_code_to_edit: The context showing the code surrounding the section to be edited.
81
+ - cursor position marked as <|cursor|>: Indicates where the developer's cursor is currently located, which can be crucial for understanding what part of the code they are focusing on.
82
+
83
+ Your task is to predict and complete the changes the developer would have made next in the <|code_to_edit|> section. The developer may have stopped in the middle of typing. Your goal is to keep the developer on the path that you think they're following. Some examples include further implementing a class, method, or variable, or improving the quality of the code. Make sure the developer doesn't get distracted and ensure your suggestion is relevant. Consider what changes need to be made next, if any. If you think changes should be made, ask yourself if this is truly what needs to happen. If you are confident about it, then proceed with the changes.
84
+
85
+ # Steps
86
+
87
+ 1. **Review Context**: Analyze the context from the resources provided, such as recently viewed snippets, edit history, surrounding code, and cursor location.
88
+ 2. **Evaluate Current Code**: Determine if the current code within the tags requires any corrections or enhancements.
89
+ 3. **Suggest Edits**: If changes are required, ensure they align with the developer's patterns and improve code quality.
90
+ 4. **Maintain Consistency**: Ensure indentation and formatting follow the existing code style.
91
+
92
+ # Output Format
93
+ - Your response should start with the word <EDIT> or <NO_CHANGE>.
94
+ - If your are making an edit, start with <EDIT>, then provide the rewritten code window, then </EDIT>.
95
+ - If no changes are necessary, reply only with <NO_CHANGE>.
96
+ - Ensure that you do not output duplicate code that exists outside of these tags. The output should be the revised code that was between these tags and should not include the <|code_to_edit|> or <|/code_to_edit|> tags.
97
+
98
+ # Notes
99
+
100
+ - Apologize with "Sorry, I can't assist with that." for requests that may breach Microsoft content guidelines.
101
+ - Avoid undoing or reverting the developer's last change unless there are obvious typos or errors.`;
102
+ exports.simplifiedPrompt = 'Predict next code edit based on the context given by the user.';
103
+ exports.xtab275SystemPrompt = `Predict the next code edit based on user context, following Microsoft content policies and avoiding copyright violations. If a request may breach guidelines, reply: "Sorry, I can't assist with that."`;
104
+ //# sourceMappingURL=systemMessages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"systemMessages.js","sourceRoot":"","sources":["../../../../../../src/_internal/extension/xtab/common/systemMessages.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAEhG,iCAAoC;AAEvB,QAAA,oBAAoB,GAAG,gJAAgJ,iBAAU,CAAC,WAAW,CAAC,KAAK,QAAQ,iBAAU,CAAC,WAAW,CAAC,GAAG;;;;;;;;8BAQpN,iBAAU,CAAC,MAAM;;6FAE8C,iBAAU,CAAC,WAAW,CAAC,KAAK;;;;;;;;;;;gIAWO,iBAAU,CAAC,WAAW,CAAC,KAAK,QAAQ,iBAAU,CAAC,WAAW,CAAC,GAAG;;iLAEb,iBAAU,CAAC,WAAW,CAAC,KAAK,OAAO,iBAAU,CAAC,WAAW,CAAC,GAAG;;;;;;;;;;kEAU5K,CAAC;AAEtD,QAAA,wBAAwB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;mGA6B2D,CAAC;AAEvF,QAAA,uBAAuB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;mGA4B4D,CAAC;AAEvF,QAAA,gBAAgB,GAAG,gEAAgE,CAAC;AAEpF,QAAA,mBAAmB,GAAG,yMAAyM,CAAC"}
@@ -0,0 +1,15 @@
1
+ export declare namespace PromptTags {
2
+ export const CURSOR = "<|cursor|>";
3
+ type Tag = {
4
+ start: string;
5
+ end: string;
6
+ };
7
+ export const EDIT_WINDOW: Tag;
8
+ export const AREA_AROUND: Tag;
9
+ export const CURRENT_FILE: Tag;
10
+ export const EDIT_HISTORY: Tag;
11
+ export const RECENT_FILES: Tag;
12
+ export const RECENT_FILE: Tag;
13
+ export {};
14
+ }
15
+ //# sourceMappingURL=tags.d.ts.map