@fre4x/gemini 1.0.54 → 1.0.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +10 -5
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -67550,6 +67550,9 @@ function withApiKey(videoUrl) {
67550
67550
  return `${videoUrl}${separator}key=${encodeURIComponent(apiKey)}`;
67551
67551
  }
67552
67552
  }
67553
+ function getErrorMessage(error48) {
67554
+ return error48 instanceof Error ? error48.message : String(error48);
67555
+ }
67553
67556
  var FILE_EXT_TO_MIME = {
67554
67557
  ".png": "image/png",
67555
67558
  ".jpg": "image/jpeg",
@@ -67846,7 +67849,7 @@ Mock response \u2014 no API call made.`;
67846
67849
  return textResult(
67847
67850
  `${responseText}
67848
67851
 
67849
- \u26A0\uFE0F Failed to save analysis result: ${error48.message}`
67852
+ \u26A0\uFE0F Failed to save analysis result: ${getErrorMessage(error48)}`
67850
67853
  );
67851
67854
  }
67852
67855
  }
@@ -67947,7 +67950,7 @@ async function generateImage(rawArgs) {
67947
67950
  } catch (error48) {
67948
67951
  content2.push({
67949
67952
  type: "text",
67950
- text: `\u26A0\uFE0F [Mock] Failed to save image: ${error48.message}`
67953
+ text: `\u26A0\uFE0F [Mock] Failed to save image: ${getErrorMessage(error48)}`
67951
67954
  });
67952
67955
  }
67953
67956
  }
@@ -67996,7 +67999,7 @@ Check Imagen access at https://ai.google.dev/`
67996
67999
  } catch (error48) {
67997
68000
  saveErrorText = `
67998
68001
 
67999
- \u26A0\uFE0F Failed to save images: ${error48.message}`;
68002
+ \u26A0\uFE0F Failed to save images: ${getErrorMessage(error48)}`;
68000
68003
  }
68001
68004
  }
68002
68005
  const content = [
@@ -68101,7 +68104,7 @@ async function getVideoStatus(rawArgs) {
68101
68104
  isError: true
68102
68105
  };
68103
68106
  }
68104
- const videos = (op.response?.generatedVideos ?? []).map((v) => v.video?.uri ?? "").filter(Boolean);
68107
+ const videos = (op.response?.generatedVideos ?? []).map((video) => video.video?.uri ?? "").filter(Boolean);
68105
68108
  if (videos.length === 0) {
68106
68109
  return textResult(
68107
68110
  `Complete but no video URLs found:
@@ -68141,7 +68144,9 @@ ${JSON.stringify(op.response, null, 2)}`
68141
68144
  await fs3.writeFile(fpath, buffer);
68142
68145
  savedPaths.push(fpath);
68143
68146
  } catch (error48) {
68144
- console.error(`Failed to save video: ${error48.message}`);
68147
+ console.error(
68148
+ `Failed to save video: ${getErrorMessage(error48)}`
68149
+ );
68145
68150
  }
68146
68151
  }
68147
68152
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fre4x/gemini",
3
- "version": "1.0.54",
3
+ "version": "1.0.55",
4
4
  "description": "A Gemini MCP server providing multimodal analysis and image/video generation.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",