ei-tui 0.6.3 → 0.6.5
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.
- package/package.json +1 -1
- package/src/core/handlers/dedup.ts +4 -1
- package/src/core/handlers/human-matching.ts +33 -15
- package/src/core/handlers/index.ts +1 -0
- package/src/core/orchestrators/human-extraction.ts +72 -11
- package/src/core/orchestrators/index.ts +2 -0
- package/src/core/types/enums.ts +1 -0
- package/src/prompts/ceremony/dedup.ts +89 -1
- package/src/prompts/ceremony/index.ts +2 -1
- package/src/prompts/ceremony/types.ts +8 -0
- package/tui/src/commands/editor.tsx +3 -0
- package/tui/src/commands/help.tsx +1 -1
- package/tui/src/commands/me.tsx +52 -16
- package/tui/src/components/HelpOverlay.tsx +63 -33
- package/tui/src/context/overlay.tsx +2 -0
- package/tui/src/index.tsx +7 -0
- package/tui/src/util/editor.ts +36 -3
- package/tui/src/util/help-content.ts +136 -0
- package/tui/src/util/yaml-human.ts +129 -34
- package/tui/src/util/yaml-persona.ts +11 -10
- package/tui/src/util/yaml-settings.ts +21 -15
|
@@ -8,6 +8,7 @@ import type {
|
|
|
8
8
|
import type { ClaudeCodeSettings } from "../../../src/integrations/claude-code/types.js";
|
|
9
9
|
import type { CursorSettings } from "../../../src/integrations/cursor/types.js";
|
|
10
10
|
import { modelGuidToDisplay, displayToModelGuid } from "./yaml-shared.js";
|
|
11
|
+
import { parseDuration, formatDuration } from "./duration.js";
|
|
11
12
|
|
|
12
13
|
interface EditableSettingsData {
|
|
13
14
|
default_model?: string | null;
|
|
@@ -15,7 +16,7 @@ interface EditableSettingsData {
|
|
|
15
16
|
rewrite_model?: string | null;
|
|
16
17
|
time_mode?: "24h" | "12h" | "local" | "utc" | null;
|
|
17
18
|
name_display?: string | null;
|
|
18
|
-
default_heartbeat_ms?:
|
|
19
|
+
default_heartbeat_ms?: string | null;
|
|
19
20
|
default_context_window_hours?: number | null;
|
|
20
21
|
message_min_count?: number | null;
|
|
21
22
|
message_max_age_days?: number | null;
|
|
@@ -28,28 +29,28 @@ interface EditableSettingsData {
|
|
|
28
29
|
};
|
|
29
30
|
opencode?: {
|
|
30
31
|
integration?: boolean | null;
|
|
31
|
-
polling_interval_ms?:
|
|
32
|
+
polling_interval_ms?: string | null;
|
|
32
33
|
last_sync?: string | null;
|
|
33
34
|
extraction_point?: string | null;
|
|
34
35
|
extraction_model?: string | null;
|
|
35
36
|
};
|
|
36
37
|
claudeCode?: {
|
|
37
38
|
integration?: boolean | null;
|
|
38
|
-
polling_interval_ms?:
|
|
39
|
+
polling_interval_ms?: string | null;
|
|
39
40
|
last_sync?: string | null;
|
|
40
41
|
extraction_point?: string | null;
|
|
41
42
|
extraction_model?: string | null;
|
|
42
43
|
};
|
|
43
44
|
cursor?: {
|
|
44
45
|
integration?: boolean | null;
|
|
45
|
-
polling_interval_ms?:
|
|
46
|
+
polling_interval_ms?: string | null;
|
|
46
47
|
last_sync?: string | null;
|
|
47
48
|
extraction_point?: string | null;
|
|
48
49
|
};
|
|
49
50
|
backup?: {
|
|
50
51
|
enabled?: boolean | null;
|
|
51
52
|
max_backups?: number | null;
|
|
52
|
-
interval_ms?:
|
|
53
|
+
interval_ms?: string | null;
|
|
53
54
|
};
|
|
54
55
|
}
|
|
55
56
|
|
|
@@ -65,7 +66,7 @@ export function settingsToYAML(settings: HumanSettings | undefined, accounts: Pr
|
|
|
65
66
|
rewrite_model: guidToDisplay(settings?.rewrite_model),
|
|
66
67
|
time_mode: settings?.time_mode ?? null,
|
|
67
68
|
name_display: settings?.name_display ?? null,
|
|
68
|
-
default_heartbeat_ms: settings?.default_heartbeat_ms ?? 1800000,
|
|
69
|
+
default_heartbeat_ms: formatDuration(settings?.default_heartbeat_ms ?? 1800000),
|
|
69
70
|
default_context_window_hours: settings?.default_context_window_hours ?? 8,
|
|
70
71
|
message_min_count: settings?.message_min_count ?? 200,
|
|
71
72
|
message_max_age_days: settings?.message_max_age_days ?? 14,
|
|
@@ -78,28 +79,28 @@ export function settingsToYAML(settings: HumanSettings | undefined, accounts: Pr
|
|
|
78
79
|
},
|
|
79
80
|
opencode: {
|
|
80
81
|
integration: settings?.opencode?.integration ?? false,
|
|
81
|
-
polling_interval_ms: settings?.opencode?.polling_interval_ms ?? 60000,
|
|
82
|
+
polling_interval_ms: formatDuration(settings?.opencode?.polling_interval_ms ?? 60000),
|
|
82
83
|
extraction_model: guidToDisplay(settings?.opencode?.extraction_model) ?? 'default',
|
|
83
84
|
last_sync: settings?.opencode?.last_sync ?? null,
|
|
84
85
|
extraction_point: settings?.opencode?.extraction_point ?? null,
|
|
85
86
|
},
|
|
86
87
|
claudeCode: {
|
|
87
88
|
integration: settings?.claudeCode?.integration ?? false,
|
|
88
|
-
polling_interval_ms: settings?.claudeCode?.polling_interval_ms ?? 60000,
|
|
89
|
+
polling_interval_ms: formatDuration(settings?.claudeCode?.polling_interval_ms ?? 60000),
|
|
89
90
|
extraction_model: guidToDisplay(settings?.claudeCode?.extraction_model) ?? 'default',
|
|
90
91
|
last_sync: settings?.claudeCode?.last_sync ?? null,
|
|
91
92
|
extraction_point: settings?.claudeCode?.extraction_point ?? null,
|
|
92
93
|
},
|
|
93
94
|
cursor: {
|
|
94
95
|
integration: settings?.cursor?.integration ?? false,
|
|
95
|
-
polling_interval_ms: settings?.cursor?.polling_interval_ms ?? 60000,
|
|
96
|
+
polling_interval_ms: formatDuration(settings?.cursor?.polling_interval_ms ?? 60000),
|
|
96
97
|
last_sync: settings?.cursor?.last_sync ?? null,
|
|
97
98
|
extraction_point: settings?.cursor?.extraction_point ?? null,
|
|
98
99
|
},
|
|
99
100
|
backup: {
|
|
100
101
|
enabled: settings?.backup?.enabled ?? false,
|
|
101
102
|
max_backups: settings?.backup?.max_backups ?? 24,
|
|
102
|
-
interval_ms: settings?.backup?.interval_ms ?? 3600000,
|
|
103
|
+
interval_ms: formatDuration(settings?.backup?.interval_ms ?? 3600000),
|
|
103
104
|
},
|
|
104
105
|
};
|
|
105
106
|
|
|
@@ -117,6 +118,11 @@ export function settingsFromYAML(yamlContent: string, original: HumanSettings |
|
|
|
117
118
|
const nullToUndefined = <T>(value: T | null | undefined): T | undefined =>
|
|
118
119
|
value === null ? undefined : value;
|
|
119
120
|
|
|
121
|
+
const parseMsDuration = (value: string | null | undefined, fallback: number): number | undefined => {
|
|
122
|
+
if (value == null) return undefined;
|
|
123
|
+
return parseDuration(value) ?? fallback;
|
|
124
|
+
};
|
|
125
|
+
|
|
120
126
|
const displayToGuid = (display: string | null | undefined): string | undefined => {
|
|
121
127
|
if (!display || display === 'default') return undefined;
|
|
122
128
|
return displayToModelGuid(display, accounts) ?? display;
|
|
@@ -138,7 +144,7 @@ export function settingsFromYAML(yamlContent: string, original: HumanSettings |
|
|
|
138
144
|
if (data.opencode) {
|
|
139
145
|
opencode = {
|
|
140
146
|
integration: nullToUndefined(data.opencode.integration),
|
|
141
|
-
polling_interval_ms:
|
|
147
|
+
polling_interval_ms: parseMsDuration(data.opencode.polling_interval_ms, 60000),
|
|
142
148
|
last_sync: original?.opencode?.last_sync,
|
|
143
149
|
extraction_point: original?.opencode?.extraction_point,
|
|
144
150
|
processed_sessions: original?.opencode?.processed_sessions,
|
|
@@ -150,7 +156,7 @@ export function settingsFromYAML(yamlContent: string, original: HumanSettings |
|
|
|
150
156
|
if (data.claudeCode) {
|
|
151
157
|
claudeCode = {
|
|
152
158
|
integration: nullToUndefined(data.claudeCode.integration),
|
|
153
|
-
polling_interval_ms:
|
|
159
|
+
polling_interval_ms: parseMsDuration(data.claudeCode.polling_interval_ms, 60000),
|
|
154
160
|
last_sync: original?.claudeCode?.last_sync,
|
|
155
161
|
extraction_point: original?.claudeCode?.extraction_point,
|
|
156
162
|
processed_sessions: original?.claudeCode?.processed_sessions,
|
|
@@ -162,7 +168,7 @@ export function settingsFromYAML(yamlContent: string, original: HumanSettings |
|
|
|
162
168
|
if (data.cursor) {
|
|
163
169
|
cursor = {
|
|
164
170
|
integration: nullToUndefined(data.cursor.integration),
|
|
165
|
-
polling_interval_ms:
|
|
171
|
+
polling_interval_ms: parseMsDuration(data.cursor.polling_interval_ms, 60000),
|
|
166
172
|
last_sync: original?.cursor?.last_sync,
|
|
167
173
|
extraction_point: original?.cursor?.extraction_point,
|
|
168
174
|
processed_sessions: original?.cursor?.processed_sessions,
|
|
@@ -174,7 +180,7 @@ export function settingsFromYAML(yamlContent: string, original: HumanSettings |
|
|
|
174
180
|
backup = {
|
|
175
181
|
enabled: nullToUndefined(data.backup.enabled),
|
|
176
182
|
max_backups: nullToUndefined(data.backup.max_backups),
|
|
177
|
-
interval_ms:
|
|
183
|
+
interval_ms: parseMsDuration(data.backup.interval_ms, 3600000),
|
|
178
184
|
last_backup: original?.backup?.last_backup,
|
|
179
185
|
};
|
|
180
186
|
}
|
|
@@ -186,7 +192,7 @@ export function settingsFromYAML(yamlContent: string, original: HumanSettings |
|
|
|
186
192
|
rewrite_model: displayToGuid(data.rewrite_model),
|
|
187
193
|
time_mode: nullToUndefined(data.time_mode),
|
|
188
194
|
name_display: nullToUndefined(data.name_display),
|
|
189
|
-
default_heartbeat_ms:
|
|
195
|
+
default_heartbeat_ms: parseMsDuration(data.default_heartbeat_ms, 1800000),
|
|
190
196
|
default_context_window_hours: nullToUndefined(data.default_context_window_hours),
|
|
191
197
|
message_min_count: nullToUndefined(data.message_min_count),
|
|
192
198
|
message_max_age_days: nullToUndefined(data.message_max_age_days),
|