Fix TypeScript error in version check

This commit is contained in:
Mario Zechner 2025-11-20 12:00:51 +01:00
parent b3d4478b61
commit e3c4dd22ae
2 changed files with 78 additions and 61 deletions

View file

@ -314,7 +314,7 @@ async function checkForNewVersion(currentVersion: string): Promise<string | null
const response = await fetch("https://registry.npmjs.org/@mariozechner/pi-coding-agent/latest");
if (!response.ok) return null;
const data = await response.json();
const data = (await response.json()) as { version?: string };
const latestVersion = data.version;
if (latestVersion && latestVersion !== currentVersion) {