fix(completion): replace partially quoted identifiers

This commit is contained in:
t8y2 committed 2026-08-25 11:57:52 +08:00
1 parent e7ef9df85c
commit 9c90edabe3
4 files changed
+126 -7

No files matched your search

@@ -259,11 +259,13 @@ function semanticMutationTarget(model: SqlSemanticModel): SqlSemanticRowSource |
}
export function sqlCompletionContextFromSemantic(model: SqlSemanticModel, base: SqlCompletionContext): SqlCompletionContext {
if (model.cursorIntent.confidence === "low" || model.cursorIntent.kind === "suppressed") {
if (model.cursorIntent.kind === "suppressed") {
return base;
}
const replacementRange = model.cursorIntent.replacementRange;
if (model.cursorIntent.confidence === "low") return { ...base, replacementRange };
if ((base.suggestTables || base.exclusiveTableSuggestions) && model.cursorIntent.kind !== "table" && model.cursorIntent.kind !== "schema" && model.cursorIntent.kind !== "catalog" && model.cursorIntent.kind !== "delete_target") {
return base;
return { ...base, replacementRange };
}
const scope = sqlSemanticCompletionScope(model);
@@ -284,6 +286,7 @@ export function sqlCompletionContextFromSemantic(model: SqlSemanticModel, base:
return {
...base,
replacementRange,
prefix,
qualifier,
qualifierParts,