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
@@ -195,7 +195,7 @@ export function useDeepResearch() {
setState(s => ({ ...s, context }));
return context;
} catch (error) {
log.warn('Contextual analysis failed, continuing without context:', error);
log.warn(`Contextual analysis failed, continuing without context: ${error instanceof Error ? error.message : String(error)}`);
return null;
}
}, []);
@@ -219,7 +219,7 @@ export function useDeepResearch() {
setState(s => ({ ...s, enrichedQueries: enriched }));
return enriched;
} catch (error) {
log.warn('Query enrichment failed, continuing without enrichment:', error);
log.warn(`Query enrichment failed, continuing without enrichment: ${error instanceof Error ? error.message : String(error)}`);
return null;
}
}, []);