pi-mcp-client 0.3.1 → 0.3.2
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/dist/index.js +6 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3499,11 +3499,11 @@ function renderResult(result, options, theme, isError) {
|
|
|
3499
3499
|
if (width <= 0) return [];
|
|
3500
3500
|
const lines = rows.flatMap((row) => {
|
|
3501
3501
|
const status = states[row.state] ?? states.failed;
|
|
3502
|
-
const value = theme.fg(status.color, status.glyph) + " " + theme.fg("accent", line(row.label)) + (row.inlineDescription ? theme.fg("dim", ` ${line(row.inlineDescription)}`) : "");
|
|
3502
|
+
const value = theme.fg(status.color, status.glyph) + " " + theme.fg(status === states.failed ? "error" : "accent", line(row.label)) + (row.inlineDescription ? theme.fg(status === states.failed ? "error" : "dim", ` ${line(row.inlineDescription)}`) : "");
|
|
3503
3503
|
const rendered = options.expanded && (!details?.searchNotes || row.state === "failed") ? new Text(value, 0, 0).render(width).map((x) => truncateToWidth2(x, width)) : [truncateToWidth2(value, width)];
|
|
3504
3504
|
if (options.expanded && row.description)
|
|
3505
3505
|
rendered.push(truncateToWidth2(
|
|
3506
|
-
theme.fg("dim", ` ${line(row.description)}`),
|
|
3506
|
+
theme.fg(status === states.failed ? "error" : "dim", ` ${line(row.description)}`),
|
|
3507
3507
|
width
|
|
3508
3508
|
));
|
|
3509
3509
|
return rendered;
|
|
@@ -3513,7 +3513,10 @@ function renderResult(result, options, theme, isError) {
|
|
|
3513
3513
|
if (options.expanded && !options.isPartial && text && !details?.searchNotes && !bodyInRow)
|
|
3514
3514
|
lines.push(
|
|
3515
3515
|
...new Text(
|
|
3516
|
-
formattedOutput ??=
|
|
3516
|
+
formattedOutput ??= (() => {
|
|
3517
|
+
const output = validation ? formatValidation(body, theme) : formatOutput(body, details?.displayBlocks, theme);
|
|
3518
|
+
return isError || details?.failed ? theme.fg("error", output) : output;
|
|
3519
|
+
})(),
|
|
3517
3520
|
0,
|
|
3518
3521
|
0
|
|
3519
3522
|
).render(width).map((x) => truncateToWidth2(x, width))
|