Theia API Documentation v1.65.0
    Preparing search index...

    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.

    interface ChatResponseStream {
        anchor(value: Uri | Location, title?: string): void;
        button(command: Command): void;
        filetree(value: ChatResponseFileTree[], baseUri: Uri): void;
        markdown(value: string | MarkdownString): void;
        progress(value: string): void;
        push(part: ChatResponsePart): void;
        reference(value: Uri | Location, iconPath?: IconPath): void;
    }
    Index

    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.

      • Optionaltitle: 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 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

      • OptionaliconPath: IconPath

        Icon for the reference shown in UI

      Returns void