chrome-devtools-frontend 1.0.1669021 → 1.0.1672388
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/fixing-skipped-tests/SKILL.md +6 -6
- package/.agents/skills/gerrit-cli/SKILL.md +4 -10
- package/.agents/skills/gerrit-cli/references/commands.md +45 -2
- package/.agents/skills/gerrit-cli/references/workflows.md +7 -0
- package/.agents/skills/gerrit-cli/scripts/import_upstream.py +34 -152
- package/config/typescript/tsconfig.eslint.json +1 -1
- package/docs/contributing/settings-experiments-features.md +2 -8
- package/docs/ecosystem/automatic_workspace_folders.md +0 -19
- package/eslint.config.mjs +2 -2
- package/front_end/core/common/Lazy.ts +3 -3
- package/front_end/core/common/SettingRegistration.ts +0 -7
- package/front_end/core/common/Settings.ts +0 -38
- package/front_end/core/host/UserMetrics.ts +187 -953
- package/front_end/core/host/UserMetricsEnums.d.ts +949 -0
- package/front_end/core/root/Runtime.ts +21 -133
- package/front_end/core/sdk/CSSMetadata.ts +70 -65
- package/front_end/core/sdk/CategorizedBreakpoint.ts +0 -1
- package/front_end/core/sdk/ChildTargetManager.ts +0 -2
- package/front_end/core/sdk/EmulationModel.ts +0 -2
- package/front_end/core/sdk/EventBreakpointsModel.ts +0 -4
- package/front_end/core/sdk/NetworkManager.ts +0 -3
- package/front_end/core/sdk/PageResourceLoader.ts +9 -9
- package/front_end/core/sdk/RehydratingConnection.ts +52 -4
- package/front_end/core/sdk/Target.ts +0 -4
- package/front_end/devtools_compatibility.js +886 -0
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +7 -6
- package/front_end/entrypoints/main/ExecutionContextSelector.ts +0 -1
- package/front_end/entrypoints/main/MainImpl.ts +18 -22
- package/front_end/foundation/Universe.ts +7 -2
- package/front_end/generated/InspectorBackendCommands.ts +3 -10
- package/front_end/generated/protocol-mapping.d.ts +0 -42
- package/front_end/generated/protocol-proxy-api.d.ts +0 -38
- package/front_end/generated/protocol.ts +9 -169
- package/front_end/models/ai_assistance/AiAgent2.ts +11 -3
- package/front_end/models/ai_assistance/AiConversation.ts +1 -0
- package/front_end/models/ai_assistance/AiHistoryStorage.ts +8 -5
- package/front_end/models/ai_assistance/AiSetting.ts +108 -0
- package/front_end/models/ai_assistance/AiUtils.ts +47 -0
- package/front_end/models/ai_assistance/ChangeManager.ts +1 -0
- package/front_end/models/ai_assistance/ExtensionScope.ts +3 -12
- package/front_end/models/ai_assistance/agents/AiAgent.ts +11 -18
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +3 -0
- package/front_end/models/ai_assistance/agents/ExecuteJavascript.ts +42 -17
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +3 -2
- package/front_end/models/ai_assistance/agents/StorageAgent.ts +253 -155
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +2 -2
- package/front_end/models/ai_assistance/ai_assistance.ts +4 -0
- package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +12 -6
- package/front_end/models/ai_assistance/data_formatters/FileFormatter.ts +3 -1
- package/front_end/models/ai_assistance/data_formatters/NetworkRequestFormatter.ts +1 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +1 -0
- package/front_end/models/ai_assistance/injected.ts +1 -0
- package/front_end/models/ai_assistance/performance/AICallTree.ts +1 -0
- package/front_end/models/ai_assistance/skills/Skill.ts +1 -1
- package/front_end/models/ai_assistance/skills/SkillRegistry.ts +2 -0
- package/front_end/models/ai_assistance/skills/performance.md +10 -0
- package/front_end/models/ai_assistance/tools/ExecuteJavaScript.ts +52 -5
- package/front_end/models/ai_assistance/tools/GetElementAccessibilityDetails.ts +4 -4
- package/front_end/models/ai_assistance/tools/GetLighthouseAudits.ts +4 -4
- package/front_end/models/ai_assistance/tools/GetNetworkRequestDetails.ts +5 -4
- package/front_end/models/ai_assistance/tools/GetStyles.ts +5 -4
- package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +5 -4
- package/front_end/models/ai_assistance/tools/README.md +1 -1
- package/front_end/models/ai_assistance/tools/RecordPerformanceTrace.ts +63 -0
- package/front_end/models/ai_assistance/tools/ResolveDevtoolsNodePath.ts +5 -5
- package/front_end/models/ai_assistance/tools/Tool.ts +118 -24
- package/front_end/models/ai_assistance/tools/ToolRegistry.ts +2 -0
- package/front_end/models/badges/UserBadges.ts +2 -0
- package/front_end/models/bindings/NetworkProject.ts +5 -0
- package/front_end/models/bindings/ResourceScriptMapping.ts +2 -0
- package/front_end/models/bindings/ResourceUtils.ts +3 -0
- package/front_end/models/crux-manager/CrUXManager.ts +1 -0
- package/front_end/models/emulation/DeviceModeModel.ts +140 -7
- package/front_end/models/emulation/EmulatedDevices.ts +246 -793
- package/front_end/models/issues_manager/IssuesManager.ts +10 -2
- package/front_end/models/live-metrics/LiveMetrics.ts +41 -9
- package/front_end/models/logs/LogManager.ts +8 -5
- package/front_end/models/logs/NetworkLog.ts +1 -0
- package/front_end/models/persistence/IsolatedFileSystemManager.ts +21 -3
- package/front_end/models/persistence/NetworkPersistenceManager.ts +6 -0
- package/front_end/models/project_settings/ProjectSettingsModel.ts +8 -12
- package/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +3 -1
- package/front_end/models/workspace/IgnoreListManager.ts +2 -0
- package/front_end/models/workspace/UISourceCode.ts +2 -0
- package/front_end/models/workspace_diff/WorkspaceDiff.ts +4 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +22 -22
- package/front_end/panels/ai_assistance/ai_assistance-meta.ts +0 -7
- package/front_end/panels/ai_assistance/components/ChatInput.ts +4 -0
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +79 -34
- package/front_end/panels/ai_assistance/components/WalkthroughView.ts +1 -2
- package/front_end/panels/ai_assistance/components/walkthroughView.css +1 -1
- package/front_end/panels/application/ApplicationPanelSidebar.ts +9 -106
- package/front_end/panels/application/ApplicationPanelTreeElement.ts +1 -1
- package/front_end/panels/application/application.ts +0 -10
- package/front_end/panels/application/components/components.ts +0 -4
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +0 -5
- package/front_end/panels/browser_debugger/EventListenerBreakpointsSidebarPane.ts +6 -12
- package/front_end/panels/browser_debugger/browser_debugger-meta.ts +5 -3
- package/front_end/panels/console/ConsoleFormat.ts +2 -62
- package/front_end/panels/console/ConsoleViewMessage.ts +14 -7
- package/front_end/panels/emulation/AdvancedApp.ts +1 -2
- package/front_end/panels/emulation/DeviceModeToolbar.ts +83 -69
- package/front_end/panels/emulation/DeviceModeView.ts +4 -134
- package/front_end/panels/emulation/DeviceModeWrapper.ts +52 -69
- package/front_end/panels/emulation/MediaQueryInspector.ts +2 -2
- package/front_end/panels/emulation/emulation-meta.ts +12 -12
- package/front_end/panels/issues/IssuesPane.ts +3 -1
- package/front_end/panels/lighthouse/LighthouseController.ts +6 -0
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +17 -21
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryNavigator.ts +206 -126
- package/front_end/panels/linear_memory_inspector/components/linearMemoryInspector.css +1 -1
- package/front_end/panels/mobile_throttling/CalibrationController.ts +1 -1
- package/front_end/panels/mobile_throttling/MobileThrottlingSelector.ts +3 -3
- package/front_end/panels/mobile_throttling/NetworkPanelIndicator.ts +6 -6
- package/front_end/panels/mobile_throttling/NetworkThrottlingSelector.ts +11 -11
- package/front_end/panels/mobile_throttling/ThrottlingManager.ts +13 -13
- package/front_end/panels/mobile_throttling/ThrottlingPresets.ts +10 -10
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +28 -28
- package/front_end/panels/mobile_throttling/mobile_throttling-meta.ts +6 -6
- package/front_end/panels/network/RequestHeadersView.ts +1 -1
- package/front_end/panels/network/ResourceChunkView.ts +243 -144
- package/front_end/panels/network/ResourceDirectSocketChunkView.ts +52 -29
- package/front_end/panels/network/ResourceWebSocketFrameView.ts +21 -35
- package/front_end/panels/network/resourceChunkView.css +41 -36
- package/front_end/panels/profiler/HeapDetachedElementsDataGrid.ts +21 -12
- package/front_end/panels/profiler/profiler.ts +4 -0
- package/front_end/panels/recorder/RecorderPanel.ts +6 -14
- package/front_end/panels/sensors/LocationsSettingsTab.ts +7 -7
- package/front_end/panels/settings/AISettingsTab.ts +75 -31
- package/front_end/panels/settings/SettingsScreen.ts +8 -13
- package/front_end/panels/settings/components/SyncSection.ts +3 -4
- package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +200 -18
- package/front_end/panels/settings/emulation/devicesSettingsTab.css +18 -0
- package/front_end/panels/settings/settings-meta.ts +0 -1
- package/front_end/panels/sources/CategorizedBreakpointL10n.ts +0 -2
- package/front_end/panels/sources/DebuggerPausedMessage.ts +11 -5
- package/front_end/panels/sources/DebuggerPlugin.ts +1 -1
- package/front_end/panels/sources/EditingLocationHistoryManager.ts +12 -9
- package/front_end/panels/sources/SourcesPanel.ts +19 -17
- package/front_end/panels/sources/SourcesView.ts +191 -96
- package/front_end/panels/sources/TabbedEditorContainer.ts +3 -4
- package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +2 -5
- package/front_end/panels/timeline/TimelineUIUtils.ts +15 -0
- package/front_end/panels/timeline/timeline-meta.ts +3 -5
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/codemirror.next/chunk/angular.js +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/chunk/cpp.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/cpp.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/java.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/java.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/legacy.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/less.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/less.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/markdown.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/markdown.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/php.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/php.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/python.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/python.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/sass.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/sass.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/svelte.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/svelte.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/vue.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/wast.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/wast.js.map +1 -1
- package/front_end/third_party/codemirror.next/chunk/xml.js +1 -1
- package/front_end/third_party/codemirror.next/chunk/xml.js.map +1 -1
- package/front_end/third_party/codemirror.next/codemirror.next.d.ts +1332 -193
- package/front_end/third_party/codemirror.next/codemirror.next.js +1 -1
- package/front_end/third_party/codemirror.next/rebuild.sh +1 -1
- package/front_end/tsconfig.compatibility.json +2 -1
- package/front_end/tsconfig.json +1 -1
- package/front_end/ui/components/icon_button/IconButton.ts +1 -1
- package/front_end/ui/components/issue_counter/IssueCounter.ts +1 -1
- package/front_end/ui/components/settings/SettingCheckbox.ts +4 -7
- package/front_end/ui/components/settings/settings.ts +1 -2
- package/front_end/ui/legacy/Treeoutline.ts +52 -30
- package/front_end/ui/legacy/components/object_ui/CSSStyleSanitizer.ts +74 -0
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +6 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +47 -54
- package/front_end/ui/legacy/components/object_ui/object_ui.ts +2 -0
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +5 -27
- package/front_end/ui/legacy/components/settings_ui/SettingsUI.ts +10 -12
- package/front_end/ui/settings/SettingUIRegistration.ts +0 -8
- package/front_end/ui/visual_logging/KnownContextValues.ts +21 -0
- package/inspector_overlay/tsconfig.json +8 -2
- package/package.json +3 -2
- package/.agents/skills/gerrit-cli/scripts/gerrit_client_wrapper.py +0 -47
- package/front_end/core/sdk/CSSModel.test.api.ts +0 -102
- package/front_end/core/sdk/DOMModel.test.api.ts +0 -104
- package/front_end/foundation/Universe.test.api.ts +0 -73
- package/front_end/panels/application/SharedStorageEventsView.ts +0 -128
- package/front_end/panels/application/SharedStorageItemsView.ts +0 -179
- package/front_end/panels/application/SharedStorageListTreeElement.ts +0 -65
- package/front_end/panels/application/SharedStorageModel.ts +0 -249
- package/front_end/panels/application/SharedStorageTreeElement.ts +0 -40
- package/front_end/panels/application/components/SharedStorageAccessGrid.ts +0 -191
- package/front_end/panels/application/components/SharedStorageMetadataView.ts +0 -133
- package/front_end/panels/application/components/sharedStorageAccessGrid.css +0 -29
- package/front_end/panels/application/components/sharedStorageMetadataView.css +0 -29
- package/front_end/panels/application/sharedStorageEventsView.css +0 -9
- package/front_end/panels/network/OriginalResourceChunkView.ts +0 -340
- package/front_end/panels/network/originalResourceChunkView.css +0 -49
- package/front_end/ui/components/settings/SettingDeprecationWarning.ts +0 -47
- package/front_end/ui/components/settings/settingDeprecationWarning.css +0 -14
|
@@ -423,23 +423,65 @@ const UIStringsNotTranslate = {
|
|
|
423
423
|
inspectedFileNames: 'Inspected file names',
|
|
424
424
|
} as const;
|
|
425
425
|
|
|
426
|
+
/**
|
|
427
|
+
* Payload and confirmation handler for side-effect operations requiring user approval.
|
|
428
|
+
*/
|
|
429
|
+
export interface ConfirmSideEffectDialog {
|
|
430
|
+
/**
|
|
431
|
+
* Human-readable description explaining the pending side-effect action, or null if omitted.
|
|
432
|
+
*/
|
|
433
|
+
description: string|null;
|
|
434
|
+
/**
|
|
435
|
+
* Callback invoked when the user resolves the dialog (true to confirm, false to decline).
|
|
436
|
+
*/
|
|
437
|
+
onAnswer: (result: boolean) => void;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* Represents the execution state of an individual agent action step:
|
|
442
|
+
* - `in_progress`: The step is actively querying context or parsing stream content.
|
|
443
|
+
* - `needs_approval`: The step is awaiting user confirmation for a side-effecting operation.
|
|
444
|
+
* - `canceled`: The step was canceled before execution.
|
|
445
|
+
* - `completed`: The step completed execution successfully.
|
|
446
|
+
*/
|
|
447
|
+
export type StepState = {
|
|
448
|
+
type: 'in_progress',
|
|
449
|
+
}|{type: 'needs_approval', sideEffectDialog: ConfirmSideEffectDialog}|{type: 'canceled'}|{type: 'completed'};
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* Represents an individual execution step within an agent response.
|
|
453
|
+
*/
|
|
426
454
|
export interface Step {
|
|
427
|
-
|
|
455
|
+
/**
|
|
456
|
+
* The current lifecycle state of this step.
|
|
457
|
+
*/
|
|
458
|
+
state: StepState;
|
|
459
|
+
/**
|
|
460
|
+
* The agent's intermediate thought or rationale for taking this step.
|
|
461
|
+
*/
|
|
428
462
|
thought?: string;
|
|
463
|
+
/**
|
|
464
|
+
* The human-readable title describing the step action.
|
|
465
|
+
*/
|
|
429
466
|
title?: string;
|
|
467
|
+
/**
|
|
468
|
+
* Executable JavaScript code generated or executed in this step.
|
|
469
|
+
*/
|
|
430
470
|
code?: string;
|
|
471
|
+
/**
|
|
472
|
+
* Raw string output or data returned by code execution.
|
|
473
|
+
*/
|
|
431
474
|
output?: string;
|
|
475
|
+
/**
|
|
476
|
+
* Visual widgets rendered alongside this step (e.g. core web vitals, network traces).
|
|
477
|
+
*/
|
|
432
478
|
widgets?: AiWidget[];
|
|
433
|
-
|
|
434
|
-
|
|
479
|
+
/**
|
|
480
|
+
* Context item details gathered or inspected during this step.
|
|
481
|
+
*/
|
|
435
482
|
contextDetails?: [AiAssistanceModel.AiAgent.ContextDetail, ...AiAssistanceModel.AiAgent.ContextDetail[]];
|
|
436
483
|
}
|
|
437
484
|
|
|
438
|
-
export interface ConfirmSideEffectDialog {
|
|
439
|
-
description: string|null;
|
|
440
|
-
onAnswer: (result: boolean) => void;
|
|
441
|
-
}
|
|
442
|
-
|
|
443
485
|
export const enum ChatMessageEntity {
|
|
444
486
|
MODEL = 'model',
|
|
445
487
|
USER = 'user',
|
|
@@ -651,7 +693,7 @@ export function titleForStep(step: Step): string {
|
|
|
651
693
|
}
|
|
652
694
|
|
|
653
695
|
function renderTitle(step: Step): Lit.LitTemplate {
|
|
654
|
-
const paused = step.
|
|
696
|
+
const paused = step.state.type === 'needs_approval' ?
|
|
655
697
|
html`<span class="paused">${lockedString(UIStringsNotTranslate.paused)}: </span>` :
|
|
656
698
|
Lit.nothing;
|
|
657
699
|
|
|
@@ -665,8 +707,9 @@ function renderStepCode(step: Step): Lit.LitTemplate {
|
|
|
665
707
|
|
|
666
708
|
// If there is no "output" yet, it means we didn't execute the code yet (e.g. maybe it is still waiting for confirmation from the user)
|
|
667
709
|
// thus we show "Code to execute" text rather than "Code executed" text on the heading of the code block.
|
|
668
|
-
const codeHeadingText = (step.output &&
|
|
669
|
-
|
|
710
|
+
const codeHeadingText = (step.output && step.state.type !== 'canceled') ?
|
|
711
|
+
lockedString(UIStringsNotTranslate.codeExecuted) :
|
|
712
|
+
lockedString(UIStringsNotTranslate.codeToExecute);
|
|
670
713
|
|
|
671
714
|
// If there is output, we don't show notice on this code block and instead show
|
|
672
715
|
// it in the data returned code block.
|
|
@@ -705,7 +748,8 @@ function renderStepDetails({
|
|
|
705
748
|
markdownRenderer: MarkdownLitRenderer,
|
|
706
749
|
isLast: boolean,
|
|
707
750
|
}): Lit.LitTemplate {
|
|
708
|
-
const sideEffects =
|
|
751
|
+
const sideEffects =
|
|
752
|
+
isLast && step.state.type === 'needs_approval' ? renderSideEffectConfirmationUi(step) : Lit.nothing;
|
|
709
753
|
const thought = step.thought ? html`<p>${renderTextAsMarkdown(step.thought, markdownRenderer)}</p>` : Lit.nothing;
|
|
710
754
|
|
|
711
755
|
// clang-format off
|
|
@@ -781,12 +825,12 @@ function renderWalkthroughSidebarButton(
|
|
|
781
825
|
<devtools-button
|
|
782
826
|
.variant=${variant}
|
|
783
827
|
.size=${Buttons.Button.Size.SMALL}
|
|
784
|
-
.title=${lastStep.
|
|
828
|
+
.title=${lastStep.state.type === 'in_progress' ? titleForStep(lastStep) : title}
|
|
785
829
|
.accessibleLabel=${accessibleLabel}
|
|
786
830
|
.jslogContext=${walkthrough.isExpanded ? 'ai-hide-walkthrough-sidebar' : 'ai-show-walkthrough-sidebar'}
|
|
787
831
|
data-show-walkthrough
|
|
788
832
|
@click=${() => {
|
|
789
|
-
if(walkthrough.activeSidebarMessage?.id === input.message.id && walkthrough.isExpanded) {
|
|
833
|
+
if (walkthrough.activeSidebarMessage?.id === input.message.id && walkthrough.isExpanded) {
|
|
790
834
|
walkthrough.onToggle(false, message as ModelChatMessage);
|
|
791
835
|
} else {
|
|
792
836
|
// Can't just toggle the visibility here; we need to ensure we
|
|
@@ -848,7 +892,7 @@ function renderWalkthroughUI(input: ChatMessageViewInput, steps: Step[]): Lit.Li
|
|
|
848
892
|
}
|
|
849
893
|
|
|
850
894
|
function renderSideEffectStepsUI(input: ChatMessageViewInput, steps: Step[]): Lit.LitTemplate {
|
|
851
|
-
const sideEffectSteps = steps.filter(s => s.
|
|
895
|
+
const sideEffectSteps = steps.filter(s => s.state.type === 'needs_approval' || s.state.type === 'canceled');
|
|
852
896
|
if (sideEffectSteps.length === 0) {
|
|
853
897
|
return Lit.nothing;
|
|
854
898
|
}
|
|
@@ -858,7 +902,6 @@ function renderSideEffectStepsUI(input: ChatMessageViewInput, steps: Step[]): Li
|
|
|
858
902
|
<div class="side-effect-container">
|
|
859
903
|
${renderStep({
|
|
860
904
|
step,
|
|
861
|
-
isLoading: input.isLoading,
|
|
862
905
|
markdownRenderer: input.markdownRenderer,
|
|
863
906
|
isLast: true,
|
|
864
907
|
})}
|
|
@@ -867,25 +910,27 @@ function renderSideEffectStepsUI(input: ChatMessageViewInput, steps: Step[]): Li
|
|
|
867
910
|
// clang-format on
|
|
868
911
|
}
|
|
869
912
|
|
|
870
|
-
function renderStepBadge({step,
|
|
913
|
+
function renderStepBadge({step, isLast}: {
|
|
871
914
|
step: Step,
|
|
872
|
-
isLoading: boolean,
|
|
873
915
|
isLast: boolean,
|
|
874
916
|
}): Lit.LitTemplate {
|
|
875
|
-
if (
|
|
917
|
+
if (isLast && step.state.type === 'in_progress') {
|
|
876
918
|
return html`<devtools-spinner aria-label=${lockedString(UIStringsNotTranslate.inProgress)}></devtools-spinner>`;
|
|
877
919
|
}
|
|
878
920
|
|
|
879
921
|
let iconName = 'checkmark';
|
|
880
922
|
let ariaLabel: string|undefined = lockedString(UIStringsNotTranslate.completed);
|
|
881
923
|
let role: 'button'|undefined = 'button';
|
|
882
|
-
if (step.
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
924
|
+
if (step.state.type === 'needs_approval') {
|
|
925
|
+
if (!isLast) {
|
|
926
|
+
console.error('A step in needs_approval state must be the last step.');
|
|
927
|
+
}
|
|
886
928
|
role = undefined;
|
|
887
929
|
ariaLabel = lockedString(UIStringsNotTranslate.paused);
|
|
888
930
|
iconName = 'pause-circle';
|
|
931
|
+
} else if (step.state.type === 'canceled') {
|
|
932
|
+
ariaLabel = lockedString(UIStringsNotTranslate.aborted);
|
|
933
|
+
iconName = 'cross';
|
|
889
934
|
}
|
|
890
935
|
|
|
891
936
|
return html`<devtools-icon
|
|
@@ -896,26 +941,25 @@ function renderStepBadge({step, isLoading, isLast}: {
|
|
|
896
941
|
></devtools-icon>`;
|
|
897
942
|
}
|
|
898
943
|
|
|
899
|
-
export function renderStep({step,
|
|
944
|
+
export function renderStep({step, markdownRenderer, isLast}: {
|
|
900
945
|
step: Step,
|
|
901
|
-
isLoading: boolean,
|
|
902
946
|
markdownRenderer: MarkdownLitRenderer,
|
|
903
947
|
isLast: boolean,
|
|
904
948
|
}): Lit.LitTemplate {
|
|
905
949
|
const stepClasses = Lit.Directives.classMap({
|
|
906
950
|
step: true,
|
|
907
|
-
empty: !step.thought && !step.code && !step.contextDetails &&
|
|
908
|
-
paused:
|
|
909
|
-
canceled:
|
|
951
|
+
empty: !step.thought && !step.code && !step.contextDetails && step.state.type !== 'needs_approval',
|
|
952
|
+
paused: step.state.type === 'needs_approval',
|
|
953
|
+
canceled: step.state.type === 'canceled',
|
|
910
954
|
});
|
|
911
955
|
// clang-format off
|
|
912
956
|
return html`
|
|
913
957
|
<details class=${stepClasses}
|
|
914
958
|
jslog=${VisualLogging.expand('step').track({click: true})}
|
|
915
|
-
.open=${
|
|
959
|
+
.open=${step.state.type === 'needs_approval'}>
|
|
916
960
|
<summary>
|
|
917
961
|
<div class="summary">
|
|
918
|
-
${renderStepBadge({ step,
|
|
962
|
+
${renderStepBadge({ step, isLast })}
|
|
919
963
|
${renderTitle(step)}
|
|
920
964
|
<devtools-icon
|
|
921
965
|
class="arrow"
|
|
@@ -1755,16 +1799,17 @@ async function renderWidgets(
|
|
|
1755
1799
|
}
|
|
1756
1800
|
|
|
1757
1801
|
function renderSideEffectConfirmationUi(step: Step): Lit.LitTemplate {
|
|
1758
|
-
if (
|
|
1802
|
+
if (step.state.type !== 'needs_approval') {
|
|
1759
1803
|
return Lit.nothing;
|
|
1760
1804
|
}
|
|
1805
|
+
const dialog = step.state.sideEffectDialog;
|
|
1761
1806
|
|
|
1762
1807
|
// clang-format off
|
|
1763
1808
|
return html`<div
|
|
1764
1809
|
class="side-effect-confirmation"
|
|
1765
1810
|
jslog=${VisualLogging.section('side-effect-confirmation')}
|
|
1766
1811
|
>
|
|
1767
|
-
${
|
|
1812
|
+
${dialog.description ? html`<p>${dialog.description}</p>` : Lit.nothing}
|
|
1768
1813
|
<div class="side-effect-buttons-container">
|
|
1769
1814
|
<devtools-button
|
|
1770
1815
|
.data=${
|
|
@@ -1773,7 +1818,7 @@ function renderSideEffectConfirmationUi(step: Step): Lit.LitTemplate {
|
|
|
1773
1818
|
jslogContext: 'decline-execute-code',
|
|
1774
1819
|
} as Buttons.Button.ButtonData
|
|
1775
1820
|
}
|
|
1776
|
-
@click=${() =>
|
|
1821
|
+
@click=${() => dialog.onAnswer(false)}
|
|
1777
1822
|
>${lockedString(
|
|
1778
1823
|
UIStringsNotTranslate.declineActionRequestApproval,
|
|
1779
1824
|
)}</devtools-button>
|
|
@@ -1785,7 +1830,7 @@ function renderSideEffectConfirmationUi(step: Step): Lit.LitTemplate {
|
|
|
1785
1830
|
iconName: 'play',
|
|
1786
1831
|
} as Buttons.Button.ButtonData
|
|
1787
1832
|
}
|
|
1788
|
-
@click=${() =>
|
|
1833
|
+
@click=${() => dialog.onAnswer(true)}
|
|
1789
1834
|
>${
|
|
1790
1835
|
lockedString(UIStringsNotTranslate.confirmActionRequestApproval)
|
|
1791
1836
|
}</devtools-button>
|
|
@@ -206,7 +206,7 @@ export const DEFAULT_VIEW = (
|
|
|
206
206
|
// Ensure that we render steps but not ones that need approval; a
|
|
207
207
|
// step that needs approval is always rendered into the main chat
|
|
208
208
|
// view regardless of if the walkthrough is open or not.
|
|
209
|
-
const renderableSteps = allSteps.filter(s =>
|
|
209
|
+
const renderableSteps = allSteps.filter(s => s.state.type !== 'needs_approval');
|
|
210
210
|
|
|
211
211
|
// clang-format off
|
|
212
212
|
const stepsOutput = renderableSteps.length > 0 ? html`
|
|
@@ -222,7 +222,6 @@ export const DEFAULT_VIEW = (
|
|
|
222
222
|
<div class="step-wrapper">
|
|
223
223
|
${renderStep({
|
|
224
224
|
step,
|
|
225
|
-
isLoading: input.isLoading,
|
|
226
225
|
markdownRenderer: input.markdownRenderer,
|
|
227
226
|
isLast: index === renderableSteps.length - 1,
|
|
228
227
|
})}
|
|
@@ -80,13 +80,6 @@ import type {ResourcesPanel} from './ResourcesPanel.js';
|
|
|
80
80
|
import resourcesSidebarStyles from './resourcesSidebar.css.js';
|
|
81
81
|
import {ServiceWorkerCacheTreeElement} from './ServiceWorkerCacheTreeElement.js';
|
|
82
82
|
import {ServiceWorkersView} from './ServiceWorkersView.js';
|
|
83
|
-
import {SharedStorageListTreeElement} from './SharedStorageListTreeElement.js';
|
|
84
|
-
import {
|
|
85
|
-
Events as SharedStorageModelEvents,
|
|
86
|
-
type SharedStorageForOrigin,
|
|
87
|
-
SharedStorageModel,
|
|
88
|
-
} from './SharedStorageModel.js';
|
|
89
|
-
import {SharedStorageTreeElement} from './SharedStorageTreeElement.js';
|
|
90
83
|
import {StorageBucketsTreeParentElement} from './StorageBucketsTreeElement.js';
|
|
91
84
|
import {StorageView} from './StorageView.js';
|
|
92
85
|
import {TrustTokensTreeElement} from './TrustTokensTreeElement.js';
|
|
@@ -322,20 +315,6 @@ function nameForExtensionStorageArea(storageArea: Protocol.Extensions.StorageAre
|
|
|
322
315
|
}
|
|
323
316
|
}
|
|
324
317
|
|
|
325
|
-
export namespace SharedStorageTreeElementDispatcher {
|
|
326
|
-
export const enum Events {
|
|
327
|
-
SHARED_STORAGE_TREE_ELEMENT_ADDED = 'SharedStorageTreeElementAdded',
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
export interface SharedStorageTreeElementAddedEvent {
|
|
331
|
-
origin: string;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
export interface EventTypes {
|
|
335
|
-
[Events.SHARED_STORAGE_TREE_ELEMENT_ADDED]: SharedStorageTreeElementAddedEvent;
|
|
336
|
-
}
|
|
337
|
-
}
|
|
338
|
-
|
|
339
318
|
export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.TargetManager.Observer {
|
|
340
319
|
panel: ResourcesPanel;
|
|
341
320
|
private readonly sidebarTree: UI.TreeOutline.TreeOutlineInShadow;
|
|
@@ -348,7 +327,6 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
|
|
|
348
327
|
cookieListTreeElement: ExpandableApplicationPanelTreeElement;
|
|
349
328
|
trustTokensTreeElement: TrustTokensTreeElement;
|
|
350
329
|
cacheStorageListTreeElement: ServiceWorkerCacheTreeElement;
|
|
351
|
-
sharedStorageListTreeElement: SharedStorageListTreeElement;
|
|
352
330
|
storageBucketsTreeElement: StorageBucketsTreeParentElement|undefined;
|
|
353
331
|
private backForwardCacheListTreeElement?: BackForwardCacheTreeElement;
|
|
354
332
|
backgroundFetchTreeElement: BackgroundServiceTreeElement;
|
|
@@ -369,13 +347,10 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
|
|
|
369
347
|
private extensionIdToStorageTreeParentElement: Map<string, ExtensionStorageTreeParentElement>;
|
|
370
348
|
private extensionStorageModels: ExtensionStorageModel[];
|
|
371
349
|
private extensionStorageTreeElements: Map<string, ExtensionStorageTreeElement>;
|
|
372
|
-
private sharedStorageTreeElements: Map<string, SharedStorageTreeElement>;
|
|
373
350
|
private domains: Record<string, boolean>;
|
|
374
351
|
// Holds main frame target.
|
|
375
352
|
private target?: SDK.Target.Target;
|
|
376
353
|
private previousHoveredElement?: FrameTreeElement;
|
|
377
|
-
readonly sharedStorageTreeElementDispatcher:
|
|
378
|
-
Common.ObjectWrapper.ObjectWrapper<SharedStorageTreeElementDispatcher.EventTypes>;
|
|
379
354
|
|
|
380
355
|
constructor(panel: ResourcesPanel) {
|
|
381
356
|
super();
|
|
@@ -481,9 +456,6 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
|
|
|
481
456
|
this.trustTokensTreeElement = new TrustTokensTreeElement(panel);
|
|
482
457
|
storageTreeElement.appendChild(this.trustTokensTreeElement);
|
|
483
458
|
|
|
484
|
-
this.sharedStorageListTreeElement = new SharedStorageListTreeElement(panel);
|
|
485
|
-
storageTreeElement.appendChild(this.sharedStorageListTreeElement);
|
|
486
|
-
|
|
487
459
|
this.cacheStorageListTreeElement = new ServiceWorkerCacheTreeElement(panel);
|
|
488
460
|
storageTreeElement.appendChild(this.cacheStorageListTreeElement);
|
|
489
461
|
|
|
@@ -540,7 +512,6 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
|
|
|
540
512
|
this.extensionIdToStorageTreeParentElement = new Map();
|
|
541
513
|
this.extensionStorageTreeElements = new Map();
|
|
542
514
|
this.extensionStorageModels = [];
|
|
543
|
-
this.sharedStorageTreeElements = new Map();
|
|
544
515
|
this.domains = {};
|
|
545
516
|
|
|
546
517
|
this.sidebarTree.contentElement.addEventListener('mousemove', this.onmousemove.bind(this), false);
|
|
@@ -576,24 +547,12 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
|
|
|
576
547
|
modelRemoved: (model: IndexedDBModel) => this.indexedDBModelRemoved(model),
|
|
577
548
|
},
|
|
578
549
|
{scoped: true});
|
|
579
|
-
SDK.TargetManager.TargetManager.instance().observeModels(
|
|
580
|
-
SharedStorageModel, {
|
|
581
|
-
modelAdded: (model: SharedStorageModel) => this.sharedStorageModelAdded(model).catch(err => {
|
|
582
|
-
console.error(err);
|
|
583
|
-
}),
|
|
584
|
-
modelRemoved: (model: SharedStorageModel) => this.sharedStorageModelRemoved(model),
|
|
585
|
-
},
|
|
586
|
-
{scoped: true});
|
|
587
550
|
SDK.TargetManager.TargetManager.instance().observeModels(
|
|
588
551
|
SDK.StorageBucketsModel.StorageBucketsModel, {
|
|
589
552
|
modelAdded: (model: SDK.StorageBucketsModel.StorageBucketsModel) => this.storageBucketsModelAdded(model),
|
|
590
553
|
modelRemoved: (model: SDK.StorageBucketsModel.StorageBucketsModel) => this.storageBucketsModelRemoved(model),
|
|
591
554
|
},
|
|
592
555
|
{scoped: true});
|
|
593
|
-
|
|
594
|
-
this.sharedStorageTreeElementDispatcher =
|
|
595
|
-
new Common.ObjectWrapper.ObjectWrapper<SharedStorageTreeElementDispatcher.EventTypes>();
|
|
596
|
-
|
|
597
556
|
this.contentElement.style.contain = 'layout style';
|
|
598
557
|
}
|
|
599
558
|
|
|
@@ -708,27 +667,6 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
|
|
|
708
667
|
private indexedDBModelRemoved(model: IndexedDBModel): void {
|
|
709
668
|
this.indexedDBListTreeElement.removeIndexedDBForModel(model);
|
|
710
669
|
}
|
|
711
|
-
|
|
712
|
-
private async sharedStorageModelAdded(model: SharedStorageModel): Promise<void> {
|
|
713
|
-
await model.enable();
|
|
714
|
-
for (const storage of model.storages()) {
|
|
715
|
-
await this.addSharedStorage(storage);
|
|
716
|
-
}
|
|
717
|
-
model.addEventListener(SharedStorageModelEvents.SHARED_STORAGE_ADDED, this.sharedStorageAdded, this);
|
|
718
|
-
model.addEventListener(SharedStorageModelEvents.SHARED_STORAGE_REMOVED, this.sharedStorageRemoved, this);
|
|
719
|
-
model.addEventListener(SharedStorageModelEvents.SHARED_STORAGE_ACCESS, this.sharedStorageAccess, this);
|
|
720
|
-
}
|
|
721
|
-
|
|
722
|
-
private sharedStorageModelRemoved(model: SharedStorageModel): void {
|
|
723
|
-
model.disable();
|
|
724
|
-
for (const storage of model.storages()) {
|
|
725
|
-
this.removeSharedStorage(storage);
|
|
726
|
-
}
|
|
727
|
-
model.removeEventListener(SharedStorageModelEvents.SHARED_STORAGE_ADDED, this.sharedStorageAdded, this);
|
|
728
|
-
model.removeEventListener(SharedStorageModelEvents.SHARED_STORAGE_REMOVED, this.sharedStorageRemoved, this);
|
|
729
|
-
model.removeEventListener(SharedStorageModelEvents.SHARED_STORAGE_ACCESS, this.sharedStorageAccess, this);
|
|
730
|
-
}
|
|
731
|
-
|
|
732
670
|
private storageBucketsModelAdded(model: SDK.StorageBucketsModel.StorageBucketsModel): void {
|
|
733
671
|
model.enable();
|
|
734
672
|
}
|
|
@@ -787,6 +725,15 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
|
|
|
787
725
|
|
|
788
726
|
if (frame.isOutermostFrame()) {
|
|
789
727
|
this.reset();
|
|
728
|
+
const selectedElement = this.sidebarTree.selectedTreeElement;
|
|
729
|
+
if (selectedElement instanceof ExpandableApplicationPanelTreeElement) {
|
|
730
|
+
// Only update AI Assistance storage context for expandable category headers,
|
|
731
|
+
// as all other tree elements are re-rendered on reset.
|
|
732
|
+
const item = selectedElement.createGenericStorageAiContext();
|
|
733
|
+
if (item) {
|
|
734
|
+
UI.Context.Context.instance().setFlavor(AiAssistance.StorageItem.StorageItem, item);
|
|
735
|
+
}
|
|
736
|
+
}
|
|
790
737
|
}
|
|
791
738
|
this.addCookieDocument(frame);
|
|
792
739
|
}
|
|
@@ -962,50 +909,6 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
|
|
|
962
909
|
this.extensionStorageTreeElements.delete(extensionStorage.key);
|
|
963
910
|
}
|
|
964
911
|
|
|
965
|
-
private async sharedStorageAdded(event: Common.EventTarget.EventTargetEvent<SharedStorageForOrigin>): Promise<void> {
|
|
966
|
-
await this.addSharedStorage(event.data);
|
|
967
|
-
}
|
|
968
|
-
|
|
969
|
-
private async addSharedStorage(sharedStorage: SharedStorageForOrigin): Promise<void> {
|
|
970
|
-
const sharedStorageTreeElement = await SharedStorageTreeElement.createElement(this.panel, sharedStorage);
|
|
971
|
-
|
|
972
|
-
// A tree element for `sharedStorage.securityOrigin` may have been added while we were waiting for `sharedStorageTreeElement` to be created.
|
|
973
|
-
if (this.sharedStorageTreeElements.has(sharedStorage.securityOrigin)) {
|
|
974
|
-
return;
|
|
975
|
-
}
|
|
976
|
-
this.sharedStorageTreeElements.set(sharedStorage.securityOrigin, sharedStorageTreeElement);
|
|
977
|
-
this.sharedStorageListTreeElement.appendChild(sharedStorageTreeElement);
|
|
978
|
-
this.sharedStorageTreeElementDispatcher.dispatchEventToListeners(
|
|
979
|
-
SharedStorageTreeElementDispatcher.Events.SHARED_STORAGE_TREE_ELEMENT_ADDED,
|
|
980
|
-
{origin: sharedStorage.securityOrigin});
|
|
981
|
-
}
|
|
982
|
-
|
|
983
|
-
private sharedStorageRemoved(event: Common.EventTarget.EventTargetEvent<SharedStorageForOrigin>): void {
|
|
984
|
-
this.removeSharedStorage(event.data);
|
|
985
|
-
}
|
|
986
|
-
|
|
987
|
-
private removeSharedStorage(sharedStorage: SharedStorageForOrigin): void {
|
|
988
|
-
const treeElement = this.sharedStorageTreeElements.get(sharedStorage.securityOrigin);
|
|
989
|
-
if (!treeElement) {
|
|
990
|
-
return;
|
|
991
|
-
}
|
|
992
|
-
const wasSelected = treeElement.selected;
|
|
993
|
-
const parentListTreeElement = treeElement.parent;
|
|
994
|
-
if (parentListTreeElement) {
|
|
995
|
-
parentListTreeElement.removeChild(treeElement);
|
|
996
|
-
parentListTreeElement.setExpandable(parentListTreeElement.childCount() > 0);
|
|
997
|
-
if (wasSelected) {
|
|
998
|
-
parentListTreeElement.select();
|
|
999
|
-
}
|
|
1000
|
-
}
|
|
1001
|
-
this.sharedStorageTreeElements.delete(sharedStorage.securityOrigin);
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
private sharedStorageAccess(event: Common.EventTarget.EventTargetEvent<Protocol.Storage.SharedStorageAccessedEvent>):
|
|
1005
|
-
void {
|
|
1006
|
-
this.sharedStorageListTreeElement.addEvent(event.data);
|
|
1007
|
-
}
|
|
1008
|
-
|
|
1009
912
|
async showResource(resource: SDK.Resource.Resource, line?: number, column?: number): Promise<void> {
|
|
1010
913
|
await this.resourcesSection.revealResource(resource, line, column);
|
|
1011
914
|
}
|
|
@@ -133,7 +133,7 @@ export class ExpandableApplicationPanelTreeElement extends ApplicationPanelTreeE
|
|
|
133
133
|
this.categoryDescription = categoryDescription;
|
|
134
134
|
}
|
|
135
135
|
|
|
136
|
-
|
|
136
|
+
createGenericStorageAiContext(): AiAssistance.StorageItem.StorageItem|null {
|
|
137
137
|
const target = SDK.TargetManager.TargetManager.instance().primaryPageTarget();
|
|
138
138
|
const mainPageOrigin =
|
|
139
139
|
target?.inspectedURL() ? Common.ParsedURL.ParsedURL.extractOrigin(target.inspectedURL()) : '';
|
|
@@ -31,11 +31,6 @@ import * as ServiceWorkerCacheTreeElement from './ServiceWorkerCacheTreeElement.
|
|
|
31
31
|
import * as ServiceWorkerCacheViews from './ServiceWorkerCacheViews.js';
|
|
32
32
|
import * as ServiceWorkersView from './ServiceWorkersView.js';
|
|
33
33
|
import * as ServiceWorkerUpdateCycleView from './ServiceWorkerUpdateCycleView.js';
|
|
34
|
-
import * as SharedStorageEventsView from './SharedStorageEventsView.js';
|
|
35
|
-
import * as SharedStorageItemsView from './SharedStorageItemsView.js';
|
|
36
|
-
import * as SharedStorageListTreeElement from './SharedStorageListTreeElement.js';
|
|
37
|
-
import * as SharedStorageModel from './SharedStorageModel.js';
|
|
38
|
-
import * as SharedStorageTreeElement from './SharedStorageTreeElement.js';
|
|
39
34
|
import * as StorageBucketsTreeElement from './StorageBucketsTreeElement.js';
|
|
40
35
|
import * as StorageItemsToolbar from './StorageItemsToolbar.js';
|
|
41
36
|
import * as StorageView from './StorageView.js';
|
|
@@ -74,11 +69,6 @@ export {
|
|
|
74
69
|
ServiceWorkerCacheViews,
|
|
75
70
|
ServiceWorkersView,
|
|
76
71
|
ServiceWorkerUpdateCycleView,
|
|
77
|
-
SharedStorageEventsView,
|
|
78
|
-
SharedStorageItemsView,
|
|
79
|
-
SharedStorageListTreeElement,
|
|
80
|
-
SharedStorageModel,
|
|
81
|
-
SharedStorageTreeElement,
|
|
82
72
|
StorageBucketsTreeElement,
|
|
83
73
|
StorageItemsToolbar,
|
|
84
74
|
StorageView,
|
|
@@ -11,8 +11,6 @@ import * as PermissionsPolicySection from './PermissionsPolicySection.js';
|
|
|
11
11
|
import * as ProtocolHandlersView from './ProtocolHandlersView.js';
|
|
12
12
|
import * as ReportsGrid from './ReportsGrid.js';
|
|
13
13
|
import * as ServiceWorkerRouterView from './ServiceWorkerRouterView.js';
|
|
14
|
-
import * as SharedStorageAccessGrid from './SharedStorageAccessGrid.js';
|
|
15
|
-
import * as SharedStorageMetadataView from './SharedStorageMetadataView.js';
|
|
16
14
|
import * as StorageMetadataView from './StorageMetadataView.js';
|
|
17
15
|
import * as TrustTokensView from './TrustTokensView.js';
|
|
18
16
|
|
|
@@ -26,8 +24,6 @@ export {
|
|
|
26
24
|
ProtocolHandlersView,
|
|
27
25
|
ReportsGrid,
|
|
28
26
|
ServiceWorkerRouterView,
|
|
29
|
-
SharedStorageAccessGrid,
|
|
30
|
-
SharedStorageMetadataView,
|
|
31
27
|
StorageMetadataView,
|
|
32
28
|
TrustTokensView,
|
|
33
29
|
};
|
|
@@ -89,10 +89,6 @@ const UIStrings = {
|
|
|
89
89
|
* @description Category of event listener breakpoints for script events.
|
|
90
90
|
*/
|
|
91
91
|
script: 'Script',
|
|
92
|
-
/**
|
|
93
|
-
* @description Category of event listener breakpoints for shared storage worklet events.
|
|
94
|
-
*/
|
|
95
|
-
sharedStorageWorklet: 'Shared storage worklet',
|
|
96
92
|
/**
|
|
97
93
|
* @description Category of event listener breakpoints for timer events.
|
|
98
94
|
*/
|
|
@@ -386,7 +382,6 @@ const LOCALIZED_CATEGORIES: Record<SDK.CategorizedBreakpoint.Category, () => Pla
|
|
|
386
382
|
[SDK.CategorizedBreakpoint.Category.PICTURE_IN_PICTURE]: i18nLazyString(UIStrings.pictureinpicture),
|
|
387
383
|
[SDK.CategorizedBreakpoint.Category.POINTER]: i18nLazyString(UIStrings.pointer),
|
|
388
384
|
[SDK.CategorizedBreakpoint.Category.SCRIPT]: i18nLazyString(UIStrings.script),
|
|
389
|
-
[SDK.CategorizedBreakpoint.Category.SHARED_STORAGE_WORKLET]: i18nLazyString(UIStrings.sharedStorageWorklet),
|
|
390
385
|
[SDK.CategorizedBreakpoint.Category.TIMER]: i18nLazyString(UIStrings.timer),
|
|
391
386
|
[SDK.CategorizedBreakpoint.Category.TOUCH]: i18nLazyString(UIStrings.touch),
|
|
392
387
|
[SDK.CategorizedBreakpoint.Category.TRUSTED_TYPE_VIOLATION]: i18nLazyString(UIStrings.trustedTypeViolations),
|
|
@@ -7,25 +7,19 @@ import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
|
|
|
7
7
|
|
|
8
8
|
import {CategorizedBreakpointsSidebarPane} from './CategorizedBreakpointsSidebarPane.js';
|
|
9
9
|
|
|
10
|
-
let eventListenerBreakpointsSidebarPaneInstance: EventListenerBreakpointsSidebarPane;
|
|
11
|
-
|
|
12
10
|
export class EventListenerBreakpointsSidebarPane extends CategorizedBreakpointsSidebarPane {
|
|
13
|
-
|
|
11
|
+
readonly #eventBreakpointsManager: SDK.EventBreakpointsModel.EventBreakpointsManager;
|
|
12
|
+
|
|
13
|
+
constructor(eventBreakpointsManager: SDK.EventBreakpointsModel.EventBreakpointsManager) {
|
|
14
14
|
let breakpoints: SDK.CategorizedBreakpoint.CategorizedBreakpoint[] =
|
|
15
15
|
SDK.DOMDebuggerModel.DOMDebuggerManager.instance().eventListenerBreakpoints();
|
|
16
|
-
const nonDomBreakpoints =
|
|
16
|
+
const nonDomBreakpoints = eventBreakpointsManager.eventListenerBreakpoints();
|
|
17
17
|
breakpoints = breakpoints.concat(nonDomBreakpoints);
|
|
18
18
|
|
|
19
19
|
super(
|
|
20
20
|
breakpoints, `${VisualLogging.section('sources.event-listener-breakpoints')}`,
|
|
21
21
|
'sources.event-listener-breakpoints');
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
static instance(): EventListenerBreakpointsSidebarPane {
|
|
25
|
-
if (!eventListenerBreakpointsSidebarPaneInstance) {
|
|
26
|
-
eventListenerBreakpointsSidebarPaneInstance = new EventListenerBreakpointsSidebarPane();
|
|
27
|
-
}
|
|
28
|
-
return eventListenerBreakpointsSidebarPaneInstance;
|
|
22
|
+
this.#eventBreakpointsManager = eventBreakpointsManager;
|
|
29
23
|
}
|
|
30
24
|
|
|
31
25
|
override getBreakpointFromPausedDetails(details: SDK.DebuggerModel.DebuggerPausedDetails):
|
|
@@ -39,6 +33,6 @@ export class EventListenerBreakpointsSidebarPane extends CategorizedBreakpointsS
|
|
|
39
33
|
if (domBreakpoint) {
|
|
40
34
|
return domBreakpoint;
|
|
41
35
|
}
|
|
42
|
-
return
|
|
36
|
+
return this.#eventBreakpointsManager.resolveEventListenerBreakpoint(auxData);
|
|
43
37
|
}
|
|
44
38
|
}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
+
import * as Common from '../../core/common/common.js';
|
|
5
6
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
6
7
|
import * as Root from '../../core/root/root.js';
|
|
7
8
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
@@ -116,10 +117,11 @@ async function loadSourcesModule(): Promise<typeof Sources> {
|
|
|
116
117
|
}
|
|
117
118
|
|
|
118
119
|
UI.ViewManager.registerViewExtension({
|
|
119
|
-
|
|
120
|
+
loadView: Common.Lazy.lazy(async universe => {
|
|
120
121
|
const BrowserDebugger = await loadBrowserDebuggerModule();
|
|
121
|
-
return BrowserDebugger.EventListenerBreakpointsSidebarPane.EventListenerBreakpointsSidebarPane
|
|
122
|
-
|
|
122
|
+
return new BrowserDebugger.EventListenerBreakpointsSidebarPane.EventListenerBreakpointsSidebarPane(
|
|
123
|
+
universe.eventBreakpointsManager);
|
|
124
|
+
}),
|
|
123
125
|
id: 'sources.event-listener-breakpoints',
|
|
124
126
|
location: UI.ViewManager.ViewLocationValues.SOURCES_SIDEBAR_BOTTOM,
|
|
125
127
|
commandPrompt: i18nLazyString(UIStrings.showEventListenerBreakpoints),
|