mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-22 17:57:46 +00:00
This commit resolves a bug where the `write-file` operation could fail to render content due to a missing filename. The fix involves: - Ensuring `fileName` is consistently passed to `DiffRenderer.tsx` through `ToolConfirmationMessage.tsx`, `ToolMessage.tsx`, and `useGeminiStream.ts`. - Modifying `edit.ts` and `write-file.ts` to include `fileName` in the `FileDiff` object. - Expanding the `FileDiff` interface in `tools.ts` to include `fileName`. Additionally, this commit enhances the diff rendering by: - Adding syntax highlighting based on file extension in `DiffRenderer.tsx`. - Adding more language mappings to `getLanguageFromExtension` in `DiffRenderer.tsx`. - Added lots of tests for all the above. Fixes https://b.corp.google.com/issues/418125982
40 lines
1.0 KiB
JSON
40 lines
1.0 KiB
JSON
{
|
|
"name": "@gemini-code/server",
|
|
"version": "0.1.0",
|
|
"description": "Gemini CLI Server",
|
|
"type": "module",
|
|
"main": "dist/index.js",
|
|
"scripts": {
|
|
"start": "node dist/src/index.js",
|
|
"build": "../../scripts/build_package.sh",
|
|
"clean": "rm -rf dist",
|
|
"lint": "eslint . --ext .ts,.tsx",
|
|
"format": "prettier --write .",
|
|
"test": "vitest run",
|
|
"test:ci": "vitest run --reporter=junit --outputFile=junit.xml",
|
|
"typecheck": "tsc --noEmit",
|
|
"prerelease:version": "node ../../scripts/bind_package_version.js",
|
|
"prerelease:deps": "node ../../scripts/bind_package_dependencies.js",
|
|
"prepack": "npm run build"
|
|
},
|
|
"files": [
|
|
"dist"
|
|
],
|
|
"dependencies": {
|
|
"@google/genai": "^0.13.0",
|
|
"@modelcontextprotocol/sdk": "^1.11.0",
|
|
"diff": "^7.0.0",
|
|
"dotenv": "^16.4.7",
|
|
"fast-glob": "^3.3.3"
|
|
},
|
|
"devDependencies": {
|
|
"@types/diff": "^7.0.2",
|
|
"@types/dotenv": "^6.1.1",
|
|
"typescript": "^5.3.3",
|
|
"vitest": "^3.1.1"
|
|
},
|
|
"engines": {
|
|
"node": ">=18"
|
|
}
|
|
}
|