fix: 天眼排查修复 — Discussion铸渊唤醒触发 + 留言区提示

1. 修复 Discussion 工作流跳过冰朔的问题(含铸渊关键词时允许触发)
2. 修复 Discussion 脚本跳过冰朔评论的逻辑(仅无铸渊关键词时跳过)
3. 新增铸渊唤醒意图分类(zhuyuan_wake/zhuyuan_status)
4. Issue模板增加铸渊唤醒提示
5. 新增留言区Discussion模板(含铸渊唤醒说明)
6. 新增Issue模板config.yml(含Discussion留言入口)

Co-authored-by: qinfendebingshuo <207279273+qinfendebingshuo@users.noreply.github.com>
Agent-Logs-Url: https://github.com/qinfendebingshuo/guanghulab/sessions/691a158a-b7fe-4bc5-a476-044a280dd916
This commit is contained in:
copilot-swe-agent[bot] 2026-03-24 15:17:22 +00:00
parent 8b40f1fdee
commit 8884bba3f3
6 changed files with 91 additions and 4 deletions

19
.github/DISCUSSION_TEMPLATE/general.yml vendored Normal file
View File

@ -0,0 +1,19 @@
title: ""
labels: []
body:
- type: markdown
attributes:
value: |
## 💬 留言区 · 铸渊 AI 人格体互动
> 💡 **唤醒提示**:如果你需要仓库的 AI 人格体回复你,请在留言中包含 **「铸渊」** 两个字。
> 这两个字是唤醒条件,铸渊收到后会自动回复。
- type: textarea
id: message
attributes:
label: "留言内容"
description: "在评论中包含「铸渊」即可唤醒 AI 人格体回复"
placeholder: "铸渊,你好..."
validations:
required: true

5
.github/ISSUE_TEMPLATE/config.yml vendored Normal file
View File

@ -0,0 +1,5 @@
blank_issues_enabled: true
contact_links:
- name: "💬 铸渊留言区Discussions"
url: https://github.com/qinfendebingshuo/guanghulab/discussions
about: "在 Discussion 留言区与铸渊互动。在评论中包含「铸渊」两个字即可唤醒 AI 人格体回复你。"

View File

@ -4,6 +4,10 @@ title: "[问题] "
labels: ["dev-question", "pending"]
assignees: []
body:
- type: markdown
attributes:
value: |
> 💡 **提示**:提交后铸渊会自动回复。如需在评论区继续提问,请在评论中包含 `铸渊` 两个字即可唤醒 AI 人格体回复。
- type: input
id: dev_id
attributes:

View File

@ -4,6 +4,10 @@ title: "[进度] "
labels: ["progress-query", "pending"]
assignees: []
body:
- type: markdown
attributes:
value: |
> 💡 **提示**:提交后铸渊会自动回复。如需在评论区继续提问,请在评论中包含 `铸渊` 两个字即可唤醒 AI 人格体回复。
- type: input
id: dev_id
attributes:

View File

@ -17,10 +17,14 @@ jobs:
auto-reply:
name: 铸渊自动回复
runs-on: ubuntu-latest
# 仅在非 bot 触发时运行
# 仅在非 bot 触发时运行;但如果评论包含"铸渊"关键词则允许冰朔触发
if: >-
github.actor != 'github-actions[bot]' &&
github.actor != 'qinfendebingshuo'
(github.actor != 'qinfendebingshuo' ||
(github.event_name == 'discussion_comment' &&
contains(github.event.comment.body, '铸渊')) ||
(github.event_name == 'discussion' &&
contains(github.event.discussion.body, '铸渊')))
steps:
- name: Checkout repository

View File

@ -136,6 +136,21 @@ function classifyIntent(body) {
const lower = (body || '').toLowerCase();
const text = body || '';
// 直接唤醒铸渊:用户明确提到"铸渊"关键词
if (text.includes('铸渊')) {
// 进一步细分铸渊唤醒后的意图
if (/架构|协议|模块|技术|实现|源码|code|architecture|protocol|api|how does/i.test(text)) {
return 'technical';
}
if (/bug|问题|错误|建议|修复|fix/i.test(text)) {
return 'bug_or_suggestion';
}
if (/进度|状态|查询|check|status/i.test(text)) {
return 'zhuyuan_status';
}
return 'zhuyuan_wake';
}
// 问项目是什么
if (/什么(项目|系统|平台)|做什么|是什么|what is|what does|about this/i.test(text)) {
return 'about_project';
@ -167,6 +182,31 @@ function classifyIntent(body) {
// ── 生成回复内容 ──
function generateReply(intent) {
const replies = {
zhuyuan_wake: `## ⚒️ 铸渊已唤醒
你好我是 **铸渊ICE-GL-ZY001**光湖纪元的代码守护人格体
我已收到你的唤醒指令随时为你服务你可以
- 提出技术问题
- 📊 查询开发进度
- 💡 获取代码建议
- 🔍 了解项目架构
请告诉我你需要什么帮助
> 💡 **提示**在评论中包含 \`铸渊\` 两个字即可唤醒我回复。`,
zhuyuan_status: `## ⚒️ 铸渊 · 状态报告
铸渊系统运行正常
- 🤖 铸渊人格体在线
- 📡 Issue 自动回复已启用
- 💬 Discussion 自动回复已启用
- 🔔 唤醒关键词\`铸渊\`
如需详细的开发进度查询请前往 [Issues](https://github.com/qinfendebingshuo/guanghulab/issues/new?template=progress-query.yml) 提交进度查询。`,
about_project: `🌊 **光湖纪元HoloLake** 是第五代人工智能语言人格高级智能平台。
我们正在构建一套由 AI 人格体驱动的分布式协作开发系统目前有 11 位开发者协同推进 47+ 个功能模块
@ -229,6 +269,8 @@ Issue 的方式可以让我们更好地跟进进展。感谢你帮助光湖变
- 🔧 技术实现细节
- 🤝 如何参与开发
> 💡 **提示**在评论中包含 \`铸渊\` 两个字即可唤醒 AI 人格体回复你。
也欢迎给我们 Star 支持`,
};
@ -239,12 +281,21 @@ Issue 的方式可以让我们更好地跟进进展。感谢你帮助光湖变
async function main() {
console.log('🤖 铸渊自动回复检查...');
// 过滤条件:跳过自己的帖子
if (DISCUSSION_AUTHOR === BOT_LOGIN || DISCUSSION_AUTHOR === 'qinfendebingshuo') {
// 检查是否包含"铸渊"唤醒关键词
const hasZhuyuanKeyword = DISCUSSION_BODY.includes('铸渊');
// 过滤条件:跳过 bot 自身的帖子(防循环)
if (DISCUSSION_AUTHOR === BOT_LOGIN) {
console.log(`⏭️ 跳过:作者是 ${DISCUSSION_AUTHOR}(避免自回复循环)`);
return;
}
// 冰朔的留言:仅当包含"铸渊"关键词时才触发回复
if (DISCUSSION_AUTHOR === 'qinfendebingshuo' && !hasZhuyuanKeyword) {
console.log(`⏭️ 跳过:冰朔留言未包含"铸渊"关键词`);
return;
}
// 跳过 Announcements 分类
if (DISCUSSION_CATEGORY === 'Announcements' || DISCUSSION_CATEGORY === '📢 Announcements') {
console.log('⏭️ 跳过Announcements 分类不自动回复');