blun-king-cli 6.4.0 → 6.4.2
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 +1 -0
- package/lib/ui.js +10 -1
- package/lib/workspace.js +6 -10
- package/package.json +1 -1
package/lib/chat.js
CHANGED
package/lib/ui.js
CHANGED
|
@@ -70,10 +70,18 @@ function renderInputBoxClose() {
|
|
|
70
70
|
}
|
|
71
71
|
|
|
72
72
|
function renderPrompt(username, model) {
|
|
73
|
-
// Called by readline as the prompt string
|
|
73
|
+
// Called by readline as the prompt string
|
|
74
|
+
// Show left border + cursor arrow
|
|
74
75
|
return chalk.dim("\u2502") + " " + chalk.green.bold("\u276f") + " ";
|
|
75
76
|
}
|
|
76
77
|
|
|
78
|
+
function renderWelcomeInfo() {
|
|
79
|
+
var w = getInputBoxWidth();
|
|
80
|
+
console.log(chalk.dim("\u2502"));
|
|
81
|
+
console.log(chalk.dim("\u2502") + chalk.dim(" Tip: Type a message and press Enter. Use /help for all commands."));
|
|
82
|
+
console.log(chalk.dim("\u2570" + "\u2500".repeat(w) + "\u256f"));
|
|
83
|
+
}
|
|
84
|
+
|
|
77
85
|
function renderResponse(text, type) {
|
|
78
86
|
var colorFn = colors[type] || colors.agent;
|
|
79
87
|
var labels = { user: "YOU", agent: "BLUN", system: "SYS", error: "ERR" };
|
|
@@ -262,6 +270,7 @@ module.exports = {
|
|
|
262
270
|
renderPrompt: renderPrompt,
|
|
263
271
|
renderInputBox: renderInputBox,
|
|
264
272
|
renderInputBoxClose: renderInputBoxClose,
|
|
273
|
+
renderWelcomeInfo: renderWelcomeInfo,
|
|
265
274
|
renderMiniStatus: renderMiniStatus,
|
|
266
275
|
renderResponse: renderResponse,
|
|
267
276
|
renderSpinner: renderSpinner,
|
package/lib/workspace.js
CHANGED
|
@@ -45,21 +45,17 @@ async function selectFolder(initialFolder) {
|
|
|
45
45
|
const fs = require("fs");
|
|
46
46
|
const folder = initialFolder || process.cwd();
|
|
47
47
|
|
|
48
|
-
if (isTrusted(folder)) {
|
|
49
|
-
console.log(chalk.green(" Working in " + folder + " (trusted)"));
|
|
50
|
-
return folder;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
48
|
console.log(chalk.cyan(" Workspace: ") + chalk.white(folder));
|
|
54
|
-
|
|
49
|
+
|
|
50
|
+
const alreadyTrusted = isTrusted(folder);
|
|
55
51
|
const { trust } = await inquirer.prompt([{
|
|
56
52
|
type: "list",
|
|
57
53
|
name: "trust",
|
|
58
54
|
message: chalk.yellow("Do you trust the files in this folder?"),
|
|
59
55
|
choices: [
|
|
60
|
-
{ name: "Yes,
|
|
61
|
-
{ name: "
|
|
62
|
-
{ name: "
|
|
56
|
+
{ name: chalk.green("Yes, trust this folder") + (alreadyTrusted ? chalk.dim(" (previously trusted)") : ""), value: "yes" },
|
|
57
|
+
{ name: "Choose a different folder", value: "choose" },
|
|
58
|
+
{ name: "No, exit", value: "no" }
|
|
63
59
|
]
|
|
64
60
|
}]);
|
|
65
61
|
|
|
@@ -71,7 +67,7 @@ async function selectFolder(initialFolder) {
|
|
|
71
67
|
return selectFolder(resolved);
|
|
72
68
|
}
|
|
73
69
|
trustFolder(folder);
|
|
74
|
-
console.log(chalk.green(" Folder trusted."));
|
|
70
|
+
console.log(chalk.green(" \u2713 Folder trusted. Starting BLUN King...\n"));
|
|
75
71
|
return folder;
|
|
76
72
|
}
|
|
77
73
|
|