Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

如何在纯前端版里对 git 插件进行改造,使得 git 插件可用? #64

Open
guoqiwen8 opened this issue Aug 2, 2023 · 1 comment

Comments

@guoqiwen8
Copy link

guoqiwen8 commented Aug 2, 2023

目前无法展示 scm 面板
image

@Ricbet
Copy link
Member

Ricbet commented Aug 2, 2023

@guoqiwen8 如果你想要在纯前端里实现 git 插件相关的功能,你需要做以下事情

  • 由于是纯前端,没有 node 环境,那么需要实现一个 worker 插件来实现 scm 面板,插件文档可以看 这里
  • scm 面板使用到的 api 是 Source Control API,具体见 vscode 官方的插件 api 文档
  • 此时 scm 面板已经具备了前端能力,比如 input 输入框、文件树列表等。那么后端服务接口的对接得看你对接的是什么托管平台。比如 github 或 gitlab 等

以上就是解决方案,另外,直接拿 vscode 内置的 git 插件进行改造成本还是比较大的,所以不建议改造 git 插件。

最后,可以期待我们即将要开源的基于 OpenSumi 的纯前端框架 Codeblitz,也会有该场景的示例和插件

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants