ispbills-icli 8.5.2 → 8.5.3
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/app.js +1 -3
- package/src/tui/components.js +23 -15
- package/src/tui/composer.js +4 -2
package/package.json
CHANGED
package/src/tui/app.js
CHANGED
|
@@ -627,7 +627,7 @@ export function App({ cfg, display = {}, onExternal, onExit, initialQuestion })
|
|
|
627
627
|
<//>`
|
|
628
628
|
: null}
|
|
629
629
|
|
|
630
|
-
<${TabBar} active=${activeTab} cols=${cols} />
|
|
630
|
+
<${TabBar} active=${activeTab} cols=${cols} mode=${mode} />
|
|
631
631
|
|
|
632
632
|
${!busy && chips.length ? html`<${FollowupChips} chips=${chips} active=${activeChip} />` : null}
|
|
633
633
|
|
|
@@ -636,8 +636,6 @@ export function App({ cfg, display = {}, onExternal, onExit, initialQuestion })
|
|
|
636
636
|
? html`<${Choice} ...${choice} />`
|
|
637
637
|
: html`<${Composer} onSubmit=${onSubmit} busy=${busy} width=${cols} />`}
|
|
638
638
|
|
|
639
|
-
<${Text} color=${C.separator}>${'─'.repeat(Math.max(1, cols))}<//>
|
|
640
|
-
|
|
641
639
|
<${Box} paddingX=${1} width=${cols}>
|
|
642
640
|
<${Box} flexGrow=${1}>
|
|
643
641
|
<${Text} color=${C.muted} wrap="truncate-end">${footerLeft}<//>
|
package/src/tui/components.js
CHANGED
|
@@ -25,19 +25,28 @@ const TABS = [
|
|
|
25
25
|
{ id: 'alarms', label: 'Alarms' },
|
|
26
26
|
];
|
|
27
27
|
|
|
28
|
-
export function TabBar({ active = 'session', cols = 80,
|
|
28
|
+
export function TabBar({ active = 'session', cols = 80, mode = 'ask' }) {
|
|
29
|
+
// Deep-blue background track per spec (mirrors \x1b[44m ANSI blue).
|
|
30
|
+
// Active tab wrapped in [brackets] bold/white; inactive dimmed.
|
|
31
|
+
// Right side shows the current mode badge.
|
|
32
|
+
const modeBadge = mode !== 'ask'
|
|
33
|
+
? ` ${mode === 'autopilot' ? '⚡ AUTO' : '📋 PLAN'}`
|
|
34
|
+
: '';
|
|
29
35
|
return html`
|
|
30
|
-
<${Box} width=${cols}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
<${Box} width=${cols} backgroundColor="blue">
|
|
37
|
+
<${Box} paddingX=${1} flexGrow=${1}>
|
|
38
|
+
${TABS.map((t, i) => {
|
|
39
|
+
const on = t.id === active;
|
|
40
|
+
return html`
|
|
41
|
+
<${Box} key=${t.id}>
|
|
42
|
+
${i > 0 ? html`<${Text} color="cyan" backgroundColor="blue"> <//>` : null}
|
|
43
|
+
${on
|
|
44
|
+
? html`<${Text} color="white" bold backgroundColor="blue">[${t.label}]<//>`
|
|
45
|
+
: html`<${Text} color="cyan" backgroundColor="blue">${t.label}<//>`}
|
|
46
|
+
<//>`;
|
|
47
|
+
})}
|
|
48
|
+
<//>
|
|
49
|
+
${modeBadge ? html`<${Box} paddingRight=${1}><${Text} color="yellow" bold backgroundColor="blue">${modeBadge}<//><//>` : null}
|
|
41
50
|
<//>`;
|
|
42
51
|
}
|
|
43
52
|
|
|
@@ -111,10 +120,9 @@ function withMentions(text, base = C.white) {
|
|
|
111
120
|
);
|
|
112
121
|
}
|
|
113
122
|
|
|
114
|
-
// Full-width separator line
|
|
123
|
+
// Full-width separator line using - (ASCII dash) per spec §6: "Full-width `-` characters in #30363D".
|
|
115
124
|
function Sep({ cols = 80 }) {
|
|
116
|
-
return html`<${Text} color=${C.separator}>${'
|
|
117
|
-
}
|
|
125
|
+
return html`<${Text} color=${C.separator}>${'-'.repeat(Math.max(1, cols))}<//>`;}
|
|
118
126
|
|
|
119
127
|
/** The user's prompt block — separator + "You" label + text. */
|
|
120
128
|
export function UserMessage({ text, cols = 80 }) {
|
package/src/tui/composer.js
CHANGED
|
@@ -218,8 +218,8 @@ export function Composer({ onSubmit, busy, width = 80 }) {
|
|
|
218
218
|
// Prompt glyph: ❯ (success/green) idle; ⧖ (warning/amber) busy.
|
|
219
219
|
const promptGlyph = busy ? glyphs.busy : glyphs.prompt;
|
|
220
220
|
const promptColor = busy ? C.warning : C.success;
|
|
221
|
-
// Ghost hint text when empty
|
|
222
|
-
const ghostHint = busy ? 'Working…' : 'Enter @ to mention
|
|
221
|
+
// Ghost hint text when empty — per spec §7
|
|
222
|
+
const ghostHint = busy ? 'Working…' : 'Enter @ to mention files or / for commands…';
|
|
223
223
|
|
|
224
224
|
return html`
|
|
225
225
|
<${Box} flexDirection="column" width=${width}>
|
|
@@ -259,5 +259,7 @@ export function Composer({ onSubmit, busy, width = 80 }) {
|
|
|
259
259
|
<${Text}>${before}<//><${Text} inverse>${at}<//><${Text}>${after}<//><${Text} color=${C.muted}>${ghost}<//>
|
|
260
260
|
<//>`}
|
|
261
261
|
<//>
|
|
262
|
+
|
|
263
|
+
<${Text} color=${C.separator}>${'─'.repeat(Math.max(1, width))}<//>
|
|
262
264
|
<//>`;
|
|
263
265
|
}
|