({
agentType,
scope,
snapshotTimestamp,
onComplete,
onCancel,
}: Props)
| 34 | } |
| 35 | |
| 36 | export function SnapshotUpdateDialog({ |
| 37 | agentType, |
| 38 | scope, |
| 39 | snapshotTimestamp, |
| 40 | onComplete, |
| 41 | onCancel, |
| 42 | }: Props): React.ReactNode { |
| 43 | const options = [ |
| 44 | { |
| 45 | label: 'Merge current memory with the snapshot', |
| 46 | value: 'merge', |
| 47 | }, |
| 48 | { |
| 49 | label: 'Replace current memory with the snapshot', |
| 50 | value: 'replace', |
| 51 | }, |
| 52 | { |
| 53 | label: 'Keep current memory', |
| 54 | value: 'keep', |
| 55 | }, |
| 56 | ] as const |
| 57 | |
| 58 | return ( |
| 59 | <Dialog title="Agent Memory Update" onCancel={onCancel} color="warning"> |
| 60 | <Box flexDirection="column" gap={1}> |
| 61 | <Text> |
| 62 | A newer snapshot is available for <Text bold>{agentType}</Text>{' '} |
| 63 | ({formatScope(scope)} memory). |
| 64 | </Text> |
| 65 | <Text dimColor>Snapshot timestamp: {snapshotTimestamp}</Text> |
| 66 | <Text dimColor>{buildMergePrompt(agentType, scope)}</Text> |
| 67 | <Select |
| 68 | options={options} |
| 69 | onChange={value => onComplete(value as 'merge' | 'keep' | 'replace')} |
| 70 | /> |
| 71 | </Box> |
| 72 | </Dialog> |
| 73 | ) |
| 74 | } |
nothing calls this directly
no test coverage detected