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
|
@@ -164,6 +164,10 @@ const UIStringsNotTranslate = {
|
|
|
164
164
|
*@description Placeholder text for the chat UI input.
|
|
165
165
|
*/
|
|
166
166
|
inputPlaceholderForNoContext: 'Ask AI Assistance',
|
|
167
|
+
/**
|
|
168
|
+
* @description Placeholder text for the chat UI input with branding Gemini (do not translate)
|
|
169
|
+
*/
|
|
170
|
+
inputPlaceholderForNoContextBranded: 'Ask Gemini',
|
|
167
171
|
/**
|
|
168
172
|
* @description Disclaimer text right after the chat input.
|
|
169
173
|
*/
|
|
@@ -591,6 +595,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
591
595
|
onContextClick: this.#handleContextClick.bind(this),
|
|
592
596
|
onNewConversation: this.#handleNewChatRequest.bind(this),
|
|
593
597
|
onCopyResponseClick: this.#onCopyResponseClick.bind(this),
|
|
598
|
+
onContextRemoved: isAiAssistanceContextSelectionAgentEnabled() ? this.#handleContextRemoved.bind(this) : null,
|
|
594
599
|
}
|
|
595
600
|
};
|
|
596
601
|
}
|
|
@@ -729,7 +734,9 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
729
734
|
this.#conversation = conversation;
|
|
730
735
|
}
|
|
731
736
|
|
|
732
|
-
this.#conversation?.setContext(this.#getConversationContext(
|
|
737
|
+
this.#conversation?.setContext(this.#getConversationContext(
|
|
738
|
+
isAiAssistanceContextSelectionAgentEnabled() ? this.#getDefaultConversationType() :
|
|
739
|
+
(this.#conversation?.type ?? null)));
|
|
733
740
|
|
|
734
741
|
this.requestUpdate();
|
|
735
742
|
}
|
|
@@ -1009,6 +1016,9 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
1009
1016
|
return lockedString(UIStringsNotTranslate.inputPlaceholderForPerformanceWithNoRecording);
|
|
1010
1017
|
}
|
|
1011
1018
|
case AiAssistanceModel.AiHistoryStorage.ConversationType.NONE:
|
|
1019
|
+
if (AiAssistanceModel.AiUtils.isGeminiBranding()) {
|
|
1020
|
+
return lockedString(UIStringsNotTranslate.inputPlaceholderForNoContextBranded);
|
|
1021
|
+
}
|
|
1012
1022
|
return lockedString(UIStringsNotTranslate.inputPlaceholderForNoContext);
|
|
1013
1023
|
}
|
|
1014
1024
|
}
|
|
@@ -1096,6 +1106,11 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
1096
1106
|
// Node picker is using linkifier.
|
|
1097
1107
|
}
|
|
1098
1108
|
|
|
1109
|
+
#handleContextRemoved(): void {
|
|
1110
|
+
this.#conversation?.setContext(null);
|
|
1111
|
+
this.requestUpdate();
|
|
1112
|
+
}
|
|
1113
|
+
|
|
1099
1114
|
#canExecuteQuery(): boolean {
|
|
1100
1115
|
const isBrandedBuild = Boolean(Root.Runtime.hostConfig.aidaAvailability?.enabled);
|
|
1101
1116
|
const isBlockedByAge = Boolean(Root.Runtime.hostConfig.aidaAvailability?.blockedByAge);
|
|
@@ -1269,12 +1284,9 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
1269
1284
|
this.#runAbortController = new AbortController();
|
|
1270
1285
|
}
|
|
1271
1286
|
|
|
1272
|
-
#getConversationContext(
|
|
1287
|
+
#getConversationContext(type?: AiAssistanceModel.AiHistoryStorage.ConversationType):
|
|
1273
1288
|
AiAssistanceModel.AiAgent.ConversationContext<unknown>|null {
|
|
1274
|
-
|
|
1275
|
-
return null;
|
|
1276
|
-
}
|
|
1277
|
-
switch (conversation.type) {
|
|
1289
|
+
switch (type) {
|
|
1278
1290
|
case AiAssistanceModel.AiHistoryStorage.ConversationType.STYLING:
|
|
1279
1291
|
return this.#selectedElement;
|
|
1280
1292
|
case AiAssistanceModel.AiHistoryStorage.ConversationType.FILE:
|
|
@@ -1284,38 +1296,32 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
1284
1296
|
case AiAssistanceModel.AiHistoryStorage.ConversationType.PERFORMANCE:
|
|
1285
1297
|
return this.#selectedPerformanceTrace;
|
|
1286
1298
|
case AiAssistanceModel.AiHistoryStorage.ConversationType.NONE:
|
|
1299
|
+
case undefined:
|
|
1287
1300
|
return null;
|
|
1288
1301
|
}
|
|
1289
1302
|
}
|
|
1290
1303
|
|
|
1291
1304
|
#handleConversationContextChange = (data: unknown): void => {
|
|
1292
1305
|
if (data instanceof Workspace.UISourceCode.UISourceCode) {
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
this.#selectedFile = new AiAssistanceModel.FileAgent.FileContext(data);
|
|
1297
|
-
|
|
1306
|
+
const context = new AiAssistanceModel.FileAgent.FileContext(data);
|
|
1307
|
+
this.#selectedFile = context;
|
|
1308
|
+
this.#conversation?.setContext(context);
|
|
1298
1309
|
} else if (data instanceof SDK.DOMModel.DOMNode) {
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
return;
|
|
1303
|
-
}
|
|
1304
|
-
this.#selectedElement = new AiAssistanceModel.StylingAgent.NodeContext(data);
|
|
1310
|
+
const context = new AiAssistanceModel.StylingAgent.NodeContext(data);
|
|
1311
|
+
this.#selectedElement = context;
|
|
1312
|
+
this.#conversation?.setContext(context);
|
|
1305
1313
|
} else if (data instanceof SDK.NetworkRequest.NetworkRequest) {
|
|
1306
|
-
if (this.#selectedRequest?.getItem() === data) {
|
|
1307
|
-
return;
|
|
1308
|
-
}
|
|
1309
1314
|
const calculator = NetworkPanel.NetworkPanel.NetworkPanel.instance().networkLogView.timeCalculator();
|
|
1310
|
-
|
|
1315
|
+
const context = new AiAssistanceModel.NetworkAgent.RequestContext(data, calculator);
|
|
1316
|
+
this.#selectedRequest = context;
|
|
1317
|
+
this.#conversation?.setContext(context);
|
|
1311
1318
|
} else if (data instanceof AiAssistanceModel.AIContext.AgentFocus) {
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
this.#selectedPerformanceTrace = new AiAssistanceModel.PerformanceAgent.PerformanceTraceContext(data);
|
|
1319
|
+
const context = new AiAssistanceModel.PerformanceAgent.PerformanceTraceContext(data);
|
|
1320
|
+
this.#selectedPerformanceTrace = context;
|
|
1321
|
+
this.#conversation?.setContext(context);
|
|
1316
1322
|
}
|
|
1317
1323
|
|
|
1318
|
-
this
|
|
1324
|
+
this.requestUpdate();
|
|
1319
1325
|
};
|
|
1320
1326
|
|
|
1321
1327
|
async #startConversation(
|
|
@@ -1329,7 +1335,7 @@ export class AiAssistancePanel extends UI.Panel.Panel {
|
|
|
1329
1335
|
// Cancel any previous in-flight conversation.
|
|
1330
1336
|
this.#cancel();
|
|
1331
1337
|
const signal = this.#runAbortController.signal;
|
|
1332
|
-
const context = this.#getConversationContext(this.#conversation);
|
|
1338
|
+
const context = this.#getConversationContext(this.#conversation.type);
|
|
1333
1339
|
this.#conversation.setContext(context);
|
|
1334
1340
|
|
|
1335
1341
|
// If a different context is provided, it must be from the same origin.
|
|
@@ -174,7 +174,6 @@ UI.ActionRegistration.registerActionExtension({
|
|
|
174
174
|
return new AiAssistance.ActionDelegate();
|
|
175
175
|
},
|
|
176
176
|
condition: config => isAnyFeatureAvailable(config) && !isPolicyRestricted(config) && !isGeoRestricted(config),
|
|
177
|
-
featurePromotionId: 'debug-with-ai',
|
|
178
177
|
});
|
|
179
178
|
|
|
180
179
|
UI.ActionRegistration.registerActionExtension({
|
|
@@ -39,6 +39,10 @@ const UIStrings = {
|
|
|
39
39
|
* @description The footer disclaimer that links to more information about the AI feature.
|
|
40
40
|
*/
|
|
41
41
|
learnAbout: 'Learn about AI in DevTools',
|
|
42
|
+
/**
|
|
43
|
+
* @description Label added to the button that remove the currently selected context in AI Assistance panel.
|
|
44
|
+
*/
|
|
45
|
+
removeContext: 'Remove selected context',
|
|
42
46
|
} as const;
|
|
43
47
|
|
|
44
48
|
/*
|
|
@@ -137,23 +141,27 @@ export interface ViewInput {
|
|
|
137
141
|
onImagePaste: (event: ClipboardEvent) => void;
|
|
138
142
|
onImageDragOver: (event: DragEvent) => void;
|
|
139
143
|
onImageDrop: (event: DragEvent) => void;
|
|
144
|
+
onContextRemoved: (() => void)|null;
|
|
140
145
|
}
|
|
141
146
|
|
|
142
147
|
export type ViewOutput = undefined;
|
|
143
148
|
|
|
144
|
-
export const
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
149
|
+
export const
|
|
150
|
+
DEFAULT_VIEW =
|
|
151
|
+
(input: ViewInput, output: ViewOutput, target: HTMLElement):
|
|
152
|
+
void => {
|
|
153
|
+
const chatInputContainerCls = Lit.Directives.classMap({
|
|
154
|
+
'chat-input-container': true,
|
|
155
|
+
'single-line-layout': !input.selectedContext,
|
|
156
|
+
disabled: input.isTextInputDisabled,
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
const renderRelevantDataDisclaimer = (tooltipId: string): Lit.LitTemplate => {
|
|
160
|
+
const classes = Lit.Directives.classMap({
|
|
161
|
+
'chat-input-disclaimer': true,
|
|
162
|
+
'hide-divider': !input.isLoading && input.blockedByCrossOrigin,
|
|
163
|
+
});
|
|
164
|
+
// clang-format off
|
|
157
165
|
return html`
|
|
158
166
|
<div class=${classes}>
|
|
159
167
|
<button
|
|
@@ -185,10 +193,10 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
|
|
|
185
193
|
</div></devtools-tooltip>
|
|
186
194
|
</div>
|
|
187
195
|
`;
|
|
188
|
-
|
|
189
|
-
|
|
196
|
+
// clang-format on
|
|
197
|
+
};
|
|
190
198
|
|
|
191
|
-
|
|
199
|
+
// clang-format off
|
|
192
200
|
Lit.render(html`
|
|
193
201
|
<style>${Input.textInputStyles}</style>
|
|
194
202
|
<style>${chatInputStyles}</style>
|
|
@@ -363,6 +371,16 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
|
|
|
363
371
|
:
|
|
364
372
|
input.selectedContext.getTitle()}
|
|
365
373
|
</span>
|
|
374
|
+
${input.onContextRemoved ? html`
|
|
375
|
+
<devtools-button
|
|
376
|
+
title=${i18nString(UIStrings.removeContext)}
|
|
377
|
+
aria-label=${i18nString(UIStrings.removeContext)}
|
|
378
|
+
class="remove-context"
|
|
379
|
+
.iconName=${'cross'}
|
|
380
|
+
.size=${Buttons.Button.Size.MICRO}
|
|
381
|
+
.jslogContext=${'context-removed'}
|
|
382
|
+
.variant=${Buttons.Button.Variant.ICON}
|
|
383
|
+
@click=${input.onContextRemoved}></devtools-button>` : Lit.nothing}
|
|
366
384
|
</div>
|
|
367
385
|
</div>`
|
|
368
386
|
: Lit.nothing}
|
|
@@ -462,8 +480,8 @@ export const DEFAULT_VIEW = (input: ViewInput, output: ViewOutput, target: HTMLE
|
|
|
462
480
|
${renderRelevantDataDisclaimer(RELEVANT_DATA_LINK_FOOTER_ID)}
|
|
463
481
|
</footer>
|
|
464
482
|
`, target);
|
|
465
|
-
|
|
466
|
-
};
|
|
483
|
+
// clang-format on
|
|
484
|
+
};
|
|
467
485
|
|
|
468
486
|
/**
|
|
469
487
|
* ChatInput is a presenter for the input area in the AI Assistance panel.
|
|
@@ -503,6 +521,7 @@ export class ChatInput extends UI.Widget.Widget implements SDK.TargetManager.Obs
|
|
|
503
521
|
onInspectElementClick = (): void => {};
|
|
504
522
|
onCancelClick = (): void => {};
|
|
505
523
|
onNewConversation = (): void => {};
|
|
524
|
+
onContextRemoved: (() => void)|null = null;
|
|
506
525
|
|
|
507
526
|
async #handleTakeScreenshot(): Promise<void> {
|
|
508
527
|
const mainTarget = SDK.TargetManager.TargetManager.instance().primaryPageTarget();
|
|
@@ -685,6 +704,7 @@ export class ChatInput extends UI.Widget.Widget implements SDK.TargetManager.Obs
|
|
|
685
704
|
onImageUpload: this.onImageUpload,
|
|
686
705
|
onImageDragOver: this.#handleImageDragOver,
|
|
687
706
|
onImageDrop: this.#handleImageDrop,
|
|
707
|
+
onContextRemoved: this.onContextRemoved,
|
|
688
708
|
},
|
|
689
709
|
undefined, this.contentElement);
|
|
690
710
|
}
|
|
@@ -323,6 +323,7 @@ export const DEFAULT_VIEW = (input: ChatMessageViewInput, output: ViewOutput, ta
|
|
|
323
323
|
}
|
|
324
324
|
return renderStep({
|
|
325
325
|
step: part.step,
|
|
326
|
+
isLoading: input.isLoading,
|
|
326
327
|
markdownRenderer: input.markdownRenderer,
|
|
327
328
|
isLast: isLastPart,
|
|
328
329
|
});
|
|
@@ -450,11 +451,12 @@ function renderStepDetails({
|
|
|
450
451
|
// clang-format on
|
|
451
452
|
}
|
|
452
453
|
|
|
453
|
-
function renderStepBadge({step, isLast}: {
|
|
454
|
+
function renderStepBadge({step, isLoading, isLast}: {
|
|
454
455
|
step: Step,
|
|
456
|
+
isLoading: boolean,
|
|
455
457
|
isLast: boolean,
|
|
456
458
|
}): Lit.LitTemplate {
|
|
457
|
-
if (
|
|
459
|
+
if (isLoading && isLast && !step.sideEffect) {
|
|
458
460
|
return html`<devtools-spinner></devtools-spinner>`;
|
|
459
461
|
}
|
|
460
462
|
|
|
@@ -478,8 +480,9 @@ function renderStepBadge({step, isLast}: {
|
|
|
478
480
|
></devtools-icon>`;
|
|
479
481
|
}
|
|
480
482
|
|
|
481
|
-
function renderStep({step, markdownRenderer, isLast}: {
|
|
483
|
+
function renderStep({step, isLoading, markdownRenderer, isLast}: {
|
|
482
484
|
step: Step,
|
|
485
|
+
isLoading: boolean,
|
|
483
486
|
markdownRenderer: MarkdownLitRenderer,
|
|
484
487
|
isLast: boolean,
|
|
485
488
|
}): Lit.LitTemplate {
|
|
@@ -496,7 +499,7 @@ function renderStep({step, markdownRenderer, isLast}: {
|
|
|
496
499
|
.open=${Boolean(step.sideEffect)}>
|
|
497
500
|
<summary>
|
|
498
501
|
<div class="summary">
|
|
499
|
-
${renderStepBadge({ step, isLast })}
|
|
502
|
+
${renderStepBadge({ step, isLoading, isLast })}
|
|
500
503
|
${renderTitle(step)}
|
|
501
504
|
<devtools-icon
|
|
502
505
|
class="arrow"
|
|
@@ -56,6 +56,7 @@ export interface Props {
|
|
|
56
56
|
onContextClick: () => void;
|
|
57
57
|
onNewConversation: () => void;
|
|
58
58
|
onCopyResponseClick: (message: ModelChatMessage) => void;
|
|
59
|
+
onContextRemoved: (() => void)|null;
|
|
59
60
|
changeManager: AiAssistanceModel.ChangeManager.ChangeManager;
|
|
60
61
|
inspectElementToggled: boolean;
|
|
61
62
|
messages: Message[];
|
|
@@ -175,6 +176,7 @@ const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
175
176
|
onTextSubmit: input.onTextSubmit,
|
|
176
177
|
onCancelClick: input.onCancelClick,
|
|
177
178
|
onNewConversation: input.onNewConversation,
|
|
179
|
+
onContextRemoved: input.onContextRemoved,
|
|
178
180
|
})} ${ref(element => { output.input = element as UI.Widget.WidgetElement<ChatInput>; } )}></devtools-widget>
|
|
179
181
|
</main>
|
|
180
182
|
</div>
|
|
@@ -22,7 +22,6 @@
|
|
|
22
22
|
max-width: var(--sys-size-36);
|
|
23
23
|
background-color: var(--sys-color-cdt-base-container);
|
|
24
24
|
width: 100%;
|
|
25
|
-
|
|
26
25
|
}
|
|
27
26
|
|
|
28
27
|
.chat-readonly-container {
|
|
@@ -221,6 +220,8 @@
|
|
|
221
220
|
|
|
222
221
|
.resource-link,
|
|
223
222
|
.resource-task {
|
|
223
|
+
display: flex;
|
|
224
|
+
align-items: center;
|
|
224
225
|
cursor: pointer;
|
|
225
226
|
padding: var(--sys-size-2) var(--sys-size-3);
|
|
226
227
|
font: var(--sys-typescale-body5-regular);
|
|
@@ -239,6 +240,12 @@
|
|
|
239
240
|
& .title {
|
|
240
241
|
vertical-align: middle;
|
|
241
242
|
font: var(--sys-typescale-body5-regular);
|
|
243
|
+
overflow: hidden;
|
|
244
|
+
text-overflow: ellipsis;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
& .remove-context {
|
|
248
|
+
vertical-align: middle;
|
|
242
249
|
}
|
|
243
250
|
|
|
244
251
|
&.has-picker-behavior {
|
|
@@ -253,8 +260,8 @@
|
|
|
253
260
|
devtools-file-source-icon {
|
|
254
261
|
display: inline-flex;
|
|
255
262
|
vertical-align: middle;
|
|
256
|
-
width: var(--sys-size-7);
|
|
257
|
-
height: var(--sys-size-7);
|
|
263
|
+
min-width: var(--sys-size-7);
|
|
264
|
+
min-height: var(--sys-size-7);
|
|
258
265
|
}
|
|
259
266
|
|
|
260
267
|
/*
|
|
@@ -98,7 +98,7 @@ const DEFAULT_VIEW: View = (input, output, target) => {
|
|
|
98
98
|
render(html`
|
|
99
99
|
<div class="animation-group-preview-ui">
|
|
100
100
|
<button
|
|
101
|
-
jslog=${VisualLogging.item(`animations.buffer-preview${input.isScrollDrivenAnimationGroup ? '-sda' : ''}`).track({click: true})}
|
|
101
|
+
jslog=${VisualLogging.item(`animations.buffer-preview${input.isScrollDrivenAnimationGroup ? '-sda' : ''}`).track({click: true, resize: true})}
|
|
102
102
|
class=${classes}
|
|
103
103
|
role="option"
|
|
104
104
|
aria-label=${input.label}
|
|
@@ -582,27 +582,25 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: ViewOutput, target: HTML
|
|
|
582
582
|
<devtools-report>
|
|
583
583
|
<devtools-report-section-header role="heading" aria-level="2">${
|
|
584
584
|
i18nString(UIStrings.sessionConfig)}</devtools-report-section-header>
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
i18nString(UIStrings.allowedRefreshInitiators),
|
|
599
|
-
sessionAndEvents.session.allowedRefreshInitiators.join(', '), 'dbsc-allowed-refresh-initiators')}
|
|
585
|
+
<devtools-report-key>${i18nString(UIStrings.keySite)}</devtools-report-key>
|
|
586
|
+
<devtools-report-value>${key.site}</devtools-report-value>
|
|
587
|
+
<devtools-report-key>${i18nString(UIStrings.keyId)}</devtools-report-key>
|
|
588
|
+
<devtools-report-value>${key.id}</devtools-report-value>
|
|
589
|
+
<devtools-report-key>${i18nString(UIStrings.refreshUrl)}</devtools-report-key>
|
|
590
|
+
<devtools-report-value>${sessionAndEvents.session.refreshUrl}</devtools-report-value>
|
|
591
|
+
<devtools-report-key>${i18nString(UIStrings.expiryDate)}</devtools-report-key>
|
|
592
|
+
<devtools-report-value>${
|
|
593
|
+
new Date(sessionAndEvents.session.expiryDate * 1000).toLocaleString()}</devtools-report-value>
|
|
594
|
+
<devtools-report-key>${i18nString(UIStrings.cachedChallenge)}</devtools-report-key>
|
|
595
|
+
<devtools-report-value>${sessionAndEvents.session.cachedChallenge || ''}</devtools-report-value>
|
|
596
|
+
<devtools-report-key>${i18nString(UIStrings.allowedRefreshInitiators)}</devtools-report-key>
|
|
597
|
+
<devtools-report-value>${sessionAndEvents.session.allowedRefreshInitiators.join(', ')}</devtools-report-value>
|
|
600
598
|
<devtools-report-section-header role="heading" aria-level="2">${
|
|
601
599
|
i18nString(UIStrings.scope)}</devtools-report-section-header>
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
600
|
+
<devtools-report-key>${i18nString(UIStrings.origin)}</devtools-report-key>
|
|
601
|
+
<devtools-report-value>${inclusionRules.origin}</devtools-report-value>
|
|
602
|
+
<devtools-report-key>${i18nString(UIStrings.includeSite)}</devtools-report-key>
|
|
603
|
+
<devtools-report-value>${boolToString(inclusionRules.includeSite)}</devtools-report-value>
|
|
606
604
|
</devtools-report>
|
|
607
605
|
${
|
|
608
606
|
inclusionRules.urlRules.length > 0 ? html`
|
|
@@ -710,78 +708,62 @@ export const DEFAULT_VIEW = (input: ViewInput, _output: ViewOutput, target: HTML
|
|
|
710
708
|
const creationEventDetails =
|
|
711
709
|
selectedEvent?.creationEventDetails &&
|
|
712
710
|
html`
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
html`
|
|
720
|
-
${
|
|
721
|
-
renderKeyValue(
|
|
722
|
-
i18nString(UIStrings.updatedSessionConfig), i18nString(UIStrings.yes),
|
|
723
|
-
'dbsc-creation-updated-session-config')}
|
|
711
|
+
<devtools-report-key>${i18nString(UIStrings.fetchResult)}</devtools-report-key>
|
|
712
|
+
<devtools-report-value>${
|
|
713
|
+
fetchResultToString(selectedEvent.creationEventDetails.fetchResult)}</devtools-report-value>
|
|
714
|
+
${selectedEvent.creationEventDetails.newSession && html`
|
|
715
|
+
<devtools-report-key>${i18nString(UIStrings.updatedSessionConfig)}</devtools-report-key>
|
|
716
|
+
<devtools-report-value>${i18nString(UIStrings.yes)}</devtools-report-value>
|
|
724
717
|
`}
|
|
725
718
|
`;
|
|
726
719
|
const refreshEventDetails =
|
|
727
720
|
selectedEvent?.refreshEventDetails &&
|
|
728
721
|
html`
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
i18nString(UIStrings.causedAnyRequestDeferrals),
|
|
736
|
-
boolToString(!selectedEvent.refreshEventDetails.wasFullyProactiveRefresh),
|
|
737
|
-
'dbsc-refresh-was-fully-proactive-refresh')}
|
|
722
|
+
<devtools-report-key>${i18nString(UIStrings.refreshResult)}</devtools-report-key>
|
|
723
|
+
<devtools-report-value>${
|
|
724
|
+
refreshResultToString(selectedEvent.refreshEventDetails.refreshResult)}</devtools-report-value>
|
|
725
|
+
<devtools-report-key>${i18nString(UIStrings.causedAnyRequestDeferrals)}</devtools-report-key>
|
|
726
|
+
<devtools-report-value>${
|
|
727
|
+
boolToString(!selectedEvent.refreshEventDetails.wasFullyProactiveRefresh)}</devtools-report-value>
|
|
738
728
|
${
|
|
739
729
|
selectedEvent.refreshEventDetails.fetchResult &&
|
|
740
730
|
html`
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
'dbsc-refresh-fetch-result')}
|
|
731
|
+
<devtools-report-key>${i18nString(UIStrings.fetchResult)}</devtools-report-key>
|
|
732
|
+
<devtools-report-value>${
|
|
733
|
+
fetchResultToString(selectedEvent.refreshEventDetails.fetchResult)}</devtools-report-value>
|
|
745
734
|
`}
|
|
746
|
-
${
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
${
|
|
750
|
-
renderKeyValue(
|
|
751
|
-
i18nString(UIStrings.updatedSessionConfig), i18nString(UIStrings.yes),
|
|
752
|
-
'dbsc-refresh-updated-session-config')}
|
|
735
|
+
${selectedEvent.refreshEventDetails.newSession && html`
|
|
736
|
+
<devtools-report-key>${i18nString(UIStrings.updatedSessionConfig)}</devtools-report-key>
|
|
737
|
+
<devtools-report-value>${i18nString(UIStrings.yes)}</devtools-report-value>
|
|
753
738
|
`}
|
|
754
739
|
`;
|
|
755
740
|
const challengeEventDetails =
|
|
756
741
|
selectedEvent?.challengeEventDetails &&
|
|
757
742
|
html`
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
renderKeyValue(
|
|
764
|
-
i18nString(UIStrings.challenge), selectedEvent.challengeEventDetails.challenge, 'dbsc-challenge')}
|
|
743
|
+
<devtools-report-key>${i18nString(UIStrings.challengeResult)}</devtools-report-key>
|
|
744
|
+
<devtools-report-value>${
|
|
745
|
+
challengeResultToString(selectedEvent.challengeEventDetails.challengeResult)}</devtools-report-value>
|
|
746
|
+
<devtools-report-key>${i18nString(UIStrings.challenge)}</devtools-report-key>
|
|
747
|
+
<devtools-report-value>${selectedEvent.challengeEventDetails.challenge}</devtools-report-value>
|
|
765
748
|
`;
|
|
766
749
|
const terminationEventDetails =
|
|
767
750
|
selectedEvent?.terminationEventDetails &&
|
|
768
751
|
html`
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
deletionReasonToString(selectedEvent.terminationEventDetails.deletionReason), 'dbsc-termination-reason')}
|
|
752
|
+
<devtools-report-key>${i18nString(UIStrings.deletionReason)}</devtools-report-key>
|
|
753
|
+
<devtools-report-value>${
|
|
754
|
+
deletionReasonToString(selectedEvent.terminationEventDetails.deletionReason)}</devtools-report-value>
|
|
773
755
|
`;
|
|
774
756
|
const eventDetailsContentHtml = selectedEvent ?
|
|
775
757
|
html`
|
|
776
758
|
<devtools-report>
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
759
|
+
<devtools-report-key>${i18nString(UIStrings.keySite)}</devtools-report-key>
|
|
760
|
+
<devtools-report-value>${selectedEvent.site}</devtools-report-value>
|
|
761
|
+
<devtools-report-key>${i18nString(UIStrings.sessionId)}</devtools-report-key>
|
|
762
|
+
<devtools-report-value>${selectedEvent.sessionId}</devtools-report-value>
|
|
763
|
+
<devtools-report-key>${i18nString(UIStrings.type)}</devtools-report-key>
|
|
764
|
+
<devtools-report-value>${getEventTypeString(selectedEvent)}</devtools-report-value>
|
|
765
|
+
<devtools-report-key>${i18nString(UIStrings.eventResult)}</devtools-report-key>
|
|
766
|
+
<devtools-report-value>${succeededToString(selectedEvent.succeeded)}</devtools-report-value>
|
|
785
767
|
${creationEventDetails}
|
|
786
768
|
${refreshEventDetails}
|
|
787
769
|
${challengeEventDetails}
|
|
@@ -888,13 +870,6 @@ export class DeviceBoundSessionsView extends UI.Widget.VBox {
|
|
|
888
870
|
}
|
|
889
871
|
}
|
|
890
872
|
|
|
891
|
-
function renderKeyValue(key: string, value: string, id: string): TemplateResult {
|
|
892
|
-
return html`
|
|
893
|
-
<devtools-report-key id=${id}>${key}</devtools-report-key>
|
|
894
|
-
<devtools-report-value role="text" aria-describedby=${id}>${value}</devtools-report-value>
|
|
895
|
-
`;
|
|
896
|
-
}
|
|
897
|
-
|
|
898
873
|
function ruleTypeToString(ruleType: Protocol.Network.DeviceBoundSessionUrlRuleRuleType): string {
|
|
899
874
|
switch (ruleType) {
|
|
900
875
|
case Protocol.Network.DeviceBoundSessionUrlRuleRuleType.Exclude:
|
|
@@ -180,6 +180,7 @@ export class ServiceWorkerUpdateCycleView {
|
|
|
180
180
|
const tr = this.tableElement.createChild('tr', 'service-worker-update-timeline');
|
|
181
181
|
tr.setAttribute('jslog', `${VisualLogging.treeItem('update-timeline').track({
|
|
182
182
|
click: true,
|
|
183
|
+
resize: true,
|
|
183
184
|
keydown: 'ArrowLeft|ArrowRight|ArrowUp|ArrowDown|Enter|Space',
|
|
184
185
|
})}`);
|
|
185
186
|
this.rows.push(tr);
|
|
@@ -353,7 +353,7 @@ function renderFramesPerReason(frames: string[]|undefined): LitTemplate {
|
|
|
353
353
|
}
|
|
354
354
|
const rows = [html`<div>${i18nString(UIStrings.framesPerIssue, {n: frames.length})}</div>`];
|
|
355
355
|
rows.push(...frames.map(url => html`<div class="text-ellipsis" title=${url}
|
|
356
|
-
jslog=${VisualLogging.treeItem()}>${url}</div>`));
|
|
356
|
+
jslog=${VisualLogging.treeItem().track({resize: true})}>${url}</div>`));
|
|
357
357
|
return html`
|
|
358
358
|
<div class="details-list"
|
|
359
359
|
jslog=${VisualLogging.tree('frames-per-issue')}>
|
|
@@ -361,7 +361,9 @@ function renderFramesPerReason(frames: string[]|undefined): LitTemplate {
|
|
|
361
361
|
rows,
|
|
362
362
|
title: i18nString(UIStrings.framesPerIssue, {n: frames.length}),
|
|
363
363
|
} as ExpandableList.ExpandableList.ExpandableListData}
|
|
364
|
-
jslog=${VisualLogging.treeItem()
|
|
364
|
+
jslog=${VisualLogging.treeItem().track({
|
|
365
|
+
resize: true
|
|
366
|
+
})}></devtools-expandable-list>
|
|
365
367
|
</div>
|
|
366
368
|
`;
|
|
367
369
|
}
|
|
@@ -144,7 +144,7 @@ const DEFAULT_VIEW: View = (input: ViewInput, _output: ViewOutput, target: HTMLE
|
|
|
144
144
|
// clang-format off
|
|
145
145
|
return html`
|
|
146
146
|
<span class=${spanClasses}
|
|
147
|
-
jslog=${VisualLogging.item('matched-address-item').track({hover: true})}
|
|
147
|
+
jslog=${VisualLogging.item('matched-address-item').track({hover: true, resize: true})}
|
|
148
148
|
@mouseenter=${() => input.onHighlightMatchesInAddress(startIndex)}
|
|
149
149
|
@mouseleave=${input.onClearHighlightedMatches}>
|
|
150
150
|
${templateLines}
|
|
@@ -238,6 +238,7 @@ export class XHRBreakpointsSidebarPane extends UI.Widget.VBox implements UI.Cont
|
|
|
238
238
|
listItemElement.setAttribute('jslog', `${VisualLogging.item().track({
|
|
239
239
|
click: true,
|
|
240
240
|
dblclick: true,
|
|
241
|
+
resize: true,
|
|
241
242
|
keydown: 'ArrowUp|ArrowDown|PageUp|PageDown|Enter|Space',
|
|
242
243
|
})}`);
|
|
243
244
|
return listItemElement;
|
|
@@ -18,11 +18,11 @@ const UIStringsNotTranslate = {
|
|
|
18
18
|
/**
|
|
19
19
|
* @description Text for teaser to generate code.
|
|
20
20
|
*/
|
|
21
|
-
ctrlItoGenerateCode: '
|
|
21
|
+
ctrlItoGenerateCode: 'ctrl+i to generate code',
|
|
22
22
|
/**
|
|
23
23
|
* @description Text for teaser to generate code in Mac.
|
|
24
24
|
*/
|
|
25
|
-
cmdItoGenerateCode: '
|
|
25
|
+
cmdItoGenerateCode: 'cmd+i to generate code',
|
|
26
26
|
/**
|
|
27
27
|
* @description Aria label for teaser to generate code.
|
|
28
28
|
*/
|
|
@@ -22,16 +22,16 @@ const UIStringsNotTranslate = {
|
|
|
22
22
|
* @description First item in the description.
|
|
23
23
|
*/
|
|
24
24
|
describeCodeInComment:
|
|
25
|
-
'Pressing
|
|
25
|
+
'Pressing ctrl+i on a comment in the Console and Sources panels now generates entire code blocks based on the instructions in the comment',
|
|
26
26
|
/**
|
|
27
27
|
* @description First item in the description.
|
|
28
28
|
*/
|
|
29
29
|
describeCodeInCommentForMacOs:
|
|
30
|
-
'Pressing
|
|
30
|
+
'Pressing cmd+i on a comment in the Console and Sources panels now generates entire code blocks based on the instructions in the comment',
|
|
31
31
|
/**
|
|
32
32
|
* @description Second item in the description.
|
|
33
33
|
*/
|
|
34
|
-
asYouType: 'You will still receive the real-time, as-you-type suggestions to help you code faster
|
|
34
|
+
asYouType: 'You will still receive the real-time, as-you-type suggestions to help you code faster',
|
|
35
35
|
/**
|
|
36
36
|
* @description Third item in the description.
|
|
37
37
|
*/
|
|
@@ -97,7 +97,7 @@ export class AiCodeGenerationUpgradeDialog {
|
|
|
97
97
|
<div class="right-buttons">
|
|
98
98
|
<devtools-button
|
|
99
99
|
@click=${() => {
|
|
100
|
-
result.resolve(
|
|
100
|
+
result.resolve(false);
|
|
101
101
|
void UI.ViewManager.ViewManager.instance().showView('chrome-ai');
|
|
102
102
|
}}
|
|
103
103
|
jslogcontext="ai-code-generation-upgrade-dialog.manage-in-settings"
|