Refactor: Migrate console.error in ripGrep.ts to debugLogger (#15201)

This commit is contained in:
Adib234
2025-12-17 12:40:28 -05:00
committed by GitHub
parent bf90b59935
commit bb8f181ef1

View File

@@ -279,7 +279,7 @@ class GrepToolInvocation extends BaseToolInvocation<
returnDisplay: displayMessage,
};
} catch (error) {
console.error(`Error during GrepLogic execution: ${error}`);
debugLogger.warn(`Error during GrepLogic execution: ${error}`);
const errorMessage = getErrorMessage(error);
return {
llmContent: `Error during grep search operation: ${errorMessage}`,
@@ -441,7 +441,7 @@ class GrepToolInvocation extends BaseToolInvocation<
return this.parseRipgrepJsonOutput(output, absolutePath);
} catch (error: unknown) {
console.error(`GrepLogic: ripgrep failed: ${getErrorMessage(error)}`);
debugLogger.debug(`GrepLogic: ripgrep failed: ${getErrorMessage(error)}`);
throw error;
}
}