feat: Jenkins Job 批量发布 + 全局 AI 智能助手 (v0.3.0)

参考 opsx-jenkins 发布清单:
- 批量发布页新增「粘贴清单」模式:多行 Job 名粘贴(#注释/内联对/
  名称版本交替)、TAG/分支切换、分支快捷 chips、700ms 防抖解析预览、
  串行/并发发布;未导入的 Jenkins Job 自动创建流水线后触发
- 解析器移植 opsx-jenkins parser(参数头识别/成对校验/重名检测)

全局 AI 智能助手(右下角悬浮):
- 自然语言「发布一下 cex-agent-server 等 5 个」→ 解析服务+分支+环境
  → 发布计划卡片(匹配状态着色)→ 确认 → 真实触发 → runId 回显 +
  跳转发布记录
- LLM 接入:OpenAI 兼容接口(DeepSeek/GLM/Qwen),系统设置页配置
  API Key(加密存储)+ 测试连接;未配置时自动降级本地规则模式,
  服务名/分支关键词匹配,功能不中断
- 候选池 = 流水线 + Jenkins Job(60s 缓存);精确/忽略大小写/包含
  三级匹配

新端点:POST /api/ai/chat、/api/ai/release、/api/batch/parse、
POST /api/settings/test-llm;SystemSetting 扩展 LLM 字段
This commit is contained in:
Logan.Li committed 2026-10-27 09:07:42 +08:00
1 parent 88d8fc282e
commit 581d0a8351
12 files changed
+1415 -2

No files matched your search

+6
View File
@@ -267,6 +267,12 @@ type SystemSetting struct {
Theme string `gorm:"type:text" json:"theme"` // JSON {mode,primaryColor,...}
Notification string `gorm:"type:text" json:"notification"` // JSON {email,browser,...}
ToolMode string `gorm:"default:local" json:"toolMode"` // local|jenkins
LlmEnabled bool `gorm:"default:false" json:"llmEnabled"`
LlmEndpoint string `gorm:"default:https://api.deepseek.com/v1" json:"llmEndpoint"`
LlmModel string `gorm:"default:deepseek-chat" json:"llmModel"`
LlmApiKey string `gorm:"type:text" json:"-"` // enc:v1: 加密,只写不读
LlmApiKeySet bool `gorm:"-" json:"llmApiKeySet"`
LlmMaxTokens int `gorm:"default:1200" json:"llmMaxTokens"`
Extra string `gorm:"type:text" json:"extra"`
UpdatedAt time.Time `json:"updatedAt"`
}