discourse/plugins/chat/assets/stylesheets/common/index.scss
Joffrey JAFFEUX d8d756cd2f
DEV: chat streaming (#25736)
This commit introduces the possibility to stream messages. To allow plugins to use streaming this commit also ships a `ChatSDK` library to allow to interact with few parts of discourse chat.

```ruby
ChatSDK::Message.create_with_stream(raw: "test") do |helper|
  5.times do |i|
    is_streaming = helper.stream(raw: "more #{i}")
    next if !is_streaming
    sleep 2
  end
end
```

This commit also introduces all the frontend parts:
- messages can now be marked as streaming
- when streaming their content will be updated when a new content is appended
- a special UI will be showing (a blinking indicator)
- a cancel button allows the user to stop the streaming, when cancelled `helper.stream(...)` will return `false`, and the plugin can decide exit early
2024-02-20 09:49:19 +01:00

72 lines
2.1 KiB
SCSS

@import "chat-unread-indicator";
@import "chat-height-mixin";
@import "base-common";
@import "sidebar-extensions";
@import "chat-browse";
@import "chat-channel";
@import "chat-channel-card";
@import "chat-channel-icon";
@import "chat-channel-info";
@import "chat-channel-name";
@import "chat-channel-preview-card";
@import "chat-channel-title";
@import "chat-composer-dropdown";
@import "chat-composer-upload";
@import "chat-composer-uploads";
@import "chat-composer";
@import "chat-composer-button";
@import "chat-drawer";
@import "chat-emoji-picker";
@import "chat-form";
@import "chat-index";
@import "chat-mention-warnings";
@import "chat-message-actions";
@import "chat-message-collapser";
@import "chat-message-images";
@import "chat-message-info";
@import "chat-message-left-gutter";
@import "chat-message-separator";
@import "chat-message-thread-indicator";
@import "chat-message";
@import "chat-notices";
@import "chat-onebox";
@import "chat-reply";
@import "chat-replying-indicator";
@import "chat-selection-manager";
@import "chat-side-panel";
@import "chat-skeleton";
@import "chat-thread";
@import "chat-side-panel-resizer";
@import "chat-upload-drop-zone";
@import "chat-transcript";
@import "core-extensions";
@import "dc-filter-input";
@import "incoming-chat-webhooks";
@import "reviewable-chat-message";
@import "chat-thread-list-item";
@import "chat-threads-list";
@import "chat-composer-separator";
@import "chat-thread-header";
@import "chat-thread-list-header";
@import "chat-thread-unread-indicator";
@import "chat-thread-participants";
@import "chat-message-error";
@import "chat-message-creator";
@import "chat-user-avatar";
@import "chat-modal-new-message";
@import "chat-modal-archive-channel";
@import "chat-modal-edit-channel-description";
@import "chat-modal-create-channel";
@import "chat-modal-create-channel";
@import "chat-modal-channel-summary";
@import "chat-modal-move-message-to-channel";
@import "chat-scroll-to-bottom";
@import "chat-channel-row";
@import "chat-channel-members";
@import "chat-channel-settings";
@import "chat-user-threads";
@import "chat-navbar";
@import "chat-thread-title";
@import "chat-audio-upload";
@import "chat-message-text";