Package com.axelor.ai.chat.stream
package com.axelor.ai.chat.stream
-
ClassDescriptionGeneration-side handle for one chat run.Thrown by
ChatStreamRegistry.begin(java.lang.String, java.time.Duration)when the chat already has a live run.AStreamWriterthat appends serialized SSE frames to anActiveStreaminstead of a socket.Cluster-wide "who has which chat open": one entry per (room, user, session), refreshed by the client's ~25s re-JOIN heartbeat and expiring shortly after it stops — dead sessions (no close frame) self-heal within one TTL.Cache value: what the client's Avatar needs (image with initials fallback).Multi-step agentic loop that streams LLM responses and executes tool calls.Registry of in-flight chat runs, backed by the unified cache API: in-memory under caffeine, distributed under Redisson/JCache — chosen by the app's cache provider config, nothing AI-specific.A client-tool call the run paused on.AStreamWriterthat collects text deltas in memory instead of writing SSE.Typed events produced by the agentic loop.The loop completed normally.The loop encountered an unrecoverable error.A message to add to conversation history (persisted by plugins).An SSE stream event to send to the client.The loop is pausing — waiting for user action (approval, client tool result).Consumer for agentic loop events.Tracks open text and reasoning parts to enforce the part lifecycle rule:*-start → N × *-delta → *-endwith a single consistent ID per run.SSE implementation ofLoopEventSink.Wire-format events for the AI SDK UI Message Stream Protocol v1.Removes every part added since the most recent step boundary.Thrown byActiveStream.append(java.lang.String)when a run exceeds its buffer size cap.Subscriber side of one run: replays chunks from the cache, then tails until the run ends.WritesStreamEvents as SSE to anOutputStream.Deduplicates a repeated tool call within a single stream request.Accumulator for one assistant turn.