@yhong91/vibetime 0.1.6 → 0.1.7
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 +17 -2
- package/package.json +1 -1
package/bin/vibetime.mjs
CHANGED
|
@@ -1195,7 +1195,7 @@ function countTextLines(text) {
|
|
|
1195
1195
|
}
|
|
1196
1196
|
|
|
1197
1197
|
// src/lib/constants.ts
|
|
1198
|
-
var PACKAGE_VERSION = true ? "0.1.
|
|
1198
|
+
var PACKAGE_VERSION = true ? "0.1.7" : "0.1.1";
|
|
1199
1199
|
var DEFAULT_API_URL = "http://121.196.224.82:3001";
|
|
1200
1200
|
var DEFAULT_BACKFILL_BATCH_SIZE = 50;
|
|
1201
1201
|
var DEFAULT_BACKFILL_BATCH_BYTES = 800 * 1024;
|
|
@@ -1773,14 +1773,29 @@ async function parseAgySessionFile(filePath, options) {
|
|
|
1773
1773
|
}
|
|
1774
1774
|
}
|
|
1775
1775
|
const usageMap = /* @__PURE__ */ new Map();
|
|
1776
|
+
const usageEntries = [];
|
|
1776
1777
|
if (generatorMetadata) {
|
|
1777
1778
|
for (const item of generatorMetadata) {
|
|
1779
|
+
const usage = item.chatModel?.usage;
|
|
1780
|
+
if (usage) {
|
|
1781
|
+
usageEntries.push(usage);
|
|
1782
|
+
}
|
|
1778
1783
|
if (item.stepIndices && Array.isArray(item.stepIndices)) {
|
|
1779
1784
|
for (const idx of item.stepIndices) {
|
|
1780
|
-
usageMap.set(idx,
|
|
1785
|
+
usageMap.set(idx, usage);
|
|
1781
1786
|
}
|
|
1782
1787
|
}
|
|
1783
1788
|
}
|
|
1789
|
+
const plannerResponses = rawEvents.filter((raw) => raw.type === "PLANNER_RESPONSE");
|
|
1790
|
+
const exactMatches = plannerResponses.filter((raw) => usageMap.has(raw.step_index)).length;
|
|
1791
|
+
if (exactMatches === 0 && plannerResponses.length > 0 && usageEntries.length > 0) {
|
|
1792
|
+
const matchCount = Math.min(plannerResponses.length, usageEntries.length);
|
|
1793
|
+
const plannerOffset = plannerResponses.length - matchCount;
|
|
1794
|
+
const usageOffset = usageEntries.length - matchCount;
|
|
1795
|
+
for (let i = 0; i < matchCount; i += 1) {
|
|
1796
|
+
usageMap.set(plannerResponses[plannerOffset + i].step_index, usageEntries[usageOffset + i]);
|
|
1797
|
+
}
|
|
1798
|
+
}
|
|
1784
1799
|
}
|
|
1785
1800
|
const cwd = detectedCwd;
|
|
1786
1801
|
const project = detectedProject;
|
package/package.json
CHANGED