MCPcopy Create free account
hub / github.com/Noumena-Network/code / SnapshotUpdateDialog

Function SnapshotUpdateDialog

src/components/agents/SnapshotUpdateDialog.tsx:36–74  ·  view source on GitHub ↗
({
  agentType,
  scope,
  snapshotTimestamp,
  onComplete,
  onCancel,
}: Props)

Source from the content-addressed store, hash-verified

34}
35
36export 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}

Callers

nothing calls this directly

Calls 2

formatScopeFunction · 0.85
buildMergePromptFunction · 0.85

Tested by

no test coverage detected