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

+8
View File
@@ -53,6 +53,8 @@ export function useOllamaDownload() {
downloadError: null,
filePath: null,
isInstalled: false,
isChecking: false,
checkStatus: '',
});
try {
@@ -66,6 +68,8 @@ export function useOllamaDownload() {
downloadError: null,
filePath: existingPath,
isInstalled: false,
isChecking: false,
checkStatus: '',
});
return;
}
@@ -79,6 +83,8 @@ export function useOllamaDownload() {
downloadError: null,
filePath,
isInstalled: false,
isChecking: false,
checkStatus: '',
});
} catch (error) {
setState({
@@ -88,6 +94,8 @@ export function useOllamaDownload() {
downloadError: error instanceof Error ? error.message : 'Erro desconhecido durante download',
filePath: null,
isInstalled: false,
isChecking: false,
checkStatus: '',
});
}
};