 kevinandClaude
|
eff4972668
|
重构:拆出 internal/config 与 internal/store 子包
把工程根目录中和"配置加载"、"数据存储"两个领域相关的全部 Go 文件迁到
internal/ 下的子包,按功能分组的第一阶段成果。
internal/config/
- 从 config.go 抽出 Config / MQTTConfig / WebConfig / DatabaseConfig 等
类型并大写导出,函数改名 Default/Load/Write/Validate/BuildTLS 等。
- 测试随被测代码迁移成 package config 的内部测试。
- 根目录留 config.go 作桥接:用 type alias 让旧的小写名(config /
mqttConfig / databaseConfig 等)继续可用,避免修改 30+ 处调用方。
internal/store/
- 把 db.go、store_query.go、db_write_queue.go 与 13 个 *_store.go 一并
迁入;26 个 *Record 类型与 store 同包以避免循环依赖。
- store -> Store;50+ 标识符从小写未导出改为大写导出(包括 record、
ListOptions、错误变量、bot/llm/runtime 常量、helpers 等)。
- 新增 DB() / Driver() 访问器供 ai 子系统使用,避免直接访问私有字段。
- bot_pki_store.go 独立出来,把 PKI 解密所需的 store 方法集中归类。
- helpers.go 提供 hashPassword / uint32FromRecord / printJSON 等以前在
其他根目录文件中的辅助;test_helpers_test.go 提供 verifyPassword
与 publicMapTileSourceDTO 让测试可以本地运行而不依赖 main 包。
根目录新增:
- store_bridge.go:完整 type-alias / 函数包装层,把 internal/store 的
导出名映射回旧的小写名,让 admin_*_routes.go、web.go、bot_service.go
等仍未迁出的文件继续编译。后续步骤把它们迁到各自领域包后可逐步删除。
- test_helpers_test.go:根目录测试沿用 openTestStore 的入口。
go build ./... 与 go test ./... 全部通过;测试数量与重构前一致。
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-06-18 13:56:36 +08:00 |
|
kevin
|
6f6b06e37d
|
up
|
2026-06-18 12:24:18 +08:00 |
|
kevin
|
f3ee4035bb
|
up
|
2026-06-17 20:58:01 +08:00 |
|
kevin
|
b0a9f52096
|
实现每机器人独立 LLM 消息队列
主要变更:
- 后端:为 botNodeRecord 添加 llm_queue_enabled 和 llm_include_channel_messages 字段
- 后端:移除全局 LLM 队列开关,完全基于每个机器人的设置
- 后端:重写 enqueueChannelMessageToLLM,为每个启用了「包含频道消息」的机器人创建独立队列记录
- 后端:频道消息不再使用 bot_id=0,每条消息都有明确的机器人归属
- 前端:AdminLLM.vue 完全重写,添加机器人 LLM 设置面板
- 前端:消息列表表格新增「机器人」列,显示机器人名称和节点 ID
- 前端:消息类型判断逻辑改为使用 channel_id 区分频道/私聊
- 前后端类型同步更新
|
2026-06-17 20:51:22 +08:00 |
|
kevin
|
e2bf6aa173
|
up
|
2026-06-17 20:18:37 +08:00 |
|
 kevinandClaude
|
2840aca69b
|
修复签到日历人数显示
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-06-16 20:56:50 +08:00 |
|
 kevinandClaude
|
8690265fa0
|
新增签到日历筛选
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-06-16 20:49:21 +08:00 |
|
 kevinandClaude
|
d36455ce71
|
修复签到页顶部导航显示
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-06-16 20:26:13 +08:00 |
|
 kevinandClaude
|
6084897bdb
|
新增签到管理功能
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-06-16 20:16:28 +08:00 |
|
 kevinandClaude
|
eeefdaa180
|
调整轨迹浮窗宽度
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-06-16 19:56:42 +08:00 |
|
 kevinandClaude
|
5b873ea059
|
修复轨迹浮窗文字布局
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-06-16 19:54:01 +08:00 |
|
kevin
|
3a94cf2c3e
|
Merge branch 'feature/web-listener-toggles'
|
2026-06-16 19:50:28 +08:00 |
|
 kevinandClaude
|
e6a8826a8f
|
显示轨迹全部坐标节点
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-06-16 19:45:27 +08:00 |
|
 kevinandClaude
|
0f04047517
|
支持 Web 端口和 Sock 同时启用
Co-Authored-By: Claude <noreply@anthropic.com>
|
2026-06-16 19:36:47 +08:00 |
|
kevin
|
f00f030ef3
|
节点移出地图不消失
|
2026-06-16 18:56:19 +08:00 |
|