bravecode-cli 0.1.44 → 0.1.45

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 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.44";
38188
+ APP_VERSION = "0.1.45";
38189
38189
  APP_NAME = "BraveCode";
38190
38190
  }
38191
38191
  });
@@ -44107,6 +44107,16 @@ function HeaderBar() {
44107
44107
  }
44108
44108
  function StatusBar() {
44109
44109
  const { colors: colors2 } = useTheme();
44110
+ const { currentAgent, currentModel, isRunning } = useAgent();
44111
+ const { messages } = useSession();
44112
+ const { width } = useTerminalDimensions();
44113
+ const cwd = process.cwd().replace(process.env.HOME ?? "", "~");
44114
+ const sidebarW = width >= 90 ? 30 : 0;
44115
+ const usableW = Math.max(20, width - sidebarW);
44116
+ const totalChars = messages.reduce((n, m) => n + (m.content?.length || 0), 0);
44117
+ const tokens = Math.round(totalChars / 4);
44118
+ const pct = Math.min(99, Math.round(tokens / 2e5 * 100));
44119
+ const tokenStr = tokens >= 1e3 ? `${(tokens / 1e3).toFixed(1)}K` : `${tokens}`;
44110
44120
  return /* @__PURE__ */ jsxs(
44111
44121
  "box",
44112
44122
  {
@@ -44117,14 +44127,22 @@ function StatusBar() {
44117
44127
  paddingLeft: 1,
44118
44128
  paddingRight: 1,
44119
44129
  justifyContent: "space-between",
44120
- alignItems: "center"
44130
+ alignItems: "center",
44131
+ width: usableW
44121
44132
  },
44122
44133
  children: [
44123
- /* @__PURE__ */ jsx("text", { fg: colors2.success, children: /* @__PURE__ */ jsx("b", { children: "\u25CF" }) }),
44124
- /* @__PURE__ */ jsx("text", { fg: colors2.textMuted, children: " 1 MCP " }),
44125
- /* @__PURE__ */ jsx("text", { fg: colors2.info, children: "/status" }),
44126
- /* @__PURE__ */ jsx("text", { fg: colors2.primary, children: /* @__PURE__ */ jsx("b", { children: s(APP_NAME) }) }),
44134
+ /* @__PURE__ */ jsx("text", { fg: colors2.textMuted, children: s(cwd) }),
44127
44135
  /* @__PURE__ */ jsxs("text", { fg: colors2.textMuted, children: [
44136
+ s(tokenStr),
44137
+ " (",
44138
+ pct,
44139
+ "%)",
44140
+ /* @__PURE__ */ jsx("text", { fg: colors2.info, children: " ctrl+p " }),
44141
+ /* @__PURE__ */ jsx("text", { fg: colors2.textMuted, children: "commands" }),
44142
+ isRunning ? /* @__PURE__ */ jsx("text", { fg: colors2.warning, children: " esc interrupt" }) : null
44143
+ ] }),
44144
+ /* @__PURE__ */ jsxs("text", { fg: colors2.primary, children: [
44145
+ /* @__PURE__ */ jsx("b", { children: s(APP_NAME) }),
44128
44146
  " ",
44129
44147
  s(APP_VERSION)
44130
44148
  ] })