@yhong91/vibetime 0.1.21 → 0.1.23
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/vibetime.mjs +25 -2
- package/package.json +1 -1
package/bin/vibetime.mjs
CHANGED
|
@@ -1202,7 +1202,7 @@ function countTextLines(text) {
|
|
|
1202
1202
|
}
|
|
1203
1203
|
|
|
1204
1204
|
// src/lib/constants.ts
|
|
1205
|
-
var PACKAGE_VERSION = true ? "0.1.
|
|
1205
|
+
var PACKAGE_VERSION = true ? "0.1.23" : "0.1.1";
|
|
1206
1206
|
var DEFAULT_API_URL = "http://121.196.224.82:3001";
|
|
1207
1207
|
var DEFAULT_BACKFILL_BATCH_SIZE = 50;
|
|
1208
1208
|
var DEFAULT_BACKFILL_BATCH_BYTES = 800 * 1024;
|
|
@@ -2695,6 +2695,9 @@ async function parseClaudeCodeSessionFile(filePath, options) {
|
|
|
2695
2695
|
continue;
|
|
2696
2696
|
}
|
|
2697
2697
|
if (topType === "user") {
|
|
2698
|
+
if (isClaudeNoiseUserEntry(raw, message)) {
|
|
2699
|
+
continue;
|
|
2700
|
+
}
|
|
2698
2701
|
const prompt = claudeTextStats(message.content);
|
|
2699
2702
|
state.closeTurn(ts, lineNumber, topType);
|
|
2700
2703
|
state.currentTurnId = stringField(raw, "uuid") || stringField(raw, "promptId") || `turn_${createStableHash([sessionId, lineNumber]).slice(0, 24)}`;
|
|
@@ -2978,6 +2981,23 @@ function claudeTextStats(value) {
|
|
|
2978
2981
|
hash: textItems.length > 0 ? `sha256:${createStableHash(textItems)}` : void 0
|
|
2979
2982
|
};
|
|
2980
2983
|
}
|
|
2984
|
+
function isClaudeNoiseUserEntry(raw, message) {
|
|
2985
|
+
if (raw.isMeta === true) {
|
|
2986
|
+
return true;
|
|
2987
|
+
}
|
|
2988
|
+
const content = message.content;
|
|
2989
|
+
let text = "";
|
|
2990
|
+
if (typeof content === "string") {
|
|
2991
|
+
text = content;
|
|
2992
|
+
} else if (Array.isArray(content)) {
|
|
2993
|
+
text = content.filter((item) => isPlainObject(item) && item.type === "text").map((item) => stringField(item, "text") || "").join("");
|
|
2994
|
+
}
|
|
2995
|
+
text = text.trim();
|
|
2996
|
+
if (!text) {
|
|
2997
|
+
return false;
|
|
2998
|
+
}
|
|
2999
|
+
return /^<(?:command-name|command-message|command-args|local-command-stdout|local-command-stderr|local-command-caveat)>/.test(text) || text === "[Request interrupted by user]";
|
|
3000
|
+
}
|
|
2981
3001
|
async function claudeProjectContextFromLines(filePath, lines, options) {
|
|
2982
3002
|
const projectDir = path7.basename(path7.dirname(filePath));
|
|
2983
3003
|
const cwds = [];
|
|
@@ -8357,7 +8377,10 @@ function buildSessionRollups(events) {
|
|
|
8357
8377
|
grouped.set(key, [event]);
|
|
8358
8378
|
}
|
|
8359
8379
|
}
|
|
8360
|
-
return [...grouped.entries()].map(([rollupKey, sessionEvents]) => buildSessionRollup(rollupKey, sessionEvents)).sort((a, b) => a.startedAt.localeCompare(b.startedAt));
|
|
8380
|
+
return [...grouped.entries()].map(([rollupKey, sessionEvents]) => buildSessionRollup(rollupKey, sessionEvents)).filter((rollup) => !isPhantomRollup(rollup)).sort((a, b) => a.startedAt.localeCompare(b.startedAt));
|
|
8381
|
+
}
|
|
8382
|
+
function isPhantomRollup(rollup) {
|
|
8383
|
+
return rollup.totalTokens === 0 && rollup.toolCallCount === 0 && rollup.commandCallCount === 0 && rollup.linesAdded === 0 && rollup.linesRemoved === 0;
|
|
8361
8384
|
}
|
|
8362
8385
|
function buildSessionRollup(rollupKey, events) {
|
|
8363
8386
|
const ordered = [...events].sort((a, b) => a.ts.localeCompare(b.ts));
|
package/package.json
CHANGED