Skip to content

armgit / cindy

Public Imported from GitHub
0

Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。

761 B
Raw Blame
import { registerSiteAuthCommands } from '../_shared/site-auth.js';
import { probeGoogleAccount, waitForGoogleReturn } from '../_shared/google-account.js';

async function readIdentity(page) {
  const result = await probeGoogleAccount(page, 'gemini.google.com');
  return { name: result.name };
}

registerSiteAuthCommands({
  site: 'gemini',
  domain: 'gemini.google.com',
  loginUrl: 'https://accounts.google.com/ServiceLogin?continue=https%3A%2F%2Fgemini.google.com%2F',
  columns: ['name'],
  verify: async (page) => {
    await page.goto('https://gemini.google.com/app');
    await page.wait(3);
    return readIdentity(page);
  },
  poll: async (page) => {
    await waitForGoogleReturn(page, 'gemini.google.com');
    return readIdentity(page);
  },
});