Commit Graph

124 Commits

Author SHA1 Message Date
灵感屋 7477f18abe Update Dockerfile 2026-04-20 15:59:09 +08:00
灵感屋 11621246d0 Add GitHub Actions workflow for Docker image build 2026-04-20 14:09:42 +08:00
ekko 5430d02787 Merge branch 'dev' 2026-04-20 12:16:07 +08:00
ekko eb6c2dc9f6 fix: resolve Chinese filename garbling on upload and page update failure (#72, #71)
- Fix multipart upload parsing to use Buffer operations instead of latin1
  string conversion, preserving multi-byte characters in filenames (#72)
- Support RFC 5987 filename* encoding for cross-platform compatibility
- Fix in-page update by running npm install directly instead of CLI command
  that kills the server process before response is sent (#71)
- Add no-cache header to version check to avoid stale latest version
- Change version check interval from 4 hours to 1 hour

Closes #72, Closes #71

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-20 12:15:47 +08:00
ekko 47ccb751f4 Merge branch 'dev' 2026-04-19 23:41:07 +08:00
ekko 5d16d56d9f docs: add fallback comment for star history chart rate limiting
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-19 23:41:01 +08:00
ekko cea7a17913 Merge branch 'dev' 2026-04-19 23:36:37 +08:00
ekko 717549bc85 docs: update README with multi-profile, gateway, provider management and star history
- Add active session indicator and latest-message sorting to AI Chat
- Expand Model Management with provider CRUD and Codex OAuth
- Add Multi-Profile & Gateway section
- Add Model Settings to Settings section
- Add Star History chart to both EN and ZH READMEs

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-19 23:36:28 +08:00
ekko f96e94c44c Merge branch 'dev' 2026-04-19 23:32:09 +08:00
ekko d3817556ac feat: sort sessions by latest message time instead of creation time
Use `last_active` from SQLite (max message timestamp) for accurate
sorting, with fallback chain: last_active → ended_at → started_at.
CLI mode lacks last_active so falls back to ended_at.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-19 23:32:01 +08:00
ekko 969e56b45e fix: restore selected session highlight alongside live indicator
The PR changed `.active` class to bind on `isSessionLive()`, which
removed the visual selection state when clicking a non-live session.
Split into two classes: `.active` for selection, `.live` for streaming.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-19 23:13:34 +08:00
ekko 72f238703d Merge branch 'codex/active-session-live-state' into dev 2026-04-19 22:52:41 +08:00
mysoul12138 7c4b025e6a refine active session live state 2026-04-19 21:51:25 +08:00
ekko 5b9c1aa77f Merge branch 'dev' 2026-04-19 20:59:39 +08:00
ekko 562261d13f feat: multi-gateway profile support, provider management overhaul, and model settings tab
- Profile-aware proxy: inject API key from profile-specific .env, route requests via X-Hermes-Profile header
- Remove auth.json dependency: built-in providers use .env, custom providers use config.yaml
- Add allProviders field to available-models response with all hardcoded provider catalogs
- Add Models tab in Settings for editing provider API keys (built-in → .env, custom → config.yaml)
- Add PUT /api/config/providers/:poolKey for updating provider credentials
- ProviderFormModal uses backend allProviders for preset dropdown
- Gateway log format support: parse both agent and gateway log formats
- Add webui server.log to log viewer with log rotation at 3MB
- Fix provider delete loading state and OAuth provider cleanup
- Setup script: require Node.js 23+, auto-upgrade if version too low

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-19 20:59:25 +08:00
mysoul12138 2ea20fc128 merge active session indicator feature 2026-04-19 19:34:29 +08:00
mysoul12138 0da5e91329 feat: surface active chat sessions 2026-04-19 19:34:14 +08:00
ekko a3d38fa5d5 Merge pull request #58 from EKKOLearnAI/dev
fix: provider-aware model selection (#52)
2026-04-19 15:08:12 +08:00
ekko e7e4c386c3 chore: bump version to 0.3.6 and fix unused import
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-19 15:07:59 +08:00
ekko 8a4ab2d69d fix: provider-aware model selection to prevent cross-provider conflicts
When multiple providers share the same model name, the selector now
uses both model ID and provider as the unique identifier instead of
model name alone. Backend returns default_provider alongside default
model, and model switching sends provider to the config.

Fixes #52

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-19 15:05:05 +08:00
ekko b4f809d8b5 fix: improve chat scroll behavior and dark mode readability
- Smart auto-scroll: only follow SSE stream when user is near bottom (200px threshold), scroll once on send/switch session
- Brighten dark mode text colors (primary #e0→#f0, secondary #a0→#c0, muted #66→#88)
- Fix tool-call panel height to match thinking video (120px→213px)
- Fix tool-call item background invisible in dark mode
- Fix gateway start button using hardcoded dark color

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-19 10:46:33 +08:00
ekko 4f923da490 feat: replace ModelSelector dropdown with modal picker
NSelect dropdown is unusable with providers that have hundreds of models.
Replaced with a modal dialog featuring search filter, collapsible provider
groups, and click-to-select.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-18 22:08:34 +08:00
ekko aa34b02b09 chore: bump version to 0.3.5
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-18 14:34:50 +08:00
ekko 07d36297d6 Merge remote-tracking branch 'origin/main' into feat/multi-gateway 2026-04-18 14:33:04 +08:00
ekko 27051dcb32 feat: profile-aware cache isolation and UX improvements
- Fix chat store cache keys to include profile name, prevent data leaking between profiles
- Defer cache hydration to after profile load to avoid race condition
- Remove collapsible sidebar feature (not needed)
- Remove confirmation dialog on profile switch (direct reload)
- Auto-start gateway when creating new profile
- Clear profile-specific localStorage cache on profile delete (safe prefix matching)
- Clean up unused imports in SettingsView

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-18 14:32:54 +08:00
ekko da7910f934 Merge pull request #44 from 0xnuu/pr/chat-resilience-sidebar
feat(chat): improve resilience and collapsible sidebar
2026-04-18 14:32:36 +08:00
Shentar 0df3303f8f feat: add terminal theme selector with 15 presets
Add NSelect dropdown in terminal toolbar to switch themes dynamically.
Includes 9 dark themes (Default, Solarized Dark, Monokai, Dracula, Nord,
One Dark, GitHub Dark, Tokyo Night) and 6 light themes (Solarized Light,
GitHub Light, Catppuccin Latte, Alabaster, XTerm Light, One Light,
Gruvbox Light). Theme choice persists via localStorage.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 13:14:20 +08:00
ekko 17f0cdc1de Merge branch 'pr-44' into feat/multi-gateway
# Conflicts:
#	packages/client/src/components/layout/AppSidebar.vue
2026-04-18 13:12:42 +08:00
ekko b9e0aefec3 Merge branch 'pr-43' into feat/multi-gateway 2026-04-18 13:09:21 +08:00
ekko 4b6de351bd feat: add multi-gateway management with auto port detection
- Add GatewayManager for multi-profile gateway lifecycle management
- Auto-detect running gateways on startup via PID + health check
- Port conflict detection: check managed gateways, allocated ports, and
  system-level port availability (TCP bind test)
- Two-phase startup: sequential port resolution, parallel process launch
- Use `gateway start/restart` on normal systems, `gateway run --replace`
  on WSL/Docker
- Wait for health check before returning start/stop responses
- Add Gateways page with card-based layout showing profile status
- Reorganize sidebar navigation into collapsible groups
- Hide API server settings (now auto-managed by GatewayManager)
- Profile switch reloads page; Ctrl+C no longer stops gateways
- Remove redundant ensureApiServerConfig from index.ts and profiles.ts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-18 13:07:12 +08:00
Shentar 40d4b9ac4b feat: add terminal theme selector with 15 presets
Add NSelect dropdown in terminal toolbar to switch themes dynamically.
Includes 9 dark themes (Default, Solarized Dark, Monokai, Dracula, Nord,
One Dark, GitHub Dark, Tokyo Night) and 6 light themes (Solarized Light,
GitHub Light, Catppuccin Latte, Alabaster, XTerm Light, One Light,
Gruvbox Light). Theme choice persists via localStorage.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-18 11:26:09 +08:00
ekko 7264eabfe2 Merge dev into main
- fix: avoid full session export in session list (#38)
- fix: fallback title from preview when session has no explicit title
- fix: use dynamic import for node:sqlite with Node version guard

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-18 09:35:03 +08:00
ekko 35481e452d fix: use dynamic import for node:sqlite with Node version guard
Replace static top-level import with runtime version check and dynamic
import() so Node < 22.5 gracefully falls back to CLI path instead of
crashing at module load time.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-18 09:34:59 +08:00
ekko fd7071b75d fix: fallback title from preview when session has no explicit title
SQLite path was returning null title for sessions without an explicit
title, while the CLI path derives it from the first user message.
Now uses the preview (first user message content) as title fallback,
matching the original CLI behavior.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-18 08:53:45 +08:00
ekko 7e84c56c20 fix: avoid full session export in session list (#38)
Read lightweight session summaries directly from state.db via node:sqlite
instead of exporting full transcripts through hermes CLI. Falls back to
CLI path if sqlite query fails. Includes title fallback from preview when
no explicit title is set.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-18 08:53:38 +08:00
ekko d6661c0325 Merge branch 'dev' 2026-04-18 08:29:51 +08:00
ekko 4dc3b3cd56 chore: add MIT LICENSE file
Closes #39

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-18 08:27:40 +08:00
Burak bcfbaa6a24 fix: avoid full session export in session list 2026-04-17 12:56:41 -04:00
zksnet 7e777fd661 feat(chat): improve resilience and collapsible sidebar
问题描述:\n- 刷新页面、切后台或手机锁屏后,进行中的对话容易丢失,SSE 断开时前端还会插入假的错误气泡\n- 移动端首屏会话列表会短暂遮住聊天区\n- 桌面端侧栏无法折叠,在窄窗口和缩放场景占用过多横向空间\n\n复现路径:\n- 发起一轮对话,在模型仍在输出时刷新页面或锁屏后再回到页面\n- 在窄屏设备首次打开聊天页,观察会话列表首帧覆盖聊天内容\n- 在桌面端缩窄浏览器窗口,观察侧栏始终保持完整宽度\n\n修复思路:\n- 为 chat store 增加本地缓存、水合、in-flight 标记和轮询恢复,SSE 断开后静默从服务端回补真实结果\n- 将运行中指示统一到 isRunActive,让实时流式与恢复轮询共享同一状态\n- 在 ChatPanel 首帧同步读取媒体查询,避免移动端会话列表闪烁覆盖\n- 为侧栏增加可持久化的桌面折叠状态,并补充对应文案与回归测试
2026-04-18 00:00:24 +08:00
ekko d40c224196 feat: add GitHub link to sidebar footer
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 23:29:24 +08:00
ekko bf726a9ec0 Merge branch 'dev' 2026-04-17 23:14:28 +08:00
ekko 9979871550 feat: add Codex OAuth login and fix channel config display
- Add OpenAI Codex Device Code Flow login (backend polling + frontend modal)
- Codex provider integrated into preset dropdown (hides URL/API key fields)
- Sync provider model catalogs with Hermes system
- Fix channel config not displaying on first visit (wait for data load)
- Fix sidebar model list not refreshing after adding provider
- Add autocomplete="off" to API key input to prevent browser autofill

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 23:11:57 +08:00
ekko 26bb821e29 feat: support manual model input and sync provider catalogs
- Allow manual model name input when adding custom providers (NSelect tag mode)
- Sync provider model catalogs with Hermes _PROVIDER_MODELS
- Add new providers: kimi-coding-cn, moonshot, arcee
- Fix provider key naming to match Hermes (kilo→kilocode, vercel→ai-gateway, etc.)
- Ensure custom_providers from config.yaml always appear in available-models
- Append configured default model to model list if not in catalog
- Fix provider deletion with case-insensitive key matching
- Add selectOrInput i18n key to all 8 locales

Closes #24

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 22:05:06 +08:00
ekko 4d98209d13 Merge branch 'dev' into main — v0.3.2
- fix: use deep merge for config updates to prevent nested field loss
- fix: save config inputs on blur instead of every keystroke
- fix: job edit schedule format error (#25)
- chore: add engines requirement (node >= 20)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 17:50:47 +08:00
ekko ca3fea4d0e chore: add engines requirement (node >= 20) and bump version to 0.3.2
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 17:50:28 +08:00
ekko b290b755c9 fix: use deep merge for config updates and save inputs on blur
- Backend: replace shallow merge with recursive deepMerge in PUT /api/hermes/config
  to prevent nested config fields from being lost when updating partial values
- Frontend: switch all NInput fields to default-value + @change (save on blur)
  instead of :value + @update:value (save on every keystroke) in both
  PlatformSettings.vue and SettingsView.vue api_server tab
- Remove unused debounce logic and dead changeKey function

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 17:43:54 +08:00
ekko 3d2b1c5e47 fix: job edit schedule format error and refactor services directory
- Fix #25: job update sends schedule as plain string but upstream expects
  { kind, expr, display } object, causing "'str' object has no attribute 'get'"
- Move hermes-cli.ts, hermes.ts, hermes-profile.ts into services/hermes/
  for multi-agent namespacing consistency
- Fix ts-node Set spread compatibility in filesystem.ts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 16:48:24 +08:00
ekko 9a0b50f370 fix: add MiniMax highspeed variants and deduplicate model list
- Add MiniMax-M2.7/M2.5/M2.1/M2 -highspeed variants for both
  international and China providers (#17)
- Deduplicate models in /available-models response to fix
  repeated entries when using Copilot or other providers (#18)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 12:04:20 +08:00
ekko dcb477594b feat: add 6 new locales (ja, ko, fr, es, de, pt) and UI polish
- Add Japanese, Korean, French, Spanish, German, Portuguese translations
- Improve session active state visibility in both themes
- Static language labels in LanguageSwitch component
- Dark theme: lighten chat input background for better contrast
- Fix system theme listener not toggling back to light

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 09:09:50 +08:00
ekko 16e07bcc9b feat: dark theme polish — fix sidebar layout, update button, chat input & theme switching
- Fix sidebar footer layout: separate update button from version row
- Replace custom update-hint with NButton for proper dark mode support
- Darken chat input background in dark theme for better contrast
- Fix system theme listener always applying dark mode

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 08:37:57 +08:00