Files
kandev/apps/web/lib/settings-discovery/catalog/preferences.ts
T
2026-08-20 14:45:58 +01:00

386 lines
12 KiB
TypeScript

import type { SettingsDiscoveryDefinition } from "../types";
export const TERMINAL_FONT_SIZE_TARGET = "setting-terminal-font-size";
export const TERMINAL_FONT_FAMILY_TARGET = "setting-terminal-font-family";
export const TERMINAL_LINKS_TARGET = "setting-terminal-links";
export const PREFERENCES_SETTINGS_HREF = "/settings/preferences";
const APPEARANCE_ID = "preferences-appearance";
export const APPEARANCE_SETTINGS_HREF = `${PREFERENCES_SETTINGS_HREF}/appearance`;
export const LAYOUTS_SETTINGS_HREF = `${PREFERENCES_SETTINGS_HREF}/layouts`;
const TERMINAL_EDITORS_ID = "preferences-terminal-editors";
export const TERMINAL_EDITORS_SETTINGS_HREF = `${PREFERENCES_SETTINGS_HREF}/terminal-editors`;
const NOTIFICATIONS_ID = "preferences-notifications";
export const NOTIFICATIONS_SETTINGS_HREF = `${PREFERENCES_SETTINGS_HREF}/notifications`;
export const KEYBOARD_SHORTCUTS_SETTINGS_HREF = `${PREFERENCES_SETTINGS_HREF}/keyboard-shortcuts`;
const TASK_BEHAVIOR_ID = "preferences-task-behavior";
export const TASK_BEHAVIOR_SETTINGS_HREF = `${PREFERENCES_SETTINGS_HREF}/task-behavior`;
export const GENERAL_SETTINGS_TARGETS = {
colorTheme: "setting-color-theme",
richOutputMotion: "setting-rich-output-motion",
settingsMenuMode: "setting-settings-menu-mode",
startupPage: "setting-startup-page",
displayLanguage: "setting-display-language",
appStatusBar: "setting-status-bar",
changesPanelLayout: "setting-changes-panel-layout",
resourceMetrics: "setting-resource-metrics",
layoutProfiles: "setting-layout-profiles",
preferredShell: "setting-preferred-shell",
desktopNotifications: "setting-desktop-notifications",
notificationSound: "setting-notification-sound",
notificationProviders: "setting-notification-providers",
notificationEvents: "setting-notification-events",
fileEditor: "setting-file-editor",
submitShortcut: "setting-submit-shortcut",
keyboardShortcuts: "setting-keyboard-shortcuts",
agentTaskProfile: "setting-agent-task-profile",
agentGeneratedTitles: "setting-agent-generated-task-titles",
archiveConfirmation: "setting-archive-confirmation",
preventAutoStartOnOpen: "setting-prevent-auto-start-on-open",
unreadMessages: "setting-unread-messages",
transcriptNavigation: "setting-transcript-navigation",
messageQueue: "setting-message-queue",
spritesConnection: "setting-sprites-connection",
spritesInstances: "setting-sprites-instances",
} as const;
export const PREFERENCES_DISCOVERY_DEFINITIONS: SettingsDiscoveryDefinition[] = [
{
id: APPEARANCE_ID,
kind: "page",
labelKey: "settings:appearance",
groupId: "preferences",
href: APPEARANCE_SETTINGS_HREF,
order: 10,
},
{
id: "appearance-color-theme",
kind: "control",
labelKey: "settings:colorTheme",
aliasesKey: "settings:discoveryAliasesColorTheme",
parentId: APPEARANCE_ID,
groupId: "preferences",
href: APPEARANCE_SETTINGS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.colorTheme,
order: 11,
},
{
id: "appearance-rich-output-motion",
kind: "control",
labelKey: "settings:animateRichOutputCharts",
aliasesKey: "settings:discoveryAliasesRichOutputMotion",
parentId: APPEARANCE_ID,
groupId: "preferences",
href: APPEARANCE_SETTINGS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.richOutputMotion,
order: 12,
},
{
id: "appearance-settings-menu",
kind: "control",
labelKey: "settings:settingsMenu",
aliasesKey: "settings:discoveryAliasesSettingsMenu",
parentId: APPEARANCE_ID,
groupId: "preferences",
href: APPEARANCE_SETTINGS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.settingsMenuMode,
order: 13,
},
{
id: "appearance-startup-page",
kind: "control",
labelKey: "settings:startupPage",
aliasesKey: "settings:discoveryAliasesStartupPage",
parentId: APPEARANCE_ID,
groupId: "preferences",
href: APPEARANCE_SETTINGS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.startupPage,
order: 14,
},
{
id: "appearance-display-language",
kind: "control",
labelKey: "settings:displayLanguage",
aliasesKey: "settings:discoveryAliasesDisplayLanguage",
parentId: APPEARANCE_ID,
groupId: "preferences",
href: APPEARANCE_SETTINGS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.displayLanguage,
order: 15,
},
{
id: "appearance-status-bar",
kind: "control",
labelKey: "settings:showStatusBar",
aliasesKey: "settings:discoveryAliasesStatusBar",
parentId: APPEARANCE_ID,
groupId: "preferences",
href: APPEARANCE_SETTINGS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.appStatusBar,
order: 16,
},
{
id: "appearance-changes-panel-layout",
kind: "control",
labelKey: "settings:changesPanelLayout",
parentId: APPEARANCE_ID,
groupId: "preferences",
href: APPEARANCE_SETTINGS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.changesPanelLayout,
order: 17,
},
{
id: "appearance-resource-metrics",
kind: "control",
labelKey: "settings:resourceMetrics",
aliasesKey: "settings:discoveryAliasesResourceMetrics",
parentId: APPEARANCE_ID,
groupId: "preferences",
href: APPEARANCE_SETTINGS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.resourceMetrics,
order: 18,
},
{
id: "preferences-layouts",
kind: "page",
labelKey: "settings:layouts",
groupId: "preferences",
href: LAYOUTS_SETTINGS_HREF,
order: 20,
},
{
id: "layouts-profiles",
kind: "section",
labelKey: "settings:layoutProfiles",
aliasesKey: "settings:discoveryAliasesLayoutProfiles",
parentId: "preferences-layouts",
groupId: "preferences",
href: LAYOUTS_SETTINGS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.layoutProfiles,
order: 21,
},
{
id: TERMINAL_EDITORS_ID,
kind: "page",
labelKey: "settings:terminalAndEditors",
groupId: "preferences",
href: TERMINAL_EDITORS_SETTINGS_HREF,
order: 30,
},
{
id: "terminal-preferred-shell",
kind: "control",
labelKey: "settings:preferredShell",
aliasesKey: "settings:discoveryAliasesPreferredShell",
parentId: TERMINAL_EDITORS_ID,
groupId: "preferences",
href: TERMINAL_EDITORS_SETTINGS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.preferredShell,
order: 31,
},
{
id: "terminal-font-size",
kind: "control",
labelKey: "settings:terminalFontSize",
aliasesKey: "settings:discoveryAliasesTerminalFontSize",
parentId: TERMINAL_EDITORS_ID,
groupId: "preferences",
href: TERMINAL_EDITORS_SETTINGS_HREF,
targetId: TERMINAL_FONT_SIZE_TARGET,
order: 32,
},
{
id: "terminal-font-family",
kind: "control",
labelKey: "settings:terminalFont",
aliasesKey: "settings:discoveryAliasesTerminalFont",
parentId: TERMINAL_EDITORS_ID,
groupId: "preferences",
href: TERMINAL_EDITORS_SETTINGS_HREF,
targetId: TERMINAL_FONT_FAMILY_TARGET,
order: 33,
},
{
id: "terminal-links",
kind: "control",
labelKey: "settings:terminalLinks",
aliasesKey: "settings:discoveryAliasesTerminalLinks",
parentId: TERMINAL_EDITORS_ID,
groupId: "preferences",
href: TERMINAL_EDITORS_SETTINGS_HREF,
targetId: TERMINAL_LINKS_TARGET,
order: 34,
},
{
id: "editors-file-editor",
kind: "section",
labelKey: "settings:fileEditor",
aliasesKey: "settings:discoveryAliasesFileEditor",
parentId: TERMINAL_EDITORS_ID,
groupId: "preferences",
href: TERMINAL_EDITORS_SETTINGS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.fileEditor,
order: 35,
},
{
id: NOTIFICATIONS_ID,
kind: "page",
labelKey: "settings:notifications",
groupId: "preferences",
href: NOTIFICATIONS_SETTINGS_HREF,
order: 40,
},
{
id: "notifications-desktop",
kind: "control",
labelKey: "settings:desktopNotifications",
aliasesKey: "settings:discoveryAliasesDesktopNotifications",
parentId: NOTIFICATIONS_ID,
groupId: "preferences",
href: NOTIFICATIONS_SETTINGS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.desktopNotifications,
order: 41,
},
{
id: "notifications-sound",
kind: "control",
labelKey: "settings:notificationSound",
aliasesKey: "settings:discoveryAliasesNotificationSound",
parentId: NOTIFICATIONS_ID,
groupId: "preferences",
href: NOTIFICATIONS_SETTINGS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.notificationSound,
order: 42,
},
{
id: "notifications-providers",
kind: "section",
labelKey: "settings:externalProviders",
parentId: NOTIFICATIONS_ID,
groupId: "preferences",
href: NOTIFICATIONS_SETTINGS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.notificationProviders,
order: 43,
},
{
id: "notifications-events",
kind: "section",
labelKey: "settings:notificationEvents",
parentId: NOTIFICATIONS_ID,
groupId: "preferences",
href: NOTIFICATIONS_SETTINGS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.notificationEvents,
order: 44,
},
{
id: "preferences-keyboard-shortcuts",
kind: "page",
labelKey: "settings:keyboardShortcuts",
groupId: "preferences",
href: KEYBOARD_SHORTCUTS_SETTINGS_HREF,
order: 50,
},
{
id: "keyboard-submit-shortcut",
kind: "control",
labelKey: "settings:submitShortcut",
aliasesKey: "settings:discoveryAliasesSubmitShortcut",
parentId: "preferences-keyboard-shortcuts",
groupId: "preferences",
href: KEYBOARD_SHORTCUTS_SETTINGS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.submitShortcut,
order: 51,
},
{
id: "keyboard-command-shortcuts",
kind: "control",
labelKey: "settings:keyboardShortcuts",
aliasesKey: "settings:discoveryAliasesKeyboardShortcuts",
parentId: "preferences-keyboard-shortcuts",
groupId: "preferences",
href: KEYBOARD_SHORTCUTS_SETTINGS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.keyboardShortcuts,
order: 52,
},
{
id: TASK_BEHAVIOR_ID,
kind: "page",
labelKey: "settings:taskBehavior",
groupId: "preferences",
href: TASK_BEHAVIOR_SETTINGS_HREF,
order: 60,
},
{
id: "task-actions-agent-profile",
kind: "control",
labelKey: "settings:profileForTasksCreatedByAgents",
aliasesKey: "settings:discoveryAliasesAgentTaskProfile",
parentId: TASK_BEHAVIOR_ID,
groupId: "preferences",
href: TASK_BEHAVIOR_SETTINGS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.agentTaskProfile,
order: 61,
},
{
id: "task-actions-generated-titles",
kind: "control",
labelKey: "settings:agentGeneratedTaskTitles",
parentId: TASK_BEHAVIOR_ID,
groupId: "preferences",
href: TASK_BEHAVIOR_SETTINGS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.agentGeneratedTitles,
order: 62,
},
{
id: "task-actions-prevent-auto-start-on-open",
kind: "control",
labelKey: "settings:preventAutoStartAgentOnOpen",
parentId: TASK_BEHAVIOR_ID,
groupId: "preferences",
href: TASK_BEHAVIOR_SETTINGS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.preventAutoStartOnOpen,
order: 63,
},
{
id: "task-actions-archive-confirmation",
kind: "control",
labelKey: "settings:archiveConfirmation",
aliasesKey: "settings:discoveryAliasesArchiveConfirmation",
parentId: TASK_BEHAVIOR_ID,
groupId: "preferences",
href: TASK_BEHAVIOR_SETTINGS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.archiveConfirmation,
order: 64,
},
{
id: "task-actions-unread-messages",
kind: "control",
labelKey: "settings:unreadMessages",
parentId: TASK_BEHAVIOR_ID,
groupId: "preferences",
href: TASK_BEHAVIOR_SETTINGS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.unreadMessages,
order: 65,
},
{
id: "task-actions-transcript-navigation",
kind: "control",
labelKey: "settings:transcriptNavigation",
aliasesKey: "settings:discoveryAliasesTranscriptNavigation",
parentId: TASK_BEHAVIOR_ID,
groupId: "preferences",
href: TASK_BEHAVIOR_SETTINGS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.transcriptNavigation,
order: 65,
},
{
id: "task-behavior-message-queue",
kind: "section",
labelKey: "system:messageQueueTitle",
parentId: TASK_BEHAVIOR_ID,
groupId: "preferences",
href: TASK_BEHAVIOR_SETTINGS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.messageQueue,
order: 66,
},
];