deepcode-ai 1.1.7 → 1.1.8

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/index.js CHANGED
@@ -4480,6 +4480,9 @@ var McpManager = class {
4480
4480
  }
4481
4481
  return tools;
4482
4482
  }
4483
+ get connectedCount() {
4484
+ return this.clients.length;
4485
+ }
4483
4486
  stop() {
4484
4487
  for (const { client } of this.clients) {
4485
4488
  try {
@@ -7650,8 +7653,8 @@ import path32 from "path";
7650
7653
  import { jsx, jsxs } from "react/jsx-runtime";
7651
7654
  import fs6 from "fs";
7652
7655
  import path112 from "path";
7653
- import { isValidElement, useCallback as useCallback22, useEffect as useEffect24, useMemo as useMemo15, useRef as useRef16, useState as useState25 } from "react";
7654
- import { Box as Box38, Text as Text44, useInput as useInput4, useStdin as useStdin3 } from "ink";
7656
+ import { isValidElement, useCallback as useCallback22, useEffect as useEffect25, useMemo as useMemo15, useRef as useRef16, useState as useState26 } from "react";
7657
+ import { Box as Box38, Text as Text45, useInput as useInput4, useStdin as useStdin3 } from "ink";
7655
7658
  import os4 from "os";
7656
7659
  import path62 from "path";
7657
7660
  import fs from "fs";
@@ -9571,8 +9574,8 @@ import { jsx as jsx26, jsxs as jsxs20 } from "react/jsx-runtime";
9571
9574
  import { Box as Box22, Text as Text25 } from "ink";
9572
9575
  import { jsxs as jsxs21 } from "react/jsx-runtime";
9573
9576
  import { jsx as jsx27, jsxs as jsxs22 } from "react/jsx-runtime";
9574
- import { Box as Box31, Text as Text37, useIsScreenReaderEnabled as useIsScreenReaderEnabled3 } from "ink";
9575
- import { useCallback as useCallback16, useState as useState20 } from "react";
9577
+ import { Box as Box31, Text as Text38, useIsScreenReaderEnabled as useIsScreenReaderEnabled3 } from "ink";
9578
+ import { useCallback as useCallback16, useState as useState21 } from "react";
9576
9579
  import { useRef as useRef7 } from "react";
9577
9580
  import { Box as Box24, Text as Text26 } from "ink";
9578
9581
  import { useEffect as useEffect13, useState as useState11 } from "react";
@@ -9605,45 +9608,50 @@ import { Box as Box26, Text as Text29 } from "ink";
9605
9608
  import chalk2 from "chalk";
9606
9609
  import { jsx as jsx31, jsxs as jsxs26 } from "react/jsx-runtime";
9607
9610
  import { Fragment as Fragment7, jsx as jsx32, jsxs as jsxs27 } from "react/jsx-runtime";
9608
- import { Box as Box28, Text as Text34 } from "ink";
9611
+ import { Box as Box28, Text as Text35 } from "ink";
9609
9612
  import { Text as Text31 } from "ink";
9610
9613
  import { Fragment as Fragment8, jsx as jsx33, jsxs as jsxs28 } from "react/jsx-runtime";
9611
9614
  import { Text as Text32 } from "ink";
9612
9615
  import { jsx as jsx34, jsxs as jsxs29 } from "react/jsx-runtime";
9613
9616
  import { Text as Text33 } from "ink";
9614
9617
  import { jsx as jsx35, jsxs as jsxs30 } from "react/jsx-runtime";
9618
+ import { Text as Text34 } from "ink";
9619
+ import { jsxs as jsxs31 } from "react/jsx-runtime";
9620
+ import { useState as useState19, useEffect as useEffect222 } from "react";
9621
+ import { execFile as execFile22 } from "child_process";
9622
+ import os42 from "os";
9615
9623
  import {
9616
9624
  createContext as createContext8,
9617
9625
  useCallback as useCallback15,
9618
9626
  useContext as useContext9,
9619
- useState as useState19
9627
+ useState as useState20
9620
9628
  } from "react";
9621
9629
  import { jsx as jsx36 } from "react/jsx-runtime";
9622
- import { jsx as jsx37, jsxs as jsxs31 } from "react/jsx-runtime";
9630
+ import { jsx as jsx37, jsxs as jsxs32 } from "react/jsx-runtime";
9623
9631
  import { useRef as useRef12 } from "react";
9624
- import { Box as Box29, Text as Text35 } from "ink";
9625
- import { jsx as jsx38, jsxs as jsxs32 } from "react/jsx-runtime";
9626
- import { Box as Box30, Text as Text36 } from "ink";
9627
- import { jsx as jsx39, jsxs as jsxs33 } from "react/jsx-runtime";
9628
- import { jsx as jsx40, jsxs as jsxs34 } from "react/jsx-runtime";
9629
- import { Box as Box32, Text as Text38 } from "ink";
9630
- import { jsx as jsx41, jsxs as jsxs35 } from "react/jsx-runtime";
9632
+ import { Box as Box29, Text as Text36 } from "ink";
9633
+ import { jsx as jsx38, jsxs as jsxs33 } from "react/jsx-runtime";
9634
+ import { Box as Box30, Text as Text37 } from "ink";
9635
+ import { jsx as jsx39, jsxs as jsxs34 } from "react/jsx-runtime";
9636
+ import { jsx as jsx40, jsxs as jsxs35 } from "react/jsx-runtime";
9637
+ import { Box as Box32, Text as Text39 } from "ink";
9638
+ import { jsx as jsx41, jsxs as jsxs36 } from "react/jsx-runtime";
9631
9639
  import { useCallback as useCallback17, useMemo as useMemo10, useRef as useRef13 } from "react";
9632
- import { Box as Box33, Text as Text39 } from "ink";
9633
- import { jsx as jsx42, jsxs as jsxs36 } from "react/jsx-runtime";
9634
- import { useCallback as useCallback18, useMemo as useMemo11, useState as useState21 } from "react";
9635
- import { Box as Box34, Text as Text40, useInput as useInput2 } from "ink";
9636
- import { Fragment as Fragment9, jsx as jsx43, jsxs as jsxs37 } from "react/jsx-runtime";
9637
- import { useCallback as useCallback19, useMemo as useMemo12, useState as useState222 } from "react";
9638
- import { Box as Box35, Text as Text41 } from "ink";
9639
- import { jsx as jsx44, jsxs as jsxs38 } from "react/jsx-runtime";
9640
- import { useCallback as useCallback20, useEffect as useEffect222, useMemo as useMemo13, useRef as useRef14, useState as useState23 } from "react";
9641
- import { Box as Box36, Text as Text42 } from "ink";
9642
- import { jsx as jsx45, jsxs as jsxs39 } from "react/jsx-runtime";
9643
- import { useCallback as useCallback21, useEffect as useEffect23, useMemo as useMemo14, useRef as useRef15, useState as useState24 } from "react";
9644
- import { Box as Box37, Text as Text43, useInput as useInput3 } from "ink";
9645
- import { jsx as jsx46, jsxs as jsxs40 } from "react/jsx-runtime";
9646
- import { jsx as jsx47, jsxs as jsxs41 } from "react/jsx-runtime";
9640
+ import { Box as Box33, Text as Text40 } from "ink";
9641
+ import { jsx as jsx42, jsxs as jsxs37 } from "react/jsx-runtime";
9642
+ import { useCallback as useCallback18, useMemo as useMemo11, useState as useState222 } from "react";
9643
+ import { Box as Box34, Text as Text41, useInput as useInput2 } from "ink";
9644
+ import { Fragment as Fragment9, jsx as jsx43, jsxs as jsxs38 } from "react/jsx-runtime";
9645
+ import { useCallback as useCallback19, useMemo as useMemo12, useState as useState23 } from "react";
9646
+ import { Box as Box35, Text as Text42 } from "ink";
9647
+ import { jsx as jsx44, jsxs as jsxs39 } from "react/jsx-runtime";
9648
+ import { useCallback as useCallback20, useEffect as useEffect23, useMemo as useMemo13, useRef as useRef14, useState as useState24 } from "react";
9649
+ import { Box as Box36, Text as Text43 } from "ink";
9650
+ import { jsx as jsx45, jsxs as jsxs40 } from "react/jsx-runtime";
9651
+ import { useCallback as useCallback21, useEffect as useEffect24, useMemo as useMemo14, useRef as useRef15, useState as useState25 } from "react";
9652
+ import { Box as Box37, Text as Text44, useInput as useInput3 } from "ink";
9653
+ import { jsx as jsx46, jsxs as jsxs41 } from "react/jsx-runtime";
9654
+ import { jsx as jsx47, jsxs as jsxs42 } from "react/jsx-runtime";
9647
9655
  import { jsx as jsx48 } from "react/jsx-runtime";
9648
9656
  async function createRuntime(options) {
9649
9657
  const worktree = path9.resolve(options.cwd);
@@ -24948,12 +24956,9 @@ var parseSlashCommand = (query, commands) => {
24948
24956
  let pathIndex = 0;
24949
24957
  const canonicalPath = [];
24950
24958
  for (const part of commandPath) {
24951
- let foundCommand = currentCommands.find((cmd) => cmd.name === part);
24952
- if (!foundCommand) {
24953
- foundCommand = currentCommands.find(
24954
- (cmd) => cmd.altNames?.includes(part)
24955
- );
24956
- }
24959
+ const foundCommand = currentCommands.find(
24960
+ (cmd) => cmd.name === part || cmd.altNames?.includes(part)
24961
+ );
24957
24962
  if (foundCommand) {
24958
24963
  commandToExecute = foundCommand;
24959
24964
  canonicalPath.push(foundCommand.name);
@@ -26878,10 +26883,35 @@ function BackgroundTasksPill() {
26878
26883
  return null;
26879
26884
  }
26880
26885
  function MCPHealthPill() {
26881
- return null;
26886
+ const { mcpConnected, mcpTotal } = useUIState();
26887
+ if (mcpTotal === 0) return null;
26888
+ const color = mcpConnected === mcpTotal ? theme.status.success : theme.status.warning;
26889
+ return /* @__PURE__ */ jsxs31(Text34, { color, children: [
26890
+ " MCP ",
26891
+ mcpConnected,
26892
+ "/",
26893
+ mcpTotal
26894
+ ] });
26882
26895
  }
26883
26896
  function useStatusLine() {
26884
- return { lines: [] };
26897
+ const config = useConfig();
26898
+ const cwd = config.getWorkingDir();
26899
+ const [line, setLine] = useState19(null);
26900
+ useEffect222(() => {
26901
+ let cancelled = false;
26902
+ execFile22("git", ["branch", "--show-current"], { cwd }, (err, stdout) => {
26903
+ if (cancelled) return;
26904
+ const branch = err ? null : stdout.trim();
26905
+ if (!branch) return;
26906
+ const home = os42.homedir();
26907
+ const displayCwd = cwd.startsWith(home) ? `~${cwd.slice(home.length)}` : cwd;
26908
+ setLine(`${displayCwd} [${branch}]`);
26909
+ });
26910
+ return () => {
26911
+ cancelled = true;
26912
+ };
26913
+ }, [cwd]);
26914
+ return { lines: line ? [line] : [] };
26885
26915
  }
26886
26916
  function useConfigInitMessage(_isConfigInitialized) {
26887
26917
  return null;
@@ -26891,8 +26921,8 @@ var VimModeProvider = ({
26891
26921
  children,
26892
26922
  initialVimEnabled = false
26893
26923
  }) => {
26894
- const [vimEnabled, setVimEnabled] = useState19(initialVimEnabled);
26895
- const [vimMode, setVimMode] = useState19(
26924
+ const [vimEnabled, setVimEnabled] = useState20(initialVimEnabled);
26925
+ const [vimMode, setVimMode] = useState20(
26896
26926
  initialVimEnabled ? "NORMAL" : "INSERT"
26897
26927
  );
26898
26928
  const toggleVimEnabled = useCallback15(async () => {
@@ -26933,16 +26963,16 @@ var Footer = () => {
26933
26963
  const debugMode = config.getDebugMode();
26934
26964
  const contextWindowSize = config.getContentGeneratorConfig()?.contextWindowSize;
26935
26965
  const suppressHint = statusLineLines.length > 0;
26936
- const leftBottomContent = uiState.ctrlCPressedOnce ? /* @__PURE__ */ jsx37(Text34, { color: theme.status.warning, children: t("Press Ctrl+C again to exit.") }) : uiState.ctrlDPressedOnce ? /* @__PURE__ */ jsx37(Text34, { color: theme.status.warning, children: t("Press Ctrl+D again to exit.") }) : uiState.showEscapePrompt ? /* @__PURE__ */ jsx37(Text34, { color: theme.text.secondary, children: t("Press Esc again to clear.") }) : uiState.rewindEscPending ? /* @__PURE__ */ jsx37(Text34, { color: theme.text.secondary, children: t("Press Esc again to rewind conversation.") }) : vimEnabled && vimMode === "INSERT" ? /* @__PURE__ */ jsx37(Text34, { color: theme.text.secondary, children: "-- INSERT --" }) : uiState.shellModeActive ? /* @__PURE__ */ jsx37(ShellModeIndicator, {}) : configInitMessage ? /* @__PURE__ */ jsxs31(Text34, { color: theme.text.secondary, children: [
26966
+ const leftBottomContent = uiState.ctrlCPressedOnce ? /* @__PURE__ */ jsx37(Text35, { color: theme.status.warning, children: t("Press Ctrl+C again to exit.") }) : uiState.ctrlDPressedOnce ? /* @__PURE__ */ jsx37(Text35, { color: theme.status.warning, children: t("Press Ctrl+D again to exit.") }) : uiState.showEscapePrompt ? /* @__PURE__ */ jsx37(Text35, { color: theme.text.secondary, children: t("Press Esc again to clear.") }) : uiState.rewindEscPending ? /* @__PURE__ */ jsx37(Text35, { color: theme.text.secondary, children: t("Press Esc again to rewind conversation.") }) : vimEnabled && vimMode === "INSERT" ? /* @__PURE__ */ jsx37(Text35, { color: theme.text.secondary, children: "-- INSERT --" }) : uiState.shellModeActive ? /* @__PURE__ */ jsx37(ShellModeIndicator, {}) : configInitMessage ? /* @__PURE__ */ jsxs32(Text35, { color: theme.text.secondary, children: [
26937
26967
  /* @__PURE__ */ jsx37(GeminiSpinner, {}),
26938
26968
  " ",
26939
26969
  configInitMessage
26940
- ] }) : showAutoAcceptIndicator !== void 0 && showAutoAcceptIndicator !== "default" ? /* @__PURE__ */ jsx37(AutoAcceptIndicator, { approvalMode: showAutoAcceptIndicator }) : suppressHint ? null : /* @__PURE__ */ jsx37(Text34, { color: theme.text.secondary, children: t("? for shortcuts") });
26970
+ ] }) : showAutoAcceptIndicator !== void 0 && showAutoAcceptIndicator !== "default" ? /* @__PURE__ */ jsx37(AutoAcceptIndicator, { approvalMode: showAutoAcceptIndicator }) : suppressHint ? null : /* @__PURE__ */ jsx37(Text35, { color: theme.text.secondary, children: t("? for shortcuts") });
26941
26971
  const rightItems = [];
26942
26972
  if (sandboxInfo) {
26943
26973
  rightItems.push({
26944
26974
  key: "sandbox",
26945
- node: /* @__PURE__ */ jsxs31(Text34, { color: theme.status.success, children: [
26975
+ node: /* @__PURE__ */ jsxs32(Text35, { color: theme.status.success, children: [
26946
26976
  "\u{1F512} ",
26947
26977
  sandboxInfo
26948
26978
  ] })
@@ -26951,13 +26981,13 @@ var Footer = () => {
26951
26981
  if (debugMode) {
26952
26982
  rightItems.push({
26953
26983
  key: "debug",
26954
- node: /* @__PURE__ */ jsx37(Text34, { color: theme.status.warning, children: "Debug Mode" })
26984
+ node: /* @__PURE__ */ jsx37(Text35, { color: theme.status.warning, children: "Debug Mode" })
26955
26985
  });
26956
26986
  }
26957
26987
  if (promptTokenCount > 0 && contextWindowSize) {
26958
26988
  rightItems.push({
26959
26989
  key: "context",
26960
- node: /* @__PURE__ */ jsx37(Text34, { color: theme.text.accent, children: /* @__PURE__ */ jsx37(
26990
+ node: /* @__PURE__ */ jsx37(Text35, { color: theme.text.accent, children: /* @__PURE__ */ jsx37(
26961
26991
  ContextUsageDisplay,
26962
26992
  {
26963
26993
  promptTokenCount,
@@ -26967,7 +26997,7 @@ var Footer = () => {
26967
26997
  ) })
26968
26998
  });
26969
26999
  }
26970
- return /* @__PURE__ */ jsxs31(
27000
+ return /* @__PURE__ */ jsxs32(
26971
27001
  Box28,
26972
27002
  {
26973
27003
  flexDirection: isNarrow ? "column" : "row",
@@ -26976,16 +27006,16 @@ var Footer = () => {
26976
27006
  paddingX: 2,
26977
27007
  gap: isNarrow ? 0 : 1,
26978
27008
  children: [
26979
- /* @__PURE__ */ jsxs31(Box28, { flexDirection: "column", flexShrink: isNarrow ? 0 : 1, children: [
26980
- statusLineLines.length > 0 && !uiState.ctrlCPressedOnce && !uiState.ctrlDPressedOnce && statusLineLines.map((line, i) => /* @__PURE__ */ jsx37(Text34, { dimColor: true, wrap: "truncate", children: line }, `status-line-${i}`)),
26981
- /* @__PURE__ */ jsxs31(Box28, { flexDirection: "row", flexShrink: 1, children: [
26982
- /* @__PURE__ */ jsx37(Text34, { wrap: "truncate", children: leftBottomContent }),
27009
+ /* @__PURE__ */ jsxs32(Box28, { flexDirection: "column", flexShrink: isNarrow ? 0 : 1, children: [
27010
+ statusLineLines.length > 0 && !uiState.ctrlCPressedOnce && !uiState.ctrlDPressedOnce && statusLineLines.map((line, i) => /* @__PURE__ */ jsx37(Text35, { dimColor: true, wrap: "truncate", children: line }, `status-line-${i}`)),
27011
+ /* @__PURE__ */ jsxs32(Box28, { flexDirection: "row", flexShrink: 1, children: [
27012
+ /* @__PURE__ */ jsx37(Text35, { wrap: "truncate", children: leftBottomContent }),
26983
27013
  /* @__PURE__ */ jsx37(BackgroundTasksPill, {}),
26984
27014
  /* @__PURE__ */ jsx37(MCPHealthPill, {})
26985
27015
  ] })
26986
27016
  ] }),
26987
- /* @__PURE__ */ jsx37(Box28, { flexShrink: 0, gap: 1, alignItems: "flex-start", children: rightItems.map(({ key, node }, index) => /* @__PURE__ */ jsxs31(Box28, { alignItems: "center", children: [
26988
- index > 0 && /* @__PURE__ */ jsx37(Text34, { color: theme.text.secondary, children: " | " }),
27017
+ /* @__PURE__ */ jsx37(Box28, { flexShrink: 0, gap: 1, alignItems: "flex-start", children: rightItems.map(({ key, node }, index) => /* @__PURE__ */ jsxs32(Box28, { alignItems: "center", children: [
27018
+ index > 0 && /* @__PURE__ */ jsx37(Text35, { color: theme.text.secondary, children: " | " }),
26989
27019
  node
26990
27020
  ] }, key)) })
26991
27021
  ]
@@ -27008,17 +27038,17 @@ var QueuedMessageDisplay = ({
27008
27038
  wasEmptyRef.current = false;
27009
27039
  }
27010
27040
  const showHint = hintSeenCountRef.current <= NUM_TIMES_QUEUE_HINT_SHOWN;
27011
- return /* @__PURE__ */ jsxs32(Box29, { flexDirection: "column", marginTop: 1, children: [
27041
+ return /* @__PURE__ */ jsxs33(Box29, { flexDirection: "column", marginTop: 1, children: [
27012
27042
  messageQueue.slice(0, MAX_DISPLAYED_QUEUED_MESSAGES).map((message, index) => {
27013
27043
  const preview = message.replace(/\s+/g, " ");
27014
- return /* @__PURE__ */ jsx38(Box29, { paddingLeft: 2, width: "100%", children: /* @__PURE__ */ jsx38(Text35, { dimColor: true, wrap: "truncate", children: preview }) }, index);
27044
+ return /* @__PURE__ */ jsx38(Box29, { paddingLeft: 2, width: "100%", children: /* @__PURE__ */ jsx38(Text36, { dimColor: true, wrap: "truncate", children: preview }) }, index);
27015
27045
  }),
27016
- messageQueue.length > MAX_DISPLAYED_QUEUED_MESSAGES && /* @__PURE__ */ jsx38(Box29, { paddingLeft: 2, children: /* @__PURE__ */ jsxs32(Text35, { dimColor: true, children: [
27046
+ messageQueue.length > MAX_DISPLAYED_QUEUED_MESSAGES && /* @__PURE__ */ jsx38(Box29, { paddingLeft: 2, children: /* @__PURE__ */ jsxs33(Text36, { dimColor: true, children: [
27017
27047
  "... (+",
27018
27048
  messageQueue.length - MAX_DISPLAYED_QUEUED_MESSAGES,
27019
27049
  " more)"
27020
27050
  ] }) }),
27021
- showHint && /* @__PURE__ */ jsx38(Box29, { paddingLeft: 2, children: /* @__PURE__ */ jsx38(Text35, { dimColor: true, italic: true, children: t("Press \u2191 to edit queued messages") }) })
27051
+ showHint && /* @__PURE__ */ jsx38(Box29, { paddingLeft: 2, children: /* @__PURE__ */ jsx38(Text36, { dimColor: true, italic: true, children: t("Press \u2191 to edit queued messages") }) })
27022
27052
  ] });
27023
27053
  };
27024
27054
  var getNewlineKey = () => process.platform === "win32" ? "ctrl+enter" : "ctrl+j";
@@ -27046,8 +27076,8 @@ var getShortcuts = () => [
27046
27076
  { key: getExternalEditorKey(), description: t("for external editor") },
27047
27077
  { key: "ctrl+o", description: t("to toggle compact mode") }
27048
27078
  ];
27049
- var ShortcutItem = ({ shortcut }) => /* @__PURE__ */ jsxs33(Text36, { color: theme.text.secondary, children: [
27050
- /* @__PURE__ */ jsx39(Text36, { color: theme.text.accent, children: shortcut.key }),
27079
+ var ShortcutItem = ({ shortcut }) => /* @__PURE__ */ jsxs34(Text37, { color: theme.text.secondary, children: [
27080
+ /* @__PURE__ */ jsx39(Text37, { color: theme.text.accent, children: shortcut.key }),
27051
27081
  " ",
27052
27082
  shortcut.description
27053
27083
  ] });
@@ -27131,11 +27161,11 @@ var Composer = () => {
27131
27161
  }
27132
27162
  }
27133
27163
  }
27134
- const [showShortcuts, setShowShortcuts] = useState20(false);
27164
+ const [showShortcuts, setShowShortcuts] = useState21(false);
27135
27165
  const handleToggleShortcuts = useCallback16(() => {
27136
27166
  setShowShortcuts((prev) => !prev);
27137
27167
  }, []);
27138
- const [showSuggestions, setShowSuggestions] = useState20(false);
27168
+ const [showSuggestions, setShowSuggestions] = useState21(false);
27139
27169
  const handleSuggestionsVisibilityChange = useCallback16(
27140
27170
  (visible) => {
27141
27171
  setShowSuggestions(visible);
@@ -27143,7 +27173,7 @@ var Composer = () => {
27143
27173
  },
27144
27174
  [uiActions]
27145
27175
  );
27146
- return /* @__PURE__ */ jsxs34(Box31, { flexDirection: "column", marginTop: 1, children: [
27176
+ return /* @__PURE__ */ jsxs35(Box31, { flexDirection: "column", marginTop: 1, children: [
27147
27177
  !uiState.embeddedShellFocused && !suppressBottomLoadingIndicator && /* @__PURE__ */ jsx40(
27148
27178
  LoadingIndicator,
27149
27179
  {
@@ -27156,7 +27186,7 @@ var Composer = () => {
27156
27186
  isReceivingContent
27157
27187
  }
27158
27188
  ),
27159
- !uiState.embeddedShellFocused && suppressBottomLoadingIndicator && /* @__PURE__ */ jsx40(Box31, { paddingLeft: 2, children: /* @__PURE__ */ jsxs34(Text37, { color: theme.text.secondary, children: [
27189
+ !uiState.embeddedShellFocused && suppressBottomLoadingIndicator && /* @__PURE__ */ jsx40(Box31, { paddingLeft: 2, children: /* @__PURE__ */ jsxs35(Text38, { color: theme.text.secondary, children: [
27160
27190
  "(",
27161
27191
  t("Esc to cancel"),
27162
27192
  ")"
@@ -27564,10 +27594,10 @@ var CommandDialog = ({
27564
27594
  title,
27565
27595
  lines,
27566
27596
  footerText = "Press Esc or Enter to close."
27567
- }) => /* @__PURE__ */ jsx41(Box32, { marginLeft: 2, marginRight: 2, marginTop: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs35(Box32, { borderStyle: "round", borderColor: theme.border.default, padding: 1, flexDirection: "column", children: [
27568
- /* @__PURE__ */ jsx41(Text38, { bold: true, color: theme.text.accent, children: title }),
27569
- /* @__PURE__ */ jsx41(Box32, { marginTop: 1, flexDirection: "column", children: lines.map((line, index) => /* @__PURE__ */ jsx41(Text38, { color: theme.text.primary, children: line }, index)) }),
27570
- /* @__PURE__ */ jsx41(Box32, { marginTop: 1, children: /* @__PURE__ */ jsx41(Text38, { color: theme.text.secondary, children: footerText }) })
27597
+ }) => /* @__PURE__ */ jsx41(Box32, { marginLeft: 2, marginRight: 2, marginTop: 1, flexDirection: "column", children: /* @__PURE__ */ jsxs36(Box32, { borderStyle: "round", borderColor: theme.border.default, padding: 1, flexDirection: "column", children: [
27598
+ /* @__PURE__ */ jsx41(Text39, { bold: true, color: theme.text.accent, children: title }),
27599
+ /* @__PURE__ */ jsx41(Box32, { marginTop: 1, flexDirection: "column", children: lines.map((line, index) => /* @__PURE__ */ jsx41(Text39, { color: theme.text.primary, children: line }, index)) }),
27600
+ /* @__PURE__ */ jsx41(Box32, { marginTop: 1, children: /* @__PURE__ */ jsx41(Text39, { color: theme.text.secondary, children: footerText }) })
27571
27601
  ] }) });
27572
27602
  var ThemeDialog = ({ onSelect, onClose, onPreview }) => {
27573
27603
  const originalTheme = useRef13(themeManager.getActiveTheme().name);
@@ -27604,7 +27634,7 @@ var ThemeDialog = ({ onSelect, onClose, onPreview }) => {
27604
27634
  },
27605
27635
  [onPreview]
27606
27636
  );
27607
- return /* @__PURE__ */ jsxs36(
27637
+ return /* @__PURE__ */ jsxs37(
27608
27638
  Box33,
27609
27639
  {
27610
27640
  flexDirection: "column",
@@ -27614,7 +27644,7 @@ var ThemeDialog = ({ onSelect, onClose, onPreview }) => {
27614
27644
  marginLeft: 2,
27615
27645
  marginRight: 2,
27616
27646
  children: [
27617
- /* @__PURE__ */ jsx42(Text39, { bold: true, color: theme.text.accent, children: "Select theme" }),
27647
+ /* @__PURE__ */ jsx42(Text40, { bold: true, color: theme.text.accent, children: "Select theme" }),
27618
27648
  /* @__PURE__ */ jsx42(
27619
27649
  RadioButtonSelect,
27620
27650
  {
@@ -27625,7 +27655,7 @@ var ThemeDialog = ({ onSelect, onClose, onPreview }) => {
27625
27655
  isFocused: true
27626
27656
  }
27627
27657
  ),
27628
- /* @__PURE__ */ jsx42(Text39, { color: theme.text.secondary, children: "\u2191\u2193 navigate \xB7 Enter apply \xB7 Esc cancel" })
27658
+ /* @__PURE__ */ jsx42(Text40, { color: theme.text.secondary, children: "\u2191\u2193 navigate \xB7 Enter apply \xB7 Esc cancel" })
27629
27659
  ]
27630
27660
  }
27631
27661
  );
@@ -27662,12 +27692,12 @@ var ProviderDialog = ({
27662
27692
  onTestProvider,
27663
27693
  onClose
27664
27694
  }) => {
27665
- const [phase, setPhase] = useState21("providers");
27666
- const [selectedProvider, setSelectedProvider] = useState21(currentProvider);
27667
- const [apiKeyInput, setApiKeyInput] = useState21("");
27668
- const [isBusy, setIsBusy] = useState21(false);
27669
- const [status, setStatus] = useState21(null);
27670
- const [testLatencyMs, setTestLatencyMs] = useState21(void 0);
27695
+ const [phase, setPhase] = useState222("providers");
27696
+ const [selectedProvider, setSelectedProvider] = useState222(currentProvider);
27697
+ const [apiKeyInput, setApiKeyInput] = useState222("");
27698
+ const [isBusy, setIsBusy] = useState222(false);
27699
+ const [status, setStatus] = useState222(null);
27700
+ const [testLatencyMs, setTestLatencyMs] = useState222(void 0);
27671
27701
  const isLocal = CREDENTIAL_FREE_PROVIDERS.has(selectedProvider);
27672
27702
  const keyIsSet = hasApiKey(selectedProvider);
27673
27703
  const keyHint = getProviderKeyHint(selectedProvider);
@@ -27855,7 +27885,7 @@ var ProviderDialog = ({
27855
27885
  );
27856
27886
  const statusColor2 = status ? status.ok ? status.text.startsWith("\u2713") ? theme.status.success : theme.text.secondary : theme.status.error : void 0;
27857
27887
  const footer = phase === "apiKey" ? "Enter save Ctrl+U clear Esc cancel" : phase === "providers" ? "\u2191\u2193 navigate Enter select Esc close" : "\u2191\u2193 navigate Enter confirm Esc back";
27858
- return /* @__PURE__ */ jsxs37(
27888
+ return /* @__PURE__ */ jsxs38(
27859
27889
  Box34,
27860
27890
  {
27861
27891
  flexDirection: "column",
@@ -27867,13 +27897,13 @@ var ProviderDialog = ({
27867
27897
  marginRight: 2,
27868
27898
  minWidth: 44,
27869
27899
  children: [
27870
- /* @__PURE__ */ jsxs37(Box34, { marginBottom: 1, gap: 1, children: [
27871
- /* @__PURE__ */ jsx43(Text40, { bold: true, color: theme.text.accent, children: "Providers" }),
27872
- phase !== "providers" && /* @__PURE__ */ jsxs37(Fragment9, { children: [
27873
- /* @__PURE__ */ jsx43(Text40, { color: theme.text.secondary, children: "\u203A" }),
27874
- /* @__PURE__ */ jsx43(Text40, { bold: true, color: theme.text.primary, children: selectedProvider })
27900
+ /* @__PURE__ */ jsxs38(Box34, { marginBottom: 1, gap: 1, children: [
27901
+ /* @__PURE__ */ jsx43(Text41, { bold: true, color: theme.text.accent, children: "Providers" }),
27902
+ phase !== "providers" && /* @__PURE__ */ jsxs38(Fragment9, { children: [
27903
+ /* @__PURE__ */ jsx43(Text41, { color: theme.text.secondary, children: "\u203A" }),
27904
+ /* @__PURE__ */ jsx43(Text41, { bold: true, color: theme.text.primary, children: selectedProvider })
27875
27905
  ] }),
27876
- phase === "providers" && currentModel && /* @__PURE__ */ jsxs37(Text40, { color: theme.text.secondary, children: [
27906
+ phase === "providers" && currentModel && /* @__PURE__ */ jsxs38(Text41, { color: theme.text.secondary, children: [
27877
27907
  " (",
27878
27908
  currentModel,
27879
27909
  ")"
@@ -27889,23 +27919,23 @@ var ProviderDialog = ({
27889
27919
  maxItemsToShow: 8,
27890
27920
  renderItem: (item, { titleColor }) => {
27891
27921
  const { icon, color, label } = getStatusMark(item.provider, item.keyIsSet);
27892
- return /* @__PURE__ */ jsxs37(Box34, { gap: 1, children: [
27893
- /* @__PURE__ */ jsx43(Text40, { color, children: icon }),
27894
- /* @__PURE__ */ jsx43(Text40, { color: titleColor, bold: item.isCurrent, children: item.provider.padEnd(12) }),
27895
- /* @__PURE__ */ jsx43(Text40, { color, dimColor: !item.keyIsSet && !item.isLocal, children: label }),
27896
- item.isCurrent && /* @__PURE__ */ jsx43(Text40, { color: theme.text.accent, children: "\u25B6" })
27922
+ return /* @__PURE__ */ jsxs38(Box34, { gap: 1, children: [
27923
+ /* @__PURE__ */ jsx43(Text41, { color, children: icon }),
27924
+ /* @__PURE__ */ jsx43(Text41, { color: titleColor, bold: item.isCurrent, children: item.provider.padEnd(12) }),
27925
+ /* @__PURE__ */ jsx43(Text41, { color, dimColor: !item.keyIsSet && !item.isLocal, children: label }),
27926
+ item.isCurrent && /* @__PURE__ */ jsx43(Text41, { color: theme.text.accent, children: "\u25B6" })
27897
27927
  ] });
27898
27928
  }
27899
27929
  }
27900
27930
  ),
27901
- phase === "actions" && /* @__PURE__ */ jsxs37(Fragment9, { children: [
27902
- /* @__PURE__ */ jsxs37(Box34, { marginBottom: 1, gap: 1, children: [
27903
- /* @__PURE__ */ jsx43(Text40, { color: theme.ui.comment, children: "session" }),
27904
- /* @__PURE__ */ jsx43(Text40, { color: selectedProvider === currentProvider ? theme.text.accent : theme.text.secondary, children: selectedProvider === currentProvider ? "active" : `still using ${currentProvider}` })
27931
+ phase === "actions" && /* @__PURE__ */ jsxs38(Fragment9, { children: [
27932
+ /* @__PURE__ */ jsxs38(Box34, { marginBottom: 1, gap: 1, children: [
27933
+ /* @__PURE__ */ jsx43(Text41, { color: theme.ui.comment, children: "session" }),
27934
+ /* @__PURE__ */ jsx43(Text41, { color: selectedProvider === currentProvider ? theme.text.accent : theme.text.secondary, children: selectedProvider === currentProvider ? "active" : `still using ${currentProvider}` })
27905
27935
  ] }),
27906
- /* @__PURE__ */ jsxs37(Box34, { marginBottom: 1, gap: 1, children: [
27907
- /* @__PURE__ */ jsx43(Text40, { color: theme.ui.comment, children: "key" }),
27908
- isLocal ? /* @__PURE__ */ jsx43(Text40, { color: theme.text.accent, children: "no key required" }) : keyHint ? /* @__PURE__ */ jsx43(Text40, { color: theme.text.secondary, children: keyHint }) : /* @__PURE__ */ jsx43(Text40, { color: theme.ui.comment, dimColor: true, children: "not configured" })
27936
+ /* @__PURE__ */ jsxs38(Box34, { marginBottom: 1, gap: 1, children: [
27937
+ /* @__PURE__ */ jsx43(Text41, { color: theme.ui.comment, children: "key" }),
27938
+ isLocal ? /* @__PURE__ */ jsx43(Text41, { color: theme.text.accent, children: "no key required" }) : keyHint ? /* @__PURE__ */ jsx43(Text41, { color: theme.text.secondary, children: keyHint }) : /* @__PURE__ */ jsx43(Text41, { color: theme.ui.comment, dimColor: true, children: "not configured" })
27909
27939
  ] }),
27910
27940
  /* @__PURE__ */ jsx43(
27911
27941
  BaseSelectionList,
@@ -27915,10 +27945,10 @@ var ProviderDialog = ({
27915
27945
  isFocused: !isBusy,
27916
27946
  showNumbers: false,
27917
27947
  maxItemsToShow: 6,
27918
- renderItem: (item, { titleColor }) => /* @__PURE__ */ jsxs37(Box34, { gap: 1, children: [
27919
- /* @__PURE__ */ jsx43(Text40, { color: titleColor, children: item.icon }),
27920
- /* @__PURE__ */ jsx43(Text40, { color: titleColor, children: item.label }),
27921
- item.hint && /* @__PURE__ */ jsxs37(Text40, { color: theme.ui.comment, dimColor: true, children: [
27948
+ renderItem: (item, { titleColor }) => /* @__PURE__ */ jsxs38(Box34, { gap: 1, children: [
27949
+ /* @__PURE__ */ jsx43(Text41, { color: titleColor, children: item.icon }),
27950
+ /* @__PURE__ */ jsx43(Text41, { color: titleColor, children: item.label }),
27951
+ item.hint && /* @__PURE__ */ jsxs38(Text41, { color: theme.ui.comment, dimColor: true, children: [
27922
27952
  "(",
27923
27953
  item.hint,
27924
27954
  ")"
@@ -27927,23 +27957,23 @@ var ProviderDialog = ({
27927
27957
  }
27928
27958
  )
27929
27959
  ] }),
27930
- phase === "apiKey" && /* @__PURE__ */ jsxs37(Box34, { flexDirection: "column", gap: 1, marginBottom: 1, children: [
27931
- /* @__PURE__ */ jsxs37(Box34, { gap: 1, children: [
27932
- /* @__PURE__ */ jsx43(Text40, { color: theme.ui.comment, children: "current" }),
27933
- isLocal ? /* @__PURE__ */ jsx43(Text40, { color: theme.text.accent, children: "no key required" }) : keyHint ? /* @__PURE__ */ jsx43(Text40, { color: theme.text.secondary, children: keyHint }) : /* @__PURE__ */ jsx43(Text40, { color: theme.ui.comment, dimColor: true, children: "not set" })
27960
+ phase === "apiKey" && /* @__PURE__ */ jsxs38(Box34, { flexDirection: "column", gap: 1, marginBottom: 1, children: [
27961
+ /* @__PURE__ */ jsxs38(Box34, { gap: 1, children: [
27962
+ /* @__PURE__ */ jsx43(Text41, { color: theme.ui.comment, children: "current" }),
27963
+ isLocal ? /* @__PURE__ */ jsx43(Text41, { color: theme.text.accent, children: "no key required" }) : keyHint ? /* @__PURE__ */ jsx43(Text41, { color: theme.text.secondary, children: keyHint }) : /* @__PURE__ */ jsx43(Text41, { color: theme.ui.comment, dimColor: true, children: "not set" })
27934
27964
  ] }),
27935
- /* @__PURE__ */ jsxs37(Box34, { gap: 1, children: [
27936
- /* @__PURE__ */ jsx43(Text40, { color: theme.ui.comment, children: "new key" }),
27937
- /* @__PURE__ */ jsx43(Box34, { borderStyle: "single", borderColor: theme.border.focused, paddingX: 1, children: /* @__PURE__ */ jsx43(Text40, { color: theme.text.accent, children: apiKeyInput.length > 0 ? maskApiKeyInput(apiKeyInput.length) : /* @__PURE__ */ jsx43(Text40, { color: theme.ui.comment, dimColor: true, children: "paste or type\u2026" }) }) })
27965
+ /* @__PURE__ */ jsxs38(Box34, { gap: 1, children: [
27966
+ /* @__PURE__ */ jsx43(Text41, { color: theme.ui.comment, children: "new key" }),
27967
+ /* @__PURE__ */ jsx43(Box34, { borderStyle: "single", borderColor: theme.border.focused, paddingX: 1, children: /* @__PURE__ */ jsx43(Text41, { color: theme.text.accent, children: apiKeyInput.length > 0 ? maskApiKeyInput(apiKeyInput.length) : /* @__PURE__ */ jsx43(Text41, { color: theme.ui.comment, dimColor: true, children: "paste or type\u2026" }) }) })
27938
27968
  ] })
27939
27969
  ] }),
27940
- status && /* @__PURE__ */ jsx43(Box34, { marginTop: 1, children: /* @__PURE__ */ jsx43(Text40, { color: statusColor2, children: status.text }) }),
27941
- phase === "actions" && testLatencyMs !== void 0 && /* @__PURE__ */ jsxs37(Box34, { marginTop: 0, gap: 1, children: [
27942
- /* @__PURE__ */ jsxs37(Text40, { color: getLatencyColor(testLatencyMs), bold: true, children: [
27970
+ status && /* @__PURE__ */ jsx43(Box34, { marginTop: 1, children: /* @__PURE__ */ jsx43(Text41, { color: statusColor2, children: status.text }) }),
27971
+ phase === "actions" && testLatencyMs !== void 0 && /* @__PURE__ */ jsxs38(Box34, { marginTop: 0, gap: 1, children: [
27972
+ /* @__PURE__ */ jsxs38(Text41, { color: getLatencyColor(testLatencyMs), bold: true, children: [
27943
27973
  testLatencyMs,
27944
27974
  "ms"
27945
27975
  ] }),
27946
- /* @__PURE__ */ jsx43(Text40, { color: theme.text.secondary, children: testLatencyMs < 300 ? "excellent" : testLatencyMs < 800 ? "good" : "slow" })
27976
+ /* @__PURE__ */ jsx43(Text41, { color: theme.text.secondary, children: testLatencyMs < 300 ? "excellent" : testLatencyMs < 800 ? "good" : "slow" })
27947
27977
  ] }),
27948
27978
  /* @__PURE__ */ jsx43(
27949
27979
  Box34,
@@ -27955,7 +27985,7 @@ var ProviderDialog = ({
27955
27985
  borderLeft: false,
27956
27986
  borderRight: false,
27957
27987
  borderColor: theme.ui.comment,
27958
- children: /* @__PURE__ */ jsxs37(Text40, { color: theme.ui.comment, dimColor: true, children: [
27988
+ children: /* @__PURE__ */ jsxs38(Text41, { color: theme.ui.comment, dimColor: true, children: [
27959
27989
  footer,
27960
27990
  phase === "actions" && " Test does not change the session."
27961
27991
  ] })
@@ -27984,7 +28014,7 @@ var PermissionsDialog = ({
27984
28014
  onSave,
27985
28015
  onClose
27986
28016
  }) => {
27987
- const [modes, setModes] = useState222(current);
28017
+ const [modes, setModes] = useState23(current);
27988
28018
  const dirty = useMemo12(
27989
28019
  () => PERMISSION_KEYS.some((key) => modes[key] !== current[key]),
27990
28020
  [modes, current]
@@ -28023,7 +28053,7 @@ var PermissionsDialog = ({
28023
28053
  [onClose]
28024
28054
  );
28025
28055
  useKeypress(handleEscape, { isActive: true });
28026
- return /* @__PURE__ */ jsxs38(
28056
+ return /* @__PURE__ */ jsxs39(
28027
28057
  Box35,
28028
28058
  {
28029
28059
  flexDirection: "column",
@@ -28033,9 +28063,9 @@ var PermissionsDialog = ({
28033
28063
  marginLeft: 2,
28034
28064
  marginRight: 2,
28035
28065
  children: [
28036
- /* @__PURE__ */ jsx44(Text41, { bold: true, color: theme.text.accent, children: "Permission policy" }),
28066
+ /* @__PURE__ */ jsx44(Text42, { bold: true, color: theme.text.accent, children: "Permission policy" }),
28037
28067
  /* @__PURE__ */ jsx44(RadioButtonSelect, { items, onSelect: handleSelect, isFocused: true, showNumbers: false }),
28038
- /* @__PURE__ */ jsx44(Text41, { color: theme.text.secondary, children: "\u2191\u2193 navigate \xB7 Enter cycles allow/ask/deny \xB7 Esc cancel" })
28068
+ /* @__PURE__ */ jsx44(Text42, { color: theme.text.secondary, children: "\u2191\u2193 navigate \xB7 Enter cycles allow/ask/deny \xB7 Esc cancel" })
28039
28069
  ]
28040
28070
  }
28041
28071
  );
@@ -28050,9 +28080,9 @@ var AuthDialog = ({
28050
28080
  onPersistToken,
28051
28081
  onClose
28052
28082
  }) => {
28053
- const [phase, setPhase] = useState23("menu");
28054
- const [deviceCode, setDeviceCode] = useState23(null);
28055
- const [message, setMessage] = useState23("");
28083
+ const [phase, setPhase] = useState24("menu");
28084
+ const [deviceCode, setDeviceCode] = useState24(null);
28085
+ const [message, setMessage] = useState24("");
28056
28086
  const abortRef = useRef14(null);
28057
28087
  const items = useMemo13(
28058
28088
  () => [
@@ -28128,7 +28158,7 @@ var AuthDialog = ({
28128
28158
  },
28129
28159
  [clearToken, onClose, startLogin]
28130
28160
  );
28131
- useEffect222(() => () => {
28161
+ useEffect23(() => () => {
28132
28162
  abortRef.current?.abort();
28133
28163
  }, []);
28134
28164
  const handleEscape = useCallback20(
@@ -28143,7 +28173,7 @@ var AuthDialog = ({
28143
28173
  [onClose, phase]
28144
28174
  );
28145
28175
  useKeypress(handleEscape, { isActive: true });
28146
- return /* @__PURE__ */ jsxs39(
28176
+ return /* @__PURE__ */ jsxs40(
28147
28177
  Box36,
28148
28178
  {
28149
28179
  flexDirection: "column",
@@ -28153,32 +28183,32 @@ var AuthDialog = ({
28153
28183
  marginLeft: 2,
28154
28184
  marginRight: 2,
28155
28185
  children: [
28156
- /* @__PURE__ */ jsx45(Text42, { bold: true, color: theme.text.accent, children: "GitHub authentication" }),
28157
- /* @__PURE__ */ jsx45(Text42, { color: theme.text.secondary, children: statusSummary }),
28186
+ /* @__PURE__ */ jsx45(Text43, { bold: true, color: theme.text.accent, children: "GitHub authentication" }),
28187
+ /* @__PURE__ */ jsx45(Text43, { color: theme.text.secondary, children: statusSummary }),
28158
28188
  phase === "menu" && /* @__PURE__ */ jsx45(RadioButtonSelect, { items, onSelect: handleSelect, isFocused: true, showNumbers: false }),
28159
- deviceCode && phase === "running" && /* @__PURE__ */ jsxs39(Box36, { flexDirection: "column", marginTop: 1, children: [
28160
- /* @__PURE__ */ jsxs39(Text42, { children: [
28189
+ deviceCode && phase === "running" && /* @__PURE__ */ jsxs40(Box36, { flexDirection: "column", marginTop: 1, children: [
28190
+ /* @__PURE__ */ jsxs40(Text43, { children: [
28161
28191
  "Open: ",
28162
- /* @__PURE__ */ jsx45(Text42, { color: theme.text.accent, children: deviceCode.verificationUri })
28192
+ /* @__PURE__ */ jsx45(Text43, { color: theme.text.accent, children: deviceCode.verificationUri })
28163
28193
  ] }),
28164
- /* @__PURE__ */ jsxs39(Text42, { children: [
28194
+ /* @__PURE__ */ jsxs40(Text43, { children: [
28165
28195
  "Code: ",
28166
- /* @__PURE__ */ jsx45(Text42, { bold: true, color: theme.text.accent, children: deviceCode.userCode })
28196
+ /* @__PURE__ */ jsx45(Text43, { bold: true, color: theme.text.accent, children: deviceCode.userCode })
28167
28197
  ] }),
28168
- /* @__PURE__ */ jsxs39(Text42, { color: theme.text.secondary, children: [
28198
+ /* @__PURE__ */ jsxs40(Text43, { color: theme.text.secondary, children: [
28169
28199
  "Expires in ",
28170
28200
  Math.round(deviceCode.expiresIn / 60),
28171
28201
  " minutes."
28172
28202
  ] })
28173
28203
  ] }),
28174
28204
  message && /* @__PURE__ */ jsx45(
28175
- Text42,
28205
+ Text43,
28176
28206
  {
28177
28207
  color: phase === "error" ? theme.status.error : phase === "done" ? theme.status.success : theme.text.secondary,
28178
28208
  children: message
28179
28209
  }
28180
28210
  ),
28181
- /* @__PURE__ */ jsx45(Text42, { color: theme.text.secondary, children: phase === "running" ? "Esc cancel login" : phase === "menu" ? "\u2191\u2193 navigate \xB7 Enter select \xB7 Esc close" : "Esc close" })
28211
+ /* @__PURE__ */ jsx45(Text43, { color: theme.text.secondary, children: phase === "running" ? "Esc cancel login" : phase === "menu" ? "\u2191\u2193 navigate \xB7 Enter select \xB7 Esc close" : "Esc close" })
28182
28212
  ]
28183
28213
  }
28184
28214
  );
@@ -28224,13 +28254,13 @@ var ModelDialog = ({
28224
28254
  onSelectModel,
28225
28255
  onClose
28226
28256
  }) => {
28227
- const [loadState, setLoadState] = useState24("loading");
28228
- const [models, setModels] = useState24([]);
28229
- const [errorMsg, setErrorMsg] = useState24("");
28230
- const [search, setSearch] = useState24("");
28231
- const [activeSelIndex, setActiveSelIndex] = useState24(0);
28257
+ const [loadState, setLoadState] = useState25("loading");
28258
+ const [models, setModels] = useState25([]);
28259
+ const [errorMsg, setErrorMsg] = useState25("");
28260
+ const [search, setSearch] = useState25("");
28261
+ const [activeSelIndex, setActiveSelIndex] = useState25(0);
28232
28262
  const abortRef = useRef15(null);
28233
- useEffect23(() => {
28263
+ useEffect24(() => {
28234
28264
  const ctrl = new AbortController();
28235
28265
  abortRef.current = ctrl;
28236
28266
  onFetchModels(currentProvider, ctrl.signal).then((fetched) => {
@@ -28250,7 +28280,7 @@ var ModelDialog = ({
28250
28280
  );
28251
28281
  const selectableCount = rows.filter((r) => r.kind === "item").length;
28252
28282
  const clampedIndex = Math.min(activeSelIndex, Math.max(0, selectableCount - 1));
28253
- useEffect23(() => {
28283
+ useEffect24(() => {
28254
28284
  setActiveSelIndex(0);
28255
28285
  }, [search]);
28256
28286
  const activeRowPos = useMemo14(
@@ -28305,7 +28335,7 @@ var ModelDialog = ({
28305
28335
  }, { isActive: true });
28306
28336
  const canScrollUp = scrollTop > 0;
28307
28337
  const canScrollDown = scrollTop + MAX_VISIBLE < rows.length;
28308
- return /* @__PURE__ */ jsxs40(
28338
+ return /* @__PURE__ */ jsxs41(
28309
28339
  Box37,
28310
28340
  {
28311
28341
  flexDirection: "column",
@@ -28317,15 +28347,15 @@ var ModelDialog = ({
28317
28347
  marginRight: 1,
28318
28348
  minWidth: 58,
28319
28349
  children: [
28320
- /* @__PURE__ */ jsxs40(Box37, { justifyContent: "space-between", marginBottom: 1, children: [
28321
- /* @__PURE__ */ jsxs40(Box37, { gap: 1, children: [
28322
- /* @__PURE__ */ jsx46(Text43, { bold: true, color: theme.text.primary, children: "Select model" }),
28323
- /* @__PURE__ */ jsx46(Text43, { color: theme.text.secondary, children: "for" }),
28324
- /* @__PURE__ */ jsx46(Text43, { color: theme.text.accent, children: currentProvider })
28350
+ /* @__PURE__ */ jsxs41(Box37, { justifyContent: "space-between", marginBottom: 1, children: [
28351
+ /* @__PURE__ */ jsxs41(Box37, { gap: 1, children: [
28352
+ /* @__PURE__ */ jsx46(Text44, { bold: true, color: theme.text.primary, children: "Select model" }),
28353
+ /* @__PURE__ */ jsx46(Text44, { color: theme.text.secondary, children: "for" }),
28354
+ /* @__PURE__ */ jsx46(Text44, { color: theme.text.accent, children: currentProvider })
28325
28355
  ] }),
28326
- /* @__PURE__ */ jsx46(Text43, { color: theme.ui.comment, dimColor: true, children: "esc" })
28356
+ /* @__PURE__ */ jsx46(Text44, { color: theme.ui.comment, dimColor: true, children: "esc" })
28327
28357
  ] }),
28328
- /* @__PURE__ */ jsxs40(
28358
+ /* @__PURE__ */ jsxs41(
28329
28359
  Box37,
28330
28360
  {
28331
28361
  borderStyle: "single",
@@ -28333,57 +28363,57 @@ var ModelDialog = ({
28333
28363
  paddingX: 1,
28334
28364
  marginBottom: 1,
28335
28365
  children: [
28336
- /* @__PURE__ */ jsx46(Text43, { color: theme.ui.comment, children: "\u2315 " }),
28337
- search ? /* @__PURE__ */ jsxs40(Text43, { color: theme.text.primary, children: [
28366
+ /* @__PURE__ */ jsx46(Text44, { color: theme.ui.comment, children: "\u2315 " }),
28367
+ search ? /* @__PURE__ */ jsxs41(Text44, { color: theme.text.primary, children: [
28338
28368
  search,
28339
- /* @__PURE__ */ jsx46(Text43, { color: theme.text.accent, children: "\u258C" })
28340
- ] }) : /* @__PURE__ */ jsxs40(Text43, { color: theme.ui.comment, dimColor: true, children: [
28369
+ /* @__PURE__ */ jsx46(Text44, { color: theme.text.accent, children: "\u258C" })
28370
+ ] }) : /* @__PURE__ */ jsxs41(Text44, { color: theme.ui.comment, dimColor: true, children: [
28341
28371
  "Search",
28342
- /* @__PURE__ */ jsx46(Text43, { color: theme.text.accent, children: "\u258C" })
28372
+ /* @__PURE__ */ jsx46(Text44, { color: theme.text.accent, children: "\u258C" })
28343
28373
  ] })
28344
28374
  ]
28345
28375
  }
28346
28376
  ),
28347
- loadState === "loading" && /* @__PURE__ */ jsx46(Box37, { marginY: 1, children: /* @__PURE__ */ jsx46(Text43, { color: theme.text.secondary, children: "Loading models\u2026" }) }),
28348
- loadState === "error" && /* @__PURE__ */ jsxs40(Box37, { flexDirection: "column", marginY: 1, children: [
28349
- /* @__PURE__ */ jsx46(Text43, { color: theme.status.error, children: "\u2717 Could not load models" }),
28350
- /* @__PURE__ */ jsx46(Text43, { color: theme.ui.comment, dimColor: true, children: errorMsg })
28377
+ loadState === "loading" && /* @__PURE__ */ jsx46(Box37, { marginY: 1, children: /* @__PURE__ */ jsx46(Text44, { color: theme.text.secondary, children: "Loading models\u2026" }) }),
28378
+ loadState === "error" && /* @__PURE__ */ jsxs41(Box37, { flexDirection: "column", marginY: 1, children: [
28379
+ /* @__PURE__ */ jsx46(Text44, { color: theme.status.error, children: "\u2717 Could not load models" }),
28380
+ /* @__PURE__ */ jsx46(Text44, { color: theme.ui.comment, dimColor: true, children: errorMsg })
28351
28381
  ] }),
28352
- loadState === "ready" && selectableCount === 0 && /* @__PURE__ */ jsx46(Box37, { marginY: 1, children: /* @__PURE__ */ jsxs40(Text43, { color: theme.ui.comment, dimColor: true, children: [
28382
+ loadState === "ready" && selectableCount === 0 && /* @__PURE__ */ jsx46(Box37, { marginY: 1, children: /* @__PURE__ */ jsxs41(Text44, { color: theme.ui.comment, dimColor: true, children: [
28353
28383
  'No models match "',
28354
28384
  search,
28355
28385
  '"'
28356
28386
  ] }) }),
28357
- loadState === "ready" && selectableCount > 0 && /* @__PURE__ */ jsxs40(Box37, { flexDirection: "column", children: [
28358
- canScrollUp && /* @__PURE__ */ jsx46(Text43, { color: theme.ui.comment, dimColor: true, children: " \u2191" }),
28387
+ loadState === "ready" && selectableCount > 0 && /* @__PURE__ */ jsxs41(Box37, { flexDirection: "column", children: [
28388
+ canScrollUp && /* @__PURE__ */ jsx46(Text44, { color: theme.ui.comment, dimColor: true, children: " \u2191" }),
28359
28389
  visibleRows.map((row, i) => {
28360
28390
  if (row.kind === "header") {
28361
- return /* @__PURE__ */ jsx46(Box37, { marginTop: i === 0 ? 0 : 1, children: /* @__PURE__ */ jsx46(Text43, { color: theme.text.accent, bold: true, children: row.label }) }, `h${i}`);
28391
+ return /* @__PURE__ */ jsx46(Box37, { marginTop: i === 0 ? 0 : 1, children: /* @__PURE__ */ jsx46(Text44, { color: theme.text.accent, bold: true, children: row.label }) }, `h${i}`);
28362
28392
  }
28363
28393
  const { model, selIndex } = row;
28364
28394
  const isActive = selIndex === clampedIndex;
28365
28395
  const isCurrent = model.id === currentModel;
28366
28396
  const free = isFree(model);
28367
28397
  const group = providerGroup(model);
28368
- return /* @__PURE__ */ jsxs40(Box37, { gap: 1, children: [
28369
- /* @__PURE__ */ jsx46(Text43, { color: isActive ? theme.text.accent : theme.ui.comment, children: isCurrent ? "\u25CF" : isActive ? "\u203A" : " " }),
28370
- /* @__PURE__ */ jsxs40(Box37, { flexGrow: 1, gap: 1, children: [
28398
+ return /* @__PURE__ */ jsxs41(Box37, { gap: 1, children: [
28399
+ /* @__PURE__ */ jsx46(Text44, { color: isActive ? theme.text.accent : theme.ui.comment, children: isCurrent ? "\u25CF" : isActive ? "\u203A" : " " }),
28400
+ /* @__PURE__ */ jsxs41(Box37, { flexGrow: 1, gap: 1, children: [
28371
28401
  /* @__PURE__ */ jsx46(
28372
- Text43,
28402
+ Text44,
28373
28403
  {
28374
28404
  color: isActive ? theme.text.primary : theme.text.secondary,
28375
28405
  bold: isActive,
28376
28406
  children: model.name
28377
28407
  }
28378
28408
  ),
28379
- /* @__PURE__ */ jsx46(Text43, { color: theme.text.accent, dimColor: true, children: group })
28409
+ /* @__PURE__ */ jsx46(Text44, { color: theme.text.accent, dimColor: true, children: group })
28380
28410
  ] }),
28381
- free && /* @__PURE__ */ jsx46(Text43, { color: theme.status.success, dimColor: !isActive, children: "Free" })
28411
+ free && /* @__PURE__ */ jsx46(Text44, { color: theme.status.success, dimColor: !isActive, children: "Free" })
28382
28412
  ] }, model.id);
28383
28413
  }),
28384
- canScrollDown && /* @__PURE__ */ jsx46(Text43, { color: theme.ui.comment, dimColor: true, children: " \u2193" })
28414
+ canScrollDown && /* @__PURE__ */ jsx46(Text44, { color: theme.ui.comment, dimColor: true, children: " \u2193" })
28385
28415
  ] }),
28386
- loadState === "ready" && /* @__PURE__ */ jsx46(Box37, { marginTop: 1, children: /* @__PURE__ */ jsxs40(Text43, { color: theme.ui.comment, dimColor: true, children: [
28416
+ loadState === "ready" && /* @__PURE__ */ jsx46(Box37, { marginTop: 1, children: /* @__PURE__ */ jsxs41(Text44, { color: theme.ui.comment, dimColor: true, children: [
28387
28417
  selectableCount,
28388
28418
  " model",
28389
28419
  selectableCount !== 1 ? "s" : "",
@@ -28399,7 +28429,7 @@ var ModelDialog = ({
28399
28429
  borderLeft: false,
28400
28430
  borderRight: false,
28401
28431
  borderColor: theme.ui.comment,
28402
- children: /* @__PURE__ */ jsx46(Text43, { color: theme.ui.comment, dimColor: true, children: "\u2191\u2193 navigate type to search Enter use for session Esc close" })
28432
+ children: /* @__PURE__ */ jsx46(Text44, { color: theme.ui.comment, dimColor: true, children: "\u2191\u2193 navigate type to search Enter use for session Esc close" })
28403
28433
  }
28404
28434
  )
28405
28435
  ]
@@ -28537,50 +28567,52 @@ function resolveSlashInvocation(rawInput, commands) {
28537
28567
  var AppContainer = ({ cwd, config, provider, model }) => {
28538
28568
  const historyManager = useHistory();
28539
28569
  const addHistoryItem = historyManager.addItem;
28540
- const [initError, setInitError] = useState25(null);
28541
- const [isInitializing, setIsInitializing] = useState25(true);
28542
- const [isRunning, setIsRunning] = useState25(false);
28543
- const [pendingAssistantText, setPendingAssistantText] = useState25("");
28544
- const [approvalQueue, setApprovalQueue] = useState25([]);
28545
- const [providerLabel, setProviderLabel] = useState25("(unconfigured)");
28546
- const [targetSource, setTargetSource] = useState25("config");
28547
- const [currentModel, setCurrentModel] = useState25("(unconfigured)");
28548
- const [agentMode, setAgentMode] = useState25("build");
28549
- const [streamingState, setStreamingState] = useState25(
28570
+ const [initError, setInitError] = useState26(null);
28571
+ const [isInitializing, setIsInitializing] = useState26(true);
28572
+ const [isRunning, setIsRunning] = useState26(false);
28573
+ const [pendingAssistantText, setPendingAssistantText] = useState26("");
28574
+ const [approvalQueue, setApprovalQueue] = useState26([]);
28575
+ const [providerLabel, setProviderLabel] = useState26("(unconfigured)");
28576
+ const [targetSource, setTargetSource] = useState26("config");
28577
+ const [currentModel, setCurrentModel] = useState26("(unconfigured)");
28578
+ const [agentMode, setAgentMode] = useState26("build");
28579
+ const [streamingState, setStreamingState] = useState26(
28550
28580
  "idle"
28551
28581
  /* Idle */
28552
28582
  );
28553
- const [compactMode, setCompactMode] = useState25(false);
28554
- const [shellModeActive, setShellModeActive] = useState25(false);
28555
- const [showEscapePrompt, setShowEscapePrompt] = useState25(false);
28556
- const [messageQueue, setMessageQueue] = useState25([]);
28557
- const [historyRemountKey, setHistoryRemountKey] = useState25(0);
28558
- const [pendingItem, setPendingItem] = useState25(null);
28559
- const [isFeedbackDialogOpen, setIsFeedbackDialogOpen] = useState25(false);
28560
- const [lastPromptTokenCount, setLastPromptTokenCount] = useState25(0);
28561
- const [lastOutputTokenCount, setLastOutputTokenCount] = useState25(0);
28562
- const [elapsedTime, setElapsedTime] = useState25(0);
28563
- const [isReceivingContent, setIsReceivingContent] = useState25(false);
28564
- const [iterationInfo, setIterationInfo] = useState25(null);
28565
- const [liveToolCalls, setLiveToolCalls] = useState25([]);
28566
- const [taskPlan, setTaskPlan] = useState25(null);
28567
- const [taskStreams, setTaskStreams] = useState25({});
28568
- const [recentSlashCommandsState, setRecentSlashCommandsState] = useState25(/* @__PURE__ */ new Map());
28569
- const [activeDialog, setActiveDialog] = useState25(null);
28570
- const [themeName, setThemeName] = useState25("(unknown)");
28571
- const [permissionSummary, setPermissionSummary] = useState25("(unknown)");
28572
- const [authSummary, setAuthSummary] = useState25("(unknown)");
28573
- const [permissionModes, setPermissionModes] = useState25({
28583
+ const [compactMode, setCompactMode] = useState26(false);
28584
+ const [shellModeActive, setShellModeActive] = useState26(false);
28585
+ const [showEscapePrompt, setShowEscapePrompt] = useState26(false);
28586
+ const [messageQueue, setMessageQueue] = useState26([]);
28587
+ const [historyRemountKey, setHistoryRemountKey] = useState26(0);
28588
+ const [pendingItem, setPendingItem] = useState26(null);
28589
+ const [isFeedbackDialogOpen, setIsFeedbackDialogOpen] = useState26(false);
28590
+ const [lastPromptTokenCount, setLastPromptTokenCount] = useState26(0);
28591
+ const [lastOutputTokenCount, setLastOutputTokenCount] = useState26(0);
28592
+ const [elapsedTime, setElapsedTime] = useState26(0);
28593
+ const [isReceivingContent, setIsReceivingContent] = useState26(false);
28594
+ const [iterationInfo, setIterationInfo] = useState26(null);
28595
+ const [liveToolCalls, setLiveToolCalls] = useState26([]);
28596
+ const [taskPlan, setTaskPlan] = useState26(null);
28597
+ const [taskStreams, setTaskStreams] = useState26({});
28598
+ const [recentSlashCommandsState, setRecentSlashCommandsState] = useState26(/* @__PURE__ */ new Map());
28599
+ const [activeDialog, setActiveDialog] = useState26(null);
28600
+ const [themeName, setThemeName] = useState26("(unknown)");
28601
+ const [permissionSummary, setPermissionSummary] = useState26("(unknown)");
28602
+ const [authSummary, setAuthSummary] = useState26("(unknown)");
28603
+ const [permissionModes, setPermissionModes] = useState26({
28574
28604
  read: "allow",
28575
28605
  write: "ask",
28576
28606
  gitLocal: "allow",
28577
28607
  shell: "ask",
28578
28608
  dangerous: "ask"
28579
28609
  });
28580
- const [providerConfigVersion, setProviderConfigVersion] = useState25(0);
28581
- const [, setThemeVersion] = useState25(0);
28582
- const [, setDrainTick] = useState25(0);
28583
- const [pendingCommandConfirmation, setPendingCommandConfirmation] = useState25(null);
28610
+ const [providerConfigVersion, setProviderConfigVersion] = useState26(0);
28611
+ const [, setThemeVersion] = useState26(0);
28612
+ const [mcpConnected, setMcpConnected] = useState26(0);
28613
+ const [mcpTotal, setMcpTotal] = useState26(0);
28614
+ const [, setDrainTick] = useState26(0);
28615
+ const [pendingCommandConfirmation, setPendingCommandConfirmation] = useState26(null);
28584
28616
  const runtimeRef = useRef16(null);
28585
28617
  const sessionRef = useRef16(null);
28586
28618
  const configAdapterRef = useRef16(null);
@@ -28761,10 +28793,10 @@ var AppContainer = ({ cwd, config, provider, model }) => {
28761
28793
  }),
28762
28794
  [configAdapter, historyManager, pendingItem, sessionCommandServices]
28763
28795
  );
28764
- useEffect24(() => {
28796
+ useEffect25(() => {
28765
28797
  messageQueueRef.current = messageQueue;
28766
28798
  }, [messageQueue]);
28767
- useEffect24(() => {
28799
+ useEffect25(() => {
28768
28800
  if (approvalQueue.length > 0) {
28769
28801
  setStreamingState(
28770
28802
  "waiting_for_confirmation"
@@ -28784,7 +28816,7 @@ var AppContainer = ({ cwd, config, provider, model }) => {
28784
28816
  /* Idle */
28785
28817
  );
28786
28818
  }, [approvalQueue.length, isRunning]);
28787
- useEffect24(() => {
28819
+ useEffect25(() => {
28788
28820
  if (!isRunning) {
28789
28821
  runStartedAtRef.current = null;
28790
28822
  setElapsedTime(0);
@@ -28800,7 +28832,7 @@ var AppContainer = ({ cwd, config, provider, model }) => {
28800
28832
  }, 250);
28801
28833
  return () => clearInterval(interval);
28802
28834
  }, [isRunning]);
28803
- useEffect24(() => {
28835
+ useEffect25(() => {
28804
28836
  let mounted = true;
28805
28837
  const initialize = async () => {
28806
28838
  try {
@@ -28833,6 +28865,8 @@ var AppContainer = ({ cwd, config, provider, model }) => {
28833
28865
  setTargetSource(provider || model ? "cli" : "config");
28834
28866
  setCurrentModel(session.model ?? "(unconfigured)");
28835
28867
  setProviderLabel(formatProviderLabel(session.provider, session.model));
28868
+ setMcpConnected(runtime.mcp.connectedCount);
28869
+ setMcpTotal(runtime.config.mcpServers.length);
28836
28870
  const unsubscribers = [];
28837
28871
  unsubscribers.push(
28838
28872
  runtime.events.on("approval:request", (request) => {
@@ -29538,7 +29572,7 @@ var AppContainer = ({ cwd, config, provider, model }) => {
29538
29572
  );
29539
29573
  const closeDialog = useCallback22(() => setActiveDialog(null), []);
29540
29574
  const previewTheme = useCallback22(() => setThemeVersion((version) => version + 1), []);
29541
- useEffect24(() => {
29575
+ useEffect25(() => {
29542
29576
  if (drainingQueueRef.current || isRunning || isInitializing || Boolean(initError) || approvalQueue.length > 0 || messageQueue.length === 0) {
29543
29577
  return;
29544
29578
  }
@@ -29716,8 +29750,9 @@ var AppContainer = ({ cwd, config, provider, model }) => {
29716
29750
  isProviderDialogOpen: activeDialog === "provider",
29717
29751
  isPermissionsDialogOpen: activeDialog === "permissions",
29718
29752
  isFeedbackDialogOpen,
29719
- showAutoAcceptIndicator: "default"
29720
- /* DEFAULT */
29753
+ showAutoAcceptIndicator: "default",
29754
+ mcpConnected,
29755
+ mcpTotal
29721
29756
  }),
29722
29757
  [
29723
29758
  approvalQueue.length,
@@ -29739,6 +29774,8 @@ var AppContainer = ({ cwd, config, provider, model }) => {
29739
29774
  lastOutputTokenCount,
29740
29775
  lastPromptTokenCount,
29741
29776
  mainAreaWidth,
29777
+ mcpConnected,
29778
+ mcpTotal,
29742
29779
  messageQueue,
29743
29780
  pendingCommandConfirmation,
29744
29781
  pendingGeminiHistoryItems,
@@ -29754,37 +29791,37 @@ var AppContainer = ({ cwd, config, provider, model }) => {
29754
29791
  userMessages
29755
29792
  ]
29756
29793
  );
29757
- return /* @__PURE__ */ jsx47(CompactModeProvider, { value: { compactMode }, children: /* @__PURE__ */ jsx47(ConfigContext.Provider, { value: configAdapter, children: /* @__PURE__ */ jsx47(SettingsContext.Provider, { value: loadedSettings, children: /* @__PURE__ */ jsx47(StreamingContext.Provider, { value: streamingState, children: /* @__PURE__ */ jsx47(VimModeProvider, { initialVimEnabled: loadedSettings.merged.general?.vimMode ?? false, children: /* @__PURE__ */ jsx47(KeypressProvider, { kittyProtocolEnabled: false, config: configAdapter, children: /* @__PURE__ */ jsx47(ShellFocusContext.Provider, { value: true, children: /* @__PURE__ */ jsx47(AgentViewProvider, { children: /* @__PURE__ */ jsx47(BackgroundTaskViewProvider, { children: /* @__PURE__ */ jsx47(UIStateContext.Provider, { value: uiState, children: /* @__PURE__ */ jsx47(UIActionsContext.Provider, { value: uiActions, children: /* @__PURE__ */ jsxs41(Box38, { flexDirection: "column", flexGrow: 1, children: [
29758
- /* @__PURE__ */ jsxs41(Box38, { marginLeft: 2, marginRight: 2, marginTop: 1, marginBottom: 1, children: [
29759
- /* @__PURE__ */ jsx47(Text44, { bold: true, color: theme.text.accent, children: "DeepCode" }),
29760
- /* @__PURE__ */ jsx47(Text44, { color: theme.text.secondary, children: " Target: " }),
29761
- /* @__PURE__ */ jsx47(Text44, { color: theme.text.primary, children: providerLabel }),
29762
- /* @__PURE__ */ jsxs41(Text44, { color: theme.text.secondary, children: [
29794
+ return /* @__PURE__ */ jsx47(CompactModeProvider, { value: { compactMode }, children: /* @__PURE__ */ jsx47(ConfigContext.Provider, { value: configAdapter, children: /* @__PURE__ */ jsx47(SettingsContext.Provider, { value: loadedSettings, children: /* @__PURE__ */ jsx47(StreamingContext.Provider, { value: streamingState, children: /* @__PURE__ */ jsx47(VimModeProvider, { initialVimEnabled: loadedSettings.merged.general?.vimMode ?? false, children: /* @__PURE__ */ jsx47(KeypressProvider, { kittyProtocolEnabled: false, config: configAdapter, children: /* @__PURE__ */ jsx47(ShellFocusContext.Provider, { value: true, children: /* @__PURE__ */ jsx47(AgentViewProvider, { children: /* @__PURE__ */ jsx47(BackgroundTaskViewProvider, { children: /* @__PURE__ */ jsx47(UIStateContext.Provider, { value: uiState, children: /* @__PURE__ */ jsx47(UIActionsContext.Provider, { value: uiActions, children: /* @__PURE__ */ jsxs42(Box38, { flexDirection: "column", flexGrow: 1, children: [
29795
+ /* @__PURE__ */ jsxs42(Box38, { marginLeft: 2, marginRight: 2, marginTop: 1, marginBottom: 1, children: [
29796
+ /* @__PURE__ */ jsx47(Text45, { bold: true, color: theme.text.accent, children: "DeepCode" }),
29797
+ /* @__PURE__ */ jsx47(Text45, { color: theme.text.secondary, children: " Target: " }),
29798
+ /* @__PURE__ */ jsx47(Text45, { color: theme.text.primary, children: providerLabel }),
29799
+ /* @__PURE__ */ jsxs42(Text45, { color: theme.text.secondary, children: [
29763
29800
  " (",
29764
29801
  targetSource,
29765
29802
  ")"
29766
29803
  ] }),
29767
- /* @__PURE__ */ jsx47(Text44, { color: theme.text.secondary, children: " Mode: " }),
29804
+ /* @__PURE__ */ jsx47(Text45, { color: theme.text.secondary, children: " Mode: " }),
29768
29805
  /* @__PURE__ */ jsx47(
29769
- Text44,
29806
+ Text45,
29770
29807
  {
29771
29808
  bold: true,
29772
29809
  color: agentMode === "build" ? theme.status.success : theme.status.warning,
29773
29810
  children: agentMode.toUpperCase()
29774
29811
  }
29775
29812
  ),
29776
- /* @__PURE__ */ jsxs41(Text44, { color: theme.text.secondary, children: [
29813
+ /* @__PURE__ */ jsxs42(Text45, { color: theme.text.secondary, children: [
29777
29814
  " ",
29778
29815
  streamingState === "responding" ? "running" : streamingState === "waiting_for_confirmation" ? "waiting-approval" : "idle"
29779
29816
  ] }),
29780
- iterationInfo && /* @__PURE__ */ jsxs41(Text44, { color: theme.text.secondary, children: [
29817
+ iterationInfo && /* @__PURE__ */ jsxs42(Text45, { color: theme.text.secondary, children: [
29781
29818
  " ",
29782
29819
  "iter ",
29783
29820
  iterationInfo.round,
29784
29821
  "/",
29785
29822
  iterationInfo.max
29786
29823
  ] }),
29787
- lastPromptTokenCount > 0 && /* @__PURE__ */ jsxs41(Text44, { color: theme.text.secondary, children: [
29824
+ lastPromptTokenCount > 0 && /* @__PURE__ */ jsxs42(Text45, { color: theme.text.secondary, children: [
29788
29825
  " ",
29789
29826
  "\u2191",
29790
29827
  formatTokenCount(lastPromptTokenCount),
@@ -29792,7 +29829,7 @@ var AppContainer = ({ cwd, config, provider, model }) => {
29792
29829
  formatTokenCount(lastOutputTokenCount)
29793
29830
  ] })
29794
29831
  ] }),
29795
- initError ? /* @__PURE__ */ jsx47(Box38, { marginLeft: 2, marginRight: 2, children: /* @__PURE__ */ jsxs41(Text44, { color: theme.status.error, children: [
29832
+ initError ? /* @__PURE__ */ jsx47(Box38, { marginLeft: 2, marginRight: 2, children: /* @__PURE__ */ jsxs42(Text45, { color: theme.status.error, children: [
29796
29833
  "Failed to initialize runtime: ",
29797
29834
  initError
29798
29835
  ] }) }) : /* @__PURE__ */ jsx47(
@@ -29979,22 +30016,22 @@ function formatAuthSummary(config) {
29979
30016
  var ApprovalPrompt = ({ request }) => {
29980
30017
  if (!request) return null;
29981
30018
  const operationLabel = formatApprovalOperationLabel(request);
29982
- return /* @__PURE__ */ jsxs41(Box38, { flexDirection: "column", marginTop: 1, children: [
29983
- /* @__PURE__ */ jsxs41(Text44, { color: theme.status.warning, children: [
30019
+ return /* @__PURE__ */ jsxs42(Box38, { flexDirection: "column", marginTop: 1, children: [
30020
+ /* @__PURE__ */ jsxs42(Text45, { color: theme.status.warning, children: [
29984
30021
  "\u26A0 Allow ",
29985
30022
  operationLabel,
29986
30023
  "?"
29987
30024
  ] }),
29988
- request.path && /* @__PURE__ */ jsxs41(Text44, { color: theme.text.secondary, children: [
30025
+ request.path && /* @__PURE__ */ jsxs42(Text45, { color: theme.text.secondary, children: [
29989
30026
  " ",
29990
30027
  request.path
29991
30028
  ] }),
29992
- request.preview?.command && /* @__PURE__ */ jsxs41(Text44, { color: theme.text.secondary, children: [
30029
+ request.preview?.command && /* @__PURE__ */ jsxs42(Text45, { color: theme.text.secondary, children: [
29993
30030
  " $ ",
29994
30031
  request.preview.command,
29995
30032
  request.preview.args?.length ? ` ${request.preview.args.join(" ")}` : ""
29996
30033
  ] }),
29997
- /* @__PURE__ */ jsx47(Text44, { color: theme.text.secondary, children: " [\u21B5/y] once [s] session [a] always [n] deny" })
30034
+ /* @__PURE__ */ jsx47(Text45, { color: theme.text.secondary, children: " [\u21B5/y] once [s] session [a] always [n] deny" })
29998
30035
  ] });
29999
30036
  };
30000
30037
  function formatApprovalOperationLabel(request) {