chrome-devtools-frontend 1.0.1626437 → 1.0.1628368
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/front_end/core/common/VersionController.ts +33 -1
- package/front_end/core/host/UserMetrics.ts +11 -8
- package/front_end/core/root/ExperimentNames.ts +1 -3
- package/front_end/core/sdk/CSSContainerQuery.ts +3 -1
- package/front_end/core/sdk/CSSModel.ts +23 -0
- package/front_end/core/sdk/HeapProfilerModel.ts +1 -11
- package/front_end/entrypoints/formatter_worker/AcornTokenizer.ts +2 -1
- package/front_end/entrypoints/formatter_worker/CSSFormatter.ts +2 -4
- package/front_end/entrypoints/formatter_worker/ESTreeWalker.ts +3 -2
- package/front_end/entrypoints/formatter_worker/JavaScriptFormatter.ts +13 -0
- package/front_end/entrypoints/formatter_worker/Substitute.ts +1 -1
- package/front_end/entrypoints/greendev_floaty/FloatyEntrypoint.ts +0 -1
- package/front_end/entrypoints/greendev_floaty/greendev_floaty.ts +0 -1
- package/front_end/entrypoints/main/MainImpl.ts +4 -36
- package/front_end/generated/InspectorBackendCommands.ts +4 -3
- package/front_end/generated/protocol-mapping.d.ts +5 -0
- package/front_end/generated/protocol-proxy-api.d.ts +4 -0
- package/front_end/generated/protocol.ts +22 -0
- package/front_end/models/ai_assistance/agents/AiAgent.ts +2 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +11 -5
- package/front_end/models/javascript_metadata/NativeFunctions.js +4 -0
- package/front_end/models/lighthouse/RunTypes.ts +1 -1
- package/front_end/models/workspace/UISourceCode.ts +0 -1
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +4 -3
- package/front_end/panels/common/AiCodeCompletionTeaser.ts +9 -0
- package/front_end/panels/common/common.ts +1 -1
- package/front_end/panels/console/ConsoleView.ts +2 -2
- package/front_end/panels/elements/StylePropertiesSection.ts +6 -2
- package/front_end/panels/elements/StylesAiCodeCompletionProvider.ts +1 -1
- package/front_end/panels/elements/StylesSidebarPane.ts +8 -7
- package/front_end/panels/emulation/DeviceModeToolbar.ts +20 -26
- package/front_end/panels/emulation/DeviceModeView.ts +2 -2
- package/front_end/panels/lighthouse/LighthouseController.ts +18 -0
- package/front_end/panels/profiler/HeapSnapshotGridNodes.ts +9 -4
- package/front_end/panels/profiler/profiler-meta.ts +0 -71
- package/front_end/panels/profiler/profiler.ts +0 -2
- package/front_end/panels/sources/AiCodeCompletionPlugin.ts +7 -6
- package/front_end/panels/sources/ProfilePlugin.ts +12 -65
- package/front_end/panels/sources/UISourceCodeFrame.ts +1 -2
- package/front_end/panels/timeline/TimelineController.ts +1 -2
- package/front_end/panels/timeline/TimelinePanel.ts +1 -1
- package/front_end/panels/timeline/TimelineUIUtils.ts +2 -10
- package/front_end/panels/timeline/timeline-meta.ts +26 -0
- package/front_end/third_party/acorn/README.chromium +1 -1
- package/front_end/third_party/acorn/acorn.ts +1 -1
- package/front_end/third_party/acorn/package/CHANGELOG.md +128 -0
- package/front_end/third_party/acorn/package/README.md +42 -19
- package/front_end/third_party/acorn/package/dist/acorn.d.mts +883 -26
- package/front_end/third_party/acorn/package/dist/acorn.d.ts +859 -268
- package/front_end/third_party/acorn/package/dist/acorn.js +420 -115
- package/front_end/third_party/acorn/package/dist/acorn.mjs +420 -115
- package/front_end/third_party/acorn/package/dist/bin.js +1 -1
- package/front_end/third_party/acorn/package/package.json +3 -3
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/lighthouse/README.chromium +2 -2
- package/front_end/third_party/lighthouse/lighthouse-dt-bundle.js +4213 -4208
- package/front_end/third_party/lighthouse/locales/en-US.json +26 -8
- package/front_end/third_party/lighthouse/locales/en-XL.json +26 -8
- package/front_end/third_party/lighthouse/report-assets/report-generator.mjs +1 -1
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js +7 -7
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.js +4 -3
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts +15 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/JSHandle.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/JSHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/api/Page.d.ts +2 -2
- 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 +4 -3
- 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/Frame.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ExecutionContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ExecutionContext.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/ExecutionContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.d.ts +2 -5
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.js +4 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/FrameManager.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/IsolatedWorld.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/IsolatedWorld.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Page.d.ts +1 -0
- 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 +3 -0
- 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/cdp/TargetManager.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/TargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js +9 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.js +7 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/common/EventEmitter.js.map +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 +6 -3
- 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/node/ScreenRecorder.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ScreenRecorder.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/node/ScreenRecorder.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +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/cjs/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.d.ts +23 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +171 -149
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js +7 -7
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Browser.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.js +4 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/BrowserContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts +15 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/JSHandle.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/JSHandle.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/api/Page.d.ts +2 -2
- 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 +4 -3
- 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/Frame.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/bidi/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ExecutionContext.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ExecutionContext.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/ExecutionContext.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.d.ts +2 -5
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.js +4 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Frame.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/FrameManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/FrameManager.js +3 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/FrameManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/IsolatedWorld.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/IsolatedWorld.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Page.d.ts +1 -0
- 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 +3 -0
- 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/cdp/TargetManager.d.ts +4 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js +2 -2
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/TargetManager.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts +5 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js +8 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/BrowserConnector.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.d.ts +5 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.js +8 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/common/EventEmitter.js.map +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 +6 -3
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/BrowserLauncher.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ScreenRecorder.d.ts.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ScreenRecorder.js +1 -0
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/node/ScreenRecorder.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/util/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/types.d.ts +23 -2
- package/front_end/third_party/puppeteer/package/package.json +2 -2
- package/front_end/third_party/puppeteer/package/src/api/Browser.ts +6 -7
- package/front_end/third_party/puppeteer/package/src/api/BrowserContext.ts +4 -3
- package/front_end/third_party/puppeteer/package/src/api/Frame.ts +21 -1
- package/front_end/third_party/puppeteer/package/src/api/JSHandle.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/api/Page.ts +9 -4
- package/front_end/third_party/puppeteer/package/src/bidi/Frame.ts +2 -1
- package/front_end/third_party/puppeteer/package/src/cdp/ExecutionContext.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/cdp/Frame.ts +9 -5
- package/front_end/third_party/puppeteer/package/src/cdp/FrameManager.ts +3 -1
- package/front_end/third_party/puppeteer/package/src/cdp/IsolatedWorld.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/cdp/Page.ts +4 -0
- package/front_end/third_party/puppeteer/package/src/cdp/TargetManager.ts +2 -2
- package/front_end/third_party/puppeteer/package/src/common/BrowserConnector.ts +19 -3
- package/front_end/third_party/puppeteer/package/src/common/EventEmitter.ts +10 -1
- package/front_end/third_party/puppeteer/package/src/node/BrowserLauncher.ts +7 -3
- package/front_end/third_party/puppeteer/package/src/node/ScreenRecorder.ts +1 -0
- package/front_end/third_party/puppeteer/package/src/revisions.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/util/version.ts +1 -1
- package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +7 -1
- package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +8 -1
- package/front_end/ui/legacy/components/perf_ui/LineLevelProfile.ts +0 -56
- package/front_end/ui/legacy/components/perf_ui/perf_ui-meta.ts +0 -35
- package/front_end/ui/legacy/components/perf_ui/perf_ui.ts +0 -2
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
- package/package.json +1 -1
- package/front_end/panels/profiler/LiveHeapProfileView.ts +0 -405
- package/front_end/panels/profiler/liveHeapProfile.css +0 -22
- package/front_end/ui/legacy/components/perf_ui/LiveHeapProfile.ts +0 -113
|
@@ -1330,17 +1330,18 @@ function renderNetworkRequestPreview(networkRequest: NonNullable<DomTreeAiWidget
|
|
|
1330
1330
|
const resourceType = Common.ResourceType.resourceTypes[networkRequest.resourceType];
|
|
1331
1331
|
const {iconName, color} = PanelUtils.iconDataForResourceType(resourceType);
|
|
1332
1332
|
|
|
1333
|
+
const imageUrl = networkRequest.imageContent?.asImagePreviewUrl() ?? networkRequest.url;
|
|
1334
|
+
|
|
1333
1335
|
return html`
|
|
1334
1336
|
<div class="network-request-preview">
|
|
1335
1337
|
<div class="network-request-header">
|
|
1336
1338
|
<div class="network-request-icon">
|
|
1337
1339
|
${
|
|
1338
|
-
resourceType.isImage() ? html`<img src=${
|
|
1340
|
+
resourceType.isImage() ? html`<img src=${imageUrl} alt=${filename} />` :
|
|
1339
1341
|
html`<devtools-icon name=${iconName} style=${Lit.Directives.styleMap({
|
|
1340
1342
|
color: color ?? ''
|
|
1341
1343
|
})}></devtools-icon>`}
|
|
1342
|
-
</div>
|
|
1343
|
-
<div class="network-request-details">
|
|
1344
|
+
</div> <div class="network-request-details">
|
|
1344
1345
|
<div class="network-request-name" title=${networkRequest.url}>${filename}</div>
|
|
1345
1346
|
<div class="network-request-size">${size}</div>
|
|
1346
1347
|
</div>
|
|
@@ -9,6 +9,7 @@ import * as Host from '../../core/host/host.js';
|
|
|
9
9
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
10
10
|
import * as Root from '../../core/root/root.js';
|
|
11
11
|
import * as AIAssistance from '../../models/ai_assistance/ai_assistance.js';
|
|
12
|
+
import * as AiCodeCompletion from '../../models/ai_code_completion/ai_code_completion.js';
|
|
12
13
|
import * as AiCodeGeneration from '../../models/ai_code_generation/ai_code_generation.js';
|
|
13
14
|
import * as Snackbars from '../../ui/components/snackbars/snackbars.js';
|
|
14
15
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
@@ -163,6 +164,7 @@ export const DEFAULT_VIEW: View = (input, _output, target) => {
|
|
|
163
164
|
|
|
164
165
|
interface AiCodeCompletionTeaserConfig {
|
|
165
166
|
onDetach: () => void;
|
|
167
|
+
panel?: AiCodeCompletion.AiCodeCompletion.ContextFlavor;
|
|
166
168
|
}
|
|
167
169
|
|
|
168
170
|
export class AiCodeCompletionTeaser extends UI.Widget.Widget {
|
|
@@ -172,6 +174,7 @@ export class AiCodeCompletionTeaser extends UI.Widget.Widget {
|
|
|
172
174
|
#boundOnAidaAvailabilityChange: () => Promise<void>;
|
|
173
175
|
#boundOnAiCodeCompletionSettingChanged: () => void;
|
|
174
176
|
#onDetach: () => void;
|
|
177
|
+
#panel?: AiCodeCompletion.AiCodeCompletion.ContextFlavor;
|
|
175
178
|
|
|
176
179
|
// Whether the user completed first run experience dialog or not.
|
|
177
180
|
#aiCodeCompletionFreCompletedSetting =
|
|
@@ -186,6 +189,7 @@ export class AiCodeCompletionTeaser extends UI.Widget.Widget {
|
|
|
186
189
|
super();
|
|
187
190
|
this.markAsExternallyManaged();
|
|
188
191
|
this.#onDetach = config.onDetach;
|
|
192
|
+
this.#panel = config.panel;
|
|
189
193
|
this.#view = view ?? DEFAULT_VIEW;
|
|
190
194
|
this.#boundOnAidaAvailabilityChange = this.#onAidaAvailabilityChange.bind(this);
|
|
191
195
|
this.#boundOnAiCodeCompletionSettingChanged = this.#onAiCodeCompletionSettingChanged.bind(this);
|
|
@@ -283,6 +287,11 @@ export class AiCodeCompletionTeaser extends UI.Widget.Widget {
|
|
|
283
287
|
|
|
284
288
|
if (result) {
|
|
285
289
|
this.#aiCodeCompletionFreCompletedSetting.set(true);
|
|
290
|
+
if (this.#panel === AiCodeCompletion.AiCodeCompletion.ContextFlavor.CONSOLE) {
|
|
291
|
+
Host.userMetrics.actionTaken(Host.UserMetrics.Action.AiCodeCompletionFreCompletedFromConsole);
|
|
292
|
+
} else if (this.#panel === AiCodeCompletion.AiCodeCompletion.ContextFlavor.SOURCES) {
|
|
293
|
+
Host.userMetrics.actionTaken(Host.UserMetrics.Action.AiCodeCompletionFreCompletedFromSources);
|
|
294
|
+
}
|
|
286
295
|
this.detach();
|
|
287
296
|
} else {
|
|
288
297
|
this.requestUpdate();
|
|
@@ -102,7 +102,7 @@ export {FreDialog} from './FreDialog.js';
|
|
|
102
102
|
export {GdpSignUpDialog} from './GdpSignUpDialog.js';
|
|
103
103
|
export {GeminiRebrandPromoDialog} from './GeminiRebrandPromoDialog.js';
|
|
104
104
|
export {AiCodeCompletionDisclaimer} from './AiCodeCompletionDisclaimer.js';
|
|
105
|
-
export
|
|
105
|
+
export * as AiCodeCompletionSummaryToolbar from './AiCodeCompletionSummaryToolbar.js';
|
|
106
106
|
export * from './BadgeNotification.js';
|
|
107
107
|
export * as ExtensionPanel from './ExtensionPanel.js';
|
|
108
108
|
export * as ExtensionServer from './ExtensionServer.js';
|
|
@@ -351,7 +351,7 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
|
351
351
|
#allCollapsed = false;
|
|
352
352
|
aiCodeCompletionConfig?: TextEditor.AiCodeCompletionProvider.AiCodeCompletionConfig;
|
|
353
353
|
private aiCodeCompletionSummaryToolbarContainer?: HTMLElement;
|
|
354
|
-
private aiCodeCompletionSummaryToolbar?: AiCodeCompletionSummaryToolbar;
|
|
354
|
+
private aiCodeCompletionSummaryToolbar?: AiCodeCompletionSummaryToolbar.AiCodeCompletionSummaryToolbar;
|
|
355
355
|
|
|
356
356
|
constructor(viewportThrottlerTimeout: number) {
|
|
357
357
|
super();
|
|
@@ -667,7 +667,7 @@ export class ConsoleView extends UI.Widget.VBox implements
|
|
|
667
667
|
if (this.aiCodeCompletionSummaryToolbar) {
|
|
668
668
|
return;
|
|
669
669
|
}
|
|
670
|
-
this.aiCodeCompletionSummaryToolbar = new AiCodeCompletionSummaryToolbar({
|
|
670
|
+
this.aiCodeCompletionSummaryToolbar = new AiCodeCompletionSummaryToolbar.AiCodeCompletionSummaryToolbar({
|
|
671
671
|
citationsTooltipId: CITATIONS_TOOLTIP_ID,
|
|
672
672
|
disclaimerTooltipId: DISCLAIMER_TOOLTIP_ID,
|
|
673
673
|
spinnerTooltipId: SPINNER_TOOLTIP_ID,
|
|
@@ -1021,7 +1021,7 @@ export class StylePropertiesSection {
|
|
|
1021
1021
|
const containerQueryElement = new ElementsComponents.CSSQuery.CSSQuery();
|
|
1022
1022
|
containerQueryElement.data = {
|
|
1023
1023
|
queryPrefix: '@container',
|
|
1024
|
-
queryName: containerQuery.name,
|
|
1024
|
+
queryName: containerQuery.textIsConditionText ? undefined : containerQuery.name,
|
|
1025
1025
|
queryText: containerQuery.text,
|
|
1026
1026
|
onQueryTextClick,
|
|
1027
1027
|
jslogContext: 'container-query',
|
|
@@ -1596,7 +1596,11 @@ export class StylePropertiesSection {
|
|
|
1596
1596
|
const range = query.range as TextUtils.TextRange.TextRange;
|
|
1597
1597
|
let success = false;
|
|
1598
1598
|
if (query instanceof SDK.CSSContainerQuery.CSSContainerQuery) {
|
|
1599
|
-
|
|
1599
|
+
if (query.textIsConditionText) {
|
|
1600
|
+
success = await cssModel.setContainerQueryConditionText(query.styleSheetId, range, newContent);
|
|
1601
|
+
} else {
|
|
1602
|
+
success = await cssModel.setContainerQueryText(query.styleSheetId, range, newContent);
|
|
1603
|
+
}
|
|
1600
1604
|
} else if (query instanceof SDK.CSSSupports.CSSSupports) {
|
|
1601
1605
|
success = await cssModel.setSupportsText(query.styleSheetId, range, newContent);
|
|
1602
1606
|
} else if (query instanceof SDK.CSSScope.CSSScope) {
|
|
@@ -166,7 +166,7 @@ export class StylesAiCodeCompletionProvider {
|
|
|
166
166
|
}|null> {
|
|
167
167
|
this.#aiCodeCompletionConfig?.onRequestTriggered();
|
|
168
168
|
// Registering AiCodeCompletionRequestTriggered metric even if the request is served from cache
|
|
169
|
-
Host.userMetrics.actionTaken(Host.UserMetrics.Action.
|
|
169
|
+
Host.userMetrics.actionTaken(Host.UserMetrics.Action.AiCodeCompletionRequestTriggeredFromStyles);
|
|
170
170
|
|
|
171
171
|
try {
|
|
172
172
|
const completionResponse = await this.#aiCodeCompletion?.completeCode(
|
|
@@ -229,7 +229,7 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
229
229
|
aiCodeCompletionConfig?: TextEditor.AiCodeCompletionProvider.AiCodeCompletionConfig;
|
|
230
230
|
aiCodeCompletionProvider?: StylesAiCodeCompletionProvider.StylesAiCodeCompletionProvider;
|
|
231
231
|
#aiCodeCompletionSummaryToolbarContainer?: HTMLElement;
|
|
232
|
-
#aiCodeCompletionSummaryToolbar?: PanelsCommon.AiCodeCompletionSummaryToolbar;
|
|
232
|
+
#aiCodeCompletionSummaryToolbar?: PanelsCommon.AiCodeCompletionSummaryToolbar.AiCodeCompletionSummaryToolbar;
|
|
233
233
|
|
|
234
234
|
constructor(computedStyleModel: ComputedStyle.ComputedStyleModel.ComputedStyleModel) {
|
|
235
235
|
super(computedStyleModel, {delegatesFocus: true, useShadowDom: true, classes: ['flex-none']});
|
|
@@ -1581,12 +1581,13 @@ export class StylesSidebarPane extends Common.ObjectWrapper.eventMixin<EventType
|
|
|
1581
1581
|
if (this.#aiCodeCompletionSummaryToolbar) {
|
|
1582
1582
|
return;
|
|
1583
1583
|
}
|
|
1584
|
-
this.#aiCodeCompletionSummaryToolbar =
|
|
1585
|
-
|
|
1586
|
-
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
|
|
1584
|
+
this.#aiCodeCompletionSummaryToolbar =
|
|
1585
|
+
new PanelsCommon.AiCodeCompletionSummaryToolbar.AiCodeCompletionSummaryToolbar({
|
|
1586
|
+
citationsTooltipId: CITATIONS_TOOLTIP_ID,
|
|
1587
|
+
disclaimerTooltipId: DISCLAIMER_TOOLTIP_ID,
|
|
1588
|
+
spinnerTooltipId: SPINNER_TOOLTIP_ID,
|
|
1589
|
+
panel: AiCodeCompletion.AiCodeCompletion.ContextFlavor.STYLES,
|
|
1590
|
+
});
|
|
1590
1591
|
const containingPane = this.contentElement.enclosingNodeOrSelfWithClass('style-panes-wrapper') as HTMLElement;
|
|
1591
1592
|
this.#aiCodeCompletionSummaryToolbarContainer =
|
|
1592
1593
|
containingPane.createChild('div', 'ai-code-completion-summary-toolbar-container');
|
|
@@ -188,11 +188,11 @@ const UIStrings = {
|
|
|
188
188
|
} as const;
|
|
189
189
|
const str_ = i18n.i18n.registerUIStrings('panels/emulation/DeviceModeToolbar.ts', UIStrings);
|
|
190
190
|
const i18nString = i18n.i18n.getLocalizedString.bind(undefined, str_);
|
|
191
|
-
const {ifDefined, styleMap} = Directives;
|
|
191
|
+
const {ifDefined, live, styleMap} = Directives;
|
|
192
192
|
const {widget} = UI.Widget;
|
|
193
193
|
const {bindToSetting} = UI.UIUtils;
|
|
194
194
|
|
|
195
|
-
export class DeviceModeToolbar {
|
|
195
|
+
export class DeviceModeToolbar extends UI.Widget.Widget {
|
|
196
196
|
private model: EmulationModel.DeviceModeModel.DeviceModeModel;
|
|
197
197
|
private readonly showMediaInspectorSetting: Common.Settings.Setting<boolean>;
|
|
198
198
|
private readonly showRulersSetting: Common.Settings.Setting<boolean>;
|
|
@@ -201,7 +201,6 @@ export class DeviceModeToolbar {
|
|
|
201
201
|
private readonly showUserAgentTypeSetting: Common.Settings.Setting<boolean>;
|
|
202
202
|
private autoAdjustScaleSetting: Common.Settings.Setting<boolean>;
|
|
203
203
|
private readonly lastMode: Map<EmulationModel.EmulatedDevices.EmulatedDevice, EmulationModel.EmulatedDevices.Mode>;
|
|
204
|
-
readonly #element: HTMLDivElement;
|
|
205
204
|
private readonly emulatedDevicesList: EmulationModel.EmulatedDevices.EmulatedDevicesList;
|
|
206
205
|
private readonly persistenceSetting: Common.Settings.Setting<{device: string, orientation: string, mode: string}>;
|
|
207
206
|
private mainToolbar: UI.Toolbar.Toolbar;
|
|
@@ -213,6 +212,7 @@ export class DeviceModeToolbar {
|
|
|
213
212
|
model: EmulationModel.DeviceModeModel.DeviceModeModel,
|
|
214
213
|
showMediaInspectorSetting: Common.Settings.Setting<boolean>,
|
|
215
214
|
showRulersSetting: Common.Settings.Setting<boolean>) {
|
|
215
|
+
super();
|
|
216
216
|
this.model = model;
|
|
217
217
|
this.showMediaInspectorSetting = showMediaInspectorSetting;
|
|
218
218
|
this.showRulersSetting = showRulersSetting;
|
|
@@ -220,21 +220,19 @@ export class DeviceModeToolbar {
|
|
|
220
220
|
this.deviceOutlineSetting = this.model.deviceOutlineSetting();
|
|
221
221
|
this.showDeviceScaleFactorSetting =
|
|
222
222
|
Common.Settings.Settings.instance().createSetting('emulation.show-device-scale-factor', false);
|
|
223
|
-
this.showDeviceScaleFactorSetting.addChangeListener(this.
|
|
223
|
+
this.showDeviceScaleFactorSetting.addChangeListener(this.requestUpdate, this);
|
|
224
224
|
|
|
225
225
|
this.showUserAgentTypeSetting =
|
|
226
226
|
Common.Settings.Settings.instance().createSetting('emulation.show-user-agent-type', false);
|
|
227
|
-
this.showUserAgentTypeSetting.addChangeListener(this.
|
|
227
|
+
this.showUserAgentTypeSetting.addChangeListener(this.requestUpdate, this);
|
|
228
228
|
|
|
229
229
|
this.autoAdjustScaleSetting =
|
|
230
230
|
Common.Settings.Settings.instance().createSetting('emulation.auto-adjust-scale', true);
|
|
231
231
|
|
|
232
232
|
this.lastMode = new Map();
|
|
233
233
|
|
|
234
|
-
this
|
|
235
|
-
this
|
|
236
|
-
this.#element.setAttribute('jslog', `${VisualLogging.toolbar('device-mode').track({resize: true})}`);
|
|
237
|
-
|
|
234
|
+
this.contentElement.classList.add('device-mode-toolbar');
|
|
235
|
+
this.contentElement.setAttribute('jslog', VisualLogging.toolbar('device-mode').track({resize: true}).toString());
|
|
238
236
|
this.mainToolbar = this.createMainToolbar();
|
|
239
237
|
this.optionsToolbar = this.createOptionsToolbar();
|
|
240
238
|
|
|
@@ -247,13 +245,13 @@ export class DeviceModeToolbar {
|
|
|
247
245
|
this.persistenceSetting = Common.Settings.Settings.instance().createSetting(
|
|
248
246
|
'emulation.device-mode-value', {device: '', orientation: '', mode: ''});
|
|
249
247
|
|
|
250
|
-
this.model.toolbarControlsEnabledSetting().addChangeListener(this.
|
|
251
|
-
this.model.scaleSetting().addChangeListener(this.
|
|
252
|
-
this.model.uaSetting().addChangeListener(this.
|
|
253
|
-
this.model.deviceScaleFactorSetting().addChangeListener(this.
|
|
254
|
-
this.model.addEventListener(EmulationModel.DeviceModeModel.Events.UPDATED, this.
|
|
248
|
+
this.model.toolbarControlsEnabledSetting().addChangeListener(this.requestUpdate, this);
|
|
249
|
+
this.model.scaleSetting().addChangeListener(this.requestUpdate, this);
|
|
250
|
+
this.model.uaSetting().addChangeListener(this.requestUpdate, this);
|
|
251
|
+
this.model.deviceScaleFactorSetting().addChangeListener(this.requestUpdate, this);
|
|
252
|
+
this.model.addEventListener(EmulationModel.DeviceModeModel.Events.UPDATED, this.requestUpdate, this);
|
|
255
253
|
|
|
256
|
-
this.
|
|
254
|
+
this.requestUpdate();
|
|
257
255
|
}
|
|
258
256
|
|
|
259
257
|
private createEmptyToolbarElement(): HTMLDivElement {
|
|
@@ -292,7 +290,7 @@ export class DeviceModeToolbar {
|
|
|
292
290
|
}
|
|
293
291
|
|
|
294
292
|
private createMainToolbar(): UI.Toolbar.Toolbar {
|
|
295
|
-
const mainToolbar = this
|
|
293
|
+
const mainToolbar = this.contentElement.createChild('devtools-toolbar', 'main-toolbar');
|
|
296
294
|
return mainToolbar as UI.Toolbar.Toolbar;
|
|
297
295
|
}
|
|
298
296
|
|
|
@@ -359,7 +357,7 @@ export class DeviceModeToolbar {
|
|
|
359
357
|
title=${i18nString(UIStrings.deviceType)}
|
|
360
358
|
aria-label=${i18nString(UIStrings.deviceType)}
|
|
361
359
|
@change=${this.onDeviceChange.bind(this)}
|
|
362
|
-
.value=${selectedDeviceOption === deviceModeOptions.responsive ? 'Responsive' : (selectedDeviceOption?.title || 'Responsive')}
|
|
360
|
+
.value=${live(selectedDeviceOption === deviceModeOptions.responsive ? 'Responsive' : (selectedDeviceOption?.title || 'Responsive'))}
|
|
363
361
|
jslog=${VisualLogging.dropDown().track({change: true}).context('device')}>
|
|
364
362
|
<option value="Responsive" ?selected=${deviceModeOptions.responsive.selected} jslog=${VisualLogging.item(deviceModeOptions.responsive.jslogContext).track({click: true})}>
|
|
365
363
|
${deviceModeOptions.responsive.title}
|
|
@@ -485,7 +483,7 @@ export class DeviceModeToolbar {
|
|
|
485
483
|
}
|
|
486
484
|
|
|
487
485
|
private createOptionsToolbar(): UI.Toolbar.Toolbar {
|
|
488
|
-
const optionsToolbar = this
|
|
486
|
+
const optionsToolbar = this.contentElement.createChild('devtools-toolbar', 'device-mode-toolbar-options');
|
|
489
487
|
optionsToolbar.wrappable = true;
|
|
490
488
|
optionsToolbar.appendToolbarItem(new UI.Toolbar.ToolbarItem(this.createEmptyToolbarElement()));
|
|
491
489
|
const moreOptionsButton = new UI.Toolbar.ToolbarMenuButton(
|
|
@@ -737,7 +735,7 @@ export class DeviceModeToolbar {
|
|
|
737
735
|
const value = (event.target as HTMLSelectElement).value;
|
|
738
736
|
if (value === 'Edit') {
|
|
739
737
|
this.emulatedDevicesList.revealCustomSetting();
|
|
740
|
-
this.
|
|
738
|
+
this.requestUpdate();
|
|
741
739
|
} else if (value === 'Responsive') {
|
|
742
740
|
this.switchToResponsive();
|
|
743
741
|
} else {
|
|
@@ -751,7 +749,7 @@ export class DeviceModeToolbar {
|
|
|
751
749
|
}
|
|
752
750
|
|
|
753
751
|
private deviceListChanged(): void {
|
|
754
|
-
this.
|
|
752
|
+
this.requestUpdate();
|
|
755
753
|
const device = this.model.device();
|
|
756
754
|
if (!device) {
|
|
757
755
|
return;
|
|
@@ -875,11 +873,7 @@ export class DeviceModeToolbar {
|
|
|
875
873
|
return `${(this.model.scale() * 100).toFixed(0)}`;
|
|
876
874
|
}
|
|
877
875
|
|
|
878
|
-
|
|
879
|
-
return this.#element;
|
|
880
|
-
}
|
|
881
|
-
|
|
882
|
-
update(): void {
|
|
876
|
+
override performUpdate(): void {
|
|
883
877
|
const enabled = this.model.toolbarControlsEnabledSetting().get();
|
|
884
878
|
this.mainToolbar.setEnabled(enabled);
|
|
885
879
|
this.optionsToolbar.setEnabled(enabled);
|
|
@@ -942,7 +936,7 @@ export class DeviceModeToolbar {
|
|
|
942
936
|
this.#measuringElement.style.pointerEvents = 'none';
|
|
943
937
|
const dummyOption = document.createElement('option');
|
|
944
938
|
this.#measuringElement.appendChild(dummyOption);
|
|
945
|
-
this
|
|
939
|
+
this.contentElement.appendChild(this.#measuringElement);
|
|
946
940
|
}
|
|
947
941
|
|
|
948
942
|
const dummyOption = this.#measuringElement.options[0];
|
|
@@ -124,7 +124,7 @@ export class DeviceModeView extends UI.Widget.VBox {
|
|
|
124
124
|
|
|
125
125
|
private createUI(): void {
|
|
126
126
|
this.toolbar = new DeviceModeToolbar(this.model, this.showMediaInspectorSetting, this.showRulersSetting);
|
|
127
|
-
this.
|
|
127
|
+
this.toolbar.show(this.contentElement);
|
|
128
128
|
this.contentClip = this.contentElement.createChild('div', 'device-mode-content-clip vbox');
|
|
129
129
|
this.responsivePresetsContainer = this.contentClip.createChild('div', 'device-mode-presets-container');
|
|
130
130
|
this.responsivePresetsContainer.setAttribute('jslog', `${VisualLogging.responsivePresets()}`);
|
|
@@ -358,7 +358,7 @@ export class DeviceModeView extends UI.Widget.VBox {
|
|
|
358
358
|
this.cachedScale = this.model.scale();
|
|
359
359
|
}
|
|
360
360
|
|
|
361
|
-
this.toolbar.
|
|
361
|
+
this.toolbar.requestUpdate();
|
|
362
362
|
this.loadImage(this.screenImage, this.model.screenImage());
|
|
363
363
|
this.loadImage(this.outlineImage, this.model.outlineImage());
|
|
364
364
|
this.mediaInspector.setAxisTransform(this.model.scale());
|
|
@@ -84,6 +84,15 @@ const UIStrings = {
|
|
|
84
84
|
* @description Tooltip text of checkbox to include running the Search Engine Optimization audits in Lighthouse
|
|
85
85
|
*/
|
|
86
86
|
isThisPageOptimizedForSearch: 'Is this page optimized for search engine results ranking',
|
|
87
|
+
/**
|
|
88
|
+
* @description Text of checkbox to include running the Agentic Browsing audits in Lighthouse
|
|
89
|
+
*/
|
|
90
|
+
agenticBrowsing: 'Agentic browsing',
|
|
91
|
+
/**
|
|
92
|
+
* @description Tooltip text of checkbox to include running the Agentic Browsing audits in Lighthouse
|
|
93
|
+
*/
|
|
94
|
+
agenticBrowsingDescription:
|
|
95
|
+
'These checks ensure high-quality, browsable websites for AI agents and validate the correctness of WebMCP integrations. This category is still under development and subject to change.',
|
|
87
96
|
/**
|
|
88
97
|
* @description ARIA label for a radio button input to emulate mobile device behavior when running audits in Lighthouse.
|
|
89
98
|
*/
|
|
@@ -749,6 +758,15 @@ export function getPresets(): LighthouseModel.RunTypes.Preset[] {
|
|
|
749
758
|
supportedModes: ['navigation', 'snapshot'],
|
|
750
759
|
userMetric: Host.UserMetrics.LighthouseCategoryUsed.SEO,
|
|
751
760
|
},
|
|
761
|
+
{
|
|
762
|
+
setting: Common.Settings.Settings.instance().createSetting(
|
|
763
|
+
'lighthouse.cat-agentic-browsing', false, Common.Settings.SettingStorageType.SYNCED),
|
|
764
|
+
configID: 'agentic-browsing',
|
|
765
|
+
title: i18nLazyString(UIStrings.agenticBrowsing),
|
|
766
|
+
description: i18nLazyString(UIStrings.agenticBrowsingDescription),
|
|
767
|
+
supportedModes: ['navigation', 'snapshot'],
|
|
768
|
+
userMetric: Host.UserMetrics.LighthouseCategoryUsed.AGENTIC_BROWSING,
|
|
769
|
+
},
|
|
752
770
|
];
|
|
753
771
|
}
|
|
754
772
|
return presets;
|
|
@@ -269,11 +269,13 @@ export class HeapSnapshotGridNode extends
|
|
|
269
269
|
const value = this.data[columnId];
|
|
270
270
|
const percentColumn = columnId + '-percent';
|
|
271
271
|
const percent = this.data[percentColumn];
|
|
272
|
+
const tooltipColumn = `${columnId}-tooltip`;
|
|
273
|
+
const tooltip = this.data[tooltipColumn];
|
|
272
274
|
if (percent) {
|
|
273
275
|
render(
|
|
274
276
|
html`
|
|
275
277
|
<div class="profile-multiple-values">
|
|
276
|
-
<span aria-hidden="true">${value}</span>
|
|
278
|
+
<span aria-hidden="true" title=${Directives.ifDefined(tooltip)}>${value}</span>
|
|
277
279
|
<span class="percent-column" aria-hidden="true">${percent}</span>
|
|
278
280
|
</div>`,
|
|
279
281
|
cell);
|
|
@@ -283,7 +285,7 @@ export class HeapSnapshotGridNode extends
|
|
|
283
285
|
render(
|
|
284
286
|
html`
|
|
285
287
|
<div>
|
|
286
|
-
<span>${value}</span>
|
|
288
|
+
<span title=${Directives.ifDefined(tooltip)}>${value}</span>
|
|
287
289
|
</div>`,
|
|
288
290
|
cell);
|
|
289
291
|
}
|
|
@@ -560,6 +562,8 @@ export abstract class HeapSnapshotGenericObjectNode extends HeapSnapshotGridNode
|
|
|
560
562
|
retainedSize: i18n.ByteUtilities.formatBytesToKb(this.retainedSize),
|
|
561
563
|
'shallowSize-percent': this.toPercentString(shallowSizePercent),
|
|
562
564
|
'retainedSize-percent': this.toPercentString(retainedSizePercent),
|
|
565
|
+
'shallowSize-tooltip': i18n.ByteUtilities.bytesToString(this.shallowSize),
|
|
566
|
+
'retainedSize-tooltip': i18n.ByteUtilities.bytesToString(this.retainedSize),
|
|
563
567
|
};
|
|
564
568
|
}
|
|
565
569
|
|
|
@@ -580,8 +584,7 @@ export abstract class HeapSnapshotGenericObjectNode extends HeapSnapshotGridNode
|
|
|
580
584
|
}
|
|
581
585
|
|
|
582
586
|
override createCell(columnId: string): HTMLElement {
|
|
583
|
-
|
|
584
|
-
return cell;
|
|
587
|
+
return columnId !== 'object' ? this.createValueCell(columnId) : this.createObjectCell();
|
|
585
588
|
}
|
|
586
589
|
|
|
587
590
|
createObjectCell(): HTMLElement {
|
|
@@ -1132,6 +1135,8 @@ export class HeapSnapshotConstructorNode extends HeapSnapshotGridNode {
|
|
|
1132
1135
|
retainedSize: i18n.ByteUtilities.formatBytesToKb(this.retainedSize),
|
|
1133
1136
|
'shallowSize-percent': this.toPercentString(shallowSizePercent),
|
|
1134
1137
|
'retainedSize-percent': this.toPercentString(retainedSizePercent),
|
|
1138
|
+
'shallowSize-tooltip': i18n.ByteUtilities.bytesToString(this.shallowSize),
|
|
1139
|
+
'retainedSize-tooltip': i18n.ByteUtilities.bytesToString(this.retainedSize),
|
|
1135
1140
|
};
|
|
1136
1141
|
}
|
|
1137
1142
|
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as i18n from '../../core/i18n/i18n.js';
|
|
6
|
-
import * as Root from '../../core/root/root.js';
|
|
7
6
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
8
7
|
import * as UI from '../../ui/legacy/legacy.js';
|
|
9
8
|
|
|
@@ -16,22 +15,6 @@ const UIStrings = {
|
|
|
16
15
|
* @description Title for the profiler tab
|
|
17
16
|
*/
|
|
18
17
|
memory: 'Memory',
|
|
19
|
-
/**
|
|
20
|
-
* @description Title of the 'Live Heap Profile' tool in the bottom drawer
|
|
21
|
-
*/
|
|
22
|
-
liveHeapProfile: 'Live Heap Profile',
|
|
23
|
-
/**
|
|
24
|
-
* @description Title of an action under the Performance category that can be invoked through the Command Menu
|
|
25
|
-
*/
|
|
26
|
-
startRecordingHeapAllocations: 'Start recording heap allocations',
|
|
27
|
-
/**
|
|
28
|
-
* @description Title of an action under the Performance category that can be invoked through the Command Menu
|
|
29
|
-
*/
|
|
30
|
-
stopRecordingHeapAllocations: 'Stop recording heap allocations',
|
|
31
|
-
/**
|
|
32
|
-
* @description Title of an action in the live heap profile tool to start with reload
|
|
33
|
-
*/
|
|
34
|
-
startRecordingHeapAllocationsAndReload: 'Start recording heap allocations and reload the page',
|
|
35
18
|
/**
|
|
36
19
|
* @description Text in the Shortcuts page to explain a keyboard shortcut (start/stop recording performance)
|
|
37
20
|
*/
|
|
@@ -40,10 +23,6 @@ const UIStrings = {
|
|
|
40
23
|
* @description Command for showing the profiler tab
|
|
41
24
|
*/
|
|
42
25
|
showMemory: 'Show Memory',
|
|
43
|
-
/**
|
|
44
|
-
* @description Command for showing the 'Live Heap Profile' tool in the bottom drawer
|
|
45
|
-
*/
|
|
46
|
-
showLiveHeapProfile: 'Show Live Heap Profile',
|
|
47
26
|
/**
|
|
48
27
|
* @description Tooltip text that appears when hovering over the largeicon clear button in the Profiles Panel of a profiler tool
|
|
49
28
|
*/
|
|
@@ -90,56 +69,6 @@ UI.ViewManager.registerViewExtension({
|
|
|
90
69
|
},
|
|
91
70
|
});
|
|
92
71
|
|
|
93
|
-
UI.ViewManager.registerViewExtension({
|
|
94
|
-
location: UI.ViewManager.ViewLocationValues.DRAWER_VIEW,
|
|
95
|
-
id: 'live-heap-profile',
|
|
96
|
-
commandPrompt: i18nLazyString(UIStrings.showLiveHeapProfile),
|
|
97
|
-
title: i18nLazyString(UIStrings.liveHeapProfile),
|
|
98
|
-
persistence: UI.ViewManager.ViewPersistence.CLOSEABLE,
|
|
99
|
-
order: 100,
|
|
100
|
-
async loadView() {
|
|
101
|
-
const Profiler = await loadProfilerModule();
|
|
102
|
-
return Profiler.LiveHeapProfileView.LiveHeapProfileView.instance();
|
|
103
|
-
},
|
|
104
|
-
experiment: Root.ExperimentNames.ExperimentName.LIVE_HEAP_PROFILE,
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
UI.ActionRegistration.registerActionExtension({
|
|
108
|
-
actionId: 'live-heap-profile.toggle-recording',
|
|
109
|
-
iconClass: UI.ActionRegistration.IconClass.START_RECORDING,
|
|
110
|
-
toggleable: true,
|
|
111
|
-
toggledIconClass: UI.ActionRegistration.IconClass.STOP_RECORDING,
|
|
112
|
-
toggleWithRedColor: true,
|
|
113
|
-
async loadActionDelegate() {
|
|
114
|
-
const Profiler = await loadProfilerModule();
|
|
115
|
-
return new Profiler.LiveHeapProfileView.ActionDelegate();
|
|
116
|
-
},
|
|
117
|
-
category: UI.ActionRegistration.ActionCategory.MEMORY,
|
|
118
|
-
experiment: Root.ExperimentNames.ExperimentName.LIVE_HEAP_PROFILE,
|
|
119
|
-
options: [
|
|
120
|
-
{
|
|
121
|
-
value: true,
|
|
122
|
-
title: i18nLazyString(UIStrings.startRecordingHeapAllocations),
|
|
123
|
-
},
|
|
124
|
-
{
|
|
125
|
-
value: false,
|
|
126
|
-
title: i18nLazyString(UIStrings.stopRecordingHeapAllocations),
|
|
127
|
-
},
|
|
128
|
-
],
|
|
129
|
-
});
|
|
130
|
-
|
|
131
|
-
UI.ActionRegistration.registerActionExtension({
|
|
132
|
-
actionId: 'live-heap-profile.start-with-reload',
|
|
133
|
-
iconClass: UI.ActionRegistration.IconClass.REFRESH,
|
|
134
|
-
async loadActionDelegate() {
|
|
135
|
-
const Profiler = await loadProfilerModule();
|
|
136
|
-
return new Profiler.LiveHeapProfileView.ActionDelegate();
|
|
137
|
-
},
|
|
138
|
-
category: UI.ActionRegistration.ActionCategory.MEMORY,
|
|
139
|
-
experiment: Root.ExperimentNames.ExperimentName.LIVE_HEAP_PROFILE,
|
|
140
|
-
title: i18nLazyString(UIStrings.startRecordingHeapAllocationsAndReload),
|
|
141
|
-
});
|
|
142
|
-
|
|
143
72
|
UI.ActionRegistration.registerActionExtension({
|
|
144
73
|
actionId: 'profiler.heap-toggle-recording',
|
|
145
74
|
category: UI.ActionRegistration.ActionCategory.MEMORY,
|
|
@@ -10,7 +10,6 @@ import * as HeapSnapshotGridNodes from './HeapSnapshotGridNodes.js';
|
|
|
10
10
|
import * as HeapSnapshotView from './HeapSnapshotView.js';
|
|
11
11
|
import * as HeapTimelineOverview from './HeapTimelineOverview.js';
|
|
12
12
|
import * as IsolateSelector from './IsolateSelector.js';
|
|
13
|
-
import * as LiveHeapProfileView from './LiveHeapProfileView.js';
|
|
14
13
|
import * as ProfileDataGrid from './ProfileDataGrid.js';
|
|
15
14
|
import * as ProfileFlameChart from './ProfileFlameChartDataProvider.js';
|
|
16
15
|
import * as ProfileHeader from './ProfileHeader.js';
|
|
@@ -30,7 +29,6 @@ export {
|
|
|
30
29
|
HeapSnapshotView,
|
|
31
30
|
HeapTimelineOverview,
|
|
32
31
|
IsolateSelector,
|
|
33
|
-
LiveHeapProfileView,
|
|
34
32
|
ProfileDataGrid,
|
|
35
33
|
ProfileFlameChart,
|
|
36
34
|
ProfileHeader,
|
|
@@ -23,7 +23,7 @@ export class AiCodeCompletionPlugin extends Plugin {
|
|
|
23
23
|
#aiCodeCompletionDisclaimer?: PanelCommon.AiCodeCompletionDisclaimer;
|
|
24
24
|
#aiCodeCompletionDisclaimerContainer = document.createElement('div');
|
|
25
25
|
#aiCodeCompletionDisclaimerToolbarItem = new UI.Toolbar.ToolbarItem(this.#aiCodeCompletionDisclaimerContainer);
|
|
26
|
-
#aiCodeCompletionCitationsToolbar?: PanelCommon.AiCodeCompletionSummaryToolbar;
|
|
26
|
+
#aiCodeCompletionCitationsToolbar?: PanelCommon.AiCodeCompletionSummaryToolbar.AiCodeCompletionSummaryToolbar;
|
|
27
27
|
#aiCodeCompletionCitationsToolbarContainer = document.createElement('div');
|
|
28
28
|
#aiCodeCompletionCitationsToolbarAttached = false;
|
|
29
29
|
aiCodeCompletionConfig: TextEditor.AiCodeCompletionProvider.AiCodeCompletionConfig;
|
|
@@ -113,11 +113,12 @@ export class AiCodeCompletionPlugin extends Plugin {
|
|
|
113
113
|
if (this.#aiCodeCompletionCitationsToolbar) {
|
|
114
114
|
return;
|
|
115
115
|
}
|
|
116
|
-
this.#aiCodeCompletionCitationsToolbar =
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
116
|
+
this.#aiCodeCompletionCitationsToolbar =
|
|
117
|
+
new PanelCommon.AiCodeCompletionSummaryToolbar.AiCodeCompletionSummaryToolbar({
|
|
118
|
+
citationsTooltipId: CITATIONS_TOOLTIP_ID,
|
|
119
|
+
hasTopBorder: true,
|
|
120
|
+
panel: AiCodeCompletion.AiCodeCompletion.ContextFlavor.SOURCES
|
|
121
|
+
});
|
|
121
122
|
this.#aiCodeCompletionCitationsToolbar.show(this.#aiCodeCompletionCitationsToolbarContainer, undefined, true);
|
|
122
123
|
}
|
|
123
124
|
|