MCPcopy Create free account
hub / github.com/astercloud/aster / registerStandardComponents

Function registerStandardComponents

ui/src/protocol/standard-components.ts:159–167  ·  view source on GitHub ↗
(
  registry: ComponentRegistry,
  constructorMap?: Partial<Record<StandardComponentType, ComponentConstructor>>,
)

Source from the content-addressed store, hash-verified

157 * @param constructorMap - 可选的组件构造函数映射,用于提供实际的组件实现
158 */
159export function registerStandardComponents(
160 registry: ComponentRegistry,
161 constructorMap?: Partial<Record<StandardComponentType, ComponentConstructor>>,
162): void {
163 for (const componentType of STANDARD_COMPONENTS) {
164 const constructor = constructorMap?.[componentType] ?? createPlaceholderConstructor(componentType);
165 registry.register(componentType, constructor);
166 }
167}
168
169/**
170 * 创建并初始化标准组件注册表

Callers 2

createStandardRegistryFunction · 0.85

Calls 2

registerMethod · 0.80

Tested by

no test coverage detected