Skip to content

LLM streaming events are broadcast to all Electron windows instead of only the consuming window #36

Description

@Ayushpal2006

Description

During text and screenshot-based LLM streaming, every response start and chunk event is broadcast to all registered Electron windows using broadcastToAllWindows().

The relevant events are:

  • transcription-llm-response-start
  • transcription-llm-response-chunk
  • transcription-llm-response

However, the streaming handlers appear to be implemented only in the chat renderer. This means unrelated windows, including hidden windows such as settings and the main overlay, receive every streamed chunk.

Because an LLM response can contain many chunks, this creates unnecessary IPC messages and per-event logging.

Relevant code

In main.js, both image and text processing use:

windowManager.broadcastToAllWindows(
  "transcription-llm-response-chunk",
  {
    messageId,
    delta
  }
);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions