/**
 * ProviderCommand - Provider management (read-only)
 * DD §17. No runtime model switching (immutable per session).
 *
 * @module packages/cli/src/commands/provider
 */

import { loadConfig } from '../bootstrap/loadConfig.js'

export function providerCommand(subcommand: string): void {
  const config = loadConfig()

  switch (subcommand) {
    case 'list':
      console.log('Configured providers:')
      console.log(`  📡 Current: ${config.provider} / ${config.model}`)
      console.log(`  Base URL: ${config.base_url || '(default)'}`)
      break

    case 'current':
      console.log(`Provider: ${config.provider}`)
      console.log(`Model:    ${config.model}`)
      console.log(`Base URL: ${config.base_url || '(default)'}`)
      break

    default:
      console.log('Usage: air provider <list|current>')
      console.log('Note: Provider/model is immutable per session.')
  }
}
