mirror of
https://github.com/andy-stack/vaultkeeper-ai.git
synced 2026-07-22 06:42:03 +00:00
- 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
27 lines
520 B
TypeScript
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[];
|
|
}
|