heyiam 0.2.25 → 0.2.27
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/dist/public/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>app</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-B_d6DlEI.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-Dalqz2mC.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|
package/dist/routes/context.js
CHANGED
|
@@ -427,7 +427,7 @@ export function createRouteContext(sessionsBasePath, dbPath) {
|
|
|
427
427
|
const parentMetas = proj.sessions.filter(s => !s.isSubagent);
|
|
428
428
|
const allStats = await Promise.all(parentMetas.map((m) => getSessionStats(m, proj.name)));
|
|
429
429
|
const totalLoc = allStats.reduce((s, st) => s + st.loc, 0);
|
|
430
|
-
const totalFiles = allStats.reduce((s, st) => s + st.files, 0);
|
|
430
|
+
const totalFiles = db.prepare('SELECT COUNT(DISTINCT file_path) as c FROM session_files WHERE session_id IN (SELECT id FROM sessions WHERE project_dir = ?)').get(proj.dirName)?.c ?? allStats.reduce((s, st) => s + st.files, 0);
|
|
431
431
|
const naiveDuration = allStats.reduce((s, st) => s + st.duration, 0);
|
|
432
432
|
const totalDuration = computeMergedDurationFromDb(db, proj.dirName, naiveDuration);
|
|
433
433
|
let totalAgentDuration = totalDuration;
|
package/dist/routes/export.js
CHANGED
|
@@ -71,8 +71,9 @@ export function createExportRouter(ctx) {
|
|
|
71
71
|
return;
|
|
72
72
|
}
|
|
73
73
|
const cache = data.enhanceCache ?? buildFallbackCache(data.sessions);
|
|
74
|
+
const totalFilesChanged = data.project.totalFiles;
|
|
74
75
|
const outputPath = path.join(EXPORTS_BASE, dirName, 'markdown');
|
|
75
|
-
const result = await exportMarkdown(dirName, cache, data.sessions, outputPath);
|
|
76
|
+
const result = await exportMarkdown(dirName, cache, data.sessions, outputPath, { totalFilesChanged });
|
|
76
77
|
res.json(result);
|
|
77
78
|
}
|
|
78
79
|
catch (err) {
|
|
@@ -90,8 +91,9 @@ export function createExportRouter(ctx) {
|
|
|
90
91
|
return;
|
|
91
92
|
}
|
|
92
93
|
const cache = data.enhanceCache ?? buildFallbackCache(data.sessions);
|
|
94
|
+
const totalFilesChanged = data.project.totalFiles;
|
|
93
95
|
const outDir = safeExportPath(outputPath, dirName, 'markdown');
|
|
94
|
-
const result = await exportMarkdown(dirName, cache, data.sessions, outDir);
|
|
96
|
+
const result = await exportMarkdown(dirName, cache, data.sessions, outDir, { totalFilesChanged });
|
|
95
97
|
res.json(result);
|
|
96
98
|
}
|
|
97
99
|
catch (err) {
|
|
@@ -153,9 +155,10 @@ export function createExportRouter(ctx) {
|
|
|
153
155
|
return;
|
|
154
156
|
}
|
|
155
157
|
const cache = data.enhanceCache ?? buildFallbackCache(data.sessions);
|
|
158
|
+
const totalFilesChanged = data.project.totalFiles;
|
|
156
159
|
// Re-use exportMarkdown to a temp dir, then zip the result
|
|
157
160
|
const tmpDir = path.join(EXPORTS_BASE, '.tmp', `${dirName}-${Date.now()}`);
|
|
158
|
-
const result = await exportMarkdown(dirName, cache, data.sessions, tmpDir);
|
|
161
|
+
const result = await exportMarkdown(dirName, cache, data.sessions, tmpDir, { totalFilesChanged });
|
|
159
162
|
// Read files into memory and zip
|
|
160
163
|
const entries = result.files.map((filePath) => ({
|
|
161
164
|
path: path.relative(tmpDir, filePath),
|