Full Code of conwnet/github1s for AI

master 71ac760cb1ca cached
240 files
1.0 MB
286.2k tokens
836 symbols
1 requests
Download .txt
Showing preview only (1,134K chars total). Download the full file or copy to clipboard to get everything.
Repository: conwnet/github1s
Branch: master
Commit: 71ac760cb1ca
Files: 240
Total size: 1.0 MB

Directory structure:
gitextract_hk2wqped/

├── .devcontainer/
│   ├── Dockerfile
│   └── devcontainer.json
├── .editorconfig
├── .github/
│   ├── config.yml
│   └── workflows/
│       ├── build.yml
│       ├── codacy-analysis.yaml
│       ├── test-wtih-vscode-build.yml
│       └── welcome-first-time-contributors.yml
├── .gitignore
├── .gitpod.Dockerfile
├── .gitpod.yml
├── .husky/
│   ├── .gitignore
│   └── pre-commit
├── .prettierignore
├── .prettierrc.js
├── LICENSE
├── README.md
├── docs/
│   └── guide.md
├── eslint.config.js
├── extensions/
│   ├── elm-web/
│   │   ├── LICENSE
│   │   ├── README.md
│   │   ├── language-configuration.json
│   │   ├── package.json
│   │   └── syntaxes/
│   │       ├── codeblock.json
│   │       └── elm-syntax.json
│   ├── github1s/
│   │   ├── assets/
│   │   │   └── pages/
│   │   │       ├── components.css
│   │   │       ├── components.js
│   │   │       ├── github1s-authentication.css
│   │   │       ├── github1s-authentication.js
│   │   │       ├── github1s-settings.css
│   │   │       ├── github1s-settings.js
│   │   │       └── libraries/
│   │   │           ├── htm.module.js
│   │   │           ├── preact-hooks.module.js
│   │   │           └── preact.module.js
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── adapters/
│   │   │   │   ├── bitbucket1s/
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── parse-path.ts
│   │   │   │   │   └── router-parser.ts
│   │   │   │   ├── github1s/
│   │   │   │   │   ├── authentication.ts
│   │   │   │   │   ├── data-source.ts
│   │   │   │   │   ├── fetcher.ts
│   │   │   │   │   ├── graphql.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── parse-path.ts
│   │   │   │   │   ├── router-parser.ts
│   │   │   │   │   ├── settings.ts
│   │   │   │   │   └── token.ts
│   │   │   │   ├── gitlab1s/
│   │   │   │   │   ├── authentication.ts
│   │   │   │   │   ├── data-source.ts
│   │   │   │   │   ├── fetcher.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── parse-path.ts
│   │   │   │   │   ├── router-parser.ts
│   │   │   │   │   ├── settings.ts
│   │   │   │   │   └── token.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── manager.ts
│   │   │   │   ├── npmjs1s/
│   │   │   │   │   ├── data-source.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   └── router-parser.ts
│   │   │   │   ├── ossinsight/
│   │   │   │   │   ├── constants.ts
│   │   │   │   │   ├── data-source.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── interfaces.ts
│   │   │   │   │   ├── router-parser.ts
│   │   │   │   │   └── templates.ts
│   │   │   │   ├── sourcegraph/
│   │   │   │   │   ├── blame.ts
│   │   │   │   │   ├── commit.ts
│   │   │   │   │   ├── common.ts
│   │   │   │   │   ├── comparison.ts
│   │   │   │   │   ├── data-source.ts
│   │   │   │   │   ├── definition.ts
│   │   │   │   │   ├── file.ts
│   │   │   │   │   ├── hover.ts
│   │   │   │   │   ├── position.ts
│   │   │   │   │   ├── ref.ts
│   │   │   │   │   ├── reference.ts
│   │   │   │   │   ├── repository.ts
│   │   │   │   │   └── search.ts
│   │   │   │   └── types.ts
│   │   │   ├── changes/
│   │   │   │   ├── files.ts
│   │   │   │   ├── index.ts
│   │   │   │   └── quick-diff.ts
│   │   │   ├── commands/
│   │   │   │   ├── blame.ts
│   │   │   │   ├── code-review.ts
│   │   │   │   ├── commit.ts
│   │   │   │   ├── editor.ts
│   │   │   │   ├── global.ts
│   │   │   │   ├── index.ts
│   │   │   │   └── ref.ts
│   │   │   ├── extension.ts
│   │   │   ├── global.d.ts
│   │   │   ├── helpers/
│   │   │   │   ├── async.ts
│   │   │   │   ├── context.ts
│   │   │   │   ├── date.ts
│   │   │   │   ├── func.ts
│   │   │   │   ├── page.ts
│   │   │   │   ├── submodule.ts
│   │   │   │   ├── urls.ts
│   │   │   │   ├── util.ts
│   │   │   │   └── vscode.ts
│   │   │   ├── listeners/
│   │   │   │   ├── index.ts
│   │   │   │   ├── router/
│   │   │   │   │   ├── changes.ts
│   │   │   │   │   ├── explorer.ts
│   │   │   │   │   └── index.ts
│   │   │   │   └── vscode.ts
│   │   │   ├── messages.ts
│   │   │   ├── providers/
│   │   │   │   ├── decorations/
│   │   │   │   │   ├── changed-file.ts
│   │   │   │   │   ├── source-control.ts
│   │   │   │   │   └── submodule.ts
│   │   │   │   ├── definition.ts
│   │   │   │   ├── file-search.ts
│   │   │   │   ├── file-system/
│   │   │   │   │   ├── index.ts
│   │   │   │   │   └── types.ts
│   │   │   │   ├── hover.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── reference.ts
│   │   │   │   └── text-search.ts
│   │   │   ├── repository/
│   │   │   │   ├── branch-tag-manager.ts
│   │   │   │   ├── code-review-manager.ts
│   │   │   │   ├── commit-manager.ts
│   │   │   │   └── index.ts
│   │   │   ├── router/
│   │   │   │   ├── events.ts
│   │   │   │   └── index.ts
│   │   │   ├── statusbar/
│   │   │   │   ├── checkout.ts
│   │   │   │   ├── index.ts
│   │   │   │   └── sponsors.ts
│   │   │   ├── views/
│   │   │   │   ├── code-review-list.ts
│   │   │   │   ├── commit-list.ts
│   │   │   │   └── index.ts
│   │   │   └── vscode.proposed.d.ts
│   │   ├── tsconfig.json
│   │   └── webpack.config.js
│   ├── nim-web/
│   │   ├── LICENSE
│   │   ├── README.md
│   │   ├── nimcfg.json
│   │   ├── package.json
│   │   ├── snippets/
│   │   │   └── nim.json
│   │   └── syntaxes/
│   │       ├── nim.json
│   │       └── nimble.json
│   ├── ocaml-web/
│   │   ├── LICENSE
│   │   ├── README.md
│   │   ├── languages/
│   │   │   ├── META.json
│   │   │   ├── dune.json
│   │   │   ├── menhir.json
│   │   │   ├── oasis.json
│   │   │   ├── ocaml.json
│   │   │   ├── ocamlbuild.json
│   │   │   ├── ocamlformat.json
│   │   │   ├── ocamllex.json
│   │   │   ├── opam-install.json
│   │   │   ├── opam.json
│   │   │   └── reason.json
│   │   ├── package.json
│   │   ├── snippets/
│   │   │   ├── dune-project.json
│   │   │   ├── dune.json
│   │   │   ├── ocaml.json
│   │   │   └── ocamllex.json
│   │   └── syntaxes/
│   │       ├── META.json
│   │       ├── atd.json
│   │       ├── cram.json
│   │       ├── dune-project.json
│   │       ├── dune-workspace.json
│   │       ├── dune.json
│   │       ├── menhir-action.json
│   │       ├── menhir.json
│   │       ├── merlin.json
│   │       ├── oasis.json
│   │       ├── ocaml-markdown-codeblock.json
│   │       ├── ocaml.interface.json
│   │       ├── ocaml.json
│   │       ├── ocamlbuild.json
│   │       ├── ocamldoc.json
│   │       ├── ocamlformat.json
│   │       ├── ocamllex.json
│   │       ├── opam-install.json
│   │       ├── opam.json
│   │       ├── reason-markdown-codeblock.json
│   │       └── reason.json
│   └── vlang-web/
│       ├── LICENSE
│       ├── README.md
│       ├── language-configuration.json
│       ├── package.json
│       ├── snippets/
│       │   └── snippets.json
│       └── syntaxes/
│           └── v.tmLanguage.json
├── functions/
│   ├── api/
│   │   ├── github-auth-callback.ts
│   │   └── gitlab-auth-callback.ts
│   └── tsconfig.json
├── package.json
├── public/
│   ├── index.html
│   ├── manifest.json
│   ├── page-title.js
│   ├── robots.txt
│   └── spinner.css
├── scripts/
│   ├── build.js
│   ├── link.js
│   ├── postinstall.js
│   ├── utils.js
│   └── webpack.js
├── src/
│   ├── config.ts
│   ├── github-auth.ts
│   ├── gitlab-auth.ts
│   ├── global.d.ts
│   ├── index.ts
│   ├── notification.css
│   ├── notification.ts
│   └── product.ts
├── tests/
│   ├── __tests__/
│   │   └── index.test.ts
│   ├── jest.config.js
│   ├── package.json
│   ├── tsconfig.json
│   └── typings.d.ts
├── tsconfig.json
├── vscode-web/
│   ├── .VERSION
│   ├── README.md
│   ├── index.html
│   ├── package.json
│   ├── scripts/
│   │   ├── .patch
│   │   ├── build/
│   │   │   ├── nls.js
│   │   │   ├── package.js
│   │   │   └── vscode.js
│   │   ├── clone.js
│   │   ├── patch.js
│   │   ├── utils.js
│   │   └── watch/
│   │       ├── extensions.js
│   │       ├── source.js
│   │       └── vscode.js
│   ├── src/
│   │   ├── setup.d.ts
│   │   └── vs/
│   │       ├── base/
│   │       │   └── common/
│   │       │       └── network.ts
│   │       └── workbench/
│   │           ├── browser/
│   │           │   ├── parts/
│   │           │   │   ├── activitybar/
│   │           │   │   │   └── activitybarPart.ts
│   │           │   │   └── titlebar/
│   │           │   │       └── media/
│   │           │   │           └── titlebarpart.css
│   │           │   └── web.main.ts
│   │           ├── contrib/
│   │           │   ├── files/
│   │           │   │   └── browser/
│   │           │   │       └── editors/
│   │           │   │           └── fileEditorInput.ts
│   │           │   └── webview/
│   │           │       └── browser/
│   │           │           └── pre/
│   │           │               ├── index-no-csp.html
│   │           │               └── index.html
│   │           └── services/
│   │               ├── extensionManagement/
│   │               │   └── browser/
│   │               │       └── builtinExtensionsScannerService.ts
│   │               ├── label/
│   │               │   └── common/
│   │               │       └── labelService.ts
│   │               └── textfile/
│   │                   └── browser/
│   │                       └── textFileService.ts
│   └── tsconfig.json
└── webpack.config.js

================================================
FILE CONTENTS
================================================

================================================
FILE: .devcontainer/Dockerfile
================================================
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.158.0/containers/typescript-node/.devcontainer/base.Dockerfile

# [Choice] Node.js version: 14, 12, 10
ARG VARIANT="14-buster"
FROM mcr.microsoft.com/devcontainers/typescript-node:${VARIANT}

RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
    && apt-get -y install --no-install-recommends libx11-dev libxkbfile-dev libsecret-1-dev rsync

# copied from https://github.com/microsoft/vscode-oniguruma/blob/main/.devcontainer/Dockerfile
RUN mkdir -p /opt/dev \
    && cd /opt/dev \
    && git clone https://github.com/emscripten-core/emsdk.git \
    && cd /opt/dev/emsdk \
    && ./emsdk install 3.1.21 \
    && ./emsdk activate 3.1.21

ENV PATH="/opt/dev/emsdk:/opt/dev/emsdk/node/14.18.2_64bit/bin:/opt/dev/emsdk/upstream/emscripten:${PATH}"


================================================
FILE: .devcontainer/devcontainer.json
================================================
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.158.0/containers/typescript-node
{
	"name": "Node.js & TypeScript",
	"build": {
		"dockerfile": "Dockerfile",
		// Update 'VARIANT' to pick a Node version: 10, 12, 14
		"args": { 
			"VARIANT": "20-bullseye"
		}
	},

	// Set *default* container specific settings.json values on container create.
	"settings": { 
		"terminal.integrated.shell.linux": "/bin/bash"
	},

	// Add the IDs of extensions you want installed when the container is created.
	"extensions": [
		"dbaeumer.vscode-eslint"
	],

	// Use 'forwardPorts' to make a list of ports inside the container available locally.
	"forwardPorts": [8080],

	// Use 'postCreateCommand' to run commands after the container is created.
	//"postCreateCommand": "npm install",

	// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
	"remoteUser": "node"
}

================================================
FILE: .editorconfig
================================================
# EditorConfig is awesome: https://EditorConfig.org

# top-most EditorConfig file
root = true

# Tab indentation
[*]
indent_style = tab
trim_trailing_whitespace = true

# The indent size used in the `package.json` file cannot be changed
# https://github.com/npm/npm/pull/3180#issuecomment-16336516
[{*.yml,*.yaml,*.json}]
indent_style = space
indent_size = 2


================================================
FILE: .github/config.yml
================================================
# Configuration for welcome - https://github.com/behaviorbot/welcome

# Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome
# Comment to be posted to on first time issues

newIssueWelcomeComment: >
  Hello there!👋 Welcome to the project!💖
  Thank you and congrats🎉for opening your very first issue in this project.Be patient while we get back to you.😄

# Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome
# Comment to be posted to on PRs from first time contributors in your repository

newPRWelcomeComment: >
  Hello there!👋 Welcome to the project!💖
  Thank you and congrats🎉 for opening your first pull request✨ 🙌.We will get back to you as soon as we can.😄

# Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge
# Comment to be posted to on pull requests merged by a first time user

firstPRMergeComment: >
  Congrats on merging your first pull request! 🎉🎉🎉 We here at github1s are proud of you!


================================================
FILE: .github/workflows/build.yml
================================================
name: Build & Test

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

jobs:
  build:
    strategy:
      matrix:
        os: [macos-14]
        node-version: [20.x]

    runs-on: ${{ matrix.os }}

    steps:
      - uses: actions/checkout@v4
      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v4
        with:
          cache: 'npm'
          node-version: ${{ matrix.node-version }}

      - run: npm install
      - run: npm run eslint
      - run: npm run build
      - uses: microsoft/playwright-github-action@v1
      - run: GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} npm run test:ci


================================================
FILE: .github/workflows/codacy-analysis.yaml
================================================
name: Codacy Security Scan

on:
  push:
    branches: ['master', 'main']
  pull_request:
    branches: ['master', 'main']

jobs:
  codacy-security-scan:
    name: Codacy Security Scan
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Run Codacy Analysis CLI
        uses: codacy/codacy-analysis-cli-action@master
        with:
          # Run analysis without SARIF output to avoid GitHub Code Scanning integration issues
          # See: https://github.com/codacy/codacy-analysis-cli-action/issues/142
          # The Codacy tool generates multiple SARIF runs which is incompatible with
          # GitHub's new policy as of July 2025
          verbose: true
          # Force 0 exit code to prevent workflow failures
          max-allowed-issues: 2147483647
          # only scan the github1s directory
          directory: $GITHUB_WORKSPACE/extensions/github1s

      # SARIF upload is temporarily disabled due to incompatibility
      # See: https://github.com/codacy/codacy-analysis-cli-action/issues/142
      # TODO: Re-enable when Codacy fixes the multiple runs issue
      # - name: Upload SARIF results file
      #   uses: github/codeql-action/upload-sarif@v4
      #   with:
      #     sarif_file: results.sarif
      #     category: codacy-security-scan


================================================
FILE: .github/workflows/test-wtih-vscode-build.yml
================================================
name: Build & Test with VS Code build

on:
  push:
    branches:
      - master
  pull_request:
    branches:
      - master

jobs:
  build:
    strategy:
      matrix:
        os: [macos-14]
        node-version: [22.x]

    runs-on: ${{ matrix.os }}

    steps:
      - uses: actions/checkout@v4
      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v4
        with:
          cache: 'npm'
          node-version: ${{ matrix.node-version }}

      - run: npm install && cd vscode-web && npm install
      - run: cd vscode-web && npm run build
      - run: npm run link && npm run build
      - uses: microsoft/playwright-github-action@v1
      - run: GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} npm run test:ci


================================================
FILE: .github/workflows/welcome-first-time-contributors.yml
================================================
name: Welcome first time contributors

on:
  pull_request_target:
    types:
      - opened
  issues:
    types:
      - opened

jobs:
  welcome:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/first-interaction@v1
      with:
        repo-token: ${{ secrets.GITHUB_TOKEN }}
        issue-message: |
          Hello there ${{ github.actor }} 👋

          Welcome to github1s !!💖🥳

          Thank you and congratulations 🎉 for opening your very first issue in this project. github1s fosters an open and welcoming environment for all our contributors.🌸

          Incase you want to claim this issue, please comment down below! We will try to get back to you as soon as we can.👀

          Feel free to visit [github1s.com](https://github1s.com/). 👩‍💻 If you have any interesting ideas, just open an issue. We would love to hear you and engage in discussions.

        pr-message: |
          Hello there ${{ github.actor }} 👋

          Thank you and congrats 🎉 for opening your first PR on this project.✨

          We will review it soon!

          github1s fosters an open and welcoming environment for all our contributors.🌸



================================================
FILE: .gitignore
================================================
.DS_Store
lib
dist
out
node_modules


================================================
FILE: .gitpod.Dockerfile
================================================
FROM gitpod/workspace-full

RUN sudo apt-get update \
  && sudo apt-get install -y \
    g++ gcc make python2.7 pkg-config libx11-dev libxkbfile-dev libsecret-1-dev python-is-python3 rsync \
  && sudo rm -rf /var/lib/apt/lists/*

================================================
FILE: .gitpod.yml
================================================
image:
  file: .gitpod.Dockerfile
tasks:
  - init: |
      npm install
      npm run build
    command: |
      echo "======================="
      echo "Please run 'npm run watch'"
      echo "======================="
  - command: |
      echo "==========================================================================="
      echo "Please wait for 'npm run watch' to complete compilation"
      echo "==========================================================================="
ports:
  - port: 8080
    onOpen: open-browser
github:
  prebuilds:
    # enable for the master/default branch (defaults to true)
    master: true
    # enable for all branches in this repo (defaults to false)
    branches: true
    # enable for pull requests coming from this repo (defaults to true)
    pullRequests: true
    # enable for pull requests coming from forks (defaults to false)
    pullRequestsFromForks: true
    # add a check to pull requests (defaults to true)
    addCheck: true
    # add a "Review in Gitpod" button as a comment to pull requests (defaults to false)
    addComment: true
    # add a "Review in Gitpod" button to the pull request's description (defaults to false)
    addBadge: false
    # add a label once the prebuild is ready to pull requests (defaults to false)
    addLabel: false


================================================
FILE: .husky/.gitignore
================================================
_

================================================
FILE: .husky/pre-commit
================================================
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged


================================================
FILE: .prettierignore
================================================
lib
dist
out
node_modules
vscode-web/src/vs
vscode-web/extensions
htm.module.js
preact.module.js
preact-hooks.module.js
index.html


================================================
FILE: .prettierrc.js
================================================
export default {
	tabWidth: 2,
	useTabs: true,
	semi: true,
	singleQuote: true,
	printWidth: 120,
	overrides: [
		{
			files: ['*.yml', '*.yaml', '*.json'],
			options: {
				useTabs: false,
			},
		},
	],
};


================================================
FILE: LICENSE
================================================
MIT License

Copyright conwnet and other contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: README.md
================================================
![GitHub1s](https://raw.githubusercontent.com/conwnet/github1s/master/resources/images/logo.svg)

# github1s

One second to read GitHub code with VS Code.

## Usage

Just add `1s` after `github` and press `Enter` in the browser address bar for any repository you want to read.

For example, try it on the VS Code repo:

[https://github1s.com/microsoft/vscode](https://github1s.com/microsoft/vscode)

![VS Code - GitHub1s](https://raw.githubusercontent.com/conwnet/github1s/master/resources/images/vs-code-github1s.png)

You can also use [https://gitlab1s.com](https://gitlab1s.com) or [https://npmjs1s.com](https://npmjs1s.com) in the same way.

For browser extensions, see [Third-party Related Projects](https://github.com/conwnet/github1s#third-party-related-projects).

Or save the following code snippet as a bookmarklet, you can use it to quickly switch between github.com and github1s.com (GitHub markdown doesn't allow js links, so just copy it into a bookmark).

```
javascript: window.location.href = window.location.href.replace(/github(1s)?.com/, function(match, p1) { return p1 ? 'github.com' : 'github1s.com' })
```

### Develop in the cloud

To edit files, run Docker containers, create pull requests and more, click the "Develop your project on [Gitpod](https://www.gitpod.io)" button in the status bar. You can also open the Command Palette (default shortcut `Ctrl+Shift+P`) and choose `GitHub1s: Edit files in Gitpod`.

![Gitpod Status Bar](https://raw.githubusercontent.com/conwnet/github1s/master/resources/images/gitpod-statusbar.png)

## Documentation

- [How it works](https://github.com/conwnet/github1s/blob/master/docs/guide.md)
- [Roadmap](https://github.com/conwnet/github1s/projects/1)

## Enabling Private Repositories

If you want to view non-public repositories, you need to add an OAuth token. The token is stored only in your browser, and only send to GitHub when fetching your repository's files. Click on the icon near the bottom of the left-hand row of icons, and the dialog box will prompt you for it, and even take you to your GitHub settings page to generate one, if needed.

<img height="500px" src="https://raw.githubusercontent.com/conwnet/github1s/master/resources/images/auth-token.png" />

## Screenshots

![VS Code - GitHub1s](https://raw.githubusercontent.com/conwnet/github1s/master/resources/images/GitHub1sDemo1.gif)

![VS Code - GitHub1s](https://raw.githubusercontent.com/conwnet/github1s/master/resources/images/demo.png)

## Development

### Cloud-based development

You can start an online development environment with [Gitpod](https://www.gitpod.io) by clicking the following button:

[![Gitpod ready-to-code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/conwnet/github1s)

### Local development

```bash
git clone git@github.com:conwnet/github1s.git
cd github1s
npm install
npm run watch
# The cli will automatically open http://localhost:8080 once the build is completed.
# You can visit http://localhost:8080/conwnet/github1s if it doesn't.
```

#### Local development with full VS Code build

You need [these prerequisites (the same ones as for VS Code)](https://github.com/microsoft/vscode/wiki/How-to-Contribute#prerequisites) for development with full VS Code build.
Please make sure you could build VS Code locally before the watch mode.

To verify the build:

```bash
cd github1s
npm run build:vscode
```

After the initial successful build, you could use the watch mode:

```bash
cd github1s
npm install
npm run watch-with-vscode
# The cli will automatically open http://localhost:8080 once the build is completed.
# You can visit http://localhost:8080/conwnet/github1s if it doesn't.
```

### ... or ... VS Code + Docker Development

You can use the VS Code plugin [Remote-Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) `Dev Container` to use a Docker container as a development environment.

1. Install the Remote-Containers plugin in VS Code & Docker
2. Open the Command Palette (default shortcut `Ctrl+Shift+P`) and choose `Remote-Containers: Clone Repository in Container Volume...`
3. Enter the repo, in this case `https://github.com/conwnet/github1s.git` or your forked repo
4. Pick either, `Create a unique volume` or `Create a new volume`

   - Now VS Code will create the docker container and connect to the new container so you can use this as a fully setup environment!

5. Open a new VS Code Terminal, then you can run the `npm install` commands listed above.

```bash
npm install
npm run watch
# The cli will automatically open http://localhost:8080 once the build is completed.
# You can visit http://localhost:8080/conwnet/github1s if it doesn't.
```

### Format all codes

```bash
npm run format
```

It uses `prettier` to format all possible codes.

## Build

```bash
npm install
npm run build
```

## Feedback

- If something is not working, [create an issue](https://github.com/conwnet/github1s/issues/new)

## Sponsors

The continued development and maintenance of GitHub1s is made possible by these generous sponsors:

<table><tbody><tr>
<td><a href="https://sourcegraph.com/">
<img height="40px" src="https://raw.githubusercontent.com/conwnet/github1s/master/resources/images/sourcegraph-logo.svg">
</a></td>
</tr></tbody></table>

## Partners

We are partnered with [OSS Insight](https://ossinsight.io/?utm_source=github1s&utm_medium=github&utm_campaign=ghtrending) to get the Trending Repositories & some more Interesting Analytics. [OSS Insight](https://ossinsight.io/?utm_source=github1s&utm_medium=github&utm_campaign=ghtrending) provides deep insights into GitHub repos, developers, and curated repo lists from billions of GitHub events. It’s built with [TiDB Cloud](https://www.pingcap.com/tidb-cloud/?utm_source=github1s&utm_medium=github&utm_campaign=ghtrending).

<table><tbody><tr>
<td><a href="https://ossinsight.io/?utm_source=github1s&utm_medium=github&utm_campaign=ghtrending">
<img height="40px" src="./resources/images/ossinsight-brand-dark.png">
</a></td>
</tr></tbody></table>

## Maintainers! :blush:

<table>
  <tbody><tr>
    <td align="center"><a href="https://github.com/conwnet"><img alt="" src="https://avatars.githubusercontent.com/conwnet" width="100px;"><br><sub><b>netcon</b></sub></a><br><a href="https://github.com/conwnet/github1s/commits?author=conwnet" title="Code">💻 🖋</a></td> </a></td>
    <td align="center"><a href="https://github.com/xcv58"><img alt="" src="https://avatars.githubusercontent.com/xcv58" width="100px;"><br><sub><b>xcv58</b></sub></a><br><a href="https://github.com/conwnet/github1s/commits?author=xcv58" title="Code">💻 🖋</a></td></a></td>
    <td align="center"><a href="https://github.com/Siddhant-K-code"><img alt="" src="https://avatars.githubusercontent.com/Siddhant-K-code" width="100px;"><br><sub><b>Siddhant Khare</b></sub></a><br><a href="https://github.com/conwnet/github1s/commits?author=Siddhant-K-code" title="Code">💻 🖋</a></td> </a></td>
  </tr>
</tbody></table>

## Stargazers over time

[![Stargazers over time](https://api.star-history.com/svg?repos=conwnet/github1s&type=Date)](https://star-history.com/#conwnet/github1s&Date)

<details>
<summary>Third-party Related Projects</summary>
<br>

### Chrome Extensions

- [Repositree](https://chrome.google.com/webstore/detail/repositree/lafjldoccjnjlcmdhmniholdpjkbgajo) ([chouglesaud/repositree](https://github.com/chouglesaud/repositree))
- [github-code-viewer](https://chrome.google.com/webstore/detail/github-code-viewer/ecddapgifccgblebfibdgkagfbdagjfn) ([febaoshan/edge-extensions-github-code-viewer](https://github.com/febaoshan/edge-extensions-github-code-viewer))
- Github1s Extension ([Darkempire78/GitHub1s-Extension](https://github.com/Darkempire78/GitHub1s-Extension))
- [Github Web IDE](https://chrome.google.com/webstore/detail/adjiklnjodbiaioggfpbpkhbfcnhgkfe) ([zvizvi/Github-Web-IDE](https://github.com/zvizvi/Github-Web-IDE))
- [shortcut to github1s](https://chrome.google.com/webstore/detail/shortcut-to-github1s/gfcdbodapcbfckbfpmgeldfkkgjknceo) ([katsuhisa91/github1s-shortcut](https://github.com/katsuhisa91/github1s-shortcut))
- [Github1s Shortut - Open source](https://github.com/Fauzdar1/Github1s)
- [⚡️ 1s to GitHub1s!](https://github.com/holazz/webext-github1s)
- [github1s Google Chrome Extensions](https://github.com/Lonely-Mr-zhang/github_1s_vscode)

### Firefox Extensions

- [Repositree](https://addons.mozilla.org/en-US/firefox/addon/repositree/) ([chouglesaud/repositree](https://github.com/chouglesaud/repositree))
- [Github1s Extension](https://addons.mozilla.org/firefox/addon/github1s-extension) ([Darkempire78/GitHub1s-Extension](https://github.com/Darkempire78/GitHub1s-Extension))
- [Github1s](https://addons.mozilla.org/firefox/addon/github1s/) ([mcherifi/github1s-firefox-addon](https://github.com/mcherifi/github1s-firefox-addon))
- [Github Web IDE](https://addons.mozilla.org/firefox/addon/github-web-ide/) ([zvizvi/Github-Web-IDE](https://github.com/zvizvi/Github-Web-IDE))

### Microsoft Edge Extensions

- [github-code-viewer](https://microsoftedge.microsoft.com/addons/detail/githubcodeviewer/jaaaapanahkknbgdbglnlchbjfhhjlpi) ([febaoshan/edge-extensions-github-code-viewer](https://github.com/febaoshan/edge-extensions-github-code-viewer))
- [Github Web IDE](https://microsoftedge.microsoft.com/addons/detail/akjbkjciknacicbnkfjbnlaeednpadcf) ([zvizvi/Github-Web-IDE](https://github.com/zvizvi/Github-Web-IDE))

### Safari Extension

- [GitHub1s-For-Safari-Extension](https://apps.apple.com/us/app/readcodeonline/id1569026520?mt=12) ([code4you2021/GitHub1s-For-Safari-Extension](https://github.com/code4you2021/GitHub1s-For-Safari-Extension))

### Tampermonkey scripts

- [Mr-B0b/TamperMonkeyScripts/vscode.js](https://github.com/Mr-B0b/TamperMonkeyScripts/blob/main/vscode.js)
</details>


================================================
FILE: docs/guide.md
================================================
# How it works

GitHub1s is based on [VS Code 1.66.2](https://github.com/microsoft/vscode/tree/1.66.2) now. VS Code can be built for a browser version officially. I also used the code and got inspired by [Code Server](https://github.com/cdr/code-server).

Thanks to the very powerful and flexible extensibility of VS Code, we can easily implement a VS Code extension that provides the custom File IO ability using [FileSystemProvider API](https://code.visualstudio.com/api/references/vscode-api#FileSystemProvider). There is an official demo named [vscode-web-playground](https://github.com/microsoft/vscode-web-playground) which shows how it is used.

On the other hand, GitHub provides the powerful [REST API](https://docs.github.com/en/rest) that can be used for a variety of tasks which includes reading directories and files for sure.

According to the above, obviously, the core concept of GitHub1s is to implement a VS Code Extension (includes FileSystemProvider) using GitHub REST API.

_We may switch to the GitHub GraphQL API for more friendly user experience in the future, thanks to @xcv58 and @kanhegaonkarsaurabh. See details at [Issue 12](https://github.com/conwnet/github1s/issues/12)._

~~GitHub1s is a purely static web app (because it really doesn't need a backend service, does it?). So we just deploy it on [GitHub Pages](https://pages.github.com/) now (the `gh-pages` branch of this repository), and it is free. The service of GitHub1s could be reliable (GitHub is very reliable) because nobody needs to pay the web hosting bills.~~

We deploy GitHub1s on [Cloudflare Pages](https://cloudflare.com/) now for minimize delays in loading and better developer experience. Thanks for the wonderful service provide by Cloudflare.

# Rate Limit

Another thing that needs attention is [Rate Limit](https://docs.github.com/en/rest/reference/rate-limit):

> For unauthenticated requests, the rate limit allows for up to 60 requests per hour. Unauthenticated requests are associated with the originating IP address, and not the user making requests.

> For API requests using Basic Authentication or OAuth, you can make up to 5,000 requests per hour.

So, if you meet some problems when you use GitHub1s, even if you are using newer browsers, you could try to set a [GitHub OAuth Token](https://docs.github.com/en/rest/overview/resources-in-the-rest-api#oauth2-token-sent-in-a-header). Don't worry, we cannot see your token. It is only stored in your browser [IndexedDB](https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_API) with [VS Code Extension globalState API](https://code.visualstudio.com/api/references/vscode-api#ExtensionContext) (Actually we don't have a server, do we?).

But this does not mean the token is absolutely safe, **don't forget to clean it while you are using a device that doesn't belong to you**.

# Sourcegraph API

Due to the potential RateLimit of the GitHub API, we will prioritize the use of the [Sourcegraph API](https://sourcegraph.com/docs) for public repositories, with the exception of the Read interface, the code search capability is also provided by the Sourcegraph API.

By default, GitHub1s will only try to use the GitHub API when the Sourcegraph API request fails, and you can adjust this option in the settings.

# Development

As you see, running GitHub1s locally is not difficult. After cloning the repository, just run these commands:

```shell
$ npm install
$ npm run watch
```

Then, there will be a new directory named `dist` generated in the project root. The `npm run watch:dev-server` (part of `npm run watch` command) will automatically open http://localhost:8080 in the browser.

If you get a 404 error for some static files, please wait a minute for the building to complete.

## Watch Mode

What happens after you run `npm run watch-with-vscode`?

1. Copy some necessary resources (`index.html`, `favicons.ico`, etc.) to the `dist` directory.

2. This command will compile the codes in `src` and generate application entry script (see `webpack.config.js`). This command also compile the custom extensions (for example `github1s`) in `extensions` directory.

3. Redirect vscode-web static requests (vscode, extensisions, dependencies) to `vscode-web/lib/vscode` which should be generated by vscode compile process.

You should also compile the vscode manually in another terminal.

1. Go to `vscode-web` and run `npm install && npm run watch` (the native watch of vscode), it will trigger a new build if something in it has been changed.

2. This command will alose watch the `vscode-web/src` and `vscode-web/extensions` directory, merge it in to `vscode-web/lib/vscode` if something in it has been changed. (When a new file is merged into `lib/vscode`, it will trigger the watcher that is described in Step 3)

Note that since we have modified the source code of VS Code, it may get into trouble when merging a newer version VS Code.

It is a little laborious to complete the watch process, but I didn't think of a better solution.

What happens after you run `npm run watch`?

It's the same procedure as `` without the step 3. Instead of the local VS Code, it uses the prebuilt [@github1s/vscode-web](https://www.npmjs.com/package/@github1s/vscode-web) version.

## Build mode

Put simply, we build the necessary code and do a minify. The minify script is modified from [Code Server](https://github.com/cdr/code-server).

## Directory Structure

- `extensions` - custom VS Code extensions that don't come with VS Code natively.

- `src` - the code in here will be patched into VS Code source.

- `vscode-web` - This contains the code to patch VS Code.

- `scripts` - some scripts for build, watch, package, etc.

- `resources` - some resource files such as templates, pictures, configuration files, etc.


================================================
FILE: eslint.config.js
================================================
import jsdoc from 'eslint-plugin-jsdoc';
import tseslint from 'typescript-eslint';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';

export default [
	{ ignores: ['**/dist', '**/assets', 'vscode-web/lib', '**/vs', '**/vscode.proposed.d.ts'] },
	...tseslint.configs.recommended,
	jsdoc.configs['flat/recommended-typescript'],
	eslintPluginPrettierRecommended,
	{
		rules: {
			'@typescript-eslint/no-explicit-any': 'off',
			'@typescript-eslint/no-unused-expressions': 'off',
			'@typescript-eslint/no-unused-vars': 'off',
		},
	},
];


================================================
FILE: extensions/elm-web/LICENSE
================================================
MIT License

Copyright (c) 2019 Kolja Lampe

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: extensions/elm-web/README.md
================================================
# This extension is a fork from [elm-language-client-vscode](https://github.com/elm-tooling/elm-language-client-vscode) for github1s.

# At present only languages features is reserved

# I have deleted some files and only reserved the necessary code

# Elm Plugin for Visual Studio Code (VSCode)

[![Version](https://vsmarketplacebadge.apphb.com/version/Elmtooling.elm-ls-vscode.svg)](https://marketplace.visualstudio.com/items?itemName=Elmtooling.elm-ls-vscode)
[![Downloads](https://vsmarketplacebadge.apphb.com/downloads-short/Elmtooling.elm-ls-vscode.svg)](https://marketplace.visualstudio.com/items?itemName=Elmtooling.elm-ls-vscode)
[![Rating](https://vsmarketplacebadge.apphb.com/rating-star/Elmtooling.elm-ls-vscode.svg)](https://marketplace.visualstudio.com/items?itemName=Elmtooling.elm-ls-vscode)
![Compile](https://github.com/elm-tooling/elm-language-client-vscode/workflows/Compile/badge.svg)

Supports elm 0.19 and up

## Highlighted Features

- Syntax Highlighting


================================================
FILE: extensions/elm-web/language-configuration.json
================================================
{
  "comments": {
    "lineComment": "--",
    "blockComment": ["{-", "-}"]
  },
  "brackets": [
    ["{", "}"],
    ["[", "]"],
    ["(", ")"]
  ],
  "surroundingPairs": [
    ["{", "}"],
    ["[", "]"],
    ["(", ")"],
    ["\"", "\""],
    ["'", "'"]
  ],
  "autoClosingPairs": [
    ["(", ")"],
    ["{", "}"],
    ["[", "]"],
    {
      "open": "\"\"\"",
      "close": "\"\"\"",
      "notIn": ["comment"]
    },
    {
      "open": "\"",
      "close": "\"",
      "notIn": ["string"]
    },
    {
      "open": "'",
      "close": "'",
      "notIn": ["string", "comment"]
    }
  ],
  "folding": {
    "offSide": true
  }
}

================================================
FILE: extensions/elm-web/package.json
================================================
{
  "name": "elm-ls-vscode",
  "displayName": "Elm",
  "description": "Improving your Elm experience since 2019",
  "publisher": "elmTooling",
  "icon": "images/elm.png",
  "author": "Kolja Lampe",
  "license": "MIT",
  "version": "2.0.3",
  "repository": {
    "type": "git",
    "url": "https://github.com/elm-tooling/elm-language-client-vscode"
  },
  "categories": [
    "Linters",
    "Snippets",
    "Programming Languages"
  ],
  "keywords": [
    "elm"
  ],
  "engines": {
    "vscode": "^1.52.0"
  },
  "activationEvents": [
    "onLanguage:elm"
  ],
  "contributes": {
    "languages": [
      {
        "id": "elm",
        "aliases": [
          "Elm",
          "elm"
        ],
        "extensions": [
          ".elm"
        ],
        "configuration": "./language-configuration.json"
      }
    ],
    "grammars": [
      {
        "scopeName": "markdown.elm.codeblock",
        "path": "./syntaxes/codeblock.json",
        "injectTo": [
          "text.html.markdown"
        ],
        "embeddedLanguages": {
          "meta.embedded.block.elm": "elm",
          "meta.embedded.block.glsl": "glsl"
        }
      },
      {
        "language": "elm",
        "scopeName": "source.elm",
        "path": "./syntaxes/elm-syntax.json"
      }
    ]
  },
  "scripts": {
    "compile": "echo done",
    "watch": "echo done"
  }
}


================================================
FILE: extensions/elm-web/syntaxes/codeblock.json
================================================
{
  "fileTypes": [],
  "injectionSelector": "L:text.html.markdown",
  "patterns": [
    {
      "include": "#fenced_code_block_elm"
    }
  ],
  "repository": {
    "fenced_code_block_elm": {
      "begin": "(^|\\G)(\\s*)(`{3,}|~{3,})\\s*(?i:(elm)(\\s+[^`~]*)?$)",
      "name": "markup.fenced_code.block.markdown",
      "end": "(^|\\G)(\\2|\\s{0,3})(\\3)\\s*$",
      "beginCaptures": {
        "3": {
          "name": "punctuation.definition.markdown"
        },
        "5": {
          "name": "fenced_code.block.language"
        },
        "6": {
          "name": "fenced_code.block.language.attributes"
        }
      },
      "endCaptures": {
        "3": {
          "name": "punctuation.definition.markdown"
        }
      },
      "patterns": [
        {
          "begin": "(^|\\G)(\\s*)(.*)",
          "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)",
          "contentName": "meta.embedded.block.elm",
          "patterns": [
            {
              "include": "source.elm"
            }
          ]
        }
      ]
    }
  },
  "scopeName": "markdown.elm.codeblock"
}


================================================
FILE: extensions/elm-web/syntaxes/elm-syntax.json
================================================
{
  "fileTypes": ["elm"],
  "name": "Elm",
  "scopeName": "source.elm",
  "patterns": [
    {
      "include": "#import"
    },
    {
      "include": "#module"
    },
    {
      "include": "#debug"
    },
    {
      "include": "#comments"
    },
    {
      "match": "\\b(_)\\b",
      "name": "keyword.unused.elm"
    },
    {
      "include": "#type-signature"
    },
    {
      "include": "#type-declaration"
    },
    {
      "include": "#type-alias-declaration"
    },
    {
      "include": "#string-triple"
    },
    {
      "include": "#string-quote"
    },
    {
      "include": "#char"
    },
    {
      "comment": "Floats are always decimal",
      "match": "\\b([0-9]+\\.[0-9]+([eE][+-]?[0-9]+)?|[0-9]+[eE][+-]?[0-9]+)\\b",
      "name": "constant.numeric.float.elm"
    },
    {
      "match": "\\b([0-9]+)\\b",
      "name": "constant.numeric.elm"
    },
    {
      "match": "\\b(0x[0-9a-fA-F]+)\\b",
      "name": "constant.numeric.elm"
    },
    {
      "include": "#glsl"
    },
    {
      "include": "#record-prefix"
    },
    {
      "include": "#module-prefix"
    },
    {
      "include": "#constructor"
    },
    {
      "name": "meta.record.field.update.elm",
      "match": "(\\{)\\s+([a-z][a-zA-Z0-9_]*)\\s+(\\|)\\s+([a-z][a-zA-Z0-9_]*)",
      "captures": {
        "1": {
          "name": "punctuation.bracket.elm"
        },
        "2": {
          "name": "record.name.elm"
        },
        "3": {
          "name": "keyword.pipe.elm"
        },
        "4": {
          "name": "entity.name.record.field.elm"
        }
      }
    },
    {
      "name": "meta.record.field.update.elm",
      "match": "(\\|)\\s+([a-z][a-zA-Z0-9_]*)\\s+(\\=)",
      "captures": {
        "1": {
          "name": "keyword.pipe.elm"
        },
        "2": {
          "name": "entity.name.record.field.elm"
        },
        "3": {
          "name": "keyword.operator.assignment.elm"
        }
      }
    },
    {
      "name": "meta.record.field.update.elm",
      "match": "(\\{)\\s+([a-z][a-zA-Z0-9_]*)\\s+$",
      "captures": {
        "1": {
          "name": "punctuation.bracket.elm"
        },
        "2": {
          "name": "record.name.elm"
        }
      }
    },
    {
      "name": "meta.record.field.elm",
      "match": "(\\{)\\s+([a-z][a-zA-Z0-9_]*)\\s+(\\=)",
      "captures": {
        "1": {
          "name": "punctuation.bracket.elm"
        },
        "2": {
          "name": "entity.name.record.field.elm"
        },
        "3": {
          "name": "keyword.operator.assignment.elm"
        }
      }
    },
    {
      "name": "meta.record.field.elm",
      "match": "(,)\\s+([a-z][a-zA-Z0-9_]*)\\s+(\\=)",
      "captures": {
        "1": {
          "name": "punctuation.separator.comma.elm"
        },
        "2": {
          "name": "entity.name.record.field.elm"
        },
        "3": {
          "name": "keyword.operator.assignment.elm"
        }
      }
    },
    {
      "match": "(\\}|\\{)",
      "name": "punctuation.bracket.elm"
    },
    {
      "include": "#unit"
    },
    {
      "include": "#comma"
    },
    {
      "include": "#parens"
    },
    {
      "match": "(->)",
      "name": "keyword.operator.arrow.elm"
    },
    {
      "include": "#infix_op"
    },
    {
      "match": "(\\=|\\:|\\||\\\\)",
      "name": "keyword.other.elm"
    },
    {
      "match": "\\b(type|as|port|exposing|alias|infixl|infixr|infix)\\s+",
      "name": "keyword.other.elm"
    },
    {
      "match": "\\b(if|then|else|case|of|let|in)\\s+",
      "name": "keyword.control.elm"
    },
    {
      "include": "#record-accessor"
    },
    {
      "include": "#top_level_value"
    },
    {
      "include": "#value"
    },
    {
      "include": "#period"
    },
    {
      "include": "#square_brackets"
    }
  ],
  "repository": {
    "comma": {
      "match": "(,)",
      "name": "punctuation.separator.comma.elm"
    },
    "parens": {
      "match": "(\\(|\\))",
      "name": "punctuation.parens.elm"
    },
    "block_comment": {
      "applyEndPatternLast": 1,
      "begin": "\\{-(?!#)",
      "captures": {
        "0": {
          "name": "punctuation.definition.comment.elm"
        }
      },
      "end": "-\\}",
      "name": "comment.block.elm",
      "patterns": [
        {
          "include": "#block_comment"
        }
      ]
    },
    "comments": {
      "patterns": [
        {
          "captures": {
            "1": {
              "name": "punctuation.definition.comment.elm"
            }
          },
          "begin": "--",
          "end": "$",
          "name": "comment.line.double-dash.elm"
        },
        {
          "include": "#block_comment"
        }
      ]
    },
    "import": {
      "name": "meta.import.elm",
      "begin": "^\\b(import)\\s+",
      "beginCaptures": {
        "1": {
          "name": "keyword.control.import.elm"
        }
      },
      "end": "\\n(?!\\s)",
      "patterns": [
        {
          "match": "(as|exposing)",
          "name": "keyword.control.elm"
        },
        {
          "include": "#module_chunk"
        },
        {
          "include": "#period"
        },
        {
          "match": "\\s+",
          "name": "punctuation.spaces.elm"
        },
        {
          "include": "#module-exports"
        }
      ]
    },
    "module": {
      "begin": "^\\b((port |effect )?module)\\s+",
      "beginCaptures": {
        "1": {
          "name": "keyword.other.elm"
        }
      },
      "end": "\\n(?!\\s)",
      "endCaptures": {
        "1": {
          "name": "keyword.other.elm"
        }
      },
      "name": "meta.declaration.module.elm",
      "patterns": [
        {
          "include": "#module_chunk"
        },
        {
          "include": "#period"
        },
        {
          "match": "(exposing)",
          "name": "keyword.other.elm"
        },
        {
          "match": "\\s+",
          "name": "punctuation.spaces.elm"
        },
        {
          "include": "#module-exports"
        }
      ]
    },
    "string-triple": {
      "name": "string.quoted.triple.elm",
      "begin": "\"\"\"",
      "beginCaptures": {
        "0": {
          "name": "punctuation.definition.string.begin.elm"
        }
      },
      "end": "\"\"\"",
      "endCaptures": {
        "0": {
          "name": "punctuation.definition.string.end.elm"
        }
      },
      "patterns": [
        {
          "match": "\\\\(NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\\"'\\&]|x[0-9a-fA-F]{1,5})",
          "name": "constant.character.escape.elm"
        },
        {
          "match": "\\^[A-Z@\\[\\]\\\\\\^_]",
          "name": "constant.character.escape.control.elm"
        }
      ]
    },
    "string-quote": {
      "name": "string.quoted.double.elm",
      "begin": "\"",
      "beginCaptures": {
        "0": {
          "name": "punctuation.definition.string.begin.elm"
        }
      },
      "end": "\"",
      "endCaptures": {
        "0": {
          "name": "punctuation.definition.string.end.elm"
        }
      },
      "patterns": [
        {
          "match": "\\\\(NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\\"'\\&]|x[0-9a-fA-F]{1,5})",
          "name": "constant.character.escape.elm"
        },
        {
          "match": "\\^[A-Z@\\[\\]\\\\\\^_]",
          "name": "constant.character.escape.control.elm"
        }
      ]
    },
    "char": {
      "name": "string.quoted.single.elm",
      "begin": "'",
      "beginCaptures": {
        "0": {
          "name": "punctuation.definition.char.begin.elm"
        }
      },
      "end": "'",
      "endCaptures": {
        "0": {
          "name": "punctuation.definition.char.end.elm"
        }
      },
      "patterns": [
        {
          "match": "\\\\(NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|[abfnrtv\\\\\\\"'\\&]|x[0-9a-fA-F]{1,5})",
          "name": "constant.character.escape.elm"
        },
        {
          "match": "\\^[A-Z@\\[\\]\\\\\\^_]",
          "name": "constant.character.escape.control.elm"
        }
      ]
    },
    "debug": {
      "match": "\\b(Debug)\\b",
      "name": "invalid.illegal.debug.elm"
    },
    "module-exports": {
      "begin": "(\\()",
      "beginCaptures": {
        "1": {
          "name": "punctuation.parens.module-export.elm"
        }
      },
      "end": "(\\))",
      "endCaptures": {
        "1": {
          "name": "punctuation.parens.module-export.elm"
        }
      },
      "name": "meta.declaration.exports.elm",
      "patterns": [
        {
          "match": "\\b[a-z][a-zA-Z_'0-9]*",
          "name": "entity.name.function.elm"
        },
        {
          "match": "\\b[A-Z][A-Za-z_'0-9]*",
          "name": "storage.type.elm"
        },
        {
          "match": ",",
          "name": "punctuation.separator.comma.elm"
        },
        {
          "match": "\\s+",
          "name": "punctuation.spaces.elm"
        },
        {
          "include": "#comma"
        },
        {
          "match": "\\(\\.\\.\\)",
          "name": "punctuation.parens.ellipses.elm"
        },
        {
          "match": "\\.\\.",
          "name": "punctuation.parens.ellipses.elm"
        },
        {
          "include": "#infix_op"
        },
        {
          "comment": "So named because I don't know what to call this.",
          "match": "\\(.*?\\)",
          "name": "meta.other.unknown.elm"
        }
      ]
    },
    "module_chunk": {
      "match": "[A-Z][a-zA-Z0-9_]*",
      "name": "support.module.elm"
    },
    "period": {
      "match": "[.]",
      "name": "keyword.other.period.elm"
    },
    "square_brackets": {
      "match": "[\\[\\]]",
      "name": "punctuation.definition.list.elm"
    },
    "record-prefix": {
      "match": "([a-z][a-zA-Z0-9_]*)(\\.)([a-z][a-zA-Z0-9_]*)",
      "name": "record.accessor.elm",
      "captures": {
        "1": {
          "name": "record.name.elm"
        },
        "2": {
          "name": "keyword.other.period.elm"
        },
        "3": {
          "name": "entity.name.record.field.accessor.elm"
        }
      }
    },
    "module-prefix": {
      "match": "([A-Z][a-zA-Z0-9_]*)(\\.)",
      "name": "meta.module.name.elm",
      "captures": {
        "1": {
          "name": "support.module.elm"
        },
        "2": {
          "name": "keyword.other.period.elm"
        }
      }
    },
    "constructor": {
      "match": "\\b[A-Z][a-zA-Z0-9_]*\\b",
      "name": "constant.type-constructor.elm"
    },
    "value": {
      "match": "\\b[a-z][a-zA-Z0-9_]*\\b",
      "name": "meta.value.elm"
    },
    "unit": {
      "match": "\\(\\)",
      "name": "constant.unit.elm"
    },
    "top_level_value": {
      "match": "^[a-z][a-zA-Z0-9_]*\\b",
      "name": "entity.name.function.top_level.elm"
    },
    "record-accessor": {
      "match": "(\\.)([a-z][a-zA-Z0-9_]*)",
      "name": "meta.record.accessor",
      "captures": {
        "1": {
          "name": "keyword.other.period.elm"
        },
        "2": {
          "name": "entity.name.record.field.accessor.elm"
        }
      }
    },
    "infix_op": {
      "match": "(</>|<\\?>|<\\||<=|\\|\\||&&|>=|\\|>|\\|=|\\|\\.|\\+\\+|::|/=|==|//|>>|<<|<|>|\\^|\\+|-|/|\\*)",
      "name": "keyword.operator.elm"
    },
    "type-declaration": {
      "begin": "^(type\\s+)([A-Z][a-zA-Z0-9_']*)\\s+",
      "beginCaptures": {
        "1": {
          "name": "keyword.type.elm"
        },
        "2": {
          "name": "storage.type.elm"
        }
      },
      "end": "^(?=\\S)",
      "name": "meta.function.type-declaration.elm",
      "patterns": [
        {
          "name": "meta.record.field.elm",
          "match": "^\\s*([A-Z][a-zA-Z0-9_]*)\\b",
          "captures": {
            "1": {
              "name": "constant.type-constructor.elm"
            }
          }
        },
        {
          "match": "\\s+",
          "name": "punctuation.spaces.elm"
        },
        {
          "name": "meta.record.field.elm",
          "match": "(\\=|\\|)\\s+([A-Z][a-zA-Z0-9_]*)\\b",
          "captures": {
            "1": {
              "name": "keyword.operator.assignment.elm"
            },
            "2": {
              "name": "constant.type-constructor.elm"
            }
          }
        },
        {
          "match": "\\=",
          "name": "keyword.operator.assignment.elm"
        },
        {
          "match": "\\-\\>",
          "name": "keyword.operator.arrow.elm"
        },
        {
          "include": "#module-prefix"
        },
        {
          "match": "\\b[a-z][a-zA-Z0-9_]*\\b",
          "name": "variable.type.elm"
        },
        {
          "match": "\\b[A-Z][a-zA-Z0-9_]*\\b",
          "name": "storage.type.elm"
        },
        {
          "include": "#comments"
        },
        {
          "include": "#type-record"
        }
      ]
    },
    "type-alias-declaration": {
      "begin": "^(type\\s+)(alias\\s+)([A-Z][a-zA-Z0-9_']*)\\s+",
      "beginCaptures": {
        "1": {
          "name": "keyword.type.elm"
        },
        "2": {
          "name": "keyword.type-alias.elm"
        },
        "3": {
          "name": "storage.type.elm"
        }
      },
      "end": "^(?=\\S)",
      "name": "meta.function.type-declaration.elm",
      "patterns": [
        {
          "match": "\\n\\s+",
          "name": "punctuation.spaces.elm"
        },
        {
          "match": "\\=",
          "name": "keyword.operator.assignment.elm"
        },
        {
          "include": "#module-prefix"
        },
        {
          "match": "\\b[A-Z][a-zA-Z0-9_]*\\b",
          "name": "storage.type.elm"
        },
        {
          "match": "\\b[a-z][a-zA-Z0-9_]*\\b",
          "name": "variable.type.elm"
        },
        {
          "include": "#comments"
        },
        {
          "include": "#type-record"
        }
      ]
    },
    "type-record": {
      "begin": "(\\{)",
      "beginCaptures": {
        "1": {
          "name": "punctuation.section.braces.begin"
        }
      },
      "end": "(\\})",
      "endCaptures": {
        "1": {
          "name": "punctuation.section.braces.end"
        }
      },
      "name": "meta.function.type-record.elm",
      "patterns": [
        {
          "match": "\\s+",
          "name": "punctuation.spaces.elm"
        },
        {
          "match": "->",
          "name": "keyword.operator.arrow.elm"
        },
        {
          "name": "meta.record.field.elm",
          "match": "([a-z][a-zA-Z0-9_]*)\\s+(\\:)",
          "captures": {
            "1": {
              "name": "entity.name.record.field.elm"
            },
            "2": {
              "name": "keyword.other.elm"
            }
          }
        },
        {
          "match": "\\,",
          "name": "punctuation.separator.comma.elm"
        },
        {
          "include": "#module-prefix"
        },
        {
          "match": "\\b[a-z][a-zA-Z0-9_]*\\b",
          "name": "variable.type.elm"
        },
        {
          "match": "\\b[A-Z][a-zA-Z0-9_]*\\b",
          "name": "storage.type.elm"
        },
        {
          "include": "#comments"
        },
        {
          "include": "#type-record"
        }
      ]
    },
    "type-signature": {
      "begin": "^(port\\s+)?([a-z_][a-zA-Z0-9_']*)\\s+(\\:)",
      "beginCaptures": {
        "1": {
          "name": "keyword.other.port.elm"
        },
        "2": {
          "name": "entity.name.function.elm"
        },
        "3": {
          "name": "keyword.other.colon.elm"
        }
      },
      "end": "((^(?=[a-z]))|^$)",
      "name": "meta.function.type-declaration.elm",
      "patterns": [
        {
          "include": "#type-signature-chunk"
        }
      ]
    },
    "type-signature-chunk": {
      "patterns": [
        {
          "match": "->",
          "name": "keyword.operator.arrow.elm"
        },
        {
          "match": "\\s+",
          "name": "punctuation.spaces.elm"
        },
        {
          "include": "#module-prefix"
        },
        {
          "match": "\\b[a-z][a-zA-Z0-9_]*\\b",
          "name": "variable.type.elm"
        },
        {
          "match": "\\b[A-Z][a-zA-Z0-9_]*\\b",
          "name": "storage.type.elm"
        },
        {
          "match": "\\(\\)",
          "name": "constant.unit.elm"
        },
        {
          "include": "#comma"
        },
        {
          "include": "#parens"
        },
        {
          "include": "#comments"
        },
        {
          "include": "#type-record"
        }
      ]
    },
    "glsl": {
      "begin": "(\\[)(glsl)(\\|)",
      "beginCaptures": {
        "1": {
          "name": "entity.glsl.bracket.elm"
        },
        "2": {
          "name": "entity.glsl.name.elm"
        },
        "3": {
          "name": "entity.glsl.bracket.elm"
        }
      },
      "end": "(\\|\\])",
      "endCaptures": {
        "1": {
          "name": "entity.glsl.bracket.elm"
        }
      },
      "name": "meta.embedded.block.glsl",
      "patterns": [
        {
          "include": "source.glsl"
        }
      ]
    }
  }
}


================================================
FILE: extensions/github1s/assets/pages/components.css
================================================
.vscode-button {
  border: none;
  display: inline-block;
  padding: 0 10px;
  height: 26px;
  line-height: 26px;
  font-size: 14px;
  outline: 1px solid transparent;
  outline-offset: 2px !important;
  color: var(--vscode-button-foreground);
  background: var(--vscode-button-background);
  cursor: pointer;
}

.vscode-button.loading {
  opacity: .5;
}

.vscode-button.size-mini {
  padding: 0 8px;
  height: 22px;
  line-height: 22px;
  font-size: 12px;
}

.vscode-button.size-middle {
  padding: 0 12px;
  height: 30px;
  line-height: 30px;
  font-size: 14px;
}

.vscode-button.size-large {
  padding: 0 14px;
  height: 34px;
  line-height: 34px;
  font-size: 18px;
}

.vscode-button:not([disabled]):hover {
  background: var(--vscode-button-hoverBackground);
}

.vscode-button:not([disabled]):focus {
  outline-color: var(--vscode-focusBorder);
}

.vscode-input {
  border: none;
  display: inline-block;
  padding: 0 4px;
  height: 26px;
  line-height: 26px;
  font-size: 13px;
  outline: 1px solid transparent;
  font-family: var(--vscode-font-family);
  color: var(--vscode-input-foreground);
  border: 1px solid var(--vscode-input-border, var(--vscode-widget-border));
  background-color: var(--vscode-input-background);
}

.vscode-input.size-mini {
  padding: 0 2px;
  height: 22px;
  line-height: 22px;
  font-size: 12px;
}

.vscode-input.size-middle {
  padding: 0 4px;
  height: 30px;
  line-height: 30px;
  font-size: 13px;
}

.vscode-input.size-large {
  padding: 0 6px;
  height: 34px;
  line-height: 34px;
  font-size: 18px;
}

.vscode-input:not([disabled]):focus {
  outline-color: var(--vscode-focusBorder);
  outline: 1px solid -webkit-focus-ring-color;
  outline-offset: -1px;
}

.vscode-textarea {
  border: none;
  display: inline-block;
  outline: 1px solid transparent;
  font-family: var(--vscode-font-family);
  color: var(--vscode-input-foreground);
  border: 1px solid var(--vscode-input-background);
  background-color: var(--vscode-input-background);
}

.vscode-textarea:not([disabled]):focus {
  outline-color: var(--vscode-focusBorder);
  outline: 1px solid -webkit-focus-ring-color;
  outline-offset: -1px;
}

.vscode-loading {
  width: 100%;
  text-align: center;
  height: 26px;
}

.vscode-loading.align-left {
  text-align: left;
}

.vscode-loading.align-right {
  text-align: right;
}

.vscode-loading > span {
  height: 100%;
  width: 5px;
  display: inline-block;
  margin-right: 4px;
  background: var(--vscode-button-background);
  animation: vscodeLoading 1.2s infinite ease-in-out;
}

.vscode-loading > span:nth-child(2) {
  animation-delay: -1s;
}

.vscode-loading > span:nth-child(3) {
  animation-delay: -0.9s;
}

.vscode-loading > span:nth-child(4) {
  animation-delay: -0.8s;
}

.vscode-loading > span:nth-child(5) {
  animation-delay: -0.7s;
}

.vscode-loading > span:nth-child(6) {
  animation-delay: -0.6s;
}

.vscode-loading > span:nth-child(7) {
  animation-delay: -0.5s;
}

.vscode-loading > span:nth-child(8) {
  animation-delay: -0.4s;
}

.vscode-loading > span:nth-child(9) {
  animation-delay: -0.3s;
}

.vscode-loading > span:last-child {
  margin-right: 0 !important;
}

@keyframes vscodeLoading {
  0% {
    transform: scaleY(0.4);
  }
  25% {
    transform: scaleY(1);
  }
  50% {
    transform: scaleY(0.4);
  }
  75% {
    transform: scaleY(0.4);
  }
  100% {
    transform: scaleY(0.4);
  }
}

.vscode-link {
  cursor: pointer;
  color: var(--vscode-textLink-foreground);
  text-decoration: underline;
}

.vscode-link:hover {
  color: var(--vscode-textLink-activeForeground);
}

.success-text {
  color: #89d185;
}

.warning-text {
  color: #cca700;
}

.error-text {
  color: #f48771;
}


================================================
FILE: extensions/github1s/assets/pages/components.js
================================================
import { h } from './libraries/preact.module.js';
import htm from './libraries/htm.module.js';

export const html = htm.bind(h);

export const VscodeButton = ({ size, loading, ...props }) => {
	const sizeClass = `size-${size || 'small'}`;
	const loadingClass = loading ? 'loading' : '';
	const classes = `vscode-button ${sizeClass} ${loadingClass}`;

	return html`<button class=${classes} disabled=${loading} ...${props} />`;
};

export const VscodeInput = ({ size, ...props }) => {
	const classes = `vscode-input size-${size || 'small'}`;

	return html`<input class=${classes} ...${props} />`;
};

export const VscodeTextarea = (props) => {
	return html` <textarea class="vscode-textarea" ...${props} /> `;
};

export const VscodeLoading = ({ blockWidth, blockSpacing, dots = 5, align = 'center', ...props }) => {
	const _blockWidth = blockWidth || '5px';
	const _blockSpacing = blockSpacing || '4px';
	const styleStr = `width: ${_blockWidth}; margin-right: ${_blockSpacing}`;
	const blocks = Array.from({ length: dots }).map(() => html`<span style=${styleStr} />`);
	const classes = 'vscode-loading' + (align !== 'center' ? ` align-${align}` : '');

	return html`<div class=${classes} ...${props}>${blocks}</div>`;
};

export const VscodeLink = ({ to, external, ...props }) => {
	const hrefProp = to ? { href: to } : {};
	const roleProp = to ? {} : { role: 'button' };
	const targetProp = external ? { target: '_blank' } : {};
	const combineProps = { ...hrefProp, ...roleProp, ...targetProp };

	return html` <a class="vscode-link" rel="noopener noreferrer" ...${combineProps} ...${props} /> `;
};

const postMessage = (() => {
	const vscode = window.acquireVsCodeApi();
	const uniqueId = (
		(id) => () =>
			id++
	)(1);
	const messageMap = new Map();

	window.addEventListener('message', ({ data }) => {
		messageMap.has(data.id) && messageMap.get(data.id)(data.data);
	});

	return (type, data) => {
		const messageId = uniqueId();
		vscode.postMessage({ type, data, id: messageId });
		return new Promise((resolve) => {
			messageMap.set(messageId, resolve);
		});
	};
})();

export const bridgeCommands = {
	getToken: () => postMessage('get-token'),
	setToken: (token) => postMessage('set-token', token),
	validateToken: (token) => postMessage('validate-token', token),
	openDetailPage: () => postMessage('open-detail-page'),
	OAuthAuthenticate: () => postMessage('oauth-authorizing'),
	alertMessage: (messageArgs) => postMessage('call-vscode-message-api', messageArgs),
	getPreferSgApi: () => postMessage('get-prefer-sourcegraph-api'),
	setPreferSgApi: (value) => postMessage('set-prefer-sourcegraph-api', value),
	getNotice: () => postMessage('get-notice'),
};


================================================
FILE: extensions/github1s/assets/pages/github1s-authentication.css
================================================
.authentication-page {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.authentication-page .page-notice {
  font-size: 16px;
  margin-bottom: 24px;
  font-weight: bold;
  color: #cca700;
  max-width: 520px;
  text-align: center;
}

.authentication-form .form-title {
  font-size: 24px;
  text-align: center;
  margin-bottom: 32px;
  color: var(--vscode-button-foreground);
}

.authentication-form .form-content {
  width: 320px;
}

.authentication-features {
  list-style: none;
	font-size: 14px;
	padding: 0;
	margin: 0 0 32px;
}

.authentication-features .feature-item {
	white-space: nowrap;
	margin-bottom: 4px;
}

.authentication-features .feature-item:last-child {
	margin-bottom: 0;
}

.authentication-features li.feature-item a {
	color: var(--vscode-foreground);
	text-decoration: none;
}

.authentication-features li.feature-item a.link:hover {
	color: #40a9ff;
}

.authentication-features li.feature-item a.link:active {
	color: #096dd9;
}

.authentication-features .feature-item::before {
	content: '✓';
	color: #32d74b;
	margin-right: 4px;
}

.authentication-features .feature-item {
	white-space: nowrap;
	line-height: 20px;
}

.github1s-authorizing-dialog li.feature-item a {
	color: var(--vscode-foreground);
	text-decoration: none;
}

.authentication-button {
  width: 100%;
  height: 40px;
  outline: none;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  box-shadow: rgba(255, 255, 255, 0.2) 0px 2px 4px;
  border: 1px solid var(--vscode-foreground);
  border-radius: 4px;
  font-size: 16px;
  transition: all 0.1s;
  cursor: pointer;
  color: #000;
}

.authentication-button:not([disabled]):hover {
  transform: scale(1.03);
  box-shadow: rgba(255, 255, 255, 0.25) 0px 2px 8px;
}

.authentication-button:not([disabled]):active {
  transform: scale(0.98);
}

.authentication-token .token-input-line {
  display: flex;
  margin-bottom: 6px;
}

.authentication-token .token-input-line .vscode-input {
  flex: 1;
  margin-right: 8px;
}

.split-line {
  height: 0;
  border: 1px solid var(--vscode-foreground);
  margin: 28px 0;
  position: relative;
}

.split-line::after {
  content: 'OR';
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translateY(-50%) translateX(-50%);
  border: 2px solid var(--vscode-foreground);
  padding: 4px 16px;
  border-radius: 8px;
  background-color: var(--vscode-editor-background);
  font-size: 12px;
  font-weight: bold;
}

.authentication-footer {
  margin-top: 24px;
  color: var(--vscode-foreground);
  width: 320px;
}

.authentication-footer > div:first-child {
  margin-bottom: 4px;
}

.authentication-form {
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

#app {
  margin-top: 60px;
}

.authentication-button[disabled] .auth-button-logo {
  opacity: .5;
}

.auth-button-logo {
  width: 24px;
  height: 24px;
  display: inline-block;
  background-size: 100% 100%;
  background-position: 50% 50%;
  background-repeat: no-repeat;
  margin-right: 8px;
}

.authentication-detail {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.detail-title {
  width: 320px;
  font-size: 24px;
  margin-bottom: 32px;
  color: var(--vscode-button-foreground);
}

.token-status {
  display: flex;
  align-items: center;
  width: 320px;
  margin-bottom: 8px;
}

.token-status .refresh-button {
	cursor: pointer;
  margin-left: 6px;
}

.token-status .refresh-button:hover {
  color: #3794ff;
}

.token-status .refresh-button:active {
  color: #094771;
}

.login-text > span:first-child {
  margin-right: 4px;
}

.user-avatar {
  display: inline-block;
  height: 14px;
  width: 14px;
  margin-right: 4px;
  vertical-align: bottom;
  border-radius: 50%;
  background-color: #ccc;
}

.rate-limit-info {
  width: 320px;
  list-style: none;
  padding-left: 0;
}

.rate-limit-info li {
  margin-bottom: 8px;
}

.token-text {
  width: 320px;
  margin-bottom: 8px;
}

.token-text.token-valid {
  color: #73c991;
}

.token-text.token-invalid {
  color: #f88070;
}

.token-operations {
  width: 320px;
  margin-top: 12px;
}

.token-operations > * {
  width: 240px;
}



================================================
FILE: extensions/github1s/assets/pages/github1s-authentication.js
================================================
import { render } from './libraries/preact.module.js';
import { useState, useCallback, useEffect } from './libraries/preact-hooks.module.js';
import { html, VscodeButton, VscodeInput, VscodeLoading, VscodeLink, bridgeCommands } from './components.js';

const pageConfig = window.pageConfig || {};

const AuthenticationFeatures = () => {
	return html`
		<ul class="authentication-features">
			${(pageConfig.authenticationFeatures || []).map(
				(feature) =>
					html`<li class="feature-item">
						<a class="link" href=${feature.link} target="_blank" rel="noopener noreferrer">${feature.text}</a>
					</li>`,
			)}
		</ul>
	`;
};

const AuthenticationButton = (props) => {
	const [authenticating, setAuthenticating] = useState(false);

	const handleButtonClick = useCallback(() => {
		setAuthenticating(true);
		bridgeCommands.OAuthAuthenticate().then(() => setAuthenticating(false));
	}, []);

	const buttonLogoUrl = encodeURI(`${pageConfig.extensionUri}/${pageConfig.OAuthButtonLogo}`);
	return html`
		<button class="authentication-button" disabled="${authenticating}" onClick=${handleButtonClick} ...${props}>
			<span class=${'auth-button-logo'} style=${`background-image: url("${buttonLogoUrl}")`}></span>
			<span>${pageConfig.OAuthButtonText}</span>
		</button>
	`;
};

const ManualInputToken = () => {
	const [inputToken, setInputToken] = useState('');
	const [loading, setLoading] = useState(false);
	const handleInputTokenChange = useCallback((event) => {
		setInputToken(event.target.value);
	}, []);

	const handleSubmit = useCallback(() => {
		if (inputToken) {
			setLoading(true);
			bridgeCommands.validateToken(inputToken).then((tokenStatus) => {
				if (!tokenStatus) {
					const messageArgs = { level: 'info', args: ['This AccessToken is invalid'] };
					bridgeCommands.alertMessage(messageArgs);
					setLoading(false);
					return;
				}
				bridgeCommands.setToken(inputToken).then(() => setLoading(false));
			});
		}
	}, [inputToken]);

	return html`
		<div class="authentication-token">
			<div class="token-input-line">
				<${VscodeInput}
					autocomplete="off"
					value=${inputToken}
					disabled="${loading}"
					onInput=${handleInputTokenChange}
				/>
				<${VscodeButton} loading=${loading} onClick=${handleSubmit}>Submit<//>
			</div>
			<${VscodeLink} to="${pageConfig.createTokenLink}" external>Create New AccessToken<//>
		</div>
	`;
};

const SplitLine = () => {
	return html`<div class="split-line"></div>`;
};

const AuthenticationFooter = () => {
	return html`
		<div class="authentication-footer">
			<div>The access token will only store in your browser.</div>
			<div>Don't forget to clean it while you are using a device that doesn't belong to you.</div>
		</div>
	`;
};

const AuthenticationForm = () => {
	return html`
		<div class="authentication-form">
			<div class="form-title">${pageConfig.authenticationFormTitle}</div>
			<${AuthenticationFeatures} />
			<div class="form-content">
				<${AuthenticationButton} />
				<${SplitLine} />
				<${ManualInputToken} />
			</div>
			<${AuthenticationFooter} />
		</div>
	`;
};

const StatusNumberText = ({ count }) => {
	if (count <= 0) {
		return html`<span class="error-text">${count}</span>`;
	}
	if (count <= 99) {
		return html`<span class="warning-text">${count}</span>`;
	}

	return html`<span class="success-text">${count}</span>`;
};

const RateLimitsInfo = ({ info }) => {
	return html`<div>
		<ul class="rate-limit-info">
			<li>------- Rate Limit Info -------</li>
			<li>X-RateLimit-Limit: <${StatusNumberText} count=${info.limit} /></li>
			<li>X-RateLimit-Remaining: <${StatusNumberText} count=${info.remaining} /></li>
			<li>X-RateLimit-Used: ${info.used}</li>
			<li>X-RateLimit-Reset: ${info.reset}</li>
			<li>------------------------------</li>
			<li class="rate-limit-description">
				<span>Current rate limit window will reset after </span>
				<span>${Math.max(info.reset - Math.ceil(Date.now() / 1000), 0)}s</span>
			</li>
			<li>
				<${VscodeLink} to="${pageConfig.rateLimitDocLink}" external>${pageConfig.rateLimitDocLinkText}<//>
			</li>
		</ul>
	</div>`;
};

const AuthenticationDetail = ({ accessToken }) => {
	const [tokenStatus, setTokenStatus] = useState(null);
	const [validating, setValidating] = useState(true);

	const displayToken = accessToken.slice(0, 7) + '*********************************';
	const tokenClasses = `token-text ${validating ? '' : tokenStatus ? 'token-valid' : 'token-invalid'}`;

	const handleRefreshTokenStatus = useCallback(() => {
		setValidating(true);
		bridgeCommands
			.validateToken(accessToken)
			.then((tokenStatus) => setTokenStatus(tokenStatus))
			.finally(() => setValidating(false));
	}, [accessToken]);

	const handleClearToken = useCallback(() => {
		const messageArgs = {
			level: 'warning',
			args: ['Would you want to clear the saved this AccessToken?', { modal: true }, 'Confirm'],
		};
		bridgeCommands.alertMessage(messageArgs).then((choose) => choose === 'Confirm' && bridgeCommands.setToken(''));
	}, []);

	useEffect(() => {
		handleRefreshTokenStatus();
	}, [handleRefreshTokenStatus]);

	if (validating) {
		return html`<${VscodeLoading} />`;
	}

	return html`
		<div class="authentication-detail">
			<div class="detail-title">Authorization Detail</div>
			<div class="token-status">
				${tokenStatus
					? html`<div class="login-text">
							<span>Logged in as</span>
							<${VscodeLink} to=${tokenStatus.profile_url} external>
								<img class="user-avatar" src=${tokenStatus.avatar_url} />${tokenStatus.username}
							</a>
					  </div>`
					: html`<div>Current AccessToken is <span class="error-text">INVALID</span>.</div>`}
				<span class="refresh-button" onClick=${handleRefreshTokenStatus}>↻</span>
			</div>
			<div class=${tokenClasses}>${displayToken}</div>
			${tokenStatus && tokenStatus.rateLimits ? html`<${RateLimitsInfo} info=${tokenStatus.rateLimits} />` : null}
			<div class="token-operations">
				<${VscodeButton} size="middle" onClick=${handleClearToken}>Clear Access Token<//>
			</div>
			<${AuthenticationFooter} />
		</div>
	`;
};

const App = () => {
	const [loading, setLoading] = useState(true);
	const [accessToken, setAccessToken] = useState('');
	const [notice, setNotice] = useState('');

	useEffect(() => {
		bridgeCommands.getToken().then((token) => {
			setAccessToken(token);
			setLoading(false);
		});
		bridgeCommands.getNotice().then((notice) => setNotice(notice));
	}, []);

	useEffect(() => {
		const handler = ({ data }) => {
			if (data.type === 'token-changed') {
				setAccessToken(data.token);
				bridgeCommands.getNotice().then((notice) => setNotice(notice));
			}
		};
		window.addEventListener('message', handler);
		return () => window.removeEventListener('message', handler);
	}, [setAccessToken]);

	if (loading) {
		return html`<${VscodeLoading} />`;
	}

	return html`
		<div class="authentication-page">
			${notice ? html`<div class="page-notice">${notice}</div>` : null}
			<${accessToken ? AuthenticationDetail : AuthenticationForm} accessToken=${accessToken} />
		</div>
	`;
};

const loadingElement = document.getElementById('page-loading');
loadingElement.parentNode.removeChild(loadingElement);
render(html`<${App} />`, document.getElementById('app'));


================================================
FILE: extensions/github1s/assets/pages/github1s-settings.css
================================================
.vscode-input {
  margin-bottom: 10px;
}

.vscode-button {
  margin-bottom: 10px;
}

#app {
  padding: 10px;
}

.flex-line {
  display: flex;
}

.flex-line > * {
  flex: 1;
}

.page-title {
	font-size: 16px;
	font-weight: bold;
	margin-bottom: 10px;
}

.page-description {
  font-size: 12px;
	margin-bottom: 12px;
}

.description div:last-child {
	margin-bottom: 0;
}

.content-block {
  margin-bottom: 8px;
}

.content-block-title {
  font-weight: normal;
	margin-bottom: 8px;
}

.input-token-block {
	margin-bottom: 8px;
}

.input-token-block-title {
  font-weight: normal;
	margin-bottom: 8px;
}

.create-token-link {
	margin-bottom: 10px;
}

.page-footer {
  display: flex;
  align-items: center;
  margin-top: 12px;
}

.page-footer input {
 margin-right: 4px;
 margin-left: 0;
}

.login-text > span:first-child {
  margin-right: 4px;
}

.user-avatar {
  display: inline-block;
  height: 14px;
  width: 14px;
  margin-right: 4px;
  vertical-align: bottom;
  border-radius: 50%;
  background-color: #ccc;
}



================================================
FILE: extensions/github1s/assets/pages/github1s-settings.js
================================================
import { render } from './libraries/preact.module.js';
import { useState, useCallback, useEffect } from './libraries/preact-hooks.module.js';
import { html, VscodeButton, VscodeInput, VscodeLink, VscodeLoading, bridgeCommands } from './components.js';

const pageConfig = window.pageConfig || {};

export const PageHeader = ({ title, children, ...props }) => {
	return html`<div ...${props}>
		<div class="page-title">${title}</div>
		<div class="page-description">${children}</div>
	</div>`;
};

export const OAuthBlock = ({ buttonText, command, ...props }) => {
	const [loading, setLoading] = useState(false);
	const handleButtonClick = useCallback(() => {
		setLoading(true);
		bridgeCommands.OAuthAuthenticate().then(() => setLoading(false));
	}, []);

	return html`
		<div class="content-block" ...${props}>
			<h3 class="content-block-title">Authenticating OAuth App</h3>
			<div class="flex-line">
				<${VscodeButton} loading=${loading} onClick=${handleButtonClick}>${buttonText}<//>
			</div>
		</div>
	`;
};

export const InputTokenBlock = ({ createLink, isEditing, onCancel, ...props }) => {
	const [inputToken, setInputToken] = useState('');
	const [loading, setLoading] = useState(false);
	const handleInputTokenChange = useCallback((event) => {
		setInputToken(event.target.value);
	}, []);

	const handleSubmit = useCallback(() => {
		if (inputToken) {
			setLoading(true);
			bridgeCommands.validateToken(inputToken).then((tokenStatus) => {
				if (!tokenStatus) {
					const messageArgs = { level: 'info', args: ['This AccessToken is invalid'] };
					bridgeCommands.alertMessage(messageArgs);
					setLoading(false);
					return;
				}
				bridgeCommands.setToken(inputToken).then(() => setLoading(false));
			});
		}
	}, [inputToken]);

	return html`
		<div class="input-token-block" ...${props}>
			<h3 class="input-token-block-title">Manual Input AccessToken</h3>
			<div class="create-token-link">
				<${VscodeLink} to=${createLink} external>Create New AccessToken <//>
			</div>
			<div class="flex-line">
				<${VscodeInput}
					autocomplete="off"
					value=${inputToken}
					disabled="${loading}"
					onInput=${handleInputTokenChange}
				/>
			</div>
			<div class="flex-line">
				<${VscodeButton} loading=${loading} onClick=${handleSubmit}>Submit<//>
			</div>
			${isEditing
				? html`<div class="flex-line">
						<${VscodeButton} onClick=${onCancel}>Cancel<//>
					</div>`
				: null}
		</div>
	`;
};

export const TokenDetailBlock = ({ token, validating, onEditClick, validateToken, ...props }) => {
	const handleValidateClick = useCallback(() => {
		validateToken(token).then((tokenStatus) => {
			const statusMessage = `Current AccessToken is ${tokenStatus ? 'VALID' : 'INVALID'}`;
			const messageArgs = { level: 'info', args: [statusMessage] };
			bridgeCommands.alertMessage(messageArgs);
		});
	}, [validateToken, token]);

	const handleClearClick = useCallback(() => {
		const messageArgs = {
			level: 'warning',
			args: ['Would you want to clear the saved this AccessToken?', { modal: true }, 'Confirm'],
		};
		bridgeCommands.alertMessage(messageArgs).then((choose) => choose === 'Confirm' && bridgeCommands.setToken(''));
	}, []);

	return html`
		<div class="token-detail-block" ${props}>
			<div class="flex-line"><${VscodeButton} onClick=${bridgeCommands.openDetailPage}>Detail<//></div>
			<div class="flex-line"><${VscodeButton} loading=${validating} onClick=${handleValidateClick}>Validate<//></div>
			<div class="flex-line"><${VscodeButton} onClick=${onEditClick}>Edit<//></div>
			<div class="flex-line"><${VscodeButton} onClick=${handleClearClick}>Clear<//></div>
		</div>
	`;
};

const PageFooter = () => {
	const [preferSgApi, setPreferSgApi] = useState(false);

	const updatePreferSgApi = useCallback(() => {
		bridgeCommands.getPreferSgApi().then((value) => {
			setPreferSgApi(value);
		});
	}, []);

	const handleCheckboxChange = useCallback(
		(event) => {
			bridgeCommands.setPreferSgApi(event.target.checked).then(() => {
				updatePreferSgApi();
			});
		},
		[updatePreferSgApi],
	);

	useEffect(() => {
		const handler = ({ data }) => {
			if (data.type === 'prefer-sourcegraph-api-changed') {
				updatePreferSgApi();
			}
		};
		window.addEventListener('message', handler);
		return () => window.removeEventListener('message', handler);
	}, []);

	useEffect(() => {
		updatePreferSgApi();
	}, [updatePreferSgApi]);

	return html`
		<div class="page-footer">
			<input type="checkbox" checked=${preferSgApi} onChange=${handleCheckboxChange} />
			<span>Prefer to use Sourcegraph API</span>
		</div>
	`;
};

const TokenEditPage = ({ token, onCancel, ...props }) => {
	const pageDescription = (pageConfig.pageDescriptionLines || []).map((line) => html`<div>${line}</div>`);

	return html`
		<div class="token-edit-page" ...${props}>
			<${PageHeader} title="Set AccessToken">${pageDescription}<//>
			<${OAuthBlock} buttonText=${pageConfig.OAuthButtonText} command=${pageConfig.OAuthCommand} />
			<${InputTokenBlock} createLink=${pageConfig.createTokenLink} isEditing=${!!token} onCancel=${onCancel} />
		</div>
	`;
};

const TokenDetailPage = ({ token, onEditClick, ...props }) => {
	const [tokenStatus, setTokenStatus] = useState(null);
	const [validating, setValidating] = useState(true);

	const validateToken = useCallback((token) => {
		setValidating(true);
		return bridgeCommands.validateToken(token).then((tokenStatus) => {
			setValidating(false);
			setTokenStatus(tokenStatus);
			return tokenStatus;
		});
	}, []);

	const validateResult = tokenStatus
		? html`<div class="login-text">
				<span>Logged in as</span>
				<a href=${tokenStatus.profile_url} target="_blank" rel="noopener noreferrer">
					<img class="user-avatar" src=${tokenStatus.avatar_url} />${tokenStatus.username}
				</a>
			</div>`
		: html`<div>Current AccessToken is <span class="error-text">INVALID</span>.</div>`;

	useEffect(() => {
		token && validateToken(token);
	}, [token, validateToken]);

	return html`
		<div class="token-detail-page" ...${props}>
			<${PageHeader} title="You have authenticated">
				${validating ? html`<${VscodeLoading} dots=${8} align="left" style="height: 14px" />` : validateResult}
			<//>
			<${TokenDetailBlock}
				token=${token}
				validating=${validating}
				onEditClick=${onEditClick}
				validateToken=${validateToken}
			/>
		</div>
	`;
};

const App = () => {
	const [loading, setLoading] = useState(true);
	const [pageType, setPageType] = useState('EDIT');
	const [token, setToken] = useState('');

	const switchToEdit = useCallback(() => setPageType('EDIT'), []);
	const switchToDetail = useCallback(() => setPageType('DETAIL'), []);

	useEffect(() => {
		bridgeCommands.getToken().then((token) => {
			setToken(token);
			setLoading(false);
			setPageType(token ? 'DETAIL' : 'EDIT');
		});
	}, []);

	useEffect(() => {
		const handler = ({ data }) => {
			if (data.type === 'token-changed') {
				setToken(data.token);
				setPageType(data.token ? 'DETAIL' : 'EDIT');
			}
		};
		window.addEventListener('message', handler);
		return () => window.removeEventListener('message', handler);
	}, []);

	if (loading) {
		return html`<${VscodeLoading} />`;
	}

	return html`
		<div>
			${pageType === 'DETAIL'
				? html`<${TokenDetailPage} token=${token} onEditClick=${switchToEdit} />`
				: html`<${TokenEditPage} token=${token} onCancel=${switchToDetail} />`}
			<${PageFooter} />
		</div>
	`;
};

const loadingElement = document.getElementById('page-loading');
loadingElement.parentNode.removeChild(loadingElement);
render(html`<${App} />`, document.getElementById('app'));


================================================
FILE: extensions/github1s/assets/pages/libraries/htm.module.js
================================================
// https://github.com/developit/htm, download from https://unpkg.com/htm@3.1.0/dist/htm.module.js
var n=function(t,s,r,e){var u;s[0]=0;for(var h=1;h<s.length;h++){var p=s[h++],a=s[h]?(s[0]|=p?1:2,r[s[h++]]):s[++h];3===p?e[0]=a:4===p?e[1]=Object.assign(e[1]||{},a):5===p?(e[1]=e[1]||{})[s[++h]]=a:6===p?e[1][s[++h]]+=a+"":p?(u=t.apply(a,n(t,a,r,["",null])),e.push(u),a[0]?s[0]|=2:(s[h-2]=0,s[h]=u)):e.push(a)}return e},t=new Map;export default function(s){var r=t.get(this);return r||(r=new Map,t.set(this,r)),(r=n(this,r.get(s)||(r.set(s,r=function(n){for(var t,s,r=1,e="",u="",h=[0],p=function(n){1===r&&(n||(e=e.replace(/^\s*\n\s*|\s*\n\s*$/g,"")))?h.push(0,n,e):3===r&&(n||e)?(h.push(3,n,e),r=2):2===r&&"..."===e&&n?h.push(4,n,0):2===r&&e&&!n?h.push(5,0,!0,e):r>=5&&((e||!n&&5===r)&&(h.push(r,0,e,s),r=6),n&&(h.push(r,n,0,s),r=6)),e=""},a=0;a<n.length;a++){a&&(1===r&&p(),p(a));for(var l=0;l<n[a].length;l++)t=n[a][l],1===r?"<"===t?(p(),h=[h],r=3):e+=t:4===r?"--"===e&&">"===t?(r=1,e=""):e=t+e[0]:u?t===u?u="":e+=t:'"'===t||"'"===t?u=t:">"===t?(p(),r=1):r&&("="===t?(r=5,s=e,e=""):"/"===t&&(r<5||">"===n[a][l+1])?(p(),3===r&&(h=h[0]),r=h,(h=h[0]).push(2,0,r),r=0):" "===t||"\t"===t||"\n"===t||"\r"===t?(p(),r=2):e+=t),3===r&&"!--"===e&&(r=4,h=h[0])}return p(),h}(s)),r),arguments,[])).length>1?r:r[0]}

================================================
FILE: extensions/github1s/assets/pages/libraries/preact-hooks.module.js
================================================
// https://github.com/preactjs/preact, download from https://unpkg.com/preact@10.7.1/hooks/dist/hooks.module.js
import{options as n}from"./preact.module.js";var t,u,r,o=0,i=[],c=n.__b,f=n.__r,e=n.diffed,a=n.__c,v=n.unmount;function l(t,r){n.__h&&n.__h(u,t,o||r),o=0;var i=u.__H||(u.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({}),i.__[t]}function m(n){return o=1,p(w,n)}function p(n,r,o){var i=l(t++,2);return i.t=n,i.__c||(i.__=[o?o(r):w(void 0,r),function(n){var t=i.t(i.__[0],n);i.__[0]!==t&&(i.__=[t,i.__[1]],i.__c.setState({}))}],i.__c=u),i.__}function y(r,o){var i=l(t++,3);!n.__s&&k(i.__H,o)&&(i.__=r,i.__H=o,u.__H.__h.push(i))}function d(r,o){var i=l(t++,4);!n.__s&&k(i.__H,o)&&(i.__=r,i.__H=o,u.__h.push(i))}function h(n){return o=5,_(function(){return{current:n}},[])}function s(n,t,u){o=6,d(function(){return"function"==typeof n?(n(t()),function(){return n(null)}):n?(n.current=t(),function(){return n.current=null}):void 0},null==u?u:u.concat(n))}function _(n,u){var r=l(t++,7);return k(r.__H,u)&&(r.__=n(),r.__H=u,r.__h=n),r.__}function A(n,t){return o=8,_(function(){return n},t)}function F(n){var r=u.context[n.__c],o=l(t++,9);return o.c=n,r?(null==o.__&&(o.__=!0,r.sub(u)),r.props.value):n.__}function T(t,u){n.useDebugValue&&n.useDebugValue(u?u(t):t)}function q(n){var r=l(t++,10),o=m();return r.__=n,u.componentDidCatch||(u.componentDidCatch=function(n){r.__&&r.__(n),o[1](n)}),[o[0],function(){o[1](void 0)}]}function x(){for(var t;t=i.shift();)if(t.__P)try{t.__H.__h.forEach(g),t.__H.__h.forEach(j),t.__H.__h=[]}catch(u){t.__H.__h=[],n.__e(u,t.__v)}}n.__b=function(n){u=null,c&&c(n)},n.__r=function(n){f&&f(n),t=0;var r=(u=n.__c).__H;r&&(r.__h.forEach(g),r.__h.forEach(j),r.__h=[])},n.diffed=function(t){e&&e(t);var o=t.__c;o&&o.__H&&o.__H.__h.length&&(1!==i.push(o)&&r===n.requestAnimationFrame||((r=n.requestAnimationFrame)||function(n){var t,u=function(){clearTimeout(r),b&&cancelAnimationFrame(t),setTimeout(n)},r=setTimeout(u,100);b&&(t=requestAnimationFrame(u))})(x)),u=null},n.__c=function(t,u){u.some(function(t){try{t.__h.forEach(g),t.__h=t.__h.filter(function(n){return!n.__||j(n)})}catch(r){u.some(function(n){n.__h&&(n.__h=[])}),u=[],n.__e(r,t.__v)}}),a&&a(t,u)},n.unmount=function(t){v&&v(t);var u,r=t.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{g(n)}catch(n){u=n}}),u&&n.__e(u,r.__v))};var b="function"==typeof requestAnimationFrame;function g(n){var t=u,r=n.__c;"function"==typeof r&&(n.__c=void 0,r()),u=t}function j(n){var t=u;n.__c=n.__(),u=t}function k(n,t){return!n||n.length!==t.length||t.some(function(t,u){return t!==n[u]})}function w(n,t){return"function"==typeof t?t(n):t}export{m as useState,p as useReducer,y as useEffect,d as useLayoutEffect,h as useRef,s as useImperativeHandle,_ as useMemo,A as useCallback,F as useContext,T as useDebugValue,q as useErrorBoundary};

================================================
FILE: extensions/github1s/assets/pages/libraries/preact.module.js
================================================
// https://github.com/preactjs/preact, download from https://unpkg.com/preact@10.7.1/dist/preact.module.js
var n,l,u,i,t,o,r,f,e={},c=[],s=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function a(n,l){for(var u in l)n[u]=l[u];return n}function h(n){var l=n.parentNode;l&&l.removeChild(n)}function v(l,u,i){var t,o,r,f={};for(r in u)"key"==r?t=u[r]:"ref"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return y(l,f,t,o,null)}function y(n,i,t,o,r){var f={type:n,props:i,key:t,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++u:r};return null==r&&null!=l.vnode&&l.vnode(f),f}function p(){return{current:null}}function d(n){return n.children}function _(n,l){this.props=n,this.context=l}function k(n,l){if(null==l)return n.__?k(n.__,n.__.__k.indexOf(n)+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return"function"==typeof n.type?k(n):null}function b(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return b(n)}}function m(n){(!n.__d&&(n.__d=!0)&&t.push(n)&&!g.__r++||r!==l.debounceRendering)&&((r=l.debounceRendering)||o)(g)}function g(){for(var n;g.__r=t.length;)n=t.sort(function(n,l){return n.__v.__b-l.__v.__b}),t=[],n.some(function(n){var l,u,i,t,o,r;n.__d&&(o=(t=(l=n).__v).__e,(r=l.__P)&&(u=[],(i=a({},t)).__v=t.__v+1,j(r,t,i,l.__n,void 0!==r.ownerSVGElement,null!=t.__h?[o]:null,u,null==o?k(t):o,t.__h),z(u,t),t.__e!=o&&b(t)))})}function w(n,l,u,i,t,o,r,f,s,a){var h,v,p,_,b,m,g,w=i&&i.__k||c,A=w.length;for(u.__k=[],h=0;h<l.length;h++)if(null!=(_=u.__k[h]=null==(_=l[h])||"boolean"==typeof _?null:"string"==typeof _||"number"==typeof _||"bigint"==typeof _?y(null,_,null,null,_):Array.isArray(_)?y(d,{children:_},null,null,null):_.__b>0?y(_.type,_.props,_.key,null,_.__v):_)){if(_.__=u,_.__b=u.__b+1,null===(p=w[h])||p&&_.key==p.key&&_.type===p.type)w[h]=void 0;else for(v=0;v<A;v++){if((p=w[v])&&_.key==p.key&&_.type===p.type){w[v]=void 0;break}p=null}j(n,_,p=p||e,t,o,r,f,s,a),b=_.__e,(v=_.ref)&&p.ref!=v&&(g||(g=[]),p.ref&&g.push(p.ref,null,_),g.push(v,_.__c||b,_)),null!=b?(null==m&&(m=b),"function"==typeof _.type&&_.__k===p.__k?_.__d=s=x(_,s,n):s=P(n,_,p,w,b,s),"function"==typeof u.type&&(u.__d=s)):s&&p.__e==s&&s.parentNode!=n&&(s=k(p))}for(u.__e=m,h=A;h--;)null!=w[h]&&("function"==typeof u.type&&null!=w[h].__e&&w[h].__e==u.__d&&(u.__d=k(i,h+1)),N(w[h],w[h]));if(g)for(h=0;h<g.length;h++)M(g[h],g[++h],g[++h])}function x(n,l,u){for(var i,t=n.__k,o=0;t&&o<t.length;o++)(i=t[o])&&(i.__=n,l="function"==typeof i.type?x(i,l,u):P(u,i,i,t,i.__e,l));return l}function A(n,l){return l=l||[],null==n||"boolean"==typeof n||(Array.isArray(n)?n.some(function(n){A(n,l)}):l.push(n)),l}function P(n,l,u,i,t,o){var r,f,e;if(void 0!==l.__d)r=l.__d,l.__d=void 0;else if(null==u||t!=o||null==t.parentNode)n:if(null==o||o.parentNode!==n)n.appendChild(t),r=null;else{for(f=o,e=0;(f=f.nextSibling)&&e<i.length;e+=2)if(f==t)break n;n.insertBefore(t,o),r=o}return void 0!==r?r:t.nextSibling}function C(n,l,u,i,t){var o;for(o in u)"children"===o||"key"===o||o in l||H(n,o,null,u[o],i);for(o in l)t&&"function"!=typeof l[o]||"children"===o||"key"===o||"value"===o||"checked"===o||u[o]===l[o]||H(n,o,l[o],u[o],i)}function $(n,l,u){"-"===l[0]?n.setProperty(l,u):n[l]=null==u?"":"number"!=typeof u||s.test(l)?u:u+"px"}function H(n,l,u,i,t){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else{if("string"==typeof i&&(n.style.cssText=i=""),i)for(l in i)u&&l in u||$(n.style,l,"");if(u)for(l in u)i&&u[l]===i[l]||$(n.style,l,u[l])}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/Capture$/,"")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?i||n.addEventListener(l,o?T:I,o):n.removeEventListener(l,o?T:I,o);else if("dangerouslySetInnerHTML"!==l){if(t)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==l&&"list"!==l&&"form"!==l&&"tabIndex"!==l&&"download"!==l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null!=u&&(!1!==u||"a"===l[0]&&"r"===l[1])?n.setAttribute(l,u):n.removeAttribute(l))}}function I(n){this.l[n.type+!1](l.event?l.event(n):n)}function T(n){this.l[n.type+!0](l.event?l.event(n):n)}function j(n,u,i,t,o,r,f,e,c){var s,h,v,y,p,k,b,m,g,x,A,P=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(c=i.__h,e=u.__e=i.__e,u.__h=null,r=[e]),(s=l.__b)&&s(u);try{n:if("function"==typeof P){if(m=u.props,g=(s=P.contextType)&&t[s.__c],x=s?g?g.props.value:s.__:t,i.__c?b=(h=u.__c=i.__c).__=h.__E:("prototype"in P&&P.prototype.render?u.__c=h=new P(m,x):(u.__c=h=new _(m,x),h.constructor=P,h.render=O),g&&g.sub(h),h.props=m,h.state||(h.state={}),h.context=x,h.__n=t,v=h.__d=!0,h.__h=[]),null==h.__s&&(h.__s=h.state),null!=P.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=a({},h.__s)),a(h.__s,P.getDerivedStateFromProps(m,h.__s))),y=h.props,p=h.state,v)null==P.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(null==P.getDerivedStateFromProps&&m!==y&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(m,x),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(m,h.__s,x)||u.__v===i.__v){h.props=m,h.state=h.__s,u.__v!==i.__v&&(h.__d=!1),h.__v=u,u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(n){n&&(n.__=u)}),h.__h.length&&f.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(m,h.__s,x),null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(y,p,k)})}h.context=x,h.props=m,h.state=h.__s,(s=l.__r)&&s(u),h.__d=!1,h.__v=u,h.__P=n,s=h.render(h.props,h.state,h.context),h.state=h.__s,null!=h.getChildContext&&(t=a(a({},t),h.getChildContext())),v||null==h.getSnapshotBeforeUpdate||(k=h.getSnapshotBeforeUpdate(y,p)),A=null!=s&&s.type===d&&null==s.key?s.props.children:s,w(n,Array.isArray(A)?A:[A],u,i,t,o,r,f,e,c),h.base=u.__e,u.__h=null,h.__h.length&&f.push(h),b&&(h.__E=h.__=null),h.__e=!1}else null==r&&u.__v===i.__v?(u.__k=i.__k,u.__e=i.__e):u.__e=L(i.__e,u,i,t,o,r,f,c);(s=l.diffed)&&s(u)}catch(n){u.__v=null,(c||null!=r)&&(u.__e=e,u.__h=!!c,r[r.indexOf(e)]=null),l.__e(n,u,i)}}function z(n,u){l.__c&&l.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u)})}catch(n){l.__e(n,u.__v)}})}function L(l,u,i,t,o,r,f,c){var s,a,v,y=i.props,p=u.props,d=u.type,_=0;if("svg"===d&&(o=!0),null!=r)for(;_<r.length;_++)if((s=r[_])&&"setAttribute"in s==!!d&&(d?s.localName===d:3===s.nodeType)){l=s,r[_]=null;break}if(null==l){if(null===d)return document.createTextNode(p);l=o?document.createElementNS("http://www.w3.org/2000/svg",d):document.createElement(d,p.is&&p),r=null,c=!1}if(null===d)y===p||c&&l.data===p||(l.data=p);else{if(r=r&&n.call(l.childNodes),a=(y=i.props||e).dangerouslySetInnerHTML,v=p.dangerouslySetInnerHTML,!c){if(null!=r)for(y={},_=0;_<l.attributes.length;_++)y[l.attributes[_].name]=l.attributes[_].value;(v||a)&&(v&&(a&&v.__html==a.__html||v.__html===l.innerHTML)||(l.innerHTML=v&&v.__html||""))}if(C(l,p,y,o,c),v)u.__k=[];else if(_=u.props.children,w(l,Array.isArray(_)?_:[_],u,i,t,o&&"foreignObject"!==d,r,f,r?r[0]:i.__k&&k(i,0),c),null!=r)for(_=r.length;_--;)null!=r[_]&&h(r[_]);c||("value"in p&&void 0!==(_=p.value)&&(_!==l.value||"progress"===d&&!_||"option"===d&&_!==y.value)&&H(l,"value",_,y.value,!1),"checked"in p&&void 0!==(_=p.checked)&&_!==l.checked&&H(l,"checked",_,y.checked,!1))}return l}function M(n,u,i){try{"function"==typeof n?n(u):n.current=u}catch(n){l.__e(n,i)}}function N(n,u,i){var t,o;if(l.unmount&&l.unmount(n),(t=n.ref)&&(t.current&&t.current!==n.__e||M(t,null,u)),null!=(t=n.__c)){if(t.componentWillUnmount)try{t.componentWillUnmount()}catch(n){l.__e(n,u)}t.base=t.__P=null}if(t=n.__k)for(o=0;o<t.length;o++)t[o]&&N(t[o],u,"function"!=typeof n.type);i||null==n.__e||h(n.__e),n.__e=n.__d=void 0}function O(n,l,u){return this.constructor(n,u)}function S(u,i,t){var o,r,f;l.__&&l.__(u,i),r=(o="function"==typeof t)?null:t&&t.__k||i.__k,f=[],j(i,u=(!o&&t||i).__k=v(d,null,[u]),r||e,e,void 0!==i.ownerSVGElement,!o&&t?[t]:r?null:i.firstChild?n.call(i.childNodes):null,f,!o&&t?t:r?r.__e:i.firstChild,o),z(f,u)}function q(n,l){S(n,l,q)}function B(l,u,i){var t,o,r,f=a({},l.props);for(r in u)"key"==r?t=u[r]:"ref"==r?o=u[r]:f[r]=u[r];return arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),y(l.type,f,t||l.key,o||l.ref,null)}function D(n,l){var u={__c:l="__cC"+f++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,i;return this.getChildContext||(u=[],(i={})[l]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(m)},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n)}}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n=c.slice,l={__e:function(n,l,u,i){for(var t,o,r;l=l.__;)if((t=l.__c)&&!t.__)try{if((o=t.constructor)&&null!=o.getDerivedStateFromError&&(t.setState(o.getDerivedStateFromError(n)),r=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(n,i||{}),r=t.__d),r)return t.__E=t}catch(l){n=l}throw n}},u=0,i=function(n){return null!=n&&void 0===n.constructor},_.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=a({},this.state),"function"==typeof n&&(n=n(a({},u),this.props)),n&&a(u,n),null!=n&&this.__v&&(l&&this.__h.push(l),m(this))},_.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),m(this))},_.prototype.render=d,t=[],o="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,g.__r=0,f=0;export{S as render,q as hydrate,v as createElement,v as h,d as Fragment,p as createRef,i as isValidElement,_ as Component,B as cloneElement,D as createContext,A as toChildArray,l as options};

================================================
FILE: extensions/github1s/package.json
================================================
{
  "name": "github1s",
  "version": "0.0.0",
  "publisher": "github1s",
  "description": "",
  "private": true,
  "enabledApiProposals": [
    "fileSearchProvider",
    "textSearchProvider",
    "resolvers"
  ],
  "directories": {
    "lib": "lib"
  },
  "activationEvents": [
    "onStartupFinished",
    "onFileSystem:github1s",
    "onFileSystem:gitlab1s",
    "onFileSystem:bitbucket1s",
    "onFileSystem:npmjs1s",
    "onFileSystem:ossinsight",
    "onCommand:remoteHub.openRepository"
  ],
  "browser": "./dist/extension",
  "engines": {
    "vscode": "^1.48.0"
  },
  "contributes": {
    "viewsContainers": {
      "activitybar": [
        {
          "id": "settings",
          "title": "Settings",
          "icon": "assets/settings.svg"
        }
      ]
    },
    "views": {
      "settings": [
        {
          "id": "github1s.views.settings",
          "name": "Settings",
          "type": "webview",
          "when": "github1s:views:settings:visible == true"
        }
      ],
      "scm": [
        {
          "id": "github1s.views.fileHistory",
          "name": "File History",
          "when": "github1s:views:fileHistory:visible == true"
        },
        {
          "id": "github1s.views.commitList",
          "name": "Commits",
          "when": "github1s:views:commitList:visible == true"
        },
        {
          "id": "github1s.views.codeReviewList",
          "name": "Code Reviews",
          "when": "github1s:views:codeReviewList:visible == true"
        }
      ]
    },
    "commands": [
      {
        "command": "github1s.commands.openRepository",
        "title": "Open Repository...",
        "category": "GitHub1s"
      },
      {
        "command": "github1s.commands.openOnlineEditor",
        "title": "Open Online Editor...",
        "category": "GitHub1s"
      },
      {
        "command": "github1s.commands.checkoutTo",
        "title": "Checkout to...",
        "category": "GitHub1s"
      },
      {
        "command": "github1s.commands.refreshCodeReviewList",
        "title": "Refresh",
        "category": "GitHub1s",
        "icon": "$(refresh)"
      },
      {
        "command": "github1s.commands.searchCodeReview",
        "title": "Search",
        "category": "GitHub1s",
        "icon": "$(search)"
      },
      {
        "command": "github1s.commands.switchToPullRequest",
        "title": "Switch to Pull Request",
        "category": "GitHub1s",
        "icon": "$(log-in)",
        "enablement": "github1s:adapters:default:codeReviewType == 'PullRequest'"
      },
      {
        "command": "github1s.commands.switchToMergeRequest",
        "title": "Switch to Merge Request",
        "category": "GitHub1s",
        "icon": "$(log-in)",
        "enablement": "github1s:adapters:default:codeReviewType == 'MergeRequest'"
      },
      {
        "command": "github1s.commands.switchToChangeRequest",
        "title": "Switch to Change Request",
        "category": "GitHub1s",
        "icon": "$(log-in)",
        "enablement": "github1s:adapters:default:codeReviewType == 'ChangeRequest'"
      },
      {
        "command": "github1s.commands.switchToCodeReview",
        "title": "Switch to Code Review",
        "category": "GitHub1s",
        "icon": "$(log-in)",
        "enablement": "github1s:adapters:default:codeReviewType != 'PullRequest' && github1s:adapters:default:codeReviewType != 'MergeRequest' && github1s:adapters:default:codeReviewType != 'ChangeRequest'"
      },
      {
        "command": "github1s.commands.openCodeReviewOnGitHub",
        "title": "Open on GitHub",
        "category": "GitHub1s",
        "icon": "$(globe)",
        "enablement": "github1s:adapters:default:platformName == 'GitHub'"
      },
      {
        "command": "github1s.commands.openCodeReviewOnGitLab",
        "title": "Open on GitLab",
        "category": "GitHub1s",
        "icon": "$(globe)",
        "enablement": "github1s:adapters:default:platformName == 'GitLab'"
      },
      {
        "command": "github1s.commands.openCodeReviewOnBitbucket",
        "title": "Open on Bitbucket",
        "category": "GitHub1s",
        "icon": "$(globe)",
        "enablement": "github1s:adapters:default:platformName == 'Bitbucket'"
      },
      {
        "command": "github1s.commands.openCodeReviewOnOfficialPage",
        "title": "Open on Official Page",
        "category": "GitHub1s",
        "icon": "$(globe)",
        "enablement": "github1s:adapters:default:platformName != 'GitHub' && github1s:adapters:default:platformName != 'GitLab' && github1s:adapters:default:platformName != 'Bitbucket'"
      },
      {
        "command": "github1s.commands.refreshFileHistoryCommitList",
        "title": "Refresh",
        "category": "GitHub1s",
        "icon": "$(refresh)"
      },
      {
        "command": "github1s.commands.refreshCommitList",
        "title": "Refresh",
        "category": "GitHub1s",
        "icon": "$(refresh)"
      },
      {
        "command": "github1s.commands.searchCommit",
        "title": "Search",
        "category": "GitHub1s",
        "icon": "$(search)"
      },
      {
        "command": "github1s.commands.switchToCommit",
        "title": "Switch to Commit",
        "category": "GitHub1s",
        "icon": "$(log-in)"
      },
      {
        "command": "github1s.commands.diffCommitFile",
        "title": "Diff File",
        "category": "GitHub1s",
        "icon": "$(diff)"
      },
      {
        "command": "github1s.commands.openCommitOnGitHub",
        "title": "Open on GitHub",
        "category": "GitHub1s",
        "icon": "$(globe)",
        "enablement": "github1s:adapters:default:platformName == 'GitHub'"
      },
      {
        "command": "github1s.commands.openCommitOnGitLab",
        "title": "Open on GitLab",
        "category": "GitHub1s",
        "icon": "$(globe)",
        "enablement": "github1s:adapters:default:platformName == 'GitLab'"
      },
      {
        "command": "github1s.commands.openCommitOnBitbucket",
        "title": "Open on Bitbucket",
        "category": "GitHub1s",
        "icon": "$(globe)",
        "enablement": "github1s:adapters:default:platformName == 'Bitbucket'"
      },
      {
        "command": "github1s.commands.openCommitOnOfficialPage",
        "title": "Open on Official Page",
        "category": "GitHub1s",
        "icon": "$(globe)",
        "enablement": "github1s:adapters:default:platformName != 'GitHub' && github1s:adapters:default:platformName != 'GitLab' && github1s:adapters:default:platformName != 'Bitbucket'"
      },
      {
        "command": "github1s.commands.diffChangedFile",
        "title": "Open Changes",
        "category": "GitHub1s",
        "icon": "$(compare-changes)"
      },
      {
        "command": "github1s.commands.diffViewOpenLeftFile",
        "title": "Open Left File",
        "category": "GitHub1s",
        "icon": {
          "dark": "assets/icons/dark/open-left-file.svg",
          "light": "assets/icons/light/open-left-file.svg"
        },
        "enablement": "isInDiffEditor && resourceScheme =~ /^(github1s|gitlab1s|bitbucket1s)/ && resource =~ /^(?![^?]*\\?[^#]*(%26|\\b)base(=|%3D|%3d)github1s-empty-file)/"
      },
      {
        "command": "github1s.commands.diffViewOpenRightFile",
        "title": "Open Right File",
        "category": "GitHub1s",
        "icon": {
          "dark": "assets/icons/dark/open-right-file.svg",
          "light": "assets/icons/light/open-right-file.svg"
        },
        "enablement": "isInDiffEditor && resourceScheme =~ /^(github1s|gitlab1s|bitbucket1s)/ && resource =~ /^(?![^?]*\\?[^#]*(%26|\\b)head(=|%3D|%3d)github1s-empty-file)/"
      },
      {
        "command": "github1s.commands.openFilePreviousRevision",
        "title": "Open Previous Revision",
        "category": "GitHub1s",
        "icon": "$(arrow-left)",
        "enablement": "resourceScheme =~ /^(github1s|gitlab1s|bitbucket1s)$/ && resource =~ /^(?![^?]*\\?[^#]*(%26|\\b)base(=|%3D|%3d)github1s-empty-file)/"
      },
      {
        "command": "github1s.commands.openFileNextRevision",
        "title": "Open Next Revision",
        "category": "GitHub1s",
        "icon": "$(arrow-right)",
        "enablement": "resource =~ /^[^?]*\\?[^#]*(%26|\\b)hasNextRevision(=|%3D|%3d)true/"
      },
      {
        "command": "github1s.commands.toggleEditorGutterBlame",
        "title": "Toggle File Blame",
        "category": "GitHub1s",
        "enablement": "!isInDiffEditor"
      },
      {
        "command": "github1s.commands.openEditorGutterBlame",
        "title": "Toggle File Blame",
        "category": "GitHub1s",
        "icon": {
          "dark": "assets/icons/dark/open-blame.svg",
          "light": "assets/icons/light/open-blame.svg"
        },
        "enablement": "!isInDiffEditor"
      },
      {
        "command": "github1s.commands.closeEditorGutterBlame",
        "title": "Toggle File Blame",
        "category": "GitHub1s",
        "icon": {
          "dark": "assets/icons/dark/close-blame.svg",
          "light": "assets/icons/light/close-blame.svg"
        },
        "enablement": "!isInDiffEditor"
      },
      {
        "command": "github1s.commands.openOnGitHub",
        "title": "Open on GitHub",
        "category": "GitHub1s",
        "icon": "$(globe)",
        "enablement": "github1s:adapters:default:platformName == 'GitHub'"
      },
      {
        "command": "github1s.commands.openOnGitLab",
        "title": "Open on GitLab",
        "category": "GitHub1s",
        "icon": "$(globe)",
        "enablement": "github1s:adapters:default:platformName == 'GitLab'"
      },
      {
        "command": "github1s.commands.openOnBitbucket",
        "title": "Open on Bitbucket",
        "category": "GitHub1s",
        "icon": "$(globe)",
        "enablement": "github1s:adapters:default:platformName == 'Bitbucket'"
      },
      {
        "command": "github1s.commands.openOnNpm",
        "title": "Open on npm",
        "category": "GitHub1s",
        "icon": "$(globe)",
        "enablement": "github1s:adapters:default:platformName == 'npm'"
      },
      {
        "command": "github1s.commands.openOnOfficialPage",
        "title": "Open on Official Page",
        "category": "GitHub1s",
        "icon": "$(globe)",
        "enablement": "github1s:adapters:default:platformName != 'GitHub' && github1s:adapters:default:platformName != 'GitLab' && github1s:adapters:default:platformName != 'Bitbucket' && github1s:adapters:default:platformName != 'npm'"
      }
    ],
    "colors": [
      {
        "id": "github1s.colors.addedResourceForeground",
        "description": "%colors.added%",
        "defaults": {
          "light": "#587c0c",
          "dark": "#81b88b",
          "highContrast": "#1b5225"
        }
      },
      {
        "id": "github1s.colors.deletedResourceForeground",
        "description": "%colors.deleted%",
        "defaults": {
          "light": "#ad0707",
          "dark": "#c74e39",
          "highContrast": "#c74e39"
        }
      },
      {
        "id": "github1s.colors.modifiedResourceForeground",
        "description": "%colors.modified%",
        "defaults": {
          "light": "#895503",
          "dark": "#E2C08D",
          "highContrast": "#E2C08D"
        }
      },
      {
        "id": "github1s.colors.submoduleResourceForeground",
        "description": "%colors.submodule%",
        "defaults": {
          "light": "#1258a7",
          "dark": "#8db9e2",
          "highContrast": "#8db9e2"
        }
      },
      {
        "id": "github1s.colors.selectedViewItem",
        "description": "selected view item color",
        "defaults": {
          "light": "#1890ff",
          "dark": "#1890ff",
          "highContrast": "#1890ff"
        }
      },
      {
        "id": "github1s.colors.gutterBlameBackground",
        "description": "gutter blame background color",
        "defaults": {
          "light": "#00000013",
          "dark": "#ffffff13",
          "highContrast": "#ffffff13"
        }
      },
      {
        "id": "github1s.colors.highlightGutterBlameBackground",
        "description": "highlight gutter blame background color",
        "defaults": {
          "light": "#00bcf233",
          "dark": "#00bce233",
          "highContrast": "#00bce233"
        }
      }
    ],
    "menus": {
      "commandPalette": [
        {
          "command": "github1s.commands.refreshCodeReviewList",
          "when": "false"
        },
        {
          "command": "github1s.commands.searchCodeReview",
          "when": "false"
        },
        {
          "command": "github1s.commands.openCodeReviewOnGitHub",
          "when": "false"
        },
        {
          "command": "github1s.commands.openCodeReviewOnGitLab",
          "when": "false"
        },
        {
          "command": "github1s.commands.openCodeReviewOnBitbucket",
          "when": "false"
        },
        {
          "command": "github1s.commands.openCodeReviewOnOfficialPage",
          "when": "false"
        },
        {
          "command": "github1s.commands.refreshCommitList",
          "when": "false"
        },
        {
          "command": "github1s.commands.searchCommit",
          "when": "false"
        },
        {
          "command": "github1s.commands.openCommitOnGitHub",
          "when": "false"
        },
        {
          "command": "github1s.commands.openCommitOnGitLab",
          "when": "false"
        },
        {
          "command": "github1s.commands.openCommitOnBitbucket",
          "when": "false"
        },
        {
          "command": "github1s.commands.openCommitOnOfficialPage",
          "when": "false"
        },
        {
          "command": "github1s.commands.diffChangedFile",
          "when": "false"
        },
        {
          "command": "github1s.commands.diffViewOpenLeftFile",
          "when": "false"
        },
        {
          "command": "github1s.commands.diffViewOpenRightFile",
          "when": "false"
        },
        {
          "command": "github1s.commands.openFilePreviousRevision",
          "when": "false"
        },
        {
          "command": "github1s.commands.openFileNextRevision",
          "when": "false"
        },
        {
          "command": "github1s.commands.openEditorGutterBlame",
          "when": "false"
        },
        {
          "command": "github1s.commands.closeEditorGutterBlame",
          "when": "false"
        }
      ],
      "view/title": [
        {
          "command": "github1s.commands.refreshCodeReviewList",
          "when": "view == 'github1s.views.codeReviewList'",
          "group": "navigation@1"
        },
        {
          "command": "github1s.commands.searchCodeReview",
          "when": "view == 'github1s.views.codeReviewList'",
          "group": "navigation@2"
        },
        {
          "command": "github1s.commands.refreshFileHistoryCommitList",
          "when": "view == 'github1s.views.fileHistory'",
          "group": "navigation@1"
        },
        {
          "command": "github1s.commands.searchCommit",
          "when": "view == 'github1s.views.fileHistory'",
          "group": "navigation@2"
        },
        {
          "command": "github1s.commands.refreshCommitList",
          "when": "view == 'github1s.views.commitList'",
          "group": "navigation@1"
        },
        {
          "command": "github1s.commands.searchCommit",
          "when": "view == 'github1s.views.commitList'",
          "group": "navigation@2"
        }
      ],
      "view/item/context": [
        {
          "command": "github1s.commands.switchToPullRequest",
          "when": "viewItem == 'github1s:viewItems:codeReviewListItem' && github1s:adapters:default:codeReviewType == 'PullRequest'",
          "group": "inline@1"
        },
        {
          "command": "github1s.commands.switchToMergeRequest",
          "when": "viewItem == 'github1s:viewItems:codeReviewListItem' && github1s:adapters:default:codeReviewType == 'MergeRequest'",
          "group": "inline@1"
        },
        {
          "command": "github1s.commands.switchToChangeRequest",
          "when": "viewItem == 'github1s:viewItems:codeReviewListItem' && github1s:adapters:default:codeReviewType == 'ChangeRequest'",
          "group": "inline@1"
        },
        {
          "command": "github1s.commands.switchToCodeReview",
          "when": "viewItem == 'github1s:viewItems:codeReviewListItem' && github1s:adapters:default:codeReviewType != 'PullRequest' && github1s:adapters:default:codeReviewType != 'MergeRequest' && github1s:adapters:default:codeReviewType != 'ChangeRequest'",
          "group": "inline@1"
        },
        {
          "command": "github1s.commands.openCodeReviewOnGitHub",
          "when": "viewItem == 'github1s:viewItems:codeReviewListItem' && github1s:adapters:default:platformName == 'GitHub'",
          "group": "inline@2"
        },
        {
          "command": "github1s.commands.openCodeReviewOnGitLab",
          "when": "viewItem == 'github1s:viewItems:codeReviewListItem' && github1s:adapters:default:platformName == 'GitLab'",
          "group": "inline@2"
        },
        {
          "command": "github1s.commands.openCodeReviewOnBitbucket",
          "when": "viewItem == 'github1s:viewItems:codeReviewListItem' && github1s:adapters:default:platformName == 'Bitbucket'",
          "group": "inline@2"
        },
        {
          "command": "github1s.commands.openCodeReviewOnOfficialPage",
          "when": "viewItem == 'github1s:viewItems:codeReviewListItem' && github1s:adapters:default:platformName != 'GitHub' && github1s:adapters:default:platformName != 'GitLab' && github1s:adapters:default:platformName != 'Bitbucket' && github1s:adapters:default:platformName != 'npm'",
          "group": "inline@2"
        },
        {
          "command": "github1s.commands.switchToCommit",
          "when": "viewItem == 'github1s:viewItems:commitListItem'",
          "group": "inline@1"
        },
        {
          "command": "github1s.commands.openCommitOnGitHub",
          "when": "viewItem == 'github1s:viewItems:commitListItem' && github1s:adapters:default:platformName == 'GitHub'",
          "group": "inline@2"
        },
        {
          "command": "github1s.commands.diffCommitFile",
          "when": "viewItem == 'github1s:viewItems:commitListItem' && view == 'github1s.views.fileHistory'",
          "group": "inline@3"
        },
        {
          "command": "github1s.commands.openCommitOnGitLab",
          "when": "viewItem == 'github1s:viewItems:commitListItem' && github1s:adapters:default:platformName == 'GitLab'",
          "group": "inline@2"
        },
        {
          "command": "github1s.commands.openCommitOnBitbucket",
          "when": "viewItem == 'github1s:viewItems:commitListItem' && github1s:adapters:default:platformName == 'Bitbucket'",
          "group": "inline@2"
        },
        {
          "command": "github1s.commands.openCommitOnOfficialPage",
          "when": "viewItem == 'github1s:viewItems:commitListItem' && github1s:adapters:default:platformName != 'GitHub' && github1s:adapters:default:platformName != 'GitLab' && github1s:adapters:default:platformName != 'Bitbucket' && github1s:adapters:default:platformName != 'npm'",
          "group": "inline@2"
        }
      ],
      "editor/title": [
        {
          "command": "github1s.commands.diffChangedFile",
          "when": "!isInDiffEditor && github1s:editors:showDiffChangedFile",
          "group": "navigation@1"
        },
        {
          "command": "github1s.commands.diffViewOpenLeftFile",
          "when": "isInDiffEditor",
          "group": "navigation@2"
        },
        {
          "command": "github1s.commands.diffViewOpenRightFile",
          "when": "isInDiffEditor",
          "group": "navigation@3"
        },
        {
          "command": "github1s.commands.openFilePreviousRevision",
          "when": "resourceScheme =~ /^(github1s|gitlab1s|bitbucket1s)/",
          "group": "navigation@4"
        },
        {
          "command": "github1s.commands.openFileNextRevision",
          "when": "resourceScheme =~ /^(github1s|gitlab1s|bitbucket1s)/",
          "group": "navigation@5"
        },
        {
          "command": "github1s.commands.openEditorGutterBlame",
          "when": "!isInDiffEditor && github1s:features:gutterBlame:enabled && !github1s:features:gutterBlame:open",
          "group": "navigation@6"
        },
        {
          "command": "github1s.commands.closeEditorGutterBlame",
          "when": "!isInDiffEditor && github1s:features:gutterBlame:enabled && github1s:features:gutterBlame:open",
          "group": "navigation@6"
        }
      ]
    }
  },
  "scripts": {
    "clean": "rm -rf dist out",
    "watch": "webpack --config webpack.config.js --watch",
    "compile": "webpack --config webpack.config.js --mode production"
  },
  "keywords": [],
  "author": "",
  "license": "MIT",
  "dependencies": {
    "@apollo/client": "^3.12.5",
    "@octokit/core": "^6.1.4",
    "dayjs": "^1.11.1",
    "graphql": "^16.8.1",
    "history": "^5.3.0",
    "js-base64": "^3.7.2",
    "json-stable-stringify": "^1.0.1",
    "match-sorter": "^6.3.1",
    "p-finally": "^3.0.0",
    "process": "^0.11.10",
    "query-string": "^7.1.1"
  },
  "devDependencies": {
    "@types/vscode": "^1.96.0",
    "node-polyfill-webpack-plugin": "^1.1.4",
    "ts-loader": "^9.2.8",
    "typescript": "^5.7.3",
    "webpack": "^5.105.0",
    "webpack-cli": "^4.9.2"
  }
}


================================================
FILE: extensions/github1s/src/adapters/bitbucket1s/index.ts
================================================
/**
 * @file Bitbucket adapter
 * @author netcon
 */

import { BitbucketRouterParser } from './router-parser';
import { SourcegraphDataSource } from '../sourcegraph/data-source';
import { Adapter, CodeReviewType, PlatformName } from '../types';
import { setVSCodeContext } from '@/helpers/vscode';

export class BitbucketAdapter implements Adapter {
	public scheme: string = 'bitbucket1s';
	public platformName = PlatformName.Bitbucket;
	public codeReviewType = CodeReviewType.PullRequest;

	resolveDataSource() {
		return Promise.resolve(SourcegraphDataSource.getInstance('bitbucket'));
	}

	resolveRouterParser() {
		return Promise.resolve(BitbucketRouterParser.getInstance());
	}

	activateAsDefault() {
		setVSCodeContext('github1s:views:commitList:visible', true);
		setVSCodeContext('github1s:views:fileHistory:visible', true);
		setVSCodeContext('github1s:features:gutterBlame:enabled', true);
	}

	deactivateAsDefault() {
		setVSCodeContext('github1s:views:commitList:visible', false);
		setVSCodeContext('github1s:views:fileHistory:visible', false);
		setVSCodeContext('github1s:features:gutterBlame:enabled', false);
	}
}


================================================
FILE: extensions/github1s/src/adapters/bitbucket1s/parse-path.ts
================================================
/**
 * @file parse bitbucket path
 * @author netcon
 */

import { parsePath } from 'history';
import { FileType, PageType, RouterState } from '@/adapters/types';
import { SourcegraphDataSource } from '../sourcegraph/data-source';

const parseTreeOrBlobUrl = async (path: string): Promise<RouterState> => {
	const pathParts = parsePath(path).pathname!.split('/').filter(Boolean);
	const [owner, repo, _pageType, ...restParts] = pathParts;
	const repoFullName = `${owner}/${repo}`;
	const dataSource = SourcegraphDataSource.getInstance('bitbucket');
	const { ref, path: filePath } = await dataSource.extractRefPath(repoFullName, restParts.join('/'));
	const fileType = await dataSource.detectPathFileType(repo, ref, filePath);

	return { pageType: fileType === FileType.Directory ? PageType.Tree : PageType.Blob, repo, ref, filePath };
};

const parseCommitsUrl = async (path: string): Promise<RouterState> => {
	const pathParts = parsePath(path).pathname!.split('/').filter(Boolean);
	const [owner, repo, _pageType, ...refParts] = pathParts;

	return {
		repo: `${owner}/${repo}`,
		pageType: PageType.CommitList,
		ref: refParts.length ? refParts.join('/') : 'HEAD',
	};
};

const parseCommitUrl = async (path: string): Promise<RouterState> => {
	const pathParts = parsePath(path).pathname!.split('/').filter(Boolean);
	const [owner, repo, _pageType, ...refParts] = pathParts;
	const commitSha = refParts.join('/');

	return { repo: `${owner}/${repo}`, pageType: PageType.Commit, ref: commitSha, commitSha };
};

const PAGE_TYPE_MAP = {
	src: PageType.Tree,
	commit: PageType.Commit,
	commits: PageType.CommitList,
};

export const parseBitbucketPath = async (path: string): Promise<RouterState> => {
	const pathParts = parsePath(path).pathname?.split('/').filter(Boolean) || [];
	// detect concrete PageType the *third part* in url.path
	const pageType = pathParts[2] ? PAGE_TYPE_MAP[pathParts[2]] || PageType.Unknown : PageType.Tree;

	if (pathParts.length >= 2) {
		switch (pageType) {
			case PageType.Tree:
				return parseTreeOrBlobUrl(path);
			case PageType.Commit:
				return parseCommitUrl(path);
			case PageType.CommitList:
				return parseCommitsUrl(path);
		}
	}

	// fallback to default
	return {
		repo: 'atlassian/clover',
		ref: 'HEAD',
		pageType: PageType.Tree,
		filePath: '',
	};
};


================================================
FILE: extensions/github1s/src/adapters/bitbucket1s/router-parser.ts
================================================
/**
 * @file router parser
 * @author netcon
 */

import * as adapterTypes from '../types';
import { parseBitbucketPath } from './parse-path';

export class BitbucketRouterParser extends adapterTypes.RouterParser {
	private static instance: BitbucketRouterParser | null = null;

	public static getInstance(): BitbucketRouterParser {
		if (BitbucketRouterParser.instance) {
			return BitbucketRouterParser.instance;
		}
		return (BitbucketRouterParser.instance = new BitbucketRouterParser());
	}

	parsePath(path: string): Promise<adapterTypes.RouterState> {
		return parseBitbucketPath(path);
	}

	buildTreePath(repo: string, ref?: string, filePath?: string): string {
		return ref ? (filePath ? `/${repo}/src/${ref}/${filePath}` : `/${repo}/src/${ref}`) : `/${repo}`;
	}

	buildBlobPath(repo: string, ref: string, filePath: string, startLine?: number, endLine?: number): string {
		const hash = startLine ? (endLine ? `#L${startLine}-L${endLine}` : `#L${startLine}`) : '';
		return `/${repo}/src/${ref}/${filePath}${hash}`;
	}

	buildCommitListPath(repo: string): string {
		return `/${repo}/commits`;
	}

	buildCommitPath(repo: string, commitSha: string): string {
		return `/${repo}/commits/${commitSha}`;
	}

	buildCodeReviewListPath(repo: string): string {
		return `/${repo}/pull-requests`;
	}

	buildCodeReviewPath(repo: string, codeReviewId: string): string {
		return `/${repo}/pull-requests/${codeReviewId}`;
	}

	buildExternalLink(path: string): string {
		return 'https://bitbucket.org' + (path.startsWith('/') ? path : `/${path}`);
	}
}


================================================
FILE: extensions/github1s/src/adapters/github1s/authentication.ts
================================================
/**
 * @file github authentication page
 * @author netcon
 */

import * as vscode from 'vscode';
import { Barrier } from '@/helpers/async';
import { getExtensionContext } from '@/helpers/context';
import { createPageHtml, getWebviewOptions } from '@/helpers/page';
import { GitHubTokenManager } from './token';
import { messageApiMap } from './settings';

export class GitHub1sAuthenticationView {
	protected static instance: GitHub1sAuthenticationView | null = null;
	public static viewType = 'github1s.views.github1s-authentication';
	protected tokenManager = GitHubTokenManager.getInstance();
	private webviewPanel: vscode.WebviewPanel | null = null;
	// using for waiting token
	private tokenBarrier: Barrier | null = null;
	// using for displaying open page reason
	private notice: string = '';

	protected pageTitle = 'Authenticating to GitHub';
	protected OAuthCommand = 'github1s.commands.vscode.connectToGitHub';
	protected pageConfig: Record<string, unknown> = {
		authenticationFormTitle: 'Authenticating to GitHub',
		OAuthButtonText: 'Connect to GitHub',
		OAuthButtonLogo: 'assets/pages/assets/github.svg',
		createTokenLink: `${GITHUB_ORIGIN}/settings/tokens/new?scopes=repo&description=GitHub1s`,
		rateLimitDocLink: 'https://docs.github.com/rest/overview/resources-in-the-rest-api#rate-limiting',
		rateLimitDocLinkText: 'GitHub Rate limiting Documentation',
		authenticationFeatures: [
			{
				text: 'Access GitHub personal repository',
				link: 'https://docs.github.com/en/account-and-profile/setting-up-and-managing-your-github-user-account/managing-access-to-your-personal-repositories',
			},
			{
				text: 'Higher rate limit for GitHub official API',
				link: 'https://docs.github.com/en/rest/overview/resources-in-the-rest-api#rate-limiting',
			},
			{
				text: 'Support for GitHub GraphQL API',
				link: 'https://docs.github.com/en/graphql/guides/forming-calls-with-graphql#authenticating-with-graphql',
			},
		],
	};

	protected constructor() {}

	public static getInstance(): GitHub1sAuthenticationView {
		if (GitHub1sAuthenticationView.instance) {
			return GitHub1sAuthenticationView.instance;
		}
		return (GitHub1sAuthenticationView.instance = new this());
	}

	private registerListeners() {
		if (!this.webviewPanel) {
			throw new Error('webview is not init yet');
		}

		this.webviewPanel.webview.onDidReceiveMessage((message) => {
			const commonResponse = { id: message.id, type: message.type };
			const postMessage = (data?: unknown) => this.webviewPanel!.webview.postMessage({ ...commonResponse, data });

			switch (message.type) {
				case 'get-notice':
					postMessage(this.notice);
					break;
				case 'get-token':
					postMessage(this.tokenManager.getToken());
					break;
				case 'set-token':
					message.data && (this.notice = '');
					this.tokenManager.setToken(message.data || '').then(() => postMessage());
					break;
				case 'validate-token':
					this.tokenManager.validateToken(message.data).then((tokenStatus) => postMessage(tokenStatus));
					break;
				case 'oauth-authorizing':
					vscode.commands.executeCommand(this.OAuthCommand).then((data: any) => {
						if (data && data.error_description) {
							vscode.window.showErrorMessage(data.error_description);
						} else if (data && data.access_token) {
							this.tokenManager.setToken(data.access_token || '').then(() => postMessage());
						}
						postMessage();
					});
					break;
				case 'call-vscode-message-api':
					const messageApi = messageApiMap[message.data?.level];
					messageApi && messageApi(...message.data?.args).then((response) => postMessage(response));
					break;
			}
		});

		this.tokenManager.onDidChangeToken((token) => {
			this.tokenBarrier && this.tokenBarrier.open();
			this.tokenBarrier && (this.tokenBarrier = null);
			this.webviewPanel?.webview.postMessage({ type: 'token-changed', token });
		});
	}

	public open(notice: string = '', withBarrier = false) {
		const extensionContext = getExtensionContext();

		this.notice = notice;
		withBarrier && !this.tokenBarrier && (this.tokenBarrier = new Barrier(600 * 1000));

		if (!this.webviewPanel) {
			this.webviewPanel = vscode.window.createWebviewPanel(
				GitHub1sAuthenticationView.viewType,
				this.pageTitle,
				vscode.ViewColumn.One,
				getWebviewOptions(extensionContext.extensionUri),
			);
			this.registerListeners();
			this.webviewPanel.onDidDispose(() => (this.webviewPanel = null));
		}

		const styles = [
			vscode.Uri.joinPath(extensionContext.extensionUri, 'assets/pages/components.css').toString(),
			vscode.Uri.joinPath(extensionContext.extensionUri, 'assets/pages/github1s-authentication.css').toString(),
		];
		const globalPageConfig = { ...this.pageConfig, extensionUri: extensionContext.extensionUri.toString() };
		const scripts = [
			'data:text/javascript;base64,' +
				Buffer.from(`window.pageConfig=${JSON.stringify(globalPageConfig)};`).toString('base64'),
			vscode.Uri.joinPath(extensionContext.extensionUri, 'assets/pages/github1s-authentication.js').toString(),
		];

		const webview = this.webviewPanel.webview;
		webview.html = createPageHtml(this.pageTitle, styles, scripts);
		return withBarrier ? this.tokenBarrier!.wait() : Promise.resolve();
	}
}


================================================
FILE: extensions/github1s/src/adapters/github1s/data-source.ts
================================================
/**
 * @file github1s data-source-provider
 * @author netcon
 */

import {
	Branch,
	CodeReview,
	CodeReviewState,
	TextSearchOptions,
	Commit,
	CommonQueryOptions,
	DataSource,
	Directory,
	DirectoryEntry,
	File,
	BlameRange,
	FileType,
	Tag,
	TextSearchResults,
	TextSearchQuery,
	SymbolDefinitions,
	SymbolReferences,
	FileChangeStatus,
	ChangedFile,
	SymbolHover,
	CommitsQueryOptions,
	CodeReviewsQueryOptions,
} from '../types';
import { toUint8Array } from 'js-base64';
import { matchSorter } from 'match-sorter';
import { FILE_BLAME_QUERY } from './graphql';
import { GitHubFetcher } from './fetcher';
import { SourcegraphDataSource } from '../sourcegraph/data-source';
import { decorate, memorize } from '@/helpers/func';

const parseRepoFullName = (repoFullName: string) => {
	const [owner, repo] = repoFullName.split('/');
	return { owner, repo };
};

const encodeFilePath = (filePath: string): string => {
	const pathParts = filePath.split('/').filter(Boolean);
	return pathParts.map((segment) => encodeURIComponent(segment)).join('/');
};

const FileTypeMap = {
	blob: FileType.File,
	tree: FileType.Directory,
	commit: FileType.Submodule,
};

const getPullState = (pull: { state: string; merged_at: string | null }): CodeReviewState => {
	// current pull request is open
	if (pull.state === 'open') {
		return CodeReviewState.Open;
	}
	// current pull request is merged
	if (pull.state === 'closed' && pull.merged_at) {
		return CodeReviewState.Merged;
	}
	// current pull is closed
	return CodeReviewState.Closed;
};

const sourcegraphDataSource = SourcegraphDataSource.getInstance('github');
const trySourcegraphApiFirst = (_target: any, propertyKey: string, descriptor: PropertyDescriptor) => {
	const originalMethod = descriptor.value;

	descriptor.value = async function <T extends (...args) => Promise<any>>(...args: Parameters<T>) {
		const githubFetcher = GitHubFetcher.getInstance();
		if (await githubFetcher.getPreferSourcegraphApi(args[0])) {
			try {
				return await sourcegraphDataSource[propertyKey](...args);
			} catch (e) {}
		}
		return originalMethod.apply(this, args);
	};
};

export class GitHub1sDataSource extends DataSource {
	private static instance: GitHub1sDataSource | null = null;
	private branchesPromiseMap: Map<string, Promise<Branch[]>> = new Map();
	private tagsPromiseMap: Map<string, Promise<Tag[]>> = new Map();
	private refPathPromiseMap: Map<string, Promise<{ ref: string; path: string }>> = new Map();
	private matchedRefsMap = new Map<string, string[]>();

	public static getInstance(): GitHub1sDataSource {
		if (GitHub1sDataSource.instance) {
			return GitHub1sDataSource.instance;
		}
		return (GitHub1sDataSource.instance = new GitHub1sDataSource());
	}

	@trySourcegraphApiFirst
	async provideRepository(repoFullName: string): Promise<{ private: boolean; defaultBranch: string } | null> {
		const fetcher = GitHubFetcher.getInstance();
		const { owner, repo } = parseRepoFullName(repoFullName);
		const requestParams = { owner, repo };
		const response = await fetcher.request('GET /repos/{owner}/{repo}', requestParams).catch(() => null);
		return response?.data ? { private: response.data.private, defaultBranch: response.data.default_branch } : null;
	}

	@trySourcegraphApiFirst
	async provideDirectory(repoFullName: string, ref: string, path: string, recursive = false): Promise<Directory> {
		const fetcher = GitHubFetcher.getInstance();
		const encodedPath = encodeFilePath(path);
		// github api will return all files if `recursive` exists, even the value if false
		const recursiveParams = recursive ? { recursive } : {};
		const requestParams = { ref, path: encodedPath, ...parseRepoFullName(repoFullName), ...recursiveParams };
		const { data } = await fetcher.request('GET /repos/{owner}/{repo}/git/trees/{ref}:{path}', requestParams);
		const parseTreeItem = (treeItem): DirectoryEntry => ({
			path: treeItem.path,
			type: FileTypeMap[treeItem.type] || FileType.File,
			commitSha: FileTypeMap[treeItem.type] === FileType.Submodule ? treeItem.sha || 'HEAD' : undefined,
			size: treeItem.size,
		});

		return {
			entries: (data.tree || []).map(parseTreeItem),
			truncated: !!data.truncated,
		};
	}

	@trySourcegraphApiFirst
	async provideFile(repoFullName: string, ref: string, path: string): Promise<File> {
		const fetcher = GitHubFetcher.getInstance();
		const { owner, repo } = parseRepoFullName(repoFullName);
		const requestParams = { owner, repo, ref, path };
		const { data } = await fetcher.request('GET /repos/{owner}/{repo}/contents/{path}', requestParams);
		return { content: toUint8Array((data as any).content) };
	}

	async getMatchingRefs(repoFullName: string, ref: 'heads' | 'tags'): Promise<Branch[] | Tag[]> {
		const fetcher = GitHubFetcher.getInstance();
		const { owner, repo } = parseRepoFullName(repoFullName);
		const requestParams = { owner, repo, ref };
		const { data } = await fetcher.request('GET /repos/{owner}/{repo}/git/matching-refs/{ref}', requestParams);
		return data.map((item) => ({
			name: item.ref.slice(ref === 'heads' ? 11 : 10),
			commitSha: item.object.sha,
			description: `${ref === 'heads' ? 'Branch' : 'Tag'} at ${item.object.sha.slice(0, 8)}`,
		}));
	}

	@decorate(memorize)
	async getDefaultBranch(repoFullName: string) {
		return (await this.provideRepository(repoFullName))?.defaultBranch || 'HEAD';
	}

	@trySourcegraphApiFirst
	async extractRefPath(repoFullName: string, refAndPath: string): Promise<{ ref: string; path: string }> {
		if (!this.matchedRefsMap.has(repoFullName)) {
			this.matchedRefsMap.set(repoFullName, []);
		}
		const matchPathRef = (ref) => refAndPath.startsWith(`${ref}/`) || refAndPath === ref;
		const matchedRef = this.matchedRefsMap.get(repoFullName)?.find(matchPathRef);
		if (matchedRef) {
			return { ref: matchedRef, path: refAndPath.slice(matchedRef.length + 1) };
		}
		const mapKey = `${repoFullName} ${refAndPath}`;
		if (!this.refPathPromiseMap.has(mapKey)) {
			const refPathPromise = new Promise<{ ref: string; path: string }>(async (resolve, reject) => {
				if (!refAndPath) {
					return resolve({ ref: await this.getDefaultBranch(repoFullName), path: '' });
				}
				if (refAndPath.match(/^HEAD(\/.*)?$/i)) {
					return resolve({ ref: 'HEAD', path: refAndPath.slice(5) });
				}

				const fetcher = GitHubFetcher.getInstance();
				const { owner, repo } = parseRepoFullName(repoFullName);
				const requestParams = { owner, repo, refAndPath };
				const requestUrl = `GET /repos/{owner}/{repo}/git/extract-ref/{refAndPath}`;
				const response = await fetcher.request(requestUrl, requestParams).catch(reject);
				response?.data?.ref && this.matchedRefsMap.get(repoFullName)?.push(response.data.ref);
				return resolve(response?.data || { ref: 'HEAD', path: '' });
			});
			this.refPathPromiseMap.set(mapKey, refPathPromise);
		}
		return this.refPathPromiseMap.get(mapKey)!;
	}

	@trySourcegraphApiFirst
	async provideBranches(repoFullName: string, options?: CommonQueryOptions): Promise<Branch[]> {
		if (!this.branchesPromiseMap.has(repoFullName)) {
			this.branchesPromiseMap.set(repoFullName, this.getMatchingRefs(repoFullName, 'heads'));
		}
		return this.branchesPromiseMap.get(repoFullName)!.then((branches) => {
			const matchOptions = { keys: ['name'] };
			const matchedBranches = options?.query ? matchSorter(branches, options.query, matchOptions) : branches;
			if (options?.pageSize) {
				const page = options.page || 1;
				const pageSize = options.pageSize;
				return matchedBranches.slice(pageSize * (page - 1), pageSize * page);
			}
			return matchedBranches;
		});
	}

	@trySourcegraphApiFirst
	async provideBranch(repoFullName: string, branchName: string): Promise<Branch | null> {
		const branches = await this.provideBranches(repoFullName);
		return branches.find((item) => item.name === branchName) || null;
	}

	@trySourcegraphApiFirst
	async provideTags(repoFullName: string, options?: CommonQueryOptions): Promise<Tag[]> {
		if (!this.tagsPromiseMap.has(repoFullName)) {
			this.tagsPromiseMap.set(repoFullName, this.getMatchingRefs(repoFullName, 'tags'));
		}
		return this.tagsPromiseMap.get(repoFullName)!.then((tags) => {
			const matchOptions = { keys: ['name'] };
			const matchedTags = options?.query ? matchSorter(tags, options.query, matchOptions) : tags;
			if (options?.pageSize) {
				const page = options.page || 1;
				const pageSize = options.pageSize;
				return matchedTags.slice(pageSize * (page - 1), pageSize * page);
			}
			return matchedTags;
		});
	}

	@trySourcegraphApiFirst
	async provideTag(repoFullName: string, tagName: string): Promise<Tag | null> {
		const tags = await this.provideTags(repoFullName);
		return tags.find((item) => item.name === tagName) || null;
	}

	async provideTextSearchResults(
		repoFullName: string,
		ref: string,
		query: TextSearchQuery,
		options: TextSearchOptions,
	): Promise<TextSearchResults> {
		return sourcegraphDataSource.provideTextSearchResults(repoFullName, ref, query, options);
	}

	@trySourcegraphApiFirst
	async provideCommits(
		repoFullName: string,
		options?: CommitsQueryOptions,
	): Promise<(Commit & { files?: ChangedFile[] })[]> {
		const fetcher = GitHubFetcher.getInstance();
		const { owner, repo } = parseRepoFullName(repoFullName);
		const queryParams = {
			page: options?.page,
			per_page: options?.pageSize,
			sha: options?.from,
			path: options?.path,
			author: options?.author,
		};
		const requestParams = { owner, repo, ...queryParams };
		const { data } = await fetcher.request('GET /repos/{owner}/{repo}/commits', requestParams);
		return data.map((item) => ({
			sha: item.sha,
			author: item.commit.author?.name,
			email: item.commit.author?.email,
			message: item.commit.message,
			committer: item.commit.committer?.name,
			createTime: item.commit.author?.date ? new Date(item.commit.author.date) : undefined,
			parents: item.parents.map((parent) => parent.sha) || [],
			avatarUrl: item.author?.avatar_url,
		}));
	}

	@trySourcegraphApiFirst
	async provideCommit(repoFullName: string, ref: string): Promise<Commit & { files?: ChangedFile[] }> {
		const fetcher = GitHubFetcher.getInstance();
		const { owner, repo } = parseRepoFullName(repoFullName);
		const requestParams = { owner, repo, ref };
		const { data } = await fetcher.request('GET /repos/{owner}/{repo}/commits/{ref}', requestParams);
		return {
			sha: data.sha,
			author: data.commit.author?.name,
			email: data.commit.author?.email,
			message: data.commit.message,
			committer: data.commit.committer?.name,
			createTime: data.commit.author?.date ? new Date(data.commit.author.date) : undefined,
			parents: data.parents.map((parent) => parent.sha) || [],
			files: data.files?.map((item) => ({
				path: item.filename || item.previous_filename!,
				previousPath: item.previous_filename,
				status: item.status as FileChangeStatus,
			})),
			avatarUrl: data.author?.avatar_url,
		};
	}

	@trySourcegraphApiFirst
	async provideCommitChangedFiles(
		repoFullName: string,
		ref: string,
		_options?: CommonQueryOptions,
	): Promise<ChangedFile[]> {
		const fetcher = GitHubFetcher.getInstance();
		const { owner, repo } = parseRepoFullName(repoFullName);
		const requestParams = { owner, repo, ref };
		const { data } = await fetcher.request('GET /repos/{owner}/{repo}/commits/{ref}', requestParams);
		return (
			data.files?.map((item) => ({
				path: item.filename || item.previous_filename!,
				previousPath: item.previous_filename,
				status: item.status as FileChangeStatus,
			})) || []
		);
	}

	async provideCodeReviews(
		repoFullName: string,
		options?: CodeReviewsQueryOptions,
	): Promise<(CodeReview & { files?: ChangedFile[] })[]> {
		const fetcher = GitHubFetcher.getInstance();
		const { owner, repo } = parseRepoFullName(repoFullName);
		const state = options?.state ? (options.state === CodeReviewState.Open ? 'open' : 'closed') : 'all';
		const queryParams = { state, page: options?.page, per_page: options?.pageSize, creator: options?.creator };
		const requestParams = { owner, repo, ...queryParams };
		const { data } = await fetcher.request('GET /repos/{owner}/{repo}/pulls', requestParams as any);

		return data.map((item) => ({
			id: `${item.number}`,
			title: item.title,
			state: getPullState(item),
			creator: item.user?.login,
			createTime: new Date(item.created_at),
			mergeTime: item.merged_at ? new Date(item.merged_at) : null,
			closeTime: item.closed_at ? new Date(item.closed_at) : null,
			source: item.head.label,
			target: item.base.label,
			sourceSha: item.head.sha,
			targetSha: item.base.sha,
			avatarUrl: item.user?.avatar_url,
		}));
	}

	async provideCodeReview(repoFullName: string, id: string) {
		const fetcher = GitHubFetcher.getInstance();
		const { owner, repo } = parseRepoFullName(repoFullName);
		const pullRequestParams = { owner, repo, pull_number: Number(id) };
		const { data } = await fetcher.request('GET /repos/{owner}/{repo}/pulls/{pull_number}', pullRequestParams);

		return {
			id: `${data.number}`,
			title: data.title,
			state: getPullState(data),
			creator: data.user?.login,
			createTime: new Date(data.created_at),
			mergeTime: data.merged_at ? new Date(data.merged_at) : null,
			closeTime: data.closed_at ? new Date(data.closed_at) : null,
			source: data.head.label,
			target: data.base.label,
			sourceSha: data.head.sha,
			targetSha: data.base.sha,
			avatarUrl: data.user?.avatar_url,
		};
	}

	async provideCodeReviewChangedFiles(
		repoFullName: string,
		id: string,
		options?: CommonQueryOptions,
	): Promise<ChangedFile[]> {
		const fetcher = GitHubFetcher.getInstance();
		const { owner, repo } = parseRepoFullName(repoFullName);
		const pageParams = { per_page: options?.pageSize, page: options?.page };
		const filesRequestParams = { owner, repo, pull_number: Number(id), ...pageParams };
		const { data } = await fetcher.request('GET /repos/{owner}/{repo}/pulls/{pull_number}/files', filesRequestParams);

		return data.map((item) => ({
			path: item.filename,
			previousPath: item.previous_filename,
			status: item.status as FileChangeStatus,
		}));
	}

	@trySourcegraphApiFirst
	async provideFileBlameRanges(repoFullName: string, ref: string, path: string): Promise<BlameRange[]> {
		const fetcher = GitHubFetcher.getInstance();
		const { owner, repo } = parseRepoFullName(repoFullName);
		const requestParams = { owner, repo, ref, path };
		const data = await fetcher.graphql(FILE_BLAME_QUERY, requestParams);
		const blameRanges = (data as any)?.repository?.object?.blame?.ranges;

		return (blameRanges || []).map((item) => ({
			age: item.age as number,
			startingLine: item.startingLine as number,
			endingLine: item.endingLine as number,
			commit: {
				sha: item.commit?.sha as string,
				author: item.commit?.author?.name as string,
				email: item.commit?.author?.email as string,
				message: item.commit?.message as string,
				createTime: new Date(item.commit?.authoredDate),
				avatarUrl: item.commit?.author?.avatarUrl as string,
			},
		}));
	}

	provideSymbolDefinitions(
		repoFullName: string,
		ref: string,
		path: string,
		line: number,
		character: number,
		symbol: string,
	): Promise<SymbolDefinitions> {
		return sourcegraphDataSource.provideSymbolDefinitions(repoFullName, ref, path, line, character, symbol);
	}

	async provideSymbolReferences(
		repoFullName: string,
		ref: string,
		path: string,
		line: number,
		character: number,
		symbol: string,
	): Promise<SymbolReferences> {
		return sourcegraphDataSource.provideSymbolReferences(repoFullName, ref, path, line, character, symbol);
	}

	async provideSymbolHover(
		repoFullName: string,
		ref: string,
		path: string,
		line: number,
		character: number,
		_symbol: string,
	): Promise<SymbolHover | null> {
		return sourcegraphDataSource.provideSymbolHover(repoFullName, ref, path, line, character, _symbol);
	}

	provideUserAvatarLink(user: string): string {
		return `${GITHUB_ORIGIN}/${user}.png`;
	}
}


================================================
FILE: extensions/github1s/src/adapters/github1s/fetcher.ts
================================================
/**
 * @file github api fetcher base octokit
 * @author netcon
 */

(self as any).global = self;
import * as vscode from 'vscode';
import { getExtensionContext } from '@/helpers/context';
import { Octokit } from '@octokit/core';
import { GitHub1sAuthenticationView } from './authentication';
import { GitHubTokenManager } from './token';
import { isNil } from '@/helpers/util';
import { getCurrentRepo } from './parse-path';
import { SourcegraphDataSource } from '../sourcegraph/data-source';

export const errorMessages = {
	rateLimited: {
		anonymous: 'API Rate Limit Exceeded, please authenticate to github and retry',
		authenticated: 'API Rate Limit Exceeded for this token, please try another account',
	},
	badCredentials: {
		anonymous: 'Bad credentials, please authenticate to github and retry',
		authenticated: 'This token is invalid, please try another one',
	},
	repoNotFound: {
		anonymous: 'Repository not found, if it is private, you can provide an AccessToken to access it',
		authenticated: 'Repository not found, if it is private, you can try change an AccessToken to access it',
	},
	noPermission: {
		anonymous: 'You have no permission for this operation, please authenticate to github and retry',
		authenticated: 'You have no permission for this operation, please try another account',
	},
};

const detectErrorMessage = (response: any, authenticated: boolean) => {
	if (response?.status === 403 && +response?.headers?.['x-ratelimit-remaining'] === 0) {
		return errorMessages.rateLimited[authenticated ? 'authenticated' : 'anonymous'];
	}
	if (response?.status === 401 && response?.data?.message?.includes?.('Bad credentials')) {
		return errorMessages.badCredentials[authenticated ? 'authenticated' : 'anonymous'];
	}
	if (response?.status === 404) {
		return errorMessages.repoNotFound[authenticated ? 'authenticated' : 'anonymous'];
	}
	if (response?.status === 403) {
		return errorMessages.noPermission[authenticated ? 'authenticated' : 'anonymous'];
	}
	return response?.data?.message || '';
};

const PREFER_SOURCEGRAPH_API = 'PREFER_SOURCEGRAPH_API';

export class GitHubFetcher {
	private static instance: GitHubFetcher | null = null;
	private _emitter = new vscode.EventEmitter<boolean | null | undefined>();
	private _request: Octokit['request'] | null = null;
	public onDidChangePreferSourcegraphApi = this._emitter.event;
	private _currentRepoPromise: Promise<any> | null = null;
	private _sgApiTimeout: boolean = false;

	public request: Octokit['request'];
	public graphql: Octokit['graphql'];

	public static getInstance(): GitHubFetcher {
		if (GitHubFetcher.instance) {
			return GitHubFetcher.instance;
		}
		return (GitHubFetcher.instance = new this());
	}

	private constructor() {
		this.initFetcherMethods();
		this.initPreferSourcegraphApi();
		GitHubTokenManager.getInstance().onDidChangeToken(() => this.initFetcherMethods());
		GitHubTokenManager.getInstance().onDidChangeToken(() => this.initPreferSourcegraphApi());
	}

	// initial fetcher methods in this way for correct `request/graphql` type inference
	initFetcherMethods() {
		const accessToken = GitHubTokenManager.getInstance().getToken();
		const octokit = new Octokit({ auth: accessToken, request: { fetch }, baseUrl: GITHUB_API_PREFIX });

		this._request = octokit.request;
		this.request = Object.assign((...args: Parameters<Octokit['request']>) => {
			return octokit.request(...args).catch(async (error) => {
				const errorStatus = error?.response?.status as number | undefined;
				const repoNotFound = errorStatus === 404 && !(await this.resolveCurrentRepo());
				if ((errorStatus && [401, 403].includes(errorStatus)) || repoNotFound) {
					// maybe we have to acquire github access token to continue
					const message = detectErrorMessage(error?.response, !!accessToken);
					await GitHub1sAuthenticationView.getInstance().open(message, true);
					return this._request!(...args);
				}
			});
		}, this._request);

		this.graphql = Object.assign(async (...args: Parameters<Octokit['graphql']>) => {
			if (!GitHubTokenManager.getInstance().getToken()) {
				const message = 'GraphQL API only works for authenticated users';
				await GitHub1sAuthenticationView.getInstance().open(message, true);
			}
			return octokit.graphql(...args);
		}, octokit.graphql);
	}

	private resolveCurrentRepo(forceUpdate: boolean = false) {
		if (this._currentRepoPromise && !forceUpdate) {
			return this._currentRepoPromise;
		}
		const requestPattern = '/repos/{owner}/{repo}' as const;
		const getOwnerRepo = () => getCurrentRepo().then((repo) => repo.split('/'));
		return (this._currentRepoPromise = Promise.resolve(getOwnerRepo())
			.then(([owner, repo]) => this._request?.(requestPattern, { owner, repo }).then((res) => res.data))
			.catch(() => null));
	}

	private async initPreferSourcegraphApi() {
		if (await this.getPreferSourcegraphApi()) {
			const sgDataSource = SourcegraphDataSource.getInstance('github');
			try {
				if (!(await sgDataSource.provideRepository(await getCurrentRepo()))) {
					this.resolveCurrentRepo(true).then((repo) => {
						repo?.private && this.setPreferSourcegraphApi(false);
					});
				}
			} catch (e) {
				if (e.message && e.message.includes('signal is aborted')) {
					this._sgApiTimeout = true;
				}
			}
		}
	}

	public async getPreferSourcegraphApi(repo?: string): Promise<boolean> {
		const targetRepo = repo || (await getCurrentRepo());
		const globalState = getExtensionContext().globalState;
		const cachedData: Record<string, boolean> | undefined = globalState.get(PREFER_SOURCEGRAPH_API);
		return !isNil(cachedData?.[targetRepo]) ? !!cachedData?.[targetRepo] : this._sgApiTimeout ? false : true;
	}

	public async setPreferSourcegraphApi(value: boolean, repo?: string) {
		const targetRepo = repo || (await getCurrentRepo());
		const globalState = getExtensionContext().globalState;
		const cachedData: Record<string, boolean> | undefined = globalState.get(PREFER_SOURCEGRAPH_API);
		await globalState.update(PREFER_SOURCEGRAPH_API, { ...cachedData, [targetRepo]: value });
		this._emitter.fire(value);
	}
}


================================================
FILE: extensions/github1s/src/adapters/github1s/graphql.ts
================================================
/**
 * @file github graphql queries
 * @author netcon
 */

export const FILE_BLAME_QUERY = `
query fileBlameQuery($owner: String!, $repo: String!, $ref: String!, $path: String!) {
	repository(owner: $owner, name: $repo) {
		object(expression: $ref) {
			... on Commit {
				blame(path: $path) {
					ranges {
						age
						startingLine
						endingLine
						commit {
							sha: oid
							message
							authoredDate
							author {
								avatarUrl
								name
								email
							}
						}
					}
				}
			}
		}
	}
}
`;


================================================
FILE: extensions/github1s/src/adapters/github1s/index.ts
================================================
/**
 * @file GitHub1s adapter
 * @author netcon
 */

import * as vscode from 'vscode';
import { setVSCodeContext } from '@/helpers/vscode';
import { GitHub1sDataSource } from './data-source';
import { GitHub1sRouterParser } from './router-parser';
import { GitHub1sSettingsViewProvider } from './settings';
import { GitHub1sAuthenticationView } from './authentication';
import { Adapter, CodeReviewType, PlatformName } from '../types';
import { SourcegraphDataSource } from '../sourcegraph/data-source';
import { getCurrentRepo } from './parse-path';

export class GitHub1sAdapter implements Adapter {
	public scheme: string = 'github1s';
	public platformName = PlatformName.GitHub;
	public codeReviewType = CodeReviewType.PullRequest;

	resolveDataSource() {
		return Promise.resolve(GitHub1sDataSource.getInstance());
	}

	resolveRouterParser() {
		return Promise.resolve(GitHub1sRouterParser.getInstance());
	}

	activateAsDefault() {
		// register settings view and show it in activity bar
		setVSCodeContext('github1s:views:settings:visible', true);
		setVSCodeContext('github1s:views:codeReviewList:visible', true);
		setVSCodeContext('github1s:views:commitList:visible', true);
		setVSCodeContext('github1s:views:fileHistory:visible', true);
		setVSCodeContext('github1s:features:gutterBlame:enabled', true);

		vscode.window.registerWebviewViewProvider(
			GitHub1sSettingsViewProvider.viewType,
			new GitHub1sSettingsViewProvider(),
		);
		vscode.commands.registerCommand('github1s.commands.openGitHub1sAuthPage', () => {
			return GitHub1sAuthenticationView.getInstance().open();
		});
		vscode.commands.registerCommand('github1s.commands.syncSourcegraphRepository', async () => {
			const dataSource = SourcegraphDataSource.getInstance('github');
			const randomRef = (Math.random() + 1).toString(36).slice(2);
			return dataSource.provideCommit(await getCurrentRepo(), randomRef).then(() => {
				return vscode.commands.executeCommand('workbench.action.reloadWindow');
			});
		});
	}

	deactivateAsDefault() {
		setVSCodeContext('github1s:views:settings:visible', false);
		setVSCodeContext('github1s:views:codeReviewList:visible', false);
		setVSCodeContext('github1s:views:commitList:visible', false);
		setVSCodeContext('github1s:views:fileHistory:visible', false);
		setVSCodeContext('github1s:features:gutterBlame:enabled', false);
	}
}


================================================
FILE: extensions/github1s/src/adapters/github1s/parse-path.ts
================================================
/**
 * @file parse github path
 * @author netcon
 */

import * as vscode from 'vscode';
import { parsePath } from 'history';
import { PageType, RouterState } from '@/adapters/types';
import { GitHub1sDataSource } from './data-source';
import * as queryString from 'query-string';
import { memorize } from '@/helpers/func';
import { getBrowserUrl } from '@/helpers/context';

export const DEFAULT_REPO = 'conwnet/github1s';

export const getCurrentRepo = memorize(() => {
	return getBrowserUrl().then((browserUrl: string) => {
		const pathParts = vscode.Uri.parse(browserUrl).path.split('/').filter(Boolean);
		return pathParts.length >= 2 ? (pathParts.slice(0, 2) as [string, string]).join('/') : DEFAULT_REPO;
	});
});

export const getDefaultBranch = async (repo: string): Promise<string> => {
	const dataSource = GitHub1sDataSource.getInstance();
	return dataSource.getDefaultBranch(repo);
};

const parseTreeUrl = async (path: string): Promise<RouterState> => {
	const pathParts = parsePath(path).pathname!.split('/').filter(Boolean);
	const [owner, repo, _pageType, ...restParts] = pathParts;
	const repoFullName = `${owner}/${repo}`;
	const dataSource = GitHub1sDataSource.getInstance();
	const { ref, path: filePath } = await dataSource.extractRefPath(repoFullName, restParts.join('/'));

	return { pageType: PageType.Tree, repo: repoFullName, ref, filePath };
};

const parseBlobUrl = async (path: string): Promise<RouterState> => {
	const routerState = (await parseTreeUrl(path)) as any;
	const { hash: routerHash } = parsePath(path);

	if (!routerHash) {
		return { ...routerState, pageType: PageType.Blob };
	}

	// get selected line number range from path which looks like:
	// `/conwnet/github1s/blob/master/package.json#L10-L20`
	const matches = routerHash.match(/^#L(\d+)(?:-L(\d+))?/);
	const [_, startLineNumber = '0', endLineNumber] = matches ? matches : [];

	return {
		...routerState,
		pageType: PageType.Blob,
		startLine: parseInt(startLineNumber, 10),
		endLine: parseInt(endLineNumber || startLineNumber, 10),
	};
};

const parseCommitsUrl = async (path: string): Promise<RouterState> => {
	const pathParts = parsePath(path).pathname!.split('/').filter(Boolean);
	const [owner, repo, _pageType, ...refParts] = pathParts;

	return {
		repo: `${owner}/${repo}`,
		pageType: PageType.CommitList,
		ref: refParts.length ? refParts.join('/') : await getDefaultBranch(`${owner}/${repo}`),
	};
};

const parseCommitUrl = async (path: string): Promise<RouterState> => {
	const pathParts = parsePath(path).pathname!.split('/').filter(Boolean);
	const [owner, repo, _pageType, ...refParts] = pathParts;
	const commitSha = refParts.join('/');

	return { repo: `${owner}/${repo}`, pageType: PageType.Commit, ref: commitSha, commitSha };
};

const parsePullsUrl = async (path: string): Promise<RouterState> => {
	const [owner, repo] = parsePath(path).pathname!.split('/').filter(Boolean);

	return {
		repo: `${owner}/${repo}`,
		ref: await getDefaultBranch(`${owner}/${repo}`),
		pageType: PageType.CodeReviewList,
	};
};

const parsePullUrl = async (path: string): Promise<RouterState> => {
	const pathParts = parsePath(path).pathname!.split('/').filter(Boolean);
	const [owner, repo, _pageType, codeReviewId] = pathParts;
	const repoFullName = `${owner}/${repo}`;
	const codeReview = await GitHub1sDataSource.getInstance().provideCodeReview(repoFullName, codeReviewId);

	return {
		repo: `${owner}/${repo}`,
		pageType: PageType.CodeReview,
		ref: codeReview.targetSha,
		codeReviewId,
	};
};

const parseSearchUrl = async (path: string): Promise<RouterState> => {
	const { pathname, search } = parsePath(path);
	const pathParts = pathname!.split('/').filter(Boolean);
	const [owner, repo, _pageType] = pathParts;
	const queryOptions = queryString.parse(search || '');
	const query = typeof queryOptions.q === 'string' ? queryOptions.q : '';
	const isRegex = queryOptions.regex === 'yes';
	const isCaseSensitive = queryOptions.case === 'yes';
	const matchWholeWord = queryOptions.whole === 'yes';
	const filesToInclude = typeof queryOptions['files-to-include'] === 'string' ? queryOptions['files-to-include'] : '';
	const filesToExclude = typeof queryOptions['files-to-exclude'] === 'string' ? queryOptions['files-to-exclude'] : '';

	return {
		repo: `${owner}/${repo}`,
		pageType: PageType.Search,
		ref: await getDefaultBranch(`${owner}/${repo}`),
		query,
		isRegex,
		isCaseSensitive,
		matchWholeWord,
		filesToInclude,
		filesToExclude,
	};
};

const PAGE_TYPE_MAP = {
	tree: PageType.Tree,
	blob: PageType.Blob,
	pulls: PageType.CodeReviewList,
	pull: PageType.CodeReview,
	commit: PageType.Commit,
	commits: PageType.CommitList,
	search: PageType.Search,
};

export const parseGitHubPath = async (path: string): Promise<RouterState> => {
	const pathParts = parsePath(path).pathname?.split('/').filter(Boolean) || [];
	// detect concrete PageType the *third part* in url.path
	const pageType = pathParts[2] ? PAGE_TYPE_MAP[pathParts[2]] || PageType.Unknown : PageType.Tree;

	if (pathParts.length >= 2) {
		switch (pageType) {
			case PageType.Tree:
			case PageType.Unknown:
				return parseTreeUrl(path);
			case PageType.Blob:
				return parseBlobUrl(path);
			case PageType.CodeReview:
				return parsePullUrl(path);
			case PageType.CodeReviewList:
				return parsePullsUrl(path);
			case PageType.Commit:
				return parseCommitUrl(path);
			case PageType.CommitList:
				return parseCommitsUrl(path);
			case PageType.Search:
				return parseSearchUrl(path);
		}
	}

	// fallback to default
	return {
		repo: DEFAULT_REPO,
		ref: await getDefaultBranch(DEFAULT_REPO),
		pageType: PageType.Tree,
		filePath: '',
	};
};


================================================
FILE: extensions/github1s/src/adapters/github1s/router-parser.ts
================================================
/**
 * @file router parser
 * @author netcon
 */

import { joinPath } from '@/helpers/util';
import * as adapterTypes from '../types';
import { parseGitHubPath } from './parse-path';

export class GitHub1sRouterParser extends adapterTypes.RouterParser {
	protected static instance: GitHub1sRouterParser | null = null;

	public static getInstance(): GitHub1sRouterParser {
		if (GitHub1sRouterParser.instance) {
			return GitHub1sRouterParser.instance;
		}
		return (GitHub1sRouterParser.instance = new GitHub1sRouterParser());
	}

	parsePath(path: string): Promise<adapterTypes.RouterState> {
		return parseGitHubPath(path);
	}

	buildTreePath(repo: string, ref?: string, filePath?: string): string {
		return ref ? (filePath ? `/${repo}/tree/${ref}/${filePath}` : `/${repo}/tree/${ref}`) : `/${repo}`;
	}

	buildBlobPath(repo: string, ref: string, filePath: string, startLine?: number, endLine?: number): string {
		const hash = startLine ? (endLine ? `#L${startLine}-L${endLine}` : `#L${startLine}`) : '';
		return `/${repo}/blob/${ref}/${filePath}${hash}`;
	}

	buildCommitListPath(repo: string): string {
		return `/${repo}/commits`;
	}

	buildCommitPath(repo: string, commitSha: string): string {
		return `/${repo}/commit/${commitSha}`;
	}

	buildCodeReviewListPath(repo: string): string {
		return `/${repo}/pulls`;
	}

	buildCodeReviewPath(repo: string, codeReviewId: string): string {
		return `/${repo}/pull/${codeReviewId}`;
	}

	buildExternalLink(path: string): string {
		return joinPath(GITHUB_ORIGIN, path);
	}
}


================================================
FILE: extensions/github1s/src/adapters/github1s/settings.ts
================================================
/**
 * @file GitHub1s Settings Webview Provider
 * @author netcon
 */

import * as vscode from 'vscode';
import { getExtensionContext } from '@/helpers/context';
import { createPageHtml, getWebviewOptions } from '@/helpers/page';
import { GitHubTokenManager } from './token';
import { GitHubFetcher } from './fetcher';

export const messageApiMap = {
	info: vscode.window.showInformationMessage,
	warning: vscode.window.showWarningMessage,
	error: vscode.window.showErrorMessage,
};

export class GitHub1sSettingsViewProvider implements vscode.WebviewViewProvider {
	public static readonly viewType = 'github1s.views.settings';

	protected tokenManager = GitHubTokenManager.getInstance();
	protected apiFetcher: Pick<
		GitHubFetcher,
		'getPreferSourcegraphApi' | 'setPreferSourcegraphApi' | 'onDidChangePreferSourcegraphApi'
	> = GitHubFetcher.getInstance();

	protected pageTitle = 'GitHub1s Settings';
	protected OAuthCommand = 'github1s.commands.vscode.connectToGitHub';
	protected detailPageCommand = 'github1s.commands.openGitHub1sAuthPage';
	protected pageConfig = {
		pageDescriptionLines: [
			'For unauthenticated requests, the rate limit of GitHub allows for up to 60 requests per hour.',
			'For API requests using Authentication, you can make up to 5,000 requests per hour.',
		],
		OAuthButtonText: 'Connect to GitHub',
		createTokenLink: `${GITHUB_ORIGIN}/settings/tokens/new?scopes=repo&description=GitHub1s`,
	};

	public registerListeners(webviewView: vscode.WebviewView) {
		webviewView.webview.onDidReceiveMessage((message) => {
			const commonResponse = { id: message.id, type: message.type };
			const postMessage = (data?: unknown) => webviewView.webview.postMessage({ ...commonResponse, data });

			switch (message.type) {
				case 'get-token':
					postMessage(this.tokenManager.getToken());
					break;
				case 'set-token':
					this.tokenManager.setToken(message.data || '').then(() => postMessage());
					break;
				case 'validate-token':
					this.tokenManager.validateToken(message.data).then((tokenStatus) => postMessage(tokenStatus));
					break;
				case 'open-detail-page':
					vscode.commands.executeCommand(this.detailPageCommand).then(() => postMessage());
					break;
				case 'oauth-authorizing':
					vscode.commands.executeCommand(this.OAuthCommand).then((data: any) => {
						if (data && data.error_description) {
							vscode.window.showErrorMessage(data.error_description);
						} else if (data && data.access_token) {
							this.tokenManager.setToken(data.access_token || '');
						}
						postMessage();
					});
					break;
				case 'call-vscode-message-api':
					const messageApi = messageApiMap[message.data?.level];
					messageApi && messageApi(...message.data?.args).then((response) => postMessage(response));
					break;
				case 'get-prefer-sourcegraph-api':
					this.apiFetcher.getPreferSourcegraphApi().then((value) => postMessage(value));
					break;
				case 'set-prefer-sourcegraph-api':
					this.apiFetcher.setPreferSourcegraphApi(message.data);
					postMessage(message.data);
					break;
			}
		});

		this.tokenManager.onDidChangeToken((token) => {
			webviewView.webview.postMessage({ type: 'token-changed', token });
		});
		this.apiFetcher.onDidChangePreferSourcegraphApi((value) => {
			webviewView.webview.postMessage({ type: 'prefer-sourcegraph-api-changed', value });
		});
	}

	public resolveWebviewView(webviewView: vscode.WebviewView): void | Thenable<void> {
		const extensionContext = getExtensionContext();

		this.registerListeners(webviewView);
		webviewView.webview.options = getWebviewOptions(extensionContext.extensionUri);

		const styles = [
			vscode.Uri.joinPath(extensionContext.extensionUri, 'assets/pages/components.css').toString(),
			vscode.Uri.joinPath(extensionContext.extensionUri, 'assets/pages/github1s-settings.css').toString(),
		];
		const globalPageConfig = { ...this.pageConfig, extensionUri: extensionContext.extensionUri.toString() };
		const scripts = [
			'data:text/javascript;base64,' +
				Buffer.from(`window.pageConfig=${JSON.stringify(globalPageConfig)};`).toString('base64'),
			vscode.Uri.joinPath(extensionContext.extensionUri, 'assets/pages/github1s-settings.js').toString(),
		];
		webviewView.webview.html = createPageHtml(this.pageTitle, styles, scripts);
	}
}


================================================
FILE: extensions/github1s/src/adapters/github1s/token.ts
================================================
/**
 * @file github api auth token manager
 */

import * as vscode from 'vscode';
import { getExtensionContext } from '@/helpers/context';

export interface ValidateResult {
	username: string;
	avatar_url: string;
	profile_url: string;
	ratelimits?: {
		limit?: number;
		remaining?: number;
		reset?: number;
		resource?: number;
		used?: number;
	};
}

export class GitHubTokenManager {
	protected static instance: GitHubTokenManager | null = null;
	private _emitter = new vscode.EventEmitter<string>();
	public onDidChangeToken = this._emitter.event;
	public tokenStateKey = 'github-oauth-token';

	protected constructor() {}
	public static getInstance(): GitHubTokenManager {
		if (GitHubTokenManager.instance) {
			return GitHubTokenManager.instance;
		}
		return (GitHubTokenManager.instance = new this());
	}

	public getToken(): string {
		return getExtensionContext().globalState.get(this.tokenStateKey) || '';
	}

	public async setToken(token: string) {
		const isTokenChanged = this.getToken() !== token;
		return getExtensionContext()
			.globalState.update(this.tokenStateKey, token)
			.then(() => isTokenChanged && this._emitter.fire(token));
	}

	public async validateToken(token?: string): Promise<ValidateResult | null> {
		const accessToken = token === undefined ? this.getToken() : token;
		if (!accessToken) {
			return Promise.resolve(null);
		}
		const fetchOptions = accessToken ? { headers: { Authorization: `token ${accessToken}` } } : {};
		return fetch(`${GITHUB_API_PREFIX}/user`, fetchOptions)
			.then((response) => {
				if (response.status === 401) {
					return null;
				}
				return response.json().then((data) => ({
					username: data.login,
					avatar_url: data.avatar_url,
					profile_url: data.html_url,
					rateLimits: {
						limit: +response.headers.get('x-ratelimit-limit')! || 0,
						remaining: +response.headers.get('x-ratelimit-remaining')! || 0,
						reset: +response.headers.get('x-ratelimit-reset')! || 0,
						resource: +response.headers.get('ratelimit-resource')! || 0,
						used: +response.headers.get('x-ratelimit-used')! || 0,
					},
				}));
			})
			.catch(() => null);
	}
}


================================================
FILE: extensions/github1s/src/adapters/gitlab1s/authentication.ts
================================================
/**
 * @file gitlab authentication page
 * @author netcon
 */

import { GitHub1sAuthenticationView } from '../github1s/authentication';
import { GitLabTokenManager } from './token';

export class GitLab1sAuthenticationView extends GitHub1sAuthenticationView {
	protected tokenManager = GitLabTokenManager.getInstance();
	protected pageTitle = 'Authenticating to GitLab';
	protected OAuthCommand = 'github1s.commands.vscode.connectToGitLab';
	protected pageConfig = {
		authenticationFormTitle: 'Authenticating to GitLab',
		OAuthButtonText: 'Connect to GitLab',
		OAuthButtonLogo: 'assets/pages/assets/gitlab.svg',
		createTokenLink: `${GITLAB_ORIGIN}/-/profile/personal_access_tokens?scopes=read_api&name=GitLab1s`,
		authenticationFeatures: [
			{
				text: 'Access GitLab personal repository',
				link: 'https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html',
			},
			{
				text: 'Higher rate limit for GitLab official API',
				link: 'https://docs.gitlab.com/ee/security/rate_limits.html',
			},
		],
	};
}


================================================
FILE: extensions/github1s/src/adapters/gitlab1s/data-source.ts
================================================
/**
 * @file gitlab1s data-source-provider
 * @author netcon
 */

import {
	Branch,
	CodeReview,
	CodeReviewState,
	TextSearchOptions,
	Commit,
	CommonQueryOptions,
	DataSource,
	Directory,
	DirectoryEntry,
	File,
	BlameRange,
	FileType,
	Tag,
	TextSearchResults,
	TextSearchQuery,
	SymbolDefinitions,
	SymbolReferences,
	FileChangeStatus,
	ChangedFile,
	SymbolHover,
	CommitsQueryOptions,
	CodeReviewsQueryOptions,
} from '../types';
import { toUint8Array } from 'js-base64';
import { matchSorter } from 'match-sorter';
import { GitLabFetcher } from './fetcher';
import { SourcegraphDataSource } from '../sourcegraph/data-source';
import { decorate, memorize } from '@/helpers/func';

const FileTypeMap = {
	blob: FileType.File,
	tree: FileType.Directory,
	commit: FileType.Submodule,
};

const getMergeRequestState = (mergeRequest: { state: string; merged_at: string | null }): CodeReviewState => {
	// current merge request is open
	if (mergeRequest.state === 'opened') {
		return CodeReviewState.Open;
	}
	// current merge request is merged
	if (mergeRequest.state === 'closed' && mergeRequest.merged_at) {
		return CodeReviewState.Merged;
	}
	// current merge is closed
	return CodeReviewState.Closed;
};

const resolveComputeAge = (timestamps: number[], ageLimit = 10) => {
	const maxTimestamp = Math.max(...timestamps);
	const minTimestamp = Math.min(...timestamps);
	const step = (maxTimestamp - minTimestamp) / ageLimit;
	return (timestamp: number) => {
		const age = Math.floor((timestamp - minTimestamp) / (step || 1));
		return (((Math.max(age, ageLimit - 1) % ageLimit) + ageLimit) % ageLimit) + 1;
	};
};

const sourcegraphDataSource = SourcegraphDataSource.getInstance('gitlab');
const trySourcegraphApiFirst = (_target: any, propertyKey: string, descriptor: PropertyDescriptor) => {
	const originalMethod = descriptor.value;

	descriptor.value = async function <T extends (...args) => Promise<any>>(...args: Parameters<T>) {
		const gitlabFetcher = GitLabFetcher.getInstance();
		if (await gitlabFetcher.getPreferSourcegraphApi(args[0])) {
			try {
				return await sourcegraphDataSource[propertyKey](...args);
			} catch (e) {}
		}
		return originalMethod.apply(this, args);
	};
};

export class GitLab1sDataSource extends DataSource {
	private static instance: GitLab1sDataSource | null = null;
	private branchesPromiseMap: Map<string, Promise<Branch[]>> = new Map();
	private tagsPromiseMap: Map<string, Promise<Tag[]>> = new Map();
	private matchedRefsMap = new Map<string, string[]>();

	public static getInstance(): GitLab1sDataSource {
		if (GitLab1sDataSource.instance) {
			return GitLab1sDataSource.instance;
		}
		return (GitLab1sDataSource.instance = new GitLab1sDataSource());
	}

	async provideRepository(repo: string) {
		const fetcher = GitLabFetcher.getInstance();
		const { data } = await fetcher.request('GET /projects/{repo}', { repo });
		return { private: data.visibility === 'private', defaultBranch: data.default_branch };
	}

	@trySourcegraphApiFirst
	async provideDirectory(repo: string, ref: string, path: string, recursive = false): Promise<Directory> {
		const fetcher = GitLabFetcher.getInstance();
		let page = 1;
		let files = [];
		const parseTreeItem = (treeItem): DirectoryEntry => ({
			path: treeItem.path.slice(path.length),
			type: FileTypeMap[treeItem.type] || FileType.File,
			commitSha: FileTypeMap[treeItem.id] === FileType.Submodule ? treeItem.sha || 'HEAD' : undefined,
			size: treeItem.size,
		});
		while (page > 0) {
			const requestParams = { ref, page, path, repo, recursive };
			const { data, headers } = await fetcher.request(
				'GET /projects/{repo}/repository/tree?recursive={recursive}&per_page=100&page={page}&ref={ref}&path={path}',
				requestParams,
			);
			files = files.concat(data);
			const nextPage = Number(headers!.get('x-next-page'));
			page = nextPage > page ? nextPage : 0;
		}

		return {
			entries: files.map(parseTreeItem),
			truncated: false,
		};
	}

	@trySourcegraphApiFirst
	async provideFile(repo: string, ref: string, path: string): Promise<File> {
		const fetcher = GitLabFetcher.getInstance();
		const requestParams = { ref, path, repo };
		const { data } = await fetcher.request('GET /projects/{repo}/repository/files/{path}?ref={ref}', requestParams);
		return { content: toUint8Array((data as any).content) };
	}

	@decorate(memorize)
	async getBranches(repo: string, ref: 'heads' | 'tags'): Promise<Branch[] | Tag[]> {
		const fetcher = GitLabFetcher.getInstance();
		const requestParams = { repo, ref };
		const { data } = await fetcher.request('GET /projects/{repo}/repository/branches', requestParams);
		return data.map((item) => ({
			name: item.name,
			commitSha: item.commit.id,
			description: `${ref === 'heads' ? 'Branch' : 'Tag'} at ${item.commit.short_id}`,
		}));
	}

	@decorate(memorize)
	async getTags(repo: string, ref: 'heads' | 'tags'): Promise<Branch[] | Tag[]> {
		const fetcher = GitLabFetcher.getInstance();
		const requestParams = { repo, ref };
		const { data } = await fetcher.request('GET /projects/{repo}/repository/tags', requestParams);
		return data.map((item) => ({
			name: item.name,
			commitSha: item.commit.id,
			description: `${ref === 'heads' ? 'Branch' : 'Tag'} at ${item.commit.short_id}`,
		}));
	}

	@decorate(memorize)
	async getDefaultBranch(repo: string) {
		return (await this.provideRepository(repo))?.defaultBranch || 'HEAD';
	}

	@trySourcegraphApiFirst
	async extractRefPath(repo: string, refAndPath: string): Promise<{ ref: string; path: string }> {
		if (!refAndPath) {
			return { ref: await this.getDefaultBranch(repo), path: '' };
		}
		if (refAndPath.match(/^HEAD(\/.*)?$/i)) {
			return { ref: 'HEAD', path: refAndPath.slice(5) };
		}
		if (!this.matchedRefsMap.has(repo)) {
			this.matchedRefsMap.set(repo, []);
		}
		const matchPathRef = (ref) => refAndPath.startsWith(`${ref}/`) || refAndPath === ref;
		const pathRef = this.matchedRefsMap.get(repo)?.find(matchPathRef);
		if (pathRef) {
			return { ref: pathRef, path: refAndPath.slice(pathRef.length + 1) };
		}
		const [branches, tags] = await this.prepareAllRefs(repo);
		const exactRef = [...branches, ...tags].map((item) => item.name).find(matchPathRef);
		const ref = exactRef || refAndPath.split('/')[0] || 'HEAD';
		exactRef && this.matchedRefsMap.get(repo)?.push(ref);
		return { ref, path: refAndPath.slice(ref.length + 1) };
	}

	async prepareAllRefs(repo: string) {
		return Promise.all([this.provideBranches(repo), this.provideTags(repo)]);
	}

	@trySourcegraphApiFirst
	async provideBranches(repo: string, options?: CommonQueryOptions): Promise<Branch[]> {
		if (!this.branchesPromiseMap.has(repo)) {
			this.branchesPromiseMap.set(repo, this.getBranches(repo, 'heads'));
		}
		return this.branchesPromiseMap.get(repo)!.then((branches) => {
			const matchOptions = { keys: ['name'] };
			const matchedBranches = options?.query ? matchSorter(branches, options.query, matchOptions) : branches;
			if (options?.pageSize) {
				const page = options.page || 1;
				const pageSize = options.pageSize;
				return matchedBranches.slice(pageSize * (page - 1), pageSize * page);
			}
			return matchedBranches;
		});
	}

	@trySourcegraphApiFirst
	async provideBranch(repo: string, branchName: string): Promise<Branch | null> {
		const branches = await this.provideBranches(repo);
		return branches.find((item) => item.name === branchName) || null;
	}

	@trySourcegraphApiFirst
	async provideTags(repoFullName: string, options?: CommonQueryOptions): Promise<Tag[]> {
		if (!this.tagsPromiseMap.has(repoFullName)) {
			this.tagsPromiseMap.set(repoFullName, this.getTags(repoFullName, 'tags'));
		}
		return this.tagsPromiseMap.get(repoFullName)!.then((tags) => {
			const matchOptions = { keys: ['name'] };
			const matchedTags = options?.query ? matchSorter(tags, options.query, matchOptions) : tags;
			if (options?.pageSize) {
				const page = options.page || 1;
				const pageSize = options.pageSize;
				return matchedTags.slice(pageSize * (page - 1), pageSize * page);
			}
			return matchedTags;
		});
	}

	@trySourcegraphApiFirst
	async provideTag(repoFullName: string, tagName: string): Promise<Tag | null> {
		const tags = await this.provideTags(repoFullName);
		return tags.find((item) => item.name === tagName) || null;
	}

	async provideTextSearchResults(
		repoFullName: string,
		ref: string,
		query: TextSearchQuery,
		options: TextSearchOptions,
	): Promise<TextSearchResults> {
		return sourcegraphDataSource.provideTextSearchResults(repoFullName, ref, query, options);
	}

	@trySourcegraphApiFirst
	async provideCommits(repo: string, options?: CommitsQueryOptions): Promise<(Commit & { files?: ChangedFile[] })[]> {
		const fetcher = GitLabFetcher.getInstance();
		const queryParams = {
			page: options?.page,
			per_page: options?.pageSize,
			sha: options?.from,
			path: options?.path,
			author: options?.author,
		};
		const requestParams = { repo, ...queryParams };
		const { data } = await fetcher.request(
			'GET /projects/{repo}/repository/commits?per_page={per_page}&page={page}&path={path}&ref_name={sha}',
			requestParams,
		);
		return Promise.all(
			data.map(async (item) => ({
				sha: item.id,
				author: item.author_name,
				email: item.author_email,
				message: item.message,
				committer: item.committer_name,
				createTime: item.created_at ? new Date(item.created_at) : undefined,
				parents: item.parent_ids.map((parent) => parent) || [],
				avatarUrl: item.author?.avatar_url || (await this.provideUserAvatarLink(item.author_name)),
			})),
		);
	}

	@trySourcegraphApiFirst
	async provideCommit(repo: string, ref: string): Promise<Commit & { files?: ChangedFile[] }> {
		const fetcher = GitLabFetcher.getInstance();
		const requestParams = { repo, ref };
		const { data } = await fetcher.request('GET /projects/{repo}/repository/commits/{ref}', requestParams);
		return {
			sha: data.id,
			author: data.author_name,
			email: data.author_email,
			message: data.message,
			committer: data.committer_name,
			createTime: data.created_at ? new Date(data.created_at) : undefined,
			parents: data.parent_ids || [],
			files: data.files?.map((item) => ({
				path: item.filename || item.previous_filename!,
				previousPath: item.previous_filename,
				status: item.status as FileChangeStatus,
			})),
			avatarUrl: data?.avatar_url,
		};
	}

	@trySourcegraphApiFirst
	async provideCommitChangedFiles(repo: string, ref: string, _options?: CommonQueryOptions): Promise<ChangedFile[]> {
		const fetcher = GitLabFetcher.getInstance();
		const requestParams = { repo, ref };
		const { data } = await fetcher.request('GET /projects/{repo}/repository/commits/{ref}/diff', requestParams);
		return (
			data?.map((item) => ({
				path: item.new_path || item.old_path!,
				previousPath: item.old_path,
				status: item.new_file
					? FileChangeStatus.Added
					: item.deleted_file
						? FileChangeStatus.Removed
						: item.renamed_file
							? FileChangeStatus.Renamed
							: FileChangeStatus.Modified,
			})) || []
		);
	}

	async provideCodeReviews(
		repo: string,
		options?: CodeReviewsQueryOptions,
	): Promise<(CodeReview & { files?: ChangedFile[] })[]> {
		const fetcher = GitLabFetcher.getInstance();
		const state = options?.state ? (options.state === CodeReviewState.Open ? 'open' : 'closed') : 'all';
		// per_page=100&page={page}
		const queryParams = { state, page: options?.page, per_page: options?.pageSize, creator: options?.creator };
		const requestParams = { repo, ...queryParams };
		const { data } = await fetcher.request(
			'GET /projects/{repo}/merge_requests?per_page={per_page}&page={page}',
			requestParams as any,
		);

		return data.map((item) => ({
			id: `${item.iid}`,
			title: item.title,
			state: getMergeRequestState(item),
			creator: item.author?.name || item.author?.username,
			createTime: new Date(item.created_at),
			mergeTime: item.merged_at ? new Date(item.merged_at) : null,
			closeTime: item.closed_at ? new Date(item.closed_at) : null,
			source: item.source_branch,
			target: item.target_branch,
			avatarUrl: item.author?.avatar_url,
		}));
	}

	async provideCodeReview(repo: string, id: string) {
		const fetcher = GitLabFetcher.getInstance();
		const requestParams = { repo, id };
		const { data } = await fetcher.request('GET /projects/{repo}/merge_requests/{id}', requestParams);

		return {
			id: `${data.iid}`,
			title: data.title,
			state: getMergeRequestState(data),
			creator: data.author?.name || data.author?.username,
			createTime: new Date(data.created_at),
			mergeTime: data.merged_at ? new Date(data.merged_at) : null,
			closeTime: data.closed_at ? new Date(data.closed_at) : null,
			source: data.source_branch,
			target: data.target_branch,
			sourceSha: data.diff_refs.head_sha,
			targetSha: data.diff_refs.base_sha,
			avatarUrl: data.author?.avatar_url,
		};
	}

	async provideCodeReviewChangedFiles(repo: string, id: string, options?: CommonQueryOptions): Promise<ChangedFile[]> {
		const fetcher = GitLabFetcher.getInstance();
		const pageParams = { per_page: options?.pageSize, page: options?.page };
		const filesRequestParams = { repo, id, ...pageParams };
		const { data } = await fetcher.request(
			'GET /projects/{repo}/merge_requests/{id}/changes?per_page={per_page}&page={page}',
			filesRequestParams,
		);

		return data.changes.map((item) => ({
			path: item.new_path,
			previousPath: item.old_path,
			status: item.new_file
				? FileChangeStatus.Added
				: item.deleted_file
					? FileChangeStatus.Removed
					: item.renamed_file
						? FileChangeStatus.Renamed
						: FileChangeStatus.Modified,
		}));
	}

	@trySourcegraphApiFirst
	async provideFileBlameRanges(repo: string, ref: string, path: string): Promise<BlameRange[]> {
		const fetcher = GitLabFetcher.getInstance();
		const requestParams = { repo, ref, path };
		const { data } = await fetcher.request(
			'GET /projects/{repo}/repository/files/{path}/blame?ref={ref}',
			requestParams,
		);
		let startLine = 1;
		const timestamps = data.map(({ commit }) => +new Date(commit.authored_date) || 0);
		const computeAge = resolveComputeAge(timestamps);
		return (data || []).map(({ commit, lines }) => {
			const startingLine = startLine;
			const endingLine = startingLine + lines.length;
			startLine = endingLine + 1;
			return {
				age: computeAge(+new Date(commit?.authored_date) || 0),
				startingLine,
				endingLine,
				commit: {
					sha: commit?.id as string,
					author: commit?.author_name as string,
					email: commit?.author_email as string,
					message: commit?.message as string,
					createTime: new Date(commit?.authored_date),
					avatarUrl: this.provideUserAvatarLink(encodeURIComponent(commit?.author?.name)),
				},
			};
		});
	}

	async getAvatar(email): Promise<string> {
		const fetcher = GitLabFetcher.getInstance();
		const { data } = await fetcher.request('GET /avatar?email={email}', { email });
		return data.avatar_url;
	}

	provideSymbolDefinitions(
		repoFullName: string,
		ref: string,
		path: string,
		line: number,
		character: number,
		symbol: string,
	): Promise<SymbolDefinitions> {
		return sourcegraphDataSource.provideSymbolDefinitions(repoFullName, ref, path, line, character, symbol);
	}

	async provideSymbolReferences(
		repoFullName: string,
		ref: string,
		path: string,
		line: number,
		character: number,
		symbol: string,
	): Promise<SymbolReferences> {
		return sourcegraphDataSource.provideSymbolReferences(repoFullName, ref, path, line, character, symbol);
	}

	async provideSymbolHover(
		repoFullName: string,
		ref: string,
		path: string,
		line: number,
		character: number,
		_symbol: string,
	): Promise<SymbolHover | null> {
		return sourcegraphDataSource.provideSymbolHover(repoFullName, ref, path, line, character, _symbol);
	}

	provideUserAvatarLink(user: string): string {
		return `https://www.gravatar.com/avatar/${user}?d=identicon`;
	}
}


================================================
FILE: extensions/github1s/src/adapters/gitlab1s/fetcher.ts
================================================
/**
 * @file gitlab api fetcher
 * @author netcon
 */

import * as vscode from 'vscode';
import { getExtensionContext } from '@/helpers/context';
import { GitLab1sAuthenticationView } from './authentication';
import { GitLabTokenManager } from './token';
import { isNil } from '@/helpers/util';
import { reuseable } from '@/helpers/func';
import { getCurrentRepo } from './parse-path';
import { SourcegraphDataSource } from '../sourcegraph/data-source';

export const errorMessages = {
	badCredentials: {
		anonymous: 'Bad credentials, please authenticate to gitlab and retry',
		authenticated: 'This token is invalid, please try another one',
	},
	repoNotFound: {
		anonymous: 'Repository not found, if it is private, you can provide an AccessToken to access it',
		authenticated: 'Repository not found, if it is private, you can try change an AccessToken to access it',
	},
	noPermission: {
		anonymous: 'You have no permission for this operation, please authenticate to gitlab and retry',
		authenticated: 'You have no permission for this operation, please try another account',
	},
};

const detectErrorMessage = (response: any, authenticated: boolean) => {
	if (response?.status === 401 && response?.data?.message?.includes?.('Unauthorized')) {
		return errorMessages.badCredentials[authenticated ? 'authenticated' : 'anonymous'];
	}
	if (response?.status === 404) {
		return errorMessages.repoNotFound[authenticated ? 'authenticated' : 'anonymous'];
	}
	if (response?.status === 403) {
		return errorMessages.noPermission[authenticated ? 'authenticated' : 'anonymous'];
	}
	return response?.data?.message || response?.data?.error || '';
};

const PREFER_SOURCEGRAPH_API = 'PREFER_SOURCEGRAPH_API';

export class GitLabFetcher {
	private static instance: GitLabFetcher | null = null;
	private _emitter = new vscode.EventEmitter<boolean | null | undefined>();
	public onDidChangePreferSourcegraphApi = this._emitter.event;
	private _currentRepoPromise: Promise<any> | null = null;

	public static getInstance(): GitLabFetcher {
		if (GitLabFetcher.instance) {
			return GitLabFetcher.instance;
		}
		return (GitLabFetcher.instance = new GitLabFetcher());
	}

	private constructor() {
		this.initPreferSourcegraphApi();
		GitLabTokenManager.getInstance().onDidChangeToken(() => this.initPreferSourcegraphApi());
	}

	private _request = reuseable(
		(
			command: string,
			params: Record<string, string | number | boolean | undefined>,
		): Promise<{ status: number; data: any; headers: Headers }> => {
			// eslint-disable-next-line prefer-const
			let [method, path] = command.split(/\s+/).filter(Boolean);
			Object.keys(params).forEach((el) => {
				path = path.replace(`{${el}}`, `${encodeURIComponent(params[el] || '')}`);
			});
			const accessToken = GitLabTokenManager.getInstance().getToken();
			const fetchOptions: { headers: Record<string, string> } =
				accessToken?.length < 60
					? { headers: { 'PRIVATE-TOKEN': `${accessToken}` } }
					: { headers: { Authorization: `Bearer ${accessToken}` } };
			return fetch(GITLAB_API_PREFIX + path, {
				...fetchOptions,
				method,
			}).then(async (response: Response & { data: any }) => {
				response.data = await response.json();
				return response.ok ? response : Promise.reject({ response });
			});
		},
	);

	public request = (command: string, params: Record<string, string | number | boolean | undefined>) => {
		return this._request(command, params).catch(async (error: { response: any }) => {
			const errorStatus = error?.response?.status as number | undefined;
			const repoNotFound = errorStatus === 404 && !(await this.resolveCurrentRepo());
			if ((errorStatus && [401, 403].includes(errorStatus)) || repoNotFound) {
				// maybe we have to acquire github access token to continue
				const accessToken = GitLabTokenManager.getInstance().getToken();
				const message = detectErrorMessage(error?.response, !!accessToken);
				await GitLab1sAuthenticationView.getInstance().open(message, true);
				return this._request(command, params);
			}
			throw error;
		});
	};

	private resolveCurrentRepo(forceUpdate: boolean = false) {
		if (this._currentRepoPromise && !forceUpdate) {
			return this._currentRepoPromise;
		}
		return (this._currentRepoPromise = Promise.resolve(getCurrentRepo())
			.then(async (repo) => this._request('GET /projects/{repo}', { repo }).then((res) => res.data))
			.catch(() => null));
	}

	private async initPreferSourcegraphApi() {
		if (await this.getPreferSourcegraphApi()) {
			const sgDataSource = SourcegraphDataSource.getInstance('github');
			if (!(await sgDataSource.provideRepository(await getCurrentRepo()))) {
				this.resolveCurrentRepo(true).then((repo) => {
					repo?.visibility === 'private' && this.setPreferSourcegraphApi(false);
				});
			}
		}
	}

	public async getPreferSourcegraphApi(repo?: string): Promise<boolean> {
		const targetRepo = repo || (await getCurrentRepo());
		const globalState = getExtensionContext().globalState;
		const cachedData: Record<string, boolean> | undefined = globalState.get(PREFER_SOURCEGRAPH_API);
		return !isNil(cachedData?.[targetRepo]) ? !!cachedData?.[targetRepo] : true;
	}

	public async setPreferSourcegraphApi(value: boolean, repo?: string) {
		const targetRepo = repo || (await getCurrentRepo());
		const globalState = getExtensionContext().globalState;
		const cachedData: Record<string, boolean> | undefined = globalState.get(PREFER_SOURCEGRAPH_API);
		await globalState.update(PREFER_SOURCEGRAPH_API, { ...cachedData, [targetRepo]: value });
		this._emitter.fire(value);
	}
}


================================================
FILE: extensions/github1s/src/adapters/gitlab1s/index.ts
================================================
/**
 * @file GitLab1s adapter
 * @author netcon
 */

import * as vscode from 'vscode';
import { GitLab1sRouterParser } from './router-parser';
import { GitLab1sDataSource } from './data-source';
import { SourcegraphDataSource } from '../sourcegraph/data-source';
import { Adapter, CodeReviewType, PlatformName } from '../types';
import { GitLab1sSettingsViewProvider } from './settings';
import { GitLab1sAuthenticationView } from './authentication';
import { setVSCodeContext } from '@/helpers/vscode';
import { getCurrentRepo } from './parse-path';

export class GitLab1sAdapter implements Adapter {
	public scheme: string = 'gitlab1s';
	public platformName = PlatformName.GitLab;
	public codeReviewType = CodeReviewType.MergeRequest;

	resolveDataSource() {
		return Promise.resolve(GitLab1sDataSource.getInstance());
	}

	resolveRouterParser() {
		return Promise.resolve(GitLab1sRouterParser.getInstance());
	}

	activateAsDefault() {
		// register settings view and show it in activity bar
		setVSCodeContext('github1s:views:settings:visible', true);
		setVSCodeContext('github1s:views:codeReviewList:visible', true);
		setVSCodeContext('github1s:views:commitList:visible', true);
		setVSCodeContext('github1s:views:fileHistory:visible', true);
		setVSCodeContext('github1s:features:gutterBlame:enabled', true);

		vscode.window.registerWebviewViewProvider(
			GitLab1sSettingsViewProvider.viewType,
			new GitLab1sSettingsViewProvider(),
		);
		vscode.commands.registerCommand('github1s.commands.openGitLab1sAuthPage', () => {
			return GitLab1sAuthenticationView.getInstance().open();
		});
		vscode.commands.registerCommand('github1s.commands.syncSourcegraphRepository', async () => {
			const dataSource = SourcegraphDataSource.getInstance('gitlab');
			const randomRef = (Math.random() + 1).toString(36).slice(2);
			return dataSource.provideCommit(await getCurrentRepo(), randomRef);
		});
	}

	deactivateAsDefault() {
		setVSCodeContext('github1s:views:settings:visible', false);
		setVSCodeContext('github1s:views:codeReviewList:visible', false);
		setVSCodeContext('github1s:views:commitList:visible', false);
		setVSCodeContext('github1s:views:fileHistory:visible', false);
		setVSCodeContext('github1s:features:gutterBlame:enabled', false);
	}
}


================================================
FILE: extensions/github1s/src/adapters/gitlab1s/parse-path.ts
================================================
/**
 * @file parse gitlab path
 * @author netcon
 */

import * as vscode from 'vscode';
import { parsePath } from 'history';
import { PageType, RouterState } from '../types';
import { GitLab1sDataSource } from './data-source';
import { memorize } from '@/helpers/func';
import { getBrowserUrl } from '@/helpers/context';

export const DEFAULT_REPO = 'gitlab-org/gitlab-docs';

export const getCurrentRepo = memorize(() => {
	return getBrowserUrl().then((browserUrl: string) => {
		const pathParts = vscode.Uri.parse(browserUrl).path.split('/').filter(Boolean);
		const dashIndex = pathParts.indexOf('-');
		return (dashIndex < 0 ? pathParts : pathParts.slice(0, dashIndex)).join('/') || DEFAULT_REPO;
	});
});

const getDefaultBranch = async (repo: string): Promise<string> => {
	const dataSource = GitLab1sDataSource.getInstance();
	return dataSource.getDefaultBranch(repo);
};

const parseTreeUrl = async (path: string): Promise<RouterState> => {
	const pathParts = parsePath(path).pathname!.split('/').filter(Boolean);
	const dashIndex = pathParts.indexOf('-');
	const repo = (dashIndex < 0 ? pathParts : pathParts.slice(0, dashIndex)).join('/');
	const restParts = dashIndex < 0 ? [] : pathParts.slice(dashIndex + 2);
	const dataSource = GitLab1sDataSource.getInstance();
	const { ref, path: filePath } = await dataSource.extractRefPath(repo, restParts.join('/'));

	return { pageType: PageType.Tree, repo, ref, filePath };
};

const parseBlobUrl = async (path: string): Promise<RouterState> => {
	const routerState = (await parseTreeUrl(path)) as any;
	const { hash: routerHash } = parsePath(path);

	if (!routerHash) {
		return { ...routerState, pageType: PageType.Blob };
	}

	// get selected line number range from path which looks like:
	// `/gitlab-org/gitlab/-/blob/main/package.json#L10-L20`
	const matches = routerHash.match(/^#L(\d+)(?:-L(\d+))?/);
	const [_, startLineNumber = '0', endLineNumber] = matches ? matches : [];

	return {
		...routerState,
		pageType: PageType.Blob,
		startLine: parseInt(startLineNumber, 10),
		endLine: parseInt(endLineNumber || startLineNumber, 10),
	};
};

const parseCommitsUrl = async (path: string): Promise<RouterState> => {
	const pathParts = parsePath(path).pathname!.split('/').filter(Boolean);
	const dashIndex = pathParts.indexOf('-');
	const repo = (dashIndex < 0 ? pathParts : pathParts.slice(0, dashIndex)).join('/');
	const ref = dashIndex < 0 ? await getDefaultBranch(repo) : pathParts.slice(dashIndex + 2).join('/');

	return { repo, pageType: PageType.CommitList, ref };
};

const parseCommitUrl = async (path: string): Promise<RouterState> => {
	const pathParts = parsePath(path).pathname!.split('/').filter(Boolean);
	const dashIndex = pathParts.indexOf('-');
	const repo = (dashIndex < 0 ? pathParts : pathParts.slice(0, dashIndex)).join('/');
	const commitSha = dashIndex < 0 ? await getDefaultBranch(repo) : pathParts.slice(dashIndex + 2).join('/');

	return { repo, pageType: PageType.Commit, ref: commitSha, commitSha };
};

const parseMergeRequestsUrl = async (path: string): Promise<RouterState> => {
	const [owner, repo] = parsePath(path).pathname!.split('/').filter(Boolean);

	return {
		repo: `${owner}/${repo}`,
		ref: await getDefaultBranch(`${owner}/${repo}`),
		pageType: PageType.CodeReviewList,
	};
};

const parseMergeRequestUrl = async (path: string): Promise<RouterState> => {
	const pathParts = parsePath(path).pathname!.split('/').filter(Boolean);
	const [owner, repo, , _pageType, codeReviewId] = pathParts;
	const repoFullName = `${owner}/${repo}`;
	const codeReview = await GitLab1sDataSource.getInstance().provideCodeReview(repoFullName, codeReviewId);

	return {
		repo: `${owner}/${repo}`,
		pageType: PageType.CodeReview,
		ref: codeReview.targetSha,
		codeReviewId,
	};
};

// const parseSearchUrl = async (path: string): Promise<RouterState> => {
// 	const { pathname, search } = parsePath(path);
// 	const pathParts = pathname!.split('/').filter(Boolean);
// 	const [owner, repo, _pageType] = pathParts;
// 	const queryOptions = queryString.parse(search || '');
// 	const query = typeof queryOptions.q === 'string' ? queryOptions.q : '';
// 	const isRegex = queryOptions.regex === 'yes';
// 	const isCaseSensitive = queryOptions.case === 'yes';
// 	const matchWholeWord = queryOptions.whole === 'yes';
// 	const filesToInclude = typeof queryOptions['files-to-include'] === 'string' ? queryOptions['files-to-include'] : '';
// 	const filesToExclude = typeof queryOptions['files-to-exclude'] === 'string' ? queryOptions['files-to-exclude'] : '';

// 	return {
// 		repo: `${owner}/${repo}`,
// 		pageType: PageType.Search,
// 		ref: 'HEAD',
// 		query,
// 		isRegex,
// 		isCaseSensitive,
// 		matchWholeWord,
// 		filesToInclude,
// 		filesToExclude,
// 	};
// };

const PAGE_TYPE_MAP = {
	tree: PageType.Tree,
	blob: PageType.Blob,
	merge_requests: PageType.CodeReview,
	commit: PageType.Commit,
	commits: PageType.CommitList,
};

export const parseGitLabPath = async (path: string): Promise<RouterState> => {
	const pathParts = parsePath(path).pathname?.split('/').filter(Boolean) || [];
	const dashIndex = pathParts.indexOf('-');
	const typeSegment = dashIndex < 0 ? '' : pathParts[dashIndex + 1];
	const pageType = typeSegment ? PAGE_TYPE_MAP[typeSegment] || PageType.Unknown : PageType.Tree;

	if (pathParts.length) {
		switch (pageType) {
			case PageType.Tree:
			case PageType.Unknown:
				return parseTreeUrl(path);
			case PageType.Blob:
				return parseBlobUrl(path);
			case PageType.CodeReview:
				if (pathParts.length > dashIndex + 2) {
					return parseMergeRequestUrl(path);
				}
				return parseMergeRequestsUrl(path);
			case PageType.CodeReviewList:
				return parseMergeRequestsUrl(path);
			case PageType.Commit:
				return parseCommitUrl(path);
			case PageType.CommitList:
				return parseCommitsUrl(path);
		}
	}

	// fallback to default
	return {
		repo: DEFAULT_REPO,
		ref: await getDefaultBranch(DEFAULT_REPO),
		pageType: PageType.Tree,
		filePath: '',
	};
};


================================================
FILE: extensions/github1s/src/adapters/gitlab1s/router-parser.ts
================================================
/**
 * @file router parser
 * @author netcon
 */

import { joinPath } from '@/helpers/util';
import * as adapterTypes from '../types';
import { parseGitLabPath } from './parse-path';

export class GitLab1sRouterParser extends adapterTypes.RouterParser {
	private static instance: GitLab1sRouterParser | null = null;

	public static getInstance(): GitLab1sRouterParser {
		if (GitLab1sRouterParser.instance) {
			return GitLab1sRouterParser.instance;
		}
		return (GitLab1sRouterParser.instance = new GitLab1sRouterParser());
	}

	parsePath(path: string): Promise<adapterTypes.RouterState> {
		return parseGitLabPath(path);
	}

	buildTreePath(repo: string, ref?: string, filePath?: string): string {
		return ref ? (filePath ? `/${repo}/-/tree/${ref}/${filePath}` : `/${repo}/-/tree/${ref}`) : `/${repo}`;
	}

	buildBlobPath(repo: string, ref: string, filePath: string, startLine?: number, endLine?: number): string {
		const hash = startLine ? (endLine ? `#L${startLine}-L${endLine}` : `#L${startLine}`) : '';
		return `/${repo}/-/blob/${ref}/${filePath}${hash}`;
	}

	buildCommitListPath(repo: string): string {
		return `/${repo}/-/commits`;
	}

	buildCommitPath(repo: string, commitSha: string): string {
		return `/${repo}/-/commit/${commitSha}`;
	}

	buildCodeReviewListPath(repo: string): string {
		return `/${repo}/-/merge_requests`;
	}

	buildCodeReviewPath(repo: string, codeReviewId: string): string {
		return `/${repo}/-/merge_requests/${codeReviewId}`;
	}

	buildExternalLink(path: string): string {
		return joinPath(GITLAB_ORIGIN, path);
	}
}


================================================
FILE: extensions/github1s/src/adapters/gitlab1s/settings.ts
================================================
/**
 * @file GitLab1s Settings Webview Provider
 * @author netcon
 */

import { GitLabTokenManager } from './token';
import { GitLabFetcher } from './fetcher';
import { GitHub1sSettingsViewProvider } from '../github1s/settings';

export c
Download .txt
gitextract_hk2wqped/

├── .devcontainer/
│   ├── Dockerfile
│   └── devcontainer.json
├── .editorconfig
├── .github/
│   ├── config.yml
│   └── workflows/
│       ├── build.yml
│       ├── codacy-analysis.yaml
│       ├── test-wtih-vscode-build.yml
│       └── welcome-first-time-contributors.yml
├── .gitignore
├── .gitpod.Dockerfile
├── .gitpod.yml
├── .husky/
│   ├── .gitignore
│   └── pre-commit
├── .prettierignore
├── .prettierrc.js
├── LICENSE
├── README.md
├── docs/
│   └── guide.md
├── eslint.config.js
├── extensions/
│   ├── elm-web/
│   │   ├── LICENSE
│   │   ├── README.md
│   │   ├── language-configuration.json
│   │   ├── package.json
│   │   └── syntaxes/
│   │       ├── codeblock.json
│   │       └── elm-syntax.json
│   ├── github1s/
│   │   ├── assets/
│   │   │   └── pages/
│   │   │       ├── components.css
│   │   │       ├── components.js
│   │   │       ├── github1s-authentication.css
│   │   │       ├── github1s-authentication.js
│   │   │       ├── github1s-settings.css
│   │   │       ├── github1s-settings.js
│   │   │       └── libraries/
│   │   │           ├── htm.module.js
│   │   │           ├── preact-hooks.module.js
│   │   │           └── preact.module.js
│   │   ├── package.json
│   │   ├── src/
│   │   │   ├── adapters/
│   │   │   │   ├── bitbucket1s/
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── parse-path.ts
│   │   │   │   │   └── router-parser.ts
│   │   │   │   ├── github1s/
│   │   │   │   │   ├── authentication.ts
│   │   │   │   │   ├── data-source.ts
│   │   │   │   │   ├── fetcher.ts
│   │   │   │   │   ├── graphql.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── parse-path.ts
│   │   │   │   │   ├── router-parser.ts
│   │   │   │   │   ├── settings.ts
│   │   │   │   │   └── token.ts
│   │   │   │   ├── gitlab1s/
│   │   │   │   │   ├── authentication.ts
│   │   │   │   │   ├── data-source.ts
│   │   │   │   │   ├── fetcher.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── parse-path.ts
│   │   │   │   │   ├── router-parser.ts
│   │   │   │   │   ├── settings.ts
│   │   │   │   │   └── token.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── manager.ts
│   │   │   │   ├── npmjs1s/
│   │   │   │   │   ├── data-source.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   └── router-parser.ts
│   │   │   │   ├── ossinsight/
│   │   │   │   │   ├── constants.ts
│   │   │   │   │   ├── data-source.ts
│   │   │   │   │   ├── index.ts
│   │   │   │   │   ├── interfaces.ts
│   │   │   │   │   ├── router-parser.ts
│   │   │   │   │   └── templates.ts
│   │   │   │   ├── sourcegraph/
│   │   │   │   │   ├── blame.ts
│   │   │   │   │   ├── commit.ts
│   │   │   │   │   ├── common.ts
│   │   │   │   │   ├── comparison.ts
│   │   │   │   │   ├── data-source.ts
│   │   │   │   │   ├── definition.ts
│   │   │   │   │   ├── file.ts
│   │   │   │   │   ├── hover.ts
│   │   │   │   │   ├── position.ts
│   │   │   │   │   ├── ref.ts
│   │   │   │   │   ├── reference.ts
│   │   │   │   │   ├── repository.ts
│   │   │   │   │   └── search.ts
│   │   │   │   └── types.ts
│   │   │   ├── changes/
│   │   │   │   ├── files.ts
│   │   │   │   ├── index.ts
│   │   │   │   └── quick-diff.ts
│   │   │   ├── commands/
│   │   │   │   ├── blame.ts
│   │   │   │   ├── code-review.ts
│   │   │   │   ├── commit.ts
│   │   │   │   ├── editor.ts
│   │   │   │   ├── global.ts
│   │   │   │   ├── index.ts
│   │   │   │   └── ref.ts
│   │   │   ├── extension.ts
│   │   │   ├── global.d.ts
│   │   │   ├── helpers/
│   │   │   │   ├── async.ts
│   │   │   │   ├── context.ts
│   │   │   │   ├── date.ts
│   │   │   │   ├── func.ts
│   │   │   │   ├── page.ts
│   │   │   │   ├── submodule.ts
│   │   │   │   ├── urls.ts
│   │   │   │   ├── util.ts
│   │   │   │   └── vscode.ts
│   │   │   ├── listeners/
│   │   │   │   ├── index.ts
│   │   │   │   ├── router/
│   │   │   │   │   ├── changes.ts
│   │   │   │   │   ├── explorer.ts
│   │   │   │   │   └── index.ts
│   │   │   │   └── vscode.ts
│   │   │   ├── messages.ts
│   │   │   ├── providers/
│   │   │   │   ├── decorations/
│   │   │   │   │   ├── changed-file.ts
│   │   │   │   │   ├── source-control.ts
│   │   │   │   │   └── submodule.ts
│   │   │   │   ├── definition.ts
│   │   │   │   ├── file-search.ts
│   │   │   │   ├── file-system/
│   │   │   │   │   ├── index.ts
│   │   │   │   │   └── types.ts
│   │   │   │   ├── hover.ts
│   │   │   │   ├── index.ts
│   │   │   │   ├── reference.ts
│   │   │   │   └── text-search.ts
│   │   │   ├── repository/
│   │   │   │   ├── branch-tag-manager.ts
│   │   │   │   ├── code-review-manager.ts
│   │   │   │   ├── commit-manager.ts
│   │   │   │   └── index.ts
│   │   │   ├── router/
│   │   │   │   ├── events.ts
│   │   │   │   └── index.ts
│   │   │   ├── statusbar/
│   │   │   │   ├── checkout.ts
│   │   │   │   ├── index.ts
│   │   │   │   └── sponsors.ts
│   │   │   ├── views/
│   │   │   │   ├── code-review-list.ts
│   │   │   │   ├── commit-list.ts
│   │   │   │   └── index.ts
│   │   │   └── vscode.proposed.d.ts
│   │   ├── tsconfig.json
│   │   └── webpack.config.js
│   ├── nim-web/
│   │   ├── LICENSE
│   │   ├── README.md
│   │   ├── nimcfg.json
│   │   ├── package.json
│   │   ├── snippets/
│   │   │   └── nim.json
│   │   └── syntaxes/
│   │       ├── nim.json
│   │       └── nimble.json
│   ├── ocaml-web/
│   │   ├── LICENSE
│   │   ├── README.md
│   │   ├── languages/
│   │   │   ├── META.json
│   │   │   ├── dune.json
│   │   │   ├── menhir.json
│   │   │   ├── oasis.json
│   │   │   ├── ocaml.json
│   │   │   ├── ocamlbuild.json
│   │   │   ├── ocamlformat.json
│   │   │   ├── ocamllex.json
│   │   │   ├── opam-install.json
│   │   │   ├── opam.json
│   │   │   └── reason.json
│   │   ├── package.json
│   │   ├── snippets/
│   │   │   ├── dune-project.json
│   │   │   ├── dune.json
│   │   │   ├── ocaml.json
│   │   │   └── ocamllex.json
│   │   └── syntaxes/
│   │       ├── META.json
│   │       ├── atd.json
│   │       ├── cram.json
│   │       ├── dune-project.json
│   │       ├── dune-workspace.json
│   │       ├── dune.json
│   │       ├── menhir-action.json
│   │       ├── menhir.json
│   │       ├── merlin.json
│   │       ├── oasis.json
│   │       ├── ocaml-markdown-codeblock.json
│   │       ├── ocaml.interface.json
│   │       ├── ocaml.json
│   │       ├── ocamlbuild.json
│   │       ├── ocamldoc.json
│   │       ├── ocamlformat.json
│   │       ├── ocamllex.json
│   │       ├── opam-install.json
│   │       ├── opam.json
│   │       ├── reason-markdown-codeblock.json
│   │       └── reason.json
│   └── vlang-web/
│       ├── LICENSE
│       ├── README.md
│       ├── language-configuration.json
│       ├── package.json
│       ├── snippets/
│       │   └── snippets.json
│       └── syntaxes/
│           └── v.tmLanguage.json
├── functions/
│   ├── api/
│   │   ├── github-auth-callback.ts
│   │   └── gitlab-auth-callback.ts
│   └── tsconfig.json
├── package.json
├── public/
│   ├── index.html
│   ├── manifest.json
│   ├── page-title.js
│   ├── robots.txt
│   └── spinner.css
├── scripts/
│   ├── build.js
│   ├── link.js
│   ├── postinstall.js
│   ├── utils.js
│   └── webpack.js
├── src/
│   ├── config.ts
│   ├── github-auth.ts
│   ├── gitlab-auth.ts
│   ├── global.d.ts
│   ├── index.ts
│   ├── notification.css
│   ├── notification.ts
│   └── product.ts
├── tests/
│   ├── __tests__/
│   │   └── index.test.ts
│   ├── jest.config.js
│   ├── package.json
│   ├── tsconfig.json
│   └── typings.d.ts
├── tsconfig.json
├── vscode-web/
│   ├── .VERSION
│   ├── README.md
│   ├── index.html
│   ├── package.json
│   ├── scripts/
│   │   ├── .patch
│   │   ├── build/
│   │   │   ├── nls.js
│   │   │   ├── package.js
│   │   │   └── vscode.js
│   │   ├── clone.js
│   │   ├── patch.js
│   │   ├── utils.js
│   │   └── watch/
│   │       ├── extensions.js
│   │       ├── source.js
│   │       └── vscode.js
│   ├── src/
│   │   ├── setup.d.ts
│   │   └── vs/
│   │       ├── base/
│   │       │   └── common/
│   │       │       └── network.ts
│   │       └── workbench/
│   │           ├── browser/
│   │           │   ├── parts/
│   │           │   │   ├── activitybar/
│   │           │   │   │   └── activitybarPart.ts
│   │           │   │   └── titlebar/
│   │           │   │       └── media/
│   │           │   │           └── titlebarpart.css
│   │           │   └── web.main.ts
│   │           ├── contrib/
│   │           │   ├── files/
│   │           │   │   └── browser/
│   │           │   │       └── editors/
│   │           │   │           └── fileEditorInput.ts
│   │           │   └── webview/
│   │           │       └── browser/
│   │           │           └── pre/
│   │           │               ├── index-no-csp.html
│   │           │               └── index.html
│   │           └── services/
│   │               ├── extensionManagement/
│   │               │   └── browser/
│   │               │       └── builtinExtensionsScannerService.ts
│   │               ├── label/
│   │               │   └── common/
│   │               │       └── labelService.ts
│   │               └── textfile/
│   │                   └── browser/
│   │                       └── textFileService.ts
│   └── tsconfig.json
└── webpack.config.js
Download .txt
SYMBOL INDEX (836 symbols across 82 files)

FILE: extensions/github1s/assets/pages/libraries/preact-hooks.module.js
  function l (line 2) | function l(t,r){n.__h&&n.__h(u,t,o||r),o=0;var i=u.__H||(u.__H={__:[],__...
  function m (line 2) | function m(n){return o=1,p(w,n)}
  function p (line 2) | function p(n,r,o){var i=l(t++,2);return i.t=n,i.__c||(i.__=[o?o(r):w(voi...
  function y (line 2) | function y(r,o){var i=l(t++,3);!n.__s&&k(i.__H,o)&&(i.__=r,i.__H=o,u.__H...
  function d (line 2) | function d(r,o){var i=l(t++,4);!n.__s&&k(i.__H,o)&&(i.__=r,i.__H=o,u.__h...
  function h (line 2) | function h(n){return o=5,_(function(){return{current:n}},[])}
  function s (line 2) | function s(n,t,u){o=6,d(function(){return"function"==typeof n?(n(t()),fu...
  function _ (line 2) | function _(n,u){var r=l(t++,7);return k(r.__H,u)&&(r.__=n(),r.__H=u,r.__...
  function A (line 2) | function A(n,t){return o=8,_(function(){return n},t)}
  function F (line 2) | function F(n){var r=u.context[n.__c],o=l(t++,9);return o.c=n,r?(null==o....
  function T (line 2) | function T(t,u){n.useDebugValue&&n.useDebugValue(u?u(t):t)}
  function q (line 2) | function q(n){var r=l(t++,10),o=m();return r.__=n,u.componentDidCatch||(...
  function x (line 2) | function x(){for(var t;t=i.shift();)if(t.__P)try{t.__H.__h.forEach(g),t....
  function g (line 2) | function g(n){var t=u,r=n.__c;"function"==typeof r&&(n.__c=void 0,r()),u=t}
  function j (line 2) | function j(n){var t=u;n.__c=n.__(),u=t}
  function k (line 2) | function k(n,t){return!n||n.length!==t.length||t.some(function(t,u){retu...
  function w (line 2) | function w(n,t){return"function"==typeof t?t(n):t}

FILE: extensions/github1s/assets/pages/libraries/preact.module.js
  function a (line 2) | function a(n,l){for(var u in l)n[u]=l[u];return n}
  function h (line 2) | function h(n){var l=n.parentNode;l&&l.removeChild(n)}
  function v (line 2) | function v(l,u,i){var t,o,r,f={};for(r in u)"key"==r?t=u[r]:"ref"==r?o=u...
  function y (line 2) | function y(n,i,t,o,r){var f={type:n,props:i,key:t,ref:o,__k:null,__:null...
  function p (line 2) | function p(){return{current:null}}
  function d (line 2) | function d(n){return n.children}
  function _ (line 2) | function _(n,l){this.props=n,this.context=l}
  function k (line 2) | function k(n,l){if(null==l)return n.__?k(n.__,n.__.__k.indexOf(n)+1):nul...
  function b (line 2) | function b(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.ba...
  function m (line 2) | function m(n){(!n.__d&&(n.__d=!0)&&t.push(n)&&!g.__r++||r!==l.debounceRe...
  function g (line 2) | function g(){for(var n;g.__r=t.length;)n=t.sort(function(n,l){return n._...
  function w (line 2) | function w(n,l,u,i,t,o,r,f,s,a){var h,v,p,_,b,m,g,w=i&&i.__k||c,A=w.leng...
  function x (line 2) | function x(n,l,u){for(var i,t=n.__k,o=0;t&&o<t.length;o++)(i=t[o])&&(i._...
  function A (line 2) | function A(n,l){return l=l||[],null==n||"boolean"==typeof n||(Array.isAr...
  function P (line 2) | function P(n,l,u,i,t,o){var r,f,e;if(void 0!==l.__d)r=l.__d,l.__d=void 0...
  function C (line 2) | function C(n,l,u,i,t){var o;for(o in u)"children"===o||"key"===o||o in l...
  function $ (line 2) | function $(n,l,u){"-"===l[0]?n.setProperty(l,u):n[l]=null==u?"":"number"...
  function H (line 2) | function H(n,l,u,i,t){var o;n:if("style"===l)if("string"==typeof u)n.sty...
  function I (line 2) | function I(n){this.l[n.type+!1](l.event?l.event(n):n)}
  function T (line 2) | function T(n){this.l[n.type+!0](l.event?l.event(n):n)}
  function j (line 2) | function j(n,u,i,t,o,r,f,e,c){var s,h,v,y,p,k,b,m,g,x,A,P=u.type;if(void...
  function z (line 2) | function z(n,u){l.__c&&l.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[...
  function L (line 2) | function L(l,u,i,t,o,r,f,c){var s,a,v,y=i.props,p=u.props,d=u.type,_=0;i...
  function M (line 2) | function M(n,u,i){try{"function"==typeof n?n(u):n.current=u}catch(n){l._...
  function N (line 2) | function N(n,u,i){var t,o;if(l.unmount&&l.unmount(n),(t=n.ref)&&(t.curre...
  function O (line 2) | function O(n,l,u){return this.constructor(n,u)}
  function S (line 2) | function S(u,i,t){var o,r,f;l.__&&l.__(u,i),r=(o="function"==typeof t)?n...
  function q (line 2) | function q(n,l){S(n,l,q)}
  function B (line 2) | function B(l,u,i){var t,o,r,f=a({},l.props);for(r in u)"key"==r?t=u[r]:"...
  function D (line 2) | function D(n,l){var u={__c:l="__cC"+f++,__:n,Consumer:function(n,l){retu...

FILE: extensions/github1s/src/adapters/bitbucket1s/index.ts
  class BitbucketAdapter (line 11) | class BitbucketAdapter implements Adapter {
    method resolveDataSource (line 16) | resolveDataSource() {
    method resolveRouterParser (line 20) | resolveRouterParser() {
    method activateAsDefault (line 24) | activateAsDefault() {
    method deactivateAsDefault (line 30) | deactivateAsDefault() {

FILE: extensions/github1s/src/adapters/bitbucket1s/parse-path.ts
  constant PAGE_TYPE_MAP (line 40) | const PAGE_TYPE_MAP = {

FILE: extensions/github1s/src/adapters/bitbucket1s/router-parser.ts
  class BitbucketRouterParser (line 9) | class BitbucketRouterParser extends adapterTypes.RouterParser {
    method getInstance (line 12) | public static getInstance(): BitbucketRouterParser {
    method parsePath (line 19) | parsePath(path: string): Promise<adapterTypes.RouterState> {
    method buildTreePath (line 23) | buildTreePath(repo: string, ref?: string, filePath?: string): string {
    method buildBlobPath (line 27) | buildBlobPath(repo: string, ref: string, filePath: string, startLine?:...
    method buildCommitListPath (line 32) | buildCommitListPath(repo: string): string {
    method buildCommitPath (line 36) | buildCommitPath(repo: string, commitSha: string): string {
    method buildCodeReviewListPath (line 40) | buildCodeReviewListPath(repo: string): string {
    method buildCodeReviewPath (line 44) | buildCodeReviewPath(repo: string, codeReviewId: string): string {
    method buildExternalLink (line 48) | buildExternalLink(path: string): string {

FILE: extensions/github1s/src/adapters/github1s/authentication.ts
  class GitHub1sAuthenticationView (line 13) | class GitHub1sAuthenticationView {
    method constructor (line 48) | protected constructor() {}
    method getInstance (line 50) | public static getInstance(): GitHub1sAuthenticationView {
    method registerListeners (line 57) | private registerListeners() {
    method open (line 104) | public open(notice: string = '', withBarrier = false) {

FILE: extensions/github1s/src/adapters/github1s/data-source.ts
  class GitHub1sDataSource (line 81) | class GitHub1sDataSource extends DataSource {
    method getInstance (line 88) | public static getInstance(): GitHub1sDataSource {
    method provideRepository (line 96) | async provideRepository(repoFullName: string): Promise<{ private: bool...
    method provideDirectory (line 105) | async provideDirectory(repoFullName: string, ref: string, path: string...
    method provideFile (line 126) | async provideFile(repoFullName: string, ref: string, path: string): Pr...
    method getMatchingRefs (line 134) | async getMatchingRefs(repoFullName: string, ref: 'heads' | 'tags'): Pr...
    method getDefaultBranch (line 147) | async getDefaultBranch(repoFullName: string) {
    method extractRefPath (line 152) | async extractRefPath(repoFullName: string, refAndPath: string): Promis...
    method provideBranches (line 185) | async provideBranches(repoFullName: string, options?: CommonQueryOptio...
    method provideBranch (line 202) | async provideBranch(repoFullName: string, branchName: string): Promise...
    method provideTags (line 208) | async provideTags(repoFullName: string, options?: CommonQueryOptions):...
    method provideTag (line 225) | async provideTag(repoFullName: string, tagName: string): Promise<Tag |...
    method provideTextSearchResults (line 230) | async provideTextSearchResults(
    method provideCommits (line 240) | async provideCommits(
    method provideCommit (line 268) | async provideCommit(repoFullName: string, ref: string): Promise<Commit...
    method provideCommitChangedFiles (line 291) | async provideCommitChangedFiles(
    method provideCodeReviews (line 309) | async provideCodeReviews(
    method provideCodeReview (line 336) | async provideCodeReview(repoFullName: string, id: string) {
    method provideCodeReviewChangedFiles (line 358) | async provideCodeReviewChangedFiles(
    method provideFileBlameRanges (line 377) | async provideFileBlameRanges(repoFullName: string, ref: string, path: ...
    method provideSymbolDefinitions (line 399) | provideSymbolDefinitions(
    method provideSymbolReferences (line 410) | async provideSymbolReferences(
    method provideSymbolHover (line 421) | async provideSymbolHover(
    method provideUserAvatarLink (line 432) | provideUserAvatarLink(user: string): string {

FILE: extensions/github1s/src/adapters/github1s/fetcher.ts
  constant PREFER_SOURCEGRAPH_API (line 51) | const PREFER_SOURCEGRAPH_API = 'PREFER_SOURCEGRAPH_API';
  class GitHubFetcher (line 53) | class GitHubFetcher {
    method getInstance (line 64) | public static getInstance(): GitHubFetcher {
    method constructor (line 71) | private constructor() {
    method initFetcherMethods (line 79) | initFetcherMethods() {
    method resolveCurrentRepo (line 106) | private resolveCurrentRepo(forceUpdate: boolean = false) {
    method initPreferSourcegraphApi (line 117) | private async initPreferSourcegraphApi() {
    method getPreferSourcegraphApi (line 134) | public async getPreferSourcegraphApi(repo?: string): Promise<boolean> {
    method setPreferSourcegraphApi (line 141) | public async setPreferSourcegraphApi(value: boolean, repo?: string) {

FILE: extensions/github1s/src/adapters/github1s/graphql.ts
  constant FILE_BLAME_QUERY (line 6) | const FILE_BLAME_QUERY = `

FILE: extensions/github1s/src/adapters/github1s/index.ts
  class GitHub1sAdapter (line 16) | class GitHub1sAdapter implements Adapter {
    method resolveDataSource (line 21) | resolveDataSource() {
    method resolveRouterParser (line 25) | resolveRouterParser() {
    method activateAsDefault (line 29) | activateAsDefault() {
    method deactivateAsDefault (line 53) | deactivateAsDefault() {

FILE: extensions/github1s/src/adapters/github1s/parse-path.ts
  constant DEFAULT_REPO (line 14) | const DEFAULT_REPO = 'conwnet/github1s';
  constant PAGE_TYPE_MAP (line 127) | const PAGE_TYPE_MAP = {

FILE: extensions/github1s/src/adapters/github1s/router-parser.ts
  class GitHub1sRouterParser (line 10) | class GitHub1sRouterParser extends adapterTypes.RouterParser {
    method getInstance (line 13) | public static getInstance(): GitHub1sRouterParser {
    method parsePath (line 20) | parsePath(path: string): Promise<adapterTypes.RouterState> {
    method buildTreePath (line 24) | buildTreePath(repo: string, ref?: string, filePath?: string): string {
    method buildBlobPath (line 28) | buildBlobPath(repo: string, ref: string, filePath: string, startLine?:...
    method buildCommitListPath (line 33) | buildCommitListPath(repo: string): string {
    method buildCommitPath (line 37) | buildCommitPath(repo: string, commitSha: string): string {
    method buildCodeReviewListPath (line 41) | buildCodeReviewListPath(repo: string): string {
    method buildCodeReviewPath (line 45) | buildCodeReviewPath(repo: string, codeReviewId: string): string {
    method buildExternalLink (line 49) | buildExternalLink(path: string): string {

FILE: extensions/github1s/src/adapters/github1s/settings.ts
  class GitHub1sSettingsViewProvider (line 18) | class GitHub1sSettingsViewProvider implements vscode.WebviewViewProvider {
    method registerListeners (line 39) | public registerListeners(webviewView: vscode.WebviewView) {
    method resolveWebviewView (line 89) | public resolveWebviewView(webviewView: vscode.WebviewView): void | The...

FILE: extensions/github1s/src/adapters/github1s/token.ts
  type ValidateResult (line 8) | interface ValidateResult {
  class GitHubTokenManager (line 21) | class GitHubTokenManager {
    method constructor (line 27) | protected constructor() {}
    method getInstance (line 28) | public static getInstance(): GitHubTokenManager {
    method getToken (line 35) | public getToken(): string {
    method setToken (line 39) | public async setToken(token: string) {
    method validateToken (line 46) | public async validateToken(token?: string): Promise<ValidateResult | n...

FILE: extensions/github1s/src/adapters/gitlab1s/authentication.ts
  class GitLab1sAuthenticationView (line 9) | class GitLab1sAuthenticationView extends GitHub1sAuthenticationView {

FILE: extensions/github1s/src/adapters/gitlab1s/data-source.ts
  class GitLab1sDataSource (line 80) | class GitLab1sDataSource extends DataSource {
    method getInstance (line 86) | public static getInstance(): GitLab1sDataSource {
    method provideRepository (line 93) | async provideRepository(repo: string) {
    method provideDirectory (line 100) | async provideDirectory(repo: string, ref: string, path: string, recurs...
    method provideFile (line 128) | async provideFile(repo: string, ref: string, path: string): Promise<Fi...
    method getBranches (line 136) | async getBranches(repo: string, ref: 'heads' | 'tags'): Promise<Branch...
    method getTags (line 148) | async getTags(repo: string, ref: 'heads' | 'tags'): Promise<Branch[] |...
    method getDefaultBranch (line 160) | async getDefaultBranch(repo: string) {
    method extractRefPath (line 165) | async extractRefPath(repo: string, refAndPath: string): Promise<{ ref:...
    method prepareAllRefs (line 187) | async prepareAllRefs(repo: string) {
    method provideBranches (line 192) | async provideBranches(repo: string, options?: CommonQueryOptions): Pro...
    method provideBranch (line 209) | async provideBranch(repo: string, branchName: string): Promise<Branch ...
    method provideTags (line 215) | async provideTags(repoFullName: string, options?: CommonQueryOptions):...
    method provideTag (line 232) | async provideTag(repoFullName: string, tagName: string): Promise<Tag |...
    method provideTextSearchResults (line 237) | async provideTextSearchResults(
    method provideCommits (line 247) | async provideCommits(repo: string, options?: CommitsQueryOptions): Pro...
    method provideCommit (line 276) | async provideCommit(repo: string, ref: string): Promise<Commit & { fil...
    method provideCommitChangedFiles (line 298) | async provideCommitChangedFiles(repo: string, ref: string, _options?: ...
    method provideCodeReviews (line 317) | async provideCodeReviews(
    method provideCodeReview (line 345) | async provideCodeReview(repo: string, id: string) {
    method provideCodeReviewChangedFiles (line 366) | async provideCodeReviewChangedFiles(repo: string, id: string, options?...
    method provideFileBlameRanges (line 389) | async provideFileBlameRanges(repo: string, ref: string, path: string):...
    method getAvatar (line 419) | async getAvatar(email): Promise<string> {
    method provideSymbolDefinitions (line 425) | provideSymbolDefinitions(
    method provideSymbolReferences (line 436) | async provideSymbolReferences(
    method provideSymbolHover (line 447) | async provideSymbolHover(
    method provideUserAvatarLink (line 458) | provideUserAvatarLink(user: string): string {

FILE: extensions/github1s/src/adapters/gitlab1s/fetcher.ts
  constant PREFER_SOURCEGRAPH_API (line 43) | const PREFER_SOURCEGRAPH_API = 'PREFER_SOURCEGRAPH_API';
  class GitLabFetcher (line 45) | class GitLabFetcher {
    method getInstance (line 51) | public static getInstance(): GitLabFetcher {
    method constructor (line 58) | private constructor() {
    method resolveCurrentRepo (line 103) | private resolveCurrentRepo(forceUpdate: boolean = false) {
    method initPreferSourcegraphApi (line 112) | private async initPreferSourcegraphApi() {
    method getPreferSourcegraphApi (line 123) | public async getPreferSourcegraphApi(repo?: string): Promise<boolean> {
    method setPreferSourcegraphApi (line 130) | public async setPreferSourcegraphApi(value: boolean, repo?: string) {

FILE: extensions/github1s/src/adapters/gitlab1s/index.ts
  class GitLab1sAdapter (line 16) | class GitLab1sAdapter implements Adapter {
    method resolveDataSource (line 21) | resolveDataSource() {
    method resolveRouterParser (line 25) | resolveRouterParser() {
    method activateAsDefault (line 29) | activateAsDefault() {
    method deactivateAsDefault (line 51) | deactivateAsDefault() {

FILE: extensions/github1s/src/adapters/gitlab1s/parse-path.ts
  constant DEFAULT_REPO (line 13) | const DEFAULT_REPO = 'gitlab-org/gitlab-docs';
  constant PAGE_TYPE_MAP (line 127) | const PAGE_TYPE_MAP = {

FILE: extensions/github1s/src/adapters/gitlab1s/router-parser.ts
  class GitLab1sRouterParser (line 10) | class GitLab1sRouterParser extends adapterTypes.RouterParser {
    method getInstance (line 13) | public static getInstance(): GitLab1sRouterParser {
    method parsePath (line 20) | parsePath(path: string): Promise<adapterTypes.RouterState> {
    method buildTreePath (line 24) | buildTreePath(repo: string, ref?: string, filePath?: string): string {
    method buildBlobPath (line 28) | buildBlobPath(repo: string, ref: string, filePath: string, startLine?:...
    method buildCommitListPath (line 33) | buildCommitListPath(repo: string): string {
    method buildCommitPath (line 37) | buildCommitPath(repo: string, commitSha: string): string {
    method buildCodeReviewListPath (line 41) | buildCodeReviewListPath(repo: string): string {
    method buildCodeReviewPath (line 45) | buildCodeReviewPath(repo: string, codeReviewId: string): string {
    method buildExternalLink (line 49) | buildExternalLink(path: string): string {

FILE: extensions/github1s/src/adapters/gitlab1s/settings.ts
  class GitLab1sSettingsViewProvider (line 10) | class GitLab1sSettingsViewProvider extends GitHub1sSettingsViewProvider {

FILE: extensions/github1s/src/adapters/gitlab1s/token.ts
  class GitLabTokenManager (line 7) | class GitLabTokenManager extends GitHubTokenManager {
    method getInstance (line 11) | public static getInstance(): GitLabTokenManager {
    method validateToken (line 18) | public async validateToken(token?: string): Promise<ValidateResult | n...

FILE: extensions/github1s/src/adapters/manager.ts
  class AdapterManager (line 10) | class AdapterManager {
    method constructor (line 15) | private constructor() {}
    method getInstance (line 17) | public static getInstance(): AdapterManager {
    method registerAdapter (line 24) | public registerAdapter(adapter: Adapter): Promisable<void> {
    method getAllAdapters (line 39) | public getAllAdapters(): Adapter[] {
    method getAdapter (line 43) | public getAdapter(scheme: string): Adapter {
    method getCurrentScheme (line 50) | public getCurrentScheme(): string {
    method getCurrentAdapter (line 54) | public getCurrentAdapter(): Adapter {

FILE: extensions/github1s/src/adapters/npmjs1s/data-source.ts
  type PackageFile (line 10) | type PackageFile = {
  type PackageDirectory (line 16) | type PackageDirectory = {
  type PackageEntry (line 22) | type PackageEntry = PackageFile | PackageDirectory;
  type PackageVersion (line 24) | type PackageVersion = { name: string; tag?: string; time?: Date };
  class Npmjs1sDataSource (line 39) | class Npmjs1sDataSource extends DataSource {
    method getInstance (line 44) | public static getInstance(): Npmjs1sDataSource {
    method getPackageFiles (line 51) | getPackageFiles(packageName: string, version: string): Promise<Package...
    method provideDirectory (line 63) | async provideDirectory(packageName: string, version: string, path: str...
    method provideFile (line 77) | async provideFile(packageName: string, version: string, path: string):...
    method getPackageVersions (line 82) | getPackageVersions(packageName: string): Promise<PackageVersion[]> {
    method transformVersionToTag (line 109) | transformVersionToTag(version: PackageVersion) {
    method provideTags (line 115) | async provideTags(packageName: string, options?: CommonQueryOptions): ...
    method provideTag (line 127) | async provideTag(packageName: string, tagName: string): Promise<Tag | ...
    method provideUserAvatarLink (line 133) | provideUserAvatarLink(user: string): string {

FILE: extensions/github1s/src/adapters/npmjs1s/index.ts
  class Npmjs1sAdapter (line 10) | class Npmjs1sAdapter implements Adapter {
    method resolveDataSource (line 14) | resolveDataSource() {
    method resolveRouterParser (line 18) | resolveRouterParser() {

FILE: extensions/github1s/src/adapters/npmjs1s/router-parser.ts
  class Npmjs1sRouterParser (line 26) | class Npmjs1sRouterParser extends RouterParser {
    method getInstance (line 29) | public static getInstance(): Npmjs1sRouterParser {
    method parsePath (line 36) | parsePath(path: string): Promise<RouterState> {
    method buildTreePath (line 40) | buildTreePath(packageName: string, version: string): string {
    method buildBlobPath (line 44) | buildBlobPath(packageName: string, version: string): string {
    method buildCommitListPath (line 48) | buildCommitListPath(packageName: string): string {
    method buildCommitPath (line 52) | buildCommitPath(packageName: string): string {
    method buildCodeReviewListPath (line 56) | buildCodeReviewListPath(packageName: string): string {
    method buildCodeReviewPath (line 60) | buildCodeReviewPath(packageName: string): string {
    method buildExternalLink (line 64) | buildExternalLink(path: string): string {

FILE: extensions/github1s/src/adapters/ossinsight/constants.ts
  type RankingPeriod (line 6) | enum RankingPeriod {

FILE: extensions/github1s/src/adapters/ossinsight/data-source.ts
  type StructureItem (line 17) | type StructureItem =
  class OSSInsightDataSource (line 29) | class OSSInsightDataSource extends DataSource {
    method getInstance (line 105) | public static getInstance(): OSSInsightDataSource {
    method getStructureItemChildren (line 112) | async getStructureItemChildren(item?: StructureItem) {
    method resolveStructureItem (line 122) | async resolveStructureItem(path: string) {
    method provideDirectory (line 131) | async provideDirectory(repo: string, ref: string, path: string, recurs...
    method provideFile (line 150) | async provideFile(repo: string, ref: string, path: string): Promise<Fi...

FILE: extensions/github1s/src/adapters/ossinsight/index.ts
  class OSSInsightAdapter (line 10) | class OSSInsightAdapter implements Adapter {
    method resolveDataSource (line 14) | async resolveDataSource() {
    method resolveRouterParser (line 18) | async resolveRouterParser() {
    method activateAsDefault (line 22) | activateAsDefault() {}
    method deactivateAsDefault (line 24) | deactivateAsDefault() {}

FILE: extensions/github1s/src/adapters/ossinsight/interfaces.ts
  type RepoItem (line 18) | type RepoItem = {
  type RecentHotCollectionItem (line 37) | type RecentHotCollectionItem = {
  type CollectionItem (line 53) | type CollectionItem = {
  type Last28DaysRankItem (line 68) | type Last28DaysRankItem = {

FILE: extensions/github1s/src/adapters/ossinsight/router-parser.ts
  class OSSInsightRouterParser (line 11) | class OSSInsightRouterParser extends GitHub1sRouterParser {
    method getInstance (line 14) | public static getInstance(): OSSInsightRouterParser {
    method parsePath (line 21) | async parsePath(path: string): Promise<adapterTypes.RouterState> {
    method buildTreePath (line 28) | buildTreePath(repo: string, ref?: string, filePath?: string) {
    method buildBlobPath (line 32) | buildBlobPath(repo: string, ref: string, filePath: string, startLine?:...
    method buildCommitListPath (line 36) | buildCommitListPath(repo: string) {
    method buildCommitPath (line 40) | buildCommitPath(repo: string, commitSha: string) {
    method buildCodeReviewListPath (line 44) | buildCodeReviewListPath(repo: string) {
    method buildCodeReviewPath (line 48) | buildCodeReviewPath(repo: string, codeReviewId: string) {

FILE: extensions/github1s/src/adapters/ossinsight/templates.ts
  type PageType (line 56) | type PageType = RankingPeriod | 'Languages' | 'Collections' | '';

FILE: extensions/github1s/src/adapters/sourcegraph/data-source.ts
  type SupportedPlatform (line 39) | type SupportedPlatform = 'github' | 'gitlab' | 'bitbucket';
  class SourcegraphDataSource (line 41) | class SourcegraphDataSource extends DataSource {
    method getInstance (line 49) | public static getInstance(platform: SupportedPlatform): SourcegraphDat...
    method constructor (line 56) | private constructor(private platform: SupportedPlatform) {
    method buildRepository (line 60) | buildRepository(repo: string) {
    method provideDirectory (line 73) | async provideDirectory(repo: string, ref: string, path: string, recurs...
    method detectPathFileType (line 82) | async detectPathFileType(repo: string, ref: string, path: string) {
    method provideRepository (line 96) | async provideRepository(repo: string) {
    method provideFile (line 103) | async provideFile(repo: string, ref: string, path: string): Promise<Fi...
    method prepareAllRefs (line 121) | async prepareAllRefs(repo: string) {
    method getDefaultBranch (line 129) | private async getDefaultBranch(repo: string) {
    method extractRefPath (line 133) | async extractRefPath(repo: string, refAndPath: string): Promise<{ ref:...
    method provideBranches (line 155) | async provideBranches(repo: string, options?: CommonQueryOptions): Pro...
    method provideTags (line 168) | async provideTags(repo: string, options?: CommonQueryOptions): Promise...
    method provideTextSearchResults (line 181) | async provideTextSearchResults(
    method provideCommits (line 190) | async provideCommits(repo: string, options?: CommitsQueryOptions): Pro...
    method provideCommit (line 205) | async provideCommit(repo: string, ref: string): Promise<Commit | null> {
    method provideCommitChangedFiles (line 209) | async provideCommitChangedFiles(repo: string, ref: string, _options?: ...
    method provideFileBlameRanges (line 213) | async provideFileBlameRanges(repo: string, ref: string, path: string):...
    method provideSymbolDefinitions (line 217) | async provideSymbolDefinitions(
    method provideSymbolReferences (line 228) | async provideSymbolReferences(
    method provideSymbolHover (line 239) | async provideSymbolHover(
    method provideUserAvatarLink (line 250) | provideUserAvatarLink(user: string): string {

FILE: extensions/github1s/src/adapters/sourcegraph/file.ts
  constant FILE_COUNT_LIMIT (line 10) | const FILE_COUNT_LIMIT = 50000;

FILE: extensions/github1s/src/adapters/types.ts
  type Promisable (line 6) | type Promisable<T> = PromiseLike<T> | T;
  type FileType (line 8) | enum FileType {
  type PaginationOptions (line 16) | type PaginationOptions = { page: number; pageSize: number } | { page?: n...
  type CommonQueryOptions (line 17) | type CommonQueryOptions = { query?: string } & PaginationOptions;
  type DirectoryEntry (line 19) | type DirectoryEntry =
  type Directory (line 24) | interface Directory {
  type File (line 30) | interface File {
  type Submodule (line 34) | interface Submodule {
  type SymbolicLink (line 39) | interface SymbolicLink {
  type Branch (line 43) | interface Branch {
  type Tag (line 49) | interface Tag {
  type CommitsQueryOptions (line 55) | type CommitsQueryOptions = { from?: string; author?: string; path?: stri...
  type Commit (line 57) | interface Commit {
  type TextSearchQuery (line 68) | interface TextSearchQuery {
  type TextSearchOptions (line 77) | type TextSearchOptions = { includes?: string[]; excludes?: string[] } & ...
  type TextSearchResults (line 79) | interface TextSearchResults {
  type Position (line 92) | interface Position {
  type Range (line 97) | interface Range {
  type ResourceScope (line 104) | interface ResourceScope {
  type CodeReviewState (line 110) | enum CodeReviewState {
  type CodeReviewsQueryOptions (line 116) | type CodeReviewsQueryOptions = { state?: CodeReviewState; creator?: stri...
  type CodeReview (line 121) | interface CodeReview {
  type FileChangeStatus (line 136) | enum FileChangeStatus {
  type ChangedFile (line 143) | interface ChangedFile {
  type BlameRange (line 151) | interface BlameRange {
  type CodeLocation (line 158) | interface CodeLocation {
  type SymbolDefinitions (line 166) | type SymbolDefinitions = CodeLocation[];
  type SymbolReferences (line 168) | type SymbolReferences = CodeLocation[];
  type SymbolHover (line 170) | type SymbolHover = { markdown: string };
  class DataSource (line 172) | class DataSource {
    method provideDirectory (line 176) | provideDirectory(repo: string, ref: string, path: string, recursive = ...
    method provideFile (line 181) | provideFile(repo: string, ref: string, path: string): Promisable<File ...
    method provideBranches (line 185) | provideBranches(repo: string, options?: CommonQueryOptions): Promisabl...
    method provideBranch (line 189) | provideBranch(repo: string, branchName: string): Promisable<Branch | n...
    method provideTags (line 193) | provideTags(repo: string, options?: CommonQueryOptions): Promisable<Ta...
    method provideTag (line 197) | provideTag(repo: string, tagName: string): Promisable<Tag | null> {
    method provideTextSearchResults (line 202) | provideTextSearchResults(
    method provideCommits (line 214) | provideCommits(repo: string, options?: CommitsQueryOptions): Promisabl...
    method provideCommit (line 220) | provideCommit(repo: string, ref: string): Promisable<(Commit & { files...
    method provideCommitChangedFiles (line 224) | provideCommitChangedFiles(repo: string, ref: string, options?: CommonQ...
    method provideCodeReviews (line 229) | provideCodeReviews(
    method provideCodeReview (line 237) | provideCodeReview(
    method provideCodeReviewChangedFiles (line 244) | provideCodeReviewChangedFiles(repo: string, id: string, options?: Comm...
    method provideFileBlameRanges (line 248) | provideFileBlameRanges(repo: string, ref: string, path: string): Promi...
    method provideSymbolDefinitions (line 252) | provideSymbolDefinitions(
    method provideSymbolReferences (line 263) | provideSymbolReferences(
    method provideSymbolHover (line 274) | provideSymbolHover(
    method provideUserAvatarLink (line 285) | provideUserAvatarLink(user: string): string {
  type PageType (line 290) | enum PageType {
  type RouterState (line 326) | type RouterState = { repo: string; ref: string } & (
  class RouterParser (line 344) | class RouterParser {
    method parsePath (line 346) | parsePath(path: string): Promisable<RouterState> {
    method buildTreePath (line 351) | buildTreePath(repo: string, ref?: string, filePath?: string): Promisab...
    method buildBlobPath (line 358) | buildBlobPath(repo: string, ref: string, filePath: string, startLine?:...
    method buildCommitListPath (line 362) | buildCommitListPath(repo: string): Promisable<string> {
    method buildCommitPath (line 367) | buildCommitPath(repo: string, commitSha: string): Promisable<string> {
    method buildCodeReviewListPath (line 372) | buildCodeReviewListPath(repo: string): Promisable<string> {
    method buildCodeReviewPath (line 377) | buildCodeReviewPath(repo: string, codeReviewId: string): Promisable<st...
    method buildExternalLink (line 382) | buildExternalLink(path: string): Promisable<string> {
  type CodeReviewType (line 387) | enum CodeReviewType {
  type PlatformName (line 394) | enum PlatformName {
  type Adapter (line 402) | interface Adapter {

FILE: extensions/github1s/src/changes/files.ts
  type VSCodeChangedFile (line 15) | interface VSCodeChangedFile {

FILE: extensions/github1s/src/changes/quick-diff.ts
  class GitHub1sQuickDiffProvider (line 68) | class GitHub1sQuickDiffProvider implements vscode.QuickDiffProvider {
    method provideOriginalResource (line 69) | provideOriginalResource(uri: vscode.Uri, _token: vscode.CancellationTo...

FILE: extensions/github1s/src/commands/blame.ts
  class EditorGitBlame (line 176) | class EditorGitBlame {
    method constructor (line 182) | private constructor(private editor: vscode.TextEditor) {
    method getInstance (line 190) | public static getInstance(editor: vscode.TextEditor) {
    method getBlameRanges (line 197) | async getBlameRanges(): Promise<BlameRange[]> {
    method open (line 206) | async open() {
    method selection (line 229) | async selection(lineIndex: number) {
    method close (line 247) | close() {
    method toggle (line 254) | toggle() {

FILE: extensions/github1s/src/extension.ts
  function activate (line 27) | async function activate(context: vscode.ExtensionContext) {

FILE: extensions/github1s/src/helpers/async.ts
  class Barrier (line 7) | class Barrier {
    method constructor (line 12) | constructor(timeout = 0) {
    method isOpen (line 20) | isOpen(): boolean {
    method open (line 24) | open(): void {
    method wait (line 29) | wait(): Promise<boolean> {

FILE: extensions/github1s/src/helpers/context.ts
  constant RECENT_REPOSITORIES (line 22) | const RECENT_REPOSITORIES = 'github1s-recent-repositories';

FILE: extensions/github1s/src/helpers/submodule.ts
  type Submodule (line 9) | interface Submodule {

FILE: extensions/github1s/src/listeners/router/changes.ts
  type NewType (line 11) | type NewType = RouterState;

FILE: extensions/github1s/src/providers/decorations/changed-file.ts
  class GitHub1sChangedFileDecorationProvider (line 79) | class GitHub1sChangedFileDecorationProvider implements FileDecorationPro...
    method constructor (line 86) | private constructor() {}
    method getInstance (line 88) | public static getInstance(): GitHub1sChangedFileDecorationProvider {
    method dispose (line 95) | dispose() {
    method updateDecorations (line 99) | updateDecorations() {
    method provideFileDecoration (line 103) | provideFileDecoration(uri: Uri, _token: CancellationToken): ProviderRe...

FILE: extensions/github1s/src/providers/decorations/source-control.ts
  class GitHub1sSourceControlDecorationProvider (line 26) | class GitHub1sSourceControlDecorationProvider implements FileDecorationP...
    method constructor (line 35) | private constructor() {}
    method getInstance (line 37) | public static getInstance(): GitHub1sSourceControlDecorationProvider {
    method dispose (line 44) | dispose() {
    method updateDecorations (line 48) | updateDecorations() {
    method provideFileDecoration (line 52) | provideFileDecoration(uri: Uri, _token: CancellationToken): ProviderRe...

FILE: extensions/github1s/src/providers/decorations/submodule.ts
  class GitHub1sSubmoduleDecorationProvider (line 20) | class GitHub1sSubmoduleDecorationProvider implements FileDecorationProvi...
    method constructor (line 24) | private constructor() {}
    method getInstance (line 26) | public static getInstance(): GitHub1sSubmoduleDecorationProvider {
    method dispose (line 33) | dispose() {
    method updateDecorations (line 47) | updateDecorations() {
    method provideFileDecoration (line 51) | provideFileDecoration(uri: Uri, _token: CancellationToken): ProviderRe...

FILE: extensions/github1s/src/providers/definition.ts
  class GitHub1sDefinitionProvider (line 11) | class GitHub1sDefinitionProvider implements vscode.DefinitionProvider, v...
    method constructor (line 15) | private constructor() {}
    method getInstance (line 17) | public static getInstance(): GitHub1sDefinitionProvider {
    method dispose (line 24) | dispose() {
    method provideDefinition (line 28) | async provideDefinition(

FILE: extensions/github1s/src/providers/file-search.ts
  class GitHub1sFileSearchProvider (line 23) | class GitHub1sFileSearchProvider implements FileSearchProvider, Disposab...
    method constructor (line 28) | private constructor() {
    method getInstance (line 36) | public static getInstance(): GitHub1sFileSearchProvider {
    method dispose (line 43) | dispose() {
    method loadFilesForCurrentAuthority (line 48) | async loadFilesForCurrentAuthority() {
    method provideFileSearchResults (line 85) | provideFileSearchResults(

FILE: extensions/github1s/src/providers/file-system/index.ts
  class GitHub1sFileSystemProvider (line 39) | class GitHub1sFileSystemProvider implements FileSystemProvider, Disposab...
    method constructor (line 46) | private constructor() {}
    method getInstance (line 48) | public static getInstance(): GitHub1sFileSystemProvider {
    method dispose (line 57) | dispose() {
    method _resolveDataSource (line 61) | private async _resolveDataSource(scheme: string) {
    method populateWithDirectoryEntities (line 66) | public async populateWithDirectoryEntities(base: Uri, entries: adapter...
    method lookup (line 92) | public async lookup(uri: Uri, silent: boolean): Promise<Entry | null> {
    method lookupAsDirectory (line 120) | public async lookupAsDirectory(uri: Uri, silent: boolean): Promise<Dir...
    method lookupAsFile (line 131) | public async lookupAsFile(uri: Uri, silent: boolean): Promise<File | n...
    method watch (line 142) | watch(uri: Uri, options: { recursive: boolean; excludes: string[] }): ...
    method stat (line 146) | stat(uri: Uri): FileStat | Thenable<FileStat> {
    method createDirectory (line 260) | async createDirectory(uri: Uri): Promise<void> {
    method writeFile (line 264) | async writeFile(uri: Uri, content: Uint8Array, options: { create: bool...
    method delete (line 268) | async delete(uri: Uri, options: { recursive: boolean }): Promise<void> {
    method rename (line 272) | async rename(oldUri: Uri, newUri: Uri, options: { overwrite: boolean }...
    method copy (line 276) | async copy?(source: Uri, destination: Uri, options: { overwrite: boole...

FILE: extensions/github1s/src/providers/file-system/types.ts
  class File (line 8) | class File implements FileStat {
    method constructor (line 17) | constructor(
  class Directory (line 31) | class Directory implements FileStat {
    method constructor (line 41) | constructor(
    method getNameTypePairs (line 57) | getNameTypePairs(): [string, FileType][] {
  type Entry (line 65) | type Entry = File | Directory;
  type GitHubRESTEntry (line 68) | interface GitHubRESTEntry {
  type GitHubGraphQLEntry (line 75) | interface GitHubGraphQLEntry {

FILE: extensions/github1s/src/providers/hover.ts
  class GitHub1sHoverProvider (line 25) | class GitHub1sHoverProvider implements vscode.HoverProvider, vscode.Disp...
    method constructor (line 29) | private constructor() {}
    method getInstance (line 31) | public static getInstance(): GitHub1sHoverProvider {
    method dispose (line 38) | dispose() {
    method getSearchBasedHover (line 42) | async getSearchBasedHover(
    method provideHover (line 82) | async provideHover(

FILE: extensions/github1s/src/providers/index.ts
  constant EMPTY_FILE_SCHEME (line 19) | const EMPTY_FILE_SCHEME = 'github1s-empty-file';

FILE: extensions/github1s/src/providers/reference.ts
  class GitHub1sReferenceProvider (line 11) | class GitHub1sReferenceProvider implements vscode.ReferenceProvider, vsc...
    method constructor (line 15) | private constructor() {}
    method getInstance (line 17) | public static getInstance(): GitHub1sReferenceProvider {
    method dispose (line 24) | dispose() {
    method provideReferences (line 28) | async provideReferences(

FILE: extensions/github1s/src/providers/text-search.ts
  class GitHub1sTextSearchProvider (line 16) | class GitHub1sTextSearchProvider implements vscode.TextSearchProvider, v...
    method constructor (line 20) | private constructor() {}
    method getInstance (line 22) | public static getInstance(): GitHub1sTextSearchProvider {
    method dispose (line 29) | dispose() {
    method provideTextSearchResults (line 33) | provideTextSearchResults(

FILE: extensions/github1s/src/repository/branch-tag-manager.ts
  class BranchTagManager (line 10) | class BranchTagManager {
    method getInstance (line 25) | public static getInstance(scheme: string, repo: string) {
    method constructor (line 33) | private constructor(

FILE: extensions/github1s/src/repository/code-review-manager.ts
  class CodeReviewChangedFilesManager (line 11) | class CodeReviewChangedFilesManager {
    method getInstance (line 19) | public static getInstance(scheme: string, repo: string, codeReviewId: ...
    method constructor (line 28) | constructor(
    method setChangedFiles (line 61) | async setChangedFiles(files: ChangedFile[]) {
  class CodeReviewManager (line 67) | class CodeReviewManager {
    method getInstance (line 76) | public static getInstance(scheme: string, repo: string) {
    method constructor (line 84) | private constructor(

FILE: extensions/github1s/src/repository/commit-manager.ts
  class CommitChangedFilesManager (line 11) | class CommitChangedFilesManager {
    method getInstance (line 19) | public static getInstance(scheme: string, repo: string, commitSha: str...
    method constructor (line 28) | constructor(
    method setChangedFiles (line 61) | async setChangedFiles(files: ChangedFile[]) {
  class CommitManager (line 67) | class CommitManager {
    method getInstance (line 77) | public static getInstance(scheme: string, repo: string, from: string, ...
    method constructor (line 85) | private constructor(
    method linkCommitShas (line 93) | private linkCommitShas(previousCommitSha: string | null, nextCommitSha...
    method resolveCommitList (line 109) | private resolveCommitList() {

FILE: extensions/github1s/src/repository/index.ts
  class Repository (line 12) | class Repository {
    method getInstance (line 19) | public static getInstance(scheme: string, repo: string) {
    method constructor (line 27) | private constructor(
    method getBranchList (line 36) | getBranchList(...args: Parameters<BranchTagManager['getBranchList']>) {
    method getBranchItem (line 40) | getBranchItem(...args: Parameters<BranchTagManager['getBranchItem']>) {
    method loadMoreBranches (line 44) | loadMoreBranches(...args: Parameters<BranchTagManager['loadMoreBranche...
    method hasMoreBranches (line 48) | hasMoreBranches(...args: Parameters<BranchTagManager['hasMoreBranches'...
    method getTagList (line 52) | getTagList(...args: Parameters<BranchTagManager['getTagList']>) {
    method getTagItem (line 56) | getTagItem(...args: Parameters<BranchTagManager['getTagItem']>) {
    method loadMoreTags (line 60) | loadMoreTags(...args: Parameters<BranchTagManager['loadMoreTags']>) {
    method hasMoreTags (line 64) | hasMoreTags(...args: Parameters<BranchTagManager['hasMoreTags']>) {
    method getCommitList (line 68) | getCommitList(ref: string = 'HEAD', filePath: string = '', forceUpdate...
    method getCommitItem (line 72) | getCommitItem(ref: string, forceUpdate: boolean = false) {
    method loadMoreCommits (line 76) | loadMoreCommits(ref: string = 'HEAD', filePath: string = '') {
    method hasMoreCommits (line 80) | hasMoreCommits(ref: string = 'HEAD', filePath: string = '') {
    method getCommitChangedFiles (line 84) | getCommitChangedFiles(ref: string, forceUpdate: boolean = false) {
    method loadMoreCommitChangedFiles (line 88) | loadMoreCommitChangedFiles(ref: string) {
    method hasMoreCommitChangedFiles (line 92) | hasMoreCommitChangedFiles(ref: string) {
    method getFileLatestCommit (line 96) | getFileLatestCommit(ref: string, filePath: string) {
    method getPreviousCommit (line 100) | getPreviousCommit(ref: string, filePath: string) {
    method getNextCommit (line 104) | getNextCommit(ref: string, filePath: string) {
    method getCodeReviewList (line 108) | getCodeReviewList(...args: Parameters<CodeReviewManager['getList']>) {
    method getCodeReviewItem (line 112) | getCodeReviewItem(...args: Parameters<CodeReviewManager['getItem']>) {
    method loadMoreCodeReviews (line 116) | loadMoreCodeReviews(...args: Parameters<CodeReviewManager['loadMore']>) {
    method hasMoreCodeReviews (line 120) | hasMoreCodeReviews(...args: Parameters<CodeReviewManager['hasMore']>) {
    method getCodeReviewChangedFiles (line 124) | getCodeReviewChangedFiles(...args: Parameters<CodeReviewManager['getCh...
    method loadMoreCodeReviewChangedFiles (line 128) | loadMoreCodeReviewChangedFiles(...args: Parameters<CodeReviewManager['...
    method hasMoreCodeReviewChangedFiles (line 132) | hasMoreCodeReviewChangedFiles(...args: Parameters<CodeReviewManager['h...
    method getFileBlameRanges (line 136) | async getFileBlameRanges(ref: string, path: string) {

FILE: extensions/github1s/src/router/events.ts
  class EventEmitter (line 6) | class EventEmitter<T> {
    method addListener (line 9) | public addListener(listener) {
    method removeListener (line 14) | public removeListener(listener) {
    method notifyListeners (line 19) | public notifyListeners(...args) {

FILE: extensions/github1s/src/router/index.ts
  type UrlManager (line 13) | interface UrlManager {
  class Router (line 19) | class Router extends EventEmitter<RouterState> {
    method getInstance (line 29) | public static getInstance() {
    method initialize (line 37) | async initialize(urlManager: UrlManager) {
    method getState (line 59) | public async getState(): Promise<RouterState> {
    method getAuthority (line 65) | public async getAuthority(): Promise<string> {
    method getHistory (line 70) | public async getHistory() {
    method getPath (line 75) | public async getPath() {
    method push (line 82) | public async push(path: string) {
    method replace (line 89) | public async replace(path: string) {
    method resolveParser (line 95) | public async resolveParser(): Promise<RouterParser> {
    method href (line 100) | public async href(): Promise<string | undefined> {

FILE: extensions/github1s/src/views/code-review-list.ts
  type CodeReviewState (line 17) | enum CodeReviewState {
  type CodeReviewTreeItem (line 75) | interface CodeReviewTreeItem extends vscode.TreeItem {
  class CodeReviewTreeDataProvider (line 100) | class CodeReviewTreeDataProvider implements vscode.TreeDataProvider<vsco...
    method updateTree (line 108) | public updateTree(forceUpdate = true) {
    method loadMoreCodeReviews (line 113) | public async loadMoreCodeReviews() {
    method loadMoreChangedFiles (line 124) | public async loadMoreChangedFiles(codeReviewId: string) {
    method getCodeReviewItems (line 135) | async getCodeReviewItems(): Promise<vscode.TreeItem[]> {
    method getCodeReviewFileItems (line 167) | async getCodeReviewFileItems(codeReview: adapterTypes.CodeReview): Pro...
    method getTreeItem (line 195) | getTreeItem(element: vscode.TreeItem): vscode.TreeItem | Thenable<vsco...
    method getChildren (line 199) | getChildren(element?: vscode.TreeItem): vscode.ProviderResult<vscode.T...

FILE: extensions/github1s/src/views/commit-list.ts
  type CommitTreeItem (line 30) | interface CommitTreeItem extends vscode.TreeItem {
  class CommitTreeDataProvider (line 34) | class CommitTreeDataProvider implements vscode.TreeDataProvider<vscode.T...
    method resolveFilePath (line 63) | async resolveFilePath() {
    method updateTree (line 67) | public updateTree(forceUpdate = true) {
    method loadMoreCommits (line 72) | public async loadMoreCommits() {
    method loadMoreChangedFiles (line 84) | public async loadMoreChangedFiles(commitSha: string) {
    method getCommitItems (line 95) | async getCommitItems(): Promise<vscode.TreeItem[]> {
    method getCommitFileItems (line 128) | async getCommitFileItems(commit: adapterTypes.Commit): Promise<vscode....
    method getTreeItem (line 153) | getTreeItem(element: vscode.TreeItem): vscode.TreeItem | Thenable<vsco...
    method getChildren (line 157) | getChildren(element?: vscode.TreeItem): vscode.ProviderResult<vscode.T...
  class FileHistoryTreeDataProvider (line 166) | class FileHistoryTreeDataProvider extends CommitTreeDataProvider {
    method resolveFilePath (line 190) | async resolveFilePath() {
    method getCommitItems (line 196) | async getCommitItems() {

FILE: extensions/github1s/src/vscode.proposed.d.ts
  type AuthenticationProvidersChangeEvent (line 23) | interface AuthenticationProvidersChangeEvent {
  type AuthenticationProviderAuthenticationSessionsChangeEvent (line 38) | interface AuthenticationProviderAuthenticationSessionsChangeEvent {
  type AuthenticationProvider (line 60) | interface AuthenticationProvider {
  type RemoteAuthorityResolverContext (line 176) | interface RemoteAuthorityResolverContext {
  class ResolvedAuthority (line 180) | class ResolvedAuthority {
  type ResolvedOptions (line 188) | interface ResolvedOptions {
  type TunnelOptions (line 192) | interface TunnelOptions {
  type TunnelDescription (line 199) | interface TunnelDescription {
  type Tunnel (line 205) | interface Tunnel extends TunnelDescription {
  type TunnelInformation (line 215) | interface TunnelInformation {
  type TunnelCreationOptions (line 224) | interface TunnelCreationOptions {
  type ResolverResult (line 231) | type ResolverResult = ResolvedAuthority & ResolvedOptions & TunnelInform...
  class RemoteAuthorityResolverError (line 233) | class RemoteAuthorityResolverError extends Error {
  type RemoteAuthorityResolver (line 240) | interface RemoteAuthorityResolver {
  type ResourceLabelFormatter (line 284) | interface ResourceLabelFormatter {
  type ResourceLabelFormatting (line 290) | interface ResourceLabelFormatting {
  type WebviewEditorInset (line 314) | interface WebviewEditorInset {
  type FileSystemProvider (line 336) | interface FileSystemProvider {
  type TextSearchQuery (line 350) | interface TextSearchQuery {
  type GlobString (line 382) | type GlobString = string;
  type SearchOptions (line 387) | interface SearchOptions {
  type TextSearchPreviewOptions (line 426) | interface TextSearchPreviewOptions {
  type TextSearchOptions (line 442) | interface TextSearchOptions extends SearchOptions {
  type TextSearchComplete (line 478) | interface TextSearchComplete {
  type TextSearchMatchPreview (line 492) | interface TextSearchMatchPreview {
  type TextSearchMatch (line 508) | interface TextSearchMatch {
  type TextSearchContext (line 528) | interface TextSearchContext {
  type TextSearchResult (line 546) | type TextSearchResult = TextSearchMatch | TextSearchContext;
  type TextSearchProvider (line 551) | interface TextSearchProvider {
  type FileSearchQuery (line 574) | interface FileSearchQuery {
  type FileSearchOptions (line 584) | interface FileSearchOptions extends SearchOptions {
  type FileSearchProvider (line 606) | interface FileSearchProvider {
  type FindTextInFilesOptions (line 651) | interface FindTextInFilesOptions {
  type LineChange (line 753) | interface LineChange {
  type DebugProtocolVariableContainer (line 790) | interface DebugProtocolVariableContainer {
  type DebugProtocolVariable (line 798) | interface DebugProtocolVariable {
  type SourceControlInputBoxValidationType (line 809) | enum SourceControlInputBoxValidationType {
  type SourceControlInputBoxValidation (line 826) | interface SourceControlInputBoxValidation {
  type SourceControlInputBox (line 841) | interface SourceControlInputBox {
  type SourceControl (line 856) | interface SourceControl {
  type TerminalDataWriteEvent (line 872) | interface TerminalDataWriteEvent {
  type TerminalDimensionsChangeEvent (line 899) | interface TerminalDimensionsChangeEvent {
  type Terminal (line 917) | interface Terminal {
  type DocumentFilter (line 930) | interface DocumentFilter {
  type OnEnterRule (line 937) | interface OnEnterRule {
  type TreeView (line 946) | interface TreeView<T> extends Disposable {
  type TaskPresentationOptions (line 955) | interface TaskPresentationOptions {
  type StatusBarItemOptions (line 969) | interface StatusBarItemOptions {
  type CustomTextEditorProvider (line 1018) | interface CustomTextEditorProvider {
  type QuickPick (line 1042) | interface QuickPick<T extends QuickPickItem> extends QuickInput {
  type CellKind (line 1053) | enum CellKind {
  type CellOutputKind (line 1058) | enum CellOutputKind {
  type CellStreamOutput (line 1064) | interface CellStreamOutput {
  type CellErrorOutput (line 1069) | interface CellErrorOutput {
  type NotebookCellOutputMetadata (line 1085) | interface NotebookCellOutputMetadata {
  type CellDisplayOutput (line 1092) | interface CellDisplayOutput {
  type CellOutput (line 1116) | type CellOutput = CellStreamOutput | CellErrorOutput | CellDisplayOutput;
  class NotebookCellOutputItem (line 1118) | class NotebookCellOutputItem {
  class NotebookCellOutput (line 1127) | class NotebookCellOutput {
  type NotebookCellRunState (line 1137) | enum NotebookCellRunState {
  type NotebookRunState (line 1144) | enum NotebookRunState {
  type NotebookCellMetadata (line 1149) | interface NotebookCellMetadata {
  type NotebookCell (line 1214) | interface NotebookCell {
  type NotebookDocumentMetadata (line 1225) | interface NotebookDocumentMetadata {
  type NotebookDocumentContentOptions (line 1275) | interface NotebookDocumentContentOptions {
  type NotebookDocument (line 1289) | interface NotebookDocument {
  type NotebookConcatTextDocument (line 1302) | interface NotebookConcatTextDocument {
  type WorkspaceEdit (line 1321) | interface WorkspaceEdit {
  type NotebookEditorEdit (line 1344) | interface NotebookEditorEdit {
  type NotebookCellRange (line 1351) | interface NotebookCellRange {
  type NotebookEditorRevealType (line 1359) | enum NotebookEditorRevealType {
  type NotebookEditor (line 1375) | interface NotebookEditor {
  type NotebookOutputSelector (line 1441) | interface NotebookOutputSelector {
  type NotebookRenderRequest (line 1445) | interface NotebookRenderRequest {
  type NotebookDocumentMetadataChangeEvent (line 1451) | interface NotebookDocumentMetadataChangeEvent {
  type NotebookCellsChangeData (line 1455) | interface NotebookCellsChangeData {
  type NotebookCellsChangeEvent (line 1462) | interface NotebookCellsChangeEvent {
  type NotebookCellMoveEvent (line 1470) | interface NotebookCellMoveEvent {
  type NotebookCellOutputsChangeEvent (line 1479) | interface NotebookCellOutputsChangeEvent {
  type NotebookCellLanguageChangeEvent (line 1487) | interface NotebookCellLanguageChangeEvent {
  type NotebookCellMetadataChangeEvent (line 1496) | interface NotebookCellMetadataChangeEvent {
  type NotebookEditorSelectionChangeEvent (line 1501) | interface NotebookEditorSelectionChangeEvent {
  type NotebookEditorVisibleRangesChangeEvent (line 1506) | interface NotebookEditorVisibleRangesChangeEvent {
  type NotebookCellData (line 1511) | interface NotebookCellData {
  type NotebookData (line 1519) | interface NotebookData {
  type NotebookDocumentContentChangeEvent (line 1525) | interface NotebookDocumentContentChangeEvent {
  type NotebookDocumentEditEvent (line 1532) | interface NotebookDocumentEditEvent {
  type NotebookDocumentBackup (line 1564) | interface NotebookDocumentBackup {
  type NotebookDocumentBackupContext (line 1581) | interface NotebookDocumentBackupContext {
  type NotebookDocumentOpenContext (line 1585) | interface NotebookDocumentOpenContext {
  type NotebookCommunication (line 1593) | interface NotebookCommunication {
  type NotebookContentProvider (line 1621) | interface NotebookContentProvider {
  type NotebookKernel (line 1641) | interface NotebookKernel {
  type NotebookFilenamePattern (line 1654) | type NotebookFilenamePattern = GlobPattern | { include: GlobPattern; exc...
  type NotebookDocumentFilter (line 1656) | interface NotebookDocumentFilter {
  type NotebookKernelProvider (line 1661) | interface NotebookKernelProvider<T extends NotebookKernel = NotebookKern...
  type NotebookCellStatusBarAlignment (line 1675) | enum NotebookCellStatusBarAlignment {
  type NotebookCellStatusBarItem (line 1687) | interface NotebookCellStatusBarItem {
  type NotebookDecorationRenderOptions (line 1700) | interface NotebookDecorationRenderOptions {
  type NotebookEditorDecorationType (line 1706) | interface NotebookEditorDecorationType {
  type NotebookDocumentShowOptions (line 1711) | interface NotebookDocumentShowOptions {
  type CompletionItem (line 1806) | interface CompletionItem {
  type CompletionItemLabel (line 1813) | interface CompletionItemLabel {
  class TimelineItem (line 1839) | class TimelineItem {
  type TimelineChangeEvent (line 1909) | interface TimelineChangeEvent {
  type Timeline (line 1921) | interface Timeline {
  type TimelineOptions (line 1936) | interface TimelineOptions {
  type TimelineProvider (line 1949) | interface TimelineProvider {
  type StandardTokenType (line 1997) | enum StandardTokenType {
  type TokenInformation (line 2004) | interface TokenInformation {
  type ExtensionRuntime (line 2020) | enum ExtensionRuntime {
  type ExtensionContext (line 2031) | interface ExtensionContext {
  type TextDocument (line 2039) | interface TextDocument {
  type TestObserver (line 2081) | interface TestObserver {
  type TestChangeEvent (line 2111) | interface TestChangeEvent {
  type TestHierarchy (line 2137) | interface TestHierarchy<T extends TestItem> {
  type TestProvider (line 2184) | interface TestProvider<T extends TestItem = TestItem> {
  type TestRunOptions (line 2213) | interface TestRunOptions<T extends TestItem = TestItem> {
  type TestItem (line 2230) | interface TestItem {
  type TestRunState (line 2272) | enum TestRunState {
  class TestState (line 2293) | class TestState {
  type TestMessageSeverity (line 2321) | enum TestMessageSeverity {
  type TestMessage (line 2332) | interface TestMessage {
  type StatusBarItem (line 2366) | interface StatusBarItem {

FILE: functions/api/github-auth-callback.ts
  constant MISSING_CODE_ERROR (line 33) | const MISSING_CODE_ERROR = {
  constant UNKNOWN_ERROR (line 37) | const UNKNOWN_ERROR = {

FILE: functions/api/gitlab-auth-callback.ts
  constant AUTH_REDIRECT_URI (line 6) | const AUTH_REDIRECT_URI = 'https://auth.gitlab1s.com/api/gitlab-auth-cal...
  constant MISSING_CODE_ERROR (line 35) | const MISSING_CODE_ERROR = {
  constant UNKNOWN_ERROR (line 39) | const UNKNOWN_ERROR = {

FILE: scripts/utils.js
  constant PROJECT_ROOT (line 4) | const PROJECT_ROOT = path.join(import.meta.dirname, '..');

FILE: scripts/webpack.js
  constant APP_ROOT (line 5) | const APP_ROOT = path.join(import.meta.dirname, '..');

FILE: src/config.ts
  type Platform (line 55) | enum Platform {

FILE: src/github-auth.ts
  constant CLIENT_ID (line 6) | const CLIENT_ID = 'eae6621348403ea49103';
  constant GITHUB_ORIGIN (line 7) | const GITHUB_ORIGIN = 'https://github.com';
  constant GITHUB_AUTH_URL (line 8) | const GITHUB_AUTH_URL = `${GITHUB_ORIGIN}/login/oauth/authorize?scope=re...
  constant OPEN_WINDOW_FEATURES (line 9) | const OPEN_WINDOW_FEATURES =
  constant AUTH_PAGE_ORIGIN (line 11) | const AUTH_PAGE_ORIGIN = 'https://auth.github1s.com';

FILE: src/gitlab-auth.ts
  constant GITLAB_ORIGIN (line 8) | const GITLAB_ORIGIN = 'https://gitlab.com';
  constant AUTH_PAGE_ORIGIN (line 9) | const AUTH_PAGE_ORIGIN = 'https://auth.gitlab1s.com';
  constant AUTH_REDIRECT_URI (line 10) | const AUTH_REDIRECT_URI = 'https://auth.gitlab1s.com/api/gitlab-auth-cal...
  constant CLIENT_ID (line 11) | const CLIENT_ID = '5ef142320efe9d2e8caeb0185771bb126d3035dc0a325c6ad5bab...
  constant OPEN_WINDOW_FEATURES (line 12) | const OPEN_WINDOW_FEATURES =

FILE: src/index.ts
  method onWorkbenchReady (line 51) | onWorkbenchReady() {

FILE: src/notification.ts
  constant NOTIFICATION_STORAGE_KEY (line 8) | const NOTIFICATION_STORAGE_KEY = 'GITHUB1S_NOTIFICATION';
  constant NOTIFICATION_STORAGE_VALUE (line 10) | const NOTIFICATION_STORAGE_VALUE = '20210212';

FILE: tests/__tests__/index.test.ts
  constant BASE_URL (line 16) | const BASE_URL = 'http://localhost:8080';

FILE: tests/typings.d.ts
  type Matchers (line 5) | interface Matchers<R> {

FILE: vscode-web/scripts/utils.js
  constant PROJECT_ROOT (line 5) | const PROJECT_ROOT = path.join(import.meta.dirname, '..');

FILE: vscode-web/src/vs/base/common/network.ts
  function matchesScheme (line 161) | function matchesScheme(target: URI | string, scheme: string): boolean {
  function matchesSomeScheme (line 169) | function matchesSomeScheme(target: URI | string, ...schemes: string[]): ...
  class RemoteAuthoritiesImpl (line 176) | class RemoteAuthoritiesImpl {
    method setPreferredWebSchema (line 184) | setPreferredWebSchema(schema: 'http' | 'https') {
    method setDelegate (line 188) | setDelegate(delegate: (uri: URI) => URI): void {
    method setServerRootPath (line 192) | setServerRootPath(product: { quality?: string; commit?: string }, serv...
    method getServerRootPath (line 196) | getServerRootPath(): string {
    method _remoteResourcesPath (line 200) | private get _remoteResourcesPath(): string {
    method set (line 204) | set(authority: string, host: string, port: number): void {
    method setConnectionToken (line 209) | setConnectionToken(authority: string, connectionToken: string): void {
    method getPreferredWebSchema (line 213) | getPreferredWebSchema(): 'http' | 'https' {
    method rewrite (line 217) | rewrite(uri: URI): URI {
  function getServerProductSegment (line 248) | function getServerProductSegment(product: { quality?: string; commit?: s...
  type AppResourcePath (line 255) | type AppResourcePath = (
  constant VSCODE_AUTHORITY (line 271) | const VSCODE_AUTHORITY = 'vscode-app';
  class FileAccessImpl (line 273) | class FileAccessImpl {
    method asBrowserUri (line 283) | asBrowserUri(resourcePath: AppResourcePath | ''): URI {
    method uriToBrowserUri (line 294) | uriToBrowserUri(uri: URI): URI {
    method asFileUri (line 330) | asFileUri(resourcePath: AppResourcePath | ''): URI {
    method uriToFileUri (line 339) | uriToFileUri(uri: URI): URI {
    method toUri (line 356) | private toUri(uriOrModule: URI | string): URI {
  function getHeadersFromQuery (line 403) | function getHeadersFromQuery(url: string | URI | URL): Record<string, st...
  function addSearchParam (line 423) | function addSearchParam(urlOrSearch: URLSearchParams | Record<string, st...

FILE: vscode-web/src/vs/workbench/browser/parts/activitybar/activitybarPart.ts
  class ActivitybarPart (line 42) | class ActivitybarPart extends Part {
    method constructor (line 62) | constructor(
    method createCompositeBar (line 72) | private createCompositeBar(): PaneCompositeBar {
    method createContentArea (line 102) | protected override createContentArea(parent: HTMLElement): HTMLElement {
    method getPinnedPaneCompositeIds (line 113) | getPinnedPaneCompositeIds(): string[] {
    method getVisiblePaneCompositeIds (line 117) | getVisiblePaneCompositeIds(): string[] {
    method getPaneCompositeIds (line 121) | getPaneCompositeIds(): string[] {
    method focus (line 125) | focus(): void {
    method updateStyles (line 129) | override updateStyles(): void {
    method show (line 141) | show(focus?: boolean): void {
    method hide (line 160) | hide(): void {
    method layout (line 172) | override layout(width: number, height: number): void {
    method toJSON (line 186) | toJSON(): object {
  class ActivityBarCompositeBar (line 193) | class ActivityBarCompositeBar extends PaneCompositeBar {
    method constructor (line 204) | constructor(
    method fillContextMenuActions (line 244) | private fillContextMenuActions(actions: IAction[], e?: MouseEvent | Ge...
    method uninstallMenubar (line 266) | private uninstallMenubar() {
    method installMenubar (line 277) | private installMenubar() {
    method registerKeyboardNavigationListeners (line 300) | private registerKeyboardNavigationListeners(): void {
    method create (line 336) | override create(parent: HTMLElement): HTMLElement {
    method layout (line 379) | override layout(width: number, height: number): void {
    method getActivityBarContextMenuActions (line 397) | getActivityBarContextMenuActions(): IAction[] {
  method constructor (line 415) | constructor() {
  method run (line 434) | run(accessor: ServicesAccessor): void {
  method constructor (line 441) | constructor() {
  method run (line 460) | run(accessor: ServicesAccessor): void {
  method constructor (line 467) | constructor() {
  method run (line 486) | run(accessor: ServicesAccessor): void {
  method constructor (line 493) | constructor() {
  method run (line 512) | run(accessor: ServicesAccessor): void {
  method constructor (line 537) | constructor() {
  method constructor (line 548) | constructor() {
  method constructor (line 560) | constructor() {
  method run (line 569) | async run(accessor: ServicesAccessor): Promise<void> {

FILE: vscode-web/src/vs/workbench/browser/web.main.ts
  class BrowserMain (line 102) | class BrowserMain extends Disposable {
    method constructor (line 107) | constructor(
    method init (line 116) | private init(): void {
    method open (line 122) | async open(): Promise<IWorkbench> {
    method registerListeners (line 250) | private registerListeners(workbench: Workbench): void {
    method initServices (line 257) | private async initServices(): Promise<{ serviceCollection: ServiceColl...
    method initializeUserData (line 447) | private async initializeUserData(userDataInitializationService: UserDa...
    method registerIndexedDBFileSystemProviders (line 462) | private async registerIndexedDBFileSystemProviders(environmentService:...
    method registerDeveloperActions (line 508) | private registerDeveloperActions(provider: IndexedDBFileSystemProvider...
    method createStorageService (line 547) | private async createStorageService(workspace: IAnyWorkspaceIdentifier,...
    method createWorkspaceService (line 565) | private async createWorkspaceService(workspace: IAnyWorkspaceIdentifie...
    method getCurrentProfile (line 595) | private async getCurrentProfile(workspace: IAnyWorkspaceIdentifier, us...
    method resolveWorkspace (line 607) | private resolveWorkspace(): IAnyWorkspaceIdentifier {

FILE: vscode-web/src/vs/workbench/contrib/files/browser/editors/fileEditorInput.ts
  type ForceOpenAs (line 30) | const enum ForceOpenAs {
  class FileEditorInput (line 39) | class FileEditorInput extends AbstractTextResourceEditorInput implements...
    method typeId (line 41) | override get typeId(): string {
    method editorId (line 45) | override get editorId(): string | undefined {
    method capabilities (line 49) | override get capabilities(): EditorInputCapabilities {
    method constructor (line 86) | constructor(
    method onDidCreateTextFileModel (line 138) | private onDidCreateTextFileModel(model: ITextFileEditorModel): void {
    method registerModelListeners (line 149) | private registerModelListeners(model: ITextFileEditorModel): void {
    method getName (line 170) | override getName(): string {
    method setPreferredName (line 174) | setPreferredName(name: string): void {
    method allowLabelOverride (line 186) | private allowLabelOverride(): boolean {
    method getPreferredName (line 196) | getPreferredName(): string | undefined {
    method isReadonly (line 200) | override isReadonly(): boolean | IMarkdownString {
    method getDescription (line 204) | override getDescription(verbosity?: Verbosity): string | undefined {
    method setPreferredDescription (line 208) | setPreferredDescription(description: string): void {
    method getPreferredDescription (line 220) | getPreferredDescription(): string | undefined {
    method getTitle (line 224) | override getTitle(verbosity?: Verbosity): string {
    method getPreferredTitle (line 235) | protected getPreferredTitle(): string | undefined {
    method getEncoding (line 247) | getEncoding(): string | undefined {
    method getPreferredEncoding (line 255) | getPreferredEncoding(): string | undefined {
    method setEncoding (line 259) | async setEncoding(encoding: string, mode: EncodingMode): Promise<void> {
    method setPreferredEncoding (line 265) | setPreferredEncoding(encoding: string): void {
    method getLanguageId (line 272) | getLanguageId(): string | undefined {
    method getPreferredLanguageId (line 280) | getPreferredLanguageId(): string | undefined {
    method setLanguageId (line 284) | setLanguageId(languageId: string, source?: string): void {
    method setPreferredLanguageId (line 290) | setPreferredLanguageId(languageId: string): void {
    method setPreferredContents (line 297) | setPreferredContents(contents: string): void {
    method setForceOpenAsText (line 304) | setForceOpenAsText(): void {
    method setForceOpenAsBinary (line 308) | setForceOpenAsBinary(): void {
    method isDirty (line 312) | override isDirty(): boolean {
    method isSaving (line 316) | override isSaving(): boolean {
    method prefersEditorPane (line 333) | override prefersEditorPane<T extends IEditorDescriptor<IEditorPane>>(e...
    method resolve (line 341) | override resolve(options?: IFileEditorInputOptions): Promise<ITextFile...
    method doResolveAsText (line 352) | private async doResolveAsText(options?: IFileEditorInputOptions): Prom...
    method doResolveAsBinary (line 403) | private async doResolveAsBinary(): Promise<BinaryEditorModel> {
    method isResolved (line 410) | isResolved(): boolean {
    method rename (line 414) | override async rename(group: GroupIdentifier, target: URI): Promise<IM...
    method toUntyped (line 426) | override toUntyped(options?: IUntypedEditorOptions): ITextResourceEdit...
    method matches (line 456) | override matches(otherInput: EditorInput | IUntypedEditorInput): boole...
    method dispose (line 472) | override dispose(): void {
    method disposeModelReference (line 483) | private disposeModelReference(): void {

FILE: vscode-web/src/vs/workbench/services/extensionManagement/browser/builtinExtensionsScannerService.ts
  type IBundledExtension (line 20) | interface IBundledExtension {
  class BuiltinExtensionsScannerService (line 28) | class BuiltinExtensionsScannerService implements IBuiltinExtensionsScann...
    method constructor (line 36) | constructor(
    method scanBuiltinExtensions (line 97) | async scanBuiltinExtensions(): Promise<IExtension[]> {
    method localizeManifest (line 101) | private async localizeManifest(extensionId: string, manifest: IExtensi...

FILE: vscode-web/src/vs/workbench/services/label/common/labelService.ts
  function hasDriveLetterIgnorePlatform (line 82) | function hasDriveLetterIgnorePlatform(path: string): boolean {
  class ResourceLabelFormattersHandler (line 86) | class ResourceLabelFormattersHandler implements IWorkbenchContribution {
    method constructor (line 90) | constructor(@ILabelService labelService: ILabelService) {
  constant FORMATTER_CACHE_SIZE (line 125) | const FORMATTER_CACHE_SIZE = 50;
  type IStoredFormatters (line 127) | interface IStoredFormatters {
  class LabelService (line 132) | class LabelService extends Disposable implements ILabelService {
    method constructor (line 146) | constructor(
    method resolveRemoteEnvironment (line 171) | private async resolveRemoteEnvironment(): Promise<void> {
    method findFormatting (line 181) | findFormatting(resource: URI): ResourceLabelFormatting | undefined {
    method getUriLabel (line 210) | getUriLabel(resource: URI, options: { relative?: boolean; noPrefix?: b...
    method doGetUriLabel (line 232) | private doGetUriLabel(resource: URI, formatting?: ResourceLabelFormatt...
    method getUriBasenameLabel (line 293) | getUriBasenameLabel(resource: URI): string {
    method getWorkspaceLabel (line 309) | getWorkspaceLabel(workspace: IWorkspace | IWorkspaceIdentifier | ISing...
    method doGetWorkspaceLabel (line 343) | private doGetWorkspaceLabel(workspaceUri: URI, options?: { verbose: Ve...
    method doGetSingleFolderWorkspaceLabel (line 382) | private doGetSingleFolderWorkspaceLabel(folderUri: URI, options?: { ve...
    method getSeparator (line 402) | getSeparator(scheme: string, authority?: string): '/' | '\\' {
    method getHostLabel (line 408) | getHostLabel(scheme: string, authority?: string): string {
    method getHostTooltip (line 414) | getHostTooltip(scheme: string, authority?: string): string | undefined {
    method registerCachedFormatter (line 420) | registerCachedFormatter(formatter: ResourceLabelFormatter): IDisposable {
    method registerFormatter (line 442) | registerFormatter(formatter: ResourceLabelFormatter): IDisposable {
    method formatUri (line 454) | private formatUri(resource: URI, formatting: ResourceLabelFormatting, ...
    method adjustPathSeparators (line 500) | private adjustPathSeparators(label: string, separator: '/' | '\\' | ''...
    method appendWorkspaceSuffix (line 504) | private appendWorkspaceSuffix(label: string, uri: URI): string {

FILE: vscode-web/src/vs/workbench/services/textfile/browser/textFileService.ts
  method constructor (line 58) | constructor(
  method provideDecorations (line 92) | private provideDecorations(): void {
  method encoding (line 177) | get encoding(): EncodingOracle {
  method read (line 185) | async read(resource: URI, options?: IReadTextFileOptions): Promise<IText...
  method readStream (line 203) | async readStream(resource: URI, options?: IReadTextFileOptions): Promise...
  method doRead (line 213) | private async doRead(resource: URI, options?: IReadTextFileOptions & { p...
  method create (line 257) | async create(operations: { resource: URI; value?: string | ITextSnapshot...
  method write (line 270) | async write(resource: URI, value: string | ITextSnapshot, options?: IWri...
  method getEncodedReadable (line 286) | async getEncodedReadable(resource: URI | undefined, value?: string | ITe...
  method getDecodedStream (line 304) | async getDecodedStream(resource: URI | undefined, value: VSBufferReadabl...
  method doGetDecodedStream (line 308) | private doGetDecodedStream(resource: URI | undefined, stream: VSBufferRe...
  method getEncoding (line 323) | getEncoding(resource: URI): string {
  method resolveDecoding (line 328) | async resolveDecoding(resource: URI | undefined, options?: IReadTextFile...
  method validateDetectedEncoding (line 340) | async validateDetectedEncoding(resource: URI | undefined, detectedEncodi...
  method resolveEncoding (line 346) | resolveEncoding(resource: URI | undefined, options?: IWriteTextFileOptio...
  method save (line 355) | async save(resource: URI, options?: ITextFileSaveOptions): Promise<URI |...
  method saveAs (line 391) | async saveAs(source: URI, target?: URI, options?: ITextFileSaveAsOptions...
  method doSaveAs (line 440) | private async doSaveAs(source: URI, target: URI, options?: ITextFileSave...
  method doSaveAsTextFile (line 504) | private async doSaveAsTextFile(sourceModel: IResolvedTextEditorModel | I...
  method confirmOverwrite (line 620) | private async confirmOverwrite(resource: URI): Promise<boolean> {
  method confirmMakeWriteable (line 631) | private async confirmMakeWriteable(resource: URI): Promise<boolean> {
  method suggestSavePath (line 642) | private async suggestSavePath(resource: URI): Promise<URI> {
  method suggestFilename (line 693) | suggestFilename(languageId: string, untitledName: string) {
  method revert (line 727) | async revert(resource: URI, options?: IRevertOptions): Promise<void> {
  method isDirty (line 750) | isDirty(resource: URI): boolean {
  type IEncodingOverride (line 762) | interface IEncodingOverride {
  class EncodingOracle (line 768) | class EncodingOracle extends Disposable implements IResourceEncodings {
    method encodingOverrides (line 771) | protected get encodingOverrides(): IEncodingOverride[] { return this._...
    method encodingOverrides (line 772) | protected set encodingOverrides(value: IEncodingOverride[]) { this._en...
    method constructor (line 774) | constructor(
    method registerListeners (line 787) | private registerListeners(): void {
    method getDefaultEncodingOverrides (line 793) | private getDefaultEncodingOverrides(): IEncodingOverride[] {
    method getWriteEncoding (line 811) | async getWriteEncoding(resource: URI | undefined, options?: IWriteText...
    method getPreferredWriteEncoding (line 817) | async getPreferredWriteEncoding(resource: URI | undefined, preferredEn...
    method getPreferredReadEncoding (line 826) | async getPreferredReadEncoding(resource: URI | undefined, options?: IR...
    method getUnvalidatedEncodingForResource (line 856) | getUnvalidatedEncodingForResource(resource: URI | undefined, preferred...
    method getValidatedEncodingForResource (line 871) | private async getValidatedEncodingForResource(resource: URI | undefine...
    method getEncodingOverride (line 880) | private getEncodingOverride(resource: URI | undefined): string | undef...
Condensed preview — 240 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,208K chars).
[
  {
    "path": ".devcontainer/Dockerfile",
    "chars": 845,
    "preview": "# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.158.0/containers/typescript-no"
  },
  {
    "path": ".devcontainer/devcontainer.json",
    "chars": 1011,
    "preview": "// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:\n// https://github.co"
  },
  {
    "path": ".editorconfig",
    "chars": 359,
    "preview": "# EditorConfig is awesome: https://EditorConfig.org\n\n# top-most EditorConfig file\nroot = true\n\n# Tab indentation\n[*]\nind"
  },
  {
    "path": ".github/config.yml",
    "chars": 994,
    "preview": "# Configuration for welcome - https://github.com/behaviorbot/welcome\n\n# Configuration for new-issue-welcome - https://gi"
  },
  {
    "path": ".github/workflows/build.yml",
    "chars": 659,
    "preview": "name: Build & Test\n\non:\n  push:\n    branches:\n      - master\n  pull_request:\n    branches:\n      - master\n\njobs:\n  build"
  },
  {
    "path": ".github/workflows/codacy-analysis.yaml",
    "chars": 1333,
    "preview": "name: Codacy Security Scan\n\non:\n  push:\n    branches: ['master', 'main']\n  pull_request:\n    branches: ['master', 'main'"
  },
  {
    "path": ".github/workflows/test-wtih-vscode-build.yml",
    "chars": 742,
    "preview": "name: Build & Test with VS Code build\n\non:\n  push:\n    branches:\n      - master\n  pull_request:\n    branches:\n      - ma"
  },
  {
    "path": ".github/workflows/welcome-first-time-contributors.yml",
    "chars": 1141,
    "preview": "name: Welcome first time contributors\n\non:\n  pull_request_target:\n    types:\n      - opened\n  issues:\n    types:\n      -"
  },
  {
    "path": ".gitignore",
    "chars": 36,
    "preview": ".DS_Store\nlib\ndist\nout\nnode_modules\n"
  },
  {
    "path": ".gitpod.Dockerfile",
    "chars": 228,
    "preview": "FROM gitpod/workspace-full\n\nRUN sudo apt-get update \\\n  && sudo apt-get install -y \\\n    g++ gcc make python2.7 pkg-conf"
  },
  {
    "path": ".gitpod.yml",
    "chars": 1303,
    "preview": "image:\n  file: .gitpod.Dockerfile\ntasks:\n  - init: |\n      npm install\n      npm run build\n    command: |\n      echo \"=="
  },
  {
    "path": ".husky/.gitignore",
    "chars": 1,
    "preview": "_"
  },
  {
    "path": ".husky/pre-commit",
    "chars": 58,
    "preview": "#!/bin/sh\n. \"$(dirname \"$0\")/_/husky.sh\"\n\nnpx lint-staged\n"
  },
  {
    "path": ".prettierignore",
    "chars": 131,
    "preview": "lib\ndist\nout\nnode_modules\nvscode-web/src/vs\nvscode-web/extensions\nhtm.module.js\npreact.module.js\npreact-hooks.module.js\n"
  },
  {
    "path": ".prettierrc.js",
    "chars": 209,
    "preview": "export default {\n\ttabWidth: 2,\n\tuseTabs: true,\n\tsemi: true,\n\tsingleQuote: true,\n\tprintWidth: 120,\n\toverrides: [\n\t\t{\n\t\t\tf"
  },
  {
    "path": "LICENSE",
    "chars": 1078,
    "preview": "MIT License\n\nCopyright conwnet and other contributors\n\nPermission is hereby granted, free of charge, to any person obtai"
  },
  {
    "path": "README.md",
    "chars": 9866,
    "preview": "![GitHub1s](https://raw.githubusercontent.com/conwnet/github1s/master/resources/images/logo.svg)\n\n# github1s\n\nOne second"
  },
  {
    "path": "docs/guide.md",
    "chars": 5783,
    "preview": "# How it works\n\nGitHub1s is based on [VS Code 1.66.2](https://github.com/microsoft/vscode/tree/1.66.2) now. VS Code can "
  },
  {
    "path": "eslint.config.js",
    "chars": 567,
    "preview": "import jsdoc from 'eslint-plugin-jsdoc';\nimport tseslint from 'typescript-eslint';\nimport eslintPluginPrettierRecommende"
  },
  {
    "path": "extensions/elm-web/LICENSE",
    "chars": 1068,
    "preview": "MIT License\n\nCopyright (c) 2019 Kolja Lampe\n\nPermission is hereby granted, free of charge, to any person obtaining a cop"
  },
  {
    "path": "extensions/elm-web/README.md",
    "chars": 980,
    "preview": "# This extension is a fork from [elm-language-client-vscode](https://github.com/elm-tooling/elm-language-client-vscode) "
  },
  {
    "path": "extensions/elm-web/language-configuration.json",
    "chars": 633,
    "preview": "{\n  \"comments\": {\n    \"lineComment\": \"--\",\n    \"blockComment\": [\"{-\", \"-}\"]\n  },\n  \"brackets\": [\n    [\"{\", \"}\"],\n    [\"["
  },
  {
    "path": "extensions/elm-web/package.json",
    "chars": 1345,
    "preview": "{\n  \"name\": \"elm-ls-vscode\",\n  \"displayName\": \"Elm\",\n  \"description\": \"Improving your Elm experience since 2019\",\n  \"pub"
  },
  {
    "path": "extensions/elm-web/syntaxes/codeblock.json",
    "chars": 1089,
    "preview": "{\n  \"fileTypes\": [],\n  \"injectionSelector\": \"L:text.html.markdown\",\n  \"patterns\": [\n    {\n      \"include\": \"#fenced_code"
  },
  {
    "path": "extensions/elm-web/syntaxes/elm-syntax.json",
    "chars": 17320,
    "preview": "{\n  \"fileTypes\": [\"elm\"],\n  \"name\": \"Elm\",\n  \"scopeName\": \"source.elm\",\n  \"patterns\": [\n    {\n      \"include\": \"#import\""
  },
  {
    "path": "extensions/github1s/assets/pages/components.css",
    "chars": 3652,
    "preview": ".vscode-button {\n  border: none;\n  display: inline-block;\n  padding: 0 10px;\n  height: 26px;\n  line-height: 26px;\n  font"
  },
  {
    "path": "extensions/github1s/assets/pages/components.js",
    "chars": 2670,
    "preview": "import { h } from './libraries/preact.module.js';\nimport htm from './libraries/htm.module.js';\n\nexport const html = htm."
  },
  {
    "path": "extensions/github1s/assets/pages/github1s-authentication.css",
    "chars": 4166,
    "preview": ".authentication-page {\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n}\n\n.authentication-page .page-n"
  },
  {
    "path": "extensions/github1s/assets/pages/github1s-authentication.js",
    "chars": 7232,
    "preview": "import { render } from './libraries/preact.module.js';\nimport { useState, useCallback, useEffect } from './libraries/pre"
  },
  {
    "path": "extensions/github1s/assets/pages/github1s-settings.css",
    "chars": 1011,
    "preview": ".vscode-input {\n  margin-bottom: 10px;\n}\n\n.vscode-button {\n  margin-bottom: 10px;\n}\n\n#app {\n  padding: 10px;\n}\n\n.flex-li"
  },
  {
    "path": "extensions/github1s/assets/pages/github1s-settings.js",
    "chars": 7583,
    "preview": "import { render } from './libraries/preact.module.js';\nimport { useState, useCallback, useEffect } from './libraries/pre"
  },
  {
    "path": "extensions/github1s/assets/pages/libraries/htm.module.js",
    "chars": 1304,
    "preview": "// https://github.com/developit/htm, download from https://unpkg.com/htm@3.1.0/dist/htm.module.js\nvar n=function(t,s,r,e"
  },
  {
    "path": "extensions/github1s/assets/pages/libraries/preact-hooks.module.js",
    "chars": 2828,
    "preview": "// https://github.com/preactjs/preact, download from https://unpkg.com/preact@10.7.1/hooks/dist/hooks.module.js\nimport{o"
  },
  {
    "path": "extensions/github1s/assets/pages/libraries/preact.module.js",
    "chars": 10095,
    "preview": "// https://github.com/preactjs/preact, download from https://unpkg.com/preact@10.7.1/dist/preact.module.js\nvar n,l,u,i,t"
  },
  {
    "path": "extensions/github1s/package.json",
    "chars": 21532,
    "preview": "{\n  \"name\": \"github1s\",\n  \"version\": \"0.0.0\",\n  \"publisher\": \"github1s\",\n  \"description\": \"\",\n  \"private\": true,\n  \"enab"
  },
  {
    "path": "extensions/github1s/src/adapters/bitbucket1s/index.ts",
    "chars": 1132,
    "preview": "/**\n * @file Bitbucket adapter\n * @author netcon\n */\n\nimport { BitbucketRouterParser } from './router-parser';\nimport { "
  },
  {
    "path": "extensions/github1s/src/adapters/bitbucket1s/parse-path.ts",
    "chars": 2305,
    "preview": "/**\n * @file parse bitbucket path\n * @author netcon\n */\n\nimport { parsePath } from 'history';\nimport { FileType, PageTyp"
  },
  {
    "path": "extensions/github1s/src/adapters/bitbucket1s/router-parser.ts",
    "chars": 1550,
    "preview": "/**\n * @file router parser\n * @author netcon\n */\n\nimport * as adapterTypes from '../types';\nimport { parseBitbucketPath "
  },
  {
    "path": "extensions/github1s/src/adapters/github1s/authentication.ts",
    "chars": 5217,
    "preview": "/**\n * @file github authentication page\n * @author netcon\n */\n\nimport * as vscode from 'vscode';\nimport { Barrier } from"
  },
  {
    "path": "extensions/github1s/src/adapters/github1s/data-source.ts",
    "chars": 15913,
    "preview": "/**\n * @file github1s data-source-provider\n * @author netcon\n */\n\nimport {\n\tBranch,\n\tCodeReview,\n\tCodeReviewState,\n\tText"
  },
  {
    "path": "extensions/github1s/src/adapters/github1s/fetcher.ts",
    "chars": 6082,
    "preview": "/**\n * @file github api fetcher base octokit\n * @author netcon\n */\n\n(self as any).global = self;\nimport * as vscode from"
  },
  {
    "path": "extensions/github1s/src/adapters/github1s/graphql.ts",
    "chars": 529,
    "preview": "/**\n * @file github graphql queries\n * @author netcon\n */\n\nexport const FILE_BLAME_QUERY = `\nquery fileBlameQuery($owner"
  },
  {
    "path": "extensions/github1s/src/adapters/github1s/index.ts",
    "chars": 2356,
    "preview": "/**\n * @file GitHub1s adapter\n * @author netcon\n */\n\nimport * as vscode from 'vscode';\nimport { setVSCodeContext } from "
  },
  {
    "path": "extensions/github1s/src/adapters/github1s/parse-path.ts",
    "chars": 5650,
    "preview": "/**\n * @file parse github path\n * @author netcon\n */\n\nimport * as vscode from 'vscode';\nimport { parsePath } from 'histo"
  },
  {
    "path": "extensions/github1s/src/adapters/github1s/router-parser.ts",
    "chars": 1528,
    "preview": "/**\n * @file router parser\n * @author netcon\n */\n\nimport { joinPath } from '@/helpers/util';\nimport * as adapterTypes fr"
  },
  {
    "path": "extensions/github1s/src/adapters/github1s/settings.ts",
    "chars": 4292,
    "preview": "/**\n * @file GitHub1s Settings Webview Provider\n * @author netcon\n */\n\nimport * as vscode from 'vscode';\nimport { getExt"
  },
  {
    "path": "extensions/github1s/src/adapters/github1s/token.ts",
    "chars": 2142,
    "preview": "/**\n * @file github api auth token manager\n */\n\nimport * as vscode from 'vscode';\nimport { getExtensionContext } from '@"
  },
  {
    "path": "extensions/github1s/src/adapters/gitlab1s/authentication.ts",
    "chars": 1027,
    "preview": "/**\n * @file gitlab authentication page\n * @author netcon\n */\n\nimport { GitHub1sAuthenticationView } from '../github1s/a"
  },
  {
    "path": "extensions/github1s/src/adapters/gitlab1s/data-source.ts",
    "chars": 15866,
    "preview": "/**\n * @file gitlab1s data-source-provider\n * @author netcon\n */\n\nimport {\n\tBranch,\n\tCodeReview,\n\tCodeReviewState,\n\tText"
  },
  {
    "path": "extensions/github1s/src/adapters/gitlab1s/fetcher.ts",
    "chars": 5554,
    "preview": "/**\n * @file gitlab api fetcher\n * @author netcon\n */\n\nimport * as vscode from 'vscode';\nimport { getExtensionContext } "
  },
  {
    "path": "extensions/github1s/src/adapters/gitlab1s/index.ts",
    "chars": 2262,
    "preview": "/**\n * @file GitLab1s adapter\n * @author netcon\n */\n\nimport * as vscode from 'vscode';\nimport { GitLab1sRouterParser } f"
  },
  {
    "path": "extensions/github1s/src/adapters/gitlab1s/parse-path.ts",
    "chars": 5988,
    "preview": "/**\n * @file parse gitlab path\n * @author netcon\n */\n\nimport * as vscode from 'vscode';\nimport { parsePath } from 'histo"
  },
  {
    "path": "extensions/github1s/src/adapters/gitlab1s/router-parser.ts",
    "chars": 1559,
    "preview": "/**\n * @file router parser\n * @author netcon\n */\n\nimport { joinPath } from '@/helpers/util';\nimport * as adapterTypes fr"
  },
  {
    "path": "extensions/github1s/src/adapters/gitlab1s/settings.ts",
    "chars": 1020,
    "preview": "/**\n * @file GitLab1s Settings Webview Provider\n * @author netcon\n */\n\nimport { GitLabTokenManager } from './token';\nimp"
  },
  {
    "path": "extensions/github1s/src/adapters/gitlab1s/token.ts",
    "chars": 1233,
    "preview": "/**\n * @file gitlab api auth token manager\n */\n\nimport { GitHubTokenManager, ValidateResult } from '../github1s/token';\n"
  },
  {
    "path": "extensions/github1s/src/adapters/index.ts",
    "chars": 1027,
    "preview": "/**\n * @file register the adapters\n * @author netcon\n */\n\nimport adapterManager from './manager';\nimport { GitHub1sAdapt"
  },
  {
    "path": "extensions/github1s/src/adapters/manager.ts",
    "chars": 1832,
    "preview": "/**\n * @file Manages the adapters.\n * @author netcon\n */\n\nimport * as vscode from 'vscode';\nimport { setVSCodeContext } "
  },
  {
    "path": "extensions/github1s/src/adapters/npmjs1s/data-source.ts",
    "chars": 5441,
    "preview": "/**\n * @file npm data-source-provider\n * @author netcon\n */\n\nimport { CommonQueryOptions, DataSource, Directory, Directo"
  },
  {
    "path": "extensions/github1s/src/adapters/npmjs1s/index.ts",
    "chars": 479,
    "preview": "/**\n * @file Npmjs1s adapter\n * @author netcon\n */\n\nimport { Npmjs1sDataSource } from './data-source';\nimport { Npmjs1sR"
  },
  {
    "path": "extensions/github1s/src/adapters/npmjs1s/router-parser.ts",
    "chars": 2135,
    "preview": "/**\n * @file router parser\n * @author netcon\n */\n\nimport { parsePath } from 'history';\nimport { PageType, RouterParser, "
  },
  {
    "path": "extensions/github1s/src/adapters/ossinsight/constants.ts",
    "chars": 612,
    "preview": "/**\n * @file trending constants\n * @author netcon\n */\n\nexport enum RankingPeriod {\n\tToday = 'Today',\n\tThisWeek = 'ThisWe"
  },
  {
    "path": "extensions/github1s/src/adapters/ossinsight/data-source.ts",
    "chars": 4784,
    "preview": "/**\n * @file trending page data source\n * @author netcon\n */\n\nimport { joinPath } from '@/helpers/util';\nimport { getCol"
  },
  {
    "path": "extensions/github1s/src/adapters/ossinsight/index.ts",
    "chars": 567,
    "preview": "/**\n * @file OSSInsight adapter\n * @author netcon\n */\n\nimport { OSSInsightDataSource } from './data-source';\nimport { OS"
  },
  {
    "path": "extensions/github1s/src/adapters/ossinsight/interfaces.ts",
    "chars": 3025,
    "preview": "/**\n * @file trending interfaces\n * @author netcon\n */\n\nimport { memorize } from '@/helpers/func';\nimport { RankingPerio"
  },
  {
    "path": "extensions/github1s/src/adapters/ossinsight/router-parser.ts",
    "chars": 1773,
    "preview": "/**\n * @file router parser\n * @author netcon\n */\n\nimport { parsePath } from 'history';\nimport * as queryString from 'que"
  },
  {
    "path": "extensions/github1s/src/adapters/ossinsight/templates.ts",
    "chars": 10338,
    "preview": "/**\n * @file Trending page\n * @author netcon\n */\n\nimport { trimEnd } from '@/helpers/util';\nimport { RankingLanguages, R"
  },
  {
    "path": "extensions/github1s/src/adapters/sourcegraph/blame.ts",
    "chars": 1951,
    "preview": "/**\n * @file sourcegraph blame api\n * @author netcon\n */\n\nimport { gql } from '@apollo/client/core';\nimport { BlameRange"
  },
  {
    "path": "extensions/github1s/src/adapters/sourcegraph/commit.ts",
    "chars": 2649,
    "preview": "/**\n * @file Sourcegraph commits api (tree/blob)\n * @author netcon\n */\n\nimport { gql } from '@apollo/client/core';\nimpor"
  },
  {
    "path": "extensions/github1s/src/adapters/sourcegraph/common.ts",
    "chars": 1966,
    "preview": "/**\n * @file Sourcegraph api common utils\n * @author netcon\n */\n\nimport { ApolloClient, createHttpLink, InMemoryCache } "
  },
  {
    "path": "extensions/github1s/src/adapters/sourcegraph/comparison.ts",
    "chars": 1420,
    "preview": "/**\n * @file sourcegraph comparison api\n * @author netcon\n */\n\nimport { gql } from '@apollo/client/core';\nimport { Chang"
  },
  {
    "path": "extensions/github1s/src/adapters/sourcegraph/data-source.ts",
    "chars": 9052,
    "preview": "/**\n * @file sourcegraph data-source-provider\n * @author netcon\n */\n\nimport { joinPath } from '@/helpers/util';\nimport {"
  },
  {
    "path": "extensions/github1s/src/adapters/sourcegraph/definition.ts",
    "chars": 2233,
    "preview": "/**\n * @file Sourcegraph definition api\n * @author netcon\n */\n\nimport { gql } from '@apollo/client/core';\nimport { sourc"
  },
  {
    "path": "extensions/github1s/src/adapters/sourcegraph/file.ts",
    "chars": 1984,
    "preview": "/**\n * @file Sourcegraph file api (tree/blob)\n * @author netcon\n */\n\nimport { gql } from '@apollo/client/core';\nimport {"
  },
  {
    "path": "extensions/github1s/src/adapters/sourcegraph/hover.ts",
    "chars": 1345,
    "preview": "/**\n * @file Sourcegraph hover api\n * @author netcon\n */\n\nimport { gql } from '@apollo/client/core';\nimport { SymbolHove"
  },
  {
    "path": "extensions/github1s/src/adapters/sourcegraph/position.ts",
    "chars": 1796,
    "preview": "/**\n * @file Sourcegraph api for searching symbol positions\n * @author netcon\n */\n\nimport { gql } from '@apollo/client/c"
  },
  {
    "path": "extensions/github1s/src/adapters/sourcegraph/ref.ts",
    "chars": 1542,
    "preview": "/**\n * @file Sourcegraph git ref api (branch/tag)\n * @author netcon\n */\n\nimport { gql } from '@apollo/client/core';\nimpo"
  },
  {
    "path": "extensions/github1s/src/adapters/sourcegraph/reference.ts",
    "chars": 2222,
    "preview": "/**\n * @file Sourcegraph reference api\n * @author netcon\n */\n\nimport { gql } from '@apollo/client/core';\nimport { source"
  },
  {
    "path": "extensions/github1s/src/adapters/sourcegraph/repository.ts",
    "chars": 749,
    "preview": "/**\n * @file Sourcegraph file api (tree/blob)\n * @author netcon\n */\n\nimport { gql } from '@apollo/client/core';\nimport {"
  },
  {
    "path": "extensions/github1s/src/adapters/sourcegraph/search.ts",
    "chars": 3637,
    "preview": "/**\n * @file Sourcegraph search api\n * @author netcon\n */\n\nimport { gql } from '@apollo/client/core';\nimport { TextSearc"
  },
  {
    "path": "extensions/github1s/src/adapters/types.ts",
    "chars": 10893,
    "preview": "/**\n * @file GitHub1s Type Definitions\n * @author netcon\n */\n\nexport type Promisable<T> = PromiseLike<T> | T;\n\nexport en"
  },
  {
    "path": "extensions/github1s/src/changes/files.ts",
    "chars": 5274,
    "preview": "/**\n * @file source control change file list\n * @author netcon\n */\n\nimport * as vscode from 'vscode';\nimport * as queryS"
  },
  {
    "path": "extensions/github1s/src/changes/index.ts",
    "chars": 1115,
    "preview": "/**\n * @file Source Control Changed Files\n * @author netcon\n */\n\nimport * as vscode from 'vscode';\nimport * as adapterTy"
  },
  {
    "path": "extensions/github1s/src/changes/quick-diff.ts",
    "chars": 3343,
    "preview": "/**\n * @file GitHub1s quickDiffProvider for pull/commit change files\n * @author netcon\n */\n\nimport * as vscode from 'vsc"
  },
  {
    "path": "extensions/github1s/src/commands/blame.ts",
    "chars": 9959,
    "preview": "/**\n * @file GitHub1s Blame Related Commands\n * @author netcon\n */\n\nimport * as vscode from 'vscode';\nimport { relativeT"
  },
  {
    "path": "extensions/github1s/src/commands/code-review.ts",
    "chars": 6041,
    "preview": "/**\n * @file GitHub1s Code Review Related Commands\n * @author netcon\n */\n\nimport * as vscode from 'vscode';\nimport route"
  },
  {
    "path": "extensions/github1s/src/commands/commit.ts",
    "chars": 6190,
    "preview": "/**\n * @file GitHub1s Commit Related Commands\n * @author netcon\n */\n\nimport * as vscode from 'vscode';\nimport router fro"
  },
  {
    "path": "extensions/github1s/src/commands/editor.ts",
    "chars": 6659,
    "preview": "/**\n * @file Editor Related Commands\n * @author netcon\n */\n\nimport * as vscode from 'vscode';\nimport * as queryString fr"
  },
  {
    "path": "extensions/github1s/src/commands/global.ts",
    "chars": 3872,
    "preview": "/**\n * @file GitHub1s Ref Related Commands\n * @author netcon\n */\n\nimport * as vscode from 'vscode';\nimport router from '"
  },
  {
    "path": "extensions/github1s/src/commands/index.ts",
    "chars": 715,
    "preview": "/**\n * @file github1s commands\n * @author netcon\n */\n\nimport { getExtensionContext } from '@/helpers/context';\nimport { "
  },
  {
    "path": "extensions/github1s/src/commands/ref.ts",
    "chars": 2194,
    "preview": "/**\n * @file GitHub1s Ref Related Commands\n * @author netcon\n */\n\nimport * as vscode from 'vscode';\nimport router from '"
  },
  {
    "path": "extensions/github1s/src/extension.ts",
    "chars": 3231,
    "preview": "/**\n * @file extension entry\n * @author netcon\n */\n\nimport router from '@/router';\nimport * as vscode from 'vscode';\nimp"
  },
  {
    "path": "extensions/github1s/src/global.d.ts",
    "chars": 156,
    "preview": "declare const GITHUB_ORIGIN: string;\ndeclare const GITHUB_API_PREFIX: string;\ndeclare const GITLAB_ORIGIN: string;\ndecla"
  },
  {
    "path": "extensions/github1s/src/helpers/async.ts",
    "chars": 700,
    "preview": "/**\n * @file async related helpers\n */\n\n// below code is comes from:\n// https://github.com/microsoft/vscode/blob/a3415e6"
  },
  {
    "path": "extensions/github1s/src/helpers/context.ts",
    "chars": 1443,
    "preview": "/**\n * @file extension context\n * @author netcon\n */\n\nimport * as vscode from 'vscode';\n\nlet extensionContext: vscode.Ex"
  },
  {
    "path": "extensions/github1s/src/helpers/date.ts",
    "chars": 345,
    "preview": "/**\n * @file date util\n * @author netcon\n */\n\nimport * as dayjs from 'dayjs';\nimport * as relativeTimePlugin from 'dayjs"
  },
  {
    "path": "extensions/github1s/src/helpers/func.ts",
    "chars": 2840,
    "preview": "/**\n * @file function utils\n * @author netcon\n */\n\nimport * as jsonStableStringify from 'json-stable-stringify';\nimport "
  },
  {
    "path": "extensions/github1s/src/helpers/page.ts",
    "chars": 2270,
    "preview": "/**\n * @file page html helpers\n * @author netcon\n */\n\nimport * as vscode from 'vscode';\n\nexport const getNonce = (): str"
  },
  {
    "path": "extensions/github1s/src/helpers/submodule.ts",
    "chars": 2834,
    "preview": "/**\n * @file git submodule util\n * @author netcon\n */\n\nimport { FileSystemError, Uri } from 'vscode';\n\n// the code below"
  },
  {
    "path": "extensions/github1s/src/helpers/urls.ts",
    "chars": 318,
    "preview": "/**\n * @file extension url helpers\n * @author netcon\n */\n\nexport const getSourcegraphUrl = (repo: string, ref: string, p"
  },
  {
    "path": "extensions/github1s/src/helpers/util.ts",
    "chars": 1614,
    "preview": "/**\n * @file common util\n * @author netcon\n */\n\nexport const noop = () => {};\nexport const isNil = (value: any) => value"
  },
  {
    "path": "extensions/github1s/src/helpers/vscode.ts",
    "chars": 207,
    "preview": "/**\n * @file helper functions about vscode\n * @author netcon\n */\n\nimport * as vscode from 'vscode';\n\nexport const setVSC"
  },
  {
    "path": "extensions/github1s/src/listeners/index.ts",
    "chars": 291,
    "preview": "/**\n * @file register event listeners\n * @author netcon\n */\n\nimport { registerVSCodeEventListeners } from './vscode';\nim"
  },
  {
    "path": "extensions/github1s/src/listeners/router/changes.ts",
    "chars": 759,
    "preview": "/**\n * @file url listener for file SourceControl\n * @author netcon\n */\n\nimport { RouterState } from '@/adapters/types';\n"
  },
  {
    "path": "extensions/github1s/src/listeners/router/explorer.ts",
    "chars": 1905,
    "preview": "/**\n * @file url listener for file Explorer\n * @author netcon\n */\n\nimport * as vscode from 'vscode';\nimport { PageType, "
  },
  {
    "path": "extensions/github1s/src/listeners/router/index.ts",
    "chars": 355,
    "preview": "/**\n * @file listeners for router event\n * @author netcon\n */\n\nimport router from '@/router';\nimport { explorerRouterLis"
  },
  {
    "path": "extensions/github1s/src/listeners/vscode.ts",
    "chars": 3565,
    "preview": "/**\n * @file listeners for vscode event\n * @author netcon\n */\n\nimport * as vscode from 'vscode';\nimport router from '@/r"
  },
  {
    "path": "extensions/github1s/src/messages.ts",
    "chars": 1471,
    "preview": "/**\n * @file vscode messages\n */\n\nimport * as vscode from 'vscode';\nimport router from '@/router';\nimport { getSourcegra"
  },
  {
    "path": "extensions/github1s/src/providers/decorations/changed-file.ts",
    "chars": 4014,
    "preview": "/**\n * @file GitHub1s ChangedFile FileDecorationProvider,\n * @author netcon\n * Decorate the file/directory that has chan"
  },
  {
    "path": "extensions/github1s/src/providers/decorations/source-control.ts",
    "chars": 2366,
    "preview": "/**\n * @file GitHub1s File Decoration for the view in SourceControl Panel\n * @author netcon\n */\n\nimport {\n\tCancellationT"
  },
  {
    "path": "extensions/github1s/src/providers/decorations/submodule.ts",
    "chars": 1819,
    "preview": "/**\n * @file GitHub1s Submodule FileDecorationProvider,\n * @author netcon\n * Decorate the directory which is a submodule"
  },
  {
    "path": "extensions/github1s/src/providers/definition.ts",
    "chars": 2422,
    "preview": "/**\n * @file DefinitionProvider\n * @author netcon\n */\n\nimport * as vscode from 'vscode';\nimport router from '@/router';\n"
  },
  {
    "path": "extensions/github1s/src/providers/file-search.ts",
    "chars": 3313,
    "preview": "/**\n * @file GitHub1s FileSearchProvider (ctrl/cmd + p)\n * @author netcon\n */\n\nimport {\n\tCancellationToken,\n\tDisposable,"
  },
  {
    "path": "extensions/github1s/src/providers/file-system/index.ts",
    "chars": 10558,
    "preview": "/**\n * @file GitHub1s FileSystemProvider\n * @author netcon\n */\n\nimport {\n\tDisposable,\n\tEvent,\n\tEventEmitter,\n\tFileSystem"
  },
  {
    "path": "extensions/github1s/src/providers/file-system/types.ts",
    "chars": 1757,
    "preview": "/**\n * @file GitHub1s FileSystemProvider Types\n * @author netcon\n */\n\nimport { FileStat, FileType, Uri } from 'vscode';\n"
  },
  {
    "path": "extensions/github1s/src/providers/hover.ts",
    "chars": 4360,
    "preview": "/**\n * @file HoverProvider\n * @author netcon\n */\n\nimport * as vscode from 'vscode';\nimport router from '@/router';\nimpor"
  },
  {
    "path": "extensions/github1s/src/providers/index.ts",
    "chars": 2341,
    "preview": "/**\n * @file register VS Code providers\n * @author netcon\n */\n\nimport * as vscode from 'vscode';\nimport adapterManager f"
  },
  {
    "path": "extensions/github1s/src/providers/reference.ts",
    "chars": 2421,
    "preview": "/**\n * @file ReferenceProvider\n * @author netcon\n */\n\nimport * as vscode from 'vscode';\nimport router from '@/router';\ni"
  },
  {
    "path": "extensions/github1s/src/providers/text-search.ts",
    "chars": 2546,
    "preview": "/**\n * @file GitHub1s TextSearchProvider (ctrl/cmd + shift + f)\n * @author netcon\n */\n\nimport * as vscode from 'vscode';"
  },
  {
    "path": "extensions/github1s/src/repository/branch-tag-manager.ts",
    "chars": 3728,
    "preview": "/**\n * @file Branch/Tag Manager\n * @author netcon\n */\n\nimport { reuseable } from '@/helpers/func';\nimport { Branch, Tag "
  },
  {
    "path": "extensions/github1s/src/repository/code-review-manager.ts",
    "chars": 5577,
    "preview": "/**\n * @file Code Review Manager\n * @author netcon\n */\n\nimport { reuseable } from '@/helpers/func';\nimport { ChangedFile"
  },
  {
    "path": "extensions/github1s/src/repository/commit-manager.ts",
    "chars": 9237,
    "preview": "/**\n * @file Commit Manager\n * @author netcon\n */\n\nimport { reuseable } from '@/helpers/func';\nimport { ChangedFile, Com"
  },
  {
    "path": "extensions/github1s/src/repository/index.ts",
    "chars": 5154,
    "preview": "/**\n * @file Current GitHub Repository\n * @author netcon\n */\n\nimport { adapterManager } from '@/adapters';\nimport { Comm"
  },
  {
    "path": "extensions/github1s/src/router/events.ts",
    "chars": 495,
    "preview": "/**\n * @file Observable\n * @author netcon\n */\n\nexport class EventEmitter<T> {\n\tprivate _listeners: ((...args: T[]) => an"
  },
  {
    "path": "extensions/github1s/src/router/index.ts",
    "chars": 3369,
    "preview": "/**\n * @file GitHub url router (just like react-router)\n * @author netcon\n */\n\nimport * as vscode from 'vscode';\nimport "
  },
  {
    "path": "extensions/github1s/src/statusbar/checkout.ts",
    "chars": 816,
    "preview": "/**\n * @file checkout to another ref in status bar\n * @author netcon\n */\n\nimport * as vscode from 'vscode';\nimport route"
  },
  {
    "path": "extensions/github1s/src/statusbar/index.ts",
    "chars": 225,
    "preview": "/**\n * @file decorate footer\n * @author netcon\n */\n\nimport { updateCheckoutTo } from './checkout';\nimport { showSponsors"
  },
  {
    "path": "extensions/github1s/src/statusbar/sponsors.ts",
    "chars": 1468,
    "preview": "/**\n * @file Show Sponsors In Status Bar\n * @author netcon\n */\n\nimport * as vscode from 'vscode';\nimport router from '@/"
  },
  {
    "path": "extensions/github1s/src/views/code-review-list.ts",
    "chars": 7544,
    "preview": "/**\n * @file Code Review List View\n * @author netcon\n */\n\nimport * as vscode from 'vscode';\nimport * as queryString from"
  },
  {
    "path": "extensions/github1s/src/views/commit-list.ts",
    "chars": 7135,
    "preview": "/**\n * @file GitHub Commit List View\n * @author netcon\n */\n\nimport * as vscode from 'vscode';\nimport router from '@/rout"
  },
  {
    "path": "extensions/github1s/src/views/index.ts",
    "chars": 1675,
    "preview": "/**\n * @file register views\n */\n\nimport * as vscode from 'vscode';\nimport { adapterManager } from '@/adapters';\nimport {"
  },
  {
    "path": "extensions/github1s/src/vscode.proposed.d.ts",
    "chars": 70046,
    "preview": "/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Micros"
  },
  {
    "path": "extensions/github1s/tsconfig.json",
    "chars": 347,
    "preview": "{\n  \"compilerOptions\": {\n    \"target\": \"es6\",\n    \"module\": \"commonjs\",\n    \"moduleResolution\": \"node\",\n    \"strictNullC"
  },
  {
    "path": "extensions/github1s/webpack.config.js",
    "chars": 2227,
    "preview": "/*---------------------------------------------------------------------------------------------\n *  Copyright (c) Micros"
  },
  {
    "path": "extensions/nim-web/LICENSE",
    "chars": 1101,
    "preview": "vscode-nim\n\nThe MIT License (MIT)\n\nCopyright (c) Xored Software Inc.\n\nPermission is hereby granted, free of charge, to a"
  },
  {
    "path": "extensions/nim-web/README.md",
    "chars": 1033,
    "preview": "# This extension is a fork from [vscode-nim](https://github.com/saem/vscode-nim) for github1s\n\n# At present only languag"
  },
  {
    "path": "extensions/nim-web/nimcfg.json",
    "chars": 541,
    "preview": "{\n  \"comments\": {\n    \"lineComment\": \"#\",\n    \"blockComment\": [\"#[\", \"]#\"]\n  },\n  \"brackets\": [\n    [\"[\", \"]\"],\n    [\"(\""
  },
  {
    "path": "extensions/nim-web/package.json",
    "chars": 7238,
    "preview": "{\n  \"name\": \"nimvscode\",\n  \"displayName\": \"Nim\",\n  \"description\": \"Nim language support for Visual Studio Code written i"
  },
  {
    "path": "extensions/nim-web/snippets/nim.json",
    "chars": 1831,
    "preview": "{\n  \".source.nim\": {\n    \"procedure\": {\n      \"prefix\": \"proc\",\n      \"body\": \"proc ${1:name}(${2:arguments}): ${3:retur"
  },
  {
    "path": "extensions/nim-web/syntaxes/nim.json",
    "chars": 39731,
    "preview": "{\n  \"fileTypes\": [\"nim\"],\n  \"keyEquivalent\": \"^~N\",\n  \"name\": \"Nim\",\n  \"patterns\": [\n    {\n      \"begin\": \"[ \\\\t]*##\\\\[\""
  },
  {
    "path": "extensions/nim-web/syntaxes/nimble.json",
    "chars": 2182,
    "preview": "{\n  \"name\": \"nimble\",\n  \"scopeName\": \"source.nimble\",\n  \"fileTypes\": [\"nimble\"],\n  \"foldingStartMarker\": \"\",\n  \"foldingS"
  },
  {
    "path": "extensions/ocaml-web/LICENSE",
    "chars": 741,
    "preview": "ISC License\n\nCopyright (c) 2019 OCaml Labs\n\nPermission to use, copy, modify, and/or distribute this software for any\npur"
  },
  {
    "path": "extensions/ocaml-web/README.md",
    "chars": 889,
    "preview": "# This extension is a fork from [vscode-ocaml-platform](https://github.com/ocamllabs/vscode-ocaml-platform) for github1s"
  },
  {
    "path": "extensions/ocaml-web/languages/META.json",
    "chars": 196,
    "preview": "{\n  \"comments\": {\n    \"lineComment\": \"#\"\n  },\n  \"brackets\": [[\"(\", \")\"]],\n  \"autoClosingPairs\": [\n    { \"open\": \"(\", \"cl"
  },
  {
    "path": "extensions/ocaml-web/languages/dune.json",
    "chars": 520,
    "preview": "{\n  \"comments\": {\n    \"lineComment\": \";\"\n  },\n  \"brackets\": [\n    [\"{\", \"}\"],\n    [\"[\", \"]\"],\n    [\"(\", \")\"]\n  ],\n  \"aut"
  },
  {
    "path": "extensions/ocaml-web/languages/menhir.json",
    "chars": 406,
    "preview": "{\n  \"comments\": {\n    \"lineComment\": \"//\",\n    \"blockComment\": [\"/*\", \"*/\"]\n  },\n  \"brackets\": [\n    [\"{\", \"}\"],\n    [\"["
  },
  {
    "path": "extensions/ocaml-web/languages/oasis.json",
    "chars": 125,
    "preview": "{\n  \"comments\": {\n    \"lineComment\": \"#\"\n  },\n  \"autoClosingPairs\": [{ \"open\": \"\\\"\", \"close\": \"\\\"\", \"notIn\": [\"string\"] "
  },
  {
    "path": "extensions/ocaml-web/languages/ocaml.json",
    "chars": 971,
    "preview": "{\n  \"autoClosingPairs\": [\n    { \"open\": \"{\", \"close\": \"}\" },\n    { \"open\": \"[\", \"close\": \"]\" },\n    { \"open\": \"(\", \"clos"
  },
  {
    "path": "extensions/ocaml-web/languages/ocamlbuild.json",
    "chars": 306,
    "preview": "{\n  \"comments\": {\n    \"lineComment\": \"#\"\n  },\n  \"brackets\": [\n    [\"(\", \")\"],\n    [\"{\", \"}\"],\n    [\"<\", \">\"]\n  ],\n  \"aut"
  },
  {
    "path": "extensions/ocaml-web/languages/ocamlformat.json",
    "chars": 47,
    "preview": "{\n  \"comments\": {\n    \"lineComment\": \"#\"\n  }\n}\n"
  },
  {
    "path": "extensions/ocaml-web/languages/ocamllex.json",
    "chars": 297,
    "preview": "{\n  \"comments\": {\n    \"blockComment\": [\"(*\", \"*)\"]\n  },\n  \"brackets\": [\n    [\"{\", \"}\"],\n    [\"[\", \"]\"],\n    [\"(\", \")\"]\n "
  },
  {
    "path": "extensions/ocaml-web/languages/opam-install.json",
    "chars": 255,
    "preview": "{\n  \"comments\": {\n    \"lineComment\": \"#\"\n  },\n  \"brackets\": [\n    [\"{\", \"}\"],\n    [\"[\", \"]\"]\n  ],\n  \"autoClosingPairs\": "
  },
  {
    "path": "extensions/ocaml-web/languages/opam.json",
    "chars": 355,
    "preview": "{\n  \"comments\": {\n    \"lineComment\": \"#\"\n  },\n  \"brackets\": [\n    [\"{\", \"}\"],\n    [\"[\", \"]\"]\n  ],\n  \"autoClosingPairs\": "
  },
  {
    "path": "extensions/ocaml-web/languages/reason.json",
    "chars": 511,
    "preview": "{\n  \"autoClosingPairs\": [\n    { \"open\": \"{\", \"close\": \"}\" },\n    { \"open\": \"[\", \"close\": \"]\" },\n    { \"open\": \"(\", \"clos"
  },
  {
    "path": "extensions/ocaml-web/package.json",
    "chars": 9392,
    "preview": "{\n  \"name\": \"ocaml-platform\",\n  \"displayName\": \"OCaml Platform\",\n  \"description\": \"Official OCaml Support from OCamlLabs"
  },
  {
    "path": "extensions/ocaml-web/snippets/dune-project.json",
    "chars": 577,
    "preview": "{\n  \"lang\": {\n    \"prefix\": \"lang\",\n    \"body\": [\"(lang $1 $2)\"]\n  },\n  \"name\": {\n    \"prefix\": \"name\",\n    \"body\": [\"(n"
  },
  {
    "path": "extensions/ocaml-web/snippets/dune.json",
    "chars": 770,
    "preview": "{\n  \"env\": {\n    \"prefix\": \"env\",\n    \"body\": [\"(env\\n ($1 $2))\"]\n  },\n  \"executable\": {\n    \"prefix\": \"executable\",\n   "
  },
  {
    "path": "extensions/ocaml-web/snippets/ocaml.json",
    "chars": 1165,
    "preview": "{\n  \"lambda\": {\n    \"prefix\": \"fun\",\n    \"body\": [\"fun (${1:pattern}) -> ${2:${1:pattern}}\"]\n  },\n  \"let .. in\": {\n    \""
  },
  {
    "path": "extensions/ocaml-web/snippets/ocamllex.json",
    "chars": 92,
    "preview": "{\n  \"rule\": {\n    \"prefix\": \"rule\",\n    \"body\": [\"rule ${1:pattern} = parse\", \"| $0\"]\n  }\n}\n"
  },
  {
    "path": "extensions/ocaml-web/syntaxes/META.json",
    "chars": 1798,
    "preview": "{\n  \"scopeName\": \"source.ocaml.META\",\n  \"fileTypes\": [\"META\"],\n  \"patterns\": [{ \"include\": \"#comments\" }, { \"include\": \""
  },
  {
    "path": "extensions/ocaml-web/syntaxes/atd.json",
    "chars": 1653,
    "preview": "{\n  \"name\": \"ATD\",\n  \"scopeName\": \"source.atd\",\n  \"fileTypes\": [\"atd\"],\n  \"patterns\": [\n    { \"include\": \"source.ocaml#c"
  },
  {
    "path": "extensions/ocaml-web/syntaxes/cram.json",
    "chars": 4026,
    "preview": "{\n  \"scopeName\": \"source.cram\",\n  \"fileTypes\": [\"t\"],\n  \"patterns\": [\n    {\n      \"comment\": \"command\",\n      \"match\": \""
  },
  {
    "path": "extensions/ocaml-web/syntaxes/dune-project.json",
    "chars": 15185,
    "preview": "{\n  \"name\": \"dune-project\",\n  \"scopeName\": \"source.dune-project\",\n  \"fileTypes\": [\"dune-project\"],\n  \"patterns\": [{ \"inc"
  },
  {
    "path": "extensions/ocaml-web/syntaxes/dune-workspace.json",
    "chars": 11253,
    "preview": "{\n  \"name\": \"dune-workspace\",\n  \"scopeName\": \"source.dune-workspace\",\n  \"fileTypes\": [\"dune-workspace\"],\n  \"patterns\": ["
  },
  {
    "path": "extensions/ocaml-web/syntaxes/dune.json",
    "chars": 8285,
    "preview": "{\n  \"name\": \"dune\",\n  \"scopeName\": \"source.dune\",\n  \"fileTypes\": [\"dune\", \"jbuild\"],\n  \"patterns\": [\n    {\n      \"includ"
  },
  {
    "path": "extensions/ocaml-web/syntaxes/menhir-action.json",
    "chars": 809,
    "preview": "{\n  \"scopeName\": \"source.action.menhir\",\n  \"injectionSelector\": \"L:source.embedded-action.menhir\",\n  \"patterns\": [\n    {"
  },
  {
    "path": "extensions/ocaml-web/syntaxes/menhir.json",
    "chars": 11208,
    "preview": "{\n  \"name\": \"Menhir\",\n  \"scopeName\": \"source.ocaml.menhir\",\n  \"fileTypes\": [\"mly\"],\n  \"patterns\": [\n    { \"include\": \"#c"
  },
  {
    "path": "extensions/ocaml-web/syntaxes/merlin.json",
    "chars": 1778,
    "preview": "{\n  \"scopeName\": \"source.ocaml.merlin\",\n  \"fileTypes\": [\"merlin\"],\n  \"patterns\": [\n    { \"include\": \"#comment\" },\n    { "
  },
  {
    "path": "extensions/ocaml-web/syntaxes/oasis.json",
    "chars": 1764,
    "preview": "{\n  \"scopeName\": \"source.ocaml.oasis\",\n  \"fileTypes\": [\"_oasis\"],\n  \"patterns\": [\n    { \"include\": \"#comments\" },\n    { "
  },
  {
    "path": "extensions/ocaml-web/syntaxes/ocaml-markdown-codeblock.json",
    "chars": 621,
    "preview": "{\n  \"fileTypes\": [],\n  \"injectionSelector\": \"L:markup.fenced_code.block.markdown\",\n  \"patterns\": [{ \"include\": \"#ocaml-c"
  },
  {
    "path": "extensions/ocaml-web/syntaxes/ocaml.interface.json",
    "chars": 6606,
    "preview": "{\n  \"name\": \"OCaml Interface\",\n  \"scopeName\": \"source.ocaml.interface\",\n  \"fileTypes\": [\"mli\", \"eliomi\"],\n  \"patterns\": "
  },
  {
    "path": "extensions/ocaml-web/syntaxes/ocaml.json",
    "chars": 21433,
    "preview": "{\n  \"name\": \"OCaml\",\n  \"scopeName\": \"source.ocaml\",\n  \"fileTypes\": [\"ml\", \"eliom\", \".ocamlinit\"],\n  \"patterns\": [\n    { "
  },
  {
    "path": "extensions/ocaml-web/syntaxes/ocamlbuild.json",
    "chars": 3069,
    "preview": "{\n  \"scopeName\": \"source.ocaml.ocamlbuild\",\n  \"fileTypes\": [\"_tags\"],\n  \"patterns\": [\n    { \"include\": \"#comments\" },\n  "
  },
  {
    "path": "extensions/ocaml-web/syntaxes/ocamldoc.json",
    "chars": 708,
    "preview": "{\n  \"scopeName\": \"source.ocaml.ocamldoc\",\n  \"name\": \"comment.other.ocamldoc\",\n  \"fileTypes\": [\"mld\"],\n  \"patterns\": [\n  "
  },
  {
    "path": "extensions/ocaml-web/syntaxes/ocamlformat.json",
    "chars": 6484,
    "preview": "{\n  \"name\": \"OCamlFormat\",\n  \"scopeName\": \"source.ocaml.ocamlformat\",\n  \"fileTypes\": [\".ocamlformat\"],\n  \"patterns\": [\n "
  },
  {
    "path": "extensions/ocaml-web/syntaxes/ocamllex.json",
    "chars": 2471,
    "preview": "{\n  \"name\": \"OCamllex\",\n  \"scopeName\": \"source.ocaml.ocamllex\",\n  \"fileTypes\": [\"mll\"],\n  \"foldingStartMarker\": \"{\",\n  \""
  },
  {
    "path": "extensions/ocaml-web/syntaxes/opam-install.json",
    "chars": 589,
    "preview": "{\n  \"scopeName\": \"source.ocaml.opam-install\",\n  \"fileTypes\": [\"install\"],\n  \"patterns\": [\n    {\n      \"name\": \"comment.l"
  },
  {
    "path": "extensions/ocaml-web/syntaxes/opam.json",
    "chars": 2926,
    "preview": "{\n  \"scopeName\": \"source.ocaml.opam\",\n  \"fileTypes\": [\"opam\"],\n  \"patterns\": [\n    { \"include\": \"#comments\" },\n    { \"in"
  },
  {
    "path": "extensions/ocaml-web/syntaxes/reason-markdown-codeblock.json",
    "chars": 636,
    "preview": "{\n  \"fileTypes\": [],\n  \"injectionSelector\": \"L:markup.fenced_code.block.markdown\",\n  \"patterns\": [{ \"include\": \"#reason-"
  },
  {
    "path": "extensions/ocaml-web/syntaxes/reason.json",
    "chars": 85284,
    "preview": "{\n  \"name\": \"Reason\",\n  \"scopeName\": \"source.reason\",\n  \"fileTypes\": [\"re\", \"rei\"],\n  \"patterns\": [\n    { \"include\": \"#s"
  },
  {
    "path": "extensions/vlang-web/LICENSE",
    "chars": 1061,
    "preview": "MIT License\n\nCopyright (c) 2019 0x9ef\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof t"
  },
  {
    "path": "extensions/vlang-web/README.md",
    "chars": 822,
    "preview": "# This extension is a fork from [vscode-vlang](https://github.com/vlang/vscode-vlang) for github1s.\n\n# At present only l"
  },
  {
    "path": "extensions/vlang-web/language-configuration.json",
    "chars": 494,
    "preview": "{\n  \"comments\": {\n    \"lineComment\": \"//\",\n    \"blockComment\": [\"/*\", \"*/\"]\n  },\n  \"folding\": {\n    \"markers\": {\n      \""
  },
  {
    "path": "extensions/vlang-web/package.json",
    "chars": 1516,
    "preview": "{\n  \"name\": \"vscode-vlang\",\n  \"displayName\": \"V\",\n  \"description\": \"V language support (syntax highlighting, formatter, "
  },
  {
    "path": "extensions/vlang-web/snippets/snippets.json",
    "chars": 8650,
    "preview": "{\n  \"snippet.assert\": {\n    \"body\": [\"assert ${1:expression}\"],\n    \"description\": \"Code snippet for testing 'assert'\",\n"
  },
  {
    "path": "extensions/vlang-web/syntaxes/v.tmLanguage.json",
    "chars": 24238,
    "preview": "{\n  \"name\": \"V\",\n  \"scopeName\": \"source.v\",\n  \"fileTypes\": [\".v\", \".vh\", \".vsh\", \".vv\"],\n  \"patterns\": [\n    {\n      \"in"
  },
  {
    "path": "functions/api/github-auth-callback.ts",
    "chars": 2228,
    "preview": "/**\n * @file github auth callback\n * @author netcon\n */\n\nconst createResponseHtml = (text: string, script: string) => `\n"
  },
  {
    "path": "functions/api/gitlab-auth-callback.ts",
    "chars": 2337,
    "preview": "/**\n * @file gitlab auth callback\n * @author netcon\n */\n\nconst AUTH_REDIRECT_URI = 'https://auth.gitlab1s.com/api/gitlab"
  },
  {
    "path": "functions/tsconfig.json",
    "chars": 168,
    "preview": "{\n  \"include\": [\"**/*\"],\n  \"compilerOptions\": {\n    \"target\": \"esnext\",\n    \"module\": \"esnext\",\n    \"lib\": [\"esnext\"],\n "
  },
  {
    "path": "package.json",
    "chars": 1786,
    "preview": "{\n  \"name\": \"github1s\",\n  \"version\": \"1.0.0\",\n  \"description\": \"\",\n  \"type\": \"module\",\n  \"scripts\": {\n    \"build\": \"node"
  },
  {
    "path": "public/index.html",
    "chars": 951,
    "preview": "<!DOCTYPE html>\n<html>\n\t<head>\n\t\t<meta charset=\"utf-8\" />\n\t\t<meta name=\"viewport\" content=\"width=device-width, initial-s"
  },
  {
    "path": "public/manifest.json",
    "chars": 118,
    "preview": "{\n  \"name\": \"GitHub1S\",\n  \"short_name\": \"GitHub1s\",\n  \"start_url\": \"/\",\n  \"lang\": \"en-US\",\n  \"display\": \"standalone\"\n}"
  },
  {
    "path": "public/page-title.js",
    "chars": 337,
    "preview": "(function () {\n\tif (window.location.hostname.match(/\\.?gitlab1s\\.com$/i)) {\n\t\twindow.document.title = 'GitLab1s';\n\t} els"
  },
  {
    "path": "public/robots.txt",
    "chars": 23,
    "preview": "User-agent: *\nAllow: /\n"
  },
  {
    "path": "public/spinner.css",
    "chars": 1292,
    "preview": "#load-spinner {\n  position: absolute;\n  top: 0;\n  left: 0;\n  right: 0;\n  bottom: 0;\n  display: flex;\n  flex-direction: c"
  },
  {
    "path": "scripts/build.js",
    "chars": 534,
    "preview": "#!/usr/bin/env node\n\nimport path from 'path';\nimport fs from 'fs-extra';\nimport cp from 'child_process';\nimport { execut"
  },
  {
    "path": "scripts/link.js",
    "chars": 317,
    "preview": "#!/usr/bin/env node\n\nimport path from 'path';\nimport { executeCommand, PROJECT_ROOT } from './utils.js';\n\nconst main = ("
  },
  {
    "path": "scripts/postinstall.js",
    "chars": 423,
    "preview": "#!/usr/bin/env node\n\nimport path from 'path';\nimport fs from 'fs-extra';\nimport { executeCommand, PROJECT_ROOT } from '."
  },
  {
    "path": "scripts/utils.js",
    "chars": 302,
    "preview": "import path from 'path';\nimport cp from 'child_process';\n\nexport const PROJECT_ROOT = path.join(import.meta.dirname, '.."
  },
  {
    "path": "scripts/webpack.js",
    "chars": 4015,
    "preview": "import path from 'path';\nimport fs from 'fs-extra';\nimport { globSync } from 'glob';\n\nconst APP_ROOT = path.join(import."
  },
  {
    "path": "src/config.ts",
    "chars": 4496,
    "preview": "/**\n * @file config for different platform\n * @author netcon\n */\n\nimport githubLogoUrl from './assets/github.svg';\nimpor"
  }
]

// ... and 40 more files (download for full content)

About this extraction

This page contains the full source code of the conwnet/github1s GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 240 files (1.0 MB), approximately 286.2k tokens, and a symbol index with 836 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!