From 50b55ffc9e4bf0cb4f92e8bb96f6edcb1bbdfd99 Mon Sep 17 00:00:00 2001 From: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com> Date: Sat, 7 Nov 2026 09:47:19 +0800 Subject: [PATCH] perf: translate the sample output action and keep fake completion details out of the text catalog --- src/platform/locales/text/zh.json | 1 + src/workbench/perfProbe.ts | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/platform/locales/text/zh.json b/src/platform/locales/text/zh.json index 0d87f187e..2030f9dd0 100644 --- a/src/platform/locales/text/zh.json +++ b/src/platform/locales/text/zh.json @@ -2251,6 +2251,7 @@ "Stop and Rerun": "停止并重新运行", "Stop to Edit": "停止以编辑", "Stopped after {count} matches": "匹配 {count} 处后停止", + "Stream Sample Output": "流式输出示例日志", "Strikeout": "删除线", "Struct": "结构体", "Struct type": "结构体类型", diff --git a/src/workbench/perfProbe.ts b/src/workbench/perfProbe.ts index 1b84eefdf..1893d064e 100644 --- a/src/workbench/perfProbe.ts +++ b/src/workbench/perfProbe.ts @@ -48,6 +48,10 @@ const KINDS: CompletionKind[] = [ "keyword", ]; +// Completion details as a language server reports them (code, not UI text). +const RESULT = "Promise>"; +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>", + detail: kind === "class" || kind === "interface" ? qualified(label) : RESULT, kind, documentation: null, sortText: String(i).padStart(5, "0"),