WorkbenchCatalog
public final class WorkbenchCatalog
io/agentscope/examples/copilotkit/a2ui/WorkbenchCatalog.java:32–256Workbench 目录,把智能体接入外部消息渠道与企业平台。位于 io.agentscope.examples.copilotkit.a2ui 包。核心成员包括 isKnownComponent、grammar、inlineCatalogSchema、CATALOG_ID、VERSION、BASIC_COMPONENTS。
The A2UI component catalog this example advertises to the model.
It is the basic A2UI v0.9 catalog plus four workbench-specific components. The very same
catalog id and component names are implemented on the browser side in
frontend/src/a2ui/workbenchCatalog.tsx via createCatalog(...), so anything the
model emits here has a matching React renderer.
字段摘要Field Summary
| 字段Field | 类型Type | 说明Description |
|---|---|---|
CATALOG_IDstaticfinal | String | 目录标识字段。 Catalog id shared with the browser catalog; goes into every `createSurface`. |
VERSIONstaticfinal | String | 版本字段。 A2UI wire version implemented by both sides. |
BASIC_COMPONENTSstaticfinal | Set<String> | 基础 COMPONENTS字段。 Basic catalog components the A2UI renderer ships out of the box. |
CUSTOM_COMPONENTSstaticfinal | Set<String> | 自定义 COMPONENTS字段。 Workbench components implemented only by this example. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public static boolean isKnownComponent(String component)static | 判断是否 `isKnownComponent`。 Returns whether the known component. |
public static String grammar(Set<String> clientComponents)static | 设置该参数。 Compact grammar handed to the LLM. |
public static Map<String, Object> inlineCatalogSchema(Set<String> clientComponents)static | 设置该参数。 The custom half of the catalog in A2UI v0.9 inline-catalog form. |
字段详情Field Detail
CATALOG_ID
public static final String CATALOG_ID
目录标识字段。声明为 public static final String CATALOG_ID。
Catalog id shared with the browser catalog; goes into every createSurface.
io/agentscope/examples/copilotkit/a2ui/WorkbenchCatalog.java:35VERSION
public static final String VERSION
版本字段。声明为 public static final String VERSION。
A2UI wire version implemented by both sides.
io/agentscope/examples/copilotkit/a2ui/WorkbenchCatalog.java:38BASIC_COMPONENTS
public static final Set<String> BASIC_COMPONENTS
基础 COMPONENTS字段。声明为 public static final Set BASIC_COMPONENTS。
Basic catalog components the A2UI renderer ships out of the box.
io/agentscope/examples/copilotkit/a2ui/WorkbenchCatalog.java:46–47CUSTOM_COMPONENTS
public static final Set<String> CUSTOM_COMPONENTS
自定义 COMPONENTS字段。声明为 public static final Set CUSTOM_COMPONENTS。
Workbench components implemented only by this example.
io/agentscope/examples/copilotkit/a2ui/WorkbenchCatalog.java:50–51方法详情Method Detail
isKnownComponent
public static boolean isKnownComponent(String component)
判断是否 isKnownComponent。
Returns whether the known component.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
component | String | component(类型 `String`)。The component. |
booleanio/agentscope/examples/copilotkit/a2ui/WorkbenchCatalog.java:55–57grammar
public static String grammar(Set<String> clientComponents)
设置该参数。
Compact grammar handed to the LLM.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
clientComponents | Set<String> | 客户端 Components(类型 `Set`)。custom components the browser can render; empty advertises all of them |
Stringio/agentscope/examples/copilotkit/a2ui/WorkbenchCatalog.java:97–101inlineCatalogSchema
public static Map<String, Object> inlineCatalogSchema(Set<String> clientComponents)
设置该参数。
The custom half of the catalog in A2UI v0.9 inline-catalog form.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
clientComponents | Set<String> | 客户端 Components(类型 `Set`)。custom components the browser can render; empty includes all of them |
Map<String, Object>io/agentscope/examples/copilotkit/a2ui/WorkbenchCatalog.java:169–228