chrome-devtools-frontend 1.0.1578486 → 1.0.1579812
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/cookbook/devtools_on_devtools.md +2 -2
- package/docs/feature-specs/elements-gutter-decorators.md +40 -0
- package/docs/feature-specs/elements-tree-selection-and-hover.md +31 -0
- package/docs/feature-specs/images/elements-gutter-decorators-multiple.png +0 -0
- package/docs/get_the_code.md +3 -3
- package/front_end/core/common/Revealer.ts +0 -5
- package/front_end/core/sdk/ConsoleModel.ts +0 -3
- package/front_end/generated/ARIAProperties.js +0 -6
- package/front_end/generated/InspectorBackendCommands.ts +1 -1
- package/front_end/generated/protocol.ts +1 -0
- package/front_end/models/ai_assistance/AiConversation.ts +42 -22
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.snapshot.txt +30 -0
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +79 -0
- package/front_end/models/issues_manager/CookieIssue.ts +0 -1
- package/front_end/models/issues_manager/IssuesManager.ts +2 -15
- package/front_end/models/javascript_metadata/NativeFunctions.js +4 -0
- package/front_end/panels/accessibility/AXBreadcrumbsPane.ts +5 -3
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +33 -27
- package/front_end/panels/ai_assistance/ai_assistance-meta.ts +0 -1
- package/front_end/panels/ai_assistance/components/ChatInput.ts +38 -18
- package/front_end/panels/ai_assistance/components/ChatMessage.ts +7 -4
- package/front_end/panels/ai_assistance/components/ChatView.ts +2 -0
- package/front_end/panels/ai_assistance/components/chatInput.css +10 -3
- package/front_end/panels/animation/AnimationGroupPreviewUI.ts +1 -1
- package/front_end/panels/application/DeviceBoundSessionsView.ts +51 -76
- package/front_end/panels/application/ServiceWorkerUpdateCycleView.ts +1 -0
- package/front_end/panels/application/components/BackForwardCacheView.ts +4 -2
- package/front_end/panels/application/preloading/components/RuleSetDetailsView.css +0 -5
- package/front_end/panels/autofill/AutofillView.ts +1 -1
- package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +1 -0
- package/front_end/panels/common/AiCodeGenerationTeaser.ts +2 -2
- package/front_end/panels/common/AiCodeGenerationUpgradeDialog.ts +4 -4
- package/front_end/panels/console/ConsoleViewMessage.ts +1 -32
- package/front_end/panels/console/consoleView.css +0 -5
- package/front_end/panels/elements/AdoptedStyleSheetTreeElement.ts +78 -0
- package/front_end/panels/elements/ElementsTreeElement.ts +93 -121
- package/front_end/panels/elements/ElementsTreeOutline.ts +1 -0
- package/front_end/panels/elements/LayoutPane.ts +8 -7
- package/front_end/panels/elements/components/ElementsBreadcrumbs.ts +1 -1
- package/front_end/panels/elements/components/StylePropertyEditor.ts +2 -1
- package/front_end/panels/elements/elements.ts +3 -0
- package/front_end/panels/elements/elementsTreeOutline.css +16 -5
- package/front_end/panels/lighthouse/LighthouseReportRenderer.ts +1 -1
- package/front_end/panels/lighthouse/LighthouseStartView.ts +1 -1
- package/front_end/panels/lighthouse/lighthouseStartView.css +6 -0
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryValueInterpreter.ts +1 -1
- package/front_end/panels/linear_memory_inspector/components/ValueInterpreterDisplay.ts +1 -1
- package/front_end/panels/media/PlayerListView.ts +14 -2
- package/front_end/panels/media/playerListView.css +5 -0
- package/front_end/panels/network/NetworkItemView.ts +2 -1
- package/front_end/panels/network/NetworkLogView.ts +2 -5
- package/front_end/panels/network/NetworkLogViewColumns.ts +19 -7
- package/front_end/panels/network/RequestInitiatorView.ts +20 -4
- package/front_end/panels/network/RequestPayloadView.ts +253 -280
- package/front_end/panels/network/ShowMoreDetailsWidget.ts +3 -3
- package/front_end/panels/network/components/RequestHeaderSection.ts +1 -1
- package/front_end/panels/network/requestPayloadTree.css +6 -3
- package/front_end/panels/network/requestPayloadView.css +1 -0
- package/front_end/panels/protocol_monitor/JSONEditor.ts +1 -1
- package/front_end/panels/recorder/components/RecordingListView.ts +1 -1
- package/front_end/panels/recorder/components/StepEditor.ts +3 -3
- package/front_end/panels/security/SecurityPanel.ts +0 -16
- package/front_end/panels/security/security-meta.ts +1 -15
- package/front_end/panels/settings/EditFileSystemView.ts +8 -8
- package/front_end/panels/settings/KeybindsSettingsTab.ts +2 -1
- package/front_end/panels/settings/SettingsScreen.ts +4 -4
- package/front_end/panels/sources/CallStackSidebarPane.ts +1 -1
- package/front_end/panels/sources/components/HeadersView.ts +2 -2
- package/front_end/panels/timeline/components/BreadcrumbsUI.ts +1 -1
- package/front_end/panels/timeline/components/SidebarAnnotationsTab.ts +1 -1
- package/front_end/panels/timeline/overlays/OverlaysImpl.ts +47 -26
- package/front_end/panels/timeline/overlays/components/TimespanBreakdownOverlay.ts +121 -39
- package/front_end/panels/timeline/overlays/components/timespanBreakdownOverlay.css +106 -101
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/ui/components/buttons/Button.ts +1 -1
- package/front_end/ui/components/suggestion_input/SuggestionInput.ts +7 -12
- package/front_end/ui/components/tree_outline/TreeOutline.ts +1 -1
- package/front_end/ui/legacy/InplaceEditor.ts +1 -1
- package/front_end/ui/legacy/InspectorView.ts +6 -5
- package/front_end/ui/legacy/ListControl.ts +2 -1
- package/front_end/ui/legacy/ListWidget.ts +1 -1
- package/front_end/ui/legacy/SoftContextMenu.ts +2 -1
- package/front_end/ui/legacy/Treeoutline.ts +82 -22
- package/front_end/ui/legacy/components/data_grid/DataGrid.ts +4 -2
- package/front_end/ui/legacy/components/data_grid/SortableDataGrid.ts +59 -9
- package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +28 -15
- package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +2 -1
- package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +2 -2
- package/front_end/ui/legacy/components/quick_open/FilteredListWidget.ts +1 -1
- package/front_end/ui/legacy/components/settings_ui/SettingsUI.ts +3 -3
- package/front_end/ui/legacy/components/source_frame/JSONView.ts +2 -3
- package/front_end/ui/legacy/softDropDown.css +7 -1
- package/front_end/ui/visual_logging/Debugging.ts +1 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +3 -0
- package/mcp/mcp.ts +2 -0
- package/package.json +1 -1
|
@@ -44,7 +44,7 @@ set up your Chrome or Chromium instance for earlier versions of M-136 and M-135.
|
|
|
44
44
|
Then in your `devtools-frontend` checkout, use
|
|
45
45
|
|
|
46
46
|
```bash
|
|
47
|
-
./third_party/chrome/chrome-linux/chrome \
|
|
47
|
+
./third_party/chrome/chrome-linux/chrome-linux64/chrome \
|
|
48
48
|
--disable-infobars \
|
|
49
49
|
--custom-devtools-frontend=file://$(realpath out/Default/gen/front_end)
|
|
50
50
|
```
|
|
@@ -52,7 +52,7 @@ Then in your `devtools-frontend` checkout, use
|
|
|
52
52
|
on Linux or
|
|
53
53
|
|
|
54
54
|
```bash
|
|
55
|
-
./third_party/chrome/chrome-mac/Google\ Chrome\ for\ Testing.app/Contents/MacOS/Google\ Chrome\ for\ Testing \
|
|
55
|
+
./third_party/chrome/chrome-mac-{arm64|x64}/chrome-mac-{arm64|x64}/Google\ Chrome\ for\ Testing.app/Contents/MacOS/Google\ Chrome\ for\ Testing \
|
|
56
56
|
--disable-infobars \
|
|
57
57
|
--disable-features=MediaRouter \
|
|
58
58
|
--custom-devtools-frontend=file://$(realpath out/Default/gen/front_end) \
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Requirements Specification: Elements Panel Gutter & Decoration Logic
|
|
2
|
+
|
|
3
|
+
## 1. Overview
|
|
4
|
+
The gutter area in the Elements panel DOM tree serves as a visual indicator for state markers (decorations) associated with DOM nodes. These decorations provide users with "at-a-glance" information about the node or its subtree, such as active breakpoints or framework-specific annotations.
|
|
5
|
+
|
|
6
|
+
## 2. Functional Requirements
|
|
7
|
+
|
|
8
|
+
### 2.1 Decoration Visibility
|
|
9
|
+
* **Target Nodes**: Decorations must only appear on **Element** nodes (e.g., `<div>`, `<body>`). They must not appear on text nodes or closing tags.
|
|
10
|
+
* **Visual Indicators**: Active states must be represented by colored markers (dots) within the gutter to the left of the element's tag.
|
|
11
|
+
* **Multiple States**: If a node has multiple active states (e.g., multiple types of breakpoints), the gutter must display markers for all of them.
|
|
12
|
+
* **Layout**: Markers must be arranged horizontally.
|
|
13
|
+
* **Spacing**: Markers must be tightly packed, with each subsequent marker offset by exactly `3px` to the right of the previous one (creating a stacked or dense visual line).
|
|
14
|
+

|
|
15
|
+
|
|
16
|
+
### 2.2 Parent/Child Aggregation Logic
|
|
17
|
+
The visibility of decorations depends on the expansion state of the node to ensure users don't miss information hidden inside collapsed regions.
|
|
18
|
+
|
|
19
|
+
* **Collapsed State (Summary View)**:
|
|
20
|
+
* The gutter must display markers for the node's **own** decorations.
|
|
21
|
+
* The gutter must **also** display markers for any **descendant** nodes that have decorations. This acts as a summary, alerting the user that a reflected state exists somewhere inside the collapsed subtree.
|
|
22
|
+
* **Expanded State (Direct View)**:
|
|
23
|
+
* The gutter must **only** display markers for the node's **own** decorations.
|
|
24
|
+
* Markers for descendant nodes must be hidden from the parent's gutter, as they will be directly visible on the child nodes themselves.
|
|
25
|
+
* **Style**: Descendant markers visible in the collapsed state must be rendered with `50%` opacity to visually distinguish them from the node's own decorations.
|
|
26
|
+
|
|
27
|
+
### 2.3 Tooltip Behavior
|
|
28
|
+
Hovering over the decoration markers in the gutter must display a consolidated tooltip containing:
|
|
29
|
+
* **Own Decorations**: A list of titles for all decorations active on the current node.
|
|
30
|
+
* **Descendant Decorations** (Collapsed State Only): A separate list of titles for decorations found within the subtree, clearly labeled to distinguish them from the parent's own states (e.g., under a "Children:" header).
|
|
31
|
+
|
|
32
|
+
### 2.4 Layout & Positioning
|
|
33
|
+
* **Indentation Tracking**: The decoration container must dynamically adjust its position to match the indentation level of the tree element. It should always appear to the left of the opening tag, regardless of how deep the node is in the DOM hierarchy.
|
|
34
|
+
* **Gutter Alignment**: The markers must align consistent with the "gutter" column effectively creating a vertical channel for status indicators down the left side of the tree.
|
|
35
|
+
|
|
36
|
+
### 2.5 User Interaction
|
|
37
|
+
* **Menu Access**: Clicking on the gutter area (often visualized with a "..." icon or actionable space) must trigger the context menu for that node, allowing access to actions related to the decorations (e.g., removing a breakpoint).
|
|
38
|
+
|
|
39
|
+
### 2.6 Performance
|
|
40
|
+
* **Throttled Updates**: Changes to decorations must be batched or throttled. Visually updating the markers should not occur synchronously with every minor internal state change to prevent UI flickering during rapid DOM updates.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Requirements Specification: Elements Panel Tree Selection and Hover
|
|
2
|
+
|
|
3
|
+
## 1. Overview
|
|
4
|
+
The Elements panel DOM tree visualizes the structure of the inspected page. As users navigate this tree—either by clicking or hovering—the panel provides visual feedback to indicate the currently active node and offers contextual actions like a console hint and an AI assistance button.
|
|
5
|
+
|
|
6
|
+
## 2. Functional Requirements
|
|
7
|
+
|
|
8
|
+
### 2.1 Selection State
|
|
9
|
+
* **Visual Indicator**: When a tree node is selected, its entire row must be highlighted visually. This is achieved by rendering a background spanning the full width of the tree, visually anchoring the node.
|
|
10
|
+
* **Full Row Coverage**: The selection highlight must extend to the left edge of the panel, accounting for the dynamic indentation of the DOM tree structure.
|
|
11
|
+
* **Behavior on Deselection**: When a node loses selection focus, the visual highlight must be removed immediately.
|
|
12
|
+
|
|
13
|
+
### 2.2 Console Hint (`== $0`)
|
|
14
|
+
* **Visibility**: The `$0` hint must only appear on the currently selected tree node.
|
|
15
|
+
* **Placement**: It must be positioned to the right of the closing tag or the node's text content.
|
|
16
|
+
* **Tooltip**: Hovering over the hint must display a tooltip explaining its purpose: `Use $0 in the console to refer to this element.`
|
|
17
|
+
* **Accessibility**: The hint itself should be marked hidden from screen readers (`aria-hidden="true"`) to prevent redundancy, as the selection state inherently implies `$0` context to power users.
|
|
18
|
+
|
|
19
|
+
### 2.3 Floating AI Assistance Button
|
|
20
|
+
* **Eligibility**: The AI button must only appear for valid `Element` nodes (e.g., `<button>`, `<div>`). It must not appear on text nodes, comments, but does appear for closing tags.
|
|
21
|
+
* **Visibility Conditions**:
|
|
22
|
+
* The button must be visible when the node is actively hovered by the user's cursor.
|
|
23
|
+
* The button must also be visible when the node currently holds the selection state (even if not hovered).
|
|
24
|
+
* **Action**: Clicking the button must:
|
|
25
|
+
* Select the node (if it wasn't already selected).
|
|
26
|
+
* Open the AI assistance panel with the context of the selected node.
|
|
27
|
+
* Not propagate the click event to the underlying row (which might otherwise cause tree expansion/collapse).
|
|
28
|
+
* **Visual Design**: It should render as a floating button using the standard DevTools AI icon, with the tooltip matching the registered AI action title.
|
|
29
|
+
|
|
30
|
+
## 3. Implementation Details (Declarative UI)
|
|
31
|
+
The selection background, `$0` hint, and AI floating button are integrated into the primary Lit-html render cycle (`DEFAULT_VIEW`) for the tree element. This replaces previous imperative DOM creation strategies, routing all visibility and styling updates through a unified state object passed to the view.
|
package/docs/get_the_code.md
CHANGED
|
@@ -250,19 +250,19 @@ This works with Chromium 79 or later.
|
|
|
250
250
|
To run on **Mac**:
|
|
251
251
|
|
|
252
252
|
```bash
|
|
253
|
-
<path-to-devtools-frontend>./third_party/chrome/chrome-mac/Google\ Chrome\ for\ Testing.app/Contents/MacOS/Google\ Chrome\ for\ Testing --disable-infobars --disable-features=MediaRouter --custom-devtools-frontend=file://$(realpath out/Default/gen/front_end) --use-mock-keychain
|
|
253
|
+
<path-to-devtools-frontend>./third_party/chrome/chrome-mac-{arm64|x64}/chrome-mac-{arm64|x64}/Google\ Chrome\ for\ Testing.app/Contents/MacOS/Google\ Chrome\ for\ Testing --disable-infobars --disable-features=MediaRouter --custom-devtools-frontend=file://$(realpath out/Default/gen/front_end) --use-mock-keychain
|
|
254
254
|
```
|
|
255
255
|
|
|
256
256
|
To run on **Linux**:
|
|
257
257
|
|
|
258
258
|
```bash
|
|
259
|
-
<path-to-devtools-frontend>./third_party/chrome/chrome-linux/chrome --disable-infobars --custom-devtools-frontend=file://$(realpath out/Default/gen/front_end)
|
|
259
|
+
<path-to-devtools-frontend>./third_party/chrome/chrome-linux/chrome-linux64/chrome --disable-infobars --custom-devtools-frontend=file://$(realpath out/Default/gen/front_end)
|
|
260
260
|
```
|
|
261
261
|
|
|
262
262
|
To run on **Windows**:
|
|
263
263
|
|
|
264
264
|
```bash
|
|
265
|
-
<path-to-devtools-frontend>\third_party\chrome\chrome-win\chrome.exe --disable-infobars --custom-devtools-frontend="<path-to-devtools-frontend>\out\Default\gen\front_end"
|
|
265
|
+
<path-to-devtools-frontend>\third_party\chrome\chrome-win\chrome-win64\chrome.exe --disable-infobars --custom-devtools-frontend="<path-to-devtools-frontend>\out\Default\gen\front_end"
|
|
266
266
|
```
|
|
267
267
|
|
|
268
268
|
Note that `$(realpath out/Default/gen/front_end)` expands to the absolute path to build artifacts for DevTools frontend.
|
|
@@ -34,10 +34,6 @@ const UIStrings = {
|
|
|
34
34
|
* @description The UI destination when right clicking an item that can be revealed
|
|
35
35
|
*/
|
|
36
36
|
applicationPanel: 'Application panel',
|
|
37
|
-
/**
|
|
38
|
-
* @description The UI destination when right clicking an item that can be revealed
|
|
39
|
-
*/
|
|
40
|
-
securityPanel: 'Security panel',
|
|
41
37
|
/**
|
|
42
38
|
* @description The UI destination when right clicking an item that can be revealed
|
|
43
39
|
*/
|
|
@@ -189,7 +185,6 @@ export const RevealerDestination = {
|
|
|
189
185
|
TIMELINE_PANEL: i18nLazyString(UIStrings.timelinePanel),
|
|
190
186
|
APPLICATION_PANEL: i18nLazyString(UIStrings.applicationPanel),
|
|
191
187
|
SOURCES_PANEL: i18nLazyString(UIStrings.sourcesPanel),
|
|
192
|
-
SECURITY_PANEL: i18nLazyString(UIStrings.securityPanel),
|
|
193
188
|
MEMORY_INSPECTOR_PANEL: i18nLazyString(UIStrings.memoryInspectorPanel),
|
|
194
189
|
ANIMATIONS_PANEL: i18nLazyString(UIStrings.animationsPanel),
|
|
195
190
|
};
|
|
@@ -545,7 +545,6 @@ export interface ConsoleMessageDetails {
|
|
|
545
545
|
context?: string;
|
|
546
546
|
affectedResources?: AffectedResources;
|
|
547
547
|
category?: Protocol.Log.LogEntryCategory;
|
|
548
|
-
isCookieReportIssue?: boolean;
|
|
549
548
|
}
|
|
550
549
|
|
|
551
550
|
export class ConsoleMessage {
|
|
@@ -569,7 +568,6 @@ export class ConsoleMessage {
|
|
|
569
568
|
#exceptionId?: number = undefined;
|
|
570
569
|
#affectedResources?: AffectedResources;
|
|
571
570
|
category?: Protocol.Log.LogEntryCategory;
|
|
572
|
-
isCookieReportIssue = false;
|
|
573
571
|
|
|
574
572
|
/**
|
|
575
573
|
* The parent frame of the `console.log` call of logpoints or conditional breakpoints
|
|
@@ -600,7 +598,6 @@ export class ConsoleMessage {
|
|
|
600
598
|
this.workerId = details?.workerId;
|
|
601
599
|
this.#affectedResources = details?.affectedResources;
|
|
602
600
|
this.category = details?.category;
|
|
603
|
-
this.isCookieReportIssue = Boolean(details?.isCookieReportIssue);
|
|
604
601
|
|
|
605
602
|
if (!this.#executionContextId && this.#runtimeModel) {
|
|
606
603
|
if (this.scriptId) {
|
|
@@ -1314,9 +1314,6 @@ export const config = {
|
|
|
1314
1314
|
]
|
|
1315
1315
|
},
|
|
1316
1316
|
{
|
|
1317
|
-
"implicitValues": {
|
|
1318
|
-
"aria-live": "off"
|
|
1319
|
-
},
|
|
1320
1317
|
"name": "marquee",
|
|
1321
1318
|
"nameFrom": [
|
|
1322
1319
|
"author"
|
|
@@ -1975,9 +1972,6 @@ export const config = {
|
|
|
1975
1972
|
]
|
|
1976
1973
|
},
|
|
1977
1974
|
{
|
|
1978
|
-
"implicitValues": {
|
|
1979
|
-
"aria-live": "off"
|
|
1980
|
-
},
|
|
1981
1975
|
"name": "timer",
|
|
1982
1976
|
"nameFrom": [
|
|
1983
1977
|
"author"
|
|
@@ -1018,7 +1018,7 @@ inspectorBackend.registerEnum("Page.ClientNavigationReason", {AnchorClick: "anch
|
|
|
1018
1018
|
inspectorBackend.registerEnum("Page.ClientNavigationDisposition", {CurrentTab: "currentTab", NewTab: "newTab", NewWindow: "newWindow", Download: "download"});
|
|
1019
1019
|
inspectorBackend.registerEnum("Page.ReferrerPolicy", {NoReferrer: "noReferrer", NoReferrerWhenDowngrade: "noReferrerWhenDowngrade", Origin: "origin", OriginWhenCrossOrigin: "originWhenCrossOrigin", SameOrigin: "sameOrigin", StrictOrigin: "strictOrigin", StrictOriginWhenCrossOrigin: "strictOriginWhenCrossOrigin", UnsafeUrl: "unsafeUrl"});
|
|
1020
1020
|
inspectorBackend.registerEnum("Page.NavigationType", {Navigation: "Navigation", BackForwardCacheRestore: "BackForwardCacheRestore"});
|
|
1021
|
-
inspectorBackend.registerEnum("Page.BackForwardCacheNotRestoredReason", {NotPrimaryMainFrame: "NotPrimaryMainFrame", BackForwardCacheDisabled: "BackForwardCacheDisabled", RelatedActiveContentsExist: "RelatedActiveContentsExist", HTTPStatusNotOK: "HTTPStatusNotOK", SchemeNotHTTPOrHTTPS: "SchemeNotHTTPOrHTTPS", Loading: "Loading", WasGrantedMediaAccess: "WasGrantedMediaAccess", DisableForRenderFrameHostCalled: "DisableForRenderFrameHostCalled", DomainNotAllowed: "DomainNotAllowed", HTTPMethodNotGET: "HTTPMethodNotGET", SubframeIsNavigating: "SubframeIsNavigating", Timeout: "Timeout", CacheLimit: "CacheLimit", JavaScriptExecution: "JavaScriptExecution", RendererProcessKilled: "RendererProcessKilled", RendererProcessCrashed: "RendererProcessCrashed", SchedulerTrackedFeatureUsed: "SchedulerTrackedFeatureUsed", ConflictingBrowsingInstance: "ConflictingBrowsingInstance", CacheFlushed: "CacheFlushed", ServiceWorkerVersionActivation: "ServiceWorkerVersionActivation", SessionRestored: "SessionRestored", ServiceWorkerPostMessage: "ServiceWorkerPostMessage", EnteredBackForwardCacheBeforeServiceWorkerHostAdded: "EnteredBackForwardCacheBeforeServiceWorkerHostAdded", RenderFrameHostReused_SameSite: "RenderFrameHostReused_SameSite", RenderFrameHostReused_CrossSite: "RenderFrameHostReused_CrossSite", ServiceWorkerClaim: "ServiceWorkerClaim", IgnoreEventAndEvict: "IgnoreEventAndEvict", HaveInnerContents: "HaveInnerContents", TimeoutPuttingInCache: "TimeoutPuttingInCache", BackForwardCacheDisabledByLowMemory: "BackForwardCacheDisabledByLowMemory", BackForwardCacheDisabledByCommandLine: "BackForwardCacheDisabledByCommandLine", NetworkRequestDatAPIpeDrainedAsBytesConsumer: "NetworkRequestDatapipeDrainedAsBytesConsumer", NetworkRequestRedirected: "NetworkRequestRedirected", NetworkRequestTimeout: "NetworkRequestTimeout", NetworkExceedsBufferLimit: "NetworkExceedsBufferLimit", NavigationCancelledWhileRestoring: "NavigationCancelledWhileRestoring", NotMostRecentNavigationEntry: "NotMostRecentNavigationEntry", BackForwardCacheDisabledForPrerender: "BackForwardCacheDisabledForPrerender", UserAgentOverrideDiffers: "UserAgentOverrideDiffers", ForegroundCacheLimit: "ForegroundCacheLimit", BrowsingInstanceNotSwapped: "BrowsingInstanceNotSwapped", BackForwardCacheDisabledForDelegate: "BackForwardCacheDisabledForDelegate", UnloadHandlerExistsInMainFrame: "UnloadHandlerExistsInMainFrame", UnloadHandlerExistsInSubFrame: "UnloadHandlerExistsInSubFrame", ServiceWorkerUnregistration: "ServiceWorkerUnregistration", CacheControlNoStore: "CacheControlNoStore", CacheControlNoStoreCookieModified: "CacheControlNoStoreCookieModified", CacheControlNoStoreHTTPOnlyCookieModified: "CacheControlNoStoreHTTPOnlyCookieModified", NoResponseHead: "NoResponseHead", Unknown: "Unknown", ActivationNavigationsDisallowedForBug1234857: "ActivationNavigationsDisallowedForBug1234857", ErrorDocument: "ErrorDocument", FencedFramesEmbedder: "FencedFramesEmbedder", CookieDisabled: "CookieDisabled", HTTPAuthRequired: "HTTPAuthRequired", CookieFlushed: "CookieFlushed", BroadcastChannelOnMessage: "BroadcastChannelOnMessage", WebViewSettingsChanged: "WebViewSettingsChanged", WebViewJavaScriptObjectChanged: "WebViewJavaScriptObjectChanged", WebViewMessageListenerInjected: "WebViewMessageListenerInjected", WebViewSafeBrowsingAllowlistChanged: "WebViewSafeBrowsingAllowlistChanged", WebViewDocumentStartJavascriptChanged: "WebViewDocumentStartJavascriptChanged", WebSocket: "WebSocket", WebTransport: "WebTransport", WebRTC: "WebRTC", MainResourceHasCacheControlNoStore: "MainResourceHasCacheControlNoStore", MainResourceHasCacheControlNoCache: "MainResourceHasCacheControlNoCache", SubresourceHasCacheControlNoStore: "SubresourceHasCacheControlNoStore", SubresourceHasCacheControlNoCache: "SubresourceHasCacheControlNoCache", ContainsPlugins: "ContainsPlugins", DocumentLoaded: "DocumentLoaded", OutstandingNetworkRequestOthers: "OutstandingNetworkRequestOthers", RequestedMIDIPermission: "RequestedMIDIPermission", RequestedAudioCapturePermission: "RequestedAudioCapturePermission", RequestedVideoCapturePermission: "RequestedVideoCapturePermission", RequestedBackForwardCacheBlockedSensors: "RequestedBackForwardCacheBlockedSensors", RequestedBackgroundWorkPermission: "RequestedBackgroundWorkPermission", BroadcastChannel: "BroadcastChannel", WebXR: "WebXR", SharedWorker: "SharedWorker", SharedWorkerMessage: "SharedWorkerMessage", SharedWorkerWithNoActiveClient: "SharedWorkerWithNoActiveClient", WebLocks: "WebLocks", WebHID: "WebHID", WebBluetooth: "WebBluetooth", WebShare: "WebShare", RequestedStorageAccessGrant: "RequestedStorageAccessGrant", WebNfc: "WebNfc", OutstandingNetworkRequestFetch: "OutstandingNetworkRequestFetch", OutstandingNetworkRequestXHR: "OutstandingNetworkRequestXHR", AppBanner: "AppBanner", Printing: "Printing", WebDatabase: "WebDatabase", PictureInPicture: "PictureInPicture", SpeechRecognizer: "SpeechRecognizer", IdleManager: "IdleManager", PaymentManager: "PaymentManager", SpeechSynthesis: "SpeechSynthesis", KeyboardLock: "KeyboardLock", WebOTPService: "WebOTPService", OutstandingNetworkRequestDirectSocket: "OutstandingNetworkRequestDirectSocket", InjectedJavascript: "InjectedJavascript", InjectedStyleSheet: "InjectedStyleSheet", KeepaliveRequest: "KeepaliveRequest", IndexedDBEvent: "IndexedDBEvent", Dummy: "Dummy", JsNetworkRequestReceivedCacheControlNoStoreResource: "JsNetworkRequestReceivedCacheControlNoStoreResource", WebRTCUsedWithCCNS: "WebRTCUsedWithCCNS", WebTransportUsedWithCCNS: "WebTransportUsedWithCCNS", WebSocketUsedWithCCNS: "WebSocketUsedWithCCNS", SmartCard: "SmartCard", LiveMediaStreamTrack: "LiveMediaStreamTrack", UnloadHandler: "UnloadHandler", ParserAborted: "ParserAborted", ContentSecurityHandler: "ContentSecurityHandler", ContentWebAuthenticationAPI: "ContentWebAuthenticationAPI", ContentFileChooser: "ContentFileChooser", ContentSerial: "ContentSerial", ContentFileSystemAccess: "ContentFileSystemAccess", ContentMediaDevicesDispatcherHost: "ContentMediaDevicesDispatcherHost", ContentWebBluetooth: "ContentWebBluetooth", ContentWebUSB: "ContentWebUSB", ContentMediaSessionService: "ContentMediaSessionService", ContentScreenReader: "ContentScreenReader", ContentDiscarded: "ContentDiscarded", EmbedderPopupBlockerTabHelper: "EmbedderPopupBlockerTabHelper", EmbedderSafeBrowsingTriggeredPopupBlocker: "EmbedderSafeBrowsingTriggeredPopupBlocker", EmbedderSafeBrowsingThreatDetails: "EmbedderSafeBrowsingThreatDetails", EmbedderAppBannerManager: "EmbedderAppBannerManager", EmbedderDomDistillerViewerSource: "EmbedderDomDistillerViewerSource", EmbedderDomDistillerSelfDeletingRequestDelegate: "EmbedderDomDistillerSelfDeletingRequestDelegate", EmbedderOomInterventionTabHelper: "EmbedderOomInterventionTabHelper", EmbedderOfflinePage: "EmbedderOfflinePage", EmbedderChromePasswordManagerClientBindCredentialManager: "EmbedderChromePasswordManagerClientBindCredentialManager", EmbedderPermissionRequestManager: "EmbedderPermissionRequestManager", EmbedderModalDialog: "EmbedderModalDialog", EmbedderExtensions: "EmbedderExtensions", EmbedderExtensionMessaging: "EmbedderExtensionMessaging", EmbedderExtensionMessagingForOpenPort: "EmbedderExtensionMessagingForOpenPort", EmbedderExtensionSentMessageToCachedFrame: "EmbedderExtensionSentMessageToCachedFrame", RequestedByWebViewClient: "RequestedByWebViewClient", PostMessageByWebViewClient: "PostMessageByWebViewClient", CacheControlNoStoreDeviceBoundSessionTerminated: "CacheControlNoStoreDeviceBoundSessionTerminated", CacheLimitPrunedOnModerateMemoryPressure: "CacheLimitPrunedOnModerateMemoryPressure", CacheLimitPrunedOnCriticalMemoryPressure: "CacheLimitPrunedOnCriticalMemoryPressure"});
|
|
1021
|
+
inspectorBackend.registerEnum("Page.BackForwardCacheNotRestoredReason", {NotPrimaryMainFrame: "NotPrimaryMainFrame", BackForwardCacheDisabled: "BackForwardCacheDisabled", RelatedActiveContentsExist: "RelatedActiveContentsExist", HTTPStatusNotOK: "HTTPStatusNotOK", SchemeNotHTTPOrHTTPS: "SchemeNotHTTPOrHTTPS", Loading: "Loading", WasGrantedMediaAccess: "WasGrantedMediaAccess", DisableForRenderFrameHostCalled: "DisableForRenderFrameHostCalled", DomainNotAllowed: "DomainNotAllowed", HTTPMethodNotGET: "HTTPMethodNotGET", SubframeIsNavigating: "SubframeIsNavigating", Timeout: "Timeout", CacheLimit: "CacheLimit", JavaScriptExecution: "JavaScriptExecution", RendererProcessKilled: "RendererProcessKilled", RendererProcessCrashed: "RendererProcessCrashed", SchedulerTrackedFeatureUsed: "SchedulerTrackedFeatureUsed", ConflictingBrowsingInstance: "ConflictingBrowsingInstance", CacheFlushed: "CacheFlushed", ServiceWorkerVersionActivation: "ServiceWorkerVersionActivation", SessionRestored: "SessionRestored", ServiceWorkerPostMessage: "ServiceWorkerPostMessage", EnteredBackForwardCacheBeforeServiceWorkerHostAdded: "EnteredBackForwardCacheBeforeServiceWorkerHostAdded", RenderFrameHostReused_SameSite: "RenderFrameHostReused_SameSite", RenderFrameHostReused_CrossSite: "RenderFrameHostReused_CrossSite", ServiceWorkerClaim: "ServiceWorkerClaim", IgnoreEventAndEvict: "IgnoreEventAndEvict", HaveInnerContents: "HaveInnerContents", TimeoutPuttingInCache: "TimeoutPuttingInCache", BackForwardCacheDisabledByLowMemory: "BackForwardCacheDisabledByLowMemory", BackForwardCacheDisabledByCommandLine: "BackForwardCacheDisabledByCommandLine", NetworkRequestDatAPIpeDrainedAsBytesConsumer: "NetworkRequestDatapipeDrainedAsBytesConsumer", NetworkRequestRedirected: "NetworkRequestRedirected", NetworkRequestTimeout: "NetworkRequestTimeout", NetworkExceedsBufferLimit: "NetworkExceedsBufferLimit", NavigationCancelledWhileRestoring: "NavigationCancelledWhileRestoring", NotMostRecentNavigationEntry: "NotMostRecentNavigationEntry", BackForwardCacheDisabledForPrerender: "BackForwardCacheDisabledForPrerender", UserAgentOverrideDiffers: "UserAgentOverrideDiffers", ForegroundCacheLimit: "ForegroundCacheLimit", BrowsingInstanceNotSwapped: "BrowsingInstanceNotSwapped", BackForwardCacheDisabledForDelegate: "BackForwardCacheDisabledForDelegate", UnloadHandlerExistsInMainFrame: "UnloadHandlerExistsInMainFrame", UnloadHandlerExistsInSubFrame: "UnloadHandlerExistsInSubFrame", ServiceWorkerUnregistration: "ServiceWorkerUnregistration", CacheControlNoStore: "CacheControlNoStore", CacheControlNoStoreCookieModified: "CacheControlNoStoreCookieModified", CacheControlNoStoreHTTPOnlyCookieModified: "CacheControlNoStoreHTTPOnlyCookieModified", NoResponseHead: "NoResponseHead", Unknown: "Unknown", ActivationNavigationsDisallowedForBug1234857: "ActivationNavigationsDisallowedForBug1234857", ErrorDocument: "ErrorDocument", FencedFramesEmbedder: "FencedFramesEmbedder", CookieDisabled: "CookieDisabled", HTTPAuthRequired: "HTTPAuthRequired", CookieFlushed: "CookieFlushed", BroadcastChannelOnMessage: "BroadcastChannelOnMessage", WebViewSettingsChanged: "WebViewSettingsChanged", WebViewJavaScriptObjectChanged: "WebViewJavaScriptObjectChanged", WebViewMessageListenerInjected: "WebViewMessageListenerInjected", WebViewSafeBrowsingAllowlistChanged: "WebViewSafeBrowsingAllowlistChanged", WebViewDocumentStartJavascriptChanged: "WebViewDocumentStartJavascriptChanged", WebSocket: "WebSocket", WebTransport: "WebTransport", WebRTC: "WebRTC", MainResourceHasCacheControlNoStore: "MainResourceHasCacheControlNoStore", MainResourceHasCacheControlNoCache: "MainResourceHasCacheControlNoCache", SubresourceHasCacheControlNoStore: "SubresourceHasCacheControlNoStore", SubresourceHasCacheControlNoCache: "SubresourceHasCacheControlNoCache", ContainsPlugins: "ContainsPlugins", DocumentLoaded: "DocumentLoaded", OutstandingNetworkRequestOthers: "OutstandingNetworkRequestOthers", RequestedMIDIPermission: "RequestedMIDIPermission", RequestedAudioCapturePermission: "RequestedAudioCapturePermission", RequestedVideoCapturePermission: "RequestedVideoCapturePermission", RequestedBackForwardCacheBlockedSensors: "RequestedBackForwardCacheBlockedSensors", RequestedBackgroundWorkPermission: "RequestedBackgroundWorkPermission", BroadcastChannel: "BroadcastChannel", WebXR: "WebXR", SharedWorker: "SharedWorker", SharedWorkerMessage: "SharedWorkerMessage", SharedWorkerWithNoActiveClient: "SharedWorkerWithNoActiveClient", WebLocks: "WebLocks", WebLocksContention: "WebLocksContention", WebHID: "WebHID", WebBluetooth: "WebBluetooth", WebShare: "WebShare", RequestedStorageAccessGrant: "RequestedStorageAccessGrant", WebNfc: "WebNfc", OutstandingNetworkRequestFetch: "OutstandingNetworkRequestFetch", OutstandingNetworkRequestXHR: "OutstandingNetworkRequestXHR", AppBanner: "AppBanner", Printing: "Printing", WebDatabase: "WebDatabase", PictureInPicture: "PictureInPicture", SpeechRecognizer: "SpeechRecognizer", IdleManager: "IdleManager", PaymentManager: "PaymentManager", SpeechSynthesis: "SpeechSynthesis", KeyboardLock: "KeyboardLock", WebOTPService: "WebOTPService", OutstandingNetworkRequestDirectSocket: "OutstandingNetworkRequestDirectSocket", InjectedJavascript: "InjectedJavascript", InjectedStyleSheet: "InjectedStyleSheet", KeepaliveRequest: "KeepaliveRequest", IndexedDBEvent: "IndexedDBEvent", Dummy: "Dummy", JsNetworkRequestReceivedCacheControlNoStoreResource: "JsNetworkRequestReceivedCacheControlNoStoreResource", WebRTCUsedWithCCNS: "WebRTCUsedWithCCNS", WebTransportUsedWithCCNS: "WebTransportUsedWithCCNS", WebSocketUsedWithCCNS: "WebSocketUsedWithCCNS", SmartCard: "SmartCard", LiveMediaStreamTrack: "LiveMediaStreamTrack", UnloadHandler: "UnloadHandler", ParserAborted: "ParserAborted", ContentSecurityHandler: "ContentSecurityHandler", ContentWebAuthenticationAPI: "ContentWebAuthenticationAPI", ContentFileChooser: "ContentFileChooser", ContentSerial: "ContentSerial", ContentFileSystemAccess: "ContentFileSystemAccess", ContentMediaDevicesDispatcherHost: "ContentMediaDevicesDispatcherHost", ContentWebBluetooth: "ContentWebBluetooth", ContentWebUSB: "ContentWebUSB", ContentMediaSessionService: "ContentMediaSessionService", ContentScreenReader: "ContentScreenReader", ContentDiscarded: "ContentDiscarded", EmbedderPopupBlockerTabHelper: "EmbedderPopupBlockerTabHelper", EmbedderSafeBrowsingTriggeredPopupBlocker: "EmbedderSafeBrowsingTriggeredPopupBlocker", EmbedderSafeBrowsingThreatDetails: "EmbedderSafeBrowsingThreatDetails", EmbedderAppBannerManager: "EmbedderAppBannerManager", EmbedderDomDistillerViewerSource: "EmbedderDomDistillerViewerSource", EmbedderDomDistillerSelfDeletingRequestDelegate: "EmbedderDomDistillerSelfDeletingRequestDelegate", EmbedderOomInterventionTabHelper: "EmbedderOomInterventionTabHelper", EmbedderOfflinePage: "EmbedderOfflinePage", EmbedderChromePasswordManagerClientBindCredentialManager: "EmbedderChromePasswordManagerClientBindCredentialManager", EmbedderPermissionRequestManager: "EmbedderPermissionRequestManager", EmbedderModalDialog: "EmbedderModalDialog", EmbedderExtensions: "EmbedderExtensions", EmbedderExtensionMessaging: "EmbedderExtensionMessaging", EmbedderExtensionMessagingForOpenPort: "EmbedderExtensionMessagingForOpenPort", EmbedderExtensionSentMessageToCachedFrame: "EmbedderExtensionSentMessageToCachedFrame", RequestedByWebViewClient: "RequestedByWebViewClient", PostMessageByWebViewClient: "PostMessageByWebViewClient", CacheControlNoStoreDeviceBoundSessionTerminated: "CacheControlNoStoreDeviceBoundSessionTerminated", CacheLimitPrunedOnModerateMemoryPressure: "CacheLimitPrunedOnModerateMemoryPressure", CacheLimitPrunedOnCriticalMemoryPressure: "CacheLimitPrunedOnCriticalMemoryPressure"});
|
|
1022
1022
|
inspectorBackend.registerEnum("Page.BackForwardCacheNotRestoredReasonType", {SupportPending: "SupportPending", PageSupportNeeded: "PageSupportNeeded", Circumstantial: "Circumstantial"});
|
|
1023
1023
|
inspectorBackend.registerEvent("Page.domContentEventFired", ["timestamp"]);
|
|
1024
1024
|
inspectorBackend.registerEnum("Page.FileChooserOpenedEventMode", {SelectSingle: "selectSingle", SelectMultiple: "selectMultiple"});
|
|
@@ -14981,6 +14981,7 @@ export namespace Page {
|
|
|
14981
14981
|
SharedWorkerMessage = 'SharedWorkerMessage',
|
|
14982
14982
|
SharedWorkerWithNoActiveClient = 'SharedWorkerWithNoActiveClient',
|
|
14983
14983
|
WebLocks = 'WebLocks',
|
|
14984
|
+
WebLocksContention = 'WebLocksContention',
|
|
14984
14985
|
WebHID = 'WebHID',
|
|
14985
14986
|
WebBluetooth = 'WebBluetooth',
|
|
14986
14987
|
WebShare = 'WebShare',
|
|
@@ -17,10 +17,10 @@ import {
|
|
|
17
17
|
ResponseType
|
|
18
18
|
} from './agents/AiAgent.js';
|
|
19
19
|
import {ContextSelectionAgent} from './agents/ContextSelectionAgent.js';
|
|
20
|
-
import {FileAgent} from './agents/FileAgent.js';
|
|
21
|
-
import {NetworkAgent} from './agents/NetworkAgent.js';
|
|
22
|
-
import {PerformanceAgent} from './agents/PerformanceAgent.js';
|
|
23
|
-
import {StylingAgent} from './agents/StylingAgent.js';
|
|
20
|
+
import {FileAgent, FileContext} from './agents/FileAgent.js';
|
|
21
|
+
import {NetworkAgent, RequestContext} from './agents/NetworkAgent.js';
|
|
22
|
+
import {PerformanceAgent, PerformanceTraceContext} from './agents/PerformanceAgent.js';
|
|
23
|
+
import {NodeContext, StylingAgent} from './agents/StylingAgent.js';
|
|
24
24
|
import {AiHistoryStorage, ConversationType, type SerializedConversation} from './AiHistoryStorage.js';
|
|
25
25
|
import type {ChangeManager} from './ChangeManager.js';
|
|
26
26
|
import {NetworkRequestFormatter} from './data_formatters/NetworkRequestFormatter.js';
|
|
@@ -59,14 +59,17 @@ export class AiConversation {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
readonly id: string;
|
|
62
|
-
#
|
|
62
|
+
// Handled in #updateAgent
|
|
63
|
+
#type!: ConversationType;
|
|
64
|
+
// Handled in #updateAgent
|
|
65
|
+
#agent!: AiAgent<unknown>;
|
|
66
|
+
|
|
63
67
|
#isReadOnly: boolean;
|
|
64
68
|
readonly history: ResponseData[];
|
|
65
69
|
#isExternal: boolean;
|
|
66
70
|
|
|
67
71
|
#aidaClient: Host.AidaClient.AidaClient;
|
|
68
72
|
#changeManager: ChangeManager|undefined;
|
|
69
|
-
#agent: AiAgent<unknown>;
|
|
70
73
|
#origin?: string;
|
|
71
74
|
|
|
72
75
|
#contexts: Array<ConversationContext<unknown>> = [];
|
|
@@ -82,14 +85,13 @@ export class AiConversation {
|
|
|
82
85
|
) {
|
|
83
86
|
this.#changeManager = changeManager;
|
|
84
87
|
this.#aidaClient = aidaClient;
|
|
85
|
-
this.#type = type;
|
|
86
88
|
|
|
87
89
|
this.id = id;
|
|
88
90
|
this.#isReadOnly = isReadOnly;
|
|
89
91
|
this.#isExternal = isExternal;
|
|
90
92
|
this.history = this.#reconstructHistory(data);
|
|
91
93
|
// Needs to be last
|
|
92
|
-
this.#
|
|
94
|
+
this.#updateAgent(type);
|
|
93
95
|
}
|
|
94
96
|
|
|
95
97
|
get isReadOnly(): boolean {
|
|
@@ -123,10 +125,26 @@ export class AiConversation {
|
|
|
123
125
|
setContext(updateContext: ConversationContext<unknown>|null): void {
|
|
124
126
|
if (!updateContext) {
|
|
125
127
|
this.#contexts = [];
|
|
128
|
+
if (isAiAssistanceContextSelectionAgentEnabled()) {
|
|
129
|
+
this.#updateAgent(ConversationType.NONE);
|
|
130
|
+
}
|
|
131
|
+
|
|
126
132
|
return;
|
|
127
133
|
}
|
|
128
134
|
|
|
129
135
|
this.#contexts = [updateContext];
|
|
136
|
+
|
|
137
|
+
if (isAiAssistanceContextSelectionAgentEnabled()) {
|
|
138
|
+
if (updateContext instanceof FileContext) {
|
|
139
|
+
this.#updateAgent(ConversationType.FILE);
|
|
140
|
+
} else if (updateContext instanceof NodeContext) {
|
|
141
|
+
this.#updateAgent(ConversationType.STYLING);
|
|
142
|
+
} else if (updateContext instanceof RequestContext) {
|
|
143
|
+
this.#updateAgent(ConversationType.NETWORK);
|
|
144
|
+
} else if (updateContext instanceof PerformanceTraceContext) {
|
|
145
|
+
this.#updateAgent(ConversationType.PERFORMANCE);
|
|
146
|
+
}
|
|
147
|
+
}
|
|
130
148
|
}
|
|
131
149
|
|
|
132
150
|
get selectedContext(): ConversationContext<unknown>|undefined {
|
|
@@ -249,37 +267,40 @@ export class AiConversation {
|
|
|
249
267
|
};
|
|
250
268
|
}
|
|
251
269
|
|
|
252
|
-
#
|
|
270
|
+
#updateAgent(type: ConversationType): void {
|
|
271
|
+
if (this.#type === type) {
|
|
272
|
+
return;
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
this.#type = type;
|
|
253
276
|
const options = {
|
|
254
277
|
aidaClient: this.#aidaClient,
|
|
255
278
|
serverSideLoggingEnabled: isAiAssistanceServerSideLoggingEnabled(),
|
|
256
279
|
sessionId: this.id,
|
|
257
280
|
changeManager: this.#changeManager,
|
|
258
281
|
};
|
|
259
|
-
|
|
260
|
-
switch (this.#type) {
|
|
282
|
+
switch (type) {
|
|
261
283
|
case ConversationType.STYLING: {
|
|
262
|
-
agent = new StylingAgent(options);
|
|
284
|
+
this.#agent = new StylingAgent(options);
|
|
263
285
|
break;
|
|
264
286
|
}
|
|
265
287
|
case ConversationType.NETWORK: {
|
|
266
|
-
agent = new NetworkAgent(options);
|
|
288
|
+
this.#agent = new NetworkAgent(options);
|
|
267
289
|
break;
|
|
268
290
|
}
|
|
269
291
|
case ConversationType.FILE: {
|
|
270
|
-
agent = new FileAgent(options);
|
|
292
|
+
this.#agent = new FileAgent(options);
|
|
271
293
|
break;
|
|
272
294
|
}
|
|
273
295
|
case ConversationType.PERFORMANCE: {
|
|
274
|
-
agent = new PerformanceAgent(options);
|
|
296
|
+
this.#agent = new PerformanceAgent(options);
|
|
275
297
|
break;
|
|
276
298
|
}
|
|
277
299
|
case ConversationType.NONE: {
|
|
278
|
-
agent = new ContextSelectionAgent(options);
|
|
300
|
+
this.#agent = new ContextSelectionAgent(options);
|
|
279
301
|
break;
|
|
280
302
|
}
|
|
281
303
|
}
|
|
282
|
-
return agent;
|
|
283
304
|
}
|
|
284
305
|
|
|
285
306
|
#factsCache = new Map<ExtraContext, Host.AidaClient.RequestFact>();
|
|
@@ -399,11 +420,6 @@ Time: ${micros(time)}`;
|
|
|
399
420
|
},
|
|
400
421
|
options.multimodalInput,
|
|
401
422
|
)) {
|
|
402
|
-
if (data.type === ResponseType.CONTEXT_CHANGE) {
|
|
403
|
-
this.#type = ConversationType.NETWORK;
|
|
404
|
-
this.#agent = this.#createAgent();
|
|
405
|
-
}
|
|
406
|
-
|
|
407
423
|
if (shouldAddToHistory(data)) {
|
|
408
424
|
void this.addHistoryItem(data);
|
|
409
425
|
}
|
|
@@ -439,3 +455,7 @@ function isAiAssistanceServerSideLoggingEnabled(): boolean {
|
|
|
439
455
|
type ExtraContext = SDK.DOMModel.DOMNode|SDK.NetworkRequest.NetworkRequest|
|
|
440
456
|
{event: Trace.Types.Events.Event, traceStartTime: Trace.Types.Timing.Micro}|
|
|
441
457
|
{insight: Trace.Insights.Types.InsightModel, trace: Trace.TraceModel.ParsedTrace};
|
|
458
|
+
|
|
459
|
+
function isAiAssistanceContextSelectionAgentEnabled(): boolean {
|
|
460
|
+
return Boolean(Root.Runtime.hostConfig.devToolsAiAssistanceContextSelectionAgent?.enabled);
|
|
461
|
+
}
|
|
@@ -58,6 +58,36 @@ Content:
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"name": "listSourceFiles",
|
|
64
|
+
"description": "Returns a list of all files in the project.",
|
|
65
|
+
"parameters": {
|
|
66
|
+
"type": 6,
|
|
67
|
+
"description": "",
|
|
68
|
+
"nullable": true,
|
|
69
|
+
"required": [],
|
|
70
|
+
"properties": {}
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"name": "selectSourceFile",
|
|
75
|
+
"description": "Returns a list of all files in the project.",
|
|
76
|
+
"parameters": {
|
|
77
|
+
"type": 6,
|
|
78
|
+
"description": "",
|
|
79
|
+
"nullable": true,
|
|
80
|
+
"required": [
|
|
81
|
+
"name"
|
|
82
|
+
],
|
|
83
|
+
"properties": {
|
|
84
|
+
"name": {
|
|
85
|
+
"type": 1,
|
|
86
|
+
"description": "The name of the file",
|
|
87
|
+
"nullable": false
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
61
91
|
}
|
|
62
92
|
],
|
|
63
93
|
"options": {},
|
|
@@ -7,6 +7,7 @@ import * as i18n from '../../../core/i18n/i18n.js';
|
|
|
7
7
|
import * as Platform from '../../../core/platform/platform.js';
|
|
8
8
|
import * as Root from '../../../core/root/root.js';
|
|
9
9
|
import * as Logs from '../../logs/logs.js';
|
|
10
|
+
import * as Workspace from '../../workspace/workspace.js';
|
|
10
11
|
|
|
11
12
|
import {
|
|
12
13
|
type AgentOptions,
|
|
@@ -132,8 +133,86 @@ export class ContextSelectionAgent extends AiAgent<never> {
|
|
|
132
133
|
};
|
|
133
134
|
},
|
|
134
135
|
});
|
|
136
|
+
|
|
137
|
+
this.declareFunction<Record<string, never>>('listSourceFiles', {
|
|
138
|
+
description: `Returns a list of all files in the project.`,
|
|
139
|
+
parameters: {
|
|
140
|
+
type: Host.AidaClient.ParametersTypes.OBJECT,
|
|
141
|
+
description: '',
|
|
142
|
+
nullable: true,
|
|
143
|
+
required: [],
|
|
144
|
+
properties: {},
|
|
145
|
+
},
|
|
146
|
+
displayInfoFromArgs: () => {
|
|
147
|
+
return {title: lockedString('Listing source requests…')};
|
|
148
|
+
},
|
|
149
|
+
handler: async () => {
|
|
150
|
+
const files = [];
|
|
151
|
+
for (const file of this.#getUISourceCodes()) {
|
|
152
|
+
files.push(file.fullDisplayName());
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
return {
|
|
156
|
+
result: files,
|
|
157
|
+
};
|
|
158
|
+
},
|
|
159
|
+
});
|
|
160
|
+
|
|
161
|
+
this.declareFunction<{name: string}>('selectSourceFile', {
|
|
162
|
+
description: `Returns a list of all files in the project.`,
|
|
163
|
+
parameters: {
|
|
164
|
+
type: Host.AidaClient.ParametersTypes.OBJECT,
|
|
165
|
+
description: '',
|
|
166
|
+
nullable: true,
|
|
167
|
+
required: ['name'],
|
|
168
|
+
properties: {
|
|
169
|
+
name: {
|
|
170
|
+
type: Host.AidaClient.ParametersTypes.STRING,
|
|
171
|
+
description: 'The name of the file',
|
|
172
|
+
nullable: false,
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
},
|
|
176
|
+
displayInfoFromArgs: args => {
|
|
177
|
+
return {title: lockedString('Getting source file'), action: `selectSourceFile(${args.name})`};
|
|
178
|
+
},
|
|
179
|
+
handler: async params => {
|
|
180
|
+
for (const file of this.#getUISourceCodes()) {
|
|
181
|
+
if (file.fullDisplayName() === params.name) {
|
|
182
|
+
return {
|
|
183
|
+
context: file,
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
return {error: 'Unable to find file.'};
|
|
189
|
+
},
|
|
190
|
+
});
|
|
135
191
|
}
|
|
136
192
|
|
|
193
|
+
#getUISourceCodes = (): Iterable<Workspace.UISourceCode.UISourceCode> => {
|
|
194
|
+
const workspace = Workspace.Workspace.WorkspaceImpl.instance();
|
|
195
|
+
const projects = workspace.projects().filter(project => {
|
|
196
|
+
switch (project.type()) {
|
|
197
|
+
case Workspace.Workspace.projectTypes.Network:
|
|
198
|
+
case Workspace.Workspace.projectTypes.FileSystem:
|
|
199
|
+
case Workspace.Workspace.projectTypes.ConnectableFileSystem:
|
|
200
|
+
return true;
|
|
201
|
+
|
|
202
|
+
default:
|
|
203
|
+
return false;
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
const uiSourceCodes = [];
|
|
207
|
+
for (const project of projects) {
|
|
208
|
+
for (const uiSourceCode of project.uiSourceCodes()) {
|
|
209
|
+
uiSourceCodes.push(uiSourceCode);
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
return uiSourceCodes;
|
|
214
|
+
};
|
|
215
|
+
|
|
137
216
|
async * handleContextDetails(): AsyncGenerator<ContextResponse, void, void> {
|
|
138
217
|
}
|
|
139
218
|
|
|
@@ -327,7 +327,6 @@ export class CookieIssue extends Issue<Protocol.Audits.CookieIssueDetails> {
|
|
|
327
327
|
Protocol.Log.LogEntryLevel.Warning, UIStrings.consoleTpcdErrorMessage, {
|
|
328
328
|
url: this.details().request?.url as Platform.DevToolsPath.UrlString | undefined,
|
|
329
329
|
affectedResources: {requestId: this.details().request?.requestId, issueId: this.issueId},
|
|
330
|
-
isCookieReportIssue: true
|
|
331
330
|
});
|
|
332
331
|
}
|
|
333
332
|
return;
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
import * as Common from '../../core/common/common.js';
|
|
6
|
-
import * as Root from '../../core/root/root.js';
|
|
7
6
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
8
7
|
import * as Protocol from '../../generated/protocol.js';
|
|
9
8
|
|
|
@@ -12,7 +11,7 @@ import {BounceTrackingIssue} from './BounceTrackingIssue.js';
|
|
|
12
11
|
import {ClientHintIssue} from './ClientHintIssue.js';
|
|
13
12
|
import {ContentSecurityPolicyIssue} from './ContentSecurityPolicyIssue.js';
|
|
14
13
|
import {CookieDeprecationMetadataIssue} from './CookieDeprecationMetadataIssue.js';
|
|
15
|
-
import {CookieIssue
|
|
14
|
+
import {CookieIssue} from './CookieIssue.js';
|
|
16
15
|
import {CorsIssue} from './CorsIssue.js';
|
|
17
16
|
import {CrossOriginEmbedderPolicyIssue, isCrossOriginEmbedderPolicyIssue} from './CrossOriginEmbedderPolicyIssue.js';
|
|
18
17
|
import {DeprecationIssue} from './DeprecationIssue.js';
|
|
@@ -211,7 +210,6 @@ export class IssuesManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes
|
|
|
211
210
|
#thirdPartyCookiePhaseoutIssueCount = new Map<IssueKind, number>();
|
|
212
211
|
#issuesById = new Map<string, Issue>();
|
|
213
212
|
#issuesByOutermostTarget: WeakMap<SDK.Target.Target, Set<Issue>> = new Map();
|
|
214
|
-
#thirdPartyCookiePhaseoutIssueMessageSent = false;
|
|
215
213
|
|
|
216
214
|
constructor(
|
|
217
215
|
private readonly showThirdPartyIssuesSetting?: Common.Settings.Setting<boolean>,
|
|
@@ -314,7 +312,6 @@ export class IssuesManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes
|
|
|
314
312
|
|
|
315
313
|
#onIssueAddedEvent(event: Common.EventTarget.EventTargetEvent<SDK.IssuesModel.IssueAddedEvent>): void {
|
|
316
314
|
const {issuesModel, inspectorIssue} = event.data;
|
|
317
|
-
const isPrivacyUiEnabled = Root.Runtime.hostConfig.devToolsPrivacyUI?.enabled;
|
|
318
315
|
|
|
319
316
|
const issues = createIssuesFromProtocolIssue(issuesModel, inspectorIssue);
|
|
320
317
|
for (const issue of issues) {
|
|
@@ -323,16 +320,7 @@ export class IssuesManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes
|
|
|
323
320
|
if (!message) {
|
|
324
321
|
continue;
|
|
325
322
|
}
|
|
326
|
-
|
|
327
|
-
// Only show one message for third-party cookie phaseout issues if the new privacy ui is enabled
|
|
328
|
-
const is3rdPartyCookiePhaseoutIssue =
|
|
329
|
-
CookieIssue.getSubCategory(issue.code()) === CookieIssueSubCategory.THIRD_PARTY_PHASEOUT_COOKIE;
|
|
330
|
-
if (!is3rdPartyCookiePhaseoutIssue || !isPrivacyUiEnabled || !this.#thirdPartyCookiePhaseoutIssueMessageSent) {
|
|
331
|
-
issuesModel.target().model(SDK.ConsoleModel.ConsoleModel)?.addMessage(message);
|
|
332
|
-
}
|
|
333
|
-
if (is3rdPartyCookiePhaseoutIssue && isPrivacyUiEnabled) {
|
|
334
|
-
this.#thirdPartyCookiePhaseoutIssueMessageSent = true;
|
|
335
|
-
}
|
|
323
|
+
issuesModel.target().model(SDK.ConsoleModel.ConsoleModel)?.addMessage(message);
|
|
336
324
|
}
|
|
337
325
|
}
|
|
338
326
|
|
|
@@ -453,7 +441,6 @@ export class IssuesManager extends Common.ObjectWrapper.ObjectWrapper<EventTypes
|
|
|
453
441
|
this.#issuesById.clear();
|
|
454
442
|
this.#hiddenIssueCount.clear();
|
|
455
443
|
this.#thirdPartyCookiePhaseoutIssueCount.clear();
|
|
456
|
-
this.#thirdPartyCookiePhaseoutIssueMessageSent = false;
|
|
457
444
|
const values = this.hideIssueSetting?.get();
|
|
458
445
|
for (const [key, issue] of this.#allIssues) {
|
|
459
446
|
if (this.#issueFilter(issue)) {
|
|
@@ -6821,6 +6821,10 @@ export const NativeFunctions = [
|
|
|
6821
6821
|
name: "UIEvent",
|
|
6822
6822
|
signatures: [["type","?eventInitDict"]]
|
|
6823
6823
|
},
|
|
6824
|
+
{
|
|
6825
|
+
name: "WebMCPEvent",
|
|
6826
|
+
signatures: [["type","?eventInitDict"]]
|
|
6827
|
+
},
|
|
6824
6828
|
{
|
|
6825
6829
|
name: "WheelEvent",
|
|
6826
6830
|
signatures: [["type","?eventInitDict"]]
|
|
@@ -452,9 +452,11 @@ export class AXBreadcrumb {
|
|
|
452
452
|
|
|
453
453
|
this.#element = document.createElement('div');
|
|
454
454
|
this.#element.classList.add('ax-breadcrumb');
|
|
455
|
-
this.#element.setAttribute(
|
|
456
|
-
|
|
457
|
-
|
|
455
|
+
this.#element.setAttribute('jslog', `${VisualLogging.treeItem().track({
|
|
456
|
+
click: true,
|
|
457
|
+
resize: true,
|
|
458
|
+
keydown: 'ArrowUp|ArrowDown|ArrowLeft|ArrowRight|Enter'
|
|
459
|
+
})}`);
|
|
458
460
|
elementsToAXBreadcrumb.set(this.#element, this);
|
|
459
461
|
|
|
460
462
|
this.#nodeElement = document.createElement('div');
|