Files
kandev/apps/web/lib/settings-discovery/catalog/general.ts
T
2026-08-05 14:07:52 +01:00

396 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 GENERAL_SETTINGS_HREF = "/settings/general";
const GENERAL_APPEARANCE_ID = "general-appearance";
const GENERAL_APPEARANCE_HREF = `${GENERAL_SETTINGS_HREF}/appearance`;
const GENERAL_TERMINAL_ID = "general-terminal";
const GENERAL_TERMINAL_HREF = `${GENERAL_SETTINGS_HREF}/terminal`;
const GENERAL_NOTIFICATIONS_ID = "general-notifications";
const GENERAL_NOTIFICATIONS_HREF = `${GENERAL_SETTINGS_HREF}/notifications`;
const GENERAL_TASK_ACTIONS_ID = "general-task-actions";
const GENERAL_TASK_ACTIONS_HREF = `${GENERAL_SETTINGS_HREF}/task-actions`;
export const GENERAL_SETTINGS_TARGETS = {
colorTheme: "setting-color-theme",
startupPage: "setting-startup-page",
displayLanguage: "setting-display-language",
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",
unreadMessages: "setting-unread-messages",
transcriptNavigation: "setting-transcript-navigation",
spritesConnection: "setting-sprites-connection",
spritesInstances: "setting-sprites-instances",
} as const;
export const GENERAL_DISCOVERY_DEFINITIONS: SettingsDiscoveryDefinition[] = [
{
id: "general",
kind: "page",
labelKey: "settings:general",
groupId: "general",
href: GENERAL_SETTINGS_HREF,
order: 0,
},
{
id: GENERAL_APPEARANCE_ID,
kind: "page",
labelKey: "settings:appearance",
parentId: "general",
groupId: "general",
href: GENERAL_APPEARANCE_HREF,
order: 10,
},
{
id: "appearance-color-theme",
kind: "control",
labelKey: "settings:colorTheme",
aliasesKey: "settings:discoveryAliasesColorTheme",
parentId: GENERAL_APPEARANCE_ID,
groupId: "general",
href: GENERAL_APPEARANCE_HREF,
targetId: GENERAL_SETTINGS_TARGETS.colorTheme,
order: 11,
},
{
id: "appearance-startup-page",
kind: "control",
labelKey: "settings:startupPage",
aliasesKey: "settings:discoveryAliasesStartupPage",
parentId: GENERAL_APPEARANCE_ID,
groupId: "general",
href: GENERAL_APPEARANCE_HREF,
targetId: GENERAL_SETTINGS_TARGETS.startupPage,
order: 12,
},
{
id: "appearance-display-language",
kind: "control",
labelKey: "settings:displayLanguage",
aliasesKey: "settings:discoveryAliasesDisplayLanguage",
parentId: GENERAL_APPEARANCE_ID,
groupId: "general",
href: GENERAL_APPEARANCE_HREF,
targetId: GENERAL_SETTINGS_TARGETS.displayLanguage,
order: 13,
},
{
id: "appearance-changes-panel-layout",
kind: "control",
labelKey: "settings:changesPanelLayout",
parentId: GENERAL_APPEARANCE_ID,
groupId: "general",
href: GENERAL_APPEARANCE_HREF,
targetId: GENERAL_SETTINGS_TARGETS.changesPanelLayout,
order: 14,
},
{
id: "appearance-resource-metrics",
kind: "control",
labelKey: "settings:resourceMetrics",
aliasesKey: "settings:discoveryAliasesResourceMetrics",
parentId: GENERAL_APPEARANCE_ID,
groupId: "general",
href: GENERAL_APPEARANCE_HREF,
targetId: GENERAL_SETTINGS_TARGETS.resourceMetrics,
order: 15,
},
{
id: "general-layouts",
kind: "page",
labelKey: "settings:layouts",
parentId: "general",
groupId: "general",
href: "/settings/general/layouts",
order: 20,
},
{
id: "layouts-profiles",
kind: "section",
labelKey: "settings:layoutProfiles",
aliasesKey: "settings:discoveryAliasesLayoutProfiles",
parentId: "general-layouts",
groupId: "general",
href: "/settings/general/layouts",
targetId: GENERAL_SETTINGS_TARGETS.layoutProfiles,
order: 21,
},
{
id: GENERAL_TERMINAL_ID,
kind: "page",
labelKey: "settings:terminal",
parentId: "general",
groupId: "general",
href: GENERAL_TERMINAL_HREF,
order: 30,
},
{
id: "terminal-preferred-shell",
kind: "control",
labelKey: "settings:preferredShell",
aliasesKey: "settings:discoveryAliasesPreferredShell",
parentId: GENERAL_TERMINAL_ID,
groupId: "general",
href: GENERAL_TERMINAL_HREF,
targetId: GENERAL_SETTINGS_TARGETS.preferredShell,
order: 31,
},
{
id: "terminal-font-size",
kind: "control",
labelKey: "settings:terminalFontSize",
aliasesKey: "settings:discoveryAliasesTerminalFontSize",
parentId: GENERAL_TERMINAL_ID,
groupId: "general",
href: GENERAL_TERMINAL_HREF,
targetId: TERMINAL_FONT_SIZE_TARGET,
order: 32,
},
{
id: "terminal-font-family",
kind: "control",
labelKey: "settings:terminalFont",
aliasesKey: "settings:discoveryAliasesTerminalFont",
parentId: GENERAL_TERMINAL_ID,
groupId: "general",
href: GENERAL_TERMINAL_HREF,
targetId: TERMINAL_FONT_FAMILY_TARGET,
order: 33,
},
{
id: "terminal-links",
kind: "control",
labelKey: "settings:terminalLinks",
aliasesKey: "settings:discoveryAliasesTerminalLinks",
parentId: GENERAL_TERMINAL_ID,
groupId: "general",
href: GENERAL_TERMINAL_HREF,
targetId: TERMINAL_LINKS_TARGET,
order: 34,
},
{
id: GENERAL_NOTIFICATIONS_ID,
kind: "page",
labelKey: "settings:notifications",
parentId: "general",
groupId: "general",
href: GENERAL_NOTIFICATIONS_HREF,
order: 40,
},
{
id: "notifications-desktop",
kind: "control",
labelKey: "settings:desktopNotifications",
aliasesKey: "settings:discoveryAliasesDesktopNotifications",
parentId: GENERAL_NOTIFICATIONS_ID,
groupId: "general",
href: GENERAL_NOTIFICATIONS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.desktopNotifications,
order: 41,
},
{
id: "notifications-sound",
kind: "control",
labelKey: "settings:notificationSound",
aliasesKey: "settings:discoveryAliasesNotificationSound",
parentId: GENERAL_NOTIFICATIONS_ID,
groupId: "general",
href: GENERAL_NOTIFICATIONS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.notificationSound,
order: 42,
},
{
id: "notifications-providers",
kind: "section",
labelKey: "settings:externalProviders",
parentId: GENERAL_NOTIFICATIONS_ID,
groupId: "general",
href: GENERAL_NOTIFICATIONS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.notificationProviders,
order: 43,
},
{
id: "notifications-events",
kind: "section",
labelKey: "settings:notificationEvents",
parentId: GENERAL_NOTIFICATIONS_ID,
groupId: "general",
href: GENERAL_NOTIFICATIONS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.notificationEvents,
order: 44,
},
{
id: "general-editors",
kind: "page",
labelKey: "settings:editors",
parentId: "general",
groupId: "general",
href: "/settings/general/editors",
order: 50,
},
{
id: "editors-file-editor",
kind: "section",
labelKey: "settings:fileEditor",
aliasesKey: "settings:discoveryAliasesFileEditor",
parentId: "general-editors",
groupId: "general",
href: "/settings/general/editors",
targetId: GENERAL_SETTINGS_TARGETS.fileEditor,
order: 51,
},
{
id: "general-keyboard-shortcuts",
kind: "page",
labelKey: "settings:keyboardShortcuts",
parentId: "general",
groupId: "general",
href: "/settings/general/keyboard-shortcuts",
order: 60,
},
{
id: "keyboard-submit-shortcut",
kind: "control",
labelKey: "settings:submitShortcut",
aliasesKey: "settings:discoveryAliasesSubmitShortcut",
parentId: "general-keyboard-shortcuts",
groupId: "general",
href: "/settings/general/keyboard-shortcuts",
targetId: GENERAL_SETTINGS_TARGETS.submitShortcut,
order: 61,
},
{
id: "keyboard-command-shortcuts",
kind: "control",
labelKey: "settings:keyboardShortcuts",
aliasesKey: "settings:discoveryAliasesKeyboardShortcuts",
parentId: "general-keyboard-shortcuts",
groupId: "general",
href: "/settings/general/keyboard-shortcuts",
targetId: GENERAL_SETTINGS_TARGETS.keyboardShortcuts,
order: 62,
},
{
id: GENERAL_TASK_ACTIONS_ID,
kind: "page",
labelKey: "settings:taskActions",
parentId: "general",
groupId: "general",
href: GENERAL_TASK_ACTIONS_HREF,
order: 70,
},
{
id: "task-actions-agent-profile",
kind: "control",
labelKey: "settings:profileForTasksCreatedByAgents",
aliasesKey: "settings:discoveryAliasesAgentTaskProfile",
parentId: GENERAL_TASK_ACTIONS_ID,
groupId: "general",
href: GENERAL_TASK_ACTIONS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.agentTaskProfile,
order: 71,
},
{
id: "task-actions-generated-titles",
kind: "control",
labelKey: "settings:agentGeneratedTaskTitles",
parentId: GENERAL_TASK_ACTIONS_ID,
groupId: "general",
href: GENERAL_TASK_ACTIONS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.agentGeneratedTitles,
order: 72,
},
{
id: "task-actions-archive-confirmation",
kind: "control",
labelKey: "settings:archiveConfirmation",
aliasesKey: "settings:discoveryAliasesArchiveConfirmation",
parentId: GENERAL_TASK_ACTIONS_ID,
groupId: "general",
href: GENERAL_TASK_ACTIONS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.archiveConfirmation,
order: 73,
},
{
id: "task-actions-unread-messages",
kind: "control",
labelKey: "settings:unreadMessages",
parentId: GENERAL_TASK_ACTIONS_ID,
groupId: "general",
href: GENERAL_TASK_ACTIONS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.unreadMessages,
order: 74,
},
{
id: "task-actions-transcript-navigation",
kind: "control",
labelKey: "settings:transcriptNavigation",
aliasesKey: "settings:discoveryAliasesTranscriptNavigation",
parentId: GENERAL_TASK_ACTIONS_ID,
groupId: "general",
href: GENERAL_TASK_ACTIONS_HREF,
targetId: GENERAL_SETTINGS_TARGETS.transcriptNavigation,
order: 75,
},
{
id: "general-message-queue",
kind: "page",
labelKey: "system:messageQueueTitle",
parentId: "general",
groupId: "general",
href: "/settings/general/message-queue",
order: 80,
},
{
id: "general-secrets",
kind: "page",
labelKey: "settings:secrets",
parentId: "general",
groupId: "general",
href: "/settings/general/secrets",
order: 90,
},
{
id: "general-sprites",
kind: "page",
labelKey: "settings:sprites",
parentId: "general",
groupId: "general",
href: "/settings/general/sprites",
order: 100,
},
{
id: "sprites-connection",
kind: "section",
labelKey: "settings:connection",
parentId: "general-sprites",
groupId: "general",
href: "/settings/general/sprites",
targetId: GENERAL_SETTINGS_TARGETS.spritesConnection,
order: 101,
},
{
id: "sprites-instances",
kind: "section",
labelKey: "settings:runningSprites",
parentId: "general-sprites",
groupId: "general",
href: "/settings/general/sprites",
targetId: GENERAL_SETTINGS_TARGETS.spritesInstances,
order: 102,
},
];