Build a Gmail client with two specific AI features, thread summarization and natural-language search, rather than a general AI wrapper around email. Use Next.js/TypeScript with the Gmail API (OAuth) for the base email client (list, read, reply, archive), and a model key read from ANTHROPIC_API_KEY or OPENAI_API_KEY for the AI features specifically. For thread summarization: on a long thread, more than a handful of messages, offer a 'Summarize' button that strips quoted-reply boilerplate and signatures before sending the thread's actual content to the model, returning a short summary of the discussion and any open questions. For natural-language search: let the user type a plain-English query like 'the email about the contract from last month', send it to the model with instructions to translate it into Gmail's own search operator syntax (from:, subject:, after:, has:attachment), and run the translated query against the Gmail API — show the translated query to the user so they can see and correct what was actually searched. Do not build AI-drafted reply suggestions, native mobile or desktop apps, or team shared-inbox features — those are out of scope; this is a single-account web client with two specific, well-scoped AI features. Needs a Google OAuth app with Gmail API access, plus an Anthropic or OpenAI API key for the AI features — without a key, the client still works as a plain Gmail client with those two buttons disabled.