klyro 0.1.34 → 0.1.35
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/repl.js +3 -6
- package/dist/tui/app.js +9 -1
- package/dist/tui/tokens.d.ts +7 -7
- package/dist/tui/tokens.js +8 -8
- package/package.json +1 -1
package/dist/cli/repl.js
CHANGED
|
@@ -105,12 +105,9 @@ export async function startRepl(opts = {}) {
|
|
|
105
105
|
else
|
|
106
106
|
pendingQueue.push({ kind: 'plan', plan: p });
|
|
107
107
|
}
|
|
108
|
-
// ── Full-screen takeover like OpenCode
|
|
109
|
-
//
|
|
110
|
-
|
|
111
|
-
const supportsAlt = !!process.env.WT_SESSION || process.env.TERM_PROGRAM === 'vscode' || (process.env.TERM ?? '').includes('xterm') || process.platform !== 'win32' || process.env.KLYRO_ALT_SCREEN === '1';
|
|
112
|
-
const noAlt = process.env.KLYRO_NO_ALT === '1' || process.env.NO_ALT === '1';
|
|
113
|
-
const isAltScreen = useTui && !!process.stdout.isTTY && supportsAlt && !noAlt;
|
|
108
|
+
// ── Full-screen takeover like OpenCode — always when klyro in TTY (user explicitly wants it)
|
|
109
|
+
// Scroll now works correctly via internal viewport, not native terminal scroll
|
|
110
|
+
const isAltScreen = useTui && !!process.stdout.isTTY && process.env.KLYRO_NO_ALT !== '1';
|
|
114
111
|
const enterAlt = () => {
|
|
115
112
|
if (!isAltScreen)
|
|
116
113
|
return;
|
package/dist/tui/app.js
CHANGED
|
@@ -110,7 +110,15 @@ export function App(props) {
|
|
|
110
110
|
const isFullscreen = props.isFullscreen ?? false;
|
|
111
111
|
const grouped = groupTools(transcript);
|
|
112
112
|
const viewportH = Math.max(5, height - 10);
|
|
113
|
-
const
|
|
113
|
+
const estLines = (s) => Math.max(1, Math.ceil(s.length / Math.max(20, width - 6)));
|
|
114
|
+
const totalRows = grouped.reduce((sum, it) => {
|
|
115
|
+
if (it.verb)
|
|
116
|
+
return sum + 1 + ((it.items.length > 1 && expandedGroups.has(it.id)) ? it.items.length : 0);
|
|
117
|
+
const t = it;
|
|
118
|
+
if (t.kind === 'text')
|
|
119
|
+
return sum + estLines(t.text) + 1;
|
|
120
|
+
return sum + 2;
|
|
121
|
+
}, 0) + (plan.length > 0 ? plan.length + 1 : 0) + 2;
|
|
114
122
|
const maxOffset = Math.max(0, totalRows - viewportH);
|
|
115
123
|
const isAtBottom = scrollOffset >= maxOffset;
|
|
116
124
|
const trackH = viewportH;
|
package/dist/tui/tokens.d.ts
CHANGED
|
@@ -18,21 +18,21 @@ export declare const tokens: {
|
|
|
18
18
|
readonly diffDelBg: "#2A1212";
|
|
19
19
|
};
|
|
20
20
|
readonly ansi: {
|
|
21
|
-
readonly accent: "
|
|
21
|
+
readonly accent: "yellowBright";
|
|
22
22
|
readonly accentBold: "yellowBright";
|
|
23
|
-
readonly fg: "
|
|
24
|
-
readonly soft: "
|
|
23
|
+
readonly fg: "whiteBright";
|
|
24
|
+
readonly soft: "white";
|
|
25
25
|
readonly dim: "gray";
|
|
26
26
|
readonly guide: "gray";
|
|
27
|
-
readonly ok: "
|
|
27
|
+
readonly ok: "yellowBright";
|
|
28
28
|
readonly err: "red";
|
|
29
|
-
readonly warn: "
|
|
29
|
+
readonly warn: "yellowBright";
|
|
30
30
|
readonly info: "white";
|
|
31
31
|
readonly border: "gray";
|
|
32
32
|
readonly muted: "gray";
|
|
33
|
-
readonly success: "
|
|
33
|
+
readonly success: "yellowBright";
|
|
34
34
|
readonly error: "red";
|
|
35
|
-
readonly warning: "
|
|
35
|
+
readonly warning: "yellowBright";
|
|
36
36
|
};
|
|
37
37
|
};
|
|
38
38
|
export declare const glyphs: {
|
package/dist/tui/tokens.js
CHANGED
|
@@ -18,21 +18,21 @@ export const tokens = {
|
|
|
18
18
|
diffDelBg: '#2A1212',
|
|
19
19
|
},
|
|
20
20
|
ansi: {
|
|
21
|
-
accent: '
|
|
21
|
+
accent: 'yellowBright', // #E8843C → vivid orange
|
|
22
22
|
accentBold: 'yellowBright',
|
|
23
|
-
fg: '
|
|
24
|
-
soft: '
|
|
25
|
-
dim: 'gray',
|
|
23
|
+
fg: 'whiteBright', // #FFFFFF — pure white
|
|
24
|
+
soft: 'white',
|
|
25
|
+
dim: 'gray',
|
|
26
26
|
guide: 'gray',
|
|
27
|
-
ok: '
|
|
27
|
+
ok: 'yellowBright', // ✓ orange vivid
|
|
28
28
|
err: 'red',
|
|
29
|
-
warn: '
|
|
29
|
+
warn: 'yellowBright', // spinner orange vivid
|
|
30
30
|
info: 'white',
|
|
31
31
|
border: 'gray',
|
|
32
32
|
muted: 'gray',
|
|
33
|
-
success: '
|
|
33
|
+
success: 'yellowBright',
|
|
34
34
|
error: 'red',
|
|
35
|
-
warning: '
|
|
35
|
+
warning: 'yellowBright',
|
|
36
36
|
},
|
|
37
37
|
};
|
|
38
38
|
export const glyphs = {
|