promptgraph-mcp 2.6.6 β 2.6.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/commands/marketplace.js +5 -2
- package/package.json +1 -1
- package/tui.js +12 -3
package/commands/marketplace.js
CHANGED
|
@@ -31,8 +31,11 @@ export default async function handler(args, bin) {
|
|
|
31
31
|
const { spinner: spin2 } = await import('../cli.js');
|
|
32
32
|
const sp = spin2('Fetching marketplace...');
|
|
33
33
|
sp.start();
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
try {
|
|
35
|
+
var [skills, bundles] = await Promise.all([browseMarketplace(1000), browseBundles(1000)]);
|
|
36
|
+
} finally {
|
|
37
|
+
sp.stop();
|
|
38
|
+
}
|
|
36
39
|
|
|
37
40
|
if (skills?.error) { error(skills.error); process.exit(1); }
|
|
38
41
|
|
package/package.json
CHANGED
package/tui.js
CHANGED
|
@@ -22,8 +22,10 @@ const green = chalk.green;
|
|
|
22
22
|
const red = chalk.red;
|
|
23
23
|
const blue = chalk.blue;
|
|
24
24
|
const white = chalk.white;
|
|
25
|
+
const magenta = chalk.magenta;
|
|
25
26
|
|
|
26
27
|
const CAT_ICON = { Engineering:'π ', 'AI Tools':'π€', Coding:'π»', Creative:'π¨', Security:'π', Community:'π' };
|
|
28
|
+
const SPINNER_FRAMES = ['β£Ύ', 'β£½', 'β£»', 'β’Ώ', 'β‘Ώ', 'β£', 'β£―', 'β£·']; // braille spinner
|
|
27
29
|
|
|
28
30
|
// ββ helpers ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
|
29
31
|
|
|
@@ -113,8 +115,11 @@ function render(state, installedSet = new Set()) {
|
|
|
113
115
|
: dim(query ? query : 'type / to search, Tab to switch view');
|
|
114
116
|
write(searchLabel + searchVal + CLEAR_EOL + '\n');
|
|
115
117
|
|
|
116
|
-
// Row 4: separator (with optional status inline)
|
|
117
|
-
if (
|
|
118
|
+
// Row 4: separator (with optional status inline or spinner)
|
|
119
|
+
if (state.installing) {
|
|
120
|
+
const frame = SPINNER_FRAMES[Math.floor(Date.now() / 120) % SPINNER_FRAMES.length];
|
|
121
|
+
write(dim('β'.repeat(4)) + magenta(` ${frame} Installingβ¦ `) + CLEAR_EOL + '\n');
|
|
122
|
+
} else if (status) {
|
|
118
123
|
const msg = status.ok ? green(' β ' + status.msg) : red(' β ' + status.msg);
|
|
119
124
|
write(dim('β'.repeat(4)) + msg + CLEAR_EOL + '\n');
|
|
120
125
|
} else {
|
|
@@ -388,11 +393,15 @@ export async function runTUI(allSkills, allBundles, installFn, installedSet = ne
|
|
|
388
393
|
const sel = state.items[state.cursor];
|
|
389
394
|
if (!sel || state.installing) return;
|
|
390
395
|
state.installing = true;
|
|
391
|
-
|
|
396
|
+
// Live spinner β keeps rendering during long installs
|
|
397
|
+
const spinInterval = setInterval(() => render(state, installedSet), 120);
|
|
398
|
+
render(state, installedSet);
|
|
392
399
|
try {
|
|
393
400
|
await installFn(sel);
|
|
401
|
+
clearInterval(spinInterval);
|
|
394
402
|
setStatus(true, `Installed ${sel.id}`);
|
|
395
403
|
} catch (e) {
|
|
404
|
+
clearInterval(spinInterval);
|
|
396
405
|
setStatus(false, e.message.slice(0, 60));
|
|
397
406
|
} finally {
|
|
398
407
|
state.installing = false;
|