mirror of
https://github.com/logancyang/obsidian-copilot.git
synced 2026-07-22 07:50:24 +00:00
Turn on memory feature by default (#1914)
* Turn on memory feature by default * Ensure default values for enableRecentConversations and enableSavedMemory settings are applied correctly
This commit is contained in:
parent
3b338b06bd
commit
231d020fea
2 changed files with 10 additions and 4 deletions
|
|
@ -792,9 +792,9 @@ export const DEFAULT_SETTINGS: CopilotSettings = {
|
|||
reasoningEffort: DEFAULT_MODEL_SETTING.REASONING_EFFORT,
|
||||
verbosity: DEFAULT_MODEL_SETTING.VERBOSITY,
|
||||
memoryFolderName: DEFAULT_MEMORY_FOLDER,
|
||||
enableRecentConversations: false,
|
||||
enableRecentConversations: true,
|
||||
maxRecentConversations: 30,
|
||||
enableSavedMemory: false,
|
||||
enableSavedMemory: true,
|
||||
enableInlineCitations: true,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -380,12 +380,18 @@ export function sanitizeSettings(settings: CopilotSettings): CopilotSettings {
|
|||
}
|
||||
|
||||
// Ensure enableRecentConversations has a default value
|
||||
if (typeof sanitizedSettings.enableRecentConversations !== "boolean") {
|
||||
if (
|
||||
!sanitizedSettings.enableRecentConversations ||
|
||||
typeof sanitizedSettings.enableRecentConversations !== "boolean"
|
||||
) {
|
||||
sanitizedSettings.enableRecentConversations = DEFAULT_SETTINGS.enableRecentConversations;
|
||||
}
|
||||
|
||||
// Ensure enableSavedMemory has a default value
|
||||
if (typeof sanitizedSettings.enableSavedMemory !== "boolean") {
|
||||
if (
|
||||
!sanitizedSettings.enableSavedMemory ||
|
||||
typeof sanitizedSettings.enableSavedMemory !== "boolean"
|
||||
) {
|
||||
sanitizedSettings.enableSavedMemory = DEFAULT_SETTINGS.enableSavedMemory;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue