docs: 增加agent编写教程 - #36
Open
Craun718 wants to merge 25 commits into
Open
Conversation
…e into docs/manual
…e; branch 'main' of github.com:MaaXYZ/MaaPracticeBoilerplate into docs/manual
Craun718
marked this pull request as ready for review
July 3, 2026 02:34
Contributor
There was a problem hiding this comment.
嗨,我发现了 1 个问题,并留下了一些整体性的反馈:
- 在
my_reco.py中,建议修复类名的拼写错误(MyRecongition→MyRecognition),以保持教程代码与术语一致,并避免让读者产生困惑;如有需要,请同时更新装饰器字符串和所有引用。 - 在新的
agent.md文档中,存在一些小的标点问题,例如 “请参考其他内容)” 中多余的右括号;清理这些细节会让教程读起来更加流畅。
AI Agents 的提示词
请根据以下代码审查意见进行修改:
## 整体评论
- 在 `my_reco.py` 中,建议修复类名的拼写错误(`MyRecongition` → `MyRecognition`),以保持教程代码与术语一致,并避免让读者产生困惑;如有需要,请同时更新装饰器字符串和所有引用。
- 在新的 `agent.md` 文档中,存在一些小的标点问题,例如 “请参考[其他内容](#其他内容))” 中多余的右括号;清理这些细节会让教程读起来更加流畅。
## 逐条评论
### 评论 1
<location path="docs/zh_cn/develop/agent.md" line_range="176" />
<code_context>
+ ...
+```
+
+虽然没有在 `main.py` 中进行显示调用,但这里利用了 python 的特性,在导入时会自动执行 `my_action.py` 中的 `@AgentServer.custom_action` 装饰器,将 `MyCustomAction` 注册到 `AgentServer` 中。
+
+</details>
</code_context>
<issue_to_address>
**suggestion (typo):** 将『显示调用』改为更准确的『显式调用』,并统一 Python 大小写。
建议在这句话中将「显示调用」替换为「显式调用」,并把「python」改为「Python」,以与全文术语和大小写保持一致。
```suggestion
虽然没有在 `main.py` 中进行显式调用,但这里利用了 Python 的特性,在导入时会自动执行 `my_action.py` 中的 `@AgentServer.custom_action` 装饰器,将 `MyCustomAction` 注册到 `AgentServer` 中。
```
</issue_to_address>帮我变得更有用!请在每条评论上点击 👍 或 👎,我会根据你的反馈持续改进代码审查质量。
Original comment in English
Hey - I've found 1 issue, and left some high level feedback:
- In
my_reco.py, consider fixing the class name typo (MyRecongition→MyRecognition) to keep the tutorial code aligned with the terminology and avoid confusing readers, updating the decorator string and any references if needed. - In the new
agent.mddocument, there are a couple of minor punctuation issues such as the extra closing parenthesis in “请参考其他内容)”; cleaning these up will make the tutorial read more smoothly.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `my_reco.py`, consider fixing the class name typo (`MyRecongition` → `MyRecognition`) to keep the tutorial code aligned with the terminology and avoid confusing readers, updating the decorator string and any references if needed.
- In the new `agent.md` document, there are a couple of minor punctuation issues such as the extra closing parenthesis in “请参考[其他内容](#其他内容))”; cleaning these up will make the tutorial read more smoothly.
## Individual Comments
### Comment 1
<location path="docs/zh_cn/develop/agent.md" line_range="176" />
<code_context>
+ ...
+```
+
+虽然没有在 `main.py` 中进行显示调用,但这里利用了 python 的特性,在导入时会自动执行 `my_action.py` 中的 `@AgentServer.custom_action` 装饰器,将 `MyCustomAction` 注册到 `AgentServer` 中。
+
+</details>
</code_context>
<issue_to_address>
**suggestion (typo):** 将『显示调用』改为更准确的『显式调用』,并统一 Python 大小写。
建议在这句话中将「显示调用」替换为「显式调用」,并把「python」改为「Python」,以与全文术语和大小写保持一致。
```suggestion
虽然没有在 `main.py` 中进行显式调用,但这里利用了 Python 的特性,在导入时会自动执行 `my_action.py` 中的 `@AgentServer.custom_action` 装饰器,将 `MyCustomAction` 注册到 `AgentServer` 中。
```
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
…ate into docs/manual
Contributor
Author
|
默佬批注:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
添加一份中文的 AgentServer 开发指南,并调整示例代理实现,以展示基础的自定义识别和动作用法。
New Features:
Enhancements:
Original summary in English
Summary by Sourcery
Add a Chinese AgentServer development guide and adjust demo agent implementations to showcase basic custom recognition and action usage.
New Features:
Enhancements:
文档:
Original summary in English
Summary by Sourcery
添加一份中文的 AgentServer 开发指南,并调整示例代理实现,以展示基础的自定义识别和动作用法。
New Features:
Enhancements:
Original summary in English
Summary by Sourcery
Add a Chinese AgentServer development guide and adjust demo agent implementations to showcase basic custom recognition and action usage.
New Features:
Enhancements: