feat(completion): use all table name initials for aliases

This commit is contained in:
t8y2 committed 2026-07-21 16:38:53 +08:00
1 parent eb91f08369
commit bd3c647370
2 files changed
+25 -2

No files matched your search

+1 -2
View File
@@ -3403,8 +3403,7 @@ function buildAliasCandidates(tableName: string): string[] {
if (parts.length > 1) {
const initials = parts.map((part) => part[0]).join("");
if (initials.length >= 2) candidates.push(initials.slice(0, 2));
if (initials.length >= 3) candidates.push(initials.slice(0, 3));
if (initials.length >= 2) candidates.push(initials);
candidates.push(parts[0].slice(0, 2), parts[0].slice(0, 3));
} else {
const name = parts[0] ?? tableName.toLowerCase().replace(/[^a-z0-9]/g, "");