mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-08 14:29:15 +08:00
Update settings.ts
This commit is contained in:
parent
9b78a7c887
commit
b49f3a51c6
@ -129,6 +129,9 @@ export interface SettingsState {
|
|||||||
filterHtmlTags: boolean // 过滤HTML标签
|
filterHtmlTags: boolean // 过滤HTML标签
|
||||||
maxTextLength: number // 最大文本长度
|
maxTextLength: number // 最大文本长度
|
||||||
}
|
}
|
||||||
|
// Quick Panel Triggers
|
||||||
|
enableQuickPanelTriggers: boolean
|
||||||
|
// Export Menu Options
|
||||||
exportMenuOptions: {
|
exportMenuOptions: {
|
||||||
image: boolean
|
image: boolean
|
||||||
markdown: boolean
|
markdown: boolean
|
||||||
@ -144,7 +147,7 @@ export interface SettingsState {
|
|||||||
|
|
||||||
export type MultiModelMessageStyle = 'horizontal' | 'vertical' | 'fold' | 'grid'
|
export type MultiModelMessageStyle = 'horizontal' | 'vertical' | 'fold' | 'grid'
|
||||||
|
|
||||||
const initialState: SettingsState = {
|
export const initialState: SettingsState = {
|
||||||
showAssistants: true,
|
showAssistants: true,
|
||||||
showTopics: true,
|
showTopics: true,
|
||||||
sendMessageShortcut: 'Enter',
|
sendMessageShortcut: 'Enter',
|
||||||
@ -245,6 +248,9 @@ const initialState: SettingsState = {
|
|||||||
filterHtmlTags: true, // 默认过滤HTML标签
|
filterHtmlTags: true, // 默认过滤HTML标签
|
||||||
maxTextLength: 4000 // 默认最大文本长度
|
maxTextLength: 4000 // 默认最大文本长度
|
||||||
},
|
},
|
||||||
|
// Quick Panel Triggers
|
||||||
|
enableQuickPanelTriggers: false,
|
||||||
|
// Export Menu Options
|
||||||
exportMenuOptions: {
|
exportMenuOptions: {
|
||||||
image: true,
|
image: true,
|
||||||
markdown: true,
|
markdown: true,
|
||||||
@ -511,9 +517,6 @@ const settingsSlice = createSlice({
|
|||||||
setEnableDataCollection: (state, action: PayloadAction<boolean>) => {
|
setEnableDataCollection: (state, action: PayloadAction<boolean>) => {
|
||||||
state.enableDataCollection = action.payload
|
state.enableDataCollection = action.payload
|
||||||
},
|
},
|
||||||
setExportMenuOptions: (state, action: PayloadAction<typeof initialState.exportMenuOptions>) => {
|
|
||||||
state.exportMenuOptions = action.payload
|
|
||||||
},
|
|
||||||
// TTS相关的action
|
// TTS相关的action
|
||||||
setTtsEnabled: (state, action: PayloadAction<boolean>) => {
|
setTtsEnabled: (state, action: PayloadAction<boolean>) => {
|
||||||
state.ttsEnabled = action.payload
|
state.ttsEnabled = action.payload
|
||||||
@ -621,6 +624,13 @@ const settingsSlice = createSlice({
|
|||||||
...state.ttsFilterOptions,
|
...state.ttsFilterOptions,
|
||||||
...action.payload
|
...action.payload
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
// Quick Panel Triggers action
|
||||||
|
setEnableQuickPanelTriggers: (state, action: PayloadAction<boolean>) => {
|
||||||
|
state.enableQuickPanelTriggers = action.payload
|
||||||
|
},
|
||||||
|
setExportMenuOptions: (state, action: PayloadAction<typeof initialState.exportMenuOptions>) => {
|
||||||
|
state.exportMenuOptions = action.payload
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -725,7 +735,9 @@ export const {
|
|||||||
addTtsCustomModel,
|
addTtsCustomModel,
|
||||||
removeTtsCustomVoice,
|
removeTtsCustomVoice,
|
||||||
removeTtsCustomModel,
|
removeTtsCustomModel,
|
||||||
setTtsFilterOptions
|
setTtsFilterOptions,
|
||||||
|
// Quick Panel Triggers action
|
||||||
|
setEnableQuickPanelTriggers
|
||||||
} = settingsActions
|
} = settingsActions
|
||||||
|
|
||||||
export default settingsSlice.reducer
|
export default settingsSlice.reducer
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user