chore: refine Next.js configuration and improve error handling

- Simplified the Next.js webpack configuration to apply raw-loader for markdown files universally.
- Updated build script in package.json to ensure webpack is used during the build process.
- Enhanced error logging across various hooks to provide clearer messages when exceptions occur, improving debugging capabilities.
This commit is contained in:
Evandro Fonseca Junior committed 2025-11-28 00:38:58 -03:00
1 parent 655d9c1b45
commit 55749c07e3
12 files changed
+44 -37

No files matched your search

+2 -2
View File
@@ -24,12 +24,13 @@ export interface CondensationOptions {
context?: QueryContext; // Contexto analisado para ranqueamento semântico
}
const DEFAULT_OPTIONS: Required<CondensationOptions> = {
const DEFAULT_OPTIONS: Omit<Required<CondensationOptions>, 'context'> & { context?: QueryContext } = {
maxTokens: 12000,
minRelevanceScore: 0.1,
autoSummarize: true,
summarizeThreshold: 5000,
fallbackToSummarization: true,
context: undefined,
};
/**
@@ -108,7 +109,6 @@ export function condenseKnowledgeBase(
entries.forEach((entry, entryIndex) => {
const processed = processContent(entry.content, query, {
summarizeThreshold: opts.summarizeThreshold,
autoSummarize: opts.autoSummarize,
});
// Atribuir sourceIndex e metadados aos chunks