mirror of
https://github.com/zadam/trilium.git
synced 2025-10-20 23:29:02 +02:00
format document
This commit is contained in:
parent
a0dda48748
commit
eb5b85315f
@ -58,7 +58,7 @@ export class VectorSearchService {
|
||||
llmService = null
|
||||
} = options;
|
||||
|
||||
log.info(`VectorSearchService: Finding relevant notes for "${query.substring(0, 50)}..."`);
|
||||
log.info(`VectorSearchService: Finding relevant notes for "${query}"`);
|
||||
log.info(`Parameters: contextNoteId=${contextNoteId || 'global'}, maxResults=${maxResults}, summarize=${summarizeContent}`);
|
||||
|
||||
try {
|
||||
@ -85,7 +85,7 @@ export class VectorSearchService {
|
||||
}
|
||||
|
||||
// Find similar notes based on embeddings
|
||||
let noteResults: {noteId: string, similarity: number}[] = [];
|
||||
let noteResults: { noteId: string, similarity: number }[] = [];
|
||||
|
||||
// If contextNoteId is provided, search only within that branch
|
||||
if (contextNoteId) {
|
||||
@ -264,7 +264,7 @@ export class VectorSearchService {
|
||||
embedding: Float32Array,
|
||||
contextNoteId: string,
|
||||
limit = SEARCH_CONSTANTS.CONTEXT.MAX_SIMILAR_NOTES
|
||||
): Promise<{noteId: string, similarity: number}[]> {
|
||||
): Promise<{ noteId: string, similarity: number }[]> {
|
||||
try {
|
||||
// Get all notes in the subtree
|
||||
const noteIds = await this.getSubtreeNoteIds(contextNoteId);
|
||||
@ -285,7 +285,7 @@ export class VectorSearchService {
|
||||
const providerName = provider.name;
|
||||
|
||||
// Get embeddings for all notes in the branch
|
||||
const results: {noteId: string, similarity: number}[] = [];
|
||||
const results: { noteId: string, similarity: number }[] = [];
|
||||
|
||||
for (const noteId of noteIds) {
|
||||
try {
|
||||
|
Loading…
x
Reference in New Issue
Block a user