2.1 KiB
IDE
Overview
TODO: Better explain in one sentence what this is and what its purpose is
The IDE is the text editor where you manually edit your code.
Details
TODO: Nate to brain dump anything important to know and Ty to shape into paragraphs
ide_protocol.pyis just the abstract version of what is implemented inide.py, andmain.pyruns bothnotebook.pyandide.pyas a single FastAPI server. This is the entry point to the Continue server, and acts as a bridge between IDE and React app- extension directory contains 1. The VS Code extension, whose code is in
extension/src, withextension.tsbeing the entry point, and 2. the Continue React app, in theextension/react-appfolder. This is displayed in the sidebar of VSCode, but is designed to work with any IDE that implements the protocol as is done inextension/src/continueIdeClient.ts.
Supported IDEs
VS Code
You can install the VS Code extension here
GitHub Codespaces
You can install the GitHub Codespaces extension here
IDE Protocol methods
handle_json
Handle a json message
showSuggestion
Show a suggestion to the user
getWorkspaceDirectory
Get the workspace directory
setFileOpen
Set whether a file is open
openNotebook
Open a notebook
showSuggestionsAndWait
Show suggestions to the user and wait for a response
onAcceptRejectSuggestion
Called when the user accepts or rejects a suggestion
onTraceback
Called when a traceback is received
onFileSystemUpdate
Called when a file system update is received
onCloseNotebook
Called when a notebook is closed
onOpenNotebookRequest
Called when a notebook is requested to be opened
getOpenFiles
Get a list of open files
getHighlightedCode
Get a list of highlighted code
readFile
Read a file
readRangeInFile
Read a range in a file
editFile
Edit a file
applyFileSystemEdit
Apply a file edit
saveFile
Save a file