Interface ChatResponseStream

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 ChatResponsePart and use the generic ChatResponseStream.push method to return it.

Stubbed

interface ChatResponseStream {
    anchor(value, title?): void;
    button(command): void;
    filetree(value, baseUri): void;
    markdown(value): void;
    progress(value): void;
    push(part): void;
    reference(value, iconPath?): void;
}

Methods

  • 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: Uri | Location

      A uri or location.

    • Optional title: string

      An optional title that is rendered with value.

    Returns void

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

    Parameters

    • command: Command

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

    Returns void

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

    Parameters

    Returns void

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

    Parameters

    • value: string

      A progress message

    Returns 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: Uri | Location

      A uri or location

    • Optional iconPath: IconPath

      Icon for the reference shown in UI

    Returns void