zelari-code 0.7.8 → 0.7.9
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/README.md +27 -1
- package/bin/zelari-code.js +1 -1
- package/dist/agents/councilApi.js +7 -7
- package/dist/agents/councilApi.js.map +1 -1
- package/dist/agents/councilDirectives.js +3 -3
- package/dist/agents/promoteMember.js +2 -2
- package/dist/agents/roles.js +50 -32
- package/dist/agents/roles.js.map +1 -1
- package/dist/agents/skills/builtin/debugging.js +4 -4
- package/dist/agents/skills/builtin/debugging.js.map +1 -1
- package/dist/agents/skills/builtin/docs.js +23 -13
- package/dist/agents/skills/builtin/docs.js.map +1 -1
- package/dist/agents/skills/builtin/git-ops.js +3 -3
- package/dist/agents/skills/builtin/git-ops.js.map +1 -1
- package/dist/agents/skills/builtin/planning.js +4 -4
- package/dist/agents/skills/builtin/planning.js.map +1 -1
- package/dist/agents/skills/builtin/refactoring.js +3 -3
- package/dist/agents/skills/builtin/refactoring.js.map +1 -1
- package/dist/agents/skills/builtin/review.js +9 -9
- package/dist/agents/skills/builtin/review.js.map +1 -1
- package/dist/agents/skills/builtin/testing.js +3 -3
- package/dist/agents/skills/builtin/testing.js.map +1 -1
- package/dist/agents/tools.js +2 -9
- package/dist/agents/tools.js.map +1 -1
- package/dist/cli/app.js +48 -17
- package/dist/cli/app.js.map +1 -1
- package/dist/cli/components/CollapsibleToolOutput.js +8 -26
- package/dist/cli/components/CollapsibleToolOutput.js.map +1 -1
- package/dist/cli/components/Header.js +6 -18
- package/dist/cli/components/Header.js.map +1 -1
- package/dist/cli/components/Sidebar.js +86 -37
- package/dist/cli/components/Sidebar.js.map +1 -1
- package/dist/cli/components/SplashScreen.js +117 -71
- package/dist/cli/components/SplashScreen.js.map +1 -1
- package/dist/cli/components/StatusBar.js +22 -18
- package/dist/cli/components/StatusBar.js.map +1 -1
- package/dist/cli/councilConfig.js +38 -0
- package/dist/cli/councilConfig.js.map +1 -0
- package/dist/cli/councilDispatcher.js +35 -49
- package/dist/cli/councilDispatcher.js.map +1 -1
- package/dist/cli/hooks/useChatTurn.js +80 -61
- package/dist/cli/hooks/useChatTurn.js.map +1 -1
- package/dist/cli/hooks/useExecutionTimer.js +25 -0
- package/dist/cli/hooks/useExecutionTimer.js.map +1 -0
- package/dist/cli/hooks/useGitChanges.js +142 -0
- package/dist/cli/hooks/useGitChanges.js.map +1 -0
- package/dist/cli/hooks/useSlashDispatch.js +9 -2
- package/dist/cli/hooks/useSlashDispatch.js.map +1 -1
- package/dist/cli/main.bundled.js +1668 -1151
- package/dist/cli/main.bundled.js.map +4 -4
- package/dist/cli/main.js +1 -1
- package/dist/cli/mcp/mcpClient.js +14 -6
- package/dist/cli/mcp/mcpClient.js.map +1 -1
- package/dist/cli/updater.js +8 -5
- package/dist/cli/updater.js.map +1 -1
- package/dist/cli/utils/cmdline.js +26 -0
- package/dist/cli/utils/cmdline.js.map +1 -0
- package/dist/cli/utils/paths.js +20 -0
- package/dist/cli/utils/paths.js.map +1 -0
- package/dist/cli/workspace/planDetect.js +17 -0
- package/dist/cli/workspace/planDetect.js.map +1 -0
- package/dist/cli/workspace/postCouncilHook.js +39 -28
- package/dist/cli/workspace/postCouncilHook.js.map +1 -1
- package/dist/cli/workspace/stubs.js +241 -196
- package/dist/cli/workspace/stubs.js.map +1 -1
- package/dist/main/core/AgentHarness.js +36 -7
- package/dist/main/core/AgentHarness.js.map +1 -1
- package/dist/main/core/tools/builtin/listFiles.js +43 -5
- package/dist/main/core/tools/builtin/listFiles.js.map +1 -1
- package/dist/main/core/tools/builtin/search.js +28 -120
- package/dist/main/core/tools/builtin/search.js.map +1 -1
- package/package.json +71 -71
- package/dist/cli/oauthCallbackServer.js +0 -207
- package/dist/cli/oauthCallbackServer.js.map +0 -1
- package/dist/main/core/tools/builtin/_walk.js +0 -129
- package/dist/main/core/tools/builtin/_walk.js.map +0 -1
- package/dist/main/core/tools/builtin/diff.js +0 -477
- package/dist/main/core/tools/builtin/diff.js.map +0 -1
|
@@ -1,44 +1,93 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Box, Text } from 'ink';
|
|
3
3
|
/**
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* The N-THEM emblem as Braille art (v0.7.9). Each Braille cell packs a 2×4
|
|
5
|
+
* dot grid, so this reads ~4× denser than the ASCII `EMBLEM_MICRO` it
|
|
6
|
+
* replaces while using fewer rows (9 vs 12). Generated by thresholding the
|
|
7
|
+
* splash `EMBLEM_LARGE` glyph densities and resampling to 48×36 dots.
|
|
8
|
+
*/
|
|
9
|
+
const EMBLEM_BRAILLE = `⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣴⣿⣷⣆⡀
|
|
10
|
+
⠀⠀⠀⠀⠀⠀⠀⢀⣶⣿⣿⣿⣿⣿⣿⣦⡀
|
|
11
|
+
⠀⠀⠀⠀⠀⠀⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦
|
|
12
|
+
⠀⠀⠀⠀⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡄
|
|
13
|
+
⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⠙⠻⣿⣿⣿⣿⣿⣿⠆
|
|
14
|
+
⠀⠀⠀⠀⣈⣿⣿⣿⣿⣿⣿⣿⠀⣷⣬⡛⢿⣿⣟⣁
|
|
15
|
+
⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀⡿⢿⡿⢃⣈⣻⣿⣿⣶
|
|
16
|
+
⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣠⣴⣆⠻⠎⢿⣿⣿⣿⣿⣧
|
|
17
|
+
⣰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇`;
|
|
18
|
+
/** Column width of the sidebar (border + padding included). */
|
|
19
|
+
export const SIDEBAR_WIDTH = 28;
|
|
20
|
+
/** Sidebar only renders on terminals at least this wide. */
|
|
21
|
+
export const SIDEBAR_MIN_COLUMNS = 96;
|
|
22
|
+
/** The Braille emblem is added only when the terminal is at least this tall. */
|
|
23
|
+
const EMBLEM_MIN_ROWS = 26;
|
|
24
|
+
/** Max file rows before collapsing to "+N more". */
|
|
25
|
+
const MAX_FILES_SHORT = 6;
|
|
26
|
+
const MAX_FILES_TALL = 10;
|
|
27
|
+
/**
|
|
28
|
+
* Pure helper: should the sidebar render at all? It lives in the dynamic
|
|
29
|
+
* region (Ink repaints it), so it must never make that region taller than
|
|
30
|
+
* the terminal — narrow or tiny panes skip it entirely.
|
|
31
|
+
*/
|
|
32
|
+
export function shouldShowSidebar(columns, rows) {
|
|
33
|
+
return columns >= SIDEBAR_MIN_COLUMNS && rows >= 16;
|
|
34
|
+
}
|
|
35
|
+
/** Truncate a repo-relative path to `max` chars keeping the tail (filename). */
|
|
36
|
+
export function truncatePath(p, max) {
|
|
37
|
+
if (p.length <= max)
|
|
38
|
+
return p;
|
|
39
|
+
return `…${p.slice(-(max - 1))}`;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Sidebar — right-hand column of the dynamic region (v0.7.9).
|
|
6
43
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* parent render.
|
|
44
|
+
* Shows the Braille N-THEM emblem (on tall terminals), the wordmark + version, and
|
|
45
|
+
* the current git working-tree changes with +added/-removed line counts
|
|
46
|
+
* (from `useGitChanges`). It CANNOT span the scrollback area — finalized
|
|
47
|
+
* messages are printed natively via <Static> — so it docks next to the
|
|
48
|
+
* live/status/input block at the bottom, which Ink owns and repaints.
|
|
13
49
|
*/
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
React.createElement(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
React.createElement(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
50
|
+
export function Sidebar({ version, changes, rows }) {
|
|
51
|
+
const showEmblem = rows >= EMBLEM_MIN_ROWS;
|
|
52
|
+
const maxFiles = rows >= EMBLEM_MIN_ROWS + 8 ? MAX_FILES_TALL : MAX_FILES_SHORT;
|
|
53
|
+
const visible = changes.files.slice(0, maxFiles);
|
|
54
|
+
const hidden = changes.files.length - visible.length;
|
|
55
|
+
// Width available for the path inside the box: total − border(2) − padding(2)
|
|
56
|
+
// − the " +NNN -NNN" tail (~11 chars).
|
|
57
|
+
const innerWidth = SIDEBAR_WIDTH - 4;
|
|
58
|
+
return (React.createElement(Box, { flexDirection: "column", width: SIDEBAR_WIDTH, borderStyle: "single", borderColor: "gray", paddingX: 1, flexShrink: 0 },
|
|
59
|
+
showEmblem && (React.createElement(Box, { justifyContent: "center" },
|
|
60
|
+
React.createElement(Text, { color: "cyan" }, EMBLEM_BRAILLE))),
|
|
61
|
+
React.createElement(Box, { justifyContent: "center" },
|
|
62
|
+
React.createElement(Text, { bold: true, color: "white" }, "ZELARI CODE")),
|
|
63
|
+
React.createElement(Box, { justifyContent: "center" },
|
|
64
|
+
React.createElement(Text, { dimColor: true },
|
|
65
|
+
"v",
|
|
66
|
+
version,
|
|
67
|
+
changes.branch ? ` · ${truncatePath(changes.branch, 12)}` : '')),
|
|
68
|
+
React.createElement(Text, { dimColor: true }, '─'.repeat(innerWidth)),
|
|
69
|
+
!changes.isRepo ? (React.createElement(Text, { dimColor: true, italic: true }, "not a git repo")) : changes.files.length === 0 ? (React.createElement(Text, { dimColor: true, italic: true }, "no changes")) : (React.createElement(React.Fragment, null,
|
|
70
|
+
React.createElement(Text, { dimColor: true },
|
|
71
|
+
"changes (",
|
|
72
|
+
changes.files.length,
|
|
73
|
+
")"),
|
|
74
|
+
visible.map((f) => (React.createElement(FileRow, { key: f.path, file: f, pathWidth: innerWidth - 10 }))),
|
|
75
|
+
hidden > 0 && React.createElement(Text, { dimColor: true },
|
|
76
|
+
" +",
|
|
77
|
+
hidden,
|
|
78
|
+
" more\u2026")))));
|
|
79
|
+
}
|
|
80
|
+
function FileRow({ file, pathWidth }) {
|
|
81
|
+
const name = truncatePath(file.path, Math.max(6, pathWidth));
|
|
82
|
+
return (React.createElement(Box, null,
|
|
83
|
+
React.createElement(Text, { wrap: "truncate" },
|
|
84
|
+
React.createElement(Text, { color: file.untracked ? 'yellow' : 'white' }, name),
|
|
85
|
+
file.untracked ? (React.createElement(Text, { color: "yellow" }, " new")) : (React.createElement(React.Fragment, null,
|
|
86
|
+
React.createElement(Text, { color: "green" },
|
|
87
|
+
" +",
|
|
88
|
+
file.added ?? '·'),
|
|
89
|
+
React.createElement(Text, { color: "red" },
|
|
90
|
+
" -",
|
|
91
|
+
file.removed ?? '·'))))));
|
|
37
92
|
}
|
|
38
|
-
export const Sidebar = React.memo(SidebarImpl, (prev, next) => {
|
|
39
|
-
return (prev.skillList === next.skillList &&
|
|
40
|
-
prev.sessionCount === next.sessionCount &&
|
|
41
|
-
prev.isSlashMode === next.isSlashMode &&
|
|
42
|
-
prev.height === next.height);
|
|
43
|
-
});
|
|
44
93
|
//# sourceMappingURL=Sidebar.js.map
|
|
@@ -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,CAAC;
|
|
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,EA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AAC,EAAE,SAAS,EAAE,UAAU,GAAG,EAAE,GAAI,CAC9D,CAAC;YACD,MAAM,GAAG,CAAC,IAAI,oBAAC,IAAI,IAAC,QAAQ;;gBAAK,MAAM;8BAAc,CACrD,CACJ,CACG,CACP,CAAC;AACJ,CAAC;AAED,SAAS,OAAO,CAAC,EAAE,IAAI,EAAE,SAAS,EAA8C;IAC9E,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC;IAC7D,OAAO,CACL,oBAAC,GAAG;QACF,oBAAC,IAAI,IAAC,IAAI,EAAC,UAAU;YACnB,oBAAC,IAAI,IAAC,KAAK,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,IAAG,IAAI,CAAQ;YAC9D,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAChB,oBAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,WAAY,CACjC,CAAC,CAAC,CAAC,CACF;gBACE,oBAAC,IAAI,IAAC,KAAK,EAAC,OAAO;;oBAAI,IAAI,CAAC,KAAK,IAAI,GAAG,CAAQ;gBAChD,oBAAC,IAAI,IAAC,KAAK,EAAC,KAAK;;oBAAI,IAAI,CAAC,OAAO,IAAI,GAAG,CAAQ,CAC/C,CACJ,CACI,CACH,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
* ASCII art) centered in the terminal for ~2 seconds — or until any key is
|
|
6
6
|
* pressed — then unmounts and gives way to the normal App.
|
|
7
7
|
*
|
|
8
|
-
* Sizing:
|
|
9
|
-
* as constants; `pickSplashArt` chooses the largest one that fits
|
|
10
|
-
* current terminal
|
|
11
|
-
* (the splash is then
|
|
8
|
+
* Sizing: four pre-rendered variants (64/44/30/22 columns wide) are
|
|
9
|
+
* embedded as constants; `pickSplashArt` chooses the largest one that fits
|
|
10
|
+
* the current terminal (dropping the version/hint footer on short panes),
|
|
11
|
+
* or returns null when even the micro one doesn't fit (the splash is then
|
|
12
|
+
* skipped entirely).
|
|
12
13
|
*
|
|
13
14
|
* Skipped when stdout is not a TTY (pipes, CI) or `ZELARI_NO_SPLASH=1`.
|
|
14
15
|
*/
|
|
@@ -22,68 +23,99 @@ import { Box, Text, useInput, useStdin } from 'ink';
|
|
|
22
23
|
export const SPLASH_DURATION_MS = 2000;
|
|
23
24
|
// Downscaled from the source emblem (142×79) by block-averaging glyph
|
|
24
25
|
// density — see docs/plans/2026-07-03-cli-splash-screen.md.
|
|
25
|
-
const EMBLEM_LARGE = ` =%@*-
|
|
26
|
-
=%@@@@@#:
|
|
27
|
-
*%%%%%%@@%-
|
|
28
|
-
:#%%%%%%%%%@@*
|
|
29
|
-
:*%%%%%%%%%%%%%@%*.
|
|
30
|
-
=%%%%%%%%%%%%%%%%@@%.
|
|
31
|
-
=%%%%%%%%%%%%%%%%%%%@%-
|
|
32
|
-
*%%%%%%%%%%%%%%%%%%%%%@@=
|
|
33
|
-
.#%%%%%%%%@@@@@@@@%%%%%%@@@+
|
|
34
|
-
:#%%%%%%@@@@@@@@@@@@@@@%%%%@@+
|
|
35
|
-
-%%%%%@@@@@@@@@@@@@@@@@@@@@%%@@#.
|
|
36
|
-
-%%%%%@@@@@@@@@@@@@@@@@@@@@@@%%@@%:
|
|
37
|
-
=%%%%@@@@@@@@@@@@@@@@@@@@@@@@@@@%@@%.
|
|
38
|
-
+%%%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%@@%:
|
|
39
|
-
=%%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@-
|
|
40
|
-
-%%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%:
|
|
41
|
-
:%%%%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@%
|
|
42
|
-
#%%%%%@@@@@@@@@@@@@@@%--#%@@@@@@@@@@@@@%%@@@=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
=*%%%%@@@@@@@@@@@%%@@@@%: -#@@@@@@@*: :*@@@@@@%+=
|
|
51
|
+
-*%%%%%%%%%%@@@@@@@@@@@@@@@: -%@@@@@@@@#- -#@@@@@@@@*
|
|
52
|
+
#%%%%%%%%%%%%%@@@@@@@@@@@@@: -#@@@@@%+-::. *@@@@@@@@=
|
|
53
|
+
=%%%%%%%%%%%%%%%@@@@@@@@@@@@: :*+--=%#. :+++++*@@@@@@@@%
|
|
54
|
+
#@%%%%%%%%%%%%%@@@@@@@@@@@@%: .. - -## *@@@@@@@@@@@@@@=
|
|
55
|
+
:@@%%%%%%%%%%%%@@@@@@@@@@@@@%: .**= *%= :%@@@@@@@@@@@@@%
|
|
56
|
+
#@@@%%%%%%%%%%%@@@@@@@@@@@@@@- =#@@%- :**: =%@@@@@@@@@@@@@+
|
|
57
|
+
=@@@@@%%%@@%%%%@@@@@@@@@@@@@@@@@@@@@@%- :: .-#@@@@@@@@@@@@@%.
|
|
58
|
+
:@@@@@@%%@@@%%@@@@@@@@@@@@@@@@@@@@@@@@@%==*%%@@@@@@@@@@@@@@@@#
|
|
59
|
+
*@@@@@@@%@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@:
|
|
60
|
+
:@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@+
|
|
60
61
|
=##########*######**##**#*********##**#*#######################*`;
|
|
61
|
-
const EMBLEM_SMALL = ` =%%*:
|
|
62
|
-
:#%%@@@+
|
|
63
|
-
=%%%%%%%@#.
|
|
64
|
-
.*%%%%%%%%%@%-
|
|
65
|
-
=%%%%%%%%%%%%%@*.
|
|
66
|
-
+%%%%%%@@@@@%%%%@%:
|
|
67
|
-
*%%%%@@@@@@@@@@@%%@%:
|
|
68
|
-
*%%%@@@@@@@@@@@@@@@%@%-
|
|
69
|
-
:#%%@@@@@@@@@@@@@@@@@@@@@+
|
|
70
|
-
:%%%@@@@@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@@@@@=
|
|
102
|
+
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%#`;
|
|
103
|
+
const EMBLEM_MICRO = ` -#%=
|
|
104
|
+
+%%%%#.
|
|
105
|
+
:#%%%%%%%-
|
|
106
|
+
:%%@@@@@@@@=
|
|
107
|
+
-%@@@@@@@@@@@+
|
|
108
|
+
:%@@@@@@%@@@@@@=
|
|
109
|
+
-%%@@@@@.+%@@%@+
|
|
110
|
+
-@@@@@@:%++%@=
|
|
111
|
+
=*%@@@@@@:@@%=*@#+.
|
|
112
|
+
=%%%%%@@@@:+++-*%@@*
|
|
113
|
+
.%%%%%@@@@@+%+=:%@@@@:
|
|
114
|
+
*@@@@@@@@@@@@@%@@@@@@*`;
|
|
115
|
+
/** Rows the FULL footer (margin + wordmark + version + hint) needs below the art. */
|
|
116
|
+
const FOOTER_ROWS_FULL = 5;
|
|
117
|
+
/** Rows the COMPACT footer (margin + wordmark only) needs — used on short terminals. */
|
|
118
|
+
const FOOTER_ROWS_COMPACT = 2;
|
|
87
119
|
function measure(art) {
|
|
88
120
|
const lines = art.split('\n');
|
|
89
121
|
return {
|
|
@@ -92,15 +124,29 @@ function measure(art) {
|
|
|
92
124
|
height: lines.length,
|
|
93
125
|
};
|
|
94
126
|
}
|
|
95
|
-
const VARIANTS = [
|
|
127
|
+
const VARIANTS = [
|
|
128
|
+
measure(EMBLEM_LARGE),
|
|
129
|
+
measure(EMBLEM_SMALL),
|
|
130
|
+
measure(EMBLEM_TINY),
|
|
131
|
+
measure(EMBLEM_MICRO),
|
|
132
|
+
];
|
|
96
133
|
/**
|
|
97
|
-
* Pure helper: pick the largest emblem variant that fits `columns`×`rows
|
|
98
|
-
*
|
|
134
|
+
* Pure helper: pick the largest emblem variant that fits `columns`×`rows`.
|
|
135
|
+
* Tries the full footer first (wordmark + version + hint); on short
|
|
136
|
+
* terminals falls back to the compact footer (wordmark only) so the
|
|
137
|
+
* splash still shows in low panes like VS Code's integrated terminal.
|
|
138
|
+
* Returns null only when even the micro variant doesn't fit.
|
|
99
139
|
*/
|
|
100
140
|
export function pickSplashArt(columns, rows) {
|
|
141
|
+
// Largest art wins: a bigger emblem with the compact footer beats a
|
|
142
|
+
// smaller emblem with the full footer.
|
|
101
143
|
for (const v of VARIANTS) {
|
|
102
|
-
if (v.width
|
|
103
|
-
|
|
144
|
+
if (v.width > columns - 2)
|
|
145
|
+
continue;
|
|
146
|
+
if (v.height + FOOTER_ROWS_FULL <= rows)
|
|
147
|
+
return { ...v, compact: false };
|
|
148
|
+
if (v.height + FOOTER_ROWS_COMPACT <= rows)
|
|
149
|
+
return { ...v, compact: true };
|
|
104
150
|
}
|
|
105
151
|
return null;
|
|
106
152
|
}
|
|
@@ -135,8 +181,8 @@ function Splash({ onDone, version }) {
|
|
|
135
181
|
React.createElement(Text, { color: "cyan" }, picked.art),
|
|
136
182
|
React.createElement(Box, { marginTop: 1 },
|
|
137
183
|
React.createElement(Text, { bold: true, color: "white" }, 'Z E L A R I C O D E')),
|
|
138
|
-
React.createElement(Text, { dimColor: true }, `${version ? `v${version} — ` : ''}N-THEM Studio`),
|
|
139
|
-
React.createElement(Text, { dimColor: true, italic: true }, "press any key to skip")));
|
|
184
|
+
!picked.compact && (React.createElement(Text, { dimColor: true }, `${version ? `v${version} — ` : ''}N-THEM Studio`)),
|
|
185
|
+
!picked.compact && (React.createElement(Text, { dimColor: true, italic: true }, "press any key to skip"))));
|
|
140
186
|
}
|
|
141
187
|
/**
|
|
142
188
|
* SplashGate — renders the splash first, then swaps in `children` (the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SplashScreen.js","sourceRoot":"","sources":["../../../src/cli/components/SplashScreen.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"SplashScreen.js","sourceRoot":"","sources":["../../../src/cli/components/SplashScreen.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,wEAAwE;AACxE,sEAAsE;AACtE,0EAA0E;AAC1E,+B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AI,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"}
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Box, Text } from 'ink';
|
|
3
|
-
import {
|
|
3
|
+
import { formatDuration } from '../utils/duration.js';
|
|
4
4
|
/**
|
|
5
|
-
* StatusBar — single one-line status bar
|
|
6
|
-
*
|
|
7
|
-
*
|
|
5
|
+
* StatusBar — single one-line status bar. v0.7.9: rendered BELOW the input
|
|
6
|
+
* box (the "top bar" position above it is gone), and the token/cost fields
|
|
7
|
+
* are replaced by an execution timer: `⏱ 12s` while a run is in flight,
|
|
8
|
+
* `last 34s` after it completes.
|
|
8
9
|
*
|
|
9
10
|
* Why one line: the static-scrollback model (v0.7.0) needs the dynamic
|
|
10
11
|
* region as short as possible. A single status line + the input bar + the
|
|
11
12
|
* streaming tail is always well under a screen, so no full repaint.
|
|
12
13
|
*/
|
|
13
|
-
export function StatusBar({ model, provider, sessionId, sessionActive,
|
|
14
|
-
const hasCost = typeof totalCostUsd === 'number' && totalCostUsd > 0;
|
|
15
|
-
const costStr = hasCost ? formatCost(totalCostUsd) : '$0.0000';
|
|
16
|
-
const tokStr = formatTokens(totalTokens ?? 0);
|
|
14
|
+
export function StatusBar({ model, provider, sessionId, sessionActive, queueCount = 0, busy = false, mode = 'agent', cwd, elapsedMs = null, lastMs = null, }) {
|
|
17
15
|
return (React.createElement(Box, { paddingX: 1 },
|
|
18
16
|
React.createElement(Text, { color: sessionActive ? 'green' : 'gray' }, sessionActive ? '●' : '○'),
|
|
19
17
|
React.createElement(Text, { dimColor: true }, " "),
|
|
18
|
+
React.createElement(Text, { bold: true, color: mode === 'council' ? 'magenta' : 'cyan' }, mode === 'council' ? '⛬ council' : '⏵ agent'),
|
|
19
|
+
React.createElement(Text, { dimColor: true }, " (shift+tab)"),
|
|
20
|
+
React.createElement(Text, { dimColor: true }, " \u00B7 "),
|
|
20
21
|
React.createElement(Text, { bold: true, color: "cyan" }, provider),
|
|
21
22
|
React.createElement(Text, { dimColor: true }, " \u00B7 "),
|
|
22
23
|
React.createElement(Text, null, model),
|
|
@@ -24,19 +25,22 @@ export function StatusBar({ model, provider, sessionId, sessionActive, totalToke
|
|
|
24
25
|
React.createElement(Text, { dimColor: true },
|
|
25
26
|
"session ",
|
|
26
27
|
sessionId),
|
|
27
|
-
React.createElement(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
cwd ? (React.createElement(React.Fragment, null,
|
|
29
|
+
React.createElement(Text, { dimColor: true }, " \u00B7 "),
|
|
30
|
+
React.createElement(Text, { color: "blue" }, cwd))) : null,
|
|
31
|
+
busy && elapsedMs !== null ? (React.createElement(React.Fragment, null,
|
|
32
|
+
React.createElement(Text, { dimColor: true }, " \u00B7 "),
|
|
33
|
+
React.createElement(Text, { color: "yellow" },
|
|
34
|
+
"\u23F1 ",
|
|
35
|
+
formatDuration(elapsedMs)))) : lastMs !== null ? (React.createElement(React.Fragment, null,
|
|
36
|
+
React.createElement(Text, { dimColor: true }, " \u00B7 "),
|
|
37
|
+
React.createElement(Text, { dimColor: true },
|
|
38
|
+
"last ",
|
|
39
|
+
formatDuration(lastMs)))) : null,
|
|
33
40
|
queueCount > 0 ? (React.createElement(React.Fragment, null,
|
|
34
41
|
React.createElement(Text, { dimColor: true }, " \u00B7 "),
|
|
35
42
|
React.createElement(Text, { color: "magenta" },
|
|
36
43
|
"queue ",
|
|
37
|
-
queueCount))) : null
|
|
38
|
-
busy ? (React.createElement(React.Fragment, null,
|
|
39
|
-
React.createElement(Text, { dimColor: true }, " \u00B7 "),
|
|
40
|
-
React.createElement(Text, { color: "yellow" }, "working"))) : null));
|
|
44
|
+
queueCount))) : null));
|
|
41
45
|
}
|
|
42
46
|
//# sourceMappingURL=StatusBar.js.map
|
|
@@ -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,
|
|
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;AAqBtD;;;;;;;;;GASG;AACH,MAAM,UAAU,SAAS,CAAC,EACxB,KAAK,EACL,QAAQ,EACR,SAAS,EACT,aAAa,EACb,UAAU,GAAG,CAAC,EACd,IAAI,GAAG,KAAK,EACZ,IAAI,GAAG,OAAO,EACd,GAAG,EACH,SAAS,GAAG,IAAI,EAChB,MAAM,GAAG,IAAI,GACE;IACf,OAAO,CACL,oBAAC,GAAG,IAAC,QAAQ,EAAE,CAAC;QACd,oBAAC,IAAI,IAAC,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,IAC1C,aAAa,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CACrB;QACP,oBAAC,IAAI,IAAC,QAAQ,cAAS;QACvB,oBAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAE,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,IACtD,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,SAAS,CACxC;QACP,oBAAC,IAAI,IAAC,QAAQ,yBAAo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
|
|
5
|
+
* Lucifero always run. Opt into the lighter tier via `ZELARI_COUNCIL_TIER=lite`
|
|
6
|
+
* or an explicit `councilSize` below 6.
|
|
7
|
+
*/
|
|
8
|
+
export const COUNCIL_TIER_SIZES = {
|
|
9
|
+
lite: 3,
|
|
10
|
+
full: 6,
|
|
11
|
+
};
|
|
12
|
+
export function resolveCouncilTier(opts) {
|
|
13
|
+
const env = opts?.env ?? process.env;
|
|
14
|
+
if (opts?.explicitSize !== undefined) {
|
|
15
|
+
const size = clampCouncilSize(opts.explicitSize);
|
|
16
|
+
return { tier: size >= COUNCIL_TIER_SIZES.full ? 'full' : 'lite', councilSize: size };
|
|
17
|
+
}
|
|
18
|
+
const envSize = env['ZELARI_COUNCIL_SIZE'];
|
|
19
|
+
if (envSize) {
|
|
20
|
+
const parsed = Number.parseInt(envSize, 10);
|
|
21
|
+
if (Number.isFinite(parsed) && parsed > 0) {
|
|
22
|
+
const size = clampCouncilSize(parsed);
|
|
23
|
+
return { tier: size >= COUNCIL_TIER_SIZES.full ? 'full' : 'lite', councilSize: size };
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
const tierEnv = env['ZELARI_COUNCIL_TIER']?.toLowerCase();
|
|
27
|
+
if (tierEnv === 'lite') {
|
|
28
|
+
return { tier: 'lite', councilSize: COUNCIL_TIER_SIZES.lite };
|
|
29
|
+
}
|
|
30
|
+
if (tierEnv === 'full') {
|
|
31
|
+
return { tier: 'full', councilSize: COUNCIL_TIER_SIZES.full };
|
|
32
|
+
}
|
|
33
|
+
return { tier: 'full', councilSize: COUNCIL_TIER_SIZES.full };
|
|
34
|
+
}
|
|
35
|
+
function clampCouncilSize(n) {
|
|
36
|
+
return Math.min(COUNCIL_TIER_SIZES.full, Math.max(1, Math.floor(n)));
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=councilConfig.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"councilConfig.js","sourceRoot":"","sources":["../../src/cli/counc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