Chore(deps): Upgrade @google/genai to v1.0.1

- Upgraded the @google/genai SDK from ^0.13.0 to ^1.0.1.
- Addressed a related type error in `packages/server/src/tools/edit.test.ts` by updating a type assertion.

Part of https://github.com/google-gemini/gemini-cli/issues/551
This commit is contained in:
Taylor Mullen 2025-05-26 14:07:22 -07:00 committed by N. Taylor Mullen
parent 70d469ccd3
commit 02503a3248
3 changed files with 11 additions and 8 deletions

13
package-lock.json generated
View File

@ -887,9 +887,9 @@
"link": true "link": true
}, },
"node_modules/@google/genai": { "node_modules/@google/genai": {
"version": "0.13.0", "version": "1.0.1",
"resolved": "https://registry.npmjs.org/@google/genai/-/genai-0.13.0.tgz", "resolved": "https://registry.npmjs.org/@google/genai/-/genai-1.0.1.tgz",
"integrity": "sha512-eaEncWt875H7046T04mOpxpHJUM+jLIljEf+5QctRyOeChylE/nhpwm1bZWTRWoOu/t46R9r+PmgsJFhTpE7tQ==", "integrity": "sha512-qf8sq9vpuKUeBKukAn43z2eC1I/Jw63b9wo6O+1x3EIroF3oDouJOtW1AzwvfO+9gzCPfLjuCUONhMKiBC8vkQ==",
"license": "Apache-2.0", "license": "Apache-2.0",
"dependencies": { "dependencies": {
"google-auth-library": "^9.14.2", "google-auth-library": "^9.14.2",
@ -898,7 +898,10 @@
"zod-to-json-schema": "^3.22.4" "zod-to-json-schema": "^3.22.4"
}, },
"engines": { "engines": {
"node": ">=18.0.0" "node": ">=20.0.0"
},
"peerDependencies": {
"@modelcontextprotocol/sdk": "^1.11.0"
} }
}, },
"node_modules/@google/genai/node_modules/ws": { "node_modules/@google/genai/node_modules/ws": {
@ -10487,7 +10490,7 @@
"name": "@gemini-code/server", "name": "@gemini-code/server",
"version": "0.1.0", "version": "0.1.0",
"dependencies": { "dependencies": {
"@google/genai": "^0.13.0", "@google/genai": "^1.0.1",
"@modelcontextprotocol/sdk": "^1.11.0", "@modelcontextprotocol/sdk": "^1.11.0",
"diff": "^7.0.0", "diff": "^7.0.0",
"dotenv": "^16.4.7", "dotenv": "^16.4.7",

View File

@ -22,7 +22,7 @@
"dist" "dist"
], ],
"dependencies": { "dependencies": {
"@google/genai": "^0.13.0", "@google/genai": "^1.0.1",
"@modelcontextprotocol/sdk": "^1.11.0", "@modelcontextprotocol/sdk": "^1.11.0",
"diff": "^7.0.0", "diff": "^7.0.0",
"dotenv": "^16.4.7", "dotenv": "^16.4.7",

View File

@ -108,12 +108,12 @@ describe('EditTool', () => {
const problematicSnippet = const problematicSnippet =
snippetMatch && snippetMatch[1] ? snippetMatch[1] : ''; snippetMatch && snippetMatch[1] ? snippetMatch[1] : '';
if (schema.properties?.corrected_target_snippet) { if (((schema as any).properties as any)?.corrected_target_snippet) {
return Promise.resolve({ return Promise.resolve({
corrected_target_snippet: problematicSnippet, corrected_target_snippet: problematicSnippet,
}); });
} }
if (schema.properties?.corrected_new_string) { if (((schema as any).properties as any)?.corrected_new_string) {
// For new_string correction, we might need more sophisticated logic, // For new_string correction, we might need more sophisticated logic,
// but for now, returning original is a safe default if not specified by a test. // but for now, returning original is a safe default if not specified by a test.
const originalNewStringMatch = promptText.match( const originalNewStringMatch = promptText.match(