From 3f23335ba1b77e350815d315f8acbf722febb56c Mon Sep 17 00:00:00 2001 From: Florian Egger Date: Wed, 6 May 2026 21:24:28 +0200 Subject: [PATCH] Remove summary functionality from VaultIndexer --- src/vault-indexer.ts | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/src/vault-indexer.ts b/src/vault-indexer.ts index a6ea391..ab33c43 100644 --- a/src/vault-indexer.ts +++ b/src/vault-indexer.ts @@ -1,7 +1,7 @@ // src/vault-indexer.ts import { VaultIndexEntry } from './types'; -import { Logger, sanitizeFilePath } from './utils'; +import { Logger } from './utils'; interface Frontmatter { title?: string; @@ -31,23 +31,12 @@ interface ScoreResult { } class VaultIndexer { - private summaries: Map = new Map(); private vault: VaultLike | null = null; constructor(vault: VaultLike) { this.vault = vault; } - private storeSummary(filePath: string, summary: string): void { - const sanitizedPath = sanitizeFilePath(filePath); - this.summaries.set(sanitizedPath, summary); - } - - getSummary(filePath: string): string | undefined { - const sanitizedPath = sanitizeFilePath(filePath); - return this.summaries.get(sanitizedPath); - } - async searchVault(query: string, limit: number = 5): Promise { if (!query || !query.trim()) { return []; @@ -188,7 +177,7 @@ class VaultIndexer { const headingMatches = content.match(/^#{1,6} (.*?)$/gm); if (headingMatches) { - headings.push(...headingMatches.map((h: string) => h.replace(/^# /, ''))); + headings.push(...headingMatches.map((h: string) => h.replace(/^#{1,6} /, ''))); } const paragraphMatch = content.match(/^([^#]*?)(?=#|\n\n|$)/s);