format document

This commit is contained in:
perf3ct 2025-04-17 18:38:21 +00:00
parent a0dda48748
commit eb5b85315f
No known key found for this signature in database
GPG Key ID: 569C4EEC436F5232

View File

@ -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 {