ethagent 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -78,7 +78,7 @@ export const MenuScreen: React.FC<MenuScreenProps> = ({
78
78
  { value: 'load', label: 'Switch Agent', hint: 'Load a different token owned by your wallet' },
79
79
  { value: 'create', label: 'New Agent', hint: 'Mint another token and make it active here' },
80
80
  { value: 'cancel', role: 'section', prefix: '--', label: 'Exit' },
81
- { value: 'cancel', label: 'Close Hub', hint: 'Return to chat without changing identity', role: 'utility' },
81
+ { value: 'cancel', label: 'Close Identity Hub', hint: 'Return to chat without changing identity', role: 'utility' },
82
82
  ]
83
83
  : [
84
84
  { value: 'create', role: 'section', prefix: '--', label: 'Setup' },
@@ -87,7 +87,7 @@ export const MenuScreen: React.FC<MenuScreenProps> = ({
87
87
  { value: 'skip', role: 'section', prefix: '--', label: 'Exit' },
88
88
  ...(mode === 'first-run'
89
89
  ? [{ value: 'skip' as Action, label: 'Skip For Now', hint: 'Continue now; use /identity later', role: 'utility' as const }]
90
- : [{ value: 'cancel' as Action, label: 'Close Hub', hint: 'Return to chat without changing identity', role: 'utility' as const }]),
90
+ : [{ value: 'cancel' as Action, label: 'Close Identity Hub', hint: 'Return to chat without changing identity', role: 'utility' as const }]),
91
91
  ]
92
92
 
93
93
  return (
@@ -3,6 +3,7 @@ import { Box, Text } from 'ink'
3
3
  import { Surface } from '../../../ui/Surface.js'
4
4
  import { Select } from '../../../ui/Select.js'
5
5
  import { theme } from '../../../ui/theme.js'
6
+ import { localChangeStatusView, type LocalChangeStatusView } from '../identityHubModel.js'
6
7
 
7
8
  import type { ContinuityWorkingTreeStatus } from '../../continuity/storage.js'
8
9
 
@@ -31,29 +32,21 @@ export const RecoveryConfirmScreen: React.FC<RecoveryConfirmScreenProps> = ({ mo
31
32
  ? 'Any local edits to SOUL.md, MEMORY.md, skills.json, and public profile become the saved state. The previous snapshot pointer is overwritten.'
32
33
  : 'Unsaved local edits will be lost. Use this when local files are missing or out of sync with the latest saved snapshot.'
33
34
 
34
- const needsBackup = workingStatus?.publishState === 'local-changes' || workingStatus?.publishState === 'not-published' || workingStatus?.publishState === 'verify-needed'
35
- let changedFiles: string[] = []
36
- if (isPublish && needsBackup) {
37
- if (workingStatus?.localContentHashes && workingStatus?.publishedContentHashes) {
38
- if (workingStatus.localContentHashes['SOUL.md'] !== workingStatus.publishedContentHashes['SOUL.md']) changedFiles.push('SOUL.md')
39
- if (workingStatus.localContentHashes['MEMORY.md'] !== workingStatus.publishedContentHashes['MEMORY.md']) changedFiles.push('MEMORY.md')
40
- if (workingStatus.localContentHashes['skills.json'] !== workingStatus.publishedContentHashes['skills.json']) changedFiles.push('skills.json')
41
- } else {
42
- changedFiles = ['SOUL.md', 'MEMORY.md', 'skills.json']
43
- }
44
- }
35
+ const localChangeStatus = localChangeStatusView(workingStatus)
45
36
 
46
37
  return (
47
38
  <Surface title={title} subtitle={subtitle} footer={footer} tone="primary">
48
39
  <Box flexDirection="column">
49
40
  <Text color={headlineColor}>{headline}</Text>
50
41
  <Text color={theme.textSubtle}>{detail}</Text>
51
- {isPublish && changedFiles.length > 0 && (
42
+ {isPublish && (
43
+ <Box marginTop={1}>
44
+ <SaveSnapshotStatusLine status={localChangeStatus} />
45
+ </Box>
46
+ )}
47
+ {!isPublish && (
52
48
  <Box marginTop={1}>
53
- <Text>
54
- <Text color={theme.textSubtle}>ready to save: </Text>
55
- <Text color={theme.accentMint} bold>{changedFiles.join(', ')}</Text>
56
- </Text>
49
+ <Text color={theme.accentPeach}>Overwrite your local files?</Text>
57
50
  </Box>
58
51
  )}
59
52
  </Box>
@@ -85,3 +78,18 @@ export const RecoveryConfirmScreen: React.FC<RecoveryConfirmScreenProps> = ({ mo
85
78
  </Surface>
86
79
  )
87
80
  }
81
+
82
+ const SaveSnapshotStatusLine: React.FC<{ status: LocalChangeStatusView }> = ({ status }) => {
83
+ if (status.hasLocalChanges) {
84
+ return (
85
+ <Text>
86
+ <Text color={theme.textSubtle}>Local changes detected: </Text>
87
+ <Text color="#e87070" bold>{status.files.length > 0 ? status.files.join(', ') : 'local files differ from saved snapshot'}</Text>
88
+ </Text>
89
+ )
90
+ }
91
+
92
+ const color = status.tone === 'ok' ? theme.accentMint : status.tone === 'warn' ? theme.accentPeach : theme.dim
93
+ const label = status.detail === 'None detected' ? 'No local changes detected.' : status.detail
94
+ return <Text color={color}>{label}</Text>
95
+ }
@@ -82,6 +82,9 @@ export const StorageCredentialScreen: React.FC<StorageCredentialScreenProps> = (
82
82
  <Text key={line} color={theme.dim}>- {line}</Text>
83
83
  ))}
84
84
  </Box>
85
+ <Box marginTop={1}>
86
+ <Text color={theme.accentPeach}>Remove the token from this machine?</Text>
87
+ </Box>
85
88
  <Box marginTop={1}>
86
89
  <Select<StorageCredentialAction>
87
90
  options={[