Commit Graph
231 Commits
Author SHA1 Message Date
Sakurasan e472ed93d5 交换图表位置 2026-08-30 18:07:04 +08:00
Sakurasan 80ecf38676 fix: responsive Home header buttons for mobile and desktop 2026-08-30 17:57:24 +08:00
Sakurasan 4b845e14fc feat: redesign LineSegmentFlow + dev improvements
- LineSegmentFlow: LobeHub brand icons, concave left curves, glow effects
- Dark mode: line colors adapt, animated lines glow in dark theme
- Vite: enable LAN access (host: 0.0.0.0)
- VSCode: workspace settings for performance optimization
- Toast: redesign with icons, progress bar, better animations
2026-08-30 17:05:41 +08:00
Sakurasan 8f6acb981d 缩短dashboard名称 调整通知样式 2026-08-30 15:53:11 +08:00
Sakurasan 6cc76c6767 chore: add hot reload for development
- Makefile: add dev-backend (air) and dev-frontend (vite) targets
- backend/.air.toml: air config for Go live reload
- .gitignore: exclude backend/tmp/
2026-08-30 15:33:16 +08:00
Sakurasan f3af42a65f chore: upgrade Go version to 1.26
- backend/go.mod: go 1.26
- deploy/docker/Dockerfile: golang:1.26-alpine
- deploy/docker/Dockerfile.cn: golang:1.26-alpine
2026-08-30 15:29:02 +08:00
Sakurasan 094230a293 feat: API key management improvements
- Rename routes: /dashboard/tokens → /dashboard/apikeys, /dashboard/manager/keys → /dashboard/manager/channels
- Add KeyPlain field to store plaintext API keys for re-viewing
- API key list shows masked key (sk-ot-123456****abcd) with eye toggle to reveal
- Copy button with 2s feedback on key list
- TokenNew shows full key + copy after creation
- Increase key prefix display to 12 characters
- Fix SQLite driver: replace gorm.io/driver/sqlite with ncruces/go-sqlite3/gormlite
- Fix user.status === 'active' checks across frontend views
- Add channel store for new channels API
- Update Makefile frontend build to work reliably

BREAKING CHANGE: Existing API keys created before this change will not show their plaintext value (only prefix visible).
2026-08-30 15:21:49 +08:00
Sakurasan 96e4853d6e 移除旧文档 2026-08-30 13:45:29 +08:00
Sakurasan 253e968c9d chore: restore REFACTOR_PLAN.md (frontend refactoring plan) 2026-08-30 12:12:12 +08:00
Sakurasan eadf9525ee chore: clean up unused files
Removed:
- openteam binary from root (use bin/)
- opencatd.db (runtime artifact)
- dist/ (duplicate, already in backend/cmd/openteam/dist/)
- REFACTOR_PLAN.md (superseded by BACKEND_REFACTOR_PLAN.md)
- .pi/ (IDE artifact)

Updated .gitignore for new backend/ paths.
2026-08-30 12:10:23 +08:00
Sakurasan 902ecaeacc refactor: move backend files to backend/ directory
Reorganize project structure:
- backend/cmd/openteam/ — entry point
- backend/internal/ — core packages
- backend/middleware/ — HTTP middleware
- backend/router/ — route setup
- backend/wire/ — dependency injection
- backend/pkg/ — shared utilities
- backend/go.mod, go.sum — Go module files

Updated Makefile to work from backend/ directory.
Removed old lowercase makefile.
2026-08-30 12:02:52 +08:00
Sakurasan ef3025dd80 refactor: complete backend rewrite for multi-protocol proxy
Major rewrite of the Go backend to support:
- Three API format imports: openai, anthropic, compatible
- Three protocol conversions: Chat Completions, Responses, Messages
- Hub-and-spoke architecture with Chat as intermediate format

Deleted:
- opencat.go (old entry)
- store/, team/, pkg/team/, pkg/store/ (old data layer)
- internal/model/, internal/consts/ (old types)
- internal/service/team/, internal/controller/team/ (old handlers)
- llm/ (removed LLM client library, pure proxy mode)
- dist/, assets/ (old build artifacts)

Added:
- internal/store/ — 9 GORM models + multi-DB support
- internal/pkg/ — crypto (AES-GCM), apikey, jwt, ratelimit, resp, tokenizer
- internal/channel/ — channel selection, weighted LB, health checks
- internal/proxy/convert/ — 6 protocol conversion functions + SSE streaming
- internal/proxy/ — gateway with request dispatch and upstream selection
- internal/usage/ — async usage recorder with batch writes
- internal/api/ — management API (auth, users, keys, channels, models)
- Makefile for build/test/deploy

Fixed API to match frontend expectations:
- Login response wraps token in { data: { token } }
- GET /api/profile route added
- Profile response wraps user in { code, data }
- Role returned as number (10=admin, 1=user)
2026-08-30 11:49:31 +08:00
Sakurasan aa0d87f132 fix(proxy): guard nil SupportModels before dereference in setModelCache 2026-08-30 03:16:50 +08:00
Sakurasan 963da99fd6 ci: add multi-arch dev image build script
- deploy/docker/build-dev.sh + make image-dev: linux/amd64+arm64 build & push,
  dev/dev-<sha>/dev-<date> tags, registry inline cache, auto create buildx builder
- PUSH=0 falls back to host-arch build with --load for local verification
- verified end-to-end (PUSH=0): container frontend build, CGO-free cross compile,
  upx pack 31.7MB->11.8MB, image smoke test 200
2026-08-30 02:11:11 +08:00
Sakurasan 33f5e7b71a rewrite: toast stacking with daisyui toast container
- module-level reactive toast list in composables/toast (setToast signature unchanged, 13 call sites untouched)
- multiple toasts stack simultaneously in daisyUI toast container, each auto-dismisses (3s) with close button
- TransitionGroup enter/leave animation (transform/opacity, honors reduced-motion)
- drop provide/inject queue that blocked consecutive toasts
2026-08-30 01:54:57 +08:00
Sakurasan 1e07c5903f redesign: site-wide UI/UX overhaul per web-interface-guidelines
- unified design system: focus-visible rings, reduced-motion, color-scheme,
  theme persistence, tightened emerald radius tokens (checkbox circle bug)
- redesigned all pages: Home/Login/Signup/404, dashboard shell, Overview hero
  (time-based gradient), list pages with empty states, form modals, detail pages
- role-scoped navigation: console menu vs admin console with cross-switch
  entries, Chinese route titles and breadcrumbs
- theme switcher (light/dark/auto) via composables/theme, home + dashboard
- state-driven dropdowns (touch-safe logout), menu divider pointer-events fix
- btn-primary unified to black-on-white / white-on-black per theme
- update REFACTOR_PLAN.md (increments 2-6)
2026-08-30 01:35:10 +08:00
Sakurasan ac0a6808ec refactor: frontend TS migration + Tailwind4/daisyUI5 unify + BUILDPLATFORM docker build
- migrate frontend to TypeScript (vue-tsc strict in build), upgrade all deps to latest (Vite 8, Tailwind 4, daisyUI 5, Pinia 4, vue-router 5)
- restructure frontend dirs (api/components/common/layouts/styles/types/views)
- drop Element Plus, add daisyUI TagInput; main CSS 490KB->163KB, entry JS 618KB->1.3KB
- rewrite Dockerfile(.cn): frontend/backend stages pinned to $BUILDPLATFORM, CGO_ENABLED=0 cross-compile, no QEMU in multi-arch builds; add .dockerignore
- local dev: Vite /api proxy + make dev targets; go:embed all:dist with .gitkeep so backend runs without prior frontend build
- fix latent bugs: Keys.vue users ref, Settings.vue undefined userStore, Login.vue Ref-as-error display, res.error misuse
- add REFACTOR_PLAN.md (phased refactor log)
2026-08-29 23:27:31 +08:00
Sakurasan 4a68ff6162 add claude proxy 2025-07-30 11:18:47 +08:00
Sakurasan 6b2d78fe56 fix:maxTokens 2025-05-04 02:52:04 +08:00
Sakurasan 9c604460b1 fix empty models 2025-04-22 02:52:56 +08:00
Sakurasan 8d34f8d6fe up 2025-04-22 02:16:28 +08:00
Sakurasan 6d1d0f3b6b up 2025-04-22 02:08:32 +08:00
Sakurasan 24529189d9 fix daily usage 2025-04-22 01:50:50 +08:00
Sakurasan 000162b1b1 fix usage 2025-04-22 01:06:03 +08:00
Sakurasan 6662ea5e04 fix record usage 2025-04-22 00:48:24 +08:00
Sakurasan 5789d50e9e update record usage 2025-04-21 23:59:30 +08:00
Sakurasan ca3d89751d fix stream usage 2025-04-21 22:48:28 +08:00
Sakurasan 2bc857cf88 add log 2025-04-21 21:59:13 +08:00
Sakurasan a9ff7e1c94 add log 2025-04-21 21:50:29 +08:00
Sakurasan 51d4651c6c up 2025-04-21 20:19:48 +08:00
Sakurasan e112f3af12 collect usage 2025-04-21 19:10:27 +08:00
Sakurasan 73e53c2333 add models task 2025-04-21 01:40:06 +08:00
Sakurasan 470e49b850 support fetch models 2025-04-21 01:30:17 +08:00
Sakurasan d426781e47 UP 2025-04-20 19:21:51 +08:00
Sakurasan b80f0759a5 fix select key 2025-04-20 18:33:59 +08:00
Sakurasan b83c6d9786 fix active key,suffix 2025-04-20 16:22:23 +08:00
Sakurasan fe0f2a7e88 key icon 2025-04-20 02:59:08 +08:00
Sakurasan ed42f3ded7 fix UI & token copy 2025-04-20 02:03:13 +08:00
Sakurasan 54246c542a up 2025-04-19 01:35:18 +08:00
Sakurasan ca305f4199 fetch model & add apitype 2025-04-19 01:21:28 +08:00
Sakurasan f8e539c9b4 add cli load 2025-04-18 19:05:23 +08:00
Sakurasan e0b531c578 fix passkey 2025-04-18 02:47:10 +08:00
Sakurasan afb51b0a94 remove 2025-04-17 23:56:28 +08:00
Sakurasan 3c4619b98c fix UI 2025-04-17 23:50:02 +08:00
Sakurasan efd38034ac push home 2025-04-17 23:35:03 +08:00
Sakurasan d4bf227cd8 fix UI 2025-04-17 23:15:43 +08:00
Sakurasan fca67cae40 fix UI 2025-04-17 23:09:57 +08:00
Sakurasan 20c3cda4a7 fix bugs 2025-04-17 21:02:00 +08:00
Sakurasan 9045130778 fix findkey 2025-04-17 20:42:08 +08:00
Sakurasan 5403ed0cba fix store bug 2025-04-17 20:15:41 +08:00