Commit Graph

60 Commits

Author SHA1 Message Date
hhs
ba6d565c0f feat: 实现 Redis 版 SessionManager(Hash + List,TTL 自动刷新) 2026-06-13 15:27:41 +08:00
hhs
f172e6c468 feat: 实现内存版 SessionManager(TTL 30 分钟,历史上限 20 条) 2026-06-13 15:25:23 +08:00
hhs
6b8bd3c554 feat: 定义 SessionManager 接口 + SessionConfigPatch 模型 2026-06-13 15:24:07 +08:00
688e13a491 Merge pull request '补充跨域处理方案(Nginx 同源反代 + Vite proxy)' (#33) from feature/phase1 into develop
Reviewed-on: http://8.161.227.145:3000/XEngineers/CamTalk/pulls/33
2026-06-13 15:20:06 +08:00
hhs
991ae4834c docs: Phase 1 移除 CORS 中间件任务
- CORS 由 Nginx 反向代理统一处理,不在后端实现
2026-06-13 15:18:11 +08:00
hhs
da87ec776b feat: main.go 接入配置 + graceful shutdown + logger 迁移
- main.go: 接入 config.Load() 替换硬编码 :8080
- main.go: 添加 signal.NotifyContext + http.Server.Shutdown(10s drain)
- main.go: 初始化 Zap 日志,prod 环境切换 Gin release 模式
- ws/handler.go: 所有 log.Printf 替换为 logger.Log 结构化日志
- 修复 .gitignore 排除规则(/server 仅匹配根目录二进制)
- 新增 zap、viper 依赖
2026-06-13 15:18:03 +08:00
hhs
c523f53724 feat: 实现配置管理(Viper)
- 新增 internal/config/config.go,定义完整配置结构体
- 支持 YAML 文件 + 环境变量覆盖(CAMTALK_ 前缀)
- 新增 config.yaml 默认配置文件
2026-06-13 15:17:37 +08:00
hhs
bce3b73480 feat: 实现错误码常量 + WS 错误发送工具
- 新增 internal/errors/codes.go
- 定义 10 个错误码常量(与接口文档一致)
- 提供 SendWSError 工具函数
2026-06-13 15:17:31 +08:00
hhs
d5d584c93b feat: 实现 Zap 日志封装
- 新增 internal/logger/logger.go
- 提供 Init(level, format) 初始化全局 SugaredLogger
- 支持 json/console 两种格式
- 提供 Sync() 刷新缓冲区
2026-06-13 15:17:26 +08:00
b76a71c128 Merge pull request 'feature/base-build' (#32) from feature/base-build into develop
Reviewed-on: http://8.161.227.145:3000/XEngineers/CamTalk/pulls/32
2026-06-13 15:02:28 +08:00
hhs
2e165a459c docs: 添加后端分阶段实施计划(8 Phase)
从基础设施到集成测试的完整实施路线图,涵盖 Session Manager、AI 服务层、
Orchestrator 编排、WS Handler 接入、REST API、Rate Limiter 等模块。
2026-06-13 15:01:38 +08:00
7e2537104d Merge pull request '实现观察模式,支持持续场景监控(US-05/US-10)' (#31) from develop-frontend5 into develop
Reviewed-on: http://8.161.227.145:3000/XEngineers/CamTalk/pulls/31
2026-06-13 14:51:57 +08:00
f5536005f6 feat: 实现观察模式,支持持续场景监控(US-05/US-10)
- 新增 useObservationMode Hook:定时 5s 采帧,similarity < 0.85 触发变化回调
- useVisionSession 新增 dialogue/observation 模式切换
- App Footer 加观察模式切换按钮(激活时蓝色脉冲)
- 视频区左上角显示'👁️ 观察中'绿色角标
- 观察模式下画面变化自动发送 query

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-13 14:46:42 +08:00
e18a2004a0 Merge pull request '实现关键帧检测与成本控制' (#30) from develop-frontend4 into develop
Reviewed-on: http://8.161.227.145:3000/XEngineers/CamTalk/pulls/30
2026-06-13 14:40:05 +08:00
2c6489b9a6 feat: 实现关键帧检测与成本控制
- EdgeProcessor:sampleFrame 降采样 160x120 + compareFrames 像素差异对比
- 重复画面跳过:similarity > 0.9 时不发送 query
- 混合采样策略:静默 5s / 用户说话 1s(docs/08-成本控制.md)
- 请求统计:queryCount + totalTokens 实时显示
- App 状态栏显示成本统计

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-13 14:38:15 +08:00
8dc59d2c09 Merge pull request '实现会话配置与多轮上下文' (#29) from develop-frontend3 into develop
Reviewed-on: http://8.161.227.145:3000/XEngineers/CamTalk/pulls/29
2026-06-13 14:24:11 +08:00
7e3762b589 feat: 实现会话配置与多轮上下文
All checks were successful
Backend CI / ci (pull_request) Successful in 1m0s
Frontend CI / ci (pull_request) Successful in 1m0s
- 新增 ConfigPanel 组件:TTS 开关、detail level、语言选择
- 新增 storage.ts:配置持久化到 localStorage
- useVisionSession:连接后自动发送 config,维护最近 10 轮对话历史
- App:齿轮按钮展开配置面板,HD 角标,TTS 播放联动 ttsEnabled

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-13 14:19:47 +08:00
hhs
0cafe94f3a docs: 补充跨域处理方案(Nginx 同源反代 + Vite proxy)
- 02-系统架构: 部署架构改为 Nginx 同源反代模型,新增完整 Nginx 配置和 Vite proxy 配置
- 03-接口文档: 连接管理新增跨域处理小节(生产 Nginx / 开发 Vite proxy / CheckOrigin 策略)
2026-06-13 14:05:57 +08:00
8033807f7c Merge pull request 'feat: 实现 TTS 语音播放,完成 MVP P0 全部用户故事' (#27) from develop-frontend2 into develop
Reviewed-on: http://8.161.227.145:3000/XEngineers/CamTalk/pulls/27
2026-06-13 14:02:28 +08:00
6a47c4dfbb feat: 实现 TTS 语音播放,完成 MVP P0 全部用户故事
- 新增 TTSPlayer:收集流式 tts_audio 片段,is_last 时拼接解码播放
- useVisionSession 接入 TTS 播放器,interrupt/stopSession 时停止播放
- App 显示 '🔊 正在播放...' 指示器
- MVP P0 四个用户故事前端全部实现(US-01 ~ US-04)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-13 13:57:36 +08:00
0ef7aa657d Merge pull request 'docs' (#26) from docs into develop
Reviewed-on: http://8.161.227.145:3000/XEngineers/CamTalk/pulls/26
2026-06-13 13:40:44 +08:00
hhs
360b2a4f50 docs: 补充配置管理规范(Viper + 环境变量)
All checks were successful
Backend CI / ci (pull_request) Successful in 1m5s
Frontend CI / ci (pull_request) Successful in 1m40s
- 03-接口文档: 新增第六章配置管理(Go 配置结构体、YAML 配置示例、环境变量覆盖规则、Viper 加载代码、启动命令示例)
- 03-接口文档: 原七~九章重新编号为八~十章
- 02-系统架构: 配置管理行补充交叉引用
- README.md: 索引补充配置管理关键词
2026-06-13 13:31:48 +08:00
hhs
ee557eaa3d docs: 补充 Session Manager 接口规范与 Redis 数据结构
- 03-接口文档: 新增第五章 Session Manager(Redis Hash+List 数据结构、TTL 策略、接口定义、Handler 集成、MVP 内存实现)
- 03-接口文档: 原五~八章重新编号为六~九章
- 02-系统架构: Session Manager 行补充 Redis 数据结构说明和交叉引用
- README.md: 索引补充 Session Manager 关键词
2026-06-13 13:24:25 +08:00
hhs
87b6407e2e docs: 补充 AI 编排层接口规范与 tts_audio 音频播放方案
- 03-接口文档: 新增第三章 AI 服务层接口(STT/LLM/TTS 三个 Service interface + 接入约定)
- 03-接口文档: 新增第四章 AI 编排器(句子级流式并行策略、Orchestrator 实现、错误降级表)
- 03-接口文档: 锁定 tts_audio 音频格式为 audio/mpeg(MP3 24kHz),新增前端 AudioPlayer 播放方案
- 02-系统架构: 更新 Orchestrator 代码为句子级流式并行实现
- README.md: 更新 03-接口文档描述,补充 AI 服务层和编排器关键词
2026-06-13 13:18:17 +08:00
2e222cbe73 Merge pull request '完善端到端对话闭环,增强消息渲染与错误处理;集成 VAD 语音活动检测,打通核心交互链路' (#24) from develop-frontend into develop
Reviewed-on: http://8.161.227.145:3000/XEngineers/CamTalk/pulls/24
2026-06-13 11:56:26 +08:00
dc5e49d216 Merge pull request 'build/actions' (#22) from build/actions into develop
Some checks failed
Backend CI / ci (pull_request) Successful in 1m5s
Frontend CI / ci (pull_request) Has been cancelled
Reviewed-on: http://8.161.227.145:3000/XEngineers/CamTalk/pulls/22
2026-06-13 11:46:47 +08:00
hhs
c7f741943d ci: 移除 health-test 工作流 2026-06-13 11:46:34 +08:00
hhs
8ce5c02730 ci: 统一 workflow 步骤名称为英文 2026-06-13 11:45:08 +08:00
734c93a866 feat: 完善端到端对话闭环,增强消息渲染与错误处理
- ChatPanel:流式光标动画、token/延迟元数据、自动滚动、三种空状态
- Toast 组件:错误码映射为中文友好文案,3 秒自动消失
- useVisionSession:stt_result 流式更新、防重复发送、打断保存未完成内容、结束清理全部状态
- App:断线提示、视频 loading 遮罩、按钮连接中状态
- ChatMessage 增加 latencyMs、model 字段

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-13 11:43:16 +08:00
fc8b67be1a Merge pull request 'fix: 修正 install node 步骤的 working-directory 并使用阿里云镜像源' (#20) from build/actions into develop
All checks were successful
Backend CI / ci (pull_request) Successful in 1m11s
Frontend CI / ci (pull_request) Successful in 30s
Reviewed-on: http://8.161.227.145:3000/XEngineers/CamTalk/pulls/20
2026-06-13 11:41:47 +08:00
hhs
3d7d7d190c fix: 修正 install node 步骤的 working-directory 并使用阿里云镜像源 2026-06-13 11:41:08 +08:00
01e3eb421c Merge pull request 'fix: 使用 Alpine 容器镜像解决 checkout action 找不到 node 的问题' (#18) from build/actions into develop
Some checks failed
Backend CI / ci (pull_request) Failing after 42s
Frontend CI / ci (pull_request) Successful in 1m7s
Reviewed-on: http://8.161.227.145:3000/XEngineers/CamTalk/pulls/18
2026-06-13 11:39:16 +08:00
hhs
c5c9bf802f fix: 使用 Alpine 容器镜像解决 checkout action 找不到 node 的问题 2026-06-13 11:38:48 +08:00
2c9159afad Merge pull request 'fix: 移除 setup-go/setup-node,宿主机已预装 Go 和 Node' (#16) from build/actions into develop
Some checks failed
Backend CI / ci (pull_request) Failing after 0s
Frontend CI / ci (pull_request) Failing after 1s
Reviewed-on: http://8.161.227.145:3000/XEngineers/CamTalk/pulls/16
2026-06-13 11:31:18 +08:00
hhs
17c8ced6bd fix: 移除 setup-go/setup-node,宿主机已预装 Go 和 Node 2026-06-13 11:29:41 +08:00
9ccd4d6238 feat: 集成 VAD 语音活动检测,打通核心交互链路
- 重写 useVAD Hook,接入 @ricky0123/vad-web 的 MicVAD
- 支持 onSpeechStart/onSpeechEnd/onVADMisfire 回调
- useVisionSession 中串联摄像头→麦克风→WebSocket→VAD 完整流程
- App.tsx 新增 VAD 加载中和错误状态的 UI 指示
- VAD 参数对齐设计文档:positiveSpeechThreshold=0.5, minSpeechMs=250

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-13 11:10:29 +08:00
e372c0022d Merge pull request 'fix: 为 uses 的 URL 加引号修复 YAML 解析错误' (#14) from build/actions into develop
Some checks failed
Backend CI / ci (pull_request) Failing after 4s
Frontend CI / ci (pull_request) Failing after 1m14s
Reviewed-on: http://8.161.227.145:3000/XEngineers/CamTalk/pulls/14
Reviewed-by: cfy777 <3087823110@qq.com>
2026-06-13 10:48:29 +08:00
hhs
2ce04dcca1 fix: 为 uses 的 URL 加引号修复 YAML 解析错误 2026-06-13 10:46:32 +08:00
cc8337bef6 Merge pull request 'build/actions' (#12) from build/actions into develop
Some checks failed
Backend CI / ci (pull_request) Failing after 1m25s
Frontend CI / ci (pull_request) Failing after 1m36s
Reviewed-on: http://8.161.227.145:3000/XEngineers/CamTalk/pulls/12
Reviewed-by: cfy777 <3087823110@qq.com>
2026-06-13 10:44:05 +08:00
hhs
8c9a9d6020 ci: 添加 health test 工作流用于验证 Gitea Actions 运行 2026-06-13 10:42:07 +08:00
hhs
324b3c9f8a fix: 移除 container 字段和 paths 过滤器,恢复 setup-go/setup-node 以兼容 Gitea Actions 2026-06-13 10:39:20 +08:00
47af4cc114 Merge pull request 'fix: 修正 Gitea Actions 工作流目录名为复数形式 workflows' (#10) from build/actions into develop
Reviewed-on: http://8.161.227.145:3000/XEngineers/CamTalk/pulls/10
Reviewed-by: cfy777 <3087823110@qq.com>
2026-06-13 10:35:42 +08:00
hhs
ebbe33aeed fix: 修正 Gitea Actions 工作流目录名为复数形式 workflows 2026-06-13 10:34:36 +08:00
aac93f19ec Merge pull request 'ci: 配置 Docker 容器运行、镜像源及自建 checkout action' (#8) from build/actions into develop
Reviewed-on: http://8.161.227.145:3000/XEngineers/CamTalk/pulls/8
Reviewed-by: cfy777 <3087823110@qq.com>
2026-06-13 10:26:30 +08:00
hhs
63933a645f ci: 配置 Docker 容器运行、镜像源及自建 checkout action 2026-06-13 10:25:02 +08:00
54cf06e1d6 Merge pull request 'ci: 调整 CI 触发分支为 main,运行环境改为 aliyun' (#6) from build/actions into develop
Reviewed-on: http://8.161.227.145:3000/XEngineers/CamTalk/pulls/6
Reviewed-by: cfy777 <3087823110@qq.com>
2026-06-13 10:06:26 +08:00
hhs
4967de3556 ci: 调整 CI 触发分支为 main,运行环境改为 aliyun 2026-06-13 10:01:43 +08:00
91cb12a47f Merge pull request 'ci: 添加前端与后端 Gitea Actions 持续集成工作流' (#4) from build/actions into develop
Reviewed-on: http://8.161.227.145:3000/XEngineers/CamTalk/pulls/4
Reviewed-by: cfy777 <3087823110@qq.com>
2026-06-13 09:44:40 +08:00
fe23053564 Merge branch 'develop' into build/actions 2026-06-13 09:42:25 +08:00
hhs
0304c1d27f ci: 添加前端与后端 Gitea Actions 持续集成工作流 2026-06-12 23:39:42 +08:00