Compare commits
2 commits
bdb615876d
...
fbc588368e
Author | SHA1 | Date | |
---|---|---|---|
fbc588368e | |||
869fbc31bd |
2 changed files with 7 additions and 4 deletions
|
@ -143,6 +143,9 @@ const tokenProvider = async (
|
|||
export const getAutoCompleteProvider = (extension: ExtensionState) => {
|
||||
const provider: vscode.InlineCompletionItemProvider = {
|
||||
async provideInlineCompletionItems(document, position, context, token) {
|
||||
if (!extension.configuration.inlineCompletion.enable) {
|
||||
return [];
|
||||
}
|
||||
try {
|
||||
const completions = await tokenProvider(extension, document, position, context, token);
|
||||
|
||||
|
|
|
@ -18,10 +18,10 @@ const KEY_INLINE_COMPLETION_TRIE_PRUNE_TIMEOUT = 'inlineCompletion.triePruneTime
|
|||
const DEFAULT_OLLAMA_HOST = 'http://localhost:11434';
|
||||
const DEFAULT_INLINE_COMPLETION_ENABLE = true;
|
||||
const DEFAULT_INLINE_COMPLETION_MODEL = 'deepseek-coder:6.7b';
|
||||
const DEFAULT_INLINE_COMPLETION_PREFIX_START = '<prefixStart>';
|
||||
const DEFAULT_INLINE_COMPLETION_PREFIX_ENDS = ['<prefixStart>', '</prefixStart>', '<prefixEnd>', '</prefixEnd>'].join();
|
||||
const DEFAULT_INLINE_COMPLETION_SUFFIX_START = '<suffixStart>';
|
||||
const DEFAULT_INLINE_COMPLETION_SUFFIX_END = '</suffixStart>';
|
||||
const DEFAULT_INLINE_COMPLETION_PREFIX_START = '<|prefix_start|>';
|
||||
const DEFAULT_INLINE_COMPLETION_PREFIX_ENDS = ['<|prefix_start|>', '<|prefix_end|>'].join();
|
||||
const DEFAULT_INLINE_COMPLETION_SUFFIX_START = '<|suffix_start|>';
|
||||
const DEFAULT_INLINE_COMPLETION_SUFFIX_END = '<|suffix_end|>';
|
||||
const DEFAULT_INLINE_COMPLETION_MAX_TOKENS = 50;
|
||||
const DEFAULT_INLINE_COMPLETION_GENERATION_TIMEOUT = 200;
|
||||
const DEFAULT_INLINE_COMPLETION_TRIE_PRUNE_TIMEOUT = 10000;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue