diff --git a/src/commands/help-command.ts b/src/commands/help-command.ts index 38953277..4d028e97 100644 --- a/src/commands/help-command.ts +++ b/src/commands/help-command.ts @@ -353,7 +353,9 @@ Run ${color('ccs config', 'command')} for web dashboard`.trim(); ['', ''], // Spacer ['ccs cliproxy pause

', 'Pause account from rotation'], ['ccs cliproxy resume

', 'Resume paused account'], - ['ccs cliproxy status [provider]', 'Show quota/tier/pause status'], + ['ccs cliproxy status', 'Show CLIProxy process status'], + ['ccs cliproxy quota', 'Show quota/tier/pause status for all providers'], + ['ccs cliproxy quota --provider ', 'Show quota/tier/pause status for one provider'], ]); // CLI Proxy configuration flags (new) diff --git a/tests/unit/commands/help-command-parity.test.ts b/tests/unit/commands/help-command-parity.test.ts new file mode 100644 index 00000000..2aebfc8b --- /dev/null +++ b/tests/unit/commands/help-command-parity.test.ts @@ -0,0 +1,29 @@ +import { afterEach, describe, expect, test } from 'bun:test'; + +import { handleHelpCommand } from '../../../src/commands/help-command'; + +function stripAnsi(input: string): string { + return input.replace(/\u001b\[[0-9;]*m/g, ''); +} + +describe('help command parity', () => { + const originalLog = console.log; + + afterEach(() => { + console.log = originalLog; + }); + + test('root help documents cliproxy provider filter under quota command', async () => { + const lines: string[] = []; + console.log = (...args: unknown[]) => { + lines.push(args.map((arg) => String(arg)).join(' ')); + }; + + await handleHelpCommand(); + + const rendered = stripAnsi(lines.join('\n')); + expect(rendered.includes('ccs cliproxy status [provider]')).toBe(false); + expect(rendered.includes('ccs cliproxy status')).toBe(true); + expect(rendered.includes('ccs cliproxy quota --provider ')).toBe(true); + }); +});