Refactor the plugin to be lua-based#83
Merged
jellydn merged 7 commits intoCopilotC-Nvim:canaryfrom Feb 28, 2024
Merged
Conversation
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
deathbeam
added a commit
to deathbeam/dotfiles
that referenced
this pull request
Feb 27, 2024
Collaborator
Author
|
Also added support for prompt.mapping + example |
Collaborator
Author
|
Added some more examples to prompts with overriding and references |
…naming of USER_ prompts
Contributor
|
Thank you for your work!
Perhaps we could strip Python entirely and use tiktoken as a shared object (it's written in rust: https://github.com/openai/tiktoken/blob/main/src/lib.rs) |
Contributor
|
I'll do some experiments and see if it works |
Contributor
|
Notes:
|
Contributor
|
Looks like I need to refactor the library to use functional programming to pass around state. Reference: mlua-rs/mlua#130 |
…w layout properly
Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
3d323d1 to
a4221f1
Compare
Contributor
jellydn
approved these changes
Feb 28, 2024
Contributor
jellydn
left a comment
There was a problem hiding this comment.
Great. Amazing work @deathbeam Let me merge to canary and test. Thanks.
gptlang
pushed a commit
that referenced
this pull request
Feb 28, 2024
* Refactor the plugin to be lua-based Signed-off-by: Tomas Slusny <slusnucky@gmail.com> * Add open/close/toggle commands and function * Add support for prompt.mapping to map prompts to keys * Fix issue with system_prompt replace not using correct value and fix naming of USER_ prompts * Move some of chat buffer logic to separate file, allow changing window layout properly * Disable python part of the plugin for now * Fix check if message is copilot message Signed-off-by: Tomas Slusny <slusnucky@gmail.com> --------- Signed-off-by: Tomas Slusny <slusnucky@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
chat.ask('Hello', { window = { layout = 'float' } }))CopilotChatVisualandCopilotChatBuffer, this can be handled with selectors insteadCopilotChatnow behaves like CopilotChatVisual, with configurable selector for unnamed buffer. It looked like unnamed buffer was workaround with some selection issues anyway but with new selector system I can just pass whatever data I want to the commandsTODO
New config example
Media
Floating window
Completion