chrome-devtools-frontend 1.0.1675430 → 1.0.1676824

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.
Files changed (225) hide show
  1. package/WATCHLISTS +0 -4
  2. package/front_end/core/common/Settings.ts +0 -66
  3. package/front_end/core/root/Runtime.ts +0 -5
  4. package/front_end/core/sdk/CSSMetadata.ts +5 -9
  5. package/front_end/core/sdk/CSSPropertyParserMatchers.ts +8 -28
  6. package/front_end/core/sdk/DebuggerModel.ts +50 -30
  7. package/front_end/core/sdk/ResourceTreeModel.ts +20 -1
  8. package/front_end/core/sdk/Script.ts +9 -53
  9. package/front_end/entrypoints/heap_snapshot_worker/HeapSnapshot.ts +213 -23
  10. package/front_end/entrypoints/main/MainImpl.ts +31 -0
  11. package/front_end/generated/InspectorBackendCommands.ts +3 -1
  12. package/front_end/generated/SupportedCSSProperties.ts +21 -4
  13. package/front_end/generated/protocol-mapping.d.ts +14 -0
  14. package/front_end/generated/protocol-proxy-api.d.ts +10 -0
  15. package/front_end/generated/protocol.ts +35 -0
  16. package/front_end/models/ai_assistance/AiAgent2.ts +11 -0
  17. package/front_end/models/ai_assistance/AiConversation.ts +22 -5
  18. package/front_end/models/ai_assistance/README.md +52 -26
  19. package/front_end/models/ai_assistance/agents/AiAgent.ts +54 -8
  20. package/front_end/models/ai_assistance/agents/ContextSelectionAgent.ts +1 -1
  21. package/front_end/models/ai_assistance/agents/PerformanceAgent.ts +7 -194
  22. package/front_end/models/ai_assistance/agents/StorageAgent.ts +8 -87
  23. package/front_end/models/ai_assistance/agents/StylingAgent.snapshot.txt +2 -1
  24. package/front_end/models/ai_assistance/ai_assistance.ts +16 -0
  25. package/front_end/models/ai_assistance/contexts/PerformanceTraceContext.ts +124 -0
  26. package/front_end/models/ai_assistance/contexts/StorageContext.ts +111 -0
  27. package/front_end/models/ai_assistance/data_formatters/PerformanceTraceFormatter.ts +69 -1
  28. package/front_end/models/ai_assistance/skills/README.md +63 -1
  29. package/front_end/models/ai_assistance/skills/Skill.ts +1 -1
  30. package/front_end/models/ai_assistance/skills/SkillRegistry.ts +4 -0
  31. package/front_end/models/ai_assistance/skills/performance.md +8 -0
  32. package/front_end/models/ai_assistance/skills/sources.md +16 -0
  33. package/front_end/models/ai_assistance/skills/storage.md +31 -0
  34. package/front_end/models/ai_assistance/tools/GetSourceContent.ts +101 -0
  35. package/front_end/models/ai_assistance/tools/GetTraceEventByKey.ts +83 -0
  36. package/front_end/models/ai_assistance/tools/GetTraceMainThreadSummary.ts +106 -0
  37. package/front_end/models/ai_assistance/tools/GetTraceNetworkSummary.ts +104 -0
  38. package/front_end/models/ai_assistance/tools/ListPageOrigins.ts +81 -0
  39. package/front_end/models/ai_assistance/tools/ListSources.ts +116 -0
  40. package/front_end/models/ai_assistance/tools/SelectTraceEventByKey.ts +90 -0
  41. package/front_end/models/ai_assistance/tools/Tool.ts +22 -1
  42. package/front_end/models/ai_assistance/tools/ToolRegistry.ts +14 -0
  43. package/front_end/models/bindings/CSSWorkspaceBinding.ts +4 -0
  44. package/front_end/models/bindings/CompilerScriptMapping.ts +4 -0
  45. package/front_end/models/bindings/DebuggerWorkspaceBinding.ts +8 -0
  46. package/front_end/models/bindings/ResourceScriptMapping.ts +3 -201
  47. package/front_end/models/bindings/SASSSourceMapping.ts +6 -0
  48. package/front_end/models/breakpoints/BreakpointManager.ts +2 -49
  49. package/front_end/models/heap_snapshot/HeapSnapshotModel.ts +27 -0
  50. package/front_end/models/heap_snapshot/HeapSnapshotProxy.ts +10 -2
  51. package/front_end/models/issues_manager/descriptions/connectionAllowlistEmbeddingRequirementNotSatisfied.md +26 -0
  52. package/front_end/models/issues_manager/descriptions/connectionAllowlistIFrameAttributeLoosensEmbeddingRequirement.md +19 -0
  53. package/front_end/models/issues_manager/descriptions/connectionAllowlistInvalidAllowConnectionAllowlistFrom.md +21 -0
  54. package/front_end/models/javascript_metadata/NativeFunctions.js +1 -1
  55. package/front_end/models/persistence/IsolatedFileSystem.ts +7 -8
  56. package/front_end/models/persistence/IsolatedFileSystemManager.ts +2 -2
  57. package/front_end/models/persistence/PlatformFileSystem.ts +1 -1
  58. package/front_end/models/persistence/persistence-meta.ts +9 -9
  59. package/front_end/models/trace/types/TraceEvents.ts +36 -0
  60. package/front_end/panels/accessibility/ARIAAttributesView.ts +3 -3
  61. package/front_end/panels/accessibility/AccessibilityNodeView.ts +36 -36
  62. package/front_end/panels/accessibility/AccessibilityStrings.ts +168 -168
  63. package/front_end/panels/accessibility/SourceOrderView.ts +7 -7
  64. package/front_end/panels/accessibility/accessibility-meta.ts +2 -2
  65. package/front_end/panels/ai_assistance/AiAssistancePanel.ts +5 -5
  66. package/front_end/panels/ai_assistance/components/AIv2MarkdownRenderer.ts +2 -3
  67. package/front_end/panels/ai_assistance/components/ChatInput.ts +2 -2
  68. package/front_end/panels/ai_assistance/components/ChatMessage.ts +27 -2
  69. package/front_end/panels/application/IndexedDBViews.ts +65 -63
  70. package/front_end/panels/application/WebMCPView.ts +16 -7
  71. package/front_end/panels/common/AiCodeCompletionSummaryToolbar.ts +5 -5
  72. package/front_end/panels/common/BadgeNotification.ts +8 -8
  73. package/front_end/panels/common/ExtensionServer.ts +21 -1
  74. package/front_end/panels/common/GdpSignUpDialog.ts +16 -16
  75. package/front_end/panels/common/GeminiRebrandPromoDialog.ts +5 -6
  76. package/front_end/panels/common/PersistenceUtils.ts +2 -2
  77. package/front_end/panels/common/common.ts +0 -97
  78. package/front_end/panels/console/ConsoleInsightTeaser.ts +2 -2
  79. package/front_end/panels/console/ConsolePinPane.ts +2 -2
  80. package/front_end/panels/console/ConsoleView.ts +20 -19
  81. package/front_end/panels/elements/LayoutPane.ts +2 -8
  82. package/front_end/panels/event_listeners/EventListenersView.ts +8 -4
  83. package/front_end/panels/issues/AffectedTrackingSitesView.ts +25 -14
  84. package/front_end/panels/media/PlayerMessagesView.ts +149 -68
  85. package/front_end/panels/network/NetworkPanel.ts +1 -1
  86. package/front_end/panels/network/RequestPayloadView.ts +1 -0
  87. package/front_end/panels/profiler/HeapSnapshotView.ts +0 -2
  88. package/front_end/panels/profiler/heapProfiler.css +0 -9
  89. package/front_end/panels/recorder/RecorderPanel.ts +2 -3
  90. package/front_end/panels/screencast/ScreencastView.ts +148 -138
  91. package/front_end/panels/sources/AiCodeCompletionPlugin.ts +2 -2
  92. package/front_end/panels/sources/DebuggerPlugin.ts +9 -58
  93. package/front_end/panels/sources/ScopeChainSidebarPane.ts +1 -1
  94. package/front_end/panels/sources/UISourceCodeFrame.ts +3 -8
  95. package/front_end/panels/sources/WatchExpressionsSidebarPane.ts +4 -2
  96. package/front_end/panels/timeline/TimelineController.ts +36 -64
  97. package/front_end/panels/timeline/TimelinePanel.ts +11 -8
  98. package/front_end/panels/timeline/TimelineUIUtils.ts +5 -2
  99. package/front_end/panels/timeline/overlays/components/EntryLabelOverlay.ts +2 -2
  100. package/front_end/panels/timeline/timelinePanel.css +0 -10
  101. package/front_end/panels/utils/utils.ts +7 -7
  102. package/front_end/services/tracing/PerformanceTracing.ts +5 -17
  103. package/front_end/third_party/chromium/README.chromium +1 -1
  104. package/front_end/third_party/codemirror.next/chunk/codemirror.js +1 -1
  105. package/front_end/third_party/codemirror.next/chunk/codemirror.js.map +1 -1
  106. package/front_end/third_party/codemirror.next/package.json +2 -2
  107. package/front_end/third_party/codemirror.next/rebuild.sh +4 -1
  108. package/front_end/ui/comments/CommentAnchorResolver.ts +436 -10
  109. package/front_end/ui/comments/CommentManager.ts +640 -0
  110. package/front_end/ui/comments/CommentsOverlayWidget.ts +121 -0
  111. package/front_end/ui/comments/comments.ts +4 -0
  112. package/front_end/ui/comments/commentsOverlay.css +49 -0
  113. package/front_end/{panels/common → ui/components/dialogs}/FreDialog.ts +6 -6
  114. package/front_end/ui/components/dialogs/TypeToAllowDialog.ts +96 -0
  115. package/front_end/ui/components/dialogs/dialogs.ts +4 -0
  116. package/front_end/ui/components/settings/SettingCheckbox.ts +3 -3
  117. package/front_end/{panels/common → ui/components/text_editor}/AiCodeCompletionDisclaimer.ts +13 -13
  118. package/front_end/ui/components/text_editor/AiCodeCompletionProvider.ts +7 -6
  119. package/front_end/{panels/common → ui/components/text_editor}/AiCodeCompletionTeaser.ts +43 -46
  120. package/front_end/ui/components/text_editor/AiCodeGenerationProvider.ts +22 -26
  121. package/front_end/{panels/common → ui/components/text_editor}/AiCodeGenerationTeaser.ts +10 -10
  122. package/front_end/{panels/common → ui/components/text_editor}/AiCodeGenerationUpgradeDialog.ts +5 -5
  123. package/front_end/ui/components/text_editor/text_editor.ts +4 -0
  124. package/front_end/ui/legacy/Toolbar.ts +1 -1
  125. package/front_end/ui/legacy/components/object_ui/CustomPreviewComponent.ts +11 -3
  126. package/front_end/ui/legacy/components/object_ui/ObjectPropertiesSection.ts +270 -162
  127. package/front_end/ui/legacy/components/object_ui/objectPropertiesSection.css +5 -0
  128. package/front_end/ui/legacy/components/quick_open/CommandMenu.ts +11 -16
  129. package/front_end/ui/legacy/components/settings_ui/SettingsUI.ts +5 -12
  130. package/front_end/ui/legacy/components/source_frame/JSONView.ts +8 -1
  131. package/front_end/ui/legacy/components/source_frame/SourceFrame.ts +2 -2
  132. package/front_end/ui/settings/SettingUIRegistration.ts +55 -6
  133. package/front_end/ui/visual_logging/KnownContextValues.ts +1 -0
  134. package/mcp/mcp.ts +6 -1
  135. package/package.json +1 -1
  136. package/front_end/Images/toolbarResizerVertical.png +0 -0
  137. package/front_end/emulated_devices/MotoG4-landscape.svg +0 -155
  138. package/front_end/emulated_devices/MotoG4-portrait.svg +0 -155
  139. package/front_end/emulated_devices/Nexus5X-landscape.svg +0 -19
  140. package/front_end/emulated_devices/Nexus5X-portrait.svg +0 -19
  141. package/front_end/emulated_devices/Nexus6P-landscape.svg +0 -50
  142. package/front_end/emulated_devices/Nexus6P-portrait.svg +0 -54
  143. package/front_end/emulated_devices/google-nest-hub-horizontal.png +0 -0
  144. package/front_end/emulated_devices/google-nest-hub-max-horizontal.png +0 -0
  145. package/front_end/emulated_devices/google-nexus-5-horizontal-default-1x.png +0 -0
  146. package/front_end/emulated_devices/google-nexus-5-horizontal-default-2x.png +0 -0
  147. package/front_end/emulated_devices/google-nexus-5-horizontal-keyboard-1x.png +0 -0
  148. package/front_end/emulated_devices/google-nexus-5-horizontal-keyboard-2x.png +0 -0
  149. package/front_end/emulated_devices/google-nexus-5-horizontal-navigation-1x.png +0 -0
  150. package/front_end/emulated_devices/google-nexus-5-horizontal-navigation-2x.png +0 -0
  151. package/front_end/emulated_devices/google-nexus-5-vertical-default-1x.png +0 -0
  152. package/front_end/emulated_devices/google-nexus-5-vertical-default-2x.png +0 -0
  153. package/front_end/emulated_devices/google-nexus-5-vertical-keyboard-1x.png +0 -0
  154. package/front_end/emulated_devices/google-nexus-5-vertical-keyboard-2x.png +0 -0
  155. package/front_end/emulated_devices/google-nexus-5-vertical-navigation-1x.png +0 -0
  156. package/front_end/emulated_devices/google-nexus-5-vertical-navigation-2x.png +0 -0
  157. package/front_end/emulated_devices/google-nexus-5x-horizontal-default-1x.png +0 -0
  158. package/front_end/emulated_devices/google-nexus-5x-horizontal-default-2x.png +0 -0
  159. package/front_end/emulated_devices/google-nexus-5x-horizontal-keyboard-1x.png +0 -0
  160. package/front_end/emulated_devices/google-nexus-5x-horizontal-keyboard-2x.png +0 -0
  161. package/front_end/emulated_devices/google-nexus-5x-horizontal-navigation-1x.png +0 -0
  162. package/front_end/emulated_devices/google-nexus-5x-horizontal-navigation-2x.png +0 -0
  163. package/front_end/emulated_devices/google-nexus-5x-vertical-default-1x.png +0 -0
  164. package/front_end/emulated_devices/google-nexus-5x-vertical-default-2x.png +0 -0
  165. package/front_end/emulated_devices/google-nexus-5x-vertical-keyboard-1x.png +0 -0
  166. package/front_end/emulated_devices/google-nexus-5x-vertical-keyboard-2x.png +0 -0
  167. package/front_end/emulated_devices/google-nexus-5x-vertical-navigation-1x.png +0 -0
  168. package/front_end/emulated_devices/google-nexus-5x-vertical-navigation-2x.png +0 -0
  169. package/front_end/emulated_devices/iPad-landscape.svg +0 -73
  170. package/front_end/emulated_devices/iPad-portrait.svg +0 -76
  171. package/front_end/emulated_devices/iPhone5-landscape.svg +0 -99
  172. package/front_end/emulated_devices/iPhone5-portrait.svg +0 -83
  173. package/front_end/emulated_devices/iPhone6-landscape.svg +0 -111
  174. package/front_end/emulated_devices/iPhone6-portrait.svg +0 -116
  175. package/front_end/emulated_devices/iPhone6Plus-landscape.svg +0 -118
  176. package/front_end/emulated_devices/iPhone6Plus-portrait.svg +0 -116
  177. package/front_end/emulated_devices/optimized/MotoG4-landscape.avif +0 -0
  178. package/front_end/emulated_devices/optimized/MotoG4-portrait.avif +0 -0
  179. package/front_end/emulated_devices/optimized/Nexus5X-landscape.avif +0 -0
  180. package/front_end/emulated_devices/optimized/Nexus5X-portrait.avif +0 -0
  181. package/front_end/emulated_devices/optimized/Nexus6P-landscape.avif +0 -0
  182. package/front_end/emulated_devices/optimized/Nexus6P-portrait.avif +0 -0
  183. package/front_end/emulated_devices/optimized/README.md +0 -9
  184. package/front_end/emulated_devices/optimized/google-nest-hub-horizontal.avif +0 -0
  185. package/front_end/emulated_devices/optimized/google-nest-hub-max-horizontal.avif +0 -0
  186. package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-default-1x.avif +0 -0
  187. package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-default-2x.avif +0 -0
  188. package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-1x.avif +0 -0
  189. package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-keyboard-2x.avif +0 -0
  190. package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-navigation-1x.avif +0 -0
  191. package/front_end/emulated_devices/optimized/google-nexus-5-horizontal-navigation-2x.avif +0 -0
  192. package/front_end/emulated_devices/optimized/google-nexus-5-vertical-default-1x.avif +0 -0
  193. package/front_end/emulated_devices/optimized/google-nexus-5-vertical-default-2x.avif +0 -0
  194. package/front_end/emulated_devices/optimized/google-nexus-5-vertical-keyboard-1x.avif +0 -0
  195. package/front_end/emulated_devices/optimized/google-nexus-5-vertical-keyboard-2x.avif +0 -0
  196. package/front_end/emulated_devices/optimized/google-nexus-5-vertical-navigation-1x.avif +0 -0
  197. package/front_end/emulated_devices/optimized/google-nexus-5-vertical-navigation-2x.avif +0 -0
  198. package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-default-1x.avif +0 -0
  199. package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-default-2x.avif +0 -0
  200. package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-1x.avif +0 -0
  201. package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-keyboard-2x.avif +0 -0
  202. package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-1x.avif +0 -0
  203. package/front_end/emulated_devices/optimized/google-nexus-5x-horizontal-navigation-2x.avif +0 -0
  204. package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-default-1x.avif +0 -0
  205. package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-default-2x.avif +0 -0
  206. package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-1x.avif +0 -0
  207. package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-keyboard-2x.avif +0 -0
  208. package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-navigation-1x.avif +0 -0
  209. package/front_end/emulated_devices/optimized/google-nexus-5x-vertical-navigation-2x.avif +0 -0
  210. package/front_end/emulated_devices/optimized/iPad-landscape.avif +0 -0
  211. package/front_end/emulated_devices/optimized/iPad-portrait.avif +0 -0
  212. package/front_end/emulated_devices/optimized/iPhone5-landscape.avif +0 -0
  213. package/front_end/emulated_devices/optimized/iPhone5-portrait.avif +0 -0
  214. package/front_end/emulated_devices/optimized/iPhone6-landscape.avif +0 -0
  215. package/front_end/emulated_devices/optimized/iPhone6-portrait.avif +0 -0
  216. package/front_end/emulated_devices/optimized/iPhone6Plus-landscape.avif +0 -0
  217. package/front_end/emulated_devices/optimized/iPhone6Plus-portrait.avif +0 -0
  218. package/front_end/emulated_devices/optimized/optimized_images.gni +0 -53
  219. package/front_end/models/ai_assistance/agents/README.md +0 -136
  220. /package/front_end/{panels/common → ui/components/dialogs}/freDialog.css +0 -0
  221. /package/front_end/{panels/common/common.css → ui/components/dialogs/typeToAllowDialog.css} +0 -0
  222. /package/front_end/{panels/common → ui/components/text_editor}/aiCodeCompletionDisclaimer.css +0 -0
  223. /package/front_end/{panels/common → ui/components/text_editor}/aiCodeCompletionTeaser.css +0 -0
  224. /package/front_end/{panels/common → ui/components/text_editor}/aiCodeGenerationTeaser.css +0 -0
  225. /package/front_end/{panels/common → ui/components/text_editor}/aiCodeGenerationUpgradeDialog.css +0 -0
@@ -7,13 +7,15 @@ import * as Host from '../../../core/host/host.js';
7
7
  import * as i18n from '../../../core/i18n/i18n.js';
8
8
  import * as Root from '../../../core/root/root.js';
9
9
  import * as AiCodeGeneration from '../../../models/ai_code_generation/ai_code_generation.js';
10
- import * as PanelCommon from '../../../panels/common/common.js';
11
10
  import * as CodeMirror from '../../../third_party/codemirror.next/codemirror.next.js';
12
11
  import * as UI from '../../../ui/legacy/legacy.js';
13
12
  import * as VisualLogging from '../../visual_logging/visual_logging.js';
14
13
 
15
14
  import {AccessiblePlaceholder} from './AccessiblePlaceholder.js';
15
+ import type {DisclaimerTextVariant} from './AiCodeCompletionDisclaimer.js';
16
16
  import {AiCodeGenerationParser} from './AiCodeGenerationParser.js';
17
+ import {AiCodeGenerationTeaser, AiCodeGenerationTeaserDisplayState, PROMOTION_ID} from './AiCodeGenerationTeaser.js';
18
+ import {AiCodeGenerationUpgradeDialog} from './AiCodeGenerationUpgradeDialog.js';
17
19
  import {
18
20
  acceptAiAutoCompleteSuggestion,
19
21
  aiAutoCompleteSuggestion,
@@ -47,7 +49,7 @@ export interface AiCodeGenerationConfig {
47
49
  onRequestTriggered: () => void;
48
50
  onResponseReceived: () => void;
49
51
  disclaimerTooltipId: string;
50
- disclaimerTextVariant: PanelCommon.DisclaimerTextVariant;
52
+ disclaimerTextVariant: DisclaimerTextVariant;
51
53
  }
52
54
 
53
55
  export class AiCodeGenerationProvider {
@@ -60,7 +62,7 @@ export class AiCodeGenerationProvider {
60
62
  Common.Settings.Settings.instance().createSetting('ai-code-generation-onboarding-completed', false);
61
63
  #aiCodeGenerationUsedSetting = Common.Settings.Settings.instance().createSetting('ai-code-generation-used', false);
62
64
  #generationTeaserCompartment = new CodeMirror.Compartment();
63
- #generationTeaser: PanelCommon.AiCodeGenerationTeaser.AiCodeGenerationTeaser;
65
+ #generationTeaser: AiCodeGenerationTeaser;
64
66
  #editor?: TextEditor;
65
67
  #aiCodeGenerationConfig: AiCodeGenerationConfig;
66
68
  #aiCodeGeneration?: AiCodeGeneration.AiCodeGeneration.AiCodeGeneration;
@@ -83,7 +85,7 @@ export class AiCodeGenerationProvider {
83
85
  if (!AiCodeGeneration.AiCodeGeneration.AiCodeGeneration.isAiCodeGenerationAvailable()) {
84
86
  throw new Error('AI code generation feature is not available.');
85
87
  }
86
- this.#generationTeaser = new PanelCommon.AiCodeGenerationTeaser.AiCodeGenerationTeaser();
88
+ this.#generationTeaser = new AiCodeGenerationTeaser();
87
89
  this.#generationTeaser.disclaimerTooltipId = aiCodeGenerationConfig.disclaimerTooltipId;
88
90
  this.#generationTeaser.disclaimerTextVariant = aiCodeGenerationConfig.disclaimerTextVariant;
89
91
  this.#aiCodeGenerationConfig = aiCodeGenerationConfig;
@@ -186,8 +188,8 @@ export class AiCodeGenerationProvider {
186
188
  this.#dismissTeaserAndSuggestion();
187
189
  return true;
188
190
  }
189
- const generationTeaserIsLoading = this.#generationTeaser.displayState ===
190
- PanelCommon.AiCodeGenerationTeaser.AiCodeGenerationTeaserDisplayState.LOADING;
191
+ const generationTeaserIsLoading =
192
+ this.#generationTeaser.displayState === AiCodeGenerationTeaserDisplayState.LOADING;
191
193
  if (this.#generationTeaser.isShowing() && generationTeaserIsLoading) {
192
194
  this.#controller.abort();
193
195
  this.#controller = new AbortController();
@@ -248,13 +250,13 @@ export class AiCodeGenerationProvider {
248
250
 
249
251
  const noLogging = Root.Runtime.hostConfig.aidaAvailability?.enterprisePolicyValue ===
250
252
  Root.Runtime.GenAiEnterprisePolicyValue.ALLOW_WITHOUT_LOGGING;
251
- const resolved = await PanelCommon.AiCodeGenerationUpgradeDialog.show({noLogging});
253
+ const resolved = await AiCodeGenerationUpgradeDialog.show({noLogging});
252
254
  this.#aiCodeGenerationOnboardingCompletedSetting.set(resolved);
253
255
  return resolved;
254
256
  }
255
257
 
256
258
  #dismissTeaserAndSuggestion(): void {
257
- this.#generationTeaser.displayState = PanelCommon.AiCodeGenerationTeaser.AiCodeGenerationTeaserDisplayState.TRIGGER;
259
+ this.#generationTeaser.displayState = AiCodeGenerationTeaserDisplayState.TRIGGER;
258
260
  this.#editor?.dispatch({
259
261
  effects: [
260
262
  setAiCodeGenerationTeaserMode.of(AiCodeGenerationTeaserMode.DISMISSED),
@@ -305,18 +307,15 @@ export class AiCodeGenerationProvider {
305
307
  if (currentTeaserMode === AiCodeGenerationTeaserMode.DISMISSED) {
306
308
  return;
307
309
  }
308
- if (this.#generationTeaser.displayState ===
309
- PanelCommon.AiCodeGenerationTeaser.AiCodeGenerationTeaserDisplayState.LOADING) {
310
+ if (this.#generationTeaser.displayState === AiCodeGenerationTeaserDisplayState.LOADING) {
310
311
  this.#controller.abort();
311
312
  this.#controller = new AbortController();
312
313
  this.#dismissTeaserAndSuggestion();
313
314
  return;
314
315
  }
315
- if (this.#generationTeaser.displayState ===
316
- PanelCommon.AiCodeGenerationTeaser.AiCodeGenerationTeaserDisplayState.GENERATED) {
316
+ if (this.#generationTeaser.displayState === AiCodeGenerationTeaserDisplayState.GENERATED) {
317
317
  update.view.dispatch({effects: setAiAutoCompleteSuggestion.of(null)});
318
- this.#generationTeaser.displayState =
319
- PanelCommon.AiCodeGenerationTeaser.AiCodeGenerationTeaserDisplayState.DISCOVERY;
318
+ this.#generationTeaser.displayState = AiCodeGenerationTeaserDisplayState.DISCOVERY;
320
319
  return;
321
320
  }
322
321
  }
@@ -342,7 +341,7 @@ export class AiCodeGenerationProvider {
342
341
  return;
343
342
  }
344
343
 
345
- this.#generationTeaser.displayState = PanelCommon.AiCodeGenerationTeaser.AiCodeGenerationTeaserDisplayState.LOADING;
344
+ this.#generationTeaser.displayState = AiCodeGenerationTeaserDisplayState.LOADING;
346
345
  try {
347
346
  const startTime = performance.now();
348
347
  this.#aiCodeGenerationConfig.onRequestTriggered();
@@ -386,8 +385,7 @@ export class AiCodeGenerationProvider {
386
385
  setAiCodeGenerationTeaserMode.of(AiCodeGenerationTeaserMode.ACTIVE),
387
386
  ],
388
387
  });
389
- this.#generationTeaser.displayState =
390
- PanelCommon.AiCodeGenerationTeaser.AiCodeGenerationTeaserDisplayState.GENERATED;
388
+ this.#generationTeaser.displayState = AiCodeGenerationTeaserDisplayState.GENERATED;
391
389
 
392
390
  AiCodeGeneration.debugLog('Suggestion dispatched to the editor', suggestionText);
393
391
  const citations = topSample.attributionMetadata?.citations ?? [];
@@ -409,8 +407,7 @@ export class AiCodeGenerationProvider {
409
407
  }
410
408
  }
411
409
 
412
- function aiCodeGenerationTeaserExtension(teaser: PanelCommon.AiCodeGenerationTeaser.AiCodeGenerationTeaser):
413
- CodeMirror.Extension {
410
+ function aiCodeGenerationTeaserExtension(teaser: AiCodeGenerationTeaser): CodeMirror.Extension {
414
411
  return CodeMirror.ViewPlugin.fromClass(class {
415
412
  #view: CodeMirror.EditorView;
416
413
 
@@ -436,8 +433,7 @@ function aiCodeGenerationTeaserExtension(teaser: PanelCommon.AiCodeGenerationTea
436
433
  const line = this.#view.state.doc.lineAt(cursorPosition);
437
434
 
438
435
  const isEmptyLine = line.length === 0;
439
- const canShowDiscoveryState =
440
- UI.UIUtils.PromotionManager.instance().canShowPromotion(PanelCommon.AiCodeGenerationTeaser.PROMOTION_ID);
436
+ const canShowDiscoveryState = UI.UIUtils.PromotionManager.instance().canShowPromotion(PROMOTION_ID);
441
437
 
442
438
  if ((isEmptyLine && canShowDiscoveryState)) {
443
439
  return CodeMirror.Decoration.set([
@@ -461,17 +457,17 @@ function aiCodeGenerationTeaserExtension(teaser: PanelCommon.AiCodeGenerationTea
461
457
  #updateTeaserState(state: CodeMirror.EditorState): void {
462
458
  // Only handle non loading and non generated states, as updates during and after generation are handled by
463
459
  // #abortOrDismissGenerationDuringUpdate in AiCodeGenerationProvider
464
- if (teaser.displayState === PanelCommon.AiCodeGenerationTeaser.AiCodeGenerationTeaserDisplayState.LOADING ||
465
- teaser.displayState === PanelCommon.AiCodeGenerationTeaser.AiCodeGenerationTeaserDisplayState.GENERATED) {
460
+ if (teaser.displayState === AiCodeGenerationTeaserDisplayState.LOADING ||
461
+ teaser.displayState === AiCodeGenerationTeaserDisplayState.GENERATED) {
466
462
  return;
467
463
  }
468
464
  const cursorPosition = state.selection.main.head;
469
465
  const line = state.doc.lineAt(cursorPosition);
470
466
  const isEmptyLine = line.length === 0;
471
467
  if (isEmptyLine) {
472
- teaser.displayState = PanelCommon.AiCodeGenerationTeaser.AiCodeGenerationTeaserDisplayState.DISCOVERY;
468
+ teaser.displayState = AiCodeGenerationTeaserDisplayState.DISCOVERY;
473
469
  } else {
474
- teaser.displayState = PanelCommon.AiCodeGenerationTeaser.AiCodeGenerationTeaserDisplayState.TRIGGER;
470
+ teaser.displayState = AiCodeGenerationTeaserDisplayState.TRIGGER;
475
471
  }
476
472
  }
477
473
  }, {
@@ -497,7 +493,7 @@ function aiCodeGenerationTeaserExtension(teaser: PanelCommon.AiCodeGenerationTea
497
493
  },
498
494
  keydown(event: KeyboardEvent): boolean {
499
495
  if (!UI.KeyboardShortcut.KeyboardShortcut.eventHasCtrlEquivalentKey(event) ||
500
- teaser.displayState !== PanelCommon.AiCodeGenerationTeaser.AiCodeGenerationTeaserDisplayState.TRIGGER) {
496
+ teaser.displayState !== AiCodeGenerationTeaserDisplayState.TRIGGER) {
501
497
  return false;
502
498
  }
503
499
  if (event.key === '.') {
@@ -1,16 +1,16 @@
1
1
  // Copyright 2025 The Chromium Authors
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
- import '../../ui/components/tooltips/tooltips.js';
5
-
6
- import * as Common from '../../core/common/common.js';
7
- import * as Host from '../../core/host/host.js';
8
- import * as i18n from '../../core/i18n/i18n.js';
9
- import * as Root from '../../core/root/root.js';
10
- import * as Buttons from '../../ui/components/buttons/buttons.js';
11
- import * as UI from '../../ui/legacy/legacy.js';
12
- import {Directives, html, nothing, render} from '../../ui/lit/lit.js';
13
- import * as VisualLogging from '../../ui/visual_logging/visual_logging.js';
4
+ import '../tooltips/tooltips.js';
5
+
6
+ import * as Common from '../../../core/common/common.js';
7
+ import * as Host from '../../../core/host/host.js';
8
+ import * as i18n from '../../../core/i18n/i18n.js';
9
+ import * as Root from '../../../core/root/root.js';
10
+ import * as UI from '../../legacy/legacy.js';
11
+ import {Directives, html, nothing, render} from '../../lit/lit.js';
12
+ import * as VisualLogging from '../../visual_logging/visual_logging.js';
13
+ import * as Buttons from '../buttons/buttons.js';
14
14
 
15
15
  import type {DisclaimerTextVariant} from './AiCodeCompletionDisclaimer.js';
16
16
  import styles from './aiCodeGenerationTeaser.css.js';
@@ -3,11 +3,11 @@
3
3
  // found in the LICENSE file.
4
4
  /* eslint-disable @devtools/no-lit-render-outside-of-view */
5
5
 
6
- import * as Host from '../../core/host/host.js';
7
- import * as i18n from '../../core/i18n/i18n.js';
8
- import * as Buttons from '../../ui/components/buttons/buttons.js';
9
- import * as UI from '../../ui/legacy/legacy.js';
10
- import * as Lit from '../../ui/lit/lit.js';
6
+ import * as Host from '../../../core/host/host.js';
7
+ import * as i18n from '../../../core/i18n/i18n.js';
8
+ import * as UI from '../../legacy/legacy.js';
9
+ import * as Lit from '../../lit/lit.js';
10
+ import * as Buttons from '../buttons/buttons.js';
11
11
 
12
12
  import styles from './aiCodeGenerationUpgradeDialog.css.js';
13
13
 
@@ -3,9 +3,13 @@
3
3
  // found in the LICENSE file.
4
4
 
5
5
  export * as AccessiblePlaceholder from './AccessiblePlaceholder.js';
6
+ export * as AiCodeCompletionDisclaimer from './AiCodeCompletionDisclaimer.js';
6
7
  export * as AiCodeCompletionProvider from './AiCodeCompletionProvider.js';
8
+ export * as AiCodeCompletionTeaser from './AiCodeCompletionTeaser.js';
7
9
  export * as AiCodeGenerationParser from './AiCodeGenerationParser.js';
8
10
  export * as AiCodeGenerationProvider from './AiCodeGenerationProvider.js';
11
+ export * as AiCodeGenerationTeaser from './AiCodeGenerationTeaser.js';
12
+ export * as AiCodeGenerationUpgradeDialog from './AiCodeGenerationUpgradeDialog.js';
9
13
  export * as AutocompleteHistory from './AutocompleteHistory.js';
10
14
  export * as Config from './config.js';
11
15
  export * as ExecutionPositionHighlighter from './ExecutionPositionHighlighter.js';
@@ -1431,7 +1431,7 @@ export class ToolbarSettingCheckbox extends ToolbarCheckbox {
1431
1431
  setting: Common.Settings.Setting<boolean>, tooltip?: Common.UIString.LocalizedString,
1432
1432
  alternateTitle?: Common.UIString.LocalizedString) {
1433
1433
  const uiDescriptor = SettingUIRegistration.SettingUIRegistration.maybeResolve(setting.descriptor());
1434
- const title = alternateTitle || uiDescriptor?.title?.() || setting.title();
1434
+ const title = alternateTitle ?? uiDescriptor?.title ?? ('' as Common.UIString.LocalizedString);
1435
1435
  super(title, tooltip, undefined, setting.name);
1436
1436
  bindCheckbox(this.element as CheckboxLabel, setting);
1437
1437
  }
@@ -8,13 +8,14 @@ import * as i18n from '../../../../core/i18n/i18n.js';
8
8
  import type * as SDK from '../../../../core/sdk/sdk.js';
9
9
  import type * as Protocol from '../../../../generated/protocol.js';
10
10
  import {createIcon, type Icon} from '../../../kit/kit.js';
11
+ import {render} from '../../../lit/lit.js';
11
12
  import * as UI from '../../legacy.js';
12
13
 
13
14
  import {sanitizeStyle} from './CSSStyleSanitizer.js';
14
15
  import customPreviewComponentStyles from './customPreviewComponent.css.js';
15
16
  import {
17
+ defaultObjectPresentation as defaultObjectPresentationTemplate,
16
18
  ObjectPropertiesMode,
17
- ObjectPropertiesSection,
18
19
  ObjectPropertiesSectionsTreeOutline,
19
20
  ObjectPropertyTreeElement,
20
21
  ObjectTree,
@@ -129,7 +130,7 @@ export class CustomPreviewSection {
129
130
  return (new CustomPreviewSection(remoteObject)).element();
130
131
  }
131
132
 
132
- const sectionElement = ObjectPropertiesSection.defaultObjectPresentation(remoteObject);
133
+ const sectionElement = defaultObjectPresentation(remoteObject);
133
134
  sectionElement.classList.toggle('custom-expandable-section-standard-section', remoteObject.hasChildren);
134
135
  return sectionElement;
135
136
  }
@@ -239,7 +240,14 @@ export class CustomPreviewComponent {
239
240
  if (this.element.shadowRoot) {
240
241
  this.element.shadowRoot.textContent = '';
241
242
  this.customPreviewSection = null;
242
- this.element.shadowRoot.appendChild(ObjectPropertiesSection.defaultObjectPresentation(this.object));
243
+ this.element.shadowRoot.appendChild(defaultObjectPresentation(this.object));
243
244
  }
244
245
  }
245
246
  }
247
+
248
+ function defaultObjectPresentation(object: SDK.RemoteObject.RemoteObject): Element {
249
+ const element = document.createElement('span');
250
+ // eslint-disable-next-line @devtools/no-lit-render-outside-of-view
251
+ render(defaultObjectPresentationTemplate(object), element);
252
+ return element;
253
+ }