diff --git a/src/vs/workbench/api/common/extHostChatAgents2.ts b/src/vs/workbench/api/common/extHostChatAgents2.ts index 7279fb1512e..9f3631f5a78 100644 --- a/src/vs/workbench/api/common/extHostChatAgents2.ts +++ b/src/vs/workbench/api/common/extHostChatAgents2.ts @@ -125,6 +125,7 @@ class ChatAgentResponseStream { }, warning(value) { throwIfDone(this.progress); + checkProposedApiEnabled(that._extension, 'chatParticipantAdditions'); const part = new extHostTypes.ChatResponseWarningPart(value); const dto = typeConvert.ChatResponseWarningPart.from(part); _report(dto); @@ -184,7 +185,12 @@ class ChatAgentResponseStream { push(part) { throwIfDone(this.push); - if (part instanceof extHostTypes.ChatResponseTextEditPart || part instanceof extHostTypes.ChatResponseMarkdownWithVulnerabilitiesPart || part instanceof extHostTypes.ChatResponseDetectedParticipantPart) { + if ( + part instanceof extHostTypes.ChatResponseTextEditPart || + part instanceof extHostTypes.ChatResponseMarkdownWithVulnerabilitiesPart || + part instanceof extHostTypes.ChatResponseDetectedParticipantPart || + part instanceof extHostTypes.ChatResponseWarningPart + ) { checkProposedApiEnabled(that._extension, 'chatParticipantAdditions'); } diff --git a/src/vs/workbench/api/common/extHostTypeConverters.ts b/src/vs/workbench/api/common/extHostTypeConverters.ts index 66628dc8cca..d163386bf00 100644 --- a/src/vs/workbench/api/common/extHostTypeConverters.ts +++ b/src/vs/workbench/api/common/extHostTypeConverters.ts @@ -2455,7 +2455,7 @@ export namespace ChatResponseReferencePart { export namespace ChatResponsePart { - export function from(part: vscode.ChatResponsePart | vscode.ChatResponseTextEditPart | vscode.ChatResponseMarkdownWithVulnerabilitiesPart | vscode.ChatResponseDetectedParticipantPart, commandsConverter: CommandsConverter, commandDisposables: DisposableStore): extHostProtocol.IChatProgressDto { + export function from(part: vscode.ChatResponsePart | vscode.ChatResponseTextEditPart | vscode.ChatResponseMarkdownWithVulnerabilitiesPart | vscode.ChatResponseDetectedParticipantPart | vscode.ChatResponseWarningPart, commandsConverter: CommandsConverter, commandDisposables: DisposableStore): extHostProtocol.IChatProgressDto { if (part instanceof types.ChatResponseMarkdownPart) { return ChatResponseMarkdownPart.from(part); } else if (part instanceof types.ChatResponseAnchorPart) { @@ -2474,6 +2474,8 @@ export namespace ChatResponsePart { return ChatResponseMarkdownWithVulnerabilitiesPart.from(part); } else if (part instanceof types.ChatResponseDetectedParticipantPart) { return ChatResponseDetectedParticipantPart.from(part); + } else if (part instanceof types.ChatResponseWarningPart) { + return ChatResponseWarningPart.from(part); } return { diff --git a/src/vs/workbench/contrib/chat/common/chatModel.ts b/src/vs/workbench/contrib/chat/common/chatModel.ts index 7b44235a3e7..7a7ffacd78e 100644 --- a/src/vs/workbench/contrib/chat/common/chatModel.ts +++ b/src/vs/workbench/contrib/chat/common/chatModel.ts @@ -226,8 +226,6 @@ export class Response implements IResponse { return ''; } else if (part.kind === 'progressMessage') { return ''; - } else if (part.kind === 'warning') { - return ''; } else { return part.content.value; }