feat(settings): rename autosave label to 'Autosave Chat as Markdown' and always generate AI titles on save (#2593)

This commit is contained in:
Logan Yang 2026-06-10 22:54:13 -07:00 committed by GitHub
parent 23b5ca0054
commit d9fbbd180c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 6 additions and 26 deletions

View file

@ -977,7 +977,6 @@ export const DEFAULT_SETTINGS: CopilotSettings = {
defaultSaveFolder: DEFAULT_CHAT_HISTORY_FOLDER,
defaultConversationTag: "copilot-conversation",
autosaveChat: true,
generateAIChatTitleOnSave: true,
autoAddActiveContentToContext: true,
defaultOpenArea: DEFAULT_OPEN_AREA.VIEW,
defaultSendShortcut: SEND_SHORTCUT.ENTER,

View file

@ -27,7 +27,6 @@ jest.mock("@/settings/model", () => ({
defaultSaveFolder: "test-folder",
defaultConversationTag: "copilot-conversation",
defaultConversationNoteName: "{$topic}@{$date}_{$time}",
generateAIChatTitleOnSave: true,
}),
}));
jest.mock("@/aiParams", () => ({

View file

@ -818,9 +818,9 @@ ${chatContent}`;
messages: ChatMessage[],
existingTopic?: string
): void {
const settings = getSettings();
if (!settings.generateAIChatTitleOnSave || !file || existingTopic) {
// AI title generation on save is always on for saved (legacy) chat notes;
// skip only when there's no file or the note already carries a topic.
if (!file || existingTopic) {
return;
}

View file

@ -1227,7 +1227,7 @@ export default class CopilotPlugin extends Plugin {
async openChatSourceFile(fileId: string): Promise<void> {
if (isNativeChatId(fileId)) {
new Notice(
"This chat has no saved note. Turn on Autosave Chat to save chats as notes in your vault."
"This chat has no saved note. Turn on Autosave Chat as Markdown to save chats as notes in your vault."
);
return;
}

View file

@ -88,11 +88,6 @@ export interface CopilotSettings {
defaultSaveFolder: string;
defaultConversationTag: string;
autosaveChat: boolean;
/**
* When enabled, generate a short AI title for chat notes on save.
* When disabled (default), use the first 10 words of the first user message.
*/
generateAIChatTitleOnSave: boolean;
autoAddActiveContentToContext: boolean;
customPromptsFolder: string;
indexVaultToVectorStore: string;
@ -665,11 +660,6 @@ export function sanitizeSettings(settings: CopilotSettings): CopilotSettings {
}
}
// Ensure generateAIChatTitleOnSave has a default value
if (typeof sanitizedSettings.generateAIChatTitleOnSave !== "boolean") {
sanitizedSettings.generateAIChatTitleOnSave = DEFAULT_SETTINGS.generateAIChatTitleOnSave;
}
// Ensure enableMiyo has a default value
if (typeof sanitizedSettings.enableMiyo !== "boolean") {
sanitizedSettings.enableMiyo = DEFAULT_SETTINGS.enableMiyo;

View file

@ -260,20 +260,12 @@ export const BasicSettings: React.FC = () => {
<div className="tw-space-y-4">
<SettingItem
type="switch"
title="Autosave Chat"
description="Automatically saves the chat after every user message and AI response."
title="Autosave Chat as Markdown"
description="Writes each chat to a Markdown note in your vault after every user message and AI response. With this off, agent chats still appear in Recent Chats from session history; only the Markdown note is skipped."
checked={settings.autosaveChat}
onCheckedChange={(checked) => updateSetting("autosaveChat", checked)}
/>
<SettingItem
type="switch"
title="Generate AI Chat Title on Save"
description="When enabled, uses an AI model to generate a concise title for saved chat notes. When disabled, uses the first 10 words of the first user message."
checked={settings.generateAIChatTitleOnSave}
onCheckedChange={(checked) => updateSetting("generateAIChatTitleOnSave", checked)}
/>
<SettingItem
type="text"
title="Default Conversation Folder Name"