Files
plugin-comment-ai-autopilot/src/main/resources/extensions/settings.yaml
T
sunny-335 767efdccbb feat: v1.0.0-beta.2 - ExtensionGetter integration, UI revamp, bug fixes
- Replace cross-ClassLoader reflection with ExtensionGetter.getEnabledExtension(AiModelService.class)
- Declare optional pluginDependencies (ai-foundation?: "*") and recommended-apps annotation
- Use OutputSpec.choice for structured classification (sentiment, review safety/quality)
- Use GenerateTextRequest with maxRetries=2 for reliable chat generation
- Add multi-turn conversation context (conversation_history placeholder)
- Fix RateLimitService thread leak (implement DisposableBean)
- Two-stage AI review: safety check + 1-5 quality score mapped to 0-100
- Remove redundant dashboard cards (sentiment distribution, 7-day trend, avg score)
- Redesign settings page with tabbed navigation (basic/persona/model/prompt/cleanup)
- Fix settings layout (move tab bar out of grid container)
- Fix button icon+text alignment via :deep(.btn-content) inline-flex
- Add review score grade labels (excellent/good/fair/poor) in logs
2026-06-17 19:40:10 +08:00

88 lines
3.1 KiB
YAML

apiVersion: v1alpha1
kind: Setting
metadata:
name: comment-ai-autopilot-settings
spec:
forms:
- group: basic
label: 基本设置
formSchema:
- $formkit: switch
name: autoReply
label: 自动回复
value: true
- $formkit: switch
name: autoPublish
label: 自动发布
value: true
- $formkit: number
name: maxRetryCount
label: 最大重试次数
value: 3
min: 1
max: 10
- $formkit: number
name: maxConversationRounds
label: 最大对话轮次
help: 同一评论线程中AI最多自动回复的轮次,超过后不再回复
value: 8
min: 1
max: 100
- $formkit: number
name: rateLimitPerMinute
label: 速率限制
help: 每分钟最大AI回复数量,防止批量评论消耗过多额度
value: 10
min: 1
max: 100
- $formkit: textarea
name: blockedCommenters
label: 评论者黑名单
help: "输入评论者显示名称或邮箱,多个用逗号分隔。支持正则表达式,以 regex: 开头,如 regex:^spam.*"
value: ""
- group: model
label: 模型设置
formSchema:
- $formkit: text
name: modelName
label: AI模型名称
help: 留空使用AI Foundation默认模型,填写AiModel资源名称可指定模型
value: ""
- group: prompt
label: Prompt设置
formSchema:
- $formkit: textarea
name: customPromptTemplate
label: 自定义Prompt模板
value: "{{persona_prompt}}\n\n{{safety_prompt}}\n\n【语言要求】请用评论所使用的语言回复。如果评论是英文,请用英文回复;如果是中文,请用中文回复;如果是日文,请用日文回复;以此类推。\n\n请回复以下评论。注意:\n- 回复长度应与评论长度匹配,简短问候简短回复\n- 不要复述或总结文章内容\n- 自然对话,不要写小作文\n- 只有评论涉及具体内容时才针对性回应\n\n文章(仅供理解上下文,不要复述):\n{{article}}\n\n{{conversation_history}}\n评论:\n{{comment}}"
- $formkit: select
name: enabledPresets
label: 启用预设
help: 选择要启用的Prompt预设风格
value: []
multiple: true
options:
- label: 友好型
value: friendly
- label: 专业型
value: professional
- label: 幽默型
value: humorous
- label: 简洁型
value: concise
- group: cleanup
label: 数据清理
formSchema:
- $formkit: switch
name: cleanupEnabled
label: 启用自动清理
value: true
- $formkit: number
name: retentionDays
label: 保留天数
help: 超过此天数的AI回复记录将被自动清理
value: 30
min: 1
max: 365