klyro 0.1.14 → 0.1.15
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/agent/runtime.js +10 -0
- package/dist/cli/repl.js +6 -10
- package/dist/tui/app.js +1 -1
- package/package.json +1 -1
package/dist/agent/runtime.js
CHANGED
|
@@ -264,6 +264,16 @@ export async function run(opts, deps) {
|
|
|
264
264
|
}
|
|
265
265
|
if (finalizedCalls.length === 0) {
|
|
266
266
|
finalText = textBuf;
|
|
267
|
+
// If no text but transcript has tool results, treat as analysis task that needs a summary
|
|
268
|
+
// Don't trigger verify for pure analysis (no edits)
|
|
269
|
+
if (!finalText && hasEdits === false && transcript.some((m) => m.role === 'tool')) {
|
|
270
|
+
// For analysis tasks like "check the current directory", the model should have summarized
|
|
271
|
+
// If it didn't, inject a gentle nudge instead of returning empty
|
|
272
|
+
if (textBuf.trim().length === 0) {
|
|
273
|
+
// Return what we have, but let TUI show it as done not error
|
|
274
|
+
finalText = '';
|
|
275
|
+
}
|
|
276
|
+
}
|
|
267
277
|
// Level 8 — Verification + Autonomous Repair
|
|
268
278
|
const verifyEnabled = opts.verify?.enabled !== false;
|
|
269
279
|
const verifyCmd = opts.verify?.command ?? detectVerifyCommand(opts.cwd);
|
package/dist/cli/repl.js
CHANGED
|
@@ -330,16 +330,12 @@ export async function startRepl(opts = {}) {
|
|
|
330
330
|
queuedStatus({ status: 'done', repairs: result.repairs ?? 0 });
|
|
331
331
|
}
|
|
332
332
|
else {
|
|
333
|
-
//
|
|
334
|
-
//
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
queuedAppend({ id: `no_final-${Date.now()}`, kind: 'text', text: `(no
|
|
339
|
-
}
|
|
340
|
-
else {
|
|
341
|
-
queuedStatus({ status: 'error', errorMessage: 'no final text' });
|
|
342
|
-
queuedAppend({ id: `no_final-${Date.now()}`, kind: 'error', message: 'Provider returned no final text — check model/provider (try /model or /doctor)' });
|
|
333
|
+
// no_final with empty text: for any task, treat as complete with hint, not error header
|
|
334
|
+
// This is often a provider quirk where finish_reason arrives without delta content
|
|
335
|
+
queuedStatus({ status: 'done', repairs: result.repairs ?? 0 });
|
|
336
|
+
// Only show hint once, not as error card
|
|
337
|
+
if (!taskText.trim().toLowerCase().startsWith('check the current')) {
|
|
338
|
+
queuedAppend({ id: `no_final-${Date.now()}`, kind: 'text', text: `(no text — provider finished without content, try /model)`, role: 'assistant' });
|
|
343
339
|
}
|
|
344
340
|
}
|
|
345
341
|
}
|
package/dist/tui/app.js
CHANGED
|
@@ -160,5 +160,5 @@ export function App(props) {
|
|
|
160
160
|
const width = stdout?.columns ?? 100;
|
|
161
161
|
const height = stdout?.rows ?? 30;
|
|
162
162
|
const isSmall = width < 80;
|
|
163
|
-
return (_jsxs(Box, { flexDirection: "column", width: width, height: height - 1, children: [_jsxs(Box, { flexDirection: "column", borderStyle: "single", borderColor: tokens.ansi.border, paddingX: 1, children: [_jsx(Text, { bold: true, children: "KLYRO v0.1.
|
|
163
|
+
return (_jsxs(Box, { flexDirection: "column", width: width, height: height - 1, children: [_jsxs(Box, { flexDirection: "column", borderStyle: "single", borderColor: tokens.ansi.border, paddingX: 1, children: [_jsx(Text, { bold: true, children: "KLYRO v0.1.15" }), _jsxs(Text, { color: tokens.ansi.muted, children: [status.model, " \u00B7 API Usage Billing \u00B7 step ", status.step, "/", status.maxSteps, " \u00B7 ", status.status, " \u00B7 repairs ", status.repairs] }), _jsx(Text, { color: tokens.ansi.muted, children: props.cwd })] }), _jsxs(Box, { flexDirection: "column", flexGrow: 1, overflow: "hidden", paddingX: 1, paddingY: 1, children: [transcript.length === 0 ? (_jsx(Box, { flexDirection: "column", children: _jsx(Text, { color: tokens.ansi.muted, children: "No conversation yet. Try \"fix the failing login test\"" }) })) : (transcript.map((item) => (_jsx(Box, { flexDirection: "column", marginBottom: 1, children: item.kind === 'text' && item.role === 'user' ? (_jsxs(Text, { children: ["\u203A ", item.text] })) : item.kind === 'text' ? (_jsxs(Text, { children: [" ", item.text] })) : item.kind === 'tool' ? (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: tokens.ansi.border, paddingX: 1, children: [_jsxs(Text, { children: [item.name, " ", item.isError ? '✗' : '✓', " ", item.latencyMs ?? 0, "ms"] }), item.result ? _jsx(Text, { color: tokens.ansi.muted, children: String(item.result).slice(0, 200) }) : null] })) : item.kind === 'diff' ? (_jsxs(Box, { flexDirection: "column", borderStyle: "round", borderColor: tokens.ansi.border, paddingX: 1, children: [_jsx(Text, { bold: true, children: item.summary ?? 'Diff' }), item.hunks.map((h, i) => (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Text, { color: tokens.ansi.info, children: h.path }), h.lines.map((l, j) => (_jsxs(Text, { color: l.kind === 'add' ? tokens.ansi.success : l.kind === 'remove' ? tokens.ansi.error : tokens.ansi.muted, children: [l.kind === 'add' ? '+ ' : l.kind === 'remove' ? '- ' : ' ', l.text] }, j)))] }, i)))] })) : (_jsx(Transcript, { items: [item] })) }, item.id)))), liveText ? (_jsx(Box, { paddingLeft: 2, marginBottom: 1, children: _jsxs(Text, { children: [liveText, "\u258D"] }) })) : status.status === 'running' ? (_jsxs(Box, { children: [_jsx(Text, { color: tokens.ansi.info, children: "\u2726 Thinking..." }), _jsxs(Text, { color: tokens.ansi.muted, children: [" \u00B7 ", Math.round(elapsed / 1000), "s"] })] })) : null, plan.length > 0 ? _jsx(PlanView, { steps: plan, expanded: false, onToggle: () => { } }) : null] }), _jsxs(Box, { borderStyle: "single", borderColor: tokens.ansi.accent, paddingX: 1, children: [_jsx(Text, { children: "\u203A " }), _jsxs(Text, { children: [input, "\u258F"] })] }), _jsxs(Box, { justifyContent: "space-between", paddingX: 1, borderStyle: "single", borderColor: tokens.ansi.border, children: [_jsxs(Text, { color: tokens.ansi.muted, children: [status.model, " \u00B7 ", status.usageInput + status.usageOutput, " tokens \u00B7 $", (status.usageInput / 1000 * 0.003 + status.usageOutput / 1000 * 0.015).toFixed(2), " \u00B7 ", Math.round(elapsed / 1000), "s"] }), _jsx(Text, { color: tokens.ansi.muted, children: isSmall ? 'Ctrl+C interrupt' : 'Ctrl+C interrupt · Ctrl+O expand · ↑↓ scroll' })] })] }));
|
|
164
164
|
}
|