import React from 'react' import { Box, Dialog, wrappedRender as render, Text } from '@anthropic/ink' import { KeybindingSetup } from '../keybindings/KeybindingProviderSetup.js' import { AppStateProvider } from '../state/AppState.js' import type { ConfigParseError } from '../utils/errors.js' import { getBaseRenderOptions } from '../utils/renderOptions.js' import { jsonStringify, writeFileSync_DEPRECATED, } from '../utils/slowOperations.js' import type { ThemeName } from '../utils/theme.js' import { Select } from './CustomSelect/index.js' interface InvalidConfigHandlerProps { error: ConfigParseError } interface InvalidConfigDialogProps { filePath: string errorDescription: string onExit: () => void onReset: () => void } /** * Dialog shown when the Claude config file contains invalid JSON */ function InvalidConfigDialog({ filePath, errorDescription, onExit, onReset, }: InvalidConfigDialogProps): React.ReactNode { // Handler for Select onChange const handleSelect = (value: string) => { if (value === 'exit') { onExit() } else { onReset() } } return ( The configuration file at {filePath} contains invalid JSON. {errorDescription} Choose an option: