fix(ide): Correct IDE client temp dir and port matching (#8270)

This commit is contained in:
Shreya Keshive
2025-09-12 13:49:37 -04:00
committed by GitHub
parent 8a5e692373
commit 1f9564223b
2 changed files with 37 additions and 5 deletions

View File

@@ -588,7 +588,7 @@ export class IdeClient {
// exist.
}
const portFileDir = path.join(os.tmpdir(), '.gemini', 'ide');
const portFileDir = path.join(os.tmpdir(), 'gemini', 'ide');
let portFiles;
try {
portFiles = await fs.promises.readdir(portFileDir);
@@ -650,7 +650,7 @@ export class IdeClient {
const portFromEnv = this.getPortFromEnv();
if (portFromEnv) {
const matchingPort = validWorkspaces.find(
(content) => content.port === portFromEnv,
(content) => String(content.port) === portFromEnv,
);
if (matchingPort) {
return matchingPort;