Files
goodbuddy/src/renderer/src/settings-categories.ts
T
mesalogo 3935f50017 feat: support scoped Smart Heartbeat plans
Smart Heartbeat plans were implicitly bound to one active project and duplicated across multiple configuration surfaces. Plans can now target Global or selected projects from one authoritative editor, aggregate bounded input across that scope, validate project-specific outputs, and preserve existing data through the schema migration.

Reports remain unscoped with frozen scope metadata, while duplicate Heartbeat forms are removed from Settings and Task Center.

Release note: 智能心跳计划现在可从统一入口选择 Global 或一个、多个 Project;旧配置和历史会自动保留,项目级记忆与后续任务会严格写入所选范围。
2026-08-19 07:51:52 +08:00

90 lines
1.8 KiB
TypeScript

import i18n from './i18n'
export const settingsCategoryList = [
{
id: 'appearance',
translationKey: 'appearance'
},
{
id: 'platform-features',
translationKey: 'platformFeatures'
},
{
id: 'model',
translationKey: 'model'
},
{
id: 'context-control',
translationKey: 'contextControl'
},
{
id: 'document-parsing',
translationKey: 'documentParsing'
},
{
id: 'runtime',
translationKey: 'runtime'
},
{
id: 'security',
translationKey: 'security'
},
{
id: 'channels',
translationKey: 'channels'
},
{
id: 'roles',
translationKey: 'roles'
},
{
id: 'skills',
translationKey: 'skills'
},
{
id: 'mcp',
translationKey: 'mcp'
},
{
id: 'about',
translationKey: 'about'
}
] as const
export type SettingsCategoryDefinition =
(typeof settingsCategoryList)[number]
export type SettingsCategoryId = SettingsCategoryDefinition['id']
type LocalizedSettingsCategoryDefinition = SettingsCategoryDefinition & {
readonly label: string
readonly navigationDescription: string
readonly description: string
}
export const settingsCategories = Object.fromEntries(
settingsCategoryList.map((category) => [
category.id,
{
...category,
get label() {
return i18n.t(
`categories.${category.translationKey}.label`,
{ ns: 'settings' }
)
},
get navigationDescription() {
return i18n.t(
`categories.${category.translationKey}.navigationDescription`,
{ ns: 'settings' }
)
},
get description() {
return i18n.t(
`categories.${category.translationKey}.description`,
{ ns: 'settings' }
)
}
}
])
) as Record<SettingsCategoryId, LocalizedSettingsCategoryDefinition>