| 1398 | } |
| 1399 | |
| 1400 | function formatHelpReport(commands: readonly AvailableCommand[]): string { |
| 1401 | const visibleCommands: readonly AvailableCommand[] = |
| 1402 | commands.length > 0 ? commands : ACP_BUILTIN_SLASH_COMMANDS; |
| 1403 | return [ |
| 1404 | 'Available ACP commands:', |
| 1405 | ...visibleCommands.map((command) => { |
| 1406 | const hint = command.input?.hint ? ` ${command.input.hint}` : ''; |
| 1407 | return `- /${command.name}${hint} — ${command.description}`; |
| 1408 | }), |
| 1409 | ].join('\n'); |
| 1410 | } |
| 1411 | |
| 1412 | function formatStatusReport(status: SessionStatus): string { |
| 1413 | const maxTokens = status.maxContextTokens > 0 ? status.maxContextTokens.toLocaleString('en-US') : 'unknown'; |