ArgCodertension for AI Code generation
[Note] This fork adapts the original extension so as to work with custom inference endpoints.
Original AI: https://huggingface.co/bigcode/starcoder
AI prompt generating code for you from cursor selection.
Usage:
If you use extension on first time
-
Register on https://huggingface.co
-
Generate bearer token from this page https://huggingface.co/settings/tokens
After
-
Select your prompt in code using cursor selection
-
Press Ctrl+Alt+P for generating prompt OR type in shell (Ctrl+Shift+P)
ArgCoder: Init prompt with selected code
-
(If you use extension on first time) enter bearer token from https://huggingface.co/settings/tokens (page will be opened)
-
PROFIT!
-
If you want to continue request select all output including original prompt and repeat steps
Good prompt:
//POST Request on JSON to url variable
//Params: url, object
function /* Good variant use Language syntax */
Result:
Bad prompt:
//Create JavaScript function for send POST request using fetch
Result:
This extension contributes the following settings:
ArgCoder.countofrequests
: Set requests count per command (Default: 4. Less count -> less answer, faster loading)ArgCoder.bearertoken
: Set bearer token for API https://huggingface.co
Added error message when reference API is offline
Added cancel button
Fixed blinking code when output was adding to editor
Added message error when internet is disconnected
Added commands in command palette
Fixed sometimes removing code
Downgraded VS Code engine supported to 1.67.0
Minor Fixes
Added progress
Fix reset with bearer token
Fix reset with bearer token when selection is empty
Fix reset with bearer token
First beta release