| # Copyright 2023 The Chromium Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("../../../scripts/build/ninja/devtools_entrypoint.gni") |
| import("../../../scripts/build/ninja/devtools_module.gni") |
| import("../../../scripts/build/ninja/generate_css.gni") |
| import("../../../scripts/build/typescript/typescript.gni") |
| import("../visibility.gni") |
| |
| generate_css("css_files") { |
| sources = [ |
| "./components/consoleInsight.css", |
| "./components/consoleInsightSourcesList.css", |
| ] |
| } |
| |
| devtools_module("explain") { |
| sources = [ |
| "ActionDelegate.ts", |
| "PromptBuilder.ts", |
| "components/ConsoleInsight.ts", |
| ] |
| |
| deps = [ |
| ":css_files", |
| "../../core/common:bundle", |
| "../../core/host:bundle", |
| "../../core/root:bundle", |
| "../../core/sdk:bundle", |
| "../../models/logs:bundle", |
| "../../third_party/marked:bundle", |
| "../../ui/components/markdown_view:bundle", |
| "../../ui/legacy:bundle", |
| "../../ui/legacy/components/source_frame:bundle", |
| "../console:bundle", |
| "../sources:bundle", |
| ] |
| } |
| |
| devtools_entrypoint("bundle") { |
| entrypoint = "explain.ts" |
| |
| deps = [ ":explain" ] |
| |
| visibility = [ |
| ":*", |
| "../../../test/interactions/*", |
| "../../entrypoints/*", |
| "../../legacy_test_runner/*", |
| "../../ui/components/docs/console_insight/*", |
| ] |
| |
| visibility += devtools_panels_visibility |
| } |
| |
| devtools_entrypoint("meta") { |
| entrypoint = "explain-meta.ts" |
| |
| deps = [ |
| ":bundle", |
| "../../core/common:bundle", |
| "../../core/i18n:bundle", |
| "../../core/root:bundle", |
| "../../panels/console:bundle", |
| "../../ui/legacy:bundle", |
| ] |
| |
| visibility = [ "../../entrypoints/*" ] |
| } |
| |
| ts_library("unittests") { |
| testonly = true |
| |
| sources = [ |
| "PromptBuilder.test.ts", |
| "components/ConsoleInsight.test.ts", |
| ] |
| |
| deps = [ |
| ":bundle", |
| "../../core/common:bundle", |
| "../../testing", |
| ] |
| } |