Skip to content

Commit 3c8e0fc

Browse files
authored
Get rid of chat progress Task (microsoft#202777)
1 parent 834e742 commit 3c8e0fc

File tree

3 files changed

+3
-37
lines changed

3 files changed

+3
-37
lines changed

src/vs/workbench/api/common/extHostChatAgents2.ts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -98,20 +98,7 @@ export class ExtHostChatAgents2 implements ExtHostChatAgentsShape2 {
9898
}
9999

100100
if ('placeholder' in progress && 'resolvedContent' in progress) {
101-
const resolvedContent = Promise.all([this._proxy.$handleProgressChunk(request.requestId, convertedProgress), progress.resolvedContent]);
102-
raceCancellation(resolvedContent, token).then(res => {
103-
if (!res) {
104-
return; /* Cancelled */
105-
}
106-
const [progressHandle, progressContent] = res;
107-
const convertedContent = typeConvert.ChatResponseProgress.from(agent.extension, progressContent);
108-
if (!convertedContent) {
109-
this._logService.error('Unknown progress type: ' + JSON.stringify(progressContent));
110-
return;
111-
}
112-
113-
this._proxy.$handleProgressChunk(request.requestId, convertedContent, progressHandle ?? undefined);
114-
});
101+
// Ignore for now, this is the deleted Task type
115102
} else {
116103
this._proxy.$handleProgressChunk(request.requestId, convertedProgress);
117104
}

src/vs/workbench/api/common/extHostTypeConverters.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2320,9 +2320,7 @@ export namespace InteractiveEditorResponseFeedbackKind {
23202320

23212321
export namespace ChatResponseProgress {
23222322
export function from(extension: IExtensionDescription, progress: vscode.ChatAgentExtendedProgress): extHostProtocol.IChatProgressDto | undefined {
2323-
if ('placeholder' in progress && 'resolvedContent' in progress) {
2324-
return { content: progress.placeholder, kind: 'asyncContent' } satisfies extHostProtocol.IChatAsyncContentDto;
2325-
} else if ('markdownContent' in progress) {
2323+
if ('markdownContent' in progress) {
23262324
checkProposedApiEnabled(extension, 'chatAgents2Additions');
23272325
return { content: MarkdownString.from(progress.markdownContent), kind: 'markdownContent' };
23282326
} else if ('content' in progress) {

src/vscode-dts/vscode.proposed.chatAgents2.d.ts

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,7 @@ declare module 'vscode' {
270270
export type ChatAgentContentProgress =
271271
| ChatAgentContent
272272
| ChatAgentFileTree
273-
| ChatAgentInlineContentReference
274-
| ChatAgentTask;
273+
| ChatAgentInlineContentReference;
275274

276275
export type ChatAgentMetadataProgress =
277276
| ChatAgentUsedContext
@@ -322,24 +321,6 @@ declare module 'vscode' {
322321
content: string;
323322
}
324323

325-
/**
326-
* Represents a piece of the chat response's content that is resolved asynchronously. It is rendered immediately with a placeholder,
327-
* which is replaced once the full content is available.
328-
*/
329-
export interface ChatAgentTask {
330-
/**
331-
* The markdown string to be rendered immediately.
332-
*/
333-
placeholder: string;
334-
335-
/**
336-
* A Thenable resolving to the real content. The placeholder will be replaced with this content once it's available.
337-
*/
338-
// TODO@API Should this be an async iterable or progress instance instead
339-
// TODO@API Should this include more inline-renderable items like `ChatAgentInlineContentReference`
340-
resolvedContent: Thenable<ChatAgentContent | ChatAgentFileTree>;
341-
}
342-
343324
/**
344325
* Represents a tree, such as a file and directory structure, rendered in the chat response.
345326
*/

0 commit comments

Comments
 (0)