-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
Feature Request: support sub-commands in CopilotChat.nvim #5
Comments
I was not aware of these features (Not a user of VScode). Thank you. I will look into this. |
I'm really interested in this, since my main reason for still using Copilot on VS Code is the /workspace sub-command. It lets you make questions to CoPilot on the context of the whole local codebase. It's amazing for exploring and understand projects you had no prior contact with. That's what actually made me renew my copilot license. I wonder if this kind of feature is even accessible outside VS Code, though, or if it uses VS Code internals to guess which files it have to look at. |
This comment was marked as outdated.
This comment was marked as outdated.
I'll have to abandon porting everything to lua since this might be a bit too complicated for me to do in a new language |
Edit: I haven't updated VScode in a loooong time |
Hi @gptlang Just FYI - I have just watched this video about how |
I'm still working on this. Running into a bit of trouble. During the embedding request, it sends each function/class with ... for omitted code. I don't know how they parse/identify the functions. e.g. File: `rplugin/python3/copilot.py`
```py
class Copilot:
...
def request_auth(self):
url = "https://github.com/login/device/code"
response = self.session.post(
url,
headers=LOGIN_HEADERS,
data=json.dumps({
"client_id": "Iv1.b507a08c87ecfe98",
"scope": "read:user"
})
).json()
return response
... File: `rplugin/python3/copilot.py`
```py
class Copilot:
def __init__(self, token: str = None):
if token is None:
token = utilities.get_cached_token()
self.github_token = token
self.token: dict[str, any] = None
self.chat_history: list[typings.Message] = []
self.vscode_sessionid: str = None
self.machineid = utilities.random_hex()
self.session = requests.Session()
... |
Maybe tree sitter? Not sure how to ensure that the parser for any specific language is installed. |
This is awesome work gptlang! I now use copilot and copilotchat with vsplit. works like a charm! made my day! :) |
Thank you for the wonderful plugin.
|
@neutrinoA4 thanks for the suggestion! Is this language agnostic (via tree-sitter) or specific to Python? |
@gptlang
For example, struct in rust language is "struct_item", |
* chore: sync fork * feat: add option to change view mode * chore: sync the change from CopilotC-Nvim#9 * docs: add new usage to canary branch fix: typo on usage * chore: sync fork chore: sync the fork chore: sync fork chore: sync fork * feat: add spinner * feat: show spinner on processing * chore: sync fork
I think #360 is better description for remainder of this, as we already have subcommands, we just dont have full context awareness, so closing as duplicate |
Context
GitHub Copilot for VS Code offers a range of useful sub-commands like /new, /fix, /explain, and /tests that enhance the coding experience. These commands allow users to generate new code, fix issues, get explanations, and write tests efficiently.
Proposal
Integrate these sub-commands into CopilotChat.nvim to bring similar functionalities to Neovim. Below are the specific commands and their intended functionalities:
Technical Considerations
GCFIX
,GCTests
, etc for each sub command.Request for Feedback
I am not sure about the feasibility of this without Github Copilot team input. Let me know if you have any thoughts on plan on this. @gptlang Thanks for great work for bring this plugin to Neovim community. 👏
The text was updated successfully, but these errors were encountered: