andy-stack_vaultkeeper-ai/Helpers/SearchTypes.ts
Andrew Beal 4d72bba087 Add page number tracking to search snippets
- Add pageNumber field to ISearchSnippet and IPageText interfaces
- Update extractSnippets to process content as paginated text
- Switch PDF reading to use readPDF helper for page extraction
- Update search results to include page numbers in snippets
- Add page number assertions to VaultService tests
2025-12-20 14:48:42 +00:00

27 lines
520 B
TypeScript

import { TFile } from "obsidian";
/**
* Represents text content read from a file with the page number
*/
export interface IPageText {
text: string;
pageNumber: number;
}
/**
* Represents a single snippet of matched content from a file
*/
export interface ISearchSnippet {
text: string;
matchIndex: number;
matchLength: number;
pageNumber: number;
}
/**
* Represents all matches found in a single file
*/
export interface ISearchMatch {
file: TFile;
snippets: ISearchSnippet[];
}