mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-09 23:10:20 +08:00
refactor(data): update PreferencesMappings type with PreferenceSchemas
Add type import for PreferenceSchemas and update REDUX_STORE_MAPPINGS type to use keyof PreferenceSchemas Mark several mappings with TODO comments for future fixes
This commit is contained in:
parent
47366064ca
commit
515d3cd596
@ -8,6 +8,8 @@
|
|||||||
* === AUTO-GENERATED CONTENT START ===
|
* === AUTO-GENERATED CONTENT START ===
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
import type { PreferenceSchemas } from '@shared/data/preference/preferenceSchemas'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ElectronStore映射关系 - 简单一层结构
|
* ElectronStore映射关系 - 简单一层结构
|
||||||
*
|
*
|
||||||
@ -252,6 +254,8 @@ export const REDUX_STORE_MAPPINGS = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
originalKey: 'mathEngine',
|
originalKey: 'mathEngine',
|
||||||
|
// TODO
|
||||||
|
// @ts-expect-error check how to fix it later
|
||||||
targetKey: 'chat.message.math_engine'
|
targetKey: 'chat.message.math_engine'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -336,6 +340,8 @@ export const REDUX_STORE_MAPPINGS = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
originalKey: 'topicNamingPrompt',
|
originalKey: 'topicNamingPrompt',
|
||||||
|
// TODO
|
||||||
|
// @ts-expect-error check how to fix it later
|
||||||
targetKey: 'topic.naming.prompt'
|
targetKey: 'topic.naming.prompt'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -664,6 +670,8 @@ export const REDUX_STORE_MAPPINGS = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
originalKey: 'nutstoreSyncState',
|
originalKey: 'nutstoreSyncState',
|
||||||
|
// TODO
|
||||||
|
// @ts-expect-error check how to fix it later
|
||||||
targetKey: 'data.backup.nutstore.sync_state'
|
targetKey: 'data.backup.nutstore.sync_state'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -737,7 +745,10 @@ export const REDUX_STORE_MAPPINGS = {
|
|||||||
targetKey: 'shortcut.app.exit_fullscreen'
|
targetKey: 'shortcut.app.exit_fullscreen'
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
} as const satisfies Record<string, Array<{ originalKey: string; targetKey: string }>>
|
} as const satisfies Record<
|
||||||
|
string,
|
||||||
|
Array<{ originalKey: string; targetKey: keyof PreferenceSchemas[keyof PreferenceSchemas] }>
|
||||||
|
>
|
||||||
|
|
||||||
// === AUTO-GENERATED CONTENT END ===
|
// === AUTO-GENERATED CONTENT END ===
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user