@xynogen/pix-ssh 0.2.5 → 0.2.6

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/src/index.ts +4 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xynogen/pix-ssh",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "Pi tool — ssh_run: run remote commands over SSH with password/key auth and remote sudo",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
package/src/index.ts CHANGED
@@ -41,6 +41,7 @@ import {
41
41
  renderCollapsedToolRow,
42
42
  renderToolError,
43
43
  ruleFrame,
44
+ sectionRule,
44
45
  termW,
45
46
  } from "@xynogen/pix-pretty/utils";
46
47
  import { getUnattendedMode, withAgentBlock } from "@xynogen/pix-runtime";
@@ -536,7 +537,7 @@ export default function (pi: ExtensionAPI): void {
536
537
  const prefix = args.sudo ? "sudo " : "";
537
538
  text.setText(
538
539
  fillToolBackground(
539
- `${theme.fg("toolTitle", theme.bold("ssh"))} ${theme.fg("dim", host)} ${theme.fg("accent", prefix + command)}`,
540
+ `${theme.fg("toolTitle", theme.bold("ssh"))} ${theme.fg("dim", host)} ${theme.fg("muted", prefix + command)}`,
540
541
  ),
541
542
  );
542
543
  return text;
@@ -624,8 +625,9 @@ export default function (pi: ExtensionAPI): void {
624
625
  lineCount > maxShow ? [`${FG_DIM} … ${lineCount - maxShow} more lines${RST}`] : [];
625
626
  const statusKey = code === null ? "dim" : code === 0 ? "success" : "error";
626
627
  const paint = (s: string) => theme.fg(statusKey, s);
628
+ const sw = Math.max(8, termW() - 4); // section-rule width inside the 2-space indent
627
629
  const out = ruleFrame(
628
- show.map((line) => ` ${line}`),
630
+ show.map((line) => ` ${sectionRule(line, theme, sw) ?? line}`),
629
631
  footer,
630
632
  termW(),
631
633
  paint,