klyro 0.1.39 → 0.1.40
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/tui/app.d.ts +2 -2
- package/dist/tui/app.js +13 -13
- package/dist/tui/tokens.d.ts +41 -41
- package/dist/tui/tokens.js +47 -50
- package/package.json +1 -1
package/dist/tui/app.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Klyro TUI
|
|
3
|
-
* Header 3 rows, guide
|
|
2
|
+
* Klyro TUI — opencode-clean — no clumsy words, correct wrap, markdown, scroll
|
|
3
|
+
* Header 3 rows, guide │ at col2, ◠Klyro accent, prose wrapped at word boundaries
|
|
4
4
|
*/
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import type { StatusSnapshot } from './status.js';
|
package/dist/tui/app.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
/**
|
|
3
|
-
* Klyro TUI
|
|
4
|
-
* Header 3 rows, guide
|
|
3
|
+
* Klyro TUI — opencode-clean — no clumsy words, correct wrap, markdown, scroll
|
|
4
|
+
* Header 3 rows, guide │ at col2, ◠Klyro accent, prose wrapped at word boundaries
|
|
5
5
|
*/
|
|
6
6
|
import { useState, useEffect, useRef, useCallback } from 'react';
|
|
7
7
|
import { Box, Text, useInput, useStdout } from 'ink';
|
|
@@ -19,7 +19,7 @@ function Header({ cwd, model, version, width }) {
|
|
|
19
19
|
return '';
|
|
20
20
|
} })();
|
|
21
21
|
const showLinks = width >= 120;
|
|
22
|
-
return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsxs(Box, { justifyContent: "space-between", children: [_jsxs(Text, { bold: true, color: tokens.colors.accent, children: ["KLYRO v", version] }), showLinks ? _jsx(Text, { color: tokens.colors.dim, children: "
|
|
22
|
+
return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsxs(Box, { justifyContent: "space-between", children: [_jsxs(Text, { bold: true, color: tokens.colors.accent, children: ["KLYRO v", version] }), showLinks ? _jsx(Text, { color: tokens.colors.dim, children: "\u00E2\u201D\u201A /help /config /clear /exit" }) : null] }), _jsxs(Text, { color: tokens.colors.dim, children: [model, "[200k] \u00C2\u00B7 API Usage Billing"] }), _jsxs(Text, { color: tokens.colors.dim, children: [cwd, branch ? ` · ${branch}` : ''] })] }));
|
|
23
23
|
}
|
|
24
24
|
function verbForTool(name) {
|
|
25
25
|
if (name === 'read_file')
|
|
@@ -71,7 +71,7 @@ function groupTools(items) {
|
|
|
71
71
|
flush();
|
|
72
72
|
return out;
|
|
73
73
|
}
|
|
74
|
-
// Simple markdown: **bold**
|
|
74
|
+
// Simple markdown: **bold** → bold, keep lists/tables, wrap at word boundaries
|
|
75
75
|
function MarkdownText({ text, dim, width }) {
|
|
76
76
|
// Split by **bold** segments
|
|
77
77
|
const parts = [];
|
|
@@ -89,7 +89,7 @@ function MarkdownText({ text, dim, width }) {
|
|
|
89
89
|
parts.push(_jsx(Text, { color: dim ? tokens.colors.dim : undefined, wrap: "wrap", children: text.slice(last) }, `t-${idx++}`));
|
|
90
90
|
if (parts.length === 0)
|
|
91
91
|
return _jsx(Text, { color: dim ? tokens.colors.dim : undefined, wrap: "wrap", children: text });
|
|
92
|
-
// Render as single line with bold segments
|
|
92
|
+
// Render as single line with bold segments — Ink will wrap the parent Box
|
|
93
93
|
return _jsx(Text, { wrap: "wrap", children: parts });
|
|
94
94
|
}
|
|
95
95
|
export function App(props) {
|
|
@@ -241,9 +241,9 @@ export function App(props) {
|
|
|
241
241
|
const cost = (status.usageInput / 1000 * 0.003 + status.usageOutput / 1000 * 0.015);
|
|
242
242
|
const totalTokens = status.usageInput + status.usageOutput;
|
|
243
243
|
const ctxPct = totalTokens > 0 ? Math.round((totalTokens / 120_000) * 100) : 0;
|
|
244
|
-
const baseHints = status.status === 'running' ? 'ctrl+c to stop
|
|
245
|
-
const hints = maxOffset > 0 && isFullscreen ? `${baseHints}
|
|
246
|
-
return (_jsxs(Box, { flexDirection: "column", width: width, height: isFullscreen ? height - 1 : undefined, children: [_jsx(Header, { cwd: props.cwd, model: status.model, version: ver, width: width }), _jsxs(Box, { flexDirection: "row", flexGrow: isFullscreen ? 1 : 0, overflow: isFullscreen ? 'hidden' : undefined, children: [_jsxs(Box, { flexDirection: "column", flexGrow: 1, overflow: isFullscreen ? 'hidden' : undefined, paddingX: 0, children: [grouped.length === 0 ? (_jsx(Text, { color: tokens.colors.dim, children: "Message
|
|
244
|
+
const baseHints = status.status === 'running' ? 'ctrl+c to stop · enter to queue · ctrl+o expand' : transcript.length === 0 ? 'shift+tab to cycle · ↑↓ for history · / for commands' : 'enter to send · shift+enter newline · @ to attach';
|
|
245
|
+
const hints = maxOffset > 0 && isFullscreen ? `${baseHints} · PgUp/Dn scroll` : baseHints;
|
|
246
|
+
return (_jsxs(Box, { flexDirection: "column", width: width, height: isFullscreen ? height - 1 : undefined, children: [_jsx(Header, { cwd: props.cwd, model: status.model, version: ver, width: width }), _jsxs(Box, { flexDirection: "row", flexGrow: isFullscreen ? 1 : 0, overflow: isFullscreen ? 'hidden' : undefined, children: [_jsxs(Box, { flexDirection: "column", flexGrow: 1, overflow: isFullscreen ? 'hidden' : undefined, paddingX: 0, children: [grouped.length === 0 ? (_jsx(Text, { color: tokens.colors.dim, children: "Message Klyro\u00E2\u20AC\u00A6" })) : visibleGrouped.map((item) => {
|
|
247
247
|
if (item.verb) {
|
|
248
248
|
const gr = item;
|
|
249
249
|
const isExpanded = expandedGroups.has(gr.id);
|
|
@@ -276,8 +276,8 @@ export function App(props) {
|
|
|
276
276
|
return `Edited ${gr.items.length} files`;
|
|
277
277
|
return `${gr.verb} ${gr.items.length} items`;
|
|
278
278
|
})();
|
|
279
|
-
const right = gr.status === 'running' ? `${(elapsed / 1000).toFixed(1)}s` : gr.status === 'error' ? '
|
|
280
|
-
const marker = isExpanded ? '
|
|
279
|
+
const right = gr.status === 'running' ? `${(elapsed / 1000).toFixed(1)}s` : gr.status === 'error' ? '✗' : `${gr.totalMs}ms`;
|
|
280
|
+
const marker = isExpanded ? '▼' : '✓';
|
|
281
281
|
const markerColor = gr.status === 'error' ? tokens.colors.err : gr.status === 'running' ? tokens.colors.warn : tokens.colors.ok;
|
|
282
282
|
return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsxs(Box, { children: [_jsxs(Text, { color: tokens.colors.guide, children: [" ", g('guide'), " "] }), _jsxs(Text, { color: markerColor, children: [marker, " ", verbLine] }), _jsxs(Text, { color: tokens.colors.dim, children: [" ", right] })] }), isExpanded ? gr.items.map((it) => {
|
|
283
283
|
let friendly = '';
|
|
@@ -305,11 +305,11 @@ export function App(props) {
|
|
|
305
305
|
return _jsxs(Box, { marginBottom: 1, children: [_jsxs(Text, { color: tokens.colors.accent, bold: true, children: [g('prompt'), " "] }), _jsx(Text, { wrap: "wrap", children: it.text })] }, it.id);
|
|
306
306
|
}
|
|
307
307
|
if (it.kind === 'text') {
|
|
308
|
-
// prose
|
|
308
|
+
// prose — render markdown, not raw **, with proper wrap and guide
|
|
309
309
|
return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsxs(Box, { children: [_jsxs(Text, { color: tokens.colors.guide, children: [" ", g('guide'), " "] }), _jsxs(Text, { color: tokens.colors.accent, children: [g('agentBullet'), " Klyro"] })] }), _jsx(Box, { paddingLeft: 2, flexDirection: "column", children: _jsxs(Box, { children: [_jsxs(Text, { color: tokens.colors.dim, children: [" ", g('guide'), " "] }), _jsx(Box, { flexGrow: 1, children: _jsx(MarkdownText, { text: it.text }) })] }) })] }, it.id));
|
|
310
310
|
}
|
|
311
311
|
if (it.kind === 'error')
|
|
312
|
-
return _jsx(Box, { paddingLeft: 2, marginBottom: 1, children: _jsxs(Text, { color: tokens.colors.err, children: [" ", g('guide'), "
|
|
312
|
+
return _jsx(Box, { paddingLeft: 2, marginBottom: 1, children: _jsxs(Text, { color: tokens.colors.err, children: [" ", g('guide'), " \u00E2\u0153\u2014 ", it.message] }) }, it.id);
|
|
313
313
|
if (it.kind === 'policy')
|
|
314
314
|
return null;
|
|
315
315
|
if (it.kind === 'file_changed')
|
|
@@ -317,5 +317,5 @@ export function App(props) {
|
|
|
317
317
|
if (it.kind === 'diff')
|
|
318
318
|
return (_jsxs(Box, { flexDirection: "column", paddingLeft: 2, marginBottom: 1, children: [_jsx(Text, { bold: true, color: tokens.colors.soft, children: it.summary ?? 'Diff' }), it.hunks.map((h, i) => (_jsxs(Box, { flexDirection: "column", marginTop: 0, children: [_jsx(Text, { color: tokens.colors.soft, children: h.path }), h.lines.map((l, j) => (_jsxs(Text, { wrap: "wrap", color: l.kind === 'add' ? tokens.colors.ok : l.kind === 'remove' ? tokens.colors.err : tokens.colors.dim, children: [l.kind === 'add' ? '+ ' : l.kind === 'remove' ? '- ' : ' ', l.text] }, j)))] }, i)))] }, it.id));
|
|
319
319
|
return null;
|
|
320
|
-
}), status.status === 'running' && !streamingIdRef.current ? (_jsxs(Box, { paddingLeft: 2, marginBottom: 1, children: [_jsxs(Text, { color: tokens.colors.guide, children: [" ", g('guide'), " "] }), _jsx(Text, { color: tokens.colors.dim, children: "Thinking..." }), _jsxs(Text, { color: tokens.colors.dim, children: [" ", (elapsed / 1000).toFixed(1), "s"] })] })) : null, plan.length > 0 ? (_jsxs(Box, { flexDirection: "column", paddingLeft: 2, marginTop: 0, marginBottom: 1, children: [_jsxs(Box, { children: [_jsxs(Text, { color: tokens.colors.guide, children: [" ", g('guide'), " "] }), _jsxs(Text, { bold: true, children: [g('todoPlan'), " Plan ", plan.filter((p) => p.status === 'done').length, "/", plan.length] })] }), plan.slice(0, 8).map((p) => (_jsxs(Box, { children: [_jsxs(Text, { color: tokens.colors.guide, children: [" ", g('guide'), " "] }), _jsxs(Text, { color: p.status === 'done' ? tokens.colors.ok : p.status === 'in_progress' ? tokens.colors.accent : tokens.colors.dim, children: [p.status === 'done' ? g('todoDone') : p.status === 'in_progress' ? g('todoActive') : g('todoPending'), " ", p.title] })] }, p.id)))] })) : null, queuedInputs.length > 0 ? (_jsx(Box, { flexDirection: "column", paddingLeft: 2, marginBottom: 1, children: queuedInputs.map((q, i) => (_jsxs(Text, { color: tokens.colors.dim, children: ["queued: ", q.slice(0, 60), i === 0 ? ' esc to drop' : ''] }, i))) })) : null] }), isFullscreen ? (_jsx(Box, { flexDirection: "column", width: 1, marginLeft: 1, children: Array.from({ length: trackH }).map((_, i) => (_jsx(Text, { color: i === thumbPos ? tokens.colors.accent : tokens.colors.guide, children: i === thumbPos ? '
|
|
320
|
+
}), status.status === 'running' && !streamingIdRef.current ? (_jsxs(Box, { paddingLeft: 2, marginBottom: 1, children: [_jsxs(Text, { color: tokens.colors.guide, children: [" ", g('guide'), " "] }), _jsx(Text, { color: tokens.colors.dim, children: "Thinking..." }), _jsxs(Text, { color: tokens.colors.dim, children: [" ", (elapsed / 1000).toFixed(1), "s"] })] })) : null, plan.length > 0 ? (_jsxs(Box, { flexDirection: "column", paddingLeft: 2, marginTop: 0, marginBottom: 1, children: [_jsxs(Box, { children: [_jsxs(Text, { color: tokens.colors.guide, children: [" ", g('guide'), " "] }), _jsxs(Text, { bold: true, children: [g('todoPlan'), " Plan ", plan.filter((p) => p.status === 'done').length, "/", plan.length] })] }), plan.slice(0, 8).map((p) => (_jsxs(Box, { children: [_jsxs(Text, { color: tokens.colors.guide, children: [" ", g('guide'), " "] }), _jsxs(Text, { color: p.status === 'done' ? tokens.colors.ok : p.status === 'in_progress' ? tokens.colors.accent : tokens.colors.dim, children: [p.status === 'done' ? g('todoDone') : p.status === 'in_progress' ? g('todoActive') : g('todoPending'), " ", p.title] })] }, p.id)))] })) : null, queuedInputs.length > 0 ? (_jsx(Box, { flexDirection: "column", paddingLeft: 2, marginBottom: 1, children: queuedInputs.map((q, i) => (_jsxs(Text, { color: tokens.colors.dim, children: ["queued: ", q.slice(0, 60), i === 0 ? ' esc to drop' : ''] }, i))) })) : null] }), isFullscreen ? (_jsx(Box, { flexDirection: "column", width: 1, marginLeft: 1, children: Array.from({ length: trackH }).map((_, i) => (_jsx(Text, { color: i === thumbPos ? tokens.colors.accent : tokens.colors.guide, children: i === thumbPos ? 'â—' : '│' }, i))) })) : null] }), _jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { color: tokens.colors.guide, children: g('rule').repeat(Math.max(10, width - 2)) }), _jsxs(Box, { children: [_jsxs(Text, { color: tokens.colors.accent, bold: true, children: [g('prompt'), " "] }), _jsxs(Text, { wrap: "wrap", children: [input || _jsx(Text, { color: tokens.colors.dim, children: "Message Klyro\u00E2\u20AC\u00A6" }), "\u00E2\u2013\u008F"] })] }), _jsx(Text, { color: tokens.colors.guide, children: g('rule').repeat(Math.max(10, width - 2)) })] }), _jsxs(Box, { justifyContent: "space-between", children: [_jsxs(Text, { color: tokens.colors.dim, children: [baseHints, maxOffset > 0 && isFullscreen ? ' · PgUp/Dn scroll' : ''] }), _jsxs(Text, { color: tokens.colors.dim, children: [cost > 0 ? `$${cost.toFixed(2)} · ` : '', ctxPct > 0 ? `${ctxPct}% ctx · ` : '', status.status === 'running' ? 'auto mode on â—' : ''] })] })] }));
|
|
321
321
|
}
|
package/dist/tui/tokens.d.ts
CHANGED
|
@@ -1,33 +1,35 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* No backgrounds except diff viewer. fg.dim G��4.5:1 on near-black.
|
|
2
|
+
* Klyro tokens — White & Orange #FF6B1A light + Dark #E8843C — per design.md + TUI_DESIGN.md
|
|
3
|
+
* True 24-bit hex, Ink will render via 256-color fallback. No backgrounds except diff.
|
|
5
4
|
*/
|
|
6
5
|
export declare const tokens: {
|
|
7
6
|
readonly colors: {
|
|
8
|
-
readonly
|
|
9
|
-
readonly
|
|
7
|
+
readonly bg: "#FFFFFF";
|
|
8
|
+
readonly bgElevated: "#FAF7F2";
|
|
9
|
+
readonly fg: "#1A1A1A";
|
|
10
10
|
readonly soft: "#F5F5F5";
|
|
11
11
|
readonly dim: "#9A9A9A";
|
|
12
12
|
readonly guide: "#3A3A3A";
|
|
13
|
-
readonly
|
|
13
|
+
readonly accent: "#FF6B1A";
|
|
14
|
+
readonly accentSoft: "#FFF1E6";
|
|
15
|
+
readonly ok: "#FF6B1A";
|
|
14
16
|
readonly err: "#E06C6C";
|
|
15
|
-
readonly warn: "#
|
|
16
|
-
readonly info: "#
|
|
17
|
+
readonly warn: "#FF6B1A";
|
|
18
|
+
readonly info: "#6FA8DC";
|
|
17
19
|
readonly diffAddBg: "#12250F";
|
|
18
20
|
readonly diffDelBg: "#2A1212";
|
|
19
21
|
};
|
|
20
22
|
readonly ansi: {
|
|
21
23
|
readonly accent: "yellowBright";
|
|
22
24
|
readonly accentBold: "yellowBright";
|
|
23
|
-
readonly fg: "
|
|
24
|
-
readonly soft: "
|
|
25
|
+
readonly fg: "white";
|
|
26
|
+
readonly soft: "whiteBright";
|
|
25
27
|
readonly dim: "gray";
|
|
26
28
|
readonly guide: "gray";
|
|
27
29
|
readonly ok: "yellowBright";
|
|
28
30
|
readonly err: "red";
|
|
29
31
|
readonly warn: "yellowBright";
|
|
30
|
-
readonly info: "
|
|
32
|
+
readonly info: "blue";
|
|
31
33
|
readonly border: "gray";
|
|
32
34
|
readonly muted: "gray";
|
|
33
35
|
readonly success: "yellowBright";
|
|
@@ -37,34 +39,30 @@ export declare const tokens: {
|
|
|
37
39
|
};
|
|
38
40
|
export declare const glyphs: {
|
|
39
41
|
readonly prompt: ">";
|
|
40
|
-
readonly agentBullet: "
|
|
41
|
-
readonly collapsed: "
|
|
42
|
-
readonly expanded: "
|
|
43
|
-
readonly guide: "
|
|
44
|
-
readonly branch: "
|
|
45
|
-
readonly end: "
|
|
46
|
-
readonly rule: "
|
|
47
|
-
readonly treeBranch: "
|
|
48
|
-
readonly treeEnd: "
|
|
49
|
-
readonly success: "
|
|
50
|
-
readonly failure: "
|
|
42
|
+
readonly agentBullet: "●";
|
|
43
|
+
readonly collapsed: "▸";
|
|
44
|
+
readonly expanded: "▾";
|
|
45
|
+
readonly guide: "│";
|
|
46
|
+
readonly branch: "├";
|
|
47
|
+
readonly end: "└";
|
|
48
|
+
readonly rule: "─";
|
|
49
|
+
readonly treeBranch: "├──";
|
|
50
|
+
readonly treeEnd: "└──";
|
|
51
|
+
readonly success: "✓";
|
|
52
|
+
readonly failure: "✗";
|
|
51
53
|
readonly warning: "!";
|
|
52
|
-
readonly repair: "
|
|
53
|
-
readonly todoPending: "
|
|
54
|
-
readonly todoActive: "
|
|
55
|
-
readonly todoDone: "
|
|
56
|
-
readonly todoPlan: "
|
|
57
|
-
readonly
|
|
58
|
-
readonly
|
|
59
|
-
readonly
|
|
60
|
-
readonly
|
|
61
|
-
readonly
|
|
62
|
-
readonly
|
|
63
|
-
readonly
|
|
64
|
-
readonly meterEmpty: "G��";
|
|
65
|
-
readonly continuation: "G�";
|
|
66
|
-
readonly brand: "G��";
|
|
67
|
-
readonly compaction: "G��";
|
|
54
|
+
readonly repair: "↻";
|
|
55
|
+
readonly todoPending: "○";
|
|
56
|
+
readonly todoActive: "●";
|
|
57
|
+
readonly todoDone: "✓";
|
|
58
|
+
readonly todoPlan: "◇";
|
|
59
|
+
readonly logoBar: "▌";
|
|
60
|
+
readonly dotFilled: "●";
|
|
61
|
+
readonly dotEmpty: "○";
|
|
62
|
+
readonly brand: "◆";
|
|
63
|
+
readonly compaction: "⟲";
|
|
64
|
+
readonly editsBadge: "✎";
|
|
65
|
+
readonly dot: "·";
|
|
68
66
|
};
|
|
69
67
|
export declare const glyphAscii: {
|
|
70
68
|
readonly prompt: ">";
|
|
@@ -85,11 +83,13 @@ export declare const glyphAscii: {
|
|
|
85
83
|
readonly todoActive: "[>]";
|
|
86
84
|
readonly todoDone: "[x]";
|
|
87
85
|
readonly todoPlan: "#";
|
|
86
|
+
readonly logoBar: "|";
|
|
87
|
+
readonly dotFilled: "*";
|
|
88
|
+
readonly dotEmpty: "o";
|
|
88
89
|
};
|
|
89
90
|
export declare function isAsciiMode(): boolean;
|
|
90
91
|
export declare function g(name: keyof typeof glyphs): string;
|
|
91
92
|
export declare const spacing: {
|
|
92
|
-
readonly
|
|
93
|
-
readonly
|
|
94
|
-
readonly gap: 1;
|
|
93
|
+
readonly sidebar: 28;
|
|
94
|
+
readonly inspector: 36;
|
|
95
95
|
};
|
package/dist/tui/tokens.js
CHANGED
|
@@ -1,33 +1,35 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
* No backgrounds except diff viewer. fg.dim G��4.5:1 on near-black.
|
|
2
|
+
* Klyro tokens — White & Orange #FF6B1A light + Dark #E8843C — per design.md + TUI_DESIGN.md
|
|
3
|
+
* True 24-bit hex, Ink will render via 256-color fallback. No backgrounds except diff.
|
|
5
4
|
*/
|
|
6
5
|
export const tokens = {
|
|
7
6
|
colors: {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
bg: '#FFFFFF',
|
|
8
|
+
bgElevated: '#FAF7F2',
|
|
9
|
+
fg: '#1A1A1A',
|
|
10
|
+
soft: '#F5F5F5',
|
|
11
|
+
dim: '#9A9A9A',
|
|
12
|
+
guide: '#3A3A3A',
|
|
13
|
+
accent: '#FF6B1A',
|
|
14
|
+
accentSoft: '#FFF1E6',
|
|
15
|
+
ok: '#FF6B1A',
|
|
14
16
|
err: '#E06C6C',
|
|
15
|
-
warn: '#
|
|
16
|
-
info: '#
|
|
17
|
+
warn: '#FF6B1A',
|
|
18
|
+
info: '#6FA8DC',
|
|
17
19
|
diffAddBg: '#12250F',
|
|
18
20
|
diffDelBg: '#2A1212',
|
|
19
21
|
},
|
|
20
22
|
ansi: {
|
|
21
|
-
accent: 'yellowBright',
|
|
23
|
+
accent: 'yellowBright',
|
|
22
24
|
accentBold: 'yellowBright',
|
|
23
|
-
fg: '
|
|
24
|
-
soft: '
|
|
25
|
+
fg: 'white',
|
|
26
|
+
soft: 'whiteBright',
|
|
25
27
|
dim: 'gray',
|
|
26
28
|
guide: 'gray',
|
|
27
|
-
ok: 'yellowBright',
|
|
29
|
+
ok: 'yellowBright',
|
|
28
30
|
err: 'red',
|
|
29
|
-
warn: 'yellowBright',
|
|
30
|
-
info: '
|
|
31
|
+
warn: 'yellowBright',
|
|
32
|
+
info: 'blue',
|
|
31
33
|
border: 'gray',
|
|
32
34
|
muted: 'gray',
|
|
33
35
|
success: 'yellowBright',
|
|
@@ -37,35 +39,30 @@ export const tokens = {
|
|
|
37
39
|
};
|
|
38
40
|
export const glyphs = {
|
|
39
41
|
prompt: '>',
|
|
40
|
-
agentBullet: '
|
|
41
|
-
collapsed: '
|
|
42
|
-
expanded: '
|
|
43
|
-
guide: '
|
|
44
|
-
branch: '
|
|
45
|
-
end: '
|
|
46
|
-
rule: '
|
|
47
|
-
treeBranch: '
|
|
48
|
-
treeEnd: '
|
|
49
|
-
success: '
|
|
50
|
-
failure: '
|
|
42
|
+
agentBullet: '●',
|
|
43
|
+
collapsed: '▸',
|
|
44
|
+
expanded: '▾',
|
|
45
|
+
guide: '│',
|
|
46
|
+
branch: '├',
|
|
47
|
+
end: '└',
|
|
48
|
+
rule: '─',
|
|
49
|
+
treeBranch: '├──',
|
|
50
|
+
treeEnd: '└──',
|
|
51
|
+
success: '✓',
|
|
52
|
+
failure: '✗',
|
|
51
53
|
warning: '!',
|
|
52
|
-
repair: '
|
|
53
|
-
todoPending: '
|
|
54
|
-
todoActive: '
|
|
55
|
-
todoDone: '
|
|
56
|
-
todoPlan: '
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
meterEmpty: 'G��',
|
|
65
|
-
continuation: 'G�',
|
|
66
|
-
// compat
|
|
67
|
-
brand: 'G��',
|
|
68
|
-
compaction: 'G��',
|
|
54
|
+
repair: '↻',
|
|
55
|
+
todoPending: '○',
|
|
56
|
+
todoActive: '●',
|
|
57
|
+
todoDone: '✓',
|
|
58
|
+
todoPlan: '◇',
|
|
59
|
+
logoBar: '▌',
|
|
60
|
+
dotFilled: '●',
|
|
61
|
+
dotEmpty: '○',
|
|
62
|
+
brand: '◆',
|
|
63
|
+
compaction: '⟲',
|
|
64
|
+
editsBadge: '✎',
|
|
65
|
+
dot: '·',
|
|
69
66
|
};
|
|
70
67
|
export const glyphAscii = {
|
|
71
68
|
prompt: '>',
|
|
@@ -86,16 +83,16 @@ export const glyphAscii = {
|
|
|
86
83
|
todoActive: '[>]',
|
|
87
84
|
todoDone: '[x]',
|
|
88
85
|
todoPlan: '#',
|
|
86
|
+
logoBar: '|',
|
|
87
|
+
dotFilled: '*',
|
|
88
|
+
dotEmpty: 'o',
|
|
89
89
|
};
|
|
90
90
|
export function isAsciiMode() {
|
|
91
|
-
return
|
|
92
|
-
process.env.KLYRO_ASCII === '1' ||
|
|
93
|
-
(process.env.LANG !== undefined && !process.env.LANG.toLowerCase().includes('utf-8')) ||
|
|
94
|
-
false);
|
|
91
|
+
return process.env.TERM === 'dumb' || process.env.KLYRO_ASCII === '1' || false;
|
|
95
92
|
}
|
|
96
93
|
export function g(name) {
|
|
97
94
|
if (isAsciiMode())
|
|
98
95
|
return glyphAscii[name] ?? glyphs[name];
|
|
99
96
|
return glyphs[name];
|
|
100
97
|
}
|
|
101
|
-
export const spacing = {
|
|
98
|
+
export const spacing = { sidebar: 28, inspector: 36 };
|