@proxysoul/soulforge 2.20.17 → 2.20.19

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
@@ -72638,7 +72638,7 @@ var package_default;
72638
72638
  var init_package = __esm(() => {
72639
72639
  package_default = {
72640
72640
  name: "@proxysoul/soulforge",
72641
- version: "2.20.17",
72641
+ version: "2.20.19",
72642
72642
  description: "Graph-powered code intelligence \u2014 multi-agent coding with codebase-aware AI",
72643
72643
  repository: {
72644
72644
  type: "git",
@@ -119682,6 +119682,7 @@ var init_types2 = __esm(() => {
119682
119682
  ".scala": "scala",
119683
119683
  ".sc": "scala",
119684
119684
  ".lua": "lua",
119685
+ ".luau": "lua",
119685
119686
  ".ex": "elixir",
119686
119687
  ".exs": "elixir",
119687
119688
  ".dart": "dart",
@@ -119959,7 +119960,10 @@ var init_server_registry = __esm(() => {
119959
119960
  ],
119960
119961
  go: [{ command: "gopls", args: ["serve"] }],
119961
119962
  rust: [{ command: "rust-analyzer", args: [] }],
119962
- lua: [{ command: "lua-language-server", args: [] }],
119963
+ lua: [
119964
+ { command: "lua-language-server", args: [] },
119965
+ { command: "luau-lsp", args: ["lsp"] }
119966
+ ],
119963
119967
  c: [{ command: "clangd", args: [] }],
119964
119968
  cpp: [{ command: "clangd", args: [] }],
119965
119969
  ruby: [{ command: "solargraph", args: ["stdio"] }],
@@ -403971,6 +403975,67 @@ function flushEmergencySession() {
403971
403975
  }
403972
403976
  var _snapshot = null;
403973
403977
 
403978
+ // src/core/terminal/resize-handler.ts
403979
+ function setupTerminalResize(r) {
403980
+ r.addInputHandler((sequence) => {
403981
+ const m2 = sequence.match(/^\x1b\[48;(\d+);(\d+)(?:;\d+;\d+)?t$/);
403982
+ if (!m2?.[1] || !m2[2])
403983
+ return false;
403984
+ const rows = Number.parseInt(m2[1], 10);
403985
+ const cols = Number.parseInt(m2[2], 10);
403986
+ if (rows > 0 && cols > 0)
403987
+ r.resize(cols, rows);
403988
+ return true;
403989
+ });
403990
+ if (process.stdout.isTTY) {
403991
+ process.stdout.write("\x1B[?2048h");
403992
+ }
403993
+ const onResize = () => {
403994
+ const cols = process.stdout.columns;
403995
+ const rows = process.stdout.rows;
403996
+ if (!cols || !rows)
403997
+ return;
403998
+ if (cols !== r.terminalWidth || rows !== r.terminalHeight) {
403999
+ r.resize(cols, rows);
404000
+ }
404001
+ };
404002
+ process.stdout.on("resize", onResize);
404003
+ const onSigwinch = () => {
404004
+ setTimeout(() => {
404005
+ const cols = process.stdout.columns;
404006
+ const rows = process.stdout.rows;
404007
+ if (!cols || !rows)
404008
+ return;
404009
+ if (cols !== r.terminalWidth || rows !== r.terminalHeight) {
404010
+ r.resize(cols, rows);
404011
+ }
404012
+ }, 50);
404013
+ };
404014
+ process.on("SIGWINCH", onSigwinch);
404015
+ const resizePoll = setInterval(() => {
404016
+ try {
404017
+ const cols = process.stdout.columns;
404018
+ const rows = process.stdout.rows;
404019
+ if (!cols || !rows)
404020
+ return;
404021
+ if (cols !== r.terminalWidth || rows !== r.terminalHeight) {
404022
+ r.resize(cols, rows);
404023
+ }
404024
+ } catch {}
404025
+ }, 1000);
404026
+ resizePoll.unref?.();
404027
+ return () => {
404028
+ process.stdout.removeListener("resize", onResize);
404029
+ process.removeListener("SIGWINCH", onSigwinch);
404030
+ clearInterval(resizePoll);
404031
+ if (process.stdout.isTTY) {
404032
+ try {
404033
+ process.stdout.write("\x1B[?2048l");
404034
+ } catch {}
404035
+ }
404036
+ };
404037
+ }
404038
+
403974
404039
  // src/stores/statusbar.ts
403975
404040
  import { execFile as execFile2 } from "child_process";
403976
404041
  function matchCopilotPricing(model) {
@@ -405173,29 +405238,7 @@ async function start2(opts) {
405173
405238
  r.setMaxListeners(30);
405174
405239
  r.keyInput.setMaxListeners(30);
405175
405240
  if (process.stdout.isTTY) {
405176
- r.addInputHandler((sequence) => {
405177
- const m2 = sequence.match(/^\x1b\[48;(\d+);(\d+)(?:;\d+;\d+)?t$/);
405178
- if (!m2?.[1] || !m2[2])
405179
- return false;
405180
- const rows = Number.parseInt(m2[1], 10);
405181
- const cols = Number.parseInt(m2[2], 10);
405182
- if (rows > 0 && cols > 0)
405183
- r.resize(cols, rows);
405184
- return true;
405185
- });
405186
- process.stdout.write("\x1B[?2048h");
405187
- const resizePoll = setInterval(() => {
405188
- try {
405189
- const cols = process.stdout.columns;
405190
- const rows = process.stdout.rows;
405191
- if (!cols || !rows)
405192
- return;
405193
- if (cols !== r.terminalWidth || rows !== r.terminalHeight) {
405194
- r.resize(cols, rows);
405195
- }
405196
- } catch {}
405197
- }, 1000);
405198
- resizePoll.unref?.();
405241
+ setupTerminalResize(r);
405199
405242
  }
405200
405243
  {
405201
405244
  const { extend: extend3 } = await init_react2().then(() => exports_react);
@@ -496586,12 +496629,84 @@ var init_CommandPalette = __esm(async () => {
496586
496629
  };
496587
496630
  });
496588
496631
 
496632
+ // src/hooks/useMarqueeScroll.ts
496633
+ function tickMarquee(state, maxPos, pauseTicks) {
496634
+ if (state.endPause > 0) {
496635
+ const nextEndPause = state.endPause - 1;
496636
+ return {
496637
+ scrollPos: nextEndPause === 0 ? 0 : state.scrollPos,
496638
+ startPause: state.startPause,
496639
+ endPause: nextEndPause
496640
+ };
496641
+ }
496642
+ if (state.scrollPos === 0 && state.startPause > 0) {
496643
+ return {
496644
+ scrollPos: 0,
496645
+ startPause: state.startPause - 1,
496646
+ endPause: 0
496647
+ };
496648
+ }
496649
+ if (state.scrollPos >= maxPos) {
496650
+ return {
496651
+ scrollPos: state.scrollPos,
496652
+ startPause: pauseTicks,
496653
+ endPause: pauseTicks
496654
+ };
496655
+ }
496656
+ return {
496657
+ scrollPos: state.scrollPos + 1,
496658
+ startPause: state.startPause,
496659
+ endPause: state.endPause
496660
+ };
496661
+ }
496662
+ function getMarqueeDisplayText(text4, maxWidth, active, scrollPos) {
496663
+ if (maxWidth <= 0) {
496664
+ return "";
496665
+ }
496666
+ if (active && text4.length > maxWidth) {
496667
+ return text4.slice(scrollPos, scrollPos + maxWidth);
496668
+ }
496669
+ if (text4.length > maxWidth) {
496670
+ return `${text4.slice(0, maxWidth - 1)}\u2026`;
496671
+ }
496672
+ return text4;
496673
+ }
496674
+ function useMarqueeScroll(text4, maxWidth, active) {
496675
+ const [scrollPos, setScrollPos] = import_react103.useState(0);
496676
+ const stateRef = import_react103.useRef({ scrollPos: 0, startPause: PAUSE_TICKS, endPause: 0 });
496677
+ import_react103.useEffect(() => {
496678
+ if (maxWidth <= 0) {
496679
+ stateRef.current = { scrollPos: 0, startPause: PAUSE_TICKS, endPause: 0 };
496680
+ setScrollPos(0);
496681
+ return;
496682
+ }
496683
+ if (!active || text4.length <= maxWidth) {
496684
+ stateRef.current = { scrollPos: 0, startPause: PAUSE_TICKS, endPause: 0 };
496685
+ setScrollPos(0);
496686
+ return;
496687
+ }
496688
+ stateRef.current = { scrollPos: 0, startPause: PAUSE_TICKS, endPause: 0 };
496689
+ const maxPos = text4.length - maxWidth;
496690
+ const timer = setInterval(() => {
496691
+ const next = tickMarquee(stateRef.current, maxPos, PAUSE_TICKS);
496692
+ stateRef.current = next;
496693
+ setScrollPos(next.scrollPos);
496694
+ }, SCROLL_INTERVAL);
496695
+ return () => clearInterval(timer);
496696
+ }, [active, text4, maxWidth]);
496697
+ return getMarqueeDisplayText(text4, maxWidth, active, scrollPos);
496698
+ }
496699
+ var import_react103, SCROLL_INTERVAL = 100, PAUSE_TICKS = 10;
496700
+ var init_useMarqueeScroll = __esm(() => {
496701
+ import_react103 = __toESM(require_react(), 1);
496702
+ });
496703
+
496589
496704
  // src/components/modals/CommandPicker.tsx
496590
496705
  import { TextAttributes as TextAttributes21 } from "@opentui/core";
496591
496706
  function useListScroll(maxVisible) {
496592
- const [cursor3, setCursor] = import_react104.useState(0);
496593
- const [scrollOffset, setScrollOffset] = import_react104.useState(0);
496594
- const adjustScroll = import_react104.useCallback((nextCursor) => {
496707
+ const [cursor3, setCursor] = import_react105.useState(0);
496708
+ const [scrollOffset, setScrollOffset] = import_react105.useState(0);
496709
+ const adjustScroll = import_react105.useCallback((nextCursor) => {
496595
496710
  setScrollOffset((prev) => {
496596
496711
  let next = prev;
496597
496712
  if (nextCursor < prev)
@@ -496643,6 +496758,9 @@ function OptionRow2({
496643
496758
  textFaint,
496644
496759
  successColor
496645
496760
  }) {
496761
+ const descMaxWidth = innerW - 10;
496762
+ const descActive = isActive && option2.disabled !== true && option2.kind !== "separator";
496763
+ const descText = useMarqueeScroll(option2.description ?? "", descMaxWidth, descActive);
496646
496764
  if (option2.kind === "separator") {
496647
496765
  return /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("box", {
496648
496766
  flexDirection: "row",
@@ -496705,7 +496823,7 @@ function OptionRow2({
496705
496823
  children: [
496706
496824
  " ",
496707
496825
  option2.icon ? " " : "",
496708
- option2.description.length > innerW - 10 ? `${option2.description.slice(0, innerW - 13)}\u2026` : option2.description
496826
+ descText
496709
496827
  ]
496710
496828
  }, undefined, true, undefined, this)
496711
496829
  }, undefined, false, undefined, this)
@@ -496723,12 +496841,12 @@ function CommandPicker({ visible, config: config2, onClose }) {
496723
496841
  const extraChrome = controlRows > 0 ? controlRows + 1 : 0;
496724
496842
  const maxVisible = Math.max(4, Math.floor(containerRows * 0.8) - CHROME_ROWS2 - extraChrome);
496725
496843
  const { cursor: cursor3, setCursor, scrollOffset, setScrollOffset, adjustScroll } = useListScroll(maxVisible);
496726
- const [scope, setScope] = import_react104.useState("project");
496727
- const [search, setSearch] = import_react104.useState("");
496728
- const [toggleState, setToggleState] = import_react104.useState({});
496729
- const [toggleLabels, setToggleLabels] = import_react104.useState({});
496730
- const [selectorState, setSelectorState] = import_react104.useState({});
496731
- const [focusZone, setFocusZone] = import_react104.useState(ZONE_LIST);
496844
+ const [scope, setScope] = import_react105.useState("project");
496845
+ const [search, setSearch] = import_react105.useState("");
496846
+ const [toggleState, setToggleState] = import_react105.useState({});
496847
+ const [toggleLabels, setToggleLabels] = import_react105.useState({});
496848
+ const [selectorState, setSelectorState] = import_react105.useState({});
496849
+ const [focusZone, setFocusZone] = import_react105.useState(ZONE_LIST);
496732
496850
  const controls = (() => {
496733
496851
  const list = [];
496734
496852
  if (config2?.toggles)
@@ -496752,9 +496870,9 @@ function CommandPicker({ visible, config: config2, onClose }) {
496752
496870
  scored.sort((a4, b6) => b6.score - a4.score);
496753
496871
  return scored.map((s2) => s2.option);
496754
496872
  })();
496755
- const prevVisibleRef = import_react104.useRef(false);
496756
- const prevOptionsRef = import_react104.useRef(null);
496757
- import_react104.useEffect(() => {
496873
+ const prevVisibleRef = import_react105.useRef(false);
496874
+ const prevOptionsRef = import_react105.useRef(null);
496875
+ import_react105.useEffect(() => {
496758
496876
  if (!visible || !config2) {
496759
496877
  prevVisibleRef.current = visible;
496760
496878
  prevOptionsRef.current = null;
@@ -496805,8 +496923,8 @@ function CommandPicker({ visible, config: config2, onClose }) {
496805
496923
  }
496806
496924
  prevOptionsRef.current = filteredOptions;
496807
496925
  }, [visible, config2, filteredOptions, setCursor, setScrollOffset, maxVisible]);
496808
- const prevSearch = import_react104.useRef("");
496809
- import_react104.useEffect(() => {
496926
+ const prevSearch = import_react105.useRef("");
496927
+ import_react105.useEffect(() => {
496810
496928
  if (!config2?.searchable)
496811
496929
  return;
496812
496930
  if (search !== prevSearch.current) {
@@ -496817,8 +496935,8 @@ function CommandPicker({ visible, config: config2, onClose }) {
496817
496935
  }
496818
496936
  }
496819
496937
  }, [search, config2?.searchable, setCursor, setScrollOffset]);
496820
- const prevCursorValue = import_react104.useRef(null);
496821
- import_react104.useEffect(() => {
496938
+ const prevCursorValue = import_react105.useRef(null);
496939
+ import_react105.useEffect(() => {
496822
496940
  if (!visible || !config2?.onCursorChange)
496823
496941
  return;
496824
496942
  const val = filteredOptions[cursor3]?.value;
@@ -497215,16 +497333,17 @@ function CommandPicker({ visible, config: config2, onClose }) {
497215
497333
  ]
497216
497334
  }, undefined, true, undefined, this);
497217
497335
  }
497218
- var import_react104, MAX_POPUP_WIDTH2 = 60, CHROME_ROWS2 = 7, ZONE_LIST = -1;
497336
+ var import_react105, MAX_POPUP_WIDTH2 = 60, CHROME_ROWS2 = 7, ZONE_LIST = -1;
497219
497337
  var init_CommandPicker = __esm(async () => {
497220
497338
  init_theme();
497339
+ init_useMarqueeScroll();
497221
497340
  init_jsx_dev_runtime();
497222
497341
  await __promiseAll([
497223
497342
  init_react2(),
497224
497343
  init_shared(),
497225
497344
  init_ui2()
497226
497345
  ]);
497227
- import_react104 = __toESM(require_react(), 1);
497346
+ import_react105 = __toESM(require_react(), 1);
497228
497347
  });
497229
497348
 
497230
497349
  // src/components/modals/DiagnosePopup.tsx
@@ -497289,19 +497408,19 @@ function buildLines(result, running, spinnerCh, t2) {
497289
497408
  function DiagnosePopup({ visible, onClose, runHealthCheck }) {
497290
497409
  const t2 = useTheme();
497291
497410
  const { width: tw2, height: th } = useTerminalDimensions();
497292
- const [result, setResult] = import_react106.useState(null);
497293
- const [running, setRunning] = import_react106.useState(false);
497294
- const [err2, setErr] = import_react106.useState(null);
497295
- const [cursor3, setCursor] = import_react106.useState(0);
497296
- const scrollRef = import_react106.useRef(null);
497411
+ const [result, setResult] = import_react107.useState(null);
497412
+ const [running, setRunning] = import_react107.useState(false);
497413
+ const [err2, setErr] = import_react107.useState(null);
497414
+ const [cursor3, setCursor] = import_react107.useState(0);
497415
+ const scrollRef = import_react107.useRef(null);
497297
497416
  const spinnerRef = useSpinnerFrameRef();
497298
497417
  const spinnerCh = SPINNER_FRAMES[spinnerRef.current % SPINNER_FRAMES.length] ?? "\u280B";
497299
497418
  const popupW = Math.min(80, Math.max(56, Math.floor(tw2 * 0.65)));
497300
497419
  const popupH = Math.min(30, Math.max(16, th - 4));
497301
497420
  const contentW = popupW - 4;
497302
497421
  const viewportRows = Math.max(6, popupH - 9);
497303
- const lines = import_react106.useMemo(() => result ? buildLines(result, running, spinnerCh, t2) : [], [result, running, spinnerCh, t2]);
497304
- const run3 = import_react106.useCallback(() => {
497422
+ const lines = import_react107.useMemo(() => result ? buildLines(result, running, spinnerCh, t2) : [], [result, running, spinnerCh, t2]);
497423
+ const run3 = import_react107.useCallback(() => {
497305
497424
  setRunning(true);
497306
497425
  setErr(null);
497307
497426
  setResult(null);
@@ -497324,7 +497443,7 @@ function DiagnosePopup({ visible, onClose, runHealthCheck }) {
497324
497443
  setErr(ex instanceof Error ? ex.message : String(ex));
497325
497444
  });
497326
497445
  }, [runHealthCheck]);
497327
- import_react106.useEffect(() => {
497446
+ import_react107.useEffect(() => {
497328
497447
  if (visible)
497329
497448
  run3();
497330
497449
  }, [visible, run3]);
@@ -497411,7 +497530,7 @@ function DiagnosePopup({ visible, onClose, runHealthCheck }) {
497411
497530
  }, undefined, false, undefined, this)
497412
497531
  }, undefined, false, undefined, this);
497413
497532
  }
497414
- var import_react106;
497533
+ var import_react107;
497415
497534
  var init_DiagnosePopup = __esm(async () => {
497416
497535
  init_theme();
497417
497536
  init_scroll();
@@ -497421,7 +497540,7 @@ var init_DiagnosePopup = __esm(async () => {
497421
497540
  init_shared(),
497422
497541
  init_ui2()
497423
497542
  ]);
497424
- import_react106 = __toESM(require_react(), 1);
497543
+ import_react107 = __toESM(require_react(), 1);
497425
497544
  });
497426
497545
 
497427
497546
  // src/components/modals/wizard/data.ts
@@ -497902,14 +498021,14 @@ var init_primitives = __esm(async () => {
497902
498021
  });
497903
498022
 
497904
498023
  // src/components/modals/wizard/steps/AutomationStep.tsx
497905
- var import_react107, AutomationStep;
498024
+ var import_react108, AutomationStep;
497906
498025
  var init_AutomationStep = __esm(async () => {
497907
498026
  init_icons();
497908
498027
  init_data();
497909
498028
  init_jsx_dev_runtime();
497910
498029
  await init_primitives();
497911
- import_react107 = __toESM(require_react(), 1);
497912
- AutomationStep = import_react107.memo(function AutomationStep2() {
498030
+ import_react108 = __toESM(require_react(), 1);
498031
+ AutomationStep = import_react108.memo(function AutomationStep2() {
497913
498032
  return /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(FeatureList, {
497914
498033
  heading: "Automation \u2014 scale without friction",
497915
498034
  headerIcon: icon("dispatch"),
@@ -497920,14 +498039,14 @@ var init_AutomationStep = __esm(async () => {
497920
498039
  });
497921
498040
 
497922
498041
  // src/components/modals/wizard/steps/EditingStep.tsx
497923
- var import_react108, EditingStep;
498042
+ var import_react109, EditingStep;
497924
498043
  var init_EditingStep = __esm(async () => {
497925
498044
  init_icons();
497926
498045
  init_data();
497927
498046
  init_jsx_dev_runtime();
497928
498047
  await init_primitives();
497929
- import_react108 = __toESM(require_react(), 1);
497930
- EditingStep = import_react108.memo(function EditingStep2() {
498048
+ import_react109 = __toESM(require_react(), 1);
498049
+ EditingStep = import_react109.memo(function EditingStep2() {
497931
498050
  return /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(FeatureList, {
497932
498051
  heading: "Editing \u2014 by symbol, not by string",
497933
498052
  headerIcon: icon("morph"),
@@ -497938,14 +498057,14 @@ var init_EditingStep = __esm(async () => {
497938
498057
  });
497939
498058
 
497940
498059
  // src/components/modals/wizard/steps/IntelligenceStep.tsx
497941
- var import_react109, IntelligenceStep;
498060
+ var import_react110, IntelligenceStep;
497942
498061
  var init_IntelligenceStep = __esm(async () => {
497943
498062
  init_icons();
497944
498063
  init_data();
497945
498064
  init_jsx_dev_runtime();
497946
498065
  await init_primitives();
497947
- import_react109 = __toESM(require_react(), 1);
497948
- IntelligenceStep = import_react109.memo(function IntelligenceStep2() {
498066
+ import_react110 = __toESM(require_react(), 1);
498067
+ IntelligenceStep = import_react110.memo(function IntelligenceStep2() {
497949
498068
  return /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(FeatureList, {
497950
498069
  heading: "Codebase Intelligence",
497951
498070
  headerIcon: icon("brain"),
@@ -497956,14 +498075,14 @@ var init_IntelligenceStep = __esm(async () => {
497956
498075
  });
497957
498076
 
497958
498077
  // src/components/modals/wizard/steps/ModesStep.tsx
497959
- var import_react110, ModesStep;
498078
+ var import_react111, ModesStep;
497960
498079
  var init_ModesStep = __esm(async () => {
497961
498080
  init_icons();
497962
498081
  init_data();
497963
498082
  init_jsx_dev_runtime();
497964
498083
  await init_primitives();
497965
- import_react110 = __toESM(require_react(), 1);
497966
- ModesStep = import_react110.memo(function ModesStep2() {
498084
+ import_react111 = __toESM(require_react(), 1);
498085
+ ModesStep = import_react111.memo(function ModesStep2() {
497967
498086
  return /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(FeatureList, {
497968
498087
  heading: "Modes \u2014 how Forge approaches work",
497969
498088
  headerIcon: icon("plan"),
@@ -497974,7 +498093,7 @@ var init_ModesStep = __esm(async () => {
497974
498093
  });
497975
498094
 
497976
498095
  // src/components/modals/wizard/steps/ReadyStep.tsx
497977
- var import_react111, ReadyStep;
498096
+ var import_react112, ReadyStep;
497978
498097
  var init_ReadyStep = __esm(async () => {
497979
498098
  init_icons();
497980
498099
  init_theme();
@@ -497982,8 +498101,8 @@ var init_ReadyStep = __esm(async () => {
497982
498101
  init_theme2();
497983
498102
  init_jsx_dev_runtime();
497984
498103
  await init_ui2();
497985
- import_react111 = __toESM(require_react(), 1);
497986
- ReadyStep = import_react111.memo(function ReadyStep2() {
498104
+ import_react112 = __toESM(require_react(), 1);
498105
+ ReadyStep = import_react112.memo(function ReadyStep2() {
497987
498106
  const t2 = useTheme();
497988
498107
  return /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("box", {
497989
498108
  flexDirection: "column",
@@ -498129,14 +498248,14 @@ var init_ReadyStep = __esm(async () => {
498129
498248
  });
498130
498249
 
498131
498250
  // src/components/modals/wizard/steps/RemoteStep.tsx
498132
- var import_react112, RemoteStep;
498251
+ var import_react113, RemoteStep;
498133
498252
  var init_RemoteStep = __esm(async () => {
498134
498253
  init_icons();
498135
498254
  init_data();
498136
498255
  init_jsx_dev_runtime();
498137
498256
  await init_primitives();
498138
- import_react112 = __toESM(require_react(), 1);
498139
- RemoteStep = import_react112.memo(function RemoteStep2() {
498257
+ import_react113 = __toESM(require_react(), 1);
498258
+ RemoteStep = import_react113.memo(function RemoteStep2() {
498140
498259
  return /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(FeatureList, {
498141
498260
  heading: "MCP, Skills & Remote",
498142
498261
  headerIcon: icon("plug"),
@@ -498170,15 +498289,22 @@ function fuzzyMatch3(query2, target) {
498170
498289
  function ProviderRow({
498171
498290
  p: p4,
498172
498291
  isSelected,
498173
- autoAvailable
498292
+ autoAvailable,
498293
+ width
498174
498294
  }) {
498175
498295
  const t2 = useTheme();
498176
498296
  const bg = isSelected ? t2.bgPopupHighlight : t2.bgPopup;
498177
498297
  const configured = hasKey(p4.id);
498178
498298
  const tag = getStatusTag(p4.id);
498299
+ const tagText = configured ? ` \u2713 ${tag}` : autoAvailable ? " \u2713 auto" : "";
498300
+ const fixed = 6 + p4.label.length + 3 + tagText.length;
498301
+ const descBudget = width - 4 - fixed;
498302
+ const showDesc = descBudget > 1;
498303
+ const desc = showDesc && descBudget < p4.desc.length ? `${p4.desc.slice(0, Math.max(0, descBudget - 1))}\u2026` : p4.desc;
498179
498304
  return /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("box", {
498180
498305
  flexDirection: "row",
498181
498306
  paddingX: 2,
498307
+ height: 1,
498182
498308
  backgroundColor: bg,
498183
498309
  children: /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("text", {
498184
498310
  bg,
@@ -498196,13 +498322,13 @@ function ProviderRow({
498196
498322
  attributes: BOLD15,
498197
498323
  children: p4.label
498198
498324
  }, undefined, false, undefined, this),
498199
- /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("span", {
498325
+ showDesc ? /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("span", {
498200
498326
  fg: t2.textFaint,
498201
498327
  children: [
498202
498328
  " \u2014 ",
498203
- p4.desc
498329
+ desc
498204
498330
  ]
498205
- }, undefined, true, undefined, this),
498331
+ }, undefined, true, undefined, this) : null,
498206
498332
  configured ? /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("span", {
498207
498333
  fg: t2.success,
498208
498334
  children: [
@@ -498258,23 +498384,26 @@ function SetupStep({
498258
498384
  {
498259
498385
  const t2 = useTheme();
498260
498386
  const renderer2 = useRenderer();
498261
- const [phase, setPhase] = import_react114.useState("provider");
498262
- const [cursor3, setCursor] = import_react114.useState(0);
498263
- const [selectedProvider, setSelectedProvider] = import_react114.useState(null);
498264
- const [keyInput, setKeyInput] = import_react114.useState("");
498265
- const [allModels, setAllModels] = import_react114.useState([]);
498266
- const [searchQuery, setSearchQuery] = import_react114.useState("");
498267
- const [modelCursor, setModelCursor] = import_react114.useState(0);
498268
- const [flash, setFlash] = import_react114.useState(null);
498269
- const [errorMsg, setErrorMsg] = import_react114.useState("");
498270
- const [spinnerFrame, setSpinnerFrame] = import_react114.useState(0);
498271
- const [tick, setTick] = import_react114.useState(0);
498272
- const [autoAvailMap, setAutoAvailMap] = import_react114.useState({});
498273
- const spinnerRef = import_react114.useRef(null);
498387
+ const { height: termRows } = useTerminalDimensions();
498388
+ const [phase, setPhase] = import_react115.useState("provider");
498389
+ const [cursor3, setCursor] = import_react115.useState(0);
498390
+ const [selectedProvider, setSelectedProvider] = import_react115.useState(null);
498391
+ const [keyInput, setKeyInput] = import_react115.useState("");
498392
+ const [allModels, setAllModels] = import_react115.useState([]);
498393
+ const [searchQuery, setSearchQuery] = import_react115.useState("");
498394
+ const [modelCursor, setModelCursor] = import_react115.useState(0);
498395
+ const [flash, setFlash] = import_react115.useState(null);
498396
+ const [errorMsg, setErrorMsg] = import_react115.useState("");
498397
+ const [spinnerFrame, setSpinnerFrame] = import_react115.useState(0);
498398
+ const [tick, setTick] = import_react115.useState(0);
498399
+ const [autoAvailMap, setAutoAvailMap] = import_react115.useState({});
498400
+ const spinnerRef = import_react115.useRef(null);
498274
498401
  const inputWidth = Math.min(Math.floor(iw * 0.8), 60);
498402
+ const maxH = Math.max(24, Math.floor(termRows * 0.7));
498403
+ const maxVisibleProviders = Math.max(4, maxH - PROVIDER_CHROME_ROWS);
498275
498404
  const refresh = () => setTick((n2) => n2 + 1);
498276
498405
  const anyKeySet = PROVIDERS.some((p4) => hasKey(p4.id)) || Object.values(autoAvailMap).some(Boolean);
498277
- import_react114.useEffect(() => {
498406
+ import_react115.useEffect(() => {
498278
498407
  for (const p4 of PROVIDERS) {
498279
498408
  if (!p4.autoDetect)
498280
498409
  continue;
@@ -498287,10 +498416,10 @@ function SetupStep({
498287
498416
  }
498288
498417
  }, []);
498289
498418
  const isInputPhase = phase !== "provider";
498290
- import_react114.useEffect(() => {
498419
+ import_react115.useEffect(() => {
498291
498420
  setActive(isInputPhase);
498292
498421
  }, [isInputPhase, setActive]);
498293
- import_react114.useEffect(() => {
498422
+ import_react115.useEffect(() => {
498294
498423
  if (phase !== "key")
498295
498424
  return;
498296
498425
  const handler4 = (event) => {
@@ -498303,7 +498432,7 @@ function SetupStep({
498303
498432
  renderer2.keyInput.off("paste", handler4);
498304
498433
  };
498305
498434
  }, [phase, renderer2]);
498306
- import_react114.useEffect(() => {
498435
+ import_react115.useEffect(() => {
498307
498436
  if (phase === "fetching") {
498308
498437
  spinnerRef.current = setInterval(() => setSpinnerFrame((f3) => (f3 + 1) % SPINNER_FRAMES2.length), 80);
498309
498438
  return () => {
@@ -498317,12 +498446,12 @@ function SetupStep({
498317
498446
  }
498318
498447
  return;
498319
498448
  }, [phase]);
498320
- import_react114.useEffect(() => {
498449
+ import_react115.useEffect(() => {
498321
498450
  setPhase("provider");
498322
498451
  setCursor(0);
498323
498452
  }, []);
498324
498453
  const filteredModels = searchQuery ? allModels.filter((m6) => fuzzyMatch3(searchQuery, m6.name) || fuzzyMatch3(searchQuery, m6.group ?? "")) : allModels;
498325
- import_react114.useEffect(() => {
498454
+ import_react115.useEffect(() => {
498326
498455
  if (modelCursor >= filteredModels.length) {
498327
498456
  setModelCursor(Math.max(0, filteredModels.length - 1));
498328
498457
  }
@@ -498674,11 +498803,19 @@ function SetupStep({
498674
498803
  children: " Select a provider and press \u23CE to set up."
498675
498804
  }, undefined, false, undefined, this),
498676
498805
  /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(VSpacer, {}, undefined, false, undefined, this),
498677
- PROVIDERS.map((p4, i5) => /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(ProviderRow, {
498678
- p: p4,
498679
- isSelected: i5 === cursor3,
498680
- autoAvailable: p4.autoDetect ? autoAvailMap[p4.id] : undefined
498681
- }, p4.id, false, undefined, this)),
498806
+ /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(VirtualList, {
498807
+ items: PROVIDERS,
498808
+ selectedIndex: cursor3,
498809
+ width: iw,
498810
+ maxRows: maxVisibleProviders,
498811
+ keyExtractor: (p4) => p4.id,
498812
+ renderItem: (p4, { selected }) => /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(ProviderRow, {
498813
+ p: p4,
498814
+ isSelected: selected,
498815
+ autoAvailable: p4.autoDetect ? autoAvailMap[p4.id] : undefined,
498816
+ width: iw
498817
+ }, undefined, false, undefined, this)
498818
+ }, undefined, false, undefined, this),
498682
498819
  PROVIDERS[cursor3]?.providerId === "copilot" ? /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(import_jsx_dev_runtime2.Fragment, {
498683
498820
  children: [
498684
498821
  /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(VSpacer, {}, undefined, false, undefined, this),
@@ -498760,7 +498897,7 @@ function SetupStep({
498760
498897
  }, undefined, true, undefined, this);
498761
498898
  }
498762
498899
  }
498763
- var import_react114, GATEWAY_REF = "https://llmgateway.io/dashboard?ref=6tjJR2H3X4E9RmVQiQwK", URL_OVERRIDES, PROVIDERS, SPINNER_FRAMES2;
498900
+ var import_react115, GATEWAY_REF = "https://llmgateway.io/dashboard?ref=6tjJR2H3X4E9RmVQiQwK", URL_OVERRIDES, PROVIDERS, SPINNER_FRAMES2, PROVIDER_CHROME_ROWS = 13;
498764
498901
  var init_SetupStep = __esm(async () => {
498765
498902
  init_models();
498766
498903
  init_providers();
@@ -498773,7 +498910,7 @@ var init_SetupStep = __esm(async () => {
498773
498910
  init_ui2(),
498774
498911
  init_primitives()
498775
498912
  ]);
498776
- import_react114 = __toESM(require_react(), 1);
498913
+ import_react115 = __toESM(require_react(), 1);
498777
498914
  URL_OVERRIDES = {
498778
498915
  llmgateway: GATEWAY_REF
498779
498916
  };
@@ -498790,7 +498927,7 @@ var init_SetupStep = __esm(async () => {
498790
498927
  });
498791
498928
 
498792
498929
  // src/components/modals/wizard/steps/ShortcutsStep.tsx
498793
- var import_react115, ShortcutsStep;
498930
+ var import_react116, ShortcutsStep;
498794
498931
  var init_ShortcutsStep = __esm(async () => {
498795
498932
  init_icons();
498796
498933
  init_theme();
@@ -498798,8 +498935,8 @@ var init_ShortcutsStep = __esm(async () => {
498798
498935
  init_theme2();
498799
498936
  init_jsx_dev_runtime();
498800
498937
  await init_ui2();
498801
- import_react115 = __toESM(require_react(), 1);
498802
- ShortcutsStep = import_react115.memo(function ShortcutsStep2() {
498938
+ import_react116 = __toESM(require_react(), 1);
498939
+ ShortcutsStep = import_react116.memo(function ShortcutsStep2() {
498803
498940
  const t2 = useTheme();
498804
498941
  return /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("box", {
498805
498942
  flexDirection: "column",
@@ -498901,21 +499038,21 @@ function ThemeStep({ iw, setActive }) {
498901
499038
  const t2 = useTheme();
498902
499039
  const popupBg = t2.bgPopup;
498903
499040
  const popupHl = t2.bgPopupHighlight;
498904
- const themes = import_react117.useMemo(() => listThemes(), []);
499041
+ const themes = import_react118.useMemo(() => listThemes(), []);
498905
499042
  const currentName = useThemeStore((s2) => s2.name);
498906
499043
  const isTransparent = useThemeStore((s2) => s2.tokens.bgApp === "transparent");
498907
- const cfg = import_react117.useMemo(() => loadConfig(), []);
498908
- const [msgOpacity, setMsgOpacity] = import_react117.useState(() => typeof cfg.theme?.userMessageOpacity === "number" ? cfg.theme.userMessageOpacity : 100);
498909
- const [diffOpacity, setDiffOpacity] = import_react117.useState(() => typeof cfg.theme?.diffOpacity === "number" ? cfg.theme.diffOpacity : 100);
498910
- const [borderStr, setBorderStr] = import_react117.useState(() => cfg.theme?.borderStrength ?? "default");
499044
+ const cfg = import_react118.useMemo(() => loadConfig(), []);
499045
+ const [msgOpacity, setMsgOpacity] = import_react118.useState(() => typeof cfg.theme?.userMessageOpacity === "number" ? cfg.theme.userMessageOpacity : 100);
499046
+ const [diffOpacity, setDiffOpacity] = import_react118.useState(() => typeof cfg.theme?.diffOpacity === "number" ? cfg.theme.diffOpacity : 100);
499047
+ const [borderStr, setBorderStr] = import_react118.useState(() => cfg.theme?.borderStrength ?? "default");
498911
499048
  const { height: termRows } = useTerminalDimensions();
498912
499049
  const maxH = Math.max(24, Math.floor(termRows * 0.7));
498913
499050
  const maxVisible = Math.max(4, maxH - CHROME_ROWS3);
498914
- const [cursor3, setCursor] = import_react117.useState(0);
498915
- const applyAll = import_react117.useCallback((name30, tp, mOp, dOp, bdr) => {
499051
+ const [cursor3, setCursor] = import_react118.useState(0);
499052
+ const applyAll = import_react118.useCallback((name30, tp, mOp, dOp, bdr) => {
498916
499053
  applyTheme(name30, tp, { userMessageOpacity: mOp, diffOpacity: dOp, borderStrength: bdr });
498917
499054
  }, []);
498918
- const saveAll = import_react117.useCallback((name30, tp, mOp, dOp, bdr) => {
499055
+ const saveAll = import_react118.useCallback((name30, tp, mOp, dOp, bdr) => {
498919
499056
  saveGlobalConfig({
498920
499057
  theme: {
498921
499058
  name: name30,
@@ -498926,12 +499063,12 @@ function ThemeStep({ iw, setActive }) {
498926
499063
  }
498927
499064
  });
498928
499065
  }, []);
498929
- import_react117.useEffect(() => {
499066
+ import_react118.useEffect(() => {
498930
499067
  const idx = themes.findIndex((th) => th.id === currentName);
498931
499068
  if (idx >= 0)
498932
499069
  setCursor(idx);
498933
499070
  }, [currentName, themes]);
498934
- import_react117.useEffect(() => {
499071
+ import_react118.useEffect(() => {
498935
499072
  setActive(false);
498936
499073
  }, [setActive]);
498937
499074
  useKeyboard((evt) => {
@@ -499165,7 +499302,7 @@ function OptionRow3({
499165
499302
  ]
499166
499303
  }, undefined, true, undefined, this);
499167
499304
  }
499168
- var import_react117, OPACITY_LEVELS2, OPACITY_LABELS, BORDER_OPTIONS, BORDER_LABELS, CHROME_ROWS3 = 16;
499305
+ var import_react118, OPACITY_LEVELS2, OPACITY_LABELS, BORDER_OPTIONS, BORDER_LABELS, CHROME_ROWS3 = 16;
499169
499306
  var init_ThemeStep = __esm(async () => {
499170
499307
  init_config2();
499171
499308
  init_theme();
@@ -499176,7 +499313,7 @@ var init_ThemeStep = __esm(async () => {
499176
499313
  init_ui2(),
499177
499314
  init_primitives()
499178
499315
  ]);
499179
- import_react117 = __toESM(require_react(), 1);
499316
+ import_react118 = __toESM(require_react(), 1);
499180
499317
  OPACITY_LEVELS2 = [0, 30, 70, 100];
499181
499318
  OPACITY_LABELS = ["Clear", "Dim", "Subtle", "Solid"];
499182
499319
  BORDER_OPTIONS = ["default", "strong", "op"];
@@ -499185,10 +499322,10 @@ var init_ThemeStep = __esm(async () => {
499185
499322
 
499186
499323
  // src/components/modals/wizard/steps/WelcomeStep.tsx
499187
499324
  function useTypewriter(text4, ms) {
499188
- const [len, setLen] = import_react118.useState(0);
499189
- const [cursorOn, setCursorOn] = import_react118.useState(true);
499190
- const timer = import_react118.useRef(undefined);
499191
- import_react118.useEffect(() => {
499325
+ const [len, setLen] = import_react119.useState(0);
499326
+ const [cursorOn, setCursorOn] = import_react119.useState(true);
499327
+ const timer = import_react119.useRef(undefined);
499328
+ import_react119.useEffect(() => {
499192
499329
  let i5 = 0;
499193
499330
  const tick = () => {
499194
499331
  if (i5 < text4.length) {
@@ -499217,7 +499354,7 @@ function useTypewriter(text4, ms) {
499217
499354
  }, [text4, ms]);
499218
499355
  return { typed: text4.slice(0, len), cursorOn };
499219
499356
  }
499220
- var import_react118, WelcomeStep;
499357
+ var import_react119, WelcomeStep;
499221
499358
  var init_WelcomeStep = __esm(async () => {
499222
499359
  init_icons();
499223
499360
  init_theme();
@@ -499225,8 +499362,8 @@ var init_WelcomeStep = __esm(async () => {
499225
499362
  init_theme2();
499226
499363
  init_jsx_dev_runtime();
499227
499364
  await init_ui2();
499228
- import_react118 = __toESM(require_react(), 1);
499229
- WelcomeStep = import_react118.memo(function WelcomeStep2() {
499365
+ import_react119 = __toESM(require_react(), 1);
499366
+ WelcomeStep = import_react119.memo(function WelcomeStep2() {
499230
499367
  const t2 = useTheme();
499231
499368
  const { typed, cursorOn } = useTypewriter(WELCOME_TITLE, TYPEWRITER_MS);
499232
499369
  const smithy = icon("smithy");
@@ -499342,14 +499479,14 @@ var init_WelcomeStep = __esm(async () => {
499342
499479
  });
499343
499480
 
499344
499481
  // src/components/modals/wizard/steps/WorkflowStep.tsx
499345
- var import_react119, WorkflowStep;
499482
+ var import_react120, WorkflowStep;
499346
499483
  var init_WorkflowStep = __esm(async () => {
499347
499484
  init_icons();
499348
499485
  init_data();
499349
499486
  init_jsx_dev_runtime();
499350
499487
  await init_primitives();
499351
- import_react119 = __toESM(require_react(), 1);
499352
- WorkflowStep = import_react119.memo(function WorkflowStep2() {
499488
+ import_react120 = __toESM(require_react(), 1);
499489
+ WorkflowStep = import_react120.memo(function WorkflowStep2() {
499353
499490
  return /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV(FeatureList, {
499354
499491
  heading: "Tabs, Sessions & Git",
499355
499492
  headerIcon: icon("tabs"),
@@ -499364,12 +499501,12 @@ function FirstRunWizard({ visible, hasModel, activeModel, onSelectModel, onClose
499364
499501
  const { width: termCols, height: termRows } = useTerminalDimensions();
499365
499502
  const pw = Math.min(MAX_W, Math.floor(termCols * 0.92));
499366
499503
  const contentW = pw - SIDEBAR_W - 3;
499367
- const [stepIdx, setStepIdx] = import_react121.useState(0);
499504
+ const [stepIdx, setStepIdx] = import_react122.useState(0);
499368
499505
  const step = STEPS[stepIdx] ?? "welcome";
499369
- const [inputLocked, setInputLocked] = import_react121.useState(false);
499370
- const [visited, setVisited] = import_react121.useState(() => new Set([0]));
499371
- const hasOpened = import_react121.useRef(false);
499372
- import_react121.useEffect(() => {
499506
+ const [inputLocked, setInputLocked] = import_react122.useState(false);
499507
+ const [visited, setVisited] = import_react122.useState(() => new Set([0]));
499508
+ const hasOpened = import_react122.useRef(false);
499509
+ import_react122.useEffect(() => {
499373
499510
  if (!visible)
499374
499511
  return;
499375
499512
  if (!hasOpened.current) {
@@ -499379,7 +499516,7 @@ function FirstRunWizard({ visible, hasModel, activeModel, onSelectModel, onClose
499379
499516
  }
499380
499517
  setInputLocked(false);
499381
499518
  }, [visible]);
499382
- import_react121.useEffect(() => {
499519
+ import_react122.useEffect(() => {
499383
499520
  setVisited((v3) => {
499384
499521
  if (v3.has(stepIdx))
499385
499522
  return v3;
@@ -499426,7 +499563,7 @@ function FirstRunWizard({ visible, hasModel, activeModel, onSelectModel, onClose
499426
499563
  evt.preventDefault();
499427
499564
  };
499428
499565
  useKeyboard(handleKeyboard);
499429
- const tabs = import_react121.useMemo(() => STEPS.map((s2, i5) => ({
499566
+ const tabs = import_react122.useMemo(() => STEPS.map((s2, i5) => ({
499430
499567
  id: s2,
499431
499568
  label: STEP_LABELS[s2],
499432
499569
  icon: STEP_ICONS[s2],
@@ -499485,7 +499622,7 @@ function FirstRunWizard({ visible, hasModel, activeModel, onSelectModel, onClose
499485
499622
  }, undefined, true, undefined, this)
499486
499623
  }, undefined, false, undefined, this);
499487
499624
  }
499488
- var import_react121;
499625
+ var import_react122;
499489
499626
  var init_wizard2 = __esm(async () => {
499490
499627
  init_data();
499491
499628
  init_jsx_dev_runtime();
@@ -499504,7 +499641,7 @@ var init_wizard2 = __esm(async () => {
499504
499641
  init_WelcomeStep(),
499505
499642
  init_WorkflowStep()
499506
499643
  ]);
499507
- import_react121 = __toESM(require_react(), 1);
499644
+ import_react122 = __toESM(require_react(), 1);
499508
499645
  });
499509
499646
 
499510
499647
  // src/components/modals/FirstRunWizard.tsx
@@ -499517,14 +499654,14 @@ function GitCommitModal({ visible, cwd: cwd2, coAuthor, onClose, onCommitted, on
499517
499654
  const t2 = useTheme();
499518
499655
  const { width: tw2 } = useTerminalDimensions();
499519
499656
  const popupW = Math.min(72, Math.max(56, Math.floor(tw2 * 0.6)));
499520
- const [message, setMessage] = import_react123.useState("");
499521
- const [staged, setStaged] = import_react123.useState([]);
499522
- const [modified, setModified] = import_react123.useState([]);
499523
- const [untracked, setUntracked] = import_react123.useState([]);
499524
- const [diffSummary, setDiffSummary] = import_react123.useState("");
499525
- const [error51, setError] = import_react123.useState(null);
499526
- const [stageAll, setStageAll] = import_react123.useState(false);
499527
- import_react123.useEffect(() => {
499657
+ const [message, setMessage] = import_react124.useState("");
499658
+ const [staged, setStaged] = import_react124.useState([]);
499659
+ const [modified, setModified] = import_react124.useState([]);
499660
+ const [untracked, setUntracked] = import_react124.useState([]);
499661
+ const [diffSummary, setDiffSummary] = import_react124.useState("");
499662
+ const [error51, setError] = import_react124.useState(null);
499663
+ const [stageAll, setStageAll] = import_react124.useState(false);
499664
+ import_react124.useEffect(() => {
499528
499665
  if (!visible)
499529
499666
  return;
499530
499667
  setMessage("");
@@ -499539,7 +499676,7 @@ function GitCommitModal({ visible, cwd: cwd2, coAuthor, onClose, onCommitted, on
499539
499676
  setDiffSummary(lines > 1 ? `${lines} lines changed` : "no staged changes");
499540
499677
  }).catch(() => {});
499541
499678
  }, [visible, cwd2]);
499542
- const handleCommit2 = import_react123.useCallback(async () => {
499679
+ const handleCommit2 = import_react124.useCallback(async () => {
499543
499680
  if (!message.trim()) {
499544
499681
  setError("Commit message cannot be empty");
499545
499682
  return;
@@ -499691,7 +499828,7 @@ Co-Authored-By: SoulForge <noreply@soulforge.com>` : message.trim();
499691
499828
  }, undefined, true, undefined, this)
499692
499829
  }, undefined, false, undefined, this);
499693
499830
  }
499694
- var import_react123;
499831
+ var import_react124;
499695
499832
  var init_GitCommitModal = __esm(async () => {
499696
499833
  init_status();
499697
499834
  init_theme();
@@ -499700,7 +499837,7 @@ var init_GitCommitModal = __esm(async () => {
499700
499837
  init_react2(),
499701
499838
  init_ui2()
499702
499839
  ]);
499703
- import_react123 = __toESM(require_react(), 1);
499840
+ import_react124 = __toESM(require_react(), 1);
499704
499841
  });
499705
499842
 
499706
499843
  // src/components/modals/GitMenu.tsx
@@ -499714,13 +499851,13 @@ function GitMenu({
499714
499851
  onRefresh
499715
499852
  }) {
499716
499853
  const { width: tw2 } = useTerminalDimensions();
499717
- const [cursor3, setCursor] = import_react125.useState(0);
499718
- const [busy, setBusy] = import_react125.useState(false);
499719
- const cursorRef = import_react125.useRef(0);
499854
+ const [cursor3, setCursor] = import_react126.useState(0);
499855
+ const [busy, setBusy] = import_react126.useState(false);
499856
+ const cursorRef = import_react126.useRef(0);
499720
499857
  cursorRef.current = cursor3;
499721
- const busyRef = import_react125.useRef(false);
499858
+ const busyRef = import_react126.useRef(false);
499722
499859
  busyRef.current = busy;
499723
- import_react125.useEffect(() => {
499860
+ import_react126.useEffect(() => {
499724
499861
  if (visible)
499725
499862
  setCursor(0);
499726
499863
  }, [visible]);
@@ -499881,7 +500018,7 @@ function GitMenu({
499881
500018
  }, undefined, false, undefined, this)
499882
500019
  }, undefined, false, undefined, this);
499883
500020
  }
499884
- var import_react125, MENU_ITEMS, GROUPS;
500021
+ var import_react126, MENU_ITEMS, GROUPS;
499885
500022
  var init_GitMenu = __esm(async () => {
499886
500023
  init_status();
499887
500024
  init_dialog();
@@ -499891,7 +500028,7 @@ var init_GitMenu = __esm(async () => {
499891
500028
  init_dialogs(),
499892
500029
  init_ui2()
499893
500030
  ]);
499894
- import_react125 = __toESM(require_react(), 1);
500031
+ import_react126 = __toESM(require_react(), 1);
499895
500032
  MENU_ITEMS = [
499896
500033
  { id: "commit", keyHint: "c", label: "Commit", meta: "open commit form", action: "commit" },
499897
500034
  { id: "push", keyHint: "p", label: "Push", meta: "git push", action: "push" },
@@ -499936,9 +500073,9 @@ var init_GitMenu = __esm(async () => {
499936
500073
  function InfoPopup({ visible, config: config2, onClose }) {
499937
500074
  const t2 = useTheme();
499938
500075
  const { width: tw2, height: th } = useTerminalDimensions();
499939
- const [cursor3, setCursor] = import_react127.useState(0);
499940
- const scrollRef = import_react127.useRef(null);
499941
- import_react127.useEffect(() => {
500076
+ const [cursor3, setCursor] = import_react128.useState(0);
500077
+ const scrollRef = import_react128.useRef(null);
500078
+ import_react128.useEffect(() => {
499942
500079
  if (visible) {
499943
500080
  setCursor(0);
499944
500081
  scrollRef.current?.scrollTo(0);
@@ -500034,7 +500171,7 @@ function InfoPopup({ visible, config: config2, onClose }) {
500034
500171
  }, undefined, true, undefined, this)
500035
500172
  }, undefined, false, undefined, this);
500036
500173
  }
500037
- var import_react127;
500174
+ var import_react128;
500038
500175
  var init_InfoPopup = __esm(async () => {
500039
500176
  init_theme();
500040
500177
  init_scroll();
@@ -500043,7 +500180,7 @@ var init_InfoPopup = __esm(async () => {
500043
500180
  init_react2(),
500044
500181
  init_ui2()
500045
500182
  ]);
500046
- import_react127 = __toESM(require_react(), 1);
500183
+ import_react128 = __toESM(require_react(), 1);
500047
500184
  });
500048
500185
 
500049
500186
  // src/hooks/useAllProviderModels.ts
@@ -500055,7 +500192,7 @@ function flattenGrouped(r5) {
500055
500192
  return out2;
500056
500193
  }
500057
500194
  function useAllProviderModels(active) {
500058
- const [providerData, setProviderData] = import_react128.useState(() => {
500195
+ const [providerData, setProviderData] = import_react129.useState(() => {
500059
500196
  const init2 = {};
500060
500197
  for (const cfg of PROVIDER_CONFIGS) {
500061
500198
  if (cfg.grouped) {
@@ -500068,7 +500205,7 @@ function useAllProviderModels(active) {
500068
500205
  }
500069
500206
  return init2;
500070
500207
  });
500071
- const [availability, setAvailability] = import_react128.useState(() => {
500208
+ const [availability, setAvailability] = import_react129.useState(() => {
500072
500209
  const cached3 = getCachedProviderStatuses();
500073
500210
  const map2 = new Map;
500074
500211
  if (cached3) {
@@ -500082,7 +500219,7 @@ function useAllProviderModels(active) {
500082
500219
  }
500083
500220
  return map2;
500084
500221
  });
500085
- import_react128.useEffect(() => {
500222
+ import_react129.useEffect(() => {
500086
500223
  if (!active)
500087
500224
  return;
500088
500225
  const init2 = {};
@@ -500186,15 +500323,15 @@ function useAllProviderModels(active) {
500186
500323
  clearTimeout(fetchTimer);
500187
500324
  };
500188
500325
  }, [active]);
500189
- const anyLoading = import_react128.useMemo(() => Object.values(providerData).some((p4) => p4.loading), [providerData]);
500326
+ const anyLoading = import_react129.useMemo(() => Object.values(providerData).some((p4) => p4.loading), [providerData]);
500190
500327
  return { providerData, availability, anyLoading };
500191
500328
  }
500192
- var import_react128, BG_REFRESH_COOLDOWN = 1e4, lastBgRefresh = 0, ENV_SK;
500329
+ var import_react129, BG_REFRESH_COOLDOWN = 1e4, lastBgRefresh = 0, ENV_SK;
500193
500330
  var init_useAllProviderModels = __esm(() => {
500194
500331
  init_models();
500195
500332
  init_provider();
500196
500333
  init_secrets();
500197
- import_react128 = __toESM(require_react(), 1);
500334
+ import_react129 = __toESM(require_react(), 1);
500198
500335
  ENV_SK = {
500199
500336
  ANTHROPIC_API_KEY: "anthropic-api-key",
500200
500337
  OPENAI_API_KEY: "openai-api-key",
@@ -500228,13 +500365,13 @@ function buildMeta(m6, free) {
500228
500365
  function LlmSelector({ visible, activeModel, onSelect, onClose }) {
500229
500366
  const { width: tw2, height: th } = useTerminalDimensions();
500230
500367
  const { providerData, availability } = useAllProviderModels(visible);
500231
- const [query2, setQuery] = import_react130.useState("");
500232
- const [searchMode, setSearchMode] = import_react130.useState(false);
500233
- const [cursor3, setCursor] = import_react130.useState(0);
500234
- const [expanded, setExpanded] = import_react130.useState(new Set);
500235
- const cursorRef = import_react130.useRef(0);
500368
+ const [query2, setQuery] = import_react131.useState("");
500369
+ const [searchMode, setSearchMode] = import_react131.useState(false);
500370
+ const [cursor3, setCursor] = import_react131.useState(0);
500371
+ const [expanded, setExpanded] = import_react131.useState(new Set);
500372
+ const cursorRef = import_react131.useRef(0);
500236
500373
  cursorRef.current = cursor3;
500237
- import_react130.useEffect(() => {
500374
+ import_react131.useEffect(() => {
500238
500375
  if (!visible)
500239
500376
  return;
500240
500377
  setQuery("");
@@ -500246,7 +500383,7 @@ function LlmSelector({ visible, activeModel, onSelect, onClose }) {
500246
500383
  const popupW = Math.min(92, Math.max(82, Math.floor(tw2 * 0.75)));
500247
500384
  const popupH = Math.min(32, Math.max(18, th - 4));
500248
500385
  const contentW = popupW - 4;
500249
- const frecencyByModel = import_react130.useMemo(() => {
500386
+ const frecencyByModel = import_react131.useMemo(() => {
500250
500387
  if (!visible)
500251
500388
  return new Map;
500252
500389
  const allIds = [];
@@ -500265,7 +500402,7 @@ function LlmSelector({ visible, activeModel, onSelect, onClose }) {
500265
500402
  }
500266
500403
  return out2;
500267
500404
  }, [visible, providerData]);
500268
- const groups = import_react130.useMemo(() => {
500405
+ const groups = import_react131.useMemo(() => {
500269
500406
  const visibleConfigs = PROVIDER_CONFIGS.filter((cfg) => {
500270
500407
  if (cfg.envVar !== "")
500271
500408
  return true;
@@ -500307,10 +500444,10 @@ function LlmSelector({ visible, activeModel, onSelect, onClose }) {
500307
500444
  };
500308
500445
  });
500309
500446
  }, [providerData, availability, activeModel, frecencyByModel.get]);
500310
- const filteredGroups = import_react130.useMemo(() => fuzzyFilterGroups(groups, query2), [groups, query2]);
500311
- const effectiveExpanded = import_react130.useMemo(() => query2.trim().length > 0 ? new Set(filteredGroups.map((g4) => g4.id)) : expanded, [query2, filteredGroups, expanded]);
500312
- const rows = import_react130.useMemo(() => buildGroupedRows(filteredGroups, effectiveExpanded), [filteredGroups, effectiveExpanded]);
500313
- import_react130.useEffect(() => {
500447
+ const filteredGroups = import_react131.useMemo(() => fuzzyFilterGroups(groups, query2), [groups, query2]);
500448
+ const effectiveExpanded = import_react131.useMemo(() => query2.trim().length > 0 ? new Set(filteredGroups.map((g4) => g4.id)) : expanded, [query2, filteredGroups, expanded]);
500449
+ const rows = import_react131.useMemo(() => buildGroupedRows(filteredGroups, effectiveExpanded), [filteredGroups, effectiveExpanded]);
500450
+ import_react131.useEffect(() => {
500314
500451
  if (cursor3 >= rows.length && rows.length > 0)
500315
500452
  setCursor(rows.length - 1);
500316
500453
  }, [rows.length, cursor3]);
@@ -500475,7 +500612,7 @@ function LlmSelector({ visible, activeModel, onSelect, onClose }) {
500475
500612
  }, undefined, true, undefined, this)
500476
500613
  }, undefined, false, undefined, this);
500477
500614
  }
500478
- var import_react130;
500615
+ var import_react131;
500479
500616
  var init_LlmSelector = __esm(async () => {
500480
500617
  init_history();
500481
500618
  init_icons();
@@ -500489,7 +500626,7 @@ var init_LlmSelector = __esm(async () => {
500489
500626
  init_react2(),
500490
500627
  init_ui2()
500491
500628
  ]);
500492
- import_react130 = __toESM(require_react(), 1);
500629
+ import_react131 = __toESM(require_react(), 1);
500493
500630
  });
500494
500631
 
500495
500632
  // src/components/modals/SessionPicker.tsx
@@ -500520,23 +500657,23 @@ function SessionPicker({ visible, cwd: cwd2, onClose, onRestore, onSystemMessage
500520
500657
  const popupW = Math.min(110, Math.max(80, Math.floor(tw2 * 0.8)));
500521
500658
  const popupH = Math.min(34, Math.max(18, th - 4));
500522
500659
  const contentW = popupW - 4;
500523
- const [sessions, setSessions] = import_react132.useState([]);
500524
- const [loading, setLoading] = import_react132.useState(false);
500525
- const [query2, setQuery] = import_react132.useState("");
500526
- const [cursor3, setCursor] = import_react132.useState(0);
500527
- const [confirmClear, setConfirmClear] = import_react132.useState(false);
500528
- const [renameId, setRenameId] = import_react132.useState(null);
500529
- const [renameValue, setRenameValue] = import_react132.useState("");
500530
- const [flash, setFlash] = import_react132.useState(null);
500531
- const cursorRef = import_react132.useRef(0);
500660
+ const [sessions, setSessions] = import_react133.useState([]);
500661
+ const [loading, setLoading] = import_react133.useState(false);
500662
+ const [query2, setQuery] = import_react133.useState("");
500663
+ const [cursor3, setCursor] = import_react133.useState(0);
500664
+ const [confirmClear, setConfirmClear] = import_react133.useState(false);
500665
+ const [renameId, setRenameId] = import_react133.useState(null);
500666
+ const [renameValue, setRenameValue] = import_react133.useState("");
500667
+ const [flash, setFlash] = import_react133.useState(null);
500668
+ const cursorRef = import_react133.useRef(0);
500532
500669
  cursorRef.current = cursor3;
500533
- const manager = import_react132.useMemo(() => new SessionManager(cwd2), [cwd2]);
500534
- const refresh = import_react132.useCallback(() => {
500670
+ const manager = import_react133.useMemo(() => new SessionManager(cwd2), [cwd2]);
500671
+ const refresh = import_react133.useCallback(() => {
500535
500672
  const mgr = new SessionManager(cwd2);
500536
500673
  setLoading(true);
500537
500674
  mgr.listSessionsAsync().then(setSessions).catch(() => setSessions(mgr.listSessions())).finally(() => setLoading(false));
500538
500675
  }, [cwd2]);
500539
- import_react132.useEffect(() => {
500676
+ import_react133.useEffect(() => {
500540
500677
  if (!visible)
500541
500678
  return;
500542
500679
  setQuery("");
@@ -500546,12 +500683,12 @@ function SessionPicker({ visible, cwd: cwd2, onClose, onRestore, onSystemMessage
500546
500683
  setFlash(null);
500547
500684
  refresh();
500548
500685
  }, [visible, refresh]);
500549
- const filtered = import_react132.useMemo(() => {
500686
+ const filtered = import_react133.useMemo(() => {
500550
500687
  const fq = query2.toLowerCase().trim();
500551
500688
  const rows = sessions.map(toRow);
500552
500689
  return fq ? rows.filter((r5) => r5.title.toLowerCase().includes(fq)) : rows;
500553
500690
  }, [sessions, query2]);
500554
- import_react132.useEffect(() => {
500691
+ import_react133.useEffect(() => {
500555
500692
  if (cursor3 >= filtered.length && filtered.length > 0)
500556
500693
  setCursor(filtered.length - 1);
500557
500694
  }, [filtered.length, cursor3]);
@@ -500811,7 +500948,7 @@ function SessionPicker({ visible, cwd: cwd2, onClose, onRestore, onSystemMessage
500811
500948
  }, undefined, true, undefined, this)
500812
500949
  }, undefined, false, undefined, this);
500813
500950
  }
500814
- var import_react132, COLUMNS;
500951
+ var import_react133, COLUMNS;
500815
500952
  var init_SessionPicker = __esm(async () => {
500816
500953
  init_manager();
500817
500954
  init_theme();
@@ -500823,7 +500960,7 @@ var init_SessionPicker = __esm(async () => {
500823
500960
  init_dialogs(),
500824
500961
  init_ui2()
500825
500962
  ]);
500826
- import_react132 = __toESM(require_react(), 1);
500963
+ import_react133 = __toESM(require_react(), 1);
500827
500964
  COLUMNS = [
500828
500965
  { key: "title" },
500829
500966
  { key: "msgs", width: 6, align: "right" },
@@ -500881,21 +501018,21 @@ function StatusDashboard({
500881
501018
  const popupH = Math.min(Math.max(22, Math.floor(termRows * 0.88)), termRows - 2);
500882
501019
  const contentW = popupWidth - SIDEBAR_W2 - 3;
500883
501020
  const scrollH = Math.max(8, popupH - 6);
500884
- const [tab, setTab] = import_react134.useState(() => resolveInitial(initialTab));
500885
- const [scrollOffset, setScrollOffset] = import_react134.useState(0);
500886
- const [scopeTabId, setScopeTabId] = import_react134.useState(tabMgr.activeTabId);
501021
+ const [tab, setTab] = import_react135.useState(() => resolveInitial(initialTab));
501022
+ const [scrollOffset, setScrollOffset] = import_react135.useState(0);
501023
+ const [scopeTabId, setScopeTabId] = import_react135.useState(tabMgr.activeTabId);
500887
501024
  const sb = useStatusBarStore();
500888
501025
  const rm3 = useRepoMapStore();
500889
501026
  const wk = useWorkerStore();
500890
- const [hearth, setHearth] = import_react134.useState(null);
500891
- import_react134.useEffect(() => {
501027
+ const [hearth, setHearth] = import_react135.useState(null);
501028
+ import_react135.useEffect(() => {
500892
501029
  if (visible) {
500893
501030
  setTab(resolveInitial(initialTab));
500894
501031
  setScrollOffset(0);
500895
501032
  setScopeTabId(tabMgr.activeTabId);
500896
501033
  }
500897
501034
  }, [visible, initialTab, tabMgr.activeTabId]);
500898
- import_react134.useEffect(() => {
501035
+ import_react135.useEffect(() => {
500899
501036
  if (!visible)
500900
501037
  return;
500901
501038
  let stopped = false;
@@ -500987,7 +501124,7 @@ function StatusDashboard({
500987
501124
  clearInterval(iv);
500988
501125
  };
500989
501126
  }, [visible]);
500990
- const pollWorkerMemory = import_react134.useCallback(async () => {
501127
+ const pollWorkerMemory = import_react135.useCallback(async () => {
500991
501128
  const store = useWorkerStore.getState();
500992
501129
  try {
500993
501130
  const intel = contextManager.getRepoMap();
@@ -501000,8 +501137,8 @@ function StatusDashboard({
501000
501137
  store.setWorkerMemory("io", Math.round(res.heapUsed / 1024 / 1024), Math.round(res.rss / 1024 / 1024));
501001
501138
  } catch {}
501002
501139
  }, [contextManager]);
501003
- const pollRef = import_react134.useRef(null);
501004
- import_react134.useEffect(() => {
501140
+ const pollRef = import_react135.useRef(null);
501141
+ import_react135.useEffect(() => {
501005
501142
  if (visible && tab === "System") {
501006
501143
  pollWorkerMemory();
501007
501144
  pollRef.current = setInterval(pollWorkerMemory, 5000);
@@ -501018,12 +501155,12 @@ function StatusDashboard({
501018
501155
  const allTabs = tabMgr.tabs;
501019
501156
  const isMultiTab = allTabs.length > 1;
501020
501157
  const isAllScope = scopeTabId === "all";
501021
- const getTabUsage = import_react134.useCallback((tabId) => {
501158
+ const getTabUsage = import_react135.useCallback((tabId) => {
501022
501159
  if (tabId === tabMgr.activeTabId)
501023
501160
  return tu;
501024
501161
  return tabMgr.getChat(tabId)?.tokenUsage ?? ZERO_USAGE;
501025
501162
  }, [tu, tabMgr]);
501026
- const scopedUsage = import_react134.useMemo(() => {
501163
+ const scopedUsage = import_react135.useMemo(() => {
501027
501164
  if (!isAllScope)
501028
501165
  return getTabUsage(scopeTabId);
501029
501166
  const agg = { ...ZERO_USAGE, modelBreakdown: {} };
@@ -501053,8 +501190,8 @@ function StatusDashboard({
501053
501190
  }
501054
501191
  return agg;
501055
501192
  }, [isAllScope, scopeTabId, getTabUsage, allTabs]);
501056
- const [lspCount, setLspCount] = import_react134.useState(0);
501057
- import_react134.useEffect(() => {
501193
+ const [lspCount, setLspCount] = import_react135.useState(0);
501194
+ import_react135.useEffect(() => {
501058
501195
  getIntelligenceStatus().then((s2) => setLspCount(s2?.lspServers.length ?? 0));
501059
501196
  }, []);
501060
501197
  const scopeRelevant = tab === "Usage" || tab === "Prompt" || tab === "Cost" || tab === "Tabs";
@@ -501235,8 +501372,8 @@ function UsagePane({
501235
501372
  const clearTrigger = Math.max(80000, Math.floor(ctxWindow * (clearPct / 100)));
501236
501373
  const serverPct = 80;
501237
501374
  const serverTrigger = Math.max(160000, Math.floor(ctxWindow * (serverPct / 100)));
501238
- const ref = import_react134.useRef(null);
501239
- import_react134.useEffect(() => {
501375
+ const ref = import_react135.useRef(null);
501376
+ import_react135.useEffect(() => {
501240
501377
  ref.current?.scrollTo(scrollOffset);
501241
501378
  }, [scrollOffset]);
501242
501379
  return /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("box", {
@@ -501412,8 +501549,8 @@ function PromptPane({
501412
501549
  const breakdown = contextManager.getContextBreakdown();
501413
501550
  const activeSections = breakdown.filter((s2) => s2.active && s2.chars > 0);
501414
501551
  const totalSysChars = activeSections.reduce((sum, s2) => sum + s2.chars, 0);
501415
- const ref = import_react134.useRef(null);
501416
- import_react134.useEffect(() => {
501552
+ const ref = import_react135.useRef(null);
501553
+ import_react135.useEffect(() => {
501417
501554
  ref.current?.scrollTo(scrollOffset);
501418
501555
  }, [scrollOffset]);
501419
501556
  if (activeSections.length === 0) {
@@ -501480,8 +501617,8 @@ function CostPane({
501480
501617
  pct: c3 > 0 && totalCost > 0 ? `${String(pct)}%` : "\u2014"
501481
501618
  };
501482
501619
  });
501483
- const ref = import_react134.useRef(null);
501484
- import_react134.useEffect(() => {
501620
+ const ref = import_react135.useRef(null);
501621
+ import_react135.useEffect(() => {
501485
501622
  ref.current?.scrollTo(scrollOffset);
501486
501623
  }, [scrollOffset]);
501487
501624
  return /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("box", {
@@ -501589,8 +501726,8 @@ function DispatchPane({
501589
501726
  }) {
501590
501727
  const t2 = useTheme();
501591
501728
  const dispatch2 = sb.lastDispatch;
501592
- const ref = import_react134.useRef(null);
501593
- import_react134.useEffect(() => {
501729
+ const ref = import_react135.useRef(null);
501730
+ import_react135.useEffect(() => {
501594
501731
  ref.current?.scrollTo(scrollOffset);
501595
501732
  }, [scrollOffset]);
501596
501733
  if (!dispatch2) {
@@ -501756,8 +501893,8 @@ function SystemPane({
501756
501893
  const wkColor = (s2) => s2 === "ready" || s2 === "busy" ? t2.success : s2 === "starting" || s2 === "restarting" ? t2.amber : s2 === "crashed" ? t2.error : t2.textMuted;
501757
501894
  const wkIcon = (s2) => s2 === "busy" ? icon("worker_busy") : s2 === "crashed" ? icon("worker_crash") : s2 === "restarting" ? icon("worker_restart") : icon("worker");
501758
501895
  const termStats = getTerminalStats();
501759
- const ref = import_react134.useRef(null);
501760
- import_react134.useEffect(() => {
501896
+ const ref = import_react135.useRef(null);
501897
+ import_react135.useEffect(() => {
501761
501898
  ref.current?.scrollTo(scrollOffset);
501762
501899
  }, [scrollOffset]);
501763
501900
  return /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("scrollbox", {
@@ -502021,7 +502158,7 @@ function SystemPane({
502021
502158
  ]
502022
502159
  }, undefined, true, undefined, this);
502023
502160
  }
502024
- var import_react134, BOLD16, SIDEBAR_W2 = 22, TABS;
502161
+ var import_react135, BOLD16, SIDEBAR_W2 = 22, TABS;
502025
502162
  var init_StatusDashboard = __esm(async () => {
502026
502163
  init_instance();
502027
502164
  init_icons();
@@ -502040,7 +502177,7 @@ var init_StatusDashboard = __esm(async () => {
502040
502177
  init_react2(),
502041
502178
  init_ui2()
502042
502179
  ]);
502043
- import_react134 = __toESM(require_react(), 1);
502180
+ import_react135 = __toESM(require_react(), 1);
502044
502181
  BOLD16 = TextAttributes25.BOLD;
502045
502182
  TABS = ["Usage", "Prompt", "Cost", "Tabs", "Dispatch", "System"];
502046
502183
  });
@@ -502048,8 +502185,8 @@ var init_StatusDashboard = __esm(async () => {
502048
502185
  // src/components/modals/TabNamePopup.tsx
502049
502186
  function TabNamePopup({ visible, placeholder, onSubmit, onClose }) {
502050
502187
  const { width: tw2 } = useTerminalDimensions();
502051
- const [value, setValue2] = import_react136.useState("");
502052
- import_react136.useEffect(() => {
502188
+ const [value, setValue2] = import_react137.useState("");
502189
+ import_react137.useEffect(() => {
502053
502190
  if (visible)
502054
502191
  setValue2("");
502055
502192
  }, [visible]);
@@ -502104,14 +502241,14 @@ function TabNamePopup({ visible, placeholder, onSubmit, onClose }) {
502104
502241
  }, undefined, true, undefined, this)
502105
502242
  }, undefined, false, undefined, this);
502106
502243
  }
502107
- var import_react136, NAME_MAX = 30;
502244
+ var import_react137, NAME_MAX = 30;
502108
502245
  var init_TabNamePopup = __esm(async () => {
502109
502246
  init_jsx_dev_runtime();
502110
502247
  await __promiseAll([
502111
502248
  init_react2(),
502112
502249
  init_ui2()
502113
502250
  ]);
502114
- import_react136 = __toESM(require_react(), 1);
502251
+ import_react137 = __toESM(require_react(), 1);
502115
502252
  });
502116
502253
 
502117
502254
  // src/components/modals/UiDemo.tsx
@@ -502154,37 +502291,37 @@ function fuzzyFilterProviders(providers, query2) {
502154
502291
  }
502155
502292
  function UiDemo({ visible, onClose }) {
502156
502293
  const { width: tw2, height: th } = useTerminalDimensions();
502157
- const [tab, setTab] = import_react138.useState("controls");
502158
- const [row, setRow] = import_react138.useState(0);
502159
- const [btnCol, setBtnCol] = import_react138.useState(0);
502160
- const [toggles, setToggles] = import_react138.useState({ a: true, b: false });
502161
- const [checks4, setChecks] = import_react138.useState({ x: true, y: false, z: false });
502162
- const [radio, setRadio] = import_react138.useState("y");
502163
- const [flash, setFlash] = import_react138.useState(null);
502164
- const [query2, setQuery] = import_react138.useState("");
502165
- const [searchMode, setSearchMode] = import_react138.useState(false);
502166
- const [expanded, setExpanded] = import_react138.useState(new Set(["anthropic"]));
502167
- const [pickerIdx, setPickerIdx] = import_react138.useState(0);
502168
- const [pickerQuery, setPickerQuery] = import_react138.useState("");
502169
- const [pickerSearchMode, setPickerSearchMode] = import_react138.useState(false);
502294
+ const [tab, setTab] = import_react139.useState("controls");
502295
+ const [row, setRow] = import_react139.useState(0);
502296
+ const [btnCol, setBtnCol] = import_react139.useState(0);
502297
+ const [toggles, setToggles] = import_react139.useState({ a: true, b: false });
502298
+ const [checks4, setChecks] = import_react139.useState({ x: true, y: false, z: false });
502299
+ const [radio, setRadio] = import_react139.useState("y");
502300
+ const [flash, setFlash] = import_react139.useState(null);
502301
+ const [query2, setQuery] = import_react139.useState("");
502302
+ const [searchMode, setSearchMode] = import_react139.useState(false);
502303
+ const [expanded, setExpanded] = import_react139.useState(new Set(["anthropic"]));
502304
+ const [pickerIdx, setPickerIdx] = import_react139.useState(0);
502305
+ const [pickerQuery, setPickerQuery] = import_react139.useState("");
502306
+ const [pickerSearchMode, setPickerSearchMode] = import_react139.useState(false);
502170
502307
  const width = Math.min(120, Math.max(90, Math.floor(tw2 * 0.85)));
502171
502308
  const height = Math.min(30, Math.max(22, Math.floor(th * 0.82)));
502172
- const filteredUsers = import_react138.useMemo(() => {
502309
+ const filteredUsers = import_react139.useMemo(() => {
502173
502310
  const q3 = query2.trim().toLowerCase();
502174
502311
  if (!q3)
502175
502312
  return USERS;
502176
502313
  return USERS.filter((u5) => [u5.first, u5.last, u5.email, u5.role].some((v3) => v3.toLowerCase().includes(q3)));
502177
502314
  }, [query2]);
502178
- const filteredProviders = import_react138.useMemo(() => {
502315
+ const filteredProviders = import_react139.useMemo(() => {
502179
502316
  return fuzzyFilterProviders(PROVIDERS2, pickerQuery);
502180
502317
  }, [pickerQuery]);
502181
- const effectiveExpanded = import_react138.useMemo(() => pickerQuery.trim().length > 0 ? new Set(filteredProviders.map((g4) => g4.id)) : expanded, [pickerQuery, filteredProviders, expanded]);
502182
- const pickerRows = import_react138.useMemo(() => buildGroupedRows(filteredProviders, effectiveExpanded), [filteredProviders, effectiveExpanded]);
502183
- import_react138.useEffect(() => {
502318
+ const effectiveExpanded = import_react139.useMemo(() => pickerQuery.trim().length > 0 ? new Set(filteredProviders.map((g4) => g4.id)) : expanded, [pickerQuery, filteredProviders, expanded]);
502319
+ const pickerRows = import_react139.useMemo(() => buildGroupedRows(filteredProviders, effectiveExpanded), [filteredProviders, effectiveExpanded]);
502320
+ import_react139.useEffect(() => {
502184
502321
  if (pickerIdx >= pickerRows.length)
502185
502322
  setPickerIdx(Math.max(0, pickerRows.length - 1));
502186
502323
  }, [pickerRows.length, pickerIdx]);
502187
- const rowCount = import_react138.useMemo(() => {
502324
+ const rowCount = import_react139.useMemo(() => {
502188
502325
  if (tab === "controls")
502189
502326
  return 5;
502190
502327
  if (tab === "fields")
@@ -502746,14 +502883,14 @@ function renderBody(tab, row, btnCol, toggles, checks4, radio, contentW, query2,
502746
502883
  ]
502747
502884
  }, undefined, true, undefined, this);
502748
502885
  }
502749
- var import_react138, PROVIDERS2, USERS, USER_COLUMNS, TABS2;
502886
+ var import_react139, PROVIDERS2, USERS, USER_COLUMNS, TABS2;
502750
502887
  var init_UiDemo = __esm(async () => {
502751
502888
  init_jsx_dev_runtime();
502752
502889
  await __promiseAll([
502753
502890
  init_react2(),
502754
502891
  init_ui2()
502755
502892
  ]);
502756
- import_react138 = __toESM(require_react(), 1);
502893
+ import_react139 = __toESM(require_react(), 1);
502757
502894
  PROVIDERS2 = [
502758
502895
  {
502759
502896
  id: "anthropic",
@@ -503006,14 +503143,14 @@ function UpdateModal({ visible, onClose }) {
503006
503143
  installMethod,
503007
503144
  updateAvailable
503008
503145
  } = useVersionStore();
503009
- const [copied, setCopied] = import_react140.useState(false);
503010
- const [phase, setPhase] = import_react140.useState("info");
503011
- const [quipIdx, setQuipIdx] = import_react140.useState(0);
503012
- const [spinIdx, setSpinIdx] = import_react140.useState(0);
503013
- const [logLines, setLogLines] = import_react140.useState([]);
503014
- const [errorMsg, setErrorMsg] = import_react140.useState("");
503015
- const upgrading = import_react140.useRef(false);
503016
- import_react140.useEffect(() => {
503146
+ const [copied, setCopied] = import_react141.useState(false);
503147
+ const [phase, setPhase] = import_react141.useState("info");
503148
+ const [quipIdx, setQuipIdx] = import_react141.useState(0);
503149
+ const [spinIdx, setSpinIdx] = import_react141.useState(0);
503150
+ const [logLines, setLogLines] = import_react141.useState([]);
503151
+ const [errorMsg, setErrorMsg] = import_react141.useState("");
503152
+ const upgrading = import_react141.useRef(false);
503153
+ import_react141.useEffect(() => {
503017
503154
  if (visible)
503018
503155
  setPhase("info");
503019
503156
  }, [visible]);
@@ -503023,7 +503160,7 @@ function UpdateModal({ visible, onClose }) {
503023
503160
  const maxChangelog = Math.max(6, popupH - 14);
503024
503161
  const logH = Math.max(3, Math.min(6, popupH - 12));
503025
503162
  const bg = t2.bgPopup;
503026
- import_react140.useEffect(() => {
503163
+ import_react141.useEffect(() => {
503027
503164
  if (phase !== "upgrading")
503028
503165
  return;
503029
503166
  const s2 = setInterval(() => setSpinIdx((i5) => i5 + 1), 80);
@@ -503033,7 +503170,7 @@ function UpdateModal({ visible, onClose }) {
503033
503170
  clearInterval(q3);
503034
503171
  };
503035
503172
  }, [phase]);
503036
- const doUpgrade = import_react140.useCallback(async () => {
503173
+ const doUpgrade = import_react141.useCallback(async () => {
503037
503174
  if (upgrading.current)
503038
503175
  return;
503039
503176
  upgrading.current = true;
@@ -503645,7 +503782,7 @@ function UpdateModal({ visible, onClose }) {
503645
503782
  }, undefined, true, undefined, this)
503646
503783
  }, undefined, false, undefined, this);
503647
503784
  }
503648
- var import_react140, UPGRADE_QUIPS, LATEST_QUIPS, CHANGELOG_ERROR_QUIPS, MAX_LOG = 50, BOLD17, ITALIC6, DIM6, TYPE_BADGE;
503785
+ var import_react141, UPGRADE_QUIPS, LATEST_QUIPS, CHANGELOG_ERROR_QUIPS, MAX_LOG = 50, BOLD17, ITALIC6, DIM6, TYPE_BADGE;
503649
503786
  var init_UpdateModal = __esm(async () => {
503650
503787
  init_icons();
503651
503788
  init_theme();
@@ -503658,7 +503795,7 @@ var init_UpdateModal = __esm(async () => {
503658
503795
  init_shared(),
503659
503796
  init_ui2()
503660
503797
  ]);
503661
- import_react140 = __toESM(require_react(), 1);
503798
+ import_react141 = __toESM(require_react(), 1);
503662
503799
  UPGRADE_QUIPS = [
503663
503800
  "Heating the forge\u2026",
503664
503801
  "Melting down the old version\u2026",
@@ -503711,10 +503848,10 @@ var init_UpdateModal = __esm(async () => {
503711
503848
  // src/components/settings/EditorSettings.tsx
503712
503849
  function EditorSettings({ visible, settings: settings2, initialScope, onUpdate, onClose }) {
503713
503850
  const { width: tw2, height: th } = useTerminalDimensions();
503714
- const [cursor3, setCursor] = import_react142.useState(0);
503715
- const [scope, setScope] = import_react142.useState(initialScope ?? "project");
503851
+ const [cursor3, setCursor] = import_react143.useState(0);
503852
+ const [scope, setScope] = import_react143.useState(initialScope ?? "project");
503716
503853
  const current = settings2 ?? ALL_ON;
503717
- import_react142.useEffect(() => {
503854
+ import_react143.useEffect(() => {
503718
503855
  if (visible) {
503719
503856
  setScope(initialScope ?? "project");
503720
503857
  setCursor(0);
@@ -503723,7 +503860,7 @@ function EditorSettings({ visible, settings: settings2, initialScope, onUpdate,
503723
503860
  const popupW = Math.min(80, Math.max(64, Math.floor(tw2 * 0.7)));
503724
503861
  const popupH = Math.min(32, Math.max(20, th - 4));
503725
503862
  const contentW = popupW - 4;
503726
- const groups = import_react142.useMemo(() => [
503863
+ const groups = import_react143.useMemo(() => [
503727
503864
  {
503728
503865
  id: "features",
503729
503866
  label: "Features",
@@ -503738,7 +503875,7 @@ function EditorSettings({ visible, settings: settings2, initialScope, onUpdate,
503738
503875
  }))
503739
503876
  }
503740
503877
  ], [current]);
503741
- const rows = import_react142.useMemo(() => buildGroupedRows(groups, new Set(["features"])), [groups]);
503878
+ const rows = import_react143.useMemo(() => buildGroupedRows(groups, new Set(["features"])), [groups]);
503742
503879
  useKeyboard((evt) => {
503743
503880
  if (!visible)
503744
503881
  return;
@@ -503838,7 +503975,7 @@ function EditorSettings({ visible, settings: settings2, initialScope, onUpdate,
503838
503975
  }, undefined, true, undefined, this)
503839
503976
  }, undefined, false, undefined, this);
503840
503977
  }
503841
- var import_react142, AGENT_ACCESS_MODES, AGENT_ACCESS_LABELS, FEATURES, ALL_ON, ALL_OFF;
503978
+ var import_react143, AGENT_ACCESS_MODES, AGENT_ACCESS_LABELS, FEATURES, ALL_ON, ALL_OFF;
503842
503979
  var init_EditorSettings = __esm(async () => {
503843
503980
  init_jsx_dev_runtime();
503844
503981
  await __promiseAll([
@@ -503846,7 +503983,7 @@ var init_EditorSettings = __esm(async () => {
503846
503983
  init_shared(),
503847
503984
  init_ui2()
503848
503985
  ]);
503849
- import_react142 = __toESM(require_react(), 1);
503986
+ import_react143 = __toESM(require_react(), 1);
503850
503987
  AGENT_ACCESS_MODES = ["on", "off", "when-open"];
503851
503988
  AGENT_ACCESS_LABELS = {
503852
503989
  on: "Always",
@@ -504209,35 +504346,35 @@ function HearthSettings({ visible, onClose }) {
504209
504346
  const contentW = innerW - SIDEBAR_W3 - 1;
504210
504347
  const popupHeight = Math.max(MIN_BODY_ROWS + 8, Math.min(termRows - 2, Math.floor(termRows * MAX_HEIGHT_RATIO)));
504211
504348
  const bodyRows = Math.max(MIN_BODY_ROWS, popupHeight - 8);
504212
- const [tab, setTab] = import_react144.useState("surfaces");
504213
- const [config2, setConfig] = import_react144.useState(() => loadHearthConfig());
504214
- const [status, setStatus] = import_react144.useState({ running: false });
504215
- const [flash, setFlash] = import_react144.useState(null);
504216
- const flashTimer = import_react144.useRef(null);
504217
- const [cursor3, setCursor] = import_react144.useState(0);
504218
- const [mode, setMode] = import_react144.useState({ k: "list" });
504219
- const [logLines, setLogLines] = import_react144.useState([]);
504220
- const [logScroll, setLogScroll] = import_react144.useState(0);
504221
- const [logAutoscroll, setLogAutoscroll] = import_react144.useState(true);
504222
- const [logFilter, setLogFilter] = import_react144.useState("");
504223
- const [logFilterFocused, setLogFilterFocused] = import_react144.useState(false);
504224
- const logWatcherRef = import_react144.useRef(null);
504225
- const daemonProcRef = import_react144.useRef(null);
504226
- const mountedRef = import_react144.useRef(false);
504227
- const bootLogRef = import_react144.useRef(null);
504228
- const statusRef = import_react144.useRef({ running: false });
504229
- const [startupError, setStartupError] = import_react144.useState(null);
504230
- const [service, setService] = import_react144.useState(null);
504231
- const flashMsg = import_react144.useCallback((kind, msg) => {
504349
+ const [tab, setTab] = import_react145.useState("surfaces");
504350
+ const [config2, setConfig] = import_react145.useState(() => loadHearthConfig());
504351
+ const [status, setStatus] = import_react145.useState({ running: false });
504352
+ const [flash, setFlash] = import_react145.useState(null);
504353
+ const flashTimer = import_react145.useRef(null);
504354
+ const [cursor3, setCursor] = import_react145.useState(0);
504355
+ const [mode, setMode] = import_react145.useState({ k: "list" });
504356
+ const [logLines, setLogLines] = import_react145.useState([]);
504357
+ const [logScroll, setLogScroll] = import_react145.useState(0);
504358
+ const [logAutoscroll, setLogAutoscroll] = import_react145.useState(true);
504359
+ const [logFilter, setLogFilter] = import_react145.useState("");
504360
+ const [logFilterFocused, setLogFilterFocused] = import_react145.useState(false);
504361
+ const logWatcherRef = import_react145.useRef(null);
504362
+ const daemonProcRef = import_react145.useRef(null);
504363
+ const mountedRef = import_react145.useRef(false);
504364
+ const bootLogRef = import_react145.useRef(null);
504365
+ const statusRef = import_react145.useRef({ running: false });
504366
+ const [startupError, setStartupError] = import_react145.useState(null);
504367
+ const [service, setService] = import_react145.useState(null);
504368
+ const flashMsg = import_react145.useCallback((kind, msg) => {
504232
504369
  if (flashTimer.current)
504233
504370
  clearTimeout(flashTimer.current);
504234
504371
  setFlash({ kind, msg });
504235
504372
  flashTimer.current = setTimeout(() => setFlash(null), 3000);
504236
504373
  }, []);
504237
- const refreshConfig = import_react144.useCallback(() => {
504374
+ const refreshConfig = import_react145.useCallback(() => {
504238
504375
  setConfig(loadHearthConfig());
504239
504376
  }, []);
504240
- const refreshStatus = import_react144.useCallback(async () => {
504377
+ const refreshStatus = import_react145.useCallback(async () => {
504241
504378
  const cfg = loadHearthConfig();
504242
504379
  const st2 = await probeDaemon(cfg.daemon.socketPath);
504243
504380
  try {
@@ -504267,7 +504404,7 @@ function HearthSettings({ visible, onClose }) {
504267
504404
  if (st2.running)
504268
504405
  setStartupError(null);
504269
504406
  }, []);
504270
- import_react144.useEffect(() => {
504407
+ import_react145.useEffect(() => {
504271
504408
  if (!visible)
504272
504409
  return;
504273
504410
  mountedRef.current = true;
@@ -504281,13 +504418,13 @@ function HearthSettings({ visible, onClose }) {
504281
504418
  clearInterval(poll);
504282
504419
  };
504283
504420
  }, [visible, refreshConfig, refreshStatus]);
504284
- const filteredLogs = import_react144.useMemo(() => {
504421
+ const filteredLogs = import_react145.useMemo(() => {
504285
504422
  if (!logFilter.trim())
504286
504423
  return logLines;
504287
504424
  const q3 = logFilter.trim().toLowerCase();
504288
504425
  return logLines.filter((l6) => l6.toLowerCase().includes(q3));
504289
504426
  }, [logLines, logFilter]);
504290
- import_react144.useEffect(() => {
504427
+ import_react145.useEffect(() => {
504291
504428
  if (!visible || tab !== "logs") {
504292
504429
  if (logWatcherRef.current) {
504293
504430
  logWatcherRef.current.close();
@@ -504322,12 +504459,12 @@ function HearthSettings({ visible, onClose }) {
504322
504459
  logWatcherRef.current = null;
504323
504460
  };
504324
504461
  }, [visible, tab, config2.daemon.logFile]);
504325
- import_react144.useEffect(() => {
504462
+ import_react145.useEffect(() => {
504326
504463
  if (tab !== "logs" || !logAutoscroll)
504327
504464
  return;
504328
504465
  setLogScroll(Math.max(0, filteredLogs.length - bodyRows));
504329
504466
  }, [filteredLogs.length, tab, logAutoscroll, bodyRows]);
504330
- import_react144.useEffect(() => {
504467
+ import_react145.useEffect(() => {
504331
504468
  if (!visible)
504332
504469
  return;
504333
504470
  const handler4 = (event) => {
@@ -504345,7 +504482,7 @@ function HearthSettings({ visible, onClose }) {
504345
504482
  renderer2.keyInput.off("paste", handler4);
504346
504483
  };
504347
504484
  }, [visible, renderer2, tab, mode.k, logFilterFocused]);
504348
- const startDaemon = import_react144.useCallback(async () => {
504485
+ const startDaemon = import_react145.useCallback(async () => {
504349
504486
  try {
504350
504487
  const launcher = resolveLauncher();
504351
504488
  if (!launcher) {
@@ -504393,7 +504530,7 @@ function HearthSettings({ visible, onClose }) {
504393
504530
  flashMsg("err", err2 instanceof Error ? err2.message : String(err2));
504394
504531
  }
504395
504532
  }, [flashMsg, refreshStatus]);
504396
- const stopDaemon = import_react144.useCallback(async () => {
504533
+ const stopDaemon = import_react145.useCallback(async () => {
504397
504534
  try {
504398
504535
  if (statusRef.current.surfaceOwner === "tui") {
504399
504536
  const { getTuiHost: getTuiHost2 } = await Promise.resolve().then(() => (init_tui_host(), exports_tui_host));
@@ -504434,7 +504571,7 @@ function HearthSettings({ visible, onClose }) {
504434
504571
  flashMsg("err", err2 instanceof Error ? err2.message : String(err2));
504435
504572
  }
504436
504573
  }, [flashMsg, refreshStatus]);
504437
- const persist = import_react144.useCallback((next) => {
504574
+ const persist = import_react145.useCallback((next) => {
504438
504575
  try {
504439
504576
  writeGlobalHearthConfig(next);
504440
504577
  setConfig(next);
@@ -504461,18 +504598,18 @@ function HearthSettings({ visible, onClose }) {
504461
504598
  flashMsg("err", `reload failed: ${err2 instanceof Error ? err2.message : String(err2)}`);
504462
504599
  });
504463
504600
  }, [flashMsg, refreshStatus]);
504464
- const refreshService = import_react144.useCallback(async () => {
504601
+ const refreshService = import_react145.useCallback(async () => {
504465
504602
  try {
504466
504603
  const s2 = await getServiceStatus();
504467
504604
  setService(s2);
504468
504605
  } catch {}
504469
504606
  }, []);
504470
- import_react144.useEffect(() => {
504607
+ import_react145.useEffect(() => {
504471
504608
  if (!visible)
504472
504609
  return;
504473
504610
  refreshService();
504474
504611
  }, [visible, refreshService]);
504475
- const installPersistent = import_react144.useCallback(async () => {
504612
+ const installPersistent = import_react145.useCallback(async () => {
504476
504613
  try {
504477
504614
  const launcher = resolveLauncher();
504478
504615
  if (!launcher) {
@@ -504496,7 +504633,7 @@ function HearthSettings({ visible, onClose }) {
504496
504633
  flashMsg("err", err2 instanceof Error ? err2.message : String(err2));
504497
504634
  }
504498
504635
  }, [flashMsg, refreshStatus]);
504499
- const uninstallPersistent = import_react144.useCallback(async () => {
504636
+ const uninstallPersistent = import_react145.useCallback(async () => {
504500
504637
  try {
504501
504638
  const s2 = await uninstallService();
504502
504639
  if (s2.error) {
@@ -504509,8 +504646,8 @@ function HearthSettings({ visible, onClose }) {
504509
504646
  flashMsg("err", err2 instanceof Error ? err2.message : String(err2));
504510
504647
  }
504511
504648
  }, [flashMsg]);
504512
- const surfaceEntries = import_react144.useMemo(() => Object.entries(config2.surfaces), [config2.surfaces]);
504513
- const toggleSurface = import_react144.useCallback((surfaceId) => {
504649
+ const surfaceEntries = import_react145.useMemo(() => Object.entries(config2.surfaces), [config2.surfaces]);
504650
+ const toggleSurface = import_react145.useCallback((surfaceId) => {
504514
504651
  const current = config2.surfaces[surfaceId];
504515
504652
  if (!current)
504516
504653
  return;
@@ -504522,12 +504659,12 @@ function HearthSettings({ visible, onClose }) {
504522
504659
  }
504523
504660
  });
504524
504661
  }, [config2, persist]);
504525
- const removeSurface = import_react144.useCallback((surfaceId) => {
504662
+ const removeSurface = import_react145.useCallback((surfaceId) => {
504526
504663
  const next = { ...config2, surfaces: { ...config2.surfaces } };
504527
504664
  delete next.surfaces[surfaceId];
504528
504665
  persist(next);
504529
504666
  }, [config2, persist]);
504530
- const removeChat = import_react144.useCallback((surfaceId, chatId) => {
504667
+ const removeChat = import_react145.useCallback((surfaceId, chatId) => {
504531
504668
  const surface = config2.surfaces[surfaceId];
504532
504669
  if (!surface)
504533
504670
  return;
@@ -504541,7 +504678,7 @@ function HearthSettings({ visible, onClose }) {
504541
504678
  }
504542
504679
  });
504543
504680
  }, [config2, persist]);
504544
- const addSurface = import_react144.useCallback((kind, id) => {
504681
+ const addSurface = import_react145.useCallback((kind, id) => {
504545
504682
  const trimmedKind = kind.trim().toLowerCase();
504546
504683
  const trimmedId = id.trim();
504547
504684
  if (!trimmedKind || !trimmedId) {
@@ -504557,7 +504694,7 @@ function HearthSettings({ visible, onClose }) {
504557
504694
  }
504558
504695
  });
504559
504696
  }, [config2, flashMsg, persist]);
504560
- const addChat = import_react144.useCallback((surfaceId, chatId, cwd2) => {
504697
+ const addChat = import_react145.useCallback((surfaceId, chatId, cwd2) => {
504561
504698
  const trimmedChat = chatId.trim();
504562
504699
  const trimmedCwd = cwd2.trim();
504563
504700
  if (!trimmedChat || !trimmedCwd) {
@@ -504587,7 +504724,7 @@ function HearthSettings({ visible, onClose }) {
504587
504724
  }
504588
504725
  });
504589
504726
  }, [config2, flashMsg, persist]);
504590
- const setToken = import_react144.useCallback((surfaceId, value) => {
504727
+ const setToken = import_react145.useCallback((surfaceId, value) => {
504591
504728
  const key3 = tokenSecretKey(surfaceId);
504592
504729
  const trimmed = value.trim();
504593
504730
  if (!key3 || !trimmed) {
@@ -504597,7 +504734,7 @@ function HearthSettings({ visible, onClose }) {
504597
504734
  const res = setSecret(key3, trimmed);
504598
504735
  flashMsg(res.success ? "ok" : "err", res.success ? `stored ${key3} (${res.storage})` : "failed to store token");
504599
504736
  }, [flashMsg]);
504600
- const addAllowedUser = import_react144.useCallback((surfaceId, chatId, userId) => {
504737
+ const addAllowedUser = import_react145.useCallback((surfaceId, chatId, userId) => {
504601
504738
  const trimmedChat = chatId.trim();
504602
504739
  const trimmedUser = userId.trim();
504603
504740
  if (!trimmedChat || !trimmedUser) {
@@ -504626,7 +504763,7 @@ function HearthSettings({ visible, onClose }) {
504626
504763
  }
504627
504764
  });
504628
504765
  }, [config2, flashMsg, persist]);
504629
- const saveQuickstart = import_react144.useCallback((args2) => {
504766
+ const saveQuickstart = import_react145.useCallback((args2) => {
504630
504767
  const cwd2 = args2.cwd.trim();
504631
504768
  if (!cwd2) {
504632
504769
  flashMsg("err", "cwd required");
@@ -504725,7 +504862,7 @@ function HearthSettings({ visible, onClose }) {
504725
504862
  }, [config2, flashMsg, persist]);
504726
504863
  const surfacesList = surfaceEntries;
504727
504864
  const selectedSurface = tab === "surfaces" && surfacesList.length > 0 ? surfacesList[Math.min(cursor3, surfacesList.length - 1)] : null;
504728
- const pairingsList = import_react144.useMemo(() => {
504865
+ const pairingsList = import_react145.useMemo(() => {
504729
504866
  const out2 = [];
504730
504867
  for (const [sid, cfg] of surfaceEntries) {
504731
504868
  for (const [chatId, chat] of Object.entries(cfg.chats ?? {})) {
@@ -507102,7 +507239,7 @@ function VSep({ t: t2 }) {
507102
507239
  alignSelf: "stretch"
507103
507240
  }, undefined, false, undefined, this);
507104
507241
  }
507105
- var import_react144, MIN_WIDTH = 100, MAX_WIDTH = 150, WIDTH_RATIO = 0.92, SIDEBAR_W3 = 22, MAX_HEIGHT_RATIO = 0.9, MIN_BODY_ROWS = 18, CARD_PAD = 2, TABS3, TAB_LABEL, TAB_ICON, TAB_BLURB, PROVIDERS3, TG_FIELD_ORDER, DISCORD_FIELD_ORDER;
507242
+ var import_react145, MIN_WIDTH = 100, MAX_WIDTH = 150, WIDTH_RATIO = 0.92, SIDEBAR_W3 = 22, MAX_HEIGHT_RATIO = 0.9, MIN_BODY_ROWS = 18, CARD_PAD = 2, TABS3, TAB_LABEL, TAB_ICON, TAB_BLURB, PROVIDERS3, TG_FIELD_ORDER, DISCORD_FIELD_ORDER;
507106
507243
  var init_HearthSettings = __esm(async () => {
507107
507244
  init_icons();
507108
507245
  init_platform();
@@ -507117,7 +507254,7 @@ var init_HearthSettings = __esm(async () => {
507117
507254
  init_react2(),
507118
507255
  init_shared()
507119
507256
  ]);
507120
- import_react144 = __toESM(require_react(), 1);
507257
+ import_react145 = __toESM(require_react(), 1);
507121
507258
  TABS3 = ["surfaces", "daemon", "pairings", "logs"];
507122
507259
  TAB_LABEL = {
507123
507260
  surfaces: "Surfaces",
@@ -507740,7 +507877,7 @@ var init_installer = __esm(() => {
507740
507877
  Python: ["pyproject.toml", "setup.py", "requirements.txt", "*.py"],
507741
507878
  Go: ["go.mod", "*.go"],
507742
507879
  Rust: ["Cargo.toml", "*.rs"],
507743
- Lua: ["*.lua", ".luacheckrc"],
507880
+ Lua: ["*.lua", "*.luau", ".luacheckrc"],
507744
507881
  C: ["*.c", "*.h", "CMakeLists.txt", "Makefile"],
507745
507882
  "C++": ["*.cpp", "*.hpp", "*.cc", "CMakeLists.txt"],
507746
507883
  Ruby: ["Gemfile", "*.rb"],
@@ -507897,18 +508034,18 @@ function LspInstallSearch({
507897
508034
  }) {
507898
508035
  const t2 = useTheme();
507899
508036
  const pc = { bg: t2.bgPopup, hl: t2.bgPopupHighlight };
507900
- const [tab, setTab] = import_react146.useState(initialTab);
507901
- const [query2, setQuery] = import_react146.useState("");
507902
- const [categoryFilter, setCategoryFilter] = import_react146.useState("All");
507903
- const [allStatus, setAllStatus] = import_react146.useState([]);
507904
- const [recommended, setRecommended] = import_react146.useState([]);
507905
- const [installing, setInstalling] = import_react146.useState(false);
507906
- const [registryLoaded, setRegistryLoaded] = import_react146.useState(false);
507907
- const [registryLoading, setRegistryLoading] = import_react146.useState(false);
507908
- const [pendingToggle, setPendingToggle] = import_react146.useState(null);
508037
+ const [tab, setTab] = import_react147.useState(initialTab);
508038
+ const [query2, setQuery] = import_react147.useState("");
508039
+ const [categoryFilter, setCategoryFilter] = import_react147.useState("All");
508040
+ const [allStatus, setAllStatus] = import_react147.useState([]);
508041
+ const [recommended, setRecommended] = import_react147.useState([]);
508042
+ const [installing, setInstalling] = import_react147.useState(false);
508043
+ const [registryLoaded, setRegistryLoaded] = import_react147.useState(false);
508044
+ const [registryLoading, setRegistryLoading] = import_react147.useState(false);
508045
+ const [pendingToggle, setPendingToggle] = import_react147.useState(null);
507909
508046
  const defaultScopeCursor = detectScope("disabledLspServers") === "project" ? 0 : 1;
507910
- const [scopeCursor, setScopeCursor] = import_react146.useState(defaultScopeCursor);
507911
- const downloadAttemptedRef = import_react146.useRef(false);
508047
+ const [scopeCursor, setScopeCursor] = import_react147.useState(defaultScopeCursor);
508048
+ const downloadAttemptedRef = import_react147.useRef(false);
507912
508049
  const isInProject = existsSync62(join67(cwd2, ".git"));
507913
508050
  const { width: termCols, height: termRows } = useTerminalDimensions();
507914
508051
  const containerRows = termRows - 2;
@@ -507916,9 +508053,9 @@ function LspInstallSearch({
507916
508053
  const maxVisible = Math.max(4, Math.floor(containerRows * 0.85) - CHROME_ROWS4);
507917
508054
  const contentW = popupWidth - 22 - 3;
507918
508055
  const innerW = contentW;
507919
- const [cursor3, setCursor] = import_react146.useState(0);
507920
- const resetScroll = import_react146.useCallback(() => setCursor(0), []);
507921
- const refreshAll = import_react146.useCallback(async () => {
508056
+ const [cursor3, setCursor] = import_react147.useState(0);
508057
+ const resetScroll = import_react147.useCallback(() => setCursor(0), []);
508058
+ const refreshAll = import_react147.useCallback(async () => {
507922
508059
  setRegistryLoading(true);
507923
508060
  await new Promise((r5) => setTimeout(r5, 16));
507924
508061
  const statuses = getAllPackageStatus();
@@ -507927,7 +508064,7 @@ function LspInstallSearch({
507927
508064
  setRecommended(getRecommendedPackages(cwd2));
507928
508065
  setRegistryLoading(false);
507929
508066
  }, [cwd2]);
507930
- import_react146.useEffect(() => {
508067
+ import_react147.useEffect(() => {
507931
508068
  if (!visible)
507932
508069
  return;
507933
508070
  setTab(initialTab);
@@ -508348,7 +508485,7 @@ function LspInstallSearch({
508348
508485
  ]
508349
508486
  }, undefined, true, undefined, this);
508350
508487
  }
508351
- var import_react146, MAX_POPUP_WIDTH3 = 130, CHROME_ROWS4 = 10, TABS4, CATEGORY_FILTERS;
508488
+ var import_react147, MAX_POPUP_WIDTH3 = 130, CHROME_ROWS4 = 10, TABS4, CATEGORY_FILTERS;
508352
508489
  var init_LspInstallSearch = __esm(async () => {
508353
508490
  init_installer();
508354
508491
  init_server_registry();
@@ -508358,7 +508495,7 @@ var init_LspInstallSearch = __esm(async () => {
508358
508495
  init_react2(),
508359
508496
  init_ui2()
508360
508497
  ]);
508361
- import_react146 = __toESM(require_react(), 1);
508498
+ import_react147 = __toESM(require_react(), 1);
508362
508499
  TABS4 = ["search", "installed", "updates", "disabled", "recommended"];
508363
508500
  CATEGORY_FILTERS = ["All", "LSP", "Formatter", "Linter", "DAP"];
508364
508501
  });
@@ -508366,9 +508503,9 @@ var init_LspInstallSearch = __esm(async () => {
508366
508503
  // src/components/settings/MCPSettings.tsx
508367
508504
  import { TextAttributes as TextAttributes29 } from "@opentui/core";
508368
508505
  function useListScroll2(maxVisible, totalItems) {
508369
- const [cursor3, setCursor] = import_react148.useState(0);
508370
- const [scrollOffset, setScrollOffset] = import_react148.useState(0);
508371
- const adjustScroll = import_react148.useCallback((nextCursor) => {
508506
+ const [cursor3, setCursor] = import_react149.useState(0);
508507
+ const [scrollOffset, setScrollOffset] = import_react149.useState(0);
508508
+ const adjustScroll = import_react149.useCallback((nextCursor) => {
508372
508509
  setScrollOffset((prev) => {
508373
508510
  let next = prev;
508374
508511
  if (nextCursor < prev)
@@ -508381,7 +508518,7 @@ function useListScroll2(maxVisible, totalItems) {
508381
508518
  return Math.max(0, next);
508382
508519
  });
508383
508520
  }, [maxVisible, totalItems]);
508384
- const resetScroll = import_react148.useCallback(() => {
508521
+ const resetScroll = import_react149.useCallback(() => {
508385
508522
  setCursor(0);
508386
508523
  setScrollOffset(0);
508387
508524
  }, []);
@@ -508517,29 +508654,29 @@ function MCPSettings({
508517
508654
  const maxVisibleRows = Math.max(6, containerRows - CHROME_ROWS5);
508518
508655
  const serverPageSize = Math.max(2, Math.floor(maxVisibleRows / 3));
508519
508656
  const toolPageSize = Math.max(3, Math.floor(maxVisibleRows / 2));
508520
- const projectSet = import_react148.useMemo(() => new Set(projectServers.map((s2) => s2.name)), [projectServers]);
508521
- const scopeOf = import_react148.useCallback((n2) => projectSet.has(n2) ? "project" : "global", [projectSet]);
508657
+ const projectSet = import_react149.useMemo(() => new Set(projectServers.map((s2) => s2.name)), [projectServers]);
508658
+ const scopeOf = import_react149.useCallback((n2) => projectSet.has(n2) ? "project" : "global", [projectSet]);
508522
508659
  const runtimeServers = useMCPStore((s2) => s2.servers);
508523
- const serverList = import_react148.useMemo(() => Object.values(runtimeServers), [runtimeServers]);
508524
- const allTools = import_react148.useMemo(() => serverList.flatMap((s2) => s2.tools.map((ti) => ({ ...ti, serverStatus: s2.status }))), [serverList]);
508660
+ const serverList = import_react149.useMemo(() => Object.values(runtimeServers), [runtimeServers]);
508661
+ const allTools = import_react149.useMemo(() => serverList.flatMap((s2) => s2.tools.map((ti) => ({ ...ti, serverStatus: s2.status }))), [serverList]);
508525
508662
  const readyCount = serverList.filter((s2) => s2.status === "ready").length;
508526
- const [view, setView] = import_react148.useState("list");
508527
- const [toolFilter, setToolFilter] = import_react148.useState("");
508528
- const [serverFilter, setServerFilter] = import_react148.useState("");
508529
- const [draft, setDraft] = import_react148.useState({ ...EMPTY });
508530
- const [activeField, setActiveField] = import_react148.useState("name");
508531
- const [editingName, setEditingName] = import_react148.useState(null);
508532
- const [detailName, setDetailName] = import_react148.useState(null);
508533
- const [errorExpanded, setErrorExpanded] = import_react148.useState(false);
508534
- const [pendingDelete, setPendingDelete] = import_react148.useState(null);
508535
- const [deleteChoice, setDeleteChoice] = import_react148.useState("no");
508536
- const filteredTools = import_react148.useMemo(() => {
508663
+ const [view, setView] = import_react149.useState("list");
508664
+ const [toolFilter, setToolFilter] = import_react149.useState("");
508665
+ const [serverFilter, setServerFilter] = import_react149.useState("");
508666
+ const [draft, setDraft] = import_react149.useState({ ...EMPTY });
508667
+ const [activeField, setActiveField] = import_react149.useState("name");
508668
+ const [editingName, setEditingName] = import_react149.useState(null);
508669
+ const [detailName, setDetailName] = import_react149.useState(null);
508670
+ const [errorExpanded, setErrorExpanded] = import_react149.useState(false);
508671
+ const [pendingDelete, setPendingDelete] = import_react149.useState(null);
508672
+ const [deleteChoice, setDeleteChoice] = import_react149.useState("no");
508673
+ const filteredTools = import_react149.useMemo(() => {
508537
508674
  if (!toolFilter)
508538
508675
  return allTools;
508539
508676
  const q3 = toolFilter.toLowerCase();
508540
508677
  return allTools.filter((ti) => ti.name.toLowerCase().includes(q3) || ti.description.toLowerCase().includes(q3) || ti.serverName.toLowerCase().includes(q3));
508541
508678
  }, [allTools, toolFilter]);
508542
- const filteredServers = import_react148.useMemo(() => {
508679
+ const filteredServers = import_react149.useMemo(() => {
508543
508680
  if (!serverFilter)
508544
508681
  return serverList;
508545
508682
  const q3 = serverFilter.toLowerCase();
@@ -508548,13 +508685,13 @@ function MCPSettings({
508548
508685
  const pageSize = view === "list" ? serverPageSize : toolPageSize;
508549
508686
  const listCount = view === "list" ? filteredServers.length : view === "tools" ? filteredTools.length : 0;
508550
508687
  const { cursor: cursor3, setCursor, scrollOffset, adjustScroll, resetScroll } = useListScroll2(pageSize, listCount);
508551
- import_react148.useEffect(() => {
508688
+ import_react149.useEffect(() => {
508552
508689
  resetScroll();
508553
508690
  }, [resetScroll]);
508554
- import_react148.useEffect(() => {
508691
+ import_react149.useEffect(() => {
508555
508692
  resetScroll();
508556
508693
  }, [serverFilter, toolFilter, resetScroll]);
508557
- import_react148.useEffect(() => {
508694
+ import_react149.useEffect(() => {
508558
508695
  if (visible) {
508559
508696
  setView("list");
508560
508697
  setToolFilter("");
@@ -508569,13 +508706,13 @@ function MCPSettings({
508569
508706
  resetScroll();
508570
508707
  }
508571
508708
  }, [visible, resetScroll]);
508572
- const openAdd = import_react148.useCallback(() => {
508709
+ const openAdd = import_react149.useCallback(() => {
508573
508710
  setDraft({ ...EMPTY });
508574
508711
  setActiveField("name");
508575
508712
  setEditingName(null);
508576
508713
  setView("form");
508577
508714
  }, []);
508578
- const openEdit = import_react148.useCallback((name30) => {
508715
+ const openEdit = import_react149.useCallback((name30) => {
508579
508716
  const scope = scopeOf(name30);
508580
508717
  const list = scope === "project" ? projectServers : globalServers;
508581
508718
  const cfg = list.find((s2) => s2.name === name30);
@@ -508586,7 +508723,7 @@ function MCPSettings({
508586
508723
  setEditingName(name30);
508587
508724
  setView("form");
508588
508725
  }, [scopeOf, projectServers, globalServers]);
508589
- const commitForm = import_react148.useCallback(() => {
508726
+ const commitForm = import_react149.useCallback(() => {
508590
508727
  if (!draft.name.trim())
508591
508728
  return;
508592
508729
  const cfg = draftToConfig(draft);
@@ -508596,13 +508733,13 @@ function MCPSettings({
508596
508733
  onSave(updated, scope);
508597
508734
  setView("list");
508598
508735
  }, [draft, editingName, projectServers, globalServers, onSave]);
508599
- const deleteServer = import_react148.useCallback((name30) => {
508736
+ const deleteServer = import_react149.useCallback((name30) => {
508600
508737
  const scope = scopeOf(name30);
508601
508738
  const list = scope === "project" ? projectServers : globalServers;
508602
508739
  onSave(list.filter((s2) => s2.name !== name30), scope);
508603
508740
  setCursor((c3) => Math.max(0, Math.min(c3, filteredServers.length - 2)));
508604
508741
  }, [scopeOf, projectServers, globalServers, onSave, setCursor, filteredServers.length]);
508605
- const toggleDisabled = import_react148.useCallback((name30) => {
508742
+ const toggleDisabled = import_react149.useCallback((name30) => {
508606
508743
  const scope = scopeOf(name30);
508607
508744
  const list = scope === "project" ? projectServers : globalServers;
508608
508745
  const srv = list.find((s2) => s2.name === name30);
@@ -509185,7 +509322,7 @@ function FormBody({
509185
509322
  const t2 = useTheme();
509186
509323
  const fields = fieldsFor(draft.transport);
509187
509324
  const inputW = Math.max(30, innerW - 8);
509188
- const advanceField = import_react148.useCallback(() => {
509325
+ const advanceField = import_react149.useCallback(() => {
509189
509326
  const idx = fields.indexOf(activeField);
509190
509327
  const next = fields[idx + 1];
509191
509328
  if (next)
@@ -509309,7 +509446,7 @@ function FormBody({
509309
509446
  ]
509310
509447
  }, undefined, true, undefined, this);
509311
509448
  }
509312
- var import_react148, STATUS_LABEL, TRANSPORTS, TRANSPORT_LABEL, EMPTY, LABEL, HINT, MAX_WIDTH2 = 96, CHROME_ROWS5 = 8, MCP_TABS, TabRow, EmptyState, ServerCard, ToolBrowser;
509449
+ var import_react149, STATUS_LABEL, TRANSPORTS, TRANSPORT_LABEL, EMPTY, LABEL, HINT, MAX_WIDTH2 = 96, CHROME_ROWS5 = 8, MCP_TABS, TabRow, EmptyState, ServerCard, ToolBrowser;
509313
509450
  var init_MCPSettings = __esm(async () => {
509314
509451
  init_icons();
509315
509452
  init_theme();
@@ -509320,7 +509457,7 @@ var init_MCPSettings = __esm(async () => {
509320
509457
  init_shared(),
509321
509458
  init_ui2()
509322
509459
  ]);
509323
- import_react148 = __toESM(require_react(), 1);
509460
+ import_react149 = __toESM(require_react(), 1);
509324
509461
  STATUS_LABEL = {
509325
509462
  disconnected: "offline",
509326
509463
  connecting: "connecting\u2026",
@@ -509364,7 +509501,7 @@ var init_MCPSettings = __esm(async () => {
509364
509501
  { id: "list", label: "Servers", ic: "server" },
509365
509502
  { id: "tools", label: "Tools", ic: "mcp_tool" }
509366
509503
  ];
509367
- TabRow = import_react148.memo(function TabRow2({ view, innerW }) {
509504
+ TabRow = import_react149.memo(function TabRow2({ view, innerW }) {
509368
509505
  const t2 = useTheme();
509369
509506
  return /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("box", {
509370
509507
  flexDirection: "row",
@@ -509384,7 +509521,7 @@ var init_MCPSettings = __esm(async () => {
509384
509521
  }, undefined, false, undefined, this)
509385
509522
  }, undefined, false, undefined, this);
509386
509523
  });
509387
- EmptyState = import_react148.memo(function EmptyState2({ innerW: _innerW }) {
509524
+ EmptyState = import_react149.memo(function EmptyState2({ innerW: _innerW }) {
509388
509525
  const t2 = useTheme();
509389
509526
  return /* @__PURE__ */ import_jsx_dev_runtime2.jsxDEV("box", {
509390
509527
  flexDirection: "column",
@@ -509423,7 +509560,7 @@ var init_MCPSettings = __esm(async () => {
509423
509560
  ]
509424
509561
  }, undefined, true, undefined, this);
509425
509562
  });
509426
- ServerCard = import_react148.memo(function ServerCard2({
509563
+ ServerCard = import_react149.memo(function ServerCard2({
509427
509564
  server: server2,
509428
509565
  scope,
509429
509566
  isSelected,
@@ -509600,7 +509737,7 @@ var init_MCPSettings = __esm(async () => {
509600
509737
  ]
509601
509738
  }, undefined, true, undefined, this);
509602
509739
  });
509603
- ToolBrowser = import_react148.memo(function ToolBrowser2({
509740
+ ToolBrowser = import_react149.memo(function ToolBrowser2({
509604
509741
  tools,
509605
509742
  filter: filter7,
509606
509743
  cursor: cursor3,
@@ -509743,9 +509880,9 @@ function ModelEventsPopup({ visible, onClose }) {
509743
509880
  const events = useModelEventsStore((s2) => s2.events);
509744
509881
  const setEnabled = useModelEventsStore((s2) => s2.setEnabled);
509745
509882
  const clear = useModelEventsStore((s2) => s2.clear);
509746
- const [tab, setTab] = import_react150.useState("Models");
509747
- const [now2, setNow] = import_react150.useState(Date.now());
509748
- import_react150.useEffect(() => {
509883
+ const [tab, setTab] = import_react151.useState("Models");
509884
+ const [now2, setNow] = import_react151.useState(Date.now());
509885
+ import_react151.useEffect(() => {
509749
509886
  if (!visible)
509750
509887
  return;
509751
509888
  const i5 = setInterval(() => setNow(Date.now()), 1000);
@@ -509781,9 +509918,9 @@ function ModelEventsPopup({ visible, onClose }) {
509781
509918
  }
509782
509919
  evt.preventDefault();
509783
509920
  });
509784
- const aggregates = import_react150.useMemo(() => aggregateModelEvents(events), [events]);
509785
- const errors4 = import_react150.useMemo(() => modelErrorEvents(events), [events]);
509786
- const recent = import_react150.useMemo(() => [...events].reverse().slice(0, 200), [events]);
509921
+ const aggregates = import_react151.useMemo(() => aggregateModelEvents(events), [events]);
509922
+ const errors4 = import_react151.useMemo(() => modelErrorEvents(events), [events]);
509923
+ const recent = import_react151.useMemo(() => [...events].reverse().slice(0, 200), [events]);
509787
509924
  if (!visible)
509788
509925
  return null;
509789
509926
  const sidebarTabs = TABS5.map((id) => ({
@@ -509942,7 +510079,7 @@ function ModelEventsPopup({ visible, onClose }) {
509942
510079
  ]
509943
510080
  }, undefined, true, undefined, this);
509944
510081
  }
509945
- var import_react150, BOLD18 = 1, TABS5;
510082
+ var import_react151, BOLD18 = 1, TABS5;
509946
510083
  var init_ModelEventsPopup = __esm(async () => {
509947
510084
  init_icons();
509948
510085
  init_theme();
@@ -509952,7 +510089,7 @@ var init_ModelEventsPopup = __esm(async () => {
509952
510089
  init_react2(),
509953
510090
  init_ui2()
509954
510091
  ]);
509955
- import_react150 = __toESM(require_react(), 1);
510092
+ import_react151 = __toESM(require_react(), 1);
509956
510093
  TABS5 = ["Models", "Recent", "Errors"];
509957
510094
  });
509958
510095
 
@@ -510145,19 +510282,19 @@ function ProviderSettings({
510145
510282
  const popupWidth = Math.min(MAX_POPUP_WIDTH4, Math.floor(termCols * 0.85));
510146
510283
  const maxVisible = Math.max(6, Math.floor(containerRows * 0.85) - CHROME_ROWS6);
510147
510284
  const t2 = useTheme();
510148
- const [tab, setTab] = import_react152.useState("claude");
510149
- const [cursor3, setCursor] = import_react152.useState(0);
510150
- const [scope, setScope] = import_react152.useState(() => detectInitialScope(projectConfig));
510285
+ const [tab, setTab] = import_react153.useState("claude");
510286
+ const [cursor3, setCursor] = import_react153.useState(0);
510287
+ const [scope, setScope] = import_react153.useState(() => detectInitialScope(projectConfig));
510151
510288
  const vals = effectiveValues(globalConfig2, projectConfig);
510152
510289
  const activeModel = projectConfig?.defaultModel ?? globalConfig2.defaultModel ?? "";
510153
510290
  const items = TAB_ITEMS[tab];
510154
510291
  const tabIdx = TABS6.indexOf(tab);
510155
510292
  const firstRowIdx = items.findIndex((i5) => i5.type !== "section" && i5.type !== "info");
510156
- import_react152.useEffect(() => {
510293
+ import_react153.useEffect(() => {
510157
510294
  if (visible)
510158
510295
  setScope(detectInitialScope(projectConfig));
510159
510296
  }, [visible, projectConfig]);
510160
- import_react152.useEffect(() => {
510297
+ import_react153.useEffect(() => {
510161
510298
  setCursor(Math.max(0, firstRowIdx));
510162
510299
  }, [tab]);
510163
510300
  const isBudgetDisabled = vals.thinkingMode !== "enabled";
@@ -510495,7 +510632,7 @@ function ProviderSettings({
510495
510632
  ]
510496
510633
  }, undefined, true, undefined, this);
510497
510634
  }
510498
- var import_react152, MAX_POPUP_WIDTH4 = 110, CHROME_ROWS6 = 10, TABS6, CLAUDE_ITEMS, OPENAI_ITEMS, GENERAL_ITEMS, GOOGLE_ITEMS, XAI_ITEMS, DEEPSEEK_ITEMS, OPENROUTER_ITEMS, COMPAT_ITEMS, TAB_ITEMS, DEFAULTS, EFFORT_KEY_MODELS;
510635
+ var import_react153, MAX_POPUP_WIDTH4 = 110, CHROME_ROWS6 = 10, TABS6, CLAUDE_ITEMS, OPENAI_ITEMS, GENERAL_ITEMS, GOOGLE_ITEMS, XAI_ITEMS, DEEPSEEK_ITEMS, OPENROUTER_ITEMS, COMPAT_ITEMS, TAB_ITEMS, DEFAULTS, EFFORT_KEY_MODELS;
510499
510636
  var init_ProviderSettings = __esm(async () => {
510500
510637
  init_provider_options();
510501
510638
  init_theme();
@@ -510505,7 +510642,7 @@ var init_ProviderSettings = __esm(async () => {
510505
510642
  init_shared(),
510506
510643
  init_ui2()
510507
510644
  ]);
510508
- import_react152 = __toESM(require_react(), 1);
510645
+ import_react153 = __toESM(require_react(), 1);
510509
510646
  TABS6 = [
510510
510647
  "claude",
510511
510648
  "openai",
@@ -510887,20 +511024,20 @@ function RepoMapStatusPopup({
510887
511024
  const { width: termCols, height: termRows } = useTerminalDimensions();
510888
511025
  const popupWidth = Math.min(POPUP_W, Math.floor(termCols * 0.8));
510889
511026
  const innerW = popupWidth - 2;
510890
- const stateRef = import_react154.useRef(useRepoMapStore.getState());
510891
- const [, setRenderTick] = import_react154.useState(0);
510892
- const spinnerRef = import_react154.useRef(0);
510893
- const bodyScrollRef = import_react154.useRef(null);
511027
+ const stateRef = import_react155.useRef(useRepoMapStore.getState());
511028
+ const [, setRenderTick] = import_react155.useState(0);
511029
+ const spinnerRef = import_react155.useRef(0);
511030
+ const bodyScrollRef = import_react155.useRef(null);
510894
511031
  const initialMode = currentMode ?? "off";
510895
511032
  const initialLimit = currentLimit ?? 300;
510896
- const [selectedMode, setSelectedMode] = import_react154.useState(initialMode);
510897
- const [selectedLimit, setSelectedLimit] = import_react154.useState(initialLimit);
510898
- const [selectedAutoRegen, setSelectedAutoRegen] = import_react154.useState(currentAutoRegen ?? false);
510899
- const [selectedTokenBudget, setSelectedTokenBudget] = import_react154.useState(currentTokenBudget);
510900
- const [selectedScope, setSelectedScope] = import_react154.useState(currentScope ?? "project");
510901
- const [focusRow, setFocusRow] = import_react154.useState(0 /* Mode */);
510902
- const [confirmClear, setConfirmClear] = import_react154.useState(false);
510903
- import_react154.useEffect(() => {
511033
+ const [selectedMode, setSelectedMode] = import_react155.useState(initialMode);
511034
+ const [selectedLimit, setSelectedLimit] = import_react155.useState(initialLimit);
511035
+ const [selectedAutoRegen, setSelectedAutoRegen] = import_react155.useState(currentAutoRegen ?? false);
511036
+ const [selectedTokenBudget, setSelectedTokenBudget] = import_react155.useState(currentTokenBudget);
511037
+ const [selectedScope, setSelectedScope] = import_react155.useState(currentScope ?? "project");
511038
+ const [focusRow, setFocusRow] = import_react155.useState(0 /* Mode */);
511039
+ const [confirmClear, setConfirmClear] = import_react155.useState(false);
511040
+ import_react155.useEffect(() => {
510904
511041
  if (!visible)
510905
511042
  return;
510906
511043
  setSelectedMode(currentMode ?? "off");
@@ -510911,7 +511048,7 @@ function RepoMapStatusPopup({
510911
511048
  setFocusRow(0 /* Mode */);
510912
511049
  setConfirmClear(false);
510913
511050
  }, [visible, currentMode, currentLimit, currentAutoRegen, currentTokenBudget, currentScope]);
510914
- import_react154.useEffect(() => {
511051
+ import_react155.useEffect(() => {
510915
511052
  if (!visible)
510916
511053
  return;
510917
511054
  stateRef.current = useRepoMapStore.getState();
@@ -510921,7 +511058,7 @@ function RepoMapStatusPopup({
510921
511058
  setRenderTick((n2) => n2 + 1);
510922
511059
  });
510923
511060
  }, [visible]);
510924
- import_react154.useEffect(() => {
511061
+ import_react155.useEffect(() => {
510925
511062
  if (!visible)
510926
511063
  return;
510927
511064
  const timer = setInterval(() => {
@@ -510933,7 +511070,7 @@ function RepoMapStatusPopup({
510933
511070
  }, 150);
510934
511071
  return () => clearInterval(timer);
510935
511072
  }, [visible]);
510936
- import_react154.useEffect(() => {
511073
+ import_react155.useEffect(() => {
510937
511074
  if (!visible)
510938
511075
  return;
510939
511076
  const sb = bodyScrollRef.current;
@@ -511322,7 +511459,7 @@ function RepoMapStatusPopup({
511322
511459
  }, undefined, true, undefined, this)
511323
511460
  }, undefined, false, undefined, this);
511324
511461
  }
511325
- var import_react154, LABEL_W = 18, POPUP_W = 72, SEMANTIC_MODES, MODE_DESCRIPTIONS, MODE_LABELS2, LLM_LIMIT_PRESETS, TOKEN_BUDGET_PRESETS;
511462
+ var import_react155, LABEL_W = 18, POPUP_W = 72, SEMANTIC_MODES, MODE_DESCRIPTIONS, MODE_LABELS2, LLM_LIMIT_PRESETS, TOKEN_BUDGET_PRESETS;
511326
511463
  var init_RepoMapStatusPopup = __esm(async () => {
511327
511464
  init_theme();
511328
511465
  init_repomap();
@@ -511333,7 +511470,7 @@ var init_RepoMapStatusPopup = __esm(async () => {
511333
511470
  init_shared(),
511334
511471
  init_ui2()
511335
511472
  ]);
511336
- import_react154 = __toESM(require_react(), 1);
511473
+ import_react155 = __toESM(require_react(), 1);
511337
511474
  SEMANTIC_MODES = ["off", "ast", "synthetic", "llm", "full"];
511338
511475
  MODE_DESCRIPTIONS = {
511339
511476
  off: "disabled",
@@ -511378,11 +511515,11 @@ function RouterSettings({
511378
511515
  }) {
511379
511516
  const t2 = useTheme();
511380
511517
  const { width: tw2, height: th } = useTerminalDimensions();
511381
- const [cursor3, setCursor] = import_react156.useState(0);
511518
+ const [cursor3, setCursor] = import_react157.useState(0);
511382
511519
  const popupW = Math.min(100, Math.max(72, Math.floor(tw2 * 0.78)));
511383
511520
  const popupH = Math.min(40, Math.max(26, th - 4));
511384
511521
  const contentW = popupW - 4;
511385
- const modelsInUse = import_react156.useMemo(() => {
511522
+ const modelsInUse = import_react157.useMemo(() => {
511386
511523
  const set3 = new Set;
511387
511524
  if (defaultModel)
511388
511525
  set3.add(defaultModel);
@@ -511405,7 +511542,7 @@ function RouterSettings({
511405
511542
  }
511406
511543
  return Array.from(set3);
511407
511544
  }, [router2, defaultModel]);
511408
- const rows = import_react156.useMemo(() => {
511545
+ const rows = import_react157.useMemo(() => {
511409
511546
  const out2 = [];
511410
511547
  for (const s2 of SECTIONS) {
511411
511548
  out2.push({ kind: "header", section: s2 });
@@ -511424,7 +511561,7 @@ function RouterSettings({
511424
511561
  }
511425
511562
  return out2;
511426
511563
  }, [modelsInUse]);
511427
- const selectableIndices = import_react156.useMemo(() => rows.map((r5, i5) => r5.kind === "header" ? -1 : i5).filter((i5) => i5 >= 0), [rows]);
511564
+ const selectableIndices = import_react157.useMemo(() => rows.map((r5, i5) => r5.kind === "header" ? -1 : i5).filter((i5) => i5 >= 0), [rows]);
511428
511565
  const moveItem = (dir) => {
511429
511566
  if (selectableIndices.length === 0)
511430
511567
  return;
@@ -511433,7 +511570,7 @@ function RouterSettings({
511433
511570
  const nextPos = (base + dir + selectableIndices.length) % selectableIndices.length;
511434
511571
  setCursor(selectableIndices[nextPos] ?? selectableIndices[0] ?? 0);
511435
511572
  };
511436
- import_react156.useMemo(() => {
511573
+ import_react157.useMemo(() => {
511437
511574
  if (cursor3 === 0 && selectableIndices.length > 0 && selectableIndices[0] !== 0) {
511438
511575
  setCursor(selectableIndices[0] ?? 0);
511439
511576
  }
@@ -511659,7 +511796,7 @@ function RouterSettings({
511659
511796
  }, undefined, true, undefined, this)
511660
511797
  }, undefined, false, undefined, this);
511661
511798
  }
511662
- var import_react156, BOLD19 = 1, SECTIONS, ALL_DEFS;
511799
+ var import_react157, BOLD19 = 1, SECTIONS, ALL_DEFS;
511663
511800
  var init_RouterSettings = __esm(async () => {
511664
511801
  init_theme();
511665
511802
  init_jsx_dev_runtime();
@@ -511668,7 +511805,7 @@ var init_RouterSettings = __esm(async () => {
511668
511805
  init_shared(),
511669
511806
  init_ui2()
511670
511807
  ]);
511671
- import_react156 = __toESM(require_react(), 1);
511808
+ import_react157 = __toESM(require_react(), 1);
511672
511809
  SECTIONS = [
511673
511810
  {
511674
511811
  id: "main",
@@ -511894,25 +512031,25 @@ function SkillSearch({ visible, contextManager, onClose, onSystemMessage }) {
511894
512031
  const t2 = useTheme();
511895
512032
  const popupBg = t2.bgPopup;
511896
512033
  const popupHl = t2.bgPopupHighlight;
511897
- const [tab, setTab] = import_react158.useState("search");
511898
- const [query2, setQuery] = import_react158.useState("");
511899
- const [popular, setPopular] = import_react158.useState([]);
511900
- const [results, setResults] = import_react158.useState([]);
511901
- const [installed2, setInstalled] = import_react158.useState([]);
511902
- const [activeSkills, setActiveSkills] = import_react158.useState([]);
511903
- const [searching, setSearching] = import_react158.useState(false);
511904
- const [installing, setInstalling] = import_react158.useState(false);
511905
- const [pendingInstall, setPendingInstall] = import_react158.useState(null);
511906
- const [scopeCursor, setScopeCursor] = import_react158.useState(0);
511907
- const debounceRef = import_react158.useRef(null);
512034
+ const [tab, setTab] = import_react159.useState("search");
512035
+ const [query2, setQuery] = import_react159.useState("");
512036
+ const [popular, setPopular] = import_react159.useState([]);
512037
+ const [results, setResults] = import_react159.useState([]);
512038
+ const [installed2, setInstalled] = import_react159.useState([]);
512039
+ const [activeSkills, setActiveSkills] = import_react159.useState([]);
512040
+ const [searching, setSearching] = import_react159.useState(false);
512041
+ const [installing, setInstalling] = import_react159.useState(false);
512042
+ const [pendingInstall, setPendingInstall] = import_react159.useState(null);
512043
+ const [scopeCursor, setScopeCursor] = import_react159.useState(0);
512044
+ const debounceRef = import_react159.useRef(null);
511908
512045
  const isInProject = existsSync63(join68(getCwd(), ".git"));
511909
512046
  const { width: termCols, height: termRows } = useTerminalDimensions();
511910
512047
  const containerRows = termRows - 2;
511911
512048
  const popupWidth = Math.min(MAX_POPUP_WIDTH5, Math.floor(termCols * 0.88));
511912
512049
  const maxVisible = Math.max(4, Math.floor(containerRows * 0.85) - CHROME_ROWS7);
511913
512050
  const contentW = popupWidth - 22 - 3;
511914
- const [cursor3, setCursor] = import_react158.useState(0);
511915
- const resetScroll = import_react158.useCallback(() => setCursor(0), []);
512051
+ const [cursor3, setCursor] = import_react159.useState(0);
512052
+ const resetScroll = import_react159.useCallback(() => setCursor(0), []);
511916
512053
  const filterQuery = query2.toLowerCase().trim();
511917
512054
  const installedNames = new Set(installed2.map((s2) => s2.name));
511918
512055
  const filteredInstalled = filterQuery ? installed2.filter((s2) => s2.name.toLowerCase().includes(filterQuery)) : installed2;
@@ -511925,13 +512062,13 @@ function SkillSearch({ visible, contextManager, onClose, onSystemMessage }) {
511925
512062
  return filteredInstalled.length;
511926
512063
  return filteredActive.length;
511927
512064
  })();
511928
- const refreshInstalled = import_react158.useCallback(() => {
512065
+ const refreshInstalled = import_react159.useCallback(() => {
511929
512066
  setInstalled(listInstalledSkills());
511930
512067
  }, []);
511931
- const refreshActive = import_react158.useCallback(() => {
512068
+ const refreshActive = import_react159.useCallback(() => {
511932
512069
  setActiveSkills(contextManager.getActiveSkills());
511933
512070
  }, [contextManager]);
511934
- import_react158.useEffect(() => {
512071
+ import_react159.useEffect(() => {
511935
512072
  if (visible) {
511936
512073
  setTab("search");
511937
512074
  setQuery("");
@@ -511942,7 +512079,7 @@ function SkillSearch({ visible, contextManager, onClose, onSystemMessage }) {
511942
512079
  listPopularSkills().then((r5) => setPopular(r5)).catch(() => {});
511943
512080
  }
511944
512081
  }, [visible, refreshActive, refreshInstalled]);
511945
- import_react158.useEffect(() => {
512082
+ import_react159.useEffect(() => {
511946
512083
  if (!visible || tab !== "search")
511947
512084
  return;
511948
512085
  if (debounceRef.current)
@@ -511968,7 +512105,7 @@ function SkillSearch({ visible, contextManager, onClose, onSystemMessage }) {
511968
512105
  clearTimeout(debounceRef.current);
511969
512106
  };
511970
512107
  }, [query2, visible, tab, popular.length]);
511971
- import_react158.useEffect(() => {
512108
+ import_react159.useEffect(() => {
511972
512109
  setQuery("");
511973
512110
  setResults([]);
511974
512111
  resetScroll();
@@ -512283,7 +512420,7 @@ function SkillSearch({ visible, contextManager, onClose, onSystemMessage }) {
512283
512420
  ]
512284
512421
  }, undefined, true, undefined, this);
512285
512422
  }
512286
- var import_react158, MAX_POPUP_WIDTH5 = 120, CHROME_ROWS7 = 9, TABS7;
512423
+ var import_react159, MAX_POPUP_WIDTH5 = 120, CHROME_ROWS7 = 9, TABS7;
512287
512424
  var init_SkillSearch = __esm(async () => {
512288
512425
  init_cwd();
512289
512426
  init_manager5();
@@ -512293,23 +512430,23 @@ var init_SkillSearch = __esm(async () => {
512293
512430
  init_react2(),
512294
512431
  init_ui2()
512295
512432
  ]);
512296
- import_react158 = __toESM(require_react(), 1);
512433
+ import_react159 = __toESM(require_react(), 1);
512297
512434
  TABS7 = ["search", "installed", "active"];
512298
512435
  });
512299
512436
 
512300
512437
  // src/components/settings/ToolsPopup.tsx
512301
512438
  function ToolsPopup({ visible, disabledTools, onToggleTool, onClose }) {
512302
512439
  const { width: tw2, height: th } = useTerminalDimensions();
512303
- const [cursor3, setCursor] = import_react160.useState(0);
512304
- const catalog = import_react160.useMemo(() => getToolCatalog(), []);
512305
- import_react160.useEffect(() => {
512440
+ const [cursor3, setCursor] = import_react161.useState(0);
512441
+ const catalog = import_react161.useMemo(() => getToolCatalog(), []);
512442
+ import_react161.useEffect(() => {
512306
512443
  if (visible)
512307
512444
  setCursor(0);
512308
512445
  }, [visible]);
512309
512446
  const popupW = Math.min(110, Math.max(72, tw2 - 4));
512310
512447
  const popupH = Math.min(32, Math.max(16, th - 4));
512311
512448
  const contentW = popupW - 4;
512312
- const groups = import_react160.useMemo(() => {
512449
+ const groups = import_react161.useMemo(() => {
512313
512450
  return [
512314
512451
  {
512315
512452
  id: "tools",
@@ -512325,7 +512462,7 @@ function ToolsPopup({ visible, disabledTools, onToggleTool, onClose }) {
512325
512462
  }
512326
512463
  ];
512327
512464
  }, [disabledTools, catalog]);
512328
- const rows = import_react160.useMemo(() => buildGroupedRows(groups, new Set(["tools"])), [groups]);
512465
+ const rows = import_react161.useMemo(() => buildGroupedRows(groups, new Set(["tools"])), [groups]);
512329
512466
  useKeyboard((evt) => {
512330
512467
  if (!visible)
512331
512468
  return;
@@ -512372,7 +512509,7 @@ function ToolsPopup({ visible, disabledTools, onToggleTool, onClose }) {
512372
512509
  }, undefined, false, undefined, this)
512373
512510
  }, undefined, false, undefined, this);
512374
512511
  }
512375
- var import_react160;
512512
+ var import_react161;
512376
512513
  var init_ToolsPopup = __esm(async () => {
512377
512514
  init_constants();
512378
512515
  init_jsx_dev_runtime();
@@ -512380,7 +512517,7 @@ var init_ToolsPopup = __esm(async () => {
512380
512517
  init_react2(),
512381
512518
  init_ui2()
512382
512519
  ]);
512383
- import_react160 = __toESM(require_react(), 1);
512520
+ import_react161 = __toESM(require_react(), 1);
512384
512521
  });
512385
512522
 
512386
512523
  // src/components/modals/MemoryBrowser.tsx
@@ -512427,29 +512564,29 @@ function MemoryBrowser({ visible, contextManager, cwd: cwd2, onClose, onSystemMe
512427
512564
  const popupH = Math.min(36, Math.max(20, th - 4));
512428
512565
  const SIDEBAR_W4 = 22;
512429
512566
  const contentW = popupW - SIDEBAR_W4 - 9;
512430
- const [tab, setTab] = import_react162.useState("All");
512431
- const [query2, setQuery] = import_react162.useState("");
512432
- const [cursor3, setCursor] = import_react162.useState(0);
512433
- const [generation, setGeneration] = import_react162.useState(0);
512434
- const [flash, setFlash] = import_react162.useState(null);
512435
- const [confirmPurge, setConfirmPurge] = import_react162.useState(false);
512436
- const [cleanupRows, setCleanupRows] = import_react162.useState([]);
512437
- const [cleanupSelected, setCleanupSelected] = import_react162.useState(new Map);
512438
- const [settingsModal, setSettingsModal] = import_react162.useState(null);
512439
- const cursorRef = import_react162.useRef(0);
512567
+ const [tab, setTab] = import_react163.useState("All");
512568
+ const [query2, setQuery] = import_react163.useState("");
512569
+ const [cursor3, setCursor] = import_react163.useState(0);
512570
+ const [generation, setGeneration] = import_react163.useState(0);
512571
+ const [flash, setFlash] = import_react163.useState(null);
512572
+ const [confirmPurge, setConfirmPurge] = import_react163.useState(false);
512573
+ const [cleanupRows, setCleanupRows] = import_react163.useState([]);
512574
+ const [cleanupSelected, setCleanupSelected] = import_react163.useState(new Map);
512575
+ const [settingsModal, setSettingsModal] = import_react163.useState(null);
512576
+ const cursorRef = import_react163.useRef(0);
512440
512577
  cursorRef.current = cursor3;
512441
- const popFlash = import_react162.useCallback((kind, message) => {
512578
+ const popFlash = import_react163.useCallback((kind, message) => {
512442
512579
  setFlash({ kind, message });
512443
512580
  setTimeout(() => setFlash(null), 1800);
512444
512581
  }, []);
512445
- const fileExists = import_react162.useCallback((p4) => {
512582
+ const fileExists = import_react163.useCallback((p4) => {
512446
512583
  try {
512447
512584
  return existsSync64(join69(cwd2, p4));
512448
512585
  } catch {
512449
512586
  return false;
512450
512587
  }
512451
512588
  }, [cwd2]);
512452
- const refreshCleanup = import_react162.useCallback(() => {
512589
+ const refreshCleanup = import_react163.useCallback(() => {
512453
512590
  const dupes = memMgr.findDuplicates("all");
512454
512591
  const dead = memMgr.findDeadFileRefs("all", fileExists);
512455
512592
  const stale = memMgr.staleCandidates("all", 25);
@@ -512523,7 +512660,7 @@ function MemoryBrowser({ visible, contextManager, cwd: cwd2, onClose, onSystemMe
512523
512660
  setCleanupRows(rows);
512524
512661
  setCleanupSelected(new Map);
512525
512662
  }, [memMgr, fileExists]);
512526
- import_react162.useEffect(() => {
512663
+ import_react163.useEffect(() => {
512527
512664
  if (!visible)
512528
512665
  return;
512529
512666
  setQuery("");
@@ -512534,13 +512671,13 @@ function MemoryBrowser({ visible, contextManager, cwd: cwd2, onClose, onSystemMe
512534
512671
  if (tab === "Cleanup")
512535
512672
  refreshCleanup();
512536
512673
  }, [visible, tab, refreshCleanup]);
512537
- const allRows = import_react162.useMemo(() => {
512674
+ const allRows = import_react163.useMemo(() => {
512538
512675
  return memMgr.list("all", { includeHidden: false }).map(toRow2);
512539
512676
  }, [memMgr, generation]);
512540
- const hiddenRows = import_react162.useMemo(() => {
512677
+ const hiddenRows = import_react163.useMemo(() => {
512541
512678
  return memMgr.list("all", { includeHidden: true }).filter((m6) => m6.hidden).map(toRow2);
512542
512679
  }, [memMgr, generation]);
512543
- const filteredRows = import_react162.useMemo(() => {
512680
+ const filteredRows = import_react163.useMemo(() => {
512544
512681
  const source = tab === "Hidden" ? hiddenRows : allRows;
512545
512682
  const fq = query2.toLowerCase().trim();
512546
512683
  if (!fq)
@@ -512550,7 +512687,7 @@ function MemoryBrowser({ visible, contextManager, cwd: cwd2, onClose, onSystemMe
512550
512687
  return hay.toLowerCase().includes(fq);
512551
512688
  });
512552
512689
  }, [allRows, hiddenRows, tab, query2]);
512553
- const settingsGroups = import_react162.useMemo(() => {
512690
+ const settingsGroups = import_react163.useMemo(() => {
512554
512691
  const scopeCfg = memMgr.scopeConfig;
512555
512692
  const resolution = contextManager.getEmbedderResolution();
512556
512693
  const embedderMeta = resolution?.modelId ? `${resolution.modelId} (${resolution.source})` : "offline (hashbag-v2)";
@@ -512589,8 +512726,8 @@ function MemoryBrowser({ visible, contextManager, cwd: cwd2, onClose, onSystemMe
512589
512726
  }
512590
512727
  ];
512591
512728
  }, [memMgr, contextManager]);
512592
- const settingsRows = import_react162.useMemo(() => buildGroupedRows(settingsGroups, new Set(["scopes"])), [settingsGroups]);
512593
- import_react162.useEffect(() => {
512729
+ const settingsRows = import_react163.useMemo(() => buildGroupedRows(settingsGroups, new Set(["scopes"])), [settingsGroups]);
512730
+ import_react163.useEffect(() => {
512594
512731
  let len;
512595
512732
  if (tab === "Cleanup")
512596
512733
  len = cleanupRows.length + 1;
@@ -513067,7 +513204,7 @@ function MemoryBrowser({ visible, contextManager, cwd: cwd2, onClose, onSystemMe
513067
513204
  }, undefined, true, undefined, this)
513068
513205
  }, undefined, false, undefined, this);
513069
513206
  }
513070
- var import_react162, SETTINGS_MODAL_TITLE, SETTINGS_MODAL_OPTIONS, TABS8, COLUMNS2, CLEANUP_COLUMNS;
513207
+ var import_react163, SETTINGS_MODAL_TITLE, SETTINGS_MODAL_OPTIONS, TABS8, COLUMNS2, CLEANUP_COLUMNS;
513071
513208
  var init_MemoryBrowser = __esm(async () => {
513072
513209
  init_theme();
513073
513210
  init_jsx_dev_runtime();
@@ -513075,7 +513212,7 @@ var init_MemoryBrowser = __esm(async () => {
513075
513212
  init_react2(),
513076
513213
  init_ui2()
513077
513214
  ]);
513078
- import_react162 = __toESM(require_react(), 1);
513215
+ import_react163 = __toESM(require_react(), 1);
513079
513216
  SETTINGS_MODAL_TITLE = {
513080
513217
  write: "Write Scope",
513081
513218
  read: "Read Scope",
@@ -513128,7 +513265,7 @@ function DialogHost() {
513128
513265
  pop();
513129
513266
  }
513130
513267
  });
513131
- import_react164.useEffect(() => {
513268
+ import_react165.useEffect(() => {
513132
513269
  if (!top)
513133
513270
  return;
513134
513271
  return () => {};
@@ -513180,7 +513317,7 @@ function DialogBody({ width }) {
513180
513317
  }
513181
513318
  }
513182
513319
  }
513183
- var import_react164;
513320
+ var import_react165;
513184
513321
  var init_DialogHost = __esm(async () => {
513185
513322
  init_shallow2();
513186
513323
  init_theme();
@@ -513192,7 +513329,7 @@ var init_DialogHost = __esm(async () => {
513192
513329
  init_AlertDialog(),
513193
513330
  init_ConfirmDialog()
513194
513331
  ]);
513195
- import_react164 = __toESM(require_react(), 1);
513332
+ import_react165 = __toESM(require_react(), 1);
513196
513333
  });
513197
513334
 
513198
513335
  // src/hearth/claim.ts
@@ -513297,9 +513434,9 @@ function ShutdownSplash({
513297
513434
  height
513298
513435
  }) {
513299
513436
  const shortId = sessionId?.slice(0, 8);
513300
- const [tick, setTick] = import_react166.useState(0);
513437
+ const [tick, setTick] = import_react167.useState(0);
513301
513438
  const { width: termWidth } = useTerminalDimensions();
513302
- import_react166.useEffect(() => {
513439
+ import_react167.useEffect(() => {
513303
513440
  const timer = setInterval(() => setTick((t3) => t3 + 1), 80);
513304
513441
  return () => clearInterval(timer);
513305
513442
  }, []);
@@ -513501,12 +513638,12 @@ function App({
513501
513638
  const renderer2 = useRenderer();
513502
513639
  const { height: termHeight, width: termWidth } = useTerminalDimensions();
513503
513640
  const t2 = useTheme();
513504
- const [providerStatuses, setProviderStatuses] = import_react166.useState(() => {
513641
+ const [providerStatuses, setProviderStatuses] = import_react167.useState(() => {
513505
513642
  return getCachedProviderStatuses() ?? bootProviders;
513506
513643
  });
513507
- const [shutdownPhase, setShutdownPhase] = import_react166.useState(-1);
513508
- const savedSessionIdRef = import_react166.useRef(null);
513509
- import_react166.useEffect(() => {
513644
+ const [shutdownPhase, setShutdownPhase] = import_react167.useState(-1);
513645
+ const savedSessionIdRef = import_react167.useRef(null);
513646
+ import_react167.useEffect(() => {
513510
513647
  const stdin2 = process.stdin;
513511
513648
  const originalRead = stdin2.read.bind(stdin2);
513512
513649
  const patchedRead = (size) => {
@@ -513529,16 +513666,16 @@ function App({
513529
513666
  stdin2.read = originalRead;
513530
513667
  };
513531
513668
  }, []);
513532
- const copyToClipboard3 = import_react166.useCallback((text4) => {
513669
+ const copyToClipboard3 = import_react167.useCallback((text4) => {
513533
513670
  if (!renderer2.copyToClipboardOSC52(text4))
513534
513671
  copyOsc52(text4);
513535
513672
  copyToClipboard2(text4);
513536
513673
  }, [renderer2]);
513537
- import_react166.useEffect(() => {
513674
+ import_react167.useEffect(() => {
513538
513675
  setProviderStatuses(getCachedProviderStatuses() ?? bootProviders);
513539
513676
  }, [bootProviders]);
513540
- import_react166.useEffect(() => subscribeProviderStatuses(setProviderStatuses), []);
513541
- import_react166.useEffect(() => {
513677
+ import_react167.useEffect(() => subscribeProviderStatuses(setProviderStatuses), []);
513678
+ import_react167.useEffect(() => {
513542
513679
  if (IS_WIN)
513543
513680
  return;
513544
513681
  const onSelection = (sel) => {
@@ -513556,28 +513693,28 @@ function App({
513556
513693
  onMouseDown: onRootMouseDown,
513557
513694
  onMouseUp: onRootMouseUp
513558
513695
  } = useCopySelection();
513559
- import_react166.useEffect(() => {
513696
+ import_react167.useEffect(() => {
513560
513697
  fetchOpenRouterMetadata();
513561
513698
  }, []);
513562
- const [globalConfig2, setGlobalConfig] = import_react166.useState(config2);
513563
- const [projConfig, setProjConfig] = import_react166.useState(projectConfig ?? null);
513564
- const [routerScope, setRouterScope] = import_react166.useState(() => projectConfig && ("taskRouter" in projectConfig) ? "project" : "global");
513565
- const modelScope = import_react166.useMemo(() => projConfig && ("defaultModel" in projConfig) ? "project" : "global", [projConfig]);
513566
- const effectiveConfig = import_react166.useMemo(() => mergeConfigs(globalConfig2, projConfig), [globalConfig2, projConfig]);
513699
+ const [globalConfig2, setGlobalConfig] = import_react167.useState(config2);
513700
+ const [projConfig, setProjConfig] = import_react167.useState(projectConfig ?? null);
513701
+ const [routerScope, setRouterScope] = import_react167.useState(() => projectConfig && ("taskRouter" in projectConfig) ? "project" : "global");
513702
+ const modelScope = import_react167.useMemo(() => projConfig && ("defaultModel" in projConfig) ? "project" : "global", [projConfig]);
513703
+ const effectiveConfig = import_react167.useMemo(() => mergeConfigs(globalConfig2, projConfig), [globalConfig2, projConfig]);
513567
513704
  const { focusMode, editorOpen, toggleEditor, openEditor, closeEditor, focusChat, focusEditor } = useEditorFocus();
513568
- const [editorVisible, setEditorVisible] = import_react166.useState(false);
513705
+ const [editorVisible, setEditorVisible] = import_react167.useState(false);
513569
513706
  const tabMgr = useTabs((survivingIds) => {
513570
513707
  const sm = sessionManagerRef.current;
513571
513708
  const sid = getAppSessionId();
513572
513709
  if (sm && sid)
513573
513710
  sm.pruneTabsNotIn(sid, survivingIds).catch(() => {});
513574
513711
  });
513575
- const tabMgrRef = import_react166.useRef(tabMgr);
513712
+ const tabMgrRef = import_react167.useRef(tabMgr);
513576
513713
  tabMgrRef.current = tabMgr;
513577
- const sessionManagerRef = import_react166.useRef(null);
513578
- const hasTabBarRef = import_react166.useRef(false);
513714
+ const sessionManagerRef = import_react167.useRef(null);
513715
+ const hasTabBarRef = import_react167.useRef(false);
513579
513716
  hasTabBarRef.current = tabMgr.tabCount > 1;
513580
- const editorSplitRef = import_react166.useRef(60);
513717
+ const editorSplitRef = import_react167.useRef(60);
513581
513718
  const {
513582
513719
  ready: nvimReady,
513583
513720
  ptyWrite,
@@ -513593,8 +513730,8 @@ function App({
513593
513730
  openFile: nvimOpen,
513594
513731
  error: nvimError
513595
513732
  } = useNeovim(true, effectiveConfig.nvimPath, effectiveConfig.nvimConfig, closeEditor, hasTabBarRef.current, editorSplitRef.current);
513596
- const pendingEditorFileRef = import_react166.useRef(null);
513597
- import_react166.useEffect(() => {
513733
+ const pendingEditorFileRef = import_react167.useRef(null);
513734
+ import_react167.useEffect(() => {
513598
513735
  if (nvimReady && pendingEditorFileRef.current) {
513599
513736
  const file2 = pendingEditorFileRef.current;
513600
513737
  pendingEditorFileRef.current = null;
@@ -513603,7 +513740,7 @@ function App({
513603
513740
  });
513604
513741
  }
513605
513742
  }, [nvimReady, nvimOpen]);
513606
- const openEditorWithFile = import_react166.useCallback((file2) => {
513743
+ const openEditorWithFile = import_react167.useCallback((file2) => {
513607
513744
  if (editorOpen && nvimReady) {
513608
513745
  nvimOpen(file2).catch((err2) => {
513609
513746
  logBackgroundError("editor", `failed to open ${file2}: ${err2 instanceof Error ? err2.message : String(err2)}`);
@@ -513613,18 +513750,18 @@ function App({
513613
513750
  openEditor();
513614
513751
  }
513615
513752
  }, [editorOpen, nvimReady, nvimOpen, openEditor]);
513616
- import_react166.useEffect(() => {
513753
+ import_react167.useEffect(() => {
513617
513754
  setEditorRequestCallback((file2) => {
513618
513755
  if (file2)
513619
513756
  openEditorWithFile(file2);
513620
513757
  });
513621
513758
  return () => setEditorRequestCallback(null);
513622
513759
  }, [openEditorWithFile]);
513623
- import_react166.useEffect(() => {
513760
+ import_react167.useEffect(() => {
513624
513761
  if (editorOpen)
513625
513762
  setEditorVisible(true);
513626
513763
  }, [editorOpen]);
513627
- import_react166.useEffect(() => {
513764
+ import_react167.useEffect(() => {
513628
513765
  const activity = tabMgr.getTabActivity(tabMgr.activeTabId);
513629
513766
  const label = tabMgr.activeTab.label;
513630
513767
  const truncated = label.length > 40 ? `${label.slice(0, 37)}\u2026` : label;
@@ -513636,10 +513773,10 @@ function App({
513636
513773
  const reasoningExpanded = useUIStore((s2) => s2.reasoningExpanded);
513637
513774
  const codeExpanded = useUIStore((s2) => s2.codeExpanded);
513638
513775
  const hasTabBar = tabMgr.tabCount > 1;
513639
- import_react166.useEffect(() => {
513776
+ import_react167.useEffect(() => {
513640
513777
  renderer2.requestRender();
513641
513778
  }, [editorOpen, editorVisible, focusMode, reasoningExpanded, codeExpanded, hasTabBar, renderer2]);
513642
- const handleEditorClosed = import_react166.useCallback(() => {
513779
+ const handleEditorClosed = import_react167.useCallback(() => {
513643
513780
  setEditorVisible(false);
513644
513781
  }, []);
513645
513782
  useEditorInput({
@@ -513682,24 +513819,24 @@ function App({
513682
513819
  const modalMemoryBrowser = useUIStore((s2) => s2.modals.memoryBrowser);
513683
513820
  const modalUiDemo = useUIStore((s2) => s2.modals.uiDemo);
513684
513821
  const toolsState = useToolsStore();
513685
- import_react166.useEffect(() => {
513822
+ import_react167.useEffect(() => {
513686
513823
  toolsState.initFromConfig(effectiveConfig.disabledTools);
513687
513824
  }, [effectiveConfig.disabledTools, toolsState.initFromConfig]);
513688
- import_react166.useEffect(() => {
513825
+ import_react167.useEffect(() => {
513689
513826
  saveGlobalConfig({ disabledTools: [...toolsState.disabledTools] });
513690
513827
  }, [toolsState.disabledTools]);
513691
513828
  const statusDashboardTab = useUIStore((s2) => s2.statusDashboardTab);
513692
513829
  const modalRepoMapStatus = useUIStore((s2) => s2.modals.repoMapStatus);
513693
513830
  const isModalOpen = useUIStore(selectIsAnyModalOpen);
513694
- const wizardOpenedLlm = import_react166.useRef(false);
513695
- const closerCache2 = import_react166.useRef({});
513831
+ const wizardOpenedLlm = import_react167.useRef(false);
513832
+ const closerCache2 = import_react167.useRef({});
513696
513833
  const getCloser2 = (name30) => closerCache2.current[name30] ??= () => useUIStore.getState().closeModal(name30);
513697
513834
  useVersionCheck();
513698
513835
  const versionCurrent = useVersionStore((s2) => s2.current);
513699
513836
  const versionLatest = useVersionStore((s2) => s2.latest);
513700
513837
  const versionUpdateAvailable = useVersionStore((s2) => s2.updateAvailable);
513701
- const updateModalShown = import_react166.useRef(false);
513702
- import_react166.useEffect(() => {
513838
+ const updateModalShown = import_react167.useRef(false);
513839
+ import_react167.useEffect(() => {
513703
513840
  if (!versionUpdateAvailable || !versionLatest || updateModalShown.current)
513704
513841
  return;
513705
513842
  if (isDismissed(versionLatest))
@@ -513713,7 +513850,7 @@ function App({
513713
513850
  }, 500);
513714
513851
  return () => clearTimeout(timer);
513715
513852
  }, [versionUpdateAvailable, versionLatest]);
513716
- import_react166.useEffect(() => {
513853
+ import_react167.useEffect(() => {
513717
513854
  if (getMissingRequired().length > 0) {
513718
513855
  useUIStore.getState().openModal("setup");
513719
513856
  } else if (forceWizard || !config2.onboardingComplete && !resumeSessionId) {
@@ -513721,7 +513858,7 @@ function App({
513721
513858
  }
513722
513859
  }, [config2.onboardingComplete, forceWizard, resumeSessionId]);
513723
513860
  const cwd2 = getCwd();
513724
- const saveToScope = import_react166.useCallback((patch, toScope, fromScope) => {
513861
+ const saveToScope = import_react167.useCallback((patch, toScope, fromScope) => {
513725
513862
  if (toScope === "global") {
513726
513863
  saveGlobalConfig(patch);
513727
513864
  setGlobalConfig((prev) => applyConfigPatch(prev, patch));
@@ -513741,12 +513878,12 @@ function App({
513741
513878
  }
513742
513879
  }
513743
513880
  }, [cwd2]);
513744
- const detectScope = import_react166.useCallback((key3) => {
513881
+ const detectScope = import_react167.useCallback((key3) => {
513745
513882
  if (projConfig && key3 in projConfig)
513746
513883
  return "project";
513747
513884
  return "global";
513748
513885
  }, [projConfig]);
513749
- import_react166.useEffect(() => {
513886
+ import_react167.useEffect(() => {
513750
513887
  initForbidden(cwd2);
513751
513888
  for (const cfg of PROVIDER_CONFIGS) {
513752
513889
  if (cfg.grouped)
@@ -513755,20 +513892,20 @@ function App({
513755
513892
  fetchProviderModels(cfg.id).catch(() => {});
513756
513893
  }
513757
513894
  }, []);
513758
- const contextManager = import_react166.useMemo(() => preloadedContextManager ?? new ContextManager(cwd2), [cwd2, preloadedContextManager]);
513759
- const sessionManager = import_react166.useMemo(() => new SessionManager(cwd2), [cwd2]);
513895
+ const contextManager = import_react167.useMemo(() => preloadedContextManager ?? new ContextManager(cwd2), [cwd2, preloadedContextManager]);
513896
+ const sessionManager = import_react167.useMemo(() => new SessionManager(cwd2), [cwd2]);
513760
513897
  sessionManagerRef.current = sessionManager;
513761
- const mcpManager = import_react166.useMemo(() => getMCPManager(), []);
513762
- import_react166.useEffect(() => {
513898
+ const mcpManager = import_react167.useMemo(() => getMCPManager(), []);
513899
+ import_react167.useEffect(() => {
513763
513900
  mcpManager.connectAll(effectiveConfig.mcpServers ?? []);
513764
513901
  }, [mcpManager, effectiveConfig.mcpServers]);
513765
- import_react166.useEffect(() => {
513902
+ import_react167.useEffect(() => {
513766
513903
  return () => {
513767
513904
  disposeMCPManager();
513768
513905
  };
513769
513906
  }, []);
513770
513907
  const git = useGitStatus(cwd2);
513771
- const [forgeMode, setForgeModeHeader] = import_react166.useState("default");
513908
+ const [forgeMode, setForgeModeHeader] = import_react167.useState("default");
513772
513909
  const modeLabel = getModeLabel(forgeMode);
513773
513910
  const modeColor = getModeColor(forgeMode);
513774
513911
  useConfigSync({
@@ -513782,7 +513919,7 @@ function App({
513782
513919
  cursorCol,
513783
513920
  visualSelection
513784
513921
  });
513785
- const handleSuspend = import_react166.useCallback(async (opts) => {
513922
+ const handleSuspend = import_react167.useCallback(async (opts) => {
513786
513923
  useUIStore.getState().setSuspended(true);
513787
513924
  await new Promise((r5) => setTimeout(r5, 50));
513788
513925
  const result = await suspendAndRun({ ...opts, cwd: cwd2 });
@@ -513802,29 +513939,29 @@ function App({
513802
513939
  git.refresh();
513803
513940
  }, [cwd2, git]);
513804
513941
  editorSplitRef.current = editorSplit;
513805
- const sharedResources = import_react166.useMemo(() => ({
513942
+ const sharedResources = import_react167.useMemo(() => ({
513806
513943
  ...contextManager.getSharedResources(),
513807
513944
  workspaceCoordinator: getWorkspaceCoordinator()
513808
513945
  }), [contextManager]);
513809
- const workspaceSnapshotRef = import_react166.useRef(null);
513946
+ const workspaceSnapshotRef = import_react167.useRef(null);
513810
513947
  workspaceSnapshotRef.current = () => ({
513811
513948
  tabStates: tabMgr.getAllTabStates(),
513812
513949
  activeTabId: tabMgr.activeTabId
513813
513950
  });
513814
- const addSystemMessage = import_react166.useCallback((msg) => {
513951
+ const addSystemMessage = import_react167.useCallback((msg) => {
513815
513952
  const activeChat = tabMgrRef.current?.getActiveChat();
513816
513953
  activeChat?.setMessages((prev) => [
513817
513954
  ...prev,
513818
513955
  { id: crypto.randomUUID(), role: "system", content: msg, timestamp: Date.now() }
513819
513956
  ]);
513820
513957
  }, []);
513821
- const refreshGit = import_react166.useCallback(() => {
513958
+ const refreshGit = import_react167.useCallback(() => {
513822
513959
  git.refresh();
513823
513960
  }, [git]);
513824
- const shutdownPhaseRef = import_react166.useRef(shutdownPhase);
513961
+ const shutdownPhaseRef = import_react167.useRef(shutdownPhase);
513825
513962
  shutdownPhaseRef.current = shutdownPhase;
513826
- const exitTimersRef = import_react166.useRef([]);
513827
- const handleCycleTab = import_react166.useCallback((direction) => {
513963
+ const exitTimersRef = import_react167.useRef([]);
513964
+ const handleCycleTab = import_react167.useCallback((direction) => {
513828
513965
  if (tabMgr.tabCount <= 1)
513829
513966
  return;
513830
513967
  if (direction === 1)
@@ -513832,7 +513969,7 @@ function App({
513832
513969
  else
513833
513970
  tabMgr.prevTab();
513834
513971
  }, [tabMgr.tabCount, tabMgr.nextTab, tabMgr.prevTab]);
513835
- const handleExit = import_react166.useCallback(() => {
513972
+ const handleExit = import_react167.useCallback(() => {
513836
513973
  if (shutdownPhaseRef.current >= 0)
513837
513974
  return;
513838
513975
  setShutdownPhase(0);
@@ -513911,8 +514048,8 @@ function App({
513911
514048
  }, 300);
513912
514049
  }, 250);
513913
514050
  }, [cwd2, sessionManager, contextManager, renderer2]);
513914
- const hasRestoredRef = import_react166.useRef(false);
513915
- import_react166.useEffect(() => {
514051
+ const hasRestoredRef = import_react167.useRef(false);
514052
+ import_react167.useEffect(() => {
513916
514053
  if (hasRestoredRef.current || !resumeSessionId)
513917
514054
  return;
513918
514055
  hasRestoredRef.current = true;
@@ -513947,8 +514084,8 @@ function App({
513947
514084
  }, 100);
513948
514085
  }
513949
514086
  }, []);
513950
- const hasBootedHearthRef = import_react166.useRef(false);
513951
- import_react166.useEffect(() => {
514087
+ const hasBootedHearthRef = import_react167.useRef(false);
514088
+ import_react167.useEffect(() => {
513952
514089
  if (hasBootedHearthRef.current)
513953
514090
  return;
513954
514091
  hasBootedHearthRef.current = true;
@@ -514163,9 +514300,9 @@ function App({
514163
514300
  } catch {}
514164
514301
  })();
514165
514302
  }, []);
514166
- const [activeModelForHeader, setActiveModelForHeader] = import_react166.useState(effectiveConfig.defaultModel);
514167
- const activeChatRef = import_react166.useRef(null);
514168
- import_react166.useEffect(() => {
514303
+ const [activeModelForHeader, setActiveModelForHeader] = import_react167.useState(effectiveConfig.defaultModel);
514304
+ const activeChatRef = import_react167.useRef(null);
514305
+ import_react167.useEffect(() => {
514169
514306
  const chat = tabMgr.getActiveChat();
514170
514307
  activeChatRef.current = chat;
514171
514308
  if (chat) {
@@ -514175,7 +514312,7 @@ function App({
514175
514312
  setExitSessionId(hasContent ? getAppSessionId() : null);
514176
514313
  }
514177
514314
  }, [tabMgr.activeTabId]);
514178
- import_react166.useEffect(() => {
514315
+ import_react167.useEffect(() => {
514179
514316
  if (tabMgr.tabCount <= 1)
514180
514317
  return;
514181
514318
  (async () => {
@@ -514193,7 +514330,7 @@ function App({
514193
514330
  } catch {}
514194
514331
  })();
514195
514332
  }, [tabMgr.tabCount, tabMgr.activeTabId]);
514196
- const { displayProvider, displayModel, isGateway, isProxy } = import_react166.useMemo(() => {
514333
+ const { displayProvider, displayModel, isGateway, isProxy } = import_react167.useMemo(() => {
514197
514334
  const model = activeModelForHeader;
514198
514335
  if (model === "none") {
514199
514336
  return {
@@ -514224,12 +514361,12 @@ function App({
514224
514361
  isProxy: false
514225
514362
  };
514226
514363
  }, [activeModelForHeader]);
514227
- import_react166.useEffect(() => {
514364
+ import_react167.useEffect(() => {
514228
514365
  if (nvimError && nvimError !== "neovim-not-found") {
514229
514366
  addSystemMessage(`Neovim error: ${nvimError}`);
514230
514367
  }
514231
514368
  }, [nvimError]);
514232
- import_react166.useEffect(() => {
514369
+ import_react167.useEffect(() => {
514233
514370
  const memMgr = contextManager.getMemoryManager();
514234
514371
  const { project: project2, global: global2 } = memMgr.getLegacyBackupPaths();
514235
514372
  const parts2 = [];
@@ -514241,7 +514378,7 @@ function App({
514241
514378
  addSystemMessage(`Legacy memory schema detected \u2014 your old DB was preserved at ${parts2.join(", ")}. Phase 1 schema is now active in .soulforge/memory.db.`);
514242
514379
  }
514243
514380
  }, []);
514244
- const handleNewSession = import_react166.useCallback(async () => {
514381
+ const handleNewSession = import_react167.useCallback(async () => {
514245
514382
  const activeChat = tabMgrRef.current?.getActiveChat();
514246
514383
  const hasContent = activeChat?.messages.some((m6) => m6.role === "user" || m6.role === "assistant");
514247
514384
  if (hasContent && activeChat) {
@@ -514290,7 +514427,7 @@ function App({
514290
514427
  cpStore.skipCleanup(tab.id);
514291
514428
  restart();
514292
514429
  }, [cwd2, sessionManager]);
514293
- const handleTabCommand = import_react166.useCallback((input, chat) => {
514430
+ const handleTabCommand = import_react167.useCallback((input, chat) => {
514294
514431
  const cmd = input.trim().toLowerCase().split(/\s+/)[0] ?? "";
514295
514432
  const twoWord = input.trim().toLowerCase().split(/\s+/).slice(0, 2).join(" ");
514296
514433
  if (chat.isLoading && (ABORT_ON_LOADING.has(cmd) || ABORT_ON_LOADING.has(twoWord))) {
@@ -514427,7 +514564,7 @@ function App({
514427
514564
  handleNewSession,
514428
514565
  effectiveConfig.watchdog
514429
514566
  ]);
514430
- const closeLlmSelector = import_react166.useCallback(() => {
514567
+ const closeLlmSelector = import_react167.useCallback(() => {
514431
514568
  const wasPickingSlot = useUIStore.getState().routerSlotPicking != null;
514432
514569
  const wasFallbackForModel = useUIStore.getState().fallbackForModel != null;
514433
514570
  const wasFromWizard = wizardOpenedLlm.current;
@@ -514441,12 +514578,12 @@ function App({
514441
514578
  useUIStore.getState().openModal("firstRunWizard");
514442
514579
  }
514443
514580
  }, []);
514444
- const closeInfoPopup = import_react166.useCallback(() => {
514581
+ const closeInfoPopup = import_react167.useCallback(() => {
514445
514582
  const cfg = useUIStore.getState().infoPopupConfig;
514446
514583
  useUIStore.getState().closeInfoPopup();
514447
514584
  cfg?.onClose?.();
514448
514585
  }, []);
514449
- const onGitMenuCommit = import_react166.useCallback(() => {
514586
+ const onGitMenuCommit = import_react167.useCallback(() => {
514450
514587
  useUIStore.getState().closeModal("gitMenu");
514451
514588
  useUIStore.getState().openModal("gitCommit");
514452
514589
  }, []);
@@ -514459,7 +514596,7 @@ function App({
514459
514596
  renderer: renderer2,
514460
514597
  copySelection,
514461
514598
  activeChatRef,
514462
- cycleMode: import_react166.useCallback(() => {
514599
+ cycleMode: import_react167.useCallback(() => {
514463
514600
  const chat = tabMgrRef.current?.getActiveChat();
514464
514601
  if (chat) {
514465
514602
  const next = chat.cycleMode();
@@ -515092,7 +515229,7 @@ function App({
515092
515229
  ]
515093
515230
  }, undefined, true, undefined, this);
515094
515231
  }
515095
- var import_react166, ABORT_ON_LOADING, DEFAULT_TASK_ROUTER, SHUTDOWN_STEPS, KITTY_PROTOCOL_RESPONSE_RE;
515232
+ var import_react167, ABORT_ON_LOADING, DEFAULT_TASK_ROUTER, SHUTDOWN_STEPS, KITTY_PROTOCOL_RESPONSE_RE;
515096
515233
  var init_App = __esm(async () => {
515097
515234
  init_shallow2();
515098
515235
  init_config2();
@@ -515176,7 +515313,7 @@ var init_App = __esm(async () => {
515176
515313
  init_MemoryBrowser(),
515177
515314
  init_DialogHost()
515178
515315
  ]);
515179
- import_react166 = __toESM(require_react(), 1);
515316
+ import_react167 = __toESM(require_react(), 1);
515180
515317
  startMemoryPoll();
515181
515318
  ABORT_ON_LOADING = new Set([
515182
515319
  "/clear",