bugfix:修复一些bug
This commit is contained in:
@@ -46,10 +46,7 @@ def _require_catalog() -> ComponentCatalog:
|
||||
|
||||
@mcp.tool()
|
||||
async def list_components() -> dict[str, Any]:
|
||||
"""列出可以新增的组件:key、type、名称、用途和默认宽高
|
||||
|
||||
新建大屏、新增组件或更换类型时,先从这里选类型,再用 get_component_materials 查看默认配置
|
||||
"""
|
||||
"""列出可以新增的组件:key、type、名称、用途和默认宽高"""
|
||||
return material_fields.list_components(_require_catalog())
|
||||
|
||||
|
||||
@@ -60,10 +57,7 @@ async def get_component_materials(
|
||||
Field(description="要使用的物料类型,可一次传多个", min_length=1),
|
||||
],
|
||||
) -> dict[str, Any]:
|
||||
"""获取物料的完整默认配置(schema)和使用说明
|
||||
|
||||
新增组件前先查看所选类型的默认配置,只覆盖需要修改的字段,不从零编写 props
|
||||
"""
|
||||
"""获取物料的完整默认配置(schema)和使用说明"""
|
||||
return material_fields.get_materials(_require_catalog(), component_types)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user