perf: translate the sample output action and keep fake completion details out of the text catalog

Цей коміт міститься в:
l0ng-ai committed 2026-11-07 09:47:19 +08:00
1 джерело 7e7c5088f0
коміт 50b55ffc9e
2 files changed
+6 -1

No files matched your search

+1
Переглянути файл
@@ -2251,6 +2251,7 @@
"Stop and Rerun": "停止并重新运行",
"Stop to Edit": "停止以编辑",
"Stopped after {count} matches": "匹配 {count} 处后停止",
"Stream Sample Output": "流式输出示例日志",
"Strikeout": "删除线",
"Struct": "结构体",
"Struct type": "结构体类型",
+5 -1
Переглянути файл
@@ -48,6 +48,10 @@ const KINDS: CompletionKind[] = [
"keyword",
];
// Completion details as a language server reports them (code, not UI text).
const RESULT = "Promise<Result<Order>>";
const qualified = (name: string) => ["com", "acme", name].join(".");
function completionItem(i: number): CompletionItem {
const kind = KINDS[i % KINDS.length]!;
// Shared prefixes so typing narrows the list gradually, like real symbols.
@@ -55,7 +59,7 @@ function completionItem(i: number): CompletionItem {
return {
label,
labelDetail: kind === "method" || kind === "function" ? "(id: string, options?: Options)" : null,
detail: kind === "class" || kind === "interface" ? `com.acme.${label}` : "Promise<Result<Order>>",
detail: kind === "class" || kind === "interface" ? qualified(label) : RESULT,
kind,
documentation: null,
sortText: String(i).padStart(5, "0"),