feat: improve refactor workflow guide.

This commit is contained in:
Rankin Zheng 2024-04-02 10:49:05 +08:00
parent 2eb2d8abb0
commit ae9fca1442

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)