MCPcopy Create free account
hub / github.com/langgenius/dify / formatTopic

Function formatTopic

cli/src/framework/help.ts:157–162  ·  view source on GitHub ↗
(topic: HelpTopic, format = '')

Source from the content-addressed store, hash-verified

155}
156
157export function formatTopic(topic: HelpTopic, format = ''): string {
158 if (isStructured(format))
159 return serialize({ name: topic.name, summary: topic.summary, body: topic.render() }, format)
160
161 return topic.render()
162}
163
164// Renders a list of commands as aligned `path description` rows, grouped by
165// their first path segment (a blank line between groups). Shared by the

Callers 1

runFunction · 0.90

Calls 3

isStructuredFunction · 0.85
serializeFunction · 0.70
renderMethod · 0.45

Tested by

no test coverage detected