-
-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor the plugin to be lua-based #83
Conversation
Signed-off-by: Tomas Slusny <[email protected]>
Also added support for prompt.mapping + example |
Added some more examples to prompts with overriding and references |
…naming of USER_ prompts
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) |
I'll do some experiments and see if it works |
Notes:
|
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 <[email protected]>
3d323d1
to
a4221f1
Compare
WIP here: https://github.com/gptlang/tiktoken.lua |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great. Amazing work @deathbeam Let me merge to canary and test. Thanks.
* Refactor the plugin to be lua-based Signed-off-by: Tomas Slusny <[email protected]> * 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 <[email protected]> --------- Signed-off-by: Tomas Slusny <[email protected]>
Changes
chat.ask('Hello', { window = { layout = 'float' } })
)CopilotChatVisual
andCopilotChatBuffer
, this can be handled with selectors insteadCopilotChat
now 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