Skip to content

Conversation

@viaermakov
Copy link
Contributor

@viaermakov viaermakov commented Jan 12, 2026

This PR adds a new multimodal HTML viewer feature that allows users to view Vega-Lite charts, DataFrames, and text descriptions in a browser-based tabbed interface.

New Features

  • thread.html() method - Added a new method to Thread that generates a standalone HTML page and opens it in the default browser, displaying:

    • Interactive Vega-Lite chart visualization
    • DataFrame as an HTML table
    • Text description/summary
  • React-based multimodal client (client/multimodal/) - A new frontend application built with:

    • React + TypeScript + Vite
    • Radix UI for theming and tabs component
    • Vega-Lite for chart rendering
    • CSS modules for styling

How It Works:

    1. User calls `thread.html()` on a Thread instance
    2. The method collect the DataFrame HTML and text from thread
    3. thread.plot() is invoked to generate the Vega specification
    4. An HTML file is created with the injected DataFrame HTML and text content
    5. A temporary HTTP server starts on a random port and opens SSE connection
    6. The browser opens the URL with a unique ID 
    7. After the page is loaded, the client-side component listens for SSE events and waits for the Vega spec to be generated.
    8. Once the Vega specification is received via SSE, the server shuts down.
Screen.Recording.2026-01-16.at.22.52.30.mov

@viaermakov viaermakov requested review from a team, SokolovYaroslav and agusakow January 12, 2026 10:01
@viaermakov viaermakov linked an issue Jan 12, 2026 that may be closed by this pull request
@viaermakov viaermakov requested a review from catstrike January 30, 2026 14:14
@viaermakov viaermakov merged commit fc8f96c into main Jan 30, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multimodal component MVP for Python SDK

4 participants