ispbills-icli 8.6.1 → 8.6.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/package.json +1 -1
- package/src/tui/components.js +10 -4
package/package.json
CHANGED
package/src/tui/components.js
CHANGED
|
@@ -87,11 +87,17 @@ function formatTs(ts) {
|
|
|
87
87
|
}
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
|
|
90
|
+
// glyphColor: when set, the first 2 chars (glyph + space) render in glyphColor,
|
|
91
|
+
// and the rest of the label renders in color (bold white). Matches spec §6.
|
|
92
|
+
function SpeakerLine({ label, color, glyphColor, cols = 80, ts, rightLabel = '' }) {
|
|
91
93
|
const stamp = ts ? `[${formatTs(ts)}]` : '';
|
|
94
|
+
const parts = glyphColor ? [String(label).slice(0, 2), String(label).slice(2)] : null;
|
|
92
95
|
return html`
|
|
93
96
|
<${Box} paddingX=${1} marginTop=${1} width=${cols}>
|
|
94
|
-
|
|
97
|
+
${parts
|
|
98
|
+
? html`<${Text} color=${glyphColor} bold>${parts[0]}<//><${Text} color=${color} bold>${parts[1]}<//>`
|
|
99
|
+
: html`<${Text} color=${color} bold>${label}<//>`
|
|
100
|
+
}
|
|
95
101
|
<${Box} flexGrow=${1} />
|
|
96
102
|
${rightLabel ? html`<${Text} color=${C.muted}>${rightLabel}<//>` : null}
|
|
97
103
|
${rightLabel && stamp ? html`<${Text} color=${C.muted}> <//>` : null}
|
|
@@ -256,7 +262,7 @@ export function AssistantMessage({ text, cols = 80, ts, label = `${glyphs.copilo
|
|
|
256
262
|
return html`
|
|
257
263
|
<${Box} flexDirection="column" marginTop=${1}>
|
|
258
264
|
<${Sep} cols=${cols} />
|
|
259
|
-
<${SpeakerLine} label=${label} color=${C.accent} cols=${cols} ts=${ts} />
|
|
265
|
+
<${SpeakerLine} label=${label} color="white" glyphColor=${C.accent} cols=${cols} ts=${ts} />
|
|
260
266
|
<${Box} paddingX=${1} flexDirection="column" width=${bodyWidth}>
|
|
261
267
|
${streaming ? html`<${StreamingText} text=${text} />` : html`<${Markdown} content=${text} />`}
|
|
262
268
|
<//>
|
|
@@ -403,7 +409,7 @@ export function LabeledNotice({ label, text, color = C.gray, cols = 80, ts, body
|
|
|
403
409
|
<${Box} flexDirection="column" marginTop=${1}>
|
|
404
410
|
<${Sep} cols=${cols} />
|
|
405
411
|
<${SpeakerLine} label=${label} color=${color} cols=${cols} ts=${ts} />
|
|
406
|
-
<${Box} paddingX=${
|
|
412
|
+
<${Box} paddingX=${1}>
|
|
407
413
|
<${Text} color=${bodyColor}>${text}<//>
|
|
408
414
|
<//>
|
|
409
415
|
<//>`;
|