first commit

This commit is contained in:
sunny-335
2026-06-14 22:28:19 +08:00
commit e03ba7a20d
67 changed files with 13400 additions and 0 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

@@ -0,0 +1,29 @@
apiVersion: v1alpha1
kind: AnnotationSetting
metadata:
name: comment-ai-autopilot-post-annotation-setting
spec:
targetRef:
group: content.halo.run
kind: Post
formSchema:
- $formkit: switch
name: comment-ai-autopilot.nxxy335.top/ai-reply-enabled
label: 启用AI回评
value: true
help: 开启后,该文章收到评论时将自动触发AI回复
---
apiVersion: v1alpha1
kind: AnnotationSetting
metadata:
name: comment-ai-autopilot-single-page-annotation-setting
spec:
targetRef:
group: content.halo.run
kind: SinglePage
formSchema:
- $formkit: switch
name: comment-ai-autopilot.nxxy335.top/ai-reply-enabled
label: 启用AI回评
value: false
help: 开启后,该页面收到评论时将自动触发AI回复
@@ -0,0 +1,18 @@
apiVersion: v1alpha1
kind: Role
metadata:
name: comment-ai-autopilot-role-manage
labels:
halo.run/role-template: "true"
annotations:
rbac.authorization.halo.run/module: "Comment AI Autopilot Management"
rbac.authorization.halo.run/display-name: "AI回评管理"
rbac.authorization.halo.run/ui-permissions: |
["plugin:comment-ai-autopilot:manage"]
rules:
- apiGroups: ["comment-ai-autopilot.nxxy335.top"]
resources: ["comment-ai-autopilot/aicommentreplies"]
verbs: ["*"]
- apiGroups: ["console.api.comment-ai-autopilot.nxxy335.top"]
resources: ["*"]
verbs: ["*"]
@@ -0,0 +1,60 @@
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: textarea
name: blockedCommenters
label: 评论者黑名单
help: 输入评论者显示名称,多个用逗号分隔。这些评论者的评论不会触发AI回复
value: ""
- group: persona
label: AI角色设置
formSchema:
- $formkit: text
name: personaName
label: AI角色昵称
value: "小回"
- $formkit: textarea
name: personaPrompt
label: AI角色人格提示词
value: "你是「小回」,一个友善的评论者。你的回复简洁自然,像朋友聊天一样。简短的评论就简短回复,有深度的讨论才展开回应。不要长篇大论,不要复述文章内容。"
- $formkit: email
name: personaEmail
label: AI角色邮箱
help: 用于Gravatar头像服务展示头像
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评论:\n{{comment}}"
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

+27
View File
@@ -0,0 +1,27 @@
# Refer https://docs.halo.run/developer-guide/plugin/basics/manifest
apiVersion: plugin.halo.run/v1alpha1
kind: Plugin
metadata:
# The name defines how the plugin is invoked, A unique name
name: comment-ai-autopilot
spec:
enabled: true
requires: ">=2.23.0"
author:
name: 暖心向阳335
website: https://github.com/暖心向阳335
logo: logo.png
homepage: https://github.com/暖心向阳335/comment-ai-autopilot#readme
repo: https://github.com/暖心向阳335/comment-ai-autopilot
issues: https://github.com/暖心向阳335/comment-ai-autopilot/issues
displayName: "AI回评"
description: "基于 AI 的 Halo 博客评论自动回复插件,支持 AI 虚拟角色回复、自审核、自动发布和对话式连续回复"
license:
- name: "GPL-3.0"
url: "https://github.com/暖心向阳335/comment-ai-autopilot/blob/main/LICENSE"
settingName: "comment-ai-autopilot-settings"
configMapName: "comment-ai-autopilot-configmap"
version: "0.0.1-w5s2t7"
pluginDependencies:
ai-foundation?: "*"