import React from 'react' import { Text } from '@anthropic/ink' import { Select } from './CustomSelect/index.js' import { Dialog } from '@anthropic/ink' export type ChannelDowngradeChoice = 'downgrade' | 'stay' | 'cancel' type Props = { currentVersion: string onChoice: (choice: ChannelDowngradeChoice) => void } /** * Dialog shown when switching from latest to stable channel. * Allows user to choose whether to downgrade or stay on current version. */ export function ChannelDowngradeDialog({ currentVersion, onChoice, }: Props): React.ReactNode { function handleSelect(value: ChannelDowngradeChoice): void { onChoice(value) } function handleCancel(): void { onChoice('cancel') } return ( The stable channel may have an older version than what you're currently running ({currentVersion}). How would you like to handle this?