chrome-devtools-frontend 1.0.1675430 → 1.0.1676824
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/WATCHLISTS +0 -4
- package/front_end/core/common/Settings.ts +0 -66
- package/front_end/core/root/Runtime.ts +0 -5
- package/front_end/core/sdk/CSSMetadata.ts +5 -9
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +8 -28
- package/front_end/core/sdk/DebuggerModel.ts +50 -30
- package/front_end/core/sdk/ResourceTreeModel.ts +20 -1
- package/front_end/core/sdk/Script.ts +9 -53
- package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +213 -23
- package/front_end/entrypoints/main/MainImpl.ts +31 -0
- package/front_end/generated/InspectorBackendCommands.ts +3 -1
- package/front_end/generated/SupportedCSSProperties.ts +21 -4
- package/front_end/generated/protocol-mapping.d.ts +14 -0
- package/front_end/generated/protocol-proxy-api.d.ts +10 -0
- package/front_end/generated/protocol.ts +35 -0
- package/front_end/models/ai_assistance/AiAgent2.ts +11 -0
- 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 +8 -87
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +2 -1
- package/front_end/models/ai_assistance/ai_assistance.ts +16 -0
- package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +124 -0
- package/front_end/models/ai_assistance/contexts/StorageContext.ts +111 -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/performance.md +8 -0
- 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/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 +81 -0
- package/front_end/models/ai_assistance/tools/ListSources.ts +116 -0
- package/front_end/models/ai_assistance/tools/SelectTraceEventByKey.ts +90 -0
- package/front_end/models/ai_assistance/tools/Tool.ts +22 -1
- package/front_end/models/ai_assistance/tools/ToolRegistry.ts +14 -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/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 +1 -1
- 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/AccessibilityNodeView.ts +36 -36
- 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/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 +27 -2
- package/front_end/panels/application/IndexedDBViews.ts +65 -63
- package/front_end/panels/application/WebMCPView.ts +16 -7
- package/front_end/panels/common/AiCodeCompletionSummaryToolbar.ts +5 -5
- package/front_end/panels/common/BadgeNotification.ts +8 -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/ConsolePinPane.ts +2 -2
- package/front_end/panels/console/ConsoleView.ts +20 -19
- package/front_end/panels/elements/LayoutPane.ts +2 -8
- package/front_end/panels/event_listeners/EventListenersView.ts +8 -4
- package/front_end/panels/issues/AffectedTrackingSitesView.ts +25 -14
- package/front_end/panels/media/PlayerMessagesView.ts +149 -68
- package/front_end/panels/network/NetworkPanel.ts +1 -1
- package/front_end/panels/network/RequestPayloadView.ts +1 -0
- 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/DebuggerPlugin.ts +9 -58
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +1 -1
- package/front_end/panels/sources/UISourceCodeFrame.ts +3 -8
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +4 -2
- 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 +436 -10
- package/front_end/ui/comments/CommentManager.ts +640 -0
- package/front_end/ui/comments/CommentsOverlayWidget.ts +121 -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/components/object_ui/CustomPreviewComponent.ts +11 -3
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +270 -162
- 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/JSONView.ts +8 -1
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +2 -2
- package/front_end/ui/settings/SettingUIRegistration.ts +55 -6
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
- package/mcp/mcp.ts +6 -1
- package/package.json +1 -1
- 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/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
|
@@ -14,21 +14,21 @@ import {AccessibilitySubPane} from './AccessibilitySubPane.js';
|
|
|
14
14
|
|
|
15
15
|
const UIStrings = {
|
|
16
16
|
/**
|
|
17
|
-
* @description Name of a
|
|
18
|
-
* 'source order' (the order in which the HTML elements show up in the source code)
|
|
19
|
-
* Accessibility panel.
|
|
17
|
+
* @description Name of a feature that allows the developer to view the contents of the page in the
|
|
18
|
+
* 'source order' (the order in which the HTML elements show up in the source code) under the
|
|
19
|
+
* Accessibility tab in the Elements panel.
|
|
20
20
|
*/
|
|
21
|
-
sourceOrderViewer: 'Source
|
|
21
|
+
sourceOrderViewer: 'Source order viewer',
|
|
22
22
|
/**
|
|
23
|
-
* @description Text in
|
|
23
|
+
* @description Text in the source order viewer under the Accessibility tab of the Elements panel shown when the selected node has no child elements.
|
|
24
24
|
*/
|
|
25
25
|
noSourceOrderInformation: 'No source order information available',
|
|
26
26
|
/**
|
|
27
|
-
* @description Text in
|
|
27
|
+
* @description Text in the source order viewer under the Accessibility tab of the Elements panel shown when the selected node has many child elements.
|
|
28
28
|
*/
|
|
29
29
|
thereMayBeADelayInDisplaying: 'There may be a delay in displaying source order for elements with many children',
|
|
30
30
|
/**
|
|
31
|
-
* @description Checkbox label in
|
|
31
|
+
* @description Checkbox label in the source order viewer under the Accessibility tab of the Elements panel. Source order
|
|
32
32
|
* means the order in which the HTML elements show up in the source code.
|
|
33
33
|
*/
|
|
34
34
|
showSourceOrder: 'Show source order',
|
|
@@ -11,11 +11,11 @@ let loadedAccessibilityModule: (typeof Accessibility|undefined);
|
|
|
11
11
|
|
|
12
12
|
const UIStrings = {
|
|
13
13
|
/**
|
|
14
|
-
* @description
|
|
14
|
+
* @description Title of the Accessibility tab in the Elements panel.
|
|
15
15
|
*/
|
|
16
16
|
accessibility: 'Accessibility',
|
|
17
17
|
/**
|
|
18
|
-
* @description Command for showing the
|
|
18
|
+
* @description Command for showing the Accessibility tab in the Elements panel.
|
|
19
19
|
*/
|
|
20
20
|
shoAccessibility: 'Show Accessibility',
|
|
21
21
|
} as const;
|
|
@@ -543,12 +543,12 @@ function createPerformanceTraceContext(focus: AiAssistanceModel.AIContext.AgentF
|
|
|
543
543
|
return new AiAssistanceModel.PerformanceTraceContext.PerformanceTraceContext(focus);
|
|
544
544
|
}
|
|
545
545
|
|
|
546
|
-
function createStorageContext(item: AiAssistanceModel.StorageItem.StorageItem|
|
|
547
|
-
|
|
546
|
+
function createStorageContext(item: AiAssistanceModel.StorageItem.StorageItem|
|
|
547
|
+
null): AiAssistanceModel.StorageContext.StorageContext|null {
|
|
548
548
|
if (!item) {
|
|
549
549
|
return null;
|
|
550
550
|
}
|
|
551
|
-
return new AiAssistanceModel.
|
|
551
|
+
return new AiAssistanceModel.StorageContext.StorageContext(item);
|
|
552
552
|
}
|
|
553
553
|
|
|
554
554
|
/**
|
|
@@ -606,7 +606,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
606
606
|
#selectedRequest: AiAssistanceModel.RequestContext.RequestContext|null = null;
|
|
607
607
|
|
|
608
608
|
#selectedAccessibility: AiAssistanceModel.AccessibilityContext.AccessibilityContext|null = null;
|
|
609
|
-
#selectedStorage: AiAssistanceModel.
|
|
609
|
+
#selectedStorage: AiAssistanceModel.StorageContext.StorageContext|null = null;
|
|
610
610
|
|
|
611
611
|
// Messages displayed in the `ChatView` component.
|
|
612
612
|
|
|
@@ -1640,7 +1640,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
1640
1640
|
|
|
1641
1641
|
} else if (data instanceof AiAssistanceModel.AccessibilityContext.AccessibilityContext) {
|
|
1642
1642
|
this.#selectedAccessibility = data;
|
|
1643
|
-
} else if (data instanceof AiAssistanceModel.
|
|
1643
|
+
} else if (data instanceof AiAssistanceModel.StorageContext.StorageContext) {
|
|
1644
1644
|
this.#selectedStorage = data;
|
|
1645
1645
|
}
|
|
1646
1646
|
|
|
@@ -110,9 +110,8 @@ export class AIv2MarkdownRenderer extends MarkdownView.MarkdownView.MarkdownInsi
|
|
|
110
110
|
return html`${fallbackText}`;
|
|
111
111
|
}
|
|
112
112
|
if (href.startsWith('#file-')) {
|
|
113
|
-
const file = AiAssistanceModel.
|
|
114
|
-
file => AiAssistanceModel.
|
|
115
|
-
Number(href.substring(6)));
|
|
113
|
+
const file = AiAssistanceModel.ListSources.ListSourcesTool.getUISourceCodes().find(
|
|
114
|
+
file => AiAssistanceModel.ListSources.ListSourcesTool.uiSourceCodeId.get(file) === Number(href.substring(6)));
|
|
116
115
|
|
|
117
116
|
if (file) {
|
|
118
117
|
return this.#revealableLink(file, file.name());
|
|
@@ -194,7 +194,7 @@ function getContextRemoveLabel(context: AiAssistanceModel.AiAgent.ConversationCo
|
|
|
194
194
|
if (context instanceof AiAssistanceModel.PerformanceTraceContext.PerformanceTraceContext) {
|
|
195
195
|
return lockedString(UIStringsNotTranslate.removeContextPerfInsight);
|
|
196
196
|
}
|
|
197
|
-
if (context instanceof AiAssistanceModel.
|
|
197
|
+
if (context instanceof AiAssistanceModel.StorageContext.StorageContext) {
|
|
198
198
|
return lockedString(UIStringsNotTranslate.removeContextStorage);
|
|
199
199
|
}
|
|
200
200
|
return lockedString(UIStringsNotTranslate.removeContext);
|
|
@@ -371,7 +371,7 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: ViewOutput, target: HTML
|
|
|
371
371
|
html`<devtools-icon class="icon" name="performance" title="Lighthouse"></devtools-icon>` :
|
|
372
372
|
input.context instanceof AiAssistanceModel.PerformanceTraceContext.PerformanceTraceContext ?
|
|
373
373
|
html`<devtools-icon class="icon" name="performance" title="Performance"></devtools-icon>` :
|
|
374
|
-
input.context instanceof AiAssistanceModel.
|
|
374
|
+
input.context instanceof AiAssistanceModel.StorageContext.StorageContext ?
|
|
375
375
|
html`<devtools-icon class="icon" name="table" title="Storage"></devtools-icon>` :
|
|
376
376
|
Lit.nothing}
|
|
377
377
|
<span
|
|
@@ -15,8 +15,9 @@ import type * as Protocol from '../../../generated/protocol.js';
|
|
|
15
15
|
import type {
|
|
16
16
|
AiWidget, BottomUpTreeAiWidget, ComputedStyleAiWidget, CoreVitalsAiWidget, DomTreeAiWidget, LighthouseReportAiWidget,
|
|
17
17
|
NetworkRequestGeneralHeadersAiWidget, NetworkRequestsListAiWidget, NetworkTrackAiWidget, PerfInsightAiWidget,
|
|
18
|
-
PerformanceTraceAiWidget, SourceCodeAiWidget, SourceFileAiWidget, SourceFilesListAiWidget,
|
|
19
|
-
TimelineEventSummaryAiWidget,
|
|
18
|
+
PerformanceTraceAiWidget, SourceCodeAiWidget, SourceFileAiWidget, SourceFilesListAiWidget, StorageBreakdownAiWidget,
|
|
19
|
+
StylePropertiesAiWidget, TimelineEventSummaryAiWidget,
|
|
20
|
+
TimelineRangeSummaryAiWidget} from '../../../models/ai_assistance/agents/AiAgent.js';
|
|
20
21
|
import * as AiAssistanceModel from '../../../models/ai_assistance/ai_assistance.js';
|
|
21
22
|
import * as ComputedStyle from '../../../models/computed_style/computed_style.js';
|
|
22
23
|
import * as Formatter from '../../../models/formatter/formatter.js';
|
|
@@ -421,6 +422,14 @@ const UIStringsNotTranslate = {
|
|
|
421
422
|
* @description Title for the source files list widget.
|
|
422
423
|
*/
|
|
423
424
|
inspectedFileNames: 'Inspected file names',
|
|
425
|
+
/**
|
|
426
|
+
* @description Title for the storage breakdown widget.
|
|
427
|
+
*/
|
|
428
|
+
storageBreakdown: 'Storage breakdown',
|
|
429
|
+
/**
|
|
430
|
+
* @description Accessible label for the reveal button in the storage breakdown widget.
|
|
431
|
+
*/
|
|
432
|
+
revealStorageBreakdown: 'Reveal storage breakdown in Application panel',
|
|
424
433
|
} as const;
|
|
425
434
|
|
|
426
435
|
/**
|
|
@@ -1006,6 +1015,16 @@ async function resolveNode(backendNodeId: Protocol.DOM.BackendNodeId): Promise<S
|
|
|
1006
1015
|
return resolved;
|
|
1007
1016
|
}
|
|
1008
1017
|
|
|
1018
|
+
async function makeStorageBreakdownWidget(_widgetData: StorageBreakdownAiWidget): Promise<WidgetMakerResponse|null> {
|
|
1019
|
+
return {
|
|
1020
|
+
renderedWidget: html`<div>Storage Breakdown Stub</div>`,
|
|
1021
|
+
title: lockedString(UIStringsNotTranslate.storageBreakdown),
|
|
1022
|
+
revealable: null,
|
|
1023
|
+
accessibleRevealLabel: lockedString(UIStringsNotTranslate.revealStorageBreakdown),
|
|
1024
|
+
jslogContext: 'storage-breakdown-widget',
|
|
1025
|
+
};
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1009
1028
|
async function makeComputedStyleWidget(widgetData: ComputedStyleAiWidget): Promise<WidgetMakerResponse|null> {
|
|
1010
1029
|
const domNodeForId = await resolveNode(widgetData.data.backendNodeId);
|
|
1011
1030
|
if (!domNodeForId) {
|
|
@@ -1678,6 +1697,9 @@ export function getWidgetSignature(widget: AiWidget): string {
|
|
|
1678
1697
|
return `${widget.name}:${widget.data.url}:${widget.data.line ?? ''}:${widget.data.column ?? ''}`;
|
|
1679
1698
|
case 'NETWORK_REQUESTS_LIST':
|
|
1680
1699
|
return `${widget.name}:${widget.data.requests.map(r => r.requestId()).join(',')}`;
|
|
1700
|
+
case 'STORAGE_BREAKDOWN':
|
|
1701
|
+
return `${widget.name}:${widget.data.totalUsageBytes}:${
|
|
1702
|
+
widget.data.usageBreakdown.map(e => `${e.storageType}_${e.bytes}`).join(',')}`;
|
|
1681
1703
|
default:
|
|
1682
1704
|
Platform.assertNever(widget, 'Unknown AiWidget name');
|
|
1683
1705
|
}
|
|
@@ -1785,6 +1807,9 @@ async function renderWidgets(
|
|
|
1785
1807
|
case 'SOURCE_CODE':
|
|
1786
1808
|
response = await makeSourceCodeWidget(widgetData);
|
|
1787
1809
|
break;
|
|
1810
|
+
case 'STORAGE_BREAKDOWN':
|
|
1811
|
+
response = await makeStorageBreakdownWidget(widgetData);
|
|
1812
|
+
break;
|
|
1788
1813
|
default:
|
|
1789
1814
|
Platform.assertNever(widgetData, 'Unknown AiWidget name');
|
|
1790
1815
|
}
|
|
@@ -254,7 +254,6 @@ export interface IndexedDBDataViewInput {
|
|
|
254
254
|
onKeyFilterChange: (value: string) => void;
|
|
255
255
|
onRowSelected: (rowNumber: number) => void;
|
|
256
256
|
deleteEntry: (entry: Entry) => Promise<void>;
|
|
257
|
-
populateContextMenu: (e: CustomEvent<UI.ContextMenu.ContextMenu>, entry: Entry) => void;
|
|
258
257
|
}
|
|
259
258
|
|
|
260
259
|
const renderKeyPathString = (keyPathString: string): LitTemplate => {
|
|
@@ -272,6 +271,21 @@ const renderKeyColumnHeader = (prefix: string, keyPath: string|string[]|null|und
|
|
|
272
271
|
renderKeyPathString(keyPath)})`;
|
|
273
272
|
};
|
|
274
273
|
|
|
274
|
+
const populateContextMenu = (e: CustomEvent<UI.ContextMenu.ContextMenu>): void => {
|
|
275
|
+
const row = e.currentTarget as HTMLElement;
|
|
276
|
+
const widgetElement = row.querySelector('.value-column devtools-widget');
|
|
277
|
+
const widget = widgetElement ? UI.Widget.Widget.get(widgetElement) as ObjectPropertiesSectionWidget : null;
|
|
278
|
+
if (widget?.objectTree) {
|
|
279
|
+
const contextMenu = e.detail;
|
|
280
|
+
contextMenu.revealSection().appendItem(i18nString(UIStrings.expandRecursively), () => {
|
|
281
|
+
void widget.expandRecursively();
|
|
282
|
+
}, {jslogContext: 'expand-recursively'});
|
|
283
|
+
contextMenu.revealSection().appendItem(i18nString(UIStrings.collapse), () => {
|
|
284
|
+
widget.expanded = false;
|
|
285
|
+
}, {jslogContext: 'collapse'});
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
|
|
275
289
|
const renderDataGrid = (input: IndexedDBDataViewInput): LitTemplate => {
|
|
276
290
|
const keyPath = input.isIndex && input.index ? input.index.keyPath : input.objectStore.keyPath;
|
|
277
291
|
// clang-format off
|
|
@@ -284,17 +298,20 @@ const renderDataGrid = (input: IndexedDBDataViewInput): LitTemplate => {
|
|
|
284
298
|
${input.isIndex ? html`<th id="primary-key">${renderKeyColumnHeader(i18nString(UIStrings.primaryKey), input.objectStore.keyPath)}</th>` : nothing}
|
|
285
299
|
<th id="value">${i18nString(UIStrings.valueString)}</th>
|
|
286
300
|
</tr>
|
|
287
|
-
${repeat(input.entries, (_entry, index) => index, (entry, index) =>
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
301
|
+
${repeat(input.entries, (_entry, index) => index, (entry, index) => {
|
|
302
|
+
return html`
|
|
303
|
+
<tr ?selected=${index + input.skipCount === input.selectedRowNumber}
|
|
304
|
+
class="data-grid-data-row"
|
|
305
|
+
@select=${() => input.onRowSelected(index + input.skipCount)}
|
|
306
|
+
@delete=${() => input.deleteEntry(entry)}
|
|
307
|
+
@contextmenu=${populateContextMenu}>
|
|
308
|
+
<td>${index + input.skipCount}</td>
|
|
309
|
+
<td>${widget(ObjectPropertiesSectionWidget, {value: entry.key})}</td>
|
|
310
|
+
${input.isIndex ? html`<td>${widget(ObjectPropertiesSectionWidget, {value: entry.primaryKey})}</td>`
|
|
311
|
+
: nothing}
|
|
312
|
+
<td class="value-column">${widget(ObjectPropertiesSectionWidget, {value: entry.value})}</td>
|
|
313
|
+
</tr>`;
|
|
314
|
+
})}
|
|
298
315
|
</table>`}>
|
|
299
316
|
</devtools-data-grid>`;
|
|
300
317
|
// clang-format on
|
|
@@ -467,31 +484,6 @@ export class IDBDataView extends UI.View.SimpleView {
|
|
|
467
484
|
this.updateData(false);
|
|
468
485
|
}
|
|
469
486
|
|
|
470
|
-
private populateContextMenu(e: CustomEvent<UI.ContextMenu.ContextMenu>, {value}: Entry): void {
|
|
471
|
-
const contextMenu = e.detail;
|
|
472
|
-
if (value && value.hasChildren) {
|
|
473
|
-
const tr = e.currentTarget as HTMLElement;
|
|
474
|
-
const valueTd = tr.querySelector('.value-column');
|
|
475
|
-
if (valueTd) {
|
|
476
|
-
const widgetEl = valueTd.querySelector('devtools-widget');
|
|
477
|
-
if (widgetEl) {
|
|
478
|
-
const widget = UI.Widget.Widget.get(widgetEl);
|
|
479
|
-
if (widget instanceof ObjectPropertiesSectionWidget) {
|
|
480
|
-
const objectUi = widget.objectPropertiesSection;
|
|
481
|
-
if (objectUi) {
|
|
482
|
-
contextMenu.revealSection().appendItem(i18nString(UIStrings.expandRecursively), () => {
|
|
483
|
-
void objectUi.objectTreeElement().expandRecursively();
|
|
484
|
-
}, {jslogContext: 'expand-recursively'});
|
|
485
|
-
contextMenu.revealSection().appendItem(i18nString(UIStrings.collapse), () => {
|
|
486
|
-
objectUi.objectTreeElement().collapse();
|
|
487
|
-
}, {jslogContext: 'collapse'});
|
|
488
|
-
}
|
|
489
|
-
}
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
|
|
495
487
|
refreshData(): void {
|
|
496
488
|
this.updateData(true);
|
|
497
489
|
}
|
|
@@ -683,43 +675,33 @@ export class IDBDataView extends UI.View.SimpleView {
|
|
|
683
675
|
},
|
|
684
676
|
onRowSelected: this.onRowSelected.bind(this),
|
|
685
677
|
deleteEntry: this.deleteEntry.bind(this),
|
|
686
|
-
populateContextMenu: this.populateContextMenu.bind(this),
|
|
687
678
|
},
|
|
688
679
|
undefined, this.element);
|
|
689
680
|
}
|
|
690
681
|
}
|
|
691
682
|
|
|
692
683
|
interface ObjectPropertiesSectionWidgetInput {
|
|
693
|
-
|
|
694
|
-
}
|
|
695
|
-
|
|
696
|
-
interface ObjectPropertiesSectionWidgetOutput {
|
|
697
|
-
objectPropSection: ObjectUI.ObjectPropertiesSection.ObjectPropertiesSection|null;
|
|
684
|
+
objectTree: ObjectUI.ObjectPropertiesSection.ObjectTree|null;
|
|
698
685
|
}
|
|
699
686
|
|
|
700
687
|
type ObjectPropertiesSectionWidgetView = (
|
|
701
688
|
input: ObjectPropertiesSectionWidgetInput,
|
|
702
|
-
output:
|
|
689
|
+
output: void,
|
|
703
690
|
target: HTMLElement,
|
|
704
691
|
) => void;
|
|
705
692
|
|
|
706
693
|
const OBJECT_PROPERTIES_SECTION_WIDGET_DEFAULT_VIEW: ObjectPropertiesSectionWidgetView = (input, output, target) => {
|
|
707
|
-
if (!input.
|
|
708
|
-
output.objectPropSection = null;
|
|
694
|
+
if (!input.objectTree) {
|
|
709
695
|
render(nothing, target);
|
|
710
696
|
return;
|
|
711
697
|
}
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
const element = input.value.hasChildren ? objectPropSection.element : objectPropSection.titleElement;
|
|
717
|
-
render(html`${element}`, target);
|
|
698
|
+
render(ObjectUI.ObjectPropertiesSection.defaultObjectPresentation(input.objectTree, undefined /* linkifier */,
|
|
699
|
+
true /* skipProto */, true /* readOnly */),
|
|
700
|
+
target);
|
|
718
701
|
};
|
|
719
702
|
|
|
720
|
-
class ObjectPropertiesSectionWidget extends UI.Widget.Widget {
|
|
721
|
-
#
|
|
722
|
-
#objectPropSection: ObjectUI.ObjectPropertiesSection.ObjectPropertiesSection|null = null;
|
|
703
|
+
export class ObjectPropertiesSectionWidget extends UI.Widget.Widget {
|
|
704
|
+
#objectTree: ObjectUI.ObjectPropertiesSection.ObjectTree|null = null;
|
|
723
705
|
readonly #view: ObjectPropertiesSectionWidgetView;
|
|
724
706
|
|
|
725
707
|
constructor(element?: HTMLElement, view = OBJECT_PROPERTIES_SECTION_WIDGET_DEFAULT_VIEW) {
|
|
@@ -728,20 +710,40 @@ class ObjectPropertiesSectionWidget extends UI.Widget.Widget {
|
|
|
728
710
|
}
|
|
729
711
|
|
|
730
712
|
set value(value: SDK.RemoteObject.RemoteObject|null) {
|
|
731
|
-
if (
|
|
732
|
-
|
|
713
|
+
if (value) {
|
|
714
|
+
this.#objectTree = new ObjectUI.ObjectPropertiesSection.ObjectTree(value, {
|
|
715
|
+
readOnly: true,
|
|
716
|
+
propertiesMode: ObjectUI.ObjectPropertiesSection.ObjectPropertiesMode.OWN_AND_INTERNAL_AND_INHERITED,
|
|
717
|
+
});
|
|
718
|
+
} else {
|
|
719
|
+
this.#objectTree = null;
|
|
733
720
|
}
|
|
734
|
-
this.#value = value;
|
|
735
721
|
this.requestUpdate();
|
|
736
722
|
}
|
|
737
723
|
|
|
738
|
-
get
|
|
739
|
-
return this.#
|
|
724
|
+
get objectTree(): ObjectUI.ObjectPropertiesSection.ObjectTree|null {
|
|
725
|
+
return this.#objectTree;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
get expanded(): boolean {
|
|
729
|
+
return this.#objectTree?.expanded ?? false;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
set expanded(expanded: boolean) {
|
|
733
|
+
if (this.#objectTree) {
|
|
734
|
+
this.#objectTree.expanded = expanded;
|
|
735
|
+
this.requestUpdate();
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
async expandRecursively(): Promise<void> {
|
|
740
|
+
if (this.#objectTree) {
|
|
741
|
+
await this.#objectTree.expandRecursively(ObjectUI.ObjectPropertiesSection.EXPANDABLE_MAX_DEPTH);
|
|
742
|
+
this.requestUpdate();
|
|
743
|
+
}
|
|
740
744
|
}
|
|
741
745
|
|
|
742
746
|
override performUpdate(): void {
|
|
743
|
-
|
|
744
|
-
this.#view({value: this.#value}, output, this.contentElement);
|
|
745
|
-
this.#objectPropSection = output.objectPropSection;
|
|
747
|
+
this.#view({objectTree: this.#objectTree}, undefined, this.contentElement);
|
|
746
748
|
}
|
|
747
749
|
}
|
|
@@ -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>
|
|
@@ -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;
|
|
@@ -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) {
|