Commit Graph
27 Commits
Author SHA1 Message Date
Aska 77f75b0d99 refactor(web): 前端单页收敛修正——导航式侧边栏 + 去输入模式 chip,mode 由后端自切
按设计/01 §3 + 主人要求:行为模式切换由后端/agent 自切(热切换),前端不再提供
手动切换的行为模式按钮列表。
- 侧边栏改为导航式(连接状态 / 设置 / 管理面板 / 主题),不再列行为模式按钮;
  App.tsx 还原 <Sidebar/> 布局。
- ChatInput 去掉行为模式 chip 切换条(模式不由用户手选)。
- useChat.send/chatStream 不再传 mode;消息 mode 由后端在回复时决定,
  MessageBubble 仍按 message.mode 渲染。
- ChatShell onVoice 为占位(语音处理在 agent)。
2026-09-06 14:04:46 +08:00
Aska 4aab0f501a feat(web): 前端收敛为「共享消息流 + 按消息 mode 渲染」,并补全 emoji→MD3 图标
CI / Backend (build / vet / test / cross-compile) (push) Has been cancelled
CI / Frontend (tsc + vite build) (push) Has been cancelled
架构变更(主人要求,design/07 §1/§2 已改定稿):把「9 个行为模式 = 9 个独立页面」改为
「一个共享页面 + 每条消息绑 mode,消息框按对应 mode 渲染」。
- ChatMessage 增 mode?(types.ts);useAppStore addUserMessage/beginAssistant 带 mode;
  useSendChat.send(text, mode) / chatStream body 带 mode(通知后端按 mode 回复)。
- MessageBubble 按 message.mode 分发到 components/messages/ 各形态渲染器
  (chat 气泡 / code 等宽代码块 / home 设备卡 / docs 文档卡 / work 任务卡 / vision 视觉卡)。
- ChatInput 顶部加「行为模式」chip 切换下一条消息的 mode(默认 chat);输入框上方显示当前模式。
- ModeRouter 收敛为只渲染 ChatShell;删除 9 个旧独立 mode 页面;Nav/TopBar 的 mode 改为
  「输入模式」语义;settings 归管理面板(design/10)。

同时补全上一轮 emoji→MD3 图标(约 23 文件):新增 Icon.tsx(MD3 SVG、IconName、零依赖、
离线优先),全部界面 emoji 替换为 <Icon name=... />;正文说明箭头保留。

npm run build 绿(tsc 0 错,79→71 模块,JS 284KB/gzip 86KB)。
2026-09-06 13:32:44 +08:00
Aska a482bc2ea7 feat(web): MD3 矢量图标组件 + 全量 emoji 替换为新图标
新增 src/components/Icon.tsx(Material Symbols Rounded 风格,24 viewBox / currentColor /
零运行时依赖 / 可 tree-shake / 离线优先),导出 <Icon name size /> 与 IconName 类型,
覆盖全部现有界面图标的语义映射(chart/dna/chat/memory/docs/plugin/channel/device/robot/
clock/agent/night/trend/users/settings/light/ac/mic/micOff/sun/moon/lock/block/check/close/
gear/file/package/folder/shield/storage/refresh/vision/home/arrow/terminal)。

将用户端(Nav/TopBar/ChatInput/chat + 各 modes)与管理面板(sidebar 15 模块/Dashboard
卡片/System SectionTitle/Observability StatCard/Agents/Backthink/Automations/AdminTable
empty)中的 emoji 图标全部替换为 <Icon name=... />,icon 字段由 string 改为 IconName /
ReactNode。保留正文说明性箭头(如“设置→连接”)与流程方向箭头。

npm run build(tsc --noEmit + vite build)通过:79 模块,JS 300KB/gzip 90KB。
2026-09-06 13:12:22 +08:00
Aska a7feaeb2cb feat(deploy): M11 单二进制装配(cmd/cyrene 全链路 wire + go:embed 前端 + 外置 dist 覆盖 + 优雅关闭 + SPA 静态服务);前端 build 拷到 internal/webui/dist 2026-09-06 08:10:35 +08:00
Aska f43eb17030 feat(frontend/admin): M10 后台管理面板(/admin hash 路由 + 15 大模块 + RBAC(owner/admin/viewer) + 审计 + Miuix);Docs/api-client.md v0.3 契约补全;tsc+vite build 通过 2026-09-06 07:55:04 +08:00
Aska 4c48e94659 feat(frontend): M9 模态 UI(mode 系统+共享 store+WS 客户端 + chat(思维链/工具回显/情绪徽标)/code/Agent 监控/后台思考页 + Miuix 设计 token + PWA);tsc+vite build 通过 2026-09-06 07:44:40 +08:00
Aska 4be3826af7 chore: 清空 v2 实现,重建新架构骨架(人格化通用 Agent 运行时) 2026-09-05 23:09:26 +08:00
Aska 2104fc0c6c feat(frontend): voice input and read-aloud UI
- assistant messages get a 🔊 button that fetches TTS audio and plays
  it, toggling to stop
- ChatInput gains a mic button: MediaRecorder capture, base64 upload to
  /voice/stt, recognized text fills the input
- api client: voice.tts (blob) and voice.stt helpers
2026-08-21 18:31:24 +08:00
Aska b8fb7feb86 feat(ai-core): mood state machine and affection level
Cyrene CI / backend (push) Has been cancelled
Cyrene CI / frontend (push) Has been cancelled
- new emotion package: rule-based sentiment (positive/negative lexicon)
  drives mood transitions (开心/平静/难过) with 30min inactivity decay;
  affection 0-100 grows with positive interaction, with 初识→熟悉→信赖→
  羁绊 tiers
- pipeline records each user message and injects a mood line into the
  system prompt so the persona's tone follows her mood
- mood changes broadcast over WS; frontend shows a mood badge with
  affection tooltip; also handles the 'reminder' message type from the
  reminder scheduler
- tests: sentiment scoring, mood shift, affection bounds, prompt line,
  onChange callback
2026-08-21 18:13:23 +08:00
Aska 26d65dd6bb feat(frontend): message search and session export entry points
Cyrene CI / backend (push) Has been cancelled
Cyrene CI / frontend (push) Has been cancelled
- SearchModal queries GET /messages/search and jumps to the matching
  session; opened from the sidebar button or Ctrl+K
- session items in the sidebar gain a hover export button that
  downloads the markdown export via an authenticated fetch + blob
  (plain links cannot send the JWT)
2026-08-21 12:59:30 +08:00
Aska 8603839711 feat(ai-core): trace instrumentation, LLM thinker, decay scheduler
Cyrene CI / backend (push) Has been cancelled
Cyrene CI / frontend (push) Has been cancelled
- orchestrator: Tracer interface with spans for intent analysis, persona,
  subsession dispatch, context build, LLM streaming and each tool call;
  traces finish when the stream completes — the admin Trace waterfall
  finally receives data
- background: Thinker generates real LLM thoughts (post-chat + silence
  triggers, recent history as context, empty/overlong outputs discarded);
  thoughts broadcast to web clients as 'thinking' WS messages; pipeline
  postChatHook triggers post-chat thinking after each round
- memory: ApplyDecayAll + ListUserIDs with a 6h decay/purge cron in main
  (was implemented but never scheduled)
2026-08-20 20:57:27 +08:00
Aska 8190007865 feat(frontend): session list sidebar and persisted history loading
Cyrene CI / backend (push) Has been cancelled
Cyrene CI / frontend (push) Has been cancelled
- Sidebar lists sessions with title/relative time, click to switch,
  hover-to-delete; refreshes after each round so new titles appear
- ChatPage loads message history from GET /sessions/:id/messages when
  entering a session
- WS connect now passes user_id so persisted messages have an owner
2026-08-20 20:34:08 +08:00
Aska 9a3c77dbd3 fix(bridge): align admin panel field keys with backend adapter settings
Frontend sent remote_url/bot_token/webhook_url while the backend reads
ws_url/token/listen_addr, so QQ adapters could never connect. Also add
the missing bot_qq field and wire the webhook adapter's APIKey.
2026-08-20 19:40:32 +08:00
Aska dee48b6766 feat: add automation, reminders, notifications, msg search, session export, image analysis, host exec, PWA, Docker, E2E, CI/CD
Cyrene CI / backend (push) Has been cancelled
Cyrene CI / frontend (push) Has been cancelled
- Automation: rules CRUD (in-memory store + API)
- Reminders: CRUD (in-memory store + API)
- Notifications: push interface for future push server
- Message search: API endpoint with DB-backed query
- Session export: /sessions/:id/export → Markdown
- Image analysis: API stub for multimodal LLM
- Host exec: API stub for Docker sandbox
- PWA: manifest.json + service worker
- Docker: Dockerfile + docker-compose.yml
- E2E: Playwright test scaffold
- CI/CD: GitHub Actions workflow (go test + tsc)
2026-08-12 19:43:46 +08:00
Aska 5b2bcc9441 fix(frontend): resolve TypeScript errors in TracePage
- Fix if-else missing semicolon (TS1005)
- Fix useRef missing initial value (TS2554)
2026-08-12 18:57:23 +08:00
Aska 4e2e81f684 feat(trace): waterfall visualization + persona YAML sync
- trace.Logger: Trace+Span model with 14+ hop tracking
- trace.SpanTimer: convenience API for instrumentation
- trace_adapter.go: serialize Trace+Span for frontend
- Frontend TracePage: colored waterfall bars, expand/collapse, detail popup
- persona.go: full v1 YAML parser (identity/traits/forbidden/sections)
- cyrene_persona.yaml: v1 persona config copied to v2
- Orchestrator: TraceHook + MemoryExtractor injection points
2026-08-12 18:52:39 +08:00
Aska ba42ea2b45 fix(bridge): add complete OBv11 fields matching v1 ethend
- OBv11: mode (client/server), remote_url, access_token, http_url,
  http_token, bot_port, send_interval_ms, admin_uids (8 fields)
- Telegram: bot_token, webhook_url, admin_uids
- Discord/Webhook: proper fields with labels
- Mode dropdown selector for client/server
- Field labels and placeholders matching v1
2026-08-12 18:12:39 +08:00
Aska 9eaed2883f feat(bridge): separate bridge config from .env, web panel + hot-reload
- BridgeConfigStore: file-backed JSON config (configs/bridge.json)
- Auto-creates config file only when user saves via admin panel
- Hot-reload: watches config file every 5s, reloads adapters live
- Admin API: GET/PUT/DELETE /api/v1/admin/bridge/config/:name
- Frontend: full CRUD page with platform type selector + toggle
- Removed bridge env vars from .env.example
2026-08-12 17:55:15 +08:00
Aska 2a23ecdbdb fix(ui): remove blue background behind avatar image
- Remove bg-primary from avatar containers in Login/Chat/MessageList/Header
- Avatar image now fills container cleanly with object-cover
- Preserve shadow glow effect
2026-08-12 17:44:31 +08:00
Aska 5faa955bce feat(ui): add light theme with system auto-switch + Cyrene avatar
- Miuix day/night dual theme CSS variables
- themeStore: light default, follows prefers-color-scheme
- Header: sun/moon toggle button
- All components migrated to CSS variables
- Cyrene avatar image replaces 'C' logo everywhere
- Favicon added
2026-08-12 17:42:18 +08:00
Aska e8b5679cf4 feat(admin): add full-chain trace and performance monitoring
- Backend: trace.Logger ring-buffer for request chain events
- Backend: perf.Monitor with runtime.MemStats sampling every 10s
- Backend: /api/v1/admin/trace and /api/v1/admin/perf endpoints
- Frontend: TracePage — timeline with hop icons and status dots
- Frontend: PerformancePage — memory/GC bar charts + live stats
- Admin nav expanded to 11 items
2026-08-12 17:16:33 +08:00
Aska 8420691438 feat(admin): add model config CRUD and platform bridge pages
- Backend: ModelConfigStore with Provider/Model/Routing CRUD
- Backend: /api/v1/admin/models/config endpoints
- Frontend: ModelsPage with 3-tab editor (providers/models/routing)
- Frontend: BridgePage showing adapter status + group chat rules
- Admin nav expanded to 9 items
2026-08-12 17:13:29 +08:00
Aska 1a80ac2a00 feat(admin): add LLM call logs, system info, plugin list pages
- ai-core/llm: ring-buffer call logger with stats
- Gateway: /api/v1/admin/llm-calls, /system, /plugins, /sessions endpoints
- Frontend: LLMCallsPage (table + stats), SystemPage (version/plugins/sessions)
- Admin nav expanded to 7 items
2026-08-12 16:56:52 +08:00
Aska 8bfda096f7 feat(admin): rebuild admin panel with full management features
- AdminLayout: sidebar navigation (5 pages)
- Dashboard: real-time service/plugin/uptime stats
- Services: status display for all 4 services
- IoT Management: 8 devices with toggle controls
- Plugins: 11 plugins grid with type badges
- Memory: full CRUD with search, add, delete
- 60 modules, TS zero errors, 256KB JS
2026-08-12 16:45:21 +08:00
Aska bea29d3b73 style(frontend): redesign with Miuix HyperOS design language
- Color system: Miuix dark tokens (primary #277AF7, bg #242424, surface #000)
- Components: rounded-full buttons, squircle cards (18px), glass header
- Messages: blue user bubbles, dark AI bubbles with typing animation
- Admin dashboard: stat cards with real-time service status
- Login: centered logo with gradient shadow, HyperOS input fields
- Smooth transitions and scale-on-press interactions
2026-08-12 16:41:34 +08:00
Aska 4a71965686 feat(frontend): add React SPA with chat, auth, and admin pages
- Vite 6 + React 19 + TypeScript + Tailwind 4 + Zustand 5
- Login page with JWT auth
- Chat interface: MessageList, ChatInput, ChatContainer
- WebSocket hook with auto-reconnect and exponential backoff
- Sidebar with new chat button + session navigation
- Admin dashboard placeholder
- 57 modules, 242KB JS, TypeScript zero errors
2026-08-12 11:47:22 +08:00
Aska 14d5d6e555 chore: init Cyrene_v2 project structure and DevDocs
- Create directory structure for backend, frontend, deployment, tests
- .gitignore with DevDocs/ excluded from version control
- DevDocs: 00-overview, 01-cross-platform, 02-dev-constraints
- DevDocs decisions: 002-communication (NATS), 003-plugin-architecture
- DevDocs modules: ai-core analysis, gateway analysis
2026-08-09 20:18:56 +08:00