新增功能: - 在LLM趋势分析中集成历史告警上下文,提供最近3次已触发告警的记录 - LLM自动判断本次分析是否与历史告警相似,避免重复通知 - 新增shouldNotify和notifyReason字段,支持智能通知决策 技术改进: - 扩展TrendAnalysisResponse类型,增加通知决策字段 - 数据库服务新增getRecentTriggeredAnalyses()方法 - LLM客户端新增analyzeTrendWithHistory()和相关方法 - 趋势分析服务集成历史上下文获取和通知决策逻辑 测试验证: - 创建test-db-history-method.ts验证数据库方法 - 创建test-llm-history-context.ts测试历史上下文功能 - 通过TypeScript类型检查和构建验证 这个功能可以有效减少重复告警,提升告警质量,避免通知疲劳。 Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
34 lines
296 B
Plaintext
34 lines
296 B
Plaintext
# 依赖
|
|
node_modules/
|
|
package-lock.json
|
|
yarn.lock
|
|
pnpm-lock.yaml
|
|
|
|
# 构建产物
|
|
dist/
|
|
*.tsbuildinfo
|
|
|
|
# 环境变量
|
|
.env
|
|
.env.local
|
|
.env.*.local
|
|
|
|
# 数据和日志
|
|
src/data/*.json
|
|
logs/*.log
|
|
|
|
# IDE
|
|
.vscode/
|
|
.idea/
|
|
*.swp
|
|
*.swo
|
|
*~
|
|
|
|
# 操作系统
|
|
.DS_Store
|
|
Thumbs.db
|
|
|
|
# 临时文件
|
|
*.tmp
|
|
*.temp
|