chrome-devtools-frontend 1.0.1548980 → 1.0.1550444
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/docs/contributing/settings-experiments-features.md +35 -0
- package/docs/styleguide/ux/components.md +53 -12
- package/docs/styleguide/ux/images/cards.png +0 -0
- package/docs/styleguide/ux/patterns.md +27 -0
- package/docs/ui_engineering.md +2 -2
- package/eslint.config.mjs +1 -0
- package/front_end/Tests.js +2 -0
- package/front_end/core/host/InspectorFrontendHost.ts +26 -558
- package/front_end/core/host/InspectorFrontendHostAPI.ts +6 -3
- package/front_end/core/host/InspectorFrontendHostStub.ts +558 -0
- package/front_end/core/host/ResourceLoader.ts +9 -23
- package/front_end/core/host/UserMetrics.ts +4 -4
- package/front_end/core/root/DevToolsContext.ts +4 -0
- package/front_end/core/root/Runtime.ts +10 -0
- package/front_end/core/sdk/CSSMatchedStyles.ts +2 -2
- package/front_end/core/sdk/CSSModel.ts +24 -24
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +11 -11
- package/front_end/core/sdk/CSSQuery.ts +1 -1
- package/front_end/core/sdk/CSSRule.ts +2 -2
- package/front_end/core/sdk/CSSStyleDeclaration.ts +1 -1
- package/front_end/core/sdk/CSSStyleSheetHeader.ts +1 -1
- package/front_end/core/sdk/DOMModel.ts +3 -0
- package/front_end/core/sdk/NetworkManager.ts +41 -41
- package/front_end/core/sdk/NetworkRequest.ts +4 -0
- package/front_end/core/sdk/OverlayModel.ts +2 -2
- package/front_end/core/sdk/PageResourceLoader.ts +71 -38
- package/front_end/core/sdk/SourceMap.ts +6 -0
- package/front_end/core/sdk/SourceMapCache.ts +21 -0
- package/front_end/core/sdk/SourceMapManager.ts +14 -7
- package/front_end/core/sdk/SourceMapScopesInfo.ts +6 -2
- package/front_end/core/sdk/TargetManager.ts +14 -2
- package/front_end/core/sdk/sdk-meta.ts +13 -0
- package/front_end/entrypoints/formatter_worker/FormatterActions.ts +1 -0
- package/front_end/entrypoints/formatter_worker/ScopeParser.ts +1 -1
- package/front_end/entrypoints/main/MainImpl.ts +5 -4
- package/front_end/foundation/Universe.ts +8 -1
- package/front_end/generated/Deprecation.ts +18 -4
- package/front_end/generated/InspectorBackendCommands.ts +38 -33
- package/front_end/generated/SupportedCSSProperties.js +41 -41
- package/front_end/generated/protocol-mapping.d.ts +20 -0
- package/front_end/generated/protocol-proxy-api.d.ts +17 -0
- package/front_end/generated/protocol.ts +146 -35
- package/front_end/models/ai_assistance/AiConversation.ts +5 -4
- package/front_end/models/ai_assistance/BuiltInAi.ts +79 -5
- package/front_end/models/ai_assistance/ChangeManager.ts +4 -4
- package/front_end/models/ai_assistance/ConversationHandler.ts +0 -15
- package/front_end/models/ai_assistance/agents/AiAgent.ts +9 -6
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +135 -3
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +24 -0
- package/front_end/models/bindings/CompilerScriptMapping.ts +43 -0
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +19 -0
- package/front_end/models/bindings/ResourceMapping.ts +73 -0
- package/front_end/models/bindings/ResourceScriptMapping.ts +50 -0
- package/front_end/models/issues_manager/AttributionReportingIssue.ts +6 -8
- package/front_end/models/issues_manager/BounceTrackingIssue.ts +4 -14
- package/front_end/models/issues_manager/ClientHintIssue.ts +5 -12
- package/front_end/models/issues_manager/ContentSecurityPolicyIssue.ts +5 -12
- package/front_end/models/issues_manager/CookieDeprecationMetadataIssue.ts +7 -14
- package/front_end/models/issues_manager/CookieIssue.ts +27 -30
- package/front_end/models/issues_manager/CorsIssue.ts +8 -17
- package/front_end/models/issues_manager/CrossOriginEmbedderPolicyIssue.ts +5 -8
- package/front_end/models/issues_manager/DeprecationIssue.ts +7 -14
- package/front_end/models/issues_manager/ElementAccessibilityIssue.ts +7 -14
- package/front_end/models/issues_manager/FederatedAuthRequestIssue.ts +4 -11
- package/front_end/models/issues_manager/FederatedAuthUserInfoRequestIssue.ts +4 -11
- package/front_end/models/issues_manager/GenericIssue.ts +28 -16
- package/front_end/models/issues_manager/HeavyAdIssue.ts +4 -11
- package/front_end/models/issues_manager/Issue.ts +12 -4
- package/front_end/models/issues_manager/IssueAggregator.ts +8 -2
- package/front_end/models/issues_manager/LowTextContrastIssue.ts +3 -10
- package/front_end/models/issues_manager/MixedContentIssue.ts +7 -13
- package/front_end/models/issues_manager/PartitioningBlobURLIssue.ts +4 -11
- package/front_end/models/issues_manager/PropertyRuleIssue.ts +6 -12
- package/front_end/models/issues_manager/QuirksModeIssue.ts +3 -10
- package/front_end/models/issues_manager/SRIMessageSignatureIssue.ts +7 -13
- package/front_end/models/issues_manager/SharedArrayBufferIssue.ts +4 -11
- package/front_end/models/issues_manager/SharedDictionaryIssue.ts +6 -13
- package/front_end/models/issues_manager/StylesheetLoadingIssue.ts +8 -13
- package/front_end/models/issues_manager/UnencodedDigestIssue.ts +2 -9
- package/front_end/models/issues_manager/descriptions/genericNavigationEntryMarkedSkippable.md +7 -0
- package/front_end/models/javascript_metadata/NativeFunctions.js +7 -16
- package/front_end/models/source_map_scopes/FunctionCodeResolver.snapshot.txt +98 -0
- package/front_end/models/source_map_scopes/FunctionCodeResolver.ts +270 -0
- package/front_end/models/source_map_scopes/source_map_scopes.ts +2 -0
- package/front_end/models/workspace/UISourceCode.ts +51 -44
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +76 -34
- package/front_end/panels/ai_assistance/aiAssistancePanel.css +1 -0
- package/front_end/panels/ai_assistance/components/ChatView.ts +23 -11
- package/front_end/panels/application/AppManifestView.ts +7 -6
- package/front_end/panels/application/ApplicationPanelSidebar.ts +21 -21
- package/front_end/panels/application/BackForwardCacheTreeElement.ts +2 -2
- package/front_end/panels/application/BounceTrackingMitigationsTreeElement.ts +2 -2
- package/front_end/panels/application/FrameDetailsView.ts +5 -6
- package/front_end/panels/application/InterestGroupTreeElement.ts +2 -2
- package/front_end/panels/application/OpenedWindowDetailsView.ts +2 -2
- package/front_end/panels/application/OriginTrialTreeView.ts +1 -1
- package/front_end/panels/application/PreloadingTreeElement.ts +3 -3
- package/front_end/panels/application/ReportingApiTreeElement.ts +2 -2
- package/front_end/panels/application/ServiceWorkerCacheTreeElement.ts +3 -3
- package/front_end/panels/application/ServiceWorkersView.ts +2 -2
- package/front_end/panels/application/SharedStorageListTreeElement.ts +2 -2
- package/front_end/panels/application/StorageBucketsTreeElement.ts +3 -3
- package/front_end/panels/application/StorageView.ts +2 -2
- package/front_end/panels/application/TrustTokensTreeElement.ts +4 -8
- package/front_end/panels/application/components/PermissionsPolicySection.ts +202 -158
- package/front_end/panels/application/components/ProtocolHandlersView.ts +118 -81
- package/front_end/panels/application/components/ServiceWorkerRouterView.ts +47 -41
- package/front_end/panels/application/components/SharedStorageMetadataView.ts +1 -1
- package/front_end/panels/application/components/StorageMetadataView.ts +31 -34
- package/front_end/panels/application/components/TrustTokensView.ts +77 -69
- package/front_end/panels/application/preloading/components/PreloadingGrid.ts +1 -1
- package/front_end/panels/application/preloading/components/RuleSetGrid.ts +1 -1
- package/front_end/panels/application/preloading/components/UsedPreloadingView.ts +1 -1
- package/front_end/panels/changes/ChangesSidebar.ts +2 -0
- package/front_end/panels/changes/CombinedDiffView.ts +2 -0
- package/front_end/panels/common/AnnotationManager.ts +71 -0
- package/front_end/panels/common/PersistenceUtils.ts +6 -7
- package/front_end/panels/common/common.ts +1 -0
- package/front_end/panels/console/ConsolePrompt.ts +4 -4
- package/front_end/panels/console/ConsoleView.ts +5 -4
- package/front_end/panels/console/ConsoleViewMessage.ts +16 -15
- package/front_end/panels/console/console-meta.ts +0 -13
- package/front_end/panels/console_counters/WarningErrorCounter.ts +2 -0
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +1 -1
- package/front_end/panels/developer_resources/DeveloperResourcesView.ts +3 -1
- package/front_end/panels/elements/CSSRuleValidator.ts +7 -7
- package/front_end/panels/elements/CSSRuleValidatorHelper.ts +2 -2
- package/front_end/panels/elements/ColorSwatchPopoverIcon.ts +3 -3
- package/front_end/panels/elements/ElementsPanel.ts +49 -0
- package/front_end/panels/elements/ElementsTreeElement.ts +172 -121
- package/front_end/panels/elements/ElementsTreeOutline.ts +11 -3
- package/front_end/panels/elements/LayoutPane.ts +12 -10
- package/front_end/panels/elements/ShortcutTreeElement.ts +2 -2
- package/front_end/panels/elements/StyleEditorWidget.ts +2 -2
- package/front_end/panels/elements/StylePropertyTreeElement.ts +18 -18
- package/front_end/panels/elements/StylesSidebarPane.ts +4 -5
- package/front_end/panels/elements/TopLayerContainer.ts +2 -2
- package/front_end/panels/elements/components/AdornerManager.ts +3 -3
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +1 -1
- package/front_end/panels/elements/components/ElementsTreeExpandButton.ts +1 -1
- package/front_end/panels/elements/components/QueryContainer.ts +1 -1
- package/front_end/panels/elements/components/StylePropertyEditor.ts +7 -7
- package/front_end/panels/emulation/DeviceModeWrapper.ts +48 -3
- package/front_end/panels/explain/components/ConsoleInsight.ts +6 -4
- package/front_end/panels/issues/AffectedResourcesView.ts +2 -2
- package/front_end/panels/issues/AttributionReportingIssueDetailsView.ts +2 -2
- package/front_end/panels/issues/IssueKindView.ts +2 -2
- package/front_end/panels/issues/IssueView.ts +4 -4
- package/front_end/panels/js_timeline/js_timeline-meta.ts +4 -2
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts +28 -50
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryInspector.ts +15 -11
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryNavigator.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplay.ts +1 -1
- package/front_end/panels/media/PlayerListView.ts +100 -73
- package/front_end/panels/media/playerListView.css +5 -0
- package/front_end/panels/mobile_throttling/ThrottlingManager.ts +2 -2
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +4 -5
- package/front_end/panels/network/NetworkDataGridNode.ts +3 -3
- package/front_end/panels/network/NetworkFrameGrouper.ts +2 -2
- package/front_end/panels/network/NetworkItemView.ts +4 -4
- package/front_end/panels/network/NetworkLogViewColumns.ts +3 -3
- package/front_end/panels/network/RequestConditionsDrawer.ts +5 -5
- package/front_end/panels/network/RequestCookiesView.ts +2 -2
- package/front_end/panels/network/SignedExchangeInfoView.ts +2 -2
- package/front_end/panels/network/components/DirectSocketConnectionView.ts +17 -0
- package/front_end/panels/network/components/RequestTrustTokensView.ts +5 -6
- package/front_end/panels/network/resourceChunkView.css +4 -0
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +3 -3
- package/front_end/panels/profiler/ProfileDataGrid.ts +2 -2
- package/front_end/panels/profiler/ProfilesPanel.ts +2 -2
- package/front_end/panels/protocol_monitor/JSONEditor.ts +1 -1
- package/front_end/panels/recorder/components/CreateRecordingView.ts +1 -1
- package/front_end/panels/recorder/components/ExtensionView.ts +1 -1
- package/front_end/panels/recorder/components/RecordingListView.ts +1 -1
- package/front_end/panels/recorder/components/RecordingView.ts +1 -1
- package/front_end/panels/recorder/components/StepView.ts +1 -1
- package/front_end/panels/screencast/ScreencastView.ts +8 -8
- package/front_end/panels/search/SearchView.ts +1 -1
- package/front_end/panels/security/CookieControlsTreeElement.ts +2 -2
- package/front_end/panels/security/CookieControlsView.ts +1 -1
- package/front_end/panels/security/CookieReportTreeElement.ts +2 -2
- package/front_end/panels/security/SecurityPanel.ts +5 -5
- package/front_end/panels/security/SecurityPanelSidebar.ts +3 -4
- package/front_end/panels/sensors/LocationsSettingsTab.ts +1 -1
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +1 -1
- package/front_end/panels/settings/KeybindsSettingsTab.ts +5 -5
- package/front_end/panels/settings/SettingsScreen.ts +7 -8
- package/front_end/panels/settings/WorkspaceSettingsTab.ts +1 -1
- package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +1 -1
- package/front_end/panels/snippets/SnippetsQuickOpen.ts +16 -6
- package/front_end/panels/sources/BreakpointEditDialog.ts +3 -3
- package/front_end/panels/sources/BreakpointsView.ts +1 -1
- package/front_end/panels/sources/CSSPlugin.ts +4 -4
- package/front_end/panels/sources/CallStackSidebarPane.ts +4 -4
- package/front_end/panels/sources/DebuggerPausedMessage.ts +3 -3
- package/front_end/panels/sources/FilteredUISourceCodeListProvider.ts +40 -23
- package/front_end/panels/sources/GoToLineQuickOpen.ts +11 -5
- package/front_end/panels/sources/NavigatorView.ts +4 -4
- package/front_end/panels/sources/OpenFileQuickOpen.ts +11 -16
- package/front_end/panels/sources/OutlineQuickOpen.ts +23 -23
- package/front_end/panels/sources/ProfilePlugin.ts +21 -12
- package/front_end/panels/sources/SourcesView.ts +2 -2
- package/front_end/panels/sources/TabbedEditorContainer.ts +4 -5
- package/front_end/panels/sources/ThreadsSidebarPane.ts +2 -2
- package/front_end/panels/sources/UISourceCodeFrame.ts +5 -6
- package/front_end/panels/sources/filteredUISourceCodeListProvider.css +41 -0
- package/front_end/panels/timeline/TimelineHistoryManager.ts +2 -2
- package/front_end/panels/timeline/TimelinePanel.ts +29 -25
- package/front_end/panels/timeline/TimelineSelectorStatsView.ts +3 -3
- package/front_end/panels/timeline/components/CPUThrottlingSelector.ts +1 -1
- package/front_end/panels/timeline/components/LiveMetricsView.ts +1 -1
- package/front_end/panels/timeline/components/NetworkRequestTooltip.ts +1 -1
- package/front_end/panels/timeline/components/NetworkThrottlingSelector.ts +1 -1
- package/front_end/panels/timeline/components/OriginMap.ts +1 -1
- package/front_end/panels/timeline/components/insights/Checklist.ts +1 -1
- package/front_end/panels/timeline/components/insights/DOMSize.ts +1 -1
- package/front_end/panels/timeline/components/insights/ImageDelivery.ts +1 -1
- package/front_end/panels/timeline/components/insights/NetworkDependencyTree.ts +1 -1
- package/front_end/panels/timeline/components/insights/SlowCSSSelector.ts +2 -2
- package/front_end/panels/timeline/docs/flame_chart_migration.md +11 -16
- package/front_end/panels/timeline/overlays/components/EntriesLinkOverlay.ts +1 -1
- package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +1 -1
- package/front_end/panels/timeline/timeline-meta.ts +3 -2
- package/front_end/panels/utils/utils.ts +18 -3
- package/front_end/panels/whats_new/ReleaseNoteText.ts +10 -20
- package/front_end/panels/whats_new/resources/WNDT.md +8 -8
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer/third_party/mitt/README.chromium +1 -0
- package/front_end/third_party/puppeteer/third_party/parsel/README.chromium +1 -0
- package/front_end/third_party/puppeteer/third_party/rxjs/README.chromium +1 -0
- package/front_end/ui/components/adorners/Adorner.ts +21 -1
- package/front_end/ui/components/annotations/AnnotationRepository.ts +98 -0
- package/front_end/ui/components/annotations/AnnotationType.ts +10 -0
- package/front_end/ui/components/annotations/annotations.ts +6 -0
- package/front_end/ui/components/buttons/Button.ts +2 -2
- package/front_end/ui/components/buttons/FloatingButton.ts +2 -2
- package/front_end/ui/components/chrome_link/ChromeLink.ts +1 -1
- package/front_end/ui/components/dialogs/ButtonDialog.ts +1 -1
- package/front_end/ui/components/dialogs/Dialog.ts +1 -1
- package/front_end/ui/components/dialogs/ShortcutDialog.ts +1 -0
- package/front_end/ui/components/diff_view/DiffView.ts +1 -1
- package/front_end/ui/components/expandable_list/ExpandableList.ts +1 -1
- package/front_end/ui/components/highlighting/HighlightElement.ts +16 -2
- package/front_end/ui/components/highlighting/MarkupHighlight.ts +162 -0
- package/front_end/ui/components/highlighting/highlighting.ts +7 -0
- package/front_end/ui/components/icon_button/FileSourceIcon.ts +2 -2
- package/front_end/ui/components/icon_button/IconButton.ts +2 -2
- package/front_end/ui/components/icon_button/icon_button.ts +0 -2
- package/front_end/ui/components/issue_counter/IssueCounter.ts +2 -2
- package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +2 -2
- package/front_end/ui/components/legacy_wrapper/LegacyWrapper.ts +1 -1
- package/front_end/ui/components/linkifier/LinkifierImpl.ts +1 -1
- package/front_end/ui/components/list/List.ts +184 -0
- package/front_end/ui/components/list/list.css +90 -0
- package/front_end/ui/components/{cards/cards.ts → list/lists.ts} +3 -3
- package/front_end/ui/components/markdown_view/CodeBlock.ts +1 -1
- package/front_end/ui/components/markdown_view/MarkdownImage.ts +4 -4
- package/front_end/ui/components/markdown_view/MarkdownLink.ts +1 -1
- package/front_end/ui/components/markdown_view/MarkdownView.ts +1 -1
- package/front_end/ui/components/menus/Menu.ts +1 -1
- package/front_end/ui/components/menus/SelectMenu.ts +1 -1
- package/front_end/ui/components/node_text/NodeText.ts +1 -1
- package/front_end/ui/components/panel_feedback/FeedbackButton.ts +1 -1
- package/front_end/ui/components/panel_feedback/PanelFeedback.ts +1 -1
- package/front_end/ui/components/panel_feedback/PreviewToggle.ts +1 -1
- package/front_end/ui/components/panel_introduction_steps/PanelIntroductionSteps.ts +1 -1
- package/front_end/ui/components/report_view/ReportView.ts +1 -1
- package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +2 -2
- package/front_end/ui/components/settings/SettingCheckbox.ts +1 -1
- package/front_end/ui/components/settings/SettingDeprecationWarning.ts +2 -2
- package/front_end/ui/components/snackbars/Snackbar.ts +1 -1
- package/front_end/ui/components/spinners/Spinner.ts +1 -1
- package/front_end/ui/components/srgb_overlay/SrgbOverlay.ts +1 -1
- package/front_end/ui/components/suggestion_input/SuggestionInput.ts +1 -0
- package/front_end/ui/components/survey_link/SurveyLink.ts +2 -2
- package/front_end/ui/components/switch/SwitchImpl.ts +1 -1
- package/front_end/ui/components/text_editor/TextEditor.ts +1 -0
- package/front_end/ui/components/text_editor/config.ts +2 -2
- package/front_end/ui/components/text_prompt/TextPrompt.ts +1 -1
- package/front_end/ui/components/tooltips/Tooltip.ts +1 -1
- package/front_end/ui/components/tree_outline/TreeOutline.ts +1 -1
- package/front_end/ui/kit/cards/Card.docs.ts +43 -0
- package/front_end/ui/{components/icon_button → kit/icons}/Icon.docs.ts +3 -4
- package/front_end/ui/{components/icon_button → kit/icons}/Icon.ts +6 -4
- package/front_end/ui/kit/kit.ts +6 -0
- package/front_end/ui/legacy/Infobar.ts +3 -3
- package/front_end/ui/legacy/InspectorView.ts +3 -3
- package/front_end/ui/legacy/SearchableView.ts +2 -2
- package/front_end/ui/legacy/SoftContextMenu.ts +5 -5
- package/front_end/ui/legacy/SoftDropDown.ts +2 -2
- package/front_end/ui/legacy/TabbedPane.ts +106 -8
- package/front_end/ui/legacy/Toolbar.ts +3 -3
- package/front_end/ui/legacy/Treeoutline.ts +2 -2
- package/front_end/ui/legacy/UIUtils.ts +4 -188
- package/front_end/ui/legacy/ViewManager.ts +27 -12
- package/front_end/ui/legacy/ViewRegistration.ts +21 -22
- package/front_end/ui/legacy/components/color_picker/ContrastDetails.ts +8 -8
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +4 -4
- package/front_end/ui/legacy/components/cookie_table/CookiesTable.ts +4 -4
- package/front_end/ui/legacy/components/inline_editor/FontEditor.ts +2 -2
- package/front_end/ui/legacy/components/inline_editor/Swatches.ts +5 -5
- package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +3 -3
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +5 -4
- package/front_end/ui/legacy/components/perf_ui/LineLevelProfile.ts +73 -35
- package/front_end/ui/legacy/components/perf_ui/LiveHeapProfile.ts +11 -2
- package/front_end/ui/legacy/components/perf_ui/OverviewGrid.ts +3 -3
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +23 -31
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +11 -27
- package/front_end/ui/legacy/components/quick_open/HelpQuickOpen.ts +11 -15
- package/front_end/ui/legacy/components/quick_open/filteredListWidget.css +18 -65
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +2 -1
- package/front_end/ui/legacy/components/utils/Linkifier.ts +3 -3
- package/front_end/ui/legacy/tabbedPane.css +10 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
- package/inspector_overlay/README.md +3 -3
- package/mcp/HostBindings.ts +310 -0
- package/mcp/mcp.ts +18 -0
- package/mcp/tsconfig.json +6 -1
- package/package.json +26 -24
- /package/front_end/ui/{components → kit}/cards/Card.ts +0 -0
- /package/front_end/ui/{components → kit}/cards/card.css +0 -0
- /package/front_end/ui/{components/icon_button → kit/icons}/icon.css +0 -0
|
@@ -35,9 +35,7 @@ export class UISourceCode extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
|
|
|
35
35
|
#contentType: Common.ResourceType.ResourceType;
|
|
36
36
|
#requestContentPromise: Promise<TextUtils.ContentData.ContentDataOrError>|null = null;
|
|
37
37
|
#decorations = new Map<string, any>();
|
|
38
|
-
#formattedDecorations = new Map<string, any>();
|
|
39
38
|
#hasCommits = false;
|
|
40
|
-
#prettied = false;
|
|
41
39
|
#messages: Set<Message>|null = null;
|
|
42
40
|
#content: TextUtils.ContentData.ContentDataOrError|null = null;
|
|
43
41
|
#forceLoadOnCheckContent = false;
|
|
@@ -499,9 +497,6 @@ export class UISourceCode extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
|
|
|
499
497
|
}
|
|
500
498
|
|
|
501
499
|
getDecorationData(type: string): any {
|
|
502
|
-
if (this.#prettied && this.#formattedDecorations.get(type)) {
|
|
503
|
-
return this.#formattedDecorations.get(type);
|
|
504
|
-
}
|
|
505
500
|
return this.#decorations.get(type);
|
|
506
501
|
}
|
|
507
502
|
|
|
@@ -513,45 +508,6 @@ export class UISourceCode extends Common.ObjectWrapper.ObjectWrapper<EventTypes>
|
|
|
513
508
|
return this.#disableEdit;
|
|
514
509
|
}
|
|
515
510
|
|
|
516
|
-
formatChanged(format: {originalToFormatted(lineNumber: number, columnNumber?: number): number[]}|null): void {
|
|
517
|
-
if (this.#prettied === Boolean(format)) {
|
|
518
|
-
return;
|
|
519
|
-
}
|
|
520
|
-
this.#prettied = Boolean(format);
|
|
521
|
-
if (!format) {
|
|
522
|
-
this.dispatchEventToListeners(Events.DecorationChanged, DecoratorType.PERFORMANCE);
|
|
523
|
-
return;
|
|
524
|
-
}
|
|
525
|
-
const performanceDecorations = this.#decorations.get(DecoratorType.PERFORMANCE);
|
|
526
|
-
if (!performanceDecorations) {
|
|
527
|
-
return;
|
|
528
|
-
}
|
|
529
|
-
let formattedPerformanceDecorations: Map<number, Map<number, number>> =
|
|
530
|
-
this.#formattedDecorations.get(DecoratorType.PERFORMANCE);
|
|
531
|
-
if (!formattedPerformanceDecorations) {
|
|
532
|
-
formattedPerformanceDecorations = new Map<number, Map<number, number>>();
|
|
533
|
-
this.#formattedDecorations.set(DecoratorType.PERFORMANCE, formattedPerformanceDecorations);
|
|
534
|
-
} else {
|
|
535
|
-
formattedPerformanceDecorations.clear();
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
for (const [lineNumber, columnData] of performanceDecorations) {
|
|
539
|
-
for (const [columnNumber, data] of columnData) {
|
|
540
|
-
const [formattedLineNumber, formattedColumnNumber] =
|
|
541
|
-
format.originalToFormatted(lineNumber - 1, columnNumber - 1);
|
|
542
|
-
const oneBasedFormattedLineNumber = formattedLineNumber + 1;
|
|
543
|
-
const oneBasedFormattedColumnNumber = formattedColumnNumber + 1;
|
|
544
|
-
let lineData = formattedPerformanceDecorations.get(oneBasedFormattedLineNumber);
|
|
545
|
-
if (!lineData) {
|
|
546
|
-
lineData = new Map();
|
|
547
|
-
formattedPerformanceDecorations.set(oneBasedFormattedLineNumber, lineData);
|
|
548
|
-
}
|
|
549
|
-
lineData.set(oneBasedFormattedColumnNumber, (lineData.get(oneBasedFormattedColumnNumber) || 0) + data);
|
|
550
|
-
}
|
|
551
|
-
}
|
|
552
|
-
this.dispatchEventToListeners(Events.DecorationChanged, 'performance');
|
|
553
|
-
}
|
|
554
|
-
|
|
555
511
|
isIgnoreListed(): boolean {
|
|
556
512
|
return IgnoreListManager.instance().isUserOrSourceMapIgnoreListedUISourceCode(this);
|
|
557
513
|
}
|
|
@@ -677,6 +633,21 @@ export class UILocationRange {
|
|
|
677
633
|
}
|
|
678
634
|
}
|
|
679
635
|
|
|
636
|
+
/**
|
|
637
|
+
* A text range inside a specific {@link UISourceCode}, representing a function.
|
|
638
|
+
*/
|
|
639
|
+
export class UIFunctionBounds {
|
|
640
|
+
readonly uiSourceCode: UISourceCode;
|
|
641
|
+
readonly range: TextUtils.TextRange.TextRange;
|
|
642
|
+
readonly name: string;
|
|
643
|
+
|
|
644
|
+
constructor(uiSourceCode: UISourceCode, range: TextUtils.TextRange.TextRange, name: string) {
|
|
645
|
+
this.uiSourceCode = uiSourceCode;
|
|
646
|
+
this.range = range;
|
|
647
|
+
this.name = name;
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
|
|
680
651
|
/**
|
|
681
652
|
* A message associated with a range in a `UISourceCode`. The range will be
|
|
682
653
|
* underlined starting at the range's start and ending at the line end (the
|
|
@@ -746,3 +717,39 @@ export const enum DecoratorType {
|
|
|
746
717
|
MEMORY = 'memory',
|
|
747
718
|
COVERAGE = 'coverage',
|
|
748
719
|
}
|
|
720
|
+
|
|
721
|
+
/** 1-based. line => column => value */
|
|
722
|
+
export type LineColumnProfileMap = Map<number, Map<number, number>>;
|
|
723
|
+
/** Used by ProfilePlugin to track runtime/memory costs. */
|
|
724
|
+
export type ProfileDataMap = Map<UISourceCode, LineColumnProfileMap>;
|
|
725
|
+
|
|
726
|
+
/**
|
|
727
|
+
* Converts an existing LineColumnProfileMap to a new one using the provided mapping.
|
|
728
|
+
*
|
|
729
|
+
* The input and output line/column of originalToMappedLocation is 0-indexed.
|
|
730
|
+
*/
|
|
731
|
+
export function createMappedProfileData(
|
|
732
|
+
profileData: LineColumnProfileMap,
|
|
733
|
+
originalToMappedLocation: (line: number, column: number) => number[] | null): LineColumnProfileMap {
|
|
734
|
+
const mappedProfileData: LineColumnProfileMap = new Map();
|
|
735
|
+
for (const [lineNumber, columnData] of profileData) {
|
|
736
|
+
for (const [columnNumber, data] of columnData) {
|
|
737
|
+
const mappedLocation = originalToMappedLocation(lineNumber - 1, columnNumber - 1);
|
|
738
|
+
if (!mappedLocation) {
|
|
739
|
+
continue;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
const oneBasedFormattedLineNumber = mappedLocation[0] + 1;
|
|
743
|
+
const oneBasedFormattedColumnNumber = mappedLocation[1] + 1;
|
|
744
|
+
let mappedColumnData = mappedProfileData.get(oneBasedFormattedLineNumber);
|
|
745
|
+
if (!mappedColumnData) {
|
|
746
|
+
mappedColumnData = new Map();
|
|
747
|
+
mappedProfileData.set(oneBasedFormattedLineNumber, mappedColumnData);
|
|
748
|
+
}
|
|
749
|
+
mappedColumnData.set(
|
|
750
|
+
oneBasedFormattedColumnNumber, (mappedColumnData.get(oneBasedFormattedColumnNumber) || 0) + data);
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
return mappedProfileData;
|
|
755
|
+
}
|
|
@@ -27,6 +27,7 @@ import * as TimelinePanel from '../timeline/timeline.js';
|
|
|
27
27
|
|
|
28
28
|
import aiAssistancePanelStyles from './aiAssistancePanel.css.js';
|
|
29
29
|
import {
|
|
30
|
+
type AnswerPart,
|
|
30
31
|
type ChatMessage,
|
|
31
32
|
ChatMessageEntity,
|
|
32
33
|
ChatView,
|
|
@@ -1420,7 +1421,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
1420
1421
|
try {
|
|
1421
1422
|
let systemMessage: ModelChatMessage = {
|
|
1422
1423
|
entity: ChatMessageEntity.MODEL,
|
|
1423
|
-
|
|
1424
|
+
parts: [],
|
|
1424
1425
|
};
|
|
1425
1426
|
let step: Step = {isLoading: true};
|
|
1426
1427
|
|
|
@@ -1428,9 +1429,14 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
1428
1429
|
* Commits the step to props only if necessary.
|
|
1429
1430
|
*/
|
|
1430
1431
|
function commitStep(): void {
|
|
1431
|
-
|
|
1432
|
-
|
|
1432
|
+
const lastPart = systemMessage.parts.at(-1);
|
|
1433
|
+
if (lastPart?.type === 'step' && lastPart.step === step) {
|
|
1434
|
+
return;
|
|
1433
1435
|
}
|
|
1436
|
+
systemMessage.parts.push({
|
|
1437
|
+
type: 'step',
|
|
1438
|
+
step,
|
|
1439
|
+
});
|
|
1434
1440
|
}
|
|
1435
1441
|
|
|
1436
1442
|
this.#isLoading = true;
|
|
@@ -1447,15 +1453,15 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
1447
1453
|
});
|
|
1448
1454
|
systemMessage = {
|
|
1449
1455
|
entity: ChatMessageEntity.MODEL,
|
|
1450
|
-
|
|
1456
|
+
parts: [],
|
|
1451
1457
|
};
|
|
1452
1458
|
this.#messages.push(systemMessage);
|
|
1453
1459
|
break;
|
|
1454
1460
|
}
|
|
1455
1461
|
case AiAssistanceModel.AiAgent.ResponseType.QUERYING: {
|
|
1456
1462
|
step = {isLoading: true};
|
|
1457
|
-
if (!systemMessage.
|
|
1458
|
-
|
|
1463
|
+
if (!systemMessage.parts.length) {
|
|
1464
|
+
commitStep();
|
|
1459
1465
|
}
|
|
1460
1466
|
|
|
1461
1467
|
break;
|
|
@@ -1479,7 +1485,16 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
1479
1485
|
break;
|
|
1480
1486
|
}
|
|
1481
1487
|
case AiAssistanceModel.AiAgent.ResponseType.SUGGESTIONS: {
|
|
1482
|
-
|
|
1488
|
+
const lastPart = systemMessage.parts.at(-1);
|
|
1489
|
+
if (lastPart?.type === 'answer') {
|
|
1490
|
+
lastPart.suggestions = data.suggestions;
|
|
1491
|
+
} else {
|
|
1492
|
+
systemMessage.parts.push({
|
|
1493
|
+
type: 'answer',
|
|
1494
|
+
text: '',
|
|
1495
|
+
suggestions: data.suggestions,
|
|
1496
|
+
});
|
|
1497
|
+
}
|
|
1483
1498
|
break;
|
|
1484
1499
|
}
|
|
1485
1500
|
case AiAssistanceModel.AiAgent.ResponseType.SIDE_EFFECT: {
|
|
@@ -1504,32 +1519,57 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
1504
1519
|
break;
|
|
1505
1520
|
}
|
|
1506
1521
|
case AiAssistanceModel.AiAgent.ResponseType.ANSWER: {
|
|
1507
|
-
systemMessage.suggestions ??= data.suggestions;
|
|
1508
|
-
systemMessage.answer = data.text;
|
|
1509
1522
|
systemMessage.rpcId = data.rpcId;
|
|
1523
|
+
const lastPart = systemMessage.parts.at(-1);
|
|
1524
|
+
if (lastPart?.type === 'answer') {
|
|
1525
|
+
lastPart.text = data.text;
|
|
1526
|
+
if (data.suggestions) {
|
|
1527
|
+
lastPart.suggestions = data.suggestions;
|
|
1528
|
+
}
|
|
1529
|
+
} else {
|
|
1530
|
+
const newPart: AnswerPart = {
|
|
1531
|
+
type: 'answer',
|
|
1532
|
+
text: data.text,
|
|
1533
|
+
};
|
|
1534
|
+
if (data.suggestions) {
|
|
1535
|
+
newPart.suggestions = data.suggestions;
|
|
1536
|
+
}
|
|
1537
|
+
systemMessage.parts.push(newPart);
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1510
1540
|
// When there is an answer without any thinking steps, we don't want to show the thinking step.
|
|
1511
|
-
|
|
1512
|
-
|
|
1541
|
+
// TODO(crbug.com/463323934): Remove specially handling this case.
|
|
1542
|
+
if (systemMessage.parts.length > 1) {
|
|
1543
|
+
const firstPart = systemMessage.parts[0];
|
|
1544
|
+
if (firstPart.type === 'step' && firstPart.step.isLoading && !firstPart.step.thought &&
|
|
1545
|
+
!firstPart.step.code && !firstPart.step.contextDetails) {
|
|
1546
|
+
systemMessage.parts.shift();
|
|
1547
|
+
}
|
|
1513
1548
|
}
|
|
1514
1549
|
step.isLoading = false;
|
|
1515
1550
|
break;
|
|
1516
1551
|
}
|
|
1517
1552
|
case AiAssistanceModel.AiAgent.ResponseType.ERROR: {
|
|
1518
1553
|
systemMessage.error = data.error;
|
|
1519
|
-
|
|
1520
|
-
|
|
1521
|
-
|
|
1554
|
+
const lastPart = systemMessage.parts.at(-1);
|
|
1555
|
+
if (lastPart?.type === 'step') {
|
|
1556
|
+
const lastStep = lastPart.step;
|
|
1522
1557
|
// Mark the last step as cancelled to make the UI feel better.
|
|
1523
1558
|
if (data.error === AiAssistanceModel.AiAgent.ErrorType.ABORT) {
|
|
1524
1559
|
lastStep.canceled = true;
|
|
1525
1560
|
// If error happens while the step is still loading remove it.
|
|
1526
1561
|
} else if (lastStep.isLoading) {
|
|
1527
|
-
systemMessage.
|
|
1562
|
+
systemMessage.parts.pop();
|
|
1528
1563
|
}
|
|
1529
1564
|
}
|
|
1565
|
+
|
|
1530
1566
|
if (data.error === AiAssistanceModel.AiAgent.ErrorType.BLOCK) {
|
|
1531
|
-
|
|
1567
|
+
const lastPart = systemMessage.parts.at(-1);
|
|
1568
|
+
if (lastPart?.type === 'answer') {
|
|
1569
|
+
systemMessage.parts.pop();
|
|
1570
|
+
}
|
|
1532
1571
|
}
|
|
1572
|
+
break;
|
|
1533
1573
|
}
|
|
1534
1574
|
}
|
|
1535
1575
|
|
|
@@ -1578,26 +1618,28 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
1578
1618
|
export function getResponseMarkdown(message: ModelChatMessage): string {
|
|
1579
1619
|
const contentParts = ['## AI'];
|
|
1580
1620
|
|
|
1581
|
-
for (const
|
|
1582
|
-
if (
|
|
1583
|
-
contentParts.push(`### ${
|
|
1584
|
-
}
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1621
|
+
for (const part of message.parts) {
|
|
1622
|
+
if (part.type === 'answer') {
|
|
1623
|
+
contentParts.push(`### Answer\n\n${part.text}`);
|
|
1624
|
+
} else {
|
|
1625
|
+
const step = part.step;
|
|
1626
|
+
if (step.title) {
|
|
1627
|
+
contentParts.push(`### ${step.title}`);
|
|
1628
|
+
}
|
|
1629
|
+
if (step.contextDetails) {
|
|
1630
|
+
contentParts.push(AiAssistanceModel.AiConversation.generateContextDetailsMarkdown(step.contextDetails));
|
|
1631
|
+
}
|
|
1632
|
+
if (step.thought) {
|
|
1633
|
+
contentParts.push(step.thought);
|
|
1634
|
+
}
|
|
1635
|
+
if (step.code) {
|
|
1636
|
+
contentParts.push(`**Code executed:**\n\`\`\`\n${step.code.trim()}\n\`\`\``);
|
|
1637
|
+
}
|
|
1638
|
+
if (step.output) {
|
|
1639
|
+
contentParts.push(`**Data returned:**\n\`\`\`\n${step.output}\n\`\`\``);
|
|
1640
|
+
}
|
|
1596
1641
|
}
|
|
1597
1642
|
}
|
|
1598
|
-
if (message.answer) {
|
|
1599
|
-
contentParts.push(`### Answer\n\n${message.answer}`);
|
|
1600
|
-
}
|
|
1601
1643
|
return contentParts.join('\n\n');
|
|
1602
1644
|
}
|
|
1603
1645
|
|
|
@@ -204,6 +204,19 @@ export type ImageInputData = {
|
|
|
204
204
|
inputType: AiAssistanceModel.AiAgent.MultimodalInputType,
|
|
205
205
|
};
|
|
206
206
|
|
|
207
|
+
export interface AnswerPart {
|
|
208
|
+
type: 'answer';
|
|
209
|
+
text: string;
|
|
210
|
+
suggestions?: [string, ...string[]];
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export interface StepPart {
|
|
214
|
+
type: 'step';
|
|
215
|
+
step: Step;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export type ModelMessagePart = AnswerPart|StepPart;
|
|
219
|
+
|
|
207
220
|
export interface UserChatMessage {
|
|
208
221
|
entity: ChatMessageEntity.USER;
|
|
209
222
|
text: string;
|
|
@@ -211,9 +224,7 @@ export interface UserChatMessage {
|
|
|
211
224
|
}
|
|
212
225
|
export interface ModelChatMessage {
|
|
213
226
|
entity: ChatMessageEntity.MODEL;
|
|
214
|
-
|
|
215
|
-
suggestions?: [string, ...string[]];
|
|
216
|
-
answer?: string;
|
|
227
|
+
parts: ModelMessagePart[];
|
|
217
228
|
error?: AiAssistanceModel.AiAgent.ErrorType;
|
|
218
229
|
rpcId?: Host.AidaClient.RpcGlobalId;
|
|
219
230
|
}
|
|
@@ -839,20 +850,21 @@ function renderChatMessage({
|
|
|
839
850
|
</div>
|
|
840
851
|
</div>
|
|
841
852
|
${Lit.Directives.repeat(
|
|
842
|
-
message.
|
|
853
|
+
message.parts,
|
|
843
854
|
(_, index) => index,
|
|
844
|
-
|
|
855
|
+
(part, index) => {
|
|
856
|
+
const isLastPart = index === message.parts.length - 1;
|
|
857
|
+
if (part.type === 'answer') {
|
|
858
|
+
return html`<p>${renderTextAsMarkdown(part.text, markdownRenderer, { animate: !isReadOnly && isLoading && isLast && isLastPart })}</p>`;
|
|
859
|
+
}
|
|
845
860
|
return renderStep({
|
|
846
|
-
step,
|
|
861
|
+
step: part.step,
|
|
847
862
|
isLoading,
|
|
848
863
|
markdownRenderer,
|
|
849
|
-
isLast:
|
|
864
|
+
isLast: isLastPart && isLast,
|
|
850
865
|
});
|
|
851
866
|
},
|
|
852
867
|
)}
|
|
853
|
-
${message.answer
|
|
854
|
-
? html`<p>${renderTextAsMarkdown(message.answer, markdownRenderer, { animate: !isReadOnly && isLoading && isLast })}</p>`
|
|
855
|
-
: Lit.nothing}
|
|
856
868
|
${renderError(message)}
|
|
857
869
|
${isLast && isLoading
|
|
858
870
|
? Lit.nothing
|
|
@@ -864,7 +876,7 @@ function renderChatMessage({
|
|
|
864
876
|
}
|
|
865
877
|
onFeedbackSubmit(message.rpcId, rating, feedback);
|
|
866
878
|
},
|
|
867
|
-
suggestions: (isLast && !isReadOnly) ? message.suggestions : undefined,
|
|
879
|
+
suggestions: (isLast && !isReadOnly && message.parts.at(-1)?.type === 'answer') ? (message.parts.at(-1) as AnswerPart).suggestions : undefined,
|
|
868
880
|
onSuggestionClick,
|
|
869
881
|
onCopyResponseClick: () => onCopyResponseClick(message),
|
|
870
882
|
canShowFeedbackForm,
|
|
@@ -10,8 +10,8 @@ import type * as Platform from '../../core/platform/platform.js';
|
|
|
10
10
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
11
11
|
import type * as Protocol from '../../generated/protocol.js';
|
|
12
12
|
import * as Buttons from '../../ui/components/buttons/buttons.js';
|
|
13
|
-
import * as IconButton from '../../ui/components/icon_button/icon_button.js';
|
|
14
13
|
import * as uiI18n from '../../ui/i18n/i18n.js';
|
|
14
|
+
import {createIcon} from '../../ui/kit/kit.js';
|
|
15
15
|
import * as InlineEditor from '../../ui/legacy/components/inline_editor/inline_editor.js';
|
|
16
16
|
import * as Components from '../../ui/legacy/components/utils/utils.js';
|
|
17
17
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
@@ -517,7 +517,7 @@ export class AppManifestView extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
517
517
|
this.protocolHandlersSection =
|
|
518
518
|
this.reportView.appendSection(i18nString(UIStrings.protocolHandlers), 'undefined,protocol-handlers');
|
|
519
519
|
this.protocolHandlersView = new ApplicationComponents.ProtocolHandlersView.ProtocolHandlersView();
|
|
520
|
-
this.
|
|
520
|
+
this.protocolHandlersView.show(this.protocolHandlersSection.getFieldElement());
|
|
521
521
|
this.iconsSection = this.reportView.appendSection(i18nString(UIStrings.icons), 'report-section-icons', 'icons');
|
|
522
522
|
this.windowControlsSection =
|
|
523
523
|
this.reportView.appendSection(UIStrings.windowControlsOverlay, undefined, 'window-controls-overlay');
|
|
@@ -676,7 +676,7 @@ export class AppManifestView extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
676
676
|
UI.ARIAUtils.setLabel(appIdField, 'App Id');
|
|
677
677
|
appIdField.textContent = appId;
|
|
678
678
|
|
|
679
|
-
const helpIcon =
|
|
679
|
+
const helpIcon = createIcon('help', 'inline-icon');
|
|
680
680
|
helpIcon.title = i18nString(UIStrings.appIdExplainer);
|
|
681
681
|
helpIcon.setAttribute('jslog', `${VisualLogging.action('help').track({hover: true})}`);
|
|
682
682
|
appIdField.appendChild(helpIcon);
|
|
@@ -753,7 +753,8 @@ export class AppManifestView extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
753
753
|
}
|
|
754
754
|
|
|
755
755
|
const protocolHandlers = parsedManifest['protocol_handlers'] || [];
|
|
756
|
-
this.protocolHandlersView.
|
|
756
|
+
this.protocolHandlersView.protocolHandlers = protocolHandlers;
|
|
757
|
+
this.protocolHandlersView.manifestLink = url;
|
|
757
758
|
|
|
758
759
|
const icons = parsedManifest['icons'] || [];
|
|
759
760
|
this.iconsSection.clearContent();
|
|
@@ -933,7 +934,7 @@ export class AppManifestView extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
933
934
|
const wcoStatusMessage = this.windowControlsSection.appendRow();
|
|
934
935
|
|
|
935
936
|
if (hasWco) {
|
|
936
|
-
const checkmarkIcon =
|
|
937
|
+
const checkmarkIcon = createIcon('check-circle', 'inline-icon');
|
|
937
938
|
wcoStatusMessage.appendChild(checkmarkIcon);
|
|
938
939
|
|
|
939
940
|
const wco = document.createElement('code');
|
|
@@ -946,7 +947,7 @@ export class AppManifestView extends Common.ObjectWrapper.eventMixin<EventTypes,
|
|
|
946
947
|
await this.appendWindowControlsToSection(this.overlayModel, url, stringProperty('theme_color'));
|
|
947
948
|
}
|
|
948
949
|
} else {
|
|
949
|
-
const infoIcon =
|
|
950
|
+
const infoIcon = createIcon('info', 'inline-icon');
|
|
950
951
|
|
|
951
952
|
wcoStatusMessage.appendChild(infoIcon);
|
|
952
953
|
|
|
@@ -40,8 +40,8 @@ import * as Platform from '../../core/platform/platform.js';
|
|
|
40
40
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
41
41
|
import * as Protocol from '../../generated/protocol.js';
|
|
42
42
|
import * as IssuesManager from '../../models/issues_manager/issues_manager.js';
|
|
43
|
-
import * as IconButton from '../../ui/components/icon_button/icon_button.js';
|
|
44
43
|
import * as LegacyWrapper from '../../ui/components/legacy_wrapper/legacy_wrapper.js';
|
|
44
|
+
import {createIcon} from '../../ui/kit/kit.js';
|
|
45
45
|
import * as SourceFrame from '../../ui/legacy/components/source_frame/source_frame.js';
|
|
46
46
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
47
47
|
|
|
@@ -406,7 +406,7 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
|
|
|
406
406
|
i18nString(UIStrings.localStorageDescription), 'local-storage');
|
|
407
407
|
this.localStorageListTreeElement.setLink(
|
|
408
408
|
'https://developer.chrome.com/docs/devtools/storage/localstorage/' as Platform.DevToolsPath.UrlString);
|
|
409
|
-
const localStorageIcon =
|
|
409
|
+
const localStorageIcon = createIcon('table');
|
|
410
410
|
this.localStorageListTreeElement.setLeadingIcons([localStorageIcon]);
|
|
411
411
|
|
|
412
412
|
storageTreeElement.appendChild(this.localStorageListTreeElement);
|
|
@@ -415,7 +415,7 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
|
|
|
415
415
|
i18nString(UIStrings.sessionStorageDescription), 'session-storage');
|
|
416
416
|
this.sessionStorageListTreeElement.setLink(
|
|
417
417
|
'https://developer.chrome.com/docs/devtools/storage/sessionstorage/' as Platform.DevToolsPath.UrlString);
|
|
418
|
-
const sessionStorageIcon =
|
|
418
|
+
const sessionStorageIcon = createIcon('table');
|
|
419
419
|
this.sessionStorageListTreeElement.setLeadingIcons([sessionStorageIcon]);
|
|
420
420
|
|
|
421
421
|
storageTreeElement.appendChild(this.sessionStorageListTreeElement);
|
|
@@ -425,7 +425,7 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
|
|
|
425
425
|
i18nString(UIStrings.extensionStorageDescription), 'extension-storage');
|
|
426
426
|
this.extensionStorageListTreeElement.setLink(
|
|
427
427
|
'https://developer.chrome.com/docs/extensions/reference/api/storage/' as Platform.DevToolsPath.UrlString);
|
|
428
|
-
const extensionStorageIcon =
|
|
428
|
+
const extensionStorageIcon = createIcon('table');
|
|
429
429
|
this.extensionStorageListTreeElement.setLeadingIcons([extensionStorageIcon]);
|
|
430
430
|
|
|
431
431
|
storageTreeElement.appendChild(this.extensionStorageListTreeElement);
|
|
@@ -440,7 +440,7 @@ export class ApplicationPanelSidebar extends UI.Widget.VBox implements SDK.Targe
|
|
|
440
440
|
'cookies');
|
|
441
441
|
this.cookieListTreeElement.setLink(
|
|
442
442
|
'https://developer.chrome.com/docs/devtools/storage/cookies/' as Platform.DevToolsPath.UrlString);
|
|
443
|
-
const cookieIcon =
|
|
443
|
+
const cookieIcon = createIcon('cookie');
|
|
444
444
|
this.cookieListTreeElement.setLeadingIcons([cookieIcon]);
|
|
445
445
|
storageTreeElement.appendChild(this.cookieListTreeElement);
|
|
446
446
|
|
|
@@ -1064,7 +1064,7 @@ export class BackgroundServiceTreeElement extends ApplicationPanelTreeElement {
|
|
|
1064
1064
|
|
|
1065
1065
|
this.model = null;
|
|
1066
1066
|
|
|
1067
|
-
const backgroundServiceIcon =
|
|
1067
|
+
const backgroundServiceIcon = createIcon(this.getIconType());
|
|
1068
1068
|
this.setLeadingIcons([backgroundServiceIcon]);
|
|
1069
1069
|
}
|
|
1070
1070
|
|
|
@@ -1130,7 +1130,7 @@ export class ServiceWorkersTreeElement extends ApplicationPanelTreeElement {
|
|
|
1130
1130
|
|
|
1131
1131
|
constructor(storagePanel: ResourcesPanel) {
|
|
1132
1132
|
super(storagePanel, i18n.i18n.lockedString('Service workers'), false, 'service-workers');
|
|
1133
|
-
const icon =
|
|
1133
|
+
const icon = createIcon('gears');
|
|
1134
1134
|
this.setLeadingIcons([icon]);
|
|
1135
1135
|
}
|
|
1136
1136
|
|
|
@@ -1153,7 +1153,7 @@ export class AppManifestTreeElement extends ApplicationPanelTreeElement {
|
|
|
1153
1153
|
private view: AppManifestView;
|
|
1154
1154
|
constructor(storagePanel: ResourcesPanel) {
|
|
1155
1155
|
super(storagePanel, i18nString(UIStrings.manifest), true, 'manifest');
|
|
1156
|
-
const icon =
|
|
1156
|
+
const icon = createIcon('document');
|
|
1157
1157
|
this.setLeadingIcons([icon]);
|
|
1158
1158
|
self.onInvokeElement(this.listItemElement, this.onInvoke.bind(this));
|
|
1159
1159
|
const emptyView = new UI.EmptyWidget.EmptyWidget(
|
|
@@ -1207,7 +1207,7 @@ export class ManifestChildTreeElement extends ApplicationPanelTreeElement {
|
|
|
1207
1207
|
storagePanel: ResourcesPanel, element: Element, childTitle: string, fieldElement: HTMLElement,
|
|
1208
1208
|
jslogContext: string) {
|
|
1209
1209
|
super(storagePanel, childTitle, false, jslogContext);
|
|
1210
|
-
const icon =
|
|
1210
|
+
const icon = createIcon('document');
|
|
1211
1211
|
this.setLeadingIcons([icon]);
|
|
1212
1212
|
this.#sectionElement = element;
|
|
1213
1213
|
this.#sectionFieldElement = fieldElement;
|
|
@@ -1252,7 +1252,7 @@ export class ClearStorageTreeElement extends ApplicationPanelTreeElement {
|
|
|
1252
1252
|
private view?: StorageView;
|
|
1253
1253
|
constructor(storagePanel: ResourcesPanel) {
|
|
1254
1254
|
super(storagePanel, i18nString(UIStrings.storage), false, 'storage');
|
|
1255
|
-
const icon =
|
|
1255
|
+
const icon = createIcon('database');
|
|
1256
1256
|
this.setLeadingIcons([icon]);
|
|
1257
1257
|
}
|
|
1258
1258
|
|
|
@@ -1278,7 +1278,7 @@ export class IndexedDBTreeElement extends ExpandableApplicationPanelTreeElement
|
|
|
1278
1278
|
super(
|
|
1279
1279
|
storagePanel, i18nString(UIStrings.indexeddb), i18nString(UIStrings.noIndexeddb),
|
|
1280
1280
|
i18nString(UIStrings.indexeddbDescription), 'indexed-db');
|
|
1281
|
-
const icon =
|
|
1281
|
+
const icon = createIcon('database');
|
|
1282
1282
|
this.setLeadingIcons([icon]);
|
|
1283
1283
|
this.idbDatabaseTreeElements = [];
|
|
1284
1284
|
this.storageBucket = storageBucket;
|
|
@@ -1421,7 +1421,7 @@ export class IDBDatabaseTreeElement extends ApplicationPanelTreeElement {
|
|
|
1421
1421
|
this.model = model;
|
|
1422
1422
|
this.databaseId = databaseId;
|
|
1423
1423
|
this.idbObjectStoreTreeElements = new Map();
|
|
1424
|
-
const icon =
|
|
1424
|
+
const icon = createIcon('database');
|
|
1425
1425
|
this.setLeadingIcons([icon]);
|
|
1426
1426
|
this.model.addEventListener(IndexedDBModelEvents.DatabaseNamesRefreshed, this.refreshIndexedDB, this);
|
|
1427
1427
|
}
|
|
@@ -1546,7 +1546,7 @@ export class IDBObjectStoreTreeElement extends ApplicationPanelTreeElement {
|
|
|
1546
1546
|
this.idbIndexTreeElements = new Map();
|
|
1547
1547
|
this.objectStore = objectStore;
|
|
1548
1548
|
this.view = null;
|
|
1549
|
-
const icon =
|
|
1549
|
+
const icon = createIcon('table');
|
|
1550
1550
|
this.setLeadingIcons([icon]);
|
|
1551
1551
|
}
|
|
1552
1552
|
|
|
@@ -1758,7 +1758,7 @@ export class DOMStorageTreeElement extends ApplicationPanelTreeElement {
|
|
|
1758
1758
|
i18nString(UIStrings.localFiles),
|
|
1759
1759
|
false, domStorage.isLocalStorage ? 'local-storage-for-domain' : 'session-storage-for-domain');
|
|
1760
1760
|
this.domStorage = domStorage;
|
|
1761
|
-
const icon =
|
|
1761
|
+
const icon = createIcon('table');
|
|
1762
1762
|
this.setLeadingIcons([icon]);
|
|
1763
1763
|
}
|
|
1764
1764
|
|
|
@@ -1793,7 +1793,7 @@ export class ExtensionStorageTreeElement extends ApplicationPanelTreeElement {
|
|
|
1793
1793
|
super(
|
|
1794
1794
|
storagePanel, nameForExtensionStorageArea(extensionStorage.storageArea), false, 'extension-storage-for-domain');
|
|
1795
1795
|
this.extensionStorage = extensionStorage;
|
|
1796
|
-
const icon =
|
|
1796
|
+
const icon = createIcon('table');
|
|
1797
1797
|
this.setLeadingIcons([icon]);
|
|
1798
1798
|
}
|
|
1799
1799
|
|
|
@@ -1831,7 +1831,7 @@ export class ExtensionStorageTreeParentElement extends ApplicationPanelTreeEleme
|
|
|
1831
1831
|
constructor(storagePanel: ResourcesPanel, extensionId: string, extensionName: string) {
|
|
1832
1832
|
super(storagePanel, extensionName || extensionId, true, 'extension-storage-for-domain');
|
|
1833
1833
|
this.extensionId = extensionId;
|
|
1834
|
-
const icon =
|
|
1834
|
+
const icon = createIcon('table');
|
|
1835
1835
|
this.setLeadingIcons([icon]);
|
|
1836
1836
|
}
|
|
1837
1837
|
|
|
@@ -1851,7 +1851,7 @@ export class CookieTreeElement extends ApplicationPanelTreeElement {
|
|
|
1851
1851
|
this.target = frame.resourceTreeModel().target();
|
|
1852
1852
|
this.#cookieDomain = cookieUrl.securityOrigin();
|
|
1853
1853
|
this.tooltip = i18nString(UIStrings.cookiesUsedByFramesFromS, {PH1: this.#cookieDomain});
|
|
1854
|
-
const icon =
|
|
1854
|
+
const icon = createIcon('cookie');
|
|
1855
1855
|
// Note that we cannot use `cookieDomainInternal` here since it contains scheme.
|
|
1856
1856
|
if (IssuesManager.RelatedIssue.hasThirdPartyPhaseoutCookieIssueForDomain(cookieUrl.domain())) {
|
|
1857
1857
|
icon.name = 'warning-filled';
|
|
@@ -2172,7 +2172,7 @@ export class FrameTreeElement extends ApplicationPanelTreeElement {
|
|
|
2172
2172
|
}
|
|
2173
2173
|
|
|
2174
2174
|
async frameNavigated(frame: SDK.ResourceTreeModel.ResourceTreeFrame): Promise<void> {
|
|
2175
|
-
const icon =
|
|
2175
|
+
const icon = createIcon(this.getIconTypeForFrame(frame));
|
|
2176
2176
|
if (frame.unreachableUrl()) {
|
|
2177
2177
|
icon.classList.add('red-icon');
|
|
2178
2178
|
}
|
|
@@ -2374,7 +2374,7 @@ export class FrameResourceTreeElement extends ApplicationPanelTreeElement {
|
|
|
2374
2374
|
this.tooltip = resource.url;
|
|
2375
2375
|
resourceToFrameResourceTreeElement.set(this.resource, this);
|
|
2376
2376
|
|
|
2377
|
-
const icon =
|
|
2377
|
+
const icon = createIcon('document', 'navigator-file-tree-item');
|
|
2378
2378
|
icon.classList.add('navigator-' + resource.resourceType().name() + '-tree-item');
|
|
2379
2379
|
this.setLeadingIcons([icon]);
|
|
2380
2380
|
}
|
|
@@ -2465,7 +2465,7 @@ class FrameWindowTreeElement extends ApplicationPanelTreeElement {
|
|
|
2465
2465
|
|
|
2466
2466
|
updateIcon(canAccessOpener: boolean): void {
|
|
2467
2467
|
const iconType = canAccessOpener ? 'popup' : 'frame';
|
|
2468
|
-
const icon =
|
|
2468
|
+
const icon = createIcon(iconType);
|
|
2469
2469
|
this.setLeadingIcons([icon]);
|
|
2470
2470
|
}
|
|
2471
2471
|
|
|
@@ -2514,7 +2514,7 @@ class WorkerTreeElement extends ApplicationPanelTreeElement {
|
|
|
2514
2514
|
super(storagePanel, targetInfo.title || targetInfo.url || i18nString(UIStrings.worker), false, 'worker');
|
|
2515
2515
|
this.targetInfo = targetInfo;
|
|
2516
2516
|
this.view = null;
|
|
2517
|
-
const icon =
|
|
2517
|
+
const icon = createIcon('gears', 'navigator-file-tree-item');
|
|
2518
2518
|
this.setLeadingIcons([icon]);
|
|
2519
2519
|
}
|
|
2520
2520
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import * as Host from '../../core/host/host.js';
|
|
6
6
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
7
7
|
import type * as Platform from '../../core/platform/platform.js';
|
|
8
|
-
import
|
|
8
|
+
import {createIcon} from '../../ui/kit/kit.js';
|
|
9
9
|
|
|
10
10
|
import {ApplicationPanelTreeElement} from './ApplicationPanelTreeElement.js';
|
|
11
11
|
import * as ApplicationComponents from './components/components.js';
|
|
@@ -25,7 +25,7 @@ export class BackForwardCacheTreeElement extends ApplicationPanelTreeElement {
|
|
|
25
25
|
|
|
26
26
|
constructor(resourcesPanel: ResourcesPanel) {
|
|
27
27
|
super(resourcesPanel, i18nString(UIStrings.backForwardCache), false, 'bfcache');
|
|
28
|
-
const icon =
|
|
28
|
+
const icon = createIcon('database');
|
|
29
29
|
this.setLeadingIcons([icon]);
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
import * as Host from '../../core/host/host.js';
|
|
6
6
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
7
7
|
import type * as Platform from '../../core/platform/platform.js';
|
|
8
|
-
import * as IconButton from '../../ui/components/icon_button/icon_button.js';
|
|
9
8
|
import * as LegacyWrapper from '../../ui/components/legacy_wrapper/legacy_wrapper.js';
|
|
9
|
+
import {createIcon} from '../../ui/kit/kit.js';
|
|
10
10
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
11
11
|
|
|
12
12
|
import {ApplicationPanelTreeElement} from './ApplicationPanelTreeElement.js';
|
|
@@ -28,7 +28,7 @@ export class BounceTrackingMitigationsTreeElement extends ApplicationPanelTreeEl
|
|
|
28
28
|
|
|
29
29
|
constructor(resourcesPanel: ResourcesPanel) {
|
|
30
30
|
super(resourcesPanel, i18nString(UIStrings.bounceTrackingMitigations), false, 'bounce-tracking-mitigations');
|
|
31
|
-
const icon =
|
|
31
|
+
const icon = createIcon('database');
|
|
32
32
|
this.setLeadingIcons([icon]);
|
|
33
33
|
}
|
|
34
34
|
|