Skip to content

Chat: describe Message Streaming demo#33419

Open
vladaskorohodova wants to merge 7 commits intoDevExpress:26_1from
vladaskorohodova:chat-streaming26_1
Open

Chat: describe Message Streaming demo#33419
vladaskorohodova wants to merge 7 commits intoDevExpress:26_1from
vladaskorohodova:chat-streaming26_1

Conversation

@vladaskorohodova
Copy link
Copy Markdown
Contributor

No description provided.

@vladaskorohodova vladaskorohodova self-assigned this Apr 27, 2026
Copilot AI review requested due to automatic review settings April 27, 2026 11:01
@vladaskorohodova vladaskorohodova requested a review from a team as a code owner April 27, 2026 11:01
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds end-user documentation for the Chat → Message Streaming demo, explaining how the demo streams assistant responses, supports cancelling in-progress requests, and customizes the empty-state UI.

Changes:

  • Introduced a new description.md for the Message Streaming demo with a high-level feature overview.
  • Documented streaming mechanics (delta chunks + delayed renderer + incremental store updates).
  • Documented stream cancellation via AbortController and related UI changes (send → stop button) plus custom empty view behavior.

Comment thread apps/demos/Demos/Chat/MessageStreaming/description.md Outdated
Comment thread apps/demos/Demos/Chat/MessageStreaming/description.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Vlada Skorokhodova <94827090+vladaskorohodova@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 27, 2026 11:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds end-user/demo documentation for the Chat → Message Streaming demo, explaining how the demo streams Azure OpenAI responses into the DevExtreme Chat UI and how the UI behaves during streaming/cancellation.

Changes:

  • Introduces description.md for the Message Streaming demo with an overview and split content.
  • Documents streaming mechanics (delta handling + delayed rendering + store updates).
  • Documents cancellation behavior and the custom empty view (suggestion cards).

Comment thread apps/demos/Demos/Chat/MessageStreaming/description.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Vlada Skorokhodova <94827090+vladaskorohodova@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 27, 2026 11:16
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds end-user documentation for the Chat Message Streaming demo, explaining how the demo streams AI responses from Azure OpenAI and how the UI supports stopping an in-progress stream.

Changes:

  • Added a new description.md for the Message Streaming demo.
  • Documented streaming mechanics (delta rendering + store updates) and stream cancellation via AbortController.
  • Described the custom empty state with suggestion cards.

Comment thread apps/demos/Demos/Chat/MessageStreaming/description.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Vlada Skorokhodova <94827090+vladaskorohodova@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 27, 2026 11:20
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds end-user documentation for the DevExtreme Chat → Message Streaming demo, explaining how the demo streams AI responses, supports aborting an in-progress stream, and customizes the empty state.

Changes:

  • Documented streaming behavior (delta chunk rendering + delayed renderer queue).
  • Documented stream cancellation via AbortController + stop button behavior.
  • Documented custom empty view with suggestion cards.

r-farkhutdinov
r-farkhutdinov previously approved these changes Apr 27, 2026
marker-dao
marker-dao previously approved these changes Apr 27, 2026
Comment thread apps/demos/Demos/Chat/MessageStreaming/description.md Outdated
Comment thread apps/demos/Demos/Chat/MessageStreaming/description.md Outdated

## Streaming AI Responses

The demo calls the Azure OpenAI Chat Completions API with `stream: true`. Incoming delta chunks are passed through a `createDelayedRenderer` queue that introduces a short display delay between chunks to produce a smooth typing effect. Each chunk is appended to a growing buffer, and the assistant message is updated in the data store with every render cycle via a `dataSource.store().push(...)` update operation.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we somehow reduce the number of passives in the last sentence?


## Stopping a Stream

An `AbortController` is created before each request and its signal is forwarded to the Azure OpenAI SDK. When the user clicks the stop button, `abortController.abort()` is called, which cancels the in-progress HTTP request.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can reduce the number of passives here too.

Comment thread apps/demos/Demos/Chat/MessageStreaming/description.md Outdated
Comment thread apps/demos/Demos/Chat/MessageStreaming/description.md Outdated
Co-authored-by: Elena Khamlyuk <80813840+khamlyuk@users.noreply.github.com>
Signed-off-by: Vlada Skorokhodova <94827090+vladaskorohodova@users.noreply.github.com>
Copilot AI review requested due to automatic review settings April 28, 2026 08:26
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds end-user documentation for the Chat → Message Streaming demo, explaining how the demo streams responses from Azure OpenAI and how the UI supports stopping an in-progress stream and showing prompt suggestions when the chat is empty.

Changes:

  • Introduces a new description.md for the Message Streaming demo.
  • Documents streaming mechanics (delta handling + delayed rendering) and the stop-stream flow (AbortController).
  • Describes the custom empty view with suggestion cards.

Comment thread apps/demos/Demos/Chat/MessageStreaming/description.md
Copilot AI review requested due to automatic review settings April 28, 2026 09:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds end-user documentation for the Chat → Message Streaming demo, explaining how the demo streams Azure OpenAI responses, allows users to stop an in-progress stream, and shows custom suggestion cards in an empty state.

Changes:

  • Introduces a new description.md for the Message Streaming demo.
  • Documents streaming behavior (delta chunks + delayed rendering + dataSource updates).
  • Documents stream cancellation (AbortController) and the stop/send button toggle, plus the custom empty view.


## Stopping a Stream

The demo creates an `AbortController` before each request and forwards its signal to the Azure OpenAI SDK. When the user clicks the stop button, the demo calls `abortController.abort()`, which cancels the in-progress HTTP request.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check technical correctness.

Suggested change
The demo creates an `AbortController` before each request and forwards its signal to the Azure OpenAI SDK. When the user clicks the stop button, the demo calls `abortController.abort()`, which cancels the in-progress HTTP request.
The demo creates an `AbortController` before each request and forwards its output to the Azure OpenAI SDK. When the user clicks the stop button, the demo calls `abortController.abort()` to cancel the in-progress HTTP request.


## Custom Empty View

The Chat component specifies an [emptyViewTemplate](/Documentation/ApiReference/UI_Components/dxChat/Configuration/#emptyViewTemplate) that replaces the default empty state with custom suggestion cards. Clicking a card constructs a message and triggers the demo message sending flow directly, bypassing the text input. No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The Chat component specifies an [emptyViewTemplate](/Documentation/ApiReference/UI_Components/dxChat/Configuration/#emptyViewTemplate) that replaces the default empty state with custom suggestion cards. Clicking a card constructs a message and triggers the demo message sending flow directly, bypassing the text input.
The Chat component specifies an [emptyViewTemplate](/Documentation/ApiReference/UI_Components/dxChat/Configuration/#emptyViewTemplate) that replaces the default empty state with custom suggestion cards. Clicking a card creates a message and triggers the demo message sending flow directly, bypassing the text input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants