release: v2.0.1 - Advanced Knowledge Mix & Architectural Intelligence

This commit is contained in:
g1nation
2026-05-13 22:05:39 +09:00
parent c32b17377b
commit e85e11aac6
23 changed files with 1758 additions and 78 deletions
+22 -14
View File
@@ -98,23 +98,31 @@ export class RetrievalOrchestrator {
fusionLog.push(`Expanded tokens: [${expandedTokens.slice(0, 15).join(', ')}]`);
// ── ① Brain File Search (TF-IDF enhanced, optionally hybrid with embeddings) ──
// `brainFileLimit === 0` is meaningful (Knowledge Mix "model knowledge only"
// mode), so use `??` rather than `||`. When the caller explicitly passes 0,
// we skip retrieval entirely instead of falling back to the default of 8.
const scopeFolders = options.scopeFolders ?? [];
const brainChunks = this.searchBrainFiles(
query,
expandedTokens,
options.brain,
options.brainFileLimit || 8,
options.includeRawConversations || false,
scopeFolders,
options.queryEmbedding,
options.embeddingModel,
options.embeddingBlendAlpha
);
const brainFileLimit = options.brainFileLimit ?? 8;
const brainChunks = brainFileLimit > 0
? this.searchBrainFiles(
query,
expandedTokens,
options.brain,
brainFileLimit,
options.includeRawConversations || false,
scopeFolders,
options.queryEmbedding,
options.embeddingModel,
options.embeddingBlendAlpha
)
: [];
allChunks.push(...brainChunks);
fusionLog.push(
scopeFolders.length > 0
? `Brain search (scoped to ${scopeFolders.length} folder(s)): ${brainChunks.length} chunks`
: `Brain search: ${brainChunks.length} chunks found`
brainFileLimit === 0
? 'Brain search: skipped (Knowledge Mix weight = 0)'
: scopeFolders.length > 0
? `Brain search (scoped to ${scopeFolders.length} folder(s)): ${brainChunks.length} chunks`
: `Brain search: ${brainChunks.length} chunks found`
);
// ── ② Memory Layers ──