Skip to main content

Module refs

Module refs 

Source
Expand description

Shared reference-style URL preservation.

Both the fetch path and the search path cite URLs with inline [N] markers and collect the full URLs into a trailing block. This module owns the one canonical rendering of that block, and the budgeting rule that keeps the block and the body it belongs to inside a token cap together.

Structs§

Reference
A slim reference entry (index → URL) for an output’s reference block.

Traits§

Referable
Anything that can be listed in a reference block: an index and a URL.

Functions§

cited_indices
Collect the distinct [N] reference indices cited in text, in order.
fit_to_budget
Fit body plus its reference block inside max_tokens.
render_block
Render references into the canonical block: