// src/platform/command-runtime/help.ts
function formatSlashCommands(commands) {
  return commands.map((command) => `  ${command.command.padEnd(24)} ${command.description}`).join("\n");
}
function createCliHelpText(commands, currentService, binaryName = "ju-hong-e") {
  const serviceSection = currentService ? `Current Service:
  ${currentService}

` : "";
  return `
Usage: ${binaryName} [options]

Options:
  --service <codex|gemini|claude>   \uC2DC\uC791 \uC11C\uBE44\uC2A4 \uC9C0\uC815
  --model <name>                    \uC11C\uBE44\uC2A4\uBCC4 \uBAA8\uB378 \uC9C0\uC815
  --reasoning-effort <level>        minimal|low|medium|high
  --test                            \uC2E4\uC81C AI \uD638\uCD9C \uC5C6\uC774 \uC804\uCCB4 \uD750\uB984 \uD14C\uC2A4\uD2B8
  --trace                           trace \uB85C\uADF8\uB97C \uCF58\uC194\uC5D0 \uCD9C\uB825
  --help                            \uB3C4\uC6C0\uB9D0 \uCD9C\uB825

Slash Commands:
${formatSlashCommands(commands)}

Shell Commands:
  /sh <command>              \uB85C\uCEEC shell\uC5D0 \uC6D0\uBB38 \uADF8\uB300\uB85C \uC804\uB2EC\uD574 \uC21C\uC218 \uD130\uBBF8\uB110 \uBA85\uB839 \uC2E4\uD589
  /sh                        \uC778\uD130\uB799\uD2F0\uBE0C shell \uC138\uC158\uC744 \uC5F4\uACE0 \uC885\uB8CC \uC2DC \uC8FC\uD64D\uC774\uB85C \uBCF5\uADC0

Shortcuts:
  ESC                        \uD604\uC7AC \uC791\uC5C5 \uB610\uB294 \uC785\uB825\uB9CC \uCDE8\uC18C
  Ctrl+C                     \uC138\uC158 \uC885\uB8CC
  Shift+Up/Down              \uC785\uB825 \uD788\uC2A4\uD1A0\uB9AC \uC774\uB3D9

${serviceSection}`.trim();
}

export { createCliHelpText };
