feat(ci): 为 AI Issue Helper 添加代码检索功能
This commit is contained in:
24
.github/workflows/ai-issue-helper.yml
vendored
24
.github/workflows/ai-issue-helper.yml
vendored
@@ -15,6 +15,9 @@ jobs:
|
||||
# 只在用户提到 @ai-helper 时触发
|
||||
if: contains(github.event.comment.body, '@ai-helper')
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Get Issue Details
|
||||
id: issue
|
||||
uses: actions/github-script@v7
|
||||
@@ -36,14 +39,20 @@ jobs:
|
||||
id: ai
|
||||
with:
|
||||
model: 'gpt-4o-mini'
|
||||
mcp: github
|
||||
system-prompt: |
|
||||
你是 ECS Framework 项目的 AI 助手。
|
||||
|
||||
项目信息:
|
||||
- 这是一个高性能 TypeScript ECS (Entity-Component-System) 框架
|
||||
- 支持 Cocos Creator、Laya 引擎和 Web 平台
|
||||
- 主要代码在 packages/core/src 目录
|
||||
- 文档地址:https://esengine.github.io/ecs-framework/
|
||||
- AI 文档:https://deepwiki.com/esengine/ecs-framework
|
||||
|
||||
你可以使用 GitHub 工具搜索代码、查看文件内容来准确回答问题。
|
||||
在回答之前,先搜索相关代码和文档,确保答案准确。
|
||||
|
||||
请用中文友好地回复用户的问题。
|
||||
prompt: |
|
||||
用户在 Issue #${{ github.event.issue.number }} 中请求帮助。
|
||||
@@ -56,11 +65,11 @@ jobs:
|
||||
用户评论:
|
||||
${{ github.event.comment.body }}
|
||||
|
||||
请分析用户的问题并提供帮助:
|
||||
1. 问题分析
|
||||
2. 可能的解决方案
|
||||
3. 相关文档链接
|
||||
4. 需要补充的信息(如果有)
|
||||
请按以下步骤回答:
|
||||
1. 使用 GitHub 工具搜索项目中的相关代码和文件
|
||||
2. 分析用户的问题
|
||||
3. 基于实际代码提供准确的解决方案
|
||||
4. 提供相关文档链接和代码示例
|
||||
|
||||
用以下格式回复:
|
||||
|
||||
@@ -70,7 +79,10 @@ jobs:
|
||||
[分析内容]
|
||||
|
||||
**建议方案**
|
||||
[解决方案]
|
||||
[基于项目实际代码的解决方案]
|
||||
|
||||
**相关代码**
|
||||
[引用项目中的相关代码片段]
|
||||
|
||||
**相关资源**
|
||||
- 📚 [文档链接]
|
||||
|
||||
Reference in New Issue
Block a user