mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor(core): move devtools ai tool definition types to primitives
Extract the AI tool definition interfaces from the core debug module to the devtools primitives module. This relocates ToolDefinition, ToolGroup, and DevtoolsToolDiscoveryEvent to the primitives folder, exposing them cleanly via "export type" in the devtools entry point, improving module organization and readability.
(cherry picked from commit bf6dba878e)
This commit is contained in:
@@ -8,3 +8,4 @@
|
||||
|
||||
export {ProfilerEvent, type Profiler} from './src/profiler_types';
|
||||
export {Framework} from './src/framework';
|
||||
export type {DevtoolsToolDiscoveryEvent, ToolDefinition, ToolGroup} from './src/tool_definitions';
|
||||
|
||||
@@ -13,7 +13,7 @@ import {INJECTOR, LView, T_HOST, TVIEW, TViewType} from '../../render3/interface
|
||||
import {DiGraph, SerializedInjector, serializeInjector} from './serialized_di_graph';
|
||||
import {ChainedInjector} from '../../render3/chained_injector';
|
||||
import {Injector} from '../../di/injector';
|
||||
import {ToolDefinition} from './tool_definitions';
|
||||
import {ToolDefinition} from '../../../primitives/devtools';
|
||||
import {walkLViewDirectives} from './traversal';
|
||||
import {getLViewParent} from '../../render3/util/view_utils';
|
||||
import {R3Injector} from '../../di/r3_injector';
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import {diGraphTool} from './di_graph';
|
||||
import {signalGraphTool} from './signal_graph';
|
||||
import {DevtoolsToolDiscoveryEvent} from './tool_definitions';
|
||||
import {DevtoolsToolDiscoveryEvent} from '../../../primitives/devtools';
|
||||
|
||||
/**
|
||||
* Registers Angular AI tools with Chrome DevTools.
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import {NullInjector} from '../../di/null_injector';
|
||||
import {getInjector} from '../../render3/util/discovery_utils';
|
||||
import {DebugSignalGraph, getSignalGraph} from '../../render3/util/signal_debug';
|
||||
import {ToolDefinition} from './tool_definitions';
|
||||
import {ToolDefinition} from '../../../primitives/devtools';
|
||||
|
||||
// Omit `debuggableFn` and `id` from returned signal graph to AI agent.
|
||||
type AiSignalGraph = Omit<DebugSignalGraph, 'nodes'> & {
|
||||
|
||||
@@ -37,6 +37,7 @@ ts_project(
|
||||
"//packages/common/locales",
|
||||
"//packages/compiler",
|
||||
"//packages/core",
|
||||
"//packages/core/primitives/devtools",
|
||||
"//packages/core/rxjs-interop",
|
||||
"//packages/core/src/di/interface",
|
||||
"//packages/core/src/interface",
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
import {signalGraphTool} from '../../../src/debug/ai/signal_graph';
|
||||
import {registerAiTools} from '../../../src/debug/ai';
|
||||
import {DevtoolsToolDiscoveryEvent} from '../../../src/debug/ai/tool_definitions';
|
||||
import {DevtoolsToolDiscoveryEvent} from '../../../primitives/devtools';
|
||||
import {destroyPlatform} from '../../../src/core';
|
||||
|
||||
describe('registration', () => {
|
||||
|
||||
Reference in New Issue
Block a user