Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2730,6 +2730,12 @@ export const createAntigravityPlugin = (providerId: string) => async (
await saveAccounts(existingStorage);
}
console.log("");
console.log("\nPress Enter to return to the menu...");
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This prints an extra blank line because there’s already a console.log("") immediately above and this string also starts with \n. Consider removing one of the newlines to avoid double-spacing the prompt.

Suggested change
console.log("\nPress Enter to return to the menu...");
console.log("Press Enter to return to the menu...");

Copilot uses AI. Check for mistakes.
const { createInterface } = await import("node:readline/promises");
const { stdin, stdout } = await import("node:process");
const rl = createInterface({ input: stdin, output: stdout });
await rl.question("");
rl.close();
Comment on lines +2734 to +2738
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing try-finally block for readline cleanup

Suggested change
const { createInterface } = await import("node:readline/promises");
const { stdin, stdout } = await import("node:process");
const rl = createInterface({ input: stdin, output: stdout });
await rl.question("");
rl.close();
const { createInterface } = await import("node:readline/promises");
const { stdin, stdout } = await import("node:process");
const rl = createInterface({ input: stdin, output: stdout });
try {
await rl.question("");
} finally {
rl.close();
}
Prompt To Fix With AI
This is a comment left during a code review.
Path: src/plugin.ts
Line: 2734:2738

Comment:
missing try-finally block for readline cleanup

```suggestion
                  const { createInterface } = await import("node:readline/promises");
                  const { stdin, stdout } = await import("node:process");
                  const rl = createInterface({ input: stdin, output: stdout });
                  try {
                    await rl.question("");
                  } finally {
                    rl.close();
                  }
```

How can I resolve this? If you propose a fix, please make it concise.

Comment on lines +2737 to +2738
Copy link

Copilot AI Feb 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The readline interface should be closed in a finally block (or by reusing an existing helper like promptOAuthCallbackValue) so it’s always cleaned up if rl.question() throws (e.g., stdin closed, SIGINT). As written, an exception here can leave the interface open and potentially keep the process in a bad input state.

Suggested change
await rl.question("");
rl.close();
try {
await rl.question("");
} finally {
rl.close();
}

Copilot uses AI. Check for mistakes.
continue;
}

Expand Down
Loading