chrome-devtools-frontend 1.0.1515446 → 1.0.1515988
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/infrastructure.md +131 -82
- package/front_end/Tests.js +3 -29
- package/front_end/core/common/Progress.ts +73 -55
- package/front_end/core/host/UserMetrics.ts +0 -1
- package/front_end/core/protocol_client/InspectorBackend.ts +2 -0
- package/front_end/core/root/Runtime.ts +0 -1
- package/front_end/core/sdk/CSSMatchedStyles.ts +12 -10
- package/front_end/core/sdk/CSSModel.ts +1 -31
- package/front_end/core/sdk/CSSPropertyParserMatchers.ts +27 -7
- package/front_end/core/sdk/DebuggerModel.ts +1 -31
- package/front_end/core/sdk/EnhancedTracesParser.ts +81 -50
- package/front_end/core/sdk/NetworkManager.ts +1 -31
- package/front_end/core/sdk/NetworkRequest.ts +1 -31
- package/front_end/core/sdk/RehydratingConnection.snapshot.txt +1003 -0
- package/front_end/core/sdk/RehydratingConnection.ts +13 -18
- package/front_end/core/sdk/RehydratingObject.ts +8 -31
- package/front_end/core/sdk/RemoteObject.ts +1 -31
- package/front_end/core/sdk/ResourceTreeModel.ts +1 -31
- package/front_end/core/sdk/RuntimeModel.ts +1 -31
- package/front_end/core/sdk/ServiceWorkerManager.ts +1 -31
- package/front_end/core/sdk/SourceMap.ts +1 -31
- package/front_end/core/sdk/TraceObject.ts +8 -3
- package/front_end/entrypoints/main/MainImpl.ts +0 -2
- package/front_end/entrypoints/main/main-meta.ts +2 -2
- package/front_end/generated/InspectorBackendCommands.js +4 -4
- package/front_end/generated/SupportedCSSProperties.js +12 -0
- package/front_end/generated/protocol.ts +10 -1
- package/front_end/models/ai_assistance/AiHistoryStorage.ts +1 -3
- package/front_end/models/ai_assistance/ConversationHandler.ts +4 -6
- package/front_end/models/ai_assistance/agents/AiAgent.ts +4 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +107 -72
- package/front_end/models/ai_assistance/agents/PerformanceAnnotationsAgent.ts +2 -2
- package/front_end/models/ai_assistance/agents/StylingAgent.ts +2 -2
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +178 -85
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.ts +308 -218
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +161 -97
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +78 -58
- package/front_end/models/ai_assistance/data_formatters/UnitFormatters.ts +10 -1
- package/front_end/models/ai_assistance/performance/AIContext.ts +19 -21
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +123 -55
- package/front_end/models/bindings/ContentProviderBasedProject.ts +6 -4
- package/front_end/models/breakpoints/BreakpointManager.ts +3 -3
- package/front_end/models/har/Writer.ts +11 -11
- package/front_end/models/javascript_metadata/NativeFunctions.js +7 -7
- package/front_end/models/persistence/FileSystemWorkspaceBinding.ts +3 -3
- package/front_end/models/persistence/IsolatedFileSystem.ts +4 -4
- package/front_end/models/persistence/IsolatedFileSystemManager.ts +7 -7
- package/front_end/models/persistence/PersistenceImpl.ts +8 -8
- package/front_end/models/persistence/PlatformFileSystem.ts +1 -1
- package/front_end/models/text_utils/TextUtils.ts +26 -0
- package/front_end/models/trace/ModelImpl.ts +2 -16
- package/front_end/models/trace/Processor.ts +14 -8
- package/front_end/models/trace/handlers/AuctionWorkletsHandler.ts +4 -4
- package/front_end/models/trace/handlers/FramesHandler.ts +2 -2
- package/front_end/models/trace/handlers/LayoutShiftsHandler.ts +7 -10
- package/front_end/models/trace/handlers/MetaHandler.ts +11 -9
- package/front_end/models/trace/handlers/ScreenshotsHandler.ts +1 -1
- package/front_end/models/trace/handlers/ScriptsHandler.ts +5 -5
- package/front_end/models/trace/handlers/UserInteractionsHandler.ts +2 -14
- package/front_end/models/trace/handlers/UserTimingsHandler.ts +3 -4
- package/front_end/models/trace/insights/CLSCulprits.ts +1 -1
- package/front_end/models/trace/insights/DocumentLatency.ts +8 -7
- package/front_end/models/trace/insights/DuplicatedJavaScript.ts +1 -1
- package/front_end/models/trace/insights/INPBreakdown.ts +1 -1
- package/front_end/models/trace/insights/ImageDelivery.ts +1 -1
- package/front_end/models/trace/insights/LCPBreakdown.ts +1 -1
- package/front_end/models/trace/insights/LCPDiscovery.ts +1 -1
- package/front_end/models/trace/insights/ModernHTTP.ts +1 -1
- package/front_end/models/trace/insights/NetworkDependencyTree.ts +1 -1
- package/front_end/models/trace/insights/RenderBlocking.ts +1 -1
- package/front_end/models/trace/insights/types.ts +2 -0
- package/front_end/models/trace/types/Configuration.ts +12 -0
- package/front_end/models/trace/types/TraceEvents.ts +41 -64
- package/front_end/models/trace_source_maps_resolver/trace_source_maps_resolver.ts +1 -1
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +21 -99
- package/front_end/panels/application/ServiceWorkersView.ts +0 -1
- package/front_end/panels/application/components/BackForwardCacheStrings.ts +8 -2
- package/front_end/panels/browser_debugger/CategorizedBreakpointsSidebarPane.ts +2 -3
- package/front_end/panels/common/BadgeNotification.ts +10 -8
- package/front_end/panels/common/GdpSignUpDialog.ts +30 -14
- package/front_end/panels/common/gdpSignUpDialog.css +4 -0
- package/front_end/panels/console/ConsoleView.ts +23 -28
- package/front_end/panels/console/ConsoleViewport.ts +2 -2
- package/front_end/panels/console/consoleView.css +11 -1
- package/front_end/panels/coverage/CoverageView.ts +2 -2
- package/front_end/panels/elements/ElementsTreeOutline.ts +2 -2
- package/front_end/panels/elements/StyleEditorWidget.ts +8 -19
- package/front_end/panels/elements/StylePropertyTreeElement.ts +39 -25
- package/front_end/panels/elements/StylesSidebarPane.ts +2 -2
- package/front_end/panels/elements/stylePropertiesTreeOutline.css +4 -3
- package/front_end/panels/layer_viewer/Layers3DView.ts +2 -2
- package/front_end/panels/layers/LayerTreeModel.ts +3 -3
- package/front_end/panels/mobile_throttling/ThrottlingSettingsTab.ts +4 -4
- package/front_end/panels/network/NetworkLogView.ts +1 -1
- package/front_end/panels/network/NetworkLogViewColumns.ts +3 -3
- package/front_end/panels/network/NetworkSearchScope.ts +6 -6
- package/front_end/panels/search/SearchView.ts +220 -159
- package/front_end/panels/settings/components/SyncSection.ts +64 -10
- package/front_end/panels/settings/components/syncSection.css +6 -0
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +1 -4
- package/front_end/panels/sources/SourcesSearchScope.ts +4 -4
- package/front_end/panels/sources/TabbedEditorContainer.ts +5 -5
- package/front_end/panels/timeline/TimelineFlameChartDataProvider.ts +10 -5
- package/front_end/panels/timeline/TimelineFlameChartView.ts +18 -15
- package/front_end/panels/timeline/TimelinePanel.ts +41 -22
- package/front_end/panels/timeline/TracingLayerTree.ts +4 -5
- package/front_end/panels/timeline/components/ExportTraceOptions.ts +37 -22
- package/front_end/panels/timeline/components/insights/BaseInsightComponent.ts +17 -7
- package/front_end/panels/webauthn/WebauthnPane.ts +1 -1
- package/front_end/third_party/axe-core/README.chromium +1 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/codemirror/README.chromium +1 -0
- package/front_end/third_party/codemirror.next/README.chromium +1 -0
- package/front_end/third_party/csp_evaluator/README.chromium +1 -0
- package/front_end/third_party/diff/README.chromium +1 -0
- package/front_end/third_party/i18n/README.chromium +1 -0
- package/front_end/third_party/intl-messageformat/README.chromium +1 -0
- package/front_end/third_party/json5/README.chromium +1 -0
- package/front_end/third_party/legacy-javascript/README.chromium +1 -0
- package/front_end/third_party/lighthouse/README.chromium +1 -0
- package/front_end/third_party/lit/README.chromium +1 -0
- package/front_end/third_party/marked/README.chromium +1 -0
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/README.md +6 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +11 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js +30 -8
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js +1 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkManager.js +8 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js +8 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js +5 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +12 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +22 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +11 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js +30 -8
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js +1 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/core/BrowsingContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkManager.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkManager.js +8 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/NetworkManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js +8 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js +5 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +12 -2
- package/front_end/third_party/puppeteer/package/package.json +4 -4
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +13 -2
- package/front_end/third_party/puppeteer/package/src/bidi/Page.ts +50 -8
- package/front_end/third_party/puppeteer/package/src/bidi/core/BrowsingContext.ts +0 -1
- package/front_end/third_party/puppeteer/package/src/cdp/NetworkManager.ts +8 -1
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +21 -5
- package/front_end/third_party/puppeteer/package/src/generated/version.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +12 -0
- package/front_end/third_party/puppeteer-replay/README.chromium +1 -0
- package/front_end/third_party/third-party-web/README.chromium +1 -0
- package/front_end/third_party/vscode.web-custom-data/README.chromium +1 -0
- package/front_end/third_party/wasmparser/README.chromium +1 -0
- package/front_end/third_party/web-vitals/README.chromium +1 -0
- package/front_end/ui/components/text_editor/config.ts +66 -16
- package/front_end/ui/components/tooltips/Tooltip.ts +17 -1
- package/front_end/ui/legacy/ContextMenu.ts +2 -2
- package/front_end/ui/legacy/GlassPane.ts +7 -3
- package/front_end/ui/legacy/ProgressIndicator.ts +33 -21
- package/front_end/ui/legacy/TabbedPane.ts +2 -2
- package/front_end/ui/legacy/Treeoutline.ts +10 -5
- package/front_end/ui/legacy/UIUtils.ts +42 -10
- package/front_end/ui/legacy/components/color_picker/Spectrum.ts +14 -14
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +6 -6
- package/front_end/ui/legacy/components/data_grid/DataGridElement.ts +4 -2
- package/front_end/ui/legacy/components/perf_ui/FlameChart.ts +3 -29
- package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +14 -14
- package/front_end/ui/visual_logging/Debugging.ts +24 -12
- package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
- package/inspector_overlay/highlight_common.ts +1 -27
- package/inspector_overlay/highlight_grid_common.ts +1 -27
- package/inspector_overlay/tool_highlight.ts +1 -27
- package/inspector_overlay/tool_persistent.ts +1 -27
- package/inspector_overlay/tool_source_order.ts +1 -27
- package/package.json +3 -3
@@ -31,6 +31,81 @@ export class PerformanceTraceFormatter {
|
|
31
31
|
return `{min: ${bounds.min}, max: ${bounds.max}}`;
|
32
32
|
}
|
33
33
|
|
34
|
+
/**
|
35
|
+
* Fetching the Crux summary can error outside of DevTools, hence the
|
36
|
+
* try-catch around it here.
|
37
|
+
*/
|
38
|
+
#getCruxTraceSummary(insightSet: Trace.Insights.Types.InsightSet|null): string[] {
|
39
|
+
if (insightSet === null) {
|
40
|
+
return [];
|
41
|
+
}
|
42
|
+
try {
|
43
|
+
const cruxScope = CrUXManager.CrUXManager.instance().getSelectedScope();
|
44
|
+
const parts: string[] = [];
|
45
|
+
const fieldMetrics =
|
46
|
+
Trace.Insights.Common.getFieldMetricsForInsightSet(insightSet, this.#parsedTrace.metadata, cruxScope);
|
47
|
+
const fieldLcp = fieldMetrics?.lcp;
|
48
|
+
const fieldInp = fieldMetrics?.inp;
|
49
|
+
const fieldCls = fieldMetrics?.cls;
|
50
|
+
|
51
|
+
if (fieldLcp || fieldInp || fieldCls) {
|
52
|
+
parts.push('Metrics (field / real users):');
|
53
|
+
|
54
|
+
const serializeFieldMetricTimingResult =
|
55
|
+
(fieldMetric: Trace.Insights.Common.CrUXFieldMetricTimingResult): string => {
|
56
|
+
return `${Math.round(fieldMetric.value / 1000)} ms (scope: ${fieldMetric.pageScope})`;
|
57
|
+
};
|
58
|
+
|
59
|
+
const serializeFieldMetricNumberResult =
|
60
|
+
(fieldMetric: Trace.Insights.Common.CrUXFieldMetricNumberResult): string => {
|
61
|
+
return `${fieldMetric.value.toFixed(2)} (scope: ${fieldMetric.pageScope})`;
|
62
|
+
};
|
63
|
+
|
64
|
+
if (fieldLcp) {
|
65
|
+
parts.push(` - LCP: ${serializeFieldMetricTimingResult(fieldLcp)}`);
|
66
|
+
|
67
|
+
const fieldLcpBreakdown = fieldMetrics?.lcpBreakdown;
|
68
|
+
if (fieldLcpBreakdown &&
|
69
|
+
(fieldLcpBreakdown.ttfb || fieldLcpBreakdown.loadDelay || fieldLcpBreakdown.loadDuration ||
|
70
|
+
fieldLcpBreakdown.renderDelay)) {
|
71
|
+
parts.push(' - LCP breakdown:');
|
72
|
+
if (fieldLcpBreakdown.ttfb) {
|
73
|
+
parts.push(` - TTFB: ${serializeFieldMetricTimingResult(fieldLcpBreakdown.ttfb)}`);
|
74
|
+
}
|
75
|
+
if (fieldLcpBreakdown.loadDelay) {
|
76
|
+
parts.push(` - Load delay: ${serializeFieldMetricTimingResult(fieldLcpBreakdown.loadDelay)}`);
|
77
|
+
}
|
78
|
+
if (fieldLcpBreakdown.loadDuration) {
|
79
|
+
parts.push(` - Load duration: ${serializeFieldMetricTimingResult(fieldLcpBreakdown.loadDuration)}`);
|
80
|
+
}
|
81
|
+
if (fieldLcpBreakdown.renderDelay) {
|
82
|
+
parts.push(` - Render delay: ${serializeFieldMetricTimingResult(fieldLcpBreakdown.renderDelay)}`);
|
83
|
+
}
|
84
|
+
}
|
85
|
+
}
|
86
|
+
if (fieldInp) {
|
87
|
+
parts.push(` - INP: ${serializeFieldMetricTimingResult(fieldInp)}`);
|
88
|
+
}
|
89
|
+
if (fieldCls) {
|
90
|
+
parts.push(` - CLS: ${serializeFieldMetricNumberResult(fieldCls)}`);
|
91
|
+
}
|
92
|
+
|
93
|
+
parts.push(
|
94
|
+
' - The above data is from CrUX–Chrome User Experience Report. It\'s how the page performs for real users.');
|
95
|
+
parts.push(' - The values shown above are the p75 measure of all real Chrome users');
|
96
|
+
parts.push(' - The scope indicates if the data came from the entire origin, or a specific url');
|
97
|
+
parts.push(
|
98
|
+
' - Lab metrics describe how this specific page load performed, while field metrics are an aggregation ' +
|
99
|
+
'of results from real-world users. Best practice is to prioritize metrics that are bad in field data. ' +
|
100
|
+
'Lab metrics may be better or worse than fields metrics depending on the developer\'s machine, network, or the ' +
|
101
|
+
'actions performed while tracing.');
|
102
|
+
}
|
103
|
+
return parts;
|
104
|
+
} catch {
|
105
|
+
return [];
|
106
|
+
}
|
107
|
+
}
|
108
|
+
|
34
109
|
formatTraceSummary(): string {
|
35
110
|
const parsedTrace = this.#parsedTrace;
|
36
111
|
const insightSet = this.#insightSet;
|
@@ -78,64 +153,9 @@ export class PerformanceTraceFormatter {
|
|
78
153
|
parts.push('Metrics (lab / observed): n/a');
|
79
154
|
}
|
80
155
|
|
81
|
-
const
|
82
|
-
|
83
|
-
|
84
|
-
const fieldLcp = fieldMetrics?.lcp;
|
85
|
-
const fieldInp = fieldMetrics?.inp;
|
86
|
-
const fieldCls = fieldMetrics?.cls;
|
87
|
-
|
88
|
-
if (fieldLcp || fieldInp || fieldCls) {
|
89
|
-
parts.push('Metrics (field / real users):');
|
90
|
-
|
91
|
-
const serializeFieldMetricTimingResult =
|
92
|
-
(fieldMetric: Trace.Insights.Common.CrUXFieldMetricTimingResult): string => {
|
93
|
-
return `${Math.round(fieldMetric.value / 1000)} ms (scope: ${fieldMetric.pageScope})`;
|
94
|
-
};
|
95
|
-
|
96
|
-
const serializeFieldMetricNumberResult =
|
97
|
-
(fieldMetric: Trace.Insights.Common.CrUXFieldMetricNumberResult): string => {
|
98
|
-
return `${fieldMetric.value.toFixed(2)} (scope: ${fieldMetric.pageScope})`;
|
99
|
-
};
|
100
|
-
|
101
|
-
if (fieldLcp) {
|
102
|
-
parts.push(` - LCP: ${serializeFieldMetricTimingResult(fieldLcp)}`);
|
103
|
-
|
104
|
-
const fieldLcpBreakdown = fieldMetrics?.lcpBreakdown;
|
105
|
-
if (fieldLcpBreakdown &&
|
106
|
-
(fieldLcpBreakdown.ttfb || fieldLcpBreakdown.loadDelay || fieldLcpBreakdown.loadDuration ||
|
107
|
-
fieldLcpBreakdown.renderDelay)) {
|
108
|
-
parts.push(' - LCP breakdown:');
|
109
|
-
if (fieldLcpBreakdown.ttfb) {
|
110
|
-
parts.push(` - TTFB: ${serializeFieldMetricTimingResult(fieldLcpBreakdown.ttfb)}`);
|
111
|
-
}
|
112
|
-
if (fieldLcpBreakdown.loadDelay) {
|
113
|
-
parts.push(` - Load delay: ${serializeFieldMetricTimingResult(fieldLcpBreakdown.loadDelay)}`);
|
114
|
-
}
|
115
|
-
if (fieldLcpBreakdown.loadDuration) {
|
116
|
-
parts.push(` - Load duration: ${serializeFieldMetricTimingResult(fieldLcpBreakdown.loadDuration)}`);
|
117
|
-
}
|
118
|
-
if (fieldLcpBreakdown.renderDelay) {
|
119
|
-
parts.push(` - Render delay: ${serializeFieldMetricTimingResult(fieldLcpBreakdown.renderDelay)}`);
|
120
|
-
}
|
121
|
-
}
|
122
|
-
}
|
123
|
-
if (fieldInp) {
|
124
|
-
parts.push(` - INP: ${serializeFieldMetricTimingResult(fieldInp)}`);
|
125
|
-
}
|
126
|
-
if (fieldCls) {
|
127
|
-
parts.push(` - CLS: ${serializeFieldMetricNumberResult(fieldCls)}`);
|
128
|
-
}
|
129
|
-
|
130
|
-
parts.push(
|
131
|
-
' - The above data is from CrUX–Chrome User Experience Report. It\'s how the page performs for real users.');
|
132
|
-
parts.push(' - The values shown above are the p75 measure of all real Chrome users');
|
133
|
-
parts.push(' - The scope indicates if the data came from the entire origin, or a specific url');
|
134
|
-
parts.push(
|
135
|
-
' - Lab metrics describe how this specific page load performed, while field metrics are an aggregation ' +
|
136
|
-
'of results from real-world users. Best practice is to prioritize metrics that are bad in field data. ' +
|
137
|
-
'Lab metrics may be better or worse than fields metrics depending on the developer\'s machine, network, or the ' +
|
138
|
-
'actions performed while tracing.');
|
156
|
+
const cruxParts = insightSet && this.#getCruxTraceSummary(insightSet);
|
157
|
+
if (cruxParts?.length) {
|
158
|
+
parts.push(...cruxParts);
|
139
159
|
} else {
|
140
160
|
parts.push('Metrics (field / real users): n/a – no data for this page in CrUX');
|
141
161
|
}
|
@@ -10,7 +10,7 @@ const defaultTimeFormatterOptions: Intl.NumberFormatOptions = {
|
|
10
10
|
style: 'unit',
|
11
11
|
unitDisplay: 'narrow',
|
12
12
|
minimumFractionDigits: 0,
|
13
|
-
maximumFractionDigits:
|
13
|
+
maximumFractionDigits: 0,
|
14
14
|
} as const;
|
15
15
|
|
16
16
|
const defaultByteFormatterOptions: Intl.NumberFormatOptions = {
|
@@ -25,8 +25,14 @@ const timeFormatters = {
|
|
25
25
|
...defaultTimeFormatterOptions,
|
26
26
|
unit: 'millisecond',
|
27
27
|
}),
|
28
|
+
milliWithPrecision: new Intl.NumberFormat('en-US', {
|
29
|
+
...defaultTimeFormatterOptions,
|
30
|
+
maximumFractionDigits: 1,
|
31
|
+
unit: 'millisecond',
|
32
|
+
}),
|
28
33
|
second: new Intl.NumberFormat('en-US', {
|
29
34
|
...defaultTimeFormatterOptions,
|
35
|
+
maximumFractionDigits: 1,
|
30
36
|
unit: 'second',
|
31
37
|
}),
|
32
38
|
micro: new Intl.NumberFormat('en-US', {
|
@@ -81,6 +87,9 @@ export function millis(x: number): string {
|
|
81
87
|
if (numberIsTooLarge(x)) {
|
82
88
|
return '-';
|
83
89
|
}
|
90
|
+
if (x < 1) {
|
91
|
+
return formatAndEnsureSpace(timeFormatters.milliWithPrecision, x);
|
92
|
+
}
|
84
93
|
return formatAndEnsureSpace(timeFormatters.milli, x);
|
85
94
|
}
|
86
95
|
|
@@ -6,28 +6,13 @@ import * as Trace from '../../../models/trace/trace.js';
|
|
6
6
|
|
7
7
|
import type {AICallTree} from './AICallTree.js';
|
8
8
|
|
9
|
-
export interface
|
10
|
-
type: 'full';
|
9
|
+
export interface AgentFocusData {
|
11
10
|
parsedTrace: Trace.TraceModel.ParsedTrace;
|
12
11
|
insightSet: Trace.Insights.Types.InsightSet|null;
|
12
|
+
callTree: AICallTree|null;
|
13
|
+
insight: Trace.Insights.Types.InsightModel|null;
|
13
14
|
}
|
14
15
|
|
15
|
-
interface AgentFocusDataCallTree {
|
16
|
-
type: 'call-tree';
|
17
|
-
parsedTrace: Trace.TraceModel.ParsedTrace;
|
18
|
-
insightSet: Trace.Insights.Types.InsightSet|null;
|
19
|
-
callTree: AICallTree;
|
20
|
-
}
|
21
|
-
|
22
|
-
export interface AgentFocusDataInsight {
|
23
|
-
type: 'insight';
|
24
|
-
parsedTrace: Trace.TraceModel.ParsedTrace;
|
25
|
-
insightSet: Trace.Insights.Types.InsightSet|null;
|
26
|
-
insight: Trace.Insights.Types.InsightModel;
|
27
|
-
}
|
28
|
-
|
29
|
-
type AgentFocusData = AgentFocusDataCallTree|AgentFocusDataInsight|AgentFocusDataFull;
|
30
|
-
|
31
16
|
function getFirstInsightSet(insights: Trace.Insights.Types.TraceInsightSets): Trace.Insights.Types.InsightSet|null {
|
32
17
|
// Currently only support a single insight set. Pick the first one with a navigation.
|
33
18
|
// TODO(cjamcl): we should just give the agent the entire insight set, and give
|
@@ -43,9 +28,10 @@ export class AgentFocus {
|
|
43
28
|
|
44
29
|
const insightSet = getFirstInsightSet(parsedTrace.insights);
|
45
30
|
return new AgentFocus({
|
46
|
-
type: 'full',
|
47
31
|
parsedTrace,
|
48
32
|
insightSet,
|
33
|
+
callTree: null,
|
34
|
+
insight: null,
|
49
35
|
});
|
50
36
|
}
|
51
37
|
|
@@ -57,9 +43,9 @@ export class AgentFocus {
|
|
57
43
|
|
58
44
|
const insightSet = getFirstInsightSet(parsedTrace.insights);
|
59
45
|
return new AgentFocus({
|
60
|
-
type: 'insight',
|
61
46
|
parsedTrace,
|
62
47
|
insightSet,
|
48
|
+
callTree: null,
|
63
49
|
insight,
|
64
50
|
});
|
65
51
|
}
|
@@ -79,7 +65,7 @@ export class AgentFocus {
|
|
79
65
|
getFirstInsightSet(insights);
|
80
66
|
}
|
81
67
|
|
82
|
-
return new AgentFocus({
|
68
|
+
return new AgentFocus({parsedTrace: callTree.parsedTrace, insightSet, callTree, insight: null});
|
83
69
|
}
|
84
70
|
|
85
71
|
#data: AgentFocusData;
|
@@ -91,6 +77,18 @@ export class AgentFocus {
|
|
91
77
|
get data(): AgentFocusData {
|
92
78
|
return this.#data;
|
93
79
|
}
|
80
|
+
|
81
|
+
withInsight(insight: Trace.Insights.Types.InsightModel|null): AgentFocus {
|
82
|
+
const focus = new AgentFocus(this.#data);
|
83
|
+
focus.#data.insight = insight;
|
84
|
+
return focus;
|
85
|
+
}
|
86
|
+
|
87
|
+
withCallTree(callTree: AICallTree|null): AgentFocus {
|
88
|
+
const focus = new AgentFocus(this.#data);
|
89
|
+
focus.#data.callTree = callTree;
|
90
|
+
return focus;
|
91
|
+
}
|
94
92
|
}
|
95
93
|
|
96
94
|
export function getPerformanceAgentFocusFromModel(model: Trace.TraceModel.Model): AgentFocus|null {
|
@@ -202,70 +202,133 @@ export class AiCodeCompletion extends Common.ObjectWrapper.ObjectWrapper<EventTy
|
|
202
202
|
};
|
203
203
|
}
|
204
204
|
|
205
|
+
async #completeCodeCached(request: Host.AidaClient.CompletionRequest): Promise<{
|
206
|
+
response: Host.AidaClient.CompletionResponse | null,
|
207
|
+
fromCache: boolean,
|
208
|
+
}> {
|
209
|
+
const cachedResponse = this.#checkCachedRequestForResponse(request);
|
210
|
+
if (cachedResponse) {
|
211
|
+
return {response: cachedResponse, fromCache: true};
|
212
|
+
}
|
213
|
+
|
214
|
+
const response = await this.#aidaClient.completeCode(request);
|
215
|
+
if (!response) {
|
216
|
+
return {
|
217
|
+
response: null,
|
218
|
+
fromCache: false,
|
219
|
+
};
|
220
|
+
}
|
221
|
+
|
222
|
+
this.#updateCachedRequest(request, response);
|
223
|
+
return {
|
224
|
+
response,
|
225
|
+
fromCache: false,
|
226
|
+
};
|
227
|
+
}
|
228
|
+
|
229
|
+
#pickSampleFromResponse(response: Host.AidaClient.CompletionResponse): Host.AidaClient.GenerationSample|null {
|
230
|
+
if (!response.generatedSamples.length) {
|
231
|
+
return null;
|
232
|
+
}
|
233
|
+
|
234
|
+
// `currentHint` is the portion of a standard autocomplete suggestion that the user has not yet typed.
|
235
|
+
// For example, if the user types `document.queryS` and the autocomplete suggests `document.querySelector`,
|
236
|
+
// the `currentHint` is `elector`.
|
237
|
+
const currentHintInMenu = this.#editor.editor.plugin(TextEditor.Config.showCompletionHint)?.currentHint;
|
238
|
+
// TODO(ergunsh): We should not do this check here. Instead, the AI code suggestions should be provided
|
239
|
+
// as it is to the view plugin. The view plugin should choose which one to use based on the completion hint
|
240
|
+
// and selected completion.
|
241
|
+
if (!currentHintInMenu) {
|
242
|
+
return response.generatedSamples[0];
|
243
|
+
}
|
244
|
+
|
245
|
+
// TODO(ergunsh): This does not handle looking for `selectedCompletion`. The `currentHint` is `null`
|
246
|
+
// for the Sources panel case.
|
247
|
+
// Even though there is no match, we still return the first suggestion which will be displayed
|
248
|
+
// when the traditional autocomplete menu is closed.
|
249
|
+
return response.generatedSamples.find(sample => sample.generationString.startsWith(currentHintInMenu)) ??
|
250
|
+
response.generatedSamples[0];
|
251
|
+
}
|
252
|
+
|
253
|
+
async #generateSampleForRequest(request: Host.AidaClient.CompletionRequest, cursor: number): Promise<{
|
254
|
+
suggestionText: string,
|
255
|
+
sampleId: number,
|
256
|
+
fromCache: boolean,
|
257
|
+
citations: Host.AidaClient.Citation[],
|
258
|
+
rpcGlobalId?: Host.AidaClient.RpcGlobalId,
|
259
|
+
}|null> {
|
260
|
+
const {response, fromCache} = await this.#completeCodeCached(request);
|
261
|
+
debugLog('At cursor position', cursor, {request, response, fromCache});
|
262
|
+
if (!response) {
|
263
|
+
return null;
|
264
|
+
}
|
265
|
+
|
266
|
+
const suggestionSample = this.#pickSampleFromResponse(response);
|
267
|
+
if (!suggestionSample) {
|
268
|
+
return null;
|
269
|
+
}
|
270
|
+
|
271
|
+
const shouldBlock =
|
272
|
+
suggestionSample.attributionMetadata?.attributionAction === Host.AidaClient.RecitationAction.BLOCK;
|
273
|
+
if (shouldBlock) {
|
274
|
+
return null;
|
275
|
+
}
|
276
|
+
|
277
|
+
const suggestionText = this.#trimSuggestionOverlap(suggestionSample.generationString, request);
|
278
|
+
if (suggestionText.length === 0) {
|
279
|
+
return null;
|
280
|
+
}
|
281
|
+
|
282
|
+
return {
|
283
|
+
suggestionText,
|
284
|
+
sampleId: suggestionSample.sampleId,
|
285
|
+
fromCache,
|
286
|
+
citations: suggestionSample.attributionMetadata?.citations ?? [],
|
287
|
+
rpcGlobalId: response.metadata.rpcGlobalId,
|
288
|
+
};
|
289
|
+
}
|
290
|
+
|
205
291
|
async #requestAidaSuggestion(request: Host.AidaClient.CompletionRequest, cursor: number): Promise<void> {
|
206
292
|
const startTime = performance.now();
|
207
|
-
let servedFromCache = false;
|
208
293
|
this.dispatchEventToListeners(Events.REQUEST_TRIGGERED, {});
|
209
294
|
|
210
295
|
try {
|
211
|
-
|
212
|
-
if (!
|
213
|
-
|
214
|
-
|
215
|
-
this.#updateCachedRequest(request, response);
|
216
|
-
}
|
217
|
-
} else {
|
218
|
-
servedFromCache = true;
|
296
|
+
const sampleResponse = await this.#generateSampleForRequest(request, cursor);
|
297
|
+
if (!sampleResponse) {
|
298
|
+
this.dispatchEventToListeners(Events.RESPONSE_RECEIVED, {});
|
299
|
+
return;
|
219
300
|
}
|
220
|
-
debugLog('At cursor position', cursor, {request, response});
|
221
|
-
if (response && response.generatedSamples.length > 0 && response.generatedSamples[0].generationString) {
|
222
|
-
if (response.generatedSamples[0].attributionMetadata?.attributionAction ===
|
223
|
-
Host.AidaClient.RecitationAction.BLOCK) {
|
224
|
-
this.dispatchEventToListeners(Events.RESPONSE_RECEIVED, {});
|
225
|
-
return;
|
226
|
-
}
|
227
301
|
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
302
|
+
const {
|
303
|
+
suggestionText,
|
304
|
+
sampleId,
|
305
|
+
fromCache,
|
306
|
+
citations,
|
307
|
+
rpcGlobalId,
|
308
|
+
} = sampleResponse;
|
309
|
+
const remainingDelay = Math.max(DELAY_BEFORE_SHOWING_RESPONSE_MS - (performance.now() - startTime), 0);
|
310
|
+
this.#renderingTimeout = window.setTimeout(() => {
|
311
|
+
this.#editor.dispatch({
|
312
|
+
effects: TextEditor.Config.setAiAutoCompleteSuggestion.of({
|
313
|
+
text: suggestionText,
|
314
|
+
from: cursor,
|
315
|
+
rpcGlobalId,
|
316
|
+
sampleId,
|
317
|
+
})
|
318
|
+
});
|
319
|
+
|
320
|
+
if (fromCache) {
|
321
|
+
Host.userMetrics.actionTaken(Host.UserMetrics.Action.AiCodeCompletionResponseServedFromCache);
|
232
322
|
}
|
233
|
-
|
234
|
-
|
235
|
-
|
323
|
+
|
324
|
+
if (rpcGlobalId) {
|
325
|
+
const latency = performance.now() - startTime;
|
326
|
+
this.#registerUserImpression(rpcGlobalId, sampleId, latency);
|
236
327
|
}
|
237
328
|
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
// We are not cancelling the previous responses even when there are more recent responses
|
242
|
-
// from the LLM as:
|
243
|
-
// In case the user kept typing characters that are prefix of the previous suggestion, it
|
244
|
-
// is a valid suggestion and we should display it to the user.
|
245
|
-
// In case the user typed a different character, the config for AI auto complete suggestion
|
246
|
-
// will set the suggestion to null.
|
247
|
-
this.#editor.dispatch({
|
248
|
-
effects: TextEditor.Config.setAiAutoCompleteSuggestion.of({
|
249
|
-
text: suggestionText,
|
250
|
-
from: cursor,
|
251
|
-
rpcGlobalId: response.metadata.rpcGlobalId,
|
252
|
-
sampleId: response.generatedSamples[0].sampleId,
|
253
|
-
})
|
254
|
-
});
|
255
|
-
if (servedFromCache) {
|
256
|
-
Host.userMetrics.actionTaken(Host.UserMetrics.Action.AiCodeCompletionResponseServedFromCache);
|
257
|
-
}
|
258
|
-
debugLog('Suggestion dispatched to the editor', response.generatedSamples[0], 'at cursor position', cursor);
|
259
|
-
if (response.metadata.rpcGlobalId) {
|
260
|
-
const latency = performance.now() - startTime;
|
261
|
-
this.#registerUserImpression(response.metadata.rpcGlobalId, response.generatedSamples[0].sampleId, latency);
|
262
|
-
}
|
263
|
-
const citations = response.generatedSamples[0].attributionMetadata?.citations;
|
264
|
-
this.dispatchEventToListeners(Events.RESPONSE_RECEIVED, {citations});
|
265
|
-
}, remainderDelay);
|
266
|
-
} else {
|
267
|
-
this.dispatchEventToListeners(Events.RESPONSE_RECEIVED, {});
|
268
|
-
}
|
329
|
+
debugLog('Suggestion dispatched to the editor', suggestionText, 'at cursor position', cursor);
|
330
|
+
this.dispatchEventToListeners(Events.RESPONSE_RECEIVED, {citations});
|
331
|
+
}, remainingDelay);
|
269
332
|
} catch (e) {
|
270
333
|
debugLog('Error while fetching code completion suggestions from AIDA', e);
|
271
334
|
this.dispatchEventToListeners(Events.RESPONSE_RECEIVED, {});
|
@@ -289,7 +352,12 @@ export class AiCodeCompletion extends Common.ObjectWrapper.ObjectWrapper<EventTy
|
|
289
352
|
/**
|
290
353
|
* Removes the end of a suggestion if it overlaps with the start of the suffix.
|
291
354
|
*/
|
292
|
-
#trimSuggestionOverlap(generationString: string,
|
355
|
+
#trimSuggestionOverlap(generationString: string, request: Host.AidaClient.CompletionRequest): string {
|
356
|
+
const suffix = request.suffix;
|
357
|
+
if (!suffix) {
|
358
|
+
return generationString;
|
359
|
+
}
|
360
|
+
|
293
361
|
// Iterate from the longest possible overlap down to the shortest
|
294
362
|
for (let i = Math.min(generationString.length, suffix.length); i > 0; i--) {
|
295
363
|
const overlapCandidate = suffix.substring(0, i);
|
@@ -126,9 +126,9 @@ export class ContentProviderBasedProject extends Workspace.Workspace.ProjectStor
|
|
126
126
|
progress: Common.Progress.Progress):
|
127
127
|
Promise<Map<Workspace.UISourceCode.UISourceCode, TextUtils.ContentProvider.SearchMatch[]|null>> {
|
128
128
|
const result = new Map();
|
129
|
-
progress.
|
129
|
+
progress.totalWork = filesMatchingFileQuery.length;
|
130
130
|
await Promise.all(filesMatchingFileQuery.map(searchInContent.bind(this)));
|
131
|
-
progress.done
|
131
|
+
progress.done = true;
|
132
132
|
return result;
|
133
133
|
|
134
134
|
async function searchInContent(
|
@@ -148,12 +148,14 @@ export class ContentProviderBasedProject extends Workspace.Workspace.ProjectStor
|
|
148
148
|
if (allMatchesFound) {
|
149
149
|
result.set(uiSourceCode, matches);
|
150
150
|
}
|
151
|
-
progress.
|
151
|
+
++progress.worked;
|
152
152
|
}
|
153
153
|
}
|
154
154
|
|
155
155
|
override indexContent(progress: Common.Progress.Progress): void {
|
156
|
-
queueMicrotask(
|
156
|
+
queueMicrotask(() => {
|
157
|
+
progress.done = true;
|
158
|
+
});
|
157
159
|
}
|
158
160
|
|
159
161
|
addUISourceCodeWithProvider(
|
@@ -272,7 +272,7 @@ export class BreakpointManager extends Common.ObjectWrapper.ObjectWrapper<EventT
|
|
272
272
|
if (!BreakpointManager.isValidPositionInScript(lineNumber, columnNumber, script)) {
|
273
273
|
continue;
|
274
274
|
}
|
275
|
-
this
|
275
|
+
this.#setBreakpoint(
|
276
276
|
uiSourceCode, lineNumber, columnNumber, breakpoint.condition, breakpoint.enabled, breakpoint.isLogpoint,
|
277
277
|
BreakpointOrigin.OTHER);
|
278
278
|
}
|
@@ -316,7 +316,7 @@ export class BreakpointManager extends Common.ObjectWrapper.ObjectWrapper<EventT
|
|
316
316
|
const normalizedLocation = await this.debuggerWorkspaceBinding.normalizeUILocation(uiLocation);
|
317
317
|
const breakpointLocation = BreakpointManager.breakpointLocationFromUiLocation(normalizedLocation);
|
318
318
|
|
319
|
-
const breakpoint = this
|
319
|
+
const breakpoint = this.#setBreakpoint(
|
320
320
|
normalizedLocation.uiSourceCode, breakpointLocation.lineNumber, breakpointLocation.columnNumber, condition,
|
321
321
|
enabled, isLogpoint, origin);
|
322
322
|
|
@@ -333,7 +333,7 @@ export class BreakpointManager extends Common.ObjectWrapper.ObjectWrapper<EventT
|
|
333
333
|
return primaryBreakpoint;
|
334
334
|
}
|
335
335
|
|
336
|
-
|
336
|
+
#setBreakpoint(
|
337
337
|
uiSourceCode: Workspace.UISourceCode.UISourceCode, lineNumber: number, columnNumber: number|undefined,
|
338
338
|
condition: UserCondition, enabled: boolean, isLogpoint: boolean, origin: BreakpointOrigin): Breakpoint {
|
339
339
|
const url = BreakpointManager.getScriptForInlineUiSourceCode(uiSourceCode)?.sourceURL ?? uiSourceCode.url();
|
@@ -59,7 +59,7 @@ export class Writer {
|
|
59
59
|
const compositeProgress = new Common.Progress.CompositeProgress(progress);
|
60
60
|
|
61
61
|
const content = await Writer.harStringForRequests(requests, options, compositeProgress);
|
62
|
-
if (progress.
|
62
|
+
if (progress.canceled) {
|
63
63
|
return;
|
64
64
|
}
|
65
65
|
await Writer.writeToStream(stream, compositeProgress, content);
|
@@ -69,8 +69,8 @@ export class Writer {
|
|
69
69
|
requests: SDK.NetworkRequest.NetworkRequest[], options: BuildOptions,
|
70
70
|
compositeProgress: Common.Progress.CompositeProgress): Promise<string> {
|
71
71
|
const progress = compositeProgress.createSubProgress();
|
72
|
-
progress.
|
73
|
-
progress.
|
72
|
+
progress.title = i18nString(UIStrings.collectingContent);
|
73
|
+
progress.totalWork = requests.length;
|
74
74
|
|
75
75
|
// Sort by issueTime because this is recorded as startedDateTime in HAR logs.
|
76
76
|
requests.sort((reqA, reqB) => reqA.issueTime() - reqB.issueTime());
|
@@ -82,9 +82,9 @@ export class Writer {
|
|
82
82
|
}
|
83
83
|
|
84
84
|
await Promise.all(promises);
|
85
|
-
progress.done
|
85
|
+
progress.done = true;
|
86
86
|
|
87
|
-
if (progress.
|
87
|
+
if (progress.canceled) {
|
88
88
|
return '';
|
89
89
|
}
|
90
90
|
return JSON.stringify({log: harLog}, null, jsonIndent);
|
@@ -106,7 +106,7 @@ export class Writer {
|
|
106
106
|
}
|
107
107
|
|
108
108
|
function contentLoaded(entry: EntryDTO, contentDataOrError: TextUtils.ContentData.ContentDataOrError): void {
|
109
|
-
progress.
|
109
|
+
++progress.worked;
|
110
110
|
const contentData = TextUtils.ContentData.ContentData.asDeferredContent(contentDataOrError);
|
111
111
|
let encoded: true|boolean = contentData.isEncoded;
|
112
112
|
if (contentData.content !== null) {
|
@@ -127,14 +127,14 @@ export class Writer {
|
|
127
127
|
stream: Common.StringOutputStream.OutputStream, compositeProgress: Common.Progress.CompositeProgress,
|
128
128
|
fileContent: string): Promise<void> {
|
129
129
|
const progress = compositeProgress.createSubProgress();
|
130
|
-
progress.
|
131
|
-
progress.
|
132
|
-
for (let i = 0; i < fileContent.length && !progress.
|
130
|
+
progress.title = i18nString(UIStrings.writingFile);
|
131
|
+
progress.totalWork = fileContent.length;
|
132
|
+
for (let i = 0; i < fileContent.length && !progress.canceled; i += chunkSize) {
|
133
133
|
const chunk = fileContent.substr(i, chunkSize);
|
134
134
|
await stream.write(chunk);
|
135
|
-
progress.
|
135
|
+
progress.worked += chunk.length;
|
136
136
|
}
|
137
|
-
progress.done
|
137
|
+
progress.done = true;
|
138
138
|
}
|
139
139
|
}
|
140
140
|
|
@@ -6088,7 +6088,7 @@ export const NativeFunctions = [
|
|
6088
6088
|
},
|
6089
6089
|
{
|
6090
6090
|
name: "addAnimation",
|
6091
|
-
signatures: [["animation"]]
|
6091
|
+
signatures: [["animation","action","behavior"]]
|
6092
6092
|
},
|
6093
6093
|
{
|
6094
6094
|
name: "removeAnimation",
|
@@ -6765,6 +6765,10 @@ export const NativeFunctions = [
|
|
6765
6765
|
name: "DragEvent",
|
6766
6766
|
signatures: [["type","?eventInitDict"]]
|
6767
6767
|
},
|
6768
|
+
{
|
6769
|
+
name: "EmailVerifiedEvent",
|
6770
|
+
signatures: [["type","?eventInitDict"]]
|
6771
|
+
},
|
6768
6772
|
{
|
6769
6773
|
name: "ErrorEvent",
|
6770
6774
|
signatures: [["type","?eventInitDict"]]
|
@@ -7605,7 +7609,7 @@ export const NativeFunctions = [
|
|
7605
7609
|
signatures: [["element","x","y","?dwidth","?dheight"]]
|
7606
7610
|
},
|
7607
7611
|
{
|
7608
|
-
name: "
|
7612
|
+
name: "drawElementImage",
|
7609
7613
|
signatures: [["element","x","y","?dwidth","?dheight"]]
|
7610
7614
|
},
|
7611
7615
|
{
|
@@ -8420,10 +8424,6 @@ export const NativeFunctions = [
|
|
8420
8424
|
name: "RTCRtpScriptTransform",
|
8421
8425
|
signatures: [["worker","?options","?transfer"]]
|
8422
8426
|
},
|
8423
|
-
{
|
8424
|
-
name: "sendRtp",
|
8425
|
-
signatures: [["packet","options"]]
|
8426
|
-
},
|
8427
8427
|
{
|
8428
8428
|
name: "setHeaderExtensionsToNegotiate",
|
8429
8429
|
signatures: [["extensions"]]
|
@@ -8891,7 +8891,7 @@ export const NativeFunctions = [
|
|
8891
8891
|
signatures: [["provokeMode"]]
|
8892
8892
|
},
|
8893
8893
|
{
|
8894
|
-
name: "
|
8894
|
+
name: "texElementImage2D",
|
8895
8895
|
signatures: [["target","level","internalformat","format","type","element"]]
|
8896
8896
|
},
|
8897
8897
|
{
|
@@ -276,14 +276,14 @@ export class FileSystem extends Workspace.Workspace.ProjectStore {
|
|
276
276
|
if (!queriesToRun.length) {
|
277
277
|
queriesToRun.push('');
|
278
278
|
}
|
279
|
-
progress.
|
279
|
+
progress.totalWork = queriesToRun.length;
|
280
280
|
|
281
281
|
for (const query of queriesToRun) {
|
282
282
|
const files = await this.#fileSystem.searchInPath(searchConfig.isRegex() ? '' : query, progress);
|
283
283
|
files.sort(Platform.StringUtilities.naturalOrderComparator);
|
284
284
|
workingFileSet = Platform.ArrayUtilities.intersectOrdered(
|
285
285
|
workingFileSet, files, Platform.StringUtilities.naturalOrderComparator);
|
286
|
-
progress.
|
286
|
+
++progress.worked;
|
287
287
|
}
|
288
288
|
|
289
289
|
const result = new Map();
|
@@ -294,7 +294,7 @@ export class FileSystem extends Workspace.Workspace.ProjectStore {
|
|
294
294
|
}
|
295
295
|
}
|
296
296
|
|
297
|
-
progress.done
|
297
|
+
progress.done = true;
|
298
298
|
return result;
|
299
299
|
}
|
300
300
|
|