0.11.1: 旗舰版完善(资源权限等级/个人环境变量/收藏/企业报表/租户概览/ARM64发布/多渠道接入)

- 迁移 000035-000037(权限等级/环境变量/渠道)
- 新增 internal/channel 渠道抽象层(webhook/企微/钉钉/飞书)
- 全部功能端到端验证通过(25 包单测)
This commit is contained in:
2026-08-13 11:54:34 +08:00
parent c22669c31d
commit 4563979a15
25 changed files with 1664 additions and 7 deletions
+7
View File
@@ -225,6 +225,13 @@ func (s *Service) callApplication(ctx context.Context, appCode, secret string, m
}
func (s *Service) Chat(ctx context.Context, account identity.Account, code, message string, variables map[string]any) (map[string]any, error) {
// 个人环境变量合并:请求未提供的变量用用户配置补充。
if s.envVars != nil && variables == nil {
variables = map[string]any{}
if err := s.envVars.MergeVariables(ctx, account.ID, variables); err != nil {
return nil, err
}
}
message = strings.TrimSpace(message)
if message == "" || len(message) > 100000 {
return nil, errors.New("消息为空或过长")