@f5xc-salesdemos/xcsh 18.61.0 → 18.62.0
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@f5xc-salesdemos/xcsh",
|
|
4
|
-
"version": "18.
|
|
4
|
+
"version": "18.62.0",
|
|
5
5
|
"description": "Coding agent CLI with read, bash, edit, write tools and session management",
|
|
6
6
|
"homepage": "https://github.com/f5xc-salesdemos/xcsh",
|
|
7
7
|
"author": "Can Boluk",
|
|
@@ -48,12 +48,12 @@
|
|
|
48
48
|
"dependencies": {
|
|
49
49
|
"@agentclientprotocol/sdk": "0.16.1",
|
|
50
50
|
"@mozilla/readability": "^0.6",
|
|
51
|
-
"@f5xc-salesdemos/xcsh-stats": "18.
|
|
52
|
-
"@f5xc-salesdemos/pi-agent-core": "18.
|
|
53
|
-
"@f5xc-salesdemos/pi-ai": "18.
|
|
54
|
-
"@f5xc-salesdemos/pi-natives": "18.
|
|
55
|
-
"@f5xc-salesdemos/pi-tui": "18.
|
|
56
|
-
"@f5xc-salesdemos/pi-utils": "18.
|
|
51
|
+
"@f5xc-salesdemos/xcsh-stats": "18.62.0",
|
|
52
|
+
"@f5xc-salesdemos/pi-agent-core": "18.62.0",
|
|
53
|
+
"@f5xc-salesdemos/pi-ai": "18.62.0",
|
|
54
|
+
"@f5xc-salesdemos/pi-natives": "18.62.0",
|
|
55
|
+
"@f5xc-salesdemos/pi-tui": "18.62.0",
|
|
56
|
+
"@f5xc-salesdemos/pi-utils": "18.62.0",
|
|
57
57
|
"@sinclair/typebox": "^0.34",
|
|
58
58
|
"@xterm/headless": "^6.0",
|
|
59
59
|
"ajv": "^8.18",
|
|
@@ -17,17 +17,17 @@ export interface BuildInfo {
|
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export const BUILD_INFO: BuildInfo = {
|
|
20
|
-
"version": "18.
|
|
21
|
-
"commit": "
|
|
22
|
-
"shortCommit": "
|
|
20
|
+
"version": "18.62.0",
|
|
21
|
+
"commit": "45f8f524a90fb2b3eaa542b522fd4779873ca151",
|
|
22
|
+
"shortCommit": "45f8f52",
|
|
23
23
|
"branch": "main",
|
|
24
|
-
"tag": "v18.
|
|
25
|
-
"commitDate": "2026-05-
|
|
26
|
-
"buildDate": "2026-05-
|
|
24
|
+
"tag": "v18.62.0",
|
|
25
|
+
"commitDate": "2026-05-10T21:40:34Z",
|
|
26
|
+
"buildDate": "2026-05-10T22:05:24.704Z",
|
|
27
27
|
"dirty": true,
|
|
28
28
|
"prNumber": "",
|
|
29
29
|
"repoUrl": "https://github.com/f5xc-salesdemos/xcsh",
|
|
30
30
|
"repoSlug": "f5xc-salesdemos/xcsh",
|
|
31
|
-
"commitUrl": "https://github.com/f5xc-salesdemos/xcsh/commit/
|
|
32
|
-
"releaseUrl": "https://github.com/f5xc-salesdemos/xcsh/releases/tag/v18.
|
|
31
|
+
"commitUrl": "https://github.com/f5xc-salesdemos/xcsh/commit/45f8f524a90fb2b3eaa542b522fd4779873ca151",
|
|
32
|
+
"releaseUrl": "https://github.com/f5xc-salesdemos/xcsh/releases/tag/v18.62.0"
|
|
33
33
|
};
|
|
@@ -14,7 +14,12 @@ const MAX_PAYLOAD_LINES = 30;
|
|
|
14
14
|
|
|
15
15
|
type XcshApiRenderArgs = { method?: string; path?: string; params?: Record<string, string>; payload?: unknown };
|
|
16
16
|
|
|
17
|
-
const METHOD_COLORS: Record<string, ThemeColor
|
|
17
|
+
const METHOD_COLORS: Partial<Record<string, ThemeColor>> = {
|
|
18
|
+
POST: "chromeAccent",
|
|
19
|
+
PUT: "contentAccent",
|
|
20
|
+
PATCH: "contentAccent",
|
|
21
|
+
DELETE: "warning",
|
|
22
|
+
};
|
|
18
23
|
|
|
19
24
|
function statusColor(status: number): ThemeColor {
|
|
20
25
|
return status < 300 ? "success" : status < 400 ? "warning" : "error";
|
|
@@ -119,15 +124,13 @@ export const xcshApiToolRenderer = {
|
|
|
119
124
|
renderCall(args: XcshApiRenderArgs, _options: RenderResultOptions, uiTheme: Theme): Component {
|
|
120
125
|
const method = args.method ?? "???";
|
|
121
126
|
const apiPath = args.path ?? "…";
|
|
122
|
-
const
|
|
123
|
-
|
|
124
|
-
`${uiTheme.format.bracketLeft}${method}${uiTheme.format.bracketRight}`,
|
|
125
|
-
);
|
|
127
|
+
const methodColor = METHOD_COLORS[method];
|
|
128
|
+
const methodText = methodColor ? uiTheme.fg(methodColor, method) : method;
|
|
126
129
|
const text = renderStatusLine(
|
|
127
130
|
{
|
|
128
131
|
icon: "pending",
|
|
129
132
|
title: TOOL_TITLE,
|
|
130
|
-
description: `${
|
|
133
|
+
description: `${methodText} ${uiTheme.fg("muted", apiPath)}`,
|
|
131
134
|
},
|
|
132
135
|
uiTheme,
|
|
133
136
|
);
|
|
@@ -168,10 +171,8 @@ export const xcshApiToolRenderer = {
|
|
|
168
171
|
}
|
|
169
172
|
|
|
170
173
|
// --- Header: METHOD [STATUS] full-path ---
|
|
171
|
-
const
|
|
172
|
-
|
|
173
|
-
`${uiTheme.format.bracketLeft}${method}${uiTheme.format.bracketRight}`,
|
|
174
|
-
);
|
|
174
|
+
const methodColor = METHOD_COLORS[method];
|
|
175
|
+
const methodText = methodColor ? uiTheme.fg(methodColor, method) : method;
|
|
175
176
|
const statusDisplay = details?.errorCodeLabel ? `${statusText} ${details.errorCodeLabel}` : statusText;
|
|
176
177
|
const statusBadge = uiTheme.fg(status > 0 ? statusColor(status) : "error", `[${statusDisplay}]`);
|
|
177
178
|
|
|
@@ -183,7 +184,7 @@ export const xcshApiToolRenderer = {
|
|
|
183
184
|
{
|
|
184
185
|
title: TOOL_TITLE,
|
|
185
186
|
titleColor: "contentAccent",
|
|
186
|
-
description: `${
|
|
187
|
+
description: `${methodText} ${statusBadge} ${uiTheme.fg("muted", displayPath)}`,
|
|
187
188
|
meta: meta.length > 0 ? meta : undefined,
|
|
188
189
|
},
|
|
189
190
|
uiTheme,
|
|
@@ -333,7 +334,7 @@ export const xcshApiToolRenderer = {
|
|
|
333
334
|
return {
|
|
334
335
|
render(width: number): string[] {
|
|
335
336
|
const state = options.isPartial ? "pending" : isError ? "error" : "success";
|
|
336
|
-
return outputBlock.render({ header, state, sections, width }, uiTheme);
|
|
337
|
+
return outputBlock.render({ header, state, sections, width, borderColor: "border" }, uiTheme);
|
|
337
338
|
},
|
|
338
339
|
invalidate() {
|
|
339
340
|
outputBlock.invalidate();
|
package/src/tui/output-block.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Bordered output container with optional header and sections.
|
|
3
3
|
*/
|
|
4
4
|
import { ImageProtocol, padding, TERMINAL, visibleWidth, wrapTextWithAnsi } from "@f5xc-salesdemos/pi-tui";
|
|
5
|
-
import type { Theme } from "../modes/theme/theme";
|
|
5
|
+
import type { Theme, ThemeColor } from "../modes/theme/theme";
|
|
6
6
|
import { getSixelLineMask } from "../utils/sixel";
|
|
7
7
|
import type { State } from "./types";
|
|
8
8
|
import type { RenderCache } from "./utils";
|
|
@@ -15,24 +15,36 @@ export interface OutputBlockOptions {
|
|
|
15
15
|
sections?: Array<{ label?: string; lines: string[] }>;
|
|
16
16
|
width: number;
|
|
17
17
|
applyBg?: boolean;
|
|
18
|
+
/** Override the state-derived border color. Use sparingly — only for branded core tools. */
|
|
19
|
+
borderColor?: ThemeColor;
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
export function renderOutputBlock(options: OutputBlockOptions, theme: Theme): string[] {
|
|
21
|
-
const {
|
|
23
|
+
const {
|
|
24
|
+
header,
|
|
25
|
+
headerMeta,
|
|
26
|
+
state,
|
|
27
|
+
sections = [],
|
|
28
|
+
width,
|
|
29
|
+
applyBg = true,
|
|
30
|
+
borderColor: borderColorOverride,
|
|
31
|
+
} = options;
|
|
22
32
|
const h = theme.boxSharp.horizontal;
|
|
23
33
|
const v = theme.boxSharp.vertical;
|
|
24
34
|
const cap = h.repeat(3);
|
|
25
35
|
const lineWidth = Math.max(0, width);
|
|
26
|
-
// Border colors: running/pending use accent, success uses dim (gray), error/warning keep their colors
|
|
27
|
-
|
|
28
|
-
|
|
36
|
+
// Border colors: running/pending use accent, success uses dim (gray), error/warning keep their colors.
|
|
37
|
+
// borderColorOverride (from options) takes precedence for branded core tools (e.g. XC-API).
|
|
38
|
+
const resolvedBorderColor: ThemeColor =
|
|
39
|
+
borderColorOverride ??
|
|
40
|
+
(state === "error"
|
|
29
41
|
? "error"
|
|
30
42
|
: state === "warning"
|
|
31
43
|
? "warning"
|
|
32
44
|
: state === "running" || state === "pending"
|
|
33
45
|
? "spinnerAccent"
|
|
34
|
-
: "dim";
|
|
35
|
-
const border = (text: string) => theme.fg(
|
|
46
|
+
: "dim");
|
|
47
|
+
const border = (text: string) => theme.fg(resolvedBorderColor, text);
|
|
36
48
|
const bgFn = (() => {
|
|
37
49
|
if (!state || !applyBg) return undefined;
|
|
38
50
|
const bgAnsi = theme.getBgAnsi(getStateBgColor(state));
|
|
@@ -137,6 +149,7 @@ export class CachedOutputBlock {
|
|
|
137
149
|
h.optional(options.headerMeta);
|
|
138
150
|
h.optional(options.state);
|
|
139
151
|
h.bool(options.applyBg ?? true);
|
|
152
|
+
h.optional(options.borderColor);
|
|
140
153
|
if (options.sections) {
|
|
141
154
|
for (const s of options.sections) {
|
|
142
155
|
h.optional(s.label);
|