import { relative } from 'path' import * as React from 'react' import { getCwd } from 'src/utils/cwd.js' import { Box, Text } from '@anthropic/ink' import { HighlightedCode } from './HighlightedCode.js' import { MessageResponse } from './MessageResponse.js' type Props = { notebook_path: string cell_id: string | undefined new_source: string cell_type?: 'code' | 'markdown' edit_mode?: 'replace' | 'insert' | 'delete' verbose: boolean } export function NotebookEditToolUseRejectedMessage({ notebook_path, cell_id, new_source, cell_type, edit_mode = 'replace', verbose, }: Props): React.ReactNode { const operation = edit_mode === 'delete' ? 'delete' : `${edit_mode} cell in` return ( User rejected {operation} {verbose ? notebook_path : relative(getCwd(), notebook_path)} at cell {cell_id} {edit_mode !== 'delete' && ( )} ) }