Exclude copilot folders from indexing by default (#1621)

This commit is contained in:
Logan Yang 2025-07-10 16:25:31 -07:00 committed by GitHub
parent c07ab31685
commit c1dbc965ed
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 4 deletions

View file

@ -9,6 +9,10 @@ export const BREVILABS_API_BASE_URL = "https://api.brevilabs.com/v1";
export const CHAT_VIEWTYPE = "copilot-chat-view";
export const USER_SENDER = "user";
export const AI_SENDER = "ai";
// Default folder names
export const DEFAULT_CHAT_HISTORY_FOLDER = "copilot-conversations";
export const DEFAULT_CUSTOM_PROMPTS_FOLDER = "copilot-custom-prompts";
export const DEFAULT_SYSTEM_PROMPT = `You are Obsidian Copilot, a helpful assistant that integrates AI to Obsidian note-taking.
1. Never mention that you do not have access to something. Always rely on the user provided context.
2. Always answer to the best of your knowledge. If you are unsure about something, say so and ask the user to provide more context.
@ -665,14 +669,14 @@ export const DEFAULT_SETTINGS: CopilotSettings = {
openAIProxyBaseUrl: "",
openAIEmbeddingProxyBaseUrl: "",
stream: true,
defaultSaveFolder: "copilot-conversations",
defaultSaveFolder: DEFAULT_CHAT_HISTORY_FOLDER,
defaultConversationTag: "copilot-conversation",
autosaveChat: false,
includeActiveNoteAsContext: true,
defaultOpenArea: DEFAULT_OPEN_AREA.VIEW,
customPromptsFolder: "copilot-custom-prompts",
customPromptsFolder: DEFAULT_CUSTOM_PROMPTS_FOLDER,
indexVaultToVectorStore: VAULT_VECTOR_STORE_STRATEGY.ON_MODE_SWITCH,
qaExclusions: "",
qaExclusions: `${DEFAULT_CHAT_HISTORY_FOLDER},${DEFAULT_CUSTOM_PROMPTS_FOLDER}`,
qaInclusions: "",
chatNoteContextPath: "",
chatNoteContextTags: [],

View file

@ -70,7 +70,7 @@ export function getDecodedPatterns(value: string): string[] {
}
/**
* Get the exclusion patterns the exclusion settings string.
* Get the exclusion patterns from the exclusion settings string.
* @returns An array of exclusion patterns.
*/
function getExclusionPatterns(): string[] {