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

Function formatCommandList

cli/src/framework/help.ts:196–201  ·  view source on GitHub ↗
(commands: Array<{ command: CommandConstructor, path: string[] }>, format: string)

Source from the content-addressed store, hash-verified

194// aligned rows. Keeps `<group> --help -o json` machine-readable like every
195// other help surface.
196export function formatCommandList(commands: Array<{ command: CommandConstructor, path: string[] }>, format: string): string {
197 if (isStructured(format))
198 return serialize({ commands: commands.map(({ command, path }) => describeCommand(command, path.join(' '))) }, format)
199
200 return `COMMANDS\n${renderCommandRows(commands)}\n`
201}
202
203// Curated onboarding examples for the top-level overview (gh-style): the
204// shortest path from zero to a structured app run. Editorial, not an exhaustive

Callers 1

runFunction · 0.90

Calls 6

isStructuredFunction · 0.85
describeCommandFunction · 0.85
renderCommandRowsFunction · 0.85
serializeFunction · 0.70
mapMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected