chrome-devtools-frontend 1.0.1736236 → 1.0.1739869
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/rules/ui-and-widgets/ui-css-scoping-and-flex-layout.md +1 -1
- package/.agents/skills/version-control/SKILL.md +63 -11
- package/.stylelintrc.json +3 -1
- package/docs/devtools-protocol.md +3 -1
- package/eslint.config.mjs +127 -6
- package/front_end/application_tokens.css +0 -30
- package/front_end/core/host/AidaClient.ts +14 -36
- package/front_end/core/host/AidaGcaTranslation.ts +8 -5
- package/front_end/core/root/Runtime.ts +0 -5
- package/front_end/core/sdk/SourceMap.ts +30 -3
- package/front_end/core/sdk/SourceMapRangeMappings.ts +57 -0
- package/front_end/design_system_tokens.css +1 -0
- package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +5 -9
- package/front_end/entrypoints/main/GlobalAiButton.ts +2 -9
- package/front_end/entrypoints/main/MainImpl.ts +0 -4
- package/front_end/generated/SupportedCSSProperties.ts +24 -23
- package/front_end/models/ai-utils/AiUtils.ts +1 -5
- package/front_end/models/ai_assistance/agents/AiAgent.ts +2 -18
- package/front_end/models/ai_assistance/contexts/FileContext.ts +1 -2
- package/front_end/models/ai_assistance/tools/ListSources.ts +3 -1
- package/front_end/models/ai_code_generation/AiCodeGeneration.ts +0 -6
- package/front_end/models/javascript_metadata/NativeFunctions.ts +9 -5
- package/front_end/models/trace/EventsSerializer.ts +0 -8
- package/front_end/models/trace/extras/TraceFilter.ts +16 -8
- package/front_end/models/trace/extras/TraceTree.ts +104 -67
- package/front_end/models/trace/handlers/ExtensionTraceDataHandler.ts +0 -5
- package/front_end/models/trace/handlers/RendererHandler.ts +7 -6
- package/front_end/models/trace/handlers/SamplesHandler.ts +1 -1
- package/front_end/models/trace/helpers/Extensions.ts +1 -3
- package/front_end/models/trace/helpers/SamplesIntegrator.ts +155 -87
- package/front_end/models/trace/helpers/Trace.ts +15 -12
- package/front_end/models/trace/helpers/TreeHelpers.ts +38 -10
- package/front_end/models/trace/insights/SlowCSSSelector.ts +3 -3
- package/front_end/models/trace/lantern/metrics/LargestContentfulPaint.ts +19 -4
- package/front_end/models/workspace/UISourceCode.ts +30 -8
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +1 -7
- package/front_end/panels/ai_assistance/ai_assistance-meta.ts +15 -34
- package/front_end/panels/ai_assistance/components/ChatView.ts +2 -16
- package/front_end/panels/ai_assistance/components/chatView.css +0 -212
- package/front_end/panels/ai_assistance/components/walkthroughView.css +1 -1
- package/front_end/panels/animation/AnimationTimeline.ts +1 -1
- package/front_end/panels/animation/animationTimeline.css +5 -3
- package/front_end/panels/application/ApplicationPanelTreeElement.ts +66 -3
- package/front_end/panels/application/PrivateVerificationTokensView.ts +114 -26
- package/front_end/panels/application/ResourcesPanel.ts +1 -0
- package/front_end/panels/application/backgroundServiceView.css +2 -2
- package/front_end/panels/application/components/backForwardCacheView.css +1 -1
- package/front_end/panels/application/components/permissionsPolicySection.css +0 -4
- package/front_end/panels/application/frameDetailsReportView.css +0 -7
- package/front_end/panels/application/indexedDBViews.css +3 -3
- package/front_end/panels/application/privateVerificationTokensView.css +6 -0
- package/front_end/panels/application/resourcesPanel.css +0 -48
- package/front_end/panels/application/serviceWorkerUpdateCycleView.css +1 -1
- package/front_end/panels/application/serviceWorkersView.css +2 -2
- package/front_end/panels/comments/CommentsPane.ts +1 -1
- package/front_end/panels/comments/commentsPane.css +1 -1
- package/front_end/panels/common/common.ts +0 -1
- package/front_end/panels/console/ConsoleView.ts +11 -1
- package/front_end/panels/console/ConsoleViewMessage.ts +5 -1
- package/front_end/panels/console/consolePinPane.css +1 -1
- package/front_end/panels/console/consoleView.css +6 -5
- package/front_end/panels/elements/DOMTreeWidget.ts +47 -5
- package/front_end/panels/elements/StylePropertiesSection.ts +4 -9
- package/front_end/panels/elements/StylePropertyTreeElement.ts +52 -34
- package/front_end/panels/elements/classesPaneWidget.css +3 -7
- package/front_end/panels/elements/components/CSSQuery.ts +6 -5
- package/front_end/panels/elements/layoutPane.css +0 -1
- package/front_end/panels/elements/metricsSidebarPane.css +2 -2
- package/front_end/panels/elements/stylePropertiesTreeOutline.css +0 -6
- package/front_end/panels/elements/stylesSidebarPane.css +0 -1
- package/front_end/panels/emulation/InspectedPagePlaceholder.ts +1 -0
- package/front_end/panels/emulation/deviceModeView.css +0 -1
- package/front_end/panels/explain/components/consoleInsight.css +1 -6
- package/front_end/panels/issues/AffectedBlockedByResponseView.ts +88 -46
- package/front_end/panels/issues/AffectedHeavyAdView.ts +72 -43
- package/front_end/panels/issues/AffectedResourcesView.ts +81 -13
- package/front_end/panels/issues/GenericIssueDetailsView.ts +112 -32
- package/front_end/panels/issues/issues.ts +2 -0
- package/front_end/panels/issues/issuesTree.css +9 -2
- package/front_end/panels/layer_viewer/LayerDetailsView.ts +34 -17
- package/front_end/panels/layer_viewer/LayerTreeOutline.ts +39 -17
- package/front_end/panels/layer_viewer/Layers3DView.ts +34 -13
- package/front_end/panels/layer_viewer/layerDetailsView.css +2 -2
- package/front_end/panels/layer_viewer/layers3DView.css +0 -4
- package/front_end/panels/lighthouse/lighthousePanel.css +0 -9
- package/front_end/panels/linear_memory_inspector/components/linearMemoryValueInterpreter.css +2 -2
- package/front_end/panels/media/playerListView.css +0 -18
- package/front_end/panels/media/playerPropertiesView.css +1 -1
- package/front_end/panels/mobile_throttling/throttlingSettingsTab.css +2 -2
- package/front_end/panels/network/NetworkLogView.ts +9 -2
- package/front_end/panels/network/NetworkWaterfallColumn.ts +22 -10
- package/front_end/panels/network/RequestPreviewView.ts +182 -63
- package/front_end/panels/network/RequestTimingView.ts +16 -2
- package/front_end/panels/network/SignedExchangeInfoView.ts +242 -158
- package/front_end/panels/network/networkConfigView.css +3 -3
- package/front_end/panels/network/networkLogView.css +4 -16
- package/front_end/panels/network/networkPanel.css +0 -7
- package/front_end/panels/network/networkTimingTable.css +12 -27
- package/front_end/panels/network/signedExchangeInfoView.css +12 -8
- package/front_end/panels/performance_monitor/performanceMonitor.css +2 -2
- package/front_end/panels/profiler/IsolateSelector.ts +31 -10
- package/front_end/panels/profiler/profilesPanel.css +0 -19
- package/front_end/panels/protocol_monitor/JSONEditor.css +1 -1
- package/front_end/panels/recorder/ControlButton.ts +1 -1
- package/front_end/panels/recorder/RecordingView.ts +22 -1
- package/front_end/panels/recorder/StepView.ts +26 -1
- package/front_end/panels/recorder/TimelineSection.ts +22 -6
- package/front_end/panels/recorder/controlButton.css +2 -9
- package/front_end/panels/recorder/recorderPanel.css +0 -1
- package/front_end/panels/recorder/recordingView.css +32 -32
- package/front_end/panels/recorder/replaySection.css +2 -0
- package/front_end/panels/recorder/stepView.css +18 -14
- package/front_end/panels/recorder/timelineSection.css +60 -84
- package/front_end/panels/screencast/screencastView.css +2 -2
- package/front_end/panels/search/searchView.css +1 -1
- package/front_end/panels/security/SecurityPanel.ts +474 -418
- package/front_end/panels/security/SecurityPanelSidebar.ts +68 -48
- package/front_end/panels/security/lockIcon.css +52 -50
- package/front_end/panels/security/mainView.css +149 -145
- package/front_end/panels/security/originView.css +117 -115
- package/front_end/panels/sensors/LocationsSettingsTab.ts +2 -50
- package/front_end/panels/sensors/SensorsView.ts +6 -21
- package/front_end/panels/sensors/locationsSettingsTab.css +1 -21
- package/front_end/panels/settings/AISettingsTab.ts +1 -2
- package/front_end/panels/settings/SettingsScreen.ts +1 -1
- package/front_end/panels/sources/CallStackSidebarPane.ts +31 -6
- package/front_end/panels/sources/NavigatorView.ts +105 -31
- package/front_end/panels/sources/breakpointsView.css +5 -3
- package/front_end/panels/sources/scopeChainSidebarPane.css +1 -1
- package/front_end/panels/sources/sourcesView.css +2 -1
- package/front_end/panels/timeline/EventsTimelineTreeView.ts +18 -5
- package/front_end/panels/timeline/ThirdPartyTreeView.ts +1 -0
- package/front_end/panels/timeline/TimelineController.ts +30 -26
- package/front_end/panels/timeline/TimelineDetailsView.ts +10 -9
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +4 -16
- package/front_end/panels/timeline/TimelineLayersView.ts +108 -46
- package/front_end/panels/timeline/TimelineMiniMap.ts +132 -54
- package/front_end/panels/timeline/TimelinePanel.ts +4 -2
- package/front_end/panels/timeline/TimelineTreeView.ts +25 -9
- package/front_end/panels/timeline/components/DetailsView.ts +7 -14
- package/front_end/panels/timeline/components/NetworkTrackWidget.ts +5 -1
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +1 -1
- package/front_end/panels/timeline/components/interactionBreakdown.css +1 -0
- package/front_end/panels/timeline/components/networkRequestDetails.css +2 -1
- package/front_end/panels/timeline/components/networkTrackWidget.css +1 -1
- package/front_end/panels/timeline/components/sidebarInsightsTab.css +1 -0
- package/front_end/panels/timeline/docs/profile_calls.md +7 -9
- package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +0 -7
- package/front_end/panels/timeline/timelineDetailsView.css +2 -2
- package/front_end/panels/web_audio/webAudio.css +1 -2
- package/front_end/panels/webauthn/WebauthnPane.ts +1 -1
- package/front_end/panels/webauthn/webauthnPane.css +1 -1
- package/front_end/panels/whats_new/ReleaseNoteText.ts +6 -6
- package/front_end/panels/whats_new/resources/WNDT.md +6 -6
- package/front_end/third_party/axe-core/README.chromium +2 -3
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +328 -11
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +907 -588
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.d.ts +119 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.d.ts +120 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.d.ts +16 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.js +5 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.d.ts +26 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts +23 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js +21 -14
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.d.ts +5 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.js +4 -4
- package/front_end/third_party/puppeteer/package/lib/puppeteer/api/locators/locators.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.d.ts +6 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.js +158 -67
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BrowserConnector.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Connection.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Frame.js +28 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPRequest.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPRequest.js +19 -11
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.js +17 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Input.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Input.js +62 -4
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Input.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/NetworkEvents.d.ts +29 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/NetworkEvents.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/NetworkEvents.js +60 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/NetworkEvents.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.d.ts +9 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.js +24 -9
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Realm.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Realm.js +16 -7
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/Realm.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Browser.d.ts +6 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Browser.js +37 -20
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.js +10 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Navigation.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Navigation.js +18 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Navigation.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Request.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Request.js +24 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/bidi/core/Request.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Binding.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Binding.js +6 -4
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Binding.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ExtensionTransport.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ExtensionTransport.js +30 -6
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ExtensionTransport.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.js +3 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.js +12 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPRequest.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.d.ts +3 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.js +40 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/HTTPResponse.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkEventManager.d.ts +23 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkEventManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkEventManager.js +37 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkEventManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.d.ts +2 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.js +74 -16
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.d.ts +3 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.js +34 -23
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ResponseBodyStream.d.ts +10 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ResponseBodyStream.d.ts.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ResponseBodyStream.js +94 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/ResponseBodyStream.js.map +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.js +29 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/Target.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.d.ts +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/cdp.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/utils.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/utils.js +6 -5
- package/front_end/third_party/puppeteer/package/lib/puppeteer/cdp/utils.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConsoleMessage.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConsoleMessage.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/ConsoleMessage.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/EventEmitter.d.ts +4 -4
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/EventEmitter.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/EventEmitter.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/EventEmitter.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.js +34 -15
- package/front_end/third_party/puppeteer/package/lib/puppeteer/common/util.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts +3 -0
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js +11 -7
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ChromeLauncher.js +10 -7
- package/front_end/third_party/puppeteer/package/lib/puppeteer/node/ChromeLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.d.ts +3 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/revisions.js +3 -3
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/decorators.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +328 -11
- package/front_end/third_party/puppeteer/package/package.json +10 -8
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +118 -0
- package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +119 -0
- package/front_end/third_party/puppeteer/package/src/api/HTTPRequest.ts +25 -2
- package/front_end/third_party/puppeteer/package/src/api/HTTPResponse.ts +28 -0
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +65 -38
- package/front_end/third_party/puppeteer/package/src/api/locators/locators.ts +27 -7
- package/front_end/third_party/puppeteer/package/src/bidi/Browser.ts +43 -7
- package/front_end/third_party/puppeteer/package/src/bidi/BrowserConnector.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/bidi/Connection.ts +5 -1
- package/front_end/third_party/puppeteer/package/src/bidi/Frame.ts +38 -8
- package/front_end/third_party/puppeteer/package/src/bidi/HTTPRequest.ts +27 -12
- package/front_end/third_party/puppeteer/package/src/bidi/HTTPResponse.ts +19 -6
- package/front_end/third_party/puppeteer/package/src/bidi/Input.ts +72 -5
- package/front_end/third_party/puppeteer/package/src/bidi/NetworkEvents.ts +82 -0
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +37 -13
- package/front_end/third_party/puppeteer/package/src/bidi/Realm.ts +26 -14
- package/front_end/third_party/puppeteer/package/src/bidi/core/Browser.ts +43 -22
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +13 -5
- package/front_end/third_party/puppeteer/package/src/bidi/core/Navigation.ts +21 -1
- package/front_end/third_party/puppeteer/package/src/bidi/core/Request.ts +27 -5
- package/front_end/third_party/puppeteer/package/src/cdp/Binding.ts +6 -4
- package/front_end/third_party/puppeteer/package/src/cdp/ExtensionTransport.ts +31 -6
- package/front_end/third_party/puppeteer/package/src/cdp/FrameManager.ts +5 -0
- package/front_end/third_party/puppeteer/package/src/cdp/HTTPRequest.ts +18 -1
- package/front_end/third_party/puppeteer/package/src/cdp/HTTPResponse.ts +48 -0
- package/front_end/third_party/puppeteer/package/src/cdp/NetworkEventManager.ts +58 -5
- package/front_end/third_party/puppeteer/package/src/cdp/NetworkManager.ts +94 -14
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +50 -28
- package/front_end/third_party/puppeteer/package/src/cdp/ResponseBodyStream.ts +106 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Target.ts +38 -3
- package/front_end/third_party/puppeteer/package/src/cdp/cdp.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/cdp/utils.ts +6 -5
- package/front_end/third_party/puppeteer/package/src/common/ConsoleMessage.ts +5 -0
- package/front_end/third_party/puppeteer/package/src/common/EventEmitter.ts +17 -8
- package/front_end/third_party/puppeteer/package/src/common/util.ts +32 -15
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +21 -13
- package/front_end/third_party/puppeteer/package/src/node/ChromeLauncher.ts +10 -10
- package/front_end/third_party/puppeteer/package/src/revisions.ts +3 -3
- package/front_end/third_party/puppeteer/package/src/util/decorators.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/third_party/puppeteer/puppeteer-tsconfig.json +2 -0
- package/front_end/ui/comments/CommentAnchorResolver.ts +45 -4
- package/front_end/ui/comments/CommentOverlayManager.ts +45 -12
- package/front_end/ui/components/buttons/FloatingButton.ts +2 -6
- package/front_end/ui/components/buttons/button.css +2 -2
- package/front_end/ui/components/buttons/floatingButton.css +0 -44
- package/front_end/ui/components/diff_view/diffView.css +0 -2
- package/front_end/ui/components/icon_button/iconButton.css +1 -1
- package/front_end/ui/components/markdown_view/markdownView.css +1 -1
- package/front_end/ui/components/tooltips/Tooltip.ts +29 -0
- package/front_end/ui/components/tree_outline/treeOutline.css +1 -1
- package/front_end/ui/legacy/ContextMenu.ts +7 -5
- package/front_end/ui/legacy/InspectorDrawerView.ts +1 -0
- package/front_end/ui/legacy/InspectorView.ts +5 -1
- package/front_end/ui/legacy/PopoverHelper.ts +1 -0
- package/front_end/ui/legacy/RootView.ts +9 -3
- package/front_end/ui/legacy/SplitWidget.ts +1 -0
- package/front_end/ui/legacy/Treeoutline.ts +9 -0
- package/front_end/ui/legacy/UIUtils.ts +1 -1
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +130 -137
- package/front_end/ui/legacy/components/inline_editor/CSSShadowEditor.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/SwatchPopoverHelper.ts +1 -0
- package/front_end/ui/legacy/components/inline_editor/bezierEditor.css +1 -1
- package/front_end/ui/legacy/components/inline_editor/cssAngleEditor.css +3 -1
- package/front_end/ui/legacy/components/inline_editor/cssShadowEditor.css +7 -6
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +34 -20
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +43 -14
- package/front_end/ui/legacy/components/perf_ui/pieChart.css +2 -2
- package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +1 -10
- package/front_end/ui/legacy/components/source_frame/imageView.css +2 -2
- package/front_end/ui/legacy/filter.css +7 -3
- package/front_end/ui/legacy/infobar.css +1 -1
- package/front_end/ui/legacy/inspectorCommon.css +3 -55
- package/front_end/ui/legacy/inspectorDrawerTabbedPane.css +3 -3
- package/front_end/ui/legacy/listWidget.css +3 -8
- package/front_end/ui/legacy/softDropDownButton.css +1 -1
- package/front_end/ui/legacy/tabbedPane.css +2 -9
- package/front_end/ui/legacy/treeoutline.css +3 -2
- package/front_end/ui/visual_logging/KnownContextValues.ts +134 -0
- package/front_end/ui/visual_logging/LoggingEvents.ts +1 -1
- package/inspector_overlay/tool_highlight.css +0 -7
- package/inspector_overlay/tool_highlight.ts +0 -1
- package/package.json +1 -1
- package/front_end/Images/geminiInDevTools.png +0 -0
- package/front_end/Images/geminiInDevTools_2x.png +0 -0
- package/front_end/generated/InspectorBackendCommands.ts +0 -1690
- package/front_end/generated/protocol-mapping.d.ts +0 -5986
- package/front_end/generated/protocol-proxy-api.d.ts +0 -5452
- package/front_end/generated/protocol.ts +0 -23364
- package/front_end/panels/common/GeminiRebrandPromoDialog.ts +0 -193
- package/front_end/panels/common/geminiRebrandPromoDialog.css +0 -47
|
@@ -5,7 +5,7 @@ severity: nit
|
|
|
5
5
|
---
|
|
6
6
|
|
|
7
7
|
**Rule.** Scope light-DOM stylesheets and align elements using flexbox or grid rather than competing margin and position offsets
|
|
8
|
-
- **Look for**: Unscoped generic selectors in light-DOM `.css` files (or `:host` inside `@scope` blocks instead of `:scope`), redundant `@scope to (devtools-widget > *)` wrappers on shadow-DOM (`useShadowDom: 'pure'` or `useShadowDom: true`) widgets that have no child `<devtools-widget>` elements,
|
|
8
|
+
- **Look for**: Unscoped generic selectors in light-DOM `.css` files (or `:host` inside `@scope` blocks instead of `:scope`), redundant `@scope to (devtools-widget > *)` wrappers on shadow-DOM (`useShadowDom: 'pure'` or `useShadowDom: true`) widgets that have no child `<devtools-widget>` elements, CSS rules combining `vertical-align`, negative `margin-top`, and pixel offsets to center icons and buttons, or `this.registerRequiredCSS(...)` or `widget.registerRequiredCSS(...)` calls in widgets migrated to Lit view functions instead of rendering `<style>${styles}</style>` inside the view template.
|
|
9
9
|
- **Do not flag**: Shadow DOM component stylesheets where `:host` scoping is native. `<style>${styles}</style>` interpolations of `*.css.js` default imports in Lit templates (generated `.css.js` files export plain CSS strings, not `CSSStyleSheet` objects, and `<style>${...}</style>` is the standard replacement for deprecated `registerRequiredCSS`).
|
|
10
10
|
|
|
11
11
|
**Why.** Unscoped class or tag selectors in light-DOM widget stylesheets leak across the DevTools document, while combining `vertical-align`, negative margins, and `position: relative` offsets creates brittle layouts that break under font scaling or zoom.
|
|
@@ -61,22 +61,71 @@ git rebase-update && gclient sync -Df
|
|
|
61
61
|
* **Clean up old branches first:** Before running `git rebase-update`, archive landed/closed branches (`git cl archive -f`) or mark dormant (`git config branch.<branch>.dormant true`) any obsolete branches so they do not trigger unnecessary rebase conflicts.
|
|
62
62
|
* **Always sync dependencies after rebase:** Always run `gclient sync -Df` after a `git rebase-update`. CIPD dependency updates do not show up in `git status`, so skipping `gclient sync -Df` risks leaving your checkout out of sync.
|
|
63
63
|
|
|
64
|
-
###
|
|
65
|
-
|
|
64
|
+
### Uploading & Requesting Review
|
|
65
|
+
Always run `ChromiumCodeReviewAgent` on a Work-in-Progress (WIP) CL and resolve any `ERROR` or `WARNING` findings **before** marking the CL Ready for Review or adding human reviewers.
|
|
66
|
+
|
|
67
|
+
#### Step 1 — Upload as WIP and trigger AI review
|
|
68
|
+
Upload without `--send-mail` (`-s`) (and without `-c` / `--use-commit-queue`, which implies `--send-mail`) so the CL stays in Work-in-Progress, and trigger a CQ dry run (`--cq-dry-run` / `-d`) before adding human reviewers to the attention set:
|
|
69
|
+
```bash
|
|
70
|
+
git cl upload -f --cq-dry-run --commit-description="<description>"
|
|
71
|
+
```
|
|
72
|
+
Or, if the WIP patchset is already uploaded, vote `Commit-Queue+1` via `/google/bin/releases/gemini-agents-gerrit/gerrit`:
|
|
66
73
|
```bash
|
|
67
|
-
|
|
74
|
+
/google/bin/releases/gemini-agents-gerrit/gerrit vote Commit-Queue 1 \
|
|
75
|
+
--change=<CL_NUMBER> \
|
|
76
|
+
--host=https://chromium-review.googlesource.com
|
|
68
77
|
```
|
|
69
78
|
* Always include `-f` (`--force`) so that `git cl upload` runs non-interactively without opening a text editor or prompting.
|
|
70
|
-
* Use the same writing style as the current committer
|
|
71
|
-
* Keep line length below 72
|
|
72
|
-
* Add a
|
|
73
|
-
* Amend formatter/linter changes and fix linter issues.
|
|
74
|
-
* For a brand new stack of CLs, perform the initial upload on each branch individually in parent-to-child order so each CL receives its own commit description.
|
|
79
|
+
* Use the same writing style as the current committer.
|
|
80
|
+
* Keep line length below 72.
|
|
81
|
+
* Add a `Bug: <issue number>` (or `Fixed: <issue number>` / `Bug: None`) trailer on a separate line.
|
|
82
|
+
* Amend formatter/linter changes and fix linter issues before uploading.
|
|
83
|
+
* For a brand new stack of CLs, perform the initial WIP upload on each branch individually in parent-to-child order so each CL receives its own commit description.
|
|
84
|
+
|
|
85
|
+
#### Step 2 — Poll for `ChromiumCodeReviewAgent` findings
|
|
86
|
+
Poll every ~60 seconds (up to ~5 minutes) until the `ChromiumCodeReviewAgent` run completes:
|
|
87
|
+
1. Check whether the `ChromiumCodeReviewAgent` run has reached `"status": "COMPLETED"`:
|
|
88
|
+
```bash
|
|
89
|
+
gerrit_client.py checks \
|
|
90
|
+
--host https://chromium-review.googlesource.com \
|
|
91
|
+
--change <CL_NUMBER> \
|
|
92
|
+
--revision <PS> \
|
|
93
|
+
--json_file <TMP_CHECKS_JSON>
|
|
94
|
+
```
|
|
95
|
+
2. Fetch the findings with `/google/bin/releases/gemini-agents-gerrit/gerrit findings` (include `--all` because `ChromiumCodeReviewAgent` marks `WARNING` findings `actionable: false`, which `gerrit findings` omits by default; if the internal binary is unavailable, read `results` on the `ChromiumCodeReviewAgent` entry in `<TMP_CHECKS_JSON>`):
|
|
96
|
+
```bash
|
|
97
|
+
/google/bin/releases/gemini-agents-gerrit/gerrit findings \
|
|
98
|
+
--change=<CL_NUMBER> \
|
|
99
|
+
--patchset=<PS> \
|
|
100
|
+
--all \
|
|
101
|
+
--json \
|
|
102
|
+
--host=https://chromium-review.googlesource.com
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
#### Step 3 — Address findings before starting human review
|
|
106
|
+
Inspect all `ChromiumCodeReviewAgent` findings with `ERROR` or `WARNING` severity (consulting `.agents/skills/code-review/SKILL.md`, including its Shared False-Positive Guards):
|
|
107
|
+
* **Real issue:** Fix the issue locally, re-verify (`devtools-verification`), `git commit --amend`, upload a new WIP patchset with `--cq-dry-run` (`git cl upload -f --cq-dry-run -t "<one sentence patch set description>"`), and repeat Step 2 on the new patchset.
|
|
108
|
+
* **Confirmed false positive:** While the CL is still in WIP (before adding human reviewers), reply on the CL explaining why the finding does not apply (citing `ref: f/...` if present):
|
|
109
|
+
```bash
|
|
110
|
+
/google/bin/releases/gemini-agents-gerrit/gerrit messages post \
|
|
111
|
+
--change=<CL_NUMBER> \
|
|
112
|
+
--message="<explanation citing ref: f/...>" \
|
|
113
|
+
--host=https://chromium-review.googlesource.com
|
|
114
|
+
```
|
|
115
|
+
* **Start human review:** Once `ChromiumCodeReviewAgent` completes with all `ERROR` and `WARNING` findings addressed, mark the CL Ready for Review and add human reviewers:
|
|
116
|
+
```bash
|
|
117
|
+
/google/bin/releases/gemini-agents-gerrit/gerrit reviewers add \
|
|
118
|
+
--change=<CL_NUMBER> \
|
|
119
|
+
--ready \
|
|
120
|
+
--reviewer=<reviewer1@chromium.org>,<reviewer2@chromium.org> \
|
|
121
|
+
--host=https://chromium-review.googlesource.com
|
|
122
|
+
```
|
|
123
|
+
(Or run `git cl upload -f --send-mail -r <reviewer1@chromium.org> -r <reviewer2@chromium.org>`.)
|
|
75
124
|
|
|
76
125
|
### Subsequent upload & Updating Stacks
|
|
77
126
|
To upload an updated CL:
|
|
78
127
|
```bash
|
|
79
|
-
git cl upload -f -
|
|
128
|
+
git cl upload -f --cq-dry-run -t "<one sentence patch set description>"
|
|
80
129
|
```
|
|
81
130
|
* **Updating an existing stack of CLs:** Once all CLs in a stack have been initially created, **only run `git cl upload` from the leaf (latest) branch in the chain** for subsequent updates. Uploading from the leaf branch automatically runs presubmit checks and uploads new patchsets for all parent CLs in the stack simultaneously. Never upload intermediate CLs one by one when updating a stack.
|
|
82
131
|
|
|
@@ -93,8 +142,10 @@ To check whether a DevTools commit (`devtools/devtools-frontend`) has rolled int
|
|
|
93
142
|
| Create new CL from main | `git new-branch <name>` |
|
|
94
143
|
| Create stacked CL | `git new-branch --upstream_current <name>` |
|
|
95
144
|
| Update current CL | `git commit --amend` |
|
|
96
|
-
| Initial CL upload | `git cl upload -f -
|
|
97
|
-
|
|
|
145
|
+
| Initial WIP CL upload + CQ dry run | `git cl upload -f --cq-dry-run --commit-description="<description>"` |
|
|
146
|
+
| Poll `ChromiumCodeReviewAgent` findings | `/google/bin/releases/gemini-agents-gerrit/gerrit findings --change=<CL> --patchset=<PS> --all --json --host=https://chromium-review.googlesource.com` |
|
|
147
|
+
| Mark Ready for Review & add reviewers | `/google/bin/releases/gemini-agents-gerrit/gerrit reviewers add --change=<CL> --ready --reviewer=<emails> --host=https://chromium-review.googlesource.com` |
|
|
148
|
+
| Subsequent CL upload (or update stack from leaf) | `git cl upload -f --cq-dry-run -t "<message>"` |
|
|
98
149
|
| Reparent branch to root (`origin/main`) | `git reparent-branch --root` |
|
|
99
150
|
| Change branch parent | `git reparent-branch <new-parent>` |
|
|
100
151
|
| Archive landed/closed branches | `git cl archive -f` |
|
|
@@ -103,6 +154,7 @@ To check whether a DevTools commit (`devtools/devtools-frontend`) has rolled int
|
|
|
103
154
|
| Check release & roll status | Query `https://chromiumdash.appspot.com/fetch_commit?commit=<sha>` |
|
|
104
155
|
|
|
105
156
|
## Common Mistakes
|
|
157
|
+
- **Starting human review before resolving `ChromiumCodeReviewAgent` findings:** Never pass `--send-mail` (`-s`) or `-c` (`--use-commit-queue`) on the initial upload, or add human reviewers to the attention set before AI review finishes. Upload in WIP with `--cq-dry-run`, wait for `ChromiumCodeReviewAgent` to complete, and address all `ERROR` and `WARNING` findings first.
|
|
106
158
|
- **Multiple commits on one branch:** Gerrit expects one commit per CL. Always `commit --amend`.
|
|
107
159
|
- **Using `git checkout -b`:** Does not set up tracking information correctly for `depot_tools`. Use `git new-branch`.
|
|
108
160
|
- **Manual rebasing of stacked branches:** Never use manual `git rebase` loops. Always use `git rebase-update` or `git reparent-branch` to let `depot_tools` handle tracking updates.
|
package/.stylelintrc.json
CHANGED
|
@@ -3,12 +3,14 @@
|
|
|
3
3
|
"plugins": [
|
|
4
4
|
"./scripts/stylelint_rules/lib/use_theme_colors.mjs",
|
|
5
5
|
"./scripts/stylelint_rules/lib/check_highlight_scope.mjs",
|
|
6
|
-
"./scripts/stylelint_rules/lib/use_monospace_font.mjs"
|
|
6
|
+
"./scripts/stylelint_rules/lib/use_monospace_font.mjs",
|
|
7
|
+
"./scripts/stylelint_rules/lib/check_scope_selectors.mjs"
|
|
7
8
|
],
|
|
8
9
|
"rules": {
|
|
9
10
|
"plugin/use_theme_colors": true,
|
|
10
11
|
"plugin/check_highlight_scope": true,
|
|
11
12
|
"plugin/use_monospace_font": true,
|
|
13
|
+
"plugin/check_scope_selectors": true,
|
|
12
14
|
"alpha-value-notation": "percentage",
|
|
13
15
|
"color-function-notation": "modern",
|
|
14
16
|
"hue-degree-notation": "angle",
|
|
@@ -33,7 +33,9 @@ handlers spanning several layers and processes, e.g. have instances in
|
|
|
33
33
|
### browser_protocol.pdl
|
|
34
34
|
|
|
35
35
|
The `browser_protocol.pdl` file is the source of truth that is used to generate
|
|
36
|
-
the
|
|
36
|
+
the `.ts`, `.h` and `.cc` files. DevTools generates its TypeScript types from
|
|
37
|
+
it at build time (see `front_end/generated/BUILD.gn`); they end up under
|
|
38
|
+
`out/Default/gen/front_end/generated/`.
|
|
37
39
|
|
|
38
40
|
However, there are multiple `browser_protocol.pdl` files across the codebase.
|
|
39
41
|
The main one is located at (in your chromium repo):
|
package/eslint.config.mjs
CHANGED
|
@@ -28,11 +28,6 @@ export default defineConfig([
|
|
|
28
28
|
|
|
29
29
|
'front_end/diff/diff_match_patch.js',
|
|
30
30
|
'front_end/models/javascript_metadata/NativeFunctions.ts',
|
|
31
|
-
// All of these scripts are auto-generated so don't lint them.
|
|
32
|
-
'front_end/generated/InspectorBackendCommands.ts',
|
|
33
|
-
'front_end/generated/protocol-mapping.d.ts',
|
|
34
|
-
'front_end/generated/protocol-proxy-api.d.ts',
|
|
35
|
-
'front_end/generated/protocol.ts',
|
|
36
31
|
// Any third_party addition has its source code checked out into
|
|
37
32
|
// third_party/X/package, so we ignore that code as it's not code we author or
|
|
38
33
|
// own.
|
|
@@ -740,6 +735,7 @@ export default defineConfig([
|
|
|
740
735
|
'front_end/**/*.docs.ts',
|
|
741
736
|
'test/**/*.ts',
|
|
742
737
|
'**/testing/*.ts',
|
|
738
|
+
'scripts/build/tests/**/*.ts',
|
|
743
739
|
'scripts/eslint_rules/tests/**/*',
|
|
744
740
|
'scripts/gn_deps_verifier/tests/**/*',
|
|
745
741
|
'extensions/cxx_debugging/e2e/**/*.ts',
|
|
@@ -815,6 +811,19 @@ export default defineConfig([
|
|
|
815
811
|
],
|
|
816
812
|
},
|
|
817
813
|
},
|
|
814
|
+
{
|
|
815
|
+
name: 'JavaScript script test files',
|
|
816
|
+
// The 'TypeScript test files' rules need type information, so JS tests
|
|
817
|
+
// only get the mocha rules. Missing mocha imports fail at runtime (see
|
|
818
|
+
// test/scripts/run_mocha.ts).
|
|
819
|
+
files: ['scripts/build/tests/**/*.js'],
|
|
820
|
+
rules: {
|
|
821
|
+
'mocha/no-exclusive-tests': 'error',
|
|
822
|
+
'mocha/no-async-describe': 'error',
|
|
823
|
+
'mocha/no-global-tests': 'error',
|
|
824
|
+
'mocha/no-nested-tests': 'error',
|
|
825
|
+
},
|
|
826
|
+
},
|
|
818
827
|
{
|
|
819
828
|
name: 'API test files',
|
|
820
829
|
files: ['**/*.test.api.ts'],
|
|
@@ -838,6 +847,119 @@ export default defineConfig([
|
|
|
838
847
|
'@devtools/prefer-private-class-members': 'error',
|
|
839
848
|
},
|
|
840
849
|
},
|
|
850
|
+
{
|
|
851
|
+
name: 'Enforce scoped light DOM styles rule',
|
|
852
|
+
files: [
|
|
853
|
+
'front_end/**/*.ts',
|
|
854
|
+
],
|
|
855
|
+
ignores: [
|
|
856
|
+
'front_end/**/*.test.ts',
|
|
857
|
+
'front_end/**/*.test.api.ts',
|
|
858
|
+
'front_end/**/*.docs.ts',
|
|
859
|
+
'front_end/testing/**',
|
|
860
|
+
'front_end/third_party/**',
|
|
861
|
+
],
|
|
862
|
+
|
|
863
|
+
rules: {
|
|
864
|
+
'@devtools/no-unscoped-light-dom-styles': [
|
|
865
|
+
'error',
|
|
866
|
+
{
|
|
867
|
+
// Burndown list of Light DOM widgets with unscoped styles. Do NOT add files to this list.
|
|
868
|
+
// New Light DOM widgets must wrap their styles in '@scope' (see docs/ui_engineering.md#styling).
|
|
869
|
+
burndown: [
|
|
870
|
+
'front_end/entrypoints/node_app/app/NodeConnectionsPanel.ts',
|
|
871
|
+
'front_end/panels/accessibility/AccessibilityNodeView.ts',
|
|
872
|
+
'front_end/panels/ai_assistance/AiAssistancePanel.ts',
|
|
873
|
+
'front_end/panels/ai_assistance/components/ChatInput.ts',
|
|
874
|
+
'front_end/panels/ai_assistance/components/ChatMessage.ts',
|
|
875
|
+
'front_end/panels/ai_assistance/components/RelevantDataDisclaimer.ts',
|
|
876
|
+
'front_end/panels/ai_assistance/components/WalkthroughView.ts',
|
|
877
|
+
'front_end/panels/application/BackgroundServiceView.ts',
|
|
878
|
+
'front_end/panels/application/CrashReportContextView.ts',
|
|
879
|
+
'front_end/panels/application/DeviceBoundSessionsView.ts',
|
|
880
|
+
'front_end/panels/application/IndexedDBViews.ts',
|
|
881
|
+
'front_end/panels/application/KeyValueStorageItemsView.ts',
|
|
882
|
+
'front_end/panels/application/ReportingApiView.ts',
|
|
883
|
+
'front_end/panels/application/ResourcesPanel.ts',
|
|
884
|
+
'front_end/panels/application/ServiceWorkerCacheViews.ts',
|
|
885
|
+
'front_end/panels/application/ServiceWorkersView.ts',
|
|
886
|
+
'front_end/panels/application/SubAppsView.ts',
|
|
887
|
+
'front_end/panels/application/WebMCPView.ts',
|
|
888
|
+
'front_end/panels/application/components/EndpointsGrid.ts',
|
|
889
|
+
'front_end/panels/application/components/ProtocolHandlersView.ts',
|
|
890
|
+
'front_end/panels/application/components/ReportsGrid.ts',
|
|
891
|
+
'front_end/panels/application/preloading/components/PreloadingDetailsReportView.ts',
|
|
892
|
+
'front_end/panels/changes/CombinedDiffView.ts',
|
|
893
|
+
'front_end/panels/common/CommentThreadWidget.ts',
|
|
894
|
+
'front_end/panels/console/ConsolePinPane.ts',
|
|
895
|
+
'front_end/panels/console/ConsolePrompt.ts',
|
|
896
|
+
'front_end/panels/console/ConsoleView.ts',
|
|
897
|
+
'front_end/panels/css_overview/CSSOverviewProcessingView.ts',
|
|
898
|
+
'front_end/panels/elements/AccessibilityTreeView.ts',
|
|
899
|
+
'front_end/panels/elements/ElementsPanel.ts',
|
|
900
|
+
'front_end/panels/elements/LayersWidget.ts',
|
|
901
|
+
'front_end/panels/event_listeners/EventListenersView.ts',
|
|
902
|
+
'front_end/panels/explain/components/ConsoleInsight.ts',
|
|
903
|
+
'front_end/panels/layer_viewer/Layers3DView.ts',
|
|
904
|
+
'front_end/panels/lighthouse/LighthousePanel.ts',
|
|
905
|
+
'front_end/panels/linear_memory_inspector/components/LinearMemoryNavigator.ts',
|
|
906
|
+
'front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts',
|
|
907
|
+
'front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplay.ts',
|
|
908
|
+
'front_end/panels/media/EventDisplayTable.ts',
|
|
909
|
+
'front_end/panels/media/PlayerMessagesView.ts',
|
|
910
|
+
'front_end/panels/media/PlayerPropertiesView.ts',
|
|
911
|
+
'front_end/panels/network/NetworkLogView.ts',
|
|
912
|
+
'front_end/panels/network/NetworkPanel.ts',
|
|
913
|
+
'front_end/panels/network/NetworkWaterfallColumn.ts',
|
|
914
|
+
'front_end/panels/network/RequestCookiesView.ts',
|
|
915
|
+
'front_end/panels/network/RequestDeviceBoundSessionsView.ts',
|
|
916
|
+
'front_end/panels/network/RequestHeadersView.ts',
|
|
917
|
+
'front_end/panels/network/RequestPayloadView.ts',
|
|
918
|
+
'front_end/panels/network/RequestTimingView.ts',
|
|
919
|
+
'front_end/panels/profiler/HeapProfileView.ts',
|
|
920
|
+
'front_end/panels/profiler/ProfileLauncherView.ts',
|
|
921
|
+
'front_end/panels/profiler/ProfilesPanel.ts',
|
|
922
|
+
'front_end/panels/screencast/ScreencastApp.ts',
|
|
923
|
+
'front_end/panels/settings/AISettingsTab.ts',
|
|
924
|
+
'front_end/panels/settings/BackendLinkingSettingsTab.ts',
|
|
925
|
+
'front_end/panels/settings/emulation/DevicesSettingsTab.ts',
|
|
926
|
+
'front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts',
|
|
927
|
+
'front_end/panels/sources/FilteredUISourceCodeListProvider.ts',
|
|
928
|
+
'front_end/panels/sources/SourcesNavigator.ts',
|
|
929
|
+
'front_end/panels/sources/SourcesPanel.ts',
|
|
930
|
+
'front_end/panels/sources/ThreadsSidebarPane.ts',
|
|
931
|
+
'front_end/panels/sources/UISourceCodeFrame.ts',
|
|
932
|
+
'front_end/panels/timeline/ThirdPartyTreeView.ts',
|
|
933
|
+
'front_end/panels/timeline/TimelineFlameChartDataProvider.ts',
|
|
934
|
+
'front_end/panels/timeline/TimelineFlameChartView.ts',
|
|
935
|
+
'front_end/panels/timeline/TimelineMiniMap.ts',
|
|
936
|
+
'front_end/panels/timeline/TimelinePaintProfilerView.ts',
|
|
937
|
+
'front_end/panels/timeline/TimelinePanel.ts',
|
|
938
|
+
'front_end/panels/timeline/TimelineSelectorStatsView.ts',
|
|
939
|
+
'front_end/panels/timeline/TimelineTreeView.ts',
|
|
940
|
+
'front_end/panels/timeline/components/LayoutShiftDetails.ts',
|
|
941
|
+
'front_end/panels/webauthn/WebauthnPane.ts',
|
|
942
|
+
'front_end/ui/components/dialogs/FreDialog.ts',
|
|
943
|
+
'front_end/ui/components/text_editor/AiCodeGenerationUpgradeDialog.ts',
|
|
944
|
+
'front_end/ui/legacy/FilterBar.ts',
|
|
945
|
+
'front_end/ui/legacy/RootView.ts',
|
|
946
|
+
'front_end/ui/legacy/components/cookie_table/CookiesTable.ts',
|
|
947
|
+
'front_end/ui/legacy/components/data_grid/DataGrid.ts',
|
|
948
|
+
'front_end/ui/legacy/components/inline_editor/CSSAngle.ts',
|
|
949
|
+
'front_end/ui/legacy/components/inline_editor/LinkSwatch.ts',
|
|
950
|
+
'front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts',
|
|
951
|
+
'front_end/ui/legacy/components/perf_ui/ChartViewport.ts',
|
|
952
|
+
'front_end/ui/legacy/components/perf_ui/OverviewGrid.ts',
|
|
953
|
+
'front_end/ui/legacy/components/perf_ui/TimelineGrid.ts',
|
|
954
|
+
'front_end/ui/legacy/components/source_frame/FontView.ts',
|
|
955
|
+
'front_end/ui/legacy/components/source_frame/JSONView.ts',
|
|
956
|
+
'front_end/ui/legacy/components/source_frame/XMLView.ts',
|
|
957
|
+
],
|
|
958
|
+
},
|
|
959
|
+
],
|
|
960
|
+
},
|
|
961
|
+
},
|
|
962
|
+
|
|
841
963
|
{
|
|
842
964
|
name: 'Ignore private class members rule',
|
|
843
965
|
// The list below is an explicit burndown list of legacy files that have not
|
|
@@ -1020,7 +1142,6 @@ export default defineConfig([
|
|
|
1020
1142
|
'front_end/panels/screencast/InputModel.ts',
|
|
1021
1143
|
'front_end/panels/screencast/ScreencastView.ts',
|
|
1022
1144
|
'front_end/panels/security/SecurityModel.ts',
|
|
1023
|
-
'front_end/panels/security/SecurityPanel.ts',
|
|
1024
1145
|
'front_end/panels/sensors/LocationsSettingsTab.ts',
|
|
1025
1146
|
'front_end/panels/sensors/SensorsView.ts',
|
|
1026
1147
|
'front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts',
|
|
@@ -59,14 +59,10 @@
|
|
|
59
59
|
--color-grid-selected: var(--sys-color-surface-variant);
|
|
60
60
|
--color-grid-hovered: var(--sys-color-state-hover-on-subtle);
|
|
61
61
|
--color-primary-old: rgb(26 115 232);
|
|
62
|
-
--color-primary-variant: rgb(66 133 244);
|
|
63
62
|
--color-background: rgb(255 255 255);
|
|
64
|
-
--color-background-inverted: rgb(0 0 0);
|
|
65
63
|
--color-background-inverted-opacity-0: rgb(0 0 0 / 0%);
|
|
66
64
|
--color-background-inverted-opacity-2: rgb(0 0 0 / 2%);
|
|
67
|
-
--color-background-inverted-opacity-30: rgb(0 0 0 / 30%);
|
|
68
65
|
--color-background-inverted-opacity-50: rgb(0 0 0 / 50%);
|
|
69
|
-
--color-background-opacity-50: rgb(255 255 255 / 50%);
|
|
70
66
|
--color-background-opacity-80: rgb(255 255 255 / 80%);
|
|
71
67
|
--color-background-elevation-1: rgb(241 243 244);
|
|
72
68
|
--color-background-elevation-2: rgb(222 225 230);
|
|
@@ -82,9 +78,6 @@
|
|
|
82
78
|
0 0 0 1px rgb(0 0 0 / 5%),
|
|
83
79
|
0 2px 4px rgb(0 0 0 / 20%),
|
|
84
80
|
0 2px 6px rgb(0 0 0 / 10%);
|
|
85
|
-
--drop-shadow-depth-1:
|
|
86
|
-
0 1px 2px rgb(60 64 67 / 30%),
|
|
87
|
-
0 1px 3px 1px rgb(60 64 67 / 15%);
|
|
88
81
|
--drop-shadow-depth-3:
|
|
89
82
|
0 4px 8px 3px rgb(60 64 67 / 15%),
|
|
90
83
|
0 1px 3px rgb(60 64 67 / 30%);
|
|
@@ -102,9 +95,6 @@
|
|
|
102
95
|
/** Used to indicate an input box */
|
|
103
96
|
--input-outline: rgb(202 205 209);
|
|
104
97
|
|
|
105
|
-
/** These colors are used to show errors */
|
|
106
|
-
--color-error-text: #f00;
|
|
107
|
-
|
|
108
98
|
/* Colors used by the code editor */
|
|
109
99
|
--color-continue-to-location: var(--ref-palette-blue90);
|
|
110
100
|
--color-continue-to-location-hover: var(--ref-palette-blue80);
|
|
@@ -121,7 +111,6 @@
|
|
|
121
111
|
--legacy-accent-color: #1a73e8;
|
|
122
112
|
--legacy-focus-ring-inactive-shadow-color: #e0e0e0;
|
|
123
113
|
--legacy-input-validation-error: #db1600;
|
|
124
|
-
--legacy-selection-bg-color: var(--legacy-accent-color);
|
|
125
114
|
--legacy-focus-ring-inactive-shadow: 0 0 0 1px var(--legacy-focus-ring-inactive-shadow-color);
|
|
126
115
|
--legacy-focus-ring-active-shadow: 0 0 0 1px var(--sys-color-state-focus-ring);
|
|
127
116
|
|
|
@@ -145,7 +134,6 @@
|
|
|
145
134
|
--app-color-painting: var(--ref-palette-green70);
|
|
146
135
|
--app-color-painting-children: var(--ref-palette-green80);
|
|
147
136
|
--app-color-messaging: var(--ref-palette-cyan70);
|
|
148
|
-
--app-color-messaging-children: var(--ref-palette-cyan80);
|
|
149
137
|
--app-color-task: var(--ref-palette-neutral80);
|
|
150
138
|
--app-color-task-children: var(--ref-palette-neutral90);
|
|
151
139
|
--app-color-system: var(--ref-palette-neutral80);
|
|
@@ -223,11 +211,6 @@
|
|
|
223
211
|
*/
|
|
224
212
|
--app-color-element-sidebar-subtitle: var(--ref-palette-neutral50);
|
|
225
213
|
|
|
226
|
-
/**
|
|
227
|
-
* Color for input driver for AI assistance chat
|
|
228
|
-
*/
|
|
229
|
-
--app-color-ai-assistance-input-divider: rgb(0 0 0 / 10%);
|
|
230
|
-
|
|
231
214
|
/**
|
|
232
215
|
* Gradient colors for Google AI, used in the Global AI button in promotion enabled state
|
|
233
216
|
*/
|
|
@@ -261,13 +244,9 @@
|
|
|
261
244
|
|
|
262
245
|
&.theme-with-dark-background {
|
|
263
246
|
--color-primary-old: rgb(138 180 248);
|
|
264
|
-
--color-primary-variant: rgb(102 157 246);
|
|
265
247
|
--color-background: rgb(32 33 36);
|
|
266
|
-
--color-background-inverted: rgb(255 255 255);
|
|
267
248
|
--color-background-inverted-opacity-2: rgb(255 255 255 / 2%);
|
|
268
|
-
--color-background-inverted-opacity-30: rgb(255 255 255 / 30%);
|
|
269
249
|
--color-background-inverted-opacity-50: rgb(255 255 255 / 50%);
|
|
270
|
-
--color-background-opacity-50: rgb(32 33 36 / 50%);
|
|
271
250
|
--color-background-opacity-80: rgb(32 33 36 / 80%);
|
|
272
251
|
--color-background-elevation-1: rgb(41 42 45);
|
|
273
252
|
--color-background-elevation-2: rgb(53 54 58);
|
|
@@ -281,9 +260,6 @@
|
|
|
281
260
|
0 0 0 1px rgb(255 255 255 / 20%),
|
|
282
261
|
0 2px 4px 2px rgb(0 0 0 / 20%),
|
|
283
262
|
0 2px 6px 2px rgb(0 0 0 / 10%);
|
|
284
|
-
--drop-shadow-depth-1:
|
|
285
|
-
0 1px 2px rgb(0 0 0 / 30%),
|
|
286
|
-
0 1px 3px 1px rgb(0 0 0 / 15%);
|
|
287
263
|
--drop-shadow-depth-3:
|
|
288
264
|
0 4px 8px 3px rgb(0 0 0 / 15%),
|
|
289
265
|
0 1px 3px rgb(0 0 0 / 30%);
|
|
@@ -292,7 +268,6 @@
|
|
|
292
268
|
--color-scrollbar-mac-hover: rgb(75 76 79);
|
|
293
269
|
--color-scrollbar-other: rgb(51 51 51);
|
|
294
270
|
--color-scrollbar-other-hover: rgb(75 76 79);
|
|
295
|
-
--color-error-text: hsl(0deg 100% 75%);
|
|
296
271
|
|
|
297
272
|
/* Colors used by the code editor */
|
|
298
273
|
--color-continue-to-location: var(--ref-palette-yellow30);
|
|
@@ -403,11 +378,6 @@
|
|
|
403
378
|
*/
|
|
404
379
|
--app-color-element-sidebar-subtitle: var(--sys-color-token-subtle);
|
|
405
380
|
|
|
406
|
-
/**
|
|
407
|
-
* Color for input driver for AI assistance chat
|
|
408
|
-
*/
|
|
409
|
-
--app-color-ai-assistance-input-divider: rgb(255 255 255 / 15%);
|
|
410
|
-
|
|
411
381
|
/**
|
|
412
382
|
* Combobox image.
|
|
413
383
|
*/
|
|
@@ -106,7 +106,7 @@ function conversationSurfaceHistogram(feature: ClientFeature): UserMetrics.AiCli
|
|
|
106
106
|
|
|
107
107
|
/**
|
|
108
108
|
* Returns a closure that records the request outcome histogram once per call.
|
|
109
|
-
* One-shot recording prevents
|
|
109
|
+
* One-shot recording prevents inner validation branches and outer catch blocks from double-counting outcomes.
|
|
110
110
|
*/
|
|
111
111
|
function createOutcomeRecorder(surfaceHistogram?: UserMetrics.AiClientSurfaceHistogram):
|
|
112
112
|
(result: UserMetrics.AiClientRequestResult) => void {
|
|
@@ -190,7 +190,8 @@ export class AidaClient {
|
|
|
190
190
|
throw new Error('dispatchHttpRequest is not available');
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
|
|
193
|
+
// Defaults to ABORTED so early caller exits (`break` / `return`) before `completed: true` record as aborted.
|
|
194
|
+
let outcome = UserMetrics.AiClientRequestResult.ABORTED;
|
|
194
195
|
let abortListener: (() => void)|undefined;
|
|
195
196
|
let streamId: number|undefined;
|
|
196
197
|
try {
|
|
@@ -198,13 +199,6 @@ export class AidaClient {
|
|
|
198
199
|
throw new AidaAbortError();
|
|
199
200
|
}
|
|
200
201
|
|
|
201
|
-
// Disable logging for now.
|
|
202
|
-
// For context, see b/454563259#comment35.
|
|
203
|
-
// We should be able to remove this ~end of April.
|
|
204
|
-
if (Root.Runtime.hostConfig.devToolsGeminiRebranding?.enabled) {
|
|
205
|
-
request.metadata.disable_user_content_logging = true;
|
|
206
|
-
}
|
|
207
|
-
|
|
208
202
|
const stream = (() => {
|
|
209
203
|
let {promise, resolve, reject} = Promise.withResolvers<string|null>();
|
|
210
204
|
// Prevent unhandled promise rejections if stream.fail() is called after
|
|
@@ -254,14 +248,17 @@ export class AidaClient {
|
|
|
254
248
|
debugLog('doConversation failed with error:', JSON.stringify(err));
|
|
255
249
|
stream.fail(mapError(err));
|
|
256
250
|
});
|
|
257
|
-
|
|
258
|
-
|
|
251
|
+
for await (const chunk of this.#handleResponseStream(stream)) {
|
|
252
|
+
if (chunk.completed) {
|
|
253
|
+
outcome = UserMetrics.AiClientRequestResult.SUCCESS;
|
|
254
|
+
}
|
|
255
|
+
yield chunk;
|
|
256
|
+
}
|
|
259
257
|
} catch (err) {
|
|
260
|
-
|
|
258
|
+
outcome = classifyRequestError(err);
|
|
261
259
|
throw err;
|
|
262
260
|
} finally {
|
|
263
|
-
|
|
264
|
-
recordOutcome(UserMetrics.AiClientRequestResult.ABORTED);
|
|
261
|
+
UserMetrics.userMetrics.aiClientRequestResult(outcome, conversationSurfaceHistogram(request.client_feature));
|
|
265
262
|
if (options?.signal && abortListener) {
|
|
266
263
|
options.signal.removeEventListener('abort', abortListener);
|
|
267
264
|
}
|
|
@@ -317,7 +314,9 @@ export class AidaClient {
|
|
|
317
314
|
});
|
|
318
315
|
} else if ('error' in result) {
|
|
319
316
|
throw mapError(result.error);
|
|
320
|
-
} else {
|
|
317
|
+
} else if (!result.metadata) {
|
|
318
|
+
// Chunks from thought-only parts or trailing metadata-only chunks lack text or function calls
|
|
319
|
+
// and carry only metadata.
|
|
321
320
|
throw new Error(`Unknown chunk result ${JSON.stringify(result)}`);
|
|
322
321
|
}
|
|
323
322
|
}
|
|
@@ -372,13 +371,6 @@ export class AidaClient {
|
|
|
372
371
|
}
|
|
373
372
|
|
|
374
373
|
registerClientEvent(clientEvent: AidaRegisterClientEvent): Promise<AidaClientResult> {
|
|
375
|
-
// Disable logging for now.
|
|
376
|
-
// For context, see b/454563259#comment35.
|
|
377
|
-
// We should be able to remove this ~end of April.
|
|
378
|
-
if (Root.Runtime.hostConfig.devToolsGeminiRebranding?.enabled) {
|
|
379
|
-
clientEvent.disable_user_content_logging = true;
|
|
380
|
-
}
|
|
381
|
-
|
|
382
374
|
if (this.#gcaClient.enabled()) {
|
|
383
375
|
return this.#gcaClient.registerClientEvent(clientEvent);
|
|
384
376
|
}
|
|
@@ -401,13 +393,6 @@ export class AidaClient {
|
|
|
401
393
|
throw new Error('aidaCodeComplete is not available');
|
|
402
394
|
}
|
|
403
395
|
|
|
404
|
-
// Disable logging for now.
|
|
405
|
-
// For context, see b/454563259#comment35.
|
|
406
|
-
// We should be able to remove this ~end of April.
|
|
407
|
-
if (Root.Runtime.hostConfig.devToolsGeminiRebranding?.enabled) {
|
|
408
|
-
request.metadata.disable_user_content_logging = true;
|
|
409
|
-
}
|
|
410
|
-
|
|
411
396
|
const recordOutcome = createOutcomeRecorder(EnumeratedHistogram.AiClientRequestResultCodeComplete);
|
|
412
397
|
try {
|
|
413
398
|
if (this.#gcaClient.enabled()) {
|
|
@@ -473,13 +458,6 @@ export class AidaClient {
|
|
|
473
458
|
}
|
|
474
459
|
|
|
475
460
|
async generateCode(request: GenerateCodeRequest, options?: {signal?: AbortSignal}): Promise<GenerateCodeResponse> {
|
|
476
|
-
// Disable logging for now.
|
|
477
|
-
// For context, see b/454563259#comment35.
|
|
478
|
-
// We should be able to remove this ~end of April.
|
|
479
|
-
if (Root.Runtime.hostConfig.devToolsGeminiRebranding?.enabled) {
|
|
480
|
-
request.metadata.disable_user_content_logging = true;
|
|
481
|
-
}
|
|
482
|
-
|
|
483
461
|
const surfaceHistogram = EnumeratedHistogram.AiClientRequestResultCodeGenerate;
|
|
484
462
|
try {
|
|
485
463
|
const response = this.#gcaClient.enabled() ?
|
|
@@ -130,7 +130,8 @@ function extractTextFromGcaParts(parts: GCA.Part[]|undefined): string {
|
|
|
130
130
|
if (!parts) {
|
|
131
131
|
return '';
|
|
132
132
|
}
|
|
133
|
-
|
|
133
|
+
// Exclude internal chain-of-thought parts from the visible explanation text.
|
|
134
|
+
return parts.map(p => (p.thought ? '' : p.text || '')).join('');
|
|
134
135
|
}
|
|
135
136
|
|
|
136
137
|
export function aidaEventToGcaTelemetryRequest(clientEvent: AIDA.AidaRegisterClientEvent): GCA.SendTelemetryRequest {
|
|
@@ -532,12 +533,14 @@ export function gcaChunkResponseToAidaChunkResponse(response: GCA.GenerateConten
|
|
|
532
533
|
})),
|
|
533
534
|
};
|
|
534
535
|
}
|
|
535
|
-
|
|
536
|
-
|
|
536
|
+
// Trailing chunks without parts still yield metadata so the client receives the final
|
|
537
|
+
// rpcGlobalId, modelVersion, usageMetadata, and citationMetadata.
|
|
538
|
+
const chunks: AIDA.AidaChunkResponse[] = parts.length === 0 ? [{metadata}] : parts.map(part => {
|
|
537
539
|
const aidaChunkResponse: AIDA.AidaChunkResponse = {metadata};
|
|
538
|
-
|
|
540
|
+
// Exclude empty text parts and internal model chain-of-thought from rendering in the UI.
|
|
541
|
+
if (part.text && !part.thought) {
|
|
539
542
|
aidaChunkResponse.textChunk = {
|
|
540
|
-
text:
|
|
543
|
+
text: part.text,
|
|
541
544
|
};
|
|
542
545
|
}
|
|
543
546
|
if (part.functionCall) {
|
|
@@ -389,10 +389,6 @@ export interface HostConfigGreenDevUi {
|
|
|
389
389
|
enabled: boolean;
|
|
390
390
|
}
|
|
391
391
|
|
|
392
|
-
export interface HostConfigGeminiRebranding {
|
|
393
|
-
enabled: boolean;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
392
|
export interface HostConfigVeLogging {
|
|
397
393
|
enabled: boolean;
|
|
398
394
|
testing: boolean;
|
|
@@ -578,7 +574,6 @@ export type HostConfig = Platform.TypeScriptUtilities.RecursivePartial<{
|
|
|
578
574
|
devToolsEnableDurableMessages: DevToolsEnableDurableMessages,
|
|
579
575
|
devToolsAiAssistanceContextSelectionAgent: HostConfigAiAssistanceContextSelectionAgent,
|
|
580
576
|
devToolsConsoleInsightsTeasers: ConsoleInsightsTeasers,
|
|
581
|
-
devToolsGeminiRebranding: HostConfigGeminiRebranding,
|
|
582
577
|
devToolsProtocolMonitor: DevToolsProtocolMonitor,
|
|
583
578
|
devToolsAdsPanel: DevToolsAdsPanel,
|
|
584
579
|
devToolsUseGcaApi: UseGcaApi,
|
|
@@ -11,7 +11,7 @@ import type {CallFrame, Location, ScopeChainEntry} from './DebuggerModel.js';
|
|
|
11
11
|
import {scopeTreeForScript} from './ScopeTreeCache.js';
|
|
12
12
|
import type {Script} from './Script.js';
|
|
13
13
|
import {buildOriginalScopes, decodePastaRanges, type NamedFunctionRange} from './SourceMapFunctionRanges.js';
|
|
14
|
-
import {decodeRangeMappings} from './SourceMapRangeMappings.js';
|
|
14
|
+
import {decodeRangeMappings, interpolateOriginalPosition} from './SourceMapRangeMappings.js';
|
|
15
15
|
import {
|
|
16
16
|
type PositionRange,
|
|
17
17
|
type RawFrameTranslation,
|
|
@@ -275,10 +275,25 @@ export class SourceMap {
|
|
|
275
275
|
const mappings = this.mappings();
|
|
276
276
|
const index = Platform.ArrayUtilities.upperBound(
|
|
277
277
|
mappings, undefined, (_, entry) => lineNumber - entry.lineNumber || columnNumber - entry.columnNumber);
|
|
278
|
-
|
|
278
|
+
if (!index) {
|
|
279
|
+
return null;
|
|
280
|
+
}
|
|
281
|
+
const entry = mappings[index - 1];
|
|
282
|
+
if (!entry.isRangeMapping || (entry.lineNumber === lineNumber && entry.columnNumber === columnNumber)) {
|
|
283
|
+
return entry;
|
|
284
|
+
}
|
|
285
|
+
// A range mapping covers the generated code character by character, so report the
|
|
286
|
+
// position the queried character maps to rather than the start of the range. The name,
|
|
287
|
+
// if any, describes the token at the start and does not carry over.
|
|
288
|
+
const sourcePosition = interpolateOriginalPosition(entry, lineNumber, columnNumber);
|
|
289
|
+
return new SourceMapEntry(lineNumber, columnNumber, entry.sourceIndex, entry.sourceURL, sourcePosition.lineNumber,
|
|
290
|
+
sourcePosition.columnNumber, undefined, true);
|
|
279
291
|
}
|
|
280
292
|
|
|
281
|
-
/**
|
|
293
|
+
/**
|
|
294
|
+
* Returns the entry at the given position but only if an entry exists for that exact position.
|
|
295
|
+
* A range mapping maps every position it covers exactly, so those positions count as exact too.
|
|
296
|
+
*/
|
|
282
297
|
findEntryExact(lineNumber: number, columnNumber: number): SourceMapEntry|null {
|
|
283
298
|
const entry = this.findEntry(lineNumber, columnNumber);
|
|
284
299
|
if (entry?.lineNumber === lineNumber && entry.columnNumber === columnNumber) {
|
|
@@ -312,6 +327,18 @@ export class SourceMap {
|
|
|
312
327
|
const range = new TextUtils.TextRange.TextRange(
|
|
313
328
|
mappings[startIndex].lineNumber, mappings[startIndex].columnNumber, endLine, endColumn);
|
|
314
329
|
|
|
330
|
+
if (mappings[startIndex].isRangeMapping) {
|
|
331
|
+
// A range mapping covers the original code character by character, so the original
|
|
332
|
+
// range has the exact same shape as the generated one and there's nothing to look up.
|
|
333
|
+
const sourceEnd = endIndex < mappings.length ?
|
|
334
|
+
interpolateOriginalPosition(mappings[startIndex], endLine, endColumn) :
|
|
335
|
+
{lineNumber: endLine, columnNumber: endColumn};
|
|
336
|
+
const sourceRange = new TextUtils.TextRange.TextRange(mappings[startIndex].sourceLineNumber,
|
|
337
|
+
mappings[startIndex].sourceColumnNumber,
|
|
338
|
+
sourceEnd.lineNumber, sourceEnd.columnNumber);
|
|
339
|
+
return {range, sourceRange, sourceURL};
|
|
340
|
+
}
|
|
341
|
+
|
|
315
342
|
// Now try to find the corresponding token in the original code.
|
|
316
343
|
const reverseMappings = this.#reversedMappings(sourceURL);
|
|
317
344
|
const startSourceLine = mappings[startIndex].sourceLineNumber;
|