MCPcopy Create free account
hub / github.com/compozy/agh / compactJSON

Function compactJSON

internal/cli/format.go:352–361  ·  view source on GitHub ↗
(raw json.RawMessage)

Source from the content-addressed store, hash-verified

350}
351
352func compactJSON(raw json.RawMessage) string {
353 if len(raw) == 0 {
354 return ""
355 }
356 var buffer bytes.Buffer
357 if err := json.Compact(&buffer, raw); err != nil {
358 return strings.TrimSpace(string(raw))
359 }
360 return buffer.String()
361}
362
363func formatTime(value time.Time) string {
364 if value.IsZero() {

Callers 15

bridgeBundleFunction · 0.70
TestFormatHelpersFunction · 0.70
toolInfoBundleFunction · 0.70
streamSessionEventsFunction · 0.70
sessionEventsBundleFunction · 0.70
sessionHistoryBundleFunction · 0.70
agentEventsBundleFunction · 0.70
taskBundleFunction · 0.70
taskBlockKeyValuesFunction · 0.70
taskRunReviewRowsFunction · 0.70
taskRunBundleFunction · 0.70

Calls 1

StringMethod · 0.45

Tested by 3

TestFormatHelpersFunction · 0.56