promptgraph-mcp 2.2.2 → 2.2.3
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/package.json +1 -1
- package/tui.js +11 -8
package/package.json
CHANGED
package/tui.js
CHANGED
|
@@ -75,7 +75,7 @@ function filterItems(items, query, tab) {
|
|
|
75
75
|
|
|
76
76
|
function render(state, installedSet = new Set()) {
|
|
77
77
|
const { cols, rows } = termSize();
|
|
78
|
-
const HEADER_ROWS =
|
|
78
|
+
const HEADER_ROWS = 4;
|
|
79
79
|
const FOOTER_ROWS = 3;
|
|
80
80
|
const LIST_ROWS = rows - HEADER_ROWS - FOOTER_ROWS;
|
|
81
81
|
const NAME_W = Math.max(20, Math.floor(cols * 0.28));
|
|
@@ -85,7 +85,7 @@ function render(state, installedSet = new Set()) {
|
|
|
85
85
|
const skills = items.filter(i => i.type === 'skill').length;
|
|
86
86
|
const bundles = items.filter(i => i.type === 'bundle').length;
|
|
87
87
|
|
|
88
|
-
write(
|
|
88
|
+
write('\x1b[H\x1b[J'); // go home + clear to end (no flicker vs full CLEAR)
|
|
89
89
|
|
|
90
90
|
// ── header ─────────────────────────────────────────────────────────────────
|
|
91
91
|
// Row 1: title bar
|
|
@@ -113,14 +113,13 @@ function render(state, installedSet = new Set()) {
|
|
|
113
113
|
: dim(query ? query : 'type / to search, Tab to switch view');
|
|
114
114
|
write(searchLabel + searchVal + CLEAR_EOL + '\n');
|
|
115
115
|
|
|
116
|
-
// Row 4: status
|
|
116
|
+
// Row 4: separator (with optional status inline)
|
|
117
117
|
if (status) {
|
|
118
|
-
const msg = status.ok ? green('
|
|
119
|
-
write(msg + CLEAR_EOL + '\n');
|
|
118
|
+
const msg = status.ok ? green(' ✓ ' + status.msg) : red(' ✗ ' + status.msg);
|
|
119
|
+
write(dim('─'.repeat(4)) + msg + CLEAR_EOL + '\n');
|
|
120
120
|
} else {
|
|
121
121
|
write(dim('─'.repeat(cols)) + CLEAR_EOL + '\n');
|
|
122
122
|
}
|
|
123
|
-
write(dim('─'.repeat(cols)) + CLEAR_EOL + '\n');
|
|
124
123
|
|
|
125
124
|
// ── list ───────────────────────────────────────────────────────────────────
|
|
126
125
|
let lastCat = null;
|
|
@@ -150,8 +149,12 @@ function render(state, installedSet = new Set()) {
|
|
|
150
149
|
const nameStr = truncate(item.name, NAME_W);
|
|
151
150
|
const namePad = nameStr.padEnd(NAME_W);
|
|
152
151
|
const nameCol = selected ? white.bold(namePad) : white(namePad);
|
|
153
|
-
const extra
|
|
154
|
-
?
|
|
152
|
+
const extra = item.type === 'bundle'
|
|
153
|
+
? item.skillCount
|
|
154
|
+
? blue((item.skillCount + ' sk').padEnd(8))
|
|
155
|
+
: item.repo_url
|
|
156
|
+
? blue('GitHub ')
|
|
157
|
+
: dim(((item.skills?.length || 0) + ' sk').padEnd(8))
|
|
155
158
|
: dim((item.code || '').padEnd(8));
|
|
156
159
|
const desc = dim(truncate(item.description, Math.max(10, DESC_W)));
|
|
157
160
|
|