Repository: TabbyML/tabby
File: clients/vscode/src/commands/commandPalette.ts (TypeScript)

Code before:

  show() {
    const quickPick: QuickPick<CommandPaletteItem> = window.createQuickPick();
    quickPick.title = "Tabby Command Palette";
    let items: CommandPaletteItem[] = [];

    const disconnectStatues = ["disconnected", "unauthorized"];
    if (disconnectStatues.includes(this.client.status.current?.status || "")) {
      items.push(this.itemForStatus());
    }

    // Status section
    this.client.status.on("didChange", () => {
      items[0] = this.itemForStatus();
      quickPick.items = items;
    });

    // Features section
    const validStatuses = ["ready", "readyForAutoTrigger", "readyForManualTrigger"];
    if (validStatuses.includes(this.client.status.current?.status || "")) {
      items = items.concat([
        { label: "enable/disable features", kind: QuickPickItemKind.Separator },
        {
          label:
            (this.config.inlineCompletionTriggerMode === "automatic" ? "" : MENU_ITEM_INDENT_SPACING) +
            "Code Completions",
          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,
          alwaysShow: true,
        },
      ]);
    }

    // Chat section
    if (this.client.chat.isAvailable) {
      items.push({
        label: "$(comment) Chat",
        command: "tabby.chatView.focus",
      });
    }

    // Settings section
    items = items.concat([
      { label: "settings", kind: QuickPickItemKind.Separator },
      {
        label: "Connect to Server",
        command: "tabby.connectToServer",
        iconPath: new ThemeIcon("plug"),
      },

Review comment (suggestion):
```suggestion
            "Code Completion",
```

Code after:

  show() {
    const quickPick: QuickPick<CommandPaletteItem> = window.createQuickPick();
    quickPick.title = "Tabby Command Palette";
    const items: CommandPaletteItem[] = [];

    items.push({ label: "status", kind: QuickPickItemKind.Separator }, this.itemForStatus(), {
      label: "settings",
      kind: QuickPickItemKind.Separator,
    });

    // Status section
    this.client.status.on("didChange", () => {
      items[1] = this.itemForStatus();
      quickPick.items = items;
    });

    // 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: labelPrefix + "Code Completion",
          detail: MENU_ITEM_INDENT_SPACING + "Toggle between automatic and manual completion mode",
          picked: this.config.inlineCompletionTriggerMode === "automatic",
          command: "tabby.toggleInlineCompletionTriggerMode",
          iconPath: iconPath,
          alwaysShow: true,
        },
      );
    }

    // Chat section
    if (this.client.chat.isAvailable) {
      items.push({
        label: "Chat",
        command: "tabby.chatView.focus",
        iconPath: new ThemeIcon("comment"),
      });
    }

    // Settings section
    items.push(
      { label: "settings", kind: QuickPickItemKind.Separator },
      {
        label: "Connect to Server",
        command: "tabby.connectToServer",