fix: Improve line filtering in code completion
- Adjusted the condition to yield chunks only if not starting with certain characters - Ensured that empty lines or lines starting with ), ], or } are excluded - Optimized chunk filtering logic for better code completion accuracy
This commit is contained in:
parent
ff7d63539c
commit
e3eff72c43
@ -187,8 +187,7 @@ export class LLMStreamComplete {
|
||||
if (index > 0 && preIndent === 0 && lineIndent === 0) {
|
||||
break;
|
||||
}
|
||||
if (index > 0 && hasIndentBigger && lineIndent === this.curlineIndent && chunk.text.trim().length > 3) {
|
||||
yield chunk;
|
||||
if (index > 0 && hasIndentBigger && lineIndent === this.curlineIndent && chunk.text.trim().length > 0 && ![')',']', '}'].includes(chunk.text.trim()[0])) {
|
||||
break;
|
||||
}
|
||||
if (lineIndent > this.curlineIndent) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user