@vscode/chat-lib 0.43.2026040702 → 0.43.2026040706-0

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 (194) hide show
  1. package/dist/src/_internal/extension/common/constants.d.ts +2 -1
  2. package/dist/src/_internal/extension/common/constants.d.ts.map +1 -1
  3. package/dist/src/_internal/extension/common/constants.js +3 -0
  4. package/dist/src/_internal/extension/common/constants.js.map +1 -1
  5. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/ghostText/completionsFromNetwork.d.ts +1 -5
  6. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/ghostText/completionsFromNetwork.d.ts.map +1 -1
  7. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/ghostText/completionsFromNetwork.js +3 -11
  8. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/ghostText/completionsFromNetwork.js.map +1 -1
  9. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/networking.d.ts +0 -30
  10. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/networking.d.ts.map +1 -1
  11. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/networking.js +4 -82
  12. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/networking.js.map +1 -1
  13. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/openai/fetch.d.ts +2 -10
  14. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/openai/fetch.d.ts.map +1 -1
  15. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/openai/fetch.js +26 -173
  16. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/openai/fetch.js.map +1 -1
  17. package/dist/src/_internal/extension/inlineEdits/node/nextEditCache.d.ts +11 -0
  18. package/dist/src/_internal/extension/inlineEdits/node/nextEditCache.d.ts.map +1 -1
  19. package/dist/src/_internal/extension/inlineEdits/node/nextEditCache.js +21 -3
  20. package/dist/src/_internal/extension/inlineEdits/node/nextEditCache.js.map +1 -1
  21. package/dist/src/_internal/extension/inlineEdits/node/nextEditProvider.d.ts +2 -2
  22. package/dist/src/_internal/extension/inlineEdits/node/nextEditProvider.d.ts.map +1 -1
  23. package/dist/src/_internal/extension/inlineEdits/node/nextEditProvider.js +34 -12
  24. package/dist/src/_internal/extension/inlineEdits/node/nextEditProvider.js.map +1 -1
  25. package/dist/src/_internal/extension/prompt/node/chatMLFetcher.d.ts +1 -1
  26. package/dist/src/_internal/extension/prompt/node/chatMLFetcher.d.ts.map +1 -1
  27. package/dist/src/_internal/extension/prompt/node/chatMLFetcher.js +37 -24
  28. package/dist/src/_internal/extension/prompt/node/chatMLFetcher.js.map +1 -1
  29. package/dist/src/_internal/extension/prompt/node/chatMLFetcherTelemetry.d.ts.map +1 -1
  30. package/dist/src/_internal/extension/prompt/node/chatMLFetcherTelemetry.js +4 -2
  31. package/dist/src/_internal/extension/prompt/node/chatMLFetcherTelemetry.js.map +1 -1
  32. package/dist/src/_internal/extension/xtab/common/fetchStreamError.d.ts +10 -0
  33. package/dist/src/_internal/extension/xtab/common/fetchStreamError.d.ts.map +1 -0
  34. package/dist/src/_internal/extension/xtab/common/fetchStreamError.js +19 -0
  35. package/dist/src/_internal/extension/xtab/common/fetchStreamError.js.map +1 -0
  36. package/dist/src/_internal/extension/xtab/node/cursorLineDivergence.d.ts +44 -0
  37. package/dist/src/_internal/extension/xtab/node/cursorLineDivergence.d.ts.map +1 -0
  38. package/dist/src/_internal/extension/xtab/node/cursorLineDivergence.js +181 -0
  39. package/dist/src/_internal/extension/xtab/node/cursorLineDivergence.js.map +1 -0
  40. package/dist/src/_internal/extension/xtab/node/editIntent.d.ts +31 -0
  41. package/dist/src/_internal/extension/xtab/node/editIntent.d.ts.map +1 -0
  42. package/dist/src/_internal/extension/xtab/node/editIntent.js +193 -0
  43. package/dist/src/_internal/extension/xtab/node/editIntent.js.map +1 -0
  44. package/dist/src/_internal/extension/xtab/node/responseFormatHandlers.d.ts +52 -0
  45. package/dist/src/_internal/extension/xtab/node/responseFormatHandlers.d.ts.map +1 -0
  46. package/dist/src/_internal/extension/xtab/node/responseFormatHandlers.js +134 -0
  47. package/dist/src/_internal/extension/xtab/node/responseFormatHandlers.js.map +1 -0
  48. package/dist/src/_internal/extension/xtab/node/xtabCustomDiffPatchResponseHandler.d.ts +1 -1
  49. package/dist/src/_internal/extension/xtab/node/xtabCustomDiffPatchResponseHandler.d.ts.map +1 -1
  50. package/dist/src/_internal/extension/xtab/node/xtabCustomDiffPatchResponseHandler.js +5 -5
  51. package/dist/src/_internal/extension/xtab/node/xtabCustomDiffPatchResponseHandler.js.map +1 -1
  52. package/dist/src/_internal/extension/xtab/node/xtabProvider.d.ts +10 -37
  53. package/dist/src/_internal/extension/xtab/node/xtabProvider.d.ts.map +1 -1
  54. package/dist/src/_internal/extension/xtab/node/xtabProvider.js +315 -361
  55. package/dist/src/_internal/extension/xtab/node/xtabProvider.js.map +1 -1
  56. package/dist/src/_internal/extension/xtab/node/xtabUtils.d.ts +10 -0
  57. package/dist/src/_internal/extension/xtab/node/xtabUtils.d.ts.map +1 -1
  58. package/dist/src/_internal/extension/xtab/node/xtabUtils.js +24 -0
  59. package/dist/src/_internal/extension/xtab/node/xtabUtils.js.map +1 -1
  60. package/dist/src/_internal/platform/authentication/common/copilotToken.d.ts +1 -0
  61. package/dist/src/_internal/platform/authentication/common/copilotToken.d.ts.map +1 -1
  62. package/dist/src/_internal/platform/authentication/common/copilotToken.js +3 -0
  63. package/dist/src/_internal/platform/authentication/common/copilotToken.js.map +1 -1
  64. package/dist/src/_internal/platform/chat/common/chatMLFetcher.d.ts +1 -0
  65. package/dist/src/_internal/platform/chat/common/chatMLFetcher.d.ts.map +1 -1
  66. package/dist/src/_internal/platform/chat/common/chatMLFetcher.js +4 -0
  67. package/dist/src/_internal/platform/chat/common/chatMLFetcher.js.map +1 -1
  68. package/dist/src/_internal/platform/chat/common/commonTypes.d.ts.map +1 -1
  69. package/dist/src/_internal/platform/chat/common/commonTypes.js +34 -4
  70. package/dist/src/_internal/platform/chat/common/commonTypes.js.map +1 -1
  71. package/dist/src/_internal/platform/configuration/common/configurationService.d.ts +30 -13
  72. package/dist/src/_internal/platform/configuration/common/configurationService.d.ts.map +1 -1
  73. package/dist/src/_internal/platform/configuration/common/configurationService.js +37 -20
  74. package/dist/src/_internal/platform/configuration/common/configurationService.js.map +1 -1
  75. package/dist/src/_internal/platform/configuration/common/defaultsOnlyConfigurationService.d.ts +1 -1
  76. package/dist/src/_internal/platform/configuration/common/defaultsOnlyConfigurationService.d.ts.map +1 -1
  77. package/dist/src/_internal/platform/configuration/common/defaultsOnlyConfigurationService.js +1 -1
  78. package/dist/src/_internal/platform/configuration/common/defaultsOnlyConfigurationService.js.map +1 -1
  79. package/dist/src/_internal/platform/endpoint/common/chatModelCapabilities.d.ts +20 -0
  80. package/dist/src/_internal/platform/endpoint/common/chatModelCapabilities.d.ts.map +1 -1
  81. package/dist/src/_internal/platform/endpoint/common/chatModelCapabilities.js +49 -2
  82. package/dist/src/_internal/platform/endpoint/common/chatModelCapabilities.js.map +1 -1
  83. package/dist/src/_internal/platform/endpoint/common/endpointProvider.d.ts +2 -0
  84. package/dist/src/_internal/platform/endpoint/common/endpointProvider.d.ts.map +1 -1
  85. package/dist/src/_internal/platform/endpoint/common/endpointProvider.js.map +1 -1
  86. package/dist/src/_internal/platform/endpoint/common/statefulMarkerContainer.d.ts +5 -0
  87. package/dist/src/_internal/platform/endpoint/common/statefulMarkerContainer.d.ts.map +1 -1
  88. package/dist/src/_internal/platform/endpoint/common/statefulMarkerContainer.js +13 -0
  89. package/dist/src/_internal/platform/endpoint/common/statefulMarkerContainer.js.map +1 -1
  90. package/dist/src/_internal/platform/endpoint/node/chatEndpoint.d.ts +14 -2
  91. package/dist/src/_internal/platform/endpoint/node/chatEndpoint.d.ts.map +1 -1
  92. package/dist/src/_internal/platform/endpoint/node/chatEndpoint.js +41 -71
  93. package/dist/src/_internal/platform/endpoint/node/chatEndpoint.js.map +1 -1
  94. package/dist/src/_internal/platform/endpoint/node/imageLimits.d.ts +14 -0
  95. package/dist/src/_internal/platform/endpoint/node/imageLimits.d.ts.map +1 -0
  96. package/dist/src/_internal/platform/endpoint/node/imageLimits.js +156 -0
  97. package/dist/src/_internal/platform/endpoint/node/imageLimits.js.map +1 -0
  98. package/dist/src/_internal/platform/endpoint/node/messagesApi.d.ts +4 -12
  99. package/dist/src/_internal/platform/endpoint/node/messagesApi.d.ts.map +1 -1
  100. package/dist/src/_internal/platform/endpoint/node/messagesApi.js +39 -162
  101. package/dist/src/_internal/platform/endpoint/node/messagesApi.js.map +1 -1
  102. package/dist/src/_internal/platform/endpoint/node/responsesApi.d.ts +15 -2
  103. package/dist/src/_internal/platform/endpoint/node/responsesApi.d.ts.map +1 -1
  104. package/dist/src/_internal/platform/endpoint/node/responsesApi.js +259 -42
  105. package/dist/src/_internal/platform/endpoint/node/responsesApi.js.map +1 -1
  106. package/dist/src/_internal/platform/git/common/gitService.d.ts +8 -11
  107. package/dist/src/_internal/platform/git/common/gitService.d.ts.map +1 -1
  108. package/dist/src/_internal/platform/git/common/gitService.js.map +1 -1
  109. package/dist/src/_internal/platform/github/common/githubAPI.d.ts +1 -0
  110. package/dist/src/_internal/platform/github/common/githubAPI.d.ts.map +1 -1
  111. package/dist/src/_internal/platform/github/common/githubAPI.js +2 -0
  112. package/dist/src/_internal/platform/github/common/githubAPI.js.map +1 -1
  113. package/dist/src/_internal/platform/github/common/githubService.d.ts +3 -2
  114. package/dist/src/_internal/platform/github/common/githubService.d.ts.map +1 -1
  115. package/dist/src/_internal/platform/github/common/githubService.js.map +1 -1
  116. package/dist/src/_internal/platform/inlineEdits/common/dataTypes/xtabPromptOptions.d.ts +15 -0
  117. package/dist/src/_internal/platform/inlineEdits/common/dataTypes/xtabPromptOptions.d.ts.map +1 -1
  118. package/dist/src/_internal/platform/inlineEdits/common/dataTypes/xtabPromptOptions.js +18 -2
  119. package/dist/src/_internal/platform/inlineEdits/common/dataTypes/xtabPromptOptions.js.map +1 -1
  120. package/dist/src/_internal/platform/inlineEdits/common/inlineEditLogContext.d.ts +12 -3
  121. package/dist/src/_internal/platform/inlineEdits/common/inlineEditLogContext.d.ts.map +1 -1
  122. package/dist/src/_internal/platform/inlineEdits/common/inlineEditLogContext.js +72 -46
  123. package/dist/src/_internal/platform/inlineEdits/common/inlineEditLogContext.js.map +1 -1
  124. package/dist/src/_internal/platform/inlineEdits/common/utils/utils.d.ts +3 -0
  125. package/dist/src/_internal/platform/inlineEdits/common/utils/utils.d.ts.map +1 -1
  126. package/dist/src/_internal/platform/inlineEdits/common/utils/utils.js +12 -0
  127. package/dist/src/_internal/platform/inlineEdits/common/utils/utils.js.map +1 -1
  128. package/dist/src/_internal/platform/log/common/logService.d.ts +5 -0
  129. package/dist/src/_internal/platform/log/common/logService.d.ts.map +1 -1
  130. package/dist/src/_internal/platform/log/common/logService.js +22 -0
  131. package/dist/src/_internal/platform/log/common/logService.js.map +1 -1
  132. package/dist/src/_internal/platform/nesFetch/node/completionsFetchServiceImpl.d.ts +1 -1
  133. package/dist/src/_internal/platform/nesFetch/node/completionsFetchServiceImpl.d.ts.map +1 -1
  134. package/dist/src/_internal/platform/nesFetch/node/completionsFetchServiceImpl.js +1 -1
  135. package/dist/src/_internal/platform/nesFetch/node/completionsFetchServiceImpl.js.map +1 -1
  136. package/dist/src/_internal/platform/networking/common/anthropic.d.ts +0 -58
  137. package/dist/src/_internal/platform/networking/common/anthropic.d.ts.map +1 -1
  138. package/dist/src/_internal/platform/networking/common/anthropic.js +6 -67
  139. package/dist/src/_internal/platform/networking/common/anthropic.js.map +1 -1
  140. package/dist/src/_internal/platform/networking/common/fetch.d.ts +0 -12
  141. package/dist/src/_internal/platform/networking/common/fetch.d.ts.map +1 -1
  142. package/dist/src/_internal/platform/networking/common/fetch.js +5 -1
  143. package/dist/src/_internal/platform/networking/common/fetch.js.map +1 -1
  144. package/dist/src/_internal/platform/networking/common/fetcherService.d.ts +1 -0
  145. package/dist/src/_internal/platform/networking/common/fetcherService.d.ts.map +1 -1
  146. package/dist/src/_internal/platform/networking/common/fetcherService.js.map +1 -1
  147. package/dist/src/_internal/platform/networking/common/networking.d.ts +22 -4
  148. package/dist/src/_internal/platform/networking/common/networking.d.ts.map +1 -1
  149. package/dist/src/_internal/platform/networking/common/networking.js.map +1 -1
  150. package/dist/src/_internal/platform/networking/node/chatStream.d.ts +10 -0
  151. package/dist/src/_internal/platform/networking/node/chatStream.d.ts.map +1 -1
  152. package/dist/src/_internal/platform/networking/node/chatStream.js +28 -0
  153. package/dist/src/_internal/platform/networking/node/chatStream.js.map +1 -1
  154. package/dist/src/_internal/platform/networking/node/chatWebSocketManager.d.ts +24 -5
  155. package/dist/src/_internal/platform/networking/node/chatWebSocketManager.d.ts.map +1 -1
  156. package/dist/src/_internal/platform/networking/node/chatWebSocketManager.js +67 -20
  157. package/dist/src/_internal/platform/networking/node/chatWebSocketManager.js.map +1 -1
  158. package/dist/src/_internal/platform/networking/node/chatWebSocketTelemetry.d.ts +15 -1
  159. package/dist/src/_internal/platform/networking/node/chatWebSocketTelemetry.d.ts.map +1 -1
  160. package/dist/src/_internal/platform/networking/node/chatWebSocketTelemetry.js +51 -7
  161. package/dist/src/_internal/platform/networking/node/chatWebSocketTelemetry.js.map +1 -1
  162. package/dist/src/_internal/platform/otel/common/genAiEvents.d.ts.map +1 -1
  163. package/dist/src/_internal/platform/otel/common/genAiEvents.js +10 -2
  164. package/dist/src/_internal/platform/otel/common/genAiEvents.js.map +1 -1
  165. package/dist/src/_internal/platform/otel/common/index.d.ts +1 -1
  166. package/dist/src/_internal/platform/otel/common/index.d.ts.map +1 -1
  167. package/dist/src/_internal/platform/otel/common/index.js +2 -1
  168. package/dist/src/_internal/platform/otel/common/index.js.map +1 -1
  169. package/dist/src/_internal/platform/otel/common/messageFormatters.d.ts +13 -1
  170. package/dist/src/_internal/platform/otel/common/messageFormatters.d.ts.map +1 -1
  171. package/dist/src/_internal/platform/otel/common/messageFormatters.js +98 -0
  172. package/dist/src/_internal/platform/otel/common/messageFormatters.js.map +1 -1
  173. package/dist/src/_internal/platform/requestLogger/common/requestLogger.d.ts +170 -0
  174. package/dist/src/_internal/platform/requestLogger/common/requestLogger.d.ts.map +1 -0
  175. package/dist/src/_internal/platform/requestLogger/common/requestLogger.js +145 -0
  176. package/dist/src/_internal/platform/requestLogger/common/requestLogger.js.map +1 -0
  177. package/dist/src/_internal/platform/requestLogger/node/nullRequestLogger.d.ts +4 -4
  178. package/dist/src/_internal/platform/requestLogger/node/nullRequestLogger.d.ts.map +1 -1
  179. package/dist/src/_internal/platform/requestLogger/node/nullRequestLogger.js +1 -3
  180. package/dist/src/_internal/platform/requestLogger/node/nullRequestLogger.js.map +1 -1
  181. package/dist/src/_internal/platform/requestLogger/node/requestLogger.d.ts +4 -167
  182. package/dist/src/_internal/platform/requestLogger/node/requestLogger.d.ts.map +1 -1
  183. package/dist/src/_internal/platform/requestLogger/node/requestLogger.js +3 -139
  184. package/dist/src/_internal/platform/requestLogger/node/requestLogger.js.map +1 -1
  185. package/dist/src/main.d.ts +2 -0
  186. package/dist/src/main.d.ts.map +1 -1
  187. package/dist/src/main.js +48 -6
  188. package/dist/src/main.js.map +1 -1
  189. package/dist/src/package.json +192 -151
  190. package/package.json +70 -71
  191. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/openai/stream.d.ts +0 -182
  192. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/openai/stream.d.ts.map +0 -1
  193. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/openai/stream.js +0 -558
  194. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/openai/stream.js.map +0 -1
@@ -0,0 +1,19 @@
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.FetchStreamError = void 0;
8
+ /**
9
+ * Typed error thrown when an async line stream is rejected due to a fetch failure.
10
+ * Consumers can catch this to extract the mapped {@link NoNextEditReason}.
11
+ */
12
+ class FetchStreamError extends Error {
13
+ constructor(reason) {
14
+ super('Fetch stream failed');
15
+ this.reason = reason;
16
+ }
17
+ }
18
+ exports.FetchStreamError = FetchStreamError;
19
+ //# sourceMappingURL=fetchStreamError.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fetchStreamError.js","sourceRoot":"","sources":["../../../../../../src/_internal/extension/xtab/common/fetchStreamError.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;AAIhG;;;GAGG;AACH,MAAa,gBAAiB,SAAQ,KAAK;IAC1C,YAAqB,MAAwB;QAC5C,KAAK,CAAC,qBAAqB,CAAC,CAAC;QADT,WAAM,GAAN,MAAM,CAAkB;IAE7C,CAAC;CACD;AAJD,4CAIC"}
@@ -0,0 +1,44 @@
1
+ import { StringEdit } from '../../../util/vs/editor/common/core/edits/stringEdit';
2
+ import { PositionOffsetTransformer } from '../../../util/vs/editor/common/core/text/positionToOffset';
3
+ /**
4
+ * Resolves the current content of a line after applying an intermediate
5
+ * user edit to the original document.
6
+ *
7
+ * The line's 0-based index in the original document may no longer be
8
+ * valid after the user inserts or deletes lines above it. This function
9
+ * maps the line's character offset through the edit to find the correct
10
+ * line in the resulting document.
11
+ *
12
+ * @param originalDoc A transformer for the original document text (reused to
13
+ * avoid recomputing line offsets).
14
+ * @param docLineIdx 0-based line index in the original document.
15
+ * @returns The line content, or `undefined` if the line index is out of
16
+ * bounds or the original position falls inside a replacement range
17
+ * (making the mapping ambiguous).
18
+ */
19
+ export declare function getCurrentLine(originalDoc: PositionOffsetTransformer, docLineIdx: number, intermediateEdit: StringEdit, precomputed?: {
20
+ currentDoc: string;
21
+ currentTransformer: PositionOffsetTransformer;
22
+ }): string | undefined;
23
+ /**
24
+ * Checks whether the model's line output is compatible with what the user
25
+ * has typed since the request started.
26
+ *
27
+ * Algorithm:
28
+ * 1. Diff original → current to find what the user typed.
29
+ * 2. Diff original → model to find what the model changed.
30
+ * 3. If the user's edit range falls within the model's edit range, check whether
31
+ * the model's new text is a continuation of the user's typing.
32
+ *
33
+ * @example
34
+ * original: `function fi`, current: `function fib`, model: `function fibonacci(n): number`
35
+ * → user typed "b", model inserted "bonacci(n): number"
36
+ * → model text starts with "b" → compatible ✓
37
+ *
38
+ * @example
39
+ * original: `function fi`, current: `function fix`, model: `function fibonacci(n): number`
40
+ * → user typed "x", model inserted "bonacci(n): number"
41
+ * → model text does not start with "x" → incompatible ✗
42
+ */
43
+ export declare function isModelLineCompatible(originalLine: string, currentLine: string, modelLine: string): boolean;
44
+ //# sourceMappingURL=cursorLineDivergence.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cursorLineDivergence.d.ts","sourceRoot":"","sources":["../../../../../../src/_internal/extension/xtab/node/cursorLineDivergence.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,sDAAsD,CAAC;AAElF,OAAO,EAAE,yBAAyB,EAAE,MAAM,2DAA2D,CAAC;AAEtG;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,cAAc,CAC7B,WAAW,EAAE,yBAAyB,EACtC,UAAU,EAAE,MAAM,EAClB,gBAAgB,EAAE,UAAU,EAC5B,WAAW,CAAC,EAAE;IAAE,UAAU,EAAE,MAAM,CAAC;IAAC,kBAAkB,EAAE,yBAAyB,CAAA;CAAE,GACjF,MAAM,GAAG,SAAS,CAmCpB;AAuCD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,qBAAqB,CAAC,YAAY,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAoB3G"}
@@ -0,0 +1,181 @@
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.getCurrentLine = getCurrentLine;
8
+ exports.isModelLineCompatible = isModelLineCompatible;
9
+ const position_1 = require("../../../util/vs/editor/common/core/position");
10
+ const positionToOffset_1 = require("../../../util/vs/editor/common/core/text/positionToOffset");
11
+ /**
12
+ * Resolves the current content of a line after applying an intermediate
13
+ * user edit to the original document.
14
+ *
15
+ * The line's 0-based index in the original document may no longer be
16
+ * valid after the user inserts or deletes lines above it. This function
17
+ * maps the line's character offset through the edit to find the correct
18
+ * line in the resulting document.
19
+ *
20
+ * @param originalDoc A transformer for the original document text (reused to
21
+ * avoid recomputing line offsets).
22
+ * @param docLineIdx 0-based line index in the original document.
23
+ * @returns The line content, or `undefined` if the line index is out of
24
+ * bounds or the original position falls inside a replacement range
25
+ * (making the mapping ambiguous).
26
+ */
27
+ function getCurrentLine(originalDoc, docLineIdx, intermediateEdit, precomputed) {
28
+ const lineNumber = docLineIdx + 1; // 1-based
29
+ const lineCount = originalDoc.textLength.lineCount + 1;
30
+ if (lineNumber < 1 || lineNumber > lineCount) {
31
+ return undefined;
32
+ }
33
+ const lineStartOffset = originalDoc.getOffset(new position_1.Position(lineNumber, 1));
34
+ // Walk through the edit's replacements (sorted, non-overlapping) and
35
+ // accumulate the character-offset delta for replacements entirely before
36
+ // the line start.
37
+ let delta = 0;
38
+ for (const replacement of intermediateEdit.replacements) {
39
+ if (replacement.replaceRange.endExclusive <= lineStartOffset) {
40
+ delta += replacement.newText.length - replacement.replaceRange.length;
41
+ }
42
+ else if (replacement.replaceRange.start < lineStartOffset) {
43
+ // The line start falls inside a replacement — ambiguous.
44
+ return undefined;
45
+ }
46
+ else {
47
+ break;
48
+ }
49
+ }
50
+ const mappedOffset = lineStartOffset + delta;
51
+ const currentDoc = precomputed?.currentDoc ?? intermediateEdit.apply(originalDoc.text);
52
+ const currentTransformer = precomputed?.currentTransformer ?? new positionToOffset_1.PositionOffsetTransformer(currentDoc);
53
+ // Map the offset back to a position in the current document, then extract
54
+ // the full line content.
55
+ const currentPos = currentTransformer.getPosition(mappedOffset);
56
+ const lineStart = currentTransformer.getOffset(new position_1.Position(currentPos.lineNumber, 1));
57
+ const lineLen = currentTransformer.getLineLength(currentPos.lineNumber);
58
+ return currentDoc.substring(lineStart, lineStart + lineLen);
59
+ }
60
+ /**
61
+ * Computes the minimal edit between two versions of the same line by stripping
62
+ * the longest common prefix and suffix.
63
+ *
64
+ * Example: `diffLine("function fi", "function fib")`
65
+ * → `{ startOffset: 11, endOffset: 11, replaced: "", inserted: "b" }`
66
+ */
67
+ function diffLine(before, after) {
68
+ let prefixLen = 0;
69
+ while (prefixLen < before.length && prefixLen < after.length
70
+ && before[prefixLen] === after[prefixLen]) {
71
+ prefixLen++;
72
+ }
73
+ let suffixLen = 0;
74
+ while (suffixLen < before.length - prefixLen && suffixLen < after.length - prefixLen
75
+ && before[before.length - 1 - suffixLen] === after[after.length - 1 - suffixLen]) {
76
+ suffixLen++;
77
+ }
78
+ return {
79
+ startOffset: prefixLen,
80
+ endOffset: before.length - suffixLen,
81
+ replaced: before.substring(prefixLen, before.length - suffixLen),
82
+ inserted: after.substring(prefixLen, after.length - suffixLen),
83
+ };
84
+ }
85
+ /**
86
+ * Checks whether the model's line output is compatible with what the user
87
+ * has typed since the request started.
88
+ *
89
+ * Algorithm:
90
+ * 1. Diff original → current to find what the user typed.
91
+ * 2. Diff original → model to find what the model changed.
92
+ * 3. If the user's edit range falls within the model's edit range, check whether
93
+ * the model's new text is a continuation of the user's typing.
94
+ *
95
+ * @example
96
+ * original: `function fi`, current: `function fib`, model: `function fibonacci(n): number`
97
+ * → user typed "b", model inserted "bonacci(n): number"
98
+ * → model text starts with "b" → compatible ✓
99
+ *
100
+ * @example
101
+ * original: `function fi`, current: `function fix`, model: `function fibonacci(n): number`
102
+ * → user typed "x", model inserted "bonacci(n): number"
103
+ * → model text does not start with "x" → incompatible ✗
104
+ */
105
+ function isModelLineCompatible(originalLine, currentLine, modelLine) {
106
+ const userEdit = diffLine(originalLine, currentLine);
107
+ const modelEdit = diffLine(originalLine, modelLine);
108
+ // No actual user change — trivially compatible.
109
+ if (userEdit.replaced.length === 0 && userEdit.inserted.length === 0) {
110
+ return true;
111
+ }
112
+ // The user's edit range must fall within the model's edit range.
113
+ // If the user edited a region the model didn't touch, we can't determine
114
+ // compatibility from the line alone.
115
+ const userEditWithinModelEdit = userEdit.startOffset >= modelEdit.startOffset
116
+ && userEdit.endOffset <= modelEdit.endOffset;
117
+ if (!userEditWithinModelEdit) {
118
+ return false;
119
+ }
120
+ return isUserEditCompatibleWithModelEdit(userEdit, modelEdit, currentLine, modelLine);
121
+ }
122
+ const AUTO_CLOSE_PAIRS = new Set(['()', '[]', '{}', '<>', '""', `''`, '``']);
123
+ /**
124
+ * Checks whether the user's edit is compatible with the model's edit.
125
+ *
126
+ * For pure insertions, compatibility is determined by whether the model is
127
+ * continuing the user's inserted text.
128
+ *
129
+ * For deletions and replacements, avoid treating an empty inserted string as
130
+ * universally compatible. In those cases, only accept when the resulting line
131
+ * already matches the model, or when the model is editing the exact same range
132
+ * and replacing the exact same original text with a compatible continuation.
133
+ */
134
+ function isUserEditCompatibleWithModelEdit(userEdit, modelEdit, currentLine, modelLine) {
135
+ if (userEdit.replaced.length > 0) {
136
+ if (currentLine === modelLine) {
137
+ return true;
138
+ }
139
+ return userEdit.startOffset === modelEdit.startOffset
140
+ && userEdit.endOffset === modelEdit.endOffset
141
+ && userEdit.replaced === modelEdit.replaced
142
+ && userEdit.inserted.length > 0
143
+ && isUserTypingCompatibleWithModelText(userEdit.inserted, modelEdit.inserted);
144
+ }
145
+ return isUserTypingCompatibleWithModelText(userEdit.inserted, modelEdit.inserted);
146
+ }
147
+ /**
148
+ * Checks whether the user's typed text is compatible with the model's new text.
149
+ *
150
+ * Rules:
151
+ * 1. The model's new text must **start with** the user's typed text — the model
152
+ * is continuing what the user began.
153
+ * 2. If the user's text is a known auto-close pair (e.g. `()`, `{}`), accept
154
+ * if both characters appear in order in the model's text (subsequence match).
155
+ */
156
+ function isUserTypingCompatibleWithModelText(userTypedText, modelNewText) {
157
+ if (modelNewText.startsWith(userTypedText)) {
158
+ return true;
159
+ }
160
+ // Subsequence check for auto-close pairs: if the user typed e.g. "()" and the
161
+ // model's text is "(x, y)", the pair characters appear in order.
162
+ if (AUTO_CLOSE_PAIRS.has(userTypedText)) {
163
+ return isSubsequenceOf(userTypedText, modelNewText);
164
+ }
165
+ return false;
166
+ }
167
+ /**
168
+ * Returns true if every character of `subsequence` appears in `str` in order.
169
+ */
170
+ function isSubsequenceOf(subsequence, str) {
171
+ let si = 0;
172
+ for (let ti = 0; ti < subsequence.length; ti++) {
173
+ const idx = str.indexOf(subsequence[ti], si);
174
+ if (idx === -1) {
175
+ return false;
176
+ }
177
+ si = idx + 1;
178
+ }
179
+ return true;
180
+ }
181
+ //# sourceMappingURL=cursorLineDivergence.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cursorLineDivergence.js","sourceRoot":"","sources":["../../../../../../src/_internal/extension/xtab/node/cursorLineDivergence.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;AAsBhG,wCAwCC;AA2DD,sDAoBC;AA1ID,2EAAwE;AACxE,gGAAsG;AAEtG;;;;;;;;;;;;;;;GAeG;AACH,SAAgB,cAAc,CAC7B,WAAsC,EACtC,UAAkB,EAClB,gBAA4B,EAC5B,WAAmF;IAEnF,MAAM,UAAU,GAAG,UAAU,GAAG,CAAC,CAAC,CAAC,UAAU;IAC7C,MAAM,SAAS,GAAG,WAAW,CAAC,UAAU,CAAC,SAAS,GAAG,CAAC,CAAC;IAEvD,IAAI,UAAU,GAAG,CAAC,IAAI,UAAU,GAAG,SAAS,EAAE,CAAC;QAC9C,OAAO,SAAS,CAAC;IAClB,CAAC;IAED,MAAM,eAAe,GAAG,WAAW,CAAC,SAAS,CAAC,IAAI,mBAAQ,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC,CAAC;IAE3E,qEAAqE;IACrE,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BAAgB,CAAC,GAAG,CAAC,aAAa,CAAC,EAAE,CAAC;QACzC,OAAO,eAAe,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC;IACrD,CAAC;IAED,OAAO,KAAK,CAAC;AACd,CAAC;AAED;;GAEG;AACH,SAAS,eAAe,CAAC,WAAmB,EAAE,GAAW;IACxD,IAAI,EAAE,GAAG,CAAC,CAAC;IACX,KAAK,IAAI,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,WAAW,CAAC,MAAM,EAAE,EAAE,EAAE,EAAE,CAAC;QAChD,MAAM,GAAG,GAAG,GAAG,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;QAC7C,IAAI,GAAG,KAAK,CAAC,CAAC,EAAE,CAAC;YAChB,OAAO,KAAK,CAAC;QACd,CAAC;QACD,EAAE,GAAG,GAAG,GAAG,CAAC,CAAC;IACd,CAAC;IACD,OAAO,IAAI,CAAC;AACb,CAAC"}
@@ -0,0 +1,31 @@
1
+ import * as xtabPromptOptions from '../../../platform/inlineEdits/common/dataTypes/xtabPromptOptions';
2
+ import { ILogger } from '../../../platform/log/common/logService';
3
+ export interface ParseEditIntentResult {
4
+ editIntent: xtabPromptOptions.EditIntent;
5
+ remainingLinesStream: AsyncIterable<string>;
6
+ parseError?: string;
7
+ }
8
+ /**
9
+ * Mode for parsing edit intent from the model response.
10
+ */
11
+ export declare enum EditIntentParseMode {
12
+ /** Parse using XML-style tags: <|edit_intent|>value<|/edit_intent|> */
13
+ Tags = "tags",
14
+ /** Parse using short names on the first line: N|L|M|H */
15
+ ShortName = "shortName"
16
+ }
17
+ /**
18
+ * Parses the edit_intent from the first line of the response stream.
19
+ * The edit_intent MUST be on the first line, otherwise it's treated as not provided.
20
+ * Returns the parsed EditIntent and a new stream with the remaining content.
21
+ *
22
+ * Supports two modes:
23
+ * - Tags (default): <|edit_intent|>low|medium|high|no_edit<|/edit_intent|>
24
+ * - ShortName: N|L|M|H on the first line
25
+ *
26
+ * @param linesStream The stream of lines from the model response
27
+ * @param tracer Logger for tracing
28
+ * @param mode The parse mode (Tags or ShortName), defaults to Tags
29
+ */
30
+ export declare function parseEditIntentFromStream(linesStream: AsyncIterable<string>, tracer: ILogger, mode?: EditIntentParseMode): Promise<ParseEditIntentResult>;
31
+ //# sourceMappingURL=editIntent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editIntent.d.ts","sourceRoot":"","sources":["../../../../../../src/_internal/extension/xtab/node/editIntent.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,iBAAiB,MAAM,kEAAkE,CAAC;AACtG,OAAO,EAAE,OAAO,EAAE,MAAM,yCAAyC,CAAC;AAElE,MAAM,WAAW,qBAAqB;IACrC,UAAU,EAAE,iBAAiB,CAAC,UAAU,CAAC;IACzC,oBAAoB,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAC5C,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB;AACD;;GAEG;AAEH,oBAAY,mBAAmB;IAC9B,uEAAuE;IACvE,IAAI,SAAS;IACb,yDAAyD;IACzD,SAAS,cAAc;CACvB;AACD;;;;;;;;;;;;GAYG;AAEH,wBAAsB,yBAAyB,CAC9C,WAAW,EAAE,aAAa,CAAC,MAAM,CAAC,EAClC,MAAM,EAAE,OAAO,EACf,IAAI,GAAE,mBAA8C,GAClD,OAAO,CAAC,qBAAqB,CAAC,CAMhC"}
@@ -0,0 +1,193 @@
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
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
7
+ if (k2 === undefined) k2 = k;
8
+ var desc = Object.getOwnPropertyDescriptor(m, k);
9
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
10
+ desc = { enumerable: true, get: function() { return m[k]; } };
11
+ }
12
+ Object.defineProperty(o, k2, desc);
13
+ }) : (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ o[k2] = m[k];
16
+ }));
17
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
18
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
19
+ }) : function(o, v) {
20
+ o["default"] = v;
21
+ });
22
+ var __importStar = (this && this.__importStar) || (function () {
23
+ var ownKeys = function(o) {
24
+ ownKeys = Object.getOwnPropertyNames || function (o) {
25
+ var ar = [];
26
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
27
+ return ar;
28
+ };
29
+ return ownKeys(o);
30
+ };
31
+ return function (mod) {
32
+ if (mod && mod.__esModule) return mod;
33
+ var result = {};
34
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
35
+ __setModuleDefault(result, mod);
36
+ return result;
37
+ };
38
+ })();
39
+ Object.defineProperty(exports, "__esModule", { value: true });
40
+ exports.EditIntentParseMode = void 0;
41
+ exports.parseEditIntentFromStream = parseEditIntentFromStream;
42
+ const xtabPromptOptions = __importStar(require("../../../platform/inlineEdits/common/dataTypes/xtabPromptOptions"));
43
+ /**
44
+ * Mode for parsing edit intent from the model response.
45
+ */
46
+ var EditIntentParseMode;
47
+ (function (EditIntentParseMode) {
48
+ /** Parse using XML-style tags: <|edit_intent|>value<|/edit_intent|> */
49
+ EditIntentParseMode["Tags"] = "tags";
50
+ /** Parse using short names on the first line: N|L|M|H */
51
+ EditIntentParseMode["ShortName"] = "shortName";
52
+ })(EditIntentParseMode || (exports.EditIntentParseMode = EditIntentParseMode = {}));
53
+ /**
54
+ * Parses the edit_intent from the first line of the response stream.
55
+ * The edit_intent MUST be on the first line, otherwise it's treated as not provided.
56
+ * Returns the parsed EditIntent and a new stream with the remaining content.
57
+ *
58
+ * Supports two modes:
59
+ * - Tags (default): <|edit_intent|>low|medium|high|no_edit<|/edit_intent|>
60
+ * - ShortName: N|L|M|H on the first line
61
+ *
62
+ * @param linesStream The stream of lines from the model response
63
+ * @param tracer Logger for tracing
64
+ * @param mode The parse mode (Tags or ShortName), defaults to Tags
65
+ */
66
+ async function parseEditIntentFromStream(linesStream, tracer, mode = EditIntentParseMode.Tags) {
67
+ if (mode === EditIntentParseMode.ShortName) {
68
+ return parseEditIntentFromStreamShortName(linesStream, tracer);
69
+ }
70
+ return parseEditIntentFromStreamTags(linesStream, tracer);
71
+ }
72
+ /**
73
+ * Parses the edit_intent using short name format (N|L|M|H on first line).
74
+ */
75
+ async function parseEditIntentFromStreamShortName(linesStream, tracer) {
76
+ let editIntent = xtabPromptOptions.EditIntent.High; // Default to high (always show) if no short name found
77
+ let parseError;
78
+ const linesIter = linesStream[Symbol.asyncIterator]();
79
+ const firstLineResult = await linesIter.next();
80
+ if (firstLineResult.done) {
81
+ // Empty stream
82
+ parseError = 'emptyResponse';
83
+ tracer.warn(`Empty response stream, no edit_intent short name found`);
84
+ const remainingLinesStream = (async function* () { })();
85
+ return { editIntent, remainingLinesStream, parseError };
86
+ }
87
+ const firstLine = firstLineResult.value.trim();
88
+ // Check if the first line is a single character short name
89
+ const parsedIntent = xtabPromptOptions.EditIntent.fromShortName(firstLine);
90
+ if (parsedIntent !== undefined) {
91
+ editIntent = parsedIntent;
92
+ tracer.trace(`Parsed edit_intent short name from first line: "${firstLine}" -> ${editIntent}`);
93
+ // Create a new stream with the remaining lines (excluding the short name line)
94
+ const remainingLinesStream = (async function* () {
95
+ let next = await linesIter.next();
96
+ while (!next.done) {
97
+ yield next.value;
98
+ next = await linesIter.next();
99
+ }
100
+ })();
101
+ return { editIntent, remainingLinesStream, parseError };
102
+ }
103
+ // Short name not found or invalid
104
+ parseError = `unknownIntentValue:${firstLine}`;
105
+ tracer.warn(`Edit intent parse error: ${parseError} (using Xtab275EditIntentShort prompting strategy). ` +
106
+ `Defaulting to High (always show). First line was: "${firstLine.substring(0, 100)}..."`);
107
+ // Return the first line plus the rest of the stream
108
+ const remainingLinesStream = (async function* () {
109
+ yield firstLineResult.value; // Use original value, not trimmed
110
+ let next = await linesIter.next();
111
+ while (!next.done) {
112
+ yield next.value;
113
+ next = await linesIter.next();
114
+ }
115
+ })();
116
+ return { editIntent, remainingLinesStream, parseError };
117
+ }
118
+ /**
119
+ * Parses the edit_intent tag from the first line of the response stream (original tag-based format).
120
+ */
121
+ async function parseEditIntentFromStreamTags(linesStream, tracer) {
122
+ const EDIT_INTENT_START_TAG = '<|edit_intent|>';
123
+ const EDIT_INTENT_END_TAG = '<|/edit_intent|>';
124
+ let editIntent = xtabPromptOptions.EditIntent.High; // Default to high (always show) if no tag found
125
+ let parseError;
126
+ const linesIter = linesStream[Symbol.asyncIterator]();
127
+ const firstLineResult = await linesIter.next();
128
+ if (firstLineResult.done) {
129
+ // Empty stream
130
+ parseError = 'emptyResponse';
131
+ tracer.warn(`Empty response stream, no edit_intent tag found`);
132
+ const remainingLinesStream = (async function* () { })();
133
+ return { editIntent, remainingLinesStream, parseError };
134
+ }
135
+ const firstLine = firstLineResult.value;
136
+ // Check if the first line contains the complete edit_intent tag
137
+ const startIdx = firstLine.indexOf(EDIT_INTENT_START_TAG);
138
+ const endIdx = firstLine.indexOf(EDIT_INTENT_END_TAG);
139
+ if (startIdx !== -1 && endIdx !== -1 && endIdx > startIdx) {
140
+ // Found complete tag on first line
141
+ const intentValue = firstLine.substring(startIdx + EDIT_INTENT_START_TAG.length, endIdx).trim().toLowerCase();
142
+ // Check if it's a known intent value
143
+ const knownIntentValues = ['no_edit', 'low', 'medium', 'high'];
144
+ if (!knownIntentValues.includes(intentValue)) {
145
+ parseError = `unknownIntentValue:${intentValue}`;
146
+ tracer.warn(`Unknown edit_intent value: "${intentValue}", defaulting to High`);
147
+ }
148
+ editIntent = xtabPromptOptions.EditIntent.fromString(intentValue);
149
+ tracer.trace(`Parsed edit_intent from first line: "${intentValue}" -> ${editIntent}`);
150
+ // Calculate remaining content after the end tag on the first line
151
+ const afterEndTag = firstLine.substring(endIdx + EDIT_INTENT_END_TAG.length);
152
+ // Create a new stream that first yields remaining content from first line, then continues
153
+ const remainingLinesStream = (async function* () {
154
+ // Only yield remaining content from first line if non-empty
155
+ if (afterEndTag.trim() !== '') {
156
+ yield afterEndTag;
157
+ }
158
+ // Continue with rest of the stream
159
+ let next = await linesIter.next();
160
+ while (!next.done) {
161
+ yield next.value;
162
+ next = await linesIter.next();
163
+ }
164
+ })();
165
+ return { editIntent, remainingLinesStream, parseError };
166
+ }
167
+ // Determine the parse error type
168
+ if (startIdx !== -1 && endIdx === -1) {
169
+ // Start tag found but no end tag - malformed (possibly split across lines)
170
+ parseError = 'malformedTag:startWithoutEnd';
171
+ }
172
+ else if (startIdx === -1 && endIdx !== -1) {
173
+ // End tag found but no start tag - malformed
174
+ parseError = 'malformedTag:endWithoutStart';
175
+ }
176
+ else {
177
+ // No tag found at all
178
+ parseError = 'noTagFound';
179
+ }
180
+ tracer.warn(`Edit intent parse error: ${parseError} (using Xtab275EditIntent prompting strategy). ` +
181
+ `Defaulting to High (always show). First line was: "${firstLine.substring(0, 100)}..."`);
182
+ // Return the first line plus the rest of the stream
183
+ const remainingLinesStream = (async function* () {
184
+ yield firstLine;
185
+ let next = await linesIter.next();
186
+ while (!next.done) {
187
+ yield next.value;
188
+ next = await linesIter.next();
189
+ }
190
+ })();
191
+ return { editIntent, remainingLinesStream, parseError };
192
+ }
193
+ //# sourceMappingURL=editIntent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editIntent.js","sourceRoot":"","sources":["../../../../../../src/_internal/extension/xtab/node/editIntent.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkChG,8DAUC;AA1CD,oHAAsG;AAQtG;;GAEG;AAEH,IAAY,mBAKX;AALD,WAAY,mBAAmB;IAC9B,uEAAuE;IACvE,oCAAa,CAAA;IACb,yDAA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;QAClG,sDAAsD,SAAS,CAAC,SAAS,CAAC,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IAE1F,oDAAoD;IACpD,MAAM,oBAAoB,GAA0B,CAAC,KAAK,SAAS,CAAC;QACnE,MAAM,SAAS,CAAC;QAChB,IAAI,IAAI,GAAG,MAAM,SAAS,CAAC,IAAI,EAAE,CAAC;QAClC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC;YACnB,MAAM,IAAI,CAAC,KAAK,CAAC;YACjB,IAAI,GAAG,MAAM,SAAS,CAAC,IAAI,EAAE,CAAC;QAC/B,CAAC;IACF,CAAC,CAAC,EAAE,CAAC;IAEL,OAAO,EAAE,UAAU,EAAE,oBAAoB,EAAE,UAAU,EAAE,CAAC;AACzD,CAAC"}
@@ -0,0 +1,52 @@
1
+ import { DocumentId } from '../../../platform/inlineEdits/common/dataTypes/documentId';
2
+ import * as xtabPromptOptions from '../../../platform/inlineEdits/common/dataTypes/xtabPromptOptions';
3
+ import { NoNextEditReason, StreamedEdit } from '../../../platform/inlineEdits/common/statelessNextEditProvider';
4
+ import { ILogger } from '../../../platform/log/common/logService';
5
+ import { OffsetRange } from '../../../util/vs/editor/common/core/ranges/offsetRange';
6
+ import { StringText } from '../../../util/vs/editor/common/core/text/abstractText';
7
+ import { EditIntentParseMode } from './editIntent';
8
+ export declare namespace ResponseParseResult {
9
+ interface EditIntentMetadata {
10
+ readonly intent: xtabPromptOptions.EditIntent;
11
+ readonly parseError?: string;
12
+ }
13
+ /**
14
+ * The response contains edit-window lines to be fed into *ResponseProcessor.diff*.
15
+ */
16
+ class EditWindowLines {
17
+ readonly lines: AsyncIterable<string>;
18
+ readonly editIntentMetadata?: EditIntentMetadata | undefined;
19
+ constructor(lines: AsyncIterable<string>, editIntentMetadata?: EditIntentMetadata | undefined);
20
+ }
21
+ /**
22
+ * The handler has finished — no more processing needed. Carries a {@link NoNextEditReason}.
23
+ */
24
+ class Done {
25
+ readonly reason: NoNextEditReason;
26
+ constructor(reason: NoNextEditReason);
27
+ }
28
+ /**
29
+ * The handler yields edits directly (e.g. INSERT or CustomDiffPatch).
30
+ * The coordinator should `yield*` the stream.
31
+ */
32
+ class DirectEdits {
33
+ readonly stream: AsyncGenerator<StreamedEdit, NoNextEditReason, void>;
34
+ constructor(stream: AsyncGenerator<StreamedEdit, NoNextEditReason, void>);
35
+ }
36
+ type t = EditWindowLines | Done | DirectEdits;
37
+ }
38
+ export declare function handleEditWindowOnly(linesStream: AsyncIterable<string>): ResponseParseResult.EditWindowLines;
39
+ export declare function handleCodeBlock(linesStream: AsyncIterable<string>): ResponseParseResult.EditWindowLines;
40
+ export declare function handleEditWindowWithEditIntent(linesStream: AsyncIterable<string>, tracer: ILogger, parseMode: EditIntentParseMode): Promise<ResponseParseResult.EditWindowLines | ResponseParseResult.Done>;
41
+ export interface UnifiedXmlInsertContext {
42
+ readonly editWindowLines: string[];
43
+ readonly editWindowLineRange: OffsetRange;
44
+ readonly cursorOriginalLinesOffset: number;
45
+ readonly cursorColumnZeroBased: number;
46
+ readonly editWindow: OffsetRange;
47
+ readonly originalEditWindow: OffsetRange | undefined;
48
+ readonly targetDocument: DocumentId;
49
+ readonly isFromCursorJump: boolean;
50
+ }
51
+ export declare function handleUnifiedWithXml(linesStream: AsyncIterable<string>, ctx: UnifiedXmlInsertContext, documentBeforeEdits: StringText, tracer: ILogger): Promise<ResponseParseResult.t>;
52
+ //# sourceMappingURL=responseFormatHandlers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"responseFormatHandlers.d.ts","sourceRoot":"","sources":["../../../../../../src/_internal/extension/xtab/node/responseFormatHandlers.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,UAAU,EAAE,MAAM,2DAA2D,CAAC;AACvF,OAAO,KAAK,iBAAiB,MAAM,kEAAkE,CAAC;AACtG,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,gEAAgE,CAAC;AAChH,OAAO,EAAE,OAAO,EAAE,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