// Copyright 2026 The Chromium Authors // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. // This dialog will be shown during M146 and removed by M147. // // To enable: // --enable-features=DevToolsGeminiRebranding import '../../ui/components/switch/switch.js'; import '../../ui/kit/kit.js'; import * as Common from '../../core/common/common.js'; import * as Host from '../../core/host/host.js'; import * as i18n from '../../core/i18n/i18n.js'; import * as Root from '../../core/root/root.js'; import * as Geometry from '../../models/geometry/geometry.js'; import * as Buttons from '../../ui/components/buttons/buttons.js'; import * as UI from '../../ui/legacy/legacy.js'; import {html, render} from '../../ui/lit/lit.js'; import * as VisualLogging from '../../ui/visual_logging/visual_logging.js'; import styles from './geminiRebrandPromoDialog.css.js'; const UIStrings = { /** * @description Aria label for the dialog */ dialogAriaLabel: 'Gemini 3 Flash in DevTools', /** * * @description Button text for dismissing the dialog. */ dismiss: 'Dismiss', /** * @description Button text for getting started. */ getStarted: 'Get started', /** * @description Detail message shown in the dialog. */ detailAiCompanion: 'Meet your AI-powered companion for web dev', /** * @description Detail message shown in the dialog. */ detailConsoleErrors: 'Get instant, accurate answers for console errors', /** * @description Detail message shown in the dialog. */ detailGenerateCode: 'Generate CSS and JS snippets on the fly', /** * @description Detail message shown in the dialog. */ detailPerformance: 'Automatically find issues in performance traces', } as const; const str_ = i18n.i18n.registerUIStrings('panels/common/GeminiRebrandPromoDialog.ts', UIStrings); const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_); interface ViewInput { onGetStartedClick: () => void; onCancelClick: () => void; } type View = (input: ViewInput, output: undefined, target: HTMLElement) => void; const PROMO_IMAGE_1X = new URL('../../Images/geminiInDevTools.png', import.meta.url).toString(); const PROMO_IMAGE_2X = new URL('../../Images/geminiInDevTools_2x.png', import.meta.url).toString(); export const DEFAULT_VIEW: View = (input, _output, target): void => { // clang-format off render( html`