mirror of
https://github.com/microsoft/vscode.git
synced 2026-07-18 09:53:23 +01:00
Fix up chatParticipantAdditions check (#212000)
* Fix up chatParticipantAdditions check * And copy warning content * Redundant
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user