feat: LEM Chat TypeScript web components #18

Merged
Charon merged 1 commit from feat/lem-chat-components into main 2026-02-24 18:25:23 +00:00
Member

Standalone chat UI built with vanilla Web Components that connects to the MLX inference server's SSE streaming endpoint.

Components:

  • <lem-chat> — Container with SSE client, configurable via attributes
  • <lem-messages> — Scrollable message list with auto-scroll anchoring
  • <lem-message> — Single message bubble with streaming + <think> tag support
  • <lem-input> — Textarea with Enter/Shift+Enter, SVG send icon

Stack: TypeScript + esbuild → 15KB ESM bundle. Zero framework dependencies.

Files: lem-chat/src/*.ts, lem-chat/index.html (demo), lem-chat/dist/lem-chat.js (build output)

Ports the existing monolithic chat.js from go-ml into proper typed modules with interfaces, Shadow DOM isolation, and CSS custom property theming.

Standalone chat UI built with vanilla Web Components that connects to the MLX inference server's SSE streaming endpoint. **Components:** - `<lem-chat>` — Container with SSE client, configurable via attributes - `<lem-messages>` — Scrollable message list with auto-scroll anchoring - `<lem-message>` — Single message bubble with streaming + `<think>` tag support - `<lem-input>` — Textarea with Enter/Shift+Enter, SVG send icon **Stack:** TypeScript + esbuild → 15KB ESM bundle. Zero framework dependencies. **Files:** `lem-chat/src/*.ts`, `lem-chat/index.html` (demo), `lem-chat/dist/lem-chat.js` (build output) Ports the existing monolithic `chat.js` from go-ml into proper typed modules with interfaces, Shadow DOM isolation, and CSS custom property theming.
Charon added 1 commit 2026-02-24 18:24:41 +00:00
Standalone chat UI built with vanilla Web Components (Custom Elements +
Shadow DOM) that connects to the MLX inference server's SSE streaming
endpoint. Zero framework dependencies, single JS bundle output.

Components:
- <lem-chat>: Container with SSE client, config via attributes
- <lem-messages>: Scrollable message list with auto-scroll
- <lem-message>: Single message bubble with streaming + <think> tag support
- <lem-input>: Textarea with Enter to send, Shift+Enter for newline

Build: esbuild src/lem-chat.ts → dist/lem-chat.js (15KB ESM)
Replaces the monolithic chat.js in core/go-ml.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Charon merged commit bb00bd4add into main 2026-02-24 18:25:23 +00:00
Charon deleted branch feat/lem-chat-components 2026-02-24 18:25:23 +00:00
Sign in to join this conversation.
No description provided.