feat: 微信公众号技能包重命名(weixin_public_account)并增强功能

- 将 wechat_official_account 重命名为 weixin_public_account,符合中文命名规范
- 新增 DOCX 文档生成技能、聊天历史、请求 ID 中间件
- 增强工作流、热点服务、文章服务等模块功能
- 前端同步重命名组件和 API
- 新增架构文档 AR13/AR14、专员文档更新
- 补充测试用例(seed_specialists_test, db_migration_test)

Co-Authored-AI: yes
This commit is contained in:
eaiadmin
2026-09-24 21:13:19 +08:00
parent 593323a934
commit 89ae31c998
60 changed files with 7251 additions and 967 deletions
@@ -0,0 +1,17 @@
package model
import "time"
// ChatConversation 一次完整的多轮对话(业务会话),用于聊天记录持久化与回溯。
type ChatConversation struct {
ID uint `gorm:"primaryKey" json:"id"`
UserID uint `gorm:"not null;index" json:"user_id"`
ConversationID string `gorm:"size:128;uniqueIndex;not null" json:"conversation_id"` // 业务会话ID
SpecialistKey string `gorm:"size:64" json:"specialist_key"`
SpaceKey string `gorm:"size:64" json:"space_key"`
Title string `gorm:"size:256" json:"title"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
func (ChatConversation) TableName() string { return "chat_conversation" }
@@ -0,0 +1,17 @@
package model
import "time"
// ChatMessage 单条对话消息(用户提问或 AI 回复),归属某个 ChatConversation。
type ChatMessage struct {
ID uint `gorm:"primaryKey" json:"id"`
ConversationID string `gorm:"size:128;index;not null" json:"conversation_id"`
UserID uint `gorm:"not null;index" json:"user_id"`
Role string `gorm:"size:16;not null;index" json:"role"` // user / assistant
Content string `gorm:"type:text" json:"content"`
// Meta 可选结构化信息(如 citations / layer / intent 等),以 JSON 字符串存储。
Meta string `gorm:"type:text" json:"meta,omitempty"`
CreatedAt time.Time `json:"created_at"`
}
func (ChatMessage) TableName() string { return "chat_message" }