fss-link 1.1.2 → 1.1.4

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 +1390 -1060
  2. package/package.json +1 -1
@@ -22084,7 +22084,7 @@ async function createContentGeneratorConfig(config, authType) {
22084
22084
  async function createContentGenerator(config, gcConfig, sessionId2) {
22085
22085
  if (DEBUG_CONTENT)
22086
22086
  console.log(`\u{1F41B} DEBUG createContentGenerator: authType=${config.authType}, apiKey=${config.apiKey}, baseUrl=${config.baseUrl}`);
22087
- const version = "1.1.2";
22087
+ const version = "1.1.4";
22088
22088
  const userAgent = `FSS-Link/${version} (${process.platform}; ${process.arch})`;
22089
22089
  const baseHeaders = {
22090
22090
  "User-Agent": userAgent
@@ -24635,231 +24635,24 @@ Signal: Signal number or \`(none)\` if no signal was received.
24635
24635
  }
24636
24636
  });
24637
24637
 
24638
- // packages/core/dist/src/tools/ls.js
24639
- import fs8 from "fs";
24640
- import path10 from "path";
24641
- var LSToolInvocation, LSTool;
24642
- var init_ls = __esm({
24643
- "packages/core/dist/src/tools/ls.js"() {
24644
- "use strict";
24645
- init_tools();
24646
- init_paths();
24647
- init_config();
24648
- LSToolInvocation = class extends BaseToolInvocation {
24649
- config;
24650
- constructor(config, params) {
24651
- super(params);
24652
- this.config = config;
24653
- }
24654
- /**
24655
- * Checks if a filename matches any of the ignore patterns
24656
- * @param filename Filename to check
24657
- * @param patterns Array of glob patterns to check against
24658
- * @returns True if the filename should be ignored
24659
- */
24660
- shouldIgnore(filename, patterns) {
24661
- if (!patterns || patterns.length === 0) {
24662
- return false;
24663
- }
24664
- for (const pattern of patterns) {
24665
- const regexPattern = pattern.replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*").replace(/\?/g, ".");
24666
- const regex2 = new RegExp(`^${regexPattern}$`);
24667
- if (regex2.test(filename)) {
24668
- return true;
24669
- }
24670
- }
24671
- return false;
24672
- }
24673
- /**
24674
- * Gets a description of the file reading operation
24675
- * @returns A string describing the file being read
24676
- */
24677
- getDescription() {
24678
- const relativePath = makeRelative(this.params.path, this.config.getTargetDir());
24679
- return shortenPath(relativePath);
24680
- }
24681
- // Helper for consistent error formatting
24682
- errorResult(llmContent, returnDisplay) {
24683
- return {
24684
- llmContent,
24685
- // Keep returnDisplay simpler in core logic
24686
- returnDisplay: `Error: ${returnDisplay}`
24687
- };
24688
- }
24689
- /**
24690
- * Executes the LS operation with the given parameters
24691
- * @returns Result of the LS operation
24692
- */
24693
- async execute(_signal) {
24694
- try {
24695
- const stats = fs8.statSync(this.params.path);
24696
- if (!stats) {
24697
- return this.errorResult(`Error: Directory not found or inaccessible: ${this.params.path}`, `Directory not found or inaccessible.`);
24698
- }
24699
- if (!stats.isDirectory()) {
24700
- return this.errorResult(`Error: Path is not a directory: ${this.params.path}`, `Path is not a directory.`);
24701
- }
24702
- const files = fs8.readdirSync(this.params.path);
24703
- const defaultFileIgnores = this.config.getFileFilteringOptions() ?? DEFAULT_FILE_FILTERING_OPTIONS;
24704
- const fileFilteringOptions = {
24705
- respectGitIgnore: this.params.file_filtering_options?.respect_git_ignore ?? defaultFileIgnores.respectGitIgnore,
24706
- respectFssLinkIgnore: this.params.file_filtering_options?.respect_gemini_ignore ?? defaultFileIgnores.respectFssLinkIgnore
24707
- };
24708
- const fileDiscovery = this.config.getFileService();
24709
- const entries = [];
24710
- let gitIgnoredCount = 0;
24711
- let fssLinkIgnoredCount = 0;
24712
- if (files.length === 0) {
24713
- return {
24714
- llmContent: `Directory ${this.params.path} is empty.`,
24715
- returnDisplay: `Directory is empty.`
24716
- };
24717
- }
24718
- for (const file of files) {
24719
- if (this.shouldIgnore(file, this.params.ignore)) {
24720
- continue;
24721
- }
24722
- const fullPath = path10.join(this.params.path, file);
24723
- const relativePath = path10.relative(this.config.getTargetDir(), fullPath);
24724
- if (fileFilteringOptions.respectGitIgnore && fileDiscovery.shouldGitIgnoreFile(relativePath)) {
24725
- gitIgnoredCount++;
24726
- continue;
24727
- }
24728
- if (fileFilteringOptions.respectFssLinkIgnore && fileDiscovery.shouldFssLinkIgnoreFile(relativePath)) {
24729
- fssLinkIgnoredCount++;
24730
- continue;
24731
- }
24732
- try {
24733
- const stats2 = fs8.statSync(fullPath);
24734
- const isDir = stats2.isDirectory();
24735
- entries.push({
24736
- name: file,
24737
- path: fullPath,
24738
- isDirectory: isDir,
24739
- size: isDir ? 0 : stats2.size,
24740
- modifiedTime: stats2.mtime
24741
- });
24742
- } catch (error) {
24743
- console.error(`Error accessing ${fullPath}: ${error}`);
24744
- }
24745
- }
24746
- entries.sort((a, b) => {
24747
- if (a.isDirectory && !b.isDirectory)
24748
- return -1;
24749
- if (!a.isDirectory && b.isDirectory)
24750
- return 1;
24751
- return a.name.localeCompare(b.name);
24752
- });
24753
- const directoryContent = entries.map((entry) => `${entry.isDirectory ? "[DIR] " : ""}${entry.name}`).join("\n");
24754
- let resultMessage = `Directory listing for ${this.params.path}:
24755
- ${directoryContent}`;
24756
- const ignoredMessages = [];
24757
- if (gitIgnoredCount > 0) {
24758
- ignoredMessages.push(`${gitIgnoredCount} git-ignored`);
24759
- }
24760
- if (fssLinkIgnoredCount > 0) {
24761
- ignoredMessages.push(`${fssLinkIgnoredCount} fss-link-ignored`);
24762
- }
24763
- if (ignoredMessages.length > 0) {
24764
- resultMessage += `
24765
-
24766
- (${ignoredMessages.join(", ")})`;
24767
- }
24768
- let displayMessage = `Listed ${entries.length} item(s).`;
24769
- if (ignoredMessages.length > 0) {
24770
- displayMessage += ` (${ignoredMessages.join(", ")})`;
24771
- if (entries.length === 0 && gitIgnoredCount > 0 && this.params.path.includes("scraped_content")) {
24772
- displayMessage += ` - Use 'ls scraped_content' or 'bash ls scraped_content/' to view web scraper output files`;
24773
- }
24774
- }
24775
- return {
24776
- llmContent: resultMessage,
24777
- returnDisplay: displayMessage
24778
- };
24779
- } catch (error) {
24780
- const errorMsg = `Error listing directory: ${error instanceof Error ? error.message : String(error)}`;
24781
- return this.errorResult(errorMsg, "Failed to list directory.");
24782
- }
24783
- }
24784
- };
24785
- LSTool = class _LSTool extends BaseDeclarativeTool {
24786
- config;
24787
- static Name = "list_directory";
24788
- constructor(config) {
24789
- super(_LSTool.Name, "ReadFolder", "Lists the names of files and subdirectories directly within a specified directory path. Can optionally ignore entries matching provided glob patterns.", Kind.Search, {
24790
- properties: {
24791
- path: {
24792
- description: "The absolute path to the directory to list (must be absolute, not relative)",
24793
- type: "string"
24794
- },
24795
- ignore: {
24796
- description: "List of glob patterns to ignore",
24797
- items: {
24798
- type: "string"
24799
- },
24800
- type: "array"
24801
- },
24802
- file_filtering_options: {
24803
- description: "Optional: Whether to respect ignore patterns from .gitignore or .fss-linkignore",
24804
- type: "object",
24805
- properties: {
24806
- respect_git_ignore: {
24807
- description: "Optional: Whether to respect .gitignore patterns when listing files. Only available in git repositories. Defaults to true.",
24808
- type: "boolean"
24809
- },
24810
- respect_gemini_ignore: {
24811
- description: "Optional: Whether to respect .fss-linkignore patterns when listing files. Defaults to true.",
24812
- type: "boolean"
24813
- }
24814
- }
24815
- }
24816
- },
24817
- required: ["path"],
24818
- type: "object"
24819
- });
24820
- this.config = config;
24821
- }
24822
- /**
24823
- * Validates the parameters for the tool
24824
- * @param params Parameters to validate
24825
- * @returns An error message string if invalid, null otherwise
24826
- */
24827
- validateToolParamValues(params) {
24828
- if (!path10.isAbsolute(params.path)) {
24829
- return `Path must be absolute: ${params.path}`;
24830
- }
24831
- const workspaceContext = this.config.getWorkspaceContext();
24832
- if (!workspaceContext.isPathWithinWorkspace(params.path)) {
24833
- const directories = workspaceContext.getDirectories();
24834
- return `Path must be within one of the workspace directories: ${directories.join(", ")}`;
24835
- }
24836
- return null;
24837
- }
24838
- createInvocation(params) {
24839
- return new LSToolInvocation(this.config, params);
24840
- }
24841
- };
24842
- }
24843
- });
24844
-
24845
24638
  // packages/core/dist/src/utils/fileUtils.js
24846
- import fs9 from "node:fs";
24847
- import path11 from "node:path";
24639
+ import fs8 from "node:fs";
24640
+ import path10 from "node:path";
24848
24641
  import mime from "mime-types";
24849
24642
  function getSpecificMimeType(filePath) {
24850
24643
  const lookedUpMime = mime.lookup(filePath);
24851
24644
  return typeof lookedUpMime === "string" ? lookedUpMime : void 0;
24852
24645
  }
24853
24646
  function isWithinRoot(pathToCheck, rootDirectory) {
24854
- const normalizedPathToCheck = path11.resolve(pathToCheck);
24855
- const normalizedRootDirectory = path11.resolve(rootDirectory);
24856
- const rootWithSeparator = normalizedRootDirectory === path11.sep || normalizedRootDirectory.endsWith(path11.sep) ? normalizedRootDirectory : normalizedRootDirectory + path11.sep;
24647
+ const normalizedPathToCheck = path10.resolve(pathToCheck);
24648
+ const normalizedRootDirectory = path10.resolve(rootDirectory);
24649
+ const rootWithSeparator = normalizedRootDirectory === path10.sep || normalizedRootDirectory.endsWith(path10.sep) ? normalizedRootDirectory : normalizedRootDirectory + path10.sep;
24857
24650
  return normalizedPathToCheck === normalizedRootDirectory || normalizedPathToCheck.startsWith(rootWithSeparator);
24858
24651
  }
24859
24652
  async function isBinaryFile(filePath) {
24860
24653
  let fileHandle;
24861
24654
  try {
24862
- fileHandle = await fs9.promises.open(filePath, "r");
24655
+ fileHandle = await fs8.promises.open(filePath, "r");
24863
24656
  const stats = await fileHandle.stat();
24864
24657
  const fileSize = stats.size;
24865
24658
  if (fileSize === 0) {
@@ -24894,7 +24687,7 @@ async function isBinaryFile(filePath) {
24894
24687
  }
24895
24688
  }
24896
24689
  async function detectFileType(filePath) {
24897
- const ext2 = path11.extname(filePath).toLowerCase();
24690
+ const ext2 = path10.extname(filePath).toLowerCase();
24898
24691
  if ([".ts", ".mts", ".cts"].includes(ext2)) {
24899
24692
  return "text";
24900
24693
  }
@@ -24955,7 +24748,7 @@ async function detectFileType(filePath) {
24955
24748
  }
24956
24749
  async function processSingleFileContent(filePath, rootDirectory, fileSystemService, offset, limit2) {
24957
24750
  try {
24958
- if (!fs9.existsSync(filePath)) {
24751
+ if (!fs8.existsSync(filePath)) {
24959
24752
  return {
24960
24753
  llmContent: "",
24961
24754
  returnDisplay: "File not found.",
@@ -24963,7 +24756,7 @@ async function processSingleFileContent(filePath, rootDirectory, fileSystemServi
24963
24756
  errorType: FileErrorType.FILE_NOT_FOUND
24964
24757
  };
24965
24758
  }
24966
- const stats = await fs9.promises.stat(filePath);
24759
+ const stats = await fs8.promises.stat(filePath);
24967
24760
  if (stats.isDirectory()) {
24968
24761
  return {
24969
24762
  llmContent: "",
@@ -24978,7 +24771,7 @@ async function processSingleFileContent(filePath, rootDirectory, fileSystemServi
24978
24771
  throw new Error(`File size exceeds the 20MB limit: ${filePath} (${(fileSizeInBytes / (1024 * 1024)).toFixed(2)}MB)`);
24979
24772
  }
24980
24773
  const fileType = await detectFileType(filePath);
24981
- const relativePathForDisplay = path11.relative(rootDirectory, filePath).replace(/\\/g, "/");
24774
+ const relativePathForDisplay = path10.relative(rootDirectory, filePath).replace(/\\/g, "/");
24982
24775
  switch (fileType) {
24983
24776
  case "binary": {
24984
24777
  return {
@@ -25041,7 +24834,7 @@ async function processSingleFileContent(filePath, rootDirectory, fileSystemServi
25041
24834
  case "pdf":
25042
24835
  case "audio":
25043
24836
  case "video": {
25044
- const contentBuffer = await fs9.promises.readFile(filePath);
24837
+ const contentBuffer = await fs8.promises.readFile(filePath);
25045
24838
  const base64Data = contentBuffer.toString("base64");
25046
24839
  return {
25047
24840
  llmContent: {
@@ -25064,7 +24857,7 @@ async function processSingleFileContent(filePath, rootDirectory, fileSystemServi
25064
24857
  }
25065
24858
  } catch (error) {
25066
24859
  const errorMessage = error instanceof Error ? error.message : String(error);
25067
- const displayPath = path11.relative(rootDirectory, filePath).replace(/\\/g, "/");
24860
+ const displayPath = path10.relative(rootDirectory, filePath).replace(/\\/g, "/");
25068
24861
  return {
25069
24862
  llmContent: `Error reading file ${displayPath}: ${errorMessage}`,
25070
24863
  returnDisplay: `Error reading file ${displayPath}: ${errorMessage}`,
@@ -25096,7 +24889,7 @@ function formatRelativeTime(date) {
25096
24889
  return `${Math.floor(diffDays / 30)}mo ago`;
25097
24890
  }
25098
24891
  function getFileTypeIcon(filePath, fileType) {
25099
- const ext2 = path11.extname(filePath).toLowerCase();
24892
+ const ext2 = path10.extname(filePath).toLowerCase();
25100
24893
  if (fileType === "image")
25101
24894
  return "\u{1F5BC}\uFE0F";
25102
24895
  if (fileType === "pdf")
@@ -25111,14 +24904,43 @@ function getFileTypeIcon(filePath, fileType) {
25111
24904
  return "\u{1F9EA}";
25112
24905
  return "\u{1F4C4}";
25113
24906
  }
24907
+ async function countLinesEfficiently(filePath, maxLines = 1e4) {
24908
+ return new Promise((resolve19) => {
24909
+ let lineCount = 0;
24910
+ const stream2 = fs8.createReadStream(filePath, { encoding: "utf-8" });
24911
+ let remainder = "";
24912
+ stream2.on("data", (chunk) => {
24913
+ const text = Buffer.isBuffer(chunk) ? chunk.toString("utf-8") : chunk;
24914
+ const lines = (remainder + text).split("\n");
24915
+ remainder = lines.pop() || "";
24916
+ lineCount += lines.length;
24917
+ if (lineCount > maxLines) {
24918
+ stream2.destroy();
24919
+ resolve19(void 0);
24920
+ }
24921
+ });
24922
+ stream2.on("end", () => {
24923
+ if (remainder)
24924
+ lineCount++;
24925
+ resolve19(lineCount);
24926
+ });
24927
+ stream2.on("error", () => {
24928
+ resolve19(void 0);
24929
+ });
24930
+ });
24931
+ }
25114
24932
  async function collectFileMetadata(filePath) {
25115
- const stats = await fs9.promises.stat(filePath);
24933
+ const stats = await fs8.promises.stat(filePath);
25116
24934
  const fileType = await detectFileType(filePath);
25117
24935
  let totalLines;
25118
24936
  if (fileType === "text") {
25119
24937
  try {
25120
- const content = await fs9.promises.readFile(filePath, "utf-8");
25121
- totalLines = content.split("\n").length;
24938
+ if (stats.size < 100 * 1024) {
24939
+ const content = await fs8.promises.readFile(filePath, "utf-8");
24940
+ totalLines = content.split("\n").length;
24941
+ } else {
24942
+ totalLines = await countLinesEfficiently(filePath, 1e4);
24943
+ }
25122
24944
  } catch (error) {
25123
24945
  console.warn(`Could not count lines for ${filePath}:`, error instanceof Error ? error.message : String(error));
25124
24946
  }
@@ -25147,6 +24969,245 @@ var init_fileUtils = __esm({
25147
24969
  }
25148
24970
  });
25149
24971
 
24972
+ // packages/core/dist/src/tools/ls.js
24973
+ import fs9 from "fs";
24974
+ import path11 from "path";
24975
+ var LSToolInvocation, LSTool;
24976
+ var init_ls = __esm({
24977
+ "packages/core/dist/src/tools/ls.js"() {
24978
+ "use strict";
24979
+ init_tools();
24980
+ init_paths();
24981
+ init_config();
24982
+ init_fileUtils();
24983
+ LSToolInvocation = class extends BaseToolInvocation {
24984
+ config;
24985
+ constructor(config, params) {
24986
+ super(params);
24987
+ this.config = config;
24988
+ }
24989
+ /**
24990
+ * Checks if a filename matches any of the ignore patterns
24991
+ * @param filename Filename to check
24992
+ * @param patterns Array of glob patterns to check against
24993
+ * @returns True if the filename should be ignored
24994
+ */
24995
+ shouldIgnore(filename, patterns) {
24996
+ if (!patterns || patterns.length === 0) {
24997
+ return false;
24998
+ }
24999
+ for (const pattern of patterns) {
25000
+ const regexPattern = pattern.replace(/[.+^${}()|[\]\\]/g, "\\$&").replace(/\*/g, ".*").replace(/\?/g, ".");
25001
+ const regex2 = new RegExp(`^${regexPattern}$`);
25002
+ if (regex2.test(filename)) {
25003
+ return true;
25004
+ }
25005
+ }
25006
+ return false;
25007
+ }
25008
+ /**
25009
+ * Gets a description of the file reading operation
25010
+ * @returns A string describing the file being read
25011
+ */
25012
+ getDescription() {
25013
+ const relativePath = makeRelative(this.params.path, this.config.getTargetDir());
25014
+ return shortenPath(relativePath);
25015
+ }
25016
+ // Helper for consistent error formatting
25017
+ errorResult(llmContent, returnDisplay) {
25018
+ return {
25019
+ llmContent,
25020
+ // Keep returnDisplay simpler in core logic
25021
+ returnDisplay: `Error: ${returnDisplay}`
25022
+ };
25023
+ }
25024
+ /**
25025
+ * Executes the LS operation with the given parameters
25026
+ * @returns Result of the LS operation
25027
+ */
25028
+ async execute(_signal) {
25029
+ try {
25030
+ const stats = fs9.statSync(this.params.path);
25031
+ if (!stats) {
25032
+ return this.errorResult(`Error: Directory not found or inaccessible: ${this.params.path}`, `Directory not found or inaccessible.`);
25033
+ }
25034
+ if (!stats.isDirectory()) {
25035
+ return this.errorResult(`Error: Path is not a directory: ${this.params.path}`, `Path is not a directory.`);
25036
+ }
25037
+ const files = fs9.readdirSync(this.params.path);
25038
+ const defaultFileIgnores = this.config.getFileFilteringOptions() ?? DEFAULT_FILE_FILTERING_OPTIONS;
25039
+ const fileFilteringOptions = {
25040
+ respectGitIgnore: this.params.file_filtering_options?.respect_git_ignore ?? defaultFileIgnores.respectGitIgnore,
25041
+ respectFssLinkIgnore: this.params.file_filtering_options?.respect_gemini_ignore ?? defaultFileIgnores.respectFssLinkIgnore
25042
+ };
25043
+ const fileDiscovery = this.config.getFileService();
25044
+ const entries = [];
25045
+ let gitIgnoredCount = 0;
25046
+ let fssLinkIgnoredCount = 0;
25047
+ if (files.length === 0) {
25048
+ return {
25049
+ llmContent: `Directory ${this.params.path} is empty.`,
25050
+ returnDisplay: `Directory is empty.`
25051
+ };
25052
+ }
25053
+ for (const file of files) {
25054
+ if (this.shouldIgnore(file, this.params.ignore)) {
25055
+ continue;
25056
+ }
25057
+ const fullPath = path11.join(this.params.path, file);
25058
+ const relativePath = path11.relative(this.config.getTargetDir(), fullPath);
25059
+ if (fileFilteringOptions.respectGitIgnore && fileDiscovery.shouldGitIgnoreFile(relativePath)) {
25060
+ gitIgnoredCount++;
25061
+ continue;
25062
+ }
25063
+ if (fileFilteringOptions.respectFssLinkIgnore && fileDiscovery.shouldFssLinkIgnoreFile(relativePath)) {
25064
+ fssLinkIgnoredCount++;
25065
+ continue;
25066
+ }
25067
+ try {
25068
+ const stats2 = fs9.statSync(fullPath);
25069
+ const isDir = stats2.isDirectory();
25070
+ entries.push({
25071
+ name: file,
25072
+ path: fullPath,
25073
+ isDirectory: isDir,
25074
+ size: isDir ? 0 : stats2.size,
25075
+ modifiedTime: stats2.mtime
25076
+ });
25077
+ } catch (error) {
25078
+ console.error(`Error accessing ${fullPath}: ${error}`);
25079
+ }
25080
+ }
25081
+ entries.sort((a, b) => {
25082
+ if (a.isDirectory && !b.isDirectory)
25083
+ return -1;
25084
+ if (!a.isDirectory && b.isDirectory)
25085
+ return 1;
25086
+ return a.name.localeCompare(b.name);
25087
+ });
25088
+ const showMetadata = this.params.show_metadata ?? true;
25089
+ const showIcons = this.params.show_file_icons ?? true;
25090
+ const directoryContent = entries.map((entry) => {
25091
+ let line = "";
25092
+ if (showIcons) {
25093
+ const icon = entry.isDirectory ? "\u{1F4C1}" : getFileTypeIcon(entry.path, entry.isDirectory ? "directory" : "text");
25094
+ line += `${icon} `;
25095
+ }
25096
+ if (!showIcons && entry.isDirectory) {
25097
+ line += "[DIR] ";
25098
+ }
25099
+ line += entry.name;
25100
+ if (showMetadata && !entry.isDirectory) {
25101
+ const size = formatFileSize(entry.size);
25102
+ const time = formatRelativeTime(entry.modifiedTime);
25103
+ line += ` (${size}, ${time})`;
25104
+ } else if (showMetadata && entry.isDirectory) {
25105
+ const time = formatRelativeTime(entry.modifiedTime);
25106
+ line += ` (${time})`;
25107
+ }
25108
+ return line;
25109
+ }).join("\n");
25110
+ let resultMessage = `Directory listing for ${this.params.path}:
25111
+ ${directoryContent}`;
25112
+ const ignoredMessages = [];
25113
+ if (gitIgnoredCount > 0) {
25114
+ ignoredMessages.push(`${gitIgnoredCount} git-ignored`);
25115
+ }
25116
+ if (fssLinkIgnoredCount > 0) {
25117
+ ignoredMessages.push(`${fssLinkIgnoredCount} fss-link-ignored`);
25118
+ }
25119
+ if (ignoredMessages.length > 0) {
25120
+ resultMessage += `
25121
+
25122
+ (${ignoredMessages.join(", ")})`;
25123
+ }
25124
+ let displayMessage = `Listed ${entries.length} item(s).`;
25125
+ if (ignoredMessages.length > 0) {
25126
+ displayMessage += ` (${ignoredMessages.join(", ")})`;
25127
+ if (entries.length === 0 && gitIgnoredCount > 0 && this.params.path.includes("scraped_content")) {
25128
+ displayMessage += ` - Use 'ls scraped_content' or 'bash ls scraped_content/' to view web scraper output files`;
25129
+ }
25130
+ }
25131
+ return {
25132
+ llmContent: resultMessage,
25133
+ returnDisplay: displayMessage
25134
+ };
25135
+ } catch (error) {
25136
+ const errorMsg = `Error listing directory: ${error instanceof Error ? error.message : String(error)}`;
25137
+ return this.errorResult(errorMsg, "Failed to list directory.");
25138
+ }
25139
+ }
25140
+ };
25141
+ LSTool = class _LSTool extends BaseDeclarativeTool {
25142
+ config;
25143
+ static Name = "list_directory";
25144
+ constructor(config) {
25145
+ super(_LSTool.Name, "ReadFolder", "Lists the names of files and subdirectories directly within a specified directory path. Can optionally ignore entries matching provided glob patterns.", Kind.Search, {
25146
+ properties: {
25147
+ path: {
25148
+ description: "The absolute path to the directory to list (must be absolute, not relative)",
25149
+ type: "string"
25150
+ },
25151
+ ignore: {
25152
+ description: "List of glob patterns to ignore",
25153
+ items: {
25154
+ type: "string"
25155
+ },
25156
+ type: "array"
25157
+ },
25158
+ file_filtering_options: {
25159
+ description: "Optional: Whether to respect ignore patterns from .gitignore or .fss-linkignore",
25160
+ type: "object",
25161
+ properties: {
25162
+ respect_git_ignore: {
25163
+ description: "Optional: Whether to respect .gitignore patterns when listing files. Only available in git repositories. Defaults to true.",
25164
+ type: "boolean"
25165
+ },
25166
+ respect_gemini_ignore: {
25167
+ description: "Optional: Whether to respect .fss-linkignore patterns when listing files. Defaults to true.",
25168
+ type: "boolean"
25169
+ }
25170
+ }
25171
+ },
25172
+ show_metadata: {
25173
+ description: "Optional: Show file metadata including size and last modified time. Displays file sizes (e.g., 4.2 KB) and relative timestamps (e.g., 2h ago) for better file identification and context.",
25174
+ type: "boolean",
25175
+ default: true
25176
+ },
25177
+ show_file_icons: {
25178
+ description: "Optional: Show file type icons (\u{1F4C1} \u{1F4C4} \u{1F4CB} \u{1F5BC}\uFE0F \u2699\uFE0F) for visual file type identification. Makes directory listings more visually scannable and helps quickly identify file types.",
25179
+ type: "boolean",
25180
+ default: true
25181
+ }
25182
+ },
25183
+ required: ["path"],
25184
+ type: "object"
25185
+ });
25186
+ this.config = config;
25187
+ }
25188
+ /**
25189
+ * Validates the parameters for the tool
25190
+ * @param params Parameters to validate
25191
+ * @returns An error message string if invalid, null otherwise
25192
+ */
25193
+ validateToolParamValues(params) {
25194
+ if (!path11.isAbsolute(params.path)) {
25195
+ return `Path must be absolute: ${params.path}`;
25196
+ }
25197
+ const workspaceContext = this.config.getWorkspaceContext();
25198
+ if (!workspaceContext.isPathWithinWorkspace(params.path)) {
25199
+ const directories = workspaceContext.getDirectories();
25200
+ return `Path must be within one of the workspace directories: ${directories.join(", ")}`;
25201
+ }
25202
+ return null;
25203
+ }
25204
+ createInvocation(params) {
25205
+ return new LSToolInvocation(this.config, params);
25206
+ }
25207
+ };
25208
+ }
25209
+ });
25210
+
25150
25211
  // packages/core/dist/src/tools/read-file.js
25151
25212
  import path12 from "path";
25152
25213
  import fs10 from "node:fs/promises";
@@ -25219,7 +25280,7 @@ var init_read_file = __esm({
25219
25280
  };
25220
25281
  }
25221
25282
  let llmContent;
25222
- const useEnhancedFormat = false;
25283
+ const useEnhancedFormat = this.params.enhanced_format ?? false;
25223
25284
  const isTextContent = typeof result.llmContent === "string";
25224
25285
  if (useEnhancedFormat && isTextContent) {
25225
25286
  const relativePath = makeRelative(this.params.absolute_path, this.config.getTargetDir());
@@ -25232,7 +25293,7 @@ var init_read_file = __esm({
25232
25293
  const stats = await fs10.stat(this.params.absolute_path);
25233
25294
  const fileSize = formatFileSize(stats.size);
25234
25295
  fileStatsInfo = ` (${total} lines, ${fileSize}, UTF-8)`;
25235
- } catch (error) {
25296
+ } catch (_error) {
25236
25297
  fileStatsInfo = ` (${total} lines)`;
25237
25298
  }
25238
25299
  const progress = Math.round(end / total * 100);
@@ -25252,7 +25313,7 @@ Next: Use offset: ${nextOffset} to continue reading`;
25252
25313
  const stats = await fs10.stat(this.params.absolute_path);
25253
25314
  const fileSize = formatFileSize(stats.size);
25254
25315
  fileStatsInfo = ` (${totalLines} lines, ${fileSize}, UTF-8)`;
25255
- } catch (error) {
25316
+ } catch (_error) {
25256
25317
  fileStatsInfo = totalLines > 0 ? ` (${totalLines} lines)` : "";
25257
25318
  }
25258
25319
  llmContent = `File: ${relativePath}${fileStatsInfo}
@@ -32607,7 +32668,7 @@ WARNING: Results truncated to prevent context overflow. To see more results:
32607
32668
  });
32608
32669
 
32609
32670
  // packages/core/dist/src/tools/glob.js
32610
- import fs13 from "fs";
32671
+ import fs13 from "node:fs";
32611
32672
  import path16 from "path";
32612
32673
  function sortFileEntries(entries, nowTimestamp, recencyThresholdMs) {
32613
32674
  const sortedEntries = [...entries];
@@ -32764,13 +32825,35 @@ ${fileListDescription}`;
32764
32825
  }
32765
32826
  }
32766
32827
  async processFilesWithMetadata(filePaths) {
32828
+ const BATCH_SIZE = 10;
32829
+ const TIMEOUT_MS = 5e3;
32830
+ const MAX_FILE_SIZE_FOR_METADATA = 1024 * 1024;
32767
32831
  const results = [];
32768
- for (const filePath of filePaths) {
32832
+ const processFileWithTimeout = async (filePath) => {
32833
+ const timeoutPromise = new Promise((_, reject) => setTimeout(() => reject(new Error("Metadata collection timeout")), TIMEOUT_MS));
32769
32834
  try {
32770
- const metadata = await collectFileMetadata(filePath);
32771
- results.push({ path: filePath, metadata });
32772
- } catch (error) {
32773
- results.push({
32835
+ const stats = await fs13.promises.stat(filePath);
32836
+ if (stats.size > MAX_FILE_SIZE_FOR_METADATA) {
32837
+ const fileType = await detectFileType(filePath);
32838
+ return {
32839
+ path: filePath,
32840
+ metadata: {
32841
+ size: stats.size,
32842
+ lastModified: stats.mtime,
32843
+ totalLines: void 0,
32844
+ // Skip for large files
32845
+ fileType,
32846
+ icon: getFileTypeIcon(filePath, fileType)
32847
+ }
32848
+ };
32849
+ }
32850
+ const metadata = await Promise.race([
32851
+ collectFileMetadata(filePath),
32852
+ timeoutPromise
32853
+ ]);
32854
+ return { path: filePath, metadata };
32855
+ } catch (_error) {
32856
+ return {
32774
32857
  path: filePath,
32775
32858
  metadata: {
32776
32859
  size: 0,
@@ -32778,8 +32861,13 @@ ${fileListDescription}`;
32778
32861
  fileType: "text",
32779
32862
  icon: getFileTypeIcon(filePath, "text")
32780
32863
  }
32781
- });
32864
+ };
32782
32865
  }
32866
+ };
32867
+ for (let i = 0; i < filePaths.length; i += BATCH_SIZE) {
32868
+ const batch = filePaths.slice(i, i + BATCH_SIZE);
32869
+ const batchResults = await Promise.all(batch.map((filePath) => processFileWithTimeout(filePath)));
32870
+ results.push(...batchResults);
32783
32871
  }
32784
32872
  return results;
32785
32873
  }
@@ -70955,7 +71043,7 @@ var init_config = __esm({
70955
71043
  respectFssLinkIgnore: true
70956
71044
  };
70957
71045
  DEFAULT_FILE_FILTERING_OPTIONS = {
70958
- respectGitIgnore: true,
71046
+ respectGitIgnore: false,
70959
71047
  respectGeminiIgnore: true,
70960
71048
  respectFssLinkIgnore: true
70961
71049
  };
@@ -81593,6 +81681,7 @@ var init_databaseMigrations = __esm({
81593
81681
  last_used DATETIME,
81594
81682
  created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
81595
81683
  source TEXT DEFAULT 'db',
81684
+ endpoint_id INTEGER,
81596
81685
  UNIQUE(auth_type, model_name, endpoint_url)
81597
81686
  )
81598
81687
  `);
@@ -81606,7 +81695,7 @@ var init_databaseMigrations = __esm({
81606
81695
  db.exec(`
81607
81696
  CREATE TABLE IF NOT EXISTS custom_endpoints (
81608
81697
  id INTEGER PRIMARY KEY AUTOINCREMENT,
81609
- provider_id INTEGER NOT NULL,
81698
+ provider_id INTEGER,
81610
81699
  name TEXT NOT NULL,
81611
81700
  url TEXT NOT NULL,
81612
81701
  description TEXT,
@@ -81657,8 +81746,17 @@ var init_databaseMigrations = __esm({
81657
81746
  ON provider_settings(provider_id, setting_key)
81658
81747
  `);
81659
81748
  db.exec(`
81660
- CREATE INDEX IF NOT EXISTS idx_provider_usage_stats_aggregation
81749
+ CREATE INDEX IF NOT EXISTS idx_provider_usage_stats_aggregation
81661
81750
  ON provider_usage_stats(provider_id, created_at DESC)
81751
+ `);
81752
+ db.exec(`
81753
+ CREATE INDEX IF NOT EXISTS idx_model_configs_endpoint
81754
+ ON model_configs(endpoint_id)
81755
+ WHERE endpoint_id IS NOT NULL
81756
+ `);
81757
+ db.exec(`
81758
+ CREATE INDEX IF NOT EXISTS idx_custom_endpoints_url
81759
+ ON custom_endpoints(url)
81662
81760
  `);
81663
81761
  const now = (/* @__PURE__ */ new Date()).toISOString();
81664
81762
  db.exec(`
@@ -81744,7 +81842,9 @@ var init_databaseMigrations = __esm({
81744
81842
  const currentVersion = this.getCurrentVersion(db);
81745
81843
  const latestVersion = this.getLatestVersion();
81746
81844
  if (currentVersion >= latestVersion) {
81747
- console.log(`Database is up to date (version ${currentVersion})`);
81845
+ if (process.env["FSS_DEBUG"] === "true") {
81846
+ console.log(`Database is up to date (version ${currentVersion})`);
81847
+ }
81748
81848
  return;
81749
81849
  }
81750
81850
  console.log(`Migrating database from version ${currentVersion} to ${latestVersion}`);
@@ -82448,7 +82548,9 @@ var init_core_database = __esm({
82448
82548
  ]);
82449
82549
  insertStmt.free();
82450
82550
  }
82451
- console.log(`Created ${defaultConfigs.length} default model configurations`);
82551
+ if (process.env["FSS_DEBUG"] === "true") {
82552
+ console.log(`Created ${defaultConfigs.length} default model configurations`);
82553
+ }
82452
82554
  }
82453
82555
  /**
82454
82556
  * Get current database schema version
@@ -82934,7 +83036,7 @@ var DEBUG_DB, DatabaseError, dbQueue;
82934
83036
  var init_database_utils = __esm({
82935
83037
  "packages/cli/src/config/database-utils.ts"() {
82936
83038
  init_database_queue();
82937
- DEBUG_DB = !process.env["VITEST"];
83039
+ DEBUG_DB = process.env["FSS_DEBUG"] === "true" || process.env["NODE_ENV"] === "development" || process.env["FSS_DB_DEBUG"] === "true";
82938
83040
  DatabaseError = class extends Error {
82939
83041
  constructor(message, cause) {
82940
83042
  super(message);
@@ -83342,9 +83444,15 @@ var init_provider_database = __esm({
83342
83444
  throw new Error("Database not initialized");
83343
83445
  }
83344
83446
  if (isDefault) {
83345
- await safeExecWithLocking(this.db, `
83346
- UPDATE custom_endpoints SET is_default = 0 WHERE provider_id = ?
83347
- `, [providerId]);
83447
+ if (providerId !== null) {
83448
+ await safeExecWithLocking(this.db, `
83449
+ UPDATE custom_endpoints SET is_default = 0 WHERE provider_id = ?
83450
+ `, [providerId]);
83451
+ } else {
83452
+ await safeExecWithLocking(this.db, `
83453
+ UPDATE custom_endpoints SET is_default = 0
83454
+ `);
83455
+ }
83348
83456
  }
83349
83457
  await safeExecWithLocking(this.db, `
83350
83458
  INSERT INTO custom_endpoints (provider_id, name, url, description, is_default, created_at)
@@ -83427,6 +83535,71 @@ var init_provider_database = __esm({
83427
83535
  ]);
83428
83536
  return { settings, endpoints, defaultEndpoint };
83429
83537
  }
83538
+ /**
83539
+ * Get all custom endpoints (not filtered by provider)
83540
+ */
83541
+ async getAllCustomEndpoints() {
83542
+ if (!this.db) return [];
83543
+ return await safeQueryWithLocking(this.db, `
83544
+ SELECT id, provider_id, name, url, description, is_default, created_at
83545
+ FROM custom_endpoints
83546
+ ORDER BY created_at DESC
83547
+ `);
83548
+ }
83549
+ /**
83550
+ * Link a model to a custom endpoint
83551
+ */
83552
+ async linkModelToEndpoint(modelId, endpointId) {
83553
+ if (!this.db) {
83554
+ throw new Error("Database not initialized");
83555
+ }
83556
+ await safeExecWithLocking(this.db, `
83557
+ UPDATE model_configs SET endpoint_id = ? WHERE id = ?
83558
+ `, [endpointId, modelId]);
83559
+ }
83560
+ /**
83561
+ * Get the custom endpoint for a model (if any)
83562
+ */
83563
+ async getEndpointForModel(modelId) {
83564
+ if (!this.db) return null;
83565
+ const model = await safeQueryFirstWithLocking(
83566
+ this.db,
83567
+ `SELECT endpoint_id FROM model_configs WHERE id = ?`,
83568
+ [modelId]
83569
+ );
83570
+ if (!model || !model.endpoint_id) {
83571
+ return null;
83572
+ }
83573
+ return await safeQueryFirstWithLocking(
83574
+ this.db,
83575
+ `SELECT * FROM custom_endpoints WHERE id = ?`,
83576
+ [model.endpoint_id]
83577
+ );
83578
+ }
83579
+ /**
83580
+ * Get or create a custom endpoint by URL
83581
+ */
83582
+ async getOrCreateEndpointByUrl(url2, name2, description) {
83583
+ if (!this.db) {
83584
+ throw new Error("Database not initialized");
83585
+ }
83586
+ const existing = await safeQueryFirstWithLocking(
83587
+ this.db,
83588
+ `SELECT id FROM custom_endpoints WHERE url = ?`,
83589
+ [url2]
83590
+ );
83591
+ if (existing) {
83592
+ return existing.id;
83593
+ }
83594
+ const endpointName = name2 || `Endpoint (${url2.substring(0, 50)})`;
83595
+ return await this.saveCustomEndpoint(
83596
+ null,
83597
+ endpointName,
83598
+ url2,
83599
+ description,
83600
+ false
83601
+ );
83602
+ }
83430
83603
  };
83431
83604
  }
83432
83605
  });
@@ -83936,6 +84109,34 @@ var init_unified_database = __esm({
83936
84109
  await this.ensureInitialized();
83937
84110
  return await this.providerDb.getProviderConfiguration(providerId);
83938
84111
  }
84112
+ /**
84113
+ * Get all custom endpoints (no provider filter)
84114
+ */
84115
+ async getAllCustomEndpoints() {
84116
+ await this.ensureInitialized();
84117
+ return await this.providerDb.getAllCustomEndpoints();
84118
+ }
84119
+ /**
84120
+ * Link model to custom endpoint
84121
+ */
84122
+ async linkModelToEndpoint(modelId, endpointId) {
84123
+ await this.ensureInitialized();
84124
+ await this.providerDb.linkModelToEndpoint(modelId, endpointId);
84125
+ }
84126
+ /**
84127
+ * Get custom endpoint for a model
84128
+ */
84129
+ async getEndpointForModel(modelId) {
84130
+ await this.ensureInitialized();
84131
+ return await this.providerDb.getEndpointForModel(modelId);
84132
+ }
84133
+ /**
84134
+ * Get or create custom endpoint by URL
84135
+ */
84136
+ async getOrCreateEndpointByUrl(url2, name2, description) {
84137
+ await this.ensureInitialized();
84138
+ return await this.providerDb.getOrCreateEndpointByUrl(url2, name2, description);
84139
+ }
83939
84140
  // ==================== PREFERENCES DATABASE DELEGATION ====================
83940
84141
  /**
83941
84142
  * Set user preference
@@ -84423,6 +84624,18 @@ var init_database = __esm({
84423
84624
  async getProviderConfiguration(providerId) {
84424
84625
  return await this.unifiedDb.getProviderConfiguration(providerId);
84425
84626
  }
84627
+ async getAllCustomEndpoints() {
84628
+ return await this.unifiedDb.getAllCustomEndpoints();
84629
+ }
84630
+ async linkModelToEndpoint(modelId, endpointId) {
84631
+ await this.unifiedDb.linkModelToEndpoint(modelId, endpointId);
84632
+ }
84633
+ async getEndpointForModel(modelId) {
84634
+ return await this.unifiedDb.getEndpointForModel(modelId);
84635
+ }
84636
+ async getOrCreateEndpointByUrl(url2, name2, description) {
84637
+ return await this.unifiedDb.getOrCreateEndpointByUrl(url2, name2, description);
84638
+ }
84426
84639
  // ==================== USER PREFERENCES DELEGATION ====================
84427
84640
  async setUserPreference(key, value) {
84428
84641
  await this.unifiedDb.setUserPreference(key, value);
@@ -87863,12 +88076,12 @@ import React28 from "react";
87863
88076
  import { render as render2 } from "ink";
87864
88077
 
87865
88078
  // packages/cli/src/ui/App.tsx
87866
- import { useCallback as useCallback28, useEffect as useEffect40, useMemo as useMemo9, useState as useState43, useRef as useRef12 } from "react";
88079
+ import { useCallback as useCallback28, useEffect as useEffect41, useMemo as useMemo9, useState as useState44, useRef as useRef12 } from "react";
87867
88080
  import {
87868
- Box as Box55,
88081
+ Box as Box56,
87869
88082
  measureElement,
87870
88083
  Static,
87871
- Text as Text59,
88084
+ Text as Text60,
87872
88085
  useStdin as useStdin3,
87873
88086
  useStdout as useStdout2
87874
88087
  } from "ink";
@@ -93928,7 +94141,7 @@ async function getPackageJson() {
93928
94141
  // packages/cli/src/utils/version.ts
93929
94142
  async function getCliVersion() {
93930
94143
  const pkgJson = await getPackageJson();
93931
- return "1.1.2";
94144
+ return "1.1.4";
93932
94145
  }
93933
94146
 
93934
94147
  // packages/cli/src/ui/commands/aboutCommand.ts
@@ -93980,7 +94193,7 @@ import open4 from "open";
93980
94193
  import process11 from "node:process";
93981
94194
 
93982
94195
  // packages/cli/src/generated/git-commit.ts
93983
- var GIT_COMMIT_INFO = "5495c6a2";
94196
+ var GIT_COMMIT_INFO = "a15d9a12";
93984
94197
 
93985
94198
  // packages/cli/src/ui/commands/bugCommand.ts
93986
94199
  init_dist2();
@@ -117761,8 +117974,8 @@ def fibonacci(n):
117761
117974
 
117762
117975
  // packages/cli/src/ui/components/AuthDialog.tsx
117763
117976
  init_dist2();
117764
- import { Box as Box19, Text as Text26 } from "ink";
117765
- import { useState as useState32 } from "react";
117977
+ import { Box as Box20, Text as Text27 } from "ink";
117978
+ import { useState as useState33 } from "react";
117766
117979
 
117767
117980
  // packages/cli/src/config/auth.ts
117768
117981
  init_dist2();
@@ -117839,10 +118052,11 @@ import { Box as Box16, Text as Text23, useInput } from "ink";
117839
118052
  import { jsx as jsx21, jsxs as jsxs19 } from "react/jsx-runtime";
117840
118053
  function OpenAIKeyPrompt({
117841
118054
  onSubmit,
117842
- onCancel
118055
+ onCancel,
118056
+ prefilledEndpointUrl
117843
118057
  }) {
117844
118058
  const [apiKey, setApiKey] = useState29("");
117845
- const [baseUrl, setBaseUrl] = useState29("");
118059
+ const [baseUrl, setBaseUrl] = useState29(prefilledEndpointUrl || "");
117846
118060
  const [model, setModel] = useState29("");
117847
118061
  const [currentField, setCurrentField] = useState29("apiKey");
117848
118062
  useInput((input, key) => {
@@ -118255,7 +118469,91 @@ function LMStudioModelPrompt({
118255
118469
 
118256
118470
  // packages/cli/src/ui/components/AuthDialog.tsx
118257
118471
  init_modelManager();
118472
+
118473
+ // packages/cli/src/ui/components/OpenAIEndpointDialog.tsx
118474
+ import { useState as useState32, useEffect as useEffect32 } from "react";
118475
+ import { Box as Box19, Text as Text26 } from "ink";
118476
+ init_database();
118258
118477
  import { jsx as jsx24, jsxs as jsxs22 } from "react/jsx-runtime";
118478
+ var COMMON_ENDPOINTS = [
118479
+ {
118480
+ name: "OpenAI Official",
118481
+ url: "https://api.openai.com/v1",
118482
+ description: "Official OpenAI API endpoint",
118483
+ isDefault: true
118484
+ },
118485
+ {
118486
+ name: "Azure OpenAI",
118487
+ url: "https://your-resource.openai.azure.com",
118488
+ description: "Azure OpenAI Service endpoint",
118489
+ isDefault: false
118490
+ },
118491
+ {
118492
+ name: "Custom Local",
118493
+ url: "http://localhost:8000/v1",
118494
+ description: "Local OpenAI-compatible server",
118495
+ isDefault: false
118496
+ }
118497
+ ];
118498
+ function OpenAIEndpointDialog({
118499
+ onSelect,
118500
+ onCancel
118501
+ }) {
118502
+ const [savedEndpoints, setSavedEndpoints] = useState32([]);
118503
+ const [isLoading, setIsLoading] = useState32(true);
118504
+ useEffect32(() => {
118505
+ const loadEndpoints = async () => {
118506
+ try {
118507
+ const db = await getFSSLinkDatabase();
118508
+ const saved = await db.getAllCustomEndpoints();
118509
+ setSavedEndpoints(saved.map((e2) => ({
118510
+ id: e2.id,
118511
+ name: e2.name,
118512
+ url: e2.url,
118513
+ description: e2.description || void 0,
118514
+ isDefault: Boolean(e2.is_default)
118515
+ })));
118516
+ } catch (error) {
118517
+ console.error("Failed to load endpoints:", error);
118518
+ } finally {
118519
+ setIsLoading(false);
118520
+ }
118521
+ };
118522
+ loadEndpoints();
118523
+ }, []);
118524
+ const allEndpoints = [...savedEndpoints, ...COMMON_ENDPOINTS];
118525
+ const handleSelect = (endpoint) => {
118526
+ onSelect(endpoint);
118527
+ };
118528
+ useKeypress((key) => {
118529
+ if (key.name === "escape") {
118530
+ onCancel();
118531
+ }
118532
+ }, { isActive: true });
118533
+ if (isLoading) {
118534
+ return /* @__PURE__ */ jsx24(Box19, { flexDirection: "column", padding: 1, children: /* @__PURE__ */ jsx24(Text26, { children: "Loading endpoints..." }) });
118535
+ }
118536
+ return /* @__PURE__ */ jsxs22(Box19, { flexDirection: "column", padding: 1, children: [
118537
+ /* @__PURE__ */ jsx24(Text26, { bold: true, color: Colors.AccentBlue, children: "Select OpenAI Endpoint" }),
118538
+ /* @__PURE__ */ jsx24(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx24(Text26, { children: "Choose an OpenAI API endpoint:" }) }),
118539
+ /* @__PURE__ */ jsx24(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx24(
118540
+ RadioButtonSelect,
118541
+ {
118542
+ items: allEndpoints.map((e2) => ({
118543
+ label: e2.name,
118544
+ value: e2
118545
+ })),
118546
+ initialIndex: 0,
118547
+ onSelect: handleSelect
118548
+ }
118549
+ ) }),
118550
+ /* @__PURE__ */ jsx24(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx24(Text26, { color: Colors.Gray, children: "(Press Escape to cancel)" }) })
118551
+ ] });
118552
+ }
118553
+
118554
+ // packages/cli/src/ui/components/AuthDialog.tsx
118555
+ init_database();
118556
+ import { jsx as jsx25, jsxs as jsxs23 } from "react/jsx-runtime";
118259
118557
  function parseDefaultAuthType(defaultAuthType) {
118260
118558
  if (defaultAuthType && Object.values(AuthType).includes(defaultAuthType)) {
118261
118559
  return defaultAuthType;
@@ -118267,12 +118565,14 @@ function AuthDialog({
118267
118565
  settings,
118268
118566
  initialErrorMessage
118269
118567
  }) {
118270
- const [errorMessage, setErrorMessage] = useState32(
118568
+ const [errorMessage, setErrorMessage] = useState33(
118271
118569
  initialErrorMessage || null
118272
118570
  );
118273
- const [showOpenAIKeyPrompt, setShowOpenAIKeyPrompt] = useState32(false);
118274
- const [showOllamaModelPrompt, setShowOllamaModelPrompt] = useState32(false);
118275
- const [showLMStudioModelPrompt, setShowLMStudioModelPrompt] = useState32(false);
118571
+ const [showOpenAIKeyPrompt, setShowOpenAIKeyPrompt] = useState33(false);
118572
+ const [showOllamaModelPrompt, setShowOllamaModelPrompt] = useState33(false);
118573
+ const [showLMStudioModelPrompt, setShowLMStudioModelPrompt] = useState33(false);
118574
+ const [showOpenAIEndpointDialog, setShowOpenAIEndpointDialog] = useState33(false);
118575
+ const [selectedEndpoint, setSelectedEndpoint] = useState33(null);
118276
118576
  const items = [
118277
118577
  { label: "FSS Link OAuth", value: AuthType.QWEN_OAUTH },
118278
118578
  { label: "OpenAI", value: AuthType.USE_OPENAI },
@@ -118301,7 +118601,7 @@ function AuthDialog({
118301
118601
  const error = validateAuthMethod(authMethod);
118302
118602
  if (error) {
118303
118603
  if (authMethod === AuthType.USE_OPENAI && !process.env["OPENAI_API_KEY"]) {
118304
- setShowOpenAIKeyPrompt(true);
118604
+ setShowOpenAIEndpointDialog(true);
118305
118605
  setErrorMessage(null);
118306
118606
  } else {
118307
118607
  setErrorMessage(error);
@@ -118317,18 +118617,22 @@ function AuthDialog({
118317
118617
  onSelect(authMethod, "User" /* User */);
118318
118618
  }
118319
118619
  };
118320
- const handleOpenAIKeySubmit = (apiKey, baseUrl, model) => {
118620
+ const handleOpenAIKeySubmit = async (apiKey, baseUrl, model) => {
118321
118621
  setOpenAIApiKey(apiKey);
118322
118622
  setOpenAIBaseUrl(baseUrl);
118323
118623
  setOpenAIModel(model);
118324
118624
  const modelManager = getModelManager();
118325
- modelManager.configureModel(
118625
+ const modelId = await modelManager.configureModel(
118326
118626
  AuthType.USE_OPENAI,
118327
118627
  model,
118328
118628
  baseUrl,
118329
118629
  apiKey,
118330
118630
  `OpenAI: ${model}`
118331
118631
  );
118632
+ if (selectedEndpoint && selectedEndpoint.id && modelId) {
118633
+ const db = await getFSSLinkDatabase();
118634
+ await db.linkModelToEndpoint(modelId, selectedEndpoint.id);
118635
+ }
118332
118636
  setShowOpenAIKeyPrompt(false);
118333
118637
  onSelect(AuthType.USE_OPENAI, "User" /* User */);
118334
118638
  };
@@ -118374,6 +118678,16 @@ function AuthDialog({
118374
118678
  setShowLMStudioModelPrompt(false);
118375
118679
  setErrorMessage(null);
118376
118680
  };
118681
+ const handleEndpointSelect = (endpoint) => {
118682
+ setSelectedEndpoint(endpoint);
118683
+ setShowOpenAIEndpointDialog(false);
118684
+ setShowOpenAIKeyPrompt(true);
118685
+ };
118686
+ const handleEndpointCancel = () => {
118687
+ setShowOpenAIEndpointDialog(false);
118688
+ setSelectedEndpoint(null);
118689
+ setErrorMessage("OpenAI endpoint selection is required.");
118690
+ };
118377
118691
  useKeypress(
118378
118692
  (key) => {
118379
118693
  if (showOpenAIKeyPrompt || showOllamaModelPrompt || showLMStudioModelPrompt) {
@@ -118394,17 +118708,27 @@ function AuthDialog({
118394
118708
  },
118395
118709
  { isActive: true }
118396
118710
  );
118711
+ if (showOpenAIEndpointDialog) {
118712
+ return /* @__PURE__ */ jsx25(
118713
+ OpenAIEndpointDialog,
118714
+ {
118715
+ onSelect: handleEndpointSelect,
118716
+ onCancel: handleEndpointCancel
118717
+ }
118718
+ );
118719
+ }
118397
118720
  if (showOpenAIKeyPrompt) {
118398
- return /* @__PURE__ */ jsx24(
118721
+ return /* @__PURE__ */ jsx25(
118399
118722
  OpenAIKeyPrompt,
118400
118723
  {
118401
118724
  onSubmit: handleOpenAIKeySubmit,
118402
- onCancel: handleOpenAIKeyCancel
118725
+ onCancel: handleOpenAIKeyCancel,
118726
+ prefilledEndpointUrl: selectedEndpoint?.url
118403
118727
  }
118404
118728
  );
118405
118729
  }
118406
118730
  if (showOllamaModelPrompt) {
118407
- return /* @__PURE__ */ jsx24(
118731
+ return /* @__PURE__ */ jsx25(
118408
118732
  OllamaModelPrompt,
118409
118733
  {
118410
118734
  onSubmit: handleOllamaModelSubmit,
@@ -118413,7 +118737,7 @@ function AuthDialog({
118413
118737
  );
118414
118738
  }
118415
118739
  if (showLMStudioModelPrompt) {
118416
- return /* @__PURE__ */ jsx24(
118740
+ return /* @__PURE__ */ jsx25(
118417
118741
  LMStudioModelPrompt,
118418
118742
  {
118419
118743
  onSubmit: handleLMStudioModelSubmit,
@@ -118421,8 +118745,8 @@ function AuthDialog({
118421
118745
  }
118422
118746
  );
118423
118747
  }
118424
- return /* @__PURE__ */ jsxs22(
118425
- Box19,
118748
+ return /* @__PURE__ */ jsxs23(
118749
+ Box20,
118426
118750
  {
118427
118751
  borderStyle: "round",
118428
118752
  borderColor: Colors.Gray,
@@ -118430,9 +118754,9 @@ function AuthDialog({
118430
118754
  padding: 1,
118431
118755
  width: "100%",
118432
118756
  children: [
118433
- /* @__PURE__ */ jsx24(Text26, { bold: true, children: "Get started" }),
118434
- /* @__PURE__ */ jsx24(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx24(Text26, { children: "How would you like to authenticate for this project?" }) }),
118435
- /* @__PURE__ */ jsx24(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx24(
118757
+ /* @__PURE__ */ jsx25(Text27, { bold: true, children: "Get started" }),
118758
+ /* @__PURE__ */ jsx25(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text27, { children: "How would you like to authenticate for this project?" }) }),
118759
+ /* @__PURE__ */ jsx25(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx25(
118436
118760
  RadioButtonSelect,
118437
118761
  {
118438
118762
  items,
@@ -118440,18 +118764,18 @@ function AuthDialog({
118440
118764
  onSelect: handleAuthSelect
118441
118765
  }
118442
118766
  ) }),
118443
- errorMessage && /* @__PURE__ */ jsx24(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx24(Text26, { color: Colors.AccentRed, children: errorMessage }) }),
118444
- /* @__PURE__ */ jsx24(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx24(Text26, { color: Colors.AccentPurple, children: "(Use Enter to Set Auth)" }) }),
118445
- /* @__PURE__ */ jsx24(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx24(Text26, { children: "Terms of Services and Privacy Notice for FSS Link" }) }),
118446
- /* @__PURE__ */ jsx24(Box19, { marginTop: 1, children: /* @__PURE__ */ jsx24(Text26, { color: Colors.AccentBlue, children: "https://github.com/FSSCoding/fss-link/blob/main/README.md" }) })
118767
+ errorMessage && /* @__PURE__ */ jsx25(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text27, { color: Colors.AccentRed, children: errorMessage }) }),
118768
+ /* @__PURE__ */ jsx25(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text27, { color: Colors.AccentPurple, children: "(Use Enter to Set Auth)" }) }),
118769
+ /* @__PURE__ */ jsx25(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text27, { children: "Terms of Services and Privacy Notice for FSS Link" }) }),
118770
+ /* @__PURE__ */ jsx25(Box20, { marginTop: 1, children: /* @__PURE__ */ jsx25(Text27, { color: Colors.AccentBlue, children: "https://github.com/FSSCoding/fss-link/blob/main/README.md" }) })
118447
118771
  ]
118448
118772
  }
118449
118773
  );
118450
118774
  }
118451
118775
 
118452
118776
  // packages/cli/src/ui/components/WelcomeBackDialog.tsx
118453
- import { Box as Box20, Text as Text27 } from "ink";
118454
- import { Fragment as Fragment4, jsx as jsx25, jsxs as jsxs23 } from "react/jsx-runtime";
118777
+ import { Box as Box21, Text as Text28 } from "ink";
118778
+ import { Fragment as Fragment4, jsx as jsx26, jsxs as jsxs24 } from "react/jsx-runtime";
118455
118779
  var WelcomeBackDialog = ({
118456
118780
  projectSummary,
118457
118781
  onContinue,
@@ -118550,43 +118874,43 @@ var WelcomeBackDialog = ({
118550
118874
  break;
118551
118875
  }
118552
118876
  };
118553
- return /* @__PURE__ */ jsxs23(Box20, { flexDirection: "column", padding: 1, children: [
118554
- /* @__PURE__ */ jsx25(Box20, { marginBottom: 1, children: /* @__PURE__ */ jsx25(Text27, { bold: true, color: Colors.AccentPurple, children: "Welcome Back to FSS Link" }) }),
118555
- /* @__PURE__ */ jsxs23(Box20, { flexDirection: "column", marginBottom: 2, paddingX: 1, children: [
118556
- projectSummary.projectGoal && /* @__PURE__ */ jsx25(Box20, { marginBottom: 1, children: /* @__PURE__ */ jsxs23(Text27, { color: Colors.Foreground, children: [
118557
- /* @__PURE__ */ jsx25(Text27, { bold: true, children: "Project:" }),
118877
+ return /* @__PURE__ */ jsxs24(Box21, { flexDirection: "column", padding: 1, children: [
118878
+ /* @__PURE__ */ jsx26(Box21, { marginBottom: 1, children: /* @__PURE__ */ jsx26(Text28, { bold: true, color: Colors.AccentPurple, children: "Welcome Back to FSS Link" }) }),
118879
+ /* @__PURE__ */ jsxs24(Box21, { flexDirection: "column", marginBottom: 2, paddingX: 1, children: [
118880
+ projectSummary.projectGoal && /* @__PURE__ */ jsx26(Box21, { marginBottom: 1, children: /* @__PURE__ */ jsxs24(Text28, { color: Colors.Foreground, children: [
118881
+ /* @__PURE__ */ jsx26(Text28, { bold: true, children: "Project:" }),
118558
118882
  " ",
118559
118883
  projectSummary.projectGoal
118560
118884
  ] }) }),
118561
- /* @__PURE__ */ jsxs23(Box20, { flexDirection: "row", marginBottom: 1, children: [
118562
- /* @__PURE__ */ jsx25(Text27, { color: Colors.Gray, children: "Last worked: " }),
118563
- /* @__PURE__ */ jsx25(Text27, { color: Colors.Foreground, children: projectSummary.timeAgo })
118885
+ /* @__PURE__ */ jsxs24(Box21, { flexDirection: "row", marginBottom: 1, children: [
118886
+ /* @__PURE__ */ jsx26(Text28, { color: Colors.Gray, children: "Last worked: " }),
118887
+ /* @__PURE__ */ jsx26(Text28, { color: Colors.Foreground, children: projectSummary.timeAgo })
118564
118888
  ] }),
118565
- /* @__PURE__ */ jsxs23(Box20, { flexDirection: "row", marginBottom: 1, children: [
118566
- /* @__PURE__ */ jsx25(Text27, { color: Colors.Gray, children: "Sessions: " }),
118567
- /* @__PURE__ */ jsx25(Text27, { color: Colors.Foreground, children: projectSummary.totalSessions }),
118568
- projectSummary.activeSessions > 0 && /* @__PURE__ */ jsxs23(Fragment4, { children: [
118569
- /* @__PURE__ */ jsx25(Text27, { color: Colors.Gray, children: " (" }),
118570
- /* @__PURE__ */ jsxs23(Text27, { color: Colors.AccentGreen, children: [
118889
+ /* @__PURE__ */ jsxs24(Box21, { flexDirection: "row", marginBottom: 1, children: [
118890
+ /* @__PURE__ */ jsx26(Text28, { color: Colors.Gray, children: "Sessions: " }),
118891
+ /* @__PURE__ */ jsx26(Text28, { color: Colors.Foreground, children: projectSummary.totalSessions }),
118892
+ projectSummary.activeSessions > 0 && /* @__PURE__ */ jsxs24(Fragment4, { children: [
118893
+ /* @__PURE__ */ jsx26(Text28, { color: Colors.Gray, children: " (" }),
118894
+ /* @__PURE__ */ jsxs24(Text28, { color: Colors.AccentGreen, children: [
118571
118895
  projectSummary.activeSessions,
118572
118896
  " active"
118573
118897
  ] }),
118574
- /* @__PURE__ */ jsx25(Text27, { color: Colors.Gray, children: ")" })
118898
+ /* @__PURE__ */ jsx26(Text28, { color: Colors.Gray, children: ")" })
118575
118899
  ] })
118576
118900
  ] }),
118577
- /* @__PURE__ */ jsxs23(Box20, { flexDirection: "row", marginBottom: 1, children: [
118578
- /* @__PURE__ */ jsx25(Text27, { color: Colors.Gray, children: "Momentum: " }),
118579
- /* @__PURE__ */ jsxs23(Text27, { color: getMomentumColor(projectSummary.momentum), children: [
118901
+ /* @__PURE__ */ jsxs24(Box21, { flexDirection: "row", marginBottom: 1, children: [
118902
+ /* @__PURE__ */ jsx26(Text28, { color: Colors.Gray, children: "Momentum: " }),
118903
+ /* @__PURE__ */ jsxs24(Text28, { color: getMomentumColor(projectSummary.momentum), children: [
118580
118904
  getMomentumEmoji(projectSummary.momentum),
118581
118905
  " ",
118582
118906
  projectSummary.momentum
118583
118907
  ] })
118584
118908
  ] }),
118585
- projectSummary.gitStatus && /* @__PURE__ */ jsxs23(Box20, { flexDirection: "column", marginBottom: 1, children: [
118586
- /* @__PURE__ */ jsxs23(Box20, { flexDirection: "row", marginBottom: 1, children: [
118587
- /* @__PURE__ */ jsx25(Text27, { color: Colors.Gray, children: "Branch: " }),
118588
- /* @__PURE__ */ jsx25(Text27, { color: Colors.AccentBlue, children: projectSummary.gitStatus.branch }),
118589
- (projectSummary.gitStatus.ahead || projectSummary.gitStatus.behind) && /* @__PURE__ */ jsxs23(Text27, { color: Colors.Gray, children: [
118909
+ projectSummary.gitStatus && /* @__PURE__ */ jsxs24(Box21, { flexDirection: "column", marginBottom: 1, children: [
118910
+ /* @__PURE__ */ jsxs24(Box21, { flexDirection: "row", marginBottom: 1, children: [
118911
+ /* @__PURE__ */ jsx26(Text28, { color: Colors.Gray, children: "Branch: " }),
118912
+ /* @__PURE__ */ jsx26(Text28, { color: Colors.AccentBlue, children: projectSummary.gitStatus.branch }),
118913
+ (projectSummary.gitStatus.ahead || projectSummary.gitStatus.behind) && /* @__PURE__ */ jsxs24(Text28, { color: Colors.Gray, children: [
118590
118914
  " ",
118591
118915
  "[",
118592
118916
  projectSummary.gitStatus.ahead && `\u2191${projectSummary.gitStatus.ahead}`,
@@ -118595,21 +118919,21 @@ var WelcomeBackDialog = ({
118595
118919
  "]"
118596
118920
  ] })
118597
118921
  ] }),
118598
- projectSummary.gitStatus.hasChanges && /* @__PURE__ */ jsxs23(Box20, { flexDirection: "row", marginBottom: 1, children: [
118599
- /* @__PURE__ */ jsx25(Text27, { color: Colors.Gray, children: "Changes: " }),
118600
- projectSummary.gitStatus.stagedFiles > 0 && /* @__PURE__ */ jsxs23(Text27, { color: Colors.AccentGreen, children: [
118922
+ projectSummary.gitStatus.hasChanges && /* @__PURE__ */ jsxs24(Box21, { flexDirection: "row", marginBottom: 1, children: [
118923
+ /* @__PURE__ */ jsx26(Text28, { color: Colors.Gray, children: "Changes: " }),
118924
+ projectSummary.gitStatus.stagedFiles > 0 && /* @__PURE__ */ jsxs24(Text28, { color: Colors.AccentGreen, children: [
118601
118925
  projectSummary.gitStatus.stagedFiles,
118602
118926
  " staged"
118603
118927
  ] }),
118604
- projectSummary.gitStatus.stagedFiles > 0 && projectSummary.gitStatus.unstagedFiles > 0 && /* @__PURE__ */ jsx25(Text27, { color: Colors.Gray, children: ", " }),
118605
- projectSummary.gitStatus.unstagedFiles > 0 && /* @__PURE__ */ jsxs23(Text27, { color: Colors.AccentYellow, children: [
118928
+ projectSummary.gitStatus.stagedFiles > 0 && projectSummary.gitStatus.unstagedFiles > 0 && /* @__PURE__ */ jsx26(Text28, { color: Colors.Gray, children: ", " }),
118929
+ projectSummary.gitStatus.unstagedFiles > 0 && /* @__PURE__ */ jsxs24(Text28, { color: Colors.AccentYellow, children: [
118606
118930
  projectSummary.gitStatus.unstagedFiles,
118607
118931
  " unstaged"
118608
118932
  ] })
118609
118933
  ] }),
118610
- projectSummary.gitStatus.lastCommitMessage && /* @__PURE__ */ jsxs23(Box20, { flexDirection: "row", marginBottom: 1, children: [
118611
- /* @__PURE__ */ jsx25(Text27, { color: Colors.Gray, children: "Last commit: " }),
118612
- /* @__PURE__ */ jsxs23(Text27, { color: Colors.Foreground, children: [
118934
+ projectSummary.gitStatus.lastCommitMessage && /* @__PURE__ */ jsxs24(Box21, { flexDirection: "row", marginBottom: 1, children: [
118935
+ /* @__PURE__ */ jsx26(Text28, { color: Colors.Gray, children: "Last commit: " }),
118936
+ /* @__PURE__ */ jsxs24(Text28, { color: Colors.Foreground, children: [
118613
118937
  projectSummary.gitStatus.lastCommitHash,
118614
118938
  ' "',
118615
118939
  projectSummary.gitStatus.lastCommitMessage,
@@ -118617,52 +118941,52 @@ var WelcomeBackDialog = ({
118617
118941
  ] })
118618
118942
  ] })
118619
118943
  ] }),
118620
- (projectSummary.efficiency || projectSummary.recentActivity || projectSummary.tokenEfficiency) && /* @__PURE__ */ jsxs23(Box20, { flexDirection: "column", marginBottom: 1, paddingY: 1, borderStyle: "single", borderColor: Colors.Gray, children: [
118621
- /* @__PURE__ */ jsx25(Box20, { marginBottom: 1, children: /* @__PURE__ */ jsx25(Text27, { bold: true, color: Colors.AccentPurple, children: "Quick Status" }) }),
118622
- projectSummary.efficiency && /* @__PURE__ */ jsx25(Box20, { flexDirection: "row", marginBottom: 1, children: /* @__PURE__ */ jsxs23(Text27, { color: getEfficiencyColor(projectSummary.efficiency), children: [
118944
+ (projectSummary.efficiency || projectSummary.recentActivity || projectSummary.tokenEfficiency) && /* @__PURE__ */ jsxs24(Box21, { flexDirection: "column", marginBottom: 1, paddingY: 1, borderStyle: "single", borderColor: Colors.Gray, children: [
118945
+ /* @__PURE__ */ jsx26(Box21, { marginBottom: 1, children: /* @__PURE__ */ jsx26(Text28, { bold: true, color: Colors.AccentPurple, children: "Quick Status" }) }),
118946
+ projectSummary.efficiency && /* @__PURE__ */ jsx26(Box21, { flexDirection: "row", marginBottom: 1, children: /* @__PURE__ */ jsxs24(Text28, { color: getEfficiencyColor(projectSummary.efficiency), children: [
118623
118947
  getEfficiencyEmoji(projectSummary.efficiency),
118624
118948
  " ",
118625
118949
  projectSummary.efficiency,
118626
118950
  " efficiency"
118627
118951
  ] }) }),
118628
- projectSummary.recentActivity && /* @__PURE__ */ jsx25(Box20, { marginBottom: 1, children: /* @__PURE__ */ jsx25(Text27, { color: Colors.Foreground, children: projectSummary.recentActivity }) }),
118629
- projectSummary.tokenEfficiency && /* @__PURE__ */ jsx25(Box20, { children: /* @__PURE__ */ jsx25(Text27, { color: Colors.Gray, children: projectSummary.tokenEfficiency }) })
118952
+ projectSummary.recentActivity && /* @__PURE__ */ jsx26(Box21, { marginBottom: 1, children: /* @__PURE__ */ jsx26(Text28, { color: Colors.Foreground, children: projectSummary.recentActivity }) }),
118953
+ projectSummary.tokenEfficiency && /* @__PURE__ */ jsx26(Box21, { children: /* @__PURE__ */ jsx26(Text28, { color: Colors.Gray, children: projectSummary.tokenEfficiency }) })
118630
118954
  ] }),
118631
- projectSummary.nextSuggestion && /* @__PURE__ */ jsx25(Box20, { marginBottom: 1, children: /* @__PURE__ */ jsxs23(Text27, { color: Colors.AccentPurple, children: [
118955
+ projectSummary.nextSuggestion && /* @__PURE__ */ jsx26(Box21, { marginBottom: 1, children: /* @__PURE__ */ jsxs24(Text28, { color: Colors.AccentPurple, children: [
118632
118956
  "\u{1F4A1} ",
118633
118957
  projectSummary.nextSuggestion
118634
118958
  ] }) }),
118635
- projectSummary.lastContent && /* @__PURE__ */ jsx25(Box20, { marginBottom: 1, children: /* @__PURE__ */ jsxs23(Text27, { color: Colors.Gray, children: [
118959
+ projectSummary.lastContent && /* @__PURE__ */ jsx26(Box21, { marginBottom: 1, children: /* @__PURE__ */ jsxs24(Text28, { color: Colors.Gray, children: [
118636
118960
  'Last message: "',
118637
118961
  projectSummary.lastContent,
118638
118962
  '"'
118639
118963
  ] }) })
118640
118964
  ] }),
118641
- /* @__PURE__ */ jsx25(
118965
+ /* @__PURE__ */ jsx26(
118642
118966
  RadioButtonSelect,
118643
118967
  {
118644
118968
  items,
118645
118969
  onSelect: handleSelection
118646
118970
  }
118647
118971
  ),
118648
- /* @__PURE__ */ jsx25(Box20, { marginTop: 1, paddingX: 1, children: /* @__PURE__ */ jsx25(Text27, { color: Colors.Gray, children: "Press C to continue, R to restart, Q to cancel, or use \u2191\u2193 arrows" }) })
118972
+ /* @__PURE__ */ jsx26(Box21, { marginTop: 1, paddingX: 1, children: /* @__PURE__ */ jsx26(Text28, { color: Colors.Gray, children: "Press C to continue, R to restart, Q to cancel, or use \u2191\u2193 arrows" }) })
118649
118973
  ] });
118650
118974
  };
118651
118975
 
118652
118976
  // packages/cli/src/ui/components/SearchEngineConfigDialog.tsx
118653
- import { useState as useState33, useEffect as useEffect32 } from "react";
118654
- import { Box as Box21, Text as Text28, useInput as useInput4 } from "ink";
118977
+ import { useState as useState34, useEffect as useEffect33 } from "react";
118978
+ import { Box as Box22, Text as Text29, useInput as useInput4 } from "ink";
118655
118979
  init_database();
118656
- import { jsx as jsx26, jsxs as jsxs24 } from "react/jsx-runtime";
118980
+ import { jsx as jsx27, jsxs as jsxs25 } from "react/jsx-runtime";
118657
118981
  function SearchEngineConfigDialog({
118658
118982
  onSubmit,
118659
118983
  onCancel
118660
118984
  }) {
118661
- const [braveApiKey, setBraveApiKey] = useState33("");
118662
- const [tavilyApiKey, setTavilyApiKey] = useState33("");
118663
- const [currentField, setCurrentField] = useState33("braveApiKey");
118664
- const [isLoading, setIsLoading] = useState33(true);
118665
- useEffect32(() => {
118985
+ const [braveApiKey, setBraveApiKey] = useState34("");
118986
+ const [tavilyApiKey, setTavilyApiKey] = useState34("");
118987
+ const [currentField, setCurrentField] = useState34("braveApiKey");
118988
+ const [isLoading, setIsLoading] = useState34(true);
118989
+ useEffect33(() => {
118666
118990
  const loadConfig = async () => {
118667
118991
  console.log("[WEBSCRAPER-DEBUG] Loading existing API keys from database...");
118668
118992
  const db = await getFSSLinkDatabase();
@@ -118790,20 +119114,20 @@ function SearchEngineConfigDialog({
118790
119114
  }
118791
119115
  });
118792
119116
  if (isLoading) {
118793
- return /* @__PURE__ */ jsx26(
118794
- Box21,
119117
+ return /* @__PURE__ */ jsx27(
119118
+ Box22,
118795
119119
  {
118796
119120
  borderStyle: "round",
118797
119121
  borderColor: Colors.AccentBlue,
118798
119122
  flexDirection: "column",
118799
119123
  padding: 1,
118800
119124
  width: "100%",
118801
- children: /* @__PURE__ */ jsx26(Text28, { children: "Loading search engine configuration..." })
119125
+ children: /* @__PURE__ */ jsx27(Text29, { children: "Loading search engine configuration..." })
118802
119126
  }
118803
119127
  );
118804
119128
  }
118805
- return /* @__PURE__ */ jsxs24(
118806
- Box21,
119129
+ return /* @__PURE__ */ jsxs25(
119130
+ Box22,
118807
119131
  {
118808
119132
  borderStyle: "round",
118809
119133
  borderColor: Colors.AccentPurple,
@@ -118811,73 +119135,73 @@ function SearchEngineConfigDialog({
118811
119135
  padding: 1,
118812
119136
  width: "100%",
118813
119137
  children: [
118814
- /* @__PURE__ */ jsx26(Text28, { bold: true, color: Colors.AccentPurple, children: "Search Engine Configuration" }),
118815
- /* @__PURE__ */ jsx26(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx26(Text28, { children: "Configure search engine APIs for web research. You need at least one API key." }) }),
118816
- /* @__PURE__ */ jsx26(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx26(Text28, { bold: true, color: Colors.AccentBlue, children: "Brave Search (General Web Search)" }) }),
118817
- /* @__PURE__ */ jsx26(Box21, { marginTop: 1, children: /* @__PURE__ */ jsxs24(Text28, { color: Colors.Gray, children: [
119138
+ /* @__PURE__ */ jsx27(Text29, { bold: true, color: Colors.AccentPurple, children: "Search Engine Configuration" }),
119139
+ /* @__PURE__ */ jsx27(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx27(Text29, { children: "Configure search engine APIs for web research. You need at least one API key." }) }),
119140
+ /* @__PURE__ */ jsx27(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx27(Text29, { bold: true, color: Colors.AccentBlue, children: "Brave Search (General Web Search)" }) }),
119141
+ /* @__PURE__ */ jsx27(Box22, { marginTop: 1, children: /* @__PURE__ */ jsxs25(Text29, { color: Colors.Gray, children: [
118818
119142
  "Get API key: ",
118819
- /* @__PURE__ */ jsx26(Text28, { color: Colors.AccentBlue, children: "https://api.search.brave.com/" })
119143
+ /* @__PURE__ */ jsx27(Text29, { color: Colors.AccentBlue, children: "https://api.search.brave.com/" })
118820
119144
  ] }) }),
118821
- /* @__PURE__ */ jsxs24(Box21, { marginTop: 1, flexDirection: "row", children: [
118822
- /* @__PURE__ */ jsx26(Box21, { width: 14, children: /* @__PURE__ */ jsx26(
118823
- Text28,
119145
+ /* @__PURE__ */ jsxs25(Box22, { marginTop: 1, flexDirection: "row", children: [
119146
+ /* @__PURE__ */ jsx27(Box22, { width: 14, children: /* @__PURE__ */ jsx27(
119147
+ Text29,
118824
119148
  {
118825
119149
  color: currentField === "braveApiKey" ? Colors.AccentPurple : Colors.Gray,
118826
119150
  children: "Brave API Key:"
118827
119151
  }
118828
119152
  ) }),
118829
- /* @__PURE__ */ jsx26(Box21, { flexGrow: 1, children: /* @__PURE__ */ jsxs24(Text28, { children: [
119153
+ /* @__PURE__ */ jsx27(Box22, { flexGrow: 1, children: /* @__PURE__ */ jsxs25(Text29, { children: [
118830
119154
  currentField === "braveApiKey" ? "> " : " ",
118831
119155
  braveApiKey ? "\u2022".repeat(Math.min(braveApiKey.length, 20)) + (braveApiKey.length > 20 ? "..." : "") : "optional"
118832
119156
  ] }) })
118833
119157
  ] }),
118834
- /* @__PURE__ */ jsx26(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx26(Text28, { bold: true, color: Colors.AccentBlue, children: "Tavily Search (Research Focus)" }) }),
118835
- /* @__PURE__ */ jsx26(Box21, { marginTop: 1, children: /* @__PURE__ */ jsxs24(Text28, { color: Colors.Gray, children: [
119158
+ /* @__PURE__ */ jsx27(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx27(Text29, { bold: true, color: Colors.AccentBlue, children: "Tavily Search (Research Focus)" }) }),
119159
+ /* @__PURE__ */ jsx27(Box22, { marginTop: 1, children: /* @__PURE__ */ jsxs25(Text29, { color: Colors.Gray, children: [
118836
119160
  "Get API key: ",
118837
- /* @__PURE__ */ jsx26(Text28, { color: Colors.AccentBlue, children: "https://tavily.com/" })
119161
+ /* @__PURE__ */ jsx27(Text29, { color: Colors.AccentBlue, children: "https://tavily.com/" })
118838
119162
  ] }) }),
118839
- /* @__PURE__ */ jsxs24(Box21, { marginTop: 1, flexDirection: "row", children: [
118840
- /* @__PURE__ */ jsx26(Box21, { width: 14, children: /* @__PURE__ */ jsx26(
118841
- Text28,
119163
+ /* @__PURE__ */ jsxs25(Box22, { marginTop: 1, flexDirection: "row", children: [
119164
+ /* @__PURE__ */ jsx27(Box22, { width: 14, children: /* @__PURE__ */ jsx27(
119165
+ Text29,
118842
119166
  {
118843
119167
  color: currentField === "tavilyApiKey" ? Colors.AccentPurple : Colors.Gray,
118844
119168
  children: "Tavily API Key:"
118845
119169
  }
118846
119170
  ) }),
118847
- /* @__PURE__ */ jsx26(Box21, { flexGrow: 1, children: /* @__PURE__ */ jsxs24(Text28, { children: [
119171
+ /* @__PURE__ */ jsx27(Box22, { flexGrow: 1, children: /* @__PURE__ */ jsxs25(Text29, { children: [
118848
119172
  currentField === "tavilyApiKey" ? "> " : " ",
118849
119173
  tavilyApiKey ? "\u2022".repeat(Math.min(tavilyApiKey.length, 20)) + (tavilyApiKey.length > 20 ? "..." : "") : "optional"
118850
119174
  ] }) })
118851
119175
  ] }),
118852
- /* @__PURE__ */ jsxs24(Box21, { marginTop: 1, flexDirection: "row", children: [
118853
- /* @__PURE__ */ jsx26(Box21, { width: 14, children: /* @__PURE__ */ jsx26(
118854
- Text28,
119176
+ /* @__PURE__ */ jsxs25(Box22, { marginTop: 1, flexDirection: "row", children: [
119177
+ /* @__PURE__ */ jsx27(Box22, { width: 14, children: /* @__PURE__ */ jsx27(
119178
+ Text29,
118855
119179
  {
118856
119180
  color: currentField === "submit" ? Colors.AccentGreen : Colors.Gray,
118857
119181
  children: "Ready:"
118858
119182
  }
118859
119183
  ) }),
118860
- /* @__PURE__ */ jsx26(Box21, { flexGrow: 1, children: /* @__PURE__ */ jsxs24(Text28, { color: currentField === "submit" ? Colors.AccentGreen : Colors.Gray, children: [
119184
+ /* @__PURE__ */ jsx27(Box22, { flexGrow: 1, children: /* @__PURE__ */ jsxs25(Text29, { color: currentField === "submit" ? Colors.AccentGreen : Colors.Gray, children: [
118861
119185
  currentField === "submit" ? "> " : " ",
118862
119186
  "Save & Continue"
118863
119187
  ] }) })
118864
119188
  ] }),
118865
- /* @__PURE__ */ jsx26(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx26(Text28, { color: Colors.Gray, children: "Press Enter to continue, Tab/\u2191\u2193 to navigate, Esc to cancel" }) }),
118866
- !braveApiKey && !tavilyApiKey && /* @__PURE__ */ jsx26(Box21, { marginTop: 1, children: /* @__PURE__ */ jsx26(Text28, { color: Colors.AccentYellow, children: "\u26A0\uFE0F At least one API key is required for search functionality" }) })
119189
+ /* @__PURE__ */ jsx27(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx27(Text29, { color: Colors.Gray, children: "Press Enter to continue, Tab/\u2191\u2193 to navigate, Esc to cancel" }) }),
119190
+ !braveApiKey && !tavilyApiKey && /* @__PURE__ */ jsx27(Box22, { marginTop: 1, children: /* @__PURE__ */ jsx27(Text29, { color: Colors.AccentYellow, children: "\u26A0\uFE0F At least one API key is required for search functionality" }) })
118867
119191
  ]
118868
119192
  }
118869
119193
  );
118870
119194
  }
118871
119195
 
118872
119196
  // packages/cli/src/ui/components/AuthInProgress.tsx
118873
- import { useState as useState34, useEffect as useEffect33 } from "react";
118874
- import { Box as Box22, Text as Text29 } from "ink";
119197
+ import { useState as useState35, useEffect as useEffect34 } from "react";
119198
+ import { Box as Box23, Text as Text30 } from "ink";
118875
119199
  import Spinner2 from "ink-spinner";
118876
- import { jsx as jsx27, jsxs as jsxs25 } from "react/jsx-runtime";
119200
+ import { jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
118877
119201
  function AuthInProgress({
118878
119202
  onTimeout
118879
119203
  }) {
118880
- const [timedOut, setTimedOut] = useState34(false);
119204
+ const [timedOut, setTimedOut] = useState35(false);
118881
119205
  useKeypress(
118882
119206
  (key) => {
118883
119207
  if (key.name === "escape" || key.ctrl && key.name === "c") {
@@ -118886,23 +119210,23 @@ function AuthInProgress({
118886
119210
  },
118887
119211
  { isActive: true }
118888
119212
  );
118889
- useEffect33(() => {
119213
+ useEffect34(() => {
118890
119214
  const timer = setTimeout(() => {
118891
119215
  setTimedOut(true);
118892
119216
  onTimeout();
118893
119217
  }, 18e4);
118894
119218
  return () => clearTimeout(timer);
118895
119219
  }, [onTimeout]);
118896
- return /* @__PURE__ */ jsx27(
118897
- Box22,
119220
+ return /* @__PURE__ */ jsx28(
119221
+ Box23,
118898
119222
  {
118899
119223
  borderStyle: "round",
118900
119224
  borderColor: Colors.Gray,
118901
119225
  flexDirection: "column",
118902
119226
  padding: 1,
118903
119227
  width: "100%",
118904
- children: timedOut ? /* @__PURE__ */ jsx27(Text29, { color: Colors.AccentRed, children: "Authentication timed out. Please try again." }) : /* @__PURE__ */ jsx27(Box22, { children: /* @__PURE__ */ jsxs25(Text29, { children: [
118905
- /* @__PURE__ */ jsx27(Spinner2, { type: "dots" }),
119228
+ children: timedOut ? /* @__PURE__ */ jsx28(Text30, { color: Colors.AccentRed, children: "Authentication timed out. Please try again." }) : /* @__PURE__ */ jsx28(Box23, { children: /* @__PURE__ */ jsxs26(Text30, { children: [
119229
+ /* @__PURE__ */ jsx28(Spinner2, { type: "dots" }),
118906
119230
  " Waiting for auth... (Press ESC or CTRL+C to cancel)"
118907
119231
  ] }) })
118908
119232
  }
@@ -118910,8 +119234,8 @@ function AuthInProgress({
118910
119234
  }
118911
119235
 
118912
119236
  // packages/cli/src/ui/components/EditorSettingsDialog.tsx
118913
- import { useState as useState35 } from "react";
118914
- import { Box as Box23, Text as Text30 } from "ink";
119237
+ import { useState as useState36 } from "react";
119238
+ import { Box as Box24, Text as Text31 } from "ink";
118915
119239
 
118916
119240
  // packages/cli/src/ui/editors/editorSettingsManager.ts
118917
119241
  init_dist2();
@@ -118959,16 +119283,16 @@ var editorSettingsManager = new EditorSettingsManager();
118959
119283
  // packages/cli/src/ui/components/EditorSettingsDialog.tsx
118960
119284
  init_settings();
118961
119285
  init_dist2();
118962
- import { jsx as jsx28, jsxs as jsxs26 } from "react/jsx-runtime";
119286
+ import { jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
118963
119287
  function EditorSettingsDialog({
118964
119288
  onSelect,
118965
119289
  settings,
118966
119290
  onExit
118967
119291
  }) {
118968
- const [selectedScope, setSelectedScope] = useState35(
119292
+ const [selectedScope, setSelectedScope] = useState36(
118969
119293
  "User" /* User */
118970
119294
  );
118971
- const [focusedSection, setFocusedSection] = useState35(
119295
+ const [focusedSection, setFocusedSection] = useState36(
118972
119296
  "editor"
118973
119297
  );
118974
119298
  useKeypress(
@@ -119015,8 +119339,8 @@ function EditorSettingsDialog({
119015
119339
  if (settings.merged.preferredEditor && isEditorAvailable(settings.merged.preferredEditor)) {
119016
119340
  mergedEditorName = EDITOR_DISPLAY_NAMES[settings.merged.preferredEditor];
119017
119341
  }
119018
- return /* @__PURE__ */ jsxs26(
119019
- Box23,
119342
+ return /* @__PURE__ */ jsxs27(
119343
+ Box24,
119020
119344
  {
119021
119345
  borderStyle: "round",
119022
119346
  borderColor: Colors.Gray,
@@ -119024,14 +119348,14 @@ function EditorSettingsDialog({
119024
119348
  padding: 1,
119025
119349
  width: "100%",
119026
119350
  children: [
119027
- /* @__PURE__ */ jsxs26(Box23, { flexDirection: "column", width: "45%", paddingRight: 2, children: [
119028
- /* @__PURE__ */ jsxs26(Text30, { bold: focusedSection === "editor", children: [
119351
+ /* @__PURE__ */ jsxs27(Box24, { flexDirection: "column", width: "45%", paddingRight: 2, children: [
119352
+ /* @__PURE__ */ jsxs27(Text31, { bold: focusedSection === "editor", children: [
119029
119353
  focusedSection === "editor" ? "> " : " ",
119030
119354
  "Select Editor",
119031
119355
  " ",
119032
- /* @__PURE__ */ jsx28(Text30, { color: Colors.Gray, children: otherScopeModifiedMessage })
119356
+ /* @__PURE__ */ jsx29(Text31, { color: Colors.Gray, children: otherScopeModifiedMessage })
119033
119357
  ] }),
119034
- /* @__PURE__ */ jsx28(
119358
+ /* @__PURE__ */ jsx29(
119035
119359
  RadioButtonSelect,
119036
119360
  {
119037
119361
  items: editorItems.map((item) => ({
@@ -119045,12 +119369,12 @@ function EditorSettingsDialog({
119045
119369
  },
119046
119370
  selectedScope
119047
119371
  ),
119048
- /* @__PURE__ */ jsxs26(Box23, { marginTop: 1, flexDirection: "column", children: [
119049
- /* @__PURE__ */ jsxs26(Text30, { bold: focusedSection === "scope", children: [
119372
+ /* @__PURE__ */ jsxs27(Box24, { marginTop: 1, flexDirection: "column", children: [
119373
+ /* @__PURE__ */ jsxs27(Text31, { bold: focusedSection === "scope", children: [
119050
119374
  focusedSection === "scope" ? "> " : " ",
119051
119375
  "Apply To"
119052
119376
  ] }),
119053
- /* @__PURE__ */ jsx28(
119377
+ /* @__PURE__ */ jsx29(
119054
119378
  RadioButtonSelect,
119055
119379
  {
119056
119380
  items: scopeItems,
@@ -119060,17 +119384,17 @@ function EditorSettingsDialog({
119060
119384
  }
119061
119385
  )
119062
119386
  ] }),
119063
- /* @__PURE__ */ jsx28(Box23, { marginTop: 1, children: /* @__PURE__ */ jsx28(Text30, { color: Colors.Gray, children: "(Use Enter to select, Tab to change focus)" }) })
119387
+ /* @__PURE__ */ jsx29(Box24, { marginTop: 1, children: /* @__PURE__ */ jsx29(Text31, { color: Colors.Gray, children: "(Use Enter to select, Tab to change focus)" }) })
119064
119388
  ] }),
119065
- /* @__PURE__ */ jsxs26(Box23, { flexDirection: "column", width: "55%", paddingLeft: 2, children: [
119066
- /* @__PURE__ */ jsx28(Text30, { bold: true, children: "Editor Preference" }),
119067
- /* @__PURE__ */ jsxs26(Box23, { flexDirection: "column", gap: 1, marginTop: 1, children: [
119068
- /* @__PURE__ */ jsx28(Text30, { color: Colors.Gray, children: "These editors are currently supported. Please note that some editors cannot be used in sandbox mode." }),
119069
- /* @__PURE__ */ jsxs26(Text30, { color: Colors.Gray, children: [
119389
+ /* @__PURE__ */ jsxs27(Box24, { flexDirection: "column", width: "55%", paddingLeft: 2, children: [
119390
+ /* @__PURE__ */ jsx29(Text31, { bold: true, children: "Editor Preference" }),
119391
+ /* @__PURE__ */ jsxs27(Box24, { flexDirection: "column", gap: 1, marginTop: 1, children: [
119392
+ /* @__PURE__ */ jsx29(Text31, { color: Colors.Gray, children: "These editors are currently supported. Please note that some editors cannot be used in sandbox mode." }),
119393
+ /* @__PURE__ */ jsxs27(Text31, { color: Colors.Gray, children: [
119070
119394
  "Your preferred editor is:",
119071
119395
  " ",
119072
- /* @__PURE__ */ jsx28(
119073
- Text30,
119396
+ /* @__PURE__ */ jsx29(
119397
+ Text31,
119074
119398
  {
119075
119399
  color: mergedEditorName === "None" ? Colors.AccentRed : Colors.AccentCyan,
119076
119400
  bold: true,
@@ -119088,12 +119412,12 @@ function EditorSettingsDialog({
119088
119412
 
119089
119413
  // packages/cli/src/ui/components/ShellConfirmationDialog.tsx
119090
119414
  init_dist2();
119091
- import { Box as Box24, Text as Text32 } from "ink";
119415
+ import { Box as Box25, Text as Text33 } from "ink";
119092
119416
 
119093
119417
  // packages/cli/src/ui/utils/InlineMarkdownRenderer.tsx
119094
119418
  import React21 from "react";
119095
- import { Text as Text31 } from "ink";
119096
- import { Fragment as Fragment5, jsx as jsx29, jsxs as jsxs27 } from "react/jsx-runtime";
119419
+ import { Text as Text32 } from "ink";
119420
+ import { Fragment as Fragment5, jsx as jsx30, jsxs as jsxs28 } from "react/jsx-runtime";
119097
119421
  var BOLD_MARKER_LENGTH = 2;
119098
119422
  var ITALIC_MARKER_LENGTH = 1;
119099
119423
  var STRIKETHROUGH_MARKER_LENGTH = 2;
@@ -119102,7 +119426,7 @@ var UNDERLINE_TAG_START_LENGTH = 3;
119102
119426
  var UNDERLINE_TAG_END_LENGTH = 4;
119103
119427
  var RenderInlineInternal = ({ text }) => {
119104
119428
  if (!/[*_~`<[https?:]/.test(text)) {
119105
- return /* @__PURE__ */ jsx29(Text31, { children: text });
119429
+ return /* @__PURE__ */ jsx30(Text32, { children: text });
119106
119430
  }
119107
119431
  const nodes = [];
119108
119432
  let lastIndex = 0;
@@ -119111,7 +119435,7 @@ var RenderInlineInternal = ({ text }) => {
119111
119435
  while ((match2 = inlineRegex.exec(text)) !== null) {
119112
119436
  if (match2.index > lastIndex) {
119113
119437
  nodes.push(
119114
- /* @__PURE__ */ jsx29(Text31, { children: text.slice(lastIndex, match2.index) }, `t-${lastIndex}`)
119438
+ /* @__PURE__ */ jsx30(Text32, { children: text.slice(lastIndex, match2.index) }, `t-${lastIndex}`)
119115
119439
  );
119116
119440
  }
119117
119441
  const fullMatch = match2[0];
@@ -119119,31 +119443,31 @@ var RenderInlineInternal = ({ text }) => {
119119
119443
  const key = `m-${match2.index}`;
119120
119444
  try {
119121
119445
  if (fullMatch.startsWith("**") && fullMatch.endsWith("**") && fullMatch.length > BOLD_MARKER_LENGTH * 2) {
119122
- renderedNode = /* @__PURE__ */ jsx29(Text31, { bold: true, children: fullMatch.slice(BOLD_MARKER_LENGTH, -BOLD_MARKER_LENGTH) }, key);
119446
+ renderedNode = /* @__PURE__ */ jsx30(Text32, { bold: true, children: fullMatch.slice(BOLD_MARKER_LENGTH, -BOLD_MARKER_LENGTH) }, key);
119123
119447
  } 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(
119124
119448
  text.substring(inlineRegex.lastIndex, inlineRegex.lastIndex + 1)
119125
119449
  ) && !/\S[./\\]/.test(text.substring(match2.index - 2, match2.index)) && !/[./\\]\S/.test(
119126
119450
  text.substring(inlineRegex.lastIndex, inlineRegex.lastIndex + 2)
119127
119451
  )) {
119128
- renderedNode = /* @__PURE__ */ jsx29(Text31, { italic: true, children: fullMatch.slice(ITALIC_MARKER_LENGTH, -ITALIC_MARKER_LENGTH) }, key);
119452
+ renderedNode = /* @__PURE__ */ jsx30(Text32, { italic: true, children: fullMatch.slice(ITALIC_MARKER_LENGTH, -ITALIC_MARKER_LENGTH) }, key);
119129
119453
  } else if (fullMatch.startsWith("~~") && fullMatch.endsWith("~~") && fullMatch.length > STRIKETHROUGH_MARKER_LENGTH * 2) {
119130
- renderedNode = /* @__PURE__ */ jsx29(Text31, { strikethrough: true, children: fullMatch.slice(
119454
+ renderedNode = /* @__PURE__ */ jsx30(Text32, { strikethrough: true, children: fullMatch.slice(
119131
119455
  STRIKETHROUGH_MARKER_LENGTH,
119132
119456
  -STRIKETHROUGH_MARKER_LENGTH
119133
119457
  ) }, key);
119134
119458
  } else if (fullMatch.startsWith("`") && fullMatch.endsWith("`") && fullMatch.length > INLINE_CODE_MARKER_LENGTH) {
119135
119459
  const codeMatch = fullMatch.match(/^(`+)(.+?)\1$/s);
119136
119460
  if (codeMatch && codeMatch[2]) {
119137
- renderedNode = /* @__PURE__ */ jsx29(Text31, { color: Colors.AccentPurple, children: codeMatch[2] }, key);
119461
+ renderedNode = /* @__PURE__ */ jsx30(Text32, { color: Colors.AccentPurple, children: codeMatch[2] }, key);
119138
119462
  }
119139
119463
  } else if (fullMatch.startsWith("[") && fullMatch.includes("](") && fullMatch.endsWith(")")) {
119140
119464
  const linkMatch = fullMatch.match(/\[(.*?)\]\((.*?)\)/);
119141
119465
  if (linkMatch) {
119142
119466
  const linkText = linkMatch[1];
119143
119467
  const url2 = linkMatch[2];
119144
- renderedNode = /* @__PURE__ */ jsxs27(Text31, { children: [
119468
+ renderedNode = /* @__PURE__ */ jsxs28(Text32, { children: [
119145
119469
  linkText,
119146
- /* @__PURE__ */ jsxs27(Text31, { color: Colors.AccentBlue, children: [
119470
+ /* @__PURE__ */ jsxs28(Text32, { color: Colors.AccentBlue, children: [
119147
119471
  " (",
119148
119472
  url2,
119149
119473
  ")"
@@ -119151,24 +119475,24 @@ var RenderInlineInternal = ({ text }) => {
119151
119475
  ] }, key);
119152
119476
  }
119153
119477
  } else if (fullMatch.startsWith("<u>") && fullMatch.endsWith("</u>") && fullMatch.length > UNDERLINE_TAG_START_LENGTH + UNDERLINE_TAG_END_LENGTH - 1) {
119154
- renderedNode = /* @__PURE__ */ jsx29(Text31, { underline: true, children: fullMatch.slice(
119478
+ renderedNode = /* @__PURE__ */ jsx30(Text32, { underline: true, children: fullMatch.slice(
119155
119479
  UNDERLINE_TAG_START_LENGTH,
119156
119480
  -UNDERLINE_TAG_END_LENGTH
119157
119481
  ) }, key);
119158
119482
  } else if (fullMatch.match(/^https?:\/\//)) {
119159
- renderedNode = /* @__PURE__ */ jsx29(Text31, { color: Colors.AccentBlue, children: fullMatch }, key);
119483
+ renderedNode = /* @__PURE__ */ jsx30(Text32, { color: Colors.AccentBlue, children: fullMatch }, key);
119160
119484
  }
119161
119485
  } catch (e2) {
119162
119486
  console.error("Error parsing inline markdown part:", fullMatch, e2);
119163
119487
  renderedNode = null;
119164
119488
  }
119165
- nodes.push(renderedNode ?? /* @__PURE__ */ jsx29(Text31, { children: fullMatch }, key));
119489
+ nodes.push(renderedNode ?? /* @__PURE__ */ jsx30(Text32, { children: fullMatch }, key));
119166
119490
  lastIndex = inlineRegex.lastIndex;
119167
119491
  }
119168
119492
  if (lastIndex < text.length) {
119169
- nodes.push(/* @__PURE__ */ jsx29(Text31, { children: text.slice(lastIndex) }, `t-${lastIndex}`));
119493
+ nodes.push(/* @__PURE__ */ jsx30(Text32, { children: text.slice(lastIndex) }, `t-${lastIndex}`));
119170
119494
  }
119171
- return /* @__PURE__ */ jsx29(Fragment5, { children: nodes.filter((node) => node !== null) });
119495
+ return /* @__PURE__ */ jsx30(Fragment5, { children: nodes.filter((node) => node !== null) });
119172
119496
  };
119173
119497
  var RenderInline = React21.memo(RenderInlineInternal);
119174
119498
  var getPlainTextLength = (text) => {
@@ -119177,7 +119501,7 @@ var getPlainTextLength = (text) => {
119177
119501
  };
119178
119502
 
119179
119503
  // packages/cli/src/ui/components/ShellConfirmationDialog.tsx
119180
- import { jsx as jsx30, jsxs as jsxs28 } from "react/jsx-runtime";
119504
+ import { jsx as jsx31, jsxs as jsxs29 } from "react/jsx-runtime";
119181
119505
  var ShellConfirmationDialog = ({ request: request2 }) => {
119182
119506
  const { commands, onConfirm } = request2;
119183
119507
  useKeypress(
@@ -119209,8 +119533,8 @@ var ShellConfirmationDialog = ({ request: request2 }) => {
119209
119533
  value: ToolConfirmationOutcome.Cancel
119210
119534
  }
119211
119535
  ];
119212
- return /* @__PURE__ */ jsxs28(
119213
- Box24,
119536
+ return /* @__PURE__ */ jsxs29(
119537
+ Box25,
119214
119538
  {
119215
119539
  flexDirection: "column",
119216
119540
  borderStyle: "round",
@@ -119219,23 +119543,23 @@ var ShellConfirmationDialog = ({ request: request2 }) => {
119219
119543
  width: "100%",
119220
119544
  marginLeft: 1,
119221
119545
  children: [
119222
- /* @__PURE__ */ jsxs28(Box24, { flexDirection: "column", marginBottom: 1, children: [
119223
- /* @__PURE__ */ jsx30(Text32, { bold: true, children: "Shell Command Execution" }),
119224
- /* @__PURE__ */ jsx30(Text32, { children: "A custom command wants to run the following shell commands:" }),
119225
- /* @__PURE__ */ jsx30(
119226
- Box24,
119546
+ /* @__PURE__ */ jsxs29(Box25, { flexDirection: "column", marginBottom: 1, children: [
119547
+ /* @__PURE__ */ jsx31(Text33, { bold: true, children: "Shell Command Execution" }),
119548
+ /* @__PURE__ */ jsx31(Text33, { children: "A custom command wants to run the following shell commands:" }),
119549
+ /* @__PURE__ */ jsx31(
119550
+ Box25,
119227
119551
  {
119228
119552
  flexDirection: "column",
119229
119553
  borderStyle: "round",
119230
119554
  borderColor: Colors.Gray,
119231
119555
  paddingX: 1,
119232
119556
  marginTop: 1,
119233
- children: commands.map((cmd) => /* @__PURE__ */ jsx30(Text32, { color: Colors.AccentCyan, children: /* @__PURE__ */ jsx30(RenderInline, { text: cmd }) }, cmd))
119557
+ children: commands.map((cmd) => /* @__PURE__ */ jsx31(Text33, { color: Colors.AccentCyan, children: /* @__PURE__ */ jsx31(RenderInline, { text: cmd }) }, cmd))
119234
119558
  }
119235
119559
  )
119236
119560
  ] }),
119237
- /* @__PURE__ */ jsx30(Box24, { marginBottom: 1, children: /* @__PURE__ */ jsx30(Text32, { children: "Do you want to proceed?" }) }),
119238
- /* @__PURE__ */ jsx30(RadioButtonSelect, { items: options2, onSelect: handleSelect, isFocused: true })
119561
+ /* @__PURE__ */ jsx31(Box25, { marginBottom: 1, children: /* @__PURE__ */ jsx31(Text33, { children: "Do you want to proceed?" }) }),
119562
+ /* @__PURE__ */ jsx31(RadioButtonSelect, { items: options2, onSelect: handleSelect, isFocused: true })
119239
119563
  ]
119240
119564
  }
119241
119565
  );
@@ -120270,25 +120594,25 @@ function mergeExcludeTools(settings, extensions, extraExcludes) {
120270
120594
  init_settings();
120271
120595
 
120272
120596
  // packages/cli/src/ui/components/Tips.tsx
120273
- import { Box as Box25, Text as Text33 } from "ink";
120274
- import { jsx as jsx31, jsxs as jsxs29 } from "react/jsx-runtime";
120597
+ import { Box as Box26, Text as Text34 } from "ink";
120598
+ import { jsx as jsx32, jsxs as jsxs30 } from "react/jsx-runtime";
120275
120599
  var Tips = ({ config }) => {
120276
120600
  const geminiMdFileCount = config.getGeminiMdFileCount();
120277
- return /* @__PURE__ */ jsxs29(Box25, { flexDirection: "column", children: [
120278
- /* @__PURE__ */ jsx31(Text33, { color: Colors.Foreground, children: "Tips for getting started:" }),
120279
- /* @__PURE__ */ jsx31(Text33, { color: Colors.Foreground, children: "1. Ask questions, edit files, or run commands." }),
120280
- /* @__PURE__ */ jsx31(Text33, { color: Colors.Foreground, children: "2. Be specific for the best results." }),
120281
- geminiMdFileCount === 0 && /* @__PURE__ */ jsxs29(Text33, { color: Colors.Foreground, children: [
120601
+ return /* @__PURE__ */ jsxs30(Box26, { flexDirection: "column", children: [
120602
+ /* @__PURE__ */ jsx32(Text34, { color: Colors.Foreground, children: "Tips for getting started:" }),
120603
+ /* @__PURE__ */ jsx32(Text34, { color: Colors.Foreground, children: "1. Ask questions, edit files, or run commands." }),
120604
+ /* @__PURE__ */ jsx32(Text34, { color: Colors.Foreground, children: "2. Be specific for the best results." }),
120605
+ geminiMdFileCount === 0 && /* @__PURE__ */ jsxs30(Text34, { color: Colors.Foreground, children: [
120282
120606
  "3. Create",
120283
120607
  " ",
120284
- /* @__PURE__ */ jsx31(Text33, { bold: true, color: Colors.AccentPurple, children: "LINK.md" }),
120608
+ /* @__PURE__ */ jsx32(Text34, { bold: true, color: Colors.AccentPurple, children: "LINK.md" }),
120285
120609
  " ",
120286
120610
  "files to customize your interactions with FSS Link."
120287
120611
  ] }),
120288
- /* @__PURE__ */ jsxs29(Text33, { color: Colors.Foreground, children: [
120612
+ /* @__PURE__ */ jsxs30(Text34, { color: Colors.Foreground, children: [
120289
120613
  geminiMdFileCount === 0 ? "4." : "3.",
120290
120614
  " ",
120291
- /* @__PURE__ */ jsx31(Text33, { bold: true, color: Colors.AccentPurple, children: "/help" }),
120615
+ /* @__PURE__ */ jsx32(Text34, { bold: true, color: Colors.AccentPurple, children: "/help" }),
120292
120616
  " ",
120293
120617
  "for more information."
120294
120618
  ] })
@@ -120343,15 +120667,15 @@ var ConsolePatcher = class {
120343
120667
  };
120344
120668
 
120345
120669
  // packages/cli/src/ui/components/DetailedMessagesDisplay.tsx
120346
- import { Box as Box26, Text as Text34 } from "ink";
120347
- import { jsx as jsx32, jsxs as jsxs30 } from "react/jsx-runtime";
120670
+ import { Box as Box27, Text as Text35 } from "ink";
120671
+ import { jsx as jsx33, jsxs as jsxs31 } from "react/jsx-runtime";
120348
120672
  var DetailedMessagesDisplay = ({ messages, maxHeight, width }) => {
120349
120673
  if (messages.length === 0) {
120350
120674
  return null;
120351
120675
  }
120352
120676
  const borderAndPadding = 4;
120353
- return /* @__PURE__ */ jsxs30(
120354
- Box26,
120677
+ return /* @__PURE__ */ jsxs31(
120678
+ Box27,
120355
120679
  {
120356
120680
  flexDirection: "column",
120357
120681
  marginTop: 1,
@@ -120360,11 +120684,11 @@ var DetailedMessagesDisplay = ({ messages, maxHeight, width }) => {
120360
120684
  paddingX: 1,
120361
120685
  width,
120362
120686
  children: [
120363
- /* @__PURE__ */ jsx32(Box26, { marginBottom: 1, children: /* @__PURE__ */ jsxs30(Text34, { bold: true, color: Colors.Foreground, children: [
120687
+ /* @__PURE__ */ jsx33(Box27, { marginBottom: 1, children: /* @__PURE__ */ jsxs31(Text35, { bold: true, color: Colors.Foreground, children: [
120364
120688
  "Debug Console ",
120365
- /* @__PURE__ */ jsx32(Text34, { color: Colors.Gray, children: "(ctrl+o to close)" })
120689
+ /* @__PURE__ */ jsx33(Text35, { color: Colors.Gray, children: "(ctrl+o to close)" })
120366
120690
  ] }) }),
120367
- /* @__PURE__ */ jsx32(MaxSizedBox, { maxHeight, maxWidth: width - borderAndPadding, children: messages.map((msg, index) => {
120691
+ /* @__PURE__ */ jsx33(MaxSizedBox, { maxHeight, maxWidth: width - borderAndPadding, children: messages.map((msg, index) => {
120368
120692
  let textColor = Colors.Foreground;
120369
120693
  let icon = "\u2139";
120370
120694
  switch (msg.type) {
@@ -120384,14 +120708,14 @@ var DetailedMessagesDisplay = ({ messages, maxHeight, width }) => {
120384
120708
  default:
120385
120709
  break;
120386
120710
  }
120387
- return /* @__PURE__ */ jsxs30(Box26, { flexDirection: "row", children: [
120388
- /* @__PURE__ */ jsxs30(Text34, { color: textColor, children: [
120711
+ return /* @__PURE__ */ jsxs31(Box27, { flexDirection: "row", children: [
120712
+ /* @__PURE__ */ jsxs31(Text35, { color: textColor, children: [
120389
120713
  icon,
120390
120714
  " "
120391
120715
  ] }),
120392
- /* @__PURE__ */ jsxs30(Text34, { color: textColor, wrap: "wrap", children: [
120716
+ /* @__PURE__ */ jsxs31(Text35, { color: textColor, wrap: "wrap", children: [
120393
120717
  msg.content,
120394
- msg.count && msg.count > 1 && /* @__PURE__ */ jsxs30(Text34, { color: Colors.Gray, children: [
120718
+ msg.count && msg.count > 1 && /* @__PURE__ */ jsxs31(Text35, { color: Colors.Gray, children: [
120395
120719
  " (x",
120396
120720
  msg.count,
120397
120721
  ")"
@@ -120405,16 +120729,16 @@ var DetailedMessagesDisplay = ({ messages, maxHeight, width }) => {
120405
120729
  };
120406
120730
 
120407
120731
  // packages/cli/src/ui/components/messages/UserMessage.tsx
120408
- import { Text as Text35, Box as Box27 } from "ink";
120409
- import { jsx as jsx33, jsxs as jsxs31 } from "react/jsx-runtime";
120732
+ import { Text as Text36, Box as Box28 } from "ink";
120733
+ import { jsx as jsx34, jsxs as jsxs32 } from "react/jsx-runtime";
120410
120734
  var UserMessage = ({ text }) => {
120411
120735
  const prefix = "> ";
120412
120736
  const prefixWidth = prefix.length;
120413
120737
  const isSlashCommand2 = text.startsWith("/");
120414
120738
  const textColor = isSlashCommand2 ? Colors.AccentPurple : Colors.Gray;
120415
120739
  const borderColor = isSlashCommand2 ? Colors.AccentPurple : Colors.Gray;
120416
- return /* @__PURE__ */ jsxs31(
120417
- Box27,
120740
+ return /* @__PURE__ */ jsxs32(
120741
+ Box28,
120418
120742
  {
120419
120743
  borderStyle: "round",
120420
120744
  borderColor,
@@ -120424,35 +120748,35 @@ var UserMessage = ({ text }) => {
120424
120748
  marginY: 1,
120425
120749
  alignSelf: "flex-start",
120426
120750
  children: [
120427
- /* @__PURE__ */ jsx33(Box27, { width: prefixWidth, children: /* @__PURE__ */ jsx33(Text35, { color: textColor, children: prefix }) }),
120428
- /* @__PURE__ */ jsx33(Box27, { flexGrow: 1, children: /* @__PURE__ */ jsx33(Text35, { wrap: "wrap", color: textColor, children: text }) })
120751
+ /* @__PURE__ */ jsx34(Box28, { width: prefixWidth, children: /* @__PURE__ */ jsx34(Text36, { color: textColor, children: prefix }) }),
120752
+ /* @__PURE__ */ jsx34(Box28, { flexGrow: 1, children: /* @__PURE__ */ jsx34(Text36, { wrap: "wrap", color: textColor, children: text }) })
120429
120753
  ]
120430
120754
  }
120431
120755
  );
120432
120756
  };
120433
120757
 
120434
120758
  // packages/cli/src/ui/components/messages/UserShellMessage.tsx
120435
- import { Box as Box28, Text as Text36 } from "ink";
120436
- import { jsx as jsx34, jsxs as jsxs32 } from "react/jsx-runtime";
120759
+ import { Box as Box29, Text as Text37 } from "ink";
120760
+ import { jsx as jsx35, jsxs as jsxs33 } from "react/jsx-runtime";
120437
120761
  var UserShellMessage = ({ text }) => {
120438
120762
  const commandToDisplay = text.startsWith("!") ? text.substring(1) : text;
120439
- return /* @__PURE__ */ jsxs32(Box28, { children: [
120440
- /* @__PURE__ */ jsx34(Text36, { color: Colors.AccentCyan, children: "$ " }),
120441
- /* @__PURE__ */ jsx34(Text36, { children: commandToDisplay })
120763
+ return /* @__PURE__ */ jsxs33(Box29, { children: [
120764
+ /* @__PURE__ */ jsx35(Text37, { color: Colors.AccentCyan, children: "$ " }),
120765
+ /* @__PURE__ */ jsx35(Text37, { children: commandToDisplay })
120442
120766
  ] });
120443
120767
  };
120444
120768
 
120445
120769
  // packages/cli/src/ui/components/messages/GeminiMessage.tsx
120446
- import { Text as Text39, Box as Box31 } from "ink";
120770
+ import { Text as Text40, Box as Box32 } from "ink";
120447
120771
 
120448
120772
  // packages/cli/src/ui/utils/MarkdownDisplay.tsx
120449
120773
  import React24 from "react";
120450
- import { Text as Text38, Box as Box30 } from "ink";
120774
+ import { Text as Text39, Box as Box31 } from "ink";
120451
120775
 
120452
120776
  // packages/cli/src/ui/utils/TableRenderer.tsx
120453
120777
  import React22 from "react";
120454
- import { Text as Text37, Box as Box29 } from "ink";
120455
- import { jsx as jsx35, jsxs as jsxs33 } from "react/jsx-runtime";
120778
+ import { Text as Text38, Box as Box30 } from "ink";
120779
+ import { jsx as jsx36, jsxs as jsxs34 } from "react/jsx-runtime";
120456
120780
  var TableRenderer = ({
120457
120781
  headers,
120458
120782
  rows,
@@ -120500,8 +120824,8 @@ var TableRenderer = ({
120500
120824
  }
120501
120825
  const actualDisplayWidth = getPlainTextLength(cellContent);
120502
120826
  const paddingNeeded = Math.max(0, contentWidth - actualDisplayWidth);
120503
- return /* @__PURE__ */ jsxs33(Text37, { children: [
120504
- isHeader ? /* @__PURE__ */ jsx35(Text37, { bold: true, color: Colors.AccentCyan, children: /* @__PURE__ */ jsx35(RenderInline, { text: cellContent }) }) : /* @__PURE__ */ jsx35(RenderInline, { text: cellContent }),
120827
+ return /* @__PURE__ */ jsxs34(Text38, { children: [
120828
+ isHeader ? /* @__PURE__ */ jsx36(Text38, { bold: true, color: Colors.AccentCyan, children: /* @__PURE__ */ jsx36(RenderInline, { text: cellContent }) }) : /* @__PURE__ */ jsx36(RenderInline, { text: cellContent }),
120505
120829
  " ".repeat(paddingNeeded)
120506
120830
  ] });
120507
120831
  };
@@ -120514,17 +120838,17 @@ var TableRenderer = ({
120514
120838
  const char = chars[type2];
120515
120839
  const borderParts = adjustedWidths.map((w) => char.horizontal.repeat(w));
120516
120840
  const border = char.left + borderParts.join(char.middle) + char.right;
120517
- return /* @__PURE__ */ jsx35(Text37, { children: border });
120841
+ return /* @__PURE__ */ jsx36(Text38, { children: border });
120518
120842
  };
120519
120843
  const renderRow = (cells, isHeader = false) => {
120520
120844
  const renderedCells = cells.map((cell, index) => {
120521
120845
  const width = adjustedWidths[index] || 0;
120522
120846
  return renderCell(cell || "", width, isHeader);
120523
120847
  });
120524
- return /* @__PURE__ */ jsxs33(Text37, { children: [
120848
+ return /* @__PURE__ */ jsxs34(Text38, { children: [
120525
120849
  "\u2502",
120526
120850
  " ",
120527
- renderedCells.map((cell, index) => /* @__PURE__ */ jsxs33(React22.Fragment, { children: [
120851
+ renderedCells.map((cell, index) => /* @__PURE__ */ jsxs34(React22.Fragment, { children: [
120528
120852
  cell,
120529
120853
  index < renderedCells.length - 1 ? " \u2502 " : ""
120530
120854
  ] }, index)),
@@ -120532,11 +120856,11 @@ var TableRenderer = ({
120532
120856
  "\u2502"
120533
120857
  ] });
120534
120858
  };
120535
- return /* @__PURE__ */ jsxs33(Box29, { flexDirection: "column", marginY: 1, children: [
120859
+ return /* @__PURE__ */ jsxs34(Box30, { flexDirection: "column", marginY: 1, children: [
120536
120860
  renderBorder("top"),
120537
120861
  renderRow(headers, true),
120538
120862
  renderBorder("middle"),
120539
- rows.map((row, index) => /* @__PURE__ */ jsx35(React22.Fragment, { children: renderRow(row) }, index)),
120863
+ rows.map((row, index) => /* @__PURE__ */ jsx36(React22.Fragment, { children: renderRow(row) }, index)),
120540
120864
  renderBorder("bottom")
120541
120865
  ] });
120542
120866
  };
@@ -120555,7 +120879,7 @@ var useSettings = () => {
120555
120879
  };
120556
120880
 
120557
120881
  // packages/cli/src/ui/utils/MarkdownDisplay.tsx
120558
- import { Fragment as Fragment6, jsx as jsx36, jsxs as jsxs34 } from "react/jsx-runtime";
120882
+ import { Fragment as Fragment6, jsx as jsx37, jsxs as jsxs35 } from "react/jsx-runtime";
120559
120883
  var EMPTY_LINE_HEIGHT = 1;
120560
120884
  var CODE_BLOCK_PREFIX_PADDING = 1;
120561
120885
  var LIST_ITEM_PREFIX_PADDING = 1;
@@ -120566,7 +120890,7 @@ var MarkdownDisplayInternal = ({
120566
120890
  availableTerminalHeight,
120567
120891
  terminalWidth
120568
120892
  }) => {
120569
- if (!text) return /* @__PURE__ */ jsx36(Fragment6, {});
120893
+ if (!text) return /* @__PURE__ */ jsx37(Fragment6, {});
120570
120894
  const lines = text.split("\n");
120571
120895
  const headerRegex = /^ *(#{1,4}) +(.*)/;
120572
120896
  const codeFenceRegex = /^ *(`{3,}|~{3,}) *(\w*?) *$/;
@@ -120596,7 +120920,7 @@ var MarkdownDisplayInternal = ({
120596
120920
  const fenceMatch = line.match(codeFenceRegex);
120597
120921
  if (fenceMatch && fenceMatch[1].startsWith(codeBlockFence[0]) && fenceMatch[1].length >= codeBlockFence.length) {
120598
120922
  addContentBlock(
120599
- /* @__PURE__ */ jsx36(
120923
+ /* @__PURE__ */ jsx37(
120600
120924
  RenderCodeBlock,
120601
120925
  {
120602
120926
  content: codeBlockContent,
@@ -120635,7 +120959,7 @@ var MarkdownDisplayInternal = ({
120635
120959
  tableRows = [];
120636
120960
  } else {
120637
120961
  addContentBlock(
120638
- /* @__PURE__ */ jsx36(Box30, { children: /* @__PURE__ */ jsx36(Text38, { wrap: "wrap", children: /* @__PURE__ */ jsx36(RenderInline, { text: line }) }) }, key)
120962
+ /* @__PURE__ */ jsx37(Box31, { children: /* @__PURE__ */ jsx37(Text39, { wrap: "wrap", children: /* @__PURE__ */ jsx37(RenderInline, { text: line }) }) }, key)
120639
120963
  );
120640
120964
  }
120641
120965
  } else if (inTable && tableSeparatorMatch) {
@@ -120651,7 +120975,7 @@ var MarkdownDisplayInternal = ({
120651
120975
  } else if (inTable && !tableRowMatch) {
120652
120976
  if (tableHeaders.length > 0 && tableRows.length > 0) {
120653
120977
  addContentBlock(
120654
- /* @__PURE__ */ jsx36(
120978
+ /* @__PURE__ */ jsx37(
120655
120979
  RenderTable,
120656
120980
  {
120657
120981
  headers: tableHeaders,
@@ -120667,12 +120991,12 @@ var MarkdownDisplayInternal = ({
120667
120991
  tableHeaders = [];
120668
120992
  if (line.trim().length > 0) {
120669
120993
  addContentBlock(
120670
- /* @__PURE__ */ jsx36(Box30, { children: /* @__PURE__ */ jsx36(Text38, { wrap: "wrap", children: /* @__PURE__ */ jsx36(RenderInline, { text: line }) }) }, key)
120994
+ /* @__PURE__ */ jsx37(Box31, { children: /* @__PURE__ */ jsx37(Text39, { wrap: "wrap", children: /* @__PURE__ */ jsx37(RenderInline, { text: line }) }) }, key)
120671
120995
  );
120672
120996
  }
120673
120997
  } else if (hrMatch) {
120674
120998
  addContentBlock(
120675
- /* @__PURE__ */ jsx36(Box30, { children: /* @__PURE__ */ jsx36(Text38, { dimColor: true, children: "---" }) }, key)
120999
+ /* @__PURE__ */ jsx37(Box31, { children: /* @__PURE__ */ jsx37(Text39, { dimColor: true, children: "---" }) }, key)
120676
121000
  );
120677
121001
  } else if (headerMatch) {
120678
121002
  const level = headerMatch[1].length;
@@ -120680,28 +121004,28 @@ var MarkdownDisplayInternal = ({
120680
121004
  let headerNode = null;
120681
121005
  switch (level) {
120682
121006
  case 1:
120683
- headerNode = /* @__PURE__ */ jsx36(Text38, { bold: true, color: Colors.AccentCyan, children: /* @__PURE__ */ jsx36(RenderInline, { text: headerText }) });
121007
+ headerNode = /* @__PURE__ */ jsx37(Text39, { bold: true, color: Colors.AccentCyan, children: /* @__PURE__ */ jsx37(RenderInline, { text: headerText }) });
120684
121008
  break;
120685
121009
  case 2:
120686
- headerNode = /* @__PURE__ */ jsx36(Text38, { bold: true, color: Colors.AccentBlue, children: /* @__PURE__ */ jsx36(RenderInline, { text: headerText }) });
121010
+ headerNode = /* @__PURE__ */ jsx37(Text39, { bold: true, color: Colors.AccentBlue, children: /* @__PURE__ */ jsx37(RenderInline, { text: headerText }) });
120687
121011
  break;
120688
121012
  case 3:
120689
- headerNode = /* @__PURE__ */ jsx36(Text38, { bold: true, children: /* @__PURE__ */ jsx36(RenderInline, { text: headerText }) });
121013
+ headerNode = /* @__PURE__ */ jsx37(Text39, { bold: true, children: /* @__PURE__ */ jsx37(RenderInline, { text: headerText }) });
120690
121014
  break;
120691
121015
  case 4:
120692
- headerNode = /* @__PURE__ */ jsx36(Text38, { italic: true, color: Colors.Gray, children: /* @__PURE__ */ jsx36(RenderInline, { text: headerText }) });
121016
+ headerNode = /* @__PURE__ */ jsx37(Text39, { italic: true, color: Colors.Gray, children: /* @__PURE__ */ jsx37(RenderInline, { text: headerText }) });
120693
121017
  break;
120694
121018
  default:
120695
- headerNode = /* @__PURE__ */ jsx36(Text38, { children: /* @__PURE__ */ jsx36(RenderInline, { text: headerText }) });
121019
+ headerNode = /* @__PURE__ */ jsx37(Text39, { children: /* @__PURE__ */ jsx37(RenderInline, { text: headerText }) });
120696
121020
  break;
120697
121021
  }
120698
- if (headerNode) addContentBlock(/* @__PURE__ */ jsx36(Box30, { children: headerNode }, key));
121022
+ if (headerNode) addContentBlock(/* @__PURE__ */ jsx37(Box31, { children: headerNode }, key));
120699
121023
  } else if (ulMatch) {
120700
121024
  const leadingWhitespace = ulMatch[1];
120701
121025
  const marker = ulMatch[2];
120702
121026
  const itemText = ulMatch[3];
120703
121027
  addContentBlock(
120704
- /* @__PURE__ */ jsx36(
121028
+ /* @__PURE__ */ jsx37(
120705
121029
  RenderListItem,
120706
121030
  {
120707
121031
  itemText,
@@ -120717,7 +121041,7 @@ var MarkdownDisplayInternal = ({
120717
121041
  const marker = olMatch[2];
120718
121042
  const itemText = olMatch[3];
120719
121043
  addContentBlock(
120720
- /* @__PURE__ */ jsx36(
121044
+ /* @__PURE__ */ jsx37(
120721
121045
  RenderListItem,
120722
121046
  {
120723
121047
  itemText,
@@ -120732,20 +121056,20 @@ var MarkdownDisplayInternal = ({
120732
121056
  if (line.trim().length === 0 && !inCodeBlock) {
120733
121057
  if (!lastLineEmpty) {
120734
121058
  contentBlocks.push(
120735
- /* @__PURE__ */ jsx36(Box30, { height: EMPTY_LINE_HEIGHT }, `spacer-${index}`)
121059
+ /* @__PURE__ */ jsx37(Box31, { height: EMPTY_LINE_HEIGHT }, `spacer-${index}`)
120736
121060
  );
120737
121061
  lastLineEmpty = true;
120738
121062
  }
120739
121063
  } else {
120740
121064
  addContentBlock(
120741
- /* @__PURE__ */ jsx36(Box30, { children: /* @__PURE__ */ jsx36(Text38, { wrap: "wrap", children: /* @__PURE__ */ jsx36(RenderInline, { text: line }) }) }, key)
121065
+ /* @__PURE__ */ jsx37(Box31, { children: /* @__PURE__ */ jsx37(Text39, { wrap: "wrap", children: /* @__PURE__ */ jsx37(RenderInline, { text: line }) }) }, key)
120742
121066
  );
120743
121067
  }
120744
121068
  }
120745
121069
  });
120746
121070
  if (inCodeBlock) {
120747
121071
  addContentBlock(
120748
- /* @__PURE__ */ jsx36(
121072
+ /* @__PURE__ */ jsx37(
120749
121073
  RenderCodeBlock,
120750
121074
  {
120751
121075
  content: codeBlockContent,
@@ -120760,7 +121084,7 @@ var MarkdownDisplayInternal = ({
120760
121084
  }
120761
121085
  if (inTable && tableHeaders.length > 0 && tableRows.length > 0) {
120762
121086
  addContentBlock(
120763
- /* @__PURE__ */ jsx36(
121087
+ /* @__PURE__ */ jsx37(
120764
121088
  RenderTable,
120765
121089
  {
120766
121090
  headers: tableHeaders,
@@ -120771,7 +121095,7 @@ var MarkdownDisplayInternal = ({
120771
121095
  )
120772
121096
  );
120773
121097
  }
120774
- return /* @__PURE__ */ jsx36(Fragment6, { children: contentBlocks });
121098
+ return /* @__PURE__ */ jsx37(Fragment6, { children: contentBlocks });
120775
121099
  };
120776
121100
  var RenderCodeBlockInternal = ({
120777
121101
  content,
@@ -120790,7 +121114,7 @@ var RenderCodeBlockInternal = ({
120790
121114
  );
120791
121115
  if (content.length > MAX_CODE_LINES_WHEN_PENDING) {
120792
121116
  if (MAX_CODE_LINES_WHEN_PENDING < MIN_LINES_FOR_MESSAGE) {
120793
- return /* @__PURE__ */ jsx36(Box30, { paddingLeft: CODE_BLOCK_PREFIX_PADDING, children: /* @__PURE__ */ jsx36(Text38, { color: Colors.Gray, children: "... code is being written ..." }) });
121117
+ return /* @__PURE__ */ jsx37(Box31, { paddingLeft: CODE_BLOCK_PREFIX_PADDING, children: /* @__PURE__ */ jsx37(Text39, { color: Colors.Gray, children: "... code is being written ..." }) });
120794
121118
  }
120795
121119
  const truncatedContent = content.slice(0, MAX_CODE_LINES_WHEN_PENDING);
120796
121120
  const colorizedTruncatedCode = colorizeCode(
@@ -120801,9 +121125,9 @@ var RenderCodeBlockInternal = ({
120801
121125
  void 0,
120802
121126
  settings
120803
121127
  );
120804
- return /* @__PURE__ */ jsxs34(Box30, { paddingLeft: CODE_BLOCK_PREFIX_PADDING, flexDirection: "column", children: [
121128
+ return /* @__PURE__ */ jsxs35(Box31, { paddingLeft: CODE_BLOCK_PREFIX_PADDING, flexDirection: "column", children: [
120805
121129
  colorizedTruncatedCode,
120806
- /* @__PURE__ */ jsx36(Text38, { color: Colors.Gray, children: "... generating more ..." })
121130
+ /* @__PURE__ */ jsx37(Text39, { color: Colors.Gray, children: "... generating more ..." })
120807
121131
  ] });
120808
121132
  }
120809
121133
  }
@@ -120816,8 +121140,8 @@ var RenderCodeBlockInternal = ({
120816
121140
  void 0,
120817
121141
  settings
120818
121142
  );
120819
- return /* @__PURE__ */ jsx36(
120820
- Box30,
121143
+ return /* @__PURE__ */ jsx37(
121144
+ Box31,
120821
121145
  {
120822
121146
  paddingLeft: CODE_BLOCK_PREFIX_PADDING,
120823
121147
  flexDirection: "column",
@@ -120837,14 +121161,14 @@ var RenderListItemInternal = ({
120837
121161
  const prefix = type2 === "ol" ? `${marker}. ` : `${marker} `;
120838
121162
  const prefixWidth = prefix.length;
120839
121163
  const indentation = leadingWhitespace.length;
120840
- return /* @__PURE__ */ jsxs34(
120841
- Box30,
121164
+ return /* @__PURE__ */ jsxs35(
121165
+ Box31,
120842
121166
  {
120843
121167
  paddingLeft: indentation + LIST_ITEM_PREFIX_PADDING,
120844
121168
  flexDirection: "row",
120845
121169
  children: [
120846
- /* @__PURE__ */ jsx36(Box30, { width: prefixWidth, children: /* @__PURE__ */ jsx36(Text38, { children: prefix }) }),
120847
- /* @__PURE__ */ jsx36(Box30, { flexGrow: LIST_ITEM_TEXT_FLEX_GROW, children: /* @__PURE__ */ jsx36(Text38, { wrap: "wrap", children: /* @__PURE__ */ jsx36(RenderInline, { text: itemText }) }) })
121170
+ /* @__PURE__ */ jsx37(Box31, { width: prefixWidth, children: /* @__PURE__ */ jsx37(Text39, { children: prefix }) }),
121171
+ /* @__PURE__ */ jsx37(Box31, { flexGrow: LIST_ITEM_TEXT_FLEX_GROW, children: /* @__PURE__ */ jsx37(Text39, { wrap: "wrap", children: /* @__PURE__ */ jsx37(RenderInline, { text: itemText }) }) })
120848
121172
  ]
120849
121173
  }
120850
121174
  );
@@ -120854,12 +121178,12 @@ var RenderTableInternal = ({
120854
121178
  headers,
120855
121179
  rows,
120856
121180
  terminalWidth
120857
- }) => /* @__PURE__ */ jsx36(TableRenderer, { headers, rows, terminalWidth });
121181
+ }) => /* @__PURE__ */ jsx37(TableRenderer, { headers, rows, terminalWidth });
120858
121182
  var RenderTable = React24.memo(RenderTableInternal);
120859
121183
  var MarkdownDisplay = React24.memo(MarkdownDisplayInternal);
120860
121184
 
120861
121185
  // packages/cli/src/ui/components/messages/GeminiMessage.tsx
120862
- import { jsx as jsx37, jsxs as jsxs35 } from "react/jsx-runtime";
121186
+ import { jsx as jsx38, jsxs as jsxs36 } from "react/jsx-runtime";
120863
121187
  var GeminiMessage = ({
120864
121188
  text,
120865
121189
  isPending,
@@ -120868,9 +121192,9 @@ var GeminiMessage = ({
120868
121192
  }) => {
120869
121193
  const prefix = "\u2726 ";
120870
121194
  const prefixWidth = prefix.length;
120871
- return /* @__PURE__ */ jsxs35(Box31, { flexDirection: "row", children: [
120872
- /* @__PURE__ */ jsx37(Box31, { width: prefixWidth, children: /* @__PURE__ */ jsx37(Text39, { color: Colors.AccentPurple, children: prefix }) }),
120873
- /* @__PURE__ */ jsx37(Box31, { flexGrow: 1, flexDirection: "column", children: /* @__PURE__ */ jsx37(
121195
+ return /* @__PURE__ */ jsxs36(Box32, { flexDirection: "row", children: [
121196
+ /* @__PURE__ */ jsx38(Box32, { width: prefixWidth, children: /* @__PURE__ */ jsx38(Text40, { color: Colors.AccentPurple, children: prefix }) }),
121197
+ /* @__PURE__ */ jsx38(Box32, { flexGrow: 1, flexDirection: "column", children: /* @__PURE__ */ jsx38(
120874
121198
  MarkdownDisplay,
120875
121199
  {
120876
121200
  text,
@@ -120883,40 +121207,40 @@ var GeminiMessage = ({
120883
121207
  };
120884
121208
 
120885
121209
  // packages/cli/src/ui/components/messages/InfoMessage.tsx
120886
- import { Text as Text40, Box as Box32 } from "ink";
120887
- import { jsx as jsx38, jsxs as jsxs36 } from "react/jsx-runtime";
121210
+ import { Text as Text41, Box as Box33 } from "ink";
121211
+ import { jsx as jsx39, jsxs as jsxs37 } from "react/jsx-runtime";
120888
121212
  var InfoMessage = ({ text }) => {
120889
121213
  const prefix = "\u2139 ";
120890
121214
  const prefixWidth = prefix.length;
120891
- return /* @__PURE__ */ jsxs36(Box32, { flexDirection: "row", marginTop: 1, children: [
120892
- /* @__PURE__ */ jsx38(Box32, { width: prefixWidth, children: /* @__PURE__ */ jsx38(Text40, { color: Colors.AccentYellow, children: prefix }) }),
120893
- /* @__PURE__ */ jsx38(Box32, { flexGrow: 1, children: /* @__PURE__ */ jsx38(Text40, { wrap: "wrap", color: Colors.AccentYellow, children: /* @__PURE__ */ jsx38(RenderInline, { text }) }) })
121215
+ return /* @__PURE__ */ jsxs37(Box33, { flexDirection: "row", marginTop: 1, children: [
121216
+ /* @__PURE__ */ jsx39(Box33, { width: prefixWidth, children: /* @__PURE__ */ jsx39(Text41, { color: Colors.AccentYellow, children: prefix }) }),
121217
+ /* @__PURE__ */ jsx39(Box33, { flexGrow: 1, children: /* @__PURE__ */ jsx39(Text41, { wrap: "wrap", color: Colors.AccentYellow, children: /* @__PURE__ */ jsx39(RenderInline, { text }) }) })
120894
121218
  ] });
120895
121219
  };
120896
121220
 
120897
121221
  // packages/cli/src/ui/components/messages/ErrorMessage.tsx
120898
- import { Text as Text41, Box as Box33 } from "ink";
120899
- import { jsx as jsx39, jsxs as jsxs37 } from "react/jsx-runtime";
121222
+ import { Text as Text42, Box as Box34 } from "ink";
121223
+ import { jsx as jsx40, jsxs as jsxs38 } from "react/jsx-runtime";
120900
121224
  var ErrorMessage = ({ text }) => {
120901
121225
  const prefix = "\u2715 ";
120902
121226
  const prefixWidth = prefix.length;
120903
- return /* @__PURE__ */ jsxs37(Box33, { flexDirection: "row", marginBottom: 1, children: [
120904
- /* @__PURE__ */ jsx39(Box33, { width: prefixWidth, children: /* @__PURE__ */ jsx39(Text41, { color: Colors.AccentRed, children: prefix }) }),
120905
- /* @__PURE__ */ jsx39(Box33, { flexGrow: 1, children: /* @__PURE__ */ jsx39(Text41, { wrap: "wrap", color: Colors.AccentRed, children: text }) })
121227
+ return /* @__PURE__ */ jsxs38(Box34, { flexDirection: "row", marginBottom: 1, children: [
121228
+ /* @__PURE__ */ jsx40(Box34, { width: prefixWidth, children: /* @__PURE__ */ jsx40(Text42, { color: Colors.AccentRed, children: prefix }) }),
121229
+ /* @__PURE__ */ jsx40(Box34, { flexGrow: 1, children: /* @__PURE__ */ jsx40(Text42, { wrap: "wrap", color: Colors.AccentRed, children: text }) })
120906
121230
  ] });
120907
121231
  };
120908
121232
 
120909
121233
  // packages/cli/src/ui/components/messages/ToolGroupMessage.tsx
120910
121234
  import { useMemo as useMemo8 } from "react";
120911
- import { Box as Box37 } from "ink";
121235
+ import { Box as Box38 } from "ink";
120912
121236
 
120913
121237
  // packages/cli/src/ui/components/messages/ToolMessage.tsx
120914
121238
  import React25 from "react";
120915
- import { Box as Box35, Text as Text43 } from "ink";
121239
+ import { Box as Box36, Text as Text44 } from "ink";
120916
121240
 
120917
121241
  // packages/cli/src/ui/components/TodoDisplay.tsx
120918
- import { Box as Box34, Text as Text42 } from "ink";
120919
- import { jsx as jsx40, jsxs as jsxs38 } from "react/jsx-runtime";
121242
+ import { Box as Box35, Text as Text43 } from "ink";
121243
+ import { jsx as jsx41, jsxs as jsxs39 } from "react/jsx-runtime";
120920
121244
  var STATUS_ICONS = {
120921
121245
  pending: "\u25CB",
120922
121246
  in_progress: "\u25D0",
@@ -120926,21 +121250,21 @@ var TodoDisplay = ({ todos }) => {
120926
121250
  if (!todos || todos.length === 0) {
120927
121251
  return null;
120928
121252
  }
120929
- return /* @__PURE__ */ jsx40(Box34, { flexDirection: "column", children: todos.map((todo) => /* @__PURE__ */ jsx40(TodoItemRow, { todo }, todo.id)) });
121253
+ return /* @__PURE__ */ jsx41(Box35, { flexDirection: "column", children: todos.map((todo) => /* @__PURE__ */ jsx41(TodoItemRow, { todo }, todo.id)) });
120930
121254
  };
120931
121255
  var TodoItemRow = ({ todo }) => {
120932
121256
  const statusIcon = STATUS_ICONS[todo.status];
120933
121257
  const isCompleted = todo.status === "completed";
120934
121258
  const isInProgress = todo.status === "in_progress";
120935
121259
  const itemColor = isCompleted ? Colors.Foreground : isInProgress ? Colors.AccentGreen : Colors.Foreground;
120936
- return /* @__PURE__ */ jsxs38(Box34, { flexDirection: "row", minHeight: 1, children: [
120937
- /* @__PURE__ */ jsx40(Box34, { width: 3, children: /* @__PURE__ */ jsx40(Text42, { color: itemColor, children: statusIcon }) }),
120938
- /* @__PURE__ */ jsx40(Box34, { flexGrow: 1, children: /* @__PURE__ */ jsx40(Text42, { color: itemColor, strikethrough: isCompleted, wrap: "wrap", children: todo.content }) })
121260
+ return /* @__PURE__ */ jsxs39(Box35, { flexDirection: "row", minHeight: 1, children: [
121261
+ /* @__PURE__ */ jsx41(Box35, { width: 3, children: /* @__PURE__ */ jsx41(Text43, { color: itemColor, children: statusIcon }) }),
121262
+ /* @__PURE__ */ jsx41(Box35, { flexGrow: 1, children: /* @__PURE__ */ jsx41(Text43, { color: itemColor, strikethrough: isCompleted, wrap: "wrap", children: todo.content }) })
120939
121263
  ] });
120940
121264
  };
120941
121265
 
120942
121266
  // packages/cli/src/ui/components/messages/ToolMessage.tsx
120943
- import { jsx as jsx41, jsxs as jsxs39 } from "react/jsx-runtime";
121267
+ import { jsx as jsx42, jsxs as jsxs40 } from "react/jsx-runtime";
120944
121268
  var STATIC_HEIGHT = 1;
120945
121269
  var RESERVED_LINE_COUNT = 5;
120946
121270
  var STATUS_INDICATOR_WIDTH = 3;
@@ -120969,14 +121293,14 @@ var useResultDisplayRenderer = (resultDisplay) => React25.useMemo(() => {
120969
121293
  }, [resultDisplay]);
120970
121294
  var TodoResultRenderer = ({
120971
121295
  data
120972
- }) => /* @__PURE__ */ jsx41(TodoDisplay, { todos: data.todos });
121296
+ }) => /* @__PURE__ */ jsx42(TodoDisplay, { todos: data.todos });
120973
121297
  var StringResultRenderer = ({ data, renderAsMarkdown, availableHeight, childWidth }) => {
120974
121298
  let displayData = data;
120975
121299
  if (displayData.length > MAXIMUM_RESULT_DISPLAY_CHARACTERS) {
120976
121300
  displayData = "..." + displayData.slice(-MAXIMUM_RESULT_DISPLAY_CHARACTERS);
120977
121301
  }
120978
121302
  if (renderAsMarkdown) {
120979
- return /* @__PURE__ */ jsx41(Box35, { flexDirection: "column", children: /* @__PURE__ */ jsx41(
121303
+ return /* @__PURE__ */ jsx42(Box36, { flexDirection: "column", children: /* @__PURE__ */ jsx42(
120980
121304
  MarkdownDisplay,
120981
121305
  {
120982
121306
  text: displayData,
@@ -120986,9 +121310,9 @@ var StringResultRenderer = ({ data, renderAsMarkdown, availableHeight, childWidt
120986
121310
  }
120987
121311
  ) });
120988
121312
  }
120989
- return /* @__PURE__ */ jsx41(MaxSizedBox, { maxHeight: availableHeight, maxWidth: childWidth, children: /* @__PURE__ */ jsx41(Box35, { children: /* @__PURE__ */ jsx41(Text43, { wrap: "wrap", children: displayData }) }) });
121313
+ return /* @__PURE__ */ jsx42(MaxSizedBox, { maxHeight: availableHeight, maxWidth: childWidth, children: /* @__PURE__ */ jsx42(Box36, { children: /* @__PURE__ */ jsx42(Text44, { wrap: "wrap", children: displayData }) }) });
120990
121314
  };
120991
- var DiffResultRenderer = ({ data, availableHeight, childWidth }) => /* @__PURE__ */ jsx41(
121315
+ var DiffResultRenderer = ({ data, availableHeight, childWidth }) => /* @__PURE__ */ jsx42(
120992
121316
  DiffRenderer,
120993
121317
  {
120994
121318
  diffContent: data.fileDiff,
@@ -121017,10 +121341,10 @@ var ToolMessage = ({
121017
121341
  }
121018
121342
  const childWidth = terminalWidth - 3;
121019
121343
  const displayRenderer = useResultDisplayRenderer(resultDisplay);
121020
- return /* @__PURE__ */ jsxs39(Box35, { paddingX: 1, paddingY: 0, flexDirection: "column", children: [
121021
- /* @__PURE__ */ jsxs39(Box35, { minHeight: 1, children: [
121022
- /* @__PURE__ */ jsx41(ToolStatusIndicator, { status }),
121023
- /* @__PURE__ */ jsx41(
121344
+ return /* @__PURE__ */ jsxs40(Box36, { paddingX: 1, paddingY: 0, flexDirection: "column", children: [
121345
+ /* @__PURE__ */ jsxs40(Box36, { minHeight: 1, children: [
121346
+ /* @__PURE__ */ jsx42(ToolStatusIndicator, { status }),
121347
+ /* @__PURE__ */ jsx42(
121024
121348
  ToolInfo,
121025
121349
  {
121026
121350
  name: name2,
@@ -121029,11 +121353,11 @@ var ToolMessage = ({
121029
121353
  emphasis
121030
121354
  }
121031
121355
  ),
121032
- emphasis === "high" && /* @__PURE__ */ jsx41(TrailingIndicator, {})
121356
+ emphasis === "high" && /* @__PURE__ */ jsx42(TrailingIndicator, {})
121033
121357
  ] }),
121034
- displayRenderer.type !== "none" && /* @__PURE__ */ jsx41(Box35, { paddingLeft: STATUS_INDICATOR_WIDTH, width: "100%", marginTop: 1, children: /* @__PURE__ */ jsxs39(Box35, { flexDirection: "column", children: [
121035
- displayRenderer.type === "todo" && /* @__PURE__ */ jsx41(TodoResultRenderer, { data: displayRenderer.data }),
121036
- displayRenderer.type === "string" && /* @__PURE__ */ jsx41(
121358
+ displayRenderer.type !== "none" && /* @__PURE__ */ jsx42(Box36, { paddingLeft: STATUS_INDICATOR_WIDTH, width: "100%", marginTop: 1, children: /* @__PURE__ */ jsxs40(Box36, { flexDirection: "column", children: [
121359
+ displayRenderer.type === "todo" && /* @__PURE__ */ jsx42(TodoResultRenderer, { data: displayRenderer.data }),
121360
+ displayRenderer.type === "string" && /* @__PURE__ */ jsx42(
121037
121361
  StringResultRenderer,
121038
121362
  {
121039
121363
  data: displayRenderer.data,
@@ -121042,7 +121366,7 @@ var ToolMessage = ({
121042
121366
  childWidth
121043
121367
  }
121044
121368
  ),
121045
- displayRenderer.type === "diff" && /* @__PURE__ */ jsx41(
121369
+ displayRenderer.type === "diff" && /* @__PURE__ */ jsx42(
121046
121370
  DiffResultRenderer,
121047
121371
  {
121048
121372
  data: displayRenderer.data,
@@ -121055,19 +121379,19 @@ var ToolMessage = ({
121055
121379
  };
121056
121380
  var ToolStatusIndicator = ({
121057
121381
  status
121058
- }) => /* @__PURE__ */ jsxs39(Box35, { minWidth: STATUS_INDICATOR_WIDTH, children: [
121059
- status === "Pending" /* Pending */ && /* @__PURE__ */ jsx41(Text43, { color: Colors.AccentGreen, children: "o" }),
121060
- status === "Executing" /* Executing */ && /* @__PURE__ */ jsx41(
121382
+ }) => /* @__PURE__ */ jsxs40(Box36, { minWidth: STATUS_INDICATOR_WIDTH, children: [
121383
+ status === "Pending" /* Pending */ && /* @__PURE__ */ jsx42(Text44, { color: Colors.AccentGreen, children: "o" }),
121384
+ status === "Executing" /* Executing */ && /* @__PURE__ */ jsx42(
121061
121385
  GeminiRespondingSpinner,
121062
121386
  {
121063
121387
  spinnerType: "toggle",
121064
121388
  nonRespondingDisplay: "\u22B7"
121065
121389
  }
121066
121390
  ),
121067
- status === "Success" /* Success */ && /* @__PURE__ */ jsx41(Text43, { color: Colors.AccentGreen, children: "\u2714" }),
121068
- status === "Confirming" /* Confirming */ && /* @__PURE__ */ jsx41(Text43, { color: Colors.AccentYellow, children: "?" }),
121069
- status === "Canceled" /* Canceled */ && /* @__PURE__ */ jsx41(Text43, { color: Colors.AccentYellow, bold: true, children: "-" }),
121070
- status === "Error" /* Error */ && /* @__PURE__ */ jsx41(Text43, { color: Colors.AccentRed, bold: true, children: "x" })
121391
+ status === "Success" /* Success */ && /* @__PURE__ */ jsx42(Text44, { color: Colors.AccentGreen, children: "\u2714" }),
121392
+ status === "Confirming" /* Confirming */ && /* @__PURE__ */ jsx42(Text44, { color: Colors.AccentYellow, children: "?" }),
121393
+ status === "Canceled" /* Canceled */ && /* @__PURE__ */ jsx42(Text44, { color: Colors.AccentYellow, bold: true, children: "-" }),
121394
+ status === "Error" /* Error */ && /* @__PURE__ */ jsx42(Text44, { color: Colors.AccentRed, bold: true, children: "x" })
121071
121395
  ] });
121072
121396
  var ToolInfo = ({
121073
121397
  name: name2,
@@ -121089,28 +121413,28 @@ var ToolInfo = ({
121089
121413
  }
121090
121414
  }
121091
121415
  }, [emphasis]);
121092
- return /* @__PURE__ */ jsx41(Box35, { children: /* @__PURE__ */ jsxs39(
121093
- Text43,
121416
+ return /* @__PURE__ */ jsx42(Box36, { children: /* @__PURE__ */ jsxs40(
121417
+ Text44,
121094
121418
  {
121095
121419
  wrap: "truncate-end",
121096
121420
  strikethrough: status === "Canceled" /* Canceled */,
121097
121421
  children: [
121098
- /* @__PURE__ */ jsx41(Text43, { color: nameColor, bold: true, children: name2 }),
121422
+ /* @__PURE__ */ jsx42(Text44, { color: nameColor, bold: true, children: name2 }),
121099
121423
  " ",
121100
- /* @__PURE__ */ jsx41(Text43, { color: Colors.Gray, children: description })
121424
+ /* @__PURE__ */ jsx42(Text44, { color: Colors.Gray, children: description })
121101
121425
  ]
121102
121426
  }
121103
121427
  ) });
121104
121428
  };
121105
- var TrailingIndicator = () => /* @__PURE__ */ jsxs39(Text43, { color: Colors.Foreground, wrap: "truncate", children: [
121429
+ var TrailingIndicator = () => /* @__PURE__ */ jsxs40(Text44, { color: Colors.Foreground, wrap: "truncate", children: [
121106
121430
  " ",
121107
121431
  "\u2190"
121108
121432
  ] });
121109
121433
 
121110
121434
  // packages/cli/src/ui/components/messages/ToolConfirmationMessage.tsx
121111
- import { Box as Box36, Text as Text44 } from "ink";
121435
+ import { Box as Box37, Text as Text45 } from "ink";
121112
121436
  init_dist2();
121113
- import { jsx as jsx42, jsxs as jsxs40 } from "react/jsx-runtime";
121437
+ import { jsx as jsx43, jsxs as jsxs41 } from "react/jsx-runtime";
121114
121438
  var ToolConfirmationMessage = ({
121115
121439
  confirmationDetails,
121116
121440
  config,
@@ -121163,8 +121487,8 @@ var ToolConfirmationMessage = ({
121163
121487
  }
121164
121488
  if (confirmationDetails.type === "edit") {
121165
121489
  if (confirmationDetails.isModifying) {
121166
- return /* @__PURE__ */ jsxs40(
121167
- Box36,
121490
+ return /* @__PURE__ */ jsxs41(
121491
+ Box37,
121168
121492
  {
121169
121493
  minWidth: "90%",
121170
121494
  borderStyle: "round",
@@ -121173,8 +121497,8 @@ var ToolConfirmationMessage = ({
121173
121497
  padding: 1,
121174
121498
  overflow: "hidden",
121175
121499
  children: [
121176
- /* @__PURE__ */ jsx42(Text44, { children: "Modify in progress: " }),
121177
- /* @__PURE__ */ jsx42(Text44, { color: Colors.AccentGreen, children: "Save and close external editor to continue" })
121500
+ /* @__PURE__ */ jsx43(Text45, { children: "Modify in progress: " }),
121501
+ /* @__PURE__ */ jsx43(Text45, { color: Colors.AccentGreen, children: "Save and close external editor to continue" })
121178
121502
  ]
121179
121503
  }
121180
121504
  );
@@ -121205,7 +121529,7 @@ var ToolConfirmationMessage = ({
121205
121529
  value: ToolConfirmationOutcome.Cancel
121206
121530
  });
121207
121531
  }
121208
- bodyContent = /* @__PURE__ */ jsx42(
121532
+ bodyContent = /* @__PURE__ */ jsx43(
121209
121533
  DiffRenderer,
121210
121534
  {
121211
121535
  diffContent: confirmationDetails.fileDiff,
@@ -121235,12 +121559,12 @@ var ToolConfirmationMessage = ({
121235
121559
  if (bodyContentHeight !== void 0) {
121236
121560
  bodyContentHeight -= 2;
121237
121561
  }
121238
- bodyContent = /* @__PURE__ */ jsx42(Box36, { flexDirection: "column", children: /* @__PURE__ */ jsx42(Box36, { paddingX: 1, marginLeft: 1, children: /* @__PURE__ */ jsx42(
121562
+ bodyContent = /* @__PURE__ */ jsx43(Box37, { flexDirection: "column", children: /* @__PURE__ */ jsx43(Box37, { paddingX: 1, marginLeft: 1, children: /* @__PURE__ */ jsx43(
121239
121563
  MaxSizedBox,
121240
121564
  {
121241
121565
  maxHeight: bodyContentHeight,
121242
121566
  maxWidth: Math.max(childWidth - 4, 1),
121243
- children: /* @__PURE__ */ jsx42(Box36, { children: /* @__PURE__ */ jsx42(Text44, { color: Colors.AccentCyan, children: executionProps.command }) })
121567
+ children: /* @__PURE__ */ jsx43(Box37, { children: /* @__PURE__ */ jsx43(Text45, { color: Colors.AccentCyan, children: executionProps.command }) })
121244
121568
  }
121245
121569
  ) }) });
121246
121570
  } else if (confirmationDetails.type === "info") {
@@ -121261,25 +121585,25 @@ var ToolConfirmationMessage = ({
121261
121585
  value: ToolConfirmationOutcome.Cancel
121262
121586
  }
121263
121587
  );
121264
- bodyContent = /* @__PURE__ */ jsxs40(Box36, { flexDirection: "column", paddingX: 1, marginLeft: 1, children: [
121265
- /* @__PURE__ */ jsx42(Text44, { color: Colors.AccentCyan, children: /* @__PURE__ */ jsx42(RenderInline, { text: infoProps.prompt }) }),
121266
- displayUrls && infoProps.urls && infoProps.urls.length > 0 && /* @__PURE__ */ jsxs40(Box36, { flexDirection: "column", marginTop: 1, children: [
121267
- /* @__PURE__ */ jsx42(Text44, { children: "URLs to fetch:" }),
121268
- infoProps.urls.map((url2) => /* @__PURE__ */ jsxs40(Text44, { children: [
121588
+ bodyContent = /* @__PURE__ */ jsxs41(Box37, { flexDirection: "column", paddingX: 1, marginLeft: 1, children: [
121589
+ /* @__PURE__ */ jsx43(Text45, { color: Colors.AccentCyan, children: /* @__PURE__ */ jsx43(RenderInline, { text: infoProps.prompt }) }),
121590
+ displayUrls && infoProps.urls && infoProps.urls.length > 0 && /* @__PURE__ */ jsxs41(Box37, { flexDirection: "column", marginTop: 1, children: [
121591
+ /* @__PURE__ */ jsx43(Text45, { children: "URLs to fetch:" }),
121592
+ infoProps.urls.map((url2) => /* @__PURE__ */ jsxs41(Text45, { children: [
121269
121593
  " ",
121270
121594
  "- ",
121271
- /* @__PURE__ */ jsx42(RenderInline, { text: url2 })
121595
+ /* @__PURE__ */ jsx43(RenderInline, { text: url2 })
121272
121596
  ] }, url2))
121273
121597
  ] })
121274
121598
  ] });
121275
121599
  } else {
121276
121600
  const mcpProps = confirmationDetails;
121277
- bodyContent = /* @__PURE__ */ jsxs40(Box36, { flexDirection: "column", paddingX: 1, marginLeft: 1, children: [
121278
- /* @__PURE__ */ jsxs40(Text44, { color: Colors.AccentCyan, children: [
121601
+ bodyContent = /* @__PURE__ */ jsxs41(Box37, { flexDirection: "column", paddingX: 1, marginLeft: 1, children: [
121602
+ /* @__PURE__ */ jsxs41(Text45, { color: Colors.AccentCyan, children: [
121279
121603
  "MCP Server: ",
121280
121604
  mcpProps.serverName
121281
121605
  ] }),
121282
- /* @__PURE__ */ jsxs40(Text44, { color: Colors.AccentCyan, children: [
121606
+ /* @__PURE__ */ jsxs41(Text45, { color: Colors.AccentCyan, children: [
121283
121607
  "Tool: ",
121284
121608
  mcpProps.toolName
121285
121609
  ] })
@@ -121305,10 +121629,10 @@ var ToolConfirmationMessage = ({
121305
121629
  }
121306
121630
  );
121307
121631
  }
121308
- return /* @__PURE__ */ jsxs40(Box36, { flexDirection: "column", padding: 1, width: childWidth, children: [
121309
- /* @__PURE__ */ jsx42(Box36, { flexGrow: 1, flexShrink: 1, overflow: "hidden", marginBottom: 1, children: bodyContent }),
121310
- /* @__PURE__ */ jsx42(Box36, { marginBottom: 1, flexShrink: 0, children: /* @__PURE__ */ jsx42(Text44, { wrap: "truncate", children: question }) }),
121311
- /* @__PURE__ */ jsx42(Box36, { flexShrink: 0, children: /* @__PURE__ */ jsx42(
121632
+ return /* @__PURE__ */ jsxs41(Box37, { flexDirection: "column", padding: 1, width: childWidth, children: [
121633
+ /* @__PURE__ */ jsx43(Box37, { flexGrow: 1, flexShrink: 1, overflow: "hidden", marginBottom: 1, children: bodyContent }),
121634
+ /* @__PURE__ */ jsx43(Box37, { marginBottom: 1, flexShrink: 0, children: /* @__PURE__ */ jsx43(Text45, { wrap: "truncate", children: question }) }),
121635
+ /* @__PURE__ */ jsx43(Box37, { flexShrink: 0, children: /* @__PURE__ */ jsx43(
121312
121636
  RadioButtonSelect,
121313
121637
  {
121314
121638
  items: options2,
@@ -121320,7 +121644,7 @@ var ToolConfirmationMessage = ({
121320
121644
  };
121321
121645
 
121322
121646
  // packages/cli/src/ui/components/messages/ToolGroupMessage.tsx
121323
- import { jsx as jsx43, jsxs as jsxs41 } from "react/jsx-runtime";
121647
+ import { jsx as jsx44, jsxs as jsxs42 } from "react/jsx-runtime";
121324
121648
  var ToolGroupMessage = ({
121325
121649
  toolCalls,
121326
121650
  availableTerminalHeight,
@@ -121356,8 +121680,8 @@ var ToolGroupMessage = ({
121356
121680
  ),
121357
121681
  1
121358
121682
  ) : void 0;
121359
- return /* @__PURE__ */ jsx43(
121360
- Box37,
121683
+ return /* @__PURE__ */ jsx44(
121684
+ Box38,
121361
121685
  {
121362
121686
  flexDirection: "column",
121363
121687
  borderStyle: "round",
@@ -121367,8 +121691,8 @@ var ToolGroupMessage = ({
121367
121691
  borderColor,
121368
121692
  children: toolCalls.map((tool) => {
121369
121693
  const isConfirming = toolAwaitingApproval?.callId === tool.callId;
121370
- return /* @__PURE__ */ jsxs41(Box37, { flexDirection: "column", minHeight: 1, children: [
121371
- /* @__PURE__ */ jsx43(Box37, { flexDirection: "row", alignItems: "center", children: /* @__PURE__ */ jsx43(
121694
+ return /* @__PURE__ */ jsxs42(Box38, { flexDirection: "column", minHeight: 1, children: [
121695
+ /* @__PURE__ */ jsx44(Box38, { flexDirection: "row", alignItems: "center", children: /* @__PURE__ */ jsx44(
121372
121696
  ToolMessage,
121373
121697
  {
121374
121698
  callId: tool.callId,
@@ -121383,7 +121707,7 @@ var ToolGroupMessage = ({
121383
121707
  renderOutputAsMarkdown: tool.renderOutputAsMarkdown
121384
121708
  }
121385
121709
  ) }),
121386
- tool.status === "Confirming" /* Confirming */ && isConfirming && tool.confirmationDetails && /* @__PURE__ */ jsx43(
121710
+ tool.status === "Confirming" /* Confirming */ && isConfirming && tool.confirmationDetails && /* @__PURE__ */ jsx44(
121387
121711
  ToolConfirmationMessage,
121388
121712
  {
121389
121713
  confirmationDetails: tool.confirmationDetails,
@@ -121400,8 +121724,8 @@ var ToolGroupMessage = ({
121400
121724
  };
121401
121725
 
121402
121726
  // packages/cli/src/ui/components/messages/GeminiMessageContent.tsx
121403
- import { Box as Box38 } from "ink";
121404
- import { jsx as jsx44 } from "react/jsx-runtime";
121727
+ import { Box as Box39 } from "ink";
121728
+ import { jsx as jsx45 } from "react/jsx-runtime";
121405
121729
  var GeminiMessageContent = ({
121406
121730
  text,
121407
121731
  isPending,
@@ -121410,7 +121734,7 @@ var GeminiMessageContent = ({
121410
121734
  }) => {
121411
121735
  const originalPrefix = "\u2726 ";
121412
121736
  const prefixWidth = originalPrefix.length;
121413
- return /* @__PURE__ */ jsx44(Box38, { flexDirection: "column", paddingLeft: prefixWidth, children: /* @__PURE__ */ jsx44(
121737
+ return /* @__PURE__ */ jsx45(Box39, { flexDirection: "column", paddingLeft: prefixWidth, children: /* @__PURE__ */ jsx45(
121414
121738
  MarkdownDisplay,
121415
121739
  {
121416
121740
  text,
@@ -121422,17 +121746,17 @@ var GeminiMessageContent = ({
121422
121746
  };
121423
121747
 
121424
121748
  // packages/cli/src/ui/components/messages/CompressionMessage.tsx
121425
- import { Box as Box39, Text as Text45 } from "ink";
121749
+ import { Box as Box40, Text as Text46 } from "ink";
121426
121750
  import Spinner3 from "ink-spinner";
121427
- import { jsx as jsx45, jsxs as jsxs42 } from "react/jsx-runtime";
121751
+ import { jsx as jsx46, jsxs as jsxs43 } from "react/jsx-runtime";
121428
121752
  var CompressionMessage = ({
121429
121753
  compression
121430
121754
  }) => {
121431
121755
  const text = compression.isPending ? "Compressing chat history" : `Chat history compressed from ${compression.originalTokenCount ?? "unknown"} to ${compression.newTokenCount ?? "unknown"} tokens.`;
121432
- return /* @__PURE__ */ jsxs42(Box39, { flexDirection: "row", children: [
121433
- /* @__PURE__ */ jsx45(Box39, { marginRight: 1, children: compression.isPending ? /* @__PURE__ */ jsx45(Spinner3, { type: "dots" }) : /* @__PURE__ */ jsx45(Text45, { color: Colors.AccentPurple, children: "\u2726" }) }),
121434
- /* @__PURE__ */ jsx45(Box39, { children: /* @__PURE__ */ jsx45(
121435
- Text45,
121756
+ return /* @__PURE__ */ jsxs43(Box40, { flexDirection: "row", children: [
121757
+ /* @__PURE__ */ jsx46(Box40, { marginRight: 1, children: compression.isPending ? /* @__PURE__ */ jsx46(Spinner3, { type: "dots" }) : /* @__PURE__ */ jsx46(Text46, { color: Colors.AccentPurple, children: "\u2726" }) }),
121758
+ /* @__PURE__ */ jsx46(Box40, { children: /* @__PURE__ */ jsx46(
121759
+ Text46,
121436
121760
  {
121437
121761
  color: compression.isPending ? Colors.AccentPurple : Colors.AccentGreen,
121438
121762
  children: text
@@ -121442,11 +121766,11 @@ var CompressionMessage = ({
121442
121766
  };
121443
121767
 
121444
121768
  // packages/cli/src/ui/components/HistoryItemDisplay.tsx
121445
- import { Box as Box45 } from "ink";
121769
+ import { Box as Box46 } from "ink";
121446
121770
 
121447
121771
  // packages/cli/src/ui/components/AboutBox.tsx
121448
- import { Box as Box40, Text as Text46 } from "ink";
121449
- import { jsx as jsx46, jsxs as jsxs43 } from "react/jsx-runtime";
121772
+ import { Box as Box41, Text as Text47 } from "ink";
121773
+ import { jsx as jsx47, jsxs as jsxs44 } from "react/jsx-runtime";
121450
121774
  var AboutBox = ({
121451
121775
  cliVersion,
121452
121776
  osVersion,
@@ -121455,8 +121779,8 @@ var AboutBox = ({
121455
121779
  selectedAuthType,
121456
121780
  gcpProject,
121457
121781
  ideClient
121458
- }) => /* @__PURE__ */ jsxs43(
121459
- Box40,
121782
+ }) => /* @__PURE__ */ jsxs44(
121783
+ Box41,
121460
121784
  {
121461
121785
  borderStyle: "round",
121462
121786
  borderColor: Colors.Gray,
@@ -121465,45 +121789,45 @@ var AboutBox = ({
121465
121789
  marginY: 1,
121466
121790
  width: "100%",
121467
121791
  children: [
121468
- /* @__PURE__ */ jsx46(Box40, { marginBottom: 1, children: /* @__PURE__ */ jsx46(Text46, { bold: true, color: Colors.AccentPurple, children: "About FSS Link" }) }),
121469
- /* @__PURE__ */ jsxs43(Box40, { flexDirection: "row", children: [
121470
- /* @__PURE__ */ jsx46(Box40, { width: "35%", children: /* @__PURE__ */ jsx46(Text46, { bold: true, color: Colors.LightBlue, children: "CLI Version" }) }),
121471
- /* @__PURE__ */ jsx46(Box40, { children: /* @__PURE__ */ jsx46(Text46, { children: cliVersion }) })
121792
+ /* @__PURE__ */ jsx47(Box41, { marginBottom: 1, children: /* @__PURE__ */ jsx47(Text47, { bold: true, color: Colors.AccentPurple, children: "About FSS Link" }) }),
121793
+ /* @__PURE__ */ jsxs44(Box41, { flexDirection: "row", children: [
121794
+ /* @__PURE__ */ jsx47(Box41, { width: "35%", children: /* @__PURE__ */ jsx47(Text47, { bold: true, color: Colors.LightBlue, children: "CLI Version" }) }),
121795
+ /* @__PURE__ */ jsx47(Box41, { children: /* @__PURE__ */ jsx47(Text47, { children: cliVersion }) })
121472
121796
  ] }),
121473
- GIT_COMMIT_INFO && !["N/A"].includes(GIT_COMMIT_INFO) && /* @__PURE__ */ jsxs43(Box40, { flexDirection: "row", children: [
121474
- /* @__PURE__ */ jsx46(Box40, { width: "35%", children: /* @__PURE__ */ jsx46(Text46, { bold: true, color: Colors.LightBlue, children: "Git Commit" }) }),
121475
- /* @__PURE__ */ jsx46(Box40, { children: /* @__PURE__ */ jsx46(Text46, { children: GIT_COMMIT_INFO }) })
121797
+ GIT_COMMIT_INFO && !["N/A"].includes(GIT_COMMIT_INFO) && /* @__PURE__ */ jsxs44(Box41, { flexDirection: "row", children: [
121798
+ /* @__PURE__ */ jsx47(Box41, { width: "35%", children: /* @__PURE__ */ jsx47(Text47, { bold: true, color: Colors.LightBlue, children: "Git Commit" }) }),
121799
+ /* @__PURE__ */ jsx47(Box41, { children: /* @__PURE__ */ jsx47(Text47, { children: GIT_COMMIT_INFO }) })
121476
121800
  ] }),
121477
- /* @__PURE__ */ jsxs43(Box40, { flexDirection: "row", children: [
121478
- /* @__PURE__ */ jsx46(Box40, { width: "35%", children: /* @__PURE__ */ jsx46(Text46, { bold: true, color: Colors.LightBlue, children: "Model" }) }),
121479
- /* @__PURE__ */ jsx46(Box40, { children: /* @__PURE__ */ jsx46(Text46, { children: modelVersion }) })
121801
+ /* @__PURE__ */ jsxs44(Box41, { flexDirection: "row", children: [
121802
+ /* @__PURE__ */ jsx47(Box41, { width: "35%", children: /* @__PURE__ */ jsx47(Text47, { bold: true, color: Colors.LightBlue, children: "Model" }) }),
121803
+ /* @__PURE__ */ jsx47(Box41, { children: /* @__PURE__ */ jsx47(Text47, { children: modelVersion }) })
121480
121804
  ] }),
121481
- /* @__PURE__ */ jsxs43(Box40, { flexDirection: "row", children: [
121482
- /* @__PURE__ */ jsx46(Box40, { width: "35%", children: /* @__PURE__ */ jsx46(Text46, { bold: true, color: Colors.LightBlue, children: "Sandbox" }) }),
121483
- /* @__PURE__ */ jsx46(Box40, { children: /* @__PURE__ */ jsx46(Text46, { children: sandboxEnv }) })
121805
+ /* @__PURE__ */ jsxs44(Box41, { flexDirection: "row", children: [
121806
+ /* @__PURE__ */ jsx47(Box41, { width: "35%", children: /* @__PURE__ */ jsx47(Text47, { bold: true, color: Colors.LightBlue, children: "Sandbox" }) }),
121807
+ /* @__PURE__ */ jsx47(Box41, { children: /* @__PURE__ */ jsx47(Text47, { children: sandboxEnv }) })
121484
121808
  ] }),
121485
- /* @__PURE__ */ jsxs43(Box40, { flexDirection: "row", children: [
121486
- /* @__PURE__ */ jsx46(Box40, { width: "35%", children: /* @__PURE__ */ jsx46(Text46, { bold: true, color: Colors.LightBlue, children: "OS" }) }),
121487
- /* @__PURE__ */ jsx46(Box40, { children: /* @__PURE__ */ jsx46(Text46, { children: osVersion }) })
121809
+ /* @__PURE__ */ jsxs44(Box41, { flexDirection: "row", children: [
121810
+ /* @__PURE__ */ jsx47(Box41, { width: "35%", children: /* @__PURE__ */ jsx47(Text47, { bold: true, color: Colors.LightBlue, children: "OS" }) }),
121811
+ /* @__PURE__ */ jsx47(Box41, { children: /* @__PURE__ */ jsx47(Text47, { children: osVersion }) })
121488
121812
  ] }),
121489
- /* @__PURE__ */ jsxs43(Box40, { flexDirection: "row", children: [
121490
- /* @__PURE__ */ jsx46(Box40, { width: "35%", children: /* @__PURE__ */ jsx46(Text46, { bold: true, color: Colors.LightBlue, children: "Auth Method" }) }),
121491
- /* @__PURE__ */ jsx46(Box40, { children: /* @__PURE__ */ jsx46(Text46, { children: selectedAuthType.startsWith("oauth") ? "OAuth" : selectedAuthType }) })
121813
+ /* @__PURE__ */ jsxs44(Box41, { flexDirection: "row", children: [
121814
+ /* @__PURE__ */ jsx47(Box41, { width: "35%", children: /* @__PURE__ */ jsx47(Text47, { bold: true, color: Colors.LightBlue, children: "Auth Method" }) }),
121815
+ /* @__PURE__ */ jsx47(Box41, { children: /* @__PURE__ */ jsx47(Text47, { children: selectedAuthType.startsWith("oauth") ? "OAuth" : selectedAuthType }) })
121492
121816
  ] }),
121493
- gcpProject && /* @__PURE__ */ jsxs43(Box40, { flexDirection: "row", children: [
121494
- /* @__PURE__ */ jsx46(Box40, { width: "35%", children: /* @__PURE__ */ jsx46(Text46, { bold: true, color: Colors.LightBlue, children: "GCP Project" }) }),
121495
- /* @__PURE__ */ jsx46(Box40, { children: /* @__PURE__ */ jsx46(Text46, { children: gcpProject }) })
121817
+ gcpProject && /* @__PURE__ */ jsxs44(Box41, { flexDirection: "row", children: [
121818
+ /* @__PURE__ */ jsx47(Box41, { width: "35%", children: /* @__PURE__ */ jsx47(Text47, { bold: true, color: Colors.LightBlue, children: "GCP Project" }) }),
121819
+ /* @__PURE__ */ jsx47(Box41, { children: /* @__PURE__ */ jsx47(Text47, { children: gcpProject }) })
121496
121820
  ] }),
121497
- ideClient && /* @__PURE__ */ jsxs43(Box40, { flexDirection: "row", children: [
121498
- /* @__PURE__ */ jsx46(Box40, { width: "35%", children: /* @__PURE__ */ jsx46(Text46, { bold: true, color: Colors.LightBlue, children: "IDE Client" }) }),
121499
- /* @__PURE__ */ jsx46(Box40, { children: /* @__PURE__ */ jsx46(Text46, { children: ideClient }) })
121821
+ ideClient && /* @__PURE__ */ jsxs44(Box41, { flexDirection: "row", children: [
121822
+ /* @__PURE__ */ jsx47(Box41, { width: "35%", children: /* @__PURE__ */ jsx47(Text47, { bold: true, color: Colors.LightBlue, children: "IDE Client" }) }),
121823
+ /* @__PURE__ */ jsx47(Box41, { children: /* @__PURE__ */ jsx47(Text47, { children: ideClient }) })
121500
121824
  ] })
121501
121825
  ]
121502
121826
  }
121503
121827
  );
121504
121828
 
121505
121829
  // packages/cli/src/ui/components/StatsDisplay.tsx
121506
- import { Box as Box41, Text as Text47 } from "ink";
121830
+ import { Box as Box42, Text as Text48 } from "ink";
121507
121831
  import Gradient3 from "ink-gradient";
121508
121832
 
121509
121833
  // packages/cli/src/ui/utils/displayUtils.ts
@@ -121580,20 +121904,20 @@ var computeSessionStats = (metrics2) => {
121580
121904
  };
121581
121905
 
121582
121906
  // packages/cli/src/ui/components/StatsDisplay.tsx
121583
- import { jsx as jsx47, jsxs as jsxs44 } from "react/jsx-runtime";
121584
- var StatRow = ({ title, children }) => /* @__PURE__ */ jsxs44(Box41, { children: [
121585
- /* @__PURE__ */ jsx47(Box41, { width: 28, children: /* @__PURE__ */ jsx47(Text47, { color: theme.text.link, children: title }) }),
121907
+ import { jsx as jsx48, jsxs as jsxs45 } from "react/jsx-runtime";
121908
+ var StatRow = ({ title, children }) => /* @__PURE__ */ jsxs45(Box42, { children: [
121909
+ /* @__PURE__ */ jsx48(Box42, { width: 28, children: /* @__PURE__ */ jsx48(Text48, { color: theme.text.link, children: title }) }),
121586
121910
  children
121587
121911
  ] });
121588
- var SubStatRow = ({ title, children }) => /* @__PURE__ */ jsxs44(Box41, { paddingLeft: 2, children: [
121589
- /* @__PURE__ */ jsx47(Box41, { width: 26, children: /* @__PURE__ */ jsxs44(Text47, { children: [
121912
+ var SubStatRow = ({ title, children }) => /* @__PURE__ */ jsxs45(Box42, { paddingLeft: 2, children: [
121913
+ /* @__PURE__ */ jsx48(Box42, { width: 26, children: /* @__PURE__ */ jsxs45(Text48, { children: [
121590
121914
  "\xBB ",
121591
121915
  title
121592
121916
  ] }) }),
121593
121917
  children
121594
121918
  ] });
121595
- var Section = ({ title, children }) => /* @__PURE__ */ jsxs44(Box41, { flexDirection: "column", width: "100%", marginBottom: 1, children: [
121596
- /* @__PURE__ */ jsx47(Text47, { bold: true, children: title }),
121919
+ var Section = ({ title, children }) => /* @__PURE__ */ jsxs45(Box42, { flexDirection: "column", width: "100%", marginBottom: 1, children: [
121920
+ /* @__PURE__ */ jsx48(Text48, { bold: true, children: title }),
121597
121921
  children
121598
121922
  ] });
121599
121923
  var ModelUsageTable = ({ models, totalCachedTokens, cacheEfficiency }) => {
@@ -121601,15 +121925,15 @@ var ModelUsageTable = ({ models, totalCachedTokens, cacheEfficiency }) => {
121601
121925
  const requestsWidth = 8;
121602
121926
  const inputTokensWidth = 15;
121603
121927
  const outputTokensWidth = 15;
121604
- return /* @__PURE__ */ jsxs44(Box41, { flexDirection: "column", marginTop: 1, children: [
121605
- /* @__PURE__ */ jsxs44(Box41, { children: [
121606
- /* @__PURE__ */ jsx47(Box41, { width: nameWidth, children: /* @__PURE__ */ jsx47(Text47, { bold: true, children: "Model Usage" }) }),
121607
- /* @__PURE__ */ jsx47(Box41, { width: requestsWidth, justifyContent: "flex-end", children: /* @__PURE__ */ jsx47(Text47, { bold: true, children: "Reqs" }) }),
121608
- /* @__PURE__ */ jsx47(Box41, { width: inputTokensWidth, justifyContent: "flex-end", children: /* @__PURE__ */ jsx47(Text47, { bold: true, children: "Input Tokens" }) }),
121609
- /* @__PURE__ */ jsx47(Box41, { width: outputTokensWidth, justifyContent: "flex-end", children: /* @__PURE__ */ jsx47(Text47, { bold: true, children: "Output Tokens" }) })
121928
+ return /* @__PURE__ */ jsxs45(Box42, { flexDirection: "column", marginTop: 1, children: [
121929
+ /* @__PURE__ */ jsxs45(Box42, { children: [
121930
+ /* @__PURE__ */ jsx48(Box42, { width: nameWidth, children: /* @__PURE__ */ jsx48(Text48, { bold: true, children: "Model Usage" }) }),
121931
+ /* @__PURE__ */ jsx48(Box42, { width: requestsWidth, justifyContent: "flex-end", children: /* @__PURE__ */ jsx48(Text48, { bold: true, children: "Reqs" }) }),
121932
+ /* @__PURE__ */ jsx48(Box42, { width: inputTokensWidth, justifyContent: "flex-end", children: /* @__PURE__ */ jsx48(Text48, { bold: true, children: "Input Tokens" }) }),
121933
+ /* @__PURE__ */ jsx48(Box42, { width: outputTokensWidth, justifyContent: "flex-end", children: /* @__PURE__ */ jsx48(Text48, { bold: true, children: "Output Tokens" }) })
121610
121934
  ] }),
121611
- /* @__PURE__ */ jsx47(
121612
- Box41,
121935
+ /* @__PURE__ */ jsx48(
121936
+ Box42,
121613
121937
  {
121614
121938
  borderStyle: "round",
121615
121939
  borderBottom: true,
@@ -121619,23 +121943,23 @@ var ModelUsageTable = ({ models, totalCachedTokens, cacheEfficiency }) => {
121619
121943
  width: nameWidth + requestsWidth + inputTokensWidth + outputTokensWidth
121620
121944
  }
121621
121945
  ),
121622
- Object.entries(models).map(([name2, modelMetrics]) => /* @__PURE__ */ jsxs44(Box41, { children: [
121623
- /* @__PURE__ */ jsx47(Box41, { width: nameWidth, children: /* @__PURE__ */ jsx47(Text47, { children: name2.replace("-001", "") }) }),
121624
- /* @__PURE__ */ jsx47(Box41, { width: requestsWidth, justifyContent: "flex-end", children: /* @__PURE__ */ jsx47(Text47, { children: modelMetrics.api.totalRequests }) }),
121625
- /* @__PURE__ */ jsx47(Box41, { width: inputTokensWidth, justifyContent: "flex-end", children: /* @__PURE__ */ jsx47(Text47, { color: theme.status.warning, children: modelMetrics.tokens.prompt.toLocaleString() }) }),
121626
- /* @__PURE__ */ jsx47(Box41, { width: outputTokensWidth, justifyContent: "flex-end", children: /* @__PURE__ */ jsx47(Text47, { color: theme.status.warning, children: modelMetrics.tokens.candidates.toLocaleString() }) })
121946
+ Object.entries(models).map(([name2, modelMetrics]) => /* @__PURE__ */ jsxs45(Box42, { children: [
121947
+ /* @__PURE__ */ jsx48(Box42, { width: nameWidth, children: /* @__PURE__ */ jsx48(Text48, { children: name2.replace("-001", "") }) }),
121948
+ /* @__PURE__ */ jsx48(Box42, { width: requestsWidth, justifyContent: "flex-end", children: /* @__PURE__ */ jsx48(Text48, { children: modelMetrics.api.totalRequests }) }),
121949
+ /* @__PURE__ */ jsx48(Box42, { width: inputTokensWidth, justifyContent: "flex-end", children: /* @__PURE__ */ jsx48(Text48, { color: theme.status.warning, children: modelMetrics.tokens.prompt.toLocaleString() }) }),
121950
+ /* @__PURE__ */ jsx48(Box42, { width: outputTokensWidth, justifyContent: "flex-end", children: /* @__PURE__ */ jsx48(Text48, { color: theme.status.warning, children: modelMetrics.tokens.candidates.toLocaleString() }) })
121627
121951
  ] }, name2)),
121628
- cacheEfficiency > 0 && /* @__PURE__ */ jsxs44(Box41, { flexDirection: "column", marginTop: 1, children: [
121629
- /* @__PURE__ */ jsxs44(Text47, { children: [
121630
- /* @__PURE__ */ jsx47(Text47, { color: theme.status.success, children: "Savings Highlight:" }),
121952
+ cacheEfficiency > 0 && /* @__PURE__ */ jsxs45(Box42, { flexDirection: "column", marginTop: 1, children: [
121953
+ /* @__PURE__ */ jsxs45(Text48, { children: [
121954
+ /* @__PURE__ */ jsx48(Text48, { color: theme.status.success, children: "Savings Highlight:" }),
121631
121955
  " ",
121632
121956
  totalCachedTokens.toLocaleString(),
121633
121957
  " (",
121634
121958
  cacheEfficiency.toFixed(1),
121635
121959
  "%) of input tokens were served from the cache, reducing costs."
121636
121960
  ] }),
121637
- /* @__PURE__ */ jsx47(Box41, { height: 1 }),
121638
- /* @__PURE__ */ jsx47(Text47, { color: theme.text.secondary, children: "\xBB Tip: For a full token breakdown, run `/stats model`." })
121961
+ /* @__PURE__ */ jsx48(Box42, { height: 1 }),
121962
+ /* @__PURE__ */ jsx48(Text48, { color: theme.text.secondary, children: "\xBB Tip: For a full token breakdown, run `/stats model`." })
121639
121963
  ] })
121640
121964
  ] });
121641
121965
  };
@@ -121662,12 +121986,12 @@ var StatsDisplay = ({
121662
121986
  );
121663
121987
  const renderTitle = () => {
121664
121988
  if (title) {
121665
- return theme.ui.gradient && theme.ui.gradient.length > 0 ? /* @__PURE__ */ jsx47(Gradient3, { colors: theme.ui.gradient, children: /* @__PURE__ */ jsx47(Text47, { bold: true, children: title }) }) : /* @__PURE__ */ jsx47(Text47, { bold: true, color: theme.text.accent, children: title });
121989
+ return theme.ui.gradient && theme.ui.gradient.length > 0 ? /* @__PURE__ */ jsx48(Gradient3, { colors: theme.ui.gradient, children: /* @__PURE__ */ jsx48(Text48, { bold: true, children: title }) }) : /* @__PURE__ */ jsx48(Text48, { bold: true, color: theme.text.accent, children: title });
121666
121990
  }
121667
- return /* @__PURE__ */ jsx47(Text47, { bold: true, color: theme.text.accent, children: "Session Stats" });
121991
+ return /* @__PURE__ */ jsx48(Text48, { bold: true, color: theme.text.accent, children: "Session Stats" });
121668
121992
  };
121669
- return /* @__PURE__ */ jsxs44(
121670
- Box41,
121993
+ return /* @__PURE__ */ jsxs45(
121994
+ Box42,
121671
121995
  {
121672
121996
  borderStyle: "round",
121673
121997
  borderColor: theme.border.default,
@@ -121676,73 +122000,73 @@ var StatsDisplay = ({
121676
122000
  paddingX: 2,
121677
122001
  children: [
121678
122002
  renderTitle(),
121679
- /* @__PURE__ */ jsx47(Box41, { height: 1 }),
121680
- /* @__PURE__ */ jsxs44(Section, { title: "Interaction Summary", children: [
121681
- /* @__PURE__ */ jsx47(StatRow, { title: "Session ID:", children: /* @__PURE__ */ jsx47(Text47, { children: stats.sessionId }) }),
121682
- /* @__PURE__ */ jsx47(StatRow, { title: "Tool Calls:", children: /* @__PURE__ */ jsxs44(Text47, { children: [
122003
+ /* @__PURE__ */ jsx48(Box42, { height: 1 }),
122004
+ /* @__PURE__ */ jsxs45(Section, { title: "Interaction Summary", children: [
122005
+ /* @__PURE__ */ jsx48(StatRow, { title: "Session ID:", children: /* @__PURE__ */ jsx48(Text48, { children: stats.sessionId }) }),
122006
+ /* @__PURE__ */ jsx48(StatRow, { title: "Tool Calls:", children: /* @__PURE__ */ jsxs45(Text48, { children: [
121683
122007
  tools.totalCalls,
121684
122008
  " (",
121685
122009
  " ",
121686
- /* @__PURE__ */ jsxs44(Text47, { color: theme.status.success, children: [
122010
+ /* @__PURE__ */ jsxs45(Text48, { color: theme.status.success, children: [
121687
122011
  "\u2714 ",
121688
122012
  tools.totalSuccess
121689
122013
  ] }),
121690
122014
  " ",
121691
- /* @__PURE__ */ jsxs44(Text47, { color: theme.status.error, children: [
122015
+ /* @__PURE__ */ jsxs45(Text48, { color: theme.status.error, children: [
121692
122016
  "\u2716 ",
121693
122017
  tools.totalFail
121694
122018
  ] }),
121695
122019
  " )"
121696
122020
  ] }) }),
121697
- /* @__PURE__ */ jsx47(StatRow, { title: "Success Rate:", children: /* @__PURE__ */ jsxs44(Text47, { color: successColor, children: [
122021
+ /* @__PURE__ */ jsx48(StatRow, { title: "Success Rate:", children: /* @__PURE__ */ jsxs45(Text48, { color: successColor, children: [
121698
122022
  computed.successRate.toFixed(1),
121699
122023
  "%"
121700
122024
  ] }) }),
121701
- computed.totalDecisions > 0 && /* @__PURE__ */ jsx47(StatRow, { title: "User Agreement:", children: /* @__PURE__ */ jsxs44(Text47, { color: agreementColor, children: [
122025
+ computed.totalDecisions > 0 && /* @__PURE__ */ jsx48(StatRow, { title: "User Agreement:", children: /* @__PURE__ */ jsxs45(Text48, { color: agreementColor, children: [
121702
122026
  computed.agreementRate.toFixed(1),
121703
122027
  "%",
121704
122028
  " ",
121705
- /* @__PURE__ */ jsxs44(Text47, { color: theme.text.secondary, children: [
122029
+ /* @__PURE__ */ jsxs45(Text48, { color: theme.text.secondary, children: [
121706
122030
  "(",
121707
122031
  computed.totalDecisions,
121708
122032
  " reviewed)"
121709
122033
  ] })
121710
122034
  ] }) }),
121711
- files && (files.totalLinesAdded > 0 || files.totalLinesRemoved > 0) && /* @__PURE__ */ jsx47(StatRow, { title: "Code Changes:", children: /* @__PURE__ */ jsxs44(Text47, { children: [
121712
- /* @__PURE__ */ jsxs44(Text47, { color: theme.status.success, children: [
122035
+ files && (files.totalLinesAdded > 0 || files.totalLinesRemoved > 0) && /* @__PURE__ */ jsx48(StatRow, { title: "Code Changes:", children: /* @__PURE__ */ jsxs45(Text48, { children: [
122036
+ /* @__PURE__ */ jsxs45(Text48, { color: theme.status.success, children: [
121713
122037
  "+",
121714
122038
  files.totalLinesAdded
121715
122039
  ] }),
121716
122040
  " ",
121717
- /* @__PURE__ */ jsxs44(Text47, { color: theme.status.error, children: [
122041
+ /* @__PURE__ */ jsxs45(Text48, { color: theme.status.error, children: [
121718
122042
  "-",
121719
122043
  files.totalLinesRemoved
121720
122044
  ] })
121721
122045
  ] }) })
121722
122046
  ] }),
121723
- /* @__PURE__ */ jsxs44(Section, { title: "Performance", children: [
121724
- /* @__PURE__ */ jsx47(StatRow, { title: "Wall Time:", children: /* @__PURE__ */ jsx47(Text47, { children: duration }) }),
121725
- /* @__PURE__ */ jsx47(StatRow, { title: "Agent Active:", children: /* @__PURE__ */ jsx47(Text47, { children: formatDuration(computed.agentActiveTime) }) }),
121726
- /* @__PURE__ */ jsx47(SubStatRow, { title: "API Time:", children: /* @__PURE__ */ jsxs44(Text47, { children: [
122047
+ /* @__PURE__ */ jsxs45(Section, { title: "Performance", children: [
122048
+ /* @__PURE__ */ jsx48(StatRow, { title: "Wall Time:", children: /* @__PURE__ */ jsx48(Text48, { children: duration }) }),
122049
+ /* @__PURE__ */ jsx48(StatRow, { title: "Agent Active:", children: /* @__PURE__ */ jsx48(Text48, { children: formatDuration(computed.agentActiveTime) }) }),
122050
+ /* @__PURE__ */ jsx48(SubStatRow, { title: "API Time:", children: /* @__PURE__ */ jsxs45(Text48, { children: [
121727
122051
  formatDuration(computed.totalApiTime),
121728
122052
  " ",
121729
- /* @__PURE__ */ jsxs44(Text47, { color: theme.text.secondary, children: [
122053
+ /* @__PURE__ */ jsxs45(Text48, { color: theme.text.secondary, children: [
121730
122054
  "(",
121731
122055
  computed.apiTimePercent.toFixed(1),
121732
122056
  "%)"
121733
122057
  ] })
121734
122058
  ] }) }),
121735
- /* @__PURE__ */ jsx47(SubStatRow, { title: "Tool Time:", children: /* @__PURE__ */ jsxs44(Text47, { children: [
122059
+ /* @__PURE__ */ jsx48(SubStatRow, { title: "Tool Time:", children: /* @__PURE__ */ jsxs45(Text48, { children: [
121736
122060
  formatDuration(computed.totalToolTime),
121737
122061
  " ",
121738
- /* @__PURE__ */ jsxs44(Text47, { color: theme.text.secondary, children: [
122062
+ /* @__PURE__ */ jsxs45(Text48, { color: theme.text.secondary, children: [
121739
122063
  "(",
121740
122064
  computed.toolTimePercent.toFixed(1),
121741
122065
  "%)"
121742
122066
  ] })
121743
122067
  ] }) })
121744
122068
  ] }),
121745
- Object.keys(models).length > 0 && /* @__PURE__ */ jsx47(
122069
+ Object.keys(models).length > 0 && /* @__PURE__ */ jsx48(
121746
122070
  ModelUsageTable,
121747
122071
  {
121748
122072
  models,
@@ -121756,8 +122080,8 @@ var StatsDisplay = ({
121756
122080
  };
121757
122081
 
121758
122082
  // packages/cli/src/ui/components/ModelStatsDisplay.tsx
121759
- import { Box as Box42, Text as Text48 } from "ink";
121760
- import { jsx as jsx48, jsxs as jsxs45 } from "react/jsx-runtime";
122083
+ import { Box as Box43, Text as Text49 } from "ink";
122084
+ import { jsx as jsx49, jsxs as jsxs46 } from "react/jsx-runtime";
121761
122085
  var METRIC_COL_WIDTH = 28;
121762
122086
  var MODEL_COL_WIDTH = 22;
121763
122087
  var StatRow2 = ({
@@ -121765,9 +122089,9 @@ var StatRow2 = ({
121765
122089
  values,
121766
122090
  isSubtle = false,
121767
122091
  isSection = false
121768
- }) => /* @__PURE__ */ jsxs45(Box42, { children: [
121769
- /* @__PURE__ */ jsx48(Box42, { width: METRIC_COL_WIDTH, children: /* @__PURE__ */ jsx48(Text48, { bold: isSection, color: isSection ? void 0 : Colors.LightBlue, children: isSubtle ? ` \u21B3 ${title}` : title }) }),
121770
- values.map((value, index) => /* @__PURE__ */ jsx48(Box42, { width: MODEL_COL_WIDTH, children: /* @__PURE__ */ jsx48(Text48, { children: value }) }, index))
122092
+ }) => /* @__PURE__ */ jsxs46(Box43, { children: [
122093
+ /* @__PURE__ */ jsx49(Box43, { width: METRIC_COL_WIDTH, children: /* @__PURE__ */ jsx49(Text49, { bold: isSection, color: isSection ? void 0 : Colors.LightBlue, children: isSubtle ? ` \u21B3 ${title}` : title }) }),
122094
+ values.map((value, index) => /* @__PURE__ */ jsx49(Box43, { width: MODEL_COL_WIDTH, children: /* @__PURE__ */ jsx49(Text49, { children: value }) }, index))
121771
122095
  ] });
121772
122096
  var ModelStatsDisplay = () => {
121773
122097
  const { stats } = useSessionStats();
@@ -121776,14 +122100,14 @@ var ModelStatsDisplay = () => {
121776
122100
  ([, metrics2]) => metrics2.api.totalRequests > 0
121777
122101
  );
121778
122102
  if (activeModels.length === 0) {
121779
- return /* @__PURE__ */ jsx48(
121780
- Box42,
122103
+ return /* @__PURE__ */ jsx49(
122104
+ Box43,
121781
122105
  {
121782
122106
  borderStyle: "round",
121783
122107
  borderColor: Colors.Gray,
121784
122108
  paddingY: 1,
121785
122109
  paddingX: 2,
121786
- children: /* @__PURE__ */ jsx48(Text48, { children: "No API calls have been made in this session." })
122110
+ children: /* @__PURE__ */ jsx49(Text49, { children: "No API calls have been made in this session." })
121787
122111
  }
121788
122112
  );
121789
122113
  }
@@ -121796,8 +122120,8 @@ var ModelStatsDisplay = () => {
121796
122120
  const hasCached = activeModels.some(
121797
122121
  ([, metrics2]) => metrics2.tokens.cached > 0
121798
122122
  );
121799
- return /* @__PURE__ */ jsxs45(
121800
- Box42,
122123
+ return /* @__PURE__ */ jsxs46(
122124
+ Box43,
121801
122125
  {
121802
122126
  borderStyle: "round",
121803
122127
  borderColor: Colors.Gray,
@@ -121805,14 +122129,14 @@ var ModelStatsDisplay = () => {
121805
122129
  paddingY: 1,
121806
122130
  paddingX: 2,
121807
122131
  children: [
121808
- /* @__PURE__ */ jsx48(Text48, { bold: true, color: Colors.AccentPurple, children: "Model Stats For Nerds" }),
121809
- /* @__PURE__ */ jsx48(Box42, { height: 1 }),
121810
- /* @__PURE__ */ jsxs45(Box42, { children: [
121811
- /* @__PURE__ */ jsx48(Box42, { width: METRIC_COL_WIDTH, children: /* @__PURE__ */ jsx48(Text48, { bold: true, children: "Metric" }) }),
121812
- modelNames.map((name2) => /* @__PURE__ */ jsx48(Box42, { width: MODEL_COL_WIDTH, children: /* @__PURE__ */ jsx48(Text48, { bold: true, children: name2 }) }, name2))
122132
+ /* @__PURE__ */ jsx49(Text49, { bold: true, color: Colors.AccentPurple, children: "Model Stats For Nerds" }),
122133
+ /* @__PURE__ */ jsx49(Box43, { height: 1 }),
122134
+ /* @__PURE__ */ jsxs46(Box43, { children: [
122135
+ /* @__PURE__ */ jsx49(Box43, { width: METRIC_COL_WIDTH, children: /* @__PURE__ */ jsx49(Text49, { bold: true, children: "Metric" }) }),
122136
+ modelNames.map((name2) => /* @__PURE__ */ jsx49(Box43, { width: MODEL_COL_WIDTH, children: /* @__PURE__ */ jsx49(Text49, { bold: true, children: name2 }) }, name2))
121813
122137
  ] }),
121814
- /* @__PURE__ */ jsx48(
121815
- Box42,
122138
+ /* @__PURE__ */ jsx49(
122139
+ Box43,
121816
122140
  {
121817
122141
  borderStyle: "single",
121818
122142
  borderBottom: true,
@@ -121821,22 +122145,22 @@ var ModelStatsDisplay = () => {
121821
122145
  borderRight: false
121822
122146
  }
121823
122147
  ),
121824
- /* @__PURE__ */ jsx48(StatRow2, { title: "API", values: [], isSection: true }),
121825
- /* @__PURE__ */ jsx48(
122148
+ /* @__PURE__ */ jsx49(StatRow2, { title: "API", values: [], isSection: true }),
122149
+ /* @__PURE__ */ jsx49(
121826
122150
  StatRow2,
121827
122151
  {
121828
122152
  title: "Requests",
121829
122153
  values: getModelValues((m) => m.api.totalRequests.toLocaleString())
121830
122154
  }
121831
122155
  ),
121832
- /* @__PURE__ */ jsx48(
122156
+ /* @__PURE__ */ jsx49(
121833
122157
  StatRow2,
121834
122158
  {
121835
122159
  title: "Errors",
121836
122160
  values: getModelValues((m) => {
121837
122161
  const errorRate = calculateErrorRate(m);
121838
- return /* @__PURE__ */ jsxs45(
121839
- Text48,
122162
+ return /* @__PURE__ */ jsxs46(
122163
+ Text49,
121840
122164
  {
121841
122165
  color: m.api.totalErrors > 0 ? Colors.AccentRed : Colors.Foreground,
121842
122166
  children: [
@@ -121850,7 +122174,7 @@ var ModelStatsDisplay = () => {
121850
122174
  })
121851
122175
  }
121852
122176
  ),
121853
- /* @__PURE__ */ jsx48(
122177
+ /* @__PURE__ */ jsx49(
121854
122178
  StatRow2,
121855
122179
  {
121856
122180
  title: "Avg Latency",
@@ -121860,16 +122184,16 @@ var ModelStatsDisplay = () => {
121860
122184
  })
121861
122185
  }
121862
122186
  ),
121863
- /* @__PURE__ */ jsx48(Box42, { height: 1 }),
121864
- /* @__PURE__ */ jsx48(StatRow2, { title: "Tokens", values: [], isSection: true }),
121865
- /* @__PURE__ */ jsx48(
122187
+ /* @__PURE__ */ jsx49(Box43, { height: 1 }),
122188
+ /* @__PURE__ */ jsx49(StatRow2, { title: "Tokens", values: [], isSection: true }),
122189
+ /* @__PURE__ */ jsx49(
121866
122190
  StatRow2,
121867
122191
  {
121868
122192
  title: "Total",
121869
- values: getModelValues((m) => /* @__PURE__ */ jsx48(Text48, { color: Colors.AccentYellow, children: m.tokens.total.toLocaleString() }))
122193
+ values: getModelValues((m) => /* @__PURE__ */ jsx49(Text49, { color: Colors.AccentYellow, children: m.tokens.total.toLocaleString() }))
121870
122194
  }
121871
122195
  ),
121872
- /* @__PURE__ */ jsx48(
122196
+ /* @__PURE__ */ jsx49(
121873
122197
  StatRow2,
121874
122198
  {
121875
122199
  title: "Prompt",
@@ -121877,14 +122201,14 @@ var ModelStatsDisplay = () => {
121877
122201
  values: getModelValues((m) => m.tokens.prompt.toLocaleString())
121878
122202
  }
121879
122203
  ),
121880
- hasCached && /* @__PURE__ */ jsx48(
122204
+ hasCached && /* @__PURE__ */ jsx49(
121881
122205
  StatRow2,
121882
122206
  {
121883
122207
  title: "Cached",
121884
122208
  isSubtle: true,
121885
122209
  values: getModelValues((m) => {
121886
122210
  const cacheHitRate = calculateCacheHitRate(m);
121887
- return /* @__PURE__ */ jsxs45(Text48, { color: Colors.AccentGreen, children: [
122211
+ return /* @__PURE__ */ jsxs46(Text49, { color: Colors.AccentGreen, children: [
121888
122212
  m.tokens.cached.toLocaleString(),
121889
122213
  " (",
121890
122214
  cacheHitRate.toFixed(1),
@@ -121893,7 +122217,7 @@ var ModelStatsDisplay = () => {
121893
122217
  })
121894
122218
  }
121895
122219
  ),
121896
- hasThoughts && /* @__PURE__ */ jsx48(
122220
+ hasThoughts && /* @__PURE__ */ jsx49(
121897
122221
  StatRow2,
121898
122222
  {
121899
122223
  title: "Thoughts",
@@ -121901,7 +122225,7 @@ var ModelStatsDisplay = () => {
121901
122225
  values: getModelValues((m) => m.tokens.thoughts.toLocaleString())
121902
122226
  }
121903
122227
  ),
121904
- hasTool && /* @__PURE__ */ jsx48(
122228
+ hasTool && /* @__PURE__ */ jsx49(
121905
122229
  StatRow2,
121906
122230
  {
121907
122231
  title: "Tool",
@@ -121909,7 +122233,7 @@ var ModelStatsDisplay = () => {
121909
122233
  values: getModelValues((m) => m.tokens.tool.toLocaleString())
121910
122234
  }
121911
122235
  ),
121912
- /* @__PURE__ */ jsx48(
122236
+ /* @__PURE__ */ jsx49(
121913
122237
  StatRow2,
121914
122238
  {
121915
122239
  title: "Output",
@@ -121923,8 +122247,8 @@ var ModelStatsDisplay = () => {
121923
122247
  };
121924
122248
 
121925
122249
  // packages/cli/src/ui/components/ToolStatsDisplay.tsx
121926
- import { Box as Box43, Text as Text49 } from "ink";
121927
- import { jsx as jsx49, jsxs as jsxs46 } from "react/jsx-runtime";
122250
+ import { Box as Box44, Text as Text50 } from "ink";
122251
+ import { jsx as jsx50, jsxs as jsxs47 } from "react/jsx-runtime";
121928
122252
  var TOOL_NAME_COL_WIDTH = 25;
121929
122253
  var CALLS_COL_WIDTH = 8;
121930
122254
  var SUCCESS_RATE_COL_WIDTH = 15;
@@ -121936,14 +122260,14 @@ var StatRow3 = ({ name: name2, stats }) => {
121936
122260
  green: TOOL_SUCCESS_RATE_HIGH,
121937
122261
  yellow: TOOL_SUCCESS_RATE_MEDIUM
121938
122262
  });
121939
- return /* @__PURE__ */ jsxs46(Box43, { children: [
121940
- /* @__PURE__ */ jsx49(Box43, { width: TOOL_NAME_COL_WIDTH, children: /* @__PURE__ */ jsx49(Text49, { color: Colors.LightBlue, children: name2 }) }),
121941
- /* @__PURE__ */ jsx49(Box43, { width: CALLS_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx49(Text49, { children: stats.count }) }),
121942
- /* @__PURE__ */ jsx49(Box43, { width: SUCCESS_RATE_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsxs46(Text49, { color: successColor, children: [
122263
+ return /* @__PURE__ */ jsxs47(Box44, { children: [
122264
+ /* @__PURE__ */ jsx50(Box44, { width: TOOL_NAME_COL_WIDTH, children: /* @__PURE__ */ jsx50(Text50, { color: Colors.LightBlue, children: name2 }) }),
122265
+ /* @__PURE__ */ jsx50(Box44, { width: CALLS_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx50(Text50, { children: stats.count }) }),
122266
+ /* @__PURE__ */ jsx50(Box44, { width: SUCCESS_RATE_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsxs47(Text50, { color: successColor, children: [
121943
122267
  successRate.toFixed(1),
121944
122268
  "%"
121945
122269
  ] }) }),
121946
- /* @__PURE__ */ jsx49(Box43, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx49(Text49, { children: formatDuration(avgDuration) }) })
122270
+ /* @__PURE__ */ jsx50(Box44, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx50(Text50, { children: formatDuration(avgDuration) }) })
121947
122271
  ] });
121948
122272
  };
121949
122273
  var ToolStatsDisplay = () => {
@@ -121953,14 +122277,14 @@ var ToolStatsDisplay = () => {
121953
122277
  ([, metrics2]) => metrics2.count > 0
121954
122278
  );
121955
122279
  if (activeTools.length === 0) {
121956
- return /* @__PURE__ */ jsx49(
121957
- Box43,
122280
+ return /* @__PURE__ */ jsx50(
122281
+ Box44,
121958
122282
  {
121959
122283
  borderStyle: "round",
121960
122284
  borderColor: Colors.Gray,
121961
122285
  paddingY: 1,
121962
122286
  paddingX: 2,
121963
- children: /* @__PURE__ */ jsx49(Text49, { children: "No tool calls have been made in this session." })
122287
+ children: /* @__PURE__ */ jsx50(Text50, { children: "No tool calls have been made in this session." })
121964
122288
  }
121965
122289
  );
121966
122290
  }
@@ -121979,8 +122303,8 @@ var ToolStatsDisplay = () => {
121979
122303
  green: USER_AGREEMENT_RATE_HIGH,
121980
122304
  yellow: USER_AGREEMENT_RATE_MEDIUM
121981
122305
  });
121982
- return /* @__PURE__ */ jsxs46(
121983
- Box43,
122306
+ return /* @__PURE__ */ jsxs47(
122307
+ Box44,
121984
122308
  {
121985
122309
  borderStyle: "round",
121986
122310
  borderColor: Colors.Gray,
@@ -121989,16 +122313,16 @@ var ToolStatsDisplay = () => {
121989
122313
  paddingX: 2,
121990
122314
  width: 70,
121991
122315
  children: [
121992
- /* @__PURE__ */ jsx49(Text49, { bold: true, color: Colors.AccentPurple, children: "Tool Stats For Nerds" }),
121993
- /* @__PURE__ */ jsx49(Box43, { height: 1 }),
121994
- /* @__PURE__ */ jsxs46(Box43, { children: [
121995
- /* @__PURE__ */ jsx49(Box43, { width: TOOL_NAME_COL_WIDTH, children: /* @__PURE__ */ jsx49(Text49, { bold: true, children: "Tool Name" }) }),
121996
- /* @__PURE__ */ jsx49(Box43, { width: CALLS_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx49(Text49, { bold: true, children: "Calls" }) }),
121997
- /* @__PURE__ */ jsx49(Box43, { width: SUCCESS_RATE_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx49(Text49, { bold: true, children: "Success Rate" }) }),
121998
- /* @__PURE__ */ jsx49(Box43, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx49(Text49, { bold: true, children: "Avg Duration" }) })
122316
+ /* @__PURE__ */ jsx50(Text50, { bold: true, color: Colors.AccentPurple, children: "Tool Stats For Nerds" }),
122317
+ /* @__PURE__ */ jsx50(Box44, { height: 1 }),
122318
+ /* @__PURE__ */ jsxs47(Box44, { children: [
122319
+ /* @__PURE__ */ jsx50(Box44, { width: TOOL_NAME_COL_WIDTH, children: /* @__PURE__ */ jsx50(Text50, { bold: true, children: "Tool Name" }) }),
122320
+ /* @__PURE__ */ jsx50(Box44, { width: CALLS_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx50(Text50, { bold: true, children: "Calls" }) }),
122321
+ /* @__PURE__ */ jsx50(Box44, { width: SUCCESS_RATE_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx50(Text50, { bold: true, children: "Success Rate" }) }),
122322
+ /* @__PURE__ */ jsx50(Box44, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx50(Text50, { bold: true, children: "Avg Duration" }) })
121999
122323
  ] }),
122000
- /* @__PURE__ */ jsx49(
122001
- Box43,
122324
+ /* @__PURE__ */ jsx50(
122325
+ Box44,
122002
122326
  {
122003
122327
  borderStyle: "single",
122004
122328
  borderBottom: true,
@@ -122008,51 +122332,51 @@ var ToolStatsDisplay = () => {
122008
122332
  width: "100%"
122009
122333
  }
122010
122334
  ),
122011
- activeTools.map(([name2, stats2]) => /* @__PURE__ */ jsx49(StatRow3, { name: name2, stats: stats2 }, name2)),
122012
- /* @__PURE__ */ jsx49(Box43, { height: 1 }),
122013
- /* @__PURE__ */ jsx49(Text49, { bold: true, children: "User Decision Summary" }),
122014
- /* @__PURE__ */ jsxs46(Box43, { children: [
122015
- /* @__PURE__ */ jsx49(
122016
- Box43,
122335
+ activeTools.map(([name2, stats2]) => /* @__PURE__ */ jsx50(StatRow3, { name: name2, stats: stats2 }, name2)),
122336
+ /* @__PURE__ */ jsx50(Box44, { height: 1 }),
122337
+ /* @__PURE__ */ jsx50(Text50, { bold: true, children: "User Decision Summary" }),
122338
+ /* @__PURE__ */ jsxs47(Box44, { children: [
122339
+ /* @__PURE__ */ jsx50(
122340
+ Box44,
122017
122341
  {
122018
122342
  width: TOOL_NAME_COL_WIDTH + CALLS_COL_WIDTH + SUCCESS_RATE_COL_WIDTH,
122019
- children: /* @__PURE__ */ jsx49(Text49, { color: Colors.LightBlue, children: "Total Reviewed Suggestions:" })
122343
+ children: /* @__PURE__ */ jsx50(Text50, { color: Colors.LightBlue, children: "Total Reviewed Suggestions:" })
122020
122344
  }
122021
122345
  ),
122022
- /* @__PURE__ */ jsx49(Box43, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx49(Text49, { children: totalReviewed }) })
122346
+ /* @__PURE__ */ jsx50(Box44, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx50(Text50, { children: totalReviewed }) })
122023
122347
  ] }),
122024
- /* @__PURE__ */ jsxs46(Box43, { children: [
122025
- /* @__PURE__ */ jsx49(
122026
- Box43,
122348
+ /* @__PURE__ */ jsxs47(Box44, { children: [
122349
+ /* @__PURE__ */ jsx50(
122350
+ Box44,
122027
122351
  {
122028
122352
  width: TOOL_NAME_COL_WIDTH + CALLS_COL_WIDTH + SUCCESS_RATE_COL_WIDTH,
122029
- children: /* @__PURE__ */ jsx49(Text49, { children: " \xBB Accepted:" })
122353
+ children: /* @__PURE__ */ jsx50(Text50, { children: " \xBB Accepted:" })
122030
122354
  }
122031
122355
  ),
122032
- /* @__PURE__ */ jsx49(Box43, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx49(Text49, { color: Colors.AccentGreen, children: totalDecisions.accept }) })
122356
+ /* @__PURE__ */ jsx50(Box44, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx50(Text50, { color: Colors.AccentGreen, children: totalDecisions.accept }) })
122033
122357
  ] }),
122034
- /* @__PURE__ */ jsxs46(Box43, { children: [
122035
- /* @__PURE__ */ jsx49(
122036
- Box43,
122358
+ /* @__PURE__ */ jsxs47(Box44, { children: [
122359
+ /* @__PURE__ */ jsx50(
122360
+ Box44,
122037
122361
  {
122038
122362
  width: TOOL_NAME_COL_WIDTH + CALLS_COL_WIDTH + SUCCESS_RATE_COL_WIDTH,
122039
- children: /* @__PURE__ */ jsx49(Text49, { children: " \xBB Rejected:" })
122363
+ children: /* @__PURE__ */ jsx50(Text50, { children: " \xBB Rejected:" })
122040
122364
  }
122041
122365
  ),
122042
- /* @__PURE__ */ jsx49(Box43, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx49(Text49, { color: Colors.AccentRed, children: totalDecisions.reject }) })
122366
+ /* @__PURE__ */ jsx50(Box44, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx50(Text50, { color: Colors.AccentRed, children: totalDecisions.reject }) })
122043
122367
  ] }),
122044
- /* @__PURE__ */ jsxs46(Box43, { children: [
122045
- /* @__PURE__ */ jsx49(
122046
- Box43,
122368
+ /* @__PURE__ */ jsxs47(Box44, { children: [
122369
+ /* @__PURE__ */ jsx50(
122370
+ Box44,
122047
122371
  {
122048
122372
  width: TOOL_NAME_COL_WIDTH + CALLS_COL_WIDTH + SUCCESS_RATE_COL_WIDTH,
122049
- children: /* @__PURE__ */ jsx49(Text49, { children: " \xBB Modified:" })
122373
+ children: /* @__PURE__ */ jsx50(Text50, { children: " \xBB Modified:" })
122050
122374
  }
122051
122375
  ),
122052
- /* @__PURE__ */ jsx49(Box43, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx49(Text49, { color: Colors.AccentYellow, children: totalDecisions.modify }) })
122376
+ /* @__PURE__ */ jsx50(Box44, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx50(Text50, { color: Colors.AccentYellow, children: totalDecisions.modify }) })
122053
122377
  ] }),
122054
- /* @__PURE__ */ jsx49(
122055
- Box43,
122378
+ /* @__PURE__ */ jsx50(
122379
+ Box44,
122056
122380
  {
122057
122381
  borderStyle: "single",
122058
122382
  borderBottom: true,
@@ -122062,15 +122386,15 @@ var ToolStatsDisplay = () => {
122062
122386
  width: "100%"
122063
122387
  }
122064
122388
  ),
122065
- /* @__PURE__ */ jsxs46(Box43, { children: [
122066
- /* @__PURE__ */ jsx49(
122067
- Box43,
122389
+ /* @__PURE__ */ jsxs47(Box44, { children: [
122390
+ /* @__PURE__ */ jsx50(
122391
+ Box44,
122068
122392
  {
122069
122393
  width: TOOL_NAME_COL_WIDTH + CALLS_COL_WIDTH + SUCCESS_RATE_COL_WIDTH,
122070
- children: /* @__PURE__ */ jsx49(Text49, { children: " Overall Agreement Rate:" })
122394
+ children: /* @__PURE__ */ jsx50(Text50, { children: " Overall Agreement Rate:" })
122071
122395
  }
122072
122396
  ),
122073
- /* @__PURE__ */ jsx49(Box43, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx49(Text49, { bold: true, color: totalReviewed > 0 ? agreementColor : void 0, children: totalReviewed > 0 ? `${agreementRate.toFixed(1)}%` : "--" }) })
122397
+ /* @__PURE__ */ jsx50(Box44, { width: AVG_DURATION_COL_WIDTH, justifyContent: "flex-end", children: /* @__PURE__ */ jsx50(Text50, { bold: true, color: totalReviewed > 0 ? agreementColor : void 0, children: totalReviewed > 0 ? `${agreementRate.toFixed(1)}%` : "--" }) })
122074
122398
  ] })
122075
122399
  ]
122076
122400
  }
@@ -122078,16 +122402,16 @@ var ToolStatsDisplay = () => {
122078
122402
  };
122079
122403
 
122080
122404
  // packages/cli/src/ui/components/SessionSummaryDisplay.tsx
122081
- import { jsx as jsx50 } from "react/jsx-runtime";
122405
+ import { jsx as jsx51 } from "react/jsx-runtime";
122082
122406
  var SessionSummaryDisplay = ({
122083
122407
  duration
122084
- }) => /* @__PURE__ */ jsx50(StatsDisplay, { title: "Agent powering down. Goodbye!", duration });
122408
+ }) => /* @__PURE__ */ jsx51(StatsDisplay, { title: "Agent powering down. Goodbye!", duration });
122085
122409
 
122086
122410
  // packages/cli/src/ui/components/Help.tsx
122087
- import { Box as Box44, Text as Text50 } from "ink";
122088
- import { jsx as jsx51, jsxs as jsxs47 } from "react/jsx-runtime";
122089
- var Help = ({ commands }) => /* @__PURE__ */ jsxs47(
122090
- Box44,
122411
+ import { Box as Box45, Text as Text51 } from "ink";
122412
+ import { jsx as jsx52, jsxs as jsxs48 } from "react/jsx-runtime";
122413
+ var Help = ({ commands }) => /* @__PURE__ */ jsxs48(
122414
+ Box45,
122091
122415
  {
122092
122416
  flexDirection: "column",
122093
122417
  marginBottom: 1,
@@ -122095,123 +122419,123 @@ var Help = ({ commands }) => /* @__PURE__ */ jsxs47(
122095
122419
  borderStyle: "round",
122096
122420
  padding: 1,
122097
122421
  children: [
122098
- /* @__PURE__ */ jsx51(Text50, { bold: true, color: Colors.Foreground, children: "Basics:" }),
122099
- /* @__PURE__ */ jsxs47(Text50, { color: Colors.Foreground, children: [
122100
- /* @__PURE__ */ jsx51(Text50, { bold: true, color: Colors.AccentPurple, children: "Add context" }),
122422
+ /* @__PURE__ */ jsx52(Text51, { bold: true, color: Colors.Foreground, children: "Basics:" }),
122423
+ /* @__PURE__ */ jsxs48(Text51, { color: Colors.Foreground, children: [
122424
+ /* @__PURE__ */ jsx52(Text51, { bold: true, color: Colors.AccentPurple, children: "Add context" }),
122101
122425
  ": Use",
122102
122426
  " ",
122103
- /* @__PURE__ */ jsx51(Text50, { bold: true, color: Colors.AccentPurple, children: "@" }),
122427
+ /* @__PURE__ */ jsx52(Text51, { bold: true, color: Colors.AccentPurple, children: "@" }),
122104
122428
  " ",
122105
122429
  "to specify files for context (e.g.,",
122106
122430
  " ",
122107
- /* @__PURE__ */ jsx51(Text50, { bold: true, color: Colors.AccentPurple, children: "@src/myFile.ts" }),
122431
+ /* @__PURE__ */ jsx52(Text51, { bold: true, color: Colors.AccentPurple, children: "@src/myFile.ts" }),
122108
122432
  ") to target specific files or folders."
122109
122433
  ] }),
122110
- /* @__PURE__ */ jsxs47(Text50, { color: Colors.Foreground, children: [
122111
- /* @__PURE__ */ jsx51(Text50, { bold: true, color: Colors.AccentPurple, children: "Shell mode" }),
122434
+ /* @__PURE__ */ jsxs48(Text51, { color: Colors.Foreground, children: [
122435
+ /* @__PURE__ */ jsx52(Text51, { bold: true, color: Colors.AccentPurple, children: "Shell mode" }),
122112
122436
  ": Execute shell commands via",
122113
122437
  " ",
122114
- /* @__PURE__ */ jsx51(Text50, { bold: true, color: Colors.AccentPurple, children: "!" }),
122438
+ /* @__PURE__ */ jsx52(Text51, { bold: true, color: Colors.AccentPurple, children: "!" }),
122115
122439
  " ",
122116
122440
  "(e.g.,",
122117
122441
  " ",
122118
- /* @__PURE__ */ jsx51(Text50, { bold: true, color: Colors.AccentPurple, children: "!npm run start" }),
122442
+ /* @__PURE__ */ jsx52(Text51, { bold: true, color: Colors.AccentPurple, children: "!npm run start" }),
122119
122443
  ") or use natural language (e.g.",
122120
122444
  " ",
122121
- /* @__PURE__ */ jsx51(Text50, { bold: true, color: Colors.AccentPurple, children: "start server" }),
122445
+ /* @__PURE__ */ jsx52(Text51, { bold: true, color: Colors.AccentPurple, children: "start server" }),
122122
122446
  ")."
122123
122447
  ] }),
122124
- /* @__PURE__ */ jsx51(Box44, { height: 1 }),
122125
- /* @__PURE__ */ jsx51(Text50, { bold: true, color: Colors.Foreground, children: "Commands:" }),
122126
- commands.filter((command) => command.description).map((command) => /* @__PURE__ */ jsxs47(Box44, { flexDirection: "column", children: [
122127
- /* @__PURE__ */ jsxs47(Text50, { color: Colors.Foreground, children: [
122128
- /* @__PURE__ */ jsxs47(Text50, { bold: true, color: Colors.AccentPurple, children: [
122448
+ /* @__PURE__ */ jsx52(Box45, { height: 1 }),
122449
+ /* @__PURE__ */ jsx52(Text51, { bold: true, color: Colors.Foreground, children: "Commands:" }),
122450
+ commands.filter((command) => command.description).map((command) => /* @__PURE__ */ jsxs48(Box45, { flexDirection: "column", children: [
122451
+ /* @__PURE__ */ jsxs48(Text51, { color: Colors.Foreground, children: [
122452
+ /* @__PURE__ */ jsxs48(Text51, { bold: true, color: Colors.AccentPurple, children: [
122129
122453
  " ",
122130
122454
  "/",
122131
122455
  command.name
122132
122456
  ] }),
122133
122457
  command.description && " - " + command.description
122134
122458
  ] }),
122135
- command.subCommands && command.subCommands.map((subCommand) => /* @__PURE__ */ jsxs47(Text50, { color: Colors.Foreground, children: [
122136
- /* @__PURE__ */ jsxs47(Text50, { bold: true, color: Colors.AccentPurple, children: [
122459
+ command.subCommands && command.subCommands.map((subCommand) => /* @__PURE__ */ jsxs48(Text51, { color: Colors.Foreground, children: [
122460
+ /* @__PURE__ */ jsxs48(Text51, { bold: true, color: Colors.AccentPurple, children: [
122137
122461
  " ",
122138
122462
  subCommand.name
122139
122463
  ] }),
122140
122464
  subCommand.description && " - " + subCommand.description
122141
122465
  ] }, subCommand.name))
122142
122466
  ] }, command.name)),
122143
- /* @__PURE__ */ jsxs47(Text50, { color: Colors.Foreground, children: [
122144
- /* @__PURE__ */ jsxs47(Text50, { bold: true, color: Colors.AccentPurple, children: [
122467
+ /* @__PURE__ */ jsxs48(Text51, { color: Colors.Foreground, children: [
122468
+ /* @__PURE__ */ jsxs48(Text51, { bold: true, color: Colors.AccentPurple, children: [
122145
122469
  " ",
122146
122470
  "!",
122147
122471
  " "
122148
122472
  ] }),
122149
122473
  "- shell command"
122150
122474
  ] }),
122151
- /* @__PURE__ */ jsx51(Box44, { height: 1 }),
122152
- /* @__PURE__ */ jsx51(Text50, { bold: true, color: Colors.Foreground, children: "Keyboard Shortcuts:" }),
122153
- /* @__PURE__ */ jsxs47(Text50, { color: Colors.Foreground, children: [
122154
- /* @__PURE__ */ jsx51(Text50, { bold: true, color: Colors.AccentPurple, children: "Alt+Left/Right" }),
122475
+ /* @__PURE__ */ jsx52(Box45, { height: 1 }),
122476
+ /* @__PURE__ */ jsx52(Text51, { bold: true, color: Colors.Foreground, children: "Keyboard Shortcuts:" }),
122477
+ /* @__PURE__ */ jsxs48(Text51, { color: Colors.Foreground, children: [
122478
+ /* @__PURE__ */ jsx52(Text51, { bold: true, color: Colors.AccentPurple, children: "Alt+Left/Right" }),
122155
122479
  " ",
122156
122480
  "- Jump through words in the input"
122157
122481
  ] }),
122158
- /* @__PURE__ */ jsxs47(Text50, { color: Colors.Foreground, children: [
122159
- /* @__PURE__ */ jsx51(Text50, { bold: true, color: Colors.AccentPurple, children: "Ctrl+C" }),
122482
+ /* @__PURE__ */ jsxs48(Text51, { color: Colors.Foreground, children: [
122483
+ /* @__PURE__ */ jsx52(Text51, { bold: true, color: Colors.AccentPurple, children: "Ctrl+C" }),
122160
122484
  " ",
122161
122485
  "- Quit application"
122162
122486
  ] }),
122163
- /* @__PURE__ */ jsxs47(Text50, { color: Colors.Foreground, children: [
122164
- /* @__PURE__ */ jsx51(Text50, { bold: true, color: Colors.AccentPurple, children: process.platform === "win32" ? "Ctrl+Enter" : "Ctrl+J" }),
122487
+ /* @__PURE__ */ jsxs48(Text51, { color: Colors.Foreground, children: [
122488
+ /* @__PURE__ */ jsx52(Text51, { bold: true, color: Colors.AccentPurple, children: process.platform === "win32" ? "Ctrl+Enter" : "Ctrl+J" }),
122165
122489
  " ",
122166
122490
  process.platform === "linux" ? "- New line (Alt+Enter works for certain linux distros)" : "- New line"
122167
122491
  ] }),
122168
- /* @__PURE__ */ jsxs47(Text50, { color: Colors.Foreground, children: [
122169
- /* @__PURE__ */ jsx51(Text50, { bold: true, color: Colors.AccentPurple, children: "Ctrl+L" }),
122492
+ /* @__PURE__ */ jsxs48(Text51, { color: Colors.Foreground, children: [
122493
+ /* @__PURE__ */ jsx52(Text51, { bold: true, color: Colors.AccentPurple, children: "Ctrl+L" }),
122170
122494
  " ",
122171
122495
  "- Clear the screen"
122172
122496
  ] }),
122173
- /* @__PURE__ */ jsxs47(Text50, { color: Colors.Foreground, children: [
122174
- /* @__PURE__ */ jsx51(Text50, { bold: true, color: Colors.AccentPurple, children: process.platform === "darwin" ? "Ctrl+X / Meta+Enter" : "Ctrl+X" }),
122497
+ /* @__PURE__ */ jsxs48(Text51, { color: Colors.Foreground, children: [
122498
+ /* @__PURE__ */ jsx52(Text51, { bold: true, color: Colors.AccentPurple, children: process.platform === "darwin" ? "Ctrl+X / Meta+Enter" : "Ctrl+X" }),
122175
122499
  " ",
122176
122500
  "- Open input in external editor"
122177
122501
  ] }),
122178
- /* @__PURE__ */ jsxs47(Text50, { color: Colors.Foreground, children: [
122179
- /* @__PURE__ */ jsx51(Text50, { bold: true, color: Colors.AccentPurple, children: "Ctrl+Y" }),
122502
+ /* @__PURE__ */ jsxs48(Text51, { color: Colors.Foreground, children: [
122503
+ /* @__PURE__ */ jsx52(Text51, { bold: true, color: Colors.AccentPurple, children: "Ctrl+Y" }),
122180
122504
  " ",
122181
122505
  "- Toggle YOLO mode"
122182
122506
  ] }),
122183
- /* @__PURE__ */ jsxs47(Text50, { color: Colors.Foreground, children: [
122184
- /* @__PURE__ */ jsx51(Text50, { bold: true, color: Colors.AccentPurple, children: "Enter" }),
122507
+ /* @__PURE__ */ jsxs48(Text51, { color: Colors.Foreground, children: [
122508
+ /* @__PURE__ */ jsx52(Text51, { bold: true, color: Colors.AccentPurple, children: "Enter" }),
122185
122509
  " ",
122186
122510
  "- Send message"
122187
122511
  ] }),
122188
- /* @__PURE__ */ jsxs47(Text50, { color: Colors.Foreground, children: [
122189
- /* @__PURE__ */ jsx51(Text50, { bold: true, color: Colors.AccentPurple, children: "Esc" }),
122512
+ /* @__PURE__ */ jsxs48(Text51, { color: Colors.Foreground, children: [
122513
+ /* @__PURE__ */ jsx52(Text51, { bold: true, color: Colors.AccentPurple, children: "Esc" }),
122190
122514
  " ",
122191
122515
  "- Cancel operation"
122192
122516
  ] }),
122193
- /* @__PURE__ */ jsxs47(Text50, { color: Colors.Foreground, children: [
122194
- /* @__PURE__ */ jsx51(Text50, { bold: true, color: Colors.AccentPurple, children: "Shift+Tab" }),
122517
+ /* @__PURE__ */ jsxs48(Text51, { color: Colors.Foreground, children: [
122518
+ /* @__PURE__ */ jsx52(Text51, { bold: true, color: Colors.AccentPurple, children: "Shift+Tab" }),
122195
122519
  " ",
122196
122520
  "- Toggle auto-accepting edits"
122197
122521
  ] }),
122198
- /* @__PURE__ */ jsxs47(Text50, { color: Colors.Foreground, children: [
122199
- /* @__PURE__ */ jsx51(Text50, { bold: true, color: Colors.AccentPurple, children: "Up/Down" }),
122522
+ /* @__PURE__ */ jsxs48(Text51, { color: Colors.Foreground, children: [
122523
+ /* @__PURE__ */ jsx52(Text51, { bold: true, color: Colors.AccentPurple, children: "Up/Down" }),
122200
122524
  " ",
122201
122525
  "- Cycle through your prompt history"
122202
122526
  ] }),
122203
- /* @__PURE__ */ jsx51(Box44, { height: 1 }),
122204
- /* @__PURE__ */ jsxs47(Text50, { color: Colors.Foreground, children: [
122527
+ /* @__PURE__ */ jsx52(Box45, { height: 1 }),
122528
+ /* @__PURE__ */ jsxs48(Text51, { color: Colors.Foreground, children: [
122205
122529
  "For a full list of shortcuts, see",
122206
122530
  " ",
122207
- /* @__PURE__ */ jsx51(Text50, { bold: true, color: Colors.AccentPurple, children: "docs/keyboard-shortcuts.md" })
122531
+ /* @__PURE__ */ jsx52(Text51, { bold: true, color: Colors.AccentPurple, children: "docs/keyboard-shortcuts.md" })
122208
122532
  ] })
122209
122533
  ]
122210
122534
  }
122211
122535
  );
122212
122536
 
122213
122537
  // packages/cli/src/ui/components/HistoryItemDisplay.tsx
122214
- import { jsx as jsx52, jsxs as jsxs48 } from "react/jsx-runtime";
122538
+ import { jsx as jsx53, jsxs as jsxs49 } from "react/jsx-runtime";
122215
122539
  var HistoryItemDisplay = ({
122216
122540
  item,
122217
122541
  availableTerminalHeight,
@@ -122220,10 +122544,10 @@ var HistoryItemDisplay = ({
122220
122544
  config,
122221
122545
  commands,
122222
122546
  isFocused = true
122223
- }) => /* @__PURE__ */ jsxs48(Box45, { flexDirection: "column", children: [
122224
- item.type === "user" && /* @__PURE__ */ jsx52(UserMessage, { text: item.text }),
122225
- item.type === "user_shell" && /* @__PURE__ */ jsx52(UserShellMessage, { text: item.text }),
122226
- item.type === "gemini" && /* @__PURE__ */ jsx52(
122547
+ }) => /* @__PURE__ */ jsxs49(Box46, { flexDirection: "column", children: [
122548
+ item.type === "user" && /* @__PURE__ */ jsx53(UserMessage, { text: item.text }),
122549
+ item.type === "user_shell" && /* @__PURE__ */ jsx53(UserShellMessage, { text: item.text }),
122550
+ item.type === "gemini" && /* @__PURE__ */ jsx53(
122227
122551
  GeminiMessage,
122228
122552
  {
122229
122553
  text: item.text,
@@ -122232,7 +122556,7 @@ var HistoryItemDisplay = ({
122232
122556
  terminalWidth
122233
122557
  }
122234
122558
  ),
122235
- item.type === "gemini_content" && /* @__PURE__ */ jsx52(
122559
+ item.type === "gemini_content" && /* @__PURE__ */ jsx53(
122236
122560
  GeminiMessageContent,
122237
122561
  {
122238
122562
  text: item.text,
@@ -122241,9 +122565,9 @@ var HistoryItemDisplay = ({
122241
122565
  terminalWidth
122242
122566
  }
122243
122567
  ),
122244
- item.type === "info" && /* @__PURE__ */ jsx52(InfoMessage, { text: item.text }),
122245
- item.type === "error" && /* @__PURE__ */ jsx52(ErrorMessage, { text: item.text }),
122246
- item.type === "about" && /* @__PURE__ */ jsx52(
122568
+ item.type === "info" && /* @__PURE__ */ jsx53(InfoMessage, { text: item.text }),
122569
+ item.type === "error" && /* @__PURE__ */ jsx53(ErrorMessage, { text: item.text }),
122570
+ item.type === "about" && /* @__PURE__ */ jsx53(
122247
122571
  AboutBox,
122248
122572
  {
122249
122573
  cliVersion: item.cliVersion,
@@ -122255,12 +122579,12 @@ var HistoryItemDisplay = ({
122255
122579
  ideClient: item.ideClient
122256
122580
  }
122257
122581
  ),
122258
- item.type === "help" && commands && /* @__PURE__ */ jsx52(Help, { commands }),
122259
- item.type === "stats" && /* @__PURE__ */ jsx52(StatsDisplay, { duration: item.duration }),
122260
- item.type === "model_stats" && /* @__PURE__ */ jsx52(ModelStatsDisplay, {}),
122261
- item.type === "tool_stats" && /* @__PURE__ */ jsx52(ToolStatsDisplay, {}),
122262
- item.type === "quit" && /* @__PURE__ */ jsx52(SessionSummaryDisplay, { duration: item.duration }),
122263
- item.type === "tool_group" && /* @__PURE__ */ jsx52(
122582
+ item.type === "help" && commands && /* @__PURE__ */ jsx53(Help, { commands }),
122583
+ item.type === "stats" && /* @__PURE__ */ jsx53(StatsDisplay, { duration: item.duration }),
122584
+ item.type === "model_stats" && /* @__PURE__ */ jsx53(ModelStatsDisplay, {}),
122585
+ item.type === "tool_stats" && /* @__PURE__ */ jsx53(ToolStatsDisplay, {}),
122586
+ item.type === "quit" && /* @__PURE__ */ jsx53(SessionSummaryDisplay, { duration: item.duration }),
122587
+ item.type === "tool_group" && /* @__PURE__ */ jsx53(
122264
122588
  ToolGroupMessage,
122265
122589
  {
122266
122590
  toolCalls: item.tools,
@@ -122271,12 +122595,12 @@ var HistoryItemDisplay = ({
122271
122595
  isFocused
122272
122596
  }
122273
122597
  ),
122274
- item.type === "compression" && /* @__PURE__ */ jsx52(CompressionMessage, { compression: item.compression })
122598
+ item.type === "compression" && /* @__PURE__ */ jsx53(CompressionMessage, { compression: item.compression })
122275
122599
  ] }, item.id);
122276
122600
 
122277
122601
  // packages/cli/src/ui/components/ContextSummaryDisplay.tsx
122278
- import { Box as Box46, Text as Text51 } from "ink";
122279
- import { jsx as jsx53, jsxs as jsxs49 } from "react/jsx-runtime";
122602
+ import { Box as Box47, Text as Text52 } from "ink";
122603
+ import { jsx as jsx54, jsxs as jsxs50 } from "react/jsx-runtime";
122280
122604
  var ContextSummaryDisplay = ({
122281
122605
  geminiMdFileCount,
122282
122606
  contextFileNames,
@@ -122291,7 +122615,7 @@ var ContextSummaryDisplay = ({
122291
122615
  const blockedMcpServerCount = blockedMcpServers?.length || 0;
122292
122616
  const openFileCount = ideContext2?.workspaceState?.openFiles?.length ?? 0;
122293
122617
  if (geminiMdFileCount === 0 && mcpServerCount === 0 && blockedMcpServerCount === 0 && openFileCount === 0) {
122294
- return /* @__PURE__ */ jsx53(Text51, { children: " " });
122618
+ return /* @__PURE__ */ jsx54(Text52, { children: " " });
122295
122619
  }
122296
122620
  const openFilesText = (() => {
122297
122621
  if (openFileCount === 0) {
@@ -122336,25 +122660,25 @@ var ContextSummaryDisplay = ({
122336
122660
  })();
122337
122661
  const summaryParts = [openFilesText, geminiMdText, mcpText].filter(Boolean);
122338
122662
  if (isNarrow) {
122339
- return /* @__PURE__ */ jsxs49(Box46, { flexDirection: "column", children: [
122340
- /* @__PURE__ */ jsx53(Text51, { color: Colors.Gray, children: "Using:" }),
122341
- summaryParts.map((part, index) => /* @__PURE__ */ jsxs49(Text51, { color: Colors.Gray, children: [
122663
+ return /* @__PURE__ */ jsxs50(Box47, { flexDirection: "column", children: [
122664
+ /* @__PURE__ */ jsx54(Text52, { color: Colors.Gray, children: "Using:" }),
122665
+ summaryParts.map((part, index) => /* @__PURE__ */ jsxs50(Text52, { color: Colors.Gray, children: [
122342
122666
  " ",
122343
122667
  "- ",
122344
122668
  part
122345
122669
  ] }, index))
122346
122670
  ] });
122347
122671
  }
122348
- return /* @__PURE__ */ jsx53(Box46, { children: /* @__PURE__ */ jsxs49(Text51, { color: Colors.Gray, children: [
122672
+ return /* @__PURE__ */ jsx54(Box47, { children: /* @__PURE__ */ jsxs50(Text52, { color: Colors.Gray, children: [
122349
122673
  "Using: ",
122350
122674
  summaryParts.join(" | ")
122351
122675
  ] }) });
122352
122676
  };
122353
122677
 
122354
122678
  // packages/cli/src/ui/hooks/useHistoryManager.ts
122355
- import { useState as useState36, useRef as useRef11, useCallback as useCallback22 } from "react";
122679
+ import { useState as useState37, useRef as useRef11, useCallback as useCallback22 } from "react";
122356
122680
  function useHistory() {
122357
- const [history, setHistory] = useState36([]);
122681
+ const [history, setHistory] = useState37([]);
122358
122682
  const messageIdCounterRef = useRef11(0);
122359
122683
  const getNextMessageId = useCallback22((baseTimestamp) => {
122360
122684
  messageIdCounterRef.current += 1;
@@ -122413,8 +122737,8 @@ import process18 from "node:process";
122413
122737
 
122414
122738
  // packages/cli/src/ui/IdeIntegrationNudge.tsx
122415
122739
  init_dist2();
122416
- import { Box as Box47, Text as Text52 } from "ink";
122417
- import { jsx as jsx54, jsxs as jsxs50 } from "react/jsx-runtime";
122740
+ import { Box as Box48, Text as Text53 } from "ink";
122741
+ import { jsx as jsx55, jsxs as jsxs51 } from "react/jsx-runtime";
122418
122742
  function IdeIntegrationNudge({
122419
122743
  ide,
122420
122744
  onComplete
@@ -122456,8 +122780,8 @@ function IdeIntegrationNudge({
122456
122780
  }
122457
122781
  ];
122458
122782
  const installText = isExtensionPreInstalled ? `If you select Yes, the CLI will have access to your open files and display diffs directly in ${ideName ?? "your editor"}.` : `If you select Yes, we'll install an extension that allows the CLI to access your open files and display diffs directly in ${ideName ?? "your editor"}.`;
122459
- return /* @__PURE__ */ jsxs50(
122460
- Box47,
122783
+ return /* @__PURE__ */ jsxs51(
122784
+ Box48,
122461
122785
  {
122462
122786
  flexDirection: "column",
122463
122787
  borderStyle: "round",
@@ -122466,27 +122790,27 @@ function IdeIntegrationNudge({
122466
122790
  width: "100%",
122467
122791
  marginLeft: 1,
122468
122792
  children: [
122469
- /* @__PURE__ */ jsxs50(Box47, { marginBottom: 1, flexDirection: "column", children: [
122470
- /* @__PURE__ */ jsxs50(Text52, { children: [
122471
- /* @__PURE__ */ jsx54(Text52, { color: "yellow", children: "> " }),
122793
+ /* @__PURE__ */ jsxs51(Box48, { marginBottom: 1, flexDirection: "column", children: [
122794
+ /* @__PURE__ */ jsxs51(Text53, { children: [
122795
+ /* @__PURE__ */ jsx55(Text53, { color: "yellow", children: "> " }),
122472
122796
  `Do you want to connect ${ideName ?? "your"} editor to FSS Link?`
122473
122797
  ] }),
122474
- /* @__PURE__ */ jsx54(Text52, { dimColor: true, children: installText })
122798
+ /* @__PURE__ */ jsx55(Text53, { dimColor: true, children: installText })
122475
122799
  ] }),
122476
- /* @__PURE__ */ jsx54(RadioButtonSelect, { items: OPTIONS, onSelect: onComplete })
122800
+ /* @__PURE__ */ jsx55(RadioButtonSelect, { items: OPTIONS, onSelect: onComplete })
122477
122801
  ]
122478
122802
  }
122479
122803
  );
122480
122804
  }
122481
122805
 
122482
122806
  // packages/cli/src/ui/hooks/useGitBranchName.ts
122483
- import { useState as useState37, useEffect as useEffect34, useCallback as useCallback23 } from "react";
122807
+ import { useState as useState38, useEffect as useEffect35, useCallback as useCallback23 } from "react";
122484
122808
  import { exec as exec6 } from "node:child_process";
122485
122809
  import fs64 from "node:fs";
122486
122810
  import fsPromises3 from "node:fs/promises";
122487
122811
  import path76 from "path";
122488
122812
  function useGitBranchName(cwd3) {
122489
- const [branchName, setBranchName] = useState37(void 0);
122813
+ const [branchName, setBranchName] = useState38(void 0);
122490
122814
  const fetchBranchName = useCallback23(
122491
122815
  () => exec6(
122492
122816
  "git rev-parse --abbrev-ref HEAD",
@@ -122516,7 +122840,7 @@ function useGitBranchName(cwd3) {
122516
122840
  ),
122517
122841
  [cwd3, setBranchName]
122518
122842
  );
122519
- useEffect34(() => {
122843
+ useEffect35(() => {
122520
122844
  fetchBranchName();
122521
122845
  const gitLogsHeadPath = path76.join(cwd3, ".git", "logs", "HEAD");
122522
122846
  let watcher;
@@ -122540,14 +122864,14 @@ function useGitBranchName(cwd3) {
122540
122864
  }
122541
122865
 
122542
122866
  // packages/cli/src/ui/hooks/useBracketedPaste.ts
122543
- import { useEffect as useEffect35 } from "react";
122867
+ import { useEffect as useEffect36 } from "react";
122544
122868
  var ENABLE_BRACKETED_PASTE = "\x1B[?2004h";
122545
122869
  var DISABLE_BRACKETED_PASTE = "\x1B[?2004l";
122546
122870
  var useBracketedPaste = () => {
122547
122871
  const cleanup = () => {
122548
122872
  process.stdout.write(DISABLE_BRACKETED_PASTE);
122549
122873
  };
122550
- useEffect35(() => {
122874
+ useEffect36(() => {
122551
122875
  process.stdout.write(ENABLE_BRACKETED_PASTE);
122552
122876
  process.on("exit", cleanup);
122553
122877
  process.on("SIGINT", cleanup);
@@ -122567,21 +122891,21 @@ import {
122567
122891
  createContext as createContext5,
122568
122892
  useCallback as useCallback24,
122569
122893
  useContext as useContext5,
122570
- useEffect as useEffect36,
122571
- useState as useState38
122894
+ useEffect as useEffect37,
122895
+ useState as useState39
122572
122896
  } from "react";
122573
- import { jsx as jsx55 } from "react/jsx-runtime";
122897
+ import { jsx as jsx56 } from "react/jsx-runtime";
122574
122898
  var VimModeContext = createContext5(void 0);
122575
122899
  var VimModeProvider = ({
122576
122900
  children,
122577
122901
  settings
122578
122902
  }) => {
122579
122903
  const initialVimEnabled = settings.merged.vimMode ?? false;
122580
- const [vimEnabled, setVimEnabled] = useState38(initialVimEnabled);
122581
- const [vimMode, setVimMode] = useState38(
122904
+ const [vimEnabled, setVimEnabled] = useState39(initialVimEnabled);
122905
+ const [vimMode, setVimMode] = useState39(
122582
122906
  initialVimEnabled ? "NORMAL" : "INSERT"
122583
122907
  );
122584
- useEffect36(() => {
122908
+ useEffect37(() => {
122585
122909
  const enabled = settings.merged.vimMode ?? false;
122586
122910
  setVimEnabled(enabled);
122587
122911
  if (enabled) {
@@ -122603,7 +122927,7 @@ var VimModeProvider = ({
122603
122927
  toggleVimEnabled,
122604
122928
  setVimMode
122605
122929
  };
122606
- return /* @__PURE__ */ jsx55(VimModeContext.Provider, { value, children });
122930
+ return /* @__PURE__ */ jsx56(VimModeContext.Provider, { value, children });
122607
122931
  };
122608
122932
  var useVimMode = () => {
122609
122933
  const context = useContext5(VimModeContext);
@@ -122614,7 +122938,7 @@ var useVimMode = () => {
122614
122938
  };
122615
122939
 
122616
122940
  // packages/cli/src/ui/hooks/vim.ts
122617
- import { useCallback as useCallback25, useReducer as useReducer4, useEffect as useEffect37 } from "react";
122941
+ import { useCallback as useCallback25, useReducer as useReducer4, useEffect as useEffect38 } from "react";
122618
122942
  var DIGIT_MULTIPLIER = 10;
122619
122943
  var DEFAULT_COUNT = 1;
122620
122944
  var DIGIT_1_TO_9 = /^[1-9]$/;
@@ -122678,7 +123002,7 @@ var vimReducer = (state, action) => {
122678
123002
  function useVim(buffer, onSubmit) {
122679
123003
  const { vimEnabled, vimMode, setVimMode } = useVimMode();
122680
123004
  const [state, dispatch] = useReducer4(vimReducer, initialVimState);
122681
- useEffect37(() => {
123005
+ useEffect38(() => {
122682
123006
  dispatch({ type: "SET_MODE", mode: vimMode });
122683
123007
  }, [vimMode]);
122684
123008
  const updateMode = useCallback25(
@@ -123156,9 +123480,9 @@ function useVim(buffer, onSubmit) {
123156
123480
  }
123157
123481
 
123158
123482
  // packages/cli/src/ui/hooks/useKittyKeyboardProtocol.ts
123159
- import { useState as useState39 } from "react";
123483
+ import { useState as useState40 } from "react";
123160
123484
  function useKittyKeyboardProtocol() {
123161
- const [status] = useState39({
123485
+ const [status] = useState40({
123162
123486
  supported: isKittyProtocolSupported(),
123163
123487
  enabled: isKittyProtocolEnabled(),
123164
123488
  checking: false
@@ -123170,16 +123494,16 @@ function useKittyKeyboardProtocol() {
123170
123494
  import * as fs66 from "fs";
123171
123495
 
123172
123496
  // packages/cli/src/ui/components/UpdateNotification.tsx
123173
- import { Box as Box48, Text as Text53 } from "ink";
123174
- import { jsx as jsx56 } from "react/jsx-runtime";
123175
- var UpdateNotification = ({ message }) => /* @__PURE__ */ jsx56(
123176
- Box48,
123497
+ import { Box as Box49, Text as Text54 } from "ink";
123498
+ import { jsx as jsx57 } from "react/jsx-runtime";
123499
+ var UpdateNotification = ({ message }) => /* @__PURE__ */ jsx57(
123500
+ Box49,
123177
123501
  {
123178
123502
  borderStyle: "round",
123179
123503
  borderColor: Colors.AccentYellow,
123180
123504
  paddingX: 1,
123181
123505
  marginY: 1,
123182
- children: /* @__PURE__ */ jsx56(Text53, { color: Colors.AccentYellow, children: message })
123506
+ children: /* @__PURE__ */ jsx57(Text54, { color: Colors.AccentYellow, children: message })
123183
123507
  }
123184
123508
  );
123185
123509
 
@@ -123363,24 +123687,24 @@ var iTerm = {
123363
123687
  init_SearchEngineConfigProvider();
123364
123688
 
123365
123689
  // packages/cli/src/ui/components/ShowMoreLines.tsx
123366
- import { Box as Box49, Text as Text54 } from "ink";
123367
- import { jsx as jsx57 } from "react/jsx-runtime";
123690
+ import { Box as Box50, Text as Text55 } from "ink";
123691
+ import { jsx as jsx58 } from "react/jsx-runtime";
123368
123692
  var ShowMoreLines = ({ constrainHeight }) => {
123369
123693
  const overflowState = useOverflowState();
123370
123694
  const streamingState = useStreamingContext();
123371
123695
  if (overflowState === void 0 || overflowState.overflowingIds.size === 0 || !constrainHeight || !(streamingState === "idle" /* Idle */ || streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */)) {
123372
123696
  return null;
123373
123697
  }
123374
- return /* @__PURE__ */ jsx57(Box49, { children: /* @__PURE__ */ jsx57(Text54, { color: Colors.Gray, wrap: "truncate", children: "Press ctrl-s to show more lines" }) });
123698
+ return /* @__PURE__ */ jsx58(Box50, { children: /* @__PURE__ */ jsx58(Text55, { color: Colors.Gray, wrap: "truncate", children: "Press ctrl-s to show more lines" }) });
123375
123699
  };
123376
123700
 
123377
123701
  // packages/cli/src/ui/privacy/PrivacyNotice.tsx
123378
123702
  init_dist2();
123379
- import { Box as Box53 } from "ink";
123703
+ import { Box as Box54 } from "ink";
123380
123704
 
123381
123705
  // packages/cli/src/ui/privacy/GeminiPrivacyNotice.tsx
123382
- import { Box as Box50, Newline, Text as Text55 } from "ink";
123383
- import { jsx as jsx58, jsxs as jsxs51 } from "react/jsx-runtime";
123706
+ import { Box as Box51, Newline, Text as Text56 } from "ink";
123707
+ import { jsx as jsx59, jsxs as jsxs52 } from "react/jsx-runtime";
123384
123708
  var GeminiPrivacyNotice = ({ onExit }) => {
123385
123709
  useKeypress(
123386
123710
  (key) => {
@@ -123390,48 +123714,48 @@ var GeminiPrivacyNotice = ({ onExit }) => {
123390
123714
  },
123391
123715
  { isActive: true }
123392
123716
  );
123393
- return /* @__PURE__ */ jsxs51(Box50, { flexDirection: "column", marginBottom: 1, children: [
123394
- /* @__PURE__ */ jsx58(Text55, { bold: true, color: Colors.AccentPurple, children: "Gemini API Key Notice" }),
123395
- /* @__PURE__ */ jsx58(Newline, {}),
123396
- /* @__PURE__ */ jsxs51(Text55, { children: [
123717
+ return /* @__PURE__ */ jsxs52(Box51, { flexDirection: "column", marginBottom: 1, children: [
123718
+ /* @__PURE__ */ jsx59(Text56, { bold: true, color: Colors.AccentPurple, children: "Gemini API Key Notice" }),
123719
+ /* @__PURE__ */ jsx59(Newline, {}),
123720
+ /* @__PURE__ */ jsxs52(Text56, { children: [
123397
123721
  "By using the Gemini API",
123398
- /* @__PURE__ */ jsx58(Text55, { color: Colors.AccentBlue, children: "[1]" }),
123722
+ /* @__PURE__ */ jsx59(Text56, { color: Colors.AccentBlue, children: "[1]" }),
123399
123723
  ", Google AI Studio",
123400
- /* @__PURE__ */ jsx58(Text55, { color: Colors.AccentRed, children: "[2]" }),
123724
+ /* @__PURE__ */ jsx59(Text56, { color: Colors.AccentRed, children: "[2]" }),
123401
123725
  ', 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")',
123402
- /* @__PURE__ */ jsx58(Text55, { color: Colors.AccentGreen, children: "[3]" }),
123726
+ /* @__PURE__ */ jsx59(Text56, { color: Colors.AccentGreen, children: "[3]" }),
123403
123727
  ', and the Gemini API Additional Terms of Service (the "Additional Terms")',
123404
- /* @__PURE__ */ jsx58(Text55, { color: Colors.AccentPurple, children: "[4]" }),
123728
+ /* @__PURE__ */ jsx59(Text56, { color: Colors.AccentPurple, children: "[4]" }),
123405
123729
  "."
123406
123730
  ] }),
123407
- /* @__PURE__ */ jsx58(Newline, {}),
123408
- /* @__PURE__ */ jsxs51(Text55, { children: [
123409
- /* @__PURE__ */ jsx58(Text55, { color: Colors.AccentBlue, children: "[1]" }),
123731
+ /* @__PURE__ */ jsx59(Newline, {}),
123732
+ /* @__PURE__ */ jsxs52(Text56, { children: [
123733
+ /* @__PURE__ */ jsx59(Text56, { color: Colors.AccentBlue, children: "[1]" }),
123410
123734
  " ",
123411
123735
  "https://ai.google.dev/docs/gemini_api_overview"
123412
123736
  ] }),
123413
- /* @__PURE__ */ jsxs51(Text55, { children: [
123414
- /* @__PURE__ */ jsx58(Text55, { color: Colors.AccentRed, children: "[2]" }),
123737
+ /* @__PURE__ */ jsxs52(Text56, { children: [
123738
+ /* @__PURE__ */ jsx59(Text56, { color: Colors.AccentRed, children: "[2]" }),
123415
123739
  " https://aistudio.google.com/"
123416
123740
  ] }),
123417
- /* @__PURE__ */ jsxs51(Text55, { children: [
123418
- /* @__PURE__ */ jsx58(Text55, { color: Colors.AccentGreen, children: "[3]" }),
123741
+ /* @__PURE__ */ jsxs52(Text56, { children: [
123742
+ /* @__PURE__ */ jsx59(Text56, { color: Colors.AccentGreen, children: "[3]" }),
123419
123743
  " ",
123420
123744
  "https://developers.google.com/terms"
123421
123745
  ] }),
123422
- /* @__PURE__ */ jsxs51(Text55, { children: [
123423
- /* @__PURE__ */ jsx58(Text55, { color: Colors.AccentPurple, children: "[4]" }),
123746
+ /* @__PURE__ */ jsxs52(Text56, { children: [
123747
+ /* @__PURE__ */ jsx59(Text56, { color: Colors.AccentPurple, children: "[4]" }),
123424
123748
  " ",
123425
123749
  "https://ai.google.dev/gemini-api/terms"
123426
123750
  ] }),
123427
- /* @__PURE__ */ jsx58(Newline, {}),
123428
- /* @__PURE__ */ jsx58(Text55, { color: Colors.Gray, children: "Press Esc to exit." })
123751
+ /* @__PURE__ */ jsx59(Newline, {}),
123752
+ /* @__PURE__ */ jsx59(Text56, { color: Colors.Gray, children: "Press Esc to exit." })
123429
123753
  ] });
123430
123754
  };
123431
123755
 
123432
123756
  // packages/cli/src/ui/privacy/CloudPaidPrivacyNotice.tsx
123433
- import { Box as Box51, Newline as Newline2, Text as Text56 } from "ink";
123434
- import { jsx as jsx59, jsxs as jsxs52 } from "react/jsx-runtime";
123757
+ import { Box as Box52, Newline as Newline2, Text as Text57 } from "ink";
123758
+ import { jsx as jsx60, jsxs as jsxs53 } from "react/jsx-runtime";
123435
123759
  var CloudPaidPrivacyNotice = ({
123436
123760
  onExit
123437
123761
  }) => {
@@ -123443,43 +123767,43 @@ var CloudPaidPrivacyNotice = ({
123443
123767
  },
123444
123768
  { isActive: true }
123445
123769
  );
123446
- return /* @__PURE__ */ jsxs52(Box51, { flexDirection: "column", marginBottom: 1, children: [
123447
- /* @__PURE__ */ jsx59(Text56, { bold: true, color: Colors.AccentPurple, children: "Vertex AI Notice" }),
123448
- /* @__PURE__ */ jsx59(Newline2, {}),
123449
- /* @__PURE__ */ jsxs52(Text56, { children: [
123770
+ return /* @__PURE__ */ jsxs53(Box52, { flexDirection: "column", marginBottom: 1, children: [
123771
+ /* @__PURE__ */ jsx60(Text57, { bold: true, color: Colors.AccentPurple, children: "Vertex AI Notice" }),
123772
+ /* @__PURE__ */ jsx60(Newline2, {}),
123773
+ /* @__PURE__ */ jsxs53(Text57, { children: [
123450
123774
  "Service Specific Terms",
123451
- /* @__PURE__ */ jsx59(Text56, { color: Colors.AccentBlue, children: "[1]" }),
123775
+ /* @__PURE__ */ jsx60(Text57, { color: Colors.AccentBlue, children: "[1]" }),
123452
123776
  " are incorporated into the agreement under which Google has agreed to provide Google Cloud Platform",
123453
- /* @__PURE__ */ jsx59(Text56, { color: Colors.AccentGreen, children: "[2]" }),
123777
+ /* @__PURE__ */ jsx60(Text57, { color: Colors.AccentGreen, children: "[2]" }),
123454
123778
  " 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."
123455
123779
  ] }),
123456
- /* @__PURE__ */ jsx59(Newline2, {}),
123457
- /* @__PURE__ */ jsxs52(Text56, { children: [
123458
- /* @__PURE__ */ jsx59(Text56, { color: Colors.AccentBlue, children: "[1]" }),
123780
+ /* @__PURE__ */ jsx60(Newline2, {}),
123781
+ /* @__PURE__ */ jsxs53(Text57, { children: [
123782
+ /* @__PURE__ */ jsx60(Text57, { color: Colors.AccentBlue, children: "[1]" }),
123459
123783
  " ",
123460
123784
  "https://cloud.google.com/terms/service-terms"
123461
123785
  ] }),
123462
- /* @__PURE__ */ jsxs52(Text56, { children: [
123463
- /* @__PURE__ */ jsx59(Text56, { color: Colors.AccentGreen, children: "[2]" }),
123786
+ /* @__PURE__ */ jsxs53(Text57, { children: [
123787
+ /* @__PURE__ */ jsx60(Text57, { color: Colors.AccentGreen, children: "[2]" }),
123464
123788
  " ",
123465
123789
  "https://cloud.google.com/terms/services"
123466
123790
  ] }),
123467
- /* @__PURE__ */ jsx59(Newline2, {}),
123468
- /* @__PURE__ */ jsx59(Text56, { color: Colors.Gray, children: "Press Esc to exit." })
123791
+ /* @__PURE__ */ jsx60(Newline2, {}),
123792
+ /* @__PURE__ */ jsx60(Text57, { color: Colors.Gray, children: "Press Esc to exit." })
123469
123793
  ] });
123470
123794
  };
123471
123795
 
123472
123796
  // packages/cli/src/ui/privacy/CloudFreePrivacyNotice.tsx
123473
- import { Box as Box52, Newline as Newline3, Text as Text57 } from "ink";
123797
+ import { Box as Box53, Newline as Newline3, Text as Text58 } from "ink";
123474
123798
 
123475
123799
  // packages/cli/src/ui/hooks/usePrivacySettings.ts
123476
123800
  init_dist2();
123477
- import { useState as useState40, useEffect as useEffect38, useCallback as useCallback26 } from "react";
123801
+ import { useState as useState41, useEffect as useEffect39, useCallback as useCallback26 } from "react";
123478
123802
  var usePrivacySettings = (config) => {
123479
- const [privacyState, setPrivacyState] = useState40({
123803
+ const [privacyState, setPrivacyState] = useState41({
123480
123804
  isLoading: true
123481
123805
  });
123482
- useEffect38(() => {
123806
+ useEffect39(() => {
123483
123807
  const fetchInitialState = async () => {
123484
123808
  setPrivacyState({
123485
123809
  isLoading: true
@@ -123583,7 +123907,7 @@ async function setRemoteDataCollectionOptIn(server, optIn) {
123583
123907
  }
123584
123908
 
123585
123909
  // packages/cli/src/ui/privacy/CloudFreePrivacyNotice.tsx
123586
- import { jsx as jsx60, jsxs as jsxs53 } from "react/jsx-runtime";
123910
+ import { jsx as jsx61, jsxs as jsxs54 } from "react/jsx-runtime";
123587
123911
  var CloudFreePrivacyNotice = ({
123588
123912
  config,
123589
123913
  onExit
@@ -123598,40 +123922,40 @@ var CloudFreePrivacyNotice = ({
123598
123922
  { isActive: true }
123599
123923
  );
123600
123924
  if (privacyState.isLoading) {
123601
- return /* @__PURE__ */ jsx60(Text57, { color: Colors.Gray, children: "Loading..." });
123925
+ return /* @__PURE__ */ jsx61(Text58, { color: Colors.Gray, children: "Loading..." });
123602
123926
  }
123603
123927
  if (privacyState.error) {
123604
- return /* @__PURE__ */ jsxs53(Box52, { flexDirection: "column", marginY: 1, children: [
123605
- /* @__PURE__ */ jsxs53(Text57, { color: Colors.AccentRed, children: [
123928
+ return /* @__PURE__ */ jsxs54(Box53, { flexDirection: "column", marginY: 1, children: [
123929
+ /* @__PURE__ */ jsxs54(Text58, { color: Colors.AccentRed, children: [
123606
123930
  "Error loading Opt-in settings: ",
123607
123931
  privacyState.error
123608
123932
  ] }),
123609
- /* @__PURE__ */ jsx60(Text57, { color: Colors.Gray, children: "Press Esc to exit." })
123933
+ /* @__PURE__ */ jsx61(Text58, { color: Colors.Gray, children: "Press Esc to exit." })
123610
123934
  ] });
123611
123935
  }
123612
123936
  if (privacyState.isFreeTier === false) {
123613
- return /* @__PURE__ */ jsx60(CloudPaidPrivacyNotice, { onExit });
123937
+ return /* @__PURE__ */ jsx61(CloudPaidPrivacyNotice, { onExit });
123614
123938
  }
123615
123939
  const items = [
123616
123940
  { label: "Yes", value: true },
123617
123941
  { label: "No", value: false }
123618
123942
  ];
123619
- return /* @__PURE__ */ jsxs53(Box52, { flexDirection: "column", marginY: 1, children: [
123620
- /* @__PURE__ */ jsx60(Text57, { bold: true, color: Colors.AccentPurple, children: "Gemini Code Assist for Individuals Privacy Notice" }),
123621
- /* @__PURE__ */ jsx60(Newline3, {}),
123622
- /* @__PURE__ */ jsxs53(Text57, { children: [
123943
+ return /* @__PURE__ */ jsxs54(Box53, { flexDirection: "column", marginY: 1, children: [
123944
+ /* @__PURE__ */ jsx61(Text58, { bold: true, color: Colors.AccentPurple, children: "Gemini Code Assist for Individuals Privacy Notice" }),
123945
+ /* @__PURE__ */ jsx61(Newline3, {}),
123946
+ /* @__PURE__ */ jsxs54(Text58, { children: [
123623
123947
  "This notice and our Privacy Policy",
123624
- /* @__PURE__ */ jsx60(Text57, { color: Colors.AccentBlue, children: "[1]" }),
123948
+ /* @__PURE__ */ jsx61(Text58, { color: Colors.AccentBlue, children: "[1]" }),
123625
123949
  " describe how Gemini Code Assist handles your data. Please read them carefully."
123626
123950
  ] }),
123627
- /* @__PURE__ */ jsx60(Newline3, {}),
123628
- /* @__PURE__ */ jsx60(Text57, { 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." }),
123629
- /* @__PURE__ */ jsx60(Newline3, {}),
123630
- /* @__PURE__ */ jsx60(Text57, { 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." }),
123631
- /* @__PURE__ */ jsx60(Newline3, {}),
123632
- /* @__PURE__ */ jsxs53(Box52, { flexDirection: "column", children: [
123633
- /* @__PURE__ */ jsx60(Text57, { children: "Allow Google to use this data to develop and improve our products?" }),
123634
- /* @__PURE__ */ jsx60(
123951
+ /* @__PURE__ */ jsx61(Newline3, {}),
123952
+ /* @__PURE__ */ jsx61(Text58, { 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." }),
123953
+ /* @__PURE__ */ jsx61(Newline3, {}),
123954
+ /* @__PURE__ */ jsx61(Text58, { 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." }),
123955
+ /* @__PURE__ */ jsx61(Newline3, {}),
123956
+ /* @__PURE__ */ jsxs54(Box53, { flexDirection: "column", children: [
123957
+ /* @__PURE__ */ jsx61(Text58, { children: "Allow Google to use this data to develop and improve our products?" }),
123958
+ /* @__PURE__ */ jsx61(
123635
123959
  RadioButtonSelect,
123636
123960
  {
123637
123961
  items,
@@ -123645,19 +123969,19 @@ var CloudFreePrivacyNotice = ({
123645
123969
  }
123646
123970
  )
123647
123971
  ] }),
123648
- /* @__PURE__ */ jsx60(Newline3, {}),
123649
- /* @__PURE__ */ jsxs53(Text57, { children: [
123650
- /* @__PURE__ */ jsx60(Text57, { color: Colors.AccentBlue, children: "[1]" }),
123972
+ /* @__PURE__ */ jsx61(Newline3, {}),
123973
+ /* @__PURE__ */ jsxs54(Text58, { children: [
123974
+ /* @__PURE__ */ jsx61(Text58, { color: Colors.AccentBlue, children: "[1]" }),
123651
123975
  " ",
123652
123976
  "https://policies.google.com/privacy"
123653
123977
  ] }),
123654
- /* @__PURE__ */ jsx60(Newline3, {}),
123655
- /* @__PURE__ */ jsx60(Text57, { color: Colors.Gray, children: "Press Enter to choose an option and exit." })
123978
+ /* @__PURE__ */ jsx61(Newline3, {}),
123979
+ /* @__PURE__ */ jsx61(Text58, { color: Colors.Gray, children: "Press Enter to choose an option and exit." })
123656
123980
  ] });
123657
123981
  };
123658
123982
 
123659
123983
  // packages/cli/src/ui/privacy/PrivacyNotice.tsx
123660
- import { jsx as jsx61 } from "react/jsx-runtime";
123984
+ import { jsx as jsx62 } from "react/jsx-runtime";
123661
123985
  var PrivacyNoticeText = ({
123662
123986
  config,
123663
123987
  onExit
@@ -123665,20 +123989,20 @@ var PrivacyNoticeText = ({
123665
123989
  const authType = config.getContentGeneratorConfig()?.authType;
123666
123990
  switch (authType) {
123667
123991
  case AuthType.USE_GEMINI:
123668
- return /* @__PURE__ */ jsx61(GeminiPrivacyNotice, { onExit });
123992
+ return /* @__PURE__ */ jsx62(GeminiPrivacyNotice, { onExit });
123669
123993
  case AuthType.USE_VERTEX_AI:
123670
- return /* @__PURE__ */ jsx61(CloudPaidPrivacyNotice, { onExit });
123994
+ return /* @__PURE__ */ jsx62(CloudPaidPrivacyNotice, { onExit });
123671
123995
  case AuthType.LOGIN_WITH_GOOGLE:
123672
123996
  default:
123673
- return /* @__PURE__ */ jsx61(CloudFreePrivacyNotice, { config, onExit });
123997
+ return /* @__PURE__ */ jsx62(CloudFreePrivacyNotice, { config, onExit });
123674
123998
  }
123675
123999
  };
123676
- var PrivacyNotice = ({ onExit, config }) => /* @__PURE__ */ jsx61(Box53, { borderStyle: "round", padding: 1, flexDirection: "column", children: /* @__PURE__ */ jsx61(PrivacyNoticeText, { config, onExit }) });
124000
+ var PrivacyNotice = ({ onExit, config }) => /* @__PURE__ */ jsx62(Box54, { borderStyle: "round", padding: 1, flexDirection: "column", children: /* @__PURE__ */ jsx62(PrivacyNoticeText, { config, onExit }) });
123677
124001
 
123678
124002
  // packages/cli/src/ui/hooks/useSettingsCommand.ts
123679
- import { useState as useState41, useCallback as useCallback27 } from "react";
124003
+ import { useState as useState42, useCallback as useCallback27 } from "react";
123680
124004
  function useSettingsCommand() {
123681
- const [isSettingsDialogOpen, setIsSettingsDialogOpen] = useState41(false);
124005
+ const [isSettingsDialogOpen, setIsSettingsDialogOpen] = useState42(false);
123682
124006
  const openSettingsDialog = useCallback27(() => {
123683
124007
  setIsSettingsDialogOpen(true);
123684
124008
  }, []);
@@ -123693,11 +124017,11 @@ function useSettingsCommand() {
123693
124017
  }
123694
124018
 
123695
124019
  // packages/cli/src/ui/components/SettingsDialog.tsx
123696
- import React27, { useState as useState42, useEffect as useEffect39 } from "react";
123697
- import { Box as Box54, Text as Text58 } from "ink";
124020
+ import React27, { useState as useState43, useEffect as useEffect40 } from "react";
124021
+ import { Box as Box55, Text as Text59 } from "ink";
123698
124022
  init_settings();
123699
124023
  import chalk2 from "chalk";
123700
- import { jsx as jsx62, jsxs as jsxs54 } from "react/jsx-runtime";
124024
+ import { jsx as jsx63, jsxs as jsxs55 } from "react/jsx-runtime";
123701
124025
  var maxItemsToShow = 8;
123702
124026
  function SettingsDialog({
123703
124027
  settings,
@@ -123705,27 +124029,27 @@ function SettingsDialog({
123705
124029
  onRestartRequest
123706
124030
  }) {
123707
124031
  const { vimEnabled, toggleVimEnabled } = useVimMode();
123708
- const [focusSection, setFocusSection] = useState42(
124032
+ const [focusSection, setFocusSection] = useState43(
123709
124033
  "settings"
123710
124034
  );
123711
- const [selectedScope, setSelectedScope] = useState42(
124035
+ const [selectedScope, setSelectedScope] = useState43(
123712
124036
  "User" /* User */
123713
124037
  );
123714
- const [activeSettingIndex, setActiveSettingIndex] = useState42(0);
123715
- const [scrollOffset, setScrollOffset] = useState42(0);
123716
- const [showRestartPrompt, setShowRestartPrompt] = useState42(false);
123717
- const [pendingSettings, setPendingSettings] = useState42(
124038
+ const [activeSettingIndex, setActiveSettingIndex] = useState43(0);
124039
+ const [scrollOffset, setScrollOffset] = useState43(0);
124040
+ const [showRestartPrompt, setShowRestartPrompt] = useState43(false);
124041
+ const [pendingSettings, setPendingSettings] = useState43(
123718
124042
  () => (
123719
124043
  // Deep clone to avoid mutation
123720
124044
  structuredClone(settings.forScope(selectedScope).settings)
123721
124045
  )
123722
124046
  );
123723
- const [modifiedSettings, setModifiedSettings] = useState42(
124047
+ const [modifiedSettings, setModifiedSettings] = useState43(
123724
124048
  /* @__PURE__ */ new Set()
123725
124049
  );
123726
- const [globalPendingChanges, setGlobalPendingChanges] = useState42(/* @__PURE__ */ new Map());
123727
- const [_restartRequiredSettings, setRestartRequiredSettings] = useState42(/* @__PURE__ */ new Set());
123728
- useEffect39(() => {
124050
+ const [globalPendingChanges, setGlobalPendingChanges] = useState43(/* @__PURE__ */ new Map());
124051
+ const [_restartRequiredSettings, setRestartRequiredSettings] = useState43(/* @__PURE__ */ new Set());
124052
+ useEffect40(() => {
123729
124053
  let updated = structuredClone(settings.forScope(selectedScope).settings);
123730
124054
  const newModified = /* @__PURE__ */ new Set();
123731
124055
  const newRestartRequired = /* @__PURE__ */ new Set();
@@ -123831,11 +124155,11 @@ function SettingsDialog({
123831
124155
  });
123832
124156
  };
123833
124157
  const items = generateSettingsItems();
123834
- const [editingKey, setEditingKey] = useState42(null);
123835
- const [editBuffer, setEditBuffer] = useState42("");
123836
- const [editCursorPos, setEditCursorPos] = useState42(0);
123837
- const [cursorVisible, setCursorVisible] = useState42(true);
123838
- useEffect39(() => {
124158
+ const [editingKey, setEditingKey] = useState43(null);
124159
+ const [editBuffer, setEditBuffer] = useState43("");
124160
+ const [editCursorPos, setEditCursorPos] = useState43(0);
124161
+ const [cursorVisible, setCursorVisible] = useState43(true);
124162
+ useEffect40(() => {
123839
124163
  if (!editingKey) {
123840
124164
  setCursorVisible(true);
123841
124165
  return;
@@ -124133,8 +124457,8 @@ function SettingsDialog({
124133
124457
  },
124134
124458
  { isActive: true }
124135
124459
  );
124136
- return /* @__PURE__ */ jsx62(
124137
- Box54,
124460
+ return /* @__PURE__ */ jsx63(
124461
+ Box55,
124138
124462
  {
124139
124463
  borderStyle: "round",
124140
124464
  borderColor: Colors.Gray,
@@ -124142,10 +124466,10 @@ function SettingsDialog({
124142
124466
  padding: 1,
124143
124467
  width: "100%",
124144
124468
  height: "100%",
124145
- children: /* @__PURE__ */ jsxs54(Box54, { flexDirection: "column", flexGrow: 1, children: [
124146
- /* @__PURE__ */ jsx62(Text58, { bold: true, color: Colors.AccentBlue, children: "Settings" }),
124147
- /* @__PURE__ */ jsx62(Box54, { height: 1 }),
124148
- showScrollUp && /* @__PURE__ */ jsx62(Text58, { color: Colors.Gray, children: "\u25B2" }),
124469
+ children: /* @__PURE__ */ jsxs55(Box55, { flexDirection: "column", flexGrow: 1, children: [
124470
+ /* @__PURE__ */ jsx63(Text59, { bold: true, color: Colors.AccentBlue, children: "Settings" }),
124471
+ /* @__PURE__ */ jsx63(Box55, { height: 1 }),
124472
+ showScrollUp && /* @__PURE__ */ jsx63(Text59, { color: Colors.Gray, children: "\u25B2" }),
124149
124473
  visibleItems.map((item, idx) => {
124150
124474
  const isActive = focusSection === "settings" && activeSettingIndex === idx + scrollOffset;
124151
124475
  const scopeSettings = settings.forScope(selectedScope).settings;
@@ -124196,42 +124520,42 @@ function SettingsDialog({
124196
124520
  selectedScope,
124197
124521
  settings
124198
124522
  );
124199
- return /* @__PURE__ */ jsxs54(React27.Fragment, { children: [
124200
- /* @__PURE__ */ jsxs54(Box54, { flexDirection: "row", alignItems: "center", children: [
124201
- /* @__PURE__ */ jsx62(Box54, { minWidth: 2, flexShrink: 0, children: /* @__PURE__ */ jsx62(Text58, { color: isActive ? Colors.AccentGreen : Colors.Gray, children: isActive ? "\u25CF" : "" }) }),
124202
- /* @__PURE__ */ jsx62(Box54, { minWidth: 50, children: /* @__PURE__ */ jsxs54(
124203
- Text58,
124523
+ return /* @__PURE__ */ jsxs55(React27.Fragment, { children: [
124524
+ /* @__PURE__ */ jsxs55(Box55, { flexDirection: "row", alignItems: "center", children: [
124525
+ /* @__PURE__ */ jsx63(Box55, { minWidth: 2, flexShrink: 0, children: /* @__PURE__ */ jsx63(Text59, { color: isActive ? Colors.AccentGreen : Colors.Gray, children: isActive ? "\u25CF" : "" }) }),
124526
+ /* @__PURE__ */ jsx63(Box55, { minWidth: 50, children: /* @__PURE__ */ jsxs55(
124527
+ Text59,
124204
124528
  {
124205
124529
  color: isActive ? Colors.AccentGreen : Colors.Foreground,
124206
124530
  children: [
124207
124531
  item.label,
124208
- scopeMessage && /* @__PURE__ */ jsxs54(Text58, { color: Colors.Gray, children: [
124532
+ scopeMessage && /* @__PURE__ */ jsxs55(Text59, { color: Colors.Gray, children: [
124209
124533
  " ",
124210
124534
  scopeMessage
124211
124535
  ] })
124212
124536
  ]
124213
124537
  }
124214
124538
  ) }),
124215
- /* @__PURE__ */ jsx62(Box54, { minWidth: 3 }),
124216
- /* @__PURE__ */ jsx62(
124217
- Text58,
124539
+ /* @__PURE__ */ jsx63(Box55, { minWidth: 3 }),
124540
+ /* @__PURE__ */ jsx63(
124541
+ Text59,
124218
124542
  {
124219
124543
  color: isActive ? Colors.AccentGreen : shouldBeGreyedOut ? Colors.Gray : Colors.Foreground,
124220
124544
  children: displayValue
124221
124545
  }
124222
124546
  )
124223
124547
  ] }),
124224
- /* @__PURE__ */ jsx62(Box54, { height: 1 })
124548
+ /* @__PURE__ */ jsx63(Box55, { height: 1 })
124225
124549
  ] }, item.value);
124226
124550
  }),
124227
- showScrollDown && /* @__PURE__ */ jsx62(Text58, { color: Colors.Gray, children: "\u25BC" }),
124228
- /* @__PURE__ */ jsx62(Box54, { height: 1 }),
124229
- /* @__PURE__ */ jsxs54(Box54, { marginTop: 1, flexDirection: "column", children: [
124230
- /* @__PURE__ */ jsxs54(Text58, { bold: focusSection === "scope", wrap: "truncate", children: [
124551
+ showScrollDown && /* @__PURE__ */ jsx63(Text59, { color: Colors.Gray, children: "\u25BC" }),
124552
+ /* @__PURE__ */ jsx63(Box55, { height: 1 }),
124553
+ /* @__PURE__ */ jsxs55(Box55, { marginTop: 1, flexDirection: "column", children: [
124554
+ /* @__PURE__ */ jsxs55(Text59, { bold: focusSection === "scope", wrap: "truncate", children: [
124231
124555
  focusSection === "scope" ? "> " : " ",
124232
124556
  "Apply To"
124233
124557
  ] }),
124234
- /* @__PURE__ */ jsx62(
124558
+ /* @__PURE__ */ jsx63(
124235
124559
  RadioButtonSelect,
124236
124560
  {
124237
124561
  items: scopeItems,
@@ -124243,9 +124567,9 @@ function SettingsDialog({
124243
124567
  }
124244
124568
  )
124245
124569
  ] }),
124246
- /* @__PURE__ */ jsx62(Box54, { height: 1 }),
124247
- /* @__PURE__ */ jsx62(Text58, { color: Colors.Gray, children: "(Use Enter to select, Tab to change focus)" }),
124248
- showRestartPrompt && /* @__PURE__ */ jsx62(Text58, { color: Colors.AccentYellow, children: "To see changes, Gemini CLI must be restarted. Press r to exit and apply changes now." })
124570
+ /* @__PURE__ */ jsx63(Box55, { height: 1 }),
124571
+ /* @__PURE__ */ jsx63(Text59, { color: Colors.Gray, children: "(Use Enter to select, Tab to change focus)" }),
124572
+ showRestartPrompt && /* @__PURE__ */ jsx63(Text59, { color: Colors.AccentYellow, children: "To see changes, Gemini CLI must be restarted. Press r to exit and apply changes now." })
124249
124573
  ] })
124250
124574
  }
124251
124575
  );
@@ -124497,34 +124821,34 @@ import { EventEmitter as EventEmitter5 } from "events";
124497
124821
  var appEvents = new EventEmitter5();
124498
124822
 
124499
124823
  // packages/cli/src/ui/App.tsx
124500
- import { Fragment as Fragment7, jsx as jsx63, jsxs as jsxs55 } from "react/jsx-runtime";
124824
+ import { Fragment as Fragment7, jsx as jsx64, jsxs as jsxs56 } from "react/jsx-runtime";
124501
124825
  var CTRL_EXIT_PROMPT_DURATION_MS = 1e3;
124502
124826
  var MAX_DISPLAYED_QUEUED_MESSAGES = 3;
124503
124827
  var AppWrapper = (props) => {
124504
124828
  const kittyProtocolStatus = useKittyKeyboardProtocol();
124505
- return /* @__PURE__ */ jsx63(
124829
+ return /* @__PURE__ */ jsx64(
124506
124830
  KeypressProvider,
124507
124831
  {
124508
124832
  kittyProtocolEnabled: kittyProtocolStatus.enabled,
124509
124833
  config: props.config,
124510
- children: /* @__PURE__ */ jsx63(SessionStatsProvider, { children: /* @__PURE__ */ jsx63(VimModeProvider, { settings: props.settings, children: /* @__PURE__ */ jsx63(App, { ...props }) }) })
124834
+ children: /* @__PURE__ */ jsx64(SessionStatsProvider, { children: /* @__PURE__ */ jsx64(VimModeProvider, { settings: props.settings, children: /* @__PURE__ */ jsx64(App, { ...props }) }) })
124511
124835
  }
124512
124836
  );
124513
124837
  };
124514
124838
  var App = ({ config, settings, startupWarnings = [], version }) => {
124515
124839
  const isFocused = useFocus();
124516
124840
  useBracketedPaste();
124517
- const [updateInfo, setUpdateInfo] = useState43(null);
124841
+ const [updateInfo, setUpdateInfo] = useState44(null);
124518
124842
  const { stdout } = useStdout2();
124519
124843
  const nightly = version.includes("nightly");
124520
124844
  const { history, addItem, clearItems, loadHistory } = useHistory();
124521
- const [idePromptAnswered, setIdePromptAnswered] = useState43(false);
124845
+ const [idePromptAnswered, setIdePromptAnswered] = useState44(false);
124522
124846
  const currentIDE = config.getIdeClient().getCurrentIde();
124523
- useEffect40(() => {
124847
+ useEffect41(() => {
124524
124848
  registerCleanup(() => config.getIdeClient().disconnect());
124525
124849
  }, [config]);
124526
124850
  const shouldShowIdePrompt = currentIDE && !config.getIdeMode() && !settings.merged.hasSeenIdeIntegrationNudge && !idePromptAnswered;
124527
- useEffect40(() => {
124851
+ useEffect41(() => {
124528
124852
  const cleanup = setUpdateHandler(addItem, setUpdateInfo);
124529
124853
  return cleanup;
124530
124854
  }, [addItem]);
@@ -124533,7 +124857,7 @@ var App = ({ config, settings, startupWarnings = [], version }) => {
124533
124857
  handleNewMessage,
124534
124858
  clearConsoleMessages: clearConsoleMessagesState
124535
124859
  } = useConsoleMessages();
124536
- useEffect40(() => {
124860
+ useEffect41(() => {
124537
124861
  const consolePatcher = new ConsolePatcher({
124538
124862
  onNewMessage: handleNewMessage,
124539
124863
  debugMode: config.getDebugMode()
@@ -124542,52 +124866,52 @@ var App = ({ config, settings, startupWarnings = [], version }) => {
124542
124866
  registerCleanup(consolePatcher.cleanup);
124543
124867
  }, [handleNewMessage, config]);
124544
124868
  const { stats: sessionStats } = useSessionStats();
124545
- const [staticNeedsRefresh, setStaticNeedsRefresh] = useState43(false);
124546
- const [staticKey, setStaticKey] = useState43(0);
124869
+ const [staticNeedsRefresh, setStaticNeedsRefresh] = useState44(false);
124870
+ const [staticKey, setStaticKey] = useState44(0);
124547
124871
  const refreshStatic = useCallback28(() => {
124548
124872
  stdout.write(base_exports.clearTerminal);
124549
124873
  setStaticKey((prev) => prev + 1);
124550
124874
  }, [setStaticKey, stdout]);
124551
- const [geminiMdFileCount, setGeminiMdFileCount] = useState43(0);
124552
- const [debugMessage, setDebugMessage] = useState43("");
124553
- const [themeError, setThemeError] = useState43(null);
124554
- const [authError, setAuthError] = useState43(null);
124555
- const [editorError, setEditorError] = useState43(null);
124556
- const [isSearchDialogOpen, setIsSearchDialogOpen] = useState43(false);
124557
- const [footerHeight, setFooterHeight] = useState43(0);
124558
- useEffect40(() => {
124875
+ const [geminiMdFileCount, setGeminiMdFileCount] = useState44(0);
124876
+ const [debugMessage, setDebugMessage] = useState44("");
124877
+ const [themeError, setThemeError] = useState44(null);
124878
+ const [authError, setAuthError] = useState44(null);
124879
+ const [editorError, setEditorError] = useState44(null);
124880
+ const [isSearchDialogOpen, setIsSearchDialogOpen] = useState44(false);
124881
+ const [footerHeight, setFooterHeight] = useState44(0);
124882
+ useEffect41(() => {
124559
124883
  const initializeSearchEngineConfig = async () => {
124560
124884
  const configProvider = SearchEngineConfigProvider.getInstance();
124561
124885
  await configProvider.loadConfiguration();
124562
124886
  };
124563
124887
  initializeSearchEngineConfig();
124564
124888
  }, []);
124565
- const [corgiMode, setCorgiMode] = useState43(false);
124566
- const [isTrustedFolderState, setIsTrustedFolder] = useState43(
124889
+ const [corgiMode, setCorgiMode] = useState44(false);
124890
+ const [isTrustedFolderState, setIsTrustedFolder] = useState44(
124567
124891
  config.isTrustedFolder()
124568
124892
  );
124569
- const [currentModel, setCurrentModel] = useState43(config.getModel());
124570
- const [shellModeActive, setShellModeActive] = useState43(false);
124571
- const [showErrorDetails, setShowErrorDetails] = useState43(false);
124572
- const [showToolDescriptions, setShowToolDescriptions] = useState43(false);
124573
- const [ctrlCPressedOnce, setCtrlCPressedOnce] = useState43(false);
124574
- const [quittingMessages, setQuittingMessages] = useState43(null);
124893
+ const [currentModel, setCurrentModel] = useState44(config.getModel());
124894
+ const [shellModeActive, setShellModeActive] = useState44(false);
124895
+ const [showErrorDetails, setShowErrorDetails] = useState44(false);
124896
+ const [showToolDescriptions, setShowToolDescriptions] = useState44(false);
124897
+ const [ctrlCPressedOnce, setCtrlCPressedOnce] = useState44(false);
124898
+ const [quittingMessages, setQuittingMessages] = useState44(null);
124575
124899
  const ctrlCTimerRef = useRef12(null);
124576
- const [ctrlDPressedOnce, setCtrlDPressedOnce] = useState43(false);
124900
+ const [ctrlDPressedOnce, setCtrlDPressedOnce] = useState44(false);
124577
124901
  const ctrlDTimerRef = useRef12(null);
124578
- const [constrainHeight, setConstrainHeight] = useState43(true);
124579
- const [showPrivacyNotice, setShowPrivacyNotice] = useState43(false);
124580
- const [modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError] = useState43(false);
124581
- const [userTier, setUserTier] = useState43(void 0);
124582
- const [ideContextState, setIdeContextState] = useState43();
124583
- const [showEscapePrompt, setShowEscapePrompt] = useState43(false);
124584
- const [isProcessing, setIsProcessing] = useState43(false);
124585
- useEffect40(() => {
124902
+ const [constrainHeight, setConstrainHeight] = useState44(true);
124903
+ const [showPrivacyNotice, setShowPrivacyNotice] = useState44(false);
124904
+ const [modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError] = useState44(false);
124905
+ const [userTier, setUserTier] = useState44(void 0);
124906
+ const [ideContextState, setIdeContextState] = useState44();
124907
+ const [showEscapePrompt, setShowEscapePrompt] = useState44(false);
124908
+ const [isProcessing, setIsProcessing] = useState44(false);
124909
+ useEffect41(() => {
124586
124910
  const unsubscribe = ideContext.subscribeToIdeContext(setIdeContextState);
124587
124911
  setIdeContextState(ideContext.getIdeContext());
124588
124912
  return unsubscribe;
124589
124913
  }, []);
124590
- useEffect40(() => {
124914
+ useEffect41(() => {
124591
124915
  const openDebugConsole = () => {
124592
124916
  setShowErrorDetails(true);
124593
124917
  setConstrainHeight(false);
@@ -124643,7 +124967,7 @@ var App = ({ config, settings, startupWarnings = [], version }) => {
124643
124967
  handleRestart: handleWelcomeBackRestart,
124644
124968
  handleCancel: handleWelcomeBackCancel
124645
124969
  } = useWelcomeBack(settings);
124646
- useEffect40(() => {
124970
+ useEffect41(() => {
124647
124971
  if (settings.merged.selectedAuthType && !settings.merged.useExternalAuth) {
124648
124972
  const error = validateAuthMethod(settings.merged.selectedAuthType);
124649
124973
  if (error) {
@@ -124657,7 +124981,7 @@ var App = ({ config, settings, startupWarnings = [], version }) => {
124657
124981
  openAuthDialog,
124658
124982
  setAuthError
124659
124983
  ]);
124660
- useEffect40(() => {
124984
+ useEffect41(() => {
124661
124985
  if (!isAuthenticating) {
124662
124986
  setUserTier(config.getGeminiClient()?.getUserTier());
124663
124987
  }
@@ -124721,7 +125045,7 @@ var App = ({ config, settings, startupWarnings = [], version }) => {
124721
125045
  console.error("Error refreshing memory:", error);
124722
125046
  }
124723
125047
  }, [config, addItem, settings.merged]);
124724
- useEffect40(() => {
125048
+ useEffect41(() => {
124725
125049
  const checkModelChange = () => {
124726
125050
  const configModel = config.getModel();
124727
125051
  if (configModel !== currentModel) {
@@ -124732,7 +125056,7 @@ var App = ({ config, settings, startupWarnings = [], version }) => {
124732
125056
  const interval = setInterval(checkModelChange, 1e3);
124733
125057
  return () => clearInterval(interval);
124734
125058
  }, [config, currentModel]);
124735
- useEffect40(() => {
125059
+ useEffect41(() => {
124736
125060
  const flashFallbackHandler = async (currentModel2, fallbackModel, error) => {
124737
125061
  let message;
124738
125062
  if (config.getContentGeneratorConfig().authType === AuthType.LOGIN_WITH_GOOGLE) {
@@ -124864,7 +125188,7 @@ var App = ({ config, settings, startupWarnings = [], version }) => {
124864
125188
  isValidPath,
124865
125189
  shellModeActive
124866
125190
  });
124867
- const [userMessages, setUserMessages] = useState43([]);
125191
+ const [userMessages, setUserMessages] = useState44([]);
124868
125192
  const cancelHandlerRef = useRef12(() => {
124869
125193
  });
124870
125194
  const {
@@ -124890,7 +125214,7 @@ var App = ({ config, settings, startupWarnings = [], version }) => {
124890
125214
  refreshStatic,
124891
125215
  () => cancelHandlerRef.current()
124892
125216
  );
124893
- useEffect40(() => {
125217
+ useEffect41(() => {
124894
125218
  if (contextToPopulate && !initialPromptSubmitted.current) {
124895
125219
  submitQuery(contextToPopulate);
124896
125220
  initialPromptSubmitted.current = true;
@@ -125025,13 +125349,13 @@ ${queuedText}` : queuedText;
125025
125349
  useKeypress(handleGlobalKeypress, {
125026
125350
  isActive: true
125027
125351
  });
125028
- useEffect40(() => {
125352
+ useEffect41(() => {
125029
125353
  if (config) {
125030
125354
  setGeminiMdFileCount(config.getGeminiMdFileCount());
125031
125355
  }
125032
125356
  }, [config, config.getGeminiMdFileCount]);
125033
125357
  const logger6 = useLogger();
125034
- useEffect40(() => {
125358
+ useEffect41(() => {
125035
125359
  const fetchUserMessages = async () => {
125036
125360
  const pastMessagesRaw = await logger6?.getPreviousUserMessages() || [];
125037
125361
  const currentSessionUserMessages = history.filter(
@@ -125063,7 +125387,7 @@ ${queuedText}` : queuedText;
125063
125387
  }, [clearItems, clearConsoleMessagesState, refreshStatic]);
125064
125388
  const mainControlsRef = useRef12(null);
125065
125389
  const pendingHistoryItemRef = useRef12(null);
125066
- useEffect40(() => {
125390
+ useEffect41(() => {
125067
125391
  if (mainControlsRef.current) {
125068
125392
  const fullFooterMeasurement = measureElement(mainControlsRef.current);
125069
125393
  setFooterHeight(fullFooterMeasurement.height);
@@ -125077,7 +125401,7 @@ ${queuedText}` : queuedText;
125077
125401
  () => terminalHeight - footerHeight - staticExtraHeight,
125078
125402
  [terminalHeight, footerHeight]
125079
125403
  );
125080
- useEffect40(() => {
125404
+ useEffect41(() => {
125081
125405
  if (isInitialMount.current) {
125082
125406
  isInitialMount.current = false;
125083
125407
  return;
@@ -125090,7 +125414,7 @@ ${queuedText}` : queuedText;
125090
125414
  clearTimeout(handler);
125091
125415
  };
125092
125416
  }, [terminalWidth, terminalHeight, refreshStatic]);
125093
- useEffect40(() => {
125417
+ useEffect41(() => {
125094
125418
  if (streamingState === "idle" /* Idle */ && staticNeedsRefresh) {
125095
125419
  setStaticNeedsRefresh(false);
125096
125420
  refreshStatic();
@@ -125112,7 +125436,7 @@ ${queuedText}` : queuedText;
125112
125436
  }, [settings.merged.contextFileName]);
125113
125437
  const initialPrompt = useMemo9(() => config.getQuestion(), [config]);
125114
125438
  const geminiClient = config.getGeminiClient();
125115
- useEffect40(() => {
125439
+ useEffect41(() => {
125116
125440
  if (initialPrompt && !initialPromptSubmitted.current && !isAuthenticating && !isAuthDialogOpen && !shouldShowWelcomeBack && !isThemeDialogOpen && !isEditorDialogOpen && !isSearchDialogOpen && !showPrivacyNotice && geminiClient?.isInitialized?.()) {
125117
125441
  submitQuery(initialPrompt);
125118
125442
  initialPromptSubmitted.current = true;
@@ -125130,7 +125454,7 @@ ${queuedText}` : queuedText;
125130
125454
  geminiClient
125131
125455
  ]);
125132
125456
  if (quittingMessages) {
125133
- return /* @__PURE__ */ jsx63(Box55, { flexDirection: "column", marginBottom: 1, children: quittingMessages.map((item) => /* @__PURE__ */ jsx63(
125457
+ return /* @__PURE__ */ jsx64(Box56, { flexDirection: "column", marginBottom: 1, children: quittingMessages.map((item) => /* @__PURE__ */ jsx64(
125134
125458
  HistoryItemDisplay,
125135
125459
  {
125136
125460
  availableTerminalHeight: constrainHeight ? availableTerminalHeight : void 0,
@@ -125146,16 +125470,16 @@ ${queuedText}` : queuedText;
125146
125470
  const debugConsoleMaxHeight = Math.floor(Math.max(terminalHeight * 0.2, 5));
125147
125471
  const staticAreaMaxItemHeight = Math.max(terminalHeight * 4, 100);
125148
125472
  const placeholder = vimModeEnabled ? " Press 'i' for INSERT mode and 'Esc' for NORMAL mode." : " Type your message or @path/to/file";
125149
- return /* @__PURE__ */ jsx63(StreamingContext.Provider, { value: streamingState, children: /* @__PURE__ */ jsxs55(Box55, { flexDirection: "column", width: "90%", children: [
125150
- /* @__PURE__ */ jsx63(
125473
+ return /* @__PURE__ */ jsx64(StreamingContext.Provider, { value: streamingState, children: /* @__PURE__ */ jsxs56(Box56, { flexDirection: "column", width: "90%", children: [
125474
+ /* @__PURE__ */ jsx64(
125151
125475
  Static,
125152
125476
  {
125153
125477
  items: [
125154
- /* @__PURE__ */ jsxs55(Box55, { flexDirection: "column", children: [
125155
- !settings.merged.hideBanner && /* @__PURE__ */ jsx63(Header, { version, nightly }),
125156
- !settings.merged.hideTips && /* @__PURE__ */ jsx63(Tips, { config })
125478
+ /* @__PURE__ */ jsxs56(Box56, { flexDirection: "column", children: [
125479
+ !settings.merged.hideBanner && /* @__PURE__ */ jsx64(Header, { version, nightly }),
125480
+ !settings.merged.hideTips && /* @__PURE__ */ jsx64(Tips, { config })
125157
125481
  ] }, "header"),
125158
- ...history.map((h) => /* @__PURE__ */ jsx63(
125482
+ ...history.map((h) => /* @__PURE__ */ jsx64(
125159
125483
  HistoryItemDisplay,
125160
125484
  {
125161
125485
  terminalWidth: mainAreaWidth,
@@ -125172,8 +125496,8 @@ ${queuedText}` : queuedText;
125172
125496
  },
125173
125497
  staticKey
125174
125498
  ),
125175
- /* @__PURE__ */ jsx63(OverflowProvider, { children: /* @__PURE__ */ jsxs55(Box55, { ref: pendingHistoryItemRef, flexDirection: "column", children: [
125176
- pendingHistoryItems.map((item, i) => /* @__PURE__ */ jsx63(
125499
+ /* @__PURE__ */ jsx64(OverflowProvider, { children: /* @__PURE__ */ jsxs56(Box56, { ref: pendingHistoryItemRef, flexDirection: "column", children: [
125500
+ pendingHistoryItems.map((item, i) => /* @__PURE__ */ jsx64(
125177
125501
  HistoryItemDisplay,
125178
125502
  {
125179
125503
  availableTerminalHeight: constrainHeight ? availableTerminalHeight : void 0,
@@ -125185,30 +125509,30 @@ ${queuedText}` : queuedText;
125185
125509
  },
125186
125510
  i
125187
125511
  )),
125188
- /* @__PURE__ */ jsx63(ShowMoreLines, { constrainHeight })
125512
+ /* @__PURE__ */ jsx64(ShowMoreLines, { constrainHeight })
125189
125513
  ] }) }),
125190
- /* @__PURE__ */ jsxs55(Box55, { flexDirection: "column", ref: mainControlsRef, children: [
125191
- updateInfo && /* @__PURE__ */ jsx63(UpdateNotification, { message: updateInfo.message }),
125192
- startupWarnings.length > 0 && /* @__PURE__ */ jsx63(
125193
- Box55,
125514
+ /* @__PURE__ */ jsxs56(Box56, { flexDirection: "column", ref: mainControlsRef, children: [
125515
+ updateInfo && /* @__PURE__ */ jsx64(UpdateNotification, { message: updateInfo.message }),
125516
+ startupWarnings.length > 0 && /* @__PURE__ */ jsx64(
125517
+ Box56,
125194
125518
  {
125195
125519
  borderStyle: "round",
125196
125520
  borderColor: Colors.AccentYellow,
125197
125521
  paddingX: 1,
125198
125522
  marginY: 1,
125199
125523
  flexDirection: "column",
125200
- children: startupWarnings.map((warning, index) => /* @__PURE__ */ jsx63(Text59, { color: Colors.AccentYellow, children: warning }, index))
125524
+ children: startupWarnings.map((warning, index) => /* @__PURE__ */ jsx64(Text60, { color: Colors.AccentYellow, children: warning }, index))
125201
125525
  }
125202
125526
  ),
125203
- shouldShowIdePrompt && currentIDE ? /* @__PURE__ */ jsx63(
125527
+ shouldShowIdePrompt && currentIDE ? /* @__PURE__ */ jsx64(
125204
125528
  IdeIntegrationNudge,
125205
125529
  {
125206
125530
  ide: currentIDE,
125207
125531
  onComplete: handleIdePromptComplete
125208
125532
  }
125209
- ) : isFolderTrustDialogOpen ? /* @__PURE__ */ jsx63(FolderTrustDialog, { onSelect: handleFolderTrustSelect }) : shellConfirmationRequest ? /* @__PURE__ */ jsx63(ShellConfirmationDialog, { request: shellConfirmationRequest }) : confirmationRequest ? /* @__PURE__ */ jsxs55(Box55, { flexDirection: "column", children: [
125533
+ ) : isFolderTrustDialogOpen ? /* @__PURE__ */ jsx64(FolderTrustDialog, { onSelect: handleFolderTrustSelect }) : shellConfirmationRequest ? /* @__PURE__ */ jsx64(ShellConfirmationDialog, { request: shellConfirmationRequest }) : confirmationRequest ? /* @__PURE__ */ jsxs56(Box56, { flexDirection: "column", children: [
125210
125534
  confirmationRequest.prompt,
125211
- /* @__PURE__ */ jsx63(Box55, { paddingY: 1, children: /* @__PURE__ */ jsx63(
125535
+ /* @__PURE__ */ jsx64(Box56, { paddingY: 1, children: /* @__PURE__ */ jsx64(
125212
125536
  RadioButtonSelect,
125213
125537
  {
125214
125538
  isFocused: !!confirmationRequest,
@@ -125221,9 +125545,9 @@ ${queuedText}` : queuedText;
125221
125545
  }
125222
125546
  }
125223
125547
  ) })
125224
- ] }) : isThemeDialogOpen ? /* @__PURE__ */ jsxs55(Box55, { flexDirection: "column", children: [
125225
- themeError && /* @__PURE__ */ jsx63(Box55, { marginBottom: 1, children: /* @__PURE__ */ jsx63(Text59, { color: Colors.AccentRed, children: themeError }) }),
125226
- /* @__PURE__ */ jsx63(
125548
+ ] }) : isThemeDialogOpen ? /* @__PURE__ */ jsxs56(Box56, { flexDirection: "column", children: [
125549
+ themeError && /* @__PURE__ */ jsx64(Box56, { marginBottom: 1, children: /* @__PURE__ */ jsx64(Text60, { color: Colors.AccentRed, children: themeError }) }),
125550
+ /* @__PURE__ */ jsx64(
125227
125551
  ThemeDialog,
125228
125552
  {
125229
125553
  onSelect: handleThemeSelect,
@@ -125233,15 +125557,15 @@ ${queuedText}` : queuedText;
125233
125557
  terminalWidth: mainAreaWidth
125234
125558
  }
125235
125559
  )
125236
- ] }) : isSettingsDialogOpen ? /* @__PURE__ */ jsx63(Box55, { flexDirection: "column", children: /* @__PURE__ */ jsx63(
125560
+ ] }) : isSettingsDialogOpen ? /* @__PURE__ */ jsx64(Box56, { flexDirection: "column", children: /* @__PURE__ */ jsx64(
125237
125561
  SettingsDialog,
125238
125562
  {
125239
125563
  settings,
125240
125564
  onSelect: () => closeSettingsDialog(),
125241
125565
  onRestartRequest: () => process18.exit(0)
125242
125566
  }
125243
- ) }) : isAuthenticating ? /* @__PURE__ */ jsxs55(Fragment7, { children: [
125244
- /* @__PURE__ */ jsx63(
125567
+ ) }) : isAuthenticating ? /* @__PURE__ */ jsxs56(Fragment7, { children: [
125568
+ /* @__PURE__ */ jsx64(
125245
125569
  AuthInProgress,
125246
125570
  {
125247
125571
  onTimeout: () => {
@@ -125251,8 +125575,8 @@ ${queuedText}` : queuedText;
125251
125575
  }
125252
125576
  }
125253
125577
  ),
125254
- showErrorDetails && /* @__PURE__ */ jsx63(OverflowProvider, { children: /* @__PURE__ */ jsxs55(Box55, { flexDirection: "column", children: [
125255
- /* @__PURE__ */ jsx63(
125578
+ showErrorDetails && /* @__PURE__ */ jsx64(OverflowProvider, { children: /* @__PURE__ */ jsxs56(Box56, { flexDirection: "column", children: [
125579
+ /* @__PURE__ */ jsx64(
125256
125580
  DetailedMessagesDisplay,
125257
125581
  {
125258
125582
  messages: filteredConsoleMessages,
@@ -125260,16 +125584,16 @@ ${queuedText}` : queuedText;
125260
125584
  width: inputWidth
125261
125585
  }
125262
125586
  ),
125263
- /* @__PURE__ */ jsx63(ShowMoreLines, { constrainHeight })
125587
+ /* @__PURE__ */ jsx64(ShowMoreLines, { constrainHeight })
125264
125588
  ] }) })
125265
- ] }) : isAuthDialogOpen ? /* @__PURE__ */ jsx63(Box55, { flexDirection: "column", children: /* @__PURE__ */ jsx63(
125589
+ ] }) : isAuthDialogOpen ? /* @__PURE__ */ jsx64(Box56, { flexDirection: "column", children: /* @__PURE__ */ jsx64(
125266
125590
  AuthDialog,
125267
125591
  {
125268
125592
  onSelect: handleAuthSelect,
125269
125593
  settings,
125270
125594
  initialErrorMessage: authError
125271
125595
  }
125272
- ) }) : shouldShowWelcomeBack && projectSummary ? /* @__PURE__ */ jsx63(Box55, { flexDirection: "column", children: /* @__PURE__ */ jsx63(
125596
+ ) }) : shouldShowWelcomeBack && projectSummary ? /* @__PURE__ */ jsx64(Box56, { flexDirection: "column", children: /* @__PURE__ */ jsx64(
125273
125597
  WelcomeBackDialog,
125274
125598
  {
125275
125599
  projectSummary,
@@ -125277,9 +125601,9 @@ ${queuedText}` : queuedText;
125277
125601
  onRestart: handleWelcomeBackRestart,
125278
125602
  onCancel: handleWelcomeBackCancel
125279
125603
  }
125280
- ) }) : isEditorDialogOpen ? /* @__PURE__ */ jsxs55(Box55, { flexDirection: "column", children: [
125281
- editorError && /* @__PURE__ */ jsx63(Box55, { marginBottom: 1, children: /* @__PURE__ */ jsx63(Text59, { color: Colors.AccentRed, children: editorError }) }),
125282
- /* @__PURE__ */ jsx63(
125604
+ ) }) : isEditorDialogOpen ? /* @__PURE__ */ jsxs56(Box56, { flexDirection: "column", children: [
125605
+ editorError && /* @__PURE__ */ jsx64(Box56, { marginBottom: 1, children: /* @__PURE__ */ jsx64(Text60, { color: Colors.AccentRed, children: editorError }) }),
125606
+ /* @__PURE__ */ jsx64(
125283
125607
  EditorSettingsDialog,
125284
125608
  {
125285
125609
  onSelect: handleEditorSelect,
@@ -125287,7 +125611,7 @@ ${queuedText}` : queuedText;
125287
125611
  onExit: exitEditorDialog
125288
125612
  }
125289
125613
  )
125290
- ] }) : isSearchDialogOpen ? /* @__PURE__ */ jsx63(Box55, { flexDirection: "column", children: /* @__PURE__ */ jsx63(
125614
+ ] }) : isSearchDialogOpen ? /* @__PURE__ */ jsx64(Box56, { flexDirection: "column", children: /* @__PURE__ */ jsx64(
125291
125615
  SearchEngineConfigDialog,
125292
125616
  {
125293
125617
  onSubmit: (result) => {
@@ -125304,14 +125628,14 @@ ${queuedText}` : queuedText;
125304
125628
  setIsSearchDialogOpen(false);
125305
125629
  }
125306
125630
  }
125307
- ) }) : showPrivacyNotice ? /* @__PURE__ */ jsx63(
125631
+ ) }) : showPrivacyNotice ? /* @__PURE__ */ jsx64(
125308
125632
  PrivacyNotice,
125309
125633
  {
125310
125634
  onExit: () => setShowPrivacyNotice(false),
125311
125635
  config
125312
125636
  }
125313
- ) : /* @__PURE__ */ jsxs55(Fragment7, { children: [
125314
- /* @__PURE__ */ jsx63(
125637
+ ) : /* @__PURE__ */ jsxs56(Fragment7, { children: [
125638
+ /* @__PURE__ */ jsx64(
125315
125639
  LoadingIndicator,
125316
125640
  {
125317
125641
  thought: streamingState === "waiting_for_confirmation" /* WaitingForConfirmation */ || config.getAccessibility()?.disableLoadingPhrases ? void 0 : thought,
@@ -125319,23 +125643,23 @@ ${queuedText}` : queuedText;
125319
125643
  elapsedTime
125320
125644
  }
125321
125645
  ),
125322
- messageQueue.length > 0 && /* @__PURE__ */ jsxs55(Box55, { flexDirection: "column", marginTop: 1, children: [
125646
+ messageQueue.length > 0 && /* @__PURE__ */ jsxs56(Box56, { flexDirection: "column", marginTop: 1, children: [
125323
125647
  messageQueue.slice(0, MAX_DISPLAYED_QUEUED_MESSAGES).map((message, index) => {
125324
125648
  const preview = message.replace(/\s+/g, " ");
125325
125649
  return (
125326
125650
  // Ensure the Box takes full width so truncation calculates correctly
125327
- /* @__PURE__ */ jsx63(Box55, { paddingLeft: 2, width: "100%", children: /* @__PURE__ */ jsx63(Text59, { dimColor: true, wrap: "truncate", children: preview }) }, index)
125651
+ /* @__PURE__ */ jsx64(Box56, { paddingLeft: 2, width: "100%", children: /* @__PURE__ */ jsx64(Text60, { dimColor: true, wrap: "truncate", children: preview }) }, index)
125328
125652
  );
125329
125653
  }),
125330
- messageQueue.length > MAX_DISPLAYED_QUEUED_MESSAGES && /* @__PURE__ */ jsx63(Box55, { paddingLeft: 2, children: /* @__PURE__ */ jsxs55(Text59, { dimColor: true, children: [
125654
+ messageQueue.length > MAX_DISPLAYED_QUEUED_MESSAGES && /* @__PURE__ */ jsx64(Box56, { paddingLeft: 2, children: /* @__PURE__ */ jsxs56(Text60, { dimColor: true, children: [
125331
125655
  "... (+",
125332
125656
  messageQueue.length - MAX_DISPLAYED_QUEUED_MESSAGES,
125333
125657
  " ",
125334
125658
  "more)"
125335
125659
  ] }) })
125336
125660
  ] }),
125337
- /* @__PURE__ */ jsxs55(
125338
- Box55,
125661
+ /* @__PURE__ */ jsxs56(
125662
+ Box56,
125339
125663
  {
125340
125664
  marginTop: 1,
125341
125665
  justifyContent: "space-between",
@@ -125343,9 +125667,9 @@ ${queuedText}` : queuedText;
125343
125667
  flexDirection: isNarrow ? "column" : "row",
125344
125668
  alignItems: isNarrow ? "flex-start" : "center",
125345
125669
  children: [
125346
- /* @__PURE__ */ jsxs55(Box55, { children: [
125347
- process18.env["GEMINI_SYSTEM_MD"] && /* @__PURE__ */ jsx63(Text59, { color: Colors.AccentRed, children: "|\u2310\u25A0_\u25A0| " }),
125348
- ctrlCPressedOnce ? /* @__PURE__ */ jsx63(Text59, { color: Colors.AccentYellow, children: "Press Ctrl+C again to exit." }) : ctrlDPressedOnce ? /* @__PURE__ */ jsx63(Text59, { color: Colors.AccentYellow, children: "Press Ctrl+D again to exit." }) : showEscapePrompt ? /* @__PURE__ */ jsx63(Text59, { color: Colors.Gray, children: "Press Esc again to clear." }) : /* @__PURE__ */ jsx63(
125670
+ /* @__PURE__ */ jsxs56(Box56, { children: [
125671
+ process18.env["GEMINI_SYSTEM_MD"] && /* @__PURE__ */ jsx64(Text60, { color: Colors.AccentRed, children: "|\u2310\u25A0_\u25A0| " }),
125672
+ ctrlCPressedOnce ? /* @__PURE__ */ jsx64(Text60, { color: Colors.AccentYellow, children: "Press Ctrl+C again to exit." }) : ctrlDPressedOnce ? /* @__PURE__ */ jsx64(Text60, { color: Colors.AccentYellow, children: "Press Ctrl+D again to exit." }) : showEscapePrompt ? /* @__PURE__ */ jsx64(Text60, { color: Colors.Gray, children: "Press Esc again to clear." }) : /* @__PURE__ */ jsx64(
125349
125673
  ContextSummaryDisplay,
125350
125674
  {
125351
125675
  ideContext: ideContextState,
@@ -125357,20 +125681,20 @@ ${queuedText}` : queuedText;
125357
125681
  }
125358
125682
  )
125359
125683
  ] }),
125360
- /* @__PURE__ */ jsxs55(Box55, { paddingTop: isNarrow ? 1 : 0, children: [
125361
- showAutoAcceptIndicator !== ApprovalMode.DEFAULT && !shellModeActive && /* @__PURE__ */ jsx63(
125684
+ /* @__PURE__ */ jsxs56(Box56, { paddingTop: isNarrow ? 1 : 0, children: [
125685
+ showAutoAcceptIndicator !== ApprovalMode.DEFAULT && !shellModeActive && /* @__PURE__ */ jsx64(
125362
125686
  AutoAcceptIndicator,
125363
125687
  {
125364
125688
  approvalMode: showAutoAcceptIndicator
125365
125689
  }
125366
125690
  ),
125367
- shellModeActive && /* @__PURE__ */ jsx63(ShellModeIndicator, {})
125691
+ shellModeActive && /* @__PURE__ */ jsx64(ShellModeIndicator, {})
125368
125692
  ] })
125369
125693
  ]
125370
125694
  }
125371
125695
  ),
125372
- showErrorDetails && /* @__PURE__ */ jsx63(OverflowProvider, { children: /* @__PURE__ */ jsxs55(Box55, { flexDirection: "column", children: [
125373
- /* @__PURE__ */ jsx63(
125696
+ showErrorDetails && /* @__PURE__ */ jsx64(OverflowProvider, { children: /* @__PURE__ */ jsxs56(Box56, { flexDirection: "column", children: [
125697
+ /* @__PURE__ */ jsx64(
125374
125698
  DetailedMessagesDisplay,
125375
125699
  {
125376
125700
  messages: filteredConsoleMessages,
@@ -125378,9 +125702,9 @@ ${queuedText}` : queuedText;
125378
125702
  width: inputWidth
125379
125703
  }
125380
125704
  ),
125381
- /* @__PURE__ */ jsx63(ShowMoreLines, { constrainHeight })
125705
+ /* @__PURE__ */ jsx64(ShowMoreLines, { constrainHeight })
125382
125706
  ] }) }),
125383
- isInputActive && /* @__PURE__ */ jsx63(
125707
+ isInputActive && /* @__PURE__ */ jsx64(
125384
125708
  InputPrompt,
125385
125709
  {
125386
125710
  buffer,
@@ -125401,8 +125725,8 @@ ${queuedText}` : queuedText;
125401
125725
  }
125402
125726
  )
125403
125727
  ] }),
125404
- initError && streamingState !== "responding" /* Responding */ && /* @__PURE__ */ jsx63(
125405
- Box55,
125728
+ initError && streamingState !== "responding" /* Responding */ && /* @__PURE__ */ jsx64(
125729
+ Box56,
125406
125730
  {
125407
125731
  borderStyle: "round",
125408
125732
  borderColor: Colors.AccentRed,
@@ -125410,21 +125734,21 @@ ${queuedText}` : queuedText;
125410
125734
  marginBottom: 1,
125411
125735
  children: history.find(
125412
125736
  (item) => item.type === "error" && item.text?.includes(initError)
125413
- )?.text ? /* @__PURE__ */ jsx63(Text59, { color: Colors.AccentRed, children: history.find(
125737
+ )?.text ? /* @__PURE__ */ jsx64(Text60, { color: Colors.AccentRed, children: history.find(
125414
125738
  (item) => item.type === "error" && item.text?.includes(initError)
125415
- )?.text }) : /* @__PURE__ */ jsxs55(Fragment7, { children: [
125416
- /* @__PURE__ */ jsxs55(Text59, { color: Colors.AccentRed, children: [
125739
+ )?.text }) : /* @__PURE__ */ jsxs56(Fragment7, { children: [
125740
+ /* @__PURE__ */ jsxs56(Text60, { color: Colors.AccentRed, children: [
125417
125741
  "Initialization Error: ",
125418
125742
  initError
125419
125743
  ] }),
125420
- /* @__PURE__ */ jsxs55(Text59, { color: Colors.AccentRed, children: [
125744
+ /* @__PURE__ */ jsxs56(Text60, { color: Colors.AccentRed, children: [
125421
125745
  " ",
125422
125746
  "Please check API key and configuration."
125423
125747
  ] })
125424
125748
  ] })
125425
125749
  }
125426
125750
  ),
125427
- !settings.merged.hideFooter && /* @__PURE__ */ jsx63(
125751
+ !settings.merged.hideFooter && /* @__PURE__ */ jsx64(
125428
125752
  Footer,
125429
125753
  {
125430
125754
  model: currentModel,
@@ -127785,7 +128109,7 @@ function toPermissionOptions(confirmation) {
127785
128109
  }
127786
128110
 
127787
128111
  // packages/cli/src/gemini.tsx
127788
- import { jsx as jsx64 } from "react/jsx-runtime";
128112
+ import { jsx as jsx65 } from "react/jsx-runtime";
127789
128113
  var DEBUG_CLI = process.env["FSS_DEBUG"] === "true" || process.env["NODE_ENV"] === "development";
127790
128114
  function validateDnsResolutionOrder(order) {
127791
128115
  const defaultValue = "ipv4first";
@@ -127857,7 +128181,9 @@ async function main() {
127857
128181
  try {
127858
128182
  const modelManager2 = getModelManager();
127859
128183
  await modelManager2.initializeFromStore();
127860
- console.log("\u2705 Database-first model persistence initialized");
128184
+ if (process.env["FSS_DEBUG"] === "true") {
128185
+ console.log("\u2705 Database-first model persistence initialized");
128186
+ }
127861
128187
  } catch (error) {
127862
128188
  console.warn("\u26A0\uFE0F Database initialization failed, falling back to environment variables:", error);
127863
128189
  }
@@ -127876,6 +128202,10 @@ async function main() {
127876
128202
  process.exit(1);
127877
128203
  }
127878
128204
  const argv = await parseArguments();
128205
+ if (argv.debug) {
128206
+ process.env["FSS_DEBUG"] = "true";
128207
+ process.env["FSS_DB_DEBUG"] = "true";
128208
+ }
127879
128209
  const extensions = loadExtensions(workspaceRoot);
127880
128210
  const config = await loadCliConfig(
127881
128211
  settings.merged,
@@ -127986,7 +128316,7 @@ async function main() {
127986
128316
  await detectAndEnableKittyProtocol();
127987
128317
  setWindowTitle(basename15(workspaceRoot), settings);
127988
128318
  const instance = render2(
127989
- /* @__PURE__ */ jsx64(React28.StrictMode, { children: /* @__PURE__ */ jsx64(SettingsContext.Provider, { value: settings, children: /* @__PURE__ */ jsx64(
128319
+ /* @__PURE__ */ jsx65(React28.StrictMode, { children: /* @__PURE__ */ jsx65(SettingsContext.Provider, { value: settings, children: /* @__PURE__ */ jsx65(
127990
128320
  AppWrapper,
127991
128321
  {
127992
128322
  config,