chrome-devtools-frontend 1.0.1657110 → 1.0.1660788
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/devtools-ux-writing-refactor/SKILL.md +125 -0
- package/.agents/skills/migrate-chromium-test/SKILL.md +15 -70
- package/.agents/skills/repro-flaky-tests/SKILL.md +53 -0
- package/.agents/skills/ui-eng-vision-orchestrator/SKILL.md +37 -18
- package/.agents/skills/version-control/SKILL.md +8 -1
- package/AUTHORS +1 -0
- package/SECURITY.md +3 -0
- package/docs/get_the_code.md +6 -0
- package/front_end/Images/src/ads.svg +1 -0
- package/front_end/Tests.js +6 -6
- package/front_end/core/common/Gzip.ts +12 -5
- package/front_end/core/common/ResourceType.ts +19 -19
- package/front_end/core/common/Revealer.ts +15 -15
- package/front_end/core/common/SettingRegistration.ts +19 -19
- package/front_end/core/host/AidaClient.ts +35 -9
- package/front_end/core/host/GdpClient.ts +10 -7
- package/front_end/core/platform/StringUtilities.ts +35 -0
- package/front_end/core/sdk/AccessibilityModel.snapshot.txt +17 -0
- package/front_end/core/sdk/AccessibilityModel.ts +132 -2
- package/front_end/core/sdk/CPUThrottlingManager.ts +8 -5
- package/front_end/core/sdk/CSSMetadata.ts +110 -16
- package/front_end/core/sdk/CompilerSourceMappingContentProvider.ts +2 -5
- package/front_end/core/sdk/ConsoleModel.ts +5 -5
- package/front_end/core/sdk/DOMDebuggerModel.ts +5 -1
- package/front_end/core/sdk/DOMModel.ts +32 -18
- package/front_end/core/sdk/NetworkManager.ts +58 -14
- package/front_end/core/sdk/NetworkRequest.ts +37 -1
- package/front_end/core/sdk/OverlayModel.ts +45 -6
- package/front_end/core/sdk/ResourceTreeModel.ts +6 -7
- package/front_end/core/sdk/ScreenCaptureModel.ts +2 -2
- package/front_end/core/sdk/ServerTiming.ts +17 -13
- package/front_end/core/sdk/ServiceWorkerCacheModel.ts +4 -2
- package/front_end/core/sdk/ServiceWorkerManager.ts +19 -5
- package/front_end/core/sdk/TargetManager.ts +10 -1
- package/front_end/core/sdk/TraceObject.ts +4 -2
- package/front_end/core/sdk/sdk-meta.ts +170 -0
- package/front_end/design_system_tokens.css +0 -5
- package/front_end/entrypoints/devtools_app/devtools_app.ts +1 -1
- package/front_end/entrypoints/formatter_worker/CSSFormatter.ts +13 -4
- package/front_end/entrypoints/formatter_worker/FormattedContentBuilder.ts +5 -2
- package/front_end/entrypoints/formatter_worker/FormatterWorker.ts +23 -4
- package/front_end/entrypoints/formatter_worker/HTMLFormatter.ts +33 -10
- package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +8 -3
- package/front_end/entrypoints/inspector_main/InspectorMain.ts +4 -4
- package/front_end/entrypoints/inspector_main/OutermostTargetSelector.ts +2 -2
- package/front_end/entrypoints/inspector_main/RenderingOptions.ts +36 -37
- package/front_end/entrypoints/inspector_main/inspector_main-meta.ts +15 -33
- package/front_end/entrypoints/js_app/js_app.ts +6 -5
- package/front_end/entrypoints/main/GlobalAiButton.ts +4 -4
- package/front_end/entrypoints/main/MainImpl.ts +25 -55
- package/front_end/entrypoints/main/main-meta.ts +50 -50
- package/front_end/entrypoints/node_app/app/NodeConnectionsPanel.ts +5 -5
- package/front_end/entrypoints/node_app/app/NodeMain.ts +3 -3
- package/front_end/entrypoints/node_app/node_app.ts +10 -9
- package/front_end/entrypoints/worker_app/WorkerMain.ts +1 -1
- package/front_end/foundation/Universe.ts +76 -6
- package/front_end/generated/InspectorBackendCommands.ts +3 -3
- package/front_end/generated/SupportedCSSProperties.js +19 -12
- package/front_end/generated/protocol.ts +7 -1
- package/front_end/models/ai_assistance/AiConversation.ts +19 -17
- package/front_end/models/ai_assistance/AiHistoryStorage.ts +37 -14
- package/front_end/models/ai_assistance/AiUtils.ts +38 -42
- package/front_end/models/ai_assistance/agents/AiAgent.ts +5 -1
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +3 -2
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +2 -1
- package/front_end/models/ai_assistance/agents/StorageAgent.ts +7 -5
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +270 -286
- package/front_end/models/ai_assistance/data_formatters/UnitFormatters.ts +20 -0
- package/front_end/models/ai_assistance/performance/AICallTree.ts +3 -1
- package/front_end/models/ai_assistance/tools/ListNetworkRequests.ts +3 -2
- package/front_end/models/autofill_manager/AutofillManager.ts +3 -1
- package/front_end/models/bindings/CSSWorkspaceBinding.ts +8 -5
- package/front_end/models/bindings/CompilerScriptMapping.ts +2 -1
- package/front_end/models/bindings/DebuggerLanguagePlugins.ts +15 -16
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +6 -4
- package/front_end/models/bindings/FileUtils.ts +11 -12
- package/front_end/models/bindings/NetworkProject.ts +4 -0
- package/front_end/models/bindings/PresentationConsoleMessageHelper.ts +2 -1
- package/front_end/models/bindings/ResourceUtils.ts +1 -1
- package/front_end/models/bindings/SASSSourceMapping.ts +8 -5
- package/front_end/models/emulation/DeviceModeModel.ts +14 -14
- package/front_end/models/emulation/EmulatedDevices.ts +392 -11
- package/front_end/models/extensions/ExtensionAPI.ts +6 -6
- package/front_end/models/extensions/LanguageExtensionEndpoint.ts +13 -12
- package/front_end/models/issues_manager/BounceTrackingIssue.ts +1 -1
- package/front_end/models/issues_manager/ClientHintIssue.ts +1 -1
- package/front_end/models/issues_manager/ConnectionAllowlistIssue.ts +1 -1
- package/front_end/models/issues_manager/ContentSecurityPolicyIssue.ts +7 -7
- package/front_end/models/issues_manager/CookieDeprecationMetadataIssue.ts +2 -2
- package/front_end/models/issues_manager/CookieIssue.ts +6 -7
- package/front_end/models/issues_manager/CorsIssue.ts +3 -3
- package/front_end/models/issues_manager/CrossOriginEmbedderPolicyIssue.ts +2 -2
- package/front_end/models/issues_manager/DeprecationIssue.ts +3 -3
- package/front_end/models/issues_manager/EmailVerificationRequestIssue.ts +1 -1
- package/front_end/models/issues_manager/FederatedAuthRequestIssue.ts +1 -1
- package/front_end/models/issues_manager/FederatedAuthUserInfoRequestIssue.ts +1 -1
- package/front_end/models/issues_manager/GenericIssue.ts +7 -7
- package/front_end/models/issues_manager/HeavyAdIssue.ts +3 -3
- package/front_end/models/issues_manager/Issue.ts +8 -8
- package/front_end/models/issues_manager/MixedContentIssue.ts +1 -1
- package/front_end/models/issues_manager/PartitioningBlobURLIssue.ts +3 -3
- package/front_end/models/issues_manager/QuirksModeIssue.ts +1 -1
- package/front_end/models/issues_manager/SRIMessageSignatureIssue.ts +2 -2
- package/front_end/models/issues_manager/SelectivePermissionsInterventionIssue.ts +2 -2
- package/front_end/models/issues_manager/SharedArrayBufferIssue.ts +2 -2
- package/front_end/models/issues_manager/SharedDictionaryIssue.ts +1 -1
- package/front_end/models/issues_manager/UnencodedDigestIssue.ts +3 -3
- package/front_end/models/javascript_metadata/NativeFunctions.js +5 -1
- package/front_end/models/stack_trace/StackTraceModel.ts +3 -3
- package/front_end/models/text_utils/ContentData.ts +27 -0
- package/front_end/models/trace/helpers/SamplesIntegrator.ts +21 -5
- package/front_end/models/trace_source_maps_resolver/SourceMapsResolver.ts +29 -14
- package/front_end/models/web_mcp/WebMCPModel.ts +24 -6
- package/front_end/models/workspace/IgnoreListManager.ts +6 -6
- package/front_end/models/workspace/UISourceCode.ts +3 -3
- package/front_end/models/workspace_diff/WorkspaceDiff.ts +23 -12
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +25 -22
- package/front_end/panels/ai_assistance/ExportConversation.ts +3 -4
- package/front_end/panels/ai_assistance/ai_assistance-meta.ts +3 -3
- package/front_end/panels/ai_assistance/components/ChatInput.ts +2 -2
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +7 -0
- package/front_end/panels/ai_assistance/components/DisabledWidget.ts +2 -2
- package/front_end/panels/animation/AnimationTimeline.ts +17 -19
- package/front_end/panels/animation/AnimationUI.ts +5 -5
- package/front_end/panels/animation/animation-meta.ts +2 -2
- package/front_end/panels/application/ApplicationPanelSidebar.ts +13 -4
- package/front_end/panels/application/BackgroundServiceView.ts +2 -1
- package/front_end/panels/application/DeviceBoundSessionsView.ts +2 -6
- package/front_end/panels/application/IndexedDBViews.ts +245 -262
- package/front_end/panels/application/OpenedWindowDetailsView.ts +1 -1
- package/front_end/panels/application/ResourcesPanel.ts +9 -2
- package/front_end/panels/application/ServiceWorkersView.ts +252 -211
- package/front_end/panels/application/StorageView.ts +97 -33
- package/front_end/panels/application/WebMCPView.ts +15 -1
- package/front_end/panels/application/components/AdsView.ts +1 -1
- package/front_end/panels/application/indexedDBViews.css +38 -9
- package/front_end/panels/application/preloading/helper/PreloadingForward.ts +2 -1
- package/front_end/panels/application/resourcesSidebar.css +5 -0
- package/front_end/panels/application/storageView.css +26 -9
- package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +5 -1
- package/front_end/panels/browser_debugger/browser_debugger-meta.ts +8 -6
- package/front_end/panels/common/DOMLinkifier.ts +1 -1
- package/front_end/panels/common/ExtensionServer.ts +119 -14
- package/front_end/panels/console/ConsoleContextSelector.ts +4 -4
- package/front_end/panels/console/ConsolePinPane.ts +12 -12
- package/front_end/panels/console/ConsolePrompt.ts +6 -6
- package/front_end/panels/console/ConsoleSidebar.ts +7 -7
- package/front_end/panels/console/ConsoleView.ts +45 -44
- package/front_end/panels/console/ConsoleViewMessage.ts +40 -40
- package/front_end/panels/console/SymbolizedErrorWidget.ts +2 -1
- package/front_end/panels/console/console-meta.ts +34 -34
- package/front_end/panels/console_counters/WarningErrorCounter.ts +2 -2
- package/front_end/panels/coverage/CoverageListView.ts +28 -28
- package/front_end/panels/coverage/CoverageModel.ts +2 -1
- package/front_end/panels/coverage/CoverageView.ts +23 -23
- package/front_end/panels/coverage/coverage-meta.ts +5 -5
- package/front_end/panels/css_overview/CSSOverviewCompletedView.ts +36 -36
- package/front_end/panels/css_overview/CSSOverviewProcessingView.ts +1 -1
- package/front_end/panels/css_overview/CSSOverviewSidebarPanel.ts +2 -2
- package/front_end/panels/css_overview/CSSOverviewStartView.ts +6 -6
- package/front_end/panels/css_overview/CSSOverviewUnusedDeclarations.ts +6 -6
- package/front_end/panels/css_overview/css_overview-meta.ts +2 -2
- package/front_end/panels/developer_resources/DeveloperResourcesListView.ts +20 -21
- package/front_end/panels/developer_resources/DeveloperResourcesView.ts +6 -8
- package/front_end/panels/developer_resources/developer_resources-meta.ts +2 -2
- package/front_end/panels/elements/AccessibilityTreeUtils.ts +8 -102
- package/front_end/panels/elements/AccessibilityTreeView.ts +163 -70
- package/front_end/panels/elements/ElementsPanel.ts +17 -11
- package/front_end/panels/elements/ElementsTreeElement.ts +49 -2
- package/front_end/panels/elements/ElementsTreeOutline.ts +4 -4
- package/front_end/panels/elements/LayoutPane.ts +1 -1
- package/front_end/panels/elements/MetricsSidebarPane.ts +100 -34
- package/front_end/panels/elements/StylePropertiesSection.ts +2 -2
- package/front_end/panels/elements/StylePropertyTreeElement.ts +8 -2
- package/front_end/panels/elements/StylesSidebarPane.ts +1 -1
- package/front_end/panels/elements/components/AccessibilityTreeNode.ts +7 -18
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +2 -2
- package/front_end/panels/elements/components/QueryContainer.ts +1 -1
- package/front_end/panels/issues/AffectedDirectivesView.ts +1 -1
- package/front_end/panels/issues/AffectedResourcesView.ts +2 -1
- package/front_end/panels/layer_viewer/LayerViewHost.ts +1 -1
- package/front_end/panels/media/EventDisplayTable.ts +2 -2
- package/front_end/panels/media/EventTimelineView.ts +4 -4
- package/front_end/panels/media/MainView.ts +4 -4
- package/front_end/panels/media/PlayerDetailView.ts +5 -5
- package/front_end/panels/media/PlayerListView.ts +1 -1
- package/front_end/panels/media/PlayerMessagesView.ts +12 -12
- package/front_end/panels/media/PlayerPropertiesView.ts +17 -17
- package/front_end/panels/network/NetworkDataGridNode.ts +124 -36
- package/front_end/panels/network/NetworkLogView.ts +11 -2
- package/front_end/panels/network/NetworkLogViewColumns.ts +18 -0
- package/front_end/panels/network/NetworkPanel.ts +2 -1
- package/front_end/panels/network/NetworkWaterfallColumn.ts +1 -3
- package/front_end/panels/network/RequestConditionsDrawer.ts +2 -2
- package/front_end/panels/network/RequestPayloadView.ts +53 -7
- package/front_end/panels/network/RequestPreviewView.ts +7 -1
- package/front_end/panels/network/components/ResponseHeaderSection.ts +1 -1
- package/front_end/panels/network/forward/UIFilter.ts +1 -0
- package/front_end/panels/network/networkPanel.css +1 -0
- package/front_end/panels/network/networkTimingTable.css +1 -1
- package/front_end/panels/network/requestPayloadView.css +10 -0
- package/front_end/panels/performance_monitor/PerformanceMonitor.ts +12 -12
- package/front_end/panels/performance_monitor/performance_monitor-meta.ts +7 -7
- package/front_end/panels/profiler/HeapDetachedElementsView.ts +2 -2
- package/front_end/panels/profiler/HeapProfileView.ts +563 -51
- package/front_end/panels/profiler/HeapSnapshotView.ts +15 -9
- package/front_end/panels/profiler/ProfilesPanel.ts +13 -7
- package/front_end/panels/profiler/WritableProfileHeader.ts +152 -0
- package/front_end/panels/profiler/profiler.ts +2 -2
- package/front_end/panels/protocol_monitor/JSONEditor.ts +10 -10
- package/front_end/panels/protocol_monitor/ProtocolMonitor.ts +28 -32
- package/front_end/panels/protocol_monitor/protocol_monitor-meta.ts +1 -1
- package/front_end/panels/recorder/RecorderController.ts +15 -15
- package/front_end/panels/recorder/RecorderEvents.ts +8 -0
- package/front_end/panels/recorder/components/CreateRecordingView.ts +11 -11
- package/front_end/panels/recorder/components/ExtensionView.ts +74 -83
- package/front_end/panels/recorder/components/RecordingListView.ts +3 -3
- package/front_end/panels/recorder/components/RecordingView.ts +13 -10
- package/front_end/panels/recorder/components/ReplaySection.ts +9 -9
- package/front_end/panels/recorder/components/StepEditor.ts +352 -321
- package/front_end/panels/recorder/components/StepView.ts +36 -37
- package/front_end/panels/recorder/components/recordingView.css +1 -1
- package/front_end/panels/recorder/models/RecorderSettings.ts +2 -2
- package/front_end/panels/recorder/recorder-meta.ts +7 -7
- package/front_end/panels/screencast/ScreencastApp.ts +1 -1
- package/front_end/panels/screencast/ScreencastView.ts +12 -12
- package/front_end/panels/search/SearchResultsPane.ts +4 -4
- package/front_end/panels/search/SearchView.ts +20 -20
- package/front_end/panels/security/SecurityModel.ts +7 -7
- package/front_end/panels/security/SecurityPanel.ts +99 -107
- package/front_end/panels/security/SecurityPanelSidebar.ts +7 -7
- package/front_end/panels/security/security-meta.ts +2 -2
- package/front_end/panels/sensors/LocationsSettingsTab.ts +19 -19
- package/front_end/panels/sensors/SensorsView.ts +27 -27
- package/front_end/panels/sensors/sensors-meta.ts +13 -167
- package/front_end/panels/settings/AISettingsTab.ts +98 -56
- package/front_end/panels/settings/EditFileSystemView.ts +2 -2
- package/front_end/panels/settings/FrameworkIgnoreListSettingsTab.ts +20 -20
- package/front_end/panels/settings/KeybindsSettingsTab.ts +20 -21
- package/front_end/panels/settings/SettingsScreen.ts +11 -11
- package/front_end/panels/settings/WorkspaceSettingsTab.ts +5 -5
- package/front_end/panels/settings/components/SyncSection.ts +12 -12
- package/front_end/panels/settings/emulation/DevicesSettingsTab.ts +13 -13
- package/front_end/panels/settings/emulation/components/UserAgentClientHintsForm.ts +31 -31
- package/front_end/panels/settings/emulation/emulation-meta.ts +1 -1
- package/front_end/panels/settings/settings-meta.ts +14 -14
- package/front_end/panels/sources/NavigatorView.ts +7 -6
- package/front_end/panels/sources/ScopeChainSidebarPane.ts +83 -37
- package/front_end/panels/sources/SourcesNavigator.ts +20 -18
- package/front_end/panels/sources/SourcesView.ts +10 -1
- package/front_end/panels/sources/scopeChainSidebarPane.css +12 -4
- package/front_end/panels/sources/sources-meta.ts +4 -4
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +5 -2
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +2 -1
- package/front_end/panels/timeline/TimelineFlameChartNetworkDataProvider.ts +2 -1
- package/front_end/panels/timeline/TimelineFlameChartView.ts +1 -1
- package/front_end/panels/timeline/TimelinePanel.ts +2 -1
- package/front_end/panels/timeline/TimelineUIUtils.ts +5 -2
- package/front_end/panels/timeline/components/NetworkRequestDetails.ts +4 -2
- package/front_end/panels/timeline/components/NetworkRequestTooltip.ts +4 -2
- package/front_end/panels/timeline/components/insights/ImageRef.ts +2 -1
- package/front_end/panels/utils/utils.ts +7 -3
- package/front_end/panels/web_audio/WebAudioView.ts +17 -18
- package/front_end/panels/web_audio/web_audio-meta.ts +3 -3
- package/front_end/panels/webauthn/WebauthnPane.ts +10 -10
- package/front_end/panels/whats_new/ReleaseNoteView.ts +1 -1
- package/front_end/panels/whats_new/whats_new-meta.ts +11 -11
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/lit/lib/async-directive.d.ts +2 -1
- package/front_end/third_party/lit/lib/async-directive.js +1 -1
- package/front_end/third_party/lit/lib/async-directive.js.map +1 -1
- package/front_end/third_party/lit/lib/decorators.d.ts +2 -1
- package/front_end/third_party/lit/lib/decorators.js.map +1 -1
- package/front_end/third_party/lit/lib/directive.d.ts +2 -1
- package/front_end/third_party/lit/lib/directive.js.map +1 -1
- package/front_end/third_party/lit/lib/directives.d.ts +2 -1
- package/front_end/third_party/lit/lib/directives.js +8 -8
- package/front_end/third_party/lit/lib/directives.js.map +1 -1
- package/front_end/third_party/lit/lib/lit.d.ts +2 -1
- package/front_end/third_party/lit/lib/lit.js +1 -1
- package/front_end/third_party/lit/lib/lit.js.map +1 -1
- package/front_end/third_party/lit/lib/static-html.d.ts +2 -1
- package/front_end/third_party/lit/lib/static-html.js +1 -1
- package/front_end/third_party/lit/lib/static-html.js.map +1 -1
- package/front_end/third_party/lit/package.json +2 -2
- package/front_end/third_party/lit/rebuild.sh +1 -1
- package/front_end/third_party/lit/src/async-directive.ts +5 -0
- package/front_end/ui/components/dialogs/Dialog.ts +1 -1
- package/front_end/ui/components/dialogs/ShortcutDialog.ts +1 -1
- package/front_end/ui/components/dialogs/shortcutDialog.css +15 -12
- package/front_end/ui/components/diff_view/DiffView.ts +2 -2
- package/front_end/ui/components/issue_counter/IssueCounter.ts +3 -3
- package/front_end/ui/components/issue_counter/IssueLinkIcon.ts +5 -5
- package/front_end/ui/components/lists/List.ts +2 -2
- package/front_end/ui/components/panel_feedback/PreviewToggle.ts +1 -1
- package/front_end/ui/components/request_link_icon/RequestLinkIcon.ts +5 -5
- package/front_end/ui/components/settings/SettingCheckbox.ts +1 -1
- package/front_end/ui/components/snackbars/Snackbar.ts +1 -1
- package/front_end/ui/components/survey_link/SurveyLink.ts +3 -3
- package/front_end/ui/components/text_editor/config.ts +2 -2
- package/front_end/ui/components/tree_outline/TreeOutline.ts +34 -1
- package/front_end/ui/legacy/ReportView.ts +5 -0
- package/front_end/ui/legacy/Treeoutline.ts +18 -0
- package/front_end/ui/legacy/View.ts +1 -1
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +2 -0
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +8 -3
- package/front_end/ui/legacy/components/data_grid/data_grid.ts +1 -0
- package/front_end/ui/legacy/components/object_ui/ObjectPopoverHelper.ts +1 -1
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +100 -36
- package/front_end/ui/legacy/components/source_frame/ResourceSourceFrame.ts +7 -1
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +5 -0
- package/front_end/ui/legacy/components/utils/ImagePreview.ts +4 -2
- package/front_end/ui/legacy/inspectorCommon.css +5 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +4 -0
- package/mcp/mcp.ts +2 -0
- package/package.json +4 -4
- package/front_end/panels/profiler/ProfileView.ts +0 -610
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as Common from '../core/common/common.js';
|
|
6
|
-
import
|
|
6
|
+
import * as Host from '../core/host/host.js';
|
|
7
7
|
import * as Root from '../core/root/root.js';
|
|
8
8
|
import * as SDK from '../core/sdk/sdk.js';
|
|
9
9
|
import * as AutofillManager from '../models/autofill_manager/autofill_manager.js';
|
|
@@ -12,16 +12,19 @@ import * as Breakpoints from '../models/breakpoints/breakpoints.js';
|
|
|
12
12
|
import * as CrUXManager from '../models/crux-manager/crux-manager.js';
|
|
13
13
|
import * as Emulation from '../models/emulation/emulation.js';
|
|
14
14
|
import * as JavaScriptMetadata from '../models/javascript_metadata/javascript_metadata.js';
|
|
15
|
+
import * as LiveMetrics from '../models/live-metrics/live-metrics.js';
|
|
15
16
|
import * as Logs from '../models/logs/logs.js';
|
|
16
17
|
import * as Persistence from '../models/persistence/persistence.js';
|
|
17
18
|
import * as ProjectSettings from '../models/project_settings/project_settings.js';
|
|
18
19
|
import * as Workspace from '../models/workspace/workspace.js';
|
|
20
|
+
import * as WorkspaceDiff from '../models/workspace_diff/workspace_diff.js';
|
|
19
21
|
|
|
20
22
|
export interface CreationOptions {
|
|
21
23
|
settingsCreationOptions: Omit<Common.Settings.SettingsCreationOptions, 'console'>;
|
|
22
24
|
overrideAutoStartModels?: Set<SDK.SDKModel.SDKModelConstructor>;
|
|
23
25
|
hostConfig: Root.Runtime.HostConfig;
|
|
24
26
|
inspectorFrontendHost: Host.InspectorFrontendHostAPI.InspectorFrontendHostAPI;
|
|
27
|
+
supportsEmulation: boolean;
|
|
25
28
|
}
|
|
26
29
|
|
|
27
30
|
export class Universe {
|
|
@@ -30,6 +33,8 @@ export class Universe {
|
|
|
30
33
|
// directly on the `Universe`.
|
|
31
34
|
readonly context: Root.DevToolsContext.DevToolsContext;
|
|
32
35
|
readonly autofillManager: AutofillManager.AutofillManager.AutofillManager;
|
|
36
|
+
readonly supportsEmulation: boolean;
|
|
37
|
+
readonly fileSystemWorkspaceBinding: Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding;
|
|
33
38
|
|
|
34
39
|
constructor(options: CreationOptions) {
|
|
35
40
|
const context = new Root.DevToolsContext.WritableDevToolsContext();
|
|
@@ -38,6 +43,12 @@ export class Universe {
|
|
|
38
43
|
const console = new Common.Console.Console();
|
|
39
44
|
context.set(Common.Console.Console, console);
|
|
40
45
|
|
|
46
|
+
const hostConfigTracker = new Host.AidaClient.HostConfigTracker();
|
|
47
|
+
context.set(Host.AidaClient.HostConfigTracker, hostConfigTracker);
|
|
48
|
+
|
|
49
|
+
const gdpClient = new Host.GdpClient.GdpClient();
|
|
50
|
+
context.set(Host.GdpClient.GdpClient, gdpClient);
|
|
51
|
+
|
|
41
52
|
// TODO(crbug.com/458180550): Store instance only on this.context instead.
|
|
42
53
|
// For now the global is required as not everything in foundation cleanly
|
|
43
54
|
// reads from the scoped `Settings` instance.
|
|
@@ -48,6 +59,9 @@ export class Universe {
|
|
|
48
59
|
});
|
|
49
60
|
context.set(Common.Settings.Settings, settings);
|
|
50
61
|
|
|
62
|
+
const emulatedDevicesList = new Emulation.EmulatedDevices.EmulatedDevicesList(settings);
|
|
63
|
+
context.set(Emulation.EmulatedDevices.EmulatedDevicesList, emulatedDevicesList);
|
|
64
|
+
|
|
51
65
|
const isolatedFileSystemManager =
|
|
52
66
|
new Persistence.IsolatedFileSystemManager.IsolatedFileSystemManager(settings, console);
|
|
53
67
|
context.set(Persistence.IsolatedFileSystemManager.IsolatedFileSystemManager, isolatedFileSystemManager);
|
|
@@ -61,9 +75,13 @@ export class Universe {
|
|
|
61
75
|
const multitargetNetworkManager = new SDK.NetworkManager.MultitargetNetworkManager(targetManager);
|
|
62
76
|
context.set(SDK.NetworkManager.MultitargetNetworkManager, multitargetNetworkManager);
|
|
63
77
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
78
|
+
this.supportsEmulation = options.supportsEmulation;
|
|
79
|
+
let deviceModeModel = null;
|
|
80
|
+
if (options.supportsEmulation) {
|
|
81
|
+
deviceModeModel =
|
|
82
|
+
new Emulation.DeviceModeModel.DeviceModeModel(targetManager, settings, multitargetNetworkManager);
|
|
83
|
+
context.set(Emulation.DeviceModeModel.DeviceModeModel, deviceModeModel);
|
|
84
|
+
}
|
|
67
85
|
|
|
68
86
|
const pageResourceLoader =
|
|
69
87
|
new SDK.PageResourceLoader.PageResourceLoader(targetManager, settings, multitargetNetworkManager, null);
|
|
@@ -100,6 +118,9 @@ export class Universe {
|
|
|
100
118
|
const workspace = new Workspace.Workspace.WorkspaceImpl();
|
|
101
119
|
context.set(Workspace.Workspace.WorkspaceImpl, workspace);
|
|
102
120
|
|
|
121
|
+
const fileManager = new Workspace.FileManager.FileManager();
|
|
122
|
+
context.set(Workspace.FileManager.FileManager, fileManager);
|
|
123
|
+
|
|
103
124
|
const automaticFileSystemWorkspaceBinding =
|
|
104
125
|
new Persistence.AutomaticFileSystemWorkspaceBinding.AutomaticFileSystemWorkspaceBinding(
|
|
105
126
|
automaticFileSystemManager,
|
|
@@ -111,6 +132,9 @@ export class Universe {
|
|
|
111
132
|
automaticFileSystemWorkspaceBinding,
|
|
112
133
|
);
|
|
113
134
|
|
|
135
|
+
this.fileSystemWorkspaceBinding =
|
|
136
|
+
new Persistence.FileSystemWorkspaceBinding.FileSystemWorkspaceBinding(isolatedFileSystemManager, workspace);
|
|
137
|
+
|
|
114
138
|
const ignoreListManager = new Workspace.IgnoreListManager.IgnoreListManager(settings, targetManager);
|
|
115
139
|
context.set(Workspace.IgnoreListManager.IgnoreListManager, ignoreListManager);
|
|
116
140
|
|
|
@@ -122,6 +146,9 @@ export class Universe {
|
|
|
122
146
|
resourceMapping, targetManager, ignoreListManager, workspace);
|
|
123
147
|
context.set(Bindings.DebuggerWorkspaceBinding.DebuggerWorkspaceBinding, debuggerWorkspaceBinding);
|
|
124
148
|
|
|
149
|
+
const networkProjectManager = new Bindings.NetworkProject.NetworkProjectManager();
|
|
150
|
+
context.set(Bindings.NetworkProject.NetworkProjectManager, networkProjectManager);
|
|
151
|
+
|
|
125
152
|
const breakpointManager = new Breakpoints.BreakpointManager.BreakpointManager(targetManager, workspace,
|
|
126
153
|
debuggerWorkspaceBinding, settings);
|
|
127
154
|
context.set(Breakpoints.BreakpointManager.BreakpointManager, breakpointManager);
|
|
@@ -140,6 +167,13 @@ export class Universe {
|
|
|
140
167
|
);
|
|
141
168
|
context.set(Persistence.NetworkPersistenceManager.NetworkPersistenceManager, networkPersistenceManager);
|
|
142
169
|
|
|
170
|
+
const workspaceDiff = new WorkspaceDiff.WorkspaceDiff.WorkspaceDiffImpl(
|
|
171
|
+
workspace,
|
|
172
|
+
persistence,
|
|
173
|
+
networkPersistenceManager,
|
|
174
|
+
);
|
|
175
|
+
context.set(WorkspaceDiff.WorkspaceDiff.WorkspaceDiffImpl, workspaceDiff);
|
|
176
|
+
|
|
143
177
|
const networkLog = new Logs.NetworkLog.NetworkLog(targetManager, settings);
|
|
144
178
|
context.set(Logs.NetworkLog.NetworkLog, networkLog);
|
|
145
179
|
|
|
@@ -149,6 +183,9 @@ export class Universe {
|
|
|
149
183
|
const javaScriptMetadata = new JavaScriptMetadata.JavaScriptMetadata.JavaScriptMetadataImpl();
|
|
150
184
|
context.set(JavaScriptMetadata.JavaScriptMetadata.JavaScriptMetadataImpl, javaScriptMetadata);
|
|
151
185
|
|
|
186
|
+
const liveMetrics = new LiveMetrics.LiveMetrics(targetManager, deviceModeModel);
|
|
187
|
+
context.set(LiveMetrics.LiveMetrics, liveMetrics);
|
|
188
|
+
|
|
152
189
|
this.autofillManager = new AutofillManager.AutofillManager.AutofillManager(targetManager, frameManager);
|
|
153
190
|
}
|
|
154
191
|
|
|
@@ -172,8 +209,9 @@ export class Universe {
|
|
|
172
209
|
return this.context.get(CrUXManager.CrUXManager);
|
|
173
210
|
}
|
|
174
211
|
|
|
175
|
-
|
|
176
|
-
|
|
212
|
+
// The DeviceModeModel may not be present, as emulation is only present for the `devtools_app` entrypoint, but not for the others.
|
|
213
|
+
get deviceModeModel(): Emulation.DeviceModeModel.DeviceModeModel|null {
|
|
214
|
+
return this.supportsEmulation ? this.context.get(Emulation.DeviceModeModel.DeviceModeModel) : null;
|
|
177
215
|
}
|
|
178
216
|
|
|
179
217
|
get domDebuggerManager(): SDK.DOMDebuggerModel.DOMDebuggerManager {
|
|
@@ -184,10 +222,26 @@ export class Universe {
|
|
|
184
222
|
return this.context.get(SDK.DOMModel.DOMModelUndoStack);
|
|
185
223
|
}
|
|
186
224
|
|
|
225
|
+
get emulatedDevicesList(): Emulation.EmulatedDevices.EmulatedDevicesList {
|
|
226
|
+
return this.context.get(Emulation.EmulatedDevices.EmulatedDevicesList);
|
|
227
|
+
}
|
|
228
|
+
|
|
187
229
|
get eventBreakpointsManager(): SDK.EventBreakpointsModel.EventBreakpointsManager {
|
|
188
230
|
return this.context.get(SDK.EventBreakpointsModel.EventBreakpointsManager);
|
|
189
231
|
}
|
|
190
232
|
|
|
233
|
+
get fileManager(): Workspace.FileManager.FileManager {
|
|
234
|
+
return this.context.get(Workspace.FileManager.FileManager);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
get gdpClient(): Host.GdpClient.GdpClient {
|
|
238
|
+
return this.context.get(Host.GdpClient.GdpClient);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
get hostConfigTracker(): Host.AidaClient.HostConfigTracker {
|
|
242
|
+
return this.context.get(Host.AidaClient.HostConfigTracker);
|
|
243
|
+
}
|
|
244
|
+
|
|
191
245
|
get isolatedFileSystemManager(): Persistence.IsolatedFileSystemManager.IsolatedFileSystemManager {
|
|
192
246
|
return this.context.get(Persistence.IsolatedFileSystemManager.IsolatedFileSystemManager);
|
|
193
247
|
}
|
|
@@ -200,6 +254,18 @@ export class Universe {
|
|
|
200
254
|
return this.context.get(Persistence.NetworkPersistenceManager.NetworkPersistenceManager);
|
|
201
255
|
}
|
|
202
256
|
|
|
257
|
+
get networkProjectManager(): Bindings.NetworkProject.NetworkProjectManager {
|
|
258
|
+
return this.context.get(Bindings.NetworkProject.NetworkProjectManager);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
get liveMetrics(): LiveMetrics.LiveMetrics {
|
|
262
|
+
return this.context.get(LiveMetrics.LiveMetrics);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
get frameManager(): SDK.FrameManager.FrameManager {
|
|
266
|
+
return this.context.get(SDK.FrameManager.FrameManager);
|
|
267
|
+
}
|
|
268
|
+
|
|
203
269
|
get pageResourceLoader(): SDK.PageResourceLoader.PageResourceLoader {
|
|
204
270
|
return this.context.get(SDK.PageResourceLoader.PageResourceLoader);
|
|
205
271
|
}
|
|
@@ -223,4 +289,8 @@ export class Universe {
|
|
|
223
289
|
get workspace(): Workspace.Workspace.WorkspaceImpl {
|
|
224
290
|
return this.context.get(Workspace.Workspace.WorkspaceImpl);
|
|
225
291
|
}
|
|
292
|
+
|
|
293
|
+
get workspaceDiff(): WorkspaceDiff.WorkspaceDiff.WorkspaceDiffImpl {
|
|
294
|
+
return this.context.get(WorkspaceDiff.WorkspaceDiff.WorkspaceDiffImpl);
|
|
295
|
+
}
|
|
226
296
|
}
|
|
@@ -511,7 +511,7 @@ inspectorBackend.registerCommand("DeviceOrientation.setDeviceOrientationOverride
|
|
|
511
511
|
|
|
512
512
|
// DigitalCredentials.
|
|
513
513
|
inspectorBackend.registerEnum("DigitalCredentials.VirtualWalletAction", {Respond: "respond", Decline: "decline", Wait: "wait", Clear: "clear"});
|
|
514
|
-
inspectorBackend.registerCommand("DigitalCredentials.setVirtualWalletBehavior", [{"name": "action", "type": "string", "optional": false, "description": "The action of the virtual wallet.", "typeRef": "DigitalCredentials.VirtualWalletAction"}, {"name": "protocol", "type": "string", "optional": true, "description": "The protocol identifier (e.g. \\\"openid4vp\\\"). Required when |action| is \\\"respond\\\", forbidden otherwise.", "typeRef": null}, {"name": "response", "type": "object", "optional": true, "description": "The response data object returned by the wallet. Required when |action| is \\\"respond\\\", forbidden otherwise.", "typeRef": null}], [], "Sets the behavior of the virtual wallet for digital credential requests issued from this frame.");
|
|
514
|
+
inspectorBackend.registerCommand("DigitalCredentials.setVirtualWalletBehavior", [{"name": "action", "type": "string", "optional": false, "description": "The action of the virtual wallet.", "typeRef": "DigitalCredentials.VirtualWalletAction"}, {"name": "protocol", "type": "string", "optional": true, "description": "The protocol identifier (e.g. \\\"openid4vp\\\"). Required when |action| is \\\"respond\\\", forbidden otherwise.", "typeRef": null}, {"name": "response", "type": "object", "optional": true, "description": "The response data object returned by the wallet. Required when |action| is \\\"respond\\\", forbidden otherwise.", "typeRef": null}, {"name": "frameId", "type": "string", "optional": true, "description": "The frame to scope the virtual wallet behavior to.", "typeRef": "Page.FrameId"}], [], "Sets the behavior of the virtual wallet for digital credential requests issued from this frame.");
|
|
515
515
|
|
|
516
516
|
// Emulation.
|
|
517
517
|
inspectorBackend.registerEnum("Emulation.ScreenOrientationType", {PortraitPrimary: "portraitPrimary", PortraitSecondary: "portraitSecondary", LandscapePrimary: "landscapePrimary", LandscapeSecondary: "landscapeSecondary"});
|
|
@@ -819,8 +819,8 @@ inspectorBackend.registerEnum("Network.ContentSecurityPolicySource", {HTTP: "HTT
|
|
|
819
819
|
inspectorBackend.registerEnum("Network.ReportStatus", {Queued: "Queued", Pending: "Pending", MarkedForRemoval: "MarkedForRemoval", Success: "Success"});
|
|
820
820
|
inspectorBackend.registerEnum("Network.DeviceBoundSessionWithUsageUsage", {NotInScope: "NotInScope", InScopeRefreshNotYetNeeded: "InScopeRefreshNotYetNeeded", InScopeRefreshNotAllowed: "InScopeRefreshNotAllowed", ProactiveRefreshNotPossible: "ProactiveRefreshNotPossible", ProactiveRefreshAttempted: "ProactiveRefreshAttempted", Deferred: "Deferred"});
|
|
821
821
|
inspectorBackend.registerEnum("Network.DeviceBoundSessionUrlRuleRuleType", {Exclude: "Exclude", Include: "Include"});
|
|
822
|
-
inspectorBackend.registerEnum("Network.DeviceBoundSessionFetchResult", {Success: "Success", SigningKeyGenerationError: "SigningKeyGenerationError", AttestationKeyGenerationError: "AttestationKeyGenerationError", SigningError: "SigningError", TransientSigningError: "TransientSigningError", ServerRequestedTermination: "ServerRequestedTermination", InvalidSessionId: "InvalidSessionId", InvalidChallenge: "InvalidChallenge", TooManyChallenges: "TooManyChallenges", InvalidFetcherUrl: "InvalidFetcherUrl", InvalidRefreshUrl: "InvalidRefreshUrl", TransientHttpError: "TransientHttpError", ScopeOriginSameSiteMismatch: "ScopeOriginSameSiteMismatch", RefreshUrlSameSiteMismatch: "RefreshUrlSameSiteMismatch", MismatchedSessionId: "MismatchedSessionId", MissingScope: "MissingScope", NoCredentials: "NoCredentials", SubdomainRegistrationWellKnownUnavailable: "SubdomainRegistrationWellKnownUnavailable", SubdomainRegistrationUnauthorized: "SubdomainRegistrationUnauthorized", SubdomainRegistrationWellKnownMalformed: "SubdomainRegistrationWellKnownMalformed", SessionProviderWellKnownUnavailable: "SessionProviderWellKnownUnavailable", RelyingPartyWellKnownUnavailable: "RelyingPartyWellKnownUnavailable", FederatedKeyThumbprintMismatch: "FederatedKeyThumbprintMismatch", InvalidFederatedSessionUrl: "InvalidFederatedSessionUrl", InvalidFederatedKey: "InvalidFederatedKey", TooManyRelyingOriginLabels: "TooManyRelyingOriginLabels", BoundCookieSetForbidden: "BoundCookieSetForbidden", NetError: "NetError", ProxyError: "ProxyError", EmptySessionConfig: "EmptySessionConfig", InvalidCredentialsConfig: "InvalidCredentialsConfig", InvalidCredentialsType: "InvalidCredentialsType", InvalidCredentialsEmptyName: "InvalidCredentialsEmptyName", InvalidCredentialsCookie: "InvalidCredentialsCookie", PersistentHttpError: "PersistentHttpError", RegistrationAttemptedChallenge: "RegistrationAttemptedChallenge", InvalidScopeOrigin: "InvalidScopeOrigin", ScopeOriginContainsPath: "ScopeOriginContainsPath", RefreshInitiatorNotString: "RefreshInitiatorNotString", RefreshInitiatorInvalidHostPattern: "RefreshInitiatorInvalidHostPattern", InvalidScopeSpecification: "InvalidScopeSpecification", MissingScopeSpecificationType: "MissingScopeSpecificationType", EmptyScopeSpecificationDomain: "EmptyScopeSpecificationDomain", EmptyScopeSpecificationPath: "EmptyScopeSpecificationPath", InvalidScopeSpecificationType: "InvalidScopeSpecificationType", InvalidScopeIncludeSite: "InvalidScopeIncludeSite", MissingScopeIncludeSite: "MissingScopeIncludeSite", FederatedNotAuthorizedByProvider: "FederatedNotAuthorizedByProvider", FederatedNotAuthorizedByRelyingParty: "FederatedNotAuthorizedByRelyingParty", SessionProviderWellKnownMalformed: "SessionProviderWellKnownMalformed", SessionProviderWellKnownHasProviderOrigin: "SessionProviderWellKnownHasProviderOrigin", RelyingPartyWellKnownMalformed: "RelyingPartyWellKnownMalformed", RelyingPartyWellKnownHasRelyingOrigins: "RelyingPartyWellKnownHasRelyingOrigins", InvalidFederatedSessionProviderSessionMissing: "InvalidFederatedSessionProviderSessionMissing", InvalidFederatedSessionWrongProviderOrigin: "InvalidFederatedSessionWrongProviderOrigin", InvalidCredentialsCookieCreationTime: "InvalidCredentialsCookieCreationTime", InvalidCredentialsCookieName: "InvalidCredentialsCookieName", InvalidCredentialsCookieParsing: "InvalidCredentialsCookieParsing", InvalidCredentialsCookieUnpermittedAttribute: "InvalidCredentialsCookieUnpermittedAttribute", InvalidCredentialsCookieInvalidDomain: "InvalidCredentialsCookieInvalidDomain", InvalidCredentialsCookiePrefix: "InvalidCredentialsCookiePrefix", InvalidScopeRulePath: "InvalidScopeRulePath", InvalidScopeRuleHostPattern: "InvalidScopeRuleHostPattern", ScopeRuleOriginScopedHostPatternMismatch: "ScopeRuleOriginScopedHostPatternMismatch", ScopeRuleSiteScopedHostPatternMismatch: "ScopeRuleSiteScopedHostPatternMismatch", SigningQuotaExceeded: "SigningQuotaExceeded", InvalidConfigJson: "InvalidConfigJson", InvalidFederatedSessionProviderFailedToRestoreKey: "InvalidFederatedSessionProviderFailedToRestoreKey", FailedToUnwrapKey: "FailedToUnwrapKey", SessionDeletedDuringRefresh: "SessionDeletedDuringRefresh", CrossOriginRegistrationSiteNotIncluded: "CrossOriginRegistrationSiteNotIncluded"});
|
|
823
|
-
inspectorBackend.registerEnum("Network.RefreshEventDetailsRefreshResult", {Refreshed: "Refreshed", InitializedService: "InitializedService", Unreachable: "Unreachable", ServerError: "ServerError",
|
|
822
|
+
inspectorBackend.registerEnum("Network.DeviceBoundSessionFetchResult", {Success: "Success", SigningKeyGenerationError: "SigningKeyGenerationError", AttestationKeyGenerationError: "AttestationKeyGenerationError", SigningError: "SigningError", TransientSigningError: "TransientSigningError", ServerRequestedTermination: "ServerRequestedTermination", InvalidSessionId: "InvalidSessionId", InvalidChallenge: "InvalidChallenge", TooManyChallenges: "TooManyChallenges", InvalidFetcherUrl: "InvalidFetcherUrl", InvalidRefreshUrl: "InvalidRefreshUrl", TransientHttpError: "TransientHttpError", ScopeOriginSameSiteMismatch: "ScopeOriginSameSiteMismatch", RefreshUrlSameSiteMismatch: "RefreshUrlSameSiteMismatch", MismatchedSessionId: "MismatchedSessionId", MissingScope: "MissingScope", NoCredentials: "NoCredentials", SubdomainRegistrationWellKnownUnavailable: "SubdomainRegistrationWellKnownUnavailable", SubdomainRegistrationUnauthorized: "SubdomainRegistrationUnauthorized", SubdomainRegistrationWellKnownMalformed: "SubdomainRegistrationWellKnownMalformed", SessionProviderWellKnownUnavailable: "SessionProviderWellKnownUnavailable", RelyingPartyWellKnownUnavailable: "RelyingPartyWellKnownUnavailable", FederatedKeyThumbprintMismatch: "FederatedKeyThumbprintMismatch", InvalidFederatedSessionUrl: "InvalidFederatedSessionUrl", InvalidFederatedKey: "InvalidFederatedKey", TooManyRelyingOriginLabels: "TooManyRelyingOriginLabels", BoundCookieSetForbidden: "BoundCookieSetForbidden", NetError: "NetError", ProxyError: "ProxyError", EmptySessionConfig: "EmptySessionConfig", InvalidCredentialsConfig: "InvalidCredentialsConfig", InvalidCredentialsType: "InvalidCredentialsType", InvalidCredentialsEmptyName: "InvalidCredentialsEmptyName", InvalidCredentialsCookie: "InvalidCredentialsCookie", PersistentHttpError: "PersistentHttpError", RegistrationAttemptedChallenge: "RegistrationAttemptedChallenge", InvalidScopeOrigin: "InvalidScopeOrigin", ScopeOriginContainsPath: "ScopeOriginContainsPath", RefreshInitiatorNotString: "RefreshInitiatorNotString", RefreshInitiatorInvalidHostPattern: "RefreshInitiatorInvalidHostPattern", InvalidScopeSpecification: "InvalidScopeSpecification", MissingScopeSpecificationType: "MissingScopeSpecificationType", EmptyScopeSpecificationDomain: "EmptyScopeSpecificationDomain", EmptyScopeSpecificationPath: "EmptyScopeSpecificationPath", InvalidScopeSpecificationType: "InvalidScopeSpecificationType", InvalidScopeIncludeSite: "InvalidScopeIncludeSite", MissingScopeIncludeSite: "MissingScopeIncludeSite", FederatedNotAuthorizedByProvider: "FederatedNotAuthorizedByProvider", FederatedNotAuthorizedByRelyingParty: "FederatedNotAuthorizedByRelyingParty", SessionProviderWellKnownMalformed: "SessionProviderWellKnownMalformed", SessionProviderWellKnownHasProviderOrigin: "SessionProviderWellKnownHasProviderOrigin", RelyingPartyWellKnownMalformed: "RelyingPartyWellKnownMalformed", RelyingPartyWellKnownHasRelyingOrigins: "RelyingPartyWellKnownHasRelyingOrigins", InvalidFederatedSessionProviderSessionMissing: "InvalidFederatedSessionProviderSessionMissing", InvalidFederatedSessionWrongProviderOrigin: "InvalidFederatedSessionWrongProviderOrigin", InvalidCredentialsCookieCreationTime: "InvalidCredentialsCookieCreationTime", InvalidCredentialsCookieName: "InvalidCredentialsCookieName", InvalidCredentialsCookieParsing: "InvalidCredentialsCookieParsing", InvalidCredentialsCookieUnpermittedAttribute: "InvalidCredentialsCookieUnpermittedAttribute", InvalidCredentialsCookieInvalidDomain: "InvalidCredentialsCookieInvalidDomain", InvalidCredentialsCookiePrefix: "InvalidCredentialsCookiePrefix", InvalidScopeRulePath: "InvalidScopeRulePath", InvalidScopeRuleHostPattern: "InvalidScopeRuleHostPattern", ScopeRuleOriginScopedHostPatternMismatch: "ScopeRuleOriginScopedHostPatternMismatch", ScopeRuleSiteScopedHostPatternMismatch: "ScopeRuleSiteScopedHostPatternMismatch", SigningQuotaExceeded: "SigningQuotaExceeded", InvalidConfigJson: "InvalidConfigJson", InvalidFederatedSessionProviderFailedToRestoreKey: "InvalidFederatedSessionProviderFailedToRestoreKey", FailedToUnwrapKey: "FailedToUnwrapKey", SessionDeletedDuringRefresh: "SessionDeletedDuringRefresh", CrossOriginRegistrationSiteNotIncluded: "CrossOriginRegistrationSiteNotIncluded", InvalidPreProvisionedKeyInitiatorMissing: "InvalidPreProvisionedKeyInitiatorMissing", PreProvisionedKeyAccessNotGranted: "PreProvisionedKeyAccessNotGranted", PreProvisionedKeyNotFound: "PreProvisionedKeyNotFound"});
|
|
823
|
+
inspectorBackend.registerEnum("Network.RefreshEventDetailsRefreshResult", {Refreshed: "Refreshed", InitializedService: "InitializedService", Unreachable: "Unreachable", ServerError: "ServerError", FatalError: "FatalError", SigningQuotaExceeded: "SigningQuotaExceeded", RefreshedAsWaiter: "RefreshedAsWaiter", TransientSigningError: "TransientSigningError"});
|
|
824
824
|
inspectorBackend.registerEnum("Network.TerminationEventDetailsDeletionReason", {Expired: "Expired", FailedToRestoreKey: "FailedToRestoreKey", FailedToUnwrapKey: "FailedToUnwrapKey", StoragePartitionCleared: "StoragePartitionCleared", ClearBrowsingData: "ClearBrowsingData", ServerRequested: "ServerRequested", InvalidSessionParams: "InvalidSessionParams", RefreshFatalError: "RefreshFatalError", DevTools: "DevTools"});
|
|
825
825
|
inspectorBackend.registerEnum("Network.ChallengeEventDetailsChallengeResult", {Success: "Success", NoSessionId: "NoSessionId", NoSessionMatch: "NoSessionMatch", CantSetBoundCookie: "CantSetBoundCookie"});
|
|
826
826
|
inspectorBackend.registerEvent("Network.dataReceived", ["requestId", "timestamp", "dataLength", "encodedDataLength", "data"]);
|
|
@@ -885,6 +885,7 @@ export const generatedProperties = [
|
|
|
885
885
|
"widows",
|
|
886
886
|
"width",
|
|
887
887
|
"will-change",
|
|
888
|
+
"window-drag",
|
|
888
889
|
"word-break",
|
|
889
890
|
"word-spacing",
|
|
890
891
|
"writing-mode",
|
|
@@ -1023,11 +1024,6 @@ export const generatedProperties = [
|
|
|
1023
1024
|
"runtime_flag_status": "stable"
|
|
1024
1025
|
},
|
|
1025
1026
|
{
|
|
1026
|
-
"keywords": [
|
|
1027
|
-
"none",
|
|
1028
|
-
"drag",
|
|
1029
|
-
"no-drag"
|
|
1030
|
-
],
|
|
1031
1027
|
"name": "app-region"
|
|
1032
1028
|
},
|
|
1033
1029
|
{
|
|
@@ -6061,6 +6057,17 @@ export const generatedProperties = [
|
|
|
6061
6057
|
],
|
|
6062
6058
|
"name": "will-change"
|
|
6063
6059
|
},
|
|
6060
|
+
{
|
|
6061
|
+
"inherited": true,
|
|
6062
|
+
"keywords": [
|
|
6063
|
+
"none",
|
|
6064
|
+
"move",
|
|
6065
|
+
"no-drag"
|
|
6066
|
+
],
|
|
6067
|
+
"name": "window-drag",
|
|
6068
|
+
"runtime_flag": "CSSWindowDrag",
|
|
6069
|
+
"runtime_flag_status": "stable"
|
|
6070
|
+
},
|
|
6064
6071
|
{
|
|
6065
6072
|
"inherited": true,
|
|
6066
6073
|
"keywords": [
|
|
@@ -6388,13 +6395,6 @@ export const generatedPropertyValues = {
|
|
|
6388
6395
|
"none"
|
|
6389
6396
|
]
|
|
6390
6397
|
},
|
|
6391
|
-
"app-region": {
|
|
6392
|
-
"values": [
|
|
6393
|
-
"none",
|
|
6394
|
-
"drag",
|
|
6395
|
-
"no-drag"
|
|
6396
|
-
]
|
|
6397
|
-
},
|
|
6398
6398
|
"appearance": {
|
|
6399
6399
|
"values": [
|
|
6400
6400
|
"auto",
|
|
@@ -9174,6 +9174,13 @@ export const generatedPropertyValues = {
|
|
|
9174
9174
|
"auto"
|
|
9175
9175
|
]
|
|
9176
9176
|
},
|
|
9177
|
+
"window-drag": {
|
|
9178
|
+
"values": [
|
|
9179
|
+
"none",
|
|
9180
|
+
"move",
|
|
9181
|
+
"no-drag"
|
|
9182
|
+
]
|
|
9183
|
+
},
|
|
9177
9184
|
"word-break": {
|
|
9178
9185
|
"values": [
|
|
9179
9186
|
"normal",
|
|
@@ -7040,6 +7040,10 @@ export namespace DigitalCredentials {
|
|
|
7040
7040
|
* Required when |action| is "respond", forbidden otherwise.
|
|
7041
7041
|
*/
|
|
7042
7042
|
response?: any;
|
|
7043
|
+
/**
|
|
7044
|
+
* The frame to scope the virtual wallet behavior to.
|
|
7045
|
+
*/
|
|
7046
|
+
frameId?: Page.FrameId;
|
|
7043
7047
|
}
|
|
7044
7048
|
}
|
|
7045
7049
|
|
|
@@ -12116,6 +12120,9 @@ export namespace Network {
|
|
|
12116
12120
|
FailedToUnwrapKey = 'FailedToUnwrapKey',
|
|
12117
12121
|
SessionDeletedDuringRefresh = 'SessionDeletedDuringRefresh',
|
|
12118
12122
|
CrossOriginRegistrationSiteNotIncluded = 'CrossOriginRegistrationSiteNotIncluded',
|
|
12123
|
+
InvalidPreProvisionedKeyInitiatorMissing = 'InvalidPreProvisionedKeyInitiatorMissing',
|
|
12124
|
+
PreProvisionedKeyAccessNotGranted = 'PreProvisionedKeyAccessNotGranted',
|
|
12125
|
+
PreProvisionedKeyNotFound = 'PreProvisionedKeyNotFound',
|
|
12119
12126
|
}
|
|
12120
12127
|
|
|
12121
12128
|
/**
|
|
@@ -12167,7 +12174,6 @@ export namespace Network {
|
|
|
12167
12174
|
InitializedService = 'InitializedService',
|
|
12168
12175
|
Unreachable = 'Unreachable',
|
|
12169
12176
|
ServerError = 'ServerError',
|
|
12170
|
-
RefreshQuotaExceeded = 'RefreshQuotaExceeded',
|
|
12171
12177
|
FatalError = 'FatalError',
|
|
12172
12178
|
SigningQuotaExceeded = 'SigningQuotaExceeded',
|
|
12173
12179
|
RefreshedAsWaiter = 'RefreshedAsWaiter',
|
|
@@ -68,7 +68,6 @@ export interface AiConversationOptions {
|
|
|
68
68
|
isReadOnly?: boolean;
|
|
69
69
|
aidaClient?: Host.AidaClient.AidaClient;
|
|
70
70
|
changeManager?: ChangeManager;
|
|
71
|
-
isExternal?: boolean;
|
|
72
71
|
performanceRecordAndReload?: () => Promise<Trace.TraceModel.ParsedTrace>;
|
|
73
72
|
onInspectElement?: () => Promise<SDK.DOMModel.DOMNode|null>;
|
|
74
73
|
networkTimeCalculator?: NetworkTimeCalculator.NetworkTransferTimeCalculator;
|
|
@@ -88,7 +87,6 @@ export class AiConversation {
|
|
|
88
87
|
data: history,
|
|
89
88
|
id: serializedConversation.id,
|
|
90
89
|
isReadOnly: true,
|
|
91
|
-
isExternal: serializedConversation.isExternal,
|
|
92
90
|
});
|
|
93
91
|
}
|
|
94
92
|
|
|
@@ -100,7 +98,6 @@ export class AiConversation {
|
|
|
100
98
|
|
|
101
99
|
#isReadOnly: boolean;
|
|
102
100
|
readonly history: ResponseData[];
|
|
103
|
-
#isExternal: boolean;
|
|
104
101
|
|
|
105
102
|
#aidaClient: Host.AidaClient.AidaClient;
|
|
106
103
|
#changeManager: ChangeManager|undefined;
|
|
@@ -122,7 +119,6 @@ export class AiConversation {
|
|
|
122
119
|
isReadOnly = true,
|
|
123
120
|
aidaClient = new Host.AidaClient.AidaClient(),
|
|
124
121
|
changeManager,
|
|
125
|
-
isExternal = false,
|
|
126
122
|
performanceRecordAndReload,
|
|
127
123
|
onInspectElement,
|
|
128
124
|
networkTimeCalculator,
|
|
@@ -137,7 +133,6 @@ export class AiConversation {
|
|
|
137
133
|
|
|
138
134
|
this.id = id;
|
|
139
135
|
this.#isReadOnly = isReadOnly;
|
|
140
|
-
this.#isExternal = isExternal;
|
|
141
136
|
this.history = this.#reconstructHistory(data);
|
|
142
137
|
// Needs to be last
|
|
143
138
|
this.#updateAgent(type);
|
|
@@ -147,6 +142,18 @@ export class AiConversation {
|
|
|
147
142
|
return this.#isReadOnly;
|
|
148
143
|
}
|
|
149
144
|
|
|
145
|
+
static titleForSerialized(serialized: SerializedConversation): string|undefined {
|
|
146
|
+
const query = serialized.history.find(item => item.type === ResponseType.USER_QUERY)?.query;
|
|
147
|
+
if (!query) {
|
|
148
|
+
return undefined;
|
|
149
|
+
}
|
|
150
|
+
return AiConversation.title(query);
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
static title(query: string): string {
|
|
154
|
+
return `${query.substring(0, MAX_TITLE_LENGTH)}${query.length > MAX_TITLE_LENGTH ? '…' : ''}`;
|
|
155
|
+
}
|
|
156
|
+
|
|
150
157
|
get title(): string|undefined {
|
|
151
158
|
const query = this.history.find(response => response.type === ResponseType.USER_QUERY)?.query;
|
|
152
159
|
|
|
@@ -154,11 +161,7 @@ export class AiConversation {
|
|
|
154
161
|
return;
|
|
155
162
|
}
|
|
156
163
|
|
|
157
|
-
|
|
158
|
-
return `[External] ${query.substring(0, MAX_TITLE_LENGTH - 11)}${
|
|
159
|
-
query.length > MAX_TITLE_LENGTH - 11 ? '…' : ''}`;
|
|
160
|
-
}
|
|
161
|
-
return `${query.substring(0, MAX_TITLE_LENGTH)}${query.length > MAX_TITLE_LENGTH ? '…' : ''}`;
|
|
164
|
+
return AiConversation.title(query);
|
|
162
165
|
}
|
|
163
166
|
|
|
164
167
|
get isEmpty(): boolean {
|
|
@@ -322,7 +325,6 @@ export class AiConversation {
|
|
|
322
325
|
})
|
|
323
326
|
.filter(history => !!history),
|
|
324
327
|
type: this.#type,
|
|
325
|
-
isExternal: this.#isExternal,
|
|
326
328
|
};
|
|
327
329
|
}
|
|
328
330
|
|
|
@@ -407,8 +409,8 @@ export class AiConversation {
|
|
|
407
409
|
}
|
|
408
410
|
};
|
|
409
411
|
const targetManager = SDK.TargetManager.TargetManager.instance();
|
|
410
|
-
targetManager.addModelListener(
|
|
411
|
-
|
|
412
|
+
targetManager.addModelListener(SDK.ResourceTreeModel.ResourceTreeModel,
|
|
413
|
+
SDK.ResourceTreeModel.Events.PrimaryPageChanged, listener, this);
|
|
412
414
|
|
|
413
415
|
try {
|
|
414
416
|
if (this.isBlockedByOrigin) {
|
|
@@ -419,8 +421,8 @@ export class AiConversation {
|
|
|
419
421
|
|
|
420
422
|
yield* this.#runAgent(initialQuery, options, {isInitialCall: true});
|
|
421
423
|
} finally {
|
|
422
|
-
targetManager.removeModelListener(
|
|
423
|
-
|
|
424
|
+
targetManager.removeModelListener(SDK.ResourceTreeModel.ResourceTreeModel,
|
|
425
|
+
SDK.ResourceTreeModel.Events.PrimaryPageChanged, listener, this);
|
|
424
426
|
}
|
|
425
427
|
}
|
|
426
428
|
|
|
@@ -491,8 +493,8 @@ export class AiConversation {
|
|
|
491
493
|
if (data.type === ResponseType.CONTEXT_CHANGE) {
|
|
492
494
|
this.setContext(data.context);
|
|
493
495
|
yield*
|
|
494
|
-
this.#runAgent(
|
|
495
|
-
|
|
496
|
+
this.#runAgent(this.#getQueryAfterSelection(initialQuery, data.description), options,
|
|
497
|
+
{isInitialCall: false});
|
|
496
498
|
return;
|
|
497
499
|
}
|
|
498
500
|
}
|
|
@@ -21,7 +21,6 @@ export interface SerializedConversation {
|
|
|
21
21
|
id: string;
|
|
22
22
|
type: ConversationType;
|
|
23
23
|
history: SerializedResponseData[];
|
|
24
|
-
isExternal: boolean;
|
|
25
24
|
}
|
|
26
25
|
|
|
27
26
|
export interface SerializedImage {
|
|
@@ -38,6 +37,7 @@ let instance: AiHistoryStorage|null = null;
|
|
|
38
37
|
|
|
39
38
|
const DEFAULT_MAX_STORAGE_SIZE = 50 * 1024 * 1024;
|
|
40
39
|
export const MAX_RECENT_PROMPTS_COUNT = 20;
|
|
40
|
+
export const MAX_CONVERSATIONS_COUNT = 50;
|
|
41
41
|
export const RECENT_PROMPTS_SIZE_LIMIT = 100 * 1024;
|
|
42
42
|
|
|
43
43
|
export const enum Events {
|
|
@@ -105,6 +105,15 @@ export class AiHistoryStorage extends Common.ObjectWrapper.ObjectWrapper<EventTy
|
|
|
105
105
|
return structuredClone(this.#recentPromptsSetting.get());
|
|
106
106
|
}
|
|
107
107
|
|
|
108
|
+
#getImageIdsFromHistory(history: SerializedResponseData[]): string[] {
|
|
109
|
+
return history.flatMap(item => {
|
|
110
|
+
if (item.type === ResponseType.USER_QUERY && item.imageId) {
|
|
111
|
+
return [item.imageId];
|
|
112
|
+
}
|
|
113
|
+
return [];
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
|
|
108
117
|
async upsertHistoryEntry(agentEntry: SerializedConversation): Promise<void> {
|
|
109
118
|
const release = await this.#mutex.acquire();
|
|
110
119
|
try {
|
|
@@ -115,6 +124,24 @@ export class AiHistoryStorage extends Common.ObjectWrapper.ObjectWrapper<EventTy
|
|
|
115
124
|
} else {
|
|
116
125
|
history.push(agentEntry);
|
|
117
126
|
}
|
|
127
|
+
|
|
128
|
+
// Using a while loop to ensure that if the history size exceeds the maximum limit
|
|
129
|
+
// (e.g. if the limit was reduced or settings contain legacy entries), we prune
|
|
130
|
+
// all extra entries at once. We also collect and batch image deletion to avoid
|
|
131
|
+
// multiple settings writes.
|
|
132
|
+
const imageIdsForDeletion: string[] = [];
|
|
133
|
+
while (history.length > MAX_CONVERSATIONS_COUNT) {
|
|
134
|
+
const evicted = history.shift();
|
|
135
|
+
if (evicted) {
|
|
136
|
+
imageIdsForDeletion.push(...this.#getImageIdsFromHistory(evicted.history));
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
if (imageIdsForDeletion.length > 0) {
|
|
141
|
+
const images = structuredClone(await this.#imageHistorySettings.forceGet());
|
|
142
|
+
this.#imageHistorySettings.set(images.filter(entry => !imageIdsForDeletion.includes(entry.id)));
|
|
143
|
+
}
|
|
144
|
+
|
|
118
145
|
this.#historySetting.set(history);
|
|
119
146
|
} finally {
|
|
120
147
|
release();
|
|
@@ -157,22 +184,18 @@ export class AiHistoryStorage extends Common.ObjectWrapper.ObjectWrapper<EventTy
|
|
|
157
184
|
const release = await this.#mutex.acquire();
|
|
158
185
|
try {
|
|
159
186
|
const history = structuredClone(await this.#historySetting.forceGet());
|
|
160
|
-
const
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
}
|
|
166
|
-
return undefined;
|
|
167
|
-
})
|
|
168
|
-
.filter(item => !!item);
|
|
187
|
+
const conversation = history.find(entry => entry.id === id);
|
|
188
|
+
if (!conversation) {
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
const imageIdsForDeletion = this.#getImageIdsFromHistory(conversation.history);
|
|
169
192
|
this.#historySetting.set(
|
|
170
193
|
history.filter(entry => entry.id !== id),
|
|
171
194
|
);
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
195
|
+
if (imageIdsForDeletion.length > 0) {
|
|
196
|
+
const images = structuredClone(await this.#imageHistorySettings.forceGet());
|
|
197
|
+
this.#imageHistorySettings.set(images.filter(entry => !imageIdsForDeletion.includes(entry.id)));
|
|
198
|
+
}
|
|
176
199
|
} finally {
|
|
177
200
|
release();
|
|
178
201
|
}
|
|
@@ -4,56 +4,52 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
6
|
import * as Host from '../../core/host/host.js';
|
|
7
|
-
import * as i18n from '../../core/i18n/i18n.js';
|
|
8
7
|
import type * as Platform from '../../core/platform/platform.js';
|
|
9
8
|
import * as Root from '../../core/root/root.js';
|
|
10
9
|
|
|
11
10
|
import {debugLog} from './debug.js';
|
|
12
11
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Preconditions determined entirely on the DevTools frontend side (e.g. Incognito
|
|
14
|
+
* mode or age restrictions) that prevent AI assistance features from running.
|
|
15
|
+
* These are evaluated independently of AIDA service-level availability.
|
|
16
|
+
*/
|
|
17
|
+
export const enum FrontendAccessPrecondition {
|
|
18
|
+
IS_OFF_THE_RECORD = 'is-off-the-record',
|
|
19
|
+
AGE_RESTRICTED = 'age-restricted',
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The unified set of preconditions that can disable AI assistance.
|
|
24
|
+
* This is a union of low-level AIDA service availability preconditions
|
|
25
|
+
* and DevTools frontend-specific preconditions.
|
|
26
|
+
*/
|
|
27
|
+
export type AccessPrecondition =
|
|
28
|
+
Exclude<Host.AidaClient.AidaAccessPreconditions, Host.AidaClient.AidaAccessPreconditions.AVAILABLE>|
|
|
29
|
+
FrontendAccessPrecondition;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Returns the list of active preconditions currently preventing AI assistance from being enabled.
|
|
33
|
+
* Checks local frontend constraints (e.g. incognito, age check) and combines them with the
|
|
34
|
+
* provided AIDA service availability status.
|
|
35
|
+
*/
|
|
36
|
+
export function getDisabledReasons(aidaAvailability: Host.AidaClient.AidaAccessPreconditions): AccessPrecondition[] {
|
|
37
|
+
const reasons: AccessPrecondition[] = [];
|
|
37
38
|
if (Root.Runtime.hostConfig.isOffTheRecord) {
|
|
38
|
-
reasons.push(
|
|
39
|
+
reasons.push(FrontendAccessPrecondition.IS_OFF_THE_RECORD);
|
|
39
40
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
if (Root.Runtime.hostConfig?.aidaAvailability?.blockedByAge === true) {
|
|
51
|
-
reasons.push(i18nString(UIStrings.ageRestricted));
|
|
52
|
-
}
|
|
53
|
-
}
|
|
41
|
+
|
|
42
|
+
if (aidaAvailability !== Host.AidaClient.AidaAccessPreconditions.AVAILABLE) {
|
|
43
|
+
reasons.push(aidaAvailability);
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
// No age check if there is no logged in user. Age check would always fail in that case.
|
|
47
|
+
if ((aidaAvailability === Host.AidaClient.AidaAccessPreconditions.AVAILABLE ||
|
|
48
|
+
aidaAvailability === Host.AidaClient.AidaAccessPreconditions.NO_INTERNET) &&
|
|
49
|
+
Root.Runtime.hostConfig?.aidaAvailability?.blockedByAge === true) {
|
|
50
|
+
reasons.push(FrontendAccessPrecondition.AGE_RESTRICTED);
|
|
54
51
|
}
|
|
55
|
-
|
|
56
|
-
reasons.push(...Common.Settings.Settings.instance().moduleSetting('ai-assistance-enabled').disabledReasons());
|
|
52
|
+
|
|
57
53
|
return reasons;
|
|
58
54
|
}
|
|
59
55
|
|
|
@@ -36,7 +36,8 @@ export const enum ErrorType {
|
|
|
36
36
|
ABORT = 'abort',
|
|
37
37
|
MAX_STEPS = 'max-steps',
|
|
38
38
|
BLOCK = 'block',
|
|
39
|
-
CROSS_ORIGIN = 'cross-origin'
|
|
39
|
+
CROSS_ORIGIN = 'cross-origin',
|
|
40
|
+
QUOTA = 'quota',
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
export const enum MultimodalInputType {
|
|
@@ -795,6 +796,9 @@ export abstract class AiAgent<T> {
|
|
|
795
796
|
error = ErrorType.ABORT;
|
|
796
797
|
} else if (err instanceof Host.AidaClient.AidaBlockError) {
|
|
797
798
|
error = ErrorType.BLOCK;
|
|
799
|
+
} else if (err instanceof Host.AidaClient.AidaQuotaError ||
|
|
800
|
+
(err instanceof Error && err.message.toLowerCase().includes('quota'))) {
|
|
801
|
+
error = ErrorType.QUOTA;
|
|
798
802
|
}
|
|
799
803
|
yield this.#createErrorResponse(error);
|
|
800
804
|
|