From 8884bba3f3dc978436895f6f87c035a29efdc238 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 24 Mar 2026 15:17:22 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=A4=A9=E7=9C=BC=E6=8E=92=E6=9F=A5?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20=E2=80=94=20Discussion=E9=93=B8=E6=B8=8A?= =?UTF-8?q?=E5=94=A4=E9=86=92=E8=A7=A6=E5=8F=91=20+=20=E7=95=99=E8=A8=80?= =?UTF-8?q?=E5=8C=BA=E6=8F=90=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .github/DISCUSSION_TEMPLATE/general.yml | 19 +++++++ .github/ISSUE_TEMPLATE/config.yml | 5 ++ .github/ISSUE_TEMPLATE/dev-question.yml | 4 ++ .github/ISSUE_TEMPLATE/progress-query.yml | 4 ++ .github/workflows/auto-reply-discussions.yml | 8 ++- scripts/auto-reply-discussions.js | 55 +++++++++++++++++++- 6 files changed, 91 insertions(+), 4 deletions(-) create mode 100644 .github/DISCUSSION_TEMPLATE/general.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/DISCUSSION_TEMPLATE/general.yml b/.github/DISCUSSION_TEMPLATE/general.yml new file mode 100644 index 00000000..781c3672 --- /dev/null +++ b/.github/DISCUSSION_TEMPLATE/general.yml @@ -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 diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..cbe02bf7 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,5 @@ +blank_issues_enabled: true +contact_links: + - name: "💬 铸渊留言区(Discussions)" + url: https://github.com/qinfendebingshuo/guanghulab/discussions + about: "在 Discussion 留言区与铸渊互动。在评论中包含「铸渊」两个字即可唤醒 AI 人格体回复你。" diff --git a/.github/ISSUE_TEMPLATE/dev-question.yml b/.github/ISSUE_TEMPLATE/dev-question.yml index 464295e9..62285e58 100644 --- a/.github/ISSUE_TEMPLATE/dev-question.yml +++ b/.github/ISSUE_TEMPLATE/dev-question.yml @@ -4,6 +4,10 @@ title: "[问题] " labels: ["dev-question", "pending"] assignees: [] body: + - type: markdown + attributes: + value: | + > 💡 **提示**:提交后铸渊会自动回复。如需在评论区继续提问,请在评论中包含 `铸渊` 两个字即可唤醒 AI 人格体回复。 - type: input id: dev_id attributes: diff --git a/.github/ISSUE_TEMPLATE/progress-query.yml b/.github/ISSUE_TEMPLATE/progress-query.yml index c32413e5..fbb8e0c0 100644 --- a/.github/ISSUE_TEMPLATE/progress-query.yml +++ b/.github/ISSUE_TEMPLATE/progress-query.yml @@ -4,6 +4,10 @@ title: "[进度] " labels: ["progress-query", "pending"] assignees: [] body: + - type: markdown + attributes: + value: | + > 💡 **提示**:提交后铸渊会自动回复。如需在评论区继续提问,请在评论中包含 `铸渊` 两个字即可唤醒 AI 人格体回复。 - type: input id: dev_id attributes: diff --git a/.github/workflows/auto-reply-discussions.yml b/.github/workflows/auto-reply-discussions.yml index db1cbfad..6b9226f6 100644 --- a/.github/workflows/auto-reply-discussions.yml +++ b/.github/workflows/auto-reply-discussions.yml @@ -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 diff --git a/scripts/auto-reply-discussions.js b/scripts/auto-reply-discussions.js index 9229bca9..a4446714 100644 --- a/scripts/auto-reply-discussions.js +++ b/scripts/auto-reply-discussions.js @@ -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 分类不自动回复');