chrome-devtools-frontend 1.0.1675430 → 1.0.1678416
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/AUTHORS +1 -0
- package/WATCHLISTS +0 -4
- package/front_end/core/common/EventTarget.ts +0 -5
- package/front_end/core/common/Settings.ts +0 -66
- package/front_end/core/host/InspectorFrontendHostAPI.ts +1 -0
- package/front_end/core/host/UserMetrics.ts +5 -0
- package/front_end/core/root/Runtime.ts +5 -5
- package/front_end/core/sdk/CSSMetadata.ts +5 -9
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +16 -34
- package/front_end/core/sdk/DebuggerModel.ts +92 -57
- package/front_end/core/sdk/EmulationModel.ts +2 -1
- package/front_end/core/sdk/NetworkManager.ts +16 -2
- package/front_end/core/sdk/OverlayModel.ts +19 -9
- package/front_end/core/sdk/OverlayPersistentHighlighter.ts +10 -4
- package/front_end/core/sdk/ResourceTreeModel.ts +20 -1
- package/front_end/core/sdk/SDKSettings.ts +117 -0
- package/front_end/core/sdk/Script.ts +9 -53
- package/front_end/core/sdk/sdk-meta.ts +0 -431
- package/front_end/devtools_compatibility.js +1 -0
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +213 -23
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +6 -5
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +14 -15
- package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +157 -0
- package/front_end/entrypoints/main/MainImpl.ts +32 -0
- package/front_end/entrypoints/shell/shell.ts +0 -1
- package/front_end/foundation/Universe.ts +8 -0
- package/front_end/generated/InspectorBackendCommands.ts +8 -8
- package/front_end/generated/SupportedCSSProperties.ts +53 -4
- package/front_end/generated/protocol-mapping.d.ts +27 -21
- package/front_end/generated/protocol-proxy-api.d.ts +22 -17
- package/front_end/generated/protocol.ts +43 -18
- package/front_end/models/ai_assistance/AiAgent2.ts +47 -2
- package/front_end/models/ai_assistance/AiConversation.ts +22 -5
- package/front_end/models/ai_assistance/README.md +52 -26
- package/front_end/models/ai_assistance/agents/AiAgent.ts +54 -8
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +1 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +7 -194
- package/front_end/models/ai_assistance/agents/StorageAgent.ts +21 -87
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +2 -1
- package/front_end/models/ai_assistance/ai_assistance.ts +24 -0
- package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +124 -0
- package/front_end/models/ai_assistance/contexts/StorageContext.ts +100 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +69 -1
- package/front_end/models/ai_assistance/skills/README.md +63 -1
- package/front_end/models/ai_assistance/skills/Skill.ts +1 -1
- package/front_end/models/ai_assistance/skills/SkillRegistry.ts +4 -0
- package/front_end/models/ai_assistance/skills/accessibility.md +7 -0
- package/front_end/models/ai_assistance/skills/performance.md +15 -1
- package/front_end/models/ai_assistance/skills/sources.md +16 -0
- package/front_end/models/ai_assistance/skills/storage.md +31 -0
- package/front_end/models/ai_assistance/tools/GetDetailedCallTree.ts +107 -0
- package/front_end/models/ai_assistance/tools/GetFunctionCode.ts +122 -0
- package/front_end/models/ai_assistance/tools/GetResourceContent.ts +127 -0
- package/front_end/models/ai_assistance/tools/GetSourceContent.ts +101 -0
- package/front_end/models/ai_assistance/tools/GetTraceEventByKey.ts +83 -0
- package/front_end/models/ai_assistance/tools/GetTraceMainThreadSummary.ts +106 -0
- package/front_end/models/ai_assistance/tools/GetTraceNetworkSummary.ts +104 -0
- package/front_end/models/ai_assistance/tools/ListPageOrigins.ts +95 -0
- package/front_end/models/ai_assistance/tools/ListSources.ts +116 -0
- package/front_end/models/ai_assistance/tools/RunLighthouse.ts +89 -0
- package/front_end/models/ai_assistance/tools/SelectTraceEventByKey.ts +90 -0
- package/front_end/models/ai_assistance/tools/Tool.ts +26 -1
- package/front_end/models/ai_assistance/tools/ToolRegistry.ts +22 -0
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +4 -0
- package/front_end/models/bindings/CompilerScriptMapping.ts +4 -0
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +8 -0
- package/front_end/models/bindings/ResourceScriptMapping.ts +3 -201
- package/front_end/models/bindings/SASSSourceMapping.ts +6 -0
- package/front_end/models/breakpoints/BreakpointManager.ts +2 -49
- package/front_end/models/comment_manager/CommentManager.ts +141 -0
- package/front_end/models/comment_manager/comment_manager.ts +9 -0
- package/front_end/models/heap_snapshot/HeapSnapshotModel.ts +27 -0
- package/front_end/models/heap_snapshot/HeapSnapshotProxy.ts +10 -2
- package/front_end/models/issues_manager/descriptions/connectionAllowlistEmbeddingRequirementNotSatisfied.md +26 -0
- package/front_end/models/issues_manager/descriptions/connectionAllowlistIFrameAttributeLoosensEmbeddingRequirement.md +19 -0
- package/front_end/models/issues_manager/descriptions/connectionAllowlistInvalidAllowConnectionAllowlistFrom.md +21 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +6 -6
- package/front_end/models/persistence/IsolatedFileSystem.ts +7 -8
- package/front_end/models/persistence/IsolatedFileSystemManager.ts +2 -2
- package/front_end/models/persistence/PlatformFileSystem.ts +1 -1
- package/front_end/models/persistence/persistence-meta.ts +9 -9
- package/front_end/models/trace/types/TraceEvents.ts +36 -0
- package/front_end/panels/accessibility/ARIAAttributesView.ts +3 -3
- package/front_end/panels/accessibility/AccessibilityAnnouncementRecordingView.ts +25 -0
- package/front_end/panels/accessibility/AccessibilityNodeView.ts +36 -36
- package/front_end/panels/accessibility/AccessibilitySidebarView.ts +9 -0
- package/front_end/panels/accessibility/AccessibilityStrings.ts +168 -168
- package/front_end/panels/accessibility/SourceOrderView.ts +7 -7
- package/front_end/panels/accessibility/accessibility-meta.ts +2 -2
- package/front_end/panels/accessibility/accessibility.ts +2 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +5 -5
- package/front_end/panels/ai_assistance/components/AIv2MarkdownRenderer.ts +2 -3
- package/front_end/panels/ai_assistance/components/ChatInput.ts +2 -2
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +92 -12
- package/front_end/panels/ai_assistance/components/chatMessage.css +6 -0
- package/front_end/panels/application/ApplicationPanelSidebar.ts +10 -4
- package/front_end/panels/application/IndexedDBViews.ts +65 -63
- package/front_end/panels/application/StorageView.ts +116 -45
- package/front_end/panels/application/WebMCPView.ts +16 -7
- package/front_end/panels/application/application-meta.ts +11 -0
- package/front_end/panels/application/components/AdsView.ts +1 -1
- package/front_end/panels/common/AiCodeCompletionSummaryToolbar.ts +5 -5
- package/front_end/panels/common/BadgeNotification.ts +8 -8
- package/front_end/panels/common/ExtensionPanel.ts +9 -8
- package/front_end/panels/common/ExtensionServer.ts +21 -1
- package/front_end/panels/common/GdpSignUpDialog.ts +16 -16
- package/front_end/panels/common/GeminiRebrandPromoDialog.ts +5 -6
- package/front_end/panels/common/PersistenceUtils.ts +2 -2
- package/front_end/panels/common/common.ts +0 -97
- package/front_end/panels/console/ConsoleInsightTeaser.ts +2 -2
- package/front_end/panels/console/ConsolePanel.ts +4 -0
- package/front_end/panels/console/ConsolePinPane.ts +2 -2
- package/front_end/panels/console/ConsolePrompt.ts +12 -0
- package/front_end/panels/console/ConsoleView.ts +31 -20
- package/front_end/panels/console/ConsoleViewMessage.ts +37 -13
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewModel.ts +1 -1
- package/front_end/panels/elements/ElementStatePaneWidget.ts +2 -1
- package/front_end/panels/elements/ElementsTreeElement.ts +455 -372
- package/front_end/panels/elements/LayoutPane.ts +2 -8
- package/front_end/panels/elements/StylePropertyTreeElement.ts +16 -15
- package/front_end/panels/elements/elements-meta.ts +152 -10
- package/front_end/panels/elements/elements.ts +0 -2
- package/front_end/panels/emulation/DeviceModeView.ts +9 -1
- package/front_end/panels/event_listeners/EventListenersView.ts +8 -4
- package/front_end/panels/issues/AffectedTrackingSitesView.ts +25 -14
- package/front_end/panels/lighthouse/LighthouseController.ts +3 -2
- package/front_end/panels/media/PlayerMessagesView.ts +149 -68
- package/front_end/panels/network/BinaryResourceView.ts +134 -81
- package/front_end/panels/network/EventSourceMessagesView.ts +10 -10
- package/front_end/panels/network/FetchHeaderCommenting.ts +291 -0
- package/front_end/panels/network/NetworkConfigView.ts +10 -10
- package/front_end/panels/network/NetworkDataGridNode.ts +14 -14
- package/front_end/panels/network/NetworkItemView.ts +27 -28
- package/front_end/panels/network/NetworkLogView.ts +137 -38
- package/front_end/panels/network/NetworkLogViewColumns.ts +35 -35
- package/front_end/panels/network/NetworkManageCustomHeadersView.ts +1 -1
- package/front_end/panels/network/NetworkPanel.ts +2 -2
- package/front_end/panels/network/RequestConditionsDrawer.ts +5 -5
- package/front_end/panels/network/RequestCookiesView.ts +4 -4
- package/front_end/panels/network/RequestHeadersView.ts +5 -5
- package/front_end/panels/network/RequestPayloadView.ts +4 -3
- package/front_end/panels/network/RequestTimingView.ts +8 -8
- package/front_end/panels/network/ResourceChunkView.ts +1 -1
- package/front_end/panels/network/ResourceDirectSocketChunkView.ts +1 -1
- package/front_end/panels/network/ResourceWebSocketFrameView.ts +16 -16
- package/front_end/panels/network/binaryResourceView.css +14 -12
- package/front_end/panels/network/components/DirectSocketConnectionView.ts +2 -2
- package/front_end/panels/network/components/HeaderSectionRow.ts +1 -1
- package/front_end/panels/network/components/RequestTrustTokensView.ts +2 -2
- package/front_end/panels/network/network-meta.ts +1 -1
- package/front_end/panels/network/network.ts +2 -0
- package/front_end/panels/profiler/HeapDetachedElementsDataGrid.ts +0 -1
- package/front_end/panels/profiler/HeapSnapshotView.ts +0 -2
- package/front_end/panels/profiler/heapProfiler.css +0 -9
- package/front_end/panels/recorder/RecorderPanel.ts +2 -3
- package/front_end/panels/screencast/ScreencastView.ts +148 -138
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +2 -2
- package/front_end/panels/sources/BreakpointsView.ts +2 -2
- package/front_end/panels/sources/DebuggerPlugin.ts +10 -59
- package/front_end/panels/sources/NavigatorView.ts +2 -1
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +1 -1
- package/front_end/panels/sources/SourcesPanel.ts +23 -73
- package/front_end/panels/sources/SourcesView.ts +248 -157
- package/front_end/panels/sources/TabbedEditorContainer.ts +118 -23
- package/front_end/panels/sources/UISourceCodeFrame.ts +5 -9
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +4 -2
- package/front_end/panels/sources/sources-meta.ts +52 -0
- package/front_end/panels/timeline/TimelineController.ts +36 -64
- package/front_end/panels/timeline/TimelinePanel.ts +11 -8
- package/front_end/panels/timeline/TimelineUIUtils.ts +5 -2
- package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +2 -2
- package/front_end/panels/timeline/timelinePanel.css +0 -10
- package/front_end/panels/utils/utils.ts +7 -7
- package/front_end/services/tracing/PerformanceTracing.ts +5 -17
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/codemirror.js.map +1 -1
- package/front_end/third_party/codemirror.next/package.json +2 -2
- package/front_end/third_party/codemirror.next/rebuild.sh +4 -1
- package/front_end/ui/comments/CommentAnchorResolver.ts +430 -35
- package/front_end/ui/comments/CommentOverlayManager.ts +635 -0
- package/front_end/ui/comments/CommentsOverlayWidget.ts +134 -0
- package/front_end/ui/comments/comments.ts +4 -0
- package/front_end/ui/comments/commentsOverlay.css +49 -0
- package/front_end/{panels/common → ui/components/dialogs}/FreDialog.ts +6 -6
- package/front_end/ui/components/dialogs/TypeToAllowDialog.ts +96 -0
- package/front_end/ui/components/dialogs/dialogs.ts +4 -0
- package/front_end/ui/components/settings/SettingCheckbox.ts +3 -3
- package/front_end/{panels/common → ui/components/text_editor}/AiCodeCompletionDisclaimer.ts +13 -13
- package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +7 -6
- package/front_end/{panels/common → ui/components/text_editor}/AiCodeCompletionTeaser.ts +43 -46
- package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +22 -26
- package/front_end/{panels/common → ui/components/text_editor}/AiCodeGenerationTeaser.ts +10 -10
- package/front_end/{panels/common → ui/components/text_editor}/AiCodeGenerationUpgradeDialog.ts +5 -5
- package/front_end/ui/components/text_editor/text_editor.ts +4 -0
- package/front_end/ui/legacy/Toolbar.ts +1 -1
- package/front_end/ui/legacy/UIUtils.ts +0 -56
- package/front_end/ui/legacy/View.ts +10 -4
- package/front_end/ui/legacy/Widget.ts +10 -1
- package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +2 -1
- package/front_end/ui/legacy/components/color_picker/ContrastOverlay.ts +5 -4
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +11 -3
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +507 -209
- package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +5 -0
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +11 -16
- package/front_end/ui/legacy/components/settings_ui/SettingsUI.ts +5 -12
- package/front_end/ui/legacy/components/source_frame/BinaryResourceViewFactory.ts +38 -20
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +12 -2
- package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +3 -3
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +37 -6
- package/front_end/ui/legacy/components/source_frame/StreamingContentHexView.ts +22 -4
- package/front_end/ui/settings/SettingUIRegistration.ts +55 -6
- package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
- package/mcp/mcp.ts +6 -1
- package/package.json +6 -6
- package/front_end/Images/toolbarResizerVertical.png +0 -0
- package/front_end/emulated_devices/MotoG4-landscape.svg +0 -155
- package/front_end/emulated_devices/MotoG4-portrait.svg +0 -155
- package/front_end/emulated_devices/Nexus5X-landscape.svg +0 -19
- package/front_end/emulated_devices/Nexus5X-portrait.svg +0 -19
- package/front_end/emulated_devices/Nexus6P-landscape.svg +0 -50
- package/front_end/emulated_devices/Nexus6P-portrait.svg +0 -54
- package/front_end/emulated_devices/google-nest-hub-horizontal.png +0 -0
- package/front_end/emulated_devices/google-nest-hub-max-horizontal.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-horizontal-default-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-horizontal-default-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-horizontal-keyboard-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-horizontal-keyboard-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-horizontal-navigation-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-horizontal-navigation-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-vertical-default-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-vertical-default-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-vertical-keyboard-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-vertical-keyboard-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-vertical-navigation-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5-vertical-navigation-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-horizontal-default-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-horizontal-default-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-horizontal-keyboard-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-horizontal-keyboard-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-horizontal-navigation-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-horizontal-navigation-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-vertical-default-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-vertical-default-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-vertical-keyboard-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-vertical-keyboard-2x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-vertical-navigation-1x.png +0 -0
- package/front_end/emulated_devices/google-nexus-5x-vertical-navigation-2x.png +0 -0
- package/front_end/emulated_devices/iPad-landscape.svg +0 -73
- package/front_end/emulated_devices/iPad-portrait.svg +0 -76
- package/front_end/emulated_devices/iPhone5-landscape.svg +0 -99
- package/front_end/emulated_devices/iPhone5-portrait.svg +0 -83
- package/front_end/emulated_devices/iPhone6-landscape.svg +0 -111
- package/front_end/emulated_devices/iPhone6-portrait.svg +0 -116
- package/front_end/emulated_devices/iPhone6Plus-landscape.svg +0 -118
- package/front_end/emulated_devices/iPhone6Plus-portrait.svg +0 -116
- package/front_end/emulated_devices/optimized/MotoG4-landscape.avif +0 -0
- package/front_end/emulated_devices/optimized/MotoG4-portrait.avif +0 -0
- package/front_end/emulated_devices/optimized/Nexus5X-landscape.avif +0 -0
- package/front_end/emulated_devices/optimized/Nexus5X-portrait.avif +0 -0
- package/front_end/emulated_devices/optimized/Nexus6P-landscape.avif +0 -0
- package/front_end/emulated_devices/optimized/Nexus6P-portrait.avif +0 -0
- package/front_end/emulated_devices/optimized/README.md +0 -9
- package/front_end/emulated_devices/optimized/google-nest-hub-horizontal.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nest-hub-max-horizontal.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-default-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-default-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-navigation-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-navigation-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-vertical-default-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-vertical-default-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-vertical-keyboard-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-vertical-keyboard-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-vertical-navigation-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5-vertical-navigation-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-default-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-default-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-default-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-default-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-navigation-1x.avif +0 -0
- package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-navigation-2x.avif +0 -0
- package/front_end/emulated_devices/optimized/iPad-landscape.avif +0 -0
- package/front_end/emulated_devices/optimized/iPad-portrait.avif +0 -0
- package/front_end/emulated_devices/optimized/iPhone5-landscape.avif +0 -0
- package/front_end/emulated_devices/optimized/iPhone5-portrait.avif +0 -0
- package/front_end/emulated_devices/optimized/iPhone6-landscape.avif +0 -0
- package/front_end/emulated_devices/optimized/iPhone6-portrait.avif +0 -0
- package/front_end/emulated_devices/optimized/iPhone6Plus-landscape.avif +0 -0
- package/front_end/emulated_devices/optimized/iPhone6Plus-portrait.avif +0 -0
- package/front_end/emulated_devices/optimized/optimized_images.gni +0 -53
- package/front_end/models/ai_assistance/agents/README.md +0 -136
- package/front_end/panels/elements/ElementsTreeOutlineRenderer.ts +0 -89
- package/front_end/ui/legacy/components/object_ui/object_ui-meta.ts +0 -27
- /package/front_end/{panels/common → ui/components/dialogs}/freDialog.css +0 -0
- /package/front_end/{panels/common/common.css → ui/components/dialogs/typeToAllowDialog.css} +0 -0
- /package/front_end/{panels/common → ui/components/text_editor}/aiCodeCompletionDisclaimer.css +0 -0
- /package/front_end/{panels/common → ui/components/text_editor}/aiCodeCompletionTeaser.css +0 -0
- /package/front_end/{panels/common → ui/components/text_editor}/aiCodeGenerationTeaser.css +0 -0
- /package/front_end/{panels/common → ui/components/text_editor}/aiCodeGenerationUpgradeDialog.css +0 -0
|
@@ -17,6 +17,7 @@ import * as UI from '../../ui/legacy/legacy.js';
|
|
|
17
17
|
import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
18
18
|
|
|
19
19
|
import {IndexedDBModel} from './IndexedDBModel.js';
|
|
20
|
+
import {ResourcesPanel} from './ResourcesPanel.js';
|
|
20
21
|
import storageViewStyles from './storageView.css.js';
|
|
21
22
|
|
|
22
23
|
const UIStrings = {
|
|
@@ -140,7 +141,24 @@ const UIStrings = {
|
|
|
140
141
|
* Storage quota refers to the amount of disk available for the website or app.
|
|
141
142
|
*/
|
|
142
143
|
simulateCustomStorage: 'Simulate custom storage quota',
|
|
144
|
+
/**
|
|
145
|
+
* @description Text in Application Panel Sidebar of the Application panel
|
|
146
|
+
*/
|
|
147
|
+
localStorage: 'Local storage',
|
|
148
|
+
/**
|
|
149
|
+
* @description Text in Application Panel Sidebar of the Application panel
|
|
150
|
+
*/
|
|
151
|
+
sessionStorage: 'Session storage',
|
|
143
152
|
} as const;
|
|
153
|
+
|
|
154
|
+
export const storagePieColors = new Map<Protocol.Storage.StorageType, string>([
|
|
155
|
+
[Protocol.Storage.StorageType.Cache_storage, 'rgb(229, 113, 113)'], // red
|
|
156
|
+
[Protocol.Storage.StorageType.Cookies, 'rgb(239, 196, 87)'], // yellow
|
|
157
|
+
[Protocol.Storage.StorageType.Indexeddb, 'rgb(155, 127, 230)'], // purple
|
|
158
|
+
[Protocol.Storage.StorageType.Local_storage, 'rgb(116, 178, 102)'], // green
|
|
159
|
+
[Protocol.Storage.StorageType.Service_workers, 'rgb(255, 167, 36)'], // orange
|
|
160
|
+
]);
|
|
161
|
+
|
|
144
162
|
const str_ = i18n.i18n.registerUIStrings('panels/application/StorageView.ts', UIStrings);
|
|
145
163
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
146
164
|
|
|
@@ -158,6 +176,8 @@ export class StorageView extends UI.Widget.VBox {
|
|
|
158
176
|
private includeThirdPartyCookiesCheckbox: UI.UIUtils.CheckboxLabel;
|
|
159
177
|
private quotaRow: HTMLElement;
|
|
160
178
|
private quotaUsage: number|null;
|
|
179
|
+
private quotaQuota: number|null;
|
|
180
|
+
private quotaOverrideActive: boolean|null;
|
|
161
181
|
private pieChart: PerfUI.PieChart.PieChart;
|
|
162
182
|
private previousOverrideFieldValue: string;
|
|
163
183
|
private quotaOverrideCheckbox: UI.UIUtils.CheckboxLabel;
|
|
@@ -173,13 +193,7 @@ export class StorageView extends UI.Widget.VBox {
|
|
|
173
193
|
|
|
174
194
|
this.contentElement.classList.add('clear-storage-container');
|
|
175
195
|
this.contentElement.setAttribute('jslog', `${VisualLogging.pane('clear-storage')}`);
|
|
176
|
-
this.pieColors =
|
|
177
|
-
[Protocol.Storage.StorageType.Cache_storage, 'rgb(229, 113, 113)'], // red
|
|
178
|
-
[Protocol.Storage.StorageType.Cookies, 'rgb(239, 196, 87)'], // yellow
|
|
179
|
-
[Protocol.Storage.StorageType.Indexeddb, 'rgb(155, 127, 230)'], // purple
|
|
180
|
-
[Protocol.Storage.StorageType.Local_storage, 'rgb(116, 178, 102)'], // green
|
|
181
|
-
[Protocol.Storage.StorageType.Service_workers, 'rgb(255, 167, 36)'], // orange
|
|
182
|
-
]);
|
|
196
|
+
this.pieColors = storagePieColors;
|
|
183
197
|
|
|
184
198
|
// TODO(crbug.com/1156978): Replace UI.ReportView.ReportView with ReportView.ts web component.
|
|
185
199
|
this.reportView = new UI.ReportView.ReportView(i18nString(UIStrings.storageTitle));
|
|
@@ -266,6 +280,8 @@ export class StorageView extends UI.Widget.VBox {
|
|
|
266
280
|
i18nString(UIStrings.learnMore), undefined, 'learn-more');
|
|
267
281
|
learnMoreRow.appendChild(learnMore);
|
|
268
282
|
this.quotaUsage = null;
|
|
283
|
+
this.quotaQuota = null;
|
|
284
|
+
this.quotaOverrideActive = null;
|
|
269
285
|
this.pieChart = new PerfUI.PieChart.PieChart();
|
|
270
286
|
this.populatePieChart(0, []);
|
|
271
287
|
const usageBreakdownRow = quota.appendRow();
|
|
@@ -406,6 +422,9 @@ export class StorageView extends UI.Widget.VBox {
|
|
|
406
422
|
this.quotaOverrideControlRow.classList.add('hidden');
|
|
407
423
|
this.quotaOverrideCheckbox.checked = false;
|
|
408
424
|
this.quotaOverrideErrorMessage.textContent = '';
|
|
425
|
+
this.quotaUsage = null;
|
|
426
|
+
this.quotaQuota = null;
|
|
427
|
+
this.quotaOverrideActive = null;
|
|
409
428
|
}
|
|
410
429
|
void this.performUpdate();
|
|
411
430
|
}
|
|
@@ -558,59 +577,75 @@ export class StorageView extends UI.Widget.VBox {
|
|
|
558
577
|
override async performUpdate(): Promise<void> {
|
|
559
578
|
if (!this.securityOrigin || !this.target) {
|
|
560
579
|
this.quotaRow.textContent = '';
|
|
580
|
+
this.quotaUsage = null;
|
|
581
|
+
this.quotaQuota = null;
|
|
582
|
+
this.quotaOverrideActive = null;
|
|
561
583
|
this.populatePieChart(0, []);
|
|
562
584
|
return;
|
|
563
585
|
}
|
|
564
586
|
|
|
565
587
|
const securityOrigin = this.securityOrigin;
|
|
566
588
|
const response = await this.target.storageAgent().invoke_getUsageAndQuota({origin: securityOrigin});
|
|
567
|
-
this.quotaRow.textContent = '';
|
|
568
589
|
if (response.getError()) {
|
|
590
|
+
this.quotaRow.textContent = '';
|
|
591
|
+
this.quotaUsage = null;
|
|
592
|
+
this.quotaQuota = null;
|
|
593
|
+
this.quotaOverrideActive = null;
|
|
569
594
|
this.populatePieChart(0, []);
|
|
570
595
|
return;
|
|
571
596
|
}
|
|
572
|
-
const quotaOverridden = response.overrideActive;
|
|
573
|
-
const quotaAsString = i18n.ByteUtilities.bytesToString(response.quota);
|
|
574
|
-
const usageAsString = i18n.ByteUtilities.bytesToString(response.usage);
|
|
575
|
-
const formattedQuotaAsString = i18nString(UIStrings.storageWithCustomMarker, {PH1: quotaAsString});
|
|
576
597
|
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
element.textContent = formattedQuotaAsString;
|
|
581
|
-
quota = element;
|
|
582
|
-
}
|
|
598
|
+
const usageChanged = this.quotaUsage !== response.usage;
|
|
599
|
+
const quotaChanged = this.quotaQuota !== response.quota;
|
|
600
|
+
const overrideChanged = this.quotaOverrideActive !== response.overrideActive;
|
|
583
601
|
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
i18nString(
|
|
589
|
-
UIStrings.storageQuotaUsedWithBytes,
|
|
590
|
-
{PH1: response.usage.toLocaleString(), PH2: response.quota.toLocaleString()}));
|
|
602
|
+
if (usageChanged || quotaChanged || overrideChanged) {
|
|
603
|
+
this.quotaUsage = response.usage;
|
|
604
|
+
this.quotaQuota = response.quota;
|
|
605
|
+
this.quotaOverrideActive = response.overrideActive;
|
|
591
606
|
|
|
592
|
-
|
|
593
|
-
const
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
607
|
+
this.quotaRow.textContent = '';
|
|
608
|
+
const quotaAsString = i18n.ByteUtilities.bytesToString(response.quota);
|
|
609
|
+
const usageAsString = i18n.ByteUtilities.bytesToString(response.usage);
|
|
610
|
+
const formattedQuotaAsString = i18nString(UIStrings.storageWithCustomMarker, {PH1: quotaAsString});
|
|
611
|
+
|
|
612
|
+
let quota: string|HTMLElement = quotaAsString;
|
|
613
|
+
if (response.overrideActive) {
|
|
614
|
+
const element = document.createElement('b');
|
|
615
|
+
element.textContent = formattedQuotaAsString;
|
|
616
|
+
quota = element;
|
|
617
|
+
}
|
|
600
618
|
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
619
|
+
const element =
|
|
620
|
+
uiI18n.getFormatLocalizedString(str_, UIStrings.storageQuotaUsed, {PH1: usageAsString, PH2: quota});
|
|
621
|
+
this.quotaRow.appendChild(element);
|
|
622
|
+
UI.Tooltip.Tooltip.install(
|
|
623
|
+
this.quotaRow,
|
|
624
|
+
i18nString(UIStrings.storageQuotaUsedWithBytes,
|
|
625
|
+
{PH1: response.usage.toLocaleString(), PH2: response.quota.toLocaleString()}));
|
|
626
|
+
|
|
627
|
+
if (!response.overrideActive && response.quota < 125829120) { // 120 MiB
|
|
628
|
+
const icon = new Icon();
|
|
629
|
+
icon.name = 'info';
|
|
630
|
+
icon.style.color = 'var(--icon-info)';
|
|
631
|
+
icon.classList.add('small');
|
|
632
|
+
UI.Tooltip.Tooltip.install(icon, i18nString(UIStrings.storageQuotaIsLimitedIn));
|
|
633
|
+
this.quotaRow.appendChild(icon);
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
if (usageChanged) {
|
|
637
|
+
const slices: PerfUI.PieChart.Slice[] = [];
|
|
638
|
+
for (const usageForType of response.usageBreakdown.sort((a, b) => b.usage - a.usage)) {
|
|
639
|
+
const value = usageForType.usage;
|
|
640
|
+
if (!value) {
|
|
641
|
+
continue;
|
|
642
|
+
}
|
|
643
|
+
const title = StorageView.getStorageTypeName(usageForType.storageType);
|
|
644
|
+
const color = this.pieColors.get(usageForType.storageType) || '#ccc';
|
|
645
|
+
slices.push({value, color, title});
|
|
608
646
|
}
|
|
609
|
-
|
|
610
|
-
const color = this.pieColors.get(usageForType.storageType) || '#ccc';
|
|
611
|
-
slices.push({value, color, title});
|
|
647
|
+
this.populatePieChart(response.usage, slices);
|
|
612
648
|
}
|
|
613
|
-
this.populatePieChart(response.usage, slices);
|
|
614
649
|
}
|
|
615
650
|
|
|
616
651
|
void this.throttler.schedule(this.requestUpdate.bind(this));
|
|
@@ -627,7 +662,7 @@ export class StorageView extends UI.Widget.VBox {
|
|
|
627
662
|
};
|
|
628
663
|
}
|
|
629
664
|
|
|
630
|
-
|
|
665
|
+
static getStorageTypeName(type: Protocol.Storage.StorageType): string {
|
|
631
666
|
switch (type) {
|
|
632
667
|
case Protocol.Storage.StorageType.File_systems:
|
|
633
668
|
return i18nString(UIStrings.fileSystem);
|
|
@@ -641,6 +676,30 @@ export class StorageView extends UI.Widget.VBox {
|
|
|
641
676
|
return i18nString(UIStrings.other);
|
|
642
677
|
}
|
|
643
678
|
}
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
* Returns the user-facing title of a storage type for the storage breakdown widget in AI assistance.
|
|
682
|
+
* This method accepts arbitrary strings to accommodate custom storage types (like session_storage)
|
|
683
|
+
* that do not exist in the Protocol.Storage.StorageType enum.
|
|
684
|
+
*/
|
|
685
|
+
static getStorageTypeNameForWidget(type: string): string {
|
|
686
|
+
switch (type) {
|
|
687
|
+
case 'session_storage':
|
|
688
|
+
return i18nString(UIStrings.sessionStorage);
|
|
689
|
+
case 'local_storage':
|
|
690
|
+
return i18nString(UIStrings.localStorage);
|
|
691
|
+
case 'cookies':
|
|
692
|
+
return i18nString(UIStrings.cookies);
|
|
693
|
+
case 'indexeddb':
|
|
694
|
+
return i18nString(UIStrings.indexDB);
|
|
695
|
+
case 'cache_storage':
|
|
696
|
+
return i18nString(UIStrings.cacheStorage);
|
|
697
|
+
case 'service_workers':
|
|
698
|
+
return i18nString(UIStrings.serviceWorkers);
|
|
699
|
+
default:
|
|
700
|
+
return StorageView.getStorageTypeName(type as Protocol.Storage.StorageType);
|
|
701
|
+
}
|
|
702
|
+
}
|
|
644
703
|
}
|
|
645
704
|
|
|
646
705
|
export const AllStorageTypes = [
|
|
@@ -678,3 +737,15 @@ export class ActionDelegate implements UI.ActionRegistration.ActionDelegate {
|
|
|
678
737
|
return true;
|
|
679
738
|
}
|
|
680
739
|
}
|
|
740
|
+
|
|
741
|
+
export class StorageRevealable {
|
|
742
|
+
constructor(public target: SDK.Target.Target) {
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
export class StorageRevealer implements Common.Revealer.Revealer<StorageRevealable> {
|
|
747
|
+
async reveal(_revealable: StorageRevealable): Promise<void> {
|
|
748
|
+
const sidebar = await ResourcesPanel.showAndGetSidebar();
|
|
749
|
+
sidebar.showStorage();
|
|
750
|
+
}
|
|
751
|
+
}
|
|
@@ -251,6 +251,7 @@ export interface ViewInput {
|
|
|
251
251
|
selectedCall: WebMCP.WebMCPModel.Call|null;
|
|
252
252
|
selectedTab?: TabId;
|
|
253
253
|
onCallSelect: (call: WebMCP.WebMCPModel.Call|null, tabId?: TabId) => void;
|
|
254
|
+
onTabSelect: (tabId: TabId) => void;
|
|
254
255
|
filters: FilterState;
|
|
255
256
|
filterButtons: FilterMenuButtons;
|
|
256
257
|
onClearLogClick: () => void;
|
|
@@ -302,7 +303,7 @@ export function filterToolCalls(toolCalls: WebMCP.WebMCPModel.Call[],
|
|
|
302
303
|
const regex = Platform.StringUtilities.createPlainTextSearchRegex(filterState.text, 'i');
|
|
303
304
|
filtered = filtered.filter(call => {
|
|
304
305
|
return regex.test(call.tool.name) || regex.test(call.input) ||
|
|
305
|
-
(call.result?.output && regex.test(JSON.stringify(call.result.output))) ||
|
|
306
|
+
(call.result?.output !== undefined && regex.test(JSON.stringify(call.result.output))) ||
|
|
306
307
|
(call.result?.errorText && regex.test(call.result.errorText));
|
|
307
308
|
});
|
|
308
309
|
}
|
|
@@ -568,7 +569,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
568
569
|
<td @click=${(e: Event) => {
|
|
569
570
|
e.stopPropagation();
|
|
570
571
|
input.onCallSelect(call, TabId.OUTPUT);
|
|
571
|
-
}}>${call.result?.output ? JSON.stringify(call.result.output)
|
|
572
|
+
}}>${call.result?.output !== undefined ? JSON.stringify(call.result.output)
|
|
572
573
|
: call.result?.errorText ?? ''}</td>
|
|
573
574
|
` : nothing}
|
|
574
575
|
</tr>
|
|
@@ -577,7 +578,9 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
577
578
|
</devtools-data-grid>
|
|
578
579
|
</div>
|
|
579
580
|
<div slot="sidebar" style="height: 100%; display: flex; flex-direction: column; overflow: hidden;">
|
|
580
|
-
<devtools-tabbed-pane
|
|
581
|
+
<devtools-tabbed-pane
|
|
582
|
+
class="call-details-tabbed-pane"
|
|
583
|
+
@select=${(e: Event) => input.onTabSelect((e as CustomEvent<{tabId: TabId}>).detail.tabId)}>
|
|
581
584
|
<devtools-button
|
|
582
585
|
slot="left"
|
|
583
586
|
.iconName=${'cross'}
|
|
@@ -588,19 +591,19 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
588
591
|
></devtools-button>
|
|
589
592
|
<devtools-widget
|
|
590
593
|
id=${TabId.DETAILS}
|
|
591
|
-
?selected=${input.selectedTab === TabId.DETAILS}
|
|
594
|
+
?selected=${Directives.live(input.selectedTab === TabId.DETAILS)}
|
|
592
595
|
title=${i18nString(UIStrings.toolDetails)}
|
|
593
596
|
${widget(ToolDetailsWidget, {tool: input.selectedCall?.tool, isUnregistered: input.selectedCall ? !input.tools.includes(input.selectedCall.tool) : false})}>
|
|
594
597
|
</devtools-widget>
|
|
595
598
|
<devtools-widget
|
|
596
599
|
id=${TabId.INPUT}
|
|
597
|
-
?selected=${input.selectedTab === TabId.INPUT}
|
|
600
|
+
?selected=${Directives.live(input.selectedTab === TabId.INPUT)}
|
|
598
601
|
title=${i18nString(UIStrings.input)}
|
|
599
602
|
${widget(PayloadWidget, parsePayload(input.selectedCall?.input))}>
|
|
600
603
|
</devtools-widget>
|
|
601
604
|
<devtools-widget
|
|
602
605
|
id=${TabId.OUTPUT}
|
|
603
|
-
?selected=${input.selectedTab === TabId.OUTPUT}
|
|
606
|
+
?selected=${Directives.live(input.selectedTab === TabId.OUTPUT)}
|
|
604
607
|
title=${i18nString(UIStrings.output)}
|
|
605
608
|
${widget(PayloadWidget, {
|
|
606
609
|
valueObject: input.selectedCall?.result?.output,
|
|
@@ -916,9 +919,13 @@ export class WebMCPView extends UI.Widget.VBox {
|
|
|
916
919
|
this.#selectedTab = tabId;
|
|
917
920
|
} else {
|
|
918
921
|
this.#selectedCall = call;
|
|
922
|
+
this.#selectedTab = undefined;
|
|
919
923
|
}
|
|
920
924
|
this.requestUpdate();
|
|
921
925
|
},
|
|
926
|
+
onTabSelect: tabId => {
|
|
927
|
+
this.#selectedTab = tabId;
|
|
928
|
+
},
|
|
922
929
|
toolCalls: filteredCalls,
|
|
923
930
|
filters: this.#filterState,
|
|
924
931
|
filterButtons: this.#filterButtons,
|
|
@@ -967,7 +974,8 @@ export interface PayloadViewInput {
|
|
|
967
974
|
}
|
|
968
975
|
|
|
969
976
|
export const PAYLOAD_DEFAULT_VIEW = (input: PayloadViewInput, output: object, target: HTMLElement): void => {
|
|
970
|
-
if (
|
|
977
|
+
if (input.valueObject === undefined && input.valueString === undefined && !input.errorText &&
|
|
978
|
+
!input.symbolizedError) {
|
|
971
979
|
render(nothing, target);
|
|
972
980
|
return;
|
|
973
981
|
}
|
|
@@ -979,6 +987,7 @@ export const PAYLOAD_DEFAULT_VIEW = (input: PayloadViewInput, output: object, ta
|
|
|
979
987
|
readOnly: true,
|
|
980
988
|
propertiesMode: ObjectUI.ObjectPropertiesSection.ObjectPropertiesMode.OWN_AND_INTERNAL_AND_INHERITED,
|
|
981
989
|
});
|
|
990
|
+
objectTree.expanded = true;
|
|
982
991
|
return html`<devtools-tree .template=${html`
|
|
983
992
|
<style>${ObjectUI.ObjectPropertiesSection.objectValueStyles}</style>
|
|
984
993
|
<style>${ObjectUI.ObjectPropertiesSection.objectPropertiesSectionStyles}</style>
|
|
@@ -185,3 +185,14 @@ Common.Revealer.registerRevealer({
|
|
|
185
185
|
return new Resources.ResourcesPanel.StorageBucketRevealer();
|
|
186
186
|
},
|
|
187
187
|
});
|
|
188
|
+
|
|
189
|
+
Common.Revealer.registerRevealer({
|
|
190
|
+
contextTypes() {
|
|
191
|
+
return maybeRetrieveContextTypes(Resources => [Resources.StorageView.StorageRevealable]);
|
|
192
|
+
},
|
|
193
|
+
destination: Common.Revealer.RevealerDestination.APPLICATION_PANEL,
|
|
194
|
+
async loadRevealer() {
|
|
195
|
+
const Resources = await loadResourcesModule();
|
|
196
|
+
return new Resources.StorageView.StorageRevealer();
|
|
197
|
+
},
|
|
198
|
+
});
|
|
@@ -245,7 +245,7 @@ const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
245
245
|
<hr class="divider">
|
|
246
246
|
<div class="settings-title">${i18nString(UIStrings.settings)}</div>
|
|
247
247
|
<devtools-checkbox class="setting-container small"
|
|
248
|
-
${bindToSetting(Common.Settings.Settings.instance().
|
|
248
|
+
${bindToSetting(Common.Settings.Settings.instance().resolve(SDK.SDKSettings.showAdHighlightsSettingDescriptor))}>
|
|
249
249
|
<div class="setting-text-container">
|
|
250
250
|
<div class="setting-label">${i18nString(UIStrings.highlightAds)}</div>
|
|
251
251
|
<div class="setting-explanation">${i18nString(UIStrings.highlightsElementsRedDetectedToBe)}</div>
|
|
@@ -9,10 +9,10 @@ import '../../ui/kit/kit.js';
|
|
|
9
9
|
import type * as Common from '../../core/common/common.js';
|
|
10
10
|
import * as Host from '../../core/host/host.js';
|
|
11
11
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
12
|
+
import * as TextEditor from '../../ui/components/text_editor/text_editor.js';
|
|
12
13
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
13
14
|
import {Directives, html, nothing, render} from '../../ui/lit/lit.js';
|
|
14
15
|
|
|
15
|
-
import {AiCodeCompletionDisclaimer, type DisclaimerTextVariant} from './AiCodeCompletionDisclaimer.js';
|
|
16
16
|
import styles from './aiCodeCompletionSummaryToolbar.css.js';
|
|
17
17
|
|
|
18
18
|
const UIStringsNotTranslate = {
|
|
@@ -34,7 +34,7 @@ export interface AiCodeCompletionSummaryToolbarProps {
|
|
|
34
34
|
disclaimerTooltipId?: string;
|
|
35
35
|
spinnerTooltipId?: string;
|
|
36
36
|
hasTopBorder?: boolean;
|
|
37
|
-
disclaimerTextVariant?: DisclaimerTextVariant;
|
|
37
|
+
disclaimerTextVariant?: TextEditor.AiCodeCompletionDisclaimer.DisclaimerTextVariant;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
40
|
export interface ViewInput {
|
|
@@ -45,7 +45,7 @@ export interface ViewInput {
|
|
|
45
45
|
loading: boolean;
|
|
46
46
|
hasTopBorder: boolean;
|
|
47
47
|
aidaAvailability?: Host.AidaClient.AidaAccessPreconditions;
|
|
48
|
-
disclaimerTextVariant?: DisclaimerTextVariant;
|
|
48
|
+
disclaimerTextVariant?: TextEditor.AiCodeCompletionDisclaimer.DisclaimerTextVariant;
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
export type View = (input: ViewInput, output: undefined, target: HTMLElement) => void;
|
|
@@ -65,7 +65,7 @@ export const DEFAULT_SUMMARY_TOOLBAR_VIEW: View = (input, _output, target) => {
|
|
|
65
65
|
// clang-format off
|
|
66
66
|
const disclaimer = input.disclaimerTooltipId && input.spinnerTooltipId ?
|
|
67
67
|
html`<devtools-widget
|
|
68
|
-
${widget(AiCodeCompletionDisclaimer, {
|
|
68
|
+
${widget(TextEditor.AiCodeCompletionDisclaimer.AiCodeCompletionDisclaimer, {
|
|
69
69
|
disclaimerTooltipId: input.disclaimerTooltipId,
|
|
70
70
|
spinnerTooltipId: input.spinnerTooltipId,
|
|
71
71
|
loading: input.loading,
|
|
@@ -113,7 +113,7 @@ export class AiCodeCompletionSummaryToolbar extends UI.Widget.Widget {
|
|
|
113
113
|
#citations = new Set<string>();
|
|
114
114
|
#loading = false;
|
|
115
115
|
#hasTopBorder = false;
|
|
116
|
-
#disclaimerTextVariant?: DisclaimerTextVariant;
|
|
116
|
+
#disclaimerTextVariant?: TextEditor.AiCodeCompletionDisclaimer.DisclaimerTextVariant;
|
|
117
117
|
|
|
118
118
|
#aidaAvailability?: Host.AidaClient.AidaAccessPreconditions;
|
|
119
119
|
#boundOnAidaAvailabilityChange:
|
|
@@ -23,30 +23,30 @@ const {html, render} = Lit;
|
|
|
23
23
|
|
|
24
24
|
const UIStrings = {
|
|
25
25
|
/**
|
|
26
|
-
* @description Title for close button
|
|
26
|
+
* @description Title for close button.
|
|
27
27
|
*/
|
|
28
28
|
close: 'Close',
|
|
29
29
|
/**
|
|
30
|
-
* @description Activity
|
|
30
|
+
* @description Activity-based badge award notification text.
|
|
31
31
|
* @example {Badge Title} PH1
|
|
32
32
|
*/
|
|
33
33
|
activityBasedBadgeAwardMessage: 'You earned the {PH1} badge! It’s been added to your Developer Profile.',
|
|
34
34
|
/**
|
|
35
|
-
* @description Action title for navigating to the badge settings in Google Developer Profile section
|
|
35
|
+
* @description Action title for navigating to the badge settings in Google Developer Profile section.
|
|
36
36
|
*/
|
|
37
37
|
manageSettings: 'Manage settings',
|
|
38
38
|
/**
|
|
39
|
-
* @description Action title for opening the Google Developer
|
|
39
|
+
* @description Action title for opening the user\'s Google Developer Profile page in a new tab.
|
|
40
40
|
*/
|
|
41
41
|
viewProfile: 'View profile',
|
|
42
42
|
/**
|
|
43
|
-
* @description Starter badge award notification text when the user has a Google Developer
|
|
43
|
+
* @description Starter badge award notification text when the user has a Google Developer Profile but has not enabled receiving badges in DevTools yet.
|
|
44
44
|
* @example {Badge Title} PH1
|
|
45
45
|
* @example {Google Developer Program link} PH2
|
|
46
46
|
*/
|
|
47
47
|
starterBadgeAwardMessageSettingDisabled: 'You earned the {PH1} badge for the {PH2}! Turn on badges to claim it.',
|
|
48
48
|
/**
|
|
49
|
-
* @description Starter badge award notification text when the user does not have a Google Developer
|
|
49
|
+
* @description Starter badge award notification text when the user does not have a Google Developer Profile.
|
|
50
50
|
* @example {Badge Title} PH1
|
|
51
51
|
* @example {Google Developer Program link} PH2
|
|
52
52
|
*/
|
|
@@ -57,11 +57,11 @@ const UIStrings = {
|
|
|
57
57
|
*/
|
|
58
58
|
noThanks: 'No thanks',
|
|
59
59
|
/**
|
|
60
|
-
* @description Action title for enabling the "Receive badges" setting
|
|
60
|
+
* @description Action title for enabling the "Receive badges" setting.
|
|
61
61
|
*/
|
|
62
62
|
receiveBadges: 'Turn on badges',
|
|
63
63
|
/**
|
|
64
|
-
* @description Action title for creating a Google Developer Program
|
|
64
|
+
* @description Action title for creating a Google Developer Program profile.
|
|
65
65
|
*/
|
|
66
66
|
createProfile: 'Create profile',
|
|
67
67
|
} as const;
|
|
@@ -7,6 +7,7 @@ import * as Platform from '../../core/platform/platform.js';
|
|
|
7
7
|
import * as _ProtocolClient from '../../core/protocol_client/protocol_client.js'; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
8
8
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
9
9
|
import * as Extensions from '../../models/extensions/extensions.js';
|
|
10
|
+
import * as ObjectUI from '../../ui/legacy/components/object_ui/object_ui.js';
|
|
10
11
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
11
12
|
|
|
12
13
|
import type {ExtensionServer} from './ExtensionServer.js';
|
|
@@ -200,13 +201,13 @@ export class ExtensionSidebarPane extends UI.View.SimpleView {
|
|
|
200
201
|
return;
|
|
201
202
|
}
|
|
202
203
|
objectPropertiesView.element.removeChildren();
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
204
|
+
const section = new ObjectUI.ObjectPropertiesSection.ObjectPropertiesSection(object, title, undefined, undefined,
|
|
205
|
+
/* editable: */ false);
|
|
206
|
+
if (!title) {
|
|
207
|
+
section.titleLessMode();
|
|
208
|
+
}
|
|
209
|
+
section.firstChild()?.expand();
|
|
210
|
+
objectPropertiesView.element.appendChild(section.element);
|
|
211
|
+
callback();
|
|
211
212
|
}
|
|
212
213
|
}
|
|
@@ -444,8 +444,12 @@ export class ExtensionServer extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
444
444
|
return this.status.E_BADARG(
|
|
445
445
|
'command', `expected ${Extensions.ExtensionAPI.PrivateAPI.Commands.RegisterRecorderExtensionPlugin}`);
|
|
446
446
|
}
|
|
447
|
-
const {pluginName, mediaType, port, capabilities} = message;
|
|
448
447
|
const extensionOrigin = this.getExtensionOrigin(_shared_port);
|
|
448
|
+
const extension = this.registeredExtensions.get(extensionOrigin);
|
|
449
|
+
if (!extension || extension.hostsPolicy.runtimeBlockedHosts.length > 0) {
|
|
450
|
+
return this.status.E_FAILED('Permission denied');
|
|
451
|
+
}
|
|
452
|
+
const {pluginName, mediaType, port, capabilities} = message;
|
|
449
453
|
const recorderPluginManager = Extensions.RecorderPluginManager.RecorderPluginManager.instance();
|
|
450
454
|
recorderPluginManager.addPlugin(new Extensions.RecorderExtensionEndpoint.RecorderExtensionEndpoint(
|
|
451
455
|
pluginName, port, capabilities, extensionOrigin, recorderPluginManager, mediaType));
|
|
@@ -537,6 +541,10 @@ export class ExtensionServer extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
537
541
|
}
|
|
538
542
|
|
|
539
543
|
const extensionOrigin = this.getExtensionOrigin(port);
|
|
544
|
+
const extension = this.registeredExtensions.get(extensionOrigin);
|
|
545
|
+
if (!extension || extension.hostsPolicy.runtimeBlockedHosts.length > 0) {
|
|
546
|
+
return this.status.E_FAILED('Permission denied');
|
|
547
|
+
}
|
|
540
548
|
const pagePath = ExtensionServer.expandResourcePath(extensionOrigin, message.pagePath);
|
|
541
549
|
if (pagePath === undefined) {
|
|
542
550
|
return this.status.E_BADARG('pagePath', 'Resources paths cannot point to non-extension resources');
|
|
@@ -955,6 +963,18 @@ export class ExtensionServer extends Common.ObjectWrapper.ObjectWrapper<EventTyp
|
|
|
955
963
|
*/
|
|
956
964
|
private extensionAllowedOnContentProvider(
|
|
957
965
|
contentProvider: TextUtils.ContentProvider.ContentProvider, port: MessagePort): boolean {
|
|
966
|
+
if (contentProvider instanceof Workspace.UISourceCode.UISourceCode) {
|
|
967
|
+
const debuggerSourceMapURLs =
|
|
968
|
+
Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding.instance().sourceMapURLsForUISourceCode(
|
|
969
|
+
contentProvider);
|
|
970
|
+
const cssSourceMapURLs =
|
|
971
|
+
Bindings.CSSWorkspaceBinding.CSSWorkspaceBinding.instance().sourceMapURLsForUISourceCode(contentProvider);
|
|
972
|
+
const sourceMapURLs = [...debuggerSourceMapURLs, ...cssSourceMapURLs];
|
|
973
|
+
if (sourceMapURLs.some(url => !this.extensionAllowedOnURL(url, port))) {
|
|
974
|
+
return false;
|
|
975
|
+
}
|
|
976
|
+
}
|
|
977
|
+
|
|
958
978
|
// 1. Exception for Scripts with sourceURL
|
|
959
979
|
if (contentProvider instanceof Workspace.UISourceCode.UISourceCode &&
|
|
960
980
|
contentProvider.contentType() === Common.ResourceType.resourceTypes.Script) {
|
|
@@ -22,45 +22,45 @@ import styles from './gdpSignUpDialog.css.js';
|
|
|
22
22
|
|
|
23
23
|
const UIStrings = {
|
|
24
24
|
/**
|
|
25
|
-
* @description
|
|
25
|
+
* @description ARIA label for the Google Developer Program sign up dialog.
|
|
26
26
|
*/
|
|
27
27
|
gdpDialogAriaLabel: 'Google Developer Program sign up dialog',
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
30
|
-
* @description Button text for canceling GDP sign up.
|
|
29
|
+
* @description Button text for canceling Google Developer Program sign up.
|
|
31
30
|
*/
|
|
32
31
|
cancel: 'Cancel',
|
|
33
32
|
/**
|
|
34
|
-
* @description Button text for confirming
|
|
33
|
+
* @description Button text for confirming Google Developer Program sign up.
|
|
35
34
|
*/
|
|
36
35
|
signUp: 'Sign up',
|
|
37
36
|
/**
|
|
38
|
-
* @description Title for the first section of the
|
|
37
|
+
* @description Title for the first section of the Google Developer Program sign up dialog.
|
|
39
38
|
*/
|
|
40
39
|
designedForSuccess: 'Designed for your success',
|
|
41
40
|
/**
|
|
42
|
-
* @description Body for the first section of the
|
|
41
|
+
* @description Body for the first section of the Google Developer Program sign up dialog.
|
|
43
42
|
*/
|
|
44
|
-
designedForSuccessBody:
|
|
43
|
+
designedForSuccessBody:
|
|
44
|
+
'Grow your skills, build with AI, and earn badges you can showcase in your developer profile.',
|
|
45
45
|
/**
|
|
46
|
-
* @description Title for the second section of the
|
|
46
|
+
* @description Title for the second section of the Google Developer Program sign up dialog.
|
|
47
47
|
*/
|
|
48
48
|
keepUpdated: 'Keep me updated',
|
|
49
49
|
/**
|
|
50
|
-
* @description Body for the second section of the
|
|
50
|
+
* @description Body for the second section of the Google Developer Program sign up dialog.
|
|
51
51
|
*/
|
|
52
|
-
keepUpdatedBody: 'The latest DevTools features, event invites, and tailored insights land directly in your inbox',
|
|
52
|
+
keepUpdatedBody: 'The latest DevTools features, event invites, and tailored insights land directly in your inbox.',
|
|
53
53
|
/**
|
|
54
|
-
* @description Title for the third section of the
|
|
54
|
+
* @description Title for the third section of the Google Developer Program sign up dialog.
|
|
55
55
|
*/
|
|
56
56
|
tailorProfile: 'Tailor your profile',
|
|
57
57
|
/**
|
|
58
|
-
* @description Body for the third section of the
|
|
58
|
+
* @description Body for the third section of the Google Developer Program sign up dialog.
|
|
59
59
|
*/
|
|
60
60
|
tailorProfileBody:
|
|
61
|
-
'The name on your Google
|
|
61
|
+
'The name on your Google account and your interests will be used in your Google Developer Profile. Your name may appear where you contribute and can be changed at any time.',
|
|
62
62
|
/**
|
|
63
|
-
* @description
|
|
63
|
+
* @description Disclaimer text for tailoring profile in the Google Developer Program sign up dialog.
|
|
64
64
|
* @example {Content Policy} PH1
|
|
65
65
|
* @example {Terms of Service} PH2
|
|
66
66
|
* @example {Privacy Policy} PH3
|
|
@@ -88,9 +88,9 @@ const UIStrings = {
|
|
|
88
88
|
*/
|
|
89
89
|
privacyPolicy: 'Privacy Policy',
|
|
90
90
|
/**
|
|
91
|
-
* @description Error message shown in a snackbar when
|
|
91
|
+
* @description Error message shown in a snackbar when Google Developer Profile creation fails.
|
|
92
92
|
*/
|
|
93
|
-
signUpFailed: 'Your Google Developer
|
|
93
|
+
signUpFailed: 'Your Google Developer Profile couldn’t be created. Please try again later.',
|
|
94
94
|
} as const;
|
|
95
95
|
|
|
96
96
|
const str_ = i18n.i18n.registerUIStrings('panels/common/GdpSignUpDialog.ts', UIStrings);
|
|
@@ -24,11 +24,10 @@ import styles from './geminiRebrandPromoDialog.css.js';
|
|
|
24
24
|
|
|
25
25
|
const UIStrings = {
|
|
26
26
|
/**
|
|
27
|
-
* @description
|
|
27
|
+
* @description ARIA label for the dialog.
|
|
28
28
|
*/
|
|
29
29
|
dialogAriaLabel: 'Gemini 3 Flash in DevTools',
|
|
30
30
|
/**
|
|
31
|
-
*
|
|
32
31
|
* @description Button text for dismissing the dialog.
|
|
33
32
|
*/
|
|
34
33
|
dismiss: 'Dismiss',
|
|
@@ -37,19 +36,19 @@ const UIStrings = {
|
|
|
37
36
|
*/
|
|
38
37
|
getStarted: 'Get started',
|
|
39
38
|
/**
|
|
40
|
-
* @description
|
|
39
|
+
* @description Feature item describing Gemini as an AI companion for web development.
|
|
41
40
|
*/
|
|
42
41
|
detailAiCompanion: 'Meet your AI-powered companion for web dev',
|
|
43
42
|
/**
|
|
44
|
-
* @description
|
|
43
|
+
* @description Feature item describing instant answers for console errors.
|
|
45
44
|
*/
|
|
46
45
|
detailConsoleErrors: 'Get instant, accurate answers for console errors',
|
|
47
46
|
/**
|
|
48
|
-
* @description
|
|
47
|
+
* @description Feature item describing CSS and JS snippet generation.
|
|
49
48
|
*/
|
|
50
49
|
detailGenerateCode: 'Generate CSS and JS snippets on the fly',
|
|
51
50
|
/**
|
|
52
|
-
* @description
|
|
51
|
+
* @description Feature item describing automatic issue detection in performance traces.
|
|
53
52
|
*/
|
|
54
53
|
detailPerformance: 'Automatically find issues in performance traces',
|
|
55
54
|
} as const;
|