chrome-devtools-frontend 1.0.1650035 → 1.0.1650232
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/front_end/core/host/UserMetrics.ts +0 -15
- package/front_end/core/sdk/CSSMetadata.ts +91 -1
- package/front_end/generated/SupportedCSSProperties.js +342 -114
- package/front_end/models/ai_assistance/AiConversation.ts +2 -1
- package/front_end/models/ai_assistance/agents/AccessibilityAgent.ts +10 -57
- package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +1 -1
- package/front_end/models/ai_assistance/agents/ExecuteJavascript.ts +13 -4
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +1 -7
- package/front_end/models/ai_assistance/ai_assistance.ts +2 -0
- package/front_end/models/ai_assistance/contexts/AccessibilityContext.snapshot.txt +26 -0
- package/front_end/models/ai_assistance/contexts/AccessibilityContext.ts +63 -0
- package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +3 -2
- package/front_end/models/stack_trace/DetailedErrorStackParser.ts +18 -0
- package/front_end/models/stack_trace/stack_trace.ts +0 -4
- package/front_end/panels/accessibility/ARIAAttributesView.ts +1 -0
- package/front_end/panels/ai_assistance/AiAssistancePanel.ts +5 -5
- package/front_end/panels/ai_assistance/components/ChatInput.ts +1 -1
- package/front_end/panels/network/RequestConditionsDrawer.ts +236 -198
- package/front_end/panels/network/requestConditionsDrawer.css +3 -0
- package/front_end/panels/whats_new/ReleaseNoteText.ts +12 -6
- package/front_end/panels/whats_new/resources/WNDT.md +8 -7
- package/front_end/third_party/third-party-web/lib/nostats-subset.js +21 -15
- package/front_end/third_party/third-party-web/package/README.md +619 -582
- package/front_end/third_party/third-party-web/package/dist/entities-httparchive-nostats.json +1 -1
- package/front_end/third_party/third-party-web/package/dist/entities-httparchive.json +1 -1
- package/front_end/third_party/third-party-web/package/dist/entities-nostats.json +1 -1
- package/front_end/third_party/third-party-web/package/dist/entities.json +1 -1
- package/front_end/third_party/third-party-web/package/lib/create-entity-finder-api.js +27 -15
- package/front_end/third_party/third-party-web/package/lib/create-entity-finder-api.test.js +14 -0
- package/front_end/third_party/third-party-web/package/lib/entities.test.js +10 -0
- package/front_end/third_party/third-party-web/package/lib/index.test.js +6 -6
- package/front_end/third_party/third-party-web/package/lib/markdown/template.md +1 -3
- package/front_end/third_party/third-party-web/package/package.json +7 -3
- package/front_end/third_party/third-party-web/package.json +1 -1
- package/front_end/ui/components/buttons/floatingButton.css +3 -3
- package/front_end/ui/components/lists/list.css +2 -0
- package/front_end/ui/legacy/ListWidget.ts +8 -5
- package/front_end/ui/legacy/TextPrompt.ts +5 -2
- package/front_end/ui/legacy/components/utils/Linkifier.ts +12 -6
- package/front_end/ui/legacy/textPrompt.css +1 -0
- package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
- package/package.json +1 -1
- package/front_end/models/stack_trace/ErrorStackParser.ts +0 -174
|
@@ -11,7 +11,7 @@ import type * as Trace from '../../models/trace/trace.js';
|
|
|
11
11
|
import * as Greendev from '../greendev/greendev.js';
|
|
12
12
|
import type * as NetworkTimeCalculator from '../network_time_calculator/network_time_calculator.js';
|
|
13
13
|
|
|
14
|
-
import {AccessibilityAgent
|
|
14
|
+
import {AccessibilityAgent} from './agents/AccessibilityAgent.js';
|
|
15
15
|
import {
|
|
16
16
|
type AgentOptions,
|
|
17
17
|
type AiAgent,
|
|
@@ -33,6 +33,7 @@ import {StylingAgent} from './agents/StylingAgent.js';
|
|
|
33
33
|
import {AiAgent2} from './AiAgent2.js';
|
|
34
34
|
import {AiHistoryStorage, ConversationType, type SerializedConversation} from './AiHistoryStorage.js';
|
|
35
35
|
import type {ChangeManager} from './ChangeManager.js';
|
|
36
|
+
import {AccessibilityContext} from './contexts/AccessibilityContext.js';
|
|
36
37
|
import {DOMNodeContext} from './contexts/DOMNodeContext.js';
|
|
37
38
|
import {FileContext} from './contexts/FileContext.js';
|
|
38
39
|
import {RequestContext} from './contexts/RequestContext.js';
|
|
@@ -19,9 +19,8 @@ import {ToolRegistry} from '../tools/ToolRegistry.js';
|
|
|
19
19
|
import {
|
|
20
20
|
AiAgent,
|
|
21
21
|
type AiWidget,
|
|
22
|
-
type ContextDetail,
|
|
23
22
|
type ContextResponse,
|
|
24
|
-
ConversationContext,
|
|
23
|
+
type ConversationContext,
|
|
25
24
|
type RequestOptions,
|
|
26
25
|
ResponseType,
|
|
27
26
|
} from './AiAgent.js';
|
|
@@ -81,31 +80,6 @@ If the user asks a question that requires an investigation of a problem, use thi
|
|
|
81
80
|
- [Suggestion 2]
|
|
82
81
|
`;
|
|
83
82
|
|
|
84
|
-
export class AccessibilityContext extends ConversationContext<LHModel.ReporterTypes.ReportJSON> {
|
|
85
|
-
#lh: LHModel.ReporterTypes.ReportJSON;
|
|
86
|
-
|
|
87
|
-
constructor(report: LHModel.ReporterTypes.ReportJSON) {
|
|
88
|
-
super();
|
|
89
|
-
this.#lh = report;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
#url(): string {
|
|
93
|
-
return this.#lh.finalUrl ?? this.#lh.finalDisplayedUrl;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
override getURL(): string {
|
|
97
|
-
return this.#url();
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
override getItem(): LHModel.ReporterTypes.ReportJSON {
|
|
101
|
-
return this.#lh;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
override getTitle(): string {
|
|
105
|
-
return `Lighthouse report: ${this.#url()}`;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
|
|
109
83
|
/**
|
|
110
84
|
* One agent instance handles one conversation. Create a new agent
|
|
111
85
|
* instance for a new conversation.
|
|
@@ -184,10 +158,13 @@ export class AccessibilityAgent extends AiAgent<LHModel.ReporterTypes.ReportJSON
|
|
|
184
158
|
return;
|
|
185
159
|
}
|
|
186
160
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
161
|
+
const details = await lhr.getUserFacingDetails();
|
|
162
|
+
if (details) {
|
|
163
|
+
yield {
|
|
164
|
+
type: ResponseType.CONTEXT,
|
|
165
|
+
details,
|
|
166
|
+
};
|
|
167
|
+
}
|
|
191
168
|
}
|
|
192
169
|
|
|
193
170
|
async #resolvePathToNode(path: string): Promise<SDK.DOMModel.DOMNode|null> {
|
|
@@ -517,38 +494,14 @@ export class AccessibilityAgent extends AiAgent<LHModel.ReporterTypes.ReportJSON
|
|
|
517
494
|
});
|
|
518
495
|
}
|
|
519
496
|
|
|
520
|
-
/**
|
|
521
|
-
* This is the initial payload we send at the start of a conversation.
|
|
522
|
-
* Because the agent is focused on Accessibility, we include the
|
|
523
|
-
* Accessibility Audits summary in the payload to avoid an extra round step of
|
|
524
|
-
* the AI querying them.
|
|
525
|
-
*/
|
|
526
|
-
#getInitialPayload(context: ConversationContext<LHModel.ReporterTypes.ReportJSON>): string {
|
|
527
|
-
const report = context.getItem();
|
|
528
|
-
const formatter = new LighthouseFormatter();
|
|
529
|
-
const summary = formatter.summary(report);
|
|
530
|
-
const audits = formatter.audits(report, 'accessibility');
|
|
531
|
-
const allFailed = Object.values(report.categories).every(category => category.score === null);
|
|
532
|
-
if (allFailed) {
|
|
533
|
-
return '**CRITICAL**: The Lighthouse report failed to record or all category scores are error/unavailable (n/a). This indicates a failed run or missing data.';
|
|
534
|
-
}
|
|
535
|
-
return `# Lighthouse Report:\n${summary}\n${audits}`;
|
|
536
|
-
}
|
|
537
|
-
|
|
538
497
|
override async enhanceQuery(query: string, lhr: ConversationContext<LHModel.ReporterTypes.ReportJSON>|null):
|
|
539
498
|
Promise<string> {
|
|
540
499
|
this.clearDeclaredFunctions();
|
|
541
500
|
if (lhr) {
|
|
542
501
|
this.#declareFunctions();
|
|
543
502
|
}
|
|
544
|
-
const
|
|
503
|
+
const promptDetails = lhr ? await lhr.getPromptDetails() : null;
|
|
504
|
+
const enhancedQuery = promptDetails ? `${promptDetails}\n# User request:\n\n` : '';
|
|
545
505
|
return `${enhancedQuery}${query}`;
|
|
546
506
|
}
|
|
547
|
-
|
|
548
|
-
#createContextDetails(lhr: ConversationContext<LHModel.ReporterTypes.ReportJSON>):
|
|
549
|
-
[ContextDetail, ...ContextDetail[]] {
|
|
550
|
-
return [
|
|
551
|
-
{title: 'Lighthouse report', text: this.#getInitialPayload(lhr)},
|
|
552
|
-
];
|
|
553
|
-
}
|
|
554
507
|
}
|
|
@@ -14,13 +14,13 @@ import * as NetworkTimeCalculator from '../../network_time_calculator/network_ti
|
|
|
14
14
|
import type * as Trace from '../../trace/trace.js';
|
|
15
15
|
import * as Workspace from '../../workspace/workspace.js';
|
|
16
16
|
import {isOpaqueOrigin} from '../AiOrigins.js';
|
|
17
|
+
import {AccessibilityContext} from '../contexts/AccessibilityContext.js';
|
|
17
18
|
import {DOMNodeContext} from '../contexts/DOMNodeContext.js';
|
|
18
19
|
import {FileContext} from '../contexts/FileContext.js';
|
|
19
20
|
import {getRequestContextOrigin, RequestContext} from '../contexts/RequestContext.js';
|
|
20
21
|
import {debugLog} from '../debug.js';
|
|
21
22
|
import {StorageItem} from '../StorageItem.js';
|
|
22
23
|
|
|
23
|
-
import {AccessibilityContext} from './AccessibilityAgent.js';
|
|
24
24
|
import {
|
|
25
25
|
type AgentOptions,
|
|
26
26
|
AiAgent,
|
|
@@ -179,7 +179,11 @@ export class JavascriptExecutor {
|
|
|
179
179
|
return error;
|
|
180
180
|
}
|
|
181
181
|
}`;
|
|
182
|
+
const timeoutSentinel = Symbol('timeout');
|
|
183
|
+
const {promise: timeoutPromise, resolve: resolveTimeout} = Promise.withResolvers<typeof timeoutSentinel>();
|
|
184
|
+
let timeoutId: ReturnType<typeof setTimeout>|undefined;
|
|
182
185
|
try {
|
|
186
|
+
timeoutId = setTimeout(() => resolveTimeout(timeoutSentinel), OBSERVATION_TIMEOUT);
|
|
183
187
|
const result = await Promise.race([
|
|
184
188
|
this.#execJs(
|
|
185
189
|
functionDeclaration,
|
|
@@ -188,11 +192,11 @@ export class JavascriptExecutor {
|
|
|
188
192
|
contextNode: this.#options.getContextNode(),
|
|
189
193
|
},
|
|
190
194
|
),
|
|
191
|
-
|
|
192
|
-
setTimeout(
|
|
193
|
-
() => reject(new Error('Script execution exceeded the maximum allowed time.')), OBSERVATION_TIMEOUT);
|
|
194
|
-
}),
|
|
195
|
+
timeoutPromise,
|
|
195
196
|
]);
|
|
197
|
+
if (result === timeoutSentinel) {
|
|
198
|
+
throw new Error('Script execution exceeded the maximum allowed time.');
|
|
199
|
+
}
|
|
196
200
|
const byteCount = Platform.StringUtilities.countWtf8Bytes(result);
|
|
197
201
|
Host.userMetrics.freestylerEvalResponseSize(byteCount);
|
|
198
202
|
if (byteCount > MAX_OBSERVATION_BYTE_LENGTH) {
|
|
@@ -217,6 +221,11 @@ export class JavascriptExecutor {
|
|
|
217
221
|
sideEffect: false,
|
|
218
222
|
canceled: false,
|
|
219
223
|
};
|
|
224
|
+
} finally {
|
|
225
|
+
if (timeoutId !== undefined) {
|
|
226
|
+
clearTimeout(timeoutId);
|
|
227
|
+
}
|
|
228
|
+
resolveTimeout(timeoutSentinel);
|
|
220
229
|
}
|
|
221
230
|
}
|
|
222
231
|
}
|
|
@@ -6,7 +6,7 @@ import * as Common from '../../../core/common/common.js';
|
|
|
6
6
|
import * as Host from '../../../core/host/host.js';
|
|
7
7
|
import * as i18n from '../../../core/i18n/i18n.js';
|
|
8
8
|
import type {UrlString} from '../../../core/platform/DevToolsPath.js';
|
|
9
|
-
import * as Platform from '../../../core/platform/platform.js';
|
|
9
|
+
import type * as Platform from '../../../core/platform/platform.js';
|
|
10
10
|
import * as Root from '../../../core/root/root.js';
|
|
11
11
|
import * as SDK from '../../../core/sdk/sdk.js';
|
|
12
12
|
import * as Tracing from '../../../services/tracing/tracing.js';
|
|
@@ -936,9 +936,6 @@ export class PerformanceAgent extends AiAgent<AgentFocus> {
|
|
|
936
936
|
};
|
|
937
937
|
}
|
|
938
938
|
|
|
939
|
-
const byteCount = Platform.StringUtilities.countWtf8Bytes(summary);
|
|
940
|
-
Host.userMetrics.performanceAIMainThreadActivityResponseSize(byteCount);
|
|
941
|
-
|
|
942
939
|
this.#cacheFunctionResult(focus, cacheKey, summary);
|
|
943
940
|
const widgets: AiWidget[] = [];
|
|
944
941
|
widgets.push({
|
|
@@ -1225,9 +1222,6 @@ export class PerformanceAgent extends AiAgent<AgentFocus> {
|
|
|
1225
1222
|
};
|
|
1226
1223
|
}
|
|
1227
1224
|
|
|
1228
|
-
const byteCount = Platform.StringUtilities.countWtf8Bytes(summary);
|
|
1229
|
-
Host.userMetrics.performanceAINetworkSummaryResponseSize(byteCount);
|
|
1230
|
-
|
|
1231
1225
|
const key = `getNetworkTrackSummary({min: ${bounds.min}, max: ${bounds.max}})`;
|
|
1232
1226
|
this.#cacheFunctionResult(focus, key, summary);
|
|
1233
1227
|
return {
|
|
@@ -22,6 +22,7 @@ import * as AiOrigins from './AiOrigins.js';
|
|
|
22
22
|
import * as AiUtils from './AiUtils.js';
|
|
23
23
|
import * as BuiltInAi from './BuiltInAi.js';
|
|
24
24
|
import * as ChangeManager from './ChangeManager.js';
|
|
25
|
+
import * as AccessibilityContext from './contexts/AccessibilityContext.js';
|
|
25
26
|
import * as DOMNodeContext from './contexts/DOMNodeContext.js';
|
|
26
27
|
import * as FileContext from './contexts/FileContext.js';
|
|
27
28
|
import * as RequestContext from './contexts/RequestContext.js';
|
|
@@ -50,6 +51,7 @@ import * as ToolRegistry from './tools/ToolRegistry.js';
|
|
|
50
51
|
|
|
51
52
|
export {
|
|
52
53
|
AccessibilityAgent,
|
|
54
|
+
AccessibilityContext,
|
|
53
55
|
AgentProject,
|
|
54
56
|
AiAgent,
|
|
55
57
|
AiAgent2,
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
Title: AccessibilityContext should return prompt details correctly
|
|
2
|
+
Content:
|
|
3
|
+
# Lighthouse Report:
|
|
4
|
+
# Lighthouse Report Summary
|
|
5
|
+
URL: https://example.com
|
|
6
|
+
Fetch Time: 2026-03-12
|
|
7
|
+
Lighthouse Version: 1.0.0
|
|
8
|
+
|
|
9
|
+
## Category Scores
|
|
10
|
+
- Accessibility: 50
|
|
11
|
+
# Audits for Accessibility
|
|
12
|
+
|
|
13
|
+
The following audits in this category have a score below 90 and may need attention:
|
|
14
|
+
- **Accessibility Audit**: 50 (Fail)
|
|
15
|
+
* Description of accessibility audit
|
|
16
|
+
=== end content
|
|
17
|
+
|
|
18
|
+
Title: AccessibilityContext should return user facing details correctly
|
|
19
|
+
Content:
|
|
20
|
+
[
|
|
21
|
+
{
|
|
22
|
+
"title": "Lighthouse report",
|
|
23
|
+
"text": "# Lighthouse Report:\n# Lighthouse Report Summary\nURL: https://example.com\nFetch Time: 2026-03-12\nLighthouse Version: 1.0.0\n\n## Category Scores\n- Accessibility: 50\n# Audits for Accessibility\n\nThe following audits in this category have a score below 90 and may need attention:\n- **Accessibility Audit**: 50 (Fail)\n * Description of accessibility audit"
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
=== end content
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// Copyright 2026 The Chromium Authors
|
|
2
|
+
// Use of this source code is governed by a BSD-style license that can be
|
|
3
|
+
// found in the LICENSE file.
|
|
4
|
+
|
|
5
|
+
import type * as LHModel from '../../lighthouse/lighthouse.js';
|
|
6
|
+
import {type ContextDetail, ConversationContext} from '../agents/AiAgent.js';
|
|
7
|
+
import {LighthouseFormatter} from '../data_formatters/LighthouseFormatter.js';
|
|
8
|
+
|
|
9
|
+
export class AccessibilityContext extends ConversationContext<LHModel.ReporterTypes.ReportJSON> {
|
|
10
|
+
readonly #lh: LHModel.ReporterTypes.ReportJSON;
|
|
11
|
+
#cachedPayload: string|null = null;
|
|
12
|
+
|
|
13
|
+
constructor(report: LHModel.ReporterTypes.ReportJSON) {
|
|
14
|
+
super();
|
|
15
|
+
this.#lh = report;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
#url(): string {
|
|
19
|
+
return this.#lh.finalUrl ?? this.#lh.finalDisplayedUrl;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
override getURL(): string {
|
|
23
|
+
return this.#url();
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
override getItem(): LHModel.ReporterTypes.ReportJSON {
|
|
27
|
+
return this.#lh;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
override getTitle(): string {
|
|
31
|
+
return `Lighthouse report: ${this.#url()}`;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
#getInitialPayload(): string {
|
|
35
|
+
if (this.#cachedPayload !== null) {
|
|
36
|
+
return this.#cachedPayload;
|
|
37
|
+
}
|
|
38
|
+
const formatter = new LighthouseFormatter();
|
|
39
|
+
const summary = formatter.summary(this.#lh);
|
|
40
|
+
const audits = formatter.audits(this.#lh, 'accessibility');
|
|
41
|
+
const allFailed = Object.values(this.#lh.categories).every(category => category.score === null);
|
|
42
|
+
if (allFailed) {
|
|
43
|
+
this.#cachedPayload =
|
|
44
|
+
'**CRITICAL**: The Lighthouse report failed to record or all category scores are error/unavailable (n/a). This indicates a failed run or missing data.';
|
|
45
|
+
} else {
|
|
46
|
+
this.#cachedPayload = `# Lighthouse Report:\n${summary}\n${audits}`;
|
|
47
|
+
}
|
|
48
|
+
return this.#cachedPayload;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
override async getPromptDetails(): Promise<string|null> {
|
|
52
|
+
return this.#getInitialPayload();
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
override async getUserFacingDetails(): Promise<[ContextDetail, ...ContextDetail[]]|null> {
|
|
56
|
+
return [
|
|
57
|
+
{
|
|
58
|
+
title: 'Lighthouse report',
|
|
59
|
+
text: this.#getInitialPayload(),
|
|
60
|
+
},
|
|
61
|
+
];
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -7,7 +7,7 @@ import * as Platform from '../../core/platform/platform.js';
|
|
|
7
7
|
import * as Root from '../../core/root/root.js';
|
|
8
8
|
import * as SDK from '../../core/sdk/sdk.js';
|
|
9
9
|
import * as Protocol from '../../generated/protocol.js';
|
|
10
|
-
import * as StackTrace from '../stack_trace/stack_trace.js';
|
|
10
|
+
import type * as StackTrace from '../stack_trace/stack_trace.js';
|
|
11
11
|
// eslint-disable-next-line @devtools/es-modules-import
|
|
12
12
|
import * as StackTraceImpl from '../stack_trace/stack_trace_impl.js';
|
|
13
13
|
import type * as TextUtils from '../text_utils/text_utils.js';
|
|
@@ -254,7 +254,8 @@ export class DebuggerWorkspaceBinding implements SDK.TargetManager.SDKModelObser
|
|
|
254
254
|
|
|
255
255
|
const issueSummary = fetchedExceptionDetails?.exceptionMetaData?.issueSummary;
|
|
256
256
|
if (typeof issueSummary === 'string') {
|
|
257
|
-
errorStack =
|
|
257
|
+
errorStack =
|
|
258
|
+
StackTraceImpl.DetailedErrorStackParser.concatErrorDescriptionAndIssueSummary(errorStack, issueSummary);
|
|
258
259
|
}
|
|
259
260
|
|
|
260
261
|
if (!stackTrace) {
|
|
@@ -212,3 +212,21 @@ export function augmentRawFramesWithScriptIds(
|
|
|
212
212
|
augmentFrame(rawFrame);
|
|
213
213
|
}
|
|
214
214
|
}
|
|
215
|
+
|
|
216
|
+
/**
|
|
217
|
+
* Combines the error description (essentially the `Error#stack` property value)
|
|
218
|
+
* with the `issueSummary`.
|
|
219
|
+
*
|
|
220
|
+
* @param description the `description` property of the `Error` remote object.
|
|
221
|
+
* @param issueSummary the optional `issueSummary` of the `exceptionMetaData`.
|
|
222
|
+
* @returns the enriched description.
|
|
223
|
+
* @see https://goo.gle/devtools-reduce-network-noise-design
|
|
224
|
+
*/
|
|
225
|
+
export function concatErrorDescriptionAndIssueSummary(description: string, issueSummary: string): string {
|
|
226
|
+
// Insert the issue summary right after the error message.
|
|
227
|
+
const pos = description.indexOf('\n');
|
|
228
|
+
const prefix = pos === -1 ? description : description.substring(0, pos);
|
|
229
|
+
const suffix = pos === -1 ? '' : description.substring(pos);
|
|
230
|
+
description = `${prefix}. ${issueSummary}${suffix}`;
|
|
231
|
+
return description;
|
|
232
|
+
}
|
|
@@ -2,12 +2,8 @@
|
|
|
2
2
|
// Use of this source code is governed by a BSD-style license that can be
|
|
3
3
|
// found in the LICENSE file.
|
|
4
4
|
|
|
5
|
-
import * as ErrorStackParser from './ErrorStackParser.js';
|
|
6
5
|
import * as StackTrace from './StackTrace.js';
|
|
7
6
|
|
|
8
7
|
export {
|
|
9
|
-
// TODO(crbug.com/485142682): Move to stack_trace_impl.js once all usage
|
|
10
|
-
// goes through createStackTraceFromErrorObject.
|
|
11
|
-
ErrorStackParser,
|
|
12
8
|
StackTrace,
|
|
13
9
|
};
|
|
@@ -79,6 +79,7 @@ export const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
79
79
|
<devtools-prompt
|
|
80
80
|
completions=completions
|
|
81
81
|
class="monospace"
|
|
82
|
+
value=${attribute.value}
|
|
82
83
|
@mousedown=${onStartEditing.bind(null, attribute)}
|
|
83
84
|
.completionTimeout=${0}
|
|
84
85
|
?editing=${input.attributeBeingEdited === attribute}
|
|
@@ -623,12 +623,12 @@ function createFileContext(file: Workspace.UISourceCode.UISourceCode|null): AiAs
|
|
|
623
623
|
return new AiAssistanceModel.FileContext.FileContext(file);
|
|
624
624
|
}
|
|
625
625
|
|
|
626
|
-
function createAccessibilityContext(report: LighthousePanel.LighthousePanel.ActiveLighthouseReport|
|
|
627
|
-
|
|
626
|
+
function createAccessibilityContext(report: LighthousePanel.LighthousePanel.ActiveLighthouseReport|
|
|
627
|
+
null): AiAssistanceModel.AccessibilityContext.AccessibilityContext|null {
|
|
628
628
|
if (!report) {
|
|
629
629
|
return null;
|
|
630
630
|
}
|
|
631
|
-
return new AiAssistanceModel.
|
|
631
|
+
return new AiAssistanceModel.AccessibilityContext.AccessibilityContext(report.report);
|
|
632
632
|
}
|
|
633
633
|
|
|
634
634
|
function createRequestContext(request: SDK.NetworkRequest.NetworkRequest|
|
|
@@ -710,7 +710,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
710
710
|
#selectedPerformanceTrace: AiAssistanceModel.PerformanceAgent.PerformanceTraceContext|null = null;
|
|
711
711
|
#selectedRequest: AiAssistanceModel.RequestContext.RequestContext|null = null;
|
|
712
712
|
|
|
713
|
-
#selectedAccessibility: AiAssistanceModel.
|
|
713
|
+
#selectedAccessibility: AiAssistanceModel.AccessibilityContext.AccessibilityContext|null = null;
|
|
714
714
|
#selectedStorage: AiAssistanceModel.StorageAgent.StorageContext|null = null;
|
|
715
715
|
|
|
716
716
|
// Messages displayed in the `ChatView` component.
|
|
@@ -1781,7 +1781,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
1781
1781
|
} else if (data instanceof AiAssistanceModel.PerformanceAgent.PerformanceTraceContext) {
|
|
1782
1782
|
this.#selectedPerformanceTrace = data;
|
|
1783
1783
|
|
|
1784
|
-
} else if (data instanceof AiAssistanceModel.
|
|
1784
|
+
} else if (data instanceof AiAssistanceModel.AccessibilityContext.AccessibilityContext) {
|
|
1785
1785
|
this.#selectedAccessibility = data;
|
|
1786
1786
|
} else if (data instanceof AiAssistanceModel.StorageAgent.StorageContext) {
|
|
1787
1787
|
this.#selectedStorage = data;
|
|
@@ -355,7 +355,7 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: ViewOutput, target: HTML
|
|
|
355
355
|
PanelUtils.PanelUtils.getIconForNetworkRequest(input.context.getItem()) :
|
|
356
356
|
input.context instanceof AiAssistanceModel.FileContext.FileContext ?
|
|
357
357
|
PanelUtils.PanelUtils.getIconForSourceFile(input.context.getItem()) :
|
|
358
|
-
input.context instanceof AiAssistanceModel.
|
|
358
|
+
input.context instanceof AiAssistanceModel.AccessibilityContext.AccessibilityContext ?
|
|
359
359
|
html`<devtools-icon class="icon" name="performance" title="Lighthouse"></devtools-icon>` :
|
|
360
360
|
input.context instanceof AiAssistanceModel.PerformanceAgent.PerformanceTraceContext ?
|
|
361
361
|
html`<devtools-icon class="icon" name="performance" title="Performance"></devtools-icon>` :
|