zelari-code 2.48.0 → 2.49.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/dist/cli/components/ChatStream.js +7 -2
- package/dist/cli/components/ChatStream.js.map +1 -1
- package/dist/cli/components/InputBar.js +8 -2
- package/dist/cli/components/InputBar.js.map +1 -1
- package/dist/cli/components/SelectList.js +5 -4
- package/dist/cli/components/SelectList.js.map +1 -1
- package/dist/cli/components/Sidebar.js +8 -7
- package/dist/cli/components/Sidebar.js.map +1 -1
- package/dist/cli/components/SplashScreen.js +3 -2
- package/dist/cli/components/SplashScreen.js.map +1 -1
- package/dist/cli/components/StartupBanner.js +6 -3
- package/dist/cli/components/StartupBanner.js.map +1 -1
- package/dist/cli/components/StatusBar.js +17 -14
- package/dist/cli/components/StatusBar.js.map +1 -1
- package/dist/cli/components/ToolOutput.js +6 -5
- package/dist/cli/components/ToolOutput.js.map +1 -1
- package/dist/cli/components/tuiPalette.js +56 -0
- package/dist/cli/components/tuiPalette.js.map +1 -0
- package/dist/cli/main.bundled.js +98 -29
- package/dist/cli/main.bundled.js.map +4 -4
- package/package.json +2 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Box, Text } from 'ink';
|
|
3
3
|
import { ToolOutput } from './ToolOutput.js';
|
|
4
|
+
import { TUI_PALETTE } from './tuiPalette.js';
|
|
4
5
|
/**
|
|
5
6
|
* renderMessage — pure per-message renderer shared by `<Static>` (finalized
|
|
6
7
|
* items, printed once into native scrollback) and the live region (the
|
|
@@ -23,11 +24,15 @@ export function renderMessage(m, live = false) {
|
|
|
23
24
|
return (React.createElement(ToolOutput, { key: m.id, toolName: m.toolName ?? 'tool', summary: m.content, body: m.toolResult ?? m.content, ok: m.toolOk, durationMs: m.toolDurationMs, live: live }));
|
|
24
25
|
}
|
|
25
26
|
return (React.createElement(Box, { key: m.id, flexDirection: "column", marginBottom: 1 },
|
|
26
|
-
React.createElement(Text, { color: m.role === 'user'
|
|
27
|
+
React.createElement(Text, { color: m.role === 'user'
|
|
28
|
+
? TUI_PALETTE.brand
|
|
29
|
+
: m.role === 'assistant'
|
|
30
|
+
? TUI_PALETTE.success
|
|
31
|
+
: TUI_PALETTE.warn, bold: true },
|
|
27
32
|
m.role === 'user' ? '❯' : m.role === 'assistant' ? '◆' : 'ℹ',
|
|
28
33
|
" ",
|
|
29
34
|
m.role,
|
|
30
|
-
m.role === 'assistant' && m.memberName ? (React.createElement(Text, { color:
|
|
35
|
+
m.role === 'assistant' && m.memberName ? (React.createElement(Text, { color: TUI_PALETTE.brandAlt },
|
|
31
36
|
" \u00B7 ",
|
|
32
37
|
m.memberName)) : null),
|
|
33
38
|
React.createElement(Box, { marginLeft: 2 },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatStream.js","sourceRoot":"","sources":["../../../src/cli/components/ChatStream.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"ChatStream.js","sourceRoot":"","sources":["../../../src/cli/components/ChatStream.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAwC9C;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,aAAa,CAAC,CAAc,EAAE,IAAI,GAAG,KAAK;IACxD,IAAI,CAAC,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;QACtB,OAAO,CACL,oBAAC,UAAU,IACT,GAAG,EAAE,CAAC,CAAC,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AAC,QAAQ,EAAC,QAAQ,EAAE,CAAC,EAAE,QAAQ,EAAE,CAAC,IACjD,QAAQ,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CACvB,oBAAC,IAAI,IAAC,QAAQ,qEAAsE,CACrF,CAAC,CAAC,CAAC,CACF,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CACtC,CACG,CACP,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;AAErD,8EAA8E;AAC9E,4EAA4E;AAC5E,0EAA0E;AAC1E,8EAA8E;AAC9E,8EAA8E;AAE9E;;;;GAIG;AACH,MAAM,UAAU,mBAAmB,CACjC,QAAgC,EAChC,OAAe,EACf,MAAc;IAEd,OAAO,CAAC,GAAG,QAAQ,CAAC,CAAC;AACvB,CAAC"}
|
|
@@ -2,6 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { Box, Text } from 'ink';
|
|
3
3
|
import TextInput from 'ink-text-input';
|
|
4
4
|
import { useInputDraft } from './inputDraft.js';
|
|
5
|
+
import { TUI_PALETTE } from './tuiPalette.js';
|
|
5
6
|
/**
|
|
6
7
|
* Input bar — the user prompt editor at the bottom of the TUI.
|
|
7
8
|
*
|
|
@@ -19,8 +20,13 @@ function InputBarImpl({ draft, onSubmit, disabled }) {
|
|
|
19
20
|
const onSubmitRef = React.useRef(onSubmit);
|
|
20
21
|
onSubmitRef.current = onSubmit;
|
|
21
22
|
const stableSubmit = React.useCallback((v) => onSubmitRef.current(v), []);
|
|
22
|
-
return (
|
|
23
|
-
|
|
23
|
+
return (
|
|
24
|
+
// TUI palette: while mounted, this bar is the surface App routes keys to
|
|
25
|
+
// (the picker swaps in <SelectList> otherwise), so "focus" is the only
|
|
26
|
+
// signal available here — `disabled`, i.e. a run in flight. No new prop and
|
|
27
|
+
// no new state is introduced to compute it.
|
|
28
|
+
React.createElement(Box, { borderStyle: "single", borderColor: disabled ? TUI_PALETTE.border : TUI_PALETTE.borderFocus, paddingX: 1 },
|
|
29
|
+
React.createElement(Text, { color: TUI_PALETTE.brand, bold: true }, "\u276F "),
|
|
24
30
|
React.createElement(TextInput, { value: value, onChange: draft.set, onSubmit: stableSubmit, placeholder: disabled ? '...' : 'Prompt, /skills, or @path' })));
|
|
25
31
|
}
|
|
26
32
|
/** Explicit comparator — exported so the contract is pinned by a test. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputBar.js","sourceRoot":"","sources":["../../../src/cli/components/InputBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,aAAa,EAAwB,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"InputBar.js","sourceRoot":"","sources":["../../../src/cli/components/InputBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,SAAS,MAAM,gBAAgB,CAAC;AACvC,OAAO,EAAE,aAAa,EAAwB,MAAM,iBAAiB,CAAC;AACtE,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAc9C;;;;;;;;;;;GAWG;AACH,SAAS,YAAY,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAiB;IAChE,MAAM,KAAK,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IAEnC,MAAM,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAC3C,WAAW,CAAC,OAAO,GAAG,QAAQ,CAAC;IAC/B,MAAM,YAAY,GAAG,KAAK,CAAC,WAAW,CAAC,CAAC,CAAS,EAAE,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;IAElF,OAAO;IACL,yEAAyE;IACzE,uEAAuE;IACvE,4EAA4E;IAC5E,4CAA4C;IAC5C,oBAAC,GAAG,IACF,WAAW,EAAC,QAAQ,EACpB,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,WAAW,EACpE,QAAQ,EAAE,CAAC;QAEX,oBAAC,IAAI,IAAC,KAAK,EAAE,WAAW,CAAC,KAAK,EAAE,IAAI,oBAAU;QAC9C,oBAAC,SAAS,IACR,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,KAAK,CAAC,GAAG,EACnB,QAAQ,EAAE,YAAY,EACtB,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,2BAA2B,GAC3D,CACE,CACP,CAAC;AACJ,CAAC;AAED,0EAA0E;AAC1E,MAAM,UAAU,kBAAkB,CAAC,IAAmB,EAAE,IAAmB;IACzE,OAAO,IAAI,CAAC,KAAK,KAAK,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,QAAQ,KAAK,IAAI,CAAC,QAAQ,CAAC;AACtE,CAAC;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAC,IAAI,CAAC,YAAY,EAAE,kBAAkB,CAAC,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React, { useState } from 'react';
|
|
2
2
|
import { Box, Text, useInput, useStdin } from 'ink';
|
|
3
|
+
import { TUI_PALETTE } from './tuiPalette.js';
|
|
3
4
|
/**
|
|
4
5
|
* Pure windowing helper (exported for tests): index of the first visible
|
|
5
6
|
* item so the cursor stays roughly centered while the list scrolls.
|
|
@@ -42,18 +43,18 @@ export function SelectList({ title, items, onSelect, onCancel, maxVisible = 8, }
|
|
|
42
43
|
const start = windowStart(index, items.length, maxVisible);
|
|
43
44
|
const visible = items.slice(start, start + maxVisible);
|
|
44
45
|
const below = items.length - (start + visible.length);
|
|
45
|
-
return (React.createElement(Box, { flexDirection: "column", borderStyle: "round", borderColor:
|
|
46
|
-
React.createElement(Text, { bold: true, color:
|
|
46
|
+
return (React.createElement(Box, { flexDirection: "column", borderStyle: "round", borderColor: TUI_PALETTE.borderFocus, paddingX: 1 },
|
|
47
|
+
React.createElement(Text, { bold: true, color: TUI_PALETTE.brand }, title),
|
|
47
48
|
start > 0 && React.createElement(Text, { dimColor: true },
|
|
48
49
|
" \u2191 ",
|
|
49
50
|
start,
|
|
50
51
|
" more"),
|
|
51
52
|
visible.map((item, i) => {
|
|
52
53
|
const selected = start + i === index;
|
|
53
|
-
return (React.createElement(Text, { key: item.value, wrap: "truncate", color: selected ?
|
|
54
|
+
return (React.createElement(Text, { key: item.value, wrap: "truncate", color: selected ? TUI_PALETTE.brand : undefined },
|
|
54
55
|
selected ? '❯ ' : ' ',
|
|
55
56
|
React.createElement(Text, { bold: selected }, item.label),
|
|
56
|
-
item.current ? React.createElement(Text, { color:
|
|
57
|
+
item.current ? React.createElement(Text, { color: TUI_PALETTE.success }, " \u2713") : null,
|
|
57
58
|
item.hint ? React.createElement(Text, { dimColor: true },
|
|
58
59
|
" ",
|
|
59
60
|
item.hint) : null));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectList.js","sourceRoot":"","sources":["../../../src/cli/components/SelectList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"SelectList.js","sourceRoot":"","sources":["../../../src/cli/components/SelectList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC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AC,UAAU,EAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS;gBACnF,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI;gBACvB,oBAAC,IAAI,IAAC,IAAI,EAAE,QAAQ,IAAG,IAAI,CAAC,KAAK,CAAQ;gBACxC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,oBAAC,IAAI,IAAC,KAAK,EAAE,WAAW,CAAC,OAAO,cAAW,CAAC,CAAC,CAAC,IAAI;gBACjE,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,oBAAC,IAAI,IAAC,QAAQ;;oBAAI,IAAI,CAAC,IAAI,CAAQ,CAAC,CAAC,CAAC,IAAI,CAClD,CACR,CAAC;QACJ,CAAC,CAAC;QACD,KAAK,GAAG,CAAC,IAAI,oBAAC,IAAI,IAAC,QAAQ;;YAAM,KAAK;oBAAa;QACpD,oBAAC,IAAI,IAAC,QAAQ,qEAA4C,CACtD,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Box, Text } from 'ink';
|
|
3
|
+
import { TUI_PALETTE } from './tuiPalette.js';
|
|
3
4
|
/**
|
|
4
5
|
* The N-THEM emblem as Braille art (v0.7.9 / restored exact v1.6.0 glyph).
|
|
5
6
|
* Each Braille cell packs a 2×4 dot grid, denser than ASCII splash art.
|
|
@@ -68,11 +69,11 @@ export function Sidebar({ version, changes, rows }) {
|
|
|
68
69
|
// Width available for the path inside the box: total − border(2) − padding(2)
|
|
69
70
|
// − the " +NNN -NNN" tail (~11 chars).
|
|
70
71
|
const innerWidth = SIDEBAR_WIDTH - 4;
|
|
71
|
-
return (React.createElement(Box, { flexDirection: "column", width: SIDEBAR_WIDTH, borderStyle: "single", borderColor:
|
|
72
|
+
return (React.createElement(Box, { flexDirection: "column", width: SIDEBAR_WIDTH, borderStyle: "single", borderColor: TUI_PALETTE.border, paddingX: 1, flexShrink: 0 },
|
|
72
73
|
showEmblem && (React.createElement(Box, { justifyContent: "center" },
|
|
73
|
-
React.createElement(Text, { color:
|
|
74
|
+
React.createElement(Text, { color: TUI_PALETTE.brand }, EMBLEM_BRAILLE))),
|
|
74
75
|
React.createElement(Box, { justifyContent: "center" },
|
|
75
|
-
React.createElement(Text, { bold: true, color:
|
|
76
|
+
React.createElement(Text, { bold: true, color: TUI_PALETTE.brandAlt }, "ZELARI CODE")),
|
|
76
77
|
React.createElement(Box, { justifyContent: "center" },
|
|
77
78
|
React.createElement(Text, { dimColor: true },
|
|
78
79
|
"v",
|
|
@@ -94,12 +95,12 @@ function FileRow({ file, pathWidth }) {
|
|
|
94
95
|
const name = truncatePath(file.path, Math.max(6, pathWidth));
|
|
95
96
|
return (React.createElement(Box, null,
|
|
96
97
|
React.createElement(Text, { wrap: "truncate" },
|
|
97
|
-
React.createElement(Text, { color: file.untracked ?
|
|
98
|
-
file.untracked ? (React.createElement(Text, { color:
|
|
99
|
-
React.createElement(Text, { color:
|
|
98
|
+
React.createElement(Text, { color: file.untracked ? TUI_PALETTE.warn : TUI_PALETTE.text }, name),
|
|
99
|
+
file.untracked ? (React.createElement(Text, { color: TUI_PALETTE.warn }, " new")) : (React.createElement(React.Fragment, null,
|
|
100
|
+
React.createElement(Text, { color: TUI_PALETTE.success },
|
|
100
101
|
" +",
|
|
101
102
|
file.added ?? '·'),
|
|
102
|
-
React.createElement(Text, { color:
|
|
103
|
+
React.createElement(Text, { color: TUI_PALETTE.danger },
|
|
103
104
|
" -",
|
|
104
105
|
file.removed ?? '·'))))));
|
|
105
106
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.js","sourceRoot":"","sources":["../../../src/cli/components/Sidebar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CA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AC,WAAW,CAAC,IAAI,IAAG,IAAI,CAAQ;YAC/E,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAChB,oBAAC,IAAI,IAAC,KAAK,EAAE,WAAW,CAAC,IAAI,WAAa,CAC3C,CAAC,CAAC,CAAC,CACF;gBACE,oBAAC,IAAI,IAAC,KAAK,EAAE,WAAW,CAAC,OAAO;;oBAAK,IAAI,CAAC,KAAK,IAAI,GAAG,CAAQ;gBAC9D,oBAAC,IAAI,IAAC,KAAK,EAAE,WAAW,CAAC,MAAM;;oBAAK,IAAI,CAAC,OAAO,IAAI,GAAG,CAAQ,CAC9D,CACJ,CACI,CACH,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
// passed in as a prop instead.
|
|
20
20
|
import React, { useEffect, useState } from 'react';
|
|
21
21
|
import { Box, Text, useInput, useStdin } from 'ink';
|
|
22
|
+
import { TUI_PALETTE } from './tuiPalette.js';
|
|
22
23
|
/** How long the splash stays up before auto-dismissing (ms). */
|
|
23
24
|
export const SPLASH_DURATION_MS = 2000;
|
|
24
25
|
// Downscaled from the source emblem (142×79) by block-averaging glyph
|
|
@@ -178,9 +179,9 @@ function Splash({ onDone, version }) {
|
|
|
178
179
|
if (!picked)
|
|
179
180
|
return null;
|
|
180
181
|
return (React.createElement(Box, { flexDirection: "column", alignItems: "center", justifyContent: "center", width: columns, height: rows - 1 },
|
|
181
|
-
React.createElement(Text, { color:
|
|
182
|
+
React.createElement(Text, { color: TUI_PALETTE.brand }, picked.art),
|
|
182
183
|
React.createElement(Box, { marginTop: 1 },
|
|
183
|
-
React.createElement(Text, { bold: true, color:
|
|
184
|
+
React.createElement(Text, { bold: true, color: TUI_PALETTE.brandAlt }, 'Z E L A R I C O D E')),
|
|
184
185
|
!picked.compact && (React.createElement(Text, { dimColor: true }, `${version ? `v${version} — ` : ''}N-THEM Studio`)),
|
|
185
186
|
!picked.compact && (React.createElement(Text, { dimColor: true, italic: true }, "press any key to skip"))));
|
|
186
187
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SplashScreen.js","sourceRoot":"","sources":["../../../src/cli/components/SplashScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,wEAAwE;AACxE,sEAAsE;AACtE,0EAA0E;AAC1E,+BAA+B;AAC/B,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"SplashScreen.js","sourceRoot":"","sources":["../../../src/cli/components/SplashScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,wEAAwE;AACxE,sEAAsE;AACtE,0EAA0E;AAC1E,+BAA+B;AAC/B,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AACpD,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,gEAAgE;AAChE,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAEvC,sEAAsE;AACtE,4DAA4D;AAC5D,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iEAmC4C,CAAC;AAElE,MAAM,YAAY,GAAG;;;;;;;;;;;;;;;;;;;;;;;6CAuBwB,CAAC;AAE9C,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;+BAgBW,CAAC;AAEhC,MAAM,YAAY,GAAG;;;;;;;;;;;uBAWE,CAAC;AAExB,qFAAqF;AACrF,MAAM,gBAAgB,GAAG,CAAC,CAAC;AAC3B,wFAAwF;AACxF,MAAM,mBAAmB,GAAG,CAAC,CAAC;AA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AG,OAAO,CAAC,CAAC,CAAC,IAAI,OAAO,KAAK,CAAC,CAAC,CAAC,EAAE,eAAe,CAAQ,CAC1E;QACA,CAAC,MAAM,CAAC,OAAO,IAAI,CAClB,oBAAC,IAAI,IAAC,QAAQ,QAAC,MAAM,kCAEd,CACR,CACG,CACP,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,EACzB,QAAQ,EACR,OAAO,GAMR;IACC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,GAAG,EAAE,CACpC,gBAAgB,CAAC;QACf,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,KAAK,IAAI;QACpC,GAAG,EAAE,OAAO,CAAC,GAAG;QAChB,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE;QACrC,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE;KAChC,CAAC,CACH,CAAC;IAEF,IAAI,IAAI,EAAE,CAAC;QACT,OAAO,oBAAC,MAAM,IAAC,MAAM,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,OAAO,EAAE,OAAO,GAAI,CAAC;IACpE,CAAC;IACD,OAAO,0CAAG,QAAQ,CAAI,CAAC;AACzB,CAAC"}
|
|
@@ -7,11 +7,14 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import React from 'react';
|
|
9
9
|
import { Box, Text } from 'ink';
|
|
10
|
+
import { TUI_PALETTE } from './tuiPalette.js';
|
|
10
11
|
export function StartupBanner({ version, providerId, model, cwd, }) {
|
|
11
12
|
return (React.createElement(Box, { flexDirection: "column", marginBottom: 1 },
|
|
12
|
-
React.createElement(Text, { color:
|
|
13
|
-
"zelari-code
|
|
14
|
-
|
|
13
|
+
React.createElement(Text, { color: TUI_PALETTE.brand },
|
|
14
|
+
"zelari-code ",
|
|
15
|
+
React.createElement(Text, { color: TUI_PALETTE.brandAlt },
|
|
16
|
+
"v",
|
|
17
|
+
version),
|
|
15
18
|
" \u2014 ",
|
|
16
19
|
providerId,
|
|
17
20
|
"/",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StartupBanner.js","sourceRoot":"","sources":["../../../src/cli/components/StartupBanner.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"StartupBanner.js","sourceRoot":"","sources":["../../../src/cli/components/StartupBanner.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAY9C,MAAM,UAAU,aAAa,CAAC,EAC5B,OAAO,EACP,UAAU,EACV,KAAK,EACL,GAAG,GACgB;IACnB,OAAO,CACL,oBAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,YAAY,EAAE,CAAC;QACzC,oBAAC,IAAI,IAAC,KAAK,EAAE,WAAW,CAAC,KAAK;;YAChB,oBAAC,IAAI,IAAC,KAAK,EAAE,WAAW,CAAC,QAAQ;;gBAAI,OAAO,CAAQ;;YAAI,UAAU;;YAAG,KAAK,CACjF;QACP,oBAAC,IAAI,IAAC,QAAQ;;YAAO,GAAG,CAAQ;QAChC,oBAAC,IAAI,IAAC,QAAQ,qFAEP,CACH,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -3,6 +3,7 @@ import { Box, Text } from 'ink';
|
|
|
3
3
|
import { formatDuration } from '../utils/duration.js';
|
|
4
4
|
import { formatCost, formatTokens } from '../modelPricing.js';
|
|
5
5
|
import { Spinner } from './Spinner.js';
|
|
6
|
+
import { TUI_PALETTE, modeColor } from './tuiPalette.js';
|
|
6
7
|
/**
|
|
7
8
|
* StatusBar — single one-line status bar rendered below the input box.
|
|
8
9
|
*
|
|
@@ -23,15 +24,17 @@ function StatusBarImpl({ model, provider, sessionId, sessionActive, queueCount =
|
|
|
23
24
|
? formatTokens(contextUsed)
|
|
24
25
|
: null;
|
|
25
26
|
const modeLabel = mode === 'council' ? 'council' : mode === 'zelari' ? 'zelari' : 'kraken';
|
|
26
|
-
|
|
27
|
+
// TUI palette: the accent follows the label that is actually painted, so the
|
|
28
|
+
// token and the text can never disagree.
|
|
29
|
+
const modeTone = modeColor(modeLabel);
|
|
27
30
|
return (React.createElement(Box, { paddingX: 1, width: "100%", justifyContent: "space-between", gap: 2 },
|
|
28
31
|
React.createElement(Box, { flexShrink: 2 },
|
|
29
32
|
React.createElement(Text, { wrap: "truncate" },
|
|
30
|
-
React.createElement(Text, { color: sessionActive ?
|
|
33
|
+
React.createElement(Text, { color: sessionActive ? TUI_PALETTE.success : TUI_PALETTE.muted }, sessionActive ? '●' : '○'),
|
|
31
34
|
React.createElement(Text, { dimColor: true }, " "),
|
|
32
|
-
React.createElement(Text, { bold: true, color: phase === 'plan' ?
|
|
35
|
+
React.createElement(Text, { bold: true, color: phase === 'plan' ? TUI_PALETTE.warn : TUI_PALETTE.success }, phase === 'plan' ? '◇ plan' : '◆ build'),
|
|
33
36
|
React.createElement(Text, { dimColor: true }, " \u00B7 "),
|
|
34
|
-
React.createElement(Text, { bold: true, color:
|
|
37
|
+
React.createElement(Text, { bold: true, color: modeTone }, modeLabel),
|
|
35
38
|
verify ? (React.createElement(React.Fragment, null,
|
|
36
39
|
React.createElement(Text, { dimColor: true }, " \u00B7 "),
|
|
37
40
|
React.createElement(Text, { bold: true, color: verify.tone }, verify.label))) : null,
|
|
@@ -42,17 +45,17 @@ function StatusBarImpl({ model, provider, sessionId, sessionActive, queueCount =
|
|
|
42
45
|
jail ? (React.createElement(React.Fragment, null,
|
|
43
46
|
React.createElement(Text, { dimColor: true }, " \u00B7 "),
|
|
44
47
|
React.createElement(Text, { bold: true, color: jail.tone }, jail.label))) : null,
|
|
45
|
-
React.createElement(Text, { bold: true, color:
|
|
48
|
+
React.createElement(Text, { bold: true, color: TUI_PALETTE.brand }, provider),
|
|
46
49
|
React.createElement(Text, { dimColor: true }, " \u00B7 "),
|
|
47
50
|
React.createElement(Text, null, model),
|
|
48
51
|
cwd ? (React.createElement(React.Fragment, null,
|
|
49
52
|
React.createElement(Text, { dimColor: true }, " \u00B7 "),
|
|
50
|
-
React.createElement(Text, { color:
|
|
53
|
+
React.createElement(Text, { color: TUI_PALETTE.info }, cwd))) : null)),
|
|
51
54
|
React.createElement(Box, { flexShrink: 1 },
|
|
52
55
|
React.createElement(Text, { wrap: "truncate" },
|
|
53
56
|
busy && elapsedMs !== null ? (React.createElement(React.Fragment, null,
|
|
54
|
-
React.createElement(Spinner, { color:
|
|
55
|
-
React.createElement(Text, { color:
|
|
57
|
+
React.createElement(Spinner, { color: TUI_PALETTE.warn }),
|
|
58
|
+
React.createElement(Text, { color: TUI_PALETTE.warn },
|
|
56
59
|
" ",
|
|
57
60
|
formatDuration(elapsedMs)),
|
|
58
61
|
React.createElement(Text, { dimColor: true }, " \u00B7 "))) : lastMs !== null ? (React.createElement(React.Fragment, null,
|
|
@@ -61,24 +64,24 @@ function StatusBarImpl({ model, provider, sessionId, sessionActive, queueCount =
|
|
|
61
64
|
formatDuration(lastMs)),
|
|
62
65
|
React.createElement(Text, { dimColor: true }, " \u00B7 "))) : null,
|
|
63
66
|
queueCount > 0 ? (React.createElement(React.Fragment, null,
|
|
64
|
-
React.createElement(Text, { color:
|
|
67
|
+
React.createElement(Text, { color: TUI_PALETTE.brandAlt },
|
|
65
68
|
"queue ",
|
|
66
69
|
queueCount),
|
|
67
70
|
React.createElement(Text, { dimColor: true }, " \u00B7 "))) : null,
|
|
68
71
|
todoSummary ? (React.createElement(React.Fragment, null,
|
|
69
|
-
React.createElement(Text, { color:
|
|
72
|
+
React.createElement(Text, { color: TUI_PALETTE.warn }, todoSummary),
|
|
70
73
|
React.createElement(Text, { dimColor: true }, " \u00B7 "))) : null,
|
|
71
74
|
krakenLive ? (React.createElement(React.Fragment, null,
|
|
72
|
-
React.createElement(Text, { color:
|
|
75
|
+
React.createElement(Text, { color: TUI_PALETTE.brandAlt }, krakenLive),
|
|
73
76
|
React.createElement(Text, { dimColor: true }, " \u00B7 "))) : null,
|
|
74
77
|
krakenGraph ? (React.createElement(React.Fragment, null,
|
|
75
|
-
React.createElement(Text, { color:
|
|
78
|
+
React.createElement(Text, { color: TUI_PALETTE.brandAlt }, krakenGraph),
|
|
76
79
|
React.createElement(Text, { dimColor: true }, " \u00B7 "))) : null,
|
|
77
80
|
ctxLabel ? (React.createElement(React.Fragment, null,
|
|
78
|
-
React.createElement(Text, { color:
|
|
81
|
+
React.createElement(Text, { color: TUI_PALETTE.brand }, ctxLabel),
|
|
79
82
|
React.createElement(Text, { dimColor: true }, " \u00B7 "))) : null,
|
|
80
83
|
costUsd > 0 ? (React.createElement(React.Fragment, null,
|
|
81
|
-
React.createElement(Text, { color:
|
|
84
|
+
React.createElement(Text, { color: TUI_PALETTE.success }, formatCost(costUsd)),
|
|
82
85
|
cachedTokens > 0 ? (React.createElement(Text, { dimColor: true },
|
|
83
86
|
" (",
|
|
84
87
|
formatTokens(cachedTokens),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusBar.js","sourceRoot":"","sources":["../../../src/cli/components/StatusBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"StatusBar.js","sourceRoot":"","sources":["../../../src/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AI,CAAC,SAAS;QACjC,IAAI,CAAC,MAAM,KAAK,IAAI,CAAC,MAAM;QAC3B,IAAI,CAAC,OAAO,KAAK,IAAI,CAAC,OAAO;QAC7B,IAAI,CAAC,YAAY,KAAK,IAAI,CAAC,YAAY;QACvC,IAAI,CAAC,YAAY,KAAK,IAAI,CAAC,YAAY;QACvC,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,WAAW;QACrC,IAAI,CAAC,YAAY,KAAK,IAAI,CAAC,YAAY;QACvC,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,WAAW;QACrC,IAAI,CAAC,UAAU,KAAK,IAAI,CAAC,UAAU;QACnC,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,WAAW;QACrC,oBAAoB,CAAC,IAAI,CAAC,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC;QAC9C,oBAAoB,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC;QACxD,oBAAoB,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,CAC3C,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,aAAa,EAAE,mBAAmB,CAAC,CAAC"}
|
|
@@ -2,17 +2,18 @@ import React from 'react';
|
|
|
2
2
|
import { Box, Text } from 'ink';
|
|
3
3
|
import { useStdout } from 'ink';
|
|
4
4
|
import { formatToolResult } from './toolFormat.js';
|
|
5
|
+
import { TUI_PALETTE } from './tuiPalette.js';
|
|
5
6
|
function borderColor(toolName, ok) {
|
|
6
7
|
if (ok === false)
|
|
7
|
-
return
|
|
8
|
+
return TUI_PALETTE.danger;
|
|
8
9
|
const lower = toolName.toLowerCase();
|
|
9
10
|
if (lower.includes('read') || lower === 'cat' || lower.includes('grep') || lower.includes('search'))
|
|
10
|
-
return
|
|
11
|
+
return TUI_PALETTE.success;
|
|
11
12
|
if (lower.includes('write') || lower.includes('edit'))
|
|
12
|
-
return
|
|
13
|
+
return TUI_PALETTE.warn;
|
|
13
14
|
if (lower === 'bash' || lower === 'shell' || lower === 'exec')
|
|
14
|
-
return
|
|
15
|
-
return
|
|
15
|
+
return TUI_PALETTE.danger;
|
|
16
|
+
return TUI_PALETTE.brand;
|
|
16
17
|
}
|
|
17
18
|
function ToolOutputImpl(props) {
|
|
18
19
|
const { toolName, summary, body, ok, durationMs, live = false } = props;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ToolOutput.js","sourceRoot":"","sources":["../../../src/cli/components/ToolOutput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"ToolOutput.js","sourceRoot":"","sources":["../../../src/cli/components/ToolOutput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAiB,MAAM,iBAAiB,CAAC;AA4C7D,SAAS,WAAW,CAAC,QAAgB,EAAE,EAAY;IACjD,IAAI,EAAE,KAAK,KAAK;QAAE,OAAO,WAAW,CAAC,MAAM,CAAC;IAC5C,MAAM,KAAK,GAAG,QAAQ,CAAC,WAAW,EAAE,CAAC;IACrC,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,KAAK,KAAK,KAAK,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,QAAQ,CAAC,QAAQ,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,IAAC,KAAK,EAAE,KAAK,IAAG,WAAW,CAAQ,CACpC;QACN,oBAAC,GAAG,IACF,aAAa,EAAC,QAAQ,EACtB,UAAU,EAAE,CAAC,EACb,KAAK,EAAE,QAAQ,EACf,WAAW,EAAC,QAAQ,EACpB,WAAW,EAAE,KAAK,EAClB,QAAQ,EAAE,CAAC;YAIX,oBAAC,IAAI,IAAC,QAAQ,EAAE,OAAO;gBAAG,QAAQ;gBAAE,UAAU,CAAQ,CAClD,CACF,CACP,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;AAErD;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,QAAgB,EAAE,EAAY;IAC9D,OAAO,WAAW,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* tuiPalette.ts — the SINGLE source of truth for the colors of the Ink TUI.
|
|
3
|
+
*
|
|
4
|
+
* Every color painted by `src/cli/components/*` resolves to a token here, so
|
|
5
|
+
* retuning the UI is a one-file edit instead of a grep across components, and
|
|
6
|
+
* two surfaces can never drift into "almost the same" accent.
|
|
7
|
+
*
|
|
8
|
+
* Design rules:
|
|
9
|
+
*
|
|
10
|
+
* - Ink NAMED colors only (chalk keywords). They map onto the 16 ANSI slots
|
|
11
|
+
* that every terminal renders — including Windows conhost / legacy
|
|
12
|
+
* consoles — so the UI never depends on truecolor support.
|
|
13
|
+
* - Restrained on purpose: accents belong to branding (brand / brandAlt) and
|
|
14
|
+
* to state (success / warn / danger / info). Message bodies and scrollback
|
|
15
|
+
* stay uncolored.
|
|
16
|
+
* - Duo-tone brand: the emblem/art is `brand`, the wordmark is `brandAlt`.
|
|
17
|
+
*
|
|
18
|
+
* The palette is frozen by `as const`; a token's inferred literal type IS the
|
|
19
|
+
* set of legal TUI colors (`TuiColor`).
|
|
20
|
+
*/
|
|
21
|
+
export const TUI_PALETTE = {
|
|
22
|
+
/** Primary brand accent — emblem/art, prompt caret, identity chips. */
|
|
23
|
+
brand: 'cyan',
|
|
24
|
+
/** Secondary brand accent — wordmark, council/kraken chips, queue. */
|
|
25
|
+
brandAlt: 'magenta',
|
|
26
|
+
/** Positive state — ok, done, build phase, read-only tools. */
|
|
27
|
+
success: 'green',
|
|
28
|
+
/** Attention / in-progress — plan phase, timers, writes, todos. */
|
|
29
|
+
warn: 'yellow',
|
|
30
|
+
/** Failure — errors, destructive shell tools, kraken mode. */
|
|
31
|
+
danger: 'red',
|
|
32
|
+
/** Neutral information — paths, context meter. */
|
|
33
|
+
info: 'blue',
|
|
34
|
+
/** De-emphasized text — hints, idle state. */
|
|
35
|
+
muted: 'gray',
|
|
36
|
+
/** Idle border of the input surfaces. */
|
|
37
|
+
border: 'gray',
|
|
38
|
+
/** Border of the surface that currently owns the keyboard. */
|
|
39
|
+
borderFocus: 'cyan',
|
|
40
|
+
/** Default foreground for labeled items with no state attached. */
|
|
41
|
+
text: 'white',
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Dispatch-mode accent: `council` → brandAlt, `zelari` → success,
|
|
45
|
+
* `kraken` → danger, anything else → brand.
|
|
46
|
+
*/
|
|
47
|
+
export function modeColor(mode) {
|
|
48
|
+
if (mode === 'council')
|
|
49
|
+
return TUI_PALETTE.brandAlt;
|
|
50
|
+
if (mode === 'zelari')
|
|
51
|
+
return TUI_PALETTE.success;
|
|
52
|
+
if (mode === 'kraken')
|
|
53
|
+
return TUI_PALETTE.danger;
|
|
54
|
+
return TUI_PALETTE.brand;
|
|
55
|
+
}
|
|
56
|
+
//# sourceMappingURL=tuiPalette.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tuiPalette.js","sourceRoot":"","sources":["../../../src/cli/components/tuiPalette.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,uEAAuE;IACvE,KAAK,EAAE,MAAM;IACb,sEAAsE;IACtE,QAAQ,EAAE,SAAS;IACnB,+DAA+D;IAC/D,OAAO,EAAE,OAAO;IAChB,mEAAmE;IACnE,IAAI,EAAE,QAAQ;IACd,8DAA8D;IAC9D,MAAM,EAAE,KAAK;IACb,kDAAkD;IAClD,IAAI,EAAE,MAAM;IACZ,8CAA8C;IAC9C,KAAK,EAAE,MAAM;IACb,yCAAyC;IACzC,MAAM,EAAE,MAAM;IACd,8DAA8D;IAC9D,WAAW,EAAE,MAAM;IACnB,mEAAmE;IACnE,IAAI,EAAE,OAAO;CACL,CAAC;AAKX;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,IAAY;IACpC,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,WAAW,CAAC,QAAQ,CAAC;IACpD,IAAI,IAAI,KAAK,QAAQ;QAAE,OAAO,WAAW,CAAC,OAAO,CAAC;IAClD,IAAI,IAAI,KAAK,QAAQ;QAAE,OAAO,WAAW,CAAC,MAAM,CAAC;IACjD,OAAO,WAAW,CAAC,KAAK,CAAC;AAC3B,CAAC"}
|