feat: add i18n, platform channels page, and WeChat QR login
- Add vue-i18n with auto-detect browser language and manual toggle (EN/中文) - Move platform channels to separate page with credential management - Support Telegram, Discord, Slack, WhatsApp, Matrix, Feishu, Weixin, WeCom - Add WeChat QR code login (opens in browser, polls status, auto-saves) - Write platform credentials to ~/.hermes/.env matching hermes gateway setup - Auto restart gateway after platform config changes - Add settings store with per-section save for all config categories - Persist session group collapse state across navigation - Fix pre-existing TypeScript build errors Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# Hermes Web UI
|
||||
|
||||
Web dashboard for [Hermes Agent](https://github.com/NousResearch/hermes-agent) — chat interaction, session management, scheduled jobs, and log viewing.
|
||||
Web dashboard for [Hermes Agent](https://github.com/NousResearch/hermes-agent) — chat interaction, session management, scheduled jobs, platform channel configuration, and log viewing.
|
||||
|
||||

|
||||
|
||||
@@ -12,6 +12,7 @@ Web dashboard for [Hermes Agent](https://github.com/NousResearch/hermes-agent)
|
||||
- **Naive UI** — Component library
|
||||
- **Pinia** — State management
|
||||
- **Vue Router** — Routing (Hash mode)
|
||||
- **vue-i18n** — Internationalization (Chinese / English)
|
||||
- **Koa 2** — BFF server (API proxy, file upload, session management)
|
||||
- **SCSS** — Style preprocessor
|
||||
- **markdown-it** + **highlight.js** — Markdown rendering and code highlighting
|
||||
@@ -72,6 +73,8 @@ hermes-web-ui/
|
||||
│ ├── config.ts # Configuration (port, upstream, etc.)
|
||||
│ ├── routes/
|
||||
│ │ ├── proxy.ts # API proxy to Hermes (/api/*, /v1/*)
|
||||
│ │ ├── config.ts # Config & credentials management
|
||||
│ │ ├── weixin.ts # WeChat QR code login proxy
|
||||
│ │ ├── upload.ts # File upload (POST /upload)
|
||||
│ │ ├── sessions.ts # Session management via Hermes CLI
|
||||
│ │ ├── filesystem.ts # Skills, memory, config model management
|
||||
@@ -80,19 +83,34 @@ hermes-web-ui/
|
||||
│ └── services/
|
||||
│ └── hermes-cli.ts # Hermes CLI wrapper (sessions, logs, version)
|
||||
├── src/
|
||||
│ ├── i18n/ # Internationalization (en / zh)
|
||||
│ │ ├── index.ts # i18n instance setup
|
||||
│ │ └── locales/
|
||||
│ │ ├── en.ts # English translations
|
||||
│ │ └── zh.ts # Chinese translations
|
||||
│ ├── api/ # Frontend API layer
|
||||
│ ├── stores/ # Pinia state management
|
||||
│ ├── components/
|
||||
│ │ ├── layout/
|
||||
│ │ │ ├── AppSidebar.vue # Sidebar navigation
|
||||
│ │ │ ├── LanguageSwitch.vue # Language toggle (EN / 中文)
|
||||
│ │ │ └── ModelSelector.vue # Global model selector
|
||||
│ │ ├── chat/ # Chat components
|
||||
│ │ └── jobs/ # Job components
|
||||
│ │ ├── jobs/ # Job components
|
||||
│ │ ├── models/ # Model/provider components
|
||||
│ │ ├── settings/ # Settings components
|
||||
│ │ │ ├── PlatformCard.vue # Platform card with config status
|
||||
│ │ │ └── PlatformSettings.vue # Platform channel configuration
|
||||
│ │ └── skills/ # Skill components
|
||||
│ ├── views/
|
||||
│ │ ├── ChatView.vue # Chat page
|
||||
│ │ ├── JobsView.vue # Jobs page
|
||||
│ │ ├── LogsView.vue # Logs page
|
||||
│ │ └── SettingsView.vue # Settings (model management)
|
||||
│ │ ├── ModelsView.vue # Model management page
|
||||
│ │ ├── ChannelsView.vue # Platform channels page
|
||||
│ │ ├── SkillsView.vue # Skills page
|
||||
│ │ ├── MemoryView.vue # Memory page
|
||||
│ │ └── SettingsView.vue # Settings page
|
||||
│ └── router/index.ts # Router configuration
|
||||
└── dist/ # Build output (published to npm)
|
||||
├── server/index.js # Compiled BFF
|
||||
@@ -106,35 +124,62 @@ hermes-web-ui/
|
||||
- Async Run + SSE event streaming via BFF proxy
|
||||
- Session management via Hermes CLI
|
||||
- Multi-session switching with message history
|
||||
- Session grouping by source (Telegram, Discord, Slack, etc.) with collapsible accordion
|
||||
- Session rename and deletion
|
||||
- Markdown rendering with syntax highlighting and code copy
|
||||
- Tool call detail expansion (arguments / result)
|
||||
- File upload support (saved to temp, path passed to API)
|
||||
- Model selector — automatically discovers available models from `~/.hermes/auth.json` credential pool
|
||||
- Global model switching (updates `~/.hermes/config.yaml`)
|
||||
- Per-session model display (badge in chat header and session list)
|
||||
|
||||
### Platform Channels
|
||||
- Unified channel configuration page (Telegram, Discord, Slack, WhatsApp, Matrix, Feishu, WeChat, WeCom)
|
||||
- Credential management — writes to `~/.hermes/.env` (matching `hermes gateway setup` behavior)
|
||||
- Channel behavior settings — writes to `~/.hermes/config.yaml`
|
||||
- WeChat QR code login — opens QR in browser, polls scan status, auto-saves credentials
|
||||
- Auto gateway restart after any channel config change
|
||||
- Per-platform configured/unconfigured status detection
|
||||
|
||||
### Model Management
|
||||
- Automatically reads credential pool from `~/.hermes/auth.json`
|
||||
- Fetches available models from each provider endpoint (`/v1/models`)
|
||||
- Groups models by provider (e.g. zai, subrouter.ai)
|
||||
- Add custom OpenAI-compatible providers
|
||||
- Switching model updates `model.provider` in config.yaml to bypass env auto-detection
|
||||
- Error handling: parallel fetching, per-provider timeout, fallback to config.yaml parsing
|
||||
|
||||
### Settings
|
||||
- Display settings (streaming, compact mode, reasoning, cost, etc.)
|
||||
- Agent settings (max turns, timeout, tool enforcement)
|
||||
- Memory settings (enable/disable, char limits)
|
||||
- Session reset settings (idle timeout, scheduled reset)
|
||||
- Privacy settings (PII redaction)
|
||||
- API server settings
|
||||
|
||||
### Scheduled Jobs
|
||||
- Job list view (including paused/disabled jobs)
|
||||
- Create, edit, pause, resume, and delete jobs
|
||||
- Trigger immediate job execution
|
||||
- Cron expression quick presets
|
||||
|
||||
### Skills & Memory
|
||||
- Browse and search installed skills
|
||||
- View skill details and attached files
|
||||
- User notes and profile management
|
||||
|
||||
### Logs
|
||||
- View Hermes agent/gateway/error logs
|
||||
- Filter by log level, log file, and search keyword
|
||||
- Structured log parsing with HTTP access log highlighting
|
||||
|
||||
### Other
|
||||
- Internationalization — auto-detect browser language, manual toggle between Chinese and English
|
||||
- Real-time connection status monitoring
|
||||
- Hermes version display in sidebar
|
||||
- Auto config check on startup
|
||||
- Minimalist dark theme
|
||||
- Session group collapse state persisted across navigation
|
||||
|
||||
## Architecture
|
||||
|
||||
@@ -142,6 +187,10 @@ hermes-web-ui/
|
||||
Browser → BFF (Koa, :8648) → Hermes API (:8642)
|
||||
↓
|
||||
Hermes CLI (sessions, logs, version)
|
||||
↓
|
||||
~/.hermes/config.yaml (channel behavior)
|
||||
~/.hermes/.env (platform credentials)
|
||||
Tencent iLink API (WeChat QR login)
|
||||
```
|
||||
|
||||
The BFF layer handles:
|
||||
@@ -149,8 +198,10 @@ The BFF layer handles:
|
||||
- SSE streaming passthrough
|
||||
- File upload to temp directory
|
||||
- Session CRUD via Hermes CLI
|
||||
- Config & credential management (config.yaml + .env)
|
||||
- WeChat QR code login flow (fetch QR, poll status, save credentials)
|
||||
- Auto gateway restart on platform config changes
|
||||
- Model discovery from `~/.hermes/auth.json` credential pool
|
||||
- Config.yaml model switching (reads/writes `~/.hermes/config.yaml`)
|
||||
- Skills, memory, and custom provider management
|
||||
- Log file reading and parsing
|
||||
- Static file serving (SPA fallback)
|
||||
|
||||
Reference in New Issue
Block a user