主要思路是使用 Cursor 等工具,借助 AI 的能力让他查找位置,并完成代码改写替换
1、第一步
在 VSCode 的插件中找到 GitLens 目录,大致定位一下需要修改的地方,如我的版本是 17.4.1。
找到 dist/webviews/graph.js 文件
2、在未修改前的 GitLens 提示弹窗中 copy 提示文本:
3、在 Cursor 中打开 graph.js,然后 agent 中让 AI 干脏活。如:
分析 graph.js 的代码把 Commit Graph Pro — easily visualize your repository and keep track of all work in progress. Use the rich commit search to find a specific commit, message, author, a changed file or files, or even a specific code change. Use on privately-hosted repos requires GitLens Pro. or sign in Get 14 days of GitLens Pro for free — no credit card required. 这部分的弹窗代码移除,不需要弹窗逻辑
4、把 Cursor 加工后的代码保存,重启一下 VSCode,发现修改完成

