mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-08-02 05:02:27 +08:00
25 lines
653 B
TypeScript
25 lines
653 B
TypeScript
import type { NoteEmbeddingContext } from "../types.js";
|
|
|
|
/**
|
|
* Interface for chunking operations
|
|
*/
|
|
export interface ChunkingOperations {
|
|
/**
|
|
* Process a large note by breaking it into chunks and creating embeddings for each chunk
|
|
*/
|
|
processNoteWithChunking(
|
|
noteId: string,
|
|
provider: any,
|
|
context: NoteEmbeddingContext
|
|
): Promise<void>;
|
|
}
|
|
|
|
/**
|
|
* Get the chunking operations instance
|
|
* This function is implemented to break circular dependencies
|
|
*/
|
|
export async function getChunkingOperations(): Promise<ChunkingOperations> {
|
|
const chunking = await import('./chunking.js');
|
|
return chunking;
|
|
}
|