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
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
// Copyright 2026 The Chromium Authors
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
import * as Common from '../../../core/common/common.js';
|
|
6
|
+
import * as Host from '../../../core/host/host.js';
|
|
7
|
+
import * as i18n from '../../../core/i18n/i18n.js';
|
|
8
|
+
import * as Workspace from '../../workspace/workspace.js';
|
|
9
|
+
import {isOpaqueOrigin} from '../AiOrigins.js';
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
type BaseToolCapability,
|
|
13
|
+
type DataHandlerResult,
|
|
14
|
+
type DataTool,
|
|
15
|
+
type OriginLockCapability,
|
|
16
|
+
ToolName,
|
|
17
|
+
} from './Tool.js';
|
|
18
|
+
|
|
19
|
+
const UIStringsNotTranslate = {
|
|
20
|
+
listingSources: 'Listing workspace sources',
|
|
21
|
+
} as const;
|
|
22
|
+
|
|
23
|
+
const lockedString = i18n.i18n.lockedString;
|
|
24
|
+
|
|
25
|
+
interface SourceSummary {
|
|
26
|
+
id: number;
|
|
27
|
+
name: string;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* A tool that lists all network source files in the workspace.
|
|
32
|
+
* Each file is returned with its displayName and a unique session-based numeric ID.
|
|
33
|
+
*/
|
|
34
|
+
export class ListSourcesTool implements
|
|
35
|
+
DataTool<Record<string, never>, {files: SourceSummary[]}, BaseToolCapability&OriginLockCapability> {
|
|
36
|
+
readonly name = ToolName.LIST_SOURCES;
|
|
37
|
+
readonly description = 'Lists all source files in the workspace with their name and a unique ID.';
|
|
38
|
+
|
|
39
|
+
static lastSourceId = 0;
|
|
40
|
+
static uiSourceCodeId = new WeakMap<Workspace.UISourceCode.UISourceCode, number>();
|
|
41
|
+
|
|
42
|
+
static reset(): void {
|
|
43
|
+
ListSourcesTool.lastSourceId = 0;
|
|
44
|
+
ListSourcesTool.uiSourceCodeId = new WeakMap();
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// eslint-disable-next-line @devtools/no-instance-of-migrated-singletons
|
|
48
|
+
static getUISourceCodes(workspace: Workspace.Workspace.WorkspaceImpl = Workspace.Workspace.WorkspaceImpl.instance()):
|
|
49
|
+
Workspace.UISourceCode.UISourceCode[] {
|
|
50
|
+
const projects =
|
|
51
|
+
workspace.projects().filter(project => project.type() === Workspace.Workspace.projectTypes.Network);
|
|
52
|
+
const uiSourceCodes = new Map<string, Workspace.UISourceCode.UISourceCode>();
|
|
53
|
+
|
|
54
|
+
for (const project of projects) {
|
|
55
|
+
for (const uiSourceCode of project.uiSourceCodes()) {
|
|
56
|
+
if (uiSourceCode.isIgnoreListed()) {
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
const url = uiSourceCode.url();
|
|
60
|
+
if (!uiSourceCodes.get(url) || uiSourceCode.contentType().isFromSourceMap()) {
|
|
61
|
+
uiSourceCodes.set(url, uiSourceCode);
|
|
62
|
+
if (!ListSourcesTool.uiSourceCodeId.has(uiSourceCode)) {
|
|
63
|
+
ListSourcesTool.uiSourceCodeId.set(uiSourceCode, ++ListSourcesTool.lastSourceId);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return [...uiSourceCodes.values()];
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
readonly parameters: Host.AidaClient.FunctionObjectParam<never> = {
|
|
73
|
+
type: Host.AidaClient.ParametersTypes.OBJECT,
|
|
74
|
+
description: '',
|
|
75
|
+
nullable: true,
|
|
76
|
+
required: [],
|
|
77
|
+
properties: {},
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
displayInfoFromArgs(): {
|
|
81
|
+
title: string,
|
|
82
|
+
action: string,
|
|
83
|
+
} {
|
|
84
|
+
return {
|
|
85
|
+
title: lockedString(UIStringsNotTranslate.listingSources),
|
|
86
|
+
action: 'listSources()',
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
async handler(
|
|
91
|
+
_params: Record<string, never>,
|
|
92
|
+
context: BaseToolCapability&OriginLockCapability,
|
|
93
|
+
): Promise<DataHandlerResult<{files: SourceSummary[]}>> {
|
|
94
|
+
const origin = context.getEstablishedOrigin();
|
|
95
|
+
if (origin && isOpaqueOrigin(origin)) {
|
|
96
|
+
return {
|
|
97
|
+
error: 'Opaque origin not allowed',
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
const files = ListSourcesTool.getUISourceCodes().filter(file => {
|
|
102
|
+
const fileUrl = file.url();
|
|
103
|
+
const fileOrigin = Common.ParsedURL.ParsedURL.extractOrigin(fileUrl);
|
|
104
|
+
return !origin || fileOrigin === origin;
|
|
105
|
+
});
|
|
106
|
+
|
|
107
|
+
return {
|
|
108
|
+
result: {
|
|
109
|
+
files: files.map(file => ({
|
|
110
|
+
id: ListSourcesTool.uiSourceCodeId.get(file) ?? 0,
|
|
111
|
+
name: file.fullDisplayName(),
|
|
112
|
+
})),
|
|
113
|
+
},
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
// Copyright 2026 The Chromium Authors
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
import * as Host from '../../../core/host/host.js';
|
|
6
|
+
import type * as LHModel from '../../lighthouse/lighthouse.js';
|
|
7
|
+
import {LighthouseFormatter} from '../data_formatters/LighthouseFormatter.js';
|
|
8
|
+
|
|
9
|
+
import {
|
|
10
|
+
type BaseToolCapability,
|
|
11
|
+
type DataHandlerResult,
|
|
12
|
+
type DataTool,
|
|
13
|
+
type LighthouseCapability,
|
|
14
|
+
type ToolArgs,
|
|
15
|
+
ToolName,
|
|
16
|
+
} from './Tool.js';
|
|
17
|
+
|
|
18
|
+
export interface RunLighthouseArgs extends ToolArgs {
|
|
19
|
+
explanation: string;
|
|
20
|
+
category: LHModel.RunTypes.CategoryId;
|
|
21
|
+
mode?: LHModel.RunTypes.RunMode;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export class RunLighthouseTool implements
|
|
25
|
+
DataTool<RunLighthouseArgs, {audits: string}, BaseToolCapability&LighthouseCapability> {
|
|
26
|
+
readonly name = ToolName.RUN_LIGHTHOUSE;
|
|
27
|
+
readonly description =
|
|
28
|
+
'Runs Lighthouse audits on the active page. Supports "navigation" (for full initial page load audits), "snapshot" (for inspecting live in-page modifications without reload), and "timespan" (for interactions).';
|
|
29
|
+
|
|
30
|
+
readonly parameters: Host.AidaClient.FunctionObjectParam<keyof RunLighthouseArgs> = {
|
|
31
|
+
type: Host.AidaClient.ParametersTypes.OBJECT,
|
|
32
|
+
description: 'Parameters for running Lighthouse audits.',
|
|
33
|
+
nullable: false,
|
|
34
|
+
properties: {
|
|
35
|
+
explanation: {
|
|
36
|
+
type: Host.AidaClient.ParametersTypes.STRING,
|
|
37
|
+
description: 'Reason for running new audits.',
|
|
38
|
+
nullable: false,
|
|
39
|
+
},
|
|
40
|
+
category: {
|
|
41
|
+
type: Host.AidaClient.ParametersTypes.STRING,
|
|
42
|
+
description: 'Lighthouse category. E.g. "accessibility", "performance".',
|
|
43
|
+
nullable: false,
|
|
44
|
+
},
|
|
45
|
+
mode: {
|
|
46
|
+
type: Host.AidaClient.ParametersTypes.STRING,
|
|
47
|
+
description:
|
|
48
|
+
'Lighthouse execution mode: "navigation", "snapshot", "timespan". Use "navigation" for initial full audits unless the user requested otherwise or in-page changes are being evaluated. Defaults to "snapshot".',
|
|
49
|
+
nullable: true,
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
required: ['explanation', 'category'],
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
displayInfoFromArgs(params: RunLighthouseArgs): {title: string, thought: string, action: string} {
|
|
56
|
+
return {
|
|
57
|
+
title: `Running Lighthouse audits: ${params.category} (${params.mode ?? 'snapshot'})`,
|
|
58
|
+
thought: params.explanation,
|
|
59
|
+
action: `runLighthouse('${params.category}', '${params.mode ?? 'snapshot'}')`,
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
async handler(params: RunLighthouseArgs,
|
|
64
|
+
context: BaseToolCapability&LighthouseCapability): Promise<DataHandlerResult<{audits: string}>> {
|
|
65
|
+
if (!context.lighthouseRecording) {
|
|
66
|
+
return {error: 'Error: Lighthouse recording capability is not available.'};
|
|
67
|
+
}
|
|
68
|
+
const mode = params.mode ?? 'snapshot';
|
|
69
|
+
try {
|
|
70
|
+
const report = await context.lighthouseRecording({
|
|
71
|
+
mode,
|
|
72
|
+
categoryIds: [params.category],
|
|
73
|
+
isAIControlled: true,
|
|
74
|
+
});
|
|
75
|
+
if (!report) {
|
|
76
|
+
return {error: 'Error: Failed to record new audits.'};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
const audits = new LighthouseFormatter().audits(report, params.category);
|
|
80
|
+
const isSnapshot = mode === 'snapshot';
|
|
81
|
+
return {
|
|
82
|
+
result: {audits},
|
|
83
|
+
widgets: [{name: 'LIGHTHOUSE_REPORT', data: {report, snapshotReport: isSnapshot}}],
|
|
84
|
+
};
|
|
85
|
+
} catch (err) {
|
|
86
|
+
return {error: `Error: Failed to record new audits: ${err instanceof Error ? err.message : String(err)}`};
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
// Copyright 2026 The Chromium Authors
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
import * as Common from '../../../core/common/common.js';
|
|
6
|
+
import * as Host from '../../../core/host/host.js';
|
|
7
|
+
import * as i18n from '../../../core/i18n/i18n.js';
|
|
8
|
+
import * as SDK from '../../../core/sdk/sdk.js';
|
|
9
|
+
import {PerformanceTraceContext} from '../contexts/PerformanceTraceContext.js';
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
type BaseToolCapability,
|
|
13
|
+
type DataHandlerResult,
|
|
14
|
+
type DataTool,
|
|
15
|
+
type ToolArgs,
|
|
16
|
+
ToolName,
|
|
17
|
+
} from './Tool.js';
|
|
18
|
+
|
|
19
|
+
const UIStringsNotTranslate = {
|
|
20
|
+
selectingTraceEvent: 'Selecting trace event',
|
|
21
|
+
} as const;
|
|
22
|
+
|
|
23
|
+
const lockedString = i18n.i18n.lockedString;
|
|
24
|
+
|
|
25
|
+
export interface SelectTraceEventByKeyArgs extends ToolArgs {
|
|
26
|
+
eventKey: string;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export class SelectTraceEventByKeyTool implements DataTool<SelectTraceEventByKeyArgs, string, BaseToolCapability> {
|
|
30
|
+
readonly name = ToolName.SELECT_TRACE_EVENT_BY_KEY;
|
|
31
|
+
readonly description = 'Selects and reveals a specific event by its key in the Performance panel Flamechart.';
|
|
32
|
+
|
|
33
|
+
readonly parameters: Host.AidaClient.FunctionObjectParam<keyof SelectTraceEventByKeyArgs> = {
|
|
34
|
+
type: Host.AidaClient.ParametersTypes.OBJECT,
|
|
35
|
+
description: 'Arguments for selecting a trace event.',
|
|
36
|
+
nullable: false,
|
|
37
|
+
properties: {
|
|
38
|
+
eventKey: {
|
|
39
|
+
type: Host.AidaClient.ParametersTypes.STRING,
|
|
40
|
+
description: 'The key of the event to select.',
|
|
41
|
+
nullable: false,
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
required: ['eventKey'],
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
displayInfoFromArgs(params: SelectTraceEventByKeyArgs): {
|
|
48
|
+
title: string,
|
|
49
|
+
action: string,
|
|
50
|
+
} {
|
|
51
|
+
return {
|
|
52
|
+
title: lockedString(UIStringsNotTranslate.selectingTraceEvent),
|
|
53
|
+
action: `selectTraceEventByKey('${params.eventKey}')`,
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
async handler(
|
|
58
|
+
params: SelectTraceEventByKeyArgs,
|
|
59
|
+
capabilities: BaseToolCapability,
|
|
60
|
+
): Promise<DataHandlerResult<string>> {
|
|
61
|
+
const conversationContext = capabilities.conversationContext;
|
|
62
|
+
if (!conversationContext || !(conversationContext instanceof PerformanceTraceContext)) {
|
|
63
|
+
return {error: 'Performance trace context is not available.'};
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
const focus = conversationContext.getItem();
|
|
67
|
+
const event = focus.lookupEvent(params.eventKey);
|
|
68
|
+
if (!event) {
|
|
69
|
+
return {error: `Could not find event with key "${params.eventKey}".`};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const revealable = new SDK.TraceObject.RevealableEvent(event);
|
|
73
|
+
try {
|
|
74
|
+
await Common.Revealer.reveal(revealable);
|
|
75
|
+
} catch {
|
|
76
|
+
// A failed reveal should not block returning the selected event context.
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
return {
|
|
80
|
+
result: 'Event selected',
|
|
81
|
+
widgets: [{
|
|
82
|
+
name: 'TIMELINE_EVENT_SUMMARY',
|
|
83
|
+
data: {
|
|
84
|
+
event,
|
|
85
|
+
parsedTrace: focus.parsedTrace,
|
|
86
|
+
},
|
|
87
|
+
}],
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -140,13 +140,18 @@ export interface PerformanceRecordingCapability {
|
|
|
140
140
|
* Used by the agent to pass a complete context to any tool type-safely.
|
|
141
141
|
*/
|
|
142
142
|
export type AllToolsCapabilities = BaseToolCapability&PageExecutionCapability&StyleMutationCapability&TargetCapability&
|
|
143
|
-
OriginLockCapability&LighthouseCapability&PerformanceRecordingCapability;
|
|
143
|
+
OriginLockCapability&LighthouseCapability&PerformanceRecordingCapability&ServerLoggingCapability;
|
|
144
144
|
|
|
145
145
|
/**
|
|
146
146
|
* Base argument type for AI Tools.
|
|
147
147
|
*/
|
|
148
148
|
export type ToolArgs = Record<string, unknown>;
|
|
149
149
|
|
|
150
|
+
// The maximum size (in bytes) of a function execution result.
|
|
151
|
+
// Approximately 16k tokens at ~4 characters per token, designed to limit
|
|
152
|
+
// result sizes to prevent overloading the LLM's context window.
|
|
153
|
+
export const MAX_FUNCTION_RESULT_BYTE_LENGTH = 16384 * 4;
|
|
154
|
+
|
|
150
155
|
export const enum ToolName {
|
|
151
156
|
EXECUTE_JAVASCRIPT = 'executeJavaScript',
|
|
152
157
|
GET_STYLES = 'getStyles',
|
|
@@ -156,6 +161,17 @@ export const enum ToolName {
|
|
|
156
161
|
RESOLVE_DEVTOOLS_NODE_PATH = 'resolveDevtoolsNodePath',
|
|
157
162
|
GET_ELEMENT_ACCESSIBILITY_DETAILS = 'getElementAccessibilityDetails',
|
|
158
163
|
RECORD_PERFORMANCE_TRACE = 'recordPerformanceTrace',
|
|
164
|
+
LIST_PAGE_ORIGINS = 'listPageOrigins',
|
|
165
|
+
GET_TRACE_EVENT_BY_KEY = 'getTraceEventByKey',
|
|
166
|
+
SELECT_TRACE_EVENT_BY_KEY = 'selectTraceEventByKey',
|
|
167
|
+
LIST_SOURCES = 'listSources',
|
|
168
|
+
GET_SOURCE_CONTENT = 'getSourceContent',
|
|
169
|
+
GET_TRACE_MAIN_THREAD_SUMMARY = 'getTraceMainThreadSummary',
|
|
170
|
+
GET_TRACE_NETWORK_SUMMARY = 'getTraceNetworkSummary',
|
|
171
|
+
RUN_LIGHTHOUSE = 'runLighthouse',
|
|
172
|
+
GET_DETAILED_CALL_TREE = 'getDetailedCallTree',
|
|
173
|
+
GET_FUNCTION_CODE = 'getFunctionCode',
|
|
174
|
+
GET_RESOURCE_CONTENT = 'getResourceContent',
|
|
159
175
|
}
|
|
160
176
|
|
|
161
177
|
/**
|
|
@@ -180,6 +196,7 @@ export interface BaseTool<ArgsType extends ToolArgs = ToolArgs> {
|
|
|
180
196
|
) => {
|
|
181
197
|
title?: string, thought?: string, action?: string, suggestions?: [string, ...string[]],
|
|
182
198
|
};
|
|
199
|
+
readonly annotations?: ToolAnnotation[];
|
|
183
200
|
}
|
|
184
201
|
|
|
185
202
|
/**
|
|
@@ -242,3 +259,11 @@ export type Tool<
|
|
|
242
259
|
ReturnType = unknown,
|
|
243
260
|
CapabilitiesType extends BaseToolCapability = BaseToolCapability,
|
|
244
261
|
> = DataTool<ArgsType, ReturnType, CapabilitiesType>|ContextTool<ArgsType, ReturnType, CapabilitiesType>;
|
|
262
|
+
|
|
263
|
+
export interface ServerLoggingCapability {
|
|
264
|
+
setLoggingEnabled(enabled: boolean): void;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
export const enum ToolAnnotation {
|
|
268
|
+
REDACT_FROM_HISTORY = 'redact-from-history',
|
|
269
|
+
}
|
|
@@ -3,13 +3,24 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import {ExecuteJavaScriptTool} from './ExecuteJavaScript.js';
|
|
6
|
+
import {GetDetailedCallTreeTool} from './GetDetailedCallTree.js';
|
|
6
7
|
import {GetElementAccessibilityDetailsTool} from './GetElementAccessibilityDetails.js';
|
|
8
|
+
import {GetFunctionCodeTool} from './GetFunctionCode.js';
|
|
7
9
|
import {GetLighthouseAuditsTool} from './GetLighthouseAudits.js';
|
|
8
10
|
import {GetNetworkRequestDetailsTool} from './GetNetworkRequestDetails.js';
|
|
11
|
+
import {GetResourceContentTool} from './GetResourceContent.js';
|
|
12
|
+
import {GetSourceContentTool} from './GetSourceContent.js';
|
|
9
13
|
import {GetStylesTool} from './GetStyles.js';
|
|
14
|
+
import {GetTraceEventByKeyTool} from './GetTraceEventByKey.js';
|
|
15
|
+
import {GetTraceMainThreadSummaryTool} from './GetTraceMainThreadSummary.js';
|
|
16
|
+
import {GetTraceNetworkSummaryTool} from './GetTraceNetworkSummary.js';
|
|
10
17
|
import {ListNetworkRequestsTool} from './ListNetworkRequests.js';
|
|
18
|
+
import {ListPageOriginsTool} from './ListPageOrigins.js';
|
|
19
|
+
import {ListSourcesTool} from './ListSources.js';
|
|
11
20
|
import {RecordPerformanceTraceTool} from './RecordPerformanceTrace.js';
|
|
12
21
|
import {ResolveDevtoolsNodePathTool} from './ResolveDevtoolsNodePath.js';
|
|
22
|
+
import {RunLighthouseTool} from './RunLighthouse.js';
|
|
23
|
+
import {SelectTraceEventByKeyTool} from './SelectTraceEventByKey.js';
|
|
13
24
|
import {type AllToolsCapabilities, type Tool, type ToolArgs, ToolName} from './Tool.js';
|
|
14
25
|
|
|
15
26
|
/**
|
|
@@ -29,6 +40,17 @@ export const TOOLS = {
|
|
|
29
40
|
[ToolName.RESOLVE_DEVTOOLS_NODE_PATH]: new ResolveDevtoolsNodePathTool(),
|
|
30
41
|
[ToolName.GET_ELEMENT_ACCESSIBILITY_DETAILS]: new GetElementAccessibilityDetailsTool(),
|
|
31
42
|
[ToolName.RECORD_PERFORMANCE_TRACE]: new RecordPerformanceTraceTool(),
|
|
43
|
+
[ToolName.LIST_PAGE_ORIGINS]: new ListPageOriginsTool(),
|
|
44
|
+
[ToolName.GET_TRACE_EVENT_BY_KEY]: new GetTraceEventByKeyTool(),
|
|
45
|
+
[ToolName.SELECT_TRACE_EVENT_BY_KEY]: new SelectTraceEventByKeyTool(),
|
|
46
|
+
[ToolName.LIST_SOURCES]: new ListSourcesTool(),
|
|
47
|
+
[ToolName.GET_SOURCE_CONTENT]: new GetSourceContentTool(),
|
|
48
|
+
[ToolName.GET_TRACE_MAIN_THREAD_SUMMARY]: new GetTraceMainThreadSummaryTool(),
|
|
49
|
+
[ToolName.GET_TRACE_NETWORK_SUMMARY]: new GetTraceNetworkSummaryTool(),
|
|
50
|
+
[ToolName.RUN_LIGHTHOUSE]: new RunLighthouseTool(),
|
|
51
|
+
[ToolName.GET_DETAILED_CALL_TREE]: new GetDetailedCallTreeTool(),
|
|
52
|
+
[ToolName.GET_FUNCTION_CODE]: new GetFunctionCodeTool(),
|
|
53
|
+
[ToolName.GET_RESOURCE_CONTENT]: new GetResourceContentTool(),
|
|
32
54
|
};
|
|
33
55
|
|
|
34
56
|
/**
|
|
@@ -143,6 +143,10 @@ export class CSSWorkspaceBinding implements SDK.TargetManager.SDKModelObserver<S
|
|
|
143
143
|
}
|
|
144
144
|
return rawLocations;
|
|
145
145
|
}
|
|
146
|
+
|
|
147
|
+
sourceMapURLsForUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode): Platform.DevToolsPath.UrlString[] {
|
|
148
|
+
return SASSSourceMapping.sourceMapURLsForUISourceCode(uiSourceCode);
|
|
149
|
+
}
|
|
146
150
|
}
|
|
147
151
|
|
|
148
152
|
export interface SourceMapping {
|
|
@@ -577,6 +577,10 @@ export class CompilerScriptMapping implements DebuggerSourceMapping {
|
|
|
577
577
|
return scripts;
|
|
578
578
|
}
|
|
579
579
|
|
|
580
|
+
sourceMapURLsForUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode): Platform.DevToolsPath.UrlString[] {
|
|
581
|
+
return [...this.#uiSourceCodeToSourceMaps.get(uiSourceCode)].map(sourceMap => sourceMap.url());
|
|
582
|
+
}
|
|
583
|
+
|
|
580
584
|
private sourceMapAttachedForTest(_sourceMap: SDK.SourceMap.SourceMap): void {
|
|
581
585
|
}
|
|
582
586
|
|
|
@@ -463,6 +463,14 @@ export class DebuggerWorkspaceBinding implements SDK.TargetManager.SDKModelObser
|
|
|
463
463
|
return [...scripts];
|
|
464
464
|
}
|
|
465
465
|
|
|
466
|
+
sourceMapURLsForUISourceCode(uiSourceCode: Workspace.UISourceCode.UISourceCode): Platform.DevToolsPath.UrlString[] {
|
|
467
|
+
const urls = new Set<Platform.DevToolsPath.UrlString>();
|
|
468
|
+
for (const modelData of this.#debuggerModelToData.values()) {
|
|
469
|
+
modelData.compilerMapping.sourceMapURLsForUISourceCode(uiSourceCode).forEach(url => urls.add(url));
|
|
470
|
+
}
|
|
471
|
+
return [...urls];
|
|
472
|
+
}
|
|
473
|
+
|
|
466
474
|
supportsConditionalBreakpoints(uiSourceCode: Workspace.UISourceCode.UISourceCode): boolean {
|
|
467
475
|
const scripts = this.pluginManager.scriptsForUISourceCode(uiSourceCode);
|
|
468
476
|
return scripts.every(script => script.isJavaScript());
|