Skip to content

Commit

Permalink
Merge pull request #148 from rjmacarthy/development
Browse files Browse the repository at this point in the history
Fix star coder one line completions
  • Loading branch information
rjmacarthy committed Feb 29, 2024
2 parents 1e4518c + 0d01d02 commit d32d4b8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "twinny",
"displayName": "twinny - AI Code Completion and Chat",
"description": "Locally hosted AI code completion plugin for vscode",
"version": "3.7.6",
"version": "3.7.7",
"icon": "assets/icon.png",
"keywords": [
"code-inference",
Expand Down
2 changes: 1 addition & 1 deletion src/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export const QUOTES = ['"', '\'', '`']
export const ALL_BRACKETS = [...OPENING_BRACKETS, ...CLOSING_BRACKETS] as const
export const BRACKET_REGEX = /^[()[\]{}]+$/
export const NORMALIZE_REGEX = /\s*\r?\n|\r/g;
export const LINE_BREAK_REGEX = /\r?\n$/
export const LINE_BREAK_REGEX = /\r?\n|\r|\n/g
export const COMPLETION_TIMEOUT = 20000 // 20 seconds
export const MAX_CONTEXT_LINE_COUNT = 200

Expand Down
2 changes: 1 addition & 1 deletion src/extension/providers/completion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ export class CompletionProvider implements InlineCompletionItemProvider {
return (
!this._useMultiLine &&
this._chunkCount > 1 &&
LINE_BREAK_REGEX.exec(completionString)
LINE_BREAK_REGEX.test(completionString)
)
}

Expand Down

0 comments on commit d32d4b8

Please sign in to comment.