Code Monkey home page Code Monkey logo

old's Introduction

cursor-codemirror

Hello! This is an old version of Cursor based off of the Codemirror text editing component. If you're looking to build your own code editor from the ground-up, this may serve as a useful guide ๐Ÿ™‚ Cursor is now based on a fork of VSCodium.


Features

  • Standard navigation abilities: file tree, "Command P", ripgrep-based search
  • Editing table-stakes: split-panes, tabs
  • Deep language server support: intellisense, go-to-definition, code actions, linting, symantic syntax highlighting
  • Built-in versions of popular extensions: Copilot, Vim/Emacs keys, (beta) Remote-SSH
  • AI Features: auto-generated inline diffs and completions, a ChatGPT-style embedded chat, on-hover documentation suggestions

Development

To get started:

git clone [email protected]:getcursor/cursor.git
cd cursor
npm i

Then, download some non-versioned dependencies (ripgrep binaries and language server js):

./setup.sh # Mac/Linux
./setup.ps1 # Windows

Finally, to run the client:

npm start

Acknowledgements

Thank you to Marijn Haverbeke for his work on Codemirror v6. Other open source dependencies that are critical to this editor include: Electron, React, Pylsp, LSP Copilot, Ripgrep, Replit's many CM packages, and Watcher. Thank you to everyone who filed bugs/suggestions on this version of the editor (especially Dan for organizing them).

Finally, thank you the members of our community who contributed to Cursor's development, including: Liam, Edoardo, Edwiin, Abby, Mileta, ๅญŸๅฅ, Chen, and many others.

old's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

old's Issues

How to run locally with AI features

Greetings!

Much appreciation for this open source drop! Wow, what a treasure trove of reference implementations for various editor features on top of CodeMirror! Many many thanks for releasing this.

I got it running locally, and most features appear to work. However the AI generative features don't. I suspect I'm missing the access token part.

I noticed this part here:

export interface ToolState {
    openLeftTab: 'search' | 'filetree'
    leftTabActive: boolean
    fileSearchTriggered: boolean
    commandPaletteTriggered: boolean
    aiCommandPaletteTriggered: boolean
    leftSideExpanded: boolean
    cursorLogin: {
        accessToken?: string // Can I use this? Does it depend on Cursor's servers? Can I use an OpenAI API key?
        profile?: string
        stripeId?: string
    }
}

I was just wondering if it might be possible to execute the AI completions against OpenAI directly, rather than going through Cursor's server as seen in API_ROOT defaulting to 'https://aicursor.com' in chatThunks:

// Hit the diffs endpoint
const server = `${API_ROOT}/continue/`
const response = await fetch(server, {
    method: 'POST',
    headers: {
        'Content-Type': 'application/json',
        ...getBearerTokenHeader(getState),
        // Cookie: `repo_path=${state.global.rootPath}`,
    },
    //credentials: 'include',
    body: JSON.stringify(data),
}).then(async (resp) => {

Thanks a ton!

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.