diff --git a/desktop/src/components/IdentityChangeProposal.tsx b/desktop/src/components/IdentityChangeProposal.tsx index fe466bf..58c1954 100644 --- a/desktop/src/components/IdentityChangeProposal.tsx +++ b/desktop/src/components/IdentityChangeProposal.tsx @@ -275,30 +275,81 @@ function HistoryItem({ onRestore: () => void; isRestoring: boolean; }) { + const [expanded, setExpanded] = useState(false); const timeAgo = getTimeAgo(snapshot.timestamp); + // Determine which files changed + const fileEntries: Array<{ key: string; label: string; color: string; content: string }> = []; + if (snapshot.files?.soul) { + fileEntries.push({ key: 'soul', label: 'Soul', color: 'text-purple-600 dark:text-purple-400', content: snapshot.files.soul }); + } + if (snapshot.files?.instructions) { + fileEntries.push({ key: 'instructions', label: 'Instructions', color: 'text-blue-600 dark:text-blue-400', content: snapshot.files.instructions }); + } + if (snapshot.files?.user_profile) { + fileEntries.push({ key: 'user_profile', label: 'Profile', color: 'text-emerald-600 dark:text-emerald-400', content: snapshot.files.user_profile }); + } + return ( -
+ {snapshot.reason || '自动快照'} +
+ {fileEntries.length > 0 && ( +- {snapshot.reason || '自动快照'} -
+ {content.slice(0, 500)}
+ {content.length > 500 ? '...' : ''}
+
+