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

Function formatTopLevelHelp

cli/src/framework/help.ts:238–249  ·  view source on GitHub ↗
(tree: CommandTree, format: string)

Source from the content-addressed store, hash-verified

236}
237
238export function formatTopLevelHelp(tree: CommandTree, format: string): string {
239 if (isStructured(format)) {
240 return serialize({
241 bin: BIN,
242 contract: CONTRACT,
243 commands: collectCommands(tree).map(({ command, path }) => describeCommand(command, path.join(' '))),
244 topics: TOPICS.map(t => ({ name: t.name, summary: t.summary })),
245 }, format)
246 }
247
248 return formatTopLevelHelpText(tree)
249}

Callers 2

help.test.tsFile · 0.90
runFunction · 0.90

Calls 7

collectCommandsFunction · 0.90
isStructuredFunction · 0.85
describeCommandFunction · 0.85
formatTopLevelHelpTextFunction · 0.85
serializeFunction · 0.70
mapMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected