Documentation
¶
Overview ¶
Package render provides advanced source code rendering modes for LLM context.
It transforms full source code into more compact representations by leveraging parsed symbol information. Modes include signatures-only, skeleton (signatures + body placeholders), and focused (full bodies for query-relevant symbols, signatures for the rest).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RenderFile ¶
RenderFile transforms source code according to the rendering mode, using parsed symbol information to identify which lines belong to function/method bodies vs. declarations.
For symbols of structural kinds (struct, interface, class, type), the full body is always preserved since fields ARE the API surface.
Types ¶
type Mode ¶
type Mode string
Mode controls how source code is rendered for LLM context.
const ( // ModeDefault preserves the original source (existing behavior). ModeDefault Mode = "" // ModeSignatures keeps only declaration signatures, removing all bodies. ModeSignatures Mode = "signatures" // ModeSkeleton keeps signatures with "⋮..." placeholders for bodies. ModeSkeleton Mode = "skeleton" // ModeFocused keeps full bodies for query-relevant symbols and // signatures only for the rest. ModeFocused Mode = "focused" )