Latest Socket ResearchMalicious Chrome Extension Performs Hidden Affiliate Hijacking.Details
Socket
Book a DemoInstallSign in
Socket

@coder/mux-chat-components

Package Overview
Dependencies
Maintainers
7
Versions
262
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@coder/mux-chat-components

Shared chat components for Mux conversation rendering

latest
Source
npmnpm
Version
0.1.0
Version published
Weekly downloads
22K
184.74%
Maintainers
7
Weekly downloads
 
Created
Source

@coder/mux-chat-components

Shared chat UI from Mux, published for reuse in mux.md.

Principle: this package re-exports Mux’s existing chat renderer implementation (messages, tools, markdown, diff rendering) to avoid a parallel rendering stack.

Usage

import {
  ChatHostContextProvider,
  ThemeProvider,
  MessageRenderer,
  createReadOnlyChatHostContext,
  type DisplayedMessage,
} from "@coder/mux-chat-components";

function ConversationViewer(props: { messages: DisplayedMessage[] }) {
  return (
    <ThemeProvider>
      <ChatHostContextProvider value={createReadOnlyChatHostContext()}>
        {props.messages.map((m) => (
          <MessageRenderer key={m.historyId} message={m} />
        ))}
      </ChatHostContextProvider>
    </ThemeProvider>
  );
}

Read-only host defaults

createReadOnlyChatHostContext() sets most ChatHostContext.uiSupport flags to "unsupported" and enables:

  • jsonRawView
  • imageAttachments

You can override individual flags:

createReadOnlyChatHostContext({ jsonRawView: "supported" });

Styling

Mux uses Tailwind + CSS variables for theming.

This package ships a minimal CSS variable set for 4 themes (dark/light/solarized-dark/solarized-light):

import "@coder/mux-chat-components/styles";

The host app is still responsible for providing Tailwind (or equivalent styles) for layout/typography; the CSS export is primarily for tokens (colors, borders, etc.).

Development

cd packages/chat-components
bun install
bun run typecheck
bun run build

License

AGPL-3.0-only

FAQs

Package last updated on 16 Jan 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts