import type { SettingSearchRecord } from "../types/search";
import { IS_MAC } from "@/utils/platform";

export const settingsSearchIndex: SettingSearchRecord[] = [
  // Enterprise Settings
  {
    id: "enterprise-managed-mode",
    tab: "enterprise",
    section: "Enterprise Controls",
    label: "Managed Mode",
    description: "Enforce enterprise policy controls in the desktop app",
    keywords: ["enterprise", "managed", "policy", "organization", "admin"],
  },
  {
    id: "enterprise-extension-allowlist-toggle",
    tab: "enterprise",
    section: "Enterprise Controls",
    label: "Require Extension Allowlist",
    description: "Only approved extension IDs can be installed or updated",
    keywords: ["enterprise", "extensions", "allowlist", "policy", "security"],
  },
  {
    id: "enterprise-allow-byok",
    tab: "enterprise",
    section: "Enterprise Controls",
    label: "Allow BYOK Autocomplete",
    description: "Allow user-provided OpenRouter keys for autocomplete",
    keywords: ["enterprise", "byok", "openrouter", "autocomplete", "api", "key"],
  },
  {
    id: "enterprise-ai-completion",
    tab: "enterprise",
    section: "Enterprise Controls",
    label: "Enable AI Autocomplete",
    description: "Enable inline AI completion for enterprise users",
    keywords: ["enterprise", "ai", "autocomplete", "completion"],
  },
  {
    id: "enterprise-ai-chat",
    tab: "enterprise",
    section: "Enterprise Controls",
    label: "Enable AI Chat",
    description: "Enable AI chat panel for enterprise users",
    keywords: ["enterprise", "ai", "chat", "panel"],
  },
  {
    id: "enterprise-extension-allowlist-entries",
    tab: "enterprise",
    section: "Extension Allowlist",
    label: "Extension Allowlist",
    description: "Approved extension IDs for enterprise-managed environments",
    keywords: ["enterprise", "extensions", "ids", "allowlist", "approved"],
  },

  // Editor Settings
  {
    id: "editor-auto-save",
    tab: "editor",
    section: "Saving",
    label: "Auto Save",
    description: "Automatically save files when editing",
    keywords: ["save", "automatic", "files"],
  },
  {
    id: "editor-font-family",
    tab: "editor",
    section: "Typography",
    label: "Editor Font Family",
    description: "Font family for code editor",
    keywords: ["font", "editor", "code", "typography", "family", "monospace"],
  },
  {
    id: "editor-font-size",
    tab: "editor",
    section: "Typography",
    label: "Font Size",
    description: "Editor font size in pixels",
    keywords: ["font", "size", "editor", "typography"],
  },
  {
    id: "editor-line-height",
    tab: "editor",
    section: "Typography",
    label: "Line Height",
    description: "Editor line height multiplier",
    keywords: ["line", "height", "spacing", "editor", "typography"],
  },
  {
    id: "editor-tab-size",
    tab: "editor",
    section: "Typography",
    label: "Tab Size",
    description: "Number of spaces per tab",
    keywords: ["tab", "size", "indentation", "spaces"],
  },
  {
    id: "editor-word-wrap",
    tab: "editor",
    section: "Display",
    label: "Word Wrap",
    description: "Wrap lines that exceed viewport width",
    keywords: ["word", "wrap", "lines", "display"],
  },
  {
    id: "editor-line-numbers",
    tab: "editor",
    section: "Display",
    label: "Line Numbers",
    description: "Show line numbers in the editor",
    keywords: ["line", "numbers", "gutter", "display"],
  },
  {
    id: "editor-show-minimap",
    tab: "editor",
    section: "Display",
    label: "Show Minimap",
    description: "Show a minimap overview of the code on the right side of the editor",
    keywords: ["minimap", "overview", "code", "preview", "display"],
  },
  {
    id: "editor-relative-line-numbers",
    tab: "editor",
    section: "Display",
    label: "Relative Line Numbers",
    description: "Show relative numbers when Vim mode is active",
    keywords: ["line", "numbers", "relative", "vim"],
  },
  {
    id: "editor-vim-mode",
    tab: "editor",
    section: "Input",
    label: "Vim Mode",
    description: "Enable vim keybindings and commands",
    keywords: ["vim", "keybindings", "modal", "editing"],
  },
  {
    id: "editor-max-open-tabs",
    tab: "editor",
    section: "Tabs",
    label: "Max Open Tabs",
    description: "Maximum number of tabs before oldest closes",
    keywords: ["tabs", "limit", "maximum", "open"],
  },

  // File Tree Settings
  {
    id: "file-tree-indent-size",
    tab: "file-explorer",
    section: "Display",
    label: "Indent Size",
    description: "Pixels per nesting level in the file tree",
    keywords: ["indent", "indentation", "nesting", "depth", "tree", "file explorer", "spacing"],
  },
  {
    id: "file-tree-show-hidden-files",
    tab: "file-explorer",
    section: "Display",
    label: "Show Hidden Files",
    description: "Show dotfiles and hidden directories in the file tree",
    keywords: ["hidden", "dotfiles", "dotfile", "files", "folders", "directories", "visibility"],
  },
  {
    id: "file-tree-compact-folders",
    tab: "file-explorer",
    section: "Display",
    label: "Compact Folders",
    description: "Collapse single-child folder chains in the file tree",
    keywords: ["compact", "folders", "directories", "single child", "collapse", "nested"],
  },
  {
    id: "file-tree-density",
    tab: "file-explorer",
    section: "Display",
    label: "Density",
    description: "Choose file tree row spacing",
    keywords: ["density", "spacing", "compact", "comfortable", "rows", "height"],
  },
  {
    id: "file-tree-respect-gitignore",
    tab: "file-explorer",
    section: "Display",
    label: "Respect .gitignore",
    description: "Hide files matched by root and nested .gitignore files",
    keywords: ["gitignore", ".gitignore", "ignored", "git", "files", "visibility", "exclude"],
  },
  {
    id: "file-tree-hidden-file-patterns",
    tab: "file-explorer",
    section: "Filters",
    label: "Hidden File Patterns",
    description: "Files matching these glob patterns will be hidden from the file tree",
    keywords: ["hidden", "files", "patterns", "glob", "filter", "exclude"],
  },
  {
    id: "file-tree-hidden-directory-patterns",
    tab: "file-explorer",
    section: "Filters",
    label: "Hidden Directory Patterns",
    description: "Directories matching these glob patterns will be hidden from the file tree",
    keywords: ["hidden", "directories", "folders", "patterns", "glob", "filter", "exclude"],
  },
  {
    id: "git-folder-based-changes",
    tab: "git",
    section: "Git View",
    label: "Folder-Based Changes",
    description: "Show Git changes in a folder tree, similar to Files",
    keywords: ["git", "changes", "folder", "tree", "files", "explorer", "sidebar"],
  },
  {
    id: "git-confirm-before-discard",
    tab: "git",
    section: "Integration",
    label: "Confirm Before Discard",
    description: "Show a confirmation before discarding Git changes",
    keywords: ["git", "discard", "confirm", "danger", "revert"],
  },
  {
    id: "git-auto-refresh-status",
    tab: "git",
    section: "Integration",
    label: "Auto Refresh Git Status",
    description: "Refresh Git status automatically after relevant file and Git events",
    keywords: ["git", "refresh", "auto", "status", "save"],
  },
  {
    id: "git-show-untracked-files",
    tab: "git",
    section: "Git View",
    label: "Show Untracked Files",
    description: "Display untracked files in the Git view",
    keywords: ["git", "untracked", "files", "status"],
  },
  {
    id: "git-show-staged-first",
    tab: "git",
    section: "Git View",
    label: "Show Staged First",
    description: "Render staged changes before unstaged changes",
    keywords: ["git", "staged", "order", "changes"],
  },
  {
    id: "git-default-diff-view",
    tab: "git",
    section: "Git View",
    label: "Default Diff View",
    description: "Choose unified or split as the default diff layout",
    keywords: ["git", "diff", "split", "unified", "layout"],
  },
  {
    id: "git-open-diff-on-click",
    tab: "git",
    section: "Git View",
    label: "Open Diff On Click",
    description: "Open a diff directly when clicking a changed file",
    keywords: ["git", "diff", "click", "open", "file"],
  },
  {
    id: "git-show-status-in-file-tree",
    tab: "git",
    section: "File Tree",
    label: "Show Git Status In File Tree",
    description: "Display Git decorations in Files",
    keywords: ["git", "file tree", "files", "file explorer", "decorations", "status"],
  },
  {
    id: "git-compact-status-badges",
    tab: "git",
    section: "Git View",
    label: "Compact Git Status Badges",
    description: "Use denser diff stats and staged indicators in the Git panel",
    keywords: ["git", "compact", "badges", "status", "dense"],
  },
  {
    id: "git-collapse-empty-sections",
    tab: "git",
    section: "Git View",
    label: "Collapse Empty Sections",
    description: "Hide empty sections in the Git panel",
    keywords: ["git", "collapse", "empty", "sections", "staged"],
  },
  {
    id: "git-remember-last-panel-mode",
    tab: "git",
    section: "Git View",
    label: "Remember Last Git Panel Mode",
    description: "Restore the last open stash or history panel section",
    keywords: ["git", "remember", "panel", "stash", "history"],
  },
  {
    id: "git-enable-inline-blame",
    tab: "git",
    section: "Editor",
    label: "Enable Inline Blame",
    description: "Show inline Git blame metadata in the editor",
    keywords: ["git", "blame", "inline", "editor"],
  },
  {
    id: "git-enable-gutter",
    tab: "git",
    section: "Editor",
    label: "Enable Git Gutter",
    description: "Show Git gutter indicators in the editor",
    keywords: ["git", "gutter", "editor", "modified", "added", "deleted"],
  },

  // Appearance Settings
  {
    id: "appearance-theme",
    tab: "appearance",
    section: "Theme",
    label: "Color Theme",
    description: "Choose your preferred color theme",
    keywords: ["theme", "color", "appearance", "dark", "light"],
  },
  {
    id: "appearance-sync-system-theme",
    tab: "appearance",
    section: "Theme",
    label: "Sync With OS",
    description:
      "Follow the operating system appearance and switch light or dark themes automatically",
    keywords: ["theme", "system", "os", "auto", "light", "dark", "appearance", "sync"],
  },
  {
    id: "appearance-auto-theme-light",
    tab: "appearance",
    section: "Theme",
    label: "Preferred Light Theme",
    description: "Theme to use while the operating system is in light appearance",
    keywords: ["theme", "light", "system", "os", "auto", "appearance"],
  },
  {
    id: "appearance-auto-theme-dark",
    tab: "appearance",
    section: "Theme",
    label: "Preferred Dark Theme",
    description: "Theme to use while the operating system is in dark appearance",
    keywords: ["theme", "dark", "system", "os", "auto", "appearance"],
  },
  {
    id: "appearance-icon-theme",
    tab: "appearance",
    section: "Theme",
    label: "Icon Theme",
    description: "Icons displayed in the file tree and tabs",
    keywords: ["icon", "theme", "file", "tree", "tabs"],
  },
  {
    id: "appearance-ui-font",
    tab: "appearance",
    section: "Typography",
    label: "UI Font Family",
    description: "Font family for UI elements (file tree, markdown, etc.)",
    keywords: ["font", "ui", "typography", "family"],
  },
  {
    id: "appearance-ui-font-size",
    tab: "appearance",
    section: "Typography",
    label: "UI Font Size",
    description: "Adjust UI text and icon scale in 0.5px steps",
    keywords: ["font", "size", "ui", "icon", "scale", "typography"],
  },
  {
    id: "appearance-sidebar-position",
    tab: "appearance",
    section: "Layout",
    label: "Sidebar Position",
    description: "Choose where to position the sidebar",
    keywords: ["sidebar", "position", "left", "right", "layout"],
  },
  {
    id: "appearance-sidebar-tabs-position",
    tab: "appearance",
    section: "Layout",
    label: "Sidebar Tabs",
    description: "Show sidebar activity tabs across the top or in a left rail",
    keywords: ["sidebar", "tabs", "activity", "top", "left", "rail", "layout"],
  },
  ...(IS_MAC
    ? [
        {
          id: "appearance-native-menu-bar",
          tab: "appearance",
          section: "Layout",
          label: "Native Menu Bar",
          description: "Use the native menu bar or a custom UI menu bar",
          keywords: ["menu", "bar", "native", "ui"],
        } satisfies SettingSearchRecord,
      ]
    : []),
  {
    id: "appearance-compact-menu-bar",
    tab: "appearance",
    section: "Layout",
    label: "Compact Menu Bar",
    description: "Requires UI menu bar; compact hamburger or full UI menu",
    keywords: ["menu", "bar", "compact", "hamburger", "ui"],
  },
  {
    id: "appearance-title-bar-project-mode",
    tab: "appearance",
    section: "Layout",
    label: "Title Bar Project Mode",
    description: "Show project tabs or a single window-style title in the custom title bar",
    keywords: ["title", "bar", "project", "tabs", "window", "mode"],
  },
  {
    id: "appearance-open-folders-new-window",
    tab: "appearance",
    section: "Layout",
    label: "Open Projects In New Window",
    description:
      "When the current window already has a project, opening another folder uses a separate window",
    keywords: ["open", "folder", "project", "new", "window", "separate"],
  },

  // Database Settings
  {
    id: "databases-new-connection",
    tab: "databases",
    section: "Connections",
    label: "New Connection",
    description:
      "Open the database connection dialog to connect to SQLite, PostgreSQL, MySQL, MongoDB, or Redis",
    keywords: [
      "database",
      "connection",
      "sqlite",
      "postgres",
      "mysql",
      "mongodb",
      "redis",
      "connect",
    ],
  },
  {
    id: "databases-saved-connections",
    tab: "databases",
    section: "Connections",
    label: "Saved Connections",
    description: "Manage saved network database connections",
    keywords: [
      "database",
      "saved",
      "connections",
      "postgres",
      "mysql",
      "mongodb",
      "redis",
      "remove",
    ],
  },

  // AI Settings
  {
    id: "ai-provider-model",
    tab: "ai",
    section: "Athas Agent",
    label: "Provider & Model",
    description: "Choose the provider and model used by Athas Agent",
    keywords: ["ai", "provider", "model", "llm", "service", "agent"],
  },
  {
    id: "ai-ollama-endpoint",
    tab: "ai",
    section: "Ollama",
    label: "Ollama Endpoint",
    description: "Base URL for the Ollama API server",
    keywords: ["ollama", "endpoint", "url", "local", "lan", "cloud", "host", "port"],
  },
  {
    id: "ai-custom-provider",
    tab: "ai",
    section: "Custom Provider",
    label: "Custom Provider",
    description: "Configure an OpenAI-compatible base URL, model, and optional API key",
    keywords: ["ai", "custom", "provider", "endpoint", "base", "url", "api", "key", "model"],
  },
  {
    id: "ai-ollama-api-key",
    tab: "ai",
    section: "Ollama",
    label: "Ollama API Key",
    description: "Bearer token for Ollama Cloud (optional for local servers)",
    keywords: ["ollama", "api", "key", "token", "auth", "cloud", "bearer"],
  },
  {
    id: "ai-default-session-mode",
    tab: "ai",
    section: "Agent Defaults",
    label: "Default Session Mode",
    description: "Default mode for ACP agent sessions",
    keywords: ["ai", "session", "mode", "default", "agent", "acp"],
  },
  {
    id: "ai-autocomplete",
    tab: "ai",
    section: "Autocomplete",
    label: "AI Completion",
    description: "Enable AI autocomplete while typing",
    keywords: ["ai", "autocomplete", "completion", "openrouter"],
  },
  {
    id: "ai-autocomplete-model",
    tab: "ai",
    section: "Autocomplete",
    label: "Autocomplete Model",
    description: "Choose any OpenRouter model for autocomplete",
    keywords: ["ai", "model", "autocomplete", "openrouter"],
  },
  {
    id: "ai-clear-chats",
    tab: "ai",
    section: "Chat History",
    label: "Clear All Chats",
    description: "Permanently delete all chat history",
    keywords: ["ai", "chat", "clear", "delete", "history"],
  },

  // Keyboard Settings
  {
    id: "keyboard-quick-file-open",
    tab: "keyboard",
    section: "File Operations",
    label: "Quick File Open",
    description: "Open file picker",
    keywords: ["keyboard", "shortcut", "file", "open", "picker"],
  },
  {
    id: "keyboard-save-file",
    tab: "keyboard",
    section: "File Operations",
    label: "Save File",
    description: "Save current file",
    keywords: ["keyboard", "shortcut", "save", "file"],
  },
  {
    id: "keyboard-new-file",
    tab: "keyboard",
    section: "File Operations",
    label: "New File",
    description: "Create new file",
    keywords: ["keyboard", "shortcut", "new", "file", "create"],
  },
  {
    id: "keyboard-close-tab",
    tab: "keyboard",
    section: "File Operations",
    label: "Close Tab",
    description: "Close current tab",
    keywords: ["keyboard", "shortcut", "close", "tab"],
  },
  {
    id: "keyboard-command-palette",
    tab: "keyboard",
    section: "Navigation",
    label: "Command Palette",
    description: "Open command palette",
    keywords: ["keyboard", "shortcut", "command", "palette"],
  },
  {
    id: "keyboard-toggle-sidebar",
    tab: "keyboard",
    section: "Navigation",
    label: "Toggle Sidebar",
    description: "Show/hide sidebar",
    keywords: ["keyboard", "shortcut", "sidebar", "toggle"],
  },
  {
    id: "keyboard-go-to-line",
    tab: "keyboard",
    section: "Navigation",
    label: "Go to Line",
    description: "Jump to specific line",
    keywords: ["keyboard", "shortcut", "go", "line", "jump", "navigate"],
  },
  {
    id: "keyboard-next-tab",
    tab: "keyboard",
    section: "Navigation",
    label: "Next Tab",
    description: "Switch to next tab",
    keywords: ["keyboard", "shortcut", "tab", "next", "switch"],
  },
  {
    id: "keyboard-find",
    tab: "keyboard",
    section: "Editor",
    label: "Find",
    description: "Search in current file",
    keywords: ["keyboard", "shortcut", "find", "search"],
  },
  {
    id: "keyboard-find-replace",
    tab: "keyboard",
    section: "Editor",
    label: "Find & Replace",
    description: "Find and replace text",
    keywords: ["keyboard", "shortcut", "find", "replace", "search"],
  },
  {
    id: "keyboard-comment-line",
    tab: "keyboard",
    section: "Editor",
    label: "Comment Line",
    description: "Toggle line comment",
    keywords: ["keyboard", "shortcut", "comment", "toggle"],
  },
  {
    id: "keyboard-duplicate-line",
    tab: "keyboard",
    section: "Editor",
    label: "Duplicate Line",
    description: "Duplicate current line",
    keywords: ["keyboard", "shortcut", "duplicate", "line", "copy"],
  },
  {
    id: "keyboard-toggle-terminal",
    tab: "keyboard",
    section: "Terminal",
    label: "Toggle Terminal",
    description: "Show/hide integrated terminal",
    keywords: ["keyboard", "shortcut", "terminal", "toggle"],
  },
  {
    id: "keyboard-new-terminal",
    tab: "keyboard",
    section: "Terminal",
    label: "New Terminal",
    description: "Create new terminal instance",
    keywords: ["keyboard", "shortcut", "terminal", "new", "create"],
  },

  // Language Settings
  {
    id: "language-default-language",
    tab: "editor",
    section: "Language Support",
    label: "Default Language",
    description: "Default syntax highlighting for new files",
    keywords: ["language", "syntax", "highlighting", "default"],
  },
  {
    id: "language-auto-detect",
    tab: "editor",
    section: "Language Support",
    label: "Auto-detect Language",
    description: "Automatically detect file language from extension",
    keywords: ["language", "auto", "detect", "extension"],
  },
  {
    id: "language-format-on-save",
    tab: "editor",
    section: "Code Formatting",
    label: "Format on Save",
    description: "Automatically format code when saving",
    keywords: ["format", "save", "automatic", "formatting", "prettier"],
  },
  {
    id: "language-lint-on-save",
    tab: "editor",
    section: "Code Formatting",
    label: "Lint on Save",
    description: "Run linter when saving files",
    keywords: ["lint", "linter", "save", "eslint", "check"],
  },
  {
    id: "language-auto-completion",
    tab: "editor",
    section: "IntelliSense",
    label: "Auto Completion",
    description: "Show completion suggestions while typing",
    keywords: ["autocomplete", "completion", "intellisense", "suggestions"],
  },
  {
    id: "language-parameter-hints",
    tab: "editor",
    section: "IntelliSense",
    label: "Parameter Hints",
    description: "Show function parameter hints",
    keywords: ["parameter", "hints", "intellisense", "function"],
  },

  // Features Settings
  {
    id: "features-git",
    tab: "git",
    section: "Integration",
    label: "Git Integration",
    description: "Source control management with Git repositories",
    keywords: ["git", "source", "control", "version"],
  },
  {
    id: "features-remote",
    tab: "features",
    section: "Features",
    label: "Remote Development",
    description: "Connect to remote servers via SSH",
    keywords: ["remote", "ssh", "server", "development"],
  },
  {
    id: "features-terminal",
    tab: "features",
    section: "Features",
    label: "Integrated Terminal",
    description: "Built-in terminal for command line operations",
    keywords: ["terminal", "command", "line", "shell"],
  },
  {
    id: "features-search",
    tab: "features",
    section: "Features",
    label: "Global Search",
    description: "Search across files and folders in workspace",
    keywords: ["search", "find", "global", "workspace"],
  },
  {
    id: "features-diagnostics",
    tab: "features",
    section: "Features",
    label: "Diagnostics & Problems",
    description: "Code diagnostics and error reporting",
    keywords: ["diagnostics", "problems", "errors", "linting"],
  },
  {
    id: "features-debugger",
    tab: "features",
    section: "Features",
    label: "Debugger",
    description: "Run and debug files with launch configurations and breakpoints",
    keywords: ["debug", "debugger", "breakpoint", "launch", "run"],
  },
  {
    id: "features-ai-chat",
    tab: "features",
    section: "Features",
    label: "AI Assistant",
    description: "AI-powered code assistance and chat",
    keywords: ["ai", "assistant", "chat"],
  },
  {
    id: "features-multi-agents",
    tab: "features",
    section: "Features",
    label: "Multi Agents",
    description: "Multi-agent session sidebar",
    keywords: ["ai", "agents", "multi", "sidebar", "experimental"],
  },
  {
    id: "features-sidebar-builder",
    tab: "features",
    section: "Features",
    label: "Sidebar Builder",
    description: "Customizable vertical sidebar with Git, terminal, browser, and workspace items",
    keywords: ["sidebar", "builder", "custom", "experimental", "git", "terminal", "browser"],
  },
  {
    id: "features-breadcrumbs",
    tab: "features",
    section: "Features",
    label: "Breadcrumbs",
    description: "File path navigation breadcrumbs in editor",
    keywords: ["breadcrumbs", "navigation", "path"],
  },
  {
    id: "features-github",
    tab: "features",
    section: "Features",
    label: "GitHub Integration",
    description: "Pull requests, issues, and GitHub features",
    keywords: ["github", "pull", "requests", "issues", "integration"],
  },
  {
    id: "features-persistent-commands",
    tab: "features",
    section: "Features",
    label: "Persistent Commands",
    description: "The last used commands appear at the top of the command palette",
    keywords: ["persistent", "commands", "recent", "command", "palette"],
  },

  // Terminal Settings
  {
    id: "terminal-default-shell",
    tab: "terminal",
    section: "Launch",
    label: "Default Shell",
    description: "Fallback shell when a terminal profile does not override it",
    keywords: ["terminal", "shell", "default", "bash", "zsh", "fish"],
  },
  {
    id: "terminal-default-profile",
    tab: "terminal",
    section: "Launch",
    label: "Default Profile",
    description: "Used by the terminal toolbar button and Cmd+T when the terminal is focused",
    keywords: ["terminal", "profile", "default", "launch"],
  },
  {
    id: "terminal-font-family",
    tab: "terminal",
    section: "Typography",
    label: "Terminal Font Family",
    description: "Font family for the integrated terminal",
    keywords: ["terminal", "font", "family", "monospace", "nerd font"],
  },
  {
    id: "terminal-font-size",
    tab: "terminal",
    section: "Typography",
    label: "Terminal Font Size",
    description: "Terminal font size in pixels",
    keywords: ["terminal", "font", "size"],
  },
  {
    id: "terminal-line-height",
    tab: "terminal",
    section: "Typography",
    label: "Terminal Line Height",
    description: "Line height multiplier for terminal",
    keywords: ["terminal", "line", "height", "spacing"],
  },
  {
    id: "terminal-letter-spacing",
    tab: "terminal",
    section: "Typography",
    label: "Terminal Letter Spacing",
    description: "Additional spacing between characters in terminal",
    keywords: ["terminal", "letter", "spacing", "characters"],
  },
  {
    id: "terminal-scrollback",
    tab: "terminal",
    section: "Typography",
    label: "Terminal Scrollback",
    description: "How many terminal history lines to retain",
    keywords: ["terminal", "scrollback", "history", "buffer", "lines"],
  },
  {
    id: "terminal-cursor-style",
    tab: "terminal",
    section: "Cursor",
    label: "Terminal Cursor Style",
    description: "Shape of the terminal cursor",
    keywords: ["terminal", "cursor", "style", "block", "underline", "bar"],
  },
  {
    id: "terminal-cursor-blink",
    tab: "terminal",
    section: "Cursor",
    label: "Terminal Cursor Blink",
    description: "Whether the terminal cursor should blink",
    keywords: ["terminal", "cursor", "blink", "blinking"],
  },
  {
    id: "terminal-cursor-width",
    tab: "terminal",
    section: "Cursor",
    label: "Terminal Cursor Width",
    description: "Thickness of the terminal cursor",
    keywords: ["terminal", "cursor", "width", "thickness", "bar"],
  },

  {
    id: "editor-horizontal-tab-scroll",
    tab: "editor",
    section: "Tabs",
    label: "Buffer Carousel",
    description: "Show open buffers as a horizontally scrollable carousel in the main view",
    keywords: ["tabs", "buffers", "carousel", "scroll", "horizontal", "trackpad", "main view"],
  },
  {
    id: "editor-external-editor",
    tab: "editor",
    section: "External Editor",
    label: "Default Editor",
    description: "Open files in an external terminal editor instead of the built-in editor",
    keywords: ["external", "editor", "neovim", "vim", "helix", "nano", "emacs", "terminal"],
  },
  {
    id: "editor-custom-editor-command",
    tab: "editor",
    section: "External Editor",
    label: "Custom Command",
    description: "Command to run for custom external editor",
    keywords: ["custom", "command", "editor", "external"],
  },

  // Extensions Settings
  {
    id: "extensions-browse",
    tab: "extensions",
    section: "Extensions",
    label: "Browse Extensions",
    description: "Browse and manage installed extensions",
    keywords: ["extensions", "browse", "install", "manage", "language", "theme", "icon"],
  },

  // Advanced Settings
  {
    id: "advanced-export-settings",
    tab: "advanced",
    section: "Data",
    label: "Export Settings",
    description: "Save all app settings to a JSON file",
    keywords: ["export", "settings", "backup", "json", "sync"],
  },
  {
    id: "advanced-import-settings",
    tab: "advanced",
    section: "Data",
    label: "Import Settings",
    description: "Restore app settings from a JSON file",
    keywords: ["import", "settings", "restore", "backup", "json"],
  },
  {
    id: "advanced-reset-settings",
    tab: "advanced",
    section: "Data",
    label: "Reset Settings",
    description: "Reset all settings to defaults",
    keywords: ["reset", "settings", "defaults", "restore"],
  },
  {
    id: "advanced-telemetry",
    tab: "advanced",
    section: "Telemetry",
    label: "Anonymous Usage Telemetry",
    description:
      "Send anonymous heartbeat, extension, and crash-report metadata; update checks always send required delivery metadata",
    keywords: ["telemetry", "analytics", "tracking", "privacy", "crash", "updates", "extensions"],
  },
];
