chrome-devtools-frontend 1.0.1515988 → 1.0.1516909
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/GdpClient.ts +1 -1
- package/front_end/core/host/UserMetrics.ts +5 -1
- package/front_end/entrypoints/main/MainImpl.ts +1 -1
- package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +4 -5
- package/front_end/models/ai_code_completion/AiCodeCompletion.ts +24 -8
- package/front_end/models/badges/UserBadges.ts +38 -3
- package/front_end/models/formatter/FormatterWorkerPool.ts +3 -3
- package/front_end/panels/common/BadgeNotification.ts +46 -10
- package/front_end/panels/elements/ComputedStyleWidget.ts +1 -2
- package/front_end/panels/elements/LayoutPane.ts +1 -1
- package/front_end/panels/network/NetworkLogView.ts +5 -1
- package/front_end/panels/search/SearchResultsPane.ts +32 -47
- package/front_end/panels/search/SearchView.ts +25 -48
- package/front_end/panels/settings/components/SyncSection.ts +1 -1
- package/front_end/panels/sources/OutlineQuickOpen.ts +3 -1
- package/front_end/panels/timeline/TimelineUIUtils.ts +13 -8
- package/front_end/third_party/puppeteer/README.chromium +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/bidi/core/Realm.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js +0 -20
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/generated/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/injected/injected.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/cjs/puppeteer/util/Mutex.d.ts +2 -2
- package/front_end/third_party/puppeteer/package/lib/es5-iife/puppeteer-core-browser.js +2 -23
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js +0 -20
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/cdp/Accessibility.js.map +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/generated/version.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.d.ts +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js +1 -1
- package/front_end/third_party/puppeteer/package/lib/esm/puppeteer/revisions.js.map +1 -1
- package/front_end/third_party/puppeteer/package/package.json +1 -1
- package/front_end/third_party/puppeteer/package/src/cdp/Accessibility.ts +1 -21
- package/front_end/third_party/puppeteer/package/src/generated/version.ts +1 -1
- package/front_end/third_party/puppeteer/package/src/revisions.ts +1 -1
- package/front_end/ui/components/text_editor/config.ts +30 -1
- package/front_end/ui/components/tooltips/Tooltip.ts +1 -3
- package/front_end/ui/visual_logging/KnownContextValues.ts +5 -0
- package/package.json +1 -1
@@ -319,7 +319,6 @@ class AXNode {
|
|
319
319
|
#name: string;
|
320
320
|
#role: string;
|
321
321
|
#ignored: boolean;
|
322
|
-
#cachedHasFocusableChild?: boolean;
|
323
322
|
#realm: Realm;
|
324
323
|
|
325
324
|
constructor(realm: Realm, payload: Protocol.Accessibility.AXNode) {
|
@@ -362,19 +361,6 @@ class AXNode {
|
|
362
361
|
);
|
363
362
|
}
|
364
363
|
|
365
|
-
#hasFocusableChild(): boolean {
|
366
|
-
if (this.#cachedHasFocusableChild === undefined) {
|
367
|
-
this.#cachedHasFocusableChild = false;
|
368
|
-
for (const child of this.children) {
|
369
|
-
if (child.#focusable || child.#hasFocusableChild()) {
|
370
|
-
this.#cachedHasFocusableChild = true;
|
371
|
-
break;
|
372
|
-
}
|
373
|
-
}
|
374
|
-
}
|
375
|
-
return this.#cachedHasFocusableChild;
|
376
|
-
}
|
377
|
-
|
378
364
|
public find(predicate: (x: AXNode) => boolean): AXNode | null {
|
379
365
|
if (predicate(this)) {
|
380
366
|
return this;
|
@@ -420,16 +406,10 @@ class AXNode {
|
|
420
406
|
break;
|
421
407
|
}
|
422
408
|
|
423
|
-
// Here and below: Android heuristics
|
424
|
-
if (this.#hasFocusableChild()) {
|
425
|
-
return false;
|
426
|
-
}
|
427
|
-
if (this.#focusable && this.#name && this.#name !== 'Document') {
|
428
|
-
return true;
|
429
|
-
}
|
430
409
|
if (this.#role === 'heading' && this.#name) {
|
431
410
|
return true;
|
432
411
|
}
|
412
|
+
|
433
413
|
return false;
|
434
414
|
}
|
435
415
|
|
@@ -484,8 +484,10 @@ export const setAiAutoCompleteSuggestion = CM.StateEffect.define<ActiveSuggestio
|
|
484
484
|
interface ActiveSuggestion {
|
485
485
|
text: string;
|
486
486
|
from: number;
|
487
|
-
sampleId
|
487
|
+
sampleId: number;
|
488
488
|
rpcGlobalId?: Host.AidaClient.RpcGlobalId;
|
489
|
+
startTime: number;
|
490
|
+
onImpression: (rpcGlobalId: Host.AidaClient.RpcGlobalId, sampleId: number, latency: number) => void;
|
489
491
|
}
|
490
492
|
|
491
493
|
export const aiAutoCompleteSuggestionState = CM.StateField.define<ActiveSuggestion|null>({
|
@@ -569,8 +571,15 @@ export const aiAutoCompleteSuggestion: CM.Extension = [
|
|
569
571
|
CM.ViewPlugin.fromClass(
|
570
572
|
class {
|
571
573
|
decorations: CM.DecorationSet = CM.Decoration.none;
|
574
|
+
#lastLoggedSuggestion: ActiveSuggestion|null = null;
|
572
575
|
|
573
576
|
update(update: CM.ViewUpdate): void {
|
577
|
+
// If there is no text on the document, we don't want to show the AI suggestion.
|
578
|
+
if (update.state.doc.length === 0) {
|
579
|
+
this.decorations = CM.Decoration.none;
|
580
|
+
return;
|
581
|
+
}
|
582
|
+
|
574
583
|
// Hide decorations if there is no active AI suggestion.
|
575
584
|
const activeSuggestion = update.state.field(aiAutoCompleteSuggestionState);
|
576
585
|
if (!activeSuggestion) {
|
@@ -605,6 +614,12 @@ export const aiAutoCompleteSuggestion: CM.Extension = [
|
|
605
614
|
|
606
615
|
let ghostText = activeSuggestion.text.slice(additionallyTypedText.length);
|
607
616
|
if (selectedCompletion) {
|
617
|
+
// Do not show AI generated suggestion if top traditional suggestion is of type
|
618
|
+
// 'keyword' - `do`, `while` etc.
|
619
|
+
if (selectedCompletion.type?.includes('keyword')) {
|
620
|
+
this.decorations = CM.Decoration.none;
|
621
|
+
return;
|
622
|
+
}
|
608
623
|
// If the user typed the full selected completion, then we don't check for overlap.
|
609
624
|
// (e.g. the user wrote `flex`, traditional suggestion is `flex` and the AI autocompletion is
|
610
625
|
// `;\njustify-content: center`. Then, we want to show the AI completion)
|
@@ -635,6 +650,20 @@ export const aiAutoCompleteSuggestion: CM.Extension = [
|
|
635
650
|
|
636
651
|
this.decorations =
|
637
652
|
CM.Decoration.set([CM.Decoration.widget({widget: new CompletionHint(ghostText), side: 1}).range(head)]);
|
653
|
+
this.#registerImpressionIfNeeded(activeSuggestion);
|
654
|
+
}
|
655
|
+
|
656
|
+
#registerImpressionIfNeeded(activeSuggestion: ActiveSuggestion): void {
|
657
|
+
if (!activeSuggestion.rpcGlobalId) {
|
658
|
+
return;
|
659
|
+
}
|
660
|
+
if (this.#lastLoggedSuggestion?.rpcGlobalId === activeSuggestion?.rpcGlobalId &&
|
661
|
+
this.#lastLoggedSuggestion?.sampleId === activeSuggestion?.sampleId) {
|
662
|
+
return;
|
663
|
+
}
|
664
|
+
const latency = performance.now() - activeSuggestion.startTime;
|
665
|
+
// only register impression for the first time AI generated suggestion is shown to the user.
|
666
|
+
activeSuggestion.onImpression(activeSuggestion.rpcGlobalId, activeSuggestion.sampleId, latency);
|
638
667
|
}
|
639
668
|
},
|
640
669
|
{decorations: p => p.decorations}),
|
@@ -360,9 +360,7 @@ export class Tooltip extends HTMLElement {
|
|
360
360
|
if (this.open && Tooltip.lastOpenedTooltipId === this.id) {
|
361
361
|
Tooltip.lastOpenedTooltipId = null;
|
362
362
|
}
|
363
|
-
this
|
364
|
-
this.hidePopover();
|
365
|
-
}, this.hoverDelay);
|
363
|
+
this.hidePopover();
|
366
364
|
};
|
367
365
|
|
368
366
|
toggle = (): void => {
|
@@ -1907,6 +1907,8 @@ export const knownContextValues = new Set([
|
|
1907
1907
|
'interactions',
|
1908
1908
|
'interactivity',
|
1909
1909
|
'interest-delay',
|
1910
|
+
'interest-delay-end',
|
1911
|
+
'interest-delay-start',
|
1910
1912
|
'interest-groups',
|
1911
1913
|
'interest-hide-delay',
|
1912
1914
|
'interest-show-delay',
|
@@ -3547,6 +3549,9 @@ export const knownContextValues = new Set([
|
|
3547
3549
|
'start-time',
|
3548
3550
|
'start-url',
|
3549
3551
|
'start-view',
|
3552
|
+
'starter-badge-dismissed',
|
3553
|
+
'starter-badge-last-snoozed-timestamp',
|
3554
|
+
'starter-badge-snooze-count',
|
3550
3555
|
'static-global-setting',
|
3551
3556
|
'static-synced-setting',
|
3552
3557
|
'status',
|
package/package.json
CHANGED