oudecheng
|
cda14360af
|
chore: 建立工程化基线(rustfmt + clippy + CI + eslint + prettier)
配置:
- rustfmt.toml: 固化 max_width=100 / 4 空格缩进,cargo fmt 全量格式化
- Cargo.toml: 配置 [lints.rust] 与 [lints.clippy] 渐进式规则
- .github/workflows/ci.yml: Rust(fmt+clippy+test) + 前端(eslint+tsc+test) 双平台 CI
- Makefile: 新增 check/fmt/fix 目标,clippy 对齐 --all-targets --all-features
- web: eslint flat config + prettier 配置 + package.json 脚本与依赖
- src/main.rs: loop→while 修复 clippy::never_loop
对抗性审查发现并修复:
- eslint 缺 caughtErrorsIgnorePattern 导致 catch(_) 误报为 error
- 前端 lint 未接入 CI,现已补上 Lint 步骤
- Makefile 与 CI 的 clippy flags 不一致,已对齐
|
2026-08-03 23:24:02 +08:00 |
|
oudecheng
|
7f05545488
|
fix: session pool 锁范围收敛与 replace_todos 原子性
- SessionPool.ensure_session_internal 改为 double-checked locking:
先短暂持锁检查存在性,释放锁后执行耗时的 session 创建(含配置加载、
agent 工厂构造),再次持锁插入并处理竞态。避免跨 session_factory.create().await
持有全局锁导致所有 channel 的 session 访问串行化。
- storage::replace_todos 用 transaction() 包裹 DELETE + INSERT,保证原子性:
中途失败自动回滚,避免 todos 列表丢失且无法恢复。事务内复用同一连接
查询返回值,消除 drop(conn) 后重新 pool.get() 的冗余。
|
2026-07-31 08:23:13 +08:00 |
|
|
|
15dfc48837
|
feat: 根据 chat_id 自动选择 Session,支持定时任务专用 Session
|
2026-06-03 00:08:28 +08:00 |
|
oudecheng
|
86ba3b447e
|
feat: 添加会话管理功能,支持会话过期清理;引入 session_ttl_hours 配置项以控制会话存活时间
|
2026-05-14 15:29:37 +08:00 |
|
|
|
daec690f59
|
feat: 更新会话配置,重命名 session_ttl_hours 为 chat_history_ttl_hours,并调整相关逻辑以支持聊天历史过期管理
|
2026-05-10 19:29:55 +08:00 |
|
|
|
62b38eac73
|
feat: 添加 SessionFactory 模块,重构 SessionPool 以优化会话创建逻辑
Co-authored-by: Copilot <copilot@github.com>
|
2026-04-28 12:08:34 +08:00 |
|
|
|
65bcf34b75
|
feat: 添加 CLI 会话服务和会话池,重构 SessionManager 以优化会话管理逻辑
Co-authored-by: Copilot <copilot@github.com>
|
2026-04-28 11:55:55 +08:00 |
|