diff --git a/AGENTS.md b/AGENTS.md index b5750f7..76ac506 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -345,7 +345,6 @@ Documentation/usage lookup: - Use `context7` for latest dependency usage. - ## 🚨 Local Quality Checks (Optional Flow) After a set of changes, run these three checks in parallel instead of full lint immediately: diff --git a/README.pt-BR.md b/README.pt-BR.md index fb237bf..9e9b959 100644 --- a/README.pt-BR.md +++ b/README.pt-BR.md @@ -50,6 +50,7 @@ Quando você usa suas IDEs favoritas, já encontrou estes problemas? Este projeto contém melhorias significativas de desenvolvimento, correção de erros e melhorias de configuração em relação ao projeto original base. Principais melhorias incluem: + - **Interface de Gerenciamento de API Aprimorada:** Seletores dinâmicos de modelos e recursos de "Copiar Nome da API" implementados para facilitar a integração com outras ferramentas. - **Streaming Robusto (SSE):** Correção de bugs críticos no streaming via Server-Sent Events (SSE) no endpoint proxy `/v1/chat/completions` para suportar perfeitamente IDEs como Cursor, OpenCode e Windsurf. - **Rebranding e Localização:** Rebranding completo para Gemini Nexus com traduções melhoradas em Português (Brasil) e padrões em Inglês. diff --git a/package-lock.json b/package-lock.json index bc034a2..3924e7c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -112,6 +112,7 @@ "babel-plugin-react-compiler": "1.0.0", "code-inspector-plugin": "^1.3.3", "conventional-changelog-conventionalcommits": "^9.1.0", + "cross-env": "^10.1.0", "electron": "^37.3.1", "electron-devtools-installer": "^4.0.0", "electron-packager-languages": "^0.6.0", @@ -1997,6 +1998,13 @@ "tslib": "^2.4.0" } }, + "node_modules/@epic-web/invariant": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@epic-web/invariant/-/invariant-1.0.0.tgz", + "integrity": "sha512-lrTPqgvfFQtR/eY/qkIzp98OGdNJu0m5ji3q/nJI8v3SXkRKEnWiOxMmbvcSoAIzv/cGiuvRy57k4suKQSAdwA==", + "dev": true, + "license": "MIT" + }, "node_modules/@esbuild/aix-ppc64": { "version": "0.25.12", "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.12.tgz", @@ -14272,6 +14280,24 @@ "dev": true, "license": "MIT" }, + "node_modules/cross-env": { + "version": "10.1.0", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-10.1.0.tgz", + "integrity": "sha512-GsYosgnACZTADcmEyJctkJIoqAhHjttw7RsFrVoJNXbsWWqaq6Ym+7kZjq6mS45O0jij6vtiReppKQEtqWy6Dw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@epic-web/invariant": "^1.0.0", + "cross-spawn": "^7.0.6" + }, + "bin": { + "cross-env": "dist/bin/cross-env.js", + "cross-env-shell": "dist/bin/cross-env-shell.js" + }, + "engines": { + "node": ">=20" + } + }, "node_modules/cross-spawn": { "version": "7.0.6", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", @@ -20668,7 +20694,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -20689,7 +20714,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -20710,7 +20734,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -20731,7 +20754,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -20752,7 +20774,6 @@ "cpu": [ "arm" ], - "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -20773,7 +20794,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -20794,7 +20814,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -20815,7 +20834,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -20836,7 +20854,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -20857,7 +20874,6 @@ "cpu": [ "arm64" ], - "dev": true, "license": "MPL-2.0", "optional": true, "os": [ @@ -20878,7 +20894,6 @@ "cpu": [ "x64" ], - "dev": true, "license": "MPL-2.0", "optional": true, "os": [ diff --git a/package.json b/package.json index 3337bb3..7ba5207 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "main": ".vite/build/main.js", "private": true, "scripts": { - "start": "electron-forge start", + "start": "cross-env DEBUG=electron-forge:* electron-forge start", + "dev": "cross-env DEBUG=electron-forge:* electron-forge start", "package": "electron-forge package", "make": "electron-forge make", "publish": "electron-forge publish", @@ -62,6 +63,7 @@ "babel-plugin-react-compiler": "1.0.0", "code-inspector-plugin": "^1.3.3", "conventional-changelog-conventionalcommits": "^9.1.0", + "cross-env": "^10.1.0", "electron": "^37.3.1", "electron-devtools-installer": "^4.0.0", "electron-packager-languages": "^0.6.0", diff --git a/rename-deep.js b/rename-deep.js index 500c3d0..c7eb8b3 100644 --- a/rename-deep.js +++ b/rename-deep.js @@ -7,8 +7,28 @@ const projectRoot = process.cwd(); const allowedExtensions = /\.(ts|tsx|js|jsx|json|md|html|jsonc|yml|yaml|css)$/; // Arquivos/Pastas a ignorar (já curados ou irrelevantes) -const ignoreDirs = ['node_modules', '.git', '.gemini', 'dist', 'out', 'build', 'images', 'docs', '.planning']; -const ignoreFiles = ['README.md', 'README.pt-BR.md', 'CHANGELOG.md', 'forge.config.ts', 'package.json', 'rename.js', 'rename-deep.js', 'task.md', 'walkthrough.md']; +const ignoreDirs = [ + 'node_modules', + '.git', + '.gemini', + 'dist', + 'out', + 'build', + 'images', + 'docs', + '.planning', +]; +const ignoreFiles = [ + 'README.md', + 'README.pt-BR.md', + 'CHANGELOG.md', + 'forge.config.ts', + 'package.json', + 'rename.js', + 'rename-deep.js', + 'task.md', + 'walkthrough.md', +]; function walkAndReplace(dir) { const files = fs.readdirSync(dir); @@ -21,7 +41,7 @@ function walkAndReplace(dir) { if (stat.isDirectory()) { walkAndReplace(fullPath); - + // Rename directory if it contains 'antigravity' if (file.toLowerCase().includes('antigravity')) { const newName = file.replace(/antigravity/gi, (match) => { @@ -52,7 +72,7 @@ function walkAndReplace(dir) { // 2. String "Antigravity " -> "Gemini Nexus " content = content.replace(/Antigravity /g, 'Gemini Nexus '); - + // 3. String " Antigravity" -> " Gemini Nexus" content = content.replace(/ Antigravity/g, ' Gemini Nexus'); @@ -63,7 +83,10 @@ function walkAndReplace(dir) { content = content.replace(/antigravity/g, 'geminiNexus'); // Restore GitHub links - content = content.replace(new RegExp(tempUrlMarker, 'g'), 'github.com/Draculabo/AntigravityManager'); + content = content.replace( + new RegExp(tempUrlMarker, 'g'), + 'github.com/Draculabo/AntigravityManager', + ); // Cleanup any double replacements content = content.replace(/GeminiNexus Nexus/g, 'Gemini Nexus'); @@ -72,7 +95,7 @@ function walkAndReplace(dir) { fs.writeFileSync(fullPath, content, 'utf-8'); console.log(`Updated file content: ${fullPath}`); } - + // Rename file if it contains 'antigravity' if (file.toLowerCase().includes('antigravity')) { const newName = file.replace(/antigravity/gi, (match) => { diff --git a/src/components/AccountProxySettings.tsx b/src/components/AccountProxySettings.tsx index d1a7aec..d78547c 100644 --- a/src/components/AccountProxySettings.tsx +++ b/src/components/AccountProxySettings.tsx @@ -14,16 +14,16 @@ function AccountProxyItem({ account }: { account: CloudAccount }) { const [proxySaved, setProxySaved] = useState(false); return ( -