continuedev / continue

⏩ Continue is the leading open-source AI code assistant. You can connect any models and any context to build custom autocomplete and chat experiences inside VS Code and JetBrains
https://docs.continue.dev/
Apache License 2.0
18.99k stars 1.62k forks source link

add a "request a compilete after idle/hotkey/..." mode #1338

Closed Dawn-Xu-helloworld closed 1 month ago

Dawn-Xu-helloworld commented 5 months ago

Validations

Problem

For a no-GPU, self-host LLM, the previously compilete mode would make a lot of requests to server, but server can't deal with such a lot of requests.

Solution

So I think if we add a "request a response after keyboard idle for some times" or "after a hotkey" or after something, in order to make less requests and cost less computing resources, for a self-host server

sestinj commented 5 months ago

@Dawn-Xu-helloworld There are a couple of options to achieve this that you can already do within Continue. The first is that you can set a trigger key for inline suggestions.

To do this, add the following to your VS Code settings:

{
 "editor.inlineSuggest.enabled": false 
}

And add this to your keybindings settings file (you can choose any shortcut you'd like):

{
    "key": "alt+\\",
    "command": "editor.action.inlineSuggest.trigger"
  }

The second option is to increase the debounceDelay in Continue's config.json so that it won't send a request on every keystroke: https://docs.continue.dev/walkthroughs/tab-autocomplete#tabautocompleteoptions