chrome-devtools-frontend 1.0.1732418 → 1.0.1733843
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/get_the_code.md +1 -73
- package/front_end/Tests.js +0 -5
- package/front_end/core/host/AidaClientTypes.ts +24 -3
- package/front_end/core/host/AidaGcaTranslation.ts +29 -1
- package/front_end/core/platform/browser/HostRuntime.ts +5 -1
- package/front_end/core/sdk/DOMModel.ts +8 -3
- package/front_end/design_system_tokens.css +5 -0
- package/front_end/entrypoints/formatter_worker/ScopeParser.ts +2 -2
- package/front_end/generated/InspectorBackendCommands.ts +5 -5
- package/front_end/generated/SupportedCSSProperties.ts +8 -2
- package/front_end/generated/protocol.ts +29 -7
- package/front_end/models/ai-utils/debug.ts +127 -22
- package/front_end/models/ai_assistance/AiConversation.ts +1 -0
- package/front_end/models/ai_assistance/README.md +1 -1
- package/front_end/models/ai_assistance/agents/AiAgent.ts +69 -11
- package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +2 -1
- package/front_end/models/ai_assistance/contexts/DOMNodeContext.ts +4 -3
- package/front_end/models/ai_assistance/contexts/LighthouseContext.snapshot.txt +4 -2
- package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.snapshot.txt +6 -0
- package/front_end/models/ai_assistance/data_formatters/LighthouseFormatter.ts +2 -0
- package/front_end/models/ai_assistance/data_formatters/PerformanceInsightFormatter.snapshot.txt +1 -1
- package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.snapshot.txt +26 -26
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +2 -1
- package/front_end/models/ai_code_completion/ai_code_completion.ts +11 -2
- package/front_end/models/ai_code_generation/AiCodeGeneration.ts +2 -1
- package/front_end/models/ai_code_generation/ai_code_generation.ts +11 -2
- package/front_end/models/trace/LanternComputationData.ts +4 -0
- package/front_end/models/trace/lantern/metrics/LargestContentfulPaint.ts +126 -1
- package/front_end/models/trace/lantern/types/Lantern.ts +3 -0
- package/front_end/models/web_mcp/WebMCPModel.ts +1 -1
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +65 -15
- package/front_end/panels/ai_assistance/ExternalHandler.ts +1 -1
- package/front_end/panels/ai_assistance/components/PermissionPrompt.ts +4 -4
- package/front_end/panels/ai_assistance/components/chatMessage.css +4 -5
- package/front_end/panels/ai_assistance/components/exploreWidget.css +3 -3
- package/front_end/panels/application/backgroundServiceView.css +2 -2
- package/front_end/panels/application/components/reportsGrid.css +1 -1
- package/front_end/panels/application/components/serviceWorkerRouterView.css +2 -2
- package/front_end/panels/application/components/trustTokensView.css +1 -1
- package/front_end/panels/application/deviceBoundSessionsView.css +1 -1
- package/front_end/panels/application/frameDetailsReportView.css +0 -4
- package/front_end/panels/application/indexedDBViews.css +0 -4
- package/front_end/panels/application/resourcesPanel.css +0 -13
- package/front_end/panels/application/serviceWorkerUpdateCycleView.css +3 -3
- package/front_end/panels/application/serviceWorkersView.css +3 -2
- package/front_end/panels/browser_debugger/XHRBreakpointsSidebarPane.ts +346 -286
- package/front_end/panels/comments/CommentsPane.ts +2 -11
- package/front_end/panels/common/CommentThreadWidget.ts +11 -3
- package/front_end/panels/common/CommentsOverlayWidget.ts +3 -2
- package/front_end/panels/console/consoleContextSelector.css +1 -1
- package/front_end/panels/console/consolePinPane.css +1 -1
- package/front_end/panels/console/consolePrompt.css +4 -2
- package/front_end/panels/console/consoleView.css +1 -1
- package/front_end/panels/elements/ComputedStyleWidget.ts +8 -19
- package/front_end/panels/elements/PropertyRenderer.ts +7 -27
- package/front_end/panels/elements/StylePropertyTreeElement.ts +61 -72
- package/front_end/panels/elements/components/cssPropertyDocsView.css +1 -1
- package/front_end/panels/elements/components/elementsBreadcrumbs.css +1 -1
- package/front_end/panels/elements/components/stylePropertyEditor.css +1 -5
- package/front_end/panels/elements/layoutPane.css +1 -1
- package/front_end/panels/elements/metricsSidebarPane.css +2 -2
- package/front_end/panels/elements/propertiesWidget.css +0 -5
- package/front_end/panels/elements/stylesSidebarPane.css +3 -2
- package/front_end/panels/emulation/deviceModeView.css +3 -3
- package/front_end/panels/event_listeners/eventListenersView.css +1 -1
- package/front_end/panels/explain/components/consoleInsight.css +2 -2
- package/front_end/panels/issues/issuesTree.css +10 -7
- package/front_end/panels/layer_viewer/layerTreeOutline.css +1 -1
- package/front_end/panels/lighthouse/LighthousePanel.ts +16 -1
- package/front_end/panels/lighthouse/lighthousePanel.css +1 -1
- package/front_end/panels/linear_memory_inspector/components/LinearMemoryHighlightChipList.ts +10 -6
- package/front_end/panels/linear_memory_inspector/components/linearMemoryHighlightChipList.css +1 -26
- package/front_end/panels/linear_memory_inspector/components/valueInterpreterDisplay.css +1 -1
- package/front_end/panels/media/playerListView.css +11 -8
- package/front_end/panels/media/playerMessagesView.css +9 -5
- package/front_end/panels/network/NetworkWaterfallColumn.ts +92 -55
- package/front_end/panels/network/networkConfigView.css +3 -3
- package/front_end/panels/network/networkLogView.css +5 -4
- package/front_end/panels/network/networkManageCustomHeadersView.css +1 -1
- package/front_end/panels/network/networkTimingTable.css +4 -8
- package/front_end/panels/network/requestPayloadView.css +1 -1
- package/front_end/panels/performance_monitor/performanceMonitor.css +1 -1
- package/front_end/panels/profiler/ModuleUIStrings.ts +12 -0
- package/front_end/panels/profiler/ProfileFlameChartDataProvider.ts +114 -18
- package/front_end/panels/protocol_monitor/JSONEditor.css +4 -3
- package/front_end/panels/recorder/createRecordingView.css +2 -2
- package/front_end/panels/recorder/stepEditor.css +1 -1
- package/front_end/panels/recorder/stepView.css +0 -7
- package/front_end/panels/recorder/timelineSection.css +1 -1
- package/front_end/panels/screencast/screencastView.css +1 -1
- package/front_end/panels/search/searchResultsPane.css +1 -1
- package/front_end/panels/security/mainView.css +2 -2
- package/front_end/panels/security/originView.css +1 -1
- package/front_end/panels/settings/AISettingsTab.ts +1 -0
- package/front_end/panels/sources/NavigatorView.ts +120 -49
- package/front_end/panels/sources/breakpointsView.css +3 -3
- package/front_end/panels/sources/components/HeadersView.css +2 -2
- package/front_end/panels/sources/watchExpressionsSidebarPane.css +2 -1
- package/front_end/panels/timeline/CompatibilityTracksAppender.ts +30 -10
- package/front_end/panels/timeline/TimelinePanel.ts +24 -3
- package/front_end/panels/timeline/components/metricCard.css +1 -1
- package/front_end/panels/timeline/components/networkRequestTooltip.css +2 -2
- package/front_end/panels/timeline/components/relatedInsightChips.css +1 -1
- package/front_end/panels/timeline/timelineFlameChartView.css +4 -4
- package/front_end/panels/timeline/timelineFlamechartPopover.css +2 -2
- package/front_end/panels/timeline/timelineMiniMap.css +3 -2
- package/front_end/panels/web_audio/WebAudioModel.ts +14 -5
- package/front_end/panels/web_audio/WebAudioView.ts +34 -1
- package/front_end/panels/web_audio/webAudio.css +17 -3
- package/front_end/panels/webauthn/webauthnPane.css +2 -4
- package/front_end/panels/whats_new/ReleaseNoteText.ts +19 -1
- package/front_end/panels/whats_new/ReleaseNoteView.ts +15 -1
- package/front_end/panels/whats_new/releaseNoteView.css +49 -0
- package/front_end/third_party/chromium/README.chromium +1 -1
- package/front_end/third_party/puppeteer-replay/README.chromium +9 -1
- package/front_end/third_party/puppeteer-replay/package/lib/main.d.ts +2 -2
- package/front_end/ui/components/buttons/button.css +0 -1
- package/front_end/ui/components/diff_view/diffView.css +1 -1
- package/front_end/ui/components/markdown_view/codeBlock.css +4 -4
- package/front_end/ui/components/markdown_view/markdownView.css +3 -7
- package/front_end/ui/components/panel_feedback/panelFeedback.css +3 -2
- package/front_end/ui/components/panel_introduction_steps/panelIntroductionSteps.css +1 -1
- package/front_end/ui/components/suggestion_input/suggestionInput.css +2 -2
- package/front_end/ui/components/switch/switch.css +2 -1
- package/front_end/ui/legacy/TabbedPane.ts +1 -1
- package/front_end/ui/legacy/components/inline_editor/bezierEditor.css +10 -3
- package/front_end/ui/legacy/components/inline_editor/colorSwatch.css +1 -2
- package/front_end/ui/legacy/components/perf_ui/chartViewport.css +1 -1
- package/front_end/ui/legacy/components/perf_ui/filmStripView.css +1 -1
- package/front_end/ui/legacy/components/perf_ui/flameChart.css +5 -3
- package/front_end/ui/legacy/components/perf_ui/overviewGrid.css +7 -4
- package/front_end/ui/legacy/components/perf_ui/pieChart.css +0 -1
- package/front_end/ui/legacy/components/utils/imagePreview.css +1 -1
- package/front_end/ui/legacy/inspectorCommon.css +11 -27
- package/front_end/ui/legacy/listWidget.css +1 -1
- package/front_end/ui/legacy/progressIndicator.css +1 -2
- package/front_end/ui/legacy/reportView.css +5 -2
- package/front_end/ui/legacy/searchableView.css +3 -2
- package/front_end/ui/legacy/suggestBox.css +2 -1
- package/front_end/ui/legacy/tabbedPane.css +8 -5
- package/front_end/ui/legacy/treeoutline.css +1 -1
- package/front_end/ui/legacy/viewContainers.css +1 -1
- package/front_end/ui/visual_logging/KnownContextValues.ts +11 -0
- package/package.json +1 -1
- package/front_end/models/ai_code_completion/debug.ts +0 -33
- package/front_end/models/ai_code_generation/debug.ts +0 -33
package/docs/get_the_code.md
CHANGED
|
@@ -8,7 +8,7 @@ In order to make changes to DevTools frontend, build, run, test, and submit chan
|
|
|
8
8
|
|
|
9
9
|
As a standalone project, Chrome DevTools frontend can be checked out and built independently from Chromium. The main advantage is not having to check out and build Chromium.
|
|
10
10
|
|
|
11
|
-
However, to run layout tests, you need to use the [
|
|
11
|
+
However, to run layout tests, you need to use the [Chromium checkout](#Chromium-checkout).
|
|
12
12
|
|
|
13
13
|
### Checking out source
|
|
14
14
|
|
|
@@ -452,75 +452,3 @@ ended up on. If you switch back and forth across the revision that moved
|
|
|
452
452
|
`node_modules/` out of git, `gclient sync` repairs the directory on its own
|
|
453
453
|
(`ensure_node_modules` hook); in the worst case it asks you to run it once
|
|
454
454
|
more.
|
|
455
|
-
|
|
456
|
-
## Integrated checkout
|
|
457
|
-
|
|
458
|
-
**This solution is experimental, please report any trouble that you run into!**
|
|
459
|
-
|
|
460
|
-
The integrated workflow offers the best of both worlds, and allows for working
|
|
461
|
-
on both Chromium and DevTools frontend side-by-side.
|
|
462
|
-
|
|
463
|
-
A full [Chromium checkout](#Chromium-checkout) is a pre-requisite for the
|
|
464
|
-
following steps.
|
|
465
|
-
|
|
466
|
-
### Untrack the existing devtools-frontend submodule
|
|
467
|
-
|
|
468
|
-
First, you need to untrack the existing devtools-frontend submodule in the chromium checkout. This ensures that devtools
|
|
469
|
-
isn't dragged along whenever you update your chromium dependencies.
|
|
470
|
-
|
|
471
|
-
In `chromium/src`, run `gclient sync` to make sure you have installed all required submodules.
|
|
472
|
-
|
|
473
|
-
```bash
|
|
474
|
-
gclient sync
|
|
475
|
-
```
|
|
476
|
-
|
|
477
|
-
Then, disable `gclient sync` for DevTools frontend inside of Chromium by editing `.gclient` config. From
|
|
478
|
-
`chromium/src/`, run
|
|
479
|
-
|
|
480
|
-
```bash
|
|
481
|
-
vim "$(gclient root)/.gclient"
|
|
482
|
-
```
|
|
483
|
-
|
|
484
|
-
In the `custom_deps` section, insert this line:
|
|
485
|
-
|
|
486
|
-
```python
|
|
487
|
-
"src/third_party/devtools-frontend/src": None,
|
|
488
|
-
```
|
|
489
|
-
|
|
490
|
-
For the integrated checkout, create a single gclient project that automatically `gclient sync`s all dependencies for both
|
|
491
|
-
repositories. After checking out chromium, modify the `.gclient` file for `chromium/src` to add the DevTools project:
|
|
492
|
-
|
|
493
|
-
```python
|
|
494
|
-
solutions = [
|
|
495
|
-
{
|
|
496
|
-
# Chromium src project
|
|
497
|
-
"name": "src",
|
|
498
|
-
"url": "https://chromium.googlesource.com/chromium/src.git",
|
|
499
|
-
"custom_deps": {
|
|
500
|
-
"src/third_party/devtools-frontend/src": None,
|
|
501
|
-
},
|
|
502
|
-
},
|
|
503
|
-
{
|
|
504
|
-
# devtools-frontend project
|
|
505
|
-
"name": "devtools-frontend",
|
|
506
|
-
"managed": False,
|
|
507
|
-
"url": "https://chromium.googlesource.com/devtools/devtools-frontend.git",
|
|
508
|
-
}
|
|
509
|
-
]
|
|
510
|
-
```
|
|
511
|
-
|
|
512
|
-
Do not run `gclient sync` now, first create the symlink. In the same directory as the .gclient file, run:
|
|
513
|
-
|
|
514
|
-
```bash
|
|
515
|
-
ln -s src/third_party/devtools-frontend/src devtools-frontend
|
|
516
|
-
```
|
|
517
|
-
|
|
518
|
-
If you did run `gclient sync` first, remove the devtools-frontend directory and start over.
|
|
519
|
-
|
|
520
|
-
Run `gclient sync` after creating the link to fetch the dependencies for the standalone checkout.
|
|
521
|
-
|
|
522
|
-
### Known issues
|
|
523
|
-
|
|
524
|
-
- GN/Siso wrappers in `depot_tools` don't assume the side-by-side solutions, and
|
|
525
|
-
always use the binaries in Chromium. Please make sure updating Chromium when
|
|
526
|
-
you get a build error.
|
package/front_end/Tests.js
CHANGED
|
@@ -251,11 +251,6 @@
|
|
|
251
251
|
* @param panelName Name of the panel to show.
|
|
252
252
|
*/
|
|
253
253
|
TestSuite.prototype.showPanel = function(panelName) {
|
|
254
|
-
// TODO(crbug.com/518066451): Remove fallback once https://crrev.com/c/8702200
|
|
255
|
-
// lands in chromium/src (see https://crrev.com/c/8704657).
|
|
256
|
-
if (!UI.ViewManager.ViewManager.instance().hasView(panelName)) {
|
|
257
|
-
return this.showExtensionSidebarPane(panelName);
|
|
258
|
-
}
|
|
259
254
|
return UI.InspectorView.InspectorView.instance().showPanel(panelName);
|
|
260
255
|
};
|
|
261
256
|
|
|
@@ -65,7 +65,7 @@ export interface FunctionPrimitiveParams extends BaseFunctionParam {
|
|
|
65
65
|
|
|
66
66
|
export interface FunctionArrayParam extends BaseFunctionParam {
|
|
67
67
|
type: ParametersTypes.ARRAY;
|
|
68
|
-
items: FunctionPrimitiveParams;
|
|
68
|
+
items: FunctionPrimitiveParams|FunctionObjectParam;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
export interface FunctionObjectParam<T extends string|number|symbol = string> extends BaseFunctionParam {
|
|
@@ -199,7 +199,11 @@ export interface DoConversationRequest {
|
|
|
199
199
|
options?: ConversationOptions;
|
|
200
200
|
metadata: RequestMetadata;
|
|
201
201
|
functionality_type?: FunctionalityType;
|
|
202
|
-
|
|
202
|
+
/**
|
|
203
|
+
* Identifies the DevTools agent or feature making the request so GCA can resolve
|
|
204
|
+
* the corresponding server-side experience configuration.
|
|
205
|
+
*/
|
|
206
|
+
client_feature: ClientFeature;
|
|
203
207
|
}
|
|
204
208
|
/* eslint-enable @typescript-eslint/naming-convention */
|
|
205
209
|
|
|
@@ -475,8 +479,25 @@ export interface AidaChunkResponse {
|
|
|
475
479
|
error?: string|Record<string, unknown>;
|
|
476
480
|
}
|
|
477
481
|
|
|
482
|
+
// Reads `devToolsAiDebug` directly because `core/host` cannot depend on `models/ai-utils`.
|
|
483
|
+
function isGcaDebugMode(): boolean {
|
|
484
|
+
try {
|
|
485
|
+
const raw = Platform.HostRuntime.HOST_RUNTIME.getLocalStorage()?.getItem('devToolsAiDebug');
|
|
486
|
+
if (!raw) {
|
|
487
|
+
return false;
|
|
488
|
+
}
|
|
489
|
+
const parsed: unknown = JSON.parse(raw);
|
|
490
|
+
if (typeof parsed !== 'object' || parsed === null) {
|
|
491
|
+
return false;
|
|
492
|
+
}
|
|
493
|
+
return Boolean((parsed as Record<string, unknown>).gca);
|
|
494
|
+
} catch {
|
|
495
|
+
return false;
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
|
|
478
499
|
export function debugLog(...log: unknown[]): void {
|
|
479
|
-
if (!
|
|
500
|
+
if (!isGcaDebugMode()) {
|
|
480
501
|
return;
|
|
481
502
|
}
|
|
482
503
|
|
|
@@ -23,6 +23,33 @@ function createBaseGcaRequest(
|
|
|
23
23
|
return gcaRequest;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
+
// Maps to experiences defined in g3; search for chrome_devtools/mapping_rules.gcl to find it.
|
|
27
|
+
const CLIENT_FEATURE_TO_EXPERIENCE:
|
|
28
|
+
Record<Exclude<AIDA.ClientFeature, AIDA.ClientFeature.CLIENT_FEATURE_UNSPECIFIED>, string> = {
|
|
29
|
+
[AIDA.ClientFeature.CHROME_CONSOLE_INSIGHTS]: 'chat_console_insights',
|
|
30
|
+
[AIDA.ClientFeature.CHROME_STYLING_AGENT]: 'chat_freestyler',
|
|
31
|
+
[AIDA.ClientFeature.CHROME_NETWORK_AGENT]: 'chat_drjones_network_agent',
|
|
32
|
+
[AIDA.ClientFeature.CHROME_FILE_AGENT]: 'chat_drjones_file_agent',
|
|
33
|
+
[AIDA.ClientFeature.CHROME_PATCH_AGENT]: 'chat_patch_agent',
|
|
34
|
+
[AIDA.ClientFeature.CHROME_PERFORMANCE_ANNOTATIONS_AGENT]: 'chat_performance_annotations_agent',
|
|
35
|
+
[AIDA.ClientFeature.CHROME_PERFORMANCE_FULL_AGENT]: 'chat_performance_full_agent',
|
|
36
|
+
[AIDA.ClientFeature.CHROME_CONTEXT_SELECTION_AGENT]: 'chat_context_selection_agent',
|
|
37
|
+
[AIDA.ClientFeature.CHROME_ACCESSIBILITY_AGENT]: 'chat_accessibility_agent',
|
|
38
|
+
[AIDA.ClientFeature.CHROME_CONVERSATION_SUMMARY_AGENT]: 'chat_conversation_summary_agent',
|
|
39
|
+
[AIDA.ClientFeature.CHROME_STORAGE_AGENT]: 'chat_storage_agent',
|
|
40
|
+
[AIDA.ClientFeature.CHROME_DEVTOOLS_V2_AGENT]: 'chat_devtools_v2_agent',
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
function getConversationExperience(clientFeature: AIDA.ClientFeature): string {
|
|
44
|
+
// A specific client feature is required to resolve the corresponding server-side
|
|
45
|
+
// GCA experience configuration for the conversation request.
|
|
46
|
+
if (clientFeature === AIDA.ClientFeature.CLIENT_FEATURE_UNSPECIFIED ||
|
|
47
|
+
!Object.hasOwn(CLIENT_FEATURE_TO_EXPERIENCE, clientFeature)) {
|
|
48
|
+
throw new Error(`Unsupported client feature for GCA conversation: ${clientFeature}`);
|
|
49
|
+
}
|
|
50
|
+
return CLIENT_FEATURE_TO_EXPERIENCE[clientFeature];
|
|
51
|
+
}
|
|
52
|
+
|
|
26
53
|
export function aidaDoConversationRequestToGcaRequest(request: AIDA.DoConversationRequest): GCA.GenerateContentRequest {
|
|
27
54
|
try {
|
|
28
55
|
const contents: GCA.Content[] = [];
|
|
@@ -36,7 +63,8 @@ export function aidaDoConversationRequestToGcaRequest(request: AIDA.DoConversati
|
|
|
36
63
|
}
|
|
37
64
|
contents.push(convertAidaContentToGcaContent(request.current_message));
|
|
38
65
|
|
|
39
|
-
const
|
|
66
|
+
const experience = getConversationExperience(request.client_feature);
|
|
67
|
+
const gcaRequest = createBaseGcaRequest(request, contents, experience);
|
|
40
68
|
|
|
41
69
|
if (request.function_declarations) {
|
|
42
70
|
gcaRequest.tools = [{
|
|
@@ -154,7 +154,11 @@ export const HOST_RUNTIME: Api.HostRuntime.HostRuntime = {
|
|
|
154
154
|
},
|
|
155
155
|
getLocalStorage(): Storage |
|
|
156
156
|
undefined {
|
|
157
|
-
|
|
157
|
+
try {
|
|
158
|
+
return 'localStorage' in globalThis ? globalThis.localStorage : undefined;
|
|
159
|
+
} catch {
|
|
160
|
+
return undefined;
|
|
161
|
+
}
|
|
158
162
|
},
|
|
159
163
|
getCacheStorage(): Api.HostRuntime.CacheStorageLike |
|
|
160
164
|
undefined {
|
|
@@ -1308,10 +1308,15 @@ export class DOMNode extends Common.ObjectWrapper.ObjectWrapper<DOMNodeEventType
|
|
|
1308
1308
|
}
|
|
1309
1309
|
|
|
1310
1310
|
async saveNodeToTempVariable(): Promise<void> {
|
|
1311
|
-
const
|
|
1311
|
+
const runtimeModel = this.#domModel.runtimeModel();
|
|
1312
|
+
const frameId = this.frameId() ?? this.ownerDocument?.frameId();
|
|
1313
|
+
const executionContext =
|
|
1314
|
+
(frameId ? runtimeModel.executionContexts().find(context => context.frameId === frameId && context.isDefault) :
|
|
1315
|
+
null) ??
|
|
1316
|
+
runtimeModel.defaultExecutionContext();
|
|
1317
|
+
const remoteObjectForConsole = await this.resolveToObject(undefined, executionContext?.id);
|
|
1312
1318
|
const consoleModel = this.#domModel.target().model(ConsoleModel);
|
|
1313
|
-
await consoleModel?.saveToTempVariable(remoteObjectForConsole
|
|
1314
|
-
remoteObjectForConsole);
|
|
1319
|
+
await consoleModel?.saveToTempVariable(executionContext, remoteObjectForConsole);
|
|
1315
1320
|
}
|
|
1316
1321
|
|
|
1317
1322
|
async scrollIntoView(): Promise<void> {
|
|
@@ -708,6 +708,9 @@
|
|
|
708
708
|
--sys-typescale-body5-bold: var(--ref-typeface-weight-bold)
|
|
709
709
|
var(--sys-typescale-body5-size) / var(--sys-typescale-body5-line-height)
|
|
710
710
|
var(--default-font-family);
|
|
711
|
+
--sys-typescale-label: var(--ref-typeface-weight-bold)
|
|
712
|
+
var(--sys-typescale-label-size) / var(--sys-typescale-label-line-height)
|
|
713
|
+
var(--default-font-family);
|
|
711
714
|
--sys-typescale-monospace-regular: var(--ref-typeface-weight-regular)
|
|
712
715
|
var(--sys-typescale-monospace-size) /
|
|
713
716
|
var(--sys-typescale-monospace-line-height) var(--monospace-font-family);
|
|
@@ -724,6 +727,7 @@
|
|
|
724
727
|
--sys-typescale-body3-size: 13px;
|
|
725
728
|
--sys-typescale-body4-size: 12px;
|
|
726
729
|
--sys-typescale-body5-size: 11px;
|
|
730
|
+
--sys-typescale-label-size: 9px;
|
|
727
731
|
--sys-typescale-monospace-size: 11px;
|
|
728
732
|
--sys-typescale-headline1-line-height: 32px;
|
|
729
733
|
--sys-typescale-headline2-line-height: 24px;
|
|
@@ -735,6 +739,7 @@
|
|
|
735
739
|
--sys-typescale-body3-line-height: 20px;
|
|
736
740
|
--sys-typescale-body4-line-height: 16px;
|
|
737
741
|
--sys-typescale-body5-line-height: 16px;
|
|
742
|
+
--sys-typescale-label-line-height: 9px;
|
|
738
743
|
--sys-typescale-monospace-line-height: 1.2;
|
|
739
744
|
|
|
740
745
|
/* Typography end */
|
|
@@ -275,7 +275,7 @@ export class ScopeVariableAnalysis {
|
|
|
275
275
|
mappingLocationsForFunctionDeclaration(node, this.#sourceText));
|
|
276
276
|
this.#addVariable('this', node.start, DefinitionKind.FIXED);
|
|
277
277
|
this.#addVariable('arguments', node.start, DefinitionKind.FIXED);
|
|
278
|
-
node.params.forEach(this.#processNodeAsDefinition.bind(this, DefinitionKind.
|
|
278
|
+
node.params.forEach(this.#processNodeAsDefinition.bind(this, DefinitionKind.VAR, false));
|
|
279
279
|
// Process the body of the block statement directly to avoid creating new scope.
|
|
280
280
|
node.body.body.forEach(this.#processNode.bind(this));
|
|
281
281
|
this.#popScope(true);
|
|
@@ -288,7 +288,7 @@ export class ScopeVariableAnalysis {
|
|
|
288
288
|
this.#methodName = undefined;
|
|
289
289
|
this.#addVariable('this', node.start, DefinitionKind.FIXED);
|
|
290
290
|
this.#addVariable('arguments', node.start, DefinitionKind.FIXED);
|
|
291
|
-
node.params.forEach(this.#processNodeAsDefinition.bind(this, DefinitionKind.
|
|
291
|
+
node.params.forEach(this.#processNodeAsDefinition.bind(this, DefinitionKind.VAR, false));
|
|
292
292
|
// Process the body of the block statement directly to avoid creating new scope.
|
|
293
293
|
node.body.body.forEach(this.#processNode.bind(this));
|
|
294
294
|
this.#popScope(true);
|
|
@@ -204,7 +204,7 @@ inspectorBackend.registerType("BluetoothEmulation.CharacteristicProperties", [{"
|
|
|
204
204
|
|
|
205
205
|
// Browser.
|
|
206
206
|
inspectorBackend.registerEnum("Browser.WindowState", {Normal: "normal", Minimized: "minimized", Maximized: "maximized", Fullscreen: "fullscreen"});
|
|
207
|
-
inspectorBackend.registerEnum("Browser.PermissionType", {Ar: "ar", AudioCapture: "audioCapture", AutomaticFullscreen: "automaticFullscreen", BackgroundFetch: "backgroundFetch", BackgroundSync: "backgroundSync", CameraPanTiltZoom: "cameraPanTiltZoom", CapturedSurfaceControl: "capturedSurfaceControl", ClipboardReadWrite: "clipboardReadWrite", ClipboardSanitizedWrite: "clipboardSanitizedWrite", DisplayCapture: "displayCapture", DurableStorage: "durableStorage", Geolocation: "geolocation", HandTracking: "handTracking", IdleDetection: "idleDetection", KeyboardLock: "keyboardLock", LocalFonts: "localFonts", LocalNetwork: "localNetwork", LocalNetworkAccess: "localNetworkAccess", LoopbackNetwork: "loopbackNetwork", Midi: "midi", MidiSysex: "midiSysex", Nfc: "nfc", Notifications: "notifications", PaymentHandler: "paymentHandler", PeriodicBackgroundSync: "periodicBackgroundSync", PointerLock: "pointerLock", ProtectedMediaIdentifier: "protectedMediaIdentifier", Sensors: "sensors", SmartCard: "smartCard", SpeakerSelection: "speakerSelection", StorageAccess: "storageAccess",
|
|
207
|
+
inspectorBackend.registerEnum("Browser.PermissionType", {Ar: "ar", AudioCapture: "audioCapture", AutomaticFullscreen: "automaticFullscreen", BackgroundFetch: "backgroundFetch", BackgroundSync: "backgroundSync", CameraPanTiltZoom: "cameraPanTiltZoom", CapturedSurfaceControl: "capturedSurfaceControl", ClipboardReadWrite: "clipboardReadWrite", ClipboardSanitizedWrite: "clipboardSanitizedWrite", DisplayCapture: "displayCapture", DurableStorage: "durableStorage", Geolocation: "geolocation", HandTracking: "handTracking", IdleDetection: "idleDetection", KeyboardLock: "keyboardLock", LocalFonts: "localFonts", LocalNetwork: "localNetwork", LocalNetworkAccess: "localNetworkAccess", LoopbackNetwork: "loopbackNetwork", Midi: "midi", MidiSysex: "midiSysex", Nfc: "nfc", Notifications: "notifications", PaymentHandler: "paymentHandler", PeriodicBackgroundSync: "periodicBackgroundSync", PointerLock: "pointerLock", ProtectedMediaIdentifier: "protectedMediaIdentifier", Sensors: "sensors", SmartCard: "smartCard", SpeakerSelection: "speakerSelection", StorageAccess: "storageAccess", VideoCapture: "videoCapture", Vr: "vr", WakeLockScreen: "wakeLockScreen", WakeLockSystem: "wakeLockSystem", WebAppInstallation: "webAppInstallation", WebPrinting: "webPrinting", WindowManagement: "windowManagement"});
|
|
208
208
|
inspectorBackend.registerEnum("Browser.PermissionSetting", {Granted: "granted", Denied: "denied", Prompt: "prompt"});
|
|
209
209
|
inspectorBackend.registerEnum("Browser.BrowserCommandId", {OpenTabSearch: "openTabSearch", CloseTabSearch: "closeTabSearch", OpenGlic: "openGlic"});
|
|
210
210
|
inspectorBackend.registerEvent("Browser.downloadWillBegin", ["frameId", "guid", "url", "suggestedFilename"]);
|
|
@@ -1059,7 +1059,7 @@ inspectorBackend.registerEnum("Page.AdFrameExplanation", {ParentIsAd: "ParentIsA
|
|
|
1059
1059
|
inspectorBackend.registerEnum("Page.SecureContextType", {Secure: "Secure", SecureLocalhost: "SecureLocalhost", InsecureScheme: "InsecureScheme", InsecureAncestor: "InsecureAncestor"});
|
|
1060
1060
|
inspectorBackend.registerEnum("Page.CrossOriginIsolatedContextType", {Isolated: "Isolated", NotIsolated: "NotIsolated", NotIsolatedFeatureDisabled: "NotIsolatedFeatureDisabled"});
|
|
1061
1061
|
inspectorBackend.registerEnum("Page.GatedAPIFeatures", {SharedArrayBuffers: "SharedArrayBuffers", SharedArrayBuffersTransferAllowed: "SharedArrayBuffersTransferAllowed", PerformanceMeasureMemory: "PerformanceMeasureMemory", PerformanceProfile: "PerformanceProfile"});
|
|
1062
|
-
inspectorBackend.registerEnum("Page.PermissionsPolicyFeature", {Accelerometer: "accelerometer", AllScreensCapture: "all-screens-capture", AmbientLightSensor: "ambient-light-sensor", AriaNotify: "aria-notify", Autofill: "autofill", Autoplay: "autoplay", Bluetooth: "bluetooth",
|
|
1062
|
+
inspectorBackend.registerEnum("Page.PermissionsPolicyFeature", {Accelerometer: "accelerometer", AllScreensCapture: "all-screens-capture", AmbientLightSensor: "ambient-light-sensor", AriaNotify: "aria-notify", Autofill: "autofill", Autoplay: "autoplay", Bluetooth: "bluetooth", Camera: "camera", CapturedSurfaceControl: "captured-surface-control", ChDpr: "ch-dpr", ChDeviceMemory: "ch-device-memory", ChDownlink: "ch-downlink", ChEct: "ch-ect", ChPrefersColorScheme: "ch-prefers-color-scheme", ChPrefersReducedMotion: "ch-prefers-reduced-motion", ChPrefersReducedTransparency: "ch-prefers-reduced-transparency", ChRtt: "ch-rtt", ChSaveData: "ch-save-data", ChUa: "ch-ua", ChUaArch: "ch-ua-arch", ChUaBitness: "ch-ua-bitness", ChUaHighEntropyValues: "ch-ua-high-entropy-values", ChUaPlatform: "ch-ua-platform", ChUaModel: "ch-ua-model", ChUaMobile: "ch-ua-mobile", ChUaFormFactors: "ch-ua-form-factors", ChUaFullVersion: "ch-ua-full-version", ChUaFullVersionList: "ch-ua-full-version-list", ChUaPlatformVersion: "ch-ua-platform-version", ChUaWow64: "ch-ua-wow64", ChViewportHeight: "ch-viewport-height", ChViewportWidth: "ch-viewport-width", ChWidth: "ch-width", ClipboardRead: "clipboard-read", ClipboardWrite: "clipboard-write", ComputePressure: "compute-pressure", ControlledFrame: "controlled-frame", CrossOriginIsolated: "cross-origin-isolated", DeferredFetch: "deferred-fetch", DeferredFetchMinimal: "deferred-fetch-minimal", DeviceAttributes: "device-attributes", DigitalCredentialsCreate: "digital-credentials-create", DigitalCredentialsGet: "digital-credentials-get", DirectSockets: "direct-sockets", DirectSocketsMulticast: "direct-sockets-multicast", DisplayCapture: "display-capture", DocumentDomain: "document-domain", EncryptedMedia: "encrypted-media", ExecutionWhileOutOfViewport: "execution-while-out-of-viewport", ExecutionWhileNotRendered: "execution-while-not-rendered", FocusWithoutUserActivation: "focus-without-user-activation", Fullscreen: "fullscreen", Frobulate: "frobulate", Gamepad: "gamepad", Geolocation: "geolocation", Gyroscope: "gyroscope", Haptics: "haptics", Hid: "hid", IdentityCredentialsGet: "identity-credentials-get", IdleDetection: "idle-detection", KeyboardMap: "keyboard-map", LanguageDetector: "language-detector", LanguageModel: "language-model", LocalFonts: "local-fonts", LocalNetwork: "local-network", LocalNetworkAccess: "local-network-access", LoopbackNetwork: "loopback-network", Magnetometer: "magnetometer", ManualText: "manual-text", MediaPlaybackWhileNotVisible: "media-playback-while-not-visible", Microphone: "microphone", Midi: "midi", OnDeviceSpeechRecognition: "on-device-speech-recognition", OtpCredentials: "otp-credentials", Payment: "payment", PictureInPicture: "picture-in-picture", PrivateStateTokenIssuance: "private-state-token-issuance", PrivateStateTokenRedemption: "private-state-token-redemption", PublickeyCredentialsCreate: "publickey-credentials-create", PublickeyCredentialsGet: "publickey-credentials-get", PublickeyCredentialsRemoteClientDataJson: "publickey-credentials-remote-client-data-json", Rewriter: "rewriter", ScreenWakeLock: "screen-wake-lock", Serial: "serial", SmartCard: "smart-card", SpeakerSelection: "speaker-selection", StorageAccess: "storage-access", SubApps: "sub-apps", Summarizer: "summarizer", SyncXhr: "sync-xhr", Tools: "tools", Translator: "translator", UnboundedElement: "unbounded-element", Unload: "unload", Usb: "usb", UsbUnrestricted: "usb-unrestricted", VerticalScroll: "vertical-scroll", WebAppInstallation: "web-app-installation", Webnn: "webnn", WebPrinting: "web-printing", WebShare: "web-share", WindowManagement: "window-management", Writer: "writer", XrSpatialTracking: "xr-spatial-tracking"});
|
|
1063
1063
|
inspectorBackend.registerEnum("Page.PermissionsPolicyBlockReason", {Header: "Header", IframeAttribute: "IframeAttribute", InFencedFrameTree: "InFencedFrameTree", InIsolatedApp: "InIsolatedApp"});
|
|
1064
1064
|
inspectorBackend.registerEnum("Page.OriginTrialTokenStatus", {Success: "Success", NotSupported: "NotSupported", Insecure: "Insecure", Expired: "Expired", WrongOrigin: "WrongOrigin", InvalidSignature: "InvalidSignature", Malformed: "Malformed", WrongVersion: "WrongVersion", FeatureDisabled: "FeatureDisabled", TokenDisabled: "TokenDisabled", FeatureDisabledForUser: "FeatureDisabledForUser", UnknownTrial: "UnknownTrial"});
|
|
1065
1065
|
inspectorBackend.registerEnum("Page.OriginTrialStatus", {Enabled: "Enabled", ValidTokenNotProvided: "ValidTokenNotProvided", OSNotSupported: "OSNotSupported", TrialNotAllowed: "TrialNotAllowed"});
|
|
@@ -1512,15 +1512,15 @@ inspectorBackend.registerType("WebAuthn.Credential", [{"name": "credentialId", "
|
|
|
1512
1512
|
inspectorBackend.registerEnum("WebMCP.InvocationStatus", {Completed: "Completed", Canceled: "Canceled", Error: "Error"});
|
|
1513
1513
|
inspectorBackend.registerEvent("WebMCP.toolsAdded", ["tools"]);
|
|
1514
1514
|
inspectorBackend.registerEvent("WebMCP.toolsRemoved", ["tools"]);
|
|
1515
|
-
inspectorBackend.registerEvent("WebMCP.toolInvoked", ["
|
|
1515
|
+
inspectorBackend.registerEvent("WebMCP.toolInvoked", ["frameId", "invocationId", "input", "toolName", "toolId"]);
|
|
1516
1516
|
inspectorBackend.registerEvent("WebMCP.toolResponded", ["invocationId", "status", "output", "errorText", "exception"]);
|
|
1517
1517
|
inspectorBackend.registerCommand("WebMCP.enable", [], [], "Enables the WebMCP domain, allowing events to be sent. Enabling the domain will trigger a toolsAdded event for all currently registered tools.");
|
|
1518
1518
|
inspectorBackend.registerCommand("WebMCP.disable", [], [], "Disables the WebMCP domain.");
|
|
1519
1519
|
inspectorBackend.registerCommand("WebMCP.invokeTool", [{"name": "frameId", "type": "string", "optional": false, "description": "Frame in which to invoke the tool.", "typeRef": "Page.FrameId"}, {"name": "toolName", "type": "string", "optional": false, "description": "Name of the tool to invoke.", "typeRef": null}, {"name": "input", "type": "object", "optional": false, "description": "Input parameters for the tool, matching the tool's inputSchema.", "typeRef": null}], ["invocationId"], "Invokes a registered tool.");
|
|
1520
1520
|
inspectorBackend.registerCommand("WebMCP.cancelInvocation", [{"name": "invocationId", "type": "string", "optional": false, "description": "Invocation identifier to cancel.", "typeRef": null}], [], "Cancels a pending tool invocation.");
|
|
1521
1521
|
inspectorBackend.registerType("WebMCP.Annotation", [{"name": "readOnly", "type": "boolean", "optional": true, "description": "A hint indicating that the tool does not modify any state.", "typeRef": null}, {"name": "untrustedContent", "type": "boolean", "optional": true, "description": "A hint indicating that the tool output may contain untrusted content, ex: UGC, 3rd party data.", "typeRef": null}, {"name": "consequential", "type": "boolean", "optional": true, "description": "A hint indicating that executing the tool will result in consequential actions, ex: booking a flight, transferring money.", "typeRef": null}, {"name": "debugging", "type": "boolean", "optional": true, "description": "If true, indicates that the tool is intended for debugging and developer tooling rather than end-user interactions.", "typeRef": null}, {"name": "autosubmit", "type": "boolean", "optional": true, "description": "If the declarative tool was declared with the autosubmit attribute.", "typeRef": null}]);
|
|
1522
|
-
inspectorBackend.registerType("WebMCP.Tool", [{"name": "name", "type": "string", "optional": false, "description": "Tool name.", "typeRef": null}, {"name": "description", "type": "string", "optional": false, "description": "Tool description.", "typeRef": null}, {"name": "inputSchema", "type": "object", "optional": true, "description": "Schema for the tool's input parameters.", "typeRef": null}, {"name": "annotations", "type": "object", "optional": true, "description": "Optional annotations for the tool.", "typeRef": "WebMCP.Annotation"}, {"name": "frameId", "type": "string", "optional": false, "description": "Frame identifier associated with the tool registration.", "typeRef": "Page.FrameId"}, {"name": "backendNodeId", "type": "number", "optional": true, "description": "Optional node ID for declarative tools.", "typeRef": "DOM.BackendNodeId"}, {"name": "stackTrace", "type": "object", "optional": true, "description": "The stack trace at the time of the registration.", "typeRef": "Runtime.StackTrace"}]);
|
|
1523
|
-
inspectorBackend.registerType("WebMCP.RemovedTool", [{"name": "name", "type": "string", "optional": false, "description": "Tool name.", "typeRef": null}, {"name": "frameId", "type": "string", "optional": false, "description": "Frame identifier associated with the tool registration.", "typeRef": "Page.FrameId"}]);
|
|
1522
|
+
inspectorBackend.registerType("WebMCP.Tool", [{"name": "toolId", "type": "string", "optional": false, "description": "Tool identifier.", "typeRef": "WebMCP.ToolId"}, {"name": "name", "type": "string", "optional": false, "description": "Tool name.", "typeRef": null}, {"name": "description", "type": "string", "optional": false, "description": "Tool description.", "typeRef": null}, {"name": "inputSchema", "type": "object", "optional": true, "description": "Schema for the tool's input parameters.", "typeRef": null}, {"name": "outputSchema", "type": "object", "optional": true, "description": "Schema for the tool's output structure.", "typeRef": null}, {"name": "annotations", "type": "object", "optional": true, "description": "Optional annotations for the tool.", "typeRef": "WebMCP.Annotation"}, {"name": "frameId", "type": "string", "optional": false, "description": "Frame identifier associated with the tool registration.", "typeRef": "Page.FrameId"}, {"name": "backendNodeId", "type": "number", "optional": true, "description": "Optional node ID for declarative tools.", "typeRef": "DOM.BackendNodeId"}, {"name": "stackTrace", "type": "object", "optional": true, "description": "The stack trace at the time of the registration.", "typeRef": "Runtime.StackTrace"}]);
|
|
1523
|
+
inspectorBackend.registerType("WebMCP.RemovedTool", [{"name": "toolId", "type": "string", "optional": false, "description": "Identifier of the removed tool.", "typeRef": "WebMCP.ToolId"}, {"name": "name", "type": "string", "optional": false, "description": "Tool name.", "typeRef": null}, {"name": "frameId", "type": "string", "optional": false, "description": "Frame identifier associated with the tool registration.", "typeRef": "Page.FrameId"}]);
|
|
1524
1524
|
|
|
1525
1525
|
// Debugger.
|
|
1526
1526
|
inspectorBackend.registerEnum("Debugger.ScopeType", {Global: "global", Local: "local", With: "with", Closure: "closure", Catch: "catch", Block: "block", Script: "script", Eval: "eval", Module: "module", WasmExpressionStack: "wasm-expression-stack"});
|
|
@@ -4214,9 +4214,9 @@ export const generatedProperties: CSSProperty[] = [
|
|
|
4214
4214
|
"thin"
|
|
4215
4215
|
],
|
|
4216
4216
|
"longhands": [
|
|
4217
|
-
"outline-
|
|
4217
|
+
"outline-width",
|
|
4218
4218
|
"outline-style",
|
|
4219
|
-
"outline-
|
|
4219
|
+
"outline-color"
|
|
4220
4220
|
],
|
|
4221
4221
|
"name": "outline"
|
|
4222
4222
|
},
|
|
@@ -4732,6 +4732,9 @@ export const generatedProperties: CSSProperty[] = [
|
|
|
4732
4732
|
"grid-rows",
|
|
4733
4733
|
"grid-columns",
|
|
4734
4734
|
"grid-order",
|
|
4735
|
+
"grid-lanes-flow",
|
|
4736
|
+
"grid-lanes-track",
|
|
4737
|
+
"grid-lanes-order",
|
|
4735
4738
|
"source-order"
|
|
4736
4739
|
],
|
|
4737
4740
|
"name": "reading-flow"
|
|
@@ -8587,6 +8590,9 @@ export const generatedPropertyValues: Record<string, CSSPropertyValue> = {
|
|
|
8587
8590
|
"grid-rows",
|
|
8588
8591
|
"grid-columns",
|
|
8589
8592
|
"grid-order",
|
|
8593
|
+
"grid-lanes-flow",
|
|
8594
|
+
"grid-lanes-track",
|
|
8595
|
+
"grid-lanes-order",
|
|
8590
8596
|
"source-order"
|
|
8591
8597
|
]
|
|
8592
8598
|
},
|
|
@@ -2465,7 +2465,6 @@ export namespace Browser {
|
|
|
2465
2465
|
SmartCard = 'smartCard',
|
|
2466
2466
|
SpeakerSelection = 'speakerSelection',
|
|
2467
2467
|
StorageAccess = 'storageAccess',
|
|
2468
|
-
TopLevelStorageAccess = 'topLevelStorageAccess',
|
|
2469
2468
|
VideoCapture = 'videoCapture',
|
|
2470
2469
|
Vr = 'vr',
|
|
2471
2470
|
WakeLockScreen = 'wakeLockScreen',
|
|
@@ -14780,7 +14779,6 @@ export namespace Page {
|
|
|
14780
14779
|
Autofill = 'autofill',
|
|
14781
14780
|
Autoplay = 'autoplay',
|
|
14782
14781
|
Bluetooth = 'bluetooth',
|
|
14783
|
-
BrowsingTopics = 'browsing-topics',
|
|
14784
14782
|
Camera = 'camera',
|
|
14785
14783
|
CapturedSurfaceControl = 'captured-surface-control',
|
|
14786
14784
|
ChDpr = 'ch-dpr',
|
|
@@ -14834,7 +14832,6 @@ export namespace Page {
|
|
|
14834
14832
|
Hid = 'hid',
|
|
14835
14833
|
IdentityCredentialsGet = 'identity-credentials-get',
|
|
14836
14834
|
IdleDetection = 'idle-detection',
|
|
14837
|
-
InterestCohort = 'interest-cohort',
|
|
14838
14835
|
KeyboardMap = 'keyboard-map',
|
|
14839
14836
|
LanguageDetector = 'language-detector',
|
|
14840
14837
|
LanguageModel = 'language-model',
|
|
@@ -20533,10 +20530,21 @@ export namespace WebMCP {
|
|
|
20533
20530
|
Error = 'Error',
|
|
20534
20531
|
}
|
|
20535
20532
|
|
|
20533
|
+
/**
|
|
20534
|
+
* Unique identifier of a registered tool. A new identifier is created every time a tool is registered, so a tool that
|
|
20535
|
+
* is unregistered and then registered again under the same name gets a different identifier. Clients should treat it
|
|
20536
|
+
* as an opaque string.
|
|
20537
|
+
*/
|
|
20538
|
+
export type ToolId = OpaqueIdentifier<string, 'Protocol.WebMCP.ToolId'>;
|
|
20539
|
+
|
|
20536
20540
|
/**
|
|
20537
20541
|
* Definition of a tool that can be invoked.
|
|
20538
20542
|
*/
|
|
20539
20543
|
export interface Tool {
|
|
20544
|
+
/**
|
|
20545
|
+
* Tool identifier.
|
|
20546
|
+
*/
|
|
20547
|
+
toolId: ToolId;
|
|
20540
20548
|
/**
|
|
20541
20549
|
* Tool name.
|
|
20542
20550
|
*/
|
|
@@ -20549,6 +20557,10 @@ export namespace WebMCP {
|
|
|
20549
20557
|
* Schema for the tool's input parameters.
|
|
20550
20558
|
*/
|
|
20551
20559
|
inputSchema?: any;
|
|
20560
|
+
/**
|
|
20561
|
+
* Schema for the tool's output structure.
|
|
20562
|
+
*/
|
|
20563
|
+
outputSchema?: any;
|
|
20552
20564
|
/**
|
|
20553
20565
|
* Optional annotations for the tool.
|
|
20554
20566
|
*/
|
|
@@ -20571,6 +20583,10 @@ export namespace WebMCP {
|
|
|
20571
20583
|
* Definition of a tool that was removed.
|
|
20572
20584
|
*/
|
|
20573
20585
|
export interface RemovedTool {
|
|
20586
|
+
/**
|
|
20587
|
+
* Identifier of the removed tool.
|
|
20588
|
+
*/
|
|
20589
|
+
toolId: ToolId;
|
|
20574
20590
|
/**
|
|
20575
20591
|
* Tool name.
|
|
20576
20592
|
*/
|
|
@@ -20634,10 +20650,6 @@ export namespace WebMCP {
|
|
|
20634
20650
|
* Event fired when a tool invocation starts.
|
|
20635
20651
|
*/
|
|
20636
20652
|
export interface ToolInvokedEvent {
|
|
20637
|
-
/**
|
|
20638
|
-
* Name of the tool to invoke.
|
|
20639
|
-
*/
|
|
20640
|
-
toolName: string;
|
|
20641
20653
|
/**
|
|
20642
20654
|
* Frame id
|
|
20643
20655
|
*/
|
|
@@ -20650,6 +20662,16 @@ export namespace WebMCP {
|
|
|
20650
20662
|
* The input parameters used for the invocation.
|
|
20651
20663
|
*/
|
|
20652
20664
|
input: string;
|
|
20665
|
+
/**
|
|
20666
|
+
* Name of the tool to invoke. Missing if the tool was invoked by its identifier, but could not be found (e.g.,
|
|
20667
|
+
* it was already unregistered), so its name could not be recovered.
|
|
20668
|
+
*/
|
|
20669
|
+
toolName?: string;
|
|
20670
|
+
/**
|
|
20671
|
+
* Identifier of the tool to invoke. Missing if the tool was invoked by name, but could not be found, so its
|
|
20672
|
+
* identifier could not be recovered.
|
|
20673
|
+
*/
|
|
20674
|
+
toolId?: ToolId;
|
|
20653
20675
|
}
|
|
20654
20676
|
|
|
20655
20677
|
/**
|
|
@@ -3,23 +3,86 @@
|
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
|
-
* @file Local debugging utilities.
|
|
6
|
+
* @file Local debugging utilities for DevTools AI subsystems.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
import * as Platform from '../../core/platform/platform.js';
|
|
10
|
+
|
|
11
|
+
export const DEVTOOLS_AI_DEBUG_STORAGE_KEY = 'devToolsAiDebug';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Configuration options for enabling DevTools AI debug logging in the console.
|
|
15
|
+
* Passed to `window.setDevToolsAIDebug(config)` and persisted in `localStorage`.
|
|
16
|
+
*/
|
|
17
|
+
export interface DevToolsAIDebugConfig {
|
|
18
|
+
/**
|
|
19
|
+
* Enables console debug logging and structured log persistence for DevTools AI
|
|
20
|
+
* Assistance (`AiAgent`, `AiAgent2`, `AiUtils`, and `panels/ai_assistance/`).
|
|
21
|
+
*/
|
|
22
|
+
assistance?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Enables console debug logging for the AIDA and GCA host client and
|
|
25
|
+
* request/response translation layer (`AidaClient`, `GcaClient`, and
|
|
26
|
+
* `AidaGcaTranslation`).
|
|
27
|
+
*/
|
|
28
|
+
gca?: boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Enables console debug logging for AI Code Completion and AI Code Generation
|
|
31
|
+
* (`AiCodeCompletion` and `AiCodeGeneration`), replacing the separate
|
|
32
|
+
* `debug.ts` helpers in `models/ai_code_completion/` and
|
|
33
|
+
* `models/ai_code_generation/`.
|
|
34
|
+
*/
|
|
35
|
+
codeGenComplete?: boolean;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Reads the persisted DevTools AI debug configuration from `localStorage`.
|
|
40
|
+
*/
|
|
41
|
+
export function getDevToolsAIDebugConfig(): Required<DevToolsAIDebugConfig> {
|
|
10
42
|
try {
|
|
11
|
-
|
|
43
|
+
const raw = Platform.HostRuntime.HOST_RUNTIME.getLocalStorage()?.getItem(DEVTOOLS_AI_DEBUG_STORAGE_KEY);
|
|
44
|
+
if (!raw) {
|
|
45
|
+
return {assistance: false, gca: false, codeGenComplete: false};
|
|
46
|
+
}
|
|
47
|
+
const parsed: unknown = JSON.parse(raw);
|
|
48
|
+
if (typeof parsed !== 'object' || parsed === null) {
|
|
49
|
+
return {assistance: false, gca: false, codeGenComplete: false};
|
|
50
|
+
}
|
|
51
|
+
const record = parsed as Record<string, unknown>;
|
|
52
|
+
return {
|
|
53
|
+
assistance: Boolean(record.assistance),
|
|
54
|
+
gca: Boolean(record.gca),
|
|
55
|
+
codeGenComplete: Boolean(record.codeGenComplete),
|
|
56
|
+
};
|
|
12
57
|
} catch {
|
|
13
|
-
return false;
|
|
58
|
+
return {assistance: false, gca: false, codeGenComplete: false};
|
|
14
59
|
}
|
|
15
60
|
}
|
|
16
61
|
|
|
17
|
-
|
|
62
|
+
/**
|
|
63
|
+
* Merges `config` into the persisted `devToolsAiDebug` object in `localStorage`
|
|
64
|
+
* and logs the resulting state to the console.
|
|
65
|
+
*/
|
|
66
|
+
export function setDevToolsAIDebug(config: DevToolsAIDebugConfig = {}): Required<DevToolsAIDebugConfig> {
|
|
67
|
+
const current = getDevToolsAIDebugConfig();
|
|
68
|
+
const nextConfig: Required<DevToolsAIDebugConfig> = {
|
|
69
|
+
assistance: config.assistance ?? current.assistance,
|
|
70
|
+
gca: config.gca ?? current.gca,
|
|
71
|
+
codeGenComplete: config.codeGenComplete ?? current.codeGenComplete,
|
|
72
|
+
};
|
|
73
|
+
const storage = Platform.HostRuntime.HOST_RUNTIME.getLocalStorage();
|
|
18
74
|
try {
|
|
19
|
-
|
|
75
|
+
storage?.setItem(DEVTOOLS_AI_DEBUG_STORAGE_KEY, JSON.stringify(nextConfig));
|
|
20
76
|
} catch {
|
|
21
|
-
|
|
77
|
+
// Ignore storage write errors in restricted contexts.
|
|
22
78
|
}
|
|
79
|
+
// eslint-disable-next-line no-console
|
|
80
|
+
console.log('DevTools AI debug config:', nextConfig);
|
|
81
|
+
return nextConfig;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function isDebugMode(): boolean {
|
|
85
|
+
return getDevToolsAIDebugConfig().assistance;
|
|
23
86
|
}
|
|
24
87
|
|
|
25
88
|
export function debugLog(...log: unknown[]): void {
|
|
@@ -31,23 +94,65 @@ export function debugLog(...log: unknown[]): void {
|
|
|
31
94
|
console.log(...log);
|
|
32
95
|
}
|
|
33
96
|
|
|
34
|
-
function
|
|
35
|
-
|
|
36
|
-
localStorage.setItem('debugAiAssistancePanelEnabled', 'true');
|
|
37
|
-
} else {
|
|
38
|
-
localStorage.removeItem('debugAiAssistancePanelEnabled');
|
|
39
|
-
}
|
|
40
|
-
setAiAssistanceStructuredLogEnabled(enabled);
|
|
97
|
+
export function isCodeGenCompleteDebugMode(): boolean {
|
|
98
|
+
return getDevToolsAIDebugConfig().codeGenComplete;
|
|
41
99
|
}
|
|
42
|
-
// @ts-expect-error
|
|
43
|
-
globalThis.setDebugAiAssistanceEnabled = setDebugAiAssistanceEnabled;
|
|
44
100
|
|
|
45
|
-
function
|
|
46
|
-
if (
|
|
47
|
-
|
|
48
|
-
} else {
|
|
49
|
-
localStorage.removeItem('aiAssistanceStructuredLogEnabled');
|
|
101
|
+
export function debugCodeGenCompleteLog(...log: unknown[]): void {
|
|
102
|
+
if (!isCodeGenCompleteDebugMode()) {
|
|
103
|
+
return;
|
|
50
104
|
}
|
|
105
|
+
|
|
106
|
+
// eslint-disable-next-line no-console
|
|
107
|
+
console.log(...log);
|
|
51
108
|
}
|
|
52
|
-
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* @deprecated Use `setDevToolsAIDebug({assistance: enabled, gca: enabled})` instead.
|
|
112
|
+
*/
|
|
113
|
+
export function setDebugAiAssistanceEnabled(enabled: boolean): void {
|
|
114
|
+
console.warn('setDebugAiAssistanceEnabled is deprecated and will be removed soon. ' +
|
|
115
|
+
`Use setDevToolsAIDebug({assistance: ${Boolean(enabled)}, gca: ${Boolean(enabled)}}) instead.`);
|
|
116
|
+
setDevToolsAIDebug({assistance: Boolean(enabled), gca: Boolean(enabled)});
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
/**
|
|
120
|
+
* @deprecated Use `setDevToolsAIDebug({assistance: enabled})` instead.
|
|
121
|
+
*/
|
|
122
|
+
export function setAiAssistanceStructuredLogEnabled(enabled: boolean): void {
|
|
123
|
+
console.warn('setAiAssistanceStructuredLogEnabled is deprecated and will be removed soon. ' +
|
|
124
|
+
`Use setDevToolsAIDebug({assistance: ${Boolean(enabled)}}) instead.`);
|
|
125
|
+
setDevToolsAIDebug({assistance: Boolean(enabled)});
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* @deprecated Use `setDevToolsAIDebug({codeGenComplete: enabled})` instead.
|
|
130
|
+
*/
|
|
131
|
+
export function setDebugAiCodeCompletionEnabled(enabled: boolean): void {
|
|
132
|
+
console.warn('setDebugAiCodeCompletionEnabled is deprecated and will be removed soon. ' +
|
|
133
|
+
`Use setDevToolsAIDebug({codeGenComplete: ${Boolean(enabled)}}) instead.`);
|
|
134
|
+
setDevToolsAIDebug({codeGenComplete: Boolean(enabled)});
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/**
|
|
138
|
+
* @deprecated Use `setDevToolsAIDebug({codeGenComplete: enabled})` instead.
|
|
139
|
+
*/
|
|
140
|
+
export function setDebugAiCodeGenerationEnabled(enabled: boolean): void {
|
|
141
|
+
console.warn('setDebugAiCodeGenerationEnabled is deprecated and will be removed soon. ' +
|
|
142
|
+
`Use setDevToolsAIDebug({codeGenComplete: ${Boolean(enabled)}}) instead.`);
|
|
143
|
+
setDevToolsAIDebug({codeGenComplete: Boolean(enabled)});
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
declare global {
|
|
147
|
+
var setDevToolsAIDebug: (config?: DevToolsAIDebugConfig) => Required<DevToolsAIDebugConfig>;
|
|
148
|
+
var setDebugAiAssistanceEnabled: (enabled: boolean) => void;
|
|
149
|
+
var setAiAssistanceStructuredLogEnabled: (enabled: boolean) => void;
|
|
150
|
+
var setDebugAiCodeCompletionEnabled: (enabled: boolean) => void;
|
|
151
|
+
var setDebugAiCodeGenerationEnabled: (enabled: boolean) => void;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
globalThis.setDevToolsAIDebug = setDevToolsAIDebug;
|
|
155
|
+
globalThis.setDebugAiAssistanceEnabled = setDebugAiAssistanceEnabled;
|
|
53
156
|
globalThis.setAiAssistanceStructuredLogEnabled = setAiAssistanceStructuredLogEnabled;
|
|
157
|
+
globalThis.setDebugAiCodeCompletionEnabled = setDebugAiCodeCompletionEnabled;
|
|
158
|
+
globalThis.setDebugAiCodeGenerationEnabled = setDebugAiCodeGenerationEnabled;
|