- Notifications
You must be signed in to change notification settings - Fork11
Codeium code completion integration for CodeMirror 6
License
val-town/codemirror-codeium
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
flowchart TDKeystroke --> SetTimeoutKeystroke -->|ignoreUpdate| CancelledSetTimeout -->|edits| CancelledSetTimeout --> GetCompletionsGetCompletions -->|edits| CancelledX[ ] -->|focusChanged| CancelledGetCompletions --> DispatchEditsDispatchEdits -->|mousedown| CancelledDispatchEdits --> SameKeyCommandSameKeyCommand -->|tab| AcceptSuggestionCommandVery experimental and unofficial
Copilot-like ghost text code frommodeling-appbyJess Frazelle and based onCursor.
See thedemo source code fora reference to how it's used.
import{copilotPlugin}from"@valtown/codemirror-codeium";// This is a CodeMirror extensioncopilotPlugin();
This adds a.ghostText class to CodeMirror decorations for the AI-writtentext. You can add your own style for this class. The demo uses this style:
.cm-ghostText,.cm-ghostText* {opacity:0.6;filter:grayscale(20%);cursor: pointer;}.cm-ghostText:hover {background:#eee;}
This makes requests against theCodeium hosted product,using their Protocol Buffer-based interface. That's what thebuf andconnectrpcmodules are doing - generating and using bindings to their service.
The extension is a composite of facets, decorations, state fields, and morethat are encapsulated.
About
Codeium code completion integration for CodeMirror 6
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors4
Uh oh!
There was an error while loading.Please reload this page.