bravecode-cli 0.1.13 → 0.1.15

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.mjs CHANGED
@@ -38047,7 +38047,7 @@ var APP_VERSION;
38047
38047
  var init_version = __esm({
38048
38048
  "src/version.ts"() {
38049
38049
  "use strict";
38050
- APP_VERSION = "0.1.13";
38050
+ APP_VERSION = "0.1.15";
38051
38051
  }
38052
38052
  });
38053
38053
 
@@ -41142,8 +41142,8 @@ var init_default = __esm({
41142
41142
  darkTheme = {
41143
41143
  name: "dark",
41144
41144
  colors: {
41145
- // Background
41146
- background: "black",
41145
+ // Background - use terminal default dark background
41146
+ background: "#1e1e1e",
41147
41147
  backgroundSecondary: "#1a1a2e",
41148
41148
  backgroundHighlight: "#16213e",
41149
41149
  // Text
@@ -41588,14 +41588,9 @@ function Logo({ width = 80 }) {
41588
41588
  "\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2557 \u2588\u2588\u2551",
41589
41589
  "\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551\u255A\u2550\u2550\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2551 \u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2588\u2557\u2588\u2588\u2551",
41590
41590
  "\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D\u255A\u2588\u2588\u2588\u2554\u2588\u2588\u2588\u2554\u255D",
41591
- "\u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u255D\u255A\u2550\u2550\u255D "
41591
+ "\u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u2550\u2550\u2550\u255D \u255A\u2550\u2550\u255D\u255A\u2550\u2550\u255D"
41592
41592
  ];
41593
- const maxLineWidth = Math.max(...logo.map((line) => line.length));
41594
- const centeredLines = logo.map((line) => {
41595
- const padding = Math.max(0, Math.floor((width - line.length) / 2));
41596
- return " ".repeat(padding) + line;
41597
- });
41598
- return /* @__PURE__ */ jsx6(Box, { flexDirection: "column", alignItems: "center", children: centeredLines.map((line, i) => /* @__PURE__ */ jsx6(Text, { color: "gray", children: line }, i)) });
41593
+ return /* @__PURE__ */ jsx6(Box, { flexDirection: "column", alignItems: "center", children: logo.map((line, i) => /* @__PURE__ */ jsx6(Text, { color: "gray", children: line }, i)) });
41599
41594
  }
41600
41595
  var init_logo = __esm({
41601
41596
  "src/core/tui/components/logo.tsx"() {
@@ -41953,19 +41948,17 @@ var init_input_editor = __esm({
41953
41948
  // src/core/tui/components/status-bar.tsx
41954
41949
  import "react";
41955
41950
  import { Box as Box5, Text as Text5 } from "ink";
41956
- import { Fragment, jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
41951
+ import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
41957
41952
  function StatusBar() {
41958
41953
  const { colors } = useTheme();
41959
41954
  const { currentAgent, isRunning } = useAgent();
41960
41955
  const width = process.stdout.columns || 80;
41961
41956
  const cwd = process.cwd().replace(process.env.HOME || "", "~");
41962
41957
  return /* @__PURE__ */ jsxs4(Box5, { justifyContent: "space-between", width, children: [
41963
- /* @__PURE__ */ jsxs4(Box5, { gap: 1, children: [
41958
+ /* @__PURE__ */ jsxs4(Box5, { gap: 2, children: [
41964
41959
  /* @__PURE__ */ jsx10(Text5, { color: colors.textMuted, children: cwd }),
41965
- isRunning && /* @__PURE__ */ jsxs4(Fragment, { children: [
41966
- /* @__PURE__ */ jsx10(Text5, { color: colors.textMuted, children: "\xB7" }),
41967
- /* @__PURE__ */ jsx10(Text5, { color: colors.warning, children: "\u25CF running" })
41968
- ] })
41960
+ /* @__PURE__ */ jsx10(Text5, { color: colors.textMuted, children: "\u25CF 1 MCP" }),
41961
+ /* @__PURE__ */ jsx10(Text5, { color: colors.textMuted, children: "/status" })
41969
41962
  ] }),
41970
41963
  /* @__PURE__ */ jsx10(Text5, { color: colors.textMuted, children: APP_VERSION })
41971
41964
  ] });
@@ -42028,32 +42021,17 @@ var init_toast2 = __esm({
42028
42021
  }
42029
42022
  });
42030
42023
 
42031
- // src/core/tui/components/command-palette.tsx
42024
+ // src/core/tui/components/model-selector.tsx
42032
42025
  import { useState as useState7 } from "react";
42033
42026
  import { Box as Box7, Text as Text7, useInput as useInput2 } from "ink";
42034
42027
  import { jsx as jsx12, jsxs as jsxs6 } from "react/jsx-runtime";
42035
- var init_command_palette = __esm({
42036
- "src/core/tui/components/command-palette.tsx"() {
42037
- "use strict";
42038
- init_theme();
42039
- init_dialog();
42040
- init_agent2();
42041
- init_session();
42042
- init_toast();
42043
- }
42044
- });
42045
-
42046
- // src/core/tui/components/model-selector.tsx
42047
- import { useState as useState8 } from "react";
42048
- import { Box as Box8, Text as Text8, useInput as useInput3 } from "ink";
42049
- import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
42050
42028
  function ModelSelector() {
42051
42029
  const { colors } = useTheme();
42052
42030
  const { currentModel, setModel } = useAgent();
42053
42031
  const { closeDialog } = useDialog();
42054
42032
  const toast = useToast();
42055
- const [selectedIndex, setSelectedIndex] = useState8(0);
42056
- const [filter3, setFilter] = useState8("");
42033
+ const [selectedIndex, setSelectedIndex] = useState7(0);
42034
+ const [filter3, setFilter] = useState7("");
42057
42035
  const models = models_default.models.map((m) => ({
42058
42036
  id: m.id,
42059
42037
  name: m.name,
@@ -42063,7 +42041,7 @@ function ModelSelector() {
42063
42041
  const filteredModels = models.filter(
42064
42042
  (m) => m.tags.includes("free") && (m.name.toLowerCase().includes(filter3.toLowerCase()) || m.id.toLowerCase().includes(filter3.toLowerCase()))
42065
42043
  );
42066
- useInput3((input, key) => {
42044
+ useInput2((input, key) => {
42067
42045
  if (key.escape) {
42068
42046
  closeDialog();
42069
42047
  return;
@@ -42097,9 +42075,9 @@ function ModelSelector() {
42097
42075
  const renderModel = (model, index) => {
42098
42076
  const isSelected = model.id === currentModel;
42099
42077
  const isHighlighted = index === selectedIndex;
42100
- return /* @__PURE__ */ jsxs7(Box8, { children: [
42101
- /* @__PURE__ */ jsxs7(
42102
- Text8,
42078
+ return /* @__PURE__ */ jsxs6(Box7, { children: [
42079
+ /* @__PURE__ */ jsxs6(
42080
+ Text7,
42103
42081
  {
42104
42082
  bold: isHighlighted,
42105
42083
  color: isSelected ? colors.primary : isHighlighted ? colors.accent : colors.text,
@@ -42109,16 +42087,16 @@ function ModelSelector() {
42109
42087
  ]
42110
42088
  }
42111
42089
  ),
42112
- /* @__PURE__ */ jsxs7(Text8, { color: colors.textMuted, children: [
42090
+ /* @__PURE__ */ jsxs6(Text7, { color: colors.textMuted, children: [
42113
42091
  " (",
42114
42092
  model.provider,
42115
42093
  ")"
42116
42094
  ] }),
42117
- model.tags.includes("free") && /* @__PURE__ */ jsx13(Text8, { color: colors.success, children: " free" })
42095
+ model.tags.includes("free") && /* @__PURE__ */ jsx12(Text7, { color: colors.success, children: " free" })
42118
42096
  ] }, model.id);
42119
42097
  };
42120
- return /* @__PURE__ */ jsxs7(
42121
- Box8,
42098
+ return /* @__PURE__ */ jsxs6(
42099
+ Box7,
42122
42100
  {
42123
42101
  flexDirection: "column",
42124
42102
  borderStyle: "double",
@@ -42128,17 +42106,17 @@ function ModelSelector() {
42128
42106
  top: "50%",
42129
42107
  left: "50%",
42130
42108
  children: [
42131
- /* @__PURE__ */ jsx13(Box8, { paddingX: 1, children: /* @__PURE__ */ jsx13(Text8, { bold: true, color: colors.primary, children: "Select Model" }) }),
42132
- /* @__PURE__ */ jsxs7(Box8, { paddingX: 1, children: [
42133
- /* @__PURE__ */ jsx13(Text8, { color: colors.textMuted, children: "Search: " }),
42134
- /* @__PURE__ */ jsx13(Text8, { children: filter3 }),
42135
- /* @__PURE__ */ jsx13(Text8, { inverse: true, children: " " })
42109
+ /* @__PURE__ */ jsx12(Box7, { paddingX: 1, children: /* @__PURE__ */ jsx12(Text7, { bold: true, color: colors.primary, children: "Select Model" }) }),
42110
+ /* @__PURE__ */ jsxs6(Box7, { paddingX: 1, children: [
42111
+ /* @__PURE__ */ jsx12(Text7, { color: colors.textMuted, children: "Search: " }),
42112
+ /* @__PURE__ */ jsx12(Text7, { children: filter3 }),
42113
+ /* @__PURE__ */ jsx12(Text7, { inverse: true, children: " " })
42136
42114
  ] }),
42137
- /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", paddingX: 1, maxHeight: 15, children: [
42138
- /* @__PURE__ */ jsx13(Text8, { color: colors.textMuted, children: "Available Models (free):" }),
42115
+ /* @__PURE__ */ jsxs6(Box7, { flexDirection: "column", paddingX: 1, maxHeight: 15, children: [
42116
+ /* @__PURE__ */ jsx12(Text7, { color: colors.textMuted, children: "Available Models (free):" }),
42139
42117
  filteredModels.map((model, index) => renderModel(model, index))
42140
42118
  ] }),
42141
- /* @__PURE__ */ jsx13(Box8, { paddingX: 1, children: /* @__PURE__ */ jsx13(Text8, { color: colors.textMuted, children: "\u2191\u2193 navigate \xB7 Enter select \xB7 Esc close" }) })
42119
+ /* @__PURE__ */ jsx12(Box7, { paddingX: 1, children: /* @__PURE__ */ jsx12(Text7, { color: colors.textMuted, children: "\u2191\u2193 navigate \xB7 Enter select \xB7 Esc close" }) })
42142
42120
  ]
42143
42121
  }
42144
42122
  );
@@ -42155,14 +42133,14 @@ var init_model_selector = __esm({
42155
42133
  });
42156
42134
 
42157
42135
  // src/core/tui/hooks/use-agent.ts
42158
- import { useCallback as useCallback8, useRef as useRef3 } from "react";
42136
+ import { useCallback as useCallback7, useRef as useRef3 } from "react";
42159
42137
  function useAgent2() {
42160
42138
  const { addMessage, updateMessage, addToolCall, updateToolCall } = useSession();
42161
42139
  const { currentAgent, currentModel, setRunning } = useAgent();
42162
42140
  const toast = useToast();
42163
42141
  const agentRef = useRef3(null);
42164
42142
  const abortRef = useRef3(null);
42165
- const sendMessage = useCallback8(async (content) => {
42143
+ const sendMessage = useCallback7(async (content) => {
42166
42144
  const userMessage = addMessage({
42167
42145
  role: "user",
42168
42146
  content,
@@ -42222,7 +42200,7 @@ function useAgent2() {
42222
42200
  setRunning,
42223
42201
  toast
42224
42202
  ]);
42225
- const cancelCurrent = useCallback8(() => {
42203
+ const cancelCurrent = useCallback7(() => {
42226
42204
  if (abortRef.current) {
42227
42205
  abortRef.current.abort();
42228
42206
  abortRef.current = null;
@@ -42251,8 +42229,8 @@ var init_use_agent = __esm({
42251
42229
 
42252
42230
  // src/core/tui/app.tsx
42253
42231
  import "react";
42254
- import { Box as Box9, Text as Text9, useInput as useInput4, useApp as useApp2 } from "ink";
42255
- import { jsx as jsx14, jsxs as jsxs8 } from "react/jsx-runtime";
42232
+ import { Box as Box8, Text as Text8, useInput as useInput3, useApp as useApp2 } from "ink";
42233
+ import { jsx as jsx13, jsxs as jsxs7 } from "react/jsx-runtime";
42256
42234
  function App() {
42257
42235
  const { colors } = useTheme();
42258
42236
  const { messages } = useSession();
@@ -42260,7 +42238,7 @@ function App() {
42260
42238
  const { isOpen, openDialog, closeDialog, dialog } = useDialog();
42261
42239
  const { sendMessage, cancelCurrent } = useAgent2();
42262
42240
  const { exit } = useApp2();
42263
- useInput4((input, key) => {
42241
+ useInput3((input, key) => {
42264
42242
  if (key.ctrl && input === "p") {
42265
42243
  openDialog("model");
42266
42244
  return;
@@ -42300,10 +42278,6 @@ function App() {
42300
42278
  case "agent":
42301
42279
  openDialog("agent");
42302
42280
  return;
42303
- case "sessions":
42304
- case "session":
42305
- openDialog("sessions");
42306
- return;
42307
42281
  case "clear":
42308
42282
  process.stdout.write("\x1B[2J\x1B[H");
42309
42283
  return;
@@ -42318,53 +42292,81 @@ function App() {
42318
42292
  await sendMessage(value);
42319
42293
  };
42320
42294
  const hasMessages = messages.length > 0;
42321
- return /* @__PURE__ */ jsxs8(
42322
- Box9,
42323
- {
42324
- flexDirection: "column",
42325
- width: "100%",
42326
- height: "100%",
42327
- backgroundColor: colors.background,
42328
- children: [
42329
- /* @__PURE__ */ jsx14(Box9, { flexDirection: "column", flexGrow: 1, justifyContent: hasMessages ? "flex-start" : "center", children: hasMessages ? /* @__PURE__ */ jsx14(MessageContainer, {}) : (
42330
- /* Welcome screen - centered layout like OpenCode */
42331
- /* @__PURE__ */ jsxs8(Box9, { flexDirection: "column", alignItems: "center", gap: 1, children: [
42332
- /* @__PURE__ */ jsx14(Logo, { width: 80 }),
42333
- /* @__PURE__ */ jsx14(
42334
- Box9,
42335
- {
42336
- flexDirection: "column",
42337
- width: 60,
42338
- borderStyle: "round",
42339
- borderColor: colors.border,
42340
- paddingX: 2,
42341
- paddingY: 1,
42342
- children: /* @__PURE__ */ jsx14(
42343
- InputEditor,
42344
- {
42345
- onSubmit: handleSubmit,
42346
- placeholder: 'Ask anything... "What is the tech stack of this project?"'
42347
- }
42348
- )
42349
- }
42350
- ),
42351
- /* @__PURE__ */ jsxs8(Box9, { gap: 1, children: [
42352
- /* @__PURE__ */ jsx14(Text9, { bold: true, color: colors.primary, children: currentAgent.name }),
42353
- /* @__PURE__ */ jsx14(Text9, { color: colors.textMuted, children: "\xB7" }),
42354
- /* @__PURE__ */ jsx14(Text9, { color: colors.textSecondary, children: currentModel })
42355
- ] }),
42356
- /* @__PURE__ */ jsxs8(Box9, { gap: 2, children: [
42357
- /* @__PURE__ */ jsx14(Text9, { color: colors.textMuted, children: "tab agents" }),
42358
- /* @__PURE__ */ jsx14(Text9, { color: colors.textMuted, children: "ctrl+p commands" })
42295
+ const cwd = process.cwd().replace(process.env.HOME || "", "~");
42296
+ return /* @__PURE__ */ jsxs7(Box8, { flexDirection: "row", width: "100%", height: "100%", children: [
42297
+ /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", flexGrow: 1, backgroundColor: colors.background, children: [
42298
+ /* @__PURE__ */ jsx13(Box8, { flexDirection: "column", flexGrow: 1, justifyContent: hasMessages ? "flex-start" : "center", children: hasMessages ? /* @__PURE__ */ jsx13(MessageContainer, {}) : (
42299
+ /* Welcome screen - centered vertically */
42300
+ /* @__PURE__ */ jsxs7(Box8, { flexDirection: "column", alignItems: "center", gap: 1, children: [
42301
+ /* @__PURE__ */ jsx13(Logo, {}),
42302
+ /* @__PURE__ */ jsx13(
42303
+ Box8,
42304
+ {
42305
+ flexDirection: "column",
42306
+ width: 60,
42307
+ borderStyle: "round",
42308
+ borderColor: colors.border,
42309
+ paddingX: 2,
42310
+ paddingY: 1,
42311
+ children: /* @__PURE__ */ jsx13(
42312
+ InputEditor,
42313
+ {
42314
+ onSubmit: handleSubmit,
42315
+ placeholder: 'Ask anything... "What is the tech stack of this project?"'
42316
+ }
42317
+ )
42318
+ }
42319
+ ),
42320
+ /* @__PURE__ */ jsxs7(Box8, { gap: 1, children: [
42321
+ /* @__PURE__ */ jsx13(Text8, { bold: true, color: colors.primary, children: currentAgent.name }),
42322
+ /* @__PURE__ */ jsx13(Text8, { color: colors.textMuted, children: "\xB7" }),
42323
+ /* @__PURE__ */ jsx13(Text8, { color: colors.textSecondary, children: currentModel })
42324
+ ] }),
42325
+ /* @__PURE__ */ jsxs7(Box8, { gap: 2, children: [
42326
+ /* @__PURE__ */ jsx13(Text8, { color: colors.textMuted, children: "tab agents" }),
42327
+ /* @__PURE__ */ jsx13(Text8, { color: colors.textMuted, children: "ctrl+p commands" })
42328
+ ] })
42329
+ ] })
42330
+ ) }),
42331
+ /* @__PURE__ */ jsx13(StatusBar, {})
42332
+ ] }),
42333
+ /* @__PURE__ */ jsxs7(
42334
+ Box8,
42335
+ {
42336
+ flexDirection: "column",
42337
+ width: 35,
42338
+ borderStyle: "single",
42339
+ borderColor: colors.border,
42340
+ paddingLeft: 1,
42341
+ children: [
42342
+ /* @__PURE__ */ jsx13(Text8, { bold: true, color: colors.textSecondary, children: "New session" }),
42343
+ /* @__PURE__ */ jsxs7(Text8, { color: colors.textMuted, children: [
42344
+ (/* @__PURE__ */ new Date()).toISOString().split(".")[0],
42345
+ "Z"
42346
+ ] }),
42347
+ /* @__PURE__ */ jsx13(Box8, { marginTop: 1, children: /* @__PURE__ */ jsx13(Text8, { bold: true, color: colors.textSecondary, children: "Context" }) }),
42348
+ /* @__PURE__ */ jsx13(Text8, { color: colors.textMuted, children: "0 tokens" }),
42349
+ /* @__PURE__ */ jsx13(Text8, { color: colors.textMuted, children: "0% used" }),
42350
+ /* @__PURE__ */ jsx13(Text8, { color: colors.textMuted, children: "$0.00 spent" }),
42351
+ /* @__PURE__ */ jsx13(Box8, { marginTop: 1, children: /* @__PURE__ */ jsx13(Text8, { bold: true, color: colors.textSecondary, children: "MCP" }) }),
42352
+ /* @__PURE__ */ jsx13(Text8, { color: colors.textMuted, children: "\u25CF railway Connected" }),
42353
+ /* @__PURE__ */ jsx13(Box8, { marginTop: 1, children: /* @__PURE__ */ jsx13(Text8, { bold: true, color: colors.textSecondary, children: "LSP" }) }),
42354
+ /* @__PURE__ */ jsx13(Text8, { color: colors.textMuted, children: "LSPs are disabled" }),
42355
+ /* @__PURE__ */ jsx13(Box8, { flexGrow: 1 }),
42356
+ /* @__PURE__ */ jsx13(Box8, { marginTop: 1, children: /* @__PURE__ */ jsx13(Text8, { color: colors.textMuted, children: cwd }) }),
42357
+ /* @__PURE__ */ jsxs7(Box8, { children: [
42358
+ /* @__PURE__ */ jsx13(Text8, { color: colors.success, children: "\u25CF" }),
42359
+ /* @__PURE__ */ jsxs7(Text8, { color: colors.textMuted, children: [
42360
+ " ",
42361
+ APP_VERSION
42359
42362
  ] })
42360
42363
  ] })
42361
- ) }),
42362
- /* @__PURE__ */ jsx14(StatusBar, {}),
42363
- isOpen && dialog.type === "model" && /* @__PURE__ */ jsx14(ModelSelector, {}),
42364
- /* @__PURE__ */ jsx14(ToastContainer, {})
42365
- ]
42366
- }
42367
- );
42364
+ ]
42365
+ }
42366
+ ),
42367
+ isOpen && dialog.type === "model" && /* @__PURE__ */ jsx13(ModelSelector, {}),
42368
+ /* @__PURE__ */ jsx13(ToastContainer, {})
42369
+ ] });
42368
42370
  }
42369
42371
  var init_app = __esm({
42370
42372
  "src/core/tui/app.tsx"() {
@@ -42378,9 +42380,9 @@ var init_app = __esm({
42378
42380
  init_input_editor();
42379
42381
  init_status_bar();
42380
42382
  init_toast2();
42381
- init_command_palette();
42382
42383
  init_model_selector();
42383
42384
  init_use_agent();
42385
+ init_version();
42384
42386
  }
42385
42387
  });
42386
42388
 
@@ -42391,7 +42393,7 @@ __export(tui_exports, {
42391
42393
  });
42392
42394
  import "react";
42393
42395
  import { render } from "ink";
42394
- import { jsx as jsx15 } from "react/jsx-runtime";
42396
+ import { jsx as jsx14 } from "react/jsx-runtime";
42395
42397
  var TUILauncher;
42396
42398
  var init_tui = __esm({
42397
42399
  "src/core/tui/index.tsx"() {
@@ -42408,15 +42410,20 @@ var init_tui = __esm({
42408
42410
  this.options = options;
42409
42411
  }
42410
42412
  async start() {
42413
+ process.stdout.write("\x1B[2J\x1B[H");
42411
42414
  const { waitUntilExit } = render(
42412
- /* @__PURE__ */ jsx15(ThemeProvider, { children: /* @__PURE__ */ jsx15(SessionProvider, { children: /* @__PURE__ */ jsx15(
42415
+ /* @__PURE__ */ jsx14(ThemeProvider, { children: /* @__PURE__ */ jsx14(SessionProvider, { children: /* @__PURE__ */ jsx14(
42413
42416
  AgentProvider,
42414
42417
  {
42415
42418
  initialAgent: this.options.agent || "build",
42416
42419
  initialModel: this.options.model,
42417
- children: /* @__PURE__ */ jsx15(DialogProvider, { children: /* @__PURE__ */ jsx15(ToastProvider, { children: /* @__PURE__ */ jsx15(App, {}) }) })
42420
+ children: /* @__PURE__ */ jsx14(DialogProvider, { children: /* @__PURE__ */ jsx14(ToastProvider, { children: /* @__PURE__ */ jsx14(App, {}) }) })
42418
42421
  }
42419
- ) }) })
42422
+ ) }) }),
42423
+ {
42424
+ // Ensure Ink takes over the terminal
42425
+ exitOnCtrlC: true
42426
+ }
42420
42427
  );
42421
42428
  await waitUntilExit();
42422
42429
  }