Documentation
¶
Overview ¶
Package displaytext provides bounded, display-only text transformations shared by native and terminal views. It never changes stored tool messages.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PrettyJSON ¶
PrettyJSON preserves numeric spelling/key order and leaves non-JSON alone. Reject deep or expansion-heavy inputs before json.Indent allocates output.
func PrettyJSONRead ¶ added in v1.5.89
PrettyJSONRead formats the JSON body of the read tool's numbered output. Each source line is prefixed with a line number and a tab; reformatting the body would otherwise fail json.Valid, which is why a one-line document used to reach both frontends unchanged. Line numbers and trailing read notices (pagination/truncation) are preserved; a document that is not valid JSON is returned exactly as it came in.
Types ¶
This section is empty.