5 Star 11 Fork 0

Gitee 极速下载/GitHub-VSC

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/gao-sun/github-vsc
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
engineering.md 2.28 KB
一键复制 编辑 原始数据 按行查看 历史
gao-sun 提交于 4年前 . Update README.md (#8)

Engineering

Remote Session

Overview

The architecture is quite simple:

Browser VSC <---wss---> Runner Server <---wss---> Runner Client

This is what will happen when you click "Start Session" in browser:

  1. Browser VSC establishes WebSocket connection to the runner server.
  2. Browser VSC requests a new session.
  3. Runner server generates a new session ID and tell Browser VSC the session is started.
  4. Browser VSC tries to launch runner client by dispatching workflow with session data.
  5. Browser VSC waits for runner client status report.
  6. Workflow installs and launches runner client.
  7. Runner server receives runner client for current session, then tells browser VSC it's ready to use.

Note the workflow will run in a forked repo to avoid easy usage limit hitting.

Terminal

When runner client is online, terminal data will be exchanged via WebSocket. Session ID is required to map correct clients.

Port Forwarding

Only HTTP requests are supported for now. WebSocket forwarding is not availble.

VSCode in Web

The VSCode in your browser contains only static assets and it's hosted by GitHub Pages. The deployment is in github-vsc-website.

From Open-Source to Open-Source

Powered by the Code - OSS project, and use the tag 1.53.2 for building. Would like not to do any modifications to keep it clean, but here comes to the result (I've tried hard, trust me):

  • src/vs/code/browser/workbench/workbench.ts for simple workbench and several html window related commands.
  • src/vs/code/browser/workbench/one_dark.ts for One Dark theme.
  • src/vs/workbench/browser/parts/activitybar/activitybarActions.extended.ts for an extended command to set the index of active side bar. (They just have go prev/next for now, interesting)
  • src/vs/workbench/contrib/welcome/page/browser/vs_code_welcome_page.ts for customized welcome page.

VSCode Extension

Heads to extensions/github-vsc, and 2 webpack configs will be shown:

  • webpack.extension.js and extension/ for extension itself which runs in a webworker environment.
  • webpack.web.js and control-panel/ for the control panel web view which using React / SASS modules.
  • d.ts/ and types/ include shared type definitions.
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
TypeScript
1
https://gitee.com/mirrors/GitHub-VSC.git
git@gitee.com:mirrors/GitHub-VSC.git
mirrors
GitHub-VSC
GitHub-VSC
master

搜索帮助