Compare commits

..

2 commits

Author SHA1 Message Date
fbc588368e made completion depend on enable option 2025-08-04 17:53:33 -05:00
869fbc31bd updated prefix tokens 2025-08-04 17:53:19 -05:00
2 changed files with 7 additions and 4 deletions

View file

@ -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);

View file

@ -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;