mirror of
https://github.com/abhigyanpatwari/GitNexus.git
synced 2026-10-31 06:52:49 +00:00
fix: clean command --force flag, hide debug logs in production
This commit is contained in:
parent
d0ba992316
commit
d07e790e74
3 changed files with 15 additions and 14 deletions
|
|
@ -119,7 +119,7 @@ export const analyzeCommand = async (
|
|||
console.log(` Storage: ${storagePath}`);
|
||||
console.log(` Stats: ${stats.nodes} nodes, ${stats.edges} edges`);
|
||||
|
||||
if (aiContext.pointerFiles.length > 0) {
|
||||
console.log(` AI Context: ${aiContext.pointerFiles.join(', ')}`);
|
||||
if (aiContext.files.length > 0) {
|
||||
console.log(` AI Context: ${aiContext.files.join(', ')}`);
|
||||
}
|
||||
};
|
||||
|
|
|
|||
|
|
@ -43,9 +43,8 @@ program
|
|||
.action(statusCommand);
|
||||
|
||||
program
|
||||
.command('clean [target]')
|
||||
.description('Delete indexed repository(ies)')
|
||||
.option('-a, --all', 'Delete all indexed repositories')
|
||||
.command('clean')
|
||||
.description('Delete GitNexus index for current repo')
|
||||
.option('-f, --force', 'Skip confirmation prompt')
|
||||
.action(cleanCommand);
|
||||
|
||||
|
|
|
|||
|
|
@ -163,15 +163,17 @@ export const processImports = async (
|
|||
|
||||
// Removed verbose Java import logging
|
||||
} catch (queryError: any) {
|
||||
// Detailed debug logging for query failures
|
||||
console.group(`🔴 Query Error: ${file.path}`);
|
||||
console.log('Language:', language);
|
||||
console.log('Query (first 200 chars):', queryStr.substring(0, 200) + '...');
|
||||
console.log('Error:', queryError?.message || queryError);
|
||||
console.log('File content (first 300 chars):', file.content.substring(0, 300));
|
||||
console.log('AST root type:', tree.rootNode?.type);
|
||||
console.log('AST has errors:', tree.rootNode?.hasError);
|
||||
console.groupEnd();
|
||||
// Only log query errors in development mode
|
||||
if (isDev) {
|
||||
console.group(`🔴 Query Error: ${file.path}`);
|
||||
console.log('Language:', language);
|
||||
console.log('Query (first 200 chars):', queryStr.substring(0, 200) + '...');
|
||||
console.log('Error:', queryError?.message || queryError);
|
||||
console.log('File content (first 300 chars):', file.content.substring(0, 300));
|
||||
console.log('AST root type:', tree.rootNode?.type);
|
||||
console.log('AST has errors:', tree.rootNode?.hasError);
|
||||
console.groupEnd();
|
||||
}
|
||||
|
||||
if (wasReparsed) (tree as any).delete?.();
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue