From 31b0fde55aaaa5e3c35a0b91a054da6639f77f78 Mon Sep 17 00:00:00 2001 From: Jackson Chen <541898146chen@gmail.com> Date: Thu, 12 Dec 2024 23:17:33 -0600 Subject: [PATCH] feat(ui): improve command palette item labels and add icons for better visibility --- clients/vscode/src/commands/commandPalette.ts | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/clients/vscode/src/commands/commandPalette.ts b/clients/vscode/src/commands/commandPalette.ts index bf4f1f8ebda6..173be27d66ea 100644 --- a/clients/vscode/src/commands/commandPalette.ts +++ b/clients/vscode/src/commands/commandPalette.ts @@ -35,16 +35,17 @@ export class CommandPalette { // Features section const validStatuses = ["ready", "readyForAutoTrigger", "readyForManualTrigger"]; if (validStatuses.includes(this.client.status.current?.status || "")) { + const iconPath = this.config.inlineCompletionTriggerMode === "automatic" ? new ThemeIcon("check") : undefined; + const labelPrefix = iconPath ? "" : MENU_ITEM_INDENT_SPACING; + items.push( { label: "enable/disable features", kind: QuickPickItemKind.Separator }, { - label: - (this.config.inlineCompletionTriggerMode === "automatic" ? "" : MENU_ITEM_INDENT_SPACING) + - "Code Completion", + label: labelPrefix + "Code Completion", detail: MENU_ITEM_INDENT_SPACING + "Toggle between automatic and manual completion mode", picked: this.config.inlineCompletionTriggerMode === "automatic", command: "tabby.toggleInlineCompletionTriggerMode", - iconPath: this.config.inlineCompletionTriggerMode === "automatic" ? new ThemeIcon("check") : undefined, + iconPath: iconPath, alwaysShow: true, }, ); @@ -53,8 +54,9 @@ export class CommandPalette { // Chat section if (this.client.chat.isAvailable) { items.push({ - label: "$(comment) Chat", + label: "Chat", command: "tabby.chatView.focus", + iconPath: new ThemeIcon("comment"), }); } @@ -87,9 +89,10 @@ export class CommandPalette { items.push( { label: "help & support", kind: QuickPickItemKind.Separator }, { - label: "$(question) Help", + label: "Help", description: "Open online documentation", command: "tabby.openOnlineHelp", + iconPath: new ThemeIcon("question"), }, );