Skip to content

Commit

Permalink
feat(ui): improve command palette item labels and add icons for bette…
Browse files Browse the repository at this point in the history
…r visibility
  • Loading branch information
Sma1lboy committed Dec 13, 2024
1 parent 3a49a37 commit 31b0fde
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions clients/vscode/src/commands/commandPalette.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
);
Expand All @@ -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"),
});
}

Expand Down Expand Up @@ -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"),
},
);

Expand Down

0 comments on commit 31b0fde

Please sign in to comment.