Unofficial minimal chat UI built with Vue 3 + Vite and Element Plus, designed as an OpenAI-compatible streaming client for SGR Agent Core.

- Chat layout: left sidebar with chats, main chat view on the right
- Element Plus via small wrapper components (easy to swap UI library)
- IndexedDB persistence: chats and messages stored locally
- Streaming (SSE-like) client: renders assistant output as chunks arrive
- Clarification handling: detects
<think>...</think>, shows a separate numbered "Thinking" thread line-by-line - Light/Dark theme with a toggle (persists in localStorage)
- Import/Export all data to JSON (migrate across browsers)
- Node.js 18+
- Running SGR Agent Core API (default
http://localhost:8010)
npm install
cp env.example .env # or set VITE_API_BASE in your environment
npm run devThen open the printed local URL (default http://localhost:5173). During development, the dev server proxies requests to http://localhost:8010 for /v1, /agents, and /health.
- Environment variables (Vite):
VITE_API_BASE– base URL of SGR Agent Core API. Leave empty to use the dev proxy (recommended for local dev). Set to a full URL for direct calls in production.
The client calls POST {VITE_API_BASE}/v1/chat/completions with an OpenAI-compatible body and expects streaming response lines in the form data: {...} and a final data: [DONE].
- On send: creates a placeholder assistant message, then appends incoming text chunks
- Parses headers:
X-Agent-IDis saved to the current chat for follow-up clarifications - Clarifications: when
<think>appears, the content is streamed into a separatethinkingmessage; each non-empty line is numbered as it arrives; after</think>rendering returns to the assistant message - Errors: network and API errors are shown in UI and appended to the message
src/ui/*– thin wrappers over Element Plus (UiButton,UiInput,UiTextarea,UiCard,UiScrollbar,UiIcon,UiSwitch,UiDialog,UiTag,message)src/components/*– chat layout (ChatList,ChatView,ChatMessageItem)src/state/*– simple app state (chats/messages, theme)src/db/indexedDb.ts– IndexedDB helpers (chats, messages, import/export)src/api/openaiClient.ts– OpenAI official library client with SSE supportsrc/config.ts– small runtime config (API_BASE,DEFAULT_MODEL)
Strings are minimal and currently in English. The UI wrappers allow future migration to any i18n stack (e.g., vue-i18n or gettext tooling). Suggested approach: introduce a tiny t(key) layer and replace visible strings incrementally.
npm run dev– start dev servernpm run build– build for productionnpm run preview– preview production build
MIT. See LICENSE.