truememory-mirror 1.0.2 → 1.0.4
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/bin/mirror.js +3 -17
- package/package.json +1 -1
package/bin/mirror.js
CHANGED
|
@@ -132,8 +132,8 @@ async function main() {
|
|
|
132
132
|
return;
|
|
133
133
|
}
|
|
134
134
|
|
|
135
|
-
// --- Scan ---
|
|
136
|
-
write(` ${DIM}
|
|
135
|
+
// --- Scan & parse (silent) ---
|
|
136
|
+
write(` ${DIM}generating identity profile...${R}\n\n`);
|
|
137
137
|
const sources = await scan(args.source);
|
|
138
138
|
|
|
139
139
|
let claudeSessions = [];
|
|
@@ -141,7 +141,6 @@ async function main() {
|
|
|
141
141
|
|
|
142
142
|
if (sources.claude_code) {
|
|
143
143
|
const files = sources.claude_code.sessions;
|
|
144
|
-
write(` ${DIM}parsing claude code...${R} ${files.length} files`);
|
|
145
144
|
const parseLimit = Math.min(files.length, args.limit);
|
|
146
145
|
for (let i = 0; i < parseLimit; i++) {
|
|
147
146
|
try {
|
|
@@ -149,15 +148,10 @@ async function main() {
|
|
|
149
148
|
if (session.messages.length > 0) claudeSessions.push(session);
|
|
150
149
|
} catch {}
|
|
151
150
|
}
|
|
152
|
-
clearLine();
|
|
153
|
-
write(` ${G}✓${R} claude code ${WHITE}${claudeSessions.length}${R} conversations\n`);
|
|
154
|
-
} else {
|
|
155
|
-
write(` ${DIM}– claude code not found${R}\n`);
|
|
156
151
|
}
|
|
157
152
|
|
|
158
153
|
if (sources.codex) {
|
|
159
154
|
const files = sources.codex.sessions;
|
|
160
|
-
write(` ${DIM}parsing codex cli...${R} ${files.length} files`);
|
|
161
155
|
const parseLimit = Math.min(files.length, args.limit);
|
|
162
156
|
for (let i = 0; i < parseLimit; i++) {
|
|
163
157
|
try {
|
|
@@ -165,21 +159,14 @@ async function main() {
|
|
|
165
159
|
if (session.messages.length > 0) codexSessions.push(session);
|
|
166
160
|
} catch {}
|
|
167
161
|
}
|
|
168
|
-
clearLine();
|
|
169
|
-
write(` ${G}✓${R} codex cli ${WHITE}${codexSessions.length}${R} conversations\n`);
|
|
170
|
-
} else {
|
|
171
|
-
write(` ${DIM}– codex cli not found${R}\n`);
|
|
172
162
|
}
|
|
173
163
|
|
|
174
164
|
const totalSessions = claudeSessions.length + codexSessions.length;
|
|
175
165
|
if (totalSessions === 0) {
|
|
176
|
-
write(
|
|
166
|
+
write(` no AI conversations found.\n make sure you have Claude Code or Codex CLI installed.\n\n`);
|
|
177
167
|
process.exit(1);
|
|
178
168
|
}
|
|
179
169
|
|
|
180
|
-
write(` ${DIM}────────────────────────────────────${R}\n`);
|
|
181
|
-
write(` ${WHITE}${totalSessions}${R} conversations total\n\n`);
|
|
182
|
-
|
|
183
170
|
// --- Sanitize & unify ---
|
|
184
171
|
for (const session of claudeSessions) {
|
|
185
172
|
session.messages = sanitizeMessages(session.messages);
|
|
@@ -196,7 +183,6 @@ async function main() {
|
|
|
196
183
|
}
|
|
197
184
|
|
|
198
185
|
// --- Extract ---
|
|
199
|
-
write(` ${DIM}extracting identity profile...${R}\n`);
|
|
200
186
|
|
|
201
187
|
let result;
|
|
202
188
|
try {
|