patchrelay 0.21.0 → 0.21.1

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "service": "patchrelay",
3
- "version": "0.21.0",
4
- "commit": "37cae5cfd0e6",
5
- "builtAt": "2026-03-26T10:21:53.343Z"
3
+ "version": "0.21.1",
4
+ "commit": "6e0983505167",
5
+ "builtAt": "2026-03-26T10:31:01.373Z"
6
6
  }
@@ -25,11 +25,23 @@ function truncate(text, max) {
25
25
  function renderAgentMessage(item) {
26
26
  return (_jsxs(Text, { children: [_jsx(Text, { dimColor: true, children: "message: " }), _jsx(Text, { wrap: "wrap", children: item.text ?? "" })] }));
27
27
  }
28
+ function cleanCommand(raw) {
29
+ // Strip /bin/bash -lc '...' wrapper — show the inner command
30
+ const bashMatch = raw.match(/^\/bin\/(?:ba)?sh\s+-\w*c\s+['"](.+?)['"]$/s);
31
+ if (bashMatch?.[1])
32
+ return bashMatch[1];
33
+ // Strip /bin/bash -lc "..." (double quotes)
34
+ const bashMatch2 = raw.match(/^\/bin\/(?:ba)?sh\s+-\w*c\s+"(.+?)"$/s);
35
+ if (bashMatch2?.[1])
36
+ return bashMatch2[1];
37
+ return raw;
38
+ }
28
39
  function renderCommand(item) {
29
- const cmd = item.command ?? "?";
30
- const exit = item.exitCode !== undefined ? ` exit:${item.exitCode}` : "";
40
+ const cmd = cleanCommand(item.command ?? "?");
41
+ const exitCode = item.exitCode;
42
+ const exitLabel = exitCode !== undefined ? (exitCode === 0 ? "" : ` exit:${exitCode}`) : "";
31
43
  const duration = item.durationMs !== undefined ? ` ${(item.durationMs / 1000).toFixed(1)}s` : "";
32
- return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { children: [_jsx(Text, { dimColor: true, children: "$ " }), _jsx(Text, { children: truncate(cmd, 60) }), exit && _jsx(Text, { dimColor: true, children: exit }), duration && _jsx(Text, { dimColor: true, children: duration })] }), item.output && item.status === "inProgress" && (_jsxs(Text, { dimColor: true, children: [" ", truncate(item.output.split("\n").filter(Boolean).at(-1) ?? "", 100)] }))] }));
44
+ return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { children: [_jsx(Text, { dimColor: true, children: "$ " }), _jsx(Text, { children: truncate(cmd, 80) }), exitLabel && _jsx(Text, { color: "red", children: exitLabel }), duration && _jsx(Text, { dimColor: true, children: duration })] }), item.output && item.status === "inProgress" && (_jsxs(Text, { dimColor: true, children: [" ", truncate(item.output.split("\n").filter(Boolean).at(-1) ?? "", 100)] }))] }));
33
45
  }
34
46
  function renderFileChange(item) {
35
47
  const count = item.changes?.length ?? 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchrelay",
3
- "version": "0.21.0",
3
+ "version": "0.21.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "repository": {