discourse/plugins/chat
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
..
app DEV: chat streaming (#25736) 2024-02-20 09:49:19 +01:00
assets DEV: chat streaming (#25736) 2024-02-20 09:49:19 +01:00
config DEV: chat streaming (#25736) 2024-02-20 09:49:19 +01:00
db DEV: chat streaming (#25736) 2024-02-20 09:49:19 +01:00
lib DEV: chat streaming (#25736) 2024-02-20 09:49:19 +01:00
public DEV: Move `discourse-chat` to the core repo. (#18776) 2022-11-02 10:41:30 -03:00
spec DEV: chat streaming (#25736) 2024-02-20 09:49:19 +01:00
test/javascripts UX: Chat browse redesign (#25698) 2024-02-15 18:00:22 +01:00
README.md DEV: Chat service object initial implementation (#19814) 2023-02-13 13:09:57 +01:00
plugin.rb DEV: chat streaming (#25736) 2024-02-20 09:49:19 +01:00

README.md

This plugin is still in active development and may change frequently

Documentation

The Discourse Chat plugin adds chat functionality to your Discourse so it can natively support both long-form and short-form communication needs of your online community.

For user documentation, see Discourse Chat.

For developer documentation, see Discourse Documentation.