feat: account management overhaul + 7 issue resolutions (#147)

- Add smart JSON export/import with schema validation and deduplication
- Add per-account proxy configurations (Issue #79)
- Add advanced account sorting engine (Issues #126 & #99)
- Add compact horizontal layout, AI credits, inline model visibility (Issues #145 & #134)
- Add desktop push notifications for low quota (Issue #53)
- Fix Arch Linux AUR process detection bug (Issue #117)
- Default theme set to Dark Mode (it's better)
- UI Polishing: Improved sort dropdown and symmetrical dialog layouts
- Dev Mode: Resolved port conflicts and single-instance locks
- Updated README and README.zh-CN with new features
This commit is contained in:
vd authored and GitHub committed 2026-04-06 20:32:42 +08:00
1 parent 50a325be11
commit ed0dd811a8
37 files changed
+1989 -455

No files matched your search

+34 -9
View File
@@ -73,19 +73,17 @@ export async function isProcessRunning(): Promise<boolean> {
const currentPid = process.pid;
// Use find-process to search for Antigravity processes
// 'name' search type matches process name
const processMap = new Map<number, ProcessInfo>();
const allMatches: ProcessInfo[] = [];
const searchNames = ['Antigravity', 'antigravity'];
if (platform === 'linux') {
searchNames.push('electron');
}
let sawNoMatch = false;
for (const searchName of searchNames) {
try {
const matches = await findProcess('name', searchName, true);
for (const proc of matches) {
if (typeof proc.pid === 'number') {
processMap.set(proc.pid, proc);
}
}
const matches = await findProcess('name', searchName, false);
allMatches.push(...matches);
} catch (error) {
if (isPgrepNoMatchError(error)) {
sawNoMatch = true;
@@ -95,6 +93,13 @@ export async function isProcessRunning(): Promise<boolean> {
}
}
const processMap = new Map<number, ProcessInfo>();
for (const proc of allMatches) {
if (typeof proc.pid === 'number') {
processMap.set(proc.pid, proc);
}
}
const processes = Array.from(processMap.values());
if (processes.length === 0 && sawNoMatch) {
logger.debug('No Antigravity process found (pgrep returned 1)');
@@ -145,7 +150,27 @@ export async function isProcessRunning(): Promise<boolean> {
return true;
}
} else {
// Linux: Check for antigravity in name or path (but not tools)
const nameLower = name.toLowerCase();
const cmdLower = cmd.toLowerCase();
if (nameLower === 'electron') {
// Stricter check for AUR/Electron wrapper:
// Must include antigravity in command line but NOT manager or tools
const isAntigravityApp =
(cmdLower.includes('/antigravity') ||
cmdLower.includes(' antigravity') ||
cmdLower.endsWith('antigravity')) &&
!cmdLower.includes('manager') &&
!cmdLower.includes('tools');
if (isAntigravityApp) {
logger.debug(
`Found Antigravity (AUR/electron) process: PID=${proc.pid}, name=${name}, cmd=${cmd.substring(0, 100)}`,
);
return true;
}
}
if (
(name.includes('antigravity') || cmd.includes('/antigravity')) &&
!name.includes('tools')