mirror of
https://github.com/tiennm99/ccs.git
synced 2026-09-04 16:16:46 +00:00
fix(doctor): use actual installed clipproxy version instead of hardcoded
This commit is contained in:
@@ -900,4 +900,20 @@ export function getCLIProxyPath(): string {
|
||||
return manager.getBinaryPath();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get installed CLIProxyAPI version from .version file
|
||||
* Returns the fallback version if not installed or version file missing
|
||||
*/
|
||||
export function getInstalledCliproxyVersion(): string {
|
||||
const versionFile = path.join(getBinDir(), '.version');
|
||||
if (fs.existsSync(versionFile)) {
|
||||
try {
|
||||
return fs.readFileSync(versionFile, 'utf8').trim();
|
||||
} catch {
|
||||
return CLIPROXY_FALLBACK_VERSION;
|
||||
}
|
||||
}
|
||||
return CLIPROXY_FALLBACK_VERSION;
|
||||
}
|
||||
|
||||
export default BinaryManager;
|
||||
|
||||
Reference in New Issue
Block a user