@ramarivera/coding-agent-langfuse 0.1.8 → 0.1.9

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.
Files changed (2) hide show
  1. package/dist/backfill.js +3 -4
  2. package/package.json +1 -1
package/dist/backfill.js CHANGED
@@ -522,8 +522,8 @@ function opencodeEvents(homeDir, rowLimit) {
522
522
  let sessions = [];
523
523
  let messages = [];
524
524
  try {
525
- sessions = sqliteJsonByRowid(db, "session", "id, directory, time_created, time_updated, title, version, slug, project_id", undefined, rowLimit);
526
- messages = sqliteJsonByRowid(db, "message", "id, session_id, time_created, time_updated, case when length(data) <= 1000000 then data else null end as data, length(data) <= 1000000 as __include", undefined, rowLimit);
525
+ sessions = sqliteJsonByRowid(db, "session", "id, directory, time_created, time_updated, title, version, slug, project_id", undefined, rowLimit, 5_000);
526
+ messages = sqliteJsonByRowid(db, "message", "id, session_id, time_created, time_updated, case when length(data) <= 1000000 then data else null end as data, length(data) <= 1000000 as __include", undefined, rowLimit, 50);
527
527
  }
528
528
  catch (error) {
529
529
  console.error(`Skipping OpenCode history from ${db}: ${error instanceof Error ? error.message : String(error)}`);
@@ -588,8 +588,7 @@ function sqliteJson(db, sql) {
588
588
  });
589
589
  return JSON.parse(output || "[]");
590
590
  }
591
- function sqliteJsonByRowid(db, table, columns, whereClause, rowLimit) {
592
- const pageSize = 5_000;
591
+ function sqliteJsonByRowid(db, table, columns, whereClause, rowLimit, pageSize) {
593
592
  const rows = [];
594
593
  let lastRowid = 0;
595
594
  while (rowLimit === undefined || rows.length < rowLimit) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ramarivera/coding-agent-langfuse",
3
- "version": "0.1.8",
3
+ "version": "0.1.9",
4
4
  "description": "Universal coding-agent Langfuse backfiller and live OTLP helpers",
5
5
  "type": "module",
6
6
  "license": "MIT",