Giter Site home page Giter Site logo

jingfang / copilot-explorer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thakkarparth007/copilot-explorer

0.0 0.0 0.0 6.4 MB

Hacky repo to see what the Copilot extension sends to the server

Home Page: https://twitter.com/parth007_96/status/1546762772708413440

JavaScript 97.88% Python 0.46% HTML 1.66%

copilot-explorer's Introduction

Copilot-Explorer

This is a tool meant for exploring the codebase of Github Copilot (the client side, not the model itself).

It's work in progress. See the Journal for details on what's been done so far and my observations.

There's a blog post that explains the high level findings, and provides necessary code pointers.

Screenshots

Screenshot 1

Just show me the tool

You can access a version of the tool here.

This explores version 1.57.7193 of the VSCode extension of Copilot.

The webpage shows 3 panels:

  • Left most shows the module-level dependency graph of the extension. The edges are based on imports.
  • Middle panel shows the prettified code of the selected module. By default the main module is selected.
  • Right panel shows some information about the model (specifically, the module id, exports, imports and modules that import this module).

Module Names: I've also named modules -- some of them manually, while most of them were automatically named using codex in a few-shot manner. Some names are not unique, and I've not dealt with that. IDs of every module are unique though.

Module Categories: I've similarly also categorized modules automatically (again using codex and a bit of manual labeling). The categories are not perfect, but they serve as a very good guideline for segregating modules.

Manual annotations: Some of the modules were quite interesting, so I manually annotated them (added comments and renamed variables) to make them easier to understand. These are now directly viewable in the middle panel. Links below.

If you want to start browsing, here are some interesting starting points:

Interesting modules

Some interesting modules I've found so far (most interesting at the bottom):

How to run locally

If you want to play with the code (different transformations, different visualizations, etc.), you can run the tool locally and modify the code.

  1. Clone the repo
  2. Run npm install
  3. Run node index.js -- this processes the copilot extension code and produces modules by doing some automatic reverse engineering.

Steps 2 and 3 are optional. They're only needed if you modify the extension code or the transformation code. The repo already contains the processed modules.

  1. Run python3 code-viz/app.py to start the app.
  2. Head to localhost:5000 in your browser.

Support and Warranty

lmao

But seriously, this is all on a best-effort basis, I might've misunderstood a few things and so the conclusions might be slightly off. If you find something, do raise an issue or a PR.

copilot-explorer's People

Contributors

thakkarparth007 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.