@vscode/chat-lib 0.43.2026040705 → 0.44.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 (152) hide show
  1. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/ghostText/completionsFromNetwork.d.ts +1 -5
  2. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/ghostText/completionsFromNetwork.d.ts.map +1 -1
  3. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/ghostText/completionsFromNetwork.js +3 -11
  4. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/ghostText/completionsFromNetwork.js.map +1 -1
  5. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/networking.d.ts +0 -30
  6. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/networking.d.ts.map +1 -1
  7. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/networking.js +4 -82
  8. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/networking.js.map +1 -1
  9. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/openai/fetch.d.ts +2 -10
  10. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/openai/fetch.d.ts.map +1 -1
  11. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/openai/fetch.js +6 -160
  12. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/openai/fetch.js.map +1 -1
  13. package/dist/src/_internal/extension/inlineEdits/node/nextEditCache.d.ts +11 -0
  14. package/dist/src/_internal/extension/inlineEdits/node/nextEditCache.d.ts.map +1 -1
  15. package/dist/src/_internal/extension/inlineEdits/node/nextEditCache.js +21 -3
  16. package/dist/src/_internal/extension/inlineEdits/node/nextEditCache.js.map +1 -1
  17. package/dist/src/_internal/extension/inlineEdits/node/nextEditProvider.d.ts +2 -2
  18. package/dist/src/_internal/extension/inlineEdits/node/nextEditProvider.d.ts.map +1 -1
  19. package/dist/src/_internal/extension/inlineEdits/node/nextEditProvider.js +34 -12
  20. package/dist/src/_internal/extension/inlineEdits/node/nextEditProvider.js.map +1 -1
  21. package/dist/src/_internal/extension/prompt/node/chatMLFetcher.d.ts +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 +22 -15
  24. package/dist/src/_internal/extension/prompt/node/chatMLFetcher.js.map +1 -1
  25. package/dist/src/_internal/extension/prompt/node/chatMLFetcherTelemetry.js +2 -2
  26. package/dist/src/_internal/extension/prompt/node/chatMLFetcherTelemetry.js.map +1 -1
  27. package/dist/src/_internal/extension/xtab/node/cursorLineDivergence.d.ts +41 -0
  28. package/dist/src/_internal/extension/xtab/node/cursorLineDivergence.d.ts.map +1 -0
  29. package/dist/src/_internal/extension/xtab/node/cursorLineDivergence.js +181 -0
  30. package/dist/src/_internal/extension/xtab/node/cursorLineDivergence.js.map +1 -0
  31. package/dist/src/_internal/extension/xtab/node/editIntent.d.ts +31 -0
  32. package/dist/src/_internal/extension/xtab/node/editIntent.d.ts.map +1 -0
  33. package/dist/src/_internal/extension/xtab/node/editIntent.js +193 -0
  34. package/dist/src/_internal/extension/xtab/node/editIntent.js.map +1 -0
  35. package/dist/src/_internal/extension/xtab/node/responseFormatHandlers.d.ts +52 -0
  36. package/dist/src/_internal/extension/xtab/node/responseFormatHandlers.d.ts.map +1 -0
  37. package/dist/src/_internal/extension/xtab/node/responseFormatHandlers.js +159 -0
  38. package/dist/src/_internal/extension/xtab/node/responseFormatHandlers.js.map +1 -0
  39. package/dist/src/_internal/extension/xtab/node/xtabProvider.d.ts +10 -37
  40. package/dist/src/_internal/extension/xtab/node/xtabProvider.d.ts.map +1 -1
  41. package/dist/src/_internal/extension/xtab/node/xtabProvider.js +277 -349
  42. package/dist/src/_internal/extension/xtab/node/xtabProvider.js.map +1 -1
  43. package/dist/src/_internal/extension/xtab/node/xtabUtils.d.ts +10 -0
  44. package/dist/src/_internal/extension/xtab/node/xtabUtils.d.ts.map +1 -1
  45. package/dist/src/_internal/extension/xtab/node/xtabUtils.js +24 -0
  46. package/dist/src/_internal/extension/xtab/node/xtabUtils.js.map +1 -1
  47. package/dist/src/_internal/platform/authentication/common/copilotToken.d.ts +1 -0
  48. package/dist/src/_internal/platform/authentication/common/copilotToken.d.ts.map +1 -1
  49. package/dist/src/_internal/platform/authentication/common/copilotToken.js +3 -0
  50. package/dist/src/_internal/platform/authentication/common/copilotToken.js.map +1 -1
  51. package/dist/src/_internal/platform/chat/common/commonTypes.d.ts.map +1 -1
  52. package/dist/src/_internal/platform/chat/common/commonTypes.js +34 -4
  53. package/dist/src/_internal/platform/chat/common/commonTypes.js.map +1 -1
  54. package/dist/src/_internal/platform/configuration/common/configurationService.d.ts +17 -4
  55. package/dist/src/_internal/platform/configuration/common/configurationService.d.ts.map +1 -1
  56. package/dist/src/_internal/platform/configuration/common/configurationService.js +22 -9
  57. package/dist/src/_internal/platform/configuration/common/configurationService.js.map +1 -1
  58. package/dist/src/_internal/platform/configuration/common/defaultsOnlyConfigurationService.d.ts +1 -1
  59. package/dist/src/_internal/platform/configuration/common/defaultsOnlyConfigurationService.d.ts.map +1 -1
  60. package/dist/src/_internal/platform/configuration/common/defaultsOnlyConfigurationService.js +1 -1
  61. package/dist/src/_internal/platform/configuration/common/defaultsOnlyConfigurationService.js.map +1 -1
  62. package/dist/src/_internal/platform/endpoint/common/chatModelCapabilities.d.ts +20 -0
  63. package/dist/src/_internal/platform/endpoint/common/chatModelCapabilities.d.ts.map +1 -1
  64. package/dist/src/_internal/platform/endpoint/common/chatModelCapabilities.js +45 -1
  65. package/dist/src/_internal/platform/endpoint/common/chatModelCapabilities.js.map +1 -1
  66. package/dist/src/_internal/platform/endpoint/common/endpointProvider.d.ts +2 -0
  67. package/dist/src/_internal/platform/endpoint/common/endpointProvider.d.ts.map +1 -1
  68. package/dist/src/_internal/platform/endpoint/common/endpointProvider.js.map +1 -1
  69. package/dist/src/_internal/platform/endpoint/common/statefulMarkerContainer.d.ts +5 -0
  70. package/dist/src/_internal/platform/endpoint/common/statefulMarkerContainer.d.ts.map +1 -1
  71. package/dist/src/_internal/platform/endpoint/common/statefulMarkerContainer.js +13 -0
  72. package/dist/src/_internal/platform/endpoint/common/statefulMarkerContainer.js.map +1 -1
  73. package/dist/src/_internal/platform/endpoint/node/chatEndpoint.d.ts +3 -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 +14 -14
  76. package/dist/src/_internal/platform/endpoint/node/chatEndpoint.js.map +1 -1
  77. package/dist/src/_internal/platform/endpoint/node/messagesApi.d.ts.map +1 -1
  78. package/dist/src/_internal/platform/endpoint/node/messagesApi.js +28 -12
  79. package/dist/src/_internal/platform/endpoint/node/messagesApi.js.map +1 -1
  80. package/dist/src/_internal/platform/endpoint/node/responsesApi.d.ts +12 -2
  81. package/dist/src/_internal/platform/endpoint/node/responsesApi.d.ts.map +1 -1
  82. package/dist/src/_internal/platform/endpoint/node/responsesApi.js +201 -23
  83. package/dist/src/_internal/platform/endpoint/node/responsesApi.js.map +1 -1
  84. package/dist/src/_internal/platform/git/common/gitService.d.ts +7 -3
  85. package/dist/src/_internal/platform/git/common/gitService.d.ts.map +1 -1
  86. package/dist/src/_internal/platform/git/common/gitService.js.map +1 -1
  87. package/dist/src/_internal/platform/github/common/githubAPI.d.ts +1 -0
  88. package/dist/src/_internal/platform/github/common/githubAPI.d.ts.map +1 -1
  89. package/dist/src/_internal/platform/github/common/githubAPI.js +2 -0
  90. package/dist/src/_internal/platform/github/common/githubAPI.js.map +1 -1
  91. package/dist/src/_internal/platform/github/common/githubService.d.ts +3 -2
  92. package/dist/src/_internal/platform/github/common/githubService.d.ts.map +1 -1
  93. package/dist/src/_internal/platform/github/common/githubService.js.map +1 -1
  94. package/dist/src/_internal/platform/inlineEdits/common/inlineEditLogContext.d.ts +12 -3
  95. package/dist/src/_internal/platform/inlineEdits/common/inlineEditLogContext.d.ts.map +1 -1
  96. package/dist/src/_internal/platform/inlineEdits/common/inlineEditLogContext.js +72 -46
  97. package/dist/src/_internal/platform/inlineEdits/common/inlineEditLogContext.js.map +1 -1
  98. package/dist/src/_internal/platform/inlineEdits/common/utils/utils.d.ts +3 -0
  99. package/dist/src/_internal/platform/inlineEdits/common/utils/utils.d.ts.map +1 -1
  100. package/dist/src/_internal/platform/inlineEdits/common/utils/utils.js +12 -0
  101. package/dist/src/_internal/platform/inlineEdits/common/utils/utils.js.map +1 -1
  102. package/dist/src/_internal/platform/log/common/logService.d.ts +5 -0
  103. package/dist/src/_internal/platform/log/common/logService.d.ts.map +1 -1
  104. package/dist/src/_internal/platform/log/common/logService.js +22 -0
  105. package/dist/src/_internal/platform/log/common/logService.js.map +1 -1
  106. package/dist/src/_internal/platform/nesFetch/node/completionsFetchServiceImpl.d.ts +1 -1
  107. package/dist/src/_internal/platform/nesFetch/node/completionsFetchServiceImpl.d.ts.map +1 -1
  108. package/dist/src/_internal/platform/nesFetch/node/completionsFetchServiceImpl.js +1 -1
  109. package/dist/src/_internal/platform/nesFetch/node/completionsFetchServiceImpl.js.map +1 -1
  110. package/dist/src/_internal/platform/networking/common/anthropic.d.ts +0 -16
  111. package/dist/src/_internal/platform/networking/common/anthropic.d.ts.map +1 -1
  112. package/dist/src/_internal/platform/networking/common/anthropic.js +10 -42
  113. package/dist/src/_internal/platform/networking/common/anthropic.js.map +1 -1
  114. package/dist/src/_internal/platform/networking/common/fetcherService.d.ts +1 -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 +22 -4
  118. package/dist/src/_internal/platform/networking/common/networking.d.ts.map +1 -1
  119. package/dist/src/_internal/platform/networking/common/networking.js.map +1 -1
  120. package/dist/src/_internal/platform/networking/node/chatStream.d.ts +10 -0
  121. package/dist/src/_internal/platform/networking/node/chatStream.d.ts.map +1 -1
  122. package/dist/src/_internal/platform/networking/node/chatStream.js +28 -0
  123. package/dist/src/_internal/platform/networking/node/chatStream.js.map +1 -1
  124. package/dist/src/_internal/platform/networking/node/chatWebSocketManager.d.ts +23 -5
  125. package/dist/src/_internal/platform/networking/node/chatWebSocketManager.d.ts.map +1 -1
  126. package/dist/src/_internal/platform/networking/node/chatWebSocketManager.js +67 -20
  127. package/dist/src/_internal/platform/networking/node/chatWebSocketManager.js.map +1 -1
  128. package/dist/src/_internal/platform/networking/node/chatWebSocketTelemetry.d.ts +15 -1
  129. package/dist/src/_internal/platform/networking/node/chatWebSocketTelemetry.d.ts.map +1 -1
  130. package/dist/src/_internal/platform/networking/node/chatWebSocketTelemetry.js +51 -7
  131. package/dist/src/_internal/platform/networking/node/chatWebSocketTelemetry.js.map +1 -1
  132. package/dist/src/_internal/platform/requestLogger/common/requestLogger.d.ts +171 -0
  133. package/dist/src/_internal/platform/requestLogger/common/requestLogger.d.ts.map +1 -0
  134. package/dist/src/_internal/platform/requestLogger/common/requestLogger.js +145 -0
  135. package/dist/src/_internal/platform/requestLogger/common/requestLogger.js.map +1 -0
  136. package/dist/src/_internal/platform/requestLogger/node/nullRequestLogger.d.ts +2 -1
  137. package/dist/src/_internal/platform/requestLogger/node/nullRequestLogger.d.ts.map +1 -1
  138. package/dist/src/_internal/platform/requestLogger/node/nullRequestLogger.js.map +1 -1
  139. package/dist/src/_internal/platform/requestLogger/node/requestLogger.d.ts +4 -166
  140. package/dist/src/_internal/platform/requestLogger/node/requestLogger.d.ts.map +1 -1
  141. package/dist/src/_internal/platform/requestLogger/node/requestLogger.js +3 -139
  142. package/dist/src/_internal/platform/requestLogger/node/requestLogger.js.map +1 -1
  143. package/dist/src/main.d.ts +2 -0
  144. package/dist/src/main.d.ts.map +1 -1
  145. package/dist/src/main.js +48 -6
  146. package/dist/src/main.js.map +1 -1
  147. package/dist/src/package.json +106 -96
  148. package/package.json +71 -71
  149. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/openai/stream.d.ts +0 -182
  150. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/openai/stream.d.ts.map +0 -1
  151. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/openai/stream.js +0 -558
  152. package/dist/src/_internal/extension/completions-core/vscode-node/lib/src/openai/stream.js.map +0 -1
@@ -1,558 +0,0 @@
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 __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
7
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
8
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
9
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
10
- return c > 3 && r && Object.defineProperty(target, key, r), r;
11
- };
12
- var __param = (this && this.__param) || function (paramIndex, decorator) {
13
- return function (target, key) { decorator(target, key, paramIndex); }
14
- };
15
- var SSEProcessor_1;
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.SSEProcessor = void 0;
18
- exports.splitChunk = splitChunk;
19
- exports.prepareSolutionForReturn = prepareSolutionForReturn;
20
- const copilotAnnotations_1 = require("../../../../../../platform/completions-core/common/openai/copilotAnnotations");
21
- const fetch_1 = require("../../../../../../platform/networking/common/fetch");
22
- const instantiation_1 = require("../../../../../../util/vs/platform/instantiation/common/instantiation");
23
- const logger_1 = require("../logger");
24
- const config_1 = require("./config");
25
- const openai_1 = require("./openai");
26
- const streamChoicesLogger = new logger_1.Logger('streamChoices');
27
- /** Gathers together many chunks of a single completion choice. */
28
- class APIJsonDataStreaming {
29
- constructor() {
30
- this.logprobs = [];
31
- this.top_logprobs = [];
32
- this.text = [];
33
- this.tokens = [];
34
- this.text_offset = [];
35
- this.copilot_annotations = new copilotAnnotations_1.StreamCopilotAnnotations();
36
- this.tool_calls = new StreamingToolCalls();
37
- this.function_call = new StreamingFunctionCall();
38
- this.copilot_references = [];
39
- this.yielded = false;
40
- }
41
- append(choice) {
42
- if (choice.text) {
43
- this.text.push(choice.text);
44
- }
45
- // Role function is not included in the main answer.
46
- if (choice.delta?.content && choice.delta.role !== 'function') {
47
- this.text.push(choice.delta.content);
48
- }
49
- if (choice.logprobs) {
50
- this.tokens.push(choice.logprobs.tokens ?? []);
51
- this.text_offset.push(choice.logprobs.text_offset ?? []);
52
- this.logprobs.push(choice.logprobs.token_logprobs ?? []);
53
- this.top_logprobs.push(choice.logprobs.top_logprobs ?? []);
54
- }
55
- if (choice.copilot_annotations) {
56
- this.copilot_annotations.update(choice.copilot_annotations);
57
- }
58
- if (choice.delta?.copilot_annotations) {
59
- this.copilot_annotations.update(choice.delta.copilot_annotations);
60
- }
61
- if (choice.delta?.tool_calls && choice.delta.tool_calls.length > 0) {
62
- this.tool_calls.update(choice.delta.tool_calls);
63
- }
64
- if (choice.delta?.function_call) {
65
- this.function_call.update(choice.delta.function_call);
66
- }
67
- if (choice?.finish_reason) {
68
- this.finish_reason = choice.finish_reason;
69
- }
70
- }
71
- }
72
- // Given a string of lines separated by one or more newlines, returns complete
73
- // lines and any remaining partial line data. Exported for test only.
74
- function splitChunk(chunk) {
75
- const dataLines = chunk.split('\n');
76
- const newExtra = dataLines.pop(); // will be empty string if chunk ends with "\n"
77
- return [dataLines.filter(line => line !== ''), newExtra];
78
- }
79
- class StreamingToolCall {
80
- constructor() {
81
- this.arguments = [];
82
- }
83
- update(toolCall) {
84
- if (toolCall.id) {
85
- this.id = toolCall.id;
86
- }
87
- if (toolCall.function.name) {
88
- this.name = toolCall.function.name;
89
- }
90
- this.arguments.push(toolCall.function.arguments);
91
- }
92
- }
93
- class StreamingToolCalls {
94
- constructor() {
95
- this.toolCalls = [];
96
- }
97
- update(toolCallsArray) {
98
- toolCallsArray.forEach(toolCall => {
99
- let currentCall = this.toolCalls.length > 0 ? this.toolCalls[this.toolCalls.length - 1] : undefined;
100
- // Create a new tool call if:
101
- // 1. No existing tool calls, OR
102
- // 2. The new tool call has an ID and it's different from the current one
103
- if (!currentCall || (toolCall.id && currentCall.id !== toolCall.id)) {
104
- currentCall = new StreamingToolCall();
105
- this.toolCalls.push(currentCall);
106
- }
107
- currentCall.update(toolCall);
108
- });
109
- }
110
- getToolCalls() {
111
- return this.toolCalls;
112
- }
113
- }
114
- class StreamingFunctionCall {
115
- constructor() {
116
- this.arguments = [];
117
- }
118
- update(functionCall) {
119
- if (functionCall.name) {
120
- this.name = functionCall.name;
121
- }
122
- this.arguments.push(functionCall.arguments);
123
- }
124
- }
125
- /**
126
- * Processes an HTTP request containing what is assumed to be an SSE stream of
127
- * OpenAI API data. Yields a stream of `FinishedCompletion` objects, each as
128
- * soon as it's finished.
129
- */
130
- let SSEProcessor = SSEProcessor_1 = class SSEProcessor {
131
- constructor(expectedNumChoices, response, body, telemetryData, dropCompletionReasons, cancellationToken = undefined, instantiationService, logTarget) {
132
- this.expectedNumChoices = expectedNumChoices;
133
- this.response = response;
134
- this.body = body;
135
- this.telemetryData = telemetryData;
136
- this.dropCompletionReasons = dropCompletionReasons;
137
- this.cancellationToken = cancellationToken;
138
- this.instantiationService = instantiationService;
139
- this.logTarget = logTarget;
140
- this.requestId = (0, fetch_1.getRequestId)(this.response.headers);
141
- this.stats = new ChunkStats();
142
- /**
143
- * A key & value being here means at least one chunk with that choice index
144
- * has been received. A null value means we've already finished the given
145
- * solution and should not process incoming tokens further.
146
- */
147
- this.solutions = {};
148
- }
149
- /**
150
- * Creates a new instance of SSEProcessor.
151
- *
152
- * Supports dropping completions with specific finish reasons.
153
- * Historically, this was used to drop RAI ('content_filter') completions, instead of showing partially finished completions to the user. We've gone back and forth on this.
154
- */
155
- static async create(accessor, expectedNumChoices, response, telemetryData, dropCompletionReasons, cancellationToken) {
156
- const instantiationService = accessor.get(instantiation_1.IInstantiationService);
157
- const logTargetService = accessor.get(logger_1.ICompletionsLogTargetService);
158
- const body = response.body.pipeThrough(new TextDecoderStream());
159
- // TODO@benibenj can we switch to our SSEProcessor implementation?
160
- // It seems like they build more on top of the shared impl
161
- // I made this function async and commented out the web ReadableStream approach
162
- return new SSEProcessor_1(expectedNumChoices, response, body, telemetryData, dropCompletionReasons ?? [], cancellationToken, instantiationService, logTargetService);
163
- }
164
- /**
165
- * Yields finished completions as soon as they are available. The finishedCb
166
- * is used to determine when a completion is done and should be truncated.
167
- * It is called on the whole of the received solution text, once at the end
168
- * of the completion (if it stops by itself) and also on any chunk that has
169
- * a newline in it.
170
- *
171
- * Closes the server request stream when all choices are finished/truncated.
172
- *
173
- * Note that for this to work, the caller must consume the entire stream.
174
- * This happens automatically when using a `for await` loop, but when
175
- * iterating manually this needs to be done by calling `.next()` until it
176
- * returns an item with done = true (or calling `.return()`).
177
- */
178
- async *processSSE(finishedCb = () => undefined) {
179
- try {
180
- yield* this.processSSEInner(finishedCb);
181
- }
182
- finally {
183
- await this.cancel();
184
- streamChoicesLogger.debug(this.logTarget, `request done: headerRequestId: [${this.requestId.headerRequestId}] model deployment ID: [${this.requestId.deploymentId}]`);
185
- streamChoicesLogger.debug(this.logTarget, 'request stats:', this.stats);
186
- }
187
- }
188
- async *processSSEInner(finishedCb) {
189
- // Collects pieces of the SSE stream that haven't been fully processed
190
- // yet.
191
- let extraData = '';
192
- let currentFinishReason = null;
193
- let model;
194
- let usage;
195
- // Iterate over arbitrarily sized chunks coming in from the network.
196
- networkRead: for await (const chunk of this.body) {
197
- if (await this.maybeCancel('after awaiting body chunk')) {
198
- return;
199
- }
200
- streamChoicesLogger.debug(this.logTarget, 'chunk', chunk.toString());
201
- const [dataLines, remainder] = splitChunk(extraData + chunk.toString());
202
- extraData = remainder;
203
- // Each dataLine is complete since we've seen at least one \n after
204
- // it.
205
- for (const dataLine of dataLines) {
206
- const lineWithoutData = dataLine.slice('data:'.length).trim();
207
- if (lineWithoutData === '[DONE]') {
208
- yield* this.finishSolutions(currentFinishReason, model, usage, finishedCb);
209
- return;
210
- }
211
- // If this is not a DONE line, we reset the finish reason.
212
- currentFinishReason = null;
213
- let json;
214
- try {
215
- json = JSON.parse(lineWithoutData);
216
- }
217
- catch (e) {
218
- streamChoicesLogger.error(this.logTarget, 'Error parsing JSON stream data', dataLine);
219
- continue;
220
- }
221
- // A message with a confirmation may or may not have 'choices'
222
- if (json.copilot_confirmation && isCopilotConfirmation(json.copilot_confirmation)) {
223
- await finishedCb('', {
224
- text: '',
225
- requestId: this.requestId,
226
- copilotConfirmation: json.copilot_confirmation,
227
- });
228
- }
229
- // we do not process the data from role=function right now because copilot_references seem to contain the same data in a more structured way
230
- if (json.copilot_references) {
231
- await finishedCb('', {
232
- text: '',
233
- requestId: this.requestId,
234
- copilotReferences: json.copilot_references,
235
- });
236
- }
237
- if (json.choices === undefined) {
238
- if (!json.copilot_references && !json.copilot_confirmation) {
239
- if (json.error !== undefined) {
240
- streamChoicesLogger.error(this.logTarget, 'Error in response:', json.error.message);
241
- }
242
- else {
243
- streamChoicesLogger.error(this.logTarget, 'Unexpected response with no choices or error: ' + lineWithoutData);
244
- }
245
- }
246
- // There are also messages with a null 'choices' that include copilot_errors- report these
247
- if (json.copilot_errors) {
248
- await finishedCb('', { text: '', requestId: this.requestId, copilotErrors: json.copilot_errors });
249
- }
250
- continue;
251
- }
252
- if (model === undefined && json.model) {
253
- model = json.model;
254
- }
255
- if (usage === undefined && json.usage) {
256
- usage = json.usage;
257
- }
258
- if (this.allSolutionsDone()) {
259
- // discard any extra data; there's no need to log it as an error
260
- extraData = '';
261
- break networkRead;
262
- }
263
- for (let i = 0; i < json.choices?.length; i++) {
264
- const choice = json.choices[i];
265
- streamChoicesLogger.debug(this.logTarget, 'choice', choice);
266
- this.stats.add(choice.index);
267
- if (!(choice.index in this.solutions)) {
268
- this.solutions[choice.index] = new APIJsonDataStreaming();
269
- }
270
- const solution = this.solutions[choice.index];
271
- if (solution === null) {
272
- continue; // already finished
273
- }
274
- solution.append(choice);
275
- // Call finishedCb after each newline token to determine
276
- // if the solution is now complete. Also call it if the
277
- // solution has finished to make sure it's properly truncated.
278
- let decision = this.asSolutionDecision();
279
- const hasNewLine = choice.text?.indexOf('\n') > -1 || choice.delta?.content?.indexOf('\n') > -1;
280
- if (choice.finish_reason || hasNewLine) {
281
- const text = solution.text.join('');
282
- decision = this.asSolutionDecision(await finishedCb(text, {
283
- text,
284
- index: choice.index,
285
- requestId: this.requestId,
286
- annotations: solution.copilot_annotations,
287
- copilotReferences: solution.copilot_references,
288
- getAPIJsonData: () => convertToAPIJsonData(solution),
289
- finished: choice.finish_reason ? true : false,
290
- telemetryData: this.telemetryData,
291
- }));
292
- if (await this.maybeCancel('after awaiting finishedCb')) {
293
- return;
294
- }
295
- }
296
- /**
297
- * If this is a function call and we have a finish reason, continue to the next choice.
298
- * This is because of how extensibility platform agents work, where multiple finish reasons can be returned.
299
- *
300
- * This should be updated to tools in the future.
301
- */
302
- if (choice.finish_reason && solution.function_call.name !== undefined) {
303
- currentFinishReason = choice.finish_reason;
304
- continue;
305
- }
306
- if (choice.finish_reason) {
307
- decision.yieldSolution = true;
308
- decision.continueStreaming = false;
309
- }
310
- if (!decision.yieldSolution) {
311
- continue;
312
- }
313
- // NOTE: When there is a finish_reason the text of subsequent chunks is always '',
314
- // (current chunk might still have useful text, that is why we add it above).
315
- // So we know that we already got all the text to be displayed for the user.
316
- // TODO: This might contain additional logprobs for excluded next tokens. We should
317
- // filter out indices that correspond to excluded tokens. It will not affect the
318
- // text though.
319
- const loggedReason = choice.finish_reason ?? 'client-trimmed';
320
- streamChoicesLogger.debug(this.logTarget, 'completion.finishReason', this.telemetryData.extendedBy({
321
- completionChoiceFinishReason: loggedReason,
322
- engineName: model ?? '',
323
- engineChoiceSource: this.instantiationService.invokeFunction(config_1.getEngineRequestInfo, this.telemetryData).engineChoiceSource,
324
- }));
325
- if (this.dropCompletionReasons.includes(choice.finish_reason)) {
326
- // In this case we drop the choice on the floor.
327
- this.solutions[choice.index] = null;
328
- }
329
- else if (!solution.yielded) {
330
- this.stats.markYielded(choice.index);
331
- yield {
332
- solution,
333
- finishOffset: decision.finishOffset,
334
- reason: choice.finish_reason,
335
- requestId: this.requestId,
336
- index: choice.index,
337
- model: model,
338
- usage: usage,
339
- };
340
- solution.yielded = true;
341
- }
342
- if (await this.maybeCancel('after yielding finished choice')) {
343
- return;
344
- }
345
- if (!decision.continueStreaming) {
346
- this.solutions[choice.index] = null;
347
- }
348
- }
349
- }
350
- }
351
- // Yield whatever solutions remain incomplete in case no [DONE] was received.
352
- // This shouldn't happen in practice unless there was an error somewhere.
353
- for (const [index, solution] of Object.entries(this.solutions)) {
354
- const solutionIndex = Number(index); // Convert `index` from string to number
355
- if (solution === null) {
356
- continue; // already finished
357
- }
358
- streamChoicesLogger.debug(this.logTarget, 'completion.finishReason', this.telemetryData.extendedBy({
359
- completionChoiceFinishReason: 'Iteration Done',
360
- engineName: model ?? '',
361
- }));
362
- this.stats.markYielded(solutionIndex);
363
- yield {
364
- solution,
365
- finishOffset: undefined,
366
- reason: 'Iteration Done',
367
- requestId: this.requestId,
368
- index: solutionIndex,
369
- model: model,
370
- usage: usage,
371
- };
372
- if (await this.maybeCancel('after yielding after iteration done')) {
373
- return;
374
- }
375
- }
376
- // Error message can be present in `extraData`
377
- if (extraData.length > 0) {
378
- try {
379
- const extraDataJson = JSON.parse(extraData);
380
- if (extraDataJson.error !== undefined) {
381
- streamChoicesLogger.error(this.logTarget, `Error in response: ${extraDataJson.error.message}`, extraDataJson.error);
382
- }
383
- }
384
- catch (e) {
385
- streamChoicesLogger.error(this.logTarget, `Error parsing extraData: ${extraData}`);
386
- }
387
- }
388
- }
389
- asSolutionDecision(result) {
390
- if (result === undefined) {
391
- return {
392
- yieldSolution: false,
393
- continueStreaming: true,
394
- };
395
- }
396
- else if (typeof result === 'number') {
397
- return {
398
- yieldSolution: true,
399
- continueStreaming: false,
400
- finishOffset: result,
401
- };
402
- }
403
- return result;
404
- }
405
- /** Yields the solutions that weren't yet finished, with a 'DONE' reason. */
406
- async *finishSolutions(currentFinishReason, model, usage, finishedCb) {
407
- for (const [index, solution] of Object.entries(this.solutions)) {
408
- const solutionIndex = Number(index); // Convert `index` from string to number
409
- if (solution === null) {
410
- continue; // already finished
411
- }
412
- // ensure the callback receives the final result
413
- const text = solution.text.join('');
414
- await finishedCb(text, {
415
- text,
416
- index: solutionIndex,
417
- requestId: this.requestId,
418
- annotations: solution.copilot_annotations,
419
- copilotReferences: solution.copilot_references,
420
- getAPIJsonData: () => convertToAPIJsonData(solution), // observation from @ulugbekna: this conversion will make `finishReason` for this object 'stop' while we're yielding with 'DONE' below
421
- finished: true,
422
- telemetryData: this.telemetryData,
423
- });
424
- if (solution.yielded) {
425
- continue; // already produced
426
- }
427
- this.stats.markYielded(solutionIndex);
428
- streamChoicesLogger.debug(this.logTarget, 'completion.finishReason', this.telemetryData.extendedBy({
429
- completionChoiceFinishReason: currentFinishReason ?? 'DONE',
430
- engineName: model ?? '',
431
- }));
432
- yield {
433
- solution,
434
- finishOffset: undefined,
435
- reason: currentFinishReason ?? 'DONE',
436
- requestId: this.requestId,
437
- index: solutionIndex,
438
- model: model,
439
- usage: usage,
440
- };
441
- if (await this.maybeCancel('after yielding on DONE')) {
442
- return;
443
- }
444
- }
445
- }
446
- /**
447
- * Returns whether the cancellation token was cancelled and closes the
448
- * stream if it was.
449
- */
450
- async maybeCancel(description) {
451
- if (this.cancellationToken?.isCancellationRequested) {
452
- streamChoicesLogger.debug(this.logTarget, 'Cancelled: ' + description);
453
- await this.cancel();
454
- return true;
455
- }
456
- return false;
457
- }
458
- /** Cancels the network request to the proxy. */
459
- async cancel() {
460
- await this.body.destroy();
461
- }
462
- /** Returns whether we've finished receiving all expected solutions. */
463
- allSolutionsDone() {
464
- const solutions = Object.values(this.solutions);
465
- return solutions.length === this.expectedNumChoices && solutions.every(s => s === null);
466
- }
467
- };
468
- exports.SSEProcessor = SSEProcessor;
469
- exports.SSEProcessor = SSEProcessor = SSEProcessor_1 = __decorate([
470
- __param(6, instantiation_1.IInstantiationService),
471
- __param(7, logger_1.ICompletionsLogTargetService)
472
- ], SSEProcessor);
473
- function prepareSolutionForReturn(accessor, c, telemetryData) {
474
- const logTarget = accessor.get(logger_1.ICompletionsLogTargetService);
475
- let completionText = c.solution.text.join('');
476
- let blockFinished = false;
477
- if (c.finishOffset !== undefined) {
478
- // Trim solution to finishOffset returned by finishedCb
479
- streamChoicesLogger.debug(logTarget, `solution ${c.index}: early finish at offset ${c.finishOffset}`);
480
- completionText = completionText.substring(0, c.finishOffset);
481
- blockFinished = true;
482
- }
483
- streamChoicesLogger.info(logTarget, `solution ${c.index} returned. finish reason: [${c.reason}]`);
484
- streamChoicesLogger.debug(logTarget, `solution ${c.index} details: finishOffset: [${c.finishOffset}]`);
485
- const jsonData = convertToAPIJsonData(c.solution);
486
- return (0, openai_1.convertToAPIChoice)(accessor, completionText, jsonData, c.index, c.requestId, blockFinished, telemetryData);
487
- }
488
- // Function to convert from APIJsonDataStreaming to APIJsonData format
489
- function convertToAPIJsonData(streamingData) {
490
- const joinedText = streamingData.text.join('');
491
- const annotations = streamingData.copilot_annotations.current;
492
- const out = {
493
- text: joinedText,
494
- tokens: streamingData.text,
495
- copilot_annotations: annotations,
496
- finish_reason: streamingData.finish_reason ?? 'stop',
497
- };
498
- if (streamingData.logprobs.length === 0) {
499
- return out;
500
- }
501
- const flattenedLogprobs = streamingData.logprobs.reduce((acc, cur) => acc.concat(cur), []);
502
- const flattenedTopLogprobs = streamingData.top_logprobs.reduce((acc, cur) => acc.concat(cur), []);
503
- const flattenedOffsets = streamingData.text_offset.reduce((acc, cur) => acc.concat(cur), []);
504
- const flattenedTokens = streamingData.tokens.reduce((acc, cur) => acc.concat(cur), []);
505
- return {
506
- ...out,
507
- logprobs: {
508
- token_logprobs: flattenedLogprobs,
509
- top_logprobs: flattenedTopLogprobs,
510
- text_offset: flattenedOffsets,
511
- tokens: flattenedTokens,
512
- },
513
- };
514
- }
515
- // data: {"choices":null,"copilot_confirmation":{"type":"action","title":"Are you sure you want to proceed?","message":"This action is irreversible.","confirmation":{"id":"123"}},"id":null}
516
- function isCopilotConfirmation(obj) {
517
- return (typeof obj.title === 'string' &&
518
- typeof obj.message === 'string' &&
519
- !!obj.confirmation);
520
- }
521
- /** Keeps track of how many chunks of a choice were read and yielded out. */
522
- class ChunkStats {
523
- constructor() {
524
- this.choices = new Map();
525
- }
526
- getChoiceStats(choiceIndex) {
527
- let choiceStat = this.choices.get(choiceIndex);
528
- if (!choiceStat) {
529
- choiceStat = new ChoiceStats();
530
- this.choices.set(choiceIndex, choiceStat);
531
- }
532
- return choiceStat;
533
- }
534
- add(choiceIndex) {
535
- this.getChoiceStats(choiceIndex).increment();
536
- }
537
- markYielded(choiceIndex) {
538
- this.getChoiceStats(choiceIndex).markYielded();
539
- }
540
- toString() {
541
- return Array.from(this.choices.entries())
542
- .map(([index, stats]) => `${index}: ${stats.yieldedTokens} -> ${stats.seenTokens}`)
543
- .join(', ');
544
- }
545
- }
546
- class ChoiceStats {
547
- constructor() {
548
- this.yieldedTokens = -1;
549
- this.seenTokens = 0;
550
- }
551
- increment() {
552
- this.seenTokens++;
553
- }
554
- markYielded() {
555
- this.yieldedTokens = this.seenTokens;
556
- }
557
- }
558
- //# sourceMappingURL=stream.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"stream.js","sourceRoot":"","sources":["../../../../../../../../../src/_internal/extension/completions-core/vscode-node/lib/src/openai/stream.ts"],"names":[],"mappings":";AAAA;;;gGAGgG;;;;;;;;;;;;;AAsEhG,gCAIC;AAiiBD,4DAoBC;AA7nBD,qHAA2L;AAC3L,8EAA6F;AAE7F,yGAAgI;AAEhI,sCAAiE;AAGjE,qCAAgD;AAEhD,qCAMkB;AAElB,MAAM,mBAAmB,GAAG,IAAI,eAAM,CAAC,eAAe,CAAC,CAAC;AAExD,kEAAkE;AACl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