Skip to content

Commit

Permalink
fix log
Browse files Browse the repository at this point in the history
  • Loading branch information
rjmacarthy committed Apr 4, 2024
1 parent 4685999 commit e0f7333
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/extension/providers/completion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -390,10 +390,10 @@ export class CompletionProvider implements InlineCompletionItemProvider {
return prompt
}

private logCompletion(completion: string, formattedCompletion: string) {
private logCompletion(formattedCompletion: string) {
this._logger.log(`
*** Twinny completion triggered for file: ${this._document?.uri} ***\n
Original completion: ${completion}\n
Original completion: ${this._completion}\n
Formatted completion: ${formattedCompletion}\n
Max Lines: ${this._maxLines}\n
Use file context: ${this._useFileContext}\n
Expand All @@ -409,10 +409,14 @@ export class CompletionProvider implements InlineCompletionItemProvider {

if (!editor || !this._position) return []



const formattedCompletion = new CompletionFormatter(editor).format(
this.removeStopWords(this._completion)
)

this.logCompletion(formattedCompletion)

if (this._cacheEnabled) cache.setCache(prefixSuffix, formattedCompletion)

this._completion = ''
Expand Down

0 comments on commit e0f7333

Please sign in to comment.