autocomplete stopping improvement
This commit is contained in:
parent
520adeb511
commit
80557afb4f
2 changed files with 5 additions and 9 deletions
|
|
@ -79,7 +79,7 @@ export async function* stopAtSimilarLine(
|
|||
let lineQualifies = nextLine.length > 4 && trimmedLine.length > 4;
|
||||
if (
|
||||
lineQualifies &&
|
||||
(commonPrefixLength(nextLine.trim(), trimmedLine.trim()) > 8 ||
|
||||
(commonPrefixLength(nextLine.trim(), trimmedLine.trim()) > 12 ||
|
||||
distance(nextLine.trim(), trimmedLine) / trimmedLine.length < 0.1)
|
||||
) {
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -31,23 +31,19 @@ const val DEFAULT_CONFIG = """
|
|||
"slashCommands": [
|
||||
{
|
||||
"name": "edit",
|
||||
"description": "Edit highlighted code",
|
||||
"step": "EditHighlightedCodeStep"
|
||||
"description": "Edit highlighted code"
|
||||
},
|
||||
{
|
||||
"name": "comment",
|
||||
"description": "Write comments for the highlighted code",
|
||||
"step": "CommentCodeStep"
|
||||
"description": "Write comments for the highlighted code"
|
||||
},
|
||||
{
|
||||
"name": "share",
|
||||
"description": "Export the current chat session to markdown",
|
||||
"step": "ShareSessionStep"
|
||||
"description": "Export the current chat session to markdown"
|
||||
},
|
||||
{
|
||||
"name": "cmd",
|
||||
"description": "Generate a shell command",
|
||||
"step": "GenerateShellCommandStep"
|
||||
"description": "Generate a shell command"
|
||||
}
|
||||
],
|
||||
"customCommands": [
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue