Merge pull request #87 from devchat-ai/feat/improve-readme-guide

Improve Workflow Guides and Image Spacing Adjustment
This commit is contained in:
boob.yang 2024-04-02 11:04:41 +08:00 committed by GitHub
commit e0627bf780
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 42 additions and 62 deletions

View File

@ -1,13 +1,12 @@
需要输入参数,使用指南如下:
### 操作指南
## 1.选中代码
选中你需要注释的代码,右键唤出菜单,点击"DevChat: Generate Comments"向AI助手发起求。或者在DevChat聊天窗口键入/comments 直接发起行间注释工作流。
![图片](https://deploy-script.merico.cn/devchat/workflow/comments_1.png)
![图片](https://deploy-script.merico.cn/devchat/workflow/comments_2.png)
## 2.生成注释
等待结果,而后进行差异比对。
![图片](https://deploy-script.merico.cn/devchat/workflow/comments_3.gif)
## 3.比对差异
生成结束后,工作流会自动调用差异比对界面。你可以看到注释代码的差异,接受他们或者逐行比对。
![图片](https://deploy-script.merico.cn/devchat/workflow/comments_4.png)
生成行间注释,请按照如下步骤操作:
1. 选中行间代码。
2. 输入\/comments回车发送或右键点击**DevChat: Generate Comments**按钮。
3. 开始生成行间注释,等待生成结束。
4. 自动弹出Diff View选择是否接受修改。
如图所示:
![图片](https://deploy-script.merico.cn/devchat/workflow/readme_comments.gif)

View File

@ -1,18 +1,12 @@
需要输入参数,使用指南如下:
### 操作指南
## 1.选中代码
生成函数注释,请按照如下步骤操作:
1. 选中函数代码。
2. 输入\/docstring回车发送或点击函数头部**docstring**按钮。
3. 开始生成函数注释,等待生成结束。
4. 自动弹出Diff View选择是否接受修改。
选中你需要注释的函数,点击函数头部的"docstring"按钮,向 AI 助手发起求。或者在 DevChat 聊天窗口,键入/docstring 直接发起文档注释工作流。
![图片](https://deploy-script.merico.cn/devchat/workflow/docstring_1.png)
![图片](https://deploy-script.merico.cn/devchat/workflow/docstring_2.png)
如图所示:
## 2.生成文档
等待结果,而后进行差异比对。
![图片](https://deploy-script.merico.cn/devchat/workflow/docstring_3.gif)
## 3.比对差异
生成结束后,工作流会自动调用差异比对界面。你可以看到注释代码的差异,接受他们或者逐行比对。
![图片](https://deploy-script.merico.cn/devchat/workflow/docstring_4.png)
![图片](https://deploy-script.merico.cn/devchat/workflow/readme_docstring.gif)

View File

@ -1,15 +1,11 @@
需要输入参数,使用指南如下:
### 操作指南
## 1.选中代码
生成代码解释,请按照如下步骤操作:
1. 选中行间代码。
2. 输入\/explain回车发送或右键点击**DevChat: Generate Explain**按钮。
3. 开始生成代码解释,等待生成结束。
选中你需要解释的代码,右键唤出菜单,点击"DevChat: Generate Explain",向 AI 助手发起解释请求。或者再 DevChat 聊天窗口,键入/explain 直接发起代码解释工作流。
![图片](https://deploy-script.merico.cn/devchat/workflow/explain_1.png)
![图片](https://deploy-script.merico.cn/devchat/workflow/explain_2.png)
如果你是希望解释整个函数还可以点击函数头部的“explain”按钮发起请求。
![图片](https://deploy-script.merico.cn/devchat/workflow/explain_3.png)
如图所示:
## 2.开始解释
此时,你只需要等待结果即可。
![图片](https://deploy-script.merico.cn/devchat/workflow/explain_4.gif)
![图片](https://deploy-script.merico.cn/devchat/workflow/readme_explain.gif)

View File

@ -1,17 +1,12 @@
需要输入参数,使用指南如下:
### 操作指南
## 1.选中代码
使用代码纠错,请按照如下步骤操作:
1. 选中行间代码。
2. 输入\/fix回车发送或右键点击**DevChat: Fix this**按钮。
3. 开始生成代码建议,等待生成结束。
4. 自动弹出Diff View选择是否接受修改。
选中你需要纠错的代码右键唤出菜单点击“DevChatFix this”。或者在 DevChat 聊天窗口,键入/fix 直接发起代码纠错工作流。
![图片](https://deploy-script.merico.cn/devchat/workflow/fix_1.png)
如图所示:
## 2.分析代码
开始生成以后AI 会根据选中的代码,对命名规范、代码格式、逻辑错误等给出自己的优化意见。生成结束以后,还会调用 DevChat 的差异比对界面,方便用户查看修改点。
![图片](https://deploy-script.merico.cn/devchat/workflow/fix_2.gif)
## 3.比对差异
在差异对比界面,您可以点击 DevChat 图标接受修改,或者逐行查看变更。
![图片](https://deploy-script.merico.cn/devchat/workflow/fix_3.png)
![图片](https://deploy-script.merico.cn/devchat/workflow/readme_fix.gif)

View File

@ -1,17 +1,12 @@
需要输入参数,使用指南如下:
### 操作指南
## 1.选中代码
使用代码重构,请按照如下步骤操作:
1. 选中行间代码。
2. 输入\/refactor.names回车发送。
3. 开始生成代码,等待生成结束。
4. 自动弹出Diff View选择是否接受修改。
选中你需要重构的代码,在 DevChat 聊天窗口,键入/refactor 发起代码重构工作流。
![图片](https://deploy-script.merico.cn/devchat/workflow/refactor.name_1.png)
如图所示:
## 2.生成代码
此时,你只需要等待结果即可。等给出自己的优化意见。生成结束以后,自动调用 DevChat 的差异比对界面,方便用户查看修改点。
![图片](https://deploy-script.merico.cn/devchat/workflow/refactor.name_2.gif)
## 3.对比差异
在差异对比界面,您可以点击 DevChat 图标接受修改,或者逐行查看变更。
![图片](https://deploy-script.merico.cn/devchat/workflow/refactor.name_3.png)
![图片](https://deploy-script.merico.cn/devchat/workflow/readme_refactor.names.gif)

View File

@ -8,4 +8,5 @@
4. 点击提交按钮,等待生成结束。
如图所示:
![图片](https://deploy-script.merico.cn/devchat/workflow/readme_unit_tests.gif)