promptgraph-mcp 2.1.7 → 2.1.8

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/package.json +1 -1
  2. package/tui.js +12 -12
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "promptgraph-mcp",
3
- "version": "2.1.7",
3
+ "version": "2.1.8",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
6
  "bin": {
package/tui.js CHANGED
@@ -73,7 +73,7 @@ function filterItems(items, query, tab) {
73
73
 
74
74
  // ── render ────────────────────────────────────────────────────────────────────
75
75
 
76
- function render(state) {
76
+ function render(state, installedSet = new Set()) {
77
77
  const { cols, rows } = termSize();
78
78
  const HEADER_ROWS = 5;
79
79
  const FOOTER_ROWS = 3;
@@ -222,7 +222,7 @@ export async function runTUI(allSkills, allBundles, installFn, installedSet = ne
222
222
  state.items = filterItems(allItems, q ?? state.query, t ?? state.tab);
223
223
  if (state.cursor >= state.items.length) state.cursor = Math.max(0, state.items.length - 1);
224
224
  clampScroll(state);
225
- render(state);
225
+ render(state, installedSet);
226
226
  }
227
227
 
228
228
  // Setup terminal
@@ -247,8 +247,8 @@ export async function runTUI(allSkills, allBundles, installFn, installedSet = ne
247
247
  function setStatus(ok, msg) {
248
248
  state.status = { ok, msg };
249
249
  clearTimeout(statusTimer);
250
- render(state);
251
- statusTimer = setTimeout(() => { state.status = null; render(state); }, 3000);
250
+ render(state, installedSet);
251
+ statusTimer = setTimeout(() => { state.status = null; render(state, installedSet); }, 3000);
252
252
  }
253
253
 
254
254
  // Keypress handler
@@ -281,7 +281,7 @@ export async function runTUI(allSkills, allBundles, installFn, installedSet = ne
281
281
 
282
282
  if (key.name === 'slash' || ch === '/') {
283
283
  state.searching = true;
284
- render(state);
284
+ render(state, installedSet);
285
285
  return;
286
286
  }
287
287
 
@@ -297,33 +297,33 @@ export async function runTUI(allSkills, allBundles, installFn, installedSet = ne
297
297
  if (key.name === 'up') {
298
298
  if (state.cursor > 0) state.cursor--;
299
299
  clampScroll(state);
300
- render(state);
300
+ render(state, installedSet);
301
301
  return;
302
302
  }
303
303
 
304
304
  if (key.name === 'down') {
305
305
  if (state.cursor < state.items.length - 1) state.cursor++;
306
306
  clampScroll(state);
307
- render(state);
307
+ render(state, installedSet);
308
308
  return;
309
309
  }
310
310
 
311
311
  if (key.name === 'pageup') {
312
312
  state.cursor = Math.max(0, state.cursor - 10);
313
313
  clampScroll(state);
314
- render(state);
314
+ render(state, installedSet);
315
315
  return;
316
316
  }
317
317
 
318
318
  if (key.name === 'pagedown') {
319
319
  state.cursor = Math.min(state.items.length - 1, state.cursor + 10);
320
320
  clampScroll(state);
321
- render(state);
321
+ render(state, installedSet);
322
322
  return;
323
323
  }
324
324
 
325
- if (key.name === 'home') { state.cursor = 0; state.scroll = 0; render(state); return; }
326
- if (key.name === 'end') { state.cursor = state.items.length - 1; clampScroll(state); render(state); return; }
325
+ if (key.name === 'home') { state.cursor = 0; state.scroll = 0; render(state, installedSet); return; }
326
+ if (key.name === 'end') { state.cursor = state.items.length - 1; clampScroll(state); render(state, installedSet); return; }
327
327
 
328
328
  if (key.name === 'return' || key.name === 'i') {
329
329
  const sel = state.items[state.cursor];
@@ -349,7 +349,7 @@ export async function runTUI(allSkills, allBundles, installFn, installedSet = ne
349
349
  });
350
350
 
351
351
  // Resize handler
352
- process.stdout.on('resize', () => { clampScroll(state); render(state); });
352
+ process.stdout.on('resize', () => { clampScroll(state); render(state, installedSet); });
353
353
 
354
354
  // Keep alive
355
355
  return new Promise(resolve => {