Describe a block for the LLM
describe_block.RdGeneric backing the describe_block assistant tool. The default
method describe_block.block reports the block's class, name,
arguments, external-control declaration, and incoming links. The
bulk of the description comes from base::format() on the block;
incoming links are computed from the board snapshot supplied
alongside. Block authors override their class when the default
isn't enough.
Usage
describe_block(x, board, id, ..., state = NULL)
# S3 method for class 'block'
describe_block(x, board, id, ..., state = NULL)Arguments
- x
A
block.- board
The current board snapshot, for resolving link metadata.
- id
The id under which the block lives on the board (the name attribute of the enclosing
blocksobject – block objects themselves do not carry an id because ids must be unique while block-level fields are user-supplied and need not be).- ...
Passed on to methods.
- state
Live block state as a named list covering the block's constructor inputs, rendered in place of the values the block was constructed with. The block object carries only its constructor frame, which is fixed at construction, so the
NULLdefault reports load-time values however long ago a commit or an edit in the block's own UI moved them on.
Value
Character vector of lines (consistent with
summarise_result() and describe_stack()). The tool that
consumes this collapses with paste(..., collapse = "\n")
before returning to ellmer.