MCPcopy Index your code
hub / github.com/callstack/agent-device / renderCommandSection

Function renderCommandSection

src/cli/parser/cli-help.ts:1042–1052  ·  view source on GitHub ↗
(
  commands: Array<{ name: string; schema: CommandSchema; usage: string }>,
)

Source from the content-addressed store, hash-verified

1040}
1041
1042function renderCommandSection(
1043 commands: Array<{ name: string; schema: CommandSchema; usage: string }>,
1044): string {
1045 return renderAlignedSection(
1046 'Commands:',
1047 commands.map((command) => ({
1048 label: command.usage,
1049 description: command.schema.summary ?? command.schema.helpDescription,
1050 })),
1051 );
1052}
1053
1054export function buildCommandUsageText(commandName: string): string | null {
1055 const topicHelp = buildHelpTopicUsageText(commandName);

Callers 1

renderUsageTextFunction · 0.85

Calls 1

renderAlignedSectionFunction · 0.85

Tested by

no test coverage detected