blun-king-cli 7.3.1 → 7.3.3
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/lib/chat.js +17 -6
- package/lib/ui.js +12 -0
- package/package.json +1 -1
package/lib/chat.js
CHANGED
|
@@ -382,6 +382,13 @@ function startChat() {
|
|
|
382
382
|
function openDropdownBelow(items, onSelect, onClose) {
|
|
383
383
|
var active = true;
|
|
384
384
|
var selected = 0;
|
|
385
|
+
var menuHeight = items.length + 2; // items + help line + padding
|
|
386
|
+
// Temporarily increase panel height to make room for menu below panel
|
|
387
|
+
var savedHeight = INPUT_PANEL_HEIGHT;
|
|
388
|
+
INPUT_PANEL_HEIGHT = 5 + menuHeight; // 5 = panel itself
|
|
389
|
+
// Recalculate scroll region
|
|
390
|
+
setupLayout();
|
|
391
|
+
drawInputPanel();
|
|
385
392
|
|
|
386
393
|
function getMenuStart() {
|
|
387
394
|
var rows = getRows();
|
|
@@ -389,12 +396,15 @@ function startChat() {
|
|
|
389
396
|
return panelTop + 5; // right after the bottom frame of input panel
|
|
390
397
|
}
|
|
391
398
|
|
|
392
|
-
function
|
|
393
|
-
|
|
399
|
+
function restoreLayout() {
|
|
400
|
+
INPUT_PANEL_HEIGHT = savedHeight;
|
|
394
401
|
var rows = getRows();
|
|
395
|
-
|
|
396
|
-
|
|
402
|
+
// Clear the entire menu + panel area
|
|
403
|
+
for (var r = rows - INPUT_PANEL_HEIGHT - menuHeight; r <= rows; r++) {
|
|
404
|
+
process.stdout.write(cursorTo(Math.max(1, r), 1) + clearLine());
|
|
397
405
|
}
|
|
406
|
+
setupLayout();
|
|
407
|
+
drawInputPanel();
|
|
398
408
|
}
|
|
399
409
|
|
|
400
410
|
function drawMenu() {
|
|
@@ -428,7 +438,7 @@ function startChat() {
|
|
|
428
438
|
if ((key === "\u001b" && key.length === 1) || key === "\u0003") {
|
|
429
439
|
active = false;
|
|
430
440
|
process.stdin.removeAllListeners("data");
|
|
431
|
-
|
|
441
|
+
restoreLayout();
|
|
432
442
|
if (onClose) onClose();
|
|
433
443
|
startRawInput();
|
|
434
444
|
return;
|
|
@@ -452,6 +462,7 @@ function startChat() {
|
|
|
452
462
|
if (key === "\u001b[D" || key === "\u001b[C") {
|
|
453
463
|
if (items[selected].onCycle) {
|
|
454
464
|
items[selected].onCycle(key === "\u001b[C" ? 1 : -1);
|
|
465
|
+
drawInputPanel();
|
|
455
466
|
drawMenu();
|
|
456
467
|
}
|
|
457
468
|
return;
|
|
@@ -461,7 +472,7 @@ function startChat() {
|
|
|
461
472
|
if (key === "\r" || key === "\n") {
|
|
462
473
|
active = false;
|
|
463
474
|
process.stdin.removeAllListeners("data");
|
|
464
|
-
|
|
475
|
+
restoreLayout();
|
|
465
476
|
if (onSelect) onSelect(items[selected]);
|
|
466
477
|
startRawInput();
|
|
467
478
|
return;
|
package/lib/ui.js
CHANGED
|
@@ -60,21 +60,33 @@ function setTheme(name) {
|
|
|
60
60
|
|
|
61
61
|
// ── Settings Fields ───────────────────────────────────────
|
|
62
62
|
var SETTINGS_FIELDS = [
|
|
63
|
+
// Core
|
|
63
64
|
{ section: "Core", key: "model", label: "Model", values: ["auto", "gemma4", "claude", "llama"], help: "Welches Modell standardmaessig antwortet." },
|
|
64
65
|
{ section: "Core", key: "language", label: "Language", values: ["de", "en", "tr", "fr", "es"], help: "Primaere Antwortsprache." },
|
|
65
66
|
{ section: "Core", key: "permissionMode", label: "Permission", values: ["safe", "normal", "god"], help: "Welche Aktionen BLUN ausfuehren darf." },
|
|
67
|
+
{ section: "Core", key: "defaultMode", label: "Mode", values: ["agent", "chat"], help: "Agent-Modus oder reiner Chat." },
|
|
66
68
|
{ section: "Core", key: "maxTokens", label: "Max Tokens", values: [1024, 2048, 4096, 8192, 16384], help: "Maximale Antwortlaenge." },
|
|
69
|
+
// Style
|
|
70
|
+
{ section: "Style", key: "styleMode", label: "Style", values: ["normal", "learning", "concise", "explaining", "formal"], help: "Wie BLUN formuliert." },
|
|
71
|
+
{ section: "Style", key: "latencyMode", label: "Latency", values: ["fast", "balanced", "deep"], help: "Schnelle vs. gruendliche Antworten." },
|
|
72
|
+
{ section: "Style", key: "toolMode", label: "Tools", values: ["smart", "guided", "direct"], help: "Wie offensiv BLUN Werkzeuge nutzt." },
|
|
73
|
+
// Console
|
|
67
74
|
{ section: "Console", key: "theme", label: "Theme", values: ["neon", "midnight", "minimal"], help: "Farbstimmung der Konsole." },
|
|
68
75
|
{ section: "Console", key: "streamLevel", label: "Stream", values: ["off", "normal", "verbose"], help: "Wie Antworten angezeigt werden." },
|
|
76
|
+
{ section: "Console", key: "thinkingVisibility", label: "Thinking", values: ["off", "compact", "full"], help: "Denk-/Status-Infos anzeigen." },
|
|
69
77
|
{ section: "Console", key: "markdownRendering", label: "Markdown", values: [true, false], help: "Markdown in Antworten rendern." },
|
|
70
78
|
{ section: "Console", key: "codeHighlight", label: "Syntax", values: [true, false], help: "Code-Syntax-Highlighting." },
|
|
71
79
|
{ section: "Console", key: "statuslineMode", label: "Statusline", values: ["compact", "full", "off"], help: "Wie detailliert die Statuszeile ist." },
|
|
80
|
+
// Runtime
|
|
72
81
|
{ section: "Runtime", key: "voice", label: "Voice", values: [true, false], help: "Voice-Features an/aus." },
|
|
73
82
|
{ section: "Runtime", key: "autoSave", label: "AutoSave", values: [true, false], help: "Chat-Verlauf automatisch speichern." },
|
|
74
83
|
{ section: "Runtime", key: "contextMemory", label: "Memory", values: [true, false], help: "Kontext aus vorherigen Chats nutzen." },
|
|
84
|
+
{ section: "Runtime", key: "historyWindow", label: "History", values: [4, 8, 12, 20], help: "Wie viel Session-Kontext pro Request." },
|
|
75
85
|
{ section: "Runtime", key: "fileAccess", label: "File Access", values: ["ask", "auto", "off"], help: "Dateizugriff: fragen/automatisch/aus." },
|
|
76
86
|
{ section: "Runtime", key: "shellAccess", label: "Shell", values: ["ask", "auto", "off"], help: "Shell-Befehle: fragen/automatisch/aus." },
|
|
87
|
+
// Workflow
|
|
77
88
|
{ section: "Workflow", key: "costVisibility", label: "Cost", values: [true, false], help: "Token-/Kosten-Footer anzeigen." },
|
|
89
|
+
{ section: "Workflow", key: "suggestionsEnabled", label: "Suggest", values: [true, false], help: "Slash-Command-Vorschlaege anzeigen." },
|
|
78
90
|
{ section: "Workflow", key: "autoCommit", label: "AutoCommit", values: [true, false], help: "Automatisch Git-Commits erstellen." },
|
|
79
91
|
{ section: "Workflow", key: "codeReview", label: "Review", values: [true, false], help: "Code-Review vor Aenderungen." },
|
|
80
92
|
{ section: "Workflow", key: "notifications", label: "Notify", values: [true, false], help: "Desktop-Benachrichtigungen." },
|