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>
16 lines
518 B
JSON
16 lines
518 B
JSON
{
|
|
"name": "lem-chat",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"license": "EUPL-1.2",
|
|
"scripts": {
|
|
"build": "esbuild src/lem-chat.ts --bundle --format=esm --outfile=dist/lem-chat.js",
|
|
"watch": "esbuild src/lem-chat.ts --bundle --format=esm --outfile=dist/lem-chat.js --watch",
|
|
"dev": "esbuild src/lem-chat.ts --bundle --format=esm --outfile=dist/lem-chat.js --watch --servedir=.",
|
|
"typecheck": "tsc --noEmit"
|
|
},
|
|
"devDependencies": {
|
|
"esbuild": "^0.25.0",
|
|
"typescript": "^5.7.0"
|
|
}
|
|
}
|