Open asukaminato0721 opened 4 days ago
I like the idea!
cons: increase the cost, the ai will generate different answers each time, the respond speed, etc.
We could cache the responses to make it fast on second hover & keep the result consistent. We could provide a "clear cache" code action in the lsp to clear the generated text if it is unsatisfactory, either global or based on the cursor position to clear the llm-generated content. Could be regenerate rather than clear cache as well (the code action).
@SilasMarvin this would play well with what is stored in the memory backend & could add context to the function by fetching from the vector store.
some other ideas:
hover action add test case for functions.
hover action refactor functions.
I like the idea!
cons: increase the cost, the ai will generate different answers each time, the respond speed, etc.
We could cache the responses to make it fast on second hover & keep the result consistent. We could provide a "clear cache" code action in the lsp to clear the generated text if it is unsatisfactory, either global or based on the cursor position to clear the llm-generated content. Could be regenerate rather than clear cache as well (the code action).
@SilasMarvin this would play well with what is stored in the memory backend & could add context to the function by fetching from the vector store.
Providing documentation is a really cool idea. I don't know how this plays with other language servers. If they have a language server that already provides documentation will the editor pull from both? If I understand correctly we would need to support the textDocument/hover
capability unless we want to provide this as a custom function?
some other ideas:
hover action add test case for functions.
hover action refactor functions.
Code actions could be incredibly cool! I really love this. Its not the top priority on my list, but I will start looking into it. We should come up with a list of codeactions we want to provide, or we should come up with a way for users to be able to configure their own?
when coding with llm, we often ask llm what's one function/one part of code's functionality.
but traditional lsp could only show comment and function signatures.
so if onhover could also query the functionality, will be useful.
pros: more info from llm.
cons: increase the cost, the ai will generate different answers each time, the respond speed, etc.