fss-link 1.6.0 → 1.6.1

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.
Files changed (2) hide show
  1. package/bundle/fss-link.js +735 -712
  2. package/package.json +1 -1
@@ -22620,7 +22620,7 @@ async function createContentGeneratorConfig(config, authType) {
22620
22620
  async function createContentGenerator(config, gcConfig, sessionId2) {
22621
22621
  if (DEBUG_CONTENT)
22622
22622
  console.log(`\u{1F41B} DEBUG createContentGenerator: authType=${config.authType}, apiKey=${config.apiKey}, baseUrl=${config.baseUrl}`);
22623
- const version = "1.6.0";
22623
+ const version = "1.6.1";
22624
22624
  const userAgent = `FSS-Link/${version} (${process.platform}; ${process.arch})`;
22625
22625
  const baseHeaders = {
22626
22626
  "User-Agent": userAgent
@@ -92556,16 +92556,16 @@ var require_semver = __commonJS({
92556
92556
  });
92557
92557
 
92558
92558
  // packages/cli/src/gemini.tsx
92559
- import React32 from "react";
92559
+ import React33 from "react";
92560
92560
  import { render as render2 } from "ink";
92561
92561
 
92562
92562
  // packages/cli/src/ui/App.tsx
92563
- import { useCallback as useCallback29, useEffect as useEffect45, useMemo as useMemo9, useState as useState49, useRef as useRef12 } from "react";
92563
+ import { useCallback as useCallback38, useEffect as useEffect45, useMemo as useMemo9, useState as useState49, useRef as useRef13 } from "react";
92564
92564
  import {
92565
92565
  Box as Box60,
92566
92566
  measureElement,
92567
92567
  Static,
92568
- Text as Text64,
92568
+ Text as Text65,
92569
92569
  useStdin as useStdin3,
92570
92570
  useStdout as useStdout2
92571
92571
  } from "ink";
@@ -98414,7 +98414,7 @@ async function getPackageJson() {
98414
98414
  // packages/cli/src/utils/version.ts
98415
98415
  async function getCliVersion() {
98416
98416
  const pkgJson = await getPackageJson();
98417
- return "1.6.0";
98417
+ return "1.6.1";
98418
98418
  }
98419
98419
 
98420
98420
  // packages/cli/src/ui/commands/aboutCommand.ts
@@ -122296,7 +122296,7 @@ def fibonacci(n):
122296
122296
 
122297
122297
  // packages/cli/src/ui/components/AuthDialog.tsx
122298
122298
  init_dist2();
122299
- import { Box as Box22, Text as Text29 } from "ink";
122299
+ import { Box as Box22, Text as Text30 } from "ink";
122300
122300
  import { useState as useState36 } from "react";
122301
122301
 
122302
122302
  // packages/cli/src/config/auth.ts
@@ -122382,8 +122382,8 @@ var setBobAIModel = (model) => {
122382
122382
  init_settings();
122383
122383
 
122384
122384
  // packages/cli/src/ui/components/OpenAIKeyPrompt.tsx
122385
- import { useState as useState30 } from "react";
122386
- import { Box as Box16, Text as Text23, useInput } from "ink";
122385
+ import { useState as useState30, useCallback as useCallback23 } from "react";
122386
+ import { Box as Box16, Text as Text23 } from "ink";
122387
122387
  import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
122388
122388
  function OpenAIKeyPrompt({
122389
122389
  onSubmit,
@@ -122394,20 +122394,18 @@ function OpenAIKeyPrompt({
122394
122394
  const [baseUrl, setBaseUrl] = useState30(prefilledEndpointUrl || "");
122395
122395
  const [model, setModel] = useState30("");
122396
122396
  const [currentField, setCurrentField] = useState30("apiKey");
122397
- useInput((input, key) => {
122398
- let cleanInput = (input || "").replace(/\u001b\[[0-9;]*[a-zA-Z]/g, "").replace(/\[200~/g, "").replace(/\[201~/g, "").replace(/^\[|~$/g, "");
122399
- cleanInput = cleanInput.split("").filter((ch) => ch.charCodeAt(0) >= 32).join("");
122400
- if (cleanInput.length > 0) {
122401
- if (currentField === "apiKey") {
122402
- setApiKey((prev) => prev + cleanInput);
122403
- } else if (currentField === "baseUrl") {
122404
- setBaseUrl((prev) => prev + cleanInput);
122405
- } else if (currentField === "model") {
122406
- setModel((prev) => prev + cleanInput);
122407
- }
122397
+ const handleKey = useCallback23((key) => {
122398
+ if (key.paste) {
122399
+ if (currentField === "apiKey") setApiKey((prev) => prev + key.sequence);
122400
+ else if (currentField === "baseUrl") setBaseUrl((prev) => prev + key.sequence);
122401
+ else if (currentField === "model") setModel((prev) => prev + key.sequence);
122402
+ return;
122403
+ }
122404
+ if (key.name === "escape") {
122405
+ onCancel();
122408
122406
  return;
122409
122407
  }
122410
- if (input.includes("\n") || input.includes("\r")) {
122408
+ if (key.name === "return") {
122411
122409
  if (currentField === "apiKey") {
122412
122410
  setCurrentField("baseUrl");
122413
122411
  return;
@@ -122423,47 +122421,36 @@ function OpenAIKeyPrompt({
122423
122421
  }
122424
122422
  return;
122425
122423
  }
122426
- if (key.escape) {
122427
- onCancel();
122424
+ if (key.name === "tab") {
122425
+ if (currentField === "apiKey") setCurrentField("baseUrl");
122426
+ else if (currentField === "baseUrl") setCurrentField("model");
122427
+ else if (currentField === "model") setCurrentField("apiKey");
122428
122428
  return;
122429
122429
  }
122430
- if (key.tab) {
122431
- if (currentField === "apiKey") {
122432
- setCurrentField("baseUrl");
122433
- } else if (currentField === "baseUrl") {
122434
- setCurrentField("model");
122435
- } else if (currentField === "model") {
122436
- setCurrentField("apiKey");
122437
- }
122430
+ if (key.name === "up") {
122431
+ if (currentField === "baseUrl") setCurrentField("apiKey");
122432
+ else if (currentField === "model") setCurrentField("baseUrl");
122438
122433
  return;
122439
122434
  }
122440
- if (key.upArrow) {
122441
- if (currentField === "baseUrl") {
122442
- setCurrentField("apiKey");
122443
- } else if (currentField === "model") {
122444
- setCurrentField("baseUrl");
122445
- }
122435
+ if (key.name === "down") {
122436
+ if (currentField === "apiKey") setCurrentField("baseUrl");
122437
+ else if (currentField === "baseUrl") setCurrentField("model");
122446
122438
  return;
122447
122439
  }
122448
- if (key.downArrow) {
122449
- if (currentField === "apiKey") {
122450
- setCurrentField("baseUrl");
122451
- } else if (currentField === "baseUrl") {
122452
- setCurrentField("model");
122453
- }
122440
+ if (key.name === "backspace" || key.name === "delete") {
122441
+ if (currentField === "apiKey") setApiKey((prev) => prev.slice(0, -1));
122442
+ else if (currentField === "baseUrl") setBaseUrl((prev) => prev.slice(0, -1));
122443
+ else if (currentField === "model") setModel((prev) => prev.slice(0, -1));
122454
122444
  return;
122455
122445
  }
122456
- if (key.backspace || key.delete) {
122457
- if (currentField === "apiKey") {
122458
- setApiKey((prev) => prev.slice(0, -1));
122459
- } else if (currentField === "baseUrl") {
122460
- setBaseUrl((prev) => prev.slice(0, -1));
122461
- } else if (currentField === "model") {
122462
- setModel((prev) => prev.slice(0, -1));
122463
- }
122464
- return;
122446
+ const char = key.sequence;
122447
+ if (char && char.length === 1 && char.charCodeAt(0) >= 32 && !key.ctrl && !key.meta) {
122448
+ if (currentField === "apiKey") setApiKey((prev) => prev + char);
122449
+ else if (currentField === "baseUrl") setBaseUrl((prev) => prev + char);
122450
+ else if (currentField === "model") setModel((prev) => prev + char);
122465
122451
  }
122466
- });
122452
+ }, [currentField, apiKey, baseUrl, model, onSubmit, onCancel]);
122453
+ useKeypress(handleKey, { isActive: true });
122467
122454
  return /* @__PURE__ */ jsxs19(
122468
122455
  Box16,
122469
122456
  {
@@ -122525,8 +122512,8 @@ function OpenAIKeyPrompt({
122525
122512
  }
122526
122513
 
122527
122514
  // packages/cli/src/ui/components/OllamaModelPrompt.tsx
122528
- import { useState as useState31, useEffect as useEffect30 } from "react";
122529
- import { Box as Box17, Text as Text24, useInput as useInput2 } from "ink";
122515
+ import { useState as useState31, useEffect as useEffect30, useCallback as useCallback24 } from "react";
122516
+ import { Box as Box17, Text as Text24 } from "ink";
122530
122517
  import { jsx as jsx22, jsxs as jsxs20 } from "react/jsx-runtime";
122531
122518
  var RECOMMENDED_MODELS = /* @__PURE__ */ new Set([
122532
122519
  "qwen3-coder-4b",
@@ -122576,26 +122563,26 @@ function OllamaModelPrompt({
122576
122563
  };
122577
122564
  fetchModels();
122578
122565
  }, []);
122579
- useInput2((input, key) => {
122580
- if (loading) return;
122581
- if (key.escape) {
122566
+ const handleKey = useCallback24((key) => {
122567
+ if (key.name === "escape") {
122582
122568
  onCancel();
122583
122569
  return;
122584
122570
  }
122585
- if (input.includes("\n") || input.includes("\r")) {
122571
+ if (key.name === "return") {
122586
122572
  if (availableModels.length > 0) {
122587
122573
  const selectedModel = availableModels[selectedModelIndex];
122588
122574
  onSubmit("1", "http://localhost:11434/v1", selectedModel.name);
122589
122575
  }
122590
122576
  return;
122591
122577
  }
122592
- if (key.upArrow && selectedModelIndex > 0) {
122578
+ if (key.name === "up" && selectedModelIndex > 0) {
122593
122579
  setSelectedModelIndex(selectedModelIndex - 1);
122594
122580
  }
122595
- if (key.downArrow && selectedModelIndex < availableModels.length - 1) {
122581
+ if (key.name === "down" && selectedModelIndex < availableModels.length - 1) {
122596
122582
  setSelectedModelIndex(selectedModelIndex + 1);
122597
122583
  }
122598
- });
122584
+ }, [availableModels, selectedModelIndex, onCancel, onSubmit]);
122585
+ useKeypress(handleKey, { isActive: !loading });
122599
122586
  if (loading) {
122600
122587
  return /* @__PURE__ */ jsxs20(
122601
122588
  Box17,
@@ -122663,8 +122650,8 @@ function OllamaModelPrompt({
122663
122650
  }
122664
122651
 
122665
122652
  // packages/cli/src/ui/components/LMStudioModelPrompt.tsx
122666
- import { useState as useState32, useEffect as useEffect31 } from "react";
122667
- import { Box as Box18, Text as Text25, useInput as useInput3 } from "ink";
122653
+ import { useState as useState32, useEffect as useEffect31, useCallback as useCallback25 } from "react";
122654
+ import { Box as Box18, Text as Text25 } from "ink";
122668
122655
  import { jsx as jsx23, jsxs as jsxs21 } from "react/jsx-runtime";
122669
122656
  var RECOMMENDED_MODELS2 = /* @__PURE__ */ new Set([
122670
122657
  "qwen3-coder-4b",
@@ -122717,26 +122704,26 @@ function LMStudioModelPrompt({
122717
122704
  };
122718
122705
  fetchModels();
122719
122706
  }, []);
122720
- useInput3((input, key) => {
122721
- if (loading) return;
122722
- if (key.escape) {
122707
+ const handleKey = useCallback25((key) => {
122708
+ if (key.name === "escape") {
122723
122709
  onCancel();
122724
122710
  return;
122725
122711
  }
122726
- if (input.includes("\n") || input.includes("\r")) {
122712
+ if (key.name === "return") {
122727
122713
  if (availableModels.length > 0) {
122728
122714
  const selectedModel = availableModels[selectedModelIndex];
122729
122715
  onSubmit("1", "http://localhost:1234/v1", selectedModel.id);
122730
122716
  }
122731
122717
  return;
122732
122718
  }
122733
- if (key.upArrow && selectedModelIndex > 0) {
122719
+ if (key.name === "up" && selectedModelIndex > 0) {
122734
122720
  setSelectedModelIndex(selectedModelIndex - 1);
122735
122721
  }
122736
- if (key.downArrow && selectedModelIndex < availableModels.length - 1) {
122722
+ if (key.name === "down" && selectedModelIndex < availableModels.length - 1) {
122737
122723
  setSelectedModelIndex(selectedModelIndex + 1);
122738
122724
  }
122739
- });
122725
+ }, [availableModels, selectedModelIndex, onCancel, onSubmit]);
122726
+ useKeypress(handleKey, { isActive: !loading });
122740
122727
  if (loading) {
122741
122728
  return /* @__PURE__ */ jsxs21(
122742
122729
  Box18,
@@ -122804,8 +122791,8 @@ function LMStudioModelPrompt({
122804
122791
 
122805
122792
  // packages/cli/src/ui/components/AddCustomEndpointDialog.tsx
122806
122793
  init_dist2();
122807
- import { useState as useState33, useEffect as useEffect32 } from "react";
122808
- import { Box as Box19, Text as Text26, useInput as useInput4 } from "ink";
122794
+ import { useState as useState33, useEffect as useEffect32, useCallback as useCallback27 } from "react";
122795
+ import { Box as Box19, Text as Text27 } from "ink";
122809
122796
 
122810
122797
  // packages/cli/src/utils/modelFetcher.ts
122811
122798
  init_dist2();
@@ -122924,20 +122911,43 @@ async function fetchModelsFromProvider(provider, endpoint, apiKey, forceRefresh
122924
122911
  }
122925
122912
 
122926
122913
  // packages/cli/src/ui/components/shared/PasteAwareTextInput.tsx
122927
- import TextInput from "ink-text-input";
122914
+ import { useCallback as useCallback26, useRef as useRef11 } from "react";
122915
+ import { Text as Text26 } from "ink";
122928
122916
  import { jsx as jsx24 } from "react/jsx-runtime";
122929
- function stripBracketedPaste(value) {
122930
- return value.replace(/\x1b\[200~/g, "").replace(/\x1b\[201~/g, "").replace(/~200~/g, "").replace(/~201~/g, "");
122931
- }
122932
122917
  function PasteAwareTextInput({
122918
+ value,
122933
122919
  onChange,
122934
- ...props
122920
+ onSubmit,
122921
+ placeholder,
122922
+ isActive = true
122935
122923
  }) {
122936
- const handleChange = (value) => {
122937
- const cleaned = stripBracketedPaste(value);
122938
- onChange(cleaned);
122939
- };
122940
- return /* @__PURE__ */ jsx24(TextInput, { ...props, onChange: handleChange });
122924
+ const valueRef = useRef11(value);
122925
+ valueRef.current = value;
122926
+ const onChangeRef = useRef11(onChange);
122927
+ onChangeRef.current = onChange;
122928
+ const onSubmitRef = useRef11(onSubmit);
122929
+ onSubmitRef.current = onSubmit;
122930
+ const handler = useCallback26((key) => {
122931
+ if (key.paste) {
122932
+ onChangeRef.current(valueRef.current + key.sequence);
122933
+ return;
122934
+ }
122935
+ if (key.name === "return") {
122936
+ onSubmitRef.current(valueRef.current);
122937
+ return;
122938
+ }
122939
+ if (key.name === "backspace") {
122940
+ onChangeRef.current(valueRef.current.slice(0, -1));
122941
+ return;
122942
+ }
122943
+ const char = key.sequence;
122944
+ if (char && char.length === 1 && char.charCodeAt(0) >= 32 && !key.ctrl && !key.meta) {
122945
+ onChangeRef.current(valueRef.current + char);
122946
+ }
122947
+ }, []);
122948
+ useKeypress(handler, { isActive });
122949
+ const display = value || placeholder || "";
122950
+ return /* @__PURE__ */ jsx24(Text26, { children: display });
122941
122951
  }
122942
122952
 
122943
122953
  // packages/cli/src/ui/components/AddCustomEndpointDialog.tsx
@@ -122979,35 +122989,43 @@ function AddCustomEndpointDialog({
122979
122989
  });
122980
122990
  }
122981
122991
  }, [step, url2, providerType]);
122982
- useInput4((input, key) => {
122983
- if (key.escape && step !== "name" && step !== "model-fetch") {
122984
- if (step === "url") {
122985
- setStep("name");
122986
- return;
122992
+ const handleKey = useCallback27((key) => {
122993
+ if (step === "name" || step === "url" || step === "apikey") {
122994
+ if (key.name === "escape") {
122995
+ if (step === "url") {
122996
+ setStep("name");
122997
+ return;
122998
+ }
122999
+ if (step === "apikey") {
123000
+ setStep("provider");
123001
+ return;
123002
+ }
123003
+ onCancel();
122987
123004
  }
123005
+ return;
123006
+ }
123007
+ if (key.name === "escape") {
122988
123008
  if (step === "provider") {
122989
123009
  setStep("url");
122990
123010
  return;
122991
123011
  }
122992
- if (step === "apikey") {
122993
- setStep("provider");
123012
+ if (step === "model-select") {
123013
+ setStep("apikey");
122994
123014
  return;
122995
123015
  }
122996
- }
122997
- if (key.escape) {
122998
123016
  onCancel();
122999
123017
  return;
123000
123018
  }
123001
123019
  if (step === "provider") {
123002
- if (key.upArrow && selectedProviderIndex > 0) {
123020
+ if (key.name === "up" && selectedProviderIndex > 0) {
123003
123021
  setSelectedProviderIndex(selectedProviderIndex - 1);
123004
123022
  return;
123005
123023
  }
123006
- if (key.downArrow && selectedProviderIndex < providerOptions.length - 1) {
123024
+ if (key.name === "down" && selectedProviderIndex < providerOptions.length - 1) {
123007
123025
  setSelectedProviderIndex(selectedProviderIndex + 1);
123008
123026
  return;
123009
123027
  }
123010
- if (key.return) {
123028
+ if (key.name === "return") {
123011
123029
  setProviderType(providerOptions[selectedProviderIndex].value);
123012
123030
  setStep("apikey");
123013
123031
  return;
@@ -123015,23 +123033,19 @@ function AddCustomEndpointDialog({
123015
123033
  return;
123016
123034
  }
123017
123035
  if (step === "model-select") {
123018
- if (key.upArrow && selectedModelIndex > 0) {
123036
+ if (key.name === "up" && selectedModelIndex > 0) {
123019
123037
  const newIndex = selectedModelIndex - 1;
123020
123038
  setSelectedModelIndex(newIndex);
123021
- if (newIndex < scrollOffset) {
123022
- setScrollOffset(newIndex);
123023
- }
123039
+ if (newIndex < scrollOffset) setScrollOffset(newIndex);
123024
123040
  return;
123025
123041
  }
123026
- if (key.downArrow && selectedModelIndex < availableModels.length - 1) {
123042
+ if (key.name === "down" && selectedModelIndex < availableModels.length - 1) {
123027
123043
  const newIndex = selectedModelIndex + 1;
123028
123044
  setSelectedModelIndex(newIndex);
123029
- if (newIndex >= scrollOffset + VISIBLE_MODELS2) {
123030
- setScrollOffset(newIndex - VISIBLE_MODELS2 + 1);
123031
- }
123045
+ if (newIndex >= scrollOffset + VISIBLE_MODELS2) setScrollOffset(newIndex - VISIBLE_MODELS2 + 1);
123032
123046
  return;
123033
123047
  }
123034
- if (key.return) {
123048
+ if (key.name === "return") {
123035
123049
  if (availableModels.length > 0 && providerType) {
123036
123050
  const selectedModel = availableModels[selectedModelIndex];
123037
123051
  onSubmit(name2, url2, selectedModel.id, apiKey, providerType);
@@ -123041,30 +123055,31 @@ function AddCustomEndpointDialog({
123041
123055
  return;
123042
123056
  }
123043
123057
  if (step === "model-fetch" && fetchError) {
123044
- if (input === "r" || input === "R") {
123058
+ if (key.sequence === "r" || key.sequence === "R") {
123045
123059
  setFetchError(null);
123046
123060
  setStep("apikey");
123047
123061
  queueMicrotask(() => setStep("model-fetch"));
123048
123062
  return;
123049
123063
  }
123050
- if (input === "u" || input === "U") {
123064
+ if (key.sequence === "u" || key.sequence === "U") {
123051
123065
  setFetchError(null);
123052
123066
  setStep("url");
123053
123067
  return;
123054
123068
  }
123055
- if (input === "k" || input === "K") {
123069
+ if (key.sequence === "k" || key.sequence === "K") {
123056
123070
  setFetchError(null);
123057
123071
  setStep("apikey");
123058
123072
  return;
123059
123073
  }
123060
- if (input === "p" || input === "P") {
123074
+ if (key.sequence === "p" || key.sequence === "P") {
123061
123075
  setFetchError(null);
123062
123076
  setStep("provider");
123063
123077
  return;
123064
123078
  }
123065
123079
  return;
123066
123080
  }
123067
- });
123081
+ }, [step, selectedProviderIndex, selectedModelIndex, scrollOffset, availableModels, providerType, providerOptions, name2, url2, apiKey, fetchError, onSubmit, onCancel]);
123082
+ useKeypress(handleKey, { isActive: true });
123068
123083
  const handleNameSubmit = (value) => {
123069
123084
  if (value.trim()) {
123070
123085
  setName(value.trim());
@@ -123085,60 +123100,62 @@ function AddCustomEndpointDialog({
123085
123100
  switch (step) {
123086
123101
  case "name":
123087
123102
  return /* @__PURE__ */ jsxs22(Fragment4, { children: [
123088
- /* @__PURE__ */ jsx25(Text26, { bold: true, color: Colors.AccentBlue, children: "Step 1: Endpoint Name" }),
123089
- /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text26, { children: "Enter a friendly name for this endpoint:" }) }),
123090
- /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text26, { color: Colors.AccentGreen, children: 'Example: "RTX3090 Proxy" or "Inference Server"' }) }),
123103
+ /* @__PURE__ */ jsx25(Text27, { bold: true, color: Colors.AccentBlue, children: "Step 1: Endpoint Name" }),
123104
+ /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text27, { children: "Enter a friendly name for this endpoint:" }) }),
123105
+ /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text27, { color: Colors.AccentGreen, children: 'Example: "RTX3090 Proxy" or "Inference Server"' }) }),
123091
123106
  /* @__PURE__ */ jsxs22(Box19, { marginTop: 1, children: [
123092
- /* @__PURE__ */ jsx25(Text26, { color: Colors.AccentPurple, children: "> " }),
123107
+ /* @__PURE__ */ jsx25(Text27, { color: Colors.AccentPurple, children: "> " }),
123093
123108
  /* @__PURE__ */ jsx25(
123094
123109
  PasteAwareTextInput,
123095
123110
  {
123096
123111
  value: name2,
123097
123112
  onChange: setName,
123098
- onSubmit: handleNameSubmit
123113
+ onSubmit: handleNameSubmit,
123114
+ isActive: step === "name"
123099
123115
  }
123100
123116
  )
123101
123117
  ] }),
123102
- /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text26, { color: Colors.Gray, children: "Press Enter to continue, Esc to cancel" }) })
123118
+ /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text27, { color: Colors.Gray, children: "Press Enter to continue, Esc to cancel" }) })
123103
123119
  ] });
123104
123120
  case "url":
123105
123121
  return /* @__PURE__ */ jsxs22(Fragment4, { children: [
123106
- /* @__PURE__ */ jsx25(Text26, { bold: true, color: Colors.AccentBlue, children: "Step 2: Endpoint URL" }),
123107
- /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text26, { children: [
123122
+ /* @__PURE__ */ jsx25(Text27, { bold: true, color: Colors.AccentBlue, children: "Step 2: Endpoint URL" }),
123123
+ /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text27, { children: [
123108
123124
  "Endpoint name: ",
123109
- /* @__PURE__ */ jsx25(Text26, { color: Colors.AccentGreen, children: name2 })
123125
+ /* @__PURE__ */ jsx25(Text27, { color: Colors.AccentGreen, children: name2 })
123110
123126
  ] }) }),
123111
- /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text26, { children: "Enter the base URL for this endpoint:" }) }),
123112
- /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text26, { color: Colors.AccentGreen, children: 'Example: "https://rtx3090.bobai.com.au/v1"' }) }),
123127
+ /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text27, { children: "Enter the base URL for this endpoint:" }) }),
123128
+ /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text27, { color: Colors.AccentGreen, children: 'Example: "https://rtx3090.bobai.com.au/v1"' }) }),
123113
123129
  /* @__PURE__ */ jsxs22(Box19, { marginTop: 1, children: [
123114
- /* @__PURE__ */ jsx25(Text26, { color: Colors.AccentPurple, children: "> " }),
123130
+ /* @__PURE__ */ jsx25(Text27, { color: Colors.AccentPurple, children: "> " }),
123115
123131
  /* @__PURE__ */ jsx25(
123116
123132
  PasteAwareTextInput,
123117
123133
  {
123118
123134
  value: url2,
123119
123135
  onChange: setUrl,
123120
- onSubmit: handleUrlSubmit
123136
+ onSubmit: handleUrlSubmit,
123137
+ isActive: step === "url"
123121
123138
  }
123122
123139
  )
123123
123140
  ] }),
123124
- /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text26, { color: Colors.Gray, children: "Press Enter to continue, Esc to cancel" }) })
123141
+ /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text27, { color: Colors.Gray, children: "Press Enter to continue, Esc to cancel" }) })
123125
123142
  ] });
123126
123143
  case "provider":
123127
123144
  return /* @__PURE__ */ jsxs22(Fragment4, { children: [
123128
- /* @__PURE__ */ jsx25(Text26, { bold: true, color: Colors.AccentBlue, children: "Step 3: Provider Type" }),
123129
- /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text26, { children: [
123145
+ /* @__PURE__ */ jsx25(Text27, { bold: true, color: Colors.AccentBlue, children: "Step 3: Provider Type" }),
123146
+ /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text27, { children: [
123130
123147
  "Endpoint: ",
123131
- /* @__PURE__ */ jsx25(Text26, { color: Colors.AccentGreen, children: name2 }),
123148
+ /* @__PURE__ */ jsx25(Text27, { color: Colors.AccentGreen, children: name2 }),
123132
123149
  " (",
123133
123150
  url2,
123134
123151
  ")"
123135
123152
  ] }) }),
123136
- /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text26, { children: "Select the API type:" }) }),
123153
+ /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text27, { children: "Select the API type:" }) }),
123137
123154
  /* @__PURE__ */ jsx25(Box19, { marginTop: 1, flexDirection: "column", children: providerOptions.map((option2, index) => {
123138
123155
  const isSelected = index === selectedProviderIndex;
123139
123156
  const prefix = isSelected ? ">" : " ";
123140
123157
  return /* @__PURE__ */ jsxs22(
123141
- Text26,
123158
+ Text27,
123142
123159
  {
123143
123160
  color: isSelected ? Colors.AccentBlue : Colors.Foreground,
123144
123161
  bold: isSelected,
@@ -123151,93 +123168,94 @@ function AddCustomEndpointDialog({
123151
123168
  option2.value
123152
123169
  );
123153
123170
  }) }),
123154
- /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text26, { color: Colors.Gray, children: "\u2191/\u2193 to navigate, Enter to select, Esc to cancel" }) })
123171
+ /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text27, { color: Colors.Gray, children: "\u2191/\u2193 to navigate, Enter to select, Esc to cancel" }) })
123155
123172
  ] });
123156
123173
  case "apikey":
123157
123174
  return /* @__PURE__ */ jsxs22(Fragment4, { children: [
123158
- /* @__PURE__ */ jsx25(Text26, { bold: true, color: Colors.AccentBlue, children: "Step 4: API Key (Optional)" }),
123159
- /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text26, { children: [
123175
+ /* @__PURE__ */ jsx25(Text27, { bold: true, color: Colors.AccentBlue, children: "Step 4: API Key (Optional)" }),
123176
+ /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text27, { children: [
123160
123177
  "Endpoint: ",
123161
- /* @__PURE__ */ jsx25(Text26, { color: Colors.AccentGreen, children: name2 }),
123178
+ /* @__PURE__ */ jsx25(Text27, { color: Colors.AccentGreen, children: name2 }),
123162
123179
  " (",
123163
123180
  getProviderLabel(providerType),
123164
123181
  ")"
123165
123182
  ] }) }),
123166
- /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text26, { children: "Enter API key if required (leave empty if none):" }) }),
123167
- /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text26, { color: Colors.AccentYellow, children: "\u2139 External endpoints usually require authentication" }) }),
123183
+ /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text27, { children: "Enter API key if required (leave empty if none):" }) }),
123184
+ /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text27, { color: Colors.AccentYellow, children: "\u2139 External endpoints usually require authentication" }) }),
123168
123185
  /* @__PURE__ */ jsxs22(Box19, { marginTop: 1, children: [
123169
- /* @__PURE__ */ jsx25(Text26, { color: Colors.AccentPurple, children: "> " }),
123186
+ /* @__PURE__ */ jsx25(Text27, { color: Colors.AccentPurple, children: "> " }),
123170
123187
  /* @__PURE__ */ jsx25(
123171
123188
  PasteAwareTextInput,
123172
123189
  {
123173
123190
  value: apiKey,
123174
123191
  onChange: setApiKey,
123175
- onSubmit: handleApiKeySubmit
123192
+ onSubmit: handleApiKeySubmit,
123193
+ isActive: step === "apikey"
123176
123194
  }
123177
123195
  )
123178
123196
  ] }),
123179
- /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text26, { color: Colors.Gray, children: "Press Enter to fetch models, Esc to cancel" }) })
123197
+ /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text27, { color: Colors.Gray, children: "Press Enter to fetch models, Esc to cancel" }) })
123180
123198
  ] });
123181
123199
  case "model-fetch":
123182
123200
  if (fetchError) {
123183
123201
  return /* @__PURE__ */ jsxs22(Fragment4, { children: [
123184
- /* @__PURE__ */ jsx25(Text26, { bold: true, color: Colors.AccentRed, children: "Connection Failed" }),
123185
- /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text26, { children: [
123202
+ /* @__PURE__ */ jsx25(Text27, { bold: true, color: Colors.AccentRed, children: "Connection Failed" }),
123203
+ /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text27, { children: [
123186
123204
  "Name: ",
123187
- /* @__PURE__ */ jsx25(Text26, { color: Colors.AccentCyan, children: name2 })
123205
+ /* @__PURE__ */ jsx25(Text27, { color: Colors.AccentCyan, children: name2 })
123188
123206
  ] }) }),
123189
- /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text26, { children: [
123207
+ /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text27, { children: [
123190
123208
  "URL: ",
123191
- /* @__PURE__ */ jsx25(Text26, { color: Colors.AccentCyan, children: url2 })
123209
+ /* @__PURE__ */ jsx25(Text27, { color: Colors.AccentCyan, children: url2 })
123192
123210
  ] }) }),
123193
- /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text26, { children: [
123211
+ /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text27, { children: [
123194
123212
  "Provider: ",
123195
- /* @__PURE__ */ jsx25(Text26, { color: Colors.AccentCyan, children: getProviderLabel(providerType) })
123213
+ /* @__PURE__ */ jsx25(Text27, { color: Colors.AccentCyan, children: getProviderLabel(providerType) })
123196
123214
  ] }) }),
123197
- /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text26, { children: [
123215
+ /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text27, { children: [
123198
123216
  "API Key: ",
123199
- /* @__PURE__ */ jsx25(Text26, { color: Colors.AccentCyan, children: apiKey ? `${apiKey.substring(0, 20)}...` : "(none)" })
123217
+ /* @__PURE__ */ jsx25(Text27, { color: Colors.AccentCyan, children: apiKey ? `${apiKey.substring(0, 20)}...` : "(none)" })
123200
123218
  ] }) }),
123201
- /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text26, { color: Colors.AccentRed, children: [
123219
+ /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text27, { color: Colors.AccentRed, children: [
123202
123220
  "\u2716 Error: ",
123203
123221
  fetchError
123204
123222
  ] }) }),
123205
- /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text26, { color: Colors.AccentYellow, children: "What would you like to do?" }) }),
123223
+ /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text27, { color: Colors.AccentYellow, children: "What would you like to do?" }) }),
123206
123224
  /* @__PURE__ */ jsxs22(Box19, { marginTop: 1, flexDirection: "column", children: [
123207
- /* @__PURE__ */ jsx25(Text26, { color: Colors.AccentGreen, children: " [U] Edit URL" }),
123208
- /* @__PURE__ */ jsx25(Text26, { color: Colors.AccentGreen, children: " [K] Edit API Key" }),
123209
- /* @__PURE__ */ jsx25(Text26, { color: Colors.AccentGreen, children: " [P] Change Provider Type" }),
123210
- /* @__PURE__ */ jsx25(Text26, { color: Colors.AccentBlue, children: " [R] Retry Connection" }),
123211
- /* @__PURE__ */ jsx25(Text26, { color: Colors.Gray, children: " [Esc] Cancel and Exit" })
123225
+ /* @__PURE__ */ jsx25(Text27, { color: Colors.AccentGreen, children: " [U] Edit URL" }),
123226
+ /* @__PURE__ */ jsx25(Text27, { color: Colors.AccentGreen, children: " [K] Edit API Key" }),
123227
+ /* @__PURE__ */ jsx25(Text27, { color: Colors.AccentGreen, children: " [P] Change Provider Type" }),
123228
+ /* @__PURE__ */ jsx25(Text27, { color: Colors.AccentBlue, children: " [R] Retry Connection" }),
123229
+ /* @__PURE__ */ jsx25(Text27, { color: Colors.Gray, children: " [Esc] Cancel and Exit" })
123212
123230
  ] })
123213
123231
  ] });
123214
123232
  }
123215
123233
  return /* @__PURE__ */ jsxs22(Fragment4, { children: [
123216
- /* @__PURE__ */ jsx25(Text26, { bold: true, color: Colors.AccentBlue, children: "Fetching Models..." }),
123217
- /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text26, { children: [
123234
+ /* @__PURE__ */ jsx25(Text27, { bold: true, color: Colors.AccentBlue, children: "Fetching Models..." }),
123235
+ /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text27, { children: [
123218
123236
  "Connecting to ",
123219
- /* @__PURE__ */ jsx25(Text26, { color: Colors.AccentGreen, children: url2 })
123237
+ /* @__PURE__ */ jsx25(Text27, { color: Colors.AccentGreen, children: url2 })
123220
123238
  ] }) }),
123221
- /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text26, { color: Colors.Gray, children: "Please wait..." }) })
123239
+ /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text27, { color: Colors.Gray, children: "Please wait..." }) })
123222
123240
  ] });
123223
123241
  case "model-select":
123224
123242
  return /* @__PURE__ */ jsxs22(Fragment4, { children: [
123225
- /* @__PURE__ */ jsx25(Text26, { bold: true, color: Colors.AccentBlue, children: "Step 5: Select Model" }),
123226
- /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text26, { children: [
123243
+ /* @__PURE__ */ jsx25(Text27, { bold: true, color: Colors.AccentBlue, children: "Step 5: Select Model" }),
123244
+ /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text27, { children: [
123227
123245
  "Endpoint: ",
123228
- /* @__PURE__ */ jsx25(Text26, { color: Colors.AccentGreen, children: name2 }),
123246
+ /* @__PURE__ */ jsx25(Text27, { color: Colors.AccentGreen, children: name2 }),
123229
123247
  " (",
123230
123248
  url2,
123231
123249
  ")"
123232
123250
  ] }) }),
123233
- /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text26, { color: Colors.AccentGreen, children: [
123251
+ /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsxs22(Text27, { color: Colors.AccentGreen, children: [
123234
123252
  "\u2713 Found ",
123235
123253
  availableModels.length,
123236
123254
  " available models"
123237
123255
  ] }) }),
123238
- /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text26, { children: "Choose a model to use:" }) }),
123256
+ /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text27, { children: "Choose a model to use:" }) }),
123239
123257
  /* @__PURE__ */ jsxs22(Box19, { marginTop: 1, flexDirection: "column", children: [
123240
- scrollOffset > 0 && /* @__PURE__ */ jsxs22(Text26, { color: Colors.Gray, children: [
123258
+ scrollOffset > 0 && /* @__PURE__ */ jsxs22(Text27, { color: Colors.Gray, children: [
123241
123259
  "\u2191 ",
123242
123260
  scrollOffset,
123243
123261
  " more above"
@@ -123247,7 +123265,7 @@ function AddCustomEndpointDialog({
123247
123265
  const isSelected = actualIndex === selectedModelIndex;
123248
123266
  const prefix = isSelected ? ">" : " ";
123249
123267
  return /* @__PURE__ */ jsxs22(
123250
- Text26,
123268
+ Text27,
123251
123269
  {
123252
123270
  color: isSelected ? Colors.AccentBlue : Colors.Gray,
123253
123271
  bold: isSelected,
@@ -123256,7 +123274,7 @@ function AddCustomEndpointDialog({
123256
123274
  " ",
123257
123275
  model.id,
123258
123276
  " ",
123259
- /* @__PURE__ */ jsxs22(Text26, { color: Colors.Gray, children: [
123277
+ /* @__PURE__ */ jsxs22(Text27, { color: Colors.Gray, children: [
123260
123278
  "(",
123261
123279
  model.ownedBy,
123262
123280
  ")"
@@ -123266,13 +123284,13 @@ function AddCustomEndpointDialog({
123266
123284
  model.id
123267
123285
  );
123268
123286
  }),
123269
- scrollOffset + VISIBLE_MODELS2 < availableModels.length && /* @__PURE__ */ jsxs22(Text26, { color: Colors.Gray, children: [
123287
+ scrollOffset + VISIBLE_MODELS2 < availableModels.length && /* @__PURE__ */ jsxs22(Text27, { color: Colors.Gray, children: [
123270
123288
  "\u2193 ",
123271
123289
  availableModels.length - (scrollOffset + VISIBLE_MODELS2),
123272
123290
  " more below"
123273
123291
  ] })
123274
123292
  ] }),
123275
- /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text26, { color: Colors.Gray, children: "\u2191/\u2193 to navigate, Enter to confirm, Esc to cancel" }) })
123293
+ /* @__PURE__ */ jsx25(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text27, { color: Colors.Gray, children: "\u2191/\u2193 to navigate, Enter to confirm, Esc to cancel" }) })
123276
123294
  ] });
123277
123295
  }
123278
123296
  };
@@ -123285,7 +123303,7 @@ function AddCustomEndpointDialog({
123285
123303
  padding: 1,
123286
123304
  width: "100%",
123287
123305
  children: [
123288
- /* @__PURE__ */ jsx25(Text26, { bold: true, color: Colors.AccentBlue, children: "Add Custom Endpoint" }),
123306
+ /* @__PURE__ */ jsx25(Text27, { bold: true, color: Colors.AccentBlue, children: "Add Custom Endpoint" }),
123289
123307
  /* @__PURE__ */ jsx25(Box19, { marginTop: 1, flexDirection: "column", children: renderStep() })
123290
123308
  ]
123291
123309
  }
@@ -123294,8 +123312,8 @@ function AddCustomEndpointDialog({
123294
123312
 
123295
123313
  // packages/cli/src/ui/components/BobAISetupDialog.tsx
123296
123314
  init_dist2();
123297
- import { useState as useState34, useEffect as useEffect33 } from "react";
123298
- import { Box as Box20, Text as Text27, useInput as useInput5 } from "ink";
123315
+ import { useState as useState34, useEffect as useEffect33, useCallback as useCallback28 } from "react";
123316
+ import { Box as Box20, Text as Text28 } from "ink";
123299
123317
  import { Fragment as Fragment5, jsx as jsx26, jsxs as jsxs23 } from "react/jsx-runtime";
123300
123318
  var DEFAULT_BOBAI_URL = "https://rtx3090.bobai.com.au/v1";
123301
123319
  var VISIBLE_MODELS = 15;
@@ -123324,9 +123342,9 @@ function BobAISetupDialog({
123324
123342
  });
123325
123343
  }
123326
123344
  }, [step, retryTrigger]);
123327
- useInput5((_input, key) => {
123345
+ const handleKey = useCallback28((key) => {
123328
123346
  if (step === "url" || step === "apikey") {
123329
- if (key.escape) {
123347
+ if (key.name === "escape") {
123330
123348
  if (step === "apikey") {
123331
123349
  setStep("url");
123332
123350
  return;
@@ -123335,53 +123353,50 @@ function BobAISetupDialog({
123335
123353
  }
123336
123354
  return;
123337
123355
  }
123338
- if (key.escape) {
123356
+ if (key.name === "escape") {
123339
123357
  if (step === "model-select") {
123340
123358
  setStep("apikey");
123341
123359
  return;
123342
123360
  }
123343
- if (step === "model-fetch" && fetchError) {
123344
- onCancel();
123345
- return;
123346
- }
123347
123361
  onCancel();
123348
123362
  return;
123349
123363
  }
123350
123364
  if (step === "model-select") {
123351
- if (key.upArrow && selectedModelIndex > 0) {
123365
+ if (key.name === "up" && selectedModelIndex > 0) {
123352
123366
  const next = selectedModelIndex - 1;
123353
123367
  setSelectedModelIndex(next);
123354
123368
  if (next < scrollOffset) setScrollOffset(next);
123355
123369
  return;
123356
123370
  }
123357
- if (key.downArrow && selectedModelIndex < availableModels.length - 1) {
123371
+ if (key.name === "down" && selectedModelIndex < availableModels.length - 1) {
123358
123372
  const next = selectedModelIndex + 1;
123359
123373
  setSelectedModelIndex(next);
123360
123374
  if (next >= scrollOffset + VISIBLE_MODELS) setScrollOffset(next - VISIBLE_MODELS + 1);
123361
123375
  return;
123362
123376
  }
123363
- if (key.return && availableModels.length > 0) {
123377
+ if (key.name === "return" && availableModels.length > 0) {
123364
123378
  onSubmit(apiKey, url2, availableModels[selectedModelIndex].id);
123365
123379
  return;
123366
123380
  }
123367
123381
  }
123368
123382
  if (step === "model-fetch" && fetchError) {
123369
- if (_input === "r" || _input === "R") {
123383
+ if (key.sequence === "r" || key.sequence === "R") {
123370
123384
  setRetryTrigger((n2) => n2 + 1);
123371
123385
  return;
123372
123386
  }
123373
- if (_input === "u" || _input === "U") {
123387
+ if (key.sequence === "u" || key.sequence === "U") {
123374
123388
  setFetchError(null);
123375
123389
  setStep("url");
123376
123390
  return;
123377
123391
  }
123378
- if (_input === "k" || _input === "K") {
123392
+ if (key.sequence === "k" || key.sequence === "K") {
123379
123393
  setFetchError(null);
123380
123394
  setStep("apikey");
123381
123395
  return;
123382
123396
  }
123383
123397
  }
123384
- });
123398
+ }, [step, selectedModelIndex, scrollOffset, availableModels, apiKey, url2, fetchError, onSubmit, onCancel]);
123399
+ useKeypress(handleKey, { isActive: true });
123385
123400
  const handleUrlSubmit = (value) => {
123386
123401
  const trimmed = value.trim();
123387
123402
  if (trimmed) {
@@ -123398,105 +123413,107 @@ function BobAISetupDialog({
123398
123413
  switch (step) {
123399
123414
  case "url":
123400
123415
  return /* @__PURE__ */ jsxs23(Fragment5, { children: [
123401
- /* @__PURE__ */ jsx26(Text27, { bold: true, color: Colors.AccentBlue, children: "Step 1: BobAI Endpoint URL" }),
123402
- /* @__PURE__ */ jsx26(Box20, { marginTop: 1, children: /* @__PURE__ */ jsxs23(Text27, { color: Colors.Gray, children: [
123416
+ /* @__PURE__ */ jsx26(Text28, { bold: true, color: Colors.AccentBlue, children: "Step 1: BobAI Endpoint URL" }),
123417
+ /* @__PURE__ */ jsx26(Box20, { marginTop: 1, children: /* @__PURE__ */ jsxs23(Text28, { color: Colors.Gray, children: [
123403
123418
  "Default: ",
123404
123419
  DEFAULT_BOBAI_URL
123405
123420
  ] }) }),
123406
- /* @__PURE__ */ jsx26(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx26(Text27, { children: "Enter URL:" }) }),
123421
+ /* @__PURE__ */ jsx26(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx26(Text28, { children: "Enter URL:" }) }),
123407
123422
  /* @__PURE__ */ jsxs23(Box20, { marginTop: 1, children: [
123408
- /* @__PURE__ */ jsx26(Text27, { color: Colors.AccentPurple, children: "> " }),
123423
+ /* @__PURE__ */ jsx26(Text28, { color: Colors.AccentPurple, children: "> " }),
123409
123424
  /* @__PURE__ */ jsx26(
123410
123425
  PasteAwareTextInput,
123411
123426
  {
123412
123427
  value: url2,
123413
123428
  onChange: setUrl,
123414
- onSubmit: handleUrlSubmit
123429
+ onSubmit: handleUrlSubmit,
123430
+ isActive: step === "url"
123415
123431
  }
123416
123432
  )
123417
123433
  ] }),
123418
- /* @__PURE__ */ jsx26(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx26(Text27, { color: Colors.Gray, children: "Enter to continue \xB7 Esc to cancel" }) })
123434
+ /* @__PURE__ */ jsx26(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx26(Text28, { color: Colors.Gray, children: "Enter to continue \xB7 Esc to cancel" }) })
123419
123435
  ] });
123420
123436
  case "apikey":
123421
123437
  return /* @__PURE__ */ jsxs23(Fragment5, { children: [
123422
- /* @__PURE__ */ jsx26(Text27, { bold: true, color: Colors.AccentBlue, children: "Step 2: API Key" }),
123423
- /* @__PURE__ */ jsx26(Box20, { marginTop: 1, children: /* @__PURE__ */ jsxs23(Text27, { children: [
123438
+ /* @__PURE__ */ jsx26(Text28, { bold: true, color: Colors.AccentBlue, children: "Step 2: API Key" }),
123439
+ /* @__PURE__ */ jsx26(Box20, { marginTop: 1, children: /* @__PURE__ */ jsxs23(Text28, { children: [
123424
123440
  "URL: ",
123425
- /* @__PURE__ */ jsx26(Text27, { color: Colors.AccentGreen, children: url2 })
123441
+ /* @__PURE__ */ jsx26(Text28, { color: Colors.AccentGreen, children: url2 })
123426
123442
  ] }) }),
123427
- /* @__PURE__ */ jsx26(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx26(Text27, { color: Colors.AccentYellow, children: "Key is shown in plain text so you can verify the paste." }) }),
123428
- /* @__PURE__ */ jsx26(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx26(Text27, { children: "Paste your BobAI API key (Ctrl+Shift+V or middle-click):" }) }),
123443
+ /* @__PURE__ */ jsx26(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx26(Text28, { color: Colors.AccentYellow, children: "Key is shown in plain text so you can verify the paste." }) }),
123444
+ /* @__PURE__ */ jsx26(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx26(Text28, { children: "Paste your BobAI API key (Ctrl+Shift+V or middle-click):" }) }),
123429
123445
  /* @__PURE__ */ jsxs23(Box20, { marginTop: 1, children: [
123430
- /* @__PURE__ */ jsx26(Text27, { color: Colors.AccentPurple, children: "> " }),
123446
+ /* @__PURE__ */ jsx26(Text28, { color: Colors.AccentPurple, children: "> " }),
123431
123447
  /* @__PURE__ */ jsx26(
123432
123448
  PasteAwareTextInput,
123433
123449
  {
123434
123450
  value: apiKey,
123435
123451
  onChange: setApiKey,
123436
- onSubmit: handleApiKeySubmit
123452
+ onSubmit: handleApiKeySubmit,
123453
+ isActive: step === "apikey"
123437
123454
  }
123438
123455
  )
123439
123456
  ] }),
123440
- /* @__PURE__ */ jsx26(Box20, { marginTop: 1, children: /* @__PURE__ */ jsxs23(Text27, { color: Colors.Gray, children: [
123457
+ /* @__PURE__ */ jsx26(Box20, { marginTop: 1, children: /* @__PURE__ */ jsxs23(Text28, { color: Colors.Gray, children: [
123441
123458
  "Length: ",
123442
- /* @__PURE__ */ jsxs23(Text27, { color: apiKey.length > 0 ? Colors.AccentGreen : Colors.AccentRed, children: [
123459
+ /* @__PURE__ */ jsxs23(Text28, { color: apiKey.length > 0 ? Colors.AccentGreen : Colors.AccentRed, children: [
123443
123460
  apiKey.length,
123444
123461
  " chars"
123445
123462
  ] })
123446
123463
  ] }) }),
123447
- /* @__PURE__ */ jsx26(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx26(Text27, { color: Colors.Gray, children: "Enter to connect \xB7 Esc to go back" }) })
123464
+ /* @__PURE__ */ jsx26(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx26(Text28, { color: Colors.Gray, children: "Enter to connect \xB7 Esc to go back" }) })
123448
123465
  ] });
123449
123466
  case "model-fetch":
123450
123467
  if (fetchError) {
123451
123468
  return /* @__PURE__ */ jsxs23(Fragment5, { children: [
123452
- /* @__PURE__ */ jsx26(Text27, { bold: true, color: Colors.AccentRed, children: "Connection Failed" }),
123469
+ /* @__PURE__ */ jsx26(Text28, { bold: true, color: Colors.AccentRed, children: "Connection Failed" }),
123453
123470
  /* @__PURE__ */ jsxs23(Box20, { marginTop: 1, flexDirection: "column", children: [
123454
- /* @__PURE__ */ jsxs23(Text27, { children: [
123471
+ /* @__PURE__ */ jsxs23(Text28, { children: [
123455
123472
  "URL: ",
123456
- /* @__PURE__ */ jsx26(Text27, { color: Colors.AccentCyan, children: url2 })
123473
+ /* @__PURE__ */ jsx26(Text28, { color: Colors.AccentCyan, children: url2 })
123457
123474
  ] }),
123458
- /* @__PURE__ */ jsxs23(Text27, { children: [
123475
+ /* @__PURE__ */ jsxs23(Text28, { children: [
123459
123476
  "Key: ",
123460
- /* @__PURE__ */ jsx26(Text27, { color: Colors.AccentCyan, children: keyPreview })
123477
+ /* @__PURE__ */ jsx26(Text28, { color: Colors.AccentCyan, children: keyPreview })
123461
123478
  ] })
123462
123479
  ] }),
123463
- /* @__PURE__ */ jsx26(Box20, { marginTop: 1, children: /* @__PURE__ */ jsxs23(Text27, { color: Colors.AccentRed, children: [
123480
+ /* @__PURE__ */ jsx26(Box20, { marginTop: 1, children: /* @__PURE__ */ jsxs23(Text28, { color: Colors.AccentRed, children: [
123464
123481
  "Error: ",
123465
123482
  fetchError
123466
123483
  ] }) }),
123467
123484
  /* @__PURE__ */ jsxs23(Box20, { marginTop: 1, flexDirection: "column", children: [
123468
- /* @__PURE__ */ jsx26(Text27, { color: Colors.AccentBlue, children: " [R] Retry same settings" }),
123469
- /* @__PURE__ */ jsx26(Text27, { color: Colors.AccentGreen, children: " [U] Edit URL" }),
123470
- /* @__PURE__ */ jsx26(Text27, { color: Colors.AccentGreen, children: " [K] Edit API Key" }),
123471
- /* @__PURE__ */ jsx26(Text27, { color: Colors.Gray, children: " [Esc] Cancel" })
123485
+ /* @__PURE__ */ jsx26(Text28, { color: Colors.AccentBlue, children: " [R] Retry same settings" }),
123486
+ /* @__PURE__ */ jsx26(Text28, { color: Colors.AccentGreen, children: " [U] Edit URL" }),
123487
+ /* @__PURE__ */ jsx26(Text28, { color: Colors.AccentGreen, children: " [K] Edit API Key" }),
123488
+ /* @__PURE__ */ jsx26(Text28, { color: Colors.Gray, children: " [Esc] Cancel" })
123472
123489
  ] })
123473
123490
  ] });
123474
123491
  }
123475
123492
  return /* @__PURE__ */ jsxs23(Fragment5, { children: [
123476
- /* @__PURE__ */ jsx26(Text27, { bold: true, color: Colors.AccentBlue, children: "Connecting to BobAI..." }),
123493
+ /* @__PURE__ */ jsx26(Text28, { bold: true, color: Colors.AccentBlue, children: "Connecting to BobAI..." }),
123477
123494
  /* @__PURE__ */ jsxs23(Box20, { marginTop: 1, flexDirection: "column", children: [
123478
- /* @__PURE__ */ jsxs23(Text27, { children: [
123495
+ /* @__PURE__ */ jsxs23(Text28, { children: [
123479
123496
  "URL: ",
123480
- /* @__PURE__ */ jsx26(Text27, { color: Colors.AccentGreen, children: url2 })
123497
+ /* @__PURE__ */ jsx26(Text28, { color: Colors.AccentGreen, children: url2 })
123481
123498
  ] }),
123482
- /* @__PURE__ */ jsxs23(Text27, { children: [
123499
+ /* @__PURE__ */ jsxs23(Text28, { children: [
123483
123500
  "Key: ",
123484
- /* @__PURE__ */ jsx26(Text27, { color: Colors.AccentGreen, children: keyPreview })
123501
+ /* @__PURE__ */ jsx26(Text28, { color: Colors.AccentGreen, children: keyPreview })
123485
123502
  ] })
123486
123503
  ] }),
123487
- /* @__PURE__ */ jsx26(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx26(Text27, { color: Colors.Gray, children: "Fetching model list (10s timeout)..." }) })
123504
+ /* @__PURE__ */ jsx26(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx26(Text28, { color: Colors.Gray, children: "Fetching model list (10s timeout)..." }) })
123488
123505
  ] });
123489
123506
  case "model-select":
123490
123507
  return /* @__PURE__ */ jsxs23(Fragment5, { children: [
123491
- /* @__PURE__ */ jsx26(Text27, { bold: true, color: Colors.AccentBlue, children: "Step 3: Select Model" }),
123492
- /* @__PURE__ */ jsx26(Box20, { marginTop: 1, children: /* @__PURE__ */ jsxs23(Text27, { color: Colors.AccentGreen, children: [
123508
+ /* @__PURE__ */ jsx26(Text28, { bold: true, color: Colors.AccentBlue, children: "Step 3: Select Model" }),
123509
+ /* @__PURE__ */ jsx26(Box20, { marginTop: 1, children: /* @__PURE__ */ jsxs23(Text28, { color: Colors.AccentGreen, children: [
123493
123510
  "\u2713 ",
123494
123511
  availableModels.length,
123495
123512
  " models from ",
123496
123513
  url2
123497
123514
  ] }) }),
123498
123515
  /* @__PURE__ */ jsxs23(Box20, { marginTop: 1, flexDirection: "column", children: [
123499
- scrollOffset > 0 && /* @__PURE__ */ jsxs23(Text27, { color: Colors.Gray, children: [
123516
+ scrollOffset > 0 && /* @__PURE__ */ jsxs23(Text28, { color: Colors.Gray, children: [
123500
123517
  "\u2191 ",
123501
123518
  scrollOffset,
123502
123519
  " more above"
@@ -123505,7 +123522,7 @@ function BobAISetupDialog({
123505
123522
  const actualIndex = scrollOffset + displayIndex;
123506
123523
  const isSelected = actualIndex === selectedModelIndex;
123507
123524
  return /* @__PURE__ */ jsxs23(
123508
- Text27,
123525
+ Text28,
123509
123526
  {
123510
123527
  color: isSelected ? Colors.AccentBlue : Colors.Gray,
123511
123528
  bold: isSelected,
@@ -123517,13 +123534,13 @@ function BobAISetupDialog({
123517
123534
  model.id
123518
123535
  );
123519
123536
  }),
123520
- scrollOffset + VISIBLE_MODELS < availableModels.length && /* @__PURE__ */ jsxs23(Text27, { color: Colors.Gray, children: [
123537
+ scrollOffset + VISIBLE_MODELS < availableModels.length && /* @__PURE__ */ jsxs23(Text28, { color: Colors.Gray, children: [
123521
123538
  "\u2193 ",
123522
123539
  availableModels.length - (scrollOffset + VISIBLE_MODELS),
123523
123540
  " more below"
123524
123541
  ] })
123525
123542
  ] }),
123526
- /* @__PURE__ */ jsx26(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx26(Text27, { color: Colors.Gray, children: "\u2191/\u2193 navigate \xB7 Enter confirm \xB7 Esc back" }) })
123543
+ /* @__PURE__ */ jsx26(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx26(Text28, { color: Colors.Gray, children: "\u2191/\u2193 navigate \xB7 Enter confirm \xB7 Esc back" }) })
123527
123544
  ] });
123528
123545
  }
123529
123546
  };
@@ -123536,7 +123553,7 @@ function BobAISetupDialog({
123536
123553
  padding: 1,
123537
123554
  width: "100%",
123538
123555
  children: [
123539
- /* @__PURE__ */ jsx26(Text27, { bold: true, color: Colors.AccentBlue, children: "\u{1F916} BobAI Cloud GPU Setup" }),
123556
+ /* @__PURE__ */ jsx26(Text28, { bold: true, color: Colors.AccentBlue, children: "\u{1F916} BobAI Cloud GPU Setup" }),
123540
123557
  /* @__PURE__ */ jsx26(Box20, { marginTop: 1, flexDirection: "column", children: renderStep() })
123541
123558
  ]
123542
123559
  }
@@ -123548,7 +123565,7 @@ init_modelManager();
123548
123565
 
123549
123566
  // packages/cli/src/ui/components/OpenAIEndpointDialog.tsx
123550
123567
  import { useState as useState35, useEffect as useEffect34 } from "react";
123551
- import { Box as Box21, Text as Text28 } from "ink";
123568
+ import { Box as Box21, Text as Text29 } from "ink";
123552
123569
  init_database();
123553
123570
  import { jsx as jsx27, jsxs as jsxs24 } from "react/jsx-runtime";
123554
123571
  var COMMON_ENDPOINTS = [
@@ -123607,11 +123624,11 @@ function OpenAIEndpointDialog({
123607
123624
  }
123608
123625
  }, { isActive: true });
123609
123626
  if (isLoading) {
123610
- return /* @__PURE__ */ jsx27(Box21, { flexDirection: "column", padding: 1, children: /* @__PURE__ */ jsx27(Text28, { children: "Loading endpoints..." }) });
123627
+ return /* @__PURE__ */ jsx27(Box21, { flexDirection: "column", padding: 1, children: /* @__PURE__ */ jsx27(Text29, { children: "Loading endpoints..." }) });
123611
123628
  }
123612
123629
  return /* @__PURE__ */ jsxs24(Box21, { flexDirection: "column", padding: 1, children: [
123613
- /* @__PURE__ */ jsx27(Text28, { bold: true, color: Colors.AccentBlue, children: "Select OpenAI Endpoint" }),
123614
- /* @__PURE__ */ jsx27(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx27(Text28, { children: "Choose an OpenAI API endpoint:" }) }),
123630
+ /* @__PURE__ */ jsx27(Text29, { bold: true, color: Colors.AccentBlue, children: "Select OpenAI Endpoint" }),
123631
+ /* @__PURE__ */ jsx27(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx27(Text29, { children: "Choose an OpenAI API endpoint:" }) }),
123615
123632
  /* @__PURE__ */ jsx27(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx27(
123616
123633
  RadioButtonSelect,
123617
123634
  {
@@ -123623,7 +123640,7 @@ function OpenAIEndpointDialog({
123623
123640
  onSelect: handleSelect
123624
123641
  }
123625
123642
  ) }),
123626
- /* @__PURE__ */ jsx27(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx27(Text28, { color: Colors.Gray, children: "(Press Escape to cancel)" }) })
123643
+ /* @__PURE__ */ jsx27(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx27(Text29, { color: Colors.Gray, children: "(Press Escape to cancel)" }) })
123627
123644
  ] });
123628
123645
  }
123629
123646
 
@@ -123932,8 +123949,8 @@ function AuthDialog({
123932
123949
  padding: 1,
123933
123950
  width: "100%",
123934
123951
  children: [
123935
- /* @__PURE__ */ jsx28(Text29, { bold: true, children: "Get started" }),
123936
- /* @__PURE__ */ jsx28(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx28(Text29, { children: "How would you like to authenticate for this project?" }) }),
123952
+ /* @__PURE__ */ jsx28(Text30, { bold: true, children: "Get started" }),
123953
+ /* @__PURE__ */ jsx28(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx28(Text30, { children: "How would you like to authenticate for this project?" }) }),
123937
123954
  /* @__PURE__ */ jsx28(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx28(
123938
123955
  RadioButtonSelect,
123939
123956
  {
@@ -123942,18 +123959,18 @@ function AuthDialog({
123942
123959
  onSelect: handleAuthSelect
123943
123960
  }
123944
123961
  ) }),
123945
- errorMessage && /* @__PURE__ */ jsx28(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx28(Text29, { color: Colors.AccentRed, children: errorMessage }) }),
123946
- /* @__PURE__ */ jsx28(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx28(Text29, { color: Colors.AccentPurple, children: "(Use Enter to Set Auth)" }) }),
123947
- /* @__PURE__ */ jsx28(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx28(Text29, { children: "Terms of Services and Privacy Notice for FSS Link" }) }),
123948
- /* @__PURE__ */ jsx28(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx28(Text29, { color: Colors.AccentBlue, children: "https://github.com/FSSCoding/fss-link/blob/main/README.md" }) })
123962
+ errorMessage && /* @__PURE__ */ jsx28(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx28(Text30, { color: Colors.AccentRed, children: errorMessage }) }),
123963
+ /* @__PURE__ */ jsx28(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx28(Text30, { color: Colors.AccentPurple, children: "(Use Enter to Set Auth)" }) }),
123964
+ /* @__PURE__ */ jsx28(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx28(Text30, { children: "Terms of Services and Privacy Notice for FSS Link" }) }),
123965
+ /* @__PURE__ */ jsx28(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx28(Text30, { color: Colors.AccentBlue, children: "https://github.com/FSSCoding/fss-link/blob/main/README.md" }) })
123949
123966
  ]
123950
123967
  }
123951
123968
  );
123952
123969
  }
123953
123970
 
123954
123971
  // packages/cli/src/ui/components/ProviderEndpointSelectionDialog.tsx
123955
- import { useState as useState37, useEffect as useEffect35 } from "react";
123956
- import { Box as Box23, Text as Text30, useInput as useInput6 } from "ink";
123972
+ import { useState as useState37, useEffect as useEffect35, useCallback as useCallback29 } from "react";
123973
+ import { Box as Box23, Text as Text31 } from "ink";
123957
123974
  init_modelManager();
123958
123975
  import { jsx as jsx29, jsxs as jsxs26 } from "react/jsx-runtime";
123959
123976
  function ProviderEndpointSelectionDialog({
@@ -124050,13 +124067,12 @@ function ProviderEndpointSelectionDialog({
124050
124067
  };
124051
124068
  loadEndpoints();
124052
124069
  }, []);
124053
- useInput6((input, key) => {
124054
- if (loading || switching) return;
124055
- if (key.escape) {
124070
+ const handleKey = useCallback29((key) => {
124071
+ if (key.name === "escape") {
124056
124072
  onCancel();
124057
124073
  return;
124058
124074
  }
124059
- if (input.includes("\n") || input.includes("\r")) {
124075
+ if (key.name === "return") {
124060
124076
  if (endpoints.length > 0) {
124061
124077
  const selected = endpoints[selectedIndex];
124062
124078
  if (selected.type === "add-custom") {
@@ -124082,13 +124098,14 @@ function ProviderEndpointSelectionDialog({
124082
124098
  }
124083
124099
  return;
124084
124100
  }
124085
- if (key.upArrow && selectedIndex > 0) {
124101
+ if (key.name === "up" && selectedIndex > 0) {
124086
124102
  setSelectedIndex(selectedIndex - 1);
124087
124103
  }
124088
- if (key.downArrow && selectedIndex < endpoints.length - 1) {
124104
+ if (key.name === "down" && selectedIndex < endpoints.length - 1) {
124089
124105
  setSelectedIndex(selectedIndex + 1);
124090
124106
  }
124091
- });
124107
+ }, [endpoints, selectedIndex, onCancel, onAddCustom, onSelect]);
124108
+ useKeypress(handleKey, { isActive: !loading && !switching });
124092
124109
  if (loading) {
124093
124110
  return /* @__PURE__ */ jsxs26(
124094
124111
  Box23,
@@ -124099,8 +124116,8 @@ function ProviderEndpointSelectionDialog({
124099
124116
  padding: 1,
124100
124117
  width: "100%",
124101
124118
  children: [
124102
- /* @__PURE__ */ jsx29(Text30, { bold: true, color: Colors.AccentBlue, children: "Provider / Endpoint Selection" }),
124103
- /* @__PURE__ */ jsx29(Box23, { marginTop: 1, children: /* @__PURE__ */ jsx29(Text30, { children: "Loading providers and endpoints..." }) })
124119
+ /* @__PURE__ */ jsx29(Text31, { bold: true, color: Colors.AccentBlue, children: "Provider / Endpoint Selection" }),
124120
+ /* @__PURE__ */ jsx29(Box23, { marginTop: 1, children: /* @__PURE__ */ jsx29(Text31, { children: "Loading providers and endpoints..." }) })
124104
124121
  ]
124105
124122
  }
124106
124123
  );
@@ -124115,8 +124132,8 @@ function ProviderEndpointSelectionDialog({
124115
124132
  padding: 1,
124116
124133
  width: "100%",
124117
124134
  children: [
124118
- /* @__PURE__ */ jsx29(Text30, { bold: true, color: Colors.AccentBlue, children: "Switching Model" }),
124119
- /* @__PURE__ */ jsx29(Box23, { marginTop: 1, children: /* @__PURE__ */ jsxs26(Text30, { children: [
124135
+ /* @__PURE__ */ jsx29(Text31, { bold: true, color: Colors.AccentBlue, children: "Switching Model" }),
124136
+ /* @__PURE__ */ jsx29(Box23, { marginTop: 1, children: /* @__PURE__ */ jsxs26(Text31, { children: [
124120
124137
  "Activating ",
124121
124138
  endpoints[selectedIndex]?.modelName || "model",
124122
124139
  "..."
@@ -124135,9 +124152,9 @@ function ProviderEndpointSelectionDialog({
124135
124152
  padding: 1,
124136
124153
  width: "100%",
124137
124154
  children: [
124138
- /* @__PURE__ */ jsx29(Text30, { bold: true, color: Colors.AccentRed, children: "Provider Selection Error" }),
124139
- /* @__PURE__ */ jsx29(Box23, { marginTop: 1, children: /* @__PURE__ */ jsx29(Text30, { children: error }) }),
124140
- /* @__PURE__ */ jsx29(Box23, { marginTop: 1, children: /* @__PURE__ */ jsx29(Text30, { color: Colors.Gray, children: "Press Esc to cancel" }) })
124155
+ /* @__PURE__ */ jsx29(Text31, { bold: true, color: Colors.AccentRed, children: "Provider Selection Error" }),
124156
+ /* @__PURE__ */ jsx29(Box23, { marginTop: 1, children: /* @__PURE__ */ jsx29(Text31, { children: error }) }),
124157
+ /* @__PURE__ */ jsx29(Box23, { marginTop: 1, children: /* @__PURE__ */ jsx29(Text31, { color: Colors.Gray, children: "Press Esc to cancel" }) })
124141
124158
  ]
124142
124159
  }
124143
124160
  );
@@ -124151,15 +124168,15 @@ function ProviderEndpointSelectionDialog({
124151
124168
  padding: 1,
124152
124169
  width: "100%",
124153
124170
  children: [
124154
- /* @__PURE__ */ jsx29(Text30, { bold: true, color: Colors.AccentBlue, children: "Model Selection" }),
124155
- /* @__PURE__ */ jsx29(Box23, { marginTop: 1, children: /* @__PURE__ */ jsx29(Text30, { children: "Select a model or provider:" }) }),
124171
+ /* @__PURE__ */ jsx29(Text31, { bold: true, color: Colors.AccentBlue, children: "Model Selection" }),
124172
+ /* @__PURE__ */ jsx29(Box23, { marginTop: 1, children: /* @__PURE__ */ jsx29(Text31, { children: "Select a model or provider:" }) }),
124156
124173
  /* @__PURE__ */ jsx29(Box23, { marginTop: 1, flexDirection: "column", children: endpoints.map((endpoint, index) => {
124157
124174
  const isSelected = index === selectedIndex;
124158
124175
  const prefix = isSelected ? ">" : " ";
124159
124176
  if (endpoint.type === "recent-model") {
124160
124177
  const activeIndicator = endpoint.isActive ? "\u25CF " : " ";
124161
124178
  return /* @__PURE__ */ jsxs26(
124162
- Text30,
124179
+ Text31,
124163
124180
  {
124164
124181
  color: isSelected ? Colors.AccentBlue : Colors.Foreground,
124165
124182
  bold: isSelected,
@@ -124175,7 +124192,7 @@ function ProviderEndpointSelectionDialog({
124175
124192
  }
124176
124193
  if (endpoint.type === "add-custom") {
124177
124194
  return /* @__PURE__ */ jsxs26(
124178
- Text30,
124195
+ Text31,
124179
124196
  {
124180
124197
  color: isSelected ? Colors.AccentGreen : Colors.AccentCyan,
124181
124198
  bold: isSelected,
@@ -124189,7 +124206,7 @@ function ProviderEndpointSelectionDialog({
124189
124206
  );
124190
124207
  }
124191
124208
  return /* @__PURE__ */ jsxs26(
124192
- Text30,
124209
+ Text31,
124193
124210
  {
124194
124211
  color: isSelected ? Colors.AccentBlue : Colors.Foreground,
124195
124212
  bold: isSelected,
@@ -124202,16 +124219,16 @@ function ProviderEndpointSelectionDialog({
124202
124219
  `${endpoint.label}-${index}`
124203
124220
  );
124204
124221
  }) }),
124205
- /* @__PURE__ */ jsx29(Box23, { marginTop: 1, children: /* @__PURE__ */ jsx29(Text30, { color: Colors.Gray, children: "\u25CF = Active model | Recent models listed first" }) }),
124206
- /* @__PURE__ */ jsx29(Box23, { marginTop: 1, children: /* @__PURE__ */ jsx29(Text30, { color: Colors.Gray, children: "\u2191/\u2193 to navigate, Enter to select, Esc to cancel" }) })
124222
+ /* @__PURE__ */ jsx29(Box23, { marginTop: 1, children: /* @__PURE__ */ jsx29(Text31, { color: Colors.Gray, children: "\u25CF = Active model | Recent models listed first" }) }),
124223
+ /* @__PURE__ */ jsx29(Box23, { marginTop: 1, children: /* @__PURE__ */ jsx29(Text31, { color: Colors.Gray, children: "\u2191/\u2193 to navigate, Enter to select, Esc to cancel" }) })
124207
124224
  ]
124208
124225
  }
124209
124226
  );
124210
124227
  }
124211
124228
 
124212
124229
  // packages/cli/src/ui/components/EnhancedModelSelectionDialog.tsx
124213
- import { useState as useState38, useEffect as useEffect36 } from "react";
124214
- import { Box as Box24, Text as Text31, useInput as useInput7 } from "ink";
124230
+ import { useState as useState38, useEffect as useEffect36, useCallback as useCallback30 } from "react";
124231
+ import { Box as Box24, Text as Text32 } from "ink";
124215
124232
  init_modelManager();
124216
124233
  import { jsx as jsx30, jsxs as jsxs27 } from "react/jsx-runtime";
124217
124234
  function EnhancedModelSelectionDialog({
@@ -124266,13 +124283,12 @@ function EnhancedModelSelectionDialog({
124266
124283
  };
124267
124284
  loadAndFetchModels();
124268
124285
  }, [providerType, endpointUrl]);
124269
- useInput7((input, key) => {
124270
- if (loading || switching) return;
124271
- if (key.escape || input === "b" || input === "B") {
124286
+ const handleKey = useCallback30((key) => {
124287
+ if (key.name === "escape" || key.sequence === "b" || key.sequence === "B") {
124272
124288
  onBack();
124273
124289
  return;
124274
124290
  }
124275
- if (key.upArrow && selectedIndex > 0) {
124291
+ if (key.name === "up" && selectedIndex > 0) {
124276
124292
  const newIndex = selectedIndex - 1;
124277
124293
  setSelectedIndex(newIndex);
124278
124294
  if (newIndex < scrollOffset) {
@@ -124280,7 +124296,7 @@ function EnhancedModelSelectionDialog({
124280
124296
  }
124281
124297
  return;
124282
124298
  }
124283
- if (key.downArrow && selectedIndex < allModels.length - 1) {
124299
+ if (key.name === "down" && selectedIndex < allModels.length - 1) {
124284
124300
  const newIndex = selectedIndex + 1;
124285
124301
  setSelectedIndex(newIndex);
124286
124302
  if (newIndex >= scrollOffset + VISIBLE_MODELS2) {
@@ -124288,7 +124304,7 @@ function EnhancedModelSelectionDialog({
124288
124304
  }
124289
124305
  return;
124290
124306
  }
124291
- if (key.return && allModels.length > 0) {
124307
+ if (key.name === "return" && allModels.length > 0) {
124292
124308
  const selectedModel = allModels[selectedIndex];
124293
124309
  setSwitching(true);
124294
124310
  const modelManager = getModelManager();
@@ -124324,7 +124340,8 @@ function EnhancedModelSelectionDialog({
124324
124340
  })();
124325
124341
  return;
124326
124342
  }
124327
- });
124343
+ }, [allModels, selectedIndex, scrollOffset, onBack, onComplete, providerType, endpointUrl]);
124344
+ useKeypress(handleKey, { isActive: !loading && !switching });
124328
124345
  if (loading) {
124329
124346
  return /* @__PURE__ */ jsxs27(
124330
124347
  Box24,
@@ -124335,8 +124352,8 @@ function EnhancedModelSelectionDialog({
124335
124352
  padding: 1,
124336
124353
  width: "100%",
124337
124354
  children: [
124338
- /* @__PURE__ */ jsx30(Text31, { bold: true, color: Colors.AccentBlue, children: "Model Selection" }),
124339
- /* @__PURE__ */ jsx30(Box24, { marginTop: 1, children: /* @__PURE__ */ jsx30(Text31, { children: "Loading configured models..." }) })
124355
+ /* @__PURE__ */ jsx30(Text32, { bold: true, color: Colors.AccentBlue, children: "Model Selection" }),
124356
+ /* @__PURE__ */ jsx30(Box24, { marginTop: 1, children: /* @__PURE__ */ jsx30(Text32, { children: "Loading configured models..." }) })
124340
124357
  ]
124341
124358
  }
124342
124359
  );
@@ -124351,8 +124368,8 @@ function EnhancedModelSelectionDialog({
124351
124368
  padding: 1,
124352
124369
  width: "100%",
124353
124370
  children: [
124354
- /* @__PURE__ */ jsx30(Text31, { bold: true, color: Colors.AccentBlue, children: "Switching Model" }),
124355
- /* @__PURE__ */ jsx30(Box24, { marginTop: 1, children: /* @__PURE__ */ jsxs27(Text31, { children: [
124371
+ /* @__PURE__ */ jsx30(Text32, { bold: true, color: Colors.AccentBlue, children: "Switching Model" }),
124372
+ /* @__PURE__ */ jsx30(Box24, { marginTop: 1, children: /* @__PURE__ */ jsxs27(Text32, { children: [
124356
124373
  "Activating ",
124357
124374
  allModels[selectedIndex]?.id,
124358
124375
  "..."
@@ -124371,9 +124388,9 @@ function EnhancedModelSelectionDialog({
124371
124388
  padding: 1,
124372
124389
  width: "100%",
124373
124390
  children: [
124374
- /* @__PURE__ */ jsx30(Text31, { bold: true, color: Colors.AccentRed, children: "Model Selection Error" }),
124375
- /* @__PURE__ */ jsx30(Box24, { marginTop: 1, children: /* @__PURE__ */ jsx30(Text31, { children: error }) }),
124376
- /* @__PURE__ */ jsx30(Box24, { marginTop: 1, children: /* @__PURE__ */ jsx30(Text31, { color: Colors.Gray, children: "Press Esc to cancel" }) })
124391
+ /* @__PURE__ */ jsx30(Text32, { bold: true, color: Colors.AccentRed, children: "Model Selection Error" }),
124392
+ /* @__PURE__ */ jsx30(Box24, { marginTop: 1, children: /* @__PURE__ */ jsx30(Text32, { children: error }) }),
124393
+ /* @__PURE__ */ jsx30(Box24, { marginTop: 1, children: /* @__PURE__ */ jsx30(Text32, { color: Colors.Gray, children: "Press Esc to cancel" }) })
124377
124394
  ]
124378
124395
  }
124379
124396
  );
@@ -124390,20 +124407,20 @@ function EnhancedModelSelectionDialog({
124390
124407
  padding: 1,
124391
124408
  width: "100%",
124392
124409
  children: [
124393
- /* @__PURE__ */ jsxs27(Text31, { bold: true, color: Colors.AccentBlue, children: [
124410
+ /* @__PURE__ */ jsxs27(Text32, { bold: true, color: Colors.AccentBlue, children: [
124394
124411
  "Model Selection - ",
124395
124412
  providerType
124396
124413
  ] }),
124397
- endpointLabel && /* @__PURE__ */ jsx30(Box24, { marginTop: 1, children: /* @__PURE__ */ jsxs27(Text31, { color: Colors.Gray, children: [
124414
+ endpointLabel && /* @__PURE__ */ jsx30(Box24, { marginTop: 1, children: /* @__PURE__ */ jsxs27(Text32, { color: Colors.Gray, children: [
124398
124415
  "Endpoint: ",
124399
124416
  endpointLabel
124400
124417
  ] }) }),
124401
- /* @__PURE__ */ jsx30(Box24, { marginTop: 1, children: /* @__PURE__ */ jsxs27(Text31, { children: [
124418
+ /* @__PURE__ */ jsx30(Box24, { marginTop: 1, children: /* @__PURE__ */ jsxs27(Text32, { children: [
124402
124419
  "Select a model (",
124403
124420
  allModels.length,
124404
124421
  " available):"
124405
124422
  ] }) }),
124406
- modelsAbove > 0 && /* @__PURE__ */ jsx30(Box24, { marginTop: 1, children: /* @__PURE__ */ jsxs27(Text31, { color: Colors.Gray, children: [
124423
+ modelsAbove > 0 && /* @__PURE__ */ jsx30(Box24, { marginTop: 1, children: /* @__PURE__ */ jsxs27(Text32, { color: Colors.Gray, children: [
124407
124424
  "\u2191 ",
124408
124425
  modelsAbove,
124409
124426
  " more above"
@@ -124422,7 +124439,7 @@ function EnhancedModelSelectionDialog({
124422
124439
  }
124423
124440
  const label = `${prefix} ${statusIcon}${model.id}`;
124424
124441
  return /* @__PURE__ */ jsx30(
124425
- Text31,
124442
+ Text32,
124426
124443
  {
124427
124444
  color: isSelected ? Colors.AccentBlue : Colors.Foreground,
124428
124445
  bold: isSelected,
@@ -124431,20 +124448,20 @@ function EnhancedModelSelectionDialog({
124431
124448
  model.id
124432
124449
  );
124433
124450
  }) }),
124434
- modelsBelow > 0 && /* @__PURE__ */ jsx30(Box24, { marginTop: 1, children: /* @__PURE__ */ jsxs27(Text31, { color: Colors.Gray, children: [
124451
+ modelsBelow > 0 && /* @__PURE__ */ jsx30(Box24, { marginTop: 1, children: /* @__PURE__ */ jsxs27(Text32, { color: Colors.Gray, children: [
124435
124452
  "\u2193 ",
124436
124453
  modelsBelow,
124437
124454
  " more below"
124438
124455
  ] }) }),
124439
- /* @__PURE__ */ jsx30(Box24, { marginTop: 1, children: /* @__PURE__ */ jsx30(Text31, { color: Colors.Gray, children: "\u2191/\u2193 to navigate, Enter to select, Esc/b to go back" }) }),
124440
- /* @__PURE__ */ jsx30(Box24, { marginTop: 1, children: /* @__PURE__ */ jsx30(Text31, { color: Colors.Gray, children: "\u{1F195} = new model, \u2713 = existing, \u25CF = currently active" }) })
124456
+ /* @__PURE__ */ jsx30(Box24, { marginTop: 1, children: /* @__PURE__ */ jsx30(Text32, { color: Colors.Gray, children: "\u2191/\u2193 to navigate, Enter to select, Esc/b to go back" }) }),
124457
+ /* @__PURE__ */ jsx30(Box24, { marginTop: 1, children: /* @__PURE__ */ jsx30(Text32, { color: Colors.Gray, children: "\u{1F195} = new model, \u2713 = existing, \u25CF = currently active" }) })
124441
124458
  ]
124442
124459
  }
124443
124460
  );
124444
124461
  }
124445
124462
 
124446
124463
  // packages/cli/src/ui/components/WelcomeBackDialog.tsx
124447
- import { Box as Box25, Text as Text32 } from "ink";
124464
+ import { Box as Box25, Text as Text33 } from "ink";
124448
124465
  import { Fragment as Fragment6, jsx as jsx31, jsxs as jsxs28 } from "react/jsx-runtime";
124449
124466
  var WelcomeBackDialog = ({
124450
124467
  projectSummary,
@@ -124545,32 +124562,32 @@ var WelcomeBackDialog = ({
124545
124562
  }
124546
124563
  };
124547
124564
  return /* @__PURE__ */ jsxs28(Box25, { flexDirection: "column", padding: 1, children: [
124548
- /* @__PURE__ */ jsx31(Box25, { marginBottom: 1, children: /* @__PURE__ */ jsx31(Text32, { bold: true, color: Colors.AccentPurple, children: "Welcome Back to FSS Link" }) }),
124565
+ /* @__PURE__ */ jsx31(Box25, { marginBottom: 1, children: /* @__PURE__ */ jsx31(Text33, { bold: true, color: Colors.AccentPurple, children: "Welcome Back to FSS Link" }) }),
124549
124566
  /* @__PURE__ */ jsxs28(Box25, { flexDirection: "column", marginBottom: 2, paddingX: 1, children: [
124550
- projectSummary.projectGoal && /* @__PURE__ */ jsx31(Box25, { marginBottom: 1, children: /* @__PURE__ */ jsxs28(Text32, { color: Colors.Foreground, children: [
124551
- /* @__PURE__ */ jsx31(Text32, { bold: true, children: "Project:" }),
124567
+ projectSummary.projectGoal && /* @__PURE__ */ jsx31(Box25, { marginBottom: 1, children: /* @__PURE__ */ jsxs28(Text33, { color: Colors.Foreground, children: [
124568
+ /* @__PURE__ */ jsx31(Text33, { bold: true, children: "Project:" }),
124552
124569
  " ",
124553
124570
  projectSummary.projectGoal
124554
124571
  ] }) }),
124555
124572
  /* @__PURE__ */ jsxs28(Box25, { flexDirection: "row", marginBottom: 1, children: [
124556
- /* @__PURE__ */ jsx31(Text32, { color: Colors.Gray, children: "Last worked: " }),
124557
- /* @__PURE__ */ jsx31(Text32, { color: Colors.Foreground, children: projectSummary.timeAgo })
124573
+ /* @__PURE__ */ jsx31(Text33, { color: Colors.Gray, children: "Last worked: " }),
124574
+ /* @__PURE__ */ jsx31(Text33, { color: Colors.Foreground, children: projectSummary.timeAgo })
124558
124575
  ] }),
124559
124576
  /* @__PURE__ */ jsxs28(Box25, { flexDirection: "row", marginBottom: 1, children: [
124560
- /* @__PURE__ */ jsx31(Text32, { color: Colors.Gray, children: "Sessions: " }),
124561
- /* @__PURE__ */ jsx31(Text32, { color: Colors.Foreground, children: projectSummary.totalSessions }),
124577
+ /* @__PURE__ */ jsx31(Text33, { color: Colors.Gray, children: "Sessions: " }),
124578
+ /* @__PURE__ */ jsx31(Text33, { color: Colors.Foreground, children: projectSummary.totalSessions }),
124562
124579
  projectSummary.activeSessions > 0 && /* @__PURE__ */ jsxs28(Fragment6, { children: [
124563
- /* @__PURE__ */ jsx31(Text32, { color: Colors.Gray, children: " (" }),
124564
- /* @__PURE__ */ jsxs28(Text32, { color: Colors.AccentGreen, children: [
124580
+ /* @__PURE__ */ jsx31(Text33, { color: Colors.Gray, children: " (" }),
124581
+ /* @__PURE__ */ jsxs28(Text33, { color: Colors.AccentGreen, children: [
124565
124582
  projectSummary.activeSessions,
124566
124583
  " active"
124567
124584
  ] }),
124568
- /* @__PURE__ */ jsx31(Text32, { color: Colors.Gray, children: ")" })
124585
+ /* @__PURE__ */ jsx31(Text33, { color: Colors.Gray, children: ")" })
124569
124586
  ] })
124570
124587
  ] }),
124571
124588
  /* @__PURE__ */ jsxs28(Box25, { flexDirection: "row", marginBottom: 1, children: [
124572
- /* @__PURE__ */ jsx31(Text32, { color: Colors.Gray, children: "Momentum: " }),
124573
- /* @__PURE__ */ jsxs28(Text32, { color: getMomentumColor(projectSummary.momentum), children: [
124589
+ /* @__PURE__ */ jsx31(Text33, { color: Colors.Gray, children: "Momentum: " }),
124590
+ /* @__PURE__ */ jsxs28(Text33, { color: getMomentumColor(projectSummary.momentum), children: [
124574
124591
  getMomentumEmoji(projectSummary.momentum),
124575
124592
  " ",
124576
124593
  projectSummary.momentum
@@ -124578,9 +124595,9 @@ var WelcomeBackDialog = ({
124578
124595
  ] }),
124579
124596
  projectSummary.gitStatus && /* @__PURE__ */ jsxs28(Box25, { flexDirection: "column", marginBottom: 1, children: [
124580
124597
  /* @__PURE__ */ jsxs28(Box25, { flexDirection: "row", marginBottom: 1, children: [
124581
- /* @__PURE__ */ jsx31(Text32, { color: Colors.Gray, children: "Branch: " }),
124582
- /* @__PURE__ */ jsx31(Text32, { color: Colors.AccentBlue, children: projectSummary.gitStatus.branch }),
124583
- (projectSummary.gitStatus.ahead || projectSummary.gitStatus.behind) && /* @__PURE__ */ jsxs28(Text32, { color: Colors.Gray, children: [
124598
+ /* @__PURE__ */ jsx31(Text33, { color: Colors.Gray, children: "Branch: " }),
124599
+ /* @__PURE__ */ jsx31(Text33, { color: Colors.AccentBlue, children: projectSummary.gitStatus.branch }),
124600
+ (projectSummary.gitStatus.ahead || projectSummary.gitStatus.behind) && /* @__PURE__ */ jsxs28(Text33, { color: Colors.Gray, children: [
124584
124601
  " ",
124585
124602
  "[",
124586
124603
  projectSummary.gitStatus.ahead && `\u2191${projectSummary.gitStatus.ahead}`,
@@ -124590,20 +124607,20 @@ var WelcomeBackDialog = ({
124590
124607
  ] })
124591
124608
  ] }),
124592
124609
  projectSummary.gitStatus.hasChanges && /* @__PURE__ */ jsxs28(Box25, { flexDirection: "row", marginBottom: 1, children: [
124593
- /* @__PURE__ */ jsx31(Text32, { color: Colors.Gray, children: "Changes: " }),
124594
- projectSummary.gitStatus.stagedFiles > 0 && /* @__PURE__ */ jsxs28(Text32, { color: Colors.AccentGreen, children: [
124610
+ /* @__PURE__ */ jsx31(Text33, { color: Colors.Gray, children: "Changes: " }),
124611
+ projectSummary.gitStatus.stagedFiles > 0 && /* @__PURE__ */ jsxs28(Text33, { color: Colors.AccentGreen, children: [
124595
124612
  projectSummary.gitStatus.stagedFiles,
124596
124613
  " staged"
124597
124614
  ] }),
124598
- projectSummary.gitStatus.stagedFiles > 0 && projectSummary.gitStatus.unstagedFiles > 0 && /* @__PURE__ */ jsx31(Text32, { color: Colors.Gray, children: ", " }),
124599
- projectSummary.gitStatus.unstagedFiles > 0 && /* @__PURE__ */ jsxs28(Text32, { color: Colors.AccentYellow, children: [
124615
+ projectSummary.gitStatus.stagedFiles > 0 && projectSummary.gitStatus.unstagedFiles > 0 && /* @__PURE__ */ jsx31(Text33, { color: Colors.Gray, children: ", " }),
124616
+ projectSummary.gitStatus.unstagedFiles > 0 && /* @__PURE__ */ jsxs28(Text33, { color: Colors.AccentYellow, children: [
124600
124617
  projectSummary.gitStatus.unstagedFiles,
124601
124618
  " unstaged"
124602
124619
  ] })
124603
124620
  ] }),
124604
124621
  projectSummary.gitStatus.lastCommitMessage && /* @__PURE__ */ jsxs28(Box25, { flexDirection: "row", marginBottom: 1, children: [
124605
- /* @__PURE__ */ jsx31(Text32, { color: Colors.Gray, children: "Last commit: " }),
124606
- /* @__PURE__ */ jsxs28(Text32, { color: Colors.Foreground, children: [
124622
+ /* @__PURE__ */ jsx31(Text33, { color: Colors.Gray, children: "Last commit: " }),
124623
+ /* @__PURE__ */ jsxs28(Text33, { color: Colors.Foreground, children: [
124607
124624
  projectSummary.gitStatus.lastCommitHash,
124608
124625
  ' "',
124609
124626
  projectSummary.gitStatus.lastCommitMessage,
@@ -124612,21 +124629,21 @@ var WelcomeBackDialog = ({
124612
124629
  ] })
124613
124630
  ] }),
124614
124631
  (projectSummary.efficiency || projectSummary.recentActivity || projectSummary.tokenEfficiency) && /* @__PURE__ */ jsxs28(Box25, { flexDirection: "column", marginBottom: 1, paddingY: 1, borderStyle: "single", borderColor: Colors.Gray, children: [
124615
- /* @__PURE__ */ jsx31(Box25, { marginBottom: 1, children: /* @__PURE__ */ jsx31(Text32, { bold: true, color: Colors.AccentPurple, children: "Quick Status" }) }),
124616
- projectSummary.efficiency && /* @__PURE__ */ jsx31(Box25, { flexDirection: "row", marginBottom: 1, children: /* @__PURE__ */ jsxs28(Text32, { color: getEfficiencyColor(projectSummary.efficiency), children: [
124632
+ /* @__PURE__ */ jsx31(Box25, { marginBottom: 1, children: /* @__PURE__ */ jsx31(Text33, { bold: true, color: Colors.AccentPurple, children: "Quick Status" }) }),
124633
+ projectSummary.efficiency && /* @__PURE__ */ jsx31(Box25, { flexDirection: "row", marginBottom: 1, children: /* @__PURE__ */ jsxs28(Text33, { color: getEfficiencyColor(projectSummary.efficiency), children: [
124617
124634
  getEfficiencyEmoji(projectSummary.efficiency),
124618
124635
  " ",
124619
124636
  projectSummary.efficiency,
124620
124637
  " efficiency"
124621
124638
  ] }) }),
124622
- projectSummary.recentActivity && /* @__PURE__ */ jsx31(Box25, { marginBottom: 1, children: /* @__PURE__ */ jsx31(Text32, { color: Colors.Foreground, children: projectSummary.recentActivity }) }),
124623
- projectSummary.tokenEfficiency && /* @__PURE__ */ jsx31(Box25, { children: /* @__PURE__ */ jsx31(Text32, { color: Colors.Gray, children: projectSummary.tokenEfficiency }) })
124639
+ projectSummary.recentActivity && /* @__PURE__ */ jsx31(Box25, { marginBottom: 1, children: /* @__PURE__ */ jsx31(Text33, { color: Colors.Foreground, children: projectSummary.recentActivity }) }),
124640
+ projectSummary.tokenEfficiency && /* @__PURE__ */ jsx31(Box25, { children: /* @__PURE__ */ jsx31(Text33, { color: Colors.Gray, children: projectSummary.tokenEfficiency }) })
124624
124641
  ] }),
124625
- projectSummary.nextSuggestion && /* @__PURE__ */ jsx31(Box25, { marginBottom: 1, children: /* @__PURE__ */ jsxs28(Text32, { color: Colors.AccentPurple, children: [
124642
+ projectSummary.nextSuggestion && /* @__PURE__ */ jsx31(Box25, { marginBottom: 1, children: /* @__PURE__ */ jsxs28(Text33, { color: Colors.AccentPurple, children: [
124626
124643
  "\u{1F4A1} ",
124627
124644
  projectSummary.nextSuggestion
124628
124645
  ] }) }),
124629
- projectSummary.lastContent && /* @__PURE__ */ jsx31(Box25, { marginBottom: 1, children: /* @__PURE__ */ jsxs28(Text32, { color: Colors.Gray, children: [
124646
+ projectSummary.lastContent && /* @__PURE__ */ jsx31(Box25, { marginBottom: 1, children: /* @__PURE__ */ jsxs28(Text33, { color: Colors.Gray, children: [
124630
124647
  'Last message: "',
124631
124648
  projectSummary.lastContent,
124632
124649
  '"'
@@ -124639,13 +124656,13 @@ var WelcomeBackDialog = ({
124639
124656
  onSelect: handleSelection
124640
124657
  }
124641
124658
  ),
124642
- /* @__PURE__ */ jsx31(Box25, { marginTop: 1, paddingX: 1, children: /* @__PURE__ */ jsx31(Text32, { color: Colors.Gray, children: "Press C to continue, R to restart, Q to cancel, or use \u2191\u2193 arrows" }) })
124659
+ /* @__PURE__ */ jsx31(Box25, { marginTop: 1, paddingX: 1, children: /* @__PURE__ */ jsx31(Text33, { color: Colors.Gray, children: "Press C to continue, R to restart, Q to cancel, or use \u2191\u2193 arrows" }) })
124643
124660
  ] });
124644
124661
  };
124645
124662
 
124646
124663
  // packages/cli/src/ui/components/SearchEngineConfigDialog.tsx
124647
- import { useState as useState39, useEffect as useEffect37 } from "react";
124648
- import { Box as Box26, Text as Text33, useInput as useInput8 } from "ink";
124664
+ import { useState as useState39, useEffect as useEffect37, useCallback as useCallback31 } from "react";
124665
+ import { Box as Box26, Text as Text34 } from "ink";
124649
124666
  init_database();
124650
124667
  import { jsx as jsx32, jsxs as jsxs29 } from "react/jsx-runtime";
124651
124668
  function SearchEngineConfigDialog({
@@ -124733,19 +124750,20 @@ function SearchEngineConfigDialog({
124733
124750
  };
124734
124751
  saveConfig();
124735
124752
  }, [isSaving, braveApiKey, tavilyApiKey]);
124736
- useInput8((input, key) => {
124737
- if (isLoading || isSaving) return;
124738
- let cleanInput = (input || "").replace(/\u001b\[[0-9;]*[a-zA-Z]/g, "").replace(/\[200~/g, "").replace(/\[201~/g, "").replace(/^\[|~$/g, "");
124739
- cleanInput = cleanInput.split("").filter((ch) => ch.charCodeAt(0) >= 32).join("");
124740
- if (cleanInput.length > 0) {
124753
+ const handleKey = useCallback31((key) => {
124754
+ if (key.paste) {
124741
124755
  if (currentField === "braveApiKey") {
124742
- setBraveApiKey((prev) => prev + cleanInput);
124756
+ setBraveApiKey((prev) => prev + key.sequence);
124743
124757
  } else if (currentField === "tavilyApiKey") {
124744
- setTavilyApiKey((prev) => prev + cleanInput);
124758
+ setTavilyApiKey((prev) => prev + key.sequence);
124745
124759
  }
124746
124760
  return;
124747
124761
  }
124748
- if (input.includes("\n") || input.includes("\r")) {
124762
+ if (key.name === "escape") {
124763
+ onCancel();
124764
+ return;
124765
+ }
124766
+ if (key.name === "return") {
124749
124767
  if (currentField === "braveApiKey") {
124750
124768
  setCurrentField("tavilyApiKey");
124751
124769
  return;
@@ -124765,11 +124783,7 @@ function SearchEngineConfigDialog({
124765
124783
  }
124766
124784
  return;
124767
124785
  }
124768
- if (key.escape) {
124769
- onCancel();
124770
- return;
124771
- }
124772
- if (key.tab) {
124786
+ if (key.name === "tab") {
124773
124787
  if (currentField === "braveApiKey") {
124774
124788
  setCurrentField("tavilyApiKey");
124775
124789
  } else if (currentField === "tavilyApiKey") {
@@ -124779,7 +124793,7 @@ function SearchEngineConfigDialog({
124779
124793
  }
124780
124794
  return;
124781
124795
  }
124782
- if (key.upArrow) {
124796
+ if (key.name === "up") {
124783
124797
  if (currentField === "tavilyApiKey") {
124784
124798
  setCurrentField("braveApiKey");
124785
124799
  } else if (currentField === "submit") {
@@ -124787,7 +124801,7 @@ function SearchEngineConfigDialog({
124787
124801
  }
124788
124802
  return;
124789
124803
  }
124790
- if (key.downArrow) {
124804
+ if (key.name === "down") {
124791
124805
  if (currentField === "braveApiKey") {
124792
124806
  setCurrentField("tavilyApiKey");
124793
124807
  } else if (currentField === "tavilyApiKey") {
@@ -124795,7 +124809,7 @@ function SearchEngineConfigDialog({
124795
124809
  }
124796
124810
  return;
124797
124811
  }
124798
- if (key.backspace || key.delete) {
124812
+ if (key.name === "backspace" || key.name === "delete") {
124799
124813
  if (currentField === "braveApiKey") {
124800
124814
  setBraveApiKey((prev) => prev.slice(0, -1));
124801
124815
  } else if (currentField === "tavilyApiKey") {
@@ -124803,7 +124817,16 @@ function SearchEngineConfigDialog({
124803
124817
  }
124804
124818
  return;
124805
124819
  }
124806
- });
124820
+ const char = key.sequence;
124821
+ if (char && char.length === 1 && char.charCodeAt(0) >= 32 && !key.ctrl && !key.meta) {
124822
+ if (currentField === "braveApiKey") {
124823
+ setBraveApiKey((prev) => prev + char);
124824
+ } else if (currentField === "tavilyApiKey") {
124825
+ setTavilyApiKey((prev) => prev + char);
124826
+ }
124827
+ }
124828
+ }, [currentField, braveApiKey, tavilyApiKey, onCancel]);
124829
+ useKeypress(handleKey, { isActive: !isLoading && !isSaving });
124807
124830
  if (isLoading) {
124808
124831
  return /* @__PURE__ */ jsx32(
124809
124832
  Box26,
@@ -124813,7 +124836,7 @@ function SearchEngineConfigDialog({
124813
124836
  flexDirection: "column",
124814
124837
  padding: 1,
124815
124838
  width: "100%",
124816
- children: /* @__PURE__ */ jsx32(Text33, { children: "Loading search engine configuration..." })
124839
+ children: /* @__PURE__ */ jsx32(Text34, { children: "Loading search engine configuration..." })
124817
124840
  }
124818
124841
  );
124819
124842
  }
@@ -124827,8 +124850,8 @@ function SearchEngineConfigDialog({
124827
124850
  padding: 1,
124828
124851
  width: "100%",
124829
124852
  children: [
124830
- /* @__PURE__ */ jsx32(Text33, { bold: true, color: Colors.AccentGreen, children: "\u{1F4BE} Saving API keys to database..." }),
124831
- /* @__PURE__ */ jsx32(Box26, { marginTop: 1, children: /* @__PURE__ */ jsx32(Text33, { color: Colors.Gray, children: "Please wait while your search engine configuration is saved." }) })
124853
+ /* @__PURE__ */ jsx32(Text34, { bold: true, color: Colors.AccentGreen, children: "\u{1F4BE} Saving API keys to database..." }),
124854
+ /* @__PURE__ */ jsx32(Box26, { marginTop: 1, children: /* @__PURE__ */ jsx32(Text34, { color: Colors.Gray, children: "Please wait while your search engine configuration is saved." }) })
124832
124855
  ]
124833
124856
  }
124834
124857
  );
@@ -124842,59 +124865,59 @@ function SearchEngineConfigDialog({
124842
124865
  padding: 1,
124843
124866
  width: "100%",
124844
124867
  children: [
124845
- /* @__PURE__ */ jsx32(Text33, { bold: true, color: Colors.AccentPurple, children: "Search Engine Configuration" }),
124846
- /* @__PURE__ */ jsx32(Box26, { marginTop: 1, children: /* @__PURE__ */ jsx32(Text33, { children: "Configure search engine APIs for web research. You need at least one API key." }) }),
124847
- /* @__PURE__ */ jsx32(Box26, { marginTop: 1, children: /* @__PURE__ */ jsx32(Text33, { bold: true, color: Colors.AccentBlue, children: "Brave Search (General Web Search)" }) }),
124848
- /* @__PURE__ */ jsx32(Box26, { marginTop: 1, children: /* @__PURE__ */ jsxs29(Text33, { color: Colors.Gray, children: [
124868
+ /* @__PURE__ */ jsx32(Text34, { bold: true, color: Colors.AccentPurple, children: "Search Engine Configuration" }),
124869
+ /* @__PURE__ */ jsx32(Box26, { marginTop: 1, children: /* @__PURE__ */ jsx32(Text34, { children: "Configure search engine APIs for web research. You need at least one API key." }) }),
124870
+ /* @__PURE__ */ jsx32(Box26, { marginTop: 1, children: /* @__PURE__ */ jsx32(Text34, { bold: true, color: Colors.AccentBlue, children: "Brave Search (General Web Search)" }) }),
124871
+ /* @__PURE__ */ jsx32(Box26, { marginTop: 1, children: /* @__PURE__ */ jsxs29(Text34, { color: Colors.Gray, children: [
124849
124872
  "Get API key: ",
124850
- /* @__PURE__ */ jsx32(Text33, { color: Colors.AccentBlue, children: "https://api.search.brave.com/" })
124873
+ /* @__PURE__ */ jsx32(Text34, { color: Colors.AccentBlue, children: "https://api.search.brave.com/" })
124851
124874
  ] }) }),
124852
124875
  /* @__PURE__ */ jsxs29(Box26, { marginTop: 1, flexDirection: "row", children: [
124853
124876
  /* @__PURE__ */ jsx32(Box26, { width: 14, children: /* @__PURE__ */ jsx32(
124854
- Text33,
124877
+ Text34,
124855
124878
  {
124856
124879
  color: currentField === "braveApiKey" ? Colors.AccentPurple : Colors.Gray,
124857
124880
  children: "Brave API Key:"
124858
124881
  }
124859
124882
  ) }),
124860
- /* @__PURE__ */ jsx32(Box26, { flexGrow: 1, children: /* @__PURE__ */ jsxs29(Text33, { children: [
124883
+ /* @__PURE__ */ jsx32(Box26, { flexGrow: 1, children: /* @__PURE__ */ jsxs29(Text34, { children: [
124861
124884
  currentField === "braveApiKey" ? "> " : " ",
124862
124885
  braveApiKey ? "\u2022".repeat(Math.min(braveApiKey.length, 20)) + (braveApiKey.length > 20 ? "..." : "") : "optional"
124863
124886
  ] }) })
124864
124887
  ] }),
124865
- /* @__PURE__ */ jsx32(Box26, { marginTop: 1, children: /* @__PURE__ */ jsx32(Text33, { bold: true, color: Colors.AccentBlue, children: "Tavily Search (Research Focus)" }) }),
124866
- /* @__PURE__ */ jsx32(Box26, { marginTop: 1, children: /* @__PURE__ */ jsxs29(Text33, { color: Colors.Gray, children: [
124888
+ /* @__PURE__ */ jsx32(Box26, { marginTop: 1, children: /* @__PURE__ */ jsx32(Text34, { bold: true, color: Colors.AccentBlue, children: "Tavily Search (Research Focus)" }) }),
124889
+ /* @__PURE__ */ jsx32(Box26, { marginTop: 1, children: /* @__PURE__ */ jsxs29(Text34, { color: Colors.Gray, children: [
124867
124890
  "Get API key: ",
124868
- /* @__PURE__ */ jsx32(Text33, { color: Colors.AccentBlue, children: "https://tavily.com/" })
124891
+ /* @__PURE__ */ jsx32(Text34, { color: Colors.AccentBlue, children: "https://tavily.com/" })
124869
124892
  ] }) }),
124870
124893
  /* @__PURE__ */ jsxs29(Box26, { marginTop: 1, flexDirection: "row", children: [
124871
124894
  /* @__PURE__ */ jsx32(Box26, { width: 14, children: /* @__PURE__ */ jsx32(
124872
- Text33,
124895
+ Text34,
124873
124896
  {
124874
124897
  color: currentField === "tavilyApiKey" ? Colors.AccentPurple : Colors.Gray,
124875
124898
  children: "Tavily API Key:"
124876
124899
  }
124877
124900
  ) }),
124878
- /* @__PURE__ */ jsx32(Box26, { flexGrow: 1, children: /* @__PURE__ */ jsxs29(Text33, { children: [
124901
+ /* @__PURE__ */ jsx32(Box26, { flexGrow: 1, children: /* @__PURE__ */ jsxs29(Text34, { children: [
124879
124902
  currentField === "tavilyApiKey" ? "> " : " ",
124880
124903
  tavilyApiKey ? "\u2022".repeat(Math.min(tavilyApiKey.length, 20)) + (tavilyApiKey.length > 20 ? "..." : "") : "optional"
124881
124904
  ] }) })
124882
124905
  ] }),
124883
124906
  /* @__PURE__ */ jsxs29(Box26, { marginTop: 1, flexDirection: "row", children: [
124884
124907
  /* @__PURE__ */ jsx32(Box26, { width: 14, children: /* @__PURE__ */ jsx32(
124885
- Text33,
124908
+ Text34,
124886
124909
  {
124887
124910
  color: currentField === "submit" ? Colors.AccentGreen : Colors.Gray,
124888
124911
  children: "Ready:"
124889
124912
  }
124890
124913
  ) }),
124891
- /* @__PURE__ */ jsx32(Box26, { flexGrow: 1, children: /* @__PURE__ */ jsxs29(Text33, { color: currentField === "submit" ? Colors.AccentGreen : Colors.Gray, children: [
124914
+ /* @__PURE__ */ jsx32(Box26, { flexGrow: 1, children: /* @__PURE__ */ jsxs29(Text34, { color: currentField === "submit" ? Colors.AccentGreen : Colors.Gray, children: [
124892
124915
  currentField === "submit" ? "> " : " ",
124893
124916
  "Save & Continue"
124894
124917
  ] }) })
124895
124918
  ] }),
124896
- /* @__PURE__ */ jsx32(Box26, { marginTop: 1, children: /* @__PURE__ */ jsx32(Text33, { color: Colors.Gray, children: "Press Enter to continue, Tab/\u2191\u2193 to navigate, Esc to cancel" }) }),
124897
- !braveApiKey && !tavilyApiKey && /* @__PURE__ */ jsx32(Box26, { marginTop: 1, children: /* @__PURE__ */ jsx32(Text33, { color: Colors.AccentYellow, children: "\u26A0\uFE0F At least one API key is required for search functionality" }) })
124919
+ /* @__PURE__ */ jsx32(Box26, { marginTop: 1, children: /* @__PURE__ */ jsx32(Text34, { color: Colors.Gray, children: "Press Enter to continue, Tab/\u2191\u2193 to navigate, Esc to cancel" }) }),
124920
+ !braveApiKey && !tavilyApiKey && /* @__PURE__ */ jsx32(Box26, { marginTop: 1, children: /* @__PURE__ */ jsx32(Text34, { color: Colors.AccentYellow, children: "\u26A0\uFE0F At least one API key is required for search functionality" }) })
124898
124921
  ]
124899
124922
  }
124900
124923
  );
@@ -124902,7 +124925,7 @@ function SearchEngineConfigDialog({
124902
124925
 
124903
124926
  // packages/cli/src/ui/components/AuthInProgress.tsx
124904
124927
  import { useState as useState40, useEffect as useEffect38 } from "react";
124905
- import { Box as Box27, Text as Text34 } from "ink";
124928
+ import { Box as Box27, Text as Text35 } from "ink";
124906
124929
  import Spinner2 from "ink-spinner";
124907
124930
  import { jsx as jsx33, jsxs as jsxs30 } from "react/jsx-runtime";
124908
124931
  function AuthInProgress({
@@ -124932,7 +124955,7 @@ function AuthInProgress({
124932
124955
  flexDirection: "column",
124933
124956
  padding: 1,
124934
124957
  width: "100%",
124935
- children: timedOut ? /* @__PURE__ */ jsx33(Text34, { color: Colors.AccentRed, children: "Authentication timed out. Please try again." }) : /* @__PURE__ */ jsx33(Box27, { children: /* @__PURE__ */ jsxs30(Text34, { children: [
124958
+ children: timedOut ? /* @__PURE__ */ jsx33(Text35, { color: Colors.AccentRed, children: "Authentication timed out. Please try again." }) : /* @__PURE__ */ jsx33(Box27, { children: /* @__PURE__ */ jsxs30(Text35, { children: [
124936
124959
  /* @__PURE__ */ jsx33(Spinner2, { type: "dots" }),
124937
124960
  " Waiting for auth... (Press ESC or CTRL+C to cancel)"
124938
124961
  ] }) })
@@ -124942,7 +124965,7 @@ function AuthInProgress({
124942
124965
 
124943
124966
  // packages/cli/src/ui/components/EditorSettingsDialog.tsx
124944
124967
  import { useState as useState41 } from "react";
124945
- import { Box as Box28, Text as Text35 } from "ink";
124968
+ import { Box as Box28, Text as Text36 } from "ink";
124946
124969
 
124947
124970
  // packages/cli/src/ui/editors/editorSettingsManager.ts
124948
124971
  init_dist2();
@@ -125056,11 +125079,11 @@ function EditorSettingsDialog({
125056
125079
  width: "100%",
125057
125080
  children: [
125058
125081
  /* @__PURE__ */ jsxs31(Box28, { flexDirection: "column", width: "45%", paddingRight: 2, children: [
125059
- /* @__PURE__ */ jsxs31(Text35, { bold: focusedSection === "editor", children: [
125082
+ /* @__PURE__ */ jsxs31(Text36, { bold: focusedSection === "editor", children: [
125060
125083
  focusedSection === "editor" ? "> " : " ",
125061
125084
  "Select Editor",
125062
125085
  " ",
125063
- /* @__PURE__ */ jsx34(Text35, { color: Colors.Gray, children: otherScopeModifiedMessage })
125086
+ /* @__PURE__ */ jsx34(Text36, { color: Colors.Gray, children: otherScopeModifiedMessage })
125064
125087
  ] }),
125065
125088
  /* @__PURE__ */ jsx34(
125066
125089
  RadioButtonSelect,
@@ -125077,7 +125100,7 @@ function EditorSettingsDialog({
125077
125100
  selectedScope
125078
125101
  ),
125079
125102
  /* @__PURE__ */ jsxs31(Box28, { marginTop: 1, flexDirection: "column", children: [
125080
- /* @__PURE__ */ jsxs31(Text35, { bold: focusedSection === "scope", children: [
125103
+ /* @__PURE__ */ jsxs31(Text36, { bold: focusedSection === "scope", children: [
125081
125104
  focusedSection === "scope" ? "> " : " ",
125082
125105
  "Apply To"
125083
125106
  ] }),
@@ -125091,17 +125114,17 @@ function EditorSettingsDialog({
125091
125114
  }
125092
125115
  )
125093
125116
  ] }),
125094
- /* @__PURE__ */ jsx34(Box28, { marginTop: 1, children: /* @__PURE__ */ jsx34(Text35, { color: Colors.Gray, children: "(Use Enter to select, Tab to change focus)" }) })
125117
+ /* @__PURE__ */ jsx34(Box28, { marginTop: 1, children: /* @__PURE__ */ jsx34(Text36, { color: Colors.Gray, children: "(Use Enter to select, Tab to change focus)" }) })
125095
125118
  ] }),
125096
125119
  /* @__PURE__ */ jsxs31(Box28, { flexDirection: "column", width: "55%", paddingLeft: 2, children: [
125097
- /* @__PURE__ */ jsx34(Text35, { bold: true, children: "Editor Preference" }),
125120
+ /* @__PURE__ */ jsx34(Text36, { bold: true, children: "Editor Preference" }),
125098
125121
  /* @__PURE__ */ jsxs31(Box28, { flexDirection: "column", gap: 1, marginTop: 1, children: [
125099
- /* @__PURE__ */ jsx34(Text35, { color: Colors.Gray, children: "These editors are currently supported. Please note that some editors cannot be used in sandbox mode." }),
125100
- /* @__PURE__ */ jsxs31(Text35, { color: Colors.Gray, children: [
125122
+ /* @__PURE__ */ jsx34(Text36, { color: Colors.Gray, children: "These editors are currently supported. Please note that some editors cannot be used in sandbox mode." }),
125123
+ /* @__PURE__ */ jsxs31(Text36, { color: Colors.Gray, children: [
125101
125124
  "Your preferred editor is:",
125102
125125
  " ",
125103
125126
  /* @__PURE__ */ jsx34(
125104
- Text35,
125127
+ Text36,
125105
125128
  {
125106
125129
  color: mergedEditorName === "None" ? Colors.AccentRed : Colors.AccentCyan,
125107
125130
  bold: true,
@@ -125119,11 +125142,11 @@ function EditorSettingsDialog({
125119
125142
 
125120
125143
  // packages/cli/src/ui/components/ShellConfirmationDialog.tsx
125121
125144
  init_dist2();
125122
- import { Box as Box29, Text as Text37 } from "ink";
125145
+ import { Box as Box29, Text as Text38 } from "ink";
125123
125146
 
125124
125147
  // packages/cli/src/ui/utils/InlineMarkdownRenderer.tsx
125125
- import React25 from "react";
125126
- import { Text as Text36 } from "ink";
125148
+ import React26 from "react";
125149
+ import { Text as Text37 } from "ink";
125127
125150
  import { Fragment as Fragment7, jsx as jsx35, jsxs as jsxs32 } from "react/jsx-runtime";
125128
125151
  var BOLD_MARKER_LENGTH = 2;
125129
125152
  var ITALIC_MARKER_LENGTH = 1;
@@ -125133,7 +125156,7 @@ var UNDERLINE_TAG_START_LENGTH = 3;
125133
125156
  var UNDERLINE_TAG_END_LENGTH = 4;
125134
125157
  var RenderInlineInternal = ({ text }) => {
125135
125158
  if (!/[*_~`<[https?:]/.test(text)) {
125136
- return /* @__PURE__ */ jsx35(Text36, { children: text });
125159
+ return /* @__PURE__ */ jsx35(Text37, { children: text });
125137
125160
  }
125138
125161
  const nodes = [];
125139
125162
  let lastIndex = 0;
@@ -125142,7 +125165,7 @@ var RenderInlineInternal = ({ text }) => {
125142
125165
  while ((match2 = inlineRegex.exec(text)) !== null) {
125143
125166
  if (match2.index > lastIndex) {
125144
125167
  nodes.push(
125145
- /* @__PURE__ */ jsx35(Text36, { children: text.slice(lastIndex, match2.index) }, `t-${lastIndex}`)
125168
+ /* @__PURE__ */ jsx35(Text37, { children: text.slice(lastIndex, match2.index) }, `t-${lastIndex}`)
125146
125169
  );
125147
125170
  }
125148
125171
  const fullMatch = match2[0];
@@ -125150,31 +125173,31 @@ var RenderInlineInternal = ({ text }) => {
125150
125173
  const key = `m-${match2.index}`;
125151
125174
  try {
125152
125175
  if (fullMatch.startsWith("**") && fullMatch.endsWith("**") && fullMatch.length > BOLD_MARKER_LENGTH * 2) {
125153
- renderedNode = /* @__PURE__ */ jsx35(Text36, { bold: true, children: fullMatch.slice(BOLD_MARKER_LENGTH, -BOLD_MARKER_LENGTH) }, key);
125176
+ renderedNode = /* @__PURE__ */ jsx35(Text37, { bold: true, children: fullMatch.slice(BOLD_MARKER_LENGTH, -BOLD_MARKER_LENGTH) }, key);
125154
125177
  } else if (fullMatch.length > ITALIC_MARKER_LENGTH * 2 && (fullMatch.startsWith("*") && fullMatch.endsWith("*") || fullMatch.startsWith("_") && fullMatch.endsWith("_")) && !/\w/.test(text.substring(match2.index - 1, match2.index)) && !/\w/.test(
125155
125178
  text.substring(inlineRegex.lastIndex, inlineRegex.lastIndex + 1)
125156
125179
  ) && !/\S[./\\]/.test(text.substring(match2.index - 2, match2.index)) && !/[./\\]\S/.test(
125157
125180
  text.substring(inlineRegex.lastIndex, inlineRegex.lastIndex + 2)
125158
125181
  )) {
125159
- renderedNode = /* @__PURE__ */ jsx35(Text36, { italic: true, children: fullMatch.slice(ITALIC_MARKER_LENGTH, -ITALIC_MARKER_LENGTH) }, key);
125182
+ renderedNode = /* @__PURE__ */ jsx35(Text37, { italic: true, children: fullMatch.slice(ITALIC_MARKER_LENGTH, -ITALIC_MARKER_LENGTH) }, key);
125160
125183
  } else if (fullMatch.startsWith("~~") && fullMatch.endsWith("~~") && fullMatch.length > STRIKETHROUGH_MARKER_LENGTH * 2) {
125161
- renderedNode = /* @__PURE__ */ jsx35(Text36, { strikethrough: true, children: fullMatch.slice(
125184
+ renderedNode = /* @__PURE__ */ jsx35(Text37, { strikethrough: true, children: fullMatch.slice(
125162
125185
  STRIKETHROUGH_MARKER_LENGTH,
125163
125186
  -STRIKETHROUGH_MARKER_LENGTH
125164
125187
  ) }, key);
125165
125188
  } else if (fullMatch.startsWith("`") && fullMatch.endsWith("`") && fullMatch.length > INLINE_CODE_MARKER_LENGTH) {
125166
125189
  const codeMatch = fullMatch.match(/^(`+)(.+?)\1$/s);
125167
125190
  if (codeMatch && codeMatch[2]) {
125168
- renderedNode = /* @__PURE__ */ jsx35(Text36, { color: Colors.AccentPurple, children: codeMatch[2] }, key);
125191
+ renderedNode = /* @__PURE__ */ jsx35(Text37, { color: Colors.AccentPurple, children: codeMatch[2] }, key);
125169
125192
  }
125170
125193
  } else if (fullMatch.startsWith("[") && fullMatch.includes("](") && fullMatch.endsWith(")")) {
125171
125194
  const linkMatch = fullMatch.match(/\[(.*?)\]\((.*?)\)/);
125172
125195
  if (linkMatch) {
125173
125196
  const linkText = linkMatch[1];
125174
125197
  const url2 = linkMatch[2];
125175
- renderedNode = /* @__PURE__ */ jsxs32(Text36, { children: [
125198
+ renderedNode = /* @__PURE__ */ jsxs32(Text37, { children: [
125176
125199
  linkText,
125177
- /* @__PURE__ */ jsxs32(Text36, { color: Colors.AccentBlue, children: [
125200
+ /* @__PURE__ */ jsxs32(Text37, { color: Colors.AccentBlue, children: [
125178
125201
  " (",
125179
125202
  url2,
125180
125203
  ")"
@@ -125182,26 +125205,26 @@ var RenderInlineInternal = ({ text }) => {
125182
125205
  ] }, key);
125183
125206
  }
125184
125207
  } else if (fullMatch.startsWith("<u>") && fullMatch.endsWith("</u>") && fullMatch.length > UNDERLINE_TAG_START_LENGTH + UNDERLINE_TAG_END_LENGTH - 1) {
125185
- renderedNode = /* @__PURE__ */ jsx35(Text36, { underline: true, children: fullMatch.slice(
125208
+ renderedNode = /* @__PURE__ */ jsx35(Text37, { underline: true, children: fullMatch.slice(
125186
125209
  UNDERLINE_TAG_START_LENGTH,
125187
125210
  -UNDERLINE_TAG_END_LENGTH
125188
125211
  ) }, key);
125189
125212
  } else if (fullMatch.match(/^https?:\/\//)) {
125190
- renderedNode = /* @__PURE__ */ jsx35(Text36, { color: Colors.AccentBlue, children: fullMatch }, key);
125213
+ renderedNode = /* @__PURE__ */ jsx35(Text37, { color: Colors.AccentBlue, children: fullMatch }, key);
125191
125214
  }
125192
125215
  } catch (e2) {
125193
125216
  console.error("Error parsing inline markdown part:", fullMatch, e2);
125194
125217
  renderedNode = null;
125195
125218
  }
125196
- nodes.push(renderedNode ?? /* @__PURE__ */ jsx35(Text36, { children: fullMatch }, key));
125219
+ nodes.push(renderedNode ?? /* @__PURE__ */ jsx35(Text37, { children: fullMatch }, key));
125197
125220
  lastIndex = inlineRegex.lastIndex;
125198
125221
  }
125199
125222
  if (lastIndex < text.length) {
125200
- nodes.push(/* @__PURE__ */ jsx35(Text36, { children: text.slice(lastIndex) }, `t-${lastIndex}`));
125223
+ nodes.push(/* @__PURE__ */ jsx35(Text37, { children: text.slice(lastIndex) }, `t-${lastIndex}`));
125201
125224
  }
125202
125225
  return /* @__PURE__ */ jsx35(Fragment7, { children: nodes.filter((node) => node !== null) });
125203
125226
  };
125204
- var RenderInline = React25.memo(RenderInlineInternal);
125227
+ var RenderInline = React26.memo(RenderInlineInternal);
125205
125228
  var getPlainTextLength = (text) => {
125206
125229
  const cleanText = text.replace(/\*\*(.*?)\*\*/g, "$1").replace(/\*(.*?)\*/g, "$1").replace(/_(.*?)_/g, "$1").replace(/~~(.*?)~~/g, "$1").replace(/`(.*?)`/g, "$1").replace(/<u>(.*?)<\/u>/g, "$1").replace(/\[(.*?)\]\(.*?\)/g, "$1");
125207
125230
  return stringWidth(cleanText);
@@ -125251,8 +125274,8 @@ var ShellConfirmationDialog = ({ request: request2 }) => {
125251
125274
  marginLeft: 1,
125252
125275
  children: [
125253
125276
  /* @__PURE__ */ jsxs33(Box29, { flexDirection: "column", marginBottom: 1, children: [
125254
- /* @__PURE__ */ jsx36(Text37, { bold: true, children: "Shell Command Execution" }),
125255
- /* @__PURE__ */ jsx36(Text37, { children: "A custom command wants to run the following shell commands:" }),
125277
+ /* @__PURE__ */ jsx36(Text38, { bold: true, children: "Shell Command Execution" }),
125278
+ /* @__PURE__ */ jsx36(Text38, { children: "A custom command wants to run the following shell commands:" }),
125256
125279
  /* @__PURE__ */ jsx36(
125257
125280
  Box29,
125258
125281
  {
@@ -125261,11 +125284,11 @@ var ShellConfirmationDialog = ({ request: request2 }) => {
125261
125284
  borderColor: Colors.Gray,
125262
125285
  paddingX: 1,
125263
125286
  marginTop: 1,
125264
- children: commands.map((cmd) => /* @__PURE__ */ jsx36(Text37, { color: Colors.AccentCyan, children: /* @__PURE__ */ jsx36(RenderInline, { text: cmd }) }, cmd))
125287
+ children: commands.map((cmd) => /* @__PURE__ */ jsx36(Text38, { color: Colors.AccentCyan, children: /* @__PURE__ */ jsx36(RenderInline, { text: cmd }) }, cmd))
125265
125288
  }
125266
125289
  )
125267
125290
  ] }),
125268
- /* @__PURE__ */ jsx36(Box29, { marginBottom: 1, children: /* @__PURE__ */ jsx36(Text37, { children: "Do you want to proceed?" }) }),
125291
+ /* @__PURE__ */ jsx36(Box29, { marginBottom: 1, children: /* @__PURE__ */ jsx36(Text38, { children: "Do you want to proceed?" }) }),
125269
125292
  /* @__PURE__ */ jsx36(RadioButtonSelect, { items: options2, onSelect: handleSelect, isFocused: true })
125270
125293
  ]
125271
125294
  }
@@ -126492,25 +126515,25 @@ init_settings();
126492
126515
  init_database();
126493
126516
 
126494
126517
  // packages/cli/src/ui/components/Tips.tsx
126495
- import { Box as Box30, Text as Text38 } from "ink";
126518
+ import { Box as Box30, Text as Text39 } from "ink";
126496
126519
  import { jsx as jsx37, jsxs as jsxs34 } from "react/jsx-runtime";
126497
126520
  var Tips = ({ config }) => {
126498
126521
  const geminiMdFileCount = config.getGeminiMdFileCount();
126499
126522
  return /* @__PURE__ */ jsxs34(Box30, { flexDirection: "column", children: [
126500
- /* @__PURE__ */ jsx37(Text38, { color: Colors.Foreground, children: "Tips for getting started:" }),
126501
- /* @__PURE__ */ jsx37(Text38, { color: Colors.Foreground, children: "1. Ask questions, edit files, or run commands." }),
126502
- /* @__PURE__ */ jsx37(Text38, { color: Colors.Foreground, children: "2. Be specific for the best results." }),
126503
- geminiMdFileCount === 0 && /* @__PURE__ */ jsxs34(Text38, { color: Colors.Foreground, children: [
126523
+ /* @__PURE__ */ jsx37(Text39, { color: Colors.Foreground, children: "Tips for getting started:" }),
126524
+ /* @__PURE__ */ jsx37(Text39, { color: Colors.Foreground, children: "1. Ask questions, edit files, or run commands." }),
126525
+ /* @__PURE__ */ jsx37(Text39, { color: Colors.Foreground, children: "2. Be specific for the best results." }),
126526
+ geminiMdFileCount === 0 && /* @__PURE__ */ jsxs34(Text39, { color: Colors.Foreground, children: [
126504
126527
  "3. Create",
126505
126528
  " ",
126506
- /* @__PURE__ */ jsx37(Text38, { bold: true, color: Colors.AccentPurple, children: "LINK.md" }),
126529
+ /* @__PURE__ */ jsx37(Text39, { bold: true, color: Colors.AccentPurple, children: "LINK.md" }),
126507
126530
  " ",
126508
126531
  "in your project to give FSS Link project-specific instructions and customize its behavior."
126509
126532
  ] }),
126510
- /* @__PURE__ */ jsxs34(Text38, { color: Colors.Foreground, children: [
126533
+ /* @__PURE__ */ jsxs34(Text39, { color: Colors.Foreground, children: [
126511
126534
  geminiMdFileCount === 0 ? "4." : "3.",
126512
126535
  " ",
126513
- /* @__PURE__ */ jsx37(Text38, { bold: true, color: Colors.AccentPurple, children: "/help" }),
126536
+ /* @__PURE__ */ jsx37(Text39, { bold: true, color: Colors.AccentPurple, children: "/help" }),
126514
126537
  " ",
126515
126538
  "for more information."
126516
126539
  ] })
@@ -126565,7 +126588,7 @@ var ConsolePatcher = class {
126565
126588
  };
126566
126589
 
126567
126590
  // packages/cli/src/ui/components/DetailedMessagesDisplay.tsx
126568
- import { Box as Box31, Text as Text39 } from "ink";
126591
+ import { Box as Box31, Text as Text40 } from "ink";
126569
126592
  import { jsx as jsx38, jsxs as jsxs35 } from "react/jsx-runtime";
126570
126593
  var DetailedMessagesDisplay = ({ messages, maxHeight, width }) => {
126571
126594
  if (messages.length === 0) {
@@ -126582,9 +126605,9 @@ var DetailedMessagesDisplay = ({ messages, maxHeight, width }) => {
126582
126605
  paddingX: 1,
126583
126606
  width,
126584
126607
  children: [
126585
- /* @__PURE__ */ jsx38(Box31, { marginBottom: 1, children: /* @__PURE__ */ jsxs35(Text39, { bold: true, color: Colors.Foreground, children: [
126608
+ /* @__PURE__ */ jsx38(Box31, { marginBottom: 1, children: /* @__PURE__ */ jsxs35(Text40, { bold: true, color: Colors.Foreground, children: [
126586
126609
  "Debug Console ",
126587
- /* @__PURE__ */ jsx38(Text39, { color: Colors.Gray, children: "(ctrl+o to close)" })
126610
+ /* @__PURE__ */ jsx38(Text40, { color: Colors.Gray, children: "(ctrl+o to close)" })
126588
126611
  ] }) }),
126589
126612
  /* @__PURE__ */ jsx38(MaxSizedBox, { maxHeight, maxWidth: width - borderAndPadding, children: messages.map((msg, index) => {
126590
126613
  let textColor = Colors.Foreground;
@@ -126607,13 +126630,13 @@ var DetailedMessagesDisplay = ({ messages, maxHeight, width }) => {
126607
126630
  break;
126608
126631
  }
126609
126632
  return /* @__PURE__ */ jsxs35(Box31, { flexDirection: "row", children: [
126610
- /* @__PURE__ */ jsxs35(Text39, { color: textColor, children: [
126633
+ /* @__PURE__ */ jsxs35(Text40, { color: textColor, children: [
126611
126634
  icon,
126612
126635
  " "
126613
126636
  ] }),
126614
- /* @__PURE__ */ jsxs35(Text39, { color: textColor, wrap: "wrap", children: [
126637
+ /* @__PURE__ */ jsxs35(Text40, { color: textColor, wrap: "wrap", children: [
126615
126638
  msg.content,
126616
- msg.count && msg.count > 1 && /* @__PURE__ */ jsxs35(Text39, { color: Colors.Gray, children: [
126639
+ msg.count && msg.count > 1 && /* @__PURE__ */ jsxs35(Text40, { color: Colors.Gray, children: [
126617
126640
  " (x",
126618
126641
  msg.count,
126619
126642
  ")"
@@ -126627,7 +126650,7 @@ var DetailedMessagesDisplay = ({ messages, maxHeight, width }) => {
126627
126650
  };
126628
126651
 
126629
126652
  // packages/cli/src/ui/components/messages/UserMessage.tsx
126630
- import { Text as Text40, Box as Box32 } from "ink";
126653
+ import { Text as Text41, Box as Box32 } from "ink";
126631
126654
  import { jsx as jsx39, jsxs as jsxs36 } from "react/jsx-runtime";
126632
126655
  var UserMessage = ({ text }) => {
126633
126656
  const prefix = "> ";
@@ -126646,34 +126669,34 @@ var UserMessage = ({ text }) => {
126646
126669
  marginY: 1,
126647
126670
  alignSelf: "flex-start",
126648
126671
  children: [
126649
- /* @__PURE__ */ jsx39(Box32, { width: prefixWidth, children: /* @__PURE__ */ jsx39(Text40, { color: textColor, children: prefix }) }),
126650
- /* @__PURE__ */ jsx39(Box32, { flexGrow: 1, children: /* @__PURE__ */ jsx39(Text40, { wrap: "wrap", color: textColor, children: text }) })
126672
+ /* @__PURE__ */ jsx39(Box32, { width: prefixWidth, children: /* @__PURE__ */ jsx39(Text41, { color: textColor, children: prefix }) }),
126673
+ /* @__PURE__ */ jsx39(Box32, { flexGrow: 1, children: /* @__PURE__ */ jsx39(Text41, { wrap: "wrap", color: textColor, children: text }) })
126651
126674
  ]
126652
126675
  }
126653
126676
  );
126654
126677
  };
126655
126678
 
126656
126679
  // packages/cli/src/ui/components/messages/UserShellMessage.tsx
126657
- import { Box as Box33, Text as Text41 } from "ink";
126680
+ import { Box as Box33, Text as Text42 } from "ink";
126658
126681
  import { jsx as jsx40, jsxs as jsxs37 } from "react/jsx-runtime";
126659
126682
  var UserShellMessage = ({ text }) => {
126660
126683
  const commandToDisplay = text.startsWith("!") ? text.substring(1) : text;
126661
126684
  return /* @__PURE__ */ jsxs37(Box33, { children: [
126662
- /* @__PURE__ */ jsx40(Text41, { color: Colors.AccentCyan, children: "$ " }),
126663
- /* @__PURE__ */ jsx40(Text41, { children: commandToDisplay })
126685
+ /* @__PURE__ */ jsx40(Text42, { color: Colors.AccentCyan, children: "$ " }),
126686
+ /* @__PURE__ */ jsx40(Text42, { children: commandToDisplay })
126664
126687
  ] });
126665
126688
  };
126666
126689
 
126667
126690
  // packages/cli/src/ui/components/messages/GeminiMessage.tsx
126668
- import { Text as Text44, Box as Box36 } from "ink";
126691
+ import { Text as Text45, Box as Box36 } from "ink";
126669
126692
 
126670
126693
  // packages/cli/src/ui/utils/MarkdownDisplay.tsx
126671
- import React28 from "react";
126672
- import { Text as Text43, Box as Box35 } from "ink";
126694
+ import React29 from "react";
126695
+ import { Text as Text44, Box as Box35 } from "ink";
126673
126696
 
126674
126697
  // packages/cli/src/ui/utils/TableRenderer.tsx
126675
- import React26 from "react";
126676
- import { Text as Text42, Box as Box34 } from "ink";
126698
+ import React27 from "react";
126699
+ import { Text as Text43, Box as Box34 } from "ink";
126677
126700
  import { jsx as jsx41, jsxs as jsxs38 } from "react/jsx-runtime";
126678
126701
  var TableRenderer = ({
126679
126702
  headers,
@@ -126722,8 +126745,8 @@ var TableRenderer = ({
126722
126745
  }
126723
126746
  const actualDisplayWidth = getPlainTextLength(cellContent);
126724
126747
  const paddingNeeded = Math.max(0, contentWidth - actualDisplayWidth);
126725
- return /* @__PURE__ */ jsxs38(Text42, { children: [
126726
- isHeader ? /* @__PURE__ */ jsx41(Text42, { bold: true, color: Colors.AccentCyan, children: /* @__PURE__ */ jsx41(RenderInline, { text: cellContent }) }) : /* @__PURE__ */ jsx41(RenderInline, { text: cellContent }),
126748
+ return /* @__PURE__ */ jsxs38(Text43, { children: [
126749
+ isHeader ? /* @__PURE__ */ jsx41(Text43, { bold: true, color: Colors.AccentCyan, children: /* @__PURE__ */ jsx41(RenderInline, { text: cellContent }) }) : /* @__PURE__ */ jsx41(RenderInline, { text: cellContent }),
126727
126750
  " ".repeat(paddingNeeded)
126728
126751
  ] });
126729
126752
  };
@@ -126736,17 +126759,17 @@ var TableRenderer = ({
126736
126759
  const char = chars[type2];
126737
126760
  const borderParts = adjustedWidths.map((w) => char.horizontal.repeat(w));
126738
126761
  const border = char.left + borderParts.join(char.middle) + char.right;
126739
- return /* @__PURE__ */ jsx41(Text42, { children: border });
126762
+ return /* @__PURE__ */ jsx41(Text43, { children: border });
126740
126763
  };
126741
126764
  const renderRow = (cells, isHeader = false) => {
126742
126765
  const renderedCells = cells.map((cell, index) => {
126743
126766
  const width = adjustedWidths[index] || 0;
126744
126767
  return renderCell(cell || "", width, isHeader);
126745
126768
  });
126746
- return /* @__PURE__ */ jsxs38(Text42, { children: [
126769
+ return /* @__PURE__ */ jsxs38(Text43, { children: [
126747
126770
  "\u2502",
126748
126771
  " ",
126749
- renderedCells.map((cell, index) => /* @__PURE__ */ jsxs38(React26.Fragment, { children: [
126772
+ renderedCells.map((cell, index) => /* @__PURE__ */ jsxs38(React27.Fragment, { children: [
126750
126773
  cell,
126751
126774
  index < renderedCells.length - 1 ? " \u2502 " : ""
126752
126775
  ] }, index)),
@@ -126758,14 +126781,14 @@ var TableRenderer = ({
126758
126781
  renderBorder("top"),
126759
126782
  renderRow(headers, true),
126760
126783
  renderBorder("middle"),
126761
- rows.map((row, index) => /* @__PURE__ */ jsx41(React26.Fragment, { children: renderRow(row) }, index)),
126784
+ rows.map((row, index) => /* @__PURE__ */ jsx41(React27.Fragment, { children: renderRow(row) }, index)),
126762
126785
  renderBorder("bottom")
126763
126786
  ] });
126764
126787
  };
126765
126788
 
126766
126789
  // packages/cli/src/ui/contexts/SettingsContext.tsx
126767
- import React27, { useContext as useContext4 } from "react";
126768
- var SettingsContext = React27.createContext(
126790
+ import React28, { useContext as useContext4 } from "react";
126791
+ var SettingsContext = React28.createContext(
126769
126792
  void 0
126770
126793
  );
126771
126794
  var useSettings = () => {
@@ -126857,7 +126880,7 @@ var MarkdownDisplayInternal = ({
126857
126880
  tableRows = [];
126858
126881
  } else {
126859
126882
  addContentBlock(
126860
- /* @__PURE__ */ jsx42(Box35, { children: /* @__PURE__ */ jsx42(Text43, { wrap: "wrap", children: /* @__PURE__ */ jsx42(RenderInline, { text: line }) }) }, key)
126883
+ /* @__PURE__ */ jsx42(Box35, { children: /* @__PURE__ */ jsx42(Text44, { wrap: "wrap", children: /* @__PURE__ */ jsx42(RenderInline, { text: line }) }) }, key)
126861
126884
  );
126862
126885
  }
126863
126886
  } else if (inTable && tableSeparatorMatch) {
@@ -126889,12 +126912,12 @@ var MarkdownDisplayInternal = ({
126889
126912
  tableHeaders = [];
126890
126913
  if (line.trim().length > 0) {
126891
126914
  addContentBlock(
126892
- /* @__PURE__ */ jsx42(Box35, { children: /* @__PURE__ */ jsx42(Text43, { wrap: "wrap", children: /* @__PURE__ */ jsx42(RenderInline, { text: line }) }) }, key)
126915
+ /* @__PURE__ */ jsx42(Box35, { children: /* @__PURE__ */ jsx42(Text44, { wrap: "wrap", children: /* @__PURE__ */ jsx42(RenderInline, { text: line }) }) }, key)
126893
126916
  );
126894
126917
  }
126895
126918
  } else if (hrMatch) {
126896
126919
  addContentBlock(
126897
- /* @__PURE__ */ jsx42(Box35, { children: /* @__PURE__ */ jsx42(Text43, { dimColor: true, children: "---" }) }, key)
126920
+ /* @__PURE__ */ jsx42(Box35, { children: /* @__PURE__ */ jsx42(Text44, { dimColor: true, children: "---" }) }, key)
126898
126921
  );
126899
126922
  } else if (headerMatch) {
126900
126923
  const level = headerMatch[1].length;
@@ -126902,19 +126925,19 @@ var MarkdownDisplayInternal = ({
126902
126925
  let headerNode = null;
126903
126926
  switch (level) {
126904
126927
  case 1:
126905
- headerNode = /* @__PURE__ */ jsx42(Text43, { bold: true, color: Colors.AccentCyan, children: /* @__PURE__ */ jsx42(RenderInline, { text: headerText }) });
126928
+ headerNode = /* @__PURE__ */ jsx42(Text44, { bold: true, color: Colors.AccentCyan, children: /* @__PURE__ */ jsx42(RenderInline, { text: headerText }) });
126906
126929
  break;
126907
126930
  case 2:
126908
- headerNode = /* @__PURE__ */ jsx42(Text43, { bold: true, color: Colors.AccentBlue, children: /* @__PURE__ */ jsx42(RenderInline, { text: headerText }) });
126931
+ headerNode = /* @__PURE__ */ jsx42(Text44, { bold: true, color: Colors.AccentBlue, children: /* @__PURE__ */ jsx42(RenderInline, { text: headerText }) });
126909
126932
  break;
126910
126933
  case 3:
126911
- headerNode = /* @__PURE__ */ jsx42(Text43, { bold: true, children: /* @__PURE__ */ jsx42(RenderInline, { text: headerText }) });
126934
+ headerNode = /* @__PURE__ */ jsx42(Text44, { bold: true, children: /* @__PURE__ */ jsx42(RenderInline, { text: headerText }) });
126912
126935
  break;
126913
126936
  case 4:
126914
- headerNode = /* @__PURE__ */ jsx42(Text43, { italic: true, color: Colors.Gray, children: /* @__PURE__ */ jsx42(RenderInline, { text: headerText }) });
126937
+ headerNode = /* @__PURE__ */ jsx42(Text44, { italic: true, color: Colors.Gray, children: /* @__PURE__ */ jsx42(RenderInline, { text: headerText }) });
126915
126938
  break;
126916
126939
  default:
126917
- headerNode = /* @__PURE__ */ jsx42(Text43, { children: /* @__PURE__ */ jsx42(RenderInline, { text: headerText }) });
126940
+ headerNode = /* @__PURE__ */ jsx42(Text44, { children: /* @__PURE__ */ jsx42(RenderInline, { text: headerText }) });
126918
126941
  break;
126919
126942
  }
126920
126943
  if (headerNode) addContentBlock(/* @__PURE__ */ jsx42(Box35, { children: headerNode }, key));
@@ -126960,7 +126983,7 @@ var MarkdownDisplayInternal = ({
126960
126983
  }
126961
126984
  } else {
126962
126985
  addContentBlock(
126963
- /* @__PURE__ */ jsx42(Box35, { children: /* @__PURE__ */ jsx42(Text43, { wrap: "wrap", children: /* @__PURE__ */ jsx42(RenderInline, { text: line }) }) }, key)
126986
+ /* @__PURE__ */ jsx42(Box35, { children: /* @__PURE__ */ jsx42(Text44, { wrap: "wrap", children: /* @__PURE__ */ jsx42(RenderInline, { text: line }) }) }, key)
126964
126987
  );
126965
126988
  }
126966
126989
  }
@@ -127012,7 +127035,7 @@ var RenderCodeBlockInternal = ({
127012
127035
  );
127013
127036
  if (content.length > MAX_CODE_LINES_WHEN_PENDING) {
127014
127037
  if (MAX_CODE_LINES_WHEN_PENDING < MIN_LINES_FOR_MESSAGE) {
127015
- return /* @__PURE__ */ jsx42(Box35, { paddingLeft: CODE_BLOCK_PREFIX_PADDING, children: /* @__PURE__ */ jsx42(Text43, { color: Colors.Gray, children: "... code is being written ..." }) });
127038
+ return /* @__PURE__ */ jsx42(Box35, { paddingLeft: CODE_BLOCK_PREFIX_PADDING, children: /* @__PURE__ */ jsx42(Text44, { color: Colors.Gray, children: "... code is being written ..." }) });
127016
127039
  }
127017
127040
  const truncatedContent = content.slice(0, MAX_CODE_LINES_WHEN_PENDING);
127018
127041
  const colorizedTruncatedCode = colorizeCode(
@@ -127025,7 +127048,7 @@ var RenderCodeBlockInternal = ({
127025
127048
  );
127026
127049
  return /* @__PURE__ */ jsxs39(Box35, { paddingLeft: CODE_BLOCK_PREFIX_PADDING, flexDirection: "column", children: [
127027
127050
  colorizedTruncatedCode,
127028
- /* @__PURE__ */ jsx42(Text43, { color: Colors.Gray, children: "... generating more ..." })
127051
+ /* @__PURE__ */ jsx42(Text44, { color: Colors.Gray, children: "... generating more ..." })
127029
127052
  ] });
127030
127053
  }
127031
127054
  }
@@ -127049,7 +127072,7 @@ var RenderCodeBlockInternal = ({
127049
127072
  }
127050
127073
  );
127051
127074
  };
127052
- var RenderCodeBlock = React28.memo(RenderCodeBlockInternal);
127075
+ var RenderCodeBlock = React29.memo(RenderCodeBlockInternal);
127053
127076
  var RenderListItemInternal = ({
127054
127077
  itemText,
127055
127078
  type: type2,
@@ -127065,20 +127088,20 @@ var RenderListItemInternal = ({
127065
127088
  paddingLeft: indentation + LIST_ITEM_PREFIX_PADDING,
127066
127089
  flexDirection: "row",
127067
127090
  children: [
127068
- /* @__PURE__ */ jsx42(Box35, { width: prefixWidth, children: /* @__PURE__ */ jsx42(Text43, { children: prefix }) }),
127069
- /* @__PURE__ */ jsx42(Box35, { flexGrow: LIST_ITEM_TEXT_FLEX_GROW, children: /* @__PURE__ */ jsx42(Text43, { wrap: "wrap", children: /* @__PURE__ */ jsx42(RenderInline, { text: itemText }) }) })
127091
+ /* @__PURE__ */ jsx42(Box35, { width: prefixWidth, children: /* @__PURE__ */ jsx42(Text44, { children: prefix }) }),
127092
+ /* @__PURE__ */ jsx42(Box35, { flexGrow: LIST_ITEM_TEXT_FLEX_GROW, children: /* @__PURE__ */ jsx42(Text44, { wrap: "wrap", children: /* @__PURE__ */ jsx42(RenderInline, { text: itemText }) }) })
127070
127093
  ]
127071
127094
  }
127072
127095
  );
127073
127096
  };
127074
- var RenderListItem = React28.memo(RenderListItemInternal);
127097
+ var RenderListItem = React29.memo(RenderListItemInternal);
127075
127098
  var RenderTableInternal = ({
127076
127099
  headers,
127077
127100
  rows,
127078
127101
  terminalWidth
127079
127102
  }) => /* @__PURE__ */ jsx42(TableRenderer, { headers, rows, terminalWidth });
127080
- var RenderTable = React28.memo(RenderTableInternal);
127081
- var MarkdownDisplay = React28.memo(MarkdownDisplayInternal);
127103
+ var RenderTable = React29.memo(RenderTableInternal);
127104
+ var MarkdownDisplay = React29.memo(MarkdownDisplayInternal);
127082
127105
 
127083
127106
  // packages/cli/src/ui/components/messages/GeminiMessage.tsx
127084
127107
  import { jsx as jsx43, jsxs as jsxs40 } from "react/jsx-runtime";
@@ -127091,7 +127114,7 @@ var GeminiMessage = ({
127091
127114
  const prefix = "\u2726 ";
127092
127115
  const prefixWidth = prefix.length;
127093
127116
  return /* @__PURE__ */ jsxs40(Box36, { flexDirection: "row", children: [
127094
- /* @__PURE__ */ jsx43(Box36, { width: prefixWidth, children: /* @__PURE__ */ jsx43(Text44, { color: Colors.AccentPurple, children: prefix }) }),
127117
+ /* @__PURE__ */ jsx43(Box36, { width: prefixWidth, children: /* @__PURE__ */ jsx43(Text45, { color: Colors.AccentPurple, children: prefix }) }),
127095
127118
  /* @__PURE__ */ jsx43(Box36, { flexGrow: 1, flexDirection: "column", children: /* @__PURE__ */ jsx43(
127096
127119
  MarkdownDisplay,
127097
127120
  {
@@ -127105,26 +127128,26 @@ var GeminiMessage = ({
127105
127128
  };
127106
127129
 
127107
127130
  // packages/cli/src/ui/components/messages/InfoMessage.tsx
127108
- import { Text as Text45, Box as Box37 } from "ink";
127131
+ import { Text as Text46, Box as Box37 } from "ink";
127109
127132
  import { jsx as jsx44, jsxs as jsxs41 } from "react/jsx-runtime";
127110
127133
  var InfoMessage = ({ text }) => {
127111
127134
  const prefix = "\u2139 ";
127112
127135
  const prefixWidth = prefix.length;
127113
127136
  return /* @__PURE__ */ jsxs41(Box37, { flexDirection: "row", marginTop: 1, children: [
127114
- /* @__PURE__ */ jsx44(Box37, { width: prefixWidth, children: /* @__PURE__ */ jsx44(Text45, { color: Colors.AccentYellow, children: prefix }) }),
127115
- /* @__PURE__ */ jsx44(Box37, { flexGrow: 1, children: /* @__PURE__ */ jsx44(Text45, { wrap: "wrap", color: Colors.AccentYellow, children: /* @__PURE__ */ jsx44(RenderInline, { text }) }) })
127137
+ /* @__PURE__ */ jsx44(Box37, { width: prefixWidth, children: /* @__PURE__ */ jsx44(Text46, { color: Colors.AccentYellow, children: prefix }) }),
127138
+ /* @__PURE__ */ jsx44(Box37, { flexGrow: 1, children: /* @__PURE__ */ jsx44(Text46, { wrap: "wrap", color: Colors.AccentYellow, children: /* @__PURE__ */ jsx44(RenderInline, { text }) }) })
127116
127139
  ] });
127117
127140
  };
127118
127141
 
127119
127142
  // packages/cli/src/ui/components/messages/ErrorMessage.tsx
127120
- import { Text as Text46, Box as Box38 } from "ink";
127143
+ import { Text as Text47, Box as Box38 } from "ink";
127121
127144
  import { jsx as jsx45, jsxs as jsxs42 } from "react/jsx-runtime";
127122
127145
  var ErrorMessage = ({ text }) => {
127123
127146
  const prefix = "\u2715 ";
127124
127147
  const prefixWidth = prefix.length;
127125
127148
  return /* @__PURE__ */ jsxs42(Box38, { flexDirection: "row", marginBottom: 1, children: [
127126
- /* @__PURE__ */ jsx45(Box38, { width: prefixWidth, children: /* @__PURE__ */ jsx45(Text46, { color: Colors.AccentRed, children: prefix }) }),
127127
- /* @__PURE__ */ jsx45(Box38, { flexGrow: 1, children: /* @__PURE__ */ jsx45(Text46, { wrap: "wrap", color: Colors.AccentRed, children: text }) })
127149
+ /* @__PURE__ */ jsx45(Box38, { width: prefixWidth, children: /* @__PURE__ */ jsx45(Text47, { color: Colors.AccentRed, children: prefix }) }),
127150
+ /* @__PURE__ */ jsx45(Box38, { flexGrow: 1, children: /* @__PURE__ */ jsx45(Text47, { wrap: "wrap", color: Colors.AccentRed, children: text }) })
127128
127151
  ] });
127129
127152
  };
127130
127153
 
@@ -127133,11 +127156,11 @@ import { useMemo as useMemo8 } from "react";
127133
127156
  import { Box as Box42 } from "ink";
127134
127157
 
127135
127158
  // packages/cli/src/ui/components/messages/ToolMessage.tsx
127136
- import React29 from "react";
127137
- import { Box as Box40, Text as Text48 } from "ink";
127159
+ import React30 from "react";
127160
+ import { Box as Box40, Text as Text49 } from "ink";
127138
127161
 
127139
127162
  // packages/cli/src/ui/components/TodoDisplay.tsx
127140
- import { Box as Box39, Text as Text47 } from "ink";
127163
+ import { Box as Box39, Text as Text48 } from "ink";
127141
127164
  import { jsx as jsx46, jsxs as jsxs43 } from "react/jsx-runtime";
127142
127165
  var STATUS_ICONS = {
127143
127166
  pending: "\u25CB",
@@ -127156,8 +127179,8 @@ var TodoItemRow = ({ todo }) => {
127156
127179
  const isInProgress = todo.status === "in_progress";
127157
127180
  const itemColor = isCompleted ? Colors.Foreground : isInProgress ? Colors.AccentGreen : Colors.Foreground;
127158
127181
  return /* @__PURE__ */ jsxs43(Box39, { flexDirection: "row", minHeight: 1, children: [
127159
- /* @__PURE__ */ jsx46(Box39, { width: 3, children: /* @__PURE__ */ jsx46(Text47, { color: itemColor, children: statusIcon }) }),
127160
- /* @__PURE__ */ jsx46(Box39, { flexGrow: 1, children: /* @__PURE__ */ jsx46(Text47, { color: itemColor, strikethrough: isCompleted, wrap: "wrap", children: todo.content }) })
127182
+ /* @__PURE__ */ jsx46(Box39, { width: 3, children: /* @__PURE__ */ jsx46(Text48, { color: itemColor, children: statusIcon }) }),
127183
+ /* @__PURE__ */ jsx46(Box39, { flexGrow: 1, children: /* @__PURE__ */ jsx46(Text48, { color: itemColor, strikethrough: isCompleted, wrap: "wrap", children: todo.content }) })
127161
127184
  ] });
127162
127185
  };
127163
127186
 
@@ -127168,7 +127191,7 @@ var RESERVED_LINE_COUNT = 5;
127168
127191
  var STATUS_INDICATOR_WIDTH = 3;
127169
127192
  var MIN_LINES_SHOWN = 2;
127170
127193
  var MAXIMUM_RESULT_DISPLAY_CHARACTERS = 1e6;
127171
- var useResultDisplayRenderer = (resultDisplay) => React29.useMemo(() => {
127194
+ var useResultDisplayRenderer = (resultDisplay) => React30.useMemo(() => {
127172
127195
  if (!resultDisplay) {
127173
127196
  return { type: "none" };
127174
127197
  }
@@ -127208,7 +127231,7 @@ var StringResultRenderer = ({ data, renderAsMarkdown, availableHeight, childWidt
127208
127231
  }
127209
127232
  ) });
127210
127233
  }
127211
- return /* @__PURE__ */ jsx47(MaxSizedBox, { maxHeight: availableHeight, maxWidth: childWidth, children: /* @__PURE__ */ jsx47(Box40, { children: /* @__PURE__ */ jsx47(Text48, { wrap: "wrap", children: displayData }) }) });
127234
+ return /* @__PURE__ */ jsx47(MaxSizedBox, { maxHeight: availableHeight, maxWidth: childWidth, children: /* @__PURE__ */ jsx47(Box40, { children: /* @__PURE__ */ jsx47(Text49, { wrap: "wrap", children: displayData }) }) });
127212
127235
  };
127213
127236
  var DiffResultRenderer = ({ data, availableHeight, childWidth }) => /* @__PURE__ */ jsx47(
127214
127237
  DiffRenderer,
@@ -127278,7 +127301,7 @@ var ToolMessage = ({
127278
127301
  var ToolStatusIndicator = ({
127279
127302
  status
127280
127303
  }) => /* @__PURE__ */ jsxs44(Box40, { minWidth: STATUS_INDICATOR_WIDTH, children: [
127281
- status === "Pending" /* Pending */ && /* @__PURE__ */ jsx47(Text48, { color: Colors.AccentGreen, children: "o" }),
127304
+ status === "Pending" /* Pending */ && /* @__PURE__ */ jsx47(Text49, { color: Colors.AccentGreen, children: "o" }),
127282
127305
  status === "Executing" /* Executing */ && /* @__PURE__ */ jsx47(
127283
127306
  GeminiRespondingSpinner,
127284
127307
  {
@@ -127286,10 +127309,10 @@ var ToolStatusIndicator = ({
127286
127309
  nonRespondingDisplay: "\u22B7"
127287
127310
  }
127288
127311
  ),
127289
- status === "Success" /* Success */ && /* @__PURE__ */ jsx47(Text48, { color: Colors.AccentGreen, children: "\u2714" }),
127290
- status === "Confirming" /* Confirming */ && /* @__PURE__ */ jsx47(Text48, { color: Colors.AccentYellow, children: "?" }),
127291
- status === "Canceled" /* Canceled */ && /* @__PURE__ */ jsx47(Text48, { color: Colors.AccentYellow, bold: true, children: "-" }),
127292
- status === "Error" /* Error */ && /* @__PURE__ */ jsx47(Text48, { color: Colors.AccentRed, bold: true, children: "x" })
127312
+ status === "Success" /* Success */ && /* @__PURE__ */ jsx47(Text49, { color: Colors.AccentGreen, children: "\u2714" }),
127313
+ status === "Confirming" /* Confirming */ && /* @__PURE__ */ jsx47(Text49, { color: Colors.AccentYellow, children: "?" }),
127314
+ status === "Canceled" /* Canceled */ && /* @__PURE__ */ jsx47(Text49, { color: Colors.AccentYellow, bold: true, children: "-" }),
127315
+ status === "Error" /* Error */ && /* @__PURE__ */ jsx47(Text49, { color: Colors.AccentRed, bold: true, children: "x" })
127293
127316
  ] });
127294
127317
  var ToolInfo = ({
127295
127318
  name: name2,
@@ -127297,7 +127320,7 @@ var ToolInfo = ({
127297
127320
  status,
127298
127321
  emphasis
127299
127322
  }) => {
127300
- const nameColor = React29.useMemo(() => {
127323
+ const nameColor = React30.useMemo(() => {
127301
127324
  switch (emphasis) {
127302
127325
  case "high":
127303
127326
  return Colors.Foreground;
@@ -127312,25 +127335,25 @@ var ToolInfo = ({
127312
127335
  }
127313
127336
  }, [emphasis]);
127314
127337
  return /* @__PURE__ */ jsx47(Box40, { children: /* @__PURE__ */ jsxs44(
127315
- Text48,
127338
+ Text49,
127316
127339
  {
127317
127340
  wrap: "truncate-end",
127318
127341
  strikethrough: status === "Canceled" /* Canceled */,
127319
127342
  children: [
127320
- /* @__PURE__ */ jsx47(Text48, { color: nameColor, bold: true, children: name2 }),
127343
+ /* @__PURE__ */ jsx47(Text49, { color: nameColor, bold: true, children: name2 }),
127321
127344
  " ",
127322
- /* @__PURE__ */ jsx47(Text48, { color: Colors.Gray, children: description })
127345
+ /* @__PURE__ */ jsx47(Text49, { color: Colors.Gray, children: description })
127323
127346
  ]
127324
127347
  }
127325
127348
  ) });
127326
127349
  };
127327
- var TrailingIndicator = () => /* @__PURE__ */ jsxs44(Text48, { color: Colors.Foreground, wrap: "truncate", children: [
127350
+ var TrailingIndicator = () => /* @__PURE__ */ jsxs44(Text49, { color: Colors.Foreground, wrap: "truncate", children: [
127328
127351
  " ",
127329
127352
  "\u2190"
127330
127353
  ] });
127331
127354
 
127332
127355
  // packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx
127333
- import { Box as Box41, Text as Text49 } from "ink";
127356
+ import { Box as Box41, Text as Text50 } from "ink";
127334
127357
  init_dist2();
127335
127358
  import { jsx as jsx48, jsxs as jsxs45 } from "react/jsx-runtime";
127336
127359
  var ToolConfirmationMessage = ({
@@ -127395,8 +127418,8 @@ var ToolConfirmationMessage = ({
127395
127418
  padding: 1,
127396
127419
  overflow: "hidden",
127397
127420
  children: [
127398
- /* @__PURE__ */ jsx48(Text49, { children: "Modify in progress: " }),
127399
- /* @__PURE__ */ jsx48(Text49, { color: Colors.AccentGreen, children: "Save and close external editor to continue" })
127421
+ /* @__PURE__ */ jsx48(Text50, { children: "Modify in progress: " }),
127422
+ /* @__PURE__ */ jsx48(Text50, { color: Colors.AccentGreen, children: "Save and close external editor to continue" })
127400
127423
  ]
127401
127424
  }
127402
127425
  );
@@ -127462,7 +127485,7 @@ var ToolConfirmationMessage = ({
127462
127485
  {
127463
127486
  maxHeight: bodyContentHeight,
127464
127487
  maxWidth: Math.max(childWidth - 4, 1),
127465
- children: /* @__PURE__ */ jsx48(Box41, { children: /* @__PURE__ */ jsx48(Text49, { color: Colors.AccentCyan, children: executionProps.command }) })
127488
+ children: /* @__PURE__ */ jsx48(Box41, { children: /* @__PURE__ */ jsx48(Text50, { color: Colors.AccentCyan, children: executionProps.command }) })
127466
127489
  }
127467
127490
  ) }) });
127468
127491
  } else if (confirmationDetails.type === "info") {
@@ -127484,10 +127507,10 @@ var ToolConfirmationMessage = ({
127484
127507
  }
127485
127508
  );
127486
127509
  bodyContent = /* @__PURE__ */ jsxs45(Box41, { flexDirection: "column", paddingX: 1, marginLeft: 1, children: [
127487
- /* @__PURE__ */ jsx48(Text49, { color: Colors.AccentCyan, children: /* @__PURE__ */ jsx48(RenderInline, { text: infoProps.prompt }) }),
127510
+ /* @__PURE__ */ jsx48(Text50, { color: Colors.AccentCyan, children: /* @__PURE__ */ jsx48(RenderInline, { text: infoProps.prompt }) }),
127488
127511
  displayUrls && infoProps.urls && infoProps.urls.length > 0 && /* @__PURE__ */ jsxs45(Box41, { flexDirection: "column", marginTop: 1, children: [
127489
- /* @__PURE__ */ jsx48(Text49, { children: "URLs to fetch:" }),
127490
- infoProps.urls.map((url2) => /* @__PURE__ */ jsxs45(Text49, { children: [
127512
+ /* @__PURE__ */ jsx48(Text50, { children: "URLs to fetch:" }),
127513
+ infoProps.urls.map((url2) => /* @__PURE__ */ jsxs45(Text50, { children: [
127491
127514
  " ",
127492
127515
  "- ",
127493
127516
  /* @__PURE__ */ jsx48(RenderInline, { text: url2 })
@@ -127497,11 +127520,11 @@ var ToolConfirmationMessage = ({
127497
127520
  } else {
127498
127521
  const mcpProps = confirmationDetails;
127499
127522
  bodyContent = /* @__PURE__ */ jsxs45(Box41, { flexDirection: "column", paddingX: 1, marginLeft: 1, children: [
127500
- /* @__PURE__ */ jsxs45(Text49, { color: Colors.AccentCyan, children: [
127523
+ /* @__PURE__ */ jsxs45(Text50, { color: Colors.AccentCyan, children: [
127501
127524
  "MCP Server: ",
127502
127525
  mcpProps.serverName
127503
127526
  ] }),
127504
- /* @__PURE__ */ jsxs45(Text49, { color: Colors.AccentCyan, children: [
127527
+ /* @__PURE__ */ jsxs45(Text50, { color: Colors.AccentCyan, children: [
127505
127528
  "Tool: ",
127506
127529
  mcpProps.toolName
127507
127530
  ] })
@@ -127529,7 +127552,7 @@ var ToolConfirmationMessage = ({
127529
127552
  }
127530
127553
  return /* @__PURE__ */ jsxs45(Box41, { flexDirection: "column", padding: 1, width: childWidth, children: [
127531
127554
  /* @__PURE__ */ jsx48(Box41, { flexGrow: 1, flexShrink: 1, overflow: "hidden", marginBottom: 1, children: bodyContent }),
127532
- /* @__PURE__ */ jsx48(Box41, { marginBottom: 1, flexShrink: 0, children: /* @__PURE__ */ jsx48(Text49, { wrap: "truncate", children: question }) }),
127555
+ /* @__PURE__ */ jsx48(Box41, { marginBottom: 1, flexShrink: 0, children: /* @__PURE__ */ jsx48(Text50, { wrap: "truncate", children: question }) }),
127533
127556
  /* @__PURE__ */ jsx48(Box41, { flexShrink: 0, children: /* @__PURE__ */ jsx48(
127534
127557
  RadioButtonSelect,
127535
127558
  {
@@ -127644,7 +127667,7 @@ var GeminiMessageContent = ({
127644
127667
  };
127645
127668
 
127646
127669
  // packages/cli/src/ui/components/messages/CompressionMessage.tsx
127647
- import { Box as Box44, Text as Text50 } from "ink";
127670
+ import { Box as Box44, Text as Text51 } from "ink";
127648
127671
  import Spinner3 from "ink-spinner";
127649
127672
  import { jsx as jsx51, jsxs as jsxs47 } from "react/jsx-runtime";
127650
127673
  var CompressionMessage = ({
@@ -127652,9 +127675,9 @@ var CompressionMessage = ({
127652
127675
  }) => {
127653
127676
  const text = compression.isPending ? "Compressing chat history" : `Chat history compressed from ${compression.originalTokenCount ?? "unknown"} to ${compression.newTokenCount ?? "unknown"} tokens.`;
127654
127677
  return /* @__PURE__ */ jsxs47(Box44, { flexDirection: "row", children: [
127655
- /* @__PURE__ */ jsx51(Box44, { marginRight: 1, children: compression.isPending ? /* @__PURE__ */ jsx51(Spinner3, { type: "dots" }) : /* @__PURE__ */ jsx51(Text50, { color: Colors.AccentPurple, children: "\u2726" }) }),
127678
+ /* @__PURE__ */ jsx51(Box44, { marginRight: 1, children: compression.isPending ? /* @__PURE__ */ jsx51(Spinner3, { type: "dots" }) : /* @__PURE__ */ jsx51(Text51, { color: Colors.AccentPurple, children: "\u2726" }) }),
127656
127679
  /* @__PURE__ */ jsx51(Box44, { children: /* @__PURE__ */ jsx51(
127657
- Text50,
127680
+ Text51,
127658
127681
  {
127659
127682
  color: compression.isPending ? Colors.AccentPurple : Colors.AccentGreen,
127660
127683
  children: text
@@ -127667,7 +127690,7 @@ var CompressionMessage = ({
127667
127690
  import { Box as Box50 } from "ink";
127668
127691
 
127669
127692
  // packages/cli/src/ui/components/AboutBox.tsx
127670
- import { Box as Box45, Text as Text51 } from "ink";
127693
+ import { Box as Box45, Text as Text52 } from "ink";
127671
127694
  import { jsx as jsx52, jsxs as jsxs48 } from "react/jsx-runtime";
127672
127695
  var AboutBox = ({
127673
127696
  cliVersion,
@@ -127687,45 +127710,45 @@ var AboutBox = ({
127687
127710
  marginY: 1,
127688
127711
  width: "100%",
127689
127712
  children: [
127690
- /* @__PURE__ */ jsx52(Box45, { marginBottom: 1, children: /* @__PURE__ */ jsx52(Text51, { bold: true, color: Colors.AccentPurple, children: "About FSS Link" }) }),
127713
+ /* @__PURE__ */ jsx52(Box45, { marginBottom: 1, children: /* @__PURE__ */ jsx52(Text52, { bold: true, color: Colors.AccentPurple, children: "About FSS Link" }) }),
127691
127714
  /* @__PURE__ */ jsxs48(Box45, { flexDirection: "row", children: [
127692
- /* @__PURE__ */ jsx52(Box45, { width: "35%", children: /* @__PURE__ */ jsx52(Text51, { bold: true, color: Colors.LightBlue, children: "CLI Version" }) }),
127693
- /* @__PURE__ */ jsx52(Box45, { children: /* @__PURE__ */ jsx52(Text51, { children: cliVersion }) })
127715
+ /* @__PURE__ */ jsx52(Box45, { width: "35%", children: /* @__PURE__ */ jsx52(Text52, { bold: true, color: Colors.LightBlue, children: "CLI Version" }) }),
127716
+ /* @__PURE__ */ jsx52(Box45, { children: /* @__PURE__ */ jsx52(Text52, { children: cliVersion }) })
127694
127717
  ] }),
127695
127718
  GIT_COMMIT_INFO && !["N/A"].includes(GIT_COMMIT_INFO) && /* @__PURE__ */ jsxs48(Box45, { flexDirection: "row", children: [
127696
- /* @__PURE__ */ jsx52(Box45, { width: "35%", children: /* @__PURE__ */ jsx52(Text51, { bold: true, color: Colors.LightBlue, children: "Git Commit" }) }),
127697
- /* @__PURE__ */ jsx52(Box45, { children: /* @__PURE__ */ jsx52(Text51, { children: GIT_COMMIT_INFO }) })
127719
+ /* @__PURE__ */ jsx52(Box45, { width: "35%", children: /* @__PURE__ */ jsx52(Text52, { bold: true, color: Colors.LightBlue, children: "Git Commit" }) }),
127720
+ /* @__PURE__ */ jsx52(Box45, { children: /* @__PURE__ */ jsx52(Text52, { children: GIT_COMMIT_INFO }) })
127698
127721
  ] }),
127699
127722
  /* @__PURE__ */ jsxs48(Box45, { flexDirection: "row", children: [
127700
- /* @__PURE__ */ jsx52(Box45, { width: "35%", children: /* @__PURE__ */ jsx52(Text51, { bold: true, color: Colors.LightBlue, children: "Model" }) }),
127701
- /* @__PURE__ */ jsx52(Box45, { children: /* @__PURE__ */ jsx52(Text51, { children: modelVersion }) })
127723
+ /* @__PURE__ */ jsx52(Box45, { width: "35%", children: /* @__PURE__ */ jsx52(Text52, { bold: true, color: Colors.LightBlue, children: "Model" }) }),
127724
+ /* @__PURE__ */ jsx52(Box45, { children: /* @__PURE__ */ jsx52(Text52, { children: modelVersion }) })
127702
127725
  ] }),
127703
127726
  /* @__PURE__ */ jsxs48(Box45, { flexDirection: "row", children: [
127704
- /* @__PURE__ */ jsx52(Box45, { width: "35%", children: /* @__PURE__ */ jsx52(Text51, { bold: true, color: Colors.LightBlue, children: "Sandbox" }) }),
127705
- /* @__PURE__ */ jsx52(Box45, { children: /* @__PURE__ */ jsx52(Text51, { children: sandboxEnv }) })
127727
+ /* @__PURE__ */ jsx52(Box45, { width: "35%", children: /* @__PURE__ */ jsx52(Text52, { bold: true, color: Colors.LightBlue, children: "Sandbox" }) }),
127728
+ /* @__PURE__ */ jsx52(Box45, { children: /* @__PURE__ */ jsx52(Text52, { children: sandboxEnv }) })
127706
127729
  ] }),
127707
127730
  /* @__PURE__ */ jsxs48(Box45, { flexDirection: "row", children: [
127708
- /* @__PURE__ */ jsx52(Box45, { width: "35%", children: /* @__PURE__ */ jsx52(Text51, { bold: true, color: Colors.LightBlue, children: "OS" }) }),
127709
- /* @__PURE__ */ jsx52(Box45, { children: /* @__PURE__ */ jsx52(Text51, { children: osVersion }) })
127731
+ /* @__PURE__ */ jsx52(Box45, { width: "35%", children: /* @__PURE__ */ jsx52(Text52, { bold: true, color: Colors.LightBlue, children: "OS" }) }),
127732
+ /* @__PURE__ */ jsx52(Box45, { children: /* @__PURE__ */ jsx52(Text52, { children: osVersion }) })
127710
127733
  ] }),
127711
127734
  /* @__PURE__ */ jsxs48(Box45, { flexDirection: "row", children: [
127712
- /* @__PURE__ */ jsx52(Box45, { width: "35%", children: /* @__PURE__ */ jsx52(Text51, { bold: true, color: Colors.LightBlue, children: "Auth Method" }) }),
127713
- /* @__PURE__ */ jsx52(Box45, { children: /* @__PURE__ */ jsx52(Text51, { children: selectedAuthType.startsWith("oauth") ? "OAuth" : selectedAuthType }) })
127735
+ /* @__PURE__ */ jsx52(Box45, { width: "35%", children: /* @__PURE__ */ jsx52(Text52, { bold: true, color: Colors.LightBlue, children: "Auth Method" }) }),
127736
+ /* @__PURE__ */ jsx52(Box45, { children: /* @__PURE__ */ jsx52(Text52, { children: selectedAuthType.startsWith("oauth") ? "OAuth" : selectedAuthType }) })
127714
127737
  ] }),
127715
127738
  gcpProject && /* @__PURE__ */ jsxs48(Box45, { flexDirection: "row", children: [
127716
- /* @__PURE__ */ jsx52(Box45, { width: "35%", children: /* @__PURE__ */ jsx52(Text51, { bold: true, color: Colors.LightBlue, children: "GCP Project" }) }),
127717
- /* @__PURE__ */ jsx52(Box45, { children: /* @__PURE__ */ jsx52(Text51, { children: gcpProject }) })
127739
+ /* @__PURE__ */ jsx52(Box45, { width: "35%", children: /* @__PURE__ */ jsx52(Text52, { bold: true, color: Colors.LightBlue, children: "GCP Project" }) }),
127740
+ /* @__PURE__ */ jsx52(Box45, { children: /* @__PURE__ */ jsx52(Text52, { children: gcpProject }) })
127718
127741
  ] }),
127719
127742
  ideClient && /* @__PURE__ */ jsxs48(Box45, { flexDirection: "row", children: [
127720
- /* @__PURE__ */ jsx52(Box45, { width: "35%", children: /* @__PURE__ */ jsx52(Text51, { bold: true, color: Colors.LightBlue, children: "IDE Client" }) }),
127721
- /* @__PURE__ */ jsx52(Box45, { children: /* @__PURE__ */ jsx52(Text51, { children: ideClient }) })
127743
+ /* @__PURE__ */ jsx52(Box45, { width: "35%", children: /* @__PURE__ */ jsx52(Text52, { bold: true, color: Colors.LightBlue, children: "IDE Client" }) }),
127744
+ /* @__PURE__ */ jsx52(Box45, { children: /* @__PURE__ */ jsx52(Text52, { children: ideClient }) })
127722
127745
  ] })
127723
127746
  ]
127724
127747
  }
127725
127748
  );
127726
127749
 
127727
127750
  // packages/cli/src/ui/components/StatsDisplay.tsx
127728
- import { Box as Box46, Text as Text52 } from "ink";
127751
+ import { Box as Box46, Text as Text53 } from "ink";
127729
127752
  import Gradient3 from "ink-gradient";
127730
127753
 
127731
127754
  // packages/cli/src/ui/utils/displayUtils.ts
@@ -127804,18 +127827,18 @@ var computeSessionStats = (metrics2) => {
127804
127827
  // packages/cli/src/ui/components/StatsDisplay.tsx
127805
127828
  import { jsx as jsx53, jsxs as jsxs49 } from "react/jsx-runtime";
127806
127829
  var StatRow = ({ title, children }) => /* @__PURE__ */ jsxs49(Box46, { children: [
127807
- /* @__PURE__ */ jsx53(Box46, { width: 28, children: /* @__PURE__ */ jsx53(Text52, { color: theme.text.link, children: title }) }),
127830
+ /* @__PURE__ */ jsx53(Box46, { width: 28, children: /* @__PURE__ */ jsx53(Text53, { color: theme.text.link, children: title }) }),
127808
127831
  children
127809
127832
  ] });
127810
127833
  var SubStatRow = ({ title, children }) => /* @__PURE__ */ jsxs49(Box46, { paddingLeft: 2, children: [
127811
- /* @__PURE__ */ jsx53(Box46, { width: 26, children: /* @__PURE__ */ jsxs49(Text52, { children: [
127834
+ /* @__PURE__ */ jsx53(Box46, { width: 26, children: /* @__PURE__ */ jsxs49(Text53, { children: [
127812
127835
  "\xBB ",
127813
127836
  title
127814
127837
  ] }) }),
127815
127838
  children
127816
127839
  ] });
127817
127840
  var Section = ({ title, children }) => /* @__PURE__ */ jsxs49(Box46, { flexDirection: "column", width: "100%", marginBottom: 1, children: [
127818
- /* @__PURE__ */ jsx53(Text52, { bold: true, children: title }),
127841
+ /* @__PURE__ */ jsx53(Text53, { bold: true, children: title }),
127819
127842
  children
127820
127843
  ] });
127821
127844
  var ModelUsageTable = ({ models, totalCachedTokens, cacheEfficiency }) => {
@@ -127825,10 +127848,10 @@ var ModelUsageTable = ({ models, totalCachedTokens, cacheEfficiency }) => {
127825
127848
  const outputTokensWidth = 15;
127826
127849
  return /* @__PURE__ */ jsxs49(Box46, { flexDirection: "column", marginTop: 1, children: [
127827
127850
  /* @__PURE__ */ jsxs49(Box46, { children: [
127828
- /* @__PURE__ */ jsx53(Box46, { width: nameWidth, children: /* @__PURE__ */ jsx53(Text52, { bold: true, children: "Model Usage" }) }),
127829
- /* @__PURE__ */ jsx53(Box46, { width: requestsWidth, justifyContent: "flex-end", children: /* @__PURE__ */ jsx53(Text52, { bold: true, children: "Reqs" }) }),
127830
- /* @__PURE__ */ jsx53(Box46, { width: inputTokensWidth, justifyContent: "flex-end", children: /* @__PURE__ */ jsx53(Text52, { bold: true, children: "Input Tokens" }) }),
127831
- /* @__PURE__ */ jsx53(Box46, { width: outputTokensWidth, justifyContent: "flex-end", children: /* @__PURE__ */ jsx53(Text52, { bold: true, children: "Output Tokens" }) })
127851
+ /* @__PURE__ */ jsx53(Box46, { width: nameWidth, children: /* @__PURE__ */ jsx53(Text53, { bold: true, children: "Model Usage" }) }),
127852
+ /* @__PURE__ */ jsx53(Box46, { width: requestsWidth, justifyContent: "flex-end", children: /* @__PURE__ */ jsx53(Text53, { bold: true, children: "Reqs" }) }),
127853
+ /* @__PURE__ */ jsx53(Box46, { width: inputTokensWidth, justifyContent: "flex-end", children: /* @__PURE__ */ jsx53(Text53, { bold: true, children: "Input Tokens" }) }),
127854
+ /* @__PURE__ */ jsx53(Box46, { width: outputTokensWidth, justifyContent: "flex-end", children: /* @__PURE__ */ jsx53(Text53, { bold: true, children: "Output Tokens" }) })
127832
127855
  ] }),
127833
127856
  /* @__PURE__ */ jsx53(
127834
127857
  Box46,
@@ -127842,14 +127865,14 @@ var ModelUsageTable = ({ models, totalCachedTokens, cacheEfficiency }) => {
127842
127865
  }
127843
127866
  ),
127844
127867
  Object.entries(models).map(([name2, modelMetrics]) => /* @__PURE__ */ jsxs49(Box46, { children: [
127845
- /* @__PURE__ */ jsx53(Box46, { width: nameWidth, children: /* @__PURE__ */ jsx53(Text52, { children: name2.replace("-001", "") }) }),
127846
- /* @__PURE__ */ jsx53(Box46, { width: requestsWidth, justifyContent: "flex-end", children: /* @__PURE__ */ jsx53(Text52, { children: modelMetrics.api.totalRequests }) }),
127847
- /* @__PURE__ */ jsx53(Box46, { width: inputTokensWidth, justifyContent: "flex-end", children: /* @__PURE__ */ jsx53(Text52, { color: theme.status.warning, children: modelMetrics.tokens.prompt.toLocaleString() }) }),
127848
- /* @__PURE__ */ jsx53(Box46, { width: outputTokensWidth, justifyContent: "flex-end", children: /* @__PURE__ */ jsx53(Text52, { color: theme.status.warning, children: modelMetrics.tokens.candidates.toLocaleString() }) })
127868
+ /* @__PURE__ */ jsx53(Box46, { width: nameWidth, children: /* @__PURE__ */ jsx53(Text53, { children: name2.replace("-001", "") }) }),
127869
+ /* @__PURE__ */ jsx53(Box46, { width: requestsWidth, justifyContent: "flex-end", children: /* @__PURE__ */ jsx53(Text53, { children: modelMetrics.api.totalRequests }) }),
127870
+ /* @__PURE__ */ jsx53(Box46, { width: inputTokensWidth, justifyContent: "flex-end", children: /* @__PURE__ */ jsx53(Text53, { color: theme.status.warning, children: modelMetrics.tokens.prompt.toLocaleString() }) }),
127871
+ /* @__PURE__ */ jsx53(Box46, { width: outputTokensWidth, justifyContent: "flex-end", children: /* @__PURE__ */ jsx53(Text53, { color: theme.status.warning, children: modelMetrics.tokens.candidates.toLocaleString() }) })
127849
127872
  ] }, name2)),
127850
127873
  cacheEfficiency > 0 && /* @__PURE__ */ jsxs49(Box46, { flexDirection: "column", marginTop: 1, children: [
127851
- /* @__PURE__ */ jsxs49(Text52, { children: [
127852
- /* @__PURE__ */ jsx53(Text52, { color: theme.status.success, children: "Savings Highlight:" }),
127874
+ /* @__PURE__ */ jsxs49(Text53, { children: [
127875
+ /* @__PURE__ */ jsx53(Text53, { color: theme.status.success, children: "Savings Highlight:" }),
127853
127876
  " ",
127854
127877
  totalCachedTokens.toLocaleString(),
127855
127878
  " (",
@@ -127857,7 +127880,7 @@ var ModelUsageTable = ({ models, totalCachedTokens, cacheEfficiency }) => {
127857
127880
  "%) of input tokens were served from the cache, reducing costs."
127858
127881
  ] }),
127859
127882
  /* @__PURE__ */ jsx53(Box46, { height: 1 }),
127860
- /* @__PURE__ */ jsx53(Text52, { color: theme.text.secondary, children: "\xBB Tip: For a full token breakdown, run `/stats model`." })
127883
+ /* @__PURE__ */ jsx53(Text53, { color: theme.text.secondary, children: "\xBB Tip: For a full token breakdown, run `/stats model`." })
127861
127884
  ] })
127862
127885
  ] });
127863
127886
  };
@@ -127884,9 +127907,9 @@ var StatsDisplay = ({
127884
127907
  );
127885
127908
  const renderTitle = () => {
127886
127909
  if (title) {
127887
- return theme.ui.gradient && theme.ui.gradient.length > 0 ? /* @__PURE__ */ jsx53(Gradient3, { colors: theme.ui.gradient, children: /* @__PURE__ */ jsx53(Text52, { bold: true, children: title }) }) : /* @__PURE__ */ jsx53(Text52, { bold: true, color: theme.text.accent, children: title });
127910
+ return theme.ui.gradient && theme.ui.gradient.length > 0 ? /* @__PURE__ */ jsx53(Gradient3, { colors: theme.ui.gradient, children: /* @__PURE__ */ jsx53(Text53, { bold: true, children: title }) }) : /* @__PURE__ */ jsx53(Text53, { bold: true, color: theme.text.accent, children: title });
127888
127911
  }
127889
- return /* @__PURE__ */ jsx53(Text52, { bold: true, color: theme.text.accent, children: "Session Stats" });
127912
+ return /* @__PURE__ */ jsx53(Text53, { bold: true, color: theme.text.accent, children: "Session Stats" });
127890
127913
  };
127891
127914
  return /* @__PURE__ */ jsxs49(
127892
127915
  Box46,
@@ -127900,64 +127923,64 @@ var StatsDisplay = ({
127900
127923
  renderTitle(),
127901
127924
  /* @__PURE__ */ jsx53(Box46, { height: 1 }),
127902
127925
  /* @__PURE__ */ jsxs49(Section, { title: "Interaction Summary", children: [
127903
- /* @__PURE__ */ jsx53(StatRow, { title: "Session ID:", children: /* @__PURE__ */ jsx53(Text52, { children: stats.sessionId }) }),
127904
- /* @__PURE__ */ jsx53(StatRow, { title: "Tool Calls:", children: /* @__PURE__ */ jsxs49(Text52, { children: [
127926
+ /* @__PURE__ */ jsx53(StatRow, { title: "Session ID:", children: /* @__PURE__ */ jsx53(Text53, { children: stats.sessionId }) }),
127927
+ /* @__PURE__ */ jsx53(StatRow, { title: "Tool Calls:", children: /* @__PURE__ */ jsxs49(Text53, { children: [
127905
127928
  tools.totalCalls,
127906
127929
  " (",
127907
127930
  " ",
127908
- /* @__PURE__ */ jsxs49(Text52, { color: theme.status.success, children: [
127931
+ /* @__PURE__ */ jsxs49(Text53, { color: theme.status.success, children: [
127909
127932
  "\u2714 ",
127910
127933
  tools.totalSuccess
127911
127934
  ] }),
127912
127935
  " ",
127913
- /* @__PURE__ */ jsxs49(Text52, { color: theme.status.error, children: [
127936
+ /* @__PURE__ */ jsxs49(Text53, { color: theme.status.error, children: [
127914
127937
  "\u2716 ",
127915
127938
  tools.totalFail
127916
127939
  ] }),
127917
127940
  " )"
127918
127941
  ] }) }),
127919
- /* @__PURE__ */ jsx53(StatRow, { title: "Success Rate:", children: /* @__PURE__ */ jsxs49(Text52, { color: successColor, children: [
127942
+ /* @__PURE__ */ jsx53(StatRow, { title: "Success Rate:", children: /* @__PURE__ */ jsxs49(Text53, { color: successColor, children: [
127920
127943
  computed.successRate.toFixed(1),
127921
127944
  "%"
127922
127945
  ] }) }),
127923
- computed.totalDecisions > 0 && /* @__PURE__ */ jsx53(StatRow, { title: "User Agreement:", children: /* @__PURE__ */ jsxs49(Text52, { color: agreementColor, children: [
127946
+ computed.totalDecisions > 0 && /* @__PURE__ */ jsx53(StatRow, { title: "User Agreement:", children: /* @__PURE__ */ jsxs49(Text53, { color: agreementColor, children: [
127924
127947
  computed.agreementRate.toFixed(1),
127925
127948
  "%",
127926
127949
  " ",
127927
- /* @__PURE__ */ jsxs49(Text52, { color: theme.text.secondary, children: [
127950
+ /* @__PURE__ */ jsxs49(Text53, { color: theme.text.secondary, children: [
127928
127951
  "(",
127929
127952
  computed.totalDecisions,
127930
127953
  " reviewed)"
127931
127954
  ] })
127932
127955
  ] }) }),
127933
- files && (files.totalLinesAdded > 0 || files.totalLinesRemoved > 0) && /* @__PURE__ */ jsx53(StatRow, { title: "Code Changes:", children: /* @__PURE__ */ jsxs49(Text52, { children: [
127934
- /* @__PURE__ */ jsxs49(Text52, { color: theme.status.success, children: [
127956
+ files && (files.totalLinesAdded > 0 || files.totalLinesRemoved > 0) && /* @__PURE__ */ jsx53(StatRow, { title: "Code Changes:", children: /* @__PURE__ */ jsxs49(Text53, { children: [
127957
+ /* @__PURE__ */ jsxs49(Text53, { color: theme.status.success, children: [
127935
127958
  "+",
127936
127959
  files.totalLinesAdded
127937
127960
  ] }),
127938
127961
  " ",
127939
- /* @__PURE__ */ jsxs49(Text52, { color: theme.status.error, children: [
127962
+ /* @__PURE__ */ jsxs49(Text53, { color: theme.status.error, children: [
127940
127963
  "-",
127941
127964
  files.totalLinesRemoved
127942
127965
  ] })
127943
127966
  ] }) })
127944
127967
  ] }),
127945
127968
  /* @__PURE__ */ jsxs49(Section, { title: "Performance", children: [
127946
- /* @__PURE__ */ jsx53(StatRow, { title: "Wall Time:", children: /* @__PURE__ */ jsx53(Text52, { children: duration }) }),
127947
- /* @__PURE__ */ jsx53(StatRow, { title: "Agent Active:", children: /* @__PURE__ */ jsx53(Text52, { children: formatDuration(computed.agentActiveTime) }) }),
127948
- /* @__PURE__ */ jsx53(SubStatRow, { title: "API Time:", children: /* @__PURE__ */ jsxs49(Text52, { children: [
127969
+ /* @__PURE__ */ jsx53(StatRow, { title: "Wall Time:", children: /* @__PURE__ */ jsx53(Text53, { children: duration }) }),
127970
+ /* @__PURE__ */ jsx53(StatRow, { title: "Agent Active:", children: /* @__PURE__ */ jsx53(Text53, { children: formatDuration(computed.agentActiveTime) }) }),
127971
+ /* @__PURE__ */ jsx53(SubStatRow, { title: "API Time:", children: /* @__PURE__ */ jsxs49(Text53, { children: [
127949
127972
  formatDuration(computed.totalApiTime),
127950
127973
  " ",
127951
- /* @__PURE__ */ jsxs49(Text52, { color: theme.text.secondary, children: [
127974
+ /* @__PURE__ */ jsxs49(Text53, { color: theme.text.secondary, children: [
127952
127975
  "(",
127953
127976
  computed.apiTimePercent.toFixed(1),
127954
127977
  "%)"
127955
127978
  ] })
127956
127979
  ] }) }),
127957
- /* @__PURE__ */ jsx53(SubStatRow, { title: "Tool Time:", children: /* @__PURE__ */ jsxs49(Text52, { children: [
127980
+ /* @__PURE__ */ jsx53(SubStatRow, { title: "Tool Time:", children: /* @__PURE__ */ jsxs49(Text53, { children: [
127958
127981
  formatDuration(computed.totalToolTime),
127959
127982
  " ",
127960
- /* @__PURE__ */ jsxs49(Text52, { color: theme.text.secondary, children: [
127983
+ /* @__PURE__ */ jsxs49(Text53, { color: theme.text.secondary, children: [
127961
127984
  "(",
127962
127985
  computed.toolTimePercent.toFixed(1),
127963
127986
  "%)"
@@ -127978,7 +128001,7 @@ var StatsDisplay = ({
127978
128001
  };
127979
128002
 
127980
128003
  // packages/cli/src/ui/components/ModelStatsDisplay.tsx
127981
- import { Box as Box47, Text as Text53 } from "ink";
128004
+ import { Box as Box47, Text as Text54 } from "ink";
127982
128005
  import { jsx as jsx54, jsxs as jsxs50 } from "react/jsx-runtime";
127983
128006
  var METRIC_COL_WIDTH = 28;
127984
128007
  var MODEL_COL_WIDTH = 22;
@@ -127988,8 +128011,8 @@ var StatRow2 = ({
127988
128011
  isSubtle = false,
127989
128012
  isSection = false
127990
128013
  }) => /* @__PURE__ */ jsxs50(Box47, { children: [
127991
- /* @__PURE__ */ jsx54(Box47, { width: METRIC_COL_WIDTH, children: /* @__PURE__ */ jsx54(Text53, { bold: isSection, color: isSection ? void 0 : Colors.LightBlue, children: isSubtle ? ` \u21B3 ${title}` : title }) }),
127992
- values.map((value, index) => /* @__PURE__ */ jsx54(Box47, { width: MODEL_COL_WIDTH, children: /* @__PURE__ */ jsx54(Text53, { children: value }) }, index))
128014
+ /* @__PURE__ */ jsx54(Box47, { width: METRIC_COL_WIDTH, children: /* @__PURE__ */ jsx54(Text54, { bold: isSection, color: isSection ? void 0 : Colors.LightBlue, children: isSubtle ? ` \u21B3 ${title}` : title }) }),
128015
+ values.map((value, index) => /* @__PURE__ */ jsx54(Box47, { width: MODEL_COL_WIDTH, children: /* @__PURE__ */ jsx54(Text54, { children: value }) }, index))
127993
128016
  ] });
127994
128017
  var ModelStatsDisplay = () => {
127995
128018
  const { stats } = useSessionStats();
@@ -128005,7 +128028,7 @@ var ModelStatsDisplay = () => {
128005
128028
  borderColor: Colors.Gray,
128006
128029
  paddingY: 1,
128007
128030
  paddingX: 2,
128008
- children: /* @__PURE__ */ jsx54(Text53, { children: "No API calls have been made in this session." })
128031
+ children: /* @__PURE__ */ jsx54(Text54, { children: "No API calls have been made in this session." })
128009
128032
  }
128010
128033
  );
128011
128034
  }
@@ -128027,11 +128050,11 @@ var ModelStatsDisplay = () => {
128027
128050
  paddingY: 1,
128028
128051
  paddingX: 2,
128029
128052
  children: [
128030
- /* @__PURE__ */ jsx54(Text53, { bold: true, color: Colors.AccentPurple, children: "Model Stats For Nerds" }),
128053
+ /* @__PURE__ */ jsx54(Text54, { bold: true, color: Colors.AccentPurple, children: "Model Stats For Nerds" }),
128031
128054
  /* @__PURE__ */ jsx54(Box47, { height: 1 }),
128032
128055
  /* @__PURE__ */ jsxs50(Box47, { children: [
128033
- /* @__PURE__ */ jsx54(Box47, { width: METRIC_COL_WIDTH, children: /* @__PURE__ */ jsx54(Text53, { bold: true, children: "Metric" }) }),
128034
- modelNames.map((name2) => /* @__PURE__ */ jsx54(Box47, { width: MODEL_COL_WIDTH, children: /* @__PURE__ */ jsx54(Text53, { bold: true, children: name2 }) }, name2))
128056
+ /* @__PURE__ */ jsx54(Box47, { width: METRIC_COL_WIDTH, children: /* @__PURE__ */ jsx54(Text54, { bold: true, children: "Metric" }) }),
128057
+ modelNames.map((name2) => /* @__PURE__ */ jsx54(Box47, { width: MODEL_COL_WIDTH, children: /* @__PURE__ */ jsx54(Text54, { bold: true, children: name2 }) }, name2))
128035
128058
  ] }),
128036
128059
  /* @__PURE__ */ jsx54(
128037
128060
  Box47,
@@ -128058,7 +128081,7 @@ var ModelStatsDisplay = () => {
128058
128081
  values: getModelValues((m) => {
128059
128082
  const errorRate = calculateErrorRate(m);
128060
128083
  return /* @__PURE__ */ jsxs50(
128061
- Text53,
128084
+ Text54,
128062
128085
  {
128063
128086
  color: m.api.totalErrors > 0 ? Colors.AccentRed : Colors.Foreground,
128064
128087
  children: [
@@ -128088,7 +128111,7 @@ var ModelStatsDisplay = () => {
128088
128111
  StatRow2,
128089
128112
  {
128090
128113
  title: "Total",
128091
- values: getModelValues((m) => /* @__PURE__ */ jsx54(Text53, { color: Colors.AccentYellow, children: m.tokens.total.toLocaleString() }))
128114
+ values: getModelValues((m) => /* @__PURE__ */ jsx54(Text54, { color: Colors.AccentYellow, children: m.tokens.total.toLocaleString() }))
128092
128115
  }
128093
128116
  ),
128094
128117
  /* @__PURE__ */ jsx54(
@@ -128106,7 +128129,7 @@ var ModelStatsDisplay = () => {
128106
128129
  isSubtle: true,
128107
128130
  values: getModelValues((m) => {
128108
128131
  const cacheHitRate = calculateCacheHitRate(m);
128109
- return /* @__PURE__ */ jsxs50(Text53, { color: Colors.AccentGreen, children: [
128132
+ return /* @__PURE__ */ jsxs50(Text54, { color: Colors.AccentGreen, children: [
128110
128133
  m.tokens.cached.toLocaleString(),
128111
128134
  " (",
128112
128135
  cacheHitRate.toFixed(1),
@@ -128145,7 +128168,7 @@ var ModelStatsDisplay = () => {
128145
128168
  };
128146
128169
 
128147
128170
  // packages/cli/src/ui/components/ToolStatsDisplay.tsx
128148
- import { Box as Box48, Text as Text54 } from "ink";
128171
+ import { Box as Box48, Text as Text55 } from "ink";
128149
128172
  import { jsx as jsx55, jsxs as jsxs51 } from "react/jsx-runtime";
128150
128173
  var TOOL_NAME_COL_WIDTH = 25;
128151
128174
  var CALLS_COL_WIDTH = 8;
@@ -128159,13 +128182,13 @@ var StatRow3 = ({ name: name2, stats }) => {
128159
128182
  yellow: TOOL_SUCCESS_RATE_MEDIUM
128160
128183
  });
128161
128184
  return /* @__PURE__ */ jsxs51(Box48, { children: [
128162
- /* @__PURE__ */ jsx55(Box48, { width: TOOL_NAME_COL_WIDTH, children: /* @__PURE__ */ jsx55(Text54, { color: Colors.LightBlue, children: name2 }) }),
128163
- /* @__PURE__ */ jsx55(Box48, { width: CALLS_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx55(Text54, { children: stats.count }) }),
128164
- /* @__PURE__ */ jsx55(Box48, { width: SUCCESS_RATE_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsxs51(Text54, { color: successColor, children: [
128185
+ /* @__PURE__ */ jsx55(Box48, { width: TOOL_NAME_COL_WIDTH, children: /* @__PURE__ */ jsx55(Text55, { color: Colors.LightBlue, children: name2 }) }),
128186
+ /* @__PURE__ */ jsx55(Box48, { width: CALLS_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx55(Text55, { children: stats.count }) }),
128187
+ /* @__PURE__ */ jsx55(Box48, { width: SUCCESS_RATE_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsxs51(Text55, { color: successColor, children: [
128165
128188
  successRate.toFixed(1),
128166
128189
  "%"
128167
128190
  ] }) }),
128168
- /* @__PURE__ */ jsx55(Box48, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx55(Text54, { children: formatDuration(avgDuration) }) })
128191
+ /* @__PURE__ */ jsx55(Box48, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx55(Text55, { children: formatDuration(avgDuration) }) })
128169
128192
  ] });
128170
128193
  };
128171
128194
  var ToolStatsDisplay = () => {
@@ -128182,7 +128205,7 @@ var ToolStatsDisplay = () => {
128182
128205
  borderColor: Colors.Gray,
128183
128206
  paddingY: 1,
128184
128207
  paddingX: 2,
128185
- children: /* @__PURE__ */ jsx55(Text54, { children: "No tool calls have been made in this session." })
128208
+ children: /* @__PURE__ */ jsx55(Text55, { children: "No tool calls have been made in this session." })
128186
128209
  }
128187
128210
  );
128188
128211
  }
@@ -128211,13 +128234,13 @@ var ToolStatsDisplay = () => {
128211
128234
  paddingX: 2,
128212
128235
  width: 70,
128213
128236
  children: [
128214
- /* @__PURE__ */ jsx55(Text54, { bold: true, color: Colors.AccentPurple, children: "Tool Stats For Nerds" }),
128237
+ /* @__PURE__ */ jsx55(Text55, { bold: true, color: Colors.AccentPurple, children: "Tool Stats For Nerds" }),
128215
128238
  /* @__PURE__ */ jsx55(Box48, { height: 1 }),
128216
128239
  /* @__PURE__ */ jsxs51(Box48, { children: [
128217
- /* @__PURE__ */ jsx55(Box48, { width: TOOL_NAME_COL_WIDTH, children: /* @__PURE__ */ jsx55(Text54, { bold: true, children: "Tool Name" }) }),
128218
- /* @__PURE__ */ jsx55(Box48, { width: CALLS_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx55(Text54, { bold: true, children: "Calls" }) }),
128219
- /* @__PURE__ */ jsx55(Box48, { width: SUCCESS_RATE_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx55(Text54, { bold: true, children: "Success Rate" }) }),
128220
- /* @__PURE__ */ jsx55(Box48, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx55(Text54, { bold: true, children: "Avg Duration" }) })
128240
+ /* @__PURE__ */ jsx55(Box48, { width: TOOL_NAME_COL_WIDTH, children: /* @__PURE__ */ jsx55(Text55, { bold: true, children: "Tool Name" }) }),
128241
+ /* @__PURE__ */ jsx55(Box48, { width: CALLS_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx55(Text55, { bold: true, children: "Calls" }) }),
128242
+ /* @__PURE__ */ jsx55(Box48, { width: SUCCESS_RATE_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx55(Text55, { bold: true, children: "Success Rate" }) }),
128243
+ /* @__PURE__ */ jsx55(Box48, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx55(Text55, { bold: true, children: "Avg Duration" }) })
128221
128244
  ] }),
128222
128245
  /* @__PURE__ */ jsx55(
128223
128246
  Box48,
@@ -128232,46 +128255,46 @@ var ToolStatsDisplay = () => {
128232
128255
  ),
128233
128256
  activeTools.map(([name2, stats2]) => /* @__PURE__ */ jsx55(StatRow3, { name: name2, stats: stats2 }, name2)),
128234
128257
  /* @__PURE__ */ jsx55(Box48, { height: 1 }),
128235
- /* @__PURE__ */ jsx55(Text54, { bold: true, children: "User Decision Summary" }),
128258
+ /* @__PURE__ */ jsx55(Text55, { bold: true, children: "User Decision Summary" }),
128236
128259
  /* @__PURE__ */ jsxs51(Box48, { children: [
128237
128260
  /* @__PURE__ */ jsx55(
128238
128261
  Box48,
128239
128262
  {
128240
128263
  width: TOOL_NAME_COL_WIDTH + CALLS_COL_WIDTH + SUCCESS_RATE_COL_WIDTH,
128241
- children: /* @__PURE__ */ jsx55(Text54, { color: Colors.LightBlue, children: "Total Reviewed Suggestions:" })
128264
+ children: /* @__PURE__ */ jsx55(Text55, { color: Colors.LightBlue, children: "Total Reviewed Suggestions:" })
128242
128265
  }
128243
128266
  ),
128244
- /* @__PURE__ */ jsx55(Box48, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx55(Text54, { children: totalReviewed }) })
128267
+ /* @__PURE__ */ jsx55(Box48, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx55(Text55, { children: totalReviewed }) })
128245
128268
  ] }),
128246
128269
  /* @__PURE__ */ jsxs51(Box48, { children: [
128247
128270
  /* @__PURE__ */ jsx55(
128248
128271
  Box48,
128249
128272
  {
128250
128273
  width: TOOL_NAME_COL_WIDTH + CALLS_COL_WIDTH + SUCCESS_RATE_COL_WIDTH,
128251
- children: /* @__PURE__ */ jsx55(Text54, { children: " \xBB Accepted:" })
128274
+ children: /* @__PURE__ */ jsx55(Text55, { children: " \xBB Accepted:" })
128252
128275
  }
128253
128276
  ),
128254
- /* @__PURE__ */ jsx55(Box48, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx55(Text54, { color: Colors.AccentGreen, children: totalDecisions.accept }) })
128277
+ /* @__PURE__ */ jsx55(Box48, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx55(Text55, { color: Colors.AccentGreen, children: totalDecisions.accept }) })
128255
128278
  ] }),
128256
128279
  /* @__PURE__ */ jsxs51(Box48, { children: [
128257
128280
  /* @__PURE__ */ jsx55(
128258
128281
  Box48,
128259
128282
  {
128260
128283
  width: TOOL_NAME_COL_WIDTH + CALLS_COL_WIDTH + SUCCESS_RATE_COL_WIDTH,
128261
- children: /* @__PURE__ */ jsx55(Text54, { children: " \xBB Rejected:" })
128284
+ children: /* @__PURE__ */ jsx55(Text55, { children: " \xBB Rejected:" })
128262
128285
  }
128263
128286
  ),
128264
- /* @__PURE__ */ jsx55(Box48, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx55(Text54, { color: Colors.AccentRed, children: totalDecisions.reject }) })
128287
+ /* @__PURE__ */ jsx55(Box48, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx55(Text55, { color: Colors.AccentRed, children: totalDecisions.reject }) })
128265
128288
  ] }),
128266
128289
  /* @__PURE__ */ jsxs51(Box48, { children: [
128267
128290
  /* @__PURE__ */ jsx55(
128268
128291
  Box48,
128269
128292
  {
128270
128293
  width: TOOL_NAME_COL_WIDTH + CALLS_COL_WIDTH + SUCCESS_RATE_COL_WIDTH,
128271
- children: /* @__PURE__ */ jsx55(Text54, { children: " \xBB Modified:" })
128294
+ children: /* @__PURE__ */ jsx55(Text55, { children: " \xBB Modified:" })
128272
128295
  }
128273
128296
  ),
128274
- /* @__PURE__ */ jsx55(Box48, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx55(Text54, { color: Colors.AccentYellow, children: totalDecisions.modify }) })
128297
+ /* @__PURE__ */ jsx55(Box48, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx55(Text55, { color: Colors.AccentYellow, children: totalDecisions.modify }) })
128275
128298
  ] }),
128276
128299
  /* @__PURE__ */ jsx55(
128277
128300
  Box48,
@@ -128289,10 +128312,10 @@ var ToolStatsDisplay = () => {
128289
128312
  Box48,
128290
128313
  {
128291
128314
  width: TOOL_NAME_COL_WIDTH + CALLS_COL_WIDTH + SUCCESS_RATE_COL_WIDTH,
128292
- children: /* @__PURE__ */ jsx55(Text54, { children: " Overall Agreement Rate:" })
128315
+ children: /* @__PURE__ */ jsx55(Text55, { children: " Overall Agreement Rate:" })
128293
128316
  }
128294
128317
  ),
128295
- /* @__PURE__ */ jsx55(Box48, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx55(Text54, { bold: true, color: totalReviewed > 0 ? agreementColor : void 0, children: totalReviewed > 0 ? `${agreementRate.toFixed(1)}%` : "--" }) })
128318
+ /* @__PURE__ */ jsx55(Box48, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx55(Text55, { bold: true, color: totalReviewed > 0 ? agreementColor : void 0, children: totalReviewed > 0 ? `${agreementRate.toFixed(1)}%` : "--" }) })
128296
128319
  ] })
128297
128320
  ]
128298
128321
  }
@@ -128306,7 +128329,7 @@ var SessionSummaryDisplay = ({
128306
128329
  }) => /* @__PURE__ */ jsx56(StatsDisplay, { title: "Agent powering down. Goodbye!", duration });
128307
128330
 
128308
128331
  // packages/cli/src/ui/components/Help.tsx
128309
- import { Box as Box49, Text as Text55 } from "ink";
128332
+ import { Box as Box49, Text as Text56 } from "ink";
128310
128333
  import { jsx as jsx57, jsxs as jsxs52 } from "react/jsx-runtime";
128311
128334
  var Help = ({ commands }) => /* @__PURE__ */ jsxs52(
128312
128335
  Box49,
@@ -128317,53 +128340,53 @@ var Help = ({ commands }) => /* @__PURE__ */ jsxs52(
128317
128340
  borderStyle: "round",
128318
128341
  padding: 1,
128319
128342
  children: [
128320
- /* @__PURE__ */ jsx57(Text55, { bold: true, color: Colors.Foreground, children: "Basics:" }),
128321
- /* @__PURE__ */ jsxs52(Text55, { color: Colors.Foreground, children: [
128322
- /* @__PURE__ */ jsx57(Text55, { bold: true, color: Colors.AccentPurple, children: "Add context" }),
128343
+ /* @__PURE__ */ jsx57(Text56, { bold: true, color: Colors.Foreground, children: "Basics:" }),
128344
+ /* @__PURE__ */ jsxs52(Text56, { color: Colors.Foreground, children: [
128345
+ /* @__PURE__ */ jsx57(Text56, { bold: true, color: Colors.AccentPurple, children: "Add context" }),
128323
128346
  ": Use",
128324
128347
  " ",
128325
- /* @__PURE__ */ jsx57(Text55, { bold: true, color: Colors.AccentPurple, children: "@" }),
128348
+ /* @__PURE__ */ jsx57(Text56, { bold: true, color: Colors.AccentPurple, children: "@" }),
128326
128349
  " ",
128327
128350
  "to specify files for context (e.g.,",
128328
128351
  " ",
128329
- /* @__PURE__ */ jsx57(Text55, { bold: true, color: Colors.AccentPurple, children: "@src/myFile.ts" }),
128352
+ /* @__PURE__ */ jsx57(Text56, { bold: true, color: Colors.AccentPurple, children: "@src/myFile.ts" }),
128330
128353
  ") to target specific files or folders."
128331
128354
  ] }),
128332
- /* @__PURE__ */ jsxs52(Text55, { color: Colors.Foreground, children: [
128333
- /* @__PURE__ */ jsx57(Text55, { bold: true, color: Colors.AccentPurple, children: "Shell mode" }),
128355
+ /* @__PURE__ */ jsxs52(Text56, { color: Colors.Foreground, children: [
128356
+ /* @__PURE__ */ jsx57(Text56, { bold: true, color: Colors.AccentPurple, children: "Shell mode" }),
128334
128357
  ": Execute shell commands via",
128335
128358
  " ",
128336
- /* @__PURE__ */ jsx57(Text55, { bold: true, color: Colors.AccentPurple, children: "!" }),
128359
+ /* @__PURE__ */ jsx57(Text56, { bold: true, color: Colors.AccentPurple, children: "!" }),
128337
128360
  " ",
128338
128361
  "(e.g.,",
128339
128362
  " ",
128340
- /* @__PURE__ */ jsx57(Text55, { bold: true, color: Colors.AccentPurple, children: "!npm run start" }),
128363
+ /* @__PURE__ */ jsx57(Text56, { bold: true, color: Colors.AccentPurple, children: "!npm run start" }),
128341
128364
  ") or use natural language (e.g.",
128342
128365
  " ",
128343
- /* @__PURE__ */ jsx57(Text55, { bold: true, color: Colors.AccentPurple, children: "start server" }),
128366
+ /* @__PURE__ */ jsx57(Text56, { bold: true, color: Colors.AccentPurple, children: "start server" }),
128344
128367
  ")."
128345
128368
  ] }),
128346
128369
  /* @__PURE__ */ jsx57(Box49, { height: 1 }),
128347
- /* @__PURE__ */ jsx57(Text55, { bold: true, color: Colors.Foreground, children: "Commands:" }),
128370
+ /* @__PURE__ */ jsx57(Text56, { bold: true, color: Colors.Foreground, children: "Commands:" }),
128348
128371
  commands.filter((command) => command.description).map((command) => /* @__PURE__ */ jsxs52(Box49, { flexDirection: "column", children: [
128349
- /* @__PURE__ */ jsxs52(Text55, { color: Colors.Foreground, children: [
128350
- /* @__PURE__ */ jsxs52(Text55, { bold: true, color: Colors.AccentPurple, children: [
128372
+ /* @__PURE__ */ jsxs52(Text56, { color: Colors.Foreground, children: [
128373
+ /* @__PURE__ */ jsxs52(Text56, { bold: true, color: Colors.AccentPurple, children: [
128351
128374
  " ",
128352
128375
  "/",
128353
128376
  command.name
128354
128377
  ] }),
128355
128378
  command.description && " - " + command.description
128356
128379
  ] }),
128357
- command.subCommands && command.subCommands.map((subCommand) => /* @__PURE__ */ jsxs52(Text55, { color: Colors.Foreground, children: [
128358
- /* @__PURE__ */ jsxs52(Text55, { bold: true, color: Colors.AccentPurple, children: [
128380
+ command.subCommands && command.subCommands.map((subCommand) => /* @__PURE__ */ jsxs52(Text56, { color: Colors.Foreground, children: [
128381
+ /* @__PURE__ */ jsxs52(Text56, { bold: true, color: Colors.AccentPurple, children: [
128359
128382
  " ",
128360
128383
  subCommand.name
128361
128384
  ] }),
128362
128385
  subCommand.description && " - " + subCommand.description
128363
128386
  ] }, subCommand.name))
128364
128387
  ] }, command.name)),
128365
- /* @__PURE__ */ jsxs52(Text55, { color: Colors.Foreground, children: [
128366
- /* @__PURE__ */ jsxs52(Text55, { bold: true, color: Colors.AccentPurple, children: [
128388
+ /* @__PURE__ */ jsxs52(Text56, { color: Colors.Foreground, children: [
128389
+ /* @__PURE__ */ jsxs52(Text56, { bold: true, color: Colors.AccentPurple, children: [
128367
128390
  " ",
128368
128391
  "!",
128369
128392
  " "
@@ -128371,62 +128394,62 @@ var Help = ({ commands }) => /* @__PURE__ */ jsxs52(
128371
128394
  "- shell command"
128372
128395
  ] }),
128373
128396
  /* @__PURE__ */ jsx57(Box49, { height: 1 }),
128374
- /* @__PURE__ */ jsx57(Text55, { bold: true, color: Colors.Foreground, children: "Keyboard Shortcuts:" }),
128375
- /* @__PURE__ */ jsxs52(Text55, { color: Colors.Foreground, children: [
128376
- /* @__PURE__ */ jsx57(Text55, { bold: true, color: Colors.AccentPurple, children: "Alt+Left/Right" }),
128397
+ /* @__PURE__ */ jsx57(Text56, { bold: true, color: Colors.Foreground, children: "Keyboard Shortcuts:" }),
128398
+ /* @__PURE__ */ jsxs52(Text56, { color: Colors.Foreground, children: [
128399
+ /* @__PURE__ */ jsx57(Text56, { bold: true, color: Colors.AccentPurple, children: "Alt+Left/Right" }),
128377
128400
  " ",
128378
128401
  "- Jump through words in the input"
128379
128402
  ] }),
128380
- /* @__PURE__ */ jsxs52(Text55, { color: Colors.Foreground, children: [
128381
- /* @__PURE__ */ jsx57(Text55, { bold: true, color: Colors.AccentPurple, children: "Ctrl+C" }),
128403
+ /* @__PURE__ */ jsxs52(Text56, { color: Colors.Foreground, children: [
128404
+ /* @__PURE__ */ jsx57(Text56, { bold: true, color: Colors.AccentPurple, children: "Ctrl+C" }),
128382
128405
  " ",
128383
128406
  "- Quit application"
128384
128407
  ] }),
128385
- /* @__PURE__ */ jsxs52(Text55, { color: Colors.Foreground, children: [
128386
- /* @__PURE__ */ jsx57(Text55, { bold: true, color: Colors.AccentPurple, children: process.platform === "win32" ? "Ctrl+Enter" : "Ctrl+J" }),
128408
+ /* @__PURE__ */ jsxs52(Text56, { color: Colors.Foreground, children: [
128409
+ /* @__PURE__ */ jsx57(Text56, { bold: true, color: Colors.AccentPurple, children: process.platform === "win32" ? "Ctrl+Enter" : "Ctrl+J" }),
128387
128410
  " ",
128388
128411
  process.platform === "linux" ? "- New line (Alt+Enter works for certain linux distros)" : "- New line"
128389
128412
  ] }),
128390
- /* @__PURE__ */ jsxs52(Text55, { color: Colors.Foreground, children: [
128391
- /* @__PURE__ */ jsx57(Text55, { bold: true, color: Colors.AccentPurple, children: "Ctrl+L" }),
128413
+ /* @__PURE__ */ jsxs52(Text56, { color: Colors.Foreground, children: [
128414
+ /* @__PURE__ */ jsx57(Text56, { bold: true, color: Colors.AccentPurple, children: "Ctrl+L" }),
128392
128415
  " ",
128393
128416
  "- Clear the screen"
128394
128417
  ] }),
128395
- /* @__PURE__ */ jsxs52(Text55, { color: Colors.Foreground, children: [
128396
- /* @__PURE__ */ jsx57(Text55, { bold: true, color: Colors.AccentPurple, children: process.platform === "darwin" ? "Ctrl+X / Meta+Enter" : "Ctrl+X" }),
128418
+ /* @__PURE__ */ jsxs52(Text56, { color: Colors.Foreground, children: [
128419
+ /* @__PURE__ */ jsx57(Text56, { bold: true, color: Colors.AccentPurple, children: process.platform === "darwin" ? "Ctrl+X / Meta+Enter" : "Ctrl+X" }),
128397
128420
  " ",
128398
128421
  "- Open input in external editor"
128399
128422
  ] }),
128400
- /* @__PURE__ */ jsxs52(Text55, { color: Colors.Foreground, children: [
128401
- /* @__PURE__ */ jsx57(Text55, { bold: true, color: Colors.AccentPurple, children: "Ctrl+Y" }),
128423
+ /* @__PURE__ */ jsxs52(Text56, { color: Colors.Foreground, children: [
128424
+ /* @__PURE__ */ jsx57(Text56, { bold: true, color: Colors.AccentPurple, children: "Ctrl+Y" }),
128402
128425
  " ",
128403
128426
  "- Toggle YOLO mode"
128404
128427
  ] }),
128405
- /* @__PURE__ */ jsxs52(Text55, { color: Colors.Foreground, children: [
128406
- /* @__PURE__ */ jsx57(Text55, { bold: true, color: Colors.AccentPurple, children: "Enter" }),
128428
+ /* @__PURE__ */ jsxs52(Text56, { color: Colors.Foreground, children: [
128429
+ /* @__PURE__ */ jsx57(Text56, { bold: true, color: Colors.AccentPurple, children: "Enter" }),
128407
128430
  " ",
128408
128431
  "- Send message"
128409
128432
  ] }),
128410
- /* @__PURE__ */ jsxs52(Text55, { color: Colors.Foreground, children: [
128411
- /* @__PURE__ */ jsx57(Text55, { bold: true, color: Colors.AccentPurple, children: "Esc" }),
128433
+ /* @__PURE__ */ jsxs52(Text56, { color: Colors.Foreground, children: [
128434
+ /* @__PURE__ */ jsx57(Text56, { bold: true, color: Colors.AccentPurple, children: "Esc" }),
128412
128435
  " ",
128413
128436
  "- Cancel operation"
128414
128437
  ] }),
128415
- /* @__PURE__ */ jsxs52(Text55, { color: Colors.Foreground, children: [
128416
- /* @__PURE__ */ jsx57(Text55, { bold: true, color: Colors.AccentPurple, children: "Shift+Tab" }),
128438
+ /* @__PURE__ */ jsxs52(Text56, { color: Colors.Foreground, children: [
128439
+ /* @__PURE__ */ jsx57(Text56, { bold: true, color: Colors.AccentPurple, children: "Shift+Tab" }),
128417
128440
  " ",
128418
128441
  "- Toggle auto-accepting edits"
128419
128442
  ] }),
128420
- /* @__PURE__ */ jsxs52(Text55, { color: Colors.Foreground, children: [
128421
- /* @__PURE__ */ jsx57(Text55, { bold: true, color: Colors.AccentPurple, children: "Up/Down" }),
128443
+ /* @__PURE__ */ jsxs52(Text56, { color: Colors.Foreground, children: [
128444
+ /* @__PURE__ */ jsx57(Text56, { bold: true, color: Colors.AccentPurple, children: "Up/Down" }),
128422
128445
  " ",
128423
128446
  "- Cycle through your prompt history"
128424
128447
  ] }),
128425
128448
  /* @__PURE__ */ jsx57(Box49, { height: 1 }),
128426
- /* @__PURE__ */ jsxs52(Text55, { color: Colors.Foreground, children: [
128449
+ /* @__PURE__ */ jsxs52(Text56, { color: Colors.Foreground, children: [
128427
128450
  "For a full list of shortcuts, see",
128428
128451
  " ",
128429
- /* @__PURE__ */ jsx57(Text55, { bold: true, color: Colors.AccentPurple, children: "docs/keyboard-shortcuts.md" })
128452
+ /* @__PURE__ */ jsx57(Text56, { bold: true, color: Colors.AccentPurple, children: "docs/keyboard-shortcuts.md" })
128430
128453
  ] })
128431
128454
  ]
128432
128455
  }
@@ -128497,7 +128520,7 @@ var HistoryItemDisplay = ({
128497
128520
  ] }, item.id);
128498
128521
 
128499
128522
  // packages/cli/src/ui/components/ContextSummaryDisplay.tsx
128500
- import { Box as Box51, Text as Text56 } from "ink";
128523
+ import { Box as Box51, Text as Text57 } from "ink";
128501
128524
  import { jsx as jsx59, jsxs as jsxs54 } from "react/jsx-runtime";
128502
128525
  var ContextSummaryDisplay = ({
128503
128526
  geminiMdFileCount,
@@ -128513,7 +128536,7 @@ var ContextSummaryDisplay = ({
128513
128536
  const blockedMcpServerCount = blockedMcpServers?.length || 0;
128514
128537
  const openFileCount = ideContext2?.workspaceState?.openFiles?.length ?? 0;
128515
128538
  if (geminiMdFileCount === 0 && mcpServerCount === 0 && blockedMcpServerCount === 0 && openFileCount === 0) {
128516
- return /* @__PURE__ */ jsx59(Text56, { children: " " });
128539
+ return /* @__PURE__ */ jsx59(Text57, { children: " " });
128517
128540
  }
128518
128541
  const openFilesText = (() => {
128519
128542
  if (openFileCount === 0) {
@@ -128559,33 +128582,33 @@ var ContextSummaryDisplay = ({
128559
128582
  const summaryParts = [openFilesText, geminiMdText, mcpText].filter(Boolean);
128560
128583
  if (isNarrow) {
128561
128584
  return /* @__PURE__ */ jsxs54(Box51, { flexDirection: "column", children: [
128562
- /* @__PURE__ */ jsx59(Text56, { color: Colors.Gray, children: "Using:" }),
128563
- summaryParts.map((part, index) => /* @__PURE__ */ jsxs54(Text56, { color: Colors.Gray, children: [
128585
+ /* @__PURE__ */ jsx59(Text57, { color: Colors.Gray, children: "Using:" }),
128586
+ summaryParts.map((part, index) => /* @__PURE__ */ jsxs54(Text57, { color: Colors.Gray, children: [
128564
128587
  " ",
128565
128588
  "- ",
128566
128589
  part
128567
128590
  ] }, index))
128568
128591
  ] });
128569
128592
  }
128570
- return /* @__PURE__ */ jsx59(Box51, { children: /* @__PURE__ */ jsxs54(Text56, { color: Colors.Gray, children: [
128593
+ return /* @__PURE__ */ jsx59(Box51, { children: /* @__PURE__ */ jsxs54(Text57, { color: Colors.Gray, children: [
128571
128594
  "Using: ",
128572
128595
  summaryParts.join(" | ")
128573
128596
  ] }) });
128574
128597
  };
128575
128598
 
128576
128599
  // packages/cli/src/ui/hooks/useHistoryManager.ts
128577
- import { useState as useState42, useRef as useRef11, useCallback as useCallback23 } from "react";
128600
+ import { useState as useState42, useRef as useRef12, useCallback as useCallback32 } from "react";
128578
128601
  function useHistory() {
128579
128602
  const [history, setHistory] = useState42([]);
128580
- const messageIdCounterRef = useRef11(0);
128581
- const getNextMessageId = useCallback23((baseTimestamp) => {
128603
+ const messageIdCounterRef = useRef12(0);
128604
+ const getNextMessageId = useCallback32((baseTimestamp) => {
128582
128605
  messageIdCounterRef.current += 1;
128583
128606
  return baseTimestamp + messageIdCounterRef.current;
128584
128607
  }, []);
128585
- const loadHistory = useCallback23((newHistory) => {
128608
+ const loadHistory = useCallback32((newHistory) => {
128586
128609
  setHistory(newHistory);
128587
128610
  }, []);
128588
- const addItem = useCallback23(
128611
+ const addItem = useCallback32(
128589
128612
  (itemData, baseTimestamp) => {
128590
128613
  const id = getNextMessageId(baseTimestamp);
128591
128614
  const newItem = { ...itemData, id };
@@ -128602,7 +128625,7 @@ function useHistory() {
128602
128625
  },
128603
128626
  [getNextMessageId]
128604
128627
  );
128605
- const updateItem = useCallback23(
128628
+ const updateItem = useCallback32(
128606
128629
  (id, updates) => {
128607
128630
  setHistory(
128608
128631
  (prevHistory) => prevHistory.map((item) => {
@@ -128616,7 +128639,7 @@ function useHistory() {
128616
128639
  },
128617
128640
  []
128618
128641
  );
128619
- const clearItems = useCallback23(() => {
128642
+ const clearItems = useCallback32(() => {
128620
128643
  setHistory([]);
128621
128644
  messageIdCounterRef.current = 0;
128622
128645
  }, []);
@@ -128635,7 +128658,7 @@ import process18 from "node:process";
128635
128658
 
128636
128659
  // packages/cli/src/ui/IdeIntegrationNudge.tsx
128637
128660
  init_dist2();
128638
- import { Box as Box52, Text as Text57 } from "ink";
128661
+ import { Box as Box52, Text as Text58 } from "ink";
128639
128662
  import { jsx as jsx60, jsxs as jsxs55 } from "react/jsx-runtime";
128640
128663
  function IdeIntegrationNudge({
128641
128664
  ide,
@@ -128689,11 +128712,11 @@ function IdeIntegrationNudge({
128689
128712
  marginLeft: 1,
128690
128713
  children: [
128691
128714
  /* @__PURE__ */ jsxs55(Box52, { marginBottom: 1, flexDirection: "column", children: [
128692
- /* @__PURE__ */ jsxs55(Text57, { children: [
128693
- /* @__PURE__ */ jsx60(Text57, { color: "yellow", children: "> " }),
128715
+ /* @__PURE__ */ jsxs55(Text58, { children: [
128716
+ /* @__PURE__ */ jsx60(Text58, { color: "yellow", children: "> " }),
128694
128717
  `Do you want to connect ${ideName ?? "your"} editor to FSS Link?`
128695
128718
  ] }),
128696
- /* @__PURE__ */ jsx60(Text57, { dimColor: true, children: installText })
128719
+ /* @__PURE__ */ jsx60(Text58, { dimColor: true, children: installText })
128697
128720
  ] }),
128698
128721
  /* @__PURE__ */ jsx60(RadioButtonSelect, { items: OPTIONS, onSelect: onComplete })
128699
128722
  ]
@@ -128702,14 +128725,14 @@ function IdeIntegrationNudge({
128702
128725
  }
128703
128726
 
128704
128727
  // packages/cli/src/ui/hooks/useGitBranchName.ts
128705
- import { useState as useState43, useEffect as useEffect39, useCallback as useCallback24 } from "react";
128728
+ import { useState as useState43, useEffect as useEffect39, useCallback as useCallback33 } from "react";
128706
128729
  import { exec as exec7 } from "node:child_process";
128707
128730
  import fs72 from "node:fs";
128708
128731
  import fsPromises3 from "node:fs/promises";
128709
128732
  import path82 from "path";
128710
128733
  function useGitBranchName(cwd3) {
128711
128734
  const [branchName, setBranchName] = useState43(void 0);
128712
- const fetchBranchName = useCallback24(
128735
+ const fetchBranchName = useCallback33(
128713
128736
  () => exec7(
128714
128737
  "git rev-parse --abbrev-ref HEAD",
128715
128738
  { cwd: cwd3 },
@@ -128787,7 +128810,7 @@ var useBracketedPaste = () => {
128787
128810
  init_settings();
128788
128811
  import {
128789
128812
  createContext as createContext5,
128790
- useCallback as useCallback25,
128813
+ useCallback as useCallback34,
128791
128814
  useContext as useContext5,
128792
128815
  useEffect as useEffect41,
128793
128816
  useState as useState44
@@ -128810,7 +128833,7 @@ var VimModeProvider = ({
128810
128833
  setVimMode("NORMAL");
128811
128834
  }
128812
128835
  }, [settings.merged.vimMode]);
128813
- const toggleVimEnabled = useCallback25(async () => {
128836
+ const toggleVimEnabled = useCallback34(async () => {
128814
128837
  const newValue = !vimEnabled;
128815
128838
  setVimEnabled(newValue);
128816
128839
  if (newValue) {
@@ -128836,7 +128859,7 @@ var useVimMode = () => {
128836
128859
  };
128837
128860
 
128838
128861
  // packages/cli/src/ui/hooks/vim.ts
128839
- import { useCallback as useCallback26, useReducer as useReducer4, useEffect as useEffect42 } from "react";
128862
+ import { useCallback as useCallback35, useReducer as useReducer4, useEffect as useEffect42 } from "react";
128840
128863
  var DIGIT_MULTIPLIER = 10;
128841
128864
  var DEFAULT_COUNT = 1;
128842
128865
  var DIGIT_1_TO_9 = /^[1-9]$/;
@@ -128903,18 +128926,18 @@ function useVim(buffer, onSubmit) {
128903
128926
  useEffect42(() => {
128904
128927
  dispatch({ type: "SET_MODE", mode: vimMode });
128905
128928
  }, [vimMode]);
128906
- const updateMode = useCallback26(
128929
+ const updateMode = useCallback35(
128907
128930
  (mode) => {
128908
128931
  setVimMode(mode);
128909
128932
  dispatch({ type: "SET_MODE", mode });
128910
128933
  },
128911
128934
  [setVimMode]
128912
128935
  );
128913
- const getCurrentCount = useCallback26(
128936
+ const getCurrentCount = useCallback35(
128914
128937
  () => state.count || DEFAULT_COUNT,
128915
128938
  [state.count]
128916
128939
  );
128917
- const executeCommand = useCallback26(
128940
+ const executeCommand = useCallback35(
128918
128941
  (cmdType, count) => {
128919
128942
  switch (cmdType) {
128920
128943
  case CMD_TYPES.DELETE_WORD_FORWARD: {
@@ -128990,7 +129013,7 @@ function useVim(buffer, onSubmit) {
128990
129013
  },
128991
129014
  [buffer, updateMode]
128992
129015
  );
128993
- const handleInsertModeInput = useCallback26(
129016
+ const handleInsertModeInput = useCallback35(
128994
129017
  (normalizedKey) => {
128995
129018
  if (normalizedKey.name === "escape") {
128996
129019
  buffer.vimEscapeInsertMode();
@@ -129021,7 +129044,7 @@ function useVim(buffer, onSubmit) {
129021
129044
  },
129022
129045
  [buffer, dispatch, updateMode, onSubmit]
129023
129046
  );
129024
- const normalizeKey = useCallback26(
129047
+ const normalizeKey = useCallback35(
129025
129048
  (key) => ({
129026
129049
  name: key.name || "",
129027
129050
  sequence: key.sequence || "",
@@ -129032,7 +129055,7 @@ function useVim(buffer, onSubmit) {
129032
129055
  }),
129033
129056
  []
129034
129057
  );
129035
- const handleChangeMovement = useCallback26(
129058
+ const handleChangeMovement = useCallback35(
129036
129059
  (movement) => {
129037
129060
  const count = getCurrentCount();
129038
129061
  dispatch({ type: "CLEAR_COUNT" });
@@ -129053,7 +129076,7 @@ function useVim(buffer, onSubmit) {
129053
129076
  },
129054
129077
  [getCurrentCount, dispatch, buffer, updateMode]
129055
129078
  );
129056
- const handleOperatorMotion = useCallback26(
129079
+ const handleOperatorMotion = useCallback35(
129057
129080
  (operator2, motion) => {
129058
129081
  const count = getCurrentCount();
129059
129082
  const commandMap = {
@@ -129080,7 +129103,7 @@ function useVim(buffer, onSubmit) {
129080
129103
  },
129081
129104
  [getCurrentCount, executeCommand, dispatch]
129082
129105
  );
129083
- const handleInput = useCallback26(
129106
+ const handleInput = useCallback35(
129084
129107
  (key) => {
129085
129108
  if (!vimEnabled) {
129086
129109
  return false;
@@ -129392,7 +129415,7 @@ function useKittyKeyboardProtocol() {
129392
129415
  import * as fs74 from "fs";
129393
129416
 
129394
129417
  // packages/cli/src/ui/components/UpdateNotification.tsx
129395
- import { Box as Box53, Text as Text58 } from "ink";
129418
+ import { Box as Box53, Text as Text59 } from "ink";
129396
129419
  import { jsx as jsx62 } from "react/jsx-runtime";
129397
129420
  var UpdateNotification = ({ message }) => /* @__PURE__ */ jsx62(
129398
129421
  Box53,
@@ -129401,7 +129424,7 @@ var UpdateNotification = ({ message }) => /* @__PURE__ */ jsx62(
129401
129424
  borderColor: Colors.AccentYellow,
129402
129425
  paddingX: 1,
129403
129426
  marginY: 1,
129404
- children: /* @__PURE__ */ jsx62(Text58, { color: Colors.AccentYellow, children: message })
129427
+ children: /* @__PURE__ */ jsx62(Text59, { color: Colors.AccentYellow, children: message })
129405
129428
  }
129406
129429
  );
129407
129430
 
@@ -129585,7 +129608,7 @@ var iTerm = {
129585
129608
  init_SearchEngineConfigProvider();
129586
129609
 
129587
129610
  // packages/cli/src/ui/components/ShowMoreLines.tsx
129588
- import { Box as Box54, Text as Text59 } from "ink";
129611
+ import { Box as Box54, Text as Text60 } from "ink";
129589
129612
  import { jsx as jsx63 } from "react/jsx-runtime";
129590
129613
  var ShowMoreLines = ({ constrainHeight }) => {
129591
129614
  const overflowState = useOverflowState();
@@ -129593,7 +129616,7 @@ var ShowMoreLines = ({ constrainHeight }) => {
129593
129616
  if (overflowState === void 0 || overflowState.overflowingIds.size === 0 || !constrainHeight || !(streamingState === "idle" /* Idle */ || streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */)) {
129594
129617
  return null;
129595
129618
  }
129596
- return /* @__PURE__ */ jsx63(Box54, { children: /* @__PURE__ */ jsx63(Text59, { color: Colors.Gray, wrap: "truncate", children: "Press ctrl-s to show more lines" }) });
129619
+ return /* @__PURE__ */ jsx63(Box54, { children: /* @__PURE__ */ jsx63(Text60, { color: Colors.Gray, wrap: "truncate", children: "Press ctrl-s to show more lines" }) });
129597
129620
  };
129598
129621
 
129599
129622
  // packages/cli/src/ui/privacy/PrivacyNotice.tsx
@@ -129601,7 +129624,7 @@ init_dist2();
129601
129624
  import { Box as Box58 } from "ink";
129602
129625
 
129603
129626
  // packages/cli/src/ui/privacy/GeminiPrivacyNotice.tsx
129604
- import { Box as Box55, Newline, Text as Text60 } from "ink";
129627
+ import { Box as Box55, Newline, Text as Text61 } from "ink";
129605
129628
  import { jsx as jsx64, jsxs as jsxs56 } from "react/jsx-runtime";
129606
129629
  var GeminiPrivacyNotice = ({ onExit }) => {
129607
129630
  useKeypress(
@@ -129613,46 +129636,46 @@ var GeminiPrivacyNotice = ({ onExit }) => {
129613
129636
  { isActive: true }
129614
129637
  );
129615
129638
  return /* @__PURE__ */ jsxs56(Box55, { flexDirection: "column", marginBottom: 1, children: [
129616
- /* @__PURE__ */ jsx64(Text60, { bold: true, color: Colors.AccentPurple, children: "Gemini API Key Notice" }),
129639
+ /* @__PURE__ */ jsx64(Text61, { bold: true, color: Colors.AccentPurple, children: "Gemini API Key Notice" }),
129617
129640
  /* @__PURE__ */ jsx64(Newline, {}),
129618
- /* @__PURE__ */ jsxs56(Text60, { children: [
129641
+ /* @__PURE__ */ jsxs56(Text61, { children: [
129619
129642
  "By using the Gemini API",
129620
- /* @__PURE__ */ jsx64(Text60, { color: Colors.AccentBlue, children: "[1]" }),
129643
+ /* @__PURE__ */ jsx64(Text61, { color: Colors.AccentBlue, children: "[1]" }),
129621
129644
  ", Google AI Studio",
129622
- /* @__PURE__ */ jsx64(Text60, { color: Colors.AccentRed, children: "[2]" }),
129645
+ /* @__PURE__ */ jsx64(Text61, { color: Colors.AccentRed, children: "[2]" }),
129623
129646
  ', and the other Google developer services that reference these terms (collectively, the "APIs" or "Services"), you are agreeing to Google APIs Terms of Service (the "API Terms")',
129624
- /* @__PURE__ */ jsx64(Text60, { color: Colors.AccentGreen, children: "[3]" }),
129647
+ /* @__PURE__ */ jsx64(Text61, { color: Colors.AccentGreen, children: "[3]" }),
129625
129648
  ', and the Gemini API Additional Terms of Service (the "Additional Terms")',
129626
- /* @__PURE__ */ jsx64(Text60, { color: Colors.AccentPurple, children: "[4]" }),
129649
+ /* @__PURE__ */ jsx64(Text61, { color: Colors.AccentPurple, children: "[4]" }),
129627
129650
  "."
129628
129651
  ] }),
129629
129652
  /* @__PURE__ */ jsx64(Newline, {}),
129630
- /* @__PURE__ */ jsxs56(Text60, { children: [
129631
- /* @__PURE__ */ jsx64(Text60, { color: Colors.AccentBlue, children: "[1]" }),
129653
+ /* @__PURE__ */ jsxs56(Text61, { children: [
129654
+ /* @__PURE__ */ jsx64(Text61, { color: Colors.AccentBlue, children: "[1]" }),
129632
129655
  " ",
129633
129656
  "https://ai.google.dev/docs/gemini_api_overview"
129634
129657
  ] }),
129635
- /* @__PURE__ */ jsxs56(Text60, { children: [
129636
- /* @__PURE__ */ jsx64(Text60, { color: Colors.AccentRed, children: "[2]" }),
129658
+ /* @__PURE__ */ jsxs56(Text61, { children: [
129659
+ /* @__PURE__ */ jsx64(Text61, { color: Colors.AccentRed, children: "[2]" }),
129637
129660
  " https://aistudio.google.com/"
129638
129661
  ] }),
129639
- /* @__PURE__ */ jsxs56(Text60, { children: [
129640
- /* @__PURE__ */ jsx64(Text60, { color: Colors.AccentGreen, children: "[3]" }),
129662
+ /* @__PURE__ */ jsxs56(Text61, { children: [
129663
+ /* @__PURE__ */ jsx64(Text61, { color: Colors.AccentGreen, children: "[3]" }),
129641
129664
  " ",
129642
129665
  "https://developers.google.com/terms"
129643
129666
  ] }),
129644
- /* @__PURE__ */ jsxs56(Text60, { children: [
129645
- /* @__PURE__ */ jsx64(Text60, { color: Colors.AccentPurple, children: "[4]" }),
129667
+ /* @__PURE__ */ jsxs56(Text61, { children: [
129668
+ /* @__PURE__ */ jsx64(Text61, { color: Colors.AccentPurple, children: "[4]" }),
129646
129669
  " ",
129647
129670
  "https://ai.google.dev/gemini-api/terms"
129648
129671
  ] }),
129649
129672
  /* @__PURE__ */ jsx64(Newline, {}),
129650
- /* @__PURE__ */ jsx64(Text60, { color: Colors.Gray, children: "Press Esc to exit." })
129673
+ /* @__PURE__ */ jsx64(Text61, { color: Colors.Gray, children: "Press Esc to exit." })
129651
129674
  ] });
129652
129675
  };
129653
129676
 
129654
129677
  // packages/cli/src/ui/privacy/CloudPaidPrivacyNotice.tsx
129655
- import { Box as Box56, Newline as Newline2, Text as Text61 } from "ink";
129678
+ import { Box as Box56, Newline as Newline2, Text as Text62 } from "ink";
129656
129679
  import { jsx as jsx65, jsxs as jsxs57 } from "react/jsx-runtime";
129657
129680
  var CloudPaidPrivacyNotice = ({
129658
129681
  onExit
@@ -129666,37 +129689,37 @@ var CloudPaidPrivacyNotice = ({
129666
129689
  { isActive: true }
129667
129690
  );
129668
129691
  return /* @__PURE__ */ jsxs57(Box56, { flexDirection: "column", marginBottom: 1, children: [
129669
- /* @__PURE__ */ jsx65(Text61, { bold: true, color: Colors.AccentPurple, children: "Vertex AI Notice" }),
129692
+ /* @__PURE__ */ jsx65(Text62, { bold: true, color: Colors.AccentPurple, children: "Vertex AI Notice" }),
129670
129693
  /* @__PURE__ */ jsx65(Newline2, {}),
129671
- /* @__PURE__ */ jsxs57(Text61, { children: [
129694
+ /* @__PURE__ */ jsxs57(Text62, { children: [
129672
129695
  "Service Specific Terms",
129673
- /* @__PURE__ */ jsx65(Text61, { color: Colors.AccentBlue, children: "[1]" }),
129696
+ /* @__PURE__ */ jsx65(Text62, { color: Colors.AccentBlue, children: "[1]" }),
129674
129697
  " are incorporated into the agreement under which Google has agreed to provide Google Cloud Platform",
129675
- /* @__PURE__ */ jsx65(Text61, { color: Colors.AccentGreen, children: "[2]" }),
129698
+ /* @__PURE__ */ jsx65(Text62, { color: Colors.AccentGreen, children: "[2]" }),
129676
129699
  " to Customer (the \u201CAgreement\u201D). If the Agreement authorizes the resale or supply of Google Cloud Platform under a Google Cloud partner or reseller program, then except for in the section entitled \u201CPartner-Specific Terms\u201D, all references to Customer in the Service Specific Terms mean Partner or Reseller (as applicable), and all references to Customer Data in the Service Specific Terms mean Partner Data. Capitalized terms used but not defined in the Service Specific Terms have the meaning given to them in the Agreement."
129677
129700
  ] }),
129678
129701
  /* @__PURE__ */ jsx65(Newline2, {}),
129679
- /* @__PURE__ */ jsxs57(Text61, { children: [
129680
- /* @__PURE__ */ jsx65(Text61, { color: Colors.AccentBlue, children: "[1]" }),
129702
+ /* @__PURE__ */ jsxs57(Text62, { children: [
129703
+ /* @__PURE__ */ jsx65(Text62, { color: Colors.AccentBlue, children: "[1]" }),
129681
129704
  " ",
129682
129705
  "https://cloud.google.com/terms/service-terms"
129683
129706
  ] }),
129684
- /* @__PURE__ */ jsxs57(Text61, { children: [
129685
- /* @__PURE__ */ jsx65(Text61, { color: Colors.AccentGreen, children: "[2]" }),
129707
+ /* @__PURE__ */ jsxs57(Text62, { children: [
129708
+ /* @__PURE__ */ jsx65(Text62, { color: Colors.AccentGreen, children: "[2]" }),
129686
129709
  " ",
129687
129710
  "https://cloud.google.com/terms/services"
129688
129711
  ] }),
129689
129712
  /* @__PURE__ */ jsx65(Newline2, {}),
129690
- /* @__PURE__ */ jsx65(Text61, { color: Colors.Gray, children: "Press Esc to exit." })
129713
+ /* @__PURE__ */ jsx65(Text62, { color: Colors.Gray, children: "Press Esc to exit." })
129691
129714
  ] });
129692
129715
  };
129693
129716
 
129694
129717
  // packages/cli/src/ui/privacy/CloudFreePrivacyNotice.tsx
129695
- import { Box as Box57, Newline as Newline3, Text as Text62 } from "ink";
129718
+ import { Box as Box57, Newline as Newline3, Text as Text63 } from "ink";
129696
129719
 
129697
129720
  // packages/cli/src/ui/hooks/usePrivacySettings.ts
129698
129721
  init_dist2();
129699
- import { useState as useState46, useEffect as useEffect43, useCallback as useCallback27 } from "react";
129722
+ import { useState as useState46, useEffect as useEffect43, useCallback as useCallback36 } from "react";
129700
129723
  var usePrivacySettings = (config) => {
129701
129724
  const [privacyState, setPrivacyState] = useState46({
129702
129725
  isLoading: true
@@ -129731,7 +129754,7 @@ var usePrivacySettings = (config) => {
129731
129754
  };
129732
129755
  fetchInitialState();
129733
129756
  }, [config]);
129734
- const updateDataCollectionOptIn = useCallback27(
129757
+ const updateDataCollectionOptIn = useCallback36(
129735
129758
  async (optIn) => {
129736
129759
  try {
129737
129760
  const server = getCodeAssistServer(config);
@@ -129820,15 +129843,15 @@ var CloudFreePrivacyNotice = ({
129820
129843
  { isActive: true }
129821
129844
  );
129822
129845
  if (privacyState.isLoading) {
129823
- return /* @__PURE__ */ jsx66(Text62, { color: Colors.Gray, children: "Loading..." });
129846
+ return /* @__PURE__ */ jsx66(Text63, { color: Colors.Gray, children: "Loading..." });
129824
129847
  }
129825
129848
  if (privacyState.error) {
129826
129849
  return /* @__PURE__ */ jsxs58(Box57, { flexDirection: "column", marginY: 1, children: [
129827
- /* @__PURE__ */ jsxs58(Text62, { color: Colors.AccentRed, children: [
129850
+ /* @__PURE__ */ jsxs58(Text63, { color: Colors.AccentRed, children: [
129828
129851
  "Error loading Opt-in settings: ",
129829
129852
  privacyState.error
129830
129853
  ] }),
129831
- /* @__PURE__ */ jsx66(Text62, { color: Colors.Gray, children: "Press Esc to exit." })
129854
+ /* @__PURE__ */ jsx66(Text63, { color: Colors.Gray, children: "Press Esc to exit." })
129832
129855
  ] });
129833
129856
  }
129834
129857
  if (privacyState.isFreeTier === false) {
@@ -129839,20 +129862,20 @@ var CloudFreePrivacyNotice = ({
129839
129862
  { label: "No", value: false }
129840
129863
  ];
129841
129864
  return /* @__PURE__ */ jsxs58(Box57, { flexDirection: "column", marginY: 1, children: [
129842
- /* @__PURE__ */ jsx66(Text62, { bold: true, color: Colors.AccentPurple, children: "Gemini Code Assist for Individuals Privacy Notice" }),
129865
+ /* @__PURE__ */ jsx66(Text63, { bold: true, color: Colors.AccentPurple, children: "Gemini Code Assist for Individuals Privacy Notice" }),
129843
129866
  /* @__PURE__ */ jsx66(Newline3, {}),
129844
- /* @__PURE__ */ jsxs58(Text62, { children: [
129867
+ /* @__PURE__ */ jsxs58(Text63, { children: [
129845
129868
  "This notice and our Privacy Policy",
129846
- /* @__PURE__ */ jsx66(Text62, { color: Colors.AccentBlue, children: "[1]" }),
129869
+ /* @__PURE__ */ jsx66(Text63, { color: Colors.AccentBlue, children: "[1]" }),
129847
129870
  " describe how Gemini Code Assist handles your data. Please read them carefully."
129848
129871
  ] }),
129849
129872
  /* @__PURE__ */ jsx66(Newline3, {}),
129850
- /* @__PURE__ */ jsx66(Text62, { children: "When you use Gemini Code Assist for individuals with Gemini CLI, Google collects your prompts, related code, generated output, code edits, related feature usage information, and your feedback to provide, improve, and develop Google products and services and machine learning technologies." }),
129873
+ /* @__PURE__ */ jsx66(Text63, { children: "When you use Gemini Code Assist for individuals with Gemini CLI, Google collects your prompts, related code, generated output, code edits, related feature usage information, and your feedback to provide, improve, and develop Google products and services and machine learning technologies." }),
129851
129874
  /* @__PURE__ */ jsx66(Newline3, {}),
129852
- /* @__PURE__ */ jsx66(Text62, { children: "To help with quality and improve our products (such as generative machine-learning models), human reviewers may read, annotate, and process the data collected above. We take steps to protect your privacy as part of this process. This includes disconnecting the data from your Google Account before reviewers see or annotate it, and storing those disconnected copies for up to 18 months. Please don't submit confidential information or any data you wouldn't want a reviewer to see or Google to use to improve our products, services and machine-learning technologies." }),
129875
+ /* @__PURE__ */ jsx66(Text63, { children: "To help with quality and improve our products (such as generative machine-learning models), human reviewers may read, annotate, and process the data collected above. We take steps to protect your privacy as part of this process. This includes disconnecting the data from your Google Account before reviewers see or annotate it, and storing those disconnected copies for up to 18 months. Please don't submit confidential information or any data you wouldn't want a reviewer to see or Google to use to improve our products, services and machine-learning technologies." }),
129853
129876
  /* @__PURE__ */ jsx66(Newline3, {}),
129854
129877
  /* @__PURE__ */ jsxs58(Box57, { flexDirection: "column", children: [
129855
- /* @__PURE__ */ jsx66(Text62, { children: "Allow Google to use this data to develop and improve our products?" }),
129878
+ /* @__PURE__ */ jsx66(Text63, { children: "Allow Google to use this data to develop and improve our products?" }),
129856
129879
  /* @__PURE__ */ jsx66(
129857
129880
  RadioButtonSelect,
129858
129881
  {
@@ -129868,13 +129891,13 @@ var CloudFreePrivacyNotice = ({
129868
129891
  )
129869
129892
  ] }),
129870
129893
  /* @__PURE__ */ jsx66(Newline3, {}),
129871
- /* @__PURE__ */ jsxs58(Text62, { children: [
129872
- /* @__PURE__ */ jsx66(Text62, { color: Colors.AccentBlue, children: "[1]" }),
129894
+ /* @__PURE__ */ jsxs58(Text63, { children: [
129895
+ /* @__PURE__ */ jsx66(Text63, { color: Colors.AccentBlue, children: "[1]" }),
129873
129896
  " ",
129874
129897
  "https://policies.google.com/privacy"
129875
129898
  ] }),
129876
129899
  /* @__PURE__ */ jsx66(Newline3, {}),
129877
- /* @__PURE__ */ jsx66(Text62, { color: Colors.Gray, children: "Press Enter to choose an option and exit." })
129900
+ /* @__PURE__ */ jsx66(Text63, { color: Colors.Gray, children: "Press Enter to choose an option and exit." })
129878
129901
  ] });
129879
129902
  };
129880
129903
 
@@ -129898,13 +129921,13 @@ var PrivacyNoticeText = ({
129898
129921
  var PrivacyNotice = ({ onExit, config }) => /* @__PURE__ */ jsx67(Box58, { borderStyle: "round", padding: 1, flexDirection: "column", children: /* @__PURE__ */ jsx67(PrivacyNoticeText, { config, onExit }) });
129899
129922
 
129900
129923
  // packages/cli/src/ui/hooks/useSettingsCommand.ts
129901
- import { useState as useState47, useCallback as useCallback28 } from "react";
129924
+ import { useState as useState47, useCallback as useCallback37 } from "react";
129902
129925
  function useSettingsCommand() {
129903
129926
  const [isSettingsDialogOpen, setIsSettingsDialogOpen] = useState47(false);
129904
- const openSettingsDialog = useCallback28(() => {
129927
+ const openSettingsDialog = useCallback37(() => {
129905
129928
  setIsSettingsDialogOpen(true);
129906
129929
  }, []);
129907
- const closeSettingsDialog = useCallback28(() => {
129930
+ const closeSettingsDialog = useCallback37(() => {
129908
129931
  setIsSettingsDialogOpen(false);
129909
129932
  }, []);
129910
129933
  return {
@@ -129915,8 +129938,8 @@ function useSettingsCommand() {
129915
129938
  }
129916
129939
 
129917
129940
  // packages/cli/src/ui/components/SettingsDialog.tsx
129918
- import React31, { useState as useState48, useEffect as useEffect44 } from "react";
129919
- import { Box as Box59, Text as Text63 } from "ink";
129941
+ import React32, { useState as useState48, useEffect as useEffect44 } from "react";
129942
+ import { Box as Box59, Text as Text64 } from "ink";
129920
129943
  init_settings();
129921
129944
  import chalk2 from "chalk";
129922
129945
  import { jsx as jsx68, jsxs as jsxs59 } from "react/jsx-runtime";
@@ -130365,9 +130388,9 @@ function SettingsDialog({
130365
130388
  width: "100%",
130366
130389
  height: "100%",
130367
130390
  children: /* @__PURE__ */ jsxs59(Box59, { flexDirection: "column", flexGrow: 1, children: [
130368
- /* @__PURE__ */ jsx68(Text63, { bold: true, color: Colors.AccentBlue, children: "Settings" }),
130391
+ /* @__PURE__ */ jsx68(Text64, { bold: true, color: Colors.AccentBlue, children: "Settings" }),
130369
130392
  /* @__PURE__ */ jsx68(Box59, { height: 1 }),
130370
- showScrollUp && /* @__PURE__ */ jsx68(Text63, { color: Colors.Gray, children: "\u25B2" }),
130393
+ showScrollUp && /* @__PURE__ */ jsx68(Text64, { color: Colors.Gray, children: "\u25B2" }),
130371
130394
  visibleItems.map((item, idx) => {
130372
130395
  const isActive = focusSection === "settings" && activeSettingIndex === idx + scrollOffset;
130373
130396
  const scopeSettings = settings.forScope(selectedScope).settings;
@@ -130418,16 +130441,16 @@ function SettingsDialog({
130418
130441
  selectedScope,
130419
130442
  settings
130420
130443
  );
130421
- return /* @__PURE__ */ jsxs59(React31.Fragment, { children: [
130444
+ return /* @__PURE__ */ jsxs59(React32.Fragment, { children: [
130422
130445
  /* @__PURE__ */ jsxs59(Box59, { flexDirection: "row", alignItems: "center", children: [
130423
- /* @__PURE__ */ jsx68(Box59, { minWidth: 2, flexShrink: 0, children: /* @__PURE__ */ jsx68(Text63, { color: isActive ? Colors.AccentGreen : Colors.Gray, children: isActive ? "\u25CF" : "" }) }),
130446
+ /* @__PURE__ */ jsx68(Box59, { minWidth: 2, flexShrink: 0, children: /* @__PURE__ */ jsx68(Text64, { color: isActive ? Colors.AccentGreen : Colors.Gray, children: isActive ? "\u25CF" : "" }) }),
130424
130447
  /* @__PURE__ */ jsx68(Box59, { minWidth: 50, children: /* @__PURE__ */ jsxs59(
130425
- Text63,
130448
+ Text64,
130426
130449
  {
130427
130450
  color: isActive ? Colors.AccentGreen : Colors.Foreground,
130428
130451
  children: [
130429
130452
  item.label,
130430
- scopeMessage && /* @__PURE__ */ jsxs59(Text63, { color: Colors.Gray, children: [
130453
+ scopeMessage && /* @__PURE__ */ jsxs59(Text64, { color: Colors.Gray, children: [
130431
130454
  " ",
130432
130455
  scopeMessage
130433
130456
  ] })
@@ -130436,7 +130459,7 @@ function SettingsDialog({
130436
130459
  ) }),
130437
130460
  /* @__PURE__ */ jsx68(Box59, { minWidth: 3 }),
130438
130461
  /* @__PURE__ */ jsx68(
130439
- Text63,
130462
+ Text64,
130440
130463
  {
130441
130464
  color: isActive ? Colors.AccentGreen : shouldBeGreyedOut ? Colors.Gray : Colors.Foreground,
130442
130465
  children: displayValue
@@ -130446,10 +130469,10 @@ function SettingsDialog({
130446
130469
  /* @__PURE__ */ jsx68(Box59, { height: 1 })
130447
130470
  ] }, item.value);
130448
130471
  }),
130449
- showScrollDown && /* @__PURE__ */ jsx68(Text63, { color: Colors.Gray, children: "\u25BC" }),
130472
+ showScrollDown && /* @__PURE__ */ jsx68(Text64, { color: Colors.Gray, children: "\u25BC" }),
130450
130473
  /* @__PURE__ */ jsx68(Box59, { height: 1 }),
130451
130474
  /* @__PURE__ */ jsxs59(Box59, { marginTop: 1, flexDirection: "column", children: [
130452
- /* @__PURE__ */ jsxs59(Text63, { bold: focusSection === "scope", wrap: "truncate", children: [
130475
+ /* @__PURE__ */ jsxs59(Text64, { bold: focusSection === "scope", wrap: "truncate", children: [
130453
130476
  focusSection === "scope" ? "> " : " ",
130454
130477
  "Apply To"
130455
130478
  ] }),
@@ -130466,8 +130489,8 @@ function SettingsDialog({
130466
130489
  )
130467
130490
  ] }),
130468
130491
  /* @__PURE__ */ jsx68(Box59, { height: 1 }),
130469
- /* @__PURE__ */ jsx68(Text63, { color: Colors.Gray, children: "(Use Enter to select, Tab to change focus)" }),
130470
- showRestartPrompt && /* @__PURE__ */ jsx68(Text63, { color: Colors.AccentYellow, children: "To see changes, Gemini CLI must be restarted. Press r to exit and apply changes now." })
130492
+ /* @__PURE__ */ jsx68(Text64, { color: Colors.Gray, children: "(Use Enter to select, Tab to change focus)" }),
130493
+ showRestartPrompt && /* @__PURE__ */ jsx68(Text64, { color: Colors.AccentYellow, children: "To see changes, Gemini CLI must be restarted. Press r to exit and apply changes now." })
130471
130494
  ] })
130472
130495
  }
130473
130496
  );
@@ -130785,7 +130808,7 @@ var App = ({ config, settings, startupWarnings = [], version }) => {
130785
130808
  const { stats: sessionStats } = useSessionStats();
130786
130809
  const [staticNeedsRefresh, setStaticNeedsRefresh] = useState49(false);
130787
130810
  const [staticKey, setStaticKey] = useState49(0);
130788
- const refreshStatic = useCallback29(() => {
130811
+ const refreshStatic = useCallback38(() => {
130789
130812
  stdout.write(base_exports.clearTerminal);
130790
130813
  setStaticKey((prev) => prev + 1);
130791
130814
  }, [setStaticKey, stdout]);
@@ -130814,9 +130837,9 @@ var App = ({ config, settings, startupWarnings = [], version }) => {
130814
130837
  const [showToolDescriptions, setShowToolDescriptions] = useState49(false);
130815
130838
  const [ctrlCPressedOnce, setCtrlCPressedOnce] = useState49(false);
130816
130839
  const [quittingMessages, setQuittingMessages] = useState49(null);
130817
- const ctrlCTimerRef = useRef12(null);
130840
+ const ctrlCTimerRef = useRef13(null);
130818
130841
  const [ctrlDPressedOnce, setCtrlDPressedOnce] = useState49(false);
130819
- const ctrlDTimerRef = useRef12(null);
130842
+ const ctrlDTimerRef = useRef13(null);
130820
130843
  const [constrainHeight, setConstrainHeight] = useState49(true);
130821
130844
  const [showPrivacyNotice, setShowPrivacyNotice] = useState49(false);
130822
130845
  const [modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError] = useState49(false);
@@ -130848,13 +130871,13 @@ var App = ({ config, settings, startupWarnings = [], version }) => {
130848
130871
  appEvents.off("log-error" /* LogError */, logErrorHandler);
130849
130872
  };
130850
130873
  }, [handleNewMessage]);
130851
- const openPrivacyNotice = useCallback29(() => {
130874
+ const openPrivacyNotice = useCallback38(() => {
130852
130875
  setShowPrivacyNotice(true);
130853
130876
  }, []);
130854
- const handleEscapePromptChange = useCallback29((showPrompt) => {
130877
+ const handleEscapePromptChange = useCallback38((showPrompt) => {
130855
130878
  setShowEscapePrompt(showPrompt);
130856
130879
  }, []);
130857
- const initialPromptSubmitted = useRef12(false);
130880
+ const initialPromptSubmitted = useRef13(false);
130858
130881
  const errorCount = useMemo9(
130859
130882
  () => consoleMessages.filter((msg) => msg.type === "error").reduce((total, msg) => total + msg.count, 0),
130860
130883
  [consoleMessages]
@@ -130921,13 +130944,13 @@ var App = ({ config, settings, startupWarnings = [], version }) => {
130921
130944
  handleEditorSelect,
130922
130945
  exitEditorDialog
130923
130946
  } = useEditorSettings(settings, setEditorError, addItem);
130924
- const toggleCorgiMode = useCallback29(() => {
130947
+ const toggleCorgiMode = useCallback38(() => {
130925
130948
  setCorgiMode((prev) => !prev);
130926
130949
  }, []);
130927
- const openSearchDialog = useCallback29(() => {
130950
+ const openSearchDialog = useCallback38(() => {
130928
130951
  setIsSearchDialogOpen(true);
130929
130952
  }, []);
130930
- const performMemoryRefresh = useCallback29(async () => {
130953
+ const performMemoryRefresh = useCallback38(async () => {
130931
130954
  addItem(
130932
130955
  {
130933
130956
  type: "info" /* INFO */,
@@ -131050,21 +131073,21 @@ var App = ({ config, settings, startupWarnings = [], version }) => {
131050
131073
  const { rows: terminalHeight, columns: terminalWidth } = useTerminalSize();
131051
131074
  const isNarrow = isNarrowWidth(terminalWidth);
131052
131075
  const { stdin, setRawMode } = useStdin3();
131053
- const isInitialMount = useRef12(true);
131076
+ const isInitialMount = useRef13(true);
131054
131077
  const widthFraction = 0.9;
131055
131078
  const inputWidth = Math.max(
131056
131079
  20,
131057
131080
  Math.floor(terminalWidth * widthFraction) - 3
131058
131081
  );
131059
131082
  const suggestionsWidth = Math.max(20, Math.floor(terminalWidth * 0.8));
131060
- const isValidPath = useCallback29((filePath) => {
131083
+ const isValidPath = useCallback38((filePath) => {
131061
131084
  try {
131062
131085
  return fs74.existsSync(filePath) && fs74.statSync(filePath).isFile();
131063
131086
  } catch (_e) {
131064
131087
  return false;
131065
131088
  }
131066
131089
  }, []);
131067
- const getPreferredEditor = useCallback29(() => {
131090
+ const getPreferredEditor = useCallback38(() => {
131068
131091
  const editorType = settings.merged.preferredEditor;
131069
131092
  const isValidEditor = isEditorAvailable(editorType);
131070
131093
  if (!isValidEditor) {
@@ -131073,7 +131096,7 @@ var App = ({ config, settings, startupWarnings = [], version }) => {
131073
131096
  }
131074
131097
  return editorType;
131075
131098
  }, [settings, openEditorDialog]);
131076
- const onAuthError = useCallback29(() => {
131099
+ const onAuthError = useCallback38(() => {
131077
131100
  setAuthError("reauth required");
131078
131101
  openAuthDialog();
131079
131102
  }, [openAuthDialog, setAuthError]);
@@ -131119,7 +131142,7 @@ var App = ({ config, settings, startupWarnings = [], version }) => {
131119
131142
  shellModeActive
131120
131143
  });
131121
131144
  const [userMessages, setUserMessages] = useState49([]);
131122
- const cancelHandlerRef = useRef12(() => {
131145
+ const cancelHandlerRef = useRef13(() => {
131123
131146
  });
131124
131147
  const {
131125
131148
  streamingState,
@@ -131154,7 +131177,7 @@ var App = ({ config, settings, startupWarnings = [], version }) => {
131154
131177
  streamingState,
131155
131178
  submitQuery
131156
131179
  });
131157
- cancelHandlerRef.current = useCallback29(() => {
131180
+ cancelHandlerRef.current = useCallback38(() => {
131158
131181
  const lastUserMessage = userMessages.at(-1);
131159
131182
  let textToSet = lastUserMessage || "";
131160
131183
  const queuedText = getQueuedMessagesText();
@@ -131168,13 +131191,13 @@ ${queuedText}` : queuedText;
131168
131191
  buffer.setText(textToSet);
131169
131192
  }
131170
131193
  }, [buffer, userMessages, getQueuedMessagesText, clearQueue]);
131171
- const handleFinalSubmit = useCallback29(
131194
+ const handleFinalSubmit = useCallback38(
131172
131195
  (submittedValue) => {
131173
131196
  addMessage(submittedValue);
131174
131197
  },
131175
131198
  [addMessage]
131176
131199
  );
131177
- const handleIdePromptComplete = useCallback29(
131200
+ const handleIdePromptComplete = useCallback38(
131178
131201
  (result) => {
131179
131202
  if (result.userSelection === "yes") {
131180
131203
  if (result.isExtensionPreInstalled) {
@@ -131203,7 +131226,7 @@ ${queuedText}` : queuedText;
131203
131226
  pendingHistoryItems.push(...pendingGeminiHistoryItems);
131204
131227
  const { elapsedTime, currentLoadingPhrase } = useLoadingIndicator(streamingState);
131205
131228
  const showAutoAcceptIndicator = useAutoAcceptIndicator({ config });
131206
- const handleExit = useCallback29(
131229
+ const handleExit = useCallback38(
131207
131230
  (pressedOnce, setPressedOnce, timerRef) => {
131208
131231
  if (pressedOnce) {
131209
131232
  if (timerRef.current) {
@@ -131220,7 +131243,7 @@ ${queuedText}` : queuedText;
131220
131243
  },
131221
131244
  [handleSlashCommand]
131222
131245
  );
131223
- const handleGlobalKeypress = useCallback29(
131246
+ const handleGlobalKeypress = useCallback38(
131224
131247
  (key) => {
131225
131248
  let enteringConstrainHeightMode = false;
131226
131249
  if (!constrainHeight) {
@@ -131309,14 +131332,14 @@ ${queuedText}` : queuedText;
131309
131332
  fetchUserMessages();
131310
131333
  }, [history, logger6]);
131311
131334
  const isInputActive = (streamingState === "idle" /* Idle */ || streamingState === "responding" /* Responding */) && !initError && !isProcessing;
131312
- const handleClearScreen = useCallback29(() => {
131335
+ const handleClearScreen = useCallback38(() => {
131313
131336
  clearItems();
131314
131337
  clearConsoleMessagesState();
131315
131338
  console.clear();
131316
131339
  refreshStatic();
131317
131340
  }, [clearItems, clearConsoleMessagesState, refreshStatic]);
131318
- const mainControlsRef = useRef12(null);
131319
- const pendingHistoryItemRef = useRef12(null);
131341
+ const mainControlsRef = useRef13(null);
131342
+ const pendingHistoryItemRef = useRef13(null);
131320
131343
  useEffect45(() => {
131321
131344
  if (mainControlsRef.current) {
131322
131345
  const fullFooterMeasurement = measureElement(mainControlsRef.current);
@@ -131452,7 +131475,7 @@ ${queuedText}` : queuedText;
131452
131475
  paddingX: 1,
131453
131476
  marginY: 1,
131454
131477
  flexDirection: "column",
131455
- children: startupWarnings.map((warning, index) => /* @__PURE__ */ jsx69(Text64, { color: Colors.AccentYellow, children: warning }, index))
131478
+ children: startupWarnings.map((warning, index) => /* @__PURE__ */ jsx69(Text65, { color: Colors.AccentYellow, children: warning }, index))
131456
131479
  }
131457
131480
  ),
131458
131481
  shouldShowIdePrompt && currentIDE ? /* @__PURE__ */ jsx69(
@@ -131477,7 +131500,7 @@ ${queuedText}` : queuedText;
131477
131500
  }
131478
131501
  ) })
131479
131502
  ] }) : isThemeDialogOpen ? /* @__PURE__ */ jsxs60(Box60, { flexDirection: "column", children: [
131480
- themeError && /* @__PURE__ */ jsx69(Box60, { marginBottom: 1, children: /* @__PURE__ */ jsx69(Text64, { color: Colors.AccentRed, children: themeError }) }),
131503
+ themeError && /* @__PURE__ */ jsx69(Box60, { marginBottom: 1, children: /* @__PURE__ */ jsx69(Text65, { color: Colors.AccentRed, children: themeError }) }),
131481
131504
  /* @__PURE__ */ jsx69(
131482
131505
  ThemeDialog,
131483
131506
  {
@@ -131556,7 +131579,7 @@ ${queuedText}` : queuedText;
131556
131579
  onCancel: handleWelcomeBackCancel
131557
131580
  }
131558
131581
  ) }) : isEditorDialogOpen ? /* @__PURE__ */ jsxs60(Box60, { flexDirection: "column", children: [
131559
- editorError && /* @__PURE__ */ jsx69(Box60, { marginBottom: 1, children: /* @__PURE__ */ jsx69(Text64, { color: Colors.AccentRed, children: editorError }) }),
131582
+ editorError && /* @__PURE__ */ jsx69(Box60, { marginBottom: 1, children: /* @__PURE__ */ jsx69(Text65, { color: Colors.AccentRed, children: editorError }) }),
131560
131583
  /* @__PURE__ */ jsx69(
131561
131584
  EditorSettingsDialog,
131562
131585
  {
@@ -131631,10 +131654,10 @@ ${queuedText}` : queuedText;
131631
131654
  const preview = message.replace(/\s+/g, " ");
131632
131655
  return (
131633
131656
  // Ensure the Box takes full width so truncation calculates correctly
131634
- /* @__PURE__ */ jsx69(Box60, { paddingLeft: 2, width: "100%", children: /* @__PURE__ */ jsx69(Text64, { dimColor: true, wrap: "truncate", children: preview }) }, index)
131657
+ /* @__PURE__ */ jsx69(Box60, { paddingLeft: 2, width: "100%", children: /* @__PURE__ */ jsx69(Text65, { dimColor: true, wrap: "truncate", children: preview }) }, index)
131635
131658
  );
131636
131659
  }),
131637
- messageQueue.length > MAX_DISPLAYED_QUEUED_MESSAGES && /* @__PURE__ */ jsx69(Box60, { paddingLeft: 2, children: /* @__PURE__ */ jsxs60(Text64, { dimColor: true, children: [
131660
+ messageQueue.length > MAX_DISPLAYED_QUEUED_MESSAGES && /* @__PURE__ */ jsx69(Box60, { paddingLeft: 2, children: /* @__PURE__ */ jsxs60(Text65, { dimColor: true, children: [
131638
131661
  "... (+",
131639
131662
  messageQueue.length - MAX_DISPLAYED_QUEUED_MESSAGES,
131640
131663
  " ",
@@ -131651,8 +131674,8 @@ ${queuedText}` : queuedText;
131651
131674
  alignItems: isNarrow ? "flex-start" : "center",
131652
131675
  children: [
131653
131676
  /* @__PURE__ */ jsxs60(Box60, { children: [
131654
- process18.env["GEMINI_SYSTEM_MD"] && /* @__PURE__ */ jsx69(Text64, { color: Colors.AccentRed, children: "|\u2310\u25A0_\u25A0| " }),
131655
- ctrlCPressedOnce ? /* @__PURE__ */ jsx69(Text64, { color: Colors.AccentYellow, children: "Press Ctrl+C again to exit." }) : ctrlDPressedOnce ? /* @__PURE__ */ jsx69(Text64, { color: Colors.AccentYellow, children: "Press Ctrl+D again to exit." }) : showEscapePrompt ? /* @__PURE__ */ jsx69(Text64, { color: Colors.Gray, children: "Press Esc again to clear." }) : /* @__PURE__ */ jsx69(
131677
+ process18.env["GEMINI_SYSTEM_MD"] && /* @__PURE__ */ jsx69(Text65, { color: Colors.AccentRed, children: "|\u2310\u25A0_\u25A0| " }),
131678
+ ctrlCPressedOnce ? /* @__PURE__ */ jsx69(Text65, { color: Colors.AccentYellow, children: "Press Ctrl+C again to exit." }) : ctrlDPressedOnce ? /* @__PURE__ */ jsx69(Text65, { color: Colors.AccentYellow, children: "Press Ctrl+D again to exit." }) : showEscapePrompt ? /* @__PURE__ */ jsx69(Text65, { color: Colors.Gray, children: "Press Esc again to clear." }) : /* @__PURE__ */ jsx69(
131656
131679
  ContextSummaryDisplay,
131657
131680
  {
131658
131681
  ideContext: ideContextState,
@@ -131717,14 +131740,14 @@ ${queuedText}` : queuedText;
131717
131740
  marginBottom: 1,
131718
131741
  children: history.find(
131719
131742
  (item) => item.type === "error" && item.text?.includes(initError)
131720
- )?.text ? /* @__PURE__ */ jsx69(Text64, { color: Colors.AccentRed, children: history.find(
131743
+ )?.text ? /* @__PURE__ */ jsx69(Text65, { color: Colors.AccentRed, children: history.find(
131721
131744
  (item) => item.type === "error" && item.text?.includes(initError)
131722
131745
  )?.text }) : /* @__PURE__ */ jsxs60(Fragment9, { children: [
131723
- /* @__PURE__ */ jsxs60(Text64, { color: Colors.AccentRed, children: [
131746
+ /* @__PURE__ */ jsxs60(Text65, { color: Colors.AccentRed, children: [
131724
131747
  "Initialization Error: ",
131725
131748
  initError
131726
131749
  ] }),
131727
- /* @__PURE__ */ jsxs60(Text64, { color: Colors.AccentRed, children: [
131750
+ /* @__PURE__ */ jsxs60(Text65, { color: Colors.AccentRed, children: [
131728
131751
  " ",
131729
131752
  "Please check API key and configuration."
131730
131753
  ] })
@@ -134296,7 +134319,7 @@ async function main() {
134296
134319
  await detectAndEnableKittyProtocol();
134297
134320
  setWindowTitle(basename18(workspaceRoot), settings);
134298
134321
  const instance = render2(
134299
- /* @__PURE__ */ jsx70(React32.StrictMode, { children: /* @__PURE__ */ jsx70(SettingsContext.Provider, { value: settings, children: /* @__PURE__ */ jsx70(
134322
+ /* @__PURE__ */ jsx70(React33.StrictMode, { children: /* @__PURE__ */ jsx70(SettingsContext.Provider, { value: settings, children: /* @__PURE__ */ jsx70(
134300
134323
  AppWrapper,
134301
134324
  {
134302
134325
  config,