The ChatResponseStream is how a participant is able to return content to the chat view. It provides several methods for streaming different types of content which will be rendered in an appropriate way in the chat view. A participant can use the helper method for the type of content it wants to return, or it can instantiate a {@link ChatResponsePart} and use the generic {@link ChatResponseStream.push} method to return it.

Fields

reference(value:EitherType<Uri, Location>, ?iconPath:IconPath):Void

Push a reference to this stream. Short-hand for push(new ChatResponseReferencePart(value)).

Note that the reference is not rendered inline with the response.

Parameters:

value

A uri or location

iconPath

Icon for the reference shown in UI

push(part:ChatResponsePart):Void

Pushes a part to this stream.

Parameters:

part

A response part, rendered or metadata

progress(value:String):Void

Push a progress part to this stream. Short-hand for push(new ChatResponseProgressPart(value)).

Parameters:

value

A progress message

markdown(value:EitherType<String, MarkdownString>):Void

Push a markdown part to this stream. Short-hand for push(new ChatResponseMarkdownPart(value)).

@link ChatResponseStream.push} @link MarkdownString.isTrusted} is NOT supported.

Parameters:

value

A markdown string or a string that should be interpreted as markdown. The boolean form of {

See also:

  • {

filetree(value:Array<ChatResponseFileTree>, baseUri:Uri):Void

Push a filetree part to this stream. Short-hand for push(new ChatResponseFileTreePart(value)).

Parameters:

value

File tree data.

baseUri

The base uri to which this file tree is relative.

button(command:Command):Void

Push a command button part to this stream. Short-hand for push(new ChatResponseCommandButtonPart(value, title)).

Parameters:

command

A Command that will be executed when the button is clicked.

anchor(value:EitherType<Uri, Location>, ?title:String):Void

Push an anchor part to this stream. Short-hand for push(new ChatResponseAnchorPart(value, title)). An anchor is an inline reference to some type of resource.

Parameters:

value

A uri or location.

title

An optional title that is rendered with value.