дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-08 19:02:17 +02:00
perf: translate the sample output action and keep fake completion details out of the text catalog
Цей коміт міститься в:
1 джерело
7e7c5088f0
коміт
50b55ffc9e
2 files changed
+6
-1
No files matched your search
@@ -2251,6 +2251,7 @@
|
||||
"Stop and Rerun": "停止并重新运行",
|
||||
"Stop to Edit": "停止以编辑",
|
||||
"Stopped after {count} matches": "匹配 {count} 处后停止",
|
||||
"Stream Sample Output": "流式输出示例日志",
|
||||
"Strikeout": "删除线",
|
||||
"Struct": "结构体",
|
||||
"Struct type": "结构体类型",
|
||||
|
||||
@@ -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"),
|
||||
|
||||
Reference in new issue
Заблокувати користувача