1
0
mirror of synced 2026-08-05 23:36:55 +00:00

FIX: streaming related specs (#1448)

## 🔍 Overview
This update fixes an issue where message bus streaming related specs
were not working correctly. To do so we pass the `last_id` when
subscribing to `MessageBus` which allows us to unskip those broken
tests.

---------

Co-authored-by: Joffrey JAFFEUX <j.jaffeux@gmail.com>
This commit is contained in:
Keegan George
2025-06-19 07:41:18 -07:00
committed by GitHub
parent 6a33e5154d
commit baaa3d199a
4 changed files with 14 additions and 11 deletions
@@ -85,14 +85,18 @@ export default class ModalDiffModal extends Component {
@bind
subscribe() {
this.messageBus.subscribe(CHANNEL, this.updateResult);
this.messageBus.subscribe(
CHANNEL,
this.updateResult,
this.currentUser
?.discourse_ai_helper_stream_composer_suggestion_last_message_bus_id
);
}
@bind
cleanup() {
// stop all callbacks so it does not end up streaming pointlessly
this.smoothStreamer.resetStreaming();
this.diffStreamer.reset();
this.#resetState();
this.messageBus.unsubscribe(CHANNEL, this.updateResult);
}