discourse-ai/lib/ai_helper
Sam cf220c530c
FIX: Improve MessageBus efficiency and correctly stop streaming (#1362)
* FIX: Improve MessageBus efficiency and correctly stop streaming

This commit enhances the message bus implementation for AI helper streaming by:

- Adding client_id targeting for message bus publications to ensure only the requesting client receives streaming updates
- Limiting MessageBus backlog size (2) and age (60 seconds) to prevent Redis bloat
- Replacing clearTimeout with Ember's cancel method for proper runloop management, we were leaking a stop
- Adding tests for client-specific message delivery

These changes improve memory usage and make streaming more reliable by ensuring messages are properly directed to the requesting client.

* composer suggestion needed a fix as well.

* backlog size of 2 is risky here cause same channel name is reused between clients
2025-05-23 16:23:06 +10:00
..
assistant.rb FIX: Improve MessageBus efficiency and correctly stop streaming (#1362) 2025-05-23 16:23:06 +10:00
chat_thread_titler.rb FIX: Bail earlier when a chat thread has no messages (#789) 2024-08-30 17:17:14 -03:00
date_formatter.rb FEATURE: smart date support for AI helper (#1044) 2024-12-31 08:04:25 +11:00
entry_point.rb FEATURE: Experimental search results from an AI Persona. (#1139) 2025-02-20 14:37:58 -03:00
painter.rb FEATURE: add OpenAI image generation and editing capabilities (#1293) 2025-04-29 17:38:54 +10:00
semantic_categorizer.rb DEV: Use existing topic embeddings when suggesting tags/categories on edit (#1189) 2025-03-12 18:52:07 -07:00