promptgraph-mcp 2.9.20 → 2.9.21

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/indexer.js +7 -5
  2. package/package.json +1 -1
package/indexer.js CHANGED
@@ -70,16 +70,17 @@ export async function indexBatch(db, skills, { fast = false } = {}) {
70
70
  if (!fast && allChunks.length) {
71
71
  const texts = allChunks.map(c => c.text);
72
72
  const total = texts.length;
73
- const spin = spinner('Preparing model...');
74
- spin.start();
73
+ process.stdout.write('\n ⠋ Preparing model...\n');
75
74
  let embedStart = null;
76
75
  const embeddings = await embedBatch(texts, (done, tot) => {
77
- if (!embedStart) { spin.stop(); embedStart = Date.now(); }
76
+ if (!embedStart) {
77
+ process.stdout.write('\x1b[1A\x1b[2K');
78
+ embedStart = Date.now();
79
+ }
78
80
  const elapsed = (Date.now() - embedStart) / 1000;
79
81
  const eta = done > 0 ? Math.round((tot - done) * elapsed / done) : '?';
80
82
  progress(done, tot, { eta });
81
83
  });
82
- if (!embedStart) spin.stop();
83
84
  progressDone();
84
85
  db.transaction(() => {
85
86
  for (let i = 0; i < allChunks.length; i++) {
@@ -195,9 +196,10 @@ export async function indexAll({ fast = false } = {}) {
195
196
  if (dbRow?.hash === hash) {
196
197
  skipped++; count++;
197
198
  if (count % 200 === 0) {
199
+ const elapsed = Date.now() - start;
198
200
  const eta = processedCount > 0 && processedStart
199
201
  ? Math.round((total - count) * (Date.now() - processedStart) / processedCount / 1000)
200
- : Math.round((total - count) * (Date.now() - start) / count / 1000);
202
+ : elapsed > 500 ? Math.round((total - count) * elapsed / count / 1000) : '?';
201
203
  progress(count, total, { skipped, eta, errors });
202
204
  }
203
205
  continue;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "promptgraph-mcp",
3
- "version": "2.9.20",
3
+ "version": "2.9.21",
4
4
  "files": [
5
5
  "*.js",
6
6
  "commands/",