bravecode-cli 0.1.38 → 0.1.40
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-main.mjs +33 -23
- package/dist/cli-main.mjs.map +2 -2
- package/package.json +1 -1
package/dist/cli-main.mjs
CHANGED
|
@@ -38185,7 +38185,7 @@ var APP_VERSION, APP_NAME;
|
|
|
38185
38185
|
var init_version = __esm({
|
|
38186
38186
|
"src/version.ts"() {
|
|
38187
38187
|
"use strict";
|
|
38188
|
-
APP_VERSION = "0.1.
|
|
38188
|
+
APP_VERSION = "0.1.40";
|
|
38189
38189
|
APP_NAME = "BraveCode";
|
|
38190
38190
|
}
|
|
38191
38191
|
});
|
|
@@ -42109,14 +42109,28 @@ function MessageBubble({ msg }) {
|
|
|
42109
42109
|
paddingRight: 2,
|
|
42110
42110
|
paddingTop: 0,
|
|
42111
42111
|
paddingBottom: 0,
|
|
42112
|
-
flexDirection: "
|
|
42112
|
+
flexDirection: "row",
|
|
42113
|
+
gap: 1
|
|
42113
42114
|
}, children: [
|
|
42114
|
-
/* @__PURE__ */ jsx("text", { fg: colors2.textMuted, children: /* @__PURE__ */
|
|
42115
|
-
|
|
42115
|
+
/* @__PURE__ */ jsx("text", { fg: colors2.textMuted, children: /* @__PURE__ */ jsx("b", { children: "\u203A" }) }),
|
|
42116
|
+
/* @__PURE__ */ jsxs("text", { fg: colors2.textMuted, children: [
|
|
42116
42117
|
s(msg.toolName ?? "tool"),
|
|
42117
|
-
"
|
|
42118
|
-
|
|
42119
|
-
|
|
42118
|
+
" ",
|
|
42119
|
+
s(msg.content.length > 60 ? msg.content.slice(0, 60) + "\u2026" : msg.content.split("\n")[0])
|
|
42120
|
+
] })
|
|
42121
|
+
] });
|
|
42122
|
+
}
|
|
42123
|
+
if (isUser) {
|
|
42124
|
+
return /* @__PURE__ */ jsxs("box", { style: {
|
|
42125
|
+
paddingLeft: 1,
|
|
42126
|
+
paddingRight: 1,
|
|
42127
|
+
paddingTop: 0,
|
|
42128
|
+
paddingBottom: 0,
|
|
42129
|
+
flexDirection: "row",
|
|
42130
|
+
gap: 1
|
|
42131
|
+
}, children: [
|
|
42132
|
+
/* @__PURE__ */ jsx("text", { fg: colors2.primary, children: /* @__PURE__ */ jsx("b", { children: ">" }) }),
|
|
42133
|
+
/* @__PURE__ */ jsx("text", { fg: colors2.text, wrapMode: "word", children: s(msg.content) })
|
|
42120
42134
|
] });
|
|
42121
42135
|
}
|
|
42122
42136
|
return /* @__PURE__ */ jsxs("box", { style: {
|
|
@@ -42124,33 +42138,24 @@ function MessageBubble({ msg }) {
|
|
|
42124
42138
|
paddingRight: 1,
|
|
42125
42139
|
paddingTop: 0,
|
|
42126
42140
|
paddingBottom: 0,
|
|
42127
|
-
flexDirection: "column"
|
|
42128
|
-
backgroundColor: isUser ? colors2.userMsg : colors2.assistantMsg,
|
|
42129
|
-
border: true,
|
|
42130
|
-
borderColor: isUser ? colors2.primaryDim : colors2.border
|
|
42141
|
+
flexDirection: "column"
|
|
42131
42142
|
}, children: [
|
|
42132
|
-
/* @__PURE__ */
|
|
42133
|
-
|
|
42134
|
-
/* @__PURE__ */ jsx("text", { fg: colors2.textMuted, children: s(msg.timestamp.toLocaleTimeString()) })
|
|
42135
|
-
] }),
|
|
42136
|
-
/* @__PURE__ */ jsx("scrollbox", { style: { maxHeight: 40 }, children: /* @__PURE__ */ jsx("text", { fg: colors2.text, wrapMode: "word", children: s(msg.content || (isUser ? "" : " ")) }) }),
|
|
42137
|
-
msg.toolCalls && msg.toolCalls.length > 0 ? /* @__PURE__ */ jsx("box", { style: { marginTop: 0, flexDirection: "column" }, children: msg.toolCalls.map((tc) => {
|
|
42143
|
+
/* @__PURE__ */ jsx("text", { fg: colors2.text, wrapMode: "word", children: s(msg.content || " ") }),
|
|
42144
|
+
msg.toolCalls && msg.toolCalls.length > 0 ? /* @__PURE__ */ jsx("box", { style: { marginTop: 0, flexDirection: "column", paddingLeft: 1 }, children: msg.toolCalls.map((tc) => {
|
|
42138
42145
|
if (tc.name === "write" || tc.name === "edit") {
|
|
42139
42146
|
const filePath = tc.args?.filePath || tc.args?.path || "";
|
|
42140
42147
|
const isCreate = tc.name === "write";
|
|
42141
42148
|
const icon = isCreate ? "+" : "~";
|
|
42142
42149
|
const iconColor = isCreate ? colors2.success : colors2.warning;
|
|
42143
|
-
return /* @__PURE__ */ jsxs("box", { style: { flexDirection: "row", gap: 1
|
|
42150
|
+
return /* @__PURE__ */ jsxs("box", { style: { flexDirection: "row", gap: 1 }, children: [
|
|
42144
42151
|
/* @__PURE__ */ jsx("text", { fg: iconColor, children: /* @__PURE__ */ jsx("b", { children: icon }) }),
|
|
42145
42152
|
/* @__PURE__ */ jsx("text", { fg: colors2.textSecondary, children: s(filePath) })
|
|
42146
42153
|
] }, s(tc.id));
|
|
42147
42154
|
}
|
|
42148
|
-
return /* @__PURE__ */ jsx("box", { style: { flexDirection: "row", gap: 1 }, children: /* @__PURE__ */
|
|
42149
|
-
"[",
|
|
42155
|
+
return /* @__PURE__ */ jsx("box", { style: { flexDirection: "row", gap: 1 }, children: /* @__PURE__ */ jsxs("text", { fg: tc.status === "error" ? colors2.error : colors2.textMuted, children: [
|
|
42150
42156
|
s(tc.name),
|
|
42151
|
-
tc.status === "done" ? " \u2713" : tc.status === "error" ? " \u2717" : "\u2026"
|
|
42152
|
-
|
|
42153
|
-
] }) }) }, s(tc.id));
|
|
42157
|
+
tc.status === "done" ? " \u2713" : tc.status === "error" ? " \u2717" : "\u2026"
|
|
42158
|
+
] }) }, s(tc.id));
|
|
42154
42159
|
}) }) : null
|
|
42155
42160
|
] });
|
|
42156
42161
|
}
|
|
@@ -42255,6 +42260,9 @@ function InputEditor({
|
|
|
42255
42260
|
setValue("");
|
|
42256
42261
|
onSubmit(v);
|
|
42257
42262
|
};
|
|
42263
|
+
React4.useEffect(() => {
|
|
42264
|
+
inputRef.current?.focus();
|
|
42265
|
+
});
|
|
42258
42266
|
if (showAbove) {
|
|
42259
42267
|
return /* @__PURE__ */ jsxs("box", { style: { flexDirection: "column" }, children: [
|
|
42260
42268
|
paletteOpen && filteredCommands.length > 0 ? /* @__PURE__ */ jsx(CommandPalette, { filter: paletteFilter, selectedIndex: 0 }) : null,
|
|
@@ -42275,6 +42283,7 @@ function InputEditor({
|
|
|
42275
42283
|
{
|
|
42276
42284
|
ref: inputRef,
|
|
42277
42285
|
value,
|
|
42286
|
+
focused: true,
|
|
42278
42287
|
onChange: (val) => setValue(s(val)),
|
|
42279
42288
|
onSubmit: () => doSubmit(),
|
|
42280
42289
|
placeholder: s(placeholder),
|
|
@@ -42305,6 +42314,7 @@ function InputEditor({
|
|
|
42305
42314
|
{
|
|
42306
42315
|
ref: inputRef,
|
|
42307
42316
|
value,
|
|
42317
|
+
focused: true,
|
|
42308
42318
|
onChange: (val) => setValue(s(val)),
|
|
42309
42319
|
onSubmit: () => doSubmit(),
|
|
42310
42320
|
placeholder: s(placeholder),
|