component_shape!() { /* proc-macro */ }Expand description
Function-like macro for declaring a local GPUI component shape around external component/state types.
The backing state may be declared as type State = ...; or state = ...;.
When no explicit value = ... or values(...) metadata is present, a
nested GpuiComponentValueBinding<T> impl publishes T as a supported value
and enables value-binding metadata.
Common MCP input metadata is inferred from declared value metadata when the
shape has unambiguous string, boolean, numeric, date, date-time, array, set,
range, object-map, or unconstrained JSON value shapes. Each generated
ComponentShapeFor<Value> impl carries the value-specific metadata; the
shape-level metadata is emitted only when all declared values agree. Use
mcp_input = string, mcp_input = object, or another McpInput expression
when a generic or custom shape knows its model-facing MCP input better than
the value type can be inferred.