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

Function createStandardRegistry

ui/src/protocol/standard-components.ts:176–188  ·  view source on GitHub ↗
(
  constructorMap?: Partial<Record<StandardComponentType, ComponentConstructor>>,
  freeze: boolean = false,
)

Source from the content-addressed store, hash-verified

174 * @returns 初始化后的组件注册表
175 */
176export function createStandardRegistry(
177 constructorMap?: Partial<Record<StandardComponentType, ComponentConstructor>>,
178 freeze: boolean = false,
179): ComponentRegistry {
180 const registry = createComponentRegistry();
181 registerStandardComponents(registry, constructorMap);
182
183 if (freeze) {
184 registry.freeze();
185 }
186
187 return registry;
188}
189
190/**
191 * 默认的标准组件注册表实例

Calls 3

createComponentRegistryFunction · 0.90
freezeMethod · 0.80

Tested by 1

createTestContextFunction · 0.72