buildwithnexus 0.8.5 → 0.8.6
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/bin.js +30 -5
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -1190,7 +1190,6 @@ var TUI = class {
|
|
|
1190
1190
|
return colors.muted(label);
|
|
1191
1191
|
});
|
|
1192
1192
|
console.log(parts.join(colors.muted(" \u2022 ")));
|
|
1193
|
-
console.log(colors.muted("[s] switch mode"));
|
|
1194
1193
|
console.log("");
|
|
1195
1194
|
}
|
|
1196
1195
|
displayModeHeader(mode) {
|
|
@@ -1246,6 +1245,21 @@ var TUI = class {
|
|
|
1246
1245
|
displayPermissionPrompt(message) {
|
|
1247
1246
|
return colors.accent.bold(message) + colors.muted(" (y/n) ");
|
|
1248
1247
|
}
|
|
1248
|
+
displayInputBox(mode) {
|
|
1249
|
+
const width = 60;
|
|
1250
|
+
const innerWidth = width - 4;
|
|
1251
|
+
const modeName = mode === "PLAN" ? "\u{1F4CB} Planning" : mode === "BUILD" ? "\u2699\uFE0F Building" : "\u{1F4A1} Brainstorming";
|
|
1252
|
+
const top = colors.accent("\u250C" + "\u2500".repeat(innerWidth) + "\u2510");
|
|
1253
|
+
const bottom = colors.accent("\u2514" + "\u2500".repeat(innerWidth) + "\u2518");
|
|
1254
|
+
const modeDisplay = colors.muted(`Mode: ${modeName}`);
|
|
1255
|
+
console.log(top);
|
|
1256
|
+
return colors.accent("\u2502 ") + colors.muted("> ");
|
|
1257
|
+
}
|
|
1258
|
+
displayModeIndicator(mode) {
|
|
1259
|
+
const modeName = mode === "PLAN" ? "\u{1F4CB} Planning" : mode === "BUILD" ? "\u2699\uFE0F Building" : "\u{1F4A1} Brainstorming";
|
|
1260
|
+
console.log(colors.muted(`Mode: ${modeName}
|
|
1261
|
+
`));
|
|
1262
|
+
}
|
|
1249
1263
|
padToWidth(text, targetWidth) {
|
|
1250
1264
|
const visibleWidth = stringWidth(text);
|
|
1251
1265
|
const padding = Math.max(0, targetWidth - visibleWidth);
|
|
@@ -1593,7 +1607,7 @@ init_secrets();
|
|
|
1593
1607
|
init_docker();
|
|
1594
1608
|
|
|
1595
1609
|
// src/core/version.ts
|
|
1596
|
-
var resolvedVersion = true ? "0.8.
|
|
1610
|
+
var resolvedVersion = true ? "0.8.6" : pkg.version;
|
|
1597
1611
|
|
|
1598
1612
|
// src/cli/interactive.ts
|
|
1599
1613
|
var appVersion = resolvedVersion;
|
|
@@ -1949,7 +1963,6 @@ async function brainstormModeLoop(task, backendUrl, currentMode, ask) {
|
|
|
1949
1963
|
console.log(chalk3.gray('Ask follow-up questions. Type "done" to exit, "switch" to change mode.\n'));
|
|
1950
1964
|
let currentQuestion = task;
|
|
1951
1965
|
while (true) {
|
|
1952
|
-
console.log(chalk3.bold.blue("\u{1F4A1} Thinking..."));
|
|
1953
1966
|
try {
|
|
1954
1967
|
const response = await fetch(`${backendUrl}/api/run`, {
|
|
1955
1968
|
method: "POST",
|
|
@@ -1991,9 +2004,14 @@ async function brainstormModeLoop(task, backendUrl, currentMode, ask) {
|
|
|
1991
2004
|
continue;
|
|
1992
2005
|
}
|
|
1993
2006
|
let responseText = "";
|
|
2007
|
+
let firstEvent = true;
|
|
1994
2008
|
for await (const parsed of parseSSEStream(reader)) {
|
|
1995
2009
|
const type = parsed.type;
|
|
1996
2010
|
const data = parsed.data;
|
|
2011
|
+
if (firstEvent && type !== "done" && type !== "error") {
|
|
2012
|
+
console.log(chalk3.bold.blue("\u{1F4AD} Thinking...\n"));
|
|
2013
|
+
firstEvent = false;
|
|
2014
|
+
}
|
|
1997
2015
|
if (type === "done" || type === "execution_complete" || type === "final_result") {
|
|
1998
2016
|
const summary = data["summary"] || data["result"] || "";
|
|
1999
2017
|
if (summary) responseText = summary;
|
|
@@ -2004,19 +2022,26 @@ async function brainstormModeLoop(task, backendUrl, currentMode, ask) {
|
|
|
2004
2022
|
break;
|
|
2005
2023
|
} else if (type === "thought" || type === "observation") {
|
|
2006
2024
|
const content = data["content"] || "";
|
|
2007
|
-
if (content)
|
|
2025
|
+
if (content) {
|
|
2026
|
+
console.log(chalk3.gray("\u2192 " + content));
|
|
2027
|
+
responseText += content + "\n";
|
|
2028
|
+
}
|
|
2008
2029
|
} else if (type === "agent_response" || type === "agent_result") {
|
|
2009
2030
|
const content = data["content"] || data["result"] || "";
|
|
2010
2031
|
if (content) responseText += content + "\n";
|
|
2011
2032
|
} else if (type === "action") {
|
|
2012
2033
|
const content = data["content"] || "";
|
|
2013
|
-
if (content)
|
|
2034
|
+
if (content) {
|
|
2035
|
+
console.log(chalk3.cyan("\u2699\uFE0F " + content));
|
|
2036
|
+
responseText += content + "\n";
|
|
2037
|
+
}
|
|
2014
2038
|
} else if (type === "agent_working" || type === "started") {
|
|
2015
2039
|
} else if (type !== "plan") {
|
|
2016
2040
|
const content = data["content"] || data["response"] || "";
|
|
2017
2041
|
if (content) responseText += content + "\n";
|
|
2018
2042
|
}
|
|
2019
2043
|
}
|
|
2044
|
+
console.log("");
|
|
2020
2045
|
if (responseText.trim()) {
|
|
2021
2046
|
tui.displayBrainstormResponse(responseText.trim());
|
|
2022
2047
|
} else {
|