feat(core,cli): migrate console.debug to debugLogger (M3 Phase 1-3)

This commit is contained in:
tanzhenxin 2026-01-25 20:57:25 +08:00
parent ba2824b0b0
commit 3959b73bce
63 changed files with 554 additions and 538 deletions

View file

@ -6,6 +6,9 @@
import { execSync } from 'node:child_process';
import { ProxyAgent } from 'undici';
import { createDebugLogger } from '@qwen-code/qwen-code-core';
const debugLogger = createDebugLogger('GIT');
/**
* Checks if a directory is within a git repository hosted on GitHub.
@ -24,7 +27,7 @@ export const isGitHubRepository = (): boolean => {
return pattern.test(remotes);
} catch (_error) {
// If any filesystem error occurs, assume not a git repo
console.debug(`Failed to get git remote:`, _error);
debugLogger.debug(`Failed to get git remote:`, _error);
return false;
}
};
@ -83,7 +86,7 @@ export const getLatestGitHubRelease = async (
}
return releaseTag;
} catch (_error) {
console.debug(
debugLogger.debug(
`Failed to determine latest qwen-code-action release:`,
_error,
);