2aac62b2bb
feat(live2d): implement OpenGL ES 2.0 rendering backend with EGL support
...
- Add `gl.rs` for OpenGL ES 2.0 and EGL context management.
- Introduce `mod.rs` to organize Live2D plugin modules.
- Create `model.rs` for loading and managing Cubism models, including parameter handling and drawable data extraction.
- Implement shader compilation and rendering context setup for Live2D models.
2026-07-07 16:04:49 +08:00
a0c4ca2307
feat(M2.1): AI 语音对话插件骨架 + 模型管理 + HTTP API + config schema 扩展
...
这是 M2.1(语音数字生命 V1)的后端骨架实现,不含 Web UI / Flutter / 设备部署。
新增文件:
- src/plugins/ai/mod.rs: AiPlugin 薄层(持有 ChatPipeline Arc,处理消息系统联动)
- src/plugins/ai/backend.rs: AiBackend trait + LocalCliBackend (whisper-cli/llama-cli/piper 子进程)
+ CloudBackend 占位(V1 返回"暂未支持")
- src/plugins/ai/chat.rs: ChatPipeline 对话管线执行器(HTTP 层 spawn_blocking 直接调用)
- src/plugins/ai/model_manager.rs: ModelManager 模型资产管理
(清单/下载/切换/删除/配额/档位守门,参照 plugin_repo + version_manager 模式)
修改文件:
- src/core/message.rs: 新增 ChatRequest/ChatResponse/AiModelEvent 消息类型
- src/core/config.rs: AppConfig 新增 character 块(角色元信息+人设)+ ai 块(后端配置)
均为 #[serde(default)] 向后兼容旧配置
- src/plugins/mod.rs: 注册 ai 模块
- src/plugins/http/mod.rs: HttpState 新增 ai_pipeline + ai_models 字段及注册方法;
HttpPlugin 新增 set_ai_pipeline/set_ai_models 方法
- src/plugins/http/routes.rs: 新增 6 个 AI 相关路由
- POST /api/chat/text (文字对话,Web 端主路径)
- POST /api/chat/audio (语音对话,App 主路径)
- GET /api/models (模型清单+水位+配额)
- POST /api/models/download (下载模型,后台线程执行)
- POST /api/models/switch (切换激活模型)
- POST /api/models/delete (删除模型,保护当前激活)
- src/main.rs: 注册 AiPlugin,连接 pipeline 到 HttpPlugin
技术决策:
- 对话管线用 spawn_blocking 而非消息系统,满足 HTTP 同步响应需求
- ChatPipeline 用 Arc<Mutex> 共享,HTTP 和 AiPlugin 共用同一实例
- 互斥用 try_lock,忙时返回 409 而非阻塞
- Spike 结论固化: LLM t=2 锁大核、ctx=1024 限死、Qwen2.5-0.5B 默认档
待完成 (后续提交):
- Web 控制端 UI (文字对话 + 角色切换 + 模型管理界面)
- Flutter App (角色页/语音页/模型管理页)
- 设备端部署 llama.cpp/whisper.cpp/piper 二进制 + 模型下载
- 画面联动 (talk/idle 状态切换)
- 测试
注: Windows 开发环境缺 dbus,无法本地 cargo check;待目标机验证。
2026-07-04 15:01:00 +08:00
showen
584f65b9f5
feat: DevicePlugin Task2 — DevicePlugin骨架 + DeviceBackend trait + 模块注册
2026-03-13 06:32:14 +08:00
showen
45c0a8d54b
feat: video/state_machine unit tests and on_video_completed logic fix
...
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-12 08:20:25 +08:00
showen
23f4d46287
init: ShowenV2 项目骨架 — 数字生命窗口平台
...
- core/ 跨平台内核骨架 (Plugin trait, Message, ServiceManager, Config)
- plugins/ 空桩 (video, http, ble, screen, wifi)
- PROGRESS.md 进度跟踪, TEAM.md 团队档案
- cargo check 零 warning 通过
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com >
2026-03-12 05:03:58 +08:00